PageSourceSearch

https://ala-norte-studio.lovable.app/assets/Equipos-9hD4MS9L.js

js ala-norte-studio.lovable.app collected 2026-10-03 03:21:42 UTC 526,259 bytes, 200 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-Bu5nloUS.js","assets/index-zWEle4n0.js","assets/index-BLcwvhsY.css","assets/Seo-Bfdpr1J5.js","assets/cache-DRRIBNff.js","assets/dialog-DDfvwC54.js","assets/index-C9h9HaHi.js","assets/Combination--VEgnpeT.js","assets/carousel-DK8HpTPT.js","assets/loader-circle-C2VwNUNp.js","assets/trash-2-CkkaB79A.js","assets/chevron-down-CYZ_KCrJ.js","assets/collapsible-DsU8dOU5.js","assets/index-BxnpRE0u.js","assets/select-BopXgN78.js","assets/index-BdQq_4o_.js","assets/index-KJ3g1QRS.js","assets/chevron-up-C4t5DJDh.js","assets/download-CbuvC1Zc.js"])))=>i.map(i=>d[i]);
2var _0=Object.defineProperty;var N0=(t,e,n)=>e in t?_0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ee=(t,e,n)=>N0(t,typeof e!="symbol"?e+"":e,n);import{a as Zc,r as kt,s as Ta,j as I,P as S0,c as qe,b as Of,d as Tf,C as Df,e as Mf,f as Qs,B as $n,X as Va,g as A0,h as Kc,R as Wt,S as Lc,_ as zl,i as L0,u as k0,F as P0,k as Gu,I as C0}from"./index-zWEle4n0.js";import{S as E0}from"./Seo-Bfdpr1J5.js";import{g as Ul,s as Hl,C as Pa}from"./cache-DRRIBNff.js";import{D as j0,a as I0,b as F0,c as R0,O as O0,C as T0,T as D0,d as M0,e as B0,f as q0,R as z0,P as U0}from"./dialog-DDfvwC54.js";import{C as Bf,a as qf,b as zf,c as Uf,d as Hf,e as tl}from"./carousel-DK8HpTPT.js";import{L as H0,a as W0,A as $0}from"./loader-circle-C2VwNUNp.js";import{P as zo,S as V0,T as G0}from"./trash-2-CkkaB79A.js";import{C as Xc}from"./chevron-down-CYZ_KCrJ.js";import{C as Yu,a as Zu}from"./collapsible-DsU8dOU5.js";import{S as Y0,a as Z0,b as K0,c as X0,d as Wl}from"./select-BopXgN78.js";import{D as J0}from"./download-CbuvC1Zc.js";/**
3 * @license lucide-react v0.462.0 - ISC
4 *
5 * This source code is licensed under the ISC license.
6 * See the LICENSE file in the root directory of this source tree.
7 */const Q0=Zc("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
8 * @license lucide-react v0.462.0 - ISC
9 *
10 * This source code is licensed under the ISC license.
11 * See the LICENSE file in the root directory of this source tree.
12 */const t2=Zc("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
13 * @license lucide-react v0.462.0 - ISC
14 *
15 * This source code is licensed under the ISC license.
16 * See the LICENSE file in the root directory of this source tree.
17 */const e2=Zc("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);function n2(){const[t,e]=kt.useState([]),[n,r]=kt.useState([]),[i,a]=kt.useState([]),[l,s]=kt.useState(!0),u=kt.useCallback(async()=>{s(!0);const h=Ul(Pa.CATEGORIES),f=Ul(Pa.SUBCATEGORIES),v=Ul(Pa.EQUIPMENT);if(h&&f&&v){r(h),a(f),e(v),s(!1);return}const[b,p,S]=await Promise.all([h?Promise.resolve({data:h,error:null}):Ta.from("categories").select("*").order("order_index"),f?Promise.resolve({data:f,error:null}):Ta.from("subcategories").select("*").order("order_index"),v?Promise.resolve({data:v,error:null}):Ta.from("equipment").select("*, categories!category_id (*), subcategories (*)").in("ownership_type",["Propio","Estacionado","Compartido"]).order("order_index")]);if(!b.error&&b.data&&(r(b.data),h||Hl(Pa.CATEGORIES,b.data)),!p.error&&p.data&&(a(p.data),f||Hl(Pa.SUBCATEGORIES,p.data)),!S.error&&S.data){const k=S.data.map(C=>({...C,images:Array.isArray(C.images)?C.images:[],stock_quantity:C.stock_quantity??1}));e(k),v||Hl(Pa.EQUIPMENT,k)}s(!1)},[]);return kt.useEffect(()=>{u()},[u]),{equipment:t,categories:n,subcategories:i,loading:l,refetch:u}}var r2="Separator",Ku="horizontal",i2=["horizontal","vertical"],Wf=kt.forwardRef((t,e)=>{const{decorative:n,orientation:r=Ku,...i}=t,a=a2(r)?r:Ku,s=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return I.jsx(S0.div,{"data-orientation":a,...s,...i,ref:e})});Wf.displayName=r2;function a2(t){return i2.includes(t)}var $f=Wf;const Vf=kt.forwardRef(({className:t,orientation:e="horizontal",decorative:n=!0,...r},i)=>I.jsx($f,{ref:i,decorative:n,orientation:e,className:qe("shrink-0 separator-silver-gradient",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));Vf.displayName=$f.displayName;const Gf=({src:t,alt:e,className:n,placeholderClassName:r,onLoad:i,aspectRatio:a="video"})=>{const[l,s]=kt.useState(!1),[u,h]=kt.useState(!1),f=kt.useRef(null);kt.useEffect(()=>{if(!f.current)return;const S=new IntersectionObserver(k=>
17{k.forEach(C=>{C.isIntersecting&&(h(!0),S.disconnect())})},{rootMargin:"50px"});return S.observe(f.current),()=>S.disconnect()},[]);const v=()=>{s(!0),i==null||i()},b={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]"}[a],p=!(r!=null&&r.includes("w-full"))||!(r!=null&&r.includes("h-full"));return I.jsxs("div",{ref:f,className:qe("relative overflow-hidden bg-muted",p&&b,r),children:[!l&&I.jsx("div",{className:"absolute inset-0 bg-muted",children:I.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-foreground/5 to-transparent animate-[shimmer_1.5s_infinite] -translate-x-full"})}),u&&I.jsx("img",{src:t,alt:e,className:qe("absolute inset-0 w-full h-full object-cover object-center transition-opacity duration-300 image-duotone",l?"opacity-100":"opacity-0",n),onLoad:v,loading:"lazy"})]})},o2=({equipmentId:t,categoryId:e,subcategoryId:n,onAddToCart:r,getCartQuantity:i,canAddMore:a,onViewDetails:l})=>{const[s,u]=kt.useState([]),[h,f]=kt.useState(!0),{addItem:v,items:b}=Of(),{toast:p}=Tf();kt.useEffect(()=>{S()},[t,e,n]);const S=async()=>{f(!0);const{data:O}=await Ta.from("equipment_recommendations").select(`
18        recommended_id,
19        reason,
20        equipment:recommended_id (
21          *,
22          categories!category_id (*),
23          subcategories (*)
24        )
25      `).eq("equipment_id",t).limit(6);if(O&&O.length>0){const dt=O.map(et=>et.equipment).filter(et=>et&&et.status==="available").map(et=>({...et,images:Array.isArray(et.images)?et.images:[]}));u(dt),f(!1);return}let U=Ta.from("equipment").select(`
26        *,
27        categories!category_id (*),
28        subcategories (*)
29      `).eq("status","available").neq("id",t);n?U=U.eq("subcategory_id",n):e&&(U=U.eq("category_id",e));const{data:R,error:nt}=await U.limit(6);if(!nt&&R){const dt=R.map(et=>({...et,images:Array.isArray(et.images)?et.images:[]}));u(dt)}f(!1)},k=O=>{r?r(O):(v({id:O.id,name:O.name,brand:O.brand||void 0,pricePerDay:O.price_per_day,imageUrl:O.image_url||void 0,stockQuantity:O.stock_quantity}),p({title:"Agregado a reserva",description:`${O.name} agregado al carrito`}))},C=O=>{if(i)return i(O);const U=b.find(R=>R.id===O);return(U==null?void 0:U.quantity)||0},_=O=>{if(a)return a(O);const U=b.find(nt=>nt.id===O.id);return((U==null?void 0:U.quantity)||0)<O.stock_quantity};return h?I.jsx("div",{className:"flex items-center justify-center py-12",children:I.jsx(H0,{className:"h-8 w-8 animate-spin"})}):s.length===0?null:I.jsxs("div",{className:"space-y-4",children:[I.jsx("h3",{className:"font-heading text-xl uppercase",children:"Equipos Relacionados"}),I.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-2 md:grid-cols-3 gap-3 sm:gap-4",children:s.map(O=>{const U=C(O.id),R=_(O);return I.jsx(Df,{className:"overflow-hidden group relative border-0 shadow-none hover:shadow-none [box-shadow:none!important] hover:[box-shadow:none!important]",children:I.jsxs(Mf,{className:"p-2 sm:p-3 flex flex-col space-y-2",children:[I.jsx("h3",{className:"font-heading normal-case text-xs sm:text-sm leading-tight pt-2 line-clamp-2 cursor-pointer hover:text-primary transition-colors h-[5em]",onClick:()=>l==null?void 0:l(O),children:Qs(O.name)}),I.jsxs("div",{className:"relative aspect-square cursor-pointer duotone-hover-group overflow-hidden",onClick:()=>l==null?void 0:l(O),children:[I.jsxs("div",{className:qe("absolute bottom-2 right-2 z-10 rounded-none px-2 py-0.5 flex items-center justify-center font-heading text-[10px] sm:text-xs shadow-brutal-sm",U>0?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:[U,"/",O.stock_quantity]}),O.image_url?I.jsx(Gf,{src:O.image_url,alt:O.name,className:"w-full h-full group-hover:scale-105 transition-all duration-300",placeholderClassName:"w-full h-full",aspectRatio:"square"}):I.jsx("div",{className:"w-full h-full flex items-center justify-center bg-muted",children:I.jsx("span",{className:"text-2xl sm:text-3xl opacity-20 font-heading",children:"?"})})]}),I.jsxs("div",{className:"mt-auto flex items-center gap-2",children:[I.jsxs("div",{className:"flex-1 flex items-baseline gap-1",children:[I.jsxs("span",{className:"text-primary font-heading text-lg sm:text-xl",children:["$",O.price_per_day>0?(O.price_per_day/1e3).toFixed(0)+"K":"—"]}),I.jsx("span",{className:"text-muted-foreground font-mono text-[10px]",children:"/día"})]}),O.status==="available"?I.jsx($n,{size:"sm",className:"h-8 sm:h-9 w-8 sm:w-9 p-0 overflow-hidden transition-all duration-300 hover:w-[100px] sm:hover:w-[120px] hover:px-2 sm:hover:px-3 font-black flex-shrink-0 group relative flex items-center justify-center gap-0",onClick:()=>k(O),disabled:!R,children:R?I.jsxs(I.Fragment,{children:[I.jsx(zo,{className:"h-3 w-3 sm:h-4 sm:w-4 flex-shrink-0 m-0"}),I.jsx("span",{className:"whitespace-nowrap opacity-0 w-0 overflow-hidden transition-all duration-300 group-hover:opacity-100 group-hover:w-auto group-hover:ml-2 font-black",children:"AGREGAR"})]}):I.jsx("span",{className:"text-[10px] font-black",children:"MÁX"})}):I.jsx($n,{size:"sm",className:"h-8 sm:h-9 w-8 sm:w-9 p-0 font-black flex-shrink-0 flex items-center justify-center",disabled:!0,children:I.jsx(Va,{className:"h-3 w-3 sm:h-4 sm:w-4"})})]})]})},O.id)})})]})},s2=({equipment:t,open:e,onOpenChange:n,onAddToCart:r,getCartQuantity:i,canAddMore:a,onViewDetails:l})=>{const[s,u]=kt.useState([]),{isAdmin:h}=A0();if(kt.useEffect(()=>{if(!(t!=null&&t.id)||!e)return;(async()=>{const{data:k,error:C}=await Ta.from("equipment_images").select("image_url, order_index").eq("equipment_id",t.id).order("order_index");!C&&k&&k.length>0?u(k.map(_=>_.image_url)):u([])})()},[t==null?void 0:t.id,e]),!t)return null;const f=[];
29s.forEach(S=>{S&&!f.includes(S)&&f.push(S)}),t.image_url&&!f.includes(t.image_url)&&f.push(t.image_url),Array.isArray(t.images)&&t.images.forEach(S=>{S&&!f.includes(S)&&f.push(S)});const v=f.length>0?f:["/placeholder.svg"],b=(i==null?void 0:i(t.id))??0,p=(a==null?void 0:a(t))??!0;return I.jsx(j0,{open:e,onOpenChange:n,children:I.jsxs(I0,{className:"max-w-3xl w-[90vw] md:w-[50vw] max-h-[90vh] overflow-y-auto",children:[I.jsx(F0,{className:"flex flex-row items-start justify-between gap-4",children:I.jsxs(R0,{className:"flex items-center justify-between gap-2 w-full normal-case pr-8",children:[I.jsx("span",{children:Qs(t.name)}),h&&I.jsxs("a",{href:`/admin?editEquipment=${t.id}`,className:"inline-flex items-center gap-1 px-2 py-1 text-[10px] font-heading uppercase tracking-wider border border-foreground/40 rounded-sm hover:bg-foreground hover:text-background transition-colors",title:"Editar equipo en panel admin",children:[I.jsx(V0,{className:"h-3 w-3"}),"Editar"]})]})}),I.jsxs(Bf,{className:"w-full",children:[I.jsx(qf,{children:v.map((S,k)=>I.jsx(zf,{children:I.jsx("div",{className:"aspect-video bg-muted overflow-hidden border-2 border-foreground",children:I.jsx("img",{src:S,alt:`${t.name} - ${k+1}`,className:"w-full h-full object-cover"})})},k))}),v.length>1&&I.jsxs(I.Fragment,{children:[I.jsx(Uf,{}),I.jsx(Hf,{})]})]}),r&&I.jsxs("div",{className:"flex items-center justify-between gap-2 w-full",children:[I.jsxs("div",{className:qe("rounded-none px-2 py-0.5 font-heading text-xs",b>0?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:[b,"/",t.stock_quantity]}),t.status==="available"?I.jsx($n,{size:"sm",className:"h-8 px-3 font-black",onClick:()=>r(t),disabled:!p,children:p?I.jsxs(I.Fragment,{children:[I.jsx(zo,{className:"h-4 w-4 mr-1"}),"AGREGAR"]}):I.jsx("span",{className:"text-xs",children:"MÁXIMO"})}):I.jsxs($n,{size:"sm",className:"h-8 px-3",disabled:!0,children:[I.jsx(Va,{className:"h-4 w-4 mr-1"}),"NO DISP."]})]}),I.jsxs("div",{className:"space-y-6",children:[I.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.brand&&I.jsxs("div",{children:[I.jsx("p",{className:"text-sm text-muted-foreground font-heading",children:"MARCA"}),I.jsx("p",{className:"font-heading text-lg",children:t.brand})]}),t.model&&I.jsxs("div",{children:[I.jsx("p",{className:"text-sm text-muted-foreground font-heading",children:"MODELO"}),I.jsx("p",{className:"font-heading text-lg",children:t.model})]}),t.categories&&I.jsx("div",{children:I.jsx(Kc,{children:t.categories.name})})]}),t.description&&I.jsxs("div",{children:[I.jsx("h3",{className:"font-heading text-xl mb-2 uppercase",children:"DESCRIPCIÓN"}),I.jsx("p",{className:"text-muted-foreground font-heading leading-relaxed",children:t.description})]}),t.specs&&Array.isArray(t.specs)&&t.specs.length>0&&I.jsxs("div",{children:[I.jsx("h3",{className:"font-heading text-xl mb-2 uppercase",children:"ESPECIFICACIONES"}),I.jsx("ul",{className:"space-y-2",children:t.specs.map((S,k)=>I.jsxs("li",{className:"flex items-start gap-2",children:[I.jsx("span",{className:"text-primary font-heading",children:"•"}),I.jsx("span",{className:"text-muted-foreground font-heading",children:typeof S=="string"?S:S.label||S.value||JSON.stringify(S)})]},k))})]}),I.jsxs("div",{className:"border-t-2 border-foreground pt-4",children:[I.jsx("h3",{className:"font-heading text-xl mb-4 uppercase",children:"PRECIOS"}),I.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:I.jsxs("div",{className:"border-2 border-foreground p-4",children:[I.jsx("p",{className:"text-sm text-muted-foreground font-heading",children:"POR DÍA"}),I.jsxs("p",{className:"font-heading text-3xl text-primary",children:["$",(t.price_per_day/1e3).toFixed(0),"K"]})]})})]}),I.jsx(Vf,{className:"my-6"}),I.jsx(o2,{equipmentId:t.id,categoryId:t.category_id||void 0,subcategoryId:t.subcategory_id||void 0,onAddToCart:r,getCartQuantity:i,canAddMore:a,onViewDetails:l})]})]})})},l2=({className:t,onClick:e})=>{const n=()=>{e?e():window.scrollBy({top:window.innerHeight*.8,behavior:"smooth"})};return I.jsx("button",{onClick:n,className:qe("absolute bottom-6 left-1/2 -translate-x-1/2 z-20 flex flex-col items-center gap-1 text-background/80 hover:text-background transition-colors cursor-pointer group",t),"aria-label":"Scroll hacia abajo"})}
29,c2={"4d52bbca-3bcb-4c73-ac1b-5b6d437e9163":{id:"static-camara",image_url:"https://svpfonykqarvvghanoaa.supabase.co/storage/v1/object/public/equipment-images//1768951104500_camara_fondo_blanco_gonzalo.mp4",media_type:"video",title:null,description:null,order_index:1},"f0edceff-b3b4-4735-ab37-b9e3f4bb905a":{id:"static-iluminacion",image_url:"https://svpfonykqarvvghanoaa.supabase.co/storage/v1/object/public/equipment-images/1768951451525_luces.mp4",media_type:"video",title:null,description:null,order_index:2},"bdaa1e73-8532-4b85-8495-6ef8bba5be31":{id:"static-audio",image_url:"https://svpfonykqarvvghanoaa.supabase.co/storage/v1/object/public/equipment-images/1768951063587_sonido.mp4",media_type:"video",title:null,description:null,order_index:3},"d9e6fca2-0d23-41c8-b782-8216d97e86a5":{id:"static-grip",image_url:"https://svpfonykqarvvghanoaa.supabase.co/storage/v1/object/public/equipment-images/1768951477713_grips.mp4",media_type:"video",title:null,description:null,order_index:4}},u2=({categories:t,activeCategory:e,onCategoryChange:n})=>{const[r,i]=kt.useState(),[a,l]=kt.useState(0),s=kt.useRef(null);kt.useEffect(()=>{window.scrollTo({top:0,behavior:"instant"})},[]),kt.useEffect(()=>{if(!r)return;const h=()=>{const f=r.selectedScrollSnap();l(f),t[f]&&(n==null||n(t[f].id))};return r.on("select",h),()=>{r.off("select",h)}},[r,t,n]),kt.useEffect(()=>{if(!(!r||!e||t.length===0))try{if(!r.scrollSnapList||r.scrollSnapList().length===0)return;const h=t.findIndex(f=>f.id===e);h!==-1&&h!==a&&r.scrollTo(h)}catch{console.debug("Carousel API not ready yet")}},[e,r,t,a]);const u=h=>c2[h]||null;return t.length===0?I.jsx("div",{className:"h-[75vh] bg-muted animate-pulse flex items-center justify-center",children:I.jsx("span",{className:"text-muted-foreground font-heading",children:"CARGANDO..."})}):I.jsx("div",{ref:s,className:"relative",children:I.jsx("section",{className:"relative overflow-hidden",children:I.jsxs(Bf,{className:"w-full",setApi:i,children:[I.jsx(qf,{className:"-ml-0",children:t.map(h=>{const f=u(h.id);return I.jsx(zf,{className:"pl-0 basis-full max-w-screen-xl",children:I.jsxs("div",{className:"relative h-[40vh] overflow-hidden duotone-hover-group",children:[(f==null?void 0:f.media_type)==="video"&&f.image_url?I.jsx("video",{src:f.image_url,className:"w-full h-full object-cover video-duotone",autoPlay:!0,loop:!0,muted:!0,playsInline:!0}):f!=null&&f.image_url?I.jsx("img",{src:f.image_url,alt:h.name,className:"w-full h-full object-cover image-duotone",loading:"lazy"}):I.jsx("div",{className:"w-full h-full"}),I.jsx("div",{className:"absolute inset-0 py-[22px] flex items-center justify-center bg-transparent border-none",children:I.jsxs("div",{className:"text-center z-10 p-4 sm:p-8 max-w-4xl my-[93px]",children:[I.jsx("h1",{className:"font-sans mb-2 uppercase drop-shadow-lg mx-0 text-primary px-[24px] py-[2px] font-extrabold",style:{fontSize:"clamp(2rem, 5vw, 4rem)"},children:(f==null?void 0:f.title)||h.name.toUpperCase()}),(f==null?void 0:f.description)&&I.jsx("p",{className:"text-sm sm:text-base md:text-lg text-background/90 font-heading drop-shadow-md max-w-2xl mx-auto",children:f.description})]})})]})},h.id)})}),t.length>1&&I.jsxs(I.Fragment,{children:[I.jsx(Uf,{className:"left-2 sm:left-4"}),I.jsx(Hf,{className:"right-2 sm:right-4"})]}),I.jsx(l2,{className:"text-background/80 hover:text-primary"})]})})})},h2=({equipment:t,onAddToCart:e,onViewDetails:n,getCartQuantity:r,canAddMore:i})=>t.length===0?I.jsx("div",{className:"text-center py-8 sm:py-12 text-muted-foreground",children:I.jsx("p",{className:"font-heading text-lg",children:"No hay equipos disponibles"})}
29):I.jsx("div",{className:"divide-y divide-foreground/10",children:t.map(a=>{const l=r(a.id),s=i(a);return I.jsxs("div",{className:qe("flex items-center max-w-screen transition-colors bg-background px] border-gray-light flex-wrap px-[8px] gap-0 py-0",a.status!=="available"&&"opacity-60"),children:[I.jsxs("div",{className:"flex-1 min-w-40 cursor-pointer",onClick:()=>n(a),children:[I.jsx("h3",{className:"font-heading text-xs normal-case line-clamp-2 hover:text-primary transition-colors font-medium flex flex-1 mx-[12px] sm:text-base",children:Qs(a.name)}),a.brand&&I.jsx("span",{className:"text-[10px] text-muted-foreground uppercase",children:a.brand})]}),I.jsxs("div",{className:"flex-shrink-0 text-right",children:[I.jsxs("span",{className:"font-heading text-sm text-primary sm:text-lg",children:["$ ",a.price_per_day>0?(a.price_per_day/1e3).toFixed(0)+" K":"—"]}),I.jsx("span",{className:"text-muted-foreground font-mono text-[9px] sm:text-[10px] ml-0.5",children:"/día"})]}),I.jsxs(Kc,{variant:"secondary",className:qe("flex-shrink-0 text-[10px] px-2 py-0.5 font-heading border-0 bg-transparent mx-[8px]",l>0?"text-primary":"text-muted-foreground"),children:[l,"/",a.stock_quantity]}),a.status==="available"?I.jsx($n,{size:"sm",className:"h-4 w-4 p-0 flex-shrink-0 rounded-sm bg-transparent text-primary text-2xl",onClick:()=>e(a),disabled:!s,children:s?I.jsx(zo,{className:"py-0 px-0 my-0 mx-0 h-[24px] w-[36px]"}):I.jsx("span",{className:"text-[10px] font-black",children:"MÁX"})}):I.jsx($n,{size:"sm",className:"h-8 w-8 p-0 flex-shrink-0 bg-transparent text-xs font-thin",disabled:!0,children:I.jsx(Va,{className:"h-[24px] w-[24px]"})})]},a.id)})}),Xu=({name:t,count:e,children:n,defaultExpanded:r=!1,isExpanded:i,onToggle:a,subcategoryId:l})=>{const s=i!==void 0,[u,h]=kt.useState(r),f=s?i:u,v=kt.useRef(null),[b,p]=kt.useState(void 0),[S,k]=kt.useState(f);kt.useEffect(()=>{s||h(r)},[r,s]),kt.useEffect(()=>{f&&k(!0)},[f]),kt.useEffect(()=>{if(S&&v.current)if(f){const U=v.current.scrollHeight;p(0),requestAnimationFrame(()=>{p(U),setTimeout(()=>p(void 0),300)})}else{const U=v.current.scrollHeight;p(U),requestAnimationFrame(()=>{p(0),setTimeout(()=>k(!1),300)})}},[f,S]);const C=()=>{const U=!f;s?a==null||a(U):h(U)},[_,O]=kt.useState(!1);return kt.useEffect(()=>{const U=setInterval(()=>{O(!0),setTimeout(()=>O(!1),2e3)},6e3);return()=>clearInterval(U)},[]),I.jsxs("div",{className:"mb-4 rounded-sm",id:l?`subcategory-${l}`:void 0,children:[I.jsxs("button",{onClick:C,className:"flex items-center gap-2 w-full border-b border-foreground
29/20 pb-2 mb-3 hover:text-primary transition-colors cursor-pointer bg-card px-0 rounded-sm py-[16px]",children:[f?I.jsx(Xc,{className:"flex-shrink-0 mx-[16px] mr-0 w-[24px] h-[24px] text-primary"}):I.jsx(tl,{className:"flex-shrink-0 mx-[16px] mr-0 w-[24px] h-[24px] text-primary"}),I.jsxs("h3",{className:qe("font-heading text-xs uppercase sm:text-base text-primary",!f&&_&&"animate-subcategory-blink"),children:[t,I.jsxs("span",{className:"ml-2 text-[10px]",children:["(",e,")"]})]})]}),S&&I.jsx("div",{ref:v,className:qe("overflow-hidden transition-[max-height] duration-300 ease-in-out",f&&"animate-subcategory-reveal"),style:{maxHeight:b!==void 0?`${b}px`:"none"},children:n})]})},f2=t=>t>0&&t!==1e3,Yf=t=>t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim(),d2=["camaras","lentes","estabilizadores / gimbals / sliders / pluma","filtros","accesorios de camara","monitoreo / evf / transmisores wireless","grabadores externos","tripodes de camara - monopies - shoulders","adaptadores para lentes / monturas metabones","switcher","video transmision inalambrica","comunicacion","computadoras / laptops de descarga","cables bnc","cables hdmi"],p2=t=>!!t&&Yf(t.name)==="camara",Ju=t=>{const e=Yf(t),n=d2.indexOf(e);return n===-1?Number.MAX_SAFE_INTEGER:n};function Ls(t){const e=t.map(i=>i.price_per_day||0).filter(f2),n=e.length?Math.max(...e):-1,r=e.length?e.reduce((i,a)=>
29i+a,0)/e.length:-1;return{max:n,avg:r}}function Zf(t,e,n){return p2(n)?[...t].sort((r,i)=>{const a=Ju(r.name),l=Ju(i.name);if(a!==l)return a-l;const s=Ls(e(r.id)),u=Ls(e(i.id));return u.max!==s.max?u.max-s.max:u.avg!==s.avg?u.avg-s.avg:(r.order_index??0)-(i.order_index??0)}):[...t].sort((r,i)=>{const a=Ls(e(r.id)),l=Ls(e(i.id));return l.max!==a.max?l.max-a.max:l.avg!==a.avg?l.avg-a.avg:(r.order_index??0)-(i.order_index??0)})}const Kf=kt.forwardRef(({category:t,equipment:e,subcategories:n,onAddToCart:r,onViewDetails:i,getCartQuantity:a,canAddMore:l,stickyTop:s,defaultExpanded:u=!1,onCategoryActivate:h,viewMode:f="cards",sortOption:v="subcategory",onSubcategorySelect:b,selectedSubcategories:p=[],forceExpandSubcategories:S},k)=>{const C=kt.useRef(null),_=kt.useRef(null),[O,U]=kt.useState(u),[R,nt]=kt.useState(!0),[dt,et]=kt.useState({});kt.useEffect(()=>{if(O&&n.length>0){const q={};n.forEach(Q=>{const ct=Q.id,K=(S==null?void 0:S.has(ct))||(p.length===0?!0:p.includes(ct));q[ct]=K}),q["no-subcategory"]=!0,et(q),nt(Object.values(q).every(Q=>Q))}},[O,n,S,p]);const $=kt.useMemo(()=>p.sort().join(",")+"-"+v,[p,v]),D=()=>{const q=!R;nt(q);const Q={};n.forEach(ct=>{Q[ct.id]=q}),Q["no-subcategory"]=q,et(Q)},J=(q,Q)=>{et(ct=>{const at={...ct,[q]:Q};return nt(Object.values(at).every(K=>K)),at})};kt.useImperativeHandle(k,()=>({scrollIntoView:()=>{var q;(q=C.current)==null||q.scrollIntoView({behavior:"smooth",block:"start"})},expand:()=>{U(!0)},collapse:()=>{U(!1)}}));const x=()=>{const q=[],Q=new Map,ct=[];return e.forEach(K=>{K.subcategory_id?(Q.has(K.subcategory_id)||Q.set(K.subcategory_id,[]),Q.get(K.subcategory_id).push(K)):ct.push(K)}),Zf(n.filter(K=>{var ht;return(((ht=Q.get(K.id))==null?void 0:ht.length)??0)>0}),K=>Q.get(K)??[],t).forEach(K=>{const ht=Q.get(K.id);q.push({subcategory:K,items:ht})}),ct.length>0&&q.push({subcategory:null,items:ct}),q},j=()=>{const q=O;U(!O),h==null||h(t.id),q||setTimeout(()=>{if(C.current){const Q=s+52,ct=C.current.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:ct-Q+52,behavior:"smooth"})}},50)},W=x();return I.jsxs("section",{ref:C,id:`categoria-${t.slug}`,className:"relative bg-foreground my-[6px]",style:{scrollMarginTop:`${s+8}px`},children:[I.jsx("div",{className:"z-20 bg-foreground mb-0 -mt-px my-0",style:{to
29p:`${s-1}px`},children:I.jsxs("div",{className:"justify-n px-2 sm:px-4 gap-[4px] text-foreground bg-inherit flex items-center justify-start py-0",children:[I.jsxs("button",{onClick:j,className:"flex items-center gap-1 sm:gap-3 cursor-pointer hover:text-primary transition-colors",children:[O?I.jsx(Xc,{className:"h-4 w-4 sm:h-5 sm:w-5 flex-shrink-0 text-background"}):I.jsx(tl,{className:"h-4 w-4 sm:h-5 sm:w-5 flex-shrink-0 text-background"}),I.jsx("h2",{className:"font-heading text-sm sm:text-lg md:text-xl uppercase truncate bg-transparent text-background",children:t.name}),I.jsx(Kc,{variant:"secondary",className:"text-[10px] sm:text-xs px-1.5 py-0 flex-shrink-0 bg-[#131211] text-[#fbf2ee]",children:e.length})]}),n.length>0&&I.jsxs($n,{variant:"link",size:"sm",onClick:q=>{q.stopPropagation(),D()},className:"h-8 text-xs font-heading uppercase gap-1 px-[4px] bg-transparent my-[4px]",title:R?"Colapsar todas":"Expandir todas",children:[I.jsx(Q0,{className:"h-6 w-6"}),I.jsx("span",{className:"hidden sm:inline text-sm",children:R?"Colapsar":"Expandir"})]})]})}),O&&I.jsx("div",{ref:_,className:"border-[#201e1d] border-0 bg-background max-w-screen-xl animate-subcategory-reveal rounded-sm",children:e.length===0?I.jsx("div",{className:"text-center py-8 sm:py-12 text-muted-foreground",children:I.jsx("p",{className:"font-heading text-lg",children:"No hay equipos en esta categoría"})}):f==="list"?I.jsx("div",{className:"space-y-2 rounded-sm",children:W.map(q=>{var at,K,ht,At;const Q=((at=q.subcategory)==null?void 0:at.id)||"no-subcategory",ct=dt[Q]??!0;return I.jsx("div",{className:"rounded-sm",children:I.jsx(Xu,{name:((K=q.subcategory)==null?void 0:K.name)||"Sin subcategoría",count:q.items.length,isExpanded:ct,onToggle:pt=>J(Q,pt),subcategoryId:(ht=q.subcategory)==null?void 0:ht.id,children:I.jsx(h2,{equipment:q.items,onAddToCart:r,onViewDetails:i,getCartQuantity:a,canAddMore:l})})},((At=q.subcategory)==null?void 0:At.id)||"no-subcategory")})}):I.jsx("div",{className:"space-y-2 rounded-sm",children:W.map(q=>{var at,K,ht,At;const Q=((at=q.subcategory)==null?void 0:at.id)||"no-subcategory",ct=dt[Q]??!0;return I.jsx("div",{children:I.jsx(Xu,{name:((K=q.subcategory)==null?void 0:K.name)||"Sin subcategoría",count:q.items.length,isExpanded:ct,onToggle:pt=>J(Q,pt),subcategoryId:(ht=q.subcategory)==null?void 0:ht.id,children:I.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3 sm:gap-4",children:q.items.map(pt=>{const A=a(pt.id),z=l(pt);return I.jsx(Df,{className:"overflow-hidden group relative border-0 shadow-none hover:shadow-sm bg-transparent",children:I.jsxs(Mf,{className:"p-2 sm:p-3 flex flex-col space-y-2 px-[4px] text-stone-200 rounded-sm bg-popover",children:[I.jsx("h3",{className:"font-heading normal-case text-xs leading-tight pt-2 line-clamp-2 cursor-pointer transition-colors h-[5em] text-left font-medium text-foreground mx-[4px] sm:text-sm",onClick:()=>i(pt),children:Qs(pt.name)}),I.jsxs("div",{className:"relative aspect-square cursor-pointer duotone-hover-group overflow-hidden",onClick:()=>i(pt),children:[I.jsxs("div",{className:qe("absolute bottom-2 right-2 z-10 rounded-none px-2 py-0.5 flex items-center justify-center font-heading text-[10px] sm:text-xs shadow-brutal-sm",A>0?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:[A,"/",pt.stock_quantity]}),pt.image_url?I.jsx(Gf,{src:pt.image_url,alt:pt.name,className:"w-full h-full group-hover:scale-105 transition-all duration-300 rounded-none text-foreground bg-stone-50 px-[8px]",placeholderClassName:"w-full h-full",aspectRatio:"square"}):I.jsx("div",{className:"w-full h-full flex items-center justify-center bg-secondary text-accent",children:I.jsx("span",{className:"text-2xl sm:text-3xl opacity-20 font-heading bg-transparent",children:"?"})})]}),I.jsxs("div",{className:"mt-auto flex items-center gap-2",children:[I.jsxs("div",{className:"flex-1 flex items-baseline gap-1",children:[I.jsxs("span",{className:"font-heading text-lg sm:text-xl text-[#f82020]",children:["$",pt.price_per_day>0?(pt.price_per_day/1e3).toFixed(0)+"K":"—"]}),I.jsx("span",{className:"text-muted-foreground font-mono text-[10px]",children:"/día"})]}),pt.status==="available"?I.jsx($n,{size:"sm",className:"h-8 sm:h-9 w-8 sm:w-9 p-0 overflow-hidden transition-all duration-300 hover:w-[100px] sm:hover:w-[120px] hover:px-2 sm:hover:px-3 font-black flex-shrink-0 group relative flex items-center justify-center gap-0 bg-primary",onClick:()=>r(pt),disabled:!z,children:z?I.jsxs(I.Fragment,{children:[I.jsx(zo,{className:"h-3 w-3 sm:h-4 sm:w-4 flex-shrink-0 m-0"}),I.jsx("span",{className:"whitespace-nowrap opacity-0 w-0 overflow-hidden transition-all duration-300 group-hover:opacity-100 group-hover:w-auto group-hover:ml-2 font-black",children:"​"})]}):I.jsx("span",{className:"text-[10px] font-black",children:"MÁX"})}):I.jsx($n,{size:"sm",className:"h-8 sm:h-9 w-8 sm:w-9 p-0 font-black flex-shrink-0 flex items-center justify-center bg-secondary text-accent",disabled:!0,children:I.jsx(Va,{className:"h-3 w-3 sm:h-4 sm:w-4"})})]})]})},pt.id)})})})},((At=q.subcategory)==null?void 0:At.id)||"no-subcategory")})})},$)]})});
29Kf.displayName="CategorySection";function g2(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const Xf=Wt.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Ga=()=>{const t=Wt.useContext(Xf);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};g2(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
30[data-state=closed]
31){opacity:0}
31[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}`);const m2=24,v2=typeof window<"u"?kt.useLayoutEffect:kt.useEffect;function Qu(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}function b2(){return Jc(/^Mac/)}function w2(){return Jc(/^iPhone/)}function th(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function y2(){return Jc(/^iPad/)||b2()&&navigator.maxTouchPoints>1}function Jf(){return w2()||y2()}function Jc(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.platform):void 0}const $l=typeof document<"u"&&window.visualViewport;function eh(t){let e=window.getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowX+e.overflowY)}function Qf(t){for(eh(t)&&(t=t.parentElement);t&&!eh(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}const x2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ks=0,Vl;function _2(t={}){let{isDisabled:e}=t;v2(()=>{if(!e)return ks++,ks===1&&Jf()&&(Vl=N2()),()=>{ks--,ks===0&&(Vl==null||Vl())}},[e])}function N2(){let t,e=0,n=v=>{t=Qf(v.target),!(t===document.documentElement&&t===document.body)&&(e=v.changedTouches[0].pageY)},r=v=>{if(!t||t===document.documentElement||t===document.body){v.preventDefault();return}let b=v.changedTouches[0].pageY,p=t.scrollTop,S=t.scrollHeight-t.clientHeight;S!==0&&((p<=0&&b>e||p>=S&&b<e)&&v.preventDefault(),e=b)},i=v=>{let b=v.target;kc(b)&&b!==document.activeElement&&(v.preventDefault(),b.style.transform="translateY(-2000px)",b.focus(),requestAnimationFrame(()=>{b.style.transform=""}))},a=v=>{let b=v.target;kc(b)&&(b.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{b.style.transform="",$l&&($l.height<window.innerHeight?requestAnimationFrame(()=>{nh(b)}):$l.addEventListener("resize",()=>nh(b),{once:!0}))}))},l=()=>{window.scrollTo(0,0)},s=window.pageXOffset,u=window.pageYOffset,h=Qu(S2(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let f=Qu(xo(document,"touchstart",n,{passive:!1,capture:!0}),xo(document,"touchmove",r,{passive:!1,capture:!0}),xo(document,"touchend",i,{passive:!1,capture:!0}),xo(document,"focus",a,!0),xo(window,"scroll",l));return()=>{h(),f(),window.scrollTo(s,u)}}function S2(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function xo(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function nh(t){let e=document.scrollingElement||document.documentElement;for(;t&&t!==e;){let n=Qf(t);if(n!==document.documentElement&&n!==document.body&&n!==t){let r=n.getBoundingClientRect().top,i=t.getBoundingClientRect().top,a=t.getBoundingClientRect().bottom;const l=n.getBoundingClientRect().bottom+m2;a>l&&(n.scrollTop+=i-r)}t=n.parentElement}}function kc(t){return t instanceof HTMLInputElement&&!x2.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}function A2(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function L2(...t){return e=>t.forEach(n=>A2(n,e))}function td(...t){return kt.useCallback(L2(...t),t)}const ed=new WeakMap;function pn(t,e,n=!1){if(!t||!(t instanceof HTMLElement))return;let r={};Object.entries(e).forEach(([i,a])=>{if(i.startsWith("--")){t.style.setProperty(i,a);return}r[i]=t.style[i],t.style[i]=a}),!n&&ed.set(t,r)}function k2(t,e){if(!t||!(t instanceof HTMLElement))return;let n=ed.get(t);n&&(t.style[e]=n[e])}const gn=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function Ps(t,e){if(!t)return null;const n=window.getComputedStyle(t),r=n.transform||n.webkitTransform||n.mozTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[gn(e)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[gn(e)?5:4]):null)}function P2(t){return 8*(Math.log(t+1)-2)}function Gl(t,e){if(!t)return()=>{};const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function C2(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}const Ge={DURATION:.5,EASE:[.32,.72,0,1]},nd=.4,E2=.25,j2=100,rd=8,Gi=16,Pc=26,Yl="vaul-dragging";function id(t){const e=Wt.useRef(t);return Wt.useEffect(()=>{e.current=t}),Wt.useMemo(()=>(...n)=>e.current==null?void 0:e.current.call(e,...n),[])}function I2({defaultProp:t,onChange:e}){const n=Wt.useState(t),[r]=n,i=Wt.useRef(r),a=id(e);return Wt.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function ad({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=I2({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:r,s=id(n),u=Wt.useCallback(h=>{if(a){const v=typeof h=="function"?h(t):h;v!==t&&s(v)}else i(h)},[a,t,i,s]);return[l,u]}function F2({activeSnapPointProp:t,setActiveSnapPointProp:e,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:a,onSnapPointChange:l,direction:s="bottom",container:u,snapToSequentialPoint:h}){const[f,v]=ad({prop:t,defaultProp:n==null?void 0:n[0],onChange:e}),[b,p]=Wt.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);Wt.useEffect(()=>{function et(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",et),()=>window.removeEventListener("resize",et)},[]);const S=Wt.useMemo(()=>f===(n==null?void 0:n[n.length-1])||null,[n,f]),k=Wt.useMemo(()=>n==null?void 0:n.findIndex(et=>et===f),[n,f]),C=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===f||!n,_=Wt.useMemo(()=>{const et=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var $;return($=n==null?void 0:n.map(D=>
31{const J=typeof D=="string";let x=0;if(J&&(x=parseInt(D,10)),gn(s)){const W=J?x:b?D*et.height:0;return b?s==="bottom"?et.height-W:-et.height+W:W}const j=J?x:b?D*et.width:0;return b?s==="right"?et.width-j:-et.width+j:j}))!=null?$:[]},[n,b,u]),O=Wt.useMemo(()=>k!==null?_==null?void 0:_[k]:null,[_,k]),U=Wt.useCallback(et=>{var $;const D=($=_==null?void 0:_.findIndex(J=>J===et))!=null?$:null;l(D),pn(r.current,{transition:`transform ${Ge.DURATION}s cubic-bezier(${Ge.EASE.join(",")})`,transform:gn(s)?`translate3d(0, ${et}px, 0)`:`translate3d(${et}px, 0, 0)`}),_&&D!==_.length-1&&D!==a&&D<a?pn(i.current,{transition:`opacity ${Ge.DURATION}s cubic-bezier(${Ge.EASE.join(",")})`,opacity:"0"}):pn(i.current,{transition:`opacity ${Ge.DURATION}s cubic-bezier(${Ge.EASE.join(",")})`,opacity:"1"}),v(n==null?void 0:n[Math.max(D,0)])},[r.current,n,_,a,i,v]);Wt.useEffect(()=>{if(f||t){var et;const $=(et=n==null?void 0:n.findIndex(D=>D===t||D===f))!=null?et:-1;_&&$!==-1&&typeof _[$]=="number"&&U(_[$])}},[f,t,n,_,U]);function R({draggedDistance:et,closeDrawer:$,velocity:D,dismissible:J}){if(a===void 0)return;const x=s==="bottom"||s==="right"?(O??0)-et:(O??0)+et,j=k===a-1,W=k===0,q=et>0;if(j&&pn(i.current,{transition:`opacity ${Ge.DURATION}s cubic-bezier(${Ge.EASE.join(",")})`}),!h&&D>2&&!q){J?$():U(_[0]);return}if(!h&&D>2&&q&&_&&n){U(_[n.length-1]);return}const Q=_==null?void 0:_.reduce((at,K)=>typeof at!="number"||typeof K!="number"?at:Math.abs(K-x)<Math.abs(at-x)?K:at),ct=gn(s)?window.innerHeight:window.innerWidth;if(D>nd&&Math.abs(et)<ct*.4){const at=q?1:-1;if(at>0&&S){U(_[n.length-1]);return}if(W&&at<0&&J&&$(),k===null)return;U(_[k+at]);return}U(Q)}function nt({draggedDistance:et}){if(O===null)return;const $=s==="bottom"||s==="right"?O-et:O+et;(s==="bottom"||s==="right")&&$<_[_.length-1]||(s==="top"||s==="left")&&$>_[_.length-1]||pn(r.current,{transform:gn(s)?`translate3d(0, ${$}px, 0)`:`translate3d(${$}px, 0, 0)`})}function dt(et,$){if(!n||typeof k!="number"||!_||a===void 0)return null;const D=k===a-1;if(k>=a&&$)return 0;if(D&&!$)return 1;if(!C&&!D)return null;const x=D?k+1:k-1,j=D?_[x]-_[x-1]:_[x+1]-_[x],W=et/Math.abs(j);return D?1-W:W}return{isLastSnapPoint:S,activeSnapPoint:f,shouldFade:C,getPercentageDragged:dt,setActiveSnapPoint:v,activeSnapPointIndex:k,onRelease:R,onDrag:nt,snapPointsOffset:_}}const R2=()=>()=>{};function O2(){const{direction:t,isOpen:e,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=Ga(),a=Wt.useRef(null),l=kt.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-Pc)/window.innerWidth}Wt.useEffect(()=>{if(e&&n){a.current&&clearTimeout(a.current);const u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;C2(r&&!i?Gl(document.body,{background:"black"}):R2,Gl(u,{transformOrigin:gn(t)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Ge.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ge.EASE.join(",")})`}));const h=Gl(u,{borderRadius:`${rd}px`,overflow:"hidden",...gn(t)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{h(),a.current=window.setTimeout(()=>{l?document.body.style.background=l:document.body.style.removeProperty("background")},Ge.DURATION*1e3)}}},[e,n,l])}let _o=null;function T2({isOpen:t,modal:e,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:a}){const[l,s]=Wt.useState(()=>typeof window<"u"?window.location.href:""),u=Wt.useRef(0),h=Wt.useCallback(()=>{if(th()&&_o===null&&t&&!a){_o={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:v,innerHeight:b}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-u.current}px`,left:`${-v}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=b-window.innerHeight;p&&u.current>=b&&(document.body.style.top=`${-(u.current+p)}px`)}),300)}},[t]),f=Wt.useCallback(()=>
31{if(th()&&_o!==null&&!a){const v=-parseInt(document.body.style.top,10),b=-parseInt(document.body.style.left,10);Object.assign(document.body.style,_o),window.requestAnimationFrame(()=>{if(i&&l!==window.location.href){s(window.location.href);return}window.scrollTo(b,v)}),_o=null}},[l]);return Wt.useEffect(()=>{function v(){u.current=window.scrollY}return v(),window.addEventListener("scroll",v),()=>{window.removeEventListener("scroll",v)}},[]),Wt.useEffect(()=>{n||!r||(t?(!window.matchMedia("(display-mode: standalone)").matches&&h(),e||window.setTimeout(()=>{f()},500)):f())},[t,r,l,e,n,h,f]),{restorePositionSetting:f}}function od({open:t,onOpenChange:e,children:n,onDrag:r,onRelease:i,snapPoints:a,shouldScaleBackground:l=!1,setBackgroundColorOnScale:s=!0,closeThreshold:u=E2,scrollLockTimeout:h=j2,dismissible:f=!0,handleOnly:v=!1,fadeFromIndex:b=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:S,fixed:k,modal:C=!0,onClose:_,nested:O,noBodyStyles:U,direction:R="bottom",defaultOpen:nt=!1,disablePreventScroll:dt=!0,snapToSequentialPoint:et=!1,preventScrollRestoration:$=!1,repositionInputs:D=!0,onAnimationEnd:J,container:x,autoFocus:j=!1}){var W,q;const[Q=!1,ct]=ad({defaultProp:nt,prop:t,onChange:jt=>{e==null||e(jt),!jt&&!O&&re(),setTimeout(()=>{J==null||J(jt)},Ge.DURATION*1e3),jt&&!C&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),jt||(document.body.style.pointerEvents="auto")}}),[at,K]=Wt.useState(!1),[ht,At]=Wt.useState(!1),[pt,A]=Wt.useState(!1),z=Wt.useRef(null),H=Wt.useRef(null),G=Wt.useRef(null),Z=Wt.useRef(null),it=Wt.useRef(null),ut=Wt.useRef(!1),ft=Wt.useRef(null),vt=Wt.useRef(0),St=Wt.useRef(!1),Pt=Wt.useRef(0),wt=Wt.useRef(null),Kt=Wt.useRef(((W=wt.current)==null?void 0:W.getBoundingClientRect().height)||0),F=Wt.useRef(((q=wt.current)==null?void 0:q.getBoundingClientRect().width)||0),It=Wt.useRef(0),le=Wt.useCallback(jt=>{a&&jt===Vt.length-1&&(H.current=new Date)},[]),{activeSnapPoint:zt,activeSnapPointIndex:xt,setActiveSnapPoint:ee,onRelease:Tt,snapPointsOffset:Vt,onDrag:Xt,shouldFade:ye,getPercentageDragged:me}=F2({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:S,drawerRef:wt,fadeFromIndex:b,overlayRef:z,onSnapPointChange:le,direction:R,container:x,snapToSequentialPoint:et});_2({isDisabled:!Q||ht||!C||pt||!at||!D||!dt});const{restorePositionSetting:re}=T2({isOpen:Q,modal:C,nested:O,hasBeenOpened:at,preventScrollRestoration:$,noBodyStyles:U});function de(){return(window.innerWidth-Pc)/window.innerWidth}function we(jt){var Et,Ot;!f&&!a||wt.current&&!wt.current.contains(jt.target)||(Kt.current=((Et=wt.current)==null?void 0:Et.getBoundingClientRect().height)||0,F.current=((Ot=wt.current)==null?void 0:Ot.getBoundingClientRect().width)||0,At(!0),G.current=new Date,Jf()&&window.addEventListener("touchend",()=>ut.current=!1,{once:!0}),jt.target.setPointerCapture(jt.pointerId),vt.current=gn(R)?jt.pageY:jt.pageX)}function Bt(jt,Et){var Ot,ne;let Dt=jt;const Ut=(Ot=window.getSelection())==null?void 0:Ot.toString(),se=wt.current?Ps(wt.current,R):null,Je=new Date;if(Dt.hasAttribute("data-vaul-no-drag")||Dt.closest("[data-vaul-no-drag]"))return!1;if(R==="right"||R==="left")return!0;if(H.current&&Je.getTime()-H.current.getTime()<500)return!1;if(se!==null&&(R==="bottom"?se>0:se<0))return!0;if(Ut&&Ut.length>0)return!1;if(Je.getTime()-((ne=it.current)==null?void 0:ne.getTime())<h&&se===0||Et)return it.current=Je,!1;for(;Dt;){if(Dt.scrollHeight>Dt.clientHeight){if(Dt.scrollTop!==0)return it.current=new Date,!1;if(Dt.getAttribute("role")==="dialog")return!0}Dt=Dt.parentNode}return!0}function ce(jt){if(wt.current&&ht){const Et=R==="bottom"||R==="right"?1:-1,Ot=(vt.current-(gn(R)?jt.pageY:jt.pageX))*Et,ne=Ot>0,Dt=a&&!f&&!ne;if(Dt&&xt===0)return;const Ut=Math.abs(Ot),se=document.querySelector("[data-vaul-drawer-wrapper]"),Je=R==="bottom"||R==="top"?Kt.current:F.current;let Ie=Ut/Je;const wn=me(Ut,ne);
31if(wn!==null&&(Ie=wn),Dt&&Ie>=1||!ut.current&&!Bt(jt.target,ne))return;if(wt.current.classList.add(Yl),ut.current=!0,pn(wt.current,{transition:"none"}),pn(z.current,{transition:"none"}),a&&Xt({draggedDistance:Ot}),ne&&!a){const Gt=P2(Ot),qn=Math.min(Gt*-1,0)*Et;pn(wt.current,{transform:gn(R)?`translate3d(0, ${qn}px, 0)`:`translate3d(${qn}px, 0, 0)`});return}const cn=1-Ie;if((ye||b&&xt===b-1)&&(r==null||r(jt,Ie),pn(z.current,{opacity:`${cn}`,transition:"none"},!0)),se&&z.current&&l){const Gt=Math.min(de()+Ie*(1-de()),1),qn=8-Ie*8,ir=Math.max(0,14-Ie*14);pn(se,{borderRadius:`${qn}px`,transform:gn(R)?`scale(${Gt}) translate3d(0, ${ir}px, 0)`:`scale(${Gt}) translate3d(${ir}px, 0, 0)`,transition:"none"},!0)}if(!a){const Gt=Ut*Et;pn(wt.current,{transform:gn(R)?`translate3d(0, ${Gt}px, 0)`:`translate3d(${Gt}px, 0, 0)`})}}}Wt.useEffect(()=>{var jt;function Et(){if(!wt.current||!D)return;const Ot=document.activeElement;if(kc(Ot)||St.current){var ne;const Dt=((ne=window.visualViewport)==null?void 0:ne.height)||0,Ut=window.innerHeight;let se=Ut-Dt;const Je=wt.current.getBoundingClientRect().height||0,Ie=Je>Ut*.8;It.current||(It.current=Je);const wn=wt.current.getBoundingClientRect().top;if(Math.abs(Pt.current-se)>60&&(St.current=!St.current),a&&a.length>0&&Vt&&xt){const cn=Vt[xt]||0;se+=cn}if(Pt.current=se,Je>Dt||St.current){const cn=wt.current.getBoundingClientRect().height;let Gt=cn;cn>Dt&&(Gt=Dt-(Ie?wn:Pc)),k?wt.current.style.height=`${cn-Math.max(se,0)}px`:wt.current.style.height=`${Math.max(Gt,Dt-wn)}px`}else wt.current.style.height=`${It.current}px`;a&&a.length>0&&!St.current?wt.current.style.bottom="0px":wt.current.style.bottom=`${Math.max(se,0)}px`}}return(jt=window.visualViewport)==null||jt.addEventListener("resize",Et),()=>{var Ot;return(Ot=window.visualViewport)==null?void 0:Ot.removeEventListener("resize",Et)}},[xt,a,Vt]);function ot(jt){Rt(),_==null||_(),jt||ct(!1),setTimeout(()=>{a&&ee(a[0])},Ge.DURATION*1e3)}function Ct(){if(!wt.current)return;const jt=document.querySelector("[data-vaul-drawer-wrapper]"),Et=Ps(wt.current,R);pn(wt.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Ge.DURATION}s cubic-bezier(${Ge.EASE.join(",")})`}),pn(z.current,{transition:`opacity ${Ge.DURATION}s cubic-bezier(${Ge.EASE.join(",")})`,opacity:"1"}),l&&Et&&Et>0&&Q&&pn(jt,{borderRadius:`${rd}px`,overflow:"hidden",...gn(R)?{transform:`scale(${de()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${de()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Ge.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ge.EASE.join(",")})`},!0)}function Rt(){!ht||!wt.current||(wt.current.classList.remove(Yl),ut.current=!1,At(!1),Z.current=new Date)}function ie(jt){if(!ht||!wt.current)return;wt.current.classList.remove(Yl),ut.current=!1,At(!1),Z.current=new Date;const Et=Ps(wt.current,R);
31if(!Bt(jt.target,!1)||!Et||Number.isNaN(Et)||G.current===null)return;const Ot=Z.current.getTime()-G.current.getTime(),ne=vt.current-(gn(R)?jt.pageY:jt.pageX),Dt=Math.abs(ne)/Ot;if(Dt>.05&&(A(!0),setTimeout(()=>{A(!1)},200)),a){Tt({draggedDistance:ne*(R==="bottom"||R==="right"?1:-1),closeDrawer:ot,velocity:Dt,dismissible:f}),i==null||i(jt,!0);return}if(R==="bottom"||R==="right"?ne>0:ne<0){Ct(),i==null||i(jt,!0);return}if(Dt>nd){ot(),i==null||i(jt,!1);return}var Ut;const se=Math.min((Ut=wt.current.getBoundingClientRect().height)!=null?Ut:0,window.innerHeight);var Je;const Ie=Math.min((Je=wt.current.getBoundingClientRect().width)!=null?Je:0,window.innerWidth),wn=R==="left"||R==="right";if(Math.abs(Et)>=(wn?Ie:se)*u){ot(),i==null||i(jt,!1);return}i==null||i(jt,!0),Ct()}Wt.useEffect(()=>(Q&&(pn(document.documentElement,{scrollBehavior:"auto"}),H.current=new Date),()=>{k2(document.documentElement,"scrollBehavior")}),[Q]);function ue(jt){const Et=jt?(window.innerWidth-Gi)/window.innerWidth:1,Ot=jt?-Gi:0;ft.current&&window.clearTimeout(ft.current),pn(wt.current,{transition:`transform ${Ge.DURATION}s cubic-bezier(${Ge.EASE.join(",")})`,transform:`scale(${Et}) translate3d(0, ${Ot}px, 0)`}),!jt&&wt.current&&(ft.current=setTimeout(()=>{const ne=Ps(wt.current,R);pn(wt.current,{transition:"none",transform:gn(R)?`translate3d(0, ${ne}px, 0)`:`translate3d(${ne}px, 0, 0)`})},500))}function ke(jt,Et){if(Et<0)return;const Ot=(window.innerWidth-Gi)/window.innerWidth,ne=Ot+Et*(1-Ot),Dt=-Gi+Et*Gi;pn(wt.current,{transform:gn(R)?`scale(${ne}) translate3d(0, ${Dt}px, 0)`:`scale(${ne}) translate3d(${Dt}px, 0, 0)`,transition:"none"})}function Jt(jt,Et){const Ot=gn(R)?window.innerHeight:window.innerWidth,ne=Et?(Ot-Gi)/Ot:1,Dt=Et?-Gi:0;Et&&pn(wt.current,{transition:`transform ${Ge.DURATION}s cubic-bezier(${Ge.EASE.join(",")})`,transform:gn(R)?`scale(${ne}) translate3d(0, ${Dt}px, 0)`:`scale(${ne}) translate3d(${Dt}px, 0, 0)`})}return Wt.createElement(z0,{defaultOpen:nt,onOpenChange:jt=>{!f&&!jt||(jt?K(!0):ot(!0),ct(jt))},open:Q},Wt.createElement(Xf.Provider,{value:{activeSnapPoint:zt,snapPoints:a,setActiveSnapPoint:ee,drawerRef:wt,overlayRef:z,onOpenChange:e,onPress:we,onRelease:ie,onDrag:ce,dismissible:f,handleOnly:v,isOpen:Q,isDragging:ht,shouldFade:ye,closeDrawer:ot,onNestedDrag:ke,onNestedOpenChange:ue,onNestedRelease:Jt,keyboardIsOpen:St,modal:C,snapPointsOffset:Vt,direction:R,shouldScaleBackground:l,setBackgroundColorOnScale:s,noBodyStyles:U,container:x,autoFocus:j}},n))}const sd=Wt.forwardRef(function({...t},e){const{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:l,modal:s}=Ga(),u=td(e,n),h=r&&r.length>0;return s?Wt.createElement(O0,{onMouseUp:i,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":l&&h?"true":"false","data-vaul-snap-points-overlay":l&&a?"true":"false",...t}):(typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),null)});sd.displayName="Drawer.Overlay";const ld=Wt.forwardRef(function({onPointerDownOutside:t,style:e,onOpenAutoFocus:n,...r},i){const{drawerRef:a,onPress:l,onRelease:s,onDrag:u,keyboardIsOpen:h,snapPointsOffset:f,modal:v,isOpen:b,direction:p,snapPoints:S,container:k,handleOnly:C,autoFocus:_}=Ga(),[O,U]=Wt.useState(!1),R=td(i,a),nt=Wt.useRef(null),dt=Wt.useRef(null),et=Wt.useRef(!1),$=S&&S.length>0;O2();const D=(x,j,W=0)=>{if(et.current)return!0;const q=Math.abs(x.y),Q=Math.abs(x.x),ct=Q>q,at=["bottom","right"].includes(j)?1:-1;if(j==="left"||j==="right"){if(!(x.x*at<0)&&Q>=0&&Q<=W)return ct}else if(!(x.y*at<0)&&q>=0&&q<=W)return!ct;return et.current=!0,!0};Wt.useEffect(()=>{$&&window.requestAnimationFrame(()=>{U(!0)})},[]);function J(x){nt.current=null,et.current=!1,s(x)}return Wt.createElement(T0,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":b&&$?"true":"false","data-vaul-custom-container":k?"true":"false",...r,ref:R,style:f&&f.length>0?{"--snap-point-height":`${f[0]}px`,...e}:e,onPointerDown:x=>{C||(r.onPointerDown==null||r.onPointerDown.call(r,x),nt.current={x:x.pageX,y:x.pageY},l(x))},onOpenAutoFocus:x=>{n==null||n(x),_||x.preventDefault()},onPointerDownOutside:x=>{if(t==null||t(x),!v||x.defaultPrevented){x.preventDefault();return}h.current&&(h.current=!1)},onFocusOutside:x=>{if(!v){x.preventDefault();return}},onPointerMove:x=>{if(dt.current=x,C||(r.onPointerMove==null||r.onPointerMove.call(r,x),!nt.current))return;const j=x.pageY-nt.current.y,W=x.pageX-nt.current.x,q=x.pointerType==="touch"?10:2;D({x:W,y:j}
31,p,q)?u(x):(Math.abs(W)>q||Math.abs(j)>q)&&(nt.current=null)},onPointerUp:x=>{r.onPointerUp==null||r.onPointerUp.call(r,x),nt.current=null,et.current=!1,s(x)},onPointerOut:x=>{r.onPointerOut==null||r.onPointerOut.call(r,x),J(dt.current)},onContextMenu:x=>{r.onContextMenu==null||r.onContextMenu.call(r,x),J(dt.current)}})});ld.displayName="Drawer.Content";const D2=250,M2=120,cd=Wt.forwardRef(function({preventCycle:t=!1,children:e,...n},r){const{closeDrawer:i,isDragging:a,snapPoints:l,activeSnapPoint:s,setActiveSnapPoint:u,dismissible:h,handleOnly:f,isOpen:v,onPress:b,onDrag:p}=Ga(),S=Wt.useRef(null),k=Wt.useRef(!1);function C(){if(k.current){U();return}window.setTimeout(()=>{_()},M2)}function _(){if(a||t||k.current){U();return}if(U(),(!l||l.length===0)&&h){i();return}if(s===l[l.length-1]&&h){i();return}const nt=l.findIndex(et=>et===s);if(nt===-1)return;const dt=l[nt+1];u(dt)}function O(){S.current=window.setTimeout(()=>{k.current=!0},D2)}function U(){window.clearTimeout(S.current),k.current=!1}return Wt.createElement("div",{onClick:C,onPointerCancel:U,onPointerDown:R=>{f&&b(R),O()},onPointerMove:R=>{f&&p(R)},ref:r,"data-vaul-drawer-visible":v?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},Wt.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},e))});cd.displayName="Drawer.Handle";function B2({onDrag:t,onOpenChange:e,...n}){const{onNestedDrag:r,onNestedOpenChange:i,onNestedRelease:a}=Ga();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return Wt.createElement(od,{nested:!0,onClose:()=>{i(!1)},onDrag:(l,s)=>{r(l,s),t==null||t(l,s)},onOpenChange:l=>{l&&i(l)},onRelease:a,...n})}function q2(t){const e=Ga(),{container:n=e.container,...r}=t;return Wt.createElement(U0,{container:n,...r})}const qr={Root:od,NestedRoot:B2,Content:ld,Overlay:sd,Trigger:D0,Portal:q2,Handle:cd,Close:M0,Title:B0,Description:q0},ud=({shouldScaleBackground:t=!0,...e})=>I.jsx(qr.Root,{shouldScaleBackground:t,...e});ud.displayName="Drawer";const z2=qr.Portal,U2=qr.Close,hd=kt.forwardRef(({className:t,...e},n)=>I.jsx(qr.Overlay,{ref:n,className:qe("fixed inset-0 z-50 bg-black/80",t),...e}));hd.displayName=qr.Overlay.displayName;const fd=kt.forwardRef(({className:t,children:e,...n},r)=>I.jsxs(z2,{children:[I.jsx(hd,{}),I.jsxs(qr.Content,{ref:r,className:qe("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...n,children:[I.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),e]})]}));fd.displayName="DrawerContent";const dd=({className:t,...e})=>I.jsx("div",{className:qe("grid gap-1.5 p-4 text-center sm:text-left",t),...e});dd.displayName="DrawerHeader";const pd=kt.forwardRef(({className:t,...e},n)=>I.jsx(qr.Title,{ref:n,className:qe("text-lg font-semibold leading-none tracking-tight",t),...e}));pd.displayName=qr.Title.displayName;const H2=kt.forwardRef(({className:t,...e},n)=>I.jsx(qr.Description,{ref:n,className:qe("text-sm text-muted-foreground",t),...e}));H2.displayName=qr.Description.displayName;const rh=1024;function W2(){const[t,e]=kt.useState(void 0);return kt.useEffect(()=>{const n=window.matchMedia(`(max-width: ${rh-1}px)`),r=()=>e(window.innerWidth<rh);return n.addEventListener("change",r),r(),()=>n.removeEventListener("change",r)},[]),!!t}const ih=({items:t,calculateSubtotal:e,updateQuantity:n,removeItem:r,stickyTop:i=370,onCollapse:a})=>{const l=W2(),[s,u]=kt.useState(!1),h=t.reduce((v,b)=>v+b.quantity,0),f=()=>I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"bg-foreground text-background",children:I.jsxs("div",{className:"flex items-center gap-3 px-[16px] py-[12px]",children:[a&&I.jsx("button",{onClick:a,className:"w-6 h-6 flex-shrink-0 flex items-center justify-center hover:bg-foreground hover:text-background transition-colors rounded-sm",title:"Ocultar presupuesto",children:I.jsx(tl,{className:"h-[24px] w-[24px]"})}),I.jsx("h3",{className:"font-heading text-lg uppercase sm:text-xl text-background flex-1 cursor-pointer hover:text-primary transition-colors",onClick:a,children:"Presupuesto"}),I.jsx("span",{className:"bg-primary text-primary-foreground text-xs font-bold px-2 py-1 rounded-sm",children:h})]})}),I.jsx("div",{className:"overflow-y-auto flex-1 p-4 rounded-sm bg-card pl-0 mr-[16px]",children:t.length===0?I.jsxs("div",{className:"text-center py-8 ml-[16px]",children:[I.jsx(Lc,{className:"w-12 h-12 mx-auto text-muted-foreground
31/40 mb-3"}),I.jsx("p",{className:"text-sm text-muted-foreground ml-0",children:"Todavía no hay equipos en tu lista. Explorá el catálogo y sumá lo que necesitás."})]}):I.jsx("div",{className:"space-y-3 max-h-screen overflow-scroll ",children:t.map(v=>I.jsx("div",{className:"p-3 bg-inherit py-0 px-0",children:I.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 py-0 my-0 ml-[12px]",children:[I.jsxs("div",{className:"gap-[4px] flex items-center justify-center",children:[I.jsx("button",{onClick:()=>n(v.id,v.quantity-1),className:"w-7 h-7 flex items-center justify-center hover:bg-foreground hover:text-background transition-colors",children:I.jsx(e2,{className:"w-3 h-3 mx-[8px]"})}),I.jsx("span",{className:"font-heading text-sm w-6 text-center",children:v.quantity}),I.jsx("button",{onClick:()=>n(v.id,v.quantity+1),disabled:v.stockQuantity!==void 0&&v.quantity>=v.stockQuantity,className:"w-7 h-7 border-foreground flex items-center justify-center hover:bg-foreground hover:text-background transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-foreground border-0",children:I.jsx(zo,{className:"w-3 h-3"})})]}),I.jsxs("div",{className:"flex items-center gap-3",children:[I.jsxs("span",{className:"font-heading text-sm",children:["$",(v.pricePerDay*v.quantity).toLocaleString()]}),I.jsx("button",{onClick:()=>r(v.id),className:"text-destructive hover:text-destructive/80 transition-colors",children:I.jsx(G0,{className:"w-4 h-4"})})]})]})},v.id))})}),t.length>0&&I.jsxs("div",{className:"p-4 bg-muted/30 rounded-sm mx-[16px] ml-0 my-[32px]",children:[I.jsxs("div",{className:"space-y-2 mb-4",children:[I.jsxs("div",{className:"flex justify-between items-baseline",children:[I.jsx("span",{className:"font-heading text-sm text-card",children:"Subtotal (1 día):"}),I.jsxs("span",{className:"font-heading text-xl text-card font-bold",children:["$",e(1).toLocaleString()]})]}),I.jsxs("div",{className:"flex justify-between items-baseline text-xs text-card",children:[I.jsx("span",{children:"Semana (7 días):"}),I.jsxs("span",{children:["$",e(7).toLocaleString()]})]})]}),I.jsx($n,{className:"w-full text-sm",size:"lg",onClick:()=>window.location.href="/cotizador",children:"Presupuestar"})]})]});return l?I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"fixed bottom-4 left-4 z-40",children:I.jsxs("button",{onClick:()=>u(!0),className:"relative bg-primary text-primary-foreground p-4 shadow-brutal-sm hover:scale-105 transition-transform py-[12px] px-[12px] my-[8px] rounded-sm",children:[I.jsx(Lc,{className:"w-[16px] h-[16px]"}),h>0&&I.jsx("span",{className:"absolute -top-2 -right-2 text-destructive-foreground text-xs font-bold w-6 h-6 rounded-full flex items-center justify-center bg-primary",children:h})]})}),I.jsx(ud,{open:s,onOpenChange:u,children:I.jsxs(fd,{className:"max-h-[85vh] flex flex-col",children:[I.jsx(dd,{children:I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx(pd,{className:"font-heading text-xl uppercase",children:"Tu Cotización"}),I.jsx(U2,{asChild:!0,children:I.jsx("button",{className:"p-1",children:I.jsx(Va,{className:"w-5 h-5"})})})]})}),I.jsx("div",{className:"flex-1 overflow-y-auto",children:I.jsx(f,{})})]})})]}):I.jsx("div",{className:"z-20 shadow-brutal border-px rounded-sm bg-transparent",style:{top:`${i}px`},children:I.jsx(f,{})})},$2=({viewMode:t,onViewModeChange:e})=>I.jsxs("div",{className:"flex items-center border border-foreground
31/20 rounded-none",children:[I.jsx($n,{variant:"ghost",size:"sm",onClick:()=>e("cards"),className:qe("h-8 w-8 p-0 rounded-sm text-foreground bg-[#ba1c1c]",t==="cards"&&"bg-primary text-primary-foreground"),"aria-label":"Vista de tarjetas",children:I.jsx(t2,{className:"h-4 w-4 text-neutral-100"})}),I.jsx($n,{variant:"ghost",size:"sm",onClick:()=>e("list"),className:qe("h-8 w-8 p-0 rounded-sm text-primary-foreground bg-destructive",t==="list"&&"bg-primary-dark text-primary-foreground bg-neutral-900"),"aria-label":"Vista de lista",children:I.jsx(W0,{className:"h-4 w-4 text-popover"})})]});function je(t){"@babel/helpers - typeof";return je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},je(t)}var _r=Uint8Array,nr=Uint16Array,Qc=Int32Array,tu=new _r([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,0,0,0]),eu=new _r([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,0,0]),ah=new _r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),gd=function(t,e){for(var n=new nr(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];for(var i=new Qc(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},md=gd(tu,2),V2=md.b,Cc=md.r;V2[28]=258,Cc[258]=28;var G2=gd(eu,0),oh=G2.r,Ec=new nr(32768);for(var He=0;He<32768;++He){var yi=(He&43690)>>1|(He&21845)<<1;yi=(yi&52428)>>2|(yi&13107)<<2,yi=(yi&61680)>>4|(yi&3855)<<4,Ec[He]=((yi&65280)>>8|(yi&255)<<8)>>1}var Po=function(t,e,n){for(var r=t.length,i=0,a=new nr(e);i<r;++i)t[i]&&++a[t[i]-1];var l=new nr(e);for(i=1;i<e;++i)l[i]=l[i-1]+a[i-1]<<1;var s;if(n){s=new nr(1<<e);var u=15-e;for(i=0;i<r;++i)if(t[i])for(var h=i<<4|t[i],f=e-t[i],v=l[t[i]-1]++<<f,b=v|(1<<f)-1;v<=b;++v)s[Ec[v]>>u]=h}else for(s=new nr(r),i=0;i<r;++i)t[i]&&(s[i]=Ec[l[t[i]-1]++]>>15-t[i]);return s},ta=new _r(288);for(var He=0;He<144;++He)ta[He]=8;for(var He=144;He<256;++He)ta[He]=9;for(var He=256;He<280;++He)ta[He]=7;for(var He=280;He<288;++He)ta[He]=8;var $s=new _r(32);for(var He=0;He<32;++He)$s[He]=5;var Y2=Po(ta,9,0),Z2=Po($s,5,0),vd=function(t){return(t+7)/8|0},K2=function(t,e,n){return(n==null||n>t.length)&&(n=t.length),new _r(t.subarray(e,n))},Qr=function(t,e,n){n<<=e&7;var r=e/8|0;t[r]|=n,t[r+1]|=n>>8},No=function(t,e,n){n<<=e&7;var r=e/8|0;t[r]|=n,t[r+1]|=n>>8,t[r+2]|=n>>16},Zl=function(t,e){for(var n=[],r=0;r<t.length;++r)t[r]&&n.push({s:r,f:t[r]});var i=n.length,a=n.slice();if(!i)return{t:wd,l:0};if(i==1){var l=new _r(n[0].s+1);return l[n[0].s]=1,{t:l,l:1}}n.sort(function(nt,dt){return nt.f-dt.f}),n.push({s:-1,f:25001});var s=n[0],u=n[1],h=0,f=1,v=2;for(n[0]={s:-1,f:s.f+u.f,l:s,r:u};f!=i-1;)s=n[n[h].f<n[v].f?h++:v++],u=n[h!=f&&n[h].f<n[v].f?h++:v++],n[f++]={s:-1,f:s.f+u.f,l:s,r:u};for(var b=a[0].s,r=1;r<i;++r)a[r].s>b&&(b=a[r].s);var p=new nr(b+1),S=jc(n[f-1],p,0);if(S>e){var r=0,k=0,C=S-e,_=1<<C;for(a.sort(function(dt,et){return p[et.s]-p[dt.s]||dt.f-et.f});r<i;++r){var O=a[r].s;if(p[O]>e)k+=_-(1<<S-p[O]),p[O]=e;else break}for(k>>=C;k>0;){var U=a[r].s;p[U]<e?k-=1<<e-p[U]++-1:++r}for(;r>=0&&k;--r){var R=a[r].s;p[R]==e&&(--p[R],++k)}S=e}return{t:new _r(p),l:S}},jc=function(t,e,n){return t.s==-1?Math.max(jc(t.l,e,n+1),jc(t.r,e,n+1)):e[t.s]=n},sh=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new nr(++e),r=0,i=t[0],a=1,l=function(u){n[r++]=u},s=1;s<=e;++s)if(t[s]==i&&s!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)l(32754);a>2&&(l(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(l(i),--a;a>6;a-=6)l(8304);a>2&&(l(a-3<<5|8208),a=0)}for(;a--;)l(i);a=1,i=t[s]}return{c:n.subarray(0,r),n:e}},So=function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},bd=function(t,e,n){var r=n.length,i=vd(e+2);t[i]=r&255,t[i+1]=r>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var a=0;a<r;++a)t[i+a+4]=n[a];return(i+4+r)*8},lh=function(t,e,n,r,i,a,l,s,u,h,f){Qr(e,f++,n),++i[256];for(var v=Zl(i,15),b=v.t,p=v.l,S=Zl(a,15),k=S.t,C=S.l,_=sh(b),O=_.c,U=_.n,R=sh(k),nt=R.c,dt=R.n,et=new nr(19),$=0;$<O.length;++$)++et[O[$]&31];for(var $=0;$<nt.length;++$)++et[nt[$]&31];for(var D=Zl(et,7),J=D.t,x=D.l,j=19;j>4&&!J[ah[j-1]];--j);var W=h+5<<3,q=So(i,ta)+So(a,$s)+l,Q=So(i,b)+So(a,k)+l+14+3*j+So(et,J)+2*et[16]+3*et[17]+7*et[18];if(u>=0&&W<=q&&W<=Q)return bd(e,f,t.subarray(u,u+h));var ct,at,K,ht;if(Qr(e,f,1+(Q<q)),f+=2,Q<q){ct=Po(b,p,0),at=b,K=Po(k,C,0),ht=k;var At=Po(J,x,0);Qr(e,f,U-257),Qr(e,f+5,dt-1),Qr(e,f+10,j-4),f+=14;for(var $=0;$<j;++$)Qr(e,f+3*$,J[ah[$]]);f+=3*j;for(var pt=[O,nt],A=0;A<2;++A)for(var z=pt[A],$=0;$<z.length;++$){var H=z[$]&31;Qr(e,f,At[H]),f+=J[H],H>15&&(Qr(e,f,z[$]>>5&127),f+=z[$]>>12)}}else ct=Y2,at=ta,K=Z2,ht=$s;for(var $=0;$<s;++$){var G=r[$];if(G>255){var H=G>>18&31;No(e,f,ct[H+257]),f+=at[H+257],H>7&&(Qr(e,f,G>>23&31),f+=tu[H]);var Z=G&31;No(e,f,K[Z]),f+=ht[Z],Z>3&&(No(e,f,G>>5&8191),f+=eu[Z])}else No(e,f,ct[G]),f+=at[G]}return No(e,f,ct[256]),f+at[256]},X2=new Qc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),wd=new _r(0),J2=function(t,e,n,r,i,a){var l=a.z||t.length,s=new _r(r+l+5*(1+Math.ceil(l/7e3))+i),u=s.subarray(r,s.length-i),h=a.l,f
vendor: 10,510 bytes, lines 31-32
31=(a.r||0)&7;if(e){f&&(u[0]=a.r>>3);for(var v=X2[e-1],b=v>>13,p=v&8191,S=(1<<n)-1,k=a.p||new nr(32768),C=a.h||new nr(S+1),_=Math.ceil(n/3),O=2*_,U=function(Kt){return(t[Kt]^t[Kt+1]<<_^t[Kt+2]<<O)&S},R=new Qc(25e3),nt=new nr(288),dt=new nr(32),et=0,$=0,D=a.i||0,J=0,x=a.w||0,j=0;D+2<l;++D){var W=U(D),q=D&32767,Q=C[W];if(k[q]=Q,C[W]=q,x<=D){var ct=l-D;if((et>7e3||J>24576)&&(ct>423||!h)){f=lh(t,u,0,R,nt,dt,$,J,j,D-j,f),J=et=$=0,j=D;for(var at=0;at<286;++at)nt[at]=0;for(var at=0;at<30;++at)dt[at]=0}var K=2,ht=0,At=p,pt=q-Q&32767;if(ct>2&&W==U(D-pt))for(var A=Math.min(b,ct)-1,z=Math.min(32767,D),H=Math.min(258,ct);pt<=z&&--At&&q!=Q;){if(t[D+K]==t[D+K-pt]){for(var G=0;G<H&&t[D+G]==t[D+G-pt];++G);if(G>K){if(K=G,ht=pt,G>A)break;for(var Z=Math.min(pt,G-2),it=0,at=0;at<Z;++at){var ut=D-pt+at&32767,ft=k[ut],vt=ut-ft&32767;vt>it&&(it=vt,Q=ut)}}}q=Q,Q=k[q],pt+=q-Q&32767}if(ht){R[J++]=268435456|Cc[K]<<18|oh[ht];var St=Cc[K]&31,Pt=oh[ht]&31;$+=tu[St]+eu[Pt],++nt[257+St],++dt[Pt],x=D+K,++et}else R[J++]=t[D],++nt[t[D]]}}for(D=Math.max(D,x);D<l;++D)R[J++]=t[D],++nt[t[D]];f=lh(t,u,h,R,nt,dt,$,J,j,D-j,f),h||(a.r=f&7|u[f/8|0]<<3,f-=7,a.h=C,a.p=k,a.i=D,a.w=x)}else{for(var D=a.w||0;D<l+h;D+=65535){var wt=D+65535;wt>=l&&(u[f/8|0]=h,wt=l),f=bd(u,f+1,t.subarray(D,wt))}a.i=l}return K2(s,0,r+vd(f)+i)},yd=function(){var t=1,e=0;return{p:function(n){for(var r=t,i=e,a=n.length|0,l=0;l!=a;){for(var s=Math.min(l+2655,a);l<s;++l)i+=r+=n[l];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}t=r,e=i},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},Q2=function(t,e,n,r,i){if(!i&&(i={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),l=new _r(a.length+t.length);l.set(a),l.set(t,a.length),t=l,i.w=a.length}return J2(t,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,r,i)},xd=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},tp=function(t,e){var n=e.level,r=n==0?0:n<6?1:n==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var i=yd();i.p(e.dictionary),xd(t,2,i.d())}};function Ic(t,e){e||(e={});var n=yd();n.p(t);var r=Q2(t,e,e.dictionary?6:2,4);return tp(r,e),xd(r,r.length-4,n.d()),r}var ep=typeof TextDecoder<"u"&&new TextDecoder,np=0;try{ep.decode(wd,{stream:!0}),np=1}catch{}function rp(t){if(Array.isArray(t))return t}function ip(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,l,s=[],u=!0,h=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(f){h=!0,i=f}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(h)throw i}}return s}}function ch(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ap(t,e){if(t){if(typeof t=="string")return ch(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ch(t,e):void 0}}function op(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
32In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uh(t,e){return rp(t)||ip(t,e)||ap(t,e)||op()}function hh(t,e="utf8"){return new TextDecoder(e).decode(t)}const sp=new TextEncoder;function lp(t){return sp.encode(t)}const cp=1024*8,up=(()=>{const t=new Uint8Array(4),e=new Uint32Array(t.buffer);return!((e[0]=1)&t[0])})(),Kl={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class nu{constructor(e=cp,n={}){Ee(this,"buffer");Ee(this,"byteLength");Ee(this,"byteOffset");Ee(this,"length");Ee(this,"offset");Ee(this,"lastWrittenByte");Ee(this,"littleEndian");Ee(this,"_data");Ee(this,"_mark");Ee(this,"_marks");let r=!1;typeof e=="number"?e=new ArrayBuffer(e):(r=!0,this.lastWrittenByte=e.byteLength);const i=n.offset?n.offset>>>0:0,a=e.byteLength-i;let l=i;(ArrayBuffer.isView(e)||e instanceof nu)&&(e.byteLength!==e.buffer.byteLength&&(l=e.byteOffset+i),e=e.buffer),r?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=e,this.length=a,this.byteLength=a,this.byteOffset=l,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,l,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const r=(this.offset+e)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,n){const r=Kl[n].BYTES_PER_ELEMENT*e,i=this.byteOffset+this.offset,a=this.buffer.slice(i,i+r);if(this.littleEndian===up&&n!=="uint8"&&n!=="int8"){const s=new Uint8Array(this.buffer.slice(i,i+r));s.reverse();const u=new Kl[n](s.buffer);return this.offset+=r,u.reverse(),u}const l=new Kl[n](a);return this.offset+=r,l}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let n="";for(let r=0;r<e;r++)n+=this.readChar();return n}readUtf8(e=1){return hh(this.readBytes(e))}decodeText(e=1,n="utf8"){return hh(this.readBytes(e),n)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let n=0;n<e.length;n++)this._data.setUint8(this.offset++,e[n]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let n=0;n<e.length;n++)this.writeUint8(e.charCodeAt(n));return this}writeUtf8(e){return this.writeBytes(lp(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const hp=4,fh=0,dh=1,fp=2;function Ya(t){let e=t.length;for(;--e>=0;)t[e]=0}const dp=0,_d=1,pp=2,gp=3,mp=258,ru=29,Uo=256,Fo=Uo+1+ru,Da=30,iu=19,Nd=2*Fo+1,Ki=15,Xl=16,vp=7,au=256,Sd=16,Ad=17,Ld=18,Fc=new Uint8Array([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]),Ms=new Uint8Array([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]),bp=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),kd=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),wp=512,ei=new Array((Fo+2)*2);Ya(ei);const Co=new Array(Da*2);Ya(Co);const Ro=new Array(wp);Ya(Ro);const Oo=new Array(mp-gp+1);Ya(Oo);const ou=new Array(ru);Ya(ou);const Vs=new Array(Da);Ya(Vs);function Jl(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}let Pd,Cd,Ed;function Ql(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}const jd=t=>t<256?Ro[t]:Ro[256+(t>>>7)],To=(t,e)=>{t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255},Wn=(t,e,n)=>{t.bi_valid>Xl-n?(t.bi_buf|=e<<t.bi_valid&65535,To(t,t.bi_buf),t.bi_buf=e>>Xl-t.bi_valid,t.bi_valid+=n-Xl):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)},Tr=(t,e,n)=>{Wn(t,n[e*2],n[e*2+1])},Id=(t,e)=>{let n=0;do n|=t&1,t>>>=1,n<<=1;while(--e>0);return n>>>1},yp=t=>{t.bi_valid===16?(To(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>
vendor: 44,675 bytes, line 32
32=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},xp=(t,e)=>{const n=e.dyn_tree,r=e.max_code,i=e.stat_desc.static_tree,a=e.stat_desc.has_stree,l=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let h,f,v,b,p,S,k=0;for(b=0;b<=Ki;b++)t.bl_count[b]=0;for(n[t.heap[t.heap_max]*2+1]=0,h=t.heap_max+1;h<Nd;h++)f=t.heap[h],b=n[n[f*2+1]*2+1]+1,b>u&&(b=u,k++),n[f*2+1]=b,!(f>r)&&(t.bl_count[b]++,p=0,f>=s&&(p=l[f-s]),S=n[f*2],t.opt_len+=S*(b+p),a&&(t.static_len+=S*(i[f*2+1]+p)));if(k!==0){do{for(b=u-1;t.bl_count[b]===0;)b--;t.bl_count[b]--,t.bl_count[b+1]+=2,t.bl_count[u]--,k-=2}while(k>0);for(b=u;b!==0;b--)for(f=t.bl_count[b];f!==0;)v=t.heap[--h],!(v>r)&&(n[v*2+1]!==b&&(t.opt_len+=(b-n[v*2+1])*n[v*2],n[v*2+1]=b),f--)}},Fd=(t,e,n)=>{const r=new Array(Ki+1);let i=0,a,l;for(a=1;a<=Ki;a++)i=i+n[a-1]<<1,r[a]=i;for(l=0;l<=e;l++){let s=t[l*2+1];s!==0&&(t[l*2]=Id(r[s]++,s))}},_p=()=>{let t,e,n,r,i;const a=new Array(Ki+1);for(n=0,r=0;r<ru-1;r++)for(ou[r]=n,t=0;t<1<<Fc[r];t++)Oo[n++]=r;for(Oo[n-1]=r,i=0,r=0;r<16;r++)for(Vs[r]=i,t=0;t<1<<Ms[r];t++)Ro[i++]=r;for(i>>=7;r<Da;r++)for(Vs[r]=i<<7,t=0;t<1<<Ms[r]-7;t++)Ro[256+i++]=r;for(e=0;e<=Ki;e++)a[e]=0;for(t=0;t<=143;)ei[t*2+1]=8,t++,a[8]++;for(;t<=255;)ei[t*2+1]=9,t++,a[9]++;for(;t<=279;)ei[t*2+1]=7,t++,a[7]++;for(;t<=287;)ei[t*2+1]=8,t++,a[8]++;for(Fd(ei,Fo+1,a),t=0;t<Da;t++)Co[t*2+1]=5,Co[t*2]=Id(t,5);Pd=new Jl(ei,Fc,Uo+1,Fo,Ki),Cd=new Jl(Co,Ms,0,Da,Ki),Ed=new Jl(new Array(0),bp,0,iu,vp)},Rd=t=>{let e;for(e=0;e<Fo;e++)t.dyn_ltree[e*2]=0;for(e=0;e<Da;e++)t.dyn_dtree[e*2]=0;for(e=0;e<iu;e++)t.bl_tree[e*2]=0;t.dyn_ltree[au*2]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Od=t=>{t.bi_valid>8?To(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},ph=(t,e,n,r)=>{const i=e*2,a=n*2;return t[i]<t[a]||t[i]===t[a]&&r[e]<=r[n]},tc=(t,e,n)=>{const r=t.heap[n];let i=n<<1;for(;i<=t.heap_len&&(i<t.heap_len&&ph(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!ph(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r},gh=(t,e,n)=>{let r,i,a=0,l,s;if(t.sym_next!==0)do r=t.pending_buf[t.sym_buf+a++]&255,r+=(t.pending_buf[t.sym_buf+a++]&255)<<8,i=t.pending_buf[t.sym_buf+a++],r===0?Tr(t,i,e):(l=Oo[i],Tr(t,l+Uo+1,e),s=Fc[l],s!==0&&(i-=ou[l],Wn(t,i,s)),r--,l=jd(r),Tr(t,l,n),s=Ms[l],s!==0&&(r-=Vs[l],Wn(t,r,s)));while(a<t.sym_next);Tr(t,au,e)},Rc=(t,e)=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.elems;let l,s,u=-1,h;for(t.heap_len=0,t.heap_max=Nd,l=0;l<a;l++)n[l*2]!==0?(t.heap[++t.heap_len]=u=l,t.depth[l]=0):n[l*2+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=u<2?++u:0,n[h*2]=1,t.depth[h]=0,t.opt_len--,i&&(t.static_len-=r[h*2+1]);for(e.max_code=u,l=t.heap_len>>1;l>=1;l--)tc(t,n,l);h=a;do l=t.heap[1],t.heap[1]=t.heap[t.heap_len--],tc(t,n,1),s=t.heap[1],t.heap[--t.heap_max]=l,t.heap[--t.heap_max]=s,n[h*2]=n[l*2]+n[s*2],t.depth[h]=(t.depth[l]>=t.depth[s]?t.depth[l]:t.depth[s])+1,n[l*2+1]=n[s*2+1]=h,t.heap[1]=h++,tc(t,n,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],xp(t,e),Fd(n,u,t.bl_count)},mh=(t,e,n)=>{let r,i=-1,a,l=e[0*2+1],s=0,u=7,h=4;for(l===0&&(u=138,h=3),e[(n+1)*2+1]=65535,r=0;r<=n;r++)a=l,l=e[(r+1)*2+1],!(++s<u&&a===l)&&(s<h?t.bl_tree[a*2]+=s:a!==0?(a!==i&&t.bl_tree[a*2]++,t.bl_tree[Sd*2]++):s<=10?t.bl_tree[Ad*2]++:t.bl_tree[Ld*2]++,s=0,i=a,l===0?(u=138,h=3):a===l?(u=6,h=3):(u=7,h=4))},vh=(t,e,n)=>{let r,i=-1,a,l=e[0*2+1],s=0,u=7,h=4;for(l===0&&(u=138,h=3),r=0;r<=n;r++)if(a=l,l=e[(r+1)*2+1],!(++s<u&&a===l)){if(s<h)do Tr(t,a,t.bl_tree);while(--s!==0);else a!==0?(a!==i&&(Tr(t,a,t.bl_tree),s--),Tr(t,Sd,t.bl_tree),Wn(t,s-3,2)):s<=10?(Tr(t,Ad,t.bl_tree),Wn(t,s-3,3)):(Tr(t,Ld,t.bl_tree),Wn(t,s-11,7));s=0,i=a,l===0?(u=138,h=3):a===l?(u=6,h=3):(u=7,h=4)}},Np=t=>{let e;for(mh(t,t.dyn_ltree,t.l_desc.max_code),mh(t,t.dyn_dtree,t.d_desc.max_code),Rc(t,t.bl_desc),e=iu-1;e>=3&&t.bl_tree[kd[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e},Sp=(t,e,n,r)=>{let i;for(Wn(t,e-257,5),Wn(t,n-1,5),Wn(t,r-4,4),i=0;i<r;i++)Wn(t,t.bl_tree[kd[i]*2+1],3);vh(t,t.dyn_ltree,e-1),vh(t,t.dyn_dtree,n-1)},Ap=t=>{let e=4093624447,n;for(n=0;n<=31;n++,e>>>=1)if(e&1&&t.dyn_ltree[n*2]!==0)return fh;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return dh;for(n=32;n<Uo;n++)if(t.dyn_ltree[n*2]!==0)return dh;return fh};let bh=!1;const Lp=t=>{bh||(_p(),bh=!0),t.l_desc=new Ql(t.dyn_ltree,Pd),t.d_desc=new Ql(t.dyn_dtree,Cd),t.bl_desc=new Ql(t.bl_tree,Ed),t.bi_buf=0,t.bi_valid=0,Rd(t)},Td=(t,e,n,r)=>{Wn(t,(dp<<1)+(r?1:0),3),Od(t),To(t,n),To(t,~n),n&&t.pending_buf.set(t.window.subarray(e,e+n),t.pending),t.pending+=n},kp=t=>{Wn(t,_d<<1,3),Tr(t,au,ei),yp(t)},Pp=(t,e,n,r)=>{let i,a,l=0;t.level>0?(t.strm.data_type===fp&&(t.strm.data_type=Ap(t)),Rc(t,t.l_desc),Rc(t,t.d_desc),l=Np(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&e!==-1?Td(t,e,n,r):t.strategy===hp||a===i?(Wn(t,(_d<<1)+(r?1:0),3),gh(t,ei,Co)):(Wn(t,(pp<<1)+(r?1:0),3),Sp(t,t.l_desc.max_code+1,t.d_desc.max_code+1,l+1),gh(t,t.dyn_ltree,t.dyn_dtree)),Rd(t),r&&Od(t)},Cp=(t,e,n)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,e===0?t.dyn_ltree[n*2]++:(t.matches++,e--,t.dyn_ltree[(Oo[n]+Uo+1)*2]++,t.dyn_dtree[jd(e)*2]++),t.sym_next===t.sym_end);var Ep=Lp,jp=Td,Ip=Pp,Fp=Cp,Rp=kp,Op={_tr_init:Ep,_tr_stored_block:jp,_tr_flush_block:Ip,_tr_tally:Fp,_tr_align:Rp};const Tp=(t,e,n,r)=>{let i=t&65535|0,a=t>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+e[r++]|0,a=a+i|0;while(--l);i%=65521,a%=65521}return i|a<<16|0};var Do=Tp;const Dp=()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e},Mp=new Uint32Array(Dp()),Bp=(t,e,n,r)=>{const i=Mp,a=r+n;t^=-1;for(let l=r;l<a;l++)t=t>>>8^i[(t^e[l])&255];return t^-1};var vn=Bp,Ha={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ho={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,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_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,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:qp,_tr_stored_block:Oc,_tr_flush_block:zp,_tr_tally:Ai,_tr_align:Up}=Op,{Z_NO_FLUSH:Li,Z_PARTIAL_FLUSH:Hp,Z_FULL_FLUSH:Wp,Z_FINISH:fr,Z_BLOCK:wh,Z_OK:An,Z_STREAM_END:yh,Z_STREAM_ERROR:Mr,Z_DATA_ERROR:$p,Z_BUF_ERROR:ec,Z_DEFAULT_COMPRESSION:Vp,Z_FILTERED:Gp,Z_HUFFMAN_ONLY:Cs,Z_RLE:Yp,Z_FIXED:Zp,Z_DEFAULT_STRATEGY:Kp,Z_UNKNOWN:Xp,Z_DEFLATED:el}=Ho,Jp=9,Qp=15,t5=8,e5=29,n5=256,Tc=n5+1+e5,r5=30,i5=19,a5=2*Tc+1,o5=15,_e=3,Ni=258,Br=Ni+_e+1,s5=32,Wa=42,su=57,Dc=69,Mc=73,Bc=91,qc=103,Xi=113,Lo=666,Bn=1,Za=2,ea=3,Ka=4,l5=3,Ji=(t,e)=>(t.msg=Ha[e],e),xh=t=>t*2-(t>4?9:0),_i=t=>{let e=t.length;for(;--e>=0;)t[e]=0},c5=t=>{let e,n,r,i=t.w_size;e=t.hash_size,r=e;do n=t.head[--r],t.head[r]=n>=i?n-i:0;while(--e);e=i,r=e;do n=t.prev[--r],t.prev[r]=n>=i?n-i:0;while(--e)};let u5=(t,e,n)=>(e<<t.hash_shift^n)&t.hash_mask,ki=u5;const er=t=>{const e=t.state;let n=e.pending;n>t.avail_out&&(n=t.avail_out),n!==0&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+n),t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,e.pending===0&&(e.pending_out=0))},rr=(t,e)=>{zp(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,er(t.strm)},Le=(t,e)=>{t.pending_buf[t.pending++]=e},Ao=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255},zc=(t,e,n,r)=>{let i=t.avail_in;return i>r&&(i=r),i===0?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),n),t.state.wrap===1?t.adler=Do(t.adler,e,i,n):t.state.wrap===2&&(t.adler=vn(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)},Dd=(t,e)=>{let n=t.max_chain_length,r=t.strstart,i,a,l=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-Br?t.strstart-(t.w_size-Br):0,h=t.window,f=t.w_mask,v=t.prev,b=t.strstart+Ni;let p=h[r+l-1],S=h[r+l];t.prev_length>=t.good_match&&(n>>=2),s>t.lookahead&&(s=t.lookahead);do if(i=e,!(h[i+l]!==S||h[i+l-1]!==p||h[i]!==h[r]||h[++i]!==h[r+1])){r+=2,i++;do;while(h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&h[++r]===h[++i]&&r<b);if(a=Ni-(b-r),r=b-Ni,a>l){if(t.match_start=e,l=a,a>=s)break;p=h[r+l-1],S=h[r+l]}}while((e=v[e&f])>u&&--n!==0);return l<=t.lookahead?l:t.lookahead},$a=t=>{const e=t.w_size;let n,r,i;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-Br)&&(t.window.set(t.window.subarray(e,e+e-r),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),c5(t),r+=e),t.strm.avail_in===0)break;if(n=zc(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=n,t.lookahead+t.insert>=_e)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=ki(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=ki(t,t.ins_h,t.window[i+_e-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<_e)););}while(t.lookahead<Br&&t.strm.avail_in!==0)},Md=(t,e)=>{let n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r,i,a,l=0,s=t.strm.avail_in;do{if(r=65535,a=t.bi_valid+42>>3,t.strm.avail_out<a||(a=t.strm.avail_out-a,i=t.strstart-t.block_start,r>i+t.strm.avail_in&&(r=i+t.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&e!==fr||e===Li||r!==i+t.strm.avail_in)))break;l=e===fr&&r===i+t.strm.avail_in?1:0,Oc(t,0,0,l),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,er(t.strm),i&&(i>r&&(i=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,r-=i),r&&(zc(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(l===0);return s-=t.strm.avail_in,s&&(s>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=s&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-s,t.strm.next_in),t.strstart),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),l?Ka:e!==Li&&e!==fr&&t.strm.avail_in===0&&t.strstart===t.block_start?Za:(a=t.window_size-t.strstart,t.strm.avail_in>a&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,a+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),a>t.strm.avail_in&&(a=t.strm.avail_in),a&&(zc(t.strm,t.window,t.strstart,a),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.high_water<t.strstart&&(t.high_water=t.strstart),a=t.bi_valid+42>>3,a=t.pending_buf_size-a>65535?65535:t.pending_buf_size-a,n=a>t.w_size?t.w_size:a,i=t.strstart-t.block_start,(i>=n||(i||e===fr)&&e!==Li&&t.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,l=e===fr&&t.strm.avail_in===0&&r===i?1:0,Oc(t,t.block_start,r,l),t.block_start+=r,er(t.strm)),l?ea:Bn)},nc=(t,e)=>{let n,r;for(;;){if(t.lookahead<Br){if($a(t),t.lookahead<Br&&e===Li)return Bn;if(t.lookahead===0)break}if(n=0,t.lookahead>=_e&&(t.ins_h=ki(t,t.ins_h,t.window[t.strstart+_e-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),n!==0&&t.strstart-n<=t.w_size-Br&&(t.match_length=Dd(t,n)),t.match_length>=_e)if(r=Ai(t,t.strstart-t.match_start,t.match_length-_e),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=_e){t.match_length--;do t.strstart++,t.ins_h=ki(t,t.ins_h,t.window[t.strstart+_e-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ki(t,t.ins_h,t.window[t.strstart+1]);else r=Ai(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(rr(t,!1),t.strm.avail_out===0))return Bn}return t.insert=t.strstart<_e-1?t.strstart:_e-1,e===fr?(rr(t,!0),t.strm.avail_out===0?ea:Ka):t.sym_next&&(rr(t,!1),t.strm.avail_out===0)?Bn:Za},Ca=(t,e)=>{let n,r,i;for(;;){if(t.lookahead<Br){if($a(t),t.lookahead<Br&&e===Li)return Bn;if(t.lookahead===0)break}if(n=0,t.lookahead>=_e&&(t.ins_h=ki(t,t.ins_h,t.window[t.strstart+_e-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=_e-1,n!==0&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-Br&&(t.match_length=Dd(t,n),t.match_length<=5&&(t.strategy===Gp||t.match_length===_e&&t.strstart-t.match_start>4096)&&(t.match_length=_e-1)),t.prev_length>=_e&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-_e,r=Ai(t,t.strstart-1-t.prev_match,t.prev_length-_e),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=ki(t,t.ins_h,t.window[t.strstart+_e-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=_e-1,t.strstart++,r&&(rr(t,!1),t.strm.avail_out===0))return Bn}else if(t.match_available){if(r=Ai(t,0,t.window[t.strstart-1]),r&&rr(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Bn}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=Ai(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<_e-1?t.strstart:_e-1,e===fr?(rr(t,!0),t.strm.avail_out===0?ea:Ka):t.sym_next&&(rr(t,!1),t.strm.avail_out===0)?Bn:Za},h5=(t,e)=>{let n,r,i,a;const l=t.window;for(;;){if(t.lookahead<=Ni){if($a(t),t.lookahead<=Ni&&e===Li)return Bn;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=_e&&t.strstart>0&&(i=t.strstart-1,r=l[i],r===l[++i]&&r===l[++i]&&r===l[++i])){a=t.strstart+Ni;do;while(r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&i<a);t.match_length=Ni-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=_e?(n=Ai(t,1,t.match_length-_e),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=Ai(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(rr(t,!1),t.strm.avail_out===0))return Bn}return t.insert=0,e===fr?(rr(t,!0),t.strm.avail_out===0?ea:Ka):t.sym_next&&(rr(t,!1),t.strm.avail_out===0)?Bn:Za},f5=(t,e)=>{let n;for(;;){if(t.lookahead===0&&($a(t),t.lookahead===0)){if(e===Li)return Bn;break}if(t.match_length=0,n=Ai(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(rr(t,!1),t.strm.avail_out===0))return Bn}return t.insert=0,e===fr?(rr(t,!0),t.strm.avail_out===0?ea:Ka):t.sym_next&&(rr(t,!1),t.strm.avail_out===0)?Bn:Za};function Rr(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}const ko=[new Rr(0,0,0,0,Md),new Rr(4,4,8,4,nc),new Rr(4,5,16,8,nc),new Rr(4,6,32,32,nc),new Rr(4,4,16,16,Ca),new Rr(8,16,32,32,Ca),new Rr(8,16,128,128,Ca),new Rr(8,32,128,256,Ca),new Rr(32,128,258,1024,Ca),new Rr(32,258,258,4096,Ca)],d5=t=>{t.window_size=2*t.w_size,_i(t.head),t.max_lazy_match=ko[t.level].max_lazy,t.good_match=ko[t.level].good_length,t.nice_match=ko[t.level].nice_length,t.max_chain_length=ko[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=_e-1,t.match_available=0,t.ins_h=0};function p5(){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=el,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 Uint16Array(a5*2),this.dyn_dtree=new Uint16Array((2*r5+1)*2),this.bl_tree=new Uint16Array((2*i5+1)*2),_i(this.dyn_ltree),_i(this.dyn_dtree),_i(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(o5+1),this.heap=new Uint16Array(2*Tc+1),_i(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Tc+1),_i(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Wo=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==Wa&&e.status!==su&&e.status!==Dc&&e.status!==Mc&&e.status!==Bc&&e.status!==qc&&e.status!==Xi&&e.status!==Lo?1:0},Bd=t=>{if(Wo(t))return Ji(t,Mr);t.total_in=t.total_out=0,t.data_type=Xp;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?su:e.wrap?Wa:Xi,t.adler=e.wrap===2?0:1,e.last_flush=-2,qp(e),An},qd=t=>{const e=Bd(t);return e===An&&d5(t.state),e},g5=(t,e)=>Wo(t)||t.state.wrap!==2?Mr:(t.state.gzhead=e,An),zd=(t,e,n,r,i,a)=>{if(!t)return Mr;let l=1;if(e===Vp&&(e=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>Jp||n!==el||r<8||r>15||e<0||e>9||a<0||a>Zp||r===8&&l!==1)return Ji(t,Mr);r===8&&(r=9);const s=new p5;return t.state=s,s.strm=t,s.status=Wa,s.wrap=l,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+_e-1)/_e),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=e,s.strategy=a,s.method=n,qd(t)},m5=(t,e)=>zd(t,e,el,Qp,t5,Kp),v5=(t,e)=>{if(Wo(t)||e>wh||e<0)return t?Ji(t,Mr):Mr;const n=t.state;if(!t.output||t.avail_in!==0&&!t.input||n.status===Lo&&e!==fr)return Ji(t,t.avail_out===0?ec:Mr);const r=n.last_flush;if(n.last_flush=e,n.pending!==0){if(er(t),t.avail_out===0)return n.last_flush=-1,An}else if(t.avail_in===0&&xh(e)<=xh(r)&&e!==fr)return Ji(t,ec);if(n.status===Lo&&t.avail_in!==0)return Ji(t,ec);if(n.status===Wa&&n.wrap===0&&(n.status=Xi),n.status===Wa){let i=el+(n.w_bits-8<<4)<<8,a=-1;if(n.strategy>=Cs||n.level<2?a=0:n.level<6?a=1:n.level===6?a=2:a=3,i|=a<<6,n.strstart!==0&&(i|=s5),i+=31-i%31,Ao(n,i),n.strstart!==0&&(Ao(n,t.adler>>>16),Ao(n,t.adler&65535)),t.adler=1,n.status=Xi,er(t),n.pending!==0)return n.last_flush=-1,An}if(n.status===su){if(t.adler=0,Le(n,31),Le(n,139),Le(n,8),n.gzhead)Le(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Le(n,n.gzhead.time&255),Le(n,n.gzhead.time>>8&255),Le(n,n.gzhead.time>>16&255),Le(n,n.gzhead.time>>24&255),Le(n,n.level===9?2:n.strategy>=Cs||n.level<2?4:0),Le(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Le(n,n.gzhead.extra.length&255),Le(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=vn(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Dc;else if(Le(n,0),Le(n,0),Le(n,0),Le(n,0),Le(n,0),Le(n,n.level===9?2:n.strategy>=Cs||n.level<2?4:0),Le(n,l5),n.status=Xi,er(t),n.pending!==0)return n.last_flush=-1,An}if(n.status===Dc){if(n.gzhead.extra){let i=n.pending,a=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+a>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(t.adler=vn(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,er(t),n.pending!==0)return n.last_flush=-1,An;i=0,a-=s}let l=new Uint8Array(n.gzhead.extra);n.pending_buf.set(l.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>i&&(t.adler=vn(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Mc}if(n.status===Mc){if(n.gzhead.name){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(t.adler=vn(t.adler,n.pending_buf,n.pending-i,i)),er(t),n.pending!==0)return n.last_flush=-1,An;i=0}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,Le(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(t.adler=vn(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Bc}if(n.status===Bc){if(n.gzhead.comment){let i=n.pending,a;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(t.adler=vn(t.adler,n.pending_buf,n.pending-i,i)),er(t),n.pending!==0)return n.last_flush=-1,An;i=0}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,Le(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>i&&(t.adler=vn(t.adler,n.pending_buf,n.pending-i,i))}n.status=qc}if(n.status===qc){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(er(t),n.pending!==0))return n.last_flush=-1,An;Le(n,t.adler&255),Le(n,t.adler>>8&255),t.adler=0}if(n.status=Xi,er(t),n.pending!==0)return n.last_flush=-1,An}if(t.avail_in!==0||n.lookahead!==0||e!==Li&&n.status!==Lo){let i=n.level===0?Md(n,e):n.strategy===Cs?f5(n,e):n.strategy===Yp?h5(n,e):ko[n.level].func(n,e);if((i===ea||i===Ka)&&(n.status=Lo),i===Bn||i===ea)return t.avail_out===0&&(n.last_flush=-1),An;if(i===Za&&(e===Hp?Up(n):e!==wh&&(Oc(n,0,0,!1),e===Wp&&(_i(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),er(t),t.avail_out===0))return n.last_flush=-1,An}return e!==fr?An:n.wrap<=0?yh:(n.wrap===2?(Le(n,t.adler&255),Le(n,t.adler>>8&255),Le(n,t.adler>>16&255),Le(n,t.adler>>24&255),Le(n,t.total_in&255),Le(n,t.total_in>>8&255),Le(n,t.total_in>>16&255),Le(n,t.total_in>>24&255)):(Ao(n,t.adler>>>16),Ao(n,t.adler&65535)),er(t),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?An:yh)},b5=t=>{if(Wo(t))return Mr;const e=t.state.status;return t.state=null,e===Xi?Ji(t,$p):An},w5=(t,e)=>{let n=e.length;if(Wo(t))return Mr;const r=t.state,i=r.wrap;if(i===2||i===1&&r.status!==Wa||r.lookahead)return Mr;if(i===1&&(t.adler=Do(t.adler,e,n,0)),r.wrap=0,n>=r.w_size){i===0&&(_i(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(e.subarray(n-r.w_size,n),0),e=u,n=r.w_size}const a=t.avail_in,l=t.next_in,s=t.input;for(t.avail_in=n,t.next_in=0,t.input=e,$a(r);r.lookahead>=_e;){let u=r.strstart,h=r.lookahead-(_e-1);do r.ins_h=ki(r,r.ins_h,r.window[u+_e-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--h);r.strstart=u,r.lookahead=_e-1,$a(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=_e-1,r.match_available=0,t.next_in=l,t.input=s,t.avail_in=a,r.wrap=i,An};var y5=m5,x5=zd,_5=qd,N5=Bd,S5=g5,A5=v5,L5=b5,k5=w5,P5="pako deflate (from Nodeca project)",Eo={deflateInit:y5,deflateInit2:x5,deflateReset:_5,deflateResetKeep:N5,deflateSetHeader:S5,deflate:A5,deflateEnd:L5,deflateSetDictionary:k5,deflateInfo:P5};const C5=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var E5=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)C5(n,r)&&(t[r]=n[r])}}return t},j5=t=>{let e=0;for(let r=0,i=t.length;r<i;r++)e+=t[r].length;const n=new Uint8Array(e);for(let r=0,i=0,a=t.length;r<a;r++){let l=t[r];n.set(l,i),i+=l.length}return n},nl={assign:E5,flattenChunks:j5};let Ud=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ud=!1}const Mo=new Uint8Array(256);for(let t=0;t<256;t++)Mo[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Mo[254]=Mo[254]=1;var I5=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,n,r,i,a,l=t.length,s=0;for(i=0;i<l;i++)n=t.charCodeAt(i),(n&64512)===55296&&i+1<l&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(s),a=0,i=0;a<s;i++)n=t.charCodeAt(i),(n&64512)===55296&&i+1<l&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?e[a++]=n:n<2048?(e[a++]=192|n>>>6,e[a++]=128|n&63):n<65536?(e[a++]=224|n>>>12,e[a++]=128|n>>>6&63,e[a++]=128|n&63):(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63,e[a++]=128|n>>>6&63,e[a++]=128|n&63);return e};const F5=(t,e)=>{if(e<65534&&t.subarray&&Ud)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n};var R5=(t,e)=>{const n=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let r,i;const a=new Array(n*2);for(i=0,r=0;r<n;){let l=t[r++];if(l<128){a[i++]=l;continue}let s=Mo[l];if(s>4){a[i++]=65533,r+=s-1;continue}for(l&=s===2?31:s===3?15:7;s>1&&r<n;)l=l<<6|t[r++]&63,s--;if(s>1){a[i++]=65533;continue}l<65536?a[i++]=l:(l-=65536,a[i++]=55296|l>>10&1023,a[i++]=56320|l&1023)}return F5(a,i)},O5=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let n=e-1;for(;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+Mo[t[n]]>e?n:e},Bo={string2buf:I5,buf2string:R5,utf8border:O5};function T5(){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}var Hd=T5;const Wd=Object.prototype.toString,{Z_NO_FLUSH:D5,Z_SYNC_FLUSH:M5,Z_FULL_FLUSH:B5,Z_FINISH:q5,Z_OK:Gs,Z_STREAM_END:z5,Z_DEFAULT_COMPRESSION:U5,Z_DEFAULT_STRATEGY:H5,Z_DEFLATED:W5}=Ho;function lu(t){this.options=nl.assign({level:U5,method:W5,chunkSize:16384,windowBits:15,memLevel:8,strategy:H5},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Hd,this.strm.avail_out=0;let n=Eo.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==Gs)throw new Error(Ha[n]);if(e.header&&Eo.deflateSetHeader(this.strm,e.header),e.dictionary){let r;if(typeof e.dictionary=="string"?r=Bo.string2buf(e.dictionary):Wd.call(e.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(e.dictionary):r=e.dictionary,n=Eo.deflateSetDictionary(this.strm,r),n!==Gs)throw new Error(Ha[n]);this._dict_set=!0}}lu.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize;let i,a;if(this.ended)return!1;for(e===~~e?a=e:a=e===!0?q5:D5,typeof t=="string"?n.input=Bo.string2buf(t):Wd.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===M5||a===B5)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Eo.deflate(n,a),i===z5)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Eo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Gs;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};lu.prototype.onData=function(t){this.chunks.push(t)};lu.prototype.onEnd=function(t){t===Gs&&(this.result=nl.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const Es=16209,$5=16191;var V5=function(e,n){let r,i,a,l,s,u,h,f,v,b,p,S,k,C,_,O,U,R,nt,dt,et,$,D,J;const x=e.state;r=e.next_in,D=e.input,i=r+(e.avail_in-5),a=e.next_out,J=e.output,l=a-(n-e.avail_out),s=a+(e.avail_out-257),u=x.dmax,h=x.wsize,f=x.whave,v=x.wnext,b=x.window,p=x.hold,S=x.bits,k=x.lencode,C=x.distcode,_=(1<<x.lenbits)-1,O=(1<<x.distbits)-1;t:do{S<15&&(p+=D[r++]<<S,S+=8,p+=D[r++]<<S,S+=8),U=k[p&_];e:for(;;){if(R=U>>>24,p>>>=R,S-=R,R=U>>>16&255,R===0)J[a++]=U&65535;else if(R&16){nt=U&65535,R&=15,R&&(S<R&&(p+=D[r++]<<S,S+=8),nt+=p&(1<<R)-1,p>>>=R,S-=R),S<15&&(p+=D[r++]<<S,S+=8,p+=D[r++]<<S,S+=8),U=C[p&O];n:for(;;){if(R=U>>>24,p>>>=R,S-=R,R=U>>>16&255,R&16){if(dt=U&65535,R&=15,S<R&&(p+=D[r++]<<S,S+=8,S<R&&(p+=D[r++]<<S,S+=8)),dt+=p&(1<<R)-1,dt>u){e.msg="invalid distance too far back",x.mode=Es;break t}if(p>>>=R,S-=R,R=a-l,dt>R){if(R=dt-R,R>f&&x.sane){e.msg="invalid distance too far back",x.mode=Es;break t}if(et=0,$=b,v===0){if(et+=h-R,R<nt){nt-=R;do J[a++]=b[et++];while(--R);et=a-dt,$=J}}else if(v<R){if(et+=h+v-R,R-=v,R<nt){nt-=R;do J[a++]=b[et++];while(--R);if(et=0,v<nt){R=v,nt-=R;do J[a++]=b[et++];while(--R);et=a-dt,$=J}}}else if(et+=v-R,R<nt){nt-=R;do J[a++]=b[et++];while(--R);et=a-dt,$=J}for(;nt>2;)J[a++]=$[et++],J[a++]=$[et++],J[a++]=$[et++],nt-=3;nt&&(J[a++]=$[et++],nt>1&&(J[a++]=$[et++]))}else{et=a-dt;do J[a++]=J[et++],J[a++]=J[et++],J[a++]=J[et++],nt-=3;while(nt>2);nt&&(J[a++]=J[et++],nt>1&&(J[a++]=J[et++]))}}else if(R&64){e.msg="invalid distance code",x.mode=Es;break t}else{U=C[(U&65535)+(p&(1<<R)-1)];continue n}break}}else if(R&64)if(R&32){x.mode=$5;break t}else{e.msg="invalid literal/length code",x.mode=Es;break t}else{U=k[(U&65535)+(p&(1<<R)-1)];continue e}break}}while(r<i&&a<s);nt=S>>3,r-=nt,S-=nt<<3,p&=(1<<S)-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?5+(i-r):5-(r-i),e.avail_out=a<s?257+(s-a):257-(a-s),x.hold=p,x.bits=S};const Ea=15,_h=852,Nh=592,Sh=0,rc=1,Ah=2,G5=new Uint16Array([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]),Y5=new Uint8Array([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]),Z5=new Uint16Array([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]),K5=new Uint8Array([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]),X5=(t,e,n,r,i,a,l,s)=>{const u=s.bits;let h=0,f=0,v=0,b=0,p=0,S=0,k=0,C=0,_=0,O=0,U,R,nt,dt,et,$=null,D;const J=new Uint16Array(Ea+1),x=new Uint16Array(Ea+1);let j=null,W,q,Q;for(h=0;h<=Ea;h++)J[h]=0;for(f=0;f<r;f++)J[e[n+f]]++;for(p=u,b=Ea;b>=1&&J[b]===0;b--);if(p>b&&(p=b),b===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,s.bits=1,0;for(v=1;v<b&&J[v]===0;v++);for(p<v&&(p=v),C=1,h=1;h<=Ea;h++)if(C<<=1,C-=J[h],C<0)return-1;if(C>0&&(t===Sh||b!==1))return-1;for(x[1]=0,h=1;h<Ea;h++)x[h+1]=x[h]+J[h];for(f=0;f<r;f++)e[n+f]!==0&&(l[x[e[n+f]]++]=f);if(t===Sh?($=j=l,D=20):t===rc?($=G5,j=Y5,D=257):($=Z5,j=K5,D=0),O=0,f=0,h=v,et=a,S=p,k=0,nt=-1,_=1<<p,dt=_-1,t===rc&&_>_h||t===Ah&&_>Nh)return 1;for(;;){W=h-k,l[f]+1<D?(q=0,Q=l[f]):l[f]>=D?(q=j[l[f]-D],Q=$[l[f]-D]):(q=96,Q=0),U=1<<h-k,R=1<<S,v=R;do R-=U,i[et+(O>>k)+R]=W<<24|q<<16|Q|0;while(R!==0);for(U=1<<h-1;O&U;)U>>=1;if(U!==0?(O&=U-1,O+=U):O=0,f++,--J[h]===0){if(h===b)break;h=e[n+l[f]]}if(h>p&&(O&dt)!==nt){for(k===0&&(k=p),et+=v,S=h-k,C=1<<S;S+k<b&&(C-=J[S+k],!(C<=0));)S++,C<<=1;if(_+=1<<S,t===rc&&_>_h||t===Ah&&_>Nh)return 1;nt=O&dt,i[nt]=p<<24|S<<16|et-a|0}}return O!==0&&(i[et+O]=h-k<<24|64<<16|0),s.bits=p,0};var jo=X5;const J5=0,$d=1,Vd=2,{Z_FINISH:Lh,Z_BLOCK:Q5,Z_TREES:js,Z_OK:na,Z_STREAM_END:tg,Z_NEED_DICT:eg,Z_STREAM_ERROR:dr,Z_DATA_ERROR:Gd,Z_MEM_ERROR:Yd,Z_BUF_ERROR:ng,Z_DEFLATED:kh}=Ho,rl=16180,Ph=16181,Ch=16182,Eh=16183,jh=16184,Ih=16185,Fh=16186,Rh=16187,Oh=16188,Th=16189,Ys=16190,ti=16191,ic=16192,Dh=16193,ac=16194,Mh=16195,Bh=16196,qh=16197,zh=16198,Is=16199,Fs=16200,Uh=16201,Hh=16202,Wh=16203,$h=16204,Vh=16205,oc=16206,Gh=16207,Yh=16208,We=16209,Zd=16210,Kd=16211,rg=852,ig=592,ag=15,og=ag,Zh=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function sg(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ia=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<rl||e.mode>Kd?1:0},Xd=t=>{if(ia(t))return dr;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=rl,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(rg),e.distcode=e.distdyn=new Int32Array(ig),e.sane=1,e.back=-1,na},Jd=t=>{if(ia(t))return dr;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Xd(t)},Qd=(t,e)=>{let n;if(ia(t))return dr;const r=t.state;return e<0?(n=0,e=-e):(n=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?dr:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,Jd(t))},t1=(t,e)=>{if(!t)return dr;const n=new sg;t.state=n,n.strm=t,n.window=null,n.mode=rl;const r=Qd(t,e);return r!==na&&(t.state=null),r},lg=t=>t1(t,og);let Kh=!0,sc,lc;const cg=t=>{if(Kh){sc=new Int32Array(512),lc=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(jo($d,t.lens,0,288,sc,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;jo(Vd,t.lens,0,32,lc,0,t.work,{bits:5}),Kh=!1}t.lencode=sc,t.lenbits=9,t.distcode=lc,t.distbits=5},e1=(t,e,n,r)=>{let i;const a=t.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(e.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(e.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(e.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},ug=(t,e)=>{let n,r,i,a,l,s,u,h,f,v,b,p,S,k,C=0,_,O,U,R,nt,dt,et,$;const D=new Uint8Array(4);let J,x;const j=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ia(t)||!t.output||!t.input&&t.avail_in!==0)return dr;n=t.state,n.mode===ti&&(n.mode=ic),l=t.next_out,i=t.output,u=t.avail_out,a=t.next_in,r=t.input,s=t.avail_in,h=n.hold,f=n.bits,v=s,b=u,$=na;t:for(;;)switch(n.mode){case rl:if(n.wrap===0){n.mode=ic;break}for(;f<16;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if(n.wrap&2&&h===35615){n.wbits===0&&(n.wbits=15),n.check=0,D[0]=h&255,D[1]=h>>>8&255,n.check=vn(n.check,D,2,0),h=0,f=0,n.mode=Ph;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((h&255)<<8)+(h>>8))%31){t.msg="incorrect header check",n.mode=We;break}if((h&15)!==kh){t.msg="unknown compression method",n.mode=We;break}if(h>>>=4,f-=4,et=(h&15)+8,n.wbits===0&&(n.wbits=et),et>15||et>n.wbits){t.msg="invalid window size",n.mode=We;break}n.dmax=1<<n.wbits,n.flags=0,t.adler=n.check=1,n.mode=h&512?Th:ti,h=0,f=0;break;case Ph:for(;f<16;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if(n.flags=h,(n.flags&255)!==kh){t.msg="unknown compression method",n.mode=We;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=We;break}n.head&&(n.head.text=h>>8&1),n.flags&512&&n.wrap&4&&(D[0]=h&255,D[1]=h>>>8&255,n.check=vn(n.check,D,2,0)),h=0,f=0,n.mode=Ch;case Ch:for(;f<32;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}n.head&&(n.head.time=h),n.flags&512&&n.wrap&4&&(D[0]=h&255,D[1]=h>>>8&255,D[2]=h>>>16&255,D[3]=h>>>24&255,n.check=vn(n.check,D,4,0)),h=0,f=0,n.mode=Eh;case Eh:for(;f<16;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}n.head&&(n.head.xflags=h&255,n.head.os=h>>8),n.flags&512&&n.wrap&4&&(D[0]=h&255,D[1]=h>>>8&255,n.check=vn(n.check,D,2,0)),h=0,f=0,n.mode=jh;case jh:if(n.flags&1024){for(;f<16;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}n.length=h,n.head&&(n.head.extra_len=h),n.flags&512&&n.wrap&4&&(D[0]=h&255,D[1]=h>>>8&255,n.check=vn(n.check,D,2,0)),h=0,f=0}else n.head&&(n.head.extra=null);n.mode=Ih;case Ih:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(et=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),et)),n.flags&512&&n.wrap&4&&(n.check=vn(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break t;n.length=0,n.mode=Fh;case Fh:if(n.flags&2048){if(s===0)break t;p=0;do et=r[a+p++],n.head&&et&&n.length<65536&&(n.head.name+=String.fromCharCode(et));while(et&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=vn(n.check,r,p,a)),s-=p,a+=p,et)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=Rh;case Rh:if(n.flags&4096){if(s===0)break t;p=0;do et=r[a+p++],n.head&&et&&n.length<65536&&(n.head.comment+=String.fromCharCode(et));while(et&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=vn(n.check,r,p,a)),s-=p,a+=p,et)break t}else n.head&&(n.head.comment=null);n.mode=Oh;case Oh:if(n.flags&512){for(;f<16;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if(n.wrap&4&&h!==(n.check&65535)){t.msg="header crc mismatch",n.mode=We;break}h=0,f=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=ti;break;case Th:for(;f<32;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}t.adler=n.check=Zh(h),h=0,f=0,n.mode=Ys;case Ys:if(n.havedict===0)return t.next_out=l,t.avail_out=u,t.next_in=a,t.avail_in=s,n.hold=h,n.bits=f,eg;t.adler=n.check=1,n.mode=ti;case ti:if(e===Q5||e===js)break t;case ic:if(n.last){h>>>=f&7,f-=f&7,n.mode=oc;break}for(;f<3;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}switch(n.last=h&1,h>>>=1,f-=1,h&3){case 0:n.mode=Dh;break;case 1:if(cg(n),n.mode=Is,e===js){h>>>=2,f-=2;break t}break;case 2:n.mode=Bh;break;case 3:t.msg="invalid block type",n.mode=We}h>>>=2,f-=2;break;case Dh:for(h>>>=f&7,f-=f&7;f<32;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if((h&65535)!==(h>>>16^65535)){t.msg="invalid stored block lengths",n.mode=We;break}if(n.length=h&65535,h=0,f=0,n.mode=ac,e===js)break t;case ac:n.mode=Mh;case Mh:if(p=n.length,p){if(p>s&&(p=s),p>u&&(p=u),p===0)break t;i.set(r.subarray(a,a+p),l),s-=p,a+=p,u-=p,l+=p,n.length-=p;break}n.mode=ti;break;case Bh:for(;f<14;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if(n.nlen=(h&31)+257,h>>>=5,f-=5,n.ndist=(h&31)+1,h>>>=5,f-=5,n.ncode=(h&15)+4,h>>>=4,f-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=We;break}n.have=0,n.mode=qh;case qh:for(;n.have<n.ncode;){for(;f<3;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}n.lens[j[n.have++]]=h&7,h>>>=3,f-=3}for(;n.have<19;)n.lens[j[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,J={bits:n.lenbits},$=jo(J5,n.lens,0,19,n.lencode,0,n.work,J),n.lenbits=J.bits,$){t.msg="invalid code lengths set",n.mode=We;break}n.have=0,n.mode=zh;case zh:for(;n.have<n.nlen+n.ndist;){for(;C=n.lencode[h&(1<<n.lenbits)-1],_=C>>>24,O=C>>>16&255,U=C&65535,!(_<=f);){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if(U<16)h>>>=_,f-=_,n.lens[n.have++]=U;else{if(U===16){for(x=_+2;f<x;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if(h>>>=_,f-=_,n.have===0){t.msg="invalid bit length repeat",n.mode=We;break}et=n.lens[n.have-1],p=3+(h&3),h>>>=2,f-=2}else if(U===17){for(x=_+3;f<x;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}h>>>=_,f-=_,et=0,p=3+(h&7),h>>>=3,f-=3}else{for(x=_+7;f<x;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}h>>>=_,f-=_,et=0,p=11+(h&127),h>>>=7,f-=7}if(n.have+p>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=We;break}for(;p--;)n.lens[n.have++]=et}}if(n.mode===We)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=We;break}if(n.lenbits=9,J={bits:n.lenbits},$=jo($d,n.lens,0,n.nlen,n.lencode,0,n.work,J),n.lenbits=J.bits,$){t.msg="invalid literal/lengths set",n.mode=We;break}if(n.distbits=6,n.distcode=n.distdyn,J={bits:n.distbits},$=jo(Vd,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,J),n.distbits=J.bits,$){t.msg="invalid distances set",n.mode=We;break}if(n.mode=Is,e===js)break t;case Is:n.mode=Fs;case Fs:if(s>=6&&u>=258){t.next_out=l,t.avail_out=u,t.next_in=a,t.avail_in=s,n.hold=h,n.bits=f,V5(t,b),l=t.next_out,i=t.output,u=t.avail_out,a=t.next_in,r=t.input,s=t.avail_in,h=n.hold,f=n.bits,n.mode===ti&&(n.back=-1);break}for(n.back=0;C=n.lencode[h&(1<<n.lenbits)-1],_=C>>>24,O=C>>>16&255,U=C&65535,!(_<=f);){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if(O&&!(O&240)){for(R=_,nt=O,dt=U;C=n.lencode[dt+((h&(1<<R+nt)-1)>>R)],_=C>>>24,O=C>>>16&255,U=C&65535,!(R+_<=f);){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}h>>>=R,f-=R,n.back+=R}if(h>>>=_,f-=_,n.back+=_,n.length=U,O===0){n.mode=Vh;break}if(O&32){n.back=-1,n.mode=ti;break}if(O&64){t.msg="invalid literal/length code",n.mode=We;break}n.extra=O&15,n.mode=Uh;case Uh:if(n.extra){for(x=n.extra;f<x;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}n.length+=h&(1<<n.extra)-1,h>>>=n.extra,f-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Hh;case Hh:for(;C=n.distcode[h&(1<<n.distbits)-1],_=C>>>24,O=C>>>16&255,U=C&65535,!(_<=f);){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if(!(O&240)){for(R=_,nt=O,dt=U;C=n.distcode[dt+((h&(1<<R+nt)-1)>>R)],_=C>>>24,O=C>>>16&255,U=C&65535,!(R+_<=f);){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}h>>>=R,f-=R,n.back+=R}if(h>>>=_,f-=_,n.back+=_,O&64){t.msg="invalid distance code",n.mode=We;break}n.offset=U,n.extra=O&15,n.mode=Wh;case Wh:if(n.extra){for(x=n.extra;f<x;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}n.offset+=h&(1<<n.extra)-1,h>>>=n.extra,f-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=We;break}n.mode=$h;case $h:if(u===0)break t;if(p=b-u,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=We;break}p>n.wnext?(p-=n.wnext,S=n.wsize-p):S=n.wnext-p,p>n.length&&(p=n.length),k=n.window}else k=i,S=l-n.offset,p=n.length;p>u&&(p=u),u-=p,n.length-=p;do i[l++]=k[S++];while(--p);n.length===0&&(n.mode=Fs);break;case Vh:if(u===0)break t;i[l++]=n.length,u--,n.mode=Fs;break;case oc:if(n.wrap){for(;f<32;){if(s===0)break t;s--,h|=r[a++]<<f,f+=8}if(b-=u,t.total_out+=b,n.total+=b,n.wrap&4&&b&&(t.adler=n.check=n.flags?vn(n.check,i,b,l-b):Do(n.check,i,b,l-b)),b=u,n.wrap&4&&(n.flags?h:Zh(h))!==n.check){t.msg="incorrect data check",n.mode=We;break}h=0,f=0}n.mode=Gh;case Gh:if(n.wrap&&n.flags){for(;f<32;){if(s===0)break t;s--,h+=r[a++]<<f,f+=8}if(n.wrap&4&&h!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=We;break}h=0,f=0}n.mode=Yh;case Yh:$=tg;break t;case We:$=Gd;break t;case Zd:return Yd;case Kd:default:return dr}return t.next_out=l,t.avail_out=u,t.next_in=a,t.avail_in=s,n.hold=h,n.bits=f,(n.wsize||b!==t.avail_out&&n.mode<We&&(n.mode<oc||e!==Lh))&&e1(t,t.output,t.next_out,b-t.avail_out),v-=t.avail_in,b-=t.avail_out,t.total_in+=v,t.total_out+=b,n.total+=b,n.wrap&4&&b&&(t.adler=n.check=n.flags?vn(n.check,i,b,t.next_out-b):Do(n.check,i,b,t.next_out-b)),t.data_type=n.bits+(n.last?64:0)+(n.mode===ti?128:0)+(n.mode===Is||n.mode===ac?256:0),(v===0&&b===0||e===Lh)&&$===na&&($=ng),$},hg=t=>{if(ia(t))return dr;let e=t.state;return e.window&&(e.window=null),t.state=null,na},fg=(t,e)=>{if(ia(t))return dr;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,na):dr},dg=(t,e)=>{const n=e.length;let r,i,a;return ia(t)||(r=t.state,r.wrap!==0&&r.mode!==Ys)?dr:r.mode===Ys&&(i=1,i=Do(i,e,n,0),i!==r.check)?Gd:(a=e1(t,e,n,n),a?(r.mode=Zd,Yd):(r.havedict=1,na))};var pg=Jd,gg=Qd,mg=Xd,vg=lg,bg=t1,wg=ug,yg=hg,xg=fg,_g=dg,Ng="pako inflate (from Nodeca project)",ni={inflateReset:pg,inflateReset2:gg,inflateResetKeep:mg,inflateInit:vg,inflateInit2:bg,inflate:wg,inflateEnd:yg,inflateGetHeader:xg,inflateSetDictionary:_g,inflateInfo:Ng};function Sg(){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=!1}var Ag=Sg;const n1=Object.prototype.toString,{Z_NO_FLUSH:Lg,Z_FINISH:kg,Z_OK:qo,Z_STREAM_END:cc,Z_NEED_DICT:uc,Z_STREAM_ERROR:Pg,Z_DATA_ERROR:Xh,Z_MEM_ERROR:Cg}=Ho;function $o(t){this.options=nl.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Hd,this.strm.avail_out=0;let n=ni.inflateInit2(this.strm,e.windowBits);if(n!==qo)throw new Error(Ha[n]);if(this.header=new Ag,ni.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Bo.string2buf(e.dictionary):n1.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=ni.inflateSetDictionary(this.strm,e.dictionary),n!==qo)))throw new Error(Ha[n])}$o.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,l,s;if(this.ended)return!1;for(e===~~e?l=e:l=e===!0?kg:Lg,n1.call(t)==="[object ArrayBuffer]"?n.input=new 
vendor: 10,086 bytes, line 32
32Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=ni.inflate(n,l),a===uc&&i&&(a=ni.inflateSetDictionary(n,i),a===qo?a=ni.inflate(n,l):a===Xh&&(a=uc));n.avail_in>0&&a===cc&&n.state.wrap>0&&t[n.next_in]!==0;)ni.inflateReset(n),a=ni.inflate(n,l);switch(a){case Pg:case Xh:case uc:case Cg:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===cc))if(this.options.to==="string"){let u=Bo.utf8border(n.output,n.next_out),h=n.next_out-u,f=Bo.buf2string(n.output,u);n.next_out=h,n.avail_out=r-h,h&&n.output.set(n.output.subarray(u,u+h),0),this.onData(f)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===qo&&s===0)){if(a===cc)return a=ni.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};$o.prototype.onData=function(t){this.chunks.push(t)};$o.prototype.onEnd=function(t){t===qo&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=nl.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function cu(t,e){const n=new $o(e);if(n.push(t),n.err)throw n.msg||Ha[n.err];return n.result}function Eg(t,e){return e=e||{},e.raw=!0,cu(t,e)}var jg=$o,Ig=cu,Fg=Eg,Rg=cu,Og=Ho,Tg={Inflate:jg,inflate:Ig,inflateRaw:Fg,ungzip:Rg,constants:Og};const{Inflate:Dg,inflate:Mg,inflateRaw:tb,ungzip:eb}=Tg;var Jh=Dg,Bg=Mg;const r1=[];for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e&1?e=3988292384^e>>>1:e=e>>>1;r1[t]=e}const Qh=4294967295;function qg(t,e,n){let r=t;for(let i=0;i<n;i++)r=r1[(r^e[i])&255]^r>>>8;return r}function zg(t,e){return(qg(Qh,t,e)^Qh)>>>0}function tf(t,e,n){const r=t.readUint32(),i=zg(new Uint8Array(t.buffer,t.byteOffset+t.offset-e-4,e),e);if(i!==r)throw new Error(`CRC mismatch for chunk ${n}. Expected ${r}, found ${i}`)}function i1(t,e,n){for(let r=0;r<n;r++)e[r]=t[r]}function a1(t,e,n,r){let i=0;for(;i<r;i++)e[i]=t[i];for(;i<n;i++)e[i]=t[i]+e[i-r]&255}function o1(t,e,n,r){let i=0;if(n.length===0)for(;i<r;i++)e[i]=t[i];else for(;i<r;i++)e[i]=t[i]+n[i]&255}function s1(t,e,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)e[a]=t[a];for(;a<r;a++)e[a]=t[a]+(e[a-i]>>1)&255}else{for(;a<i;a++)e[a]=t[a]+(n[a]>>1)&255;for(;a<r;a++)e[a]=t[a]+(e[a-i]+n[a]>>1)&255}}function l1(t,e,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)e[a]=t[a];for(;a<r;a++)e[a]=t[a]+e[a-i]&255}else{for(;a<i;a++)e[a]=t[a]+n[a]&255;for(;a<r;a++)e[a]=t[a]+Ug(e[a-i],n[a],n[a-i])&255}}function Ug(t,e,n){const r=t+e-n,i=Math.abs(r-t),a=Math.abs(r-e),l=Math.abs(r-n);return i<=a&&i<=l?t:a<=l?e:n}function Hg(t,e,n,r,i,a){switch(t){case 0:i1(e,n,i);break;case 1:a1(e,n,i,a);break;case 2:o1(e,n,r,i);break;case 3:s1(e,n,r,i,a);break;case 4:l1(e,n,r,i,a);break;default:throw new Error(`Unsupported filter: ${t}`)}}const Wg=new Uint16Array([255]),$g=new Uint8Array(Wg.buffer),Vg=$g[0]===255;function Gg(t){const{data:e,width:n,height:r,channels:i,depth:a}=t,l=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],s=Math.ceil(a/8)*i,u=new Uint8Array(r*n*s);let h=0;for(let f=0;f<7;f++){const v=l[f],b=Math.ceil((n-v.x)/v.xStep),p=Math.ceil((r-v.y)/v.yStep);if(b<=0||p<=0)continue;const S=b*s,k=new Uint8Array(S);for(let C=0;C<p;C++){const _=e[h++],O=e.subarray(h,h+S);h+=S;const U=new Uint8Array(S);Hg(_,O,U,k,S,s),k.set(U);for(let R=0;R<b;R++){const nt=v.x+R*v.xStep,dt=v.y+C*v.yStep;if(!(nt>=n||dt>=r))for(let et=0;et<s;et++)u[(dt*n+nt)*s+et]=U[R*s+et]}}}if(a===16){const f=new Uint16Array(u.buffer);if(Vg)for(let v=0;v<f.length;v++)f[v]=Yg(f[v]);return f}else return u}function Yg(t){return(t&255)<<8|t>>8&255}const Zg=new Uint16Array([255]),Kg=new Uint8Array(Zg.buffer),Xg=Kg[0]===255,Jg=new Uint8Array(0);function ef(t){const{data:e,width:n,height:r,channels:i,depth:a}=t,l=Math.ceil(a/8)*i,s=Math.ceil(a/8*i*n),u=new Uint8Array(r*s);let h=Jg,f=0,v,b;for(let p=0;p<r;p++){switch(v=e.subarray(f+1,f+1+s),b=u.subarray(p*s,(p+1)*s),e[f]){case 0:i1(v,b,s);break;case 1:a1(v,b,s,l);break;case 2:o1(v,b,h,s);break;case 3:s1(v,b,h,s,l);break;case 4:l1(v,b,h,s,l);break;default:throw new Error(`Unsupported filter: ${e[f]}`)}h=b,f+=s+1}if(a===16){const p=new Uint16Array(u.buffer);if(Xg)for(let S=0;S<p.length;S++)p[S]=Qg(p[S]);return p}else return u}function Qg(t){return(t&255)<<8|t>>8&255}const Bs=Uint8Array.of(137,80,78,71,13,10,26,10);function nf(t){if(!tm(t.readBytes(Bs.length)))throw new Error("wrong PNG signature")}function tm(t){if(t.length<Bs.length)return!1;for(let e=0;e<Bs.length;e++)if(t[e]!==Bs[e])return!1;return!0}const em="tEXt",nm=0,c1=new TextDecoder("latin1");function rm(t){if(am(t),t.length===0||t.length>79)throw new Error("keyword length must be between 1 and 79")}const im=/^[\u0000-\u00FF]*$/;function am(t){if(!im.test(t))throw new Error("invalid latin1 text")}function om(t,e,n){const r=u1(e);t[r]=sm(e,n-r.length-1)}function u1(t){for(t.mark();t.readByte()!==nm;);const e=t.offset;t.reset();const n=c1.decode(t.readBytes(e-t.offset-1));return t.skip(1),rm(n),n}function sm(t,e){return c1.decode(t.readBytes(e))}const tr={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},hc={UNKNOWN:-1,DEFLATE:0},rf={UNKNOWN:-1,ADAPTIVE:0},fc={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Rs={NONE:0,BACKGROUND:1,PREVIOUS:2},dc={SOURCE:0,OVER:1};class lm extends nu{constructor(n,r={}){super(n);Ee(this,"_checkCrc");Ee(this,"_inflator");Ee(this,"_png");Ee(this,"_apng");Ee(this,"_end");Ee(this,"_hasPalette");Ee(this,"_palette");Ee(this,"_hasTransparency");Ee(this,"_transparency");Ee(this,"_compressionMethod");Ee(this,"_filterMethod");Ee(this,"_interlaceMethod");Ee(this,"_colorType");Ee(this,"_isAnimated");Ee(this,"_numberOfFrames");Ee(this,"_numberOfPlays");Ee(this,"_frames");Ee(this,"_writingDataChunks");const{checkCrc:i=!1}=r;this._checkCrc=i,this._inflator=new Jh,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=hc.UNKNOWN,this._filterMethod=rf.UNKNOWN,this._interlaceMethod=fc.UNKNOWN,this._colorType=tr.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(nf(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeChunk(n,r)}return this.decodeImage(),this._png}decodeApng(){for(nf(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(n,r)}return this.decodeApngImage(),this._apng}decodeChunk(n,r){const i=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case em:om(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?tf(this,n+4,r):this.skip(4)}decodeApngChunk(n,r){const i=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,r),this.offset=i+n;break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?tf(this,n+4,r):this.skip(4)}decodeIHDR(){const n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=cm(this.readUint8());const r=this.readUint8();this._colorType=r;let i;switch(r){case tr.GREYSCALE:i=1;break;case tr.TRUECOLOUR:i=3;break;case tr.INDEXED_COLOUR:i=1;break;case tr.GREYSCALE_ALPHA:i=2;break;case tr.TRUECOLOUR_ALPHA:i=4;break;case tr.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==hc.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);const r=n/3;this._hasPalette=!0;const i=[];this._palette=i;for(let a=0;a<r;a++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;const r=n,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let r=n,i=this.offset+this.byteOffset;if(i+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case tr.GREYSCALE:case tr.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let r=0;r<n/2;r++)this._transparency[r]=this.readUint16();break}case tr.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alph
32a values than there are palette colors (${n} vs ${this._palette.length})`);let r=0;for(;r<n;r++){const i=this.readByte();this._palette[r].push(i)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case tr.UNKNOWN:case tr.GREYSCALE_ALPHA:case tr.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){const r=u1(this),i=this.readUint8();if(i!==hc.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const a=this.readBytes(n-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:Bg(a)}}decodepHYs(){const n=this.readUint32(),r=this.readUint32(),i=this.readByte();this._png.resolution={x:n,y:r,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let n=0;n<this._numberOfFrames;n++){const r={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(n);if(i){if(i.data=ef({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),n===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)r.data=i.data;else{const a=this._apng.frames.at(n-1);this.disposeFrame(i,a,r),this.addFrameDataToCanvas(r,i)}this._apng.frames.push(r)}}return this._apng}disposeFrame(n,r,i){switch(n.disposeOp){case Rs.NONE:break;case Rs.BACKGROUND:for(let a=0;a<this._png.height;a++)for(let l=0;l<this._png.width;l++){const s=(a*n.width+l)*this._png.channels;for(let u=0;u<this._png.channels;u++)i.data[s+u]=0}break;case Rs.PREVIOUS:i.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,r){const i=1<<this._png.depth,a=(l,s)=>{const u=((l+r.yOffset)*this._png.width+r.xOffset+s)*this._png.channels,h=(l*r.width+s)*this._png.channels;return{index:u,frameIndex:h}};switch(r.blendOp){case dc.SOURCE:for(let l=0;l<r.height;l++)for(let s=0;s<r.width;s++){const{index:u,frameIndex:h}=a(l,s);for(let f=0;f<this._png.channels;f++)n.data[u+f]=r.data[h+f]}break;case dc.OVER:for(let l=0;l<r.height;l++)for(let s=0;s<r.width;s++){const{index:u,frameIndex:h}=a(l,s);for(let f=0;f<this._png.channels;f++){const v=r.data[h+this._png.channels-1]/i,b=f%(this._png.channels-1)===0?1:r.data[h+f],p=Math.floor(v*b+(1-v)*n.data[u+f]);n.data[u+f]+=p}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var r;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const n=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==rf.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===fc.NO_INTERLACE)this._png.data=ef({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===fc.ADAM7)this._png.data=Gg({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const n=this._inflator.result,r=this._frames.at(-1);r?r.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Rs.NONE,blendOp:dc.SOURCE,data:n}),this._inflator=new Jh,this._writingDataChunks=!1}}function cm(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16)throw new Error(`invalid bit depth: ${t}`);return t}var af;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"})(af||(af={}));function um(t,e){return new lm(t,e).decode()}var oe=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function pc(){oe.console&&typeof oe.console.log=="function"&&oe.console.log.apply(oe.console,arguments)}var Te={log:pc,warn:function(t){oe.console&&(typeof oe.console.warn=="function"?oe.console.warn.apply(oe.console,arguments):pc.call(null,arguments))},error:function(t){oe.console&&(typeof oe.console.error=="function"?oe.console.error.apply(oe.console,arguments):pc(t))}};function gc(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){Yi(r.response,e,n)},r.onerror=function(){Te.error("could not download file")},r.send()}function of(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Os(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");
vendor: 3,407 bytes, lines 32-37
32e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var Yi=oe.saveAs||((typeof window>"u"?"undefined":je(window))!=="object"||window!==oe?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,e,n){var r=oe.URL||oe.webkitURL,i=document.createElement("a");e=e||t.name||"download",i.download=e,i.rel="noopener",typeof t=="string"?(i.href=t,i.origin!==location.origin?of(i.href)?gc(t,e,n):Os(i,i.target="_blank"):Os(i)):(i.href=r.createObjectURL(t),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){Os(i)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download",typeof t=="string")if(of(t))gc(t,e,n);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout(function(){Os(r)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:je(a)!=="object"&&(Te.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(t,n),e)}:function(t,e,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof t=="string")return gc(t,e,n);var i=t.type==="application/octet-stream",a=/constructor/i.test(oe.HTMLElement)||oe.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&a)&&(typeof FileReader>"u"?"undefined":je(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var f=s.result;f=l?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=f:location=f,r=null},s.readAsDataURL(t)}else{var u=oe.URL||oe.webkitURL,h=u.createObjectURL(t);r?r.location=h:location.href=h,r=null,setTimeout(function(){u.revokeObjectURL(h)},4e4)}});/**
33 * A class to parse color values
34 * @author Stoyan Stefanov <[email protected]>
35 * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
36 * @license Use it if you like it
37 */function h1(t){var e;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={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",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee9
370",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",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:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",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",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,a=n[r].process,l=i.exec(t);l&&(e=a(l),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var s=this.r.toString(16),u=this.g.toString(16),h=this.b.toString(16);return s.length==1&&(s="0"+s),u.length==1&&(u="0"+u),h.length==1&&(h="0"+h),"#"+s+u+h}}var qs=oe.atob.bind(oe),sf=oe.btoa.bind(oe);/**
38 * @license
39 * Joseph Myers does not specify a particular license for his work.
40 *
41 * Author: Joseph Myers
42 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
43 *
44 * Modified by: Owen Leong
45 */function mc(t,e){var n=t[0],r=t[1],i=t[2],a=t[3];n=En(n,r,i,a,e[0],7,-680876936),a=En(a,n,r,i,e[1],12,-389564586),i=En(i,a,n,r,e[2],17,606105819),r=En(r,i,a,n,e[3],22,-1044525330),n=En(n,r,i,a,e[4],7,-176418897),a=En(a,n,r,i,e[5],12,1200080426),i=En(i,a,n,r,e[6],17,-1473231341),r=En(r,i,a,n,e[7],22,-45705983),n=En(n,r,i,a,e[8],7,1770035416),a=En(a,n,r,i,e[9],12,-1958414417),i=En(i,a,n,r,e[10],17,-42063),r=En(r,i,a,n,e[11],22,-1990404162),n=En(n,r,i,a,e[12],7,1804603682),a=En(a,n,r,i,e[13],12,-40341101),i=En(i,a,n,r,e[14],17,-1502002290),n=jn(n,r=En(r,i,a,n,e[15],22,1236535329),i,a,e[1],5,-165796510),a=jn(a,n,r,i,e[6],9,-1069501632),i=jn(i,a,n,r,e[11],14,643717713),r=jn(r,i,a,n,e[0],20,-373897302),n=jn(n,r,i,a,e[5],5,-701558691),a=jn(a,n,r,i,e[10],9,38016083),i=jn(i,a,n,r,e[15],14,-660478335),r=jn(r,i,a,n,e[4],20,-405537848),n=jn(n,r,i,a,e[9],5,568446438),a=jn(a,n,r,i,e[14],9,-1019803690),i=jn(i,a,n,r,e[3],14,-187363961),r=jn(r,i,a,n,e[8],20,1163531501),n=jn(n,r,i,a,e[13],5,-1444681467),a=jn(a,n,r,i,e[2],9,-51403784),i=jn(i,a,n,r,e[7],14,1735328473),n=In(n,r=jn(r,i,a,n,e[12],20,-1926607734),i,a,e[5],4,-378558),a=In(a,n,r,i,e[8],11,-2022574463),i=In(i,a,n,r,e[11],16,1839030562),r=In(r,i,a,n,e[14],23,-35309556),n=In(n,r,i,a,e[1],4,-1530992060),a=In(a,n,r,i,e[4],11,1272893353),i=In(i,a,n,r,e[7],16,-155497632),r=In(r,i,a,n,e[10],23,-1094730640),n=In(n,r,i,a,e[13],4,681279174),a=In(a,n,r,i,e[0],11,-358537222),i=In(i,a,n,r,e[3],16,-722521979),r=In(r,i,a,n,e[6],23,76029189),n=In(n,r,i,a,e[9],4,
vendor: 8,574 bytes, lines 45-62
45-640364487),a=In(a,n,r,i,e[12],11,-421815835),i=In(i,a,n,r,e[15],16,530742520),n=Fn(n,r=In(r,i,a,n,e[2],23,-995338651),i,a,e[0],6,-198630844),a=Fn(a,n,r,i,e[7],10,1126891415),i=Fn(i,a,n,r,e[14],15,-1416354905),r=Fn(r,i,a,n,e[5],21,-57434055),n=Fn(n,r,i,a,e[12],6,1700485571),a=Fn(a,n,r,i,e[3],10,-1894986606),i=Fn(i,a,n,r,e[10],15,-1051523),r=Fn(r,i,a,n,e[1],21,-2054922799),n=Fn(n,r,i,a,e[8],6,1873313359),a=Fn(a,n,r,i,e[15],10,-30611744),i=Fn(i,a,n,r,e[6],15,-1560198380),r=Fn(r,i,a,n,e[13],21,1309151649),n=Fn(n,r,i,a,e[4],6,-145523070),a=Fn(a,n,r,i,e[11],10,-1120210379),i=Fn(i,a,n,r,e[2],15,718787259),r=Fn(r,i,a,n,e[9],21,-343485551),t[0]=Si(n,t[0]),t[1]=Si(r,t[1]),t[2]=Si(i,t[2]),t[3]=Si(a,t[3])}function il(t,e,n,r,i,a){return e=Si(Si(e,t),Si(r,a)),Si(e<<i|e>>>32-i,n)}function En(t,e,n,r,i,a,l){return il(e&n|~e&r,t,e,i,a,l)}function jn(t,e,n,r,i,a,l){return il(e&r|n&~r,t,e,i,a,l)}function In(t,e,n,r,i,a,l){return il(e^n^r,t,e,i,a,l)}function Fn(t,e,n,r,i,a,l){return il(n^(e|~r),t,e,i,a,l)}function f1(t){var e,n=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)mc(r,hm(t.substring(e-64,e)));t=t.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(mc(r,i),e=0;e<16;e++)i[e]=0;return i[14]=8*n,mc(r,i),r}function hm(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}var lf="0123456789abcdef".split("");function fm(t){for(var e="",n=0;n<4;n++)e+=lf[t>>8*n+4&15]+lf[t>>8*n&15];return e}function dm(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function Uc(t){return f1(t).map(dm).join("")}var pm=function(t){for(var e=0;e<t.length;e++)t[e]=fm(t[e]);return t.join("")}(f1("hello"))!="5d41402abc4b2a76b9719d911017c592";function Si(t,e){if(pm){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}return t+e&4294967295}/**
46 * @license
47 * FPDF is released under a permissive license: there is no usage restriction.
48 * You may embed it freely in your application (commercial or not), with or
49 * without modifications.
50 *
51 * Reference: http://www.fpdf.org/en/script/script37.php
52 */function Hc(t,e){var n,r,i,a;if(t!==n){for(var l=(i=t,a=1+(256/t.length|0),new Array(a+1).join(i)),s=[],u=0;u<256;u++)s[u]=u;var h=0;for(u=0;u<256;u++){var f=s[u];h=(h+f+l.charCodeAt(u))%256,s[u]=s[h],s[h]=f}n=t,r=s}else s=r;var v=e.length,b=0,p=0,S="";for(u=0;u<v;u++)p=(p+(f=s[b=(b+1)%256]))%256,s[b]=s[p],s[p]=f,l=s[(s[b]+s[p])%256],S+=String.fromCharCode(e.charCodeAt(u)^l);return S}/**
53 * @license
54 * Licensed under the MIT License.
55 * http://opensource.org/licenses/mit-license
56 * Author: Owen Leong (@owenl131)
57 * Date: 15 Oct 2020
58 * References:
59 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
60 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
61 * http://www.fpdf.org/en/script/script37.php
62 */var cf={print:4,modify:8,copy:16,"annot-forms":32};function Fa(t,e,n,r){this.v=1,this.r=2;var i=192;t.forEach(function(s){if(cf.perm!==void 0)throw new Error("Invalid permission: "+s);i+=cf[s]}),this.padding="(¿N^NuŠAd\0NVÿú�\b..\0¶Ðh>€/\f©þdSiz";var a=(e+this.padding).substr(0,32),l=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,l),this.P=-(1+(255^i)),this.encryptionKey=Uc(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=Hc(this.encryptionKey,this.padding)}function Ra(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",n=t.length,r=0;r<n;r++){var i=t.charCodeAt(r);e+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):t[r]}return e}function uf(t){if(je(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(n,r,i){if(i=i||!1,typeof n!="string"||typeof r!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(n)||(e[n]={});var a=Math.random().toString(35);return e[n][a]=[r,!!i],a},this.unsubscribe=function(n){for(var r in e)if(e[r][n])return delete e[r][n],Object.keys(e[r]).length===0&&delete e[r],!0;return!1},this.publish=function(n){if(e.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var a in e[n]){var l=e[n][a];try{l[0].apply(t,r)}catch(s){oe.console&&Te.error("jsPDF PubSub Error",s.message,s)}l[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function Zs(t){if(!(this instanceof Zs))return new Zs(t);var e="opacity,stroke-opacity".split(",");for(var n in t)t.hasOwnProperty(n)&&e.indexOf(n)>=0&&(this[n]=t[n]);this.id="",this.objectNumber=-1}function d1(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function Zi(t,e,n,r,i){if(!(this instanceof Zi))return new Zi(t,e,n,r,i);this.type=t==="axial"?2:3,this.coords=e,this.colors=n,d1.call(this,r,i)}function Oa(t,e,n,r,i){if(!(this instanceof Oa))return new Oa(t,e,n,r,i);this.boundingBox=t,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,d1.call(this,r,i)}function te(t){var e,n=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],i=arguments[2],a=arguments[3],l=[],s=1,u=16,h="S",f=null;je(t=t||{})==="object"&&(n=t.orientation,r=t.unit||r,i=t.format||i,a=t.compress||t.compressPdf||a,(f=t.encryption||null)!==null&&(f.userPassword=f.userPassword||"",f.ownerPassword=f.ownerPassword||"",f.userPermissions=f.userPermissions||[]),s=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(e=t.precision),t.floatPrecision!==void 0&&(u=t.floatPrecision),h=t.defaultPathOperation||"S"),l=t.filters||(a===!0?["FlateEncode"]:l),r=r||"mm",n=(""+(n||"P")).toLowerCase();var v=t.putOnlyUsedFonts||!1,b={},p={internal:{},__private__:{}};p.__private__.PubSub=uf;var S="1.3",k=p.__private__.getPdfVersion=function(){return S};p.__private__.setPdfVersion=function(d){S=d};var C={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return C};var _=p.__private__.getPageFormat=function(d){return C[d]};i=i||"a4";var O="compat",U="advanced",R=O;function nt(){this.saveGraphicsState(),F(new Gt(ce,0,0,-ce,0,Ri()*ce).toString()+" cm"),this.setFontSize(this.getFontSize()/ce),h="n",R=U}function dt(){this.restoreGraphicsState(),h="S",R=O}var et=p.__private__.combineFontStyleAndFontWeight=function(d,w){if(d=="bold"&&w=="normal"||d=="bold"&&w==400||d=="normal"&&w=="italic"||d=="bold"&&w=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return w&&(d=w==400||w==="normal"?d==="italic"?"italic":"normal":w!=700&&w!=="bold"||d!=="normal"?(w==700?"bold":w)+""+d:"bold"),d};p.advancedAPI=function(d){var w=R===O;return w&&nt.call(this),typeof d!="function"||(d(this),w&&dt.call(this)),this},p.compatAPI=function(d){var w=R===U;return w&&dt.call(this),typeof d!="function"||(d(this),w&&nt.call(this)),this},p.isAdvancedAPI=function(){return R===U};var $,D=function(d){if(R!==U)throw new Error(d+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},J=p.roundToPrecision=p.__private__.roundToPrecision=function(d,w){var T=e||w;if(isNaN(d)||isNaN(T))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return d.toFixed(T).replace(/0+$/,"")};$=p.hpf=p.__private__.hpf=typeof u=="number"?function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.hpf");return J(d,u)}:u==="smart"?function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.hpf");return J(d,d>-1&&d<1?16:5)}:function(d){if(isNaN(d))throw new Error("Invalid argument passed to 
62jsPDF.hpf");return J(d,16)};var x=p.f2=p.__private__.f2=function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.f2");return J(d,2)},j=p.__private__.f3=function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.f3");return J(d,3)},W=p.scale=p.__private__.scale=function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.scale");return R===O?d*ce:R===U?d:void 0},q=function(d){return W(function(w){return R===O?Ri()-w:R===U?w:void 0}(d))};p.__private__.setPrecision=p.setPrecision=function(d){typeof parseInt(d,10)=="number"&&(e=parseInt(d,10))};var Q,ct="00000000000000000000000000000000",at=p.__private__.getFileId=function(){return ct},K=p.__private__.setFileId=function(d){return ct=d!==void 0&&/^[a-fA-F0-9]{32}$/.test(d)?d.toUpperCase():ct.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),f!==null&&(xn=new Fa(f.userPermissions,f.userPassword,f.ownerPassword,ct)),ct};p.setFileId=function(d){return K(d),this},p.getFileId=function(){return at()};var ht=p.__private__.convertDateToPDFDate=function(d){var w=d.getTimezoneOffset(),T=w<0?"+":"-",V=Math.floor(Math.abs(w/60)),tt=Math.abs(w%60),gt=[T,H(V),"'",H(tt),"'"].join("");return["D:",d.getFullYear(),H(d.getMonth()+1),H(d.getDate()),H(d.getHours()),H(d.getMinutes()),H(d.getSeconds()),gt].join("")},At=p.__private__.convertPDFDateToDate=function(d){var w=parseInt(d.substr(2,4),10),T=parseInt(d.substr(6,2),10)-1,V=parseInt(d.substr(8,2),10),tt=parseInt(d.substr(10,2),10),gt=parseInt(d.substr(12,2),10),_t=parseInt(d.substr(14,2),10);return new Date(w,T,V,tt,gt,_t,0)},pt=p.__private__.setCreationDate=function(d){var w;if(d===void 0&&(d=new Date),d instanceof Date)w=ht(d);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(d))throw new Error("Invalid argument passed to jsPDF.setCreationDate");w=d}return Q=w},A=p.__private__.getCreationDate=function(d){var w=Q;return d==="jsDate"&&(w=At(Q)),w};p.setCreationDate=function(d){return pt(d),this},p.getCreationDate=function(d){return A(d)};var z,H=p.__private__.padd2=function(d){return("0"+parseInt(d)).slice(-2)},G=p.__private__.padd2Hex=function(d){return("00"+(d=d.toString())).substr(d.length)},Z=0,it=[],ut=[],ft=0,vt=[],St=[],Pt=!1,wt=ut;p.__private__.setCustomOutputDestination=function(d){Pt=!0,wt=d};var Kt=function(d){Pt||(wt=d)};p.__private__.resetCustomOutputDestination=function(){Pt=!1,wt=ut};var F=p.__private__.out=function(d){return d=d.toString(),ft+=d.length+1,wt.push(d),wt},It=p.__private__.write=function(d){return F(arguments.length===1?d.toString():Array.prototype.join.call(arguments," "))},le=p.__private__.getArrayBuffer=function(d){for(var w=d.length,T=new ArrayBuffer(w),V=new Uint8Array(T);w--;)V[w]=d.charCodeAt(w);return T},zt=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return zt};var xt=t.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(d){return xt=R===U?d/ce:d,this};var ee,Tt=p.__private__.getFontSize=p.getFontSize=function(){return R===O?xt:xt*ce},Vt=t.R2L||!1;p.__private__.setR2L=p.setR2L=function(d){return Vt=d,this},p.__private__.getR2L=p.getR2L=function(){return Vt};var Xt,ye=p.__private__.setZoomMode=function(d){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(d))ee=d;else if(isNaN(d)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(d)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+d+'" is not recognized.');ee=d}else ee=parseInt(d,10)};p.__private__.getZoomMode=function(){return ee};var me,re=p.__private__.setPageMode=function(d){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(d)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+d+'" is not recognized.');Xt=d};p.__private__.getPageMode=function(){return Xt};var de=p.__private__.setLayoutMode=function(d){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(d)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+d+'" is not recognized.');me=d};p.__private__.getLayoutMode=function(){return me},p.__private__.setDisplayMode=p.setDisplayMode=function(d,w,T){return ye(d
vendor: 21,543 bytes, lines 62-67
62),de(w),re(T),this};var we={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(d){if(Object.keys(we).indexOf(d)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return we[d]},p.__private__.getDocumentProperties=function(){return we},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(d){for(var w in we)we.hasOwnProperty(w)&&d[w]&&(we[w]=d[w]);return this},p.__private__.setDocumentProperty=function(d,w){if(Object.keys(we).indexOf(d)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return we[d]=w};var Bt,ce,ot,Ct,Rt,ie={},ue={},ke=[],Jt={},jt={},Et={},Ot={},ne=null,Dt=0,Ut=[],se=new uf(p),Je=t.hotfixes||[],Ie={},wn={},cn=[],Gt=function d(w,T,V,tt,gt,_t){if(!(this instanceof d))return new d(w,T,V,tt,gt,_t);isNaN(w)&&(w=1),isNaN(T)&&(T=0),isNaN(V)&&(V=0),isNaN(tt)&&(tt=1),isNaN(gt)&&(gt=0),isNaN(_t)&&(_t=0),this._matrix=[w,T,V,tt,gt,_t]};Object.defineProperty(Gt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(d){this._matrix[0]=d}}),Object.defineProperty(Gt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(d){this._matrix[1]=d}}),Object.defineProperty(Gt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(d){this._matrix[2]=d}}),Object.defineProperty(Gt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(d){this._matrix[3]=d}}),Object.defineProperty(Gt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(d){this._matrix[4]=d}}),Object.defineProperty(Gt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(d){this._matrix[5]=d}}),Object.defineProperty(Gt.prototype,"a",{get:function(){return this._matrix[0]},set:function(d){this._matrix[0]=d}}),Object.defineProperty(Gt.prototype,"b",{get:function(){return this._matrix[1]},set:function(d){this._matrix[1]=d}}),Object.defineProperty(Gt.prototype,"c",{get:function(){return this._matrix[2]},set:function(d){this._matrix[2]=d}}),Object.defineProperty(Gt.prototype,"d",{get:function(){return this._matrix[3]},set:function(d){this._matrix[3]=d}}),Object.defineProperty(Gt.prototype,"e",{get:function(){return this._matrix[4]},set:function(d){this._matrix[4]=d}}),Object.defineProperty(Gt.prototype,"f",{get:function(){return this._matrix[5]},set:function(d){this._matrix[5]=d}}),Object.defineProperty(Gt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Gt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Gt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Gt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Gt.prototype.join=function(d){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map($).join(d)},Gt.prototype.multiply=function(d){var w=d.sx*this.sx+d.shy*this.shx,T=d.sx*this.shy+d.shy*this.sy,V=d.shx*this.sx+d.sy*this.shx,tt=d.shx*this.shy+d.sy*this.sy,gt=d.tx*this.sx+d.ty*this.shx+this.tx,_t=d.tx*this.shy+d.ty*this.sy+this.ty;return new Gt(w,T,V,tt,gt,_t)},Gt.prototype.decompose=function(){var d=this.sx,w=this.shy,T=this.shx,V=this.sy,tt=this.tx,gt=this.ty,_t=Math.sqrt(d*d+w*w),$t=(d/=_t)*T+(w/=_t)*V;T-=d*$t,V-=w*$t;var Ht=Math.sqrt(T*T+V*V);return $t/=Ht,d*(V/=Ht)<w*(T/=Ht)&&(d=-d,w=-w,$t=-$t,_t=-_t),{scale:new Gt(_t,0,0,Ht,0,0),translate:new Gt(1,0,0,1,tt,gt),rotate:new Gt(d,w,-w,d,0,0),skew:new Gt(1,0,$t,1,0,0)}},Gt.prototype.toString=function(d){return this.join(" ")},Gt.prototype.inversed=function(){var d=this.sx,w=this.shy,T=this.shx,V=this.sy,tt=this.tx,gt=this.ty,_t=1/(d*V-w*T),$t=V*_t,Ht=-w*_t,he=-T*_t,pe=d*_t;return new Gt($t,Ht,he,pe,-$t*tt-he*gt,-Ht*tt-pe*gt)},Gt.prototype.applyToPoint=function(d){var w=d.x*this.sx+d.y*this.shx+this.tx,T=d.x*this.shy+d.y*this.sy+this.ty;return new Fi(w,T)},Gt.prototype.applyToRectangle=function(d){var w=this.applyToPoint(d),T=this.applyToPoint(new Fi(d.x+d.w,d.y+d.h));return new ao(w.x,w.y,T.x-w.x,T.y-w.y)},Gt.prototype.clone=function(){var d=this.sx,w=this.shy,T=this.shx,V=this.sy,tt=this.tx,gt=this.ty;return new Gt(d,w,T,V,tt,gt)},p.Matrix=Gt;var qn=p.matrixMult=function(d,w){return w.multiply(d)},ir=new Gt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=ir;var ar=function(d,w){if(!jt[d]){var T=(w instanceof Zi?"Sh":"P")+(Object.keys(Jt).length+1).toString(10);w.id=T,jt[d]=T,Jt[T]=w,se.publish("addPattern",w)}};p.ShadingPattern=Zi,p.TilingPattern=Oa,p.addShadingPattern=function(d,w){return D("addShadingPattern()"),ar(d,w),this},p.beginTilingPattern=function(d){D("beginTilingPattern()"),oo(d.boundingBox[0],d.boundingBox[1],d.boundingBox[2]-d.boundingBox[0],d.boundingBox[3]-d.boundingBox[1],d.matrix)},p.endTilingPattern=function(d,w){D("endTilingPattern()"),w.stream=St[z].join(`
63`),ar(d,w),se.publish("endTilingPattern",w),cn.pop().restore()};var or,Ye=p.__private__.newObject=function(){var d=mn();return yn(d,!0),d},mn=p.__private__.newObjectDeferred=function(){return Z++,it[Z]=function(){return ft},Z},yn=function(d,w){return w=typeof w=="boolean"&&w,it[d]=ft,w&&F(d+" 0 obj"),d},Ci=p.__private__.newAdditionalObject=function(){var d={objId:mn(),content:""};return vt.push(d),d},ai=mn(),pr=mn(),Ar=p.__private__.decodeColorString=function(d){var w=d.split(" ");if(w.length!==2||w[1]!=="g"&&w[1]!=="G")w.length!==5||w[4]!=="k"&&w[4]!=="K"||(w=[(1-w[0])*(1-w[3]),(1-w[1])*(1-w[3]),(1-w[2])*(1-w[3]),"r"]);else{var T=parseFloat(w[0]);w=[T,T,T,"r"]}for(var V="#",tt=0;tt<3;tt++)V+=("0"+Math.floor(255*parseFloat(w[tt])).toString(16)).slice(-2);return V},gr=p.__private__.encodeColorString=function(d){var w;typeof d=="string"&&(d={ch1:d});var T=d.ch1,V=d.ch2,tt=d.ch3,gt=d.ch4,_t=d.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof T=="string"&&T.charAt(0)!=="#"){var $t=new h1(T);if($t.ok)T=$t.toHex();else if(!/^\d*\.?\d*$/.test(T))throw new Error('Invalid color "'+T+'" passed to jsPDF.encodeColorString.')}if(typeof T=="string"&&/^#[0-9A-Fa-f]{3}$/.test(T)&&(T="#"+T[1]+T[1]+T[2]+T[2]+T[3]+T[3]),typeof T=="string"&&/^#[0-9A-Fa-f]{6}$/.test(T)){var Ht=parseInt(T.substr(1),16);T=Ht>>16&255,V=Ht>>8&255,tt=255&Ht}if(V===void 0||gt===void 0&&T===V&&V===tt)w=typeof T=="string"?T+" "+_t[0]:d.precision===2?x(T/255)+" "+_t[0]:j(T/255)+" "+_t[0];else if(gt===void 0||je(gt)==="object"){if(gt&&!isNaN(gt.a)&&gt.a===0)return["1.","1.","1.",_t[1]].join(" ");w=typeof T=="string"?[T,V,tt,_t[1]].join(" "):d.precision===2?[x(T/255),x(V/255),x(tt/255),_t[1]].join(" "):[j(T/255),j(V/255),j(tt/255),_t[1]].join(" ")}else w=typeof T=="string"?[T,V,tt,gt,_t[2]].join(" "):d.precision===2?[x(T),x(V),x(tt),x(gt),_t[2]].join(" "):[j(T),j(V),j(tt),j(gt),_t[2]].join(" ");return w},mr=p.__private__.getFilters=function(){return l},sr=p.__private__.putStream=function(d){var w=(d=d||{}).data||"",T=d.filters||mr(),V=d.alreadyAppliedFilters||[],tt=d.addLength1||!1,gt=w.length,_t=d.objectId,$t=function(ze){return ze};if(f!==null&&_t===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");f!==null&&($t=xn.encryptor(_t,0));var Ht={};T===!0&&(T=["FlateEncode"]);var he=d.additionalKeyValues||[],pe=(Ht=te.API.processDataByFilters!==void 0?te.API.processDataByFilters(w,T):{data:w,reverseChain:[]}).reverseChain+(Array.isArray(V)?V.join(" "):V.toString());if(Ht.data.length!==0&&(he.push({key:"Length",value:Ht.data.length}),tt===!0&&he.push({key:"Length1",value:gt})),pe.length!=0)if(pe.split("/").length-1==1)he.push({key:"Filter",value:pe});else{he.push({key:"Filter",value:"["+pe+"]"});for(var Ne=0;Ne<he.length;Ne+=1)if(he[Ne].key==="DecodeParms"){for(var sn=[],Re=0;Re<Ht.reverseChain.split("/").length-1;Re+=1)sn.push("null");sn.push(he[Ne].value),he[Ne].value="["+sn.join(" ")+"]"}}F("<<");for(var Fe=0;Fe<he.length;Fe++)F("/"+he[Fe].key+" "+he[Fe].value);F(">>"),Ht.data.length!==0&&(F("stream"),F($t(Ht.data)),F("endstream"))},Ei=p.__private__.putPage=function(d){var w=d.number,T=d.data,V=d.objId,tt=d.contentsObjId;yn(V,!0),F("<</Type /Page"),F("/Parent "+d.rootDictionaryObjId+" 0 R"),F("/Resources "+d.resourceDictionaryObjId+" 0 R"),F("/MediaBox ["+parseFloat($(d.mediaBox.bottomLeftX))+" "+parseFloat($(d.mediaBox.bottomLeftY))+" "+$(d.mediaBox.topRightX)+" "+$(d.mediaBox.topRightY)+"]"),d.cropBox!==null&&F("/CropBox ["+$(d.cropBox.bottomLeftX)+" "+$(d.cropBox.bottomLeftY)+" "+$(d.cropBox.topRightX)+" "+$(d.cropBox.topRightY)+"]"),d.bleedBox!==null&&F("/BleedBox ["+$(d.bleedBox.bottomLeftX)+" "+$(d.bleedBox.bottomLeftY)+" "+$(d.bleedBox.topRightX)+" "+$(d.bleedBox.topRightY)+"]"),d.trimBox!==null&&F("/TrimBox ["+$(d.trimBox.bottomLeftX)+" "+$(d.trimBox.bottomLeftY)+" "+$(d.trimBox.topRightX)+" "+$(d.trimBox.topRightY)+"]"),d.artBox!==null&&F("/ArtBox ["+$(d.artBox.bottomLeftX)+" "+$(d.artBox.bottomLeftY)+" "+$(d.artBox.topRightX)+" "+$(d.artBox.topRightY)+"]"),typeof d.userUnit=="number"&&d.userUnit!==1&&F("/UserUnit "+d.userUnit),se.publish("putPage",{objId:V,pageContext:Ut[w],pageNumber:w,page:T}),F("/Contents "+tt+" 0 R"),F(">>"),F("endobj");var gt=T.join(`
64`);return R===U&&(gt+=`
65Q`),yn(tt,!0),sr({data:gt,filters:mr(),objectId:tt}),F("endobj"),V},Lr=p.__private__.putPages=function(){var d,w,T=[];for(d=1;d<=Dt;d++)Ut[d].objId=mn(),Ut[d].contentsObjId=mn();for(d=1;d<=Dt;d++)T.push(Ei({number:d,data:St[d],objId:Ut[d].objId,contentsObjId:Ut[d].contentsObjId,mediaBox:Ut[d].mediaBox,cropBox:Ut[d].cropBox,bleedBox:Ut[d].bleedBox,trimBox:Ut[d].trimBox,artBox:Ut[d].artBox,userUnit:Ut[d].userUnit,rootDictionaryObjId:ai,resourceDictionaryObjId:pr}));yn(ai,!0),F("<</Type /Pages");var V="/Kids [";for(w=0;w<Dt;w++)V+=T[w]+" 0 R ";F(V+"]"),F("/Count "+Dt),F(">>"),F("endobj"),se.publish("postPutPages")},ji=function(d){se.publish("putFont",{font:d,out:F,newObject:Ye,putStream:sr}),d.isAlreadyPutted!==!0&&(d.objectNumber=Ye(),F("<<"),F("/Type /Font"),F("/BaseFont /"+Ra(d.postScriptName)),F("/Subtype /Type1"),typeof d.encoding=="string"&&F("/Encoding /"+d.encoding),F("/FirstChar 32"),F("/LastChar 255"),F(">>"),F("endobj"))},oa=function(d){d.objectNumber=Ye();var w=[];w.push({key:"Type",value:"/XObject"}),w.push({key:"Subtype",value:"/Form"}),w.push({key:"BBox",value:"["+[$(d.x),$(d.y),$(d.x+d.width),$(d.y+d.height)].join(" ")+"]"}),w.push({key:"Matrix",value:"["+d.matrix.toString()+"]"});var T=d.pages[1].join(`
66`);sr({data:T,additionalKeyValues:w,objectId:d.objectNumber}),F("endobj")},sa=function(d,w){w||(w=21);var T=Ye(),V=function(_t,$t){var Ht,he=[],pe=1/($t-1);for(Ht=0;Ht<1;Ht+=pe)he.push(Ht);if(he.push(1),_t[0].offset!=0){var Ne={offset:0,color:_t[0].color};_t.unshift(Ne)}if(_t[_t.length-1].offset!=1){var sn={offset:1,color:_t[_t.length-1].color};_t.push(sn)}for(var Re="",Fe=0,ze=0;ze<he.length;ze++){for(Ht=he[ze];Ht>_t[Fe+1].offset;)Fe++;var $e=_t[Fe].offset,Ve=(Ht-$e)/(_t[Fe+1].offset-$e),Ln=_t[Fe].color,Gr=_t[Fe+1].color;Re+=G(Math.round((1-Ve)*Ln[0]+Ve*Gr[0]).toString(16))+G(Math.round((1-Ve)*Ln[1]+Ve*Gr[1]).toString(16))+G(Math.round((1-Ve)*Ln[2]+Ve*Gr[2]).toString(16))}return Re.trim()}(d.colors,w),tt=[];tt.push({key:"FunctionType",value:"0"}),tt.push({key:"Domain",value:"[0.0 1.0]"}),tt.push({key:"Size",value:"["+w+"]"}),tt.push({key:"BitsPerSample",value:"8"}),tt.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),tt.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),sr({data:V,additionalKeyValues:tt,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:T}),F("endobj"),d.objectNumber=Ye(),F("<< /ShadingType "+d.type),F("/ColorSpace /DeviceRGB");var gt="/Coords ["+$(parseFloat(d.coords[0]))+" "+$(parseFloat(d.coords[1]))+" ";d.type===2?gt+=$(parseFloat(d.coords[2]))+" "+$(parseFloat(d.coords[3])):gt+=$(parseFloat(d.coords[2]))+" "+$(parseFloat(d.coords[3]))+" "+$(parseFloat(d.coords[4]))+" "+$(parseFloat(d.coords[5])),F(gt+="]"),d.matrix&&F("/Matrix ["+d.matrix.toString()+"]"),F("/Function "+T+" 0 R"),F("/Extend [true true]"),F(">>"),F("endobj")},la=function(d,w){var T=mn(),V=Ye();w.push({resourcesOid:T,objectOid:V}),d.objectNumber=V;var tt=[];tt.push({key:"Type",value:"/Pattern"}),tt.push({key:"PatternType",value:"1"}),tt.push({key:"PaintType",value:"1"}),tt.push({key:"TilingType",value:"1"}),tt.push({key:"BBox",value:"["+d.boundingBox.map($).join(" ")+"]"}),tt.push({key:"XStep",value:$(d.xStep)}),tt.push({key:"YStep",value:$(d.yStep)}),tt.push({key:"Resources",value:T+" 0 R"}),d.matrix&&tt.push({key:"Matrix",value:"["+d.matrix.toString()+"]"}),sr({data:d.stream,additionalKeyValues:tt,objectId:d.objectNumber}),F("endobj")},ol=function(d){for(var w in d.objectNumber=Ye(),F("<<"),d)switch(w){case"opacity":F("/ca "+x(d[w]));break;case"stroke-opacity":F("/CA "+x(d[w]))}F(">>"),F("endobj")},Xa=function(d){yn(d.resourcesOid,!0),F("<<"),F("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var w in F("/Font <<"),ie)ie.hasOwnProperty(w)&&(v===!1||v===!0&&b.hasOwnProperty(w))&&F("/"+w+" "+ie[w].objectNumber+" 0 R");F(">>")}(),function(){if(Object.keys(Jt).length>0){for(var w in F("/Shading <<"),Jt)Jt.hasOwnProperty(w)&&Jt[w]instanceof Zi&&Jt[w].objectNumber>=0&&F("/"+w+" "+Jt[w].objectNumber+" 0 R");se.publish("putShadingPatternDict"),F(">>")}}(),function(w){if(Object.keys(Jt).length>0){for(var T in F("/Pattern <<"),Jt)Jt.hasOwnProperty(T)&&Jt[T]instanceof p.TilingPattern&&Jt[T].objectNumber>=0&&Jt[T].objectNumber<w&&F("/"+T+" "+Jt[T].objectNumber+" 0 R");se.publish("putTilingPatternDict"),F(">>")}}(d.objectOid),function(){if(Object.keys(Et).length>0){var w;for(w in F("/ExtGState <<"),Et)Et.hasOwnProperty(w)&&Et[w].objectNumber>=0&&F("/"+w+" "+Et[w].objectNumber+" 0 R");se.publish("putGStateDict"),F(">>")}}(),function(){for(var w in F("/XObject <<"),Ie)Ie.hasOwnProperty(w)&&Ie[w].objectNumber>=0&&F("/"+w+" "+Ie[w].objectNumber+" 0 R");se.publish("putXobjectDict"),F(">>")}(),F(">>"),F("endobj")},Vo=function(d){ue[d.fontName]=ue[d.fontName]||{},ue[d.fontName][d.fontStyle]=d.id},Go=function(d,w,T,V,tt){var gt={id:"F"+(Object.keys(ie).length+1).toString(10),postScriptName:d,fontName:w,fontStyle:T,encoding:V,isStandardFont:tt||!1,metadata:{}};return se.publish("addFont",{font:gt,instance:this}),ie[gt.id]=gt,Vo(gt),gt.id},lr=p.__private__.pdfEscape=p.pdfEscape=function(d,w){return function(T,V){var tt,gt,_t,$t,Ht,he,pe,Ne,sn;if(_t=(V=V||{}).sourceEncoding||"Unicode",Ht=V.outputEncoding,(V.autoencode||Ht)&&ie[Bt].metadata&&ie[Bt].metadata[_t]&&ie[Bt].metadata[_t].encoding&&($t=ie[Bt].metadata[_t].encoding,!Ht&&ie[Bt].encoding&&(Ht=ie[Bt].encoding),!Ht&&$t.codePages&&(Ht=$t.codePages[0]),typeof Ht=="string"&&(Ht=$t[Ht]),Ht)){for(pe=!1,he=[],tt=0,gt=T.length;tt<gt;tt++)(Ne=Ht[T.charCodeAt(tt)])?he.push(String.fromCharCode(Ne)):he.push(T[tt]),he[tt].charCodeAt(0)>>8&&(pe=!0);T=he.join("")}for(tt=T.length;pe===void 0&&tt!==0;)T.charCodeAt(tt-1)>>8&&(pe=!0),tt--;if(!pe)return T;for(he=V.noBOM?[]:[254,255],tt=0,gt=T.length;tt<gt;tt++){if((sn=(Ne=T.charCodeAt(tt))>>8)>>8)throw new Error("Character at position "+tt+" of string '"+T+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");he.push(sn),he.push(Ne-(sn<<8))}return String.fromCharCode.apply(void 0,he)}(d,w).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ja=p.__private__.beginPage=function(d){St[++Dt]=[],Ut[Dt]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(d[0]),topRightY:Number(d[1])}},Zo(Dt),Kt(St[z])},Yo=function(d,w){var T,V,tt;switch(n=w||n,typeof d=="string"&&(T=_(d.toLowerCase()),Array.isArray(T)&&(V=T[0],tt=T[1])),Array.isArray(d)&&(V=d[0]*ce,tt=d[1]*ce),isNaN(V)&&(V=i[0],tt=i[1]),(V>14400||tt>14400)&&(Te.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),V=Math.min(14400,V),tt=Math.min(14400,tt)),i=[V,tt],n.substr(0,1)){case"l":tt>V&&(i=[tt,V]);break;case"p":V>tt&&(i=[tt,V])}Ja(i),ml(ae),F(pa),ro!==0&&F(ro+" J"),li!==0&&F(li+" j"),se.publish("addPage",{pageNumber:Dt})},Qa=function(d){d>0&&d<=Dt&&(St.splice(d,1),Ut.splice(d,1),Dt--,z>Dt&&(z=Dt),this.setPage(z))},Zo=function(d){d>0&&d<=Dt&&(z=d)},Ko=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return St.length-1},Xo=function(d,w,T){var V,tt=void 0;return T=T||{},d=d!==void 0?d:ie[Bt].fontName,w=w!==void 0?w:ie[Bt].fontStyle,V=d.toLowerCase(),ue[V]!==void 0&&ue[V][w]!==void 0?tt=ue[V][w]:ue[d]!==void 0&&ue[d][w]!==void 0?tt=ue[d][w]:T.disableWarning===!1&&Te.warn("Unable to look up font label for font '"+d+"', '"+w+"'. Refer to getFontList() for available fonts."),tt||T.noFallback||(tt=ue.times[w])==null&&(tt=ue.times.normal),tt},kr=p.__private__.putInfo=function(){var d=Ye(),w=function(V){return V};for(var T in f!==null&&(w=xn.encryptor(d,0)),F("<<"),F("/Producer ("+lr(w("jsPDF "+te.version))+")"),we)we.hasOwnProperty(T)&&we[T]&&F("/"+T.substr(0,1).toUpperCase()+T.substr(1)+" ("+lr(w(we[T]))+")");F("/CreationDate ("+lr(w(Q))+")"),F(">>"),F("endobj")},ca=p.__private__.putCatalog=function(d){var w=(d=d||{}).rootDictionaryObjId||ai;switch(Ye(),F("<<"),F("/Type /Catalog"),F("/Pages "+w+" 0 R"),ee||(ee="fullwidth"),ee){case"fullwidth":F("/OpenAction [3 0 R /FitH null]");break;case"fullheight":F("/OpenAction [3 0 R /FitV null]");break;case"fullpage":F("/OpenAction [3 0 R /Fit]");break;case"original":F("/OpenAction [3 0 R /XYZ null null 1]");break;default:var T=""+ee;T.substr(T.length-1)==="%"&&(ee=parseInt(ee)/100),typeof ee=="number"&&F("/OpenAction [3 0 R /XYZ null null "+x(ee)+"]")}switch(me||(me="continuous"),me){case"continuous":F("/PageLayout /OneColumn");break;case"single":F("/PageLayout /SinglePage");break;case"two":case"twoleft":F("/PageLayout /TwoColumnLeft");break;case"tworight":F("/PageLayout /TwoColumnRight")}Xt&&F("/PageMode /"+Xt),se.publish("putCatalog"),F(">>"),F("endobj")},sl=p.__private__.putTrailer=function(){F("trailer"),F("<<"),F("/Size "+(Z+1)),F("/Root "+Z+" 0 R"),F("/Info "+(Z-1)+" 0 R"),f!==null&&F("/Encrypt "+xn.oid+" 0 R"),F("/ID [ <"+ct+"> <"+ct+"> ]"),F(">>")},on=p.__private__.putHeader=function(){F("%PDF-"+S),F("%ºß¬à")},Jo=p.__private__.putXRef=function(){var d="0000000000";F("xref"),F("0 "+(Z+1)),F("0000000000 65535 f ");for(var w=1;w<=Z;w++)typeof it[w]=="function"?F((d+it[w]()).slice(-10)+" 00000 n "):it[w]!==void 0?F((d+it[w]).slice(-10)+" 00000 n "):F("0000000000 00000 n ")},Pr=p.__private__.buildDocument=function(){var d;Z=0,ft=0,ut=[],it=[],vt=[],ai=mn(),pr=mn(),Kt(ut),se.publish("buildDocument"),on(),Lr(),function(){se.publish("putAdditionalObjects");for(var T=0;T<vt.length;T++){var V=vt[T];yn(V.objId,!0),F(V.content),F("endobj")}se.publish("postPutAdditionalObjects")}(),d=[],function(){for(var T in ie)ie.hasOwnProperty(T)&&(v===!1||v===!0&&b.hasOwnProperty(T))&&ji(ie[T])}(),function(){var T;for(T in Et)Et.hasOwnProperty(T)&&ol(Et[T])}(),function(){for(var T in Ie)Ie.hasOwnProperty(T)&&oa(Ie[T])}(),function(T){var V;for(V in Jt)Jt.hasOwnProperty(V)&&(Jt[V]instanceof Zi?sa(Jt[V]):Jt[V]instanceof Oa&&la(Jt[V],T))}(d),se.publish("putResources"),d.forEach(Xa),Xa({resourcesOid:pr,objectOid:Number.MAX_SAFE_INTEGER}),se.publish("postPutResources"),f!==null&&(xn.oid=Ye(),F("<<"),F("/Filter /Standard"),F("/V "+xn.v),F("/R "+xn.r),F("/U <"+xn.toHexString(xn.U)+">"),F("/O <"+xn.toHexString(xn.O)+">"),F("/P "+xn.P),F(">>"),F("endobj")),kr(),ca();var w=ft;return Jo(),sl(),F("startxref"),F(""+w),F("%%EOF"),Kt(St[z]),ut.join(`
67`)},ua=p.__private__.getBlob=function(d){return new Blob([le(d)],{type:"application/pdf"})},to=function(d){for(;d.firstChild;)d.removeChild(d.firstChild)},Gn=function(d){var w,T=d.document,V=T.documentElement,tt=T.head,gt=T.body;return tt||(tt=T.createElement("head"),V.appendChild(tt)),gt||(gt=T.createElement("body"),V.appendChild(gt)),to(tt),to(gt),(w=T.createElement("style")).appendChild(T.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),tt.appendChild(w),{document:T,body:gt}},ha=p.output=p.__private__.output=(or=function(d,w){switch(typeof(w=w||{})=="string"?w={filename:w}:w.filename=w.filename||"generated.pdf",d){case void 0:return Pr();case"save":p.save(w.filename);break;case"arraybuffer":return le(Pr());case"blob":return ua(Pr());case"bloburi":case"bloburl":if(oe.URL!==void 0&&typeof oe.URL.createObjectURL=="function")return oe.URL&&oe.URL.createObjectURL(ua(Pr()))||void 0;Te.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var T="",V=Pr();try{T=sf(V)}catch{T=sf(unescape(encodeURIComponent(V)))}return"data:application/pdf;filename="+encodeURIComponent(w.filename)+";base64,"+T;case"pdfobjectnewwindow":if(Object.prototype.toString.call(oe)==="[object Window]"){var tt="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",gt=!w.pdfObjectUrl;gt||(tt=w.pdfObjectUrl);var _t=oe.open();if(_t!==null){var $t=Gn(_t),Ht=$t.document.createElement("script"),he=this;Ht.src=tt,gt&&(Ht.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",Ht.crossOrigin="anonymous"),Ht.onload=function(){_t.PDFObject.embed(he.output("dataurlstring"),w)},$t.body.appendChild(Ht)}return _t}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(oe)==="[object Window]"){var pe=w.pdfJsUrl||"examples/PDF.js/web/viewer.html",Ne=oe.open();if(Ne!==null){var sn=Gn(Ne),Re=sn.document.createElement("iframe"),Fe
67=pe.indexOf("?")===-1?"?":"&";he=this,Re.id="pdfViewer",Re.width="500px",Re.height="400px",Re.src=pe+Fe+"file=&downloadName="+encodeURIComponent(w.filename),Re.onload=function(){Ne.document.title=w.filename,Re.contentWindow.PDFViewerApplication.open(he.output("bloburl"))},sn.body.appendChild(Re)}return Ne}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(oe)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var ze=oe.open();if(ze!==null){var $e=Gn(ze),Ve=$e.document.createElement("iframe");Ve.src=this.output("datauristring",w),$e.body.appendChild(Ve),ze.document.title=w.filename}if(ze||typeof safari>"u")return ze;break;case"datauri":case"dataurl":return oe.document.location.href=this.output("datauristring",w);default:return null}},or.foo=function(){try{return or.apply(this,arguments)}catch(T){var d=T.stack||"";~d.indexOf(" at ")&&(d=d.split(" at ")[1]);var w="Error in function "+d.split(`
68`)[0].split("<")[0]+": "+T.message;if(!oe.console)throw new Error(w);oe.console.error(w,T),oe.alert&&alert(w)}},or.foo.bar=or,or.foo),Ur=function(d){return Array.isArray(Je)===!0&&Je.indexOf(d)>-1};switch(r){case"pt":ce=1;break;case"mm":ce=72/25.4;break;case"cm":ce=72/2.54;break;case"in":ce=72;break;case"px":ce=Ur("px_scaling")==1?.75:96/72;break;case"pc":case"em":ce=12;break;case"ex":ce=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);ce=r}var xn=null;pt(),K();var Qo=p.__private__.getPageInfo=p.getPageInfo=function(d){if(isNaN(d)||d%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Ut[d].objId,pageNumber:d,pageContext:Ut[d]}},ll=p.__private__.getPageInfoByObjId=function(d){if(isNaN(d)||d%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var w in Ut)if(Ut[w].objId===d)break;return Qo(w)},cl=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Ut[z].objId,pageNumber:z,pageContext:Ut[z]}
vendor: 21,747 bytes, lines 68-82
68};p.addPage=function(){return Yo.apply(this,arguments),this},p.setPage=function(){return Zo.apply(this,arguments),Kt.call(this,St[z]),this},p.insertPage=function(d){return this.addPage(),this.movePage(z,d),this},p.movePage=function(d,w){var T,V;if(d>w){T=St[d],V=Ut[d];for(var tt=d;tt>w;tt--)St[tt]=St[tt-1],Ut[tt]=Ut[tt-1];St[w]=T,Ut[w]=V,this.setPage(w)}else if(d<w){T=St[d],V=Ut[d];for(var gt=d;gt<w;gt++)St[gt]=St[gt+1],Ut[gt]=Ut[gt+1];St[w]=T,Ut[w]=V,this.setPage(w)}return this},p.deletePage=function(){return Qa.apply(this,arguments),this},p.__private__.text=p.text=function(d,w,T,V,tt){var gt,_t,$t,Ht,he,pe,Ne,sn,Re,Fe=(V=V||{}).scope||this;if(typeof d=="number"&&typeof w=="number"&&(typeof T=="string"||Array.isArray(T))){var ze=T;T=w,w=d,d=ze}if(arguments[3]instanceof Gt==0?($t=arguments[4],Ht=arguments[5],je(Ne=arguments[3])==="object"&&Ne!==null||(typeof $t=="string"&&(Ht=$t,$t=null),typeof Ne=="string"&&(Ht=Ne,Ne=null),typeof Ne=="number"&&($t=Ne,Ne=null),V={flags:Ne,angle:$t,align:Ht})):(D("The transform parameter of text() with a Matrix value"),Re=tt),isNaN(w)||isNaN(T)||d==null)throw new Error("Invalid arguments passed to jsPDF.text");if(d.length===0)return Fe;var $e,Ve="",Ln=typeof V.lineHeightFactor=="number"?V.lineHeightFactor:Ii,Gr=Fe.internal.scaleFactor;function so(De){return De=De.split("	").join(Array(V.TabLen||9).join(" ")),lr(De,Ne)}function Oi(De){for(var Me,Qe=De.concat(),un=[],Zr=Qe.length;Zr--;)typeof(Me=Qe.shift())=="string"?un.push(Me):Array.isArray(De)&&(Me.length===1||Me[1]===void 0&&Me[2]===void 0)?un.push(Me[0]):un.push([Me[0],Me[1],Me[2]]);return un}function Ti(De,Me){var Qe;if(typeof De=="string")Qe=Me(De)[0];else if(Array.isArray(De)){for(var un,Zr,po=De.concat(),La=[],cs=po.length;cs--;)typeof(un=po.shift())=="string"?La.push(Me(un)[0]):Array.isArray(un)&&typeof un[0]=="string"&&(Zr=Me(un[0],un[1],un[2]),La.push([Zr[0],Zr[1],Zr[2]]));Qe=La}return Qe}var ci=!1,Di=!0;if(typeof d=="string")ci=!0;else if(Array.isArray(d)){var ba=d.concat();_t=[];for(var wa,kn=ba.length;kn--;)(typeof(wa=ba.shift())!="string"||Array.isArray(wa)&&typeof wa[0]!="string")&&(Di=!1);ci=Di}if(ci===!1)throw new Error('Type of text must be string or Array. "'+d+'" is not recognized.');typeof d=="string"&&(d=d.match(/[\r?\n]/)?d.split(/\r\n|\r|\n/g):[d]);var Mi=xt/Fe.internal.scaleFactor,Bi=Mi*(Ln-1);switch(V.baseline){case"bottom":T-=Bi;break;case"top":T+=Mi-Bi;break;case"hanging":T+=Mi-2*Bi;break;case"middle":T+=Mi/2-Bi}if((pe=V.maxWidth||0)>0&&(typeof d=="string"?d=Fe.splitTextToSize(d,pe):Object.prototype.toString.call(d)==="[object Array]"&&(d=d.reduce(function(De,Me){return De.concat(Fe.splitTextToSize(Me,pe))},[]))),gt={text:d,x:w,y:T,options:V,mutex:{pdfEscape:lr,activeFontKey:Bt,fonts:ie,activeFontSize:xt}},se.publish("preProcessText",gt),d=gt.text,$t=(V=gt.options).angle,Re instanceof Gt==0&&$t&&typeof $t=="number"){$t*=Math.PI/180,V.rotationDirection===0&&($t=-$t),R===U&&($t=-$t);var lo=Math.cos($t),jr=Math.sin($t);Re=new Gt(lo,jr,-jr,lo,0,0)}else $t&&$t instanceof Gt&&(Re=$t);R!==U||Re||(Re=ir),(he=V.charSpace||ga)!==void 0&&(Ve+=$(W(he))+` Tc
69`,this.setCharSpace(this.getCharSpace()||0)),(sn=V.horizontalScale)!==void 0&&(Ve+=$(100*sn)+` Tz
70`),V.lang;var Rn=-1,ss=V.renderingMode!==void 0?V.renderingMode:V.stroke,ya=Fe.internal.getCurrentPageInfo().pageContext;switch(ss){case 0:case!1:case"fill":Rn=0;break;case 1:case!0:case"stroke":Rn=1;break;case 2:case"fillThenStroke":Rn=2;break;case 3:case"invisible":Rn=3;break;case 4:case"fillAndAddForClipping":Rn=4;break;case 5:case"strokeAndAddPathForClipping":Rn=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Rn=6;break;case 7:case"addToPathForClipping":Rn=7}var ls=ya.usedRenderingMode!==void 0?ya.usedRenderingMode:-1;Rn!==-1?Ve+=Rn+` Tr
71`:ls!==-1&&(Ve+=`0 Tr
72`),Rn!==-1&&(ya.usedRenderingMode=Rn),Ht=V.align||"left";var cr,qi=xt*Ln,co=Fe.internal.pageSize.getWidth(),xa=ie[Bt];he=V.charSpace||ga,pe=V.maxWidth||0,Ne=Object.assign({autoencode:!0,noBOM:!0},V.flags);var zi=[],uo=function(De){return Fe.getStringUnitWidth(De,{font:xa,charSpace:he,fontSize:xt,doKerning:!1})*xt/Gr};if(Object.prototype.toString.call(d)==="[object Array]"){var On;_t=Oi(d),Ht!=="left"&&(cr=_t.map(uo));var zn,_a=0;if(Ht==="right"){w-=cr[0],d=[],kn=_t.length;for(var ui=0;ui<kn;ui++)ui===0?(zn=Hr(w),On=Wr(T)):(zn=W(_a-cr[ui]),On=-qi),d.push([_t[ui],zn,On]),_a=cr[ui]}else if(Ht==="center"){w-=cr[0]/2,d=[],kn=_t.length;for(var hi=0;hi<kn;hi++)hi===0?(zn=Hr(w),On=Wr(T)):(zn=W((_a-cr[hi])/2),On=-qi),d.push([_t[hi],zn,On]),_a=cr[hi]}else if(Ht==="left"){d=[],kn=_t.length;for(var Na=0;Na<kn;Na++)d.push(_t[Na])}else if(Ht==="justify"&&xa.encoding==="Identity-H"){d=[],kn=_t.length,pe=pe!==0?pe:co;for(var Ui=0,ln=0;ln<kn;ln++)if(On=ln===0?Wr(T):-qi,zn=ln===0?Hr(w):Ui,ln<kn-1){var Sl=W((pe-cr[ln])/(_t[ln].split(" ").length-1)),Ir=_t[ln].split(" ");d.push([Ir[0]+" ",zn,On]),Ui=0;for(var vr=1;vr<Ir.length;vr++){var Hi=(uo(Ir[vr-1]+" "+Ir[vr])-uo(Ir[vr]))*Gr+Sl;vr==Ir.length-1?d.push([Ir[vr],Hi,0]):d.push([Ir[vr]+" ",Hi,0]),Ui-=Hi}}else d.push([_t[ln],zn,On]);d.push(["",Ui,0])}else{if(Ht!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(d=[],kn=_t.length,pe=pe!==0?pe:co,ln=0;ln<kn;ln++){On=ln===0?Wr(T):-qi,zn=ln===0?Hr(w):0;var ho=_t[ln].split(" ").length-1,fo=ho>0?(pe-cr[ln])/ho:0;ln<kn-1?zi.push($(W(fo))):zi.push(0),d.push([_t[ln],zn,On])}}}(typeof V.R2L=="boolean"?V.R2L:Vt)===!0&&(d=Ti(d,function(De,Me,Qe){return[De.split("").reverse().join(""),Me,Qe]})),gt={text:d,x:w,y:T,options:V,mutex:{pdfEscape:lr,activeFontKey:Bt,fonts:ie,activeFontSize:xt}},se.publish("postProcessText",gt),d=gt.text,$e=gt.mutex.isHex||!1;var Sa=ie[Bt].encoding;Sa!=="WinAnsiEncoding"&&Sa!=="StandardEncoding"||(d=Ti(d,function(De,Me,Qe){return[so(De),Me,Qe]})),_t=Oi(d),d=[];for(var Wi,$i,fi,Yr=Array.isArray(_t[0])?1:0,di="",Aa=function(De,Me,Qe){var un="";return Qe instanceof Gt?(Qe=typeof V.angle=="number"?qn(Qe,new Gt(1,0,0,1,De,Me)):qn(new Gt(1,0,0,1,De,Me),Qe),R===U&&(Qe=qn(new Gt(1,0,0,-1,0,0),Qe)),un=Qe.join(" ")+` Tm
73`):un=$(De)+" "+$(Me)+` Td
74`,un},Pn=0;Pn<_t.length;Pn++){switch(di="",Yr){case 1:fi=($e?"<":"(")+_t[Pn][0]+($e?">":")"),Wi=parseFloat(_t[Pn][1]),$i=parseFloat(_t[Pn][2]);break;case 0:fi=($e?"<":"(")+_t[Pn]+($e?">":")"),Wi=Hr(w),$i=Wr(T)}zi!==void 0&&zi[Pn]!==void 0&&(di=zi[Pn]+` Tw
75`),Pn===0?d.push(di+Aa(Wi,$i,Re)+fi):Yr===0?d.push(di+fi):Yr===1&&d.push(di+Aa(Wi,$i,Re)+fi)}d=Yr===0?d.join(` Tj
76T* `):d.join(` Tj
77`),d+=` Tj
78`;var Fr=`BT
79/`;return Fr+=Bt+" "+xt+` Tf
80`,Fr+=$(xt*Ln)+` TL
81`,Fr+=Er+`
82`,Fr+=Ve,Fr+=d,F(Fr+="ET"),b[Bt]=!0,Fe};var ul=p.__private__.clip=p.clip=function(d){return F(d==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return ul("evenodd")},p.__private__.discardPath=p.discardPath=function(){return F("n"),this};var Cr=p.__private__.isValidStyle=function(d){var w=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(d)!==-1&&(w=!0),w};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(d){return Cr(d)&&(h=d),this};var ts=p.__private__.getStyle=p.getStyle=function(d){var w=h;switch(d){case"D":case"S":w="S";break;case"F":w="f";break;case"FD":case"DF":w="B";break;case"f":case"f*":case"B":case"B*":w=d}return w},fa=p.close=function(){return F("h"),this};p.stroke=function(){return F("S"),this},p.fill=function(d){return da("f",d),this},p.fillEvenOdd=function(d){return da("f*",d),this},p.fillStroke=function(d){return da("B",d),this},p.fillStrokeEvenOdd=function(d){return da("B*",d),this};var da=function(d,w){je(w)==="object"?fl(w,d):F(d)},eo=function(d){d===null||R===U&&d===void 0||(d=ts(d),F(d))};function hl(d,w,T,V,tt){var gt=new Oa(w||this.boundingBox,T||this.xStep,V||this.yStep,this.gState,tt||this.matrix);gt.stream=this.stream;var _t=d+"$$"+this.cloneIndex+++"$$";return ar(_t,gt),gt}var fl=function(d,w){var T=jt[d.key],V=Jt[T];if(V instanceof Zi)F("q"),F(dl(w)),V.gState&&p.setGState(V.gState),F(d.matrix.toString()+" cm"),F("/"+T+" sh"),F("Q");else if(V instanceof Oa){var tt=new Gt(1,0,0,-1,0,Ri());d.matrix&&(tt=tt.multiply(d.matrix||ir),T=hl.call(V,d.key,d.boundingBox,d.xStep,d.yStep,tt).id),F("q"),F("/Pattern cs"),F("/"+T+" scn"),V.gState&&p.setGState(V.gState),F(w),F("Q")}},dl=function(d){switch(d){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},oi=p.moveTo=function(d,w){return F($(W(d))+" "+$(q(w))+" m"),this},es=p.lineTo=function(d,w){return F($(W(d))+" "+$(q(w))+" l"),this},si=p.curveTo=function(d,w,T,V,tt,gt){return F([$(W(d)),$(q(w)),$(W(T)),$(q(V)),$(W(tt)),$(q(gt)),"c"].join(" ")),this};p.__private__.line=p.line=function(d,w,T,V,tt){if(isNaN(d)||isNaN(w)||isNaN(T)||isNaN(V)||!Cr(tt))throw new Error("Invalid arguments passed to jsPDF.line");return R===O?this.lines([[T-d,V-w]],d,w,[1,1],tt||"S"):this.lines([[T-d,V-w]],d,w,[1,1]).stroke()},p.__private__.lines=p.lines=function(d,w,T,V,tt,gt){var _t,$t,Ht,he,pe,Ne,sn,Re,Fe,ze,$e,Ve;if(typeof d=="number"&&(Ve=T,T=w,w=d,d=Ve),V=V||[1,1],gt=gt||!1,isNaN(w)||isNaN(T)||!Array.isArray(d)||!Array.isArray(V)||!Cr(tt)||typeof gt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(oi(w,T),_t=V[0],$t=V[1],he=d.length,ze=w,$e=T,Ht=0;Ht<he;Ht++)(pe=d[Ht]).length===2?(ze=pe[0]*_t+ze,$e=pe[1]*$t+$e,es(ze,$e)):(Ne=pe[0]*_t+ze,sn=pe[1]*$t+$e,Re=pe[2]*_t+ze,Fe=pe[3]*$t+$e,ze=pe[4]*_t+ze,$e=pe[5]*$t+$e,si(Ne,sn,Re,Fe,ze,$e));return gt&&fa(),eo(tt),this},p.path=function(d){for(var w=0;w<d.length;w++){var T=d[w],V=T.c;switch(T.op){case"m":oi(V[0],V[1]);break;case"l":es(V[0],V[1]);break;case"c":si.apply(this,V);break;case"h":fa()}}return this},p.__private__.rect=p.rect=function(d,w,T,V,tt){if(isNaN(d)||isNaN(w)||isNaN(T)||isNaN(V)||!Cr(tt))throw new Error("Invalid arguments passed to jsPDF.rect");return R===O&&(V=-V),F([$(W(d)),$(q(w)),$(W(T)),$(W(V)),"re"].join(" ")),eo(tt),this},p.__private__.triangle=p.triangle=function(d,w,T,V,tt,gt,_t){if(isNaN(d)||isNaN(w)||isNaN(T)||isNaN(V)||isNaN(tt)||isNaN(gt)||!Cr(_t))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[T-d,V-w],[tt-T,gt-V],[d-tt,w-gt]],d,w,[1,1],_t,!0),this},p.__private__.roundedRect=p.roundedRect=function(d,w,T,V,tt,gt,_t){if(isNaN(d)||isNaN(w)||isNaN(T)||isNaN(V)||isNaN(tt)||isNaN(gt)||!Cr(_t))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var $t=4/3*(Math.SQRT2-1);return tt=Math.min(tt,.5*T),gt=Math.min(gt,.5*V),this.lines([[T-2*tt,0],[tt*$t,0,tt,gt-gt*$t,tt,gt],[0,V-2*gt],[0,gt*$t,-tt*$t,gt,-tt,gt],[2*tt-T,0],[-tt*$t,0,-tt,-gt*$t,-tt,-gt],[0,2*gt-V],[0,-gt*$t,tt*$t,-gt,tt,-gt]],d+tt,w,[1,1],_t,!0),this},p.__private__.ellipse=p.ellipse=function(d,w,T,V,tt){if(isNaN(d)||isNaN(w)||isNaN(T)||isNaN(V)||!Cr(tt))throw new Error("Invalid arguments passed to jsPDF.ellipse");var gt=4/3*(Math.SQRT2-1)*T,_t=4/3*(Math.SQRT2-1)*V;return oi(d+T,w),si(d+T,w-_t,d+gt,w-V,d,w-V),si(d-gt,w-V,d-T,w-_t,d-T,w),si(d-T,w+_t,d-gt,w+V,d,w+V),si(d+gt,w+V,d+T,w+_t,d+T,w),eo(tt),this},p.__private__.circle=p.circle=function(d,w,T,V){if(isNaN(d)||isNaN(w)||isNaN(T)||!Cr(V))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(d,w,T,T,V)},p.setFont=function(d,w,T){return T&&(w=et(w,T)),Bt=Xo(d,w,{disableWarning:!1}),this};var pl=p.__private__.getFont=p.getFont=function(){return ie[Xo.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var d,w,T={};for(d in ue)if(ue.hasOwnProperty(d))for(w in T[d]=[],ue[d])ue[d].hasOwnProperty(w)&&T[d].push(w);return T},p.addFont=function(d,w,T,V,tt){var gt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&gt.indexOf(arguments[3])!==-1?tt=arguments[3]:arguments[3]&&gt.indexOf(arguments[3])==-1&&(T=et(T,V)),Go.call(this,d,w,T,tt=tt||"Identity-H")};var Ii,ae=t.lineWidth||.200025,gl=p.__private__.getLineWidth=p.getLineWidth=function(){return ae},ml=p.__private__.setLineWidth=p.setLineWidth=function(d){return ae=d,F($(W(d))+" w"),this};p.__private__.setLineDash=te.API.setLineDash=te.API.setLineDashPattern=function(d,w){if(d=d||[],w=w||0,isNaN(w)||!Array.isArray(d))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return d=d.map(function(T){return $(W(T))}).join(" "),w=$(W(w)),F("["+d+"] "+w+" d"),this};var vl=p.__private__.getLineHeight=p.getLineHeight=function(){return xt*Ii};p.__private__.getLineHeight=p.getLineHeight=function(){return xt*Ii};var bl=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(d){return typeof(d=d||1.15)=="number"&&(Ii=d),this},wl=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return Ii};bl(t.lineHeight);var Hr=p.__private__.getHorizontalCoordinate=function(d){return W(d)},Wr=p.__private__.getVerticalCoordinate=function(d){return R===U?d:Ut[z].mediaBox.topRightY-Ut[z].mediaBox.bottomLeftY-W(d)},yl=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(d){return $(Hr(d))},xl=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(d){return $(Wr(d))},pa=t.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return Ar(pa)},p.__private__.setStrokeColor=p.setDrawColor=function(d,w,T,V){return pa=gr({ch1:d,ch2:w,ch3:T,ch4:V,pdfColorType:"draw",precision:2}),F(pa),this};var no=t.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return Ar(no)},p.__private__.setFillColor=p.setFillColor=function(d,w,T,V){return no=gr({ch1:d,ch2:w,ch3:T,ch4:V,pdfColorType:"fill",precision:2}),F(no),this};var Er=t.textColor||"0 g",_l=p.__private__.getTextColor=p.getTextColor=function(){return Ar(Er)};p.__private__.setTextColor=p.setTextColor=function(d,w,T,V){return Er=gr({ch1:d,ch2:w,ch3:T,ch4:V,pdfColorType:"text",precision:3}),this};var ga=t.charSpace,Nl=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(ga||0)};p.__private__.setCharSpace=p.setCharSpace=function(d){if(isNaN(d))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return ga=d,this};var ro=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(d){var w=p.CapJoinStyles[d];if(w===void 0)throw new Error("Line cap style of '"+d+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return ro=w,F(w+" J"),this};var li=0;p.__private__.setLineJoin=p.setLineJoin=function(d){var w=p.CapJoinStyles[d];if(w===void 0)throw new Error("Line join style of '"+d+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return li=w,F(w+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(d){if(d=d||0,isNaN(d))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return F($(W(d))+" M"),this},p.GState=Zs,p.setGState=function(d){(d=typeof d=="string"?Et[Ot[d]]:io(null,d)).equals(ne)||(F("/"+d.id+" gs"),ne=d)};var io=function(d,w){if(!d||!Ot[d]){var T=!1;for(var V in Et)if(Et.hasOwnProperty(V)&&Et[V].equals(w)){T=!0;break}if(T)w=Et[V];else{var tt="GS"+(Object.keys(Et).length+1).toString(10);Et[tt]=w,w.id=tt}return d&&(Ot[d]=w.id),se.publish("addGState",w),w}};p.addGState=function(d,w){return io(d,w),this},p.saveGraphicsState=function(){return F("q"),ke.push({key:Bt,size:xt,color:Er}),this},p.restoreGraphicsState=function(){F("Q");var d=ke.pop();return Bt=d.key,xt=d.size,Er=d.color,ne=null,this},p.setCurrentTransformationMatrix=function(d){return F(d.toString()+" cm"),this},p.comment=function(d){return F("#"+d),this};var Fi=function(d,w){var T=d||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return T},set:function(gt){isNaN(gt)||(T=parseFloat(gt))}});var V=w||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return V},set:function(gt){isNaN(gt)||(V=parseFloat(gt))}});var tt="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return tt},set:function(gt){tt=gt.toString()}}),this},ao=function(d,w,T,V){Fi.call(this,d,w),this.type="rect";var tt=T||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return tt},set:function(_t){isNaN(_t)||(tt=parseFloat(_t))}});var gt=V||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return gt},set:function(_t){isNaN(_t)||(gt=parseFloat(_t))}}),this},ma=function(){this.page=Dt,this.currentPage=z,this.pages=St.slice(0),this.pagesContext=Ut.slice(0),this.x=ot,this.y=Ct,this.matrix=Rt,this.width=ns(z),this.height=Vr(z),this.outputDestination=wt,this.id="",this.objectNumber=-1};ma.prototype.restore=function(){Dt=this.page,z=this.currentPage,Ut=this.pagesContext,St=this.pages,ot=this.x,Ct=this.y,Rt=this.matrix,$r(z,this.width),rs(z,this.height),wt=this.outputDestination};var oo=function(d,w,T,V,tt){cn.push(new ma),Dt=z=0,St=[],ot=d,Ct=w,Rt=tt,Ja([T,V])};for(var va in p.beginFormObject=function(d,w,T,V,tt){return oo(d,w,T,V,tt),this},p.endFormObject=function(d){return function(w){if(wn[w])cn.pop().restore();else{var T=new ma,V="Xo"+(Object.keys(Ie).length+1).toString(10);T.id=V,wn[w]=V,Ie[V]=T,se.publish("addFormObject",T),cn.pop().restore()}}(d),this},p.doFormObject=function(d,w){var T=Ie[wn[d]];return F("q"),F(w.toString()+" cm"),F("/"+T.id+" Do"),F("Q"),this},p.getFormObject=function(d){var w=Ie[wn[d]];return{x:w.x,y:w.y,width:w.width,height:w.height,matrix:w.matrix}},p.save=function(d,w){return d=d||"generated.pdf",(w=w||{}).returnPromise=w.returnPromise||!1,w.returnPromise===!1?(Yi(ua(Pr()),d),typeof Yi.unload=="function"&&oe.setTimeout&&setTimeout(Yi.unload,911),this):new Promise(function(T,V){try{var tt=Yi(ua(Pr()),d);typeof Yi.unload=="function"&&oe.setTimeout&&setTimeout(Yi.unload,911),T(tt)}catch(gt){V(gt.message)}})},te.API)te.API.hasOwnProperty(va)&&(va==="events"&&te.API.events.length?function(d,w){var T,V,tt;for(tt=w.length-1;tt!==-1;tt--)T=w[tt][0],V=w[tt][1],d.subscribe.apply(d,[T].concat(typeof V=="function"?[V]:V))}(se,te.API.events):p[va]=te.API[va]);function ns(d){return Ut[d].mediaBox.topRightX-Ut[d].mediaBox.bottomLeftX}function $r(d,w){Ut[d].mediaBox.topRightX=w+Ut[d].mediaBox.bottomLeftX}function Vr(d){return Ut[d].mediaBox.topRightY-Ut[d].mediaBox.bottomLeftY}function rs(d,w){Ut[d].mediaBox.topRightY=w+Ut[d].mediaBox.bottomLeftY}var is=p.getPageWidth=function(d){return ns(d=d||z)/ce},as=p.setPageWidth=function(d,w){$r(d,w*ce)},Ri=p.getPageHeight=function(d){return Vr(d=d||z)/ce},os=p.setPageHeight=function(d,w){rs(d,w*ce)};return p.internal={pdfEscape:lr,getStyle:ts,getFont:pl,getFontSize:Tt,getCharSpace:Nl,getTextColor:_l,getLineHeight:vl,getLineHeightFactor:wl,getLineWidth:gl,write:It,getHorizontalCoordinate:Hr,getVerticalCoordinate:Wr,getCoordinateString:yl,getVerticalCoordinateString:xl,collections:{},newObject:Ye,newAdditionalObject:Ci,newObjectDeferred:mn,newObjectDeferredBegin:yn,getFilters:mr,putStream:sr,events:se,scaleFactor:ce,pageSize:{getWidth:function(){return is(z)},setWidth:function(d){as(z,d)},getHeight:function(){return Ri(z)},setHeight:function(d){os(z,d)}},encryptionOptions:f,encryption:xn,getEncryptor:function(d){return f!==null?xn.encryptor(d,0):function(w){return w}},output:ha,getNumberOfPages:Ko,get pages(){return St},out:F,f2:x,f3:j,getPageInfo:Qo,getPageInfoByObjId:ll,getCurrentPageInfo:cl,getPDFVersion:k,Point:Fi,Rectangle:ao,Matrix:Gt,hasHotfix:Ur},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return is(z)},set:function(d){as(z,d)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return Ri(z)},set:function(d){os(z,d)},enumerable:!0,configurable:!0}),(function(d){for(var w=0,T=zt.length;w<T;w++){var V=Go.call(this,d[w][0],d[w][1],d[w][2],zt[w][3],!0);v===!1&&(b[V]=!0);var tt=d[w][0].split("-");Vo({id:V,fontName:tt[0],fontStyle:tt[1]||""})}se.publish("addFonts",{fonts:ie,dictionary:ue})}).call(p,zt),Bt="F1",Yo(i,n),se.publish("initialized"),p}Fa.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},Fa.prototype.toHexString=function(t){return t.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Fa.prototype.hexToBytes=function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(String.fromCharCode(parseInt(t.substr(n,2),16)));return e.join("")},Fa.prototype.processOwnerPassword=function(t,e){return Hc(Uc(e).substr(0,5),t)},Fa.prototype.encryptor=function(t,e){var n=Uc(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(r){return Hc(n,r)}},Zs.prototype.equals=function(t){var e,n="id,objectNumber,equals";if(!t||je(t)!==je(this))return!1;var r=0;for(e in this)if(!(n.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e)||this[e]!==t[e])return!1;r++}for(e in t)t.hasOwnProperty(e)&&n.indexOf(e)<0&&r--;return r===0},te.API={events:[]},te.version="4.2.1";var Xe=te.API,uu=1,aa=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ja=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},ra=function(t){return t.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var n=e.charCodeAt(0).toString(16).toUpperCase();return"#"+(n.length===1?"0"+n:n)})},fe=function(t){return t.toFixed(2)},xi=function(t){return t.toFixed(5)};Xe.__acroform__={};var Vn=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},hf=function(t){return t*uu},Or=function(t){var e=new g1,n=qt.internal.getHeight(t)||0,r=qt.internal.getWidth(t)||0;return e.BBox=[0,0,Number(fe(r)),Number(fe(n))],e},gm=Xe.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to 
82jsPDF.API.__acroform__.setBit");return t|1<<e},mm=Xe.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<e)},vm=Xe.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<e?1:0},nn=Xe.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return vm(t,e-1)},rn=Xe.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return gm(t,e-1)},an=Xe.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return mm(t,e-1)},bm=Xe.__acroform__.calculateCoordinates=function(t,e){var n=e.internal.getHorizontalCoordinate,r=e.internal.getVerticalCoordinate,i=t[0],a=t[1],l=t[2],s=t[3],u={};return u.lowerLeft_X=n(i)||0,u.lowerLeft_Y=r(a+s)||0,u.upperRight_X=n(i+l)||0,u.upperRight_Y=r(a)||0,[Number(fe(u.lowerLeft_X)),Number(fe(u.lowerLeft_Y)),Number(fe(u.upperRight_X)),Number(fe(u.upperRight_Y))]},wm=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],n=t._V||t.DV,r=Wc(t,n),i=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+i+" "+fe(r.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(r.text),e.push("ET"),e.push("Q"),e.push("EMC");var a=Or(t);return a.scope=t.scope,a.stream=e.join(`
83`),a}},Wc=function(t,e){var n=t.fontSize===0?t.maxFontSize:t.fontSize,r={text:"",fontSize:""},i=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");i=t.multiline?i.map(function(x){return x.split(`
84`)}):i.map(function(x){return[x]});var a=n,l=qt.internal.getHeight(t)||0;l=l<0?-l:l;var s=qt.internal.getWidth(t)||0;s=s<0?-s:s;var u=function(x,j,W){if(x+1<i.length){var q=j+" "+i[x+1][0];return Ts(q,t,W).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var h,f,v=Ts("3",t,a).height,b=t.multiline?l-a:(l-v)/2,p=b+=2,S=0,k=0,C=0;if(a<=0){e=`(...) Tj
85`,e+="% Width of Text: "+Ts(e,t,a=12).width+", FieldWidth:"+s+`
86`;break}for(var _="",O=0,U=0;U<i.length;U++)if(i.hasOwnProperty(U)){var R=!1;if(i[U].length!==1&&C!==i[U].length-1){if((v+2)*(O+2)+2>l)continue t;_+=i[U][C],R=!0,k=U,U--}else{_=(_+=i[U][C]+" ").substr(_.length-1)==" "?_.substr(0,_.length-1):_;var nt=parseInt(U),dt=u(nt,_,a),et=U>=i.length-1;if(dt&&!et){_+=" ",C=0;continue}if(dt||et){if(et)k=nt;else if(t.multiline&&(v+2)*(O+2)+2>l)continue t}else{if(!t.multiline||(v+2)*(O+2)+2>l)continue t;k=nt}}for(var $="",D=S;D<=k;D++){var J=i[D];if(t.multiline){if(D===k){$+=J[C]+" ",C=(C+1)%J.length;continue}if(D===S){$+=J[J.length-1]+" ";continue}}$+=J[0]+" "}switch($=$.substr($.length-1)==" "?$.substr(0,$.length-1):$,f=Ts($,t,a).width,t.textAlign){case"right":h=s-f-2;break;case"center":h=(s-f)/2;break;default:h=2}e+=fe(h)+" "+fe(p)+` Td
87`,e+="("+aa($)+`) Tj
88`,e+=-fe(h)+` 0 Td
89`,p=-(a+2),f=0,S=R?k:k+1,O++,_=""}break}return r.text=e,r.fontSize=a,r},Ts=function(t,e,n){var r=e.scope.internal.getFont(e.fontName,e.fontStyle),i=e.scope.getStringUnitWidth(t,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:e.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},ym={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},xm=function(t,e){var n={type:"reference",object:t};e.internal.getPageInfo(t.page).pageContext.annotations.find(function(r){return r.type===n.type&&r.object===n.object})===void 0&&e.internal.getPageInfo(t.page).pageContext.annotations.push(n)},_m=function(t,e){if(e.scope=t,t.internal!==void 0&&(t.internal.acroformPlugin===void 0||t.internal.acroformPlugin.isInitialized===!1)){if(Nr.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(ym)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");uu=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new m1,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){(function(n){n.internal.events.unsubscribe(n.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete n.internal.acroformPlugin.acroFormDictionaryRoot._eventID,n.internal.acroformPlugin.printedOut=!0})(t)}),t.internal.events.subscribe("buildDocument",function(){(function(n){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in r)if(r.hasOwnProperty(i)){var a=r[i];a.objId=void 0,a.hasAnnotation&&xm(a,n)}})(t)}),t.internal.events.subscribe("putCatalog",function(){(function(n){if(n.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");n.internal.write("/AcroForm "+n.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(t)}),t.internal.events.subscribe("postPutPages",function(n){(function(r,i){var a=!r;for(var l in r||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(l)){var s=r[l],u=[],h=s.Rect;if(s.Rect&&(s.Rect=bm(s.Rect,i)),i.internal.newObjectDeferredBegin(s.objId,!0),s.DA=qt.createDefaultAppearanceStream(s),je(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(u=s.getKeyValueListForStream()),s.Rect=h,s.hasAppearanceStream&&!s.appearanceStreamContent){var f=wm(s);u.push({key:"AP",value:"<</N "+f+">>"}),i.internal.acroformPlugin.xForms.push(f)}if(s.appearanceStreamContent){var v="";for(var b in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(b)){var p=s.appearanceStreamContent[b];if(v+="/"+b+" ",v+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var l in p)if(p.hasOwnProperty(l)){var S=p[l];typeof S=="function"&&(S=S.call(i,s)),v+="/"+l+" "+S+" ",i.internal.acroformPlugin.xForms.indexOf(S)>=0||i.internal.acroformPlugin.xForms.push(S)}}else typeof(S=p)=="function"&&(S=S.call(i,s)),v+="/"+l+" "+S,i.internal.acroformPlugin.xForms.indexOf(S)>=0||i.internal.acroformPlugin.xForms.push(S);v+=">>"}u.push({key:"AP",value:`<<
90`+v+">>"})}i.internal.putStream({additionalKeyValues:u,objectId:s.objId}),i.internal.out("endobj")}a&&function(k,C){for(var _ in k)if(k.hasOwnProperty(_)){var O=_,U=k[_];C.internal.newObjectDeferredBegin(U.objId,!0),je(U)==="object"&&typeof U.putStream=="function"&&U.putStream(),delete k[O]}}(i.internal.acroformPlugin.xForms,i)})(n,t)}),t.internal.acroformPlugin.isInitialized=!0}},p1=Xe.__acroform__.arrayToPdfArray=function(t,e,n){var r=function(l){return l};if(Array.isArray(t)){for(var i="[",a=0;a<t.length;a++)switch(a!==0&&(i+=" "),je(t[a])){case"boolean":case"number":case"object":i+=t[a].toString();break;case"string":t[a].substr(0,1)==="/"?i+="/"+ra(t[a].substr(1)):(e!==void 0&&n&&(r=n.internal.getEncryptor(e)),i+="("+
vendor: 21,909 bytes, lines 90-101
90aa(r(t[a].toString()))+")")}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},vc=function(t,e,n){var r=function(i){return i};return e!==void 0&&n&&(r=n.internal.getEncryptor(e)),(t=t||"").toString(),"("+aa(r(t))+")"},Dr=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Dr.prototype.toString=function(){return this.objId+" 0 R"},Dr.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},Dr.prototype.getKeyValueListForStream=function(){var t=[],e=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var n in e)if(Object.getOwnPropertyDescriptor(this,e[n]).configurable===!1){var r=e[n],i=this[r];i&&(Array.isArray(i)?t.push({key:r,value:p1(i,this.objId,this.scope)}):i instanceof Dr?(i.scope=this.scope,t.push({key:r,value:i.objId+" 0 R"})):typeof i!="function"&&t.push({key:r,value:i}))}return t};var g1=function(){Dr.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var t,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(n){t=n.trim()},get:function(){return t||null}})};Vn(g1,Dr);var m1=function(){Dr.call(this);var t,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var n=function(r){return r};return this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),"("+aa(n(t))+")"}},set:function(n){t=n}})};Vn(m1,Dr);var Nr=function t(){Dr.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(_){if(isNaN(_))throw new Error('Invalid value "'+_+'" for attribute F supplied.');e=_}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!nn(e,3)},set:function(_){_?this.F=rn(e,3):this.F=an(e,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(_){if(isNaN(_))throw new Error('Invalid value "'+_+'" for attribute Ff supplied.');n=_}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(_){r=_!==void 0?_:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(_){r[0]=_}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(_){r[1]=_}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(_){r[2]=_}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(_){r[3]=_}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(_){switch(_){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=_;break;default:throw new Error('Invalid value "'+_+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof Ks)return;a="FieldObject"+t.FieldNum++}var _=function(O){return O};return this.scope&&(_=this.scope.internal.getEncryptor(this.objId)),"("+aa(_(a))+")"},set:function(_){a=_.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(_){a=_}});var l="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return l},set:function(_){l=_}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(_){s=_}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(_){u=_}});var h=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return h===void 0?50/uu:h},set:function(_){h=_}});var f="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return f},set:function(_){f=_}});var v="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!v||this instanceof Ks||this instanceof Qi))return vc(v,this.objId,this.scope)},set:function(_){_=_.toString(),v=_}});var b=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(b)return this instanceof bn==0?vc(b,this.objId,this.scope):b},set:function(_){_=_.toString(),b=this instanceof bn==0?_.substr(0,1)==="("?ja(_.substr(1,_.length-2)):ja(_):_}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof bn==1?ja(b.substr(1,b.length-1)):b},set:function(_){_=_.toString(),b=this instanceof bn==1?"/"+ra(_):_}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(_){this.V=_}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof bn==0?vc(p,this.objId,this.scope):p},set:function(_){_=_.toString(),p=this instanceof bn==0?_.substr(0,1)==="("?ja(_.substr(1,_.length-2)):ja(_):_}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof bn==1?ja(p.substr(1,p.length-1)):p},set:function(_){_=_.toString(),p=this instanceof bn==1?"/"+ra(_):_}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var S,k=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return k},set:function(_){_=!!_,k=_}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(S)return S},set:function(_){S=_}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,1)},set:function(_){_?this.Ff=rn(this.Ff,1):this.Ff=an(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,2)},set:function(_){_?this.Ff=rn(this.Ff,2):this.Ff=an(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,3)},set:function(_){_?this.Ff=rn(this.Ff,3):this.Ff=an(this.Ff,3)}});var C=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(C!==null)return C},set:function(_){if([0,1,2].indexOf(_)===-1)throw new Error('Invalid value "'+_+'" for attribute Q supplied.');C=_}}),Object.defineProperty(this,"textAlign",{get:function(){var _;switch(C){case 0:default:_="left";break;case 1:_="center";break;case 2:_="right"}return _},configurable:!0,enumerable:!0,set:function(_){switch(_){case"right":case 2:C=2;break;case"center":case 1:C=1;break;default:C=0}}})};Vn(Nr,Dr);var Ma=function(){Nr.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(n){t=n}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return p1(e,this.objId,this.scope)},set:function(n){var r,i;i=[],typeof(r=n)=="string"&&(i=function(a,l,s){s||(s=1);for(var u,h=[];u=l.exec(a);)h.push(u[s]);return h}(r,/\((.*?)\)/g)),e=i}}),this.getOptions=function(){return e},this.setOptions=function(n){e=n,this.sort&&e.sort()},this.addOption=function(n){n=(n=n||"").toString(),e.push(n),this.sort&&e.sort()},this.removeOption=function(n,r){for(r=r||!1,n=(n=n||"").toString();e.indexOf(n)!==-1&&(e.splice(e.indexOf(n),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,18)},set:function(n){n?this.Ff=rn(this.Ff,18):this.Ff=an(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,19)},set:function(n){this.combo===!0&&(n?this.Ff=rn(this.Ff,19):this.Ff=an(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,20)},set:function(n){n?(this.Ff=rn(this.Ff,20),e.sort()):this.Ff=an(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,22)},set:function(n){n?this.Ff=rn(this.Ff,22):this.Ff=an(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,23)},set:function(n){n?this.Ff=rn(this.Ff,23):this.Ff=an(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,27)},set:function(n){n?this.Ff=rn(this.Ff,27):this.Ff=an(this.Ff,27)}}),this.hasAppearanceStream=!1};Vn(Ma,Nr);var Ba=function(){Ma.call(this),this.fontName="helvetica",this.combo=!1};Vn(Ba,Ma);var qa=function(){Ba.call(this),this.combo=!0};Vn(qa,Ba);var zs=function(){qa.call(this),this.edit=!0};Vn(zs,qa);var bn=function(){Nr.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,15)},set:function(n){n?this.Ff=rn(this.Ff,15):this.Ff=an(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,16)},set:function(n){n?this.Ff=rn(this.Ff,16):this.Ff=an(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,17)},set:function(n){n?this.Ff=rn(this.Ff,17):this.Ff=an(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,26)},set:function(n){n?this.Ff=rn(this.Ff,26):this.Ff=an(this.Ff,26)}});var t,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(a){return a};if(this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var r,i=[];for(r in i.push("<<"),e)i.push("/"+r+" ("+aa(n(e[r]))+")");return i.push(">>"),i.join(`
91`)}},set:function(n){je(n)==="object"&&(e=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(n){typeof n=="string"&&(e.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(n){var r=n==null?"":n.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),t="/"+ra(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(n){t="/"+ra(n)}})};Vn(bn,Nr);var Us=function(){bn.call(this),this.pushButton=!0};Vn(Us,bn);var za=function(){bn.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e!==void 0?e:[]}})};Vn(za,bn);var Ks=function(){var t,e;Nr.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(i){t=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(i){e=i}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(s){return s};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var a,l=[];for(a in l.push("<<"),r)l.push("/"+a+" ("+aa(i(r[a]))+")");return l.push(">>"),l.join(`
92`)},set:function(i){je(i)==="object"&&(r=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(i){typeof i=="string"&&(r.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(i){var a=i==null?"":i.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),n="/"+ra(a)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(i){var a=i==null?"":i.toString();a.substr(0,1)==="/"&&(a=a.substr(1)),n="/"+ra(a)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=qt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Vn(Ks,Nr),za.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var n=this.Kids[e];n.appearanceStreamContent=t.createAppearanceStream(n.optionName),n.caption=t.getCA()}},za.prototype.createOption=function(t){var e=new Ks;return e.Parent=this,e.optionName=t,this.Kids.push(e),Nm.call(this.scope,e),e};var Hs=function(){bn.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=qt.CheckBox.createAppearanceStream()};Vn(Hs,bn);var Qi=function(){Nr.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,13)},set:function(e){e?this.Ff=rn(this.Ff,13):this.Ff=an(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,21)},set:function(e){e?this.Ff=rn(this.Ff,21):this.Ff=an(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,23)},set:function(e){e?this.Ff=rn(this.Ff,23):this.Ff=an(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,24)},set:function(e){e?this.Ff=rn(this.Ff,24):this.Ff=an(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,25)},set:function(e){e?this.Ff=rn(this.Ff,25):this.Ff=an(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,26)},set:function(e){e?this.Ff=rn(this.Ff,26):this.Ff=an(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Vn(Qi,Nr);var Ws=function(){Qi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!nn(this.Ff,14)},set:function(t){t?this.Ff=rn(this.Ff,14):this.Ff=an(this.Ff,14)}}),this.password=!0};Vn(Ws,Qi);var qt={CheckBox:{createAppearanceStream:function(){return{N:{On:qt.CheckBox.YesNormal},D:{On:qt.CheckBox.YesPushDown,Off:qt.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=Or(t);e.scope=t.scope;var n=[],r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),a=Wc(t,t.caption);return n.push("0.749023 g"),n.push("0 0 "+fe(qt.internal.getWidth(t))+" "+fe(qt.internal.getHeight(t))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+r+" "+fe(a.fontSize)+" Tf "+i),n.push("BT"),n.push(a.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join(`
93`),e},YesNormal:function(t){var e=Or(t);e.scope=t.scope;var n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color),i=[],a=qt.internal.getHeight(t),l=qt.internal.getWidth(t),s=Wc(t,t.caption);return i.push("1 g"),i.push("0 0 "+fe(l)+" "+fe(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+fe(l-1)+" "+fe(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+n+" "+fe(s.fontSize)+" Tf "+r),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join(`
94`),e},OffPushDown:function(t){var e=Or(t);e.scope=t.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+fe(qt.internal.getWidth(t))+" "+fe(qt.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join(`
95`),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:qt.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=qt.RadioButton.Circle.YesNormal,e.D[t]=qt.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=Or(t);e.scope=t.scope;var n=[],r=qt.internal.getWidth(t)<=qt.internal.getHeight(t)?qt.internal.getWidth(t)/4:qt.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var i=qt.internal.Bezier_C,a=Number((r*i).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+xi(qt.internal.getWidth(t)/2)+" "+xi(qt.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
96`),e},YesPushDown:function(t){var e=Or(t);e.scope=t.scope;var n=[],r=qt.internal.getWidth(t)<=qt.internal.getHeight(t)?qt.internal.getWidth(t)/4:qt.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*qt.internal.Bezier_C).toFixed(5)),l=Number((r*qt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+xi(qt.internal.getWidth(t)/2)+" "+xi(qt.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),n.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),n.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),n.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+xi(qt.internal.getWidth(t)/2)+" "+xi(qt.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+l+" "+l+" "+r+" 0 "+r+" c"),n.push("-"+l+" "+r+" -"+r+" "+l+" -"+r+" 0 c"),n.push("-"+r+" -"+l+" -"+l+" -"+r+" 0 -"+r+" c"),n.push(l+" -"+r+" "+r+" -"+l+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
97`),e},OffPushDown:function(t){var e=Or(t);e.scope=t.scope;var n=[],r=qt.internal.getWidth(t)<=qt.internal.getHeight(t)?qt.internal.getWidth(t)/4:qt.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*qt.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+xi(qt.internal.getWidth(t)/2)+" "+xi(qt.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),n.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),n.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),n.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(`
98`),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:qt.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=qt.RadioButton.Cross.YesNormal,e.D[t]=qt.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=Or(t);e.scope=t.scope;var n=[],r=qt.internal.calculateCross(t);return n.push("q"),n.push("1 1 "+fe(qt.internal.getWidth(t)-2)+" "+fe(qt.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(fe(r.x1.x)+" "+fe(r.x1.y)+" m"),n.push(fe(r.x2.x)+" "+fe(r.x2.y)+" l"),n.push(fe(r.x4.x)+" "+fe(r.x4.y)+" m"),n.push(fe(r.x3.x)+" "+fe(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
99`),e},YesPushDown:function(t){var e=Or(t);e.scope=t.scope;var n=qt.internal.calculateCross(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+fe(qt.internal.getWidth(t))+" "+fe(qt.internal.getHeight(t))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+fe(qt.internal.getWidth(t)-2)+" "+fe(qt.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(fe(n.x1.x)+" "+fe(n.x1.y)+" m"),r.push(fe(n.x2.x)+" "+fe(n.x2.y)+" l"),r.push(fe(n.x4.x)+" "+fe(n.x4.y)+" m"),r.push(fe(n.x3.x)+" "+fe(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join(`
100`),e},OffPushDown:function(t){var e=Or(t);e.scope=t.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+fe(qt.internal.getWidth(t))+" "+fe(qt.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join(`
101`),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+n}};qt.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=qt.internal.getWidth(t),n=qt.internal.getHeight(t),r=Math.min(e,n);return{x1:{x:(e-r)/2,y:(n-r)/2+r},x2:{x:(e-r)/2+r,y:(n-r)/2},x3:{x:(e-r)/2,y:(n-r)/2},x4:{x:(e-r)/2+r,y:(n-r)/2+r}}}},qt.internal.getWidth=function(t){var e=0;return je(t)==="object"&&(e=hf(t.Rect[2])),e},qt.internal.getHeight=function(t){var e=0;return je(t)==="object"&&(e=hf(t.Rect[3])),e};var Nm=Xe.addField=function(t){if(_m(this,t),!(t instanceof Nr))throw new Error("Invalid argument passed to 
101jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};Xe.AcroFormChoiceField=Ma,Xe.AcroFormListBox=Ba,Xe.AcroFormComboBox=qa,Xe.AcroFormEditBox=zs,Xe.AcroFormButton=bn,Xe.AcroFormPushButton=Us,Xe.AcroFormRadioButton=za,Xe.AcroFormCheckBox=Hs,Xe.AcroFormTextField=Qi,Xe.AcroFormPasswordField=Ws,Xe.AcroFormAppearance=qt,Xe.AcroForm={ChoiceField:Ma,ListBox:Ba,ComboBox:qa,EditBox:zs,Button:bn,PushButton:Us,RadioButton:za,CheckBox:Hs,TextField:Qi,PasswordField:Ws,Appearance:qt},te.AcroForm={ChoiceField:Ma,ListBox:Ba,ComboBox:qa,EditBox:zs,Button:bn,PushButton:Us,RadioButton:za,CheckBox:Hs,TextField:Qi,PasswordField:Ws,Appearance:qt};function v1(t){return t.reduce(function(e,n,r){return e[n]=r,e},{})}(function(t){var e="addImage_";t.__addimage__={};var n="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=t.__addimage__.getImageFileTypeByImageData=function(x,j){var W,q,Q,
vendor: 86,928 bytes, lines 101-138
101ct,at,K=n;if((j=j||n)==="RGBA"||x.data!==void 0&&x.data instanceof Uint8ClampedArray&&"height"in x&&"width"in x)return"RGBA";if(dt(x))for(at in r)for(Q=r[at],W=0;W<Q.length;W+=1){for(ct=!0,q=0;q<Q[W].length;q+=1)if(Q[W][q]!==void 0&&Q[W][q]!==x[q]){ct=!1;break}if(ct===!0){K=at;break}}else for(at in r)for(Q=r[at],W=0;W<Q.length;W+=1){for(ct=!0,q=0;q<Q[W].length;q+=1)if(Q[W][q]!==void 0&&Q[W][q]!==x.charCodeAt(q)){ct=!1;break}if(ct===!0){K=at;break}}return K===n&&j!==n&&(K=j),K},a=function x(j){for(var W=this.internal.write,q=this.internal.putStream,Q=(0,this.internal.getFilters)();Q.indexOf("FlateEncode")!==-1;)Q.splice(Q.indexOf("FlateEncode"),1);j.objectId=this.internal.newObject();var ct=[];if(ct.push({key:"Type",value:"/XObject"}),ct.push({key:"Subtype",value:"/Image"}),ct.push({key:"Width",value:j.width}),ct.push({key:"Height",value:j.height}),j.colorSpace===_.INDEXED?ct.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(j.palette.length/3-1)+" "+("sMask"in j&&j.sMask!==void 0?j.objectId+2:j.objectId+1)+" 0 R]"}):(ct.push({key:"ColorSpace",value:"/"+j.colorSpace}),j.colorSpace===_.DEVICE_CMYK&&ct.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ct.push({key:"BitsPerComponent",value:j.bitsPerComponent}),"decodeParameters"in j&&j.decodeParameters!==void 0&&ct.push({key:"DecodeParms",value:"<<"+j.decodeParameters+">>"}),"transparency"in j&&Array.isArray(j.transparency)&&j.transparency.length>0){for(var at="",K=0,ht=j.transparency.length;K<ht;K++)at+=j.transparency[K]+" "+j.transparency[K]+" ";ct.push({key:"Mask",value:"["+at+"]"})}j.sMask!==void 0&&ct.push({key:"SMask",value:j.objectId+1+" 0 R"});var At=j.filter!==void 0?["/"+j.filter]:void 0;if(q({data:j.data,additionalKeyValues:ct,alreadyAppliedFilters:At,objectId:j.objectId}),W("endobj"),"sMask"in j&&j.sMask!==void 0){var pt,A=(pt=j.sMaskBitsPerComponent)!==null&&pt!==void 0?pt:j.bitsPerComponent,z={width:j.width,height:j.height,colorSpace:"DeviceGray",bitsPerComponent:A,data:j.sMask};"filter"in j&&(z.decodeParameters="/Predictor ".concat(j.predictor," /Colors 1 /BitsPerComponent ").concat(A," /Columns ").concat(j.width),z.filter=j.filter),x.call(this,z)}if(j.colorSpace===_.INDEXED){var H=this.internal.newObject();q({data:$(new Uint8Array(j.palette)),objectId:H}),W("endobj")}},l=function(){var x=this.internal.collections[e+"images"];for(var j in x)a.call(this,x[j])},s=function(){var x,j=this.internal.collections[e+"images"],W=this.internal.write;for(var q in j)W("/I"+(x=j[q]).index,x.objectId,"0","R")},u=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",l),this.internal.events.subscribe("putXobjectDict",s))},h=function(){var x=this.internal.collections[e+"images"];return u.call(this),x},f=function(){return Object.keys(this.internal.collections[e+"images"]).length},v=function(x){return typeof t["process"+x.toUpperCase()]=="function"},b=function(x){return je(x)==="object"&&x.nodeType===1},p=function(x,j){if(x.nodeName==="IMG"&&x.hasAttribute("src")){var W=""+x.getAttribute("src");if(W.indexOf("data:image/")===0)return qs(unescape(W).split("base64,").pop());var q=t.loadFile(W,!0);if(q!==void 0)return q}if(x.nodeName==="CANVAS"){if(x.width===0||x.height===0)throw new Error("Given canvas must have data. Canvas width: "+x.width+", height: "+x.height);var Q;switch(j){case"PNG":Q="image/png";break;case"WEBP":Q="image/webp";break;default:Q="image/jpeg"}return qs(x.toDataURL(Q,1).split("base64,").pop())}},S=function(x){var j=this.internal.collections[e+"images"];if(j){for(var W in j)if(x===j[W].alias)return j[W]}},k=function(x,j,W){return x||j||(x=-96,j=-96),x<0&&(x=-1*W.width*72/x/this.internal.scaleFactor),j<0&&(j=-1*W.height*72/j/this.internal.scaleFactor),x===0&&(x=j*W.width/W.height),j===0&&(j=x*W.height/W.width),[x,j]},C=function(x,j,W,q,Q,ct){var at=k.call(this,W,q,Q),K=this.internal.getCoordinateString,ht=this.internal.getVerticalCoordinateString,At=h.call(this);if(W=at[0],q=at[1],At[Q.index]=Q,ct){ct*=Math.PI/180;var pt=Math.cos(ct),A=Math.sin(ct),z=function(G){return G.toFixed(4)},H=[z(pt),z(A),z(-1*A),z(pt),0,0,"cm"]}this.internal.write("q"),ct?(this.internal.write([1,"0","0",1,K(x),ht(j+q),"cm"].join(" ")),this.internal.write(H.join(" ")),this.internal.write([K(W),"0","0",K(q),"0","0","cm"].join(" "))):this.internal.write([K(W),"0","0",K(q),K(x),ht(j+q),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+Q.index+" Do"),this.internal.write("Q")},_=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var O=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},U=t.__addimage__.sHashCode=function(x){var j,W,q=0;if(typeof x=="string")for(W=x.length,j=0;j<W;j++)q=(q<<5)-q+x.charCodeAt(j),q|=0;else if(dt(x))for(W=x.byteLength/2,j=0;j<W;j++)q=(q<<5)-q+x[j],q|=0;return q},R=t.__addimage__.validateStringAsBase64=function(x){(x=x||"").toString().trim();var j=!0;return x.length===0&&(j=!1),x.length%4!=0&&(j=!1),/^[A-Za-z0-9+/]+$/.test(x.substr(0,x.length-2))===!1&&(j=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(x.substr(-2))===!1&&(j=!1),j},nt=t.__addimage__.extractImageFromDataUrl=function(x){if(x==null||!(x=x.trim()).startsWith("data:"))return null;var j=x.indexOf(",");return j<0?null:x.substring(0,j).trim().endsWith("base64")?x.substring(j+1):null};t.__addimage__.isArrayBuffer=function(x){return x instanceof ArrayBuffer};var dt=t.__addimage__.isArrayBufferView=function(x){return x instanceof Int8Array||x instanceof Uint8Array||x instanceof Uint8ClampedArray||x instanceof Int16Array||x instanceof Uint16Array||x instanceof Int32Array||x instanceof Uint32Array||x instanceof Float32Array||x instanceof Float64Array},et=t.__addimage__.binaryStringToUint8Array=function(x){for(var j=x.length,W=new Uint8Array(j),q=0;q<j;q++)W[q]=x.charCodeAt(q);return W},$=t.__addimage__.arrayBufferToBinaryString=function(x){for(var j="",W=dt(x)?x:new Uint8Array(x),q=0;q<W.length;q+=8192)j+=String.fromCharCode.apply(null,W.subarray(q,q+8192));return j};t.addImage=function(){var x,j,W,q,Q,ct,at,K,ht;if(typeof arguments[1]=="number"?(j=n,W=arguments[1],q=arguments[2],Q=arguments[3],ct=arguments[4],at=arguments[5],K=arguments[6],ht=arguments[7]):(j=arguments[1],W=arguments[2],q=arguments[3],Q=arguments[4],ct=arguments[5],at=arguments[6],K=arguments[7],ht=arguments[8]),je(x=arguments[0])==="object"&&!b(x)&&"imageData"in x){var At=x;x=At.imageData,j=At.format||j||n,W=At.x||W||0,q=At.y||q||0,Q=At.w||At.width||Q,ct=At.h||At.height||ct,at=At.alias||at,K=At.compression||K,ht=At.rotation||At.angle||ht}var pt=this.internal.getFilters();if(K===void 0&&pt.indexOf("FlateEncode")!==-1&&(K="SLOW"),isNaN(W)||isNaN(q))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var A=D.call(this,x,j,at,K);return C.call(this,W,q,Q,ct,A,ht),this};var D=function(x,j,W,q){var Q,ct,at;if(typeof x=="string"&&i(x)===n){x=unescape(x);var K=J(x,!1);(K!==""||(K=t.loadFile(x,!0))!==void 0)&&(x=K)}if(b(x)&&(x=p(x,j)),j=i(x,j),!v(j))throw new Error("addImage does not support files of type '"+j+"', please ensure that a plugin for '"+j+"' support is added.");if(((at=W)==null||at.length===0)&&(W=function(ht){return typeof ht=="string"||dt(ht)?U(ht):dt(ht.data)?U(ht.data):null}(x)),(Q=S.call(this,W))||(x instanceof Uint8Array||j==="RGBA"||(ct=x,x=et(x)),Q=this["process"+j.toUpperCase()](x,f.call(this),W,function(ht){return ht&&typeof ht=="string"&&(ht=ht.toUpperCase()),ht in t.image_compression?ht:O.NONE}(q),ct)),!Q)throw new Error("An unknown error occurred whilst processing the image.");return Q},J=t.__addimage__.convertBase64ToBinaryString=function(x,j){j=typeof j!="boolean"||j;var W,q="";if(typeof x=="string"){var Q;W=(Q=nt(x))!==null&&Q!==void 0?Q:x;try{q=qs(W)}catch(ct){if(j)throw R(W)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ct.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return q};t.getImageProperties=function(x){var j,W,q="";if(b(x)&&(x=p(x)),typeof x=="string"&&i(x)===n&&((q=J(x,!1))===""&&(q=t.loadFile(x)||""),x=q),W=i(x),!v(W))throw new Error("addImage does not support files of type '"+W+"', please ensure that a plugin for '"+W+"' support is added.");if(x instanceof Uint8Array||(x=et(x)),!(j=this["process"+W.toUpperCase()](x)))throw new Error("An unknown error occurred whilst processing the image");return j.fileType=W,j}})(te.API),function(t){var e=function(n){if(n!==void 0&&n!="")return!0};te.API.events.push(["addPage",function(n){this.internal.getPageInfo(n.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(n){for(var r,i,a,l=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(n.objId),h=n.pageContext.annotations,f=!1,v=0;v<h.length&&!f;v++)switch((r=h[v]).type){case"link":(e(r.options.url)||e(r.options.pageNumber))&&(f=!0);break;case"reference":case"text":case"freetext":f=!0}if(f!=0){this.internal.write("/Annots [");for(var b=0;b<h.length;b++){r=h[b];var p=this.internal.pdfEscape,S=this.internal.getEncryptor(n.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var k=this.internal.newAdditionalObject(),C=this.internal.newAdditionalObject(),_=this.internal.getEncryptor(k.objId),O=r.title||"Note";a="<</Type /Annot /Subtype /Text "+(i="/Rect ["+l(r.bounds.x)+" "+s(r.bounds.y+r.bounds.h)+" "+l(r.bounds.x+r.bounds.w)+" "+s(r.bounds.y)+"] ")+"/Contents ("+p(_(r.contents))+")",a+=" /Popup "+C.objId+" 0 R",a+=" /P "+u.objId+" 0 R",a+=" /T ("+p(_(O))+") >>",k.content=a;var U=k.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+l(r.bounds.x+30)+" "+s(r.bounds.y+r.bounds.h)+" "+l(r.bounds.x+r.bounds.w+30)+" "+s(r.bounds.y)+"] ")+" /Parent "+U,r.open&&(a+=" /Open true"),a+=" >>",C.content=a,this.internal.write(k.objId,"0 R",C.objId,"0 R");break;case"freetext":i="/Rect ["+l(r.bounds.x)+" "+s(r.bounds.y)+" "+l(r.bounds.x+r.bounds.w)+" "+s(r.bounds.y+r.bounds.h)+"] ";var R="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+p(S(r.contents))+")",a+=" /DS("+p(S(R))+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(r.options.name){var nt=this.annotations._nameMap[r.options.name];r.options.pageNumber=nt.page,r.options.top=nt.y}else r.options.top||(r.options.top=0);if(i="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",a="",r.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+p(S(r.options.url))+") >>";else if(r.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,a+=" /FitV "+r.options.left+"]";break;default:var dt=s(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),a+=" /XYZ "+r.options.left+" "+dt+" "+r.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),t.createAnnotation=function(n){var r=this.internal.getCurrentPageInfo();switch(n.type){case"link":this.link(n.bounds.x,n.bounds.y,n.bounds.w,n.bounds.h,n);break;case"text":case"freetext":r.pageContext.annotations.push(n)}},t.link=function(n,r,i,a,l){var s=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:u(n),y:h(r),w:u(n+i),h:h(r+a)},options:l,type:"link"})},t.textWithLink=function(n,r,i,a){var l,s,u=this.getTextWidth(n),h=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){s=a.maxWidth;var f=this.splitTextToSize(n,s).length;l=Math.ceil(h*f)}else s=u,l=h;return this.text(n,r,i,a),i+=.2*h,a.align==="center"&&(r-=u/2),a.align==="right"&&(r-=u),this.link(r,i-h,s,l,a),u},t.getTextWidth=function(n){var r=this.internal.getFontSize();return this.getStringUnitWidth(n)*r/this.internal.scaleFactor}}(te.API),function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];t.__arabicParser__={};var a=t.__arabicParser__.isInArabicSubstitutionA=function(k){return e[k.charCodeAt(0)]!==void 0},l=t.__arabicParser__.isArabicLetter=function(k){return typeof k=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(k)},s=t.__arabicParser__.isArabicEndLetter=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length<=2},u=t.__arabicParser__.isArabicAlfLetter=function(k){return l(k)&&i.indexOf(k.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length>=1};var h=t.__arabicParser__.arabicLetterHasFinalForm=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length>=3};var f=t.__arabicParser__.arabicLetterHasMedialForm=function(k){return l(k)&&a(k)&&e[k.charCodeAt(0)].length==4},v=t.__arabicParser__.resolveLigatures=function(k){var C=0,_=n,O="",U=0;for(C=0;C<k.length;C+=1)_[k.charCodeAt(C)]!==void 0?(U++,typeof(_=_[k.charCodeAt(C)])=="number"&&(O+=String.fromCharCode(_),_=n,U=0),C===k.length-1&&(_=n,O+=k.charAt(C-(U-1)),C-=U-1,U=0)):(_=n,O+=k.charAt(C-U),C-=U,U=0);return O};t.__arabicParser__.isArabicDiacritic=function(k){return k!==void 0&&r[k.charCodeAt(0)]!==void 0};var b=t.__arabicParser__.getCorrectForm=function(k,C,_){return l(k)?a(k)===!1?-1:!h(k)||!l(C)&&!l(_)||!l(_)&&s(C)||s(k)&&!l(C)||s(k)&&u(C)||s(k)&&s(C)?0:f(k)&&l(C)&&!s(C)&&l(_)&&h(_)?3:s(k)||!l(_)?1:2:-1},p=function(k){var C=0,_=0,O=0,U="",R="",nt="",dt=(k=k||"").split("\\s+"),et=[];for(C=0;C<dt.length;C+=1){for(et.push(""),_=0;_<dt[C].length;_+=1)U=dt[C][_],R=dt[C][_-1],nt=dt[C][_+1],l(U)?(O=b(U,R,nt),et[C]+=O!==-1?String.fromCharCode(e[U.charCodeAt(0)][O]):U):et[C]+=U;et[C]=v(et[C])}return et.join(" ")},S=t.__arabicParser__.processArabic=t.processArabic=function(){var k,C=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,_=[];if(Array.isArray(C)){var O=0;for(_=[],O=0;O<C.length;O+=1)Array.isArray(C[O])?_.push([p(C[O][0]),C[O][1],C[O][2]]):_.push([p(C[O])]);k=_}else k=p(C);return typeof arguments[0]=="string"?k:(arguments[0].text=k,arguments[0])};t.events.push(["preProcessText",S])}(te.API),te.API.autoPrint=function(t){var e;return(t=t||{}).variant=t.variant||"non-conform",t.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},function(t){var e=function(){var n=void 0;Object.defineProperty(this,"pdf",{get:function(){return n},set:function(s){n=s}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(s){r=isNaN(s)||Number.isInteger(s)===!1||s<0?150:s,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(s){i=isNaN(s)||Number.isInteger(s)===!1||s<0?300:s,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(s){a=s}});var l={};Object.defineProperty(this,"style",{get:function(){return l},set:function(s){l=s}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(n,r){var i;if((n=n||"2d")!=="2d")return null;for(i in r)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=r[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(te.API),function(t){var e={left:0,top:0,bottom:0,right:0},n=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(k){u=k}});var h=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return h},set:function(k){h=k}});var f=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return f},set:function(k){f=k}});var v=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return v},set:function(k){v=k}});var b=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return b},set:function(k){b=k}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(k){p=k}});var S=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return S},set:function(k){S=k}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(u){return r.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},t.getTextDimensions=function(u,h){r.call(this);var f=(h=h||{}).fontSize||this.getFontSize(),v=h.font||this.getFont(),b=h.scaleFactor||this.internal.scaleFactor,p=0,S=0,k=0,C=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");u=String(u)}var _=h.maxWidth;_>0?typeof u=="string"?u=this.splitTextToSize(u,_):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(U,R){return U.concat(C.splitTextToSize(R,_))},[])):u=Array.isArray(u)?u:[u];for(var O=0;O<u.length;O++)p<(k=this.getStringUnitWidth(u[O],{font:v})*f)&&(p=k);return p!==0&&(S=u.length),{w:p/=b,h:Math.max((S*f*this.getLineHeightFactor()-f*(this.getLineHeightFactor()-1))/b,0)}},t.cellAddPage=function(){r.call(this),this.addPage();var u=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new a(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var l=t.cell=function(){var u;u=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var h=this.internal.__cell__.lastCell,f=this.internal.__cell__.padding,v=this.internal.__cell__.margins||e,b=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return h.lineNumber!==void 0&&(h.lineNumber===u.lineNumber?(u.x=(h.x||0)+(h.width||0),u.y=h.y||0):h.y+h.height+u.height+v.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=v.top,p&&b&&(this.printHeaderRow(u.lineNumber,!0),u.y+=b[0].height)):u.y=h.y+h.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,n===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-f,u.y+f,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+f,{align:"center",baseline:"top",maxWidth:u.width-f-f}):this.text(u.text,u.x+f,u.y+f,{align:"left",baseline:"top",maxWidth:u.width-f-f})),this.internal.__cell__.lastCell=u,this};t.table=function(u,h,f,v,b){if(r.call(this),!f)throw new Error("No data for PDF table.");var p,S,k,C,_=[],O=[],U=[],R={},nt={},dt=[],et=[],$=(b=b||{}).autoSize||!1,D=b.printHeaders!==!1,J=b.css&&b.css["font-size"]!==void 0?16*b.css["font-size"]:b.fontSize||12,x=b.margins||Object.assign({width:this.getPageWidth()},e),j=typeof b.padding=="number"?b.padding:3,W=b.headerBackgroundColor||"#c8c8c8",q=b.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=D,this.internal.__cell__.margins=x,this.internal.__cell__.table_font_size=J,this.internal.__cell__.padding=j,this.internal.__cell__.headerBackgroundColor=W,this.internal.__cell__.headerTextColor=q,this.setFontSize(J),v==null)O=_=Object.keys(f[0]),U=_.map(function(){return"left"});else if(Array.isArray(v)&&je(v[0])==="object")for(_=v.map(function(At){return At.name}),O=v.map(function(At){return At.prompt||At.name||""}),U=v.map(function(At){return At.align||"left"}),p=0;p<v.length;p+=1)nt[v[p].name]=.7499990551181103*v[p].width;else Array.isArray(v)&&typeof v[0]=="string"&&(O=_=v,U=_.map(function(){return"left"}));if($||Array.isArray(v)&&typeof v[0]=="string")for(p=0;p<_.length;p+=1){for(R[C=_[p]]=f.map(function(At){return At[C]}),this.setFont(void 0,"bold"),dt.push(this.getTextDimensions(O[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),S=R[C],this.setFont(void 0,"normal"),k=0;k<S.length;k+=1)dt.push(this.getTextDimensions(S[k],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);nt[C]=Math.max.apply(null,dt)+j+j,dt=[]}if(D){var Q={};for(p=0;p<_.length;p+=1)Q[_[p]]={},Q[_[p]].text=O[p],Q[_[p]].align=U[p];var ct=s.call(this,Q,nt);et=_.map(function(At){return new a(u,h,nt[At],ct,Q[At].text,void 0,Q[At].align)}),this.setTableHeaderRow(et),this.printHeaderRow(1,!1)}var at=v.reduce(function(At,pt){return At[pt.name]=pt.align,At},{});for(p=0;p<f.length;p+=1){"rowStart"in b&&b.rowStart instanceof Function&&b.rowStart({row:p,data:f[p]},this);var K=s.call(this,f[p],nt);for(k=0;k<_.length;k+=1){var ht=f[p][_[k]];"cellStart"in b&&b.cellStart instanceof Function&&b.cellStart({row:p,col:k,data:ht},this),l.call(this,new a(u,h,nt[_[k]],K,ht,p+2,at[_[k]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=h,this};var s=function(u,h){var f=this.internal.__cell__.padding,v=this.internal.__cell__.table_font_size,b=this.internal.scaleFactor;return Object.keys(u).map(function(p){var S=u[p];return this.splitTextToSize(S.hasOwnProperty("text")?S.text:S,h[p]-f-f)},this).map(function(p){return this.getLineHeightFactor()*p.length*v/b+f+f},this).reduce(function(p,S){return Math.max(p,S)},0)};t.setTableHeaderRow=function(u){r.call(this),this.internal.__cell__.tableHeaderRow=u},t.printHeaderRow=function(u,h){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var f;if(n=!0,typeof this.internal.__cell__.headerFunction=="function"){var v=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(v[0],v[1],v[2],v[3],void 0,-1)}this.setFont(void 0,"bold");for(var b=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){f=this.internal.__cell__.tableHeaderRow[p].clone(),h&&(f.y=this.internal.__cell__.margins.top||0,b.push(f)),f.lineNumber=u;var S=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),l.call(this,f),this.setTextColor(S)}b.length>0&&this.setTableHeaderRow(b),this.setFont(void 0,"normal"),n=!1}}(te.API);var b1={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},w1=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],$c=v1(w1),y1=[100,200,300,400,500,600,700,800,900],Sm=v1(y1);function bc(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),n=function(a){return b1[a=a||"normal"]?a:"normal"}(t.style),r=function(a){return a?typeof a=="number"?a>=100&&a<=900&&a%100==0?a:400:/^\d00$/.test(a)?parseInt(a):a==="bold"?700:400:400}(t.weight),i=function(a){return typeof $c[a=a||"normal"]=="number"?a:"normal"}(t.stretch);return{family:e,style:n,weight:r,stretch:i,src:t.src||[],ref:t.ref||{name:e,style:[i,n,r].join(" ")}}}function ff(t,e,n,r){var i;for(i=n;i>=0&&i<e.length;i+=r)if(t[e[i]])return t[e[i]];for(i=n;i>=0&&i<e.length;i-=r)if(t[e[i]])return t[e[i]]}var Am={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},df={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function pf(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function gf(t){return t.trimLeft()}function Lm(t,e){for(var n=0;n<t.length;){if(t.charAt(n)===e)return[t.substring(0,n),t.substring(n+1)];n+=1}return null}function km(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],t.substring(e[0].length)]}var Ia,Ds,mf,vf,bf,wc=["times"];function wf(t,e,n,r,i){var a=4,l=xf;switch(i){case te.API.image_compression.FAST:a=1,l=yf;break;case te.API.image_compression.MEDIUM:a=6,l=_f;break;case te.API.image_compression.SLOW:a=9,l=Nf}t=function(u,h,f,v){for(var b,p=u.length/h,S=new Uint8Array(u.length+p),k=[Pm,yf,xf,_f,Nf],C=0;C<p;C+=1){var _=C*h,O=u.subarray(_,_+h);if(v)S.set(v(O,f,b),_+C);else{for(var U=k.length,R=[],nt=0;nt<U;nt+=1)R[nt]=k[nt](O,f,b);var dt=Em(R.concat());S.set(R[dt],_+C)}b=O}return S}(t,e,Math.ceil(n*r/8),l);var s=Ic(t,{level:a});return te.API.__addimage__.arrayBufferToBinaryString(s)}function Pm(t){var e=Array.apply([],t);return e.unshift(0),e}function yf(t,e){var n=t.length,r=[];r[0]=1;for(var i=0;i<n;i+=1){var a=t[i-e]||0;r[i+1]=t[i]-a+256&255}return r}function xf(t,e,n){var r=t.length,i=[];i[0]=2;for(var a=0;a<r;a+=1){var l=n&&n[a]||0;i[a+1]=t[a]-l+256&255}return i}function _f(t,e,n){var r=t.length,i=[];i[0]=3;for(var a=0;a<r;a+=1){var l=t[a-e]||0,s=n&&n[a]||0;i[a+1]=t[a]+256-(l+s>>>1)&255}return i}function Nf(t,e,n){var r=t.length,i=[];i[0]=4;for(var a=0;a<r;a+=1){var l=Cm(t[a-e]||0,n&&n[a]||0,n&&n[a-e]||0);i[a+1]=t[a]-l+256&255}return i}function Cm(t,e,n){if(t===e&&e===n)return t;var r=Math.abs(e-n),i=Math.abs(t-n),a=Math.abs(t+e-n-n);return r<=i&&r<=a?t:i<=a?e:n}function Em(t){var e=t.map(function(n){return n.reduce(function(r,i){return r+Math.abs(i)},0)});return e.indexOf(Math.min.apply(null,e))}function yc(t,e,n){var r=e*n,i=Math.floor(r/8),a=16-(r-8*i+n),l=(1<<n)-1;return x1(t,i)>>a&l}function Sf(t,e,n,r){var i=n*r,a=Math.floor(i/8),l=16-(i-8*a+r),s=(1<<r)-1,u=(e&s)<<l;(function(h,f,v){if(f+1<h.byteLength)h.setUint16(f,v,!1);else{var b=v>>8&255;h.setUint8(f,b)}})(t,a,x1(t,a)&~(s<<l)&65535|u)}function x1(t,e){return e+1<t.byteLength?t.getUint16(e,!1):t.getUint8(e)<<8}function jm(t){var e=0;if(t[e++]!==71||t[e++]!==73||t[e++]!==70||t[e++]!==56||(t[e++]+1&253)!=56||t[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var n=t[e++]|t[e++]<<8,r=t[e++]|t[e++]<<8,i=t[e++],a=i>>7,l=1<<1+(7&i);t[e++],t[e++];var s=null,u=null;a&&(s=e,u=l,e+=3*l);var h=!0,f=[],v=0,b=null,p=0,S=null;for(this.width=n,this.height=r;h&&e<t.length;)switch(t[e++]){case 33:switch(t[e++]){case 255:if(t[e]!==11||t[e+1]==78&&t[e+2]==69&&t[e+3]==84&&t[e+4]==83&&t[e+5]==67&&t[e+6]==65&&t[e+7]==80&&t[e+8]==69&&t[e+9]==50&&t[e+10]==46&&t[e+11]==48&&t[e+12]==3&&t[e+13]==1&&t[e+16]==0)e+=14,S=t[e++]|t[e++]<<8,e++;else for(e+=12;;){if(!((x=t[e++])>=0))throw Error("Invalid block size");if(x===0)break;e+=x}break;case 249:if(t[e++]!==4||t[e+4]!==0)throw new Error("Invalid graphics extension block.");var k=t[e++];v=t[e++]|t[e++]<<8,b=t[e++],1&k||(b=null),p=k>>2&7,e++;break;case 254:for(;;){if(!((x=t[e++])>=0))throw Error("Invalid block size");if(x===0)break;e+=x}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var C=t[e++]|t[e++]<<8,_=t[e++]|t[e++]<<8,O=t[e++]|t[e++]<<8,U=t[e++]|t[e++]<<8,R=t[e++],nt=R>>6&1,dt=1<<1+(7&R),et=s,$=u,D=!1;R>>7&&(D=!0,et=e,$=dt,e+=3*dt);var J=e;for(e++;;){var x;if(!((x=t[e++])>=0))throw Error("Invalid block size");if(x===0)break;e+=x}f.push({x:C,y:_,width:O,height:U,has_local_palette:D,palette_offset:et,palette_size:$,data_offset:J,data_length:e-J,transparent_index:b,interlaced:!!nt,delay:v,disposal:p});break;case 59:h=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return f.length},this.loopCount=function(){return S},this.frameInfo=function(j){if(j<0||j>=f.length)throw new Error("Frame index out of range.");return f[j]},this.decodeAndBlitFrameBGRA=function(j,W){var q=this.frameInfo(j),Q=q.width*q.height;if(Q>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ct=new Uint8Array(Q);Af(t,q.data_offset,ct,Q);var at=q.palette_offset,K=q.transparent_index;K===null&&(K=256);var ht=q.width,At=n-ht,pt=ht,A=4*(q.y*n+q.x),z=4*((q.y+q.height)*n+q.x),H=A,G=4*At;q.interlaced===!0&&(G+=4*n*7);for(var Z=8,it=0,ut=ct.length;it<ut;++it){var ft=ct[it];if(pt===0&&(pt=ht,(H+=G)>=z&&(G=4*At+4*n*(Z-1),H=A+(ht+At)*(Z<<1),Z>>=1)),ft===K)H+=4;else{var vt=t[at+3*ft],St=t[at+3*ft+1],Pt=t[at+3*ft+2];W[H++]=Pt,W[H++]=St,W[H++]=vt,W[H++]=255}--pt}},this.decodeAndBlitFrameRGBA=function(j,W){var q=this.frameInfo(j),Q=q.width*q.height;if(Q>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ct=new Uint8Array(Q);Af(t,q.data_offset,ct,Q);var at=q.palette_offset,K=q.transparent_index;K===null&&(K=256);var ht=q.width,At=n-ht,pt=ht,A=4*(q.y*n+q.x),z=4*((q.y+q.height)*n+q.x),H=A,G=4*At;q.interlaced===!0&&(G+=4*n*7);for(var Z=8,it=0,ut=ct.length;it<ut;++it){var ft=ct[it];if(pt===0&&(pt=ht,(H+=G)>=z&&(G=4*At+4*n*(Z-1),H=A+(ht+At)*(Z<<1),Z>>=1)),ft===K)H+=4;else{var vt=t[at+3*ft],St=t[at+3*ft+1],Pt=t[at+3*ft+2];W[H++]=vt,W[H++]=St,W[H++]=Pt,W[H++]=255}--pt}}}function Af(t,e,n,r){for(var i=t[e++],a=1<<i,l=a+1,s=l+1,u=i+1,h=(1<<u)-1,f=0,v=0,b=0,p=t[e++],S=new Int32Array(4096),k=null;;){for(;f<16&&p!==0;)v|=t[e++]<<f,f+=8,p===1?p=t[e++]:--p;if(f<u)break;var C=v&h;if(v>>=u,f-=u,C!==a){if(C===l)break;for(var _=C<s?C:k,O=0,U=_;U>a;)U=S[U]>>8,++O;var R=U;if(b+O+(_!==C?1:0)>r)return void Te.log("Warning, gif stream longer than expected.");n[b++]=R;var nt=b+=O;for(_!==C&&(n[b++]=R),U=_;O--;)U=S[U],n[--nt]=255&U,U>>=8;k!==null&&s<4096&&(S[s++]=k<<8|R,s>=h+1&&u<12&&(++u,h=h<<1|1)),k=C}else s=l+1,h=(1<<(u=i+1))-1,k=null}return b!==r&&Te.log("Warning, gif stream shorter than expected."),n}/**
102 * @license
103  Copyright (c) 2008, Adobe Systems Incorporated
104  All rights reserved.
105
106  Redistribution and use in source and binary forms, with or without 
107  modification, are permitted provided that the following conditions are
108  met:
109
110  * Redistributions of source code must retain the above copyright notice, 
111    this list of conditions and the following disclaimer.
112  
113  * Redistributions in binary form must reproduce the above copyright
114    notice, this list of conditions and the following disclaimer in the 
115    documentation and/or other materials provided with the distribution.
116  
117  * Neither the name of Adobe Systems Incorporated nor the names of its 
118    contributors may be used to endorse or promote products derived from 
119    this software without specific prior written permission.
120
121  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
122  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
123  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
124  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
125  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
126  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
127  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
128  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
129  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
130  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
131  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
132*/function xc(t){var e,n,r,i,a,l=Math.floor,s=new Array(64),u=new Array(64),h=new Array(64),f=new Array(64),v=new Array(65535),b=new Array(65535),p=new Array(64),S=new Array(64),k=[],C=0,_=7,O=new Array(64),U=new Array(64),R=new Array(64),nt=new Array(256),dt=new Array(2048),et=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],$=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],D=[0,1,2,3,4,5,6,7,8,9,10,11],J=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],x=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],j=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],W=[0,1,2,3,4,5,6,7,8,9,10,11],q=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Q=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ct(A,z){for(var H=0,G=0,Z=new Array,it=1;it<=16;it++){for(var ut=1;ut<=A[it];ut++)Z[z[G]]=[],Z[z[G]][0]=H,Z[z[G]][1]=it,G++,H++;H*=2}return Z}function at(A){for(var z=A[0],H=A[1]-1;H>=0;)z&1<<H&&(C|=1<<_),H--,--_<0&&(C==255?(K(255),K(0)):K(C),_=7,C=0)}function K(A){k.push(A)}function ht(A){K(A>>8&255),K(255&A)}function At(A,z,H,G,Z){for(var it,ut=Z[0],ft=Z[240],vt=function(xt,ee){var Tt,Vt,Xt,ye,me,re,de,we,Bt,ce,ot=0;for(Bt=0;Bt<8;++Bt){Tt=xt[ot],Vt=xt[ot+1],Xt=xt[ot+2],ye=xt[ot+3],me=xt[ot+4],re=xt[ot+5],de=xt[ot+6];var Ct=Tt+(we=xt[ot+7]),Rt=Tt-we,ie=Vt+de,ue=Vt-de,ke=Xt+re,Jt=Xt-re,jt=ye+me,Et=ye-me,Ot=Ct+jt,ne=Ct-jt,Dt=ie+ke,Ut=ie-ke;xt[ot]=Ot+Dt,xt[ot+4]=Ot-Dt;var se=.707106781*(Ut+ne);xt[ot+2]=ne+se,xt[ot+6]=ne-se;var Je=.382683433*((Ot=Et+Jt)-(Ut=ue+Rt)),Ie=.5411961*Ot+Je,wn=1.306562965*Ut+Je,cn=.707106781*(Dt=Jt+ue),Gt=Rt+cn,qn=Rt-cn;xt[ot+5]=qn+Ie,xt[ot+3]=qn-Ie,xt[ot+1]=Gt+wn,xt[ot+7]=Gt-wn,ot+=8}for(ot=0,Bt=0;Bt<8;++Bt){Tt=xt[ot],Vt=xt[ot+8],Xt=xt[ot+16],ye=xt[ot+24],me=xt[ot+32],re=xt[ot+40],de=xt[ot+48];var ir=Tt+(we=xt[ot+56]),ar=Tt-we,or=Vt+de,Ye=Vt-de,mn=Xt+re,yn=Xt-re,Ci=ye+me,ai=ye-me,pr=ir+Ci,Ar=ir-Ci,gr=or+mn,mr=or-mn;xt[ot]=pr+gr,xt[ot+32]=pr-gr;var sr=.707106781*(mr+Ar);xt[ot+16]=Ar+sr,xt[ot+48]=Ar-sr;var Ei=.382683433*((pr=ai+yn)-(mr=Ye+ar)),Lr=.5411961*pr+Ei,ji=1.306562965*mr+Ei,oa=.707106781*(gr=yn+Ye),sa=ar+oa,la=ar-oa;xt[ot+40]=la+Lr,xt[ot+24]=la-Lr,xt[ot+8]=sa+ji,xt[ot+56]=sa-ji,ot++}for(Bt=0;Bt<64;++Bt)ce=xt[Bt]*ee[Bt],p[Bt]=ce>0?ce+.5|0:ce-.5|0;return p}(A,z),St=0;St<64;++St)S[et[St]]=vt[St];var Pt=S[0]-H;H=S[0],Pt==0?at(G[0]):(at(G[b[it=32767+Pt]]),at(v[it]));for(var wt=63;wt>0&&S[wt]==0;)wt--;if(wt==0)return at(ut),H;for(var Kt,F=1;F<=wt;){for(var It=F;S[F]==0&&F<=wt;)++F;var le=F-It;if(le>=16){Kt=le>>4;for(var zt=1;zt<=Kt;++zt)at(ft);le&=15}it=32767+S[F],at(Z[(le<<4)+b[it]]),at(v[it]),F++}return wt!=63&&at(ut),H}function pt(A){A=Math.min(Math.max(A,1),100),a!=A&&(function(z){for(var H=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],G=0;G<64;G++){var Z=l((H[G]*z+50)/100);Z=Math.min(Math.max(Z,1),255),s[et[G]]=Z}for(var it=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],ut=0;ut<64;ut++){var ft=l((it[ut]*z+50)/100);ft=Math.min(Math.max(ft,1),255),u[et[ut]]=ft}for(var vt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],St=0,Pt=0;Pt<8;Pt++)for(var wt=0;wt<8;wt++)h[St]=1/(s[et[St]]*vt[Pt]*vt[wt]*8),f[St]=1/(u[et[St]]*vt[Pt]*vt[wt]*8),St++}(A<50?Math.floor(5e3/A):Math.floor(200-2*A)),a=A)}this.encode=function(A,z){z&&pt(z),k=new Array,C=0,_=7,ht(65496),ht(65504),ht(16),K(74),K(70),K(73),K(70),K(0),K(1),K(1),K(0),ht(1),ht(1),K(0),K(0),function(){ht(65499),ht(132),K(0);for(var Vt=0;Vt<64;Vt++)K(s[Vt]);K(1);for(var Xt=0;Xt<64;Xt++)K(u[Xt])}(),function(Vt,Xt){ht(65472),ht(17),K(8),ht(Xt),ht(Vt),K(3),K(1),K(17),K(0),K(2),K(17),K(1),K(3),K(17),K(1)}(A.width,A.height),function(){ht(65476),ht(418),K(0);for(var Vt=0;Vt<16;Vt++)K($[Vt+1]);for(var Xt=0;Xt<=11;Xt++)K(D[Xt]);K(16);for(var ye=0;ye<16;ye++)K(J[ye+1]);for(var me=0;me<=161;me++)K(x[me]);K(1);for(var re=0;re<16;re++)K(j[re+1]);for(var de=0;de<=11;de++)K(W[de]);K(17);for(var we=0;we<16;we++)K(q[we+1]);for(var Bt=0;Bt<=161;Bt++)K(Q[Bt])}(),ht(65498),ht(12),K(3),K(1),K(0),K(2),K(17),K(3),K(17),K(0),K(63),K(0);var H=0,G=0,Z=0;C=0,_=7,this.encode.displayName="_encode_";for(var it,ut,ft,vt,St,Pt,wt,Kt,F,It=A.data,le=A.width,zt=A.height,xt=4*le,ee=0;ee<zt;){for(it=0;it<xt;){for(St=xt*ee+it,wt=-1,Kt=0,F=0;F<64;F++)Pt=St+(Kt=F>>3)*xt+(wt=4*(7&F)),ee+Kt>=zt&&(Pt-=xt*(ee+1+Kt-zt)),it+wt>=xt&&(Pt-=it+wt-xt+4),ut=It[Pt++],ft=It[Pt++],vt=It[Pt++],O[F]=(dt[ut]+dt[ft+256|0]+dt[vt+512|0]>>16)-128,U[F]=(dt[ut+768|0]+dt[ft+1024|0]+dt[vt+1280|0]>>16)-128,R[F]=(dt[ut+1280|0]+dt[ft+1536|0]+dt[vt+1792|0]>>16)-128;H=At(O,h,H,e,r),G=At(U,f,G,n,i),Z=At(R,f,Z,n,i),it+=32}ee+=8}if(_>=0){var Tt=[];Tt[1]=_+1,Tt[0]=(1<<_+1)-1,at(Tt)}return ht(65497),new Uint8Array(k)},t=t||50,function(){for(var A=String.fromCharCode,z=0;z<256;z++)nt[z]=A(z)}(),e=ct($,D),n=ct(j,W),r=ct(J,x),i=ct(q,Q),function(){for(var A=1,z=2,H=1;H<=15;H++){for(var G=A;G<z;G++)b[32767+G]=H,v[32767+G]=[],v[32767+G][1]=H,v[32767+G][0]=G;for(var Z=-(z-1);Z<=-A;Z++)b[32767+Z]=H,v[32767+Z]=[],v[32767+Z][1]=H,v[32767+Z][0]=z-1+Z;A<<=1,z<<=1}}(),function(){for(var A=0;A<256;A++)dt[A]=19595*A,dt[A+256|0]=38470*A,dt[A+512|0]=7471*A+32768,dt[A+768|0]=-11059*A,dt[A+1024|0]=-21709*A,dt[A+1280|0]=32768*A+8421375,dt[A+1536|0]=-27439*A,dt[A+1792|0]=-5329*A}(),pt(t)}/**
133 * @license
134 * Copyright (c) 2017 Aras Abbasi
135 *
136 * Licensed under the MIT License.
137 * http://opensource.org/licenses/mit-license
138 */function xr(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Lf(t){function e(D){if(!D)throw Error("assert :P")}function n(D,J,x){for(var j=0;4>j;j++)if(D[J+j]!=x.charCodeAt(j))return!0;return!1}function r(D,J,x,j,W){for(var q=0;q<W;q++)D[J+q]=x[j+q]}function i(D,J,x,j){for(var W=0;W<j;W++)D[J+W]=x}function a(D){return new Int32Array(D)}function l(D,J){for(var x=[],j=0;j<D;j++)x.push(new J);return x}function s(D,J){var x=[];return function j(W,q,Q){for(var ct=Q[q],at=0;at<ct&&(W.push(Q.length>q+1?[]:new J),!(Q.length<q+1));at++)j(W[at],q+1,Q)}(x,0,D),x}var u=function(){var D=this;function J(o,c){for(var g=1<<c-1>>>0;o&g;)g>>>=1;return g?(o&g-1)+g:o}function x(o,c,g,m,y){e(!(m%g));do o[c+(m-=g)]=y;while(0<m)}function j(o,c,g,m,y){if(e(2328>=y),512>=y)var N=a(512);else if((N=a(y))==null)return 0;return function(L,P,E,M,Y,lt){var B,X,rt=P,mt=1<<E,st=a(16),bt=a(16);for(e(Y!=0),e(M!=null),e(L!=null),e(0<E),X=0;X<Y;++X){if(15<M[X])return 0;++st[M[X]]}if(st[0]==Y)return 0;for(bt[1]=0,B=1;15>B;++B){if(st[B]>1<<B)return 0;bt[B+1]=bt[B]+st[B]}for(X=0;X<Y;++X)B=M[X],0<M[X]&&(lt[bt[B]++]=X);if(bt[15]==1)return(M=new W).g=0,M.value=lt[0],x(L,rt,1,mt,M),mt;var yt,Lt=-1,Nt=mt-1,Qt=0,Mt=1,ve=1,Yt=1<<E;for(X=0,B=1,Y=2;B<=E;++B,Y<<=1){if(Mt+=ve<<=1,0>(ve-=st[B]))return 0;for(;0<st[B];--st[B])(M=new W).g=B,M.value=lt[X++],x(L,rt+Qt,Y,Yt,M),Qt=J(Qt,B)}for(B=E+1,Y=2;15>=B;++B,Y<<=1){if(Mt+=ve<<=1,0>(ve-=st[B]))return 0;for(;0<st[B];--st[B]){if(M=new W,(Qt&Nt)!=Lt){for(rt+=Yt,yt=1<<(Lt=B)-E;15>Lt&&!(0>=(yt-=st[Lt]));)++Lt,yt<<=1;mt+=Yt=1<<(yt=Lt-E),L[P+(Lt=Qt&Nt)].g=yt+E,L[P+Lt].value=rt-P-Lt}M.g=B-E,M.value=lt[X++],x(L,rt+(Qt>>E),Y,Yt,M),Qt=J(Qt,B)}}return Mt!=2*bt[15]-1?0:mt}(o,c,g,m,y,N)}function W(){this.value=this.g=0}function q(){this.value=this.g=0}function Q(){this.G=l(5,W),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(xa,q)}function ct(o,c,g,m){e(o!=null),e(c!=null),e(2147483648>m),o.Ca=254,o.I=0,o.b=-8,o.Ka=0,o.oa=c,o.pa=g,o.Jd=c,o.Yc=g+m,o.Zc=4<=m?g+m-4+1:g,ut(o)}function at(o,c){for(var g=0;0<c--;)g|=vt(o,128)<<c;return g}function K(o,c){var g=at(o,c);return ft(o)?-g:g}function ht(o,c,g,m){var y,N=0;for(e(o!=null),e(c!=null),e(4294967288>m),o.Sb=m,o.Ra=0,o.u=0,o.h=0,4<m&&(m=4),y=0;y<m;++y)N+=c[g+y]<<8*y;o.Ra=N,o.bb=m,o.oa=c,o.pa=g}function At(o){for(;8<=o.u&&o.bb<o.Sb;)o.Ra>>>=8,o.Ra+=o.oa[o.pa+o.bb]<<On-8>>>0,++o.bb,o.u-=8;G(o)&&(o.h=1,o.u=0)}function pt(o,c){if(e(0<=c),!o.h&&c<=uo){var g=H(o)&zi[c];return o.u+=c,At(o),g}return o.h=1,o.u=0}function A(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function z(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function H(o){return o.Ra>>>(o.u&On-1)>>>0}function G(o){return e(o.bb<=o.Sb),o.h||o.bb==o.Sb&&o.u>On}function Z(o,c){o.u=c,o.h=G(o)}function it(o){o.u>=zn&&(e(o.u>=zn),At(o))}function ut(o){e(o!=null&&o.oa!=null),o.pa<o.Zc?(o.I=(o.oa[o.pa++]|o.I<<8)>>>0,o.b+=8):(e(o!=null&&o.oa!=null),o.pa<o.Yc?(o.b+=8,o.I=o.oa[o.pa++]|o.I<<8):o.Ka?o.b=0:(o.I<<=8,o.b+=8,o.Ka=1))}function ft(o){return at(o,1)}function vt(o,c){var g=o.Ca;0>o.b&&ut(o);var m=o.b,y=g*c>>>8,N=(o.I>>>m>y)+0;for(N?(g-=y,o.I-=y+1<<m>>>0):g=y+1,m=g,y=0;256<=m;)y+=8,m>>=8;return m=7^y+_a[m],o.b-=m,o.Ca=(g<<m)-1,N}function St(o,c,g){o[c+0]=g>>24&255,o[c+1]=g>>16&255,o[c+2]=g>>8&255,o[c+3]=255&g}function Pt(o,c){return o[c+0]|o[c+1]<<8}function wt(o,c){return Pt(o,c)|o[c+2]<<16}function Kt(o,c){return Pt(o,c)|Pt(o,c+2)<<16}function F(o,c){var g=1<<c;return e(o!=null),e(0<c),o.X=a(g),o.X==null?0:(o.Mb=32-c,o.Xa=c,1)}function It(o,c){e(o!=null),e(c!=null),e(o.Xa==c.Xa),r(c.X,0,o.X,0,1<<c.Xa)}function le(){this.X=[],this.Xa=this.Mb=0}function zt(o,c,g,m){e(g!=null),e(m!=null);var y=g[0],N=m[0];return y==0&&(y=(o*N+c/2)/c),N==0&&(N=(c*y+o/2)/o),0>=y||0>=N?0:(g[0]=y,m[0]=N,1)}function xt(o,c){return o+(1<<c)-1>>>c}function ee(o,c){return((4278255360&o)+(4278255360&c)>>>0&4278255360)+((16711935&o)+(16711935&c)>>>0&16711935)>>>0}function Tt(o,c){D[c]=function(g,m,y,N,L,P,E){var M;for(M=0;M<L;++M){var Y=D[o](P[E+M-1],y,N+M);P[E+M]=ee(g[m+M],Y)}}}function Vt(){this.ud=this.hd=this.jd=0}function Xt(o,c){return((4278124286&(o^c))>>>1)+(o&c)>>>0}function ye(o){return 0<=o&&256>o?o:0>o?0:255<o?255:void 0}function me(o,c){return ye(o+(o-c+.5>>1))}function re(o,c,g){return Math.abs(c-g)-Math.abs(o-g)}function de(o,c,g,m,y,N,L){for(m=N[L-1],g=0;g<y;++g)N[L+g]=m=ee(o[c+g],m)}function we(o,c,g,m,y){var N;for(N=0;N<g;++N){var L=o[c+N],P=L>>8&255,E=16711935&(E=(E=16711935&L)+((P<<16)+P));m[y+N]=(4278255360&L)+E>>>0}}function Bt(o,c){c.jd=255&o,c.hd=o>>8&255,c.ud=o>>16&255}function ce(o,c,g,m,y,N){var L;for(L=0;L<m;++L){var P=c[g+L],E=P>>>8,M=P,Y=255&(Y=(Y=P>>>16)+((o.jd<<24>>24)*(E<<24>>24)>>>5));M=255&(M=(M+=(o.hd<<24>>24)*(E<<24>>24)>>>5)+((o.ud<<24>>24)*(Y<<24>>24)>>>5)),y[N+L]=(4278255360&P)+(Y<<16)+M}}function ot(o,c,g,m,y){D[c]=function(N,L,P,E,M,Y,lt,B,X){for(E=lt;E<B;++E)for(lt=0;lt<X;++lt)M[Y++]=y(P[m(N[L++])])},D[o]=function(N,L,P,E,M,Y,lt){var B=8>>N.b,X=N.Ea,rt=N.K[0],mt=N.w;if(8>B)for(N=(1<<N.b)-1,mt=(1<<B)-1;L<P;++L){var st,bt=0;for(st=0;st<X;++st)st&N||(bt=m(E[M++])),Y[lt++]=y(rt[bt&mt]),bt>>=B}else D["VP8LMapColor"+g](E,M,rt,mt,Y,lt,L,P,X)}}function Ct(o,c,g,m,y){for(g=c+g;c<g;){var N=o[c++];m[y++]=N>>16&255,m[y++]=N>>8&255,m[y++]=255&N}}function Rt(o,c,g,m,y){for(g=c+g;c<g;){var N=o[c++];m[y++]=N>>16&255,m[y++]=N>>8&255,m[y++]=255&N,m[y++]=N>>24&255}}function ie(o,c,g,m,y){for(g=c+g;c<g;){var N=(L=o[c++])>>16&240|L>>12&15,L=240&L|L>>28&15;m[y++]=N,m[y++]=L}}function ue(o,c,g,m,y){for(g=c+g;c<g;){var N=(L=o[c++])>>16&248|L>>13&7,L=L>>5&224|L>>3&31;m[y++]=N,m[y++]=L}}function ke(o,c,g,m,y){for(g=c+g;c<g;){var N=o[c++];m[y++]=255&N,m[y++]=N>>8&255,m[y++]=N>>16&255}}function Jt(o,c,g,m,y,N){if(N==0)for(g=c+g;c<g;)St(m,((N=o[c++])[0]>>24|N[1]>>8&65280|N[2]<<8&16711680|N[3]<<24)>>>0),y+=32;else r(m,y,o,c,g)}function jt(o,c){D[c][0]=D[o+"0"],D[c][1]=D[o+"1"],D[c][2]=D[o+"2"],D[c][3]=D[o+"3"],D[c][4]=D[o+"4"],D[c][5]=D[o+"5"],D[c][6]=D[o+"6"],D[c][7]=D[o+"7"],D[c][8]=D[o+"8"],D[c][9]=D[o+"9"],D[c][10]=D[o+"10"],D[c][11]=D[o+"11"],D[c][12]=D[o+"12"],D[c][13]=D[o+"13"],D[c][14]=D[o+"0"],D[c][15]=D[o+"0"]}function Et(o){return o==kl||o==Pl||o==gs||o==Cl}function Ot(){this.eb=[],this.size=this.A=this.fb=0}function ne(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function Dt(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Ot,this.f.kb=new ne,this.sd=null}function Ut(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function se(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Je(o){return alert("todo:WebPSamplerProcessPlane"),o.T}function Ie(o,c){var g=o.T,m=c.ba.f.RGBA,y=m.eb,N=m.fb+o.ka*m.A,L=hr[c.ba.S],P=o.y,E=o.O,M=o.f,Y=o.N,lt=o.ea,B=o.W,X=c.cc,rt=c.dc,mt=c.Mc,st=c.Nc,bt=o.ka,yt=o.ka+o.T,Lt=o.U,Nt=Lt+1>>1;for(bt==0?L(P,E,null,null,M,Y,lt,B,M,Y,lt,B,y,N,null,null,Lt):(L(c.ec,c.fc,P,E,X,rt,mt,st,M,Y,lt,B,y,N-m.A,y,N,Lt),++g);bt+2<yt;bt+=2)X=M,rt=Y,mt=lt,st=B,Y+=o.Rc,B+=o.Rc,N+=2*m.A,L(P,(E+=2*o.fa)-o.fa,P,E,X,rt,mt,st,M,Y,lt,B,y,N-m.A,y,N,Lt);return E+=o.fa,o.j+yt<o.o?(r(c.ec,c.fc,P,E,Lt),r(c.cc,c.dc,M,Y,Nt),r(c.Mc,c.Nc,lt,B,Nt),g--):1&yt||L(P,E,null,null,M,Y,lt,B,M,Y,lt,B,y,N+m.A,null,null,Lt),g}function wn(o,c,g){var m=o.F,y=[o.J];if(m!=null){var N=o.U,L=c.ba.S,P=L==ps||L==gs;c=c.ba.f.RGBA;var E=[0],M=o.ka;E[0]=o.T,o.Kb&&(M==0?--E[0]:(--M,y[0]-=o.width),o.j+o.ka+o.T==o.o&&(E[0]=o.o-o.j-M));var Y=c.eb;M=c.fb+M*c.A,o=mu(m,y[0],o.width,N,E,Y,M+(P?0:3),c.A),e(g==E),o&&Et(L)&&go(Y,M,P,N,E,c.A)}return 0}function cn(o){var c=o.ma,g=c.ba.S,m=11>g,y=g==fs||g==ds||g==ps||g==Ll||g==12||Et(g);if(c.memory=null,c.Ib=null,c.Jb=null,c.Nd=null,!cr(c.Oa,o,y?11:12))return 0;if(y&&Et(g)&&Gr(),o.da)alert("todo:use_scaling");else{if(m){if(c.Ib=Je,o.Kb){if(g=o.U+1>>1,c.memory=a(o.U+2*g),c.memory==null)return 0;c.ec=c.memory,c.fc=0,c.cc=c.ec,c.dc=c.fc+o.U,c.Mc=c.cc,c.Nc=c.dc+g,c.Ib=Ie,Gr()}}else alert("todo:EmitYUV");y&&(c.Jb=wn,m&&Ve())}if(m&&!Fu){for(o=0;256>o;++o)r0[o]=89858*(o-128)+vs>>ms,o0[o]=-22014*(o-128)+vs,a0[o]=-45773*(o-128),i0[o]=113618*(o-128)+vs>>ms;for(o=vo;o<Il;++o)c=76283*(o-16)+vs>>ms,s0[o-vo]=kr(c,255),l0[o-vo]=kr(c+8>>4,15);Fu=1}return 1}function Gt(o){var c=o.ma,g=o.U,m=o.T;return e(!(1&o.ka)),0>=g||0>=m?0:(g=c.Ib(o,c),c.Jb!=null&&c.Jb(o,c,g),c.Dc+=g,1)}function qn(o){o.ma.memory=null}function ir(o,c,g,m){return pt(o,8)!=47?0:(c[0]=pt(o,14)+1,g[0]=pt(o,14)+1,m[0]=pt(o,1),pt(o,3)!=0?0:!o.h)}function ar(o,c){if(4>o)return o+1;var g=o-2>>1;return(2+(1&o)<<g)+pt(c,g)+1}function or(o,c){return 120<c?c-120:1<=(g=((g=H1[c-1])>>4)*o+(8-(15&g)))?g:1;var g}function Ye(o,c,g){var m=H(g),y=o[c+=255&m].g-8;return 0<y&&(Z(g,g.u+8),m=H(g),c+=o[c].value,c+=m&(1<<y)-1),Z(g,g.u+o[c].g),o[c].value}function mn(o,c,g){return g.g+=o.g,g.value+=o.value<<c>>>0,e(8>=g.g),o.g}function yn(o,c,g){var m=o.xc;return e((c=m==0?0:o.vc[o.md*(g>>m)+(c>>m)])<o.Wb),o.Ya[c]}function Ci(o,c,g,m){var y=o.ab,N=o.c*c,L=o.C;c=L+c;var P=g,E=m;for(m=o.Ta,g=o.Ua;0<y--;){var M=o.gc[y],Y=L,lt=c,B=P,X=E,rt=(E=m,P=g,M.Ea);switch(e(Y<lt),e(lt<=M.nc),M.hc){case 2:Na(B,X,(lt-Y)*rt,E,P);break;case 0:var mt=Y,st=lt,bt=E,yt=P,Lt=(Yt=M).Ea;mt==0&&(ui(B,X,null,null,1,bt,yt),de(B,X+1,0,0,Lt-1,bt,yt+1),X+=Lt,yt+=Lt,++mt);for(var Nt=1<<Yt.b,Qt=Nt-1,Mt=xt(Lt,Yt.b),ve=Yt.K,Yt=Yt.w+(mt>>Yt.b)*Mt;mt<st;){var xe=ve,hn=Yt,be=1;for(hi(B,X,bt,yt-Lt,1,bt,yt);be<Lt;){var Zt=(be&~Qt)+Nt;Zt>Lt&&(Zt=Lt),(0,vr[xe[hn++]>>8&15])(B,X+ +be,bt,yt+be-Lt,Zt-be,bt,yt+be),be=Zt}X+=Lt,yt+=Lt,++mt&Qt||(Yt+=Mt)}lt!=M.nc&&r(E,P-rt,E,P+(lt-Y-1)*rt,rt);break;case 1:for(rt=B,st=X,Lt=(B=M.Ea)-(yt=B&~(bt=(X=1<<M.b)-1)),mt=xt(B,M.b),Nt=M.K,M=M.w+(Y>>M.b)*mt;Y<lt;){for(Qt=Nt,Mt=M,ve=new Vt,Yt=st+yt,xe=st+B;st<Yt;)Bt(Qt[Mt++],ve),Hi(ve,rt,st,X,E,P),st+=X,P+=X;st<xe&&(Bt(Qt[Mt++],ve),Hi(ve,rt,st,Lt,E,P),st+=Lt,P+=Lt),++Y&bt||(M+=mt)}break;case 3:if(B==E&&X==P&&0<M.b){for(st=E,B=rt=P+(lt-Y)*rt-(yt=(lt-Y)*xt(M.Ea,M.b)),X=E,bt=P,mt=[],yt=(Lt=yt)-1;0<=yt;--yt)mt[yt]=X[bt+yt];for(yt=Lt-1;0<=yt;--yt)st[B+yt]=mt[yt];Ui(M,Y,lt,E,rt,E,P)}else Ui(M,Y,lt,B,X,E,P)}P=m,E=g}E!=g&&r(m,g,P,E,N)}function ai(o,c){var g=o.V,m=o.Ba+o.c*o.C,y=c-o.C;if(e(c<=o.l.o),e(16>=y),0<y){var N=o.l,L=o.Ta,P=o.Ua,E=N.width;if(Ci(o,y,g,m),y=P=[P],e((g=o.C)<(m=c)),e(N.v<N.va),m>N.o&&(m=N.o),g<N.j){var M=N.j-g;g=N.j,y[0]+=M*E}if(g>=m?g=0:(y[0]+=4*N.v,N.ka=g-N.j,N.U=N.va-N.v,N.T=m-g,g=1),g){if(P=P[0],11>(g=o.ca).S){var Y=g.f.RGBA,lt=(m=g.S,y=N.U,N=N.T,M=Y.eb,Y.A),B=N;for(Y=Y.fb+o.Ma*Y.A;0<B--;){var X=L,rt=P,mt=y,st=M,bt=Y;switch(m){case hs:ho(X,rt,mt,st,bt);break;case fs:fo(X,rt,mt,st,bt);break;case kl:fo(X,rt,mt,st,bt),go(st,bt,0,mt,1,0);break;case Nu:$i(X,rt,mt,st,bt);break;case ds:Jt(X,rt,mt,st,bt,1);break;case Pl:Jt(X,rt,mt,st,bt,1),go(st,bt,0,mt,1,0);break;case ps:Jt(X,rt,mt,st,bt,0);break;case gs:Jt(X,rt,mt,st,bt,0),go(st,bt,1,mt,1,0);break;case Ll:Sa(X,rt,mt,st,bt);break;case Cl:Sa(X,rt,mt,st,bt),gu(st,bt,mt,1,0);break;case Su:Wi(X,rt,mt,st,bt);break;default:e(0)}P+=E,Y+=lt}o.Ma+=N}else alert("todo:EmitRescaledRowsYUVA");e(o.Ma<=g.height)}}o.C=c,e(o.C<=o.i)}function pr(o){var c;if(0<o.ua)return 0;for(c=0;c<o.Wb;++c){var g=o.Ya[c].G,m=o.Ya[c].H;if(0<g[1][m[1]+0].g||0<g[2][m[2]+0].g||0<g[3][m[3]+0].g)return 0}return 1}function Ar(o,c,g,m,y,N){if(o.Z!=0){var L=o.qd,P=o.rd;for(e(gi[o.Z]!=null);c<g;++c)gi[o.Z](L,P,m,y,m,y,N),L=m,P=y,y+=N;o.qd=L,o.rd=P}}function gr(o,c){var g=o.l.ma,m=g.Z==0||g.Z==1?o.l.j:o.C;if(m=o.C<m?m:o.C,e(c<=o.l.o),c>m){var y=o.l.width,N=g.ca,L=g.tb+y*m,P=o.V,E=o.Ba+o.c*m,M=o.gc;e(o.ab==1),e(M[0].hc==3),Sl(M[0],m,c,P,E,N,L),Ar(g,m,c,N,L,y)}o.C=o.Ma=c}function mr(o,c,g,m,y,N,L){var P=o.$/m,E=o.$%m,M=o.m,Y=o.s,lt=g+o.$,B=lt;y=g+m*y;var X=g+m*N,rt=280+Y.ua,mt=o.Pb?P:16777216,st=0<Y.ua?Y.Wa:null,bt=Y.wc,yt=lt<X?yn(Y,E,P):null;e(o.C<N),e(X<=y);var Lt=!1;t:for(;;){for(;Lt||lt<X;){var Nt=0;if(P>=mt){var Qt=lt-g;e((mt=o).Pb),mt.wd=mt.m,mt.xd=Qt,0<mt.s.ua&&It(mt.s.Wa,mt.s.vb),mt=P+$1}if(E&bt||(yt=yn(Y,E,P)),e(yt!=null),yt.Qb&&(c[lt]=yt.qb,Lt=!0),!Lt)if(it(M),yt.jc){Nt=M,Qt=c;var Mt=lt,ve=yt.pd[H(Nt)&xa-1];e(yt.jc),256>ve.g?(Z(Nt,Nt.u+ve.g),Qt[Mt]=ve.value,Nt=0):(Z(Nt,Nt.u+ve.g-256),e(256<=ve.value),Nt=ve.value),Nt==0&&(Lt=!0)}else Nt=Ye(yt.G[0],yt.H[0],M);if(M.h)break;if(Lt||256>Nt){if(!Lt)if(yt.nd)c[lt]=(yt.qb|Nt<<8)>>>0;else{if(it(M),Lt=Ye(yt.G[1],yt.H[1],M),it(M),Qt=Ye(yt.G[2],yt.H[2],M),Mt=Ye(yt.G[3],yt.H[3],M),M.h)break;c[lt]=(Mt<<24|Lt<<16|Nt<<8|Qt)>>>0}if(Lt=!1,++lt,++E>=m&&(E=0,++P,L!=null&&P<=N&&!(P%16)&&L(o,P),st!=null))for(;B<lt;)Nt=c[B++],st.X[(506832829*Nt&4294967295)>>>st.Mb]=Nt}else if(280>Nt){if(Nt=ar(Nt-256,M),Qt=Ye(yt.G[4],yt.H[4],M),it(M),Qt=or(m,Qt=ar(Qt,M)),M.h)break;if(lt-g<Qt||y-lt<Nt)break t;for(Mt=0;Mt<Nt;++Mt)c[lt+Mt]=c[lt+Mt-Qt];for(lt+=Nt,E+=Nt;E>=m;)E-=m,++P,L!=null&&P<=N&&!(P%16)&&L(o,P);if(e(lt<=y),E&bt&&(yt=yn(Y,E,P)),st!=null)for(;B<lt;)Nt=c[B++],st.X[(506832829*Nt&4294967295)>>>st.Mb]=Nt}else{if(!(Nt<rt))break t;for(Lt=Nt-280,e(st!=null);B<lt;)Nt=c[B++],st.X[(506832829*Nt&4294967295)>>>st.Mb]=Nt;Nt=lt,e(!(Lt>>>(Qt=st).Xa)),c[Nt]=Qt.X[Lt],Lt=!0}Lt||e(M.h==G(M))}if(o.Pb&&M.h&&lt<y)e(o.m.h),o.a=5,o.m=o.wd,o.$=o.xd,0<o.s.ua&&It(o.s.vb,o.s.Wa);else{if(M.h)break t;L!=null&&L(o,P>N?N:P),o.a=0,o.$=lt-g}return 1}return o.a=3,0}function sr(o){e(o!=null),o.vc=null,o.yc=null,o.Ya=null;var c=o.Wa;c!=null&&(c.X=null),o.vb=null,e(o!=null)}function Ei(){var o=new $t;return o==null?null:(o.a=0,o.xb=ku,jt("Predictor","VP8LPredictors"),jt("Predictor","VP8LPredictors_C"),jt("PredictorAdd","VP8LPredictorsAdd"),jt("PredictorAdd","VP8LPredictorsAdd_C"),Na=we,Hi=ce,ho=Ct,fo=Rt,Sa=ie,Wi=ue,$i=ke,D.VP8LMapColor32b=ln,D.VP8LMapColor8b=Ir,o)}function Lr(o,c,g,m,y){var N=1,L=[o],P=[c],E=m.m,M=m.s,Y=null,lt=0;t:for(;;){if(g)for(;N&&pt(E,1);){var B=L,X=P,rt=m,mt=1,st=rt.m,bt=rt.gc[rt.ab],yt=pt(st,2);if(rt.Oc&1<<yt)N=0;else{switch(rt.Oc|=1<<yt,bt.hc=yt,bt.Ea=B[0],bt.nc=X[0],bt.K=[null],++rt.ab,e(4>=rt.ab),yt){case 0:case 1:bt.b=pt(st,3)+2,mt=Lr(xt(bt.Ea,bt.b),xt(bt.nc,bt.b),0,rt,bt.K),bt.K=bt.K[0];break;case 3:var Lt,Nt=pt(st,8)+1,Qt=16<Nt?0:4<Nt?1:2<Nt?2:3;if(B[0]=xt(bt.Ea,Qt),bt.b=Qt,Lt=mt=Lr(Nt,1,0,rt,bt.K)){var Mt,ve=Nt,Yt=bt,xe=1<<(8>>Yt.b),hn=a(xe);if(hn==null)Lt=0;else{var be=Yt.K[0],Zt=Yt.w;for(hn[0]=Yt.K[0][0],Mt=1;Mt<1*ve;++Mt)hn[Mt]=ee(be[Zt+Mt],hn[Mt-1]);for(;Mt<4*xe;++Mt)hn[Mt]=0;Yt.K[0]=null,Yt.K[0]=hn,Lt=1}}mt=Lt;break;case 2:break;default:e(0)}N=mt}}if(L=L[0],P=P[0],N&&pt(E,1)&&!(N=1<=(lt=pt(E,4))&&11>=lt)){m.a=3;break t}var Ft;if(Ft=N)e:{var tn,ge,Se,Ue=m,_n=L,Tn=P,Ze=lt,Cn=g,Dn=Ue.m,fn=Ue.s,Ae=[null],Pe=1,Ke=0,Ce=W1[Ze];n:for(;;){if(Cn&&pt(Dn,1)){var Nn=pt(Dn,3)+2,wr=xt(_n,Nn),en=xt(Tn,Nn),Un=wr*en;if(!Lr(wr,en,0,Ue,Ae))break n;for(Ae=Ae[0],fn.xc=Nn,tn=0;tn<Un;++tn){var Oe=Ae[tn]>>8&65535;Ae[tn]=Oe,Oe>=Pe&&(Pe=Oe+1)}}if(Dn.h)break n;for(ge=0;5>ge;++ge){var dn=Au[ge];!ge&&0<Ze&&(dn+=1<<Ze),Ke<dn&&(Ke=dn)}var Zn=l(Pe*Ce,W),Mn=Pe,Kn=l(Mn,Q);if(Kn==null)var Xn=null;else e(65536>=Mn),Xn=Kn;var Hn=a(Ke);if(Xn==null||Hn==null||Zn==null){Ue.a=1;break n}var Jn=Zn;for(tn=Se=0;tn<Pe;++tn){var Be=Xn[tn],Qn=Be.G,yr=Be.H,Vi=0,Xr=1,Sn=0;for(ge=0;5>ge;++ge){dn=Au[ge],Qn[ge]=Jn,yr[ge]=Se,!ge&&0<Ze&&(dn+=1<<Ze);i:{var ws,Fl=dn,ys=Ue,bo=Hn,h0=Jn,f0=Se,Rl=0,mi=ys.m,d0=pt(mi,1);if(i(bo,0,0,Fl),d0){var p0=pt(mi,1)+1,g0=pt(mi,1),Tu=pt(mi,g0==0?1:8);bo[Tu]=1,p0==2&&(bo[Tu=pt(mi,8)]=1);var xs=1}else{var Du=a(19),Mu=pt(mi,4)+4;if(19<Mu){ys.a=3;var _s=0;break i}for(ws=0;ws<Mu;++ws)Du[U1[ws]]=pt(mi,3);var Ol=void 0,wo=void 0,Bu=ys,m0=Du,Ns=Fl,qu=bo,Tl=0,vi=Bu.m,zu=8,Uu=l(128,W);r:for(;j(Uu,0,7,m0,19);){if(pt(vi,1)){var v0=2+2*pt(vi,3);if((Ol=2+pt(vi,v0))>Ns)break r}else Ol=Ns;for(wo=0;wo<Ns&&Ol--;){it(vi);var Hu=Uu[0+(127&H(vi))];Z(vi,vi.u+Hu.g);var ka=Hu.value;if(16>ka)qu[wo++]=ka,ka!=0&&(zu=ka);else{var b0=ka==16,Wu=ka-16,w0=q1[Wu],$u=pt(vi,B1[Wu])+w0;if(wo+$u>Ns)break r;for(var y0=b0?zu:0;0<$u--;)qu[wo++]=y0}}Tl=1;break r}Tl||(Bu.a=3),xs=Tl}(xs=xs&&!mi.h)&&(Rl=j(h0,f0,8,bo,Fl)),xs&&Rl!=0?_s=Rl:(ys.a=3,_s=0)}if(_s==0)break n;if(Xr&&z1[ge]==1&&(Xr=Jn[Se].g==0),Vi+=Jn[Se].g,Se+=_s,3>=ge){var yo,Dl=Hn[0];for(yo=1;yo<dn;++yo)Hn[yo]>Dl&&(Dl=Hn[yo]);Sn+=Dl}}if(Be.nd=Xr,Be.Qb=0,Xr&&(Be.qb=(Qn[3][yr[3]+0].value<<24|Qn[1][yr[1]+0].value<<16|Qn[2][yr[2]+0].value)>>>0,Vi==0&&256>Qn[0][yr[0]+0].value&&(Be.Qb=1,Be.qb+=Qn[0][yr[0]+0].value<<8)),Be.jc=!Be.Qb&&6>Sn,Be.jc){var Ss,Jr=Be;for(Ss=0;Ss<xa;++Ss){var bi=Ss,wi=Jr.pd[bi],As=Jr.G[0][Jr.H[0]+bi];256<=As.value?(wi.g=As.g+256,wi.value=As.value):(wi.g=0,wi.value=0,bi>>=mn(As,8,wi),bi>>=mn(Jr.G[1][Jr.H[1]+bi],16,wi),bi>>=mn(Jr.G[2][Jr.H[2]+bi],0,wi),mn(Jr.G[3][Jr.H[3]+bi],24,wi))}}}fn.vc=Ae,fn.Wb=Pe,fn.Ya=Xn,fn.yc=Zn,Ft=1;break e}Ft=0}if(!(N=Ft)){m.a=3;break t}if(0<lt){if(M.ua=1<<lt,!F(M.Wa,lt)){m.a=1,N=0;break t}}else M.ua=0;var Ml=m,Vu=L,x0=P,Bl=Ml.s,ql=Bl.xc;if(Ml.c=Vu,Ml.i=x0,Bl.md=xt(Vu,ql),Bl.wc=ql==0?-1:(1<<ql)-1,g){m.xb=J1;break t}if((Y=a(L*P))==null){m.a=1,N=0;break t}N=(N=mr(m,Y,0,L,P,P,null))&&!E.h;break t}return N?(y!=null?y[0]=Y:(e(Y==null),e(g)),m.$=0,g||sr(M)):sr(M),N}function ji(o,c){var g=o.c*o.i,m=g+c+16*c;return e(o.c<=c),o.V=a(m),o.V==null?(o.Ta=null,o.Ua=0,o.a=1,0):(o.Ta=o.V,o.Ua=o.Ba+g+c,1)}function oa(o,c){var g=o.C,m=c-g,y=o.V,N=o.Ba+o.c*g;for(e(c<=o.l.o);0<m;){var L=16<m?16:m,P=o.l.ma,E=o.l.width,M=E*L,Y=P.ca,lt=P.tb+E*g,B=o.Ta,X=o.Ua;Ci(o,L,y,N),vu(B,X,Y,lt,M),Ar(P,g,g+L,Y,lt,E),m-=L,y+=L*o.c,g+=L}e(g==c),o.C=o.Ma=c}function sa(){this.ub=this.yd=this.td=this.Rb=0}function la(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function ol(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Xa(){this.Yb=function(){var o=[];return function c(g,m,y){for(var N=y[m],L=0;L<N&&(g.push(y.length>m+1?[]:0),!(y.length<m+1));L++)c(g[L],m+1,y)}(o,0,[3,11]),o}()}function Vo(){this.jb=a(3),this.Wc=s([4,8],Xa),this.Xc=s([4,17],Xa)}function Go(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function lr(){this.ld=this.La=this.dd=this.tc=0}function Ja(){this.Na=this.la=0}function Yo(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Qa(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Zo(){this.uc=this.M=this.Nb=0,this.wa=Array(new lr),this.Y=0,this.ya=Array(new Qa),this.aa=0,this.l=new ca}function Ko(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Xo(){this.cb=this.a=0,this.sc="",this.m=new A,this.Od=new sa,this.Kc=new la,this.ed=new Go,this.Qa=new ol,this.Ic=this.$c=this.Aa=0,this.D=new Zo,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=l(8,A),this.ia=0,this.pb=l(4,Yo),this.Pa=new Vo,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ko),this.Hd=0,this.rb=Array(new Ja),this.sb=0,this.wa=Array(new lr),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Qa),this.L=this.aa=0,this.gd=s([4,2],lr),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function kr(o,c){return 0>o?0:o>c?c:o}function ca(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function sl(){var o=new Xo;return o!=null&&(o.a=0,o.sc="OK",o.cb=0,o.Xb=0,mo||(mo=ua)),o}function on(o,c,g){return o.a==0&&(o.a=c,o.sc=g,o.cb=0),0}function Jo(o,c,g){return 3<=g&&o[c+0]==157&&o[c+1]==1&&o[c+2]==42}function Pr(o,c){if(o==null)return 0;if(o.a=0,o.sc="OK",c==null)return on(o,2,"null VP8Io passed to VP8GetHeaders()");var g=c.data,m=c.w,y=c.ha;if(4>y)return on(o,7,"Truncated header.");var N=g[m+0]|g[m+1]<<8|g[m+2]<<16,L=o.Od;if(L.Rb=!(1&N),L.td=N>>1&7,L.yd=N>>4&1,L.ub=N>>5,3<L.td)return on(o,3,"Incorrect keyframe parameters.");if(!L.yd)return on(o,4,"Frame not displayable.");m+=3,y-=3;var P=o.Kc;if(L.Rb){if(7>y)return on(o,7,"cannot parse picture header");if(!Jo(g,m,y))return on(o,3,"Bad code word");P.c=16383&(g[m+4]<<8|g[m+3]),P.Td=g[m+4]>>6,P.i=16383&(g[m+6]<<8|g[m+5]),P.Ud=g[m+6]>>6,m+=7,y-=7,o.za=P.c+15>>4,o.Ub=P.i+15>>4,c.width=P.c,c.height=P.i,c.Da=0,c.j=0,c.v=0,c.va=c.width,c.o=c.height,c.da=0,c.ib=c.width,c.hb=c.height,c.U=c.width,c.T=c.height,i((N=o.Pa).jb,0,255,N.jb.length),e((N=o.Qa)!=null),N.Cb=0,N.Bb=0,N.Fb=1,i(N.Zb,0,0,N.Zb.length),i(N.Lb,0,0,N.Lb)}if(L.ub>y)return on(o,7,"bad partition length");ct(N=o.m,g,m,L.ub),m+=L.ub,y-=L.ub,L.Rb&&(P.Ld=ft(N),P.Kd=ft(N)),P=o.Qa;var E,M=o.Pa;if(e(N!=null),e(P!=null),P.Cb=ft(N),P.Cb){if(P.Bb=ft(N),ft(N)){for(P.Fb=ft(N),E=0;4>E;++E)P.Zb[E]=ft(N)?K(N,7):0;for(E=0;4>E;++E)P.Lb[E]=ft(N)?K(N,6):0}if(P.Bb)for(E=0;3>E;++E)M.jb[E]=ft(N)?at(N,8):255}else P.Bb=0;if(N.Ka)return on(o,3,"cannot parse segment header");if((P=o.ed).zd=ft(N),P.Tb=at(N,6),P.wb=at(N,3),P.Pc=ft(N),P.Pc&&ft(N)){for(M=0;4>M;++M)ft(N)&&(P.vd[M]=K(N,6));for(M=0;4>M;++M)ft(N)&&(P.od[M]=K(N,6))}if(o.L=P.Tb==0?0:P.zd?1:2,N.Ka)return on(o,3,"cannot parse filter header");var Y=y;if(y=E=m,m=E+Y,P=Y,o.Xb=(1<<at(o.m,2))-1,Y<3*(M=o.Xb))g=7;else{for(E+=3*M,P-=3*M,Y=0;Y<M;++Y){var lt=g[y+0]|g[y+1]<<8|g[y+2]<<16;lt>P&&(lt=P),ct(o.Jc[+Y],g,E,lt),E+=lt,P-=lt,y+=3}ct(o.Jc[+M],g,E,P),g=E<m?0:5}if(g!=0)return on(o,g,"cannot parse partitions");for(g=at(E=o.m,7),y=ft(E)?K(E,4):0,m=ft(E)?K(E,4):0,P=ft(E)?K(E,4):0,M=ft(E)?K(E,4):0,E=ft(E)?K(E,4):0,Y=o.Qa,lt=0;4>lt;++lt){if(Y.Cb){var B=Y.Zb[lt];Y.Fb||(B+=g)}else{if(0<lt){o.pb[lt]=o.pb[0];continue}B=g}var X=o.pb[lt];X.Sc[0]=El[kr(B+y,127)],X.Sc[1]=jl[kr(B+0,127)],X.Eb[0]=2*El[kr(B+m,127)],X.Eb[1]=101581*jl[kr(B+P,127)]>>16,8>X.Eb[1]&&(X.Eb[1]=8),X.Qc[0]=El[kr(B+M,117)],X.Qc[1]=jl[kr(B+E,127)],X.lc=B+E}if(!L.Rb)return on(o,4,"Not a key frame.");for(ft(N),L=o.Pa,g=0;4>g;++g){for(y=0;8>y;++y)for(m=0;3>m;++m)for(P=0;11>P;++P)M=vt(N,K1[g][y][m][P])?at(N,8):Y1[g][y][m][P],L.Wc[g][y].Yb[m][P]=M;for(y=0;17>y;++y)L.Xc[g][y]=L.Wc[g][X1[y]]}return o.kc=ft(N),o.kc&&(o.Bd=at(N,8)),o.cb=1}function ua(o,c,g,m,y,N,L){var P=c[y].Yb[g];for(g=0;16>y;++y){if(!vt(o,P[g+0]))return y;for(;!vt(o,P[g+1]);)if(P=c[++y].Yb[0],g=0,y==16)return 16;var E=c[y+1].Yb;if(vt(o,P[g+2])){var M=o,Y=0;if(vt(M,(B=P)[(lt=g)+3]))if(vt(M,B[lt+6])){for(P=0,lt=2*(Y=vt(M,B[lt+8]))+(B=vt(M,B[lt+9+Y])),Y=0,B=V1[lt];B[P];++P)Y+=Y+vt(M,B[P]);Y+=3+(8<<lt)}else vt(M,B[lt+7])?(Y=7+2*vt(M,165),Y+=vt(M,145)):Y=5+vt(M,159);else Y=vt(M,B[lt+4])?3+vt(M,B[lt+5]):2;P=E[2]}else Y=1,P=E[1];E=L+G1[y],0>(M=o).b&&ut(M);var lt,B=M.b,X=(lt=M.Ca>>1)-(M.I>>B)>>31;--M.b,M.Ca+=X,M.Ca|=1,M.I-=(lt+1&X)<<B,N[E]=((Y^X)-X)*m[(0<y)+0]}return 16}function to(o){var c=o.rb[o.sb-1];c.la=0,c.Na=0,i(o.zc,0,0,o.zc.length),o.ja=0}function Gn(o,c,g,m,y){y=o[c+g+32*m]+(y>>3),o[c+g+32*m]=-256&y?0>y?0:255:y}function ha(o,c,g,m,y,N){Gn(o,c,0,g,m+y),Gn(o,c,1,g,m+N),Gn(o,c,2,g,m-N),Gn(o,c,3,g,m-y)}function Ur(o){return(20091*o>>16)+o}function xn(o,c,g,m){var y,N=0,L=a(16);for(y=0;4>y;++y){var P=o[c+0]+o[c+8],E=o[c+0]-o[c+8],M=(35468*o[c+4]>>16)-Ur(o[c+12]),Y=Ur(o[c+4])+(35468*o[c+12]>>16);L[N+0]=P+Y,L[N+1]=E+M,L[N+2]=E-M,L[N+3]=P-Y,N+=4,c++}for(y=N=0;4>y;++y)P=(o=L[N+0]+4)+L[N+8],E=o-L[N+8],M=(35468*L[N+4]>>16)-Ur(L[N+12]),Gn(g,m,0,0,P+(Y=Ur(L[N+4])+(35468*L[N+12]>>16))),Gn(g,m,1,0,E+M),Gn(g,m,2,0,E-M),Gn(g,m,3,0,P-Y),N++,m+=32}function Qo(o,c,g,m){var y=o[c+0]+4,N=35468*o[c+4]>>16,L=Ur(o[c+4]),P=35468*o[c+1]>>16;ha(g,m,0,y+L,o=Ur(o[c+1]),P),ha(g,m,1,y+N,o,P),ha(g,m,2,y-N,o,P),ha(g,m,3,y-L,o,P)}function ll(o,c,g,m,y){xn(o,c,g,m),y&&xn(o,c+16,g,m+4)}function cl(o,c,g,m){Yr(o,c+0,g,m,1),Yr(o,c+32,g,m+128,1)}function ul(o,c,g,m){var y;for(o=o[c+0]+4,y=0;4>y;++y)for(c=0;4>c;++c)Gn(g,m,c,y,o)}function Cr(o,c,g,m){o[c+0]&&Pn(o,c+0,g,m),o[c+16]&&Pn(o,c+16,g,m+4),o[c+32]&&Pn(o,c+32,g,m+128),o[c+48]&&Pn(o,c+48,g,m+128+4)}function ts(o,c,g,m){var y,N=a(16);for(y=0;4>y;++y){var L=o[c+0+y]+o[c+12+y],P=o[c+4+y]+o[c+8+y],E=o[c+4+y]-o[c+8+y],M=o[c+0+y]-o[c+12+y];N[0+y]=L+P,N[8+y]=L-P,N[4+y]=M+E,N[12+y]=M-E}for(y=0;4>y;++y)L=(o=N[0+4*y]+3)+N[3+4*y],P=N[1+4*y]+N[2+4*y],E=N[1+4*y]-N[2+4*y],M=o-N[3+4*y],g[m+0]=L+P>>3,g[m+16]=M+E>>3,g[m+32]=L-P>>3,g[m+48]=M-E>>3,m+=64}function fa(o,c,g){var m,y=c-32,N=Yn,L=255-o[y-1];for(m=0;m<g;++m){var P,E=N,M=L+o[c-1];for(P=0;P<g;++P)o[c+P]=E[M+o[y+P]];c+=32}}function da(o,c){fa(o,c,4)}function eo(o,c){fa(o,c,8)}function hl(o,c){fa(o,c,16)}function fl(o,c){var g;for(g=0;16>g;++g)r(o,c+32*g,o,c-32,16)}function dl(o,c){var g;for(g=16;0<g;--g)i(o,c,o[c-1],16),c+=32}function oi(o,c,g){var m;for(m=0;16>m;++m)i(c,g+32*m,o,16)}function es(o,c){var g,m=16;for(g=0;16>g;++g)m+=o[c-1+32*g]+o[c+g-32];oi(m>>5,o,c)}function si(o,c){var g,m=8;for(g=0;16>g;++g)m+=o[c-1+32*g];oi(m>>4,o,c)}function pl(o,c){var g,m=8;for(g=0;16>g;++g)m+=o[c+g-32];oi(m>>4,o,c)}function Ii(o,c){oi(128,o,c)}function ae(o,c,g){return o+2*c+g+2>>2}function gl(o,c){var g,m=c-32;for(m=new Uint8Array([ae(o[m-1],o[m+0],o[m+1]),ae(o[m+0],o[m+1],o[m+2]),ae(o[m+1],o[m+2],o[m+3]),ae(o[m+2],o[m+3],o[m+4])]),g=0;4>g;++g)r(o,c+32*g,m,0,m.length)}function ml(o,c){var g=o[c-1],m=o[c-1+32],y=o[c-1+64],N=o[c-1+96];St(o,c+0,16843009*ae(o[c-1-32],g,m)),St(o,c+32,16843009*ae(g,m,y)),St(o,c+64,16843009*ae(m,y,N)),St(o,c+96,16843009*ae(y,N,N))}function vl(o,c){var g,m=4;for(g=0;4>g;++g)m+=o[c+g-32]+o[c-1+32*g];for(m>>=3,g=0;4>g;++g)i(o,c+32*g,m,4)}function bl(o,c){var g=o[c-1+0],m=o[c-1+32],y=o[c-1+64],N=o[c-1-32],L=o[c+0-32],P=o[c+1-32],E=o[c+2-32],M=o[c+3-32];o[c+0+96]=ae(m,y,o[c-1+96]),o[c+1+96]=o[c+0+64]=ae(g,m,y),o[c+2+96]=o[c+1+64]=o[c+0+32]=ae(N,g,m),o[c+3+96]=o[c+2+64]=o[c+1+32]=o[c+0+0]=ae(L,N,g),o[c+3+64]=o[c+2+32]=o[c+1+0]=ae(P,L,N),o[c+3+32]=o[c+2+0]=ae(E,P,L),o[c+3+0]=ae(M,E,P)}function wl(o,c){var g=o[c+1-32],m=o[c+2-32],y=o[c+3-32],N=o[c+4-32],L=o[c+5-32],P=o[c+6-32],E=o[c+7-32];o[c+0+0]=ae(o[c+0-32],g,m),o[c+1+0]=o[c+0+32]=ae(g,m,y),o[c+2+0]=o[c+1+32]=o[c+0+64]=ae(m,y,N),o[c+3+0]=o[c+2+32]=o[c+1+64]=o[c+0+96]=ae(y,N,L),o[c+3+32]=o[c+2+64]=o[c+1+96]=ae(N,L,P),o[c+3+64]=o[c+2+96]=ae(L,P,E),o[c+3+96]=ae(P,E,E)}function Hr(o,c){var g=o[c-1+0],m=o[c-1+32],y=o[c-1+64],N=o[c-1-32],L=o[c+0-32],P=o[c+1-32],E=o[c+2-32],M=o[c+3-32];o[c+0+0]=o[c+1+64]=N+L+1>>1,o[c+1+0]=o[c+2+64]=L+P+1>>1,o[c+2+0]=o[c+3+64]=P+E+1>>1,o[c+3+0]=E+M+1>>1,o[c+0+96]=ae(y,m,g),o[c+0+64]=ae(m,g,N),o[c+0+32]=o[c+1+96]=ae(g,N,L),o[c+1+32]=o[c+2+96]=ae(N,L,P),o[c+2+32]=o[c+3+96]=ae(L,P,E),o[c+3+32]=ae(P,E,M)}function Wr(o,c){var g=o[c+0-32],m=o[c+1-32],y=o[c+2-32],N=o[c+3-32],L=o[c+4-32],P=o[c+5-32],E=o[c+6-32],M=o[c+7-32];o[c+0+0]=g+m+1>>1,o[c+1+0]=o[c+0+64]=m+y+1>>1,o[c+2+0]=o[c+1+64]=y+N+1>>1,o[c+3+0]=o[c+2+64]=N+L+1>>1,o[c+0+32]=ae(g,m,y),o[c+1+32]=o[c+0+96]=ae(m,y,N),o[c+2+32]=o[c+1+96]=ae(y,N,L),o[c+3+32]=o[c+2+96]=ae(N,L,P),o[c+3+64]=ae(L,P,E),o[c+3+96]=ae(P,E,M)}function yl(o,c){var g=o[c-1+0],m=o[c-1+32],y=o[c-1+64],N=o[c-1+96];o[c+0+0]=g+m+1>>1,o[c+2+0]=o[c+0+32]=m+y+1>>1,o[c+2+32]=o[c+0+64]=y+N+1>>1,o[c+1+0]=ae(g,m,y),o[c+3+0]=o[c+1+32]=ae(m,y,N),o[c+3+32]=o[c+1+64]=ae(y,N,N),o[c+3+64]=o[c+2+64]=o[c+0+96]=o[c+1+96]=o[c+2+96]=o[c+3+96]=N}function xl(o,c){var g=o[c-1+0],m=o[c-1+32],y=o[c-1+64],N=o[c-1+96],L=o[c-1-32],P=o[c+0-32],E=o[c+1-32],M=o[c+2-32];o[c+0+0]=o[c+2+32]=g+L+1>>1,o[c+0+32]=o[c+2+64]=m+g+1>>1,o[c+0+64]=o[c+2+96]=y+m+1>>1,o[c+0+96]=N+y+1>>1,o[c+3+0]=ae(P,E,M),o[c+2+0]=ae(L,P,E),o[c+1+0]=o[c+3+32]=ae(g,L,P),o[c+1+32]=o[c+3+64]=ae(m,g,L),o[c+1+64]=o[c+3+96]=ae(y,m,g),o[c+1+96]=ae(N,y,m)}function pa(o,c){var g;for(g=0;8>g;++g)r(o,c+32*g,o,c-32,8)}function no(o,c){var g;for(g=0;8>g;++g)i(o,c,o[c-1],8),c+=32}function Er(o,c,g){var m;for(m=0;8>m;++m)i(c,g+32*m,o,8)}function _l(o,c){var g,m=8;for(g=0;8>g;++g)m+=o[c+g-32]+o[c-1+32*g];Er(m>>4,o,c)}function ga(o,c){var g,m=4;for(g=0;8>g;++g)m+=o[c+g-32];Er(m>>3,o,c)}function Nl(o,c){var g,m=4;for(g=0;8>g;++g)m+=o[c-1+32*g];Er(m>>3,o,c)}function ro(o,c){Er(128,o,c)}function li(o,c,g){var m=o[c-g],y=o[c+0],N=3*(y-m)+Al[1020+o[c-2*g]-o[c+g]],L=us[112+(N+4>>3)];o[c-g]=Yn[255+m+us[112+(N+3>>3)]],o[c+0]=Yn[255+y-L]}function io(o,c,g,m){var y=o[c+0],N=o[c+g];return ur[255+o[c-2*g]-o[c-g]]>m||ur[255+N-y]>m}function Fi(o,c,g,m){return 4*ur[255+o[c-g]-o[c+0]]+ur[255+o[c-2*g]-o[c+g]]<=m}function ao(o,c,g,m,y){var N=o[c-3*g],L=o[c-2*g],P=o[c-g],E=o[c+0],M=o[c+g],Y=o[c+2*g],lt=o[c+3*g];return 4*ur[255+P-E]+ur[255+L-M]>m?0:ur[255+o[c-4*g]-N]<=y&&ur[255+N-L]<=y&&ur[255+L-P]<=y&&ur[255+lt-Y]<=y&&ur[255+Y-M]<=y&&ur[255+M-E]<=y}function ma(o,c,g,m){var y=2*m+1;for(m=0;16>m;++m)Fi(o,c+m,g,y)&&li(o,c+m,g)}function oo(o,c,g,m){var y=2*m+1;for(m=0;16>m;++m)Fi(o,c+m*g,1,y)&&li(o,c+m*g,1)}function va(o,c,g,m){var y;for(y=3;0<y;--y)ma(o,c+=4*g,g,m)}function ns(o,c,g,m){var y;for(y=3;0<y;--y)oo(o,c+=4,g,m)}function $r(o,c,g,m,y,N,L,P){for(N=2*N+1;0<y--;){if(ao(o,c,g,N,L))if(io(o,c,g,P))li(o,c,g);else{var E=o,M=c,Y=g,lt=E[M-2*Y],B=E[M-Y],X=E[M+0],rt=E[M+Y],mt=E[M+2*Y],st=27*(yt=Al[1020+3*(X-B)+Al[1020+lt-rt]])+63>>7,bt=18*yt+63>>7,yt=9*yt+63>>7;E[M-3*Y]=Yn[255+E[M-3*Y]+yt],E[M-2*Y]=Yn[255+lt+bt],E[M-Y]=Yn[255+B+st],E[M+0]=Yn[255+X-st],E[M+Y]=Yn[255+rt-bt],E[M+2*Y]=Yn[255+mt-yt]}c+=m}}function Vr(o,c,g,m,y,N,L,P){for(N=2*N+1;0<y--;){if(ao(o,c,g,N,L))if(io(o,c,g,P))li(o,c,g);else{var E=o,M=c,Y=g,lt=E[M-Y],B=E[M+0],X=E[M+Y],rt=us[112+(4+(mt=3*(B-lt))>>3)],mt=us[112+(mt+3>>3)],st=rt+1>>1;E[M-2*Y]=Yn[255+E[M-2*Y]+st],E[M-Y]=Yn[255+lt+mt],E[M+0]=Yn[255+B-rt],E[M+Y]=Yn[255+X-st]}c+=m}}function rs(o,c,g,m,y,N){$r(o,c,g,1,16,m,y,N)}function is(o,c,g,m,y,N){$r(o,c,1,g,16,m,y,N)}function as(o,c,g,m,y,N){var L;for(L=3;0<L;--L)Vr(o,c+=4*g,g,1,16,m,y,N)}function Ri(o,c,g,m,y,N){var L;for(L=3;0<L;--L)Vr(o,c+=4,1,g,16,m,y,N)}function os(o,c,g,m,y,N,L,P){$r(o,c,y,1,8,N,L,P),$r(g,m,y,1,8,N,L,P)}function d(o,c,g,m,y,N,L,P){$r(o,c,1,y,8,N,L,P),$r(g,m,1,y,8,N,L,P)}function w(o,c,g,m,y,N,L,P){Vr(o,c+4*y,y,1,8,N,L,P),Vr(g,m+4*y,y,1,8,N,L,P)}function T(o,c,g,m,y,N,L,P){Vr(o,c+4,1,y,8,N,L,P),Vr(g,m+4,1,y,8,N,L,P)}function V(){this.ba=new Dt,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new se,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function tt(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function gt(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function _t(){this.ua=0,this.Wa=new le,this.vb=new le,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Q,this.yc=new W}function $t(){this.xb=this.a=0,this.l=new ca,this.ca=new Dt,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new z,this.Pb=0,this.wd=new z,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new _t,this.ab=0,this.gc=l(4,gt),this.Oc=0}function Ht(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new ca,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function he(o,c,g,m,y,N,L){for(o=o==null?0:o[c+0],c=0;c<L;++c)y[N+c]=o+g[m+c]&255,o=y[N+c]}function pe(o,c,g,m,y,N,L){var P;if(o==null)he(null,null,g,m,y,N,L);else for(P=0;P<L;++P)y[N+P]=o[c+P]+g[m+P]&255}function Ne(o,c,g,m,y,N,L){if(o==null)he(null,null,g,m,y,N,L);else{var P,E=o[c+0],M=E,Y=E;for(P=0;P<L;++P)M=Y+(E=o[c+P])-M,Y=g[m+P]+(-256&M?0>M?0:255:M)&255,M=E,y[N+P]=Y}}function sn(o,c,g,m){var y=c.width,N=c.o;if(e(o!=null&&c!=null),0>g||0>=m||g+m>N)return null;if(!o.Cc){if(o.ga==null){var L;if(o.ga=new Ht,(L=o.ga==null)||(L=c.width*c.o,e(o.Gb.length==0),o.Gb=a(L),o.Uc=0,o.Gb==null?L=0:(o.mb=o.Gb,o.nb=o.Uc,o.rc=null,L=1),L=!L),!L){L=o.ga;var P=o.Fa,E=o.P,M=o.qc,Y=o.mb,lt=o.nb,B=E+1,X=M-1,rt=L.l;if(e(P!=null&&Y!=null&&c!=null),gi[0]=null,gi[1]=he,gi[2]=pe,gi[3]=Ne,L.ca=Y,L.tb=lt,L.c=c.width,L.i=c.height,e(0<L.c&&0<L.i),1>=M)c=0;else if(L.$a=3&P[E+0],L.Z=P[E+0]>>2&3,L.Lc=P[E+0]>>4&3,E=P[E+0]>>6&3,0>L.$a||1<L.$a||4<=L.Z||1<L.Lc||E)c=0;else if(rt.put=Gt,rt.ac=cn,rt.bc=qn,rt.ma=L,rt.width=c.width,rt.height=c.height,rt.Da=c.Da,rt.v=c.v,rt.va=c.va,rt.j=c.j,rt.o=c.o,L.$a)t:{e(L.$a==1),c=Ei();e:for(;;){if(c==null){c=0;break t}if(e(L!=null),L.mc=c,c.c=L.c,c.i=L.i,c.l=L.l,c.l.ma=L,c.l.width=L.c,c.l.height=L.i,c.a=0,ht(c.m,P,B,X),!Lr(L.c,L.i,1,c,null)||(c.ab==1&&c.gc[0].hc==3&&pr(c.s)?(L.ic=1,P=c.c*c.i,c.Ta=null,c.Ua=0,c.V=a(P),c.Ba=0,c.V==null?(c.a=1,c=0):c=1):(L.ic=0,c=ji(c,L.c)),!c))break e;c=1;break t}L.mc=null,c=0}else c=X>=L.c*L.i;L=!c}if(L)return null;o.ga.Lc!=1?o.Ga=0:m=N-g}e(o.ga!=null),e(g+m<=N);t:{if(c=(P=o.ga).c,N=P.l.o,P.$a==0){if(B=o.rc,X=o.Vc,rt=o.Fa,E=o.P+1+g*c,M=o.mb,Y=o.nb+g*c,e(E<=o.P+o.qc),P.Z!=0)for(e(gi[P.Z]!=null),L=0;L<m;++L)gi[P.Z](B,X,rt,E,M,Y,c),B=M,X=Y,Y+=c,E+=c;else for(L=0;L<m;++L)r(M,Y,rt,E,c),B=M,X=Y,Y+=c,E+=c;o.rc=B,o.Vc=X}else{if(e(P.mc!=null),c=g+m,e((L=P.mc)!=null),e(c<=L.i),L.C>=c)c=1;else if(P.ic||Ve(),P.ic){P=L.V,B=L.Ba,X=L.c;var mt=L.i,st=(rt=1,E=L.$/X,M=L.$%X,Y=L.m,lt=L.s,L.$),bt=X*mt,yt=X*c,Lt=lt.wc,Nt=st<yt?yn(lt,M,E):null;e(st<=bt),e(c<=mt),e(pr(lt));e:for(;;){for(;!Y.h&&st<yt;){if(M&Lt||(Nt=yn(lt,M,E)),e(Nt!=null),it(Y),256>(mt=Ye(Nt.G[0],Nt.H[0],Y)))P[B+st]=mt,++st,++M>=X&&(M=0,++E<=c&&!(E%16)&&gr(L,E));else{if(!(280>mt)){rt=0;break e}mt=ar(mt-256,Y);var Qt,Mt=Ye(Nt.G[4],Nt.H[4],Y);if(it(Y),!(st>=(Mt=or(X,Mt=ar(Mt,Y)))&&bt-st>=mt)){rt=0;break e}for(Qt=0;Qt<mt;++Qt)P[B+st+Qt]=P[B+st+Qt-Mt];for(st+=mt,M+=mt;M>=X;)M-=X,++E<=c&&!(E%16)&&gr(L,E);st<yt&&M&Lt&&(Nt=yn(lt,M,E))}e(Y.h==G(Y))}gr(L,E>c?c:E);break e}!rt||Y.h&&st<bt?(rt=0,L.a=Y.h?5:3):L.$=st,c=rt}else c=mr(L,L.V,L.Ba,L.c,L.i,c,oa);if(!c){m=0;break t}}g+m>=N&&(o.Cc=1),m=1}if(!m)return null;if(o.Cc&&((m=o.ga)!=null&&(m.mc=null),o.ga=null,0<o.Ga))return alert("todo:WebPDequantizeLevels"),null}return o.nb+g*y}function Re(o,c,g,m,y,N){for(;0<y--;){var L,P=o,E=c+(g?1:0),M=o,Y=c+(g?0:3);for(L=0;L<m;++L){var lt=M[Y+4*L];lt!=255&&(lt*=32897,P[E+4*L+0]=P[E+4*L+0]*lt>>23,P[E+4*L+1]=P[E+4*L+1]*lt>>23,P[E+4*L+2]=P[E+4*L+2]*lt>>23)}c+=N}}function Fe(o,c,g,m,y){for(;0<m--;){var N;for(N=0;N<g;++N){var L=o[c+2*N+0],P=15&(M=o[c+2*N+1]),E=4369*P,M=(240&M|M>>4)*E>>16;o[c+2*N+0]=(240&L|L>>4)*E>>16&240|(15&L|L<<4)*E>>16>>4&15,o[c+2*N+1]=240&M|P}c+=y}}function ze(o,c,g,m,y,N,L,P){var E,M,Y=255;for(M=0;M<y;++M){for(E=0;E<m;++E){var lt=o[c+E];N[L+4*E]=lt,Y&=lt}c+=g,L+=P}return Y!=255}function $e(o,c,g,m,y){var N;for(N=0;N<y;++N)g[m+N]=o[c+N]>>8}function Ve(){go=Re,gu=Fe,mu=ze,vu=$e}function Ln(o,c,g){D[o]=function(m,y,N,L,P,E,M,Y,lt,B,X,rt,mt,st,bt,yt,Lt){var Nt,Qt=Lt-1>>1,Mt=P[E+0]|M[Y+0]<<16,ve=lt[B+0]|X[rt+0]<<16;e(m!=null);var Yt=3*Mt+ve+131074>>2;for(c(m[y+0],255&Yt,Yt>>16,mt,st),N!=null&&(Yt=3*ve+Mt+131074>>2,c(N[L+0],255&Yt,Yt>>16,bt,yt)),Nt=1;Nt<=Qt;++Nt){var xe=P[E+Nt]|M[Y+Nt]<<16,hn=lt[B+Nt]|X[rt+Nt]<<16,be=Mt+xe+ve+hn+524296,Zt=be+2*(xe+ve)>>3;Yt=Zt+Mt>>1,Mt=(be=be+2*(Mt+hn)>>3)+xe>>1,c(m[y+2*Nt-1],255&Yt,Yt>>16,mt,st+(2*Nt-1)*g),c(m[y+2*Nt-0],255&Mt,Mt>>16,mt,st+(2*Nt-0)*g),N!=null&&(Yt=be+ve>>1,Mt=Zt+hn>>1,c(N[L+2*Nt-1],255&Yt,Yt>>16,bt,yt+(2*Nt-1)*g),c(N[L+2*Nt+0],255&Mt,Mt>>16,bt,yt+(2*Nt+0)*g)),Mt=xe,ve=hn}1&Lt||(Yt=3*Mt+ve+131074>>2,c(m[y+Lt-1],255&Yt,Yt>>16,mt,st+(Lt-1)*g),N!=null&&(Yt=3*ve+Mt+131074>>2,c(N[L+Lt-1],255&Yt,Yt>>16,bt,yt+(Lt-1)*g)))}}function Gr(){hr[hs]=Q1,hr[fs]=Pu,hr[Nu]=t0,hr[ds]=Cu,hr[ps]=Eu,hr[Ll]=ju,hr[Su]=e0,hr[kl]=Pu,hr[Pl]=Cu,hr[gs]=Eu,hr[Cl]=ju}function so(o){return o&~n0?0>o?0:255:o>>Iu}function Oi(o,c){return so((19077*o>>8)+(26149*c>>8)-14234)}function Ti(o,c,g){return so((19077*o>>8)-(6419*c>>8)-(13320*g>>8)+8708)}function ci(o,c){return so((19077*o>>8)+(33050*c>>8)-17685)}function Di(o,c,g,m,y){m[y+0]=Oi(o,g),m[y+1]=Ti(o,c,g),m[y+2]=ci(o,c)}function ba(o,c,g,m,y){m[y+0]=ci(o,c),m[y+1]=Ti(o,c,g),m[y+2]=Oi(o,g)}function wa(o,c,g,m,y){var N=Ti(o,c,g);c=N<<3&224|ci(o,c)>>3,m[y+0]=248&Oi(o,g)|N>>5,m[y+1]=c}function kn(o,c,g,m,y){var N=240&ci(o,c)|15;m[y+0]=240&Oi(o,g)|Ti(o,c,g)>>4,m[y+1]=N}function Mi(o,c,g,m,y){m[y+0]=255,Di(o,c,g,m,y+1)}function Bi(o,c,g,m,y){ba(o,c,g,m,y),m[y+3]=255}function lo(o,c,g,m,y){Di(o,c,g,m,y),m[y+3]=255}function jr(o,c,g){D[o]=function(m,y,N,L,P,E,M,Y,lt){for(var B=Y+(-2&lt)*g;Y!=B;)c(m[y+0],N[L+0],P[E+0],M,Y),c(m[y+1],N[L+0],P[E+0],M,Y+g),y+=2,++L,++E,Y+=2*g;1&lt&&c(m[y+0],N[L+0],P[E+0],M,Y)}}function Rn(o,c,g){return g==0?o==0?c==0?6:5:c==0?4:0:g}function ss(o,c,g,m,y){switch(o>>>30){case 3:Yr(c,g,m,y,0);break;case 2:di(c,g,m,y);break;case 1:Pn(c,g,m,y)}}function ya(o,c){var g,m,y=c.M,N=c.Nb,L=o.oc,P=o.pc+40,E=o.oc,M=o.pc+584,Y=o.oc,lt=o.pc+600;for(g=0;16>g;++g)L[P+32*g-1]=129;for(g=0;8>g;++g)E[M+32*g-1]=129,Y[lt+32*g-1]=129;for(0<y?L[P-1-32]=E[M-1-32]=Y[lt-1-32]=129:(i(L,P-32-1,127,21),i(E,M-32-1,127,9),i(Y,lt-32-1,127,9)),m=0;m<o.za;++m){var B=c.ya[c.aa+m];if(0<m){for(g=-1;16>g;++g)r(L,P+32*g-4,L,P+32*g+12,4);for(g=-1;8>g;++g)r(E,M+32*g-4,E,M+32*g+4,4),r(Y,lt+32*g-4,Y,lt+32*g+4,4)}var X=o.Gd,rt=o.Hd+m,mt=B.ad,st=B.Hc;if(0<y&&(r(L,P-32,X[rt].y,0,16),r(E,M-32,X[rt].f,0,8),r(Y,lt-32,X[rt].ea,0,8)),B.Za){var bt=L,yt=P-32+16;for(0<y&&(m>=o.za-1?i(bt,yt,X[rt].y[15],4):r(bt,yt,X[rt+1].y,0,4)),g=0;4>g;g++)bt[yt+128+g]=bt[yt+256+g]=bt[yt+384+g]=bt[yt+0+g];for(g=0;16>g;++g,st<<=2)bt=L,yt=P+Ru[g],br[B.Ob[g]](bt,yt),ss(st,mt,16*+g,bt,yt)}else if(bt=Rn(m,y,B.Ob[0]),pi[bt](L,P),st!=0)for(g=0;16>g;++g,st<<=2)ss(st,mt,16*+g,L,P+Ru[g]);for(g=B.Gc,bt=Rn(m,y,B.Dd),Kr[bt](E,M),Kr[bt](Y,lt),st=mt,bt=E,yt=M,255&(B=0|g)&&(170&B?Aa(st,256,bt,yt):Fr(st,256,bt,yt)),B=Y,st=lt,255&(g>>=8)&&(170&g?Aa(mt,320,B,st):Fr(mt,320,B,st)),y<o.Ub-1&&(r(X[rt].y,0,L,P+480,16),r(X[rt].f,0,E,M+224,8),r(X[rt].ea,0,Y,lt+224,8)),g=8*N*o.B,X=o.sa,rt=o.ta+16*m+16*N*o.R,mt=o.qa,B=o.ra+8*m+g,st=o.Ha,bt=o.Ia+8*m+g,g=0;16>g;++g)r(X,rt+g*o.R,L,P+32*g,16);for(g=0;8>g;++g)r(mt,B+g*o.B,E,M+32*g,8),r(st,bt+g*o.B,Y,lt+32*g,8)}}function ls(o,c,g,m,y,N,L,P,E){var M=[0],Y=[0],lt=0,B=E!=null?E.kd:0,X=E??new tt;if(o==null||12>g)return 7;X.data=o,X.w=c,X.ha=g,c=[c],g=[g],X.gb=[X.gb];t:{var rt=c,mt=g,st=X.gb;if(e(o!=null),e(mt!=null),e(st!=null),st[0]=0,12<=mt[0]&&!n(o,rt[0],"RIFF")){if(n(o,rt[0]+8,"WEBP")){st=3;break t}var bt=Kt(o,rt[0]+4);if(12>bt||4294967286<bt){st=3;break t}if(B&&bt>mt[0]-8){st=7;break t}st[0]=bt,rt[0]+=12,mt[0]-=12}st=0}if(st!=0)return st;for(bt=0<X.gb[0],g=g[0];;){t:{var yt=o;mt=c,st=g;var Lt=M,Nt=Y,Qt=rt=[0];if((Yt=lt=[lt])[0]=0,8>st[0])st=7;else{if(!n(yt,mt[0],"VP8X")){if(Kt(yt,mt[0]+4)!=10){st=3;break t}if(18>st[0]){st=7;break t}var Mt=Kt(yt,mt[0]+8),ve=1+wt(yt,mt[0]+12);if(2147483648<=ve*(yt=1+wt(yt,mt[0]+15))){st=3;break t}Qt!=null&&(Qt[0]=Mt),Lt!=null&&(Lt[0]=ve),Nt!=null&&(Nt[0]=yt),mt[0]+=18,st[0]-=18,Yt[0]=1}st=0}}if(lt=lt[0],rt=rt[0],st!=0)return st;if(mt=!!(2&rt),!bt&&lt)return 3;if(N!=null&&(N[0]=!!(16&rt)),L!=null&&(L[0]=mt),P!=null&&(P[0]=0),L=M[0],rt=Y[0],lt&&mt&&E==null){st=0;break}if(4>g){st=7;break}if(bt&&lt||!bt&&!lt&&!n(o,c[0],"ALPH")){g=[g],X.na=[X.na],X.P=[X.P],X.Sa=[X.Sa];t:{Mt=o,st=c,bt=g;var Yt=X.gb;Lt=X.na,Nt=X.P,Qt=X.Sa,ve=22,e(Mt!=null),e(bt!=null),yt=st[0];var xe=bt[0];for(e(Lt!=null),e(Qt!=null),Lt[0]=null,Nt[0]=null,Qt[0]=0;;){if(st[0]=yt,bt[0]=xe,8>xe){st=7;break t}var hn=Kt(Mt,yt+4);if(4294967286<hn){st=3;break t}var be=8+hn+1&-2;if(ve+=be,0<Yt&&ve>Yt){st=3;break t}if(!n(Mt,yt,"VP8 ")||!n(Mt,yt,"VP8L")){st=0;break t}if(xe[0]<be){st=7;break t}n(Mt,yt,"ALPH")||(Lt[0]=Mt,Nt[0]=yt+8,Qt[0]=hn),yt+=be,xe-=be}}if(g=g[0],X.na=X.na[0],X.P=X.P[0],X.Sa=X.Sa[0],st!=0)break}g=[g],X.Ja=[X.Ja],X.xa=[X.xa];t:if(Yt=o,st=c,bt=g,Lt=X.gb[0],Nt=X.Ja,Qt=X.xa,Mt=st[0],yt=!n(Yt,Mt,"VP8 "),ve=!n(Yt,Mt,"VP8L"),e(Yt!=null),e(bt!=null),e(Nt!=null),e(Qt!=null),8>bt[0])st=7;else{if(yt||ve){if(Yt=Kt(Yt,Mt+4),12<=Lt&&Yt>Lt-12){st=3;break t}if(B&&Yt>bt[0]-8){st=7;break t}Nt[0]=Yt,st[0]+=8,bt[0]-=8,Qt[0]=ve}else Qt[0]=5<=bt[0]&&Yt[Mt+0]==47&&!(Yt[Mt+4]>>5),Nt[0]=bt[0];st=0}if(g=g[0],X.Ja=X.Ja[0],X.xa=X.xa[0],c=c[0],st!=0)break;if(4294967286<X.Ja)return 3;if(P==null||mt||(P[0]=X.xa?2:1),L=[L],rt=[rt],X.xa){if(5>g){st=7;break}P=L,B=rt,mt=N,o==null||5>g?o=0:5<=g&&o[c+0]==47&&!(o[c+4]>>5)?(bt=[0],Yt=[0],Lt=[0],ht(Nt=new z,o,c,g),ir(Nt,bt,Yt,Lt)?(P!=null&&(P[0]=bt[0]),B!=null&&(B[0]=Yt[0]),mt!=null&&(mt[0]=Lt[0]),o=1):o=0):o=0}else{if(10>g){st=7;break}P=rt,o==null||10>g||!Jo(o,c+3,g-3)?o=0:(B=o[c+0]|o[c+1]<<8|o[c+2]<<16,mt=16383&(o[c+7]<<8|o[c+6]),o=16383&(o[c+9]<<8|o[c+8]),1&B||3<(B>>1&7)||!(B>>4&1)||B>>5>=X.Ja||!mt||!o?o=0:(L&&(L[0]=mt),P&&(P[0]=o),o=1))}if(!o||(L=L[0],rt=rt[0],lt&&(M[0]!=L||Y[0]!=rt)))return 3;E!=null&&(E[0]=X,E.offset=c-E.w,e(4294967286>c-E.w),e(E.offset==E.ha-g));break}return st==0||st==7&&lt&&E==null?(N!=null&&(N[0]|=X.na!=null&&0<X.na.length),m!=null&&(m[0]=L),y!=null&&(y[0]=rt),0):st}function cr(o,c,g){var m=c.width,y=c.height,N=0,L=0,P=m,E=y;if(c.Da=o!=null&&0<o.Da,c.Da&&(P=o.cd,E=o.bd,N=o.v,L=o.j,11>g||(N&=-2,L&=-2),0>N||0>L||0>=P||0>=E||N+P>m||L+E>y))return 0;if(c.v=N,c.j=L,c.va=N+P,c.o=L+E,c.U=P,c.T=E,c.da=o!=null&&0<o.da,c.da){if(!zt(P,E,g=[o.ib],N=[o.hb]))return 0;c.ib=g[0],c.hb=N[0]}return c.ob=o!=null&&o.ob,c.Kb=o==null||!o.Sd,c.da&&(c.ob=c.ib<3*m/4&&c.hb<3*y/4,c.Kb=0),1}function qi(o){if(o==null)return 2;if(11>o.S){var c=o.f.RGBA;c.fb+=(o.height-1)*c.A,c.A=-c.A}else c=o.f.kb,o=o.height,c.O+=(o-1)*c.fa,c.fa=-c.fa,c.N+=(o-1>>1)*c.Ab,c.Ab=-c.Ab,c.W+=(o-1>>1)*c.Db,c.Db=-c.Db,c.F!=null&&(c.J+=(o-1)*c.lb,c.lb=-c.lb);return 0}function co(o,c,g,m){if(m==null||0>=o||0>=c)return 2;if(g!=null){if(g.Da){var y=g.cd,N=g.bd,L=-2&g.v,P=-2&g.j;if(0>L||0>P||0>=y||0>=N||L+y>o||P+N>c)return 2;o=y,c=N}if(g.da){if(!zt(o,c,y=[g.ib],N=[g.hb]))return 2;o=y[0],c=N[0]}}m.width=o,m.height=c;t:{var E=m.width,M=m.height;if(o=m.S,0>=E||0>=M||!(o>=hs&&13>o))o=2;else{if(0>=m.Rd&&m.sd==null){L=N=y=c=0;var Y=(P=E*Ou[o])*M;if(11>o||(N=(M+1)/2*(c=(E+1)/2),o==12&&(L=(y=E)*M)),(M=a(Y+2*N+L))==null){o=1;break t}m.sd=M,11>o?((E=m.f.RGBA).eb=M,E.fb=0,E.A=P,E.size=Y):((E=m.f.kb).y=M,E.O=0,E.fa=P,E.Fd=Y,E.f=M,E.N=0+Y,E.Ab=c,E.Cd=N,E.ea=M,E.W=0+Y+N,E.Db=c,E.Ed=N,o==12&&(E.F=M,E.J=0+Y+2*N),E.Tc=L,E.lb=y)}if(c=1,y=m.S,N=m.width,L=m.height,y>=hs&&13>y)if(11>y)o=m.f.RGBA,c&=(P=Math.abs(o.A))*(L-1)+N<=o.size,c&=P>=N*Ou[y],c&=o.eb!=null;else{o=m.f.kb,P=(N+1)/2,Y=(L+1)/2,E=Math.abs(o.fa),M=Math.abs(o.Ab);var lt=Math.abs(o.Db),B=Math.abs(o.lb),X=B*(L-1)+N;c&=E*(L-1)+N<=o.Fd,c&=M*(Y-1)+P<=o.Cd,c=(c&=lt*(Y-1)+P<=o.Ed)&E>=N&M>=P&lt>=P,c&=o.y!=null,c&=o.f!=null,c&=o.ea!=null,y==12&&(c&=B>=N,c&=X<=o.Tc,c&=o.F!=null)}else c=0;o=c?0:2}}return o!=0||g!=null&&g.fd&&(o=qi(m)),o}var xa=64,zi=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],uo=24,On=32,zn=8,_a=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Tt("Predictor0","PredictorAdd0"),D.Predictor0=function(){return 4278190080},D.Predictor1=function(o){return o},D.Predictor2=function(o,c,g){return c[g+0]},D.Predictor3=function(o,c,g){return c[g+1]},D.Predictor4=function(o,c,g){return c[g-1]},D.Predictor5=function(o,c,g){return Xt(Xt(o,c[g+1]),c[g+0])},D.Predictor6=function(o,c,g){return Xt(o,c[g-1])},D.Predictor7=function(o,c,g){return Xt(o,c[g+0])},D.Predictor8=function(o,c,g){return Xt(c[g-1],c[g+0])},D.Predictor9=function(o,c,g){return Xt(c[g+0],c[g+1])},D.Predictor10=function(o,c,g){return Xt(Xt(o,c[g-1]),Xt(c[g+0],c[g+1]))},D.Predictor11=function(o,c,g){var m=c[g+0];return 0>=re(m>>24&255,o>>24&255,(c=c[g-1])>>24&255)+re(m>>16&255,o>>16&255,c>>16&255)+re(m>>8&255,o>>8&255,c>>8&255)+re(255&m,255&o,255&c)?m:o},D.Predictor12=function(o,c,g){var m=c[g+0];return(ye((o>>24&255)+(m>>24&255)-((c=c[g-1])>>24&255))<<24|ye((o>>16&255)+(m>>16&255)-(c>>16&255))<<16|ye((o>>8&255)+(m>>8&255)-(c>>8&255))<<8|ye((255&o)+(255&m)-(255&c)))>>>0},D.Predictor13=function(o,c,g){var m=c[g-1];return(me((o=Xt(o,c[g+0]))>>24&255,m>>24&255)<<24|me(o>>16&255,m>>16&255)<<16|me(o>>8&255,m>>8&255)<<8|me(255&o,255&m))>>>0};var ui=D.PredictorAdd0;D.PredictorAdd1=de,Tt("Predictor2","PredictorAdd2"),Tt("Predictor3","PredictorAdd3"),Tt("Predictor4","PredictorAdd4"),Tt("Predictor5","PredictorAdd5"),Tt("Predictor6","PredictorAdd6"),Tt("Predictor7","PredictorAdd7"),Tt("Predictor8","PredictorAdd8"),Tt("Predictor9","PredictorAdd9"),Tt("Predictor10","PredictorAdd10"),Tt("Predictor11","PredictorAdd11"),Tt("Predictor12","PredictorAdd12"),Tt("Predictor13","PredictorAdd13");var hi=D.PredictorAdd2;ot("ColorIndexInverseTransform","MapARGB","32b",function(o){return o>>8&255},function(o){return o}),ot("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(o){return o},function(o){return o>>8&255});var Na,Ui=D.ColorIndexInverseTransform,ln=D.MapARGB,Sl=D.VP8LColorIndexInverseTransformAlpha,Ir=D.MapAlpha,vr=D.VP8LPredictorsAdd=[];vr.length=16,(D.VP8LPredictors=[]).length=16,(D.VP8LPredictorsAdd_C=[]).length=16,(D.VP8LPredictors_C=[]).length=16;var Hi,ho,fo,Sa,Wi,$i,fi,Yr,di,Aa,Pn,Fr,De,Me,Qe,un,Zr,po,La,cs,hu,fu,du,pu,go,gu,mu,vu,bu=a(511),wu=a(2041),yu=
vendor: 4,699 bytes, line 138
138a(225),xu=a(767),_u=0,Al=wu,us=yu,Yn=xu,ur=bu,hs=0,fs=1,Nu=2,ds=3,ps=4,Ll=5,Su=6,kl=7,Pl=8,gs=9,Cl=10,B1=[2,3,7],q1=[3,3,11],Au=[280,256,256,256,40],z1=[0,1,1,1,0],U1=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],H1=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],W1=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],$1=8,El=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],jl=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,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,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],mo=null,V1=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],G1=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Lu=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Y1=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,25
1385,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Z1=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,
1381,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],K1=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,25
vendor: 23,707 bytes, lines 138-162
1385,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],X1=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],pi=[],br=[],Kr=[],J1=1,ku=2,gi=[],hr=[];Ln("UpsampleRgbLinePair",Di,3),Ln("UpsampleBgrLinePair",ba,3),Ln("UpsampleRgbaLinePair",lo,4),Ln("UpsampleBgraLinePair",Bi,4),Ln("UpsampleArgbLinePair",Mi,4),Ln("UpsampleRgba4444LinePair",kn,2),Ln("UpsampleRgb565LinePair",wa,2);var Q1=D.UpsampleRgbLinePair,t0=D.UpsampleBgrLinePair,Pu=D.UpsampleRgbaLinePair,Cu=D.UpsampleBgraLinePair,Eu=D.UpsampleArgbLinePair,ju=D.UpsampleRgba4444LinePair,e0=D.UpsampleRgb565LinePair,ms=16,vs=1<<ms-1,vo=-227,Il=482,Iu=6,n0=(256<<Iu)-1,Fu=0,r0=a(256),i0=a(256),a0=a(256),o0=a(256),s0=a(Il-vo),l0=a(Il-vo);jr("YuvToRgbRow",Di,3),jr("YuvToBgrRow",ba,3),jr("YuvToRgbaRow",lo,4),jr("YuvToBgraRow",Bi,4),jr("YuvToArgbRow",Mi,4),jr("YuvToRgba4444Row",kn,2),jr("YuvToRgb565Row",wa,2);var Ru=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],bs=[0,2,8],c0=[8,7,6,4,4,2,2,2,1,1,1,1],u0=1;this.WebPDecodeRGBA=function(o,c,g,m,y){var N=fs,L=new V,P=new Dt;L.ba=P,P.S=N,P.width=[P.width],P.height=[P.height];var E=P.width,M=P.height,Y=new Ut;if(Y==null||o==null)var lt=2;else e(Y!=null),lt=ls(o,c,g,Y.width,Y.height,Y.Pd,Y.Qd,Y.format,null);if(lt!=0?E=0:(E!=null&&(E[0]=Y.width[0]),M!=null&&(M[0]=Y.height[0]),E=1),E){P.width=P.width[0],P.height=P.height[0],m!=null&&(m[0]=P.width),y!=null&&(y[0]=P.height);t:{if(m=new ca,(y=new tt).data=o,y.w=c,y.ha=g,y.kd=1,c=[0],e(y!=null),((o=ls(y.data,y.w,y.ha,null,null,null,c,null,y))==0||o==7)&&c[0]&&(o=4),(c=o)==0){if(e(L!=null),m.data=y.data,m.w=y.w+y.offset,m.ha=y.ha-y.offset,m.put=Gt,m.ac=cn,m.bc=qn,m.ma=L,y.xa){if((o=Ei())==null){L=1;break t}if(function(B,X){var rt=[0],mt=[0],st=[0];e:for(;;){if(B==null)return 0;if(X==null)return B.a=2,0;if(B.l=X,B.a=0,ht(B.m,X.data,X.w,X.ha),!ir(B.m,rt,mt,st)){B.a=3;break e}if(B.xb=ku,X.width=rt[0],X.height=mt[0],!Lr(rt[0],mt[0],1,B,null))break e;return 1}return e(B.a!=0),0}(o,m)){if(m=(c=co(m.width,m.height,L.Oa,L.ba))==0){e:{m=o;n:for(;;){if(m==null){m=0;break e}if(e(m.s.yc!=null),e(m.s.Ya!=null),e(0<m.s.Wb),e((g=m.l)!=null),e((y=g.ma)!=null),m.xb!=0){if(m.ca=y.ba,m.tb=y.tb,e(m.ca!=null),!cr(y.Oa,g,ds)){m.a=2;break n}if(!ji(m,g.width)||g.da)break n;if((g.da||Et(m.ca.S))&&Ve(),11>m.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),m.ca.f.kb.F!=null&&Ve()),m.Pb&&0<m.s.ua&&m.s.vb.X==null&&!F(m.s.vb,m.s.Wa.Xa)){m.a=1;break n}m.xb=0}if(!mr(m,m.V,m.Ba,m.c,m.i,g.o,ai))break n;y.Dc=m.Ma,m=1;break e}e(m.a!=0),m=0}m=!m}m&&(c=o.a)}else c=o.a}else{if((o=new sl)==null){L=1;break t}if(o.Fa=y.na,o.P=y.P,o.qc=y.Sa,Pr(o,m)){if((c=co(m.width,m.height,L.Oa,L.ba))==0){if(o.Aa=0,g=L.Oa,e((y=o)!=null),g!=null){if(0<(E=0>(E=g.Md)?0:100<E?255:255*E/100)){for(M=Y=0;4>M;++M)12>(lt=y.pb[M]).lc&&(lt.ia=E*c0[0>lt.lc?0:lt.lc]>>3),Y|=lt.ia;Y&&(alert("todo:VP8InitRandom"),y.ia=1)}y.Ga=g.Id,100<y.Ga?y.Ga=100:0>y.Ga&&(y.Ga=0)}(function(B,X){if(B==null)return 0;if(X==null)return on(B,2,"NULL VP8Io parameter in VP8Decode().");if(!B.cb&&!Pr(B,X))return 0;if(e(B.cb),X.ac==null||X.ac(X)){X.ob&&(B.L=0);var rt=bs[B.L];if(B.L==2?(B.yb=0,B.zb=0):(B.yb=X.v-rt>>4,B.zb=X.j-rt>>4,0>B.yb&&(B.yb=0),0>B.zb&&(B.zb=0)),B.Va=X.o+15+rt>>4,B.Hb=X.va+15+rt>>4,B.Hb>B.za&&(B.Hb=B.za),B.Va>B.Ub&&(B.Va=B.Ub),0<B.L){var mt=B.ed;for(rt=0;4>rt;++rt){var st;if(B.Qa.Cb){var bt=B.Qa.Lb[rt];B.Qa.Fb||(bt+=mt.Tb)}else bt=mt.Tb;for(st=0;1>=st;++st){var yt=B.gd[rt][st],Lt=bt;if(mt.Pc&&(Lt+=mt.vd[0],st&&(Lt+=mt.od[0])),0<(Lt=0>Lt?0:63<Lt?63:Lt)){var Nt=Lt;0<mt.wb&&(Nt=4<mt.wb?Nt>>2:Nt>>1)>9-mt.wb&&(Nt=9-mt.wb),1>Nt&&(Nt=1),yt.dd=Nt,yt.tc=2*Lt+Nt,yt.ld=40<=Lt?2:15<=Lt?1:0}else yt.tc=0;yt.La=st}}}rt=0}else on(B,6,"Frame setup failed"),rt=B.a;if(rt=rt==0){if(rt){B.$c=0,0<B.Aa||(B.Ic=u0);e:{rt=B.Ic,mt=4*(Nt=B.za);var Qt=32*Nt,Mt=Nt+1,ve=0<B.L?Nt*(0<B.Aa?2:1):0,Yt=(B.Aa==2?2:1)*Nt;if((yt=mt+832+(st=3*(16*rt+bs[B.L])/2*Qt)+(bt=B.Fa!=null&&0<B.Fa.length?B.Kc.c*B.Kc.i:0))!=yt)rt=0;else{if(yt>B.Vb){if(B.Vb=0,B.Ec=a(yt),B.Fc=0,B.Ec==null){rt=on(B,1,"no memory during frame initialization.");break e}B.Vb=yt}yt=B.Ec,Lt=B.Fc,B.Ac=yt,B.Bc=Lt,Lt+=mt,B.Gd=l(Qt,Ko),B.Hd=0,B.rb=l(Mt+1,Ja),B.sb=1,B.wa=ve?l(ve,lr):null,B.Y=0,B.D.Nb=0,B.D.wa=B.wa,B.D.Y=B.Y,0<B.Aa&&(B.D.Y+=Nt),e(!0),B.oc=yt,B.pc=Lt,Lt+=832,B.ya=l(Yt,Qa),B.aa=0,B.D.ya=B.ya,B.D.aa=B.aa,B.Aa==2&&(B.D.aa+=Nt),B.R=16*Nt,B.B=8*Nt,Nt=(Qt=bs[B.L])*B.R,Qt=Qt/2*B.B,B.sa=yt,B.ta=Lt+Nt,B.qa=B.sa,B.ra=B.ta+16*rt*B.R+Qt,B.Ha=B.qa,B.Ia=B.ra+8*rt*B.B+Qt,B.$c=0,Lt+=st,B.mb=bt?yt:null,B.nb=bt?Lt:null,e(Lt+bt<=B.Fc+B.Vb),to(B),i(B.Ac,B.Bc,0,mt),rt=1}}if(rt){if(X.ka=0,X.y=B.sa,X.O=B.ta,X.f=B.qa,X.N=B.ra,X.ea=B.Ha,X.Vd=B.Ia,X.fa=B.R,X.Rc=B.B,X.F=null,X.J=0,!_u){for(rt=-255;255>=rt;++rt)bu[255+rt]=0>rt?-rt:rt;for(rt=-1020;1020>=rt;++rt)wu[1020+rt]=-128>rt?-128:127<rt?127:rt;for(rt=-112;112>=rt;++rt)yu[112+rt]=-16>rt?-16:15<rt?15:rt;for(rt=-255;510>=rt;++rt)xu[255+rt]=0>rt?0:255<rt?255:rt;_u=1}fi=ts,Yr=ll,Aa=cl,Pn=ul,Fr=Cr,di=Qo,De=rs,Me=is,Qe=os,un=d,Zr=as,po=Ri,La=w,cs=T,hu=ma,fu=oo,du=va,pu=ns,br[0]=vl,br[1]=da,br[2]=gl,br[3]=ml,br[4]=bl,br[5]=Hr,br[6]=wl,br[7]=Wr,br[8]=xl,br[9]=yl,pi[0]=es,pi[1]=hl,pi[2]=fl,pi[3]=dl,pi[4]=si,pi[5]=pl,pi[6]=Ii,Kr[0]=_l,Kr[1]=eo,Kr[2]=pa,Kr[3]=no,Kr[4]=Nl,Kr[5]=ga,Kr[6]=ro,rt=1}else rt=0}rt&&(rt=function(xe,hn){for(xe.M=0;xe.M<xe.Va;++xe.M){var be,Zt=xe.Jc[xe.M&xe.Xb],Ft=xe.m,tn=xe;for(be=0;be<tn.za;++be){var ge=Ft,Se=tn,Ue=Se.Ac,_n=Se.Bc+4*be,Tn=Se.zc,Ze=Se.ya[Se.aa+be];if(Se.Qa.Bb?Ze.$b=vt(ge,Se.Pa.jb[0])?2+vt(ge,Se.Pa.jb[2]):vt(ge,Se.Pa.jb[1]):Ze.$b=0,Se.kc&&(Ze.Ad=vt(ge,Se.Bd)),Ze.Za=!vt(ge,145)+0,Ze.Za){var Cn=Ze.Ob,Dn=0;for(Se=0;4>Se;++Se){var fn,Ae=Tn[0+Se];for(fn=0;4>fn;++fn){Ae=Z1[Ue[_n+fn]][Ae];for(var Pe=Lu[vt(ge,Ae[0])];0<Pe;)Pe=Lu[2*Pe+vt(ge,Ae[Pe])];Ae=-Pe,Ue[_n+fn]=Ae}r(Cn,Dn,Ue,_n,4),Dn+=4,Tn[0+Se]=Ae}}else Ae=vt(ge,156)?vt(ge,128)?1:3:vt(ge,163)?2:0,Ze.Ob[0]=Ae,i(Ue,_n,Ae,4),i(Tn,0,Ae,4);Ze.Dd=vt(ge,142)?vt(ge,114)?vt(ge,183)?1:3:2:0}if(tn.m.Ka)return on(xe,7,"Premature end-of-partition0 encountered.");for(;xe.ja<xe.za;++xe.ja){if(tn=Zt,ge=(Ft=xe).rb[Ft.sb-1],Ue=Ft.rb[Ft.sb+Ft.ja],be=Ft.ya[Ft.aa+Ft.ja],_n=Ft.kc?be.Ad:0)ge.la=Ue.la=0,be.Za||(ge.Na=Ue.Na=0),be.Hc=0,be.Gc=0,be.ia=0;else{var Ke,Ce;if(ge=Ue,Ue=tn,_n=Ft.Pa.Xc,Tn=Ft.ya[Ft.aa+Ft.ja],Ze=Ft.pb[Tn.$b],Se=Tn.ad,Cn=0,Dn=Ft.rb[Ft.sb-1],Ae=fn=0,i(Se,Cn,0,384),Tn.Za)var Nn=0,wr=_n[3];else{Pe=a(16);var en=ge.Na+Dn.Na;if(en=mo(Ue,_n[1],en,Ze.Eb,0,Pe,0),ge.Na=Dn.Na=(0<en)+0,1<en)fi(Pe,0,Se,Cn);else{var Un=Pe[0]+3>>3;for(Pe=0;256>Pe;Pe+=16)Se[Cn+Pe]=Un}Nn=1,wr=_n[0]}var Oe=15&ge.la,dn=15&Dn.la;for(Pe=0;4>Pe;++Pe){var Zn=1&dn;for(Un=Ce=0;4>Un;++Un)Oe=Oe>>1|(Zn=(en=mo(Ue,wr,en=Zn+(1&Oe),Ze.Sc,Nn,Se,Cn))>Nn)<<7,Ce=Ce<<2|(3<en?3:1<en?2:Se[Cn+0]!=0),Cn+=16;Oe>>=4,dn=dn>>1|Zn<<7,fn=(fn<<8|Ce)>>>0}for(wr=Oe,Nn=dn>>4,Ke=0;4>Ke;Ke+=2){for(Ce=0,Oe=ge.la>>4+Ke,dn=Dn.la>>4+Ke,Pe=0;2>Pe;++Pe){for(Zn=1&dn,Un=0;2>Un;++Un)en=Zn+(1&Oe),Oe=Oe>>1|(Zn=0<(en=mo(Ue,_n[2],en,Ze.Qc,0,Se,Cn)))<<3,Ce=Ce<<2|(3<en?3:1<en?2:Se[Cn+0]!=0),Cn+=16;Oe>>=2,dn=dn>>1|Zn<<5}Ae|=Ce<<4*Ke,wr|=Oe<<4<<Ke,Nn|=(240&dn)<<Ke}ge.la=wr,Dn.la=Nn,Tn.Hc=fn,Tn.Gc=Ae,Tn.ia=43690&Ae?0:Ze.ia,_n=!(fn|Ae)}if(0<Ft.L&&(Ft.wa[Ft.Y+Ft.ja]=Ft.gd[be.$b][be.Za],Ft.wa[Ft.Y+Ft.ja].La|=!_n),tn.Ka)return on(xe,7,"Premature end-of-file encountered.")}if(to(xe),Ft=hn,tn=1,be=(Zt=xe).D,ge=0<Zt.L&&Zt.M>=Zt.zb&&Zt.M<=Zt.Va,Zt.Aa==0)e:{if(be.M=Zt.M,be.uc=ge,ya(Zt,be),tn=1,be=(Ce=Zt.D).Nb,ge=(Ae=bs[Zt.L])*Zt.R,Ue=Ae/2*Zt.B,Pe=16*be*Zt.R,Un=8*be*Zt.B,_n=Zt.sa,Tn=Zt.ta-ge+Pe,Ze=Zt.qa,Se=Zt.ra-Ue+Un,Cn=Zt.Ha,Dn=Zt.Ia-Ue+Un,dn=(Oe=Ce.M)==0,fn=Oe>=Zt.Va-1,Zt.Aa==2&&ya(Zt,Ce),Ce.uc)for(Zn=(en=Zt).D.M,e(en.D.uc),Ce=en.yb;Ce<en.Hb;++Ce){Nn=Ce,wr=Zn;var Mn=(Kn=(Sn=en).D).Nb;Ke=Sn.R;var Kn=Kn.wa[Kn.Y+Nn],Xn=Sn.sa,Hn=Sn.ta+16*Mn*Ke+16*Nn,Jn=Kn.dd,Be=Kn.tc;if(Be!=0)if(e(3<=Be),Sn.L==1)0<Nn&&fu(Xn,Hn,Ke,Be+4),Kn.La&&pu(Xn,Hn,Ke,Be),0<wr&&hu(Xn,Hn,Ke,Be+4),Kn.La&&du(Xn,Hn,Ke,Be);else{var Qn=Sn.B,yr=Sn.qa,Vi=Sn.ra+8*Mn*Qn+8*Nn,Xr=Sn.Ha,Sn=Sn.Ia+8*Mn*Qn+8*Nn;Mn=Kn.ld,0<Nn&&(Me(Xn,Hn,Ke,Be+4,Jn,Mn),un(yr,Vi,Xr,Sn,Qn,Be+4,Jn,Mn)),Kn.La&&(po(Xn,Hn,Ke,Be,Jn,Mn),cs(yr,Vi,Xr,Sn,Qn,Be,Jn,Mn)),0<wr&&(De(Xn,Hn,Ke,Be+4,Jn,Mn),Qe(yr,Vi,Xr,Sn,Qn,Be+4,Jn,Mn)),Kn.La&&(Zr(Xn,Hn,Ke,Be,Jn,Mn),La(yr,Vi,Xr,Sn,Qn,Be,Jn,Mn))}}if(Zt.ia&&alert("todo:DitherRow"),Ft.put!=null){if(Ce=16*Oe,Oe=16*(Oe+1),dn?(Ft.y=Zt.sa,Ft.O=Zt.ta+Pe,Ft.f=Zt.qa,Ft.N=Zt.ra+Un,Ft.ea=Zt.Ha,Ft.W=Zt.Ia+Un):(Ce-=Ae,Ft.y=_n,Ft.O=Tn,Ft.f=Ze,Ft.N=Se,Ft.ea=Cn,Ft.W=Dn),fn||(Oe-=Ae),Oe>Ft.o&&(Oe=Ft.o),Ft.F=null,Ft.J=null,Zt.Fa!=null&&0<Zt.Fa.length&&Ce<Oe&&(Ft.J=sn(Zt,Ft,Ce,Oe-Ce),Ft.F=Zt.mb,Ft.F==null&&Ft.F.length==0)){tn=on(Zt,3,"Could not decode alpha data.");break e}Ce<Ft.j&&(Ae=Ft.j-Ce,Ce=Ft.j,e(!(1&Ae)),Ft.O+=Zt.R*Ae,Ft.N+=Zt.B*(Ae>>1),Ft.W+=Zt.B*(Ae>>1),Ft.F!=null&&(Ft.J+=Ft.width*Ae)),Ce<Oe&&(Ft.O+=Ft.v,Ft.N+=Ft.v>>1,Ft.W+=Ft.v>>1,Ft.F!=null&&(Ft.J+=Ft.v),Ft.ka=Ce-Ft.j,Ft.U=Ft.va-Ft.v,Ft.T=Oe-Ce,tn=Ft.put(Ft))}be+1!=Zt.Ic||fn||(r(Zt.sa,Zt.ta-ge,_n,Tn+16*Zt.R,ge),r(Zt.qa,Zt.ra-Ue,Ze,Se+8*Zt.B,Ue),r(Zt.Ha,Zt.Ia-Ue,Cn,Dn+8*Zt.B,Ue))}if(!tn)return on(xe,6,"Output aborted.")}return 1}(B,X)),X.bc!=null&&X.bc(X),rt&=1}return rt?(B.cb=0,rt):0})(o,m)||(c=o.a)}}else c=o.a}c==0&&L.Oa!=null&&L.Oa.fd&&(c=qi(L.ba))}L=c}N=L!=0?null:11>N?P.f.RGBA.eb:P.f.kb.y}else N=null;return N};var Ou=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function h(D,J){for(var x="",j=0;j<4;j++)x+=String.fromCharCode(D[J++]);return x}function f(D,J){return D[J+0]|D[J+1]<<8}function v(D,J){return(D[J+0]|D[J+1]<<8|D[J+2]<<16)>>>0}function b(D,J){return(D[J+0]|D[J+1]<<8|D[J+2]<<16|D[J+3]<<24)>>>0}new u;var p=[0],S=[0],k=[],C=new u,_=t,O=function(D,J){var x={},j=0,W=!1,q=0,Q=0;if(x.frames=[],!function(A,z){for(var H=0;H<4;H++)if(A[z+H]!="RIFF".charCodeAt(H))return!0;return!1}(D,J)){for(b(D,J+=4),J+=8;J<D.length;){var ct=h(D,J),at=b(D,J+=4);J+=4;var K=at+(1&at);switch(ct){case"VP8 ":case"VP8L":x.frames[j]===void 0&&(x.frames[j]={}),(pt=x.frames[j]).src_off=W?Q:J-8,pt.src_size=q+at+8,j++,W&&(W=!1,q=0,Q=0);break;case"VP8X":(pt=x.header={}).feature_flags=D[J];var ht=J+4;pt.canvas_width=1+v(D,ht),ht+=3,pt.canvas_height=1+v(D,ht),ht+=3;break;case"ALPH":W=!0,q=K+8,Q=J-8;break;case"ANIM":(pt=x.header).bgcolor=b(D,J),ht=J+4,pt.loop_count=f(D,ht),ht+=2;break;case"ANMF":var At,pt;(pt=x.frames[j]={}).offset_x=2*v(D,J),J+=3,pt.offset_y=2*v(D,J),J+=3,pt.width=1+v(D,J),J+=3,pt.height=1+v(D,J),J+=3,pt.duration=v(D,J),J+=3,At=D[J++],pt.dispose=1&At,pt.blend=At>>1&1}ct!="ANMF"&&(J+=K)}return x}}(_,0);O.response=_,O.rgbaoutput=!0,O.dataurl=!1;var U=O.header?O.header:null,R=O.frames?O.frames:null;if(U){U.loop_counter=U.loop_count,p=[U.canvas_height],S=[U.canvas_width];for(var nt=0;nt<R.length&&R[nt].blend!=0;nt++);}var dt=R[0],et=C.WebPDecodeRGBA(_,dt.src_off,dt.src_size,S,p);dt.rgba=et,dt.imgwidth=S[0],dt.imgheight=p[0];for(var $=0;$<S[0]*p[0]*4;$++)k[$]=et[$];return this.width=S,this.height=p,this.data=k,this}/** ====================================================================
139 * @license
140 * jsPDF XMP metadata plugin
141 * Copyright (c) 2016 Jussi Utunen, [email protected]
142 *
143 * Permission is hereby granted, free of charge, to any person obtaining
144 * a copy of this software and associated documentation files (the
145 * "Software"), to deal in the Software without restriction, including
146 * without limitation the rights to use, copy, modify, merge, publish,
147 * distribute, sublicense, and/or sell copies of the Software, and to
148 * permit persons to whom the Software is furnished to do so, subject to
149 * the following conditions:
150 *
151 * The above copyright notice and this permission notice shall be
152 * included in all copies or substantial portions of the Software.
153 *
154 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
155 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
156 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
157 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
158 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
159 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
160 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
161 * ====================================================================
162 */function Im(){var t,e=this.internal.__metadata__.metadata,n=unescape(encodeURIComponent(e));t=this.internal.__metadata__.rawXml?n:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t.length+" >>"),this.internal.write("stream"),this.internal.write(t),this.internal.write("endstream"),this.internal.write("endobj")}function Fm(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(t){var e,n,r,i,a,l,s,u,h,f=function(A){return A=A||{},this.isStrokeTransparent=A.isStrokeTransparent||!1,this.strokeOpacity=A.strokeOpacity||1,this.strokeStyle=A.strokeStyle||"#000000",this.fillStyle=A.fillStyle||"#000000",this.isFillTransparent=A.isFillTransparent||!1,this.fillOpacity=A.fillOpacity||1,this.font=A.font||"10px sans-serif",this.textBaseline=A.textBaseline||"alphabetic",this.textAlign=A.textAlign||"left",this.lineWidth=A.lineWidth||1,this.lineJoin=A.lineJoin||"miter",this.lineCap=A.lineCap||"butt",this.path=A.path||[],this.transform=A.transform!==void 0?A.transform.clone():new u,this.globalCompositeOperation=A.globalCompositeOperation||"normal",this.globalAlpha=A.globalAlpha||1,this.clip_path=A.clip_path||[],this.currentPoint=A.currentPoint||new l,this.miterLimit=A.miterLimit||10,this.lastPoint=A.lastPoint||new l,this.lineDashOffset=A.lineDashOffset||0,this.lineDash=A.lineDash||[],this.margin=A.margin||[0,0,0,0],this.prevPageLastElemOffset=A.prevPageLastElemOffset||0,this.ignoreClearRect=typeof A.ignoreClearRect!="boolean"||A.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new v(this),e=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,l=this.internal.Point,s=this.internal.Rectangle,u=this.internal.Matrix,h=new f}]);var v=function(A){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var z=A;Object.defineProperty(this,"pdf",{get:function(){return z}});var H=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return H},set:function(F){H=!!F}});var G=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return G},set:function(F){G=!!F}});var Z=0;Object.defineProperty(this,"posX",{get:function(){return Z},set:function(F){isNaN(F)||(Z=F)}});var it=0;Object.defineProperty(this,"posY",{get:function(){return it},set:function(F){isNaN(F)||(it=F)}}),Object.defineProperty(this,"margin",{get:function(){return h.margin},set:function(F){var It;typeof F=="number"?It=[F,F,F,F]:((It=new Array(4))[0]=F[0],It[1]=F.length>=2?F[1]:It[0],It[2]=F.length>=3?F[2]:It[0],It[3]=F.length>=4?F[3]:It[1]),h.margin=It}});var ut=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ut},set:function(F){ut=F}});var ft=0;Object.defineProperty(this,"lastBreak",{get:function(){return ft},set:function(F){ft=F}});var vt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return vt},set:function(F){vt=F}}),Object.defineProperty(this,"ctx",{get:function(){return h},set:function(F){F instanceof f&&(h=F)}}),Object.defineProperty(this,"path",{get:function(){return h.path},set:function(F){h.path=F}});var St=[];Object.defineProperty(this,"ctxStack",{get:function(){return St},set:function(F){St=F}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(F){var It;It=b(F),this.ctx.fillStyle=It.style,this.ctx.isFillTransparent=It.a===0,this.ctx.fillOpacity=It.a,this.pdf.setFillColor(It.r,It.g,It.b,{a:It.a}),this.pdf.setTextColor(It.r,It.g,It.b,{a:It.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(F){var It=b(F);this.ctx.strokeStyle=It.style,this.ctx.isStrokeTransparent=It.a===0,this.ctx.strokeOpacity=It.a,It.a===0?this.pdf.setDrawColor(255,255,255):(It.a,this.pdf.setDrawColor(It.r,It.g,It.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(F){["butt","round","square"].indexOf(F)!==-1&&(this.ctx.lineCap=F,this.pdf.setLineCap(F))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(F){isNaN(F)||(this.ctx.lineWidth=F,this.pdf.setLineWidth(F))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(F){["bevel","round","miter"].indexOf(F)!==-1&&(this.ctx.lineJoin=F,this.pdf.setLineJoin(F))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(F){isNaN(F)||(this.ctx.miterLimit=F,this.pdf.setMiterLimit(F))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(F){this.ctx.textBaseline=F}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(F){["right","end","center","left","start"].indexOf(F)!==-1&&(this.ctx.textAlign=F)}});var Pt=null,wt=null,Kt=null;Object.defineProperty(this,"fontFaces",{get:function(){return Kt},set:function(F){Pt=null,wt=null,Kt=F}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(F){var It;if(this.ctx.font=F,(It=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(F))!==null){var le=It[1];It[2];var zt=It[3],xt=It[4];It[5];var ee=It[6],Tt=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(xt)[2];xt=Math.floor(Tt==="px"?parseFloat(xt)*this.pdf.internal.scaleFactor:Tt==="em"?parseFloat(xt)*this.pdf.getFontSize():parseFloat(xt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(xt);var Vt=function(ot){var Ct,Rt,ie=[],ue=ot.trim();if(ue==="")return wc;if(ue in df)return[df[ue]];for(;ue!=="";){switch(Rt=null,Ct=(ue=gf(ue)).charAt(0)){case'"':case"'":Rt=Lm(ue.substring(1),Ct);break;default:Rt=km(ue)}if(Rt===null||(ie.push(Rt[0]),(ue=gf(Rt[1]))!==""&&ue.charAt(0)!==","))return wc;ue=ue.replace(/^,/,"")}return ie}(ee);if(this.fontFaces){var Xt=function(ot,Ct){var Rt=ot.getFontList(),ie=JSON.stringify(Rt);if(Pt===null||wt!==ie){var ue=function(ke){var Jt=[];return Object.keys(ke).forEach(function(jt){ke[jt].forEach(function(Et){var Ot=null;switch(Et){case"bold":Ot={family:jt,weight:"bold"};break;case"italic":Ot={family:jt,style:"italic"};break;case"bolditalic":Ot={family:jt,weight:"bold",style:"italic"};break;case"":case"normal":Ot={family:jt}}Ot!==null&&(Ot.ref={name:jt,style:Et},Jt.push(Ot))})}),Jt}(Rt);Pt=function(ke){for(var Jt={},jt=0;jt<ke.length;++jt){var Et=bc(ke[jt]),Ot=Et.family,ne=Et.stretch,Dt=Et.style,Ut=Et.weight;Jt[Ot]=Jt[Ot]||{},Jt[Ot][ne]=Jt[Ot][ne]||{},Jt[Ot][ne][Dt]=Jt[Ot][ne][Dt]||{},Jt[Ot][ne][Dt][Ut]=Et}return Jt}(ue.concat(Ct)),wt=ie}return Pt}(this.pdf,this.fontFaces),ye=Vt.map(function(ot){return{family:ot,stretch:"normal",weight:zt,style:le}}),me=function(ot,Ct,Rt){for(var ie=(Rt=Rt||{}).defaultFontFamily||"times",ue=Object.assign({},Am,Rt.genericFontFamilies||{}),ke=null,Jt=null,jt=0;jt<Ct.length;++jt)if(ue[(ke=bc(Ct[jt])).family]&&(ke.family=ue[ke.family]),ot.hasOwnProperty(ke.family)){Jt=ot[ke.family];break}if(!(Jt=Jt||ot[ie]))throw new Error("Could not find a font-family for the rule '"+pf(ke)+"' and default family '"+ie+"'.");if(Jt=function(Et,Ot){if(Ot[Et])return Ot[Et];var ne=$c[Et],Dt=ne<=$c.normal?-1:1,Ut=ff(Ot,w1,ne,Dt);if(!Ut)throw new Error("Could not find a matching font-stretch value for "+Et);return Ut}(ke.stretch,Jt),Jt=function(Et,Ot){if(Ot[Et])return Ot[Et];for(var ne=b1[Et],Dt=0;Dt<ne.length;++Dt)if(Ot[ne[Dt]])return Ot[ne[Dt]];throw new Error("Could not find a matching font-style for "+Et)}(ke.style,Jt),!(Jt=function(Et,Ot){if(Ot[Et])return Ot[Et];if(Et===400&&Ot[500])return Ot[500];if(Et===500&&Ot[400])return Ot[400];var ne=Sm[Et],Dt=ff(Ot,y1,ne,Et<400?-1:1);if(!Dt)throw new Error("Could not find a matching font-weight for value "+Et);return Dt}(ke.weight,Jt)))throw new Error("Failed to resolve a font for the rule '"+pf(ke)+"'.");return Jt}(Xt,ye);this.pdf.setFont(me.ref.name,me.ref.style)}else{var re="";(zt==="bold"||parseInt(zt,10)>=700||le==="bold")&&(re="bold"),le==="italic"&&(re+="italic"),re.length===0&&(re="normal");for(var de="",we={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Bt=0;Bt<Vt.length;Bt++){if(this.pdf.internal.getFont(Vt[Bt],re,{noFallback:!0,disableWarning:!0})!==void 0){de=Vt[Bt];break}if(re==="bolditalic"&&this.pdf.internal.getFont(Vt[Bt],"bold",{noFallback:!0,disableWarning:!0})!==void 0)de=Vt[Bt],re="bold";else if(this.pdf.internal.getFont(Vt[Bt],"normal",{noFallback:!0,disableWarning:!0})!==void 0){de=Vt[Bt],re="normal";break}}if(de===""){for(var ce=0;ce<Vt.length;ce++)if(we[Vt[ce]]){de=we[Vt[ce]];break}}de=de===""?"Times":de,this.pdf.setFont(de,re)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(F){this.ctx.globalCompositeOperation=F}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(F){this.ctx.globalAlpha=F}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(F){this.ctx.lineDashOffset=F,pt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(F){this.ctx.lineDash=F,pt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(F){this.ctx.ignoreClearRect=!!F}})};v.prototype.setLineDash=function(A){this.lineDash=A},v.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},v.prototype.fill=function(){R.call(this,"fill",!1)},v.prototype.stroke=function(){R.call(this,"stroke",!1)},v.prototype.beginPath=function(){this.path=[{type:"begin"}]},v.prototype.moveTo=function(A,z){if(isNaN(A)||isNaN(z))throw Te.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to 
162jsPDF.context2d.moveTo");var H=this.ctx.transform.applyToPoint(new l(A,z));this.path.push({type:"mt",x:H.x,y:H.y}),this.ctx.lastPoint=new l(A,z)},v.prototype.closePath=function(){var A=new l(0,0),z=0;for(z=this.path.length-1;z!==-1;z--)if(this.path[z].type==="begin"&&je(this.path[z+1])==="object"&&typeof this.path[z+1].x=="number"){A=new l(this.path[z+1].x,this.path[z+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new l(A.x,A.y)},v.prototype.lineTo=function(A,z){if(isNaN(A)||isNaN(z))throw Te.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var H=this.ctx.transform.applyToPoint(new l(A,z));this.path.push({type:"lt",x:H.x,y:H.y}),this.ctx.lastPoint=new l(H.x,H.y)},v.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),R.call(this,null,!0)},v.prototype.quadraticCurveTo=function(A,z,H,G){if(isNaN(H)||isNaN(G)||isNaN(A)||isNaN(z))throw Te.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var Z=this.ctx.transform.applyToPoint(new l(H,G)),it=this.ctx.transform.applyToPoint(new l(A,z));this.path.push({type:"qct",x1:it.x,y1:it.y,x:Z.x,y:Z.y}),this.ctx.lastPoint=new l(Z.x,Z.y)},v.prototype.bezierCurveTo=function(A,z,H,G,Z,it){if(isNaN(Z)||isNaN(it)||isNaN(A)||isNaN(z)||isNaN(H)||isNaN(G))throw Te.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ut=this.ctx.transform.applyToPoint(new l(Z,it)),ft=this.ctx.transform.applyToPoint(new l(A,z)),vt=this.ctx.transform.applyToPoint(new l(H,G));this.path.push({type:"bct",x1:ft.x,y1:ft.y,x2:vt.x,y2:vt.y,x:ut.x,y:ut.y}),this.ctx.lastPoint=new l(ut.x,ut.y)},v.prototype.arc=function(A,z,H,G,Z,it){if(isNaN(A)||isNaN(z)||isNaN(H)||isNaN(G)||isNaN(Z))throw Te.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(it=!!it,!this.ctx.transform.isIdentity){var ut=this.ctx.transform.applyToPoint(new l(A,z));A=ut.x,z=ut.y;var ft=this.ctx.transform.applyToPoint(new l(0,H)),vt=this.ctx.transform.applyToPoint(new l(0,0));H=Math.sqrt(Math.pow(ft.x-vt.x,2)+Math.pow(ft.y-vt.y,2))}Math.abs(Z-G)>=2*Math.PI&&(G=0,Z=2*Math.PI),this.path.push({type:"arc",x:A,y:z,radius:H,startAngle:G,endAngle:Z,counterclockwise:it})},v.prototype.arcTo=function(A,z,H,G,Z){throw new Error("arcTo not implemented.")},v.prototype.rect=function(A,z,H,G){if(isNaN(A)||isNaN(z)||isNaN(H)||isNaN(G))throw Te.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(A,z),this.lineTo(A+H,z),this.lineTo(A+H,z+G),this.lineTo(A,z+G),this.lineTo(A,z),this.lineTo(A+H,z),this.lineTo(A,z)},v.prototype.fillRect=function(A,z,H,G){if(isNaN(A)||isNaN(z)||isNaN(H)||isNaN(G))throw Te.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var Z={};this.lineCap!=="butt"&&(Z.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(Z.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(A,z,H,G),this.fill(),Z.hasOwnProperty("lineCap")&&(this.lineCap=Z.lineCap),Z.hasOwnProperty("lineJoin")&&(this.lineJoin=Z.lineJoin)}},v.prototype.strokeRect=function(A,z,H,G){if(isNaN(A)||isNaN(z)||isNaN(H)||isNaN(G))throw Te.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");S.call(this)||(this.beginPath(),this.rect(A,z,H,G),this.stroke())},v.prototype.clearRect=function(A,z,H,G){if(isNaN(A)||isNaN(z)||isNaN(H)||isNaN(G))throw Te.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(A,z,H,G))},v.prototype.save=function(A){A=typeof A!="boolean"||A;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,H=0;H<this.pdf.internal.getNumberOfPages();H++)this.pdf.setPage(H+1),this.pdf.internal.out("q");
vendor: 3,538 bytes, line 162
162if(this.pdf.setPage(z),A){this.ctx.fontSize=this.pdf.internal.getFontSize();var G=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=G}},v.prototype.restore=function(A){A=typeof A!="boolean"||A;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,H=0;H<this.pdf.internal.getNumberOfPages();H++)this.pdf.setPage(H+1),this.pdf.internal.out("Q");this.pdf.setPage(z),A&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},v.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var b=function(A){var z,H,G,Z;if(A.isCanvasGradient===!0&&(A=A.getColor()),!A)return{r:0,g:0,b:0,a:0,style:A};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(A))z=0,H=0,G=0,Z=0;else{var it=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(A);if(it!==null)z=parseInt(it[1]),H=parseInt(it[2]),G=parseInt(it[3]),Z=1;else if((it=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(A))!==null)z=parseInt(it[1]),H=parseInt(it[2]),G=parseInt(it[3]),Z=parseFloat(it[4]);else{if(Z=1,typeof A=="string"&&A.charAt(0)!=="#"){var ut=new h1(A);A=ut.ok?ut.toHex():"#000000"}A.length===4?(z=A.substring(1,2),z+=z,H=A.substring(2,3),H+=H,G=A.substring(3,4),G+=G):(z=A.substring(1,3),H=A.substring(3,5),G=A.substring(5,7)),z=parseInt(z,16),H=parseInt(H,16),G=parseInt(G,16)}}return{r:z,g:H,b:G,a:Z,style:A}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},S=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};v.prototype.fillText=function(A,z,H,G){if(isNaN(z)||isNaN(H)||typeof A!="string")throw Te.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(G=isNaN(G)?void 0:G,!p.call(this)){var Z=K(this.ctx.transform.rotation),it=this.ctx.transform.scaleX;j.call(this,{text:A,x:z,y:H,scale:it,angle:Z,align:this.textAlign,maxWidth:G})}},v.prototype.strokeText=function(A,z,H,G){if(isNaN(z)||isNaN(H)||typeof A!="string")throw Te.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!S.call(this)){G=isNaN(G)?void 0:G;var Z=K(this.ctx.transform.rotation),it=this.ctx.transform.scaleX;j.call(this,{text:A,x:z,y:H,scale:it,renderingMode:"stroke",angle:Z,align:this.textAlign,maxWidth:G})}},v.prototype.measureText=function(A){if(typeof A!="string")throw Te.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var z=this.pdf,H=this.pdf.internal.scaleFactor,G=z.internal.getFontSize(),Z=z.getStringUnitWidth(A)*G/z.internal.scaleFactor;return new function(it){var ut=(it=it||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return ut}}),this}({width:Z*=Math.round(96*H/72*1e4)/1e4})},v.prototype.scale=function(A,z){if(isNaN(A)||isNaN(z))throw Te.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var H=new u(A,0,0,z,0,0);this.ctx.transform=this.ctx.transform.multiply(H)},v.prototype.rotate=function(A){if(isNaN(A))throw Te.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");
vendor: 2,534 bytes, line 162
162var z=new u(Math.cos(A),Math.sin(A),-Math.sin(A),Math.cos(A),0,0);this.ctx.transform=this.ctx.transform.multiply(z)},v.prototype.translate=function(A,z){if(isNaN(A)||isNaN(z))throw Te.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var H=new u(1,0,0,1,A,z);this.ctx.transform=this.ctx.transform.multiply(H)},v.prototype.transform=function(A,z,H,G,Z,it){if(isNaN(A)||isNaN(z)||isNaN(H)||isNaN(G)||isNaN(Z)||isNaN(it))throw Te.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ut=new u(A,z,H,G,Z,it);this.ctx.transform=this.ctx.transform.multiply(ut)},v.prototype.setTransform=function(A,z,H,G,Z,it){A=isNaN(A)?1:A,z=isNaN(z)?0:z,H=isNaN(H)?0:H,G=isNaN(G)?1:G,Z=isNaN(Z)?0:Z,it=isNaN(it)?0:it,this.ctx.transform=new u(A,z,H,G,Z,it)};var k=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};v.prototype.drawImage=function(A,z,H,G,Z,it,ut,ft,vt){var St=this.pdf.getImageProperties(A),Pt=1,wt=1,Kt=1,F=1;G!==void 0&&ft!==void 0&&(Kt=ft/G,F=vt/Z,Pt=St.width/G*ft/G,wt=St.height/Z*vt/Z),it===void 0&&(it=z,ut=H,z=0,H=0),G!==void 0&&ft===void 0&&(ft=G,vt=Z),G===void 0&&ft===void 0&&(ft=St.width,vt=St.height);var It=this.ctx.transform.decompose(),le=K(It.rotate.shx),zt=new u,xt=(zt=(zt=(zt=zt.multiply(It.translate)).multiply(It.skew)).multiply(It.scale)).applyToRectangle(new s(it-z*Kt,ut-H*F,G*Pt,Z*wt));if(this.autoPaging){for(var ee,Tt=C.call(this,xt),Vt=[],Xt=0;Xt<Tt.length;Xt+=1)Vt.indexOf(Tt[Xt])===-1&&Vt.push(Tt[Xt]);U(Vt);for(var ye=Vt[0],me=Vt[Vt.length-1],re=ye;re<me+1;re++){this.pdf.setPage(re);var de=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],we=re===1?this.posY+this.margin[0]:this.margin[0],Bt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ce=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ot=re===1?0:Bt+(re-2)*ce;if(this.ctx.clip_path.length!==0){var Ct=this.path;ee=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=O(ee,this.posX+this.margin[3],-ot+we+this.ctx.prevPageLastElemOffset),nt.call(this,"fill",!0),this.path=Ct}var Rt=JSON.parse(JSON.stringify(xt));Rt=O([Rt],this.posX+this.margin[3],-ot+we+this.ctx.prevPageLastElemOffset)[0];var ie=(re>ye||re<me)&&k.call(this);ie&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],de,ce,null).clip().discardPath()),this.pdf.addImage(A,"JPEG",Rt.x,Rt.y,Rt.w,Rt.h,null,
vendor: 39,583 bytes, lines 162-168
162null,le),ie&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(A,"JPEG",xt.x,xt.y,xt.w,xt.h,null,null,le)};var C=function(A,z,H){var G=[];z=z||this.pdf.internal.pageSize.width,H=H||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var Z=this.posY+this.ctx.prevPageLastElemOffset;switch(A.type){default:case"mt":case"lt":G.push(Math.floor((A.y+Z)/H)+1);break;case"arc":G.push(Math.floor((A.y+Z-A.radius)/H)+1),G.push(Math.floor((A.y+Z+A.radius)/H)+1);break;case"qct":var it=ht(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x,A.y);G.push(Math.floor((it.y+Z)/H)+1),G.push(Math.floor((it.y+it.h+Z)/H)+1);break;case"bct":var ut=At(this.ctx.lastPoint.x,this.ctx.lastPoint.y,A.x1,A.y1,A.x2,A.y2,A.x,A.y);G.push(Math.floor((ut.y+Z)/H)+1),G.push(Math.floor((ut.y+ut.h+Z)/H)+1);break;case"rect":G.push(Math.floor((A.y+Z)/H)+1),G.push(Math.floor((A.y+A.h+Z)/H)+1)}for(var ft=0;ft<G.length;ft+=1)for(;this.pdf.internal.getNumberOfPages()<G[ft];)_.call(this);return G},_=function(){var A=this.fillStyle,z=this.strokeStyle,H=this.font,G=this.lineCap,Z=this.lineWidth,it=this.lineJoin;this.pdf.addPage(),this.fillStyle=A,this.strokeStyle=z,this.font=H,this.lineCap=G,this.lineWidth=Z,this.lineJoin=it},O=function(A,z,H){for(var G=0;G<A.length;G++)switch(A[G].type){case"bct":A[G].x2+=z,A[G].y2+=H;case"qct":A[G].x1+=z,A[G].y1+=H;default:A[G].x+=z,A[G].y+=H}return A},U=function(A){return A.sort(function(z,H){return z-H})},R=function(A,z){var H=this.fillStyle,G=this.strokeStyle,Z=this.lineCap,it=this.lineWidth,ut=Math.abs(it*this.ctx.transform.scaleX),ft=this.lineJoin;if(this.autoPaging){for(var vt,St,Pt=JSON.parse(JSON.stringify(this.path)),wt=JSON.parse(JSON.stringify(this.path)),Kt=[],F=0;F<wt.length;F++)if(wt[F].x!==void 0)for(var It=C.call(this,wt[F]),le=0;le<It.length;le+=1)Kt.indexOf(It[le])===-1&&Kt.push(It[le]);for(var zt=0;zt<Kt.length;zt++)for(;this.pdf.internal.getNumberOfPages()<Kt[zt];)_.call(this);U(Kt);for(var xt=Kt[0],ee=Kt[Kt.length-1],Tt=xt;Tt<ee+1;Tt++){this.pdf.setPage(Tt),this.fillStyle=H,this.strokeStyle=G,this.lineCap=Z,this.lineWidth=ut,this.lineJoin=ft;var Vt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Xt=Tt===1?this.posY+this.margin[0]:this.margin[0],ye=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],me=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],re=Tt===1?0:ye+(Tt-2)*me;if(this.ctx.clip_path.length!==0){var de=this.path;vt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=O(vt,this.posX+this.margin[3],-re+Xt+this.ctx.prevPageLastElemOffset),nt.call(this,A,!0),this.path=de}if(St=JSON.parse(JSON.stringify(Pt)),this.path=O(St,this.posX+this.margin[3],-re+Xt+this.ctx.prevPageLastElemOffset),z===!1||Tt===0){var we=(Tt>xt||Tt<ee)&&k.call(this);we&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Vt,me,null).clip().discardPath()),nt.call(this,A,z),we&&this.pdf.restoreGraphicsState()}this.lineWidth=it}this.path=Pt}else this.lineWidth=ut,nt.call(this,A,z),this.lineWidth=it},nt=function(A,z){if((A!=="stroke"||z||!S.call(this))&&(A==="stroke"||z||!p.call(this))){for(var H,G,Z=[],it=this.path,ut=0;ut<it.length;ut++){var ft=it[ut];switch(ft.type){case"begin":Z.push({begin:!0});break;case"close":Z.push({close:!0});break;case"mt":Z.push({start:ft,deltas:[],abs:[]});break;case"lt":var vt=Z.length;if(it[ut-1]&&!isNaN(it[ut-1].x)&&(H=[ft.x-it[ut-1].x,ft.y-it[ut-1].y],vt>0)){for(;vt>=0;vt--)if(Z[vt-1].close!==!0&&Z[vt-1].begin!==!0){Z[vt-1].deltas.push(H),Z[vt-1].abs.push(ft);break}}break;case"bct":H=[ft.x1-it[ut-1].x,ft.y1-it[ut-1].y,ft.x2-it[ut-1].x,ft.y2-it[ut-1].y,ft.x-it[ut-1].x,ft.y-it[ut-1].y],Z[Z.length-1].deltas.push(H);break;case"qct":var St=it[ut-1].x+2/3*(ft.x1-it[ut-1].x),Pt=it[ut-1].y+2/3*(ft.y1-it[ut-1].y),wt=ft.x+2/3*(ft.x1-ft.x),Kt=ft.y+2/3*(ft.y1-ft.y),F=ft.x,It=ft.y;H=[St-it[ut-1].x,Pt-it[ut-1].y,wt-it[ut-1].x,Kt-it[ut-1].y,F-it[ut-1].x,It-it[ut-1].y],Z[Z.length-1].deltas.push(H);break;case"arc":Z.push({deltas:[],abs:[],arc:!0}),Array.isArray(Z[Z.length-1].abs)&&Z[Z.length-1].abs.push(ft)}}G=z?null:A==="stroke"?"stroke":"fill";for(var le=!1,zt=0;zt<Z.length;zt++)if(Z[zt].arc)for(var xt=Z[zt].abs,ee=0;ee<xt.length;ee++){var Tt=xt[ee];Tt.type==="arc"?$.call(this,Tt.x,Tt.y,Tt.radius,Tt.startAngle,Tt.endAngle,Tt.counterclockwise,void 0,z,!le):W.call(this,Tt.x,Tt.y),le=!0}else if(Z[zt].close===!0)this.pdf.internal.out("h"),le=!1;else if(Z[zt].begin!==!0){var Vt=Z[zt].start.x,Xt=Z[zt].start.y;q.call(this,Z[zt].deltas,Vt,Xt),le=!0}G&&D.call(this,G),z&&J.call(this)}},dt=function(A){var z=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,H=z*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return A-H;case"top":return A+z-H;case"hanging":return A+z-2*H;case"middle":return A+z/2-H;default:return A}},et=function(A){return A+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};v.prototype.createLinearGradient=function(){var A=function(){};return A.colorStops=[],A.addColorStop=function(z,H){this.colorStops.push([z,H])},A.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},A.isCanvasGradient=!0,A},v.prototype.createPattern=function(){return this.createLinearGradient()},v.prototype.createRadialGradient=function(){return this.createLinearGradient()};var $=function(A,z,H,G,Z,it,ut,ft,vt){for(var St=ct.call(this,H,G,Z,it),Pt=0;Pt<St.length;Pt++){var wt=St[Pt];Pt===0&&(vt?x.call(this,wt.x1+A,wt.y1+z):W.call(this,wt.x1+A,wt.y1+z)),Q.call(this,A,z,wt.x2,wt.y2,wt.x3,wt.y3,wt.x4,wt.y4)}ft?J.call(this):D.call(this,ut)},D=function(A){switch(A){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},J=function(){this.pdf.clip(),this.pdf.discardPath()},x=function(A,z){this.pdf.internal.out(n(A)+" "+r(z)+" m")},j=function(A){var z;switch(A.align){case"right":case"end":z="right";break;case"center":z="center";break;default:z="left"}var H,G,Z,it=this.pdf.getTextDimensions(A.text),ut=dt.call(this,A.y),ft=et.call(this,ut)-it.h,vt=this.ctx.transform.applyToPoint(new l(A.x,ut));if(this.autoPaging){var St=this.ctx.transform.decompose(),Pt=new u;Pt=(Pt=(Pt=Pt.multiply(St.translate)).multiply(St.skew)).multiply(St.scale);for(var wt=this.ctx.transform.applyToRectangle(new s(A.x,ut,it.w,it.h)),Kt=Pt.applyToRectangle(new s(A.x,ft,it.w,it.h)),F=C.call(this,Kt),It=[],le=0;le<F.length;le+=1)It.indexOf(F[le])===-1&&It.push(F[le]);U(It);for(var zt=It[0],xt=It[It.length-1],ee=zt;ee<xt+1;ee++){this.pdf.setPage(ee);var Tt=ee===1?this.posY+this.margin[0]:this.margin[0],Vt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Xt=this.pdf.internal.pageSize.height-this.margin[2],ye=Xt-this.margin[0],me=this.pdf.internal.pageSize.width-this.margin[1],re=me-this.margin[3],de=ee===1?0:Vt+(ee-2)*ye;if(this.ctx.clip_path.length!==0){var we=this.path;H=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=O(H,this.posX+this.margin[3],-1*de+Tt),nt.call(this,"fill",!0),this.path=we}var Bt=O([JSON.parse(JSON.stringify(Kt))],this.posX+this.margin[3],-de+Tt+this.ctx.prevPageLastElemOffset)[0];A.scale>=.01&&(G=this.pdf.internal.getFontSize(),this.pdf.setFontSize(G*A.scale),Z=this.lineWidth,this.lineWidth=Z*A.scale);var ce=this.autoPaging!=="text";if(ce||Bt.y+Bt.h<=Xt){if(ce||Bt.y>=Tt&&Bt.x<=me){var ot=ce?A.text:this.pdf.splitTextToSize(A.text,A.maxWidth||me-Bt.x)[0],Ct=O([JSON.parse(JSON.stringify(wt))],this.posX+this.margin[3],-de+Tt+this.ctx.prevPageLastElemOffset)[0],Rt=ce&&(ee>zt||ee<xt)&&k.call(this);Rt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],re,ye,null).clip().discardPath()),this.pdf.text(ot,Ct.x,Ct.y,{angle:A.angle,align:z,renderingMode:A.renderingMode}),Rt&&this.pdf.restoreGraphicsState()}}else Bt.y<Xt&&(this.ctx.prevPageLastElemOffset+=Xt-Bt.y);A.scale>=.01&&(this.pdf.setFontSize(G),this.lineWidth=Z)}}else A.scale>=.01&&(G=this.pdf.internal.getFontSize(),this.pdf.setFontSize(G*A.scale),Z=this.lineWidth,this.lineWidth=Z*A.scale),this.pdf.text(A.text,vt.x+this.posX,vt.y+this.posY,{angle:A.angle,align:z,renderingMode:A.renderingMode,maxWidth:A.maxWidth}),A.scale>=.01&&(this.pdf.setFontSize(G),this.lineWidth=Z)},W=function(A,z,H,G){H=H||0,G=G||0,this.pdf.internal.out(n(A+H)+" "+r(z+G)+" l")},q=function(A,z,H){return this.pdf.lines(A,z,H,null,null)},Q=function(A,z,H,G,Z,it,ut,ft){this.pdf.internal.out([e(i(H+A)),e(a(G+z)),e(i(Z+A)),e(a(it+z)),e(i(ut+A)),e(a(ft+z)),"c"].join(" "))},ct=function(A,z,H,G){for(var Z=2*Math.PI,it=Math.PI/2;z>H;)z-=Z;var ut=Math.abs(H-z);ut<Z&&G&&(ut=Z-ut);for(var ft=[],vt=G?-1:1,St=z;ut>1e-5;){var Pt=St+vt*Math.min(ut,it);ft.push(at.call(this,A,St,Pt)),ut-=Math.abs(Pt-St),St=Pt}return ft},at=function(A,z,H){var G=(H-z)/2,Z=A*Math.cos(G),it=A*Math.sin(G),ut=Z,ft=-it,vt=ut*ut+ft*ft,St=vt+ut*Z+ft*it,Pt=4/3*(Math.sqrt(2*vt*St)-St)/(ut*it-ft*Z),wt=ut-Pt*ft,Kt=ft+Pt*ut,F=wt,It=-Kt,le=G+z,zt=Math.cos(le),xt=Math.sin(le);return{x1:A*Math.cos(z),y1:A*Math.sin(z),x2:wt*zt-Kt*xt,y2:wt*xt+Kt*zt,x3:F*zt-It*xt,y3:F*xt+It*zt,x4:A*Math.cos(H),y4:A*Math.sin(H)}},K=function(A){return 180*A/Math.PI},ht=function(A,z,H,G,Z,it){var ut=A+.5*(H-A),ft=z+.5*(G-z),vt=Z+.5*(H-Z),St=it+.5*(G-it),Pt=Math.min(A,Z,ut,vt),wt=Math.max(A,Z,ut,vt),Kt=Math.min(z,it,ft,St),F=Math.max(z,it,ft,St);return new s(Pt,Kt,wt-Pt,F-Kt)},At=function(A,z,H,G,Z,it,ut,ft){var vt,St,Pt,wt,Kt,F,It,le,zt,xt,ee,Tt,Vt,Xt,ye=H-A,me=G-z,re=Z-H,de=it-G,we=ut-Z,Bt=ft-it;for(St=0;St<41;St++)zt=(It=(Pt=A+(vt=St/40)*ye)+vt*((Kt=H+vt*re)-Pt))+vt*(Kt+vt*(Z+vt*we-Kt)-It),xt=(le=(wt=z+vt*me)+vt*((F=G+vt*de)-wt))+vt*(F+vt*(it+vt*Bt-F)-le),St==0?(ee=zt,Tt=xt,Vt=zt,Xt=xt):(ee=Math.min(ee,zt),Tt=Math.min(Tt,xt),Vt=Math.max(Vt,zt),Xt=Math.max(Xt,xt));return new s(Math.round(ee),Math.round(Tt),Math.round(Vt-ee),Math.round(Xt-Tt))},pt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var A,z,H=(A=this.ctx.lineDash,z=this.ctx.lineDashOffset,JSON.stringify({lineDash:A,lineDashOffset:z}));this.prevLineDash!==H&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=H)}}})(te.API),function(t){var e=function(l){var s,u,h,f,v,b,p,S,k,C;for(u=[],h=0,f=(l+=s="\0\0\0\0".slice(l.length%4||4)).length;f>h;h+=4)(v=(l.charCodeAt(h)<<24)+(l.charCodeAt(h+1)<<16)+(l.charCodeAt(h+2)<<8)+l.charCodeAt(h+3))!==0?(b=(v=((v=((v=((v=(v-(C=v%85))/85)-(k=v%85))/85)-(S=v%85))/85)-(p=v%85))/85)%85,u.push(b+33,p+33,S+33,k+33,C+33)):u.push(122);return function(_,O){for(var U=O;U>0;U--)_.pop()}(u,s.length),String.fromCharCode.apply(String,u)+"~>"},n=function(l){var s,u,h,f,v,b=String,p="length",S=255,k="charCodeAt",C="slice",_="replace";for(l[C](-2),l=l[C](0,-2)[_](/\s/g,"")[_]("z","!!!!!"),h=[],f=0,v=(l+=s="uuuuu"[C](l[p]%5||5))[p];v>f;f+=5)u=52200625*(l[k](f)-33)+614125*(l[k](f+1)-33)+7225*(l[k](f+2)-33)+85*(l[k](f+3)-33)+(l[k](f+4)-33),h.push(S&u>>24,S&u>>16,S&u>>8,S&u);return function(O,U){for(var R=U;R>0;R--)O.pop()}(h,s[p]),b.fromCharCode.apply(b,h)},r=function(l){return l.split("").map(function(s){return("0"+s.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(l){var s=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((l=l.replace(/\s/g,"")).indexOf(">")!==-1&&(l=l.substr(0,l.indexOf(">"))),l.length%2&&(l+="0"),s.test(l)===!1)return"";for(var u="",h=0;h<l.length;h+=2)u+=String.fromCharCode("0x"+(l[h]+l[h+1]));return u},a=function(l){for(var s=new Uint8Array(l.length),u=l.length;u--;)s[u]=l.charCodeAt(u);return(s=Ic(s)).reduce(function(h,f){return h+String.fromCharCode(f)},"")};t.processDataByFilters=function(l,s){var u=0,h=l||"",f=[];for(typeof(s=s||[])=="string"&&(s=[s]),u=0;u<s.length;u+=1)switch(s[u]){case"ASCII85Decode":case"/ASCII85Decode":h=n(h),f.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":h=e(h),f.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":h=i(h),f.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":h=r(h),f.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":h=a(h),f.push("/FlateDecode");break;default:throw new Error('The filter: "'+s[u]+'" is not implemented')}return{data:h,reverseChain:f.reverse().join(" ")}}}(te.API),function(t){t.loadFile=function(e,n,r){return function(i,a,l){a=a!==!1,l=typeof l=="function"?l:function(){};var s=void 0;try{s=function(u,h,f){var v=new XMLHttpRequest,b=0,p=function(S){var k=S.length,C=[],_=String.fromCharCode;for(b=0;b<k;b+=1)C.push(_(255&S.charCodeAt(b)));return C.join("")};if(v.open("GET",u,!h),v.overrideMimeType("text/plain; charset=x-user-defined"),h===!1&&(v.onload=function(){v.status===200?f(p(this.responseText)):f(void 0)}),v.send(null),h&&v.status===200)return p(v.responseText)}(i,a,l)}catch{}return s}(e,n,r)},t.allowFsRead=void 0,t.loadImageFile=t.loadFile}(te.API),function(t){function e(){return(oe.html2canvas?Promise.resolve(oe.html2canvas):zl(()=>import("./html2canvas.esm-CBrSDip1.js"),[])).catch(function(s){return Promise.reject(new Error("Could not load html2canvas: "+s))}).then(function(s){return s.default?s.default:s})}function n(){return(oe.DOMPurify?Promise.resolve(oe.DOMPurify):zl(()=>import("./purify.es-8E279hYE.js"),[])).catch(function(s){return Promise.reject(new Error("Could not load dompurify: "+s))}).then(function(s){return s.default?s.default:s})}var r=function(s){var u=je(s);return u==="undefined"?"undefined":u==="string"||s instanceof String?"string":u==="number"||s instanceof Number?"number":u==="function"||s instanceof Function?"function":s&&s.constructor===Array?"array":s&&s.nodeType===1?"element":u==="object"?"object":"unknown"},i=function(s,u){var h=document.createElement(s);for(var f in u.className&&(h.className=u.className),u.innerHTML&&u.dompurify&&(h.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)h.style[f]=u.style[f];return h},a=function s(u,h){for(var f=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),v=u.firstChild;v;v=v.nextSibling)h!==!0&&v.nodeType===1&&v.nodeName==="SCRIPT"||f.appendChild(s(v,h));return u.nodeType===1&&(u.nodeName==="CANVAS"?(f.width=u.width,f.height=u.height,f.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(f.value=u.value),f.addEventListener("load",function(){f.scrollTop=u.scrollTop,f.scrollLeft=u.scrollLeft},!0)),f},l=function s(u){var h=Object.assign(s.convert(Promise.resolve()),JSON.parse(JSON.stringify(s.template))),f=s.convert(Promise.resolve(),h);return(f=f.setProgress(1,s,1,[s])).set(u)};(l.prototype=Object.create(Promise.prototype)).constructor=l,l.convert=function(s,u){return s.__proto__=u||l.prototype,s},l.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},l.prototype.from=function(s,u){return this.then(function(){switch(u=u||function(h){switch(r(h)){case"string":return"string";case"element":return h.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(s),u){case"string":return this.then(n).then(function(h){return this.set({src:i("div",{innerHTML:s,dompurify:h})})});case"element":return this.set({src:s});case"canvas":return this.set({canvas:s});case"img":return this.set({img:s});default:return this.error("Unknown source type.")}})},l.prototype.to=function(s){switch(s){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},l.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var s={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},u=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(s.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:s}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},l.prototype.toCanvas=function(){var s=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(s).then(e).then(function(u){var h=Object.assign({},this.opt.html2canvas);return delete h.onrendered,u(this.prop.container,h)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toContext2d=function(){var s=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(s).then(e).then(function(u){var h=this.opt.jsPDF,f=this.opt.fontFaces,v=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,b=Object.assign({async:!0,allowTaint:!0,scale:v,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete b.onrendered,h.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,h.context2d.posX=this.opt.x,h.context2d.posY=this.opt.y,h.context2d.margin=this.opt.margin,h.context2d.fontFaces=f,f)for(var p=0;p<f.length;++p){var S=f[p],k=S.src.find(function(C){return C.format==="truetype"});k&&h.addFont(k.url,S.ref.name,S.ref.style)}return b.windowHeight=b.windowHeight||0,b.windowHeight=b.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):b.windowHeight,h.context2d.save(!0),u(this.prop.container,b)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var s=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=s})},l.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},l.prototype.output=function(s,u,h){return(h=h||"pdf").toLowerCase()==="img"||h.toLowerCase()==="image"?this.outputImg(s,u):this.outputPdf(s,u)},l.prototype.outputPdf=function(s,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(s,u)})},l.prototype.outputImg=function(s){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(s){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+s+'" is not supported.'}})},l.prototype.save=function(s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(s?{filename:s}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},l.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},l.prototype.set=function(s){if(r(s)!=="object")return this;var u=Object.keys(s||{}).map(function(h){if(h in l.template.prop)return function(){this.prop[h]=s[h]};switch(h){case"margin":return this.setMargin.bind(this,s.margin);case"jsPDF":return function(){return this.opt.jsPDF=s.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,s.pageSize);default:return function(){this.opt[h]=s[h]}}},this);return this.then(function(){return this.thenList(u)})},l.prototype.get=function(s,u){return this.then(function(){var h=s in l.template.prop?this.prop[s]:this.opt[s];return u?u(h):h})},l.prototype.setMargin=function(s){return this.then(function(){switch(r(s)){case"number":s=[s,s,s,s];case"array":if(s.length===2&&(s=[s[0],s[1],s[0],s[1]]),s.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=s}).then(this.setPageSize)},l.prototype.setPageSize=function(s){function u(h,f){return Math.floor(h*f/72*96)}return this.then(function(){(s=s||te.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(s.inner={width:s.width-this.opt.margin[1]-this.opt.margin[3],height:s.height-this.opt.margin[0]-this.opt.margin[2]},s.inner.px={width:u(s.inner.width,s.k),height:u(s.inner.height,s.k)},s.inner.ratio=s.inner.height/s.inner.width),this.prop.pageSize=s})},l.prototype.setProgress=function(s,u,h,f){return s!=null&&(this.progress.val=s),u!=null&&(this.progress.state=u),h!=null&&(this.progress.n=h),f!=null&&(this.progress.stack=f),this.progress.ratio=this.progress.val/this.progress.state,this},l.prototype.updateProgress=function(s,u,h,f){return this.setProgress(s?this.progress.val+s:null,u||null,h?this.progress.n+h:null,f?this.progress.stack.concat(f):null)},l.prototype.then=function(s,u){var h=this;return this.thenCore(s,u,function(f,v){return h.updateProgress(null,null,1,[f]),Promise.prototype.then.call(this,function(b){return h.updateProgress(null,f),b}).then(f,v).then(function(b){return h.updateProgress(1),b})})},l.prototype.thenCore=function(s,u,h){h=h||Promise.prototype.then;var f=this;s&&(s=s.bind(f)),u&&(u=u.bind(f));var v=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?f:l.convert(Object.assign({},f),Promise.prototype),b=h.call(v,s,u);return l.convert(b,f.__proto__)},l.prototype.thenExternal=function(s,u){return Promise.prototype.then.call(this,s,u)},l.prototype.thenList=function(s){var u=this;return s.forEach(function(h){u=u.thenCore(h)}),u},l.prototype.catch=function(s){s&&(s=s.bind(this));var u=Promise.prototype.catch.call(this,s);return l.convert(u,this)},l.prototype.catchExternal=function(s){return Promise.prototype.catch.call(this,s)},l.prototype.error=function(s){return this.then(function(){throw new Error(s)})},l.prototype.using=l.prototype.set,l.prototype.saveAs=l.prototype.save,l.prototype.export=l.prototype.output,l.prototype.run=l.prototype.then,te.getPageSize=function(s,u,h){if(je(s)==="object"){var f=s;s=f.orientation,u=f.unit||u,h=f.format||h}u=u||"mm",h=h||"a4",s=(""+(s||"P")).toLowerCase();var v,b=(""+h).toLowerCase(),p={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(u){case"pt":v=1;break;case"mm":v=72/25.4;break;case"cm":v=72/2.54;break;case"in":v=72;break;case"px":v=.75;break;case"pc":case"em":v=12;break;case"ex":v=6;break;default:throw"Invalid unit: "+u}var S,k=0,C=0;if(p.hasOwnProperty(b))k=p[b][1]/v,C=p[b][0]/v;else try{k=h[1],C=h[0]}catch{throw new Error("Invalid format: "+h)}if(s==="p"||s==="portrait")s="p",C>k&&(S=C,C=k,k=S);else{if(s!=="l"&&s!=="landscape")throw"Invalid orientation: "+s;s="l",k>C&&(S=C,C=k,k=S)}return{width:C,height:k,unit:u,k:v,orientation:s}},t.html=function(s,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(bc):null;var h=new l(u);return u.worker?h:h.from(s).doCallback()}}(te.API),te.API.addJS=function(t){var e,n,r=function(i){for(var a="",l=0;l<i.length;l++){var s=i[l];if(s==="("||s===")"){for(var u=0,h=l-1;h>=0&&i[h]==="\\";h--)u++;a+=u%2==0?"\\"+s:s}else a+=s}return a}(t);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){e!==void 0&&n!==void 0&&this.internal.out("/Names <</JavaScript "+e+" 0 R>>")}),this},function(t){var e;t.events.push(["postPutResources",function(){var n=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=n.outline.render().split(/\r\n/),a=0;a<i.length;a++){var l=i[a],s=r.exec(l);if(s!=null){var u=s[1];n.internal.newObjectDeferredBegin(u,!1)}n.internal.write(l)}if(this.outline.createNamedDestinations){var h=this.internal.pages.length,f=[];for(a=0;a<h;a++){var v=n.internal.newObject();f.push(v);var b=n.internal.getPageInfo(a+1);n.internal.write("<< /D["+b.objId+" 0 R /XYZ null null null]>> endobj")}var p=n.internal.newObject();for(n.internal.write("<< /Names [ "),a=0;a<f.length;a++)n.internal.write("(page_"+(a+1)+")"+f[a]+" 0 R");n.internal.write(" ] >>","endobj"),e=n.internal.newObject(),n.internal.write("<< /Dests "+p+" 0 R"),n.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var n=this;n.outline.root.children.length>0&&(n.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&n.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var n=this;n.outline={createNamedDestinations:!1,root:{children:[]}},n.outline.add=function(r,i,a){var l={title:i,options:a,children:[]};return r==null&&(r=this.root),r.children.push(l),l},n.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=n,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},n.outline.genIds_r=function(r){r.id=n.internal.newObjectDeferred();for(var i=0;i<r.children.length;i++)this.genIds_r(r.children[i])},n.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},n.outline.renderItems=function(r){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<r.children.length;a++){var l=r.children[a];this.objStart(l),this.line("/Title "+this.makeString(l.title)),this.line("/Parent "+this.makeRef(r)),a>0&&this.line("/Prev "+this.makeRef(r.children[a-1])),a<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[a+1])),l.children.length>0&&(this.line("/First "+this.makeRef(l.children[0])),this.line("/Last "+this.makeRef(l.children[l.children.length-1])));var s=this.count=this.count_r({count:0},l);if(s>0&&this.line("/Count "+s),l.options&&l.options.pageNumber){var u=n.internal.getPageInfo(l.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var h=0;h<r.children.length;h++)this.renderItems(r.children[h])},n.outline.line=function(r){this.ctx.val+=r+`\r
163`},n.outline.makeRef=function(r){return r.id+" 0 R"},n.outline.makeString=function(r){return"("+n.internal.pdfEscape(r)+")"},n.outline.objStart=function(r){this.ctx.val+=`\r
164`+r.id+` 0 obj\r
165<<\r
166`},n.outline.objEnd=function(){this.ctx.val+=`>> \r
167endobj\r
168`},n.outline.count_r=function(r,i){for(var a=0;a<i.children.length;a++)r.count++,this.count_r(r,i.children[a]);return r.count}}])}(te.API),function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(n,r,i,a,l,s){var u,h=this.decode.DCT_DECODE,f=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=l||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,u=function(v){for(var b,p=256*v.charCodeAt(4)+v.charCodeAt(5),S=v.length,k={width:0,height:0,numcomponents:1},C=4;C<S;C+=2){if(C+=p,e.indexOf(v.charCodeAt(C+1))!==-1){b=256*v.charCodeAt(C+5)+v.charCodeAt(C+6),k={width:256*v.charCodeAt(C+7)+v.charCodeAt(C+8),height:b,numcomponents:v.charCodeAt(C+9)};break}p=256*v.charCodeAt(C+2)+v.charCodeAt(C+3)}return k}(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),u.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}f={data:n,width:u.width,height:u.height,colorSpace:s,bitsPerComponent:8,filter:h,index:r,alias:i}}return f}}(te.API),te.API.processPNG=function(t,e,n,r){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var i,a=um(t,{checkCrc:!0}),l=a.width,s=a.height,u=a.channels,h=a.palette,f=a.depth;i=h&&u===1?function($){for(var D=$.width,J=$.height,x=$.data,j=$.palette,W=$.depth,q=!1,Q=[],ct=[],at=void 0,K=!1,ht=0,At=0;At<j.length;At++){var pt=uh(j[At],4),A=pt[0],z=pt[1],H=pt[2],G=pt[3];Q.push(A,z,H),G!=null&&(G===0?(ht++,ct.length<1&&ct.push(At)):G<255&&(K=!0))}if(K||ht>1){q=!0,ct=void 0;var Z=D*J;at=new Uint8Array(Z);for(var it=new DataView(x.buffer),ut=0;ut<Z;ut++){var ft=yc(it,ut,W),vt=uh(j[ft],4)[3];at[ut]=vt}}else ht===0&&(ct=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:q?8:void 0,colorBytes:x,alphaBytes:at,needSMask:q,palette:Q,mask:ct}}(a):u===2||u===4?function($){for(var D=$.data,J=$.width,x=$.height,j=$.channels,W=$.depth,q=j===2?"DeviceGray":"DeviceRGB",Q=j-1,ct=J*x,at=Q,K=ct*at,ht=1*ct,At=Math.ceil(K*W/8),pt=Math.ceil(ht*W/8),A=new Uint8Array(At),z=new Uint8Array(pt),H=new DataView(D.buffer),G=new DataView(A.buffer),Z=new DataView(z.buffer),it=!1,ut=0;ut<ct;ut++){for(var ft=ut*j,vt=0;vt<at;vt++)Sf(G,yc(H,ft+vt,W),ut*at+vt,W);var St=yc(H,ft+at,W);St<(1<<W)-1&&(it=!0),Sf(Z,St,1*ut,W)}return{colorSpace:q,colorsPerPixel:Q,sMaskBitsPerComponent:it?W:void 0,colorBytes:A,alphaBytes:z,needSMask:it}}(a):function($){var D=$.data,J=$.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:J,colorsPerPixel:J==="DeviceGray"?1:3,colorBytes:D instanceof Uint16Array?function(x){for(var j=x.length,W=new Uint8Array(2*j),q=new DataView(W.buffer,W.byteOffset,W.byteLength),Q=0;Q<j;Q++)q.setUint16(2*Q,x[Q],!1);return W}(D):D,needSMask:!1}}(a);var v,b,p,S=i,k=S.colorSpace,C=S.colorsPerPixel,_=S.sMaskBitsPerComponent,O=S.colorBytes,U=S.alphaBytes,R=S.needSMask,nt=S.palette,dt=S.mask,et=null;return r!==te.API.image_compression.NONE&&typeof Ic=="function"?(et=function($){var D;switch($){case te.API.image_compression.FAST:D=11;break;case te.API.image_compression.MEDIUM:D=13;break;case te.API.image_compression.SLOW:D=14;break;default:D=12}return D}(r),v=this.decode.FLATE_DECODE,b="/Predictor ".concat(et," /Colors ").concat(C," /BitsPerComponent ").concat(f," /Columns ").concat(l),t=wf(O,Math.ceil(l*C*f/8),C,f,r),R&&(p=wf(U,Math.ceil(l*_/8),1,_,r))):(v=void 0,b=void 0,t=O,R&&(p=U)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:n,data:t,index:e,filter:v,decodeParameters:b,transparency:dt,palette:nt,sMask:p,predictor:et,width:l,height:s,bitsPerComponent:f,sMaskBitsPerComponent:_,colorSpace:k}}},function(t){t.processGIF89A=function(e,n,r,i){var a=new jm(e),l=a.width,s=a.height,u=[];a.decodeAndBlitFrameRGBA(0,u);var h={data:u,width:l,height:s},f=new xc(100).encode(h,100);return t.processJPEG.call(this,f,n,r,i)},t.processGIF87A=t.processGIF89A}(te.API),xr.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:i,green:r,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},xr.prototype.parseBGR=function(){this.pos=this.offset;var t="bit"+this.bitPP,e=this.width*this.height*4;if(e>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[t]()}catch(n){Te.log("bit decode error:"+n)}},xr.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),n=e%4;for(t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,i=0;i<e;i++)for(var a=this.datav.getUint8(this.pos++,!0),l=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var u=this.palette[a>>7-s&1];this.data[l+4*s]=u.blue,this.data[l+4*s+1]=u.green,this.data[l+4*s+2]=u.red,this.data[l+4*s+3]=255}n!==0&&(this.pos+=4-n)}},xr.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<t;i++){var a=this.datav.getUint8(this.pos++,!0),l=r*this.width*4+2*i*4,s=a>>4,u=15&a,h=this.palette[s];if(this.data[l]=h.blue,this.data[l+1]=h.green,this.data[l+2]=h.red,this.data[l+3]=255,2*i+1>=this.width)break;h=this.palette[u],this.data[l+4]=h.blue,this.data[l+4+1]=h.green,this.data[l+4+2]=h.red,this.data[l+4+3]=255}e!==0&&(this.pos+=4-e)}},xr.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*r;if(i<this.palette.length){var l=this.palette[i];this.data[a]=l.red,this.data[a+1]=l.green,this.data[a+2]=l.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}t!==0&&(this.pos+=4-t)}},xr.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(a&e)/e*255|0,s=(a>>5&e)/e*255|0,u=(a>>10&e)/e*255|0,h=a>>15?255:0,f=r*this.width*4+4*i;this.data[f]=u,this.data[f+1]=s,this.data[f+2]=l,this.data[f+3]=h}this.pos+=t}},xr.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var l=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(l&e)/e*255|0,u=(l>>5&n)/n*255|0,h=(l>>11)/e*255|0,f=i*this.width*4+4*a;this.data[f]=h,this.data[f+1]=u,this.data[f+2]=s,this.data[f+3]=255}this.pos+=t}},xr.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),l=e*this.width*4+4*n;this.data[l]=a,this.data[l+1]=i,this.data[l+2]=r,this.data[l+3]=255}this.pos+=this.width%4}},xr.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*n;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=l}},xr.prototype.getData=function(){return this.data},function(t){t.processBMP=function(e,n,r,i){var a=new xr(e,!1),l=a.width,s=a.height,u={data:a.getData(),width:l,height:s},h=new xc(100).encode(u,100);return t.processJPEG.call(this,h,n,r,i)}}(te.API),Lf.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(e,n,r,i){var a=new Lf(e),l=a.width,s=a.height,u={data:a.getData(),width:l,height:s},h=new xc(100).encode(u,100);return t.processJPEG.call(this,h,n,r,i)}}(te.API),te.API.processRGBA=function(t,e,n){for(var r=t.data,i=r.length,a=new Uint8Array(i/4*3),l=new Uint8Array(i/4),s=0,u=0,h=0;h<i;h+=4){var f=r[h],v=r[h+1],b=r[h+2],p=r[h+3];a[s++]=f,a[s++]=v,a[s++]=b,l[u++]=p}var S=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(l),data:S,index:e,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},te.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canad
168a)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Ia=te.API,Ds=Ia.getCharWidthsArray=function(t,e){var n,r,i=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),l=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:i.metadata.Unicode.widths,u=s.fof?s.fof:1,h=e.kerning?e.kerning:i.metadata.Unicode.kerning,f=h.fof?h.fof:1,v=e.doKerning!==!1,b=0,p=t.length,S=0,k=s[0]||u,C=[];for(n=0;n<p;n++)r=t.charCodeAt(n),typeof i.metadata.widthOfString=="function"?C.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+l*(1e3/a)||0)/1e3):(b=v&&je(h[r])==="object"&&!isNaN(parseInt(h[r][S],10))?h[r][S]/f:0,C.push((s[r]||k)/u+b)),S=r;return C},mf=Ia.getStringUnitWidth=function(t,e){var n=(e=e||{}).fontSize||this.internal.getFontSize(),r=e.font||this.internal.getFont(),i=e.charSpace||this.internal.getCharSpace();return Ia.processArabic&&(t=Ia.processArabic(t)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(t,n,i)/n:Ds.apply(this,arguments).reduce(function(a,l){return a+l},0)},vf=function(t,e,n,r){for(var i=[],a=0,l=t.length,s=0;a!==l&&s+e[a]<n;)s+=e[a],a++;i.push(t.slice(0,a));var u=a;for(s=0;a!==l;)s+e[a]>r&&(i.push(t.slice(u,a)),s=0,u=a),s+=e[a],a++;return u!==a&&i.push(t.slice(u,a)),i},bf=function(t,e,n){n||(n={});var r,i,a,l,s,u,h,f=[],v=[f],b=n.textIndent||0,p=0,S=0,k=t.split(" "),C=Ds.apply(this,[" ",n])[0];if(u=n.lineIndent===-1?k[0].length+2:n.lineIndent||0){var _=Array(u).join(" "),O=[];k.map(function(R){(R=R.split(/\s*\n/)).length>1?O=O.concat(R.map(function(nt,dt){return(dt&&nt.length?`
169`:"")+nt})):O.push(R[0])}),k=O,u=mf.apply(this,[_,n])}for(a=0,l=k.length;a<l;a++){var U=0;if(r=k[a],u&&r[0]==`
170`&&(r=r.substr(1),U=1),b+p+(S=(i=Ds.apply(this,[r,n])).reduce(function(R,nt){return R+nt},0))>
vendor: 2,653 bytes, line 170
170e||U){if(S>e){for(s=vf.apply(this,[r,i,e-(b+p),e]),f.push(s.shift()),f=[s.pop()];s.length;)v.push([s.shift()]);S=i.slice(r.length-(f[0]?f[0].length:0)).reduce(function(R,nt){return R+nt},0)}else f=[r];v.push(f),b=S+u,p=C}else f.push(r),b+=p+S,p=C}return h=u?function(R,nt){return(nt?_:"")+R.join(" ")}:function(R){return R.join(" ")},v.map(h)},Ia.splitTextToSize=function(t,e,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(f){if(f.widths&&f.kerning)return{widths:f.widths,kerning:f.kerning};var v=this.internal.getFont(f.fontName,f.fontStyle),b="Unicode";return v.metadata[b]?{widths:v.metadata[b].widths||{0:1},kerning:v.metadata[b].kerning||{}}:{font:v.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(t)?t:String(t).split(/\r?\n/);var l=1*this.internal.scaleFactor*e/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,u,h=[];for(s=0,u=r.length;s<u;s++)h=h.concat(bf.apply(this,[r[s],l,a]));return h},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="0123456789abcdef",n="klmnopqrstuvwxyz",r={},i={},a=0;a<16;a++)r[n[a]]=e[a],i[e[a]]=n[a];var l=function(b){return"0x"+parseInt(b,10).toString(16)},s=t.__fontmetrics__.compress=function(b){var p,S,k,C,_=["{"];for(var O in b){if(p=b[O],isNaN(parseInt(O,10))?S="'"+O+"'":(O=parseInt(O,10),S=(S=l(O).slice(2)).slice(0,-1)+i[S.slice(-1)]),typeof p=="number")p<0?(k=l(p).slice(3),C="-"):(k=l(p).slice(2),C=""),k=C+k.slice(0,-1)+i[k.slice(-1)];else{if(je(p)!=="object")throw new Error("Don't know what to do with value type "+je(p)+".");k=s(p)}_.push(S+k)}return _.push("}"),_.join("")},u=t.__fontmetrics__.uncompress=function(b){if(typeof b!="string")throw new Error("Invalid argument passed to uncompress.");for(var p,S,k,C,_={},O=1,U=_,R=[],nt="",dt="",et=b.length-1,$=1;$<et;$+=1)(C=b[$])=="'"?p?(k=p.join(""),p=void 0):p=[]:p?p.push(C):C=="{"?(R.push([U,k]),U={},k=void 0):C=="}"?((S=R.pop())[0][S[1]]=U,k=void 0,U=S[0]):C=="-"?O=-1:k===void 0?r.hasOwnProperty(C)?(nt+=r[C],k=parseInt(nt,16)*O,O=1,nt=""):nt+=C:r.hasOwnProperty(C)?(dt+=r[C],U[k]=parseInt(dt,16)*O,O=1,k=void 0,dt=""):dt+=C;return _},h={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:h,"Courier-Bold":h,"Courier-BoldOblique":h,"Courier-Oblique":h,Helvetica:h,"Helvetica-Bold":h,"Helvetica-BoldOblique":h,"Helvetica-Oblique":h,"Times-Roman":h,"Times-Bold":h,"Times-BoldItalic":h,"Times-Italic":h}},v
vendor: 14,693 bytes, line 170
170={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};
vendor: 8,524 bytes, lines 170-198
170t.events.push(["addFont",function(b){var p=b.font,S=v.Unicode[p.postScriptName];S&&(p.metadata.Unicode={},p.metadata.Unicode.widths=S.widths,p.metadata.Unicode.kerning=S.kerning);var k=f.Unicode[p.postScriptName];k&&(p.metadata.Unicode.encoding=k,p.encoding=k.codePages[0])}])}(te.API),function(t){var e=function(n){for(var r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);return i};t.API.events.push(["addFont",function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(l,s){s=/^\x00\x01\x00\x00/.test(s)?e(s):e(qs(s)),l.metadata=t.API.TTFFont.open(s),l.metadata.Unicode=l.metadata.Unicode||{encoding:{},kerning:{},widths:[]},l.metadata.glyIdsUsed=[0]})(i,r)}}])}(te),te.API.addSvgAsImage=function(t,e,n,r,i,a,l,s){if(isNaN(e)||isNaN(n))throw Te.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw Te.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=r,u.height=i;var h=u.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,u.width,u.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},v=this;return(oe.canvg?Promise.resolve(oe.canvg):zl(()=>import("./index.es-Bu5nloUS.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))).catch(function(b){return Promise.reject(new Error("Could not load canvg: "+b))}).then(function(b){return b.default?b.default:b}).then(function(b){return b.fromString(h,t,f)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(b){return b.render(f)}).then(function(){v.addImage(u.toDataURL("image/jpeg",1),e,n,r,i,l,s)})},te.API.putTotalPages=function(t){var e,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),n=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(e,n);return this},te.API.viewerPreferences=function(t,e){var n;t=t||{},e=e||!1;var r,i,a,l={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(l),u=[],h=0,f=0,v=0;function b(S,k){var C,_=!1;for(C=0;C<S.length;C+=1)S[C]===k&&(_=!0);return _}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(l)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,t==="reset"||e===!0){var p=s.length;for(v=0;v<p;v+=1)n[s[v]].value=n[s[v]].defaultValue,n[s[v]].explicitSet=!1}if(je(t)==="object"){for(i in t)if(a=t[i],b(s,i)&&a!==void 0){if(n[i].type==="boolean"&&typeof a=="boolean")n[i].value=a;else if(n[i].type==="name"&&b(n[i].valueSet,a))n[i].value=a;else if(n[i].type==="integer"&&Number.isInteger(a))n[i].value=a;else if(n[i].type==="array"){for(h=0;h<a.length;h+=1)if(r=!0,a[h].length===1&&typeof a[h][0]=="number")u.push(String(a[h]-1));else if(a[h].length>1){for(f=0;f<a[h].length;f+=1)typeof a[h][f]!="number"&&(r=!1);r===!0&&u.push([a[h][0]-1,a[h][1]-1].join(" "))}n[i].value="["+u.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var S,k=[];for(S in n)n[S].explicitSet===!0&&(n[S].type==="name"?k.push("/"+S+" /"+n[S].value):k.push("/"+S+" "+n[S].value));k.length!==0&&this.internal.write(`/ViewerPreferences
171<<
172`+k.join(`
173`)+`
174>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},te.API.addMetadata=function(t,e){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:t,namespaceUri:e??"http://jspdf.default.namespaceuri/",rawXml:typeof e=="boolean"&&e},this.internal.events.subscribe("putCatalog",Fm),this.internal.events.subscribe("postPutResources",Im)),this},function(t){var e=t.API,n=e.pdfEscape16=function(a,l){for(var s,u=l.metadata.Unicode.widths,h=["","0","00","000","0000"],f=[""],v=0,b=a.length;v<b;++v){if(s=l.metadata.characterToGlyph(a.charCodeAt(v)),l.metadata.glyIdsUsed.push(s),l.metadata.toUnicode[s]=a.charCodeAt(v),u.indexOf(s)==-1&&(u.push(s),u.push([parseInt(l.metadata.widthOfGlyph(s),10)])),s=="0")return f.join("");s=s.toString(16),f.push(h[4-s.length],s)}return f.join("")},r=function(a){var l,s,u,h,f,v,b;for(f=`/CIDInit /ProcSet findresource begin
17512 dict begin
176begincmap
177/CIDSystemInfo <<
178  /Registry (Adobe)
179  /Ordering (UCS)
180  /Supplement 0
181>> def
182/CMapName /Adobe-Identity-UCS def
183/CMapType 2 def
1841 begincodespacerange
185<0000><ffff>
186endcodespacerange`,u=[],v=0,b=(s=Object.keys(a).sort(function(p,S){return p-S})).length;v<b;v++)l=s[v],u.length>=100&&(f+=`
187`+u.length+` beginbfchar
188`+u.join(`
189`)+`
190endbfchar`,u=[]),a[l]!==void 0&&a[l]!==null&&typeof a[l].toString=="function"&&(h=("0000"+a[l].toString(16)).slice(-4),l=("0000"+(+l).toString(16)).slice(-4),u.push("<"+l+"><"+h+">"));return u.length&&(f+=`
191`+u.length+` beginbfchar
192`+u.join(`
193`)+`
194endbfchar
195`),f+`endcmap
196CMapName currentdict /CMap defineresource pop
197end
198end`};e.events.push(["putFont",function(a){(function(l){var s=l.font,u=l.out,h=l.newObject,f=l.putStream;if(s.metadata instanceof t.API.TTFFont&&s.encoding==="Identity-H"){for(var v=s.metadata.Unicode.widths,b=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),p="",S=0;S<b.length;S++)p+=String.fromCharCode(b[S]);var k=h();f({data:p,addLength1:!0,objectId:k}),u("endobj");var C=h();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:C}),u("endobj");var _=h();u("<<"),u("/Type /FontDescriptor"),u("/FontName /"+Ra(s.fontName)),u("/FontFile2 "+k+" 0 R"),u("/FontBBox "+t.API.PDFObject.convert(s.metadata.bbox)),u("/Flags "+s.metadata.flags),u("/StemV "+s.metadata.stemV),u("/ItalicAngle "+s.metadata.italicAngle),u("/Asce
198nt "+s.metadata.ascender),u("/Descent "+s.metadata.decender),u("/CapHeight "+s.metadata.capHeight),u(">>"),u("endobj");var O=h();u("<<"),u("/Type /Font"),u("/BaseFont /"+Ra(s.fontName)),u("/FontDescriptor "+_+" 0 R"),u("/W "+t.API.PDFObject.convert(v)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+s.encoding+")"),u(">>"),u(">>"),u("endobj"),s.objectNumber=h(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+C+" 0 R"),u("/BaseFont /"+Ra(s.fontName)),u("/Encoding /"+s.encoding),u("/DescendantFonts ["+O+" 0 R]"),u(">>"),u("endobj"),s.isAlreadyPutted=!0}})(a)}]),e.events.push(["putFont",function(a){(function(l){var s=l.font,u=l.out,h=l.newObject,f=l.putStream;if(s.metadata instanceof t.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var v=s.metadata.rawData,b="",p=0;p<v.length;p++)b+=String.fromCharCode(v[p]);var S=h();f({data:b,addLength1:!0,objectId:S}),u("endobj");var k=h();f({data:r(s.metadata.toUnicode),addLength1:!0,objectId:k}),u("endobj");var C=h();u("<<"),u("/Descent "+s.metadata.decender),u("/CapHeight "+s.metadata.capHeight),u("/StemV "+s.metadata.stemV),u("/Type /FontDescriptor"),u("/FontFile2 "+S+" 0 R"),u("/Flags 96"),u("/FontBBox "+t.API.PDFObject.convert(s.metadata.bbox)),u("/FontName /"+Ra(s.fontName)),u("/ItalicAngle "+s.metadata.italicAngle),u("/Asce
198nt "+s.metadata.ascender),u(">>"),u("endobj"),s.objectNumber=h();for(var _=0;_<s.metadata.hmtx.widths.length;_++)s.metadata.hmtx.widths[_]=parseInt(s.metadata.hmtx.widths[_]*(1e3/s.metadata.head.unitsPerEm));u("<</Subtype/TrueType/Type/Font/ToUnicode "+k+" 0 R/BaseFont/"+Ra(s.fontName)+"/FontDescriptor "+C+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),u("endobj"),s.isAlreadyPutted=!0}})(a)}]);var i=function(a){var l,s=a.text||"",u=a.x,h=a.y,f=a.options||{},v=a.mutex||{},b=v.pdfEscape,p=v.activeFontKey,S=v.fonts,k=p,C="",_=0,O="",U=S[k].encoding;if(S[k].encoding!=="Identity-H")return{text:s,x:u,y:h,options:f,mutex:v};for(O=s,k=p,Array.isArray(s)&&(O=s[0]),_=0;_<O.length;_+=1)S[k].metadata.hasOwnProperty("cmap")&&(l=S[k].metadata.cmap.unicode.codeMap[O[_].charCodeAt(0)]),l||O[_].charCodeAt(0)<256&&S[k].metadata.hasOwnProperty("Unicode")?C+=O[_]:C+="";var R="";return parseInt(k.slice(1))<14||U==="WinAnsiEncoding"?R=b(C,k).split("").map(function(nt){return nt.charCodeAt(0).toString(16)}).join(""):U==="Identity-H"&&(R=n(C,S[k])),v.isHex=!0,{text:R,x:u,y:h,options:f,mutex:v}};e.events.push(["postProcessText",function(a){var l=a.text||"",s=[],u={text:l,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(l)){var h=0;for(h=0;h<l.length;h+=1)Array.isArray(l[h])&&l[h].length===3?s.push([i(Object.assign({},u,{text:l[h][0]})).text,l[h][1],l[h][2]]):s.push(i(Object.assign({},u,{text:l[h]})).text);a.text=s}else a.text=i(Object.assign({},u,{text:l})).text}])}(te),function(t){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0},t.addFileToVFS=function(n,r){return e.call(this),this.internal.vFS[n]=r,this},t.getFileFromVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}}(te.API),function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(r){var i,a,l,s,u,h,f,v=e,b=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],S={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},k={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},C=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],_=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),O=!1,U=0;this.__bidiEngine__={};var R=function(x){var j=x.charCodeAt(),W=j>>8,q=k[W];return q!==void 0?v[256*q+(255&j)]:W===252||W===253?"AL":_.test(W)?"L":W===8?"R":"N"},nt=function(x){for(var j,W=0;W<x.length;W++){if((j=R(x.charAt(W)))==="L")return!1;if(j==="R")return!0}return!1},dt=function(x,j,W,q){var Q,ct,at,K,ht=j[q];switch(ht){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":O=!1;break;case"N":case"AN":break;case"EN":O&&(ht="AN");break;case"AL":O=!0,ht="R";break;case"WS":case"BN":ht="N";break;case"CS":q<1||q+1>=j.length||(Q=W[q-1])!=="EN"&&Q!=="AN"||(ct=j[q+1])!=="EN"&&ct!=="AN"?ht="N":O&&(ct="AN"),ht=ct===Q?ct:"N";break;case"ES":ht=(Q=q>0?W[q-1]:"B")==="EN"&&q+1<j.length&&j[q+1]==="EN"?"EN":"N";break;case"ET":if(q>0&&W[q-1]==="EN"){ht="EN";break}if(O){ht="N";break}for(at=q+1,K=j.length;at<K&&j[at]==="ET";)at++;ht=at<K&&j[at]==="EN"?"EN":"N";break;case"NSM":if(l&&!s){for(K=j.length,at=q+1;at<K&&j[at]==="NSM";)at++;if(at<K){var At=x[q],pt=At>=1425&&At<=2303||At===64286;if(Q=j[at],pt&&(Q==="R"||Q==="AL")){ht="R";break}}}ht=q<1||(Q=j[q-1])==="B"?"N":W[q-1];break;case"B":O=!1,i=!0,ht=U;break;case"S":a=!0,ht="N"}return ht},et=function(x,j,W){var q=x.split("");return W&&$(q,W,{hiLevel:U}),q.reverse(),j&&j.reverse(),q.join("")},$=function(x,j,W){var q,Q,ct,at,K,ht=-1,At=x.length,pt=0,A=[],z=U?p:b,H=[];for(O=!1,i=!1,a=!1,Q=0;Q<At;Q++)H[Q]=R(x[Q]);for(ct=0;ct<At;ct++){if(K=pt,A[ct]=dt(x,H,A,ct),q=240&(pt=z[K][S[A[ct]]]),pt&=15,j[ct]=at=z[pt][5
vendor: 31,049 bytes, line 198
198],q>0)if(q===16){for(Q=ht;Q<ct;Q++)j[Q]=1;ht=-1}else ht=-1;if(z[pt][6])ht===-1&&(ht=ct);else if(ht>-1){for(Q=ht;Q<ct;Q++)j[Q]=at;ht=-1}H[ct]==="B"&&(j[ct]=0),W.hiLevel|=at}a&&function(G,Z,it){for(var ut=0;ut<it;ut++)if(G[ut]==="S"){Z[ut]=U;for(var ft=ut-1;ft>=0&&G[ft]==="WS";ft--)Z[ft]=U}}(H,j,At)},D=function(x,j,W,q,Q){if(!(Q.hiLevel<x)){if(x===1&&U===1&&!i)return j.reverse(),void(W&&W.reverse());for(var ct,at,K,ht,At=j.length,pt=0;pt<At;){if(q[pt]>=x){for(K=pt+1;K<At&&q[K]>=x;)K++;for(ht=pt,at=K-1;ht<at;ht++,at--)ct=j[ht],j[ht]=j[at],j[at]=ct,W&&(ct=W[ht],W[ht]=W[at],W[at]=ct);pt=K}pt++}}},J=function(x,j,W){var q=x.split(""),Q={hiLevel:U};return W||(W=[]),$(q,W,Q),function(ct,at,K){if(K.hiLevel!==0&&f)for(var ht,At=0;At<ct.length;At++)at[At]===1&&(ht=C.indexOf(ct[At]))>=0&&(ct[At]=C[ht+1])}(q,W,Q),D(2,q,j,W,Q),D(1,q,j,W,Q),q.join("")};return this.__bidiEngine__.doBidiReorder=function(x,j,W){if(function(Q,ct){if(ct)for(var at=0;at<Q.length;at++)ct[at]=at;s===void 0&&(s=nt(Q)),h===void 0&&(h=nt(Q))}(x,j),l||!u||h)if(l&&u&&s^h)U=s?1:0,x=et(x,j,W);else if(!l&&u&&h)U=s?1:0,x=J(x,j,W),x=et(x,j);else if(!l||s||u||h){if(l&&!u&&s^h)x=et(x,j),s?(U=0,x=J(x,j,W)):(U=1,x=J(x,j,W),x=et(x,j));else if(l&&s&&!u&&h)U=1,x=J(x,j,W),x=et(x,j);else if(!l&&!u&&s^h){var q=f;s?(U=1,x=J(x,j,W),U=0,f=!1,x=J(x,j,W),f=q):(U=0,x=J(x,j,W),x=et(x,j),U=1,f=!1,x=J(x,j,W),f=q,x=et(x,j))}}else U=0,x=J(x,j,W);else U=s?1:0,x=J(x,j,W);return x},this.__bidiEngine__.setOptions=function(x){x&&(l=x.isInputVisual,u=x.isOutputVisual,s=x.isInputRtl,h=x.isOutputRtl,f=x.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(r){var i=r.text;r.x,r.y;var a=r.options||{};r.mutex,a.lang;var l=[];if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,n.setOptions(a),Object.prototype.toString.call(i)==="[object Array]"){var s=0;for(l=[],s=0;s<i.length;s+=1)Object.prototype.toString.call(i[s])==="[object Array]"?l.push([n.doBidiReorder(i[s][0]),i[s][1],i[s][2]]):l.push([n.doBidiReorder(i[s])]);r.text=l}else r.text=n.doBidiReorder(i);n.setOptions({isInputVisual:!0})}])}(te),te.API.TTFFont=function(){function t(e){var n;if(this.rawData=e,n=this.contents=new Pi(e),this.contents.pos=4,n.readString(4)==="ttcf")throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new Ym(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new Rm(this.contents),this.head=new Tm(this),this.name=new zm(this),this.cmap=new _1(this),this.toUnicode={},this.hhea=new Dm(this),this.maxp=new Um(this),this.hmtx=new Hm(this),this.post=new Bm(this),this.os2=new Mm(this),this.loca=new Gm(this),this.glyf=new Wm(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var e,n,r,i,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var l,s,u,h;for(h=[],l=0,s=(u=this.bbox).length;l<s;l++)e=u[l],h.push(Math.round(e*this.scaleFactor));return h}).call(this),this.stemV=0,this.post.exists?(r=255&(i=this.post.italic_angle),32768&(n=i>>16)&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(e){var n;return((n=this.cmap.unicode)!=null?n.codeMap[e]:void 0)||0},t.prototype.widthOfGlyph=function(e){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*n},t.prototype.widthOfString=function(e,n,r){var i,a,l,s;for(l=0,a=0,s=(e=""+e).length;0<=s?a<s:a>s;a=0<=s?++a:--a)i=e.charCodeAt(a),l+=this.widthOfGlyph(this.characterToGlyph(i))+r*(1e3/n)||0;return l*(n/1e3)},t.prototype.lineHeight=function(e,n){var r;return n==null&&(n=!1),r=n?this.lineGap:0,(this.ascender+r-this.decender)/1e3*e},t}();var Sr,Pi=function(){function t(e){this.data=e??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(e){return this.data[this.pos++]=e},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},t.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},t.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},t.prototype.readString=function(e){var n,r;for(r=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)r[n]=String.fromCharCode(this.readByte());return r.join("")},t.prototype.writeString=function(e){var n,r,i;for(i=[],n=0,r=e.length;0<=r?n<r:n>r;n=0<=r?++n:--n)i.push(this.writeByte(e.charCodeAt(n)));return i},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(e){return this.writeInt16(e)},t.prototype.readLongLong=function(){var e,n,r,i,a,l,s,u;return e=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),a=this.readByte(),l=this.readByte(),s=this.readByte(),u=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^n)+1099511627776*(255^r)+4294967296*(255^i)+16777216*(255^a)+65536*(255^l)+256*(255^s)+(255^u)+1):72057594037927940*e+281474976710656*n+1099511627776*r+4294967296*i+16777216*a+65536*l+256*s+u},t.prototype.writeLongLong=function(e){var n,r;return n=Math.floor(e/4294967296),r=4294967295&e,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(e){return this.writeInt32(e)},t.prototype.read=function(e){var n,r;for(n=[],r=0;0<=e?r<e:r>e;r=0<=e?++r:--r)n.push(this.readByte());return n},t.prototype.write=function(e){var n,r,i,a;for(a=[],r=0,i=e.length;r<i;r++)n=e[r],a.push(this.writeByte(n));return a},t}(),Rm=function(){var t;function e(n){var r,i,a;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},i=0,a=this.tableCount;0<=a?i<a:i>a;i=0<=a?++i:--i)r={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[r.tag]=r}return e.prototype.encode=function(n){var r,i,a,l,s,u,h,f,v,b,p,S,k;for(k in p=Object.keys(n).length,u=Math.log(2),v=16*Math.floor(Math.log(p)/u),l=Math.floor(v/u),f=16*p-v,(i=new Pi).writeInt(this.scalarType),i.writeShort(p),i.writeShort(v),i.writeShort(l),i.writeShort(f),a=16*p,h=i.pos+a,s=null,S=[],n)for(b=n[k],i.writeString(k),i.writeInt(t(b)),i.writeInt(h),i.writeInt(b.length),S=S.concat(b),k==="head"&&(s=h),h+=b.length;h%4;)S.push(0),h++;return i.write(S),r=2981146554-t(i.data),i.pos=s+8,i.writeUInt32(r),i.data},t=function(n){var r,i,a,l;for(n=N1.call(n);n.length%4;)n.push(0);for(a=new Pi(n),i=0,r=0,l=n.length;r<l;r=r+=4)i+=a.readUInt32();return 4294967295&i},e}(),Om={}.hasOwnProperty,zr=function(t,e){for(var n in e)Om.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Sr=function(){function t(e){var n;this.file=e,n=this.file.directory.tables[this.tag],this.exists=!!n,n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var Tm=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="head",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},t.prototype.encode=function(e){var n;return(n=new Pi).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(e),n.writeShort(this.glyphDataFormat),n.data},t}(),kf=function(){function t(e,n){var r,i,a,l,s,u,h,f,v,b,p,S,k,C,_,O,U;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=n+e.readInt(),v=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(u=0;u<256;++u)this.codeMap[u]=e.readByte();break;case 4:for(p=e.readUInt16(),b=p/2,e.pos+=6,a=function(){var R,nt;for(nt=[],u=R=0;0<=b?R<b:R>b;u=0<=b?++R:--R)nt.push(e.readUInt16());return nt}(),e.pos+=2,k=function(){var R,nt;for(nt=[],u=R=0;0<=b?R<b:R>b;u=0<=b?++R:--R)nt.push(e.readUInt16());return nt}(),h=function(){var R,nt;for(nt=[],u=R=0;0<=b?R<b:R>b;u=0<=b?++R:--R)nt.push(e.readUInt16());return nt}(),f=function(){var R,nt;for(nt=[],u=R=0;0<=b?R<b:R>b;u=0<=b?++R:--R)nt.push(e.readUInt16());return nt}(),i=(this.length-e.pos+this.offset)/2,s=function(){var R,nt;for(nt=[],u=R=0;0<=i?R<i:R>i;u=0<=i?++R:--R)nt.push(e.readUInt16());return nt}(),u=_=0,U=a.length;_<U;u=++_)for(C=a[u],r=O=S=k[u];S<=C?O<=C:O>=C;r=S<=C?++O:--O)f[u]===0?l=r+h[u]:(l=s[f[u]/2+(r-S)-(b-u)]||0)!==0&&(l+=h[u]),this.codeMap[r]=65535&l}e.pos=v}return t.encode=function(e,n){var r,i,a,l,s,u,h,f,v,b,p,S,k,C,_,O,U,R,nt,dt,et,$,D,J,x,j,W,q,Q,ct,at,K,ht,At,pt,A,z,H,G,Z,it,ut,ft,vt,St,Pt;switch(q=new Pi,l=Object.keys(e).sort(function(wt,Kt){return wt-Kt}),n){case"macroman":for(k=0,C=function(){var wt=[];for(S=0;S<256;++S)wt.push(0);return wt}(),O={0:0},a={},Q=0,ht=l.length;Q<ht;Q++)O[ft=e[i=l[Q]]]==null&&(O[ft]=++k),a[i]={old:e[i],new:O[e[i]]},C[i]=O[e[i]];return q.writeUInt16(1),q.writeUInt16(0),q.writeUInt32(12),q.writeUInt16(0),q.writeUInt16(262),q.writeUInt16(0),q.write(C),{charMap:a,subtable:q.data,maxGlyphID:k+1};case"unicode":for(j=[],v=[],U=0,O={},r={},_=h=null,ct=0,At=l.length;ct<At;ct++)O[nt=e[i=l[ct]]]==null&&(O[nt]=++U),r[i]={old:nt,new:O[nt]},s=O[nt]-i,_!=null&&s===h||(_&&v.push(_),j.push(i),h=s),_=i;for(_&&v.push(_),v.push(65535),j.push(65535),J=2*(D=j.length),$=2*Math.pow(Math.log(D)/Math.LN2,2),b=Math.log($/2)/Math.LN2,et=2*D-$,u=[],dt=[],p=[],S=at=0,pt=j.length;at<pt;S=++at){if(x=j[S],f=v[S],x===65535){u.push(0),dt.push(0);break}if(x-(W=r[x].new)>=32768)for(u.push(0),dt.push(2*(p.length+D-S)),i=K=x;x<=f?K<=f:K>=f;i=x<=f?++K:--K)p.push(r[i].new);else u.push(W-x),dt.push(0)}for(q.writeUInt16(3),q.writeUInt16(1),q.writeUInt32(12),q.writeUInt16(4),q.writeUInt16(16+8*D+2*p.length),q.writeUInt16(0),q.writeUInt16(J),q.writeUInt16($),q.writeUInt16(b),q.writeUInt16(et),it=0,A=v.length;it<A;it++)i=v[it],q.writeUInt16(i);for(q.writeUInt16(0),ut=0,z=j.length;ut<z;ut++)i=j[ut],q.writeUInt16(i);for(vt=0,H=u.length;vt<H;vt++)s=u[vt],q.writeUInt16(s);for(St=0,G=dt.length;St<G;St++)R=dt[St],q.writeUInt16(R);for(Pt=0,Z=p.length;Pt<Z;Pt++)k=p[Pt],q.writeUInt16(k);return{charMap:r,subtable:q.data,maxGlyphID:U+1}}},t}(),_1=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="cmap",t.prototype.parse=function(e){var n,r,i;for(e.pos=this.offset,this.version=e.readUInt16(),i=e.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=i?r<i:r>i;r=0<=i?++r:--r)n=new kf(e,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},t.encode=function(e,n){var r,i;return n==null&&(n="macroman"),r=kf.encode(e,n),(i=new Pi).writeUInt16(0),i.writeUInt16(1),r.table=i.data.concat(r.subtable),r},t}(),Dm=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="hhea",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},t}(),Mm=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="OS/2",t.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var n,r;for(r=[],n=0;n<10;++n)r.push(e.readByte());return r}(),this.charRange=function(){var n,r;for(r=[],n=0;n<4;++n)r.push(e.readInt());return r}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var n,r;for(r=[],n=0;n<2;n=++n)r.push(e.readInt());return r}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},t}(),Bm=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="post",t.prototype.parse=function(e){var n,r,i;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var a;for(r=e.readUInt16(),this.glyphNameIndex=[],a=0;0<=r?a<r:a>r;a=0<=r?++a:--a)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],i=[];e.pos<this.offset+this.length;)n=e.readByte(),i.push(this.names.push(e.readString(n)));return i;case 151552:return r=e.readUInt16(),this.offsets=e.read(r);case 262144:return this.map=(function(){var l,s,u;for(u=[],a=l=0,s=this.file.maxp.numGlyphs;0<=s?l<s:l>s;a=0<=s?++l:--l)u.push(e.readUInt32());return u}).call(this)}},t}(),qm=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},zm=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="name",t.prototype.parse=function(e){var n,r,i,a,l,s,u,h,f,v,b;for(e.pos=this.offset,e.readShort(),n=e.readShort(),s=e.readShort(),r=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)r.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+s+e.readShort()});for(u={},a=f=0,v=r.length;f<v;a=++f)i=r[a],e.pos=i.offset,h=e.readString(i.length),l=new qm(h,i),u[b=i.nameID]==null&&(u[b]=[]),u[i.nameID].push(l);this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5];try{this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=u[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},t}(),Um=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="maxp",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},t}(),Hm=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="hmtx",t.prototype.parse=function(e){var n,r,i,a,l,s,u;for(e.pos=this.offset,this.metrics=[],n=0,s=this.file.hhea.numberOfMetrics;0<=s?n<s:n>s;n=0<=s?++n:--n)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var h,f;for(f=[],n=h=0;0<=i?h<i:h>i;n=0<=i?++h:--h)f.push(e.readInt16());return f}(),this.widths=(function(){var h,f,v,b;for(b=[],h=0,f=(v=this.metrics).length;h<f;h++)a=v[h],b.push(a.advance);return b}).call(this),r=this.widths[this.widths.length-1],u=[],n=l=0;0<=i?l<i:l>i;n=0<=i?++l:--l)u.push(this.widths.push(r));return u},t.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},t}(),N1=[].slice,Wm=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(e){var n,r,i,a,l,s,u,h,f,v;return e in this.cache?this.cache[e]:(a=this.file.loca,n=this.file.contents,r=a.indexOf(e),(i=a.lengthOf(e))===0?this.cache[e]=null:(n.pos=this.offset+r,l=(s=new Pi(n.read(i))).readShort(),h=s.readShort(),v=s.readShort(),u=s.readShort(),f=s.readShort(),this.cache[e]=l===-1?new Vm(s,h,v,u,f):new $m(s,l,h,v,u,f),this.cache[e]))},t.prototype.encode=function(e,n,r){var i,a,l,s,u;for(l=[],a=[],s=0,u=n.length;s<u;s++)i=e[n[s]],a.push(l.length),i&&(l=l.concat(i.encode(r)));return a.push(l.length),{table:l,offsets:a}},t}(),$m=function(){function t(e,n,r,i,a,l){this.raw=e,this.numberOfContours=n,this.xMin=r,this.yMin=i,this.xMax=a,this.yMax=l,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),Vm=function(){function t(e,n,r,i,a){var l,s;for(this.raw=e,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],l=this.raw;s=l.readShort(),this.glyphOffsets.push(l.pos),this.glyphIDs.push(l.readUInt16()),32&s;)l.pos+=1&s?4:2,128&s?l.pos+=8:64&s?l.pos+=4:8&s&&(l.pos+=2)}return t.prototype.encode=function(){var e,n,r;for(n=new Pi(N1.call(this.raw.data)),e=0,r=this.glyphIDs.length;e<r;++e)n.pos=this.glyphOffsets[e];return n.data},t}(),Gm=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return zr(t,Sr),t.prototype.tag="loca",t.prototype.parse=function(e){var n,r;return e.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var i,a;for(a=[],r=0,i=this.length;r<i;r+=2)a.push(2*e.readUInt16());return a}).call(this):(function(){var i,a;for(a=[],r=0,i=this.length;r<i;r+=4)a.push(e.readUInt32());return a}).call(this)},t.prototype.indexOf=function(e){return this.offsets[e]},t.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]}
198,t.prototype.encode=function(e,n){for(var r=new Uint32Array(this.offsets.length),i=0,a=0,l=0;l<r.length;++l)if(r[l]=i,a<n.length&&n[a]==l){++a,r[l]=i;var s=this.offsets[l],u=this.offsets[l+1]-s;u>0&&(i+=u)}for(var h=new Array(4*r.length),f=0;f<r.length;++f)h[4*f+3]=255&r[f],h[4*f+2]=(65280&r[f])>>8,h[4*f+1]=(16711680&r[f])>>16,h[4*f]=(4278190080&r[f])>>24;return h},t}(),Ym=function(){function t(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var e,n,r,i,a;for(n in i=this.font.cmap.tables[0].codeMap,e={},a=this.subset)r=a[n],e[n]=i[r];return e},t.prototype.glyphsFor=function(e){var n,r,i,a,l,s,u;for(i={},l=0,s=e.length;l<s;l++)i[a=e[l]]=this.font.glyf.glyphFor(a);for(a in n=[],i)(r=i[a])!=null&&r.compound&&n.push.apply(n,r.glyphIDs);if(n.length>0)for(a in u=this.glyphsFor(n))r=u[a],i[a]=r;return i},t.prototype.encode=function(e,n){var r,i,a,l,s,u,h,f,v,b,p,S,k,C,_;for(i in r=_1.encode(this.generateCmap(),"unicode"),l=this.glyphsFor(e),p={0:0},_=r.charMap)p[(u=_[i]).old]=u.new;for(S in b=r.maxGlyphID,l)S in p||(p[S]=b++);return f=function(O){var U,R;for(U in R={},O)R[O[U]]=U;return R}(p),v=Object.keys(f).sort(function(O,U){return O-U}),k=function(){var O,U,R;for(R=[],O=0,U=v.length;O<U;O++)s=v[O],R.push(f[s]);return R}(),a=this.font.glyf.encode(l,k,p),h=this.font.loca.encode(a.offsets,k),C={cmap:this.font.cmap.raw(),glyf:a.table,loca:h,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(C["OS/2"]=this.font.os2.raw()),this.font.directory.encode(C)},t}();te.API.PDFObject=function(){var t;function e(){}return t=function(n,r){return(Array(r+1).join("0")+n).slice(-r)},e.convert=function(n){var r,i,a,l;if(Array.isArray(n))return"["+function(){var s,u,h;for(h=[],s=0,u=n.length;s<u;s++)r=n[s],h.push(e.convert(r));return h}().join(" ")+"]";if(typeof n=="string")return"/"+n;if(n!=null&&n.isString)return"("+n+")";if(n instanceof Date)return"(D:"+t(n.getUTCFullYear(),4)+t(n.getUTCMonth(),2)+t(n.getUTCDate(),2)+t(n.getUTCHours(),2)+t(n.getUTCMinutes(),2)+t(n.getUTCSeconds(),2)+"Z)";if({}.toString.call(n)==="[object Object]"){for(i in a=["<<"],n)l=n[i],a.push("/"+i+" "+e.convert(l));return a.push(">>"),a.join(`
199`)}return""+n},e}();function S1(t,e,n,r,i){r=r||{};var a=1.15,l=i.internal.scaleFactor,s=i.internal.getFontSize()/l,u=i.getLineHeightFactor?i.getLineHeightFactor():a,h=s*u,f=/\r\n|\r|\n/g,v="",b=1;if((r.valign==="middle"||r.valign==="bottom"||r.halign==="center"||r.halign==="right")&&(v=typeof t=="string"?t.split(f):t,b=v.length||1),n+=s*(2-a),r.valign==="middle"?n-=b/2*h:r.valign==="bottom"&&(n-=b*h),r.halign==="center"||r.halign==="right"){var p=s;if(r.halign==="center"&&(p*=.5),v&&b>=1){for(var S=0;S<v.length;S++)i.text(v[S],e-i.getStringUnitWidth(v[S])*p,n),n+=h;return i}e-=i.getStringUnitWidth(t)*p}return r.halign==="justify"?i.text(t,e,n,{maxWidth:r.maxWidth||100,align:"justify"}):i.text(t,e,n),i}var Pf={},Ua=function(){function t(e){this.jsPDFDocument=e,this.userStyles={textColor:e.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:e.internal.getFontSize(),fontStyle:e.internal.getFont().fontStyle,font:e.internal.getFont().fontName,lineWidth:e.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:e.getDrawColor?this.jsPDFDocument.getDrawColor():0}}
199return t.setDefaults=function(e,n){n===void 0&&(n=null),n?n.__autoTableDocumentDefaults=e:Pf=e},t.unifyColor=function(e){return Array.isArray(e)?e:typeof e=="number"?[e,e,e]:typeof e=="string"?[e]:null},t.prototype.applyStyles=function(e,n){var r,i,a;n===void 0&&(n=!1),e.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(e.fontStyle);var l=this.jsPDFDocument.internal.getFont(),s=l.fontStyle,u=l.fontName;if(e.font&&(u=e.font),e.fontStyle){s=e.fontStyle;var h=this.getFontList()[u];h&&h.indexOf(s)===-1&&this.jsPDFDocument.setFontStyle&&(this.jsPDFDocument.setFontStyle(h[0]),s=h[0])}if(this.jsPDFDocument.setFont(u,s),e.fontSize&&this.jsPDFDocument.setFontSize(e.fontSize),!n){var f=t.unifyColor(e.fillColor);f&&(r=this.jsPDFDocument).setFillColor.apply(r,f),f=t.unifyColor(e.textColor),f&&(i=this.jsPDFDocument).setTextColor.apply(i,f),f=t.unifyColor(e.lineColor),f&&(a=this.jsPDFDocument).setDrawColor.apply(a,f),typeof e.lineWidth=="number"&&this.jsPDFDocument.setLineWidth(e.lineWidth)}},t.prototype.splitTextToSize=function(e,n,r){return this.jsPDFDocument.splitTextToSize(e,n,r)},t.prototype.rect=function(e,n,r,i,a){return this.jsPDFDocument.rect(e,n,r,i,a)},t.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},t.prototype.getTextWidth=function(e){return this.jsPDFDocument.getTextWidth(e)},t.prototype.getDocument=function(){return this.jsPDFDocument},t.prototype.setPage=function(e){this.jsPDFDocument.setPage(e)},t.prototype.addPage=function(){return this.jsPDFDocument.addPage()},t.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},t.prototype.getGlobalOptions=function(){return Pf||{}},t.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},t.prototype.pageSize=function(){var e=this.jsPDFDocument.internal.pageSize;return e.width==null&&(e={width:e.getWidth(),height:e.getHeight()}),e},t.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},t.prototype.getLineHeightFactor=function(){var e=this.jsPDFDocument;return e.getLineHeightFactor?e.getLineHeightFactor():1.15},t.prototype.getLineHeight=function(e){return e/this.scaleFactor()*this.getLineHeightFactor()},t.prototype.pageNumber=function(){var e=this.jsPDFDocument.internal.getCurrentPageInfo();return e?e.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},t}(),Vc=function(t,e){return Vc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Vc(t,e)};function A1(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Vc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var L1=function(t){A1(e,t);function e(n){var r=t.call(this)||this;return r._element=n,r}return e}(Array);function Zm(t){return{font:"helvetica",fontStyle:"normal",overflow:"linebreak",fillColor:!1,textColor:20,halign:"left",valign:"top",fontSize:10,cellPadding:5/t,lineColor:200,lineWidth:0,cellWidth:"auto",minCellHeight:0,minCellWidth:0}}function Km(t){var e={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal"},head:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:"bold"},foot:{fontStyle:"bold"}}};return e[t]}function Xs(t,e,n){n.applyStyles(e,!0);var r=Array.isArray(t)?t:[t],i=r.map(function(a){return n.getTextWidth(a)}).reduce(function(a,l){return Math.max(a,l)},0);return i}function k1(t,e,n,r){var i=e.settings.tableLineWidth,a=e.settings.tableLineColor;t.applyStyles({lineWidth:i,lineColor:a});var l=P1(i,!1);l&&t.rect(n.x,n.y,e.getWidth(t.pageSize().width),r.y-n.y,l)}function P1(t,e){var n=t>0,r=e||e===0;return n&&r?"DF":n?"S":r?"F":null}function al(t,e){var n,r,i,a;if(t=t||e,Array.isArray(t)){if(t.length>=4)return{top:t[0],right:t[1],bottom:t[2],left:t[3]};if(t.length===3)return{top:t[0],right:t[1],bottom:t[2],left:t[1]};if(t.length===2)return{top:t[0],right:t[1],bottom:t[0],left:t[1]};t.length===1?t=t[0]:t=e}return typeof t=="object"?(typeof t.vertical=="number"&&(t.top=t.vertical,t.bottom=t.vertical),typeof t.horizontal=="number"&&(t.right=t.horizontal,t.left=t.horizontal),{left:(n=t.left)!==null&&n!==void 0?n:e,top:(r=t.top)!==null&&r!==void 0?r:e,right:(i=t.right)!==null&&i!==void 0?i:e,bottom:(a=t.bottom)!==null&&a!==void 0?a:e}):(typeof t!="number"&&(t=e),{top:t,right:t,bottom:t,left:t})}
199function C1(t,e){var n=al(e.settings.margin,0);return t.pageSize().width-(n.left+n.right)}function Xm(t,e,n,r,i){var a={},l=1.3333333333333333,s=_c(e,function(U){return i.getComputedStyle(U).backgroundColor});s!=null&&(a.fillColor=s);var u=_c(e,function(U){return i.getComputedStyle(U).color});u!=null&&(a.textColor=u);var h=Qm(r,n);h&&(a.cellPadding=h);var f="borderTopColor",v=l*n,b=r.borderTopWidth;if(r.borderBottomWidth===b&&r.borderRightWidth===b&&r.borderLeftWidth===b){var p=(parseFloat(b)||0)/v;p&&(a.lineWidth=p)}else a.lineWidth={top:(parseFloat(r.borderTopWidth)||0)/v,right:(parseFloat(r.borderRightWidth)||0)/v,bottom:(parseFloat(r.borderBottomWidth)||0)/v,left:(parseFloat(r.borderLeftWidth)||0)/v},a.lineWidth.top||(a.lineWidth.right?f="borderRightColor":a.lineWidth.bottom?f="borderBottomColor":a.lineWidth.left&&(f="borderLeftColor"));var S=_c(e,function(U){return i.getComputedStyle(U)[f]});S!=null&&(a.lineColor=S);var k=["left","right","center","justify"];k.indexOf(r.textAlign)!==-1&&(a.halign=r.textAlign),k=["middle","bottom","top"],k.indexOf(r.verticalAlign)!==-1&&(a.valign=r.verticalAlign);var C=parseInt(r.fontSize||"");isNaN(C)||(a.fontSize=C/l);var _=Jm(r);_&&(a.fontStyle=_);var O=(r.fontFamily||"").toLowerCase();return t.indexOf(O)!==-1&&(a.font=O),a}function Jm(t){var e="";return(t.fontWeight==="bold"||t.fontWeight==="bolder"||parseInt(t.fontWeight)>=700)&&(e="bold"),(t.fontStyle==="italic"||t.fontStyle==="oblique")&&(e+="italic"),e}function _c(t,e){var n=E1(t,e);if(!n)return null;var r=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!r||!Array.isArray(r))return null;var i=[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])],a=parseInt(r[4]);return a===0||isNaN(i[0])||isNaN(i[1])||isNaN(i[2])?null:i}function E1(t,e){var n=e(t);return n==="rgba(0, 0, 0, 0)"||n==="transparent"||n==="initial"||n==="inherit"?t.parentElement==null?null:E1(t.parentElement,e):n}function Qm(t,e){var n=[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft],r=96/(72/e),i=(parseInt(t.lineHeight)-parseInt(t.fontSize))/e/2,a=n.map(function(s){return parseInt(s||"0")/r}),l=al(a,0);return i>l.top&&(l.top=i),i>l.bottom&&(l.bottom=i),l}function j1(t,e,n,r,i){var a,l;r===void 0&&(r=!1),i===void 0&&(i=!1);var s;typeof e=="string"?s=n.document.querySelector(e):s=e;var u=Object.keys(t.getFontList()),h=t.scaleFactor(),f=[],v=[],b=[];if(!s)return console.error("Html table could not be found with input: ",e),{head:f,body:v,foot:b};for(var p=0;p<s.rows.length;p++){var S=s.rows[p],k=(l=(a=S==null?void 0:S.parentElement)===null||a===void 0?void 0:a.tagName)===null||l===void 0?void 0:l.toLowerCase(),C=tv(u,h,n,S,r,i);C&&(k==="thead"?f.push(C):k==="tfoot"?b.push(C):v.push(C))}return{head:f,body:v,foot:b}}function tv(t,e,n,r,i,a){for(var l=new L1(r),s=0;s<r.cells.length;s++){var u=r.cells[s],h=n.getComputedStyle(u);if(i||h.display!=="none"){var f=void 0;a&&(f=Xm(t,u,e,h,n)),l.push({rowSpan:u.rowSpan,colSpan:u.colSpan,styles:f,_element:u,content:ev(u)})}}var v=n.getComputedStyle(r);if(l.length>0&&(i||v.display!=="none"))return l}function ev(t){var e=t.cloneNode(!0);return e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ +/g," "),e.innerHTML=e.innerHTML.split(/<br.*?>/).map(function(n){return n.trim()}).join(`
200`),e.innerText||e.textContent||""}function nv(t,e,n){for(var r=0,i=[t,e,n];r<i.length;r++){var a=i[r];a&&typeof a!="object"&&console.error("The options parameter should be of type object, is: "+typeof a),a.startY&&typeof a.startY!="number"&&(console.error("Invalid value for startY option",a.startY),delete a.startY)}}function ri(t,e,n,r,i){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(t),l=1;l<arguments.length;l++){var s=arguments[l];if(s!=null)for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(a[u]=s[u])}return a}function I1(t,e){var n=new Ua(t),r=n.getDocumentOptions(),i=n.getGlobalOptions();nv(i,r,e);var a=ri({},i,r,e),l;typeof window<"u"&&(l=window);var s=rv(i,r,e),u=iv(i,r,e),h=av(n,a),f=sv(n,a,l);return{id:e.tableId,content:f,hooks:u,styles:s,settings:h}}function rv(t,e,n){for(var r={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},i=function(u){if(u==="columnStyles"){var h=t[u],f=e[u],v=n[u];r.columnStyles=ri({},h,f,v)}else{var b=[t,e,n],p=b.map(function(S){return S[u]||{}});r[u]=ri({},p[0],p[1],p[2])}},a=0,l=Object.keys(r);a<l.length;a++){var s=l[a];i(s)}return r}function iv(t,e,n){for(var r=[t,e,n],i={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},a=0,l=r;a<l.length;a++){var s=l[a];s.didParseCell&&i.didParseCell.push(s.didParseCell),s.willDrawCell&&i.willDrawCell.push(s.willDrawCell),s.didDrawCell&&i.didDrawCell.push(s.didDrawCell),s.willDrawPage&&i.willDrawPage.push(s.willDrawPage),s.didDrawPage&&i.didDrawPage.push(s.didDrawPage)}return i}function av(t,e){var n,r,i,a,l,s,u,h,f,v,b,p,S=al(e.margin,40/t.scaleFactor()),k=(n=ov(t,e.
200startY))!==null&&n!==void 0?n:S.top,C;e.showFoot===!0?C="everyPage":e.showFoot===!1?C="never":C=(r=e.showFoot)!==null&&r!==void 0?r:"everyPage";var _;e.showHead===!0?_="everyPage":e.showHead===!1?_="never":_=(i=e.showHead)!==null&&i!==void 0?i:"everyPage";var O=(a=e.useCss)!==null&&a!==void 0?a:!1,U=e.theme||(O?"plain":"striped"),R=!!e.horizontalPageBreak,nt=(l=e.horizontalPageBreakRepeat)!==null&&l!==void 0?l:null;return{includeHiddenHtml:(s=e.includeHiddenHtml)!==null&&s!==void 0?s:!1,useCss:O,theme:U,startY:k,margin:S,pageBreak:(u=e.pageBreak)!==null&&u!==void 0?u:"auto",rowPageBreak:(h=e.rowPageBreak)!==null&&h!==void 0?h:"auto",tableWidth:(f=e.tableWidth)!==null&&f!==void 0?f:"auto",showHead:_,showFoot:C,tableLineWidth:(v=e.tableLineWidth)!==null&&v!==void 0?v:0,tableLineColor:(b=e.tableLineColor)!==null&&b!==void 0?b:200,horizontalPageBreak:R,horizontalPageBreakRepeat:nt,horizontalPageBreakBehaviour:(p=e.horizontalPageBreakBehaviour)!==null&&p!==void 0?p:"afterAllRows"}}function ov(t,e){var n=t.getLastAutoTable(),r=t.scaleFactor(),i=t.pageNumber(),a=!1;if(n&&n.startPageNumber){var l=n.startPageNumber+n.pageNumber-1;a=l===i}return typeof e=="number"?e:(e==null||e===!1)&&a&&(n==null?void 0:n.finalY)!=null?n.finalY+20/r:null}function sv(t,e,n){var r=e.head||[],i=e.body||[],a=e.foot||[];if(e.html){var l=e.includeHiddenHtml;if(n){var s=j1(t,e.html,n,l,e.useCss)||{};r=s.head||r,i=s.body||r,a=s.foot||r}else console.error("Cannot parse html in non browser environment")}var u=e.columns||lv(r,i,a);return{columns:u,head:r,body:i,foot:a}}function lv(t,e,n){var r=t[0]||e[0]||n[0]||[],i=[];return Object.keys(r).filter(function(a){return a!=="_element"}).forEach(function(a){var l=1,s;Array.isArray(r)?s=r[parseInt(a)]:s=r[a],typeof s=="object"&&!Array.isArray(s)&&(l=(s==null?void 0:s.colSpan)||1);for(var u=0;u<l;u++){var h=void 0;Array.isArray(r)?h=i.length:h=a+(u>0?"_".concat(u):"");var f={dataKey:h};i.push(f)}}),i}var Gc=function(){function t(e,n,r){this.table=n,this.pageNumber=n.pageNumber,this.settings=n.settings,this.cursor=r,this.doc=e.getDocument()}return t}(),cv=function(t){A1(e,t);function e(n,r,i,a,l,s){var u=t.call(this,n,r,s)||this;return u.cell=i,u.row=a,u.column=l,u.section=a.section,u}return e}(Gc),uv=function(){function t(e,n){this.pageNumber=1,this.id=e.id,this.settings=e.settings,this.styles=e.styles,this.hooks=e.hooks,this.columns=n.columns,this.head=n.head,this.body=n.body,this.foot=n.foot}return t.prototype.getHeadHeight=function(e){return this.head.reduce(function(n,r){return n+r.getMaxCellHeight(e)},0)},t.prototype.getFootHeight=function(e){return this.foot.reduce(function(n,r){return n+r.getMaxCellHeight(e)},0)},t.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},t.prototype.callCellHooks=function(e,n,r,i,a,l){for(var s=0,u=n;s<u.length;s++){var h=u[s],f=new cv(e,this,r,i,a,l),v=h(f)===!1;if(r.text=Array.isArray(r.text)?r.text:[r.text],v)return!1}return!0},t.prototype.callEndPageHooks=function(e,n){e.applyStyles(e.userStyles);for(var r=0,i=this.hooks.didDrawPage;r<i.length;r++){var a=i[r];a(new Gc(e,this,n))}},t.prototype.callWillDrawPageHooks=function(e,n){for(var r=0,i=this.hooks.willDrawPage;r<i.length;r++){var a=i[r];a(new Gc(e,this,n))}},t.prototype.getWidth=function(e){if(typeof this.settings.tableWidth=="number")return this.settings.tableWidth;if(this.settings.tableWidth==="wrap"){var n=this.columns.reduce(function(i,a){return i+a.wrappedWidth},0);return n}else{var r=this.settings.margin;return e-r.left-r.right}},t}(),F1=function(){function t(e,n,r,i,a){a===void 0&&(a=!1),this.height=0,this.raw=e,e instanceof L1&&(this.raw=e._element,this.element=e._element),this.index=n,this.section=r,this.cells=i,this.spansMultiplePages=a}return t.prototype.getMaxCellHeight=function(e){var n=this;return e.reduce(function(r,i){var a;return Math.max(r,((a=n.cells[i.index])===null||a===void 0?void 0:a.height)||0)},0)},t.prototype.hasRowSpan=function(e){var n=this;return e.filter(function(r){var i=n.cells[r.index];return i?i.rowSpan>1:!1}).length>0},t.prototype.canEntireRowFit=function(e,n){return this.getMaxCellHeight(n)<=e},t.prototype.getMinimumRowHeight=function(e,n){var r=this;return e.reduce(function(i,a){var l=r.cells[a.index];if(!l)return 0;var s=n.getLineHeight(l.styles.fontSize),u=l.padding("vertical"),h=u+s;return h>i?h:i},0)},t}(),R1=function(){function t(e,n,r){var i;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=n,this.section=r,this.raw=e;var a=e;e!=null&&typeof e=="object"&&!Array.isArray(e)?(this.rowSpan=e.rowSpan||1,this.colSpan=e.colSpan||1,a=(i=e.content)!==null&&i!==void 0?i:e,e._element&&(this.raw=e._element)):(this.rowSpan=1,this.colSpan=1);var l=a!=null?""+a:"",s=/\r\n|\r|\n/g;this.text=l.split(s)}return t.prototype.getTextPos=function(){var e;if(this.styles.valign==="top")e=this.y+this.padding("top");else if(this.styles.valign==="bottom")e=this.y+this.height-this.padding("bottom");else{var n=this.height-this.padding("vertical");e=this.y+n/2+this.padding("top")}var r;if(this.styles.halign==="right")r=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var i=this.width-this.padding("horizontal");r=this.x+i/2+this.padding("left")}else r=this.x+this.padding("left");return{x:r,y:e}}
200,t.prototype.getContentHeight=function(e,n){n===void 0&&(n=1.15);var r=Array.isArray(this.text)?this.text.length:1,i=this.styles.fontSize/e*n,a=r*i+this.padding("vertical");return Math.max(a,this.styles.minCellHeight)},t.prototype.padding=function(e){var n=al(this.styles.cellPadding,0);return e==="vertical"?n.top+n.bottom:e==="horizontal"?n.left+n.right:n[e]},t}(),hv=function(){function t(e,n,r){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=e,this.raw=n,this.index=r}return t.prototype.getMaxCustomCellWidth=function(e){for(var n=0,r=0,i=e.allRows();r<i.length;r++){var a=i[r],l=a.cells[this.index];l&&typeof l.styles.cellWidth=="number"&&(n=Math.max(n,l.styles.cellWidth))}return n},t}();function fv(t,e){dv(t,e);var n=[],r=0;e.columns.forEach(function(a){var l=a.getMaxCustomCellWidth(e);l?a.width=l:(a.width=a.wrappedWidth,n.push(a)),r+=a.width});var i=e.getWidth(t.pageSize().width)-r;i&&(i=Yc(n,i,function(a){return Math.max(a.minReadableWidth,a.minWidth)})),i&&(i=Yc(n,i,function(a){return a.minWidth})),i=Math.abs(i),!e.settings.horizontalPageBreak&&i>.1/t.scaleFactor()&&(i=i<1?i:Math.round(i),console.log("Of the table content, ".concat(i," units width could not fit page"))),gv(e),mv(e,t),pv(e)}function dv(t,e){var n=t.scaleFactor(),r=e.settings.horizontalPageBreak,i=C1(t,e);e.allRows().forEach(function(a){for(var l=0,s=e.columns;l<s.length;l++){var u=s[l],h=a.cells[u.index];if(h){var f=e.hooks.didParseCell;e.callCellHooks(t,f,h,a,u,null);var v=h.padding("horizontal");h.contentWidth=Xs(h.text,h.styles,t)+v;var b=Xs(h.text.join(" ").split(/[^\S\u00A0]+/),h.styles,t);if(h.minReadableWidth=b+h.padding("horizontal"),typeof h.styles.cellWidth=="number")h.minWidth=h.styles.cellWidth,h.wrappedWidth=h.styles.cellWidth;else if(h.styles.cellWidth==="wrap"||r===!0)h.contentWidth>i?(h.minWidth=i,h.wrappedWidth=i):(h.minWidth=h.contentWidth,h.wrappedWidth=h.contentWidth);else{var p=10/n;h.minWidth=h.styles.minCellWidth||p,h.wrappedWidth=h.contentWidth,h.minWidth>h.wrappedWidth&&(h.wrappedWidth=h.minWidth)}}}}),e.allRows().forEach(function(a){for(var l=0,s=e.columns;l<s.length;l++){var u=s[l],h=a.cells[u.index];if(h&&h.colSpan===1)u.wrappedWidth=Math.max(u.wrappedWidth,h.wrappedWidth),u.minWidth=Math.max(u.minWidth,h.minWidth),u.minReadableWidth=Math.max(u.minReadableWidth,h.minReadableWidth);else{var f=e.styles.columnStyles[u.dataKey]||e.styles.columnStyles[u.index]||{},v=f.cellWidth||f.minCellWidth;v&&typeof v=="number"&&(u.minWidth=v,u.wrappedWidth=v)}h&&(h.colSpan>1&&!u.minWidth&&(u.minWidth=h.minWidth),h.colSpan>1&&!u.wrappedWidth&&(u.wrappedWidth=h.minWidth))}})}function Yc(t,e,n){for(var r=e,i=t.reduce(function(p,S){return p+S.wrappedWidth},0),a=0;a<t.length;a++){var l=t[a],s=l.wrappedWidth/i,u=r*s,h=l.width+u,f=n(l),v=h<f?f:h;e-=v-l.width,l.width=v}if(e=Math.round(e*1e10)/1e10,e){var b=t.filter(function(p){return e<0?p.width>n(p):!0});b.length&&(e=Yc(b,e,n))}return e}function pv(t){for(var e={},n=1,r=t.allRows(),i=0;i<r.length;i++)for(var a=r[i],l=0,s=t.columns;l<s.length;l++){var u=s[l],h=e[u.index];if(n>1)n--,delete a.cells[u.index];else if(h)h.cell.height+=a.height,n=h.cell.colSpan,delete a.cells[u.index],h.left--,h.left<=1&&delete e[u.index];else{var f=a.cells[u.index];if(!f)continue;if(f.height=a.height,f.rowSpan>1){var v=r.length-i,b=f.rowSpan>v?v:f.rowSpan;e[u.index]={cell:f,left:b,row:a}}}}}function gv(t){for(var e=t.allRows(),n=0;n<e.length;n++)for(var r=e[n],i=null,a=0,l=0,s=0;s<t.columns.length;s++){var u=t.columns[s];if(l-=1,l>1&&t.columns[s+1])a+=u.width,delete r.cells[u.index];else if(i){var h=i;delete r.cells[u.index],i=null,h.width=u.width+a}else{var h=r.cells[u.index];if(!h)continue;if(l=h.colSpan,a=0,h.colSpan>1){i=h,a+=u.width;continue}h.width=u.width+a}}}function mv(t,e){for(var n={count:0,height:0},r=0,i=t.allRows();r<i.length;r++){for(var a=i[r],l=0,s=t.columns;l<s.length;l++){var u=s[l],h=a.cells[u.index];if(h){e.applyStyles(h.styles,!0);var f=h.width-h.padding("horizontal");if(h.styles.overflow==="linebreak")h.text=e.splitTextToSize(h.text,f+1/e.scaleFactor(),{fontSize:h.styles.fontSize});else if(h.styles.overflow==="ellipsize")h.text=Cf(h.text,f,h.styles,e,"...");else if(h.styles.overflow==="hidden")h.text=Cf(h.text,f,h.styles,e,"");else if(typeof h.styles.overflow=="function"){var v=h.styles.overflow(h.text,f);typeof v=="string"?h.text=[v]:h.text=v}h.contentHeight=h.getContentHeight(e.scaleFactor(),e.getLineHeightFactor());var b=h.contentHeight/h.rowSpan;h.rowSpan>1&&n.count*n.height<b*h.rowSpan?n={height:b,count:h.rowSpan}:n&&n.count>0&&n.height>b&&(b=n.height),b>a.height&&(a.height=b)}}n.count--}}function Cf(t,e,n,r,i){return t.map(function(a){return vv(a,e,n,r,i)})}function vv(t,e,n,r,i){var a=1e4*r.scaleFactor();if(e=Math.ceil(e*a)/a,e>=Xs(t,n,r))return t;for(;e<Xs(t+i,n,r)&&!(t.length<=1);)t=t.substring(0,t.length-1);return t.trim()+i}function O1(t,e){var n=new Ua(t),r=bv(e,n.scaleFactor()),i=new uv(e,r);return fv(n,i),n.applyStyles(n.userStyles),i}function bv(t,e){var n=t.content,r=yv(n.columns);if(n.head.length===0){var i=Ef(r,"head");i&&n.head.push(i)}if(n.foot.length===0){var i=Ef(r,"foot");i&&n.foot.push(i)}var a=t.settings.theme,l=t.styles;return{columns:r,head:Nc("head",n.head,r,l,a,e),body:Nc("body",n.body,r,l,a,e),foot:Nc("foot",n.foot,r,l,a,e)}}function Nc(t,e,n,r,i,a){var l={},s=e.map(function(u,h){for(var f=0,v={},b=0,p=0,S=0,k=n;S<k.length;S++){var C=k[S];if(l[C.index]==null||l[C.index].left===0)if(p===0){var _=void 0;Array.isArray(u)?_=u[C.index-b-f]:_=u[C.dataKey];var O={};typeof _=="object"&&!Array.isArray(_)&&(O=(_==null?void 0:_.styles)||{});var U=xv(t,C,h,i,r,a,O),R=new R1(_,U,t);v[C.dataKey]=R,v[C.index]=R,p=R.colSpan-1,l[C.index]={left:R.rowSpan-1,times:p}}else p--,b++;else l[C.index].left--,p=l[C.index].times,f++}return new F1(u,h,t,v)});return s}function Ef(t,e){var n={};return t.forEach(function(r){if(r.raw!=null){var i=wv(e,r.raw);i!=null&&(n[r.dataKey]=i)}}),Object.keys(n).length>0?n:null}function wv(t,e){if(t==="head"){if(typeof e=="object")return e.header||null;if(typeof e=="string"||typeof e=="number")return e}else if(t==="foot"&&typeof e=="object")return e.footer;return null}function yv(t){return t.map(function(e,n){var r,i;return typeof e=="object"?i=(r=e.dataKey)!==null&&r!==void 0?r:n:i=n,new hv(i,e,n)})}function xv(t,e,n,r,i,a,l){var s=Km(r),u;t==="head"?u=i.headStyles:t==="body"?u=i.bodyStyles:t==="foot"&&(u=i.footStyles);var h=ri({},s.table,s[t],i.styles,u),f=i.columnStyles[e.dataKey]||i.columnStyles[e.index]||{},v=t==="body"?f:{},b=t==="body"&&n%2===0?ri({},s.alternateRow,i.alternateRowStyles):{},p=Zm(a),S=ri({},p,h,b,v);return ri(S,l)}function _v(t,e,n){var r;n===void 0&&(n={});var i=C1(t,e),a=new Map,l=[],s=[],u=[];Array.isArray(e.settings.horizontalPageBreakRepeat)?u=e.settings.horizontalPageBreakRepeat:(typeof e.settings.horizontalPageBreakRepeat=="string"||typeof e.settings.horizontalPageBreakRepeat=="number")&&(u=[e.settings.horizontalPageBreakRepeat]),u.forEach(function(b){var p=e.columns.find(function(S){return S.dataKey===b||S.index===b});p&&!a.has(p.index)&&(a.set(p.index,!0),l.push(p.index),s.push(e.columns[p.index]),i-=p.wrappedWidth)});for(var h=!0,f=(r=n==null?void 0:n.start)!==null&&r!==void 0?r:0;f<e.columns.length;){if(a.has(f)){f++;continue}var v=e.columns[f].wrappedWidth;
200if(h||i>=v)h=!1,l.push(f),s.push(e.columns[f]),i-=v;else break;f++}return{colIndexes:l,columns:s,lastIndex:f-1}}function Nv(t,e){for(var n=[],r=0;r<e.columns.length;r++){var i=_v(t,e,{start:r});i.columns.length&&(n.push(i),r=i.lastIndex)}return n}function T1(t,e){var n=e.settings,r=n.startY,i=n.margin,a={x:i.left,y:r},l=e.getHeadHeight(e.columns)+e.getFootHeight(e.columns),s=r+i.bottom+l;if(n.pageBreak==="avoid"){var u=e.body,h=u.reduce(function(b,p){return b+p.height},0);s+=h}var f=new Ua(t);(n.pageBreak==="always"||n.startY!=null&&s>f.pageSize().height)&&(M1(f),a.y=i.top),e.callWillDrawPageHooks(f,a);var v=ri({},a);e.startPageNumber=f.pageNumber(),n.horizontalPageBreak?Sv(f,e,v,a):(f.applyStyles(f.userStyles),(n.showHead==="firstPage"||n.showHead==="everyPage")&&e.head.forEach(function(b){return ii(f,e,b,a,e.columns)}),f.applyStyles(f.userStyles),e.body.forEach(function(b,p){var S=p===e.body.length-1;Js(f,e,b,S,v,a,e.columns)}),f.applyStyles(f.userStyles),(n.showFoot==="lastPage"||n.showFoot==="everyPage")&&e.foot.forEach(function(b){return ii(f,e,b,a,e.columns)})),k1(f,e,v,a),e.callEndPageHooks(f,a),e.finalY=a.y,t.lastAutoTable=e,f.applyStyles(f.userStyles)}function Sv(t,e,n,r){var i=Nv(t,e),a=e.settings;if(a.horizontalPageBreakBehaviour==="afterAllRows")i.forEach(function(h,f){t.applyStyles(t.userStyles),f>0?Io(t,e,n,r,h.columns,!0):jf(t,e,r,h.columns),Av(t,e,n,r,h.columns),Sc(t,e,r,h.columns)});else for(var l=-1,s=i[0],u=function(){var h=l;if(s){t.applyStyles(t.userStyles);var f=s.columns;l>=0?Io(t,e,n,r,f,!0):jf(t,e,r,f),h=If(t,e,l+1,r,f),Sc(t,e,r,f)}var v=h-l;i.slice(1).forEach(function(b){t.applyStyles(t.userStyles),Io(t,e,n,r,b.columns,!0),If(t,e,l+1,r,b.columns,v),Sc(t,e,r,b.columns)}),l=h};l<e.body.length-1;)u()}function jf(t,e,n,r){var i=e.settings;t.applyStyles(t.userStyles),(i.showHead==="firstPage"||i.showHead==="everyPage")&&e.head.forEac
200h(function(a){return ii(t,e,a,n,r)})}function Av(t,e,n,r,i){t.applyStyles(t.userStyles),e.body.forEach(function(a,l){var s=l===e.body.length-1;Js(t,e,a,s,n,r,i)})}function If(t,e,n,r,i,a){t.applyStyles(t.userStyles),a=a??e.body.length;for(var l=Math.min(n+a,e.body.length),s=-1,u=e.body.slice(n,l),h=0;h<u.length;h++){var f=u[h],v=n+h===e.body.length-1,b=D1(t,e,v,r);if(f.canEntireRowFit(b,i))ii(t,e,f,r,i),s=n+h;else break}return s}function Sc(t,e,n,r){var i=e.settings;t.applyStyles(t.userStyles),(i.showFoot==="lastPage"||i.showFoot==="everyPage")&&e.foot.forEach(function(a){return ii(t,e,a,n,r)})}function Lv(t,e,n){var r=n.getLineHeight(t.styles.fontSize),i=t.padding("vertical"),a=Math.floor((e-i)/r);return Math.max(0,a)}function kv(t,e,n,r){var i={};t.spansMultiplePages=!0,t.height=0;for(var a=0,l=0,s=n.columns;l<s.length;l++){var u=s[l],h=t.cells[u.index];if(h){Array.isArray(h.text)||(h.text=[h.text]);var f=new R1(h.raw,h.styles,h.section);f=ri(f,h),f.text=[];var v=Lv(h,e,r);h.text.length>v&&(f.text=h.text.splice(v,h.text.length));var b=r.scaleFactor(),p=r.getLineHeightFactor();h.contentHeight=h.getContentHeight(b,p),h.contentHeight>=e&&(h.contentHeight=e,f.styles.minCellHeight-=e),h.contentHeight>t.height&&(t.height=h.contentHeight),f.contentHeight=f.getContentHeight(b,p),f.contentHeight>a&&(a=f.contentHeight),i[u.index]=f}}var S=new F1(t.raw,-1,t.section,i,!0);S.height=a;for(var k=0,C=n.columns;k<C.length;k++){var u=C[k],f=S.cells[u.index];f&&(f.height=S.height);var h=t.cells[u.index];h&&(h.height=t.height)}return S}function Pv(t,e,n,r){var i=t.pageSize().height,a=r.settings.margin,l=a.top+a.bottom,s=i-l;e.section==="body"&&(s-=r.getHeadHeight(r.columns)+r.getFootHeight(r.columns));var u=e.getMinimumRowHeight(r.columns,t),h=u<n;if(u>s)return console.log("Will not be able to print row ".concat(e.index," correctly since it's minimum height is larger than page height")),!0;if(!h)return!1;var f=e.hasRowSpan(r.columns),v=e.getMaxCellHeight(r.columns)>s;return v?(f&&console.log("The content of row ".concat(e.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(f||r.settings.rowPageBreak==="avoid")}function Js(t,e,n,r,i,a,l){var s=D1(t,e,r,a);if(n.canEntireRowFit(s,l))ii(t,e,n,a,l);else if(Pv(t,n,s,e)){var u=kv(n,s,e,t);ii(t,e,n,a,l),Io(t,e,i,a,l),Js(t,e,u,r,i,a,l)}else Io(t,e,i,a,l),Js(t,e,n,r,i,a,l)}function ii(t,e,n,r,i){r.x=e.settings.margin.left;for(var a=0,l=i;a<l.length;a++){var s=l[a],u=n.cells[s.index];if(!u){r.x+=s.width;continue}t.applyStyles(u.styles),u.x=r.x,u.y=r.y;var h=e.callCellHooks(t,e.hooks.willDrawCell,u,n,s,r);if(h===!1){r.x+=s.width;continue}Cv(t,u,r);var f=u.getTextPos();S1(u.text,f.x,f.y,{halign:u.styles.halign,valign:u.styles.valign,maxWidth:Math.ceil(u.width-u.padding("left")-u.padding("right"))},t.getDocument()),e.callCellHooks(t,e.hooks.didDrawCell,u,n,s,r),r.x+=s.width}r.y+=n.height}function Cv(t,e,n){var r=e.styles;if(t.getDocument().setFillColor(t.getDocument().getFillColor()),typeof r.lineWidth=="number"){var i=P1(r.lineWidth,r.fillColor);i&&t.rect(e.x,n.y,e.width,e.height,i)}else typeof r.lineWidth=="object"&&(r.fillColor&&t.rect(e.x,n.y,e.width,e.height,"F"),Ev(t,e,n,r.lineWidth))}function Ev(t,e,n,r){var i,a,l,s;r.top&&(i=n.x,a=n.y,l=n.x+e.width,s=n.y,r.right&&(l+=.5*r.right),r.left&&(i-=.5*r.left),u(r.top,i,a,l,s)),r.bottom&&(i=n.x,a=n.y+e.height,l=n.x+e.width,s=n.y+e.height,r.right&&(l+=.5*r.right),r.left&&(i-=.5*r.left),u(r.bottom,i,a,l,s)),r.left&&(i=n.x,a=n.y,l=n.x,s=n.y+e.height,r.top&&(a-=.5*r.top),r.bottom&&(s+=.5*r.bottom),u(r.left,i,a,l,s)),r.right&&(i=n.x+e.width,a=n.y,l=n.x+e.width,s=n.y+e.height,r.top&&(a-=.5*r.top),r.bottom&&(s+=.5*r.bottom),u(r.right,i,a,l,s));function u(h,f,v,b,p){t.getDocument().setLineWidth(h),t.getDocument().line(f,v,b,p,"S")}}function D1(t,e,n,r){var i=e.settings.margin.bottom,a=e.settings.showFoot;return(a==="everyPage"||a==="lastPage"&&n)&&(i+=e.getFootHeight(e.columns)),t.pageSize().height-r.y-i}function Io(t,e,n,r,i,a){i===void 0&&(i=[]),a===void 0&&(a=!1),t.applyStyles(t.userStyles),e.settings.showFoot==="everyPage"&&!a&&e.foot.forEach(function(s){return ii(t,e,s,r,i)}),e.callEndPageHooks(t,r);var l=e.settings.margin;k1(t,e,n,r),M1(t),e.pageNumber++,r.x=l.left,r.y=l.top,n.y=l.top,e.callWillDrawPageHooks(t,r),e.settings.showHead==="everyPage"&&(e.head.forEac
200h(function(s){return ii(t,e,s,r,i)}),t.applyStyles(t.userStyles))}function M1(t){var e=t.pageNumber();t.setPage(e+1);var n=t.pageNumber();return n===e?(t.addPage(),!0):!1}function jv(t){t.API.autoTable=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e[0],i=I1(this,r),a=O1(this,i);return T1(this,a),this},t.API.lastAutoTable=!1,t.API.autoTableText=function(e,n,r,i){S1(e,n,r,i,this)},t.API.autoTableSetDefaults=function(e){return Ua.setDefaults(e,this),this},t.autoTableSetDefaults=function(e,n){Ua.setDefaults(e,n)},t.API.autoTableHtmlToJson=function(e,n){var r;if(n===void 0&&(n=!1),typeof window>"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var i=new Ua(this),a=j1(i,e,window,n,!1),l=a.head,s=a.body,u=((r=l[0])===null||r===void 0?void 0:r.map(function(h){return h.content}))||[];return{columns:u,rows:s,data:s}}}var Ac;function Iv(t,e){var n=I1(t,e),r=O1(t,n);T1(t,r)}try{if(typeof window<"u"&&window){var Ff=window,Rf=Ff.jsPDF||((Ac=Ff.jspdf)===null||Ac===void 0?void 0:Ac.jsPDF);Rf&&jv(Rf)}}catch(t){console.error("Could not apply autoTable plugin",t)}const Fv=["Propio","Estacionado","Compartido"],Rv=new Set(Fv);function Ov(t){return!t||t.status!=="available"?!1:Rv.has(t.ownership_type??"")}function Tv(t){return t.filter(Ov)}const Dv="https://svpfonykqarvvghanoaa.supabase.co/storage/v1/object/public/assets//[email protected]";async function Mv(){try{const t=new Image;t.crossOrigin="anonymous",t.src=Dv,await new Promise((i,a)=>{t.onload=()=>i(),t.onerror=()=>a(new Error("logo load failed"))});const e=document.createElement("canvas");e.width=t.naturalWidth,e.height=t.naturalHeight;const n=e.getContext("2d");return n?(n.drawImage(t,0,0),{data:e.toDataURL("image/png"),w:e.width,h:e.height}):null}catch{return null}}function Bv(t){return!t||t<=0||t===1e3?"":`$ ${t.toLocaleString("es-AR")}`}async function qv(t,e,n){const r=new te({orientation:"portrait",unit:"pt",format:"a4"}),i=r.internal.pageSize.getWidth(),a=r.internal.pageSize.getHeight(),l=64,s=await Mv(),u=80;if(r.setFillColor(15,17,19),r.rect(0,0,i,u,"F"),s){const R=48*(s.w/s.h);r.addImage(s.data,"PNG",l,16,R,48)}r.setTextColor(255,255,255),r.setFont("helvetica","bold"),r.setFontSize(9),r.text("Lista de equipos",i-l,16,{align:"right"}),r.setFont("helvetica","normal"),r.setFontSize(8);const h=new Date().toLocaleDateString("es-AR",{day:"2-digit",month:"2-digit",year:"numeric"});r.text(h,i-l,32,{align:"right"}),r.setTextColor(20,20,20);const f=[...e].sort((O,U)=>(O.order_index??999)-(U.order_index??999)),v=Tv(t),b=[];for(const O of f){const U=v.filter($=>$.category_id===O.id);if(U.length===0)continue;const R=Zf(n.filter($=>$.category_id===O.id),$=>U.filter(D=>D.subcategory_id===$),O),nt=[],dt=$=>[...$].sort((D,J)=>{const x=(D.name||"").trim(),j=(J.name||"").trim();return!x&&!j?0:x?j?x.localeCompare(j,"es",{sensitivity:"base"}):-1:1}).map(D=>({name:D.name||"",price:Bv(D.price_per_day)}));for(const $ of R){const D=U.filter(J=>J.subcategory_id===$.id);D.length!==0&&nt.push({sub:$,rows:dt(D)})}const et=U.filter($=>!$.subcategory_id||!R.find(D=>D.id===$.subcategory_id));et.length>0&&nt.push({sub:null,rows:dt(et)}),nt.length>0&&b.push({cat:O,subs:nt})}let p=u+16;const S=O=>{p+O>a-48&&(r.addPage(),p=16)},k=60,C=20;b.forEach((O,U)=>{var R;r.setFillColor(153,27,27),r.rect(0,p,i,k,"F"),r.setFont("helvetica","bold"),r.setFontSize(16),r.setTextColor(255,255,255),r.text(O.cat.name.toUpperCase(),l,p+k/2+2),p+=k+12;for(const nt of O.subs)p+=4,S(C+20),nt.sub&&(r.setFillColor(229,231,235),r.rect(l,p-4,i-l*2,C,"F"),r.setFont("helvetica","bold"),r.setFontSize(12),r.setTextColor(153,27,27),r.text(nt.sub.name.toUpperCase(),l+4,p+C/2+1),p+=C+8),Iv(r,{startY:p,margin:{left:l,right:l},body:nt.rows.map(dt=>[dt.name,dt.price]),theme:"plain",styles:{font:"helvetica",fontSize:10,textColor:[30,30,30],cellPadding:{top:3,right:6,bottom:3,left:0},lineWidth:0},columnStyles:{0:{cellWidth:"auto"},1:{cellWidth:90,halign:"right"}}}),p=(((R=r.lastAutoTable)==null?void 0:R.finalY)??p)+10});const _=r.getNumberOfPages();for(let O=1;O<=_;O++)r.setPage(O),r.setFont("helvetica","normal"),r.setFontSize(8),r.setTextColor(140,140,140),r.text(`${O} / ${_}`,i-l,a-24,{align:"right"});r.save("equipos-ala-norte.pdf")}const zv=()=>{const[t,e]=L0(),{equipment:n,categories:r,subcategories:i,loading:a}=n2(),[l,s]=kt.useState(""),[u,h]=kt.useState([]),[f,v]=kt.useState(null),[b,p]=kt.useState(!1),[S,k]=kt.useState(null),[C,_]=kt.useState(!1),[O,U]=kt.useState(!0),[R,nt]=kt.useState(!1),[dt,et]=kt.useState("list"),[$,D]=kt.useState("alphabetic"),[J,x]=kt.useState(!0),[j,W]=kt.useState(!1),[q,Q]=kt.useState(!1),{addItem:ct,items:at,calculateSubtotal:K,updateQuantity:ht,removeItem:At}=Of(),{toast:pt}=Tf(),{isMobile:A,isVisible:z}=k0();kt.useEffect(()=>{const ot=t.get("id");if(ot&&n.length>0&&!a){const Ct=n.find(Rt=>Rt.id===ot);Ct&&(v(Ct),p(!0))}},[t,n,a]),kt.useEffect(()=>{if(!a&&r.length>0&&!R){const ot=setTimeout(()=>{U(!1),nt(!0)},1800);return()=>clearTimeout(ot)}},[a,r,R]),kt.useEffect(()=>{if(q)return;const ot=setInterval(()=>{W(!0),setTimeout(()=>W(!1),2e3)},6e3);return()=>clearInterval(ot)},[q]);const H=ot=>{if(p(ot),!ot){const Ct=new URLSearchParams(t);Ct.delete("id"),e(Ct,{replace:!0})}},G=kt.useMemo(()=>A?0:z?64:0,[A,z]),Z=kt.useRef(new Map),it=kt.useRef(null);kt.useEffect(()=>{r.length>0&&!S&&k(r[0].id)},[r,S]);const ut=kt.useCallback(ot=>{const Ct=at.find(Rt=>Rt.id===ot);return(Ct==null?void 0:Ct.quantity)||0}
200,[at]),ft=kt.useCallback(ot=>{const Ct=ut(ot.id),Rt=ot.stock_quantity??1;return Ct<Rt},[ut]),vt=kt.useMemo(()=>n.filter(ot=>ot.status==="available"||ot.ownership_type==="Estacionado"),[n]),St=kt.useMemo(()=>new P0(vt,{keys:["name","brand","model","description"],threshold:.45,ignoreLocation:!0,minMatchCharLength:2,includeScore:!0}),[vt]),Pt=l.trim().length>=2,wt=kt.useMemo(()=>(Pt?St.search(l.trim()).map(Ct=>Ct.item):vt).filter(Ct=>u.length===0||Ct.subcategory_id&&u.includes(Ct.subcategory_id)),[vt,St,l,u,Pt]),Kt=kt.useMemo(()=>{if(!Pt)return new Set;const ot=new Set;return wt.forEach(Ct=>{Ct.subcategory_id&&ot.add(Ct.subcategory_id)}),ot},[wt,Pt]),F=kt.useMemo(()=>{if(!Pt)return new Set;const ot=new Set;return wt.forEach(Ct=>{Ct.subcategory_id?Ct.category_id&&ot.add(Ct.category_id):ot.add("otros-virtual")}),ot},[wt,Pt]),It=kt.useMemo(()=>{const ot=[...wt];return ot.sort((Ct,Rt)=>{const ie=i.find(jt=>jt.id===Ct.subcategory_id),ue=i.find(jt=>jt.id===Rt.subcategory_id),ke=(ie==null?void 0:ie.order_index)??999,Jt=(ue==null?void 0:ue.order_index)??999;if(ke!==Jt)return ke-Jt;switch($){case"alphabetic":return Ct.name.localeCompare(Rt.name);case"price-asc":return(Ct.price_per_day||0)-(Rt.price_per_day||0);case"price-desc":return(Rt.price_per_day||0)-(Ct.price_per_day||0);case"available-first":{const jt=Ct.status==="available"?0:1,Et=Rt.status==="available"?0:1;return jt!==Et?jt-Et:Ct.name.localeCompare(Rt.name)}case"unavailable-first":{const jt=Ct.status==="available"?1:0,Et=Rt.status==="available"?1:0;return jt!==Et?jt-Et:Ct.name.localeCompare(Rt.name)}default:return Ct.name.localeCompare(Rt.name)}}),ot},[wt,$,i]),le="otros-virtual",zt=kt.useMemo(()=>{const ot={id:le,name:"Otros",slug:"otros",order_index:9999};return[...r,ot]},[r]),xt=kt.useMemo(()=>{const ot={};return r.forEach(Ct=>{ot[Ct.id]=It.filter(Rt=>Rt.category_id===Ct.id&&Rt.subcategory_id)}),ot[le]=It.filter(Ct=>!Ct.subcategory_id),ot},[It,r]),ee=kt.useMemo(()=>{if(!S)return zt;const ot=zt.find(Rt=>Rt.id===S),Ct=zt.filter(Rt=>Rt.id!==S);return ot?[ot,...Ct]:zt},[zt,S]),Tt=kt.useMemo(()=>{const ot={};return zt.forEach(Ct=>{var Rt;ot[Ct.id]=((Rt=xt[Ct.id])==null?void 0:Rt.length)||0}),ot},[xt,zt]),Vt=kt.useMemo(()=>S?i.filter(ot=>ot.category_id===S):i,[i,S]),Xt=kt.useRef(null),ye=ot=>{u.includes(ot)?h(u.filter(Ct=>Ct!==ot)):h([...u,ot]),setTimeout(()=>{const Ct=document.getElementById(`subcategory-${ot}`);if(Ct){const Rt=G+60,ie=Ct.getBoundingClientRect().top+window.scrollY-Rt;window.scrollTo({top:ie,behavior:"smooth"})}},100)},me=ot=>{if(!ft(ot)){pt({title:"Stock máximo alcanzado",description:`Solo hay ${ot.stock_quantity} unidades disponibles de ${ot.name}`,variant:"destructive"});return}ct({id:ot.id,name:ot.name,brand:ot.brand||void 0,pricePerDay:ot.price_per_day,imageUrl:ot.image_url||void 0,stockQuantity:ot.stock_quantity},1),pt({title:"Agregado a cotización",description:`${ot.name} agregado`})},re=ot=>{v(ot),p(!0)},de=ot=>{k(ot),h([]),s(""),_(!1),Z.current.forEach((Ct,Rt)=>{Rt===ot?Ct.expand():Ct.collapse()})},we=ot=>{k(ot),h([]),s(""),_(!1),Z.current.forEach((Ct,Rt)=>{Rt!==ot&&Ct.collapse()})};l.length>0||u.length>0;const Bt=0;return I.jsxs("div",{className:"min-h-screen bg-background",children:[I.jsx(E0,{title:"Rental de equipos audiovisuales — Cámaras, ópticas, luces | Ala Norte",description:"Catálogo completo de cámaras, ópticas, iluminación, grip y sonido para alquiler. Equipamiento profesional curado para cine, publicidad y contenidos.",path:"/equipos"}),I.jsx(u2,{categories:zt,onCategoryChange:de,activeCategory:S}),I.jsx("div",{className:"sticky z-[50] backdrop-blur-sm transition-all duration-300 ",style:{top:`${G}px`},children:I.jsxs("div",{className:"container mx-auto py-0 items-center px-0 bg-foreground",children:[I.jsx("div",{className:"flex items-center gap-2 mb-2",children:I.jsx("div",{className:"min-w-screen flex-wrap flex-1 pt-4 flex items-center justify-center py-0 my-0 pb-[16px] gap-[24px] pl-[16px] pr-[16px] px-[16px] bg-inherit",children:zt.map(ot=>{const Ct=Tt[ot.id]||0,Rt=S===ot.id;return I.jsxs("button",{onClick:()=>de(ot.id),className:qe("flex-wrap flex-1 py-1.5 font-heading uppercase transition-all whitespace-nowrap px-[12px] font-bold border-0 rounded-sm text-lg",Rt?"bg-primary text-primary-foreground shadow-brutal-sm border-primary":"bg-background text-foreground hover:bg-foreground hover:text-background border-foreground
200/20"),children:[I.jsx("span",{children:ot.name}),Ct>0]},ot.id)})})}),I.jsx("div",{ref:it,children:I.jsxs(Yu,{open:O,onOpenChange:U,children:[I.jsx("div",{className:"pb-2",children:I.jsxs("button",{onClick:()=>{U(!O),Q(!0),W(!1)},className:qe("gap-1 font-heading uppercase transition-colors cursor-pointer text-base font-bold flex items-center justify-center px-[16px] text-primary",j&&"text-background"),children:[O?I.jsx(Xc,{className:"h-3 w-3"}):I.jsx(tl,{className:"h-3 w-3"}),"Subcategorías",u.length>0&&I.jsx("span",{className:"ml-1 text-[10px] text-primary-foreground px-1.5 rounded-sm bg-accent-foreground",children:u.length})]})}),I.jsx(Zu,{children:I.jsx("div",{className:"pb-4 mx-0",children:Vt.length===0?I.jsx("p",{className:"text-xs text-muted-foreground px-4",children:"No hay subcategorías para esta categoría"}):I.jsx("div",{className:"flex flex-wrap gap-2 px-4",children:Vt.map(ot=>I.jsx("button",{onClick:()=>ye(ot.id),className:qe("flex-1 min-w-fit font-heading uppercase transition-all text-center px-[12px] py-[4px] bg-transparent border border-transparent rounded-sm text-sm text-background font-semibold",u.includes(ot.id)?"bg-primary text-primary-foreground border-primary":"bg-transparent text-background hover:bg-foreground hover:text-background border-background/20"),children:ot.name},ot.id))})})})]})}),I.jsxs("div",{className:"flex-wrap flex-1 obje flex items-center justify-center text-background gap-[12px] py-[12px]",children:[I.jsxs("p",{className:"text-xs font-heading uppercas mx-0 text-background",children:["Mostrando ",wt.length," equipos"]}),I.jsxs(Y0,{value:$,onValueChange:ot=>D(ot),children:[I.jsxs(Z0,{className:"w-[140px] sm:w-[160px] h-8 text-xs  text-background  bg-primary font-heading",children:[I.jsx($0,{className:"h-3 w-3 mr-1"}),I.jsx(K0,{placeholder:"Ordenar"})]}),I.jsxs(X0,{className:"z-50",children:[I.jsx(Wl,{value:"alphabetic",className:"font-heading text-xs",children:"Alfabético"}),I.jsx(Wl,{value:"price-asc",className:"font-heading text-xs",children:"Precio: menor a mayor"}),I.jsx(Wl,{value:"price-desc",className:"font-heading text-xs",children:"Precio: mayor a menor"})]})]}),I.jsx($2,{viewMode:dt,onViewModeChange:et}),I.jsxs($n,{variant:"ghost",size:"sm",onClick:()=>{_(!C),O&&U(!1)},className:qe("h-8 px-2 flex-shrink-0 bg-inherit text-inherit border-0 rounded-sm",C&&"bg-primary text-primary-foreground"),children:[I.jsx(Gu,{className:"h-4 w-4"}),I.jsx("span",{className:"ml-1 text-xs hidden sm:inline text-inherit",children:"Buscar"})]}),I.jsxs($n,{variant:"ghost",size:"sm",onClick:()=>qv(n,r,i),className:"h-8 px-2 flex-shrink-0 bg-inherit text-inherit border-0 rounded-sm",title:"Descargar lista completa en PDF",children:[I.jsx(J0,{className:"h-4 w-4"}),I.jsx("span",{className:"ml-1 text-xs hidden sm:inline text-inherit",children:"Descargar PDF"})]})]}),I.jsx(Yu,{open:C,children:I.jsx(Zu,{children:I.jsx("div",{className:"pb-4",children:I.jsxs("div",{className:"relative",children:[I.jsx(Gu,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),I.jsx(C0,{type:"text",placeholder:"Buscar equipos...",value:l,onChange:ot=>s(ot.target.value),className:"pl-10 font-heading uppercase text-sm my-[16px] px-[32px] mx-[24px]",autoFocus:!0}),l&&I.jsx("button",{onClick:()=>s(""),className:"absolute right-3 top-1/2 -translate-y-1/2",children:I.jsx(Va,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})})]})})})})]})}),I.jsx("div",{className:"pb-4 sm:pb-6 bg-[#151719]",children:I.jsxs("div",{className:qe("grid gap-4 lg:gap-6 py-[16px] ml-0 pl-[16px] pr-[16px] px-0 bg-foreground transition-all duration-500",J?"lg:grid-cols-4":"lg:grid-cols-1"),children:[I.jsx("main",{ref:Xt,className:qe("transition-all duration-500",J?"lg:col-span-3":"lg:col-span-1"),children:a?I.jsx("div",{className:"text-center py-12 sm:py-16 border p-8 sm:p-12",children:I.jsx("p",{className:"text-xl sm:text-2xl font-heading",children:"CARGANDO..."})}):I.jsx("div",{className:"space-y-4 sm:space-y-6 bg-transparent",children:ee.filter(ot=>!Pt||F.has(ot.id)).map((ot,Ct)=>I.jsx(Kf,{ref:Rt=>{Rt?Z.current.set(ot.id,Rt):Z.current.delete(ot.id)},category:ot,equipment:xt[ot.id]||[],subcategories:i.filter(Rt=>Rt.category_id===ot.id),onAddToCart:me,onViewDetails:re,getCartQuantity:ut,canAddMore:ft,stickyTop:Bt,defaultExpanded:Pt?F.has(ot.id):Ct===0,onCategoryActivate:we,viewMode:dt,sortOption:$,onSubcategorySelect:ye,selectedSubcategories:u,forceExpandSubcategories:Pt?Kt:void 0},ot.id))})}),I.jsx("aside",{className:qe("hidden lg:block shadow-none pr-0 relative transition-all duration-500 ease-in-out origin-bottom-right",J?"lg:col-span-1 opacity-100 scale-100 pointer-events-auto":"lg:col-span-0 w-0 opacity-0 scale-0 pointer-events-none overflow-hidden"),style:{transformOrigin:"calc(100% - 24px) calc(100% - 72px)"},children:I.jsx(ih,{items:at,calculateSubtotal:K,updateQuantity:ht,removeItem:At,stickyTop:80,onCollapse:()=>x(!1)})}),I.jsxs("button",{onClick:()=>x(!0),className:qe("hidden fixed right-6 bottom-[72px] z-40 bg-primary text-primary-foreground p-3 rounded-sm shadow-brutal-sm items-center gap-1 lg:flex flex-col transition-all duration-500 ease-in-out",J?"scale-0 opacity-0 pointer-events-none":"scale-100 opacity-100 pointer-events-auto"),title:"Mostrar presupuesto",children:[I.jsx(Lc,{className:"w-5 h-5"}),at.length>0&&I.jsx("span",{className:"bg-foreground text-background text-xs font-bold w-5 h-5 flex items-center justify-center rounded-sm",children:at.reduce((ot,Ct)=>ot+Ct.quantity,0)})]}),I.jsx("div",{className:"lg:hidden",children:I.jsx(ih,{items:at,calculateSubtotal:K,updateQuantity:ht,removeItem:At})})]})}),I.jsx(s2,{equipment:f,open:b,onOpenChange:H,onAddToCart:me,getCartQuantity:ut,canAddMore:ft,onViewDetails:ot=>{v(ot)}})]})},nb=Object.freeze(Object.defineProperty({__proto__:null,default:zv},Symbol.toStringTag,{value:"Module"}));
200export{nb as E,je as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.