1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-CuPw5oaS.js","assets/react-vendor-CwXSfBur.js","assets/ui-vendor-LszLD2_t.js","assets/query-vendor-C2R318ll.js"])))=>i.map(i=>d[i]); 2var e,t=Object.defineProperty,r=(e,r,n)=>((e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n)(e,"symbol"!=typeof r?r+"":r,n);import{j as n,V as i,R as s,A as a,C as o,T as l,D as c,P as u,S as h,_ as d,t as f,a as p,b as m,c as g,d as b,u as v,e as w,f as y,g as _,h as x,i as k,O as N,k as S,l as A,m as L,n as j,o as P,p as E}from"./ui-vendor-LszLD2_t.js";import{a as I,r as T,R as O,v as C,g as R,L as F,u as B,c as D,d as M,e as U,B as q,f as z,h as $}from"./react-vendor-CwXSfBur.js";import{Q as W,a as H}from"./query-vendor-C2R318ll.js";function V(e,t){for(var r=0;r<t.length;r++){const n=t[r];if("string"!=typeof n&&!Array.isArray(n))for(const t in n)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(n,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const r of e)if("childList"===r.type)for(const e of r.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var G=I;e=G.createRoot,G.hydrateRoot;let K=0;const J=new Map,Y=e=>{if(J.has(e))return;const t=setTimeout(()=>{J.delete(e),ee({type:"REMOVE_TOAST",toastId:e})},1e6);J.set(e,t)},Z=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Y(r):e.toasts.forEach(e=>{Y(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},X=[];let Q={toasts:[]};function ee(e){Q=Z(Q,e),X.forEach(e=>{e(Q)})}function te({...e}){const t=(K=(K+1)%Number.MAX_SAFE_INTEGER,K.toString()),r=()=>ee({type:"DISMISS_TOAST",toastId:t});return ee({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:e=>ee({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function re(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=re(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ne(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=re(e))&&(n&&(n+=" "),n+=t);return n}const ie=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,se=ne,ae=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return se(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(e=>{const t=null==r?void 0:r[e],n=null==s?void 0:s[e];if(null===t)return null;const a=ie(t)||ie(n);return i[e][a]}),o=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),l=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...s,...o}[t]):{...s,...o}[t]===r})?[...e,r,n]:e},[]);return se(e,a,l,null==r?void 0:r.class,null==r?void 0:r.className)},oe=(...e)=>e.filter((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(); 3/** 4 * @license lucide-react v0.462.0 - ISC 5 * 6 * This source code is licensed under the ISC license. 7 * See the LICENSE file in the root directory of this source tree. 8 */ 9var le={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}; 10/** 11 * @license lucide-react v0.462.0 - ISC 12 * 13 * This source code is licensed under the ISC license. 14 * See the LICENSE file in the root directory of this source tree. 15 */const ce=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:s,iconNode:a,...o},l)=>T.createElement("svg",{ref:l,...le,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:oe("lucide",i),...o},[...a.map(([e,t])=>T.createElement(e,t)),...Array.isArray(s)?s:[s]])),ue=(e,t)=>
vendor: 5,180 bytes, line 15
15{const r=T.forwardRef(({className:r,...n},i)=>{return T.createElement(ce,{ref:i,iconNode:t,className:oe(`lucide-${s=e,s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n});var s});return r.displayName=`${e}`,r},he=ue("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),de=ue("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),fe=ue("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),pe=ue("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),me=ue("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),ge=ue("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]),be=ue("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),ve=ue("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),we=ue("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),ye=ue("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),_e=ue("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),xe=ue("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),ke=ue("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),Ne=ue("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Se=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ae=ue("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Le=e=>{const t=Ie(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),je(r,t)||Ee(e)},getConflictingClassGroupIds:(e,t)=>{const i=r[e]||[];return t&&n[e]?[...i,...n[e]]:i}}},je=(e,t)=>{var r;if(0===e.length)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?je(e.slice(1),i):void 0;if(s)return s;if(0===t.validators.length)return;const a=e.join("-");return null==(r=t.validators.find(({validator:e})=>e(a)))?void 0:r.classGroupId},Pe=/^\[(.+)\]$/,Ee=e=>{if(Pe.test(e)){const t=Pe.exec(e)[1],r=null==t?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ie=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Re(Object.entries(e.classGroups),r).forEach(([e,r])=>{Te(r,n,e,t)}),n},Te=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Oe(t,e)).classGroupId=r)}if("function"==typeof e)return Ce(e)?void Te(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,i])=>{Te(i,Oe(t,e),r,n)})})},Oe=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},Ce=e=>e.isThemeGetter,Re=(e,t)=>t?e.map(([e,r])=>[e,r.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,r])=>[t+e,r])):e)]):e,Fe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(i(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):i(e,t)}}},Be=e=>{const{separator:t,experimentalParseClassName:r}=e,n=1===t.length,i=t[0],s=t.length,a=e=>{const r=[];let a,o=0,l=0;for(let h=0;h<e.length;h++){let c=e[h];if(0===o){if(c===i&&(n||e.slice(h,h+s)===t)){r.push(e.slice(l,h)),l=h+s;continue}if("/"===c){a=h;continue}}"["===c?o++:"]"===c&&o--}const c=0===r.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:r,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return r?e=>r({className:e,parseClassName:a}):a},De=e=>{if(e.length<=1)return e;const t=[];let r=[];
vendor: 5,190 bytes, lines 15-21
15return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t},Me=/\s+/; 16/** 17 * @license lucide-react v0.462.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */function Ue(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=qe(e))&&(n&&(n+=" "),n+=t);return n}const qe=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=qe(e[n]))&&(r&&(r+=" "),r+=t);return r};function ze(e,...t){let r,n,i,s=function(o){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:Fe(e.cacheSize),parseClassName:Be(e),...Le(e)}))(l),n=r.cache.get,i=r.cache.set,s=a,a(o)};function a(e){const t=n(e);if(t)return t;const s=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,s=[],a=e.trim().split(Me);let o="";for(let l=a.length-1;l>=0;l-=1){const e=a[l],{modifiers:t,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:h}=r(e);let d=Boolean(h),f=n(d?u.substring(0,h):u);if(!f){if(!d){o=e+(o.length>0?" "+o:o);continue}if(f=n(u),!f){o=e+(o.length>0?" "+o:o);continue}d=!1}const p=De(t).join(":"),m=c?p+"!":p,g=m+f;if(s.includes(g))continue;s.push(g);const b=i(f,d);for(let r=0;r<b.length;++r){const e=b[r];s.push(m+e)}o=e+(o.length>0?" "+o:o)}return o})(e,r);return i(e,s),s}return function(){return s(Ue.apply(null,arguments))}}const $e=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},We=/^\[(?:([a-z-]+):)?(.+)\]$/i,He=/^\d+\/\d+$/,Ve=new Set(["px","full","screen"]),Ge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ke=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Je=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ze=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xe=e=>et(e)||Ve.has(e)||He.test(e),Qe=e=>ft(e,"length",pt),et=e=>Boolean(e)&&!Number.isNaN(Number(e)),tt=e=>ft(e,"number",et),rt=e=>Boolean(e)&&Number.isInteger(Number(e)),nt=e=>e.endsWith("%")&&et(e.slice(0,-1)),it=e=>We.test(e),st=e=>Ge.test(e),at=new Set(["length","size","percentage"]),ot=e=>ft(e,at,mt),lt=e=>ft(e,"position",mt),ct=new Set(["image","url"]),ut=e=>ft(e,ct,bt),ht=e=>ft(e,"",gt),dt=()=>!0,ft=(e,t,r)=>{const n=We.exec(e);return!!n&&(n[1]?"string"==typeof t?n[1]===t:t.has(n[1]):r(n[2]))},pt=e=>Ke.test(e)&&!Je.test(e),mt=()=>!1,gt=e=>Ye.test(e),bt=e=>Ze.test(e),vt=ze(()=>{const e=$e("colors"),t=$e("spacing"),r=$e("blur"),n=$e("brightness"),i=$e("borderColor"),s=$e("borderRadius"),a=$e("borderSpacing"),o=$e("borderWidth"),l=$e("contrast"),c=$e("grayscale"),u=$e("hueRotate"),h=$e("invert"),d=$e("gap"),f=$e("gradientColorStops"),p=$e("gradientColorStopPositions"),m=$e("inset"),g=$e("margin"),b=$e("opacity"),v=$e("padding"),w=$e("saturate"),y=$e("scale"),_=$e("sepia"),x=$e("skew"),k=$e("space"),N=$e("translate"),S=()=>["auto",it,t],A=()=>[it,t],L=()=>["",Xe,Qe],j=()=>["auto",et,it],P=()=>["","0",it],E=()=>[et,it];return{cacheSize:500,separator:":",theme:{colors:[dt],spacing:[Xe,Qe],blur:["none","",st,it],brightness:E(),borderColor:[e],borderRadius:["none","","full",st,it],borderSpacing:A(),borderWidth:L(),contrast:E(),grayscale:P(),hueRotate:E(),invert:P(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[nt,Qe],inset:S(),margin:S(),opacity:E(),padding:A(),saturate:E(),scale:E(),sepia:P(),skew:E(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",it]}],container:["container"],columns:[{columns:[st]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",it]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}
vendor: 5,048 bytes, line 21
21],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",rt,it]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",it]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",rt,it]}],"grid-cols":[{"grid-cols":[dt]}],"col-start-end":[{col:["auto",{span:["full",rt,it]},it]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[dt]}],"row-start-end":[{row:["auto",{span:[rt,it]},it]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",it]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",it]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",it,t]}],"min-w":[{"min-w":[it,t,"min","max","fit"]}],"max-w":[{"max-w":[it,t,"none","full","min","max","fit","prose",{screen:[st]},st]}],h:[{h:[it,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[it,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[it,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[it,t,"auto","min","max","fit"]}],"font-size":[{text:["base",st,Qe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tt]}],"font-family":[{font:[dt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",it]}],"line-clamp":[{"line-clamp":["none",et,tt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xe,it]}],"list-image":[{"list-image":["none",it]}],"list-style-type":[{list:["none","disc","decimal",it]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xe,Qe]}],"underline-offset":[{"underline-offset":["auto",Xe,it]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",it]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",it]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",lt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ot]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ut]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}
vendor: 4,377 bytes, line 21
21],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Xe,it]}],"outline-w":[{outline:[Xe,Qe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Xe,Qe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",st,ht]}],"shadow-color":[{shadow:[dt]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",st,it]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",it]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",it]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",it]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[rt,it]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[x]}],"skew-y":[{"skew-y":[x]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",it]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","
21none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",it]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",it]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xe,Qe,tt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function wt(...e){return vt(ne(e))}const yt=u,_t=T.forwardRef(({className:e,...t},r)=>n.jsx(i,{ref:r,className:wt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));_t.displayName=i.displayName;const xt=ae("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),kt=T.forwardRef(({className:e,variant:t,...r},i)=>n.jsx(s,{ref:i,className:wt(xt({variant:t}),e),...r}));kt.displayName=s.displayName;T.forwardRef(({className:e,...t},r)=>n.jsx(a,{ref:r,className:wt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t})).displayName=a.displayName;const Nt=T.forwardRef(({className:e,...t},r)=>n.jsx(o,{ref:r,className:wt("absolute right-2 top-2 rounded-md p-1 text-foreground
21/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:n.jsx(Se,{className:"h-4 w-4"})}));Nt.displayName=o.displayName;const St=T.forwardRef(({className:e,...t},r)=>n.jsx(l,{ref:r,className:wt("text-sm font-semibold",e),...t}));St.displayName=l.displayName;const At=T.forwardRef(({className:e,...t},r)=>n.jsx(c,{ref:r,className:wt("text-sm opacity-90",e),...t}));function Lt(){const{toasts:e}=function(){const[e,t]=T.useState(Q);return T.useEffect(()=>(X.push(t),()=>{const e=X.indexOf(t);e>-1&&X.splice(e,1)}),[e]),{...e,toast:te,dismiss:e=>ee({type:"DISMISS_TOAST",toastId:e})}}();return n.jsxs(yt,{children:[e.map(function({id:e,title:t,description:r,action:i,...s}){return n.jsxs(kt,{...s,children:[n.jsxs("div",{className:"grid gap-1",children:[t&&n.jsx(St,{children:t}),r&&n.jsx(At,{children:r})]}),i,n.jsx(Nt,{})]},e)}),n.jsx(_t,{})]})}At.displayName=c.displayName;var jt=Array(12).fill(0),Pt=({visible:e,className:t})=>O.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},O.createElement("div",{className:"sonner-spinner"},jt.map((e,t)=>O.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),Et=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),It=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Tt=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Ot=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Ct=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Rt=1,Ft=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,i="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:Rt++,s=this.toasts.find(e=>e.id===i),a=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:r}),{...t,...e,id:i,dismissible:a,title:r}):t):this.addToast({title:r,...n,dismissible:a,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}
21),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;void 0!==t.loading&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));let n,i=e instanceof Promise?e:e(),s=void 0!==r,a=i.then(async e=>{if(n=["resolve",e],O.isValidElement(e))s=!1,this.create({id:r,type:"default",message:e});else if(Bt(e)&&!e.ok){s=!1;let n="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,i="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:r,type:"error",message:n,description:i})}else if(void 0!==t.success){s=!1;let n="function"==typeof t.success?await t.success(e):t.success,i="function"==typeof t.description?await t.description(e):t.description;this.create({id:r,type:"success",message:n,description:i})}}).catch(async e=>{if(n=["reject",e],void 0!==t.error){s=!1;let n="function"==typeof t.error?await t.error(e):t.error,i="function"==typeof t.description?await t.description(e):t.description;this.create({id:r,type:"error",message:n,description:i})}}).finally(()=>{var e;s&&(this.dismiss(r),r=void 0),null==(e=t.finally)||e.call(t)}),o=()=>new Promise((e,t)=>a.then(()=>"reject"===n[0]?t(n[1]):e(n[1])).catch(t));return"string"!=typeof r&&"number"!=typeof r?{unwrap:o}:Object.assign(r,{unwrap:o})},this.custom=(e,t)=>{let r=(null==t?void 0:t.id)||Rt++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Bt=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,Dt=(e,t)=>{let r=(null==t?void 0:t.id)||Rt++;return Ft.addToast({title:e,...t,id:r}),r},Mt=Object.assign(Dt,{success:Ft.success,info:Ft.info,warning:Ft.warning,error:Ft.error,custom:Ft.custom,message:Ft.message,promise:Ft.promise,dismiss:Ft.dismiss,loading:Ft.loading},{getHistory:()=>Ft.toasts,getToasts:()=>Ft.getActiveToasts()});function Ut(e){return void 0!==e.label}!function(e,{insertAt:t}={}){if("undefined"==typeof document)return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}(':where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
21left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
21:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
21--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}\n');var qt=3,zt=14;function $t(...e){return e.filter(Boolean).join(" ")}var Wt=e=>{var t,r,n,i,s,a,o,l,c,u,h;let{invert:d,toast:f,unstyled:p,interacting:m,setHeights:g,visibleToasts:b,heights:v,index:w,toasts:y,expanded:_,removeToast:x,defaultRichColors:k,closeButton:N,style:S,cancelButtonStyle:A,actionButtonStyle:L,className:j="",descriptionClassName:P="",duration:E,position:I,gap:C,loadingIcon:R,expandByDefault:F,classNames:B,icons:D,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:U}=e,[q,z]=O.useState(null),[$,W]=O.useState(null),[H,V]=O.useState(!1),[G,K]=O.useState(!1),[J,Y]=O.useState(!1),[Z,X]=O.useState(!1),[Q,ee]=O.useState(!1),[te,re]=O.useState(0),[ne,ie]=O.useState(0),se=O.useRef(f.duration||E||4e3),ae=O.useRef(null),oe=O.useRef(null),le=0===w,ce=w+1<=b,ue=f.type,he=!1!==f.dismissible,de=f.className||"",fe=f.descriptionClassName||"",pe=O.useMemo(()=>v.findIndex(e=>e.toastId===f.id)||0,[v,f.id]),me=O.useMemo(()=>{var e;return null!=(e=f.closeButton)?e:N},[f.closeButton,N]),ge=O.useMemo(()=>f.duration||E||4e3,[f.duration,E]),be=O.useRef(0),ve=O.useRef(0),we=O.useRef(0),ye=O.useRef(null),[_e,xe]=I.split("-"),ke=O.useMemo(()=>v.reduce((e,t,r)=>r>=pe?e:e+t.height,0),[v,pe]),Ne=(()=>{let[e,t]=O.useState(document.hidden);return O.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),Se=f.invert||d,Ae="loading"===ue;ve.current=O.useMemo(()=>pe*C+ke,[pe,ke]),O.useEffect(()=>{se.current=ge},[ge]),O.useEffect(()=>{V(!0)},[]),O.useEffect(()=>{let e=oe.current;if(e){let t=e.getBoundingClientRect().height;return ie(t),g(e=>[{toastId:f.id,height:t,position:f.position},...e]),()=>g(e=>e.filter(e=>e.toastId!==f.id))}},[g,f.id]),O.useLayoutEffect(()=>{if(!H)return;let e=oe.current,t=e.style.height;e.style.height="auto";let r=e.getBoundingClientRect().height;e.style.height=t,ie(r),g(e=>e.find(e=>e.toastId===f.id)?e.map(e=>e.toastId===f.id?{...e,height:r}:e):[{toastId:f.id,height:r,position:f.position},...e])},[H,f.title,f.description,g,f.id]);let Le=O.useCallback(()=>{K(!0),re(ve.current),g(e=>e.filter(e=>e.toastId!==f.id)),setTimeout(()=>{x(f)},200)},[f,x,g,ve]);return O.useEffect(()=>{if(f.promise&&"loading"===ue||f.duration===1/0||"loading"===f.type)return;let e;return _||m||U&&Ne?(()=>{if(we.current<be.current){let e=(new Date).getTime()-be.current;se.current=se.current-e}we.current=(new Date).getTime()})():se.current!==1/0&&(be.current=(new Date).getTime(),e=setTimeout(()=>{var e;null==(e=f.onAutoClose)||e.call(f,f),Le()},se.current)),()=>clearTimeout(e)},[_,m,f,ue,U,Ne,Le]),O.useEffect(()=>{f.delete&&Le()},[Le,f.delete]),O.createElement("li",{tabIndex:0,ref:oe,className:$t(j,de,null==B?void 0:B.toast,null==(t=null==f?void 0:f.classNames)?void 0:t.toast,null==B?void 0:B.default,null==B?void 0:B[ue],null==(r=null==f?void 0:f.classNames)?void 0:r[ue]),"data-sonner-toast":"","data-rich-colors":null!=(n=f.richColors)?n:k,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":H,"data-promise":!!f.promise,"data-swiped":Q,"data-removed":G,"data-visible":ce,"data-y-position":_e,"data-x-position":xe,"data-index":w,"data-front":le,"data-swiping":J,"data-dismissible":he,"data-type":ue,"data-invert":Se,"data-swipe-out":Z,"data-swipe-direction":$,"data-expanded":!!(_||F&&H),style:{"--index":w,"
21--toasts-before":w,"--z-index":y.length-w,"--offset":`${G?te:ve.current}px`,"--initial-height":F?"auto":`${ne}px`,...S,...f.style},onDragEnd:()=>{Y(!1),z(null),ye.current=null},onPointerDown:e=>{Ae||!he||(ae.current=new Date,re(ve.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(Y(!0),ye.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,r,n;if(Z||!he)return;ye.current=null;let i=Number((null==(e=oe.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),s=Number((null==(t=oe.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),a=(new Date).getTime()-(null==(r=ae.current)?void 0:r.getTime()),o="x"===q?i:s,l=Math.abs(o)/a;if(Math.abs(o)>=20||l>.11)return re(ve.current),null==(n=f.onDismiss)||n.call(f,f),W("x"===q?i>0?"right":"left":s>0?"down":"up"),Le(),X(!0),void ee(!1);Y(!1),z(null)},onPointerMove:t=>{var r,n,i,s;if(!ye.current||!he||(null==(r=window.getSelection())?void 0:r.toString().length)>0)return;let a=t.clientY-ye.current.y,o=t.clientX-ye.current.x,l=null!=(n=e.swipeDirections)?n:function(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}(I);!q&&(Math.abs(o)>1||Math.abs(a)>1)&&z(Math.abs(o)>Math.abs(a)?"x":"y");let c={x:0,y:0};"y"===q?(l.includes("top")||l.includes("bottom"))&&(l.includes("top")&&a<0||l.includes("bottom")&&a>0)&&(c.y=a):"x"===q&&(l.includes("left")||l.includes("right"))&&(l.includes("left")&&o<0||l.includes("right")&&o>0)&&(c.x=o),(Math.abs(c.x)>0||Math.abs(c.y)>0)&&ee(!0),null==(i=oe.current)||i.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(s=oe.current)||s.style.setProperty("--swipe-amount-y",`${c.y}px`)}},me&&!f.jsx?O.createElement("button",{"aria-label":M,"data-disabled":Ae,"data-close-button":!0,onClick:Ae||!he?()=>{}:()=>{var e;Le(),null==(e=f.onDismiss)||e.call(f,f)},className:$t(null==B?void 0:B.closeButton,null==(i=null==f?void 0:f.classNames)?void 0:i.closeButton)},null!=(s=null==D?void 0:D.close)?s:Ct):null,f.jsx||T.isValidElement(f.title)?f.jsx?f.jsx:"function"==typeof f.title?f.title():f.title:O.createElement(O.Fragment,null,ue||f.icon||f.promise?O.createElement("div",{"data-icon":"",className:$t(null==B?void 0:B.icon,null==(a=null==f?void 0:f.classNames)?void 0:a.icon)},f.promise||"loading"===f.type&&!f.icon?f.icon||(null!=D&&D.loading?O.createElement("div",{className:$t(null==B?void 0:B.loader,null==(je=null==f?void 0:f.classNames)?void 0:je.loader,"sonner-loader"),"data-visible":"loading"===ue},D.loading):R?O.createElement("div",{className:$t(null==B?void 0:B.loader,null==(Pe=null==f?void 0:f.classNames)?void 0:Pe.loader,"sonner-loader"),"data-visible":"loading"===ue},R):O.createElement(Pt,{className:$t(null==B?void 0:B.loader,null==(Ee=null==f?void 0:f.classNames)?void 0:Ee.loader),visible:"loading"===ue})):null,"loading"!==f.type?f.icon||(null==D?void 0:D[ue])||(e=>{switch(e){case"success":return Et;case"info":return Tt;case"warning":return It;case"error":return Ot;default:return null}})(ue):null):null,O.createElement("div",{"data-content":"",className:$t(null==B?void 0:B.content,null==(o=null==f?void 0:f.classNames)?void 0:o.content)},O.createElement("div",{"data-title":"",className:$t(null==B?void 0:B.title,null==(l=null==f?void 0:f.classNames)?void 0:l.title)},"function"==typeof f.title?f.title():f.title),f.description?O.createElement("div",{"data-description":"",className:$t(P,fe,null==B?void 0:B.description,null==(c=null==f?void 0:f.classNames)?void 0:c.description)},"function"==typeof f.description?f.description():f.description):null),T.isValidElement(f.cancel)?f.cancel:f.cancel&&Ut(f.cancel)?O.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||A,onClick:e=>{var t,r;Ut(f.cancel)&&he&&(null==(r=(t=f.cancel).onClick)||r.call(t,e),Le())},className:$t(null==B?void 0:B.cancelButton,null==(u=null==f?void 0:f.classNames)?void 0:u.cancelButton)},f.cancel.label):null,T.isValidElement(f.action)?f.action:f.action&&Ut(f.action)?O.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||L,onClick:e=>{var t,r;Ut(f.action)&&(null==(r=(t=f.action).onClick)||r.call(t,e),!e.defaultPrevented&&Le())},className:$t(null==B?void 0:B.actionButton,null==(h=null==f?void 0:f.classNames)?void 0:h.actionButton)},f.action.label):null));var je,Pe,Ee};function Ht(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function Vt(e,t){let r={};return[e,t].forEach((e,t)=>{let n=1===t,i=n?"--mobile-offset":"--offset",s=n?"16px":"32px";function a(e){["top","right","bottom","left"].forEach(t=>{r[`${i}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?a(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?r[`${i}-${t}`]=s:r[`${i}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):a(s)}),r}var Gt=T.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:a,className:o,offset:l,mobileOffset:c,theme:u="light",richColors:h,duration:d,style:f,visibleToasts:p=qt,toastOptions:m,dir:g=Ht(),gap:b=zt,loadingIcon:v,icons:w,containerAriaLabel:y="Notifications",pauseWhenPageIsHidden:_}=e,[x,k]=O.useState([]),N=O.useMemo(()=>Array.from(new Set([n].concat(x.filter(e=>e.position).map(e=>e.position)))),[x,n]),[S,A]=O.useState([]),[L,j]=O.useState(!1),[P,E]=O.useState(!1),[I,T]=O.useState("system"!==u?u:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
21k":"light"),R=O.useRef(null),F=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=O.useRef(null),D=O.useRef(!1),M=O.useCallback(e=>{k(t=>{var r;return null!=(r=t.find(t=>t.id===e.id))&&r.delete||Ft.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return O.useEffect(()=>Ft.subscribe(e=>{e.dismiss?k(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t)):setTimeout(()=>{C.flushSync(()=>{k(t=>{let r=t.findIndex(t=>t.id===e.id);return-1!==r?[...t.slice(0,r),{...t[r],...e},...t.slice(r+1)]:[e,...t]})})})}),[]),O.useEffect(()=>{if("system"!==u)return void T(u);if("system"===u&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?T("dark"):T("light")),"undefined"==typeof window)return;let e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{T(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{T(e?"dark":"light")}catch(t){}})}},[u]),O.useEffect(()=>{x.length<=1&&j(!1)},[x]),O.useEffect(()=>{let e=e=>{var t,r;i.every(t=>e[t]||e.code===t)&&(j(!0),null==(t=R.current)||t.focus()),"Escape"===e.code&&(document.activeElement===R.current||null!=(r=R.current)&&r.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i]),O.useEffect(()=>{if(R.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,D.current=!1)}},[R.current]),O.createElement("section",{ref:t,"aria-label":`${y} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((t,n)=>{var i;let[u,y]=t.split("-");return x.length?O.createElement("ol",{key:t,dir:"auto"===g?Ht():g,tabIndex:-1,ref:R,className:o,"data-sonner-toaster":!0,"data-theme":I,"data-y-position":u,"data-lifted":L&&x.length>1&&!s,"data-x-position":y,style:{"--front-toast-height":`${(null==(i=S[0])?void 0:i.height)||0}px`,"--width":"356px","--gap":`${b}px`,...f,...Vt(l,c)},onBlur:e=>{D.current&&!e.currentTarget.contains(e.relatedTarget)&&(D.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||D.current||(D.current=!0,B.current=e.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{P||j(!1)},onDragEnd:()=>j(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||E(!0)},onPointerUp:()=>E(!1)},x.filter(e=>!e.position&&0===n||e.position===t).map((n,i)=>{var o,l;return O.createElement(Wt,{key:n.id,icons:w,index:i,toast:n,defaultRichColors:h,duration:null!=(o=null==m?void 0:m.duration)?o:d,className:null==m?void 0:m.className,descriptionClassName:null==m?void 0:m.descriptionClassName,invert:r,visibleToasts:p,closeButton:null!=(l=null==m?void 0:m.closeButton)?l:a,interacting:P,position:t,style:null==m?void 0:m.style,unstyled:null==m?void 0:m.unstyled,classNames:null==m?void 0:m.classNames,cancelButtonStyle:null==m?void 0:m.cancelButtonStyle,actionButtonStyle:null==m?void 0:m.actionButtonStyle,removeToast:M,toasts:x.filter(e=>e.position==n.position),heights:S.filter(e=>e.position==n.position),setHeights:A,expandByDefault:s,gap:b,loadingIcon:v,expanded:L,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const Kt=({...e})=>n.jsx(Gt,{theme:"system",className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e}),Jt=ae("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Yt=T.forwardRef(({className:e,variant:t,size:r,asChild:i=!1,...s},a)=>{const o=i?h:"button";return n.jsx(o,{className:wt(Jt({variant:t,size:r,className:e})),ref:a,...s})});Yt.displayName="Button";class Zt extends T.Component{constructor(e){super(e),r(this,"handleReset",()=>{this.setState({hasError:!1,error:void 0}),window.location.href="/"}),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){}render(){return this.state.hasError?this.props.fallback?this.props.fallback:n.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:n.jsx("div",{className:"w-full max-w-md rounded-lg border border-border bg-card p-8 shadow-lg",children:n.jsxs("div",{className:"flex flex-col items-center space-y-6 text-center",children:[n.jsx("div",{className:"rounded-full bg-destructive/10 p-4",children:n.jsx(Ne,{className:"h-12 w-12 text-destructive"})}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Something went wrong"}),n.jsx("p",{className:"text-muted-foreground",children:"We encountered an unexpected error. Please try refreshing the page."}),!1]}),n.jsx(Yt,{onClick:this.handleReset,className:"w-full",children:"Return to Home"})]})})}):this.props.children}}
vendor: 2,871 bytes, line 21
21class Xt extends Error{constructor(e,t="FunctionsError",r){super(e),this.name=t,this.context=r}}class Qt extends Xt{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class er extends Xt{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class tr extends Xt{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var rr,nr;(nr=rr||(rr={})).Any="any",nr.ApNortheast1="ap-northeast-1",nr.ApNortheast2="ap-northeast-2",nr.ApSouth1="ap-south-1",nr.ApSoutheast1="ap-southeast-1",nr.ApSoutheast2="ap-southeast-2",nr.CaCentral1="ca-central-1",nr.EuCentral1="eu-central-1",nr.EuWest1="eu-west-1",nr.EuWest2="eu-west-2",nr.EuWest3="eu-west-3",nr.SaEast1="sa-east-1",nr.UsEast1="us-east-1",nr.UsWest1="us-west-1",nr.UsWest2="us-west-2";class ir{constructor(e,{headers:t={},customFetch:r,region:n=rr.Any}={}){this.url=e,this.headers=t,this.region=n,this.fetch=(e=>e?(...t)=>e(...t):(...e)=>fetch(...e))(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return d(this,arguments,void 0,function*(e,t={}){var r;let n,i;try{const{headers:s,method:a,body:o,signal:l,timeout:c}=t;let u={},{region:h}=t;h||(h=this.region);const d=new URL(`${this.url}/${e}`);let f;h&&"any"!==h&&(u["x-region"]=h,d.searchParams.set("forceFunctionRegion",h)),o&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)?"undefined"!=typeof Blob&&o instanceof Blob||o instanceof ArrayBuffer?(u["Content-Type"]="application/octet-stream",f=o):"string"==typeof o?(u["Content-Type"]="text/plain",f=o):"undefined"!=typeof FormData&&o instanceof FormData?f=o:(u["Content-Type"]="application/json",f=JSON.stringify(o)):f=o;let p=l;c&&(i=new AbortController,n=setTimeout(()=>i.abort(),c),l?(p=i.signal,l.addEventListener("abort",()=>i.abort())):p=i.signal);const m=yield this.fetch(d.toString(),{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},u),this.headers),s),body:f,signal:p}).catch(e=>{throw new Qt(e)}),g=m.headers.get("x-relay-error");if(g&&"true"===g)throw new er(m);if(!m.ok)throw new tr(m);let b,v=(null!==(r=m.headers.get("Content-Type"))&&void 0!==r?r:"text/plain").split(";")[0].trim();return b="application/json"===v?yield m.json():"application/octet-stream"===v||"application/pdf"===v?yield m.blob():"text/event-stream"===v?m:"multipart/form-data"===v?yield m.formData():yield m.text(),{data:b,error:null,response:m}}catch(s){return{data:null,error:s,response:s instanceof tr||s instanceof er?s.context:void 0}}finally{n&&clearTimeout(n)}})}}var sr={};const ar=R(f);var or,lr,cr,ur,hr,dr,fr={},pr={},mr={},gr={},br={},vr={};function wr(){if(or)return vr;or=1,Object.defineProperty(vr,"__esModule",{value:!0});class e extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
21de=e.code}}return vr.default=e,vr}function yr(){if(lr)return br;lr=1,Object.defineProperty(br,"__esModule",{value:!0});const e=ar.__importDefault(wr());return br.default=class{constructor(e){var t,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=null!==(t=e.shouldThrowOnError)&&void 0!==t&&t,this.signal=e.signal,this.isMaybeSingle=null!==(r=e.isMaybeSingle)&&void 0!==r&&r,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(t,r){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json");let n=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async t=>{var r,n,i,s;let a=null,o=null,l=null,c=t.status,u=t.statusText;if(t.ok){if("HEAD"!==this.method){const e=await t.text();""===e||(o="text/csv"===this.headers.get("Accept")||this.headers.get("Accept")&&(null===(r=this.headers.get("Accept"))||void 0===r?void 0:r.includes("application/vnd.pgrst.plan+text"))?e:JSON.parse(e))}const e=null===(n=this.headers.get("Prefer"))||void 0===n?void 0:n.match(/count=(exact|planned|estimated)/),s=null===(i=t.headers.get("content-range"))||void 0===i?void 0:i.split("/");e&&s&&s.length>1&&(l=parseInt(s[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(o)&&(o.length>1?(a={code:"PGRST116",details:`Results contain ${o.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},o=null,l=null,c=406,u="Not Acceptable"):o=1===o.length?o[0]:null)}else{const r=await t.text();try{a=JSON.parse(r),Array.isArray(a)&&404===t.status&&(o=[],a=null,c=200,u="OK")}catch(h){404===t.status&&""===r?(c=204,u="No Content"):a={message:r}}if(a&&this.isMaybeSingle&&(null===(s=null==a?void 0:a.details)||void 0===s?void 0:s.includes("0 rows"))&&(a=null,c=200,u="OK"),a&&this.shouldThrowOnError)throw new e.default(a)}return{error:a,data:o,count:l,status:c,statusText:u}});return this.shouldThrowOnError||(n=n.catch(e=>{var t,r,n,i,s,a;let o="";const l=null==e?void 0:e.cause;if(l){const s=null!==(t=null==l?void 0:l.message)&&void 0!==t?t:"",a=null!==(r=null==l?void 0:l.code)&&void 0!==r?r:"";o=`${null!==(n=null==e?void 0:e.name)&&void 0!==n?n:"FetchError"}: ${null==e?void 0:e.message}`,o+=`\n\nCaused by: ${null!==(i=null==l?void 0:l.name)&&void 0!==i?i:"Error"}: ${s}`,a&&(o+=` (${a})`),(null==l?void 0:l.stack)&&(o+=`\n${l.stack}`)}else o=null!==(s=null==e?void 0:e.stack)&&void 0!==s?s:"";return{error:{message:`${null!==(a=null==e?void 0:e.name)&&void 0!==a?a:"FetchError"}: ${null==e?void 0:e.message}`,details:o,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),n.then(t,r)}returns(){return this}overrideTypes(){return this}},br}function _r(){if(cr)return gr;cr=1,Object.defineProperty(gr,"__esModule",{value:!0});const e=ar.__importDefault(yr());class t extends e.default{select(e){let t=!1;const r=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){const s=i?`${i}.order`:"order",a=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${void 0===r?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const i=void 0===n?"offset":`${n}.offset`,s=void 0===n?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(s,""+(t-e+1)),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return"GET"===this.method?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
21explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:s="text"}={}){var a;const o=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=null!==(a=this.headers.get("Accept"))&&void 0!==a?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${s}; for="${l}"; options=${o};`),this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}}return gr.default=t,gr}function xr(){if(ur)return mr;ur=1,Object.defineProperty(mr,"__esModule",{value:!0});const e=ar.__importDefault(_r()),t=new RegExp("[,()]");class r extends e.default{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,r){const n=Array.from(new Set(r)).map(e=>"string"==typeof e&&t.test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let i="";"plain"===n?i="pl":"phrase"===n?i="ph":"websearch"===n&&(i="w");const s=void 0===r?"":`(${r})`;return this.url.searchParams.append(e,`${i}fts${s}.${t}`),this}match(e){return Object.entries(e).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}}return mr.default=r,mr}function kr(){if(hr)return pr;hr=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=ar.__importDefault(xr());return pr.default=class{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n}select(t,r){const{head:n=!1,count:i}=null!=r?r:{},s=n?"HEAD":"GET";let a=!1;const o=(null!=t?t:"*").split("").map(e=>/\s/.test(e)&&!a?"":('"'===e&&(a=!a),e)).join("");return this.url.searchParams.set("select",o),i&&this.headers.append("Prefer",`count=${i}`),new e.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(t,{count:r,defaultToNull:n=!0}={}){var i;if(r&&this.headers.append("Prefer",`count=${r}`),n||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const e=t.reduce((e,t)=>
21e.concat(Object.keys(t)),[]);if(e.length>0){const t=[...new Set(e)].map(e=>`"${e}"`);this.url.searchParams.set("columns",t.join(","))}}return new e.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:null!==(i=this.fetch)&&void 0!==i?i:fetch})}upsert(t,{onConflict:r,ignoreDuplicates:n=!1,count:i,defaultToNull:s=!0}={}){var a;if(this.headers.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),void 0!==r&&this.url.searchParams.set("on_conflict",r),i&&this.headers.append("Prefer",`count=${i}`),s||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const e=t.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(e.length>0){const t=[...new Set(e)].map(e=>`"${e}"`);this.url.searchParams.set("columns",t.join(","))}}return new e.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:null!==(a=this.fetch)&&void 0!==a?a:fetch})}update(t,{count:r}={}){var n;return r&&this.headers.append("Prefer",`count=${r}`),new e.default({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:null!==(n=this.fetch)&&void 0!==n?n:fetch})}delete({count:t}={}){var r;return t&&this.headers.append("Prefer",`count=${t}`),new e.default({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})}},pr}Object.defineProperty(sr,"__esModule",{value:!0});var Nr=sr.PostgrestError=sr.PostgrestBuilder=sr.PostgrestTransformBuilder=sr.PostgrestFilterBuilder=sr.PostgrestQueryBuilder=sr.PostgrestClient=void 0;const Sr=ar,Ar=Sr.__importDefault(function(){if(dr)return fr;dr=1,Object.defineProperty(fr,"__esModule",{value:!0});const e=ar,t=e.__importDefault(kr()),r=e.__importDefault(xr());class n{constructor(e,{headers:t={},schema:r,fetch:n}={}){this.url=e,this.headers=new Headers(t),this.schemaName=r,this.fetch=n}from(e){if(!e||"string"!=typeof e||""===e.trim())throw new Error("Invalid relation name: relation must be a non-empty string.");const r=new URL(`${this.url}/${e}`);return new t.default(r,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new n(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:n=!1,get:i=!1,count:s}={}){var a;let o;const l=new URL(`${this.url}/rpc/${e}`);let c;n||i?(o=n?"HEAD":"GET",Object.entries(t).filter(([e,t])=>void 0!==t).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(",")}}`:`${t}`]).forEach(([e,t])=>{l.searchParams.append(e,t)})):(o="POST",c=t);const u=new Headers(this.headers);return s&&u.set("Prefer",`count=${s}`),new r.default({method:o,url:l,headers:u,schema:this.schemaName,body:c,fetch:null!==(a=this.fetch)&&void 0!==a?a:fetch})}}return fr.default=n,fr}());var Lr=sr.PostgrestClient=Ar.default;const jr=Sr.__importDefault(kr());var Pr=sr.PostgrestQueryBuilder=jr.default;const Er=Sr.__importDefault(xr());var Ir=sr.PostgrestFilterBuilder=Er.default;const Tr=Sr.__importDefault(_r());var Or=sr.PostgrestTransformBuilder=Tr.default;const Cr=Sr.__importDefault(yr());var Rr=sr.PostgrestBuilder=Cr.default;const Fr=Sr.__importDefault(wr());Nr=sr.PostgrestError=Fr.default;var Br=sr.default={PostgrestClient:Ar.default,PostgrestQueryBuilder:jr.default,PostgrestFilterBuilder:Er.default,PostgrestTransformBuilder:Tr.default,PostgrestBuilder:Cr.default,PostgrestError:Fr.default};const Dr=V({__proto__:null,get PostgrestBuilder(){return Rr},get PostgrestClient(){return Lr},get PostgrestError(){return Nr},get PostgrestFilterBuilder(){return Ir},get PostgrestQueryBuilder(){return Pr},get PostgrestTransformBuilder(){return Or},default:Br},[sr]),{PostgrestClient:Mr,PostgrestQueryBuilder:Ur,PostgrestFilterBuilder:qr,PostgrestTransformBuilder:zr,PostgrestBuilder:$r,PostgrestError:Wr}=Br||Dr;class Hr{constructor(){}static detectEnvironment(){var e;if("undefined"!=typeof WebSocket)return{type:"native",constructor:WebSocket};if("undefined"!=typeof globalThis&&void 0!==globalThis.WebSocket)return{type:"native",constructor:globalThis.WebSocket};if("undefined"!=typeof global&&void 0!==global.WebSocket)return{type:"native",constructor:global.WebSocket};if("undefined"!=typeof globalThis&&void 0!==globalThis.WebSocketPair&&void 0===globalThis.WebSocket)return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if("undefined"!=typeof globalThis&&globalThis.EdgeRuntime||"undefined"!=typeof navigator&&(null===(e=navigator.userAgent)||void 0===e?void 0:e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if("undefined"!=typeof process){const e=process.versions;if(e&&e.node){const t=e.node,r=parseInt(t.replace(/^v/,"").split(".")[0]);return r>=22?void 0!==globalThis.WebSocket?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${r} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${r} detected without native WebSocket support.`,workaround:'For Node.js < 22, install "ws" package and provide it via the transport option:\nimport ws from "ws"\nnew RealtimeClient(url, { transport: ws })'}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let t=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(t+=`\n\nSuggested solution: ${e.workaround}`),new Error(t)}static createWebSocket(e,t){return new(this.getWebSocketConstructor())(e,t)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return"native"===e.type||"ws"===e.type}catch(e){return!1}}}const Vr="1.0.0",Gr=Vr,Kr=1e4;var Jr,Yr,Zr,Xr,Qr,en,tn,rn,nn,sn,an;(Yr=Jr||(Jr={}))[Yr.connecting=0]="connecting",Yr[Yr.open=1]="open",Yr[Yr.closing=2]="closing",Yr[Yr.closed=3]="closed",(Xr=Zr||(Zr={})).closed="closed",Xr.errored="errored",Xr.joined="joined",Xr.joining="joining",Xr.leaving="leaving",(en=Qr||(Qr={})).close="phx_close",en.error="phx_error",en.join="phx_join",en.reply="phx_reply",en.leave="phx_leave",en.access_token="access_token",(tn||(tn={})).websocket="websocket",(nn=rn||(rn={})).Connecting="connecting",nn.Open="open",nn.Closing="closing",nn.Closed="closed";class on{constructor(){this.HEADER_LENGTH=1,this.META_LENGTH=4,this.USER_BROADCAST_PUSH_META_LENGTH=5,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast"}encode(e,t){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&"string"==typeof e.payload.event)return t(this._binaryEncodeUserBroadcastPush(e));let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(e){var t;return this._isArrayBuffer(null===(t=e.payload)||void 0===t?void 0:t.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var t,r,n,i;const s=e.topic,a=null!==(t=e.ref)&&void 0!==t?t:"",o=null!==(r=e.join_ref)&&void 0!==r?r:"",l=e.payload.event,c=null!==(i=null===(n=e.payload)||void 0===n?void 0:n.payload)&&void 0!==i?i:new ArrayBuffer(0),u=this.USER_BROADCAST_PUSH_META_LENGTH+o.length+a.length+s.length+l.length,h=new ArrayBuffer(this.HEADER_LENGTH+u);
vendor: 29,620 bytes, line 21
21let d=new DataView(h),f=0;d.setUint8(f++,this.KINDS.userBroadcastPush),d.setUint8(f++,o.length),d.setUint8(f++,a.length),d.setUint8(f++,s.length),d.setUint8(f++,l.length),d.setUint8(f++,this.BINARY_ENCODING),Array.from(o,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(a,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(s,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(l,e=>d.setUint8(f++,e.charCodeAt(0)));var p=new Uint8Array(h.byteLength+c.byteLength);return p.set(new Uint8Array(h),0),p.set(new Uint8Array(c),h.byteLength),p.buffer}_encodeJsonUserBroadcastPush(e){var t,r,n,i;const s=e.topic,a=null!==(t=e.ref)&&void 0!==t?t:"",o=null!==(r=e.join_ref)&&void 0!==r?r:"",l=e.payload.event,c=null!==(i=null===(n=e.payload)||void 0===n?void 0:n.payload)&&void 0!==i?i:{},u=(new TextEncoder).encode(JSON.stringify(c)).buffer,h=this.USER_BROADCAST_PUSH_META_LENGTH+o.length+a.length+s.length+l.length,d=new ArrayBuffer(this.HEADER_LENGTH+h);let f=new DataView(d),p=0;f.setUint8(p++,this.KINDS.userBroadcastPush),f.setUint8(p++,o.length),f.setUint8(p++,a.length),f.setUint8(p++,s.length),f.setUint8(p++,l.length),f.setUint8(p++,this.JSON_ENCODING),Array.from(o,e=>f.setUint8(p++,e.charCodeAt(0))),Array.from(a,e=>f.setUint8(p++,e.charCodeAt(0))),Array.from(s,e=>f.setUint8(p++,e.charCodeAt(0))),Array.from(l,e=>f.setUint8(p++,e.charCodeAt(0)));var m=new Uint8Array(d.byteLength+u.byteLength);return m.set(new Uint8Array(d),0),m.set(new Uint8Array(u),d.byteLength),m.buffer}decode(e,t){if(this._isArrayBuffer(e)){return t(this._binaryDecode(e))}if("string"==typeof e){const r=JSON.parse(e),[n,i,s,a,o]=r;return t({join_ref:n,ref:i,topic:s,event:a,payload:o})}return t({})}_binaryDecode(e){const t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;if(r===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,t,n)}_decodeUserBroadcast(e,t,r){const n=t.getUint8(1),i=t.getUint8(2),s=t.getUint8(3),a=t.getUint8(4);let o=this.HEADER_LENGTH+4;const l=r.decode(e.slice(o,o+n));o+=n;const c=r.decode(e.slice(o,o+i));o+=i;const u=r.decode(e.slice(o,o+s));o+=s;const h=e.slice(o,e.byteLength),d=a===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,f={type:this.BROADCAST_EVENT,event:c,payload:d};return s>0&&(f.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:l,event:this.BROADCAST_EVENT,payload:f}}_isArrayBuffer(e){var t;return e instanceof ArrayBuffer||"ArrayBuffer"===(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)}}class ln{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}(an=sn||(sn={})).abstime="abstime",an.bool="bool",an.date="date",an.daterange="daterange",an.float4="float4",an.float8="float8",an.int2="int2",an.int4="int4",an.int4range="int4range",an.int8="int8",an.int8range="int8range",an.json="json",an.jsonb="jsonb",an.money="money",an.numeric="numeric",an.oid="oid",an.reltime="reltime",an.text="text",an.time="time",an.timestamp="timestamp",an.timestamptz="timestamptz",an.timetz="timetz",an.tsrange="tsrange",an.tstzrange="tstzrange";const cn=(e,t,r={})=>{var n;const i=null!==(n=r.skipTypes)&&void 0!==n?n:[];return t?Object.keys(t).reduce((r,n)=>(r[n]=un(n,e,t,i),r),{}):{}},un=(e,t,r,n)=>{const i=t.find(t=>t.name===e),s=null==i?void 0:i.type,a=r[e];return s&&!n.includes(s)?hn(s,a):dn(a)},hn=(e,t)=>{if("_"===e.charAt(0)){const r=e.slice(1,e.length);return gn(t,r)}switch(e){case sn.bool:return fn(t);case sn.float4:case sn.float8:case sn.int2:case sn.int4:case sn.int8:case sn.numeric:case sn.oid:return pn(t);case sn.json:case sn.jsonb:return mn(t);case sn.timestamp:return bn(t);case sn.abstime:case sn.date:case sn.daterange:case sn.int4range:case sn.int8range:case sn.money:case sn.reltime:case sn.text:case sn.time:case sn.timestamptz:case sn.timetz:case sn.tsrange:case sn.tstzrange:default:return dn(t)}},dn=e=>e,fn=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},pn=e=>{if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},mn=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}return e},gn=(e,t)=>{if("string"!=typeof e)return e;const r=e.length-1,n=e[r];if("{"===e[0]&&"}"===n){let n;const s=e.slice(1,r);try{n=JSON.parse("["+s+"]")}catch(i){n=s?s.split(","):[]}return n.map(e=>hn(t,e))}return e},bn=e=>"string"==typeof e?e.replace(" ","T"):e,vn=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),""===t.pathname||"/"===t.pathname?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class wn{constructor(e,t,r={},n=1e4){this.channel=e,this.event=t,this.payload=r,this.timeout=n,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var r;return this._hasReceived(e)&&t(null===(r=this.receivedResp)||void 0===r?void 0:r.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);this.channel._on(this.refEvent,{},e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var yn,_n,xn,kn,Nn,Sn,An,Ln;(_n=yn||(yn={})).SYNC="sync",_n.JOIN="join",_n.LEAVE="leave";class jn{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(null==t?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},e=>{const{onJoin:t,onLeave:r,onSync:n}=this.caller;this.joinRef=this.channel._joinRef(),this.state=jn.syncState(this.state,e,t,r),this.pendingDiffs.forEach(e=>{this.state=jn.syncDiff(this.state,e,t,r)}),this.pendingDiffs=[],n()}),this.channel._on(r.diff,{},e=>{const{onJoin:t,onLeave:r,onSync:n}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(e):(this.state=jn.syncDiff(this.state,e,t,r),n())}),this.onJoin((e,t,r)=>{this.channel._trigger("presence",{event:"join",key:e,currentPresences:t,newPresences:r})}),this.onLeave((e,t,r)=>{this.channel._trigger("presence",{event:"leave",key:e,currentPresences:t,leftPresences:r})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,r,n){const i=this.cloneDeep(e),s=this.transformState(t),a={},o={};return this.map(i,(e,t)=>{s[e]||(o[e]=t)}),this.map(s,(e,t)=>{const r=i[e];if(r){const n=t.map(e=>e.presence_ref),i=r.map(e=>e.presence_ref),s=t.filter(e=>i.indexOf(e.presence_ref)<0),l=r.filter(e=>n.indexOf(e.presence_ref)<0);s.length>0&&(a[e]=s),l.length>0&&(o[e]=l)}else a[e]=t}),this.syncDiff(i,{joins:a,leaves:o},r,n)}static syncDiff(e,t,r,n){const{joins:i,leaves:s}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return r||(r=()=>{}),n||(n=()=>{}),this.map(i,(t,n)=>{var i;const s=null!==(i=e[t])&&void 0!==i?i:[];if(e[t]=this.cloneDeep(n),s.length>0){const r=e[t].map(e=>e.presence_ref),n=s.filter(e=>r.indexOf(e.presence_ref)<0);e[t].unshift(...n)}r(t,s,n)}),this.map(s,(t,r)=>{let i=e[t];if(!i)return;const s=r.map(e=>e.presence_ref);i=i.filter(e=>s.indexOf(e.presence_ref)<0),e[t]=i,n(t,i,r),0===i.length&&delete e[t]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(r=>t(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,r)=>{const n=e[r];return t[r]="metas"in n?n.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e)):n,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}(kn=xn||(xn={})).ALL="*",kn.INSERT="INSERT",kn.UPDATE="UPDATE",kn.DELETE="DELETE",(Sn=Nn||(Nn={})).BROADCAST="broadcast",Sn.PRESENCE="presence",Sn.POSTGRES_CHANGES="postgres_changes",Sn.SYSTEM="system",(Ln=An||(An={})).SUBSCRIBED="SUBSCRIBED",Ln.TIMED_OUT="TIMED_OUT",Ln.CLOSED="CLOSED",Ln.CHANNEL_ERROR="CHANNEL_ERROR";class Pn{constructor(e,t={config:{}},r){var n,i;if(this.topic=e,this.params=t,this.socket=r,this.bindings={},this.state=Zr.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new wn(this,Qr.join,this.params,this.timeout),this.rejoinTimer=new ln(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Zr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Zr.closed,this.socket._remove(this)}),this._onError(e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,e),this.state=Zr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Zr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,e),this.state=Zr.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Qr.reply,{},(e,t)=>{this._trigger(this._replyEventName(t),e)}),this.presence=new jn(this),this.broadcastEndpointURL=vn(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(null===(i=null===(n=this.params.config)||void 0===n?void 0:n.broadcast)||void 0===i?void 0:i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(e,t=this.timeout){var r,n,i;if(this.socket.isConnected()||this.socket.connect(),this.state==Zr.closed){const{config:{broadcast:s,presence:a,private:o}}=this.params,l=null!==(n=null===(r=this.bindings.postgres_changes)||void 0===r?void 0:r.map(e=>e.filter))&&void 0!==n?n:[],c=!!this.bindings[Nn.PRESENCE]&&this.bindings[Nn.PRESENCE].length>0||!0===(null===(i=this.params.config.presence)||void 0===i?void 0:i.enabled),u={},h={broadcast:s,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:l,private:o};this.socket.accessTokenValue&&(u.access_token=this.socket.accessTokenValue),this._onError(t=>null==e?void 0:e(An.CHANNEL_ERROR,t)),this._onClose(()=>null==e?void 0:e(An.CLOSED)),this.updateJoinPayload(Object.assign({config:h},u)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",async({postgres_changes:t})=>{var r;if(this.socket.setAuth(),void 0!==t){const n=this.bindings.postgres_changes,i=null!==(r=null==n?void 0:n.length)&&void 0!==r?r:0,s=[];for(let r=0;r<i;r++){const i=n[r],{filter:{event:a,schema:o,table:l,filter:c}}=i,u=t&&t[r];if(!u||u.event!==a||u.schema!==o||u.table!==l||u.filter!==c)return this.unsubscribe(),this.state=Zr.errored,void(null==e||e(An.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes")));s.push(Object.assign(Object.assign({},i),{id:u.id}))}return this.bindings.postgres_changes=s,void(e&&e(An.SUBSCRIBED))}null==e||e(An.SUBSCRIBED)}).receive("error",t=>{this.state=Zr.errored,null==e||e(An.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(t).join(", ")||"error")))}).receive("timeout",()=>{null==e||e(An.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,r){return this.state===Zr.joined&&e===Nn.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(e,t,r)}async httpSend(e,t,r={}){var n;const i=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(null==t)return Promise.reject("Payload is required for httpSend()");const s={method:"POST",headers:{Authorization:i,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:t,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,s,null!==(n=r.timeout)&&void 0!==n?n:this.timeout);if(202===a.status)return{success:!0};let o=a.statusText;try{const e=await a.json();o=e.error||e.message||o}catch(l){}return Promise.reject(new Error(o))}async send(e,t={}){var r,n;if(this._canPush()||"broadcast"!==e.type)return new Promise(r=>{var n,i,s;const a=this._push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(s=null===(i=null===(n=this.params)||void 0===n?void 0:n.config)||void 0===i?void 0:i.broadcast)||void 0===s?void 0:s.ack)||r("ok"),a.receive("ok",()=>r("ok")),a.receive("error",()=>r("error")),a.receive("timeout",()=>r("timed out"))});{const{event:s,payload:a}=e,o={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:a,private:this.private}]})};try{const e=await this._fetchWithTimeout(this.broadcastEndpointURL,o,null!==(r=t.timeout)&&void 0!==r?r:this.timeout);return await(null===(n=e.body)||void 0===n?void 0:n.cancel()),e.ok?"ok":"error"}catch(i){return"AbortError"===i.name?"timed out":"error"}}}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Zr.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Qr.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(n=>{r=new wn(this,Qr.leave,{},e),r.receive("ok",()=>{t(),n("ok")}).receive("timeout",()=>{t(),n("timed out")}).receive("error",()=>{n("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{null==r||r.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Zr.closed,this.bindings={}}async _fetchWithTimeout(e,t,r){const n=new AbortController,i=setTimeout(()=>n.abort(),r),s=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return clearTimeout(i),s}_push(e,t,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let n=new wn(this,e,t,r);return this._canPush()?n.send():this._addToPushBuffer(n),n}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>100){const e=this.pushBuffer.shift();e&&(e.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${e.event}`,e.payload))}}_onMessage(e,t,r){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,r){var n,i;const s=e.toLocaleLowerCase(),{close:a,error:o,leave:l,join:c}=Qr;if(r&&[a,o,l,c].indexOf(s)>=0&&r!==this._joinRef())return;let u=this._onMessage(s,t,r);if(t&&!u)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?null===(n=this.bindings.postgres_changes)||void 0===n||n.filter(e=>{var t,r,n;return"*"===(null===(t=e.filter)||void 0===t?void 0:t.event)||(null===(n=null===(r=e.filter)||void 0===r?void 0:r.event)||void 0===n?void 0:n.toLocaleLowerCase())===s}).map(e=>e.callback(u,r)):null===(i=this.bindings[s])||void 0===i||i.filter(e=>{var r,n,i,a,o,l;if(["broadcast","presence","postgres_changes"].includes(s)){if("id"in e){const s=e.id,a=null===(r=e.filter)||void 0===r?void 0:r.event;return s&&(null===(n=t.ids)||void 0===n?void 0:n.includes(s))&&("*"===a||(null==a?void 0:a.toLocaleLowerCase())===(null===(i=t.data)||void 0===i?void 0:i.type.toLocaleLowerCase()))}{const r=null===(o=null===(a=null==e?void 0:e.filter)||void 0===a?void 0:a.event)||void 0===o?void 0:o.toLocaleLowerCase();return"*"===r||r===(null===(l=null==t?void 0:t.event)||void 0===l?void 0:l.toLocaleLowerCase())}}return e.type.toLocaleLowerCase()===s}).map(e=>{if("object"==typeof u&&"ids"in u){const e=u.data,{schema:t,table:r,commit_timestamp:n,type:i,errors:s}=e,a={schema:t,table:r,commit_timestamp:n,eventType:i,new:{},old:{},errors:s};u=Object.assign(Object.assign({},a),this._getPayloadRecords(e))}e.callback(u,r)})}_isClosed(){return this.state===Zr.closed}_isJoined(){return this.state===Zr.joined}_isJoining(){return this.state===Zr.joining}_isLeaving(){return this.state===Zr.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,r){const n=e.toLocaleLowerCase(),i={type:n,filter:t,callback:r};return this.bindings[n]?this.bindings[n].push(i):this.bindings[n]=[i],this}_off(e,t){const r=e.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(e=>{var n;return!((null===(n=e.type)||void 0===n?void 0:n.toLocaleLowerCase())===r&&Pn.isEqual(e.filter,t))})),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Qr.close,{},e)}_onError(e){this._on(Qr.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Zr.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return"INSERT"!==e.type&&"UPDATE"!==e.type||(t.new=cn(e.columns,e.record)),"UPDATE"!==e.type&&"DELETE"!==e.type||(t.old=cn(e.columns,e.old_record)),t}}const En=()=>{},In=25e3,Tn=10,On=100,Cn=[1e3,2e3,5e3,1e4];class Rn{constructor(e,t){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Kr,this.transport=null,this.heartbeatIntervalMs=In,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=En,this.ref=0,this.reconnectTimer=null,this.vsn=Gr,this.logger=En,this.conn=null,this.sendBuffer=[],this.serializer=new on,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),!(null===(r=null==t?void 0:t.params)||void 0===r?void 0:r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=t.params.apikey,this.endPoint=`${e}/${tn.websocket}`,this.httpEndpoint=vn(e),this._initializeOptions(t),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(null==t?void 0:t.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||null!==this.conn&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=Hr.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const t=e.message;if(t.includes("Node.js"))throw new Error(`${t}\n\nTo use Realtime in Node.js, you need to provide a WebSocket implementation:\n\nOption 1: Use Node.js 22+ which has native WebSocket support\nOption 2: Install and provide the "ws" package:\n\n npm install ws\n\n import ws from "ws"\n const client = new RealtimeClient(url, {\n ...options,\n transport: ws\n })`);throw new Error(`WebSocket not available: ${t}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(e,t){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},"function"==typeof this.conn.close&&(e?this.conn.close(e,null!=t?t:""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const t=await e.unsubscribe();return 0===this.channels.length&&this.disconnect(),t}async removeAllChannels(){const e=await Promise.all(this.channels.map(e=>e.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,t,r){this.logger(e,t,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Jr.connecting:return rn.Connecting;case Jr.open:return rn.Open;case Jr.closing:return rn.Closing;default:return rn.Closed}}isConnected(){return this.connectionState()===rn.Open}isConnecting(){return"connecting"===this._connectionState}isDisconnecting(){return"disconnecting"===this._connectionState}channel(e,t={config:{}}){const r=`realtime:${e}`,n=this.getChannels().find(e=>e.topic===r);if(n)return n;{const r=new Pn(`realtime:${e}`,t,this);return this.channels.push(r),r}}push(e){const{topic:t,event:r,payload:n,ref:i}=e,s=()=>{this.encode(e,e=>{var t;null===(t=this.conn)||void 0===t||t.send(e)})};this.log("push",`${t} ${r} (${i})`,n),this.isConnected()?s():this.sendBuffer.push(s)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(Yf){this.log("error","error in heartbeat callback",Yf)}return this._wasManualDisconnect=!1,null===(e=this.conn)||void 0===e||e.close(1e3,"heartbeat timeout"),void setTimeout(()=>{var e;this.isConnected()||null===(e=this.reconnectTimer)||void 0===e||e.scheduleTimeout()},On)}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(Yf){this.log("error","error in heartbeat callback",Yf)}this._setAuthSafely("heartbeat")}else try{this.heartbeatCallback("disconnected")}catch(Yf){this.log("error","error in heartbeat callback",Yf)}}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t._isJoined()||t._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,e=>{if("phoenix"===e.topic&&"phx_reply"===e.event)try{this.heartbeatCallback("ok"===e.payload.status?"ok":"error")}catch(Yf){this.log("error","error in heartbeat callback",Yf)}e.ref&&e.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:t,event:r,payload:n,ref:i}=e,s=i?`(${i})`:"",a=n.status||"";this.log("receive",`${a} ${t} ${r} ${s}`.trim(),n),this.channels.filter(e=>e._isMember(t)).forEach(e=>e._trigger(r,n,i)),this._triggerStateCallbacks("message",e)})}_clearTimer(e){var t;"heartbeat"===e&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):"reconnect"===e&&(null===(t=this.reconnectTimer)||void 0===t||t.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_teardownConnection(){if(this.conn){if(this.conn.readyState===Jr.open||this.conn.readyState===Jr.connecting)try{this.conn.close()}catch(Yf){this.log("error","Error closing connection",Yf)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`);(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(e=>{this.log("error","error waiting for auth on connect",e),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log("worker","worker error",e.message),this.workerRef.terminate()},this.workerRef.onmessage=e=>{"keepAlive"===e.data.event&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){var t;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||null===(t=this.reconnectTimer)||void 0===t||t.scheduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(Qr.error))}_appendParams(e,t){if(0===Object.keys(t).length)return e;const r=e.match(/\?/)?"&":"?";return`${e}${r}${new URLSearchParams(t)}`}_workerObjectUrl(e){let t;if(e)t=e;else{const e=new Blob(['\n addEventListener("message", (e) => {\n if (e.data.event === "start") {\n setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);\n }\n });'],{type:"application/javascript"});t=URL.createObjectURL(e)}return t}_setConnectionState(e,t=!1){this._connectionState=e,"connecting"===e?this._wasManualDisconnect=!1:"disconnecting"===e&&(this._wasManualDisconnect=t)}async _performAuth(e=null){let t;t=e||(this.accessToken?await this.accessToken():this.accessTokenValue),this.accessTokenValue!=t&&(this.accessTokenValue=t,this.channels.forEach(e=>{const r={access_token:t,version:"realtime-js/2.84.0"};t&&e.updateJoinPayload(r),e.joinedOnce&&e._isJoined()&&e._push(Qr.access_token,{access_token:t})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this.setAuth().catch(t=>{this.log("error",`error setting auth in ${e}`,t)})}_triggerStateCallbacks(e,t){try{this.stateChangeCallbacks[e].forEach(r=>{try{r(t)}catch(Yf){this.log("error",`error in ${e} callback`,Yf)}})}catch(Yf){this.log("error",`error triggering ${e} callbacks`,Yf)}}_setupReconnectionTimer(){this.reconnectTimer=new ln(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Tn)},this.reconnectAfterMs)}_initializeOptions(e){var t,r,n,i,s,a,o,l,c,u,h,d;switch(this.transport=null!==(t=null==e?void 0:e.transport)&&void 0!==t?t:null,this.timeout=null!==(r=null==e?void 0:e.timeout)&&void 0!==r?r:Kr,this.heartbeatIntervalMs=null!==(n=null==e?void 0:e.heartbeatIntervalMs)&&void 0!==n?n:In,this.worker=null!==(i=null==e?void 0:e.worker)&&void 0!==i&&i,this.accessToken=null!==(s=null==e?void 0:e.accessToken)&&void 0!==s?s:null,this.heartbeatCallback=null!==(a=null==e?void 0:e.heartbeatCallback)&&void 0!==a?a:En,this.vsn=null!==(o=null==e?void 0:e.vsn)&&void 0!==o?o:Gr,(null==e?void 0:e.params)&&(this.params=e.params),(null==e?void 0:e.logger)&&(this.logger=e.logger),((null==e?void 0:e.logLevel)||(null==e?void 0:e.log_level))&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=null!==(l=null==e?void 0:e.reconnectAfterMs)&&void 0!==l?l:e=>Cn[e-1]||1e4,this.vsn){case Vr:this.encode=null!==(c=null==e?void 0:e.encode)&&void 0!==c?c:(e,t)=>t(JSON.stringify(e)),this.decode=null!==(u=null==e?void 0:e.decode)&&void 0!==u?u:(e,t)=>
21t(JSON.parse(e));break;case"2.0.0":this.encode=null!==(h=null==e?void 0:e.encode)&&void 0!==h?h:this.serializer.encode.bind(this.serializer),this.decode=null!==(d=null==e?void 0:e.decode)&&void 0!==d?d:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if("undefined"!=typeof window&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=null==e?void 0:e.workerUrl}}}class Fn extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Bn(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}class Dn extends Fn{constructor(e,t,r){super(e),this.name="StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Mn extends Fn{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}const Un=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),qn=e=>{if(Array.isArray(e))return e.map(e=>qn(e));if("function"==typeof e||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([e,r])=>{const n=e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,""));t[n]=qn(r)}),t},zn=e=>{var t;return e.msg||e.message||e.error_description||("string"==typeof e.error?e.error:null===(t=e.error)||void 0===t?void 0:t.message)||JSON.stringify(e)},$n=(e,t,r)=>d(void 0,void 0,void 0,function*(){const n=yield Response;e instanceof n&&!(null==r?void 0:r.noResolveJson)?e.json().then(r=>{const n=e.status||500,i=(null==r?void 0:r.statusCode)||n+"";t(new Dn(zn(r),n,i))}).catch(e=>{t(new Mn(zn(e),e))}):t(new Mn(zn(e),e))}),Wn=(e,t,r,n)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"!==e&&n?((e=>{if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)})(n)?(i.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),i.body=JSON.stringify(n)):i.body=n,(null==t?void 0:t.duplex)&&(i.duplex=t.duplex),Object.assign(Object.assign({},i),r)):i};function Hn(e,t,r,n,i,s){return d(this,void 0,void 0,function*(){return new Promise((a,o)=>{e(r,Wn(t,n,i,s)).then(e=>{if(!e.ok)throw e;return(null==n?void 0:n.noResolveJson)?e:e.json()}).then(e=>a(e)).catch(e=>$n(e,o,n))})})}function Vn(e,t,r,n){return d(this,void 0,void 0,function*(){return Hn(e,"GET",t,r,n)})}function Gn(e,t,r,n,i){return d(this,void 0,void 0,function*(){return Hn(e,"POST",t,n,i,r)})}function Kn(e,t,r,n,i){return d(this,void 0,void 0,function*(){return Hn(e,"PUT",t,n,i,r)})}function Jn(e,t,r,n,i){return d(this,void 0,void 0,function*(){return Hn(e,"DELETE",t,n,i,r)})}class Yn{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}execute(){return d(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Bn(e))return{data:null,error:e};throw e}})}}var Zn;class Xn{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Zn]="BlobDownloadBuilder",this.promise=null}asStream(){return new Yn(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return d(this,void 0,void 0,function*(){try{const e=yield this.downloadFn();return{data:yield e.blob(),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Bn(e))return{data:null,error:e};throw e}})}}Zn=Symbol.toStringTag;const Qn={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},ei={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class ti{constructor(e,t={},r,n){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=r,this.fetch=Un(n)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(e,t,r,n){return d(this,void 0,void 0,function*(){try{let i;const s=Object.assign(Object.assign({},ei),n);let a=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(s.upsert)});const o=s.metadata;if("undefined"!=typeof Blob&&r instanceof Blob)i=new FormData,i.append("cacheControl",s.cacheControl),o&&i.append("metadata",this.encodeMetadata(o)),i.append("",r);else if("undefined"!=typeof FormData&&r instanceof FormData)i=r,i.has("cacheControl")||i.append("cacheControl",s.cacheControl),o&&!i.has("metadata")&&i.append("metadata",this.encodeMetadata(o));else{i=r,a["cache-control"]=`max-age=${s.cacheControl}`,a["content-type"]=s.contentType,o&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(o)));("undefined"!=typeof ReadableStream&&i instanceof ReadableStream||i&&"object"==typeof i&&"pipe"in i&&"function"==typeof i.pipe)&&!s.duplex&&(s.duplex="half")}(null==n?void 0:n.headers)&&(a=Object.assign(Object.assign({},a),n.headers));const l=this._removeEmptyFolders(t),c=this._getFinalPath(l),u=yield("PUT"==e?Kn:Gn)(this.fetch,`${this.url}/object/${c}`,i,Object.assign({headers:a},(null==s?void 0:s.duplex)?{duplex:s.duplex}:{}));return{data:{path:l,id:u.Id,fullPath:u.Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Bn(i))return{data:null,error:i};throw i}})}upload(e,t,r){return d(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,r)})}uploadToSignedUrl(e,t,r,n){return d(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(e),s=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${s}`);a.searchParams.set("token",t);try{let e;const t=Object.assign({upsert:ei.upsert},n),s=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!=typeof Blob&&r instanceof Blob?(e=new FormData,e.append("cacheControl",t.cacheControl),e.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?(e=r,e.append("cacheControl",t.cacheControl)):(e=r,s["cache-control"]=`max-age=${t.cacheControl}`,s["content-type"]=t.contentType);return{data:{path:i,fullPath:(yield Kn(this.fetch,a.toString(),e,{headers:s})).Key},error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Bn(o))return{data:null,error:o};throw o}})}createSignedUploadUrl(e,t){return d(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e);const n=Object.assign({},this.headers);(null==t?void 0:t.upsert)&&(n["x-upsert"]="true");const i=yield Gn(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:n}),s=new URL(this.url+i.url),a=s.searchParams.get("token");if(!a)throw new Fn("No token returned by API");return{data:{signedUrl:s.toString(),path:e,token:a},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Bn(r))return{data:null,error:r};throw r}})}update(e,t,r){return d(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,r)})}move(e,t,r){return d(this,void 0,void 0,function*(){try{return{data:yield Gn(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,de
21stinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Bn(n))return{data:null,error:n};throw n}})}copy(e,t,r){return d(this,void 0,void 0,function*(){try{return{data:{path:(yield Gn(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Bn(n))return{data:null,error:n};throw n}})}createSignedUrl(e,t,r){return d(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e),i=yield Gn(this.fetch,`${this.url}/object/sign/${n}`,Object.assign({expiresIn:t},(null==r?void 0:r.transform)?{transform:r.transform}:{}),{headers:this.headers});const s=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${s}`)},{data:i,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Bn(n))return{data:null,error:n};throw n}})}createSignedUrls(e,t,r){return d(this,void 0,void 0,function*(){try{const n=yield Gn(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),i=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return{data:n.map(e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI(`${this.url}${e.signedURL}${i}`):null})),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Bn(n))return{data:null,error:n};throw n}})}download(e,t){const r=void 0!==(null==t?void 0:t.transform)?"render/image/authenticated":"object",n=this.transformOptsToQueryString((null==t?void 0:t.transform)||{}),i=n?`?${n}`:"",s=this._getFinalPath(e);return new Xn(()=>Vn(this.fetch,`${this.url}/${r}/${s}${i}`,{headers:this.headers,noResolveJson:!0}),this.shouldThrowOnError)}info(e){return d(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{const e=yield Vn(this.fetch,`${this.url}/object/info/${t}`,{headers:this.headers});return{data:qn(e),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Bn(r))return{data:null,error:r};throw r}})}exists(e){return d(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{return yield function(e,t,r,n){return d(this,void 0,void 0,function*(){return Hn(e,"HEAD",t,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}(this.fetch,`${this.url}/object/${t}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Bn(r)&&r instanceof Mn){const e=r.originalError;if([400,404].includes(null==e?void 0:e.status))return{data:!1,error:r}}throw r}})}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],i=(null==t?void 0:t.download)?`download=${!0===t.download?"":t.download}`:"";""!==i&&n.push(i);const s=void 0!==(null==t?void 0:t.transform)?"render/image":"object",a=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==a&&n.push(a);let o=n.join("&");return""!==o&&(o=`?${o}`),{data:{publicUrl:encodeURI(`${this.url}/${s}/public/${r}${o}`)}}}remove(e){return d(this,void 0,void 0,function*(){try{return{data:yield Jn(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Bn(t))return{data:null,error:t};throw t}})}list(e,t,r){return d(this,void 0,void 0,function*(){try{const n=Object.assign(Object.assign(Object.assign({},Qn),t),{prefix:e||""});return{data:yield Gn(this.fetch,`${this.url}/object/list/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Bn(n))return{data:null,error:n};throw n}})}listV2(e,t){return d(this,void 0,void 0,function*(){try{const r=Object.assign({},e);return{data:yield Gn(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},t),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Bn(r))return{data:null,error:r};throw r}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return"undefined"!=typeof Buffer?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const ri="2.84.0",ni={"X-Client-Info":`storage-js/${ri}`};class ii{constructor(e,t={},r,n){this.shouldThrowOnError=!1;const i=new URL(e);if(null==n?void 0:n.useNewHostname){/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."))}this.url=i.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},ni),t),this.fetch=Un(r)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(e){return d(this,void 0,void 0,function*(){try{const t=this.listBucketOptionsToQueryString(e);return{data:yield Vn(this.fetch,`${this.url}/bucket${t}`,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Bn(t))return{data:null,error:t};throw t}})}getBucket(e){return d(this,void 0,void 0,function*(){try{return{data:yield Vn(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Bn(t))return{data:null,error:t};throw t}})}createBucket(e){return d(this,arguments,void 0,function*(e,t={public:!1}){try{return{data:yield Gn(this.fetch,`${this.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Bn(r))return{data:null,error:r};throw r}})}updateBucket(e,t){return d(this,void 0,void 0,function*(){try{return{data:yield Kn(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Bn(r))return{data:null,error:r};throw r}})}emptyBucket(e){return d(this,void 0,void 0,function*(){try{return{data:yield Gn(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Bn(t))return{data:null,error:t};throw t}})}deleteBucket(e){return d(this,void 0,void 0,function*(){try{return{data:yield Jn(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Bn(t))return{data:null,error:t};throw t}})}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}}class si{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},ni),t),this.fetch=Un(r)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return d(this,void 0,void 0,function*(){try{return{data:yield Gn(this.fetch,`${this.url}/bucket`,{name:e},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Bn(t))return{data:null,error:t};throw t}})}listBuckets(e){return d(this,void 0,void 0,function*(){try{const t=new URLSearchParams;void 0!==(null==e?void 0:e.limit)&&t.set("limit",e.limit.toString()),void 0!==(null==e?void 0:e.offset)&&t.set("offset",e.offset.toString()),(null==e?void 0:e.sortColumn)&&t.set("sortColumn",e.sortColumn),(null==e?void 0:e.sortOrder)&&t.set("sortOrder",e.sortOrder),(null==e?void 0:e.search)&&t.set("search",e.search);const r=t.toString(),n=r?`${this.url}/bucket?${r}`:`${this.url}/bucket`;return{data:yield Vn(this.fetch,n,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Bn(t))return{data:null,error:t};throw t}})}deleteBucket(e){return d(this,void 0,void 0,function*(){try{return{data:yield Jn(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Bn(t))return{data:null,error:t};throw t}})}}const ai={"X-Client-Info":`storage-js/${ri}`,"Content-Type":"application/json"};
21class oi extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function li(e){return"object"==typeof e&&null!==e&&"__isStorageVectorsError"in e}class ci extends oi{constructor(e,t,r){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class ui extends oi{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}}var hi,di;(di=hi||(hi={})).InternalError="InternalError",di.S3VectorConflictException="S3VectorConflictException",di.S3VectorNotFoundException="S3VectorNotFoundException",di.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",di.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",di.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded";const fi=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),pi=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),mi=(e,t,r,n)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return n?((e=>{if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)})(n)?(i.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),i.body=JSON.stringify(n)):i.body=n,Object.assign(Object.assign({},i),r)):i};function gi(e,t,r,n,i,s){return d(this,void 0,void 0,function*(){return new Promise((a,o)=>{e(r,mi(t,n,i,s)).then(e=>{if(!e.ok)throw e;if(null==n?void 0:n.noResolveJson)return e;const t=e.headers.get("content-type");return t&&t.includes("application/json")?e.json():{}}).then(e=>a(e)).catch(e=>((e,t,r)=>d(void 0,void 0,void 0,function*(){if(e&&"object"==typeof e&&"status"in e&&"ok"in e&&"number"==typeof e.status&&!(null==r?void 0:r.noResolveJson)){const r=e.status||500,n=e;if("function"==typeof n.json)n.json().then(e=>{const n=(null==e?void 0:e.statusCode)||(null==e?void 0:e.code)||r+"";t(new ci(pi(e),r,n))}).catch(()=>{const e=r+"",i=n.statusText||`HTTP ${r} error`;t(new ci(i,r,e))});else{const e=r+"",i=n.statusText||`HTTP ${r} error`;t(new ci(i,r,e))}}else t(new ui(pi(e),e))}))(e,o,n))})})}function bi(e,t,r,n,i){return d(this,void 0,void 0,function*(){return gi(e,"POST",t,n,i,r)})}class vi{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},ai),t),this.fetch=fi(r)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(e){return d(this,void 0,void 0,function*(){try{return{data:(yield bi(this.fetch,`${this.url}/CreateIndex`,e,{headers:this.headers}))||{},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}getIndex(e,t){return d(this,void 0,void 0,function*(){try{return{data:yield bi(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(li(r))return{data:null,error:r};throw r}})}listIndexes(e){return d(this,void 0,void 0,function*(){try{return{data:yield bi(this.fetch,`${this.url}/ListIndexes`,e,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}deleteIndex(e,t){return d(this,void 0,void 0,function*(){try{return{data:(yield bi(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(li(r))return{data:null,error:r};throw r}})}}class wi{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},ai),t),this.fetch=fi(r)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(e){return d(this,void 0,void 0,function*(){try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield bi(this.fetch,`${this.url}/PutVectors`,e,{headers:this.headers}))||{},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}getVectors(e){return d(this,void 0,void 0,function*(){try{return{data:yield bi(this.fetch,`${this.url}/GetVectors`,e,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}listVectors(e){return d(this,void 0,void 0,function*(){try{if(void 0!==e.segmentCount){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
21if(void 0!==e.segmentIndex&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error("segmentIndex must be between 0 and "+(e.segmentCount-1))}return{data:yield bi(this.fetch,`${this.url}/ListVectors`,e,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}queryVectors(e){return d(this,void 0,void 0,function*(){try{return{data:yield bi(this.fetch,`${this.url}/QueryVectors`,e,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}deleteVectors(e){return d(this,void 0,void 0,function*(){try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield bi(this.fetch,`${this.url}/DeleteVectors`,e,{headers:this.headers}))||{},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}}class yi{constructor(e,t={},r){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},ai),t),this.fetch=fi(r)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return d(this,void 0,void 0,function*(){try{return{data:(yield bi(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}getBucket(e){return d(this,void 0,void 0,function*(){try{return{data:yield bi(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:e},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}listBuckets(){return d(this,arguments,void 0,function*(e={}){try{return{data:yield bi(this.fetch,`${this.url}/ListVectorBuckets`,e,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}deleteBucket(e){return d(this,void 0,void 0,function*(){try{return{data:(yield bi(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(li(t))return{data:null,error:t};throw t}})}}class _i extends yi{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new xi(this.url,this.headers,e,this.fetch)}}class xi extends vi{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}createIndex(e){const t=Object.create(null,{createIndex:{get:()=>super.createIndex}});return d(this,void 0,void 0,function*(){return t.createIndex.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const e=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return d(this,arguments,void 0,function*(t={}){return e.listIndexes.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName}))})}getIndex(e){const t=Object.create(null,{getIndex:{get:()=>super.getIndex}});return d(this,void 0,void 0,function*(){return t.getIndex.call(this,this.vectorBucketName,e)})}deleteIndex(e){const t=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return d(this,void 0,void 0,function*(){return t.deleteIndex.call(this,this.vectorBucketName,e)})}index(e){return new ki(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}class ki extends wi{constructor(e,t,r,n,i){super(e,t,i),this.vectorBucketName=r,this.indexName=n}putVectors(e){const t=Object.create(null,{putVectors:{get:()=>super.putVectors}});return d(this,void 0,void 0,function*(){return t.putVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(e){const t=Object.create(null,{getVectors:{get:()=>super.getVectors}});return d(this,void 0,void 0,function*(){return t.getVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const e=Object.create(null,{listVectors:{get:()=>super.listVectors}});return d(this,arguments,void 0,function*(t={}){return e.listVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(e){const t=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return d(this,void 0,void 0,function*(){return t.queryVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(e){const t=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return d(this,void 0,void 0,function*(){return t.deleteVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class Ni extends ii{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new ti(this.url,this.headers,e,this.fetch)}get vectors(){return new _i(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new si(this.url+"/iceberg",this.headers,this.fetch)}}let Si="";Si="undefined"!=typeof Deno?"deno":"undefined"!=typeof document?"web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?"react-native":"node";const Ai={headers:{"X-Client-Info":`supabase-js-${Si}/2.84.0`}},Li={schema:"public"},ji={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Pi={},Ei=(e,t,r)=>{const n=(e=>e?(...t)=>e(...t):(...e)=>fetch(...e))(r),i=Headers;return async(r,s)=>{var a;const o=null!==(a=await t())&&void 0!==a?a:e;let l=new i(null==s?void 0:s.headers);return l.has("apikey")||l.set("apikey",e),l.has("Authorization")||l.set("Authorization",`Bearer ${o}`),n(r,Object.assign(Object.assign({},s),{headers:l}))}};const Ii="2.84.0",Ti=3e4,Oi=9e4,Ci={"X-Client-Info":`gotrue-js/${Ii}`},Ri="X-Supabase-Api-Version",Fi={timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"},Bi=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
vendor: 17,126 bytes, line 21
21class Di extends Error{constructor(e,t,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=r}}function Mi(e){return"object"==typeof e&&null!==e&&"__isAuthError"in e}class Ui extends Di{constructor(e,t,r){super(e,t,r),this.name="AuthApiError",this.status=t,this.code=r}}class qi extends Di{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class zi extends Di{constructor(e,t,r,n){super(e,r,n),this.name=t,this.status=r}}class $i extends zi{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class Wi extends zi{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Hi extends zi{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Vi extends zi{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Gi extends zi{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ki extends zi{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function Ji(e){return Mi(e)&&"AuthRetryableFetchError"===e.name}class Yi extends zi{constructor(e,t,r){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=r}}class Zi extends zi{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Qi=" \t\n\r=".split(""),es=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Qi.length;t+=1)e[Qi[t].charCodeAt(0)]=-2;for(let t=0;t<Xi.length;t+=1)e[Xi[t].charCodeAt(0)]=t;return e})();function ts(e,t,r){if(null!==e)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const e=t.queue>>t.queuedBits-6&63;r(Xi[e]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const e=t.queue>>t.queuedBits-6&63;r(Xi[e]),t.queuedBits-=6}}function rs(e,t,r){const n=es[e];if(!(n>-1)){if(-2===n)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8}function ns(e){const t=[],r=e=>{t.push(String.fromCodePoint(e))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=e=>{!function(e,t,r){if(0===t.utf8seq){if(e<=127)return void r(e);for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(2===t.utf8seq)t.codepoint=31&e;else if(3===t.utf8seq)t.codepoint=15&e;else{if(4!==t.utf8seq)throw new Error("Invalid UTF-8 sequence");t.codepoint=7&e}t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|63&e,t.utf8seq-=1,0===t.utf8seq&&r(t.codepoint)}}(e,n,r)};for(let a=0;a<e.length;a+=1)rs(e.charCodeAt(a),i,s);return t.join("")}function is(e,t){if(!(e<=127)){if(e<=2047)return t(192|e>>6),void t(128|63&e);if(e<=65535)return t(224|e>>12),t(128|e>>6&63),void t(128|63&e);if(e<=1114111)return t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),void t(128|63&e);throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}t(e)}function ss(e){const t=[],r={queue:0,queuedBits:0},n=e=>{t.push(e)};for(let i=0;i<e.length;i+=1)rs(e.charCodeAt(i),r,n);return new Uint8Array(t)}function as(e){const t=[];return function(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const t=1024*(n-55296)&65535;n=65536+(e.charCodeAt(r+1)-56320&65535|t),r+=1}is(n,t)}}(e,e=>t.push(e)),new Uint8Array(t)}function os(e){const t=[],r={queue:0,queuedBits:0},n=e=>{t.push(e)};return e.forEach(e=>ts(e,r,n)),ts(null,r,n),t.join("")}const ls=()=>"undefined"!=typeof window&&"undefined"!=typeof document,cs={tested:!1,writable:!1},us=()=>{if(!ls())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(Yf){return!1}if(cs.tested)return cs.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),cs.tested=!0,cs.writable=!0}catch(Yf){cs.tested=!0,cs.writable=!1}return cs.writable};const hs=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),ds=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},fs=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(n){return r}},ps=async(e,t)=>{await e.removeItem(t)};class ms{constructor(){this.promise=new ms.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}function gs(e){const t=e.split(".");if(3!==t.length)throw new Zi("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!Bi.test(t[r]))throw new Zi("JWT not in base64url format");return{header:JSON.parse(ns(t[0])),payload:JSON.parse(ns(t[1])),signature:ss(t[2]),raw:{header:t[0],payload:t[1]}}}function bs(e){return("0"+e.toString(16)).substr(-2)}async function vs(e){if(!("undefined"!=typeof crypto&&void 0!==crypto.subtle&&"undefined"!=typeof TextEncoder))return e;const t=await async function(e){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t),n=new Uint8Array(r);return Array.from(n).map(e=>String.fromCharCode(e)).join("")}(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function ws(e,t,r=!1){const n=function(){const e=new Uint32Array(56);if("undefined"==typeof crypto){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length;let r="";for(let n=0;n<56;n++)r+=e.charAt(Math.floor(Math.random()*t));return r}return crypto.getRandomValues(e),Array.from(e,bs).join("")}();let i=n;r&&(i+="/PASSWORD_RECOVERY"),await ds(e,`${t}-code-verifier`,i);const s=await vs(n);return[s,n===s?"plain":"s256"]}ms.promiseConstructor=Promise;const ys=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;const _s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function xs(e){if(!_s.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function ks(){return new Proxy({},{get:(e,t)=>{if("__isUserNotAvailableProxy"===t)return!0;if("symbol"==typeof t){const e=t.toString();if("Symbol(Symbol.toPrimitive)"===e||"Symbol(Symbol.toStringTag)"===e||"Symbol(util.inspect.custom)"===e)return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Ns(e){return JSON.parse(JSON.stringify(e))}const Ss=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),As=[502,503,504];async function Ls(e){var t,r;if(!("object"==typeof(r=e)&&null!==r&&"status"in r&&"ok"in r&&"json"in r&&"function"==typeof r.json))throw new Ki(Ss(e),0);if(As.includes(e.status))throw new Ki(Ss(e),e.status);let n,i;try{n=await e.json()}catch(Yf){throw new qi(Ss(Yf),Yf)}const s=function(e){const t=e.headers.get(Ri);if(!t)return null;if(!t.match(ys))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch(Yf){return null}}(e);if(s&&s.getTime()>=Fi.timestamp&&"object"==typeof n&&n&&"string"==typeof n.code?i=n.code:"object"==typeof n&&n&&"string"==typeof n.error_code&&(i=n.error_code),i){if("weak_password"===i)throw new Yi(Ss(n),e.status,(null===(t=n.weak_password)||void 0===t?void 0:t.reasons)||[]);if("session_not_found"===i)throw new $i}else if("object"==typeof n&&n&&"object"==typeof n.weak_password&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0))throw new Yi(Ss(n),e.status,n.weak_password.reasons);throw new Ui(Ss(n),e.status||500,i)}async function js(e,t,r,n){var i;const s=Object.assign({},null==n?void 0:n.headers);s[Ri]||(s[Ri]=Fi.name),(null==n?void 0:n.jwt)&&(s.Authorization=`Bearer ${n.jwt}`);const a=null!==(i=null==n?void 0:n.query)&&void 0!==i?i:{};(null==n?void 0:n.redirectTo)&&(a.redirect_to=n.redirectTo);const o=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await async function(e,t,r,n,i,s){const a=((e,t,r,n)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==t?void 0:t.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))})(t,n,i,s);let o;try{o=await e(r,Object.assign({},a))}catch(Yf){throw new Ki(Ss(Yf),0)}o.ok||await Ls(o);if(null==n?void 0:n.noResolveJson)return o;try{return await o.json()}catch(Yf){await Ls(Yf)}}(e,t,r+o,{headers:s,noResolveJson:null==n?void 0:n.noResolveJson},{},null==n?void 0:n.body);return(null==n?void 0:n.xform)?null==n?void 0:n.xform(l):{data:Object.assign({},l),error:null}}function Ps(e){var t;let r=null;var n;(function(e){return e.access_token&&e.refresh_token&&e.expires_in})(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=(n=e.expires_in,Math.round(Date.now()/1e3)+n)));return{data:{session:r,user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function Es(e){const t=Ps(e);return!t.error&&e.weak_password&&"object"==typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"==typeof e.weak_password.message&&e.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0)&&(t.data.weak_password=e.weak_password),t}function Is(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function Ts(e){return{data:e,error:null}}function Os(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:s}=e,a=p(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]);return{data:{properties:{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:s},user:Object.assign({},a)},error:null}}function Cs(e){return e}const Rs=["global","local","others"];class Fs{constructor({url:e="",headers:t={},fetch:r}){this.url=e,this.headers=t,this.fetch=hs(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(e,t=Rs[0]){if(Rs.indexOf(t)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Rs.join(", ")}`);try{return await js(this.fetch,"POST",`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Mi(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,t={}){try{return await js(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:Is})}catch(r){if(Mi(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:t}=e,r=p(e,["options"]),n=Object.assign(Object.assign({},r),t);return"newEmail"in r&&(n.new_email=null==r?void 0:r.newEmail,delete n.newEmail),await js(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:n,headers:this.headers,xform:Os,redirectTo:null==t?void 0:t.redirectTo})}catch(t){if(Mi(t))return{data:{properties:null,user:null},error:t};throw t}}async createUser(e){try{return await js(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Is})}catch(t){if(Mi(t))return{data:{user:null},error:t};throw t}}async listUsers(e){var t,r,n,i,s,a,o;try{const l={nextPage:null,lastPage:0,total:0},c=await js(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:null!==(r=null===(t=null==e?void 0:e.page)||void 0===t?void 0:t.toString())&&void 0!==r?r:"",per_page:null!==(i=null===(n=null==e?void 0:e.perPage)||void 0===n?void 0:n.toString())&&void 0!==i?i:""},xform:Cs});if(c.error)throw c.error;const u=await c.json(),h=null!==(s=c.headers.get("x-total-count"))&&void 0!==s?s:0,d=null!==(o=null===(a=c.headers.get("link"))||void 0===a?void 0:a.split(","))&&void 0!==o?o:[];return d.length>0&&(d.forEach(e=>{const t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),r=JSON.parse(e.split(";")[1].split("=")[1]);l[`${r}Page`]=t}),l.total=parseInt(h)),{data:Object.assign(Object.assign({},u),l),error:null}}catch(l){if(Mi(l))return{data:{users:[]},error:l};throw l}}async getUserById(e){xs(e);try{return await js(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Is})}catch(t){if(Mi(t))return{data:{user:null},error:t};throw t}}async updateUserById(e,t){xs(e);try{return await js(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:Is})}catch(r){if(Mi(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,t=!1){xs(e);try{return await js(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:Is})}catch(r){if(Mi(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){xs(e.userId);try{const{data:t,error:r}=await js(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:r}}catch(t){if(Mi(t))return{data:null,error:t};throw t}}async _deleteFactor(e){xs(e.userId),xs(e.id);try{return{data:await js(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(t){if(Mi(t))return{data:null,error:t};throw t}}async _listOAuthClients(e){var t,r,n,i,s,a,o;try{const l={nextPage:null,lastPage:0,total:0},c=await js(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:null!==(r=null===(t=null==e?void 0:e.page)||void 0===t?void 0:t.toString())&&void 0!==r?r:"",per_page:null!==(i=null===(n=null==e?void 0:e.perPage)||void 0===n?void 0:n.toString())&&void 0!==i?i:""},xform:Cs});if(c.error)throw c.error;const u=await c.json(),h=null!==(s=c.headers.get("x-total-count"))&&void 0!==s?s:0,d=null!==(o=null===(a=c.headers.get("link"))||void 0===a?void 0:a.split(","))&&void 0!==o?o:[];return d.length>0&&(d.forEach(e=>{const t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),r=JSON.parse(e.split(";")[1].split("=")[1]);l[`${r}Page`]=t}),l.total=parseInt(h)),{data:Object.assign(Object.assign({},u),l),error:null}}catch(l){if(Mi(l))return{data:{clients:[]},error:l};throw l}}async _createOAuthClient(e){try{return await js(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(t){if(Mi(t))return{data:null,error:t};throw t}}async _getOAuthClient(e){try{return await js(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(t){if(Mi(t))return{data:null,error:t};throw t}}async _updateOAuthClient(e,t){try{return await js(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(r){if(Mi(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(e){try{return await js(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(t){if(Mi(t))return{data:null,error:t};throw t}}async _regenerateOAuthClientSecret(e){try{return await js(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(t){if(Mi(t))return{data:null,error:t};throw t}}}function Bs(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Ds=!!(globalThis&&us()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"));class Ms extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Us extends Ms{}async function qs(e,t,r){const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort()},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async n=>{if(!n){if(0===t)throw new Us(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Ds)try{await globalThis.navigator.locks.query()}catch(Yf){}return await r()}try{return await r()}finally{}}))}function zs(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
21" is invalid.`);return e.toLowerCase()}function $s(e){const t=(new TextEncoder).encode(e);return"0x"+Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")}class Ws extends Error{constructor({message:e,code:t,cause:r,name:n}){var i;super(e,{cause:r}),this.__isWebAuthnError=!0,this.name=null!==(i=null!=n?n:r instanceof Error?r.name:void 0)&&void 0!==i?i:"Unknown Error",this.code=t}}class Hs extends Ws{constructor(e,t){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t,message:e}),this.name="WebAuthnUnknownError",this.originalError=t}}function Vs({error:e,options:t}){var r,n,i;const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new Ws({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if("ConstraintError"===e.name){if(!0===(null===(r=s.authenticatorSelection)||void 0===r?void 0:r.requireResidentKey))return new Ws({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if("conditional"===t.mediation&&"required"===(null===(n=s.authenticatorSelection)||void 0===n?void 0:n.userVerification))return new Ws({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if("required"===(null===(i=s.authenticatorSelection)||void 0===i?void 0:i.userVerification))return new Ws({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if("InvalidStateError"===e.name)return new Ws({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if("NotAllowedError"===e.name)return new Ws({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if("NotSupportedError"===e.name){return 0===s.pubKeyCredParams.filter(e=>"public-key"===e.type).length?new Ws({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ws({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e})}if("SecurityError"===e.name){const t=window.location.hostname;if(!Qs(t))return new Ws({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(s.rp.id!==t)return new Ws({message:`The RP ID "${s.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("TypeError"===e.name){if(s.user.id.byteLength<1||s.user.id.byteLength>64)return new Ws({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if("UnknownError"===e.name)return new Ws({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ws({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function Gs({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if("AbortError"===e.name){if(t.signal instanceof AbortSignal)return new Ws({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if("NotAllowedError"===e.name)return new Ws({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if("SecurityError"===e.name){const t=window.location.hostname;if(!Qs(t))return new Ws({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e});if(r.rpId!==t)return new Ws({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else if("UnknownError"===e.name)return new Ws({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
21ROR",cause:e})}return new Ws({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}const Ks=new class{createNewAbortSignal(){if(this.controller){const e=new Error("Cancelling existing WebAuthn API call for new one");e.name="AbortError",this.controller.abort(e)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}};function Js(e){if(!e)throw new Error("Credential creation options are required");if("undefined"!=typeof PublicKeyCredential&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&"function"==typeof PublicKeyCredential.parseCreationOptionsFromJSON)return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,i=p(e,["challenge","user","excludeCredentials"]),s=ss(t).buffer,a=Object.assign(Object.assign({},r),{id:ss(r.id).buffer}),o=Object.assign(Object.assign({},i),{challenge:s,user:a});if(n&&n.length>0){o.excludeCredentials=new Array(n.length);for(let e=0;e<n.length;e++){const t=n[e];o.excludeCredentials[e]=Object.assign(Object.assign({},t),{id:ss(t.id).buffer,type:t.type||"public-key",transports:t.transports})}}return o}function Ys(e){if(!e)throw new Error("Credential request options are required");if("undefined"!=typeof PublicKeyCredential&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&"function"==typeof PublicKeyCredential.parseRequestOptionsFromJSON)return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=p(e,["challenge","allowCredentials"]),i=ss(t).buffer,s=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){s.allowCredentials=new Array(r.length);for(let e=0;e<r.length;e++){const t=r[e];s.allowCredentials[e]=Object.assign(Object.assign({},t),{id:ss(t.id).buffer,type:t.type||"public-key",transports:t.transports})}}return s}function Zs(e){var t;if("toJSON"in e&&"function"==typeof e.toJSON)return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:os(new Uint8Array(e.response.attestationObject)),clientDataJSON:os(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:null!==(t=r.authenticatorAttachment)&&void 0!==t?t:void 0}}function Xs(e){var t;if("toJSON"in e&&"function"==typeof e.toJSON)return e.toJSON();const r=e,n=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:os(new Uint8Array(i.authenticatorData)),clientDataJSON:os(new Uint8Array(i.clientDataJSON)),signature:os(new Uint8Array(i.signature)),userHandle:i.userHandle?os(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:null!==(t=r.authenticatorAttachment)&&void 0!==t?t:void 0}}function Qs(e){return"localhost"===e||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function ea(){var e,t;return!!(ls()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&"function"==typeof(null===(e=null===navigator||void 0===navigator?void 0:navigator.credentials)||void 0===e?void 0:e.create)&&"function"==typeof(null===(t=null===navigator||void 0===navigator?void 0:navigator.credentials)||void 0===t?void 0:t.get))}const ta={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},ra={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function na(...e){const t=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),n={};for(const i of e)if(i)for(const e in i){const s=i[e];if(void 0!==s)if(Array.isArray(s))n[e]=s;else if(r(s))n[e]=s;else if(t(s)){const r=n[e];t(r)?n[e]=na(r,s):n[e]=na(s)}else n[e]=s}return n}class ia{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:t,friendlyName:r,signal:n},i){try{const{data:s,error:a}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!s)return{data:null,error:a};const o=null!=n?n:Ks.createNewAbortSignal();if("create"===s.webauthn.type){const{user:e}=s.webauthn.credential_options.publicKey;e.name||(e.name=`${e.id}:${r}
21`),e.displayName||(e.displayName=e.name)}switch(s.webauthn.type){case"create":{const t=function(e,t){return na(ta,e,t||{})}(s.webauthn.credential_options.publicKey,null==i?void 0:i.create),{data:r,error:n}=await async function(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Hs("Browser returned unexpected credential type",t)}:{data:null,error:new Hs("Empty credential response",t)}}catch(t){return{data:null,error:Vs({error:t,options:e})}}}({publicKey:t,signal:o});return r?{data:{factorId:e,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:r}},error:null}:{data:null,error:n}}case"request":{const t=function(e,t){return na(ra,e,t||{})}(s.webauthn.credential_options.publicKey,null==i?void 0:i.request),{data:r,error:n}=await async function(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Hs("Browser returned unexpected credential type",t)}:{data:null,error:new Hs("Empty credential response",t)}}catch(t){return{data:null,error:Gs({error:t,options:e})}}}(Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:t,signal:o}));return r?{data:{factorId:e,challengeId:s.id,webauthn:{type:s.webauthn.type,credential_response:r}},error:null}:{data:null,error:n}}}}catch(s){return Mi(s)?{data:null,error:s}:{data:null,error:new qi("Unexpected error in challenge",s)}}}async _verify({challengeId:e,factorId:t,webauthn:r}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:r})}async _authenticate({factorId:e,webauthn:{rpId:t=("undefined"!=typeof window?window.location.hostname:void 0),rpOrigins:r=("undefined"!=typeof window?[window.location.origin]:void 0),signal:n}={}},i){if(!t)return{data:null,error:new Di("rpId is required for WebAuthn authentication")};try{if(!ea())return{data:null,error:new qi("Browser does not support WebAuthn",null)};const{data:s,error:a}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:r},signal:n},{request:i});if(!s)return{data:null,error:a};const{webauthn:o}=s;return this._verify({factorId:e,challengeId:s.challengeId,webauthn:{type:o.type,rpId:t,rpOrigins:r,credential_response:o.credential_response}})}catch(s){return Mi(s)?{data:null,error:s}:{data:null,error:new qi("Unexpected error in authenticate",s)}}}async _register({friendlyName:e,webauthn:{rpId:t=("undefined"!=typeof window?window.location.hostname:void 0),rpOrigins:r=("undefined"!=typeof window?[window.location.origin]:void 0),signal:n}={}},i){if(!t)return{data:null,error:new Di("rpId is required for WebAuthn registration")};try{if(!ea())return{data:null,error:new qi("Browser does not support WebAuthn",null)};const{data:s,error:a}=await this._enroll({friendlyName:e});if(!s)return await this.client.mfa.listFactors().then(t=>{var r;return null===(r=t.data)||void 0===r?void 0:r.all.find(t=>"webauthn"===t.factor_type&&t.friendly_name===e&&"unverified"!==t.status)}).then(e=>e?this.client.mfa.unenroll({factorId:null==e?void 0:e.id}):void 0),{data:null,error:a};const{data:o,error:l}=await this._challenge({factorId:s.id,friendlyName:s.friendly_name,webauthn:{rpId:t,rpOrigins:r},signal:n},{create:i});return o?this._verify({factorId:s.id,challengeId:o.challengeId,webauthn:{rpId:t,rpOrigins:r,type:o.webauthn.type,credential_response:o.webauthn.credential_response}}):{data:null,error:l}}catch(s){return Mi(s)?{data:null,error:s}:{data:null,error:new qi("Unexpected error in register",s)}}}}!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(Yf){"undefined"!=typeof self&&(self.globalThis=self)}}();const sa={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Ci,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function aa(e,t,r){return await r()}const oa={};class la{get jwks(){var e,t;return null!==(t=null===(e=oa[this.storageKey])||void 0===e?void 0:e.jwks)&&void 0!==t?t:{keys:[]}}set jwks(e){oa[this.storageKey]=Object.assign(Object.assign({},oa[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,t;return null!==(t=null===(e=oa[this.storageKey])||void 0===e?void 0:e.cachedAt)&&void 0!==t?t:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){oa[this.storageKey]=Object.assign(Object.assign({},oa[this.storageKey]),{cachedAt:e})}constructor(e){var t,r,n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},sa),e);if(this.storageKey=i.storageKey,this.instanceID=null!==(t=la.nextInstanceID[this.storageKey])&&void 0!==t?t:0,la.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,"function"==typeof i.debug&&(this.logger=i.debug),this.instanceID>0&&ls()){this._logPrefix();this.logDebugMessages}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new Fs({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=hs(i.fetch),this.lock=i.lock||aa,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,i.lock?this.lock=i.lock:ls()&&(null===(r=null===globalThis||void 0===globalThis?void 0:globalThis.navigator)||void 0===r?void 0:r.locks)?this.lock=qs:this.lock=aa,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new ia(this)}
vendor: 11,494 bytes, line 21
21,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:us()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Bs(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Bs(this.memoryStorage)),ls()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(Yf){}null===(n=this.broadcastChannel)||void 0===n||n.addEventListener("message",async e=>{this._debug("received broadcast notification from other tab or client",e),await this._notifyAllSubscribers(e.data.event,e.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Ii}) ${(new Date).toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))()),await this.initializePromise}async _initialize(){var e;try{let t={},r="none";if(ls()&&(t=function(e){const t={},r=new URL(e);if(r.hash&&"#"===r.hash[0])try{new URLSearchParams(r.hash.substring(1)).forEach((e,r)=>{t[r]=e})}catch(Yf){}return r.searchParams.forEach((e,r)=>{t[r]=e}),t}(window.location.href),this._isImplicitGrantCallback(t)?r="implicit":await this._isPKCECallback(t)&&(r="pkce")),ls()&&this.detectSessionInUrl&&"none"!==r){const{data:n,error:i}=await this._getSessionFromURL(t,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),function(e){return Mi(e)&&"AuthImplicitGrantRedirectError"===e.name}(i)){const t=null===(e=i.details)||void 0===e?void 0:e.code;if("identity_already_exists"===t||"identity_not_found"===t||"single_identity_not_deletable"===t)return{error:i}}return await this._removeSession(),{error:i}}const{session:s,redirectType:a}=n;return this._debug("#_initialize()","detected session in URL",s,"redirect type",a),await this._saveSession(s),setTimeout(async()=>{"recovery"===a?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(t){return Mi(t)?this._returnResult({error:t}):this._returnResult({error:new qi("Unexpected error during initialization",t)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,r,n;try{const i=await js(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!==(r=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==r?r:{},gotrue_meta_security:{captcha_token:null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.captchaToken}},xform:Ps}),{data:s,error:a}=i;if(a||!s)return this._returnResult({data:{user:null,session:null},error:a});const o=s.session,l=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",o)),this._returnResult({data:{user:l,session:o},error:null})}catch(i){if(Mi(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var t,r,n;try{let i;if("email"in e){const{email:r,password:n,options:s}=e;let a=null,o=null;"pkce"===this.flowType&&([a,o]=await ws(this.storage,this.storageKey)),i=await js(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==s?void 0:s.emailRedirectTo,body:{email:r,password:n,data:null!==(t=null==s?void 0:s.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken},code_challenge:a,code_challenge_method:o},xform:Ps})}else{if(!("phone"in e))throw new Hi("You must provide either an email or phone number and a password");{const{phone:t,password:s,options:a}=e;i=await js(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:s,data:null!==(r=null==a?void 0:a.data)&&void 0!==r?r:{},channel:null!==(n=null==a?void 0:a.channel)&&void 0!==n?n:"sms",gotrue_meta_security:{captcha_token:null==a?void 0:a.captchaToken}},xform:Ps})}}const{data:s,error:a}=i;if(a||!s)return this._returnResult({data:{user:null,session:null},error:a});const o=s.session,l=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",o)),this._returnResult({data:{user:l,session:o},error:null})}catch(i){if(Mi(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let t;if("email"in e){const{email:r,password:n,options:i}=e;t=await js(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:r,password:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:Es})}else{if(!("phone"in e))throw new Hi("You must provide either an email or phone number and a password");{const{phone:r,password:n,options:i}=e;t=await js(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:r,password:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:Es})}}const{data:r,error:n}=t;if(n)return this._returnResult({data:{user:null,session:null},error:n});if(!r||!r.session||!r.user){const e=new Wi;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:n})}catch(t){if(Mi(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async signInWithOAuth(e){var t,r,n,i;return await this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(n=e.options)||void 0===n?void 0:n.queryParams,skipBrowserRedirect:null===(i=e.options)||void 0===i?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:t}=e;switch(t){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){var t,r,n,i,s,a,o,l,c,u,h;let d,f;if("message"in e)d=e.message,f=e.signature;else{const{chain:u,wallet:h,statement:p,options:m}=e;let g;if(ls())if("object"==typeof h)g=h;else{const e=window;if(!("ethereum"in e)||"object"!=typeof e.ethereum||!("request"in e.ethereum)||"function"!=typeof e.ethereum.request)throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.");g=e.ethereum}else{if("object"!=typeof h||!(null==m?void 0:m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");g=h}const b=new URL(null!==(t=null==m?void 0:m.url)&&void 0!==t?t:window.location.href),v=await g.request({method:"eth_requestAccounts"}).then(e=>e).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!v||0===v.length)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const w=zs(v[0]);let y=null===(r=null==m?void 0:m.signInWithEthereum)||void 0===r?void 0:r.chainId;if(!y){const e=await g.request({method:"eth_chainId"});y=parseInt(e,16)}d=function(e){var t;const{chainId:r,domain:n,expirationTime:i,issuedAt:s=new Date,nonce:a,notBefore:o,requestId:l,resources:c,scheme:u,uri:h,version:d}=e;if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if("1"!==d)throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(null===(t=e.statement)||void 0===t?void 0:t.includes("\n"))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);const f=`${u?`${u}://${n}`:n} wants you to sign in with your Ethereum account:\n${zs(e.address)}\n\n${e.statement?`${e.statement}\n`:""}`;let p=`URI: ${h}\nVersion: ${d}\nChain ID: ${r}${a?`\nNonce: ${a}`:""}\nIssued At: ${s.toISOString()}`;if(i&&(p+=`\nExpiration Time: ${i.toISOString()}`),o&&(p+=`\nNot Before: ${o.toISOString()}`),l&&(p+=`\nRequest ID: ${l}`),c){let e="\nResources:";for(const t of c){if(!t||"string"!=typeof t)throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${t}`);e+=`\n- ${t}`}p+=e}return`${f}\n${p}`}({domain:b.host,address:w,statement:p,uri:b.href,version:"1",chainId:y,nonce:null===(n=null==m?void 0:m.signInWithEthereum)||void 0===n?void 0:n.nonce,issuedAt:null!==(s=null===(i=null==m?void 0:m.signInWithEthereum)||void 0===i?void 0:i.issuedAt)&&void 0!==s?s:new Date,expirationTime:null===(a=null==m?void 0:m.signInWithEthereum)||void 0===a?void 0:a.expirationTime,notBefore:null===(o=null==m?void 0:m.signInWithEthereum)||void 0===o?void 0:o.notBefore,requestId:null===(l=null==m?void 0:m.signInWithEthereum)||void 0===l?void 0:l.requestId,resources:null===(c=null==m?void 0:m.signInWithEthereum)||void 0===c?void 0:c.resources}),f=await g.request({method:"personal_sign",params:[$s(d),w]})}try{const{data:t,error:r}=await js(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:d,signature:f},(null===(u=e.options)||void 0===u?void 0:u.captchaToken)?{gotrue_meta_security:{captcha_token:null===(h=e.options)||void 0===h?void 0:h.captchaToken}}:null),xform:Ps});if(r)throw r;if(!t||!t.session||!t.user){const e=new Wi;return this._returnResult({data:{user:null,session:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:Object.assign({},t),error:r})}catch(p){if(Mi(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(e){var t,r,n,i,s,a,o,l,c,u,h,d;let f,p;if("message"in e)f=e.message,p=e.signature;else{const{chain:h,wallet:d,statement:m,options:g}=e;let b;if(ls())if("object"==typeof d)b=d;else{const e=window;if(!("solana"in e)||"object"!=typeof e.solana||!("signIn"in e.solana&&"function"==typeof e.solana.signIn||"sign
21Message"in e.solana&&"function"==typeof e.solana.signMessage))throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.");b=e.solana}else{if("object"!=typeof d||!(null==g?void 0:g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=d}const v=new URL(null!==(t=null==g?void 0:g.url)&&void 0!==t?t:window.location.href);if("signIn"in b&&b.signIn){const e=await b.signIn(Object.assign(Object.assign(Object.assign({issuedAt:(new Date).toISOString()},null==g?void 0:g.signInWithSolana),{version:"1",domain:v.host,uri:v.href}),m?{statement:m}:null));let t;if(Array.isArray(e)&&e[0]&&"object"==typeof e[0])t=e[0];else{if(!(e&&"object"==typeof e&&"signedMessage"in e&&"signature"in e))throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");t=e}if(!("signedMessage"in t&&"signature"in t&&("string"==typeof t.signedMessage||t.signedMessage instanceof Uint8Array)&&t.signature instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields");f="string"==typeof t.signedMessage?t.signedMessage:(new TextDecoder).decode(t.signedMessage),p=t.signature}else{if(!("signMessage"in b&&"function"==typeof b.signMessage&&"publicKey"in b&&"object"==typeof b&&b.publicKey&&"toBase58"in b.publicKey&&"function"==typeof b.publicKey.toBase58))throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");f=[`${v.host} wants you to sign in with your Solana account:`,b.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${v.href}`,`Issued At: ${null!==(n=null===(r=null==g?void 0:g.signInWithSolana)||void 0===r?void 0:r.issuedAt)&&void 0!==n?n:(new Date).toISOString()}`,...(null===(i=null==g?void 0:g.signInWithSolana)||void 0===i?void 0:i.notBefore)?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...(null===(s=null==g?void 0:g.signInWithSolana)||void 0===s?void 0:s.expirationTime)?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...(null===(a=null==g?void 0:g.signInWithSolana)||void 0===a?void 0:a.chainId)?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...(null===(o=null==g?void 0:g.signInWithSolana)||void 0===o?void 0:o.nonce)?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...(null===(l=null==g?void 0:g.signInWithSolana)||void 0===l?void 0:l.requestId)?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...(null===(u=null===(c=null==g?void 0:g.signInWithSolana)||void 0===c?void 0:c.resources)||void 0===u?void 0:u.length)?["Resources",...g.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join("\n");const e=await b.signMessage((new TextEncoder).encode(f),"utf8");if(!(e&&e instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=e}}try{const{data:t,error:r}=await js(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:f,signature:os(p)},(null===(h=e.options)||void 0===h?void 0:h.captchaToken)?{gotrue_meta_security:{captcha_token:null===(d=e.options)||void 0===d?void 0:d.captchaToken}}:null),xform:Ps});if(r)throw r;if(!t||!t.session||!t.user){const e=new Wi;return this._returnResult({data:{user:null,session:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:Object.assign({},t),error:r})}catch(m){if(Mi(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async _exchangeCodeForSession(e){const t=await fs(this.storage,`${this.storageKey}-code-verifier`),[r,n]=(null!=t?t:"").split("/");try{const{data:t,error:i}=await js(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:Ps});if(await ps(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!t||!t.session||!t.user){const e=new Wi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:Object.assign(Object.assign({},t),{redirectType:null!=n?n:null}),error:i})}catch(i){if(Mi(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:t,provider:r,token:n,access_token:i,nonce:s}=e,a=await js(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:n,access_token:i,nonce:s,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:Ps}),{data:o,error:l}=a;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!o||!o.session||!o.user){const e=new Wi;return this._returnResult({data:{user:null,session:null},error:e})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:o,error:l})}catch(t){if(Mi(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async signInWithOtp(e){var t,r,n,i,s;try{if("email"in e){const{email:n,options:i}=e;let s=null,a=null;"pkce"===this.flowType&&([s,a]=await ws(this.storage,this.storageKey));const{error:o}=await js(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:n,data:null!==(t=null==i?void 0:i.data)&&void 0!==t?t:{}
vendor: 5,562 bytes, line 21
21,create_user:null===(r=null==i?void 0:i.shouldCreateUser)||void 0===r||r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},code_challenge:s,code_challenge_method:a},redirectTo:null==i?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}if("phone"in e){const{phone:t,options:r}=e,{data:a,error:o}=await js(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!==(n=null==r?void 0:r.data)&&void 0!==n?n:{},create_user:null===(i=null==r?void 0:r.shouldCreateUser)||void 0===i||i,gotrue_meta_security:{captcha_token:null==r?void 0:r.captchaToken},channel:null!==(s=null==r?void 0:r.channel)&&void 0!==s?s:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:null==a?void 0:a.message_id},error:o})}throw new Hi("You must provide either an email or phone number.")}catch(a){if(Mi(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var t,r;try{let n,i;"options"in e&&(n=null===(t=e.options)||void 0===t?void 0:t.redirectTo,i=null===(r=e.options)||void 0===r?void 0:r.captchaToken);const{data:s,error:a}=await js(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:n,xform:Ps});if(a)throw a;if(!s){throw new Error("An error occurred on token verification.")}const o=s.session,l=s.user;return(null==o?void 0:o.access_token)&&(await this._saveSession(o),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",o)),this._returnResult({data:{user:l,session:o},error:null})}catch(n){if(Mi(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithSSO(e){var t,r,n,i,s;try{let a=null,o=null;"pkce"===this.flowType&&([a,o]=await ws(this.storage,this.storageKey));const l=await js(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==r?r:void 0}),(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:o}),headers:this.headers,xform:Ts});return(null===(i=l.data)||void 0===i?void 0:i.url)&&ls()&&!(null===(s=e.options)||void 0===s?void 0:s.skipBrowserRedirect)&&window.location.assign(l.data.url),this._returnResult(l)}catch(a){if(Mi(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:t},error:r}=e;if(r)throw r;if(!t)throw new $i;const{error:n}=await js(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:n})})}catch(e){if(Mi(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const t=`${this.url}/resend`;if("email"in e){const{email:r,type:n,options:i}=e,{error:s}=await js(this.fetch,"POST",t,{headers:this.headers,body:{email:r,type:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},redirectTo:null==i?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:s})}if("phone"in e){const{phone:r,type:n,options:i}=e,{data:s,error:a}=await js(this.fetch,"POST",t,{headers:this.headers,body:{phone:r,type:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:null==s?void 0:s.message_id},error:a})}throw new Hi("You must provide either an email or phone number and a type")}catch(t){if(Mi(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async getSession(){await this.initializePromise;return await this._acquireLock(-1,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),r=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await r}catch(Yf){}})()),r}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(Yf){}})()),await e;this.pendingInLock.length;){const e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",(new Error).stack);try{let e=null;const t=await fs(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not val
21id"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=!!e.expires_at&&1e3*e.expires_at-Date.now()<Oi;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const t=await fs(this.userStorage,this.storageKey+"-user");(null==t?void 0:t.user)?e.user=t.user:e.user=ks()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const t={value:this.suppressGetSessionWarning};e.user=function(e,t){return new Proxy(e,{get:(e,r,n)=>{if("__isInsecureUserWarningProxy"===r)return!0;if("symbol"==typeof r){const t=r.toString();if("Symbol(Symbol.toPrimitive)"===t||"Symbol(Symbol.toStringTag)"===t||"Symbol(util.inspect.custom)"===t||"Symbol(nodejs.util.inspect.custom)"===t)return Reflect.get(e,r,n)}return t.value||"string"!=typeof r||(t.value=!0),Reflect.get(e,r,n)}})}(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:n,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:n},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;return await this._acquireLock(-1,async()=>await this._getUser())}async _getUser(e){try{return e?await js(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Is}):await this._useSession(async e=>{var t,r,n;const{data:i,error:s}=e;if(s)throw s;return(null===(t=i.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await js(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(n=null===(r=i.session)||void 0===r?void 0:r.access_token)&&void 0!==n?n:void 0,xform:Is}):{data:{user:null},error:new $i}})}catch(t){if(Mi(t))return function(e){return Mi(e)&&"AuthSessionMissingError"===e.name}(t)&&(await this._removeSession(),await ps(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:t});throw t}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async r=>{const{data:n,error:i}=r;if(i)throw i;if(!n.session)throw new $i;const s=n.session;let a=null,o=null;"pkce"===this.flowType&&null!=e.email&&([a,o]=await ws(this.storage,this.storageKey));const{data:l,error:c}=await js(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:o}),jwt:s.access_token,xform:Is});if(c)throw c;return s.user=l.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),this._returnResult({data:{user:s.user},error:null})})}catch(r){if(Mi(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new $i;const t=Date.now()/1e3;let r=t,n=!0,i=null;const{payload:s}=gs(e.access_token);if(s.exp&&(r=s.exp,n=r<=t),n){const{data:t,error:r}=await this._callRefreshToken(e.refresh_token);if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!t)return{data:{user:null,session:null},error:null};i=t}else{const{data:n,error:s}=await this._getUser(e.access_token);if(s)throw s;i={access_token:e.access_token,refresh_token:e.refresh_token,user:n.user,token_type:"bearer",expires_in:r-t,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(t){if(Mi(t))return this._returnResult({data:{session:null,user:null},error:t});throw t}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var r;if(!e){const{data:n,error:i}=t;if(i)throw i;e=null!==(r=n.session)&&void 0!==r?r:void 0}if(!(null==e?void 0:e.refresh_token))throw new $i;const{data:n,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):n?this._returnResult({data:{user:n.user,session:n},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(t){if(Mi(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async _getSessionFromURL(e,t){try{if(!ls())throw new Vi("No browser detected.");
vendor: 21,953 bytes, line 21
21if(e.error||e.error_description||e.error_code)throw new Vi(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(t){case"implicit":if("pkce"===this.flowType)throw new Gi("Not a valid PKCE flow url.");break;case"pkce":if("implicit"===this.flowType)throw new Vi("Not a valid implicit grant flow url.")}if("pkce"===t){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Gi("No code detected.");const{data:t,error:r}=await this._exchangeCodeForSession(e.code);if(r)throw r;const n=new URL(window.location.href);return n.searchParams.delete("code"),window.history.replaceState(window.history.state,"",n.toString()),{data:{session:t.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:n,access_token:i,refresh_token:s,expires_in:a,expires_at:o,token_type:l}=e;if(!(i&&a&&s&&l))throw new Vi("No session defined in URL");const c=Math.round(Date.now()/1e3),u=parseInt(a);let h=c+u;o&&(h=parseInt(o));const{data:d,error:f}=await this._getUser(i);if(f)throw f;const p={provider_token:r,provider_refresh_token:n,access_token:i,expires_in:u,expires_at:h,refresh_token:s,token_type:l,user:d.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:p,redirectType:e.type},error:null})}catch(r){if(Mi(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(e){return Boolean(e.access_token||e.error_description)}async _isPKCECallback(e){const t=await fs(this.storage,`${this.storageKey}-code-verifier`);return!(!e.code||!t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async t=>{var r;const{data:n,error:i}=t;if(i)return this._returnResult({error:i});const s=null===(r=n.session)||void 0===r?void 0:r.access_token;if(s){const{error:t}=await this.admin.signOut(s,e);if(t&&(!function(e){return Mi(e)&&"AuthApiError"===e.name}(t)||404!==t.status&&401!==t.status&&403!==t.status))return this._returnResult({error:t})}return"others"!==e&&(await this._removeSession(),await ps(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const t=Symbol("auth-callback"),r={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,r),(async()=>{await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async t=>{var r,n;try{const{data:{session:n},error:i}=t;if(i)throw i;await(null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",n)),this._debug("INITIAL_SESSION","callback id",e,"session",n)}catch(i){await(null===(n=this.stateChangeEmitters.get(e))||void 0===n?void 0:n.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i)}})}async resetPasswordForEmail(e,t={}){let r=null,n=null;"pkce"===this.flowType&&([r,n]=await ws(this.storage,this.storageKey,!0));try{return await js(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:n,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(i){if(Mi(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:t,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null})}catch(t){if(Mi(t))return this._returnResult({data:null,error:t});throw t}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var t;try{const{data:r,error:n}=await this._useSession(async t=>{var r,n,i,s,a;const{data:o,error:l}=t;if(l)throw l;const c=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null===(r=e.options)||void 0===r?void 0:r.redirectTo,scopes:null===(n=e.options)||void 0===n?void 0:n.scopes,queryParams:null===(i=e.options)||void 0===i?void 0:i.queryParams,skipBrowserRedirect:!0});return await js(this.fetch,"GET",c,{headers:this.headers,jwt:null!==(a=null===(s=o.session)||void 0===s?void 0:s.access_token)&&void 0!==a?a:void 0})});if(n)throw n;return ls()&&!(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)&&window.location.assign(null==r?void 0:r.url),this._returnResult({data:{provider:e.provider,url:null==r?void 0:r.url},error:null})}catch(r){if(Mi(r))return this._returnResult({data:{provider:e.provider,url:null},error:r});throw r}}async linkIdentityIdToken(e){return await this._useSession(async t=>{var r;try{const{error:n,data:{session:i}}=t;if(n)throw n;const{options:s,provider:a,token:o,access_token:l,nonce:c}=e,u=await js(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:null!==(r=null==i?void 0:i.access_token)&&void 0!==r?r:void 0,body:{provider:a,id_token:o,access_token:l,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken}},xform:Ps}),{data:h,error:d}=u;return d?this._returnResult({data:{user:null,session:null},error:d}):h&&h.session&&h.user?(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:d})):this._returnResult({data:{user:null,session:null},error:new Wi})}catch(n){if(Mi(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{var r,n;const{data:i,error:s}=t;if(s)throw s;return await js(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!==(n=null===(r=i.session)||void 0===r?void 0:r.access_token)&&void 0!==n?n:void 0})})}catch(t){if(Mi(t))return this._returnResult({data:null,error:t});throw t}}async _refreshAccessToken(e){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const i=Date.now();return await(r=async r=>(r>0&&await async function(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}(200*Math.pow(2,r-1)),this._debug(t,"refreshing attempt",r),await js(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Ps})),n=(e,t)=>{const r=200*Math.pow(2,e);return t&&Ji(t)&&Date.now()+r-i<Ti},new Promise((e,t)=>{(async()=>{for(let i=0;i<1/0;i++)try{const t=await r(i);if(!n(i,null,t))return void e(t)}catch(Yf){if(!n(i,Yf))return void t(Yf)}})()}))}catch(i){if(this._debug(t,"error",i),Mi(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}finally{this._debug(t,"end")}var r,n}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",r),ls()&&!t.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,t;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const i=await fs(this.storage,this.storageKey);if(i&&this.userStorage){let t=await fs(this.userStorage,this.storageKey+"-user");this.storage.isServer||!Object.is(this.storage,this.userStorage)||t||(t={user:i.user},await ds(this.userStorage,this.storageKey+"-user",t)),i.user=null!==(e=null==t?void 0:t.user)&&void 0!==e?e:ks()}else if(i&&!i.user&&!i.user){const e=await fs(this.storage,this.storageKey+"-user");e&&(null==e?void 0:e.user)?(i.user=e.user,await ps(this.storage,this.storageKey+"-user"),await ds(this.storage,this.storageKey,i)):i.user=ks()}if(this._debug(r,"session from storage",i),!this._isValidSession(i))return this._debug(r,"session is not valid"),void(null!==i&&await this._removeSession());const s=1e3*(null!==(t=i.expires_at)&&void 0!==t?t:1/0)-Date.now()<Oi;if(this._debug(r,`session has${s?"":" not"} expired with margin of 90000s`),s){if(this.autoRefreshToken&&i.refresh_token){const{error:e}=await this._callRefreshToken(i.refresh_token);e&&(Ji(e)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",e),await this._removeSession()))}}else if(i.user&&!0===i.user.__isUserNotAvailableProxy)try{const{data:e,error:t}=await this._getUser(i.access_token);!t&&(null==e?void 0:e.user)?(i.user=e.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(n){this._debug(r,"error getting user data, skipping SIGNED_IN notification",n)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){return void this._debug(r,"error",i)}finally{this._debug(r,"end")}}async _callRefreshToken(e){var t,r;if(!e)throw new $i;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const n=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{this.refreshingDeferred=new ms;const{data:t,error:r}=await this._refreshAccessToken(e);if(r)throw r;if(!t.session)throw new $i;await this._saveSession(t.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",t.session);const n={data:t.session,error:null};return this.refreshingDeferred.resolve(n),n}catch(i){if(this._debug(n,"error",i),Mi(i)){const e={data:null,error:i};return Ji(i)||await this._removeSession(),null===(t=this.refreshingDeferred)||void 0===t||t.resolve(e),e}throw null===(r=this.refreshingDeferred)||void 0===r||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(n,"end")}}async _notifyAllSubscribers(e,t,r=!0){const n=`#_notifyAllSubscribers(${e})`;this._debug(n,"begin",t,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:t});const n=[],i=Array.from(this.stateChangeEmitters.values()).map(async r=>{try{await r.callback(e,t)}catch(Yf){n.push(Yf)}});if(await Promise.all(i),n.length>0){for(let e=0;e<n.length;e+=1);throw n[0]}}finally{this._debug(n,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const t=Object.assign({},e),r=t.user&&!0===t.user.__isUserNotAvailableProxy;if(this.userStorage){!r&&t.user&&await ds(this.userStorage,this.storageKey+"-user",{user:t.user});const e=Object.assign({},t);delete e.user;const n=Ns(e);await ds(this.storage,this.storageKey,n)}else{const e=Ns(t);await ds(this.storage,this.storageKey,e)}}async _removeSession(){this._debug("#_removeSession()"),await ps(this.storage,this.storageKey),await ps(this.storage,this.storageKey+"-code-verifier"),await ps(this.storage,this.storageKey+"-user"),this.userStorage&&await ps(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&ls()&&(null===window||void 0===window?void 0:window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(Yf){}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Ti);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async t=>{const{data:{session:r}}=t;if(!r||!r.refresh_token||!r.expires_at)return void this._debug("#_autoRefreshTokenTick()","no session");const n=Math.floor((1e3*r.expires_at-e)/Ti);this._debug("#_autoRefreshTokenTick()",`access token expires in ${n} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),n<=3&&await this._callRefreshToken(r.refresh_token)})}catch(Yf){}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(Yf){if(!(Yf.isAcquireTimeout||Yf instanceof Ms))throw Yf;this._debug("auto refresh token tick lock not available")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ls()||!(null===window||void 0===window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),null===window||void 0===window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){}}async _onVisibilityChanged(e){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{"visible"===document.visibilityState?await this._recoverAndRefresh():this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting")}))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,r){const n=[`provider=${encodeURIComponent(t)}`];if((null==r?void 0:r.redirectTo)&&n.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),(null==r?void 0:r.scopes)&&n.push(`scopes=${encodeURIComponent(r.scopes)}`),"pkce"===this.flowType){const[e,t]=await ws(this.storage,this.storageKey),r=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});n.push(r.toString())}if(null==r?void 0:r.queryParams){const e=new URLSearchParams(r.queryParams);n.push(e.toString())}return(null==r?void 0:r.skipBrowserRedirect)&&n.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${n.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var r;const{data:n,error:i}=t;return i?this._returnResult({data:null,error:i}):await js(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null===(r=null==n?void 0:n.session)||void 0===r?void 0:r.access_token})})}catch(t){if(Mi(t))return this._returnResult({data:null,error:t});throw t}}async _enroll(e){try{return await this._useSession(async t=>{var r,n;const{data:i,error:s}=t;if(s)return this._returnResult({data:null,error:s});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},"phone"===e.factorType?{phone:e.phone}:"totp"===e.factorType?{issuer:e.issuer}:{}),{data:o,error:l}=await js(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:null===(r=null==i?void 0:i.session)||void 0===r?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):("totp"===e.factorType&&"totp"===o.type&&(null===(n=null==o?void 0:o.totp)||void 0===n?void 0:n.qr_code)&&(o.totp.qr_code=`data:image/svg+xml;utf-8,${o.totp.qr_code}`),this._returnResult({data:o,error:null}))})}catch(t){if(Mi(t))return this._returnResult({data:null,error:t});throw t}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var r;const{data:n,error:i}=t;if(i)return this._returnResult({data:null,error:i});const s=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:"create"===e.webauthn.type?Zs(e.webauthn.credential_response):Xs(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await js(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:s,headers:this.headers,jwt:null===(r=null==n?void 0:n.session)||void 0===r?void 0:r.access_token});return o?this._returnResult({data:null,error:o}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:o}))})}catch(t){if(Mi(t))return this._returnResult({data:null,error:t});throw t}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var r;const{data:n,error:i}=t;if(i)return this._returnResult({data:null,error:i});const s=await js(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:null===(r=null==n?void 0:n.session)||void 0===r?void 0:r.access_token});if(s.error)return s;const{data:a}=s;if("webauthn"!==a.type)return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Js(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Ys(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(t){if(Mi(t))return this._returnResult({data:null,error:t});throw t}})}async _challengeAndVerify(e){const{data:t,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){var e;const{data:{user:t},error:r}=await this.getUser();if(r)return{data:null,error:r};const n={all:[],phone:[],totp:[],webauthn:[]};for(const i of null!==(e=null==t?void 0:t.factors)&&void 0!==e?e:[])n.all.push(i),"verified"===i.status&&n[i.factor_type].push(i);return{data:n,error:null}}async _getAuthenticatorAssuranceLevel(){var e,t;const{data:{session:r},error:n}=await this.getSession();if(n)return this._returnResult({data:null,error:n});if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=gs(r.access_token);let s=null;i.aal&&(s=i.aal);let a=s;(null!==(t=null===(e=r.user.factors)||void 0===e?void 0:e.filter(e=>"verified"===e.status))&&void 0!==t?t:[]).length>0&&(a="aal2");return{data:{currentLevel:s,nextLevel:a,currentAuthenticationMethods:i.amr||[]},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await js(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new $i})})}catch(t){if(Mi(t))return this._returnResult({data:null,error:t});throw t}}async _approveAuthorization(e,t){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new $i});const s=await js(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:n.access_token,body:{action:"approve"},xform:e=>({data:e,error:null})});return s.data&&s.data.redirect_url&&ls()&&!(null==t?void 0:t.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(r){if(Mi(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(e,t){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new $i});const s=await js(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:n.access_token,body:{action:"deny"},xform:e=>({data:e,error:null})});return s.data&&s.data.redirect_url&&ls()&&!(null==t?void 0:t.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(r){if(Mi(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:t},error:r}=e;return r?this._returnResult({data:null,error:r}):t?await js(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new $i})})}catch(e){if(Mi(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await js(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},xform:()=>({data:{},error:null})}):this._returnResult({data:null,error:new $i})})}catch(t){if(Mi(t))return this._returnResult({data:null,error:t});throw t}}async fetchJwk(e,t={keys:[]}){let r=t.keys.find(t=>t.kid===e);if(r)return r;const n=Date.now();if(r=this.jwks.keys.find(t=>t.kid===e),r&&this.jwks_cached_at+6e5>n)return r;const{data:i,error:s}=await js(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(s)throw s;return i.keys&&0!==i.keys.length?(this.jwks=i,this.jwks_cached_at=n,r=i.keys.find(t=>t.kid===e),r||null):null}async getClaims(e,t={}){try{let r=e;if(!r){const{data:e,error:t}
21=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});r=e.session.access_token}const{header:n,payload:i,signature:s,raw:{header:a,payload:o}}=gs(r);(null==t?void 0:t.allowExpired)||function(e){if(!e)throw new Error("Missing exp claim");if(e<=Math.floor(Date.now()/1e3))throw new Error("JWT has expired")}(i.exp);const l=n.alg&&!n.alg.startsWith("HS")&&n.kid&&"crypto"in globalThis&&"subtle"in globalThis.crypto?await this.fetchJwk(n.kid,(null==t?void 0:t.keys)?{keys:t.keys}:null==t?void 0:t.jwks):null;if(!l){const{error:e}=await this.getUser(r);if(e)throw e;return{data:{claims:i,header:n,signature:s},error:null}}const c=function(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}(n.alg),u=await crypto.subtle.importKey("jwk",l,c,!0,["verify"]);if(!(await crypto.subtle.verify(c,u,s,as(`${a}.${o}`))))throw new Zi("Invalid JWT signature");return{data:{claims:i,header:n,signature:s},error:null}}catch(r){if(Mi(r))return this._returnResult({data:null,error:r});throw r}}}la.nextInstanceID={};const ca=la;class ua extends ca{constructor(e){super(e)}}class ha{constructor(e,t,r){var n,i,s;this.supabaseUrl=e,this.supabaseKey=t;const a=function(e){const t=null==e?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL((r=t).endsWith("/")?r:r+"/")}catch(n){throw Error("Invalid supabaseUrl: Provided URL is malformed.")}var r}(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const o=`sb-${a.hostname.split(".")[0]}-auth-token`,l=function(e,t){var r,n;const{db:i,auth:s,realtime:a,global:o}=e,{db:l,auth:c,realtime:u,global:h}=t,d={db:Object.assign(Object.assign({},l),i),auth:Object.assign(Object.assign({},c),s),realtime:Object.assign(Object.assign({},u),a),storage:{},global:Object.assign(Object.assign(Object.assign({},h),o),{headers:Object.assign(Object.assign({},null!==(r=null==h?void 0:h.headers)&&void 0!==r?r:{}),null!==(n=null==o?void 0:o.headers)&&void 0!==n?n:{})}),accessToken:async()=>""};return e.accessToken?d.accessToken=e.accessToken:delete d.accessToken,d}(null!=r?r:{},{db:Li,realtime:Pi,auth:Object.assign(Object.assign({},ji),{storageKey:o}),global:Ai});this.storageKey=null!==(n=l.auth.storageKey)&&void 0!==n?n:"",this.headers=null!==(i=l.global.headers)&&void 0!==i?i:{},l.accessToken?(this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(null!==(s=l.auth)&&void 0!==s?s:{},this.headers,l.global.fetch),this.fetch=Ei(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&this.accessToken().then(e=>this.realtime.setAuth(e)).catch(e=>{}),this.rest=new Mr(new URL("rest/v1",a).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this.storage=new Ni(this.storageUrl.href,this.headers,this.fetch,null==r?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new ir(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e,t;if(this.accessToken)return await this.accessToken();const{data:r}=await this.auth.getSession();return null!==(t=null===(e=r.session)||void 0===e?void 0:e.access_token)&&void 0!==t?t:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,storageKey:s,flowType:a,lock:o,debug:l,throwOnError:c},u,h){const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new ua({url:this.authUrl.href,headers:Object.assign(Object.assign({},d),u),storageKey:s,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,flowType:a,lock:o,debug:l,throwOnError:c,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>"authorization"===e.toLowerCase())})}_initRealtimeClient(e){return new Rn(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},null==e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",null==t?void 0:t.access_token)})}_handleTokenChanged(e,t,r){"TOKEN_REFRESHED"!==e&&"SIGNED_IN"!==e||this.changedAccessToken===r?"SIGNED_OUT"===e&&(this.realtime.setAuth(),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0):(this.changedAccessToken=r,this.realtime.setAuth(r))}}!function(){if("undefined"!=typeof window)return!1;if("undefined"==typeof process)return!1;const e=process.version;if(null==e)return!1;const t=e.match(/^v(\d+)\./);!!t&&parseInt(t[1],10)}();const da=(fa={auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}},new ha("https://lxwgtbwtyowknmifodcj.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imx4d2d0Ynd0eW93a25taWZvZGNqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjM3ODM2NTUsImV4cCI6MjA3OTM1OTY1NX0.bC1ZF3K2GGLRe_ZB3L3IA0x6Ac6j4jHByW28w6eji6s",fa));var fa;const pa=()=>n.jsx("footer",{className:"w-full py-6 px-4 mt-16 border-t border-border bg-background/50 backdrop-blur-sm",children:n.jsxs("div",{className:"max-w-7xl mx-auto flex flex-col sm:flex-row items-center justify-center gap-4",children:[n.jsxs("p",{className:"text-sm text-muted-foreground flex items-center gap-2",children:["Made with"," ",n.jsx(ge,{className:"h-4 w-4 text-red-500 fill-red-500 animate-pulse"})," ","by"," ",n.jsx("a",{href:"https://www.yourpaths.eu/",target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-primary hover:underline transition-colors",children:"Pathways"})]}),n.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:n.jsxs("p",{className:"flex items-center gap-2",children:["Powered by"," ",n.jsxs("a",{href:"https://lovable.dev",target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-primary hover:underline transition-colors flex items-center gap-1",children:[n.jsx(xe,{className:"h-4 w-4"}),"Lovable"]})]})})]})}),ma="/assets/pathways-logo-b5u-OF8u.png",ga=[{name:"Flow Efficiency Assessment",href:null,isInternal:!0},{name:"Flow Metrics",href:"https://simpleflowmetrics.lovable.app",isInternal:!1},{name:"Prioritization Frameworks",href:"https://prioritizationframeworks.lovable.app/",isInternal:!1}],ba=()=>{const[e,t]=T.useState(!1),r=T.useRef(null);return T.useEffect(()=>{const e=e=>{r.current&&!r.current.contains(e.target)&&t(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),n.jsx("header",{className:"sticky top-0 z-50 w-full border-b border-border bg-white",children:n.jsxs("div",{className:"container mx-auto flex h-16 items-center justify-between px-4",children:[n.jsxs(F,{to:"/",className:"flex items-center gap-2",children:[n.jsx("img",{src:ma,alt:"Pathways",className:"h-8 w-8"}),n.jsx("span",{className:"text-base tracking-wide text-foreground font-roboto font-extralight",children:"pathways"})]}),n.jsxs("div",{className:"relative",ref:r,children:[n.jsxs("button",{onClick:()=>t(!e),className:"flex items-center gap-2 rounded-md border border-border bg-white px-4 py-2 text-sm font-light text-foreground transition-colors hover:bg-muted/50",children:["Other Tools",n.jsx(de,{className:"h-4 w-4 transition-transform "+(e?"rotate-180":"")})]}),e&&n.jsx("div",{className:"absolute right-0 mt-2 w-56 rounded-md border border-border bg-white shadow-lg",children:n.jsx("ul",{className:"py-1",children:ga.map(e=>n.jsx("li",{children:null===e.href?n.jsx("span",{className:"block px-4 py-2 text-sm text-muted-foreground",children:e.name}):n.jsx("a",{href:e.href,onClick:()=>t(!1),className:"block px-4 py-2 text-sm text-foreground hover:bg-muted",children:e.name})},e.name))})})]})]})})},va=()=>{const e=B(),[t,r]=T.useState(null),[i,s]=T.useState(!0);T.useEffect(()=>{da.auth.getSession().then(({data:{session:e}})=>{r((null==e?void 0:e.user)??null),s(!1)});const{data:{subscription:e}}=da.auth.onAuthStateChange((e,t)=>{r((null==t?void 0:t.user)??null)});return()=>e.unsubscribe()},[]);return i?n.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:n.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}):n.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[n.jsx(ba,{}),n.jsx("div",{className:"flex flex-1 flex-col items-center justify-center px-4",children:n.jsxs("div",{className:"w-full max-w-2xl space-y-8 text-center",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex justify-center",children:n.jsx("img",{src:ma,alt:"Pathways Logo",className:"h-24 w-auto object-contain"})}),n.jsx("h1",{className:"text-4xl font-bold tracking-tight text-foreground sm:text-5xl",children:"Flow Efficiency Assessment"}),n.jsx("p",{className:"mx-auto max-w-xl text-lg text-muted-foreground",children:"Discover how your organization balances Resource Efficiency and Flow Efficiency. Get personalized insights powered by AI to optimize your team's performance."})]}),n.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:justify-center",children:[n.jsxs(Yt,{size:"lg",onClick:()=>{e(t?"/survey/flow-efficiency-assessment":"/auth")},className:"gap-2 text-lg",children:[t?"Continue to Survey":"Get Started",n.jsx(he,{className:"h-5 w-5"})]}),t&&n.jsxs(Yt,{variant:"outline",size:"lg",onClick:async()=>{await da.auth.signOut(),Mt.success("Signed out successfully")},className:"gap-2",children:[n.jsx(we,{className:"h-4 w-4"}),"Sign Out"]})]}),t&&n.jsxs("p",{className:"text-sm text-muted-foreground",children:["Signed in as ",n.jsx("span",{className:"font-semibold",children:t.email})]}),n.jsxs("div",{className:"mx-auto mt-12 max-w-xl space-y-4 rounded-lg border border-border bg-card p-6 text-left",children:[n.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"What to Expect"}),n.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"text-primary",children:"â¢"}),n.jsx("span",{children:"Complete an assessment of your team's efficie
21ncy patterns"})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"text-primary",children:"â¢"}),n.jsx("span",{children:"Receive AI-powered analysis and personalized recommendations"})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"text-primary",children:"â¢"}),n.jsx("span",{children:"Understand the balance between resource utilization and flow optimization"})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx("span",{className:"text-primary",children:"â¢"}),n.jsx("span",{children:"Takes approximately 5 minutes to complete"})]})]})]})]})}),n.jsx(pa,{})]})},wa=T.forwardRef(({className:e,type:t,...r},i)=>n.jsx("input",{type:t,className:wt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:i,...r}));function ya(){const[e,t]=T.useState(""),[r,i]=T.useState(!1),[s,a]=T.useState(!1),[o,l]=T.useState(!1),c=B(),u=T.useRef(!1);T.useEffect(()=>{const e=new URLSearchParams(window.location.hash.substring(1));if(e.has("access_token")||e.has("error_description")){if(l(!0),e.has("error_description")){const t=e.get("error_description")||"Authentication failed";return Mt.error(t.includes("expired")?"Magic link has expired. Please request a new one.":t),window.history.replaceState({},document.title,"/auth"),void l(!1)}setTimeout(()=>{da.auth.getSession().then(({data:{session:e}})=>{e||(Mt.error("Authentication timed out. Please try requesting a new magic link."),window.history.replaceState({},document.title,"/auth"),l(!1))})},3e4)}const{data:{subscription:t}}=da.auth.onAuthStateChange(async(e,t)=>{"SIGNED_IN"===e&&t&&!u.current&&(u.current=!0,await new Promise(e=>setTimeout(e,50)),window.history.replaceState({},document.title,"/auth"),Mt.success("Successfully authenticated!"),c("/survey/flow-efficiency-assessment?auth=processing",{state:{session:t}}))});return da.auth.getSession().then(({data:{session:e}})=>{e&&!u.current&&(u.current=!0,c("/survey/flow-efficiency-assessment?auth=processing",{state:{session:e}}))}),()=>t.unsubscribe()},[c]);return o?n.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[n.jsx(ba,{}),n.jsx("div",{className:"flex-1 flex items-center justify-center px-4",children:n.jsx("div",{className:"w-full max-w-md",children:n.jsx("div",{className:"rounded-lg border border-border bg-card p-8 shadow-lg",children:n.jsxs("div",{className:"flex flex-col items-center space-y-6 text-center",children:[n.jsx("img",{src:ma,alt:"Pathways Logo",className:"h-24 w-auto animate-pulse"}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Signing You In"}),n.jsx("p",{className:"text-muted-foreground",children:"Please wait while we authenticate your session..."})]})]})})})}),n.jsx(pa,{})]}):s?n.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[n.jsx(ba,{}),n.jsx("div",{className:"flex-1 flex items-center justify-center px-4",children:n.jsx("div",{className:"w-full max-w-md",children:n.jsx("div",{className:"rounded-lg border border-border bg-card p-8 shadow-lg",children:n.jsxs("div",{className:"flex flex-col items-center space-y-6 text-center",children:[n.jsx("div",{className:"rounded-full bg-primary/10 p-4",children:n.jsx(fe,{className:"h-12 w-12 text-primary"})}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Check Your Email"}),n.jsxs("p",{className:"text-muted-foreground",children:["We've sent a magic link to ",n.jsx("span",{className:"font-semibold text-foreground",children:e})]})]}),n.jsxs("div",{className:"w-full space-y-4 rounded-lg bg-muted/50 p-4",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"Click the link in the email to access your Flow Efficiency Assessment. The link will sign you in automatically."}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Don't see the email? Check your spam folder or request a new link."})]}),n.jsx(Yt,{variant:"outline",className:"w-full",onClick:()=>{a(!1),t("")},children:"Use a different email"})]})})})}),n.jsx(pa,{})]}):n.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[n.jsx(ba,{}),n.jsx("div",{className:"flex-1 flex items-center justify-center px-4",children:n.jsx("div",{className:"w-full max-w-md",children:n.jsx("div",{className:"rounded-lg border border-border bg-card p-8 shadow-lg",children:n.jsxs("div",{className:"flex flex-col space-y-6",children:[n.jsxs("div",{className:"flex flex-col items-center space-y-4 text-center",children:[n.jsx("img",{src:ma,alt:"Pathways Logo",className:"h-24 w-auto"}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Flow Efficiency Assessment"}),n.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Enter your email to receive a magic link and access the survey"})]})]}),n.jsxs("form",{onSubmit:async t=>{if(t.preventDefault(),e.trim()&&e.includes("@")){i(!0);try{const{error:t}=await da.auth.signInWithOtp({email:e.trim(),options:{emailRedirectTo:`${window.location.origin}/auth`}});t?Mt.error("Failed to send magic link. Please try again."):(a(!0),Mt.success("Check your email for the magic link!"))}catch(r){Mt.error("An unexpected error occurred. Please try again.")}finally{i(!1)}}else Mt.error("Please enter a valid email address")},className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{htmlFor:"email",className:"text-sm font-medium text-foreground",children:"Email Address"}),n.jsxs("div",{className:"relative",children:[n.jsx(ye,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),n.jsx(wa,{id:"email",type:"email",placeholder:"[email protected]",value:e,onCh
vendor: 8,582 bytes, line 21
21ange:e=>t(e.target.value),disabled:r,className:"pl-10",autoFocus:!0,required:!0})]})]}),n.jsx(Yt,{type:"submit",className:"w-full",disabled:r||!e.trim(),children:r?"Sending magic link...":n.jsxs(n.Fragment,{children:["Send Magic Link",n.jsx(he,{className:"ml-2 h-4 w-4"})]})})]}),n.jsxs("div",{className:"space-y-3 rounded-lg bg-muted/50 p-4",children:[n.jsx("p",{className:"text-xs font-semibold text-foreground",children:"What is a magic link?"}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"A magic link is a secure, password-free way to sign in. We'll send you an email with a link that signs you in automatically when clicked."})]})]})})})}),n.jsx(pa,{})]})}wa.displayName="Input";var _a=T.forwardRef((e,t)=>n.jsx(m.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null==(r=e.onMouseDown)||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));_a.displayName="Label";var xa=_a;const ka=ae("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Na=T.forwardRef(({className:e,...t},r)=>n.jsx(xa,{ref:r,className:wt(ka(),e),...t}));function Sa(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}function Aa(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}Na.displayName=xa.displayName;var La=T.createContext(void 0);function ja(e){const t=T.useContext(La);return e||t||"ltr"}var Pa="rovingFocusGroup.onEntryFocus",Ea={bubbles:!1,cancelable:!0},Ia="RovingFocusGroup",[Ta,Oa,Ca]=g(Ia),[Ra,Fa]=b(Ia,[Ca]),[Ba,Da]=Ra(Ia),Ma=T.forwardRef((e,t)=>n.jsx(Ta.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(Ta.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(Ua,{...e,ref:t})})}));Ma.displayName=Ia;var Ua=T.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:s=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:h=!1,...d}=e,f=T.useRef(null),p=v(t,f),g=ja(a),[b,_]=w({prop:o,defaultProp:l??null,onChange:c,caller:Ia}),[x,k]=T.useState(!1),N=y(u),S=Oa(r),A=T.useRef(!1),[L,j]=T.useState(0);return T.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(Pa,N),()=>e.removeEventListener(Pa,N)},[N]),n.jsx(Ba,{scope:r,orientation:i,dir:g,loop:s,currentTabStopId:b,onItemFocus:T.useCallback(e=>_(e),[_]),onItemShiftTab:T.useCallback(()=>k(!0),[]),onFocusableItemAdd:T.useCallback(()=>j(e=>e+1),[]),onFocusableItemRemove:T.useCallback(()=>j(e=>e-1),[]),children:n.jsx(m.div,{tabIndex:x||0===L?-1:0,"data-orientation":i,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Aa(e.onMouseDown,()=>{A.current=!0}),onFocus:Aa(e.onFocus,e=>{const t=!A.current;if(e.target===e.currentTarget&&t&&!x){const t=new CustomEvent(Pa,Ea);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=S().filter(e=>e.focusable);Wa([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),h)}}A.current=!1}),onBlur:Aa(e.onBlur,()=>k(!1))})})}),qa="RovingFocusGroupItem",za=T.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:s=!1,tabStopId:a,children:o,...l}=e,c=_(),u=a||c,h=Da(qa,r),d=h.currentTabStopId===u,f=Oa(r),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:b}=h;return T.useEffect(()=>{if(i)return p(),()=>g()},[i,p,g]),n.jsx(Ta.ItemSlot,{scope:r,id:u,focusable:i,active:s,children:n.jsx(m.span,{tabIndex:d?0:-1,"data-orientation":h.orientation,...l,ref:t,onMouseDown:Aa(e.onMouseDown,e=>{i?h.onItemFocus(u):e.preventDefault()}),onFocus:Aa(e.onFocus,()=>h.onItemFocus(u)),onKeyDown:Aa(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:$a[n]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=f().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){"prev"===t&&i.reverse();const s=i.indexOf(e.currentTarget);i=h.loop?(n=s+1,(r=i).map((e,t)=>r[(n+t)%r.length])):i.slice(s+1)}setTimeout(()=>Wa(i))}var r,n}),children:"function"==typeof o?o({isCurrentTabStop:d,hasTabStop:null!=b}):o})})});za.displayName=qa;var $a={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Wa(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var Ha=Ma,Va=za;var Ga="Radio",[Ka,Ja]=b(Ga),[Ya,Za]=Ka(Ga),Xa=T.forwardRef((e,t)=>{const{__scopeRadio:r,name:i,checked:s=!1,required:a,disabled:o,value:l="on",onCheck:c,form:u,...h}=e,[d,f]=T.useState(null),p=v(t,e=>f(e)),g=T.useRef(!1),b=!d||(u||!!d.closest("form"));return n.jsxs(Ya,{scope:r,checked:s,disabled:o,children:[n.jsx(m.button,{type:"button",role:"radio","aria-checked":s,"data-state":ro(s),"data-disabled":o?"":void 0,disabled:o,value:l,...h,ref:p,onClick:Sa(e.onClick,e=>{s||null==c||c(),b&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})}),b&&n.jsx(to,{control:d,bubbles:!g.current,name:i,value:l,checked:s,required:a,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});Xa.displayName=Ga;var Qa="RadioIndicator",eo=T.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:i,...s}=e,a=Za(Qa,r);return n.jsx(k,{present:i||a.checked,children:n.jsx(m.span,{"data-state":ro(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:t})})});eo.displayName=Qa;var to=T.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:i=!0,...s},a)=>{const o=T.useRef(null),l=v(o,a),c=function(e){const t=T.useRef({value:e,previous:e});return T.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(r),u=function(e){const[t,r]=T.useState(void 0);return x(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let i,s;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,s=t.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}(t);return T.useEffect(()=>{const e=o.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==r&&n){const t=new Event("click",{bubbles:i});n.call(e,r),e.dispatchEvent(t)}},[c,r,i]),n.jsx(m.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function ro(e){return e?"checked":"unchecked"}to.displayName="RadioBubbleInput";var no=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],io="RadioGroup",[so,ao]=b(io,[Fa,Ja]),oo=Fa(),lo=Ja(),[co,uo]=so(io),ho=T.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:i,defaultValue:s,value:a,required:o=!1,disabled:l=!1,orientation:c,dir:u,loop:h=!0,onValueChange:d,...f}=e,p=oo(r),g=ja(u),[b,v]=w({prop:a,defaultProp:s??null,onChange:d,caller:io});return n.jsx(co,{scope:r,name:i,required:o,disabled:l,value:b,onValueChange:v,children:n.jsx(Ha,{asChild:!0,...p,orientation:c,dir:g,loop:h,children:n.jsx(m.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:g,...f,ref:t})})})});ho.displayName=io;var fo="RadioGroupItem",po=T.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:i,...s}=e,a=uo(fo,r),o=a.disabled||i,l=oo(r),c=lo(r),u=T.useRef(null),h=v(t,u),d=a.value===s.value,f=T.useRef(!1);return T.useEffect(()=>{const e=e=>{no.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),n.jsx(Va,{asChild:!0,...l,focusable:!o,active:d,children:n.jsx(Xa,{disabled:o,required:a.required,checked:d,...c,...s,name:a.name,ref:h,onCheck:()=>a.onValueChange(s.value),onKeyDown:Sa(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Sa(s.onFocus,()=>{var e;f.current&&(null==(e=u.current)||e.click())})})})});po.displayName=fo;var mo=T.forwardRef((e,t)=>
21{const{__scopeRadioGroup:r,...i}=e,s=lo(r);return n.jsx(eo,{...s,...i,ref:t})});mo.displayName="RadioGroupIndicator";var go=ho,bo=po,vo=mo;const wo=T.forwardRef(({className:e,...t},r)=>n.jsx(go,{className:wt("grid gap-2",e),...t,ref:r}));wo.displayName=go.displayName;const yo=T.forwardRef(({className:e,...t},r)=>n.jsx(bo,{ref:r,className:wt("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:n.jsx(vo,{className:"flex items-center justify-center",children:n.jsx(pe,{className:"h-2.5 w-2.5 fill-current text-current"})})}));yo.displayName=bo.displayName;const _o=T.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:wt("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));_o.displayName="Card";T.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:wt("flex flex-col space-y-1.5 p-6",e),...t})).displayName="CardHeader";T.forwardRef(({className:e,...t},r)=>n.jsx("h3",{ref:r,className:wt("text-2xl font-semibold leading-none tracking-tight",e),...t})).displayName="CardTitle";T.forwardRef(({className:e,...t},r)=>n.jsx("p",{ref:r,className:wt("text-sm text-muted-foreground",e),...t})).displayName="CardDescription";T.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:wt("p-6 pt-0",e),...t})).displayName="CardContent";T.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:wt("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter";const xo=E,ko=P,No=T.forwardRef(({className:e,...t},r)=>n.jsx(N,{ref:r,className:wt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));No.displayName=N.displayName;const So=T.forwardRef(({className:e,children:t,...r},i)=>n.jsxs(ko,{children:[n.jsx(No,{}),n.jsxs(S,{ref:i,className:wt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,n.jsxs(A,{className:"absolute right-4 top-4 roun
21ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[n.jsx(Se,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));So.displayName=S.displayName;T.forwardRef(({className:e,...t},r)=>n.jsx(L,{ref:r,className:wt("text-lg font-semibold leading-none tracking-tight",e),...t})).displayName=L.displayName;T.forwardRef(({className:e,...t},r)=>n.jsx(j,{ref:r,className:wt("text-sm text-muted-foreground",e),...t})).displayName=j.displayName;const Ao=[{question:"People are assigned to multiple projects or teams simultaneously (e.g., 50% Project A, 50% Project B)",description:'We believe we can get more done by slicing people\'s time, ignoring the cost of "context switching" (the mental energy lost when changing tasks).'},{question:'Managers track and report on individual "utilization," "billable hours," or "resource allocation"',description:'The goal is 100% busyness. "Idle time" is seen as waste, rather than slack needed for flexibility.'},{question:"Teams are organized by job title (e.g., The Design Team, The Backend Team, The QA Team) and hand work off between them",description:"Work sits in queues waiting for the next department. We optimize for departmental efficiency, not end-to-end speed."},{question:'Work is broken down into tasks assigned to specific individuals; collaboration is seen as "distracting"',description:'We value "heads down" solo work over teamwork. If the assigned person gets stuck, the work stopsâor they start new work to stay busy, which increases WIP and delays everything.'},{question:"We release to production or show customers our work infrequently (e.g., quarterly or annually)",description:'We hold onto large amounts of "inventory" (unfinished work) before validating it, increasing the risk of building the wrong thing.'},{question:'Success is defined as "delivering the original scope on the original date," regardless of what we learned along the way',description:"We value compliance over adaptation. We pretend we can predict the future perfectly."},{question:"To meet deadlines, we rely on individuals working nights/weekends rather than reducing scope",description:"The system is unstable. We use human burnout as a buffer for poor planning."},{question:"Decisions (technical or product) require sign-off from people outside the team, often leading to delays",description:"The team lacks autonomy. Work stops frequently to wait for permission."}],Lo=[{question:"Team members are dedicated to one single team or goal at a time",description:"We prioritize focus. We eliminate the waste of context switching so people can solve complex problems deeply."},{question:'The team has all the skills (Design, Dev, Test, Ops) needed to go from "Idea" to "Done" without asking for outside help',description:"We have removed external dependencies. The team is a self-contained delivery unit."},{question:'Multiple people work together on the same item (pairing/swarming) to get it to "Done" faster',description:"We value work flowing quickly more than people being individually busy."},{question:"The team deliberately limits how many items are in progress; they finish existing work before starting new work",description:"We understand that too much work in progress creates traffic jams. We constrain the system to make it flow."},{question:"We slice work into small, independent pieces of value that can be delivered in days, not months",description:"We optimize for throughput and fast feedback loops."},{question:'The team "pulls" new work only when they have capacity, rather than having work "pushed" onto them by management',description:"The team controls their workflow to prevent overloading and bottlenecks."},{question:"Leadership focuses on removing systemic blockers and impediments rather than assigning tasks",description:"The manager's job is to design the environment (the 90%), not manage the people (the 10%)."},{question:'We measure success by "Customer Value Delivered" or "Cycle Time" (speed), not just "Story Points Completed"',description:"We care about the result (impact), not just the activity (effort)."}],jo={1:"Never",2:"Rarely",3:"Sometimes",4:"Often",5:"Always"},Po=[{text:"Teams that focus on finishing work rather than starting new work can reduce cycle time by up to 50%"},{text:"Context switching can reduce productivity by up to 80% - it takes 23 minutes to fully refocus after an interruption"},{text:"The cost of delay is often invisible but can be the biggest waste in product development"}
21,{text:"Flow efficiency in most organizations is typically between 5-15%, meaning work spends 85-95% of time waiting"},{text:"Small batch sizes reduce risk, accelerate feedback, and improve efficiency - large batches do the opposite"},{text:"Limiting work in progress (WIP) is one of the most powerful ways to improve flow and reduce cycle time"},{text:"Cross-functional teams can deliver 5-10x faster than teams organized by functional specialty"},{text:"The earlier you get feedback, the cheaper it is to fix problems - waiting increases the cost of change exponentially"},{text:"High-performing teams spend more time finishing work than starting new work, creating a steady flow of value"},{text:"Visual management of work makes bottlenecks and blockers visible, enabling teams to solve them faster"},{text:"In traditional project management, utilization rates above 80% actually slow down delivery due to queuing theory"},{text:"The fastest way to improve flow is often to reduce batch size - smaller batches move through the system faster"},{text:"Teams with dedicated product owners and stable membership deliver 2-3x more value than teams with split assignments"},{text:"Handoffs between teams or departments can increase cycle time by 50-200% due to coordination overhead"},{text:"Organizations that measure flow metrics outperform those that only measure resource utilization by 40%"},{text:"Frequent releases reduce risk - deploying daily is safer than deploying quarterly because each change is smaller"},{text:"The lead time from idea to customer feedback is the most important metric for innovation velocity"},{text:"Queues grow exponentially as utilization approaches 100% - this is why 'keeping everyone busy' kills flow"}],Eo=[{text:"If you only quantify one thing, quantify the cost of delay.",author:"Don Reinertsen"},{text:"Tell me how you measure me, and I will tell you how I will behave.",author:"Eli Goldratt"},{text:"A bad system will beat a good person every time.",author:"W. Edwards Deming"},{text:"The most important thing is to keep the most important thing the most important thing.",author:"Donald Reinertsen"},{text:"Optimize for flow, not resource utilization.",author:"Mary Poppendieck"},{text:"The average is meaningless. What matters is variation.",author:"Donald Wheeler"},{text:"Stop starting, start finishing.",author:"Arne Roock"},{text:"The bitterness of poor quality remains long after the sweetness of meeting the schedule has been forgotten.",author:"Karl Wiegers"},{text:"Waste is anything that does not add value to the customer.",author:"Taiichi Ohno"},{text:"The goal is not to be busy; the goal is to deliver value.",author:"Jeff Sutherland"},{text:"It is not the strongest of the species that survives, nor the most intelligent, but the one most responsive to change.",author:"Charles Darwin"},{text:"Quality is not an act, it is a habit.",author:"Aristotle"},{text:"The greatest danger in times of turbulence is not the turbulence itself, but to act with yesterday's logic.",author:"Peter Drucker"},{text:"If everything is important, then nothing is.",author:"Patrick Lencioni"},{text:"The bottleneck is always at the top of the bottle.",author:"Peter Drucker"},{text:"It's not the daily increase but daily decrease. Hack away at the unessential.",author:"Bruce Lee"},{text:"Plans are worthless, but planning is everything.",author:"Dwight D. Eisenhower"},{text:"You can't manage what you don't measure.",author:"Peter Drucker"}],Io=[Po[0],Eo[0],Po[1],Eo[1],Po[2],Eo[2],Po[3],Eo[3],Po[4],Eo[4],Po[5],Eo[5],Po[6],Eo[6],Po[7],Eo[7],Po[8],Eo[8],Po[9],Eo[9],Po[10],Eo[10],Po[11],Eo[11],Po[12],Eo[12],Po[13],Eo[13],Po[14],Eo[14],Po[15],Eo[15],Po[16],Eo[16],Po[17],Eo[17]],To=()=>{const e=B(),t=D(),{id:r}=M(),[i]=U(),[s,a]=T.useState(!1),[o,l]=T.useState(null),[c,u]=T.useState(!0),[h,d]=T.useState({}),f=T.useRef(!1),[p,m]=T.useState(0),[g,b]=T.useState(!0);if(T.useEffect(()=>{s&&m(Math.floor(Math.random()*Io.length))},[s]),T.useEffect(()=>{if(!s)return;const e=setInterval(()=>{b(!1),setTimeout(()=>{m(Math.floor(Math.random()*Io.length)),b(!0)},300)},6e3);return()=>clearInterval(e)},[s]),T.useEffect(()=>{if(f.current)return;f.current=!0;const r="processing"===i.get("auth"),n=async(i=0,s=3)=>{var a;const o=null==(a=t.state)?void 0:a.session;if(o)return l(o.user),void u(!1);const{data:{session:c}}=await da.auth.getSession();if(!c&&r&&i<s){const e=100*Math.pow(2,i);return void setTimeout(()=>{n(i+1,s)},e)}c?(l(c.user),u(!1)):(Mt.error("Please sign in to access the survey"),e("/auth"))};n();const{data:{subscription:s}}=da.auth.onAuthStateChange((t,r)=>{r?(l(r.user),u(!1)):"SIGNED_OUT"===t&&e("/auth")});return()=>s.unsubscribe()},[e]),c)return n.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:n.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n.jsx(ve,{className:"h-8 w-8 animate-spin text-primary"}),n.jsx("div",{className:"text-muted-foreground",children:"Verifying authentication..."})]})});const v=(e,t,r,i)=>n.jsx(_o,{className:"p-4 sm:p-6",children:n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(Na,{className:"text-sm sm:text-base font-medium text-foreground leading-relaxed block",children:[i+1,". ",e]}),n.jsxs("p",{className:"text-xs sm:text-sm text-muted-foreground italic leading-relaxed",children:["What this means: ",t]})]}),n.jsx(wo,{value:h[r],onValueChange:e=>((e,t)=>{d(r=>({...r,[e]:t}))}
21)(r,e),className:"grid grid-cols-5 gap-1 sm:gap-2",children:[1,2,3,4,5].map(e=>n.jsxs("label",{htmlFor:`${r}-${e}`,className:"flex flex-col items-center space-y-1.5 sm:space-y-2 p-2 rounded-lg hover:bg-accent/50 cursor-pointer transition-colors",children:[n.jsx(yo,{value:e.toString(),id:`${r}-${e}`,className:"mx-auto h-5 w-5 sm:h-4 sm:w-4"}),n.jsx("span",{className:"text-[10px] sm:text-xs text-center text-muted-foreground leading-tight",children:jo[e]})]},e))})]})},r);return n.jsxs(n.Fragment,{children:[n.jsx(xo,{open:s,modal:!0,children:n.jsx(So,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto [&>button]:hidden",children:n.jsxs("div",{className:"flex flex-col items-center justify-center py-6 px-3 sm:py-8 sm:px-4 text-center space-y-6",children:[n.jsx("div",{className:"relative",children:n.jsx("img",{src:ma,alt:"Pathways Logo",className:"h-16 w-auto animate-pulse"})}),n.jsx("div",{className:"space-y-3",children:n.jsx("h3",{className:"text-2xl font-semibold tracking-tight",children:"Analyzing Your Assessment"})}),n.jsx("div",{className:"min-h-[140px] flex flex-col items-center justify-center space-y-4 w-full",children:n.jsx("div",{className:"transition-opacity duration-300 w-full px-2 "+(g?"opacity-100":"opacity-0"),children:(w=Io[p],"author"in w?n.jsxs("div",{className:"space-y-3 max-w-md mx-auto",children:[n.jsx("p",{className:"text-xs font-medium text-primary uppercase tracking-wide",children:"Wisdom from Thought Leaders"}),n.jsxs("blockquote",{className:"text-sm sm:text-base italic text-foreground break-words",children:['"',Io[p].text,'"']}),n.jsxs("p",{className:"text-sm text-muted-foreground",children:["â ",Io[p].author]})]}):n.jsxs("div",{className:"space-y-3 max-w-md mx-auto",children:[n.jsx("p",{className:"text-xs font-medium text-primary uppercase tracking-wide",children:"Did You Know?"}),n.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed break-words",children:Io[p].text})]}))})}),n.jsx(ve,{className:"h-8 w-8 animate-spin text-primary"})]})})}),n.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[n.jsx(ba,{}),n.jsx("div",{className:"flex items-center justify-center bg-card px-4 py-3 border-b border-border",children:n.jsx("h1",{className:"text-lg font-semibold text-card-foreground",children:"Assessment"})}),n.jsx("div",{className:"flex-1 px-4 sm:px-6 py-6 sm:py-8",children:n.jsxs("div",{className:"mx-auto max-w-3xl",children:[(null==o?void 0:o.email)&&n.jsx("div",{className:"mb-6 rounded-lg border border-border bg-card p-4 shadow-sm",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("img",{src:ma,alt:"Pathways Logo",className:"h-8 w-auto"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Welcome back!"}),n.jsxs("p",{className:"text-xs text-muted-foreground",children:["Signed in as ",o.email]})]})]})}),n.jsxs("div",{className:"mb-6 sm:mb-8 space-y-4",children:[n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"mb-2 text-2xl sm:text-3xl font-bold text-foreground",children:"Organizational Flow Efficiency Diagnostic Survey"}),n.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:'This survey is designed to assess the "Center of Gravity" of your organization\'s delivery culture. It measures the tension between Resource Efficiency (optimizing for busyness) and Flow Efficiency (optimizing for speed of value).'})]}),n.jsx(_o,{className:"p-4 sm:p-6 border-primary/30 bg-primary/5",children:n.jsxs("div",{className:"flex gap-3",children:[n.jsx("div",{className:"flex-shrink-0 text-primary",children:n.jsx("svg",{className:"w-5 h-5 sm:w-6 sm:h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"text-sm sm:text-base font-semibold text-foreground",children:"Important Instruction"}),n.jsxs("p",{className:"text-xs sm:text-sm text-muted-foreground leading-relaxed",children:["Please answer these questions based on ",n.jsx("span",{className:"font-medium text-foreground",children:"how things actually work today"}),", not how you think they should work or how you wish they worked. There are no right or wrong answers, only data points. ",n.jsx("span",{className:"font-medium text-foreground",children:"An honest diagnosis of the current reality is the only way to design a meaningful improvement experiment."})]})]})]})})]}),n.jsxs("form",{onSubmit:async t=>{var n;t.preventDefault();const i=Ao.length+Lo.length;if(Object.keys(h).length===i){a(!0);try{const t=Ao.reduce((e,t,r)=>e+parseInt(h[`resource-${r}`]||"0"),0),i=Lo.reduce((e,t,r)=>e+parseInt(h[`flow-${r}`]||"0"),0);if(!o)return Mt.error("You must be signed in to submit the survey"),void e("/auth");const{data:s,error:a}=await da.functions.invoke("analyze-survey",{body:{assessmentId:r||"flow-efficiency-assessment",resourceScore:t,flowScore:i,responses:h,userId:o.id,userEmail:o.email}});if(a)return void((null==(n=a.message)?void 0:n.includes("Maximum survey limit reached"))?Mt.error("Maximum survey limit reached (2 per day). Please try again tomorrow.",{duration:5e3}):Mt.error(a.message||"Failed to analyze survey"));Mt.success("Assessment analyzed successfully!"),e("/success",{state:{analysis:s.analysis,resourceScore:s.resourceScore,flowScore:s.flowScore,resourcePercentage:s.resourcePercentage,flowPercentage:s.flowPercentage}})}catch(s){Mt.error("Failed to submit assessment. Please try again.")}finally{a(!1)}}else Mt.error("Please answer all questions")},className:"space-y-6 sm:space-y-8",children:[n.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[n.jsxs("div",{className:"mb-4 sm:mb-6",children:[n.jsx("h3",{className:"text-xl sm:text-2xl font-bold text-foreground mb-1 sm:mb-2",children:"Part 1: The Resource Efficiency Culture (Anti-Patterns)"}),n.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"High scores here indicate a culture focused on keeping people busy rather than delivering value. Rating Scale: 1 (Never) to 5 (Always)."})]}),Ao.map((e,t)=>v(e.question,e.description,`resource-${t}`,t))]}),n.jsxs("div",{className:"space-y-3 sm:space-y-4",children:[n.jsxs("div",{className:"mb-4 sm:mb-6",children:[n.jsx("h3",{className:"text-xl sm:text-2xl font-bold text-foreground mb-1 sm:mb-2",children:"Part 2: The Flow Efficiency Culture (Positive Patterns)"}),n.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground",children:"High scores here indicate a culture designed for speed, learning, and adaptability. Rating Scale: 1 (Never) to 5 (Always)."})]}),Lo.map((e,t)=>v(e.question,e.description,`flow-${t}`,t))]}),n.jsx("div",{className:"sticky bottom-0 left-0 right-0 bg-background pt-4 pb-6 sm:pb-8 -mx-4 sm:-mx-6 px-4 sm:px-6 border-t border-border mt-6 sm:mt-8",children:n.jsx(Yt,{type:"submit",size:"lg",className:"w-full h-12 sm:h-14 text-base sm:text-lg bg-gradient-primary hover:opacity-90 transition-opacity shadow-smooth",disabled:s,children:s?n.jsx(n.Fragment,{children:"Submitting..."}):n.jsxs(n.Fragment,{children:[n.jsx(_e,{className:"mr-2 h-4 w-4 sm:h-5 sm:w-5"}),"Submit Assessment"]})})})]})]})}),n.jsx(pa,{})]})]});var w},Oo={},Co=function(e,t,r){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),r=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));n=Promise.allSettled(t.map(e=>{if((e=function(e){return"/"+e}(e))in Oo)return;Oo[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const i=document.createElement("link");return i.rel=t?"stylesheet":"modulepreload",t||(i.as="script"),i.crossOrigin="",i.href=e,r&&i.setAttribute("nonce",r),document.head.appendChild(i),t?new Promise((t,r)=>{i.addEventListener("load",t),i.addEventListener("error",()=>r(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function i(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return n.then(t=>{for(const e of t||[])"rejected"===e.status&&i(e.reason);return e().catch(i)})};function Ro(e){return(Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Fo=Uint8Array,Bo=Uint16Array,Do=Int32Array,Mo=new Fo([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]),Uo=new Fo([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]),qo=new Fo([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),zo=function(e,t){for(var r=new Bo(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var i=new Do(r[30]);for(n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)i[s]=s-r[n]<<5|n;return{b:r,r:i}},$o=zo(Mo,2),Wo=$o.b,Ho=$o.r;Wo[28]=258,Ho[258]=28;for(var Vo=zo(Uo,0).r,Go=new Bo(32768),Ko=0;Ko<32768;++Ko){var Jo=(43690&Ko)>>1|(21845&Ko)<<1;Jo=(61680&(Jo=(52428&Jo)>>2|(13107&Jo)<<2))>>4|(3855&Jo)<<4,Go[Ko]=((65280&Jo)>>8|(255&Jo)<<8)>>1}var Yo=function(e,t,r){for(var n=e.length,i=0,s=new Bo(t);i<n;++i)e[i]&&++s[e[i]-1];var a,o=new Bo(t);for(i=1;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;if(r){a=new Bo(1<<t);var l=15-t;for(i=0;i<n;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],h=o[e[i]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)a[Go[h]>>l]=c}else for(a=new Bo(n),i=0;i<n;++i)e[i]&&(a[i]=Go[o[e[i]-1]++]>>15-e[i]);return a},Zo=new Fo(288);for(Ko=0;Ko<144;++Ko)Zo[Ko]=8;for(Ko=144;Ko<256;++Ko)Zo[Ko]=9;for(Ko=256;Ko<280;++Ko)Zo[Ko]=7;for(Ko=280;Ko<288;++Ko)Zo[Ko]=8;var Xo=new Fo(32);for(Ko=0;Ko<32;++Ko)Xo[Ko]=5;var Qo=Yo(Zo,9,0),el=Yo(Xo,5,0),tl=function(e){return(e+7)/8|0},rl=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},nl=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},il=function(e,t){for(var r=[],n=0;n<e.length;
vendor: 13,439 bytes, lines 21-22
21++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,s=r.slice();if(!i)return{t:hl,l:0};if(1==i){var a=new Fo(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],c=0,u=1,h=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=i-1;)o=r[r[c].f<r[h].f?c++:h++],l=r[c!=u&&r[c].f<r[h].f?c++:h++],r[u++]={s:-1,f:o.f+l.f,l:o,r:l};var d=s[0].s;for(n=1;n<i;++n)s[n].s>d&&(d=s[n].s);var f=new Bo(d+1),p=sl(r[u-1],f,0);if(p>t){n=0;var m=0,g=p-t,b=1<<g;for(s.sort(function(e,t){return f[t.s]-f[e.s]||e.f-t.f});n<i;++n){var v=s[n].s;if(!(f[v]>t))break;m+=b-(1<<p-f[v]),f[v]=t}for(m>>=g;m>0;){var w=s[n].s;f[w]<t?m-=1<<t-f[w]++-1:++n}for(;n>=0&&m;--n){var y=s[n].s;f[y]==t&&(--f[y],++m)}p=t}return{t:new Fo(f),l:p}},sl=function(e,t,r){return-1==e.s?Math.max(sl(e.l,t,r+1),sl(e.r,t,r+1)):t[e.s]=r},al=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Bo(++t),n=0,i=e[0],s=1,a=function(e){r[n++]=e},o=1;o<=t;++o)if(e[o]==i&&o!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=e[o]}return{c:r.subarray(0,n),n:t}},ol=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},ll=function(e,t,r){var n=r.length,i=tl(t+2);e[i]=255&n,e[i+1]=n>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;s<n;++s)e[i+s+4]=r[s];return 8*(i+4+n)},cl=function(e,t,r,n,i,s,a,o,l,c,u){rl(t,u++,r),++i[256];for(var h=il(i,15),d=h.t,f=h.l,p=il(s,15),m=p.t,g=p.l,b=al(d),v=b.c,w=b.n,y=al(m),_=y.c,x=y.n,k=new Bo(19),N=0;N<v.length;++N)++k[31&v[N]];for(N=0;N<_.length;++N)++k[31&_[N]];for(var S=il(k,7),A=S.t,L=S.l,j=19;j>4&&!A[qo[j-1]];--j);var P,E,I,T,O=c+5<<3,C=ol(i,Zo)+ol(s,Xo)+a,R=ol(i,d)+ol(s,m)+a+14+3*j+ol(k,A)+2*k[16]+3*k[17]+7*k[18];if(l>=0&&O<=C&&O<=R)return ll(t,u,e.subarray(l,l+c));if(rl(t,u,1+(R<C)),u+=2,R<C){P=Yo(d,f,0),E=d,I=Yo(m,g,0),T=m;var F=Yo(A,L,0);rl(t,u,w-257),rl(t,u+5,x-1),rl(t,u+10,j-4),u+=14;for(N=0;N<j;++N)rl(t,u+3*N,A[qo[N]]);u+=3*j;for(var B=[v,_],D=0;D<2;++D){var M=B[D];for(N=0;N<M.length;++N){var U=31&M[N];rl(t,u,F[U]),u+=A[U],U>15&&(rl(t,u,M[N]>>5&127),u+=M[N]>>12)}}}else P=Qo,E=Zo,I=el,T=Xo;for(N=0;N<o;++N){var q=n[N];if(q>255){nl(t,u,P[(U=q>>18&31)+257]),u+=E[U+257],U>7&&(rl(t,u,q>>23&31),u+=Mo[U]);var z=31&q;nl(t,u,I[z]),u+=T[z],z>3&&(nl(t,u,q>>5&8191),u+=Uo[z])}else nl(t,u,P[q]),u+=E[q]}return nl(t,u,P[256]),u+E[256]},ul=new Do([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),hl=new Fo(0),dl=function(e,t,r,n,i,s){var a=s.z||e.length,o=new Fo(n+a+5*(1+Math.ceil(a/7e3))+i),l=o.subarray(n,o.length-i),c=s.l,u=7&(s.r||0);if(t){u&&(l[0]=s.r>>3);for(var h=ul[t-1],d=h>>13,f=8191&h,p=(1<<r)-1,m=s.p||new Bo(32768),g=s.h||new Bo(p+1),b=Math.ceil(r/3),v=2*b,w=function(t){return(e[t]^e[t+1]<<b^e[t+2]<<v)&p},y=new Do(25e3),_=new Bo(288),x=new Bo(32),k=0,N=0,S=s.i||0,A=0,L=s.w||0,j=0;S+2<a;++S){var P=w(S),E=32767&S,I=g[P];if(m[E]=I,g[P]=E,L<=S){var T=a-S;if((k>7e3||A>24576)&&(T>423||!c)){u=cl(e,l,0,y,_,x,N,A,j,S-j,u),A=k=N=0,j=S;for(var O=0;O<286;++O)_[O]=0;for(O=0;O<30;++O)x[O]=0}var C=2,R=0,F=f,B=E-I&32767;if(T>2&&P==w(S-B))for(var D=Math.min(d,T)-1,M=Math.min(32767,S),U=Math.min(258,T);B<=M&&--F&&E!=I;){if(e[S+C]==e[S+C-B]){for(var q=0;q<U&&e[S+q]==e[S+q-B];++q);if(q>C){if(C=q,R=B,q>D)break;var z=Math.min(B,q-2),$=0;for(O=0;O<z;++O){var W=S-B+O&32767,H=W-m[W]&32767;H>$&&($=H,I=W)}}}B+=(E=I)-(I=m[E])&32767}if(R){y[A++]=268435456|Ho[C]<<18|Vo[R];var V=31&Ho[C],G=31&Vo[R];N+=Mo[V]+Uo[G],++_[257+V],++x[G],L=S+C,++k}else y[A++]=e[S],++_[e[S]]}}for(S=Math.max(S,L);S<a;++S)y[A++]=e[S],++_[e[S]];u=cl(e,l,c,y,_,x,N,A,j,S-j,u),c||(s.r=7&u|l[u/8|0]<<3,u-=7,s.h=g,s.p=m,s.i=S,s.w=L)}else{for(S=s.w||0;S<a+c;S+=65535){var K=S+65535;K>=a&&(l[u/8|0]=c,K=a),u=ll(l,u+1,e.subarray(S,K))}s.i=a}return function(e,t,r){return(null==r||r>e.length)&&(r=e.length),new Fo(e.subarray(t,r))}(o,0,n+tl(u)+i)},fl=function(){var e=1,t=0;return{p:function(r){for(var n=e,i=t,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=n+=r[a];n=(65535&n)+15*(n>>16),i=(65535&i)+15*(i>>16)}e=n,t=i},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},pl=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function ml(e,t){t||(t={});var r=fl();r.p(e);var n=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),a=new Fo(s.length+e.length);a.set(s),a.set(e,s.length),e=a,i.w=s.length}return dl(e,null==t.level?6:t.level,null==t.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,n,i)}(e,t,t.dictionary?6:2,4);return function(e,t){var r=t.level,n=0==r?0:r<6?1:9==r?3:2;if(e[0]=120,e[1]=n<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=fl();i.p(t.dictionary),pl(e,2,i.d())}}(n,t),pl(n,n.length-4,r.d()),n}var gl="undefined"!=typeof TextDecoder&&new TextDecoder;try{gl.decode(hl,{stream:!0})}catch(Yf){}function bl(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function vl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t);else for(;!(l=(n=s.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return bl(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bl(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wl(e,t="utf8"){return new TextDecoder(t).decode(e)}const yl=new TextEncoder;const _l=(()=>{const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])})(),xl={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 kl{constructor(e=8192,t={}){r(this,"buffer"),r(this,"byteLength"),r(this,"byteOffset"),r(this,"length"),r(this,"offset"),r(this,"lastWrittenByte"),r(this,"littleEndian"),r(this,"_data"),r(this,"_mark"),r(this,"_marks");let n=!1;"number"==typeof e?e=new ArrayBuffer(e):(n=!0,this.lastWrittenByte=e.byteLength);const i=t.offset?t.offset>>>0:0,s=e.byteLength-i;let a=i;(ArrayBuffer.isView(e)||e instanceof kl)&&(e.byteLength!==e.buffer.byteLength&&(a=e.byteOffset+i),e=e.buffer),this.lastWrittenByte=n?s:0,this.buffer=e,this.length=s,this.byteLength=s,this.byteOffset=a,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,a,s),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(void 0===e)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 t=2*(this.offset+e),r=new Uint8Array(t);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=t,this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}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,t){const r=xl[t].BYTES_PER_ELEMENT*e,n=this.byteOffset+this.offset,i=this.buffer.slice(n,n+r);if(this.littleEndian===_l&&"uint8"!==t&&"int8"!==t){const e=new Uint8Array(this.buffer.slice(n,n+r));e.reverse();const i=new xl[t](e.buffer);return this.offset+=r,i.reverse(),i}const s=new xl[t](i);return this.offset+=r,s}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 t="";for(let r=0;r<e;r++)t+=this.readChar();return t}readUtf8(e=1){return wl(this.readBytes(e))}decodeText(e=1,t="utf8"){return wl(this.readBytes(e),t)}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 t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);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 t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(function(e){return yl.encode(e)}(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)}} 22/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */function Nl(e){let t=e.length;for(;--t>=0;)e[t]=0}const Sl=256,Al=286,Ll=30,jl=15,Pl=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]),El=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]),Il=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Tl=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ol=new Array(576);Nl(Ol);const Cl=new Array(60);Nl(Cl);const Rl=new Array(512);Nl(Rl);const Fl=new Array(256);Nl(Fl);const Bl=new Array(29);Nl(Bl);const Dl=new Array(Ll);function Ml(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}let Ul,ql,zl;function $l(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}Nl(Dl);const Wl=e=>e<256?Rl[e]:Rl[256+(e>>>7)],Hl=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Vl=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,Hl(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)},Gl=(e,t,r)=>{Vl(e,r[2*t],r[2*t+1])},Kl=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},Jl=(e,t,r)=>{const n=new Array(16);let i,s,a=0;for(i=1;i<=jl;i++)a=a+r[i-1]<<1,n[i]=a;for(s=0;s<=t;s++){let t=e[2*s+1];0!==t&&(e[2*s]=Kl(n[t]++,t))}},Yl=e=>{let t;for(t=0;t<Al;t++)e.dyn_ltree[2*t]=0;for(t=0;t<Ll;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Zl=e=>{e.bi_valid>8?Hl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Xl=(e,t,r,n)=>{const i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]},Ql=(e,t,r)=>{const n=e.heap[r];let i=r<<1;for(;
vendor: 4,448 bytes, line 22
22i<=e.heap_len&&(i<e.heap_len&&Xl(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Xl(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n},ec=(e,t,r)=>{let n,i,s,a,o=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+o++],n+=(255&e.pending_buf[e.sym_buf+o++])<<8,i=e.pending_buf[e.sym_buf+o++],0===n?Gl(e,i,t):(s=Fl[i],Gl(e,s+Sl+1,t),a=Pl[s],0!==a&&(i-=Bl[s],Vl(e,i,a)),n--,s=Wl(n),Gl(e,s,r),a=El[s],0!==a&&(n-=Dl[s],Vl(e,n,a)))}while(o<e.sym_next);Gl(e,256,t)},tc=(e,t)=>{const r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.elems;let a,o,l,c=-1;for(e.heap_len=0,e.heap_max=573,a=0;a<s;a++)0!==r[2*a]?(e.heap[++e.heap_len]=c=a,e.depth[a]=0):r[2*a+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,r[2*l]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=n[2*l+1]);for(t.max_code=c,a=e.heap_len>>1;a>=1;a--)Ql(e,r,a);l=s;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ql(e,r,1),o=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=o,r[2*l]=r[2*a]+r[2*o],e.depth[l]=(e.depth[a]>=e.depth[o]?e.depth[a]:e.depth[o])+1,r[2*a+1]=r[2*o+1]=l,e.heap[1]=l++,Ql(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,l=t.stat_desc.max_length;let c,u,h,d,f,p,m=0;for(d=0;d<=jl;d++)e.bl_count[d]=0;for(r[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)u=e.heap[c],d=r[2*r[2*u+1]+1]+1,d>l&&(d=l,m++),r[2*u+1]=d,u>n||(e.bl_count[d]++,f=0,u>=o&&(f=a[u-o]),p=r[2*u],e.opt_len+=p*(d+f),s&&(e.static_len+=p*(i[2*u+1]+f)));if(0!==m){do{for(d=l-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(d=l;0!==d;d--)for(u=e.bl_count[d];0!==u;)h=e.heap[--c],h>n||(r[2*h+1]!==d&&(e.opt_len+=(d-r[2*h+1])*r[2*h],r[2*h+1]=d),u--)}})(e,t),Jl(r,c,e.bl_count)},rc=(e,t,r)=>{let n,i,s=-1,a=t[1],o=0,l=7,c=4;for(0===a&&(l=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++o<l&&i===a||(o<c?e.bl_tree[2*i]+=o:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=0,s=i,0===a?(l=138,c=3):i===a?(l=6,c=3):(l=7,c=4))},nc=(e,t,r)=>{let n,i,s=-1,a=t[1],o=0,l=7,c=4;for(0===a&&(l=138,c=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++o<l&&i===a)){if(o<c)do{Gl(e,i,e.bl_tree)}while(0!==--o);else 0!==i?(i!==s&&(Gl(e,i,e.bl_tree),o--),Gl(e,16,e.bl_tree),Vl(e,o-3,2)):o<=10?(Gl(e,17,e.bl_tree),Vl(e,o-3,3)):(Gl(e,18,e.bl_tree),Vl(e,o-11,7));o=0,s=i,0===a?(l=138,c=3):i===a?(l=6,c=3):(l=7,c=4)}};let ic=!1;const sc=(e,t,r,n)=>{Vl(e,0+(n?1:0),3),Zl(e),Hl(e,r),Hl(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var ac={_tr_init:e=>{ic||((()=>{let e,t,r,n,i;const s=new Array(16);for(r=0,n=0;n<28;n++)for(Bl[n]=r,e=0;e<1<<Pl[n];e++)Fl[r++]=n;for(Fl[r-1]=n,i=0,n=0;n<16;n++)for(Dl[n]=i,e=0;e<1<<El[n];e++)Rl[i++]=n;for(i>>=7;n<Ll;n++)for(Dl[n]=i<<7,e=0;e<1<<El[n]-7;e++)Rl[256+i++]=n;for(t=0;t<=jl;t++)s[t]=0;for(e=0;e<=143;)Ol[2*e+1]=8,e++,s[8]++;for(;e<=255;)Ol[2*e+1]=9,e++,s[9]++;for(;e<=279;)Ol[2*e+1]=7,e++,s[7]++;for(;e<=287;)Ol[2*e+1]=8,e++,s[8]++;for(Jl(Ol,287,s),e=0;e<Ll;e++)Cl[2*e+1]=5,Cl[2*e]=Kl(e,5);Ul=new Ml(Ol,Pl,257,Al,jl),ql=new Ml(Cl,El,0,Ll,jl),zl=new Ml(new Array(0),Il,0,19,7)})(),ic=!0),e.l_desc=new $l(e.dyn_ltree,Ul),e.d_desc=new $l(e.dyn_dtree,ql),e.bl_desc=new $l(e.bl_tree,zl),e.bi_buf=0,e.bi_valid=0,Yl(e)},_tr_stored_block:sc,_tr_flush_block:(e,t,r,n)=>{let i,s,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<Sl;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),tc(e,e.l_desc),tc(e,e.d_desc),a=(e=>{let t;for(rc(e,e.dyn_ltree,e.l_desc.max_code),rc(e,e.dyn_dtree,e.d_desc.max_code),tc(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Tl[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?sc(e,t,r,n):4===e.strategy||s===i?(Vl(e,2+(n?1:0),3),ec(e,Ol,Cl)):(Vl(e,4+(n?1:0),3),((e,t,r,n)=>{let i;for(Vl(e,t-257,5),Vl(e,r-1,5),Vl(e,n-4,4),i=0;i<n;i++)Vl(e,e.bl_tree[2*Tl[i]+1],3);nc(e,e.dyn_ltree,t-1),nc(e,e.dyn_dtree,r-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),ec(e,e.dyn_ltree,e.dyn_dtree)),Yl(e),n&&Zl(e)},_tr_tally:(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>
vendor: 1,546 bytes, line 22
228,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(Fl[r]+Sl+1)]++,e.dyn_dtree[2*Wl(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{Vl(e,2,3),Gl(e,256,Ol),(e=>{16===e.bi_valid?(Hl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}};var oc=(e,t,r,n)=>{let i=65535&e,s=e>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+t[n++]|0,s=s+i|0}while(--a);i%=65521,s%=65521}return i|s<<16};const lc=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var cc=(e,t,r,n)=>{const i=lc,s=n+r;e^=-1;for(let a=n;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e},uc={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"},hc={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:dc,_tr_stored_block:fc,_tr_flush_block:pc,_tr_tally:mc,_tr_align:gc}=ac,{Z_NO_FLUSH:bc,Z_PARTIAL_FLUSH:vc,Z_FULL_FLUSH:wc,Z_FINISH:yc,Z_BLOCK:_c,Z_OK:xc,Z_STREAM_END:kc,Z_STREAM_ERROR:Nc,Z_DATA_ERROR:Sc,Z_BUF_ER
vendor: 4,499 bytes, line 22
22ROR:Ac,Z_DEFAULT_COMPRESSION:Lc,Z_FILTERED:jc,Z_HUFFMAN_ONLY:Pc,Z_RLE:Ec,Z_FIXED:Ic,Z_DEFAULT_STRATEGY:Tc,Z_UNKNOWN:Oc,Z_DEFLATED:Cc}=hc,Rc=258,Fc=262,Bc=42,Dc=113,Mc=666,Uc=(e,t)=>(e.msg=uc[t],t),qc=e=>2*e-(e>4?9:0),zc=e=>{let t=e.length;for(;--t>=0;)e[t]=0},$c=e=>{let t,r,n,i=e.w_size;t=e.hash_size,n=t;do{r=e.head[--n],e.head[n]=r>=i?r-i:0}while(--t);t=i,n=t;do{r=e.prev[--n],e.prev[n]=r>=i?r-i:0}while(--t)};let Wc=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask;const Hc=e=>{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},Vc=(e,t)=>{pc(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Hc(e.strm)},Gc=(e,t)=>{e.pending_buf[e.pending++]=t},Kc=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Jc=(e,t,r,n)=>{let i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),1===e.state.wrap?e.adler=oc(e.adler,t,i,r):2===e.state.wrap&&(e.adler=cc(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},Yc=(e,t)=>{let r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match;const l=e.strstart>e.w_size-Fc?e.strstart-(e.w_size-Fc):0,c=e.window,u=e.w_mask,h=e.prev,d=e.strstart+Rc;let f=c[s+a-1],p=c[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(r=t,c[r+a]===p&&c[r+a-1]===f&&c[r]===c[s]&&c[++r]===c[s+1]){s+=2,r++;do{}while(c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&s<d);if(n=Rc-(d-s),s=d-Rc,n>a){if(e.match_start=t,a=n,n>=o)break;f=c[s+a-1],p=c[s+a]}}}while((t=h[t&u])>l&&0!==--i);return a<=e.lookahead?a:e.lookahead},Zc=e=>{const t=e.w_size;let r,n,i;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Fc)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),$c(e),n+=t),0===e.strm.avail_in)break;if(r=Jc(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Wc(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Wc(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<Fc&&0!==e.strm.avail_in)},Xc=(e,t)=>{let r,n,i,s=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,o=e.strm.avail_in;do{if(r=65535,i=e.bi_valid+42>>3,e.strm.avail_out<i)break;if(i=e.strm.avail_out-i,n=e.strstart-e.block_start,r>n+e.strm.avail_in&&(r=n+e.strm.avail_in),r>i&&(r=i),r<s&&(0===r&&t!==yc||t===bc||r!==n+e.strm.avail_in))break;a=t===yc&&r===n+e.strm.avail_in?1:0,fc(e,0,0,a),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Hc(e.strm),n&&(n>r&&(n=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,r-=n),r&&(Jc(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===a);return o-=e.strm.avail_in,o&&(o>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=o&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-o,e.strm.next_in),e.strstart),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?4:t!==bc&&t!==yc&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(Jc(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),i=e.bi_valid+42>>3,i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i,s=i>
vendor: 5,051 bytes, line 22
22e.w_size?e.w_size:i,n=e.strstart-e.block_start,(n>=s||(n||t===yc)&&t!==bc&&0===e.strm.avail_in&&n<=i)&&(r=n>i?i:n,a=t===yc&&0===e.strm.avail_in&&r===n?1:0,fc(e,e.block_start,r,a),e.block_start+=r,Hc(e.strm)),a?3:1)},Qc=(e,t)=>{let r,n;for(;;){if(e.lookahead<Fc){if(Zc(e),e.lookahead<Fc&&t===bc)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=Wc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-Fc&&(e.match_length=Yc(e,r)),e.match_length>=3)if(n=mc(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Wc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Wc(e,e.ins_h,e.window[e.strstart+1]);else n=mc(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Vc(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===yc?(Vc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Vc(e,!1),0===e.strm.avail_out)?1:2},eu=(e,t)=>{let r,n,i;for(;;){if(e.lookahead<Fc){if(Zc(e),e.lookahead<Fc&&t===bc)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=Wc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Fc&&(e.match_length=Yc(e,r),e.match_length<=5&&(e.strategy===jc||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=mc(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=Wc(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(Vc(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=mc(e,0,e.window[e.strstart-1]),n&&Vc(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=mc(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===yc?(Vc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Vc(e,!1),0===e.strm.avail_out)?1:2};function tu(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}const ru=[new tu(0,0,0,0,Xc),new tu(4,4,8,4,Qc),new tu(4,5,16,8,Qc),new tu(4,6,32,32,Qc),new tu(4,4,16,16,eu),new tu(8,16,32,32,eu),new tu(8,16,128,128,eu),new tu(8,32,128,256,eu),new tu(32,128,258,1024,eu),new tu(32,258,258,4096,eu)];function nu(){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=Cc,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(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),zc(this.dyn_ltree),zc(this.dyn_dtree),zc(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),zc(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),zc(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 iu=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Bc&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Dc&&t.status!==Mc?1:0},su=e=>{if(iu(e))return Uc(e,Nc);e.total_in=e.total_out=0,e.data_type=Oc;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Bc:Dc,e.adler=2===t.wrap?0:1,t.last_flush=-2,dc(t),xc},au=e=>{const t=su(e);var r;return t===xc&&((r=e.state).window_size=2*r.w_size,zc(r.head),r.max_lazy_match=ru[r.level].max_lazy,r.good_match=ru[r.level].good_length,r.nice_match=ru[r.level].nice_length,r.max_chain_length=ru[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},ou=(e,t,r,n,i,s)=>{if(!e)return Nc;let a=1;if(t===Lc&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==Cc||n<8||n>15||t<0||t>9||s<0||s>
vendor: 28,494 bytes, line 22
22Ic||8===n&&1!==a)return Uc(e,Nc);8===n&&(n=9);const o=new nu;return e.state=o,o.strm=e,o.status=Bc,o.wrap=a,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=t,o.strategy=s,o.method=r,au(e)};var lu={deflateInit:(e,t)=>ou(e,t,Cc,15,8,Tc),deflateInit2:ou,deflateReset:au,deflateResetKeep:su,deflateSetHeader:(e,t)=>iu(e)||2!==e.state.wrap?Nc:(e.state.gzhead=t,xc),deflate:(e,t)=>{if(iu(e)||t>_c||t<0)return e?Uc(e,Nc):Nc;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===Mc&&t!==yc)return Uc(e,0===e.avail_out?Ac:Nc);const n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(Hc(e),0===e.avail_out)return r.last_flush=-1,xc}else if(0===e.avail_in&&qc(t)<=qc(n)&&t!==yc)return Uc(e,Ac);if(r.status===Mc&&0!==e.avail_in)return Uc(e,Ac);if(r.status===Bc&&0===r.wrap&&(r.status=Dc),r.status===Bc){let t=Cc+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=Pc||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=n<<6,0!==r.strstart&&(t|=32),t+=31-t%31,Kc(r,t),0!==r.strstart&&(Kc(r,e.adler>>>16),Kc(r,65535&e.adler)),e.adler=1,r.status=Dc,Hc(e),0!==r.pending)return r.last_flush=-1,xc}if(57===r.status)if(e.adler=0,Gc(r,31),Gc(r,139),Gc(r,8),r.gzhead)Gc(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Gc(r,255&r.gzhead.time),Gc(r,r.gzhead.time>>8&255),Gc(r,r.gzhead.time>>16&255),Gc(r,r.gzhead.time>>24&255),Gc(r,9===r.level?2:r.strategy>=Pc||r.level<2?4:0),Gc(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Gc(r,255&r.gzhead.extra.length),Gc(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=cc(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(Gc(r,0),Gc(r,0),Gc(r,0),Gc(r,0),Gc(r,0),Gc(r,9===r.level?2:r.strategy>=Pc||r.level<2?4:0),Gc(r,3),r.status=Dc,Hc(e),0!==r.pending)return r.last_flush=-1,xc;if(69===r.status){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=cc(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=i,Hc(e),0!==r.pending)return r.last_flush=-1,xc;t=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=cc(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=cc(e.adler,r.pending_buf,r.pending-n,n)),Hc(e),0!==r.pending)return r.last_flush=-1,xc;n=0}t=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Gc(r,t)}while(0!==t);r.gzhead.hcrc&&r.pending>n&&(e.adler=cc(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=cc(e.adler,r.pending_buf,r.pending-n,n)),Hc(e),0!==r.pending)return r.last_flush=-1,xc;n=0}t=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Gc(r,t)}while(0!==t);r.gzhead.hcrc&&r.pending>n&&(e.adler=cc(e.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Hc(e),0!==r.pending))return r.last_flush=-1,xc;Gc(r,255&e.adler),Gc(r,e.adler>>8&255),e.adler=0}if(r.status=Dc,Hc(e),0!==r.pending)return r.last_flush=-1,xc}if(0!==e.avail_in||0!==r.lookahead||t!==bc&&r.status!==Mc){let n=0===r.level?Xc(r,t):r.strategy===Pc?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(Zc(e),0===e.lookahead)){if(t===bc)return 1;break}if(e.match_length=0,r=mc(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Vc(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===yc?(Vc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Vc(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===Ec?((e,t)=>{let r,n,i,s;const a=e.window;for(;;){if(e.lookahead<=Rc){if(Zc(e),e.lookahead<=Rc&&t===bc)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){s=e.strstart+Rc;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=Rc-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=mc(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=mc(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Vc(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===yc?(Vc(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Vc(e,!1),0===e.strm.avail_out)?1:2})(r,t):ru[r.level].func(r,t);if(3!==n&&4!==n||(r.status=Mc),1===n||3===n)return 0===e.avail_out&&(r.last_flush=-1),xc;if(2===n&&(t===vc?gc(r):t!==_c&&(fc(r,0,0,!1),t===wc&&(zc(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Hc(e),0===e.avail_out))return r.last_flush=-1,xc}return t!==yc?xc:r.wrap<=0?kc:(2===r.wrap?(Gc(r,255&e.adler),Gc(r,e.adler>>8&255),Gc(r,e.adler>>16&255),Gc(r,e.adler>>24&255),Gc(r,255&e.total_in),Gc(r,e.total_in>>8&255),Gc(r,e.total_in>>16&255),Gc(r,e.total_in>>24&255)):(Kc(r,e.adler>>>16),Kc(r,65535&e.adler)),Hc(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?xc:kc)},deflateEnd:e=>{if(iu(e))return Nc;const t=e.state.status;return e.state=null,t===Dc?Uc(e,Sc):xc},deflateSetDictionary:(e,t)=>{let r=t.length;if(iu(e))return Nc;const n=e.state,i=n.wrap;if(2===i||1===i&&n.status!==Bc||n.lookahead)return Nc;if(1===i&&(e.adler=oc(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===i&&(zc(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const s=e.avail_in,a=e.next_in,o=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Zc(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=Wc(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,Zc(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=a,e.input=o,e.avail_in=s,n.wrap=i,xc},deflateInfo:"pako deflate (from Nodeca project)"};const cu=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var uu=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)cu(r,t)&&(e[t]=r[t])}}return e},hu=e=>{let t=0;for(let n=0,i=e.length;n<i;n++)t+=e[n].length;const r=new Uint8Array(t);for(let n=0,i=0,s=e.length;n<s;n++){let t=e[n];r.set(t,i),i+=t.length}return r};let du=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Zg){du=!1}const fu=new Uint8Array(256);for(let Xg=0;Xg<256;Xg++)fu[Xg]=Xg>=252?6:Xg>=248?5:Xg>=240?4:Xg>=224?3:Xg>=192?2:1;fu[254]=fu[254]=1;var pu=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++)r=e.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=e.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(o),s=0,i=0;s<o;i++)r=e.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=e.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[s++]=r:r<2048?(t[s++]=192|r>>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},mu=(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,i;const s=new Array(2*r);for(i=0,n=0;n<r;){let t=e[n++];if(t<128){s[i++]=t;continue}let a=fu[t];if(a>4)s[i++]=65533,n+=a-1;else{for(t&=2===a?31:3===a?15:7;a>1&&n<r;)t=t<<6|63&e[n++],a--;a>1?s[i++]=65533:t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&du)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r})(s,i)},gu=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+fu[e[r]]>t?r:t};var bu=function(){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};const vu=Object.prototype.toString,{Z_NO_FLUSH:wu,Z_SYNC_FLUSH:yu,Z_FULL_FLUSH:_u,Z_FINISH:xu,Z_OK:ku,Z_STREAM_END:Nu,Z_DEFAULT_COMPRESSION:Su,Z_DEFAULT_STRATEGY:Au,Z_DEFLATED:Lu}=hc;function ju(e){this.options=uu({level:Su,method:Lu,chunkSize:16384,windowBits:15,memLevel:8,strategy:Au},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bu,this.strm.avail_out=0;let r=lu.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==ku)throw new Error(uc[r]);if(t.header&&lu.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?pu(t.dictionary):"[object ArrayBuffer]"===vu.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=lu.deflateSetDictionary(this.strm,e),r!==ku)throw new Error(uc[r]);this._dict_set=!0}}ju.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let i,s;if(this.ended)return!1;for(s=t===~~t?t:!0===t?xu:wu,"string"==typeof e?r.input=pu(e):"[object ArrayBuffer]"===vu.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(s===yu||s===_u)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=lu.deflate(r,s),i===Nu)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=lu.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ku;if(0!==r.avail_out){if(s>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},ju.prototype.onData=function(e){this.chunks.push(e)},ju.prototype.onEnd=function(e){e===ku&&(this.result=hu(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const Pu=16209;var Eu=function(e,t){let r,n,i,s,a,o,l,c,u,h,d,f,p,m,g,b,v,w,y,_,x,k,N,S;const A=e.state;r=e.next_in,N=e.input,n=r+(e.avail_in-5),i=e.next_out,S=e.output,s=i-(t-e.avail_out),a=i+(e.avail_out-257),o=A.dmax,l=A.wsize,c=A.whave,u=A.wnext,h=A.window,d=A.hold,f=A.bits,p=A.lencode,m=A.distcode,g=(1<<A.lenbits)-1,b=(1<<A.distbits)-1;e:do{f<15&&(d+=N[r++]<<f,f+=8,d+=N[r++]<<f,f+=8),v=p[d&g];t:for(;;){if(w=v>>>24,d>>>=w,f-=w,w=v>>>16&255,0===w)S[i++]=65535&v;else{if(!(16&w)){if(64&w){if(32&w){A.mode=16191;break e}e.msg="invalid literal/length code",A.mode=Pu;break e}v=p[(65535&v)+(d&(1<<w)-1)];continue t}for(y=65535&v,w&=15,w&&(f<w&&(d+=N[r++]<<f,f+=8),y+=d&(1<<w)-1,d>>>=w,f-=w),f<15&&(d+=N[r++]<<f,f+=8,d+=N[r++]<<f,f+=8),v=m[d&b];;){if(w=v>>>24,d>>>=w,f-=w,w=v>>>16&255,16&w){if(_=65535&v,w&=15,f<w&&(d+=N[r++]<<f,f+=8,f<w&&(d+=N[r++]<<f,f+=8)),_+=d&(1<<w)-1,_>o){e.msg="invalid distance too far back",A.mode=Pu;break e}if(d>>>=w,f-=w,w=i-s,_>w){if(w=_-w,w>c&&A.sane){e.msg="invalid distance too far back",A.mode=Pu;break e}if(x=0,k=h,0===u){if(x+=l-w,w<y){y-=w;do{S[i++]=h[x++]}while(--w);x=i-_,k=S}}else if(u<w){if(x+=l+u-w,w-=u,w<y){y-=w;do{S[i++]=h[x++]}while(--w);if(x=0,u<y){w=u,y-=w;do{S[i++]=h[x++]}while(--w);x=i-_,k=S}}}else if(x+=u-w,w<y){y-=w;do{S[i++]=h[x++]}while(--w);x=i-_,k=S}for(;y>2;)S[i++]=k[x++],S[i++]=k[x++],S[i++]=k[x++],y-=3;y&&(S[i++]=k[x++],y>1&&(S[i++]=k[x++]))}else{x=i-_;do{S[i++]=S[x++],S[i++]=S[x++],S[i++]=S[x++],y-=3}while(y>2);y&&(S[i++]=S[x++],y>1&&(S[i++]=S[x++]))}break}if(64&w){e.msg="invalid distance code",A.mode=Pu;break e}v=m[(65535&v)+(d&(1<<w)-1)]}}break}}while(r<n&&i<a);y=f>>3,r-=y,f-=y<<3,d&=(1<<f)-1,e.next_in=r,e.next_out=i,e.avail_in=r<n?n-r+5:5-(r-n),e.avail_out=i<a?a-i+257:257-(i-a),A.hold=d,A.bits=f};const Iu=15,Tu=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]),Ou=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]),Cu=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]),Ru=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]);var Fu=(e,t,r,n,i,s,a,o)=>{const l=o.bits;let c,u,h,d,f,p,m=0,g=0,b=0,v=0,w=0,y=0,_=0,x=0,k=0,N=0,S=null;const A=new Uint16Array(16),L=new Uint16Array(16);let j,P,E,I=null;for(m=0;m<=Iu;m++)A[m]=0;for(g=0;g<n;g++)A[t[r+g]]++;for(w=l,v=Iu;v>=1&&0===A[v];v--);if(w>v&&(w=v),0===v)return i[s++]=20971520,i[s++]=20971520,o.bits=1,0;for(b=1;b<v&&0===A[b];b++);for(w<b&&(w=b),x=1,m=1;m<=Iu;m++)if(x<<=1,x-=A[m],x<0)return-1;if(x>0&&(0===e||1!==v))return-1;for(L[1]=0,m=1;m<Iu;m++)L[m+1]=L[m]+A[m];for(g=0;g<n;g++)0!==t[r+g]&&(a[L[t[r+g]]++]=g);if(0===e?(S=I=a,p=20):1===e?(S=Tu,I=Ou,p=257):(S=Cu,I=Ru,p=0),N=0,g=0,m=b,f=s,y=w,_=0,h=-1,k=1<<w,d=k-1,1===e&&k>852||2===e&&k>592)return 1;for(;;){j=m-_,a[g]+1<p?(P=0,E=a[g]):a[g]>=p?(P=I[a[g]-p],E=S[a[g]-p]):(P=96,E=0),c=1<<m-_,u=1<<y,b=u;do{u-=c,i[f+(N>>_)+u]=j<<24|P<<16|E}while(0!==u);for(c=1<<m-1;N&c;)c>>=1;if(0!==c?(N&=c-1,N+=c):N=0,g++,0===--A[m]){if(m===v)break;m=t[r+a[g]]}if(m>w&&(N&d)!==h){for(0===_&&(_=w),f+=b,y=m-_,x=1<<y;y+_<v&&(x-=A[y+_],!(x<=0));)y++,x<<=1;if(k+=1<<y,1===e&&k>852||2===e&&k>592)return 1;h=N&d,i[h]=w<<24|y<<16|f-s}}return 0!==N&&(i[f+N]=m-_<<24|64<<16),o.bits=w,0};const{Z_FINISH:Bu,Z_BLOCK:Du,Z_TREES:Mu,Z_OK:Uu,Z_STREAM_END:qu,Z_NEED_DICT:zu,Z_STREAM_ERROR:$u,Z_DATA_ERROR:Wu,Z_MEM_ERROR:Hu,Z_BUF_ERROR:Vu,Z_DEFLATED:Gu}=hc,Ku=16180,Ju=16190,Yu=16191,Zu=16192,Xu=16194,Qu=16199,eh=16200,th=16206,rh=16209,nh=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function ih(){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 sh=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Ku||t.mode>16211?1:0},ah=e=>{if(sh(e))return $u;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Ku,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Uu},oh=e=>{if(sh(e))return $u;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ah(e)},lh=(e,t)=>{let r;if(sh(e))return $u;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?$u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,oh(e))},ch=(e,t)=>{if(!e)return $u;const r=new ih;e.state=r,r.strm=e,r.window=null,r.mode=Ku;const n=lh(e,t);return n!==Uu&&(e.state=null),n};let uh,hh,dh=!0;const fh=e=>{if(dh){uh=new Int32Array(512),hh=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Fu(1,e.lens,0,288,uh,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Fu(2,e.lens,0,32,hh,0,e.work,{bits:5}),dh=!1}e.lencode=uh,e.lenbits=9,e.distcode=hh,e.distbits=5},ph=(e,t,r,n)=>{let i;const s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),n>=s.wsize?(s.window.set(t.subarray(r-s.wsize,r),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>n&&(i=n),s.window.set(t.subarray(r-n,r-n+i),s.wnext),(n-=i)?(s.window.set(t.subarray(r-n,r),0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0};var mh={inflateReset:oh,inflateReset2:lh,inflateResetKeep:ah,inflateInit:e=>ch(e,15),inflateInit2:ch,inflate:(e,t)=>{let r,n,i,s,a,o,l,c,u,h,d,f,p,m,g,b,v,w,y,_,x,k,N=0;const S=new Uint8Array(4);let A,L;const j=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(sh(e)||!e.output||!e.input&&0!==e.avail_in)return $u;r=e.state,r.mode===Yu&&(r.mode=Zu),a=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,c=r.hold,u=r.bits,h=o,d=l,k=Uu;e:for(;;)switch(r.mode){case Ku:if(0===r.wrap){r.mode=Zu;break}for(;u<16;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if(2&r.wrap&&35615===c){0===r.wbits&&(r.wbits=15),r.check=0,S[0]=255&c,S[1]=c>>>8&255,r.check=cc(r.check,S,2,0),c=0,u=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=rh;break}if((15&c)!==Gu){e.msg="unknown compression method",r.mode=rh;break}if(c>>>=4,u-=4,x=8+(15&c),0===r.wbits&&(r.wbits=x),x>15||x>r.wbits){e.msg="invalid window size",r.mode=rh;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=512&c?16189:Yu,c=0,u=0;break;case 16181:for(;u<16;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if(r.flags=c,(255&r.flags)!==Gu){e.msg="unknown compression method",r.mode=rh;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=rh;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&4&r.wrap&&(S[0]=255&c,S[1]=c>>>8&255,r.check=cc(r.check,S,2,0)),c=0,u=0,r.mode=16182;case 16182:for(;u<32;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}r.head&&(r.head.time=c),512&r.flags&&4&r.wrap&&(S[0]=255&c,S[1]=c>>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,r.check=cc(r.check,S,4,0)),c=0,u=0,r.mode=16183;case 16183:for(;u<16;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&4&r.wrap&&(S[0]=255&c,S[1]=c>>>8&255,r.check=cc(r.check,S,2,0)),c=0,u=0,r.mode=16184;case 16184:if(1024&r.flags){for(;u<16;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&4&r.wrap&&(S[0]=255&c,S[1]=c>>>8&255,r.check=cc(r.check,S,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(f=r.length,f>o&&(f=o),f&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(s,s+f),x)),512&r.flags&&4&r.wrap&&(r.check=cc(r.check,n,f,s)),o-=f,s+=f,r.length-=f),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===o)break e;f=0;do{x=n[s+f++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&f<o);if(512&r.flags&&4&r.wrap&&(r.check=cc(r.check,n,f,s)),o-=f,s+=f,x)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===o)break e;f=0;do{x=n[s+f++],r.head&&x&&r.length<65536&&(r.head.comment+=String.fromCharCode(x))}while(x&&f<o);if(512&r.flags&&4&r.wrap&&(r.check=cc(r.check,n,f,s)),o-=f,s+=f,x)break e}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;u<16;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if(4&r.wrap&&c!==(65535&r.check)){e.msg="header crc mismatch",r.mode=rh;break}c=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Yu;break;case 16189:for(;u<32;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}e.adler=r.check=nh(c),c=0,u=0,r.mode=Ju;case Ju:if(0===r.havedict)return e.next_out=a,e.avail_out=l,e.next_in=s,e.avail_in=o,r.hold=c,r.bits=u,zu;e.adler=r.check=1,r.mode=Yu;case Yu:if(t===Du||t===Mu)break e;case Zu:if(r.last){c>>>=7&u,u-=7&u,r.mode=th;break}for(;u<3;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}switch(r.last=1&c,c>>>=1,u-=1,3&c){case 0:r.mode=16193;break;case 1:if(fh(r),r.mode=Qu,t===Mu){c>>>=2,u-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=rh}c>>>=2,u-=2;break;case 16193:for(c>>>=7&u,u-=7&u;u<32;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",r.mode=rh;break}if(r.length=65535&c,c=0,u=0,r.mode=Xu,t===Mu)break e;case Xu:r.mode=16195;case 16195:if(f=r.length,f){if(f>o&&(f=o),f>l&&(f=l),0===f)break e;i.set(n.subarray(s,s+f),a),o-=f,s+=f,l-=f,a+=f,r.length-=f;break}r.mode=Yu;break;case 16196:for(;u<14;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if(r.nlen=257+(31&c),c>>>=5,u-=5,r.ndist=1+(31&c),c>>>=5,u-=5,r.ncode=4+(15&c),c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=rh;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;u<3;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}r.lens[j[r.have++]]=7&c,c>>>=3,u-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},k=Fu(0,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,k){e.msg="invalid code lengths set",r.mode=rh;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;N=r.lencode[c&(1<<r.lenbits)-1],g=N>>>24,b=N>>>16&255,v=65535&N,!(g<=u);){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if(v<16)c>>>=g,u-=g,r.lens[r.have++]=v;else{if(16===v){for(L=g+2;u<L;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if(c>>>=g,u-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=rh;break}x=r.lens[r.have-1],f=3+(3&c),c>>>=2,u-=2}else if(17===v){for(L=g+3;u<L;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}c>>>=g,u-=g,x=0,f=3+(7&c),c>>>=3,u-=3}else{for(L=g+7;u<L;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}c>>>=g,u-=g,x=0,f=11+(127&c),c>>>=7,u-=7}if(r.have+f>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=rh;break}for(;f--;)r.lens[r.have++]=x}}if(r.mode===rh)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=rh;break}if(r.lenbits=9,A={bits:r.lenbits},k=Fu(1,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,k){e.msg="invalid literal/lengths set",r.mode=rh;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},k=Fu(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,k){e.msg="invalid distances set",r.mode=rh;break}if(r.mode=Qu,t===Mu)break e;case Qu:r.mode=eh;case eh:if(o>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=s,e.avail_in=o,r.hold=c,r.bits=u,Eu(e,d),a=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,c=r.hold,u=r.bits,r.mode===Yu&&(r.back=-1);break}for(r.back=0;N=r.lencode[c&(1<<r.lenbits)-1],g=N>>>24,b=N>>>16&255,v=65535&N,!(g<=u);){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if(b&&!(240&b)){for(w=g,y=b,_=v;N=r.lencode[_+((c&(1<<w+y)-1)>>w)],g=N>>>24,b=N>>>16&255,v=65535&N,!(w+g<=u);){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}c>>>=w,u-=w,r.back+=w}if(c>>>=g,u-=g,r.back+=g,r.length=v,0===b){r.mode=16205;break}if(32&b){r.back=-1,r.mode=Yu;break}if(64&b){e.msg="invalid literal/length code",r.mode=rh;break}r.extra=15&b,r.mode=16201;case 16201:if(r.extra){for(L=r.extra;u<L;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;N=r.distcode[c&(1<<r.distbits)-1],g=N>>>24,b=N>>>16&255,v=65535&N,!(g<=u);){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if(!(240&b)){for(w=g,y=b,_=v;N=r.distcode[_+((c&(1<<w+y)-1)>>w)],g=N>>>24,b=N>>>16&255,v=65535&N,!(w+g<=u);){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}c>>>=w,u-=w,r.back+=w}if(c>>>=g,u-=g,r.back+=g,64&b){e.msg="invalid distance code",r.mode=rh;break}r.offset=v,r.extra=15&b,r.mode=16203;case 16203:if(r.extra){for(L=r.extra;u<L;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=rh;break}r.mode=16204;case 16204:if(0===l)break e;if(f=d-l,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=rh;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),m=r.window}else m=i,p=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{i[a++]=m[p++]}while(--f);0===r.length&&(r.mode=eh);break;case 16205:if(0===l)break e;i[a++]=r.length,l--,r.mode=eh;break;case th:if(r.wrap){for(;u<32;){if(0===o)break e;o--,c|=n[s++]<<u,u+=8}if(d-=l,e.total_out+=d,r.total+=d,4&r.wrap&&d&&(e.adler=r.check=r.flags?cc(r.check,i,d,a-d):oc(r.check,i,d,a-d)),d=l,4&r.wrap&&(r.flags?c:nh(c))!==r.check){e.msg="incorrect data check",r.mode=rh;break}c=0,u=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;u<32;){if(0===o)break e;o--,c+=n[s++]<<u,u+=8}if(4&r.wrap&&c!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=rh;break}c=0,u=0}r.mode=16208;case 16208:k=qu;break e;case rh:k=Wu;break e;case 16210:return Hu;default:return $u}return e.next_out=a,e.avail_out=l,e.next_in=s,e.avail_in=o,r.hold=c,r.bits=u,(r.wsize||d!==e.avail_out&&r.mode<rh&&(r.mode<th||t!==Bu))&&ph(e,e.output,e.next_out,d-e.avail_out),h-=e.avail_in,d-=e.avail_out,e.total_in+=h,e.total_out+=d,r.total+=d,4&r.wrap&&d&&(e.adler=r.check=r.flags?cc(r.check,i,d,e.next_out-d):oc(r.check,i,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Yu?128:0)+(r.mode===Qu||r.mode===Xu?256:0),(0===h&&0===d||t===Bu)&&k===Uu&&(k=Vu),k},inflateEnd:e=>{if(sh(e))return $u;let t=e.state;return t.window&&(t.window=null),e.state=null,Uu},inflateGetHeader:(e,t)=>{if(sh(e))return $u;const r=e.state;return 2&r.wrap?(r.head=t,t.done=!1,Uu):$u},inflateSetDictionary:(e,t)=>{const r=t.length;let n,i,s;return sh(e)?$u:(n=e.state,0!==n.wrap&&n.mode!==Ju?$u:n.mode===Ju&&(i=1,i=oc(i,t,r,0),i!==n.check)?Wu:(s=ph(e,t,r,r),s?(n.mode=16210,Hu):(n.havedict=1,Uu)))},inflateInfo:"pako inflate (from Nodeca project)"};var gh=function(){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};const bh=Object.prototype.toString,{Z_NO_FLUSH:vh,Z_FINISH:wh,Z_OK:yh,Z_STREAM_END:_h,Z_NEED_DICT:xh,Z_STREAM_ERROR:kh,Z_DATA_ERROR:Nh,Z_MEM_ERROR:Sh}=hc;function Ah(e){this.options=uu({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bu,this.strm.avail_out=0;let r=mh.inflateInit2(this.strm,t.windowBits);if(r!==yh)throw new Error(uc[r]);if(this.header=new gh,mh.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=pu(t.dictionary):"[object ArrayBuffer]"===bh.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=mh.inflateSetDictionary(this.strm,t.dictionary),r!==yh)))throw new Error(uc[r])}function Lh(e,t){const r=new Ah(t);if(r.push(e),r.err)throw r.msg||uc[r.err];return r.result}Ah.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(a=t===~~t?t:!0===t?wh:vh,"[object ArrayBuffer]"===bh.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),s=mh.inflate(r,a),s===xh&&i&&(s=mh.inflateSetDictionary(r,i),s===yh?s=mh.inflate(r,a):s===Nh&&(s=xh));r.avail_in>0&&s===_h&&r.state.wrap>0&&0!==e[r.next_in];)mh.inflateReset(r),s=mh.inflate(r,a);switch(s){case kh:case Nh:case xh:case Sh:return this.onEnd(s),this.ended=!0,!1}if(o=r.avail_out,r.next_out&&(0===r.avail_out||s===_h))if("string"===this.options.to){let e=gu(r.output,r.next_out),t=r.next_out-e,i=mu(r.output,e);r.next_out=t,r.avail_out=n-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(s!==yh||0!==o){if(s===_h)return s=mh.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Ah.prototype.onData=function(e){this.chunks.push(e)}
vendor: 6,641 bytes, line 22
22,Ah.prototype.onEnd=function(e){e===yh&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=hu(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var jh=function(e,t){return(t=t||{}).raw=!0,Lh(e,t)},Ph={Inflate:Ah,inflate:Lh,inflateRaw:jh,ungzip:Lh,constants:hc};const{Inflate:Eh,inflate:Ih,inflateRaw:Th,ungzip:Oh}=Ph;var Ch=Eh,Rh=Ih;const Fh=[];for(let Xg=0;Xg<256;Xg++){let e=Xg;for(let t=0;t<8;t++)1&e?e=3988292384^e>>>1:e>>>=1;Fh[Xg]=e}const Bh=4294967295;function Dh(e,t){return(function(e,t,r){let n=e;for(let i=0;i<r;i++)n=Fh[255&(n^t[i])]^n>>>8;return n}(Bh,e,t)^Bh)>>>0}function Mh(e,t,r){const n=e.readUint32(),i=Dh(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(i!==n)throw new Error(`CRC mismatch for chunk ${r}. Expected ${n}, found ${i}`)}function Uh(e,t,r){for(let n=0;n<r;n++)t[n]=e[n]}function qh(e,t,r,n){let i=0;for(;i<n;i++)t[i]=e[i];for(;i<r;i++)t[i]=e[i]+t[i-n]&255}function zh(e,t,r,n){let i=0;if(0===r.length)for(;i<n;i++)t[i]=e[i];else for(;i<n;i++)t[i]=e[i]+r[i]&255}function $h(e,t,r,n,i){let s=0;if(0===r.length){for(;s<i;s++)t[s]=e[s];for(;s<n;s++)t[s]=e[s]+(t[s-i]>>1)&255}else{for(;s<i;s++)t[s]=e[s]+(r[s]>>1)&255;for(;s<n;s++)t[s]=e[s]+(t[s-i]+r[s]>>1)&255}}function Wh(e,t,r,n,i){let s=0;if(0===r.length){for(;s<i;s++)t[s]=e[s];for(;s<n;s++)t[s]=e[s]+t[s-i]&255}else{for(;s<i;s++)t[s]=e[s]+r[s]&255;for(;s<n;s++)t[s]=e[s]+Hh(t[s-i],r[s],r[s-i])&255}}function Hh(e,t,r){const n=e+t-r,i=Math.abs(n-e),s=Math.abs(n-t),a=Math.abs(n-r);return i<=s&&i<=a?e:s<=a?t:r}function Vh(e,t,r,n,i,s){switch(e){case 0:Uh(t,r,i);break;case 1:qh(t,r,i,s);break;case 2:zh(t,r,n,i);break;case 3:$h(t,r,n,i,s);break;case 4:Wh(t,r,n,i,s);break;default:throw new Error(`Unsupported filter: ${e}`)}}const Gh=new Uint16Array([255]),Kh=255===new Uint8Array(Gh.buffer)[0];function Jh(e){return(255&e)<<8|e>>8&255}const Yh=new Uint16Array([255]),Zh=255===new Uint8Array(Yh.buffer)[0],Xh=new Uint8Array(0);function Qh(e){const{data:t,width:r,height:n,channels:i,depth:s}=e,a=Math.ceil(s/8)*i,o=Math.ceil(s/8*i*r),l=new Uint8Array(n*o);let c,u,h=Xh,d=0;for(let f=0;f<n;f++){switch(c=t.subarray(d+1,d+1+o),u=l.subarray(f*o,(f+1)*o),t[d]){case 0:Uh(c,u,o);break;case 1:qh(c,u,o,a);break;case 2:zh(c,u,h,o);break;case 3:$h(c,u,h,o,a);break;case 4:Wh(c,u,h,o,a);break;default:throw new Error(`Unsupported filter: ${t[d]}`)}h=u,d+=o+1}if(16===s){const e=new Uint16Array(l.buffer);if(Zh)for(let t=0;t<e.length;t++)e[t]=ed(e[t]);return e}return l}function ed(e){return(255&e)<<8|e>>8&255}const td=Uint8Array.of(137,80,78,71,13,10,26,10);function rd(e){if(!function(e){if(e.length<td.length)return!1;for(let t=0;t<td.length;t++)if(e[t]!==td[t])return!1;return!0}(e.readBytes(td.length)))throw new Error("wrong PNG signature")}const nd=new TextDecoder("latin1");function id(e){if(function(e){if(!sd.test(e))throw new Error("invalid latin1 text")}(e),0===e.length||e.length>79)throw new Error("keyword length must be between 1 and 79")}const sd=/^[\u0000-\u00FF]*$/;function ad(e,t,r){const n=od(t);e[n]=function(e,t){return nd.decode(e.readBytes(t))}(t,r-n.length-1)}function od(e){for(e.mark();0!==e.readByte(););const t=e.offset;e.reset();const r=nd.decode(e.readBytes(t-e.offset-1));return e.skip(1),id(r),r}const ld=-1,cd=0,ud=2,hd=3,dd=4,fd=6,pd=-1,md=0,gd=-1,bd=0,vd=-1,wd=0,yd=1,_d=0,xd=1,kd=2,Nd=0,Sd=1;class Ad extends kl{constructor(e,t={}){super(e),r(this,"_checkCrc"),r(this,"_inflator"),r(this,"_png"),r(this,"_apng"),r(this,"_end"),r(this,"_hasPalette"),r(this,"_palette"),r(this,"_hasTransparency"),r(this,"_transparency"),r(this,"_compressionMethod"),r(this,"_filterMethod"),r(this,"_interlaceMethod"),r(this,"_colorType"),r(this,"_isAnimated"),r(this,"_numberOfFrames"),r(this,"_numberOfPlays"),r(this,"_frames"),r(this,"_writingDataChunks");const{checkCrc:n=!1}=t;this._checkCrc=n,this._inflator=new Ch,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=pd,this._filterMethod=gd,this._interlaceMethod=vd,this._colorType=ld,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(rd(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this.decodeImage(),this._png}decodeApng(){for(rd(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){const r=this.offset;switch(t){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case"tEXt":ad(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e)}if(this.offset-r!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?Mh(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){const r=this.offset;switch("fdAT"!==t&&"IDAT"!==t&&this._writingDataChunks&&this.pushDataToFrame(),t){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=r+e}if(this.offset-r!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?Mh(this,e+4,t):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=function(e){if(1!==e&&2!==e&&4!==e&&8!==e&&16!==e)throw new Error(`invalid bit depth: ${e}`);return e}(this.readUint8());const t=this.readUint8();let r;switch(this._colorType=t,t){case cd:r=1;break;case ud:r=3;break;case hd:r=1;break;case dd:r=2;break;case fd:r=4;break;default:throw new Error(`Unknown color type: ${t}`)}if(this._png.channels=r,this._compressionMethod=this.readUint8(),this._compressionMethod!==md)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 e={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(e)}
vendor: 1,261 bytes, line 22
22decodePLTE(e){if(e%3!=0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const t=e/3;this._hasPalette=!0;const r=[];this._palette=r;for(let n=0;n<t;n++)r.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const t=e,r=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,r,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,r=this.offset+this.byteOffset;if(r+=4,t-=4,this._inflator.push(new Uint8Array(this.buffer,r,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case cd:case ud:if(e%2!=0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;t<e/2;t++)this._transparency[t]=this.readUint16();break;case hd:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alph
22a values than there are palette colors (${e} vs ${this._palette.length})`);let t=0;for(;t<e;t++){const e=this.readByte();this._palette[t].push(e)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const t=od(this),r=this.readUint8();if(r!==md)throw new Error(`Unsupported iCCP compression method: ${r}`);const n=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:Rh(n)}}decodepHYs(){const e=this.readUint32(),t=this.readUint32(),r=this.readByte();this._png.resolution={x:e,y:t,unit:r}}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 e=0;e<this._numberOfFrames;e++){const t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:8===this._apng.depth?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},r=this._frames.at(e);if(r){if(r.data=Qh({data:r.data,width:r.width,height:r.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),0===e||0===r.xOffset&&0===r.yOffset&&r.width===this._png.width&&r.height===this._png.height)t.data=r.data;else{const n=this._apng.frames.at(e-1);this.disposeFrame(r,n,t),this.addFrameDataToCanvas(t,r)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,r){switch(e.disposeOp){case _d:break;case xd:for(let t=0;t<this._png.height;t++)for(let n=0;n<this._png.width;n++){const i=(t*e.width+n)*this._png.channels;for(let e=0;e<this._png.channels;e++)r.data[i+e]=0}break;case kd:r.data.set(t.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,t){const r=1<<this._png.depth,n=(e,r)=>({index:((e+t.yOffset)*this._png.width+t.xOffset+r)*this._png.channels,frameIndex:(e*t.width+r)*this._png.channels});switch(t.blendOp){case Nd:for(let r=0;r<t.height;r++)for(let i=0;i<t.width;i++){const{index:s,frameIndex:a}=n(r,i);for(let r=0;r<this._png.channels;r++)e.data[s+r]=t.data[a+r]}break;case Sd:for(let i=0;i<t.height;i++)for(let s=0;s<t.width;s++){const{index:a,frameIndex:o}=n(i,s);for(let n=0;n<this._png.channels;n++){const i=t.data[o+this._png.channels-1]/r,s=n%(this._png.channels-1)==0?1:t.data[o+n],l=Math.floor(i*s+(1-i)*e.data[a+n]);e.data[a+n]+=l}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var e;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const t=this._isAnimated?(null==(e=this._frames)?void 0:e.at(0)).data:this._inflator.result;if(this._filterMethod!==bd)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===wd)this._png.data=Qh({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else{if(this._interlaceMethod!==yd)throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._png.data=function(e){const{data:t,width:r,height:n,channels:i,depth:s}=e,a=[{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}],o=Math.ceil(s/8)*i,l=new Uint8Array(n*r*o);let c=0;for(let u=0;u<7;u++){const e=a[u],i=Math.ceil((r-e.x)/e.xStep),s=Math.ceil((n-e.y)/e.yStep);if(i<=0||s<=0)continue;const h=i*o,d=new Uint8Array(h);for(let a=0;a<s;a++){const s=t[c++],u=t.subarray(c,c+h);c+=h;const f=new Uint8Array(h);Vh(s,u,f,d,h,o),d.set(f);for(let t=0;t<i;t++){const i=e.x+t*e.xStep,s=e.y+a*e.yStep;if(!(i>=r||s>=n))for(let e=0;e<o;e++)l[(s*r+i)*o+e]=f[t*o+e]}}}if(16===s){const e=new Uint16Array(l.buffer);if(Kh)for(let t=0;t<e.length;t++)e[t]=Jh(e[t]);return e}return l}({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth})}this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const e=this._inflator.result,t=this._frames.at(-1);t?t.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:_d,blendOp:Nd,data:e}),this._inflator=new Ch,this._writingDataChunks=!1}}var Ld,jd;(jd=Ld||(Ld={}))[jd.UNKNOWN=0]="UNKNOWN",jd[jd.METRE=1]="METRE";var Pd=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function Ed(){Pd.console&&"function"==typeof Pd.console.log&&Pd.console.log.apply(Pd.console,arguments)}var Id={log:Ed,warn:function(e){Pd.console&&("function"==typeof Pd.console.warn?Pd.console.warn.apply(Pd.console,arguments):Ed.call(null,arguments))},error:function(e){Pd.console&&("function"==typeof Pd.console.error?Pd.console.error.apply(Pd.console,arguments):Ed(e))}};function Td(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){Rd(n.response,t,r)},n.onerror=function(){Id.error("could not download file")},n.send()}function Od(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(r){}return t.status>=200&&t.status<=299}function Cd(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");
vendor: 3,444 bytes, lines 22-28
22t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Rd=Pd.saveAs||("object"!==("undefined"==typeof window?"undefined":Ro(window))||window!==Pd?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(e,t,r){var n=Pd.URL||Pd.webkitURL,i=document.createElement("a");t=t||e.name||"download",i.download=t,i.rel="noopener","string"==typeof e?(i.href=e,i.origin!==location.origin?Od(i.href)?Td(e,t,r):Cd(i,i.target="_blank"):Cd(i)):(i.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){Cd(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download","string"==typeof e)if(Od(e))Td(e,t,r);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){Cd(n)})}else navigator.msSaveOrOpenBlob((i=e,void 0===(s=r)?s={autoBom:!1}:"object"!==Ro(s)&&(Id.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob([String.fromCharCode(65279),i],{type:i.type}):i),t);var i,s}:function(e,t,r,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof e)return Td(e,t,r);var i="application/octet-stream"===e.type,s=/constructor/i.test(Pd.HTMLElement)||Pd.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||i&&s)&&"object"===("undefined"==typeof FileReader?"undefined":Ro(FileReader))){var o=new FileReader;o.onloadend=function(){var e=o.result;e=a?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=e:location=e,n=null},o.readAsDataURL(e)}else{var l=Pd.URL||Pd.webkitURL,c=l.createObjectURL(e);n?n.location=c:location.href=c,n=null,setTimeout(function(){l.revokeObjectURL(c)},4e4)}}); 23/** 24 * A class to parse color values 25 * @author Stoyan Stefanov <[email protected]> 26 * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} 27 * @license Use it if you like it 28 */function Fd(e){var t;e=e||"",this.ok=!1,"#"==e.charAt(0)&&(e=e.substr(1,6)),e={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
280",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"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],n=0;n<r.length;n++){var i=r[n].re,s=r[n].process,a=i.exec(e);a&&(t=s(a),this.r=t[0],this.g=t[1],this.b=t[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 e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return 1==e.length&&(e="0"+e),1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),"#"+e+t+r}}var Bd=Pd.atob.bind(Pd),Dd=Pd.btoa.bind(Pd); 29/** 30 * @license 31 * Joseph Myers does not specify a particular license for his work. 32 * 33 * Author: Joseph Myers 34 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js 35 * 36 * Modified by: Owen Leong 37 */function Md(e,t){var r=e[0],n=e[1],i=e[2],s=e[3];r=qd(r,n,i,s,t[0],7,-680876936),s=qd(s,r,n,i,t[1],12,-389564586),i=qd(i,s,r,n,t[2],17,606105819),n=qd(n,i,s,r,t[3],22,-1044525330),r=qd(r,n,i,s,t[4],7,-176418897),s=qd(s,r,n,i,t[5],12,1200080426),i=qd(i,s,r,n,t[6],17,-1473231341),n=qd(n,i,s,r,t[7],22,-45705983),r=qd(r,n,i,s,t[8],7,1770035416),s=qd(s,r,n,i,t[9],12,-1958414417),i=qd(i,s,r,n,t[10],17,-42063),n=qd(n,i,s,r,t[11],22,-1990404162),r=qd(r,n,i,s,t[12],7,1804603682),s=qd(s,r,n,i,t[13],12,-40341101),i=qd(i,s,r,n,t[14],17,-1502002290),r=zd(r,n=qd(n,i,s,r,t[15],22,1236535329),i,s,t[1],5,-165796510),s=zd(s,r,n,i,t[6],9,-1069501632),i=zd(i,s,r,n,t[11],14,643717713),n=zd(n,i,s,r,t[0],20,-373897302),r=zd(r,n,i,s,t[5],5,-701558691),s=zd(s,r,n,i,t[10],9,38016083),i=zd(i,s,r,n,t[15],14,-660478335),n=zd(n,i,s,r,t[4],20,-405537848),r=zd(r,n,i,s,t[9],5,568446438),s=zd(s,r,n,i,t[14],9,-1019803690),i=zd(i,s,r,n,t[3],14,-187363961),n=zd(n,i,s,r,t[8],20,1163531501),r=zd(r,n,i,s,t[13],5,-1444681467),s=zd(s,r,n,i,t[2],9,-51403784),i=zd(i,s,r,n,t[7],14,1735328473),r=$d(r,n=zd(n,i,s,r,t[12],20,-1926607734),i,s,t[5],4,-378558),s=$d(s,r,n,i,t[8],11,-2022574463),i=$d(i,s,r,n,t[11],16,1839030562),n=$d(n,i,s,r,t[14],23,-35309556),r=$d(r,n,i,s,t[1],4,-1530992060),s=$d(s,r,n,i,t[4],11,1272893353),i=$d(i,s,r,n,t[7],16,-155497632),n=$d(n,i,s,r,t[10],23,-1094730640),r=$d(r,n,i,s,t[13],4,681279174),s=$d(s,r,n,i,t[0],11,-358537222),i=$d(i,s,r,n,t[3],16,-722521979),n=$d(n,i,s,r,t[6],23,76029189),r=$d(r,n,i,s,t[9],4,-640364487),s=$d(s,r,n,i,t[12],11,-421815835),i=$d(i,s,r,n,t[15],16,530742520),r=Wd(r,n=$d(n,i,s,r,t[2],23,-995338651),i,s,t[0],6,-198630844),s=Wd(s,r,n,i,t[7],10,1126891415),i=Wd(i,s,r,n,t[14],15,-1416354905),n=Wd(n,i,s,r,t[5],21,-57434055),r
vendor: 8,450 bytes, lines 37-56
37=Wd(r,n,i,s,t[12],6,1700485571),s=Wd(s,r,n,i,t[3],10,-1894986606),i=Wd(i,s,r,n,t[10],15,-1051523),n=Wd(n,i,s,r,t[1],21,-2054922799),r=Wd(r,n,i,s,t[8],6,1873313359),s=Wd(s,r,n,i,t[15],10,-30611744),i=Wd(i,s,r,n,t[6],15,-1560198380),n=Wd(n,i,s,r,t[13],21,1309151649),r=Wd(r,n,i,s,t[4],6,-145523070),s=Wd(s,r,n,i,t[11],10,-1120210379),i=Wd(i,s,r,n,t[2],15,718787259),n=Wd(n,i,s,r,t[9],21,-343485551),e[0]=Xd(r,e[0]),e[1]=Xd(n,e[1]),e[2]=Xd(i,e[2]),e[3]=Xd(s,e[3])}function Ud(e,t,r,n,i,s){return t=Xd(Xd(t,e),Xd(n,s)),Xd(t<<i|t>>>32-i,r)}function qd(e,t,r,n,i,s,a){return Ud(t&r|~t&n,e,t,i,s,a)}function zd(e,t,r,n,i,s,a){return Ud(t&n|r&~n,e,t,i,s,a)}function $d(e,t,r,n,i,s,a){return Ud(t^r^n,e,t,i,s,a)}function Wd(e,t,r,n,i,s,a){return Ud(r^(t|~n),e,t,i,s,a)}function Hd(e){var t,r=e.length,n=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)Md(n,Vd(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(Md(n,i),t=0;t<16;t++)i[t]=0;return i[14]=8*r,Md(n,i),n}function Vd(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}var Gd="0123456789abcdef".split("");function Kd(e){for(var t="",r=0;r<4;r++)t+=Gd[e>>8*r+4&15]+Gd[e>>8*r&15];return t}function Jd(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function Yd(e){return Hd(e).map(Jd).join("")}var Zd="5d41402abc4b2a76b9719d911017c592"!=function(e){for(var t=0;t<e.length;t++)e[t]=Kd(e[t]);return e.join("")}(Hd("hello"));function Xd(e,t){if(Zd){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}return e+t&4294967295} 38/** 39 * @license 40 * FPDF is released under a permissive license: there is no usage restriction. 41 * You may embed it freely in your application (commercial or not), with or 42 * without modifications. 43 * 44 * Reference: http://www.fpdf.org/en/script/script37.php 45 */function Qd(e,t){var r,n,i,s;if(e!==r){for(var a=(i=e,s=1+(256/e.length|0),new Array(s+1).join(i)),o=[],l=0;l<256;l++)o[l]=l;var c=0;for(l=0;l<256;l++){var u=o[l];c=(c+u+a.charCodeAt(l))%256,o[l]=o[c],o[c]=u}r=e,n=o}else o=n;var h=t.length,d=0,f=0,p="";for(l=0;l<h;l++)f=(f+(u=o[d=(d+1)%256]))%256,o[d]=o[f],o[f]=u,a=o[(o[d]+o[f])%256],p+=String.fromCharCode(t.charCodeAt(l)^a);return p} 46/** 47 * @license 48 * Licensed under the MIT License. 49 * http://opensource.org/licenses/mit-license 50 * Author: Owen Leong (@owenl131) 51 * Date: 15 Oct 2020 52 * References: 53 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt 54 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js 55 * http://www.fpdf.org/en/script/script37.php 56 */var ef={print:4,modify:8,copy:16,"annot-forms":32};function tf(e,t,r,n){this.v=1,this.r=2;var i=192;e.forEach(function(e){if(void 0!==ef.perm)throw new Error("Invalid permission: "+e);i+=ef[e]}),this.padding="(¿N^NuÂAd\0NVÿú�\b..\0¶Ãh>Â/\f©þdSiz";var s=(t+this.padding).substr(0,32),a=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,a),this.P=-(1+(255^i)),this.encryptionKey=Yd(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=Qd(this.encryptionKey,this.padding)}function rf(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",r=e.length,n=0;n<r;n++){var i=e.charCodeAt(n);t+=i<33||35===i||37===i||40===i||41===i||47===i||60===i||62===i||91===i||93===i||123===i||125===i||i>126?"#"+("0"+i.toString(16)).slice(-2):e[n]}return t}function nf(e){if("object"!==Ro(e))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,r,n){if(n=n||!1,"string"!=typeof e||"function"!=typeof r||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var i=Math.random().toString(35);return t[e][i]=[r,!!n],i},this.unsubscribe=function(e){for(var r in t)if(t[r][e])return delete t[r][e],0===Object.keys(t[r]).length&&delete t[r],!0;return!1},this.publish=function(r){if(t.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var s in t[r]){var a=t[r][s];try{a[0].apply(e,n)}catch(o){Pd.console&&Id.error("jsPDF PubSub Error",o.message,o)}a[1]&&i.push(s)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function sf(e){if(!(this instanceof sf))return new sf(e);var t="opacity,stroke-opacity".split(",");for(var r in e)e.hasOwnProperty(r)&&t.indexOf(r)>=0&&(this[r]=e[r]);this.id="",this.objectNumber=-1}function af(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function of(e,t,r,n,i){if(!(this instanceof of))return new of(e,t,r,n,i);this.type="axial"===e?2:3,this.coords=t,this.colors=r,af.call(this,n,i)}function lf(e,t,r,n,i){if(!(this instanceof lf))return new lf(e,t,r,n,i);this.boundingBox=e,this.xStep=t,this.yStep=r,this.stream="",this.cloneIndex=0,af.call(this,n,i)}function cf(e){var t,r="string"==typeof arguments[0]?arguments[0]:"p",n=arguments[1],i=arguments[2],s=arguments[3],a=[],o=1,l=16,c="S",u=null;"object"===Ro(e=e||{})&&(r=e.orientation,n=e.unit||n,i=e.format||i,s=e.compress||e.compressPdf||s,null!==(u=e.encryption||null)&&(u.userPassword=u.userPassword||"",u.ownerPassword=u.ownerPassword||"",u.userPermissions=u.userPermissions||[]),o="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(t=e.precision),void 0!==e.floatPrecision&&(l=e.floatPrecision),c=e.defaultPathOperation||"S"),a=e.filters||(!0===s?["FlateEncode"]:a),n=n||"mm",r=(""+(r||"P")).toLowerCase();var h=e.putOnlyUsedFonts||!1,d={},f={internal:{},__private__:{}};f.__private__.PubSub=nf;var p="1.3",m=f.__private__.getPdfVersion=function(){return p};f.__private__.setPdfVersion=function(e){p=e};var g={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]};f.__private__.getPageFormats=function(){return g};var b=f.__private__.getPageFormat=function(e){return g[e]};i=i||"a4";var v="compat",w="advanced",y=v;function _(){this.saveGraphicsState(),Z(new Ie(de,0,0,-de,0,dr()*de).toString()+" cm"),this.setFontSize(this.getFontSize()/de),c="n",y=w}function x(){this.restoreGraphicsState(),c="S",y=v}var k=f.__private__.combineFontStyleAndFontWeight=function(e,t){if("bold"==e&&"normal"==t||"bold"==e&&400==t||"normal"==e&&"italic"==t||"bold"==e&&"italic"==t)throw new Error("Invalid Combination of fontweight and fontstyle");return t&&(e=400==t||"normal"===t?"italic"===e?"italic":"normal":700!=t&&"bold"!==t||"normal"!==e?(700==t?"bold":t)+""+e:"bold"),e};f.advancedAPI=function(e){var t=y===v;return t&&_.call(this),"function"!=typeof e||(e(this),t&&x.call(this)),this},f.compatAPI=function(e){var t=y===w;return t&&x.call(this),"function"!=typeof e||(e(this),t&&_.call(this)),this},f.isAdvancedAPI=function(){return y===w};var N,S=function(e){if(y!==w)throw new Error(e+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},A=f.roundToPrecision=f.__private__.roundToPrecision=function(e,r){var n=t||r;if(isNaN(e)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return e.toFixed(n).replace(/0+$/,"")};N=f.hpf=f.__private__.hpf="number"==typeof l?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return A(e,l)}:"smart"===l?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return A(e,e>-1&&e<1?16:5)}:function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return A(e,16)};var L=f.f2=f.__private__.f2=function(e){if(isNaN(e))throw new Error("Invalid argument passed to
56jsPDF.f2");return A(e,2)},j=f.__private__.f3=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f3");return A(e,3)},P=f.scale=f.__private__.scale=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.scale");return y===v?e*de:y===w?e:void 0},E=function(e){return P((t=e,y===v?dr()-t:y===w?t:void 0));var t};f.__private__.setPrecision=f.setPrecision=function(e){"number"==typeof parseInt(e,10)&&(t=parseInt(e,10))};var I,T="00000000000000000000000000000000",O=f.__private__.getFileId=function(){return T},C=f.__private__.setFileId=function(e){return T=void 0!==e&&/^[a-fA-F0-9]{32}$/.test(e)?e.toUpperCase():T.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),null!==u&&(vt=new tf(u.userPermissions,u.userPassword,u.ownerPassword,T)),T};f.setFileId=function(e){return C(e),this},f.getFileId=function(){return O()};var R=f.__private__.convertDateToPDFDate=function(e){var t=e.getTimezoneOffset(),r=t<0?"+":"-",n=Math.floor(Math.abs(t/60)),i=Math.abs(t%60),s=[r,U(n),"'",U(i),"'"].join("");return["D:",e.getFullYear(),U(e.getMonth()+1),U(e.getDate()),U(e.getHours()),U(e.getMinutes()),U(e.getSeconds()),s].join("")},F=f.__private__.convertPDFDateToDate=function(e){var t=parseInt(e.substr(2,4),10),r=parseInt(e.substr(6,2),10)-1,n=parseInt(e.substr(8,2),10),i=parseInt(e.substr(10,2),10),s=parseInt(e.substr(12,2),10),a=parseInt(e.substr(14,2),10);return new Date(t,r,n,i,s,a,0)},B=f.__private__.setCreationDate=function(e){var t;if(void 0===e&&(e=new Date),e instanceof Date)t=R(e);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(e))throw new Error("Invalid argument passed to jsPDF.setCreationDate");t=e}return I=t},D=f.__private__.getCreationDate=function(e){var t=I;return"jsDate"===e&&(t=F(I)),t};f.setCreationDate=function(e){return B(e),this},f.getCreationDate=function(e){return D(e)};var M,U=f.__private__.padd2=function(e){return("0"+parseInt(e)).slice(-2)},q=f.__private__.padd2Hex=function(e){return("00"+(e=e.toString())).substr(e.length)},z=0,$=[],W=[],H=0,V=[],G=[],K=!1,J=W;f.__private__.setCustomOutputDestination=function(e){K=!0,J=e};var Y=function(e){K||(J=e)};f.__private__.resetCustomOutputDestination=function(){K=!1,J=W};var Z=f.__private__.out=function(e){return e=e.toString(),H+=e.length+1,J.push(e),J},X=f.__private__.write=function(e){return Z(1===arguments.length?e.toString():Array.prototype.join.call(arguments," "))},Q=f.__private__.getArrayBuffer=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r);t--;)n[t]=e.charCodeAt(t);return r},ee=[["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]];f.__private__.getStandardFonts=function(){return ee};var te=e.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(e){return te=y===w?e/de:e,this};var re,ne=f.__private__.getFontSize=f.getFontSize=function(){return y===v?te:te*de},ie=e.R2L||!1;f.__private__.setR2L=f.setR2L=function(e){return ie=e,this},f.__private__.getR2L=f.getR2L=function(){return ie};var se,ae=f.__private__.setZoomMode=function(e){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(e))re=e;else if(isNaN(e)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(e))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+e+'" is not recognized.');re=e}else re=parseInt(e,10)};f.__private__.getZoomMode=function(){return re};var oe,le=f.__private__.setPageMode=function(e){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(e))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+e+'" is not recognized.');se=e};f.__private__.getPageMode=function(){return se};var ce=f.__private__.setLayoutMode=function(e){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(e))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+e+'" is not recognized.');oe=e};f.__private__.getLayoutMode=function(){return oe},f.__private__.setDisplayMode=f.setDisplayMode=function(e,t,r){return ae(e),ce(t),le(r),this};var ue={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(e){if(-1===Object.keys(ue).indexOf(e))throw new Error("Invalid argument passed to
56jsPDF.getDocumentProperty");return ue[e]},f.__private__.getDocumentProperties=function(){return ue},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(e){for(var t in ue)ue.hasOwnProperty(t)&&e[t]&&(ue[t]=e[t]);return this},f.__private__.setDocumentProperty=function(e,t){if(-1===Object.keys(ue).indexOf(e))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ue[e]=t};var he,de,fe,pe,me,ge={},be={},ve=[],we={},ye={},_e={},xe={},ke=null,Ne=0,Se=[],Ae=new nf(f),Le=e.hotfixes||[],je={},Pe={},Ee=[],Ie=function e(t,r,n,i,s,a){if(!(this instanceof e))return new e(t,r,n,i,s,a);isNaN(t)&&(t=1),isNaN(r)&&(r=0),isNaN(n)&&(n=0),isNaN(i)&&(i=1),isNaN(s)&&(s=0),isNaN(a)&&(a=0),this._matrix=[t,r,n,i,s,a]};Object.defineProperty(Ie.prototype,"sx",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Ie.prototype,"shy",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Ie.prototype,"shx",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Ie.prototype,"sy",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Ie.prototype,"tx",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Ie.prototype,"ty",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Ie.prototype,"a",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Ie.prototype,"b",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Ie.prototype,"c",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Ie.prototype,"d",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Ie.prototype,"e",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Ie.prototype,"f",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Ie.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ie.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ie.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ie.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Ie.prototype.join=function(e){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(N).join(e)},Ie.prototype.multiply=function(e){var t=e.sx*this.sx+e.shy*this.shx,r=e.sx*this.shy+e.shy*this.sy,n=e.shx*this.sx+e.sy*this.shx,i=e.shx*this.shy+e.sy*this.sy,s=e.tx*this.sx+e.ty*this.shx+this.tx,a=e.tx*this.shy+e.ty*this.sy+this.ty;return new Ie(t,r,n,i,s,a)},Ie.prototype.decompose=function(){var e=this.sx,t=this.shy,r=this.shx,n=this.sy,i=this.tx,s=this.ty,a=Math.sqrt(e*e+t*t),o=(e/=a)*r+(t/=a)*n;r-=e*o,n-=t*o;var l=Math.sqrt(r*r+n*n);return o/=l,e*(n/=l)<t*(r/=l)&&(e=-e,t=-t,o=-o,a=-a),{scale:new Ie(a,0,0,l,0,0),translate:new Ie(1,0,0,1,i,s),rotate:new Ie(e,t,-t,e,0,0),skew:new Ie(1,0,o,1,0,0)}},Ie.prototype.toString=function(e){return this.join(" ")},Ie.prototype.inversed=function(){var e=this.sx,t=this.shy,r=this.shx,n=this.sy,i=this.tx,s=this.ty,a=1/(e*n-t*r),o=n*a,l=-t*a,c=-r*a,u=e*a;return new Ie(o,l,c,u,-o*i-c*s,-l*i-u*s)},Ie.prototype.applyToPoint=function(e){var t=e.x*this.sx+e.y*this.shx+this.tx,r=e.x*this.shy+e.y*this.sy+this.ty;return new tr(t,r)},Ie.prototype.applyToRectangle=function(e){var t=this.applyToPoint(e),r=this.applyToPoint(new tr(e.x+e.w,e.y+e.h));return new rr(t.x,t.y,r.x-t.x,r.y-t.y)},Ie.prototype.clone=function(){var e=this.sx,t=this.shy,r=this.shx,n=this.sy,i=this.tx,s=this.ty;return new Ie(e,t,r,n,i,s)},f.Matrix=Ie;var Te=f.matrixMult=function(e,t){return t.multiply(e)},Oe=new Ie(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Oe;var Ce=function(e,t){if(!ye[e]){var r=(t instanceof of?"Sh":"P")+(Object.keys(we).length+1).toString(10);t.id=r,ye[e]=r,we[r]=t,Ae.publish("addPattern",t)}};f.ShadingPattern=of,f.TilingPattern=lf,f.addShadingPattern=function(e,t){return S("addShadingPattern()"),Ce(e,t),this}
vendor: 11,503 bytes, line 56
56,f.beginTilingPattern=function(e){S("beginTilingPattern()"),ir(e.boundingBox[0],e.boundingBox[1],e.boundingBox[2]-e.boundingBox[0],e.boundingBox[3]-e.boundingBox[1],e.matrix)},f.endTilingPattern=function(e,t){S("endTilingPattern()"),t.stream=G[M].join("\n"),Ce(e,t),Ae.publish("endTilingPattern",t),Ee.pop().restore()};var Re,Fe=f.__private__.newObject=function(){var e=Be();return De(e,!0),e},Be=f.__private__.newObjectDeferred=function(){return z++,$[z]=function(){return H},z},De=function(e,t){return t="boolean"==typeof t&&t,$[e]=H,t&&Z(e+" 0 obj"),e},Me=f.__private__.newAdditionalObject=function(){var e={objId:Be(),content:""};return V.push(e),e},Ue=Be(),qe=Be(),ze=f.__private__.decodeColorString=function(e){var t=e.split(" ");if(2!==t.length||"g"!==t[1]&&"G"!==t[1])5!==t.length||"k"!==t[4]&&"K"!==t[4]||(t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),"r"]);else{var r=parseFloat(t[0]);t=[r,r,r,"r"]}for(var n="#",i=0;i<3;i++)n+=("0"+Math.floor(255*parseFloat(t[i])).toString(16)).slice(-2);return n},$e=f.__private__.encodeColorString=function(e){var t;"string"==typeof e&&(e={ch1:e});var r=e.ch1,n=e.ch2,i=e.ch3,s=e.ch4,a="draw"===e.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof r&&"#"!==r.charAt(0)){var o=new Fd(r);if(o.ok)r=o.toHex();else if(!/^\d*\.?\d*$/.test(r))throw new Error('Invalid color "'+r+'" passed to jsPDF.encodeColorString.')}if("string"==typeof r&&/^#[0-9A-Fa-f]{3}$/.test(r)&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),"string"==typeof r&&/^#[0-9A-Fa-f]{6}$/.test(r)){var l=parseInt(r.substr(1),16);r=l>>16&255,n=l>>8&255,i=255&l}if(void 0===n||void 0===s&&r===n&&n===i)t="string"==typeof r?r+" "+a[0]:2===e.precision?L(r/255)+" "+a[0]:j(r/255)+" "+a[0];else if(void 0===s||"object"===Ro(s)){if(s&&!isNaN(s.a)&&0===s.a)return["1.","1.","1.",a[1]].join(" ");t="string"==typeof r?[r,n,i,a[1]].join(" "):2===e.precision?[L(r/255),L(n/255),L(i/255),a[1]].join(" "):[j(r/255),j(n/255),j(i/255),a[1]].join(" ")}else t="string"==typeof r?[r,n,i,s,a[2]].join(" "):2===e.precision?[L(r),L(n),L(i),L(s),a[2]].join(" "):[j(r),j(n),j(i),j(s),a[2]].join(" ");return t},We=f.__private__.getFilters=function(){return a},He=f.__private__.putStream=function(e){var t=(e=e||{}).data||"",r=e.filters||We(),n=e.alreadyAppliedFilters||[],i=e.addLength1||!1,s=t.length,a=e.objectId,o=function(e){return e};if(null!==u&&void 0===a)throw new Error("ObjectId must be passed to putStream for file encryption");null!==u&&(o=vt.encryptor(a,0));var l={};!0===r&&(r=["FlateEncode"]);var c=e.additionalKeyValues||[],h=(l=void 0!==cf.API.processDataByFilters?cf.API.processDataByFilters(t,r):{data:t,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==l.data.length&&(c.push({key:"Length",value:l.data.length}),!0===i&&c.push({key:"Length1",value:s})),0!=h.length)if(h.split("/").length-1==1)c.push({key:"Filter",value:h});else{c.push({key:"Filter",value:"["+h+"]"});for(var d=0;d<c.length;d+=1)if("DecodeParms"===c[d].key){for(var f=[],p=0;p<l.reverseChain.split("/").length-1;p+=1)f.push("null");f.push(c[d].value),c[d].value="["+f.join(" ")+"]"}}Z("<<");for(var m=0;m<c.length;m++)Z("/"+c[m].key+" "+c[m].value);Z(">>"),0!==l.data.length&&(Z("stream"),Z(o(l.data)),Z("endstream"))},Ve=f.__private__.putPage=function(e){var t=e.number,r=e.data,n=e.objId,i=e.contentsObjId;De(n,!0),Z("<</Type /Page"),Z("/Parent "+e.rootDictionaryObjId+" 0 R"),Z("/Resources "+e.resourceDictionaryObjId+" 0 R"),Z("/MediaBox ["+parseFloat(N(e.mediaBox.bottomLeftX))+" "+parseFloat(N(e.mediaBox.bottomLeftY))+" "+N(e.mediaBox.topRightX)+" "+N(e.mediaBox.topRightY)+"]"),null!==e.cropBox&&Z("/CropBox ["+N(e.cropBox.bottomLeftX)+" "+N(e.cropBox.bottomLeftY)+" "+N(e.cropBox.topRightX)+" "+N(e.cropBox.topRightY)+"]"),null!==e.bleedBox&&Z("/BleedBox ["+N(e.bleedBox.bottomLeftX)+" "+N(e.bleedBox.bottomLeftY)+" "+N(e.bleedBox.topRightX)+" "+N(e.bleedBox.topRightY)+"]"),null!==e.trimBox&&Z("/TrimBox ["+N(e.trimBox.bottomLeftX)+" "+N(e.trimBox.bottomLeftY)+" "+N(e.trimBox.topRightX)+" "+N(e.trimBox.topRightY)+"]"),null!==e.artBox&&Z("/ArtBox ["+N(e.artBox.bottomLeftX)+" "+N(e.artBox.bottomLeftY)+" "+N(e.artBox.topRightX)+" "+N(e.artBox.topRightY)+"]"),"number"==typeof e.userUnit&&1!==e.userUnit&&Z("/UserUnit "+e.userUnit),Ae.publish("putPage",{objId:n,pageContext:Se[t],pageNumber:t,page:r}),Z("/Contents "+i+" 0 R"),Z(">>"),Z("endobj");var s=r.join("\n");return y===w&&(s+="\nQ"),De(i,!0),He({data:s,filters:We(),objectId:i}),Z("endobj"),n},Ge=f.__private__.putPages=function(){var e,t,r=[];for(e=1;e<=Ne;e++)Se[e].objId=Be(),Se[e].contentsObjId=Be();for(e=1;e<=Ne;e++)r.push(Ve({number:e,data:G[e],objId:Se[e].objId,contentsObjId:Se[e].contentsObjId,mediaBox:Se[e].mediaBox,cropBox:Se[e].cropBox,bleedBox:Se[e].bleedBox,trimBox:Se[e].trimBox,artBox:Se[e].artBox,userUnit:Se[e].userUnit,rootDictionaryObjId:Ue,resourceDictionaryObjId:qe}));De(Ue,!0),Z("<</Type /Pages");var n="/Kids [";for(t=0;t<Ne;t++)n+=r[t]+" 0 R ";Z(n+"]"),Z("/Count "+Ne),Z(">>"),Z("endobj"),Ae.publish("postPutPages")},Ke=function(e){Ae.publish("putFont",{font:e,out:Z,newObject:Fe,putStream:He}),!0!==e.isAlreadyPutted&&(e.objectNumber=Fe(),Z("<<"),Z("/Type /Font"),Z("/BaseFont /"+rf(e.postScriptName)),Z("/Subtype /Type1"),"string"==typeof e.encoding&&Z("/Encoding /"+e.encoding),Z("/FirstChar 32"),Z("/LastChar 255"),Z(">>"),Z("endobj"))},Je=function(e){e.objectNumber=Fe();var t=[];t.push({key:"Type",value:"/XObject"}),t.push({key:"Subtype",value:"/Form"}),t.push({key:"BBox",value:"["+[N(e.x),N(e.y),N(e.x+e.width),N(e.y+e.height)].join(" ")+"]"}),t.push({key:"Matrix",value:"["+e.matrix.toString()+"]"});var r=e.pages[1].join("\n");He({data:r,additionalKeyValues:t,objectId:e.objectNumber}),Z("endobj")},Ye=function(e,t){t||(t=21);var r=Fe(),n=function(e,t){var r,n=[],i=1/(t-1);for(r=0;r<1;r+=i)n.push(r);if(n.push(1),0!=e[0].offset){var s={offset:0,color:e[0].color};e.unshift(s)}if(1!=e[e.length-1].offset){var a={offset:1,color:e[e.length-1].color};e.push(a)}for(var o="",l=0,c=0;c<n.length;c++){for(r=n[c];r>e[l+1].offset;)l++;var u=e[l].offset,h=(r-u)/(e[l+1].offset-u),d=e[l].color,f=e[l+1].color;o+=q(Math.round((1-h)*d[0]+h*f[0]).toString(16))+q(Math.round((1-h)*d[1]+h*f[1]).toString(16))+q(Math.round((1-h)*d[2]+h*f[2]).toString(16))}return o.trim()}(e.colors,t),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+t+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),He({data:n,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:r}),Z("endobj"),e.objectNumber=Fe(),Z("<< /ShadingType "+e.type),Z("/ColorSpace /DeviceRGB");var s="/Coords ["+N(parseFloat(e.coords[0]))+" "+N(parseFloat(e.coords[1]))+" ";2===e.type?s+=N(parseFloat(e.coords[2]))+" "+N(parseFloat(e.coords[3])):s+=N(parseFloat(e.coords[2]))+" "+N(parseFloat(e.coords[3]))+" "+N(parseFloat(e.coords[4]))+" "+N(parseFloat(e.coords[5])),Z(s+="]"),e.matrix&&Z("/Matrix ["+e.matrix.toString()+"]"),Z("/Function "+r+" 0 R"),Z("/Extend [true true]"),Z(">>"),Z("endobj")},Ze=function(e,t){var r=Be(),n=Fe();t.push({resourcesOid:r,objectOid:n}),e.objectNumber=n;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+e.boundingBox.map(N).join(" ")+"]"}),i.push({key:"XStep",value:N(e.xStep)}),i.push({key:"YStep",value:N(e.yStep)}),i.push({key:"Resources",value:r+" 0 R"}),e.matrix&&i.push({key:"Matrix",value:"["+e.matrix.toString()+"]"}),He({data:e.stream,additionalKeyValues:i,objectId:e.objectNumber}),Z("endobj")},Xe=function(e){for(var t in e.objectNumber=Fe(),Z("<<"),e)switch(t){case"opacity":Z("/ca "+L(e[t]));break;case"stroke-opacity":Z("/CA "+L(e[t]))}Z(">>"),Z("endobj")},Qe=function(e){De(e.resourcesOid,!0),Z("<<"),Z("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var e in Z("/Font <<"),ge)ge.hasOwnProperty(e)&&(!1===h||!0===h&&d.hasOwnProperty(e))&&Z("/"+e+" "+ge[e].objectNumber+" 0 R");Z(">>")}(),function(){if(Object.keys(we).length>0){for(var e in Z("/Shading <<"),we)we.hasOwnProperty(e)&&we[e]instanceof of&&we[e].objectNumber>=0&&Z("/"+e+" "+we[e].objectNumber+" 0 R");Ae.publish("putShadingPatternDict"),Z(">>")}}(),function(e){if(Object.keys(we).length>0){for(var t in Z("/Pattern <<"),we)we.hasOwnProperty(t)&&we[t]instanceof f.TilingPattern&&we[t].objectNumber>=0&&we[t].objectNumber<e&&Z("/"+t+" "+we[t].objectNumber+" 0 R");Ae.publish("putTilingPatternDict"),Z(">>")}}(e.objectOid),function(){if(Object.keys(_e).length>0){var e;for(e in Z("/ExtGState <<"),_e)_e.hasOwnProperty(e)&&_e[e].objectNumber>=0&&Z("/"+e+" "+_e[e].objectNumber+" 0 R");Ae.publish("putGStateDict"),Z(">>")}}(),function(){for(var e in Z("/XObject <<"),je)je.hasOwnProperty(e)&&je[e].objectNumber>=0&&Z("/"+e+" "+je[e].objectNumber+" 0 R");Ae.publish("putXobjectDict"),Z(">>")}(),Z(">>"),Z("endobj")},et=function(e){be[e.fontName]=be[e.fontName]||{},be[e.fontName][e.fontStyle]=e.id},tt=function(e,t,r,n,i){var s={id:"F"+(Object.keys(ge).length+1).toString(10),postScriptName:e,fontName:t,fontStyle:r,encoding:n,isStandardFont:i||!1,metadata:{}};return Ae.publish("addFont",{font:s,instance:this}),ge[s.id]=s,et(s),s.id},rt=f.__private__.pdfEscape=f.pdfEscape=function(e,t){return function(e,t){var r,n,i,s,a,o,l,c,u;if(i=(t=t||{}).sourceEncoding||"Unicode",a=t.outputEncoding,(t.autoencode||a)&&ge[he].metadata&&ge[he].metadata[i]&&ge[he].metadata[i].encoding&&(s=ge[he].metadata[i].encoding,!a&&ge[he].encoding&&(a=ge[he].encoding),!a&&s.codePages&&(a=s.codePages[0]),"string"==typeof a&&(a=s[a]),a)){for(l=!1,o=[],r=0,n=e.length;r<n;r++)(c=a[e.charCodeAt(r)])?o.push(String.fromCharCode(c)):o.push(e[r]),o[r].charCodeAt(0)>>8&&(l=!0);e=o.join("")}for(r=e.length;void 0===l&&0!==r;)e.charCodeAt(r-1)>>8&&(l=!0),r--;if(!l)return e;for(o=t.noBOM?[]:[254,255],r=0,n=e.length;r<n;r++){if((u=(c=e.charCodeAt(r))>>8)>>8)throw new Error("Character at position "+r+" of string '"+e+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");o.push(u),o.push(c-(u<<8))}return String.fromCharCode.apply(void 0,o)}(e,t).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},nt=f.__private__.beginPage=function(e){G[++Ne]=[],Se[Ne]={objId:0,contentsObjId:0,userUnit:Number(o),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},at(Ne),Y(G[M])},it=function(e,t){var n,s,a;switch(r=t||r,"string"==typeof e&&(n=b(e.toLowerCase()),Array.isArray(n)&&(s=n[0],a=n[1])),Array.isArray(e)&&(s=e[0]*de,a=e[1]*de),isNaN(s)&&(s=i[0],a=i[1]),(s>14400||a>14400)&&(Id.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),s=Math.min(14400,s),a=Math.min(14400,a)),i=[s,a],r.substr(0,1)){case"l":a>s&&(i=[a,s]);break;case"p":s>a&&(i=[a,s])}nt(i),Dt(Ft),Z(Vt),0!==Xt&&Z(Xt+" J"),0!==Qt&&Z(Qt+" j"),Ae.publish("addPage",{pageNumber:Ne})},st=function(e){e>0&&e<=Ne&&(G.splice(e,1),Se.splice(e,1),Ne--,M>Ne&&(M=Ne),this.setPage(M))},at=function(e){e>0&&e<=Ne&&(M=e)},ot=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return G.length-1},lt=function(e,t,r){var n,i=void 0;return r=r||{},e=void 0!==e?e:ge[he].fontName,t=void 0!==t?t:ge[he].fontStyle,n=e.toLowerCase(),void 0!==be[n]&&void 0!==be[n][t]?i=be[n][t]:void 0!==be[e]&&void 0!==be[e][t]?
vendor: 6,601 bytes, line 56
56i=be[e][t]:!1===r.disableWarning&&Id.warn("Unable to look up font label for font '"+e+"', '"+t+"'. Refer to getFontList() for available fonts."),i||r.noFallback||null==(i=be.times[t])&&(i=be.times.normal),i},ct=f.__private__.putInfo=function(){var e=Fe(),t=function(e){return e};for(var r in null!==u&&(t=vt.encryptor(e,0)),Z("<<"),Z("/Producer ("+rt(t("jsPDF "+cf.version))+")"),ue)ue.hasOwnProperty(r)&&ue[r]&&Z("/"+r.substr(0,1).toUpperCase()+r.substr(1)+" ("+rt(t(ue[r]))+")");Z("/CreationDate ("+rt(t(I))+")"),Z(">>"),Z("endobj")},ut=f.__private__.putCatalog=function(e){var t=(e=e||{}).rootDictionaryObjId||Ue;switch(Fe(),Z("<<"),Z("/Type /Catalog"),Z("/Pages "+t+" 0 R"),re||(re="fullwidth"),re){case"fullwidth":Z("/OpenAction [3 0 R /FitH null]");break;case"fullheight":Z("/OpenAction [3 0 R /FitV null]");break;case"fullpage":Z("/OpenAction [3 0 R /Fit]");break;case"original":Z("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+re;"%"===r.substr(r.length-1)&&(re=parseInt(re)/100),"number"==typeof re&&Z("/OpenAction [3 0 R /XYZ null null "+L(re)+"]")}switch(oe||(oe="continuous"),oe){case"continuous":Z("/PageLayout /OneColumn");break;case"single":Z("/PageLayout /SinglePage");break;case"two":case"twoleft":Z("/PageLayout /TwoColumnLeft");break;case"tworight":Z("/PageLayout /TwoColumnRight")}se&&Z("/PageMode /"+se),Ae.publish("putCatalog"),Z(">>"),Z("endobj")},ht=f.__private__.putTrailer=function(){Z("trailer"),Z("<<"),Z("/Size "+(z+1)),Z("/Root "+z+" 0 R"),Z("/Info "+(z-1)+" 0 R"),null!==u&&Z("/Encrypt "+vt.oid+" 0 R"),Z("/ID [ <"+T+"> <"+T+"> ]"),Z(">>")},dt=f.__private__.putHeader=function(){Z("%PDF-"+p),Z("%ºÃˆ ")},ft=f.__private__.putXRef=function(){var e="0000000000";Z("xref"),Z("0 "+(z+1)),Z("0000000000 65535 f ");for(var t=1;t<=z;t++)"function"==typeof $[t]?Z((e+$[t]()).slice(-10)+" 00000 n "):void 0!==$[t]?Z((e+$[t]).slice(-10)+" 00000 n "):Z("0000000000 00000 n ")},pt=f.__private__.buildDocument=function(){var e;z=0,H=0,W=[],$=[],V=[],Ue=Be(),qe=Be(),Y(W),Ae.publish("buildDocument"),dt(),Ge(),function(){Ae.publish("putAdditionalObjects");for(var e=0;e<V.length;e++){var t=V[e];De(t.objId,!0),Z(t.content),Z("endobj")}Ae.publish("postPutAdditionalObjects")}(),e=[],function(){for(var e in ge)ge.hasOwnProperty(e)&&(!1===h||!0===h&&d.hasOwnProperty(e))&&Ke(ge[e])}(),function(){var e;for(e in _e)_e.hasOwnProperty(e)&&Xe(_e[e])}(),function(){for(var e in je)je.hasOwnProperty(e)&&Je(je[e])}(),function(e){var t;for(t in we)we.hasOwnProperty(t)&&(we[t]instanceof of?Ye(we[t]):we[t]instanceof lf&&Ze(we[t],e))}(e),Ae.publish("putResources"),e.forEach(Qe),Qe({resourcesOid:qe,objectOid:Number.MAX_SAFE_INTEGER}),Ae.publish("postPutResources"),null!==u&&(vt.oid=Fe(),Z("<<"),Z("/Filter /Standard"),Z("/V "+vt.v),Z("/R "+vt.r),Z("/U <"+vt.toHexString(vt.U)+">"),Z("/O <"+vt.toHexString(vt.O)+">"),Z("/P "+vt.P),Z(">>"),Z("endobj")),ct(),ut();var t=H;return ft(),ht(),Z("startxref"),Z(""+t),Z("%%EOF"),Y(G[M]),W.join("\n")},mt=f.__private__.getBlob=function(e){return new Blob([Q(e)],{type:"application/pdf"})},gt=f.output=f.__private__.output=((Re=function(e,t){switch("string"==typeof(t=t||{})?t={filename:t}:t.filename=t.filename||"generated.pdf",e){case void 0:return pt();case"save":f.save(t.filename);break;case"arraybuffer":return Q(pt());case"blob":return mt(pt());case"bloburi":case"bloburl":if(void 0!==Pd.URL&&"function"==typeof Pd.URL.createObjectURL)return Pd.URL&&Pd.URL.createObjectURL(mt(pt()))||void 0;Id.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var r="",n=pt();try{r=Dd(n)}catch(p){r=Dd(unescape(encodeURIComponent(n)))}return"data:application/pdf;filename="+t.filename+";base64,"+r;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(Pd)){var i="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",s=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';t.pdfObjectUrl&&(i=t.pdfObjectUrl,s="");var a='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+i+'"'+s+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(t)+");<\/script></body></html>",o=Pd.open();return null!==o&&o.document.write(a),o}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(Pd)){var l='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(t.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+t.filename+'" width="500px" height="400px" /></body></html>',c=Pd.open();if(null!==c){c.document.write(l);var u=this;c.document.documentElement.querySelector("#pdfViewer").onload=function(){c.document.title=t.filename,c.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(u.output("bloburl"))}}return c}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(Pd))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var h='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",t)+'"></iframe></body></html>',d=Pd.open();if(null!==d&&(d.document.write(h),d.document.title=t.filename),d||"undefined"==typeof safari)return d;break;case"datauri":case"dataurl":return Pd.document.location.href=this.output("datauristring",t);default:return null}}).foo=function(){try{return Re.apply(this,arguments)}catch(r){var e=r.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var t="Error in function "+e.split("\n")[0].split("<")[0]+": "+r.message;if(!Pd.console)throw new Error(t);Pd.console.error(t,r),Pd.alert&&alert(t)}},Re.foo.bar=Re,Re.foo),bt=function(e){return!0===Array.isArray(Le)&&Le.indexOf(e)>-1};switch(n){case"pt":de=1;break;case"mm":de=72/25.4;break;case"cm":de=72/2.54;break;case"in":de=72;break;case"px":de=1==bt("px_scaling")?.75:96/72;break;case"pc":case"em":de=12;break;case"ex":de=6;break;default:if("number"!=typeof n)throw new Error("Invalid unit: "+n);de=n}var vt=null;B(),C();var wt=f.__private__.getPageInfo=f.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to
56jsPDF.getPageInfo");return{objId:Se[e].objId,pageNumber:e,pageContext:Se[e]}},yt=f.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var t in Se)if(Se[t].objId===e)break;return wt(t)},_t=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:Se[M].objId,pageNumber:M,pageContext:Se[M]}};f.addPage=function(){return it.apply(this,arguments),this},f.setPage=function(){return at.apply(this,arguments),Y.call(this,G[M]),this},f.insertPage=function(e){return this.addPage(),this.movePage(M,e),this},f.movePage=function(e,t){var r,n;if(e>t){r=G[e],n=Se[e];for(var i=e;i>t;i--)G[i]=G[i-1],Se[i]=Se[i-1];G[t]=r,Se[t]=n,this.setPage(t)}else if(e<t){r=G[e],n=Se[e];for(var s=e;s<t;s++)G[s]=G[s+1],Se[s]=Se[s+1];G[t]=r,Se[t]=n,this.setPage(t)}return this},f.deletePage=function(){return st.apply(this,arguments),this},f.__private__.text=f.text=function(e,t,r,n,i){var s,a,o,l,c,u,h,f,p,m=(n=n||{}).scope||this;if("number"==typeof e&&"number"==typeof t&&("string"==typeof r||Array.isArray(r))){var g=r;r=t,t=e,e=g}if(arguments[3]instanceof Ie==0?(o=arguments[4],l=arguments[5],"object"===Ro(h=arguments[3])&&null!==h||("string"==typeof o&&(l=o,o=null),"string"==typeof h&&(l=h,h=null),"number"==typeof h&&(o=h,h=null),n={flags:h,angle:o,align:l})):(S("The transform parameter of text() with a Matrix value"),p=i),isNaN(t)||isNaN(r)||null==e)throw new Error("Invalid arguments passed to jsPDF.text");if(0===e.length)return m;var b,v="",_="number"==typeof n.lineHeightFactor?n.lineHeightFactor:Rt,x=m.internal.scaleFactor;function k(e){return e=e.split("\t").join(Array(n.TabLen||9).join(" ")),rt(e,h)}function A(e){for(var t,r=e.concat(),n=[],i=r.length;i--;)"string"==typeof(t=r.shift())?n.push(t):Array.isArray(e)&&(1===t.length||void 0===t[1]&&void 0===t[2])?n.push(t[0]):n.push([t[0],t[1],t[2]]);return n}function L(e,t){var r;if("string"==typeof e)r=t(e)[0];else if(Array.isArray(e)){for(var n,i,s=e.concat(),a=[],o=s.length;o--;)"string"==typeof(n=s.shift())?a.push(t(n)[0]):Array.isArray(n)&&"string"==typeof n[0]&&(i=t(n[0],n[1],n[2]),a.push([i[0],i[1],i[2]]));r=a}return r}var j=!1,E=!0;if("string"==typeof e)j=!0;else if(Array.isArray(e)){var I=e.concat();a=[];for(var T,O=I.length;O--;)("string"!=typeof(T=I.shift())||Array.isArray(T)&&"string"!=typeof T[0])&&(E=!1);j=E}if(!1===j)throw new Error('Type of text must be string or Array. "'+e+'" is not recognized.');"string"==typeof e&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var C=te/m.internal.scaleFactor,R=C*(_-1);switch(n.baseline){case"bottom":r-=R;break;case"top":r+=C-R;break;case"hanging":r+=C-2*R;break;case"middle":r+=C/2-R}if((u=n.maxWidth||0)>0&&("string"==typeof e?e=m.splitTextToSize(e,u):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce(function(e,t){return e.concat(m.splitTextToSize(t,u))},[]))),s={text:e,x:t,y:r,options:n,mutex:{pdfEscape:rt,activeFontKey:he,fonts:ge,activeFontSize:te}},Ae.publish("preProcessText",s),e=s.text,o=(n=s.options).angle,p instanceof Ie==0&&o&&"number"==typeof o){o*=Math.PI/180,0===n.rotationDirection&&(o=-o),y===w&&(o=-o);var F=Math.cos(o),B=Math.sin(o);p=new Ie(F,B,-B,F,0,0)}else o&&o instanceof Ie&&(p=o);y!==w||p||(p=Oe),void 0!==(c=n.charSpace||Yt)&&(v+=N(P(c))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(f=n.horizontalScale)&&(v+=N(100*f)+" Tz\n"),n.lang;var D=-1,M=void 0!==n.renderingMode?n.renderingMode:n.stroke,U=m.internal.getCurrentPageInfo().pageContext;switch(M){case 0:case!1:case"fill":D=0;break;case 1:case!0:case"stroke":D=1;break;case 2:case"fillThenStroke":D=2;break;case 3:case"invisible":D=3;break;case 4:case"fillAndAddForClipping":D=4;break;case 5:case"strokeAndAddPathForClipping":D=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":D=6;break;case 7:case"addToPathForClipping":D=7}var q=void 0!==U.usedRenderingMode?U.usedRenderingMode:-1;-1!==D?v+=D+" Tr\n":-1!==q&&(v+="0 Tr\n"),-1!==D&&(U.usedRenderingMode=D),l=n.align||"left";var z,$=te*_,W=m.internal.pageSize.getWidth(),H=ge[he];c=n.charSpace||Yt,u=n.maxWidth||0,h=Object.assign({autoencode:!0,noBOM:!0},n.flags);var V=[],G=function(e){return m.getStringUnitWidth(e,{font:H,charSpace:c,fontSize:te,doKerning:!1})*te/x};if("[object Array]"===Object.prototype.toString.call(e)){var K;a=A(e),"left"!==l&&(z=a.map(G));var J,Y=0;if("right"===l){t-=z[0],e=[],O=a.length;for(var X=0;X<O;X++)0===X?(J=zt(t),K=$t(r)):(J=P(Y-z[X]),K=-$),e.push([a[X],J,K]),Y=z[X]}else if("center"===l){t-=z[0]/2,e=[],O=a.length;for(var Q=0;Q<O;
vendor: 4,208 bytes, line 56
56Q++)0===Q?(J=zt(t),K=$t(r)):(J=P((Y-z[Q])/2),K=-$),e.push([a[Q],J,K]),Y=z[Q]}else if("left"===l){e=[],O=a.length;for(var ee=0;ee<O;ee++)e.push(a[ee])}else if("justify"===l&&"Identity-H"===H.encoding){e=[],O=a.length,u=0!==u?u:W;for(var re=0,ne=0;ne<O;ne++)if(K=0===ne?$t(r):-$,J=0===ne?zt(t):re,ne<O-1){var se=P((u-z[ne])/(a[ne].split(" ").length-1)),ae=a[ne].split(" ");e.push([ae[0]+" ",J,K]),re=0;for(var oe=1;oe<ae.length;oe++){var le=(G(ae[oe-1]+" "+ae[oe])-G(ae[oe]))*x+se;oe==ae.length-1?e.push([ae[oe],le,0]):e.push([ae[oe]+" ",le,0]),re-=le}}else e.push([a[ne],J,K]);e.push(["",re,0])}else{if("justify"!==l)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(e=[],O=a.length,u=0!==u?u:W,ne=0;ne<O;ne++){K=0===ne?$t(r):-$,J=0===ne?zt(t):0;var ce=a[ne].split(" ").length-1,ue=ce>0?(u-z[ne])/ce:0;ne<O-1?V.push(N(P(ue))):V.push(0),e.push([a[ne],J,K])}}}!0===("boolean"==typeof n.R2L?n.R2L:ie)&&(e=L(e,function(e,t,r){return[e.split("").reverse().join(""),t,r]})),s={text:e,x:t,y:r,options:n,mutex:{pdfEscape:rt,activeFontKey:he,fonts:ge,activeFontSize:te}},Ae.publish("postProcessText",s),e=s.text,b=s.mutex.isHex||!1;var de=ge[he].encoding;"WinAnsiEncoding"!==de&&"StandardEncoding"!==de||(e=L(e,function(e,t,r){return[k(e),t,r]})),a=A(e),e=[];for(var fe,pe,me,be=Array.isArray(a[0])?1:0,ve="",we=function(e,t,r){var i="";return r instanceof Ie?(r="number"==typeof n.angle?Te(r,new Ie(1,0,0,1,e,t)):Te(new Ie(1,0,0,1,e,t),r),y===w&&(r=Te(new Ie(1,0,0,-1,0,0),r)),i=r.join(" ")+" Tm\n"):i=N(e)+" "+N(t)+" Td\n",i},ye=0;ye<a.length;ye++){switch(ve="",be){case 1:me=(b?"<":"(")+a[ye][0]+(b?">":")"),fe=parseFloat(a[ye][1]),pe=parseFloat(a[ye][2]);break;case 0:me=(b?"<":"(")+a[ye]+(b?">":")"),fe=zt(t),pe=$t(r)}void 0!==V&&void 0!==V[ye]&&(ve=V[ye]+" Tw\n"),0===ye?e.push(ve+we(fe,pe,p)+me):0===be?e.push(ve+me):1===be&&e.push(ve+we(fe,pe,p)+me)}e=0===be?e.join(" Tj\nT* "):e.join(" Tj\n"),e+=" Tj\n";var _e="BT\n/";return _e+=he+" "+te+" Tf\n",_e+=N(te*_)+" TL\n",_e+=Kt+"\n",_e+=v,_e+=e,Z(_e+="ET"),d[he]=!0,m};var xt=f.__private__.clip=f.clip=function(e){return Z("evenodd"===e?"W*":"W"),this};f.clipEvenOdd=function(){return xt("evenodd")},f.__private__.discardPath=f.discardPath=function(){return Z("n"),this};var kt=f.__private__.isValidStyle=function(e){var t=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(e)&&(t=!0),t};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(e){return kt(e)&&(c=e),this};var Nt=f.__private__.getStyle=f.getStyle=function(e){var t=c;switch(e){case"D":case"S":t="S";break;case"F":t="f";break;case"FD":case"DF":t="B";break;case"f":case"f*":case"B":case"B*":t=e}return t},St=f.close=function(){return Z("h"),this};f.stroke=function(){return Z("S"),this},f.fill=function(e){return At("f",e),this},f.fillEvenOdd=function(e){return At("f*",e),this},f.fillStroke=function(e){return At("B",e),this},f.fillStrokeEvenOdd=function(e){return At("B*",e),this};var At=function(e,t){"object"===Ro(t)?Pt(t,e):Z(e)},Lt=function(e){null===e||y===w&&void 0===e||(e=Nt(e),Z(e))};function jt(e,t,r,n,i){var s=new lf(t||this.boundingBox,r||this.xStep,n||this.yStep,this.gState,i||this.matrix);s.stream=this.stream;var a=e+"$$"+this.cloneIndex+++"$$";return Ce(a,s),s}var Pt=function(e,t){var r=ye[e.key],n=we[r];if(n instanceof of)Z("q"),Z(Et(t)),n.gState&&f.setGState(n.gState),Z(e.matrix.toString()+" cm"),Z("/"+r+" sh"),Z("Q");else if(n instanceof lf){var i=new Ie(1,0,0,-1,0,dr());e.matrix&&(i=i.multiply(e.matrix||Oe),r=jt.call(n,e.key,e.boundingBox,e.xStep,e.yStep,i).id),Z("q"),Z("/Pattern cs"),Z("/"+r+" scn"),n.gState&&f.setGState(n.gState),Z(t),Z("Q")}},Et=function(e){switch(e){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"}},It=f.moveTo=function(e,t){return Z(N(P(e))+" "+N(E(t))+" m"),this},Tt=f.lineTo=function(e,t){return Z(N(P(e))+" "+N(E(t))+" l"),this},Ot=f.curveTo=function(e,t,r,n,i,s){return Z([N(P(e)),N(E(t)),N(P(r)),N(E(n)),N(P(i)),N(E(s)),"c"].join(" ")),this};f.__private__.line=f.line=function(e,t,r,n,i){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n)||!kt(i))throw new Error("Invalid arguments passed to
56jsPDF.line");return y===v?this.lines([[r-e,n-t]],e,t,[1,1],i||"S"):this.lines([[r-e,n-t]],e,t,[1,1]).stroke()},f.__private__.lines=f.lines=function(e,t,r,n,i,s){var a,o,l,c,u,h,d,f,p,m,g,b;if("number"==typeof e&&(b=r,r=t,t=e,e=b),n=n||[1,1],s=s||!1,isNaN(t)||isNaN(r)||!Array.isArray(e)||!Array.isArray(n)||!kt(i)||"boolean"!=typeof s)throw new Error("Invalid arguments passed to jsPDF.lines");for(It(t,r),a=n[0],o=n[1],c=e.length,m=t,g=r,l=0;l<c;l++)2===(u=e[l]).length?(m=u[0]*a+m,g=u[1]*o+g,Tt(m,g)):(h=u[0]*a+m,d=u[1]*o+g,f=u[2]*a+m,p=u[3]*o+g,m=u[4]*a+m,g=u[5]*o+g,Ot(h,d,f,p,m,g));return s&&St(),Lt(i),this},f.path=function(e){for(var t=0;t<e.length;t++){var r=e[t],n=r.c;switch(r.op){case"m":It(n[0],n[1]);break;case"l":Tt(n[0],n[1]);break;case"c":Ot.apply(this,n);break;case"h":St()}}return this},f.__private__.rect=f.rect=function(e,t,r,n,i){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n)||!kt(i))throw new Error("Invalid arguments passed to jsPDF.rect");return y===v&&(n=-n),Z([N(P(e)),N(E(t)),N(P(r)),N(P(n)),"re"].join(" ")),Lt(i),this},f.__private__.triangle=f.triangle=function(e,t,r,n,i,s,a){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(s)||!kt(a))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[r-e,n-t],[i-r,s-n],[e-i,t-s]],e,t,[1,1],a,!0),this},f.__private__.roundedRect=f.roundedRect=function(e,t,r,n,i,s,a){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(s)||!kt(a))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var o=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*r),s=Math.min(s,.5*n),this.lines([[r-2*i,0],[i*o,0,i,s-s*o,i,s],[0,n-2*s],[0,s*o,-i*o,s,-i,s],[2*i-r,0],[-i*o,0,-i,-s*o,-i,-s],[0,2*s-n],[0,-s*o,i*o,-s,i,-s]],e+i,t,[1,1],a,!0),this},f.__private__.ellipse=f.ellipse=function(e,t,r,n,i){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n)||!kt(i))throw new Error("Invalid arguments passed to jsPDF.ellipse");var s=4/3*(Math.SQRT2-1)*r,a=4/3*(Math.SQRT2-1)*n;return It(e+r,t),Ot(e+r,t-a,e+s,t-n,e,t-n),Ot(e-s,t-n,e-r,t-a,e-r,t),Ot(e-r,t+a,e-s,t+n,e,t+n),Ot(e+s,t+n,e+r,t+a,e+r,t),Lt(i),this},f.__private__.circle=f.circle=function(e,t,r,n){if(isNaN(e)||isNaN(t)||isNaN(r)||!kt(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(e,t,r,r,n)},f.setFont=function(e,t,r){return r&&(t=k(t,r)),he=lt(e,t,{disableWarning:!1}),this};var Ct=f.__private__.getFont=f.getFont=function(){return ge[lt.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var e,t,r={};for(e in be)if(be.hasOwnProperty(e))for(t in r[e]=[],be[e])be[e].hasOwnProperty(t)&&r[e].push(t);return r},f.addFont=function(e,t,r,n,i){var s=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==s.indexOf(arguments[3])?i=arguments[3]:arguments[3]&&-1==s.indexOf(arguments[3])&&(r=k(r,n)),tt.call(this,e,t,r,i=i||"Identity-H")};var Rt,Ft=e.lineWidth||.200025,Bt=f.__private__.getLineWidth=f.getLineWidth=function(){return Ft},Dt=f.__private__.setLineWidth=f.setLineWidth=function(e){return Ft=e,Z(N(P(e))+" w"),this};f.__private__.setLineDash=cf.API.setLineDash=cf.API.setLineDashPattern=function(e,t){if(e=e||[],t=t||0,isNaN(t)||!Array.isArray(e))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return e=e.map(function(e){return N(P(e))}).join(" "),t=N(P(t)),Z("["+e+"] "+t+" d"),this};var Mt=f.__private__.getLineHeight=f.getLineHeight=function(){return te*Rt};f.__private__.getLineHeight=f.getLineHeight=function(){return te*Rt};var Ut=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(e){return"number"==typeof(e=e||1.15)&&(Rt=e),this},qt=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return Rt};Ut(e.lineHeight);var zt=f.__private__.getHorizontalCoordinate=function(e){return P(e)},$t=f.__private__.getVerticalCoordinate=function(e){return y===w?e:Se[M].mediaBox.topRightY-Se[M].mediaBox.bottomLeftY-P(e)},Wt=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(e){return N(zt(e))},Ht=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(e){return N($t(e))},Vt=e.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return ze(Vt)},f.__private__.setStrokeColor=f.setDrawColor=function(e,t,r,n){return Vt=$e({ch1:e,ch2:t,ch3:r,ch4:n,pdfColorType:"draw",precision:2}),Z(Vt),this};var Gt=e.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return ze(Gt)},f.__private__.setFillColor=f.setFillColor=function(e,t,r,n){return Gt=$e({ch1:e,ch2:t,ch3:r,ch4:n,pdfColorType:"fill",precision:2}),Z(Gt),this};var Kt=e.textColor||"0 g",Jt=f.__private__.getTextColor=f.getTextColor=function(){return ze(Kt)};f.__private__.setTextColor=f.setTextColor=function(e,t,r,n){return Kt=$e({ch1:e,ch2:t,ch3:r,ch4:n,pdfColorType:"text",precision:3}),this};var Yt=e.charSpace,Zt=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(Yt||0)};f.__private__.setCharSpace=f.setCharSpace=function(e){if(isNaN(e))throw new Error("Invalid argument passed to
56jsPDF.setCharSpace");return Yt=e,this};var Xt=0;f.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},f.__private__.setLineCap=f.setLineCap=function(e){var t=f.CapJoinStyles[e];if(void 0===t)throw new Error("Line cap style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Xt=t,Z(t+" J"),this};var Qt=0;f.__private__.setLineJoin=f.setLineJoin=function(e){var t=f.CapJoinStyles[e];if(void 0===t)throw new Error("Line join style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Qt=t,Z(t+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(e){if(e=e||0,isNaN(e))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return Z(N(P(e))+" M"),this},f.GState=sf,f.setGState=function(e){(e="string"==typeof e?_e[xe[e]]:er(null,e)).equals(ke)||(Z("/"+e.id+" gs"),ke=e)};var er=function(e,t){if(!e||!xe[e]){var r=!1;for(var n in _e)if(_e.hasOwnProperty(n)&&_e[n].equals(t)){r=!0;break}if(r)t=_e[n];else{var i="GS"+(Object.keys(_e).length+1).toString(10);_e[i]=t,t.id=i}return e&&(xe[e]=t.id),Ae.publish("addGState",t),t}};f.addGState=function(e,t){return er(e,t),this},f.saveGraphicsState=function(){return Z("q"),ve.push({key:he,size:te,color:Kt}),this},f.restoreGraphicsState=function(){Z("Q");var e=ve.pop();return he=e.key,te=e.size,Kt=e.color,ke=null,this},f.setCurrentTransformationMatrix=function(e){return Z(e.toString()+" cm"),this},f.comment=function(e){return Z("#"+e),this};var tr=function(e,t){var r=e||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return r},set:function(e){isNaN(e)||(r=parseFloat(e))}});var n=t||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return n},set:function(e){isNaN(e)||(n=parseFloat(e))}});var i="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return i},set:function(e){i=e.toString()}}),this},rr=function(e,t,r,n){tr.call(this,e,t),this.type="rect";var i=r||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return i},set:function(e){isNaN(e)||(i=parseFloat(e))}});var s=n||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return s},set:function(e){isNaN(e)||(s=parseFloat(e))}}),this},nr=function(){this.page=Ne,this.currentPage=M,this.pages=G.slice(0),this.pagesContext=Se.slice(0),this.x=fe,this.y=pe,this.matrix=me,this.width=ar(M),this.height=lr(M),this.outputDestination=J,this.id="",this.objectNumber=-1};nr.prototype.restore=function(){Ne=this.page,M=this.currentPage,Se=this.pagesContext,G=this.pages,fe=this.x,pe=this.y,me=this.matrix,or(M,this.width),cr(M,this.height),J=this.outputDestination};var ir=function(e,t,r,n,i){Ee.push(new nr),Ne=M=0,G=[],fe=e,pe=t,me=i,nt([r,n])};for(var sr in f.beginFormObject=function(e,t,r,n,i){return ir(e,t,r,n,i),this},f.endFormObject=function(e){return function(e){if(Pe[e])Ee.pop().restore();else{var t=new nr,r="Xo"+(Object.keys(je).length+1).toString(10);t.id=r,Pe[e]=r,je[r]=t,Ae.publish("addFormObject",t),Ee.pop().restore()}}(e),this},f.doFormObject=function(e,t){var r=je[Pe[e]];return Z("q"),Z(t.toString()+" cm"),Z("/"+r.id+" Do"),Z("Q"),this},f.getFormObject=function(e){var t=je[Pe[e]];return{x:t.x,y:t.y,width:t.width,height:t.height,matrix:t.matrix}},f.save=function(e,t){return e=e||"generated.pdf",(t=t||{}).returnPromise=t.returnPromise||!1,!1===t.returnPromise?(Rd(mt(pt()),e),"function"==typeof Rd.unload&&Pd.setTimeout&&setTimeout(Rd.unload,911),this):new Promise(function(t,r){try{var n=Rd(mt(pt()),e);"function"==typeof Rd.unload&&Pd.setTimeout&&setTimeout(Rd.unload,911),t(n)}catch(i){r(i.message)}})},cf.API)cf.API.hasOwnProperty(sr)&&("events"===sr&&cf.API.events.length?function(e,t){var r,n,i;for(i=t.length-1;-1!==i;i--)r=t[i][0],n=t[i][1],e.subscribe.apply(e,[r].concat("function"==typeof n?[n]:n))}(Ae,cf.API.events):f[sr]=cf.API[sr]);function ar(e){return Se[e].mediaBox.topRightX-Se[e].mediaBox.bottomLeftX}function or(e,t){Se[e].mediaBox.topRightX=t+Se[e].mediaBox.bottomLeftX}function lr(e){return Se[e].mediaBox.topRightY-Se[e].mediaBox.bottomLeftY}function cr(e,t){Se[e].mediaBox.topRightY=t+Se[e].mediaBox.bottomLeftY}var ur=f.getPageWidth=function(e){return ar(e=e||M)/de},hr=f.setPageWidth=function(e,t){or(e,t*de)},dr=f.getPageHeight=function(e){return lr(e=e||M)/de},fr=f.setPageHeight=function(e,t){cr(e,t*de)};return f.internal={pdfEscape:rt,getStyle:Nt,getFont:Ct,getFontSize:ne,getCharSpace:Zt,getTextColor:Jt,getLineHeight:Mt,getLineHeightFactor:qt,getLineWidth:Bt,write:X,getHorizontalCoordinate:zt,getVerticalCoordinate:$t,getCoordinateString:Wt,getVerticalCoordinateString:Ht,collections:{},newObject:Fe,newAdditionalObject:Me,newObjectDeferred:Be,newObjectDeferredBegin:De,getFilters:We,putStream:He,events:Ae,scaleFactor:de,pageSize:{getWidth:function(){return ur(M)},setWidth:function(e){hr(M,e)},getHeight:function(){return dr(M)},setHeight:function(e){fr(M,e)}},encryptionOptions:u,encryption:vt,getEncryptor:function(e){return null!==u?vt.encryptor(e,0):function(e){return e}},output:gt,getNumberOfPages:ot,get pages(){return G},out:Z,f2:L,f3:j,getPageInfo:wt,getPageInfoByObjId:yt,getCurrentPageInfo:_t,getPDFVersion:m,Point:tr,Rectangle:rr,Matrix:Ie,hasHotfix:bt},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return ur(M)},set:function(e){hr(M,e)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return dr(M)},set:function(e){fr(M,e)},enumerable:!0,configurable:!0}),function(e){for(var t=0,r=ee.length;t<r;t++){var n=tt.call(this,e[t][0],e[t][1],e[t][2],ee[t][3],!0);!1===h&&(d[n]=!0);var i=e[t][0].split("-");et({id:n,fontName:i[0],fontStyle:i[1]||""})}Ae.publish("addFonts",{fonts:ge,dictionary:be})}.call(f,ee),he="F1",it(i,r),Ae.publish("initialized"),f}tf.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},tf.prototype.toHexString=function(e){return e.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},tf.prototype.hexToBytes=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(String.fromCharCode(parseInt(e.substr(r,2),16)));return t.join("")},tf.prototype.processOwnerPassword=function(e,t){return Qd(Yd(t).substr(0,5),e)},tf.prototype.encryptor=function(e,t){var r=Yd(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(e){return Qd(r,e)}},sf.prototype.equals=function(e){var t,r="id,objectNumber,equals";if(!e||Ro(e)!==Ro(this))return!1;var n=0;for(t in this)if(!(r.indexOf(t)>
vendor: 4,270 bytes, line 56
56=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t))return!1;if(this[t]!==e[t])return!1;n++}for(t in e)e.hasOwnProperty(t)&&r.indexOf(t)<0&&n--;return 0===n},cf.API={events:[]},cf.version="3.0.4";var uf=cf.API,hf=1,df=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ff=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},pf=function(e){return e.toFixed(2)},mf=function(e){return e.toFixed(5)};uf.__acroform__={};var gf=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},bf=function(e){return e*hf},vf=function(e){var t=new Cf,r=Kf.internal.getHeight(e)||0,n=Kf.internal.getWidth(e)||0;return t.BBox=[0,0,Number(pf(n)),Number(pf(r))],t},wf=uf.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},yf=uf.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},_f=uf.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},xf=uf.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return _f(e,t-1)},kf=uf.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return wf(e,t-1)},Nf=uf.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return yf(e,t-1)},Sf=uf.__acroform__.calculateCoordinates=function(e,t){var r=t.internal.getHorizontalCoordinate,n=t.internal.getVerticalCoordinate,i=e[0],s=e[1],a=e[2],o=e[3],l={};return l.lowerLeft_X=r(i)||0,l.lowerLeft_Y=n(s+o)||0,l.upperRight_X=r(i+a)||0,l.upperRight_Y=n(s)||0,[Number(pf(l.lowerLeft_X)),Number(pf(l.lowerLeft_Y)),Number(pf(l.upperRight_X)),Number(pf(l.upperRight_Y))]},Af=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],r=e._V||e.DV,n=Lf(e,r),i=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+i+" "+pf(n.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(n.text),t.push("ET"),t.push("Q"),t.push("EMC");var s=vf(e);return s.scope=e.scope,s.stream=t.join("\n"),s}},Lf=function(e,t){var r=0===e.fontSize?e.maxFontSize:e.fontSize,n={text:"",fontSize:""},i=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" ");i=e.multiline?i.map(function(e){return e.split("\n")}):i.map(function(e){return[e]});var s=r,a=Kf.internal.getHeight(e)||0;a=a<0?-a:a;var o=Kf.internal.getWidth(e)||0;o=o<0?-o:o;var l=function(t,r,n){if(t+1<i.length){var s=r+" "+i[t+1][0];return jf(s,e,n).width<=o-4}return!1};s++;e:for(;s>0;){t="",s--;var c,u,h=jf("3",e,s).height,d=e.multiline?a-s:(a-h)/2,f=d+=2,p=0,m=0,g=0;if(s<=0){t="(...) Tj\n",t+="% Width of Text: "+jf(t,e,s=12).width+", FieldWidth:"+o+"\n";break}for(var b="",v=0,w=0;w<i.length;w++)if(i.hasOwnProperty(w)){var y=!1;if(1!==i[w].length&&g!==i[w].length-1){if((h+2)*(v+2)+2>a)continue e;b+=i[w][g],y=!0,m=w,w--}else{b=" "==(b+=i[w][g]+" ").substr(b.length-1)?b.substr(0,b.length-1):b;var _=parseInt(w),x=l(_,b,s),k=w>=i.length-1;if(x&&!k){b+=" ",g=0;continue}if(x||k){if(k)m=_;else if(e.multiline&&(h+2)*(v+2)+2>a)continue e}else{if(!e.multiline)continue e;if((h+2)*(v+2)+2>a)continue e;m=_}}for(var N="",S=p;S<=m;S++){var A=i[S];if(e.multiline){if(S===m){N+=A[g]+" ",g=(g+1)%A.length;continue}if(S===p){N+=A[A.length-1]+" ";continue}}N+=A[0]+" "}switch(N=" "==N.substr(N.length-1)?N.substr(0,N.length-1):N,u=jf(N,e,s).width,e.textAlign){case"right":c=o-u-2;break;case"center":c=(o-u)/2;break;default:c=2}t+=pf(c)+" "+pf(f)+" Td\n",t+="("+df(N)+") Tj\n",t+=-pf(c)+" 0 Td\n",f=-(s+2),u=0,p=y?m:m+1,v++,b=""}break}return n.text=t,n.fontSize=s,n},jf=function(e,t,r){var n=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:n,fontSize:parseFloat(r),
vendor: 5,379 bytes, line 56
56charSpace:0})*parseFloat(r);return{height:t.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:i}},Pf={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Ef=function(e,t){var r={type:"reference",object:e};void 0===t.internal.getPageInfo(e.page).pageContext.annotations.find(function(e){return e.type===r.type&&e.object===r.object})&&t.internal.getPageInfo(e.page).pageContext.annotations.push(r)},If=uf.__acroform__.arrayToPdfArray=function(e,t,r){var n=function(e){return e};if(Array.isArray(e)){for(var i="[",s=0;s<e.length;s++)switch(0!==s&&(i+=" "),Ro(e[s])){case"boolean":case"number":case"object":i+=e[s].toString();break;case"string":"/"!==e[s].substr(0,1)?(void 0!==t&&r&&(n=r.internal.getEncryptor(t)),i+="("+df(n(e[s].toString()))+")"):i+=e[s].toString()}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Tf=function(e,t,r){var n=function(e){return e};return void 0!==t&&r&&(n=r.internal.getEncryptor(t)),(e=e||"").toString(),"("+df(n(e))+")"},Of=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Of.prototype.toString=function(){return this.objId+" 0 R"},Of.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},Of.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(e){return"content"!=e&&"appearanceStreamContent"!=e&&"scope"!=e&&"objId"!=e&&"_"!=e.substring(0,1)});for(var r in t)if(!1===Object.getOwnPropertyDescriptor(this,t[r]).configurable){var n=t[r],i=this[n];i&&(Array.isArray(i)?e.push({key:n,value:If(i,this.objId,this.scope)}):i instanceof Of?(i.scope=this.scope,e.push({key:n,value:i.objId+" 0 R"})):"function"!=typeof i&&e.push({key:n,value:i}))}return e};var Cf=function(){Of.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 e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};gf(Cf,Of);var Rf=function(){Of.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+df(t(e))+")"}},set:function(t){e=t}})};gf(Rf,Of);var Ff=function e(){Of.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute F supplied.');t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(t,3))},set:function(e){!0===Boolean(e)?this.F=kf(t,3):this.F=Nf(t,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute Ff supplied.');r=e}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==n.length)return n},set:function(e){n=void 0!==e?e:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(e){n[0]=e}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(e){n[1]=e}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(e){n[2]=e}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(e){n[3]=e}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){switch(e){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=e;break;default:throw new Error('Invalid value "'+e+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof Wf)return;s="FieldObject"+e.FieldNum++}var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+df(t(s))+")"},set:function(e){s=e.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(e){s=e}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a}
vendor: 6,794 bytes, line 56
56,set:function(e){a=e}});var o="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return o},set:function(e){o=e}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(e){l=e}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===c?50/hf:c},set:function(e){c=e}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(e){u=e}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!h||this instanceof Wf||this instanceof Vf))return Tf(h,this.objId,this.scope)},set:function(e){e=e.toString(),h=e}});var d=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof qf==0?Tf(d,this.objId,this.scope):d},set:function(e){e=e.toString(),d=this instanceof qf==0?"("===e.substr(0,1)?ff(e.substr(1,e.length-2)):ff(e):e}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof qf==1?ff(d.substr(1,d.length-1)):d},set:function(e){e=e.toString(),d=this instanceof qf==1?"/"+e:e}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(e){this.V=e}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof qf==0?Tf(f,this.objId,this.scope):f},set:function(e){e=e.toString(),f=this instanceof qf==0?"("===e.substr(0,1)?ff(e.substr(1,e.length-2)):ff(e):e}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof qf==1?ff(f.substr(1,f.length-1)):f},set:function(e){e=e.toString(),f=this instanceof qf==1?"/"+e:e}}),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 p,m=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return m},set:function(e){e=Boolean(e),m=e}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(e){p=e}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,1))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,1):this.Ff=Nf(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,2))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,2):this.Ff=Nf(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,3))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,3):this.Ff=Nf(this.Ff,3)}});var g=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==g)return g},set:function(e){if(-1===[0,1,2].indexOf(e))throw new Error('Invalid value "'+e+'" for attribute Q supplied.');g=e}}),Object.defineProperty(this,"textAlign",{get:function(){var e;switch(g){case 0:default:e="left";break;case 1:e="center";break;case 2:e="right"}return e},configurable:!0,enumerable:!0,set:function(e){switch(e){case"right":case 2:g=2;break;case"center":case 1:g=1;break;default:g=0}}})};gf(Ff,Of);var Bf=function(){Ff.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return If(t,this.objId,this.scope)},set:function(e){var r,n;n=[],"string"==typeof(r=e)&&(n=function(e,t,r){r||(r=1);for(var n,i=[];n=t.exec(e);)i.push(n[r]);return i}(r,/\((.*?)\)/g)),t=n}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,r){for(r=r||!1,e=(e=e||"").toString();-1!==t.indexOf(e)&&(t.splice(t.indexOf(e),1),!1!==r););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,18))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,18):this.Ff=Nf(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,19))},set:function(e){!0===this.combo&&(!0===Boolean(e)?this.Ff=kf(this.Ff,19):this.Ff=Nf(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,20))},set:function(e){!0===Boolean(e)?(this.Ff=kf(this.Ff,20),t.sort()):this.Ff=Nf(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,22))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,22):this.Ff=Nf(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,23))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,23):this.Ff=Nf(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,27))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,27):this.Ff=Nf(this.Ff,27)}}),this.hasAppearanceStream=!1};gf(Bf,Ff);var Df=function(){Bf.call(this),this.fontName="helvetica",this.combo=!1};gf(Df,Bf);var Mf=function(){Df.call(this),this.combo=!0};gf(Mf,Df);var Uf=function(){Mf.call(this),this.edit=!0};gf(Uf,Mf);var qf=function(){Ff.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,15))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,15):this.Ff=Nf(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,16))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,16):this.Ff=Nf(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,17))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,17):this.Ff=Nf(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,26))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,26):this.Ff=Nf(this.Ff,26)}});var e,t={};
vendor: 4,557 bytes, line 56
56Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(t).length){var r,n=[];for(r in n.push("<<"),t)n.push("/"+r+" ("+df(e(t[r]))+")");return n.push(">>"),n.join("\n")}},set:function(e){"object"===Ro(e)&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){"string"==typeof e&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};gf(qf,Ff);var zf=function(){qf.call(this),this.pushButton=!0};gf(zf,qf);var $f=function(){qf.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})};gf($f,qf);var Wf=function(){var e,t;Ff.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var r,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};this.scope&&(e=this.scope.internal.getEncryptor(this.objId));var t,r=[];for(t in r.push("<<"),n)r.push("/"+t+" ("+df(e(n[t]))+")");return r.push(">>"),r.join("\n")},set:function(e){"object"===Ro(e)&&(n=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(e){"string"==typeof e&&(n.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(e){r="/"+e}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Kf.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};gf(Wf,Ff),$f.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var r=this.Kids[t];r.appearanceStreamContent=e.createAppearanceStream(r.optionName),r.caption=e.getCA()}},$f.prototype.createOption=function(e){var t=new Wf;return t.Parent=this,t.optionName=e,this.Kids.push(t),Zf.call(this.scope,t),t};var Hf=function(){qf.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Kf.CheckBox.createAppearanceStream()};gf(Hf,qf);var Vf=function(){Ff.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,13))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,13):this.Ff=Nf(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,21))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,21):this.Ff=Nf(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,23))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,23):this.Ff=Nf(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,24))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,24):this.Ff=Nf(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,25))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,25):this.Ff=Nf(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,26))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,26):this.Ff=Nf(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};gf(Vf,Ff);
vendor: 9,323 bytes, line 56
56var Gf=function(){Vf.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(xf(this.Ff,14))},set:function(e){!0===Boolean(e)?this.Ff=kf(this.Ff,14):this.Ff=Nf(this.Ff,14)}}),this.password=!0};gf(Gf,Vf);var Kf={CheckBox:{createAppearanceStream:function(){return{N:{On:Kf.CheckBox.YesNormal},D:{On:Kf.CheckBox.YesPushDown,Off:Kf.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=vf(e);t.scope=e.scope;var r=[],n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),s=Lf(e,e.caption);return r.push("0.749023 g"),r.push("0 0 "+pf(Kf.internal.getWidth(e))+" "+pf(Kf.internal.getHeight(e))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+pf(s.fontSize)+" Tf "+i),r.push("BT"),r.push(s.text),r.push("ET"),r.push("Q"),r.push("EMC"),t.stream=r.join("\n"),t},YesNormal:function(e){var t=vf(e);t.scope=e.scope;var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color),i=[],s=Kf.internal.getHeight(e),a=Kf.internal.getWidth(e),o=Lf(e,e.caption);return i.push("1 g"),i.push("0 0 "+pf(a)+" "+pf(s)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+pf(a-1)+" "+pf(s-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+pf(o.fontSize)+" Tf "+n),i.push(o.text),i.push("ET"),i.push("Q"),t.stream=i.join("\n"),t},OffPushDown:function(e){var t=vf(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+pf(Kf.internal.getWidth(e))+" "+pf(Kf.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join("\n"),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Kf.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Kf.RadioButton.Circle.YesNormal,t.D[e]=Kf.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=vf(e);t.scope=e.scope;var r=[],n=Kf.internal.getWidth(e)<=Kf.internal.getHeight(e)?Kf.internal.getWidth(e)/4:Kf.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Kf.internal.Bezier_C,s=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+mf(Kf.internal.getWidth(e)/2)+" "+mf(Kf.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+s+" "+s+" "+n+" 0 "+n+" c"),r.push("-"+s+" "+n+" -"+n+" "+s+" -"+n+" 0 c"),r.push("-"+n+" -"+s+" -"+s+" -"+n+" 0 -"+n+" c"),r.push(s+" -"+n+" "+n+" -"+s+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join("\n"),t},YesPushDown:function(e){var t=vf(e);t.scope=e.scope;var r=[],n=Kf.internal.getWidth(e)<=Kf.internal.getHeight(e)?Kf.internal.getWidth(e)/4:Kf.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),s=Number((i*Kf.internal.Bezier_C).toFixed(5)),a=Number((n*Kf.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+mf(Kf.internal.getWidth(e)/2)+" "+mf(Kf.internal.getHeight(e)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),r.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),r.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),r.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+mf(Kf.internal.getWidth(e)/2)+" "+mf(Kf.internal.getHeight(e)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),r.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),r.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),r.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join("\n"),t},OffPushDown:function(e){var t=vf(e);t.scope=e.scope;var r=[],n=Kf.internal.getWidth(e)<=Kf.internal.getHeight(e)?Kf.internal.getWidth(e)/4:Kf.internal.getHeight(e)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),s=Number((i*Kf.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+mf(Kf.internal.getWidth(e)/2)+" "+mf(Kf.internal.getHeight(e)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),r.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),r.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),r.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join("\n"),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Kf.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Kf.RadioButton.Cross.YesNormal,t.D[e]=Kf.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=vf(e);t.scope=e.scope;var r=[],n=Kf.internal.calculateCross(e);return r.push("q"),r.push("1 1 "+pf(Kf.internal.getWidth(e)-2)+" "+pf(Kf.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(pf(n.x1.x)+" "+pf(n.x1.y)+" m"),r.push(pf(n.x2.x)+" "+pf(n.x2.y)+" l"),r.push(pf(n.x4.x)+" "+pf(n.x4.y)+" m"),r.push(pf(n.x3.x)+" "+pf(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join("\n"),t},YesPushDown:function(e){var t=vf(e);t.scope=e.scope;var r=Kf.internal.calculateCross(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+pf(Kf.internal.getWidth(e))+" "+pf(Kf.internal.getHeight(e))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+pf(Kf.internal.getWidth(e)-2)+" "+pf(Kf.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(pf(r.x1.x)+" "+pf(r.x1.y)+" m"),n.push(pf(r.x2.x)+" "+pf(r.x2.y)+" l"),n.push(pf(r.x4.x)+" "+pf(r.x4.y)+" m"),n.push(pf(r.x3.x)+" "+pf(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join("\n"),t},OffPushDown:function(e){var t=vf(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+pf(Kf.internal.getWidth(e))+" "+pf(Kf.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join("\n"),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+r}};Kf.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Kf.internal.getWidth(e),r=Kf.internal.getHeight(e),n=Math.min(t,r);return{x1:{x:(t-n)/2,y:(r-n)/2+n},x2:{x:(t-n)/2+n,y:(r-n)/2},x3:{x:(t-n)/2,y:(r-n)/2},x4:{x:(t-n)/2+n,y:(r-n)/2+n}}}},Kf.internal.getWidth=function(e){var t=0;return"object"===Ro(e)&&(t=bf(e.Rect[2])),t},Kf.internal.getHeight=function(e){var t=0;return"object"===Ro(e)&&(t=bf(e.Rect[3])),t};var Jf,Yf,Zf=uf.addField=function(e){if(function(e,t){if(t.scope=e,void 0!==e.internal&&(void 0===e.internal.acroformPlugin||!1===e.internal.acroformPlugin.isInitialized)){if(Ff.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(Pf)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");hf=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new Rf,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){var t;(t=e).internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0}),e.internal.events.subscribe("buildDocument",function(){!function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];n.objId=void 0,n.hasAnnotation&&Ef(n,e)}}(e)}),e.internal.events.subscribe("putCatalog",function(){!function(e){if(void 0===e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(e)}),e.internal.events.subscribe("postPutPages",function(t){!function(e,t){var r=!e;for(var n in e||(t.internal.newObjectDeferredBegin(t.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),t.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e=e||t.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(n)){var i=e[n],s=[],a=i.Rect;if(i.Rect&&(i.Rect=Sf(i.Rect,t)),t.internal.newObjectDeferredBegin(i.objId,!0),i.DA=Kf.createDefaultAppearanceStream(i),"object"===Ro(i)&&"function"==typeof i.getKeyValueListForStream&&(s=i.getKeyValueListForStream()),i.Rect=a,i.hasAppearanceStream&&!i.appearanceStreamContent){var o=Af(i);s.push({key:"AP",value:"<</N "+o+">>"}),t.internal.acroformPlugin.xForms.push(o)}if(i.appearanceStreamContent){var l="";for(var c in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(c)){var u=i.appearanceStreamContent[c];if(l+="/"+c+" ",l+="<<",Object.keys(u).length>=1||Array.isArray(u)){for(var n in u)if(u.hasOwnProperty(n)){var h=u[n];"function"==typeof h&&(h=h.call(t,i)),l+="/"+n+" "+h+" ",t.internal.acroformPlugin.xForms.indexOf(h)>=0||t.internal.acroformPlugin.xForms.push(h)}}else"function"==typeof(h=u)&&(h=h.call(t,i)),l+="/"+n+" "+h,t.internal.acroformPlugin.xForms.indexOf(h)>=0||t.internal.acroformPlugin.xForms.push(h);l+=">>"}s.push({key:"AP",value:"<<\n"+l+">>"})}t.internal.putStream({additionalKeyValues:s,objectId:i.objId}),t.internal.out("endobj")}r&&function(e,t){for(var r in e)if(e.hasOwnProperty(r)){var n=r,i=e[r];t.internal.newObjectDeferredBegin(i.objId,!0),"object"===Ro(i)&&"function"==typeof i.putStream&&i.putStream(),delete e[n]}}(t.internal.acroformPlugin.xForms,t)}(t,e)}),e.internal.acroformPlugin.isInitialized=!0}}(this,e),!(e instanceof Ff))throw new Error("Invalid argument passed to
56jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};function Xf(e){return e.reduce(function(e,t,r){return e[t]=r,e},{})}uf.AcroFormChoiceField=Bf,uf.AcroFormListBox=Df,uf.AcroFormComboBox=Mf,uf.AcroFormEditBox=Uf,uf.AcroFormButton=qf,uf.AcroFormPushButton=zf,uf.AcroFormRadioButton=$f,uf.AcroFormCheckBox=Hf,uf.AcroFormTextField=Vf,uf.AcroFormPasswordField=Gf,uf.AcroFormAppearance=Kf,uf.AcroForm={ChoiceField:Bf,ListBox:Df,ComboBox:Mf,EditBox:Uf,Button:qf,PushButton:zf,RadioButton:$f,CheckBox:Hf,TextField:Vf,PasswordField:Gf,Appearance:Kf},cf.AcroForm={ChoiceField:Bf,ListBox:Df,ComboBox:Mf,EditBox:Uf,Button:qf,PushButton:zf,RadioButton:$f,CheckBox:Hf,TextField:Vf,PasswordField:Gf,Appearance:Kf},function(e){var t="addImage_";e.__addimage__={};var r="UNKNOWN",n={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=e.__addimage__.getImageFileTypeByImageData=function(e,t){var i,s,a,o,l,c=r;if("RGBA"===(t=t||r)||void 0!==e.data&&e.data instanceof Uint8ClampedArray&&"height"in e&&"width"in e)return"RGBA";if(x(e))for(l in n)for(a=n[l],i=0;i<a.length;i+=1){for(o=!0,s=0;s<a[i].length;s+=1)if(void 0!==a[i][s]&&a[i][s]!==e[s]){o=!1;break}if(!0===o){c=l;break}}else for(l in n)for(a=n[l],i=0;i<a.length;i+=1){for(o=!0,s=0;s<a[i].length;s+=1)if(void 0!==a[i][s]&&a[i][s]!==e.charCodeAt(s)){o=!1;break}if(!0===o){c=l;break}}return c===r&&t!==r&&(c=t),c},s=function e(t){for(var r=this.internal.write,n=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);t.objectId=this.internal.newObject();var s=[];if(s.push({key:"Type",value:"/XObject"}),s.push({key:"Subtype",value:"/Image"}),s.push({key:"Width",value:t.width}),s.push({key:"Height",value:t.height}),t.colorSpace===b.INDEXED?s.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(t.palette.length/3-1)+" "+("sMask"in t&&void 0!==t.sMask?t.objectId+2:t.objectId+1)+" 0 R]"}):(s.push({key:"ColorSpace",value:"/"+t.colorSpace}),t.colorSpace===b.DEVICE_CMYK&&s.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),s.push({key:"BitsPerComponent",value:t.bitsPerComponent}),"decodeParameters"in t&&void 0!==t.decodeParameters&&s.push({key:"DecodeParms",value:"<<"+t.decodeParameters+">>"}),"transparency"in t&&Array.isArray(t.transparency)&&t.transparency.length>0){for(var a="",o=0,l=t.transparency.length;o<l;o++)a+=t.transparency[o]+" "+t.transparency[o]+" ";s.push({key:"Mask",value:"["+a+"]"})}void 0!==t.sMask&&s.push({key:"SMask",value:t.objectId+1+" 0 R"});var c=void 0!==t.filter?["/"+t.filter]:void 0;if(n({data:t.data,additionalKeyValues:s,alreadyAppliedFilters:c,objectId:t.objectId}),r("endobj"),"sMask"in t&&void 0!==t.sMask){var u,h=null!==(u=t.sMaskBitsPerComponent)&&void 0!==u?u:t.bitsPerComponent,d={width:t.width,height:t.height,colorSpace:"DeviceGray",bitsPerComponent:h,data:t.sMask};"filter"in t&&(d.decodeParameters="/Predictor ".concat(t.predictor," /Colors 1 /BitsPerComponent ").concat(h," /Columns ").concat(t.width),d.filter=t.filter),e.call(this,d)}if(t.colorSpace===b.INDEXED){var f=this.internal.newObject();n({data:N(new Uint8Array(t.palette)),objectId:f}),r("endobj")}},a=function(){var e=this.internal.collections[t+"images"];for(var r in e)s.call(this,e[r])},o=function(){var e,r=this.internal.collections[t+"images"],n=this.internal.write;for(var i in r)n("/I"+(e=r[i]).index,e.objectId,"0","R")},l=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",o))},c=function(){var e=this.internal.collections[t+"images"];return l.call(this),e},u=function(){return Object.keys(this.internal.collections[t+"images"]).length},h=function(t){return"function"==typeof e["process"+t.toUpperCase()]},d=function(e){return"object"===Ro(e)&&1===e.nodeType},f=function(t,r){if("IMG"===t.nodeName&&t.hasAttribute("src")){var n=""+t.getAttribute("src");if(0===n.indexOf("data:image/"))return Bd(unescape(n).split("base64,").pop());var i=e.loadFile(n,!0);if(void 0!==i)return i}if("CANVAS"===t.nodeName){if(0===t.width||0===t.height)throw new Error("Given canvas must have data. Canvas width: "+t.width+", height: "+t.height);var s;switch(r){case"PNG":s="image/png";break;case"WEBP":s="image/webp";break;default:s="image/jpeg"}return Bd(t.toDataURL(s,1).split("base64,").pop())}},p=function(e){var r=this.internal.collections[t+"images"];if(r)for(var n in r)if(e===r[n].alias)return r[n]},m=function(e,t,r){return e||t||(e=-96,t=-96),e<0&&(e=-1*r.width*72/e/this.internal.scaleFactor),t<0&&(t=-1*r.height*72/t/this.internal.scaleFactor),0===e&&(e=t*r.width/r.height),0===t&&(t=e*r.height/r.width),[e,t]},g=function(e,t,r,n,i,s){var a=m.call(this,r,n,i),o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,u=c.call(this);if(r=a[0],n=a[1],u[i.index]=i,s){s*=Math.PI/180;var h=Math.cos(s),d=Math.sin(s),f=function(e){return e.toFixed(4)},p=[f(h),f(d),f(-1*d),f(h),0,0,"cm"]}this.internal.write("q"),s?(this.internal.write([1,"0","0",1,o(e),l(t+n),"cm"].join(" ")),this.internal.write(p.join(" ")),this.internal.write([o(r),"0","0",o(n),"0","0","cm"].join(" "))):this.internal.write([o(r),"0","0",o(n),o(e),l(t+n),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+i.index+" Do"),this.internal.write("Q")},b=e.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"};e.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 v=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},w=e.__addimage__.sHashCode=function(e){var t,r,n=0;if("string"==typeof e)for(r=e.length,t=0;t<r;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;else if(x(e))for(r=e.byteLength/2,t=0;t<r;t++)n=(n<<5)-n+e[t],n|=0;return n}
vendor: 3,953 bytes, lines 56-64
56,y=e.__addimage__.validateStringAsBase64=function(e){(e=e||"").toString().trim();var t=!0;return 0===e.length&&(t=!1),e.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+/]+$/.test(e.substr(0,e.length-2))&&(t=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(e.substr(-2))&&(t=!1),t},_=e.__addimage__.extractImageFromDataUrl=function(e){if(null==e)return null;if(!(e=e.trim()).startsWith("data:"))return null;var t=e.indexOf(",");return t<0?null:e.substring(0,t).trim().endsWith("base64")?e.substring(t+1):null};e.__addimage__.isArrayBuffer=function(e){return e instanceof ArrayBuffer};var x=e.__addimage__.isArrayBufferView=function(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array},k=e.__addimage__.binaryStringToUint8Array=function(e){for(var t=e.length,r=new Uint8Array(t),n=0;n<t;n++)r[n]=e.charCodeAt(n);return r},N=e.__addimage__.arrayBufferToBinaryString=function(e){for(var t="",r=x(e)?e:new Uint8Array(e),n=0;n<r.length;n+=8192)t+=String.fromCharCode.apply(null,r.subarray(n,n+8192));return t};e.addImage=function(){var e,t,n,i,s,a,o,c,u;if("number"==typeof arguments[1]?(t=r,n=arguments[1],i=arguments[2],s=arguments[3],a=arguments[4],o=arguments[5],c=arguments[6],u=arguments[7]):(t=arguments[1],n=arguments[2],i=arguments[3],s=arguments[4],a=arguments[5],o=arguments[6],c=arguments[7],u=arguments[8]),"object"===Ro(e=arguments[0])&&!d(e)&&"imageData"in e){var h=e;e=h.imageData,t=h.format||t||r,n=h.x||n||0,i=h.y||i||0,s=h.w||h.width||s,a=h.h||h.height||a,o=h.alias||o,c=h.compression||c,u=h.rotation||h.angle||u}var f=this.internal.getFilters();if(void 0===c&&-1!==f.indexOf("FlateEncode")&&(c="SLOW"),isNaN(n)||isNaN(i))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var p=S.call(this,e,t,o,c);return g.call(this,n,i,s,a,p,u),this};var S=function(t,n,s,a){var o,l,c,m;if("string"==typeof t&&i(t)===r){t=unescape(t);var g=A(t,!1);(""!==g||void 0!==(g=e.loadFile(t,!0)))&&(t=g)}if(d(t)&&(t=f(t,n)),n=i(t,n),!h(n))throw new Error("addImage does not support files of type '"+n+"', please ensure that a plugin for '"+n+"' support is added.");if((null==(c=s)||0===c.length)&&(s="string"==typeof(m=t)||x(m)?w(m):x(m.data)?w(m.data):null),(o=p.call(this,s))||(t instanceof Uint8Array||"RGBA"===n||(l=t,t=k(t)),o=this["process"+n.toUpperCase()](t,u.call(this),s,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:v.NONE}(a),l)),!o)throw new Error("An unknown error occurred whilst processing the image.");return o},A=e.__addimage__.convertBase64ToBinaryString=function(e,t){t="boolean"!=typeof t||t;var r,n="";if("string"==typeof e){var i;r=null!==(i=_(e))&&void 0!==i?i:e;try{n=Bd(r)}catch(s){if(t)throw y(r)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+s.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return n};e.getImageProperties=function(t){var n,s,a="";if(d(t)&&(t=f(t)),"string"==typeof t&&i(t)===r&&(""===(a=A(t,!1))&&(a=e.loadFile(t)||""),t=a),s=i(t),!h(s))throw new Error("addImage does not support files of type '"+s+"', please ensure that a plugin for '"+s+"' support is added.");if(t instanceof Uint8Array||(t=k(t)),!(n=this["process"+s.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return n.fileType=s,n}}(cf.API), 57/** 58 * @license 59 * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) [email protected] 60 * 61 * Licensed under the MIT License. 62 * http://opensource.org/licenses/mit-license 63 */ 64Jf=cf.API,Yf=function(e){if(void 0!==e&&""!=e)return!0},cf.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),Jf.events.push(["putPage",function(e){for(var t,r,n,i=this.internal.getCoordinateString,
vendor: 4,633 bytes, lines 64-72
64s=this.internal.getVerticalCoordinateString,a=this.internal.getPageInfoByObjId(e.objId),o=e.pageContext.annotations,l=!1,c=0;c<o.length&&!l;c++)switch((t=o[c]).type){case"link":(Yf(t.options.url)||Yf(t.options.pageNumber))&&(l=!0);break;case"reference":case"text":case"freetext":l=!0}if(0!=l){this.internal.write("/Annots [");for(var u=0;u<o.length;u++){t=o[u];var h=this.internal.pdfEscape,d=this.internal.getEncryptor(e.objId);switch(t.type){case"reference":this.internal.write(" "+t.object.objId+" 0 R ");break;case"text":var f=this.internal.newAdditionalObject(),p=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(f.objId),g=t.title||"Note";n="<</Type /Annot /Subtype /Text "+(r="/Rect ["+i(t.bounds.x)+" "+s(t.bounds.y+t.bounds.h)+" "+i(t.bounds.x+t.bounds.w)+" "+s(t.bounds.y)+"] ")+"/Contents ("+h(m(t.contents))+")",n+=" /Popup "+p.objId+" 0 R",n+=" /P "+a.objId+" 0 R",n+=" /T ("+h(m(g))+") >>",f.content=n;var b=f.objId+" 0 R";n="<</Type /Annot /Subtype /Popup "+(r="/Rect ["+i(t.bounds.x+30)+" "+s(t.bounds.y+t.bounds.h)+" "+i(t.bounds.x+t.bounds.w+30)+" "+s(t.bounds.y)+"] ")+" /Parent "+b,t.open&&(n+=" /Open true"),n+=" >>",p.content=n,this.internal.write(f.objId,"0 R",p.objId,"0 R");break;case"freetext":r="/Rect ["+i(t.bounds.x)+" "+s(t.bounds.y)+" "+i(t.bounds.x+t.bounds.w)+" "+s(t.bounds.y+t.bounds.h)+"] ";var v=t.color||"#000000";n="<</Type /Annot /Subtype /FreeText "+r+"/Contents ("+h(d(t.contents))+")",n+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+v+")",n+=" /Border [0 0 0]",n+=" >>",this.internal.write(n);break;case"link":if(t.options.name){var w=this.annotations._nameMap[t.options.name];t.options.pageNumber=w.page,t.options.top=w.y}else t.options.top||(t.options.top=0);if(r="/Rect ["+t.finalBounds.x+" "+t.finalBounds.y+" "+t.finalBounds.w+" "+t.finalBounds.h+"] ",n="",t.options.url)n="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /A <</S /URI /URI ("+h(d(t.options.url))+") >>";else if(t.options.pageNumber)switch(n="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(t.options.pageNumber).objId+" 0 R",t.options.magFactor=t.options.magFactor||"XYZ",t.options.magFactor){case"Fit":n+=" /Fit]";break;case"FitH":n+=" /FitH "+t.options.top+"]";break;case"FitV":t.options.left=t.options.left||0,n+=" /FitV "+t.options.left+"]";break;default:var y=s(t.options.top);t.options.left=t.options.left||0,void 0===t.options.zoom&&(t.options.zoom=0),n+=" /XYZ "+t.options.left+" "+y+" "+t.options.zoom+"]"}""!=n&&(n+=" >>",this.internal.write(n))}}this.internal.write("]")}}]),Jf.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":t.pageContext.annotations.push(e)}},Jf.link=function(e,t,r,n,i){var s=this.internal.getCurrentPageInfo(),a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:a(e),y:o(t),w:a(e+r),h:o(t+n)},options:i,type:"link"})},Jf.textWithLink=function(e,t,r,n){var i,s,a=this.getTextWidth(e),o=this.internal.getLineHeight()/this.internal.scaleFactor;if(void 0!==n.maxWidth){s=n.maxWidth;var l=this.splitTextToSize(e,s).length;i=Math.ceil(o*l)}else s=a,i=o;return this.text(e,t,r,n),r+=.2*o,"center"===n.align&&(t-=a/2),"right"===n.align&&(t-=a),this.link(t,r-o,s,i,n),a},Jf.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor}, 65/** 66 * @license 67 * Copyright (c) 2017 Aras Abbasi 68 * 69 * Licensed under the MIT License. 70 * http://opensource.org/licenses/mit-license 71 */ 72function(e){var t={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,652
vendor: 15,032 bytes, lines 72-80
7266,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]},r={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}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var s=e.__arabicParser__.isInArabicSubstitutionA=function(e){return void 0!==t[e.charCodeAt(0)]},a=e.__arabicParser__.isArabicLetter=function(e){return"string"==typeof e&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},o=e.__arabicParser__.isArabicEndLetter=function(e){return a(e)&&s(e)&&t[e.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(e){return a(e)&&i.indexOf(e.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return a(e)&&s(e)&&t[e.charCodeAt(0)].length>=1};var c=e.__arabicParser__.arabicLetterHasFinalForm=function(e){return a(e)&&s(e)&&t[e.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(e){return a(e)&&s(e)&&t[e.charCodeAt(0)].length>=3};var u=e.__arabicParser__.arabicLetterHasMedialForm=function(e){return a(e)&&s(e)&&4==t[e.charCodeAt(0)].length},h=e.__arabicParser__.resolveLigatures=function(e){var t=0,n=r,i="",s=0;for(t=0;t<e.length;t+=1)void 0!==n[e.charCodeAt(t)]?(s++,"number"==typeof(n=n[e.charCodeAt(t)])&&(i+=String.fromCharCode(n),n=r,s=0),t===e.length-1&&(n=r,i+=e.charAt(t-(s-1)),t-=s-1,s=0)):(n=r,i+=e.charAt(t-s),t-=s,s=0);return i};e.__arabicParser__.isArabicDiacritic=function(e){return void 0!==e&&void 0!==n[e.charCodeAt(0)]};var d=e.__arabicParser__.getCorrectForm=function(e,t,r){return a(e)?!1===s(e)?-1:!c(e)||!a(t)&&!a(r)||!a(r)&&o(t)||o(e)&&!a(t)||o(e)&&l(t)||o(e)&&o(t)?0:u(e)&&a(t)&&!o(t)&&a(r)&&c(r)?3:o(e)||!a(r)?1:2:-1},f=function(e){var r=0,n=0,i=0,s="",o="",l="",c=(e=e||"").split("\\s+"),u=[];for(r=0;r<c.length;r+=1){for(u.push(""),n=0;n<c[r].length;n+=1)s=c[r][n],o=c[r][n-1],l=c[r][n+1],a(s)?(i=d(s,o,l),u[r]+=-1!==i?String.fromCharCode(t[s.charCodeAt(0)][i]):s):u[r]+=s;u[r]=h(u[r])}return u.join(" ")},p=e.__arabicParser__.processArabic=e.processArabic=function(){var e,t="string"==typeof arguments[0]?arguments[0]:arguments[0].text,r=[];if(Array.isArray(t)){var n=0;for(r=[],n=0;n<t.length;n+=1)Array.isArray(t[n])?r.push([f(t[n][0]),t[n][1],t[n][2]]):r.push([f(t[n])]);e=r}else e=f(t);return"string"==typeof arguments[0]?e:(arguments[0].text=e,arguments[0])};e.events.push(["preProcessText",p])}(cf.API),cf.API.autoPrint=function(e){var t;return(e=e||{}).variant=e.variant||"non-conform","javascript"===e.variant?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=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 "+t+" 0 R")})),this}, 73/** 74 * @license 75 * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) [email protected] 76 * 77 * Licensed under the MIT License. 78 * http://opensource.org/licenses/mit-license 79 */ 80function(e){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var t=150;Object.defineProperty(this,"width",{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=t+1)}});var r=300;Object.defineProperty(this,"height",{get:function(){return r},set:function(e){r=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=r+1)}});var n=[];Object.defineProperty(this,"childNodes",{get:function(){return n},set:function(e){n=e}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,t){var r;if("2d"!==(e=e||"2d"))return null;for(r in t)this.pdf.context2d.hasOwnProperty(r)&&(this.pdf.context2d[r]=t[r]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(cf.API),function(e){var t={left:0,top:0,bottom:0,right:0},r=!1,n=function(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var e=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var t=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var r=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return r},set:function(e){r=e}});var n=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return n},set:function(e){n=e}});var i=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(e){i=e}});var s=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return s},set:function(e){s=e}});var a=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return a},set:function(e){a=e}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(e){return n.call(this),this.internal.__cell__.headerFunction="function"==typeof e?e:void 0,this},e.getTextDimensions=function(e,t){n.call(this);var r=(t=t||{}).fontSize||this.getFontSize(),i=t.font||this.getFont(),s=t.scaleFactor||this.internal.scaleFactor,a=0,o=0,l=0,c=this;if(!Array.isArray(e)&&"string"!=typeof e){if("number"!=typeof e)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");e=String(e)}var u=t.maxWidth;u>0?"string"==typeof e?e=this.splitTextToSize(e,u):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce(function(e,t){return e.concat(c.splitTextToSize(t,u))},[])):e=Array.isArray(e)?e:[e];for(var h=0;h<e.length;h++)a<(l=this.getStringUnitWidth(e[h],{font:i})*r)&&(a=l);return 0!==a&&(o=e.length),{w:a/=s,h:Math.max((o*r*this.getLineHeightFactor()-r*(this.getLineHeightFactor()-1))/s,0)}},e.cellAddPage=function(){n.call(this),this.addPage();var e=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new s(e.left,e.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var a=e.cell=function(){var e;e=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var i=this.internal.__cell__.lastCell,a=this.internal.__cell__.padding,o=this.internal.__cell__.margins||t,l=this.internal.__cell__.tableHeaderRow,c=this.internal.__cell__.printHeaders;return void 0!==i.lineNumber&&(i.lineNumber===e.lineNumber?(e.x=(i.x||0)+(i.width||0),e.y=i.y||0):i.y+i.height+e.height+o.bottom>this.getPageHeight()?(this.cellAddPage(),e.y=o.top,c&&l&&(this.printHeaderRow(e.lineNumber,!0),e.y+=l[0].height)):e.y=i.y+i.height||e.y),void 0!==e.text[0]&&(this.rect(e.x,e.y,e.width,e.height,!0===r?"FD":void 0),"right"===e.align?this.text(e.text,e.x+e.width-a,e.y+a,{align:"right",baseline:"top"}):"center"===e.align?this.text(e.text,e.x+e.width/2,e.y+a,{align:"center",baseline:"top",maxWidth:e.width-a-a}):this.text(e.text,e.x+a,e.y+a,{align:"left",baseline:"top",maxWidth:e.width-a-a})),this.internal.__cell__.lastCell=e,this};e.table=function(e,r,l,c,u){if(n.call(this),!l)throw new Error("No data for PDF table.");var h,d,f,p,m=[],g=[],b=[],v={},w={},y=[],_=[],x=(u=u||{}).autoSize||!1,k=!1!==u.printHeaders,N=u.css&&void 0!==u.css["font-size"]?16*u.css["font-size"]:u.fontSize||12,S=u.margins||Object.assign({width:this.getPageWidth()},t),A="number"==typeof u.padding?u.padding:3,L=u.headerBackgroundColor||"#c8c8c8",j=u.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=k,this.internal.__cell__.margins=S,this.internal.__cell__.table_font_size=N,this.internal.__cell__.padding=A,this.internal.__cell__.headerBackgroundColor=L,this.internal.__cell__.headerTextColor=j,this.setFontSize(N),null==c)g=m=Object.keys(l[0]),b=m.map(function(){return"left"});else if(Array.isArray(c)&&"object"===Ro(c[0]))for(m=c.map(function(e){return e.name}),g=c.map(function(e){return e.prompt||e.name||""}),b=c.map(function(e){return e.align||"left"}),h=0;h<c.length;h+=1)w[c[h].name]=.7499990551181103*c[h].width;else Array.isArray(c)&&"string"==typeof c[0]&&(g=m=c,b=m.map(function(){return"left"}));if(x||Array.isArray(c)&&"string"==typeof c[0])for(h=0;h<m.length;h+=1){for(v[p=m[h]]=l.map(function(e){return e[p]}),this.setFont(void 0,"bold"),y.push(this.getTextDimensions(g[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),d=v[p],this.setFont(void 0,"normal"),f=0;f<d.length;f+=1)y.push(this.getTextDimensions(d[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);w[p]=Math.max.apply(null,y)+A+A,y=[]}if(k){var P={};for(h=0;h<m.length;h+=1)P[m[h]]={},P[m[h]].text=g[h],P[m[h]].align=b[h];var E=o.call(this,P,w);_=m.map(function(t){return new s(e,r,w[t],E,P[t].text,void 0,P[t].align)}),this.setTableHeaderRow(_),this.printHeaderRow(1,!1)}var I=c.reduce(function(e,t){return e[t.name]=t.align,e},{});for(h=0;h<l.length;h+=1){"rowStart"in u&&u.rowStart instanceof Function&&u.rowStart({row:h,data:l[h]},this);var T=o.call(this,l[h],w);for(f=0;f<m.length;f+=1){var O=l[h][m[f]];"cellStart"in u&&u.cellStart instanceof Function&&u.cellStart({row:h,col:f,data:O},this),a.call(this,new s(e,r,w[m[f]],T,O,h+2,I[m[f]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=r,this};var o=function(e,t){var r=this.internal.__cell__.padding,n=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(e).map(function(n){var i=e[n];return this.splitTextToSize(i.hasOwnProperty("text")?i.text:i,t[n]-r-r)},this).map(function(e){return this.getLineHeightFactor()*e.length*n/i+r+r},this).reduce(function(e,t){return Math.max(e,t)},0)};e.setTableHeaderRow=function(e){n.call(this),this.internal.__cell__.tableHeaderRow=e},e.printHeaderRow=function(e,t){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var i;if(r=!0,"function"==typeof this.internal.__cell__.headerFunction){var o=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(o[0],o[1],o[2],o[3],void 0,-1)}this.setFont(void 0,"bold");for(var l=[],c=0;c<this.internal.__cell__.tableHeaderRow.length;c+=1){i=this.internal.__cell__.tableHeaderRow[c].clone(),t&&(i.y=this.internal.__cell__.margins.top||0,l.push(i)),i.lineNumber=e;var u=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),a.call(this,i),this.setTextColor(u)}l.length>0&&this.setTableHeaderRow(l),this.setFont(void 0,"normal"),r=!1}}(cf.API);var Qf={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},ep=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],tp=Xf(ep),rp=[100,200,300,400,500,600,700,800,900],np=Xf(rp);function ip(e){var t,r=e.family.replace(/"|'/g,"").toLowerCase(),n=(t=e.style,Qf[t=t||"normal"]?t:"normal"),i=function(e){return e?"number"==typeof e?e>=100&&e<=900&&e%100==0?e:400:/^\d00$/.test(e)?parseInt(e):"bold"===e?700:400:400}(e.weight),s=function(e){return"number"==typeof tp[e=e||"normal"]?e:"normal"}(e.stretch);return{family:r,style:n,weight:i,stretch:s,src:e.src||[],ref:e.ref||{name:r,style:[s,n,i].join(" ")}}}function sp(e,t,r,n){var i;for(i=r;i>=0&&i<t.length;i+=n)if(e[t[i]])return e[t[i]];for(i=r;i>=0&&i<t.length;i-=n)if(e[t[i]])return e[t[i]]}var ap={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},op={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function lp(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function cp(e){return e.trimLeft()}function up(e,t){for(var r=0;r<e.length;){if(e.charAt(r)===t)return[e.substring(0,r),e.substring(r+1)];r+=1}return null}function hp(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===t?null:[t[0],e.substring(t[0].length)]}var dp,fp,pp,mp,gp,bp,vp,wp,yp=["times"];function _p(e,t,r,n,i){var s=4,a=Np;switch(i){case cf.API.image_compression.FAST:s=1,a=kp;break;case cf.API.image_compression.MEDIUM:s=6,a=Sp;break;case cf.API.image_compression.SLOW:s=9,a=Ap}e=function(e,t,r,n){for(var i,s=e.length/t,a=new Uint8Array(e.length+s),o=[xp,kp,Np,Sp,Ap],l=0;l<s;l+=1){var c=l*t,u=e.subarray(c,c+t);if(n)a.set(n(u,r,i),c+l);else{for(var h=o.length,d=[],f=0;f<h;f+=1)d[f]=o[f](u,r,i);var p=jp(d.concat());a.set(d[p],c+l)}i=u}return a}(e,t,Math.ceil(r*n/8),a);var o=ml(e,{level:s});return cf.API.__addimage__.arrayBufferToBinaryString(o)}function xp(e){var t=Array.apply([],e);return t.unshift(0),t}function kp(e,t){var r=e.length,n=[];n[0]=1;for(var i=0;i<r;i+=1){var s=e[i-t]||0;n[i+1]=e[i]-s+256&255}return n}function Np(e,t,r){var n=e.length,i=[];i[0]=2;for(var s=0;s<n;s+=1){var a=r&&r[s]||0;i[s+1]=e[s]-a+256&255}return i}function Sp(e,t,r){var n=e.length,i=[];
vendor: 5,484 bytes, lines 80-105
80i[0]=3;for(var s=0;s<n;s+=1){var a=e[s-t]||0,o=r&&r[s]||0;i[s+1]=e[s]+256-(a+o>>>1)&255}return i}function Ap(e,t,r){var n=e.length,i=[];i[0]=4;for(var s=0;s<n;s+=1){var a=Lp(e[s-t]||0,r&&r[s]||0,r&&r[s-t]||0);i[s+1]=e[s]-a+256&255}return i}function Lp(e,t,r){if(e===t&&t===r)return e;var n=Math.abs(t-r),i=Math.abs(e-r),s=Math.abs(e+t-r-r);return n<=i&&n<=s?e:i<=s?t:r}function jp(e){var t=e.map(function(e){return e.reduce(function(e,t){return e+Math.abs(t)},0)});return t.indexOf(Math.min.apply(null,t))}function Pp(e,t,r){var n=t*r,i=Math.floor(n/8),s=16-(n-8*i+r),a=(1<<r)-1;return Ip(e,i)>>s&a}function Ep(e,t,r,n){var i=r*n,s=Math.floor(i/8),a=16-(i-8*s+n),o=(1<<n)-1,l=(t&o)<<a;!function(e,t,r){if(t+1<e.byteLength)e.setUint16(t,r,!1);else{var n=r>>8&255;e.setUint8(t,n)}}(e,s,Ip(e,s)&~(o<<a)&65535|l)}function Ip(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function Tp(e){var t=0;if(71!==e[t++]||73!==e[t++]||70!==e[t++]||56!==e[t++]||56!=(e[t++]+1&253)||97!==e[t++])throw new Error("Invalid GIF 87a/89a header.");var r=e[t++]|e[t++]<<8,n=e[t++]|e[t++]<<8,i=e[t++],s=i>>7,a=1<<1+(7&i);e[t++],e[t++];var o=null,l=null;s&&(o=t,l=a,t+=3*a);var c=!0,u=[],h=0,d=null,f=0,p=null;for(this.width=r,this.height=n;c&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(11!==e[t]||78==e[t+1]&&69==e[t+2]&&84==e[t+3]&&83==e[t+4]&&67==e[t+5]&&65==e[t+6]&&80==e[t+7]&&69==e[t+8]&&50==e[t+9]&&46==e[t+10]&&48==e[t+11]&&3==e[t+12]&&1==e[t+13]&&0==e[t+16])t+=14,p=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((L=e[t++])>=0))throw Error("Invalid block size");if(0===L)break;t+=L}break;case 249:if(4!==e[t++]||0!==e[t+4])throw new Error("Invalid graphics extension block.");var m=e[t++];h=e[t++]|e[t++]<<8,d=e[t++],1&m||(d=null),f=m>>2&7,t++;break;case 254:for(;;){if(!((L=e[t++])>=0))throw Error("Invalid block size");if(0===L)break;t+=L}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var g=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,w=e[t++]|e[t++]<<8,y=e[t++],_=y>>6&1,x=1<<1+(7&y),k=o,N=l,S=!1;y>>7&&(S=!0,k=t,N=x,t+=3*x);var A=t;for(t++;;){var L;if(!((L=e[t++])>=0))throw Error("Invalid block size");if(0===L)break;t+=L}u.push({x:g,y:b,width:v,height:w,has_local_palette:S,palette_offset:k,palette_size:N,data_offset:A,data_length:t-A,transparent_index:d,interlaced:!!_,delay:h,disposal:f});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return p},this.frameInfo=function(e){if(e<0||e>=u.length)throw new Error("Frame index out of range.");return u[e]},this.decodeAndBlitFrameBGRA=function(t,n){var i=this.frameInfo(t),s=i.width*i.height,a=new Uint8Array(s);Op(e,i.data_offset,a,s);var o=i.palette_offset,l=i.transparent_index;null===l&&(l=256);var c=i.width,u=r-c,h=c,d=4*(i.y*r+i.x),f=4*((i.y+i.height)*r+i.x),p=d,m=4*u;!0===i.interlaced&&(m+=4*r*7);for(var g=8,b=0,v=a.length;b<v;++b){var w=a[b];if(0===h&&(h=c,(p+=m)>=f&&(m=4*u+4*r*(g-1),p=d+(c+u)*(g<<1),g>>=1)),w===l)p+=4;else{var y=e[o+3*w],_=e[o+3*w+1],x=e[o+3*w+2];n[p++]=x,n[p++]=_,n[p++]=y,n[p++]=255}--h}},this.decodeAndBlitFrameRGBA=function(t,n){var i=this.frameInfo(t),s=i.width*i.height,a=new Uint8Array(s);Op(e,i.data_offset,a,s);var o=i.palette_offset,l=i.transparent_index;null===l&&(l=256);var c=i.width,u=r-c,h=c,d=4*(i.y*r+i.x),f=4*((i.y+i.height)*r+i.x),p=d,m=4*u;!0===i.interlaced&&(m+=4*r*7);for(var g=8,b=0,v=a.length;b<v;++b){var w=a[b];if(0===h&&(h=c,(p+=m)>=f&&(m=4*u+4*r*(g-1),p=d+(c+u)*(g<<1),g>>=1)),w===l)p+=4;else{var y=e[o+3*w],_=e[o+3*w+1],x=e[o+3*w+2];n[p++]=y,n[p++]=_,n[p++]=x,n[p++]=255}--h}}}function Op(e,t,r,n){for(var i=e[t++],s=1<<i,a=s+1,o=a+1,l=i+1,c=(1<<l)-1,u=0,h=0,d=0,f=e[t++],p=new Int32Array(4096),m=null;;){for(;u<16&&0!==f;)h|=e[t++]<<u,u+=8,1===f?f=e[t++]:--f;if(u<l)break;var g=h&c;if(h>>=l,u-=l,g!==s){if(g===a)break;for(var b=g<o?g:m,v=0,w=b;w>s;)w=p[w]>>8,++v;var y=w;if(d+v+(b!==g?1:0)>n)return void Id.log("Warning, gif stream longer than expected.");r[d++]=y;var _=d+=v;for(b!==g&&(r[d++]=y),w=b;v--;)w=p[w],r[--_]=255&w,w>>=8;null!==m&&o<4096&&(p[o++]=m<<8|y,o>=c+1&&l<12&&(++l,c=c<<1|1)),m=g}else o=a+1,c=(1<<(l=i+1))-1,m=null}return d!==n&&Id.log("Warning, gif stream shorter than expected."),r 81/** 82 * @license 83 Copyright (c) 2008, Adobe Systems Incorporated 84 All rights reserved. 85 86 Redistribution and use in source and binary forms, with or without 87 modification, are permitted provided that the following conditions are 88 met: 89 90 * Redistributions of source code must retain the above copyright notice, 91 this list of conditions and the following disclaimer. 92 93 * Redistributions in binary form must reproduce the above copyright 94 notice, this list of conditions and the following disclaimer in the 95 documentation and/or other materials provided with the distribution. 96 97 * Neither the name of Adobe Systems Incorporated nor the names of its 98 contributors may be used to endorse or promote products derived from 99 this software without specific prior written permission. 100 101 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 102 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 103 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 104 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 105 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
vendor: 3,028 bytes, lines 106-112
106 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 107 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 108 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 109 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 110 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 111 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 112*/}function Cp(e){var t,r,n,i,s,a=Math.floor,o=new Array(64),l=new Array(64),c=new Array(64),u=new Array(64),h=new Array(65535),d=new Array(65535),f=new Array(64),p=new Array(64),m=[],g=0,b=7,v=new Array(64),w=new Array(64),y=new Array(64),_=new Array(256),x=new Array(2048),k=[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],N=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S=[0,1,2,3,4,5,6,7,8,9,10,11],A=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],L=[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],P=[0,1,2,3,4,5,6,7,8,9,10,11],E=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],I=[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 T(e,t){for(var r=0,n=0,i=new Array,s=1;s<=16;s++){for(var a=1;a<=e[s];a++)i[t[n]]=[],i[t[n]][0]=r,i[t[n]][1]=s,n++,r++;r*=2}return i}function O(e){for(var t=e[0],r=e[1]-1;r>=0;)t&1<<r&&(g|=1<<b),r--,--b<0&&(255==g?(C(255),C(0)):C(g),b=7,g=0)}function C(e){m.push(e)}function R(e){C(e>>8&255),C(255&e)}function F(e,t,r,n,i){for(var s,a=i[0],o=i[240],l=function(e,t){var r,n,i,s,a,o,l,c,u,h,d=0;for(u=0;u<8;++u){r=e[d],n=e[d+1],i=e[d+2],s=e[d+3],a=e[d+4],o=e[d+5],l=e[d+6];var p=r+(c=e[d+7]),m=r-c,g=n+l,b=n-l,v=i+o,w=i-o,y=s+a,_=s-a,x=p+y,k=p-y,N=g+v,S=g-v;e[d]=x+N,e[d+4]=x-N;var A=.707106781*(S+k);e[d+2]=k+A,e[d+6]=k-A;var L=.382683433*((x=_+w)-(S=b+m)),j=.5411961*x+L,P=1.306562965*S+L,E=.707106781*(N=w+b),I=m+E,T=m-E;e[d+5]=T+j,e[d+3]=T-j,e[d+1]=I+P,e[d+7]=I-P,d+=8}
vendor: 7,568 bytes, lines 112-119
112for(d=0,u=0;u<8;++u){r=e[d],n=e[d+8],i=e[d+16],s=e[d+24],a=e[d+32],o=e[d+40],l=e[d+48];var O=r+(c=e[d+56]),C=r-c,R=n+l,F=n-l,B=i+o,D=i-o,M=s+a,U=s-a,q=O+M,z=O-M,$=R+B,W=R-B;e[d]=q+$,e[d+32]=q-$;var H=.707106781*(W+z);e[d+16]=z+H,e[d+48]=z-H;var V=.382683433*((q=U+D)-(W=F+C)),G=.5411961*q+V,K=1.306562965*W+V,J=.707106781*($=D+F),Y=C+J,Z=C-J;e[d+40]=Z+G,e[d+24]=Z-G,e[d+8]=Y+K,e[d+56]=Y-K,d++}for(u=0;u<64;++u)h=e[u]*t[u],f[u]=h>0?h+.5|0:h-.5|0;return f}(e,t),c=0;c<64;++c)p[k[c]]=l[c];var u=p[0]-r;r=p[0],0==u?O(n[0]):(O(n[d[s=32767+u]]),O(h[s]));for(var m=63;m>0&&0==p[m];)m--;if(0==m)return O(a),r;for(var g,b=1;b<=m;){for(var v=b;0==p[b]&&b<=m;)++b;var w=b-v;if(w>=16){g=w>>4;for(var y=1;y<=g;++y)O(o);w&=15}s=32767+p[b],O(i[(w<<4)+d[s]]),O(h[s]),b++}return 63!=m&&O(a),r}function B(e){e=Math.min(Math.max(e,1),100),s!=e&&(function(e){for(var t=[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],r=0;r<64;r++){var n=a((t[r]*e+50)/100);n=Math.min(Math.max(n,1),255),o[k[r]]=n}for(var i=[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],s=0;s<64;s++){var h=a((i[s]*e+50)/100);h=Math.min(Math.max(h,1),255),l[k[s]]=h}for(var d=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],f=0,p=0;p<8;p++)for(var m=0;m<8;m++)c[f]=1/(o[k[f]]*d[p]*d[m]*8),u[f]=1/(l[k[f]]*d[p]*d[m]*8),f++}(e<50?Math.floor(5e3/e):Math.floor(200-2*e)),s=e)}this.encode=function(e,s){var a,h;s&&B(s),m=new Array,g=0,b=7,R(65496),R(65504),R(16),C(74),C(70),C(73),C(70),C(0),C(1),C(1),C(0),R(1),R(1),C(0),C(0),function(){R(65499),R(132),C(0);for(var e=0;e<64;e++)C(o[e]);C(1);for(var t=0;t<64;t++)C(l[t])}(),a=e.width,h=e.height,R(65472),R(17),C(8),R(h),R(a),C(3),C(1),C(17),C(0),C(2),C(17),C(1),C(3),C(17),C(1),function(){R(65476),R(418),C(0);for(var e=0;e<16;e++)C(N[e+1]);for(var t=0;t<=11;t++)C(S[t]);C(16);for(var r=0;r<16;r++)C(A[r+1]);for(var n=0;n<=161;n++)C(L[n]);C(1);for(var i=0;i<16;i++)C(j[i+1]);for(var s=0;s<=11;s++)C(P[s]);C(17);for(var a=0;a<16;a++)C(E[a+1]);for(var o=0;o<=161;o++)C(I[o])}(),R(65498),R(12),C(3),C(1),C(0),C(2),C(17),C(3),C(17),C(0),C(63),C(0);var d=0,f=0,p=0;g=0,b=7,this.encode.displayName="_encode_";for(var _,k,T,D,M,U,q,z,$,W=e.data,H=e.width,V=e.height,G=4*H,K=0;K<V;){for(_=0;_<G;){for(M=G*K+_,q=-1,z=0,$=0;$<64;$++)U=M+(z=$>>3)*G+(q=4*(7&$)),K+z>=V&&(U-=G*(K+1+z-V)),_+q>=G&&(U-=_+q-G+4),k=W[U++],T=W[U++],D=W[U++],v[$]=(x[k]+x[T+256|0]+x[D+512|0]>>16)-128,w[$]=(x[k+768|0]+x[T+1024|0]+x[D+1280|0]>>16)-128,y[$]=(x[k+1280|0]+x[T+1536|0]+x[D+1792|0]>>16)-128;d=F(v,c,d,t,n),f=F(w,u,f,r,i),p=F(y,u,p,r,i),_+=32}K+=8}if(b>=0){var J=[];J[1]=b+1,J[0]=(1<<b+1)-1,O(J)}return R(65497),new Uint8Array(m)},e=e||50,function(){for(var e=String.fromCharCode,t=0;t<256;t++)_[t]=e(t)}(),t=T(N,S),r=T(j,P),n=T(A,L),i=T(E,I),function(){for(var e=1,t=2,r=1;r<=15;r++){for(var n=e;n<t;n++)d[32767+n]=r,h[32767+n]=[],h[32767+n][1]=r,h[32767+n][0]=n;for(var i=-(t-1);i<=-e;i++)d[32767+i]=r,h[32767+i]=[],h[32767+i][1]=r,h[32767+i][0]=t-1+i;e<<=1,t<<=1}}(),function(){for(var e=0;e<256;e++)x[e]=19595*e,x[e+256|0]=38470*e,x[e+512|0]=7471*e+32768,x[e+768|0]=-11059*e,x[e+1024|0]=-21709*e,x[e+1280|0]=32768*e+8421375,x[e+1536|0]=-27439*e,x[e+1792|0]=-5329*e}(),B(e)} 113/** 114 * @license 115 * Copyright (c) 2017 Aras Abbasi 116 * 117 * Licensed under the MIT License. 118 * http://opensource.org/licenses/mit-license 119 */function Rp(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Fp(e){function t(e){if(!e)throw Error("assert :P")}function r(e,t,r){for(var n=0;4>n;n++)if(e[t+n]!=r.charCodeAt(n))return!0;return!1}function n(e,t,r,n,i){for(var s=0;s<i;s++)e[t+s]=r[n+s]}function i(e,t,r,n){for(var i=0;i<n;i++)e[t+i]=r}function s(e){return new Int32Array(e)}function a(e,t){for(var r=[],n=0;n<e;n++)r.push(new t);return r}function o(e,t){var r=[];return function e(r,n,i){for(var s=i[n],a=0;a<s&&(r.push(i.length>n+1?[]:new t),!(i.length<n+1));a++)e(r[a],n+1,i)}(r,0,e),r}var l=function(){var e=this;function l(e,t){for(var r=1<<t-1>>>0;e&r;)r>>>=1;return r?(e&r-1)+r:e}function c(e,r,n,i,s){t(!(i%n));do{e[r+(i-=n)]=s}while(0<i)}function u(e,r,n,i,a){if(t(2328>=a),512>=a)var o=s(512);else if(null==(o=s(a)))return 0;return function(e,r,n,i,a,o){var u,d,f=r,p=1<<n,m=s(16),g=s(16);for(t(0!=a),t(null!=i),t(null!=e),t(0<n),d=0;d<a;++d){if(15<i[d])return 0;++m[i[d]]}if(m[0]==a)return 0;for(g[1]=0,u=1;15>u;++u){if(m[u]>1<<u)return 0;g[u+1]=g[u]+m[u]}for(d=0;d<a;++d)u=i[d],0<i[d]&&(o[g[u]++]=d);if(1==g[15])return(i=new h).g=0,i.value=o[0],c(e,f,1,p,i),p;var b,v=-1,w=p-1,y=0,_=1,x=1,k=1<<n;for(d=0,u=1,a=2;u<=n;++u,a<<=1){if(_+=x<<=1,0>(x-=m[u]))return 0;for(;0<m[u];--m[u])(i=new h).g=u,i.value=o[d++],c(e,f+y,a,k,i),y=l(y,u)}for(u=n+1,a=2;15>=u;++u,a<<=1){if(_+=x<<=1,0>(x-=m[u]))return 0;for(;0<m[u];--m[u]){if(i=new h,(y&w)!=v){for(f+=k,b=1<<(v=u)-n;15>v&&!(0>=(b-=m[v]));)++v,b<<=1;p+=k=1<<(b=v-n),e[r+(v=y&w)].g=b+n,e[r+v].value=f-r-v}i.g=u-n,i.value=o[d++],c(e,f+(y>>n),a,k,i),y=l(y,u)}}return _!=2*g[15]-1?0:p}(e,r,n,i,a,o)}function h(){this.value=this.g=0}function d(){this.value=this.g=0}function f(){this.G=a(5,h),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=a(Br,d)}function p(e,r,n,i){t(null!=e),t(null!=r),t(2147483648>i),e.Ca=254,e.I=0,e.b=-8,e.Ka=0,e.oa=r,e.pa=n,e.Jd=r,e.Yc=n+i,e.Zc=4<=i?n+i-4+1:n,A(e)}function m(e,t){for(var r=0;0<t--;)r|=j(e,128)<<t;return r}function g(e,t){var r=m(e,t);return L(e)?-r:r}function b(e,r,n,i){var s,a=0;for(t(null!=e),t(null!=r),t(4294967288>i),e.Sb=i,e.Ra=0,e.u=0,e.h=0,4<i&&(i=4),s=0;s<i;++s)a+=r[n+s]<<8*s;e.Ra=a,e.bb=i,e.oa=r,e.pa=n}function v(e){for(;8<=e.u&&e.bb<e.Sb;)e.Ra>>>=8,e.Ra+=e.oa[e.pa+e.bb]<<Ur-8>>>0,++e.bb,e.u-=8;k(e)&&(e.h=1,e.u=0)}function w(e,r){if(t(0<=r),!e.h&&r<=Mr){var n=x(e)&Dr[r];return e.u+=r,v(e),n}return e.h=1,e.u=0}function y(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function _(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function x(e){return e.Ra>>>(e.u&Ur-1)>>>0}function k(e){return t(e.bb<=e.Sb),e.h||e.bb==e.Sb&&e.u>Ur}function N(e,t){e.u=t,e.h=k(e)}function S(e){e.u>=qr&&(t(e.u>=qr),v(e))}function A(e){t(null!=e&&null!=e.oa),e.pa<e.Zc?(e.I=(e.oa[e.pa++]|e.I<<8)>>>0,e.b+=8):(t(null!=e&&null!=e.oa),e.pa<e.Yc?(e.b+=8,e.I=e.oa[e.pa++]|e.I<<8):e.Ka?e.b=0:(e.I<<=8,e.b+=8,e.Ka=1))}function L(e){return m(e,1)}function j(e,t){var r=e.Ca;0>e.b&&A(e);var n=e.b,i=r*t>>>8,s=(e.I>>>n>i)+0;for(s?(r-=i,e.I-=i+1<<n>>>0):r=i+1,n=r,i=0;256<=n;)i+=8,n>>=8;return n=7^i+zr[n],e.b-=n,e.Ca=(r<<n)-1,s}function P(e,t,r){e[t+0]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function E(e,t){return e[t+0]|e[t+1]<<8}function I(e,t){return E(e,t)|e[t+2]<<16}function T(e,t){return E(e,t)|E(e,t+2)<<16}function O(e,r){var n=1<<r;return t(null!=e),t(0<r),e.X=s(n),null==e.X?0:(e.Mb=32-r,e.Xa=r,1)}function C(e,r){t(null!=e),t(null!=r),t(e.Xa==r.Xa),n(r.X,0,e.X,0,1<<r.Xa)}function R(){this.X=[],this.Xa=this.Mb=0}function F(e,r,n,i){t(null!=n),t(null!=i);var s=n[0],a=i[0];return 0==s&&(s=(e*a+r/2)/r),0==a&&(a=(r*s+e/2)/e),0>=s||0>
vendor: 11,029 bytes, line 119
119=a?0:(n[0]=s,i[0]=a,1)}function B(e,t){return e+(1<<t)-1>>>t}function D(e,t){return((4278255360&e)+(4278255360&t)>>>0&4278255360)+((16711935&e)+(16711935&t)>>>0&16711935)>>>0}function M(t,r){e[r]=function(r,n,i,s,a,o,l){var c;for(c=0;c<a;++c){var u=e[t](o[l+c-1],i,s+c);o[l+c]=D(r[n+c],u)}}}function U(){this.ud=this.hd=this.jd=0}function q(e,t){return((4278124286&(e^t))>>>1)+(e&t)>>>0}function z(e){return 0<=e&&256>e?e:0>e?0:255<e?255:void 0}function $(e,t){return z(e+(e-t+.5>>1))}function W(e,t,r){return Math.abs(t-r)-Math.abs(e-r)}function H(e,t,r,n,i,s,a){for(n=s[a-1],r=0;r<i;++r)s[a+r]=n=D(e[t+r],n)}function V(e,t,r,n,i){var s;for(s=0;s<r;++s){var a=e[t+s],o=a>>8&255,l=16711935&(l=(l=16711935&a)+((o<<16)+o));n[i+s]=(4278255360&a)+l>>>0}}function G(e,t){t.jd=255&e,t.hd=e>>8&255,t.ud=e>>16&255}function K(e,t,r,n,i,s){var a;for(a=0;a<n;++a){var o=t[r+a],l=o>>>8,c=o,u=255&(u=(u=o>>>16)+((e.jd<<24>>24)*(l<<24>>24)>>>5));c=255&(c=(c+=(e.hd<<24>>24)*(l<<24>>24)>>>5)+((e.ud<<24>>24)*(u<<24>>24)>>>5)),i[s+a]=(4278255360&o)+(u<<16)+c}}function J(t,r,n,i,s){e[r]=function(e,t,r,n,a,o,l,c,u){for(n=l;n<c;++n)for(l=0;l<u;++l)a[o++]=s(r[i(e[t++])])},e[t]=function(t,r,a,o,l,c,u){var h=8>>t.b,d=t.Ea,f=t.K[0],p=t.w;if(8>h)for(t=(1<<t.b)-1,p=(1<<h)-1;r<a;++r){var m,g=0;for(m=0;m<d;++m)m&t||(g=i(o[l++])),c[u++]=s(f[g&p]),g>>=h}else e["VP8LMapColor"+n](o,l,f,p,c,u,r,a,d)}}function Y(e,t,r,n,i){for(r=t+r;t<r;){var s=e[t++];n[i++]=s>>16&255,n[i++]=s>>8&255,n[i++]=255&s}}function Z(e,t,r,n,i){for(r=t+r;t<r;){var s=e[t++];n[i++]=s>>16&255,n[i++]=s>>8&255,n[i++]=255&s,n[i++]=s>>24&255}}function X(e,t,r,n,i){for(r=t+r;t<r;){var s=(a=e[t++])>>16&240|a>>12&15,a=240&a|a>>28&15;n[i++]=s,n[i++]=a}}function Q(e,t,r,n,i){for(r=t+r;t<r;){var s=(a=e[t++])>>16&248|a>>13&7,a=a>>5&224|a>>3&31;n[i++]=s,n[i++]=a}}function ee(e,t,r,n,i){for(r=t+r;t<r;){var s=e[t++];n[i++]=255&s,n[i++]=s>>8&255,n[i++]=s>>16&255}}function te(e,t,r,i,s,a){if(0==a)for(r=t+r;t<r;)P(i,((a=e[t++])[0]>>24|a[1]>>8&65280|a[2]<<8&16711680|a[3]<<24)>>>0),s+=32;else n(i,s,e,t,r)}function re(t,r){e[r][0]=e[t+"0"],e[r][1]=e[t+"1"],e[r][2]=e[t+"2"],e[r][3]=e[t+"3"],e[r][4]=e[t+"4"],e[r][5]=e[t+"5"],e[r][6]=e[t+"6"],e[r][7]=e[t+"7"],e[r][8]=e[t+"8"],e[r][9]=e[t+"9"],e[r][10]=e[t+"10"],e[r][11]=e[t+"11"],e[r][12]=e[t+"12"],e[r][13]=e[t+"13"],e[r][14]=e[t+"0"],e[r][15]=e[t+"0"]}function ne(e){return e==zn||e==$n||e==Wn||e==Hn}function ie(){this.eb=[],this.size=this.A=this.fb=0}function se(){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 ae(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ie,this.f.kb=new se,this.sd=null}function oe(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function le(){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 ce(e){return alert("todo:WebPSamplerProcessPlane"),e.T}function ue(e,t){var r=e.T,i=t.ba.f.RGBA,s=i.eb,a=i.fb+e.ka*i.A,o=gi[t.ba.S],l=e.y,c=e.O,u=e.f,h=e.N,d=e.ea,f=e.W,p=t.cc,m=t.dc,g=t.Mc,b=t.Nc,v=e.ka,w=e.ka+e.T,y=e.U,_=y+1>>1;for(0==v?o(l,c,null,null,u,h,d,f,u,h,d,f,s,a,null,null,y):(o(t.ec,t.fc,l,c,p,m,g,b,u,h,d,f,s,a-i.A,s,a,y),++r);v+2<w;v+=2)p=u,m=h,g=d,b=f,h+=e.Rc,f+=e.Rc,a+=2*i.A,o(l,(c+=2*e.fa)-e.fa,l,c,p,m,g,b,u,h,d,f,s,a-i.A,s,a,y);return c+=e.fa,e.j+w<e.o?(n(t.ec,t.fc,l,c,y),n(t.cc,t.dc,u,h,_),n(t.Mc,t.Nc,d,f,_),r--):1&w||o(l,c,null,null,u,h,d,f,u,h,d,f,s,a+i.A,null,null,y),r}function he(e,r,n){var i=e.F,s=[e.J];if(null!=i){var a=e.U,o=r.ba.S,l=o==Mn||o==Wn;r=r.ba.f.RGBA;var c=[0],u=e.ka;c[0]=e.T,e.Kb&&(0==u?--c[0]:(--u,s[0]-=e.width),e.j+e.ka+e.T==e.o&&(c[0]=e.o-e.j-u));var h=r.eb;u=r.fb+u*r.A,e=Nn(i,s[0],e.width,a,c,h,u+(l?0:3),r.A),t(n==c),e&&ne(o)&&xn(h,u,l,a,c,r.A)}return 0}function de(e){var t=e.ma,r=t.ba.S,n=11>r,i=r==Fn||r==Dn||r==Mn||r==Un||12==r||ne(r);if(t.memory=null,t.Ib=null,t.Jb=null,t.Nd=null,!Cr(t.Oa,e,i?11:12))return 0;if(i&&ne(r)&&br(),e.da)alert("todo:use_scaling");else{if(n){if(t.Ib=ce,e.Kb){if(r=e.U+1>>1,t.memory=s(e.U+2*r),null==t.memory)return 0;t.ec=t.memory,t.fc=0,t.cc=t.ec,t.dc=t.fc+e.U,t.Mc=t.cc,t.Nc=t.dc+r,t.Ib=ue,br()}}else alert("todo:EmitYUV");i&&(t.Jb=he,n&&mr())}if(n&&!Ei){for(e=0;256>e;++e)Ii[e]=89858*(e-128)+Si>>Ni,Ci[e]=-22014*(e-128)+Si,Oi[e]=-45773*(e-128),Ti[e]=113618*(e-128)+Si>>Ni;for(e=Ai;e<Li;++e)t=76283*(e-16)+Si>>Ni,Ri[e-Ai]=He(t,255),Fi[e-Ai]=He(t+8>>4,15);Ei=1}return 1}function fe(e){var r=e.ma,n=e.U,i=e.T;return t(!(1&e.ka)),0>=n||0>=i?0:(n=r.Ib(e,r),null!=r.Jb&&r.Jb(e,r,n),r.Dc+=n,1)}function pe(e){e.ma.memory=null}function me(e,t,r,n){return 47!=w(e,8)?0:(t[0]=w(e,14)+1,r[0]=w(e,14)+1,n[0]=w(e,1),0!=w(e,3)?0:!e.h)}function ge(e,t){if(4>e)return e+1;var r=e-2>>1;return(2+(1&e)<<r)+w(t,r)+1}function be(e,t){return 120<t?t-120:1<=(r=((r=Zn[t-1])>>4)*e+(8-(15&r)))?r:1;var r}function ve(e,t,r){var n=x(r),i=e[t+=255&n].g-8;return 0<i&&(N(r,r.u+8),n=x(r),t+=e[t].value,t+=n&(1<<i)-1),N(r,r.u+e[t].g),e[t].value}function we(e,r,n){return n.g+=e.g,n.value+=e.value<<r>>>0,t(8>=n.g),e.g}function ye(e,r,n){var i=e.xc;return t((r=0==i?0:e.vc[e.md*(n>>i)+(r>>i)])<e.Wb),e.Ya[r]}function _e(e,r,i,s){var a=e.ab,o=e.c*r,l=e.C;r=l+r;var c=i,u=s;for(s=e.Ta,i=e.Ua;0<a--;){var h=e.gc[a],d=l,f=r,p=c,m=u,g=(u=s,c=i,h.Ea);switch(t(d<f),t(f<=h.nc),h.hc){case 2:Hr(p,m,(f-d)*g,u,c);break;case 0:var b=d,v=f,w=u,y=c,_=(A=h).Ea;0==b&&($r(p,m,null,null,1,w,y),H(p,m+1,0,0,_-1,w,y+1),m+=_,y+=_,++b);for(var x=1<<A.b,k=x-1,N=B(_,A.b),S=A.K,A=A.w+(b>>A.b)*N;b<v;){var L=S,j=A,P=1;for(Wr(p,m,w,y-_,1,w,y);P<_;){var E=(P&~k)+x;E>_&&(E=_),(0,Yr[L[j++]>>8&15])(p,m+ +P,w,y+P-_,E-P,w,y+P),P=E}m+=_,y+=_,++b&k||(A+=N)}f!=h.nc&&n(u,c-g,u,c+(f-d-1)*g,g);break;case 1:for(g=p,v=m,_=(p=h.Ea)-(y=p&~(w=(m=1<<h.b)-1)),b=B(p,h.b),x=h.K,h=h.w+(d>>h.b)*b;d<f;){for(k=x,N=h,S=new U,A=v+y,L=v+p;v<A;)G(k[N++],S),Zr(S,g,v,m,u,c),v+=m,c+=m;v<L&&(G(k[N++],S),Zr(S,g,v,_,u,c),v+=_,c+=_),++d&w||(h+=b)}break;case 3:if(p==u&&m==c&&0<h.b){for(v=u,p=g=c+(f-d)*g-(y=(f-d)*B(h.Ea,h.b)),m=u,w=c,b=[],y=(_=y)-1;0<=y;--y)b[y]=m[w+y];for(y=_-1;0<=y;--y)v[p+y]=b[y];Vr(h,d,f,u,g,u,c)}else Vr(h,d,f,p,m,u,c)}c=s,u=i}u!=i&&n(s,i,c,u,o)}function xe(e,r){var n=e.V,i=e.Ba+e.c*e.C,s=r-e.C;if(t(r<=e.l.o),t(16>=s),0<s){var a=e.l,o=e.Ta,l=e.Ua,c=a.width;if(_e(e,s,n,i),s=l=[l],t((n=e.C)<(i=r)),t(a.v<a.va),i>a.o&&(i=a.o),n<a.j){var u=a.j-n;n=a.j,s[0]+=u*c}if(n>=i?n=0:(s[0]+=4*a.v,a.ka=n-a.j,a.U=a.va-a.v,a.T=i-n,n=1),n){if(l=l[0],11>(n=e.ca).S){var h=n.f.RGBA,d=(i=n.S,s=a.U,a=a.T,u=h.eb,h.A),f=a;for(h=h.fb+e.Ma*h.A;0<f--;){var p=o,m=l,g=s,b=u,v=h;switch(i){case Rn:Xr(p,m,g,b,v);break;case Fn:Qr(p,m,g,b,v);break;case zn:Qr(p,m,g,b,v),xn(b,v,0,g,1,0);break;case Bn:rn(p,m,g,b,v);break;case Dn:te(p,m,g,b,v,1);break;case $n:te(p,m,g,b,v,1),xn(b,v,0,g,1,0);break;case Mn:te(p,m,g,b,v,0);break;case Wn:te(p,m,g,b,v,0),xn(b,v,1,g,1,0);break;case Un:en(p,m,g,b,v);break;case Hn:en(p,m,g,b,v),kn(b,v,g,1,0);break;case qn:tn(p,m,g,b,v);break;default:t(0)}l+=c,h+=d}e.Ma+=a}else alert("todo:EmitRescaledRowsYUVA");t(e.Ma<=n.height)}}e.C=r,t(e.C<=e.i)}function ke(e){var t;if(0<e.ua)return 0;for(t=0;t<e.Wb;++t){var r=e.Ya[t].G,n=e.Ya[t].H;if(0<r[1][n[1]+0].g||0<r[2][n[2]+0].g||0<r[3][n[3]+0].g)return 0}return 1}function Ne(e,r,n,i,s,a){if(0!=e.Z){var o=e.qd,l=e.rd;for(t(null!=mi[e.Z]);r<n;++r)mi[e.Z](o,l,i,s,i,s,a),o=i,l=s,s+=a;e.qd=o,e.rd=l}}function Se(e,r){var n=e.l.ma,i=0==n.Z||1==n.Z?e.l.j:e.C;if(i=e.C<i?i:e.C,t(r<=e.l.o),r>i){var s=e.l.width,a=n.ca,o=n.tb+s*i,l=e.V,c=e.Ba+e.c*i,u=e.gc;t(1==e.ab),t(3==u[0].hc),Kr(u[0],i,r,l,c,a,o),Ne(n,i,r,a,o,s)}e.C=e.Ma=r}function Ae(e,r,n,i,s,a,o){var l=e.$/i,c=e.$%i,u=e.m,h=e.s,d=n+e.$,f=d;s=n+i*s;var p=n+i*a,m=280+h.ua,g=e.Pb?l:16777216,b=0<h.ua?h.Wa:null,v=h.wc,w=d<p?ye(h,c,l):null;t(e.C<a),t(p<=s);var y=!1;e:for(;;){for(;y||d<p;){var _=0;if(l>=g){var A=d-n;t((g=e).Pb),g.wd=g.m,g.xd=A,0<g.s.ua&&C(g.s.Wa,g.s.vb),g=l+Qn}if(c&v||(w=ye(h,c,l)),t(null!=w),w.Qb&&(r[d]=w.qb,y=!0),!y)if(S(u),w.jc){_=u,A=r;var L=d,j=w.pd[x(_)&Br-1];t(w.jc),256>j.g?(N(_,_.u+j.g),A[L]=j.value,_=0):(N(_,_.u+j.g-256),t(256<=j.value),_=j.value),0==_&&(y=!0)}else _=ve(w.G[0],w.H[0],u);if(u.h)break;if(y||256>_){if(!y)if(w.nd)r[d]=(w.qb|_<<8)>>>0;else{if(S(u),y=ve(w.G[1],w.H[1],u),S(u),A=ve(w.G[2],w.H[2],u),L=ve(w.G[3],w.H[3],u),u.h)break;r[d]=(L<<24|y<<16|_<<8|A)>>>0}if(y=!1,++d,++c>=i&&(c=0,++l,null!=o&&l<=a&&!(l%16)&&o(e,l),null!=b))for(;f<d;)_=r[f++],b.X[(506832829*_&4294967295)>>>b.Mb]=_}else if(280>_){if(_=ge(_-256,u),A=ve(w.G[4],w.H[4],u),S(u),A=be(i,A=ge(A,u)),u.h)break;if(d-n<A||s-d<_)break e;for(L=0;L<_;++L)r[d+L]=r[d+L-A];for(d+=_,c+=_;c>=i;)c-=i,++l,null!=o&&l<=a&&!(l%16)&&o(e,l);if(t(d<=s),c&v&&(w=ye(h,c,l)),null!=b)for(;f<d;)_=r[f++],b.X[(506832829*_&4294967295)>>>b.Mb]=_}else{if(!(_<m))break e;for(y=_-280,t(null!=b);f<d;)_=r[f++],b.X[(506832829*_&4294967295)>>>b.Mb]=_;_=d,t(!(y>>>(A=b).Xa)),r[_]=A.X[y],y=!0}y||t(u.h==k(u))}if(e.Pb&&u.h&&d<s)t(e.m.h),e.a=5,e.m=e.wd,e.$=e.xd,0<e.s.ua&&C(e.s.vb,e.s.Wa);else{if(u.h)break e;null!=o&&o(e,l>a?a:l),e.a=0,e.$=d-n}return 1}return e.a=3,0}function Le(e){t(null!=e),e.vc=null,e.yc=null,e.Ya=null;var r=e.Wa;null!=r&&(r.X=null),e.vb=null,t(null!=e)}function je(){var t=new sr;return null==t?null:(t.a=0,t.xb=pi,re("Predictor","VP8LPredictors"),re("Predictor","VP8LPredictors_C"),re("PredictorAdd","VP8LPredictorsAdd"),re("PredictorAdd","VP8LPredictorsAdd_C"),Hr=V,Zr=K,Xr=Y,Qr=Z,en=X,tn=Q,rn=ee,e.VP8LMapColor32b=Gr,e.VP8LMapColor8b=Jr,t)}function Pe(e,r,n,o,l){var c=1,d=[e],p=[r],m=o.m,g=o.s,b=null,v=0;e:for(;;){if(n)for(;c&&w(m,1);){var y=d,_=p,k=o,A=1,L=k.m,j=k.gc[k.ab],P=w(L,2);if(k.Oc&1<<P)c=0;else{switch(k.Oc|=1<<P,j.hc=P,j.Ea=y[0],j.nc=_[0],j.K=[null],++k.ab,t(4>=k.ab),P){case 0:case 1:j.b=w(L,3)+2,A=Pe(B(j.Ea,j.b),B(j.nc,j.b),0,k,j.K),j.K=j.K[0];break;case 3:var E,I=w(L,8)+1,T=16<I?0:4<I?1:2<I?2:3;if(y[0]=B(j.Ea,T),j.b=T,E=A=Pe(I,1,0,k,j.K)){var C,R=I,F=j,M=1<<(8>>F.b),U=s(M);if(null==U)E=0;else{var q=F.K[0],z=F.w;for(U[0]=F.K[0][0],C=1;C<1*R;++C)U[C]=D(q[z+C],U[C-1]);for(;C<4*M;++C)U[C]=0;F.K[0]=null,F.K[0]=U,E=1}}A=E;break;case 2:break;default:t(0)}c=A}}if(d=d[0],p=p[0],c&&w(m,1)&&!(c=1<=(v=w(m,4))&&11>=v)){o.a=3;break e}var $;if($=c)t:{var W,H,V,G=o,K=d,J=p,Y=v,Z=n,X=G.m,Q=G.s,ee=[null],te=1,re=0,ne=Xn[Y];r:for(;;){if(Z&&w(X,1)){var ie=w(X,3)+2,se=B(K,ie),ae=B(J,ie),oe=se*ae;if(!Pe(se,ae,0,G,ee))break r;for(ee=ee[0],Q.xc=ie,W=0;W<oe;++W){var le=ee[W]>>8&65535;ee[W]=le,le>=te&&(te=le+1)}}if(X.h)break r;for(H=0;5>H;++H){var ce=Kn[H];!H&&0<Y&&(ce+=1<<Y),re<ce&&(re=ce)}var ue=a(te*ne,h),he=te,de=a(he,f);if(null==de)var fe=null;else t(65536>=he),fe=de;var pe=s(re);if(null==fe||null==pe||null==ue){G.a=1;break r}var me=ue;for(W=V=0;W<te;++W){var ge=fe[W],be=ge.G,ve=ge.H,ye=0,_e=1,xe=0;for(H=0;5>H;++H){ce=Kn[H],be[H]=me,ve[H]=V,!H&&0<Y&&(ce+=1<<Y);n:{var ke,Ne=ce,Se=G,je=pe,Ee=me,Ie=V,Te=0,Oe=Se.m,Ce=w(Oe,1);if(i(je,0,0,Ne),Ce){var Re=w(Oe,1)+1,Fe=w(Oe,1),Be=w(Oe,0==Fe?1:8);je[Be]=1,2==Re&&(je[Be=w(Oe,8)]=1);var De=1}else{var Me=s(19),Ue=w(Oe,4)+4;
vendor: 4,145 bytes, line 119
119if(19<Ue){Se.a=3;var qe=0;break n}for(ke=0;ke<Ue;++ke)Me[Yn[ke]]=w(Oe,3);var ze=void 0,$e=void 0,We=Se,He=Me,Ve=Ne,Ge=je,Ke=0,Je=We.m,Ye=8,Ze=a(128,h);i:for(;u(Ze,0,7,He,19);){if(w(Je,1)){var Xe=2+2*w(Je,3);if((ze=2+w(Je,Xe))>Ve)break i}else ze=Ve;for($e=0;$e<Ve&&ze--;){S(Je);var Qe=Ze[0+(127&x(Je))];N(Je,Je.u+Qe.g);var et=Qe.value;if(16>et)Ge[$e++]=et,0!=et&&(Ye=et);else{var tt=16==et,rt=et-16,nt=Gn[rt],it=w(Je,Vn[rt])+nt;if($e+it>Ve)break i;for(var st=tt?Ye:0;0<it--;)Ge[$e++]=st}}Ke=1;break i}Ke||(We.a=3),De=Ke}(De=De&&!Oe.h)&&(Te=u(Ee,Ie,8,je,Ne)),De&&0!=Te?qe=Te:(Se.a=3,qe=0)}if(0==qe)break r;if(_e&&1==Jn[H]&&(_e=0==me[V].g),ye+=me[V].g,V+=qe,3>=H){var at,ot=pe[0];for(at=1;at<ce;++at)pe[at]>ot&&(ot=pe[at]);xe+=ot}}if(ge.nd=_e,ge.Qb=0,_e&&(ge.qb=(be[3][ve[3]+0].value<<24|be[1][ve[1]+0].value<<16|be[2][ve[2]+0].value)>>>0,0==ye&&256>be[0][ve[0]+0].value&&(ge.Qb=1,ge.qb+=be[0][ve[0]+0].value<<8)),ge.jc=!ge.Qb&&6>xe,ge.jc){var lt,ct=ge;for(lt=0;lt<Br;++lt){var ut=lt,ht=ct.pd[ut],dt=ct.G[0][ct.H[0]+ut];256<=dt.value?(ht.g=dt.g+256,ht.value=dt.value):(ht.g=0,ht.value=0,ut>>=we(dt,8,ht),ut>>=we(ct.G[1][ct.H[1]+ut],16,ht),ut>>=we(ct.G[2][ct.H[2]+ut],0,ht),we(ct.G[3][ct.H[3]+ut],24,ht))}}}Q.vc=ee,Q.Wb=te,Q.Ya=fe,Q.yc=ue,$=1;break t}$=0}if(!(c=$)){o.a=3;break e}if(0<v){if(g.ua=1<<v,!O(g.Wa,v)){o.a=1,c=0;break e}}else g.ua=0;var ft=o,pt=d,mt=p,gt=ft.s,bt=gt.xc;if(ft.c=pt,ft.i=mt,gt.md=B(pt,bt),gt.wc=0==bt?-1:(1<<bt)-1,n){o.xb=fi;break e}if(null==(b=s(d*p))){o.a=1,c=0;break e}c=(c=Ae(o,b,0,d,p,p,null))&&!m.h;break e}return c?(null!=l?l[0]=b:(t(null==b),t(n)),o.$=0,n||Le(g)):Le(g),c}function Ee(e,r){var n=e.c*e.i,i=n+r+16*r;return t(e.c<=r),e.V=s(i),null==e.V?(e.Ta=null,e.Ua=0,e.a=1,0):(e.Ta=e.V,e.Ua=e.Ba+n+r,1)}function Ie(e,r){var n=e.C,i=r-n,s=e.V,a=e.Ba+e.c*n;for(t(r<=e.l.o);0<i;){var o=16<i?16:i,l=e.l.ma,c=e.l.width,u=c*o,h=l.ca,d=l.tb+c*n,f=e.Ta,p=e.Ua;_e(e,o,s,a),Sn(f,p,h,d,u),Ne(l,n,n+o,h,d,c),i-=o,s+=o*e.c,n+=o}t(n==r),e.C=e.Ma=r}function Te(){this.ub=this.yd=this.td=this.Rb=0}function Oe(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ce(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function Re(){var e;this.Yb=(function e(t,r,n){for(var i=n[r],s=0;s<i&&(t.push(n.length>r+1?[]:0),!(n.length<r+1));s++)e(t[s],r+1,n)}(e=[],0,[3,11]),e)}function Fe(){this.jb=s(3),this.Wc=o([4,8],Re),this.Xc=o([4,17],Re)}function Be(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function De(){this.ld=this.La=this.dd=this.tc=0}function Me(){this.Na=this.la=0}function Ue(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function qe(){this.ad=s(384),this.Za=0,this.Ob=s(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ze(){this.uc=this.M=this.Nb=0,this.wa=Array(new De),this.Y=0,this.ya=Array(new qe),this.aa=0,this.l=new Ve}function $e(){this.y=s(16),this.f=s(8),this.ea=s(8)}function We(){this.cb=this.a=0,this.sc="",this.m=new y,this.Od=new Te,this.Kc=new Oe,this.ed=new Be,this.Qa=new Ce,this.Ic=this.$c=this.Aa=0,this.D=new ze,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=a(8,y),this.ia=0,this.pb=a(4,Ue),this.Pa=new Fe,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new $e),this.Hd=0,this.rb=Array(new Me),this.sb=0,this.wa=Array(new De),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 qe),this.L=this.aa=0,this.gd=o([4,2],De),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 He(e,t){return 0>e?0:e>t?t:e}function Ve(){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 Ge(){var e=new We;return null!=e&&(e.a=0,e.sc="OK",e.cb=0,e.Xb=0,ri||(ri=Ze)),e}function Ke(e,t,r){return 0==e.a&&(e.a=t,e.sc=r,e.cb=0),0}
vendor: 24,813 bytes, line 119
119function Je(e,t,r){return 3<=r&&157==e[t+0]&&1==e[t+1]&&42==e[t+2]}function Ye(e,r){if(null==e)return 0;if(e.a=0,e.sc="OK",null==r)return Ke(e,2,"null VP8Io passed to VP8GetHeaders()");var n=r.data,s=r.w,a=r.ha;if(4>a)return Ke(e,7,"Truncated header.");var o=n[s+0]|n[s+1]<<8|n[s+2]<<16,l=e.Od;if(l.Rb=!(1&o),l.td=o>>1&7,l.yd=o>>4&1,l.ub=o>>5,3<l.td)return Ke(e,3,"Incorrect keyframe parameters.");if(!l.yd)return Ke(e,4,"Frame not displayable.");s+=3,a-=3;var c=e.Kc;if(l.Rb){if(7>a)return Ke(e,7,"cannot parse picture header");if(!Je(n,s,a))return Ke(e,3,"Bad code word");c.c=16383&(n[s+4]<<8|n[s+3]),c.Td=n[s+4]>>6,c.i=16383&(n[s+6]<<8|n[s+5]),c.Ud=n[s+6]>>6,s+=7,a-=7,e.za=c.c+15>>4,e.Ub=c.i+15>>4,r.width=c.c,r.height=c.i,r.Da=0,r.j=0,r.v=0,r.va=r.width,r.o=r.height,r.da=0,r.ib=r.width,r.hb=r.height,r.U=r.width,r.T=r.height,i((o=e.Pa).jb,0,255,o.jb.length),t(null!=(o=e.Qa)),o.Cb=0,o.Bb=0,o.Fb=1,i(o.Zb,0,0,o.Zb.length),i(o.Lb,0,0,o.Lb)}if(l.ub>a)return Ke(e,7,"bad partition length");p(o=e.m,n,s,l.ub),s+=l.ub,a-=l.ub,l.Rb&&(c.Ld=L(o),c.Kd=L(o)),c=e.Qa;var u,h=e.Pa;if(t(null!=o),t(null!=c),c.Cb=L(o),c.Cb){if(c.Bb=L(o),L(o)){for(c.Fb=L(o),u=0;4>u;++u)c.Zb[u]=L(o)?g(o,7):0;for(u=0;4>u;++u)c.Lb[u]=L(o)?g(o,6):0}if(c.Bb)for(u=0;3>u;++u)h.jb[u]=L(o)?m(o,8):255}else c.Bb=0;if(o.Ka)return Ke(e,3,"cannot parse segment header");if((c=e.ed).zd=L(o),c.Tb=m(o,6),c.wb=m(o,3),c.Pc=L(o),c.Pc&&L(o)){for(h=0;4>h;++h)L(o)&&(c.vd[h]=g(o,6));for(h=0;4>h;++h)L(o)&&(c.od[h]=g(o,6))}if(e.L=0==c.Tb?0:c.zd?1:2,o.Ka)return Ke(e,3,"cannot parse filter header");var d=a;if(a=u=s,s=u+d,c=d,e.Xb=(1<<m(e.m,2))-1,d<3*(h=e.Xb))n=7;else{for(u+=3*h,c-=3*h,d=0;d<h;++d){var f=n[a+0]|n[a+1]<<8|n[a+2]<<16;f>c&&(f=c),p(e.Jc[+d],n,u,f),u+=f,c-=f,a+=3}p(e.Jc[+h],n,u,c),n=u<s?0:5}if(0!=n)return Ke(e,n,"cannot parse partitions");for(n=m(u=e.m,7),a=L(u)?g(u,4):0,s=L(u)?g(u,4):0,c=L(u)?g(u,4):0,h=L(u)?g(u,4):0,u=L(u)?g(u,4):0,d=e.Qa,f=0;4>f;++f){if(d.Cb){var b=d.Zb[f];d.Fb||(b+=n)}else{if(0<f){e.pb[f]=e.pb[0];continue}b=n}var v=e.pb[f];v.Sc[0]=ei[He(b+a,127)],v.Sc[1]=ti[He(b+0,127)],v.Eb[0]=2*ei[He(b+s,127)],v.Eb[1]=101581*ti[He(b+c,127)]>>16,8>v.Eb[1]&&(v.Eb[1]=8),v.Qc[0]=ei[He(b+h,117)],v.Qc[1]=ti[He(b+u,127)],v.lc=b+u}if(!l.Rb)return Ke(e,4,"Not a key frame.");for(L(o),l=e.Pa,n=0;4>n;++n){for(a=0;8>a;++a)for(s=0;3>s;++s)for(c=0;11>c;++c)h=j(o,li[n][a][s][c])?m(o,8):ai[n][a][s][c],l.Wc[n][a].Yb[s][c]=h;for(a=0;17>a;++a)l.Xc[n][a]=l.Wc[n][ci[a]]}return e.kc=L(o),e.kc&&(e.Bd=m(o,8)),e.cb=1}function Ze(e,t,r,n,i,s,a){var o=t[i].Yb[r];for(r=0;16>i;++i){if(!j(e,o[r+0]))return i;for(;!j(e,o[r+1]);)if(o=t[++i].Yb[0],r=0,16==i)return 16;var l=t[i+1].Yb;if(j(e,o[r+2])){var c=e,u=0;if(j(c,(d=o)[(h=r)+3]))if(j(c,d[h+6])){for(o=0,h=2*(u=j(c,d[h+8]))+(d=j(c,d[h+9+u])),u=0,d=ni[h];d[o];++o)u+=u+j(c,d[o]);u+=3+(8<<h)}else j(c,d[h+7])?(u=7+2*j(c,165),u+=j(c,145)):u=5+j(c,159);else u=j(c,d[h+4])?3+j(c,d[h+5]):2;o=l[2]}else u=1,o=l[1];l=a+ii[i],0>(c=e).b&&A(c);var h,d=c.b,f=(h=c.Ca>>1)-(c.I>>d)>>31;--c.b,c.Ca+=f,c.Ca|=1,c.I-=(h+1&f)<<d,s[l]=((u^f)-f)*n[(0<i)+0]}return 16}function Xe(e){var t=e.rb[e.sb-1];t.la=0,t.Na=0,i(e.zc,0,0,e.zc.length),e.ja=0}function Qe(e,t,r,n,i){i=e[t+r+32*n]+(i>>3),e[t+r+32*n]=-256&i?0>i?0:255:i}function et(e,t,r,n,i,s){Qe(e,t,0,r,n+i),Qe(e,t,1,r,n+s),Qe(e,t,2,r,n-s),Qe(e,t,3,r,n-i)}function tt(e){return(20091*e>>16)+e}function rt(e,t,r,n){var i,a=0,o=s(16);for(i=0;4>i;++i){var l=e[t+0]+e[t+8],c=e[t+0]-e[t+8],u=(35468*e[t+4]>>16)-tt(e[t+12]),h=tt(e[t+4])+(35468*e[t+12]>>16);o[a+0]=l+h,o[a+1]=c+u,o[a+2]=c-u,o[a+3]=l-h,a+=4,t++}for(i=a=0;4>i;++i)l=(e=o[a+0]+4)+o[a+8],c=e-o[a+8],u=(35468*o[a+4]>>16)-tt(o[a+12]),Qe(r,n,0,0,l+(h=tt(o[a+4])+(35468*o[a+12]>>16))),Qe(r,n,1,0,c+u),Qe(r,n,2,0,c-u),Qe(r,n,3,0,l-h),a++,n+=32}function nt(e,t,r,n){var i=e[t+0]+4,s=35468*e[t+4]>>16,a=tt(e[t+4]),o=35468*e[t+1]>>16;et(r,n,0,i+a,e=tt(e[t+1]),o),et(r,n,1,i+s,e,o),et(r,n,2,i-s,e,o),et(r,n,3,i-a,e,o)}function it(e,t,r,n,i){rt(e,t,r,n),i&&rt(e,t+16,r,n+4)}function st(e,t,r,n){sn(e,t+0,r,n,1),sn(e,t+32,r,n+128,1)}function at(e,t,r,n){var i;for(e=e[t+0]+4,i=0;4>i;++i)for(t=0;4>t;++t)Qe(r,n,t,i,e)}function ot(e,t,r,n){e[t+0]&&ln(e,t+0,r,n),e[t+16]&&ln(e,t+16,r,n+4),e[t+32]&&ln(e,t+32,r,n+128),e[t+48]&&ln(e,t+48,r,n+128+4)}function lt(e,t,r,n){var i,a=s(16);for(i=0;4>i;++i){var o=e[t+0+i]+e[t+12+i],l=e[t+4+i]+e[t+8+i],c=e[t+4+i]-e[t+8+i],u=e[t+0+i]-e[t+12+i];a[0+i]=o+l,a[8+i]=o-l,a[4+i]=u+c,a[12+i]=u-c}for(i=0;4>i;++i)o=(e=a[0+4*i]+3)+a[3+4*i],l=a[1+4*i]+a[2+4*i],c=a[1+4*i]-a[2+4*i],u=e-a[3+4*i],r[n+0]=o+l>>3,r[n+16]=u+c>>3,r[n+32]=o-l>>3,r[n+48]=u-c>>3,n+=64}function ct(e,t,r){var n,i=t-32,s=On,a=255-e[i-1];for(n=0;n<r;++n){var o,l=s,c=a+e[t-1];for(o=0;o<r;++o)e[t+o]=l[c+e[i+o]];t+=32}}function ut(e,t){ct(e,t,4)}function ht(e,t){ct(e,t,8)}function dt(e,t){ct(e,t,16)}function ft(e,t){var r;for(r=0;16>r;++r)n(e,t+32*r,e,t-32,16)}function pt(e,t){var r;for(r=16;0<r;--r)i(e,t,e[t-1],16),t+=32}function mt(e,t,r){var n;for(n=0;16>n;++n)i(t,r+32*n,e,16)}function gt(e,t){var r,n=16;for(r=0;16>r;++r)n+=e[t-1+32*r]+e[t+r-32];mt(n>>5,e,t)}function bt(e,t){var r,n=8;for(r=0;16>r;++r)n+=e[t-1+32*r];mt(n>>4,e,t)}function vt(e,t){var r,n=8;for(r=0;16>r;++r)n+=e[t+r-32];mt(n>>4,e,t)}function wt(e,t){mt(128,e,t)}function yt(e,t,r){return e+2*t+r+2>>2}function _t(e,t){var r,i=t-32;for(i=new Uint8Array([yt(e[i-1],e[i+0],e[i+1]),yt(e[i+0],e[i+1],e[i+2]),yt(e[i+1],e[i+2],e[i+3]),yt(e[i+2],e[i+3],e[i+4])]),r=0;4>r;++r)n(e,t+32*r,i,0,i.length)}function xt(e,t){var r=e[t-1],n=e[t-1+32],i=e[t-1+64],s=e[t-1+96];P(e,t+0,16843009*yt(e[t-1-32],r,n)),P(e,t+32,16843009*yt(r,n,i)),P(e,t+64,16843009*yt(n,i,s)),P(e,t+96,16843009*yt(i,s,s))}function kt(e,t){var r,n=4;for(r=0;4>r;++r)n+=e[t+r-32]+e[t-1+32*r];for(n>>=3,r=0;4>r;++r)i(e,t+32*r,n,4)}function Nt(e,t){var r=e[t-1+0],n=e[t-1+32],i=e[t-1+64],s=e[t-1-32],a=e[t+0-32],o=e[t+1-32],l=e[t+2-32],c=e[t+3-32];e[t+0+96]=yt(n,i,e[t-1+96]),e[t+1+96]=e[t+0+64]=yt(r,n,i),e[t+2+96]=e[t+1+64]=e[t+0+32]=yt(s,r,n),e[t+3+96]=e[t+2+64]=e[t+1+32]=e[t+0+0]=yt(a,s,r),e[t+3+64]=e[t+2+32]=e[t+1+0]=yt(o,a,s),e[t+3+32]=e[t+2+0]=yt(l,o,a),e[t+3+0]=yt(c,l,o)}function St(e,t){var r=e[t+1-32],n=e[t+2-32],i=e[t+3-32],s=e[t+4-32],a=e[t+5-32],o=e[t+6-32],l=e[t+7-32];e[t+0+0]=yt(e[t+0-32],r,n),e[t+1+0]=e[t+0+32]=yt(r,n,i),e[t+2+0]=e[t+1+32]=e[t+0+64]=yt(n,i,s),e[t+3+0]=e[t+2+32]=e[t+1+64]=e[t+0+96]=yt(i,s,a),e[t+3+32]=e[t+2+64]=e[t+1+96]=yt(s,a,o),e[t+3+64]=e[t+2+96]=yt(a,o,l),e[t+3+96]=yt(o,l,l)}function At(e,t){var r=e[t-1+0],n=e[t-1+32],i=e[t-1+64],s=e[t-1-32],a=e[t+0-32],o=e[t+1-32],l=e[t+2-32],c=e[t+3-32];e[t+0+0]=e[t+1+64]=s+a+1>>1,e[t+1+0]=e[t+2+64]=a+o+1>>1,e[t+2+0]=e[t+3+64]=o+l+1>>1,e[t+3+0]=l+c+1>>1,e[t+0+96]=yt(i,n,r),e[t+0+64]=yt(n,r,s),e[t+0+32]=e[t+1+96]=yt(r,s,a),e[t+1+32]=e[t+2+96]=yt(s,a,o),e[t+2+32]=e[t+3+96]=yt(a,o,l),e[t+3+32]=yt(o,l,c)}function Lt(e,t){var r=e[t+0-32],n=e[t+1-32],i=e[t+2-32],s=e[t+3-32],a=e[t+4-32],o=e[t+5-32],l=e[t+6-32],c=e[t+7-32];e[t+0+0]=r+n+1>>1,e[t+1+0]=e[t+0+64]=n+i+1>>1,e[t+2+0]=e[t+1+64]=i+s+1>>1,e[t+3+0]=e[t+2+64]=s+a+1>>1,e[t+0+32]=yt(r,n,i),e[t+1+32]=e[t+0+96]=yt(n,i,s),e[t+2+32]=e[t+1+96]=yt(i,s,a),e[t+3+32]=e[t+2+96]=yt(s,a,o),e[t+3+64]=yt(a,o,l),e[t+3+96]=yt(o,l,c)}function jt(e,t){var r=e[t-1+0],n=e[t-1+32],i=e[t-1+64],s=e[t-1+96];e[t+0+0]=r+n+1>>1,e[t+2+0]=e[t+0+32]=n+i+1>>1,e[t+2+32]=e[t+0+64]=i+s+1>>1,e[t+1+0]=yt(r,n,i),e[t+3+0]=e[t+1+32]=yt(n,i,s),e[t+3+32]=e[t+1+64]=yt(i,s,s),e[t+3+64]=e[t+2+64]=e[t+0+96]=e[t+1+96]=e[t+2+96]=e[t+3+96]=s}function Pt(e,t){var r=e[t-1+0],n=e[t-1+32],i=e[t-1+64],s=e[t-1+96],a=e[t-1-32],o=e[t+0-32],l=e[t+1-32],c=e[t+2-32];e[t+0+0]=e[t+2+32]=r+a+1>>1,e[t+0+32]=e[t+2+64]=n+r+1>>1,e[t+0+64]=e[t+2+96]=i+n+1>>1,e[t+0+96]=s+i+1>>1,e[t+3+0]=yt(o,l,c),e[t+2+0]=yt(a,o,l),e[t+1+0]=e[t+3+32]=yt(r,a,o),e[t+1+32]=e[t+3+64]=yt(n,r,a),e[t+1+64]=e[t+3+96]=yt(i,n,r),e[t+1+96]=yt(s,i,n)}function Et(e,t){var r;for(r=0;8>r;++r)n(e,t+32*r,e,t-32,8)}function It(e,t){var r;for(r=0;8>r;++r)i(e,t,e[t-1],8),t+=32}function Tt(e,t,r){var n;for(n=0;8>n;++n)i(t,r+32*n,e,8)}function Ot(e,t){var r,n=8;for(r=0;8>r;++r)n+=e[t+r-32]+e[t-1+32*r];Tt(n>>4,e,t)}function Ct(e,t){var r,n=4;for(r=0;8>r;++r)n+=e[t+r-32];Tt(n>>3,e,t)}function Rt(e,t){var r,n=4;for(r=0;8>r;++r)n+=e[t-1+32*r];Tt(n>>3,e,t)}function Ft(e,t){Tt(128,e,t)}function Bt(e,t,r){var n=e[t-r],i=e[t+0],s=3*(i-n)+In[1020+e[t-2*r]-e[t+r]],a=Tn[112+(s+4>>3)];e[t-r]=On[255+n+Tn[112+(s+3>>3)]],e[t+0]=On[255+i-a]}function Dt(e,t,r,n){var i=e[t+0],s=e[t+r];return Cn[255+e[t-2*r]-e[t-r]]>n||Cn[255+s-i]>n}function Mt(e,t,r,n){return 4*Cn[255+e[t-r]-e[t+0]]+Cn[255+e[t-2*r]-e[t+r]]<=n}function Ut(e,t,r,n,i){var s=e[t-3*r],a=e[t-2*r],o=e[t-r],l=e[t+0],c=e[t+r],u=e[t+2*r],h=e[t+3*r];return 4*Cn[255+o-l]+Cn[255+a-c]>n?0:Cn[255+e[t-4*r]-s]<=i&&Cn[255+s-a]<=i&&Cn[255+a-o]<=i&&Cn[255+h-u]<=i&&Cn[255+u-c]<=i&&Cn[255+c-l]<=i}function qt(e,t,r,n){var i=2*n+1;for(n=0;16>n;++n)Mt(e,t+n,r,i)&&Bt(e,t+n,r)}function zt(e,t,r,n){var i=2*n+1;for(n=0;16>n;++n)Mt(e,t+n*r,1,i)&&Bt(e,t+n*r,1)}function $t(e,t,r,n){var i;for(i=3;0<i;--i)qt(e,t+=4*r,r,n)}function Wt(e,t,r,n){var i;for(i=3;0<i;--i)zt(e,t+=4,r,n)}function Ht(e,t,r,n,i,s,a,o){for(s=2*s+1;0<i--;){if(Ut(e,t,r,s,a))if(Dt(e,t,r,o))Bt(e,t,r);else{var l=e,c=t,u=r,h=l[c-2*u],d=l[c-u],f=l[c+0],p=l[c+u],m=l[c+2*u],g=27*(v=In[1020+3*(f-d)+In[1020+h-p]])+63>>7,b=18*v+63>>7,v=9*v+63>>7;l[c-3*u]=On[255+l[c-3*u]+v],l[c-2*u]=On[255+h+b],l[c-u]=On[255+d+g],l[c+0]=On[255+f-g],l[c+u]=On[255+p-b],l[c+2*u]=On[255+m-v]}t+=n}}function Vt(e,t,r,n,i,s,a,o){for(s=2*s+1;0<i--;){if(Ut(e,t,r,s,a))if(Dt(e,t,r,o))Bt(e,t,r);else{var l=e,c=t,u=r,h=l[c-u],d=l[c+0],f=l[c+u],p=Tn[112+(4+(m=3*(d-h))>>3)],m=Tn[112+(m+3>>3)],g=p+1>>1;l[c-2*u]=On[255+l[c-2*u]+g],l[c-u]=On[255+h+m],l[c+0]=On[255+d-p],l[c+u]=On[255+f-g]}t+=n}}function Gt(e,t,r,n,i,s){Ht(e,t,r,1,16,n,i,s)}function Kt(e,t,r,n,i,s){Ht(e,t,1,r,16,n,i,s)}function Jt(e,t,r,n,i,s){var a;for(a=3;0<a;--a)Vt(e,t+=4*r,r,1,16,n,i,s)}function Yt(e,t,r,n,i,s){var a;for(a=3;0<a;--a)Vt(e,t+=4,1,r,16,n,i,s)}function Zt(e,t,r,n,i,s,a,o){Ht(e,t,i,1,8,s,a,o),Ht(r,n,i,1,8,s,a,o)}function Xt(e,t,r,n,i,s,a,o){Ht(e,t,1,i,8,s,a,o),Ht(r,n,1,i,8,s,a,o)}function Qt(e,t,r,n,i,s,a,o){Vt(e,t+4*i,i,1,8,s,a,o),Vt(r,n+4*i,i,1,8,s,a,o)}function er(e,t,r,n,i,s,a,o){Vt(e,t+4,1,i,8,s,a,o),Vt(r,n+4,1,i,8,s,a,o)}function tr(){this.ba=new ae,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new le,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function rr(){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 nr(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function ir(){this.ua=0,this.Wa=new R,this.vb=new R,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new f,this.yc=new h}function sr(){this.xb=this.a=0,this.l=new Ve,this.ca=new ae,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new _,this.Pb=0,this.wd=new _,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new ir,this.ab=0,this.gc=a(4,nr),this.Oc=0}function ar(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ve,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function or(e,t,r,n,i,s,a){for(e=null==e?0:e[t+0],t=0;t<a;++t)i[s+t]=e+r[n+t]&255,e=i[s+t]}function lr(e,t,r,n,i,s,a){var o;if(null==e)or(null,null,r,n,i,s,a);else for(o=0;o<a;++o)i[s+o]=e[t+o]+r[n+o]&255}function cr(e,t,r,n,i,s,a){if(null==e)or(null,null,r,n,i,s,a);else{var o,l=e[t+0],c=l,u=l;for(o=0;o<a;++o)c=u+(l=e[t+o])-c,u=r[n+o]+(-256&c?0>c?0:255:c)&255,c=l,i[s+o]=u}}function ur(e,r,i,a){var o=r.width,l=r.o;if(t(null!=e&&null!=r),0>i||0>=a||i+a>l)return null;if(!e.Cc){if(null==e.ga){var c;if(e.ga=new ar,(c=null==e.ga)||(c=r.width*r.o,t(0==e.Gb.length),e.Gb=s(c),e.Uc=0,null==e.Gb?c=0:(e.mb=e.Gb,e.nb=e.Uc,e.rc=null,c=1),c=!c),!c){c=e.ga;var u=e.Fa,h=e.P,d=e.qc,f=e.mb,p=e.nb,m=h+1,g=d-1,v=c.l;if(t(null!=u&&null!=f&&null!=r),mi[0]=null,mi[1]=or,mi[2]=lr,mi[3]=cr,c.ca=f,c.tb=p,c.c=r.width,c.i=r.height,t(0<c.c&&0<c.i),1>=d)r=0;else if(c.$a=3&u[h+0],c.Z=u[h+0]>>2&3,c.Lc=u[h+0]>>4&3,h=u[h+0]>>6&3,0>c.$a||1<c.$a||4<=c.Z||1<c.Lc||h)r=0;else if(v.put=fe,v.ac=de,v.bc=pe,v.ma=c,v.width=r.width,v.height=r.height,v.Da=r.Da,v.v=r.v,v.va=r.va,v.j=r.j,v.o=r.o,c.$a)e:{t(1==c.$a),r=je();t:for(;;){if(null==r){r=0;break e}if(t(null!=c),c.mc=r,r.c=c.c,r.i=c.i,r.l=c.l,r.l.ma=c,r.l.width=c.c,r.l.height=c.i,r.a=0,b(r.m,u,m,g),!Pe(c.c,c.i,1,r,null))break t;if(1==r.ab&&3==r.gc[0].hc&&ke(r.s)?(c.ic=1,u=r.c*r.i,r.Ta=null,r.Ua=0,r.V=s(u),r.Ba=0,null==r.V?(r.a=1,r=0):r=1):(c.ic=0,r=Ee(r,c.c)),!r)break t;r=1;break e}c.mc=null,r=0}else r=g>=c.c*c.i;c=!r}if(c)return null;1!=e.ga.Lc?e.Ga=0:a=l-i}t(null!=e.ga),t(i+a<=l);e:{if(r=(u=e.ga).c,l=u.l.o,0==u.$a){if(m=e.rc,g=e.Vc,v=e.Fa,h=e.P+1+i*r,d=e.mb,f=e.nb+i*r,t(h<=e.P+e.qc),0!=u.Z)for(t(null!=mi[u.Z]),c=0;c<a;++c)mi[u.Z](m,g,v,h,d,f,r),m=d,g=f,f+=r,h+=r;else for(c=0;c<a;++c)n(d,f,v,h,r),m=d,g=f,f+=r,h+=r;e.rc=m,e.Vc=g}else{if(t(null!=u.mc),r=i+a,t(null!=(c=u.mc)),t(r<=c.i),c.C>=r)r=1;else if(u.ic||mr(),u.ic){u=c.V,m=c.Ba,g=c.c;var w=c.i,y=(v=1,h=c.$/g,d=c.$%g,f=c.m,p=c.s,c.$),_=g*w,x=g*r,N=p.wc,A=y<x?ye(p,d,h):null;t(y<=_),t(r<=w),t(ke(p));t:for(;;){for(;!f.h&&y<x;){if(d&N||(A=ye(p,d,h)),t(null!=A),S(f),256>(w=ve(A.G[0],A.H[0],f)))u[m+y]=w,++y,++d>=g&&(d=0,++h<=r&&!(h%16)&&Se(c,h));else{if(!(280>w)){v=0;break t}w=ge(w-256,f);var L,j=ve(A.G[4],A.H[4],f);if(S(f),!(y>=(j=be(g,j=ge(j,f)))&&_-y>=w)){v=0;break t}for(L=0;L<w;++L)u[m+y+L]=u[m+y+L-j];for(y+=w,d+=w;d>=g;)d-=g,++h<=r&&!(h%16)&&Se(c,h);y<x&&d&N&&(A=ye(p,d,h))}t(f.h==k(f))}Se(c,h>r?r:h);break t}!v||f.h&&y<_?(v=0,c.a=f.h?5:3):c.$=y,r=v}else r=Ae(c,c.V,c.Ba,c.c,c.i,r,Ie);if(!r){a=0;break e}}i+a>=l&&(e.Cc=1),a=1}if(!a)return null;if(e.Cc&&(null!=(a=e.ga)&&(a.mc=null),e.ga=null,0<e.Ga))return alert("todo:WebPDequantizeLevels"),null}return e.nb+i*o}function hr(e,t,r,n,i,s){for(;0<i--;){var a,o=e,l=t+(r?1:0),c=e,u=t+(r?0:3);for(a=0;a<n;++a){var h=c[u+4*a];255!=h&&(h*=32897,o[l+4*a+0]=o[l+4*a+0]*h>>23,o[l+4*a+1]=o[l+4*a+1]*h>>23,o[l+4*a+2]=o[l+4*a+2]*h>>23)}t+=s}}function dr(e,t,r,n,i){for(;0<n--;){var s;for(s=0;s<r;++s){var a=e[t+2*s+0],o=15&(c=e[t+2*s+1]),l=4369*o,c=(240&c|c>>4)*l>>16;e[t+2*s+0]=(240&a|a>>4)*l>>16&240|(15&a|a<<4)*l>>16>>4&15,e[t+2*s+1]=240&c|o}t+=i}}function fr(e,t,r,n,i,s,a,o){var l,c,u=255;for(c=0;c<i;++c){for(l=0;l<n;++l){var h=e[t+l];s[a+4*l]=h,u&=h}t+=r,a+=o}return 255!=u}function pr(e,t,r,n,i){var s;for(s=0;s<i;++s)r[n+s]=e[t+s]>>8}function mr(){xn=hr,kn=dr,Nn=fr,Sn=pr}function gr(r,n,i){e[r]=function(e,r,s,a,o,l,c,u,h,d,f,p,m,g,b,v,w){var y,_=w-1>>1,x=o[l+0]|c[u+0]<<16,k=h[d+0]|f[p+0]<<16;t(null!=e);var N=3*x+k+131074>>2;for(n(e[r+0],255&N,N>>16,m,g),null!=s&&(N=3*k+x+131074>>2,n(s[a+0],255&N,N>>16,b,v)),y=1;y<=_;++y){var S=o[l+y]|c[u+y]<<16,A=h[d+y]|f[p+y]<<16,L=x+S+k+A+524296,j=L+2*(S+k)>>3;N=j+x>>1,x=(L=L+2*(x+A)>>3)+S>>1,n(e[r+2*y-1],255&N,N>>16,m,g+(2*y-1)*i),n(e[r+2*y-0],255&x,x>>16,m,g+(2*y-0)*i),null!=s&&(N=L+k>>1,x=j+A>>1,n(s[a+2*y-1],255&N,N>>16,b,v+(2*y-1)*i),n(s[a+2*y+0],255&x,x>>16,b,v+(2*y+0)*i)),x=S,k=A}1&w||(N=3*x+k+131074>>2,n(e[r+w-1],255&N,N>>16,m,g+(w-1)*i),null!=s&&(N=3*k+x+131074>>2,n(s[a+w-1],255&N,N>>16,b,v+(w-1)*i)))}}function br(){gi[Rn]=bi,gi[Fn]=wi,gi[Bn]=vi,gi[Dn]=yi,gi[Mn]=_i,gi[Un]=xi,gi[qn]=ki,gi[zn]=wi,gi[$n]=yi,gi[Wn]=_i,gi[Hn]=xi}function vr(e){return e&~Pi?0>e?0:255:e>>ji}function wr(e,t){return vr((19077*e>>8)+(26149*t>>8)-14234)}function yr(e,t,r){return vr((19077*e>>8)-(6419*t>>8)-(13320*r>>8)+8708)}function _r(e,t){return vr((19077*e>>8)+(33050*t>>8)-17685)}function xr(e,t,r,n,i){n[i+0]=wr(e,r),n[i+1]=yr(e,t,r),n[i+2]=_r(e,t)}function kr(e,t,r,n,i){n[i+0]=_r(e,t),n[i+1]=yr(e,t,r),n[i+2]=wr(e,r)}function Nr(e,t,r,n,i){var s=yr(e,t,r);t=s<<3&224|_r(e,t)>>3,n[i+0]=248&wr(e,r)|s>>5,n[i+1]=t}function Sr(e,t,r,n,i){var s=240&_r(e,t)|15;n[i+0]=240&wr(e,r)|yr(e,t,r)>>4,n[i+1]=s}function Ar(e,t,r,n,i){n[i+0]=255,xr(e,t,r,n,i+1)}function Lr(e,t,r,n,i){kr(e,t,r,n,i),n[i+3]=255}function jr(e,t,r,n,i){xr(e,t,r,n,i),n[i+3]=255}function Pr(t,r,n){e[t]=function(e,t,i,s,a,o,l,c,u){for(var h=c+(-2&u)*n;c!=h;)r(e[t+0],i[s+0],a[o+0],l,c),r(e[t+1],i[s+0],a[o+0],l,c+n),t+=2,++s,++o,c+=2*n;1&u&&r(e[t+0],i[s+0],a[o+0],l,c)}}function Er(e,t,r){return 0==r?0==e?0==t?6:5:0==t?4:0:r}function Ir(e,t,r,n,i){switch(e>>>30){case 3:sn(t,r,n,i,0);break;case 2:an(t,r,n,i);break;case 1:ln(t,r,n,i)}}function Tr(e,t){var r,s,a=t.M,o=t.Nb,l=e.oc,c=e.pc+40,u=e.oc,h=e.pc+584,d=e.oc,f=e.pc+600;for(r=0;16>r;++r)l[c+32*r-1]=129;for(r=0;8>r;++r)u[h+32*r-1]=129,d[f+32*r-1]=129;for(0<a?l[c-1-32]=u[h-1-32]=d[f-1-32]=129:(i(l,c-32-1,127,21),i(u,h-32-1,127,9),i(d,f-32-1,127,9)),s=0;s<e.za;++s){var p=t.ya[t.aa+s];if(0<s){for(r=-1;16>r;++r)n(l,c+32*r-4,l,c+32*r+12,4);for(r=-1;8>r;++r)n(u,h+32*r-4,u,h+32*r+4,4),n(d,f+32*r-4,d,f+32*r+4,4)}var m=e.Gd,g=e.Hd+s,b=p.ad,v=p.Hc;if(0<a&&(n(l,c-32,m[g].y,0,16),n(u,h-32,m[g].f,0,8),n(d,f-32,m[g].ea,0,8)),p.Za){var w=l,y=c-32+16;for(0<a&&(s>=e.za-1?i(w,y,m[g].y[15],4):n(w,y,m[g+1].y,0,4)),r=0;4>r;r++)w[y+128+r]=w[y+256+r]=w[y+384+r]=w[y+0+r];for(r=0;16>r;++r,v<<=2)w=l,y=c+Bi[r],hi[p.Ob[r]](w,y),Ir(v,b,16*+r,w,y)}else if(w=Er(s,a,p.Ob[0]),ui[w](l,c),0!=v)for(r=0;16>r;++r,v<<=2)Ir(v,b,16*+r,l,c+Bi[r]);for(r=p.Gc,w=Er(s,a,p.Dd),di[w](u,h),di[w](d,f),v=b,w=u,y=h,255&(p=0|r)&&(170&p?on(v,256,w,y):cn(v,256,w,y)),p=d,v=f,255&(r>>=8)&&(170&r?on(b,320,p,v):cn(b,320,p,v)),a<e.Ub-1&&(n(m[g].y,0,l,c+480,16),n(m[g].f,0,u,h+224,8),n(m[g].ea,0,d,f+224,8)),r=8*o*e.B,m=e.sa,g=e.ta+16*s+16*o*e.R,b=e.qa,p=e.ra+8*s+r,v=e.Ha,w=e.Ia+8*s+r,r=0;16>r;++r)n(m,g+r*e.R,l,c+32*r,16);for(r=0;8>r;++r)n(b,p+r*e.B,u,h+32*r,8),n(v,w+r*e.B,d,f+32*r,8)}}function Or(e,n,i,s,a,o,l,c,u){var h=[0],d=[0],f=0,p=null!=u?u.kd:0,m=null!=u?u:new rr;if(null==e||12>i)return 7;m.data=e,m.w=n,m.ha=i,n=[n],i=[i],m.gb=[m.gb];e:{var g=n,v=i,w=m.gb;if(t(null!=e),t(null!=v),t(null!=w),w[0]=0,12<=v[0]&&!r(e,g[0],"RIFF")){if(r(e,g[0]+8,"WEBP")){w=3;break e}var y=T(e,g[0]+4);if(12>y||4294967286<y){w=3;break e}if(p&&y>v[0]-8){w=7;break e}w[0]=y,g[0]+=12,v[0]-=12}w=0}if(0!=w)return w;for(y=0<m.gb[0],i=i[0];;){e:{var x=e;v=n,w=i;var k=h,N=d,S=g=[0];if((j=f=[f])[0]=0,8>w[0])w=7;else{if(!r(x,v[0],"VP8X")){if(10!=T(x,v[0]+4)){w=3;break e}if(18>w[0]){w=7;break e}var A=T(x,v[0]+8),L=1+I(x,v[0]+12);if(2147483648<=L*(x=1+I(x,v[0]+15))){w=3;break e}null!=S&&(S[0]=A),null!=k&&(k[0]=L),null!=N&&(N[0]=x),v[0]+=18,w[0]-=18,j[0]=1}w=0}}if(f=f[0],g=g[0],0!=w)return w;if(v=!!(2&g),!y&&f)return 3;if(null!=o&&(o[0]=!!(16&g)),null!=l&&(l[0]=v),null!=c&&(c[0]=0),l=h[0],g=d[0],f&&v&&null==u){w=0;break}if(4>i){w=7;break}if(y&&f||!y&&!f&&!r(e,n[0],"ALPH")){i=[i],m.na=[m.na],m.P=[m.P],m.Sa=[m.Sa];e:{A=e,w=n,y=i;var j=m.gb;k=m.na,N=m.P,S=m.Sa,L=22,t(null!=A),t(null!=y),x=w[0];var P=y[0];for(t(null!=k),t(null!=S),k[0]=null,N[0]=null,S[0]=0;;){if(w[0]=x,y[0]=P,8>P){w=7;break e}var E=T(A,x+4);if(4294967286<E){w=3;break e}var O=8+E+1&-2;if(L+=O,0<j&&L>j){w=3;break e}if(!r(A,x,"VP8 ")||!r(A,x,"VP8L")){w=0;break e}if(P[0]<O){w=7;break e}r(A,x,"ALPH")||(k[0]=A,N[0]=x+8,S[0]=E),x+=O,P-=O}}if(i=i[0],m.na=m.na[0],m.P=m.P[0],m.Sa=m.Sa[0],0!=w)break}i=[i],m.Ja=[m.Ja],m.xa=[m.xa];e:if(j=e,w=n,y=i,k=m.gb[0],N=m.Ja,S=m.xa,A=w[0],x=!r(j,A,"VP8 "),L=!r(j,A,"VP8L"),t(null!=j),t(null!=y),t(null!=N),t(null!=S),8>y[0])w=7;else{if(x||L){if(j=T(j,A+4),12<=k&&j>k-12){w=3;break e}if(p&&j>y[0]-8){w=7;break e}N[0]=j,w[0]+=8,y[0]-=8,S[0]=L}else S[0]=5<=y[0]&&47==j[A+0]&&!(j[A+4]>>5),N[0]=y[0];w=0}if(i=i[0],m.Ja=m.Ja[0],m.xa=m.xa[0],n=n[0],0!=w)break;if(4294967286<m.Ja)return 3;if(null==c||v||(c[0]=m.xa?2:1),l=[l],g=[g],m.xa){if(5>i){w=7;break}c=l,p=g,v=o,null==e||5>i?e=0:5<=i&&47==e[n+0]&&!(e[n+4]>>5)?(y=[0],j=[0],k=[0],b(N=new _,e,n,i),me(N,y,j,k)?(null!=c&&(c[0]=y[0]),null!=p&&(p[0]=j[0]),null!=v&&(v[0]=k[0]),e=1):e=0):e=0}else{if(10>i){w=7;break}c=g,null==e||10>i||!Je(e,n+3,i-3)?e=0:(p=e[n+0]|e[n+1]<<8|e[n+2]<<16,v=16383&(e[n+7]<<8|e[n+6]),e=16383&(e[n+9]<<8|e[n+8]),1&p||3<(p>>1&7)||!(p>>4&1)||p>>5>=m.Ja||!v||!e?e=0:(l&&(l[0]=v),c&&(c[0]=e),e=1))}if(!e)return 3;if(l=l[0],g=g[0],f&&(h[0]!=l||d[0]!=g))return 3;null!=u&&(u[0]=m,u.offset=n-u.w,t(4294967286>n-u.w),t(u.offset==u.ha-i));break}return 0==w||7==w&&f&&null==u?(null!=o&&(o[0]|=null!=m.na&&0<m.na.length),null!=s&&(s[0]=l),null!=a&&(a[0]=g),0):w}function Cr(e,t,r){var n=t.width,i=t.height,s=0,a=0,o=n,l=i;if(t.Da=null!=e&&0<e.Da,t.Da&&(o=e.cd,l=e.bd,s=e.v,a=e.j,11>r||(s&=-2,a&=-2),0>s||0>a||0>=o||0>=l||s+o>n||a+l>i))return 0;if(t.v=s,t.j=a,t.va=s+o,t.o=a+l,t.U=o,t.T=l,t.da=null!=e&&0<e.da,t.da){if(!F(o,l,r=[e.ib],s=[e.hb]))return 0;t.ib=r[0],t.hb=s[0]}return t.ob=null!=e&&e.ob,t.Kb=null==e||!e.Sd,t.da&&(t.ob=t.ib<3*n/4&&t.hb<3*i/4,t.Kb=0),1}function Rr(e){if(null==e)return 2;if(11>e.S){var t=e.f.RGBA;t.fb+=(e.height-1)*t.A,t.A=-t.A}else t=e.f.kb,e=e.height,t.O+=(e-1)*t.fa,t.fa=-t.fa,t.N+=(e-1>>1)*t.Ab,t.Ab=-t.Ab,t.W+=(e-1>>1)*t.Db,t.Db=-t.Db,null!=t.F&&(t.J+=(e-1)*t.lb,t.lb=-t.lb);return 0}function Fr(e,t,r,n){if(null==n||0>=e||0>=t)return 2;if(null!=r){if(r.Da){var i=r.cd,a=r.bd,o=-2&r.v,l=-2&r.j;if(0>o||0>l||0>=i||0>=a||o+i>e||l+a>t)return 2;e=i,t=a}if(r.da){if(!F(e,t,i=[r.ib],a=[r.hb]))return 2;e=i[0],t=a[0]}}n.width=e,n.height=t;e:{var c=n.width,u=n.height;if(e=n.S,0>=c||0>=u||!(e>=Rn&&13>e))e=2;else{if(0>=n.Rd&&null==n.sd){o=a=i=t=0;var h=(l=c*Ui[e])*u;if(11>e||(a=(u+1)/2*(t=(c+1)/2),12==e&&(o=(i=c)*u)),null==(u=s(h+2*a+o))){e=1;break e}n.sd=u,11>e?((c=n.f.RGBA).eb=u,c.fb=0,c.A=l,c.size=h):((c=n.f.kb).y=u,c.O=0,c.fa=l,c.Fd=h,c.f=u,c.N=0+h,c.Ab=t,c.Cd=a,c.ea=u,c.W=0+h+a,c.Db=t,c.Ed=a,12==e&&(c.F=u,c.J=0+h+2*a),c.Tc=o,c.lb=i)}if(t=1,i=n.S,a=n.width,o=n.height,i>=Rn&&13>i)if(11>i)e=n.f.RGBA,t&=(l=Math.abs(e.A))*(o-1)+a<=e.size,t&=l>=a*Ui[i],t&=null!=e.eb;else{e=n.f.kb,l=(a+1)/2,h=(o+1)/2,c=Math.abs(e.fa),u=Math.abs(e.Ab);var d=Math.abs(e.Db),f=Math.abs(e.lb),p=f*(o-1)+a;t&=c*(o-1)+a<=e.Fd,t&=u*(h-1)+l<=e.Cd,t=(t&=d*(h-1)+l<=e.Ed)&c>=a&u>=l&d>=l,t&=null!=e.y,t&=null!=e.f,t&=null!=e.ea,12==i&&(t&=f>=a,t&=p<=e.Tc,t&=null!=e.F)}else t=0;e=t?0:2}}return 0!=e||null!=r&&r.fd&&(e=Rr(n)),e}var Br=64,Dr=[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],Mr=24,Ur=32,qr=8,zr=[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];M("Predictor0","PredictorAdd0"),e.Predictor0=function(){return 4278190080},e.Predictor1=function(e){return e},e.Predictor2=function(e,t,r){return t[r+0]},e.Predictor3=function(e,t,r){return t[r+1]},e.Predictor4=function(e,t,r){return t[r-1]},e.Predictor5=function(e,t,r){return q(q(e,t[r+1]),t[r+0])},e.Predictor6=function(e,t,r){return q(e,t[r-1])},e.Predictor7=function(e,t,r){return q(e,t[r+0])},e.Predictor8=function(e,t,r){return q(t[r-1],t[r+0])},e.Predictor9=function(e,t,r){return q(t[r+0],t[r+1])},e.Predictor10=function(e,t,r){return q(q(e,t[r-1]),q(t[r+0],t[r+1]))},e.Predictor11=function(e,t,r){var n=t[r+0];return 0>=W(n>>24&255,e>>24&255,(t=t[r-1])>>24&255)+W(n>>16&255,e>>16&255,t>>16&255)+W(n>>8&255,e>>8&255,t>>8&255)+W(255&n,255&e,255&t)?n:e},e.Predictor12=function(e,t,r){var n=t[r+0];return(z((e>>24&255)+(n>>24&255)-((t=t[r-1])>>24&255))<<24|z((e>>16&255)+(n>>16&255)-(t>>16&255))<<16|z((e>>8&255)+(n>>8&255)-(t>>8&255))<<8|z((255&e)+(255&n)-(255&t)))>>>0},e.Predictor13=function(e,t,r){var n=t[r-1];return($((e=q(e,t[r+0]))>>24&255,n>>24&255)<<24|$(e>>16&255,n>>16&255)<<16|$(e>>8&255,n>>8&255)<<8|$(255&e,255&n))>>>0};var $r=e.PredictorAdd0;e.PredictorAdd1=H,M("Predictor2","PredictorAdd2"),M("Predictor3","PredictorAdd3"),M("Predictor4","PredictorAdd4"),M("Predictor5","PredictorAdd5"),M("Predictor6","PredictorAdd6"),M("Predictor7","PredictorAdd7"),M("Predictor8","PredictorAdd8"),M("Predictor9","PredictorAdd9"),M("Predictor10","PredictorAdd10"),M("Predictor11","PredictorAdd11"),M("Predictor12","PredictorAdd12"),M("Predictor13","PredictorAdd13");var Wr=e.PredictorAdd2;J("ColorIndexInverseTransform","MapARGB","32b",function(e){return e>>8&255},function(e){return e}),J("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(e){return e},function(e){return e>>8&255});var Hr,Vr=e.ColorIndexInverseTransform,Gr=e.MapARGB,Kr=e.VP8LColorIndexInverseTransformAlpha,Jr=e.MapAlpha,Yr=e.VP8LPredictorsAdd=[];Yr.length=16,(e.VP8LPredictors=[]).length=16,(e.VP8LPredictorsAdd_C=[]).length=16,(e.VP8LPredictors_C=[]).length=16;var Zr,Xr,Qr,en,tn,rn,nn,sn,an,on,ln,cn,un,hn,dn,fn,pn,mn,gn,bn,vn,wn,yn,_n,xn,kn,Nn,Sn,An=s(511),Ln=s(2041
119),jn=s(225),Pn=s(767),En=0,In=Ln,Tn=jn,On=Pn,Cn=An,Rn=0,Fn=1,Bn=2,Dn=3,Mn=4,Un=5,qn=6,zn=7,$n=8,Wn=9,Hn=10,Vn=[2,3,7],Gn=[3,3,11],Kn=[280,256,256,256,40],Jn=[0,1,1,1,0],Yn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Zn=[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],Xn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Qn=8,ei=[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],ti=[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],ri=null,ni=[[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]],ii=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],si=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],a
vendor: 7,569 bytes, line 119
119i=[[[[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,255,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]]]],oi=[[[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,1,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]]],
119li=[[[[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: 6,730 bytes, line 119
1195,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]]]],ci=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ui=[],hi=[],di=[],fi=1,pi=2,mi=[],gi=[];gr("UpsampleRgbLinePair",xr,3),gr("UpsampleBgrLinePair",kr,3),gr("UpsampleRgbaLinePair",jr,4),gr("UpsampleBgraLinePair",Lr,4),gr("UpsampleArgbLinePair",Ar,4),gr("UpsampleRgba4444LinePair",Sr,2),gr("UpsampleRgb565LinePair",Nr,2);var bi=e.UpsampleRgbLinePair,vi=e.UpsampleBgrLinePair,wi=e.UpsampleRgbaLinePair,yi=e.UpsampleBgraLinePair,_i=e.UpsampleArgbLinePair,xi=e.UpsampleRgba4444LinePair,ki=e.UpsampleRgb565LinePair,Ni=16,Si=1<<Ni-1,Ai=-227,Li=482,ji=6,Pi=(256<<ji)-1,Ei=0,Ii=s(256),Ti=s(256),Oi=s(256),Ci=s(256),Ri=s(Li-Ai),Fi=s(Li-Ai);Pr("YuvToRgbRow",xr,3),Pr("YuvToBgrRow",kr,3),Pr("YuvToRgbaRow",jr,4),Pr("YuvToBgraRow",Lr,4),Pr("YuvToArgbRow",Ar,4),Pr("YuvToRgba4444Row",Sr,2),Pr("YuvToRgb565Row",Nr,2);var Bi=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Di=[0,2,8],Mi=[8,7,6,4,4,2,2,2,1,1,1,1];this.WebPDecodeRGBA=function(e,r,o,l,c){var u=Fn,h=new tr,d=new ae;h.ba=d,d.S=u,d.width=[d.width],d.height=[d.height];var f=d.width,p=d.height,m=new oe;if(null==m||null==e)var g=2;else t(null!=m),g=Or(e,r,o,m.width,m.height,m.Pd,m.Qd,m.format,null);if(0!=g?f=0:(null!=f&&(f[0]=m.width[0]),null!=p&&(p[0]=m.height[0]),f=1),f){d.width=d.width[0],d.height=d.height[0],null!=l&&(l[0]=d.width),null!=c&&(c[0]=d.height);e:{if(l=new Ve,(c=new rr).data=e,c.w=r,c.ha=o,c.kd=1,r=[0],t(null!=c),(0==(e=Or(c.data,c.w,c.ha,null,null,null,r,null,c))||7==e)&&r[0]&&(e=4),0==(r=e)){if(t(null!=h),l.data=c.data,l.w=c.w+c.offset,l.ha=c.ha-c.offset,l.put=fe,l.ac=de,l.bc=pe,l.ma=h,c.xa){if(null==(e=je())){h=1;break e}if(function(e,r){var n=[0],i=[0],s=[0];t:for(;;){if(null==e)return 0;if(null==r)return e.a=2,0;if(e.l=r,e.a=0,b(e.m,r.data,r.w,r.ha),!me(e.m,n,i,s)){e.a=3;break t}if(e.xb=pi,r.width=n[0],r.height=i[0],!Pe(n[0],i[0],1,e,null))break t;return 1}return t(0!=e.a),0}(e,l)){if(l=0==(r=Fr(l.width,l.height,h.Oa,h.ba))){t:{l=e;r:for(;;){if(null==l){l=0;break t}if(t(null!=l.s.yc),t(null!=l.s.Ya),t(0<l.s.Wb),t(null!=(o=l.l)),t(null!=(c=o.ma)),0!=l.xb){if(l.ca=c.ba,l.tb=c.tb,t(null!=l.ca),!Cr(c.Oa,o,Dn)){l.a=2;break r}if(!Ee(l,o.width))break r;if(o.da)break r;if((o.da||ne(l.ca.S))&&mr(),11>l.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=l.ca.f.kb.F&&mr()),l.Pb&&0<l.s.ua&&null==l.s.vb.X&&!O(l.s.vb,l.s.Wa.Xa)){l.a=1;break r}l.xb=0}if(!Ae(l,l.V,l.Ba,l.c,l.i,o.o,xe))break r;c.Dc=l.Ma,l=1;break t}t(0!=l.a),l=0}l=!l}l&&(r=e.a)}else r=e.a}else{if(null==(e=new Ge)){h=1;break e}if(e.Fa=c.na,e.P=c.P,e.qc=c.Sa,Ye(e,l)){if(0==(r=Fr(l.width,l.height,h.Oa,h.ba))){if(e.Aa=0,o=h.Oa,t(null!=(c=e)),null!=o){if(0<(f=0>(f=o.Md)?0:100<f?255:255*f/100)){for(p=m=0;4>p;++p)12>(g=c.pb[p]).lc&&(g.ia=f*Mi[0>g.lc?0:g.lc]>>3),m|=g.ia;m&&(alert("todo:VP8InitRandom"),c.ia=1)}c.Ga=o.Id,100<c.Ga?c.Ga=100:0>c.Ga&&(c.Ga=0)}(function(e,r){if(null==e)return 0;if(null==r)return Ke(e,2,"NULL VP8Io parameter in VP8Decode().");if(!e.cb&&!Ye(e,r))return 0;if(t(e.cb),null==r.ac||r.ac(r)){r.ob&&(e.L=0);var o=Di[e.L];if(2==e.L?(e.yb=0,e.zb=0):(e.yb=r.v-o>>4,e.zb=r.j-o>>4,0>e.yb&&(e.yb=0),0>e.zb&&(e.zb=0)),e.Va=r.o+15+o>>4,e.Hb=r.va+15+o>>4,e.Hb>e.za&&(e.Hb=e.za),e.Va>e.Ub&&(e.Va=e.Ub),0<e.L){var l=e.ed;for(o=0;4>o;++o){var c;if(e.Qa.Cb){var u=e.Qa.Lb[o];e.Qa.Fb||(u+=l.Tb)}else u=l.Tb;for(c=0;1>=c;++c){var h=e.gd[o][c],d=u;if(l.Pc&&(d+=l.vd[0],c&&(d+=l.od[0])),0<(d=0>d?0:63<d?63:d)){var f=d;0<l.wb&&(f=4<l.wb?f>>2:f>>1)>9-l.wb&&(f=9-l.wb),1>f&&(f=1),h.dd=f,h.tc=2*d+f,h.ld=40<=d?2:15<=d?1:0}else h.tc=0;h.La=c}}}o=0}else Ke(e,6,"Frame setup failed"),o=e.a;if(o=0==o){if(o){e.$c=0,0<e.Aa||(e.Ic=1);t:{o=e.Ic,l=4*(f=e.za);var p=32*f,m=f+1,g=0<e.L?f*(0<e.Aa?2:1):0,b=(2==e.Aa?2:1)*f;if((h=l+832+(c=3*(16*o+Di[e.L])/2*p)+(u=null!=e.Fa&&0<e.Fa.length?e.Kc.c*e.Kc.i:0))!=h)o=0;else{if(h>e.Vb){if(e.Vb=0,e.Ec=s(h),e.Fc=0,null==e.Ec){o=Ke(e,1,"no memory during frame initialization.");break t}e.Vb=h}h=e.Ec,d=e.Fc,e.Ac=h,e.Bc=d,d+=l,e.Gd=a(p,$e),e.Hd=0,e.rb=a(m+1,Me),e.sb=1,e.wa=g?a(g,De):null,e.Y=0,e.D.Nb=0,e.D.wa=e.wa,e.D.Y=e.Y,0<e.Aa&&(e.D.Y+=f),t(!0),e.oc=h,e.pc=d,d+=832,e.ya=a(b,qe),e.aa=0,e.D.ya=e.ya,e.D.aa=e.aa,2==e.Aa&&(e.D.aa+=f),e.R=16*f,e.B=8*f,f=(p=Di[e.L])*e.R,p=p/2*e.B,e.sa=h,e.ta=d+f,e.qa=e.sa,e.ra=e.ta+16*o*e.R+p,e.Ha=e.qa,e.Ia=e.ra+8*o*e.B+p,e.$c=0,d+=c,e.mb=u?h:null,e.nb=u?d:null,t(d+u<=e.Fc+e.Vb),Xe(e),i(e.Ac,e.Bc,0,l),o=1}}if(o){if(r.ka=0,r.y=e.sa,r.O=e.ta,r.f=e.qa,r.N=e.ra,r.ea=e.Ha,r.Vd=e.Ia,r.fa=e.R,r.Rc=e.B,r.F=null,r.J=0,!En){for(o=-255;255>=o;++o)An[255+o]=0>o?-o:o;for(o=-1020;1020>=o;++o)Ln[1020+o]=-128>o?-128:127<o?127:o;for(o=-112;112>=o;++o)jn[112+o]=-16>o?-16:15<o?15:o;for(o=-255;510>=o;++o)Pn[255+o]=0>o?0:255<o?255:o;En=1}nn=lt,sn=it,on=st,ln=at,cn=ot,an=nt,un=Gt,hn=Kt,dn=Zt,fn=Xt,pn=Jt,mn=Yt,gn=Qt,bn=er,vn=qt,wn=zt,yn=$t,_n=Wt,hi[0]=kt,hi[1]=ut,hi[2]=_t,hi[3]=xt,hi[4]=Nt,hi[5]=At,hi[6]=St,hi[7]=Lt,hi[8]=Pt,hi[9]=jt,ui[0]=gt,ui[1]=dt,ui[2]=ft,ui[3]=pt,ui[4]=bt,ui[5]=vt,ui[6]=wt,di[0]=Ot,di[1]=ht,di[2]=Et,di[3]=It,di[4]=Rt,di[5]=Ct,di[6]=Ft,o=1}else o=0}o&&(o=function(e,r){for(e.M=0;e.M<e.Va;++e.M){var a,o=e.Jc[e.M&e.Xb],l=e.m,c=e;for(a=0;a<c.za;++a){var u=l,h=c,d=h.Ac,f=h.Bc+4*a,p=h.zc,m=h.ya[h.aa+a];if(h.Qa.Bb?m.$b=j(u,h.Pa.jb[0])?2+j(u,h.Pa.jb[2]):j(u,h.Pa.jb[1]):m.$b=0,h.kc&&(m.Ad=j(u,h.Bd)),m.Za=!j(u,145)+0,m.Za){var g=m.Ob,b=0;for(h=0;4>h;++h){var v,w=p[0+h];for(v=0;4>v;++v){w=oi[d[f+v]][w];for(var y=si[j(u,w[0])];0<y;)y=si[2*y+j(u,w[y])];w=-y,d[f+v]=w}n(g,b,d,f,4),b+=4,p[0+h]=w}}else w=j(u,156)?j(u,128)?1:3:j(u,163)?2:0,m.Ob[0]=w,i(d,f,w,4),i(p,0,w,4);m.Dd=j(u,142)?j(u,114)?j(u,183)?1:3:2:0}if(c.m.Ka)return Ke(e,7,"Premature end-of-partition0 encountered.");for(;e.ja<e.za;++e.ja){if(c=o,u=(l=e).rb[l.sb-1],d=l.rb[l.sb+l.ja],a=l.ya[l.aa+l.ja],f=l.kc?a.Ad:0)u.la=d.la=0,a.Za||(u.Na=d.Na=0),a.Hc=0,a.Gc=0,a.ia=0;else{var _,x;if(u=d,d=c,f=l.Pa.Xc,p=l.ya[l.aa+l.ja],m=l.pb[p.$b],h=p.ad,g=0,b=l.rb[l.sb-1],w=v=0,i(h,g,0,384),p.Za)var k=0,N=f[3];else{y=s(16);var S=u.Na+b.Na;
vendor: 6,411 bytes, lines 119-128
119if(S=ri(d,f[1],S,m.Eb,0,y,0),u.Na=b.Na=(0<S)+0,1<S)nn(y,0,h,g);else{var A=y[0]+3>>3;for(y=0;256>y;y+=16)h[g+y]=A}k=1,N=f[0]}var L=15&u.la,P=15&b.la;for(y=0;4>y;++y){var E=1&P;for(A=x=0;4>A;++A)L=L>>1|(E=(S=ri(d,N,S=E+(1&L),m.Sc,k,h,g))>k)<<7,x=x<<2|(3<S?3:1<S?2:0!=h[g+0]),g+=16;L>>=4,P=P>>1|E<<7,v=(v<<8|x)>>>0}for(N=L,k=P>>4,_=0;4>_;_+=2){for(x=0,L=u.la>>4+_,P=b.la>>4+_,y=0;2>y;++y){for(E=1&P,A=0;2>A;++A)S=E+(1&L),L=L>>1|(E=0<(S=ri(d,f[2],S,m.Qc,0,h,g)))<<3,x=x<<2|(3<S?3:1<S?2:0!=h[g+0]),g+=16;L>>=2,P=P>>1|E<<5}w|=x<<4*_,N|=L<<4<<_,k|=(240&P)<<_}u.la=N,b.la=k,p.Hc=v,p.Gc=w,p.ia=43690&w?0:m.ia,f=!(v|w)}if(0<l.L&&(l.wa[l.Y+l.ja]=l.gd[a.$b][a.Za],l.wa[l.Y+l.ja].La|=!f),c.Ka)return Ke(e,7,"Premature end-of-file encountered.")}if(Xe(e),l=r,c=1,a=(o=e).D,u=0<o.L&&o.M>=o.zb&&o.M<=o.Va,0==o.Aa)t:{if(a.M=o.M,a.uc=u,Tr(o,a),c=1,a=(x=o.D).Nb,u=(w=Di[o.L])*o.R,d=w/2*o.B,y=16*a*o.R,A=8*a*o.B,f=o.sa,p=o.ta-u+y,m=o.qa,h=o.ra-d+A,g=o.Ha,b=o.Ia-d+A,P=0==(L=x.M),v=L>=o.Va-1,2==o.Aa&&Tr(o,x),x.uc)for(E=(S=o).D.M,t(S.D.uc),x=S.yb;x<S.Hb;++x){k=x,N=E;var I=(T=(q=S).D).Nb;_=q.R;var T=T.wa[T.Y+k],O=q.sa,C=q.ta+16*I*_+16*k,R=T.dd,F=T.tc;if(0!=F)if(t(3<=F),1==q.L)0<k&&wn(O,C,_,F+4),T.La&&_n(O,C,_,F),0<N&&vn(O,C,_,F+4),T.La&&yn(O,C,_,F);else{var B=q.B,D=q.qa,M=q.ra+8*I*B+8*k,U=q.Ha,q=q.Ia+8*I*B+8*k;I=T.ld,0<k&&(hn(O,C,_,F+4,R,I),fn(D,M,U,q,B,F+4,R,I)),T.La&&(mn(O,C,_,F,R,I),bn(D,M,U,q,B,F,R,I)),0<N&&(un(O,C,_,F+4,R,I),dn(D,M,U,q,B,F+4,R,I)),T.La&&(pn(O,C,_,F,R,I),gn(D,M,U,q,B,F,R,I))}}if(o.ia&&alert("todo:DitherRow"),null!=l.put){if(x=16*L,L=16*(L+1),P?(l.y=o.sa,l.O=o.ta+y,l.f=o.qa,l.N=o.ra+A,l.ea=o.Ha,l.W=o.Ia+A):(x-=w,l.y=f,l.O=p,l.f=m,l.N=h,l.ea=g,l.W=b),v||(L-=w),L>l.o&&(L=l.o),l.F=null,l.J=null,null!=o.Fa&&0<o.Fa.length&&x<L&&(l.J=ur(o,l,x,L-x),l.F=o.mb,null==l.F&&0==l.F.length)){c=Ke(o,3,"Could not decode alpha data.");break t}x<l.j&&(w=l.j-x,x=l.j,t(!(1&w)),l.O+=o.R*w,l.N+=o.B*(w>>1),l.W+=o.B*(w>>1),null!=l.F&&(l.J+=l.width*w)),x<L&&(l.O+=l.v,l.N+=l.v>>1,l.W+=l.v>>1,null!=l.F&&(l.J+=l.v),l.ka=x-l.j,l.U=l.va-l.v,l.T=L-x,c=l.put(l))}a+1!=o.Ic||v||(n(o.sa,o.ta-u,f,p+16*o.R,u),n(o.qa,o.ra-d,m,h+8*o.B,d),n(o.Ha,o.Ia-d,g,b+8*o.B,d))}if(!c)return Ke(e,6,"Output aborted.")}return 1}(e,r)),null!=r.bc&&r.bc(r),o&=1}return o?(e.cb=0,o):0})(e,l)||(r=e.a)}}else r=e.a}0==r&&null!=h.Oa&&h.Oa.fd&&(r=Rr(h.ba))}h=r}u=0!=h?null:11>u?d.f.RGBA.eb:d.f.kb.y}else u=null;return u};var Ui=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(e,t){for(var r="",n=0;n<4;n++)r+=String.fromCharCode(e[t++]);return r}function u(e,t){return e[t+0]|e[t+1]<<8}function h(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16)>>>0}function d(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}new l;var f=[0],p=[0],m=[],g=new l,b=e,v=function(e,t){var r={},n=0,i=!1,s=0,a=0;if(r.frames=[],! 120/** @license 121 * Copyright (c) 2017 Dominik Homberger 122 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 123 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 124 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 125 https://webpjs.appspot.com 126 WebPRiffParser [email protected] 127 */ 128function(e,t){for(var r=0;r<4;r++)if(e[t+r]!="RIFF".charCodeAt(r))return!0;return!1}(e,t)){for(d(e,t+=4),t+=8;t<e.length;){var o=c(e,t),l=d(e,t+=4);t+=4;var f=l+(1&l);switch(o){case"VP8 ":case"VP8L":void 0===r.frames[n]&&(r.frames[n]={}),(g=r.frames[n]).src_off=i?a:t-8,g.src_size=s+l+8,n++,i&&(i=!1,s=0,a=0);break;case"VP8X":(g=r.header={}).feature_flags=e[t];var p=t+4;g.canvas_width=1+h(e,p),p+=3,g.canvas_height=1+h(e,p),p+=3;break;case"ALPH":i=!0,s=f+8,a=t-8;break;case"ANIM":(g=r.header).bgcolor=d(e,t),p=t+4,g.loop_count=u(e,p),p+=2;break;case"ANMF":var m,g;(g=r.frames[n]={}).offset_x=2*h(e,t),t+=3,g.offset_y=2*h(e,t),t+=3,g.width=1+h(e,t),t+=3,g.height=1+h(e,t),t+=3,g.duration=h(e,t),t+=3,m=e[t++],g.dispose=1&m,g.blend=m>>1&1}"ANMF"!=o&&(t+=f)}return r}}(b,0);v.response=b,v.rgbaoutput=!0,v.dataurl=!1;var w=v.header?v.header:null,y=v.frames?v.frames:null;if(w){w.loop_counter=w.loop_count,f=[w.canvas_height],p=[w.canvas_width];for(var _=0;_<y.length&&0!=y[_].blend;_++);}var x=y[0],k=g.WebPDecodeRGBA(b,x.src_off,x.src_size,p,f);x.rgba=k,x.imgwidth=p[0],x.imgheight=f[0];for(var N=0;N<p[0]*f[0]*4;N++)m[N]=k[N];return this.width=p,this.height=f,this.data=m,this}!function(e){var t,r,n,i,s,a,o,l,c,u=function(e){return e=e||{},this.isStrokeTransparent=e.isStrokeTransparent||!1,this.strokeOpacity=e.strokeOpacity||1,this.strokeStyle=e.strokeStyle||"#000000",this.fillStyle=e.fillStyle||"#000000",this.isFillTransparent=e.isFillTransparent||!1,this.fillOpacity=e.fillOpacity||1,this.font=e.font||"10px sans-serif",this.textBaseline=e.textBaseline||"alphabetic",this.textAlign=e.textAlign||"left",this.lineWidth=e.lineWidth||1,this.lineJoin=e.lineJoin||"miter",this.lineCap=e.lineCap||"butt",this.path=e.path||[],this.transform=void 0!==e.transform?e.transform.clone():new l,this.globalCompositeOperation=e.globalCompositeOperation||"normal",this.globalAlpha=e.globalAlpha||1,this.clip_path=e.clip_path||[],this.currentPoint=e.currentPoint||new a,this.miterLimit=e.miterLimit||10,this.lastPoint=e.lastPoint||new a,this.lineDashOffset=e.lineDashOffset||0,this.lineDash=e.lineDash||[],this.margin=e.margin||[0,0,0,0],this.prevPageLastElemOffset=e.prevPageLastElemOffset||0,this.ignoreClearRect="boolean"!=typeof e.ignoreClearRect||e.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new h(this),t=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,
vendor: 1,043 bytes, line 128
128s=this.internal.getVerticalCoordinate,a=this.internal.Point,o=this.internal.Rectangle,l=this.internal.Matrix,c=new u}]);var h=function(e){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var t=e;Object.defineProperty(this,"pdf",{get:function(){return t}});var r=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return r},set:function(e){r=Boolean(e)}});var n=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return n},set:function(e){n=Boolean(e)}});var i=0;Object.defineProperty(this,"posX",{get:function(){return i},set:function(e){isNaN(e)||(i=e)}});var s=0;Object.defineProperty(this,"posY",{get:function(){return s},set:function(e){isNaN(e)||(s=e)}}),Object.defineProperty(this,"margin",{get:function(){return c.margin},set:function(e){var t;"number"==typeof e?t=[e,e,e,e]:((t=new Array(4))[0]=e[0],t[1]=e.length>=2?e[1]:t[0],t[2]=e.length>=3?e[2]:t[0],t[3]=e.length>=4?e[3]:t[1]),c.margin=t}});var a=!1;Object.defineProperty(this,"autoPaging",{get:function(){return a}
vendor: 4,104 bytes, line 128
128,set:function(e){a=e}});var o=0;Object.defineProperty(this,"lastBreak",{get:function(){return o},set:function(e){o=e}});var l=[];Object.defineProperty(this,"pageBreaks",{get:function(){return l},set:function(e){l=e}}),Object.defineProperty(this,"ctx",{get:function(){return c},set:function(e){e instanceof u&&(c=e)}}),Object.defineProperty(this,"path",{get:function(){return c.path},set:function(e){c.path=e}});var h=[];Object.defineProperty(this,"ctxStack",{get:function(){return h},set:function(e){h=e}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(e){var t;t=d(e),this.ctx.fillStyle=t.style,this.ctx.isFillTransparent=0===t.a,this.ctx.fillOpacity=t.a,this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a}),this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(e){var t=d(e);this.ctx.strokeStyle=t.style,this.ctx.isStrokeTransparent=0===t.a,this.ctx.strokeOpacity=t.a,0===t.a?this.pdf.setDrawColor(255,255,255):(t.a,this.pdf.setDrawColor(t.r,t.g,t.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(e){-1!==["butt","round","square"].indexOf(e)&&(this.ctx.lineCap=e,this.pdf.setLineCap(e))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(e){isNaN(e)||(this.ctx.lineWidth=e,this.pdf.setLineWidth(e))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(e){-1!==["bevel","round","miter"].indexOf(e)&&(this.ctx.lineJoin=e,this.pdf.setLineJoin(e))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(e){isNaN(e)||(this.ctx.miterLimit=e,this.pdf.setMiterLimit(e))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(e){this.ctx.textBaseline=e}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(e){-1!==["right","end","center","left","start"].indexOf(e)&&(this.ctx.textAlign=e)}});var f=null,p=null,m=null;Object.defineProperty(this,"fontFaces",{get:function(){return m},set:function(e){f=null,p=null,m=e}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(e){var t;if(this.ctx.font=e,null!==(t=/^\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(e))){var r=t[1];t[2];var n=t[3],i=t[4];t[5];var s=t[6],a=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i="px"===a?Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor):"em"===a?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var o=function(e){var t,r,n=[],i=e.trim();if(""===i)return yp;if(i in op)return[op[i]];for(;""!==i;){switch(r=null,t=(i=cp(i)).charAt(0)){case'"':case"'":r=up(i.substring(1),t);break;default:r=hp(i)}if(null===r)return yp;if(n.push(r[0]),""!==(i=cp(r[1]))&&","!==i.charAt(0))return yp;i=i.replace(/^,/,"")}return n}(s);if(this.fontFaces){var l=function(e,t,r){for(var n=(r=r||{}).defaultFontFamily||"times",i=Object.assign({},ap,r.genericFontFamilies||{}),s=null,a=null,o=0;o<t.length;++o)if(i[(s=ip(t[o])).family]&&(s.family=i[s.family]),e.hasOwnProperty(s.family)){a=e[s.family];break}if(!(a=a||e[n]))throw new Error("Could not find a font-family for the rule '"+lp(s)+"' and default family '"+n+"'.");if(a=function(e,t){if(t[e])return t[e];var r=tp[e],n=r<=tp.normal?-1:1,i=sp(t,ep,r,n);if(!i)throw new Error("Could not find a matching font-stretch value for "+e);return i}(s.stretch,a),a=function(e,t){if(t[e])return t[e];for(var r=Qf[e],n=0;n<r.length;++n)if(t[r[n]])return t[r[n]];throw new Error("Could not find a matching font-style for "+e)}(s.style,a),!(a=function(e,t){if(t[e])return t[e];
vendor: 4,223 bytes, line 128
128if(400===e&&t[500])return t[500];if(500===e&&t[400])return t[400];var r=np[e],n=sp(t,rp,r,e<400?-1:1);if(!n)throw new Error("Could not find a matching font-weight for value "+e);return n}(s.weight,a)))throw new Error("Failed to resolve a font for the rule '"+lp(s)+"'.");return a}(function(e,t){var r,n,i=e.getFontList(),s=JSON.stringify(i);if(null===f||p!==s){var a=(r=i,n=[],Object.keys(r).forEach(function(e){r[e].forEach(function(t){var r=null;switch(t){case"bold":r={family:e,weight:"bold"};break;case"italic":r={family:e,style:"italic"};break;case"bolditalic":r={family:e,weight:"bold",style:"italic"};break;case"":case"normal":r={family:e}}null!==r&&(r.ref={name:e,style:t},n.push(r))})}),n);f=function(e){for(var t={},r=0;r<e.length;++r){var n=ip(e[r]),i=n.family,s=n.stretch,a=n.style,o=n.weight;t[i]=t[i]||{},t[i][s]=t[i][s]||{},t[i][s][a]=t[i][s][a]||{},t[i][s][a][o]=n}return t}(a.concat(t)),p=s}return f}(this.pdf,this.fontFaces),o.map(function(e){return{family:e,stretch:"normal",weight:n,style:r}}));this.pdf.setFont(l.ref.name,l.ref.style)}else{var c="";("bold"===n||parseInt(n,10)>=700||"bold"===r)&&(c="bold"),"italic"===r&&(c+="italic"),0===c.length&&(c="normal");for(var u="",h={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"},d=0;d<o.length;d++){if(void 0!==this.pdf.internal.getFont(o[d],c,{noFallback:!0,disableWarning:!0})){u=o[d];break}if("bolditalic"===c&&void 0!==this.pdf.internal.getFont(o[d],"bold",{noFallback:!0,disableWarning:!0}))u=o[d],c="bold";else if(void 0!==this.pdf.internal.getFont(o[d],"normal",{noFallback:!0,disableWarning:!0})){u=o[d],c="normal";break}}if(""===u)for(var m=0;m<o.length;m++)if(h[o[m]]){u=h[o[m]];break}u=""===u?"Times":u,this.pdf.setFont(u,c)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(e){this.ctx.globalCompositeOperation=e}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(e){this.ctx.globalAlpha=e}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(e){this.ctx.lineDashOffset=e,B.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(e){this.ctx.lineDash=e,B.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(e){this.ctx.ignoreClearRect=Boolean(e)}})};h.prototype.setLineDash=function(e){this.lineDash=e},h.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},h.prototype.fill=function(){y.call(this,"fill",!1)},h.prototype.stroke=function(){y.call(this,"stroke",!1)},h.prototype.beginPath=function(){this.path=[{type:"begin"}]},h.prototype.moveTo=function(e,t){if(isNaN(e)||isNaN(t))throw Id.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var r=this.ctx.transform.applyToPoint(new a(e,t));this.path.push({type:"mt",x:r.x,y:r.y}),this.ctx.lastPoint=new a(e,t)},h.prototype.closePath=function(){var e=new a(0,0),t=0;for(t=this.path.length-1;-1!==t;t--)if("begin"===this.path[t].type&&"object"===Ro(this.path[t+1])&&"number"==typeof this.path[t+1].x){e=new a(this.path[t+1].x,this.path[t+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new a(e.x,e.y)},h.prototype.lineTo=function(e,t){if(isNaN(e)||isNaN(t))throw Id.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var r=this.ctx.transform.applyToPoint(new a(e,t));this.path.push({type:"lt",x:r.x,y:r.y}),this.ctx.lastPoint=new a(r.x,r.y)},h.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),y.call(this,null,!0)},h.prototype.quadraticCurveTo=function(e,t,r,n){if(isNaN(r)||isNaN(n)||isNaN(e)||isNaN(t))throw Id.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to
128jsPDF.context2d.quadraticCurveTo");var i=this.ctx.transform.applyToPoint(new a(r,n)),s=this.ctx.transform.applyToPoint(new a(e,t));this.path.push({type:"qct",x1:s.x,y1:s.y,x:i.x,y:i.y}),this.ctx.lastPoint=new a(i.x,i.y)},h.prototype.bezierCurveTo=function(e,t,r,n,i,s){if(isNaN(i)||isNaN(s)||isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n))throw Id.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var o=this.ctx.transform.applyToPoint(new a(i,s)),l=this.ctx.transform.applyToPoint(new a(e,t)),c=this.ctx.transform.applyToPoint(new a(r,n));this.path.push({type:"bct",x1:l.x,y1:l.y,x2:c.x,y2:c.y,x:o.x,y:o.y}),this.ctx.lastPoint=new a(o.x,o.y)},h.prototype.arc=function(e,t,r,n,i,s){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n)||isNaN(i))throw Id.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(s=Boolean(s),!this.ctx.transform.isIdentity){var o=this.ctx.transform.applyToPoint(new a(e,t));e=o.x,t=o.y;var l=this.ctx.transform.applyToPoint(new a(0,r)),c=this.ctx.transform.applyToPoint(new a(0,0));r=Math.sqrt(Math.pow(l.x-c.x,2)+Math.pow(l.y-c.y,2))}Math.abs(i-n)>=2*Math.PI&&(n=0,i=2*Math.PI),this.path.push({type:"arc",x:e,y:t,radius:r,startAngle:n,endAngle:i,counterclockwise:s})},h.prototype.arcTo=function(e,t,r,n,i){throw new Error("arcTo not implemented.")},h.prototype.rect=function(e,t,r,n){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n))throw Id.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(e,t),this.lineTo(e+r,t),this.lineTo(e+r,t+n),this.lineTo(e,t+n),this.lineTo(e,t),this.lineTo(e+r,t),this.lineTo(e,t)},h.prototype.fillRect=function(e,t,r,n){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n))throw Id.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var i={};"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(e,t,r,n),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin)}},h.prototype.strokeRect=function(e,t,r,n){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n))throw Id.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(e,t,r,n),this.stroke())},h.prototype.clearRect=function(e,t,r,n){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n))throw Id.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(e,t,r,n))},h.prototype.save=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("q");if(this.pdf.setPage(t),e){this.ctx.fontSize=this.pdf.internal.getFontSize();var n=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},h.prototype.restore=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("Q");this.pdf.setPage(t),e&&0!==this.ctxStack.length&&(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)},h.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var d=function(e){var t,r,n,i;if(!0===e.isCanvasGradient&&(e=e.getColor()),!e)return{r:0,g:0,b:0,a:0,style:e};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(e))t=0,r=0,n=0,i=0;else{var s=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(e);if(null!==s)t=parseInt(s[1]),r=parseInt(s[2]),n=parseInt(s[3]),i=1;else if(null!==(s=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(e)))t=parseInt(s[1]),r=parseInt(s[2]),n=parseInt(s[3]),i=parseFloat(s[4]);else{if(i=1,"string"==typeof e&&"#"!==e.charAt(0)){var a=new Fd(e);e=a.ok?a.toHex():"#000000"}4===e.length?(t=e.substring(1,2),t+=t,r=e.substring(2,3),r+=r,n=e.substring(3,4),n+=n):(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7)),t=parseInt(t,16),r=parseInt(r,16),n=parseInt(n,16)}}return{r:t,g:r,b:n,a:i,style:e}},f=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},p=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};h.prototype.fillText=function(e,t,r,n){if(isNaN(t)||isNaN(r)||"string"!=typeof e)throw Id.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to
128jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!f.call(this)){var i=C(this.ctx.transform.rotation),s=this.ctx.transform.scaleX;j.call(this,{text:e,x:t,y:r,scale:s,angle:i,align:this.textAlign,maxWidth:n})}},h.prototype.strokeText=function(e,t,r,n){if(isNaN(t)||isNaN(r)||"string"!=typeof e)throw Id.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){n=isNaN(n)?void 0:n;var i=C(this.ctx.transform.rotation),s=this.ctx.transform.scaleX;j.call(this,{text:e,x:t,y:r,scale:s,renderingMode:"stroke",angle:i,align:this.textAlign,maxWidth:n})}},h.prototype.measureText=function(e){if("string"!=typeof e)throw Id.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var t=this.pdf,r=this.pdf.internal.scaleFactor,n=t.internal.getFontSize(),i=t.getStringUnitWidth(e)*n/t.internal.scaleFactor;return new function(e){var t=(e=e||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return t}}),this}({width:i*=Math.round(96*r/72*1e4)/1e4})},h.prototype.scale=function(e,t){if(isNaN(e)||isNaN(t))throw Id.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var r=new l(e,0,0,t,0,0);this.ctx.transform=this.ctx.transform.multiply(r)},h.prototype.rotate=function(e){if(isNaN(e))throw Id.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var t=new l(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0);this.ctx.transform=this.ctx.transform.multiply(t)},h.prototype.translate=function(e,t){if(isNaN(e)||isNaN(t))throw Id.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var r=new l(1,0,0,1,e,t);this.ctx.transform=this.ctx.transform.multiply(r)},h.prototype.transform=function(e,t,r,n,i,s){if(isNaN(e)||isNaN(t)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(s))throw Id.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var a=new l(e,t,r,n,i,s);this.ctx.transform=this.ctx.transform.multiply(a)},h.prototype.setTransform=function(e,t,r,n,i,s){e=isNaN(e)?1:e,t=isNaN(t)?0:t,r=isNaN(r)?0:r,n=isNaN(n)?1:n,i=isNaN(i)?0:i,s=isNaN(s)?0:s,this.ctx.transform=new l(e,t,r,n,i,s)};var m=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};h.prototype.drawImage=function(e,t,r,n,i,s,a,c,u){var h=this.pdf.getImageProperties(e),d=1,f=1,p=1,b=1;void 0!==n&&void 0!==c&&(p=c/n,b=u/i,d=h.width/n*c/n,f=h.height/i*u/i),void 0===s&&(s=t,a=r,t=0,r=0),void 0!==n&&void 0===c&&(c=n,u=i),void 0===n&&void 0===c&&(c=h.width,u=h.height);var y=this.ctx.transform.decompose(),x=C(y.rotate.shx),k=new l,N=(k=(k=(k=k.multiply(y.translate)).multiply(y.skew)).multiply(y.scale)).applyToRectangle(new o(s-t*p,a-r*b,n*d,i*f));if(this.autoPaging){for(var S,A=g.call(this,N),L=[],j=0;j<A.length;j+=1)-1===L.indexOf(A[j])&&L.push(A[j]);w(L);for(var P=L[0],E=L[L.length-1],I=P;I<E+1;I++){this.pdf.setPage(I);var T=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],O=1===I?this.posY+this.margin[0]:this.margin[0],R=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],F=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],B=1===I?0:R+(I-2)*F;if(0!==this.ctx.clip_path.length){var D=this.path;S=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(S,this.posX+this.margin[3],-B+O+this.ctx.prevPageLastElemOffset),_.call(this,"fill",!0),this.path=D}var M=JSON.parse(JSON.stringify(N));M=v([M],this.posX+this.margin[3],-B+O+this.ctx.prevPageLastElemOffset)[0];var U=(I>P||I<E)&&m.call(this);U&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],T,F,null).clip().discardPath()),this.pdf.addImage(e,"JPEG",M.x,M.y,M.w,M.h,null,null,x),U&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(e,"JPEG",N.x,N.y,N.w,N.h,null,null,x)};var g=function(e,t,r){var n=[];t=t||this.pdf.internal.pageSize.width,r=r||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var i=this.posY+this.ctx.prevPageLastElemOffset;switch(e.type){default:case"mt":case"lt":n.push(Math.floor((e.y+i)/r)+1);break;case"arc":n.push(Math.floor((e.y+i-e.radius)/r)+1),n.push(Math.floor((e.y+i+e.radius)/r)+1);break;case"qct":var s=R(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x,e.y);n.push(Math.floor((s.y+i)/r)+1),n.push(Math.floor((s.y+s.h+i)/r)+1);break;case"bct":var a=F(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x2,e.y2,e.x,e.y);n.push(Math.floor((a.y+i)/r)+1),n.push(Math.floor((a.y+a.h+i)/r)+1);break;
vendor: 10,430 bytes, lines 128-137
128case"rect":n.push(Math.floor((e.y+i)/r)+1),n.push(Math.floor((e.y+e.h+i)/r)+1)}for(var o=0;o<n.length;o+=1)for(;this.pdf.internal.getNumberOfPages()<n[o];)b.call(this);return n},b=function(){var e=this.fillStyle,t=this.strokeStyle,r=this.font,n=this.lineCap,i=this.lineWidth,s=this.lineJoin;this.pdf.addPage(),this.fillStyle=e,this.strokeStyle=t,this.font=r,this.lineCap=n,this.lineWidth=i,this.lineJoin=s},v=function(e,t,r){for(var n=0;n<e.length;n++)switch(e[n].type){case"bct":e[n].x2+=t,e[n].y2+=r;case"qct":e[n].x1+=t,e[n].y1+=r;default:e[n].x+=t,e[n].y+=r}return e},w=function(e){return e.sort(function(e,t){return e-t})},y=function(e,t){var r=this.fillStyle,n=this.strokeStyle,i=this.lineCap,s=this.lineWidth,a=Math.abs(s*this.ctx.transform.scaleX),o=this.lineJoin;if(this.autoPaging){for(var l,c,u=JSON.parse(JSON.stringify(this.path)),h=JSON.parse(JSON.stringify(this.path)),d=[],f=0;f<h.length;f++)if(void 0!==h[f].x)for(var p=g.call(this,h[f]),y=0;y<p.length;y+=1)-1===d.indexOf(p[y])&&d.push(p[y]);for(var x=0;x<d.length;x++)for(;this.pdf.internal.getNumberOfPages()<d[x];)b.call(this);w(d);for(var k=d[0],N=d[d.length-1],S=k;S<N+1;S++){this.pdf.setPage(S),this.fillStyle=r,this.strokeStyle=n,this.lineCap=i,this.lineWidth=a,this.lineJoin=o;var A=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],L=1===S?this.posY+this.margin[0]:this.margin[0],j=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],P=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],E=1===S?0:j+(S-2)*P;if(0!==this.ctx.clip_path.length){var I=this.path;l=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(l,this.posX+this.margin[3],-E+L+this.ctx.prevPageLastElemOffset),_.call(this,e,!0),this.path=I}if(c=JSON.parse(JSON.stringify(u)),this.path=v(c,this.posX+this.margin[3],-E+L+this.ctx.prevPageLastElemOffset),!1===t||0===S){var T=(S>k||S<N)&&m.call(this);T&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],A,P,null).clip().discardPath()),_.call(this,e,t),T&&this.pdf.restoreGraphicsState()}this.lineWidth=s}this.path=u}else this.lineWidth=a,_.call(this,e,t),this.lineWidth=s},_=function(e,t){if(("stroke"!==e||t||!p.call(this))&&("stroke"===e||t||!f.call(this))){for(var r,n,i=[],s=this.path,a=0;a<s.length;a++){var o=s[a];switch(o.type){case"begin":i.push({begin:!0});break;case"close":i.push({close:!0});break;case"mt":i.push({start:o,deltas:[],abs:[]});break;case"lt":var l=i.length;if(s[a-1]&&!isNaN(s[a-1].x)&&(r=[o.x-s[a-1].x,o.y-s[a-1].y],l>0))for(;l>=0;l--)if(!0!==i[l-1].close&&!0!==i[l-1].begin){i[l-1].deltas.push(r),i[l-1].abs.push(o);break}break;case"bct":r=[o.x1-s[a-1].x,o.y1-s[a-1].y,o.x2-s[a-1].x,o.y2-s[a-1].y,o.x-s[a-1].x,o.y-s[a-1].y],i[i.length-1].deltas.push(r);break;case"qct":var c=s[a-1].x+2/3*(o.x1-s[a-1].x),u=s[a-1].y+2/3*(o.y1-s[a-1].y),h=o.x+2/3*(o.x1-o.x),d=o.y+2/3*(o.y1-o.y),m=o.x,g=o.y;r=[c-s[a-1].x,u-s[a-1].y,h-s[a-1].x,d-s[a-1].y,m-s[a-1].x,g-s[a-1].y],i[i.length-1].deltas.push(r);break;case"arc":i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(o)}}n=t?null:"stroke"===e?"stroke":"fill";for(var b=!1,v=0;v<i.length;v++)if(i[v].arc)for(var w=i[v].abs,y=0;y<w.length;y++){var _=w[y];"arc"===_.type?N.call(this,_.x,_.y,_.radius,_.startAngle,_.endAngle,_.counterclockwise,void 0,t,!b):P.call(this,_.x,_.y),b=!0}else if(!0===i[v].close)this.pdf.internal.out("h"),b=!1;else if(!0!==i[v].begin){var x=i[v].start.x,k=i[v].start.y;E.call(this,i[v].deltas,x,k),b=!0}n&&S.call(this,n),t&&A.call(this)}},x=function(e){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,r=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return e-r;case"top":return e+t-r;case"hanging":return e+t-2*r;case"middle":return e+t/2-r;default:return e}},k=function(e){return e+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};h.prototype.createLinearGradient=function(){var e=function(){};return e.colorStops=[],e.addColorStop=function(e,t){this.colorStops.push([e,t])},e.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},e.isCanvasGradient=!0,e},h.prototype.createPattern=function(){return this.createLinearGradient()},h.prototype.createRadialGradient=function(){return this.createLinearGradient()};var N=function(e,t,r,n,i,s,a,o,l){for(var c=T.call(this,r,n,i,s),u=0;u<c.length;u++){var h=c[u];0===u&&(l?L.call(this,h.x1+e,h.y1+t):P.call(this,h.x1+e,h.y1+t)),I.call(this,e,t,h.x2,h.y2,h.x3,h.y3,h.x4,h.y4)}o?A.call(this):S.call(this,a)},S=function(e){switch(e){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},A=function(){this.pdf.clip(),this.pdf.discardPath()},L=function(e,t){this.pdf.internal.out(r(e)+" "+n(t)+" m")},j=function(e){var t;switch(e.align){case"right":case"end":t="right";break;case"center":t="center";break;default:t="left"}var r,n,i,s=this.pdf.getTextDimensions(e.text),c=x.call(this,e.y),u=k.call(this,c)-s.h,h=this.ctx.transform.applyToPoint(new a(e.x,c));if(this.autoPaging){var d=this.ctx.transform.decompose(),f=new l;f=(f=(f=f.multiply(d.translate)).multiply(d.skew)).multiply(d.scale);for(var p=this.ctx.transform.applyToRectangle(new o(e.x,c,s.w,s.h)),b=f.applyToRectangle(new o(e.x,u,s.w,s.h)),y=g.call(this,b),N=[],S=0;S<y.length;S+=1)-1===N.indexOf(y[S])&&N.push(y[S]);w(N);for(var A=N[0],L=N[N.length-1],j=A;j<L+1;j++){this.pdf.setPage(j);var P=1===j?this.posY+this.margin[0]:this.margin[0],E=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],I=this.pdf.internal.pageSize.height-this.margin[2],T=I-this.margin[0],O=this.pdf.internal.pageSize.width-this.margin[1],C=O-this.margin[3],R=1===j?0:E+(j-2)*T;if(0!==this.ctx.clip_path.length){var F=this.path;r=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(r,this.posX+this.margin[3],-1*R+P),_.call(this,"fill",!0),this.path=F}var B=v([JSON.parse(JSON.stringify(b))],this.posX+this.margin[3],-R+P+this.ctx.prevPageLastElemOffset)[0];e.scale>=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale);var D="text"!==this.autoPaging;if(D||B.y+B.h<=I){if(D||B.y>=P&&B.x<=O){var M=D?e.text:this.pdf.splitTextToSize(e.text,e.maxWidth||O-B.x)[0],U=v([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-R+P+this.ctx.prevPageLastElemOffset)[0],q=D&&(j>A||j<L)&&m.call(this);q&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],C,T,null).clip().discardPath()),this.pdf.text(M,U.x,U.y,{angle:e.angle,align:t,renderingMode:e.renderingMode}),q&&this.pdf.restoreGraphicsState()}}else B.y<I&&(this.ctx.prevPageLastElemOffset+=I-B.y);e.scale>=.01&&(this.pdf.setFontSize(n),this.lineWidth=i)}}else e.scale>=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale),this.pdf.text(e.text,h.x+this.posX,h.y+this.posY,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),e.scale>=.01&&(this.pdf.setFontSize(n),this.lineWidth=i)},P=function(e,t,i,s){i=i||0,s=s||0,this.pdf.internal.out(r(e+i)+" "+n(t+s)+" l")},E=function(e,t,r){return this.pdf.lines(e,t,r,null,null)},I=function(e,r,n,a,o,l,c,u){this.pdf.internal.out([t(i(n+e)),t(s(a+r)),t(i(o+e)),t(s(l+r)),t(i(c+e)),t(s(u+r)),"c"].join(" "))},T=function(e,t,r,n){for(var i=2*Math.PI,s=Math.PI/2;t>r;)t-=i;var a=Math.abs(r-t);a<i&&n&&(a=i-a);for(var o=[],l=n?-1:1,c=t;a>1e-5;){var u=c+l*Math.min(a,s);o.push(O.call(this,e,c,u)),a-=Math.abs(u-c),c=u}return o},O=function(e,t,r){var n=(r-t)/2,i=e*Math.cos(n),s=e*Math.sin(n),a=i,o=-s,l=a*a+o*o,c=l+a*i+o*s,u=4/3*(Math.sqrt(2*l*c)-c)/(a*s-o*i),h=a-u*o,d=o+u*a,f=h,p=-d,m=n+t,g=Math.cos(m),b=Math.sin(m);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:h*g-d*b,y2:h*b+d*g,x3:f*g-p*b,y3:f*b+p*g,x4:e*Math.cos(r),y4:e*Math.sin(r)}},C=function(e){return 180*e/Math.PI},R=function(e,t,r,n,i,s){var a=e+.5*(r-e),l=t+.5*(n-t),c=i+.5*(r-i),u=s+.5*(n-s),h=Math.min(e,i,a,c),d=Math.max(e,i,a,c),f=Math.min(t,s,l,u),p=Math.max(t,s,l,u);return new o(h,f,d-h,p-f)},F=function(e,t,r,n,i,s,a,l){var c,u,h,d,f,p,m,g,b,v,w,y,_,x,k=r-e,N=n-t,S=i-r,A=s-n,L=a-i,j=l-s;for(u=0;u<41;u++)b=(m=(h=e+(c=u/40)*k)+c*((f=r+c*S)-h))+c*(f+c*(i+c*L-f)-m),v=(g=(d=t+c*N)+c*((p=n+c*A)-d))+c*(p+c*(s+c*j-p)-g),0==u?(w=b,y=v,_=b,x=v):(w=Math.min(w,b),y=Math.min(y,v),_=Math.max(_,b),x=Math.max(x,v));return new o(Math.round(w),Math.round(y),Math.round(_-w),Math.round(x-y))},B=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var e,t,r=(e=this.ctx.lineDash,t=this.ctx.lineDashOffset,JSON.stringify({lineDash:e,lineDashOffset:t}));this.prevLineDash!==r&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=r)}}}(cf.API), 129/** 130 * @license 131 * jsPDF filters PlugIn 132 * Copyright (c) 2014 Aras Abbasi 133 * 134 * Licensed under the MIT License. 135 * http://opensource.org/licenses/mit-license 136 */ 137function(e){var t=function(e){var t,r,n,i,s,a,o,l,c,u;for(r=[],n=0,i=(e+=t="\0\0\0\0".slice(e.length%4||4)).length;i>n;n+=4)0!==(s=(e.charCodeAt(n)<<24)+(e.charCodeAt(n+1)<<16)+(e.charCodeAt(n+2)<<8)+e.charCodeAt(n+3))?(a=(s=((s=((s=((s=(s-(u=s%85))/85)-(c=s%85))/85)-(l=s%85))/85)-(o=s%85))/85)%85,r.push(a+33,o+33,l+33,c+33,u+33)):r.push(122);return function(e,t){for(var r=t;r>0;r--)e.pop()}(r,t.length),String.fromCharCode.apply(String,r)+"~>"},r=function(e){var t,r,n,i,s,a=String,o="length",l=255,c="charCodeAt",u="slice",h="replace";for(e[u](-2),e=e[u](0,-2)[h](/\s/g,"")[h]("z","!!!!!"),n=[],i=0,s=(e+=t="uuuuu"[u](e[o]%5||5))[o];s>i;i+=5)r=52200625*(e[c](i)-33)+614125*(e[c](i+1)-33)+7225*(e[c](i+2)-33)+85*(e[c](i+3)-33)+(e[c](i+4)-33),n.push(l&r>>24,l&r>>16,l&r>>8,l&r);return function(e,t){for(var r=t;r>0;r--)e.pop()}(n,t[o]),a.fromCharCode.apply(a,n)},n=function(e){return e.split("").map(function(e){return("0"+e.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(e=e.replace(/\s/g,"")).indexOf(">")&&(e=e.substr(0,e.indexOf(">"))),e.length%2&&(e+="0"),!1===t.test(e))return"";for(var r="",n=0;n<e.length;n+=2)r+=String.fromCharCode("0x"+(e[n]+e[n+1]));return r},s=function(e){for(var t=new Uint8Array(e.length),r=e.length;r--;)t[r]=e.charCodeAt(r);return(t=ml(t)).reduce(function(e,t){return e+String.fromCharCode(t)},"")};e.processDataByFilters=function(e,a){var o=0,l=e||"",c=[];
vendor: 4,103 bytes, lines 137-146
137for("string"==typeof(a=a||[])&&(a=[a]),o=0;o<a.length;o+=1)switch(a[o]){case"ASCII85Decode":case"/ASCII85Decode":l=r(l),c.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":l=t(l),c.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":l=i(l),c.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":l=n(l),c.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":l=s(l),c.push("/FlateDecode");break;default:throw new Error('The filter: "'+a[o]+'" is not implemented')}return{data:l,reverseChain:c.reverse().join(" ")}}}(cf.API), 138/** 139 * @license 140 * jsPDF fileloading PlugIn 141 * Copyright (c) 2018 Aras Abbasi ([email protected]) 142 * 143 * Licensed under the MIT License. 144 * http://opensource.org/licenses/mit-license 145 */ 146function(e){e.loadFile=function(e,t,r){return function(e,t,r){t=!1!==t,r="function"==typeof r?r:function(){};var n=void 0;try{n=function(e,t,r){var n=new XMLHttpRequest,i=0,s=function(e){var t=e.length,r=[],n=String.fromCharCode;for(i=0;i<t;i+=1)r.push(n(255&e.charCodeAt(i)));return r.join("")};if(n.open("GET",e,!t),n.overrideMimeType("text/plain; charset=x-user-defined"),!1===t&&(n.onload=function(){200===n.status?r(s(this.responseText)):r(void 0)}),n.send(null),t&&200===n.status)return s(n.responseText)}(e,t,r)}catch(i){}return n}(e,t,r)},e.loadImageFile=e.loadFile}(cf.API),function(e){function t(){return(Pd.html2canvas?Promise.resolve(Pd.html2canvas):Co(()=>import("./html2canvas.esm-BPY6V10C.js"),[])).catch(function(e){return Promise.reject(new Error("Could not load html2canvas: "+e))}).then(function(e){return e.default?e.default:e})}function r(){return(Pd.DOMPurify?Promise.resolve(Pd.DOMPurify):Co(()=>import("./purify.es-zuchd6YL.js"),[])).catch(function(e){return Promise.reject(new Error("Could not load dompurify: "+e))}).then(function(e){return e.default?e.default:e})}var n=function(e){var t=Ro(e);return"undefined"===t?"undefined":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===t?"object":"unknown"},i=function(e,t){var r=document.createElement(e);for(var n in t.className&&(r.className=t.className),t.innerHTML&&t.dompurify&&(r.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)r.style[n]=t.style[n];return r},s=function e(t,r){for(var n=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;i=i.nextSibling)!0!==r&&1===i.nodeType&&"SCRIPT"===i.nodeName||n.appendChild(e(i,r));return 1===t.nodeType&&("CANVAS"===t.nodeName?(n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(n.value=t.value),n.addEventListener("load",function(){n.scrollTop=t.scrollTop,n.scrollLeft=t.scrollLeft},!0)),n},a=function e(t){var r=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),n=e.convert(Promise.resolve(),r);return(n=n.setProgress(1,e,1,[e])).set(t)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(e,t){return e.__proto__=t||a.prototype,e},a.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"}},a.prototype.from=function(e,t){return this.then(function(){switch(t=t||function(e){switch(n(e)){case"string":return"string";case"element":return"canvas"===e.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(e)){case"string":return this.then(r).then(function(t){return this.set({src:i("div",{innerHTML:e,dompurify:t})})});case"element":return this.set({src:e});case"canvas":return this.set({canvas:e});case"img":return this.set({img:e});default:return this.error("Unknown source type.")}})},a.prototype.to=function(e){switch(e){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();
vendor: 4,174 bytes, line 146
146case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.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 e={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||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},t=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(e.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:e}),this.prop.container.appendChild(t),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"})},a.prototype.toCanvas=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then(function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then(function(e){var t=this.opt.jsPDF,r=this.opt.fontFaces,n="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:!0,allowTaint:!0,scale:n,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 i.onrendered,t.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=r,r)for(var s=0;s<r.length;++s){var a=r[s],o=a.src.find(function(e){return"truetype"===e.format});o&&t.addFont(o.url,a.ref.name,a.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=0==i.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,t.context2d.save(!0),e(this.prop.container,i)}).then(function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var e=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=e})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(e,t,r){return"img"===(r=r||"pdf").toLowerCase()||"image"===r.toLowerCase()?this.outputImg(e,t):this.outputPdf(e,t)},a.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf(
vendor: 11,245 bytes, lines 146-161
146)}]).then(function(){return this.prop.pdf.output(e,t)})},a.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(e){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 "'+e+'" is not supported.'}})},a.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(e){if("object"!==n(e))return this;var t=Object.keys(e||{}).map(function(t){if(t in a.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},a.prototype.get=function(e,t){return this.then(function(){var r=e in a.template.prop?this.prop[e]:this.opt[e];return t?t(r):r})},a.prototype.setMargin=function(e){return this.then(function(){switch(n(e)){case"number":e=[e,e,e,e];case"array":if(2===e.length&&(e=[e[0],e[1],e[0],e[1]]),4===e.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=e}).then(this.setPageSize)},a.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then(function(){(e=e||cf.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e})},a.prototype.setProgress=function(e,t,r,n){return null!=e&&(this.progress.val=e),null!=t&&(this.progress.state=t),null!=r&&(this.progress.n=r),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(e,t,r,n){return this.setProgress(e?this.progress.val+e:null,t||null,r?this.progress.n+r:null,n?this.progress.stack.concat(n):null)},a.prototype.then=function(e,t){var r=this;return this.thenCore(e,t,function(e,t){return r.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return r.updateProgress(null,e),t}).then(e,t).then(function(e){return r.updateProgress(1),e})})},a.prototype.thenCore=function(e,t,r){r=r||Promise.prototype.then;var n=this;e&&(e=e.bind(n)),t&&(t=t.bind(n));var i=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?n:a.convert(Object.assign({},n),Promise.prototype),s=r.call(i,e,t);return a.convert(s,n.__proto__)},a.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},a.prototype.thenList=function(e){var t=this;return e.forEach(function(e){t=t.thenCore(e)}),t},a.prototype.catch=function(e){e&&(e=e.bind(this));var t=Promise.prototype.catch.call(this,e);return a.convert(t,this)},a.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},a.prototype.error=function(e){return this.then(function(){throw new Error(e)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,cf.getPageSize=function(e,t,r){if("object"===Ro(e)){var n=e;e=n.orientation,t=n.unit||t,r=n.format||r}t=t||"mm",r=r||"a4",e=(""+(e||"P")).toLowerCase();var i,s=(""+r).toLowerCase(),a={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(t){case"pt":i=1;break;case"mm":i=72/25.4;break;case"cm":i=72/2.54;break;case"in":i=72;break;case"px":i=.75;break;case"pc":case"em":i=12;break;case"ex":i=6;break;default:throw"Invalid unit: "+t}var o,l=0,c=0;if(a.hasOwnProperty(s))l=a[s][1]/i,c=a[s][0]/i;else try{l=r[1],c=r[0]}catch(u){throw new Error("Invalid format: "+r)}if("p"===e||"portrait"===e)e="p",c>l&&(o=c,c=l,l=o);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",l>c&&(o=c,c=l,l=o)}return{width:c,height:l,unit:t,k:i,orientation:e}},e.html=function(e,t){(t=t||{}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(ip):null;var r=new a(t);return t.worker?r:r.from(e).doCallback()}}(cf.API),cf.API.addJS=function(e){return pp=e,this.internal.events.subscribe("postPutResources",function(){dp=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(dp+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),fp=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+pp+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==dp&&void 0!==fp&&this.internal.out("/Names <</JavaScript "+dp+" 0 R>>")}),this}, 147/** 148 * @license 149 * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) [email protected] 150 * 151 * Licensed under the MIT License. 152 * http://opensource.org/licenses/mit-license 153 */ 154function(e){var t;e.events.push(["postPutResources",function(){var e=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=e.outline.render().split(/\r\n/),i=0;i<n.length;i++){var s=n[i],a=r.exec(s);if(null!=a){var o=a[1];e.internal.newObjectDeferredBegin(o,!1)}e.internal.write(s)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,c=[];for(i=0;i<l;i++){var u=e.internal.newObject();c.push(u);var h=e.internal.getPageInfo(i+1);e.internal.write("<< /D["+h.objId+" 0 R /XYZ null null null]>> endobj")}var d=e.internal.newObject();for(e.internal.write("<< /Names [ "),i=0;i<c.length;i++)e.internal.write("(page_"+(i+1)+")"+c[i]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+d+" 0 R"),e.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(e,t,r){var n={title:t,options:r,children:[]};return null==e&&(e=this.root),e.children.push(n),n},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(t){t.id=e.internal.newObjectDeferred();for(var r=0;r<t.children.length;r++)this.genIds_r(t.children[r])},e.outline.renderRoot=function(e){this.objStart(e),this.line("/Type /Outlines"),e.children.length>0&&(this.line("/First "+this.makeRef(e.children[0])),this.line("/Last "+this.makeRef(e.children[e.children.length-1]))),this.line("/Count "+this.count_r({count:0},e)),this.objEnd()},e.outline.renderItems=function(t){for(var r=this.ctx.pdf.internal.getVerticalCoordinateString,n=0;n<t.children.length;n++){var i=t.children[n];this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(t)),n>0&&this.line("/Prev "+this.makeRef(t.children[n-1])),n<t.children.length-1&&this.line("/Next "+this.makeRef(t.children[n+1])),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var s=this.count=this.count_r({count:0},i);if(s>0&&this.line("/Count "+s),i.options&&i.options.pageNumber){var a=e.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+a.objId+" 0 R /XYZ 0 "+r(0)+" 0]")}this.objEnd()}for(var o=0;o<t.children.length;o++)this.renderItems(t.children[o])},e.outline.line=function(e){this.ctx.val+=e+"\r\n"},e.outline.makeRef=function(e){return e.id+" 0 R"},e.outline.makeString=function(t){return"("+e.internal.pdfEscape(t)+")"},e.outline.objStart=function(e){this.ctx.val+="\r\n"+e.id+" 0 obj\r\n<<\r\n"},e.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},e.outline.count_r=function(e,t){for(var r=0;r<t.children.length;r++)e.count++,this.count_r(e,t.children[r]);return e.count}}])}(cf.API), 155/** 156 * @license 157 * 158 * Licensed under the MIT License. 159 * http://opensource.org/licenses/mit-license 160 */ 161function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(e,r,n,i,s,a){var o,l=this.decode.DCT_DECODE,c=null;if("string"==typeof e||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=s||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,(o=function(e){for(var r,n=256*e.charCodeAt(4)+e.charCodeAt(5),i=e.length,s={width:0,height:0,numcomponents:1},a=4;a<i;a+=2){if(a+=n,-1!==t.indexOf(e.charCodeAt(a+1))){r=256*e.charCodeAt(a+5)+e.charCodeAt(a+6),s={width:256*e.charCodeAt(a+7)+e.charCodeAt(a+8),height:r,numcomponents:e.charCodeAt(a+9)};break}n=256*e.charCodeAt(a+2)+e.charCodeAt(a+3)}return s}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e)).numcomponents){case 1:a=this.color_spaces.DEVICE_GRAY;break;case 4:a=this.color_spaces.DEVICE_CMYK;break;case 3:a=this.color_spaces.DEVICE_RGB}c={data:e,width:o.width,height:o.height,colorSpace:a,bitsPerComponent:8,filter:l,index:r,alias:n}}return c}}(cf.API),cf.API.processPNG=function(e,t,r,n){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,s=function(e,t){return new Ad(e,t).decode()}(e,{checkCrc:!0}),a=s.width,o=s.height,l=s.channels,c=s.palette,u=s.depth;i=c&&1===l?function(e){for(var t=e.width,r=e.height,n=e.data,i=e.palette,s=e.depth,a=!1,o=[],l=[],c=void 0,u=!1,h=0,d=0;d<i.length;d++){var f=vl(i[d],4),p=f[0],m=f[1],g=f[2],b=f[3];o.push(p,m,g),null!=b&&(0===b?(h++,l.length<1&&l.push(d)):b<255&&(u=!0))}if(u||h>1){a=!0,l=void 0;var v=t*r;c=new Uint8Array(v);for(var w=new DataView(n.buffer),y=0;y<v;y++){var _=vl(i[Pp(w,y,s)],4)[3];c[y]=_}}else 0===h&&(l=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:a?8:void 0,colorBytes:n,alphaBytes:c,needSMask:a,palette:o,mask:l}}
vendor: 7,876 bytes, lines 161-177
161(s):2===l||4===l?function(e){for(var t=e.data,r=e.width,n=e.height,i=e.channels,s=e.depth,a=2===i?"DeviceGray":"DeviceRGB",o=i-1,l=r*n,c=o,u=l*c,h=1*l,d=Math.ceil(u*s/8),f=Math.ceil(h*s/8),p=new Uint8Array(d),m=new Uint8Array(f),g=new DataView(t.buffer),b=new DataView(p.buffer),v=new DataView(m.buffer),w=!1,y=0;y<l;y++){for(var _=y*i,x=0;x<c;x++)Ep(b,Pp(g,_+x,s),y*c+x,s);var k=Pp(g,_+c,s);k<(1<<s)-1&&(w=!0),Ep(v,k,1*y,s)}return{colorSpace:a,colorsPerPixel:o,sMaskBitsPerComponent:w?s:void 0,colorBytes:p,alphaBytes:m,needSMask:w}}(s):function(e){var t=e.data,r=1===e.channels?"DeviceGray":"DeviceRGB";return{colorSpace:r,colorsPerPixel:"DeviceGray"===r?1:3,colorBytes:t instanceof Uint16Array?function(e){for(var t=e.length,r=new Uint8Array(2*t),n=new DataView(r.buffer,r.byteOffset,r.byteLength),i=0;i<t;i++)n.setUint16(2*i,e[i],!1);return r}(t):t,needSMask:!1}}(s);var h,d,f,p=i,m=p.colorSpace,g=p.colorsPerPixel,b=p.sMaskBitsPerComponent,v=p.colorBytes,w=p.alphaBytes,y=p.needSMask,_=p.palette,x=p.mask,k=null;return n!==cf.API.image_compression.NONE?(k=function(e){var t;switch(e){case cf.API.image_compression.FAST:t=11;break;case cf.API.image_compression.MEDIUM:t=13;break;case cf.API.image_compression.SLOW:t=14;break;default:t=12}return t}(n),h=this.decode.FLATE_DECODE,d="/Predictor ".concat(k," /Colors ").concat(g," /BitsPerComponent ").concat(u," /Columns ").concat(a),e=_p(v,Math.ceil(a*g*u/8),g,u,n),y&&(f=_p(w,Math.ceil(a*b/8),1,b,n))):(h=void 0,d=void 0,e=v,y&&(f=w)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(f&&this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),{alias:r,data:e,index:t,filter:h,decodeParameters:d,transparency:x,palette:_,sMask:f,predictor:k,width:a,height:o,bitsPerComponent:u,sMaskBitsPerComponent:b,colorSpace:m}}},function(e){e.processGIF89A=function(t,r,n,i){var s=new Tp(t),a=s.width,o=s.height,l=[];s.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:a,height:o},u=new Cp(100).encode(c,100);return e.processJPEG.call(this,u,r,n,i)},e.processGIF87A=e.processGIF89A}(cf.API),Rp.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,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:n,blue:r,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Rp.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(r){Id.log("bit decode error:"+r)}},Rp.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),r=t%4;for(e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var s=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+8*i*4,o=0;o<8&&8*i+o<this.width;o++){var l=this.palette[s>>7-o&1];this.data[a+4*o]=l.blue,this.data[a+4*o+1]=l.green,this.data[a+4*o+2]=l.red,this.data[a+4*o+3]=255}0!==r&&(this.pos+=4-r)}},Rp.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<e;i++){var s=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+2*i*4,o=s>>4,l=15&s,c=this.palette[o];if(this.data[a]=c.blue,this.data[a+1]=c.green,this.data[a+2]=c.red,this.data[a+3]=255,2*i+1>=this.width)break;c=this.palette[l],this.data[a+4]=c.blue,this.data[a+4+1]=c.green,this.data[a+4+2]=c.red,this.data[a+4+3]=255}0!==t&&(this.pos+=4-t)}},Rp.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),s=r*this.width*4+4*n;if(i<this.palette.length){var a=this.palette[i];this.data[s]=a.red,this.data[s+1]=a.green,this.data[s+2]=a.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}0!==e&&(this.pos+=4-e)}},Rp.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(s&t)/t*255|0,o=(s>>5&t)/t*255|0,l=(s>>10&t)/t*255|0,c=s>>15?255:0,u=n*this.width*4+4*i;this.data[u]=l,this.data[u+1]=o,this.data[u+2]=a,this.data[u+3]=c}this.pos+=e}},Rp.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,s=0;s<this.width;s++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,l=(a>>5&r)/r*255|0,c=(a>>11)/t*255|0,u=i*this.width*4+4*s;this.data[u]=c,this.data[u+1]=l,this.data[u+2]=o,this.data[u+3]=255}this.pos+=e}},Rp.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*r;this.data[a]=s,this.data[a+1]=i,this.data[a+2]=n,this.data[a+3]=255}this.pos+=this.width%4}},Rp.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*r;this.data[o]=s,this.data[o+1]=i,this.data[o+2]=n,this.data[o+3]=a}},Rp.prototype.getData=function(){return this.data}, 162/** 163 * @license 164 * Copyright (c) 2018 Aras Abbasi 165 * 166 * Licensed under the MIT License. 167 * http://opensource.org/licenses/mit-license 168 */ 169function(e){e.processBMP=function(t,r,n,i){var s=new Rp(t,!1),a=s.width,o=s.height,l={data:s.getData(),width:a,height:o},c=new Cp(100).encode(l,100);return e.processJPEG.call(this,c,r,n,i)}}(cf.API),Fp.prototype.getData=function(){return this.data}, 170/** 171 * @license 172 * Copyright (c) 2019 Aras Abbasi 173 * 174 * Licensed under the MIT License. 175 * http://opensource.org/licenses/mit-license 176 */ 177function(e){e.processWEBP=function(t,r,n,i){var s=new Fp(t),a=s.width,o=s.height,l={data:s.getData(),width:a,height:o},c=new Cp(100).encode(l,100);return e.processJPEG.call(this,c,r,n,i)}}(cf.API),cf.API.processRGBA=function(e,t,r){for(var n=e.data,i=n.length,s=new Uint8Array(i/4*3),a=new Uint8Array(i/4),o=0,l=0,c=0;c<i;c+=4){var u=n[c],h=n[c+1],d=n[c+2],f=n[c+3];s[o++]=u,s[o++]=h,s[o++]=d,a[l++]=f}var p=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(a),data:p,index:t,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},cf.API.setLanguage=function(e){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq
vendor: 8,019 bytes, line 177
177:"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 (Canada)","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"}[e]&&(this.internal.languageSettings.languageCode=e,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},mp=cf.API,gp=mp.getCharWidthsArray=function(e,t){var r,n,i=(t=t||{}).font||this.internal.getFont(),s=t.fontSize||this.internal.getFontSize(),a=t.charSpace||this.internal.getCharSpace(),o=t.widths?t.widths:i.metadata.Unicode.widths,l=o.fof?o.fof:1,c=t.kerning?t.kerning:i.metadata.Unicode.kerning,u=c.fof?c.fof:1,h=!1!==t.doKerning,d=0,f=e.length,p=0,m=o[0]||l,g=[];for(r=0;r<f;r++)n=e.charCodeAt(r),"function"==typeof i.metadata.widthOfString?g.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+a*(1e3/s)||0)/1e3):(d=h&&"object"===Ro(c[n])&&!isNaN(parseInt(c[n][p],10))?c[n][p]/u:0,g.push((o[n]||m)/l+d)),p=n;return g},bp=mp.getStringUnitWidth=function(e,t){var r=(t=t||{}).fontSize||this.internal.getFontSize(),n=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return mp.processArabic&&(e=mp.processArabic(e)),"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(e,r,i)/r:gp.apply(this,arguments).reduce(function(e,t){return e+t},0)},vp=function(e,t,r,n){for(var i=[],s=0,a=e.length,o=0;s!==a&&o+t[s]<r;)o+=t[s],s++;i.push(e.slice(0,s));var l=s;for(o=0;s!==a;)o+t[s]>n&&(i.push(e.slice(l,s)),o=0,l=s),o+=t[s],s++;return l!==s&&i.push(e.slice(l,s)),i},wp=function(e,t,r){r||(r={});var n,i,s,a,o,l,c,u=[],h=[u],d=r.textIndent||0,f=0,p=0,m=e.split(" "),g=gp.apply(this,[" ",r])[0];if(l=-1===r.lineIndent?m[0].length+2:r.lineIndent||0){var b=Array(l).join(" "),v=[];m.map(function(e){(e=e.split(/\s*\n/)).length>1?v=v.concat(e.map(function(e,t){return(t&&e.length?"\n":"")+e})):v.push(e[0])}),m=v,l=bp.apply(this,[b,r])}for(s=0,a=m.length;s<a;s++){var w=0;if(n=m[s],l&&"\n"==n[0]&&(n=n.substr(1),w=1),d+f+(p=(i=gp.apply(this,[n,r])).reduce(function(e,t){return e+t},0))>t||w){if(p>t){for(o=vp.apply(this,[n,i,t-(d+f),t]),u.push(o.shift()),u=[o.pop()];o.length;)h.push([o.shift()]);p=i.slice(n.length-(u[0]?u[0].length:0)).reduce(function(e,t){return e+t},0)}else u=[n];h.push(u),d=p+l,f=g}else u.push(n),d+=f+p,f=g}return c=l?function(e,t){return(t?b:"")+e.join(" ")}:function(e){return e.join(" ")},h.map(c)},mp.splitTextToSize=function(e,t,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),s=function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle),r="Unicode";return t.metadata[r]?{widths:t.metadata[r].widths||{0:1},kerning:t.metadata[r].kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,r);n=Array.isArray(e)?e:String(e).split(/\r?\n/);var a=1*this.internal.scaleFactor*t/i;s.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,s.lineIndent=r.lineIndent;var o,l,c=[];for(o=0,l=n.length;o<l;o++)c=c.concat(wp.apply(this,[n[o],a,s]));return c},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",r="klmnopqrstuvwxyz",n={},i={},s=0;s<16;s++)n[r[s]]=t[s],i[t[s]]=r[s];var a=function(e){return"0x"+parseInt(e,10).toString(16)},o=e.__fontmetrics__.compress=function(e){var t,r,n,s,l=["{"];for(var c in e){if(t=e[c],isNaN(parseInt(c,10))?r="'"+c+"'":(c=parseInt(c,10),r=(r=a(c).slice(2)).slice(0,-1)+i[r.slice(-1)]),"number"==typeof t)t<0?(n=a(t).slice(3),s="-"):(n=a(t).slice(2),s=""),n=s+n.slice(0,-1)+i[n.slice(-1)];else{if("object"!==Ro(t))throw new Error("Don't know what to do with value type "+Ro(t)+".");n=o(t)}l.push(r+n)}return l.push("}"),l.join("")},l=e.__fontmetrics__.uncompress=function(e){if("string"!=typeof e)throw new Error("Invalid argument passed to uncompress.");for(var t,r,i,s,a={},o=1,l=a,c=[],u="",h="",d=e.length-1,f=1;f<d;f+=1)"'"==(s=e[f])?t?(i=t.join(""),t=void 0):t=[]:t?t.push(s):"{"==s?(c.push([l,i]),l={},i=void 0):"}"==s?((r=c.pop())[0][r[1]]=l,i=void 0,l=r[0]):"-"==s?o=-1:void 0===i?n.hasOwnProperty(s)?(u+=n[s],i=parseInt(u,16)*o,o=1,u=""):u+=s:n.hasOwnProperty(s)?(h+=n[s],l[i]=parseInt(h,16)*o,o=1,i=void 0,h=""):h+=s;return a
vendor: 15,189 bytes, line 177
177},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},h={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'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":l("{'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:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'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:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'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":l("{'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:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'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":l("{'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":l("{'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}}}")}};e.events.push(["addFont",function(e){var t=e.font,
vendor: 5,695 bytes, lines 177-183
177r=h.Unicode[t.postScriptName];r&&(t.metadata.Unicode={},t.metadata.Unicode.widths=r.widths,t.metadata.Unicode.kerning=r.kerning);var n=u.Unicode[t.postScriptName];n&&(t.metadata.Unicode.encoding=n,t.encoding=n.codePages[0])}])}(cf.API), 178/** 179 * @license 180 * Licensed under the MIT License. 181 * http://opensource.org/licenses/mit-license 182 */ 183function(e){var t=function(e){for(var t=e.length,r=new Uint8Array(t),n=0;n<t;n++)r[n]=e.charCodeAt(n);return r};e.API.events.push(["addFont",function(r){var n,i,s=void 0,a=r.font,o=r.instance;if(!a.isStandardFont){if(void 0===o)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if("string"!=typeof(s=!1===o.existsFileInVFS(a.postScriptName)?o.loadFile(a.postScriptName):o.getFileFromVFS(a.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");n=a,i=/^\x00\x01\x00\x00/.test(i=s)?t(i):t(Bd(i)),n.metadata=e.API.TTFFont.open(i),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]}}])}(cf),cf.API.addSvgAsImage=function(e,t,r,n,i,s,a,o){if(isNaN(t)||isNaN(r))throw Id.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(i))throw Id.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=n,l.height=i;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return(Pd.canvg?Promise.resolve(Pd.canvg):Co(()=>import("./index.es-CuPw5oaS.js"),__vite__mapDeps([0,1,2,3]))).catch(function(e){return Promise.reject(new Error("Could not load canvg: "+e))}).then(function(e){return e.default?e.default:e}).then(function(t){return t.fromString(c,e,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(e){return e.render(u)}).then(function(){h.addImage(l.toDataURL("image/jpeg",1),t,r,n,i,a,o)})},cf.API.putTotalPages=function(e){var t,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),r=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(t,r);return this},cf.API.viewerPreferences=function(e,t){var r;e=e||{},t=t||!1;var n,i,s,a={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}},o=Object.keys(a),l=[],c=0,u=0,h=0;function d(e,t){var r,n=!1;for(r=0;r<e.length;r+=1)e[r]===t&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,"reset"===e||!0===t){var f=o.length;for(h=0;h<f;h+=1)r[o[h]].value=r[o[h]].defaultValue,r[o[h]].explicitSet=!1}if("object"===Ro(e))for(i in e)if(s=e[i],d(o,i)&&void 0!==s){if("boolean"===r[i].type&&"boolean"==typeof s)r[i].value=s;else if("name"===r[i].type&&d(r[i].valueSet,s))r[i].value=s;else if("integer"===r[i].type&&Number.isInteger(s))r[i].value=s;else if("array"===r[i].type){for(c=0;c<s.length;c+=1)if(n=!0,1===s[c].length&&"number"==typeof s[c][0])l.push(String(s[c]-1));else if(s[c].length>1){for(u=0;
vendor: 8,691 bytes, lines 183-220
183u<s[c].length;u+=1)"number"!=typeof s[c][u]&&(n=!1);!0===n&&l.push([s[c][0]-1,s[c][1]-1].join(" "))}r[i].value="["+l.join(" ")+"]"}else r[i].value=r[i].defaultValue;r[i].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var e,t=[];for(e in r)!0===r[e].explicitSet&&("name"===r[e].type?t.push("/"+e+" /"+r[e].value):t.push("/"+e+" "+r[e].value));0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this}, 184/** ==================================================================== 185 * @license 186 * jsPDF XMP metadata plugin 187 * Copyright (c) 2016 Jussi Utunen, [email protected] 188 * 189 * Permission is hereby granted, free of charge, to any person obtaining 190 * a copy of this software and associated documentation files (the 191 * "Software"), to deal in the Software without restriction, including 192 * without limitation the rights to use, copy, modify, merge, publish, 193 * distribute, sublicense, and/or sell copies of the Software, and to 194 * permit persons to whom the Software is furnished to do so, subject to 195 * the following conditions: 196 * 197 * The above copyright notice and this permission notice shall be 198 * included in all copies or substantial portions of the Software. 199 * 200 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 201 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 202 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 203 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 204 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 205 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 206 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 207 * ==================================================================== 208 */ 209function(e){var t=function(){var e='<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>',t=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),r=unescape(encodeURIComponent(e)),n=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),i=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),s=unescape(encodeURIComponent("</x:xmpmeta>")),a=r.length+n.length+i.length+t.length+s.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+a+" >>"),this.internal.write("stream"),this.internal.write(t+r+n+i+s),this.internal.write("endstream"),this.internal.write("endobj")},r=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(e,n){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:e,namespaceuri:n||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",r),this.internal.events.subscribe("postPutResources",t)),this}}(cf.API),function(e){var t=e.API,r=t.pdfEscape16=function(e,t){for(var r,n=t.metadata.Unicode.widths,i=["","0","00","000","0000"],s=[""],a=0,o=e.length;a<o;++a){if(r=t.metadata.characterToGlyph(e.charCodeAt(a)),t.metadata.glyIdsUsed.push(r),t.metadata.toUnicode[r]=e.charCodeAt(a),-1==n.indexOf(r)&&(n.push(r),n.push([parseInt(t.metadata.widthOfGlyph(r),10)])),"0"==r)return s.join("");r=r.toString(16),s.push(i[4-r.length],r)}return s.join("")},n=function(e){var t,r,n,i,s,a,o;for(s="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",n=[],a=0,o=(r=Object.keys(e).sort(function(e,t){return e-t})).length;a<o;a++)t=r[a],n.length>=100&&(s+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),void 0!==e[t]&&null!==e[t]&&"function"==typeof e[t].toString&&(i=("0000"+e[t].toString(16)).slice(-4),t=("0000"+(+t).toString(16)).slice(-4),n.push("<"+t+"><"+i+">"));return n.length&&(s+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),s+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};t.events.push(["putFont",function(t){!function(t){var r=t.font,i=t.out,s=t.newObject,a=t.putStream;if(r.metadata instanceof e.API.TTFFont&&"Identity-H"===r.encoding){for(var o=r.metadata.Unicode.widths,l=r.metadata.subset.encode(r.metadata.glyIdsUsed,1),c="",u=0;u<l.length;u++)c+=String.fromCharCode(l[u]);var h=s();a({data:c,addLength1:!0,objectId:h}),i("endobj");var d=s();a({data:n(r.metadata.toUnicode),addLength1:!0,objectId:d}),i("endobj");var f=s();i("<<"),i("/Type /FontDescriptor"),i("/FontName /"+rf(r.fontName)),i("/FontFile2 "+h+" 0 R"),i("/FontBBox "+e.API.PDFObject.convert(r.metadata.bbox)),i("/Flags "+r.metadata.flags),i("/StemV "+r.metadata.stemV),i("/ItalicAngle "+r.metadata.italicAngle),i("/Ascent "+r.metadata.ascender),i("/Descent "+r.metadata.decender),i("/CapHeight "+r.metadata.capHeight),i(">>"),i("endobj");var p=s();i("<<"),i("/Type /Font"),i("/BaseFont /"+rf(r.fontName)),i("/FontDescriptor "+f+" 0 R"),i("/W "+e.API.PDFObject.convert(o)),i("/CIDToGIDMap /Identity"),i("/DW 1000"),i("/Subtype /CIDFontType2"),i("/CIDSystemInfo"),i("<<"),i("/Supplement 0"),i("/Registry (Adobe)"),i("/Ordering ("+r.encoding+")"),i(">>"),i(">>"),i("endobj"),r.objectNumber=s(),i("<<"),i("/Type /Font"),i("/Subtype /Type0"),i("/ToUnicode "+d+" 0 R"),i("/BaseFont /"+rf(r.fontName)),i("/Encoding /"+r.encoding),i("/DescendantFonts ["+p+" 0 R]"),i(">>"),i("endobj"),r.isAlreadyPutted=!0}}(t)}]),t.events.push(["putFont",function(t){!function(t){var r=t.font,i=t.out,s=t.newObject,a=t.putStream;if(r.metadata instanceof e.API.TTFFont&&"WinAnsiEncoding"===r.encoding){for(var o=r.metadata.rawData,l="",c=0;c<o.length;c++)l+=String.fromCharCode(o[c]);var u=s();a({data:l,addLength1:!0,objectId:u}),i("endobj");var h=s();a({data:n(r.metadata.toUnicode),addLength1:!0,objectId:h}),i("endobj");var d=s();i("<<"),i("/Descent "+r.metadata.decender),i("/CapHeight "+r.metadata.capHeight),i("/StemV "+r.metadata.stemV),i("/Type /FontDescriptor"),i("/FontFile2 "+u+" 0 R"),i("/Flags 96"),i("/FontBBox "+e.API.PDFObject.convert(r.metadata.bbox)),i("/FontName /"+rf(r.fontName)),i("/ItalicAngle "+r.metadata.italicAngle),i("/Ascent "+r.metadata.ascender),i(">>"),i("endobj"),r.objectNumber=s();for(var f=0;f<r.metadata.hmtx.widths.length;f++)r.metadata.hmtx.widths[f]=parseInt(r.metadata.hmtx.widths[f]*(1e3/r.metadata.head.unitsPerEm));i("<</Subtype/TrueType/Type/Font/ToUnicode "+h+" 0 R/BaseFont/"+rf(r.fontName)+"/FontDescriptor "+d+" 0 R/Encoding/"+r.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(r.metadata.hmtx.widths)+">>"),i("endobj"),r.isAlreadyPutted=!0}}(t)}]);var i=function(e){var t,n=e.text||"",i=e.x,s=e.y,a=e.options||{},o=e.mutex||{},l=o.pdfEscape,c=o.activeFontKey,u=o.fonts,h=c,d="",f=0,p="",m=u[h].encoding;if("Identity-H"!==u[h].encoding)return{text:n,x:i,y:s,options:a,mutex:o};for(p=n,h=c,Array.isArray(n)&&(p=n[0]),f=0;f<p.length;f+=1)u[h].metadata.hasOwnProperty("cmap")&&(t=u[h].metadata.cmap.unicode.codeMap[p[f].charCodeAt(0)]),t||p[f].charCodeAt(0)<256&&u[h].metadata.hasOwnProperty("Unicode")?d+=p[f]:d+="";var g="";return parseInt(h.slice(1))<14||"WinAnsiEncoding"===m?g=l(d,h).split("").map(function(e){return e.charCodeAt(0).toString(16)}).join(""):"Identity-H"===m&&(g=r(d,u[h])),o.isHex=!0,{text:g,x:i,y:s,options:a,mutex:o}};t.events.push(["postProcessText",function(e){var t=e.text||"",r=[],n={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var s=0;for(s=0;s<t.length;s+=1)Array.isArray(t[s])&&3===t[s].length?r.push([i(Object.assign({},n,{text:t[s][0]})).text,t[s][1],t[s][2]]):r.push(i(Object.assign({},n,{text:t[s]})).text);e.text=r}else e.text=i(Object.assign({},n,{text:t})).text}])}(cf), 210/** 211 * @license 212 * jsPDF virtual FileSystem functionality 213 * 214 * Licensed under the MIT License. 215 * http://opensource.org/licenses/mit-license 216 */ 217function(e){var t=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(e){return t.call(this),void 0!==this.internal.vFS[e]},e.addFileToVFS=function(e,r){return t.call(this),this.internal.vFS[e]=r,this},e.getFileFromVFS=function(e){return t.call(this),void 0!==this.internal.vFS[e]?this.internal.vFS[e]:null}}(cf.API), 218/** 219 * @license 220 * Unicode Bidi Engine based on the work of Alex Shensis (@asthe
vendor: 33,011 bytes, lines 220-223
220nsis) 221 * MIT License 222 */ 223function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var r,n,i,s,a,o,l,c=t,u=[[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]],h=[[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]],d={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},f={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},p=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","â¹","âº","â¹","â ","â","â ","â½","â¾","â½","â","â","â","â¤","â¥","â¤","â©","âª","â©","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","﹤","ï¹¥","﹤"],m=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)$/),g=!1,b=0;this.__bidiEngine__={};var v=function(e){var t=e.charCodeAt(),r=t>>8,n=f[r];return void 0!==n?c[256*n+(255&t)]:252===r||253===r?"AL":m.test(r)?"L":8===r?"R":"N"},w=function(e){for(var t,r=0;r<e.length;r++){if("L"===(t=v(e.charAt(r))))return!1;if("R"===t)return!0}return!1},y=function(e,t,a,o){var l,c,u,h,d=t[o];switch(d){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":g=!1;break;case"N":case"AN":break;case"EN":g&&(d="AN");break;case"AL":g=!0,d="R";break;case"WS":case"BN":d="N";break;case"CS":o<1||o+1>=t.length||"EN"!==(l=a[o-1])&&"AN"!==l||"EN"!==(c=t[o+1])&&"AN"!==c?d="N":g&&(c="AN"),d=c===l?c:"N";break;case"ES":d="EN"===(l=o>0?a[o-1]:"B")&&o+1<t.length&&"EN"===t[o+1]?"EN":"N";break;case"ET":if(o>0&&"EN"===a[o-1]){d="EN";break}if(g){d="N";break}for(u=o+1,h=t.length;u<h&&"ET"===t[u];)u++;d=u<h&&"EN"===t[u]?"EN":"N";break;case"NSM":if(i&&!s){for(h=t.length,u=o+1;u<h&&"NSM"===t[u];)u++;if(u<h){var f=e[o],p=f>=1425&&f<=2303||64286===f;if(l=t[u],p&&("R"===l||"AL"===l)){d="R";break}}}d=o<1||"B"===(l=t[o-1])?"N":a[o-1];break;case"B":g=!1,r=!0,d=b;break;case"S":n=!0,d="N"}return d},_=function(e,t,r){var n=e.split("");return r&&x(n,r,{hiLevel:b}),n.reverse(),t&&t.reverse(),n.join("")},x=function(e,t,i){var s,a,o,l,c,f=-1,p=e.length,m=0,w=[],_=b?h:u,x=[];for(g=!1,r=!1,n=!1,a=0;a<p;a++)x[a]=v(e[a]);for(o=0;o<p;o++){if(c=m,w[o]=y(e,x,w,o),s=240&(m=_[c][d[w[o]]]),m&=15,t[o]=l=_[m][5],s>0)if(16===s){for(a=f;a<o;a++)t[a]=1;f=-1}else f=-1;if(_[m][6])-1===f&&(f=o);else if(f>-1){for(a=f;a<o;a++)t[a]=l;f=-1}"B"===x[o]&&(t[o]=0),i.hiLevel|=l}n&&function(e,t,r){for(var n=0;n<r;n++)if("S"===e[n]){t[n]=b;for(var i=n-1;i>=0&&"WS"===e[i];i--)t[i]=b}}(x,t,p)},k=function(e,t,n,i,s){if(!(s.hiLevel<e)){if(1===e&&1===b&&!r)return t.reverse(),void(n&&n.reverse());for(var a,o,l,c,u=t.length,h=0;h<u;){if(i[h]>=e){for(l=h+1;l<u&&i[l]>=e;)l++;for(c=h,o=l-1;c<o;c++,o--)a=t[c],t[c]=t[o],t[o]=a,n&&(a=n[c],n[c]=n[o],n[o]=a);h=l}h++}}},N=function(e,t,r){var n=e.split(""),i={hiLevel:b};return r||(r=[]),x(n,r,i),function(e,t,r){if(0!==r.hiLevel&&l)for(var n,i=0;i<e.length;i++)1===t[i]&&(n=p.indexOf(e[i]))>=0&&(e[i]=p[n+1])}(n,r,i),k(2,n,t,r,i),k(1,n,t,r,i),n.join("")};return this.__bidiEngine__.doBidiReorder=function(e,t,r){if(function(e,t){if(t)for(var r=0;r<e.length;r++)t[r]=r;void 0===s&&(s=w(e)),void 0===o&&(o=w(e))}(e,t),i||!a||o)if(i&&a&&s^o)b=s?1:0,e=_(e,t,r);else if(!i&&a&&o)b=s?1:0,e=N(e,t,r),e=_(e,t);else if(!i||s||a||o){if(i&&!a&&s^o)e=_(e,t),s?(b=0,e=N(e,t,r)):(b=1,e=N(e,t,r),e=_(e,t));else if(i&&s&&!a&&o)b=1,e=N(e,t,r),e=_(e,t);else if(!i&&!a&&s^o){var n=l;s?(b=1,e=N(e,t,r),b=0,l=!1,e=N(e,t,r),l=n):(b=0,e=N(e,t,r),e=_(e,t),b=1,l=!1,e=N(e,t,r),l=n,e=_(e,t))}}else b=0,e=N(e,t,r);else b=s?1:0,e=N(e,t,r);return e},this.__bidiEngine__.setOptions=function(e){e&&(i=e.isInputVisual,a=e.isOutputVisual,s=e.isInputRtl,o=e.isOutputRtl,l=e.isSymmetricSwapping)},this.__bidiEngine__.setOptions(e),this.__bidiEngine__};var t=["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"],r=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(e){var t=e.text;e.x,e.y;var n=e.options||{};e.mutex,n.lang;var i=[];if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,r.setOptions(n),"[object Array]"===Object.prototype.toString.call(t)){var s=0;for(i=[],s=0;s<t.length;s+=1)"[object Array]"===Object.prototype.toString.call(t[s])?i.push([r.doBidiReorder(t[s][0]),t[s][1],t[s][2]]):i.push([r.doBidiReorder(t[s])]);e.text=i}else e.text=r.doBidiReorder(t);r.setOptions({isInputVisual:!0})}])}(cf),cf.API.TTFFont=function(){function e(e){var t;if(this.rawData=e,t=this.contents=new Dp(e),this.contents.pos=4,"ttcf"===t.readString(4))throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new nm(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new Mp(this.contents),this.head=new zp(this),this.name=new Jp(this),this.cmap=new Wp(this),this.toUnicode={},this.hhea=new Hp(this),this.maxp=new Yp(this),this.hmtx=new Zp(this),this.post=new Gp(this),this.os2=new Vp(this),this.loca=new rm(this),this.glyf=new Qp(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]},e.prototype.registerTTF=function(){var e,t,r,n,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,r,n,i;for(i=[],t=0,r=(n=this.bbox).length;t<r;t++)e=n[t],i.push(Math.round(e*this.scaleFactor));return i}.call(this),this.stemV=0,this.post.exists?(r=255&(n=this.post.italic_angle),32768&(t=n>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+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=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(e){var t;return(null!=(t=this.cmap.unicode)?t.codeMap[e]:void 0)||0},e.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},e.prototype.widthOfString=function(e,t,r){var n,i,s,a;for(s=0,i=0,a=(e=""+e).length;0<=a?i<a:i>a;i=0<=a?++i:--i)n=e.charCodeAt(i),s+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/t)||0;return s*(t/1e3)},e.prototype.lineHeight=function(e,t){var r;return null==t&&(t=!1),r=t?this.lineGap:0,(this.ascender+r-this.decender)/1e3*e},e}();var Bp,Dp=function(){function e(e){this.data=null!=e?e:[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(e){return this.data[this.pos++]=e},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},e.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},e.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},e.prototype.readString=function(e){var t,r;for(r=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)r[t]=String.fromCharCode(this.readByte());return r.join("")},e.prototype.writeString=function(e){var t,r,n;for(n=[],t=0,r=e.length;0<=r?t<r:t>r;t=0<=r?++t:--t)n.push(this.writeByte(e.charCodeAt(t)));return n},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(e){return this.writeInt16(e)},e.prototype.readLongLong=function(){var e,t,r,n,i,s,a,o;return e=this.readByte(),t=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),s=this.readByte(),a=this.readByte(),o=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^i)+65536*(255^s)+256*(255^a)+(255^o)+1):72057594037927940*e+281474976710656*t+1099511627776*r+4294967296*n+16777216*i+65536*s+256*a+o},e.prototype.writeLongLong=function(e){var t,r;return t=Math.floor(e/4294967296),r=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(e){return this.writeInt32(e)},e.prototype.read=function(e){var t,r;for(t=[],r=0;0<=e?r<e:r>e;r=0<=e?++r:--r)t.push(this.readByte());return t},e.prototype.write=function(e){var t,r,n,i;for(i=[],r=0,n=e.length;r<n;r++)t=e[r],i.push(this.writeByte(t));return i},e}(),Mp=function(){var e;function t(e){var t,r,n;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},r=0,n=this.tableCount;0<=n?r<n:r>n;r=0<=n?++r:--r)t={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[t.tag]=t}return t.prototype.encode=function(t){var r,n,i,s,a,o,l,c,u,h,d,f,p;for(p in d=Object.keys(t).length,o=Math.log(2),u=16*Math.floor(Math.log(d)/o),s=Math.floor(u/o),c=16*d-u,(n=new Dp).writeInt(this.scalarType),n.writeShort(d),n.writeShort(u),n.writeShort(s),n.writeShort(c),i=16*d,l=n.pos+i,a=null,f=[],t)for(h=t[p],n.writeString(p),n.writeInt(e(h)),n.writeInt(l),n.writeInt(h.length),f=f.concat(h),"head"===p&&(a=l),l+=h.length;l%4;)f.push(0),l++;return n.write(f),r=2981146554-e(n.data),n.pos=a+8,n.writeUInt32(r),n.data},e=function(e){var t,r,n,i;for(e=Xp.call(e);e.length%4;)e.push(0);for(n=new Dp(e),r=0,t=0,i=e.length;t<i;t=t+=4)r+=n.readUInt32();return 4294967295&r},t}(),Up={}.hasOwnProperty,qp=function(e,t){for(var r in t)Up.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};Bp=function(){function e(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var zp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="head",e.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()},e.prototype.encode=function(e){var t;return(t=new Dp).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},e}(),$p=function(){function e(e,t){var r,n,i,s,a,o,l,c,u,h,d,f,p,m,g,b,v;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),u=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(o=0;o<256;++o)this.codeMap[o]=e.readByte();break;case 4:for(d=e.readUInt16(),h=d/2,e.pos+=6,i=function(){var t,r;for(r=[],o=t=0;0<=h?t<h:t>h;o=0<=h?++t:--t)r.push(e.readUInt16());return r}(),e.pos+=2,p=function(){var t,r;for(r=[],o=t=0;0<=h?t<h:t>h;o=0<=h?++t:--t)r.push(e.readUInt16());return r}(),l=function(){var t,r;for(r=[],o=t=0;0<=h?t<h:t>h;o=0<=h?++t:--t)r.push(e.readUInt16());return r}(),c=function(){var t,r;for(r=[],o=t=0;0<=h?t<h:t>h;o=0<=h?++t:--t)r.push(e.readUInt16());return r}(),n=(this.length-e.pos+this.offset)/2,a=function(){var t,r;for(r=[],o=t=0;0<=n?t<n:t>n;o=0<=n?++t:--t)r.push(e.readUInt16());return r}(),o=g=0,v=i.length;g<v;o=++g)for(m=i[o],r=b=f=p[o];f<=m?b<=m:b>=m;r=f<=m?++b:--b)0===c[o]?s=r+l[o]:0!==(s=a[c[o]/2+(r-f)-(h-o)]||0)&&(s+=l[o]),this.codeMap[r]=65535&s}e.pos=u}return e.encode=function(e,t){var r,n,i,s,a,o,l,c,u,h,d,f,p,m,g,b,v,w,y,_,x,k,N,S,A,L,j,P,E,I,T,O,C,R,F,B,D,M,U,q,z,$,W,H,V,G;switch(P=new Dp,s=Object.keys(e).sort(function(e,t){return e-t}),t){case"macroman":for(p=0,m=function(){var e=[];for(f=0;f<256;++f)e.push(0);return e}(),b={0:0},i={},E=0,C=s.length;E<C;E++)null==b[W=e[n=s[E]]]&&(b[W]=++p),i[n]={old:e[n],new:b[e[n]]},m[n]=b[e[n]];return P.writeUInt16(1),P.writeUInt16(0),P.writeUInt32(12),P.writeUInt16(0),P.writeUInt16(262),P.writeUInt16(0),P.write(m),{charMap:i,subtable:P.data,maxGlyphID:p+1};case"unicode":for(L=[],u=[],v=0,b={},r={},g=l=null,I=0,R=s.length;I<R;I++)null==b[y=e[n=s[I]]]&&(b[y]=++v),r[n]={old:y,new:b[y]},a=b[y]-n,null!=g&&a===l||(g&&u.push(g),L.push(n),l=a),g=n;for(g&&u.push(g),u.push(65535),L.push(65535),S=2*(N=L.length),k=2*Math.pow(Math.log(N)/Math.LN2,2),h=Math.log(k/2)/Math.LN2,x=2*N-k,o=[],_=[],d=[],f=T=0,F=L.length;T<F;f=++T){if(A=L[f],c=u[f],65535===A){o.push(0),_.push(0);break}if(A-(j=r[A].new)>=32768)for(o.push(0),_.push(2*(d.length+N-f)),n=O=A;A<=c?O<=c:O>=c;n=A<=c?++O:--O)d.push(r[n].new);else o.push(j-A),_.push(0)}for(P.writeUInt16(3),P.writeUInt16(1),P.writeUInt32(12),P.writeUInt16(4),P.writeUInt16(16+8*N+2*d.length),P.writeUInt16(0),P.writeUInt16(S),P.writeUInt16(k),P.writeUInt16(h),P.writeUInt16(x),z=0,B=u.length;z<B;z++)n=u[z],P.writeUInt16(n);for(P.writeUInt16(0),$=0,D=L.length;$<D;$++)n=L[$],P.writeUInt16(n);for(H=0,M=o.length;H<M;H++)a=o[H],P.writeUInt16(a);for(V=0,U=_.length;V<U;V++)w=_[V],P.writeUInt16(w);for(G=0,q=d.length;G<q;G++)p=d[G],P.writeUInt16(p);return{charMap:r,subtable:P.data,maxGlyphID:v+1}}},e}(),Wp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="cmap",e.prototype.parse=function(e){var t,r,n;for(e.pos=this.offset,this.version=e.readUInt16(),n=e.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=n?r<n:r>n;r=0<=n?++r:--r)t=new $p(e,this.offset),this.tables.push(t),t.isUnicode&&null==this.unicode&&(this.unicode=t);return!0},e.encode=function(e,t){var r,n;return null==t&&(t="macroman"),r=$p.encode(e,t),(n=new Dp).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},e}(),Hp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="hhea",e.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()},e}(),Vp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="OS/2",e.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 t,r;for(r=[],t=0;t<10;++t)r.push(e.readByte());return r}(),this.charRange=function(){var t,r;for(r=[],t=0;t<4;++t)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 t,r;for(r=[],t=0;t<2;t=++t)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()},e}(),Gp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="post",e.prototype.parse=function(e){var t,r,n;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 i;for(r=e.readUInt16(),this.glyphNameIndex=[],i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],n=[];e.pos<this.offset+this.length;)t=e.readByte(),n.push(this.names.push(e.readString(t)));return n;case 151552:return r=e.readUInt16(),this.offsets=e.read(r);case 262144:return this.map=function(){var t,r,n;for(n=[],i=t=0,r=this.file.maxp.numGlyphs;0<=r?t<r:t>r;i=0<=r?++t:--t)n.push(e.readUInt32());return n}.call(this)}},e}(),Kp=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},Jp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="name",e.prototype.parse=function(e){var t,r,n,i,s,a,o,l,c,u,h;for(e.pos=this.offset,e.readShort(),t=e.readShort(),a=e.readShort(),r=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)r.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+a+e.readShort()});for(o={},i=c=0,u=r.length;c<u;i=++c)n=r[i],e.pos=n.offset,l=e.readString(n.length),s=new Kp(l,n),null==o[h=n.nameID]&&(o[h]=[]),o[n.nameID].push(s);this.strings=o,this.copyright=o[0],this.fontFamily=o[1],this.fontSubfamily=o[2],this.uniqueSubfamily=o[3],this.fontName=o[4],this.version=o[5];try{this.postscriptName=o[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(d){this.postscriptName=o[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=o[7],this.manufacturer=o[8],this.designer=o[9],this.description=o[10],this.vendorUrl=o[11],this.designerUrl=o[12],this.license=o[13],this.licenseUrl=o[14],this.preferredFamily=o[15],this.preferredSubfamily=o[17],this.compatibleFull=o[18],this.sampleText=o[19]},e}(),Yp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="maxp",e.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()},e}(),Zp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="hmtx",e.prototype.parse=function(e){var t,r,n,i,s,a,o;for(e.pos=this.offset,this.metrics=[],t=0,a=this.file.hhea.numberOfMetrics;0<=a?t<a:t>a;t=0<=a?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var r,i;for(i=[],t=r=0;0<=n?r<n:r>n;t=0<=n?++r:--r)i.push(e.readInt16());return i}(),this.widths=function(){var e,t,r,n;for(n=[],e=0,t=(r=this.metrics).length;e<t;e++)i=r[e],n.push(i.advance);return n}.call(this),r=this.widths[this.widths.length-1],o=[],t=s=0;0<=n?s<n:s>n;t=0<=n?++s:--s)o.push(this.widths.push(r));return o},e.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]}},e}(),Xp=[].slice,Qp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(e){var t,r,n,i,s,a,o,l,c,u;return e in this.cache?this.cache[e]:(i=this.file.loca,t=this.file.contents,r=i.indexOf(e),0===(n=i.lengthOf(e))?this.cache[e]=null:(t.pos=this.offset+r,s=(a=new Dp(t.read(n))).readShort(),l=a.readShort(),u=a.readShort(),o=a.readShort(),c=a.readShort(),this.cache[e]=-1===s?new tm(a,l,u,o,c):new em(a,s,l,u,o,c),this.cache[e]))},e.prototype.encode=function(e,t,r){var n,i,s,a,o;for(s=[],i=[],a=0,o=t.length;a<o;a++)n=e[t[a]],i.push(s.length),n&&(s=s.concat(n.encode(r)));return i.push(s.length),{table:s,offsets:i}},e}(),em=function(){function e(e,t,r,n,i,s){this.raw=e,this.numberOfContours=t,this.xMin=r,this.yMin=n,this.xMax=i,this.yMax=s,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),tm=function(){function e(e,t,r,n,i){var s,a;for(this.raw=e,this.xMin=t,this.yMin=r,this.xMax=n,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],s=this.raw;a=s.readShort(),this.glyphOffsets.push(s.pos),this.glyphIDs.push(s.readUInt16()),32&a;)s.pos+=1&a?4:2,128&a?s.pos+=8:64&a?s.pos+=4:8&a&&(s.pos+=2)}return e.prototype.encode=function(){var e,t,r;for(t=new Dp(Xp.call(this.raw.data)),e=0,r=this.glyphIDs.length;e<r;++e)t.pos=this.glyphOffsets[e];return t.data},e}(),rm=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return qp(e,Bp),e.prototype.tag="loca",e.prototype.parse=function(e){var t,r;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=0===t?function(){var t,n;for(n=[],r=0,t=this.length;r<t;r+=2)n.push(2*e.readUInt16());return n}.call(this):function(){var t,n;for(n=[],r=0,t=this.length;r<t;r+=4)n.push(e.readUInt32());return n}.call(this)},e.prototype.indexOf=function(e){return this.offsets[e]},e.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]}
223,e.prototype.encode=function(e,t){for(var r=new Uint32Array(this.offsets.length),n=0,i=0,s=0;s<r.length;++s)if(r[s]=n,i<t.length&&t[i]==s){++i,r[s]=n;var a=this.offsets[s],o=this.offsets[s+1]-a;o>0&&(n+=o)}for(var l=new Array(4*r.length),c=0;c<r.length;++c)l[4*c+3]=255&r[c],l[4*c+2]=(65280&r[c])>>8,l[4*c+1]=(16711680&r[c])>>16,l[4*c]=(4278190080&r[c])>>24;return l},e}(),nm=function(){function e(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var e,t,r,n,i;for(t in n=this.font.cmap.tables[0].codeMap,e={},i=this.subset)r=i[t],e[t]=n[r];return e},e.prototype.glyphsFor=function(e){var t,r,n,i,s,a,o;for(n={},s=0,a=e.length;s<a;s++)n[i=e[s]]=this.font.glyf.glyphFor(i);for(i in t=[],n)(null!=(r=n[i])?r.compound:void 0)&&t.push.apply(t,r.glyphIDs);if(t.length>0)for(i in o=this.glyphsFor(t))r=o[i],n[i]=r;return n},e.prototype.encode=function(e,t){var r,n,i,s,a,o,l,c,u,h,d,f,p,m,g;for(n in r=Wp.encode(this.generateCmap(),"unicode"),s=this.glyphsFor(e),d={0:0},g=r.charMap)d[(o=g[n]).old]=o.new;for(f in h=r.maxGlyphID,s)f in d||(d[f]=h++);return c=function(e){var t,r;for(t in r={},e)r[e[t]]=t;return r}(d),u=Object.keys(c).sort(function(e,t){return e-t}),p=function(){var e,t,r;for(r=[],e=0,t=u.length;e<t;e++)a=u[e],r.push(c[a]);return r}(),i=this.font.glyf.encode(s,p,d),l=this.font.loca.encode(i.offsets,p),m={cmap:this.font.cmap.raw(),glyf:i.table,loca:l,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(t)},this.font.os2.exists&&(m["OS/2"]=this.font.os2.raw()),this.font.directory.encode(m)},e}();cf.API.PDFObject=function(){var e;function t(){}return e=function(e,t){return(Array(t+1).join("0")+e).slice(-t)},t.convert=function(r){var n,i,s,a;if(Array.isArray(r))return"["+function(){var e,i,s;for(s=[],e=0,i=r.length;e<i;e++)n=r[e],s.push(t.convert(n));return s}().join(" ")+"]";if("string"==typeof r)return"/"+r;if(null!=r?r.isString:void 0)return"("+r+")";if(r instanceof Date)return"(D:"+e(r.getUTCFullYear(),4)+e(r.getUTCMonth(),2)+e(r.getUTCDate(),2)+e(r.getUTCHours(),2)+e(r.getUTCMinutes(),2)+e(r.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(r)){for(i in s=["<<"],r)a=r[i],s.push("/"+i+" "+t.convert(a));return s.push(">>"),s.join("\n")}return""+r},t}();const{PAGE_MARGIN:im,HEADER_HEIGHT:sm,FOOTER_HEIGHT:am,SECTION_SPACING:om,LINE_HEIGHT:lm,PARAGRAPH_SPACING:cm}={PAGE_MARGIN:20,HEADER_HEIGHT:50,FOOTER_HEIGHT:15,SECTION_SPACING:8,LINE_HEIGHT:5,PARAGRAPH_SPACING:2},um=e=>e.replace(/^#{1,6}\s*/gm,"").replace(/\s#{1,6}\s/g," ").trim(),hm=(e,t)=>{e.setFillColor(99,102,241),e.rect(0,0,t,sm,"F"),e.setTextColor(255,255,255),e.setFontSize(28),e.setFont("helvetica","bold"),e.text("Flow Efficiency Assessment",t/2,25,{align:"center"}),e.setFontSize(16),e.text("Results & Recommendations",t/2,38,{align:"center"})},dm=(e,t,r,n,i)=>{let s=n;return e.setFontSize(18),e.setFont("helvetica","bold"),e.setTextColor(0,0,0),e.text("Your Assessment Scores",r,s),s+=12,fm(e,r,s,i/2-5,"Resource Efficiency",t.resourcePercentage,t.resourceScore,{fill:[255,237,213],border:[251,146,60],text:[234,88,12]}),fm(e,r+i/2+5,s,i/2-5,"Flow Efficiency",t.flowPercentage,t.flowScore,{fill:[219,234,254],border:[59,130,246],text:[37,99,235]}),s+45},fm=(e,t,r,n,i,s,a,o)=>{e.setFillColor(o.fill[0],o.fill[1],o.fill[2]),e.roundedRect(t,r,n,30,3,3,"F"),e.setDrawColor(o.border[0],o.border[1],o.border[2]),e.setLineWidth(.5),e.roundedRect(t,r,n,30,3,3,"S"),e.setFontSize(12),e.setFont("helvetica","bold"),e.setTextColor(o.text[0],o.text[1],o.text[2]),e.text(i,t+5,r+8),e.setFontSize(24),e.setTextColor(0,0,0),e.text(`${s}%`,t+5,r+20),e.setFontSize(10),e.setTextColor(100,100,100),e.text(`${a} / 40 points`,t+5,r+26)},pm=(e,t,r,n,i,s)=>{let a=i;return t.split(/(?=^## )/gm).forEach((t,i)=>{if(!t.trim()||!t.startsWith("##"))return;const o=t.replace(/^##\s+/,"").split("\n").filter(e=>e.trim());if(0===o.length)return;const l=o[0].trim();a=s(30,a),e.setFillColor(245,245,245),e.roundedRect(r,a-2,n,12,2,2,"F"),e.setFontSize(14),e.setFont("helvetica","bold"),e.setTextColor(0,0,0),e.text(l,r+3,a+6),a+=16,a=mm(e,o.slice(1),r,n,a,s),a+=om}),a},mm=(e,t,r,n,i,s)=>{let a=i,o=!1;return e.setFontSize(10),e.setFont("helvetica","normal"),e.setTextColor(50,50,50),t.forEach(t=>{const i=t.trim();if(i)if(i.startsWith("####")){o&&(a+=3,o=!1),a=s(12,a);const t=um(i.replace(/^####\s*/,""));e.setFontSize(10),e.setFont("helvetica","bold"),e.setTextColor(99,102,241),e.text(t,r+2,a),a+=8,e.setFontSize(10),e.setFont("helvetica","normal"),e.setTextColor(50,50,50)}else if(i.startsWith("###")){o&&(a+=3,o=!1),a=s(14,a);const t=um(i.replace(/^###\s*/,""));e.setFontSize(11),e.setFont("helvetica","bold"),e.setTextColor(0,0,0),e.text(t,r,a),a+=10,e.setFontSize(10),e.setFont("helvetica","normal"),e.setTextColor(50,50,50)}else i.startsWith("* ")||i.startsWith("* ")?(o=!0,a=gm(e,i,r,n,a,s)):/^\d+\./.test(i)?(o&&(a+=3,o=!1),a=bm(e,i,r,n,a,s)):(o&&(a+=3,o=!1),a=vm(e,i,r,n,a,s));else a+=4}),a},gm=(e,t,r,n,i,s)=>{let a=i;const o=um(t.replace(/^\*\s+/,"")).split("**");let l=r+10,c=!0;return a=s(15,a),e.setFillColor(99,102,241),e.circle(r+5,a-1,1,"F"),o.forEach((t,i)=>{if(!t)return;i%2==1?(e.setFont("helvetica","bold"),e.setTextColor(0,0,0)):(e.setFont("helvetica","normal"),e.setTextColor(50,50,50));const o=e.splitTextToSize(t,n-15);o.forEach((t,n)=>{(!c||n>0)&&(a=s(6,a)),e.text(t,c&&0===n?l:r+10,a),n<o.length-1?(a+=lm,c=!1,l=r+10):(l+=e.getTextWidth(t),c=!1)})}),a+6},bm=(e,t,r,n,i,s)=>{let a=i;a=s(15,a);const o=um(t).split("**");let l=!0;return o.forEach((t,i)=>{if(!t)return;i%2==1?(e.setFont("helvetica","bold"),e.setTextColor(0,0,0)):(e.setFont("helvetica","normal"),e.setTextColor(50,50,50));
223e.splitTextToSize(t,n-5).forEach(t=>{l||(a=s(6,a)),l=!1,e.text(t,r+3,a),a+=lm})}),a+3},vm=(e,t,r,n,i,s)=>{let a=i;a=s(15,a);const o=um(t).split("**");let l=!0;return o.forEach((t,i)=>{if(!t)return;i%2==1?(e.setFont("helvetica","bold"),e.setTextColor(0,0,0)):(e.setFont("helvetica","normal"),e.setTextColor(50,50,50));e.splitTextToSize(t,n).forEach(t=>{l||(a=s(6,a)),l=!1,e.text(t,r,a),a+=lm})}),a+cm},wm=(e,t,r,n)=>{const i=e.getNumberOfPages(),s=(new Date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});for(let a=1;a<=i;a++)e.setPage(a),e.setFontSize(8),e.setTextColor(128,128,128),e.setFont("helvetica","normal"),e.text(s,n,r-10),e.text(`Page ${a} of ${i}`,t/2,r-10,{align:"center"}),e.text("Flow Efficiency Assessment",t-n,r-10,{align:"right"})},ym=e=>{const t=[];return e.split(/(?=^## )/gm).forEach(e=>{if(!e.trim()||!e.startsWith("##"))return;const r=e.replace(/^##\s+/,"").split("\n"),n=r[0].trim(),i=r.slice(1).join("\n").trim(),s=_m(n);t.push({title:n,content:i,icon:s})}),t},_m=e=>{const t=e.toLowerCase();return t.includes("insight")?"lightbulb":t.includes("strateg")?"target":t.includes("experiment")?"zap":"default"},xm=e=>e.replace(/^#{1,6}\s*/gm,"").replace(/\s#{1,6}\s/g," ").trim(),km=()=>n.jsxs("div",{className:"text-center space-y-4",children:[n.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-green-500/10",children:n.jsx(fe,{className:"h-8 w-8 text-green-500"})}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground mb-2",children:"Assessment Complete!"}),n.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Your results have been analyzed by our AI expert coach"})]})]}),Nm=ae("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Sm({className:e,variant:t,...r}){return n.jsx("div",{className:wt(Nm({variant:t}),e),...r})}var Am="Progress",[Lm,jm]=b(Am),[Pm,Em]=Lm(Am),Im=T.forwardRef((e,t)=>{const{__scopeProgress:r,value:i=null,max:s,getValueLabel:a=Cm,...o}=e;(s||0===s)&&Bm(s);const l=Bm(s)?s:100;null!==i&&Dm(i,l);const c=Dm(i,l)?i:null,u=Fm(c)?a(c,l):void 0;return n.jsx(Pm,{scope:r,value:c,max:l,children:n.jsx(m.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Fm(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Rm(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});Im.displayName=Am;var Tm="ProgressIndicator",Om=T.forwardRef((e,t)=>{const{__scopeProgress:r,...i}=e,s=Em(Tm,r);return n.jsx(m.div,{"data-state":Rm(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...i,ref:t})});function Cm(e,t){return`${Math.round(e/t*100)}%`}function Rm(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Fm(e){return"number"==typeof e}function Bm(e){return Fm(e)&&!isNaN(e)&&e>0}function Dm(e,t){return Fm(e)&&!isNaN(e)&&e<=t&&e>=0}Om.displayName=Tm;var Mm=Im,Um=Om;const qm=T.forwardRef(({className:e,value:t,...r},i)=>n.jsx(Mm,{ref:i,className:wt("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:n.jsx(Um,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));qm.displayName=Mm.displayName;const zm=({scores:e})=>n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[n.jsx(_o,{className:"p-6 border-2",children:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"font-semibold text-foreground",children:"Resource Efficiency"}),n.jsxs(Sm,{variant:"secondary",className:"text-orange-600 bg-orange-50",children:[e.resourcePercentage,"%"]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx("span",{className:"text-4xl font-bold text-foreground",children:e.resourceScore}),n.jsx("span",{className:"text-lg text-muted-foreground",children:"/ 40"})]}),n.jsx(qm,{value:e.resourcePercentage,className:"h-3"})]}),n.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Keeping people busy and maximizing utilization"})]})}),n.jsx(_o,{className:"p-6 border-2",children:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"font-semibold text-foreground",children:"Flow Efficiency"}),n.jsxs(Sm,{variant:"secondary",className:"text-blue-600 bg-blue-50",children:[e.flowPercentage,"%"]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx("span",{className:"text-4xl font-bold text-foreground",children:e.flowScore}),n.jsx("span",{className:"text-lg text-muted-foreground",children:"/ 40"})]}),n.jsx(qm,{value:e.flowPercentage,className:"h-3"})]}),n.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Fast delivery and reduced wait times"})]})})]});function $m(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}var Wm=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=T.useState(),n=T.useRef(null),i=T.useRef(e),s=T.useRef("none"),a=e?"mounted":"unmounted",[o,l]=function(e,t){return T.useReducer((e,r)=>t[e][r]??e,e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const e=Hm(n.current);s.current="mounted"===o?e:"none"},[o]),x(()=>{const t=n.current,r=i.current;if(r!==e){const n=s.current,a=Hm(t);if(e)l("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(r&&n!==a?"ANIMATION_OUT":"UNMOUNT")}i.current=e}},[e,l]),x(()=>
vendor: 8,640 bytes, line 223
223{if(t){let e;const r=t.ownerDocument.defaultView??window,a=s=>{const a=Hm(n.current).includes(CSS.escape(s.animationName));if(s.target===t&&a&&(l("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},o=e=>{e.target===t&&(s.current=Hm(n.current))};return t.addEventListener("animationstart",o),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",o),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:T.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}(t),i="function"==typeof r?r({present:n.isPresent}):T.Children.only(r),s=v(n.ref,function(e){var t,r;let n=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,i=n&&"isReactWarning"in n&&n.isReactWarning;if(i)return e.ref;if(n=null==(r=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:r.get,i=n&&"isReactWarning"in n&&n.isReactWarning,i)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||n.isPresent?T.cloneElement(i,{ref:s}):null};function Hm(e){return(null==e?void 0:e.animationName)||"none"}Wm.displayName="Presence";var Vm="Collapsible",[Gm,Km]=b(Vm),[Jm,Ym]=Gm(Vm),Zm=T.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:i,defaultOpen:s,disabled:a,onOpenChange:o,...l}=e,[c,u]=w({prop:i,defaultProp:s??!1,onChange:o,caller:Vm});return n.jsx(Jm,{scope:r,disabled:a,contentId:_(),open:c,onOpenToggle:T.useCallback(()=>u(e=>!e),[u]),children:n.jsx(m.div,{"data-state":ng(c),"data-disabled":a?"":void 0,...l,ref:t})})});Zm.displayName=Vm;var Xm="CollapsibleTrigger",Qm=T.forwardRef((e,t)=>{const{__scopeCollapsible:r,...i}=e,s=Ym(Xm,r);return n.jsx(m.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":ng(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...i,ref:t,onClick:$m(e.onClick,s.onOpenToggle)})});Qm.displayName=Xm;var eg="CollapsibleContent",tg=T.forwardRef((e,t)=>{const{forceMount:r,...i}=e,s=Ym(eg,e.__scopeCollapsible);return n.jsx(Wm,{present:r||s.open,children:({present:e})=>n.jsx(rg,{...i,ref:t,present:e})})});tg.displayName=eg;var rg=T.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:i,children:s,...a}=e,o=Ym(eg,r),[l,c]=T.useState(i),u=T.useRef(null),h=v(t,u),d=T.useRef(0),f=d.current,p=T.useRef(0),g=p.current,b=o.open||l,w=T.useRef(b),y=T.useRef(void 0);return T.useEffect(()=>{const e=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(e)},[]),x(()=>{const e=u.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,w.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),c(i)}},[o.open,i]),n.jsx(m.div,{"data-state":ng(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!b,...a,ref:h,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:b&&s})});function ng(e){return e?"open":"closed"}var ig=Zm,sg=Qm,ag=tg,og="Accordion",lg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[cg,ug,hg]=g(og),[dg,fg]=b(og,[hg,Km]),pg=Km(),mg=O.forwardRef((e,t)=>{const{type:r,...i}=e,s=i,a=i;return n.jsx(cg.Provider,{scope:e.__scopeAccordion,children:"multiple"===r?n.jsx(_g,{...a,ref:t}):n.jsx(yg,{...s,ref:t})})});mg.displayName=og;var[gg,bg]=dg(og),[vg,wg]=dg(og,{collapsible:!1}),yg=O.forwardRef((e,t)=>{const{value:r,defaultValue:i,onValueChange:s=()=>{},collapsible:a=!1,...o}=e,[l,c]=w({prop:r,defaultProp:i??"",onChange:s,caller:og});return n.jsx(gg,{scope:e.__scopeAccordion,value:O.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:O.useCallback(()=>a&&c(""),[a,c]),children:n.jsx(vg,{scope:e.__scopeAccordion,collapsible:a,children:n.jsx(Ng,{...o,ref:t})})})}),_g=O.forwardRef((e,t)=>{const{value:r,defaultValue:i,onValueChange:s=()=>{},...a}=e,[o,l]=w({prop:r,defaultProp:i??[],onChange:s,caller:og}),c=O.useCallback(e=>l((t=[])=>[...t,e]),[l]),u=O.useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return n.jsx(gg,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:n.jsx(vg,{scope:e.__scopeAccordion,collapsible:!0,children:n.jsx(Ng,{...a,ref:t})})})}),[xg,kg]=dg(og),Ng=O.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:i,dir:s,orientation:a="vertical",...o}=e,l=O.useRef(null),c=v(l,t),u=ug(r),h="ltr"===ja(s),d=$m(e.onKeyDown,e=>{var t;if(!lg.includes(e.key))return;const r=e.target,n=u().filter(e=>{var t;return!(null==(t=e.ref.current)?void 0:t.disabled)}),i=n.findIndex(e=>e.ref.current===r),s=n.length;if(-1===i)return;e.preventDefault();let o=i;const l=s-1,c=()=>{o=i+1,o>l&&(o=0)},d=()=>{o=i-1,o<0&&(o=l)};switch(e.key){case"Home":o=0;break;case"End":o=l;break;case"ArrowRight":"horizontal"===a&&(h?c():d());break;case"ArrowDown":"vertical"===a&&c();break;case"ArrowLeft":"horizontal"===a&&(h?d():c());break;case"ArrowUp":"vertical"===a&&d()}null==(t=n[o%s].ref.current)||t.focus()});return n.jsx(xg,{scope:r,disabled:i,direction:s,orientation:a,children:n.jsx(cg.Slot,{scope:r,children:n.jsx(m.div,{...o,"data-orientation":a,ref:c,onKeyDown:i?void 0:d})})})}),Sg="AccordionItem",[Ag,Lg]=dg(Sg),jg=O.forwardRef((e,t)=>{const{__scopeAccordion:r,value:i,...s}=e,a=kg(Sg,r),o=bg(Sg,r),l=pg(r),c=_(),u=i&&o.value.includes(i)||!1,h=a.disabled||e.disabled;return n.jsx(Ag,{scope:r,open:u,disabled:h,triggerId:c,children:n.jsx(ig,{"data-orientation":a.orientation,"data-state":Rg(u),...l,...s,ref:t,disabled:h,open:u,onOpenChange:e=>{e?o.onItemOpen(i):o.onItemClose(i)}})})});jg.displayName=Sg;var Pg="AccordionHeader",Eg=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...i}=e,s=kg(og,r),a=Lg(Pg,r);return n.jsx(m.h3,{"data-orientation":s.orientation,"data-state":Rg(a.open),"data-disabled":a.disabled?"":void 0,...i,ref:t})});Eg.displayName=Pg;var Ig="AccordionTrigger",Tg=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...i}=e,s=kg(og,r),a=Lg(Ig,r),o=wg(Ig,r),l=pg(r);return n.jsx(cg.ItemSlot,{scope:r,children:n.jsx(sg,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:a.triggerId,...l,...i,ref:t})})});Tg.displayName=Ig;var Og="AccordionContent",Cg=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...i}=e,s=kg(og,r),a=Lg(Og,r),o=pg(r);return n.jsx(ag,{role:"region","aria-labelledby":a.triggerId,"data-orientation":s.orientation,...o,...i,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function Rg(e){return e?"open":"closed"}Cg.displayName=Og;var Fg=jg,Bg=Eg,Dg=Tg,Mg=Cg;const Ug=mg,qg=T.forwardRef(({className:e,...t},r)=>n.jsx(Fg,{ref:r,className:wt("border-b border-border",e),...t}));qg.displayName="AccordionItem";const zg=T.forwardRef(({className:e,children:t,...r},i)=>n.jsx(Bg,{className:"flex",children:n.jsxs(Dg,{ref:i,className:wt("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,n.jsx(de,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));zg.displayName=Dg.displayName;const $g=T.forwardRef(({className:e,children:t,...r},i)=>n.jsx(Mg,{ref:i,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:n.jsx("div",{className:wt("pb-4 pt-0",e),children:t})}));$g.displayName=Mg.displayName;const Wg=e=>{switch(e){case"lightbulb":return n.jsx(be,{className:"h-5 w-5 text-yellow-500"});case"target":return n.jsx(ke,{className:"h-5 w-5 text-blue-500"});case"zap":return n.jsx(Ae,{className:"h-5 w-5 text-purple-500"});default:return n.jsx(fe,{className:"h-5 w-5 text-green-500"})}},Hg=e=>{const t=(e=>e.split("\n").map((e,t)=>{const r=e.trim();if(!r)return null;if(r.startsWith("####"))return{type:"nested-item",key:t,title:xm(r.replace(/^####\s*/,""))};if(r.startsWith("###"))return{type:"subchapter",key:t,title:xm(r.replace(/^###\s*/,""))};if(r.startsWith("* ")||r.startsWith("* ")){const e=r.replace(/^\*\s+/,"");return{type:"bullet",key:t,parts:xm(e).split("**")}}return/^\d+\./.test(r)?{type:"numbered",key:t,parts:xm(r).split("**")}:{type:"paragraph",key:t,parts:xm(r).split("**")}}
223).filter(Boolean))(e);let r=[],i="";const s=[];return t.forEach((e,t)=>{if(!e)return;const{type:a,key:o,parts:l,title:c}=e;if("subchapter"===a)return r.length>0&&s.push(n.jsx("div",{className:"mt-4",children:n.jsx(Ug,{type:"single",collapsible:!0,defaultValue:`subchapter-${i}`,children:n.jsxs(qg,{value:`subchapter-${i}`,className:"border border-border/50 rounded-lg px-4",children:[n.jsx(zg,{className:"hover:no-underline py-3",children:n.jsx("h4",{className:"text-base font-bold text-foreground",children:i})}),n.jsx($g,{className:"pt-2 pb-4",children:n.jsx("div",{className:"space-y-2",children:r})})]})})},`sub-${i}`)),i=c,void(r=[]);if("nested-item"===a){const e=n.jsx("h5",{className:"text-sm font-bold text-foreground mt-4 mb-2 pl-2 border-l-2 border-primary",children:c},o);return void(i?r.push(e):s.push(e))}if("bullet"===a){const e=n.jsx("li",{className:"ml-4 mb-2 leading-relaxed",children:l.map((e,t)=>t%2==1?n.jsx("strong",{className:"font-semibold text-foreground",children:e},t):e)},o);return void(i?r.push(e):s.push(e))}if("numbered"===a){const e=n.jsx("div",{className:"mb-3 pl-4 border-l-2 border-primary/30",children:n.jsx("p",{className:"leading-relaxed",children:l.map((e,t)=>t%2==1?n.jsx("strong",{className:"font-semibold text-foreground",children:e},t):e)})},o);return void(i?r.push(e):s.push(e))}const u=n.jsx("p",{className:"mb-3 leading-relaxed",children:l.map((e,t)=>t%2==1?n.jsx("strong",{className:"font-semibold text-foreground",children:e},t):e)},o);i?r.push(u):s.push(u)}),r.length>0&&s.push(n.jsx("div",{className:"mt-4",children:n.jsx(Ug,{type:"single",collapsible:!0,defaultValue:`subchapter-${i}`,children:n.jsxs(qg,{value:`subchapter-${i}`,className:"border border-border/50 rounded-lg px-4",children:[n.jsx(zg,{className:"hover:no-underline py-3",children:n.jsx("h4",{className:"text-base font-bold text-foreground",children:i})}),n.jsx($g,{className:"pt-2 pb-4",children:n.jsx("div",{className:"space-y-2",children:r})})]})})},`sub-${i}`)),s},Vg=({section:e})=>{const t=e.content.includes("* ");return n.jsx(_o,{className:"p-6",children:n.jsx(Ug,{type:"single",collapsible:!0,defaultValue:"item-1",children:n.jsxs(qg,{value:"item-1",className:"border-0",children:[n.jsx(zg,{className:"hover:no-underline",children:n.jsxs("div",{className:"flex items-center gap-3",children:[Wg(e.icon),n.jsx("h3",{className:"text-xl font-bold text-foreground",children:e.title})]})}),n.jsx($g,{children:n.jsx("div",{className:"text-muted-foreground text-sm sm:text-base pt-4",children:t?n.jsx("ul",{className:"space-y-2 list-none",children:Hg(e.content)}):n.jsx("div",{className:"space-y-2",children:Hg(e.content)})})})]})})})},Gg=()=>{const e=B(),t=D().state;return n.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[n.jsx(ba,{}),n.jsxs("div",{className:"flex items-center justify-between bg-card px-4 py-3 border-b border-border",children:[n.jsx("h1",{className:"text-lg font-semibold text-card-foreground",children:"Results"}),n.jsxs(Yt,{variant:"outline",size:"sm",onClick:()=>{if(t)try{(e=>{const t=new cf,r=t.internal.pageSize.getWidth(),n=t.internal.pageSize.getHeight(),i=r-2*im;let s=im;hm(t,r),s=65,t.setTextColor(0,0,0),s=dm(t,e,im,s,i),s=pm(t,e.analysis,im,i,s,(e,r)=>r+e>n-im-am?(t.addPage(),im):r),wm(t,r,n,im);const a=`flow-efficiency-assessment-${(new Date).toISOString().split("T")[0]}.pdf`;t.save(a)})(t),Mt.success("PDF downloaded successfully!")}catch(e){Mt.error("Failed to generate PDF")}},disabled:!t,className:"gap-2",children:[n.jsx(me,{className:"h-4 w-4"}),n.jsx("span",{className:"hidden sm:inline",children:"Export PDF"})]})]}),n.jsx("div",{className:"flex-1 px-4 sm:px-6 py-6 sm:py-8",children:n.jsxs("div",{className:"mx-auto max-w-4xl space-y-6",children:[n.jsx(km,{}),t?n.jsxs(n.Fragment,{children:[n.jsx(zm,{scores:t}),n.jsx("div",{className:"space-y-4",children:ym(t.analysis).map((e,t)=>n.jsx(Vg,{section:e},t))}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Learning Resources"}),n.jsx("p",{className:"text-muted-foreground",children:"Explore these carefully curated resources from leading experts to deepen your understanding and improve your team's flow efficie
223ncy."})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"ð Essential Books"}),n.jsxs("ul",{className:"list-disc pl-5 space-y-3 text-muted-foreground",children:[n.jsxs("li",{children:[n.jsx("a",{href:"https://www.amazon.com/Principles-Product-Development-Flow-Generation/dp/1935401009",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"The Principles of Product Development Flow"})," ","by Donald G. Reinertsen - The definitive guide on flow efficiency, cost of delay, and economic decision-making in product development."]}),n.jsxs("li",{children:[n.jsx("a",{href:"https://www.amazon.com/This-Lean-Resolving-Efficiency-Paradox/dp/9198039113",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"This is Lean"})," ","by Niklas Modig & Pär Ã
hlström - Clear explanation of flow efficiency vs resource efficiency and why flow wins."]}),n.jsxs("li",{children:[n.jsx("a",{href:"https://www.amazon.com/Goal-Process-Ongoing-Improvement/dp/0884271951",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"The Goal"})," ","by Eliyahu M. Goldratt - Theory of Constraints, bottleneck management, and the five focusing steps."]}),n.jsxs("li",{children:[n.jsx("a",{href:"https://www.amazon.com/Team-Topologies-Organizing-Business-Technology/dp/1942788819",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"Team Topologies"})," ","by Matthew Skelton & Manuel Pais - Organizing business and technology teams for fast flow and reduced cognitive load."]})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"ð Flow Metrics & Measurement"}),n.jsxs("ul",{className:"list-disc pl-5 space-y-3 text-muted-foreground",children:[n.jsxs("li",{children:[n.jsx("a",{href:"https://actionableagile.com/resources/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"Actionable Agile Metrics"})," ","- Practical guidance on measuring cycle time, throughput, WIP, and forecasting delivery."]}),n.jsxs("li",{children:[n.jsx("a",{href:"https://kanban.university/kanban-guide/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"The Official Kanban Guide"})," ","- Comprehensive guide to Kanban principles, practices, and metrics for optimizing workflow."]}),n.jsxs("li",{children:[n.jsx("a",{href:"https://dora.dev/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"DORA Metrics"})," ","- Research-backed metrics for software delivery performance: lead time, deployment frequency, MTTR, and change failure rate."]})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"ðï¸ Organization Design"}),n.jsxs("ul",{className:"list-disc pl-5 space-y-3 text-muted-foreground",children:[n.jsxs("li",{children:[n.jsx("a",{href:"https://www.amazon.com/Accelerate-Software-Performing-Technology-Organizations/dp/1942788339",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"Accelerate"})," ","by Nicole Forsgren, Jez Humble, Gene Kim - Science-based research on what drives high-performing technology organizations."]}),n.jsxs("li",{children:[n.jsx("a",{href:"https://blackswanfarming.com/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"Black Swan Farming"})," ","- Joshua J. Arnold & Ãzlem Yüce's work on cost of delay and value-based prioritization techniques."]})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"âï¸ Thought Leader Articles & Blogs"}),n.jsxs("ul",{className:"list-disc pl-5 space-y-3 text-muted-foreground",children:[n.jsxs("li",{children:[n.jsx("a",{href:"https://www.agilealliance.org/resources/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"Agile Alliance Resources"})," ","- Curated articles on agile practices, team collaboration, and continuous improvement."]}),n.jsxs("li",{children:[n.jsx("a",{href:"https://www.lean.org/the-lean-post/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"The Lean Post"}
223)," ","- Articles from lean thinking practitioners on flow, waste reduction, and value creation."]}),n.jsxs("li",{children:[n.jsx("a",{href:"https://www.scrum.org/resources/blog",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-medium",children:"Scrum.org Blog"})," ","- Insights from Scrum creators and practitioners on empiricism, self-organization, and iterative delivery."]})]})]})]})]}):n.jsxs("div",{className:"text-center py-12",children:[n.jsx("p",{className:"text-muted-foreground mb-4",children:"No assessment data available. Please complete the assessment first."}),n.jsx(Yt,{onClick:()=>e("/survey/flow-efficiency-assessment"),children:"Take Assessment"})]})]})}),n.jsx(pa,{})]})},Kg=()=>{const e=D();return T.useEffect(()=>{},[e.pathname]),n.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[n.jsx(ba,{}),n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"text-center",children:[n.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),n.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),n.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})}),n.jsx(pa,{})]})},Jg=new W,Yg=()=>n.jsx(Zt,{children:n.jsxs(H,{client:Jg,children:[n.jsx(Lt,{}),n.jsx(Kt,{}),n.jsx(q,{children:n.jsxs(z,{children:[n.jsx($,{path:"/",element:n.jsx(va,{})}),n.jsx($,{path:"/auth",element:n.jsx(ya,{})}),n.jsx($,{path:"/survey/:id",element:n.jsx(To,{})}),n.jsx($,{path:"/success",element:n.jsx(Gg,{})}),n.jsx($,{path:"*",element:n.jsx(Kg,{})})]})})]})});e(document.getElementById("root")).render(n.jsx(T.StrictMode,{children:n.jsx(Yg,{})}));export{Ro 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.