1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-HqTIw-xT.js","assets/index-MoAbC8_9.js","assets/index-sPIAqQPc.css"])))=>i.map(i=>d[i]); 2var n0=Object.defineProperty;var s0=(e,n,t)=>n in e?n0(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Oe=(e,n,t)=>s0(e,typeof n!="symbol"?n+"":n,t);import{c as mu,u as Lc,t as oo,r as be,j as a,w as ln,x as cn,y as Wn,B as pt,I as Jo,m as ds,F as dc,K as Nn,N as Tn,T as Vr,M as xr,s as Be,aA as i0,a8 as r0,aB as a0,a9 as o0,aa as l0,ab as c0,ac as d0,ad as u0,ae as h0,af as f0,a4 as ph,a3 as m0,ah as p0,k as Ps,X as uc,_ as nd,O as g0,E as x0,a as v0,o as b0,n as gh,G as xh,H as vh,J as bh}from"./index-MoAbC8_9.js";import{A as wh}from"./AdminPageLayout-DL0avA2R.js";import{C as yh}from"./confirm-dialog-DHYtbMdr.js";import{S as w0,a as y0,b as _0,c as N0,d as Ml}from"./select-ChAxOmxm.js";import{B as Ot}from"./badge-BHbYeRgi.js";import{T as qd}from"./textarea-4z16PwID.js";import{P as j0}from"./progress-CIau9pND.js";import{T as di,a as ui,b as Qt,c as Ze,d as hi,e as Ie}from"./table-BNHSYido.js";import{D as fr,a as mr,b as pr,c as gr,d as Xo,e as Ql}from"./dialog-DrI7Oddz.js";import{C as Ro,a as Io,b as Bo,A as k0,M as _h,V as Nh}from"./collapsible-BIxz44zB.js";import{A as ba,a as wa}from"./alert-B1M6s1_G.js";import{a as Em,C as A0,P as S0}from"./PollEmailHistory-CWoBpO6Y.js";import{C as Wd}from"./checkbox-D2A7tWS7.js";import{S as Ud}from"./switch-BHj3-8MN.js";import{S as Ii}from"./skeleton-ClxqB572.js";import{C as L0}from"./calendar-days-DbjuOaGz.js";import{S as Vd}from"./save-DWdLHugL.js";import{B as Hd}from"./bell-CKHJStUz.js";import{E as ll}from"./eye-DKrvAixa.js";import{I as _i}from"./info-CZr0REZX.js";import{S as hc}from"./send-DIVN8qsp.js";import{H as fc}from"./history-GAI9mcQt.js";import{U as Pm}from"./users-xui-UtA1.js";import{T as mc,a as pc,c as Ya,b as Ti}from"./tabs-5EVsfllK.js";import{e as E0,a as ar,f as Pt,M as P0,V as C0}from"./pollQuorum-DtU2ni5k.js";import{i as D0}from"./pollDates-DP2VfLei.js";import{S as pu}from"./shield-check-DViJUJ8V.js";import{S as T0,M as z0,P as F0,u as gs,w as O0,C as M0,U as sd}from"./xlsx-CdLBLU9U.js";import{P as R0,a as I0,b as B0}from"./popover-BsQ559UC.js";import{C as q0}from"./calendar-CnsXUgOr.js";import{g as W0,s as Gd,a as Cm,b as U0,c as V0,l as jh,i as H0,w as kh,d as G0,f as Rl,e as $0}from"./format-Beid_ZIk.js";import{c as Ah}from"./cs-DzBP63t1.js";import{g as Dm,t as lo,c as Qs,m as Z0,a as Y0,b as K0,d as Tm,e as J0}from"./en-US-CQ3IMwMG.js";import{R as X0,a as Q0}from"./radio-group-BtSPrM_8.js";import{f as ni,b as ua,t as zm,c as gu,p as Qo,a as Sh}from"./legalDeadlines-MDnit4d7.js";import{P as Fm}from"./printer-Bb7W1Pva.js";import{F as $d}from"./file-text-Bif0RP8Y.js";import{d as qo,j as Om,C as id}from"./Header-CnJGZ8vQ.js";import{D as ec}from"./download-DXQgHLv7.js";import{U as eg}from"./upload-BH1HltYO.js";import{E as tg}from"./external-link-Bd1Ktkpe.js";import{F as el}from"./file-spreadsheet-DYxjeH4g.js";import{A as Mm}from"./arrow-left-CZKmX_Y-.js";import{S as ng}from"./search-_fcwEKN-.js";import{C as pa}from"./circle-check-7w5_oQMu.js";import{C as gc}from"./clipboard-check-BNBiN_o5.js";import{P as sg}from"./play-Dv41UmTM.js";import{L as ig}from"./lock-BEcuk4Jx.js";import{C as tc}from"./chevron-down-BDe4YKQW.js";import{M as Rm}from"./AdminSidebar-B1OFksO6.js";import{L as rg}
vendor: 23,475 bytes, lines 2-17
2from"./log-in-CT_3hHd4.js";import{P as ag}from"./pencil-C_0Cp3wi.js";import{C as rd}from"./chart-column-Bo5i9GGE.js";import{S as To}from"./scale-CfsuUh1a.js";import{A as og}from"./arrow-up-down-D7o6PKMM.js";import{T as Lh}from"./trash-2-DRJ_nWSl.js";import{P as ad}from"./paperclip-I8ctU5eK.js";import{I as lg}from"./image-zcTlJhLM.js";import"./Layout-jB2m3rBw.js";import"./breadcrumb-CmKLwRya.js";import"./house-DjS1WMqx.js";import"./index-BdQq_4o_.js";import"./index-D9-GACGG.js";import"./chevron-up-JyGCcpt9.js";import"./endOfMonth-D_4h-ZFk.js";import"./chevron-left-BrISfdwW.js";import"./mountain-BHfTfCFy.js";import"./user-Cvsz7Lm_.js";import"./scroll-area-CoT3wSM0.js";import"./clipboard-list-CzdQdj9P.js";import"./building-crte1H4H.js";import"./calculator-GhS8BFwe.js";import"./wallet-e9E2tgeo.js";import"./trending-up-Cg9WFJWB.js";import"./trending-down-EHPUNHPt.js";import"./settings-BUFFH3UG.js";import"./database-yc2noHJi.js";import"./file-search-B2CpYcS_.js";/** 3 * @license lucide-react v0.462.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const cg=mu("MailCheck",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/** 8 * @license lucide-react v0.462.0 - ISC 9 * 10 * This source code is licensed under the ISC license. 11 * See the LICENSE file in the root directory of this source tree. 12 */const dg=mu("PackageCheck",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/** 13 * @license lucide-react v0.462.0 - ISC 14 * 15 * This source code is licensed under the ISC license. 16 * See the LICENSE file in the root directory of this source tree. 17 */const ug=mu("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);function hg(){return Object.assign({},Dm())}function fg(e){let t=lo(e).getDay();return t===0&&(t=7),t}function mg(e,n){const t=n instanceof Date?Qs(n,0):new n(0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}const pg=10;class Im{constructor(){Oe(this,"subPriority",0)}validate(n,t){return!0}}class gg extends Im{constructor(n,t,s,i,r){super(),this.value=n,this.validateValue=t,this.setValue=s,this.priority=i,r&&(this.subPriority=r)}validate(n,t){return this.validateValue(n,this.value,t)}set(n,t,s){return this.setValue(n,t,this.value,s)}}class xg extends Im{constructor(){super(...arguments);Oe(this,"priority",pg);Oe(this,"subPriority",-1)}set(t,s){return s.timestampIsSet?t:Qs(t,mg(t,Date))}}class Zt{run(n,t,s,i){const r=this.parse(n,t,s,i);return r?{setter:new gg(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(n,t,s){return!0}}class vg extends Zt{constructor(){super(...arguments);Oe(this,"priority",140);Oe(this,"incompatibleTokens",["R","u","t","T"])}parse(t,s,i){switch(s){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}set(t,s,i){return s.era=i,t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}const Un={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Bi={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Vn(e,n){return e&&{value:n(e.value),rest:e.rest}}function Sn(e,n){const t=n.match(e);return t?{value:parseInt(t[0],10),rest:n.slice(t[0].length)}:null}function qi(e,n){const t=n.match(e);if(!t)return null;if(t[0]==="Z")return{value:0,rest:n.slice(1)};const s=t[1]==="+"?1:-1,i=t[2]?parseInt(t[2],10):0,r=t[3]?parseInt(t[3],10):0,l=t[5]?parseInt(t[5],10):0;return{value:s*(i*Z0+r*Y0+l*K0),rest:n.slice(t[0].length)}}function Bm(e){return Sn(Un.anyDigitsSigned,e)}function zn(e,n){switch(e){case 1:return Sn(Un.singleDigit,n);case 2:return Sn(Un.twoDigits,n);case 3:return Sn(Un.threeDigits,n);case 4:return Sn(Un.fourDigits,n);default:return Sn(new RegExp("^\\d{1,"+e+"}"),n)}}function xc(e,n){switch(e){case 1:return Sn(Un.singleDigitSigned,n);case 2:return Sn(Un.twoDigitsSigned,n);case 3:return Sn(Un.threeDigitsSigned,n);case 4:return Sn(Un.fourDigitsSigned,n);default:return Sn(new RegExp("^-?\\d{1,"+e+"}"),n)}}function xu(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function qm(e,n){const t=n>0,s=t?n:1-n;let i;if(s<=50)i=e||100;else{const r=s+50,l=Math.trunc(r/100)*100,o=e>=r%100;i=e+l-(o?100:0)}return t?i:1-i}function Wm(e){return e%400===0||e%4===0&&e%100!==0}class bg extends Zt{constructor(){super(...arguments);Oe(this,"priority",130);Oe(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,s,i){const r=l=>({year:l,isTwoDigitYear:s==="yy"});switch(s){case"y":return Vn(zn(4,t),r);case"yo":return Vn(i.ordinalNumber(t,{unit:"year"}),r);default:return Vn(zn(s.length,t),r)}}validate(t,s){return s.isTwoDigitYear||s.year>0}set(t,s,i){const r=t.getFullYear();if(i.isTwoDigitYear){const o=qm(i.year,r);return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}const l=!("era"in s)||s.era===1?i.year:1-i.year;return t.setFullYear(l,0,1),t.setHours(0,0,0,0),t}}class wg extends Zt{constructor(){super(...arguments);Oe(this,"priority",130);Oe(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,s,i){const r=l=>({year:l,isTwoDigitYear:s==="YY"});switch(s){case"Y":return Vn(zn(4,t),r);case"Yo":return Vn(i.ordinalNumber(t,{unit:"year"}),r);default:return Vn(zn(s.length,t),r)}}validate(t,s){return s.isTwoDigitYear||s.year>0}set(t,s,i,r){const l=W0(t,r);if(i.isTwoDigitYear){const u=qm(i.year,l);return t.setFullYear(u,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),Gd(t,r)}const o=!("era"in s)||s.era===1?i.year:1-i.year;return t.setFullYear(o,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),Gd(t,r)}}class yg extends Zt{constructor(){super(...arguments);Oe(this,"priority",130);Oe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,s){return xc(s==="R"?4:s.length,t)}set(t,s,i){const r=Qs(t,0);return r.setFullYear(i,0,4),r.setHours(0,0,0,0),Cm(r)}}class _g extends Zt{constructor(){super(...arguments);Oe(this,"priority",130);Oe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,s){return xc(s==="u"?4:s.length,t)}set(t,s,i){return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class Ng extends Zt{constructor(){super(...arguments);Oe(this,"priority",120);Oe(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,s,i){switch(s){case"Q":case"QQ":return zn(s.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,s){return s>=1&&s<=4}set(t,s,i){return t.setMonth((i-1)*3,1),t.setHours(0,0,0,0),t}}class jg extends Zt{constructor(){super(...arguments);Oe(this,"priority",120);Oe(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,s,i){switch(s){case"q":case"qq":return zn(s.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,s){return s>=1&&s<=4}set(t,s,i){return t.setMonth((i-1)*3,1),t.setHours(0,0,0,0),t}}class kg extends Zt{constructor(){super(...arguments);Oe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Oe(this,"priority",110)}parse(t,s,i){const r=l=>l-1;switch(s){case"M":return Vn(Sn(Un.month,t),r);case"MM":return Vn(zn(2,t),r);case"Mo":return Vn(i.ordinalNumber(t,{unit:"month"}),r);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}validate(t,s){return s>=0&&s<=11}set(t,s,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}}class Ag extends Zt{constructor(){super(...arguments);Oe(this,"priority",110);Oe(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,s,i){const r=l=>l-1;switch(s){case"L":return Vn(Sn(Un.month,t),r);case"LL":return Vn(zn(2,t),r);case"Lo":return Vn(i.ordinalNumber(t,{unit:"month"}),r);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}validate(t,s){return s>=0&&s<=11}set(t,s,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}}function Sg(e,n,t){const s=lo(e),i=U0(s,t)-n;return s.setDate(s.getDate()-i*7),s}class Lg extends Zt{constructor(){super(...arguments);Oe(this,"priority",100);Oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,s,i){switch(s){case"w":return Sn(Un.week,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return zn(s.length,t)}}validate(t,s){return s>=1&&s<=53}set(t,s,i,r){return Gd(Sg(t,i,r),r)}}function Eg(e,n){const t=lo(e),s=V0(t)-n;return t.setDate(t.getDate()-s*7),t}class Pg extends Zt{constructor(){super(...arguments);Oe(this,"priority",100);Oe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,s,i){switch(s){case"I":return Sn(Un.week,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return zn(s.length,t)}}validate(t,s){return s>=1&&s<=53}set(t,s,i){return Cm(Eg(t,i))}}const Cg=[31,28,31,30,31,30,31,31,30,31,30,31],Dg=[31,29,31,30,31,30,31,31,30,31,30,31];class Tg extends Zt{constructor(){super(...arguments);Oe(this,"priority",90);Oe(this,"subPriority",1);Oe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,s,i){switch(s){case"d":return Sn(Un.date,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return zn(s.length,t)}}validate(t,s){const i=t.getFullYear(),r=Wm(i),l=t.getMonth();return r?s>=1&&s<=Dg[l]:s>=1&&s<=Cg[l]}set(t,s,i){return t.setDate(i),t.setHours(0,0,0,0),t}}class zg extends Zt{constructor(){super(...arguments);Oe(this,"priority",90);Oe(this,"subpriority",1);Oe(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,s,i){switch(s){case"D":case"DD":return Sn(Un.dayOfYear,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return zn(s.length,t)}}validate(t,s){const i=t.getFullYear();return Wm(i)?s>=1&&s<=366:s>=1&&s<=365}set(t,s,i){return t.setMonth(0,i),t.setHours(0,0,0,0),t}}function vu(e,n,t){var v,w,m,A;const s=Dm(),i=(t==null?void 0:t.weekStartsOn)??((w=(v=t==null?void 0:t.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??s.weekStartsOn??((A=(m=s.locale)==null?void 0:m.options)==null?void 0:A.weekStartsOn)??0,r=lo(e),l=r.getDay(),u=(n%7+7)%7,h=7-i,f=n<0||n>6?n-(l+h)%7:(u+h)%7-(l+h)%7;return Em(r,f)}class Fg extends Zt{constructor(){super(...arguments);Oe(this,"priority",90);Oe(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,s,i){switch(s){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,s){return s>=0&&s<=6}set(t,s,i,r){return t=vu(t,i,r),t.setHours(0,0,0,0),t}}class Og extends Zt{constructor(){super(...arguments);Oe(this,"priority",90);Oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,s,i,r){const l=o=>{const u=Math.floor((o-1)/7)*7;return(o+r.weekStartsOn+6)%7+u};switch(s){case"e":case"ee":return Vn(zn(s.length,t),l);case"eo":return Vn(i.ordinalNumber(t,{unit:"day"}),l);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,s){return s>=0&&s<=6}set(t,s,i,r){return t=vu(t,i,r),t.setHours(0,0,0,0),t}}class Mg extends Zt{constructor(){super(...arguments);Oe(this,"priority",90);Oe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,s,i,r){const l=o=>{const u=Math.floor((o-1)/7)*7;return(o+r.weekStartsOn+6)%7+u};switch(s){case"c":case"cc":return Vn(zn(s.length,t),l);case"co":return Vn(i.ordinalNumber(t,{unit:"day"}),l);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}validate(t,s){return s>=0&&s<=6}set(t,s,i,r){return t=vu(t,i,r),t.setHours(0,0,0,0),t}}function Rg(e,n){const t=lo(e),s=fg(t),i=n-s;return Em(t,i)}class Ig extends Zt{constructor(){super(...arguments);Oe(this,"priority",90);Oe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,s,i){const r=l=>l===0?7:l;switch(s){case"i":case"ii":return zn(s.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Vn(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return Vn(i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Vn(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);case"iiii":default:return Vn(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r)}}validate(t,s){return s>=1&&s<=7}set(t,s,i){return t=Rg(t,i),t.setHours(0,0,0,0),t}}class Bg extends Zt{constructor(){super(...arguments);Oe(this,"priority",80);Oe(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,s,i){switch(s){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,s,i){return t.setHours(xu(i),0,0,0),t}}class qg extends Zt{constructor(){super(...arguments);Oe(this,"priority",80);Oe(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,s,i){switch(s){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,s,i){return t.setHours(xu(i),0,0,0),t}}class Wg extends Zt{constructor(){super(...arguments);Oe(this,"priority",80);Oe(this,"incompatibleTokens",["a","b","t","T"])}parse(t,s,i){switch(s){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,s,i){return t.setHours(xu(i),0,0,0),t}}class Ug extends Zt{constructor(){super(...arguments);Oe(this,"priority",70);Oe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,s,i){switch(s){case"h":return Sn(Un.hour12h,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return zn(s.length,t)}}validate(t,s){return s>=1&&s<=12}set(t,s,i){const r=t.getHours()>=12;return r&&i<12?t.setHours(i+12,0,0,0):!r&&i===12?t.setHours(0,0,0,0):t.setHours(i,0,0,0),t}}class Vg extends Zt{constructor(){super(...arguments);Oe(this,"priority",70);Oe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,s,i){switch(s){case"H":return Sn(Un.hour23h,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return zn(s.length,t)}}validate(t,s){return s>=0&&s<=23}set(t,s,i){return t.setHours(i,0,0,0),t}}class Hg extends Zt{constructor(){super(...arguments);Oe(this,"priority",70);Oe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,s,i){switch(s){case"K":return Sn(Un.hour11h,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return zn(s.length,t)}}validate(t,s){return s>=0&&s<=11}set(t,s,i){return t.getHours()>=12&&i<12?t.setHours(i+12,0,0,0):t.setHours(i,0,0,0),t}}class Gg extends Zt{constructor(){super(...arguments);Oe(this,"priority",70);Oe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,s,i){switch(s){case"k":return Sn(Un.hour24h,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return zn(s.length,t)}}validate(t,s){return s>=1&&s<=24}set(t,s,i){const r=i<=24?i%24:i;return t.setHours(r,0,0,0),t}}class $g extends Zt{constructor(){super(...arguments);Oe(this,"priority",60);Oe(this,"incompatibleTokens",["t","T"])}parse(t,s,i){switch(s){case"m":return Sn(Un.minute,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return zn(s.length,t)}}validate(t,s){return s>=0&&s<=59}set(t,s,i){return t.setMinutes(i,0,0),t}}class Zg extends Zt{constructor(){super(...arguments);Oe(this,"priority",50);Oe(this,"incompatibleTokens",["t","T"])}parse(t,s,i){switch(s){case"s":return Sn(Un.second,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return zn(s.length,t)}}validate(t,s){return s>=0&&s<=59}set(t,s,i){return t.setSeconds(i,0),t}}class Yg extends Zt{constructor(){super(...arguments);Oe(this,"priority",30);Oe(this,"incompatibleTokens",["t","T"])}parse(t,s){const i=r=>Math.trunc(r*Math.pow(10,-s.length+3));return Vn(zn(s.length,t),i)}set(t,s,i){return t.setMilliseconds(i),t}}class Kg extends Zt{constructor(){super(...arguments);Oe(this,"priority",10);Oe(this,"incompatibleTokens",["t","T","x"])}parse(t,s){switch(s){case"X":return qi(Bi.basicOptionalMinutes,t);case"XX":return qi(Bi.basic,t);case"XXXX":return qi(Bi.basicOptionalSeconds,t);case"XXXXX":return qi(Bi.extendedOptionalSeconds,t);case"XXX":default:return qi(Bi.extended,t)}}set(t,s,i){return s.timestampIsSet?t:Qs(t,t.getTime()-Tm(t)-i)}}class Jg extends Zt{constructor(){super(...arguments);Oe(this,"priority",10);Oe(this,"incompatibleTokens",["t","T","X"])}parse(t,s){switch(s){case"x":return qi(Bi.basicOptionalMinutes,t);case"xx":return qi(Bi.basic,t);case"xxxx":return qi(Bi.basicOptionalSeconds,t);case"xxxxx":return qi(Bi.extendedOptionalSeconds,t);case"xxx":default:return qi(Bi.extended,t)}}set(t,s,i){return s.timestampIsSet?t:Qs(t,t.getTime()-Tm(t)-i)}}class Xg extends Zt{constructor(){super(...arguments);Oe(this,"priority",40);Oe(this,"incompatibleTokens","*")}parse(t){return Bm(t)}set(t,s,i){return[Qs(t,i*1e3),{timestampIsSet:!0}]}}class Qg extends Zt{constructor(){super(...arguments);Oe(this,"priority",20);Oe(this,"incompatibleTokens","*")}parse(t){return Bm(t)}set(t,s,i){return[Qs(t,i),{timestampIsSet:!0}]}}const e2={G:new vg,y:new bg,Y:new wg,R:new yg,u:new _g,Q:new Ng,q:new jg,M:new kg,L:new Ag,w:new Lg,I:new Pg,d:new Tg,D:new zg,E:new Fg,e:new Og,c:new Mg,i:new Ig,a:new Bg,b:new qg,B:new Wg,h:new Ug,H:new Vg,K:new Hg,k:new Gg,m:new $g,s:new Zg,S:new Yg,X:new Kg,x:new Jg,t:new Xg,T:new Qg},t2=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,n2=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,s2=/^'([^]*?)'?$/,i2=/''/g,r2=/\S/,a2=/[a-zA-Z]/;function o2(e,n,t,s){var y,P,k,G;const i=hg(),r=i.locale??J0,l=i.firstWeekContainsDate??((P=(y=i.locale)==null?void 0:y.options)==null?void 0:P.firstWeekContainsDate)??1,o=i.weekStartsOn??((G=(k=i.locale)==null?void 0:k.options)==null?void 0:G.weekStartsOn)??0,u={firstWeekContainsDate:l,weekStartsOn:o,locale:r},h=[new xg],f=n.match(n2).map(I=>{const R=I[0];if(R in jh){const Q=jh[R];return Q(I,r.formatLong)}return I}).join("").match(t2),v=[];for(let I of f){H0(I)&&kh(I,n,e),G0(I)&&kh(I,n,e);const R=I[0],Q=e2[R];if(Q){const{incompatibleTokens:me}=Q;if(Array.isArray(me)){const K=v.find(H=>me.includes(H.token)||H.token===R);
17if(K)throw new RangeError(`The format string mustn't contain \`${K.fullToken}\` and \`${I}\` at the same time`)}else if(Q.incompatibleTokens==="*"&&v.length>0)throw new RangeError(`The format string mustn't contain \`${I}\` and any other token at the same time`);v.push({token:R,fullToken:I});const oe=Q.run(e,I,r.match,u);if(!oe)return Qs(t,NaN);h.push(oe.setter),e=oe.rest}else{if(R.match(a2))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");if(I==="''"?I="'":R==="'"&&(I=l2(I)),e.indexOf(I)===0)e=e.slice(I.length);else return Qs(t,NaN)}}if(e.length>0&&r2.test(e))return Qs(t,NaN);const w=h.map(I=>I.priority).sort((I,R)=>R-I).filter((I,R,Q)=>Q.indexOf(I)===R).map(I=>h.filter(R=>R.priority===I).sort((R,Q)=>Q.subPriority-R.subPriority)).map(I=>I[0]);let m=lo(t);if(isNaN(m.getTime()))return Qs(t,NaN);const A={};for(const I of w){if(!I.validate(m,u))return Qs(t,NaN);const R=I.set(m,A,u);Array.isArray(R)?(m=R[0],Object.assign(A,R[1])):m=R}return Qs(t,m)}function l2(e){return e.match(s2)[1].replace(i2,"'")}const Eh={title:{cs:"PÅipomÃnka k hlasovánÃ",de:"Abstimmungserinnerung",en:"Poll Reminder"},description:{cs:"OdeÅ¡lete pÅipomÃnku vlastnÃkům, kteÅà jeÅ¡tÄ nehlasovali.",de:"Senden Sie eine Erinnerung an Eigentümer, die noch nicht abgestimmt haben.",en:"Send a reminder to owners who haven't voted yet."},eligibleUnits:{cs:"OprávnÄné jednotky",de:"Berechtigte Einheiten",en:"Eligible units"},validlyVoted:{cs:"ValidnÄ odhlasováno",de:"Gültig abgestimmt",en:"Validly voted"},pendingApproval:{cs:"Äeká na schválenÃ",de:"Genehmigung ausstehend",en:"Pending approval"},toRemind:{cs:"K pÅipomenutÃ",de:"Zu erinnern",en:"To remind"},uniqueRecipients:{cs:"Unikátnà pÅÃjemci",de:"Eindeutige Empfänger",en:"Unique recipients"},noEmail:{cs:"Bez e-mailu",de:"Ohne E-Mail",en:"No email"},lastSent:{cs:"Poslednà odeslánÃ",de:"Zuletzt gesendet",en:"Last sent"},never:{cs:"Nikdy",de:"Nie",en:"Never"},selectAll:{cs:"Vybrat vÅ¡e",de:"Alle auswählen",en:"Select all"},deselectAll:{cs:"ZruÅ¡it výbÄr",de:"Auswahl aufheben",en:"Deselect all"},selected:{cs:"Vybráno",de:"Ausgewählt",en:"Selected"},of:{cs:"z",de:"von",en:"of"},name:{cs:"Jméno",de:"Name",en:"Name"},units:{cs:"Jednotky",de:"Einheiten",en:"Units"},lang:{cs:"Jazyk",de:"Sprache",en:"Language"},noRecipients:{cs:"Žádnà pÅÃjemci k pÅipomenutÃ",de:"Keine Empfänger zu erinnern",en:"No recipients to remind"},sendReminderBtn:{cs:"Odeslat pÅipomÃnku",de:"Erinnerung senden",en:"Send reminder"},sendAgain:{cs:"Ano, odeslat znovu",de:"Ja, erneut senden",en:"Yes, send again"},recentWarn:{cs:"PÅipomÃnka byla odeslána dnes",de:"Erinnerung wurde heute gesendet",en:"Reminder was sent today"},sendAgainQ:{cs:"Opravdu chcete poslat dalÅ¡Ã?",de:"Möchten Sie eine weitere senden?",en:"Do you want to send another?"},reminderInfo:{cs:"PÅipomÃnka bude odeslána pouze kontaktům navázaným na jednotky bez validnÃho hlasu.",de:"Die Erinnerung wird nur an Kontakte gesendet, die Einheiten ohne gültige Stimme zugeordnet sind.",en:"The reminder will be sent only to contacts linked to units without a valid vote."},previewSubject:{cs:"PÅedmÄt",de:"Betreff",en:"Subject"},previewBody:{cs:"TÄlo e-mailu",de:"E-Mail-Text",en:"Email body"},emailPreview:{cs:"Náhled e-mailu",de:"E-Mail-Vorschau",en:"Email preview"},votingSummary:{cs:"Souhrn",de:"Zusammenfassung",en:"Summary"},recipients:{cs:"PÅÃjemci",de:"Empfänger",en:"Recipients"},autoReminder:{cs:"Automatické pÅipomÃnky",de:"Automatische Erinnerungen",en:"Automatic reminders"},autoReminderDesc:{cs:"PÅipomÃnky se odesÃlajà automaticky ve zvolené dny a Äas.",de:"Erinnerungen werden automatisch an den gewählten Tagen und zur gewählten Zeit gesendet.",en:"Reminders are sent automatically on selected days and time."},reminderDays:{cs:"Dny odeslánÃ",de:"Versandtage",en:"Send days"},reminderTime:{cs:"Äas odeslánà (Praha, CET)",de:"Sendezeit (Prag, CET)",en:"Send time (Prague, CET)"},saveSettings:{cs:"Uložit nastavenÃ",de:"Einstellungen speichern",en:"Save settings"},saved:{cs:"Uloženo",de:"Gespeichert",en:"Saved"},totalSent:{cs:"Celkem odesláno",de:"Gesamt gesendet",en:"Total sent"},recentReminders:{cs:"Poslednà pÅipomÃnky",de:"Letzte Erinnerungen",en:"Recent reminders"}
17,viewFullHistory:{cs:"Zobrazit kompletnà historii",de:"Vollständige Historie anzeigen",en:"View full history"},status:{cs:"Stav",de:"Status",en:"Status"},date:{cs:"Datum",de:"Datum",en:"Date"},recipient:{cs:"PÅÃjemce",de:"Empfänger",en:"Recipient"},sent:{cs:"Odesláno",de:"Gesendet",en:"Sent"},failed:{cs:"Selhalo",de:"Fehlgeschlagen",en:"Failed"},auto:{cs:"Auto",de:"Auto",en:"Auto"},manual:{cs:"ManuálnÃ",de:"Manuell",en:"Manual"},nextScheduled:{cs:"Dalšà pÅipomÃnka",de:"Nächste Erinnerung",en:"Next reminder"},noDaysSelected:{cs:"Nejsou vybrány žádné dny",de:"Keine Tage ausgewählt",en:"No days selected"},pollEnded:{cs:"Hlasovánà je ukonÄeno â automatické pÅipomÃnky se již neodesÃlajÃ.",de:"Abstimmung beendet â automatische Erinnerungen werden nicht mehr versendet.",en:"Voting has ended â automatic reminders are no longer sent."},pollNotStarted:{cs:"Hlasovánà jeÅ¡tÄ nezaÄalo â pÅipomÃnky se zaÄnou odesÃlat až po jeho zahájenÃ.",de:"Abstimmung hat noch nicht begonnen â Erinnerungen starten erst danach.",en:"Voting has not started yet â reminders will start afterwards."},noneBeforeEnd:{cs:"Do konce hlasovánà už žádná pÅipomÃnka nevycházÃ.",de:"Bis zum Ende der Abstimmung steht keine Erinnerung mehr an.",en:"No further reminder falls before the voting deadline."},inLocalTime:{cs:"Äas Praha (CET)",de:"Zeit Prag (CET)",en:"Prague time (CET)"},announceTitle:{cs:"Oznámenà o novém hlasovánÃ",de:"Ankündigung einer neuen Abstimmung",en:"New vote announcement"},announceDesc:{cs:"Jednorázová zpráva vÅ¡em vlastnÃkům, že bylo spuÅ¡tÄno nové hlasovánà (nenà to pÅipomÃnka).",de:"Einmalige Nachricht an alle Eigentümer, dass eine neue Abstimmung gestartet wurde (keine Erinnerung).",en:"One-off message to all owners that a new vote has started (not a reminder)."},announceBtn:{cs:"Odeslat oznámenà vÅ¡em vlastnÃkům",de:"Ankündigung an alle Eigentümer senden",en:"Send announcement to all owners"},announceNever:{cs:"Oznámenà dosud nebylo odesláno.",de:"Ankündigung wurde noch nicht gesendet.",en:"Announcement has not been sent yet."},announceSentAt:{cs:"Oznámenà odesláno",de:"Ankündigung gesendet",en:"Announcement sent"},announceDone:{cs:"Oznámenà odesláno",de:"Ankündigung gesendet",en:"Announcement sent"}},vc="Europe/Prague";function bu(e){const n=new Intl.DateTimeFormat("en-CA",{timeZone:vc,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e),t=i=>{var r;return Number(((r=n.find(l=>l.type===i))==null?void 0:r.value)??"0")},s=Date.UTC(t("year"),t("month")-1,t("day"),t("hour")%24,t("minute"),t("second"));return Math.round((s-e.getTime())/6e4)}function Um(e,n){const[t,s]=e.split(":").map(Number);if(Number.isNaN(t)||Number.isNaN(s))return e;const i=((t*60+s+n)%1440+1440)%1440,r=Math.floor(i/60),l=i%60;return`${String(r).padStart(2,"0")}:${String(l).padStart(2,"0")}`}function c2(e){return Um(e,-bu(new Date))}function d2(e){return Um(e,bu(new Date))}function u2(e,n){if(!e||e.length===0)return null;const[t,s]=n.split(":").map(Number);if(Number.isNaN(t)||Number.isNaN(s))return null;const i=new Date,r=new Intl.DateTimeFormat("en-US",{timeZone:vc,weekday:"short"}),l={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};for(let o=0;o<8;o++){const u=new Date(i.getTime()+o*864e5),h=new Date(Date.UTC(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate(),t,s,0,0)),f=new Date(h.getTime()-bu(h)*6e4),v=l[r.format(f)]??f.getUTCDay();if(e.includes(v)&&f.getTime()>i.getTime())return f}return null}const Ph={cs:["Ne","Po","Ãt","St","Ät","Pá","So"],de:["So","Mo","Di","Mi","Do","Fr","Sa"],en:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]};function h2(){return a.jsxs("div",{className:"space-y-5",children:[a.jsx(ln,{children:a.jsx(cn,{className:"p-4",children:a.jsx(Ii,{className:"h-16 w-full"})})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-5",children:[a.jsxs(ln,{children:[a.jsx(Nn,{className:"pb-3",children:a.jsx(Ii,{className:"h-5 w-48"})}),a.jsx(cn,{className:"space-y-2",children:Array.from({length:5}).map((e,n)=>a.jsx(Ii,{className:"h-10 w-full"},n))})]}),a.jsx("div",{className:"space-y-4",children:a.jsxs(ln,{children:[a.jsx(Nn,{className:"pb-2",children:a.jsx(Ii,{className:"h-5 w-24"})}),a.jsx(cn,{className:"space-y-3",children:Array.from({length:5}).map((e,n)=>a.jsx(Ii,{className:"h-4 w-full"},n))})]})})]})]})}function f2({pollId:e,onSwitchToEmails:n}){const{language:t}=Lc(),{toast:s}=oo(),i=se=>Eh[se][t]||Eh[se].en,[r,l]=be.useState(!0),[o,u]=be.useState(!1),[h,f]=be.useState(!1),[v,w]=be.useState(null),[m,A]=be.useState(new Set),[y,P]=be.useState(null),[k,G]=be.useState(!1),[I,R]=be.useState(null),Q=async se=>{if(P(se),!se.preview){G(!0),R(null);try{const{data:ve,error:Ae}=await Be.functions.invoke("send-poll-reminder",{body:{poll_id:e,preview_email:se.email}});if(Ae)throw Ae;if(!(ve!=null&&ve.preview))throw new Error("No preview returned");P(Pe=>Pe&&Pe.email===se.email?{...Pe,preview:ve.preview}:Pe)}catch(ve){R((ve==null?void 0:ve.message)||"Failed to load preview")}finally{G(!1)}}},[me,oe]=be.useState(!0),[K,H]=be.useState([1,4]),[ie,j]=be.useState("06:00"),[z,C]=be.useState({startsAt:null,endsAt:null,isActive:!0}),[$,q]=be.useState([]),[L,M]=be.useState(0),[Z,ae]=be.useState(0),[he,we]=be.useState(null),b=se=>
17new Date(se).toLocaleString(t==="de"?"de-DE":t==="cs"?"cs-CZ":"en-GB",{day:"numeric",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",timeZone:vc})+" CET",W=async()=>{var se,ve;l(!0);try{const[Ae,Pe,He,F,ze]=await Promise.all([Be.functions.invoke("send-poll-reminder",{body:{poll_id:e,dry_run:!0}}),Be.from("polls").select("auto_reminder_enabled, reminder_days, reminder_time, starts_at, ends_at, is_active").eq("id",e).single(),Be.from("email_history").select("id, recipient, status, sent_at, sent_by, language").eq("template_type","vote_reminder").eq("related_entity_id",e).order("sent_at",{ascending:!1}).limit(10),Be.from("email_history").select("id",{count:"exact",head:!0}).eq("template_type","vote_reminder").eq("related_entity_id",e).eq("status","sent"),Be.from("email_history").select("id, sent_at",{count:"exact"}).eq("template_type","vote_invitation").eq("related_entity_id",e).eq("status","sent").order("sent_at",{ascending:!1}).limit(1)]);if(Ae.error)throw Ae.error;if(w(Ae.data),Ae.data.recipients&&A(new Set(Ae.data.recipients.map(Ye=>Ye.email))),Pe.data){oe(Pe.data.auto_reminder_enabled??!0),H(Pe.data.reminder_days??[1,4]),j(d2((Pe.data.reminder_time??"05:00:00").substring(0,5)));const Ye=Pe.data.ends_at?new Date(Pe.data.ends_at):null;Ye&&Ye.getUTCHours()===0&&Ye.getUTCMinutes()===0&&Ye.getUTCSeconds()===0&&Ye.setUTCHours(23,59,59,999),C({startsAt:Pe.data.starts_at?new Date(Pe.data.starts_at):null,endsAt:Ye,isActive:Pe.data.is_active??!0})}q(He.data||[]),M(F.count??0),ae(ze.count??0),we(((ve=(se=ze.data)==null?void 0:se[0])==null?void 0:ve.sent_at)??null)}catch{s({variant:"destructive",title:"Chyba",description:"NepodaÅilo se naÄÃst data."})}l(!1)};be.useEffect(()=>{W()},[e]);const D=async()=>{f(!0);try{const{error:se}=await Be.from("polls").update({auto_reminder_enabled:me,reminder_days:K.length>0?K:null,reminder_time:c2(ie)+":00"}).eq("id",e);if(se)throw se;s({title:i("saved")})}catch{s({variant:"destructive",title:"Chyba"})}f(!1)},X=async()=>{u(!0);try{const{data:se,error:ve}=await Be.functions.invoke("send-poll-reminder",{body:{poll_id:e,dry_run:!1,recipient_emails:[...m]}});if(ve)throw ve;s({title:t==="cs"?"PÅipomÃnka odeslána":t==="de"?"Erinnerung gesendet":"Reminder sent",description:`${i("sent")}: ${se.sent||0}, ${i("failed")}: ${se.failed||0}`}),W()}catch{s({variant:"destructive",title:"Chyba",description:"NepodaÅilo se odeslat pÅipomÃnku."})}u(!1)},Y=se=>{H(ve=>ve.includes(se)?ve.filter(Ae=>Ae!==se):[...ve,se].sort())},te=v!=null&&v.last_sent_at?Date.now()-new Date(v.last_sent_at).getTime()<24*60*60*1e3:!1;if(r)return a.jsx(h2,{});if(!v)return null;const ue=v.recipients||[],ge=Ph[t]||Ph.en;return a.jsxs("div",{className:"space-y-5",children:[a.jsx(ln,{children:a.jsxs(cn,{className:"p-4",children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[a.jsx(Ud,{checked:me,onCheckedChange:oe}),a.jsxs("div",{children:[a.jsxs(Wn,{className:"text-sm font-semibold flex items-center gap-1.5",children:[a.jsx(L0,{className:"h-4 w-4 text-primary"}),i("autoReminder")]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("autoReminderDesc")})]})]}),me&&a.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-end gap-3 sm:ml-auto",children:[a.jsxs("div",{children:[a.jsx(Wn,{className:"text-[11px] text-muted-foreground mb-1 block",children:i("reminderDays")}),a.jsx("div",{className:"flex gap-1",children:ge.map((se,ve)=>a.jsx(pt,{variant:K.includes(ve)?"default":"outline",size:"sm",className:"h-7 w-9 text-[11px] px-0",onClick:()=>Y(ve),children:se},ve))})]}),a.jsxs("div",{children:[a.jsx(Wn,{className:"text-[11px] text-muted-foreground mb-1 block",children:i("reminderTime")}),a.jsx(Jo,{type:"time",value:ie,onChange:se=>j(se.target.value),className:"h-7 w-24 text-xs"})]}),a.jsxs(pt,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:D,disabled:h,children:[h?a.jsx(ds,{className:"h-3 w-3 animate-spin mr-1"}):a.jsx(Vd,{className:"h-3 w-3 mr-1"}),i("saveSettings")]})]}),!me&&a.jsxs(pt,{variant:"outline",size:"sm",className:"h-7 text-xs sm:ml-auto",onClick:D,disabled:h,children:[h?a.jsx(ds,{className:"h-3 w-3 animate-spin mr-1"}):a.jsx(Vd,{className:"h-3 w-3 mr-1"}),i("saveSettings")]})]}),me&&(()=>{const se=new Date,{startsAt:ve,endsAt:Ae,isActive:Pe}=z,He=!Pe||Ae!==null&&Ae.getTime()<se.getTime(),F=ve!==null&&ve.getTime()>se.getTime(),ze=u2(K,ie),Ye=!!(ze&&Ae&&ze.getTime()>Ae.getTime()),Me=t==="de"?"de-DE":t==="cs"?"cs-CZ":"en-GB",ce=He||Ye;return a.jsxs("div",{className:`mt-3 flex items-start gap-2 rounded-md border p-2.5 text-xs ${ce?"border-muted bg-muted/40":"border-primary/20 bg-primary/5"}`,children:[a.jsx(dc,{className:`h-3.5 w-3.5 mt-0.5 shrink-0 ${ce?"text-muted-foreground":"text-primary"}`}),a.jsx("div",{className:"min-w-0",children:He?a.jsx("span",{className:"text-muted-foreground",children:i("pollEnded")}):Ye?a.jsx("span",{className:"text-muted-foreground",children:i("noneBeforeEnd")}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"font-medium text-foreground",children:[i("nextScheduled"),": "]}),ze?a.jsxs("span",{className:"text-muted-foreground",children:[ze.toLocaleStr
17ing(Me,{weekday:"long",day:"numeric",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",timeZone:vc})," CET",F&&a.jsxs(a.Fragment,{children:[" · ",i("pollNotStarted")]})]}):a.jsx("span",{className:"text-muted-foreground",children:i("noDaysSelected")})]})})]})})()]})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-5",children:[a.jsxs(ln,{children:[a.jsxs(Nn,{className:"pb-3",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Tn,{className:"text-sm font-semibold flex items-center gap-2",children:[a.jsx(Hd,{className:"h-4 w-4 text-primary"}),i("recipients")," (",ue.length,")"]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(pt,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>A(new Set(ue.map(se=>se.email))),children:i("selectAll")}),a.jsx(pt,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>A(new Set),children:i("deselectAll")})]})]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[i("selected"),": ",m.size," ",i("of")," ",ue.length]})]}),a.jsx(cn,{className:"pt-0",children:ue.length>0?a.jsx("div",{className:"border rounded-md overflow-auto max-h-[520px]",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{children:[a.jsx(Ze,{className:"w-[36px] px-2",children:a.jsx(Wd,{checked:m.size===ue.length&&ue.length>0,onCheckedChange:se=>{A(se?new Set(ue.map(ve=>ve.email)):new Set)}})}),a.jsx(Ze,{className:"text-xs",children:i("name")}),a.jsx(Ze,{className:"text-xs",children:"E-mail"}),a.jsx(Ze,{className:"text-xs",children:i("units")}),a.jsx(Ze,{className:"text-xs w-[50px]",children:i("lang")}),a.jsx(Ze,{className:"text-xs w-[40px]"})]})}),a.jsx(hi,{children:ue.map(se=>a.jsxs(Qt,{className:`cursor-pointer transition-colors ${m.has(se.email)?"":"opacity-50"}`,onClick:()=>{A(ve=>{const Ae=new Set(ve);return Ae.has(se.email)?Ae.delete(se.email):Ae.add(se.email),Ae})},children:[a.jsx(Ie,{className:"px-2 py-1.5",children:a.jsx(Wd,{checked:m.has(se.email),onCheckedChange:ve=>{A(Ae=>{const Pe=new Set(Ae);return ve?Pe.add(se.email):Pe.delete(se.email),Pe})},onClick:ve=>ve.stopPropagation()})}),a.jsx(Ie,{className:"text-sm py-1.5 font-medium",children:se.name||"â"}),a.jsx(Ie,{className:"text-xs py-1.5 font-mono",children:se.email}),a.jsx(Ie,{className:"py-1.5",children:a.jsx("div",{className:"flex flex-wrap gap-1",children:se.apartment_codes.map(ve=>a.jsx(Ot,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:ve},ve))})}),a.jsx(Ie,{className:"text-xs py-1.5 uppercase",children:se.language}),a.jsx(Ie,{className:"px-1 py-1.5",children:a.jsx(pt,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:ve=>{ve.stopPropagation(),Q(se)},children:a.jsx(ll,{className:"h-3.5 w-3.5 text-muted-foreground"})})})]},se.email))})]})}):a.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:i("noRecipients")})})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs(ln,{children:[a.jsx(Nn,{className:"pb-2",children:a.jsx(Tn,{className:"text-sm font-semibold",children:i("votingSummary")})}),a.jsxs(cn,{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:i("eligibleUnits")}),a.jsx("span",{className:"font-medium",children:v.total_eligible})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:i("validlyVoted")}),a.jsx("span",{className:"font-medium",children:v.total_voted})]}),v.total_pending_approval>0&&a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:i("pendingApproval")}),a.jsx("span",{className:"font-medium",children:v.total_pending_approval})]}),a.jsxs("div",{className:"flex justify-between border-t pt-2",children:[a.jsx("span",{className:"font-medium",children:i("toRemind")}),a.jsx("span",{className:"font-bold text-lg",children:v.total_non_voters})]}),a.jsxs("div",{className:"border-t pt-2 space-y-1.5",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:i("uniqueRecipients")}),a.jsx("span",{className:"font-medium",children:v.total_recipients})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:i("noEmail")}),a.jsx("span",{className:"font-medium",children:v.skipped_no_email})]})]}),a.jsxs("div",{className:"border-t pt-2 space-y-1.5",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:i("totalSent")}
17),a.jsx("span",{className:"font-bold",children:L})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:i("lastSent")}),a.jsx("span",{className:"font-medium",children:v.last_sent_at?b(v.last_sent_at):i("never")})]})]})]})]}),te&&a.jsx("div",{className:"rounded-md border border-amber-300 bg-amber-50 dark:bg-amber-950/20 p-3",children:a.jsxs("p",{className:"text-sm text-amber-800 dark:text-amber-200 flex items-start gap-2",children:[a.jsx(Vr,{className:"h-4 w-4 shrink-0 mt-0.5"}),i("recentWarn")," ",b(v.last_sent_at),". ",i("sendAgainQ")]})}),a.jsx("div",{className:"rounded-md bg-muted/50 p-3",children:a.jsxs("p",{className:"text-xs text-muted-foreground flex items-start gap-2",children:[a.jsx(_i,{className:"h-3.5 w-3.5 shrink-0 mt-0.5"}),i("reminderInfo")]})}),a.jsxs(pt,{onClick:X,disabled:o||m.size===0,className:"w-full",size:"lg",children:[o?a.jsx(ds,{className:"h-4 w-4 animate-spin mr-2"}):a.jsx(hc,{className:"h-4 w-4 mr-2"}),te?i("sendAgain"):`${i("sendReminderBtn")} (${m.size})`]}),$.length>0&&a.jsxs(ln,{children:[a.jsx(Nn,{className:"pb-2",children:a.jsxs(Tn,{className:"text-xs font-semibold flex items-center gap-1.5",children:[a.jsx(fc,{className:"h-3.5 w-3.5 text-muted-foreground"}),i("recentReminders")]})}),a.jsxs(cn,{className:"pt-0",children:[a.jsx("div",{className:"space-y-1",children:$.map(se=>a.jsxs("div",{className:"flex items-center justify-between text-[11px] py-0.5",children:[a.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[a.jsx(Ot,{variant:se.status==="sent"?"default":"destructive",className:"text-[9px] px-1 py-0 h-4",children:se.status==="sent"?"â":"â"}),a.jsx("span",{className:"truncate font-mono text-muted-foreground",children:se.recipient})]}),a.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 ml-2",children:[se.sent_by===null&&a.jsx(Ot,{variant:"outline",className:"text-[9px] px-1 py-0 h-4",children:i("auto")}),a.jsx("span",{className:"text-muted-foreground",children:b(se.sent_at)})]})]},se.id))}),n&&a.jsxs(pt,{variant:"link",size:"sm",className:"h-6 text-xs px-0 mt-2",onClick:n,children:[a.jsx(xr,{className:"h-3 w-3 mr-1"}),i("viewFullHistory")]})]})]})]})]}),a.jsx(fr,{open:!!y,onOpenChange:se=>{se||(P(null),R(null))},children:a.jsxs(mr,{className:"max-w-2xl max-h-[80vh] overflow-auto",children:[a.jsx(pr,{children:a.jsxs(gr,{className:"flex items-center gap-2 text-base",children:[a.jsx(xr,{className:"h-4 w-4"}),i("emailPreview")," â ",(y==null?void 0:y.name)||(y==null?void 0:y.email)]})}),k&&a.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3",children:[a.jsx(ds,{className:"h-6 w-6 animate-spin text-primary"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[i("emailPreview"),"â¦"]})]}),!k&&I&&a.jsx("div",{className:"py-6 text-center text-sm text-destructive",children:I}),!k&&!I&&(y==null?void 0:y.preview)&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a.jsx("span",{className:"font-medium",children:"To:"}),a.jsx("span",{className:"font-mono text-xs",children:y.email}),a.jsx(Ot,{variant:"outline",className:"text-[10px] ml-auto",children:y.language.toUpperCase()})]}),a.jsxs("div",{children:[a.jsx("span",{className:"text-[10px] uppercase font-semibold text-muted-foreground",children:i("previewSubject")}),a.jsx("p",{className:"text-sm font-medium mt-0.5",children:y.preview.subject})]}),a.jsxs("div",{className:"border-t pt-3",children:[a.jsx("span",{className:"text-[10px] uppercase font-semibold text-muted-foreground",children:i("previewBody")}),a.jsx("div",{className:"text-sm mt-2 border rounded-md p-4 bg-background max-h-[400px] overflow-auto",dangerouslySetInnerHTML:{__html:y.preview.body_html}})]})]})]})})]})}const m2={title:{cs:"Oznámenà o novém hlasovánÃ",de:"Ankündigung einer neuen Abstimmung",en:"New vote announcement"},desc:{cs:"Jednorázová zpráva vÅ¡em vlastnÃkům, že bylo spuÅ¡tÄno nové hlasovánà (nenà to pÅipomÃnka).",de:"Einmalige Nachricht an alle Eigentümer, dass eine neue Abstimmung gestartet wurde (keine Erinnerung).",en:"One-off message to all owners that a new vote has started (not a reminder)."},sendBtn:{cs:"Odeslat oznámenà vÅ¡em vlastnÃkům",de:"Ankündigung an alle Eigentümer senden",en:"Send announcement to all owners"},confirmTitle:{cs:"Odeslat oznámenà vÅ¡em vlastnÃkům?",de:"Ankündigung an alle Eigentümer senden?",en:"Send announcement to all owners?"},confirmDesc:{cs:"E-mail bude okamžitÄ odeslán vÅ¡em vlastnÃkům ({count} pÅÃjemců).",de:"Die E-Mail wird sofort an alle Eigentümer gesendet
17({count} Empfänger).",en:"The email will be sent immediately to all owners ({count} recipients)."},confirmResend:{cs:"Oznámenà již jednou odesláno â vlastnÃci je obdržà znovu.",de:"Die Ankündigung wurde bereits gesendet â die Eigentümer erhalten sie erneut.",en:"The announcement was already sent â owners will receive it again."},confirmSend:{cs:"Odeslat",de:"Senden",en:"Send"},cancel:{cs:"ZruÅ¡it",de:"Abbrechen",en:"Cancel"},never:{cs:"Oznámenà dosud nebylo odesláno.",de:"Ankündigung wurde noch nicht gesendet.",en:"Announcement has not been sent yet."},sentAt:{cs:"Oznámenà odesláno",de:"Ankündigung gesendet",en:"Announcement sent"},sent:{cs:"Odesláno",de:"Gesendet",en:"Sent"},failed:{cs:"Selhalo",de:"Fehlgeschlagen",en:"Failed"},recipients:{cs:"PÅÃjemci",de:"Empfänger",en:"Recipients"},unit:{cs:"Jednotka",de:"Einheit",en:"Unit"},name:{cs:"Jméno",de:"Name",en:"Name"},email:{cs:"E-mail",de:"E-Mail",en:"Email"},lang:{cs:"Jazyk",de:"Sprache",en:"Language"},emailPreview:{cs:"Náhled e-mailu",de:"E-Mail-Vorschau",en:"Email preview"},subject:{cs:"PÅedmÄt",de:"Betreff",en:"Subject"},noRecipients:{cs:"Žádnà pÅÃjemci",de:"Keine Empfänger",en:"No recipients"},rowsNote:{cs:"SeÅazeno podle jednotek (TOP 1, TOP 2, â¦). VlastnÃk s vÃce jednotkami je uveden u každé své jednotky, e-mail se odeÅ¡le jednou.",de:"Sortiert nach Einheiten (TOP 1, TOP 2, â¦). Eigentümer mit mehreren Einheiten erscheinen bei jeder Einheit, die E-Mail wird einmal gesendet.",en:"Sorted by unit (TOP 1, TOP 2, â¦). Owners with several units appear at each unit; the email is sent once."}},Il={title:{cs:"Komunikace a doruÄovánà (§ 24 odst. 5 WEG)",de:"Kommunikation und Zustellung (§ 24 Abs. 5 WEG)",en:"Communication and delivery (§ 24(5) WEG)"},owners:{cs:"VlastnÃci v seznamu",de:"Eigentümer in der Liste",en:"Owners in list"},note:{cs:"Existence e-mailu neznamená elektronické doruÄovánÃ. E-mail je u ostatnÃch jen informaÄnà notifikace. VlastnÃci bez e-mailu v seznamu nejsou.",de:"Eine vorhandene E-Mail-Adresse bedeutet keine elektronische Zustellung. Für die übrigen ist die E-Mail nur eine Zusatzinformation. Eigentümer ohne E-Mail sind nicht in der Liste.",en:"An existing email does not mean electronic delivery. For others the email is only an informational notification. Owners without email are not listed."},col:{cs:"DoruÄovánÃ",de:"Zustellung",en:"Delivery"}};function Ch(e){const n=e.match(/(\d+)/);return n?parseInt(n[1],10):9999}function p2({pollId:e}){const{language:n}=Lc(),{toast:t}=oo(),s=["cs","de","en"].includes(n)?n:"de",i=L=>m2[L][s],[r,l]=be.useState(!0),[o,u]=be.useState(!1),[h,f]=be.useState([]),[v,w]=be.useState([]),[m,A]=be.useState(0),[y,P]=be.useState(null),[k,G]=be.useState(null),[I,R]=be.useState(!1),[Q,me]=be.useState(null),[oe,K]=be.useState(new Map),H=L=>new Date(L).toLocaleString(s==="de"?"de-DE":s==="cs"?"cs-CZ":"en-GB",{day:"numeric",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",timeZone:"Europe/Prague"})+" CET",ie=async()=>{var L,M,Z,ae;l(!0);try{const[he,we]=await Promise.all([Be.functions.invoke("send-poll-reminder",{body:{poll_id:e,kind:"invitation",dry_run:!0}}),Be.from("email_history").select("id, sent_at",{count:"exact"}).eq("template_type","vote_invitation").eq("related_entity_id",e).eq("status","sent").order("sent_at",{ascending:!1}).limit(1)]);if(he.error)throw he.error;f(((L=he.data)==null?void 0:L.recipients)||[]),w(((M=he.data)==null?void 0:M.postal_recipients)||[]),A(we.count??0),P(((ae=(Z=we.data)==null?void 0:Z[0])==null?void 0:ae.sent_at)??null);const{data:b}=await Be.rpc("admin_list_legal_delivery"),W=new Map;for(const D of b??[])W.set(D.owner_id,m0(D));K(W)}catch{t({variant:"destructive",title:"Chyba",description:"NepodaÅilo se naÄÃst data."})}l(!1)};be.useEffect(()=>{ie()},[e]);const j=L=>(L.owner_ids??[]).map(M=>oe.get(M)??"not_selected"),z=be.useMemo(()=>{const L=new Map;for(const M of h)for(const Z of M.owner_ids??[])L.set(Z,oe.get(Z)??"not_selected");for(const M of v)M.owner_id&&L.set(M.owner_id,"postal");return i0([...L.values()])},[h,oe,v]),C=be.useMemo(()=>{var M;const L=[];for(const Z of h){const ae=(M=Z.apartment_codes)!=null&&M.length?Z.apartment_codes:["â"];for(const he of ae)L.push({code:he,r:Z})}return L.sort((Z,ae)=>Ch(Z.code)-Ch(ae.code)||Z.code.localeCompare(ae.code))},[h]),$=async L=>{if(G(L),!L.preview){R(!0),me(null);try{const{data:M,error:Z}=await Be.functions.invoke("send-poll-reminder",{body:{poll_id:e,kind:"invitation",preview_email:L.email}});if(Z)throw Z;if(!(M!=null&&M.preview))throw new Error("No preview returned");G(ae=>ae&&ae.email===L.email?{...ae,preview:M.preview}:ae)}catch(M){me(M instanceof Error?M.message:"Failed to load preview")}finally{R(!1)}}},q=async()=>{u(!0);try{const{data:L,error:M}=await Be.functions.invoke("send-poll-reminder",{body:{poll_id:e,kind:"invitation",dry_run:!1}});if(M)throw M;t({title:i("sentAt"),description:`${i("sent")}: ${(L==null?void 0:L.sent)||0}, ${i("failed")}: ${(L==null?void 0:L.failed)||0}`}),ie()}catch{t({variant:"destructive",title:"Chyba"})}u(!1)};return a.jsxs("div",{className:"space-y-5",children:[a.jsx(ln,{className:"border-primary/30 bg-primary/5",children:a.jsxs(cn,{className:"p-4 flex flex-col sm:flex-row sm:items-center gap-3",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs(Wn,{className:"text-sm font-semibold flex items-center gap-1.5",children:[a.jsx(xr,{className:"h-4 w-4 text-primary"}),i("title")]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("desc")}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:m>0&&y?`${i("sentAt")}: ${H(y)} · ${i("sent")}: ${m}`:i("never")})]}),a.jsxs(r0,{children:[a.jsx(a0,{asChild:!0,children:a.jsxs(pt,{size:"sm",className:"sm:ml-auto shrink-0",disabled:o||r,children:[o?a.jsx(ds,{className:"h-4 w-4 animate-spin mr-1.5"}):a.jsx(hc,{className:"h-4 w-4 mr-1.5"}),i("sendBtn")]})}),a.jsxs(o0,{children:[a.jsxs(l0,{children:[a.jsx(c0,{children:i("confirmTitle")}),a.jsxs(d0,{children:[i("confirmDesc").replace("{count}",String(h.length)),m>0&&y?` ${i("confirmResend")}`:""]})]}),a.jsxs(u0,{children:[a.jsx(h0,{children:i("cancel")}),a.jsx(f0,{onClick:q,children:i("confirmSend")})]})]})]})]})}),v.length>0&&a.jsxs(ln,{className:"border-primary/40",children:[a.jsxs(Nn,{className:"pb-2 flex flex-row items-center justify-between gap-2",children:[a.jsxs(Tn,{className:"text-base",children:["PoÅ¡tou (",v.length,") â pozvánku je nutné odeslat dopisem"]}),a.jsx(pt,{size:"sm",variant:"outline",onClick:()=>{const M=[["Jméno","Jednotky","PoÅ¡tovnà adresa"],...v.map(he=>[he.name,he.apartment_codes.join(" "),he.postal_address??""])].map(he=>he.map(we=>'"'+String(we).replace(/"/g,'""')+'"').join(";")).join(` 18`),Z=URL.createObjectURL(new Blob(["\uFEFF"+M],{type:"text/csv;charset=utf-8"})),ae=document.createElement("a");ae.href=Z,ae.download="postovni-pozvanky.csv",ae.click(),URL.revokeObjectURL(Z)},children:"CSV"})]}),a.jsxs(cn,{className:"space-y-1 text-xs",children:[a.jsx("p",{className:"text-muted-foreground",children:"Tito vlastnÃci zvolili doruÄovánà poÅ¡tou a e-mail nedostanou."}),v.map(L=>a.jsxs("div",{className:"flex flex-wrap gap-x-3 border-t border-border py-1",children:[a.jsx("span",{className:"font-medium",children:L.name}),a.jsx("span",{className:"text-muted-foreground",children:L.apartment_codes.join(", ")}),a.jsx("span",{className:L.postal_address?"":"text-destructive",children:L.postal_address??"Chybà poÅ¡tovnà adresa"})]},L.owner_id))]})]}),!r&&h.length>0&&a.jsxs(ln,{children:[a.jsx(Nn,{className:"pb-2",children:a.jsx(Tn,{className:"text-base",children:Il.title[s]})}),a.jsxs(cn,{className:"pt-0 space-y-2",children:[a.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-5 ga
18p-2 text-xs",children:[a.jsxs("div",{className:"rounded-md border p-2",children:[a.jsx("div",{className:"text-muted-foreground",children:Il.owners[s]}),a.jsx("div",{className:"text-lg font-semibold",children:z.total})]}),["electronic","postal","not_selected","reconfirmation_required"].map(L=>a.jsxs("div",{className:"rounded-md border p-2",children:[a.jsx("div",{className:"text-muted-foreground",children:ph[s][L]}),a.jsx("div",{className:"text-lg font-semibold",children:z[L]})]},L))]}),a.jsx("p",{className:"text-[11px] text-muted-foreground",children:Il.note[s]})]})]}),a.jsx("div",{children:a.jsxs(ln,{children:[a.jsxs(Nn,{className:"pb-3",children:[a.jsxs(Tn,{className:"flex items-center gap-2 text-base",children:[a.jsx(Pm,{className:"h-4 w-4 text-primary"}),i("recipients")," (",h.length,")"]}),a.jsx("p",{className:"text-[11px] text-muted-foreground",children:i("rowsNote")})]}),a.jsx(cn,{className:"pt-0",children:r?a.jsx("div",{className:"space-y-2",children:Array.from({length:8}).map((L,M)=>a.jsx(Ii,{className:"h-8 w-full"},M))}):C.length===0?a.jsx("p",{className:"text-sm text-muted-foreground py-6 text-center",children:i("noRecipients")}):a.jsx("div",{className:"max-h-[560px] overflow-y-auto rounded-md border",children:a.jsxs(di,{children:[a.jsx(ui,{className:"sticky top-0 bg-muted/50",children:a.jsxs(Qt,{children:[a.jsx(Ze,{className:"h-8 text-xs",children:i("unit")}),a.jsx(Ze,{className:"h-8 text-xs",children:i("name")}),a.jsx(Ze,{className:"h-8 text-xs",children:i("email")}),a.jsx(Ze,{className:"h-8 text-xs",children:i("lang")}),a.jsx(Ze,{className:"h-8 text-xs",children:Il.col[s]}),a.jsx(Ze,{className:"h-8 w-10"})]})}),a.jsx(hi,{children:C.map(({code:L,r:M},Z)=>a.jsxs(Qt,{className:"h-9",children:[a.jsx(Ie,{className:"py-1",children:a.jsx(Ot,{variant:"secondary",className:"text-xs whitespace-nowrap",children:L})}),a.jsx(Ie,{className:"py-1 text-xs font-medium whitespace-nowrap",children:M.name}),a.jsx(Ie,{className:"py-1 text-xs font-mono text-muted-foreground",children:M.email}),a.jsx(Ie,{className:"py-1 text-xs uppercase",children:M.language}),a.jsx(Ie,{className:"py-1 text-xs whitespace-nowrap",children:[...new Set(j(M))].map(ae=>a.jsx(Ot,{variant:ae==="electronic"?"default":"outline",className:"text-[10px] whitespace-nowrap mr-1",children:ph[s][ae]},ae))}),a.jsx(Ie,{className:"py-1",children:a.jsx(pt,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>$(M),children:a.jsx(ll,{className:"h-3.5 w-3.5"})})})]},`${L}-${M.email}-${Z}`))})]})})})]})}),a.jsx(fr,{open:!!k,onOpenChange:L=>{L||(G(null),me(null))},children:a.jsxs(mr,{className:"max-w-3xl",children:[a.jsx(pr,{children:a.jsxs(gr,{className:"text-base",children:[i("emailPreview")," â ",k==null?void 0:k.name]})}),I?a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ii,{className:"h-5 w-2/3"}),a.jsx(Ii,{className:"h-[420px] w-full"})]}):Q?a.jsx("p",{className:"text-sm text-destructive",children:Q}):k!=null&&k.preview?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-start gap-2 text-[12px]",children:[a.jsx(Ot,{variant:"outline",className:"shrink-0",children:i("subject")}),a.jsx("span",{className:"font-medium",children:k.preview.subject})]}),a.jsx("div",{className:"rounded-md border overflow-hidden bg-white",children:a.jsx("iframe",{srcDoc:k.preview.body_html,title:"Email preview",className:"w-full h-[520px] border-0",sandbox:""})})]}):null]})})]})}const g2={title:{cs:"Náhledy e-mailových Å¡ablon",de:"Vorschau der E-Mail-Vorlagen",en:"Email template previews"},desc:{cs:"Co se skuteÄnÄ odeÅ¡le vlastnÃkům â podle typu zprávy a jazyka pÅÃjemce.",de:"Was tatsächlich an die Eigentümer gesendet wird â je Nachrichtentyp und Empfängersprache.",en:"What is actually sent to owners â by message type and recipient language."},subject:{cs:"PÅedmÄt",de:"Betreff",en:"Subject"},missing:{cs:"Pro tuto kombinaci typu a jazyka nenà šablona uložena.",de:"Für diese Kombination aus Typ und Sprache ist keine Vorlage gespeichert.",en:"No template stored for this type and language combination."},sampleNote:{cs:"Zástupné hodnoty (jméno, jednotky, podpis) jsou ukázkové, ostatnà údaje jsou z tohoto hlasovánÃ.",de:"Platzhalter (Name, Einheiten, Signatur) sind Beispielwerte, übrige Daten stammen aus dieser Abstimmung.",en:"Placeholders (name, units, signature) are sample values; other data comes from this poll."}},x2=[{value:"vote_invitation",label:{cs:"Oznámenà o novém hlasovánÃ",de:"Ankündigung neue Abstimmung",en:"New vote announcement"}},{value:"vote_reminder",label:{cs:"PÅipomÃnka hlasovánÃ",de:"Abstimmungserinnerung",en:"Voting reminder"}},{value:"vote_confirmation",label:{cs:"Potvrzenà hlasu",de:"Stimmbestätigung",en:"Vote confirmation"}},{value:"vote_result",label:{cs:"Výsledek hlasovánÃ",de:"Abstimmungsergebnis",en:"Voting result"}}],v2=[{value:"cs",label:"ÄeÅ¡tina"},{value:"de",label:"Deutsch"},{value:"en",label:"English"}],Dh={cs:{"{userName}":"Jan KuÄera","{voterName}":"Jan KuÄera","{apartmentCode}":"TOP 5","{apartmentCodes}":"TOP 5, TOP 12","{selectedOption}":"Varianta A","{voteBasis}":"dohoda spoluvlastnÃků (Äestné prohlášenÃ)","{coOwnersRow}":"","{participationInfo}":"ZatÃm hlasovalo 4 z 52 jednotek.","{loginInstructions}":"PÅihlaste se prosÃm do portálu vlastnÃků a odhlasujte.","{timestamp}":"24.08.2026 18:42","{fingerprint}":"a1b2c3d4e5f6","{announcementDate}":"24.08.2026","{finalVerdict}":"Návrh nebyl pÅijat","{evaluationSummary}":"NesplnÄna žádná z variant § 24 odst. 4 WEG 2002.","{resultsTableRows}":"","{participationSummary}":"4 z 52 jednotek · WEG 126 435 z 1 467 092","{quorumSummary}":"NesplnÄno","{majorityType}":"Absolutnà nebo kvalifikovaná vÄtÅ¡ina (§ 24 odst. 4 WEG 2002)","{challengeDeadline}":"07.09.2026","{decisivePathText}":"Usnesenà nebylo pÅijato â nebyla dosažena ani absolutnà vÄtÅ¡ina vÅ
18¡ech podÃlů, ani kvalifikovaná vÄtÅ¡ina dvou tÅetin odevzdaných hlasů pÅi alespoÅ jedné tÅetinÄ vÅ¡ech podÃlů (§ 24 odst. 4 WEG 2002).","{digitalVotingNote}":"Hlasovánà probÄhlo elektronickou formou prostÅednictvÃm zabezpeÄené vlastnické platformy Hintermoos. Elektronické hlasovánà je od novely WEG z roku 2022 plnohodnotným způsobem projevu vůle vlastnÃků (§ 24 odst. 1 WEG 2002).","{challengeNotice}":"Proti tomuto usnesenà může každý vlastnÃk podle § 24 odst. 6 WEG 2002 podat žalobu k pÅÃsluÅ¡nému okresnÃmu soudu (Bezirksgericht) nejpozdÄji do 07.09.2026. Lhůta je prekluzivnà â po jejÃm uplynutà je usnesenà koneÄné a závazné.","{emailSignature}":"S pÅátelským pozdravem,<br>WEG Bachwinkl 34 - Apartmenthaus Hintermoos"},de:{"{userName}":"Jan KuÄera","{voterName}":"Jan KuÄera","{apartmentCode}":"TOP 5","{apartmentCodes}":"TOP 5, TOP 12","{selectedOption}":"Variante A","{voteBasis}":"Vereinbarung der Miteigentümer (Eigenerklärung)","{coOwnersRow}":"","{participationInfo}":"Bisher haben 4 von 52 Einheiten abgestimmt.","{loginInstructions}":"Bitte melden Sie sich im Eigentümerportal an und stimmen Sie ab.","{timestamp}":"24.08.2026 18:42","{fingerprint}":"a1b2c3d4e5f6","{announcementDate}":"24.08.2026","{finalVerdict}":"Der Antrag wurde nicht angenommen","{evaluationSummary}":"Keine der Varianten des § 24 Abs 4 WEG 2002 erfüllt.","{resultsTableRows}":"","{participationSummary}":"4 von 52 Einheiten · WEG 126 435 von 1 467 092","{quorumSummary}":"Nicht erfüllt","{majorityType}":"Absolute oder qualifizierte Mehrheit (§ 24 Abs 4 WEG 2002)","{challengeDeadline}":"07.09.2026","{decisivePathText}":"Der Beschluss wurde nicht gefasst â weder die absolute Mehrheit aller Anteile noch die qualifizierte Mehrheit von zwei Dritteln der abgegebenen Stimmen bei mindestens einem Drittel aller Anteile wurde erreicht (§ 24 Abs 4 WEG 2002).","{digitalVotingNote}":"Die Abstimmung erfolgte elektronisch über die gesicherte Eigentümerplattform Hintermoos. Elektronische Abstimmungen sind seit der WEG-Novelle 2022 eine vollwertige Form der WillensäuÃerung (§ 24 Abs 1 WEG 2002).","{challengeNotice}":"Gegen diesen Beschluss kann gemäà § 24 Abs 6 WEG 2002 bis zum 07.09.2026 Klage beim Bezirksgericht erhoben werden. Präklusivfrist â danach ist der Beschluss endgültig und verbindlich.","{emailSignature}":"Mit freundlichen GrüÃen,<br>WEG Bachwinkl 34 - Apartmenthaus Hintermoos"},en:{"{userName}":"Jan KuÄera","{voterName}":"Jan KuÄera","{apartmentCode}":"TOP 5","{apartmentCodes}":"TOP 5, TOP 12","{selectedOption}":"Option A","{voteBasis}":"agreement of co-owners (self-declaration)","{coOwnersRow}":"","{participationInfo}":"So far 4 of 52 units have voted.","{loginInstructions}":"Please sign in to the owners portal and cast your vote.","{timestamp}":"24.08.2026 18:42","{fingerprint}":"a1b2c3d4e5f6","{announcementDate}":"24.08.2026","{finalVerdict}":"The proposal was not adopted","{evaluationSummary}":"None of the paths under § 24 para 4 WEG 2002 was met.","{resultsTableRows}":"","{participationSummary}":"4 of 52 units · WEG 126 435 of 1 467 092","{quorumSummary}":"Not met","{majorityType}":"Absolute or qualified majority (§ 24 para 4 WEG 2002)","{challengeDeadline}":"07.09.2026","{decisivePathText}":"The resolution was not adopted â neither an absolute majority of all shares nor a qualified majority of two thirds of the votes cast with at least one third of all shares was reached (§ 24 para 4 WEG 2002).","{digitalVotingNote}":"The vote was conducted electronically via the secure Hintermoos owners' platform. Since the 2022 WEG amendment, electronic voting is a fully valid form of voting (§ 24 para 1 WEG 2002).","{challengeNotice}":"Under § 24 para 6 WEG 2002, the resolution may be challenged at the district court (Bezirksgericht) by 07.09.2026. Preclusive deadline â after expiry the resolution is final and binding.","{emailSignature}":"Kind regards,<br>WEG Bachwinkl 34 - Apartmenthaus Hintermoos"}};function b2({pollId:e,fixedType:n}){const{language:t}=Lc(),s=["cs","de","en"].includes(t)?t:"de",i=G=>g2[G][s],[r,l]=be.useState(n||"vote_invitation"),[o,u]=be.useState(s),[h,f]=be.useState(!0),[v,w]=be.useState(null),[m,A]=be.useState(null),[y,P]=be.useState(null);be.useEffect(()=>{(async()=>{const{data:G}=await Be.from("polls").select("title, title_cs, title_en, description, description_cs, description_en, starts_at, ends_at, options, options_cs, options_en").eq("id",e).maybeSingle();G&&P(G)})()},[e]);const k=be.useCallback((G,I)=>{const R=I==="cs"?(y==null?void 0:y.title_cs)||(y==null?void 0:y.title):I==="en"&&(y==null?void 0:y.title_en)||(y==null?void 0:y.title),Q=I==="cs"?(y==null?void 0:y.description_cs)||(y==null?void 0:y.description):I==="en"&&(y==null?void 0:y.description_en)||(y==null?void 0:y.description),me=L=>L?new Date(L).toLocaleDateString(I==="cs"?"cs-CZ":I==="de"?"de-DE":"en-GB",{day:"2-digit",month:"2-digit",year:"numeric"}):"â",oe=me(y==null?void 0:y.ends_at),K=me(y==null?void 0:y.starts_at),H=(I==="cs"?y==null?void 0:y.options_cs:I==="en"?y==null?void 0:y.options_en:y==null?void 0:y.options)||(y==null?void 0:y.options),ie=Array.isArray(H)?H:[],j=I==="cs"?"Možn
18ost":"Option",z=ie.map(L=>typeof L=="string"?L:(L==null?void 0:L.label)||(L==null?void 0:L.text)||(L==null?void 0:L.title)||"").filter(Boolean).map((L,M)=>`<strong>${j} #${M+1}:</strong> ${L}`).join("<br><br>"),C=`${window.location.origin}/auth?redirect=/owners/polls/${e}`,$={...Dh[I],"{pollTitle}":R||"â","{pollDescription}":Q||"","{deadline}":oe,"{startDate}":K,"{endDate}":oe,"{pollLink}":C,"{pollUrl}":C,"{votingLink}":C,"{pollQuestion}":R||"â","{pollOptions}":z||"â","{apartments}":Dh[I]["{apartmentCodes}"],"{loginLink}":`${window.location.origin}/auth`};let q=G;for(const[L,M]of Object.entries($))q=q.split(L).join(M);return q},[y,e]);return be.useEffect(()=>{let G=!1;return(async()=>{f(!0);const{data:I}=await Be.from("email_templates").select("subject, body_html").eq("template_type",r).eq("language",o).maybeSingle();G||(I?(w(k(I.subject||"",o)),A(k(I.body_html||"",o))):(w(null),A(null)),f(!1))})(),()=>{G=!0}},[r,o,k]),a.jsxs(ln,{children:[a.jsxs(Nn,{className:"pb-3",children:[a.jsxs(Tn,{className:"flex items-center gap-2 text-base",children:[a.jsx(xr,{className:"h-4 w-4 text-primary"}),i("title")]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:i("desc")})]}),a.jsxs(cn,{className:"space-y-3",children:[!n&&a.jsx(mc,{value:r,onValueChange:l,children:a.jsx(pc,{className:"h-9 flex-wrap justify-start",children:x2.map(G=>a.jsx(Ya,{value:G.value,className:"text-[12px] px-3",children:G.label[s]},G.value))})}),a.jsx(mc,{value:o,onValueChange:G=>u(G),children:a.jsx(pc,{className:"h-8",children:v2.map(G=>a.jsx(Ya,{value:G.value,className:"text-[12px] px-3",children:G.label},G.value))})}),h?a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ii,{className:"h-5 w-2/3"}),a.jsx(Ii,{className:"h-[420px] w-full"})]}):m===null?a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-amber-300 bg-amber-50 p-3 text-[12px] text-amber-900 dark:bg-amber-950/30 dark:text-amber-200",children:[a.jsx(Vr,{className:"h-4 w-4 shrink-0"}),i("missing")]}):a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-start gap-2 text-[12px]",children:[a.jsx(Ot,{variant:"outline",className:"shrink-0",children:i("subject")}),a.jsx("span",{className:"font-medium",children:v})]}),a.jsx("div",{className:"rounded-md border overflow-hidden bg-white",children:a.jsx("iframe",{srcDoc:m,title:"Email template preview",className:"w-full h-[520px] border-0",sandbox:""})}),a.jsx("p",{className:"text-[11px] text-muted-foreground",children:i("sampleNote")})]})]})]})}const bc={title:{cs:"OprávnÄnost hlasu",de:"Stimmberechtigung",en:"Vote eligibility"},verifiedAt:{cs:"OvÄÅeno",de:"Verifiziert",en:"Verified"},votedBy:{cs:"Hlasoval",de:"Abgestimmt von",en:"Voted by"},mode:{cs:"Režim",de:"Modus",en:"Mode"},status:{cs:"Stav",de:"Status",en:"Status"},ownerSince:{cs:"VlastnÃk od",de:"Eigentümer seit",en:"Owner since"},source:{cs:"Zdroj ovÄÅenÃ",de:"Verifizierungsquelle",en:"Verification source"},serverV2:{cs:"server (submit-vote v2)",de:"Server (submit-vote v2)",en:"server (submit-vote v2)"},modes:{sole_owner:{cs:"Sám vlastnÃk",de:"Alleineigentümer",en:"Sole owner"},joint_vote_declared:{cs:"Dohoda spoluvlastnÃků",de:"Vereinbarung der Miteigentümer",en:"Joint owner agreement"},co_owner_majority:{cs:"VÄtÅ¡ina spoluvlastnÃků",de:"Mehrheit der Miteigentümer",en:"Co-owner majority"},written_proxy:{cs:"PÃsemná plná moc",de:"Schriftliche Vollmacht",en:"Written proxy"},authorized_person:{cs:"PovÄÅená osoba",de:"Bevollmächtigte Person",en:"Authorized person"},retroactive_approval_pending:{cs:"ZpÄtné schválenÃ",de:"Nachträgliche Genehmigung",en:"Retroactive approval"},not_applicable:{cs:"Neaplikovatelné",de:"Nicht anwendbar",en:"Not applicable"}},statuses:{valid:{cs:"Platný",de:"Gültig",en:"Valid"},declared_by_voter:{cs:"Prohlášenà hlasujÃcÃho",de:"Wählererklärung",en:"Voter declaration"},pending_approval:{cs:"Námitková lhůta bÄžÃ",de:"Einspruchsfrist läuft",en:"Objection period open"},rejected:{cs:"ZamÃtnuto",de:"Abgelehnt",en:"Rejected"},expired:{cs:"VyprÅ¡elo",de:"Abgelaufen",en:"Expired"},not_applicable:{cs:"Neaplikovatelné",de:"Nicht anwendbar",en:"Not applicable"}}};function w2(e,n="cs"){var t;return e?((t=bc.modes[e])==null?void 0:t[n])||e:"â"}function y2(e,n="cs"){var t;return e?((t=bc.statuses[e])==null?void 0:t[n])||e:"â"}const _2=e=>
18e?new Date(e).toLocaleString("cs-CZ",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",timeZone:"Europe/Prague"})+" CET":"â",N2=e=>e?new Date(e).toLocaleDateString("cs-CZ",{timeZone:"Europe/Prague"}):"â",j2=({votedAt:e,voterName:n,representationMode:t,representationStatus:s,memberFrom:i,verificationSource:r="server_v2",language:l="cs"})=>{const o=l,u=y=>{const P=bc[y];return typeof P=="object"&&"cs"in P?P[o]||P.en:y},h=s==="valid"||s==="declared_by_voter",f=s==="pending_approval",v=s==="rejected"||s==="expired",w=h?pu:f?dc:v?T0:p0,m=h?"bg-green-50 text-green-800 border-green-300 dark:bg-green-950/30 dark:text-green-300 dark:border-green-800":f?"bg-amber-50 text-amber-800 border-amber-300 dark:bg-amber-950/30 dark:text-amber-300 dark:border-amber-800":v?"bg-red-50 text-red-800 border-red-300 dark:bg-red-950/30 dark:text-red-300 dark:border-red-800":"bg-muted text-muted-foreground border-border",A=r==="server_v2"?bc.serverV2[o]:r;return a.jsxs("div",{className:"rounded-md border border-border bg-card/50 p-3",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2.5",children:[a.jsx(w,{className:`h-4 w-4 ${h?"text-green-600":f?"text-amber-600":v?"text-destructive":"text-muted-foreground"}`}),a.jsx("span",{className:"font-serif text-[11px] uppercase tracking-wide text-muted-foreground font-semibold",children:u("title")}),a.jsx(Ot,{variant:"outline",className:`text-[10px] px-1.5 py-0 ml-auto ${m}`,children:y2(s,o)})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-1.5 text-[12px]",children:[a.jsxs("div",{className:"flex justify-between gap-3",children:[a.jsx("span",{className:"text-muted-foreground",children:u("verifiedAt")}),a.jsx("span",{className:"font-medium text-right tabular-nums",children:_2(e)})]}),a.jsxs("div",{className:"flex justify-between gap-3",children:[a.jsx("span",{className:"text-muted-foreground",children:u("votedBy")}),a.jsx("span",{className:"font-medium text-right truncate",children:n||"â"})]}),a.jsxs("div",{className:"flex justify-between gap-3",children:[a.jsx("span",{className:"text-muted-foreground",children:u("mode")}),a.jsx("span",{className:"font-medium text-right",children:w2(t,o)})]}),a.jsxs("div",{className:"flex justify-between gap-3",children:[a.jsx("span",{className:"text-muted-foreground",children:u("ownerSince")}),a.jsx("span",{className:"font-medium text-right tabular-nums",children:N2(i)})]}),a.jsxs("div",{className:"flex justify-between gap-3 sm:col-span-2",children:[a.jsx("span",{className:"text-muted-foreground",children:u("source")}),a.jsx("span",{className:"font-medium text-right text-muted-foreground/90 italic text-[11px]",children:A})]})]})]})},k2=e=>{if(!e)return;const n=o2(e,"yyyy-MM-dd'T'HH:mm",new Date);return $0(n)?n:void 0};function Th({value:e,onChange:n,placeholder:t="Vyberte datum a Äas",className:s,disabled:i}){const[r,l]=be.useState(!1),o=k2(e),u=e?e.slice(11,16):"",h=v=>{if(!v){n("");return}const w=u||Rl(new Date,"HH:mm");n(`${Rl(v,"yyyy-MM-dd")}T${w}`)},f=v=>{n(`${Rl(o??new Date,"yyyy-MM-dd")}T${v||"00:00"}`)};return a.jsxs(R0,{open:r,onOpenChange:l,children:[a.jsx(I0,{asChild:!0,children:a.jsxs(pt,{type:"button",variant:"outline",disabled:i,className:Ps("h-9 w-full justify-start gap-2 text-left font-normal",!o&&"text-muted-foreground",s),children:[a.jsx(q0,{className:"h-4 w-4 shrink-0 opacity-70"}),a.jsx("span",{className:"truncate",children:o?Rl(o,"d. MMMM yyyy 'v' HH:mm",{locale:Ah}):t}),o&&!i&&a.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Vymazat",className:"ml-auto rounded p-0.5 opacity-50 hover:opacity-100",onClick:v=>{v.stopPropagation(),n("")},children:a.jsx(uc,{className:"h-3.5 w-3.5"})})]})}),a.jsxs(B0,{className:"w-auto p-0",align:"start",children:[a.jsx(A0,{mode:"single",selected:o,onSelect:h,locale:Ah,weekStartsOn:1,initialFocus:!0,className:Ps("p-3 pointer-events-auto")}),a.jsxs("div",{className:"flex items-center gap-2 border-t p-3",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Äas"}),a.jsx(Jo,{type:"time",value:u,onChange:v=>f(v.target.value),className:"h-8 w-32"}),a.jsx(pt,{type:"button",size:"sm",variant:"secondary",className:"ml-auto h-8",onClick:()=>l(!1),children:"Hotovo"})]})]})]})}function en(e){"@babel/helpers - typeof";return en=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},en(e)}var Ni=Uint8Array,ei=Uint16Array,wu=Int32Array,yu=new Ni([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]),_u=new Ni([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]),zh=new Ni([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Vm=function(e,n){for(var t=new ei(31),s=0;s<31;++s)t[s]=n+=1<<e[s-1];for(var i=new wu(t[30]),s=1;s<30;++s)for(var r=t[s];r<t[s+1];++r)i[r]=r-t[s]<<5|s;return{b:t,r:i}
vendor: 5,907 bytes, line 18
18},Hm=Vm(yu,2),A2=Hm.b,Zd=Hm.r;A2[28]=258,Zd[258]=28;var S2=Vm(_u,0),Fh=S2.r,Yd=new ei(32768);for(var bn=0;bn<32768;++bn){var Rr=(bn&43690)>>1|(bn&21845)<<1;Rr=(Rr&52428)>>2|(Rr&13107)<<2,Rr=(Rr&61680)>>4|(Rr&3855)<<4,Yd[bn]=((Rr&65280)>>8|(Rr&255)<<8)>>1}var Vo=function(e,n,t){for(var s=e.length,i=0,r=new ei(n);i<s;++i)e[i]&&++r[e[i]-1];var l=new ei(n);for(i=1;i<n;++i)l[i]=l[i-1]+r[i-1]<<1;var o;if(t){o=new ei(1<<n);var u=15-n;for(i=0;i<s;++i)if(e[i])for(var h=i<<4|e[i],f=n-e[i],v=l[e[i]-1]++<<f,w=v|(1<<f)-1;v<=w;++v)o[Yd[v]>>u]=h}else for(o=new ei(s),i=0;i<s;++i)e[i]&&(o[i]=Yd[l[e[i]-1]++]>>15-e[i]);return o},_a=new Ni(288);for(var bn=0;bn<144;++bn)_a[bn]=8;for(var bn=144;bn<256;++bn)_a[bn]=9;for(var bn=256;bn<280;++bn)_a[bn]=7;for(var bn=280;bn<288;++bn)_a[bn]=8;var wc=new Ni(32);for(var bn=0;bn<32;++bn)wc[bn]=5;var L2=Vo(_a,9,0),E2=Vo(wc,5,0),Gm=function(e){return(e+7)/8|0},P2=function(e,n,t){return(t==null||t>e.length)&&(t=e.length),new Ni(e.subarray(n,t))},or=function(e,n,t){t<<=n&7;var s=n/8|0;e[s]|=t,e[s+1]|=t>>8},zo=function(e,n,t){t<<=n&7;var s=n/8|0;e[s]|=t,e[s+1]|=t>>8,e[s+2]|=t>>16},od=function(e,n){for(var t=[],s=0;s<e.length;++s)e[s]&&t.push({s,f:e[s]});var i=t.length,r=t.slice();if(!i)return{t:Zm,l:0};if(i==1){var l=new Ni(t[0].s+1);return l[t[0].s]=1,{t:l,l:1}}t.sort(function(Q,me){return Q.f-me.f}),t.push({s:-1,f:25001});var o=t[0],u=t[1],h=0,f=1,v=2;for(t[0]={s:-1,f:o.f+u.f,l:o,r:u};f!=i-1;)o=t[t[h].f<t[v].f?h++:v++],u=t[h!=f&&t[h].f<t[v].f?h++:v++],t[f++]={s:-1,f:o.f+u.f,l:o,r:u};for(var w=r[0].s,s=1;s<i;++s)r[s].s>w&&(w=r[s].s);var m=new ei(w+1),A=Kd(t[f-1],m,0);if(A>n){var s=0,y=0,P=A-n,k=1<<P;for(r.sort(function(me,oe){return m[oe.s]-m[me.s]||me.f-oe.f});s<i;++s){var G=r[s].s;if(m[G]>n)y+=k-(1<<A-m[G]),m[G]=n;else break}for(y>>=P;y>0;){var I=r[s].s;m[I]<n?y-=1<<n-m[I]++-1:++s}for(;s>=0&&y;--s){var R=r[s].s;m[R]==n&&(--m[R],++y)}A=n}return{t:new Ni(m),l:A}},Kd=function(e,n,t){return e.s==-1?Math.max(Kd(e.l,n,t+1),Kd(e.r,n,t+1)):n[e.s]=t},Oh=function(e){for(var n=e.length;n&&!e[--n];);for(var t=new ei(++n),s=0,i=e[0],r=1,l=function(u){t[s++]=u},o=1;o<=n;++o)if(e[o]==i&&o!=n)++r;else{if(!i&&r>2){for(;r>138;r-=138)l(32754);r>2&&(l(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(l(i),--r;r>6;r-=6)l(8304);r>2&&(l(r-3<<5|8208),r=0)}for(;r--;)l(i);r=1,i=e[o]}return{c:t.subarray(0,s),n}},Fo=function(e,n){for(var t=0,s=0;s<n.length;++s)t+=e[s]*n[s];return t},$m=function(e,n,t){var s=t.length,i=Gm(n+2);e[i]=s&255,e[i+1]=s>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var r=0;r<s;++r)e[i+r+4]=t[r];return(i+4+s)*8},Mh=function(e,n,t,s,i,r,l,o,u,h,f){or(n,f++,t),++i[256];for(var v=od(i,15),w=v.t,m=v.l,A=od(r,15),y=A.t,P=A.l,k=Oh(w),G=k.c,I=k.n,R=Oh(y),Q=R.c,me=R.n,oe=new ei(19),K=0;K<G.length;++K)++oe[G[K]&31];for(var K=0;K<Q.length;++K)++oe[Q[K]&31];for(var H=od(oe,7),ie=H.t,j=H.l,z=19;z>4&&!ie[zh[z-1]];--z);var C=h+5<<3,$=Fo(i,_a)+Fo(r,wc)+l,q=Fo(i,w)+Fo(r,y)+l+14+3*z+Fo(oe,ie)+2*oe[16]+3*oe[17]+7*oe[18];if(u>=0&&C<=$&&C<=q)return $m(n,f,e.subarray(u,u+h));var L,M,Z,ae;if(or(n,f,1+(q<$)),f+=2,q<$){L=Vo(w,m,0),M=w,Z=Vo(y,P,0),ae=y;var he=Vo(ie,j,0);or(n,f,I-257),or(n,f+5,me-1),or(n,f+10,z-4),f+=14;for(var K=0;K<z;++K)or(n,f+3*K,ie[zh[K]]);f+=3*z;for(var we=[G,Q],b=0;b<2;++b)for(var W=we[b],K=0;K<W.length;++K){var D=W[K]&31;or(n,f,he[D]),f+=ie[D],D>15&&(or(n,f,W[K]>>5&127),f+=W[K]>>12)}}else L=L2,M=_a,Z=E2,ae=wc;for(var K=0;K<o;++K){var X=s[K];if(X>255){var D=X>>18&31;zo(n,f,L[D+257]),f+=M[D+257],D>7&&(or(n,f,X>>23&31),f+=yu[D]);var Y=X&31;zo(n,f,Z[Y]),f+=ae[Y],Y>3&&(zo(n,f,X>>5&8191),f+=_u[Y])}else zo(n,f,L[X]),f+=M[X]}return zo(n,f,L[256]),f+M[256]},C2=new wu([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Zm=new Ni(0),D2=function(e,n,t,s,i,r){var l=r.z||e.length,o=new Ni(s+l+5*(1+Math.ceil(l/7e3))+i),u=o.subarray(s,o.length-i),h=r.l,f=(r.r||0)&7;if(n){f&&(u[0]=r.r>>3);for(var v=C2[n-1],w=v>>13,m=v&8191,A=(1<<t)-1,y=r.p||new ei(32768),P=r.h||new ei(A+1),k=Math.ceil(t/3),G=2*k,I=function(He){return(e[He]^e[He+1]<<k^e[He+2]<<G)&A},R=new wu(25e3),Q=new ei(288),me=new ei(32),oe=0,K=0,H=r.i||0,ie=0,j=r.w||0,z=0;H+2<l;++H){var C=I(H),$=H&32767,q=P[C];if(y[$]=q,P[C]=$,j<=H){var L=l-H;if((oe>7e3||ie>24576)&&(L>423||!h)){f=Mh(e,u,0,R,Q,me,K,ie,z,H-z,f),ie=oe=K=0,z=H;for(var M=0;M<286;++M)Q[M]=0;for(var M=0;M<30;++M)me[M]=0}var Z=2,ae=0,he=m,we=$-q&32767;if(L>2&&C==I(H-we))for(var b=Math.min(w,L)-1,W=Math.min(32767,H),D=Math.min(258,L);we<=W&&--he&&$!=q;){if(e[H+Z]==e[H+Z-we]){for(var X=0;X<D&&e[H+X]==e[H+X-we];++X);if(X>Z){if(Z=X,ae=we,X>b)break;for(var Y=Math.min(we,X-2),te=0,M=0;M<Y;++M){var ue=H-we+M&32767,ge=y[ue],se=ue-ge&32767;se>te&&(te=se,q=ue)}}}$=q,q=y[$],we+=$-q&32767}if(ae){R[ie++]=268435456|Zd[Z]<<18|Fh[ae];var ve=Zd[Z]&31,Ae=Fh[ae]&31;K+=yu[ve]+_u[Ae],++Q[257+ve],++me[Ae],j=H+Z,++oe}else R[ie++]=e[H],++Q[e[H]]}}for(H=Math.max(H,j);H<l;++H)R[ie++]=e[H],++Q[e[H]];f=Mh(e,u,h,R,Q,me,K,ie,z,H-z,f),h||(r.r=f&7|u[f/8|0]<<3,f-=7,r.h=P,r.p=y,r.i=H,r.w=j)}else{for(var H=r.w||0;H<l+h;H+=65535){var Pe=H+65535;Pe>=l&&(u[f/8|0]=h,Pe=l),f=$m(u,f+1,e.subarray(H,Pe))}r.i=l}return P2(o,0,s+Gm(f)+i)},Ym=function(){var e=1,n=0;return{p:function(t){for(var s=e,i=n,r=t.length|0,l=0;l!=r;){for(var o=Math.min(l+2655,r);l<o;++l)i+=s+=t[l];s=(s&65535)+15*(s>>16),i=(i&65535)+15*(i>>16)}e=s,n=i},d:function(){return e%=65521,n%=65521,(e&255)<<24|(e&65280)<<8|(n&255)<<8|n>>8}}},T2=function(e,n,t,s,i){if(!i&&(i={l:1},n.dictionary)){var r=n.dictionary.subarray(-32768),l=new Ni(r.length+e.length);l.set(r),l.set(e,r.length),e=l,i.w=r.length}return D2(e,n.level==null?6:n.level,n.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+n.mem,t,s,i)},Km=function(e,n,t){for(;t;++n)e[n]=t,t>>>=8},z2=function(e,n){var t=n.level,s=t==0?0:t<6?1:t==9?3:2;if(e[0]=120,e[1]=s<<6|(n.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,n.dictionary){var i=Ym();i.p(n.dictionary),Km(e,2,i.d())}};
vendor: 7,208 bytes, lines 18-19
18function Jd(e,n){n||(n={});var t=Ym();t.p(e);var s=T2(e,n,n.dictionary?6:2,4);return z2(s,n),Km(s,s.length-4,t.d()),s}var F2=typeof TextDecoder<"u"&&new TextDecoder,O2=0;try{F2.decode(Zm,{stream:!0}),O2=1}catch{}function M2(e){if(Array.isArray(e))return e}function R2(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var s,i,r,l,o=[],u=!0,h=!1;try{if(r=(t=t.call(e)).next,n!==0)for(;!(u=(s=r.call(t)).done)&&(o.push(s.value),o.length!==n);u=!0);}catch(f){h=!0,i=f}finally{try{if(!u&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(h)throw i}}return o}}function Rh(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,s=Array(n);t<n;t++)s[t]=e[t];return s}function I2(e,n){if(e){if(typeof e=="string")return Rh(e,n);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Rh(e,n):void 0}}function B2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 19In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ih(e,n){return M2(e)||R2(e,n)||I2(e,n)||B2()}function Bh(e,n="utf8"){return new TextDecoder(n).decode(e)}const q2=new TextEncoder;function W2(e){return q2.encode(e)}const U2=1024*8,V2=(()=>{const e=new Uint8Array(4),n=new Uint32Array(e.buffer);return!((n[0]=1)&e[0])})(),ld={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class Nu{constructor(n=U2,t={}){Oe(this,"buffer");Oe(this,"byteLength");Oe(this,"byteOffset");Oe(this,"length");Oe(this,"offset");Oe(this,"lastWrittenByte");Oe(this,"littleEndian");Oe(this,"_data");Oe(this,"_mark");Oe(this,"_marks");let s=!1;typeof n=="number"?n=new ArrayBuffer(n):(s=!0,this.lastWrittenByte=n.byteLength);const i=t.offset?t.offset>>>0:0,r=n.byteLength-i;let l=i;(ArrayBuffer.isView(n)||n instanceof Nu)&&(n.byteLength!==n.buffer.byteLength&&(l=n.byteOffset+i),n=n.buffer),s?this.lastWrittenByte=r:this.lastWrittenByte=0,this.buffer=n,this.length=r,this.byteLength=r,this.byteOffset=l,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,l,r),this._mark=0,this._marks=[]}available(n=1){return this.offset+n<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(n=1){return this.offset+=n,this}back(n=1){return this.offset-=n,this}seek(n){return this.offset=n,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 n=this._marks.pop();if(n===void 0)throw new Error("Mark stack empty");return this.seek(n),this}rewind(){return this.offset=0,this}ensureAvailable(n=1){if(!this.available(n)){const s=(this.offset+n)*2,i=new Uint8Array(s);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=s,this.byteLength=s,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(n=1){return this.readArray(n,"uint8")}readArray(n,t){const s=ld[t].BYTES_PER_ELEMENT*n,i=this.byteOffset+this.offset,r=this.buffer.slice(i,i+s);if(this.littleEndian===V2&&t!=="uint8"&&t!=="int8"){const o=new Uint8Array(this.buffer.slice(i,i+s));o.reverse();const u=new ld[t](o.buffer);return this.offset+=s,u.reverse(),u}const l=new ld[t](r);return this.offset+=s,l}readInt16(){const n=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,n}readUint16(){const n=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,n}readInt32(){const n=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,n}readUint32(){const n=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat32(){const n=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat64(){const n=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,n}readBigInt64(){const n=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,n}readBigUint64(){const n=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}readChar(){return String.fromCharCode(this.readInt8())}readChars(n=1){let t="";for(let s=0;s<n;s++)t+=this.readChar();return t}readUtf8(n=1){return Bh(this.readBytes(n))}decodeText(n=1,t="utf8"){return Bh(this.readBytes(n),t)}writeBoolean(n){return this.writeUint8(n?255:0),this}writeInt8(n){return this.ensureAvailable(1),this._data.setInt8(this.offset++,n),this._updateLastWrittenByte(),this}writeUint8(n){return this.ensureAvailable(1),this._data.setUint8(this.offset++,n),this._updateLastWrittenByte(),this}writeByte(n){return this.writeUint8(n)}writeBytes(n){this.ensureAvailable(n.length);for(let t=0;t<n.length;t++)this._data.setUint8(this.offset++,n[t]);return this._updateLastWrittenByte(),this}writeInt16(n){return this.ensureAvailable(2),this._data.setInt16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(n){return this.ensureAvailable(2),this._data.setUint16(this.offset,n,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(n){return this.ensureAvailable(4),this._data.setInt32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(n){return this.ensureAvailable(4),this._data.setUint32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(n){return this.ensureAvailable(4),this._data.setFloat32(this.offset,n,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(n){return this.ensureAvailable(8),this._data.setFloat64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(n){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(n){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,n,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(n){return this.writeUint8(n.charCodeAt(0))}writeChars(n){for(let t=0;t<n.length;t++)this.writeUint8(n.charCodeAt(t));return this}writeUtf8(n){return this.writeBytes(W2(n))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}/*! pako 2.2.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const H2=4,qh=0,Wh=1,G2=2;function co(e){let n=e.length;for(;--n>=0;)e[n]=0}const $2=0,Jm=1,Z2=2,Y2=3,K2=258,ju=29,cl=256,tl=cl+1+ju,Ja=30,ku=19,Xm=2*tl
vendor: 8,381 bytes, line 19
19+1,ga=15,cd=16,J2=7,Au=256,Qm=16,ep=17,tp=18,Xd=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]),nc=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]),X2=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),np=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Q2=512,dr=new Array((tl+2)*2);co(dr);const Ho=new Array(Ja*2);co(Ho);const nl=new Array(Q2);co(nl);const sl=new Array(K2-Y2+1);co(sl);const Su=new Array(ju);co(Su);const yc=new Array(Ja);co(yc);function dd(e,n,t,s,i){this.static_tree=e,this.extra_bits=n,this.extra_base=t,this.elems=s,this.max_length=i,this.has_stree=e&&e.length}let sp,ip,rp;function ud(e,n){this.dyn_tree=e,this.max_code=0,this.stat_desc=n}const ap=e=>e<256?nl[e]:nl[256+(e>>>7)],il=(e,n)=>{e.pending_buf[e.pending++]=n&255,e.pending_buf[e.pending++]=n>>>8&255},Bs=(e,n,t)=>{e.bi_valid>cd-t?(e.bi_buf|=n<<e.bi_valid&65535,il(e,e.bi_buf),e.bi_buf=n>>cd-e.bi_valid,e.bi_valid+=t-cd):(e.bi_buf|=n<<e.bi_valid&65535,e.bi_valid+=t)},Wi=(e,n,t)=>{Bs(e,t[n*2],t[n*2+1])},op=(e,n)=>{let t=0;do t|=e&1,e>>>=1,t<<=1;while(--n>0);return t>>>1},e5=e=>{e.bi_valid===16?(il(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},t5=(e,n)=>{const t=n.dyn_tree,s=n.max_code,i=n.stat_desc.static_tree,r=n.stat_desc.has_stree,l=n.stat_desc.extra_bits,o=n.stat_desc.extra_base,u=n.stat_desc.max_length;let h,f,v,w,m,A,y=0;for(w=0;w<=ga;w++)e.bl_count[w]=0;for(t[e.heap[e.heap_max]*2+1]=0,h=e.heap_max+1;h<Xm;h++)f=e.heap[h],w=t[t[f*2+1]*2+1]+1,w>u&&(w=u,y++),t[f*2+1]=w,!(f>s)&&(e.bl_count[w]++,m=0,f>=o&&(m=l[f-o]),A=t[f*2],e.opt_len+=A*(w+m),r&&(e.static_len+=A*(i[f*2+1]+m)));if(y!==0){do{for(w=u-1;e.bl_count[w]===0;)w--;e.bl_count[w]--,e.bl_count[w+1]+=2,e.bl_count[u]--,y-=2}while(y>0);for(w=u;w!==0;w--)for(f=e.bl_count[w];f!==0;)v=e.heap[--h],!(v>s)&&(t[v*2+1]!==w&&(e.opt_len+=(w-t[v*2+1])*t[v*2],t[v*2+1]=w),f--)}},lp=(e,n,t)=>{const s=new Array(ga+1);let i=0,r,l;for(r=1;r<=ga;r++)i=i+t[r-1]<<1,s[r]=i;for(l=0;l<=n;l++){let o=e[l*2+1];o!==0&&(e[l*2]=op(s[o]++,o))}},n5=()=>{let e,n,t,s,i;const r=new Array(ga+1);for(t=0,s=0;s<ju-1;s++)for(Su[s]=t,e=0;e<1<<Xd[s];e++)sl[t++]=s;for(sl[t-1]=s,i=0,s=0;s<16;s++)for(yc[s]=i,e=0;e<1<<nc[s];e++)nl[i++]=s;for(i>>=7;s<Ja;s++)for(yc[s]=i<<7,e=0;e<1<<nc[s]-7;e++)nl[256+i++]=s;for(n=0;n<=ga;n++)r[n]=0;for(e=0;e<=143;)dr[e*2+1]=8,e++,r[8]++;for(;e<=255;)dr[e*2+1]=9,e++,r[9]++;for(;e<=279;)dr[e*2+1]=7,e++,r[7]++;for(;e<=287;)dr[e*2+1]=8,e++,r[8]++;for(lp(dr,tl+1,r),e=0;e<Ja;e++)Ho[e*2+1]=5,Ho[e*2]=op(e,5);sp=new dd(dr,Xd,cl+1,tl,ga),ip=new dd(Ho,nc,0,Ja,ga),rp=new dd(new Array(0),X2,0,ku,J2)},cp=e=>{let n;for(n=0;n<tl;n++)e.dyn_ltree[n*2]=0;for(n=0;n<Ja;n++)e.dyn_dtree[n*2]=0;for(n=0;n<ku;n++)e.bl_tree[n*2]=0;e.dyn_ltree[Au*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},dp=e=>{e.bi_valid>8?il(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Uh=(e,n,t,s)=>{const i=n*2,r=t*2;return e[i]<e[r]||e[i]===e[r]&&s[n]<=s[t]},hd=(e,n,t)=>{const s=e.heap[t];let i=t<<1;for(;i<=e.heap_len&&(i<e.heap_len&&Uh(n,e.heap[i+1],e.heap[i],e.depth)&&i++,!Uh(n,s,e.heap[i],e.depth));)e.heap[t]=e.heap[i],t=i,i<<=1;e.heap[t]=s},Vh=(e,n,t)=>{let s,i,r=0,l,o;if(e.sym_next!==0)do s=e.pending_buf[e.sym_buf+r++]&255,s+=(e.pending_buf[e.sym_buf+r++]&255)<<8,i=e.pending_buf[e.sym_buf+r++],s===0?Wi(e,i,n):(l=sl[i],Wi(e,l+cl+1,n),o=Xd[l],o!==0&&(i-=Su[l],Bs(e,i,o)),s--,l=ap(s),Wi(e,l,t),o=nc[l],o!==0&&(s-=yc[l],Bs(e,s,o)));while(r<e.sym_next);Wi(e,Au,n)},Qd=(e,n)=>{const t=n.dyn_tree,s=n.stat_desc.static_tree,i=n.stat_desc.has_stree,r=n.stat_desc.elems;let l,o,u=-1,h;for(e.heap_len=0,e.heap_max=Xm,l=0;l<r;l++)t[l*2]!==0?(e.heap[++e.heap_len]=u=l,e.depth[l]=0):t[l*2+1]=0;for(;e.heap_len<2;)h=e.heap[++e.heap_len]=u<2?++u:0,t[h*2]=1,e.depth[h]=0,e.opt_len--,i&&(e.static_len-=s[h*2+1]);for(n.max_code=u,l=e.heap_len>>1;l>=1;l--)hd(e,t,l);h=r;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],hd(e,t,1),o=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=o,t[h*2]=t[l*2]+t[o*2],e.depth[h]=(e.depth[l]>=e.depth[o]?e.depth[l]:e.depth[o])+1,t[l*2+1]=t[o*2+1]=h,e.heap[1]=h++,hd(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],t5(e,n),lp(t,u,e.bl_count)},Hh=(e,n,t)=>{let s,i=-1,r,l=n[0*2+1],o=0,u=7,h=4;for(l===0&&(u=138,h=3),n[(t+1)*2+1]=65535,s=0;s<=t;s++)r=l,l=n[(s+1)*2+1],!(++o<u&&r===l)&&(o<h?e.bl_tree[r*2]+=o:r!==0?(r!==i&&e.bl_tree[r*2]++,e.bl_tree[Qm*2]++):o<=10?e.bl_tree[ep*2]++:e.bl_tree[tp*2]++,o=0,i=r,l===0?(u=138,h=3):r===l?(u=6,h=3):(u=7,h=4))},Gh=(e,n,t)=>{let s,i=-1,r,l=n[0*2+1],o=0,u=7,h=4;for(l===0&&(u=138,h=3),s=0;s<=t;s++)if(r=l,l=n[(s+1)*2+1],!(++o<u&&r===l)){if(o<h)do Wi(e,r,e.bl_tree);while(--o!==0);else r!==0?(r!==i&&(Wi(e,r,e.bl_tree),o--),Wi(e,Qm,e.bl_tree),Bs(e,o-3,2)):o<=10?(Wi(e,ep,e.bl_tree),Bs(e,o-3,3)):(Wi(e,tp,e.bl_tree),Bs(e,o-11,7));o=0,i=r,l===0?(u=138,h=3):r===l?(u=6,h=3):(u=7,h=4)}},s5=e=>{let n;for(Hh(e,e.dyn_ltree,e.l_desc.max_code),Hh(e,e.dyn_dtree,e.d_desc.max_code),Qd(e,e.bl_desc),n=ku-1;n>=3&&e.bl_tree[np[n]*2+1]===0;n--);return e.opt_len+=3*(n+1)+5+5+4,n},i5=(e,n,t,s)=>{let i;for(Bs(e,n-257,5),Bs(e,t-1,5),Bs(e,s-4,4),i=0;i<s;i++)Bs(e,e.bl_tree[np[i]*2+1],3);Gh(e,e.dyn_ltree,n-1),Gh(e,e.dyn_dtree,t-1)},r5=e=>{let n=4093624447,t;for(t=0;t<=31;t++,n>>>=1)if(n&1&&e.dyn_ltree[t*2]!==0)return qh;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Wh;for(t=32;t<cl;t++)if(e.dyn_ltree[t*2]!==0)return Wh;return qh};let $h=!1;const a5=e=>{$h||(n5(),$h=!0),e.l_desc=new ud(e.dyn_ltree,sp),e.d_desc=new ud(e.dyn_dtree,ip),e.bl_desc=new ud(e.bl_tree,rp),e.bi_buf=0,e.bi_valid=0,cp(e)},up=(e,n,t,s)=>{Bs(e,($2<<1)+(s?1:0),3),dp(e),il(e,t),il(e,~t),t&&e.pending_buf.set(e.window.subarray(n,n+t),e.pending),e.pending+=t},o5=e=>{Bs(e,Jm<<1,3),Wi(e,Au,dr),e5(e)},l5=(e,n,t,s)=>{let i,r,l=0;e.level>0?(e.strm.data_type===G2&&(e.strm.data_type=r5(e)),Qd(e,e.l_desc),Qd(e,e.d_desc),l=s5(e),i=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r<=i&&(i=r)):i=r=t+5,t+4<=i&&n!==-1?up(e,n,t,s):e.strategy===H2||r===i?(Bs(e,(Jm<<1)+(s?1:0),3),Vh(e,dr,Ho)):(Bs(e,(Z2<<1)+(s?1:0),3),i5(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),Vh(e,e.dyn_ltree,e.dyn_dtree)),cp(e),s&&dp(e)},c5=(e,n,t)=>(e.pending_buf[e.sym_buf+e.sym_next++]=n,e.pending_buf[e.sym_buf+e.sym_next++]=n>>8,e.pending_buf[e.sym_buf+e.sym_next++]=t,n===0?e.dyn_ltree[t*2]++:(e.matches++,n--,e.dyn_ltree[(sl[t]+cl+1)*2]++,e.dyn_dtree[ap(n)*2]++),e.sym_next===e.sym_end);var d5=a5,u5=up,h5=l5,f5=c5,m5=o5,p5={_tr_init:d5,_tr_stored_block:u5,_tr_flush_block:h5,_tr_tally:f5,_tr_align:m5};const g5=(e,n,t,s)=>{let i=e&65535|0,r=e>>>16&65535|0,l=0;for(;t!==0;){l=t>2e3?2e3:t,t-=l;do i=i+n[s++]|0,r=r+i|0;while(--l);i%=65521,r%=65521}return i|r<<16|0};var rl=g5;const x5=()=>{let e,n=[];for(var t=0;t<256;t++){e=t;for(var s=0;s<8;s++)e=e&1?3988292384^e>>>1:e>>>1;n[t]=e}return n},v5=new Uint32Array(x5()),b5=(e,n,t,s)=>{const i=v5,r=s+t;e^=-1;for(let l=s;l<r;l++)e=e>>>8^i[(e^n[l])&255];return e^-1};var ts=b5,io={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"},dl={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:w5,_tr_stored_block:eu,_tr_flush_block:y5,_tr_tally:Hr,_tr_align:_5}=p5,{Z_NO_FLUSH:Gr,Z_PARTIAL_FLUSH:N5,Z_FULL_FLUSH:j5,Z_FINISH:ci,Z_BLOCK:Zh,Z_OK:cs,Z_STREAM_END:Yh,Z_STREAM_ERROR:Vi,Z_DATA_ERROR:k5,Z_BUF_ERROR:fd,Z_DEFAULT_COMPRESSION:A5,Z_FILTERED:S5,Z_HUFFMAN_ONLY:Bl,Z_RLE:L5,Z_FIXED:E5,Z_DEFAULT_STRATEGY:P5,Z_UNKNOWN:C5,Z_DEFLATED:Ec}=dl,D5=9,T5=15,z5=8,F5=29,O5=256,tu=O5+1+F5,M5=30,R5=19,I5=2*tu+1,B5=15,Ht=3,Wr=258,Hi=Wr+Ht+1,q5=32,ro=42,Lu=57,nu=69,su=73,iu=91,ru=103,xa=113,Wo=666,Cs=1,uo=2,Na=3,ho=4,W5=3,va=(e,n)=>(e.msg=io[n],n),Kh=e=>e*2-(e>4?9:0),qr=e=>{let n=e.length;for(;--n>=0;)e[n]=0},U5=e=>{let n,t,s,i=e.w_size;n=e.hash_size,s=n;do t=e.head[--s],e.head[s]=t>=i?t-i:0;while(--n);n=i,s=n;
vendor: 4,441 bytes, line 19
19do t=e.prev[--s],e.prev[s]=t>=i?t-i:0;while(--n)};let Eu=(e,n,t)=>(n<<e.hash_shift^t)&e.hash_mask;const ja=(e,n)=>{let t;if(e.legacy_hash)t=e.ins_h=Eu(e,e.ins_h,e.window[n+Ht-1]);else{const i=e.window,r=i[n]|i[n+1]<<8|i[n+2]<<16|i[n+3]<<24;t=e.ins_h=Math.imul(r,66521)+66521>>>16&e.hash_mask}const s=e.prev[n&e.w_mask]=e.head[t];return e.head[t]=n,s},Xs=e=>{const n=e.state;let t=n.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+t),e.next_out),e.next_out+=t,n.pending_out+=t,e.total_out+=t,e.avail_out-=t,n.pending-=t,n.pending===0&&(n.pending_out=0))},ti=(e,n)=>{y5(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,n),e.block_start=e.strstart,Xs(e.strm)},$t=(e,n)=>{e.pending_buf[e.pending++]=n},Oo=(e,n)=>{e.pending_buf[e.pending++]=n>>>8&255,e.pending_buf[e.pending++]=n&255},au=(e,n,t,s)=>{let i=e.avail_in;return i>s&&(i=s),i===0?0:(e.avail_in-=i,n.set(e.input.subarray(e.next_in,e.next_in+i),t),e.state.wrap===1?e.adler=rl(e.adler,n,i,t):e.state.wrap===2&&(e.adler=ts(e.adler,n,i,t)),e.next_in+=i,e.total_in+=i,i)},hp=(e,n)=>{let t=e.max_chain_length,s=e.strstart,i,r,l=e.prev_length,o=e.nice_match;const u=e.strstart>e.w_size-Hi?e.strstart-(e.w_size-Hi):0,h=e.window,f=e.w_mask,v=e.prev,w=e.strstart+Wr;let m=h[s+l-1],A=h[s+l];e.prev_length>=e.good_match&&(t>>=2),o>e.lookahead&&(o=e.lookahead);do if(i=n,!(h[i+l]!==A||h[i+l-1]!==m||h[i]!==h[s]||h[++i]!==h[s+1])){s+=2,i++;do;while(h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&h[++s]===h[++i]&&s<w);if(r=Wr-(w-s),s=w-Wr,r>l){if(e.match_start=n,l=r,r>=o)break;m=h[s+l-1],A=h[s+l]}}while((n=v[n&f])>u&&--t!==0);return l<=e.lookahead?l:e.lookahead},ao=e=>{const n=e.w_size;let t,s,i;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-Hi)&&(e.window.set(e.window.subarray(n,n+n-s),0),e.match_start-=n,e.strstart-=n,e.block_start-=n,e.insert>e.strstart&&(e.insert=e.strstart),U5(e),s+=n),e.strm.avail_in===0)break;if(t=au(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=t,e.legacy_hash){if(e.lookahead+e.insert>=Ht)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Eu(e,e.ins_h,e.window[i+1]);e.insert&&(ja(e,i),i++,e.insert--,!(e.lookahead+e.insert<Ht)););}else if(e.lookahead+e.insert>Ht)for(i=e.strstart-e.insert;e.insert&&(ja(e,i),i++,e.insert--,!(e.lookahead+e.insert<=Ht)););}while(e.lookahead<Hi&&e.strm.avail_in!==0)},fp=(e,n)=>{let t=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,s,i,r,l=0,o=e.strm.avail_in;do{if(s=65535,r=e.bi_valid+42>>3,e.strm.avail_out<r||(r=e.strm.avail_out-r,i=e.strstart-e.block_start,s>i+e.strm.avail_in&&(s=i+e.strm.avail_in),s>r&&(s=r),s<t&&(s===0&&n!==ci||n===Gr||s!==i+e.strm.avail_in)))break;l=n===ci&&s===i+e.strm.avail_in?1:0,eu(e,0,0,l),e.pending_buf[e.pending-4]=s,e.pending_buf[e.pending-3]=s>>8,e.pending_buf[e.pending-2]=~s,e.pending_buf[e.pending-1]=~s>>8,Xs(e.strm),i&&(i>s&&(i=s),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,s-=i),s&&(au(e.strm,e.strm.output,e.strm.next_out,s),e.strm.next_out+=s,e.strm.avail_out-=s,e.strm.total_out+=s)}while(l===0);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),l?ho:n!==Gr&&n!==ci&&e.strm.avail_in===0&&e.strstart===e.block_start?uo:(r=e.window_size-e.strstart,e.strm.avail_in>r&&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++,r+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),r>e.strm.avail_in&&(r=e.strm.avail_in),r&&(au(e.strm,e.window,e.strstart,r),e.strstart+=r,e.insert+=r>e.w_size-e.insert?e.w_size-e.insert:r),e.high_water<e.strstart&&(e.high_water=e.strstart),r=e.bi_valid+42>>3,r=e.pending_buf_size-r>65535?65535:e.pending_buf_size-r,t=r>
vendor: 11,703 bytes, line 19
19e.w_size?e.w_size:r,i=e.strstart-e.block_start,(i>=t||(i||n===ci)&&n!==Gr&&e.strm.avail_in===0&&i<=r)&&(s=i>r?r:i,l=n===ci&&e.strm.avail_in===0&&s===i?1:0,eu(e,e.block_start,s,l),e.block_start+=s,Xs(e.strm)),l?Na:Cs)},md=(e,n)=>{let t,s;for(;;){if(e.lookahead<Hi){if(ao(e),e.lookahead<Hi&&n===Gr)return Cs;if(e.lookahead===0)break}if(t=0,e.lookahead>=Ht&&(t=ja(e,e.strstart)),t!==0&&e.strstart-t<=e.w_size-Hi&&(e.match_length=hp(e,t)),e.match_length>=Ht)if(s=Hr(e,e.strstart-e.match_start,e.match_length-Ht),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ht){e.match_length--;do e.strstart++,t=ja(e,e.strstart);while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=Eu(e,e.ins_h,e.window[e.strstart+1]));else s=Hr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(s&&(ti(e,!1),e.strm.avail_out===0))return Cs}return e.insert=e.strstart<Ht-1?e.strstart:Ht-1,n===ci?(ti(e,!0),e.strm.avail_out===0?Na:ho):e.sym_next&&(ti(e,!1),e.strm.avail_out===0)?Cs:uo},Ua=(e,n)=>{let t,s,i;for(;;){if(e.lookahead<Hi){if(ao(e),e.lookahead<Hi&&n===Gr)return Cs;if(e.lookahead===0)break}if(t=0,e.lookahead>=Ht&&(t=ja(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Ht-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-Hi&&(e.match_length=hp(e,t),e.match_length<=5&&(e.strategy===S5||e.match_length===Ht&&e.strstart-e.match_start>4096)&&(e.match_length=Ht-1)),e.prev_length>=Ht&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Ht,s=Hr(e,e.strstart-1-e.prev_match,e.prev_length-Ht),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(t=ja(e,e.strstart));while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Ht-1,e.strstart++,s&&(ti(e,!1),e.strm.avail_out===0))return Cs}else if(e.match_available){if(s=Hr(e,0,e.window[e.strstart-1]),s&&ti(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Cs}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(s=Hr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Ht-1?e.strstart:Ht-1,n===ci?(ti(e,!0),e.strm.avail_out===0?Na:ho):e.sym_next&&(ti(e,!1),e.strm.avail_out===0)?Cs:uo},V5=(e,n)=>{let t,s,i,r;const l=e.window;for(;;){if(e.lookahead<=Wr){if(ao(e),e.lookahead<=Wr&&n===Gr)return Cs;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Ht&&e.strstart>0&&(i=e.strstart-1,s=l[i],s===l[++i]&&s===l[++i]&&s===l[++i])){r=e.strstart+Wr;do;while(s===l[++i]&&s===l[++i]&&s===l[++i]&&s===l[++i]&&s===l[++i]&&s===l[++i]&&s===l[++i]&&s===l[++i]&&i<r);e.match_length=Wr-(r-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Ht?(t=Hr(e,1,e.match_length-Ht),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=Hr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(ti(e,!1),e.strm.avail_out===0))return Cs}return e.insert=0,n===ci?(ti(e,!0),e.strm.avail_out===0?Na:ho):e.sym_next&&(ti(e,!1),e.strm.avail_out===0)?Cs:uo},H5=(e,n)=>{let t;for(;;){if(e.lookahead===0&&(ao(e),e.lookahead===0)){if(n===Gr)return Cs;break}if(e.match_length=0,t=Hr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(ti(e,!1),e.strm.avail_out===0))return Cs}return e.insert=0,n===ci?(ti(e,!0),e.strm.avail_out===0?Na:ho):e.sym_next&&(ti(e,!1),e.strm.avail_out===0)?Cs:uo};function zi(e,n,t,s,i){this.good_length=e,this.max_lazy=n,this.nice_length=t,this.max_chain=s,this.func=i}const Uo=[new zi(0,0,0,0,fp),new zi(4,4,8,4,md),new zi(4,5,16,8,md),new zi(4,6,32,32,md),new zi(4,4,16,16,Ua),new zi(8,16,32,32,Ua),new zi(8,16,128,128,Ua),new zi(8,32,128,256,Ua),new zi(32,128,258,1024,Ua),new zi(32,258,258,4096,Ua)],G5=e=>{e.window_size=2*e.w_size,qr(e.head),e.max_lazy_match=Uo[e.level].max_lazy,e.good_match=Uo[e.level].good_length,e.nice_match=Uo[e.level].nice_length,e.max_chain_length=Uo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Ht-1,e.match_available=0,e.ins_h=0};function $5(){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=Ec,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.legacy_hash=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(I5*2),this.dyn_dtree=new Uint16Array((2*M5+1)*2),this.bl_tree=new Uint16Array((2*R5+1)*2),qr(this.dyn_ltree),qr(this.dyn_dtree),qr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(B5+1),this.heap=new Uint16Array(2*tu+1),qr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*tu+1),qr(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 ul=e=>{if(!e)return 1;const n=e.state;return!n||n.strm!==e||n.status!==ro&&n.status!==Lu&&n.status!==nu&&n.status!==su&&n.status!==iu&&n.status!==ru&&n.status!==xa&&n.status!==Wo?1:0},mp=e=>{if(ul(e))return va(e,Vi);e.total_in=e.total_out=0,e.data_type=C5;const n=e.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?Lu:n.wrap?ro:xa,e.adler=n.wrap===2?0:1,n.last_flush=-2,w5(n),cs},pp=e=>{const n=mp(e);return n===cs&&G5(e.state),n},Z5=(e,n)=>ul(e)||e.state.wrap!==2?Vi:(e.state.gzhead=n,cs),gp=(e,n,t,s,i,r,l)=>{if(!e)return Vi;let o=1;if(n===A5&&(n=6),s<0?(o=0,s=-s):s>15&&(o=2,s-=16),i<1||i>D5||t!==Ec||s<8||s>15||n<0||n>9||r<0||r>E5||s===8&&o!==1)return va(e,Vi);s===8&&(s=9);const u=new $5;return e.state=u,u.strm=e,u.status=ro,u.wrap=o,u.gzhead=null,u.w_bits=s,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.legacy_hash=l?1:0,u.hash_bits=i+7,!u.legacy_hash&&u.hash_bits<15&&(u.hash_bits=15),u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+Ht-1)/Ht),u.window=new Uint8Array(u.w_size*2),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=(u.lit_bufsize-1)*3,u.level=n,u.strategy=r,u.method=t,pp(e)},Y5=(e,n)=>gp(e,n,Ec,T5,z5,P5),K5=(e,n)=>{if(ul(e)||n>Zh||n<0)return e?va(e,Vi):Vi;const t=e.state;if(!e.output||e.avail_in!==0&&!e.input||t.status===Wo&&n!==ci)return va(e,e.avail_out===0?fd:Vi);const s=t.last_flush;if(t.last_flush=n,t.pending!==0){if(Xs(e),e.avail_out===0)return t.last_flush=-1,cs}else if(e.avail_in===0&&Kh(n)<=Kh(s)&&n!==ci)return va(e,fd);if(t.status===Wo&&e.avail_in!==0)return va(e,fd);if(t.status===ro&&t.wrap===0&&(t.status=xa),t.status===ro){let i=Ec+(t.w_bits-8<<4)<<8,r=-1;if(t.strategy>=Bl||t.level<2?r=0:t.level<6?r=1:t.level===6?r=2:r=3,i|=r<<6,t.strstart!==0&&(i|=q5),i+=31-i%31,Oo(t,i),t.strstart!==0&&(Oo(t,e.adler>>>16),Oo(t,e.adler&65535)),e.adler=1,t.status=xa,Xs(e),t.pending!==0)return t.last_flush=-1,cs}if(t.status===Lu){if(e.adler=0,$t(t,31),$t(t,139),$t(t,8),t.gzhead)$t(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),$t(t,t.gzhead.time&255),$t(t,t.gzhead.time>>8&255),$t(t,t.gzhead.time>>16&255),$t(t,t.gzhead.time>>24&255),$t(t,t.level===9?2:t.strategy>=Bl||t.level<2?4:0),$t(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&($t(t,t.gzhead.extra.length&255),$t(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(e.adler=ts(e.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=nu;else if($t(t,0),$t(t,0),$t(t,0),$t(t,0),$t(t,0),$t(t,t.level===9?2:t.strategy>=Bl||t.level<2?4:0),$t(t,W5),t.status=xa,Xs(e),t.pending!==0)return t.last_flush=-1,cs}if(t.status===nu){if(t.gzhead.extra){let i=t.pending,r=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+r>t.pending_buf_size;){let o=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+o),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>i&&(e.adler=ts(e.adler,t.pending_buf,t.pending-i,i)),t.gzindex+=o,Xs(e),t.pending!==0)return t.last_flush=-1,cs;i=0,r-=o}let l=new Uint8Array(t.gzhead.extra);t.pending_buf.set(l.subarray(t.gzindex,t.gzindex+r),t.pending),t.pending+=r,t.gzhead.hcrc&&t.pending>i&&(e.adler=ts(e.adler,t.pending_buf,t.pending-i,i)),t.gzindex=0}t.status=su}if(t.status===su){if(t.gzhead.name){let i=t.pending,r;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>i&&(e.adler=ts(e.adler,t.pending_buf,t.pending-i,i)),Xs(e),t.pending!==0)return t.last_flush=-1,cs;i=0}t.gzindex<t.gzhead.name.length?r=t.gzhead.name.charCodeAt(t.gzindex++)&255:r=0,$t(t,r)}while(r!==0);t.gzhead.hcrc&&t.pending>i&&(e.adler=ts(e.adler,t.pending_buf,t.pending-i,i)),t.gzindex=0}t.status=iu}if(t.status===iu){if(t.gzhead.comment){let i=t.pending,r;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>i&&(e.adler=ts(e.adler,t.pending_buf,t.pending-i,i)),Xs(e),t.pending!==0)return t.last_flush=-1,cs;i=0}t.gzindex<t.gzhead.comment.length?r=t.gzhead.comment.charCodeAt(t.gzindex++)&255:r=0,$t(t,r)}while(r!==0);t.gzhead.hcrc&&t.pending>i&&(e.adler=ts(e.adler,t.pending_buf,t.pending-i,i))}t.status=ru}if(t.status===ru){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(Xs(e),t.pending!==0))return t.last_flush=-1,cs;$t(t,e.adler&255),$t(t,e.adler>>8&255),e.adler=0}if(t.status=xa,Xs(e),t.pending!==0)return t.last_flush=-1,cs}if(e.avail_in!==0||t.lookahead!==0||n!==Gr&&t.status!==Wo){let i=t.level===0?fp(t,n):t.strategy===Bl?H5(t,n):t.strategy===L5?V5(t,n):Uo[t.level].func(t,n);if((i===Na||i===ho)&&(t.status=Wo),i===Cs||i===Na)return e.avail_out===0&&(t.last_flush=-1),cs;if(i===uo&&(n===N5?_5(t):n!==Zh&&(eu(t,0,0,!1),n===j5&&(qr(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),Xs(e),e.avail_out===0))return t.last_flush=-1,cs}return n!==ci?cs:t.wrap<=0?Yh:(t.wrap===2?($t(t,e.adler&255),$t(t,e.adler>>8&255),$t(t,e.adler>>16&255),$t(t,e.adler>>24&255),$t(t,e.total_in&255),$t(t,e.total_in>>8&255),$t(t,e.total_in>>16&255),$t(t,e.total_in>>24&255)):(Oo(t,e.adler>>>16),Oo(t,e.adler&65535)),Xs(e),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?cs:Yh)},J5=e=>{if(ul(e))return Vi;const n=e.state.status;return e.state=null,n===xa?va(e,k5):cs},X5=(e,n)=>{let t=n.length;if(ul(e))return Vi;const s=e.state,i=s.wrap;if(i===2||i===1&&s.status!==ro||s.lookahead)return Vi;if(i===1&&(e.adler=rl(e.adler,n,t,0)),s.wrap=0,t>=s.w_size){i===0&&(qr(s.head),s.strstart=0,s.block_start=0,s.insert=0);let u=new Uint8Array(s.w_size);u.set(n.subarray(t-s.w_size,t),0),n=u,t=s.w_size}const r=e.avail_in,l=e.next_in,o=e.input;for(e.avail_in=t,e.next_in=0,e.input=n,ao(s);s.lookahead>=Ht;){let u=s.strstart,h=s.lookahead-(Ht-1);do ja(s,u),u++;while(--h);s.strstart=u,s.lookahead=Ht-1,ao(s)}return s.strstart+=s.lookahead,s.block_start=s.strstart,s.insert=s.lookahead,s.lookahead=0,s.match_length=s.prev_length=Ht-1,s.match_available=0,e.next_in=l,e.input=o,e.avail_in=r,s.wrap=i,cs};var Q5=Y5,ex=gp,tx=pp,nx=mp,sx=Z5,ix=K5,rx=J5,ax=X5,ox="pako deflate (from Nodeca project)",Go={deflateInit:Q5,deflateInit2:ex,deflateReset:tx,deflateResetKeep:nx,deflateSetHeader:sx,deflate:ix,deflateEnd:rx,deflateSetDictionary:ax,deflateInfo:ox};const lx=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var cx=function(e){const n=Array.prototype.slice.call(arguments,1
vendor: 5,014 bytes, line 19
19);for(;n.length;){const t=n.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const s in t)lx(t,s)&&(e[s]=t[s])}}return e},dx=e=>{let n=0;for(let s=0,i=e.length;s<i;s++)n+=e[s].length;const t=new Uint8Array(n);for(let s=0,i=0,r=e.length;s<r;s++){let l=e[s];t.set(l,i),i+=l.length}return t},Pc={assign:cx,flattenChunks:dx};let xp=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{xp=!1}const al=new Uint8Array(256);for(let e=0;e<256;e++)al[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;al[254]=al[255]=1;var ux=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let n,t,s,i,r,l=e.length,o=0;for(i=0;i<l;i++)t=e.charCodeAt(i),(t&64512)===55296&&i+1<l&&(s=e.charCodeAt(i+1),(s&64512)===56320&&(t=65536+(t-55296<<10)+(s-56320),i++)),o+=t<128?1:t<2048?2:t<65536?3:4;for(n=new Uint8Array(o),r=0,i=0;r<o;i++)t=e.charCodeAt(i),(t&64512)===55296&&i+1<l&&(s=e.charCodeAt(i+1),(s&64512)===56320&&(t=65536+(t-55296<<10)+(s-56320),i++)),t<128?n[r++]=t:t<2048?(n[r++]=192|t>>>6,n[r++]=128|t&63):t<65536?(n[r++]=224|t>>>12,n[r++]=128|t>>>6&63,n[r++]=128|t&63):(n[r++]=240|t>>>18,n[r++]=128|t>>>12&63,n[r++]=128|t>>>6&63,n[r++]=128|t&63);return n};const hx=(e,n)=>{if(n<65534&&e.subarray&&xp)return String.fromCharCode.apply(null,e.length===n?e:e.subarray(0,n));let t="";for(let s=0;s<n;s++)t+=String.fromCharCode(e[s]);return t};var fx=(e,n)=>{const t=n||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,n));let s,i;const r=new Array(t*2);for(i=0,s=0;s<t;){let l=e[s++];if(l<128){r[i++]=l;continue}let o=al[l];if(o>4){r[i++]=65533,s+=o-1;continue}for(l&=o===2?31:o===3?15:7;o>1&&s<t;)l=l<<6|e[s++]&63,o--;if(o>1){r[i++]=65533;continue}l<65536?r[i++]=l:(l-=65536,r[i++]=55296|l>>10&1023,r[i++]=56320|l&1023)}return hx(r,i)},mx=(e,n)=>{n=n||e.length,n>e.length&&(n=e.length);let t=n-1;for(;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?n:t+al[e[t]]>n?t:n},ol={string2buf:ux,buf2string:fx,utf8border:mx};function px(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var vp=px;const bp=Object.prototype.toString,{Z_NO_FLUSH:gx,Z_SYNC_FLUSH:xx,Z_FULL_FLUSH:vx,Z_FINISH:bx,Z_OK:_c,Z_STREAM_END:wx,Z_DEFAULT_COMPRESSION:yx,Z_DEFAULT_STRATEGY:_x,Z_DEFLATED:Nx}=dl,jx={level:yx,method:Nx,chunkSize:16384,windowBits:15,memLevel:8,strategy:_x,legacyHash:!0};function Pu(e){this.options=Pc.assign({},jx,e||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new vp,this.strm.avail_out=0;let t=Go.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy,n.legacyHash);if(t!==_c)throw new Error(io[t]);if(n.header&&Go.deflateSetHeader(this.strm,n.header),n.dictionary){let s;if(typeof n.dictionary=="string"?s=ol.string2buf(n.dictionary):bp.call(n.dictionary)==="[object ArrayBuffer]"?s=new Uint8Array(n.dictionary):s=n.dictionary,t=Go.deflateSetDictionary(this.strm,s),t!==_c)throw new Error(io[t]);this._dict_set=!0}}Pu.prototype.push=function(e,n){const t=this.strm,s=this.options.chunkSize;let i,r;if(this.ended)return!1;for(n===~~n?r=n:r=n===!0?bx:gx,typeof e=="string"?t.input=ol.string2buf(e):bp.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(s),t.next_out=0,t.avail_out=s),(r===xx||r===vx)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(i=Go.deflate(t,r),i===wx)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),i=Go.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===_c;if(t.avail_out===0){this.onData(t.output);continue}if(r>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0};Pu.prototype.onData=function(e){this.chunks.push(e)};Pu.prototype.onEnd=function(e){e===_c&&(this.result=Pc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const ql=16209,kx=16191;var Ax=function(n,t){let s,i,r,l,o,u,h,f,v,w,m,A,y,P,k,G,I,R,Q,me,oe,K,H,ie;const j=n.state;s=n.next_in,H=n.input,i=s+(n.avail_in-5),r=n.next_out,ie=n.output,l=r-(t-n.avail_out),o=r+(n.avail_out-257),u=j.dmax,h=j.wsize,f=j.whave,v=j.wnext,w=j.window,m=j.hold,A=j.bits,y=j.lencode,P=j.distcode,k=(1<<j.lenbits)-1,G=(1<<j.distbits)-1;e:do{A<15&&(m+=H[s++]<<A,A+=8,m+=H[s++]<<A,A+=8),I=y[m&k];t:for(;;){if(R=I>>>24,m>>>=R,A-=R,R=I>>>16&255,R===0)ie[r++]=I&65535;else if(R&16){Q=I&65535,R&=15,R&&(A<R&&(m+=H[s++]<<A,A+=8),Q+=m&(1<<R)-1,m>>>=R,A-=R),A<15&&(m+=H[s++]<<A,A+=8,m+=H[s++]<<A,A+=8),I=P[m&G];n:for(;;){if(R=I>>>24,m>>>=R,A-=R,R=I>>>16&255,R&16){if(me=I&65535,R&=15,A<R&&(m+=H[s++]<<A,A+=8,A<R&&(m+=H[s++]<<A,A+=8)),me+=m&(1<<R)-1,me>
vendor: 15,264 bytes, line 19
19u){n.msg="invalid distance too far back",j.mode=ql;break e}if(m>>>=R,A-=R,R=r-l,me>R){if(R=me-R,R>f&&j.sane){n.msg="invalid distance too far back",j.mode=ql;break e}if(oe=0,K=w,v===0){if(oe+=h-R,R<Q){Q-=R;do ie[r++]=w[oe++];while(--R);oe=r-me,K=ie}}else if(v<R){if(oe+=h+v-R,R-=v,R<Q){Q-=R;do ie[r++]=w[oe++];while(--R);if(oe=0,v<Q){R=v,Q-=R;do ie[r++]=w[oe++];while(--R);oe=r-me,K=ie}}}else if(oe+=v-R,R<Q){Q-=R;do ie[r++]=w[oe++];while(--R);oe=r-me,K=ie}for(;Q>2;)ie[r++]=K[oe++],ie[r++]=K[oe++],ie[r++]=K[oe++],Q-=3;Q&&(ie[r++]=K[oe++],Q>1&&(ie[r++]=K[oe++]))}else{oe=r-me;do ie[r++]=ie[oe++],ie[r++]=ie[oe++],ie[r++]=ie[oe++],Q-=3;while(Q>2);Q&&(ie[r++]=ie[oe++],Q>1&&(ie[r++]=ie[oe++]))}}else if(R&64){n.msg="invalid distance code",j.mode=ql;break e}else{I=P[(I&65535)+(m&(1<<R)-1)];continue n}break}}else if(R&64)if(R&32){j.mode=kx;break e}else{n.msg="invalid literal/length code",j.mode=ql;break e}else{I=y[(I&65535)+(m&(1<<R)-1)];continue t}break}}while(s<i&&r<o);Q=A>>3,s-=Q,A-=Q<<3,m&=(1<<A)-1,n.next_in=s,n.next_out=r,n.avail_in=s<i?5+(i-s):5-(s-i),n.avail_out=r<o?257+(o-r):257-(r-o),j.hold=m,j.bits=A};const Va=15,Jh=852,Xh=592,Qh=0,pd=1,ef=2,Sx=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]),Lx=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,199,75]),Ex=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]),Px=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]),Cx=(e,n,t,s,i,r,l,o)=>{const u=o.bits;let h=0,f=0,v=0,w=0,m=0,A=0,y=0,P=0,k=0,G=0,I,R,Q,me,oe,K=null,H;const ie=new Uint16Array(Va+1),j=new Uint16Array(Va+1);let z=null,C,$,q;for(h=0;h<=Va;h++)ie[h]=0;for(f=0;f<s;f++)ie[n[t+f]]++;for(m=u,w=Va;w>=1&&ie[w]===0;w--);if(m>w&&(m=w),w===0)return i[r++]=1<<24|64<<16|0,i[r++]=1<<24|64<<16|0,o.bits=1,0;for(v=1;v<w&&ie[v]===0;v++);for(m<v&&(m=v),P=1,h=1;h<=Va;h++)if(P<<=1,P-=ie[h],P<0)return-1;if(P>0&&(e===Qh||w!==1))return-1;for(j[1]=0,h=1;h<Va;h++)j[h+1]=j[h]+ie[h];for(f=0;f<s;f++)n[t+f]!==0&&(l[j[n[t+f]]++]=f);if(e===Qh?(K=z=l,H=20):e===pd?(K=Sx,z=Lx,H=257):(K=Ex,z=Px,H=0),G=0,f=0,h=v,oe=r,A=m,y=0,Q=-1,k=1<<m,me=k-1,e===pd&&k>Jh||e===ef&&k>Xh)return 1;for(;;){C=h-y,l[f]+1<H?($=0,q=l[f]):l[f]>=H?($=z[l[f]-H],q=K[l[f]-H]):($=96,q=0),I=1<<h-y,R=1<<A,v=R;do R-=I,i[oe+(G>>y)+R]=C<<24|$<<16|q|0;while(R!==0);for(I=1<<h-1;G&I;)I>>=1;if(I!==0?(G&=I-1,G+=I):G=0,f++,--ie[h]===0){if(h===w)break;h=n[t+l[f]]}if(h>m&&(G&me)!==Q){for(y===0&&(y=m),oe+=v,A=h-y,P=1<<A;A+y<w&&(P-=ie[A+y],!(P<=0));)A++,P<<=1;if(k+=1<<A,e===pd&&k>Jh||e===ef&&k>Xh)return 1;Q=G&me,i[Q]=m<<24|A<<16|oe-r|0}}return G!==0&&(i[oe+G]=h-y<<24|64<<16|0),o.bits=m,0};var $o=Cx;const Dx=0,wp=1,yp=2,{Z_FINISH:tf,Z_BLOCK:Tx,Z_TREES:Wl,Z_OK:ka,Z_STREAM_END:zx,Z_NEED_DICT:Fx,Z_STREAM_ERROR:fi,Z_DATA_ERROR:_p,Z_MEM_ERROR:Np,Z_BUF_ERROR:Ox,Z_DEFLATED:nf}=dl,Cc=16180,sf=16181,rf=16182,af=16183,of=16184,lf=16185,cf=16186,df=16187,uf=16188,hf=16189,Nc=16190,lr=16191,gd=16192,ff=16193,xd=16194,mf=16195,pf=16196,gf=16197,xf=16198,Ul=16199,Vl=16200,vf=16201,bf=16202,wf=16203,yf=16204,_f=16205,vd=16206,Nf=16207,jf=16208,_n=16209,jp=16210,kp=16211,Mx=852,Rx=592,Ix=15,Bx=Ix,kf=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function qx(){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 Sa=e=>{if(!e)return 1;const n=e.state;return!n||n.strm!==e||n.mode<Cc||n.mode>kp?1:0},Ap=e=>{if(Sa(e))return fi;const n=e.state;return e.total_in=e.total_out=n.total=0,e.msg="",n.wrap&&(e.adler=n.wrap&1),n.mode=Cc,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(Mx),n.distcode=n.distdyn=new Int32Array(Rx),n.sane=1,n.back=-1,ka},Sp=e=>{if(Sa(e))return fi;const n=e.state;return n.wsize=0,n.whave=0,n.wnext=0,Ap(e)},Lp=(e,n)=>{let t;if(Sa(e))return fi;const s=e.state;return n<0?(t=0,n=-n):(t=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?fi:(s.window!==null&&s.wbits!==n&&(s.window=null),s.wrap=t,s.wbits=n,Sp(e))},Ep=(e,n)=>{if(!e)return fi;const t=new qx;e.state=t,t.strm=e,t.window=null,t.mode=Cc;const s=Lp(e,n);return s!==ka&&(e.state=null),s},Wx=e=>Ep(e,Bx);let Af=!0,bd,wd;const Ux=e=>{if(Af){bd=new Int32Array(512),wd=new Int32Array(32);let n=0;for(;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for($o(wp,e.lens,0,288,bd,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;$o(yp,e.lens,0,32,wd,0,e.work,{bits:5}),Af=!1}e.lencode=bd,e.lenbits=9,e.distcode=wd,e.distbits=5},Pp=(e,n,t,s)=>{let i;const r=e.state;return r.window===null&&(r.window=new Uint8Array(1<<r.wbits)),r.wsize===0&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0),s>=r.wsize?(r.window.set(n.subarray(t-r.wsize,t),0),r.wnext=0,r.whave=r.wsize):(i=r.wsize-r.wnext,i>s&&(i=s),r.window.set(n.subarray(t-s,t-s+i),r.wnext),s-=i,s?(r.window.set(n.subarray(t-s,t),0),r.wnext=s,r.whave=r.wsize):(r.wnext+=i,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=i))),0},Vx=(e,n)=>{let t,s,i,r,l,o,u,h,f,v,w,m,A,y,P=0,k,G,I,R,Q,me,oe,K;const H=new Uint8Array(4);let ie,j;const z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Sa(e)||!e.output||!e.input&&e.avail_in!==0)return fi;t=e.state,t.mode===lr&&(t.mode=gd),l=e.next_out,i=e.output,u=e.avail_out,r=e.next_in,s=e.input,o=e.avail_in,h=t.hold,f=t.bits,v=o,w=u,K=ka;e:for(;;)switch(t.mode){case Cc:if(t.wrap===0){t.mode=gd;break}for(;f<16;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if(t.wrap&2&&h===35615){t.wbits===0&&(t.wbits=15),t.check=0,H[0]=h&255,H[1]=h>>>8&255,t.check=ts(t.check,H,2,0),h=0,f=0,t.mode=sf;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((h&255)<<8)+(h>>8))%31){e.msg="incorrect header check",t.mode=_n;break}if((h&15)!==nf){e.msg="unknown compression method",t.mode=_n;break}if(h>>>=4,f-=4,oe=(h&15)+8,t.wbits===0&&(t.wbits=oe),oe>15||oe>t.wbits){e.msg="invalid window size",t.mode=_n;break}t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=h&512?hf:lr,h=0,f=0;break;case sf:for(;f<16;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if(t.flags=h,(t.flags&255)!==nf){e.msg="unknown compression method",t.mode=_n;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=_n;break}t.head&&(t.head.text=h>>8&1),t.flags&512&&t.wrap&4&&(H[0]=h&255,H[1]=h>>>8&255,t.check=ts(t.check,H,2,0)),h=0,f=0,t.mode=rf;case rf:for(;f<32;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}t.head&&(t.head.time=h),t.flags&512&&t.wrap&4&&(H[0]=h&255,H[1]=h>>>8&255,H[2]=h>>>16&255,H[3]=h>>>24&255,t.check=ts(t.check,H,4,0)),h=0,f=0,t.mode=af;case af:for(;f<16;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}t.head&&(t.head.xflags=h&255,t.head.os=h>>8),t.flags&512&&t.wrap&4&&(H[0]=h&255,H[1]=h>>>8&255,t.check=ts(t.check,H,2,0)),h=0,f=0,t.mode=of;case of:if(t.flags&1024){for(;f<16;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}t.length=h,t.head&&(t.head.extra_len=h),t.flags&512&&t.wrap&4&&(H[0]=h&255,H[1]=h>>>8&255,t.check=ts(t.check,H,2,0)),h=0,f=0}else t.head&&(t.head.extra=null);t.mode=lf;case lf:if(t.flags&1024&&(m=t.length,m>o&&(m=o),m&&(t.head&&(oe=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(s.subarray(r,r+m),oe)),t.flags&512&&t.wrap&4&&(t.check=ts(t.check,s,m,r)),o-=m,r+=m,t.length-=m),t.length))break e;t.length=0,t.mode=cf;case cf:if(t.flags&2048){if(o===0)break e;m=0;do oe=s[r+m++],t.head&&oe&&t.length<65536&&(t.head.name+=String.fromCharCode(oe));while(oe&&m<o);if(t.flags&512&&t.wrap&4&&(t.check=ts(t.check,s,m,r)),o-=m,r+=m,oe)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=df;case df:if(t.flags&4096){if(o===0)break e;m=0;do oe=s[r+m++],t.head&&oe&&t.length<65536&&(t.head.comment+=String.fromCharCode(oe));while(oe&&m<o);if(t.flags&512&&t.wrap&4&&(t.check=ts(t.check,s,m,r)),o-=m,r+=m,oe)break e}else t.head&&(t.head.comment=null);t.mode=uf;case uf:if(t.flags&512){for(;f<16;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if(t.wrap&4&&h!==(t.check&65535)){e.msg="header crc mismatch",t.mode=_n;break}h=0,f=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=lr;break;case hf:for(;f<32;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}e.adler=t.check=kf(h),h=0,f=0,t.mode=Nc;case Nc:if(t.havedict===0)return e.next_out=l,e.avail_out=u,e.next_in=r,e.avail_in=o,t.hold=h,t.bits=f,Fx;e.adler=t.check=1,t.mode=lr;case lr:if(n===Tx||n===Wl)break e;case gd:if(t.last){h>>>=f&7,f-=f&7,t.mode=vd;break}for(;f<3;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}switch(t.last=h&1,h>>>=1,f-=1,h&3){case 0:t.mode=ff;break;case 1:if(Ux(t),t.mode=Ul,n===Wl){h>>>=2,f-=2;break e}break;case 2:t.mode=pf;break;case 3:e.msg="invalid block type",t.mode=_n}h>>>=2,f-=2;break;case ff:for(h>>>=f&7,f-=f&7;f<32;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if((h&65535)!==(h>>>16^65535)){e.msg="invalid stored block lengths",t.mode=_n;break}if(t.length=h&65535,h=0,f=0,t.mode=xd,n===Wl)break e;case xd:t.mode=mf;case mf:if(m=t.length,m){if(m>o&&(m=o),m>u&&(m=u),m===0)break e;i.set(s.subarray(r,r+m),l),o-=m,r+=m,u-=m,l+=m,t.length-=m;break}t.mode=lr;break;case pf:for(;f<14;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if(t.nlen=(h&31)+257,h>>>=5,f-=5,t.ndist=(h&31)+1,h>>>=5,f-=5,t.ncode=(h&15)+4,h>>>=4,f-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=_n;break}t.have=0,t.mode=gf;case gf:for(;t.have<t.ncode;){for(;f<3;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}t.lens[z[t.have++]]=h&7,h>>>=3,f-=3}for(;t.have<19;)t.lens[z[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,ie={bits:t.lenbits},K=$o(Dx,t.lens,0,19,t.lencode,0,t.work,ie),t.lenbits=ie.bits,K){e.msg="invalid code lengths set",t.mode=_n;break}t.have=0,t.mode=xf;case xf:for(;t.have<t.nlen+t.ndist;){for(;P=t.lencode[h&(1<<t.lenbits)-1],k=P>>>24,G=P>>>16&255,I=P&65535,!(k<=f);){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if(I<16)h>>>=k,f-=k,t.lens[t.have++]=I;else{if(I===16){for(j=k+2;f<j;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if(h>>>=k,f-=k,t.have===0){e.msg="invalid bit length repeat",t.mode=_n;break}oe=t.lens[t.have-1],m=3+(h&3),h>>>=2,f-=2}else if(I===17){for(j=k+3;f<j;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}h>>>=k,f-=k,oe=0,m=3+(h&7),h>>>=3,f-=3}else{for(j=k+7;f<j;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}h>>>=k,f-=k,oe=0,m=11+(h&127),h>>>=7,f-=7}if(t.have+m>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=_n;break}for(;m--;)t.lens[t.have++]=oe}}if(t.mode===_n)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=_n;break}if(t.lenbits=9,ie={bits:t.lenbits},K=$o(wp,t.lens,0,t.nlen,t.lencode,0,t.work,ie),t.lenbits=ie.bits,K){e.msg="invalid literal/lengths set",t.mode=_n;break}if(t.distbits=6,t.distcode=t.distdyn,ie={bits:t.distbits},K=$o(yp,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,ie),t.distbits=ie.bits,K){e.msg="invalid distances set",t.mode=_n;break}if(t.mode=Ul,n===Wl)break e;case Ul:t.mode=Vl;case Vl:if(o>=6&&u>=258){e.next_out=l,e.avail_out=u,e.next_in=r,e.avail_in=o,t.hold=h,t.bits=f,Ax(e,w),l=e.next_out,i=e.output,u=e.avail_out,r=e.next_in,s=e.input,o=e.avail_in,h=t.hold,f=t.bits,t.mode===lr&&(t.back=-1);break}for(t.back=0;P=t.lencode[h&(1<<t.lenbits)-1],k=P>>>24,G=P>>>16&255,I=P&65535,!(k<=f);){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if(G&&!(G&240)){for(R=k,Q=G,me=I;P=t.lencode[me+((h&(1<<R+Q)-1)>>R)],k=P>>>24,G=P>>>16&255,I=P&65535,!(R+k<=f);){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}h>>>=R,f-=R,t.back+=R}if(h>>>=k,f-=k,t.back+=k,t.length=I,G===0){t.mode=_f;break}if(G&32){t.back=-1,t.mode=lr;break}if(G&64){e.msg="invalid literal/length code",t.mode=_n;break}t.extra=G&15,t.mode=vf;case vf:if(t.extra){for(j=t.extra;f<j;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}t.length+=h&(1<<t.extra)-1,h>>>=t.extra,f-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=bf;case bf:for(;P=t.distcode[h&(1<<t.distbits)-1],k=P>>>24,G=P>>>16&255,I=P&65535,!(k<=f);){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if(!(G&240)){for(R=k,Q=G,me=I;P=t.distcode[me+((h&(1<<R+Q)-1)>>R)],k=P>>>24,G=P>>>16&255,I=P&65535,!(R+k<=f);){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}h>>>=R,f-=R,t.back+=R}if(h>>>=k,f-=k,t.back+=k,G&64){e.msg="invalid distance code",t.mode=_n;break}t.offset=I,t.extra=G&15,t.mode=wf;case wf:if(t.extra){for(j=t.extra;f<j;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}t.offset+=h&(1<<t.extra)-1,h>>>=t.extra,f-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=_n;break}t.mode=yf;case yf:if(u===0)break e;if(m=w-u,t.offset>m){if(m=t.offset-m,m>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=_n;break}m>t.wnext?(m-=t.wnext,A=t.wsize-m):A=t.wnext-m,m>t.length&&(m=t.length),y=t.window}else y=i,A=l-t.offset,m=t.length;m>u&&(m=u),u-=m,t.length-=m;do i[l++]=y[A++];while(--m);t.length===0&&(t.mode=Vl);break;case _f:if(u===0)break e;i[l++]=t.length,u--,t.mode=Vl;break;case vd:if(t.wrap){for(;f<32;){if(o===0)break e;o--,h|=s[r++]<<f,f+=8}if(w-=u,e.total_out+=w,t.total+=w,t.wrap&4&&w&&(e.adler=t.check=t.flags?ts(t.check,i,w,l-w):rl(t.check,i,w,l-w)),w=u,t.wrap&4&&(t.flags?h:kf(h))!==t.check){e.msg="incorrect data check",t.mode=_n;break}h=0,f=0}t.mode=Nf;case Nf:if(t.wrap&&t.flags){for(;f<32;){if(o===0)break e;o--,h+=s[r++]<<f,f+=8}if(t.wrap&4&&h!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=_n;break}h=0,f=0}t.mode=jf;case jf:K=zx;break e;case _n:K=_p;break e;case jp:return Np;case kp:default:return fi}return e.next_out=l,e.avail_out=u,e.next_in=r,e.avail_in=o,t.hold=h,t.bits=f,(t.wsize||w!==e.avail_out&&t.mode<_n&&(t.mode<vd||n!==tf))&&Pp(e,e.output,e.next_out,w-e.avail_out),v-=e.avail_in,w-=e.avail_out,e.total_in+=v,e.total_out+=w,t.total+=w,t.wrap&4&&w&&(e.adler=t.check=t.flags?ts(t.check,i,w,e.next_out-w):rl(t.check,i,w,e.next_out-w)),e.data_type=t.bits+(t.last?64:0)+(t.mode===lr?128:0)+(t.mode===Ul||t.mode===xd?256:0),(v===0&&w===0||n===tf)&&K===ka&&(K=Ox),K},Hx=e=>{if(Sa(e))return fi;let n=e.state;return n.window&&(n.window=null),e.state=null,ka},Gx=(e,n)=>{if(Sa(e))return fi;const t=e.state;return t.wrap&2?(t.head=n,n.done=!1,ka):fi},$x=(e,n)=>{const t=n.length;let s,i,r;return Sa(e)||(s=e.state,s.wrap!==0&&s.mode!==Nc)?fi:s.mode===Nc&&(i=1,i=rl(i,n,t,0),i!==s.check)?_p:(r=Pp(e,n,t,t),r?(s.mode=jp,Np):(s.havedict=1,ka))};var Zx=Sp,Yx=Lp,Kx=Ap,Jx=Wx,Xx=Ep,Qx=Vx,ev=Hx,tv=Gx,nv=$x,sv="pako inflate (from Nodeca project)",Ri={inflateReset:Zx,inflateReset2:Yx,inflateResetKeep:Kx,inflateInit:Jx,inflateInit2:Xx,inflate:Qx,inflateEnd:ev,inflateGetHeader:tv,inflateSetDictionary:nv,inflateInfo:sv};function iv(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var rv=iv;const Cp=Object.prototype.toString,{Z_NO_FLUSH:av,Z_FINISH:Sf,Z_OK:Xa,Z_STREAM_END:yd,Z_NEED_DICT:_d,Z_STREAM_ERROR:ov,Z_DATA_ERROR:Lf,Z_MEM_ERROR:lv,Z_BUF_ER
vendor: 11,334 bytes, line 19
19ROR:Ef}=dl,cv={chunkSize:1024*64,windowBits:15,to:""};function hl(e){this.options=Pc.assign({},cv,e||{});const n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15||(n.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new vp,this.strm.avail_out=0;let t=Ri.inflateInit2(this.strm,n.windowBits);if(t!==Xa)throw new Error(io[t]);if(this.header=new rv,Ri.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=ol.string2buf(n.dictionary):Cp.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(t=Ri.inflateSetDictionary(this.strm,n.dictionary),t!==Xa)))throw new Error(io[t])}hl.prototype.push=function(e,n){const t=this.strm,s=this.options.chunkSize,i=this.options.dictionary;let r,l,o;if(this.ended)return!1;for(n===~~n?l=n:l=n===!0?Sf:av,Cp.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(s),t.next_out=0,t.avail_out=s),r=Ri.inflate(t,l),r===_d&&i&&(r=Ri.inflateSetDictionary(t,i),r===Xa?r=Ri.inflate(t,l):r===Lf&&(r=_d));t.avail_in>0&&r===yd&&t.state.wrap&2&&t.state.flags!==0&&t.input[t.next_in]!==0;)Ri.inflateReset(t),r=Ri.inflate(t,l);switch(r){case ov:case Lf:case _d:case lv:return this.onEnd(r),this.ended=!0,!1}if(o=t.avail_out,t.next_out&&(t.avail_out===0||r===yd||l>0))if(this.options.to==="string"){let u=ol.utf8border(t.output,t.next_out),h=t.next_out-u,f=ol.buf2string(t.output,u);t.next_out=h,t.avail_out=s-h,h&&t.output.set(t.output.subarray(u,u+h),0),this.onData(f)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out)),t.avail_out=0,t.next_out=0;if(!((r===Xa||r===Ef)&&o===0)){if(r===yd)return r=Ri.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(t.avail_in===0){if(l===Sf)return r=Ri.inflateEnd(this.strm),this.onEnd(r===Xa?Ef:r),this.ended=!0,!1;break}}}return!0};hl.prototype.onData=function(e){this.chunks.push(e)};hl.prototype.onEnd=function(e){e===Xa&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Pc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Cu(e,n){const t=new hl(n);if(t.push(e,!0),t.err)throw t.msg||io[t.err];return t.result}function dv(e,n){return n=n||{},n.raw=!0,Cu(e,n)}var uv=hl,hv=Cu,fv=dv,mv=Cu,pv=dl,gv={Inflate:uv,inflate:hv,inflateRaw:fv,ungzip:mv,constants:pv};const{Inflate:xv,inflate:vv,inflateRaw:o_,ungzip:l_}=gv;var Pf=xv,bv=vv;const Dp=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)n&1?n=3988292384^n>>>1:n=n>>>1;Dp[e]=n}const Cf=4294967295;function wv(e,n,t){let s=e;for(let i=0;i<t;i++)s=Dp[(s^n[i])&255]^s>>>8;return s}function yv(e,n){return(wv(Cf,e,n)^Cf)>>>0}function Df(e,n,t){const s=e.readUint32(),i=yv(new Uint8Array(e.buffer,e.byteOffset+e.offset-n-4,n),n);if(i!==s)throw new Error(`CRC mismatch for chunk ${t}. Expected ${s}, found ${i}`)}function Tp(e,n,t){for(let s=0;s<t;s++)n[s]=e[s]}function zp(e,n,t,s){let i=0;for(;i<s;i++)n[i]=e[i];for(;i<t;i++)n[i]=e[i]+n[i-s]&255}function Fp(e,n,t,s){let i=0;if(t.length===0)for(;i<s;i++)n[i]=e[i];else for(;i<s;i++)n[i]=e[i]+t[i]&255}function Op(e,n,t,s,i){let r=0;if(t.length===0){for(;r<i;r++)n[r]=e[r];for(;r<s;r++)n[r]=e[r]+(n[r-i]>>1)&255}else{for(;r<i;r++)n[r]=e[r]+(t[r]>>1)&255;for(;r<s;r++)n[r]=e[r]+(n[r-i]+t[r]>>1)&255}}function Mp(e,n,t,s,i){let r=0;if(t.length===0){for(;r<i;r++)n[r]=e[r];for(;r<s;r++)n[r]=e[r]+n[r-i]&255}else{for(;r<i;r++)n[r]=e[r]+t[r]&255;for(;r<s;r++)n[r]=e[r]+_v(n[r-i],t[r],t[r-i])&255}}function _v(e,n,t){const s=e+n-t,i=Math.abs(s-e),r=Math.abs(s-n),l=Math.abs(s-t);return i<=r&&i<=l?e:r<=l?n:t}function Nv(e,n,t,s,i,r){switch(e){case 0:Tp(n,t,i);break;case 1:zp(n,t,i,r);break;case 2:Fp(n,t,s,i);break;case 3:Op(n,t,s,i,r);break;case 4:Mp(n,t,s,i,r);break;default:throw new Error(`Unsupported filter: ${e}`)}}const jv=new Uint16Array([255]),kv=new Uint8Array(jv.buffer),Av=kv[0]===255;function Sv(e){const{data:n,width:t,height:s,channels:i,depth:r}=e,l=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],o=Math.ceil(r/8)*i,u=new Uint8Array(s*t*o);let h=0;for(let f=0;f<7;f++){const v=l[f],w=Math.ceil((t-v.x)/v.xStep),m=Math.ceil((s-v.y)/v.yStep);if(w<=0||m<=0)continue;const A=w*o,y=new Uint8Array(A);for(let P=0;P<m;P++){const k=n[h++],G=n.subarray(h,h+A);h+=A;const I=new Uint8Array(A);Nv(k,G,I,y,A,o),y.set(I);for(let R=0;R<w;R++){const Q=v.x+R*v.xStep,me=v.y+P*v.yStep;if(!(Q>=t||me>=s))for(let oe=0;oe<o;oe++)u[(me*t+Q)*o+oe]=I[R*o+oe]}}}if(r===16){const f=new Uint16Array(u.buffer);if(Av)for(let v=0;v<f.length;v++)f[v]=Lv(f[v]);return f}else return u}function Lv(e){return(e&255)<<8|e>>8&255}const Ev=new Uint16Array([255]),Pv=new Uint8Array(Ev.buffer),Cv=Pv[0]===255,Dv=new Uint8Array(0);function Tf(e){const{data:n,width:t,height:s,channels:i,depth:r}=e,l=Math.ceil(r/8)*i,o=Math.ceil(r/8*i*t),u=new Uint8Array(s*o);let h=Dv,f=0,v,w;for(let m=0;m<s;m++){switch(v=n.subarray(f+1,f+1+o),w=u.subarray(m*o,(m+1)*o),n[f]){case 0:Tp(v,w,o);break;case 1:zp(v,w,o,l);break;case 2:Fp(v,w,h,o);break;case 3:Op(v,w,h,o,l);break;case 4:Mp(v,w,h,o,l);break;default:throw new Error(`Unsupported filter: ${n[f]}`)}h=w,f+=o+1}if(r===16){const m=new Uint16Array(u.buffer);if(Cv)for(let A=0;A<m.length;A++)m[A]=Tv(m[A]);return m}else return u}function Tv(e){return(e&255)<<8|e>>8&255}const sc=Uint8Array.of(137,80,78,71,13,10,26,10);function zf(e){if(!zv(e.readBytes(sc.length)))throw new Error("wrong PNG signature")}function zv(e){if(e.length<sc.length)return!1;for(let n=0;n<sc.length;n++)if(e[n]!==sc[n])return!1;return!0}const Fv="tEXt",Ov=0,Rp=new TextDecoder("latin1");function Mv(e){if(Iv(e),e.length===0||e.length>79)throw new Error("keyword length must be between 1 and 79")}const Rv=/^[\u0000-\u00FF]*$/;function Iv(e){if(!Rv.test(e))throw new Error("invalid latin1 text")}function Bv(e,n,t){const s=Ip(n);e[s]=qv(n,t-s.length-1)}function Ip(e){for(e.mark();e.readByte()!==Ov;);const n=e.offset;e.reset();const t=Rp.decode(e.readBytes(n-e.offset-1));return e.skip(1),Mv(t),t}function qv(e,n){return Rp.decode(e.readBytes(n))}const Js={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Nd={UNKNOWN:-1,DEFLATE:0},Ff={UNKNOWN:-1,ADAPTIVE:0},jd={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Hl={NONE:0,BACKGROUND:1,PREVIOUS:2},kd={SOURCE:0,OVER:1};class Wv extends Nu{constructor(t,s={}){super(t);Oe(this,"_checkCrc");Oe(this,"_inflator");Oe(this,"_png");Oe(this,"_apng");Oe(this,"_end");Oe(this,"_hasPalette");Oe(this,"_palette");Oe(this,"_hasTransparency");Oe(this,"_transparency");Oe(this,"_compressionMethod");Oe(this,"_filterMethod");Oe(this,"_interlaceMethod");Oe(this,"_colorType");Oe(this,"_isAnimated");Oe(this,"_numberOfFrames");Oe(this,"_numberOfPlays");Oe(this,"_frames");Oe(this,"_writingDataChunks");const{checkCrc:i=!1}=s;this._checkCrc=i,this._inflator=new Pf,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=Nd.UNKNOWN,this._filterMethod=Ff.UNKNOWN,this._interlaceMethod=jd.UNKNOWN,this._colorType=Js.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(zf(this);!this._end;){const t=this.readUint32(),s=this.readChars(4);this.decodeChunk(t,s)}return this.decodeImage(),this._png}decodeApng(){for(zf(this);!this._end;){const t=this.readUint32(),s=this.readChars(4);this.decodeApngChunk(t,s)}return this.decodeApngImage(),this._apng}decodeChunk(t,s){const i=this.offset;switch(s){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case Fv:Bv(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-i!==t)throw new Error(`Length mismatch while decoding chunk ${s}`);this._checkCrc?Df(this,t+4,s):this.skip(4)}decodeApngChunk(t,s){const i=this.offset;switch(s!=="fdAT"&&s!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),s){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,s),this.offset=i+t;break}if(this.offset-i!==t)throw new Error(`Length mismatch while decoding chunk ${s}`);this._checkCrc?Df(this,t+4,s):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=Uv(this.readUint8());const s=this.readUint8();this._colorType=s;let i;switch(s){case Js.GREYSCALE:i=1;break;case Js.TRUECOLOUR:i=3;break;case Js.INDEXED_COLOUR:i=1;break;case Js.GREYSCALE_ALPHA:i=2;break;case Js.TRUECOLOUR_ALPHA:i=4;break;case Js.UNKNOWN:default:throw new Error(`Unknown color type: ${s}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==Nd.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={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(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const s=t/3;this._hasPalette=!0;const i=[];this._palette=i;for(let r=0;r<s;r++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){this._writingDataChunks=!0;const s=t,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,s)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let s=t,i=this.offset+this.byteOffset;if(i+=4,s-=4,this._inflator.push(new Uint8Array(this.buffer,i,s)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodetRNS(t){switch(this._colorType){case Js.GREYSCALE:case Js.TRUECOLOUR:{if(t%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);if(t/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let s=0;s<t/2;s++)this._transparency[s]=this.readUint16();break}case Js.INDEXED_COLOUR:{if(t>this._palette.length)throw new Error(`tRNS chunk contains more alph
19a values than there are palette colors (${t} vs ${this._palette.length})`);let s=0;for(;s<t;s++){const i=this.readByte();this._palette[s].push(i)}for(;s<this._palette.length;s++)this._palette[s].push(255);break}case Js.UNKNOWN:case Js.GREYSCALE_ALPHA:case Js.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const s=Ip(this),i=this.readUint8();if(i!==Nd.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const r=this.readBytes(t-s.length-2);this._png.iccEmbeddedProfile={name:s,profile:bv(r)}}decodepHYs(){const t=this.readUint32(),s=this.readUint32(),i=this.readByte();this._png.resolution={x:t,y:s,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const s={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(t);if(i){if(i.data=Tf({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),t===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)s.data=i.data;else{const r=this._apng.frames.at(t-1);this.disposeFrame(i,r,s),this.addFrameDataToCanvas(s,i)}this._apng.frames.push(s)}}return this._apng}disposeFrame(t,s,i){switch(t.disposeOp){case Hl.NONE:break;case Hl.BACKGROUND:for(let r=0;r<this._png.height;r++)for(let l=0;l<this._png.width;l++){const o=(r*t.width+l)*this._png.channels;for(let u=0;u<this._png.channels;u++)i.data[o+u]=0}break;case Hl.PREVIOUS:i.data.set(s.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,s){const i=1<<this._png.depth,r=(l,o)=>{const u=((l+s.yOffset)*this._png.width+s.xOffset+o)*this._png.channels,h=(l*s.width+o)*this._png.channels;return{index:u,frameIndex:h}};switch(s.blendOp){case kd.SOURCE:for(let l=0;l<s.height;l++)for(let o=0;o<s.width;o++){const{index:u,frameIndex:h}=r(l,o);for(let f=0;f<this._png.channels;f++)t.data[u+f]=s.data[h+f]}break;case kd.OVER:for(let l=0;l<s.height;l++)for(let o=0;o<s.width;o++){const{index:u,frameIndex:h}=r(l,o);for(let f=0;f<this._png.channels;f++){const v=s.data[h+this._png.channels-1]/i,w=f%(this._png.channels-1)===0?1:s.data[h+f],m=Math.floor(v*w+(1-v)*t.data[u+f]);t.data[u+f]+=m}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var s;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const t=this._isAnimated?((s=this._frames)==null?void 0:s.at(0)).data:this._inflator.result;if(this._filterMethod!==Ff.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===jd.NO_INTERLACE)this._png.data=Tf({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===jd.ADAM7)this._png.data=Sv({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,s=this._frames.at(-1);s?s.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Hl.NONE,blendOp:kd.SOURCE,data:t}),this._inflator=new Pf,this._writingDataChunks=!1}}function Uv(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw new Error(`invalid bit depth: ${e}`);return e}var Of;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"})(Of||(Of={}));function Vv(e,n){return new Wv(e,n).decode()}var wt=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function Ad(){wt.console&&typeof wt.console.log=="function"&&wt.console.log.apply(wt.console,arguments)}var on={log:Ad,warn:function(e){wt.console&&(typeof wt.console.warn=="function"?wt.console.warn.apply(wt.console,arguments):Ad.call(null,arguments))},error:function(e){wt.console&&(typeof wt.console.error=="function"?wt.console.error.apply(wt.console,arguments):Ad(e))}};function Sd(e,n,t){var s=new XMLHttpRequest;s.open("GET",e),s.responseType="blob",s.onload=function(){ha(s.response,n,t)},s.onerror=function(){on.error("could not download file")},s.send()}function Mf(e){var n=new XMLHttpRequest;n.open("HEAD",e,!1);try{n.send()}catch{}return n.status>=200&&n.status<=299}function Gl(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var n=document.createEvent("MouseEvents");
vendor: 3,407 bytes, lines 19-24
19n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}var ha=wt.saveAs||((typeof window>"u"?"undefined":en(window))!=="object"||window!==wt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,n,t){var s=wt.URL||wt.webkitURL,i=document.createElement("a");n=n||e.name||"download",i.download=n,i.rel="noopener",typeof e=="string"?(i.href=e,i.origin!==location.origin?Mf(i.href)?Sd(e,n,t):Gl(i,i.target="_blank"):Gl(i)):(i.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(i.href)},4e4),setTimeout(function(){Gl(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,t){if(n=n||e.name||"download",typeof e=="string")if(Mf(e))Sd(e,n,t);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout(function(){Gl(s)})}else navigator.msSaveOrOpenBlob(function(i,r){return r===void 0?r={autoBom:!1}:en(r)!=="object"&&(on.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(e,t),n)}:function(e,n,t,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),typeof e=="string")return Sd(e,n,t);var i=e.type==="application/octet-stream",r=/constructor/i.test(wt.HTMLElement)||wt.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&r)&&(typeof FileReader>"u"?"undefined":en(FileReader))==="object"){var o=new FileReader;o.onloadend=function(){var f=o.result;f=l?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=f:location=f,s=null},o.readAsDataURL(e)}else{var u=wt.URL||wt.webkitURL,h=u.createObjectURL(e);s?s.location=h:location.href=h,s=null,setTimeout(function(){u.revokeObjectURL(h)},4e4)}});/** 20 * A class to parse color values 21 * @author Stoyan Stefanov <[email protected]> 22 * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} 23 * @license Use it if you like it 24 */function Bp(e){var n;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
240",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 t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],s=0;s<t.length;s++){var i=t[s].re,r=t[s].process,l=i.exec(e);l&&(n=r(l),this.r=n[0],this.g=n[1],this.b=n[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 o=this.r.toString(16),u=this.g.toString(16),h=this.b.toString(16);return o.length==1&&(o="0"+o),u.length==1&&(u="0"+u),h.length==1&&(h="0"+h),"#"+o+u+h}}var ic=wt.atob.bind(wt),Rf=wt.btoa.bind(wt);/** 25 * @license 26 * Joseph Myers does not specify a particular license for his work. 27 * 28 * Author: Joseph Myers 29 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js 30 * 31 * Modified by: Owen Leong 32 */function Ld(e,n){var t=e[0],s=e[1],i=e[2],r=e[3];t=xs(t,s,i,r,n[0],7,-680876936),r=xs(r,t,s,i,n[1],12,-389564586),i=xs(i,r,t,s,n[2],17,606105819),s=xs(s,i,r,t,n[3],22,-1044525330),t=xs(t,s,i,r,n[4],7,-176418897),r=xs(r,t,s,i,n[5],12,1200080426),i=xs(i,r,t,s,n[6],17,-1473231341),s=xs(s,i,r,t,n[7],22,-45705983),t=xs(t,s,i,r,n[8],7,1770035416),r=xs(r,t,s,i,n[9],12,-1958414417),i=xs(i,r,t,s,n[10],17,-42063),s=xs(s,i,r,t,n[11],22,-1990404162),t=xs(t,s,i,r,n[12],7,1804603682),r=xs(r,t,s,i,n[13],12,-40341101),i=xs(i,r,t,s,n[14],17,-1502002290),t=vs(t,s=xs(s,i,r,t,n[15],22,1236535329),i,r,n[1],5,-165796510),r=vs(r,t,s,i,n[6],9,-1069501632),i=vs(i,r,t,s,n[11],14,643717713),s=vs(s,i,r,t,n[0],20,-373897302),t=vs(t,s,i,r,n[5],5,-701558691),r=vs(r,t,s,i,n[10],9,38016083),i=vs(i,r,t,s,n[15],14,-660478335),s=vs(s,i,r,t,n[4],20,-405537848),t=vs(t,s,i,r,n[9],5,568446438),r=vs(r,t,s,i,n[14],9,-1019803690),i=vs(i,r,t,s,n[3],14,-187363961),s=vs(s,i,r,t,n[8],20,1163531501),t=vs(t,s,i,r,n[13],5,-1444681467),r
vendor: 9,083 bytes, lines 32-49
32=vs(r,t,s,i,n[2],9,-51403784),i=vs(i,r,t,s,n[7],14,1735328473),t=bs(t,s=vs(s,i,r,t,n[12],20,-1926607734),i,r,n[5],4,-378558),r=bs(r,t,s,i,n[8],11,-2022574463),i=bs(i,r,t,s,n[11],16,1839030562),s=bs(s,i,r,t,n[14],23,-35309556),t=bs(t,s,i,r,n[1],4,-1530992060),r=bs(r,t,s,i,n[4],11,1272893353),i=bs(i,r,t,s,n[7],16,-155497632),s=bs(s,i,r,t,n[10],23,-1094730640),t=bs(t,s,i,r,n[13],4,681279174),r=bs(r,t,s,i,n[0],11,-358537222),i=bs(i,r,t,s,n[3],16,-722521979),s=bs(s,i,r,t,n[6],23,76029189),t=bs(t,s,i,r,n[9],4,-640364487),r=bs(r,t,s,i,n[12],11,-421815835),i=bs(i,r,t,s,n[15],16,530742520),t=ws(t,s=bs(s,i,r,t,n[2],23,-995338651),i,r,n[0],6,-198630844),r=ws(r,t,s,i,n[7],10,1126891415),i=ws(i,r,t,s,n[14],15,-1416354905),s=ws(s,i,r,t,n[5],21,-57434055),t=ws(t,s,i,r,n[12],6,1700485571),r=ws(r,t,s,i,n[3],10,-1894986606),i=ws(i,r,t,s,n[10],15,-1051523),s=ws(s,i,r,t,n[1],21,-2054922799),t=ws(t,s,i,r,n[8],6,1873313359),r=ws(r,t,s,i,n[15],10,-30611744),i=ws(i,r,t,s,n[6],15,-1560198380),s=ws(s,i,r,t,n[13],21,1309151649),t=ws(t,s,i,r,n[4],6,-145523070),r=ws(r,t,s,i,n[11],10,-1120210379),i=ws(i,r,t,s,n[2],15,718787259),s=ws(s,i,r,t,n[9],21,-343485551),e[0]=Ur(t,e[0]),e[1]=Ur(s,e[1]),e[2]=Ur(i,e[2]),e[3]=Ur(r,e[3])}function Dc(e,n,t,s,i,r){return n=Ur(Ur(n,e),Ur(s,r)),Ur(n<<i|n>>>32-i,t)}function xs(e,n,t,s,i,r,l){return Dc(n&t|~n&s,e,n,i,r,l)}function vs(e,n,t,s,i,r,l){return Dc(n&s|t&~s,e,n,i,r,l)}function bs(e,n,t,s,i,r,l){return Dc(n^t^s,e,n,i,r,l)}function ws(e,n,t,s,i,r,l){return Dc(t^(n|~s),e,n,i,r,l)}function qp(e){var n,t=e.length,s=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=e.length;n+=64)Ld(s,Hv(e.substring(n-64,n)));e=e.substring(n-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<e.length;n++)i[n>>2]|=e.charCodeAt(n)<<(n%4<<3);if(i[n>>2]|=128<<(n%4<<3),n>55)for(Ld(s,i),n=0;n<16;n++)i[n]=0;return i[14]=8*t,Ld(s,i),s}function Hv(e){var n,t=[];for(n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}var If="0123456789abcdef".split("");function Gv(e){for(var n="",t=0;t<4;t++)n+=If[e>>8*t+4&15]+If[e>>8*t&15];return n}function $v(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function ou(e){return qp(e).map($v).join("")}var Zv=function(e){for(var n=0;n<e.length;n++)e[n]=Gv(e[n]);return e.join("")}(qp("hello"))!="5d41402abc4b2a76b9719d911017c592";function Ur(e,n){if(Zv){var t=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(t>>16)<<16|65535&t}return e+n&4294967295}/** 33 * @license 34 * FPDF is released under a permissive license: there is no usage restriction. 35 * You may embed it freely in your application (commercial or not), with or 36 * without modifications. 37 * 38 * Reference: http://www.fpdf.org/en/script/script37.php 39 */function lu(e,n){var t,s,i,r;if(e!==t){for(var l=(i=e,r=1+(256/e.length|0),new Array(r+1).join(i)),o=[],u=0;u<256;u++)o[u]=u;var h=0;for(u=0;u<256;u++){var f=o[u];h=(h+f+l.charCodeAt(u))%256,o[u]=o[h],o[h]=f}t=e,s=o}else o=s;var v=n.length,w=0,m=0,A="";for(u=0;u<v;u++)m=(m+(f=o[w=(w+1)%256]))%256,o[w]=o[m],o[m]=f,l=o[(o[w]+o[m])%256],A+=String.fromCharCode(n.charCodeAt(u)^l);return A}/** 40 * @license 41 * Licensed under the MIT License. 42 * http://opensource.org/licenses/mit-license 43 * Author: Owen Leong (@owenl131) 44 * Date: 15 Oct 2020 45 * References: 46 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt 47 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js 48 * http://www.fpdf.org/en/script/script37.php 49 */var Bf={print:4,modify:8,copy:16,"annot-forms":32};function $a(e,n,t,s){this.v=1,this.r=2;var i=192;e.forEach(function(o){if(Bf.perm!==void 0)throw new Error("Invalid permission: "+o);i+=Bf[o]}),this.padding="(¿N^NuÂAd\0NVÿú�\b..\0¶Ãh>Â/\f©þdSiz";var r=(n+this.padding).substr(0,32),l=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(r,l),this.P=-(1+(255^i)),this.encryptionKey=ou(r+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(s)).substr(0,5),this.U=lu(this.encryptionKey,this.padding)}function Za(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var n="",t=e.length,s=0;s<t;s++){var i=e.charCodeAt(s);n+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):e[s]}return n}function qf(e){if(en(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(t,s,i){if(i=i||!1,typeof t!="string"||typeof s!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(t)||(n[t]={});var r=Math.random().toString(35);return n[t][r]=[s,!!i],r},this.unsubscribe=function(t){for(var s in n)if(n[s][t])return delete n[s][t],Object.keys(n[s]).length===0&&delete n[s],!0;return!1},this.publish=function(t){if(n.hasOwnProperty(t)){var s=Array.prototype.slice.call(arguments,1),i=[];for(var r in n[t]){var l=n[t][r];try{l[0].apply(e,s)}catch(o){wt.console&&on.error("jsPDF PubSub Error",o.message,o)}l[1]&&i.push(r)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function jc(e){if(!(this instanceof jc))return new jc(e);var n="opacity,stroke-opacity".split(",");for(var t in e)e.hasOwnProperty(t)&&n.indexOf(t)>=0&&(this[t]=e[t]);this.id="",this.objectNumber=-1}function Wp(e,n){this.gState=e,this.matrix=n,this.id="",this.objectNumber=-1}function fa(e,n,t,s,i){if(!(this instanceof fa))return new fa(e,n,t,s,i);this.type=e==="axial"?2:3,this.coords=n,this.colors=t,Wp.call(this,s,i)}function Ka(e,n,t,s,i){if(!(this instanceof Ka))return new Ka(e,n,t,s,i);this.boundingBox=e,this.xStep=n,this.yStep=t,this.stream="",this.cloneIndex=0,Wp.call(this,s,i)}function dt(e){var n,t=typeof arguments[0]=="string"?arguments[0]:"p",s=arguments[1],i=arguments[2],r=arguments[3],l=[],o=1,u=16,h="S",f=null;en(e=e||{})==="object"&&(t=e.orientation,s=e.unit||s,i=e.format||i,r=e.compress||e.compressPdf||r,(f=e.encryption||null)!==null&&(f.userPassword=f.userPassword||"",f.ownerPassword=f.ownerPassword||"",f.userPermissions=f.userPermissions||[]),o=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(n=e.precision),e.floatPrecision!==void 0&&(u=e.floatPrecision),h=e.defaultPathOperation||"S"),l=e.filters||(r===!0?["FlateEncode"]:l),s=s||"mm",t=(""+(t||"P")).toLowerCase();var v=e.putOnlyUsedFonts||!1,w={},m={internal:{},__private__:{}};m.__private__.PubSub=qf;var A="1.3",y=m.__private__.getPdfVersion=function(){return A};m.__private__.setPdfVersion=function(p){A=p};var P={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};m.__private__.getPageFormats=function(){return P};var k=m.__private__.getPageFormat=function(p){return P[p]};i=i||"a4";var G="compat",I="advanced",R=G;function Q(){this.saveGraphicsState(),F(new $e(ht,0,0,-ht,0,Xr()*ht).toString()+" cm"),this.setFontSize(this.getFontSize()/ht),h="n",R=I}function me(){this.restoreGraphicsState(),h="S",R=G}var oe=m.__private__.combineFontStyleAndFontWeight=function(p,_){if(p=="bold"&&_=="normal"||p=="bold"&&_==400||p=="normal"&&_=="italic"||p=="bold"&&_=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return _&&(p=_==400||_==="normal"?p==="italic"?"italic":"normal":_!=700&&_!=="bold"||p!=="normal"?(_==700?"bold":_)+""+p:"bold"),p};m.advancedAPI=function(p){var _=R===G;return _&&Q.call(this),typeof p!="function"||(p(this),_&&me.call(this)),this},m.compatAPI=function(p){var _=R===I;return _&&me.call(this),typeof p!="function"||(p(this),_&&Q.call(this)),this},m.isAdvancedAPI=function(){return R===I};var K,H=function(p){if(R!==I)throw new Error(p+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},ie=m.roundToPrecision=m.__private__.roundToPrecision=function(p,_){var B=n||_;if(isNaN(p)||isNaN(B))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return p.toFixed(B).replace(/0+$/,"")};K=m.hpf=m.__private__.hpf=typeof u=="number"?function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.hpf");return ie(p,u)}:u==="smart"?function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.hpf");return ie(p,p>-1&&p<1?16:5)}:function(p){if(isNaN(p))throw new Error("Invalid argument passed to
49jsPDF.hpf");return ie(p,16)};var j=m.f2=m.__private__.f2=function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.f2");return ie(p,2)},z=m.__private__.f3=function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.f3");return ie(p,3)},C=m.scale=m.__private__.scale=function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.scale");return R===G?p*ht:R===I?p:void 0},$=function(p){return C(function(_){return R===G?Xr()-_:R===I?_:void 0}(p))};m.__private__.setPrecision=m.setPrecision=function(p){typeof parseInt(p,10)=="number"&&(n=parseInt(p,10))};var q,L="00000000000000000000000000000000",M=m.__private__.getFileId=function(){return L},Z=m.__private__.setFileId=function(p){return L=p!==void 0&&/^[a-fA-F0-9]{32}$/.test(p)?p.toUpperCase():L.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),f!==null&&(sn=new $a(f.userPermissions,f.userPassword,f.ownerPassword,L)),L};m.setFileId=function(p){return Z(p),this},m.getFileId=function(){return M()};var ae=m.__private__.convertDateToPDFDate=function(p){var _=p.getTimezoneOffset(),B=_<0?"+":"-",ee=Math.floor(Math.abs(_/60)),le=Math.abs(_%60),_e=[B,D(ee),"'",D(le),"'"].join("");return["D:",p.getFullYear(),D(p.getMonth()+1),D(p.getDate()),D(p.getHours()),D(p.getMinutes()),D(p.getSeconds()),_e].join("")},he=m.__private__.convertPDFDateToDate=function(p){var _=parseInt(p.substr(2,4),10),B=parseInt(p.substr(6,2),10)-1,ee=parseInt(p.substr(8,2),10),le=parseInt(p.substr(10,2),10),_e=parseInt(p.substr(12,2),10),Ee=parseInt(p.substr(14,2),10);return new Date(_,B,ee,le,_e,Ee,0)},we=m.__private__.setCreationDate=function(p){var _;if(p===void 0&&(p=new Date),p instanceof Date)_=ae(p);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(p))throw new Error("Invalid argument passed to jsPDF.setCreationDate");_=p}return q=_},b=m.__private__.getCreationDate=function(p){var _=q;return p==="jsDate"&&(_=he(q)),_};m.setCreationDate=function(p){return we(p),this},m.getCreationDate=function(p){return b(p)};var W,D=m.__private__.padd2=function(p){return("0"+parseInt(p)).slice(-2)},X=m.__private__.padd2Hex=function(p){return("00"+(p=p.toString())).substr(p.length)},Y=0,te=[],ue=[],ge=0,se=[],ve=[],Ae=!1,Pe=ue;m.__private__.setCustomOutputDestination=function(p){Ae=!0,Pe=p};var He=function(p){Ae||(Pe=p)};m.__private__.resetCustomOutputDestination=function(){Ae=!1,Pe=ue};var F=m.__private__.out=function(p){return p=p.toString(),ge+=p.length+1,Pe.push(p),Pe},ze=m.__private__.write=function(p){return F(arguments.length===1?p.toString():Array.prototype.join.call(arguments," "))},Ye=m.__private__.getArrayBuffer=function(p){for(var _=p.length,B=new ArrayBuffer(_),ee=new Uint8Array(B);_--;)ee[_]=p.charCodeAt(_);return B},Me=[["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]];m.__private__.getStandardFonts=function(){return Me};var ce=e.fontSize||16;m.__private__.setFontSize=m.setFontSize=function(p){return ce=R===I?p/ht:p,this};var Se,Te=m.__private__.getFontSize=m.getFontSize=function(){return R===G?ce:ce*ht},xe=e.R2L||!1;m.__private__.setR2L=m.setR2L=function(p){return xe=p,this},m.__private__.getR2L=m.getR2L=function(){return xe};var De,it=m.__private__.setZoomMode=function(p){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(p))Se=p;else if(isNaN(p)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(p)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+p+'" is not recognized.');Se=p}else Se=parseInt(p,10)};m.__private__.getZoomMode=function(){return Se};var lt,nt=m.__private__.setPageMode=function(p){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(p)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+p+'" is not recognized.');De=p};m.__private__.getPageMode=function(){return De};var gt=m.__private__.setLayoutMode=function(p){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(p)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+p+'" is not recognized.');lt=p};m.__private__.getLayoutMode=function(){return lt},m.__private__.setDisplayMode=m.setDisplayMode=function(p,_,B){return it(p),gt(_),nt(B),this};var xt={title:"",subject:"",author:"",keywords:"",creator:""};m.__private__.getDocumentProperty=function(p){if(Object.keys(xt).indexOf(p)===-1)throw new Error("Invalid argument passed to
49jsPDF.getDocumentProperty");return xt[p]},m.__private__.getDocumentProperties=function(){return xt},m.__private__.setDocumentProperties=m.setProperties=m.setDocumentProperties=function(p){for(var _ in xt)xt.hasOwnProperty(_)&&p[_]&&(xt[_]=p[_]);return this},m.__private__.setDocumentProperty=function(p,_){if(Object.keys(xt).indexOf(p)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return xt[p]=_};var Je,ht,Xe,Yt,Mt,vt={},ft={},kt=[],Ke={},yt={},Ge={},qe={},_t=null,Dt=0,ut=[],Ct=new qf(m),Ws=e.hotfixes||[],wn={},$n={},Ds=[],$e=function p(_,B,ee,le,_e,Ee){if(!(this instanceof p))return new p(_,B,ee,le,_e,Ee);isNaN(_)&&(_=1),isNaN(B)&&(B=0),isNaN(ee)&&(ee=0),isNaN(le)&&(le=1),isNaN(_e)&&(_e=0),isNaN(Ee)&&(Ee=0),this._matrix=[_,B,ee,le,_e,Ee]};Object.defineProperty($e.prototype,"sx",{get:function(){return this._matrix[0]},set:function(p){this._matrix[0]=p}}),Object.defineProperty($e.prototype,"shy",{get:function(){return this._matrix[1]},set:function(p){this._matrix[1]=p}}),Object.defineProperty($e.prototype,"shx",{get:function(){return this._matrix[2]},set:function(p){this._matrix[2]=p}}),Object.defineProperty($e.prototype,"sy",{get:function(){return this._matrix[3]},set:function(p){this._matrix[3]=p}}),Object.defineProperty($e.prototype,"tx",{get:function(){return this._matrix[4]},set:function(p){this._matrix[4]=p}}),Object.defineProperty($e.prototype,"ty",{get:function(){return this._matrix[5]},set:function(p){this._matrix[5]=p}}),Object.defineProperty($e.prototype,"a",{get:function(){return this._matrix[0]},set:function(p){this._matrix[0]=p}}),Object.defineProperty($e.prototype,"b",{get:function(){return this._matrix[1]},set:function(p){this._matrix[1]=p}}),Object.defineProperty($e.prototype,"c",{get:function(){return this._matrix[2]},set:function(p){this._matrix[2]=p}}),Object.defineProperty($e.prototype,"d",{get:function(){return this._matrix[3]},set:function(p){this._matrix[3]=p}}),Object.defineProperty($e.prototype,"e",{get:function(){return this._matrix[4]},set:function(p){this._matrix[4]=p}}),Object.defineProperty($e.prototype,"f",{get:function(){return this._matrix[5]},set:function(p){this._matrix[5]=p}}),Object.defineProperty($e.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty($e.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty($e.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty($e.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),$e.prototype.join=function(p){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(K).join(p)},$e.prototype.multiply=function(p){var _=p.sx*this.sx+p.shy*this.shx,B=p.sx*this.shy+p.shy*this.sy,ee=p.shx*this.sx+p.sy*this.shx,le=p.shx*this.shy+p.sy*this.sy,_e=p.tx*this.sx+p.ty*this.shx+this.tx,Ee=p.tx*this.shy+p.ty*this.sy+this.ty;return new $e(_,B,ee,le,_e,Ee)},$e.prototype.decompose=function(){var p=this.sx,_=this.shy,B=this.shx,ee=this.sy,le=this.tx,_e=this.ty,Ee=Math.sqrt(p*p+_*_),rt=(p/=Ee)*B+(_/=Ee)*ee;B-=p*rt,ee-=_*rt;var st=Math.sqrt(B*B+ee*ee);return rt/=st,p*(ee/=st)<_*(B/=st)&&(p=-p,_=-_,rt=-rt,Ee=-Ee),{scale:new $e(Ee,0,0,st,0,0),translate:new $e(1,0,0,1,le,_e),rotate:new $e(p,_,-_,p,0,0),skew:new $e(1,0,rt,1,0,0)}},$e.prototype.toString=function(p){return this.join(" ")},$e.prototype.inversed=function(){var p=this.sx,_=this.shy,B=this.shx,ee=this.sy,le=this.tx,_e=this.ty,Ee=1/(p*ee-_*B),rt=ee*Ee,st=-_*Ee,jt=-B*Ee,Lt=p*Ee;return new $e(rt,st,jt,Lt,-rt*le-jt*_e,-st*le-Lt*_e)},$e.prototype.applyToPoint=function(p){var _=p.x*this.sx+p.y*this.shx+this.tx,B=p.x*this.shy+p.y*this.sy+this.ty;return new Jr(_,B)},$e.prototype.applyToRectangle=function(p){var _=this.applyToPoint(p),B=this.applyToPoint(new Jr(p.x+p.w,p.y+p.h));return new vo(_.x,_.y,B.x-_.x,B.y-_.y)},$e.prototype.clone=function(){var p=this.sx,_=this.shy,B=this.shx,ee=this.sy,le=this.tx,_e=this.ty;return new $e(p,_,B,ee,le,_e)},m.Matrix=$e;
vendor: 21,536 bytes, lines 49-55
49var bt=m.matrixMult=function(p,_){return _.multiply(p)},si=new $e(1,0,0,1,0,0);m.unitMatrix=m.identityMatrix=si;var ys=function(p,_){if(!yt[p]){var B=(_ instanceof fa?"Sh":"P")+(Object.keys(Ke).length+1).toString(10);_.id=B,yt[p]=B,Ke[B]=_,Ct.publish("addPattern",_)}};m.ShadingPattern=fa,m.TilingPattern=Ka,m.addShadingPattern=function(p,_){return H("addShadingPattern()"),ys(p,_),this},m.beginTilingPattern=function(p){H("beginTilingPattern()"),bo(p.boundingBox[0],p.boundingBox[1],p.boundingBox[2]-p.boundingBox[0],p.boundingBox[3]-p.boundingBox[1],p.matrix)},m.endTilingPattern=function(p,_){H("endTilingPattern()"),_.stream=ve[W].join(` 50`),ys(p,_),Ct.publish("endTilingPattern",_),Ds.pop().restore()};var _s,pn=m.__private__.newObject=function(){var p=dn();return gn(p,!0),p},dn=m.__private__.newObjectDeferred=function(){return Y++,te[Y]=function(){return ge},Y},gn=function(p,_){return _=typeof _=="boolean"&&_,te[p]=ge,_&&F(p+" 0 obj"),p},$i=m.__private__.newAdditionalObject=function(){var p={objId:dn(),content:""};return se.push(p),p},Ai=dn(),Us=dn(),ii=m.__private__.decodeColorString=function(p){var _=p.split(" ");if(_.length!==2||_[1]!=="g"&&_[1]!=="G")_.length!==5||_[4]!=="k"&&_[4]!=="K"||(_=[(1-_[0])*(1-_[3]),(1-_[1])*(1-_[3]),(1-_[2])*(1-_[3]),"r"]);else{var B=parseFloat(_[0]);_=[B,B,B,"r"]}for(var ee="#",le=0;le<3;le++)ee+=("0"+Math.floor(255*parseFloat(_[le])).toString(16)).slice(-2);return ee},Ts=m.__private__.encodeColorString=function(p){var _;typeof p=="string"&&(p={ch1:p});var B=p.ch1,ee=p.ch2,le=p.ch3,_e=p.ch4,Ee=p.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof B=="string"&&B.charAt(0)!=="#"){var rt=new Bp(B);if(rt.ok)B=rt.toHex();else if(!/^\d*\.?\d*$/.test(B))throw new Error('Invalid color "'+B+'" passed to jsPDF.encodeColorString.')}if(typeof B=="string"&&/^#[0-9A-Fa-f]{3}$/.test(B)&&(B="#"+B[1]+B[1]+B[2]+B[2]+B[3]+B[3]),typeof B=="string"&&/^#[0-9A-Fa-f]{6}$/.test(B)){var st=parseInt(B.substr(1),16);B=st>>16&255,ee=st>>8&255,le=255&st}if(ee===void 0||_e===void 0&&B===ee&&ee===le)_=typeof B=="string"?B+" "+Ee[0]:p.precision===2?j(B/255)+" "+Ee[0]:z(B/255)+" "+Ee[0];else if(_e===void 0||en(_e)==="object"){if(_e&&!isNaN(_e.a)&&_e.a===0)return["1.","1.","1.",Ee[1]].join(" ");_=typeof B=="string"?[B,ee,le,Ee[1]].join(" "):p.precision===2?[j(B/255),j(ee/255),j(le/255),Ee[1]].join(" "):[z(B/255),z(ee/255),z(le/255),Ee[1]].join(" ")}else _=typeof B=="string"?[B,ee,le,_e,Ee[2]].join(" "):p.precision===2?[j(B),j(ee),j(le),j(_e),Ee[2]].join(" "):[z(B),z(ee),z(le),z(_e),Ee[2]].join(" ");return _},Ns=m.__private__.getFilters=function(){return l},zs=m.__private__.putStream=function(p){var _=(p=p||{}).data||"",B=p.filters||Ns(),ee=p.alreadyAppliedFilters||[],le=p.addLength1||!1,_e=_.length,Ee=p.objectId,rt=function(xn){return xn};if(f!==null&&Ee===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");f!==null&&(rt=sn.encryptor(Ee,0));var st={};B===!0&&(B=["FlateEncode"]);var jt=p.additionalKeyValues||[],Lt=(st=dt.API.processDataByFilters!==void 0?dt.API.processDataByFilters(_,B):{data:_,reverseChain:[]}).reverseChain+(Array.isArray(ee)?ee.join(" "):ee.toString());if(st.data.length!==0&&(jt.push({key:"Length",value:st.data.length}),le===!0&&jt.push({key:"Length1",value:_e})),Lt.length!=0)if(Lt.split("/").length-1==1)jt.push({key:"Filter",value:Lt});else{jt.push({key:"Filter",value:"["+Lt+"]"});for(var Wt=0;Wt<jt.length;Wt+=1)if(jt[Wt].key==="DecodeParms"){for(var Hn=[],rn=0;rn<st.reverseChain.split("/").length-1;rn+=1)Hn.push("null");Hn.push(jt[Wt].value),jt[Wt].value="["+Hn.join(" ")+"]"}}F("<<");for(var nn=0;nn<jt.length;nn++)F("/"+jt[nn].key+" "+jt[nn].value);F(">>"),st.data.length!==0&&(F("stream"),F(rt(st.data)),F("endstream"))},Zi=m.__private__.putPage=function(p){var _=p.number,B=p.data,ee=p.objId,le=p.contentsObjId;gn(ee,!0),F("<</Type /Page"),F("/Parent "+p.rootDictionaryObjId+" 0 R"),F("/Resources "+p.resourceDictionaryObjId+" 0 R"),F("/MediaBox ["+parseFloat(K(p.mediaBox.bottomLeftX))+" "+parseFloat(K(p.mediaBox.bottomLeftY))+" "+K(p.mediaBox.topRightX)+" "+K(p.mediaBox.topRightY)+"]"),p.cropBox!==null&&F("/CropBox ["+K(p.cropBox.bottomLeftX)+" "+K(p.cropBox.bottomLeftY)+" "+K(p.cropBox.topRightX)+" "+K(p.cropBox.topRightY)+"]"),p.bleedBox!==null&&F("/BleedBox ["+K(p.bleedBox.bottomLeftX)+" "+K(p.bleedBox.bottomLeftY)+" "+K(p.bleedBox.topRightX)+" "+K(p.bleedBox.topRightY)+"]"),p.trimBox!==null&&F("/TrimBox ["+K(p.trimBox.bottomLeftX)+" "+K(p.trimBox.bottomLeftY)+" "+K(p.trimBox.topRightX)+" "+K(p.trimBox.topRightY)+"]"),p.artBox!==null&&F("/ArtBox ["+K(p.artBox.bottomLeftX)+" "+K(p.artBox.bottomLeftY)+" "+K(p.artBox.topRightX)+" "+K(p.artBox.topRightY)+"]"),typeof p.userUnit=="number"&&p.userUnit!==1&&F("/UserUnit "+p.userUnit),Ct.publish("putPage",{objId:ee,pageContext:ut[_],pageNumber:_,page:B}),F("/Contents "+le+" 0 R"),F(">>"),F("endobj");var _e=B.join(` 51`);return R===I&&(_e+=` 52Q`),gn(le,!0),zs({data:_e,filters:Ns(),objectId:le}),F("endobj"),ee},js=m.__private__.putPages=function(){var p,_,B=[];for(p=1;p<=Dt;p++)ut[p].objId=dn(),ut[p].contentsObjId=dn();for(p=1;p<=Dt;p++)B.push(Zi({number:p,data:ve[p],objId:ut[p].objId,contentsObjId:ut[p].contentsObjId,mediaBox:ut[p].mediaBox,cropBox:ut[p].cropBox,bleedBox:ut[p].bleedBox,trimBox:ut[p].trimBox,artBox:ut[p].artBox,userUnit:ut[p].userUnit,rootDictionaryObjId:Ai,resourceDictionaryObjId:Us}));gn(Ai,!0),F("<</Type /Pages");var ee="/Kids [";for(_=0;_<Dt;_++)ee+=B[_]+" 0 R ";F(ee+"]"),F("/Count "+Dt),F(">>"),F("endobj"),Ct.publish("postPutPages")},Yi=function(p){Ct.publish("putFont",{font:p,out:F,newObject:pn,putStream:zs}),p.isAlreadyPutted!==!0&&(p.objectNumber=pn(),F("<<"),F("/Type /Font"),F("/BaseFont /"+Za(p.postScriptName)),F("/Subtype /Type1"),typeof p.encoding=="string"&&F("/Encoding /"+p.encoding),F("/FirstChar 32"),F("/LastChar 255"),F(">>"),F("endobj"))},br=function(p){p.objectNumber=pn();var _=[];_.push({key:"Type",value:"/XObject"}),_.push({key:"Subtype",value:"/Form"}),_.push({key:"BBox",value:"["+[K(p.x),K(p.y),K(p.x+p.width),K(p.y+p.height)].join(" ")+"]"}),_.push({key:"Matrix",value:"["+p.matrix.toString()+"]"});var B=p.pages[1].join(` 53`);zs({data:B,additionalKeyValues:_,objectId:p.objectNumber}),F("endobj")},wr=function(p,_){_||(_=21);var B=pn(),ee=function(Ee,rt){var st,jt=[],Lt=1/(rt-1);for(st=0;st<1;st+=Lt)jt.push(st);if(jt.push(1),Ee[0].offset!=0){var Wt={offset:0,color:Ee[0].color};Ee.unshift(Wt)}if(Ee[Ee.length-1].offset!=1){var Hn={offset:1,color:Ee[Ee.length-1].color};Ee.push(Hn)}for(var rn="",nn=0,xn=0;xn<jt.length;xn++){for(st=jt[xn];st>Ee[nn+1].offset;)nn++;var kn=Ee[nn].offset,An=(st-kn)/(Ee[nn+1].offset-kn),hs=Ee[nn].color,er=Ee[nn+1].color;rn+=X(Math.round((1-An)*hs[0]+An*er[0]).toString(16))+X(Math.round((1-An)*hs[1]+An*er[1]).toString(16))+X(Math.round((1-An)*hs[2]+An*er[2]).toString(16))}return rn.trim()}(p.colors,_),le=[];le.push({key:"FunctionType",value:"0"}),le.push({key:"Domain",value:"[0.0 1.0]"}),le.push({key:"Size",value:"["+_+"]"}),le.push({key:"BitsPerSample",value:"8"}),le.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),le.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),zs({data:ee,additionalKeyValues:le,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:B}),F("endobj"),p.objectNumber=pn(),F("<< /ShadingType "+p.type),F("/ColorSpace /DeviceRGB");var _e="/Coords ["+K(parseFloat(p.coords[0]))+" "+K(parseFloat(p.coords[1]))+" ";p.type===2?_e+=K(parseFloat(p.coords[2]))+" "+K(parseFloat(p.coords[3])):_e+=K(parseFloat(p.coords[2]))+" "+K(parseFloat(p.coords[3]))+" "+K(parseFloat(p.coords[4]))+" "+K(parseFloat(p.coords[5])),F(_e+="]"),p.matrix&&F("/Matrix ["+p.matrix.toString()+"]"),F("/Function "+B+" 0 R"),F("/Extend [true true]"),F(">>"),F("endobj")},yr=function(p,_){var B=dn(),ee=pn();_.push({resourcesOid:B,objectOid:ee}),p.objectNumber=ee;var le=[];le.push({key:"Type",value:"/Pattern"}),le.push({key:"PatternType",value:"1"}),le.push({key:"PaintType",value:"1"}),le.push({key:"TilingType",value:"1"}),le.push({key:"BBox",value:"["+p.boundingBox.map(K).join(" ")+"]"}),le.push({key:"XStep",value:K(p.xStep)}),le.push({key:"YStep",value:K(p.yStep)}),le.push({key:"Resources",value:B+" 0 R"}),p.matrix&&le.push({key:"Matrix",value:"["+p.matrix.toString()+"]"}),zs({data:p.stream,additionalKeyValues:le,objectId:p.objectNumber}),F("endobj")},fo=function(p){for(var _ in p.objectNumber=pn(),F("<<"),p)switch(_){case"opacity":F("/ca "+j(p[_]));break;case"stroke-opacity":F("/CA "+j(p[_]))}F(">>"),F("endobj")},Zr=function(p){gn(p.resourcesOid,!0),F("<<"),F("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var _ in F("/Font <<"),vt)vt.hasOwnProperty(_)&&(v===!1||v===!0&&w.hasOwnProperty(_))&&F("/"+_+" "+vt[_].objectNumber+" 0 R");F(">>")}(),function(){if(Object.keys(Ke).length>0){for(var _ in F("/Shading <<"),Ke)Ke.hasOwnProperty(_)&&Ke[_]instanceof fa&&Ke[_].objectNumber>=0&&F("/"+_+" "+Ke[_].objectNumber+" 0 R");Ct.publish("putShadingPatternDict"),F(">>")}}(),function(_){if(Object.keys(Ke).length>0){for(var B in F("/Pattern <<"),Ke)Ke.hasOwnProperty(B)&&Ke[B]instanceof m.TilingPattern&&Ke[B].objectNumber>=0&&Ke[B].objectNumber<_&&F("/"+B+" "+Ke[B].objectNumber+" 0 R");Ct.publish("putTilingPatternDict"),F(">>")}}(p.objectOid),function(){if(Object.keys(Ge).length>0){var _;for(_ in F("/ExtGState <<"),Ge)Ge.hasOwnProperty(_)&&Ge[_].objectNumber>=0&&F("/"+_+" "+Ge[_].objectNumber+" 0 R");Ct.publish("putGStateDict"),F(">>")}}(),function(){for(var _ in F("/XObject <<"),wn)wn.hasOwnProperty(_)&&wn[_].objectNumber>=0&&F("/"+_+" "+wn[_].objectNumber+" 0 R");Ct.publish("putXobjectDict"),F(">>")}(),F(">>"),F("endobj")},_r=function(p){ft[p.fontName]=ft[p.fontName]||{},ft[p.fontName][p.fontStyle]=p.id},Yr=function(p,_,B,ee,le){var _e={id:"F"+(Object.keys(vt).length+1).toString(10),postScriptName:p,fontName:_,fontStyle:B,encoding:ee,isStandardFont:le||!1,metadata:{}};return Ct.publish("addFont",{font:_e,instance:this}),vt[_e.id]=_e,_r(_e),_e.id},Fs=m.__private__.pdfEscape=m.pdfEscape=function(p,_){return function(B,ee){var le,_e,Ee,rt,st,jt,Lt,Wt,Hn;if(Ee=(ee=ee||{}).sourceEncoding||"Unicode",st=ee.outputEncoding,(ee.autoencode||st)&&vt[Je].metadata&&vt[Je].metadata[Ee]&&vt[Je].metadata[Ee].encoding&&(rt=vt[Je].metadata[Ee].encoding,!st&&vt[Je].encoding&&(st=vt[Je].encoding),!st&&rt.codePages&&(st=rt.codePages[0]),typeof st=="string"&&(st=rt[st]),st)){for(Lt=!1,jt=[],le=0,_e=B.length;le<_e;le++)(Wt=st[B.charCodeAt(le)])?jt.push(String.fromCharCode(Wt)):jt.push(B[le]),jt[le].charCodeAt(0)>>8&&(Lt=!0);B=jt.join("")}for(le=B.length;Lt===void 0&&le!==0;)B.charCodeAt(le-1)>>8&&(Lt=!0),le--;if(!Lt)return B;for(jt=ee.noBOM?[]:[254,255],le=0,_e=B.length;le<_e;le++){if((Hn=(Wt=B.charCodeAt(le))>>8)>>8)throw new Error("Character at position "+le+" of string '"+B+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");jt.push(Hn),jt.push(Wt-(Hn<<8))}return String.fromCharCode.apply(void 0,jt)}(p,_).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Nr=m.__private__.beginPage=function(p){ve[++Dt]=[],ut[Dt]={objId:0,contentsObjId:0,userUnit:Number(o),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(p[0]),topRightY:Number(p[1])}},J(Dt),He(ve[W])},Si=function(p,_){var B,ee,le;switch(t=_||t,typeof p=="string"&&(B=k(p.toLowerCase()),Array.isArray(B)&&(ee=B[0],le=B[1])),Array.isArray(p)&&(ee=p[0]*ht,le=p[1]*ht),isNaN(ee)&&(ee=i[0],le=i[1]),(ee>14400||le>14400)&&(on.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),ee=Math.min(14400,ee),le=Math.min(14400,le)),i=[ee,le],t.substr(0,1)){case"l":le>ee&&(i=[le,ee]);break;case"p":ee>le&&(i=[le,ee])}Nr(i),Zn(We),F(Ea),go!==0&&F(go+" J"),Ar!==0&&F(Ar+" j"),Ct.publish("addPage",{pageNumber:Dt})},jr=function(p){p>0&&p<=Dt&&(ve.splice(p,1),ut.splice(p,1),Dt--,W>Dt&&(W=Dt),this.setPage(W))},J=function(p){p>0&&p<=Dt&&(W=p)},Re=m.__private__.getNumberOfPages=m.getNumberOfPages=function(){return ve.length-1},mt=function(p,_,B){var ee,le=void 0;return B=B||{},p=p!==void 0?p:vt[Je].fontName,_=_!==void 0?_:vt[Je].fontStyle,ee=p.toLowerCase(),ft[ee]!==void 0&&ft[ee][_]!==void 0?le=ft[ee][_]:ft[p]!==void 0&&ft[p][_]!==void 0?le=ft[p][_]:B.disableWarning===!1&&on.warn("Unable to look up font label for font '"+p+"', '"+_+"'. Refer to getFontList() for available fonts."),le||B.noFallback||(le=ft.times[_])==null&&(le=ft.times.normal),le},Nt=m.__private__.putInfo=function(){var p=pn(),_=function(ee){return ee};for(var B in f!==null&&(_=sn.encryptor(p,0)),F("<<"),F("/Producer ("+Fs(_("jsPDF "+dt.version))+")"),xt)xt.hasOwnProperty(B)&&xt[B]&&F("/"+B.substr(0,1).toUpperCase()+B.substr(1)+" ("+Fs(_(xt[B]))+")");F("/CreationDate ("+Fs(_(q))+")"),F(">>"),F("endobj")},Bt=m.__private__.putCatalog=function(p){var _=(p=p||{}).rootDictionaryObjId||Ai;switch(pn(),F("<<"),F("/Type /Catalog"),F("/Pages "+_+" 0 R"),Se||(Se="fullwidth"),Se){case"fullwidth":F("/OpenAction [3 0 R /FitH null]");break;case"fullheight":F("/OpenAction [3 0 R /FitV null]");break;case"fullpage":F("/OpenAction [3 0 R /Fit]");break;case"original":F("/OpenAction [3 0 R /XYZ null null 1]");break;default:var B=""+Se;B.substr(B.length-1)==="%"&&(Se=parseInt(Se)/100),typeof Se=="number"&&F("/OpenAction [3 0 R /XYZ null null "+j(Se)+"]")}switch(lt||(lt="continuous"),lt){case"continuous":F("/PageLayout /OneColumn");break;case"single":F("/PageLayout /SinglePage");break;case"two":case"twoleft":F("/PageLayout /TwoColumnLeft");break;case"tworight":F("/PageLayout /TwoColumnRight")}De&&F("/PageMode /"+De),Ct.publish("putCatalog"),F(">>"),F("endobj")},tn=m.__private__.putTrailer=function(){F("trailer"),F("<<"),F("/Size "+(Y+1)),F("/Root "+Y+" 0 R"),F("/Info "+(Y-1)+" 0 R"),f!==null&&F("/Encrypt "+sn.oid+" 0 R"),F("/ID [ <"+L+"> <"+L+"> ]"),F(">>")},At=m.__private__.putHeader=function(){F("%PDF-"+A),F("%ºÃˆ ")},Fn=m.__private__.putXRef=function(){var p="0000000000";F("xref"),F("0 "+(Y+1)),F("0000000000 65535 f ");for(var _=1;_<=Y;_++)typeof te[_]=="function"?F((p+te[_]()).slice(-10)+" 00000 n "):te[_]!==void 0?F((p+te[_]).slice(-10)+" 00000 n "):F("0000000000 00000 n ")},Kt=m.__private__.buildDocument=function(){var p;Y=0,ge=0,ue=[],te=[],se=[],Ai=dn(),Us=dn(),He(ue),Ct.publish("buildDocument"),At(),js(),function(){Ct.publish("putAdditionalObjects");for(var B=0;B<se.length;B++){var ee=se[B];gn(ee.objId,!0),F(ee.content),F("endobj")}Ct.publish("postPutAdditionalObjects")}(),p=[],function(){for(var B in vt)vt.hasOwnProperty(B)&&(v===!1||v===!0&&w.hasOwnProperty(B))&&Yi(vt[B])}(),function(){var B;for(B in Ge)Ge.hasOwnProperty(B)&&fo(Ge[B])}(),function(){for(var B in wn)wn.hasOwnProperty(B)&&br(wn[B])}(),function(B){var ee;for(ee in Ke)Ke.hasOwnProperty(ee)&&(Ke[ee]instanceof fa?wr(Ke[ee]):Ke[ee]instanceof Ka&&yr(Ke[ee],B))}(p),Ct.publish("putResources"),p.forEach(Zr),Zr({resourcesOid:Us,objectOid:Number.MAX_SAFE_INTEGER}),Ct.publish("postPutResources"),f!==null&&(sn.oid=pn(),F("<<"),F("/Filter /Standard"),F("/V "+sn.v),F("/R "+sn.r),F("/U <"+sn.toHexString(sn.U)+">"),F("/O <"+sn.toHexString(sn.O)+">"),F("/P "+sn.P),F(">>"),F("endobj")),Nt(),Bt();var _=ge;return Fn(),tn(),F("startxref"),F(""+_),F("%%EOF"),He(ve[W]),ue.join(` 54`)},yn=m.__private__.getBlob=function(p){return new Blob([Ye(p)],{type:"application/pdf"})},Qn=function(p){for(;p.firstChild;)p.removeChild(p.firstChild)},un=function(p){var _,B=p.document,ee=B.documentElement,le=B.head,_e=B.body;return le||(le=B.createElement("head"),ee.appendChild(le)),_e||(_e=B.createElement("body"),ee.appendChild(_e)),Qn(le),Qn(_e),(_=B.createElement("style")).appendChild(B.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),le.appendChild(_),{document:B,body:_e}},Rt=m.output=m.__private__.output=(_s=function(p,_){switch(typeof(_=_||{})=="string"?_={filename:_}:_.filename=_.filename||"generated.pdf",p){case void 0:return Kt();case"save":m.save(_.filename);break;case"arraybuffer":return Ye(Kt());case"blob":return yn(Kt());case"bloburi":case"bloburl":if(wt.URL!==void 0&&typeof wt.URL.createObjectURL=="function")return wt.URL&&wt.URL.createObjectURL(yn(Kt()))||void 0;on.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var B="",ee=Kt();try{B=Rf(ee)}catch{B=Rf(unescape(encodeURIComponent(ee)))}return"data:application/pdf;filename="+encodeURIComponent(_.filename)+";base64,"+B;case"pdfobjectnewwindow":if(Object.prototype.toString.call(wt)==="[object Window]"){var le="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",_e=!_.pdfObjectUrl;_e||(le=_.pdfObjectUrl);var Ee=wt.open();if(Ee!==null){var rt=un(Ee),st=rt.document.createElement("script"),jt=this;st.src=le,_e&&(st.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",st.crossOrigin="anonymous"),st.onload=function(){Ee.PDFObject.embed(jt.output("dataurlstring"),_)},rt.body.appendChild(st)}return Ee}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(wt)==="[object Window]"){var Lt=_.pdfJsUrl||"examples/PDF.js/web/viewer.html",Wt=wt.open();if(Wt!==null){var Hn=un(Wt),rn=Hn.document.createElement("iframe"),nn=Lt.indexOf("?")===-1?"?":"&";jt=this,rn.id="pdfViewer",rn.width="500px",rn.height="400px",rn.src=Lt+nn+"file=&downloadName="+encodeURIComponent(_.filename),rn.onload=function(){Wt.document.title=_.filename,rn.contentWindow.PDFViewerApplication.open(jt.output("bloburl"))},Hn.body.appendChild(rn)}return Wt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(wt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var xn=wt.open();if(xn!==null){var kn=un(xn),An=kn.document.createElement("iframe");An.src=this.output("datauristring",_),kn.body.appendChild(An),xn.document.title=_.filename}if(xn||typeof safari>"u")return xn;break;case"datauri":case"dataurl":return wt.document.location.href=this.output("datauristring",_);default:return null}},_s.foo=function(){try{return _s.apply(this,arguments)}catch(B){var p=B.stack||"";~p.indexOf(" at ")&&(p=p.split(" at ")[1]);var _="Error in function "+p.split(` 55`)[0].split("<")[0]+": "+B.message;if(!wt.console)throw new Error(_);wt.console.error(_,B),wt.alert&&alert(_)}},_s.foo.bar=_s,_s.foo),Gt=function(p){return Array.isArray(Ws)===!0&&Ws.indexOf(p)>-1};switch(s){case"pt":ht=1;break;case"mm":ht=72/25.4;break;case"cm":ht=72/2.54;break;case"in":ht=72;break;case"px":ht=Gt("px_scaling")==1?.75:96/72;break;case"pc":case"em":ht=12;break;case"ex":ht=6;break;default:if(typeof s!="number")throw new Error("Invalid unit: "+s);ht=s}var sn=null;we(),Z();var ss=m.__private__.getPageInfo=m.getPageInfo=function(p){if(isNaN(p)||p%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:ut[p].objId,pageNumber:p,pageContext:ut[p]}},Ln=m.__private__.getPageInfoByObjId=function(p){if(isNaN(p)||p%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var _ in ut)if(ut[_].objId===p)break;return ss(_)},jn=m.__private__.getCurrentPageInfo=m.getCurrentPageInfo=function(){return{objId:ut[W].objId,pageNumber:W,pageContext:ut[W]}};m.addPage=function(){return Si.apply(this,arguments),this},m.setPage=function(){return J.apply(this,arguments),He.call(this,ve[W]),this},m.insertPage=function(p){return this.addPage(),this.movePage(W,p),this},m.movePage=function(p,_){var B,ee;if(p>_){B=ve[p],ee=ut[p];for(var le=p;le>_;le--)ve[le]=ve[le-1],ut[le]=ut[le-1];ve[_]=B,ut[_]=ee,this.setPage(_)}else if(p<_){B=ve[p],ee=ut[p];for(var _e=p;_e<_;_e++)ve[_e]=ve[_e+1],ut[_e]=ut[_e+1];ve[_]=B,ut[_]=ee,this.setPage(_)}return this},m.deletePage=function(){return jr.apply(this,arguments),this},m.__private__.text=m.text=function(p,_,B,ee,le){var _e,Ee,rt,st,jt,Lt,Wt,Hn,rn,nn=(ee=ee||{}).scope||this;if(typeof p=="number"&&typeof _=="number"&&(typeof B=="string"||Array.isArray(B))){var xn=B;B=_,_=p,p=xn}if(arguments[3]instanceof $e==0?(rt=arguments[4],st=arguments[5],en(Wt=arguments[3])==="object"&&Wt!==null||(typeof rt=="string"&&(st=rt,rt=null),typeof Wt=="string"&&(st=Wt,Wt=null),typeof Wt=="number"&&(rt=Wt,Wt=null),ee={flags:Wt,angle:rt,align:st})):(H("The transform parameter of text() with a Matrix value"),rn=le),isNaN(_)||isNaN(B)||p==null)throw new Error("Invalid arguments passed to jsPDF.text");if(p.length===0)return nn;var kn,An="",hs=typeof ee.lineHeightFactor=="number"?ee.lineHeightFactor:Qe,er=nn.internal.scaleFactor;function wo(hn){return hn=hn.split(" ").join(Array(ee.TabLen||9).join(" ")),Fs(hn,Wt)}function Qr(hn){for(var fn,On=hn.concat(),Yn=[],nr=On.length;nr--;)typeof(fn=On.shift())=="string"?Yn.push(fn):Array.isArray(hn)&&(fn.length===1||fn[1]===void 0&&fn[2]===void 0)?Yn.push(fn[0]):Yn.push([fn[0],fn[1],fn[2]]);return Yn}function ea(hn,fn){var On;if(typeof hn=="string")On=fn(hn)[0];else if(Array.isArray(hn)){for(var Yn,nr,Ao=hn.concat(),qa=[],wl=Ao.length;wl--;)typeof(Yn=Ao.shift())=="string"?qa.push(fn(Yn)[0]):Array.isArray(Yn)&&typeof Yn[0]=="string"&&(nr=fn(Yn[0],Yn[1],Yn[2]),qa.push([nr[0],nr[1],nr[2]]));On=qa}return On}var Sr=!1,ta=!0;if(typeof p=="string")Sr=!0;else if(Array.isArray(p)){var Ta=p.concat();Ee=[];for(var za,fs=Ta.length;fs--;)(typeof(za=Ta.shift())!="string"||Array.isArray(za)&&typeof za[0]!="str
55ing")&&(ta=!1);Sr=ta}if(Sr===!1)throw new Error('Type of text must be string or Array. "'+p+'" is not recognized.');typeof p=="string"&&(p=p.match(/[\r?\n]/)?p.split(/\r\n|\r|\n/g):[p]);var na=ce/nn.internal.scaleFactor,sa=na*(hs-1);switch(ee.baseline){case"bottom":B-=sa;break;case"top":B+=na-sa;break;case"hanging":B+=na-2*sa;break;case"middle":B+=na/2-sa}if((Lt=ee.maxWidth||0)>0&&(typeof p=="string"?p=nn.splitTextToSize(p,Lt):Object.prototype.toString.call(p)==="[object Array]"&&(p=p.reduce(function(hn,fn){return hn.concat(nn.splitTextToSize(fn,Lt))},[]))),_e={text:p,x:_,y:B,options:ee,mutex:{pdfEscape:Fs,activeFontKey:Je,fonts:vt,activeFontSize:ce}},Ct.publish("preProcessText",_e),p=_e.text,rt=(ee=_e.options).angle,rn instanceof $e==0&&rt&&typeof rt=="number"){rt*=Math.PI/180,ee.rotationDirection===0&&(rt=-rt),R===I&&(rt=-rt);var yo=Math.cos(rt),Pi=Math.sin(rt);rn=new $e(yo,Pi,-Pi,yo,0,0)}else rt&&rt instanceof $e&&(rn=rt);R!==I||rn||(rn=si),(jt=ee.charSpace||Pa)!==void 0&&(An+=K(C(jt))+` Tc 56`,this.setCharSpace(this.getCharSpace()||0)),(Hn=ee.horizontalScale)!==void 0&&(An+=K(100*Hn)+` Tz 57`),ee.lang;var ks=-1,vl=ee.renderingMode!==void 0?ee.renderingMode:ee.stroke,Fa=nn.internal.getCurrentPageInfo().pageContext;switch(vl){case 0:case!1:case"fill":ks=0;break;case 1:case!0:case"stroke":ks=1;break;case 2:case"fillThenStroke":ks=2;break;case 3:case"invisible":ks=3;break;case 4:case"fillAndAddForClipping":ks=4;break;case 5:case"strokeAndAddPathForClipping":ks=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":ks=6;break;case 7:case"addToPathForClipping":ks=7}var bl=Fa.usedRenderingMode!==void 0?Fa.usedRenderingMode:-1;ks!==-1?An+=ks+` Tr 58`:bl!==-1&&(An+=`0 Tr 59`),ks!==-1&&(Fa.usedRenderingMode=ks),st=ee.align||"left";var ai,ia=ce*hs,_o=nn.internal.pageSize.getWidth(),Oa=vt[Je];jt=ee.charSpace||Pa,Lt=ee.maxWidth||0,Wt=Object.assign({autoencode:!0,noBOM:!0},ee.flags);var ra=[],No=function(hn){return nn.getStringUnitWidth(hn,{font:Oa,charSpace:jt,fontSize:ce,doKerning:!1})*ce/er};if(Object.prototype.toString.call(p)==="[object Array]"){var As;Ee=Qr(p),st!=="left"&&(ai=Ee.map(No));var Ms,Ma=0;if(st==="right"){_-=ai[0],p=[],fs=Ee.length;for(var Lr=0;Lr<fs;Lr++)Lr===0?(Ms=Ki(_),As=Ji(B)):(Ms=C(Ma-ai[Lr]),As=-ia),p.push([Ee[Lr],Ms,As]),Ma=ai[Lr]}else if(st==="center"){_-=ai[0]/2,p=[],fs=Ee.length;for(var Er=0;Er<fs;Er++)Er===0?(Ms=Ki(_),As=Ji(B)):(Ms=C((Ma-ai[Er])/2),As=-ia),p.push([Ee[Er],Ms,As]),Ma=ai[Er]}else if(st==="left"){p=[],fs=Ee.length;for(var Ra=0;Ra<fs;Ra++)p.push(Ee[Ra])}else if(st==="justify"&&Oa.encoding==="Identity-H"){p=[],fs=Ee.length,Lt=Lt!==0?Lt:_o;for(var aa=0,Gn=0;Gn<fs;Gn++)if(As=Gn===0?Ji(B):-ia,Ms=Gn===0?Ki(_):aa,Gn<fs-1){var Ic=C((Lt-ai[Gn])/(Ee[Gn].split(" ").length-1)),Ci=Ee[Gn].split(" ");p.push([Ci[0]+" ",Ms,As]),aa=0;for(var gi=1;gi<Ci.length;gi++){var oa=(No(Ci[gi-1]+" "+Ci[gi])-No(Ci[gi]))*er+Ic;gi==Ci.length-1?p.push([Ci[gi],oa,0]):p.push([Ci[gi]+" ",oa,0]),aa-=oa}}else p.push([Ee[Gn],Ms,As]);p.push(["",aa,0])}else{if(st!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(p=[],fs=Ee.length,Lt=Lt!==0?Lt:_o,Gn=0;Gn<fs;Gn++){As=Gn===0?Ji(B):-ia,Ms=Gn===0?Ki(_):0;var jo=Ee[Gn].split(" ").length-1,ko=jo>0?(Lt-ai[Gn])/jo:0;Gn<fs-1?ra.push(K(C(ko))):ra.push(0),p.push([Ee[Gn],Ms,As])}}}(typeof ee.R2L=="boolean"?ee.R2L:xe)===!0&&(p=ea(p,function(hn,fn,On){return[hn.split("").reverse().join(""),fn,On]})),_e={text:p,x:_,y:B,options:ee,mutex:{pdfEscape:Fs,activeFontKey:Je,fonts:vt,activeFontSize:ce}},Ct.publish("postProcessText",_e),p=_e.text,kn=_e.mutex.isHex||!1;var Ia=vt[Je].encoding;Ia!=="WinAnsiEncoding"&&Ia!=="StandardEncoding"||(p=ea(p,function(hn,fn,On){return[wo(hn),fn,On]})),Ee=Qr(p),p=[];for(var la,ca,Pr,tr=Array.isArray(Ee[0])?1:0,Cr="",Ba=function(hn,fn,On){var Yn="";return On instanceof $e?(On=typeof ee.angle=="number"?bt(On,new $e(1,0,0,1,hn,fn)):bt(new $e(1,0,0,1,hn,fn),On),R===I&&(On=bt(ne
vendor: 4,365 bytes, lines 59-69
59w $e(1,0,0,-1,0,0),On)),Yn=On.join(" ")+` Tm 60`):Yn=K(hn)+" "+K(fn)+` Td 61`,Yn},ms=0;ms<Ee.length;ms++){switch(Cr="",tr){case 1:Pr=(kn?"<":"(")+Ee[ms][0]+(kn?">":")"),la=parseFloat(Ee[ms][1]),ca=parseFloat(Ee[ms][2]);break;case 0:Pr=(kn?"<":"(")+Ee[ms]+(kn?">":")"),la=Ki(_),ca=Ji(B)}ra!==void 0&&ra[ms]!==void 0&&(Cr=ra[ms]+` Tw 62`),ms===0?p.push(Cr+Ba(la,ca,rn)+Pr):tr===0?p.push(Cr+Pr):tr===1&&p.push(Cr+Ba(la,ca,rn)+Pr)}p=tr===0?p.join(` Tj 63T* `):p.join(` Tj 64`),p+=` Tj 65`;var Di=`BT 66/`;return Di+=Je+" "+ce+` Tf 67`,Di+=K(ce*hs)+` TL 68`,Di+=Ei+` 69`,Di+=An,Di+=p,F(Di+="ET"),w[Je]=!0,nn};var mi=m.__private__.clip=m.clip=function(p){return F(p==="evenodd"?"W*":"W"),this};m.clipEvenOdd=function(){return mi("evenodd")},m.__private__.discardPath=m.discardPath=function(){return F("n"),this};var is=m.__private__.isValidStyle=function(p){var _=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(p)!==-1&&(_=!0),_};m.__private__.setDefaultPathOperation=m.setDefaultPathOperation=function(p){return is(p)&&(h=p),this};var Vs=m.__private__.getStyle=m.getStyle=function(p){var _=h;switch(p){case"D":case"S":_="S";break;case"F":_="f";break;case"FD":case"DF":_="B";break;case"f":case"f*":case"B":case"B*":_=p}return _},ri=m.close=function(){return F("h"),this};m.stroke=function(){return F("S"),this},m.fill=function(p){return us("f",p),this},m.fillEvenOdd=function(p){return us("f*",p),this},m.fillStroke=function(p){return us("B",p),this},m.fillStrokeEvenOdd=function(p){return us("B*",p),this};var us=function(p,_){en(_)==="object"?kr(_,p):F(p)},Os=function(p){p===null||R===I&&p===void 0||(p=Vs(p),F(p))};function Li(p,_,B,ee,le){var _e=new Ka(_||this.boundingBox,B||this.xStep,ee||this.yStep,this.gState,le||this.matrix);_e.stream=this.stream;var Ee=p+"$$"+this.cloneIndex+++"$$";return ys(Ee,_e),_e}var kr=function(p,_){var B=yt[p.key],ee=Ke[B];if(ee instanceof fa)F("q"),F(pi(_)),ee.gState&&m.setGState(ee.gState),F(p.matrix.toString()+" cm"),F("/"+B+" sh"),F("Q");else if(ee instanceof Ka){var le=new $e(1,0,0,-1,0,Xr());p.matrix&&(le=le.multiply(p.matrix||si),B=Li.call(ee,p.key,p.boundingBox,p.xStep,p.yStep,le).id),F("q"),F("/Pattern cs"),F("/"+B+" scn"),ee.gState&&m.setGState(ee.gState),F(_),F("Q")}},pi=function(p){switch(p){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"}},Le=m.moveTo=function(p,_){return F(K(C(p))+" "+K($(_))+" m"),this},Tt=m.lineTo=function(p,_){return F(K(C(p))+" "+K($(_))+" l"),this},ye=m.curveTo=function(p,_,B,ee,le,_e){return F([K(C(p)),K($(_)),K(C(B)),K($(ee)),K(C(le)),K($(_e)),"c"].join(" ")),this};m.__private__.line=m.line=function(p,_,B,ee,le){if(isNaN(p)||isNaN(_)||isNaN(B)||isNaN(ee)||!is(le))throw new Error("Invalid arguments passed to jsPDF.line");return R===G?this.lines([[B-p,ee-_]],p,_,[1,1],le||"S"):this.lines([[B-p,ee-_]],p,_,[1,1]).stroke()},m.__private__.lines=m.lines=function(p,_,B,ee,le,_e){var Ee,rt,st,jt,Lt,Wt,Hn,rn,nn,xn,kn,An;if(typeof p=="number"&&(An=B,B=_,_=p,p=An),ee=ee||[1,1],_e=_e||!1,isNaN(_)||isNaN(B)||!Array.isArray(p)||!Array.isArray(ee)||!is(le)||typeof _e!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Le(_,B),Ee=ee[0],rt=ee[1],jt=p.length,xn=_,kn=B,st=0;st<jt;st++)(Lt=p[st]).length===2?(xn=Lt[0]*Ee+xn,kn=Lt[1]*rt+kn,Tt(xn,kn)):(Wt=Lt[0]*Ee+xn,Hn=Lt[1]*rt+kn,rn=Lt[2]*Ee+xn,nn=Lt[3]*rt+kn,xn=Lt[4]*Ee+xn,kn=Lt[5]*rt+kn,ye(Wt,Hn,rn,nn,xn,kn));return _e&&ri(),Os(le),this},m.path=function(p){for(var _=0;_<p.length;_++){var B=p[_],ee=B.c;switch(B.op){case"m":Le(ee[0],ee[1]);break;case"l":Tt(ee[0],ee[1]);break;case"c":ye.apply(this,ee);break;case"h":ri()}}return this},m.__private__.rect=m.rect=function(p,_,B,ee,le){if(isNaN(p)||isNaN(_)||isNaN(B)||isNaN(ee)||!is(le))throw new Error("Invalid arguments passed to jsPDF.rect");return R===G&&(ee=-ee),F([K(C(p)),K($(_)),K(C(B)),K(C(ee)),"re"].join(" ")),Os(le),this},m.__private__.triangle=m.triangle=function(p,_,B,ee,le,_e,Ee){if(isNaN(p)||isNaN(_)||isNaN(B)||isNaN(ee)||isNaN(le)||isNaN(_e)||!is(Ee))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[B-p,ee-_],[le-B,_e-ee],[p-le,_-_e]],p,_,[1,1],Ee,!0),this},m.__private__.roundedRect=m.roundedRect=function(p,_,B,ee,le,_e,Ee){if(isNaN(p)||isNaN(_)||isNaN(B)||isNaN(ee)||isNaN(le)||isNaN(_e)||!is(Ee))throw new Error("Invalid arguments passed to
69jsPDF.roundedRect");var rt=4/3*(Math.SQRT2-1);return le=Math.min(le,.5*B),_e=Math.min(_e,.5*ee),this.lines([[B-2*le,0],[le*rt,0,le,_e-_e*rt,le,_e],[0,ee-2*_e],[0,_e*rt,-le*rt,_e,-le,_e],[2*le-B,0],[-le*rt,0,-le,-_e*rt,-le,-_e],[0,2*_e-ee],[0,-_e*rt,le*rt,-_e,le,-_e]],p+le,_,[1,1],Ee,!0),this},m.__private__.ellipse=m.ellipse=function(p,_,B,ee,le){if(isNaN(p)||isNaN(_)||isNaN(B)||isNaN(ee)||!is(le))throw new Error("Invalid arguments passed to jsPDF.ellipse");var _e=4/3*(Math.SQRT2-1)*B,Ee=4/3*(Math.SQRT2-1)*ee;return Le(p+B,_),ye(p+B,_-Ee,p+_e,_-ee,p,_-ee),ye(p-_e,_-ee,p-B,_-Ee,p-B,_),ye(p-B,_+Ee,p-_e,_+ee,p,_+ee),ye(p+_e,_+ee,p+B,_+Ee,p+B,_),Os(le),this},m.__private__.circle=m.circle=function(p,_,B,ee){if(isNaN(p)||isNaN(_)||isNaN(B)||!is(ee))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(p,_,B,B,ee)},m.setFont=function(p,_,B){return B&&(_=oe(_,B)),Je=mt(p,_,{disableWarning:!1}),this};var Ue=m.__private__.getFont=m.getFont=function(){return vt[mt.apply(m,arguments)]};m.__private__.getFontList=m.getFontList=function(){var p,_,B={};for(p in ft)if(ft.hasOwnProperty(p))for(_ in B[p]=[],ft[p])ft[p].hasOwnProperty(_)&&B[p].push(_);return B},m.addFont=function(p,_,B,ee,le){var _e=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&_e.indexOf(arguments[3])!==-1?le=arguments[3]:arguments[3]&&_e.indexOf(arguments[3])==-1&&(B=oe(B,ee)),Yr.call(this,p,_,B,le=le||"Identity-H")};var Qe,We=e.lineWidth||.200025,It=m.__private__.getLineWidth=m.getLineWidth=function(){return We},Zn=m.__private__.setLineWidth=m.setLineWidth=function(p){return We=p,F(K(C(p))+" w"),this};m.__private__.setLineDash=dt.API.setLineDash=dt.API.setLineDashPattern=function(p,_){if(p=p||[],_=_||0,isNaN(_)||!Array.isArray(p))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return p=p.map(function(B){return K(C(B))}).join(" "),_=K(C(_)),F("["+p+"] "+_+" d"),this};var En=m.__private__.getLineHeight=m.getLineHeight=function(){return ce*Qe};m.__private__.getLineHeight=m.getLineHeight=function(){return ce*Qe};var Kr=m.__private__.setLineHeightFactor=m.setLineHeightFactor=function(p){return typeof(p=p||1.15)=="number"&&(Qe=p),this},mo=m.__private__.getLineHeightFactor=m.getLineHeightFactor=function(){return Qe};Kr(e.lineHeight);var Ki=m.__private__.getHorizontalCoordinate=function(p){return C(p)},Ji=m.__private__.getVerticalCoordinate=function(p){return R===I?p:ut[W].mediaBox.topRightY-ut[W].mediaBox.bottomLeftY-C(p)},Fc=m.__private__.getHorizontalCoordinateString=m.getHorizontalCoordinateString=function(p){return K(Ki(p))},Oc=m.__private__.getVerticalCoordinateString=m.getVerticalCoordinateString=function(p){return K(Ji(p))},Ea=e.strokeColor||"0 G";m.__private__.getStrokeColor=m.getDrawColor=function(){return ii(Ea)},m.__private__.setStrokeColor=m.setDrawColor=function(p,_,B,ee){return Ea=Ts({ch1:p,ch2:_,ch3:B,ch4:ee,pdfColorType:"draw",precision:2}),F(Ea),this};var po=e.fillColor||"0 g";m.__private__.getFillColor=m.getFillColor=function(){return ii(po)},m.__private__.setFillColor=m.setFillColor=function(p,_,B,ee){return po=Ts({ch1:p,ch2:_,ch3:B,ch4:ee,pdfColorType:"fill",precision:2}),F(po),this};var Ei=e.textColor||"0 g",Mc=m.__private__.getTextColor=m.getTextColor=function(){return ii(Ei)};m.__private__.setTextColor=m.setTextColor=function(p,_,B,ee){return Ei=Ts({ch1:p,ch2:_,ch3:B,ch4:ee,pdfColorType:"text",precision:3}),this};var Pa=e.charSpace,Rc=m.__private__.getCharSpace=m.getCharSpace=function(){return parseFloat(Pa||0)};m.__private__.setCharSpace=m.setCharSpace=function(p){if(isNaN(p))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Pa=p,this};var go=0;m.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},m.__private__.setLineCap=m.setLineCap=function(p){var _=m.CapJoinStyles[p];if(_===void 0)throw new Error("Line cap style of '"+p+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return go=_,F(_+" J"),this};var Ar=0;m.__private__.setLineJoin=m.setLineJoin=function(p){var _=m.CapJoinStyles[p];if(_===void 0)throw new Error("Line join style of '"+p+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Ar=_,F(_+" j"),this},m.__private__.setLineMiterLimit=m.__private__.setMiterLimit=m.setLineMiterLimit=m.setMiterLimit=function(p){if(p=p||0,isNaN(p))throw new Error("Invalid argument passed to
69jsPDF.setLineMiterLimit");return F(K(C(p))+" M"),this},m.GState=jc,m.setGState=function(p){(p=typeof p=="string"?Ge[qe[p]]:xo(null,p)).equals(_t)||(F("/"+p.id+" gs"),_t=p)};var xo=function(p,_){if(!p||!qe[p]){var B=!1;for(var ee in Ge)if(Ge.hasOwnProperty(ee)&&Ge[ee].equals(_)){B=!0;break}if(B)_=Ge[ee];else{var le="GS"+(Object.keys(Ge).length+1).toString(10);Ge[le]=_,_.id=le}return p&&(qe[p]=_.id),Ct.publish("addGState",_),_}};m.addGState=function(p,_){return xo(p,_),this},m.saveGraphicsState=function(){return F("q"),kt.push({key:Je,size:ce,color:Ei}),this},m.restoreGraphicsState=function(){F("Q");var p=kt.pop();return Je=p.key,ce=p.size,Ei=p.color,_t=null,this},m.setCurrentTransformationMatrix=function(p){return F(p.toString()+" cm"),this},m.comment=function(p){return F("#"+p),this};var Jr=function(p,_){var B=p||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return B},set:function(_e){isNaN(_e)||(B=parseFloat(_e))}});var ee=_||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return ee},set:function(_e){isNaN(_e)||(ee=parseFloat(_e))}});var le="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return le},set:function(_e){le=_e.toString()}}),this},vo=function(p,_,B,ee){Jr.call(this,p,_),this.type="rect";var le=B||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return le},set:function(Ee){isNaN(Ee)||(le=parseFloat(Ee))}});var _e=ee||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return _e},set:function(Ee){isNaN(Ee)||(_e=parseFloat(Ee))}}),this},Ca=function(){this.page=Dt,this.currentPage=W,this.pages=ve.slice(0),this.pagesContext=ut.slice(0),this.x=Xe,this.y=Yt,this.matrix=Mt,this.width=fl(W),this.height=Qi(W),this.outputDestination=Pe,this.id="",this.objectNumber=-1};Ca.prototype.restore=function(){Dt=this.page,W=this.currentPage,ut=this.pagesContext,ve=this.pages,Xe=this.x,Yt=this.y,Mt=this.matrix,Xi(W,this.width),ml(W,this.height),Pe=this.outputDestination};var bo=function(p,_,B,ee,le){Ds.push(new Ca),Dt=W=0,ve=[],Xe=p,Yt=_,Mt=le,Nr([B,ee])};for(var Da in m.beginFormObject=function(p,_,B,ee,le){return bo(p,_,B,ee,le),this},m.endFormObject=function(p){return function(_){if($n[_])Ds.pop().restore();else{var B=new Ca,ee="Xo"+(Object.keys(wn).length+1).toString(10);B.id=ee,$n[_]=ee,wn[ee]=B,Ct.publish("addFormObject",B),Ds.pop().restore()}}(p),this},m.doFormObject=function(p,_){var B=wn[$n[p]];return F("q"),F(_.toString()+" cm"),F("/"+B.id+" Do"),F("Q"),this},m.getFormObject=function(p){var _=wn[$n[p]];return{x:_.x,y:_.y,width:_.width,height:_.height,matrix:_.matrix}},m.save=function(p,_){return p=p||"generated.pdf",(_=_||{}).returnPromise=_.returnPromise||!1,_.returnPromise===!1?(ha(yn(Kt()),p),typeof ha.unload=="function"&&wt.setTimeout&&setTimeout(ha.unload,911),this):new Promise(function(B,ee){try{var le=ha(yn(Kt()),p);typeof ha.unload=="function"&&wt.setTimeout&&setTimeout(ha.unload,911),B(le)}catch(_e){ee(_e.message)}})},dt.API)dt.API.hasOwnProperty(Da)&&(Da==="events"&&dt.API.events.length?function(p,_){var B,ee,le;for(le=_.length-1;le!==-1;le--)B=_[le][0],ee=_[le][1],p.subscribe.apply(p,[B].concat(typeof ee=="function"?[ee]:ee))}(Ct,dt.API.events):m[Da]=dt.API[Da]);function fl(p){return ut[p].mediaBox.topRightX-ut[p].mediaBox.bottomLeftX}function Xi(p,_){ut[p].mediaBox.topRightX=_+ut[p].mediaBox.bottomLeftX}function Qi(p){return ut[p].mediaBox.topRightY-ut[p].mediaBox.bottomLeftY}function ml(p,_){ut[p].mediaBox.topRightY=_+ut[p].mediaBox.bottomLeftY}var pl=m.getPageWidth=function(p){return fl(p=p||W)/ht},gl=m.setPageWidth=function(p,_){Xi(p,_*ht)},Xr=m.getPageHeight=function(p){return Qi(p=p||W)/ht},xl=m.setPageHeight=function(p,_){ml(p,_*ht)};return m.internal={pdfEscape:Fs,getStyle:Vs,getFont:Ue,getFontSize:Te,getCharSpace:Rc,getTextColor:Mc,getLineHeight:En,getLineHeightFactor:mo,getLineWidth:It,write:ze,getHorizontalCoordinate:Ki,getVerticalCoordinate:Ji,getCoordinateString:Fc,getVerticalCoordinateString:Oc,collections:{},newObject:pn,newAdditionalObject:$i,newObjectDeferred:dn,newObjectDeferredBegin:gn,getFilters:Ns,putStream:zs,events:Ct,scaleFactor:ht,pageSize:{getWidth:function(){return pl(W)}
vendor: 21,154 bytes, lines 69-77
69,setWidth:function(p){gl(W,p)},getHeight:function(){return Xr(W)},setHeight:function(p){xl(W,p)}},encryptionOptions:f,encryption:sn,getEncryptor:function(p){return f!==null?sn.encryptor(p,0):function(_){return _}},output:Rt,getNumberOfPages:Re,get pages(){return ve},out:F,f2:j,f3:z,getPageInfo:ss,getPageInfoByObjId:Ln,getCurrentPageInfo:jn,getPDFVersion:y,Point:Jr,Rectangle:vo,Matrix:$e,hasHotfix:Gt},Object.defineProperty(m.internal.pageSize,"width",{get:function(){return pl(W)},set:function(p){gl(W,p)},enumerable:!0,configurable:!0}),Object.defineProperty(m.internal.pageSize,"height",{get:function(){return Xr(W)},set:function(p){xl(W,p)},enumerable:!0,configurable:!0}),(function(p){for(var _=0,B=Me.length;_<B;_++){var ee=Yr.call(this,p[_][0],p[_][1],p[_][2],Me[_][3],!0);v===!1&&(w[ee]=!0);var le=p[_][0].split("-");_r({id:ee,fontName:le[0],fontStyle:le[1]||""})}Ct.publish("addFonts",{fonts:vt,dictionary:ft})}).call(m,Me),Je="F1",Si(i,t),Ct.publish("initialized"),m}$a.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},$a.prototype.toHexString=function(e){return e.split("").map(function(n){return("0"+(255&n.charCodeAt(0)).toString(16)).slice(-2)}).join("")},$a.prototype.hexToBytes=function(e){for(var n=[],t=0;t<e.length;t+=2)n.push(String.fromCharCode(parseInt(e.substr(t,2),16)));return n.join("")},$a.prototype.processOwnerPassword=function(e,n){return lu(ou(n).substr(0,5),e)},$a.prototype.encryptor=function(e,n){var t=ou(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&n,n>>8&255)).substr(0,10);return function(s){return lu(t,s)}},jc.prototype.equals=function(e){var n,t="id,objectNumber,equals";if(!e||en(e)!==en(this))return!1;var s=0;for(n in this)if(!(t.indexOf(n)>=0)){if(this.hasOwnProperty(n)&&!e.hasOwnProperty(n)||this[n]!==e[n])return!1;s++}for(n in e)e.hasOwnProperty(n)&&t.indexOf(n)<0&&s--;return s===0},dt.API={events:[]},dt.version="4.2.1";var Dn=dt.API,Du=1,La=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ha=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Aa=function(e){return e.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(n){var t=n.charCodeAt(0).toString(16).toUpperCase();return"#"+(t.length===1?"0"+t:t)})},St=function(e){return e.toFixed(2)},Ir=function(e){return e.toFixed(5)};Dn.__acroform__={};var qs=function(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e},Wf=function(e){return e*Du},Oi=function(e){var n=new Vp,t=tt.internal.getHeight(e)||0,s=tt.internal.getWidth(e)||0;return n.BBox=[0,0,Number(St(s)),Number(St(t))],n},Yv=Dn.__acroform__.setBit=function(e,n){if(e=e||0,n=n||0,isNaN(e)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<n},Kv=Dn.__acroform__.clearBit=function(e,n){if(e=e||0,n=n||0,isNaN(e)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<n)},Jv=Dn.__acroform__.getBit=function(e,n){if(isNaN(e)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<n?1:0},In=Dn.__acroform__.getBitForPdf=function(e,n){if(isNaN(e)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Jv(e,n-1)},Bn=Dn.__acroform__.setBitForPdf=function(e,n){if(isNaN(e)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Yv(e,n-1)},qn=Dn.__acroform__.clearBitForPdf=function(e,n){if(isNaN(e)||isNaN(n))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Kv(e,n-1)},Xv=Dn.__acroform__.calculateCoordinates=function(e,n){var t=n.internal.getHorizontalCoordinate,s=n.internal.getVerticalCoordinate,i=e[0],r=e[1],l=e[2],o=e[3],u={};return u.lowerLeft_X=t(i)||0,u.lowerLeft_Y=s(r+o)||0,u.upperRight_X=t(i+l)||0,u.upperRight_Y=s(r)||0,[Number(St(u.lowerLeft_X)),Number(St(u.lowerLeft_Y)),Number(St(u.upperRight_X)),Number(St(u.upperRight_Y))]},Qv=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var n=[],t=e._V||e.DV,s=cu(e,t),i=e.scope.internal.getFont(e.fontName,e.fontStyle).id;n.push("/Tx BMC"),n.push("q"),n.push("BT"),n.push(e.scope.__private__.encodeColorString(e.color)),n.push("/"+i+" "+St(s.fontSize)+" Tf"),n.push("1 0 0 1 0 0 Tm"),n.push(s.text),n.push("ET"),n.push("Q"),n.push("EMC");var r=Oi(e);return r.scope=e.scope,r.stream=n.join(` 70`),r}},cu=function(e,n){var t=e.fontSize===0?e.maxFontSize:e.fontSize,s={text:"",fontSize:""},i=(n=(n=n.substr(0,1)=="("?n.substr(1):n).substr(n.length-1)==")"?n.substr(0,n.length-1):n).split(" ");i=e.multiline?i.map(function(j){return j.split(` 71`)}):i.map(function(j){return[j]});var r=t,l=tt.internal.getHeight(e)||0;l=l<0?-l:l;var o=tt.internal.getWidth(e)||0;o=o<0?-o:o;var u=function(j,z,C){if(j+1<i.length){var $=z+" "+i[j+1][0];return $l($,e,C).width<=o-4}return!1};r++;e:for(;r>0;){n="",r--;var h,f,v=$l("3",e,r).height,w=e.multiline?l-r:(l-v)/2,m=w+=2,A=0,y=0,P=0;if(r<=0){n=`(...) Tj 72`,n+="% Width of Text: "+$l(n,e,r=12).width+", FieldWidth:"+o+` 73`;break}for(var k="",G=0,I=0;I<i.length;I++)if(i.hasOwnProperty(I)){var R=!1;if(i[I].length!==1&&P!==i[I].length-1){if((v+2)*(G+2)+2>l)continue e;k+=i[I][P],R=!0,y=I,I--}else{k=(k+=i[I][P]+" ").substr(k.length-1)==" "?k.substr(0,k.length-1):k;var Q=parseInt(I),me=u(Q,k,r),oe=I>=i.length-1;if(me&&!oe){k+=" ",P=0;continue}if(me||oe){if(oe)y=Q;else if(e.multiline&&(v+2)*(G+2)+2>l)continue e}else{if(!e.multiline||(v+2)*(G+2)+2>l)continue e;y=Q}}for(var K="",H=A;H<=y;H++){var ie=i[H];if(e.multiline){if(H===y){K+=ie[P]+" ",P=(P+1)%ie.length;continue}if(H===A){K+=ie[ie.length-1]+" ";continue}}K+=ie[0]+" "}switch(K=K.substr(K.length-1)==" "?K.substr(0,K.length-1):K,f=$l(K,e,r).width,e.textAlign){case"right":h=o-f-2;break;case"center":h=(o-f)/2;break;default:h=2}n+=St(h)+" "+St(m)+` Td 74`,n+="("+La(K)+`) Tj 75`,n+=-St(h)+` 0 Td 76`,m=-(r+2),f=0,A=R?y:y+1,G++,k=""}break}return s.text=n,s.fontSize=r,s},$l=function(e,n,t){var s=n.scope.internal.getFont(n.fontName,n.fontStyle),i=n.scope.getStringUnitWidth(e,{font:s,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:n.scope.getStringUnitWidth("3",{font:s,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:i}},eb={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},tb=function(e,n){var t={type:"reference",object:e};n.internal.getPageInfo(e.page).pageContext.annotations.find(function(s){return s.type===t.type&&s.object===t.object})===void 0&&n.internal.getPageInfo(e.page).pageContext.annotations.push(t)},nb=function(e,n){if(n.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(ji.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(eb)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Du=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new Hp,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var s=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in s)if(s.hasOwnProperty(i)){var r=s[i];r.objId=void 0,r.hasAnnotation&&tb(r,t)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(t){(function(s,i){var r=!s;for(var l in s||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),s=s||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(s.hasOwnProperty(l)){var o=s[l],u=[],h=o.Rect;if(o.Rect&&(o.Rect=Xv(o.Rect,i)),i.internal.newObjectDeferredBegin(o.objId,!0),o.DA=tt.createDefaultAppearanceStream(o),en(o)==="object"&&typeof o.getKeyValueListForStream=="function"&&(u=o.getKeyValueListForStream()),o.Rect=h,o.hasAppearanceStream&&!o.appearanceStreamContent){var f=Qv(o);u.push({key:"AP",value:"<</N "+f+">>"}),i.internal.acroformPlugin.xForms.push(f)}if(o.appearanceStreamContent){var v="";for(var w in o.appearanceStreamContent)if(o.appearanceStreamContent.hasOwnProperty(w)){var m=o.appearanceStreamContent[w];if(v+="/"+w+" ",v+="<<",Object.keys(m).length>=1||Array.isArray(m)){for(var l in m)if(m.hasOwnProperty(l)){var A=m[l];typeof A=="function"&&(A=A.call(i,o)),v+="/"+l+" "+A+" ",i.internal.acroformPlugin.xForms.indexOf(A)>=0||i.internal.acroformPlugin.xForms.push(A)}}else typeof(A=m)=="function"&&(A=A.call(i,o)),v+="/"+l+" "+A,i.internal.acroformPlugin.xForms.indexOf(A)>=0||i.internal.acroformPlugin.xForms.push(A);v+=">>"}u.push({key:"AP",value:`<< 77`+v+">>"})}i.internal.putStream({additionalKeyValues:u,objectId:o.objId}),i.internal.out("endobj")}r&&function(y,P){for(var k in y)if(y.hasOwnProperty(k)){var G=k,I=y[k];P.internal.newObjectDeferredBegin(I.objId,!0),en(I)==="object"&&typeof I.putStream=="function"&&I.putStream(),delete y[G]}}(i.internal.acroformPlugin.xForms,i)})(t,e)}),e.internal.acroformPlugin.isInitialized=!0}},Up=Dn.__acroform__.arrayToPdfArray=function(e,n,t){var s=function(l){return l};if(Array.isArray(e)){for(var i="[",r=0;r<e.length;r++)switch(r!==0&&(i+=" "),en(e[r])){case"boolean":case"number":case"object":i+=e[r].toString();break;case"string":e[r].substr(0,1)==="/"?i+="/"+Aa(e[r].substr(1)):(n!==void 0&&t&&(s=t.internal.getEncryptor(n)),i+="("+La(s(e[r].toString()))+")")}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Ed=function(e,n,t){var s=function(i){return i};return n!==void 0&&t&&(s=t.internal.getEncryptor(n)),(e=e||"").toString(),"("+La(s(e))+")"},Ui=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Ui.prototype.toString=function(){return this.objId+" 0 R"},Ui.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},Ui.prototype.getKeyValueListForStream=function(){var e=[],n=Object.getOwnPropertyNames(this).filter(function(r){return r!="content"&&r!="appearanceStreamContent"&&r!="scope"&&r!="objId"&&r.substring(0,1)!="_"});for(var t in n)if(Object.getOwnPropertyDescriptor(this,n[t]).configurable===!1){var s=n[t],i=this[s];i&&(Array.isArray(i)?e.push({key:s,value:Up(i,this.objId,this.scope)}):i instanceof Ui?(i.scope=this.scope,e.push({key:s,value:i.objId+" 0 R"})):typeof i!="function"&&e.push({key:s,value:i}))}return e};var Vp=function(){Ui.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,n=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return n},set:function(t){n=t}}),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}})};qs(Vp,Ui);var Hp=function(){Ui.call(this);var e,n=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return n.length>0?n:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return n}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(s){return s};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+La(t(e))+")"}},set:function(t){e=t}})};qs(Hp,Ui);var ji=function e(){Ui.call(this);var n=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return n},set:function(k){if(isNaN(k))throw new Error('Invalid value "'+k+'" for attribute F supplied.');n=k}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!In(n,3)},set:function(k){k?this.F=Bn(n,3):this.F=qn(n,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(k){if(isNaN(k))throw new Error('Invalid value "'+k+'" for attribute Ff supplied.');t=k}});var s=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(s.length!==0)return s},set:function(k){s=k!==void 0?k:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!s||isNaN(s[0])?0:s[0]},set:function(k){s[0]=k}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!s||isNaN(s[1])?0:s[1]},set:function(k){s[1]=k}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!s||isNaN(s[2])?0:s[2]},set:function(k){s[2]=k}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!s||isNaN(s[3])?0:s[3]},set:function(k){s[3]=k}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(k){switch(k){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=k;break;default:throw new Error('Invalid value "'+k+'" for attribute FT supplied.')}}});var r=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!r||r.length<1){if(this instanceof kc)return;r="FieldObject"+e.FieldNum++}var k=function(G){return G};return this.scope&&(k=this.scope.internal.getEncryptor(this.objId)),"("+La(k(r))+")"},set:function(k){r=k.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return r},set:function(k){r=k}});var l="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return l},set:function(k){l=k}});var o="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return o},set:function(k){o=k}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(k){u=k}});var h=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return h===void 0?50/Du:h},set:function(k){h=k}});var f="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return f},set:function(k){f=k}});var v="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!v||this instanceof kc||this instanceof ya))return Ed(v,this.objId,this.scope)},set:function(k){k=k.toString(),v=k}});var w=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(w)return this instanceof ns==0?Ed(w,this.objId,this.scope):w},set:function(k){k=k.toString(),w=this instanceof ns==0?k.substr(0,1)==="("?Ha(k.substr(1,k.length-2)):Ha(k):k}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof ns==1?Ha(w.substr(1,w.length-1)):w},set:function(k){k=k.toString(),w=this instanceof ns==1?"/"+Aa(k):k}});var m=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(m)return m},set:function(k){this.V=k}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(m)return this instanceof ns==0?Ed(m,this.objId,this.scope):m},set:function(k){k=k.toString(),m=this instanceof ns==0?k.substr(0,1)==="("?Ha(k.substr(1,k.length-2)):Ha(k):k}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof ns==1?Ha(m.substr(1,m.length-1)):m},set:function(k){k=k.toString(),m=this instanceof ns==1?"/"+Aa(k):k}}),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 A,y=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return y},set:function(k){k=!!k,y=k}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(A)return A},set:function(k){A=k}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,1)},set:function(k){k?this.Ff=Bn(this.Ff,1):this.Ff=qn(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,2)},set:function(k){k?this.Ff=Bn(this.Ff,2):this.Ff=qn(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,3)},set:function(k){k?this.Ff=Bn(this.Ff,3):this.Ff=qn(this.Ff,3)}});var P=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(P!==null)return P},set:function(k){if([0,1,2].indexOf(k)===-1)throw new Error('Invalid value "'+k+'" for attribute Q supplied.');P=k}}),Object.defineProperty(this,"textAlign",{get:function(){var k;switch(P){case 0:default:k="left";break;case 1:k="center";break;case 2:k="right"}return k},configurable:!0,enumerable:!0,set:function(k){switch(k){case"right":case 2:P=2;break;case"center":case 1:P=1;break;default:P=0}}})};qs(ji,Ui);var Qa=function(){ji.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 n=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return Up(n,this.objId,this.scope)},set:function(t){var s,i;i=[],typeof(s=t)=="string"&&(i=function(r,l,o){o||(o=1);for(var u,h=[];u=l.exec(r);)h.push(u[o]);return h}(s,/\((.*?)\)/g)),n=i}}),this.getOptions=function(){return n},this.setOptions=function(t){n=t,this.sort&&n.sort()},this.addOption=function(t){t=(t=t||"").toString(),n.push(t),this.sort&&n.sort()},this.removeOption=function(t,s){for(s=s||!1,t=(t=t||"").toString();n.indexOf(t)!==-1&&(n.splice(n.indexOf(t),1),s!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,18)},set:function(t){t?this.Ff=Bn(this.Ff,18):this.Ff=qn(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=Bn(this.Ff,19):this.Ff=qn(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,20)},set:function(t){t?(this.Ff=Bn(this.Ff,20),n.sort()):this.Ff=qn(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,22)},set:function(t){t?this.Ff=Bn(this.Ff,22):this.Ff=qn(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,23)},set:function(t){t?this.Ff=Bn(this.Ff,23):this.Ff=qn(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,27)},set:function(t){t?this.Ff=Bn(this.Ff,27):this.Ff=qn(this.Ff,27)}}),this.hasAppearanceStream=!1};qs(Qa,ji);var eo=function(){Qa.call(this),this.fontName="helvetica",this.combo=!1};qs(eo,Qa);var to=function(){eo.call(this),this.combo=!0};qs(to,eo);var rc=function(){to.call(this),this.edit=!0};qs(rc,to);var ns=function(){ji.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,15)},set:function(t){t?this.Ff=Bn(this.Ff,15):this.Ff=qn(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,16)},set:function(t){t?this.Ff=Bn(this.Ff,16):this.Ff=qn(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,17)},set:function(t){t?this.Ff=Bn(this.Ff,17):this.Ff=qn(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,26)},set:function(t){t?this.Ff=Bn(this.Ff,26):this.Ff=qn(this.Ff,26)}});var e,n={};
77Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(r){return r};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(n).length!==0){var s,i=[];for(s in i.push("<<"),n)i.push("/"+s+" ("+La(t(n[s]))+")");return i.push(">>"),i.join(` 78`)}},set:function(t){en(t)==="object"&&(n=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){typeof t=="string"&&(n.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){var s=t==null?"":t.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),e="/"+Aa(s)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+Aa(t)}})};qs(ns,ji);var ac=function(){ns.call(this),this.pushButton=!0};qs(ac,ns);var no=function(){ns.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(n){e=n!==void 0?n:[]}})};qs(no,ns);var kc=function(){var e,n;ji.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(i){e=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(i){n=i}});var t,s={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(o){return o};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var r,l=[];for(r in l.push("<<"),s)l.push("/"+r+" ("+La(i(s[r]))+")");return l.push(">>"),l.join(` 79`)},set:function(i){en(i)==="object"&&(s=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return s.CA||""},set:function(i){typeof i=="string"&&(s.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(i){var r=i==null?"":i.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),t="/"+Aa(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(i){var r=i==null?"":i.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),t="/"+Aa(r)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=tt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};qs(kc,ji),no.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 n in this.Kids)if(this.Kids.hasOwnProperty(n)){var t=this.Kids[n];t.appearanceStreamContent=e.createAppearanceStream(t.optionName),t.caption=e.getCA()}},no.prototype.createOption=function(e){var n=new kc;return n.Parent=this,n.optionName=e,this.Kids.push(n),sb.call(this.scope,n),n};var oc=function(){ns.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=tt.CheckBox.createAppearanceStream()};qs(oc,ns);var ya=function(){ji.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,13)},set:function(n){n?this.Ff=Bn(this.Ff,13):this.Ff=qn(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,21)},set:function(n){n?this.Ff=Bn(this.Ff,21):this.Ff=qn(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,23)},set:function(n){n?this.Ff=Bn(this.Ff,23):this.Ff=qn(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,24)},set:function(n){n?this.Ff=Bn(this.Ff,24):this.Ff=qn(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,25)},set:function(n){n?this.Ff=Bn(this.Ff,25):this.Ff=qn(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,26)},set:function(n){n?this.Ff=Bn(this.Ff,26):this.Ff=qn(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(n){Number.isInteger(n)&&(e=n)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};qs(ya,ji);
vendor: 18,714 bytes, lines 79-88
79var lc=function(){ya.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!In(this.Ff,14)},set:function(e){e?this.Ff=Bn(this.Ff,14):this.Ff=qn(this.Ff,14)}}),this.password=!0};qs(lc,ya);var tt={CheckBox:{createAppearanceStream:function(){return{N:{On:tt.CheckBox.YesNormal},D:{On:tt.CheckBox.YesPushDown,Off:tt.CheckBox.OffPushDown}}},YesPushDown:function(e){var n=Oi(e);n.scope=e.scope;var t=[],s=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),r=cu(e,e.caption);return t.push("0.749023 g"),t.push("0 0 "+St(tt.internal.getWidth(e))+" "+St(tt.internal.getHeight(e))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+s+" "+St(r.fontSize)+" Tf "+i),t.push("BT"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC"),n.stream=t.join(` 80`),n},YesNormal:function(e){var n=Oi(e);n.scope=e.scope;var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,s=e.scope.__private__.encodeColorString(e.color),i=[],r=tt.internal.getHeight(e),l=tt.internal.getWidth(e),o=cu(e,e.caption);return i.push("1 g"),i.push("0 0 "+St(l)+" "+St(r)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+St(l-1)+" "+St(r-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+t+" "+St(o.fontSize)+" Tf "+s),i.push(o.text),i.push("ET"),i.push("Q"),n.stream=i.join(` 81`),n},OffPushDown:function(e){var n=Oi(e);n.scope=e.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+St(tt.internal.getWidth(e))+" "+St(tt.internal.getHeight(e))+" re"),t.push("f"),n.stream=t.join(` 82`),n}},RadioButton:{Circle:{createAppearanceStream:function(e){var n={D:{Off:tt.RadioButton.Circle.OffPushDown},N:{}};return n.N[e]=tt.RadioButton.Circle.YesNormal,n.D[e]=tt.RadioButton.Circle.YesPushDown,n},getCA:function(){return"l"},YesNormal:function(e){var n=Oi(e);n.scope=e.scope;var t=[],s=tt.internal.getWidth(e)<=tt.internal.getHeight(e)?tt.internal.getWidth(e)/4:tt.internal.getHeight(e)/4;s=Number((.9*s).toFixed(5));var i=tt.internal.Bezier_C,r=Number((s*i).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+Ir(tt.internal.getWidth(e)/2)+" "+Ir(tt.internal.getHeight(e)/2)+" cm"),t.push(s+" 0 m"),t.push(s+" "+r+" "+r+" "+s+" 0 "+s+" c"),t.push("-"+r+" "+s+" -"+s+" "+r+" -"+s+" 0 c"),t.push("-"+s+" -"+r+" -"+r+" -"+s+" 0 -"+s+" c"),t.push(r+" -"+s+" "+s+" -"+r+" "+s+" 0 c"),t.push("f"),t.push("Q"),n.stream=t.join(` 83`),n},YesPushDown:function(e){var n=Oi(e);n.scope=e.scope;var t=[],s=tt.internal.getWidth(e)<=tt.internal.getHeight(e)?tt.internal.getWidth(e)/4:tt.internal.getHeight(e)/4;s=Number((.9*s).toFixed(5));var i=Number((2*s).toFixed(5)),r=Number((i*tt.internal.Bezier_C).toFixed(5)),l=Number((s*tt.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Ir(tt.internal.getWidth(e)/2)+" "+Ir(tt.internal.getHeight(e)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+r+" "+r+" "+i+" 0 "+i+" c"),t.push("-"+r+" "+i+" -"+i+" "+r+" -"+i+" 0 c"),t.push("-"+i+" -"+r+" -"+r+" -"+i+" 0 -"+i+" c"),t.push(r+" -"+i+" "+i+" -"+r+" "+i+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+Ir(tt.internal.getWidth(e)/2)+" "+Ir(tt.internal.getHeight(e)/2)+" cm"),t.push(s+" 0 m"),t.push(s+" "+l+" "+l+" "+s+" 0 "+s+" c"),t.push("-"+l+" "+s+" -"+s+" "+l+" -"+s+" 0 c"),t.push("-"+s+" -"+l+" -"+l+" -"+s+" 0 -"+s+" c"),t.push(l+" -"+s+" "+s+" -"+l+" "+s+" 0 c"),t.push("f"),t.push("Q"),n.stream=t.join(` 84`),n},OffPushDown:function(e){var n=Oi(e);n.scope=e.scope;var t=[],s=tt.internal.getWidth(e)<=tt.internal.getHeight(e)?tt.internal.getWidth(e)/4:tt.internal.getHeight(e)/4;s=Number((.9*s).toFixed(5));var i=Number((2*s).toFixed(5)),r=Number((i*tt.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Ir(tt.internal.getWidth(e)/2)+" "+Ir(tt.internal.getHeight(e)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+r+" "+r+" "+i+" 0 "+i+" c"),t.push("-"+r+" "+i+" -"+i+" "+r+" -"+i+" 0 c"),t.push("-"+i+" -"+r+" -"+r+" -"+i+" 0 -"+i+" c"),t.push(r+" -"+i+" "+i+" -"+r+" "+i+" 0 c"),t.push("f"),t.push("Q"),n.stream=t.join(` 85`),n}},Cross:{createAppearanceStream:function(e){var n={D:{Off:tt.RadioButton.Cross.OffPushDown},N:{}};return n.N[e]=tt.RadioButton.Cross.YesNormal,n.D[e]=tt.RadioButton.Cross.YesPushDown,n},getCA:function(){return"8"},YesNormal:function(e){var n=Oi(e);n.scope=e.scope;var t=[],s=tt.internal.calculateCross(e);return t.push("q"),t.push("1 1 "+St(tt.internal.getWidth(e)-2)+" "+St(tt.internal.getHeight(e)-2)+" re"),t.push("W"),t.push("n"),t.push(St(s.x1.x)+" "+St(s.x1.y)+" m"),t.push(St(s.x2.x)+" "+St(s.x2.y)+" l"),t.push(St(s.x4.x)+" "+St(s.x4.y)+" m"),t.push(St(s.x3.x)+" "+St(s.x3.y)+" l"),t.push("s"),t.push("Q"),n.stream=t.join(` 86`),n},YesPushDown:function(e){var n=Oi(e);n.scope=e.scope;var t=tt.internal.calculateCross(e),s=[];return s.push("0.749023 g"),s.push("0 0 "+St(tt.internal.getWidth(e))+" "+St(tt.internal.getHeight(e))+" re"),s.push("f"),s.push("q"),s.push("1 1 "+St(tt.internal.getWidth(e)-2)+" "+St(tt.internal.getHeight(e)-2)+" re"),s.push("W"),s.push("n"),s.push(St(t.x1.x)+" "+St(t.x1.y)+" m"),s.push(St(t.x2.x)+" "+St(t.x2.y)+" l"),s.push(St(t.x4.x)+" "+St(t.x4.y)+" m"),s.push(St(t.x3.x)+" "+St(t.x3.y)+" l"),s.push("s"),s.push("Q"),n.stream=s.join(` 87`),n},OffPushDown:function(e){var n=Oi(e);n.scope=e.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+St(tt.internal.getWidth(e))+" "+St(tt.internal.getHeight(e))+" re"),t.push("f"),n.stream=t.join(` 88`),n}}},createDefaultAppearanceStream:function(e){var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,t=e.scope.__private__.encodeColorString(e.color);return"/"+n+" "+e.fontSize+" Tf "+t}};tt.internal={Bezier_C:.551915024494,calculateCross:function(e){var n=tt.internal.getWidth(e),t=tt.internal.getHeight(e),s=Math.min(n,t);return{x1:{x:(n-s)/2,y:(t-s)/2+s},x2:{x:(n-s)/2+s,y:(t-s)/2},x3:{x:(n-s)/2,y:(t-s)/2},x4:{x:(n-s)/2+s,y:(t-s)/2+s}}}},tt.internal.getWidth=function(e){var n=0;return en(e)==="object"&&(n=Wf(e.Rect[2])),n},tt.internal.getHeight=function(e){var n=0;return en(e)==="object"&&(n=Wf(e.Rect[3])),n};var sb=Dn.addField=function(e){if(nb(this,e),!(e instanceof ji))throw new Error("Invalid argument passed to jsPDF.addField.");var n;return(n=e).scope.internal.acroformPlugin.printedOut&&(n.scope.internal.acroformPlugin.printedOut=!1,n.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),n.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(n),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};Dn.AcroFormChoiceField=Qa,Dn.AcroFormListBox=eo,Dn.AcroFormComboBox=to,Dn.AcroFormEditBox=rc,Dn.AcroFormButton=ns,Dn.AcroFormPushButton=ac,Dn.AcroFormRadioButton=no,Dn.AcroFormCheckBox=oc,Dn.AcroFormTextField=ya,Dn.AcroFormPasswordField=lc,Dn.AcroFormAppearance=tt,Dn.AcroForm={ChoiceField:Qa,ListBox:eo,ComboBox:to,EditBox:rc,Button:ns,PushButton:ac,RadioButton:no,CheckBox:oc,TextField:ya,PasswordField:lc,Appearance:tt},dt.AcroForm={ChoiceField:Qa,ListBox:eo,ComboBox:to,EditBox:rc,Button:ns,PushButton:ac,RadioButton:no,CheckBox:oc,TextField:ya,PasswordField:lc,Appearance:tt};function Gp(e){return e.reduce(function(n,t,s){return n[t]=s,n},{})}(function(e){var n="addImage_";e.__addimage__={};var t="UNKNOWN",s={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(j,z){var C,$,q,L,M,Z=t;if((z=z||t)==="RGBA"||j.data!==void 0&&j.data instanceof Uint8ClampedArray&&"height"in j&&"width"in j)return"RGBA";if(me(j))for(M in s)for(q=s[M],C=0;C<q.length;C+=1){for(L=!0,$=0;$<q[C].length;$+=1)if(q[C][$]!==void 0&&q[C][$]!==j[$]){L=!1;break}if(L===!0){Z=M;break}}else for(M in s)for(q=s[M],C=0;C<q.length;C+=1){for(L=!0,$=0;$<q[C].length;$+=1)if(q[C][$]!==void 0&&q[C][$]!==j.charCodeAt($)){L=!1;break}if(L===!0){Z=M;break}}return Z===t&&z!==t&&(Z=z),Z},r=function j(z){for(var C=this.internal.write,$=this.internal.putStream,q=(0,this.internal.getFilters)();q.indexOf("FlateEncode")!==-1;)q.splice(q.indexOf("FlateEncode"),1);z.objectId=this.internal.newObject();var L=[];if(L.push({key:"Type",value:"/XObject"}),L.push({key:"Subtype",value:"/Image"}),L.push({key:"Width",value:z.width}),L.push({key:"Height",value:z.height}),z.colorSpace===k.INDEXED?L.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(z.palette.length/3-1)+" "+("sMask"in z&&z.sMask!==void 0?z.objectId+2:z.objectId+1)+" 0 R]"}):(L.push({key:"ColorSpace",value:"/"+z.colorSpace}),z.colorSpace===k.DEVICE_CMYK&&L.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),L.push({key:"BitsPerComponent",value:z.bitsPerComponent}),"decodeParameters"in z&&z.decodeParameters!==void 0&&L.push({key:"DecodeParms",value:"<<"+z.decodeParameters+">>"}),"transparency"in z&&Array.isArray(z.transparency)&&z.transparency.length>0){for(var M="",Z=0,ae=z.transparency.length;Z<ae;Z++)M+=z.transparency[Z]+" "+z.transparency[Z]+" ";L.push({key:"Mask",value:"["+M+"]"})}z.sMask!==void 0&&L.push({key:"SMask",value:z.objectId+1+" 0 R"});var he=z.filter!==void 0?["/"+z.filter]:void 0;if($({data:z.data,additionalKeyValues:L,alreadyAppliedFilters:he,objectId:z.objectId}),C("endobj"),"sMask"in z&&z.sMask!==void 0){var we,b=(we=z.sMaskBitsPerComponent)!==null&&we!==void 0?we:z.bitsPerComponent,W={width:z.width,height:z.height,colorSpace:"DeviceGray",bitsPerComponent:b,data:z.sMask};"filter"in z&&(W.decodeParameters="/Predictor ".concat(z.predictor," /Colors 1 /BitsPerComponent ").concat(b," /Columns ").concat(z.width),W.filter=z.filter),j.call(this,W)}if(z.colorSpace===k.INDEXED){var D=this.internal.newObject();$({data:K(new Uint8Array(z.palette)),objectId:D}),C("endobj")}},l=function(){var j=this.internal.collections[n+"images"];for(var z in j)r.call(this,j[z])},o=function(){var j,z=this.internal.collections[n+"images"],C=this.internal.write;for(var $ in z)C("/I"+(j=z[$]).index,j.objectId,"0","R")},u=function(){this.internal.collections[n+"images"]||(this.internal.collections[n+"images"]={},this.internal.events.subscribe("putResources",l),this.internal.events.subscribe("putXobjectDict",o))},h=function(){var j=this.internal.collections[n+"images"];return u.call(this),j},f=function(){return Object.keys(this.internal.collections[n+"images"]).length},v=function(j){return typeof e["process"+j.toUpperCase()]=="function"},w=function(j){return en(j)==="object"&&j.nodeType===1},m=function(j,z){if(j.nodeName==="IMG"&&j.hasAttribute("src")){var C=""+j.getAttribute("src");if(C.indexOf("data:image/")===0)return ic(unescape(C).split("base64,").pop());var $=e.loadFile(C,!0);if($!==void 0)return $}if(j.nodeName==="CANVAS"){if(j.width===0||j.height===0)throw new Error("Given canvas must have data. Canvas width: "+j.width+", height: "+j.height);var q;switch(z){case"PNG":q="image/png";break;case"WEBP":q="image/webp";break;default:q="image/jpeg"}return ic(j.toDataURL(q,1).split("base64,").pop())}},A=function(j){var z=this.internal.collections[n+"images"];if(z){for(var C in z)if(j===z[C].alias)return z[C]}},y=function(j,z,C){return j||z||(j=-96,z=-96),j<0&&(j=-1*C.width*72/j/this.internal.scaleFactor),z<0&&(z=-1*C.height*72/z/this.internal.scaleFactor),j===0&&(j=z*C.width/C.height),z===0&&(z=j*C.height/C.width),[j,z]},P=function(j,z,C,$,q,L){var M=y.call(this,C,$,q),Z=this.internal.getCoordinateString,ae=this.internal.getVerticalCoordinateString,he=h.call(this);if(C=M[0],$=M[1],he[q.index]=q,L){L*=Math.PI/180;var we=Math.cos(L),b=Math.sin(L),W=function(X){return X.toFixed(4)},D=[W(we),W(b),W(-1*b),W(we),0,0,"cm"]}this.internal.write("q"),L?(this.internal.write([1,"0","0",1,Z(j),ae(z+$),"cm"].join(" ")),this.internal.write(D.join(" ")),this.internal.write([Z(C),"0","0",Z($),"0","0","cm"].join(" "))):this.internal.write([Z(C),"0","0",Z($),Z(j),ae(z+$),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+q.index+" Do"),this.internal.write("Q")},k=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 G=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},I=e.__addimage__.sHashCode=function(j){var z,C,$=0;if(typeof j=="string")for(C=j.length,z=0;z<C;z++)$=($<<5)-$+j.charCodeAt(z),$|=0;else if(me(j))for(C=j.byteLength/2,z=0;z<C;z++)$=($<<5)-$+j[z],$|=0;return $},R=e.__addimage__.validateStringAsBase64=function(j){(j=j||"").toString().trim();var z=!0;return j.length===0&&(z=!1),j.length%4!=0&&(z=!1),/^[A-Za-z0-9+/]+$/.test(j.substr(0,j.length-2))===!1&&(z=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(j.substr(-2))===!1&&(z=!1),z},Q=e.__addimage__.extractImageFromDataUrl=function(j){if(j==null||!(j=j.trim()).startsWith("data:"))return null;var z=j.indexOf(",");return z<0?null:j.substring(0,z).trim().endsWith("base64")?j.substring(z+1):null};e.__addimage__.isArrayBuffer=function(j){return j instanceof ArrayBuffer};var me=e.__addimage__.isArrayBufferView=function(j){return j instanceof Int8Array||j instanceof Uint8Array||j instanceof Uint8ClampedArray||j instanceof Int16Array||j instanceof Uint16Array||j instanceof Int32Array||j instanceof Uint32Array||j instanceof Float32Array||j instanceof Float64Array},oe=e.__addimage__.binaryStringToUint8Array=function(j){for(var z=j.length,C=new Uint8Array(z),$=0;$<z;$++)C[$]=j.charCodeAt($);return C},K=e.__addimage__.arrayBufferToBinaryString=function(j){for(var z="",C=me(j)?j:new Uint8Array(j),$=0;$<C.length;$+=8192)z+=String.fromCharCode.apply(null,C.subarray($,$+8192));return z};e.addImage=function(){var j,z,C,$,q,L,M,Z,ae;if(typeof arguments[1]=="number"?(z=t,C=arguments[1],$=arguments[2],q=arguments[3],L=arguments[4],M=arguments[5],Z=arguments[6],ae=arguments[7]):(z=arguments[1],C=arguments[2],$=arguments[3],q=arguments[4],L=arguments[5],M=arguments[6],Z=arguments[7],ae=arguments[8]),en(j=arguments[0])==="object"&&!w(j)&&"imageData"in j){var he=j;j=he.imageData,z=he.format||z||t,C=he.x||C||0,$=he.y||$||0,q=he.w||he.width||q,L=he.h||he.height||L,M=he.alias||M,Z=he.compression||Z,ae=he.rotation||he.angle||ae}var we=this.internal.getFilters();if(Z===void 0&&we.indexOf("FlateEncode")!==-1&&(Z="SLOW"),isNaN(C)||isNaN($))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var b=H.call(this,j,z,M,Z);return P.call(this,C,$,q,L,b,ae),this};var H=function(j,z,C,$){var q,L,M;if(typeof j=="string"&&i(j)===t){j=unescape(j);var Z=ie(j,!1);(Z!==""||(Z=e.loadFile(j,!0))!==void 0)&&(j=Z)}if(w(j)&&(j=m(j,z)),z=i(j,z),!v(z))throw new Error("addImage does not support files of type '"+z+"', please ensure that a plugin for '"+z+"' support is added.");if(((M=C)==null||M.length===0)&&(C=function(ae){return typeof ae=="string"||me(ae)?I(ae):me(ae.data)?I(ae.data):null}(j)),(q=A.call(this,C))||(j instanceof Uint8Array||z==="RGBA"||(L=j,j=oe(j)),q=this["process"+z.toUpperCase()](j,f.call(this),C,function(ae){return ae&&typeof ae=="string"&&(ae=ae.toUpperCase()),ae in e.image_compression?ae:G.NONE}($),L)),!q)throw new Error("An unknown error occurred whilst processing the image.");return q},ie=e.__addimage__.convertBase64ToBinaryString=function(j,z){z=typeof z!="boolean"||z;var C,$="";if(typeof j=="string"){var q;C=(q=Q(j))!==null&&q!==void 0?q:j;try{$=ic(C)}catch(L){if(z)throw R(C)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+L.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return $};e.getImageProperties=function(j){var z,C,$="";if(w(j)&&(j=m(j)),typeof j=="string"&&i(j)===t&&(($=ie(j,!1))===""&&($=e.loadFile(j)||""),j=$),C=i(j),!v(C))throw new Error("addImage does not support files of type '"+C+"', please ensure that a plugin for '"+C+"' support is added.");if(j instanceof Uint8Array||(j=oe(j)),!(z=this["process"+C.toUpperCase()](j)))throw new Error("An unknown error occurred whilst processing the image");return z.fileType=C,z}})(dt.API),function(e){var n=function(t){if(t!==void 0&&t!="")return!0};dt.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(t){for(var s,i,r,l=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,u=this.internal.getPageInfoByObjId(t.objId),h=t.pageContext.annotations,f=!1,v=0;v<h.length&&!f;v++)switch((s=h[v]).type){case"link":(n(s.options.url)||n(s.options.pageNumber))&&(f=!0);break;case"reference":case"text":case"freetext":f=!0}if(f!=0){this.internal.write("/Annots [");for(var w=0;w<h.length;w++){s=h[w];var m=this.internal.pdfEscape,A=this.internal.getEncryptor(t.objId);switch(s.type){case"reference":this.internal.write(" "+s.object.objId+" 0 R ");break;case"text":var y=this.internal.newAdditionalObject(),P=this.internal.newAdditionalObject(),k=this.internal.getEncryptor(y.objId),G=s.title||"Note";r="<</Type /Annot /Subtype /Text "+(i="/Rect ["+l(s.bounds.x)+" "+o(s.bounds.y+s.bounds.h)+" "+l(s.bounds.x+s.bounds.w)+" "+o(s.bounds.y)+"] ")+"/Contents ("+m(k(s.contents))+")",r+=" /Popup "+P.objId+" 0 R",r+=" /P "+u.objId+" 0 R",r+=" /T ("+m(k(G))+") >>",y.content=r;var I=y.objId+" 0 R";r="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+l(s.bounds.x+30)+" "+o(s.bounds.y+s.bounds.h)+" "+l(s.bounds.x+s.bounds.w+30)+" "+o(s.bounds.y)+"] ")+" /Parent "+I,s.open&&(r+=" /Open true"),r+=" >>",P.content=r,this.internal.write(y.objId,"0 R",P.objId,"0 R");break;case"freetext":i="/Rect ["+l(s.bounds.x)+" "+o(s.bounds.y)+" "+l(s.bounds.x+s.bounds.w)+" "+o(s.bounds.y+s.bounds.h)+"] ";var R="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(s.color||"#000000");r="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+m(A(s.contents))+")",r+=" /DS("+m(A(R))+")",r+=" /Border [0 0 0]",r+=" >>",this.internal.write(r);break;case"link":if(s.options.name){var Q=this.annotations._nameMap[s.options.name];s.options.pageNumber=Q.page,s.options.top=Q.y}else s.options.top||(s.options.top=0);if(i="/Rect ["+s.finalBounds.x+" "+s.finalBounds.y+" "+s.finalBounds.w+" "+s.finalBounds.h+"] ",r="",s.options.url)r="
88<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+m(A(s.options.url))+") >>";else if(s.options.pageNumber)switch(r="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(s.options.pageNumber).objId+" 0 R",s.options.magFactor=s.options.magFactor||"XYZ",s.options.magFactor){case"Fit":r+=" /Fit]";break;case"FitH":r+=" /FitH "+s.options.top+"]";break;case"FitV":s.options.left=s.options.left||0,r+=" /FitV "+s.options.left+"]";break;default:var me=o(s.options.top);s.options.left=s.options.left||0,s.options.zoom===void 0&&(s.options.zoom=0),r+=" /XYZ "+s.options.left+" "+me+" "+s.options.zoom+"]"}r!=""&&(r+=" >>",this.internal.write(r))}}this.internal.write("]")}}]),e.createAnnotation=function(t){var s=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":s.pageContext.annotations.push(t)}},e.link=function(t,s,i,r,l){var o=this.internal.getCurrentPageInfo(),u=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString;o.pageContext.annotations.push({finalBounds:{x:u(t),y:h(s),w:u(t+i),h:h(s+r)},options:l,type:"link"})},e.textWithLink=function(t,s,i,r){var l,o,u=this.getTextWidth(t),h=this.internal.getLineHeight()/this.internal.scaleFactor;if(r.maxWidth!==void 0){o=r.maxWidth;var f=this.splitTextToSize(t,o).length;l=Math.ceil(h*f)}else o=u,l=h;return this.text(t,s,i,r),i+=.2*h,r.align==="center"&&(s-=u/2),r.align==="right"&&(s-=u),this.link(s,i-h,o,l,r),u},e.getTextWidth=function(t){var s=this.internal.getFontSize();return this.getStringUnitWidth(t)*s/this.internal.scaleFactor}}(dt.API),function(e){var n={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,6437
vendor: 6,907 bytes, line 88
887],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]},t={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}},s={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var r=e.__arabicParser__.isInArabicSubstitutionA=function(y){return n[y.charCodeAt(0)]!==void 0},l=e.__arabicParser__.isArabicLetter=function(y){return typeof y=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(y)},o=e.__arabicParser__.isArabicEndLetter=function(y){return l(y)&&r(y)&&n[y.charCodeAt(0)].length<=2},u=e.__arabicParser__.isArabicAlfLetter=function(y){return l(y)&&i.indexOf(y.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(y){return l(y)&&r(y)&&n[y.charCodeAt(0)].length>=1};var h=e.__arabicParser__.arabicLetterHasFinalForm=function(y){return l(y)&&r(y)&&n[y.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(y){return l(y)&&r(y)&&n[y.charCodeAt(0)].length>=3};var f=e.__arabicParser__.arabicLetterHasMedialForm=function(y){return l(y)&&r(y)&&n[y.charCodeAt(0)].length==4},v=e.__arabicParser__.resolveLigatures=function(y){var P=0,k=t,G="",I=0;for(P=0;P<y.length;P+=1)k[y.charCodeAt(P)]!==void 0?(I++,typeof(k=k[y.charCodeAt(P)])=="number"&&(G+=String.fromCharCode(k),k=t,I=0),P===y.length-1&&(k=t,G+=y.charAt(P-(I-1)),P-=I-1,I=0)):(k=t,G+=y.charAt(P-I),P-=I,I=0);return G};e.__arabicParser__.isArabicDiacritic=function(y){return y!==void 0&&s[y.charCodeAt(0)]!==void 0};var w=e.__arabicParser__.getCorrectForm=function(y,P,k){return l(y)?r(y)===!1?-1:!h(y)||!l(P)&&!l(k)||!l(k)&&o(P)||o(y)&&!l(P)||o(y)&&u(P)||o(y)&&o(P)?0:f(y)&&l(P)&&!o(P)&&l(k)&&h(k)?3:o(y)||!l(k)?1:2:-1},m=function(y){var P=0,k=0,G=0,I="",R="",Q="",me=(y=y||"").split("\\s+"),oe=[];for(P=0;P<me.length;P+=1){for(oe.push(""),k=0;k<me[P].length;k+=1)I=me[P][k],R=me[P][k-1],Q=me[P][k+1],l(I)?(G=w(I,R,Q),oe[P]+=G!==-1?String.fromCharCode(n[I.charCodeAt(0)][G]):I):oe[P]+=I;oe[P]=v(oe[P])}return oe.join(" ")},A=e.__arabicParser__.processArabic=e.processArabic=function(){var y,P=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,k=[];if(Array.isArray(P)){var G=0;for(k=[],G=0;G<P.length;G+=1)Array.isArray(P[G])?k.push([m(P[G][0]),P[G][1],P[G][2]]):k.push([m(P[G])]);y=k}else y=m(P);return typeof arguments[0]=="string"?y:(arguments[0].text=y,arguments[0])};e.events.push(["preProcessText",A])}(dt.API),dt.API.autoPrint=function(e){var n;return(e=e||{}).variant=e.variant||"non-conform",e.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){n=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 "+n+" 0 R")})),this},function(e){var n=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(o){t=o}});var s=150;Object.defineProperty(this,"width",{get:function(){return s},set:function(o){s=isNaN(o)||Number.isInteger(o)===!1||o<0?150:o,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=s+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(o){i=isNaN(o)||Number.isInteger(o)===!1||o<0?300:o,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(o){r=o}});var l={};Object.defineProperty(this,"style",{get:function(){return l},set:function(o){l=o}}),Object.defineProperty(this,"parentNode",{})};n.prototype.getContext=function(t,s){var i;if((t=t||"2d")!=="2d")return null;for(i in s)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=s[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},n.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new n,this.canvas.pdf=this}])}(dt.API),function(e){var n={left:0,top:0,bottom:0,right:0},t=!1,s=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},n),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new r,this.internal.__cell__.pages=1},r=function(){var u=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return u},set:function(y){u=y}});var h=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return h},set:function(y){h=y}});var f=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return f},set:function(y){f=y}});var v=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return v},set:function(y){v=y}});var w=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return w},set:function(y){w=y}});var m=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return m},set:function(y){m=y}});var A=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return A},set:function(y){A=y}}),this};r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},r.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(u){return s.call(this),this.internal.__cell__.headerFunction=typeof u=="function"?u:void 0,this},e.getTextDimensions=function(u,h){s.call(this);var f=(h=h||{}).fontSize||this.getFontSize(),v=h.font||this.getFont(),w=h.scaleFactor||this.internal.scaleFactor,m=0,A=0,y=0,P=this;if(!Array.isArray(u)&&typeof u!="string"){if(typeof u!="number")throw new Error("getTextDimensions expects text-parameter to be of type Str
88ing or type Number or an Array of Strings.");u=String(u)}var k=h.maxWidth;k>0?typeof u=="string"?u=this.splitTextToSize(u,k):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(I,R){return I.concat(P.splitTextToSize(R,k))},[])):u=Array.isArray(u)?u:[u];for(var G=0;G<u.length;G++)m<(y=this.getStringUnitWidth(u[G],{font:v})*f)&&(m=y);return m!==0&&(A=u.length),{w:m/=w,h:Math.max((A*f*this.getLineHeightFactor()-f*(this.getLineHeightFactor()-1))/w,0)}},e.cellAddPage=function(){s.call(this),this.addPage();var u=this.internal.__cell__.margins||n;return this.internal.__cell__.lastCell=new r(u.left,u.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var l=e.cell=function(){var u;u=arguments[0]instanceof r?arguments[0]:new r(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),s.call(this);var h=this.internal.__cell__.lastCell,f=this.internal.__cell__.padding,v=this.internal.__cell__.margins||n,w=this.internal.__cell__.tableHeaderRow,m=this.internal.__cell__.printHeaders;return h.lineNumber!==void 0&&(h.lineNumber===u.lineNumber?(u.x=(h.x||0)+(h.width||0),u.y=h.y||0):h.y+h.height+u.height+v.bottom>this.getPageHeight()?(this.cellAddPage(),u.y=v.top,m&&w&&(this.printHeaderRow(u.lineNumber,!0),u.y+=w[0].height)):u.y=h.y+h.height||u.y),u.text[0]!==void 0&&(this.rect(u.x,u.y,u.width,u.height,t===!0?"FD":void 0),u.align==="right"?this.text(u.text,u.x+u.width-f,u.y+f,{align:"right",baseline:"top"}):u.align==="center"?this.text(u.text,u.x+u.width/2,u.y+f,{align:"center",baseline:"top",maxWidth:u.width-f-f}):this.text(u.text,u.x+f,u.y+f,{align:"left",baseline:"top",maxWidth:u.width-f-f})),this.internal.__cell__.lastCell=u,this};e.table=function(u,h,f,v,w){if(s.call(this),!f)throw new Error("No data for PDF table.");var m,A,y,P,k=[],G=[],I=[],R={},Q={},me=[],oe=[],K=(w=w||{}).autoSize||!1,H=w.printHeaders!==!1,ie=w.css&&w.css["font-size"]!==void 0?16*w.css["font-size"]:w.fontSize||12,j=w.margins||Object.assign({width:this.getPageWidth()},n),z=typeof w.padding=="number"?w.padding:3,C=w.headerBackgroundColor||"#c8c8c8",$=w.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=H,this.internal.__cell__.margins=j,this.internal.__cell__.table_font_size=ie,this.internal.__cell__.padding=z,this.internal.__cell__.headerBackgroundColor=C,this.internal.__cell__.headerTextColor=$,this.setFontSize(ie),v==null)G=k=Object.keys(f[0]),I=k.map(function(){return"left"});else if(Array.isArray(v)&&en(v[0])==="object")for(k=v.map(function(he){return he.name}),G=v.map(function(he){return he.prompt||he.name||""}),I=v.map(function(he){return he.align||"left"}),m=0;m<v.length;m+=1)Q[v[m].name]=.7499990551181103*v[m].width;else Array.isArray(v)&&typeof v[0]=="string"&&(G=k=v,I=k.map(function(){return"left"}));if(K||Array.isArray(v)&&typeof v[0]=="string")for(m=0;m<k.length;m+=1){for(R[P=k[m]]=f.map(function(he){return he[P]}),this.setFont(void 0,"bold"),me.push(this.getTextDimensions(G[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),A=R[P],this.setFont(void 0,"normal"),y=0;y<A.length;y+=1)me.push(this.getTextDimensions(A[y],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);Q[P]=Math.max.apply(null,me)+z+z,me=[]}if(H){var q={};for(m=0;m<k.length;m+=1)q[k[m]]={},q[k[m]].text=G[m],q[k[m]].align=I[m];var L=o.call(this,q,Q);oe=k.map(function(he){return new r(u,h,Q[he],L,q[he].text,void 0,q[he].align)}),this.setTableHeaderRow(oe),this.printHeaderRow(1,!1)}var M=v.reduce(function(he,we){return he[we.name]=we.align,he},{});for(m=0;m<f.length;
vendor: 9,839 bytes, lines 88-112
88m+=1){"rowStart"in w&&w.rowStart instanceof Function&&w.rowStart({row:m,data:f[m]},this);var Z=o.call(this,f[m],Q);for(y=0;y<k.length;y+=1){var ae=f[m][k[y]];"cellStart"in w&&w.cellStart instanceof Function&&w.cellStart({row:m,col:y,data:ae},this),l.call(this,new r(u,h,Q[k[y]],Z,ae,m+2,M[k[y]]))}}return this.internal.__cell__.table_x=u,this.internal.__cell__.table_y=h,this};var o=function(u,h){var f=this.internal.__cell__.padding,v=this.internal.__cell__.table_font_size,w=this.internal.scaleFactor;return Object.keys(u).map(function(m){var A=u[m];return this.splitTextToSize(A.hasOwnProperty("text")?A.text:A,h[m]-f-f)},this).map(function(m){return this.getLineHeightFactor()*m.length*v/w+f+f},this).reduce(function(m,A){return Math.max(m,A)},0)};e.setTableHeaderRow=function(u){s.call(this),this.internal.__cell__.tableHeaderRow=u},e.printHeaderRow=function(u,h){if(s.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var f;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var v=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new r(v[0],v[1],v[2],v[3],void 0,-1)}this.setFont(void 0,"bold");for(var w=[],m=0;m<this.internal.__cell__.tableHeaderRow.length;m+=1){f=this.internal.__cell__.tableHeaderRow[m].clone(),h&&(f.y=this.internal.__cell__.margins.top||0,w.push(f)),f.lineNumber=u;var A=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),l.call(this,f),this.setTextColor(A)}w.length>0&&this.setTableHeaderRow(w),this.setFont(void 0,"normal"),t=!1}}(dt.API);var $p={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Zp=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],du=Gp(Zp),Yp=[100,200,300,400,500,600,700,800,900],ib=Gp(Yp);function Pd(e){var n=e.family.replace(/"|'/g,"").toLowerCase(),t=function(r){return $p[r=r||"normal"]?r:"normal"}(e.style),s=function(r){return r?typeof r=="number"?r>=100&&r<=900&&r%100==0?r:400:/^\d00$/.test(r)?parseInt(r):r==="bold"?700:400:400}(e.weight),i=function(r){return typeof du[r=r||"normal"]=="number"?r:"normal"}(e.stretch);return{family:n,style:t,weight:s,stretch:i,src:e.src||[],ref:e.ref||{name:n,style:[i,t,s].join(" ")}}}function Uf(e,n,t,s){var i;for(i=t;i>=0&&i<n.length;i+=s)if(e[n[i]])return e[n[i]];for(i=t;i>=0&&i<n.length;i-=s)if(e[n[i]])return e[n[i]]}var rb={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Vf={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Hf(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function Gf(e){return e.trimLeft()}function ab(e,n){for(var t=0;t<e.length;){if(e.charAt(t)===n)return[e.substring(0,t),e.substring(t+1)];t+=1}return null}function ob(e){var n=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return n===null?null:[n[0],e.substring(n[0].length)]}var Ga,Zl,$f,Zf,Yf,Cd=["times"];function Kf(e,n,t,s,i){var r=4,l=Xf;switch(i){case dt.API.image_compression.FAST:r=1,l=Jf;break;case dt.API.image_compression.MEDIUM:r=6,l=Qf;break;case dt.API.image_compression.SLOW:r=9,l=em}e=function(u,h,f,v){for(var w,m=u.length/h,A=new Uint8Array(u.length+m),y=[lb,Jf,Xf,Qf,em],P=0;P<m;P+=1){var k=P*h,G=u.subarray(k,k+h);if(v)A.set(v(G,f,w),k+P);else{for(var I=y.length,R=[],Q=0;Q<I;Q+=1)R[Q]=y[Q](G,f,w);var me=db(R.concat());A.set(R[me],k+P)}w=G}return A}(e,n,Math.ceil(t*s/8),l);var o=Jd(e,{level:r});return dt.API.__addimage__.arrayBufferToBinaryString(o)}function lb(e){var n=Array.apply([],e);return n.unshift(0),n}function Jf(e,n){var t=e.length,s=[];s[0]=1;for(var i=0;i<t;i+=1){var r=e[i-n]||0;s[i+1]=e[i]-r+256&255}return s}function Xf(e,n,t){var s=e.length,i=[];i[0]=2;for(var r=0;r<s;r+=1){var l=t&&t[r]||0;i[r+1]=e[r]-l+256&255}return i}function Qf(e,n,t){var s=e.length,i=[];i[0]=3;for(var r=0;r<s;r+=1){var l=e[r-n]||0,o=t&&t[r]||0;i[r+1]=e[r]+256-(l+o>>>1)&255}return i}function em(e,n,t){var s=e.length,i=[];i[0]=4;for(var r=0;r<s;r+=1){var l=cb(e[r-n]||0,t&&t[r]||0,t&&t[r-n]||0);i[r+1]=e[r]-l+256&255}return i}function cb(e,n,t){if(e===n&&n===t)return e;var s=Math.abs(n-t),i=Math.abs(e-t),r=Math.abs(e+n-t-t);return s<=i&&s<=r?e:i<=r?n:t}function db(e){var n=e.map(function(t){return t.reduce(function(s,i){return s+Math.abs(i)},0)});return n.indexOf(Math.min.apply(null,n))}function Dd(e,n,t){var s=n*t,i=Math.floor(s/8),r=16-(s-8*i+t),l=(1<<t)-1;return Kp(e,i)>>r&l}function tm(e,n,t,s){var i=t*s,r=Math.floor(i/8),l=16-(i-8*r+s),o=(1<<s)-1,u=(n&o)<<l;(function(h,f,v){if(f+1<h.byteLength)h.setUint16(f,v,!1);else{var w=v>>8&255;h.setUint8(f,w)}})(e,r,Kp(e,r)&~(o<<l)&65535|u)}function Kp(e,n){return n+1<e.byteLength?e.getUint16(n,!1):e.getUint8(n)<<8}function ub(e){var n=0;if(e[n++]!==71||e[n++]!==73||e[n++]!==70||e[n++]!==56||(e[n++]+1&253)!=56||e[n++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=e[n++]|e[n++]<<8,s=e[n++]|e[n++]<<8,i=e[n++],r=i>>7,l=1<<1+(7&i);e[n++],e[n++];var o=null,u=null;r&&(o=n,u=l,n+=3*l);var h=!0,f=[],v=0,w=null,m=0,A=null;for(this.width=t,this.height=s;h&&n<e.length;)switch(e[n++]){case 33:switch(e[n++]){case 255:if(e[n]!==11||e[n+1]==78&&e[n+2]==69&&e[n+3]==84&&e[n+4]==83&&e[n+5]==67&&e[n+6]==65&&e[n+7]==80&&e[n+8]==69&&e[n+9]==50&&e[n+10]==46&&e[n+11]==48&&e[n+12]==3&&e[n+13]==1&&e[n+16]==0)n+=14,A=e[n++]|e[n++]<<8,n++;else for(n+=12;;){if(!((j=e[n++])>=0))throw Error("Invalid block size");if(j===0)break;n+=j}break;case 249:if(e[n++]!==4||e[n+4]!==0)throw new Error("Invalid graphics extension block.");var y=e[n++];v=e[n++]|e[n++]<<8,w=e[n++],1&y||(w=null),m=y>>2&7,n++;break;case 254:for(;;){if(!((j=e[n++])>=0))throw Error("Invalid block size");if(j===0)break;n+=j}break;default:throw new Error("Unknown graphic control label: 0x"+e[n-1].toString(16))}break;case 44:var P=e[n++]|e[n++]<<8,k=e[n++]|e[n++]<<8,G=e[n++]|e[n++]<<8,I=e[n++]|e[n++]<<8,R=e[n++],Q=R>>6&1,me=1<<1+(7&R),oe=o,K=u,H=!1;R>>7&&(H=!0,oe=n,K=me,n+=3*me);var ie=n;for(n++;;){var j;if(!((j=e[n++])>=0))throw Error("Invalid block size");if(j===0)break;n+=j}f.push({x:P,y:k,width:G,height:I,has_local_palette:H,palette_offset:oe,palette_size:K,data_offset:ie,data_length:n-ie,transparent_index:w,interlaced:!!Q,delay:v,disposal:m});break;case 59:h=!1;break;default:throw new Error("Unknown gif block: 0x"+e[n-1].toString(16))}this.numFrames=function(){return f.length},this.loopCount=function(){return A},this.frameInfo=function(z){if(z<0||z>=f.length)throw new Error("Frame index out of range.");return f[z]},this.decodeAndBlitFrameBGRA=function(z,C){var $=this.frameInfo(z),q=$.width*$.height;if(q>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var L=new Uint8Array(q);nm(e,$.data_offset,L,q);var M=$.palette_offset,Z=$.transparent_index;Z===null&&(Z=256);var ae=$.width,he=t-ae,we=ae,b=4*($.y*t+$.x),W=4*(($.y+$.height)*t+$.x),D=b,X=4*he;$.interlaced===!0&&(X+=4*t*7);for(var Y=8,te=0,ue=L.length;te<ue;++te){var ge=L[te];if(we===0&&(we=ae,(D+=X)>=W&&(X=4*he+4*t*(Y-1),D=b+(ae+he)*(Y<<1),Y>>=1)),ge===Z)D+=4;else{var se=e[M+3*ge],ve=e[M+3*ge+1],Ae=e[M+3*ge+2];C[D++]=Ae,C[D++]=ve,C[D++]=se,C[D++]=255}--we}},this.decodeAndBlitFrameRGBA=function(z,C){var $=this.frameInfo(z),q=$.width*$.height;if(q>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var L=new Uint8Array(q);nm(e,$.data_offset,L,q);var M=$.palette_offset,Z=$.transparent_index;Z===null&&(Z=256);var ae=$.width,he=t-ae,we=ae,b=4*($.y*t+$.x),W=4*(($.y+$.height)*t+$.x),D=b,X=4*he;$.interlaced===!0&&(X+=4*t*7);for(var Y=8,te=0,ue=L.length;te<ue;++te){var ge=L[te];if(we===0&&(we=ae,(D+=X)>=W&&(X=4*he+4*t*(Y-1),D=b+(ae+he)*(Y<<1),Y>>=1)),ge===Z)D+=4;else{var se=e[M+3*ge],ve=e[M+3*ge+1],Ae=e[M+3*ge+2];C[D++]=se,C[D++]=ve,C[D++]=Ae,C[D++]=255}--we}}}function nm(e,n,t,s){for(var i=e[n++],r=1<<i,l=r+1,o=l+1,u=i+1,h=(1<<u)-1,f=0,v=0,w=0,m=e[n++],A=new Int32Array(4096),y=null;;){for(;f<16&&m!==0;)v|=e[n++]<<f,f+=8,m===1?m=e[n++]:--m;if(f<u)break;var P=v&h;if(v>>=u,f-=u,P!==r){if(P===l)break;for(var k=P<o?P:y,G=0,I=k;I>r;)I=A[I]>>8,++G;var R=I;if(w+G+(k!==P?1:0)>s)return void on.log("Warning, gif stream longer than expected.");t[w++]=R;var Q=w+=G;for(k!==P&&(t[w++]=R),I=k;G--;)I=A[I],t[--Q]=255&I,I>>=8;y!==null&&o<4096&&(A[o++]=y<<8|R,o>=h+1&&u<12&&(++u,h=h<<1|1)),y=P}else o=l+1,h=(1<<(u=i+1))-1,y=null}return w!==s&&on.log("Warning, gif stream shorter than expected."),t}/** 89 * @license 90 Copyright (c) 2008, Adobe Systems Incorporated 91 All rights reserved. 92 93 Redistribution and use in source and binary forms, with or without 94 modification, are permitted provided that the following conditions are 95 met: 96 97 * Redistributions of source code must retain the above copyright notice, 98 this list of conditions and the following disclaimer. 99 100 * Redistributions in binary form must reproduce the above copyright 101 notice, this list of conditions and the following disclaimer in the 102 documentation and/or other materials provided with the distribution. 103 104 * Neither the name of Adobe Systems Incorporated nor the names of its 105 contributors may be used to endorse or promote products derived from 106 this software without specific prior written permission. 107 108 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 109 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 110 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 111 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 112 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
113 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 114 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 115 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 116 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 117 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 118 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 119*/function Td(e){var n,t,s,i,r,l=Math.floor,o=new Array(64),u=new Array(64),h=new Array(64),f=new Array(64),v=new Array(65535),w=new Array(65535),m=new Array(64),A=new Array(64),y=[],P=0,k=7,G=new Array(64),I=new Array(64),R=new Array(64),Q=new Array(256),me=new Array(2048),oe=[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],K=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],H=[0,1,2,3,4,5,6,7,8,9,10,11],ie=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],j=[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],z=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],C=[0,1,2,3,4,5,6,7,8,9,10,11],$=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],q=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function L(b,W){for(var D=0,X=0,Y=new Array,te=1;te<=16;te++){for(var ue=1;ue<=b[te];ue++)Y[W[X]]=[],Y[W[X]][0]=D,Y[W[X]][1]=te,X++,D++;D*=2}return Y}function M(b){for(var W=b[0],D=b[1]-1;D>=0;)W&1<<D&&(P|=1<<k),D--,--k<0&&(P==255?(Z(255),Z(0)):Z(P),k=7,P=0)}function Z(b){y.push(b)}function ae(b){Z(b>>8&255),Z(255&b)}function he(b,W,D,X,Y){for(var te,ue=Y[0],ge=Y[240],se=function(ce,Se){var Te,xe,De,it,lt,nt,gt,xt,Je,ht,Xe=0;for(Je=0;Je<8;++Je){Te=ce[Xe],xe=ce[Xe+1],De=ce[Xe+2],it=ce[Xe+3],lt=ce[Xe+4],nt=ce[Xe+5],gt=ce[Xe+6];var Yt=Te+(xt=ce[Xe+7]),Mt=Te-xt,vt=xe+gt,ft=xe-gt,kt=De+nt,Ke=De-nt,yt=it+lt,Ge=it-lt,qe=Yt+yt,_t=Yt-yt,Dt=vt+kt,ut=vt-kt;ce[Xe]=qe+Dt,ce[Xe+4]=qe-Dt;var Ct=.707106781*(ut+_t);ce[Xe+2]=_t+Ct,ce[Xe+6]=_t-Ct;var Ws=.382683433*((qe=Ge+Ke)-(ut=ft+Mt)),wn=.5411961*qe+Ws,$n=1.306562965*ut+Ws,Ds=.707106781*(Dt=Ke+ft),$e=Mt+Ds,bt=Mt-Ds;ce[Xe+5]=bt+wn,ce[Xe+3]=bt-wn,ce[Xe+1]=$e+$n,ce[Xe+7]=$e-$n,Xe+=8}for(Xe=0,Je=0;Je<8;++Je){Te=ce[Xe],xe=ce[Xe+8],De=ce[Xe+16],it=ce[Xe+24],lt=ce[Xe+32],nt=ce[Xe+40],gt=ce[Xe+48];var si=Te+(xt=ce[Xe+56]),ys=Te-xt,_s=xe+gt,pn=xe-gt,dn=De+nt,gn=De-nt,$i=it+lt,Ai=it-lt,Us=si+$i,ii=si-$i,Ts=_s+dn,Ns=_s-dn;ce[Xe]=Us+Ts,ce[Xe+32]=Us-Ts;var zs=.707106781*(Ns+ii);ce[Xe+16]=ii+zs,ce[Xe+48]=ii-zs;var Zi=.382683433*((Us=Ai+gn)-(Ns=pn+ys)),js=.5411961*Us+Zi,Yi=1.306562965*Ns+Zi,br=.707106781*(Ts=gn+pn),wr=ys+br,yr=ys-br;ce[Xe+40]=yr+js,ce[Xe+24]=yr-js,ce[Xe+8]=wr+Yi,ce[Xe+56]=wr-Yi,Xe++}for(Je=0;Je<64;++Je)ht=ce[Je]*Se[Je],m[Je]=ht>0?ht+.5|0:ht-.5|0;return m}(b,W),ve=0;ve<64;++ve)A[oe[ve]]=se[ve];var Ae=A[0]-D;D=A[0],Ae==0?M(X[0]):(M(X[w[te=32767+Ae]]),M(v[te]));for(var Pe=63;Pe>0&&A[Pe]==0;)Pe--;if(Pe==0)return M(ue),D;for(var He,F=1;F<=Pe;){for(var ze=F;A[F]==0&&F<=Pe;)++F;var Ye=F-ze;if(Ye>=16){He=Ye>>4;for(var Me=1;Me<=He;++Me)M(ge);Ye&=15}te=32767+A[F],M(Y[(Ye<<4)+w[te]]),M(v[te]),F++}return Pe!=63&&M(ue),D}function we(b){b=Math.min(Math.max(b,1),100),r!=b&&(function(W){for(var D=[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],X=0;X<64;X++){var Y=l((D[X]*W+50)/100);Y=Math.min(Math.max(Y,1),255),o[oe[X]]=Y}for(var te=[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],ue=0;ue<64;ue++){var ge=l((te[ue]*W+50)/100);ge=Math.min(Math.max(ge,1),255),u[oe[ue]]=ge}for(var se=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],ve=0,Ae=0;Ae<8;Ae++)for(var Pe=0;Pe<8;Pe++)h[ve]=1/(o[oe[ve]]*se[Ae]*se[Pe]*8),f[ve]=1/(u[oe[ve]]*se[Ae]*se[Pe]*8),ve++}(b<50?Math.floor(5e3/b):Math.floor(200-2*b)),r=b)}this.encode=function(b,W){W&&we(W),y=new Array,P=0,k=7,ae(65496),ae(65504),ae(16),Z(74),Z(70),Z(73),Z(70),Z(0),Z(1),Z(1),Z(0),ae(1),ae(1),Z(0),Z(0),function(){ae(65499),ae(132),Z(0);for(var xe=0;xe<64;xe++)Z(o[xe]);Z(1);for(var De=0;De<64;De++)Z(u[De])}(),function(xe,De){ae(65472),ae(17),Z(8),ae(De),ae(xe),Z(3),Z(1),Z(17),Z(0),Z(2),Z(17),Z(1),Z(3),Z(17),Z(1)}(b.width,b.height),function(){ae(65476),ae(418),Z(0);for(var xe=0;xe<16;xe++)Z(K[xe+1]);for(var De=0;De<=11;De++)Z(H[De]);Z(16);for(var it=0;
vendor: 47,318 bytes, lines 119-125
119it<16;it++)Z(ie[it+1]);for(var lt=0;lt<=161;lt++)Z(j[lt]);Z(1);for(var nt=0;nt<16;nt++)Z(z[nt+1]);for(var gt=0;gt<=11;gt++)Z(C[gt]);Z(17);for(var xt=0;xt<16;xt++)Z($[xt+1]);for(var Je=0;Je<=161;Je++)Z(q[Je])}(),ae(65498),ae(12),Z(3),Z(1),Z(0),Z(2),Z(17),Z(3),Z(17),Z(0),Z(63),Z(0);var D=0,X=0,Y=0;P=0,k=7,this.encode.displayName="_encode_";for(var te,ue,ge,se,ve,Ae,Pe,He,F,ze=b.data,Ye=b.width,Me=b.height,ce=4*Ye,Se=0;Se<Me;){for(te=0;te<ce;){for(ve=ce*Se+te,Pe=-1,He=0,F=0;F<64;F++)Ae=ve+(He=F>>3)*ce+(Pe=4*(7&F)),Se+He>=Me&&(Ae-=ce*(Se+1+He-Me)),te+Pe>=ce&&(Ae-=te+Pe-ce+4),ue=ze[Ae++],ge=ze[Ae++],se=ze[Ae++],G[F]=(me[ue]+me[ge+256|0]+me[se+512|0]>>16)-128,I[F]=(me[ue+768|0]+me[ge+1024|0]+me[se+1280|0]>>16)-128,R[F]=(me[ue+1280|0]+me[ge+1536|0]+me[se+1792|0]>>16)-128;D=he(G,h,D,n,s),X=he(I,f,X,t,i),Y=he(R,f,Y,t,i),te+=32}Se+=8}if(k>=0){var Te=[];Te[1]=k+1,Te[0]=(1<<k+1)-1,M(Te)}return ae(65497),new Uint8Array(y)},e=e||50,function(){for(var b=String.fromCharCode,W=0;W<256;W++)Q[W]=b(W)}(),n=L(K,H),t=L(z,C),s=L(ie,j),i=L($,q),function(){for(var b=1,W=2,D=1;D<=15;D++){for(var X=b;X<W;X++)w[32767+X]=D,v[32767+X]=[],v[32767+X][1]=D,v[32767+X][0]=X;for(var Y=-(W-1);Y<=-b;Y++)w[32767+Y]=D,v[32767+Y]=[],v[32767+Y][1]=D,v[32767+Y][0]=W-1+Y;b<<=1,W<<=1}}(),function(){for(var b=0;b<256;b++)me[b]=19595*b,me[b+256|0]=38470*b,me[b+512|0]=7471*b+32768,me[b+768|0]=-11059*b,me[b+1024|0]=-21709*b,me[b+1280|0]=32768*b+8421375,me[b+1536|0]=-27439*b,me[b+1792|0]=-5329*b}(),we(e)}/** 120 * @license 121 * Copyright (c) 2017 Aras Abbasi 122 * 123 * Licensed under the MIT License. 124 * http://opensource.org/licenses/mit-license 125 */function wi(e,n){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!n,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function sm(e){function n(H){if(!H)throw Error("assert :P")}function t(H,ie,j){for(var z=0;4>z;z++)if(H[ie+z]!=j.charCodeAt(z))return!0;return!1}function s(H,ie,j,z,C){for(var $=0;$<C;$++)H[ie+$]=j[z+$]}function i(H,ie,j,z){for(var C=0;C<z;C++)H[ie+C]=j}function r(H){return new Int32Array(H)}function l(H,ie){for(var j=[],z=0;z<H;z++)j.push(new ie);return j}function o(H,ie){var j=[];return function z(C,$,q){for(var L=q[$],M=0;M<L&&(C.push(q.length>$+1?[]:new ie),!(q.length<$+1));M++)z(C[M],$+1,q)}(j,0,H),j}var u=function(){var H=this;function ie(c,d){for(var g=1<<d-1>>>0;c&g;)g>>>=1;return g?(c&g-1)+g:c}function j(c,d,g,x,N){n(!(x%g));do c[d+(x-=g)]=N;while(0<x)}function z(c,d,g,x,N){if(n(2328>=N),512>=N)var S=r(512);else if((S=r(N))==null)return 0;return function(E,T,O,U,ne,pe){var V,re,de=T,Ne=1<<O,fe=r(16),je=r(16);for(n(ne!=0),n(U!=null),n(E!=null),n(0<O),re=0;re<ne;++re){if(15<U[re])return 0;++fe[U[re]]}if(fe[0]==ne)return 0;for(je[1]=0,V=1;15>V;++V){if(fe[V]>1<<V)return 0;je[V+1]=je[V]+fe[V]}for(re=0;re<ne;++re)V=U[re],0<U[re]&&(pe[je[V]++]=re);if(je[15]==1)return(U=new C).g=0,U.value=pe[0],j(E,de,1,Ne,U),Ne;var ke,Fe=-1,Ce=Ne-1,ct=0,et=1,zt=1,at=1<<O;for(re=0,V=1,ne=2;V<=O;++V,ne<<=1){if(et+=zt<<=1,0>(zt-=fe[V]))return 0;for(;0<fe[V];--fe[V])(U=new C).g=V,U.value=pe[re++],j(E,de+ct,ne,at,U),ct=ie(ct,V)}for(V=O+1,ne=2;15>=V;++V,ne<<=1){if(et+=zt<<=1,0>(zt-=fe[V]))return 0;for(;0<fe[V];--fe[V]){if(U=new C,(ct&Ce)!=Fe){for(de+=at,ke=1<<(Fe=V)-O;15>Fe&&!(0>=(ke-=fe[Fe]));)++Fe,ke<<=1;Ne+=at=1<<(ke=Fe-O),E[T+(Fe=ct&Ce)].g=ke+O,E[T+Fe].value=de-T-Fe}U.g=V-O,U.value=pe[re++],j(E,de+(ct>>O),ne,at,U),ct=ie(ct,V)}}return et!=2*je[15]-1?0:Ne}(c,d,g,x,N,S)}function C(){this.value=this.g=0}function $(){this.value=this.g=0}function q(){this.G=l(5,C),this.H=r(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=l(Oa,$)}function L(c,d,g,x){n(c!=null),n(d!=null),n(2147483648>x),c.Ca=254,c.I=0,c.b=-8,c.Ka=0,c.oa=d,c.pa=g,c.Jd=d,c.Yc=g+x,c.Zc=4<=x?g+x-4+1:g,ue(c)}function M(c,d){for(var g=0;0<d--;)g|=se(c,128)<<d;return g}function Z(c,d){var g=M(c,d);return ge(c)?-g:g}function ae(c,d,g,x){var N,S=0;for(n(c!=null),n(d!=null),n(4294967288>x),c.Sb=x,c.Ra=0,c.u=0,c.h=0,4<x&&(x=4),N=0;N<x;++N)S+=d[g+N]<<8*N;c.Ra=S,c.bb=x,c.oa=d,c.pa=g}function he(c){for(;8<=c.u&&c.bb<c.Sb;)c.Ra>>>=8,c.Ra+=c.oa[c.pa+c.bb]<<As-8>>>0,++c.bb,c.u-=8;X(c)&&(c.h=1,c.u=0)}function we(c,d){if(n(0<=d),!c.h&&d<=No){var g=D(c)&ra[d];return c.u+=d,he(c),g}return c.h=1,c.u=0}function b(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function W(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function D(c){return c.Ra>>>(c.u&As-1)>>>0}function X(c){return n(c.bb<=c.Sb),c.h||c.bb==c.Sb&&c.u>As}function Y(c,d){c.u=d,c.h=X(c)}function te(c){c.u>=Ms&&(n(c.u>=Ms),he(c))}function ue(c){n(c!=null&&c.oa!=null),c.pa<c.Zc?(c.I=(c.oa[c.pa++]|c.I<<8)>>>0,c.b+=8):(n(c!=null&&c.oa!=null),c.pa<c.Yc?(c.b+=8,c.I=c.oa[c.pa++]|c.I<<8):c.Ka?c.b=0:(c.I<<=8,c.b+=8,c.Ka=1))}function ge(c){return M(c,1)}function se(c,d){var g=c.Ca;0>c.b&&ue(c);var x=c.b,N=g*d>>>8,S=(c.I>>>x>N)+0;for(S?(g-=N,c.I-=N+1<<x>>>0):g=N+1,x=g,N=0;256<=x;)N+=8,x>>=8;return x=7^N+Ma[x],c.b-=x,c.Ca=(g<<x)-1,S}function ve(c,d,g){c[d+0]=g>>24&255,c[d+1]=g>>16&255,c[d+2]=g>>8&255,c[d+3]=255&g}function Ae(c,d){return c[d+0]|c[d+1]<<8}function Pe(c,d){return Ae(c,d)|c[d+2]<<16}function He(c,d){return Ae(c,d)|Ae(c,d+2)<<16}function F(c,d){var g=1<<d;return n(c!=null),n(0<d),c.X=r(g),c.X==null?0:(c.Mb=32-d,c.Xa=d,1)}function ze(c,d){n(c!=null),n(d!=null),n(c.Xa==d.Xa),s(d.X,0,c.X,0,1<<d.Xa)}function Ye(){this.X=[],this.Xa=this.Mb=0}function Me(c,d,g,x){n(g!=null),n(x!=null);var N=g[0],S=x[0];return N==0&&(N=(c*S+d/2)/d),S==0&&(S=(d*N+c/2)/c),0>=N||0>=S?0:(g[0]=N,x[0]=S,1)}function ce(c,d){return c+(1<<d)-1>>>d}function Se(c,d){return((4278255360&c)+(4278255360&d)>>>0&4278255360)+((16711935&c)+(16711935&d)>>>0&16711935)>>>0}function Te(c,d){H[d]=function(g,x,N,S,E,T,O){var U;for(U=0;U<E;++U){var ne=H[c](T[O+U-1],N,S+U);T[O+U]=Se(g[x+U],ne)}}}function xe(){this.ud=this.hd=this.jd=0}function De(c,d){return((4278124286&(c^d))>>>1)+(c&d)>>>0}function it(c){return 0<=c&&256>c?c:0>c?0:255<c?255:void 0}function lt(c,d){return it(c+(c-d+.5>>1))}function nt(c,d,g){return Math.abs(d-g)-Math.abs(c-g)}function gt(c,d,g,x,N,S,E){for(x=S[E-1],g=0;g<N;++g)S[E+g]=x=Se(c[d+g],x)}function xt(c,d,g,x,N){var S;for(S=0;S<g;++S){var E=c[d+S],T=E>>8&255,O=16711935&(O=(O=16711935&E)+((T<<16)+T));x[N+S]=(4278255360&E)+O>>>0}}function Je(c,d){d.jd=255&c,d.hd=c>>8&255,d.ud=c>>16&255}function ht(c,d,g,x,N,S){var E;for(E=0;E<x;++E){var T=d[g+E],O=T>>>8,U=T,ne=255&(ne=(ne=T>>>16)+((c.jd<<24>>24)*(O<<24>>24)>>>5));U=255&(U=(U+=(c.hd<<24>>24)*(O<<24>>24)>>>5)+((c.ud<<24>>24)*(ne<<24>>24)>>>5)),N[S+E]=(4278255360&T)+(ne<<16)+U}}function Xe(c,d,g,x,N){H[d]=function(S,E,T,O,U,ne,pe,V,re){for(O=pe;O<V;++O)for(pe=0;pe<re;++pe)U[ne++]=N(T[x(S[E++])])},H[c]=function(S,E,T,O,U,ne,pe){var V=8>>S.b,re=S.Ea,de=S.K[0],Ne=S.w;if(8>V)for(S=(1<<S.b)-1,Ne=(1<<V)-1;E<T;++E){var fe,je=0;for(fe=0;fe<re;++fe)fe&S||(je=x(O[U++])),ne[pe++]=N(de[je&Ne]),je>>=V}else H["VP8LMapColor"+g](O,U,de,Ne,ne,pe,E,T,re)}}function Yt(c,d,g,x,N){for(g=d+g;d<g;){var S=c[d++];x[N++]=S>>16&255,x[N++]=S>>8&255,x[N++]=255&S}}function Mt(c,d,g,x,N){for(g=d+g;d<g;){var S=c[d++];x[N++]=S>>16&255,x[N++]=S>>8&255,x[N++]=255&S,x[N++]=S>>24&255}}function vt(c,d,g,x,N){for(g=d+g;d<g;){var S=(E=c[d++])>>16&240|E>>12&15,E=240&E|E>>28&15;x[N++]=S,x[N++]=E}}function ft(c,d,g,x,N){for(g=d+g;d<g;){var S=(E=c[d++])>>16&248|E>>13&7,E=E>>5&224|E>>3&31;x[N++]=S,x[N++]=E}}function kt(c,d,g,x,N){for(g=d+g;d<g;){var S=c[d++];x[N++]=255&S,x[N++]=S>>8&255,x[N++]=S>>16&255}}function Ke(c,d,g,x,N,S){if(S==0)for(g=d+g;d<g;)ve(x,((S=c[d++])[0]>>24|S[1]>>8&65280|S[2]<<8&16711680|S[3]<<24)>>>0),N+=32;else s(x,N,c,d,g)}function yt(c,d){H[d][0]=H[c+"0"],H[d][1]=H[c+"1"],H[d][2]=H[c+"2"],H[d][3]=H[c+"3"],H[d][4]=H[c+"4"],H[d][5]=H[c+"5"],H[d][6]=H[c+"6"],H[d][7]=H[c+"7"],H[d][8]=H[c+"8"],H[d][9]=H[c+"9"],H[d][10]=H[c+"10"],H[d][11]=H[c+"11"],H[d][12]=H[c+"12"],H[d][13]=H[c+"13"],H[d][14]=H[c+"0"],H[d][15]=H[c+"0"]}function Ge(c){return c==Wc||c==Uc||c==Al||c==Vc}function qe(){this.eb=[],this.size=this.A=this.fb=0}function _t(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function Dt(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new qe,this.f.kb=new _t,this.sd=null}function ut(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Ct(){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 Ws(c){return alert("todo:WebPSamplerProcessPlane"),c.T}function wn(c,d){var g=c.T,x=d.ba.f.RGBA,N=x.eb,S=x.fb+c.ka*x.A,E=li[d.ba.S],T=c.y,O=c.O,U=c.f,ne=c.N,pe=c.ea,V=c.W,re=d.cc,de=d.dc,Ne=d.Mc,fe=d.Nc,je=c.ka,ke=c.ka+c.T,Fe=c.U,Ce=Fe+1>>1;for(je==0?E(T,O,null,null,U,ne,pe,V,U,ne,pe,V,N,S,null,null,Fe):(E(d.ec,d.fc,T,O,re,de,Ne,fe,U,ne,pe,V,N,S-x.A,N,S,Fe),++g);je+2<ke;je+=2)re=U,de=ne,Ne=pe,fe=V,ne+=c.Rc,V+=c.Rc,S+=2*x.A,E(T,(O+=2*c.fa)-c.fa,T,O,re,de,Ne,fe,U,ne,pe,V,N,S-x.A,N,S,Fe);return O+=c.fa,c.j+ke<c.o?(s(d.ec,d.fc,T,O,Fe),s(d.cc,d.dc,U,ne,Ce),s(d.Mc,d.Nc,pe,V,Ce),g--):1&ke||E(T,O,null,null,U,ne,pe,V,U,ne,pe,V,N,S+x.A,null,null,Fe),g}function $n(c,d,g){var x=c.F,N=[c.J];if(x!=null){var S=c.U,E=d.ba.S,T=E==kl||E==Al;d=d.ba.f.RGBA;var O=[0],U=c.ka;O[0]=c.T,c.Kb&&(U==0?--O[0]:(--U,N[0]-=c.width),c.j+c.ka+c.T==c.o&&(O[0]=c.o-c.j-U));var ne=d.eb;U=d.fb+U*d.A,c=Ru(x,N[0],c.width,S,O,ne,U+(T?0:3),d.A),n(g==O),c&&Ge(E)&&So(ne,U,T,S,O,d.A)}return 0}function Ds(c){var d=c.ma,g=d.ba.S,x=11>g,N=g==Nl||g==jl||g==kl||g==qc||g==12||Ge(g);if(d.memory=null,d.Ib=null,d.Jb=null,d.Nd=null,!ai(d.Oa,c,N?11:12))return 0;if(N&&Ge(g)&&er(),c.da)alert("todo:use_scaling");else{if(x){if(d.Ib=Ws,c.Kb){if(g=c.U+1>>1,d.memory=r(c.U+2*g),d.memory==null)return 0;d.ec=d.memory,d.fc=0,d.cc=d.ec,d.dc=d.fc+c.U,d.Mc=d.cc,d.Nc=d.dc+g,d.Ib=wn,er()}}else alert("todo:EmitYUV");N&&(d.Jb=$n,x&&An())}if(x&&!th){for(c=0;256>c;++c)M1[c]=89858*(c-128)+Ll>>Sl,B1[c]=-22014*(c-128)+Ll,I1[c]=-45773*(c-128),R1[c]=113618*(c-128)+Ll>>Sl;for(c=Eo;c<$c;++c)d=76283*(c-16)+Ll>>Sl,q1[c-Eo]=Nt(d,255),W1[c-Eo]=Nt(d+8>>4,15);th=1}return 1}function $e(c){var d=c.ma,g=c.U,x=c.T;return n(!(1&c.ka)),0>=g||0>=x?0:(g=d.Ib(c,d),d.Jb!=null&&d.Jb(c,d,g),d.Dc+=g,1)}function bt(c){c.ma.memory=null}function si(c,d,g,x){return we(c,8)!=47?0:(d[0]=we(c,14)+1,g[0]=we(c,14)+1,x[0]=we(c,1),we(c,3)!=0?0:!c.h)}function ys(c,d){if(4>c)return c+1;var g=c-2>>1;return(2+(1&c)<<g)+we(d,g)+1}function _s(c,d){return 120<d?d-120:1<=(g=((g=N1[d-1])>>4)*c+(8-(15&g)))?g:1;var g}function pn(c,d,g){var x=D(g),N=c[d+=255&x].g-8;return 0<N&&(Y(g,g.u+8),x=D(g),d+=c[d].value,d+=x&(1<<N)-1),Y(g,g.u+c[d].g),c[d].value}function dn(c,d,g){return g.g+=c.g,g.value+=c.value<<d>>>0,n(8>=g.g),c.g}function gn(c,d,g){var x=c.xc;return n((d=x==0?0:c.vc[c.md*(g>>x)+(d>>x)])<c.Wb),c.Ya[d]}function $i(c,d,g,x){var N=c.ab,S=c.c*d,E=c.C;d=E+d;var T=g,O=x;for(x=c.Ta,g=c.Ua;0<N--;){var U=c.gc[N],ne=E,pe=d,V=T,re=O,de=(O=x,T=g,U.Ea);switch(n(ne<pe),n(pe<=U.nc),U.hc){case 2:Ra(V,re,(pe-ne)*de,O,T);break;case 0:var Ne=ne,fe=pe,je=O,ke=T,Fe=(at=U).Ea;Ne==0&&(Lr(V,re,null,null,1,je,ke),gt(V,re+1,0,0,Fe-1,je,ke+1),re+=Fe,ke+=Fe,++Ne);for(var Ce=1<<at.b,ct=Ce-1,et=ce(Fe,at.b),zt=at.K,at=at.w+(Ne>>at.b)*et;Ne<fe;){var qt=zt,Kn=at,Ft=1;for(Er(V,re,je,ke-Fe,1,je,ke);Ft<Fe;){var ot=(Ft&~ct)+Ce;ot>Fe&&(ot=Fe),(0,gi[qt[Kn++]>>8&15])(V,re+ +Ft,je,ke+Ft-Fe,ot-Ft,je,ke+Ft),Ft=ot}re+=Fe,ke+=Fe,++Ne&ct||(at+=et)}pe!=U.nc&&s(O,T-de,O,T+(pe-ne-1)*de,de);break;case 1:for(de=V,fe=re,Fe=(V=U.Ea)-(ke=V&~(je=(re=1<<U.b)-1)),Ne=ce(V,U.b),Ce=U.K,U=U.w+(ne>>U.b)*Ne;ne<pe;){for(ct=Ce,et=U,zt=new xe,at=fe+ke,qt=fe+V;fe<at;)Je(ct[et++],zt),oa(zt,de,fe,re,O,T),fe+=re,T+=re;fe<qt&&(Je(ct[et++],zt),oa(zt,de,fe,Fe,O,T),fe+=Fe,T+=Fe),++ne&je||(U+=Ne)}break;case 3:if(V==O&&re==T&&0<U.b){for(fe=O,V=de=T+(pe-ne)*de-(ke=(pe-ne)*ce(U.Ea,U.b)),re=O,je=T,Ne=[],ke=(Fe=ke)-1;0<=ke;--ke)Ne[ke]=re[je+ke];for(ke=Fe-1;0<=ke;--ke)fe[V+ke]=Ne[ke];aa(U,ne,pe,O,de,O,T)}else aa(U,ne,pe,V,re,O,T)}T=x,O=g}O!=g&&s(x,g,T,O,S)}function Ai(c,d){var g=c.V,x=c.Ba+c.c*c.C,N=d-c.C;if(n(d<=c.l.o),n(16>=N),0<N){var S=c.l,E=c.Ta,T=c.Ua,O=S.width;if($i(c,N,g,x),N=T=[T],n((g=c.C)<(x=d)),n(S.v<S.va),x>S.o&&(x=S.o),g<S.j){var U=S.j-g;g=S.j,N[0]+=U*O}if(g>=x?g=0:(N[0]+=4*S.v,S.ka=g-S.j,S.U=S.va-S.v,S.T=x-g,g=1),g){if(T=T[0],11>(g=c.ca).S){var ne=g.f.RGBA,pe=(x=g.S,N=S.U,S=S.T,U=ne.eb,ne.A),V=S;for(ne=ne.fb+c.Ma*ne.A;0<V--;){var re=E,de=T,Ne=N,fe=U,je=ne;switch(x){case _l:jo(re,de,Ne,fe,je);break;case Nl:ko(re,de,Ne,fe,je);break;case Wc:ko(re,de,Ne,fe,je),So(fe,je,0,Ne,1,0);break;case Hu:ca(re,de,Ne,fe,je);break;case jl:Ke(re,de,Ne,fe,je,1);break;case Uc:Ke(re,de,Ne,fe,je,1),So(fe,je,0,Ne,1,0);break;case kl:Ke(re,de,Ne,fe,je,0);break;case Al:Ke(re,de,Ne,fe,je,0),So(fe,je,1,Ne,1,0);break;case qc:Ia(re,de,Ne,fe,je);break;case Vc:Ia(re,de,Ne,fe,je),Mu(fe,je,Ne,1,0);break;case Gu:la(re,de,Ne,fe,je);break;default:n(0)}T+=O,ne+=pe}c.Ma+=S}else alert("todo:EmitRescaledRowsYUVA");n(c.Ma<=g.height)}}c.C=d,n(c.C<=c.i)}function Us(c){var d;if(0<c.ua)return 0;for(d=0;d<c.Wb;++d){var g=c.Ya[d].G,x=c.Ya[d].H;if(0<g[1][x[1]+0].g||0<g[2][x[2]+0].g||0<g[3][x[3]+0].g)return 0}return 1}function ii(c,d,g,x,N,S){if(c.Z!=0){var E=c.qd,T=c.rd;for(n(Tr[c.Z]!=null);d<g;++d)Tr[c.Z](E,T,x,N,x,N,S),E=x,T=N,N+=S;c.qd=E,c.rd=T}}function Ts(c,d){var g=c.l.ma,x=g.Z==0||g.Z==1?c.l.j:c.C;if(x=c.C<x?x:c.C,n(d<=c.l.o),d>x){var N=c.l.width,S=g.ca,E=g.tb+N*x,T=c.V,O=c.Ba+c.c*x,U=c.gc;n(c.ab==1),n(U[0].hc==3),Ic(U[0],x,d,T,O,S,E),ii(g,x,d,S,E,N)}c.C=c.Ma=d}function Ns(c,d,g,x,N,S,E){var T=c.$/x,O=c.$%x,U=c.m,ne=c.s,pe=g+c.$,V=pe;N=g+x*N;var re=g+x*S,de=280+ne.ua,Ne=c.Pb?T:16777216,fe=0<ne.ua?ne.Wa:null,je=ne.wc,ke=pe<re?gn(ne,O,T):null;n(c.C<S),n(re<=N);var Fe=!1;e:for(;;){for(;Fe||pe<re;){var Ce=0;if(T>=Ne){var ct=pe-g;n((Ne=c).Pb),Ne.wd=Ne.m,Ne.xd=ct,0<Ne.s.ua&&ze(Ne.s.Wa,Ne.s.vb),Ne=T+k1}if(O&je||(ke=gn(ne,O,T)),n(ke!=null),ke.Qb&&(d[pe]=ke.qb,Fe=!0),!Fe)if(te(U),ke.jc){Ce=U,ct=d;var et=pe,zt=ke.pd[D(Ce)&Oa-1];n(ke.jc),256>zt.g?(Y(Ce,Ce.u+zt.g),ct[et]=zt.value,Ce=0):(Y(Ce,Ce.u+zt.g-256),n(256<=zt.value),Ce=zt.value),Ce==0&&(Fe=!0)}else Ce=pn(ke.G[0],ke.H[0],U);if(U.h)break;if(Fe||256>Ce){if(!Fe)if(ke.nd)d[pe]=(ke.qb|Ce<<8)>>>0;else{if(te(U),Fe=pn(ke.G[1],ke.H[1],U),te(U),ct=pn(ke.G[2],ke.H[2],U),et=pn(ke.G[3],ke.H[3],U),U.h)break;d[pe]=(et<<24|Fe<<16|Ce<<8|ct)>>>0}if(Fe=!1,++pe,++O>=x&&(O=0,++T,E!=null&&T<=S&&!(T%16)&&E(c,T),fe!=null))for(;V<pe;)Ce=d[V++],fe.X[(506832829*Ce&4294967295)>>>fe.Mb]=Ce}else if(280>Ce){if(Ce=ys(Ce-256,U),ct=pn(ke.G[4],ke.H[4],U),te(U),ct=_s(x,ct=ys(ct,U)),U.h)break;if(pe-g<ct||N-pe<Ce)break e;for(et=0;et<Ce;++et)d[pe+et]=d[pe+et-ct];for(pe+=Ce,O+=Ce;O>=x;)O-=x,++T,E!=null&&T<=S&&!(T%16)&&E(c,T);if(n(pe<=N),O&je&&(ke=gn(ne,O,T)),fe!=null)for(;V<pe;)Ce=d[V++],fe.X[(506832829*Ce&4294967295)>>>fe.Mb]=Ce}else{if(!(Ce<de))break e;for(Fe=Ce-280,n(fe!=null);V<pe;)Ce=d[V++],fe.X[(506832829*Ce&4294967295)>>>fe.Mb]=Ce;Ce=pe,n(!(Fe>>>(ct=fe).Xa)),d[Ce]=ct.X[Fe],Fe=!0}Fe||n(U.h==X(U))}if(c.Pb&&U.h&&pe<N)n(c.m.h),c.a=5,c.m=c.wd,c.$=c.xd,0<c.s.ua&&ze(c.s.vb,c.s.Wa);else{if(U.h)break e;E!=null&&E(c,T>S?S:T),c.a=0,c.$=pe-g}return 1}return c.a=3,0}function zs(c){n(c!=null),c.vc=null,c.yc=null,c.Ya=null;var d=c.Wa;d!=null&&(d.X=null),c.vb=null,n(c!=null)}function Zi(){var c=new rt;return c==null?null:(c.a=0,c.xb=Yu,yt("Predictor","VP8LPredictors"),yt("Predictor","VP8LPredictors_C"),yt("PredictorAdd","VP8LPredictorsAdd"),yt("PredictorAdd","VP8LPredictorsAdd_C"),Ra=xt,oa=ht,jo=Yt,ko=Mt,Ia=vt,la=ft,ca=kt,H.VP8LMapColor32b=Gn,H.VP8LMapColor8b=Ci,c)}function js(c,d,g,x,N){var S=1,E=[c],T=[d],O=x.m,U=x.s,ne=null,pe=0;e:for(;;){if(g)for(;S&&we(O,1);){var V=E,re=T,de=x,Ne=1,fe=de.m,je=de.gc[de.ab],ke=we(fe,2);if(de.Oc&1<<ke)S=0;else{switch(de.Oc|=1<<ke,je.hc=ke,je.Ea=V[0],je.nc=re[0],je.K=[null],++de.ab,n(4>=de.ab),ke){case 0:case 1:je.b=we(fe,3)+2,Ne=js(ce(je.Ea,je.b),ce(je.nc,je.b),0,de,je.K),je.K=je.K[0];break;case 3:var Fe,Ce=we(fe,8)+1,ct=16<Ce?0:4<Ce?1:2<Ce?2:3;if(V[0]=ce(je.Ea,ct),je.b=ct,Fe=Ne=js(Ce,1,0,de,je.K)){var et,zt=Ce,at=je,qt=1<<(8>>at.b),Kn=r(qt);if(Kn==null)Fe=0;else{var Ft=at.K[0],ot=at.w;for(Kn[0]=at.K[0][0],et=1;et<1*zt;++et)Kn[et]=Se(Ft[ot+et],Kn[et-1]);for(;et<4*qt;++et)Kn[et]=0;at.K[0]=null,at.K[0]=Kn,Fe=1}}Ne=Fe;break;case 2:break;default:n(0)}S=Ne}}if(E=E[0],T=T[0],S&&we(O,1)&&!(S=1<=(pe=we(O,4))&&11>=pe)){x.a=3;break e}var Ve;if(Ve=S)t:{var Mn,Et,Ut,vn=x,rs=E,Ss=T,Pn=pe,ps=g,Ls=vn.m,Jn=vn.s,Vt=[null],Jt=1,Cn=0,Xt=j1[Pn];n:for(;;){if(ps&&we(Ls,1)){var as=we(Ls,3)+2,vi=ce(rs,as),Rn=ce(Ss,as),Rs=vi*Rn;if(!js(vi,Rn,0,vn,Vt))break n;for(Vt=Vt[0],Jn.xc=as,Mn=0;Mn<Rs;++Mn){var an=Vt[Mn]>>8&65535;Vt[Mn]=an,an>=Jt&&(Jt=an+1)}}if(Ls.h)break n;for(Et=0;5>Et;++Et){var Xn=$u[Et];!Et&&0<Pn&&(Xn+=1<<Pn),Cn<Xn&&(Cn=Xn)}var Gs=l(Jt*Xt,C),Es=Jt,$s=l(Es,q);if($s==null)var Zs=null;else n(65536>=Es),Zs=$s;var Is=r(Cn);if(Zs==null||Is==null||Gs==null){vn.a=1;break n}var Ys=Gs;for(Mn=Ut=0;Mn<Jt;++Mn){var mn=Zs[Mn],Ks=mn.G,bi=mn.H,da=0,ir=1,os=0;for(Et=0;5>Et;++Et){Xn=$u[Et],Ks[Et]=Ys,bi[Et]=Ut,!Et&&0<Pn&&(Xn+=1<<Pn);i:{var Pl,Zc=Xn,Cl=vn,Po=Is,H1=Ys,G1=Ut,Yc=0,zr=Cl.m,$1=we(zr,1);if(i(Po,0,0,Zc),$1){var Z1=we(zr,1)+1,Y1=we(zr,1),ih=we(zr,Y1==0?1:8);Po[ih]=1,Z1==2&&(Po[ih=we(zr,8)]=1);var Dl=1}else{var rh=r(19),ah=we(zr,4)+4;if(19<ah){Cl.a=3;var Tl=0;break i}for(Pl=0;Pl<ah;++Pl)rh[_1[Pl]]=we(zr,3);var Kc=void 0,Co=void 0,oh=Cl,K1=rh,zl=Zc,lh=Po,Jc=0,Fr=oh.m,ch=8,dh=l(128,C);s:for(;z(dh,0,7,K1,19);){if(we(Fr,1)){var J1=2+2*we(Fr,3);if((Kc=2+we(Fr,J1))>zl)break s}else Kc=zl;for(Co=0;Co<zl&&Kc--;){te(Fr);var uh=dh[0+(127&D(Fr))];Y(Fr,Fr.u+uh.g);var Wa=uh.value;if(16>Wa)lh[Co++]=Wa,Wa!=0&&(ch=Wa);else{var X1=Wa==16,hh=Wa-16,Q1=w1[hh],fh=we(Fr,b1[hh])+Q1;if(Co+fh>zl)break s;for(var e0=X1?ch:0;0<fh--;)lh[Co++]=e0}}Jc=1;break s}Jc||(oh.a=3),Dl=Jc}(Dl=Dl&&!zr.h)&&(Yc=z(H1,G1,8,Po,Zc)),Dl&&Yc!=0?Tl=Yc:(Cl.a=3,Tl=0)}if(Tl==0)break n;if(ir&&y1[Et]==1&&(ir=Ys[Ut].g==0),da+=Ys[Ut].g,Ut+=Tl,3>=Et){var Do,Xc=Is[0];for(Do=1;Do<Xn;++Do)Is[Do]>Xc&&(Xc=Is[Do]);os+=Xc}}if(mn.nd=ir,mn.Qb=0,ir&&(mn.qb=(Ks[3][bi[3]+0].value<<24|Ks[1][bi[1]+0].value<<16|Ks[2][bi[2]+0].value)>>>0,da==0&&256>Ks[0][bi[0]+0].value&&(mn.Qb=1,mn.qb+=Ks[0][bi[0]+0].value<<8)),mn.jc=!mn.Qb&&6>os,mn.jc){var Fl,rr=mn;for(Fl=0;Fl<Oa;++Fl){var Or=Fl,Mr=rr.pd[Or],Ol=rr.G[0][rr.H[0]+Or];256<=Ol.value?(Mr.g=Ol.g+256,Mr.value=Ol.value):(Mr.g=0,Mr.value=0,Or>>=dn(Ol,8,Mr),Or>>=dn(rr.G[1][rr.H[1]+Or],16,Mr),Or>>=dn(rr.G[2][rr.H[2]+Or],0,Mr),dn(rr.G[3][rr.H[3]+Or],24,Mr))}}}Jn.vc=Vt,Jn.Wb=Jt,Jn.Ya=Zs,Jn.yc=Gs,Ve=1;break t}Ve=0}if(!(S=Ve)){x.a=3;break e}if(0<pe){if(U.ua=1<<pe,!F(U.Wa,pe)){x.a=1,S=0;break e}}else U.ua=0;var Qc=x,mh=E,t0=T,ed=Qc.s,td=ed.xc;if(Qc.c=mh,Qc.i=t0,ed.md=ce(mh,td),ed.wc=td==0?-1:(1<<td)-1,g){x.xb=D1;break e}if((ne=r(E*T))==null){x.a=1,S=0;break e}S=(S=Ns(x,ne,0,E,T,T,null))&&!O.h;break e}return S?(N!=null?N[0]=ne:(n(ne==null),n(g)),x.$=0,g||zs(U)):zs(U),S}function Yi(c,d){var g=c.c*c.i,x=g+d+16*d;return n(c.c<=d),c.V=r(x),c.V==null?(c.Ta=null,c.Ua=0,c.a=1,0):(c.Ta=c.V,c.Ua=c.Ba+g+d,1)}function br(c,d){var g=c.C,x=d-g,N=c.V,S=c.Ba+c.c*g;for(n(d<=c.l.o);0<x;){var E=16<x?16:x,T=c.l.ma,O=c.l.width,U=O*E,ne=T.ca,pe=T.tb+O*g,V=c.Ta,re=c.Ua;$i(c,E,N,S),Iu(V,re,ne,pe,U),ii(T,g,g+E,ne,pe,O),x-=E,N+=E*c.c,g+=E}n(g==d),c.C=c.Ma=d}function wr(){this.ub=this.yd=this.td=this.Rb=0}function yr(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function fo(){this.Fb=this.Bb=this.Cb=0,this.Zb=r(4),this.Lb=r(4)}function Zr(){this.Yb=function(){var c=[];return function d(g,x,N){for(var S=N[x],E=0;E<S&&(g.push(N.length>x+1?[]:0),!(N.length<x+1));E++)d(g[E],x+1,N)}(c,0,[3,11]),c}()}function _r(){this.jb=r(3),this.Wc=o([4,8],Zr),this.Xc=o([4,17],Zr)}function Yr(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new r(4),this.od=new r(4)}function Fs(){this.ld=this.La=this.dd=this.tc=0}function Nr(){this.Na=this.la=0}function Si(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function jr(){this.ad=r(384),this.Za=0,this.Ob=r(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function J(){this.uc=this.M=this.Nb=0,this.wa=Array(new Fs),this.Y=0,this.ya=Array(new jr),this.aa=0,this.l=new Bt}function Re(){this.y=r(16),this.f=r(8),this.ea=r(8)}function mt(){this.cb=this.a=0,this.sc="",this.m=new b,this.Od=new wr,this.Kc=new yr,this.ed=new Yr,this.Qa=new fo,this.Ic=this.$c=this.Aa=0,this.D=new J,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=l(8,b),this.ia=0,this.pb=l(4,Si),this.Pa=new _r,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Re),this.Hd=0,this.rb=Array(new Nr),this.sb=0,this.wa=Array(new Fs),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 jr),this.L=this.aa=0,this.gd=o([4,2],Fs),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 Nt(c,d){return 0>c?0:c>d?d:c}function Bt(){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 tn(){var c=new mt;return c!=null&&(c.a=0,c.sc="OK",c.cb=0,c.Xb=0,Lo||(Lo=yn)),c}function At(c,d,g){return c.a==0&&(c.a=d,c.sc=g,c.cb=0),0}function Fn(c,d,g){return 3<=g&&c[d+0]==157&&c[d+1]==1&&c[d+2]==42}function Kt(c,d){if(c==null)return 0;if(c.a=0,c.sc="OK",d==null)return At(c,2,"null VP8Io passed to VP8GetHeaders()");var g=d.data,x=d.w,N=d.ha;if(4>N)return At(c,7,"Truncated header.");var S=g[x+0]|g[x+1]<<8|g[x+2]<<16,E=c.Od;if(E.Rb=!(1&S),E.td=S>>1&7,E.yd=S>>4&1,E.ub=S>>5,3<E.td)return At(c,3,"Incorrect keyframe parameters.");if(!E.yd)return At(c,4,"Frame not displayable.");x+=3,N-=3;var T=c.Kc;if(E.Rb){if(7>N)return At(c,7,"cannot parse picture header");if(!Fn(g,x,N))return At(c,3,"Bad code word");T.c=16383&(g[x+4]<<8|g[x+3]),T.Td=g[x+4]>>6,T.i=16383&(g[x+6]<<8|g[x+5]),T.Ud=g[x+6]>>6,x+=7,N-=7,c.za=T.c+15>>4,c.Ub=T.i+15>>4,d.width=T.c,d.height=T.i,d.Da=0,d.j=0,d.v=0,d.va=d.width,d.o=d.height,d.da=0,d.ib=d.width,d.hb=d.height,d.U=d.width,d.T=d.height,i((S=c.Pa).jb,0,255,S.jb.length),n((S=c.Qa)!=null),S.Cb=0,S.Bb=0,S.Fb=1,i(S.Zb,0,0,S.Zb.length),i(S.Lb,0,0,S.Lb)}if(E.ub>N)return At(c,7,"bad partition length");L(S=c.m,g,x,E.ub),x+=E.ub,N-=E.ub,E.Rb&&(T.Ld=ge(S),T.Kd=ge(S)),T=c.Qa;var O,U=c.Pa;if(n(S!=null),n(T!=null),T.Cb=ge(S),T.Cb){if(T.Bb=ge(S),ge(S)){for(T.Fb=ge(S),O=0;4>O;++O)T.Zb[O]=ge(S)?Z(S,7):0;for(O=0;4>O;++O)T.Lb[O]=ge(S)?Z(S,6):0}if(T.Bb)for(O=0;3>O;++O)U.jb[O]=ge(S)?M(S,8):255}else T.Bb=0;if(S.Ka)return At(c,3,"cannot parse segment header");if((T=c.ed).zd=ge(S),T.Tb=M(S,6),T.wb=M(S,3),T.Pc=ge(S),T.Pc&&ge(S)){for(U=0;4>U;++U)ge(S)&&(T.vd[U]=Z(S,6));for(U=0;4>U;++U)ge(S)&&(T.od[U]=Z(S,6))}if(c.L=T.Tb==0?0:T.zd?1:2,S.Ka)return At(c,3,"cannot parse filter header");var ne=N;if(N=O=x,x=O+ne,T=ne,c.Xb=(1<<M(c.m,2))-1,ne<3*(U=c.Xb))g=7;else{for(O+=3*U,T-=3*U,ne=0;ne<U;++ne){var pe=g[N+0]|g[N+1]<<8|g[N+2]<<16;pe>T&&(pe=T),L(c.Jc[+ne],g,O,pe),O+=pe,T-=pe,N+=3}L(c.Jc[+U],g,O,T),g=O<x?0:5}if(g!=0)return At(c,g,"cannot parse partitions");for(g=M(O=c.m,7),N=ge(O)?Z(O,4):0,x=ge(O)?Z(O,4):0,T=ge(O)?Z(O,4):0,U=ge(O)?Z(O,4):0,O=ge(O)?Z(O,4):0,ne=c.Qa,pe=0;4>pe;++pe){if(ne.Cb){var V=ne.Zb[pe];ne.Fb||(V+=g)}else{if(0<pe){c.pb[pe]=c.pb[0];continue}V=g}var re=c.pb[pe];re.Sc[0]=Hc[Nt(V+N,127)],re.Sc[1]=Gc[Nt(V+0,127)],re.Eb[0]=2*Hc[Nt(V+x,127)],re.Eb[1]=101581*Gc[Nt(V+T,127)]>>16,8>re.Eb[1]&&(re.Eb[1]=8),re.Qc[0]=Hc[Nt(V+U,117)],re.Qc[1]=Gc[Nt(V+O,127)],re.lc=V+O}if(!E.Rb)return At(c,4,"Not a key frame.");for(ge(S),E=c.Pa,g=0;4>g;++g){for(N=0;8>N;++N)for(x=0;3>x;++x)for(T=0;11>T;++T)U=se(S,P1[g][N][x][T])?M(S,8):L1[g][N][x][T],E.Wc[g][N].Yb[x][T]=U;for(N=0;17>N;++N)E.Xc[g][N]=E.Wc[g][C1[N]]}return c.kc=ge(S),c.kc&&(c.Bd=M(S,8)),c.cb=1}function yn(c,d,g,x,N,S,E){var T=d[N].Yb[g];for(g=0;16>N;++N){if(!se(c,T[g+0]))return N;for(;!se(c,T[g+1]);)if(T=d[++N].Yb[0],g=0,N==16)return 16;var O=d[N+1].Yb;if(se(c,T[g+2])){var U=c,ne=0;if(se(U,(V=T)[(pe=g)+3]))if(se(U,V[pe+6])){for(T=0,pe=2*(ne=se(U,V[pe+8]))+(V=se(U,V[pe+9+ne])),ne=0,V=A1[pe];V[T];++T)ne+=ne+se(U,V[T]);ne+=3+(8<<pe)}else se(U,V[pe+7])?(ne=7+2*se(U,165),ne+=se(U,145)):ne=5+se(U,159);else ne=se(U,V[pe+4])?3+se(U,V[pe+5]):2;T=O[2]}else ne=1,T=O[1];O=E+S1[N],0>(U=c).b&&ue(U);var pe,V=U.b,re=(pe=U.Ca>>1)-(U.I>>V)>>31;--U.b,U.Ca+=re,U.Ca|=1,U.I-=(pe+1&re)<<V,S[O]=((ne^re)-re)*x[(0<N)+0]}return 16}function Qn(c){var d=c.rb[c.sb-1];d.la=0,d.Na=0,i(c.zc,0,0,c.zc.length),c.ja=0}function un(c,d,g,x,N){N=c[d+g+32*x]+(N>>3),c[d+g+32*x]=-256&N?0>N?0:255:N}function Rt(c,d,g,x,N,S){un(c,d,0,g,x+N),un(c,d,1,g,x+S),un(c,d,2,g,x-S),un(c,d,3,g,x-N)}function Gt(c){return(20091*c>>16)+c}function sn(c,d,g,x){var N,S=0,E=r(16);for(N=0;4>N;++N){var T=c[d+0]+c[d+8],O=c[d+0]-c[d+8],U=(35468*c[d+4]>>16)-Gt(c[d+12]),ne=Gt(c[d+4])+(35468*c[d+12]>>16);E[S+0]=T+ne,E[S+1]=O+U,E[S+2]=O-U,E[S+3]=T-ne,S+=4,d++}for(N=S=0;4>N;++N)T=(c=E[S+0]+4)+E[S+8],O=c-E[S+8],U=(35468*E[S+4]>>16)-Gt(E[S+12]),un(g,x,0,0,T+(ne=Gt(E[S+4])+(35468*E[S+12]>>16))),un(g,x,1,0,O+U),un(g,x,2,0,O-U),un(g,x,3,0,T-ne),S++,x+=32}function ss(c,d,g,x){var N=c[d+0]+4,S=35468*c[d+4]>>16,E=Gt(c[d+4]),T=35468*c[d+1]>>16;Rt(g,x,0,N+E,c=Gt(c[d+1]),T),Rt(g,x,1,N+S,c,T),Rt(g,x,2,N-S,c,T),Rt(g,x,3,N-E,c,T)}function Ln(c,d,g,x,N){sn(c,d,g,x),N&&sn(c,d+16,g,x+4)}function jn(c,d,g,x){tr(c,d+0,g,x,1),tr(c,d+32,g,x+128,1)}function mi(c,d,g,x){var N;for(c=c[d+0]+4,N=0;4>N;++N)for(d=0;4>d;++d)un(g,x,d,N,c)}function is(c,d,g,x){c[d+0]&&ms(c,d+0,g,x),c[d+16]&&ms(c,d+16,g,x+4),c[d+32]&&ms(c,d+32,g,x+128),c[d+48]&&ms(c,d+48,g,x+128+4)}function Vs(c,d,g,x){var N,S=r(16);for(N=0;4>N;++N){var E=c[d+0+N]+c[d+12+N],T=c[d+4+N]+c[d+8+N],O=c[d+4+N]-c[d+8+N],U=c[d+0+N]-c[d+12+N];S[0+N]=E+T,S[8+N]=E-T,S[4+N]=U+O,S[12+N]=U-O}for(N=0;4>N;++N)E=(c=S[0+4*N]+3)+S[3+4*N],T=S[1+4*N]+S[2+4*N],O=S[1+4*N]-S[2+4*N],U=c-S[3+4*N],g[x+0]=E+T>>3,g[x+16]=U+O>>3,g[x+32]=E-T>>3,g[x+48]=U-O>>3,x+=64}function ri(c,d,g){var x,N=d-32,S=Hs,E=255-c[N-1];for(x=0;x<g;++x){var T,O=S,U=E+c[d-1];for(T=0;T<g;++T)c[d+T]=O[U+c[N+T]];d+=32}}function us(c,d){ri(c,d,4)}function Os(c,d){ri(c,d,8)}function Li(c,d){ri(c,d,16)}function kr(c,d){var g;for(g=0;16>g;++g)s(c,d+32*g,c,d-32,16)}function pi(c,d){var g;for(g=16;0<g;--g)i(c,d,c[d-1],16),d+=32}function Le(c,d,g){var x;for(x=0;16>x;++x)i(d,g+32*x,c,16)}function Tt(c,d){var g,x=16;for(g=0;16>g;++g)x+=c[d-1+32*g]+c[d+g-32];Le(x>>5,c,d)}function ye(c,d){var g,x=8;for(g=0;16>g;++g)x+=c[d-1+32*g];Le(x>>4,c,d)}function Ue(c,d){var g,x=8;for(g=0;16>g;++g)x+=c[d+g-32];Le(x>>4,c,d)}function Qe(c,d){Le(128,c,d)}function We(c,d,g){return c+2*d+g+2>>2}function It(c,d){var g,x=d-32;for(x=new Uint8Array([We(c[x-1],c[x+0],c[x+1]),We(c[x+0],c[x+1],c[x+2]),We(c[x+1],c[x+2],c[x+3]),We(c[x+2],c[x+3],c[x+4])]),g=0;4>g;++g)s(c,d+32*g,x,0,x.length)}function Zn(c,d){var g=c[d-1],x=c[d-1+32],N=c[d-1+64],S=c[d-1+96];ve(c,d+0,16843009*We(c[d-1-32],g,x)),ve(c,d+32,16843009*We(g,x,N)),ve(c,d+64,16843009*We(x,N,S)),ve(c,d+96,16843009*We(N,S,S))}function En(c,d){var g,x=4;for(g=0;4>g;++g)x+=c[d+g-32]+c[d-1+32*g];for(x>>=3,g=0;4>g;++g)i(c,d+32*g,x,4)}function Kr(c,d){var g=c[d-1+0],x=c[d-1+32],N=c[d-1+64],S=c[d-1-32],E=c[d+0-32],T=c[d+1-32],O=c[d+2-32],U=c[d+3-32];c[d+0+96]=We(x,N,c[d-1+96]),c[d+1+96]=c[d+0+64]=We(g,x,N),c[d+2+96]=c[d+1+64]=c[d+0+32]=We(S,g,x),c[d+3+96]=c[d+2+64]=c[d+1+32]=c[d+0+0]=We(E,S,g),c[d+3+64]=c[d+2+32]=c[d+1+0]=We(T,E,S),c[d+3+32]=c[d+2+0]=We(O,T,E),c[d+3+0]=We(U,O,T)}function mo(c,d){var g=c[d+1-32],x=c[d+2-32],N=c[d+3-32],S=c[d+4-32],E=c[d+5-32],T=c[d+6-32],O=c[d+7-32];c[d+0+0]=We(c[d+0-32],g,x),c[d+1+0]=c[d+0+32]=We(g,x,N),c[d+2+0]=c[d+1+32]=c[d+0+64]=We(x,N,S),c[d+3+0]=c[d+2+32]=c[d+1+64]=c[d+0+96]=We(N,S,E),c[d+3+32]=c[d+2+64]=c[d+1+96]=We(S,E,T),c[d+3+64]=c[d+2+96]=We(E,T,O),c[d+3+96]=We(T,O,O)}function Ki(c,d){var g=c[d-1+0],x=c[d-1+32],N=c[d-1+64],S=c[d-1-32],E=c[d+0-32],T=c[d+1-32],O=c[d+2-32],U=c[d+3-32];c[d+0+0]=c[d+1+64]=S+E+1>>1,c[d+1+0]=c[d+2+64]=E+T+1>>1,c[d+2+0]=c[d+3+64]=T+O+1>>1,c[d+3+0]=O+U+1>>1,c[d+0+96]=We(N,x,g),c[d+0+64]=We(x,g,S),c[d+0+32]=c[d+1+96]=We(g,S,E),c[d+1+32]=c[d+2+96]=We(S,E,T),c[d+2+32]=c[d+3+96]=We(E,T,O),c[d+3+32]=We(T,O,U)}function Ji(c,d){var g=c[d+0-32],x=c[d+1-32],N=c[d+2-32],S=c[d+3-32],E=c[d+4-32],T=c[d+5-32],O=c[d+6-32],U=c[d+7-32];c[d+0+0]=g+x+1>>1,c[d+1+0]=c[d+0+64]=x+N+1>>1,c[d+2+0]=c[d+1+64]=N+S+1>>1,c[d+3+0]=c[d+2+64]=S+E+1>>1,c[d+0+32]=We(g,x,N),c[d+1+32]=c[d+0+96]=We(x,N,S),c[d+2+32]=c[d+1+96]=We(N,S,E),c[d+3+32]=c[d+2+96]=We(S,E,T),c[d+3+64]=We(E,T,O),c[d+3+96]=We(T,O,U)}function Fc(c,d){var g=c[d-1+0],x=c[d-1+32],N=c[d-1+64],S=c[d-1+96];c[d+0+0]=g+x+1>>1,c[d+2+0]=c[d+0+32]=x+N+1>>1,c[d+2+32]=c[d+0+64]=N+S+1>>1,c[d+1+0]=We(g,x,N),c[d+3+0]=c[d+1+32]=We(x,N,S),c[d+3+32]=c[d+1+64]=We(N,S,S),c[d+3+64]=c[d+2+64]=c[d+0+96]=c[d+1+96]=c[d+2+96]=c[d+3+96]=S}function Oc(c,d){var g=c[d-1+0],x=c[d-1+32],N=c[d-1+64],S=c[d-1+96],E=c[d-1-32],T=c[d+0-32],O=c[d+1-32],U=c[d+2-32];c[d+0+0]=c[d+2+32]=g+E+1>>1,c[d+0+32]=c[d+2+64]=x+g+1>>1,c[d+0+64]=c[d+2+96]=N+x+1>>1,c[d+0+96]=S+N+1>>1,c[d+3+0]=We(T,O,U),c[d+2+0]=We(E,T,O),c[d+1+0]=c[d+3+32]=We(g,E,T),c[d+1+32]=c[d+3+64]=We(x,g,E),c[d+1+64]=c[d+3+96]=We(N,x,g),c[d+1+96]=We(S,N,x)}function Ea(c,d){var g;for(g=0;8>g;++g)s(c,d+32*g,c,d-32,8)}function po(c,d){var g;for(g=0;8>g;++g)i(c,d,c[d-1],8),d+=32}function Ei(c,d,g){var x;for(x=0;8>x;++x)i(d,g+32*x,c,8)}function Mc(c,d){var g,x=8;for(g=0;8>g;++g)x+=c[d+g-32]+c[d-1+32*g];Ei(x>>4,c,d)}function Pa(c,d){var g,x=4;for(g=0;8>g;++g)x+=c[d+g-32];Ei(x>>3,c,d)}function Rc(c,d){var g,x=4;for(g=0;8>g;++g)x+=c[d-1+32*g];Ei(x>>3,c,d)}function go(c,d){Ei(128,c,d)}function Ar(c,d,g){var x=c[d-g],N=c[d+0],S=3*(N-x)+Bc[1020+c[d-2*g]-c[d+g]],E=yl[112+(S+4>>3)];c[d-g]=Hs[255+x+yl[112+(S+3>>3)]],c[d+0]=Hs[255+N-E]}function xo(c,d,g,x){var N=c[d+0],S=c[d+g];return oi[255+c[d-2*g]-c[d-g]]>x||oi[255+S-N]>x}function Jr(c,d,g,x){return 4*oi[255+c[d-g]-c[d+0]]+oi[255+c[d-2*g]-c[d+g]]<=x}function vo(c,d,g,x,N){var S=c[d-3*g],E=c[d-2*g],T=c[d-g],O=c[d+0],U=c[d+g],ne=c[d+2*g],pe=c[d+3*g];return 4*oi[255+T-O]+oi[255+E-U]>x?0:oi[255+c[d-4*g]-S]<=N&&oi[255+S-E]<=N&&oi[255+E-T]<=N&&oi[255+pe-ne]<=N&&oi[255+ne-U]<=N&&oi[255+U-O]<=N}function Ca(c,d,g,x){var N=2*x+1;for(x=0;16>x;++x)Jr(c,d+x,g,N)&&Ar(c,d+x,g)}function bo(c,d,g,x){var N=2*x+1;for(x=0;16>x;++x)Jr(c,d+x*g,1,N)&&Ar(c,d+x*g,1)}function Da(c,d,g,x){var N;for(N=3;0<N;--N)Ca(c,d+=4*g,g,x)}function fl(c,d,g,x){var N;for(N=3;0<N;--N)bo(c,d+=4,g,x)}function Xi(c,d,g,x,N,S,E,T){for(S=2*S+1;0<N--;){if(vo(c,d,g,S,E))if(xo(c,d,g,T))Ar(c,d,g);else{var O=c,U=d,ne=g,pe=O[U-2*ne],V=O[U-ne],re=O[U+0],de=O[U+ne],Ne=O[U+2*ne],fe=27*(ke=Bc[1020+3*(re-V)+Bc[1020+pe-de]])+63>>7,je=18*ke+63>>7,ke=9*ke+63>>7;O[U-3*ne]=Hs[255+O[U-3*ne]+ke],O[U-2*ne]=Hs[255+pe+je],O[U-ne]=Hs[255+V+fe],O[U+0]=Hs[255+re-fe],O[U+ne]=Hs[255+de-je],O[U+2*ne]=Hs[255+Ne-ke]}d+=x}}function Qi(c,d,g,x,N,S,E,T){for(S=2*S+1;0<N--;){if(vo(c,d,g,S,E))if(xo(c,d,g,T))Ar(c,d,g);else{var O=c,U=d,ne=g,pe=O[U-ne],V=O[U+0],re=O[U+ne],de=yl[112+(4+(Ne=3*(V-pe))>>3)],Ne=yl[112+(Ne+3>>3)],fe=de+1>>1;O[U-2*ne]=Hs[255+O[U-2*ne]+fe],O[U-ne]=Hs[255+pe+Ne],O[U+0]=Hs[255+V-de],O[U+ne]=Hs[255+re-fe]}d+=x}}function ml(c,d,g,x,N,S){Xi(c,d,g,1,16,x,N,S)}function pl(c,d,g,x,N,S){Xi(c,d,1,g,16,x,N,S)}function gl(c,d,g,x,N,S){var E;for(E=3;0<E;--E)Qi(c,d+=4*g,g,1,16,x,N,S)}function Xr(c,d,g,x,N,S){var E;for(E=3;0<E;--E)Qi(c,d+=4,1,g,16,x,N,S)}function xl(c,d,g,x,N,S,E,T){Xi(c,d,N,1,8,S,E,T),Xi(g,x,N,1,8,S,E,T)}function p(c,d,g,x,N,S,E,T){Xi(c,d,1,N,8,S,E,T),Xi(g,x,1,N,8,S,E,T)}function _(c,d,g,x,N,S,E,T){Qi(c,d+4*N,N,1,8,S,E,T),Qi(g,x+4*N,N,1,8,S,E,T)}function B(c,d,g,x,N,S,E,T){Qi(c,d+4,1,N,8,S,E,T),Qi(g,x+4,1,N,8,S,E,T)}function ee(){this.ba=new Dt,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Ct,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function le(){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 _e(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Ee(){this.ua=0,this.Wa=new Ye,this.vb=new Ye,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new q,this.yc=new C}function rt(){this.xb=this.a=0,this.l=new Bt,this.ca=new Dt,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new W,this.Pb=0,this.wd=new W,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Ee,this.ab=0,this.gc=l(4,_e),this.Oc=0}function st(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Bt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function jt(c,d,g,x,N,S,E){for(c=c==null?0:c[d+0],d=0;d<E;++d)N[S+d]=c+g[x+d]&255,c=N[S+d]}function Lt(c,d,g,x,N,S,E){var T;if(c==null)jt(null,null,g,x,N,S,E);else for(T=0;T<E;++T)N[S+T]=c[d+T]+g[x+T]&255}function Wt(c,d,g,x,N,S,E){if(c==null)jt(null,null,g,x,N,S,E);else{var T,O=c[d+0],U=O,ne=O;for(T=0;T<E;++T)U=ne+(O=c[d+T])-U,ne=g[x+T]+(-256&U?0>U?0:255:U)&255,U=O,N[S+T]=ne}}function Hn(c,d,g,x){var N=d.width,S=d.o;if(n(c!=null&&d!=null),0>g||0>=x||g+x>S)return null;if(!c.Cc){if(c.ga==null){var E;if(c.ga=new st,(E=c.ga==null)||(E=d.width*d.o,n(c.Gb.length==0),c.Gb=r(E),c.Uc=0,c.Gb==null?E=0:(c.mb=c.Gb,c.nb=c.Uc,c.rc=null,E=1),E=!E),!E){E=c.ga;var T=c.Fa,O=c.P,U=c.qc,ne=c.mb,pe=c.nb,V=O+1,re=U-1,de=E.l;if(n(T!=null&&ne!=null&&d!=null),Tr[0]=null,Tr[1]=jt,Tr[2]=Lt,Tr[3]=Wt,E.ca=ne,E.tb=pe,E.c=d.width,E.i=d.height,n(0<E.c&&0<E.i),1>=U)d=0;else if(E.$a=3&T[O+0],E.Z=T[O+0]>>2&3,E.Lc=T[O+0]>>4&3,O=T[O+0]>>6&3,0>E.$a||1<E.$a||4<=E.Z||1<E.Lc||O)d=0;else if(de.put=$e,de.ac=Ds,de.bc=bt,de.ma=E,de.width=d.width,de.height=d.height,de.Da=d.Da,de.v=d.v,de.va=d.va,de.j=d.j,de.o=d.o,E.$a)e:{n(E.$a==1),d=Zi();t:for(;;){if(d==null){d=0;break e}if(n(E!=null),E.mc=d,d.c=E.c,d.i=E.i,d.l=E.l,d.l.ma=E,d.l.width=E.c,d.l.height=E.i,d.a=0,ae(d.m,T,V,re),!js(E.c,E.i,1,d,null)||(d.ab==1&&d.gc[0].hc==3&&Us(d.s)?(E.ic=1,T=d.c*d.i,d.Ta=null,d.Ua=0,d.V=r(T),d.Ba=0,d.V==null?(d.a=1,d=0):d=1):(E.ic=0,d=Yi(d,E.c)),!d))break t;d=1;break e}E.mc=null,d=0}else d=re>=E.c*E.i;E=!d}if(E)return null;c.ga.Lc!=1?c.Ga=0:x=S-g}n(c.ga!=null),n(g+x<=S);e:{if(d=(T=c.ga).c,S=T.l.o,T.$a==0){if(V=c.rc,re=c.Vc,de=c.Fa,O=c.P+1+g*d,U=c.mb,ne=c.nb+g*d,n(O<=c.P+c.qc),T.Z!=0)for(n(Tr[T.Z]!=null),E=0;E<x;++E)Tr[T.Z](V,re,de,O,U,ne,d),V=U,re=ne,ne+=d,O+=d;else for(E=0;E<x;++E)s(U,ne,de,O,d),V=U,re=ne,ne+=d,O+=d;c.rc=V,c.Vc=re}else{if(n(T.mc!=null),d=g+x,n((E=T.mc)!=null),n(d<=E.i),E.C>=d)d=1;else if(T.ic||An(),T.ic){T=E.V,V=E.Ba,re=E.c;var Ne=E.i,fe=(de=1,O=E.$/re,U=E.$%re,ne=E.m,pe=E.s,E.$),je=re*Ne,ke=re*d,Fe=pe.wc,Ce=fe<ke?gn(pe,U,O):null;n(fe<=je),n(d<=Ne),n(Us(pe));t:for(;;){for(;!ne.h&&fe<ke;){if(U&Fe||(Ce=gn(pe,U,O)),n(Ce!=null),te(ne),256>(Ne=pn(Ce.G[0],Ce.H[0],ne)))T[V+fe]=Ne,++fe,++U>=re&&(U=0,++O<=d&&!(O%16)&&Ts(E,O));else{if(!(280>Ne)){de=0;break t}Ne=ys(Ne-256,ne);var ct,et=pn(Ce.G[4],Ce.H[4],ne);if(te(ne),!(fe>=(et=_s(re,et=ys(et,ne)))&&je-fe>=Ne)){de=0;break t}for(ct=0;ct<Ne;++ct)T[V+fe+ct]=T[V+fe+ct-et];for(fe+=Ne,U+=Ne;U>=re;)U-=re,++O<=d&&!(O%16)&&Ts(E,O);fe<ke&&U&Fe&&(Ce=gn(pe,U,O))}n(ne.h==X(ne))}Ts(E,O>d?d:O);break t}!de||ne.h&&fe<je?(de=0,E.a=ne.h?5:3):E.$=fe,d=de}else d=Ns(E,E.V,E.Ba,E.c,E.i,d,br);if(!d){x=0;break e}}g+x>=S&&(c.Cc=1),x=1}if(!x)return null;if(c.Cc&&((x=c.ga)!=null&&(x.mc=null),c.ga=null,0<c.Ga))return alert("todo:WebPDequantizeLevels"),null}return c.nb+g*N}function rn(c,d,g,x,N,S){for(;0<N--;){var E,T=c,O=d+(g?1:0),U=c,ne=d+(g?0:3);for(E=0;E<x;++E){var pe=U[ne+4*E];pe!=255&&(pe*=32897,T[O+4*E+0]=T[O+4*E+0]*pe>>23,T[O+4*E+1]=T[O+4*E+1]*pe>>23,T[O+4*E+2]=T[O+4*E+2]*pe>>23)}d+=S}}function nn(c,d,g,x,N){for(;0<x--;){var S;for(S=0;S<g;++S){var E=c[d+2*S+0],T=15&(U=c[d+2*S+1]),O=4369*T,U=(240&U|U>>4)*O>>16;c[d+2*S+0]=(240&E|E>>4)*O>>16&240|(15&E|E<<4)*O>>16>>4&15,c[d+2*S+1]=240&U|T}d+=N}}function xn(c,d,g,x,N,S,E,T){var O,U,ne=255;for(U=0;U<N;++U){for(O=0;O<x;++O){var pe=c[d+O];S[E+4*O]=pe,ne&=pe}d+=g,E+=T}return ne!=255}function kn(c,d,g,x,N){var S;for(S=0;S<N;++S)g[x+S]=c[d+S]>>8}function An(){So=rn,Mu=nn,Ru=xn,Iu=kn}function hs(c,d,g){H[c]=function(x,N,S,E,T,O,U,ne,pe,V,re,de,Ne,fe,je,ke,Fe){var Ce,ct=Fe-1>>1,et=T[O+0]|U[ne+0]<<16,zt=pe[V+0]|re[de+0]<<16;n(x!=null);var at=3*et+zt+131074>>2;for(d(x[N+0],255&at,at>>16,Ne,fe),S!=null&&(at=3*zt+et+131074>>2,d(S[E+0],255&at,at>>16,je,ke)),Ce=1;Ce<=ct;++Ce){var qt=T[O+Ce]|U[ne+Ce]<<16,Kn=pe[V+Ce]|re[de+Ce]<<16,Ft=et+qt+zt+Kn+524296,ot=Ft+2*(qt+zt)>>3;at=ot+et>>1,et=(Ft=Ft+2*(et+Kn)>>3)+qt>>1,d(x[N+2*Ce-1],255&at,at>>16,Ne,fe+(2*Ce-1)*g),d(x[N+2*Ce-0],255&et,et>>16,Ne,fe+(2*Ce-0)*g),S!=null&&(at=Ft+zt>>1,et=ot+Kn>>1,d(S[E+2*Ce-1],255&at,at>>16,je,ke+(2*Ce-1)*g),d(S[E+2*Ce+0],255&et,et>>16,je,ke+(2*Ce+0)*g)),et=qt,zt=Kn}1&Fe||(at=3*et+zt+131074>>2,d(x[N+Fe-1],255&at,at>>16,Ne,fe+(Fe-1)*g),S!=null&&(at=3*zt+et+131074>>2,d(S[E+Fe-1],255&at,at>>16,je,ke+(Fe-1)*g)))}}function er(){li[_l]=T1,li[Nl]=Ku,li[Hu]=z1,li[jl]=Ju,li[kl]=Xu,li[qc]=Qu,li[Gu]=F1,li[Wc]=Ku,li[Uc]=Ju,li[Al]=Xu,li[Vc]=Qu}function wo(c){return c&~O1?0>c?0:255:c>>eh}function Qr(c,d){return wo((19077*c>>8)+(26149*d>>8)-14234)}function ea(c,d,g){return wo((19077*c>>8)-(6419*d>>8)-(13320*g>>8)+8708)}function Sr(c,d){return wo((19077*c>>8)+(33050*d>>8)-17685)}function ta(c,d,g,x,N){x[N+0]=Qr(c,g),x[N+1]=ea(c,d,g),x[N+2]=Sr(c,d)}function Ta(c,d,g,x,N){x[N+0]=Sr(c,d),x[N+1]=ea(c,d,g),x[N+2]=Qr(c,g)}function za(c,d,g,x,N){var S=ea(c,d,g);d=S<<3&224|Sr(c,d)>>3,x[N+0]=248&Qr(c,g)|S>>5,x[N+1]=d}function fs(c,d,g,x,N){var S=240&Sr(c,d)|15;x[N+0]=240&Qr(c,g)|ea(c,d,g)>>4,x[N+1]=S}function na(c,d,g,x,N){x[N+0]=255,ta(c,d,g,x,N+1)}function sa(c,d,g,x,N){Ta(c,d,g,x,N),x[N+3]=255}function yo(c,d,g,x,N){ta(c,d,g,x,N),x[N+3]=255}function Pi(c,d,g){H[c]=function(x,N,S,E,T,O,U,ne,pe){for(var V=ne+(-2&pe)*g;ne!=V;)d(x[N+0],S[E+0],T[O+0],U,ne),d(x[N+1],S[E+0],T[O+0],U,ne+g),N+=2,++E,++O,ne+=2*g;1&pe&&d(x[N+0],S[E+0],T[O+0],U,ne)}}function ks(c,d,g){return g==0?c==0?d==0?6:5:d==0?4:0:g}function vl(c,d,g,x,N){switch(c>>>30){case 3:tr(d,g,x,N,0);break;case 2:Cr(d,g,x,N);break;case 1:ms(d,g,x,N)}}function Fa(c,d){var g,x,N=d.M,S=d.Nb,E=c.oc,T=c.pc+40,O=c.oc,U=c.pc+584,ne=c.oc,pe=c.pc+600;for(g=0;16>g;++g)E[T+32*g-1]=129;for(g=0;8>g;++g)O[U+32*g-1]=129,ne[pe+32*g-1]=129;for(0<N?E[T-1-32]=O[U-1-32]=ne[pe-1-32]=129:(i(E,T-32-1,127,21),i(O,U-32-1,127,9),i(ne,pe-32-1,127,9)),x=0;x<c.za;++x){var V=d.ya[d.aa+x];if(0<x){for(g=-1;16>g;++g)s(E,T+32*g-4,E,T+32*g+12,4);for(g=-1;8>g;++g)s(O,U+32*g-4,O,U+32*g+4,4),s(ne,pe+32*g-4,ne,pe+32*g+4,4)}var re=c.Gd,de=c.Hd+x,Ne=V.ad,fe=V.Hc;if(0<N&&(s(E,T-32,re[de].y,0,16),s(O,U-32,re[de].f,0,8),s(ne,pe-32,re[de].ea,0,8)),V.Za){var je=E,ke=T-32+16;for(0<N&&(x>=c.za-1?i(je,ke,re[de].y[15],4):s(je,ke,re[de+1].y,0,4)),g=0;4>g;g++)je[ke+128+g]=je[ke+256+g]=je[ke+384+g]=je[ke+0+g];for(g=0;16>g;++g,fe<<=2)je=E,ke=T+nh[g],xi[V.Ob[g]](je,ke),vl(fe,Ne,16*+g,je,ke)}else if(je=ks(x,N,V.Ob[0]),Dr[je](E,T),fe!=0)for(g=0;16>g;++g,fe<<=2)vl(fe,Ne,16*+g,E,T+nh[g]);for(g=V.Gc,je=ks(x,N,V.Dd),sr[je](O,U),sr[je](ne,pe),fe=Ne,je=O,ke=U,255&(V=0|g)&&(170&V?Ba(fe,256,je,ke):Di(fe,256,je,ke)),V=ne,fe=pe,255&(g>>=8)&&(170&g?Ba(Ne,320,V,fe):Di(Ne,320,V,fe)),N<c.Ub-1&&(s(re[de].y,0,E,T+480,16),s(re[de].f,0,O,U+224,8),s(re[de].ea,0,ne,pe+224,8)),g=8*S*c.B,re=c.sa,de=c.ta+16*x+16*S*c.R,Ne=c.qa,V=c.ra+8*x+g,fe=c.Ha,je=c.Ia+8*x+g,g=0;16>g;++g)s(re,de+g*c.R,E,T+32*g,16);for(g=0;8>g;++g)s(Ne,V+g*c.B,O,U+32*g,8),s(fe,je+g*c.B,ne,pe+32*g,8)}}function bl(c,d,g,x,N,S,E,T,O){var U=[0],ne=[0],pe=0,V=O!=null?O.kd:0,re=O??new le;if(c==null||12>g)return 7;re.data=c,re.w=d,re.ha=g,d=[d],g=[g],re.gb=[re.gb];e:{var de=d,Ne=g,fe=re.gb;if(n(c!=null),n(Ne!=null),n(fe!=null),fe[0]=0,12<=Ne[0]&&!t(c,de[0],"RIFF")){if(t(c,de[0]+8,"WEBP")){fe=3;break e}var je=He(c,de[0]+4);if(12>je||4294967286<je){fe=3;break e}if(V&&je>Ne[0]-8){fe=7;break e}fe[0]=je,de[0]+=12,Ne[0]-=12}fe=0}if(fe!=0)return fe;for(je=0<re.gb[0],g=g[0];;){e:{var ke=c;Ne=d,fe=g;var Fe=U,Ce=ne,ct=de=[0];if((at=pe=[pe])[0]=0,8>fe[0])fe=7;else{if(!t(ke,Ne[0],"VP8X")){if(He(ke,Ne[0]+4)!=10){fe=3;break e}if(18>fe[0]){fe=7;break e}var et=He(ke,Ne[0]+8),zt=1+Pe(ke,Ne[0]+12);if(2147483648<=zt*(ke=1+Pe(ke,Ne[0]+15))){fe=3;break e}ct!=null&&(ct[0]=et),Fe!=null&&(Fe[0]=zt),Ce!=null&&(Ce[0]=ke),Ne[0]+=18,fe[0]-=18,at[0]=1}fe=0}}if(pe=pe[0],de=de[0],fe!=0)return fe;if(Ne=!!(2&de),!je&&pe)return 3;if(S!=null&&(S[0]=!!(16&de)),E!=null&&(E[0]=Ne),T!=null&&(T[0]=0),E=U[0],de=ne[0],pe&&Ne&&O==null){fe=0;break}if(4>g){fe=7;break}if(je&&pe||!je&&!pe&&!t(c,d[0],"ALPH")){g=[g],re.na=[re.na],re.P=[re.P],re.Sa=[re.Sa];e:{et=c,fe=d,je=g;var at=re.gb;Fe=re.na,Ce=re.P,ct=re.Sa,zt=22,n(et!=null),n(je!=null),ke=fe[0];var qt=je[0];for(n(Fe!=null),n(ct!=null),Fe[0]=null,Ce[0]=null,ct[0]=0;;){if(fe[0]=ke,je[0]=qt,8>qt){fe=7;break e}var Kn=He(et,ke+4);if(4294967286<Kn){fe=3;break e}var Ft=8+Kn+1&-2;if(zt+=Ft,0<at&&zt>at){fe=3;break e}if(!t(et,ke,"VP8 ")||!t(et,ke,"VP8L")){fe=0;break e}if(qt[0]<Ft){fe=7;break e}t(et,ke,"ALPH")||(Fe[0]=et,Ce[0]=ke+8,ct[0]=Kn),ke+=Ft,qt-=Ft}}if(g=g[0],re.na=re.na[0],re.P=re.P[0],re.Sa=re.Sa[0],fe!=0)break}g=[g],re.Ja=[re.Ja],re.xa=[re.xa];e:if(at=c,fe=d,je=g,Fe=re.gb[0],Ce=re.Ja,ct=re.xa,et=fe[0],ke=!t(at,et,"VP8 "),zt=!t(at,et,"VP8L"),n(at!=null),n(je!=null),n(Ce!=null),n(ct!=null),8>je[0])fe=7;else{if(ke||zt){if(at=He(at,et+4),12<=Fe&&at>Fe-12){fe=3;break e}if(V&&at>je[0]-8){fe=7;break e}Ce[0]=at,fe[0]+=8,je[0]-=8,ct[0]=zt}else ct[0]=5<=je[0]&&at[et+0]==47&&!(at[et+4]>>5),Ce[0]=je[0];fe=0}if(g=g[0],re.Ja=re.Ja[0],re.xa=re.xa[0],d=d[0],fe!=0)break;if(4294967286<re.Ja)return 3;if(T==null||Ne||(T[0]=re.xa?2:1),E=[E],de=[de],re.xa){if(5>g){fe=7;break}T=E,V=de,Ne=S,c==null||5>g?c=0:5<=g&&c[d+0]==47&&!(c[d+4]>>5)?(je=[0],at=[0],Fe=[0],ae(Ce=new W,c,d,g),si(Ce,je,at,Fe)?(T!=null&&(T[0]=je[0]),V!=null&&(V[0]=at[0]),Ne!=null&&(Ne[0]=Fe[0]),c=1):c=0):c=0}else{if(10>g){fe=7;break}T=de,c==null||10>g||!Fn(c,d+3,g-3)?c=0:(V=c[d+0]|c[d+1]<<8|c[d+2]<<16,Ne=16383&(c[d+7]<<8|c[d+6]),c=16383&(c[d+9]<<8|c[d+8]),1&V||3<(V>>1&7)||!(V>>4&1)||V>>5>=re.Ja||!Ne||!c?c=0:(E&&(E[0]=Ne),T&&(T[0]=c),c=1))}if(!c||(E=E[0],de=de[0],pe&&(U[0]!=E||ne[0]!=de)))return 3;O!=null&&(O[0]=re,O.offset=d-O.w,n(4294967286>d-O.w),n(O.offset==O.ha-g));break}return fe==0||fe==7&&pe&&O==null?(S!=null&&(S[0]|=re.na!=null&&0<re.na.length),x!=null&&(x[0]=E),N!=null&&(N[0]=de),0):fe}function ai(c,d,g){var x=d.width,N=d.height,S=0,E=0,T=x,O=N;if(d.Da=c!=null&&0<c.Da,d.Da&&(T=c.cd,O=c.bd,S=c.v,E=c.j,11>g||(S&=-2,E&=-2),0>S||0>E||0>=T||0>=O||S+T>x||E+O>N))return 0;if(d.v=S,d.j=E,d.va=S+T,d.o=E+O,d.U=T,d.T=O,d.da=c!=null&&0<c.da,d.da){if(!Me(T,O,g=[c.ib],S=[c.hb]))return 0;d.ib=g[0],d.hb=S[0]}return d.ob=c!=null&&c.ob,d.Kb=c==null||!c.Sd,d.da&&(d.ob=d.ib<3*x/4&&d.hb<3*N/4,d.Kb=0),1}function ia(c){if(c==null)return 2;if(11>c.S){var d=c.f.RGBA;d.fb+=(c.height-1)*d.A,d.A=-d.A}else d=c.f.kb,c=c.height,d.O+=(c-1)*d.fa,d.fa=-d.fa,d.N+=(c-1>>1)*d.Ab,d.Ab=-d.Ab,d.W+=(c-1>>1)*d.Db,d.Db=-d.Db,d.F!=null&&(d.J+=(c-1)*d.lb,d.lb=-d.lb);return 0}function _o(c,d,g,x){if(x==null||0>=c||0>=d)return 2;if(g!=null){if(g.Da){var N=g.cd,S=g.bd,E=-2&g.v,T=-2&g.j;if(0>E||0>T||0>=N||0>=S||E+N>c||T+S>d)return 2;c=N,d=S}if(g.da){if(!Me(c,d,N=[g.ib],S=[g.hb]))return 2;c=N[0],d=S[0]}}x.width=c,x.height=d;e:{var O=x.width,U=x.height;if(c=x.S,0>=O||0>=U||!(c>=_l&&13>c))c=2;else{if(0>=x.Rd&&x.sd==null){E=S=N=d=0;var ne=(T=O*sh[c])*U;if(11>c||(S=(U+1)/2*(d=(O+1)/2),c==12&&(E=(N=O)*U)),(U=r(ne+2*S+E))==null){c=1;break e}x.sd=U,11>c?((O=x.f.RGBA).eb=U,O.fb=0,O.A=T,O.size=ne):((O=x.f.kb).y=U,O.O=0,O.fa=T,O.Fd=ne,O.f=U,O.N=0+ne,O.Ab=d,O.Cd=S,O.ea=U,O.W=0+ne+S,O.Db=d,O.Ed=S,c==12&&(O.F=U,O.J=0+ne+2*S),O.Tc=E,O.lb=N)}if(d=1,N=x.S,S=x.width,E=x.height,N>=_l&&13>N)if(11>N)c=x.f.RGBA,d&=(T=Math.abs(c.A))*(E-1)+S<=c.size,d&=T>=S*sh[N],d&=c.eb!=null;else{c=x.f.kb,T=(S+1)/2,ne=(E+1)/2,O=Math.abs(c.fa),U=Math.abs(c.Ab);var pe=Math.abs(c.Db),V=Math.abs(c.lb),re=V*(E-1)+S;d&=O*(E-1)+S<=c.Fd,d&=U*(ne-1)+T<=c.Cd,d=(d&=pe*(ne-1)+T<=c.Ed)&O>=S&U>=T&pe>=T,d&=c.y!=null,d&=c.f!=null,d&=c.ea!=null,N==12&&(d&=V>=S,d&=re<=c.Tc,d&=c.F!=null)}else d=0;c=d?0:2}}return c!=0||g!=null&&g.fd&&(c=ia(x)),c}var Oa=64,ra=[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],No=24,As=32,Ms=8,Ma=[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];Te("Predictor0","PredictorAdd0"),H.Predictor0=function(){return 4278190080},H.Predictor1=function(c){return c},H.Predictor2=function(c,d,g){return d[g+0]},H.Predictor3=function(c,d,g){return d[g+1]},H.Predictor4=function(c,d,g){return d[g-1]},H.Predictor5=function(c,d,g){return De(De(c,d[g+1]),d[g+0])},H.Predictor6=function(c,d,g){return De(c,d[g-1])},H.Predictor7=function(c,d,g){return De(c,d[g+0])},H.Predictor8=function(c,d,g){return De(d[g-1],d[g+0])},H.Predictor9=function(c,d,g){return De(d[g+0],d[g+1])},H.Predictor10=function(c,d,g){return De(De(c,d[g-1]),De(d[g+0],d[g+1]))},H.Predictor11=function(c,d,g){var x=d[g+0];return 0>=nt(x>>24&255,c>>24&255,(d=d[g-1])>>24&255)+nt(x>>16&255,c>>16&255,d>>16&255)+nt(x>>8&255,c>>8&255,d>>8&255)+nt(255&x,255&c,255&d)?x:c},H.Predictor12=function(c,d,g){var x=d[g+0];return(it((c>>24&255)+(x>>24&255)-((d=d[g-1])>>24&255))<<24|it((c>>16&255)+(x>>16&255)-(d>>16&255))<<16|it((c>>8&255)+(x>>8&255)-(d>>8&255))<<8|it((255&c)+(255&x)-(255&d)))>>>0},H.Predictor13=function(c,d,g){var x=d[g-1];return(lt((c=De(c,d[g+0]))>>24&255,x>>24&255)<<24|lt(c>>16&255,x>>16&255)<<16|lt(c>>8&255,x>>8&255)<<8|lt(255&c,255&x))>>>0};var Lr=H.PredictorAdd0;H.PredictorAdd1=gt,Te("Predictor2","PredictorAdd2"),Te("Predictor3","PredictorAdd3"),Te("Predictor4","PredictorAdd4"),Te("Predictor5","PredictorAdd5"),Te("Predictor6","PredictorAdd6"),Te("Predictor7","PredictorAdd7"),Te("Predictor8","PredictorAdd8"),Te("Predictor9","PredictorAdd9"),Te("Predictor10","PredictorAdd10"),Te("Predictor11","PredictorAdd11"),Te("Predictor12","PredictorAdd12"),Te("Predictor13","PredictorAdd13");var Er=H.PredictorAdd2;Xe("ColorIndexInverseTransform","MapARGB","32b",function(c){return c>>8&255},function(c){return c}),Xe("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(c){return c},function(c){return c>>8&255});var Ra,aa=H.ColorIndexInverseTransform,Gn=H.MapARGB,Ic=H.VP8LColorIndexInverseTransformAlpha,Ci=H.MapAlpha,gi=H.VP8LPredictorsAdd=[];gi.length=16,(H.VP8LPredictors=[]).length=16,(H.VP8LPredictorsAdd_C=[]).length=16,(H.VP8LPredictors_C=[]).length=16;var oa,jo,ko,Ia,la,ca,Pr,tr,Cr,Ba,ms,Di,hn,fn,On,Yn,nr,Ao,qa,wl,Tu,zu,Fu,Ou,S
vendor: 4,734 bytes, line 125
125o,Mu,Ru,Iu,Bu=r(511),qu=r(2041),Wu=r(225),Uu=r(767),Vu=0,Bc=qu,yl=Wu,Hs=Uu,oi=Bu,_l=0,Nl=1,Hu=2,jl=3,kl=4,qc=5,Gu=6,Wc=7,Uc=8,Al=9,Vc=10,b1=[2,3,7],w1=[3,3,11],$u=[280,256,256,256,40],y1=[0,1,1,1,0],_1=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],N1=[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],j1=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],k1=8,Hc=[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],Gc=[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],Lo=null,A1=[[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]],S1=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Zu=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],L1=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,25
1255,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]]]],E1=[[[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,
1251,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]]],P1=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,25
vendor: 23,784 bytes, lines 125-149
1255,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]]]],C1=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Dr=[],xi=[],sr=[],D1=1,Yu=2,Tr=[],li=[];hs("UpsampleRgbLinePair",ta,3),hs("UpsampleBgrLinePair",Ta,3),hs("UpsampleRgbaLinePair",yo,4),hs("UpsampleBgraLinePair",sa,4),hs("UpsampleArgbLinePair",na,4),hs("UpsampleRgba4444LinePair",fs,2),hs("UpsampleRgb565LinePair",za,2);var T1=H.UpsampleRgbLinePair,z1=H.UpsampleBgrLinePair,Ku=H.UpsampleRgbaLinePair,Ju=H.UpsampleBgraLinePair,Xu=H.UpsampleArgbLinePair,Qu=H.UpsampleRgba4444LinePair,F1=H.UpsampleRgb565LinePair,Sl=16,Ll=1<<Sl-1,Eo=-227,$c=482,eh=6,O1=(256<<eh)-1,th=0,M1=r(256),R1=r(256),I1=r(256),B1=r(256),q1=r($c-Eo),W1=r($c-Eo);Pi("YuvToRgbRow",ta,3),Pi("YuvToBgrRow",Ta,3),Pi("YuvToRgbaRow",yo,4),Pi("YuvToBgraRow",sa,4),Pi("YuvToArgbRow",na,4),Pi("YuvToRgba4444Row",fs,2),Pi("YuvToRgb565Row",za,2);var nh=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],El=[0,2,8],U1=[8,7,6,4,4,2,2,2,1,1,1,1],V1=1;this.WebPDecodeRGBA=function(c,d,g,x,N){var S=Nl,E=new ee,T=new Dt;E.ba=T,T.S=S,T.width=[T.width],T.height=[T.height];var O=T.width,U=T.height,ne=new ut;if(ne==null||c==null)var pe=2;else n(ne!=null),pe=bl(c,d,g,ne.width,ne.height,ne.Pd,ne.Qd,ne.format,null);if(pe!=0?O=0:(O!=null&&(O[0]=ne.width[0]),U!=null&&(U[0]=ne.height[0]),O=1),O){T.width=T.width[0],T.height=T.height[0],x!=null&&(x[0]=T.width),N!=null&&(N[0]=T.height);e:{if(x=new Bt,(N=new le).data=c,N.w=d,N.ha=g,N.kd=1,d=[0],n(N!=null),((c=bl(N.data,N.w,N.ha,null,null,null,d,null,N))==0||c==7)&&d[0]&&(c=4),(d=c)==0){if(n(E!=null),x.data=N.data,x.w=N.w+N.offset,x.ha=N.ha-N.offset,x.put=$e,x.ac=Ds,x.bc=bt,x.ma=E,N.xa){if((c=Zi())==null){E=1;break e}if(function(V,re){var de=[0],Ne=[0],fe=[0];t:for(;;){if(V==null)return 0;if(re==null)return V.a=2,0;if(V.l=re,V.a=0,ae(V.m,re.data,re.w,re.ha),!si(V.m,de,Ne,fe)){V.a=3;break t}if(V.xb=Yu,re.width=de[0],re.height=Ne[0],!js(de[0],Ne[0],1,V,null))break t;return 1}return n(V.a!=0),0}(c,x)){if(x=(d=_o(x.width,x.height,E.Oa,E.ba))==0){t:{x=c;n:for(;;){if(x==null){x=0;break t}if(n(x.s.yc!=null),n(x.s.Ya!=null),n(0<x.s.Wb),n((g=x.l)!=null),n((N=g.ma)!=null),x.xb!=0){if(x.ca=N.ba,x.tb=N.tb,n(x.ca!=null),!ai(N.Oa,g,jl)){x.a=2;break n}if(!Yi(x,g.width)||g.da)break n;if((g.da||Ge(x.ca.S))&&An(),11>x.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),x.ca.f.kb.F!=null&&An()),x.Pb&&0<x.s.ua&&x.s.vb.X==null&&!F(x.s.vb,x.s.Wa.Xa)){x.a=1;break n}x.xb=0}if(!Ns(x,x.V,x.Ba,x.c,x.i,g.o,Ai))break n;N.Dc=x.Ma,x=1;break t}n(x.a!=0),x=0}x=!x}x&&(d=c.a)}else d=c.a}else{if((c=new tn)==null){E=1;break e}if(c.Fa=N.na,c.P=N.P,c.qc=N.Sa,Kt(c,x)){if((d=_o(x.width,x.height,E.Oa,E.ba))==0){if(c.Aa=0,g=E.Oa,n((N=c)!=null),g!=null){if(0<(O=0>(O=g.Md)?0:100<O?255:255*O/100)){for(U=ne=0;4>U;++U)12>(pe=N.pb[U]).lc&&(pe.ia=O*U1[0>pe.lc?0:pe.lc]>>3),ne|=pe.ia;ne&&(alert("todo:VP8InitRandom"),N.ia=1)}N.Ga=g.Id,100<N.Ga?N.Ga=100:0>N.Ga&&(N.Ga=0)}(function(V,re){if(V==null)return 0;if(re==null)return At(V,2,"NULL VP8Io parameter in VP8Decode().");if(!V.cb&&!Kt(V,re))return 0;if(n(V.cb),re.ac==null||re.ac(re)){re.ob&&(V.L=0);var de=El[V.L];if(V.L==2?(V.yb=0,V.zb=0):(V.yb=re.v-de>>4,V.zb=re.j-de>>4,0>V.yb&&(V.yb=0),0>V.zb&&(V.zb=0)),V.Va=re.o+15+de>>4,V.Hb=re.va+15+de>>4,V.Hb>V.za&&(V.Hb=V.za),V.Va>V.Ub&&(V.Va=V.Ub),0<V.L){var Ne=V.ed;for(de=0;4>de;++de){var fe;if(V.Qa.Cb){var je=V.Qa.Lb[de];V.Qa.Fb||(je+=Ne.Tb)}else je=Ne.Tb;for(fe=0;1>=fe;++fe){var ke=V.gd[de][fe],Fe=je;if(Ne.Pc&&(Fe+=Ne.vd[0],fe&&(Fe+=Ne.od[0])),0<(Fe=0>Fe?0:63<Fe?63:Fe)){var Ce=Fe;0<Ne.wb&&(Ce=4<Ne.wb?Ce>>2:Ce>>1)>9-Ne.wb&&(Ce=9-Ne.wb),1>Ce&&(Ce=1),ke.dd=Ce,ke.tc=2*Fe+Ce,ke.ld=40<=Fe?2:15<=Fe?1:0}else ke.tc=0;ke.La=fe}}}de=0}else At(V,6,"Frame setup failed"),de=V.a;if(de=de==0){if(de){V.$c=0,0<V.Aa||(V.Ic=V1);t:{de=V.Ic,Ne=4*(Ce=V.za);var ct=32*Ce,et=Ce+1,zt=0<V.L?Ce*(0<V.Aa?2:1):0,at=(V.Aa==2?2:1)*Ce;if((ke=Ne+832+(fe=3*(16*de+El[V.L])/2*ct)+(je=V.Fa!=null&&0<V.Fa.length?V.Kc.c*V.Kc.i:0))!=ke)de=0;else{if(ke>V.Vb){if(V.Vb=0,V.Ec=r(ke),V.Fc=0,V.Ec==null){de=At(V,1,"no memory during frame initialization.");break t}V.Vb=ke}ke=V.Ec,Fe=V.Fc,V.Ac=ke,V.Bc=Fe,Fe+=Ne,V.Gd=l(ct,Re),V.Hd=0,V.rb=l(et+1,Nr),V.sb=1,V.wa=zt?l(zt,Fs):null,V.Y=0,V.D.Nb=0,V.D.wa=V.wa,V.D.Y=V.Y,0<V.Aa&&(V.D.Y+=Ce),n(!0),V.oc=ke,V.pc=Fe,Fe+=832,V.ya=l(at,jr),V.aa=0,V.D.ya=V.ya,V.D.aa=V.aa,V.Aa==2&&(V.D.aa+=Ce),V.R=16*Ce,V.B=8*Ce,Ce=(ct=El[V.L])*V.R,ct=ct/2*V.B,V.sa=ke,V.ta=Fe+Ce,V.qa=V.sa,V.ra=V.ta+16*de*V.R+ct,V.Ha=V.qa,V.Ia=V.ra+8*de*V.B+ct,V.$c=0,Fe+=fe,V.mb=je?ke:null,V.nb=je?Fe:null,n(Fe+je<=V.Fc+V.Vb),Qn(V),i(V.Ac,V.Bc,0,Ne),de=1}}if(de){if(re.ka=0,re.y=V.sa,re.O=V.ta,re.f=V.qa,re.N=V.ra,re.ea=V.Ha,re.Vd=V.Ia,re.fa=V.R,re.Rc=V.B,re.F=null,re.J=0,!Vu){for(de=-255;255>=de;++de)Bu[255+de]=0>de?-de:de;for(de=-1020;1020>=de;++de)qu[1020+de]=-128>de?-128:127<de?127:de;for(de=-112;112>=de;++de)Wu[112+de]=-16>de?-16:15<de?15:de;for(de=-255;510>=de;++de)Uu[255+de]=0>de?0:255<de?255:de;Vu=1}Pr=Vs,tr=Ln,Ba=jn,ms=mi,Di=is,Cr=ss,hn=ml,fn=pl,On=xl,Yn=p,nr=gl,Ao=Xr,qa=_,wl=B,Tu=Ca,zu=bo,Fu=Da,Ou=fl,xi[0]=En,xi[1]=us,xi[2]=It,xi[3]=Zn,xi[4]=Kr,xi[5]=Ki,xi[6]=mo,xi[7]=Ji,xi[8]=Oc,xi[9]=Fc,Dr[0]=Tt,Dr[1]=Li,Dr[2]=kr,Dr[3]=pi,Dr[4]=ye,Dr[5]=Ue,Dr[6]=Qe,sr[0]=Mc,sr[1]=Os,sr[2]=Ea,sr[3]=po,sr[4]=Rc,sr[5]=Pa,sr[6]=go,de=1}else de=0}de&&(de=function(qt,Kn){for(qt.M=0;qt.M<qt.Va;++qt.M){var Ft,ot=qt.Jc[qt.M&qt.Xb],Ve=qt.m,Mn=qt;for(Ft=0;Ft<Mn.za;++Ft){var Et=Ve,Ut=Mn,vn=Ut.Ac,rs=Ut.Bc+4*Ft,Ss=Ut.zc,Pn=Ut.ya[Ut.aa+Ft];if(Ut.Qa.Bb?Pn.$b=se(Et,Ut.Pa.jb[0])?2+se(Et,Ut.Pa.jb[2]):se(Et,Ut.Pa.jb[1]):Pn.$b=0,Ut.kc&&(Pn.Ad=se(Et,Ut.Bd)),Pn.Za=!se(Et,145)+0,Pn.Za){var ps=Pn.Ob,Ls=0;for(Ut=0;4>Ut;++Ut){var Jn,Vt=Ss[0+Ut];for(Jn=0;4>Jn;++Jn){Vt=E1[vn[rs+Jn]][Vt];for(var Jt=Zu[se(Et,Vt[0])];0<Jt;)Jt=Zu[2*Jt+se(Et,Vt[Jt])];Vt=-Jt,vn[rs+Jn]=Vt}s(ps,Ls,vn,rs,4),Ls+=4,Ss[0+Ut]=Vt}}else Vt=se(Et,156)?se(Et,128)?1:3:se(Et,163)?2:0,Pn.Ob[0]=Vt,i(vn,rs,Vt,4),i(Ss,0,Vt,4);Pn.Dd=se(Et,142)?se(Et,114)?se(Et,183)?1:3:2:0}if(Mn.m.Ka)return At(qt,7,"Premature end-of-partition0 encountered.");for(;qt.ja<qt.za;++qt.ja){if(Mn=ot,Et=(Ve=qt).rb[Ve.sb-1],vn=Ve.rb[Ve.sb+Ve.ja],Ft=Ve.ya[Ve.aa+Ve.ja],rs=Ve.kc?Ft.Ad:0)Et.la=vn.la=0,Ft.Za||(Et.Na=vn.Na=0),Ft.Hc=0,Ft.Gc=0,Ft.ia=0;else{var Cn,Xt;if(Et=vn,vn=Mn,rs=Ve.Pa.Xc,Ss=Ve.ya[Ve.aa+Ve.ja],Pn=Ve.pb[Ss.$b],Ut=Ss.ad,ps=0,Ls=Ve.rb[Ve.sb-1],Vt=Jn=0,i(Ut,ps,0,384),Ss.Za)var as=0,vi=rs[3];else{Jt=r(16);var Rn=Et.Na+Ls.Na;if(Rn=Lo(vn,rs[1],Rn,Pn.Eb,0,Jt,0),Et.Na=Ls.Na=(0<Rn)+0,1<Rn)Pr(Jt,0,Ut,ps);else{var Rs=Jt[0]+3>>3;for(Jt=0;256>Jt;Jt+=16)Ut[ps+Jt]=Rs}as=1,vi=rs[0]}var an=15&Et.la,Xn=15&Ls.la;for(Jt=0;4>Jt;++Jt){var Gs=1&Xn;for(Rs=Xt=0;4>Rs;++Rs)an=an>>1|(Gs=(Rn=Lo(vn,vi,Rn=Gs+(1&an),Pn.Sc,as,Ut,ps))>as)<<7,Xt=Xt<<2|(3<Rn?3:1<Rn?2:Ut[ps+0]!=0),ps+=16;an>>=4,Xn=Xn>>1|Gs<<7,Jn=(Jn<<8|Xt)>>>0}for(vi=an,as=Xn>>4,Cn=0;4>Cn;Cn+=2){for(Xt=0,an=Et.la>>4+Cn,Xn=Ls.la>>4+Cn,Jt=0;2>Jt;++Jt){for(Gs=1&Xn,Rs=0;2>Rs;++Rs)Rn=Gs+(1&an),an=an>>1|(Gs=0<(Rn=Lo(vn,rs[2],Rn,Pn.Qc,0,Ut,ps)))<<3,Xt=Xt<<2|(3<Rn?3:1<Rn?2:Ut[ps+0]!=0),ps+=16;an>>=2,Xn=Xn>>1|Gs<<5}Vt|=Xt<<4*Cn,vi|=an<<4<<Cn,as|=(240&Xn)<<Cn}Et.la=vi,Ls.la=as,Ss.Hc=Jn,Ss.Gc=Vt,Ss.ia=43690&Vt?0:Pn.ia,rs=!(Jn|Vt)}if(0<Ve.L&&(Ve.wa[Ve.Y+Ve.ja]=Ve.gd[Ft.$b][Ft.Za],Ve.wa[Ve.Y+Ve.ja].La|=!rs),Mn.Ka)return At(qt,7,"Premature end-of-file encountered.")}if(Qn(qt),Ve=Kn,Mn=1,Ft=(ot=qt).D,Et=0<ot.L&&ot.M>=ot.zb&&ot.M<=ot.Va,ot.Aa==0)t:{if(Ft.M=ot.M,Ft.uc=Et,Fa(ot,Ft),Mn=1,Ft=(Xt=ot.D).Nb,Et=(Vt=El[ot.L])*ot.R,vn=Vt/2*ot.B,Jt=16*Ft*ot.R,Rs=8*Ft*ot.B,rs=ot.sa,Ss=ot.ta-Et+Jt,Pn=ot.qa,Ut=ot.ra-vn+Rs,ps=ot.Ha,Ls=ot.Ia-vn+Rs,Xn=(an=Xt.M)==0,Jn=an>=ot.Va-1,ot.Aa==2&&Fa(ot,Xt),Xt.uc)for(Gs=(Rn=ot).D.M,n(Rn.D.uc),Xt=Rn.yb;Xt<Rn.Hb;++Xt){as=Xt,vi=Gs;var Es=($s=(os=Rn).D).Nb;Cn=os.R;var $s=$s.wa[$s.Y+as],Zs=os.sa,Is=os.ta+16*Es*Cn+16*as,Ys=$s.dd,mn=$s.tc;if(mn!=0)if(n(3<=mn),os.L==1)0<as&&zu(Zs,Is,Cn,mn+4),$s.La&&Ou(Zs,Is,Cn,mn),0<vi&&Tu(Zs,Is,Cn,mn+4),$s.La&&Fu(Zs,Is,Cn,mn);else{var Ks=os.B,bi=os.qa,da=os.ra+8*Es*Ks+8*as,ir=os.Ha,os=os.Ia+8*Es*Ks+8*as;Es=$s.ld,0<as&&(fn(Zs,Is,Cn,mn+4,Ys,Es),Yn(bi,da,ir,os,Ks,mn+4,Ys,Es)),$s.La&&(Ao(Zs,Is,Cn,mn,Ys,Es),wl(bi,da,ir,os,Ks,mn,Ys,Es)),0<vi&&(hn(Zs,Is,Cn,mn+4,Ys,Es),On(bi,da,ir,os,Ks,mn+4,Ys,Es)),$s.La&&(nr(Zs,Is,Cn,mn,Ys,Es),qa(bi,da,ir,os,Ks,mn,Ys,Es))}}if(ot.ia&&alert("todo:DitherRow"),Ve.put!=null){if(Xt=16*an,an=16*(an+1),Xn?(Ve.y=ot.sa,Ve.O=ot.ta+Jt,Ve.f=ot.qa,Ve.N=ot.ra+Rs,Ve.ea=ot.Ha,Ve.W=ot.Ia+Rs):(Xt-=Vt,Ve.y=rs,Ve.O=Ss,Ve.f=Pn,Ve.N=Ut,Ve.ea=ps,Ve.W=Ls),Jn||(an-=Vt),an>Ve.o&&(an=Ve.o),Ve.F=null,Ve.J=null,ot.Fa!=null&&0<ot.Fa.length&&Xt<an&&(Ve.J=Hn(ot,Ve,Xt,an-Xt),Ve.F=ot.mb,Ve.F==null&&Ve.F.length==0)){Mn=At(ot,3,"Could not decode alpha data.");break t}Xt<Ve.j&&(Vt=Ve.j-Xt,Xt=Ve.j,n(!(1&Vt)),Ve.O+=ot.R*Vt,Ve.N+=ot.B*(Vt>>1),Ve.W+=ot.B*(Vt>>1),Ve.F!=null&&(Ve.J+=Ve.width*Vt)),Xt<an&&(Ve.O+=Ve.v,Ve.N+=Ve.v>>1,Ve.W+=Ve.v>>1,Ve.F!=null&&(Ve.J+=Ve.v),Ve.ka=Xt-Ve.j,Ve.U=Ve.va-Ve.v,Ve.T=an-Xt,Mn=Ve.put(Ve))}Ft+1!=ot.Ic||Jn||(s(ot.sa,ot.ta-Et,rs,Ss+16*ot.R,Et),s(ot.qa,ot.ra-vn,Pn,Ut+8*ot.B,vn),s(ot.Ha,ot.Ia-vn,ps,Ls+8*ot.B,vn))}if(!Mn)return At(qt,6,"Output aborted.")}return 1}(V,re)),re.bc!=null&&re.bc(re),de&=1}return de?(V.cb=0,de):0})(c,x)||(d=c.a)}}else d=c.a}d==0&&E.Oa!=null&&E.Oa.fd&&(d=ia(E.ba))}E=d}S=E!=0?null:11>S?T.f.RGBA.eb:T.f.kb.y}else S=null;return S};var sh=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function h(H,ie){for(var j="",z=0;z<4;z++)j+=String.fromCharCode(H[ie++]);return j}function f(H,ie){return H[ie+0]|H[ie+1]<<8}function v(H,ie){return(H[ie+0]|H[ie+1]<<8|H[ie+2]<<16)>>>0}function w(H,ie){return(H[ie+0]|H[ie+1]<<8|H[ie+2]<<16|H[ie+3]<<24)>>>0}new u;var m=[0],A=[0],y=[],P=new u,k=e,G=function(H,ie){var j={},z=0,C=!1,$=0,q=0;if(j.frames=[],!function(b,W){for(var D=0;D<4;D++)if(b[W+D]!="RIFF".charCodeAt(D))return!0;return!1}(H,ie)){for(w(H,ie+=4),ie+=8;ie<H.length;){var L=h(H,ie),M=w(H,ie+=4);ie+=4;var Z=M+(1&M);switch(L){case"VP8 ":case"VP8L":j.frames[z]===void 0&&(j.frames[z]={}),(we=j.frames[z]).src_off=C?q:ie-8,we.src_size=$+M+8,z++,C&&(C=!1,$=0,q=0);break;case"VP8X":(we=j.header={}).feature_flags=H[ie];var ae=ie+4;we.canvas_width=1+v(H,ae),ae+=3,we.canvas_height=1+v(H,ae),ae+=3;break;case"ALPH":C=!0,$=Z+8,q=ie-8;break;case"ANIM":(we=j.header).bgcolor=w(H,ie),ae=ie+4,we.loop_count=f(H,ae),ae+=2;break;case"ANMF":var he,we;(we=j.frames[z]={}).offset_x=2*v(H,ie),ie+=3,we.offset_y=2*v(H,ie),ie+=3,we.width=1+v(H,ie),ie+=3,we.height=1+v(H,ie),ie+=3,we.duration=v(H,ie),ie+=3,he=H[ie++],we.dispose=1&he,we.blend=he>>1&1}L!="ANMF"&&(ie+=Z)}return j}}(k,0);G.response=k,G.rgbaoutput=!0,G.dataurl=!1;var I=G.header?G.header:null,R=G.frames?G.frames:null;if(I){I.loop_counter=I.loop_count,m=[I.canvas_height],A=[I.canvas_width];for(var Q=0;Q<R.length&&R[Q].blend!=0;Q++);}var me=R[0],oe=P.WebPDecodeRGBA(k,me.src_off,me.src_size,A,m);me.rgba=oe,me.imgwidth=A[0],me.imgheight=m[0];for(var K=0;K<A[0]*m[0]*4;K++)y[K]=oe[K];return this.width=A,this.height=m,this.data=y,this}/** ==================================================================== 126 * @license 127 * jsPDF XMP metadata plugin 128 * Copyright (c) 2016 Jussi Utunen, [email protected] 129 * 130 * Permission is hereby granted, free of charge, to any person obtaining 131 * a copy of this software and associated documentation files (the 132 * "Software"), to deal in the Software without restriction, including 133 * without limitation the rights to use, copy, modify, merge, publish, 134 * distribute, sublicense, and/or sell copies of the Software, and to 135 * permit persons to whom the Software is furnished to do so, subject to 136 * the following conditions: 137 * 138 * The above copyright notice and this permission notice shall be 139 * included in all copies or substantial portions of the Software. 140 * 141 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 142 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 143 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 144 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 145 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 146 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 147 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 148 * ==================================================================== 149 */function hb(){var e,n=this.internal.__metadata__.metadata,t=unescape(encodeURIComponent(n));e=this.internal.__metadata__.rawXml?t:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+e.length+" >>"),this.internal.write("stream"),this.internal.write(e),this.internal.write("endstream"),this.internal.write("endobj")}function fb(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(e){var n,t,s,i,r,l,o,u,h,f=function(b){return b=b||{},this.isStrokeTransparent=b.isStrokeTransparent||!1,this.strokeOpacity=b.strokeOpacity||1,this.strokeStyle=b.strokeStyle||"#000000",this.fillStyle=b.fillStyle||"#000000",this.isFillTransparent=b.isFillTransparent||!1,this.fillOpacity=b.fillOpacity||1,this.font=b.font||"10px sans-serif",this.textBaseline=b.textBaseline||"alphabetic",this.textAlign=b.textAlign||"left",this.lineWidth=b.lineWidth||1,this.lineJoin=b.lineJoin||"miter",this.lineCap=b.lineCap||"butt",this.path=b.path||[],this.transform=b.transform!==void 0?b.transform.clone():new u,this.globalCompositeOperation=b.globalCompositeOperation||"normal",this.globalAlpha=b.globalAlpha||1,this.clip_path=b.clip_path||[],this.currentPoint=b.currentPoint||new l,this.miterLimit=b.miterLimit||10,this.lastPoint=b.lastPoint||new l,this.lineDashOffset=b.lineDashOffset||0,this.lineDash=b.lineDash||[],this.margin=b.margin||[0,0,0,0],this.prevPageLastElemOffset=b.prevPageLastElemOffset||0,this.ignoreClearRect=typeof b.ignoreClearRect!="boolean"||b.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new v(this),n=this.internal.f2,t=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,r=this.internal.getVerticalCoordinate,l=this.internal.Point,o=this.internal.Rectangle,u=this.internal.Matrix,h=new f}]);var v=function(b){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var W=b;Object.defineProperty(this,"pdf",{get:function(){return W}});var D=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return D},set:function(F){D=!!F}});var X=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return X},set:function(F){X=!!F}});var Y=0;Object.defineProperty(this,"posX",{get:function(){return Y},set:function(F){isNaN(F)||(Y=F)}});var te=0;Object.defineProperty(this,"posY",{get:function(){return te},set:function(F){isNaN(F)||(te=F)}}),Object.defineProperty(this,"margin",{get:function(){return h.margin},set:function(F){var ze;typeof F=="number"?ze=[F,F,F,F]:((ze=new Array(4))[0]=F[0],ze[1]=F.length>=2?F[1]:ze[0],ze[2]=F.length>=3?F[2]:ze[0],ze[3]=F.length>=4?F[3]:ze[1]),h.margin=ze}});var ue=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ue},set:function(F){ue=F}});var ge=0;Object.defineProperty(this,"lastBreak",{get:function(){return ge},set:function(F){ge=F}});var se=[];Object.defineProperty(this,"pageBreaks",{get:function(){return se},set:function(F){se=F}}),Object.defineProperty(this,"ctx",{get:function(){return h},set:function(F){F instanceof f&&(h=F)}}),Object.defineProperty(this,"path",{get:function(){return h.path},set:function(F){h.path=F}});var ve=[];Object.defineProperty(this,"ctxStack",{get:function(){return ve},set:function(F){ve=F}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(F){var ze;ze=w(F),this.ctx.fillStyle=ze.style,this.ctx.isFillTransparent=ze.a===0,this.ctx.fillOpacity=ze.a,this.pdf.setFillColor(ze.r,ze.g,ze.b,{a:ze.a}),this.pdf.setTextColor(ze.r,ze.g,ze.b,{a:ze.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(F){var ze=w(F);this.ctx.strokeStyle=ze.style,this.ctx.isStrokeTransparent=ze.a===0,this.ctx.strokeOpacity=ze.a,ze.a===0?this.pdf.setDrawColor(255,255,255):(ze.a,this.pdf.setDrawColor(ze.r,ze.g,ze.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(F){["butt","round","square"].indexOf(F)!==-1&&(this.ctx.lineCap=F,this.pdf.setLineCap(F))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(F){isNaN(F)||(this.ctx.lineWidth=F,this.pdf.setLineWidth(F))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(F){["bevel","round","miter"].indexOf(F)!==-1&&(this.ctx.lineJoin=F,this.pdf.setLineJoin(F))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(F){isNaN(F)||(this.ctx.miterLimit=F,this.pdf.setMiterLimit(F))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(F){this.ctx.textBaseline=F}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(F){["right","end","center","left","start"].indexOf(F)!==-1&&(this.ctx.textAlign=F)}});var Ae=null,Pe=null,He=null;Object.defineProperty(this,"fontFaces",{get:function(){return He},set:function(F){Ae=null,Pe=null,He=F}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(F){var ze;if(this.ctx.font=F,(ze=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(F))!==null){var Ye=ze[1];ze[2];var Me=ze[3],ce=ze[4];ze[5];var Se=ze[6],Te=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(ce)[2];ce=Math.floor(Te==="px"?parseFloat(ce)*this.pdf.internal.scaleFactor:Te==="em"?parseFloat(ce)*this.pdf.getFontSize():parseFloat(ce)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(ce);var xe=function(Xe){var Yt,Mt,vt=[],ft=Xe.trim();if(ft==="")return Cd;if(ft in Vf)return[Vf[ft]];for(;ft!=="";){switch(Mt=null,Yt=(ft=Gf(ft)).charAt(0)){case'"':case"'":Mt=ab(ft.substring(1),Yt);break;default:Mt=ob(ft)}if(Mt===null||(vt.push(Mt[0]),(ft=Gf(Mt[1]))!==""&&ft.charAt(0)!==","))return Cd;ft=ft.replace(/^,/,"")}return vt}(Se);if(this.fontFaces){var De=function(Xe,Yt){var Mt=Xe.getFontList(),vt=JSON.stringify(Mt);if(Ae===null||Pe!==vt){var ft=function(kt){var Ke=[];return Object.keys(kt).forEach(function(yt){kt[yt].forEach(function(Ge){var qe=null;switch(Ge){case"bold":qe={family:yt,weight:"bold"};break;case"italic":qe={family:yt,style:"italic"};break;case"bolditalic":qe={family:yt,weight:"bold",style:"italic"};break;case"":case"normal":qe={family:yt}}qe!==null&&(qe.ref={name:yt,style:Ge},Ke.push(qe))})}),Ke}(Mt);Ae=function(kt){for(var Ke={},yt=0;yt<kt.length;++yt){var Ge=Pd(kt[yt]),qe=Ge.family,_t=Ge.stretch,Dt=Ge.style,ut=Ge.weight;Ke[qe]=Ke[qe]||{},Ke[qe][_t]=Ke[qe][_t]||{},Ke[qe][_t][Dt]=Ke[qe][_t][Dt]||{},Ke[qe][_t][Dt][ut]=Ge}return Ke}(ft.concat(Yt)),Pe=vt}return Ae}(this.pdf,this.fontFaces),it=xe.map(function(Xe){return{family:Xe,stretch:"normal",weight:Me,style:Ye}}),lt=function(Xe,Yt,Mt){for(var vt=(Mt=Mt||{}).defaultFontFamily||"times",ft=Object.assign({},rb,Mt.genericFontFamilies||{}),kt=null,Ke=null,yt=0;yt<Yt.length;++yt)if(ft[(kt=Pd(Yt[yt])).family]&&(kt.family=ft[kt.family]),Xe.hasOwnProperty(kt.family)){Ke=Xe[kt.family];break}if(!(Ke=Ke||Xe[vt]))throw new Error("Could not find a font-family for the rule '"+Hf(kt)+"' and default family '"+vt+"'.");if(Ke=function(Ge,qe){if(qe[Ge])return qe[Ge];var _t=du[Ge],Dt=_t<=du.normal?-1:1,ut=Uf(qe,Zp,_t,Dt);if(!ut)throw new Error("Could not find a matching font-stretch value for "+Ge);return ut}(kt.stretch,Ke),Ke=function(Ge,qe){if(qe[Ge])return qe[Ge];for(var _t=$p[Ge],Dt=0;Dt<_t.length;++Dt)if(qe[_t[Dt]])return qe[_t[Dt]];throw new Error("Could not find a matching font-style for "+Ge)}(kt.style,Ke),!(Ke=function(Ge,qe){if(qe[Ge])return qe[Ge];if(Ge===400&&qe[500])return qe[500];if(Ge===500&&qe[400])return qe[400];var _t=ib[Ge],Dt=Uf(qe,Yp,_t,Ge<400?-1:1);if(!Dt)throw new Error("Could not find a matching font-weight for value "+Ge);return Dt}(kt.weight,Ke)))throw new Error("Failed to resolve a font for the rule '"+Hf(kt)+"'.");return Ke}(De,it);this.pdf.setFont(lt.ref.name,lt.ref.style)}else{var nt="";(Me==="bold"||parseInt(Me,10)>=700||Ye==="bold")&&(nt="bold"),Ye==="italic"&&(nt+="italic"),nt.length===0&&(nt="normal");for(var gt="",xt={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"},Je=0;Je<xe.length;Je++){if(this.pdf.internal.getFont(xe[Je],nt,{noFallback:!0,disableWarning:!0})!==void 0){gt=xe[Je];break}if(nt==="bolditalic"&&this.pdf.internal.getFont(xe[Je],"bold",{noFallback:!0,disableWarning:!0})!==void 0)gt=xe[Je],nt="bold";else if(this.pdf.internal.getFont(xe[Je],"normal",{noFallback:!0,disableWarning:!0})!==void 0){gt=xe[Je],nt="normal";break}}if(gt===""){for(var ht=0;ht<xe.length;ht++)if(xt[xe[ht]]){gt=xt[xe[ht]];break}}gt=gt===""?"Times":gt,this.pdf.setFont(gt,nt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(F){this.ctx.globalCompositeOperation=F}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(F){this.ctx.globalAlpha=F}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(F){this.ctx.lineDashOffset=F,we.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(F){this.ctx.lineDash=F,we.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(F){this.ctx.ignoreClearRect=!!F}})};v.prototype.setLineDash=function(b){this.lineDash=b},v.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},v.prototype.fill=function(){R.call(this,"fill",!1)},v.prototype.stroke=function(){R.call(this,"stroke",!1)},v.prototype.beginPath=function(){this.path=[{type:"begin"}]},v.prototype.moveTo=function(b,W){if(isNaN(b)||isNaN(W))throw on.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to
149jsPDF.context2d.moveTo");var D=this.ctx.transform.applyToPoint(new l(b,W));this.path.push({type:"mt",x:D.x,y:D.y}),this.ctx.lastPoint=new l(b,W)},v.prototype.closePath=function(){var b=new l(0,0),W=0;for(W=this.path.length-1;W!==-1;W--)if(this.path[W].type==="begin"&&en(this.path[W+1])==="object"&&typeof this.path[W+1].x=="number"){b=new l(this.path[W+1].x,this.path[W+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new l(b.x,b.y)},v.prototype.lineTo=function(b,W){if(isNaN(b)||isNaN(W))throw on.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var D=this.ctx.transform.applyToPoint(new l(b,W));this.path.push({type:"lt",x:D.x,y:D.y}),this.ctx.lastPoint=new l(D.x,D.y)},v.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),R.call(this,null,!0)},v.prototype.quadraticCurveTo=function(b,W,D,X){if(isNaN(D)||isNaN(X)||isNaN(b)||isNaN(W))throw on.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var Y=this.ctx.transform.applyToPoint(new l(D,X)),te=this.ctx.transform.applyToPoint(new l(b,W));this.path.push({type:"qct",x1:te.x,y1:te.y,x:Y.x,y:Y.y}),this.ctx.lastPoint=new l(Y.x,Y.y)},v.prototype.bezierCurveTo=function(b,W,D,X,Y,te){if(isNaN(Y)||isNaN(te)||isNaN(b)||isNaN(W)||isNaN(D)||isNaN(X))throw on.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ue=this.ctx.transform.applyToPoint(new l(Y,te)),ge=this.ctx.transform.applyToPoint(new l(b,W)),se=this.ctx.transform.applyToPoint(new l(D,X));this.path.push({type:"bct",x1:ge.x,y1:ge.y,x2:se.x,y2:se.y,x:ue.x,y:ue.y}),this.ctx.lastPoint=new l(ue.x,ue.y)},v.prototype.arc=function(b,W,D,X,Y,te){if(isNaN(b)||isNaN(W)||isNaN(D)||isNaN(X)||isNaN(Y))throw on.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(te=!!te,!this.ctx.transform.isIdentity){var ue=this.ctx.transform.applyToPoint(new l(b,W));b=ue.x,W=ue.y;var ge=this.ctx.transform.applyToPoint(new l(0,D)),se=this.ctx.transform.applyToPoint(new l(0,0));D=Math.sqrt(Math.pow(ge.x-se.x,2)+Math.pow(ge.y-se.y,2))}Math.abs(Y-X)>=2*Math.PI&&(X=0,Y=2*Math.PI),this.path.push({type:"arc",x:b,y:W,radius:D,startAngle:X,endAngle:Y,counterclockwise:te})},v.prototype.arcTo=function(b,W,D,X,Y){throw new Error("arcTo not implemented.")},v.prototype.rect=function(b,W,D,X){if(isNaN(b)||isNaN(W)||isNaN(D)||isNaN(X))throw on.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(b,W),this.lineTo(b+D,W),this.lineTo(b+D,W+X),this.lineTo(b,W+X),this.lineTo(b,W),this.lineTo(b+D,W),this.lineTo(b,W)},v.prototype.fillRect=function(b,W,D,X){if(isNaN(b)||isNaN(W)||isNaN(D)||isNaN(X))throw on.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!m.call(this)){var Y={};this.lineCap!=="butt"&&(Y.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(Y.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(b,W,D,X),this.fill(),Y.hasOwnProperty("lineCap")&&(this.lineCap=Y.lineCap),Y.hasOwnProperty("lineJoin")&&(this.lineJoin=Y.lineJoin)}},v.prototype.strokeRect=function(b,W,D,X){if(isNaN(b)||isNaN(W)||isNaN(D)||isNaN(X))throw on.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");A.call(this)||(this.beginPath(),this.rect(b,W,D,X),this.stroke())},v.prototype.clearRect=function(b,W,D,X){if(isNaN(b)||isNaN(W)||isNaN(D)||isNaN(X))throw on.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(b,W,D,X))},v.prototype.save=function(b){b=typeof b!="boolean"||b;for(var W=this.pdf.internal.getCurrentPageInfo().pageNumber,D=0;D<this.pdf.internal.getNumberOfPages();D++)this.pdf.setPage(D+1),this.pdf.internal.out("q");
vendor: 16,737 bytes, line 149
149if(this.pdf.setPage(W),b){this.ctx.fontSize=this.pdf.internal.getFontSize();var X=new f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=X}},v.prototype.restore=function(b){b=typeof b!="boolean"||b;for(var W=this.pdf.internal.getCurrentPageInfo().pageNumber,D=0;D<this.pdf.internal.getNumberOfPages();D++)this.pdf.setPage(D+1),this.pdf.internal.out("Q");this.pdf.setPage(W),b&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},v.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var w=function(b){var W,D,X,Y;if(b.isCanvasGradient===!0&&(b=b.getColor()),!b)return{r:0,g:0,b:0,a:0,style:b};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(b))W=0,D=0,X=0,Y=0;else{var te=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(b);if(te!==null)W=parseInt(te[1]),D=parseInt(te[2]),X=parseInt(te[3]),Y=1;else if((te=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(b))!==null)W=parseInt(te[1]),D=parseInt(te[2]),X=parseInt(te[3]),Y=parseFloat(te[4]);else{if(Y=1,typeof b=="string"&&b.charAt(0)!=="#"){var ue=new Bp(b);b=ue.ok?ue.toHex():"#000000"}b.length===4?(W=b.substring(1,2),W+=W,D=b.substring(2,3),D+=D,X=b.substring(3,4),X+=X):(W=b.substring(1,3),D=b.substring(3,5),X=b.substring(5,7)),W=parseInt(W,16),D=parseInt(D,16),X=parseInt(X,16)}}return{r:W,g:D,b:X,a:Y,style:b}},m=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},A=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};v.prototype.fillText=function(b,W,D,X){if(isNaN(W)||isNaN(D)||typeof b!="string")throw on.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(X=isNaN(X)?void 0:X,!m.call(this)){var Y=Z(this.ctx.transform.rotation),te=this.ctx.transform.scaleX;z.call(this,{text:b,x:W,y:D,scale:te,angle:Y,align:this.textAlign,maxWidth:X})}},v.prototype.strokeText=function(b,W,D,X){if(isNaN(W)||isNaN(D)||typeof b!="string")throw on.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!A.call(this)){X=isNaN(X)?void 0:X;var Y=Z(this.ctx.transform.rotation),te=this.ctx.transform.scaleX;z.call(this,{text:b,x:W,y:D,scale:te,renderingMode:"stroke",angle:Y,align:this.textAlign,maxWidth:X})}},v.prototype.measureText=function(b){if(typeof b!="string")throw on.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var W=this.pdf,D=this.pdf.internal.scaleFactor,X=W.internal.getFontSize(),Y=W.getStringUnitWidth(b)*X/W.internal.scaleFactor;return new function(te){var ue=(te=te||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return ue}}),this}({width:Y*=Math.round(96*D/72*1e4)/1e4})},v.prototype.scale=function(b,W){if(isNaN(b)||isNaN(W))throw on.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var D=new u(b,0,0,W,0,0);this.ctx.transform=this.ctx.transform.multiply(D)},v.prototype.rotate=function(b){if(isNaN(b))throw on.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var W=new u(Math.cos(b),Math.sin(b),-Math.sin(b),Math.cos(b),0,0);this.ctx.transform=this.ctx.transform.multiply(W)},v.prototype.translate=function(b,W){if(isNaN(b)||isNaN(W))throw on.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var D=new u(1,0,0,1,b,W);this.ctx.transform=this.ctx.transform.multiply(D)},v.prototype.transform=function(b,W,D,X,Y,te){if(isNaN(b)||isNaN(W)||isNaN(D)||isNaN(X)||isNaN(Y)||isNaN(te))throw on.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ue=new u(b,W,D,X,Y,te);this.ctx.transform=this.ctx.transform.multiply(ue)},v.prototype.setTransform=function(b,W,D,X,Y,te){b=isNaN(b)?1:b,W=isNaN(W)?0:W,D=isNaN(D)?0:D,X=isNaN(X)?1:X,Y=isNaN(Y)?0:Y,te=isNaN(te)?0:te,this.ctx.transform=new u(b,W,D,X,Y,te)};var y=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};v.prototype.drawImage=function(b,W,D,X,Y,te,ue,ge,se){var ve=this.pdf.getImageProperties(b),Ae=1,Pe=1,He=1,F=1;X!==void 0&&ge!==void 0&&(He=ge/X,F=se/Y,Ae=ve.width/X*ge/X,Pe=ve.height/Y*se/Y),te===void 0&&(te=W,ue=D,W=0,D=0),X!==void 0&&ge===void 0&&(ge=X,se=Y),X===void 0&&ge===void 0&&(ge=ve.width,se=ve.height);var ze=this.ctx.transform.decompose(),Ye=Z(ze.rotate.shx),Me=new u,ce=(Me=(Me=(Me=Me.multiply(ze.translate)).multiply(ze.skew)).multiply(ze.scale)).applyToRectangle(new o(te-W*He,ue-D*F,X*Ae,Y*Pe));if(this.autoPaging){for(var Se,Te=P.call(this,ce),xe=[],De=0;De<Te.length;De+=1)xe.indexOf(Te[De])===-1&&xe.push(Te[De]);I(xe);for(var it=xe[0],lt=xe[xe.length-1],nt=it;nt<lt+1;nt++){this.pdf.setPage(nt);var gt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],xt=nt===1?this.posY+this.margin[0]:this.margin[0],Je=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ht=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Xe=nt===1?0:Je+(nt-2)*ht;if(this.ctx.clip_path.length!==0){var Yt=this.path;Se=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(Se,this.posX+this.margin[3],-Xe+xt+this.ctx.prevPageLastElemOffset),Q.call(this,"fill",!0),this.path=Yt}var Mt=JSON.parse(JSON.stringify(ce));Mt=G([Mt],this.posX+this.margin[3],-Xe+xt+this.ctx.prevPageLastElemOffset)[0];var vt=(nt>it||nt<lt)&&y.call(this);vt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],gt,ht,null).clip().discardPath()),this.pdf.addImage(b,"JPEG",Mt.x,Mt.y,Mt.w,Mt.h,null,null,Ye),vt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(b,"JPEG",ce.x,ce.y,ce.w,ce.h,null,null,Ye)};var P=function(b,W,D){var X=[];W=W||this.pdf.internal.pageSize.width,D=D||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var Y=this.posY+this.ctx.prevPageLastElemOffset;switch(b.type){default:case"mt":case"lt":X.push(Math.floor((b.y+Y)/D)+1);break;case"arc":X.push(Math.floor((b.y+Y-b.radius)/D)+1),X.push(Math.floor((b.y+Y+b.radius)/D)+1);break;case"qct":var te=ae(this.ctx.lastPoint.x,this.ctx.lastPoint.y,b.x1,b.y1,b.x,b.y);X.push(Math.floor((te.y+Y)/D)+1),X.push(Math.floor((te.y+te.h+Y)/D)+1);break;case"bct":var ue=he(this.ctx.lastPoint.x,this.ctx.lastPoint.y,b.x1,b.y1,b.x2,b.y2,b.x,b.y);X.push(Math.floor((ue.y+Y)/D)+1),X.push(Math.floor((ue.y+ue.h+Y)/D)+1);break;case"rect":X.push(Math.floor((b.y+Y)/D)+1),X.push(Math.floor((b.y+b.h+Y)/D)+1)}for(var ge=0;ge<X.length;ge+=1)for(;this.pdf.internal.getNumberOfPages()<X[ge];)k.call(this);return X},k=function(){var b=this.fillStyle,W=this.strokeStyle,D=this.font,X=this.lineCap,Y=this.lineWidth,te=this.lineJoin;this.pdf.addPage(),this.fillStyle=b,this.strokeStyle=W,this.font=D,this.lineCap=X,this.lineWidth=Y,this.lineJoin=te},G=function(b,W,D){for(var X=0;X<b.length;X++)switch(b[X].type){case"bct":b[X].x2+=W,b[X].y2+=D;case"qct":b[X].x1+=W,b[X].y1+=D;default:b[X].x+=W,b[X].y+=D}return b},I=function(b){return b.sort(function(W,D){return W-D})},R=function(b,W){var D=this.fillStyle,X=this.strokeStyle,Y=this.lineCap,te=this.lineWidth,ue=Math.abs(te*this.ctx.transform.scaleX),ge=this.lineJoin;if(this.autoPaging){for(var se,ve,Ae=JSON.parse(JSON.stringify(this.path)),Pe=JSON.parse(JSON.stringify(this.path)),He=[],F=0;F<Pe.length;F++)if(Pe[F].x!==void 0)for(var ze=P.call(this,Pe[F]),Ye=0;Ye<ze.length;Ye+=1)He.indexOf(ze[Ye])===-1&&He.push(ze[Ye]);for(var Me=0;Me<He.length;Me++)for(;this.pdf.internal.getNumberOfPages()<He[Me];)k.call(this);I(He);for(var ce=He[0],Se=He[He.length-1],Te=ce;Te<Se+1;Te++){this.pdf.setPage(Te),this.fillStyle=D,this.strokeStyle=X,this.lineCap=Y,this.lineWidth=ue,this.lineJoin=ge;var xe=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],De=Te===1?this.posY+this.margin[0]:this.margin[0],it=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],lt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],nt=Te===1?0:it+(Te-2)*lt;if(this.ctx.clip_path.length!==0){var gt=this.path;se=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(se,this.posX+this.margin[3],-nt+De+this.ctx.prevPageLastElemOffset),Q.call(this,b,!0),this.path=gt}if(ve=JSON.parse(JSON.stringify(Ae)),this.path=G(ve,this.posX+this.margin[3],-nt+De+this.ctx.prevPageLastElemOffset),W===!1||Te===0){var xt=(Te>ce||Te<Se)&&y.call(this);xt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],xe,lt,null).clip().discardPath()),Q.call(this,b,W),xt&&this.pdf.restoreGraphicsState()}this.lineWidth=te}this.path=Ae}else this.lineWidth=ue,Q.call(this,b,W),this.lineWidth=te},Q=function(b,W){if((b!=="stroke"||W||!A.call(this))&&(b==="stroke"||W||!m.call(this))){for(var D,X,Y=[],te=this.path,ue=0;ue<te.length;ue++){var ge=te[ue];switch(ge.type){case"begin":Y.push({begin:!0});break;case"close":Y.push({close:!0});break;case"mt":Y.push({start:ge,deltas:[],abs:[]});break;case"lt":var se=Y.length;if(te[ue-1]&&!isNaN(te[ue-1].x)&&(D=[ge.x-te[ue-1].x,ge.y-te[ue-1].y],se>0)){for(;se>=0;se--)if(Y[se-1].close!==!0&&Y[se-1].begin!==!0){Y[se-1].deltas.push(D),Y[se-1].abs.push(ge);break}}break;case"bct":D=[ge.x1-te[ue-1].x,ge.y1-te[ue-1].y,ge.x2-te[ue-1].x,ge.y2-te[ue-1].y,ge.x-te[ue-1].x,ge.y-te[ue-1].y],Y[Y.length-1].deltas.push(D);break;case"qct":var ve=te[ue-1].x+2/3*(ge.x1-te[ue-1].x),Ae=te[ue-1].y+2/3*(ge.y1-te[ue-1].y),Pe=ge.x+2/3*(ge.x1-ge.x),He=ge.y+2/3*(ge.y1-ge.y),F=ge.x,ze=ge.y;D=[ve-te[ue-1].x,Ae-te[ue-1].y,Pe-te[ue-1].x,He-te[ue-1].y,F-te[ue-1].x,ze-te[ue-1].y],Y[Y.length-1].deltas.push(D);break;case"arc":Y.push({deltas:[],abs:[],arc:!0}),Array.isArray(Y[Y.length-1].abs)&&Y[Y.length-1].abs.push(ge)}}X=W?null:b==="stroke"?"stroke":"fill";for(var Ye=!1,Me=0;Me<Y.length;Me++)if(Y[Me].arc)for(var ce=Y[Me].abs,Se=0;Se<ce.length;Se++){var Te=ce[Se];Te.type==="arc"?K.call(this,Te.x,Te.y,Te.radius,Te.startAngle,Te.endAngle,Te.counterclockwise,void 0,W,!Ye):C.call(this,Te.x,Te.y),Ye=!0}else if(Y[Me].close===!0)this.pdf.internal.out("h"),Ye=!1;else if(Y[Me].begin!==!0){var xe=Y[Me].start.x,De=Y[Me].start.y;$.call(this,Y[Me].deltas,xe,De),Ye=!0}X&&H.call(this,X),W&&ie.call(this)}},me=function(b){var W=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,D=W*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return b-D;case"top":return b+W-D;case"hanging":return b+W-2*D;case"middle":return b+W/2-D;default:return b}},oe=function(b){return b+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};v.prototype.createLinearGradient=function(){var b=function(){};return b.colorStops=[],b.addColorStop=function(W,D){this.colorStops.push([W,D])},b.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},b.isCanvasGradient=!0,b},v.prototype.createPattern=function(){return this.createLinearGradient()},v.prototype.createRadialGradient=function(){return this.createLinearGradient()};var K=function(b,W,D,X,Y,te,ue,ge,se){for(var ve=L.call(this,D,X,Y,te),Ae=0;Ae<ve.length;Ae++){var Pe=ve[Ae];Ae===0&&(se?j.call(this,Pe.x1+b,Pe.y1+W):C.call(this,Pe.x1+b,Pe.y1+W)),q.call(this,b,W,Pe.x2,Pe.y2,Pe.x3,Pe.y3,Pe.x4,Pe.y4)}ge?ie.call(this):H.call(this,ue)},H=function(b){switch(b){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},ie=function(){this.pdf.clip(),this.pdf.discardPath()},j=function(b,W){this.pdf.internal.out(t(b)+" "+s(W)+" m")},z=function(b){var W;switch(b.align){case"right":case"end":W="right";break;case"center":W="center";break;default:W="left"}var D,X,Y,te=this.pdf.getTextDimensions(b.text),ue=me.call(this,b.y),ge=oe.call(this,ue)-te.h,se=this.ctx.transform.applyToPoint(new l(b.x,ue));if(this.autoPaging){var ve=this.ctx.transform.decompose(),Ae=new u;Ae=(Ae=(Ae=Ae.multiply(ve.translate)).multiply(ve.skew)).multiply(ve.scale);for(var Pe=this.ctx.transform.applyToRectangle(new o(b.x,ue,te.w,te.h)),He=Ae.applyToRectangle(new o(b.x,ge,te.w,te.h)),F=P.call(this,He),ze=[],Ye=0;Ye<F.length;Ye+=1)ze.indexOf(F[Ye])===-1&&ze.push(F[Ye]);I(ze);for(var Me=ze[0],ce=ze[ze.length-1],Se=Me;Se<ce+1;Se++){this.pdf.setPage(Se);var Te=Se===1?this.posY+this.margin[0]:this.margin[0],xe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],De=this.pdf.internal.pageSize.height-this.margin[2],it=De-this.margin[0],lt=this.pdf.internal.pageSize.width-this.margin[1],nt=lt-this.margin[3],gt=Se===1?0:xe+(Se-2)*it;if(this.ctx.clip_path.length!==0){var xt=this.path;D=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=G(D,this.posX+this.margin[3],-1*gt+Te),Q.call(this,"fill",!0),this.path=xt}var Je=G([JSON.parse(JSON.stringify(He))],this.posX+this.margin[3],-gt+Te+this.ctx.prevPageLastElemOffset)[0];b.scale>=.01&&(X=this.pdf.internal.getFontSize(),this.pdf.setFontSize(X*b.scale),Y=this.lineWidth,this.lineWidth=Y*b.scale);var ht=this.autoPaging!=="text";if(ht||Je.y+Je.h<=De){if(ht||Je.y>=Te&&Je.x<=lt){var Xe=ht?b.text:this.pdf.splitTextToSize(b.text,b.maxWidth||lt-Je.x)[0],Yt=G([JSON.parse(JSON.stringify(Pe))],this.posX+this.margin[3],-gt+Te+this.ctx.prevPageLastElemOffset)[0],Mt=ht&&(Se>Me||Se<ce)&&y.call(this);Mt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],nt,it,null).clip().discardPath()),this.pdf.text(Xe,Yt.x,Yt.y,{angle:b.angle,align:W,renderingMode:b.renderingMode}),Mt&&this.pdf.restoreGraphicsState()}}else Je.y<De&&(this.ctx.prevPageLastElemOffset+=De-Je.y);b.scale>=.01&&(this.pdf.setFontSize(X),this.lineWidth=Y)}}else b.scale>=.01&&(X=this.pdf.internal.getFontSize(),this.pdf.setFontSize(X*b.scale),Y=this.lineWidth,this.lineWidth=Y*b.scale),this.pdf.text(b.text,se.x+this.posX,se.y+this.posY,{angle:b.angle,align:W,renderingMode:b.renderingMode,maxWidth:b.maxWidth}),b.scale>=.01&&(this.pdf.setFontSize(X),this.lineWidth=Y)},C=function(b,W,D,X){D=D||0,X=X||0,this.pdf.internal.out(t(b+D)+" "+s(W+X)+" l")},$=function(b,W,D){return this.pdf.lines(b,W,D,null,null)},q=function(b,W,D,X,Y,te,ue,ge){this.pdf.internal.out([n(i(D+b)),n(r(X+W)),n(i(Y+b)),n(r(te+W)),n(i(ue+b)),n(r(ge+W)),"c"].join(" "))},L=function(b,W,D,X){for(var Y=2*Math.PI,te=Math.PI/2;W>D;)W-=Y;var ue=Math.abs(D-W);ue<Y&&X&&(ue=Y-ue);for(var ge=[],se=X?-1:1,ve=W;ue>1e-5;){var Ae=ve+se*Math.min(ue,te);ge.push(M.call(this,b,ve,Ae)),ue-=Math.abs(Ae-ve),ve=Ae}return ge},M=function(b,W,D){var X=(D-W)/2,Y=b*Math.cos(X),te=b*Math.sin(X),ue=Y,ge=-te,se=ue*ue+ge*ge,ve=se+ue*Y+ge*te,Ae=4/3*(Math.sqrt(2*se*ve)-ve)/(ue*te-ge*Y),Pe=ue-Ae*ge,He=ge+Ae*ue,F=Pe,ze=-He,Ye=X+W,Me=Math.cos(Ye),ce=Math.sin(Ye);return{x1:b*Math.cos(W),y1:b*Math.sin(W),x2:Pe*Me-He*ce,y2:Pe*ce+He*Me,x3:F*Me-ze*ce,y3:F*ce+ze*Me,x4:b*Math.cos(D),y4:b*Math.sin(D)}},Z=function(b){return 180*b/Math.PI},ae=function(b,W,D,X,Y,te){var ue=b+.5*(D-b),ge=W+.5*(X-W),se=Y+.5*(D-Y),ve=te+.5*(X-te),Ae=Math.min(b,Y,ue,se),Pe=Math.max(b,Y,ue,se),He=Math.min(W,te,ge,ve),F=Math.max(W,te,ge,ve);return new o(Ae,He,Pe-Ae,F-He)},he=function(b,W,D,X,Y,te,ue,ge){var se,ve,Ae,Pe,He,F,ze,Ye,Me,ce,Se,Te,xe,De,it=D-b,lt=X-W,nt=Y-D,gt=te-X,xt=ue-Y,Je=ge-te;for(ve=0;ve<41;ve++)Me=(ze=(Ae=b+(se=ve/40)*it)+se*((He=D+se*nt)-Ae))+se*(He+se*(Y+se*xt-He)-ze),ce=(Ye=(Pe=W+se*lt)+se*((F=X+se*gt)-Pe))+se*(F+se*(te+se*Je-F)-Ye),ve==0?(Se=Me,Te=ce,xe=Me,De=ce):(Se=Math.min(Se,Me),Te=Math.min(Te,ce),xe=Math.max(xe,Me),De=Math.max(De,ce));return new o(Math.round(Se),Math.round(Te),Math.round(xe-Se),Math.round(De-Te))},we=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var b,W,D=(b=this.ctx.lineDash,W=this.ctx.lineDashOffset,JSON.stringify({lineDash:b,lineDashOffset:W}));this.prevLineDash!==D&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=D)}}})(dt.API),function(e){var n=function(l){var o,u,h,f,v,w,m,A,y,P;for(u=[],h=0,f=(l+=o="\0\0\0\0".slice(l.length%4||4)).length;f>h;h+=4)(v=(l.charCodeAt(h)<<24)+(l.charCodeAt(h+1)<<16)+(l.charCodeAt(h+2)<<8)+l.charCodeAt(h+3))!==0?(w=(v=((v=((v=((v=(v-(P=v%85))/85)-(y=v%85))/85)-(A=v%85))/85)-(m=v%85))/85)%85,u.push(w+33,m+33,A+33,y+33,P+33)):u.push(122);return function(k,G){for(var I=G;I>0;I--)k.pop()}(u,o.length),String.fromCharCode.apply(String,u)+"~>"},t=function(l){var o,u,h,f,v,w=String,m="length",A=255,y="charCo
149deAt",P="slice",k="replace";for(l[P](-2),l=l[P](0,-2)[k](/\s/g,"")[k]("z","!!!!!"),h=[],f=0,v=(l+=o="uuuuu"[P](l[m]%5||5))[m];v>f;f+=5)u=52200625*(l[y](f)-33)+614125*(l[y](f+1)-33)+7225*(l[y](f+2)-33)+85*(l[y](f+3)-33)+(l[y](f+4)-33),h.push(A&u>>24,A&u>>16,A&u>>8,A&u);return function(G,I){for(var R=I;R>0;R--)G.pop()}(h,o[m]),w.fromCharCode.apply(w,h)},s=function(l){return l.split("").map(function(o){return("0"+o.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(l){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((l=l.replace(/\s/g,"")).indexOf(">")!==-1&&(l=l.substr(0,l.indexOf(">"))),l.length%2&&(l+="0"),o.test(l)===!1)return"";for(var u="",h=0;h<l.length;h+=2)u+=String.fromCharCode("0x"+(l[h]+l[h+1]));return u},r=function(l){for(var o=new Uint8Array(l.length),u=l.length;u--;)o[u]=l.charCodeAt(u);return(o=Jd(o)).reduce(function(h,f){return h+String.fromCharCode(f)},"")};e.processDataByFilters=function(l,o){var u=0,h=l||"",f=[];for(typeof(o=o||[])=="string"&&(o=[o]),u=0;u<o.length;u+=1)switch(o[u]){case"ASCII85Decode":case"/ASCII85Decode":h=t(h),f.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":h=n(h),f.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":h=i(h),f.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":h=s(h),f.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":h=r(h),f.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[u]+'" is not implemented')}return{data:h,reverseChain:f.reverse().join(" ")}}}(dt.API),function(e){e.loadFile=function(n,t,s){return function(i,r,l){r=r!==!1,l=typeof l=="function"?l:function(){};var o=void 0;try{o=function(u,h,f){var v=new XMLHttpRequest,w=0,m=function(A){var y=A.length,P=[],k=String.fromCharCode;for(w=0;w<y;w+=1)P.push(k(255&A.charCodeAt(w)));return P.join("")};if(v.open("GET",u,!h),v.overrideMimeType("text/plain; charset=x-user-defined"),h===!1&&(v.onload=function(){v.status===200?f(m(this.responseText)):f(void 0)}),v.send(null),h&&v.status===200)return m(v.responseText)}(i,r,l)}catch{}return o}(n,t,s)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile}(dt.API),function(e){function n(){return(wt.html2canvas?Promise.resolve(wt.html2canvas):nd(()=>import("./html2canvas.esm-CBrSDip1.js"),[])).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function t(){return(wt.DOMPurify?Promise.resolve(wt.DOMPurify):nd(()=>import("./purify.es-dhnUglUx.js"),[])).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var s=function(o){var u=en(o);return u==="undefined"?"undefined":u==="string"||o instanceof String?"string":u==="number"||o instanceof Number?"number":u==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":u==="object"?"object":"unknown"},i=function(o,u){var h=document.createElement(o);for(var f in u.className&&(h.className=u.className),u.innerHTML&&u.dompurify&&(h.innerHTML=u.dompurify.sanitize(u.innerHTML)),u.style)h.style[f]=u.style[f];return h},r=function o(u,h){for(var f=u.nodeType===3?document.createTextNode(u.nodeValue):u.cloneNode(!1),v=u.firstChild;v;v=v.nextSibling)h!==!0&&v.nodeType===1&&v.nodeName==="SCRIPT"||f.appendChild(o(v,h));return u.nodeType===1&&(u.nodeName==="CANVAS"?(f.width=u.width,f.height=u.height,f.getContext("2d").drawImage(u,0,0)):u.nodeName!=="TEXTAREA"&&u.nodeName!=="SELECT"||(f.value=u.value),f.addEventListener("load",function(){f.scrollTop=u.scrollTop,f.scrollLeft=u.scrollLeft},!0)),f},l=function o(u){var h=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),f=o.convert(Promise.resolve(),h);return(f=f.setProgress(1,o,1,[o])).set(u)};(l.prototype=Object.create(Promise.prototype)).constructor=l,l.convert=function(o,u){return o.__proto__=u||l.prototype,o},l.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},l.prototype.from=function(o,u){return this.then(function(){switch(u=u||function(h){switch(s(h)){case"string":return"string";case"element":return h.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o),u){case"string":return this.then(t).then(function(h){return this.set({src:i("div",{innerHTML:o,dompurify:h})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},l.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();
vendor: 24,013 bytes, lines 149-155
149case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},l.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},u=r(this.prop.src,this.opt.html2canvas.javascriptEnabled);u.tagName==="BODY"&&(o.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:o}),this.prop.container.appendChild(u),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},l.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(n).then(function(u){var h=Object.assign({},this.opt.html2canvas);return delete h.onrendered,u(this.prop.container,h)}).then(function(u){(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(n).then(function(u){var h=this.opt.jsPDF,f=this.opt.fontFaces,v=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,w=Object.assign({async:!0,allowTaint:!0,scale:v,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete w.onrendered,h.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,h.context2d.posX=this.opt.x,h.context2d.posY=this.opt.y,h.context2d.margin=this.opt.margin,h.context2d.fontFaces=f,f)for(var m=0;m<f.length;++m){var A=f[m],y=A.src.find(function(P){return P.format==="truetype"});y&&h.addFont(y.url,A.ref.name,A.ref.style)}return w.windowHeight=w.windowHeight||0,w.windowHeight=w.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):w.windowHeight,h.context2d.save(!0),u(this.prop.container,w)}).then(function(u){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(u),this.prop.canvas=u,document.body.removeChild(this.prop.overlay)})},l.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},l.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},l.prototype.output=function(o,u,h){return(h=h||"pdf").toLowerCase()==="img"||h.toLowerCase()==="image"?this.outputImg(o,u):this.outputPdf(o,u)},l.prototype.outputPdf=function(o,u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,u)})},l.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){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 "'+o+'" is not supported.'}})},l.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},l.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},l.prototype.set=function(o){if(s(o)!=="object")return this;var u=Object.keys(o||{}).map(function(h){if(h in l.template.prop)return function(){this.prop[h]=o[h]};switch(h){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[h]=o[h]}}},this);return this.then(function(){return this.thenList(u)})},l.prototype.get=function(o,u){return this.then(function(){var h=o in l.template.prop?this.prop[o]:this.opt[o];return u?u(h):h})},l.prototype.setMargin=function(o){return this.then(function(){switch(s(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},l.prototype.setPageSize=function(o){function u(h,f){return Math.floor(h*f/72*96)}return this.then(function(){(o=o||dt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:u(o.inner.width,o.k),height:u(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},l.prototype.setProgress=function(o,u,h,f){return o!=null&&(this.progress.val=o),u!=null&&(this.progress.state=u),h!=null&&(this.progress.n=h),f!=null&&(this.progress.stack=f),this.progress.ratio=this.progress.val/this.progress.state,this},l.prototype.updateProgress=function(o,u,h,f){return this.setProgress(o?this.progress.val+o:null,u||null,h?this.progress.n+h:null,f?this.progress.stack.concat(f):null)},l.prototype.then=function(o,u){var h=this;return this.thenCore(o,u,function(f,v){return h.updateProgress(null,null,1,[f]),Promise.prototype.then.call(this,function(w){return h.updateProgress(null,f),w}).then(f,v).then(function(w){return h.updateProgress(1),w})})},l.prototype.thenCore=function(o,u,h){h=h||Promise.prototype.then;var f=this;o&&(o=o.bind(f)),u&&(u=u.bind(f));var v=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?f:l.convert(Object.assign({},f),Promise.prototype),w=h.call(v,o,u);return l.convert(w,f.__proto__)},l.prototype.thenExternal=function(o,u){return Promise.prototype.then.call(this,o,u)},l.prototype.thenList=function(o){var u=this;return o.forEach(function(h){u=u.thenCore(h)}),u},l.prototype.catch=function(o){o&&(o=o.bind(this));var u=Promise.prototype.catch.call(this,o);return l.convert(u,this)},l.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},l.prototype.error=function(o){return this.then(function(){throw new Error(o)})},l.prototype.using=l.prototype.set,l.prototype.saveAs=l.prototype.save,l.prototype.export=l.prototype.output,l.prototype.run=l.prototype.then,dt.getPageSize=function(o,u,h){if(en(o)==="object"){var f=o;o=f.orientation,u=f.unit||u,h=f.format||h}u=u||"mm",h=h||"a4",o=(""+(o||"P")).toLowerCase();var v,w=(""+h).toLowerCase(),m={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(u){case"pt":v=1;break;case"mm":v=72/25.4;break;case"cm":v=72/2.54;break;case"in":v=72;break;case"px":v=.75;break;case"pc":case"em":v=12;break;case"ex":v=6;break;default:throw"Invalid unit: "+u}var A,y=0,P=0;if(m.hasOwnProperty(w))y=m[w][1]/v,P=m[w][0]/v;else try{y=h[1],P=h[0]}catch{throw new Error("Invalid format: "+h)}if(o==="p"||o==="portrait")o="p",P>y&&(A=P,P=y,y=A);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",y>P&&(A=P,P=y,y=A)}return{width:P,height:y,unit:u,k:v,orientation:o}},e.html=function(o,u){(u=u||{}).callback=u.callback||function(){},u.html2canvas=u.html2canvas||{},u.html2canvas.canvas=u.html2canvas.canvas||this.canvas,u.jsPDF=u.jsPDF||this,u.fontFaces=u.fontFaces?u.fontFaces.map(Pd):null;var h=new l(u);return u.worker?h:h.from(o).doCallback()}}(dt.API),dt.API.addJS=function(e){var n,t,s=function(i){for(var r="",l=0;l<i.length;l++){var o=i[l];if(o==="("||o===")"){for(var u=0,h=l-1;h>=0&&i[h]==="\\";h--)u++;r+=u%2==0?"\\"+o:o}else r+=o}return r}(e);return this.internal.events.subscribe("postPutResources",function(){n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(n+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+s+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){n!==void 0&&t!==void 0&&this.internal.out("/Names <</JavaScript "+n+" 0 R>>")}),this},function(e){var n;e.events.push(["postPutResources",function(){var t=this,s=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=t.outline.render().split(/\r\n/),r=0;r<i.length;r++){var l=i[r],o=s.exec(l);if(o!=null){var u=o[1];t.internal.newObjectDeferredBegin(u,!1)}t.internal.write(l)}if(this.outline.createNamedDestinations){var h=this.internal.pages.length,f=[];for(r=0;r<h;r++){var v=t.internal.newObject();f.push(v);var w=t.internal.getPageInfo(r+1);t.internal.write("<< /D["+w.objId+" 0 R /XYZ null null null]>> endobj")}var m=t.internal.newObject();for(t.internal.write("<< /Names [ "),r=0;r<f.length;r++)t.internal.write("(page_"+(r+1)+")"+f[r]+" 0 R");t.internal.write(" ] >>","endobj"),n=t.internal.newObject(),t.internal.write("<< /Dests "+m+" 0 R"),t.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+n+" 0 R"))}]),e.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(s,i,r){var l={title:i,options:r,children:[]};return s==null&&(s=this.root),s.children.push(l),l},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(s){s.id=t.internal.newObjectDeferred();for(var i=0;i<s.children.length;i++)this.genIds_r(s.children[i])},t.outline.renderRoot=function(s){this.objStart(s),this.line("/Type /Outlines"),s.children.length>0&&(this.line("/First "+this.makeRef(s.children[0])),this.line("/Last "+this.makeRef(s.children[s.children.length-1]))),this.line("/Count "+this.count_r({count:0},s)),this.objEnd()},t.outline.renderItems=function(s){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<s.children.length;r++){var l=s.children[r];this.objStart(l),this.line("/Title "+this.makeString(l.title)),this.line("/Parent "+this.makeRef(s)),r>0&&this.line("/Prev "+this.makeRef(s.children[r-1])),r<s.children.length-1&&this.line("/Next "+this.makeRef(s.children[r+1])),l.children.length>0&&(this.line("/First "+this.makeRef(l.children[0])),this.line("/Last "+this.makeRef(l.children[l.children.length-1])));var o=this.count=this.count_r({count:0},l);if(o>0&&this.line("/Count "+o),l.options&&l.options.pageNumber){var u=t.internal.getPageInfo(l.options.pageNumber);this.line("/Dest ["+u.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var h=0;h<s.children.length;h++)this.renderItems(s.children[h])},t.outline.line=function(s){this.ctx.val+=s+`\r 150`},t.outline.makeRef=function(s){return s.id+" 0 R"},t.outline.makeString=function(s){return"("+t.internal.pdfEscape(s)+")"},t.outline.objStart=function(s){this.ctx.val+=`\r 151`+s.id+` 0 obj\r 152<<\r 153`},t.outline.objEnd=function(){this.ctx.val+=`>> \r 154endobj\r 155`},t.outline.count_r=function(s,i){for(var r=0;r<i.children.length;r++)s.count++,this.count_r(s,i.children[r]);return s.count}}])}(dt.API),function(e){var n=[192,193,194,195,196,197,198,199];e.processJPEG=function(t,s,i,r,l,o){var u,h=this.decode.DCT_DECODE,f=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=l||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,u=function(v){for(var w,m=256*v.charCodeAt(4)+v.charCodeAt(5),A=v.length,y={width:0,height:0,numcomponents:1},P=4;P<A;P+=2){if(P+=m,n.indexOf(v.charCodeAt(P+1))!==-1){w=256*v.charCodeAt(P+5)+v.charCodeAt(P+6),y={width:256*v.charCodeAt(P+7)+v.charCodeAt(P+8),height:w,numcomponents:v.charCodeAt(P+9)};break}m=256*v.charCodeAt(P+2)+v.charCodeAt(P+3)}return y}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),u.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}f={data:t,width:u.width,height:u.height,colorSpace:o,bitsPerComponent:8,filter:h,index:s,alias:i}}return f}}(dt.API),dt.API.processPNG=function(e,n,t,s){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,r=Vv(e,{checkCrc:!0}),l=r.width,o=r.height,u=r.channels,h=r.palette,f=r.depth;i=h&&u===1?function(K){for(var H=K.width,ie=K.height,j=K.data,z=K.palette,C=K.depth,$=!1,q=[],L=[],M=void 0,Z=!1,ae=0,he=0;he<z.length;he++){var we=Ih(z[he],4),b=we[0],W=we[1],D=we[2],X=we[3];q.push(b,W,D),X!=null&&(X===0?(ae++,L.length<1&&L.push(he)):X<255&&(Z=!0))}if(Z||ae>1){$=!0,L=void 0;var Y=H*ie;M=new Uint8Array(Y);for(var te=new DataView(j.buffer),ue=0;ue<Y;ue++){var ge=Dd(te,ue,C),se=Ih(z[ge],4)[3];M[ue]=se}}else ae===0&&(L=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:$?8:void 0,colorBytes:j,alphaBytes:M,needSMask:$,palette:q,mask:L}}(r):u===2||u===4?function(K){for(var H=K.data,ie=K.width,j=K.height,z=K.channels,C=K.depth,$=z===2?"DeviceGray":"DeviceRGB",q=z-1,L=ie*j,M=q,Z=L*M,ae=1*L,he=Math.ceil(Z*C/8),we=Math.ceil(ae*C/8),b=new Uint8Array(he),W=new Uint8Array(we),D=new DataView(H.buffer),X=new DataView(b.buffer),Y=new DataView(W.buffer),te=!1,ue=0;ue<L;ue++){for(var ge=ue*z,se=0;se<M;se++)tm(X,Dd(D,ge+se,C),ue*M+se,C);var ve=Dd(D,ge+M,C);ve<(1<<C)-1&&(te=!0),tm(Y,ve,1*ue,C)}return{colorSpace:$,colorsPerPixel:q,sMaskBitsPerComponent:te?C:void 0,colorBytes:b,alphaBytes:W,needSMask:te}}(r):function(K){var H=K.data,ie=K.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:ie,colorsPerPixel:ie==="DeviceGray"?1:3,colorBytes:H instanceof Uint16Array?function(j){for(var z=j.length,C=new Uint8Array(2*z),$=new DataView(C.buffer,C.byteOffset,C.byteLength),q=0;q<z;q++)$.setUint16(2*q,j[q],!1);return C}(H):H,needSMask:!1}}(r);var v,w,m,A=i,y=A.colorSpace,P=A.colorsPerPixel,k=A.sMaskBitsPerComponent,G=A.colorBytes,I=A.alphaBytes,R=A.needSMask,Q=A.palette,me=A.mask,oe=null;return s!==dt.API.image_compression.NONE&&typeof Jd=="function"?(oe=function(K){var H;switch(K){case dt.API.image_compression.FAST:H=11;break;case dt.API.image_compression.MEDIUM:H=13;break;case dt.API.image_compression.SLOW:H=14;break;default:H=12}return H}(s),v=this.decode.FLATE_DECODE,w="/Predictor ".concat(oe," /Colors ").concat(P," /BitsPerComponent ").concat(f," /Columns ").concat(l),e=Kf(G,Math.ceil(l*P*f/8),P,f,s),R&&(m=Kf(I,Math.ceil(l*k/8),1,k,s))):(v=void 0,w=void 0,e=G,R&&(m=I)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(m&&this.__addimage__.isArrayBuffer(m)||this.__addimage__.isArrayBufferView(m))&&(m=this.__addimage__.arrayBufferToBinaryString(m)),{alias:t,data:e,index:n,filter:v,decodeParameters:w,transparency:me,palette:Q,sMask:m,predictor:oe,width:l,height:o,bitsPerComponent:f,sMaskBitsPerComponent:k,colorSpace:y}}},function(e){e.processGIF89A=function(n,t,s,i){var r=new ub(n),l=r.width,o=r.height,u=[];r.decodeAndBlitFrameRGBA(0,u);var h={data:u,width:l,height:o},f=new Td(100).encode(h,100);return e.processJPEG.call(this,f,t,s,i)},e.processGIF87A=e.processGIF89A}(dt.API),wi.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var n=0;n<e;n++){var t=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0);this.palette[n]={red:i,green:s,blue:t,quad:r}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},wi.prototype.parseBGR=function(){this.pos=this.offset;var e="bit"+this.bitPP,n=this.width*this.height*4;if(n>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(n);try{this[e]()}catch(t){on.log("bit decode error:"+t)}},wi.prototype.bit1=function(){var e,n=Math.ceil(this.width/8),t=n%4;for(e=this.height-1;e>=0;e--){for(var s=this.bottom_up?e:this.height-1-e,i=0;i<n;i++)for(var r=this.datav.getUint8(this.pos++,!0),l=s*this.width*4+8*i*4,o=0;o<8&&8*i+o<this.width;o++){var u=this.palette[r>>7-o&1];this.data[l+4*o]=u.blue,this.data[l+4*o+1]=u.green,this.data[l+4*o+2]=u.red,this.data[l+4*o+3]=255}t!==0&&(this.pos+=4-t)}},wi.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),n=e%4,t=this.height-1;t>=0;t--){for(var s=this.bottom_up?t:this.height-1-t,i=0;i<e;i++){var r=this.datav.getUint8(this.pos++,!0),l=s*this.width*4+2*i*4,o=r>>4,u=15&r,h=this.palette[o];if(this.data[l]=h.blue,this.data[l+1]=h.green,this.data[l+2]=h.red,this.data[l+3]=255,2*i+1>=this.width)break;h=this.palette[u],this.data[l+4]=h.blue,this.data[l+4+1]=h.green,this.data[l+4+2]=h.red,this.data[l+4+3]=255}n!==0&&(this.pos+=4-n)}},wi.prototype.bit8=function(){for(var e=this.width%4,n=this.height-1;n>=0;n--){for(var t=this.bottom_up?n:this.height-1-n,s=0;s<this.width;s++){var i=this.datav.getUint8(this.pos++,!0),r=t*this.width*4+4*s;if(i<this.palette.length){var l=this.palette[i];this.data[r]=l.red,this.data[r+1]=l.green,this.data[r+2]=l.blue,this.data[r+3]=255}else this.data[r]=255,this.data[r+1]=255,this.data[r+2]=255,this.data[r+3]=255}e!==0&&(this.pos+=4-e)}},wi.prototype.bit15=function(){for(var e=this.width%3,n=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var s=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var r=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(r&n)/n*255|0,o=(r>>5&n)/n*255|0,u=(r>>10&n)/n*255|0,h=r>>15?255:0,f=s*this.width*4+4*i;this.data[f]=u,this.data[f+1]=o,this.data[f+2]=l,this.data[f+3]=h}this.pos+=e}},wi.prototype.bit16=function(){for(var e=this.width%3,n=parseInt("11111",2),t=parseInt("111111",2),s=this.height-1;s>=0;s--){for(var i=this.bottom_up?s:this.height-1-s,r=0;r<this.width;r++){var l=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(l&n)/n*255|0,u=(l>>5&t)/t*255|0,h=(l>>11)/n*255|0,f=i*this.width*4+4*r;this.data[f]=h,this.data[f+1]=u,this.data[f+2]=o,this.data[f+3]=255}this.pos+=e}},wi.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,t=0;t<this.width;t++){var s=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),l=n*this.width*4+4*t;this.data[l]=r,this.data[l+1]=i,this.data[l+2]=s,this.data[l+3]=255}this.pos+=this.width%4}},wi.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var n=this.bottom_up?e:this.height-1-e,t=0;t<this.width;t++){var s=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+4*t;this.data[o]=r,this.data[o+1]=i,this.data[o+2]=s,this.data[o+3]=l}},wi.prototype.getData=function(){return this.data},function(e){e.processBMP=function(n,t,s,i){var r=new wi(n,!1),l=r.width,o=r.height,u={data:r.getData(),width:l,height:o},h=new Td(100).encode(u,100);return e.processJPEG.call(this,h,t,s,i)}}(dt.API),sm.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(n,t,s,i){var r=new sm(n),l=r.width,o=r.height,u={data:r.getData(),width:l,height:o},h=new Td(100).encode(u,100);return e.processJPEG.call(this,h,t,s,i)}}(dt.API),dt.API.processRGBA=function(e,n,t){for(var s=e.data,i=s.length,r=new Uint8Array(i/4*3),l=new Uint8Array(i/4),o=0,u=0,h=0;h<i;h+=4){var f=s[h],v=s[h+1],w=s[h+2],m=s[h+3];r[o++]=f,r[o++]=v,r[o++]=w,l[u++]=m}var A=this.__addimage__.arrayBufferToBinaryString(r);return{alpha:this.__addimage__.arrayBufferToBinaryString(l),data:A,index:n,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},dt.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canad
155a)","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]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Ga=dt.API,Zl=Ga.getCharWidthsArray=function(e,n){var t,s,i=(n=n||{}).font||this.internal.getFont(),r=n.fontSize||this.internal.getFontSize(),l=n.charSpace||this.internal.getCharSpace(),o=n.widths?n.widths:i.metadata.Unicode.widths,u=o.fof?o.fof:1,h=n.kerning?n.kerning:i.metadata.Unicode.kerning,f=h.fof?h.fof:1,v=n.doKerning!==!1,w=0,m=e.length,A=0,y=o[0]||u,P=[];for(t=0;t<m;t++)s=e.charCodeAt(t),typeof i.metadata.widthOfString=="function"?P.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(s))+l*(1e3/r)||0)/1e3):(w=v&&en(h[s])==="object"&&!isNaN(parseInt(h[s][A],10))?h[s][A]/f:0,P.push((o[s]||y)/u+w)),A=s;return P},$f=Ga.getStringUnitWidth=function(e,n){var t=(n=n||{}).fontSize||this.internal.getFontSize(),s=n.font||this.internal.getFont(),i=n.charSpace||this.internal.getCharSpace();return Ga.processArabic&&(e=Ga.processArabic(e)),typeof s.metadata.widthOfString=="function"?s.metadata.widthOfString(e,t,i)/t:Zl.apply(this,arguments).reduce(function(r,l){return r+l},0)},Zf=function(e,n,t,s){for(var i=[],r=0,l=e.length,o=0;r!==l&&o+n[r]<t;)o+=n[r],r++;i.push(e.slice(0,r));var u=r;
vendor: 3,265 bytes, lines 155-157
155for(o=0;r!==l;)o+n[r]>s&&(i.push(e.slice(u,r)),o=0,u=r),o+=n[r],r++;return u!==r&&i.push(e.slice(u,r)),i},Yf=function(e,n,t){t||(t={});var s,i,r,l,o,u,h,f=[],v=[f],w=t.textIndent||0,m=0,A=0,y=e.split(" "),P=Zl.apply(this,[" ",t])[0];if(u=t.lineIndent===-1?y[0].length+2:t.lineIndent||0){var k=Array(u).join(" "),G=[];y.map(function(R){(R=R.split(/\s*\n/)).length>1?G=G.concat(R.map(function(Q,me){return(me&&Q.length?` 156`:"")+Q})):G.push(R[0])}),y=G,u=$f.apply(this,[k,t])}for(r=0,l=y.length;r<l;r++){var I=0;if(s=y[r],u&&s[0]==` 157`&&(s=s.substr(1),I=1),w+m+(A=(i=Zl.apply(this,[s,t])).reduce(function(R,Q){return R+Q},0))>n||I){if(A>n){for(o=Zf.apply(this,[s,i,n-(w+m),n]),f.push(o.shift()),f=[o.pop()];o.length;)v.push([o.shift()]);A=i.slice(s.length-(f[0]?f[0].length:0)).reduce(function(R,Q){return R+Q},0)}else f=[s];v.push(f),w=A+u,m=P}else f.push(s),w+=m+A,m=P}return h=u?function(R,Q){return(Q?k:"")+R.join(" ")}:function(R){return R.join(" ")},v.map(h)},Ga.splitTextToSize=function(e,n,t){var s,i=(t=t||{}).fontSize||this.internal.getFontSize(),r=(function(f){if(f.widths&&f.kerning)return{widths:f.widths,kerning:f.kerning};var v=this.internal.getFont(f.fontName,f.fontStyle),w="Unicode";return v.metadata[w]?{widths:v.metadata[w].widths||{0:1},kerning:v.metadata[w].kerning||{}}:{font:v.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);s=Array.isArray(e)?e:String(e).split(/\r?\n/);var l=1*this.internal.scaleFactor*n/i;r.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/i:0,r.lineIndent=t.lineIndent;var o,u,h=[];for(o=0,u=s.length;o<u;o++)h=h.concat(Yf.apply(this,[s[o],l,r]));return h},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var n="0123456789abcdef",t="klmnopqrstuvwxyz",s={},i={},r=0;r<16;r++)s[t[r]]=n[r],i[n[r]]=t[r];var l=function(w){return"0x"+parseInt(w,10).toString(16)},o=e.__fontmetrics__.compress=function(w){var m,A,y,P,k=["{"];for(var G in w){if(m=w[G],isNaN(parseInt(G,10))?A="'"+G+"'":(G=parseInt(G,10),A=(A=l(G).slice(2)).slice(0,-1)+i[A.slice(-1)]),typeof m=="number")m<0?(y=l(m).slice(3),P="-"):(y=l(m).slice(2),P=""),y=P+y.slice(0,-1)+i[y.slice(-1)];else{if(en(m)!=="object")throw new Error("Don't know what to do with value type "+en(m)+".");y=o(m)}k.push(A+y)}return k.push("}"),k.join("")},u=e.__fontmetrics__.uncompress=function(w){if(typeof w!="string")throw new Error("Invalid argument passed to uncompress.");for(var m,A,y,P,k={},G=1,I=k,R=[],Q="",me="",oe=w.length-1,K=1;K<oe;K+=1)(P=w[K])=="'"?m?(y=m.join(""),m=void 0):m=[]:m?m.push(P):P=="{"?(R.push([I,y]),I={},y=void 0):P=="}"?((A=R.pop())[0][A[1]]=I,y=void 0,I=A[0]):P=="-"?G=-1:y===void 0?s.hasOwnProperty(P)?(Q+=s[P],y=parseInt(Q,16)*G,G=1,Q=""):Q+=P:s.hasOwnProperty(P)?(me+=s[P],I[y]=parseInt(me,16)*G,G=1,y=void 0,me=""):me+=P;return k},h={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:h,"Courier-Bold":h,"Courier-BoldOblique":h,"Courier-Oblique":h,Helvetica:h,"Helvetica-Bold":h,"Helvetica-BoldOblique":h,"Helvetica-Oblique":h,"Times-Roman":h,"Times-Bold":h,"Times-BoldItalic":h,"Times-Italic":h}},v
vendor: 14,727 bytes, line 157
157={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(
vendor: 8,449 bytes, lines 157-185
157w){var m=w.font,A=v.Unicode[m.postScriptName];A&&(m.metadata.Unicode={},m.metadata.Unicode.widths=A.widths,m.metadata.Unicode.kerning=A.kerning);var y=f.Unicode[m.postScriptName];y&&(m.metadata.Unicode.encoding=y,m.encoding=y.codePages[0])}])}(dt.API),function(e){var n=function(t){for(var s=t.length,i=new Uint8Array(s),r=0;r<s;r++)i[r]=t.charCodeAt(r);return i};e.API.events.push(["addFont",function(t){var s=void 0,i=t.font,r=t.instance;if(!i.isStandardFont){if(r===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(s=r.existsFileInVFS(i.postScriptName)===!1?r.loadFile(i.postScriptName):r.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(l,o){o=/^\x00\x01\x00\x00/.test(o)?n(o):n(ic(o)),l.metadata=e.API.TTFFont.open(o),l.metadata.Unicode=l.metadata.Unicode||{encoding:{},kerning:{},widths:[]},l.metadata.glyIdsUsed=[0]})(i,s)}}])}(dt),dt.API.addSvgAsImage=function(e,n,t,s,i,r,l,o){if(isNaN(n)||isNaN(t))throw on.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(s)||isNaN(i))throw on.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=s,u.height=i;var h=u.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,u.width,u.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},v=this;return(wt.canvg?Promise.resolve(wt.canvg):nd(()=>import("./index.es-HqTIw-xT.js"),__vite__mapDeps([0,1,2]))).catch(function(w){return Promise.reject(new Error("Could not load canvg: "+w))}).then(function(w){return w.default?w.default:w}).then(function(w){return w.fromString(h,e,f)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(w){return w.render(f)}).then(function(){v.addImage(u.toDataURL("image/jpeg",1),n,t,s,i,l,o)})},dt.API.putTotalPages=function(e){var n,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(e,"g"),t=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var s=1;s<=this.internal.getNumberOfPages();s++)for(var i=0;i<this.internal.pages[s].length;i++)this.internal.pages[s][i]=this.internal.pages[s][i].replace(n,t);return this},dt.API.viewerPreferences=function(e,n){var t;e=e||{},n=n||!1;var s,i,r,l={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},o=Object.keys(l),u=[],h=0,f=0,v=0;function w(A,y){var P,k=!1;for(P=0;P<A.length;P+=1)A[P]===y&&(k=!0);return k}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(l)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,e==="reset"||n===!0){var m=o.length;for(v=0;v<m;v+=1)t[o[v]].value=t[o[v]].defaultValue,t[o[v]].explicitSet=!1}if(en(e)==="object"){for(i in e)if(r=e[i],w(o,i)&&r!==void 0){if(t[i].type==="boolean"&&typeof r=="boolean")t[i].value=r;else if(t[i].type==="name"&&w(t[i].valueSet,r))t[i].value=r;else if(t[i].type==="integer"&&Number.isInteger(r))t[i].value=r;else if(t[i].type==="array"){for(h=0;h<r.length;h+=1)if(s=!0,r[h].length===1&&typeof r[h][0]=="number")u.push(String(r[h]-1));else if(r[h].length>1){for(f=0;f<r[h].length;f+=1)typeof r[h][f]!="number"&&(s=!1);s===!0&&u.push([r[h][0]-1,r[h][1]-1].join(" "))}t[i].value="["+u.join(" ")+"]"}else t[i].value=t[i].defaultValue;t[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var A,y=[];for(A in t)t[A].explicitSet===!0&&(t[A].type==="name"?y.push("/"+A+" /"+t[A].value):y.push("/"+A+" "+t[A].value));y.length!==0&&this.internal.write(`/ViewerPreferences 158<< 159`+y.join(` 160`)+` 161>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},dt.API.addMetadata=function(e,n){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:n??"http://jspdf.default.namespaceuri/",rawXml:typeof n=="boolean"&&n},this.internal.events.subscribe("putCatalog",fb),this.internal.events.subscribe("postPutResources",hb)),this},function(e){var n=e.API,t=n.pdfEscape16=function(r,l){for(var o,u=l.metadata.Unicode.widths,h=["","0","00","000","0000"],f=[""],v=0,w=r.length;v<w;++v){if(o=l.metadata.characterToGlyph(r.charCodeAt(v)),l.metadata.glyIdsUsed.push(o),l.metadata.toUnicode[o]=r.charCodeAt(v),u.indexOf(o)==-1&&(u.push(o),u.push([parseInt(l.metadata.widthOfGlyph(o),10)])),o=="0")return f.join("");o=o.toString(16),f.push(h[4-o.length],o)}return f.join("")},s=function(r){var l,o,u,h,f,v,w;for(f=`/CIDInit /ProcSet findresource begin 16212 dict begin 163begincmap 164/CIDSystemInfo << 165 /Registry (Adobe) 166 /Ordering (UCS) 167 /Supplement 0 168>> def 169/CMapName /Adobe-Identity-UCS def 170/CMapType 2 def 1711 begincodespacerange 172<0000><ffff> 173endcodespacerange`,u=[],v=0,w=(o=Object.keys(r).sort(function(m,A){return m-A})).length;v<w;v++)l=o[v],u.length>=100&&(f+=` 174`+u.length+` beginbfchar 175`+u.join(` 176`)+` 177endbfchar`,u=[]),r[l]!==void 0&&r[l]!==null&&typeof r[l].toString=="function"&&(h=("0000"+r[l].toString(16)).slice(-4),l=("0000"+(+l).toString(16)).slice(-4),u.push("<"+l+"><"+h+">"));return u.length&&(f+=` 178`+u.length+` beginbfchar 179`+u.join(` 180`)+` 181endbfchar 182`),f+`endcmap 183CMapName currentdict /CMap defineresource pop 184end 185end`};n.events.push(["putFont",function(r){(function(l){var o=l.font,u=l.out,h=l.newObject,f=l.putStream;if(o.metadata instanceof e.API.TTFFont&&o.encoding==="Identity-H"){for(var v=o.metadata.Unicode.widths,w=o.metadata.subset.encode(o.metadata.glyIdsUsed,1),m="",A=0;A<w.length;A++)m+=String.fromCharCode(w[A]);var y=h();f({data:m,addLength1:!0,objectId:y}),u("endobj");var P=h();f({data:s(o.metadata.toUnicode),addLength1:!0,objectId:P}),u("endobj");var k=h();u("<<"),u("/Type /FontDescriptor"),u("/FontName /"+Za(o.fontName)),u("/FontFile2 "+y+" 0 R"),u("/FontBBox "+e.API.PDFObject.convert(o.metadata.bbox)),u("/Flags "+o.metadata.flags),u("/StemV "+o.metadata.stemV),u("/ItalicAngle "+o.metadata.italicAngle),u("/Asce
185nt "+o.metadata.ascender),u("/Descent "+o.metadata.decender),u("/CapHeight "+o.metadata.capHeight),u(">>"),u("endobj");var G=h();u("<<"),u("/Type /Font"),u("/BaseFont /"+Za(o.fontName)),u("/FontDescriptor "+k+" 0 R"),u("/W "+e.API.PDFObject.convert(v)),u("/CIDToGIDMap /Identity"),u("/DW 1000"),u("/Subtype /CIDFontType2"),u("/CIDSystemInfo"),u("<<"),u("/Supplement 0"),u("/Registry (Adobe)"),u("/Ordering ("+o.encoding+")"),u(">>"),u(">>"),u("endobj"),o.objectNumber=h(),u("<<"),u("/Type /Font"),u("/Subtype /Type0"),u("/ToUnicode "+P+" 0 R"),u("/BaseFont /"+Za(o.fontName)),u("/Encoding /"+o.encoding),u("/DescendantFonts ["+G+" 0 R]"),u(">>"),u("endobj"),o.isAlreadyPutted=!0}})(r)}]),n.events.push(["putFont",function(r){(function(l){var o=l.font,u=l.out,h=l.newObject,f=l.putStream;if(o.metadata instanceof e.API.TTFFont&&o.encoding==="WinAnsiEncoding"){for(var v=o.metadata.rawData,w="",m=0;m<v.length;m++)w+=String.fromCharCode(v[m]);var A=h();f({data:w,addLength1:!0,objectId:A}),u("endobj");var y=h();f({data:s(o.metadata.toUnicode),addLength1:!0,objectId:y}),u("endobj");var P=h();u("<<"),u("/Descent "+o.metadata.decender),u("/CapHeight "+o.metadata.capHeight),u("/StemV "+o.metadata.stemV),u("/Type /FontDescriptor"),u("/FontFile2 "+A+" 0 R"),u("/Flags 96"),u("/FontBBox "+e.API.PDFObject.convert(o.metadata.bbox)),u("/FontName /"+Za(o.fontName)),u("/ItalicAngle "+o.metadata.italicAngle),u("/Asce
185nt "+o.metadata.ascender),u(">>"),u("endobj"),o.objectNumber=h();for(var k=0;k<o.metadata.hmtx.widths.length;k++)o.metadata.hmtx.widths[k]=parseInt(o.metadata.hmtx.widths[k]*(1e3/o.metadata.head.unitsPerEm));u("<</Subtype/TrueType/Type/Font/ToUnicode "+y+" 0 R/BaseFont/"+Za(o.fontName)+"/FontDescriptor "+P+" 0 R/Encoding/"+o.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(o.metadata.hmtx.widths)+">>"),u("endobj"),o.isAlreadyPutted=!0}})(r)}]);var i=function(r){var l,o=r.text||"",u=r.x,h=r.y,f=r.options||{},v=r.mutex||{},w=v.pdfEscape,m=v.activeFontKey,A=v.fonts,y=m,P="",k=0,G="",I=A[y].encoding;if(A[y].encoding!=="Identity-H")return{text:o,x:u,y:h,options:f,mutex:v};for(G=o,y=m,Array.isArray(o)&&(G=o[0]),k=0;k<G.length;k+=1)A[y].metadata.hasOwnProperty("cmap")&&(l=A[y].metadata.cmap.unicode.codeMap[G[k].charCodeAt(0)]),l||G[k].charCodeAt(0)<256&&A[y].metadata.hasOwnProperty("Unicode")?P+=G[k]:P+="";var R="";return parseInt(y.slice(1))<14||I==="WinAnsiEncoding"?R=w(P,y).split("").map(function(Q){return Q.charCodeAt(0).toString(16)}).join(""):I==="Identity-H"&&(R=t(P,A[y])),v.isHex=!0,{text:R,x:u,y:h,options:f,mutex:v}};n.events.push(["postProcessText",function(r){var l=r.text||"",o=[],u={text:l,x:r.x,y:r.y,options:r.options,mutex:r.mutex};if(Array.isArray(l)){var h=0;for(h=0;h<l.length;h+=1)Array.isArray(l[h])&&l[h].length===3?o.push([i(Object.assign({},u,{text:l[h][0]})).text,l[h][1],l[h][2]]):o.push(i(Object.assign({},u,{text:l[h]})).text);r.text=o}else r.text=i(Object.assign({},u,{text:l})).text}])}(dt),function(e){var n=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(t){return n.call(this),this.internal.vFS[t]!==void 0},e.addFileToVFS=function(t,s){return n.call(this),this.internal.vFS[t]=s,this},e.getFileFromVFS=function(t){return n.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}}(dt.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(s){var i,r,l,o,u,h,f,v=n,w=[[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]],m=[[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]],A={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},y={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},P=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","â¹","âº","â¹","â
","â","â
","â½","â¾","â½","â","â","â","â¤","â¥","â¤","â©","âª","â©","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","﹤","ï¹¥","﹤"],k=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,I=0;this.__bidiEngine__={};var R=function(j){var z=j.charCodeAt(),C=z>>8,$=y[C];return $!==void 0?v[256*$+(255&z)]:C===252||C===253?"AL":k.test(C)?"L":C===8?"R":"N"},Q=function(j){for(var z,C=0;C<j.length;C++){if((z=R(j.charAt(C)))==="L")return!1;if(z==="R")return!0}return!1},me=function(j,z,C,$){var q,L,M,Z,ae=z[$];switch(ae){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&&(ae="AN");break;case"AL":G=!0,ae="R";break;case"WS":case"BN":ae="N";break;case"CS":$<1||$+1>=z.length||(q=C[$-1])!=="EN"&&q!=="AN"||(L=z[$+1])!=="EN"&&L!=="AN"?ae="N":G&&(L="AN"),ae=L===q?L:"N";break;case"ES":ae=(q=$>0?C[$-1]:"B")==="EN"&&$+1<z.length&&z[$+1]==="EN"?"EN":"N";break;case"ET":if($>0&&C[$-1]==="EN"){ae="EN";break}if(G){ae="N";break}for(M=$+1,Z=z.length;M<Z&&z[M]==="ET";)M++;ae=M<Z&&z[M]==="EN"?"EN":"N";break;case"NSM":if(l&&!o){for(Z=z.length,M=$+1;M<Z&&z[M]==="NSM";)M++;if(M<Z){var he=j[$],we=he>=1425&&he<=2303||he===64286;if(q=z[M],we&&(q==="R"||q==="AL")){ae="R";break}}}ae=$<1||(q=z[$-1])==="B"?"N":C[$-1];break;case"B":G=!1,i=!0,ae=I;break;case"S":r=!0,ae="N"}return ae},oe=function(j,z,C){var $=j.split("");return C&&K($,C,{hiLevel:I}),$.reverse(),z&&z.reverse(),$.join("")},K=function(j,z,C){var $,q,L,M,Z,ae=-1,he=j.length,we=0,b=[],W=I?m:w,D=[];for(G=!1,i=!1,r=!1,q=0;q<he;q++)D[q]=R(j[q]);for(L=0;L<he;L++){if(Z=we,b[L]=me(j,D,b,L),$=240&(we=W[Z][A[b[L]]]),we&=15,z[L]=M=W[we][5],$>0)if($===16){for(q=ae;q<L;q++)z[q]=1;ae=-1}
vendor: 28,156 bytes, line 185
185else ae=-1;if(W[we][6])ae===-1&&(ae=L);else if(ae>-1){for(q=ae;q<L;q++)z[q]=M;ae=-1}D[L]==="B"&&(z[L]=0),C.hiLevel|=M}r&&function(X,Y,te){for(var ue=0;ue<te;ue++)if(X[ue]==="S"){Y[ue]=I;for(var ge=ue-1;ge>=0&&X[ge]==="WS";ge--)Y[ge]=I}}(D,z,he)},H=function(j,z,C,$,q){if(!(q.hiLevel<j)){if(j===1&&I===1&&!i)return z.reverse(),void(C&&C.reverse());for(var L,M,Z,ae,he=z.length,we=0;we<he;){if($[we]>=j){for(Z=we+1;Z<he&&$[Z]>=j;)Z++;for(ae=we,M=Z-1;ae<M;ae++,M--)L=z[ae],z[ae]=z[M],z[M]=L,C&&(L=C[ae],C[ae]=C[M],C[M]=L);we=Z}we++}}},ie=function(j,z,C){var $=j.split(""),q={hiLevel:I};return C||(C=[]),K($,C,q),function(L,M,Z){if(Z.hiLevel!==0&&f)for(var ae,he=0;he<L.length;he++)M[he]===1&&(ae=P.indexOf(L[he]))>=0&&(L[he]=P[ae+1])}($,C,q),H(2,$,z,C,q),H(1,$,z,C,q),$.join("")};return this.__bidiEngine__.doBidiReorder=function(j,z,C){if(function(q,L){if(L)for(var M=0;M<q.length;M++)L[M]=M;o===void 0&&(o=Q(q)),h===void 0&&(h=Q(q))}(j,z),l||!u||h)if(l&&u&&o^h)I=o?1:0,j=oe(j,z,C);else if(!l&&u&&h)I=o?1:0,j=ie(j,z,C),j=oe(j,z);else if(!l||o||u||h){if(l&&!u&&o^h)j=oe(j,z),o?(I=0,j=ie(j,z,C)):(I=1,j=ie(j,z,C),j=oe(j,z));else if(l&&o&&!u&&h)I=1,j=ie(j,z,C),j=oe(j,z);else if(!l&&!u&&o^h){var $=f;o?(I=1,j=ie(j,z,C),I=0,f=!1,j=ie(j,z,C),f=$):(I=0,j=ie(j,z,C),j=oe(j,z),I=1,f=!1,j=ie(j,z,C),f=$,j=oe(j,z))}}else I=0,j=ie(j,z,C);else I=o?1:0,j=ie(j,z,C);return j},this.__bidiEngine__.setOptions=function(j){j&&(l=j.isInputVisual,u=j.isOutputVisual,o=j.isInputRtl,h=j.isOutputRtl,f=j.isSymmetricSwapping)},this.__bidiEngine__.setOptions(s),this.__bidiEngine__};var n=["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"],t=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(s){var i=s.text;s.x,s.y;var r=s.options||{};s.mutex,r.lang;var l=[];if(r.isInputVisual=typeof r.isInputVisual!="boolean"||r.isInputVisual,t.setOptions(r),Object.prototype.toString.call(i)==="[object Array]"){var o=0;for(l=[],o=0;o<i.length;o+=1)Object.prototype.toString.call(i[o])==="[object Array]"?l.push([t.doBidiReorder(i[o][0]),i[o][1],i[o][2]]):l.push([t.doBidiReorder(i[o])]);s.text=l}else s.text=t.doBidiReorder(i);t.setOptions({isInputVisual:!0})}])}(dt),dt.API.TTFFont=function(){function e(n){var t;if(this.rawData=n,t=this.contents=new $r(n),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new Lb(this),this.registerTTF()}return e.open=function(n){return new e(n)},e.prototype.parse=function(){return this.directory=new mb(this.contents),this.head=new gb(this),this.name=new yb(this),this.cmap=new Jp(this),this.toUnicode={},this.hhea=new xb(this),this.maxp=new _b(this),this.hmtx=new Nb(this),this.post=new bb(this),this.os2=new vb(this),this.loca=new Sb(this),this.glyf=new jb(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 n,t,s,i,r;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var l,o,u,h;for(h=[],l=0,o=(u=this.bbox).length;l<o;l++)n=u[l],h.push(Math.round(n*this.scaleFactor));return h}).call(this),this.stemV=0,this.post.exists?(s=255&(i=this.post.italic_angle),32768&(t=i>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+s)):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=(r=this.familyClass)===1||r===2||r===3||r===4||r===5||r===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(n){var t;return((t=this.cmap.unicode)!=null?t.codeMap[n]:void 0)||0},e.prototype.widthOfGlyph=function(n){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(n).advance*t},e.prototype.widthOfString=function(n,t,s){var i,r,l,o;for(l=0,r=0,o=(n=""+n).length;0<=o?r<o:r>o;r=0<=o?++r:--r)i=n.charCodeAt(r),l+=this.widthOfGlyph(this.characterToGlyph(i))+s*(1e3/t)||0;return l*(t/1e3)},e.prototype.lineHeight=function(n,t){var s;return t==null&&(t=!1),s=t?this.lineGap:0,(this.ascender+s-this.decender)/1e3*n},e}();var ki,$r=function(){function e(n){this.data=n??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(n){return this.data[this.pos++]=n},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(n){return this.writeByte(n>>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt32=function(){var n;return(n=this.readUInt32())>=2147483648?n-4294967296:n},e.prototype.writeInt32=function(n){return n<0&&(n+=4294967296),this.writeUInt32(n)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(n){return this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt16=function(){var n;return(n=this.readUInt16())>=32768?n-65536:n},e.prototype.writeInt16=function(n){return n<0&&(n+=65536),this.writeUInt16(n)},e.prototype.readString=function(n){var t,s;for(s=[],t=0;0<=n?t<n:t>n;t=0<=n?++t:--t)s[t]=String.fromCharCode(this.readByte());return s.join("")},e.prototype.writeString=function(n){var t,s,i;for(i=[],t=0,s=n.length;0<=s?t<s:t>s;t=0<=s?++t:--t)i.push(this.writeByte(n.charCodeAt(t)));return i},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(n){return this.writeInt16(n)},e.prototype.readLongLong=function(){var n,t,s,i,r,l,o,u;return n=this.readByte(),t=this.readByte(),s=this.readByte(),i=this.readByte(),r=this.readByte(),l=this.readByte(),o=this.readByte(),u=this.readByte(),128&n?-1*(72057594037927940*(255^n)+281474976710656*(255^t)+1099511627776*(255^s)+4294967296*(255^i)+16777216*(255^r)+65536*(255^l)+256*(255^o)+(255^u)+1):72057594037927940*n+281474976710656*t+1099511627776*s+4294967296*i+16777216*r+65536*l+256*o+u},e.prototype.writeLongLong=function(n){var t,s;return t=Math.floor(n/4294967296),s=4294967295&n,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(s>>24&255),this.writeByte(s>>16&255),this.writeByte(s>>8&255),this.writeByte(255&s)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(n){return this.writeInt32(n)},e.prototype.read=function(n){var t,s;for(t=[],s=0;0<=n?s<n:s>n;s=0<=n?++s:--s)t.push(this.readByte());return t},e.prototype.write=function(n){var t,s,i,r;for(r=[],s=0,i=n.length;s<i;s++)t=n[s],r.push(this.writeByte(t));return r},e}(),mb=function(){var e;function n(t){var s,i,r;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},i=0,r=this.tableCount;0<=r?i<r:i>r;i=0<=r?++i:--i)s={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[s.tag]=s}return n.prototype.encode=function(t){var s,i,r,l,o,u,h,f,v,w,m,A,y;for(y in m=Object.keys(t).length,u=Math.log(2),v=16*Math.floor(Math.log(m)/u),l=Math.floor(v/u),f=16*m-v,(i=new $r).writeInt(this.scalarType),i.writeShort(m),i.writeShort(v),i.writeShort(l),i.writeShort(f),r=16*m,h=i.pos+r,o=null,A=[],t)for(w=t[y],i.writeString(y),i.writeInt(e(w)),i.writeInt(h),i.writeInt(w.length),A=A.concat(w),y==="head"&&(o=h),h+=w.length;h%4;)A.push(0),h++;return i.write(A),s=2981146554-e(i.data),i.pos=o+8,i.writeUInt32(s),i.data},e=function(t){var s,i,r,l;for(t=Xp.call(t);t.length%4;)t.push(0);for(r=new $r(t),i=0,s=0,l=t.length;s<l;s=s+=4)i+=r.readUInt32();return 4294967295&i},n}(),pb={}.hasOwnProperty,Gi=function(e,n){for(var t in n)pb.call(n,t)&&(e[t]=n[t]);function s(){this.constructor=e}return s.prototype=n.prototype,e.prototype=new s,e.__super__=n.prototype,e};ki=function(){function e(n){var t;this.file=n,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 gb=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="head",e.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.revision=n.readInt(),this.checkSumAdjustment=n.readInt(),this.magicNumber=n.readInt(),this.flags=n.readShort(),this.unitsPerEm=n.readShort(),this.created=n.readLongLong(),this.modified=n.readLongLong(),this.xMin=n.readShort(),this.yMin=n.readShort(),this.xMax=n.readShort(),this.yMax=n.readShort(),this.macStyle=n.readShort(),this.lowestRecPPEM=n.readShort(),this.fontDirectionHint=n.readShort(),this.indexToLocFormat=n.readShort(),this.glyphDataFormat=n.readShort()},e.prototype.encode=function(n){var t;return(t=new $r).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(n),t.writeShort(this.glyphDataFormat),t.data},e}(),im=function(){function e(n,t){var s,i,r,l,o,u,h,f,v,w,m,A,y,P,k,G,I;switch(this.platformID=n.readUInt16(),this.encodingID=n.readShort(),this.offset=t+n.readInt(),v=n.pos,n.pos=this.offset,this.format=n.readUInt16(),this.length=n.readUInt16(),this.language=n.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(u=0;u<256;++u)this.codeMap[u]=n.readByte();break;case 4:for(m=n.readUInt16(),w=m/2,n.pos+=6,r=function(){var R,Q;for(Q=[],u=R=0;0<=w?R<w:R>w;u=0<=w?++R:--R)Q.push(n.readUInt16());return Q}(),n.pos+=2,y=function(){var R,Q;for(Q=[],u=R=0;0<=w?R<w:R>w;u=0<=w?++R:--R)Q.push(n.readUInt16());return Q}(),h=function(){var R,Q;for(Q=[],u=R=0;0<=w?R<w:R>w;u=0<=w?++R:--R)Q.push(n.readUInt16());return Q}(),f=function(){var R,Q;for(Q=[],u=R=0;0<=w?R<w:R>w;u=0<=w?++R:--R)Q.push(n.readUInt16());return Q}(),i=(this.length-n.pos+this.offset)/2,o=function(){var R,Q;for(Q=[],u=R=0;0<=i?R<i:R>i;u=0<=i?++R:--R)Q.push(n.readUInt16());return Q}(),u=k=0,I=r.length;k<I;u=++k)for(P=r[u],s=G=A=y[u];A<=P?G<=P:G>=P;s=A<=P?++G:--G)f[u]===0?l=s+h[u]:(l=o[f[u]/2+(s-A)-(w-u)]||0)!==0&&(l+=h[u]),this.codeMap[s]=65535&l}n.pos=v}return e.encode=function(n,t){var s,i,r,l,o,u,h,f,v,w,m,A,y,P,k,G,I,R,Q,me,oe,K,H,ie,j,z,C,$,q,L,M,Z,ae,he,we,b,W,D,X,Y,te,ue,ge,se,ve,Ae;switch($=new $r,l=Object.keys(n).sort(function(Pe,He){return Pe-He}),t){case"macroman":for(y=0,P=function(){var Pe=[];for(A=0;A<256;++A)Pe.push(0);return Pe}(),G={0:0},r={},q=0,ae=l.length;q<ae;q++)G[ge=n[i=l[q]]]==null&&(G[ge]=++y),r[i]={old:n[i],new:G[n[i]]},P[i]=G[n[i]];return $.writeUInt16(1),$.writeUInt16(0),$.writeUInt32(12),$.writeUInt16(0),$.writeUInt16(262),$.writeUInt16(0),$.write(P),{charMap:r,subtable:$.data,maxGlyphID:y+1};case"unicode":for(z=[],v=[],I=0,G={},s={},k=h=null,L=0,he=l.length;L<he;L++)G[Q=n[i=l[L]]]==null&&(G[Q]=++I),s[i]={old:Q,new:G[Q]},o=G[Q]-i,k!=null&&o===h||(k&&v.push(k),z.push(i),h=o),k=i;for(k&&v.push(k),v.push(65535),z.push(65535),ie=2*(H=z.length),K=2*Math.pow(Math.log(H)/Math.LN2,2),w=Math.log(K/2)/Math.LN2,oe=2*H-K,u=[],me=[],m=[],A=M=0,we=z.length;M<we;A=++M){if(j=z[A],f=v[A],j===65535){u.push(0),me.push(0);break}if(j-(C=s[j].new)>=32768)for(u.push(0),me.push(2*(m.length+H-A)),i=Z=j;j<=f?Z<=f:Z>=f;i=j<=f?++Z:--Z)m.push(s[i].new);else u.push(C-j),me.push(0)}for($.writeUInt16(3),$.writeUInt16(1),$.writeUInt32(12),$.writeUInt16(4),$.writeUInt16(16+8*H+2*m.length),$.writeUInt16(0),$.writeUInt16(ie),$.writeUInt16(K),$.writeUInt16(w),$.writeUInt16(oe),te=0,b=v.length;te<b;te++)i=v[te],$.writeUInt16(i);for($.writeUInt16(0),ue=0,W=z.length;ue<W;ue++)i=z[ue],$.writeUInt16(i);for(se=0,D=u.length;se<D;se++)o=u[se],$.writeUInt16(o);for(ve=0,X=me.length;ve<X;ve++)R=me[ve],$.writeUInt16(R);for(Ae=0,Y=m.length;Ae<Y;Ae++)y=m[Ae],$.writeUInt16(y);return{charMap:s,subtable:$.data,maxGlyphID:I+1}}},e}(),Jp=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="cmap",e.prototype.parse=function(n){var t,s,i;for(n.pos=this.offset,this.version=n.readUInt16(),i=n.readUInt16(),this.tables=[],this.unicode=null,s=0;0<=i?s<i:s>i;s=0<=i?++s:--s)t=new im(n,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},e.encode=function(n,t){var s,i;return t==null&&(t="macroman"),s=im.encode(n,t),(i=new $r).writeUInt16(0),i.writeUInt16(1),s.table=i.data.concat(s.subtable),s},e}(),xb=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="hhea",e.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.ascender=n.readShort(),this.decender=n.readShort(),this.lineGap=n.readShort(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort(),this.minRightSideBearing=n.readShort(),this.xMaxExtent=n.readShort(),this.caretSlopeRise=n.readShort(),this.caretSlopeRun=n.readShort(),this.caretOffset=n.readShort(),n.pos+=8,this.metricDataFormat=n.readShort(),this.numberOfMetrics=n.readUInt16()},e}(),vb=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="OS/2",e.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=function(){var t,s;for(s=[],t=0;t<10;++t)s.push(n.readByte());return s}(),this.charRange=function(){var t,s;for(s=[],t=0;t<4;++t)s.push(n.readInt());return s}(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),this.version>0&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=function(){var t,s;for(s=[],t=0;t<2;t=++t)s.push(n.readInt());return s}(),this.version>1))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},e}(),bb=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="post",e.prototype.parse=function(n){var t,s,i;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 65536:case 196608:break;case 131072:var r;for(s=n.readUInt16(),this.glyphNameIndex=[],r=0;0<=s?r<s:r>s;r=0<=s?++r:--r)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],i=[];n.pos<this.offset+this.length;)t=n.readByte(),i.push(this.names.push(n.readString(t)));return i;case 151552:return s=n.readUInt16(),this.offsets=n.read(s);case 262144:return this.map=(function(){var l,o,u;for(u=[],r=l=0,o=this.file.maxp.numGlyphs;0<=o?l<o:l>o;r=0<=o?++l:--l)u.push(n.readUInt32());return u}).call(this)}},e}(),wb=function(e,n){this.raw=e,this.length=e.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},yb=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="name",e.prototype.parse=function(n){var t,s,i,r,l,o,u,h,f,v,w;for(n.pos=this.offset,n.readShort(),t=n.readShort(),o=n.readShort(),s=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)s.push({platformID:n.readShort(),encodingID:n.readShort(),languageID:n.readShort(),nameID:n.readShort(),length:n.readShort(),offset:this.offset+o+n.readShort()});for(u={},r=f=0,v=s.length;f<v;r=++f)i=s[r],n.pos=i.offset,h=n.readString(i.length),l=new wb(h,i),u[w=i.nameID]==null&&(u[w]=[]),u[i.nameID].push(l);this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5];try{this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=u[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},e}(),_b=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="maxp",e.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.numGlyphs=n.readUInt16(),this.maxPoints=n.readUInt16(),this.maxContours=n.readUInt16(),this.maxCompositePoints=n.readUInt16(),this.maxComponentContours=n.readUInt16(),this.maxZones=n.readUInt16(),this.maxTwilightPoints=n.readUInt16(),this.maxStorage=n.readUInt16(),this.maxFunctionDefs=n.readUInt16(),this.maxInstructionDefs=n.readUInt16(),this.maxStackElements=n.readUInt16(),this.maxSizeOfInstructions=n.readUInt16(),this.maxComponentElements=n.readUInt16(),this.maxComponentDepth=n.readUInt16()},e}(),Nb=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="hmtx",e.prototype.parse=function(n){var t,s,i,r,l,o,u;
185for(n.pos=this.offset,this.metrics=[],t=0,o=this.file.hhea.numberOfMetrics;0<=o?t<o:t>o;t=0<=o?++t:--t)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var h,f;for(f=[],t=h=0;0<=i?h<i:h>i;t=0<=i?++h:--h)f.push(n.readInt16());return f}(),this.widths=(function(){var h,f,v,w;for(w=[],h=0,f=(v=this.metrics).length;h<f;h++)r=v[h],w.push(r.advance);return w}).call(this),s=this.widths[this.widths.length-1],u=[],t=l=0;0<=i?l<i:l>i;t=0<=i?++l:--l)u.push(this.widths.push(s));return u},e.prototype.forGlyph=function(n){return n in this.metrics?this.metrics[n]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[n-this.metrics.length]}},e}(),Xp=[].slice,jb=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(n){var t,s,i,r,l,o,u,h,f,v;return n in this.cache?this.cache[n]:(r=this.file.loca,t=this.file.contents,s=r.indexOf(n),(i=r.lengthOf(n))===0?this.cache[n]=null:(t.pos=this.offset+s,l=(o=new $r(t.read(i))).readShort(),h=o.readShort(),v=o.readShort(),u=o.readShort(),f=o.readShort(),this.cache[n]=l===-1?new Ab(o,h,v,u,f):new kb(o,l,h,v,u,f),this.cache[n]))},e.prototype.encode=function(n,t,s){var i,r,l,o,u;
vendor: 2,058 bytes, line 185
185for(l=[],r=[],o=0,u=t.length;o<u;o++)i=n[t[o]],r.push(l.length),i&&(l=l.concat(i.encode(s)));return r.push(l.length),{table:l,offsets:r}},e}(),kb=function(){function e(n,t,s,i,r,l){this.raw=n,this.numberOfContours=t,this.xMin=s,this.yMin=i,this.xMax=r,this.yMax=l,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),Ab=function(){function e(n,t,s,i,r){var l,o;for(this.raw=n,this.xMin=t,this.yMin=s,this.xMax=i,this.yMax=r,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],l=this.raw;o=l.readShort(),this.glyphOffsets.push(l.pos),this.glyphIDs.push(l.readUInt16()),32&o;)l.pos+=1&o?4:2,128&o?l.pos+=8:64&o?l.pos+=4:8&o&&(l.pos+=2)}return e.prototype.encode=function(){var n,t,s;for(t=new $r(Xp.call(this.raw.data)),n=0,s=this.glyphIDs.length;n<s;++n)t.pos=this.glyphOffsets[n];return t.data},e}(),Sb=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Gi(e,ki),e.prototype.tag="loca",e.prototype.parse=function(n){var t,s;return n.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?(function(){var i,r;for(r=[],s=0,i=this.length;s<i;s+=2)r.push(2*n.readUInt16());return r}).call(this):(function(){var i,r;for(r=[],s=0,i=this.length;s<i;s+=4)r.push(n.readUInt32());return r}).call(this)},e.prototype.indexOf=function(n){return this.offsets[n]},e.prototype.lengthOf=function(n){return this.offsets[n+1]-this.offsets[n]},e.prototype.encode=function(n,t){for(var s=new Uint32Array(this.offsets.length),i=0,r=0,l=0;l<s.length;++l)if(s[l]=i,r<t.length&&t[r]==l){++r,s[l]=i;var o=this.offsets[l],u=this.offsets[l+1]-o;u>0&&(i+=u)}for(var h=new Array(4*s.length),f=0;f<s.length;++f)h[4*f+3]=255&s[f],h[4*f+2]=(65280&s[f])>>8,h[4*f+1]=(16711680&s[f])>>16,h[4*f]=(4278190080&s[f])>>24;return h},e}(),Lb=function(){function e(n){this.font=n,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var n,t,s,i,r;for(t in i=this.font.cmap.tables[0].codeMap,n={},r=this.subset)s=r[t],n[t]=i[s];return n},e.prototype.glyphsFor=function(n){var t,s,i,r,l,o,u;
185for(i={},l=0,o=n.length;l<o;l++)i[r=n[l]]=this.font.glyf.glyphFor(r);for(r in t=[],i)(s=i[r])!=null&&s.compound&&t.push.apply(t,s.glyphIDs);if(t.length>0)for(r in u=this.glyphsFor(t))s=u[r],i[r]=s;return i},e.prototype.encode=function(n,t){var s,i,r,l,o,u,h,f,v,w,m,A,y,P,k;for(i in s=Jp.encode(this.generateCmap(),"unicode"),l=this.glyphsFor(n),m={0:0},k=s.charMap)m[(u=k[i]).old]=u.new;for(A in w=s.maxGlyphID,l)A in m||(m[A]=w++);return f=function(G){var I,R;for(I in R={},G)R[G[I]]=I;return R}(m),v=Object.keys(f).sort(function(G,I){return G-I}),y=function(){var G,I,R;for(R=[],G=0,I=v.length;G<I;G++)o=v[G],R.push(f[o]);return R}(),r=this.font.glyf.encode(l,y,m),h=this.font.loca.encode(r.offsets,y),P={cmap:this.font.cmap.raw(),glyf:r.table,loca:h,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(P["OS/2"]=this.font.os2.raw()),this.font.directory.encode(P)},e}();dt.API.PDFObject=function(){var e;function n(){}return e=function(t,s){return(Array(s+1).join("0")+t).slice(-s)},n.convert=function(t){var s,i,r,l;if(Array.isArray(t))return"["+function(){var o,u,h;for(h=[],o=0,u=t.length;o<u;o++)s=t[o],h.push(n.convert(s));return h}().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t!=null&&t.isString)return"("+t+")";if(t instanceof Date)return"(D:"+e(t.getUTCFullYear(),4)+e(t.getUTCMonth(),2)+e(t.getUTCDate(),2)+e(t.getUTCHours(),2)+e(t.getUTCMinutes(),2)+e(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(i in r=["<<"],t)l=t[i],r.push("/"+i+" "+n.convert(l));return r.push(">>"),r.join(` 186`)}return""+t},n}();const Mo={street:"Bachwinkl 34",postalCode:"5761",city:"Maria Alm am Steinernen Meer"},Eb="Podle vyhodnocenà žádné usnesenà nevzniklo. VývÄsku podle § 24 odst. 5 WEG 2002 nelze vytvoÅit.",Pb="PÅesné nÄmecké znÄnà pÅijatého usnesenà nenà potvrzeno. VývÄsku nelze vytvoÅit.";async function Cb(e){const n=await crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(n)).map(t=>t.toString(16).padStart(2,"0")).join("")}const Db="/fonts/DejaVuSans.ttf",Tb="/fonts/DejaVuSans-Bold.ttf";let Yl=null;const rm=e=>{const n=new Uint8Array(e);let t="";for(let s=0;s<n.length;s+=32768)t+=String.fromCharCode(...n.subarray(s,s+32768));return btoa(t)};async function zb(){if(Yl)return Yl;const[e,n]=await Promise.all([fetch(Db).then(t=>t.arrayBuffer()),fetch(Tb).then(t=>t.arrayBuffer())]);return Yl={regular:rm(e),bold:rm(n)},Yl}function Fb(e){var s;const n=new Intl.DateTimeFormat("de-AT",{timeZone:"Europe/Vienna",day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(e),t=((s=new Intl.DateTimeFormat("de-AT",{timeZone:"Europe/Vienna",timeZoneName:"short"}).formatToParts(e).find(i=>i.type==="timeZoneName"))==null?void 0:s.value)??"";return`${n} Uhr (${t})`}async function am(e){var P;if(!e.draft&&!e.resolutionExists)throw new Error(Eb);const n=(e.resolutionText||"").trim();if(!n)throw new Error(Pb);const t=await zb(),s=new dt({unit:"mm",format:"a4"});s.addFileToVFS("DejaVuSans.ttf",t.regular),s.addFont("DejaVuSans.ttf","DejaVu","normal"),s.addFileToVFS("DejaVuSans-Bold.ttf",t.bold),s.addFont("DejaVuSans-Bold.ttf","DejaVu","bold"),s.setCharSpace(0);const i=210,r=297,l=22,o=r-24;let u=30;const h=k=>k*.3528*1.34,f=(k,G,I,R={})=>{s.setFont("DejaVu",I),s.setFontSize(G),s.setCharSpace(0);const Q=R.indent??0;s.splitTextToSize(k,i-2*l-Q).forEach(oe=>{u>o&&(s.addPage(),u=30),R.align==="center"?s.text(oe,i/2,u,{align:"center"}):s.text(oe,l+Q,u),u+=h(G)}),u+=R.gapAfter??0};f("Eigentümergemeinschaft der Liegenschaft",11,"normal",{align:"center"}),f(e.property.street,12,"bold",{align:"center"}),f(`A-${e.property.postalCode} ${e.property.city}`,12,"bold",{align:"center",gapAfter:12}),f("KUNDMACHUNG",26,"bold",{align:"center",gapAfter:4}),f("eines Beschlusses der Eigentümergemeinschaft",12,"normal",{align:"center"}),f("gemäà § 24 Abs 5 WEG 2002",12,"normal",{align:"center",gapAfter:6}),s.setDrawColor(40),s.setLineWidth(.5),s.line(l,u,i-l,u),u+=12,f("WORTLAUT DES BESCHLUSSES",11,"bold",{gapAfter:4}),f(n,12,"normal",{gapAfter:12}),f("BESCHLUSSFASSUNG",11,"bold",{gapAfter:4}),f("Der vorstehende Beschluss wurde von der Eigentümergemeinschaft gefasst.",12,"normal",{gapAfter:10}),!e.draft&&e.deadlines&&(f(`Tag des Anschlags: ${ni(e.deadlines.postingDate)}`,12,"bold",{gapAfter:7}),f("Ende der Anfechtungsfrist gemäà § 24 Abs 6 WEG 2002:",12,"normal"),f(ni(e.deadlines.oneMonth),13,"bold",{gapAfter:7}),e.legalCategory==="extraordinary_29"&&e.deadlines.threeMonths&&(f("Ende der Antragsfrist gemäà § 29 Abs 1 WEG 2002:",12,"normal"),f(ni(e.deadlines.threeMonths),13,"bold")));const v=s.getNumberOfPages();for(let k=1;k<=v;k+=1){s.setPage(k),e.draft&&(s.saveGraphicsState(),s.setGState(new s.GState({opacity:.13})),s.setFont("DejaVu","bold"),s.setFontSize(34),s.setTextColor(180,30,30),s.text("ENTWURF â NICHT ZUM AUSHANG",i/2,r/2,{align:"center",angle:32}),e.resolutionExists||(s.setFontSize(15),s.text("KEIN BESCHLUSS GEFASST â NUR MUSTER",i/2,r/2+26,{align:"center",angle:32})),s.restoreGraphicsState(),s.setTextColor(0)),s.setFont("DejaVu","normal"),s.setFontSize(8.5);let G=r-18;if((P=e.initiator)!=null&&P.trim()){const R=e.initiator.trim(),Q=s.splitTextToSize(R,i-2*l),me=8.5*.3528*1.34,oe=Q.length*me;G=r-16-oe;let K=G+2;Q.forEach(H=>{s.text(H,l,K),K+=me}),G=K+1}s.setDrawColor(180),s.setLineWidth(.2),s.line(l,G,i-l,G),s.setFont("DejaVu","normal"),s.setFontSize(8.5);const I=e.draft?"Entwurf":`Fassung ${e.version??1}`;s.text(`${I} · erstellt am ${Fb(e.generatedAt)}`,l,G+5),s.text(`Seite ${k} von ${v}`,i-l,G+5,{align:"right"})}const w=new Uint8Array(s.output("arraybuffer")),m=await Cb(w),y=`Kundmachung_${e.deadlines?ua(e.deadlines.postingDate):"ohne-Datum"}_${e.draft?"ENTWURF":`v${e.version??1}`}.pdf`;return{blob:new Blob([w],{type:"application/pdf"}),bytes:w,sha256:m,fileName:y}}function om(e,n){const t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.download=n,s.click(),setTimeout(()=>URL.revokeObjectURL(t),4e3)}const lm={ordinary_24:"Ordentliche Verwaltung (§ 28 WEG 2002) â lhůta 1 mÄsÃc podle § 24 odst. 6",extraordinary_29:"MimoÅádná správa (§ 29 WEG 2002) â navÃc lhůta 3 mÄsÃce podle § 29"};function Ob({pollId:e,postedOnBoardAt:n,votesClosed:t,evaluation:s,onChanged:i}){const{toast:r}=oo(),[l,o]=be.useState(null),[u,h]=be.useState([]),[f,v]=be.useState(""),[w,m]=be.useState(""),[A,y]=be.useState("ordinary_24"),[P,k]=be.useState(!0),[G,I]=be.useState(!1),[R,Q]=be.useState(!1),me=be.useCallback(async()=>{var te;k(!0);const[D,X]=await Promise.all([Be.from("polls").select("resolution_text_de, resolution_text_snapshot_de, resolution_snapshot_id, resolution_snapshot_taken_at, resolution_text_confirmed_at, legal_category, legal_category_confirmed_at, title, options, option_resolution_texts_de, created_by, resolution_initiator").eq("id",e).maybeSingle(),Be.from("poll_board_pdf_versions").select("id, version, storage_path, sha256, posting_date, legal_category, status, created_at, file_size").eq("poll_id",e).order("version",{ascending:!1})]),Y=D.data||null;o(Y),v((Y==null?void 0:Y.resolution_text_snapshot_de)||(Y==null?void 0:Y.resolution_text_de)||""),m((Y==null?void 0:Y.resolution_initiator)||""),y((Y==null?void 0:Y.legal_category)||"ordinary_24"),h(X.data||[]),(te=Y==null?void 0:Y.resolution_initiator)!=null&&te.trim()||m(`WEG ${Mo.street} - Apartmenthaus Hintermoos`),k(!1)},[e]);be.useEffect(()=>{me()},[me]);const oe=be.useMemo(()=>n?zm(n):null,[n]),K=be.useMemo(()=>oe?gu(oe,A):null,[oe,A]),H=!!(l!=null&&l.resolution_text_confirmed_at)&&!!((l==null?void 0:l.resolution_text_snapshot_de)||"").trim(),ie=!!(l!=null&&l.legal_category_confirmed_at),j=(s==null?void 0:s.resolutionExists)===!0,z=be.useMemo(()=>
186{if(!l)return"";const D=(s==null?void 0:s.winningOptionIndex)??null,X=Array.isArray(l.option_resolution_texts_de)?l.option_resolution_texts_de:null;if(D!==null&&X&&typeof X[D]=="string"&&X[D].trim())return X[D].trim();const Y=Array.isArray(l.options)?l.options:[],te=D!==null&&typeof Y[D]=="string"?Y[D].trim():"",ue=(l.title||"").trim();return!te&&!ue?"":[`Die Eigentümergemeinschaft der Liegenschaft ${Mo.street}, ${Mo.postalCode} ${Mo.city} hat`,ue?`zur Frage â${ue}â`:"","folgenden Beschluss gefasst:","",te||"[Wortlaut der beschlossenen Variante]"].filter(Boolean).join(` 187`)},[l,s]);be.useEffect(()=>{!P&&!f.trim()&&z&&v(z)},[P,z]);const C=be.useMemo(()=>[{key:"closed",label:"Hlasovánà je uzavÅeno",ok:t},{key:"exists",label:"Podle vyhodnocenà vzniklo usnesenÃ",ok:j},{key:"wording",label:"PÅesné znÄnà usnesenà je uloženo",ok:H},{key:"category",label:"Právnà kategorie usnesenà je potvrzena",ok:ie},{key:"posting",label:"Datum vyvÄÅ¡enà v domÄ je vyplnÄno",ok:!!oe},{key:"evaluation",label:"Vyhodnocenà hlasovánà je k dispozici",ok:!!s}],[t,j,H,ie,oe,s]),$=C.filter(D=>!D.ok),q=u.find(D=>D.status==="current")||null,L=!!q&&!!K&&q.posting_date!==ua(K.postingDate),M=(D,X)=>({property:Mo,resolutionText:((l==null?void 0:l.resolution_text_snapshot_de)||(D?f:"")||"").trim()||(D?"[Wortlaut des Beschlusses â Mustertext zur Prüfung des Aufbaus]":""),resolutionExists:(s==null?void 0:s.resolutionExists)??!1,legalCategory:A,deadlines:K,draft:D,version:X,initiator:w.trim()||void 0,generatedAt:new Date}),Z=async()=>{I(!0);try{const D=await am(M(!0));om(D.blob,D.fileName)}catch(D){r({title:"Náhled nelze vytvoÅit",description:D.message,variant:"destructive"})}finally{I(!1)}},ae=async D=>{var te;y(D);const{data:X}=await Be.auth.getUser(),{error:Y}=await Be.from("polls").update({legal_category:D,legal_category_confirmed_at:new Date().toISOString(),legal_category_confirmed_by:((te=X.user)==null?void 0:te.id)??null}).eq("id",e);if(Y){r({title:"Uloženà selhalo",description:Y.message,variant:"destructive"});return}q&&await Be.rpc("supersede_board_pdf_versions",{_poll_id:e,_reason:"legal_category_changed"}),await me(),i==null||i()},he=async()=>{var se,ve;const D=f.trim();if(!D)return;I(!0);const{data:X}=await Be.auth.getUser(),Y=new Date().toISOString(),te=crypto.randomUUID(),ue=D!==((l==null?void 0:l.resolution_text_snapshot_de)||"").trim(),{error:ge}=await Be.from("polls").update({resolution_text_de:D,resolution_text_snapshot_de:D,resolution_snapshot_id:te,resolution_snapshot_taken_at:Y,resolution_text_confirmed_at:Y,resolution_text_confirmed_by:((se=X.user)==null?void 0:se.id)??null,resolution_initiator:w.trim()||null}).eq("id",e);if(ge||(await Be.from("poll_board_audit").insert({poll_id:e,event_type:"resolution_wording_confirmed",performed_by:((ve=X.user)==null?void 0:ve.id)??null,details:{snapshot_id:te,text:D,initiator:w.trim()||null}}),ue&&q&&await Be.rpc("supersede_board_pdf_versions",{_poll_id:e,_reason:"resolution_text_changed"})),I(!1),ge){r({title:"Uloženà selhalo",description:ge.message,variant:"destructive"});return}r({title:"ZnÄnà uloženo",description:"Text usnesenà lze kdykoli dále upravit."}),await me(),i==null||i()},we=async()=>{var ue;if(!s)return null;const{data:D}=await Be.from("poll_evaluation_snapshots").select("id").eq("poll_id",e).eq("status","current").maybeSingle();if(D!=null&&D.id)return D.id;const{data:X}=await Be.auth.getUser(),{data:Y,error:te}=await Be.from("poll_evaluation_snapshots").insert({poll_id:e,shares_snapshot:s.sharesSnapshot,votes_snapshot:s.votesSnapshot,totals:s.votes,majority_path:s.majorityPath,winning_option_index:s.winningOptionIndex,resolution_exists:s.resolutionExists,created_by:((ue=X.user)==null?void 0:ue.id)??null}).select("id").maybeSingle();return te?(r({title:"Snapshot vyhodnocenà selhal",description:te.message,variant:"destructive"}),null):(Y==null?void 0:Y.id)||null},b=async()=>{var D;if($.length>0||!K){Q(!0);return}I(!0);try{const X=await we(),Y=(((D=u[0])==null?void 0:D.version)??0)+1,te=await am(M(!1,Y)),ue=`board-notice/${e}/v${Y}-${ua(K.postingDate)}.pdf`,ge=await Be.storage.from("vote-evidence").upload(ue,te.blob,{upsert:!0,contentType:"application/pdf"});if(ge.error)throw ge.error;const{error:se}=await Be.rpc("create_board_pdf_version",{_poll_id:e,_storage_path:ue,_file_size:te.bytes.length,_sha256:te.sha256,_evaluation_snapshot_id:X,_resolution_snapshot_id:(l==null?void 0:l.resolution_snapshot_id)??null,_posting_date:ua(K.postingDate),_deadlines:{posting:ua(K.postingDate),one_month:ua(K.oneMonth),three_months:K.threeMonths?ua(K.threeMonths):null},_legal_category:A});if(se)throw se;om(te.blob,te.fileName),r({title:`VývÄska vytvoÅena (fassung ${Y})`,description:"Dokument je uložen v auditnà evidenci."}),await me(),i==null||i()}catch(X){r({title:"VytvoÅenà vývÄsky selhalo",description:X.message,variant:"destructive"})}finally{I(!1)}},W=async D=>{const{data:X,error:Y}=await Be.storage.from("vote-evidence").createSignedUrl(D.storage_path,300);if(Y||!X){r({title:"Nelze otevÅÃt",description:Y==null?void 0:Y.message,variant:"destructive"});return}window.open(X.signedUrl,"_blank","noreferrer")};return P?a.jsx("div",{className:"flex justify-center py-10",children:a.jsx(ds,{className:"h-5 w-5 animate-spin"})}):a.jsxs(ln,{className:"rounded-xl overflow-hidden",children:[a.jsxs(Nn,{className:"flex-row flex-wrap items-center justify-between gap-2 space-y-0 border-b bg-muted/20 py-3",children:[a.jsxs(Tn,{className:"text-base font-serif flex items-center gap-2",children:[a.jsx(Fm,{className:"h-4 w-4 text-primary"})," VývÄska na domovnà nástÄnku",a.jsx("span",{className:"font-sans text-xs font-normal text-muted-foreground",children:"(Kundmachung, § 24 odst. 5 WEG 2002)"})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs(pt,{variant:"outline",size:"sm",onClick:Z,disabled:G,className:"h-8 gap-1.5 text-xs",children:[a.jsx($d,{className:"h-3.5 w-3.5"})," Náhled (ENTWURF)"]}),j&&a.jsxs(pt,{size:"sm",onClick:b,disabled:G,variant:$.length>0?"outline":"default",title:$.length>0?`ChybÃ: ${$.map(D=>D.label).join(", ")}`:void 0,className:"h-8 gap-1.5 text-xs",children:[G?a.jsx(ds,{className:"h-3.5 w-3.5 animate-spin"}):a.jsx(pu,{className:"h-3.5 w-3.5"}),"VytvoÅit vývÄsku (A4, DE)",$.length>0&&a.jsx("span",{className:"ml-1 rounded-full bg-destructive/10 px-1.5 py-0.5 text-[10px] font-medium text-destructive",children:$.length})]})]})]}),a.jsx(cn,{className:"space-y-5 pt-5",children:j?a.jsxs(a.Fragment,{children:[a.jsxs(ba,{className:"bg-muted/30 border-border/60",children:[a.jsx(Vr,{className:"h-4 w-4 text-primary"}),a.jsx(wa,{className:"text-xs",children:"VývÄska je samostatný dokument v nÄmÄinÄ obsahujÃcà pouze zákonné minimum: záhlavà nemovitosti, pÅesné znÄnà pÅijatého usnesenÃ, konstatovánà o jeho pÅijetÃ, datum vyvÄÅ¡enà a konec lhůty podle § 24 odst. 6 WEG 2002. Neobsahuje statistiku hlasovánÃ, jména vlastnÃků, právnà pouÄenà ani podpisové Åádky."})]}),a.jsxs("div",{className:"rounded-xl border bg-muted/10 p-4",children:[a.jsx("div",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Kontrola pÅed vyvÄÅ¡enÃm"}),a.jsx("ul",{className:"space-y-1.5",children:C.map(D=>a.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[D.ok?a.jsx(qo,{className:"h-3.5 w-3.5 text-emerald-600"}):a.jsx(uc,{className:"h-3.5 w-3.5 text-destructive"}),a.jsx("span",{className:D.ok?"":"text-destructive",children:D.label})]},D.key))})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx(Wn,{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"PÅesné znÄnà usnesenà (nÄmecky) â Wortlaut des Beschlusses"}),H&&a.jsxs(Ot,{variant:"secondary",className:"gap-1 text-[10px]",children:[a.jsx(qo,{className:"h-3 w-3"})," uloženo ",l!=null&&l.resolution_snapshot_taken_at?new Date(l.resolution_snapshot_taken_at).toLocaleDateString("cs-CZ"):""]})]}),a.jsx(qd,{value:f,onChange:D=>v(D.target.value),rows:6,className:"text-sm",placeholder:"Die Eigentümergemeinschaft beschlieÃt â¦"}),a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Návrh je pÅedvyplnÄn z otázky hlasovánà a pÅijaté varianty â text upravte podle potÅeby a uložte. ZmÄna po vytvoÅenà vývÄsky nahradà dosavadnà verzi PDF."}),a.jsxs("div",{className:"flex gap-2",children:[z&&z!==f&&a.jsxs(pt,{size:"sm",variant:"ghost",className:"h-8 gap-1.5 text-xs",onClick:()=>v(z),children:[a.jsx($d,{className:"h-3.5 w-3.5"})," Obnovit návrh"]}),a.jsxs(pt,{size:"sm",variant:"outline",className:"h-8 gap-1.5 text-xs",onClick:he,disabled:G||!f.trim(),children:[a.jsx(qo,{className:"h-3.5 w-3.5"})," Uložit znÄnÃ"]})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx(Wn,{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Iniciátor usnesenà â Initiator"}),a.jsxs(pt,{size:"sm",variant:"outline",className:"h-7 gap-1.5 text-xs",onClick:async()=>{I(!0);const{error:D}=await Be.from("polls").update({resolution_initiator:w.trim()||null}).eq("id",e);if(I(!1),D){r({title:"Uloženà iniciátora selhalo",description:D.message,variant:"destructive"});return}r({title:"Iniciátor uložen",description:"Ãdaj se promÃtne do náhledu i finálnà vývÄsky."}),i==null||i()},disabled:G,children:[G?a.jsx(ds,{className:"h-3.5 w-3.5 animate-spin"}):a.jsx(qo,{className:"h-3.5 w-3.5"}),"Uložit"]})]}),a.jsx("input",{type:"text",value:w,onChange:D=>m(D.target.value),placeholder:"NapÅ. WEG Bachwinkl 34 - Apartmenthaus Hintermoos",className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"}),a.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Pokud nenà vyplnÄno, automaticky se doplnà oznaÄenà vlastnického spoleÄenstvà (WEG + adresa domu + Apartmenthaus Hintermoos). Zobrazà se jako samostatný Åádek na vývÄsce."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Wn,{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Právnà kategorie usnesenÃ"}),a.jsx(X0,{value:A,onValueChange:D=>ae(D),className:"gap-2",children:Object.keys(lm).map(D=>a.jsxs("label",{className:"flex cursor-pointer items-start gap-2 rounded-lg border p-3 text-xs hover:bg-muted/30",children:[a.jsx(Q0,{value:D,className:"mt-0.5"}),a.jsx("span",{children:lm[D]})]},D))}),!ie&&a.jsx("p",{className:"text-[11px] text-destructive",children:"Kategorii je nutné výslovnÄ potvrdit výbÄrem výše."})]}),a.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:[{label:"VyvÄÅ¡eno v domÄ",value:K?ni(K.postingDate):"â",tone:"muted"},{label:"Konec lhůty § 24 odst. 6 (1 mÄsÃc)",value:K?ni(K.oneMonth):"â",tone:"primary"},{label:"Konec lhůty § 29 (3 mÄsÃce)",value:K!=null&&K.threeMonths?ni(K.threeMonths):"neuplatnà se",tone:"muted"}].map(D=>a.jsxs("div",{className:`rounded-lg border px-3 py-2 ${D.tone==="primary"?"border-primary/25 bg-primary/5":"bg-muted/20"}`,children:[a.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:D.label}),a.jsx("div",{className:`mt-1 text-sm font-semibold ${D.tone==="primary"?"text-primary":""}`,children:D.value})]},D.label))}),a.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Lhůty se poÄÃtajà v kalendáÅnÃch mÄsÃcÃch od data vyvÄÅ¡enÃ; pokud konec pÅipadne na sobotu, nedÄli nebo rakouský svátek, posouvá se na nejbližšà pracovnà den."}),L&&a.jsxs(ba,{variant:"destructive",children:[a.jsx(Vr,{className:"h-4 w-4"}),a.jsx(wa,{className:"text-xs",children:"Datum vyvÄÅ¡enà se od poslednà vytvoÅené vývÄsky zmÄnilo. VytvoÅte novou verzi â stará je neplatná."})]}),u.length>0&&a.jsx("div",{className:"overflow-x-auto rounded-md border",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{className:"bg-muted/50",children:[a.jsx(Ze,{className:"h-8 text-xs",children:"Verze"}),a.jsx(Ze,{className:"h-8 text-xs",children:"VytvoÅeno"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Datum vyvÄÅ¡enÃ"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Stav"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Otisk (SHA-256)"}),a.jsx(Ze,{className:"h-8 text-xs"})]})}),a.jsx(hi,{children:u.map(D=>a.jsxs(Qt,{className:"h-9",children:[a.jsxs(Ie,{className:"text-xs font-medium",children:["v",D.version]}),a.jsx(Ie,{className:"whitespace-nowrap text-xs",children:new Date(D.created_at).toLocaleStr
187ing("cs-CZ")}),a.jsx(Ie,{className:"whitespace-nowrap text-xs",children:D.posting_date}),a.jsx(Ie,{children:a.jsx(Ot,{variant:D.status==="current"?"default":"outline",className:"text-[10px] whitespace-nowrap",children:D.status==="current"?"Platná":"Nahrazena"})}),a.jsxs(Ie,{className:"font-mono text-[10px] text-muted-foreground",children:[D.sha256.slice(0,16),"â¦"]}),a.jsx(Ie,{className:"text-right",children:a.jsxs(pt,{variant:"ghost",size:"sm",className:"h-7 gap-1 text-xs",onClick:()=>W(D),children:[a.jsx(ec,{className:"h-3.5 w-3.5"})," Stáhnout"]})})]},D.id))})]})})]}):a.jsxs(ba,{variant:"destructive",children:[a.jsx(Vr,{className:"h-4 w-4"}),a.jsxs(wa,{className:"text-xs",children:[a.jsx("strong",{children:"VývÄska se nevytváÅà â podle vyhodnocenà žádné usnesenà nevzniklo."}),a.jsx("span",{className:"mt-1 block",children:"Nevzniká ani návrh, datum vyvÄÅ¡enÃ, lhůta ani povinnost fotodokumentace. VlastnÃky lze informovat pouze samostatnou neformálnà elektronickou zprávou o výsledku, která se nesmà oznaÄovat jako Kundmachung, Beschlussbekanntgabe ani oznámenà podle § 24 odst. 5 WEG 2002."}),a.jsx("span",{className:"mt-1 block",children:"Pro kontrolu struktury dokumentu lze vytvoÅit pouze náhled s vodoznakem âENTWURF â NICHT ZUM AUSHANG / KEIN BESCHLUSS GEFASSTâ; nelze jej uložit ani vyvÄsit."})]})]})}),a.jsx(fr,{open:R,onOpenChange:Q,children:a.jsxs(mr,{children:[a.jsxs(pr,{children:[a.jsx(gr,{children:"VývÄsku zatÃm nelze vytvoÅit"}),a.jsx(Xo,{className:"text-xs",children:"Nejprve doplÅte tyto body:"})]}),a.jsx("ul",{className:"space-y-1.5",children:$.map(D=>a.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[a.jsx(uc,{className:"h-4 w-4 text-destructive"})," ",D.label]},D.key))}),a.jsx(Ql,{children:a.jsx(pt,{onClick:()=>Q(!1),children:"RozumÃm"})})]})})]})}const cm=e=>e?new Date(e).toISOString().slice(0,16):"",dm=e=>e?new Date(e).toISOString():null,Br=e=>e?new Date(e).toLocaleString("cs-CZ"):"â",um={sent:{label:"Odesláno",variant:"secondary"},deferred:{label:"Odloženo",variant:"outline"},delivered:{label:"DoruÄeno",variant:"default"},opened:{label:"OtevÅeno",variant:"default"},clicked:{label:"OtevÅeno + proklik",variant:"default"},bounced:{label:"NedoruÄeno",variant:"destructive"},complained:{label:"OznaÄeno jako spam",variant:"destructive"}};function Mb({pollId:e,evaluation:n=null,votesClosed:t=!1}){const{toast:s}=oo(),[i,r]=be.useState(!0),[l,o]=be.useState(!1),[u,h]=be.useState(!1),[f,v]=be.useState(null),[w,m]=be.useState([]),[A,y]=be.useState([]),[P,k]=be.useState(""),[G,I]=be.useState(""),[R,Q]=be.useState(null),[me,oe]=be.useState(null),K=be.useCallback(async()=>{r(!0);const[q,L,M]=await Promise.all([Be.from("polls").select("id, title, description, starts_at, ends_at, results_sent_at, posted_on_board_at, removed_from_board_at, board_photo_url, announcement_effective_at, resolution").eq("id",e).maybeSingle(),Be.from("email_history").select("id, recipient, status, sent_at, delivery_status, delivered_at, opened_at, bounced_at, bounce_reason, error_message").eq("related_entity_id",e).eq("template_type","vote_result").order("sent_at",{ascending:!1}),Be.from("poll_result_acknowledgements").select("user_id, acknowledged_at, viewed_at, source").eq("poll_id",e).order("acknowledged_at",{ascending:!1})]),Z=q.data;v(Z),k(cm((Z==null?void 0:Z.posted_on_board_at)??null)),I(cm((Z==null?void 0:Z.removed_from_board_at)??null)),Q((Z==null?void 0:Z.board_photo_url)??null),m(L.data||[]);const ae=M.data||[];if(ae.length>0){const{data:he}=await Be.rpc("admin_get_profiles_by_ids",{_user_ids:ae.map(b=>b.user_id)}),we=new Map((he||[]).map(b=>[b.user_id,b]));ae.forEach(b=>{const W=we.get(b.user_id);b.name=W?[W.first_name,W.last_name].filter(Boolean).join(" ")||W.company_name||W.full_name:b.user_id,b.email=W==null?void 0:W.email})}y(ae),r(!1)},[e]);be.useEffect(()=>{K()},[K]),be.useEffect(()=>{if(!R){oe(null);return}Be.storage.from("vote-evidence").createSignedUrl(R,3600).then(({data:q})=>oe((q==null?void 0:q.signedUrl)??null))},[R]);const H=be.useMemo(()=>{const q=w.length,L=w.filter(he=>he.status==="failed").length,M=w.filter(he=>he.delivery_status==="bounced"||he.delivery_status==="complained").length,Z=w.filter(he=>["delivered","opened","clicked"].includes(he.delivery_status||"")).length,ae=w.filter(he=>["opened","clicked"].includes(he.delivery_status||"")).length;return{total:q,failed:L,bounced:M,delivered:Z,opened:ae,unknown:q-Z-M-L}},[w]),ie=be.useMemo(()=>P?new Date(P):null,[P]),j=be.useMemo(()=>
187{if(!P)return null;const q=Qo(P);return q?gu(q,"ordinary_24").oneMonth:null},[P]),z=async()=>{var M;o(!0);const{data:q}=await Be.auth.getUser(),{error:L}=await Be.from("polls").update({posted_on_board_at:dm(P),removed_from_board_at:dm(G),board_photo_url:R,board_posted_by:((M=q.user)==null?void 0:M.id)??null,announcement_effective_at:ie?ie.toISOString():null}).eq("id",e);if(o(!1),L){s({title:"Uloženà selhalo",description:L.message,variant:"destructive"});return}s({title:"Uloženo",description:"Ãdaje o vyvÄÅ¡enà byly zaznamenány."}),K()},C=async q=>{h(!0);const L=`board/${e}/${Date.now()}-${q.name.replace(/[^\w.\-]+/g,"_")}`,{error:M}=await Be.storage.from("vote-evidence").upload(L,q,{upsert:!0});if(h(!1),M){s({title:"Nahránà selhalo",description:M.message,variant:"destructive"});return}Q(L),s({title:"Foto nahráno",description:"NezapomeÅte uložit."})},$=()=>{const q=["E-mail","Odesláno","Stav odeslánÃ","Stav doruÄenÃ","DoruÄeno","OtevÅeno","Chyba"],L=w.map(he=>{var we;return[he.recipient,Br(he.sent_at),he.status,((we=um[he.delivery_status||""])==null?void 0:we.label)||"Neznámý",Br(he.delivered_at),Br(he.opened_at),he.bounce_reason||he.error_message||""]});L.push([]),L.push(["Evidence zobrazenà výsledku"]),L.push(["VlastnÃk","E-mail","Zobrazeno","Způsob"]),A.forEach(he=>L.push([he.name||he.user_id,he.email||"",Br(he.viewed_at||he.acknowledged_at),he.source==="email"?"Odkaz z e-mailu":"Portál"]));const M=[q,...L].map(he=>he.map(we=>`"${String(we).replace(/"/g,'""')}"`).join(";")).join(` 188`),Z=new Blob(["\uFEFF"+M],{type:"text/csv;charset=utf-8;"}),ae=document.createElement("a");ae.href=URL.createObjectURL(Z),ae.download=`doklad-o-doruceni-${e.slice(0,8)}.csv`,ae.click()};return i?a.jsx("div",{className:"flex justify-center py-12",children:a.jsx(ds,{className:"h-6 w-6 animate-spin"})}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs(ba,{className:"bg-muted/30 border-border/60",children:[a.jsx(_i,{className:"h-4 w-4 text-primary"}),a.jsx(wa,{className:"text-xs",children:"Podle § 24 odst. 5 WEG 2002 se výsledek oznamuje vÅ¡em vlastnÃkům â e-mailem a zároveÅ vyvÄÅ¡enÃm na mÃstÄ v domÄ viditelném pro vÅ¡echny vlastnÃky. Lhůta pro napadenà podle § 24 odst. 6 bÄžà od pozdÄjÅ¡Ãho z obou okamžiků."})]}),(f==null?void 0:f.results_sent_at)&&P&&new Date(f.results_sent_at)<new Date(P)&&a.jsxs(ba,{className:"bg-amber-50 border-amber-200 dark:bg-amber-950/20 dark:border-amber-900/40",children:[a.jsx(_i,{className:"h-4 w-4 text-amber-600 dark:text-amber-400"}),a.jsx(wa,{className:"text-xs text-amber-800 dark:text-amber-200",children:"Das Abstimmungsergebnis wurde bereits über das System versendet, bevor das tatsächliche Anschlagdatum erfasst wurde. Nach Eintragung des Anschlagdatums ist zu prüfen, ob den Wohnungseigentümern der Tag des Anschlags und das daraus berechnete Ende der Anfechtungsfrist ordnungsgemäà mitgeteilt wurden."})]}),a.jsxs(ln,{className:"rounded-xl overflow-hidden",children:[a.jsxs(Nn,{className:"flex-row flex-wrap items-center justify-between gap-2 space-y-0 border-b bg-muted/20 py-3",children:[a.jsxs(Tn,{className:"text-base font-serif flex items-center gap-2",children:[a.jsx(Fm,{className:"h-4 w-4 text-primary"})," VyvÄÅ¡enà na domovnà nástÄnce",a.jsx("span",{className:"font-sans text-xs font-normal text-muted-foreground",children:"(Anschlag)"})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("label",{className:"inline-flex",children:[a.jsx("input",{type:"file",accept:"image/*,application/pdf",className:"hidden",onChange:q=>{var M;const L=(M=q.target.files)==null?void 0:M[0];L&&C(L)}}),a.jsx(pt,{variant:"outline",size:"sm",asChild:!0,className:"h-8 gap-1.5 text-xs",children:a.jsxs("span",{children:[u?a.jsx(ds,{className:"h-3.5 w-3.5 animate-spin"}):a.jsx(eg,{className:"h-3.5 w-3.5"})," Nahrát fotodokumentaci"]})})]}),me&&a.jsxs("a",{href:me,target:"_blank",rel:"noreferrer",className:"text-xs text-primary inline-flex items-center gap-1 underline",children:[a.jsx(tg,{className:"h-3 w-3"})," zobrazit doklad"]})]})]}),a.jsxs(cn,{className:"space-y-5 pt-5",children:[a.jsxs("div",{className:"grid gap-x-8 gap-y-5 sm:grid-cols-2",children:[a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Wn,{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"VyvÄÅ¡eno dne"}),a.jsx(Th,{value:P,onChange:k,placeholder:"Vyberte datum vyvÄÅ¡enÃ"})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Wn,{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Sejmuto dne"}),a.jsx(Th,{value:G,onChange:I,placeholder:"Vyberte datum sejmutÃ"})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Wn,{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Výsledek odeslán e-mailem"}),a.jsx("div",{className:"rounded-lg border bg-muted/30 px-3 py-2 text-sm",children:f!=null&&f.results_sent_at?Br(f.results_sent_at):a.jsx("span",{className:"text-muted-foreground",children:"Dosud neodesláno"})})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Wn,{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Rozhodné datum oznámenà â konec lhůty"}),a.jsxs("div",{className:"rounded-lg border border-primary/20 bg-primary/5 px-3 py-2 text-sm font-medium text-primary",children:[ie?ie.toLocaleDateString("cs-CZ"):"â"," â ",j?new Date(j.year,j.month-1,j.day).toLocaleDateString("cs-CZ"):"â"]})]})]}),a.jsx("div",{className:"flex justify-end border-t pt-4",children:a.jsxs(pt,{size:"sm",onClick:z,disabled:l,className:"gap-1.5 px-6",children:[l?a.jsx(ds,{className:"h-3.5 w-3.5 animate-spin"}):a.jsx(Vd,{className:"h-3.5 w-3.5"})," Uložit zmÄny"]})})]})]}),a.jsx(Ob,{pollId:e,postedOnBoardAt:(f==null?void 0:f.posted_on_board_at)??null,votesClosed:t,evaluation:n,onChanged:K}),a.jsxs(ln,{className:"rounded-xl overflow-hidden",children:[a.jsxs(Nn,{className:"flex-row items-center justify-between space-y-0 border-b bg-muted/20 py-3",children:[a.jsxs(Tn,{className:"text-base font-serif flex items-center gap-2",children:[a.jsx(xr,{className:"h-4 w-4 text-primary"})," Doklad o doruÄenà výsledku"]}),a.jsxs(pt,{variant:"outline",size:"sm",onClick:$,disabled:w.length===0,className:"h-8 gap-1.5 text-xs",children:[a.jsx(el,{className:"h-3.5 w-3.5"})," Export CSV"]})]}),a.jsxs(cn,{className:"space-y-4 pt-5",children:[a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-5 ga
188p-3 text-center",children:[{label:"Odesláno",value:H.total,icon:xr},{label:"DoruÄeno",value:H.delivered,icon:cg},{label:"OtevÅeno",value:H.opened,icon:ll},{label:"NedoruÄeno",value:H.bounced+H.failed,icon:z0},{label:"Bez potvrzenÃ",value:Math.max(H.unknown,0),icon:_i}].map(q=>a.jsxs("div",{className:"rounded-xl border bg-muted/20 p-4",children:[a.jsx("div",{className:"text-2xl font-bold",children:q.value}),a.jsx("div",{className:"mt-1 text-[10px] font-semibold uppercase tracking-widest text-muted-foreground",children:q.label})]},q.label))}),w.length===0?a.jsx("div",{className:"rounded-xl border-2 border-dashed py-10 text-center text-sm italic text-muted-foreground",children:"Výsledek zatÃm nebyl rozeslán."}):a.jsx("div",{className:"border rounded-md overflow-x-auto",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{className:"bg-muted/50",children:[a.jsx(Ze,{className:"h-8 text-xs",children:"PÅÃjemce"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Odesláno"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Stav doruÄenÃ"}),a.jsx(Ze,{className:"h-8 text-xs",children:"DoruÄeno"}),a.jsx(Ze,{className:"h-8 text-xs",children:"OtevÅeno"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Poznámka"})]})}),a.jsx(hi,{children:w.map(q=>{const L=q.status==="failed"?{label:"Chyba odeslánÃ",variant:"destructive"}:um[q.delivery_status||""]||{label:"Bez potvrzenÃ",variant:"outline"};return a.jsxs(Qt,{className:"h-9",children:[a.jsx(Ie,{className:"text-xs",children:q.recipient}),a.jsx(Ie,{className:"text-xs whitespace-nowrap",children:Br(q.sent_at)}),a.jsx(Ie,{children:a.jsx(Ot,{variant:L.variant,className:"text-[10px] whitespace-nowrap",children:L.label})}),a.jsx(Ie,{className:"text-xs whitespace-nowrap",children:Br(q.delivered_at)}),a.jsx(Ie,{className:"text-xs whitespace-nowrap",children:Br(q.opened_at)}),a.jsx(Ie,{className:"text-xs text-muted-foreground",children:q.bounce_reason||q.error_message||""})]},q.id)})})]})}),a.jsx("p",{className:"text-[11px] text-muted-foreground",children:'Stavy âdoruÄeno / otevÅeno / nedoruÄeno" hlásà poskytovatel poÅ¡ty pÅes webhook. Pokud u vÅ¡ech Åádků svÃtà âBez potvrzenÃ", nenà webhook u poskytovatele nastavený.'})]})]})]})}const hm=["Výsledek","VyvÄÅ¡enÃ","DoruÄenÃ","DokonÄeno"];function Qp({steps:e}){return a.jsx("ol",{className:"flex items-center gap-1 sm:gap-2",children:hm.map((n,t)=>{const s=e[t];return a.jsxs("li",{className:"flex flex-1 items-center gap-2 min-w-0",children:[a.jsx("span",{className:Ps("flex h-7 w-7 shrink-0 items-center justify-center rounded-full border text-xs font-semibold",s==="done"&&"border-primary bg-primary text-primary-foreground",s==="active"&&"border-primary text-primary ring-2 ring-primary/20",s==="pending"&&"border-border text-muted-foreground",s==="review"&&"border-destructive bg-destructive/10 text-destructive"),children:s==="done"?a.jsx(qo,{className:"h-3.5 w-3.5"}):s==="review"?a.jsx(Vr,{className:"h-3.5 w-3.5"}):t+1}),a.jsx("span",{className:Ps("truncate text-xs sm:text-sm",s==="active"?"font-semibold":s==="pending"?"text-muted-foreground":"",t!==0&&s!=="active"&&"hidden sm:inline",t===0&&s!=="active"&&"hidden sm:inline"),children:n}),t<hm.length-1&&a.jsx("span",{className:Ps("h-px flex-1",s==="done"?"bg-primary":"bg-border")})]},n)})})}function ur({label:e,value:n,sub:t,tone:s}){return a.jsxs("div",{className:"rounded-xl border bg-card p-3",children:[a.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:e}),a.jsx("div",{className:Ps("mt-1 text-lg font-semibold leading-tight",s==="primary"&&"text-primary",s==="warn"&&"text-destructive"),children:n}),t&&a.jsx("div",{className:"text-xs text-muted-foreground",children:t})]})}function ma({title:e,subtitle:n,action:t,children:s,className:i}){return a.jsxs("section",{className:Ps("rounded-xl border bg-card",i),children:[a.jsxs("header",{className:"flex flex-wrap items-start justify-between gap-2 border-b px-4 py-3",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-serif text-base font-semibold",children:e}),n&&a.jsx("p",{className:"text-xs text-muted-foreground",children:n})]}),t]}),a.jsx("div",{className:"p-4",children:s})]})}const es=e=>e.effective_delivery_method==="postal"||e.postal_fallback_required,zd=e=>es(e)?!!e.postal_dispatched_at||e.status==="postal_dispatched":e.status==="delivered",e1=e=>["hard_bounce","blocked","rejected","soft_bounce"].includes(e.status),Zo=e=>es(e)&&e.postal_address_status==="legal_review_required"?"address_review":e.postal_fallback_required&&!e.postal_dispatched_at?"fallback_pending":!es(e)&&e1(e)?"failed":null;function Tc(e){const n=e.filter(s=>!es(s)),t=e.filter(es);return{total:e.length,electronic:n.length,electronicDone:n.filter(zd).length,postal:t.length,postalDone:t.filter(zd).length,fallback:e.filter(s=>s.postal_fallback_required).length,exceptions:e.filter(s=>Zo(s)!==null).length,done:e.filter(zd).length}}function Rb(e,n,t){if(!e)return[t?"active":"pending","pending","pending","pending"];const s=e.result_status==="legal_review_required"?"review":e.result_status==="pending_review"?"active":"done",i=e.result_status==="adopted";let r;i?e.postings_date_conflict||e.publication_status==="legal_review_required"?r="review":r=e.hausanschlag_date?"done":s==="done"?"active":"pending":r="done";const l=Tc(n);let o;e.completed_at||l.total>0&&l.done===l.total?o="done":r!=="done"?o="pending":o=l.exceptions>0?"review":"active";const u=e.completed_at||e.publication_status==="completed"?"done":o==="done"?"active":"pending";return[s,r,o,u]}function Ib(e,n){if(!e)return["ZveÅejnÄnà jeÅ¡tÄ nebylo zahájeno."];if(e.completed_at||e.publication_status==="completed")return[];const t=[];e.result_status==="adopted"&&!e.hausanschlag_date&&t.push("VyvÄÅ¡enà na nástÄnce nenà potvrzeno."),e.postings_date_conflict&&t.push("MÃsta vyvÄÅ¡enà majà rozdÃlná data â vyžaduje právnà posouzenÃ.");const s=Tc(n),i=s.electronic-s.electronicDone,r=s.postal-s.postalDone;return i>0&&t.push(`${i} elektronických oznámenà zatÃm nenà doruÄeno.`),r>0&&t.push(`${r} poÅ¡tovnÃch zásilek zatÃm nenà oznaÄeno jako odeslané.`),s.exceptions>0&&t.push(`${s.exceptions} vlastnÃků vyžaduje akci.`),t.length===0&&t.push("Äeká se na potvrzenà dokonÄenà serverem."),t}const Kl=e=>Math.round(e).toString().replace(/\B(?=(\d{3})+(?!\d))/g," "),t1={prepared:{label:"Äeká",tone:"wait"},sent:{label:"Odesláno",tone:"neutral"},delivered:{label:"DoruÄeno",tone:"ok"},soft_bounce:{label:"DoÄasnÄ nedoruÄeno",tone:"bad"},hard_bounce:{label:"Selhalo",tone:"bad"},blocked:{label:"Blokováno",tone:"bad"},rejected:{label:"OdmÃtnuto",tone:"bad"},postal_prepared:{label:"PoÅ¡ta pÅipravena",tone:"wait"},postal_dispatched:{label:"PoÅ¡tou odesláno",tone:"ok"}},Bb={address_review:{problem:"Chybà právnà poÅ¡tovnà adresa",step:"Doplnit / právnà posouzenÃ"},fallback_pending:{problem:"E-mail selhal",step:"PoÅ¡tovnà fallback â odeslat poÅ¡tou"},failed:{problem:"NedoruÄeno elektronicky",step:"ProvÄÅit, pÅÃpadnÄ poÅ¡ta"}},Fi=e=>
188e?new Date(e).toLocaleString("cs-CZ",{dateStyle:"short",timeStyle:"short"}):"â";function Fd({d:e}){const n=e.postal_fallback_required&&!e.postal_dispatched_at?{label:"Selhalo â poÅ¡ta",tone:"bad"}:Zo(e)==="address_review"?{label:"Vyžaduje akci",tone:"bad"}:t1[e.status]??{label:e.status,tone:"neutral"};return a.jsx(Ot,{variant:"outline",className:Ps("whitespace-nowrap text-[10px] font-medium",n.tone==="ok"&&"border-primary/30 bg-primary/10 text-primary",n.tone==="bad"&&"border-destructive/30 bg-destructive/10 text-destructive",n.tone==="wait"&&"bg-muted text-muted-foreground"),children:n.label})}function qb({steps:e,rows:n,busy:t,completed:s,canSend:i,alreadySent:r,onBack:l,onSend:o,onMarkDispatched:u,onCheckCompletion:h}){var $,q;const[f,v]=be.useState("all"),[w,m]=be.useState(""),[A,y]=be.useState(null),[P,k]=be.useState(new Set),[G,I]=be.useState({open:!1,rows:[]}),R=Tc(n),Q=n.filter(L=>!es(L)&&L.status==="prepared").length,me=be.useMemo(()=>{const L=w.trim().toLowerCase();return n.filter(M=>f==="electronic"&&es(M)||f==="postal"&&!es(M)||f==="failed"&&!e1(M)&&!M.postal_fallback_required||f==="action"&&Zo(M)===null?!1:L?[M.owner_name,M.owner_units,M.recipient_email].some(Z=>(Z??"").toLowerCase().includes(L)):!0)},[n,f,w]),oe=n.find(L=>L.id===A)??null,K=n.filter(L=>Zo(L)!==null),H=async L=>{const{data:M}=await Be.from("resolution_delivery_events").select("*").eq("delivery_id",L).order("event_at");I({open:!0,rows:M??[]})},ie=()=>{const L=["VlastnÃk","TOP","Kanál","Stav","Adresa","Odesláno","DoruÄeno","PoÅ¡tou odesláno"],M=n.map(he=>{var we;return[he.owner_name,he.owner_units,es(he)?"PoÅ¡ta":"Elektronicky",((we=t1[he.status])==null?void 0:we.label)??he.status,es(he)?he.postal_address_snapshot:he.recipient_email,Fi(he.sent_at),Fi(he.delivered_at),Fi(he.postal_dispatched_at)].map(b=>`"${String(b??"").replace(/"/g,'""')}"`).join(";")}),Z=new Blob(["\uFEFF"+[L.join(";"),...M].join(` 189`)],{type:"text/csv;charset=utf-8"}),ae=document.createElement("a");ae.href=URL.createObjectURL(Z),ae.download="doruceni-vysledku.csv",ae.click()},j=(L,M)=>{const Z=new Set(P);M?Z.add(L):Z.delete(L),k(Z)},z=L=>es(L)&&!L.postal_dispatched_at,C=[["all","VÅ¡e"],["electronic","Elektronicky"],["postal","PoÅ¡tou"],["failed","Selhalo"],["action","Äeká na akci"]];return a.jsxs("div",{className:"space-y-6 pb-24",children:[a.jsxs("div",{className:"space-y-4",children:[a.jsxs(pt,{variant:"ghost",size:"sm",onClick:l,className:"-ml-2 gap-1.5 text-xs",children:[a.jsx(Mm,{className:"h-3.5 w-3.5"})," ZpÄt na pÅehled"]}),a.jsxs("div",{children:[a.jsx("h2",{className:"font-serif text-xl font-semibold",children:"DoruÄenà výsledku"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Sledujte stav doruÄenà výsledku vÅ¡em vlastnÃkům a ÅeÅ¡te pouze výjimky."})]}),a.jsx(Qp,{steps:e})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-5",children:[a.jsx(ur,{label:"VlastnÃci",value:R.total}),a.jsx(ur,{label:"Elektronicky",value:R.electronic}),a.jsx(ur,{label:"PoÅ¡tou",value:R.postal}),a.jsx(ur,{label:"Výjimky",value:R.exceptions,tone:R.exceptions?"warn":void 0}),a.jsx(ur,{label:"DokonÄeno",value:R.done,tone:"primary"})]}),a.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_320px]",children:[a.jsxs("div",{className:"space-y-3 min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("div",{className:"flex flex-wrap gap-1 rounded-lg border bg-muted/30 p-0.5",children:C.map(([L,M])=>a.jsx("button",{onClick:()=>v(L),className:Ps("rounded-md px-2.5 py-1 text-xs",f===L?"bg-background font-semibold shadow-sm":"text-muted-foreground hover:text-foreground"),children:M},L))}),a.jsxs("div",{className:"relative flex-1 min-w-[180px]",children:[a.jsx(ng,{className:"absolute left-2.5 top-2 h-3.5 w-3.5 text-muted-foreground"}),a.jsx(Jo,{value:w,onChange:L=>m(L.target.value),placeholder:"Hledat vlastnÃka, e-mail nebo TOPâ¦",className:"h-8 pl-8 text-xs"})]}),r&&a.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Výsledek už byl vlastnÃkům odeslán â opÄtovné odeslánà je zablokováno."}),Q>0&&!r&&a.jsxs(pt,{size:"sm",onClick:o,disabled:t||!i,className:"h-8 text-xs",children:["Odeslat pÅipravená oznámenà (",Q,")"]})]}),a.jsx("div",{className:"hidden overflow-x-auto rounded-xl border md:block",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{className:"bg-muted/50",children:[a.jsx(Ze,{className:"h-8 w-8"}),a.jsx(Ze,{className:"h-8 font-serif text-xs",children:"VlastnÃk"}),a.jsx(Ze,{className:"h-8 font-serif text-xs",children:"TOP"}),a.jsx(Ze,{className:"h-8 font-serif text-xs",children:"Kanál"}),a.jsx(Ze,{className:"h-8 font-serif text-xs",children:"Stav"}),a.jsx(Ze,{className:"h-8 font-serif text-xs",children:"Odesláno"}),a.jsx(Ze,{className:"h-8 font-serif text-xs",children:"DoruÄeno"}),a.jsx(Ze,{className:"h-8 font-serif text-xs text-right",children:"Akce"})]})}),a.jsxs(hi,{children:[me.map(L=>a.jsxs(Qt,{className:Ps("h-9 cursor-pointer",A===L.id&&"bg-primary/5"),onClick:()=>y(L.id),children:[a.jsx(Ie,{className:"py-1",onClick:M=>M.stopPropagation(),children:z(L)&&a.jsx(Wd,{checked:P.has(L.id),onCheckedChange:M=>j(L.id,!!M)})}),a.jsx(Ie,{className:"py-1 text-xs font-medium",children:L.owner_name}),a.jsx(Ie,{className:"py-1 text-xs whitespace-nowrap",children:L.owner_units||"â"}),a.jsx(Ie,{className:"py-1 text-xs",children:es(L)?"PoÅ¡ta":"E-mail"}),a.jsx(Ie,{className:"py-1",children:a.jsx(Fd,{d:L})}),a.jsx(Ie,{className:"py-1 text-xs whitespace-nowrap",children:Fi(es(L)?L.postal_dispatched_at:L.sent_at)}),a.jsx(Ie,{className:"py-1 text-xs whitespace-nowrap",children:es(L)?"â":Fi(L.delivered_at)}),a.jsx(Ie,{className:"py-1 text-right",children:a.jsx(pt,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:M=>{M.stopPropagation(),y(L.id)},children:"Detail"})})]},L.id)),me.length===0&&a.jsx(Qt,{children:a.jsx(Ie,{colSpan:8,className:"py-8 text-center text-xs text-muted-foreground",children:"Žádnà vlastnÃci pro tento filtr."})})]})]})}),a.jsx("div",{className:"space-y-2 md:hidden",children:me.map(L=>a.jsx("button",{onClick:()=>y(L.id),className:Ps("w-full rounded-xl border bg-card p-3 text-left",A===L.id&&"border-primary"),children:a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium",children:L.owner_name}),a.jsxs("div",{className:"text-xs text-muted-foreground",children:["TOP ",L.owner_units||"â"," · ",es(L)?"PoÅ¡ta":"E-mail"]})]}),a.jsx(Fd,{d:L})]})},L.id))})]}),a.jsxs("aside",{className:"space-y-4 lg:sticky lg:top-4 lg:self-start",children:[a.jsx(ma,{title:"Vybraný vlastnÃk",children:oe?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-xs",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Jméno"}),a.jsx("dd",{className:"font-medium",children:oe.owner_name}),a.jsx("dt",{className:"text-muted-foreground",children:"TOP"}),a.jsx("dd",{children:oe.owner_units||"â"}),a.jsx("dt",{className:"text-muted-foreground",children:es(oe)?"Adresa":"E-mail"}),a.jsx("dd",{className:"whitespace-pre-line break-words",children:es(oe)?oe.postal_address_snapshot??"â":oe.recipient_email??"â"}),a.jsx("dt",{className:"text-muted-foreground",children:"Zvolený způsob"}),a.jsx("dd",{children:(($=oe.preference_snapshot)==null?void 0:$.method)==="electronic"?"Elektronicky":((q=oe.preference_snapshot)==null?void 0:q.method)==="postal"?"PoÅ¡tou":"Nezvoleno"}),a.jsx("dt",{className:"text-muted-foreground",children:"Efektivnà způsob"}),a.jsx("dd",{children:es(oe)?"PoÅ¡tou":"Elektronicky"}),a.jsx("dt",{className:"text-muted-foreground",children:"Stav"}),a.jsx("dd",{children:a.jsx(Fd,{d:oe})}),oe.provider_status&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{className:"text-muted-foreground",children:"Poskytovatel"}),a.jsx("dd",{children:oe.provider_status})]}),a.jsx("dt",{className:"text-muted-foreground",children:"Odesláno"}),a.jsx("dd",{children:Fi(oe.sent_at)}),a.jsx("dt",{className:"text-muted-foreground",children:"DoruÄeno"}),a.jsx("dd",{children:Fi(oe.delivered_at)}),oe.postal_fallback_required&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{className:"text-muted-foreground",children:"Fallback"}),a.jsxs("dd",{children:["PoÅ¡tou ",oe.postal_dispatched_at?`odesláno ${Fi(oe.postal_dispatched_at)}`:"â Äeká"]})]})]}),oe.opened_at&&a.jsxs("p",{className:"rounded-md bg-muted/40 px-2 py-1.5 text-[11px] text-muted-foreground",children:["OtevÅeno: ",Fi(oe.opened_at)," â pouze informativnà údaj. OtevÅenà nemá vliv na právnà doruÄenà ani na dokonÄenÃ."]}),a.jsxs(pt,{variant:"outline",size:"sm",className:"h-8 w-full gap-1.5 text-xs",onClick:()=>H(oe.id),children:[a.jsx(fc,{className:"h-3.5 w-3.5"})," Zobrazit audit"]})]}):a.jsx("p",{className:"text-xs text-muted-foreground",children:"Vyberte vlastnÃka v tabulce."})}),a.jsx(ma,{title:"Výjimky",subtitle:K.length?`${K.length} vyžaduje akci`:void 0,children:K.length===0?a.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[a.jsx(pa,{className:"h-3.5 w-3.5 text-primary"})," Žádné výjimky."]}):a.jsx("ul",{className:"space-y-2",children:K.map(L=>{const M=Bb[Zo(L)];return a.jsx("li",{children:a.jsxs("button",{onClick:()=>y(L.id),className:"w-full rounded-lg border px-2.5 py-2 text-left hover:bg-muted/40",children:[a.jsxs("div",{className:"text-xs font-medium",children:[L.owner_name," ",a.jsxs("span",{className:"text-muted-foreground",children:["· ",L.owner_units]})]}),a.jsx("div",{className:"text-[11px] text-destructive",children:M.problem}),a.jsxs("div",{className:"text-[11px] text-muted-foreground",children:["â ",M.step]})]})},L.id)})})})]})]}),a.jsxs("div",{className:"sticky bottom-0 z-10 -mx-1 flex flex-wrap items-center justify-between gap-3 rounded-xl border bg-card/95 px-4 py-3 shadow-sm backdrop-blur",children:[a.jsx("div",{className:"text-xs",children:s?a.jsx("span",{className:"font-semibold text-primary",children:"ZveÅejnÄnà dokonÄeno â"}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"font-semibold",children:"ZveÅejnÄnà Äeká na dokonÄenÃ"}),a.jsx("div",{className:"text-muted-foreground",children:"Po doruÄenà výsledku vÅ¡em vlastnÃkům se proces uzavÅe."})]})}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[P.size>0&&a.jsxs(pt,{size:"sm",variant:"outline",className:"h-8 gap-1.5 text-xs",disabled:t,onClick:()=>{u([...P]),k(new Set)},children:[a.jsx(dg,{className:"h-3.5 w-3.5"})," OznaÄit ",P.size," jako odeslané poÅ¡tou"]}),a.jsxs(pt,{size:"sm",variant:"outline",className:"h-8 gap-1.5 text-xs",onClick:ie,disabled:n.length===0,children:[a.jsx(el,{className:"h-3.5 w-3.5"})," Export CSV"]}),!s&&a.jsxs(pt,{size:"sm",className:"h-8 gap-1.5 text-xs",onClick:h,children:[a.jsx(gc,{className:"h-3.5 w-3.5"})," Zkontrolovat dokonÄenÃ"]})]})]}),a.jsx(fr,{open:G.open,onOpenChange:L=>I(M=>({...M,open:L})),children:a.jsxs(mr,{className:"max-w-lg",children:[a.jsx(pr,{children:a.jsx(gr,{children:"Audit doruÄenÃ"})}),G.rows.length===0?a.jsx("p",{className:"text-sm text-muted-foreground",children:"Žádné události."}):a.jsx("ol",{className:"max-h-[60vh] space-y-2 overflow-auto text-xs",children:G.rows.map(L=>{var M;return a.jsxs("li",{className:"rounded-md border px-3 py-2",children:[a.jsx("div",{className:"font-medium",children:L.event_type??L.status??"událost"}),a.jsx("div",{className:"text-muted-foreground",children:Fi(L.event_at)}),((M=L.metadata)==null?void 0:M.detail)&&a.jsx("div",{className:"mt-1 break-words",children:String(L.metadata.detail)})]},L.id)})})]})})]})}const Wb={pending_review:"Äeká na posouzenÃ",adopted:"PÅijato",not_adopted:"NepÅijato",legal_review_required:"Právnà posouzenÃ"},Ub={ordinary_administration:"Åádná správa · § 28 WEG 2002",extraordinary_29:"MimoÅádná správa · § 29 WEG 2002",extraordinary_administration_29:"MimoÅádná správa · § 29 WEG 2002",other:"Jiné",legal_review_required:"Vyžaduje právnà posouzenÃ"}
189,fm={absolute:"Absolutnà vÄtÅ¡ina vÅ¡ech podÃlů (§ 24 odst. 4)",qualified:"2/3 odevzdaných + min. 1/3 vÅ¡ech podÃlů (§ 24 odst. 4)",unanimous:"Jednomyslnost"},Od=e=>e?ni(Qo(e)):"â";function Vb({pollId:e,votesClosed:n,legalCategory:t,pollEndsAt:s,boardTools:i}){const{toast:r}=oo(),[l,o]=be.useState(!0),[u,h]=be.useState(!1),[f,v]=be.useState(null),[w,m]=be.useState([]),[A,y]=be.useState([]),[P,k]=be.useState(null),[G,I]=be.useState(null),[R,Q]=be.useState(""),[me,oe]=be.useState(""),[K,H]=be.useState("overview"),[ie,j]=be.useState(!1),[z,C]=be.useState(!1),[$,q]=be.useState(!1),[L,M]=be.useState({count:0,at:null}),Z=be.useCallback(async()=>{var nt;o(!0);const[{data:xe},{data:De}]=await Promise.all([Be.from("resolution_publications").select("*").eq("poll_id",e).maybeSingle(),Be.from("polls").select("resolution, title").eq("id",e).maybeSingle()]),{data:it,count:lt}=await Be.from("email_history").select("sent_at",{count:"exact"}).eq("related_entity_id",e).in("template_type",["vote_result","resolution_notice"]).eq("status","sent").order("sent_at",{ascending:!1}).limit(1);if(M({count:lt??0,at:((nt=it==null?void 0:it[0])==null?void 0:nt.sent_at)??null}),I((De==null?void 0:De.resolution)||(De==null?void 0:De.title)||null),v(xe),xe){const[{data:gt},{data:xt},{data:Je}]=await Promise.all([Be.from("resolution_postings").select("id, location_name, posted_at").eq("publication_id",xe.id).order("created_at"),Be.from("resolution_deliveries").select("*").eq("publication_id",xe.id).order("prepared_at"),Be.from("poll_evaluation_snapshots").select("totals, majority_path, evaluated_at, algorithm_version").eq("id",xe.result_snapshot_id).maybeSingle()]);m(gt??[]),k(Je);const ht=xt??[],Xe=ht.map(Yt=>Yt.owner_contact_id);if(Xe.length>0){const Yt=ht.map(Ge=>Ge.provider_message_id).filter(Boolean),[{data:Mt},{data:vt},{data:ft}]=await Promise.all([Be.from("owner_contacts").select("id, first_name, last_name, company_name").in("id",Xe),Be.from("apartment_owners").select("owner_contact_id, apartments(code)").in("owner_contact_id",Xe),Yt.length?Be.from("email_history").select("provider_message_id, opened_at").in("provider_message_id",Yt):Promise.resolve({data:[]})]),kt=new Map((Mt??[]).map(Ge=>[Ge.id,[Ge.first_name,Ge.last_name].filter(Boolean).join(" ")||Ge.company_name||"â"])),Ke=new Map;(vt??[]).forEach(Ge=>{var _t;const qe=(_t=Ge.apartments)==null?void 0:_t.code;qe&&Ke.set(Ge.owner_contact_id,[...Ke.get(Ge.owner_contact_id)??[],qe])});const yt=new Map((ft??[]).map(Ge=>[Ge.provider_message_id,Ge.opened_at]));ht.forEach(Ge=>{Ge.owner_name=kt.get(Ge.owner_contact_id)??"â",Ge.owner_units=[...new Set(Ke.get(Ge.owner_contact_id)??[])].sort().join(", "),Ge.opened_at=Ge.provider_message_id?yt.get(Ge.provider_message_id)??null:null})}y(ht)}o(!1)},[e]);be.useEffect(()=>{Z()},[Z]);const ae=async xe=>{h(!0);try{await xe(),await Z()}catch(De){r({title:"Chyba",description:(De==null?void 0:De.message)??String(De),variant:"destructive"})}finally{h(!1)}},he=()=>ae(async()=>{const{error:xe}=await Be.rpc("start_resolution_publication",{_poll_id:e});if(xe)throw xe;r({title:"ZveÅejnÄnà zahájeno"})}),we=()=>ae(async()=>{if(!f)return;const{error:xe}=await Be.rpc("record_resolution_posting",{_publication_id:f.id,_location_name:R,_posted_at:me||null,_note:null,_evidence:null});if(xe)throw xe;Q(""),oe("")}),b=()=>ae(async()=>{if(!f)return;const{error:xe}=await Be.rpc("finalize_hausanschlag",{_publication_id:f.id});if(xe)throw xe;r({title:"VyvÄÅ¡enà uloženo",description:"Lhůty byly vypoÄteny od data vyvÄÅ¡enÃ."})}),W=()=>ae(async()=>{if(!f)return;const{data:xe,error:De}=await Be.functions.invoke("send-resolution-notices",{body:{publication_id:f.id}});if(De)throw De;r({title:"Oznámenà odeslána",description:`Odesláno: ${(xe==null?void 0:xe.sent)??0}, selhalo: ${(xe==null?void 0:xe.failed)??0}`})}),D=xe=>ae(async()=>{const{error:De}=await Be.rpc("mark_postal_dispatched",{_delivery_ids:xe});if(De)throw De;r({title:"PoÅ¡tovnà zásilky oznaÄeny jako odeslané"})}),X=be.useMemo(()=>Rb(f,A,n),[f,A,n]),Y=Tc(A),te=!!f&&(!!f.completed_at||f.publication_status==="completed"),ue=Ib(f,A),ge=new Set(w.filter(xe=>xe.posted_at).map(xe=>xe.posted_at)).size<=1,se=L.count>0,ve=!!f&&!se&&!(f.result_status==="adopted"&&!f.hausanschlag_date),Ae=be.useMemo(()=>
189{if(!(f!=null&&f.hausanschlag_date))return null;const xe=Qo(f.hausanschlag_date);if(!xe)return null;const De=f.challenge_deadline_override?Qo(f.challenge_deadline_override):Sh(xe,1),it=t==="extraordinary_29"?Sh(xe,3):null;return{oneMonth:ni(De),threeMonths:it?ni(it):null,finalDate:it??De}},[f,t]),[Pe,He]=be.useState(()=>Date.now());be.useEffect(()=>{const xe=setInterval(()=>He(Date.now()),3e4);return()=>clearInterval(xe)},[]);const F=be.useMemo(()=>{if(!Ae||te)return null;const xe=Ae.finalDate,it=new Date(xe.year,xe.month-1,xe.day,23,59,59,999).getTime()-Pe,lt=Math.abs(it),nt=Math.floor(lt/864e5),gt=Math.floor(lt%864e5/36e5),xt=Math.floor(lt%36e5/6e4);return{date:ni(Ae.finalDate),days:nt,hours:gt,minutes:xt,overdue:it<0}},[Ae,te,Pe]),ze=be.useMemo(()=>n?se?{problem:`Výsledek už byl vlastnÃkům odeslán e-mailem (${L.count}Ã${L.at?", "+new Date(L.at).toLocaleDateString("cs-CZ"):""}).`,consequence:"OpÄtovné odeslánà je zablokováno â vlastnÃkům se nic dalÅ¡Ãho nepoÅ¡le."}:f!=null&&f.postings_date_conflict?{problem:"MÃsta vyvÄÅ¡enà majà rozdÃlná data.",consequence:"Lhůty nebyly finalizovány â vyžaduje právnà posouzenÃ."}:s&&!te&&Date.now()-new Date(s).getTime()>7*864e5?{problem:"ZveÅejnÄnà Äeká déle než 7 dnà od uzávÄrky.",consequence:"Výsledek má být zveÅejnÄn bez zbyteÄného odkladu."}:Y.exceptions>0?{problem:`${Y.exceptions} vlastnÃci vyžadujà akci pÅed dokonÄenÃm doruÄenÃ.`,consequence:"Bez vyÅeÅ¡enà nelze proces dokonÄit.",action:()=>H("delivery")}:null:null,[n,f,s,te,Y.exceptions,se,L]);if(l)return a.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-muted-foreground",children:[a.jsx(ds,{className:"h-4 w-4 animate-spin"})," NaÄÃtám stav zveÅejnÄnÃâ¦"]});if(K==="delivery"&&f)return a.jsxs(a.Fragment,{children:[a.jsx(qb,{steps:X,rows:A,busy:u,completed:te,canSend:ve,alreadySent:se,onBack:()=>H("overview"),onSend:W,onMarkDispatched:D,onCheckCompletion:()=>q(!0)}),a.jsx(mm,{open:$,onOpenChange:q,missing:ue,completed:te})]});const Ye=(P==null?void 0:P.totals)??{},Me=Number(Ye.totalWeg??0),ce=[{k:"ANO",v:Number(Ye.yesWeg??0),c:"bg-primary"},{k:"NE",v:Number(Ye.noWeg??0),c:"bg-destructive"},{k:"Zdržel se",v:Number(Ye.abstainWeg??0),c:"bg-muted-foreground"},{k:"Bez odpovÄdi",v:Math.max(Me-Number(Ye.castWeg??0),0),c:"bg-muted"}],Se=[{label:"Hlasovánà uzavÅeno",done:n},{label:"Výsledek zmrazen",done:!!f},{label:"VyvÄÅ¡enà zaznamenáno",done:!!(f!=null&&f.hausanschlag_date)||!!f&&f.result_status!=="adopted"},{label:"DoruÄenà vlastnÃkům",done:X[2]==="done"},{label:"ZveÅejnÄnà dokonÄeno",done:te}],Te=Se.findIndex(xe=>!xe.done);return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-serif text-xl font-semibold",children:"Výsledek a zveÅejnÄnÃ"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"PÅehled výsledku hlasovánà a kroky pro jeho zveÅejnÄnà a doruÄenà vlastnÃkům."})]}),a.jsx(Qp,{steps:X})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[a.jsx(ur,{label:"UzávÄrka",value:s?new Date(s).toLocaleDateString("de-AT"):"â",sub:s?new Date(s).toLocaleTimeString("de-AT",{hour:"2-digit",minute:"2-digit"}):void 0}),a.jsx(ur,{label:"Výsledek",value:f?Wb[f.result_status]??f.result_status:"â",tone:(f==null?void 0:f.result_status)==="adopted"?"primary":(f==null?void 0:f.result_status)==="legal_review_required"?"warn":void 0,sub:Ye.eligibleUnits?`${Ye.votedUnits??0} / ${Ye.eligibleUnits} jednotek hlasovalo`:void 0}),a.jsx(ur,{label:"Hausanschlag",value:f!=null&&f.hausanschlag_date?Od(f.hausanschlag_date):"â",sub:f!=null&&f.hausanschlag_date?"VyvÄÅ¡eno":(f==null?void 0:f.result_status)==="adopted"?"Äeká na vyvÄÅ¡enÃ":void 0}),a.jsx(ur,{label:"Konec lhůty",value:(Ae==null?void 0:Ae.oneMonth)??"â",sub:Ae?Ae.threeMonths?`§ 24 odst. 6 · § 29: ${Ae.threeMonths}`:"§ 24 odst. 6":void 0}),F&&a.jsxs("div",{className:Ps("col-span-2 lg:col-span-4 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-xl border px-4 py-2.5 text-sm",F.overdue?"border-destructive/30 bg-destructive/5":"border-primary/25 bg-primary/5"),children:[a.jsx("span",{className:"font-medium",children:F.overdue?"Lhůta pro dokonÄenà vyprÅ¡ela":`Proces se dokonÄà ${F.date}`}),a.jsx("span",{className:Ps("tabular-nums font-semibold",F.overdue?"text-destructive":"text-primary"),children:F.overdue?`o ${F.days} dnà ${F.hours} h ${F.minutes} min`:`zbývá ${F.days} dnà ${F.hours} h ${F.minutes} min`}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Po uplynutà lhůty a kompletnÃm doruÄenà se zveÅejnÄnà oznaÄà jako dokonÄené."})]})]}),ze&&a.jsxs("div",{className:"flex flex-wrap items-center gap-3 rounded-xl border border-destructive/30 bg-destructive/5 px-4 py-2.5 text-sm",children:[a.jsx(Vr,{className:"h-4 w-4 shrink-0 text-destructive"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("span",{className:"font-medium",children:ze.problem})," ",a.jsx("span",{className:"text-muted-foreground",children:ze.consequence})]}),ze.action&&a.jsx(pt,{size:"sm",variant:"outline",className:"h-7 text-xs",onClick:ze.action,children:"Zobrazit"})]}),a.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_280px]",children:[a.jsx("div",{className:"space-y-6 min-w-0",children:f?a.jsxs(a.Fragment,{children:[a.jsx(ma,{title:"Finálnà výsledek",subtitle:"Zmrazený výsledek po uzávÄrce hlasovánÃ.",action:a.jsxs(Ot,{variant:"outline",className:"gap-1 text-[10px]",children:[a.jsx(ig,{className:"h-3 w-3"})," Zmrazeno"]}),children:a.jsxs("div",{className:"space-y-4",children:[G&&a.jsx("blockquote",{className:"border-l-2 border-primary/40 pl-3 font-serif text-sm",children:G}),Me>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:"flex h-2.5 overflow-hidden rounded-full bg-muted",children:ce.map(xe=>a.jsx("div",{className:xe.c,style:{width:`${xe.v/Me*100}%`}},xe.k))}),a.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs sm:grid-cols-4",children:ce.map(xe=>a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:Ps("h-2 w-2 rounded-full",xe.c)}),a.jsx("span",{className:"text-muted-foreground",children:xe.k}),a.jsx("span",{className:"ml-auto font-medium tabular-nums",children:Kl(xe.v)})]},xe.k))})]}),a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-muted-foreground",children:[a.jsx("span",{children:P!=null&&P.majority_path?fm[P.majority_path]??P.majority_path:"Pravidlo vÄtÅ¡iny â"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(pt,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:()=>j(!0),children:[a.jsx($d,{className:"h-3.5 w-3.5"})," Zobrazit snapshot výsledku"]}),a.jsxs(pt,{variant:"ghost",size:"sm",className:"h-7 gap-1 text-xs",onClick:()=>C(!0),children:[a.jsx(ll,{className:"h-3.5 w-3.5"})," Náhled oznámenÃ"]})]})]})]})}),f.result_status==="adopted"&&a.jsx(ma,{title:"VyvÄÅ¡enà na domovnà nástÄnce",subtitle:"Evidence skuteÄného vyvÄÅ¡enà a výpoÄet zákonných lhůt.",children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 sm:grid-cols-3",children:[a.jsxs("div",{children:[a.jsx(Wn,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Datum vyvÄÅ¡enÃ"}),a.jsx("div",{className:"mt-1 text-sm font-medium",children:f.hausanschlag_date?Od(f.hausanschlag_date):"Nepotvrzeno"})]}),a.jsxs("div",{children:[a.jsx(Wn,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Právnà kategorie"}),a.jsx("div",{className:"mt-1 text-sm",children:t?Ub[t]??t:"â"})]}),a.jsxs("div",{children:[a.jsx(Wn,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Konec lhůty"}),a.jsxs("div",{className:"mt-1 text-sm font-medium text-primary",children:[(Ae==null?void 0:Ae.oneMonth)??"â"," ",a.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:"§ 24 odst. 6"})]})]})]}),w.length>0&&a.jsx("ul",{className:"space-y-1 text-sm",children:w.map(xe=>a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx(pa,{className:"h-3.5 w-3.5 text-primary"})," ",xe.location_name,a.jsxs("span",{className:"text-muted-foreground",children:["â ",xe.posted_at?Od(xe.posted_at):"bez data"]})]},xe.id))}),!f.hausanschlag_date&&a.jsxs("div",{className:"flex flex-wrap items-end gap-2 border-t pt-3",children:[a.jsxs("div",{children:[a.jsx(Wn,{className:"text-xs",children:"MÃsto vyvÄÅ¡enÃ"}),a.jsx(Jo,{value:R,onChange:xe=>Q(xe.target.value),placeholder:"napÅ. NástÄnka pÅÃzemÃ",className:"h-8 w-52"})]}),a.jsxs("div",{children:[a.jsx(Wn,{className:"text-xs",children:"Datum"}),a.jsx(Jo,{type:"date",value:me,onChange:xe=>oe(xe.target.value),className:"h-8 w-40"})]}),a.jsx(pt,{size:"sm",variant:"outline",onClick:we,disabled:u||!R.trim()||!me,children:"PÅidat mÃsto"}),a.jsx(pt,{size:"sm",onClick:b,disabled:u||w.length===0||!ge,className:"ml-auto",children:"Uložit vyvÄÅ¡enÃ"})]}
189),i&&a.jsxs(Ro,{children:[a.jsx(Io,{asChild:!0,children:a.jsxs(pt,{variant:"ghost",size:"sm",className:"h-7 gap-1 px-2 text-xs text-muted-foreground",children:[a.jsx(tc,{className:"h-3.5 w-3.5"})," VývÄska A4 (Kundmachung) a fotodokumentace"]})}),a.jsx(Bo,{className:"pt-3",children:i})]})]})}),a.jsx(ma,{title:"DoruÄenà vlastnÃkům",action:a.jsx(pt,{size:"sm",onClick:()=>H("delivery"),disabled:A.length===0,children:"OtevÅÃt detail doruÄenÃ"}),children:A.length===0?a.jsx("p",{className:"text-sm text-muted-foreground",children:"Oznámenà zatÃm nejsou pÅipravena."}):a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[a.jsxs("div",{className:"rounded-lg border p-3",children:[a.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[a.jsx(xr,{className:"h-3.5 w-3.5"})," Elektronicky"]}),a.jsxs("div",{className:"mt-1 text-2xl font-semibold tabular-nums",children:[Y.electronicDone," / ",Y.electronic]}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"doruÄeno"}),Y.exceptions>0&&a.jsxs("div",{className:"mt-1 text-xs font-medium text-destructive",children:[Y.exceptions," vyžadujà akci"]})]}),a.jsxs("div",{className:"rounded-lg border p-3",children:[a.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[a.jsx(ug,{className:"h-3.5 w-3.5"})," PoÅ¡tou"]}),a.jsxs("div",{className:"mt-1 text-2xl font-semibold tabular-nums",children:[Y.postalDone," / ",Y.postal]}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"odesláno"})]})]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Fallback po selhánà e-mailu: ",Y.fallback]})]})})]}):a.jsxs(ma,{title:"Zahájit zveÅejnÄnÃ",subtitle:"Po uzávÄrce zmrazà výsledek a pÅipravà oznámenà vlastnÃkům.",children:[a.jsxs(pt,{onClick:he,disabled:u||!n,children:[u?a.jsx(ds,{className:"mr-2 h-4 w-4 animate-spin"}):a.jsx(sg,{className:"mr-2 h-4 w-4"})," Spustit zveÅejnÄnÃ"]}),!n&&a.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"Hlasovánà jeÅ¡tÄ neskonÄilo."})]})}),a.jsx("aside",{className:"lg:sticky lg:top-4 lg:self-start",children:a.jsxs(ma,{title:"Dalšà kroky",children:[a.jsx("ol",{className:"space-y-2.5",children:Se.map((xe,De)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[xe.done?a.jsx(pa,{className:"mt-0.5 h-4 w-4 text-primary"}):De===Te?a.jsx("span",{className:"mt-0.5 flex h-4 w-4 items-center justify-center rounded-full border-2 border-primary text-[9px] font-bold text-primary",children:De+1}):a.jsx(Om,{className:"mt-0.5 h-4 w-4 text-muted-foreground/40"}),a.jsxs("div",{children:[a.jsx("div",{className:Ps(xe.done?"text-muted-foreground":De===Te?"font-semibold":"text-muted-foreground"),children:xe.label}),De===Te&&a.jsx("div",{className:"text-xs text-primary",children:"ProbÃhá"})]})]},xe.label))}),a.jsx("div",{className:"mt-4 border-t pt-3",children:te?a.jsx("div",{className:"text-sm font-semibold text-primary",children:"ZveÅejnÄnà dokonÄeno â"}):a.jsxs(pt,{size:"sm",variant:"outline",className:"w-full gap-1.5",onClick:()=>q(!0),children:[a.jsx(gc,{className:"h-4 w-4"})," Zkontrolovat dokonÄenÃ"]})})]})})]}),a.jsx(fr,{open:ie,onOpenChange:j,children:a.jsxs(mr,{className:"max-w-md",children:[a.jsxs(pr,{children:[a.jsx(gr,{children:"Snapshot výsledku"}),a.jsx(Xo,{children:"NemÄnný záznam vyhodnocenà v okamžiku zahájenà zveÅejnÄnÃ."})]}),P?a.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 text-sm",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Vyhodnoceno"}),a.jsx("dd",{children:P.evaluated_at?new Date(P.evaluated_at).toLocaleString("de-AT"):"â"}),a.jsx("dt",{className:"text-muted-foreground",children:"Verze výpoÄtu"}),a.jsx("dd",{children:P.algorithm_version??"â"}),a.jsx("dt",{className:"text-muted-foreground",children:"Cesta k vÄtÅ¡inÄ"}),a.jsx("dd",{children:fm[P.majority_path]??P.majority_path??"â"}),a.jsx("dt",{className:"text-muted-foreground",children:"VÅ¡echny podÃly"}),a.jsx("dd",{className:"tabular-nums",children:Kl(Me)}),a.jsx("dt",{className:"text-muted-foreground",children:"Odevzdáno"}),a.jsx("dd",{className:"tabular-nums",children:Kl(Number(Ye.castWeg??0))}),ce.map(xe=>a.jsxs(be.Fragment,{children:[a.jsx("dt",{className:"text-muted-foreground",children:xe.k}),a.jsx("dd",{className:"tabular-nums",children:Kl(xe.v)})]},xe.k)),a.jsx("dt",{className:"text-muted-foreground",children:"Jednotky"}),a.jsxs("dd",{children:[Ye.votedUnits??0," / ",Ye.eligibleUnits??0]})]}):a.jsx("p",{className:"text-sm text-muted-foreground",children:"Snapshot nenà k dispozici."})]})}),a.jsx(F0,{open:z,onOpenChange:C,pollId:e}),a.jsx(mm,{open:$,onOpenChange:q,missing:ue,completed:te})]})}function mm({open:e,onOpenChange:n,missing:t,completed:s}){return a.jsx(fr,{open:e,onOpenChange:n,children:a.jsxs(mr,{className:"max-w-md",children:[a.jsxs(pr,{children:[a.jsx(gr,{children:s?"ZveÅejnÄnà dokonÄeno â":"Kontrola dokonÄenÃ"}),a.jsx(Xo,{children:"O dokonÄenà rozhoduje server automaticky podle stávajÃcÃch pravidel. Tato kontrola nic nemÄnÃ."})]}),!s&&a.jsx("ul",{className:"space-y-1.5 text-sm",children:t.map(i=>a.jsxs("li",{className:"flex gap-2",children:[a.jsx(Om,{className:"mt-1 h-3 w-3 shrink-0 text-muted-foreground"}),i]},i))})]})})}const yi=e=>
189e?new Date(e).toLocaleString("cs-CZ"):"â";function pm(e){const n=new Map;return e.forEach(t=>{const s=n.get(t.user_id)||[];s.push(t),n.set(t.user_id,s)}),Array.from(n.entries()).map(([t,s])=>{const i=[...s].sort((r,l)=>+new Date(r.viewed_at)-+new Date(l.viewed_at));return{user_id:t,name:i[0].name||t,email:i[0].email||"",first:i[0],last:i[i.length-1],repeats:i.length-1}}).sort((t,s)=>+new Date(s.first.viewed_at)-+new Date(t.first.viewed_at))}function Hb({pollId:e}){const[n,t]=be.useState(!0),[s,i]=be.useState([]),[r,l]=be.useState([]),[o,u]=be.useState(null),[h,f]=be.useState(!1),[v,w]=be.useState(!0),[m,A]=be.useState(new Set),y=be.useCallback(async()=>{var M;t(!0);const[j,z,C,$]=await Promise.all([Be.from("email_history").select("id, recipient, status, sent_at, language, delivery_status, delivered_at, opened_at").eq("related_entity_id",e).eq("template_type","vote_result").order("sent_at",{ascending:!1}),Be.from("poll_result_view_audit").select("id, user_id, source, is_first, ack_token_prefix, ip_hash, user_agent, viewed_at").eq("poll_id",e).order("viewed_at",{ascending:!1}).limit(2e3),Be.from("polls").select("ends_at").eq("id",e).maybeSingle(),Be.from("user_roles").select("user_id").eq("role","admin")]);A(new Set(($.data||[]).map(Z=>Z.user_id))),i(j.data||[]),u(((M=C.data)==null?void 0:M.ends_at)||null);const q=z.data||[],L=Array.from(new Set(q.map(Z=>Z.user_id)));if(L.length>0){const{data:Z}=await Be.rpc("admin_get_profiles_by_ids",{_user_ids:L}),ae=new Map((Z||[]).map(he=>[he.user_id,he]));q.forEach(he=>{const we=ae.get(he.user_id);he.name=we?[we.first_name,we.last_name].filter(Boolean).join(" ")||we.company_name||we.full_name:he.user_id,he.email=we==null?void 0:we.email})}l(q),t(!1)},[e]);be.useEffect(()=>{y()},[y]);const P=o?+new Date(o):null,k=be.useMemo(()=>v?r.filter(j=>!m.has(j.user_id)):r,[r,m,v]),G=be.useMemo(()=>r.filter(j=>m.has(j.user_id)).length,[r,m]),I=be.useMemo(()=>P?k.filter(j=>+new Date(j.viewed_at)<=P):[],[k,P]),R=be.useMemo(()=>P?k.filter(j=>+new Date(j.viewed_at)>P):k,[k,P]),Q=h?I:R,me=be.useMemo(()=>pm(Q.filter(j=>j.source==="email")),[Q]),oe=be.useMemo(()=>pm(Q.filter(j=>j.source!=="email")),[Q]),K=be.useMemo(()=>{const j=s.filter(q=>q.status==="sent").length,z=s.filter(q=>["opened","clicked"].includes(q.delivery_status||"")).length,C=s.filter(q=>q.delivery_status==="clicked").length,$=new Set(Q.map(q=>q.user_id)).size;return{sent:j,opened:z,providerClicks:C,uniqueOwners:$}},[s,Q]),H=()=>{const j=(L,M,Z)=>[[L],["VlastnÃk","E-mail","Prvnà zobrazenÃ","Poslednà zobrazenÃ","PoÄet zobrazenÃ","Způsob","Token z e-mailu","Hash IP","ZaÅÃzenà / prohlÞeÄ"],...M.map(ae=>[ae.name,ae.email,yi(ae.first.viewed_at),yi(ae.last.viewed_at),String(ae.repeats+1),Z,ae.first.ack_token_prefix?`${ae.first.ack_token_prefix}â¦`:"",ae.first.ip_hash||"",ae.first.user_agent||""]),[]],C=[...j("A) Zobrazenà výsledku prokliknutÃm osobnÃho odkazu z e-mailu",me,"Proklik z e-mailu"),...j("B) Zobrazenà výsledku po pÅihlášenà do aplikace",oe,"PÅihlášenà do aplikace"),["C) OtevÅenà a prokliky hlášené poskytovatelem poÅ¡ty"],["E-mail","Odesláno","Stav","OtevÅeno"],...s.filter(L=>["opened","clicked"].includes(L.delivery_status||"")).map(L=>[L.recipient,yi(L.sent_at),L.delivery_status||"",yi(L.opened_at)]),[],["D) Ãplná auditnà stopa (každé jednotlivé zobrazenÃ)"],["Äas","VlastnÃk","E-mail","Zdroj","PoÅadÃ","Token","Hash IP","ZaÅÃzenÃ"],...Q.map(L=>[yi(L.viewed_at),L.name||L.user_id,L.email||"",L.source==="email"?"Proklik z e-mailu":"PÅihlášenà do aplikace",L.is_first?"prvnÃ":"opakované",L.ack_token_prefix?`${L.ack_token_prefix}â¦`:"",L.ip_hash||"",L.user_agent||""])].map(L=>L.map(M=>`"${String(M).replace(/"/g,'""')}"`).join(";")).join(` 190`),$=new Blob(["\uFEFF"+C],{type:"text/csv;charset=utf-8;"}),q=document.createElement("a");q.href=URL.createObjectURL($),q.download=`audit-zobrazeni-vysledku-${e.slice(0,8)}.csv`,q.click()};if(n)return a.jsx("div",{className:"flex justify-center py-12",children:a.jsx(ds,{className:"h-6 w-6 animate-spin"})});const ie=(j,z)=>j.length===0?a.jsx("p",{className:"text-xs text-muted-foreground py-4 text-center",children:z==="email"?"ZatÃm nikdo neotevÅel výsledek odkazem z e-mailu.":"ZatÃm si nikdo nezobrazil výsledek po pÅihlášenà do aplikace."}):a.jsx("div",{className:"border rounded-md overflow-x-auto",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{className:"bg-muted/50",children:[a.jsx(Ze,{className:"h-8 text-xs",children:"VlastnÃk"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Prvnà (rozhodné) zobrazenÃ"}),a.jsx(Ze,{className:"h-8 text-xs",children:"OpakovanÄ"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Poslednà zobrazenÃ"}),z==="email"&&a.jsx(Ze,{className:"h-8 text-xs",children:"Token"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Hash IP"}),a.jsx(Ze,{className:"h-8 text-xs",children:"ZaÅÃzenÃ"})]})}),a.jsx(hi,{children:j.map(C=>a.jsxs(Qt,{className:"h-9",children:[a.jsxs(Ie,{className:"text-xs",children:[C.name,C.email&&a.jsx("span",{className:"block text-[10px] text-muted-foreground",children:C.email})]}),a.jsx(Ie,{className:"text-xs whitespace-nowrap",children:yi(C.first.viewed_at)}),a.jsx(Ie,{children:C.repeats>0?a.jsxs(Ot,{variant:"secondary",className:"text-[10px] whitespace-nowrap",children:["+",C.repeats]}):a.jsx("span",{className:"text-[11px] text-muted-foreground",children:"â"})}),a.jsx(Ie,{className:"text-xs whitespace-nowrap",children:C.repeats>0?yi(C.last.viewed_at):"â"}),z==="email"&&a.jsx(Ie,{className:"text-[11px] font-mono",children:C.first.ack_token_prefix?`${C.first.ack_token_prefix}â¦`:"â"}),a.jsx(Ie,{className:"text-[11px] font-mono",children:C.first.ip_hash?`${C.first.ip_hash.slice(0,12)}â¦`:"â"}),a.jsx(Ie,{className:"text-[11px] text-muted-foreground max-w-[220px] truncate",title:C.first.user_agent||"",children:C.first.user_agent||"â"})]}
190,C.user_id))})]})});return a.jsxs("div",{className:"space-y-4",children:[a.jsxs(ba,{className:"bg-muted/30 border-border/60",children:[a.jsx(_i,{className:"h-4 w-4 text-primary"}),a.jsxs(wa,{className:"text-xs",children:["Audit sleduje dvÄ samostatné cesty k výsledku hlasovánÃ. ",a.jsx("strong",{children:"A)"})," VlastnÃk klikne na osobnà odkaz v e-mailu s výsledkem â odkaz obsahuje jednorázový token, který zobrazenà jednoznaÄnÄ pÅiÅadà ke konkrétnà osobÄ. ",a.jsx("strong",{children:"B)"})," VlastnÃk se pÅihlásà do aplikace a otevÅe výsledek uzavÅeného hlasovánà pÅÃmo v portálu â bez odkazu, ale s ovÄÅenou identitou pÅihlášeného úÄtu. Pro úÄely doloženà staÄà jedno zobrazenÃ; rozhodné je to ",a.jsx("strong",{children:"prvnÃ"}),". Každé dalšà zobrazenà se rovnÄž eviduje, zde se ale zobrazuje jen souhrnnÄ jako â+2, +3â¦â."]})]}),a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border bg-muted/20 px-3 py-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(k0,{className:"h-4 w-4 text-primary"}),a.jsx(Wn,{htmlFor:"during-voting",className:"text-xs font-medium cursor-pointer",children:"NávÅ¡tÄvnost v průbÄhu hlasovánÃ"}),a.jsx(Ud,{id:"during-voting",checked:h,onCheckedChange:f,disabled:!o})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ud,{id:"exclude-admins",checked:v,onCheckedChange:w}),a.jsx(Wn,{htmlFor:"exclude-admins",className:"text-xs font-medium cursor-pointer",children:"VylouÄit administrátory ze zobrazenÃ"}),v&&G>0&&a.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["(",G," skryto)"]})]}),a.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[a.jsxs(Ot,{variant:h?"default":"outline",className:"text-[10px] whitespace-nowrap",children:["V průbÄhu: ",I.length]}),a.jsxs(Ot,{variant:h?"outline":"default",className:"text-[10px] whitespace-nowrap",children:["Po uzavÅenÃ: ",R.length]}),a.jsx("span",{className:"hidden sm:inline",children:o?`Konec hlasovánÃ: ${yi(o)}`:"Konec hlasovánà nenà nastaven"})]})]}),a.jsx("p",{className:"text-[11px] text-muted-foreground -mt-2",children:h?"Zobrazuje se kontrola průbÄžných výsledků, kterou si vlastnÃci otevÅeli jeÅ¡tÄ pÅed uzavÅenÃm hlasovánÃ. Tyto záznamy nemajà důkaznà význam pro § 24 odst. 5 WEG 2002.":"Zobrazujà se zobrazenà koneÄného výsledku po uzavÅenà hlasovánà â tato jsou rozhodná pro doloženà seznámenà s usnesenÃm."}),a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-6 gap-2 text-center",children:[{label:"Odesláno",value:K.sent},{label:"OtevÅeno (provider)",value:K.opened},{label:"Proklik (provider)",value:K.providerClicks},{label:"Zobrazeno z e-mailu",value:me.length},{label:"Zobrazeno v aplikaci",value:oe.length},{label:"VlastnÃků celkem",value:K.uniqueOwners}].map(j=>a.jsxs("div",{className:"rounded-md border bg-muted/30 p-2",children:[a.jsx("div",{className:"text-lg font-semibold",children:j.value}),a.jsx("div",{className:"text-[11px] text-muted-foreground",children:j.label})]},j.label))}),a.jsxs(ln,{children:[a.jsxs(Nn,{className:"pb-3 flex-row items-center justify-between space-y-0",children:[a.jsxs(Tn,{className:"text-base font-serif flex items-center gap-2",children:[a.jsx(Rm,{className:"h-4 w-4"})," A · Zobrazenà výsledku z e-mailu (proklik osobnÃho odkazu)"]}),a.jsxs(pt,{variant:"outline",size:"sm",onClick:H,disabled:Q.length===0,className:"gap-1.5",children:[a.jsx(el,{className:"h-3.5 w-3.5"})," Export CSV"]})]}),a.jsxs(cn,{className:"space-y-2",children:[a.jsx("p",{className:"text-[11px] text-muted-foreground",children:"VlastnÃk otevÅel výsledek kliknutÃm na osobnà odkaz v e-mailu. Token z odkazu je uložen jen jako prefix, IP adresa pouze jako nevratný hash."}),ie(me,"email")]})]}),a.jsxs(ln,{children:[a.jsx(Nn,{className:"pb-3",children:a.jsxs(Tn,{className:"text-base font-serif flex items-center gap-2",children:[a.jsx(rg,{className:"h-4 w-4"})," B · Zobrazenà výsledku po pÅihlášenà do aplikace"]})}),a.jsxs(cn,{className:"space-y-2",children:[a.jsx("p",{className:"text-[11px] text-muted-foreground",children:"VlastnÃk se pÅihlásil do portálu a po skonÄenà hlasovánà si výsledek zobrazil pÅÃmo v aplikaci. Identita je doložena pÅihlášeným úÄtem, nikoli tokenem z e-mailu."}),ie(oe,"portal")]})]}),a.jsxs(ln,{children:[a.jsx(Nn,{className:"pb-3",children:a.jsxs(Tn,{className:"text-base font-serif flex items-center gap-2",children:[a.jsx(pu,{className:"h-4 w-4"}
190)," Ãplná auditnà stopa"]})}),a.jsxs(cn,{className:"space-y-2",children:[a.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["NemÄnný záznam každého jednotlivého otevÅenà výsledku (obÄ cesty dohromady). Kompletnà seznam je souÄástà exportu CSV; zde je poslednÃch ",Math.min(Q.length,50)," záznamů."]}),Q.length===0?a.jsx("p",{className:"text-xs text-muted-foreground py-4 text-center",children:"ZatÃm nebylo zaznamenáno žádné zobrazenÃ."}):a.jsx("div",{className:"border rounded-md overflow-x-auto",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{className:"bg-muted/50",children:[a.jsx(Ze,{className:"h-8 text-xs",children:"Äas"}),a.jsx(Ze,{className:"h-8 text-xs",children:"VlastnÃk"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Cesta"}),a.jsx(Ze,{className:"h-8 text-xs",children:"PoÅadÃ"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Hash IP"})]})}),a.jsx(hi,{children:Q.slice(0,50).map(j=>a.jsxs(Qt,{className:"h-9",children:[a.jsx(Ie,{className:"text-xs whitespace-nowrap",children:yi(j.viewed_at)}),a.jsx(Ie,{className:"text-xs",children:j.name}),a.jsx(Ie,{children:a.jsx(Ot,{variant:j.source==="email"?"default":"outline",className:"text-[10px] whitespace-nowrap",children:j.source==="email"?"E-mail":"Aplikace"})}),a.jsx(Ie,{className:"text-xs whitespace-nowrap",children:j.is_first?"prvnÃ":"opakované"}),a.jsx(Ie,{className:"text-[11px] font-mono",children:j.ip_hash?`${j.ip_hash.slice(0,12)}â¦`:"â"})]},j.id))})]})})]})]}),a.jsxs(ln,{children:[a.jsxs(Nn,{className:"pb-3",children:[a.jsxs(Tn,{className:"text-base font-serif flex items-center gap-2",children:[a.jsx(ll,{className:"h-4 w-4"})," OtevÅenà a prokliky hlášené poskytovatelem poÅ¡ty"]}),a.jsxs(g0,{className:"text-xs text-muted-foreground leading-relaxed",children:[a.jsx("strong",{children:"OtevÅeno"})," = e-mail byl pÅÃjemcem otevÅen, ale nebyl v nÄm kliknut žádný odkaz.",a.jsx("br",{}),a.jsx("strong",{children:"OtevÅeno + proklik"})," = e-mail byl otevÅen a pÅÃjemce klikl na odkaz uvnitÅ zprávy.",a.jsx("br",{}),"Tyto údaje hlásà pÅÃmo poskytovatel poÅ¡ty (napÅ. pÅes sledovacà pixel nebo klik na odkaz), nikoli portál."]})]}),a.jsx(cn,{children:s.filter(j=>["opened","clicked"].includes(j.delivery_status||"")).length===0?a.jsx("p",{className:"text-xs text-muted-foreground py-4 text-center",children:"Poskytovatel poÅ¡ty zatÃm nenahlásil žádné otevÅenà ani proklik. Pokud tento stav trvá, nenà u poskytovatele nastavený webhook."}):a.jsx("div",{className:"border rounded-md overflow-x-auto",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{className:"bg-muted/50",children:[a.jsx(Ze,{className:"h-8 text-xs",children:"E-mail"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Odesláno"}),a.jsx(Ze,{className:"h-8 text-xs",children:"Stav"}),a.jsx(Ze,{className:"h-8 text-xs",children:"OtevÅeno"})]})}),a.jsx(hi,{children:s.filter(j=>["opened","clicked"].includes(j.delivery_status||"")).map(j=>a.jsxs(Qt,{className:"h-9",children:[a.jsx(Ie,{className:"text-xs",children:j.recipient}),a.jsx(Ie,{className:"text-xs whitespace-nowrap",children:yi(j.sent_at)}),a.jsx(Ie,{children:a.jsx(Ot,{variant:j.delivery_status==="clicked"?"default":"secondary",className:"text-[10px] whitespace-nowrap",children:j.delivery_status==="clicked"?"OtevÅeno + proklik":"OtevÅeno"})}),a.jsx(Ie,{className:"text-xs whitespace-nowrap",children:yi(j.opened_at)})]},j.id))})]})})})]})]})}function n1(e,n,t,s,i){s=s||{};var r=1.15,l=i.internal.scaleFactor,o=i.internal.getFontSize()/l,u=i.getLineHeightFactor?i.getLineHeightFactor():r,h=o*u,f=/\r\n|\r|\n/g,v="",w=1;if((s.valign==="middle"||s.valign==="bottom"||s.halign==="center"||s.halign==="right")&&(v=typeof e=="string"?e.split(f):e,w=v.length||1),t+=o*(2-r),s.valign==="middle"?t-=w/2*h:s.valign==="bottom"&&(t-=w*h),s.halign==="center"||s.halign==="right"){var m=o;if(s.halign==="center"&&(m*=.5),v&&w>=1){for(var A=0;A<v.length;A++)i.text(v[A],n-i.getStringUnitWidth(v[A])*m,t),t+=h;return i}n-=i.getStringUnitWidth(e)*m}return s.halign==="justify"?i.text(e,n,t,{maxWidth:s.maxWidth||100,align:"justify"}):i.text(e,n,t),i}var gm={},so=function(){function e(n){this.jsPDFDocument=n,this.userStyles={textColor:n.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:n.internal.getFontSize(),fontStyle:n.internal.getFont().fontStyle,font:n.internal.getFont().fontName,lineWidth:n.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:n.getDrawColor?this.jsPDFDocument.getDrawColor():0}}return e.setDefaults=function(n,t){t===void 0&&(t=null),t?t.__autoTableDocumentDefaults=n:gm=n},e.unifyColor=function(n){return Array.isArray(n)?n:typeof n=="number"?[n,n,n]:typeof n=="string"?[n]:null},e.prototype.applyStyles=function(n,t){var s,i,r;t===void 0&&(t=!1),n.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(n.fontStyle);var l=this.jsPDFDocument.internal.getFont(),o=l.fontStyle,u=l.fontName;if(n.font&&(u=n.font),n.fontStyle){o=n.fontStyle;
190var h=this.getFontList()[u];h&&h.indexOf(o)===-1&&this.jsPDFDocument.setFontStyle&&(this.jsPDFDocument.setFontStyle(h[0]),o=h[0])}if(this.jsPDFDocument.setFont(u,o),n.fontSize&&this.jsPDFDocument.setFontSize(n.fontSize),!t){var f=e.unifyColor(n.fillColor);f&&(s=this.jsPDFDocument).setFillColor.apply(s,f),f=e.unifyColor(n.textColor),f&&(i=this.jsPDFDocument).setTextColor.apply(i,f),f=e.unifyColor(n.lineColor),f&&(r=this.jsPDFDocument).setDrawColor.apply(r,f),typeof n.lineWidth=="number"&&this.jsPDFDocument.setLineWidth(n.lineWidth)}},e.prototype.splitTextToSize=function(n,t,s){return this.jsPDFDocument.splitTextToSize(n,t,s)},e.prototype.rect=function(n,t,s,i,r){return this.jsPDFDocument.rect(n,t,s,i,r)},e.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},e.prototype.getTextWidth=function(n){return this.jsPDFDocument.getTextWidth(n)},e.prototype.getDocument=function(){return this.jsPDFDocument},e.prototype.setPage=function(n){this.jsPDFDocument.setPage(n)},e.prototype.addPage=function(){return this.jsPDFDocument.addPage()},e.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},e.prototype.getGlobalOptions=function(){return gm||{}},e.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},e.prototype.pageSize=function(){var n=this.jsPDFDocument.internal.pageSize;return n.width==null&&(n={width:n.getWidth(),height:n.getHeight()}),n},e.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},e.prototype.getLineHeightFactor=function(){var n=this.jsPDFDocument;return n.getLineHeightFactor?n.getLineHeightFactor():1.15},e.prototype.getLineHeight=function(n){return n/this.scaleFactor()*this.getLineHeightFactor()},e.prototype.pageNumber=function(){var n=this.jsPDFDocument.internal.getCurrentPageInfo();return n?n.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},e}(),uu=function(e,n){return uu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])},uu(e,n)};function s1(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");uu(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}var i1=function(e){s1(n,e);function n(t){var s=e.call(this)||this;return s._element=t,s}return n}(Array);function Gb(e){return{font:"helvetica",fontStyle:"normal",overflow:"linebreak",fillColor:!1,textColor:20,halign:"left",valign:"top",fontSize:10,cellPadding:5/e,lineColor:200,lineWidth:0,cellWidth:"auto",minCellHeight:0,minCellWidth:0}}function $b(e){var n={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal"},head:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:"bold"},foot:{fontStyle:"bold"}}};return n[e]}function Ac(e,n,t){t.applyStyles(n,!0);var s=Array.isArray(e)?e:[e],i=s.map(function(r){return t.getTextWidth(r)}).reduce(function(r,l){return Math.max(r,l)},0);return i}function r1(e,n,t,s){var i=n.settings.tableLineWidth,r=n.settings.tableLineColor;e.applyStyles({lineWidth:i,lineColor:r});var l=a1(i,!1);l&&e.rect(t.x,t.y,n.getWidth(e.pageSize().width),s.y-t.y,l)}function a1(e,n){var t=e>0,s=n||n===0;return t&&s?"DF":t?"S":s?"F":null}
190function zc(e,n){var t,s,i,r;if(e=e||n,Array.isArray(e)){if(e.length>=4)return{top:e[0],right:e[1],bottom:e[2],left:e[3]};if(e.length===3)return{top:e[0],right:e[1],bottom:e[2],left:e[1]};if(e.length===2)return{top:e[0],right:e[1],bottom:e[0],left:e[1]};e.length===1?e=e[0]:e=n}return typeof e=="object"?(typeof e.vertical=="number"&&(e.top=e.vertical,e.bottom=e.vertical),typeof e.horizontal=="number"&&(e.right=e.horizontal,e.left=e.horizontal),{left:(t=e.left)!==null&&t!==void 0?t:n,top:(s=e.top)!==null&&s!==void 0?s:n,right:(i=e.right)!==null&&i!==void 0?i:n,bottom:(r=e.bottom)!==null&&r!==void 0?r:n}):(typeof e!="number"&&(e=n),{top:e,right:e,bottom:e,left:e})}function o1(e,n){var t=zc(n.settings.margin,0);return e.pageSize().width-(t.left+t.right)}function Zb(e,n,t,s,i){var r={},l=1.3333333333333333,o=Md(n,function(I){return i.getComputedStyle(I).backgroundColor});o!=null&&(r.fillColor=o);var u=Md(n,function(I){return i.getComputedStyle(I).color});u!=null&&(r.textColor=u);var h=Kb(s,t);h&&(r.cellPadding=h);var f="borderTopColor",v=l*t,w=s.borderTopWidth;if(s.borderBottomWidth===w&&s.borderRightWidth===w&&s.borderLeftWidth===w){var m=(parseFloat(w)||0)/v;m&&(r.lineWidth=m)}else r.lineWidth={top:(parseFloat(s.borderTopWidth)||0)/v,right:(parseFloat(s.borderRightWidth)||0)/v,bottom:(parseFloat(s.borderBottomWidth)||0)/v,left:(parseFloat(s.borderLeftWidth)||0)/v},r.lineWidth.top||(r.lineWidth.right?f="borderRightColor":r.lineWidth.bottom?f="borderBottomColor":r.lineWidth.left&&(f="borderLeftColor"));var A=Md(n,function(I){return i.getComputedStyle(I)[f]});A!=null&&(r.lineColor=A);var y=["left","right","center","justify"];y.indexOf(s.textAlign)!==-1&&(r.halign=s.textAlign),y=["middle","bottom","top"],y.indexOf(s.verticalAlign)!==-1&&(r.valign=s.verticalAlign);var P=parseInt(s.fontSize||"");isNaN(P)||(r.fontSize=P/l);var k=Yb(s);k&&(r.fontStyle=k);var G=(s.fontFamily||"").toLowerCase();return e.indexOf(G)!==-1&&(r.font=G),r}function Yb(e){var n="";return(e.fontWeight==="bold"||e.fontWeight==="bolder"||parseInt(e.fontWeight)>=700)&&(n="bold"),(e.fontStyle==="italic"||e.fontStyle==="oblique")&&(n+="italic"),n}function Md(e,n){var t=l1(e,n);if(!t)return null;var s=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!s||!Array.isArray(s))return null;var i=[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])],r=parseInt(s[4]);return r===0||isNaN(i[0])||isNaN(i[1])||isNaN(i[2])?null:i}function l1(e,n){var t=n(e);return t==="rgba(0, 0, 0, 0)"||t==="transparent"||t==="initial"||t==="inherit"?e.parentElement==null?null:l1(e.parentElement,n):t}function Kb(e,n){var t=[e.paddingTop,e.paddingRight,e.paddingBottom,e.paddingLeft],s=96/(72/n),i=(parseInt(e.lineHeight)-parseInt(e.fontSize))/n/2,r=t.map(function(o){return parseInt(o||"0")/s}),l=zc(r,0);return i>l.top&&(l.top=i),i>l.bottom&&(l.bottom=i),l}function c1(e,n,t,s,i){var r,l;s===void 0&&(s=!1),i===void 0&&(i=!1);var o;typeof n=="string"?o=t.document.querySelector(n):o=n;var u=Object.keys(e.getFontList()),h=e.scaleFactor(),f=[],v=[],w=[];if(!o)return console.error("Html table could not be found with input: ",n),{head:f,body:v,foot:w};for(var m=0;m<o.rows.length;m++){var A=o.rows[m],y=(l=(r=A==null?void 0:A.parentElement)===null||r===void 0?void 0:r.tagName)===null||l===void 0?void 0:l.toLowerCase(),P=Jb(u,h,t,A,s,i);P&&(y==="thead"?f.push(P):y==="tfoot"?w.push(P):v.push(P))}return{head:f,body:v,foot:w}}function Jb(e,n,t,s,i,r){for(var l=new i1(s),o=0;o<s.cells.length;o++){var u=s.cells[o],h=t.getComputedStyle(u);if(i||h.display!=="none"){var f=void 0;r&&(f=Zb(e,u,n,h,t)),l.push({rowSpan:u.rowSpan,colSpan:u.colSpan,styles:f,_element:u,content:Xb(u)})}}var v=t.getComputedStyle(s);if(l.length>0&&(i||v.display!=="none"))return l}function Xb(e){var n=e.cloneNode(!0);return n.innerHTML=n.innerHTML.replace(/\n/g,"").replace(/ +/g," "),n.innerHTML=n.innerHTML.split(/<br.*?>/).map(function(t){return t.trim()}).join(` 191`),n.innerText||n.textContent||""}function Qb(e,n,t){for(var s=0,i=[e,n,t];s<i.length;s++){var r=i[s];r&&typeof r!="object"&&console.error("The options parameter should be of type object, is: "+typeof r),r.startY&&typeof r.startY!="number"&&(console.error("Invalid value for startY option",r.startY),delete r.startY)}}function hr(e,n,t,s,i){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),l=1;l<arguments.length;l++){var o=arguments[l];if(o!=null)for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(r[u]=o[u])}return r}function d1(e,n){var t=new so(e),s=t.getDocumentOptions(),i=t.getGlobalOptions();Qb(i,s,n);var r=hr({},i,s,n),l;typeof window<"u"&&(l=window);var o=ew(i,s,n),u=tw(i,s,n),h=nw(t,r),f=iw(t,r,l);return{id:n.tableId,content:f,hooks:u,styles:o,settings:h}}function ew(e,n,t){for(var s={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},i=function(u){if(u==="columnStyles"){var h=e[u],f=n[u],v=t[u];s.columnStyles=hr({},h,f,v)}else{var w=[e,n,t],m=w.map(function(A){return A[u]||{}});s[u]=hr({},m[0],m[1],m[2])}},r=0,l=Object.keys(s);r<l.length;r++){var o=l[r];i(o)}return s}function tw(e,n,t){for(var s=[e,n,t],i={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},r=0,l=s;r<l.length;r++){var o=l[r];o.didParseCell&&i.didParseCell.push(o.didParseCell),o.willDrawCell&&i.willDrawCell.push(o.willDrawCell),o.didDrawCell&&i.didDrawCell.push(o.didDrawCell),o.willDrawPage&&i.willDrawPage.push(o.willDrawPage),o.didDrawPage&&i.didDrawPage.push(o.didDrawPage)}return i}function nw(e,n){var t,s,i,r,l,o,u,h,f,v,w,m,A=zc(n.margin,40/e.scaleFactor()),y=(t=sw(e,n.startY))!==null&&t!==void 0?t:A.top,P;n.showFoot===!0?P="everyPage":n.showFoot===!1?P="never":P=(s=n.show
191Foot)!==null&&s!==void 0?s:"everyPage";var k;n.showHead===!0?k="everyPage":n.showHead===!1?k="never":k=(i=n.showHead)!==null&&i!==void 0?i:"everyPage";var G=(r=n.useCss)!==null&&r!==void 0?r:!1,I=n.theme||(G?"plain":"striped"),R=!!n.horizontalPageBreak,Q=(l=n.horizontalPageBreakRepeat)!==null&&l!==void 0?l:null;return{includeHiddenHtml:(o=n.includeHiddenHtml)!==null&&o!==void 0?o:!1,useCss:G,theme:I,startY:y,margin:A,pageBreak:(u=n.pageBreak)!==null&&u!==void 0?u:"auto",rowPageBreak:(h=n.rowPageBreak)!==null&&h!==void 0?h:"auto",tableWidth:(f=n.tableWidth)!==null&&f!==void 0?f:"auto",showHead:k,showFoot:P,tableLineWidth:(v=n.tableLineWidth)!==null&&v!==void 0?v:0,tableLineColor:(w=n.tableLineColor)!==null&&w!==void 0?w:200,horizontalPageBreak:R,horizontalPageBreakRepeat:Q,horizontalPageBreakBehaviour:(m=n.horizontalPageBreakBehaviour)!==null&&m!==void 0?m:"afterAllRows"}}function sw(e,n){var t=e.getLastAutoTable(),s=e.scaleFactor(),i=e.pageNumber(),r=!1;if(t&&t.startPageNumber){var l=t.startPageNumber+t.pageNumber-1;r=l===i}return typeof n=="number"?n:(n==null||n===!1)&&r&&(t==null?void 0:t.finalY)!=null?t.finalY+20/s:null}function iw(e,n,t){var s=n.head||[],i=n.body||[],r=n.foot||[];if(n.html){var l=n.includeHiddenHtml;if(t){var o=c1(e,n.html,t,l,n.useCss)||{};s=o.head||s,i=o.body||s,r=o.foot||s}else console.error("Cannot parse html in non browser environment")}var u=n.columns||rw(s,i,r);return{columns:u,head:s,body:i,foot:r}}function rw(e,n,t){var s=e[0]||n[0]||t[0]||[],i=[];return Object.keys(s).filter(function(r){return r!=="_element"}).forEach(function(r){var l=1,o;Array.isArray(s)?o=s[parseInt(r)]:o=s[r],typeof o=="object"&&!Array.isArray(o)&&(l=(o==null?void 0:o.colSpan)||1);for(var u=0;u<l;u++){var h=void 0;Array.isArray(s)?h=i.length:h=r+(u>0?"_".concat(u):"");var f={dataKey:h};i.push(f)}}),i}var hu=function(){function e(n,t,s){this.table=t,this.pageNumber=t.pageNumber,this.settings=t.settings,this.cursor=s,this.doc=n.getDocument()}return e}(),aw=function(e){s1(n,e);function n(t,s,i,r,l,o){var u=e.call(this,t,s,o)||this;return u.cell=i,u.row=r,u.column=l,u.section=r.section,u}return n}(hu),ow=function(){function e(n,t){this.pageNumber=1,this.id=n.id,this.settings=n.settings,this.styles=n.styles,this.hooks=n.hooks,this.columns=t.columns,this.head=t.head,this.body=t.body,this.foot=t.foot}return e.prototype.getHeadHeight=function(n){return this.head.reduce(function(t,s){return t+s.getMaxCellHeight(n)},0)},e.prototype.getFootHeight=function(n){return this.foot.reduce(function(t,s){return t+s.getMaxCellHeight(n)},0)},e.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},e.prototype.callCellHooks=function(n,t,s,i,r,l){for(var o=0,u=t;o<u.length;o++){var h=u[o],f=new aw(n,this,s,i,r,l),v=h(f)===!1;if(s.text=Array.isArray(s.text)?s.text:[s.text],v)return!1}return!0},e.prototype.callEndPageHooks=function(n,t){n.applyStyles(n.userStyles);for(var s=0,i=this.hooks.didDrawPage;s<i.length;s++){var r=i[s];r(new hu(n,this,t))}},e.prototype.callWillDrawPageHooks=function(n,t){for(var s=0,i=this.hooks.willDrawPage;s<i.length;s++){var r=i[s];r(new hu(n,this,t))}},e.prototype.getWidth=function(n){if(typeof this.settings.tableWidth=="number")return this.settings.tableWidth;if(this.settings.tableWidth==="wrap"){var t=this.columns.reduce(function(i,r){return i+r.wrappedWidth},0);return t}else{var s=this.settings.margin;return n-s.left-s.right}},e}(),u1=function(){function e(n,t,s,i,r){r===void 0&&(r=!1),this.height=0,this.raw=n,n instanceof i1&&(this.raw=n._element,this.element=n._element),this.index=t,this.section=s,this.cells=i,this.spansMultiplePages=r}return e.prototype.getMaxCellHeight=function(n){var t=this;return n.reduce(function(s,i){var r;return Math.max(s,((r=t.cells[i.index])===null||r===void 0?void 0:r.height)||0)},0)},e.prototype.hasRowSpan=function(n){var t=this;return n.filter(function(s){var i=t.cells[s.index];return i?i.rowSpan>1:!1}).length>0},e.prototype.canEntireRowFit=function(n,t){return this.getMaxCellHeight(t)<=n},e.prototype.getMinimumRowHeight=function(n,t){var s=this;return n.reduce(function(i,r){var l=s.cells[r.index];if(!l)return 0;var o=t.getLineHeight(l.styles.fontSize),u=l.padding("vertical"),h=u+o;return h>i?h:i},0)},e}(),h1=function(){function e(n,t,s){var i;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=t,this.section=s,this.raw=n;var r=n;n!=null&&typeof n=="object"&&!Array.isArray(n)?(this.rowSpan=n.rowSpan||1,this.colSpan=n.colSpan||1,r=(i=n.content)!==null&&i!==void 0?i:n,n._element&&(this.raw=n._element)):(this.rowSpan=1,this.colSpan=1);var l=r!=null?""+r:"",o=/\r\n|\r|\n/g;this.text=l.split(o)}return e.prototype.getTextPos=function(){var n;if(this.styles.valign==="top")n=this.y+this.padding("top");else if(this.styles.valign==="bottom")n=this.y+this.height-this.padding("bottom");else{var t=this.height-this.padding("vertical");n=this.y+t/2+this.padding("top")}var s;if(this.styles.halign==="right")s=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var i=this.width-this.padding("horizontal");s=this.x+i/2+this.padding("left")}else s=this.x+this.padding("left");return{x:s,y:n}},e.prototype.getContentHeight=function(n,t){t===void 0&&(t=1.15);var s=Array.isArray(this.text)?this.text.length:1,i=this.styles.fontSize/n*t,r=s*i+this.padding("vertical");return Math.max(r,this.styles.minCellHeight)},e.prototype.padding=function(n){var t=zc(this.styles.cellPadding,0);return n==="vertical"?t.top+t.bottom:n==="horizontal"?t.left+t.right:t[n]},e}(),lw=function(){function e(n,t,s){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=n,this.raw=t,this.index=s}return e.prototype.getMaxCustomCellWidth=function(n){for(var t=0,s=0,i=n.allRows();s<i.length;s++){var r=i[s],l=r.cells[this.index];l&&typeof l.styles.cellWidth=="number"&&(t=Math.max(t,l.styles.cellWidth))}return t},e}();function cw(e,n){dw(e,n);var t=[],s=0;n.columns.forEach(function(r){var l=r.getMaxCustomCellWidth(n);
191l?r.width=l:(r.width=r.wrappedWidth,t.push(r)),s+=r.width});var i=n.getWidth(e.pageSize().width)-s;i&&(i=fu(t,i,function(r){return Math.max(r.minReadableWidth,r.minWidth)})),i&&(i=fu(t,i,function(r){return r.minWidth})),i=Math.abs(i),!n.settings.horizontalPageBreak&&i>.1/e.scaleFactor()&&(i=i<1?i:Math.round(i),console.log("Of the table content, ".concat(i," units width could not fit page"))),hw(n),fw(n,e),uw(n)}function dw(e,n){var t=e.scaleFactor(),s=n.settings.horizontalPageBreak,i=o1(e,n);n.allRows().forEach(function(r){for(var l=0,o=n.columns;l<o.length;l++){var u=o[l],h=r.cells[u.index];if(h){var f=n.hooks.didParseCell;n.callCellHooks(e,f,h,r,u,null);var v=h.padding("horizontal");h.contentWidth=Ac(h.text,h.styles,e)+v;var w=Ac(h.text.join(" ").split(/[^\S\u00A0]+/),h.styles,e);if(h.minReadableWidth=w+h.padding("horizontal"),typeof h.styles.cellWidth=="number")h.minWidth=h.styles.cellWidth,h.wrappedWidth=h.styles.cellWidth;else if(h.styles.cellWidth==="wrap"||s===!0)h.contentWidth>i?(h.minWidth=i,h.wrappedWidth=i):(h.minWidth=h.contentWidth,h.wrappedWidth=h.contentWidth);else{var m=10/t;h.minWidth=h.styles.minCellWidth||m,h.wrappedWidth=h.contentWidth,h.minWidth>h.wrappedWidth&&(h.wrappedWidth=h.minWidth)}}}}),n.allRows().forEach(function(r){for(var l=0,o=n.columns;l<o.length;l++){var u=o[l],h=r.cells[u.index];if(h&&h.colSpan===1)u.wrappedWidth=Math.max(u.wrappedWidth,h.wrappedWidth),u.minWidth=Math.max(u.minWidth,h.minWidth),u.minReadableWidth=Math.max(u.minReadableWidth,h.minReadableWidth);else{var f=n.styles.columnStyles[u.dataKey]||n.styles.columnStyles[u.index]||{},v=f.cellWidth||f.minCellWidth;v&&typeof v=="number"&&(u.minWidth=v,u.wrappedWidth=v)}h&&(h.colSpan>1&&!u.minWidth&&(u.minWidth=h.minWidth),h.colSpan>1&&!u.wrappedWidth&&(u.wrappedWidth=h.minWidth))}})}function fu(e,n,t){for(var s=n,i=e.reduce(function(m,A){return m+A.wrappedWidth},0),r=0;r<e.length;r++){var l=e[r],o=l.wrappedWidth/i,u=s*o,h=l.width+u,f=t(l),v=h<f?f:h;n-=v-l.width,l.width=v}if(n=Math.round(n*1e10)/1e10,n){var w=e.filter(function(m){return n<0?m.width>t(m):!0});w.length&&(n=fu(w,n,t))}return n}function uw(e){for(var n={},t=1,s=e.allRows(),i=0;i<s.length;i++)for(var r=s[i],l=0,o=e.columns;l<o.length;l++){var u=o[l],h=n[u.index];if(t>1)t--,delete r.cells[u.index];else if(h)h.cell.height+=r.height,t=h.cell.colSpan,delete r.cells[u.index],h.left--,h.left<=1&&delete n[u.index];else{var f=r.cells[u.index];if(!f)continue;if(f.height=r.height,f.rowSpan>1){var v=s.length-i,w=f.rowSpan>v?v:f.rowSpan;n[u.index]={cell:f,left:w,row:r}}}}}function hw(e){for(var n=e.allRows(),t=0;t<n.length;t++)for(var s=n[t],i=null,r=0,l=0,o=0;o<e.columns.length;o++){var u=e.columns[o];if(l-=1,l>1&&e.columns[o+1])r+=u.width,delete s.cells[u.index];else if(i){var h=i;delete s.cells[u.index],i=null,h.width=u.width+r}else{var h=s.cells[u.index];if(!h)continue;if(l=h.colSpan,r=0,h.colSpan>1){i=h,r+=u.width;continue}h.width=u.width+r}}}function fw(e,n){for(var t={count:0,height:0},s=0,i=e.allRows();s<i.length;s++){for(var r=i[s],l=0,o=e.columns;l<o.length;l++){var u=o[l],h=r.cells[u.index];if(h){n.applyStyles(h.styles,!0);var f=h.width-h.padding("horizontal");if(h.styles.overflow==="linebreak")h.text=n.splitTextToSize(h.text,f+1/n.scaleFactor(),{fontSize:h.styles.fontSize});else if(h.styles.overflow==="ellipsize")h.text=xm(h.text,f,h.styles,n,"...");else if(h.styles.overflow==="hidden")h.text=xm(h.text,f,h.styles,n,"");else if(typeof h.styles.overflow=="function"){var v=h.styles.overflow(h.text,f);typeof v=="string"?h.text=[v]:h.text=v}h.contentHeight=h.getContentHeight(n.scaleFactor(),n.getLineHeightFactor());var w=h.contentHeight/h.rowSpan;h.rowSpan>1&&t.count*t.height<w*h.rowSpan?t={height:w,count:h.rowSpan}:t&&t.count>0&&t.height>w&&(w=t.height),w>r.height&&(r.height=w)}}t.count--}}function xm(e,n,t,s,i){return e.map(function(r){return mw(r,n,t,s,i)})}function mw(e,n,t,s,i){var r=1e4*s.scaleFactor();if(n=Math.ceil(n*r)/r,n>=Ac(e,t,s))return e;for(;n<Ac(e+i,t,s)&&!(e.length<=1);)e=e.substring(0,e.length-1);return e.trim()+i}function f1(e,n){var t=new so(e),s=pw(n,t.scaleFactor()),i=new ow(n,s);return cw(t,i),t.applyStyles(t.userStyles),i}function pw(e,n){var t=e.content,s=xw(t.columns);if(t.head.length===0){var i=vm(s,"head");i&&t.head.push(i)}if(t.foot.length===0){var i=vm(s,"foot");i&&t.foot.push(i)}
191var r=e.settings.theme,l=e.styles;return{columns:s,head:Rd("head",t.head,s,l,r,n),body:Rd("body",t.body,s,l,r,n),foot:Rd("foot",t.foot,s,l,r,n)}}function Rd(e,n,t,s,i,r){var l={},o=n.map(function(u,h){for(var f=0,v={},w=0,m=0,A=0,y=t;A<y.length;A++){var P=y[A];if(l[P.index]==null||l[P.index].left===0)if(m===0){var k=void 0;Array.isArray(u)?k=u[P.index-w-f]:k=u[P.dataKey];var G={};typeof k=="object"&&!Array.isArray(k)&&(G=(k==null?void 0:k.styles)||{});var I=vw(e,P,h,i,s,r,G),R=new h1(k,I,e);v[P.dataKey]=R,v[P.index]=R,m=R.colSpan-1,l[P.index]={left:R.rowSpan-1,times:m}}else m--,w++;else l[P.index].left--,m=l[P.index].times,f++}return new u1(u,h,e,v)});return o}function vm(e,n){var t={};return e.forEach(function(s){if(s.raw!=null){var i=gw(n,s.raw);i!=null&&(t[s.dataKey]=i)}}),Object.keys(t).length>0?t:null}function gw(e,n){if(e==="head"){if(typeof n=="object")return n.header||null;if(typeof n=="string"||typeof n=="number")return n}else if(e==="foot"&&typeof n=="object")return n.footer;return null}function xw(e){return e.map(function(n,t){var s,i;return typeof n=="object"?i=(s=n.dataKey)!==null&&s!==void 0?s:t:i=t,new lw(i,n,t)})}function vw(e,n,t,s,i,r,l){var o=$b(s),u;e==="head"?u=i.headStyles:e==="body"?u=i.bodyStyles:e==="foot"&&(u=i.footStyles);var h=hr({},o.table,o[e],i.styles,u),f=i.columnStyles[n.dataKey]||i.columnStyles[n.index]||{},v=e==="body"?f:{},w=e==="body"&&t%2===0?hr({},o.alternateRow,i.alternateRowStyles):{},m=Gb(r),A=hr({},m,h,w,v);return hr(A,l)}function bw(e,n,t){var s;t===void 0&&(t={});var i=o1(e,n),r=new Map,l=[],o=[],u=[];Array.isArray(n.settings.horizontalPageBreakRepeat)?u=n.settings.horizontalPageBreakRepeat:(typeof n.settings.horizontalPageBreakRepeat=="string"||typeof n.settings.horizontalPageBreakRepeat=="number")&&(u=[n.settings.horizontalPageBreakRepeat]),u.forEach(function(w){var m=n.columns.find(function(A){return A.dataKey===w||A.index===w});m&&!r.has(m.index)&&(r.set(m.index,!0),l.push(m.index),o.push(n.columns[m.index]),i-=m.wrappedWidth)});for(var h=!0,f=(s=t==null?void 0:t.start)!==null&&s!==void 0?s:0;f<n.columns.length;){if(r.has(f)){f++;continue}var v=n.columns[f].wrappedWidth;if(h||i>=v)h=!1,l.push(f),o.push(n.columns[f]),i-=v;else break;f++}return{colIndexes:l,columns:o,lastIndex:f-1}}function ww(e,n){for(var t=[],s=0;s<n.columns.length;s++){var i=bw(e,n,{start:s});i.columns.length&&(t.push(i),s=i.lastIndex)}return t}function m1(e,n){var t=n.settings,s=t.startY,i=t.margin,r={x:i.left,y:s},l=n.getHeadHeight(n.columns)+n.getFootHeight(n.columns),o=s+i.bottom+l;if(t.pageBreak==="avoid"){var u=n.body,h=u.reduce(function(w,m){return w+m.height},0);o+=h}var f=new so(e);(t.pageBreak==="always"||t.startY!=null&&o>f.pageSize().height)&&(g1(f),r.y=i.top),n.callWillDrawPageHooks(f,r);var v=hr({},r);n.startPageNumber=f.pageNumber(),t.horizontalPageBreak?yw(f,n,v,r):(f.applyStyles(f.userStyles),(t.showHead==="firstPage"||t.showHead==="everyPage")&&n.head.forEach(function(w){return vr(f,n,w,r,n.columns)}),f.applyStyles(f.userStyles),n.body.forEach(function(w,m){var A=m===n.body.length-1;Sc(f,n,w,A,v,r,n.columns)}),f.applyStyles(f.userStyles),(t.showFoot==="lastPage"||t.showFoot==="everyPage")&&n.foot.forEach(function(w){return vr(f,n,w,r,n.columns)})),r1(f,n,v,r),n.callEndPageHooks(f,r),n.finalY=r.y,e.lastAutoTable=n,f.applyStyles(f.userStyles)}function yw(e,n,t,s){var i=ww(e,n),r=n.settings;if(r.horizontalPageBreakBehaviour==="afterAllRows")i.forEach(function(h,f){e.applyStyles(e.userStyles),f>0?Yo(e,n,t,s,h.columns,!0):bm(e,n,s,h.columns),_w(e,n,t,s,h.columns),Id(e,n,s,h.columns)});else for(var l=-1,o=i[0],u=function(){var h=l;if(o){e.applyStyles(e.userStyles);var f=o.columns;l>=0?Yo(e,n,t,s,f,!0):bm(e,n,s,f),h=wm(e,n,l+1,s,f),Id(e,n,s,f)}var v=h-l;i.slice(1).forEach(function(w){e.applyStyles(e.userStyles),Yo(e,n,t,s,w.columns,!0),wm(e,n,l+1,s,w.columns,v),Id(e,n,s,w.columns)}),l=h};l<n.body.length-1;)u()}function bm(e,n,t,s){var i=n.settings;e.applyStyles(e.userStyles),(i.showHead==="firstPage"||i.showHead==="everyPage")&&n.head.forEach(function(r){return vr(e,n,r,t,s)})}function _w(e,n,t,s,i){e.applyStyles(e.userStyles),n.body.forEach(function(r,l){var o=l===n.body.length-1;Sc(e,n,r,o,t,s,i)})}function wm(e,n,t,s,i,r){e.applyStyles(e.userStyles),r=r??n.body.length;for(var l=Math.min(t+r,n.body.length),o=-1,u=n.body.slice(t,l),h=0;h<u.length;h++){var f=u[h],v=t+h===n.body.length-1,w=p1(e,n,v,s);if(f.canEntireRowFit(w,i))vr(e,n,f,s,i),o=t+h;else break}return o}function Id(e,n,t,s){var i=n.settings;e.applyStyles(e.userStyles),(i.showFoot==="lastPage"||i.showFoot==="everyPage")&&n.foot.forEach(function(r){return vr(e,n,r,t,s)})}function Nw(e,n,t){var s=t.getLineHeight(e.styles.fontSize),i=e.padding("vertical"),r=Math.floor((n-i)/s);return Math.max(0,r)}function jw(e,n,t,s){var i={};e.spansMultiplePages=!0,e.height=0;for(var r=0,l=0,o=t.columns;l<o.length;l++){var u=o[l],h=e.cells[u.index];if(h){Array.isArray(h.text)||(h.text=[h.text]);var f=new h1(h.raw,h.styles,h.section);f=hr(f,h),f.text=[];var v=Nw(h,n,s);h.text.length>v&&(f.text=h.text.splice(v,h.text.length));var w=s.scaleFactor(),m=s.getLineHeightFactor();h.contentHeight=h.getContentHeight(w,m),h.contentHeight>=n&&(h.contentHeight=n,f.styles.minCellHeight-=n),h.contentHeight>e.height&&(e.height=h.contentHeight),f.contentHeight=f.getContentHeight(w,m),f.contentHeight>r&&(r=f.contentHeight),i[u.index]=f}}var A=new u1(e.raw,-1,e.section,i,!0);A.height=r;
191for(var y=0,P=t.columns;y<P.length;y++){var u=P[y],f=A.cells[u.index];f&&(f.height=A.height);var h=e.cells[u.index];h&&(h.height=e.height)}return A}function kw(e,n,t,s){var i=e.pageSize().height,r=s.settings.margin,l=r.top+r.bottom,o=i-l;n.section==="body"&&(o-=s.getHeadHeight(s.columns)+s.getFootHeight(s.columns));var u=n.getMinimumRowHeight(s.columns,e),h=u<t;if(u>o)return console.log("Will not be able to print row ".concat(n.index," correctly since it's minimum height is larger than page height")),!0;if(!h)return!1;var f=n.hasRowSpan(s.columns),v=n.getMaxCellHeight(s.columns)>o;return v?(f&&console.log("The content of row ".concat(n.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(f||s.settings.rowPageBreak==="avoid")}function Sc(e,n,t,s,i,r,l){var o=p1(e,n,s,r);if(t.canEntireRowFit(o,l))vr(e,n,t,r,l);else if(kw(e,t,o,n)){var u=jw(t,o,n,e);vr(e,n,t,r,l),Yo(e,n,i,r,l),Sc(e,n,u,s,i,r,l)}else Yo(e,n,i,r,l),Sc(e,n,t,s,i,r,l)}function vr(e,n,t,s,i){s.x=n.settings.margin.left;for(var r=0,l=i;r<l.length;r++){var o=l[r],u=t.cells[o.index];if(!u){s.x+=o.width;continue}e.applyStyles(u.styles),u.x=s.x,u.y=s.y;var h=n.callCellHooks(e,n.hooks.willDrawCell,u,t,o,s);if(h===!1){s.x+=o.width;continue}Aw(e,u,s);var f=u.getTextPos();n1(u.text,f.x,f.y,{halign:u.styles.halign,valign:u.styles.valign,maxWidth:Math.ceil(u.width-u.padding("left")-u.padding("right"))},e.getDocument()),n.callCellHooks(e,n.hooks.didDrawCell,u,t,o,s),s.x+=o.width}s.y+=t.height}function Aw(e,n,t){var s=n.styles;if(e.getDocument().setFillColor(e.getDocument().getFillColor()),typeof s.lineWidth=="number"){var i=a1(s.lineWidth,s.fillColor);i&&e.rect(n.x,t.y,n.width,n.height,i)}else typeof s.lineWidth=="object"&&(s.fillColor&&e.rect(n.x,t.y,n.width,n.height,"F"),Sw(e,n,t,s.lineWidth))}function Sw(e,n,t,s){var i,r,l,o;s.top&&(i=t.x,r=t.y,l=t.x+n.width,o=t.y,s.right&&(l+=.5*s.right),s.left&&(i-=.5*s.left),u(s.top,i,r,l,o)),s.bottom&&(i=t.x,r=t.y+n.height,l=t.x+n.width,o=t.y+n.height,s.right&&(l+=.5*s.right),s.left&&(i-=.5*s.left),u(s.bottom,i,r,l,o)),s.left&&(i=t.x,r=t.y,l=t.x,o=t.y+n.height,s.top&&(r-=.5*s.top),s.bottom&&(o+=.5*s.bottom),u(s.left,i,r,l,o)),s.right&&(i=t.x+n.width,r=t.y,l=t.x+n.width,o=t.y+n.height,s.top&&(r-=.5*s.top),s.bottom&&(o+=.5*s.bottom),u(s.right,i,r,l,o));function u(h,f,v,w,m){e.getDocument().setLineWidth(h),e.getDocument().line(f,v,w,m,"S")}}function p1(e,n,t,s){var i=n.settings.margin.bottom,r=n.settings.showFoot;return(r==="everyPage"||r==="lastPage"&&t)&&(i+=n.getFootHeight(n.columns)),e.pageSize().height-s.y-i}function Yo(e,n,t,s,i,r){i===void 0&&(i=[]),r===void 0&&(r=!1),e.applyStyles(e.userStyles),n.settings.showFoot==="everyPage"&&!r&&n.foot.forEach(function(o){return vr(e,n,o,s,i)}),n.callEndPageHooks(e,s);var l=n.settings.margin;r1(e,n,t,s),g1(e),n.pageNumber++,s.x=l.left,s.y=l.top,t.y=l.top,n.callWillDrawPageHooks(e,s),n.settings.showHead==="everyPage"&&(n.head.forEach(function(o){return vr(e,n,o,s,i)}),e.applyStyles(e.userStyles))}function g1(e){var n=e.pageNumber();e.setPage(n+1);var t=e.pageNumber();return t===n?(e.addPage(),!0):!1}function Lw(e){e.API.autoTable=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var s=n[0],i=d1(this,s),r=f1(this,i);return m1(this,r),this},e.API.lastAutoTable=!1,e.API.autoTableText=function(n,t,s,i){n1(n,t,s,i,this)},e.API.autoTableSetDefaults=function(n){return so.setDefaults(n,this),this},e.autoTableSetDefaults=function(n,t){so.setDefaults(n,t)},e.API.autoTableHtmlToJson=function(n,t){var s;if(t===void 0&&(t=!1),typeof window>"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var i=new so(this),r=c1(i,n,window,t,!1),l=r.head,o=r.body,u=((s=l[0])===null||s===void 0?void 0:s.map(function(h){return h.content}))||[];return{columns:u,rows:o,data:o}}}var Bd;function ym(e,n){var t=d1(e,n),s=f1(e,t);m1(e,s)}try{if(typeof window<"u"&&window){var _m=window,Nm=_m.jsPDF||((Bd=_m.jspdf)===null||Bd===void 0?void 0:Bd.jsPDF);Nm&&Lw(Nm)}}catch(e){console.error("Could not apply autoTable plugin",e)}const Ko={protocol:{cs:"Protokol",de:"Protokoll",en:"Protocol"},subtitle:{cs:"o hlasovánà vlastnÃků formou obÄžnÃkového usnesenÃ",de:"mit der Abstimmung der Eigentümer in Form eines Umlaufbeschluss",en:"of the ownersâ vote by circular resolution"},building:{cs:"SpoleÄenstvà vlastnÃků âEG Bachwinkl 34â",de:"Die Eigentümer Wohnanlage âEG Bachwinkl 34â",en:"The ownersâ association âEG Bachwinkl 34â"},subject:{cs:"PÅedmÄt hlasovánÃ:",de:"Abstimmungsgegenstand:",en:"Subject of the vote:"},start:{cs:"ZaÄátek hlasovánÃ:",de:"Beginn der Abstimmungen:",en:"Start of voting:"},end:{cs:"Konec hlasovánÃ:",de:"Ende der Abstimmung:",en:"End of voting:"},duration:{cs:"Délka lhůty hlasovánÃ:",de:"Länge der Abstimmungsfrist:",en:"Voting period:"},days:{cs:"dnÃ",de:"Tage",en:"days"},contacted:{cs:"Oslovenà vlastnÃci:",de:"Kontaktierte Eigentümer
191:",en:"Owners contacted:"},participationNote:{cs:"VÅ¡ichni hlasovánà oprávnÄnà vlastnÃci byli o hlasovánà pÃsemnÄ informováni (e-mailem) a po celou dobu hlasovacà lhůty mÄli možnost odevzdat svůj hlas a vyjádÅit se k pÅedmÄtu usnesenà (§ 24 odst. 1 WEG 2002).",de:"Alle stimmberechtigten Wohnungseigentümer wurden gemäà § 24 Abs 1 WEG 2002 schriftlich über die Abstimmung informiert und hatten während der gesamten Abstimmungsfrist Gelegenheit, ihre Stimme abzugeben und sich zum Beschlussgegenstand zu äuÃern.",en:"All owners entitled to vote were notified of the vote in writing (by e-mail) pursuant to § 24 (1) WEG 2002 and had the opportunity throughout the entire voting period to cast their vote and comment on the subject of the resolution."},channel:{cs:"Hlasovánà probÄhlo online na portálu hintermoos.at, e-mailem a poÅ¡tou s tÃmto výsledkem",de:"Die Abstimmung erfolgte online über hintermoos.at, per E-Mail und PostBrief, was zu folgendem Ergebnis führte",en:"The voting was conducted online at hintermoos.at, by e-mail and by post, with the following result:"},ownersOf:{cs:"VlastnÃci",de:"Eigentümer von",en:"Owners of"},sharesEq:{cs:"podÃlů =",de:"Anteilen =",en:"shares ="},abstentions:{cs:"Zdrželi se:",de:"Stimmenthaltungen:",en:"Abstentions:"},notVoted:{cs:"Nehlasovali:",de:"Nicht abgestimmt:",en:"Did not vote:"},notVotedCell:{cs:"Nehlasoval (zdržel se hlasovánÃ)",de:"Nicht abgestimmt (Stimmenthaltung)",en:"Did not vote (abstained)"},resultLabel:{cs:"Výsledek hlasovánÃ:",de:"Ergebnis der Abstimmung:",en:"Result of the vote:"},votingType:{cs:"Metoda vyhodnocenÃ:",de:"Auswertungsmethode:",en:"Evaluation method:"},colNr:{cs:"Ä.",de:"Nr.",en:"No."},colTop:{cs:"TOP Ä.",de:"Top-Nr.",en:"Top no."},colOwner:{cs:"Uživatel / vlastnÃk",de:"Benutzer / Eigentümer",en:"User / owner"},colRv:{cs:"WEG podÃl RV",de:"WEG-Anteil RV",en:"WEG share RV"},colObjekt:{cs:"WEG podÃl objekt",de:"WEG-Anteil Objekt",en:"WEG share object"},colPct:{cs:"WEG podÃl (v %)",de:"WEG-Anteile (in %)",en:"WEG share (in %)"},colDate:{cs:"Datum hlasovánÃ",de:"Datum der Abstimmung",en:"Date of vote"},colVote:{cs:"Hlasoval",de:"Abgestimmt",en:"Voted"},colSelectedOption:{cs:"Volba",de:"Auswahl",en:"Selection"},colFp:{cs:"Digitálnà otisk",de:"Digitaler Fingerabdruck",en:"Digital fingerprint"},colRep:{cs:"Zástupce",de:"Vertreter",en:"Representative"},colComment:{cs:"KomentáÅ",de:"Kommentar",en:"Comment"},total:{cs:"CELKEM",de:"GESAMTSUMME",en:"TOTAL"},abstention:{cs:"Zdržel se",de:"Stimmenthaltung",en:"Abstention"},commentsTitle:{cs:"KomentáÅe vlastnÃků",de:"Kommentare der Eigentümer",en:"Ownersâ comments"},detailTitle:{cs:"Detail hlasovánà podle jednotek",de:"Detail der Abstimmung nach Einheiten",en:"Vote detail by unit"},optionOverview:{cs:"PÅehled možnostÃ",de:"Ãbersicht der Optionen",en:"Option overview"},voteResults:{cs:"Výsledek podle možnostÃ",de:"Ergebnis nach Optionen",en:"Result by option"},unitsShort:{cs:"jednotek",de:"Einheiten",en:"units"},proof:{cs:"Důkaz",de:"Beleg",en:"Proof"},noComments:{cs:"Žádné komentáÅe",de:"Keine Kommentare",en:"No comments"},generated:{cs:"Vygenerováno",de:"Erstellt am",en:"Generated"},sheetSummary:{cs:"Souhrn",de:"Zusammenfassung",en:"Summary"},sheetDetail:{cs:"Detail",de:"Detail",en:"Detail"},sheetComments:{cs:"KomentáÅe",de:"Kommentare",en:"Comments"},fileName:{cs:"protokol-hlasovani",de:"protokoll-abstimmung",en:"poll-protocol"},excludedNote:{cs:"Poznámka: TOP53 (Verein der Wohnungseigentümer Appartementhaus Hintermoos / Miteigentum aller Eigentümer, 50 050 podÃlů) je z hlasovánà vylouÄen, jelikož se jedná o spoleÄné vlastnictvà vÅ¡ech vlastnÃků.",de:"Hinweis: TOP53 (Verein der Wohnungseigentümer Appartementhaus Hintermoos / Miteigentum aller Eigentümer, 50 050 Anteile) ist von der Abstimmung ausgeschlossen, da es sich um gemeinschaftliches Eigentum aller Eigentümer handelt.",en:"Note: TOP53 (Verein der Wohnungseigentümer Appartementhaus Hintermoos / co-ownership of all owners, 50 050 shares) is excluded from voting, as it is common property of all owners."}
191,sheetFingerprint:{cs:"Digitálnà otisk",de:"Digitaler Fingerabdruck",en:"Digital fingerprint"},colVoter:{cs:"HlasujÃcÃ",de:"Abstimmende Person",en:"Voter"},colEmail:{cs:"E-mail",de:"E-Mail",en:"E-mail"},colIp:{cs:"IP adresa",de:"IP-Adresse",en:"IP address"},colBrowser:{cs:"ProhlÞeÄ",de:"Browser",en:"Browser"},colOs:{cs:"Systém",de:"Betriebssystem",en:"OS"},colDevice:{cs:"ZaÅÃzenÃ",de:"Gerät",en:"Device"},colLocation:{cs:"Lokalita",de:"Standort",en:"Location"},colIsp:{cs:"Poskytovatel",de:"Provider",en:"ISP"},fpNote:{cs:"Digitálnà otisk sloužà jako důkaz o provedenà hlasovánà (§ 24 WEG 2002). Data jsou zpracována v souladu s GDPR.",de:"Der digitale Fingerabdruck dient als Nachweis der Stimmabgabe (§ 24 WEG 2002). Die Daten werden DSGVO-konform verarbeitet.",en:"The digital fingerprint serves as evidence of the vote (§ 24 WEG 2002). Data is processed in accordance with GDPR."},anonNote:{cs:"Anonymizovaná verze: jména vlastnÃků a osobnà údaje nejsou uvedeny, jednotky jsou oznaÄeny pouze ÄÃslem TOP.",de:"Anonymisierte Fassung: Namen der Eigentümer und personenbezogene Daten sind nicht angeführt, die Einheiten sind nur mit der Top-Nummer bezeichnet.",en:"Anonymised version: owner names and personal data are omitted, units are identified by Top number only."},fileNameMgmt:{cs:"protokol-sprava-nemovitosti",de:"protokoll-hausverwaltung",en:"protocol-management"},mgmtNote:{cs:"Verze pro správu nemovitosti (pouze nÄmecky).",de:"Ausfertigung für die Hausverwaltung (Fassung in deutscher Sprache).",en:"Version for the property management (German only)."},fileNameAnon:{cs:"protokol-hlasovani-anonym",de:"protokoll-abstimmung-anonym",en:"poll-protocol-anonymous"},mgmtTitle:{cs:"Ergebnisprotokoll zum Umlaufbeschluss",de:"Ergebnisprotokoll zum Umlaufbeschluss",en:"Ergebnisprotokoll zum Umlaufbeschluss"},mgmtSubtitle:{cs:"der Eigentümergemeinschaft Bachwinkl 34 (WEG Bachwinkl 34)",de:"der Eigentümergemeinschaft Bachwinkl 34 (WEG Bachwinkl 34)",en:"der Eigentümergemeinschaft Bachwinkl 34 (WEG Bachwinkl 34)"},mgmtBodyNote:{cs:"Beschlussfassende Gemeinschaft: WEG Bachwinkl 34 · Empfänger dieser Ausfertigung: Hausverwaltung",de:"Beschlussfassende Gemeinschaft: WEG Bachwinkl 34 · Empfänger dieser Ausfertigung: Hausverwaltung",en:"Beschlussfassende Gemeinschaft: WEG Bachwinkl 34 · Empfänger dieser Ausfertigung: Hausverwaltung"},mgmtSubjectHeading:{cs:"Abstimmungsgegenstand",de:"Abstimmungsgegenstand",en:"Abstimmungsgegenstand"},mgmtSubjectFooter:{cs:"Allen Wohnungseigentümern wurden dieselben Unterlagen und Informationen als Grundlage für ihre Entscheidung zur Verfügung gestellt.",de:"Allen Wohnungseigentümern wurden dieselben Unterlagen und Informationen als Grundlage für ihre Entscheidung zur Verfügung gestellt.",en:"Allen Wohnungseigentümern wurden dieselben Unterlagen und Informationen als Grundlage für ihre Entscheidung zur Verfügung gestellt."},mgmtVotingInfoHeading:{cs:"Ãdaje o hlasovánÃ",de:"Angaben zur Abstimmung",en:"Voting information"},mgmtVotingPeriod:{cs:"Abstimmungszeitraum",de:"Abstimmungszeitraum",en:"Abstimmungszeitraum"},mgmtVotingDeadline:{cs:"Abstimmungsfrist",de:"Abstimmungsfrist",en:"Abstimmungsfrist"},mgmtParticipationNote:{cs:"Allen stimmberechtigten Wohnungseigentümern wurde Gelegenheit gegeben, sich zu äuÃern und abzustimmen.",de:"Allen stimmberechtigten Wohnungseigentümern wurde Gelegenheit gegeben, sich zu äuÃern und abzustimmen.",en:"Allen stimmberechtigten Wohnungseigentümern wurde Gelegenheit gegeben, sich zu äuÃern und abzustimmen."},mgmtChannel:{cs:"Die Stimmabgabe war über hintermoos.at, per E-Mail oder per Post möglich.",de:"Die Stimmabgabe war über hintermoos.at, per E-Mail oder per Post möglich.",en:"Die Stimmabgabe war über hintermoos.at, per E-Mail oder per Post möglich."},mgmtEvaluationMethod:{cs:"Vyhodnocovacà metoda",de:"Auswertungsmethode",en:"Auswertungsmethode"},mgmtEvaluationBody:{cs:"Gemäà § 24 Abs 4 WEG 2002 kommt der Beschluss entweder mit absoluter Mehrheit aller Miteigentumsanteile oder mit qualifizierter Mehrheit zustande. Bei der qualifizierten Mehrheit müssen mindestens zwei Drittel der abgegebenen Anteile zustimmen und zugleich mindestens ein Drittel aller Miteigentumsanteile erreicht werden.",de:"Gemäà § 24 Abs 4 WEG 2002 kommt der Beschluss entweder mit absoluter Mehrheit aller Miteigentumsanteile oder mit qualifizierter Mehrheit zustande. Bei der qualifizierten Mehrheit müssen mindestens zwei Drittel der abgegebenen Anteile zustimmen und zugleich mindestens ein Drittel aller Miteigentumsanteile erreicht werden.",en:"Gemäà § 24 Abs 4 WEG 2002 kommt der Beschluss entweder mit absoluter Mehrheit aller Miteigentumsanteile oder mit qualifizierter Mehrheit zustande. Bei der qualifizierten Mehrheit müssen mindestens zwei Drittel der abgegebenen Anteile zustimmen und zugleich mindestens ein Drittel aller Miteigentumsanteile erreicht werden."},mgmtTop53Note:{cs:"Hinweis zu TOP 53: TOP 53 (W 53) ist im Grundbuch dem Verein der Wohnungseigentümer Appartementhaus Hintermoos mit 50.050 Miteigentumsanteilen zugeordnet. TOP 53 wurde bei die
191ser Abstimmung nicht als stimmberechtigte Einheit berücksichtigt. Die für die Auswertung herangezogenen stimmberechtigten Gesamtanteile betragen daher 1.467.092.",de:"Hinweis zu TOP 53: TOP 53 (W 53) ist im Grundbuch dem Verein der Wohnungseigentümer Appartementhaus Hintermoos mit 50.050 Miteigentumsanteilen zugeordnet. TOP 53 wurde bei dieser Abstimmung nicht als stimmberechtigte Einheit berücksichtigt. Die für die Auswertung herangezogenen stimmberechtigten Gesamtanteile betragen daher 1.467.092.",en:"Hinweis zu TOP 53: TOP 53 (W 53) ist im Grundbuch dem Verein der Wohnungseigentümer Appartementhaus Hintermoos mit 50.050 Miteigentumsanteilen zugeordnet. TOP 53 wurde bei dieser Abstimmung nicht als stimmberechtigte Einheit berücksichtigt. Die für die Auswertung herangezogenen stimmberechtigten Gesamtanteile betragen daher 1.467.092."},mgmtResultHeading:{cs:"Abstimmungsergebnis",de:"Abstimmungsergebnis",en:"Abstimmungsergebnis"},mgmtMajorityCheck:{cs:"Feststellung der Mehrheit",de:"Feststellung der Mehrheit",en:"Feststellung der Mehrheit"},mgmtResolutionHeading:{cs:"Im System gespeicherter Wortlaut zum Abstimmungsergebnis",de:"Im System gespeicherter Wortlaut zum Abstimmungsergebnis",en:"Im System gespeicherter Wortlaut zum Abstimmungsergebnis"},mgmtOriginalQuestionHeading:{cs:"Zur Abstimmung gestellte Frage",de:"Zur Abstimmung gestellte Frage",en:"Zur Abstimmung gestellte Frage"},mgmtResultFallbackHeading:{cs:"Beschlussinhalt / Ergebnis des Abstimmungsgegenstands",de:"Beschlussinhalt / Ergebnis des Abstimmungsgegenstands",en:"Beschlussinhalt / Ergebnis des Abstimmungsgegenstands"},mgmtLegalHeading:{cs:"Rechtsgrundlagen und Feststellung des Abstimmungsergebnisses",de:"Rechtsgrundlagen und Feststellung des Abstimmungsergebnisses",en:"Rechtsgrundlagen und Feststellung des Abstimmungsergebnisses"},mgmtLegalBody:{cs:`§ 24 Abs 1 WEG 2002 â Beschlussfassung der Eigentümergemeinschaft im Wege eines Umlaufbeschlusses. 192§ 24 Abs 4 WEG 2002 â Der Beschluss kommt mit absoluter Mehrheit aller Miteigentumsanteile oder mit qualifizierter Mehrheit (mindestens zwei Drittel der abgegebenen Stimmen und zugleich mindestens ein Drittel aller Miteigentumsanteile) zustande. 193§ 24 Abs 5 WEG 2002 â Das Ergebnis ist allen Wohnungseigentümern bekanntzugeben. 194§ 24 Abs 6 WEG 2002 â Anfechtung des Beschlusses im AuÃerstreitverfahren.`,de:`§ 24 Abs 1 WEG 2002 â Beschlussfassung der Eigentümergemeinschaft im Wege eines Umlaufbeschlusses. 195§ 24 Abs 4 WEG 2002 â Der Beschluss kommt mit absoluter Mehrheit aller Miteigentumsanteile oder mit qualifizierter Mehrheit (mindestens zwei Drittel der abgegebenen Stimmen und zugleich mindestens ein Drittel aller Miteigentumsanteile) zustande. 196§ 24 Abs 5 WEG 2002 â Das Ergebnis ist allen Wohnungseigentümern bekanntzugeben. 197§ 24 Abs 6 WEG 2002 â Anfechtung des Beschlusses im AuÃerstreitverfahren.`,en:`§ 24 Abs 1 WEG 2002 â Beschlussfassung der Eigentümergemeinschaft im Wege eines Umlaufbeschlusses. 198§ 24 Abs 4 WEG 2002 â Der Beschluss kommt mit absoluter Mehrheit aller Miteigentumsanteile oder mit qualifizierter Mehrheit (mindestens zwei Drittel der abgegebenen Stimmen und zugleich mindestens ein Drittel aller Miteigentumsanteile) zustande. 199§ 24 Abs 5 WEG 2002 â Das Ergebnis ist allen Wohnungseigentümern bekanntzugeben. 200§ 24 Abs 6 WEG 2002 â Anfechtung des Beschlusses im AuÃerstreitverfahren.`},mgmtAppealHeading:{cs:"Rechtsmittelbelehrung",de:"Rechtsmittelbelehrung",en:"Rechtsmittelbelehrung"},mgmtCourt:{cs:"Bezirksgericht Zell am See, MozartstraÃe 2, 5700 Zell am See, Ãsterreich",de:"Bezirksgericht Zell am See, MozartstraÃe 2, 5700 Zell am See, Ãsterreich",en:"Bezirksgericht Zell am See, MozartstraÃe 2, 5700 Zell am See, Ãsterreich"},mgmtDetailSummary:{cs:"Zusammenfassung der Abstimmung",de:"Zusammenfassung der Abstimmung",en:"Zusammenfassung der Abstimmung"},mgmtSystemNote:{cs:"Dieses Protokoll gibt den im System gespeicherten Stand der Abstimmung zum Zeitpunkt seiner Erstellung wieder.",de:"Dieses Protokoll gibt den im System gespeicherten Stand der Abstimmung zum Zeitpunkt seiner Erstellung wieder.",en:"Dieses Protokoll gibt den im System gespeicherten Stand der Abstimmung zum Zeitpunkt seiner Erstellung wieder."},mgmtVotesCast:{cs:"Abgegebene Stimmen",de:"Abgegebene Stimmen",en:"Abgegebene Stimmen"},mgmtVotesNotCast:{cs:"Nicht abgegebene Stimmen",de:"Nicht abgegebene Stimmen",en:"Nicht abgegebene Stimmen"},mgmtEligibleUnits:{cs:"Stimmberechtigte Einheiten",de:"Stimmberechtigte Einheiten",en:"Stimmberechtigte Einheiten"},mgmtVotedUnits:{cs:"Abgestimmte Einheiten",de:"Abgestimmte Einheiten",en:"Abgestimmte Einheiten"},mgmtNotVotedUnits:{cs:"Nicht abgestimmte Einheiten",de:"Nicht abgestimmte Einheiten",en:"Nicht abgestimmte Einheiten"},mgmtEligibleShares:{cs:"Stimmberechtigte Gesamtanteile",de:"Stimmberechtigte Gesamtanteile",en:"Stimmberechtigte Gesamtanteile"},legalTitle:{cs:"Právnà základ výsledku",de:"Rechtsgrundlagen des Ergebnisses",en:"Legal basis of the result"},legalBody:{cs:`§ 24 Abs 1 WEG 2002 â hlasovánà formou obÄžnÃkového usnesenà (pÃsemnÄ / elektronicky). 201§ 24 Abs 3 WEG 2002 â hlasovacà právo se ÅÃdà výšà spoluvlastnických podÃlů. 202§ 24 Abs 4 WEG 2002 â usnesenà je pÅijato prostou vÄtÅ¡inou odevzdaných hlasů podle podÃlů, resp. kvalifikovanou vÄtÅ¡inou (2/3 odevzdaných hlasů a souÄasnÄ 1/3 vÅ¡ech podÃlů). 203§ 24 Abs 5 WEG 2002 â výsledek musà být oznámen vÅ¡em spoluvlastnÃkům.`,de:`§ 24 Abs 1 WEG 2002 â Beschlussfassung im Wege eines Umlaufbeschlusses (schriftlich / elektronisch). 204§ 24 Abs 3 WEG 2002 â Das Stimmrecht richtet sich nach dem Verhältnis der Miteigentumsanteile. 205§ 24 Abs 4 WEG 2002 â Der Beschluss kommt mit einfacher Mehrheit der abgegebenen Anteilsstimmen bzw. mit qualifizierter Mehrheit (2/3 der abgegebenen Stimmen und zugleich 1/3 aller Anteile) zustande. 206§ 24 Abs 5 WEG 2002 â Das Ergebnis ist allen Miteigentümern bekanntzugeben.`,en:`§ 24(1) WEG 2002 â Resolution by circular vote (in writing / electronically). 207§ 24(3) WEG 2002 â Voting rights are based on the co-ownership shares. 208§ 24(4) WEG 2002 â A resolution is passed by a simple majority of the shares voted, or by a qualified majority (2/3 of votes cast and at the same time 1/3 of all shares). 209§ 24(5) WEG 2002 â The result must be announced to all co-owners.`},appealTitle:{cs:"PouÄenà o možnosti odvolánà (napadenà usnesenÃ)",de:"Rechtsmittelbelehrung (Anfechtung des Beschlusses)",en:"Notice on the right of appeal (challenge of the resolution)"},appealBody:{cs:`Podle § 24 Abs 6 WEG 2002 může každý spoluvlastnÃk napadnout toto usnesenà u soudu ve lhůtÄ jednoho mÄsÃce od oznámenà výsledku (u formálnÃch vad, poruÅ¡enà zákona nebo nedostatku vÄtÅ¡iny). 210Lhůta pro napadenà konÄà dne {deadline1}. 211Návrh se podává v nesporném ÅÃzenà podle § 52 Abs 1 Z 4 WEG 2002 u OkresnÃho soudu Zell am See (Bezirksgericht Zell am See, Salzachtal BundesstraÃe 9, 5700 Zell am See, Rakousko).`,de:`Gemäà § 24 Abs 6 WEG 2002 kann jeder Miteigentümer diesen Beschluss binnen eines Monats ab Bekanntgabe des Ergebnisses gerichtlich anfechten (wegen Formmangels, Gesetzwidrigkeit oder Fehlens der erforderlichen Mehrheit). 212Die Anfechtungsfrist endet am {deadline1}. 213Der Antrag ist im AuÃerstreitverfahren gemäà § 52 Abs 1 Z 4 WEG 2002 beim Bezirksgericht Zell am See (Salzachtal BundesstraÃe 9, 5700 Zell am See, Ãsterreich) einzubringen.`,en:`Pursuant to § 24(6) WEG 2002, every co-owner may challenge this resolution in court within one month of the announcement of the result (on grounds of formal defects, illegality or lack of the required majority). 214The challenge period ends on {deadline1}. 215The application must be filed in non-contentious proceedings pursuant to § 52(1)(4) WEG 2002 with the District Court Zell am See (Bezirksgericht Zell am See, Salzachtal BundesstraÃe 9, 5700 Zell am See, Austria).`}},x1=(e,n)=>!e||e==="automatic"?Ko.legalBody[n]:{absolute_majority:{cs:"§ 24 Abs 4 WEG 2002 â usnesenà je pÅijato absolutnà vÄtÅ¡inou vÅ¡ech spoluvlastnických podÃlů (> 50 % vÅ¡ech podÃlů).",de:"§ 24 Abs 4 WEG 2002 â Der Beschluss kommt mit absoluter Mehrheit aller Miteigentumsanteile zustande (> 50 % aller Anteile).",en:"§ 24(4) WEG 2002 â A resolution is passed by an absolute majority of all co-ownership shares (> 50% of all shares)."}
215,qualified_majority:{cs:"§ 24 Abs 4 WEG 2002 â usnesenà je pÅijato kvalifikovanou vÄtÅ¡inou (⥠2/3 odevzdaných hlasů a souÄasnÄ â¥ 1/3 vÅ¡ech podÃlů).",de:"§ 24 Abs 4 WEG 2002 â Der Beschluss kommt mit qualifizierter Mehrheit zustande (⥠2/3 der abgegebenen Stimmen und zugleich ⥠1/3 aller Anteile).",en:"§ 24(4) WEG 2002 â A resolution is passed by a qualified majority (⥠2/3 of votes cast and at the same time ⥠1/3 of all shares)."},unanimous:{cs:"Rozhodnutà vyžaduje dohodu vÅ¡ech spoluvlastnÃků (jednomyslnost) â napÅ. § 9, § 16 odst. 2 nebo § 32 odst. 5 WEG 2002; vÄtÅ¡inové usnesenà podle § 24 odst. 4 zde nepostaÄuje.",de:"Die Entscheidung erfordert eine Vereinbarung aller Miteigentümer (Einstimmigkeit) â z. B. § 9, § 16 Abs 2 oder § 32 Abs 5 WEG 2002; ein Mehrheitsbeschluss nach § 24 Abs 4 genügt hier nicht.",en:"The decision requires an agreement of all co-owners (unanimity) â e.g. § 9, § 16(2) or § 32(5) WEG 2002; a majority resolution under § 24(4) is not sufficient here."}}[e][n],v1=(e,n)=>{const t=e?new Date(e):new Date,s=new Date(t);return s.setMonth(s.getMonth()+n),s.toLocaleDateString("de-AT",{day:"2-digit",month:"2-digit",year:"numeric"})},ls=e=>e==null?"":Math.round(e).toString().replace(/\B(?=(\d{3})+(?!\d))/g," "),Mi=(e,n=2)=>`${e.toFixed(n).replace(".",",")}%`,cr=e=>e?new Date(e).toLocaleDateString("de-AT",{day:"2-digit",month:"2-digit",year:"numeric"}):"",cc=e=>e?`${new Date(e).toLocaleDateString("de-AT",{day:"2-digit",month:"2-digit",year:"numeric"})} ${new Date(e).toLocaleTimeString("de-AT",{hour:"2-digit",minute:"2-digit"})}`:"",Ew=e=>e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40),Pw="/fonts/DejaVuSans.ttf",Cw="/fonts/DejaVuSans-Bold.ttf";let Jl=null;const jm=e=>{const n=new Uint8Array(e);let t="";for(let s=0;s<n.length;s+=32768)t+=String.fromCharCode(...n.subarray(s,s+32768));return btoa(t)},Dw=async()=>{if(Jl)return Jl;const[e,n]=await Promise.all([fetch(Pw),fetch(Cw)]);if(!e.ok||!n.ok)throw new Error("PDF fonts could not be loaded.");const[t,s]=await Promise.all([e.arrayBuffer(),n.arrayBuffer()]);return Jl={regular:jm(t),bold:jm(s)},Jl};async function km(e){const{summary:n,rows:t}=e,s=!!e.anonymous,i=e.variant==="management",r="de",l=q=>Ko[q][r],o=new dt({unit:"mm",format:"a4",orientation:"portrait"}),u=await Dw();o.addFileToVFS("DejaVuSans.ttf",u.regular),o.addFont("DejaVuSans.ttf","DejaVu","normal"),o.addFileToVFS("DejaVuSans-Bold.ttf",u.bold),o.addFont("DejaVuSans-Bold.ttf","DejaVu","bold");const h=q=>typeof q=="string"?q.replace(/â¥/g,"mind. ").replace(/â¤/g,"max. ").replace(/[ââ]/g,"-").replace(/â/g,"->").replace(/â¦/g,"...").replace(/[Ãâ]/g,"x").replace(/\u00a0/g," ").replace(/[\u200b-\u200d\u2060]/g,"").replace(/ {2,}/g," "):Array.isArray(q)?q.map(h):q,f=o.text.bind(o);o.text=(q,...L)=>f(h(q),...L);const v=o.splitTextToSize.bind(o);o.splitTextToSize=(q,...L)=>v(h(q),...L);const w=o.internal.pageSize.getWidth(),m=14,A=w-m*2,y=[26,26,26],P=[120,120,120],k=[35,91,66],G=[236,241,238],I=[205,211,207],R=q=>{const L=ce=>Ko[ce][q];let M=17;o.setFont("DejaVu","bold"),o.setFontSize(18),o.setTextColor(...y),o.text(L("protocol"),w/2,M,{align:"center"}),M+=6,o.setFont("DejaVu","normal"),o.setFontSize(10),o.text(L("subtitle"),w/2,M,{align:"center"}),M+=4.5,o.setFont("DejaVu","bold"),o.text(L("building"),w/2,M,{align:"center"}),i&&(M+=4.5,o.setFont("DejaVu","normal"),o.setFontSize(9),o.setTextColor(...P),o.text(L("mgmtNote"),w/2,M,{align:"center"}),o.setTextColor(...y)),M+=4,o.setDrawColor(...k),o.setLineWidth(.6),o.line(m,M,w-m,M),M+=6;const Z=q==="en"?n.en:void 0,ae=(Z==null?void 0:Z.subject)||n.subject||n.title,he=5,we=A-he*2;o.setFont("DejaVu","bold"),o.setFontSize(8.2);const b=o.splitTextToSize(ae,we),D=Math.max(18,11+b.length*3.7+3);o.setFillColor(...G),o.rect(m,M,A,D,"F"),o.setFont("DejaVu","normal"),o.setFontSize(7.8),o.setTextColor(...k),o.text(L("subject"),m+he,M+5.5),o.setFont("DejaVu","bold"),o.setFontSize(8.2),o.setTextColor(...y),o.text(b,m+he,M+10.5,{lineHeightFactor:1.35}),M+=D+6;const X=[[L("start"),cr(n.startsAt)],[L("end"),cr(n.endsAt)],...n.durationDays!==null?[[L("duration"),`${n.durationDays} ${L("days")}`]]:[],[L("contacted"),Mi(n.contactedPct,0)],[L("votingType"),(Z==null?void 0:Z.votingTypeLabel)||n.votingTypeLabel]],Y=47,te=3,ue=m+Y+te,ge=A-Y-te-2;
215o.setFontSize(9),X.forEach(([ce,Se])=>{o.setFont("DejaVu","normal"),o.setTextColor(90,90,90);const Te=o.splitTextToSize(ce,Y);o.text(Te,m+Y,M,{align:"right"}),o.setFont("DejaVu","bold"),o.setTextColor(...y);const xe=o.splitTextToSize(Se,ge);o.text(xe,ue,M),M+=Math.max(Te.length,xe.length)*4.1+.7}),M+=1,o.setDrawColor(...I),o.setLineWidth(.2),o.line(m,M,w-m,M),M+=6;{o.setFont("DejaVu","normal"),o.setFontSize(8.4);const ce=o.splitTextToSize(L("participationNote"),A-12),Se=ce.length*4.1+8;o.setFillColor(236,241,238),o.setDrawColor(...k),o.setLineWidth(.8),o.roundedRect(m,M,A,Se,1.5,1.5,"FD"),o.setTextColor(...y),o.text(ce,m+6,M+5.5,{lineHeightFactor:1.3}),M+=Se+6}o.setFont("DejaVu","bold"),o.setFontSize(10),o.setTextColor(...y),o.splitTextToSize(L("channel"),A).forEach(ce=>{o.text(ce,m,M),M+=5}),M+=3,o.setFont("DejaVu","bold"),o.setFontSize(9.5),o.setTextColor(...k),o.text(L("optionOverview"),m,M),M+=4.5,n.perOption.forEach((ce,Se)=>{var lt;const Te=`Option ${Se+1}`,xe=((lt=Z==null?void 0:Z.perOptionLabels)==null?void 0:lt[Se])||ce.label,De=o.splitTextToSize(xe,A-31),it=Math.max(7,De.length*3.8+2.5);o.setFillColor(Se%2===0?247:251,Se%2===0?249:251,Se%2===0?248:251),o.rect(m,M,A,it,"F"),o.setFont("DejaVu","bold"),o.setFontSize(8.5),o.setTextColor(...k),o.text(Te,m+3,M+4.8),o.setFont("DejaVu","normal"),o.setFontSize(8),o.setTextColor(...y),o.text(De,m+28,M+4.8),M+=it}),M+=5,o.setFont("DejaVu","bold"),o.setFontSize(9.5),o.setTextColor(...k),o.text(L("voteResults"),m,M),M+=5;const se=[...n.perOption.map((ce,Se)=>({label:`Option ${Se+1}`,weg:ce.weg,pct:ce.pct,units:ce.units})),...n.abstainedUnits>0?[{label:L("abstentions"),weg:n.abstainedWeg,units:n.abstainedUnits,muted:!0,pct:n.totalWeg?n.abstainedWeg/n.totalWeg*100:0}]:[],...n.notVotedUnits>0?[{label:L("notVoted"),weg:n.notVotedWeg,units:n.notVotedUnits,muted:!0,pct:n.totalWeg?n.notVotedWeg/n.totalWeg*100:0}]:[]],ve=30,Ae=55,Pe=m+ve+3,He=A-ve-3-Ae;se.forEach(ce=>{o.setFont("DejaVu","bold"),o.setFontSize(8.5),o.setTextColor(...ce.muted?P:y);const Se=o.splitTextToSize(ce.label,ve).slice(0,2),Te=Math.max(8,Se.length*3.8+3),xe=M+Te/2-2.2;Se.forEach((De,it)=>{o.text(De,m+ve,M+Te/2-(Se.length-1)*2+it*4+1.2,{align:"right"})}),o.setFillColor(232,232,232),o.rect(Pe,xe,He,4.4,"F"),ce.muted?o.setFillColor(176,176,176):o.setFillColor(...k),o.rect(Pe,xe,Math.max(.6,He*Math.min(ce.pct,100)/100),4.4,"F"),o.setFont("DejaVu","normal"),o.setTextColor(...y),o.setFontSize(6.8),o.text(`${ls(ce.weg)} · ${Mi(ce.pct)} · ${ce.units} ${L("unitsShort")}`,Pe+He+2,xe+3.4),M+=Te}),M+=2,o.setFont("DejaVu","bold"),o.setFontSize(9.5);const F=o.splitTextToSize((Z==null?void 0:Z.resultSentence)||n.resultSentence,A-20),ze=F.length*4.6+12;o.setFillColor(...G),o.setDrawColor(...k),o.rect(m,M,A,ze,"FD"),o.setFont("DejaVu","normal"),o.setFontSize(9),o.setTextColor(90,90,90),o.text(`${L("resultLabel")} ${(Z==null?void 0:Z.officialResult)||n.officialResult}`,m+5,M+6),o.setFont("DejaVu","bold"),o.setFontSize(9.5),o.setTextColor(...y),o.text(F,m+5,M+12),M+=ze+6,o.addPage(),M=20;const Ye=v1(n.endsAt,1);[[L("legalTitle"),x1(n.votingType,q)],[L("appealTitle"),L("appealBody").replace(/\{deadline1\}/g,Ye)]].forEach(([ce,Se])=>{o.setFont("DejaVu","bold"),o.setFontSize(9),o.setTextColor(...y),o.text(ce,m,M),M+=4.3,o.setFont("DejaVu","normal"),o.setFontSize(7.6),o.setTextColor(60,60,60),Se.split(` 216`).forEach(Te=>{o.splitTextToSize(Te,A).forEach(xe=>{o.text(xe,m,M),M+=3.4}),M+=.5}),M+=3})},Q=q=>Ko[q].de;i?(()=>{const q=()=>(o.addPage("a4","portrait"),20),L=(Me,ce)=>{const Se=o.internal.pageSize.getHeight();return ce+Me>Se-18?q():ce},M=(Me,ce)=>(ce=L(13,ce+1.5),o.setFont("DejaVu","bold"),o.setFontSize(10),o.setTextColor(...k),o.text(Me,m,ce),ce+=5,o.setDrawColor(...k),o.setLineWidth(.4),o.line(m,ce,m+40,ce),ce+=4.5,ce),Z=(Me,ce,Se)=>{const Te=(Se==null?void 0:Se.size)??8.5,xe=1.48,De=Te*xe*.352778;o.setFont("DejaVu",Se!=null&&Se.bold?"bold":"normal"),o.setFontSize(Te),o.setTextColor(...(Se==null?void 0:Se.color)??y);const it=o.splitTextToSize(Me,A);return ce=L(it.length*De+((Se==null?void 0:Se.gapAfter)??3),ce),o.text(it,m,ce,{lineHeightFactor:xe}),ce+it.length*De+((Se==null?void 0:Se.gapAfter)??3)},ae=(Me,ce,Se,Te)=>{const De=o.splitTextToSize(Se,A-20),it=9+De.length*4+5;Te=L(it+5,Te),o.setFillColor(248,250,249),o.setDrawColor(...I),o.setLineWidth(.2),o.roundedRect(m,Te,A,it,1.2,1.2,"FD");const lt=Te+5.2;return ce?(o.setFillColor(...k),o.setDrawColor(...k),o.roundedRect(m+4,lt,4.6,4.6,.9,.9,"FD"),o.setFont("DejaVu","bold"),o.setFontSize(7.5),o.setTextColor(255,255,255),o.text("â",m+4+2.3,lt+2.3+1.5,{align:"center"})):(o.setFillColor(255,255,255),o.setDrawColor(170,170,170),o.roundedRect(m+4,lt,4.6,4.6,.9,.9,"FD")),o.setFont("DejaVu","bold"),o.setFontSize(8.5),o.setTextColor(...y),o.text(Me,m+13,lt+3.4),o.setFont("DejaVu","normal"),o.setFontSize(7.8),o.setTextColor(90,90,90),o.text(De,m+13,lt+8),Te
216+it+5},he=(Me,ce,Se)=>{const De=m+58,it=A-58-34,lt=8.6;return Se=L(Me.length*lt+4,Se),Me.forEach(nt=>{const gt=ce>0?Math.max(0,Math.min(1,nt.value/ce)):0;o.setFont("DejaVu",nt.strong?"bold":"normal"),o.setFontSize(7.8),o.setTextColor(...y),o.text(o.splitTextToSize(nt.label,55)[0],m,Se+3.4),o.setFillColor(238,238,238),o.roundedRect(De,Se+.6,it,3.6,.8,.8,"F");const xt=Math.max(0,it*gt);gt>0&&(o.setFillColor(...nt.color),o.roundedRect(De,Se+.6,Math.max(1,xt),3.6,.8,.8,"F"));const Je=Mi(gt*100);xt>16?(o.setFont("DejaVu","bold"),o.setFontSize(6.8),o.setTextColor(255,255,255),o.text(Je,De+xt-2,Se+3.2,{align:"right"}),o.setFont("DejaVu",nt.strong?"bold":"normal"),o.setFontSize(7.6),o.setTextColor(...y),o.text(ls(nt.value),m+A,Se+3.4,{align:"right"})):(o.setFont("DejaVu",nt.strong?"bold":"normal"),o.setFontSize(7.6),o.setTextColor(...y),o.text(`${Je} · ${ls(nt.value)}`,m+A,Se+3.4,{align:"right"})),Se+=lt}),Se+4},we=(Me,ce,Se,Te,xe)=>{o.setFont("DejaVu","bold"),o.setFontSize(8.5);const De=`Option ${ce+1}${Me.label?` â ${Me.label}`:""}`,it=o.splitTextToSize(De,A-8).slice(0,2),lt=it.length*4,nt=23+lt;xe=L(nt+5,xe);const gt=ce===n.winningOptionIndex,xt=Se>0?Me.weg/Se*100:0,Je=Te>0?Me.weg/Te*100:0;o.setFillColor(248,250,249),o.setDrawColor(...gt?k:I),o.setLineWidth(gt?.45:.2),o.roundedRect(m,xe,A,nt,1.4,1.4,"FD"),o.setTextColor(...gt?k:y),o.text(it,m+4,xe+5.5,{lineHeightFactor:1.35});const ht=[["Miteigentumsanteile",ls(Me.weg)],["Anteil der abgegebenen Stimmen",Mi(xt)],["Anteil aller stimmberechtigten Anteile",Mi(Je)],["Anzahl der Einheiten",String(Me.units)]],Xe=(A-8)/2;return ht.forEach(([Yt,Mt],vt)=>{const ft=vt%2,kt=Math.floor(vt/2),Ke=m+4+ft*Xe,yt=xe+9+lt+kt*7;o.setFont("DejaVu","normal"),o.setFontSize(7.2),o.setTextColor(...P),o.text(Yt,Ke,yt),o.setFont("DejaVu","bold"),o.setFontSize(8.1),o.setTextColor(...y),o.text(Mt,Ke,yt+3.7)}),xe+nt+5};let b=20;o.setFont("DejaVu","bold"),o.setFontSize(16),o.setTextColor(...y),o.text(Q("mgmtTitle"),m,b),b+=7,o.setFont("DejaVu","normal"),o.setFontSize(11),o.text(Q("mgmtSubtitle"),m,b),b+=4.5,o.setFont("DejaVu","normal"),o.setFontSize(8),o.setTextColor(...P),o.text(Q("mgmtBodyNote"),m,b),o.setTextColor(...y),b+=5,o.setDrawColor(...k),o.setLineWidth(.6),o.line(m,b,w-m,b),b+=9,b=M(Q("mgmtSubjectHeading"),b),b=Z(n.subject||n.title,b,{size:8.4,gapAfter:4}),b=Z(Q("mgmtSubjectFooter"),b,{size:8,gapAfter:5}),b=M(Q("mgmtVotingInfoHeading"),b);{const Me=[[Q("start"),cr(n.startsAt)]];n.endsAt&&Me.push([Q("end"),cr(n.endsAt)]),n.durationDays!==null&&Me.push([Q("mgmtVotingDeadline"),`${n.durationDays} ${Q("days")}`]),Me.push([Q("mgmtVotingPeriod"),`${cr(n.startsAt)} â ${cr(n.endsAt)}`]);const ce=5.8,Se=Me.length*ce+4;b=L(Se+2,b),o.setFillColor(248,250,249),o.roundedRect(m,b,A,Se,1.2,1.2,"F");let Te=b+5.2;Me.forEach(([xe,De])=>{o.setFont("DejaVu","normal"),o.setFontSize(8.2),o.setTextColor(105,105,105),o.text(xe,m+4,Te),o.setFont("DejaVu","bold"),o.setTextColor(...y),o.text(De,m+62,Te),Te+=ce}),b+=Se+5}b=Z(Q("mgmtParticipationNote"),b,{size:8,gapAfter:4}),b=Z(Q("mgmtChannel"),b,{size:8,gapAfter:5}),b=M(Q("mgmtEvaluationMethod"),b),b=Z(Q("mgmtEvaluationBody"),b,{size:8,gapAfter:5}),b=M(Q("mgmtResultHeading"),b);const W=n.castWeg||1,D=n.eligibleWeg||1,X=[[122,155,132],[45,106,79],[180,160,9
2160],[130,130,150]],Y=n.perOption.map((Me,ce)=>({label:`Option ${ce+1}`,value:Me.weg,color:ce===n.winningOptionIndex?k:X[ce%X.length],strong:ce===n.winningOptionIndex}));n.abstainedWeg>0&&Y.push({label:"Enthaltungen",value:n.abstainedWeg,color:[170,170,170]}),Y.push({label:"Nicht abgegeben",value:Math.max(0,n.eligibleWeg-n.castWeg),color:[205,205,205]}),b=he(Y,D,b),b=Z("Balken: Anteil an allen stimmberechtigten Miteigentumsanteilen (100 % = "+ls(n.eligibleWeg)+").",b,{size:7.4,color:P,gapAfter:3}),o.addPage("a4","portrait"),b=20,b=M(Q("mgmtMajorityCheck"),b);const te=n.castWeg>0&&n.winningOptionWeg/n.castWeg>=2/3-1e-9,ue=n.eligibleWeg>0&&n.winningOptionWeg/n.eligibleWeg>=1/3-1e-9;b=ae("Mindestens 2/3 der abgegebenen Stimmen",te,`${ls(n.winningOptionWeg)} / ${ls(n.castWeg)} = ${Mi(n.castWeg>0?n.winningOptionWeg/n.castWeg*100:0)}`,b),b=ae("Mindestens 1/3 aller stimmberechtigten Anteile",ue,`${ls(n.winningOptionWeg)} / ${ls(n.eligibleWeg)} = ${Mi(n.eligibleWeg>0?n.winningOptionWeg/n.eligibleWeg*100:0)}`,b),b=M(Q("voteResults"),b),n.perOption.forEach((Me,ce)=>{b=we(Me,ce,W,D,b)}),n.abstainedUnits>0&&(b=Z(`${Q("abstentions")} ${ls(n.abstainedWeg)} Miteigentumsanteile · ${n.abstainedUnits} Einheiten`,b,{size:7.8,color:P,gapAfter:5}));const ge=!!n.resolutionSnapshotDe||!!n.optionResolutionSnapshotDe,se=n.resolutionSnapshotDe||n.optionResolutionSnapshotDe||"";if(n.originalQuestionDe)b=M(Q("mgmtResolutionHeading"),b),b=Z(`${Q("mgmtOriginalQuestionHeading")}: ${n.originalQuestionDe}`,b,{size:8.2,gapAfter:5});else if(ge){const ce=Math.max(18,11+o.splitTextToSize(se,A-8).length*3.90525246+4);b=L(10+ce+6,b),b=M(Q("mgmtResolutionHeading"),b),o.setFillColor(248,250,249),o.setDrawColor(...k),o.setLineWidth(.5),o.roundedRect(m,b,A,ce,1.5,1.5,"FD"),o.setFont("DejaVu","normal"),o.setFontSize(8.2),o.setTextColor(...y),o.text(o.splitTextToSize(se,A-8),m+4,b+7,{lineHeightFactor:1.35}),b+=ce+6}b=M(Q("mgmtResultFallbackHeading"),b);const ve=(n.officialResult||"").trim().toLowerCase()==="angenommen",Ae=n.subject?` (${n.subject})`:"",Pe=ve?`Im Rahmen des Umlaufbeschlusses der Eigentümergemeinschaft Bachwinkl 34 (WEG Bachwinkl 34) wurde ${n.winningOptionLabel}${Ae} mit der erforderlichen Mehrheit gemäà § 24 Abs 4 WEG 2002 angenommen.`:`Im Rahmen des Umlaufbeschlusses der Eigentümergemeinschaft Bachwinkl 34 (WEG Bachwinkl 34)${Ae} wurde die nach § 24 Abs 4 WEG 2002 erforderliche Mehrheit nicht erreicht. Es ist kein Beschluss zustande gekommen. Die meisten Stimmen entfielen auf ${n.winningOptionLabel}.`;b=Z(Pe,b,{size:8.3,gapAfter:5}),b=M("Hinweis zu TOP 53",b),b=Z(Q("mgmtTop53Note"),b,{size:8}),b=M(Q("mgmtLegalHeading"),b),b=Z(Q("mgmtLegalBody"),b,{size:8}),b=M(Q("mgmtAppealHeading"),b);const He=Qo(n.postedOnBoardAt);let F="";const ze=zm(new Date),Ye=He?He.year*1e4+He.month*100+He.day>ze.year*1e4+ze.month*100+ze.day:!1;if(He&&!Ye){const Me=gu(He,"ordinary_24");F=`Gemäà § 24 Abs 6 WEG 2002 kann jeder Miteigentümer diesen Beschluss binnen eines Monats ab dem Tag des Anschlags im Haus gerichtlich anfechten (wegen Formmangels, Gesetzwidrigkeit oder Fehlens der erforderlichen Mehrheit). 217 218Tag des Anschlags im Haus: ${ni(Me.postingDate)} 219Ende der Anfechtungsfrist: ${ni(Me.oneMonth)} 220 221Der Antrag ist im AuÃerstreitverfahren gemäà § 52 Abs 1 Z 4 WEG 2002 beim ${Q("mgmtCourt")} einzubringen.`}else He?F=`Gemäà § 24 Abs 6 WEG 2002 kann jeder Miteigentümer diesen Beschluss binnen eines Monats ab dem tatsächlichen Tag des Anschlags im Haus gerichtlich anfechten (wegen Formmangels, Gesetzwidrigkeit oder Fehlens der erforderlichen Mehrheit). 222 223Vorgesehener Tag des Anschlags: ${ni(He)} 224Tag des tatsächlichen Anschlags im Haus: noch nicht bestätigt 225Ende der Anfechtungsfrist: wird erst nach Bestätigung des tatsächlichen Anschlagdatums berechnet 226 227Der Antrag ist im AuÃerstreitverfahren gemäà § 52 Abs 1 Z 4 WEG 2002 beim ${Q("mgmtCourt")} einzubringen.`:F=`Gemäà § 24 Abs 6 WEG 2002 kann jeder Miteigentümer diesen Beschluss binnen eines Monats ab dem Tag des Anschlags im Haus gerichtlich anfechten (wegen Formmangels, Gesetzwidrigkeit oder Fehlens der erforderlichen Mehrheit). 228 229Tag des Anschlags im Haus: noch nicht erfasst 230Ende der Anfechtungsfrist: wird nach Eintragung des tatsächlichen Anschlagdatums berechnet 231 232Der Antrag ist im AuÃerstreitverfahren gemäà § 52 Abs 1 Z 4 WEG 2002 beim ${Q("mgmtCourt")} einzubringen.`;b=Z(F,b,{size:8}),n.sentAt&&(b=Z(`Datum der Versendung des Abstimmungsergebnisses über das System: ${cr(n.sentAt)}`,b,{size:8,color:P}),b=Z("Dieses Datum dokumentiert den im System gespeicherten Versandzeitpunkt. Die ordnungsgemäÃe individuelle Ãbersendung gemäà § 24 Abs 5 WEG 2002 wird dadurch allein nicht festgestellt.",b,{size:7.8,color:P})),b=L(12,b),o.setFont("DejaVu","normal"),o.setFontSize(7.5),o.setTextColor(120,120,120),o.text(o.splitTextToSize(Q("mgmtSystemNote"),A),m,b)})():(R("de"),o.addPage(),R("en")),o.addPage("a4","landscape");const K=o.internal.pageSize.getWidth()-m*2;o.setFont("DejaVu","bold"),o.setFontSize(12),o.setTextColor(...y),o.text(l("detailTitle"),m,16);const H=q=>{if(!q.votedAt)return"-";if(q.abstained)return l("abstention");const L=n.perOption.findIndex(M=>M.label===q.optionLabel);return L>=0?`Option ${L+1}`:q.optionLabel};ym(o,{startY:20,margin:{left:m,right:m,top:16,bottom:16},head:[[l("colNr"),l("colTop"),l("colRv"),l("colObjekt"),l("colPct"),l("colDate"),l("colSelectedOption"),l("proof")]],body:h(t.map(q=>[q.nr,q.top,ls(q.wegRv),ls(q.wegObjekt),Mi(q.wegPct,4),cc(q.votedAt),H(q),q.fingerprint?"X":""])),foot:[[{content:l("total"),colSpan:2},ls(t.reduce((q,L)=>q+(L.wegRv||0),0)),ls(n.totalWeg),Mi(100,4),"","",String(t.filter(q=>q.fingerprint).length)]],showFoot:"lastPage",tableWidth:K,styles:{font:"DejaVu",fontSize:8.2,cellPadding:2.2,overflow:"linebreak",textColor:y,lineColor:[214,214,214],lineWidth:.12,valign:"middle",minCellHeight:8},headStyles:{fillColor:[252,243,211],textColor:y,fontStyle:"bold",fontSize:8.2,lineColor:[158,158,158],lineWidth:.25,valign:"middle",minCellHeight:13},footStyles:{fillColor:G,textColor:y,fontStyle:"bold",fontSize:8.2},alternateRowStyles:{fillColor:[248,248,248]},columnStyles:{0:{cellWidth:14,halign:"right"},1:{cellWidth:25},2:{cellWidth:34,halign:"right"},3:{cellWidth:38,halign:"right"},4:{cellWidth:35,halign:"right"},5:{cellWidth:47,halign:"right"},6:{cellWidth:55,fontStyle:"bold"},7:{cellWidth:21,halign:"center"}},didParseCell:q=>{var M;q.section==="body"&&q.column.index===6&&!((M=t[q.row.index])!=null&&M.votedAt)&&(q.cell.styles.textColor=P),q.
232section==="body"&&q.column.index===6&&/^Option \d+$/.test(String(q.cell.raw))&&(q.cell.styles.textColor=k)}});const ie=o.lastAutoTable.finalY+5;if(o.setFont("DejaVu","normal"),o.setFontSize(7),o.setTextColor(70,70,70),i||o.text(o.splitTextToSize(l("excludedNote"),K),m,ie),i){o.addPage("a4","portrait");const q=20;o.setFont("DejaVu","bold"),o.setFontSize(12),o.setTextColor(...y),o.text(Q("mgmtDetailSummary"),m,q);const L=[["Gesamtmiteigentumsanteile (stimmberechtigt)",ls(n.eligibleWeg)],["Abgegebene Stimmen (Miteigentumsanteile)",ls(n.castWeg)],["Nicht abgegebene Stimmen (Miteigentumsanteile)",ls(n.eligibleWeg-n.castWeg)],["Stimmberechtigte Einheiten",String(n.eligibleUnits)],["Abgegebene Einheiten",String(n.votedUnits)],["Nicht abgegebene Einheiten",String(n.eligibleUnits-n.votedUnits)]];ym(o,{startY:q+6,margin:{left:m,right:m,top:16,bottom:16},body:h(L),tableWidth:120,styles:{font:"DejaVu",fontSize:8.5,cellPadding:2.5,overflow:"linebreak",textColor:y,lineColor:[214,214,214],lineWidth:.12,valign:"middle"},columnStyles:{0:{fontStyle:"bold",fillColor:[252,243,211]},1:{halign:"right"}}})}const j=o.getNumberOfPages();for(let q=1;q<=j;q++){o.setPage(q);const L=o.internal.pageSize.getWidth(),M=o.internal.pageSize.getHeight();o.setFont("DejaVu","normal"),o.setFontSize(7),o.setTextColor(140,140,140),o.text(`${l("generated")}: ${new Date().toLocaleString("de-AT")} · ID: ${n.pollId}`,m,M-7),o.text(`${q} / ${j}`,L-m,M-7,{align:"right"})}const z=new Date().toISOString().slice(0,10),C=n.pollId.slice(0,8),$=i?`${l("fileNameMgmt")}-${C}-${z}`:s?`${l("fileNameAnon")}-${C}-${z}`:`${l("fileName")}-${C}-${z}`;o.save(`${$}.pdf`)}function Tw(e){const{summary:n,rows:t}=e,s=!!e.anonymous,i="de",r=C=>Ko[C][i],l=[[r("protocol")],[r("subtitle")],[r("building")],[],[r("subject"),n.subject||n.title],[],[r("start"),cr(n.startsAt)],[r("end"),cr(n.endsAt)],...n.durationDays!==null?[[r("duration"),`${n.durationDays} ${r("days")}`]]:[],[r("contacted"),Mi(n.contactedPct,0)],[r("votingType"),n.votingTypeLabel],[],[r("channel")],[],["",r("colVote"),r("colRv"),r("colPct"),""]];n.perOption.forEach(C=>l.push([C.label,C.units,C.weg,C.pct/100])),n.abstainedUnits>0&&l.push([r("abstentions"),n.abstainedUnits,n.abstainedWeg,n.totalWeg?n.abstainedWeg/n.totalWeg:0]),n.notVotedUnits>0&&l.push([r("notVoted"),n.notVotedUnits,n.notVotedWeg,n.totalWeg?n.notVotedWeg/n.totalWeg:0]),l.push([r("total"),n.eligibleUnits,n.totalWeg,1]),l.push([]),l.push([r("resultLabel"),n.officialResult]),l.push(["",n.resultSentence]),l.push([]),l.push([r("legalTitle")]),x1(n.votingType,i).split(` 233`).forEach(C=>l.push([C])),l.push([]),l.push([r("appealTitle")]),r("appealBody").replace(/\{deadline1\}/g,v1(n.endsAt,1)).split(` 234`).forEach(C=>l.push([C])),l.push([]),l.push([r("excludedNote")]),s&&l.push([r("anonNote")]),l.push([]),l.push([r("generated"),new Date().toLocaleString("de-AT")]),l.push(["ID",n.pollId]);const o=gs.aoa_to_sheet(l);o["!cols"]=[{wch:34},{wch:22},{wch:18},{wch:14}],o.A1&&(o.A1.s={font:{bold:!0,sz:16,name:"Arial"}});const u=[r("colNr"),r("colTop"),...s?[]:[r("colOwner"),r("colRep")],r("colRv"),r("colObjekt"),r("colPct"),r("colDate"),r("colVote"),r("colFp"),r("colComment")],h=s?4:6,f=[u];t.forEach(C=>f.push([C.nr,C.top,...s?[]:[C.owners,C.representative||""],C.wegRv??"",C.wegObjekt,C.wegPct/100,cc(C.votedAt),C.votedAt?C.abstained?r("abstention"):C.optionLabel:r("notVotedCell"),C.fingerprint?"X":"",C.comment||""])),f.push([r("total"),"",...s?[]:["",""],t.reduce((C,$)=>C+($.wegRv||0),0),"",1,"","",t.filter(C=>C.fingerprint).length,""]),f.push([]),f.push([r("excludedNote")]),s&&f.push([r("anonNote")]);const v=gs.aoa_to_sheet(f);v["!cols"]=u.map((C,$)=>({wch:Math.min(Math.max(...f.slice(0,-2).map(q=>String(q[$]??"").length),C.length)+2,60)}));const w=gs.decode_range(v["!ref"]);for(let C=w.s.c;C<=w.e.c;C++){const $=v[gs.encode_cell({r:0,c:C})];$&&($.s={font:{bold:!0,name:"Arial"},fill:{fgColor:{rgb:"FDF3D3"}}})}for(let C=1;C<=w.e.r;C++){const $=v[gs.encode_cell({r:C,c:h})];$&&typeof $.v=="number"&&($.z="0.000000%")}const m=[r("colTop"),...s?[]:[r("colOwner")],r("colVote"),r("colDate"),r("colComment")],A=t.filter(C=>{var $;return($=C.comment)==null?void 0:$.trim()}),y=[m];A.forEach(C=>y.push([C.top,...s?[]:[C.owners],C.votedAt?C.abstained?r("abstention"):C.optionLabel:r("notVotedCell"),cc(C.votedAt),C.comment]));const P=gs.aoa_to_sheet(y);P["!cols"]=s?[{wch:10},{wch:18},{wch:14},{wch:90}]:[{wch:10},{wch:34},{wch:18},{wch:14},{wch:90}];const k=gs.decode_range(P["!ref"]);for(let C=k.s.c;C<=k.e.c;C++){const $=P[gs.encode_cell({r:0,c:C})];$&&($.s={font:{bold:!0,name:"Arial"},fill:{fgColor:{rgb:"FDF3D3"}}})}const G=[r("colNr"),r("colTop"),...s?[]:[r("colOwner"),r("colVoter"),r("colEmail")],r("colDate"),r("colVote"),r("colFp"),r("colIp"),r("colBrowser"),r("colOs"),r("colDevice"),r("colLocation"),r("colIsp")],I=[G];t.filter(C=>C.votedAt).forEach(C=>I.push([C.nr,C.top,...s?[]:[C.owners,C.voterName||C.representative||"",C.voterEmail||""],cc(C.votedAt),C.abstained?r("abstention"):C.optionLabel,C.fingerprint?"X":"",C.ip||"",C.browser||"",C.os||"",C.deviceType||"",C.location||"",C.isp||""])),I.push([]),I.push([r("fpNote")]),s&&I.push([r("anonNote")]);const R=gs.aoa_to_sheet(I);R["!cols"]=G.map((C,$)=>({wch:Math.min(Math.max(...I.slice(0,-2).map(q=>String(q[$]??"").length),C.length)+2,40)}));const Q=gs.decode_range(R["!ref"]);for(let C=Q.s.c;C<=Q.e.c;C++){const $=R[gs.encode_cell({r:0,c:C})];$&&($.s={font:{bold:!0,name:"Arial"},fill:{fgColor:{rgb:"FDF3D3"}}})}const me=gs.book_new();gs.book_append_sheet(me,o,r("sheetSummary")),gs.book_append_sheet(me,v,r("sheetDetail")),gs.book_append_sheet(me,P,r("sheetComments")),gs.book_append_sheet(me,R,r("sheetFingerprint"));const oe=new Date().toISOString().slice(0,10),K=`${r(s?"fileNameAnon":"fileName")}-${Ew(n.title)||n.pollId.slice(0,8)}-${oe}.xlsx`,H=O0(me,{bookType:"xlsx",type:"array"}),ie=new Blob([H],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),j=URL.createObjectURL(ie),z=document.createElement("a");z.href=j,z.download=K,z.rel="noopener",z.style.display="none",document.body.appendChild(z),z.click(),setTimeout(()=>{document.body.removeChild(z),URL.revokeObjectURL(j)},2e3)}
234const Am={automatic:{de:"Absolute oder qualifizierte Mehrheit gemäà § 24 Abs 4 WEG 2002",en:"Absolute or qualified majority pursuant to § 24 para 4 WEG 2002"},absolute_majority:{de:"Absolute Mehrheit aller Miteigentumsanteile (§ 24 Abs 4 WEG 2002)",en:"Absolute majority of all co-ownership shares (§ 24 para 4 WEG 2002)"},qualified_majority:{de:"Qualifizierte Mehrheit: 2/3 der abgegebenen und 1/3 aller Anteile (§ 24 Abs 4 WEG 2002)",en:"Qualified majority: 2/3 of votes cast and 1/3 of all shares (§ 24 para 4 WEG 2002)"},unanimous:{de:"Einstimmigkeit aller Miteigentümer (Vereinbarung â z. B. § 9, § 16 Abs 2, § 32 Abs 5 WEG 2002)",en:"Unanimity of all co-owners (agreement â e.g. § 9, § 16(2), § 32(5) WEG 2002)"}},Sm=(e,n)=>e!=="automatic"?e:n.absoluteMajority.met?"absolute_majority":n.qualifiedMajority.met?"qualified_majority":"automatic",Xl={pageTitle:{cs:"Výsledky hlasovánÃ",de:"Abstimmungsergebnisse",en:"Poll Results"},admin:{cs:"Administrace",de:"Administration",en:"Administration"},polls:{cs:"HlasovánÃ",de:"Abstimmungen",en:"Polls"},results:{cs:"Výsledky",de:"Ergebnisse",en:"Results"},emails:{cs:"E-maily",de:"E-Mails",en:"Emails"},sendReminder:{cs:"Poslat pÅipomÃnku",de:"Erinnerung senden",en:"Send Reminder"},close:{cs:"UkonÄit",de:"Beenden",en:"Close"},edit:{cs:"Upravit",de:"Bearbeiten",en:"Edit"},exportPdf:{cs:"Export PDF",de:"PDF exportieren",en:"Export PDF"},exportXlsx:{cs:"Export do Excelu",de:"Excel-Export",en:"Export to Excel"},exportPdfAnon:{cs:"PDF bez jmen",de:"PDF ohne Namen",en:"PDF without names"},exportXlsxAnon:{cs:"Excel bez jmen",de:"Excel ohne Namen",en:"Excel without names"},exportMgmt:{cs:"PDF pro správu (DE)",de:"PDF Hausverwaltung (DE)",en:"PDF for management (DE)"},info:{cs:"Informace",de:"Informationen",en:"Information"},active:{cs:"ProbÃhá",de:"Aktiv",en:"Active"},planned:{cs:"Plánované",de:"Geplant",en:"Planned"},closed:{cs:"UkonÄené",de:"Beendet",en:"Closed"},accepted:{cs:"PÅijato",de:"Angenommen",en:"Accepted"},rejected:{cs:"ZamÃtnuto",de:"Abgelehnt",en:"Rejected"},from:{cs:"Od",de:"Von",en:"From"},to:{cs:"Do",de:"Bis",en:"To"},type:{cs:"Metoda vyhodnocenÃ",de:"Auswertungsmethode",en:"Evaluation method"},comments:{cs:"KomentáÅe",de:"Kommentare",en:"Comments"},commentsAllowed:{cs:"Povoleny",de:"Erlaubt",en:"Allowed"},commentsForbidden:{cs:"Zakázány",de:"Deaktiviert",en:"Disabled"},participation:{cs:"ÃÄast",de:"Beteiligung",en:"Participation"},unitsVoted:{cs:"Hlasovalo jednotek",de:"Einheiten abgestimmt",en:"Units voted"},wegSubmitted:{cs:"WEG odevzdáno",de:"WEG abgegeben",en:"WEG submitted"},wegTotal:{cs:"WEG celkem",de:"WEG gesamt",en:"WEG total"},wegShare:{cs:"WEG podÃl",de:"WEG Anteil",en:"WEG share"},thresholds:{cs:"Zákonné prahy (§ 24 WEG)",de:"Gesetzliche Schwellenwerte (§ 24 WEG)",en:"Legal thresholds (§ 24 WEG)"},optionA:{cs:"Varianta A â Absolutnà vÄtÅ¡ina",de:"Variante A â Abs
234olute Mehrheit",en:"Option A â Absolute majority"},optionB:{cs:"Varianta B â Kvalifikovaná vÄtÅ¡ina",de:"Variante B â Qualifizierte Mehrheit",en:"Option B â Qualified majority"},absoluteMajority:{cs:">50 % vÅ¡ech podÃlů",de:">50 % aller Anteile",en:">50% of all shares"},qualifiedMajority:{cs:"Kvalif. vÄtÅ¡ina",de:"Qualif. Mehrheit",en:"Qualified majority"},qualifiedAbsolute:{cs:"â¥1/3 celk. WEG",de:"â¥1/3 ges. WEG",en:"â¥1/3 total WEG"},evaluation:{cs:"VyhodnocenÃ",de:"Auswertung",en:"Evaluation"},wegCast:{cs:"Odevzdáno WEG",de:"WEG abgegeben",en:"WEG cast"},met:{cs:"SplnÄno â",de:"Erfüllt â",en:"Met â"},notMet:{cs:"NesplnÄno â",de:"Nicht erfüllt â",en:"Not met â"},votesFor:{cs:'Hlasy âpro" (podÃly)',de:'âJa"-Stimmen (Anteile)',en:'"Yes" votes (shares)'},requiredAbsolute:{cs:"PotÅeba (>50 % vÅ¡ech)",de:"Erforderlich (>50 % aller)",en:"Required (>50% of all)"},requiredQualified:{cs:"PotÅeba (â¥2/3 odevzd.)",de:"Erforderlich (â¥2/3 abgeg.)",en:"Required (â¥2/3 cast)"},majorityAbsolute:{cs:"Absolutnà vÄtÅ¡ina",de:"Absolute Mehrheit",en:"Absolute majority"},majorityQualified:{cs:"2/3 vÄtÅ¡ina",de:"2/3 Mehrheit",en:"2/3 majority"},absoluteCondition:{cs:"Absolutnà podmÃnka (â¥1/3 celk.)",de:"Absolute Bedingung (â¥1/3 ges.)",en:"Absolute condition (â¥1/3 total)"},absoluteThreshold:{cs:"â¥1/3 celk. WEG potÅeba",de:"â¥1/3 ges. WEG erforderlich",en:"â¥1/3 total WEG required"},result:{cs:"Výsledek",de:"Ergebnis",en:"Result"},byAbsolute:{cs:"Absolutnà vÄtÅ¡ina vÅ¡ech WEG podÃlů",de:"Absolute Mehrheit aller Anteile",en:"Absolute majority of all shares"},byQualified:{cs:"Kvalifikovaná vÄtÅ¡ina",de:"Qualifizierte Mehrheit",en:"Qualified majority"},infoAbsolute:{cs:'Pro schválenà musà hlasy âpro" pÅesáhnout <strong>50 % vÅ¡ech WEG podÃlů</strong> (nikoli jen odevzdaných hlasů).',de:'Für die Annahme müssen die âJa"-Stimmen <strong>50 % aller WEG-Anteile</strong> überschreiten (nicht nur der abgegebenen Stimmen).',en:'For approval, "yes" votes must exceed <strong>50% of all WEG shares</strong> (not just cast votes).'},infoQualified:{cs:'Pro schválenà musà hlasy âpro" dosáhnout <strong>â¥2/3 odevzdaných hlasů</strong> a zároveÅ <strong>â¥1/3 vÅ¡ech WEG podÃlů</strong>.',de:'Für die Annahme müssen die âJa"-Stimmen <strong>â¥2/3 der abgegebenen Stimmen</strong> und gleichzeitig <strong>â¥1/3 aller WEG-Anteile</strong> erreichen.',en:'For approval, "yes" votes must reach <strong>â¥2/3 of cast votes</strong> and simultaneously <strong>â¥1/3 of all WEG shares</strong>.'},evalAutoExplanation:{cs:"Systém posuzuje obÄ zákonné cesty podle § 24 odst. 4 WEG. Výsledek je kladný, pokud je splnÄna alespoÅ jedna z nich.",de:"Das System prüft beide gesetzlichen Wege gemäà § 24 Abs 4 WEG. Das Ergebnis ist positiv, wenn mindestens einer erfüllt ist.",en:"The system evaluates both legal paths under § 24(4) WEG. The result is positive if at least one path is met."},tabAbsolute:{cs:"Absolutnà vÄtÅ¡ina",de:"Absolute Mehrheit",en:"Absolute majority"},tabQualified:{cs:"Kvalifikovaná vÄtÅ¡ina",de:"Qualifizierte Mehrheit",en:"Qualified majority"},tabUnanimous:{cs:"Jednomyslnost",de:"Einstimmigkeit",en:"Unanimity"},variantEvalTitle:{cs:"Vyhodnocenà dle § 24 odst. 4 WEG 2002",de:"Auswertung gemäà § 24 Abs 4 WEG 2002",en:"Evaluation under § 24(4) WEG 2002"},variantEvalNote:{cs:"Každá varianta se testuje samostatnÄ: nejprve absolutnà vÄtÅ¡ina vÅ¡ech podÃlů, poté kvalifikovaná cesta (2/3 odevzdaných + min. 1/3 vÅ¡ech).",de:"Jede Variante wird eigenständig geprüft: zuerst absolute Mehrheit aller Anteile, danach der qualifizierte Weg (2/3 der abgegebenen + mind. 1/3 aller).",en:"Each option is tested separately: first the absolute majority of all shares, then the qualified path (2/3 of cast + at least 1/3 of all)."},digitalTitle:{cs:"Digitálnà hlasovánà je legitimnà způsob tvorby vůle",de:"Digitale Abstimmung ist eine zulässige Form der Willensbildung",en:"Digital voting is a legitimate form of decision-making"}
234,digitalNote:{cs:"Podle § 24 odst. 1 WEG 2002 mohou usnesenà spoleÄenstvà vlastnÃků vznikat i mimo shromáždÄnÃ, zejména pÃsemnou cestou (obÄžné hlasovánÃ). PÃsemná forma je zachována i v elektronické podobÄ (§ 24 odst. 2 WEG 2002) a novela WEG 2022 (BGBl. I Ä. 222/2021, úÄinná od 1. 7. 2022) elektronickou komunikaci výslovnÄ pÅedpokládá â § 25 odst. 2a (elektronická úÄast na shromáždÄnÃ) a § 24 odst. 5 (elektronické doruÄovánà usnesenà na žádost vlastnÃka).",de:"Nach § 24 Abs 1 WEG 2002 können Beschlüsse der Eigentümergemeinschaft auch auÃerhalb der Eigentümerversammlung â insbesondere auf schriftlichem Weg (Umlaufbeschluss) â zustande kommen. Die Schriftlichkeit ist auch in elektronischer Form gewahrt (§ 24 Abs 2 WEG 2002), und die WEG-Novelle 2022 (BGBl. I Nr. 222/2021, in Kraft seit 1.7.2022) sieht elektronische Kommunikation ausdrücklich vor â § 25 Abs 2a (elektronische Teilnahme an der Versammlung) und § 24 Abs 5 (elektronische Ãbermittlung von Beschlüssen auf Verlangen).",en:"Under § 24(1) WEG 2002, resolutions of the owners' community may also be adopted outside the owners' meeting, in particular in writing (circular resolution). Written form is also satisfied electronically (§ 24(2) WEG 2002), and the WEG Amendment 2022 (BGBl. I No. 222/2021, in force since 1 July 2022) expressly provides for electronic communication â § 25(2a) and § 24(5)."},digitalLink:{cs:"Novela WEG 2022 (BGBl. I Ä. 222/2021)",de:"WEG-Novelle 2022 (BGBl. I Nr. 222/2021)",en:"WEG Amendment 2022 (BGBl. I No. 222/2021)"},colVariant:{cs:"Varianta",de:"Variante",en:"Option"},colShares:{cs:"PodÃly",de:"Anteile",en:"Shares"},colAbsolute:{cs:"Absolutnà (1. cesta)",de:"Absolut (1. Weg)",en:"Absolute (path 1)"},colQualified:{cs:"Kvalifikovaná (2. cesta)",de:"Qualifiziert (2. Weg)",en:"Qualified (path 2)"},colOutcome:{cs:"Výsledek",de:"Ergebnis",en:"Outcome"},variantAccepted:{cs:"PÅijato",de:"Angenommen",en:"Adopted"},variantAcceptedShort:{cs:"PÅijato",de:"Angenommen",en:"Adopted"},variantRejectedShort:{cs:"ZamÃtnuto",de:"Abgelehnt",en:"Rejected"},variantNotAccepted:{cs:"â",de:"â",en:"â"},decisivePath:{cs:"RozhodujÃcà cesta",de:"MaÃgeblicher Weg",en:"Decisive path"},rejectedPaths:{cs:"Ani jedna zákonná cesta nebyla splnÄna.",de:"Kein gesetzlicher Weg wurde erfüllt.",en:"No legal path was satisfied."},showOtherPath:{cs:"Zobrazit i druhou zákonnou cestu",de:"Auch den anderen gesetzlichen Weg anzeigen",en:"Show the other legal path too"},hideOtherPath:{cs:"Skrýt druhou cestu",de:"Anderen Weg ausblenden",en:"Hide the other path"},absolutePathShort:{cs:"Absolutnà vÄtÅ¡ina vÅ¡ech podÃlů",de:"Absolute Mehrheit aller Anteile",en:"Absolute majority of all shares"},qualifiedPathShort:{cs:"Kvalifikovaná vÄtÅ¡ina â 2/3 odevzdaných a min. 1/3 vÅ¡ech podÃlů",de:"Qualifizierte Mehrheit â 2/3 abgegeben und mind. 1/3 aller Anteile",en:"Qualified majority â 2/3 cast and at least 1/3 of all shares"},pathHeading:{cs:"Právnà cesta rozhodnutÃ",de:"Rechtlicher Weg der Beschlussfassung",en:"Legal path of the decision"},pathNone:{cs:"Žádná varianta nedosáhla ani absolutnÃ, ani kvalifikované vÄtÅ¡iny â usnesenà nebylo pÅijato.",de:"Keine Variante erreichte weder die absolute noch die qualifizierte Mehrheit â der Beschluss kam nicht zustande.",en:"No option reached either the absolute or the qualified majority â the resolution was not adopted."},reminders:{cs:"PÅipomÃnky",de:"Erinnerungen",en:"Reminders"},allVoted:{cs:"VÅ¡echny oprávnÄné jednotky již hlasovaly.",de:"Alle berechtigten Einheiten haben bereits abgestimmt.",en:"All eligible units have already voted."},lastSent:{cs:"Poslednà odeslánÃ",de:"Zuletzt gesendet",en:"Last sent"},recipientCount:{cs:"PoÄet pÅÃjemců",de:"Empfängeranzahl",en:"Recipient count"},noReminderYet:{cs:"PÅipomÃnka zatÃm nebyla odeslána.",de:"Erinnerung wurde noch nicht gesendet.",en:"No reminder sent yet."},voteDistribution:{cs:"Rozloženà hlasů",de:"Stimmenverteilung",en:"Vote Distribution"},option:{cs:"Možnost",de:"Option",en:"Option"},votesCol:{cs:"Hlasů",de:"Stimmen",en:"Votes"},votePct:{cs:"% hlasů",de:"% Stimmen",en:"% votes"},noVotesYet:{cs:"ZatÃm žádné hlasy.",de:"Noch keine Stimmen.",en:"No votes yet."},leading:{cs:"Vede",de:"Führt",en:"Leading"},total:{cs:"Celkem",de:"Gesamt",en:"Total"},nonVoters:{cs:"Nehlasovali",de:"Nicht abgestimmt",en:"Non-voters"},individualVotes:{cs:"Jednotlivé hlasy",de:"Einzelne Stimmen",en:"Individual Votes"},voter:{cs:"HlasujÃcÃ",de:"Wähler",en:"Voter"},apartment:{cs:"Apartmán",de:"Wohnung",en:"Apartment"},chosenOption:{cs:"Zvolená možnost",de:"Gewählte Option",en:"Chosen option"},date:{cs:"Datum",de:"Datum",en:"Date"},comment:{cs:"KomentáÅ",de:"Kommentar",en:"Comment"},actions:{cs:"Akce",de:"Aktionen",en:"Actions"},noVotes:{cs:"ZatÃm žádné hlasy",de:"Noch keine Stimmen",en:"No votes yet"},representative:{cs:"PovÄÅená osoba",de:"Bevollmächtigte Person",en:"Authorized person"},representationMode:{cs:"Způsob zastoupenÃ",de:"Vertretungsart",en:"Representation mode"},modeSoleOwner:{cs:"Výhradnà vlastnÃk",de:"Alleineigentümer",en:"Sole owner"},modeJointVote:{cs:"Dohoda spoluvlastnÃků",de:"Vereinbarung der Miteigentümer",en:"Joint owner agreement"},modeWrittenProxy:{cs:"PÃsemná plná moc",de:"Schriftliche Vollmacht",en:"Written proxy"},modeRetroactive:{cs:"ZpÄtné schválenÃ",de:"Nachträgliche Genehmigung",en:"Retroactive approval"},modeNotApplicable:{cs:"Neplatné",de:"Nicht anwendbar",en:"Not applicable"},statusValid:{cs:"Platný",de:"Gültig",en:"Valid"},statusDeclared:{cs:"Prohlášenà hlasujÃcÃho",de:"Erklärung des Wählers",en:"Voter declaration"},statusPending:{cs:"Námitková lhůta bÄžÃ",de:"Einspruchsfrist läuft",en:"Objection period open"},statusRejected:{cs:"ZamÃtnuto",de:"Abgelehnt",en:"Rejected"},statusExpired:{cs:"VyprÅ¡elo",de:"Abgelaufen",en:"Expired"},techDetails:{cs:"Technické detaily",de:"Technische Details",en:"Technical details"},browser:{cs:"ProhlÞeÄ",de:"Browser",en:"Browser"},device:{cs:"ZaÅÃzenÃ",de:"Gerät",en:"Device"},country:{cs:"ZemÄ",de:"Land",en:"Country"},city:{cs:"MÄsto",de:"Stadt",en:"City"},auditLog:{cs:"Audit log",de:"Audit-Log",en:"Audit Log"},auditVoter:{cs:"HlasujÃcÃ",de:"Wähler",en:"Voter"},auditOrigDate:{cs:"Původnà datum",de:"Urspr. Datum",en:"Original date"},auditDeletedBy:{cs:"Smazal",de:"Gelöscht von",en:"Deleted by"},auditDeletedAt:{cs:"Smazáno",de:"Gelöscht am",en:"Deleted at"},auditReason:{cs:"Důvod",de:"Grund",en:"Reason"},deleteVote:{cs:"Smazat hlas",de:"Stimme löschen",en:"Delete vote"},deleteVoteDesc:{cs:"Po smazánà hlasu bude uživatel moci hlasovat zn
234ovu. Tato akce bude zaznamenána v audit logu.",de:"Nach dem Löschen kann der Benutzer erneut abstimmen. Diese Aktion wird im Audit-Log aufgezeichnet.",en:"After deletion, the user will be able to vote again. This action will be recorded in the audit log."},deleteReason:{cs:"Důvod smazánà *",de:"Löschgrund *",en:"Reason for deletion *"},deleteReasonPlaceholder:{cs:"NapÅ. Uživatel hlasoval omylem, duplicitnà hlasovánÃ...",de:"Z.B. Benutzer hat versehentlich abgestimmt, doppelte Abstimmung...",en:"E.g. User voted by mistake, duplicate vote..."},evidenceLabel:{cs:"Důkaz (pÅÃloha)",de:"Nachweis (Anhang)",en:"Evidence (attachment)"},evidenceDesc:{cs:"Nahrajte screenshot nebo e-mail jako důkaz žádosti o smazánÃ.",de:"Laden Sie einen Screenshot oder eine E-Mail als Nachweis hoch.",en:"Upload a screenshot or email as evidence of the deletion request."},evidenceUploading:{cs:"Nahrávám...",de:"Wird hochgeladen...",en:"Uploading..."},auditEvidence:{cs:"Důkaz",de:"Nachweis",en:"Evidence"},cancel:{cs:"ZruÅ¡it",de:"Abbrechen",en:"Cancel"},closePollTitle:{cs:"UkonÄit hlasovánÃ",de:"Abstimmung beenden",en:"Close Poll"},closePollDesc:{cs:"Opravdu chcete ukonÄit toto hlasovánÃ? Äas ukonÄenà bude nastaven na aktuálnà Äas.",de:"Möchten Sie diese Abstimmung wirklich beenden? Die Endzeit wird auf die aktuelle Zeit gesetzt.",en:"Are you sure you want to close this poll? The end time will be set to the current time."},closePollConfirm:{cs:"UkonÄit",de:"Beenden",en:"Close"},reminderTitle:{cs:"Poslat pÅipomÃnku k hlasovánÃ",de:"Abstimmungserinnerung senden",en:"Send Poll Reminder"},summary:{cs:"Souhrn",de:"Zusammenfassung",en:"Summary"},recipients:{cs:"PÅÃjemci",de:"Empfänger",en:"Recipients"},emailPreview:{cs:"Náhled e-mailu",de:"E-Mail-Vorschau",en:"Email Preview"},votingSummary:{cs:"Souhrn hlasovánÃ",de:"Abstimmungsübersicht",en:"Voting Summary"},eligibleUnits:{cs:"OprávnÄné jednotky",de:"Berechtigte Einheiten",en:"Eligible units"},validlyVoted:{cs:"ValidnÄ odhlasováno",de:"Gültig abgestimmt",en:"Validly voted"},pendingApproval:{cs:"Äeká na schválenÃ",de:"Genehmigung ausstehend",en:"Pending approval"},toRemind:{cs:"K pÅipomenutÃ",de:"Zu erinnern",en:"To remind"},emailRecipients:{cs:"PÅÃjemci e-mailu",de:"E-Mail-Empfänger",en:"Email recipients"},uniqueRecipients:{cs:"Unikátnà pÅÃjemci",de:"Eindeutige Empfänger",en:"Unique recipients"},noEmail:{cs:"Bez e-mailu",de:"Ohne E-Mail",en:"No email"},never:{cs:"Nikdy",de:"Nie",en:"Never"},recentReminderWarn:{cs:"PÅipomÃnka byla odeslána dnes",de:"Erinnerung wurde heute gesendet",en:"Reminder was sent today"},sendAgainQ:{cs:"Opravdu chcete poslat dalÅ¡Ã?",de:"Möchten Sie eine weitere senden?",en:"Do you want to send another?"},reminderInfo:{cs:"PÅipomÃnka bude odeslána pouze kontaktům navázaným na jednotky bez validnÃho hlasu. Jednotky ÄekajÃcà na schválenà a jednotky s existujÃcÃm hlasem spoluvlastnÃka nejsou zahrnuty.",de:"Die Erinnerung wird nur an Kontakte gesendet, die Einheiten ohne gültige Stimme zugeordnet sind. Einheiten mit ausstehender Genehmigung und mit bestehender Miteigentümerstimme werden nicht einbezogen.",en:"The reminder will be sent only to contacts linked to units without a valid vote. Units pending approval and units with an existing co-owner vote are excluded."},selectAll:{cs:"Vybrat vÅ¡e",de:"Alle auswählen",en:"Select all"},deselectAll:{cs:"ZruÅ¡it výbÄr",de:"Auswahl aufheben",en:"Deselect all"},selected:{cs:"Vybráno",de:"Ausgewählt",en:"Selected"},of:{cs:"z",de:"von",en:"of"},name:{cs:"Jméno",de:"Name",en:"Name"},units:{cs:"Jednotky",de:"Einheiten",en:"Units"},lang:{cs:"Jazyk",de:"Sprache",en:"Language"},noRecipients:{cs:"Žádnà pÅÃjemci",de:"Keine Empfänger",en:"No recipients"},subject:{cs:"PÅedmÄt",de:"Betreff",en:"Subject"},emailBody:{cs:"TÄlo e-mailu",de:"E-Mail-Text",en:"Email body"},sampleFor:{cs:"ukázka pro prvnÃho pÅÃjemce, jazyk",de:"Beispiel für ersten Empfänger, Sprache",en:"sample for first recipient, language"},previewNA:{cs:"Náhled nenà k dispozici",de:"Vorschau nicht verfügbar",en:"Preview not available"},sendAgain:{cs:"Ano, odeslat znovu",de:"Ja, erneut senden",en:"Yes, send again"}
234,sendReminderBtn:{cs:"Odeslat pÅipomÃnku",de:"Erinnerung senden",en:"Send reminder"},unitsToRemind:{cs:"jednotek k pÅipomenutÃ",de:"Einheiten zu erinnern",en:"units to remind"},recipientsWithEmail:{cs:"pÅÃjemců s e-mailem",de:"Empfänger mit E-Mail",en:"recipients with email"},withoutEmail:{cs:"bez e-mailu",de:"ohne E-Mail",en:"without email"},officialEvalType:{cs:"Platný typ vyhodnocenÃ",de:"Gültiger Auswertungstyp",en:"Official evaluation type"},officialResult:{cs:"Oficiálnà výsledek",de:"Offizielles Ergebnis",en:"Official result"},heroQuestion:{cs:"Hlasovacà otázka",de:"Abstimmungsfrage",en:"Voting question"},heroWinningOption:{cs:"PÅijatá varianta",de:"Angenommene Option",en:"Accepted option"},heroLeadingOption:{cs:"Vedoucà varianta",de:"Führende Option",en:"Leading option"},heroRejectedOption:{cs:"NejsilnÄjšà varianta (zamÃtnuta)",de:"Stärkste Option (abgelehnt)",en:"Strongest option (rejected)"},bySimple:{cs:"Podle jednoduché vÄtÅ¡iny",de:"Nach einfacher Mehrheit",en:"By simple majority"},tabSimple:{cs:"Jednoduchá vÄtÅ¡ina",de:"Einfache Mehrheit",en:"Simple majority"},changeTypeConfirm:{cs:"Opravdu zmÄnit platný typ vyhodnocenÃ?",de:"Auswertungstyp wirklich ändern?",en:"Really change official evaluation type?"},changeTypeFlipConfirm:{cs:"ZmÄna typu vyhodnocenà pÅevrátà oficiálnà výsledek z",de:"Die Ãnderung des Auswertungstyps kehrt das offizielle Ergebnis um von",en:"Changing evaluation type will flip the official result from"},toWord:{cs:"na",de:"zu",en:"to"},typeChangeReason:{cs:"Důvod zmÄny",de:"Ãnderungsgrund",en:"Reason for change"},reasonRequired:{cs:"Důvod je povinný pÅi zmÄnÄ výsledku",de:"Grund ist erforderlich bei Ergebnisänderung",en:"Reason is required when result changes"},typeChanged:{cs:"Platný typ vyhodnocenà byl zmÄnÄn",de:"Gültiger Auswertungstyp wurde geändert",en:"Official evaluation type was changed"},lastChange:{cs:"Poslednà zmÄna",de:"Letzte Ãnderung",en:"Last change"},evalCompareNote:{cs:"Oba výpoÄty sloužà pro porovnánÃ. Oficiálnà výsledek se ÅÃdà platným typem vyhodnocenÃ.",de:"Beide Berechnungen dienen dem Vergleich. Das offizielle Ergebnis richtet sich nach dem gültigen Auswertungstyp.",en:"Both calculations are for comparison. The official result follows the selected evaluation type."},evalCompareNoteAuto:{cs:"Oba výpoÄty jsou zobrazeny pro porovnánÃ. Hlasovánà má orientaÄnà charakter.",de:"Beide Berechnungen werden zum Vergleich angezeigt. Die Abstimmung hat orientierenden Charakter.",en:"Both calculations are shown for comparison. This poll is indicative."},evalAutoNoOfficial:{cs:"Toto hlasovánà má orientaÄnà charakter. Výsledek je zobrazen podle jednoduché i kvalifikované vÄtÅ¡iny bez urÄenà jednoho oficiálnÃho výsledku.",de:"Diese Abstimmung hat orientierenden Charakter. Das Ergebnis wird nach einfacher und qualifizierter Mehrheit angezeigt, ohne ein offizielles Ergebnis festzulegen.",en:"This poll is indicative. Results are shown by both simple and qualified majority without determining one official result."},evalModeLabel:{cs:"Režim vyhodnocenÃ",de:"Auswertungsmodus",en:"Evaluation mode"},evalModeAuto:{cs:"OrientaÄnà vyhodnocenÃ",de:"Orientierungsauswertung",en:"Indicative evaluation"},evalModeManual:{cs:"Formálnà vyhodnocenÃ",de:"Formale Auswertung",en:"Formal evaluation"},evalAutoLabel:{cs:"OrientaÄnÃ",de:"Orientierend",en:"Indicative"},continueQ:{cs:"PokraÄovat?",de:"Fortfahren?",en:"Continue?"},whatIfTitle:{cs:"Analýza dopadu nehlasujÃcÃch",de:"Auswirkungsanalyse der Nichtwähler",en:"Impact analysis of non-voters"},whatIfIntro:{cs:'Co se stane s výsledkem, pokud by zbývajÃcà nehlasujÃcà jednotky odhlasovaly âpro" (nejlepšà pÅÃpad) nebo âproti" / se zdrželi (nejhoršà pÅÃpad).',de:'Was passiert mit dem Ergebnis, wenn die verbleibenden nicht stimmenden Einheiten mit âJa" (bester Fall) oder âNein" / Enthaltung (schlechtester Fall) abstimmen würden.',en:'What happens to the result if the remaining non-voting units would vote "yes" (best case) or "no" / abstain (worst case).'},nonVoterWegLabel:{cs:"WEG nehlasujÃcÃch",de:"WEG der Nichtwähler",en:"Non-voter WEG"},nonVoterPctLabel:{cs:"PodÃl z celkového WEG",de:"Anteil am gesamten WEG",en:"Share of total WEG"},scenarioBest:{cs:'Nejlepšà pÅÃpad (vÅ¡e âpro")',de:'Bester Fall (alle âJa")',en:'Best case (all "yes")'},scenarioWorst:{cs:'Nejhoršà pÅÃpad (nehlasujÃcà dohlasujà âproti" / zdrženà se)',de:'Schlechtester Fall (Nichtwähler stimmen âNein" / enthalten sich)',en:'Worst case (non-voters vote "no" / abstain)'}
234,scenarioBestHint:{cs:'Pokud by vÅ¡ichni dosud nehlasujÃcà odhlasovali âpro".',de:'Wenn alle bisherigen Nichtwähler mit âJa" stimmen würden.',en:'If all current non-voters voted "yes".'},scenarioWorstHint:{cs:'Pokud by vÅ¡ichni dosud nehlasujÃcà odhlasovali âproti" nebo se zdrželi. Hlasy âpro" zůstávajà stejné, ale roste celkový poÄet odevzdaných â tÃm se zhorÅ¡uje pomÄr a může selhat kvalifikovaná vÄtÅ¡ina (2/3 odevzdaných).',de:'Wenn alle bisherigen Nichtwähler mit âNein" stimmen oder sich enthalten würden. Die âJa"-Stimmen bleiben gleich, aber die Gesamtzahl der abgegebenen Stimmen steigt â das Verhältnis verschlechtert sich.',en:'If all current non-voters voted "no" or abstained. "Yes" votes stay the same, but total cast increases â worsening the ratio.'},scenarioCurrent:{cs:"Aktuálnà stav",de:"Aktueller Stand",en:"Current state"},scenarioYes:{cs:'Hlasy âpro"',de:'âJa"-Stimmen',en:'"Yes" votes'},scenarioCast:{cs:"Odevzdáno celkem",de:"Gesamt abgegeben",en:"Total cast"},scenarioOutcome:{cs:"Výsledek",de:"Ergebnis",en:"Outcome"},gapTitle:{cs:"Kolik chybà do schválenÃ",de:"Was bis zur Annahme fehlt",en:"How much is missing for approval"},gapAbsolute:{cs:"Do absolutnà vÄtÅ¡iny (>50 %)",de:"Bis zur absoluten Mehrheit (>50 %)",en:"To absolute majority (>50%)"},gapQualified2of3:{cs:"Do 2/3 odevzdaných hlasů",de:"Bis 2/3 der abgegebenen Stimmen",en:"To 2/3 of cast votes"},gapQualified1of3:{cs:"Do 1/3 vÅ¡ech WEG",de:"Bis 1/3 aller WEG-Anteile",en:"To 1/3 of all WEG shares"},gapAlreadyMet:{cs:"SplnÄno",de:"Erfüllt",en:"Met"},whatIfDecided:{cs:"Výsledek je již rozhodnut â nehlasujÃcà ho nemohou zmÄnit.",de:"Das Ergebnis steht bereits fest â Nichtwähler können es nicht ändern.",en:"The result is already decided â non-voters cannot change it."},whatIfStillOpen:{cs:"Výsledek závisà na nehlasujÃcÃch jednotkách.",de:"Das Ergebnis hängt von den nicht stimmenden Einheiten ab.",en:"The outcome depends on the non-voting units."},whatIfNoneLeft:{cs:"VÅ¡echny oprávnÄné jednotky již hlasovaly.",de:"Alle berechtigten Einheiten haben abgestimmt.",en:"All eligible units have voted."},liveResultTitle:{cs:"Aktuálnà průbÄžné vyhodnocenÃ",de:"Aktuelle vorläufige Auswertung",en:"Current preliminary evaluation"},liveResultLabel:{cs:"PrůbÄžný výsledek",de:"Vorläufiges Ergebnis",en:"Preliminary result"},evaluatedByRule:{cs:"Vyhodnoceno podle pravidla",de:"Ausgewertet nach Regel",en:"Evaluated by rule"},evaluatedAuto:{cs:"Vyhodnoceno automaticky",de:"Automatisch ausgewertet",en:"Evaluated automatically"},autoStatusBoth:{cs:"splnÄna obÄ pravidla",de:"beide Regeln erfüllt",en:"both rules met"},autoStatusOnlyAbs:{cs:"splnÄna pouze absolutnà vÄtÅ¡ina",de:"nur absolute Mehrheit erfüllt",en:"only absolute majority met"},autoStatusOnlyQual:{cs:"splnÄna pouze kvalifikovaná vÄtÅ¡ina",de:"nur qualifizierte Mehrheit erfüllt",en:"only qualified majority met"},autoStatusNone:{cs:"nesplnÄno žádné pravidlo",de:"keine Regel erfüllt",en:"no rule met"},heroVotesFor:{cs:"Pro WEG",de:"Ja-WEG",en:"Yes WEG"},heroRequired:{cs:"PotÅeba",de:"Erforderlich",en:"Required"},heroReserve:{cs:"Rezerva",de:"Reserve",en:"Reserve"},heroGap:{cs:"ChybÃ",de:"Fehlt",en:"Missing"},changeEvalType:{cs:"ZmÄnit typ vyhodnocenÃ",de:"Auswertungstyp ändern",en:"Change evaluation type"},rulesCheckTitle:{cs:"Kontrola vyhodnocovacÃch pravidel",de:"Prüfung der Auswertungsregeln",en:"Evaluation rules check"},colRule:{cs:"Pravidlo",de:"Regel",en:"Rule"},colStatus:{cs:"Stav",de:"Status",en:"Status"},colVotesFor:{cs:"Pro WEG",de:"Ja-WEG",en:"Yes WEG"},colRequired:{cs:"PotÅeba",de:"Erforderlich",en:"Required"},colLimitState:{cs:"Stav vůÄi limitu",de:"Stand ggü. Grenze",en:"State vs limit"},subCondition2of3:{cs:"â¥2/3 odevzdaných",de:"â¥2/3 der abgegebenen",en:"â¥2/3 of cast"},subCondition1of3:{cs:"â¥1/3 vÅ¡ech WEG",de:"â¥1/3 aller WEG",en:"â¥1/3 of all WEG"},effectiveNeed:{cs:"EfektivnÄ potÅeba",de:"Effektiv erforderlich",en:"Effectively required"},effectiveNeedHint:{cs:"Kvalifikovaná vÄtÅ¡ina vyžaduje splnÄnà OBOU podmÃnek souÄasnÄ, proto rozhoduje vyššà z obou ÄÃsel.",de:"Die qualifizierte Mehrheit erfordert BEIDE Bedingungen gleichzeitig, daher gilt der höhere der beiden Werte.",en:"Qualified majority requires BOTH conditions at once, so the higher of the two numbers applies."},limitStateTitle:{cs:"Stav vůÄi požadovaným limitům",de:"Stand gegenüber erforderlichen Grenzen",en:"State vs required limits"},reserveLabel:{cs:"Rezerva",de:"Reserve",en:"Reserve"},gapLabel:{cs:"ChybÃ",de:"Fehlt",en:"Missing"},sensitivityBothStable:{cs:"Zvolené pravidlo je stabilnÃ. NehlasujÃcà již nemohou zmÄnit aktuálnà výsledek.",de:"Die gewählte Regel ist stabil. Nichtwähler können das aktuelle Ergebnis nicht mehr ändern.",en:"The selected rule is stable. Non-voters can no longer change the current outcome."},sensitivityAltOnly:{cs:"Zvolené pravidlo je stabilnÃ, ale alternativnà pravidlo je citlivé na dalšà hlasy.",de:"Die gewählte Regel ist stabil, aber die alternative Regel reagiert empfindlich auf weitere Stimmen.",en:"The selected rule is stable, but the alternative rule is sensitive to further votes."},sensitivityOfficial:{cs:"Aktuálnà výsledek se může zmÄnit podle hlasovánà zbývajÃcÃch jednotek.",de:"Das aktuelle Ergebnis kann sich je nach Abstimmung der verbleibenden Einheiten ändern.",en:"The current outcome may change depending on how the remaining units vote."},scenariosTitle:{cs:"ScénáÅe nehlasujÃcÃch",de:"Szenarien der Nichtwähler",en:"Non-voter scenarios"},rulesExplanationTitle:{cs:"VysvÄtlenà pravidel",de:"Erläuterung der Regeln",en:"Explanation of rules"},tabRules:{cs:"Pravidla",de:"Regeln",en:"Rules"},tabImpact:{cs:"Dopad nehlasujÃcÃch",de:"Auswirkung Nichtwähler",en:"Non-voter impact"},tabScenarios:{cs:"ScénáÅe",de:"Szenarien",en:"Scenarios"},scenarioDecided:{cs:"Výsledek je rozhodnut, nehlasujÃcà ho nezmÄnÃ.",de:"Das Ergebnis steht fest, Nichtwähler können es nicht ändern.",en:"The outcome is decided; non-voters cannot change it."},scenarioRuleSensitive:{cs:"NÄkteré pravidlo je citlivé na dalšà hlasy.",de:"Eine der Regeln reagiert empfindlich auf weitere Stimmen.",en:"One of the rules is sensitive to further votes."},participationAndWegTitle:{cs:"ÃÄast / WEG podÃly",de:"Beteiligung / WEG-Anteile",en:"Participation / WEG shares"},voteDistributionWeg:{cs:"Rozloženà podle WEG",de:"Verteilung nach WEG",en:"Distribution by WEG"},notVotedLabel:{cs:"Nehlasovalo",de:"Nicht abgestimmt",en:"Not voted"}
234,sendResults:{cs:"Odeslat výsledek",de:"Ergebnis senden",en:"Send results"},sendResultsAgain:{cs:"Znovu odeslat výsledek",de:"Ergebnis erneut senden",en:"Resend results"},sendResultsDialogTitle:{cs:"Odeslat výsledek hlasovánÃ",de:"Abstimmungsergebnis senden",en:"Send poll results"},sendResultsDialogDesc:{cs:"Odeslat e-mail s výsledkem hlasovánà vÅ¡em oprávnÄným vlastnÃkům? E-mail obsahuje právnà upozornÄnà dle § 24 odst. 6 WEG 2002 (lhůta 1 mÄsÃc pro napadenÃ).",de:"E-Mail mit Abstimmungsergebnis an alle berechtigten Eigentümer senden? Die E-Mail enthält die gesetzliche Hinweis gemäà § 24 Abs. 6 WEG 2002 (Monatsfrist für Anfechtung).",en:"Send an email with the poll results to all eligible owners? The email contains the legal notice under § 24(6) WEG 2002 (1 month challenge period)."},sendResultsSuccess:{cs:"Výsledek odeslán",de:"Ergebnis gesendet",en:"Results sent"},sendResultsSentDesc:{cs:"Odesláno: {sent}, chyby: {failed} (pÅÃjemců: {total}).",de:"Gesendet: {sent}, Fehler: {failed} (Empfänger: {total}).",en:"Sent: {sent}, failed: {failed} (recipients: {total})."},visibilityLegalNotice:{cs:"Právnà upozornÄnà k WEG 2002: Zákon neukládá povinnost zveÅejÅovat průbÄžné výsledky bÄhem hlasovánÃ. Po uzavÅenà hlasovánà se vlastnÃkům zpÅÃstupnà výsledek vÄetnÄ rozpadu hlasů po jednotlivých bytech (§ 24 odst. 5).",de:"Rechtshinweis WEG 2002: Das Gesetz schreibt keine Veröffentlichung vorläufiger Ergebnisse während der Abstimmung vor. Nach SchlieÃung steht den Eigentümern das Ergebnis einschlieÃlich der Stimmenaufschlüsselung nach Einheiten zur Verfügung (§ 24 Abs. 5).",en:"Legal notice under WEG 2002: The law does not require publication of interim results during voting. After the poll closes, owners are given access to the result including the vote breakdown by individual units (§ 24(5))."},navJumpTo:{cs:"PÅejÃt na",de:"Springen zu",en:"Jump to"},navLegal:{cs:"Právnà vyhodnocenÃ",de:"Rechtliche Auswertung",en:"Legal evaluation"}},zw="hsl(var(--primary))",Fw="hsl(var(--muted-foreground) / 0.35)",Lm=e=>e?zw:Fw,c_=()=>{var jr;const{id:e}=x0(),n=v0(),{user:t}=b0(),{toast:s}=oo(),{language:i}=Lc(),r=i||"en",l=J=>Xl[J][r]||Xl[J].en,[o,u]=be.useState(null),[h,f]=be.useState([]),[v,w]=be.useState([]),[m,A]=be.useState([]),[y,P]=be.useState(!0),[k,G]=be.useState(!1),[I,R]=be.useState(!0),[Q,me]=be.useState(new Set),[oe,K]=be.useState(null),[H,ie]=be.useState(!1),[j,z]=be.useState(null),[C,$]=be.useState(""),[q,L]=be.useState(null),[M,Z]=be.useState(null),[ae,he]=be.useState(!1),[we,b]=be.useState(!1),[W,D]=be.useState(!1),[X,Y]=be.useState(!1),[te,ue]=be.useState(null),[ge,se]=be.useState(""),[ve,Ae]=be.useState(!1),[Pe,He]=be.useState(null),[F,ze]=be.useState("results"),[Ye,Me]=be.useState(!1),[ce,Se]=be.useState(!1),[Te,xe]=be.useState(null),[De,it]=be.useState(0),[lt,nt]=be.useState(null),gt=()=>o?i==="cs"&&o.title_cs?o.title_cs:i==="en"&&o.title_en?o.title_en:o.title:"",xt=()=>o?i==="cs"&&o.description_cs?o.description_cs:i==="en"&&o.description_en?o.description_en:o.description:null,Je=()=>{var J,Re;return o?i==="cs"&&((J=o.options_cs)!=null&&J.length)?o.options_cs:i==="en"&&((Re=o.options_en)!=null&&Re.length)?o.options_en:o.options:[]};be.useEffect(()=>{e&&ht()},[e]);const ht=async()=>{var Le,Tt;P(!0);const[J,Re,mt,Nt,Bt]=await Promise.all([Be.from("polls").select("*").eq("id",e).maybeSingle(),Be.rpc("admin_get_poll_votes",{_poll_id:e}).then(ye=>({data:ye.data,error:ye.error})),Be.from("poll_vote_audit").select("*").eq("poll_id",e).order("deleted_at",{ascending:!1}),Be.from("apartments").select("code, weg_anteil_rv, excluded_from_voting").order("sort_order"),Be.from("apartment_owners").select("apartment_id, owner_contact_id, is_current, share_percentage, member_from, owner_contacts(first_name, last_name, company_name)").eq("is_current",!0)]);if(J.error||!J.data){s({variant:"destructive",title:"Chyba",description:"Hlasovánà nebylo nalezeno."}),n("/admin?section=polls");return}const tn={...J.data,options:Array.isArray(J.data.options)?J.data.options:[],options_cs:Array.isArray(J.data.options_cs)?J.data.options_cs:null,options_en:Array.isArray(J.data.options_en)?J.data.options_en:null,resolution:J.data.resolution??null,allow_comments:J.data.allow_comments??!1,voting_type:J.data.voting_type||"automatic",source_language:J.data.source_language??null};u(tn);const At=new Map,Fn=new Map;new Map((Nt.data||[]).map(ye=>[ye.code,ye]));const{data:Kt}=await Be.from("apartments").select("id, code"),yn=new Map((Kt||[]).map(ye=>[ye.id,ye.code])),Qn=new Set;
234(Bt.data||[]).forEach(ye=>{const Ue=yn.get(ye.apartment_id);if(Ue&&ye.owner_contacts){const Qe=ye.owner_contacts,We=[Qe.first_name,Qe.last_name].filter(Boolean).join(" ")||null,It=Qe.company_name||null,Zn=It?We?`${It} (${We})`:It:We||"";At.has(Ue)||At.set(Ue,[]),At.get(Ue).push({name:Zn,share_percentage:ye.share_percentage,companyName:It,personName:We})}if(Ue&&ye.member_from){const Qe=Fn.get(Ue);(!Qe||ye.member_from<Qe)&&Fn.set(Ue,ye.member_from)}ye.owner_contact_id&&Qn.add(ye.owner_contact_id)});const un=[...Qn],Rt=new Map;if(un.length>0){const{data:ye}=await Be.from("owner_contact_persons").select("owner_contact_id, first_name, last_name, role_label, can_vote").eq("can_vote",!0).in("owner_contact_id",un),Ue=new Map;(Bt.data||[]).forEach(Qe=>{const We=yn.get(Qe.apartment_id);We&&Qe.owner_contact_id&&(Ue.has(Qe.owner_contact_id)||Ue.set(Qe.owner_contact_id,[]),Ue.get(Qe.owner_contact_id).push(We))}),(ye||[]).forEach(Qe=>{const We=Ue.get(Qe.owner_contact_id)||[],It=[Qe.first_name,Qe.last_name].filter(Boolean).join(" ");We.forEach(Zn=>{Rt.has(Zn)||Rt.set(Zn,[]),Rt.get(Zn).push({name:It,role_label:Qe.role_label})})})}A((Nt.data||[]).map(ye=>{const Ue=At.get(ye.code)||[];return{...ye,owner_name:Ue.length>0?Ue[0].name:null,owners:Ue,representatives:Rt.get(ye.code)||[],member_from:Fn.get(ye.code)||null}}));const Gt=[...new Set((Re.data||[]).map(ye=>ye.user_id))],sn=[...new Set((Re.data||[]).map(ye=>ye.ballot_id).filter(Boolean))],[ss,Ln,jn]=await Promise.all([Gt.length>0?Be.from("profiles").select("user_id, first_name, last_name, full_name").in("user_id",Gt):Promise.resolve({data:[]}),Gt.length>0?Be.from("owner_contact_persons").select("user_id, role_label, owner_contact_id, owner_contacts:owner_contact_id(first_name, last_name, company_name, email)").in("user_id",Gt):Promise.resolve({data:[]}),sn.length>0?Be.from("poll_ballots").select("id, country, region, city, isp, representation_mode, representation_status").in("id",sn):Promise.resolve({data:[]})]),mi=ss.data||[],is=Ln.data||[],Vs=new Map;is.forEach(ye=>{const Ue=ye.owner_contacts,Qe=Ue&&([Ue.first_name,Ue.last_name].filter(Boolean).join(" ")||Ue.company_name)||null;Vs.set(ye.user_id,{role_label:ye.role_label||null,owner_name:Qe,owner_email:(Ue==null?void 0:Ue.email)||null})});const ri=new Map((jn.data||[]).map(ye=>[ye.id,ye]));f((Re.data||[]).map(ye=>{const Ue=mi.find(It=>It.user_id===ye.user_id),Qe=ye.ballot_id?ri.get(ye.ballot_id):null,We=Vs.get(ye.user_id);return{...ye,profile_name:(Ue!=null&&Ue.first_name?`${Ue.first_name} ${Ue.last_name||""}`.trim():Ue==null?void 0:Ue.full_name)||null,profile_email:(Ue==null?void 0:Ue.email)||null,is_representative:Vs.has(ye.user_id),representative_role_label:(We==null?void 0:We.role_label)||null,represented_owner_name:(We==null?void 0:We.owner_name)||null,represented_owner_email:(We==null?void 0:We.owner_email)||null,representation_mode:(Qe==null?void 0:Qe.representation_mode)||null,representation_status:(Qe==null?void 0:Qe.representation_status)||null,country:(Qe==null?void 0:Qe.country)||null,region:(Qe==null?void 0:Qe.region)||null,city:(Qe==null?void 0:Qe.city)||null,isp:(Qe==null?void 0:Qe.isp)||null}}));const us=[...new Set((mt.data||[]).flatMap(ye=>[ye.user_id,ye.deleted_by]))],{data:Os}=us.length>0?await Be.from("profiles").select("user_id, first_name, last_name, full_name").in("user_id",us):{data:[]},Li=ye=>{if(!ye)return null;const Ue=Os==null?void 0:Os.find(Qe=>Qe.user_id===ye);return(Ue!=null&&Ue.first_name?`${Ue.first_name} ${Ue.last_name||""}`.trim():Ue==null?void 0:Ue.full_name)||null};w((mt.data||[]).map(ye=>({...ye,voter_name:Li(ye.user_id),deleter_name:Li(ye.deleted_by)})));const[,kr,pi]=await Promise.all([Xe(e),Be.from("email_history").select("id",{count:"exact",head:!0}).eq("template_type","vote_reminder").eq("related_entity_id",e).eq("status","sent"),Be.from("email_history").select("sent_at").eq("template_type","vote_reminder").eq("related_entity_id",e).eq("status","sent").order("sent_at",{ascending:!1}).limit(1)]);it(kr.count??0),nt(((Tt=(Le=pi.data)==null?void 0:Le[0])==null?void 0:Tt.sent_at)??null),P(!1)},Xe=async J=>{var mt,Nt;const{data:Re}=await Be.from("poll_admin_audit").select("*").eq("poll_id",J).eq("action_type","voting_type_changed").order("changed_at",{ascending:!1}).limit(1);if(Re&&Re.length>0){const Bt=Re[0],{data:tn}=await Be.from("profiles").select("full_name").eq("user_id",Bt.changed_by).maybeSingle();He({changed_by_name:(tn==null?void 0:tn.full_name)||"?",changed_at:Bt.changed_at,from:((mt=Bt.details)==null?void 0:mt.from)||"",to:((Nt=Bt.details)==null?void 0:Nt.to)||""})}},Yt=async()=>
234{if(!o||!te||!t)return;Ae(!0);const J=$e,Re=Nt=>Nt==="automatic"?null:ar(qe,_t,J,Nt).officialPassed?"accepted":"rejected",{error:mt}=await Be.from("polls").update({voting_type:te}).eq("id",o.id);if(mt){s({variant:"destructive",title:"Chyba",description:mt.message}),Ae(!1);return}await Be.from("poll_admin_audit").insert({poll_id:o.id,action_type:"voting_type_changed",changed_by:t.id,details:{from:o.voting_type,to:te,reason:ge.trim()||null,old_official_result:Re(o.voting_type),new_official_result:Re(te)}}),u({...o,voting_type:te}),await Xe(o.id),s({title:l("typeChanged")}),Y(!1),ue(null),se(""),Ae(!1)},Mt=()=>{if(!o)return"closed";const J=new Date;return!o.is_active||D0(o.ends_at,J)?"closed":new Date(o.starts_at)>J?"not_started":"active"},vt=J=>J?new Date(J).toLocaleDateString("cs-CZ"):"â",ft=J=>new Date(J).toLocaleString("cs-CZ",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}),kt=m.filter(J=>!J.excluded_from_voting),Ke=new Set(h.map(J=>J.apartment_code).filter(Boolean)),yt=kt.filter(J=>!Ke.has(J.code)),Ge=kt.length>0?Ke.size/kt.length*100:0,qe=kt.reduce((J,Re)=>J+(Re.weg_anteil_rv||0),0),_t=kt.filter(J=>Ke.has(J.code)).reduce((J,Re)=>J+(Re.weg_anteil_rv||0),0),Dt=qe>0?_t/qe*100:0,ut=Je(),Ct=ut.map((J,Re)=>{const mt=h.filter(Kt=>Kt.option_index===Re),Nt=new Set(mt.map(Kt=>
234Kt.apartment_code).filter(Boolean)),Bt=Nt.size,tn=kt.filter(Kt=>Nt.has(Kt.code)).reduce((Kt,yn)=>Kt+(yn.weg_anteil_rv||0),0),At=kt.length>0?Bt/kt.length*100:0,Fn=qe>0?tn/qe*100:0;return{name:J,count:Bt,pct:Math.round(At*10)/10,wegSharePct:Math.round(Fn*10)/10,wegShare:tn}});Math.max(...Ct.map(J=>J.count),1);const Ws=Ct.reduce((J,Re,mt)=>Re.wegSharePct>Ct[J].wegSharePct?mt:J,0),wn=yt.reduce((J,Re)=>J+(Re.weg_anteil_rv||0),0),$n=E0(qe,_t,Ct.map(J=>J.wegShare),(o==null?void 0:o.voting_type)||"automatic",(o==null?void 0:o.ballot_kind)||"yes_no"),Ds=$n.proposalIndex,$e=((jr=Ct[Ds])==null?void 0:jr.wegShare)||0,bt=$n.evaluation,si=$e+wn,ys=_t+wn,_s=$e,pn=_t+wn,dn=o?ar(qe,ys,si,o.voting_type):null,gn=o?ar(qe,pn,_s,o.voting_type):null,$i=Math.max(0,bt.absoluteMajority.threshold-$e),Ai=Math.max(0,bt.qualifiedMajority.twoThirdsThreshold-$e),Us=Math.max(0,bt.qualifiedMajority.oneThirdThreshold-$e),ii=J=>/zdrž|zdrz|enthalt|abstain/i.test(J||""),Ts=Ct.filter(J=>ii(J.name)).reduce((J,Re)=>J+Re.wegShare,0),Ns=o!=null&&o.resolution?o.resolution==="accepted":(o==null?void 0:o.voting_type)==="automatic"?bt.automaticPassed:bt.officialPassed,zs=Ns?bt.path==="unanimous"?"Einstimmig gefasst.":bt.path==="qualified"?"Gefasst über die qualifizierte Mehrheit nach § 24 Abs 4 WEG 2002 (mindestens zwei Drittel der abgegebenen Anteile und mindestens ein Drittel aller Miteigentumsanteile).":"Gefasst über die absolute Mehrheit aller Miteigentumsanteile nach § 24 Abs 4 WEG 2002.":"Die erforderliche Mehrheit nach § 24 Abs 4 WEG 2002 wurde nicht erreicht.",Zi=o?{resolutionExists:Ns,majorityPathLabel:zs,majorityPath:bt.path,winningOptionIndex:Ns?Ds:null,votes:{totalWeg:qe,castWeg:_t,yesWeg:$e,noWeg:Math.max(0,_t-$e-Ts),abstainWeg:Ts,eligibleUnits:kt.length,votedUnits:Ke.size},sharesSnapshot:kt.map(J=>({code:J.code,weg:J.weg_anteil_rv||0})),votesSnapshot:h.map(J=>({code:J.apartment_code||"",option_index:J.option_index??null,voted_at:J.created_at||null}))}:null,js=h.filter(J=>{var Re;return(Re=J.comment)==null?void 0:Re.trim()}),Yi=J=>{const Re=new Set(Q);Re.has(J)?Re.delete(J):Re.add(J),me(Re)},br=J=>{z(J),$(""),L(null),Z(null),he(!0)},wr=J=>{var mt;const Re=(mt=J.target.files)==null?void 0:mt[0];if(Re)if(L(Re),Re.type.startsWith("image/")){const Nt=new FileReader;Nt.onload=Bt=>{var tn;return Z((tn=Bt.target)==null?void 0:tn.result)},Nt.readAsDataURL(Re)}else Z(null)},yr=async()=>{if(!j||!C.trim()||!t)return;b(!0);const J=h.find(Bt=>Bt.id===j);if(!J){b(!1);return}let Re=null;if(q){const Bt=q.name.split(".").pop()||"bin",tn=`${J.poll_id}/${J.id}_${Date.now()}.${Bt}`,{error:At}=await Be.storage.from("vote-evidence").upload(tn,q);if(At){s({variant:"destructive",title:"Chyba",description:"NepodaÅilo se nahrát důkaz."}),b(!1);return}Re=tn}const{error:mt}=await Be.from("poll_vote_audit").insert({poll_id:J.poll_id,user_id:J.user_id,option_index:J.option_index,original_vote_id:J.id,original_voted_at:J.created_at,original_ip_address:J.ip_address,original_user_agent:null,deleted_by:t.id,reason:C.trim(),comment:J.comment,evidence_url:Re});if(mt){s({variant:"destructive",title:"Chyba",description:"NepodaÅilo se uložit audit záznam."}),b(!1);return}const{error:Nt}=await Be.from("poll_votes").delete().eq("id",j);Nt?s({variant:"destructive",title:"Chyba",description:"NepodaÅilo se smazat hlas."}):(J.ballot_id&&await Be.from("poll_ballots").delete().eq("id",J.ballot_id),s({title:"Hlas smazán"}),ht()),b(!1),he(!1),z(null)},fo=async()=>{if(!o)return;const J=new Date().toISOString(),{error:Re}=await Be.from("polls").update({is_active:!1,ends_at:J}).eq("id",o.id);Re||await Be.from("polls").update({posted_on_board_at:J}).eq("id",o.id).is("posted_on_board_at",null),Re?s({variant:"destructive",title:"Chyba",description:"NepodaÅilo se ukonÄit hlasovánÃ."}):(s({title:"Hlasovánà ukonÄeno"}),ht()),D(!1)},Zr=async()=>{if(e){Se(!0);try{const{data:J,error:Re}=await Be.functions.invoke("send-poll-results",{body:{poll_id:e}});if(Re)throw Re;s({title:l("sendResultsSuccess"),description:l("sendResultsSentDesc").replace("{sent}",String((J==null?void 0:J.sent)??0)).replace("{failed}",String((J==null?void 0:J.failed)??0)).replace("{total}",String((J==null?void 0:J.total_recipients)??0))}),ht()}catch(J){s({variant:"destructive",title:"Chyba",description:(J==null?void 0:J.message)||"NepodaÅilo se odeslat výsledek."})}finally{Se(!1),Me(!1)}}},_r=()=>{var pi;if(!o)return null;const J=new Map;h.forEach(Le=>{Le.apartment_code&&J.set(Le.apartment_code,Le)});const Re=o.options||[],mt=(pi=o.options_en)!=null&&pi.length?o.options_en:Re,Nt=Le=>/zdrž|zdrz|enthalt|abstain/i.test(Le||""),tn=[...kt].sort((Le,Tt)=>Le.code.localeCompare(Tt.code,void 0,{numeric:!0})).map((Le,Tt)=>{var It,Zn;const ye=J.get(Le.code),Ue=ye?Re[ye.option_index]||`Option ${ye.option_index+1}`:"",Qe=Le.owners.length?Le.owners.map(En=>En.name).join(", "):Le.owner_name||"",We=ye!=null&&ye.is_representative?ye.profile_name||((It=Le.representatives[0])==null?void 0:It.name)||null:((Zn=Le.representatives[0])==null?void 0:Zn.name)||null;return{nr:Tt+1,top:Le.code,owners:Qe,wegRv:Le.weg_anteil_rv,wegObjekt:qe,wegPct:qe>0?(Le.weg_anteil_rv||0)/qe*100:0,votedAt:(ye==null?void 0:ye.created_at)||null,optionLabel:Ue,abstained:!!ye&&Nt(Ue),fingerprint:!!(ye!=null&&ye.ip_address),representative:We,comment:(ye==null?void 0:ye.comment)||null,voterName:(ye==null?void 0:ye.profile_name)||null,voterEmail:(ye==null?void 0:ye.profile_email)||null,ip:(ye==null?void 0:ye.ip_address)||null,browser:(ye==null?void 0:ye.browser)||null,os:(ye
234==null?void 0:ye.os)||null,deviceType:(ye==null?void 0:ye.device_type)||null,location:ye&&[ye.city,ye.region,ye.country].filter(Boolean).join(", ")||null,isp:(ye==null?void 0:ye.isp)||null}}),At=Ct.map((Le,Tt)=>({...Le,name:Re[Tt]||Le.name})).filter(Le=>!Nt(Le.name)).map(Le=>({label:Le.name,units:Le.count,weg:Le.wegShare,pct:qe>0?Le.wegShare/qe*100:0})),Fn=tn.filter(Le=>Le.abstained),Kt=tn.filter(Le=>!Le.votedAt),yn="Angenommen",Qn="Abgelehnt",un=o.resolution?o.resolution==="accepted"?yn:Qn:o.voting_type==="automatic"?bt.automaticPassed?yn:Qn:bt.officialPassed?yn:Qn,Rt=un===yn,Gt=Rt?"Die abstimmenden Eigentümer fassten einen Mehrheitsbeschluss. Der Vorschlag wurde angenommen.":"Die erforderliche Mehrheit wurde nicht erreicht. Der Vorschlag wurde abgelehnt.",sn=o.ends_at?Math.max(1,Math.round((new Date(o.ends_at).getTime()-new Date(o.starts_at).getTime())/864e5)):null,ss=Sm(o.voting_type,bt),Ln=Rt?Ds:Ws,jn=At[Ln]||At[0],mi=jn?`Option ${Ln+1}${jn.label?` â ${jn.label}`:""}`:"",is=(jn==null?void 0:jn.weg)||0,Vs=(jn==null?void 0:jn.units)||0,ri=_t,us=qe,Os=o.resolution_text_snapshot_de||null,Li=(()=>{const Le=o.option_resolution_snapshot_de;return!Le||!Array.isArray(Le)?null:Le[Ln]||null})();return{summary:{pollId:o.id,title:o.title,subject:o.description,startsAt:o.starts_at,endsAt:o.ends_at,durationDays:sn,contactedPct:100,eligibleUnits:kt.length,votedUnits:Ke.size,totalWeg:qe,perOption:At,abstainedWeg:Fn.reduce((Le,Tt)=>Le+(Tt.wegRv||0),0),abstainedUnits:Fn.length,notVotedWeg:Kt.reduce((Le,Tt)=>Le+(Tt.wegRv||0),0),notVotedUnits:Kt.length,officialResult:un,resultSentence:Gt,votingTypeLabel:Am[ss].de,votingType:ss,en:{subject:o.description_en||o.title_en||o.description||o.title,perOptionLabels:At.map((Le,Tt)=>mt[Re.indexOf(Le.label)]||mt[Tt]||Le.label),officialResult:Rt?"Accepted":"Rejected",resultSentence:Rt?"The voting owners passed a majority resolution. The proposal was accepted.":"The required majority was not reached. The proposal was rejected.",votingTypeLabel:Am[ss].en},postedOnBoardAt:o.posted_on_board_at||null,sentAt:o.results_sent_at||null,resolutionSnapshotDe:Os,optionResolutionSnapshotDe:Li,originalQuestionDe:o.title||null,winningOptionIndex:Ln,winningOptionLabel:mi,winningOptionWeg:is,winningOptionUnits:Vs,castWeg:ri,eligibleWeg:us},rows:tn,lang:"de"}},Yr=(J=!1)=>{const Re=_r();Re&&km({...Re,anonymous:J})},Fs=()=>{const J=_r();J&&km({...J,variant:"management"})},Nr=(J=!1)=>{const Re=_r();Re&&Tw({...Re,anonymous:J})};if(y||!o)return a.jsx(wh,{title:l("pageTitle"),activeSection:"polls",breadcrumbs:[{label:l("admin"),href:"/admin"},{label:l("polls"),href:"/admin?section=polls"},{label:l("results")}],children:a.jsx("div",{className:"flex items-center justify-center py-24",children:a.jsx(ds,{className:"h-8 w-8 animate-spin text-primary"})})});const Si=Mt();return a.jsxs(wh,{title:l("pageTitle"),activeSection:"polls",breadcrumbs:[{label:l("admin"),href:"/admin"},{label:l("polls"),href:"/admin?section=polls"},{label:l("results")}],children:[a.jsxs("div",{className:"max-w-7xl space-y-6",children:[a.jsxs("div",{className:"space-y-5 border-b border-border pb-5",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(pt,{variant:"ghost",size:"icon",className:"mt-0.5 shrink-0 rounded-full",onClick:()=>n("/admin?section=polls"),children:a.jsx(Mm,{className:"h-4 w-4"})}),a.jsx("h2",{className:"font-serif text-2xl font-bold leading-snug text-foreground",children:gt()})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(Si==="active"||Si==="not_started")&&a.jsxs(pt,{variant:"outline",size:"sm",className:"text-amber-700 border-amber-400 hover:bg-amber-50",onClick:()=>D(!0),children:[a.jsx(M0,{className:"h-3.5 w-3.5 mr-1.5"}),l("close")]}),a.jsxs(pt,{variant:"outline",size:"sm",onClick:()=>n(`/admin/poll/${e}`),children:[a.jsx(ag,{className:"h-3.5 w-3.5 mr-1.5"}),l("edit")]}),a.jsx("div",{className:"mx-1 hidden h-7 w-px bg-border sm:block"}),a.jsxs("div",{className:"flex overflow-hidden rounded-md border border-input bg-background shadow-sm",children:[a.jsxs("button",{type:"button",onClick:()=>Yr(!1),className:"flex items-center gap-1.5 border-r border-input px-3 py-1.5 text-sm text-foreground transition-colors hover:bg-muted",children:[a.jsx(ec,{className:"h-3.5 w-3.5"}),l("exportPdf")]}),a.jsxs("button",{type:"button",onClick:()=>Nr(!1),className:"flex items-center gap-1.5 border-r border-input px-3 py-1.5 text-sm text-foreground transition-colors hover:bg-muted",children:[a.jsx(el,{className:"h-3.5 w-3.5"}),l("exportXlsx")]}),a.jsxs("button",{type:"button",onClick:()=>Yr(!0),className:"flex items-center gap-1.5 border-r border-input px-3 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:[a.jsx(ec,{className:"h-3.5 w-3.5"}),l("exportPdfAnon")]}),a.jsxs("button",{type:"button",onClick:()=>Nr(!0),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:[a.jsx(el,{className:"h-3.5 w-3.5"}),l("exportXlsxAnon")]}),a.jsxs("button",{type:"button",onClick:Fs,className:"flex items-center gap-1.5 border-l border-input px-3 py-1.5 text-sm text-foreground transition-colors hover:bg-muted",children:[a.jsx(ec,{className:"h-3.5 w-3.5"}),l("exportMgmt")]})]}),a.jsxs(pt,{size:"sm",variant:o!=null&&o.results_sent_at?"outline":"default",className:"sm:ml-auto shadow-sm",onClick:()=>Me(!0),disabled:ce,children:[a.jsx(hc,{className:"h-3.5 w-3.5 mr-1.5"}),o!=null&&o.results_sent_at?l("sendResultsAgain"):l("sendResults")]})]})]}),a.jsxs(mc,{value:F,onValueChange:ze,className:"w-full",children:[a.jsx(pc,{className:"flex h-auto w-full flex-wrap justify-start gap-1 rounded-xl bg-muted/60 p-1",children:[{value:"results",icon:rd,label:l("results")},{value:"announcement",icon:hc,label:r==="cs"?"Odeslat oznámenÃ":r==="de"?"Ankündigung senden":"Send announcement"},{value:"reminder",icon:Hd,label:l("sendReminder")},{value:"templates",icon:xr,label:r==="cs"?"Náhledy Å¡ablon":r==="de"?"Vorlagen-Vorschau":"Template previews"},{value:"emails",icon:xr,label:l("emails")},{value:"delivery",icon:gc,label:r==="cs"?"DoruÄenà a vývÄska":r==="de"?"Zustellung & Anschlag":"Delivery & notice board"},{value:"engagement",icon:Rm,label:r==="cs"?"Audit zobrazenÃ":r==="de"?"Zugriffs-Audit":"View audit"}].map(({value:J,icon:Re,label:mt})=>a.jsxs(Ya,{value:J,className:"gap-1.5 rounded-lg px-3.5 py-2 text-sm font-medium text-muted-foreground transition-colors data-[state=active]:bg-background data-[state=active]:font-semibold data-[state=active]:text-primary data-[state=active]:shadow-sm data-[state=active]:ring-1 data-[state=active]:ring-border",children:[a.jsx(Re,{className:"h-3.5 w-3.5"}),mt]},J))}),a.jsxs(Ti,{value:"results",className:"mt-4",children:[a.jsxs(ba,{className:"mb-3 bg-muted/30 border-border/60",children:[a.jsx(_i,{className:"h-4 w-4 text-primary"}),a.jsx(wa,{children:l("visibilityLegalNotice")})]}),a.jsxs("nav",{"aria-label":l("navJumpTo"),className:"mb-4 flex flex-wrap items-center gap-1.5 rounded-lg border border-border/60 bg-muted/30 px-2.5 py-2",children:[a.jsxs("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground mr-1",children:[l("navJumpTo"),":"]}),[{href:"#eval",label:l("evaluation"),icon:To},{href:"#legal",label:l("navLegal"),icon:gc},{href:"#distribution",label:l("voteDistribution"),icon:rd},...yt.length>0?[{href:"#nonvoters",label:l("nonVoters"),icon:sd}]:[],...js.length>0?[{href:"#comments",label:l("comments"),icon:_h}]:[],{href:"#votes",label:l("individualVotes"),icon:Nh},...v.length>0?[{href:"#audit",label:l("auditLog"),icon:fc}]:[]].map(({href:J,label:Re,icon:mt})=>a.jsxs("a",{href:J,className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-[12px] font-medium text-muted-foreground transition-colors hover:bg-background hover:text-primary hover:shadow-sm",children:[a.jsx(mt,{className:"h-3 w-3"}),Re]},J))]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-5",children:[a.jsxs("div",{className:"space-y-5",children:[(()=>{var pi;const J=o.is_active,Re=o.voting_type,mt=bt.absoluteMajority.met,Nt=bt.qualifiedMajority.met,Bt=$n.passed,tn=mt&&Nt?"autoStatusBoth":mt?"autoStatusOnlyAbs":Nt?"autoStatusOnlyQual":"autoStatusNone";let At=0,Fn=0,Kt=0,yn=!1,Qn="";
234Re==="absolute_majority"?(At=$e,Fn=bt.absoluteMajority.threshold,yn=mt,Kt=At-Fn,Qn=l("byAbsolute")):Re==="qualified_majority"&&(At=$e,Fn=bt.qualifiedMajority.twoThirdsThreshold,yn=Nt,Kt=At-Fn,Qn=l("byQualified"));const un=(dn==null?void 0:dn.absoluteMajority.met)===(gn==null?void 0:gn.absoluteMajority.met),Rt=(dn==null?void 0:dn.qualifiedMajority.met)===(gn==null?void 0:gn.qualifiedMajority.met);let Gt;if(Re==="automatic")Gt=un&&Rt?"sensitivityBothStable":"sensitivityOfficial";else{const Le=Re==="absolute_majority"?un:Rt,Tt=Re==="absolute_majority"?Rt:un;Le&&Tt?Gt="sensitivityBothStable":Le&&!Tt?Gt="sensitivityAltOnly":Gt="sensitivityOfficial"}const sn=Gt==="sensitivityBothStable"?"border-emerald-200 bg-emerald-50/60 dark:border-emerald-800 dark:bg-emerald-950/30 text-emerald-800 dark:text-emerald-300":Gt==="sensitivityAltOnly"?"border-blue-200 bg-blue-50/60 dark:border-blue-800 dark:bg-blue-950/30 text-blue-800 dark:text-blue-300":"border-amber-200 bg-amber-50/60 dark:border-amber-800 dark:bg-amber-950/30 text-amber-800 dark:text-amber-300";l("gapAbsolute"),l("gapQualified2of3"),bt.qualifiedMajority.twoThirdsMet,l("gapQualified1of3"),bt.qualifiedMajority.oneThirdMet;const ss=(Le,Tt,ye)=>a.jsxs("div",{className:"flex justify-between items-center gap-2 text-[12px]",children:[a.jsx("span",{className:"text-muted-foreground",children:Le}),ye?a.jsxs("span",{className:"font-semibold tabular-nums text-green-700 dark:text-green-400",children:[l("reserveLabel")," +",Pt(Math.max(0,Tt))]}):a.jsxs("span",{className:"font-semibold tabular-nums text-destructive",children:[l("gapLabel")," â",Pt(Math.abs(Tt))]})]}),Ln=$e-bt.absoluteMajority.threshold,jn=$e-bt.qualifiedMajority.twoThirdsThreshold,mi=$e-bt.qualifiedMajority.oneThirdThreshold,is=Math.max(bt.qualifiedMajority.twoThirdsThreshold,bt.qualifiedMajority.oneThirdThreshold),Vs=$e-is,ri=[{label:l("scenarioCurrent"),yes:$e,cast:_t,eval:bt,tone:"bg-muted/40"},{label:l("scenarioBest"),yes:si,cast:ys,eval:dn,tone:"bg-green-50/40 dark:bg-green-950/20"},{label:l("scenarioWorst"),yes:_s,cast:pn,eval:gn,tone:"bg-red-50/40 dark:bg-red-950/20"}],us=Le=>Le?a.jsxs(Ot,{className:"bg-green-100 text-green-800 border-green-300 text-[10px] px-1.5 py-0 whitespace-nowrap",children:[l("accepted")," â"]}):a.jsxs(Ot,{className:"bg-red-100 text-red-800 border-red-300 text-[10px] px-1.5 py-0 whitespace-nowrap",children:[l("rejected")," â"]}),Os=Le=>Le?a.jsx(Ot,{className:"bg-green-100 text-green-800 border-green-300 text-[10px] px-1.5 py-0 whitespace-nowrap",children:l("met")}):a.jsx(Ot,{className:"bg-red-100 text-red-800 border-red-300 text-[10px] px-1.5 py-0 whitespace-nowrap",children:l("notMet")}),Li=Re==="absolute_majority",kr=Re==="qualified_majority";return a.jsxs(ln,{id:"eval",className:"border-primary/20 scroll-mt-24",children:[a.jsx(Nn,{className:"pb-2",children:a.jsxs(Tn,{className:"text-sm font-semibold flex items-center gap-2",children:[a.jsx(To,{className:"h-4 w-4 text-primary"}),l("evaluation")]})}),a.jsxs(cn,{className:"space-y-5 text-[13px]",children:[a.jsxs("div",{className:"rounded-lg border border-primary/30 bg-primary/5 overflow-hidden",children:[a.jsxs("div",{className:`px-4 py-2.5 flex items-center justify-between gap-3 flex-wrap border-b ${Bt?"bg-green-50 dark:bg-green-950/30 border-green-200 dark:border-green-900":"bg-red-50 dark:bg-red-950/30 border-red-200 dark:border-red-900"}`,children:[a.jsx("div",{className:"text-[11px] uppercase tracking-wide font-semibold text-muted-foreground",children:l(J?"liveResultTitle":"officialResult")}),Bt?a.jsxs(Ot,{className:"bg-green-600 text-white border-0 text-[11px] font-semibold px-2 py-0.5 whitespace-nowrap shadow-sm",children:[l("accepted")," â"]}):a.jsxs(Ot,{className:"bg-red-600 text-white border-0 text-[11px] font-semibold px-2 py-0.5 whitespace-nowrap shadow-sm",children:[l("rejected")," â"]})]}),a.jsxs("div",{className:"p-4 space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground font-semibold mb-0.5",children:l("heroQuestion")}),a.jsx("div",{className:"text-[14px] font-semibold leading-snug",children:gt()})]}),ut[Ws]&&a.jsxs("div",{className:"flex items-start gap-2 pt-1",children:[a.jsx("div",{className:`mt-0.5 h-5 w-5 rounded-full flex items-center justify-center flex-shrink-0 ${Bt?"bg-green-600":"bg-red-600"}`,children:a.jsx("span",{className:"text-white text-[11px] font-bold",children:Bt?"â":"â"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground font-semibold",children:l(Bt?"heroWinningOption":J?"heroLeadingOption":"heroRejectedOption")}),a.jsx("div",{className:"text-[13px] font-medium leading-snug break-words",children:ut[Ws]})]})]})]}),Re==="automatic"?a.jsxs("div",{className:"text-[13px] pt-2 border-t border-primary/15",children:[a.jsxs("span",{className:"text-muted-foreground",children:[l("evaluatedAuto"),": "]}),a.jsx("span",{className:"font-semibold",children:l(tn)})]}):a.jsxs("div",{className:"pt-2 border-t border-primary/15 space-y-2",children:[a.jsxs("div",{className:"text-[12px]",children:[a.jsxs("span",{className:"text-muted-foreground",children:[l("evaluatedByRule"),": "]}),a.jsx("span",{className:"font-semibold",children:Qn})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[a.jsxs("div",{className:"rounded-md bg-white dark:bg-background border p-2",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:l("heroVotesFor")}),a.jsx("div",{className:"font-bold tabular-nums text-[15px]",children:Pt(At)})]}),a.jsxs("div",{className:"rounded-md bg-white dark:bg-background border p-2",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:l("heroRequired")}),a.jsx("div",{className:"font-bold tabular-nums text-[15px]",children:Pt(Fn)})]}),a.jsxs("div",{className:"rounded-md bg-white dark:bg-background border p-2",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:l(yn?"heroReserve":"heroGap")}),a.jsxs("div",{className:`font-bold tabular-nums text-[15px] ${yn?"text-green-700 dark:text-green-400":"text-destructive"}`,children:[yn?"+":"â",Pt(Math.abs(Kt))]})]})]})]}),!o.is_active&&a.jsxs("div",{className:"flex justify-between items-center pt-2 border-t border-primary/15",children:[a.jsx("span",{className:"text-[11px] text-muted-foreground",children:l("changeEvalType")}),a.jsxs(w0,{value:o.voting_type,onValueChange:Le=>{Le!==o.voting_type&&(ue(Le),se(""),Y(!0))},children:[a.jsx(y0,{className:"w-[180px] h-7 text-[12px]",children:a.jsx(_0,{})}),a.jsxs(N0,{children:[a.jsx(Ml,{value:"automatic",children:l("evalAutoLabel")}),a.jsx(Ml,{value:"absolute_majority",children:l("tabAbsolute")}
234),a.jsx(Ml,{value:"qualified_majority",children:l("tabQualified")}),a.jsx(Ml,{value:"unanimous",children:l("tabUnanimous")})]})]})]}),Pe&&a.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[l("lastChange"),": ",Pe.changed_by_name,", ",ft(Pe.changed_at)]})]})]}),qe>0&&(()=>{const Le=["bg-emerald-500","bg-rose-500","bg-amber-500","bg-sky-500","bg-violet-500","bg-teal-500"],Tt=Ct.map((Ue,Qe)=>({label:Ue.name,weg:Ue.wegShare,pct:qe>0?Ue.wegShare/qe*100:0,color:Qe===Ws?"bg-emerald-500":Le[(Qe+1)%Le.length]})),ye=qe>0?wn/qe*100:0;return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:"text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",children:l("voteDistributionWeg")}),a.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded bg-muted",children:[Tt.map((Ue,Qe)=>Ue.pct>0?a.jsx("div",{className:Ue.color,style:{width:`${Ue.pct}%`},title:`${Ue.label}: ${Ue.pct.toFixed(1)}%`},Qe):null),ye>0&&a.jsx("div",{className:"bg-muted-foreground/40",style:{width:`${ye}%`},title:`${l("notVotedLabel")}: ${ye.toFixed(1)}%`})]}),a.jsxs("div",{className:"space-y-1",children:[Tt.map((Ue,Qe)=>a.jsxs("div",{className:"flex items-center gap-2 text-[12px]",children:[a.jsx("span",{className:`inline-block h-2 w-2 rounded-sm shrink-0 ${Ue.color}`}),a.jsx("span",{className:"text-muted-foreground truncate flex-1",children:Ue.label}),a.jsx("span",{className:"font-semibold tabular-nums",children:Pt(Ue.weg)}),a.jsxs("span",{className:"text-muted-foreground tabular-nums w-12 text-right",children:[Ue.pct.toFixed(1),"%"]})]},Qe)),a.jsxs("div",{className:"flex items-center gap-2 text-[12px]",children:[a.jsx("span",{className:"inline-block h-2 w-2 rounded-sm shrink-0 bg-muted-foreground/40"}),a.jsx("span",{className:"text-muted-foreground truncate flex-1",children:l("notVotedLabel")}),a.jsx("span",{className:"font-semibold tabular-nums",children:Pt(wn)}),a.jsxs("span",{className:"text-muted-foreground tabular-nums w-12 text-right",children:[ye.toFixed(1),"%"]})]})]})]}),a.jsxs("div",{className:"space-y-1.5 pt-1 border-t",children:[a.jsx("div",{className:"text-[12px] font-semibold uppercase tracking-wide text-muted-foreground pt-2",children:l("thresholds")}),a.jsxs("div",{className:"space-y-0.5",children:[a.jsx("div",{className:"text-[11px] font-medium text-muted-foreground",children:l("optionA")}),a.jsxs("div",{className:"flex justify-between items-center pl-2 text-[12px]",children:[a.jsx("span",{className:"text-muted-foreground",children:l("absoluteMajority")}),a.jsx("span",{className:"font-bold tabular-nums",children:Pt(bt.absoluteMajority.threshold)})]})]}),a.jsxs("div",{className:"space-y-0.5 mt-1",children:[a.jsx("div",{className:"text-[11px] font-medium text-muted-foreground",children:l("optionB")}),a.jsxs("div",{className:"flex justify-between items-center pl-2 text-[12px]",children:[a.jsxs("span",{className:"text-muted-foreground",children:[l("qualifiedMajority")," (â¥2/3)"]}),a.jsx("span",{className:"font-bold tabular-nums",children:Pt(bt.qualifiedMajority.twoThirdsThreshold)})]}),a.jsxs("div",{className:"flex justify-between items-center pl-2 text-[12px]",children:[a.jsxs("span",{className:"text-muted-foreground",children:[l("qualifiedAbsolute")," (â¥1/3)"]}),a.jsx("span",{className:"font-bold tabular-nums",children:Pt(bt.qualifiedMajority.oneThirdThreshold)})]}),a.jsxs("div",{className:"flex justify-between items-start gap-2 pl-2 pt-1 text-[12px] border-t mt-1",children:[a.jsx("span",{className:"text-foreground font-medium",children:l("effectiveNeed")}),a.jsx("span",{className:"font-bold tabular-nums",children:Pt(Math.max(bt.qualifiedMajority.twoThirdsThreshold,bt.qualifiedMajority.oneThirdThreshold))})]}),a.jsx("p",{className:"pl-2 text-[11px] text-muted-foreground leading-snug",children:l("effectiveNeedHint")})]})]})]})})(),a.jsxs(ln,{id:"legal",className:"border-primary/20 scroll-mt-24",children:[a.jsx(Nn,{className:"pb-2",children:a.jsxs(Tn,{className:"text-sm font-semibold flex items-center gap-2",children:[a.jsx(To,{className:"h-4 w-4 text-primary"}),l("variantEvalTitle")]})}),a.jsxs(cn,{className:"space-y-3",children:[a.jsxs("div",{className:`rounded-md border px-3 py-2 text-[12px] ${$n.path?"border-green-200 bg-green-50/60 dark:border-green-900 dark:bg-green-950/30 text-green-800 dark:text-green-300":"border-amber-200 bg-amber-50/60 dark:border-amber-900 dark:bg-amber-950/30 text-amber-800 dark:text-amber-300"}`,children:[a.jsx("div",{className:"text-[10px] uppercase tracking-wide font-semibold opacity-80",children:l("pathHeading")}),a.jsx("div",{className:"font-medium leading-snug",children:$n.path?`${((pi=Ct[$n.acceptedIndex])==null?void 0:pi.name)??""} â ${P0[$n.path][r]}`:l("pathNone")})]}),a.jsx("div",{className:"space-y-2",children:$n.perOption.map((Le,Tt)=>{var Qe;const ye=$n.acceptedIndex===Tt,Ue=Le.path==="absolute"?l("absolutePathShort"):Le.path==="qualified"?l("qualifiedPathShort"):null;return a.jsxs("div",{className:`rounded-md border p-3 text-[12px] ${ye?"border-green-200 bg-green-50/40 dark:border-green-900 dark:bg-green-950/20":"border-muted bg-muted/20"}`,children:[a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3",children:[a.jsx("div",{className:"font-medium min-w-0 flex-1 truncate",children:(Qe=Ct[Tt])==null?void 0:Qe.name}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[a.jsxs("span",{className:"text-muted-foreground tabular-nums whitespace-nowrap",children:[Pt(Le.yesWeg)," WEG"]}),ye?a.jsxs(Ot,{className:"bg-green-600 text-white border-0 text-[10px] px-1.5 py-0",children:[l("variantAcceptedShort")," â"]}):a.jsxs(Ot,{variant:"outline",className:"text-[10px] px-1.5 py-0 text-muted-foreground",children:[l("variantRejectedShort")," â"]})]})]}),a.jsx("div",{className:"mt-1.5 text-[11px]",children:ye&&Ue?`${l("decisivePath")}: ${Ue}`:l("rejectedPaths")}
234),a.jsxs(Ro,{className:"mt-2 rounded border border-dashed border-muted-foreground/30",children:[a.jsxs(Io,{className:"flex items-center gap-1 w-full p-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[a.jsx(tc,{className:"h-3 w-3 shrink-0 transition-transform duration-200 [[data-state=open]>&]:rotate-180"}),l("showOtherPath")]}),a.jsx(Bo,{children:a.jsxs("div",{className:"px-2 pb-2 space-y-1 text-[11px]",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[Le.qualifiedMajority.met?a.jsx(pa,{className:"h-3 w-3 text-primary shrink-0"}):a.jsx(gh,{className:"h-3 w-3 text-destructive shrink-0"}),a.jsxs("span",{className:"font-medium",children:[l("colQualified"),":"]}),a.jsx("span",{className:Le.qualifiedMajority.met?"text-primary":"text-destructive",children:Le.qualifiedMajority.met?l("met"):l("notMet")}),a.jsxs("span",{className:"text-muted-foreground",children:["(",Pt(Le.yesWeg)," / â¥2/3 ",Pt(Math.max(Le.qualifiedMajority.twoThirdsThreshold,Le.qualifiedMajority.oneThirdThreshold)),")"]})]}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[Le.absoluteMajority.met?a.jsx(pa,{className:"h-3 w-3 text-primary shrink-0"}):a.jsx(gh,{className:"h-3 w-3 text-destructive shrink-0"}),a.jsxs("span",{className:"font-medium",children:[l("colAbsolute"),":"]}),a.jsx("span",{className:Le.absoluteMajority.met?"text-primary":"text-destructive",children:Le.absoluteMajority.met?l("met"):l("notMet")}),a.jsxs("span",{className:"text-muted-foreground",children:["(",Pt(Le.yesWeg)," / ",l("absoluteMajority")," ",Pt(Le.absoluteMajority.threshold),")"]})]})]})})]})]},Tt)})}),a.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:l("variantEvalNote")}),a.jsxs("div",{className:"border-t pt-2 space-y-1",children:[a.jsx("p",{className:"text-[12px] font-medium",children:l("digitalTitle")}),a.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:l("digitalNote")}),a.jsxs("div",{className:"flex flex-wrap gap-3 pt-0.5",children:[a.jsxs("a",{href:"https://www.ris.bka.gv.at/Dokumente/BgblAuth/BGBLA_2021_I_222/BGBLA_2021_I_222.html",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[11px] text-primary hover:underline font-medium",children:[a.jsx(To,{className:"h-3 w-3"}),l("digitalLink")," â"]}),a.jsxs("a",{href:"https://www.ris.bka.gv.at/NormDokument.wxe?Abfrage=Bundesnormen&Anlage=&Artikel=&Gesetzesnummer=20001921&Paragraf=24&Uebergangsrecht=",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[11px] text-primary hover:underline font-medium",children:[a.jsx(To,{className:"h-3 w-3"}),"§ 24 WEG 2002 â"]})]})]})]})]}),a.jsxs(ln,{id:"distribution",className:"scroll-mt-24",children:[a.jsxs(Nn,{className:"pb-3 space-y-1",children:[a.jsxs(Tn,{className:"text-sm font-semibold flex items-center gap-2 text-muted-foreground",children:[a.jsx(rd,{className:"h-4 w-4 text-primary"}),l("voteDistribution")]}),xt()&&a.jsx("p",{className:"text-[13px] text-muted-foreground leading-relaxed",children:xt()})]}),a.jsx(cn,{className:"pt-0",children:h.length===0?a.jsx("p",{className:"text-muted-foreground text-center py-8 text-sm",children:l("noVotesYet")}):a.jsxs("div",{children:[a.jsxs("div",{className:"grid grid-cols-[1fr_56px_72px_84px_72px] gap-2 px-3 pb-2 mb-1 border-b text-[10px] font-semibold text-muted-foreground/70 uppercase tracking-[0.08em]",children:[a.jsx("span",{children:l("option")}),a.jsx("span",{className:"text-right",children:l("votesCol")}),a.jsx("span",{className:"text-right",children:l("votePct")}),a.jsx("span",{className:"text-right",children:"WEG RV"}),a.jsx("span",{className:"text-right",children:"WEG %"})]}),a.jsx("div",{className:"divide-y divide-border/50",children:Ct.map((Le,Tt)=>{const ye=Tt===Ws&&Le.count>0,Ue=h.filter(We=>We.option_index===Tt),Qe=[...new Set(Ue.map(We=>
234We.apartment_code).filter(Boolean))];return a.jsxs("div",{className:`relative px-3 py-3 transition-colors ${ye?"bg-primary/[0.03]":""}`,children:[a.jsxs("div",{className:"grid grid-cols-[1fr_56px_72px_84px_72px] gap-2 items-center",children:[a.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[a.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:Lm(ye)}}),a.jsx("span",{className:`text-sm truncate ${ye?"font-semibold text-foreground":"text-foreground/80"}`,children:Le.name}),ye&&a.jsxs(Ot,{variant:"outline",className:"border-primary/30 text-primary text-[10px] px-1.5 py-0 shrink-0 gap-0.5",children:[a.jsx(pa,{className:"h-2.5 w-2.5"}),l("leading")]})]}),a.jsx("span",{className:`text-right tabular-nums text-sm ${ye?"font-bold":"font-medium text-foreground/70"}`,children:Le.count}),a.jsxs("span",{className:`text-right tabular-nums text-sm ${ye?"font-bold":"font-medium text-foreground/70"}`,children:[Le.pct,"%"]}),a.jsx("span",{className:`text-right tabular-nums text-sm ${ye?"font-bold":"font-medium text-foreground/70"}`,children:Pt(Le.wegShare)}),a.jsxs("span",{className:`text-right tabular-nums text-sm ${ye?"font-bold text-primary":"text-muted-foreground"}`,children:[Le.wegSharePct,"%"]})]}),a.jsx("div",{className:"mt-2",children:a.jsx("div",{className:"h-1 bg-muted/60 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full rounded-full transition-all duration-700 ease-out",style:{width:`${Le.pct}%`,backgroundColor:Lm(ye),opacity:ye?1:.8}})})}),Qe.length>0&&a.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:Qe.map(We=>{const It=m.find(En=>En.code===We),Zn=Ue.find(En=>En.apartment_code===We);return a.jsxs(xh,{children:[a.jsx(vh,{asChild:!0,children:a.jsx("span",{className:"inline-flex",children:a.jsx(Ot,{variant:"outline",className:"text-xs px-2 py-0.5 cursor-help font-normal rounded-full",children:We})})}),a.jsxs(bh,{className:"text-xs space-y-0.5",children:[((It==null?void 0:It.owners)||[]).length>0?It.owners.map((En,Kr)=>{const mo=En.share_percentage!=null&&(It!=null&&It.weg_anteil_rv)?It.weg_anteil_rv*En.share_percentage/100:(It==null?void 0:It.weg_anteil_rv)||0;return a.jsxs("div",{children:[En.name," â WEG: ",Pt(mo),En.share_percentage!=null&&En.share_percentage<100?` (${En.share_percentage}%)`:""]},Kr)}):a.jsx("div",{children:"â"}),((It==null?void 0:It.representatives)||[]).length>0&&a.jsx("div",{className:"border-t border-border/50 pt-0.5 mt-0.5",children:It.representatives.map((En,Kr)=>a.jsxs("div",{className:"text-primary/80",children:["â³ ",En.name," ",En.role_label?`(${En.role_label})`:`(${i==="cs"?"PovÄÅená osoba":i==="de"?"Bevollmächtigte":"Representative"})`]},Kr))}),a.jsxs("div",{className:"text-muted-foreground",children:["WEG celkem: ",Pt((It==null?void 0:It.weg_anteil_rv)||0)]}),Zn&&a.jsx("div",{className:"text-muted-foreground",children:ft(Zn.created_at)})]})]},We)})})]},Tt)})}),a.jsxs("div",{className:"grid grid-cols-[1fr_56px_72px_84px_72px] gap-2 px-3 py-2.5 mt-1 border-t text-[11px] text-muted-foreground",children:[a.jsx("span",{className:"font-medium",children:l("total")}),a.jsx("span",{className:"text-right font-bold text-foreground",children:Ke.size}),a.jsxs("span",{className:"text-right font-bold text-foreground",children:[kt.length>0?(Ke.size/kt.length*100).toFixed(1):0,"%"]}),a.jsx("span",{className:"text-right font-bold text-foreground",children:Pt(_t)}),a.jsxs("span",{className:"text-right font-bold text-foreground",children:[Dt.toFixed(1),"%"]})]})]})})]}),yt.length>0&&a.jsx(Ro,{open:I,onOpenChange:R,children:a.jsxs(ln,{id:"nonvoters",className:"scroll-mt-24",children:[a.jsx(Io,{asChild:!0,children:a.jsx(Nn,{className:"cursor-pointer hover:bg-muted/30 transition-colors pb-2",children:a.jsxs(Tn,{className:"text-sm font-semibold flex items-center gap-2",children:[a.jsx(sd,{className:"h-4 w-4 text-amber-600"}),l("nonVoters")," (",yt.length,")",I?a.jsx(tc,{className:"h-4 w-4 ml-auto"}):a.jsx(id,{className:"h-4 w-4 ml-auto"})]})})}),a.jsx(Bo,{children:a.jsxs(cn,{className:"pt-2 space-y-3",children:[Te&&a.jsxs("p",{className:"text-xs text-muted-foreground",children:[Te.total_non_voters," ",l("unitsToRemind")," · ",Te.total_recipients," ",l("recipientsWithEmail")," · ",Te.skipped_no_email," ",l("withoutEmail")]}),a.jsx("div",{className:"rounded-md border overflow-hidden",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{className:"bg-muted/50 text-muted-foreground",children:a.jsxs("tr",{className:"[&>th]:h-8 [&>th]:px-3 [&>th]:font-serif [&>th]:font-normal [&>th]:text-left",children:[a.jsx("th",{className:"w-20",children:i==="cs"?"Jednotka":i==="de"?"Einheit":"Unit"}),a.jsx("th",{children:i==="cs"?"VlastnÃk / zástupce":i==="de"?"Eigentümer / Vertreter":"Owner / representative"}),a.jsx("th",{className:"text-right w-20 whitespace-nowrap",children:i==="cs"?"PodÃl":i==="de"?"Anteil":"Share"}),a.jsx("th",{className:"text-right w-24 whitespace-nowrap",children:"WEG RV"}),a.jsx("th",{className:"text-right w-20 whitespace-nowrap",children:"WEG %"})]})}),a.jsx("tbody",{children:yt.map(Le=>(Le.owners.length>0?Le.owners:[{name:"â",share_percentage:null}]).map((ye,Ue)=>{const Qe=ye.share_percentage!=null&&Le.weg_anteil_rv?Le.weg_anteil_rv*ye.share_percentage/100:Le.weg_anteil_rv||0,We=qe>0?Qe/qe*100:0,It=Ue===0?Le.representatives:[];return a.jsxs("tr",{className:"border-t [&>td]:h-9 [&>td]:px-3 align-top",children:[a.jsx("td",{className:"whitespace-nowrap",children:Ue===0?a.jsx(Ot,{variant:"outline",className:"text-xs px-2 py-0.5 rounded-full",children:Le.code}):null}),a.jsxs("td",{children:[a.jsx("div",{children:ye.name}),It.length>0&&a.jsx("div",{className:"mt-0.5 space-y-0.5",children:It.map((Zn,En)=>a.jsxs("div",{className:"text-primary/80 text-[11px]",children:["â³ ",Zn.name," ",Zn.role_label?`(${Zn.role_label})`:`(${i==="cs"?"PovÄÅená osoba":i==="de"?"Bevollmächtigte":"Representative"})`]},En))})]}),a.jsx("td",{className:"text-right whitespace-nowrap tabular-nums",children:ye.share_percentage!=null?`${ye.share_percentage}%`:"â"}),a.jsx("td",{className:"text-right whitespace-nowrap tabular-nums",children:Pt(Qe)}),a.jsxs("td",{className:"text-right whitespace-nowrap tabular-nums",children:[We.toFixed(1),"%"]})]},`${Le.code}-${Ue}`)}))}),a.jsx("tfoot",{children:(()=>{const Le=yt.reduce((ye,Ue)=>ye+(Ue.weg_anteil_rv||0),0),Tt=qe>0?Le/qe*100:0;return a.jsxs("tr",{className:"border-t bg-muted/30 [&>td]:h-8 [&>td]:px-3 font-medium",children:[a.jsx("td",{colSpan:3,className:"text-right text-muted-foreground",children:l("total")}),a.jsx("td",{className:"text-right whitespace-nowrap tabular-nums",children:Pt(Le)}),a.jsxs("td",{className:"text-right whitespace-nowrap tabular-nums",children:[Tt.toFixed(1),"%"]})]})})()})]})})]})})]})}),a.jsxs(mc,{defaultValue:"rules",className:"w-full",children:[a.jsxs(pc,{className:"h-9 w-full justify-start",children:[a.jsx(Ya,{value:"rules",className:"text-[12px] px-3",children:l("tabRules")}),a.jsx(Ya,{value:"impact",className:"text-[12px] px-3",children:l("tabImpact")}),yt.length>0&&a.jsx(Ya,{value:"scenarios",className:"text-[12px] px-3",children:l("tabScenarios")})]}),a.jsxs(Ti,{value:"rules",className:"mt-3 space-y-4",children:[a.jsx("div",{className:"rounded-md border overflow-hidden",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{className:"bg-muted/40",children:[a.jsx(Ze,{className:"h-8 px-2 text-[11px]",children:l("colRule")}),a.jsx(Ze,{className:"h-8 px-2 text-[11px] w-[90px]",children:l("colStatus")}),a.jsx(Ze,{className:"h-8 px-2 text-[11px] text-right",children:l("colVotesFor")}),a.jsx(Ze,{className:"h-8 px-2 text-[11px] text-right",children:l("colRequired")}),a.jsx(Ze,{className:"h-8 px-2 text-[11px] text-right",children:l("colLimitState")})]})}),a.jsxs(hi,{children:[a.jsxs(Qt,{className:Li?"border-l-4 border-l-primary bg-primary/5":"",children:[a.jsx(Ie,{className:"px-2 py-1.5 text-[12px] font-medium",children:l("byAbsolute")}
234),a.jsx(Ie,{className:"px-2 py-1.5",children:us(mt)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[12px]",children:Pt($e)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[12px]",children:Pt(bt.absoluteMajority.threshold)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right",children:mt?a.jsxs("span",{className:"text-green-700 dark:text-green-400 font-semibold tabular-nums text-[12px]",children:[l("reserveLabel")," +",Pt(Math.max(0,Ln))]}):a.jsxs("span",{className:"text-destructive font-semibold tabular-nums text-[12px]",children:[l("gapLabel")," â",Pt(Math.abs(Ln))]})})]}),a.jsxs(Qt,{className:kr?"border-l-4 border-l-primary bg-primary/5":"",children:[a.jsx(Ie,{className:"px-2 py-1.5 text-[12px] font-medium",children:l("byQualified")}),a.jsx(Ie,{className:"px-2 py-1.5",children:us(Nt)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[12px]",children:Pt($e)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[12px]",children:Pt(is)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right",children:Nt?a.jsxs("span",{className:"text-green-700 dark:text-green-400 font-semibold tabular-nums text-[12px]",children:[l("reserveLabel")," +",Pt(Math.max(0,Vs))]}):a.jsxs("span",{className:"text-destructive font-semibold tabular-nums text-[12px]",children:[l("gapLabel")," â",Pt(Math.abs(Vs))]})})]}),a.jsxs(Qt,{children:[a.jsxs(Ie,{className:"px-2 py-1.5 text-[11px] text-muted-foreground pl-6",children:["â ",l("subCondition2of3")]}),a.jsx(Ie,{className:"px-2 py-1.5",children:Os(bt.qualifiedMajority.twoThirdsMet)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[11px]",children:Pt($e)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[11px]",children:Pt(bt.qualifiedMajority.twoThirdsThreshold)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right",children:bt.qualifiedMajority.twoThirdsMet?a.jsxs("span",{className:"text-green-700 dark:text-green-400 tabular-nums text-[11px]",children:["+",Pt(Math.max(0,jn))]}):a.jsxs("span",{className:"text-destructive tabular-nums text-[11px]",children:["â",Pt(Math.abs(jn))]})})]}),a.jsxs(Qt,{children:[a.jsxs(Ie,{className:"px-2 py-1.5 text-[11px] text-muted-foreground pl-6",children:["â ",l("subCondition1of3")]}),a.jsx(Ie,{className:"px-2 py-1.5",children:Os(bt.qualifiedMajority.oneThirdMet)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[11px]",children:Pt($e)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[11px]",children:Pt(bt.qualifiedMajority.oneThirdThreshold)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right",children:bt.qualifiedMajority.oneThirdMet?a.jsxs("span",{className:"text-green-700 dark:text-green-400 tabular-nums text-[11px]",children:["+",Pt(Math.max(0,mi))]}):a.jsxs("span",{className:"text-destructive tabular-nums text-[11px]",children:["â",Pt(Math.abs(mi))]})})]})]})]})}),a.jsxs(Ro,{children:[a.jsxs(Io,{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors",children:[a.jsx(id,{className:"h-3 w-3 transition-transform data-[state=open]:rotate-90"}),l("rulesExplanationTitle")]}),a.jsxs(Bo,{className:"mt-2 space-y-2",children:[a.jsx("div",{className:"rounded-md border border-blue-200 bg-blue-50/60 dark:border-blue-800 dark:bg-blue-950/30 p-2.5 text-[11px] text-muted-foreground leading-relaxed",children:a.jsxs("div",{className:"flex gap-1.5 items-start",children:[a.jsx(_i,{className:"h-3.5 w-3.5 text-blue-500 mt-0.5 shrink-0"}),a.jsxs("div",{children:[a.jsxs("strong",{children:[l("byAbsolute"),":"]})," ",a.jsx("span",{dangerouslySetInnerHTML:{__html:Xl.infoAbsolute[r]}})]})]})}),a.jsx("div",{className:"rounded-md border border-blue-200 bg-blue-50/60 dark:border-blue-800 dark:bg-blue-950/30 p-2.5 text-[11px] text-muted-foreground leading-relaxed",children:a.jsxs("div",{className:"flex gap-1.5 items-start",children:[a.jsx(_i,{className:"h-3.5 w-3.5 text-blue-500 mt-0.5 shrink-0"}),a.jsxs("div",{children:[a.jsxs("strong",{children:[l("byQualified"),":"]})," ",a.jsx("span",{dangerouslySetInnerHTML:{__html:Xl.infoQualified[r]}})]})]})}),Re==="automatic"&&a.jsx("div",{className:"rounded-md border border-amber-200 bg-amber-50/60 dark:border-amber-800 dark:bg-amber-950/30 p-2.5 text-[11px] text-muted-foreground leading-relaxed",children:a.jsxs("div",{className:"flex gap-1.5 items-start",children:[a.jsx(_i,{className:"h-3.5 w-3.5 text-amber-500 mt-0.5 shrink-0"}),a.jsx("span",{children:l("evalAutoExplanation")})]})})]})]})]}),a.jsxs(Ti,{value:"impact",className:"mt-3 space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(sd,{className:"h-4 w-4 text-amber-600"}),a.jsx("span",{className:"font-semibold text-[13px]",children:l("whatIfTitle")}),a.jsxs(Ot,{variant:"outline",className:"text-[10px] px-1.5 py-0 ml-auto",children:[yt.length," ",yt.length===1?"jednotka":yt.length>=2&&yt.length<=4?"jednotky":"jednotek"]})]}),yt.length===0?a.jsx("div",{className:"rounded-md border border-green-200 bg-green-50/60 dark:border-green-800 dark:bg-green-950/30 p-2.5 text-[12px] text-muted-foreground",children:l("whatIfNoneLeft")}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-[12px] rounded-md bg-muted/40 p-2.5",children:[a.jsx("span",{className:"text-muted-foreground",children:l("nonVoterWegLabel")}),a.jsx("span",{className:"font-bold text-right tabular-nums",children:Pt(wn)}),a.jsx("span",{className:"text-muted-foreground",children:l("nonVoterPctLabel")}),a.jsxs("span",{className:"font-bold text-right tabular-nums",children:[qe>0?(wn/qe*100).toFixed(1):"0.0","%"]})]}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wide",children:l("limitStateTitle")}),a.jsxs("div",{className:"space-y-1",children:[ss(l("gapAbsolute"),Ln,mt),ss(l("gapQualified2of3"),jn,bt.qualifiedMajority.twoThirdsMet),ss(l("gapQualified1of3"),mi,bt.qualifiedMajority.oneThirdMet)]})]}),a.jsx("div",{className:`rounded-md border p-2 text-[11px] ${sn}`,children:a.jsxs("div",{className:"flex gap-1.5 items-start",children:[a.jsx(_i,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),a.jsx("span",{children:l(Gt)})]})})]})]}),yt.length>0&&a.jsxs(Ti,{value:"scenarios",className:"mt-3 space-y-2",children:[a.jsx("div",{className:"rounded-md border overflow-hidden",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{className:"bg-muted/40",children:[a.jsx(Ze,{className:"h-8 px-2 text-[11px]",children:l("scenarioOutcome")}
234),a.jsx(Ze,{className:"h-8 px-2 text-[11px] text-right",children:l("heroVotesFor")}),a.jsx(Ze,{className:"h-8 px-2 text-[11px] text-right",children:l("scenarioCast")}),a.jsx(Ze,{className:"h-8 px-2 text-[11px] text-center",children:l("tabAbsolute")}),a.jsx(Ze,{className:"h-8 px-2 text-[11px] text-center",children:l("tabQualified")})]})}),a.jsx(hi,{children:ri.map((Le,Tt)=>a.jsxs(Qt,{className:Le.tone,children:[a.jsx(Ie,{className:"px-2 py-1.5 text-[12px] font-medium",children:Le.label}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[12px]",children:Pt(Le.yes)}),a.jsx(Ie,{className:"px-2 py-1.5 text-right tabular-nums text-[12px]",children:Pt(Le.cast)}),a.jsx(Ie,{className:"px-2 py-1.5 text-center",children:Le.eval?us(Le.eval.absoluteMajority.met):"â"}),a.jsx(Ie,{className:"px-2 py-1.5 text-center",children:Le.eval?us(Le.eval.qualifiedMajority.met):"â"})]},Tt))})]})}),a.jsx("div",{className:"text-[11px] text-muted-foreground italic",children:l(un&&Rt?"scenarioDecided":"scenarioRuleSensitive")}),a.jsxs("div",{className:"text-[11px] text-muted-foreground bg-muted/30 rounded-md p-2 border leading-relaxed",children:[a.jsxs("div",{className:"mb-1",children:[a.jsxs("span",{className:"font-medium text-foreground",children:["â¹ï¸ ",l("scenarioBest"),":"]})," ",l("scenarioBestHint")]}),a.jsxs("div",{children:[a.jsxs("span",{className:"font-medium text-foreground",children:["â ï¸ ",l("scenarioWorst"),":"]})," ",l("scenarioWorstHint")]})]})]})]})]})]})})(),js.length>0&&a.jsxs(ln,{id:"comments",className:"scroll-mt-24",children:[a.jsx(Nn,{className:"pb-2",children:a.jsxs(Tn,{className:"text-sm font-semibold flex items-center gap-2",children:[a.jsx(_h,{className:"h-4 w-4 text-primary"}),l("comments")," (",js.length,")"]})}),a.jsx(cn,{className:"space-y-2.5",children:js.map(J=>a.jsxs("div",{className:"p-2.5 rounded-md border bg-muted/30 space-y-1.5",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("span",{className:"font-medium text-[13px]",children:J.profile_name||"â"}),J.apartment_code&&a.jsx(Ot,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:J.apartment_code}),a.jsx("span",{className:"text-[11px] text-muted-foreground",children:ft(J.created_at)}),a.jsx(Ot,{variant:"secondary",className:"text-[10px] whitespace-normal text-left",children:ut[J.option_index]||`${l("option")} ${J.option_index+1}`})]}),a.jsx("p",{className:"text-[13px]",children:J.comment})]},J.id))})]})]}),a.jsxs("div",{className:"space-y-3 self-start lg:sticky lg:top-6",children:[a.jsxs(ln,{children:[a.jsx(Nn,{className:"pb-2",children:a.jsxs(Tn,{className:"text-sm font-semibold flex items-center gap-2",children:[a.jsx(dc,{className:"h-4 w-4 text-primary"}),l("info")]})}),a.jsxs(cn,{className:"space-y-2.5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[Si==="active"&&a.jsxs(Ot,{className:"bg-green-100 text-green-800 border-green-300 text-[11px]",children:[a.jsx(pa,{className:"h-3 w-3 mr-1"}),l("active")]}),Si==="not_started"&&a.jsxs(Ot,{className:"bg-amber-100 text-amber-800 border-amber-300 text-[11px]",children:[a.jsx(dc,{className:"h-3 w-3 mr-1"}),l("planned")]}),Si==="closed"&&a.jsx(Ot,{variant:"secondary",className:"text-[11px]",children:l("closed")}),o.resolution==="accepted"&&a.jsx(Ot,{className:"bg-green-100 text-green-800 border-green-300 text-[11px]",children:l("accepted")}),o.resolution==="rejected"&&a.jsx(Ot,{className:"bg-red-100 text-red-800 border-red-300 text-[11px]",children:l("rejected")})]}),a.jsxs("div",{className:"space-y-1.5 text-[13px]",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:l("from")}),a.jsx("span",{className:"font-medium",children:vt(o.starts_at)})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:l("to")}),a.jsx("span",{className:"font-medium",children:o.ends_at?vt(o.ends_at):"â"})]}),a.jsxs("div",{className:"flex flex-col gap-0.5",children:[a.jsx("span",{className:"text-muted-foreground",children:l("type")}),a.jsx("span",{className:"font-medium leading-snug",children:C0[Sm(o.voting_type,bt)][r]})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:l("comments")}),a.jsx("span",{className:"font-medium",children:o.allow_comments?l("commentsAllowed"):l("commentsForbidden")})]}),De>0&&a.jsxs("div",{className:"border-t pt-2 space-y-1.5",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsxs("span",{className:"text-muted-foreground flex items-center gap-1",children:[a.jsx(Hd,{className:"h-3 w-3"}),l("reminders")]}),a.jsx("span",{className:"font-medium",children:De})]}),lt&&a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:l("lastSent")}),a.jsx("span",{className:"font-medium text-xs",children:vt(lt)})]})]})]})]})]}),a.jsxs(ln,{children:[a.jsx(Nn,{className:"pb-2",children:a.jsxs(Tn,{className:"text-sm font-semibold flex items-center gap-2",children:[a.jsx(Pm,{className:"h-4 w-4 text-primary"}),l("participation")]})}),a.jsxs(cn,{className:"space-y-2.5",children:[a.jsxs("div",{className:"space-y-1.5 text-[13px]",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:l("unitsVoted")}),a.jsxs("span",{className:"font-bold",children:[Ke.size," / ",kt.length]})]}),a.jsx(j0,{value:Ge,className:"h-1.5"}),a.jsxs("div",{className:"flex justify-between text-[11px] text-muted-foreground",children:[a.jsx("span",{children:l("participation")}),a.jsxs("span",{children:[Ge.toFixed(1),"%"]})]})]}),a.jsxs("div",{className:"border-t pt-2.5 space-y-1.5 text-[13px]",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:l("wegSubmitted")}),a.jsx("span",{className:"font-bold",children:Pt(_t)})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:l("wegTotal")}),a.jsx("span",{className:"font-bold",children:Pt(qe)})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:l("wegShare")}),a.jsxs("span",{className:"font-bold text-primary",children:[Dt.toFixed(1),"%"]})]})]})]})]})]})]}),a.jsxs("div",{id:"votes",className:"mt-8 space-y-3 scroll-mt-24",children:[a.jsxs("h3",{className:"font-serif text-lg font-bold text-foreground flex items-center gap-2",children:[a.jsx(Nh,{className:"h-4 w-4 text-primary"}),l("individualVotes")," (",h.length,")"]}),a.jsx("div",{className:"rounded-md border bg-card overflow-hidden",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{children:[a.jsx(Ze,{className:"w-[40px] text-[11px]",children:"#"}),a.jsx(Ze,{className:"text-[11px] cursor-pointer select-none",onClick:()=>ie(J=>!J),children:a.jsxs("span",{className:"inline-flex items-center gap-1",children:[l("date")," ",a.jsx(og,{className:"h-3 w-3 text-muted-foreground"})]})}),a.jsx(Ze,{className:"text-[11px]",children:l("voter")}),a.jsx(Ze,{className:"text-[11px]",children:l("apartment")}),a.jsx(Ze,{className:"text-[11px]",children:l("representationMode")}),a.jsx(Ze,{className:"text-[11px]",children:l("chosenOption")}),a.jsx(Ze,{className:"text-[11px]",children:l("comment")}),a.jsx(Ze,{className:"w-[72px] text-[11px]",children:l("actions")})]})}),a.jsx(hi,{children:h.length===0?a.jsx(Qt,{children:a.jsx(Ie,{colSpan:8,className:"text-center py-8 text-muted-foreground text-[13px]",children:l("noVotes")})}):[...h].sort((J,Re)=>{const mt=new Date(J.created_at).getTime()-new Date(Re.created_at).getTime();return H?mt:-mt}).map((J,Re)=>a.jsx(a.Fragment,{children:a.jsxs(Qt,{className:"cursor-pointer h-8",onClick:()=>Yi(J.id),children:[a.jsx(Ie,{className:"text-muted-foreground text-xs py-1",children:Re+1}),a.jsx(Ie,{className:"text-xs py-1 whitespace-nowrap",children:ft(J.created_at)}),a.jsxs(Ie,{className:"py-1",children:[a.jsxs("div",{className:"font-medium text-xs flex items-center gap-1.5",children:[J.profile_name||"â",J.is_representative&&a.jsx(Ot,{variant:"outline",className:"text-[9px] px-1 py-0 border-primary/40 text-primary",children:l("representative")})]}),a.jsx("div",{className:"text-[11px] text-muted-foreground",children:J.profile_email||""})]}),a.jsx(Ie,{className:"py-1",children:a.jsx(Ot,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:J.apartment_code||"â"})}),a.jsx(Ie,{className:"py-1",children:J.representation_mode&&J.representation_mode!=="sole_owner"?a.jsxs("div",{className:"space-y-0.5",children:[a.jsx("span",{className:"text-[11px]",children:J.representation_mode==="joint_vote_declared"?l("modeJointVote"):J.representation_mode==="written_proxy"?l("modeWrittenProxy"):J.representation_mode==="retroactive_approval_pending"?l("modeRetroactive"):J.representation_mode}),J.representation_status&&J.representation_status!=="valid"&&J.representation_status!=="not_applicable"&&a.jsx("div",{className:`text-[9px] ${J.representation_status==="pending_approval"?"text-orange-600":J.representation_status==="rejected"?"text-destructive":(J.representation_status==="expired","text-muted-foreground")}`,children:J.representation_status==="declared_by_voter"?l("statusDeclared"):J.representation_status==="pending_approval"?l("statusPending"):J.representation_status==="rejected"?l("statusRejected"):J.representation_status==="expired"?l("statusExpired"):J.representation_status})]}):a.jsx("span",{className:"text-[11px] text-muted-foreground",children:l("modeSoleOwner")})}),a.jsx(Ie,{className:"text-xs py-1",children:ut[J.option_index]||`${l("option")} ${J.option_index+1}`}),a.jsx(Ie,{className:"text-xs py-1 text-center",children:J.comment?"Ano":"â"}),a.jsx(Ie,{className:"py-1",children:a.jsxs("div",{className:"flex gap-0.5",children:[a.jsxs(xh,{children:[a.jsx(vh,{asChild:!0,children:a.jsx(pt,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:mt=>{mt.stopPropagation(),K(J.id)},children:a.jsx(_i,{className:"h-3.5 w-3.5"})})}),a.jsx(bh,{children:l("techDetails")})]}),a.jsx(pt,{variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive",onClick:mt=>{mt.stopPropagation(),br(J.id)},title:"Smazat hlas",children:a.jsx(Lh,{className:"h-3 w-3"})})]})})]},J.id)}))})]})})})]}),a.jsx("div",{className:"mt-8"}),v.length>0&&a.jsx(Ro,{open:k,onOpenChange:G,children:a.jsxs(ln,{id:"audit",className:"border-amber-200 bg-amber-50/50 scroll-mt-24 dark:bg-amber-950/20 dark:border-amber-800",children:[a.jsx(Io,{asChild:!0,children:a.jsx(Nn,{className:"cursor-pointer hover:bg-amber-100/30 transition-colors pb-2",children:a.jsxs(Tn,{className:"text-sm font-semibold flex items-center gap-2",children:[a.jsx(fc,{className:"h-4 w-4 text-amber-600"}
234),l("auditLog")," (",v.length,")",k?a.jsx(tc,{className:"h-4 w-4 ml-auto"}):a.jsx(id,{className:"h-4 w-4 ml-auto"})]})})}),a.jsx(Bo,{children:a.jsx(cn,{className:"p-0",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs(di,{children:[a.jsx(ui,{children:a.jsxs(Qt,{children:[a.jsx(Ze,{children:l("auditVoter")}),a.jsx(Ze,{children:l("option")}),a.jsx(Ze,{children:l("auditOrigDate")}),a.jsx(Ze,{children:l("auditDeletedBy")}),a.jsx(Ze,{children:l("auditDeletedAt")}),a.jsx(Ze,{children:l("auditReason")}),a.jsx(Ze,{children:l("auditEvidence")})]})}),a.jsx(hi,{children:v.map(J=>a.jsxs(Qt,{children:[a.jsx(Ie,{className:"text-sm",children:J.voter_name||J.user_id}),a.jsx(Ie,{className:"text-sm",children:ut[J.option_index]||`${l("option")} ${J.option_index+1}`}),a.jsx(Ie,{className:"text-sm",children:ft(J.original_voted_at)}),a.jsx(Ie,{className:"text-sm",children:J.deleter_name||""}),a.jsx(Ie,{className:"text-sm",children:ft(J.deleted_at)}),a.jsx(Ie,{className:"text-sm max-w-[200px]",children:J.reason}),a.jsx(Ie,{className:"text-sm",children:J.evidence_url?a.jsxs("button",{className:"inline-flex items-center gap-1 text-primary hover:underline text-xs",onClick:async()=>{const{data:Re}=await Be.storage.from("vote-evidence").createSignedUrl(J.evidence_url,300);Re!=null&&Re.signedUrl&&window.open(Re.signedUrl,"_blank")},children:[a.jsx(ad,{className:"h-3 w-3"}),"Zobrazit"]}):a.jsx("span",{className:"text-muted-foreground text-xs",children:"â"})})]},J.id))})]})})})})]})})]}),a.jsx(Ti,{value:"announcement",className:"mt-4",children:a.jsx(p2,{pollId:e})}),a.jsx(Ti,{value:"reminder",className:"mt-4",children:a.jsx(f2,{pollId:e,onSwitchToEmails:()=>ze("emails")})}),a.jsx(Ti,{value:"templates",className:"mt-4",children:a.jsx(b2,{pollId:e})}),a.jsx(Ti,{value:"emails",className:"mt-4",children:a.jsx(S0,{pollId:e})}),a.jsx(Ti,{value:"delivery",className:"mt-4 space-y-4",children:a.jsx(Vb,{pollId:e,votesClosed:!(o!=null&&o.is_active)||!!(o!=null&&o.ends_at)&&new Date(o.ends_at)<new Date,legalCategory:(o==null?void 0:o.legal_category)??null,pollEndsAt:(o==null?void 0:o.ends_at)??null,boardTools:a.jsx(Mb,{pollId:e,evaluation:Zi,votesClosed:!(o!=null&&o.is_active)||!!(o!=null&&o.ends_at)&&new Date(o.ends_at)<new Date})})}),a.jsx(Ti,{value:"engagement",className:"mt-4",children:a.jsx(Hb,{pollId:e})})]})]}),a.jsx(fr,{open:ae,onOpenChange:he,children:a.jsxs(mr,{children:[a.jsx(pr,{children:a.jsxs(gr,{className:"flex items-center gap-2",children:[a.jsx(Vr,{className:"h-5 w-5 text-destructive"}),l("deleteVote")]})}),a.jsxs("div",{className:"space-y-4 py-2",children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:l("deleteVoteDesc")}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Wn,{className:"text-sm font-semibold",children:l("deleteReason")}),a.jsx(qd,{value:C,onChange:J=>$(J.target.value),placeholder:l("deleteReasonPlaceholder"),rows:3})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs(Wn,{className:"text-sm font-semibold flex items-center gap-1.5",children:[a.jsx(ad,{className:"h-3.5 w-3.5"}),l("evidenceLabel")]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:l("evidenceDesc")}),q?a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-border bg-muted/30",children:[M?a.jsx("img",{src:M,alt:"Evidence",className:"h-16 w-16 object-cover rounded border"}):a.jsx("div",{className:"h-16 w-16 flex items-center justify-center rounded border bg-muted",children:a.jsx(ad,{className:"h-6 w-6 text-muted-foreground"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:q.name}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[(q.size/1024).toFixed(0)," KB"]})]}),a.jsx(pt,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:()=>{L(null),Z(null)},children:a.jsx(uc,{className:"h-4 w-4"})})]}):a.jsxs("label",{className:"flex items-center justify-center gap-2 p-4 rounded-lg border-2 border-dashed border-border hover:border-primary/40 cursor-pointer transition-colors",children:[a.jsx(lg,{className:"h-5 w-5 text-muted-foreground"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"Vybrat souborâ¦"}),a.jsx("input",{type:"file",accept:"image/*,.pdf,.eml,.msg",className:"hidden",onChange:wr})]})]})]}),a.jsxs(Ql,{children:[a.jsx(pt,{variant:"outline",onClick:()=>he(!1),children:l("cancel")}),a.jsxs(pt,{variant:"destructive",onClick:yr,disabled:!C.trim()||we,children:[we?a.jsx(ds,{className:"h-4 w-4 animate-spin mr-2"}):a.jsx(Lh,{className:"h-4 w-4 mr-2"}),l("deleteVote")]})]})]})}),a.jsx(yh,{open:W,onOpenChange:D,title:l("closePollTitle"),description:l("closePollDesc"),confirmText:l("closePollConfirm"),onConfirm:fo}),a.jsx(yh,{open:Ye,onOpenChange:Me,title:l("sendResultsDialogTitle"),description:o!=null&&o.results_sent_at?`${l("sendResultsDialogDesc")}
234 Naposledy odesláno: ${new Date(o.results_sent_at).toLocaleString("cs-CZ")}.`:l("sendResultsDialogDesc"),confirmText:l("sendResults"),onConfirm:Zr}),a.jsx(fr,{open:X,onOpenChange:J=>{J||(Y(!1),ue(null),se(""))},children:a.jsxs(mr,{className:"max-w-md",children:[a.jsxs(pr,{children:[a.jsx(gr,{children:l("changeTypeConfirm")}),a.jsx(Xo,{children:(()=>{if(!o||!te)return"";const J=$e;if(o.voting_type==="automatic"||te==="automatic")return`${l("changeTypeFlipConfirm")}. ${l("continueQ")}`;const mt=ar(qe,_t,J,o.voting_type),Nt=ar(qe,_t,J,te);if(mt.officialPassed!==Nt.officialPassed){const tn=mt.officialPassed?l("accepted"):l("rejected"),At=Nt.officialPassed?l("accepted"):l("rejected");return`${l("changeTypeFlipConfirm")} ${tn} ${l("toWord")} ${At}. ${l("continueQ")}`}return l("changeTypeConfirm")})()})]}),a.jsx("div",{className:"space-y-3",children:a.jsxs("div",{children:[a.jsx(Wn,{className:"text-sm",children:l("typeChangeReason")}),(()=>{if(!o||!te)return null;const J=$e;if(o.voting_type==="automatic"||te==="automatic")return a.jsx("p",{className:"text-[11px] text-destructive mb-1",children:l("reasonRequired")});const mt=ar(qe,_t,J,o.voting_type),Nt=ar(qe,_t,J,te);return mt.officialPassed!==Nt.officialPassed?a.jsx("p",{className:"text-[11px] text-destructive mb-1",children:l("reasonRequired")}):null})(),a.jsx(qd,{value:ge,onChange:J=>se(J.target.value),placeholder:l("typeChangeReason"),className:"text-sm",rows:2})]})}),a.jsxs(Ql,{children:[a.jsx(pt,{variant:"outline",onClick:()=>{Y(!1),ue(null),se("")},children:l("cancel")}),a.jsxs(pt,{onClick:Yt,disabled:ve||(()=>{if(!o||!te)return!0;const J=$e;if(o.voting_type==="automatic"||te==="automatic")return!ge.trim();const mt=ar(qe,_t,J,o.voting_type),Nt=ar(qe,_t,J,te);return mt.officialPassed!==Nt.officialPassed&&!ge.trim()})(),children:[ve&&a.jsx(ds,{className:"h-4 w-4 animate-spin mr-1.5"}),l("closePollConfirm")]})]})]})}),a.jsx(fr,{open:!!oe,onOpenChange:J=>!J&&K(null),children:a.jsx(mr,{className:"max-w-3xl max-h-[85vh] overflow-y-auto",children:(()=>{var sn,ss;const J=h.find(Ln=>Ln.id===oe);if(!J)return null;const Re=r==="cs"?"Původ hlasu (audit)":r==="en"?"Vote origin (audit)":"Stimmherkunft (Audit)",mt=r==="cs"?"HlasujÃcà úÄet":r==="en"?"Voting account":"Wählender Account",Nt=r==="cs"?"ZastoupenÃ":r==="en"?"Representation":"Vertretung",Bt=r==="cs"?"Za vlastnÃka":r==="en"?"On behalf of":"Im Auftrag von",tn="Role",At=r==="cs"?"Identifikátory":r==="en"?"Identifiers":"Kennungen",Fn=r==="cs"?"Äas hlasovánÃ":r==="en"?"Vote time":"Abstimmungszeit",Kt=r==="cs"?"ZaÅÃzenÃ":r==="en"?"Device":"Gerät",yn=r==="cs"?"Geolokace (dle IP)":r==="en"?"Geolocation (by IP)":"Geolokation (per IP)",Qn="Region",un=r==="cs"?`Apartmán ${J.apartment_code} ⢠${ft(J.created_at)}`:r==="en"?`Apartment ${J.apartment_code} ⢠${ft(J.created_at)}`:`Wohnung ${J.apartment_code} ⢠${ft(J.created_at)}`,Rt=({label:Ln,children:jn})=>a.jsxs("div",{className:"grid grid-cols-[120px_1fr] gap-2 py-1 border-b border-border/30 last:border-0",children:[a.jsx("span",{className:"text-[11px] text-muted-foreground",children:Ln}),a.jsx("span",{className:"text-[12px] text-foreground",children:jn})]}),Gt=({title:Ln,children:jn})=>a.jsxs("div",{className:"rounded-md border border-border bg-card",children:[a.jsx("div",{className:"px-3 py-1.5 border-b border-border bg-muted/40 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:Ln}),a.jsx("div",{className:"px-3 py-1.5",children:jn})]});return a.jsxs(a.Fragment,{children:[a.jsxs(pr,{children:[a.jsx(gr,{className:"font-serif",children:Re}),a.jsx(Xo,{children:un})]}),a.jsx("div",{className:"mt-2 mb-3",children:a.jsx(j2,{votedAt:J.created_at,voterName:J.profile_name,representationMode:J.representation_mode||"sole_owner",representationStatus:J.representation_status||"valid",memberFrom:((sn=m.find(Ln=>Ln.code===J.apartment_code))==null?void 0:sn.member_from)||null,verificationSource:"server_v2",language:r})}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-2.5",children:[a.jsxs(Gt,{title:mt,children:[a.jsx(Rt,{label:r==="cs"?"Jméno":"Name",children:a.jsx("strong",{children:J.profile_name||"â"})}),J.profile_email&&a.jsx(Rt,{label:"E-mail",children:a.jsx("span",{className:"font-mono text-[11px]",children:J.profile_email})}),a.jsx(Rt,{label:Fn,children:a.jsx("strong",{className:"tabular-nums",children:ft(J.created_at)})})]}),a.jsx(Gt,{title:Nt,children:J.is_representative?a.jsxs(a.Fragment,{children:[a.jsx(Rt,{label:Bt,children:a.jsx("strong",{children:J.represented_owner_name||"â"})}),J.represented_owner_email&&a.jsx(Rt,{label:"E-mail",children:a.jsx("span",{className:"font-mono text-[11px]",children:J.represented_owner_email})}),J.representative_role_label&&a.jsx(Rt,{label:tn,children:a.jsx(Ot,{variant:"outline",className:"text-[10px] px-1.5 py-0 border-primary/40 text-primary",children:J.representative_role_label})})]}):a.jsx("div",{className:"py-2 text-[12px] text-muted-foreground italic",children:r==="cs"?"Hlasoval sám vlastnÃk":r==="en"?"Voted by owner directly":"Direkt vom Eigentümer"})}),a.jsxs(Gt,{title:At,children:[a.jsx(Rt,{label:"Ballot ID",children:a.jsx("code",{className:"text-[10px] bg-muted px-1.5 py-0.5 rounded font-mono",children:J.ballot_id?J.ballot_id.slice(0,8)+"â¦":"â"})}),a.jsx(Rt,{label:"Vote ID",children:a.jsxs("code",{className:"text-[10px] bg-muted px-1.5 py-0.5 rounded font-mono",children:[J.id.slice(0,8),"â¦"]})})]}),a.jsxs(Gt,{title:Kt,children:[a.jsx(Rt,{label:l("browser"),children:J.browser||"â"}),a.jsx(Rt,{label:"OS",children:J.os||"â"}),a.jsx(Rt,{label:l("device"),children:J.device_type||"â"})]}),a.jsx("div",{className:"lg:col-span-2",children:a.jsx(Gt,{title:yn,children:a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-4",children:[a.jsx(Rt,{label:"IP",children:a.jsx("span",{className:"font-mono text-[11px]",children:J.ip_address||"â"})}),a.jsx(Rt,{label:l("country"),children:J.country||"â"}),a.jsx(Rt,{label:Qn,children:J.region||"â"}),a.jsx(Rt,{label:l("city"),children:J.city||"â"}),a.jsx(Rt,{label:"ISP",children:a.jsx("span",{className:"text-[11px]",children:J.isp||"â"})})]})})}),((ss=J.comment)==null?void 0:ss.trim())&&a.jsx("div",{className:"lg:col-span-2",children:a.jsx(Gt,{title:l("comment"),children:a.jsx("p",{className:"text-[12px] text-foreground whitespace-pre-wrap py-1",children:J.comment})})})]}),a.jsx(Ql,{children:a.jsx(pt,{variant:"outline",onClick:()=>K(null),children:l("cancel")})})]})})()})})]})};export{c_ as default};
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.