(function(){function es(){this.nN={};this.vu={}}es.ov=[];es.CN=function(n){var F=es.ov;if(F.length!=0){var O=new k(V.E.MZ);
for(var e=0;e<F.length;e++)F[e].A(O)}window.requestAnimationFrame(es.CN)};window.requestAnimationFrame(es.CN);
es.prototype.ZL=function(n){var F=this.nN[n];if(F==null)return!1;return F.length>0};es.prototype.addEventListener=function(n,F){this.k(n,F,null)};
es.prototype.k=function(n,F,O){if(this.nN[n]==null){this.nN[n]=[];this.vu[n]=[]}this.nN[n].push(F);this.vu[n].push(O);
if(n==V.E.MZ){var I=es.ov;if(I.indexOf(this)==-1)I.push(this)}};es.prototype.removeEventListener=function(n,F){var O=this.nN[n];
if(O==null)return;var I=O.indexOf(F);if(I<0)return;var x=this.vu[n];O.splice(I,1);x.splice(I,1);if(n==V.E.MZ&&O.length==0){var r=es.ov;
r.splice(r.indexOf(this),1)}};es.prototype.A=function(n){n.currentTarget=this;if(n.target==null)n.target=this;
var F=this.nN[n.type];if(F==null)return;var O=this.vu[n.type];for(var e=0;e<F.length;e++){if(O[e]==null)F[e](n);
else F[e].call(O[e],n)}};function u(){this.Ky={};this.a2=0;this.UC();window.__kb=this}u.M6=null;u.prototype.UC=function(){var n=navigator.keyboard;
if(n&&window.top==window.self)n.getLayoutMap().then(function(F){u.M6=F})};u.prototype.reset=function(){this.Ky={};
this.a2=0};u.prototype.jl=function(n){this.a2++;this.Ky[n]=!0};u.prototype.Y3=function(n){this.a2--;
delete this.Ky[n];if(this.a2<=0||u.NW(n,u.Om))this.reset()};u.prototype.q=function(n){for(var e=0;e<n.ZF.length;
e++)if(this.Ky[n.ZF[e]])return!0;return!1};u.prototype.vo=function(){var n=this,F=n.q(u.MQ)?10:1,O=0,I=0;
if(n.q(u.q8))O=-F;if(n.q(u.nv))O=F;if(n.q(u.dE))I=-F;if(n.q(u.ZW))I=F;return new aE(O,I)};u.prototype.gT=function(){var n=this,F=u.yg;
for(var e=0;e<10;e++)if(n.q(F[e]))return e;return-1};u.NW=function(n,F){return F.ZF.indexOf(n)!=-1};
u.t2=function(n){var F=n.code,x=!1;if(F=="")return!1;var O=u.NW,I=u.yg.concat([u.wW,u.sF,u.Ag,u.lA]);
for(var e=0;e<I.length;e++)if(O(F,I[e]))x=!0;if(n.altKey&&!n.shiftKey&&!n.ctrlKey&&x)return!1;return u.uO.indexOf(F)==-1||n.shiftKey&&(F=="F5"||F=="F6")};
u.amr=function(n){var F=n.code;return F!=""&&(u.uO.indexOf(F)==-1||n.shiftKey&&(F=="F5"||F=="F6"))};
u.kt=function(n){if(typeof n=="string")return n;var F=navigator.platform.toUpperCase().indexOf("MAC")>=0;
if(n==null)return"";var O=[];for(var e=0;e<n.length;e++){var I=n[e].Gm?n[e].Gm:n[e];if(F&&n[e].AP)I=n[e].AP;
O.push(I)}if(F||O.length==1)return O.join(" + ");else{var x=O.pop();return O.join("+")+" + "+x}};u.uO="ZoomToggle BrightnessDown BrightnessUp AudioVolumeMute AudioVolumeDown AudioVolumeUp LaunchApplication1 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Enter Shift Escape KeyV".split(" ");
u.rg=function(n){var F=n.code,O=u.M6;if(O&&O.get(F)){var I={"+":"NumpadAdd","-":"NumpadSubtract",".":"Period"},x=O.get(F).toLowerCase(),r=x.charCodeAt(0);
if(97<=r&&r<=122){var _="Key"+x.toUpperCase();F=_}else if(I[x])F=I[x];return F}var I={"+":"NumpadAdd","-":"NumpadSubtract",".":"Period"},x=n.key.toLowerCase(),r=x.charCodeAt(0);
if(x.length==1){if(97<=r&&r<=122){var _="Key"+x.toUpperCase();F=_}else if(I[x])F=I[x]}if(x=="control"&&F!="")F="ControlLeft";
return F};u.anf={nm:"No Touch",ZF:["NoTouch"]};u.Ma={Gm:"Enter",ZF:["Enter","NumpadEnter"]};u.MQ={Gm:"Shift",AP:"\u21E7",ZF:["ShiftLeft","ShiftRight"]};
u.Om={Gm:"Meta",ZF:["MetaLeft","MetaRight","OSLeft","OSRight"]};u.ep={Gm:"Ctrl",AP:"\u2318",ZF:"ControlLeft ControlRight MetaLeft MetaRight OSLeft OSRight".split(" ")};
u.pI={Gm:"Alt",AP:"\u2325",ZF:["AltLeft","AltRight"]};u.akh={Gm:"CtrlOrAlt",ZF:u.ep.ZF.concat(u.pI.ZF)};
u.YE={Gm:"Escape",ZF:["Escape"]};u.cf={Gm:"Space",ZF:["Space"]};u.BS={Gm:"Tab",ZF:["Tab"]};u.a71={Gm:"Home",ZF:["Home"]};
u.ae0={Gm:"End",ZF:["End"]};u.q8={Gm:"Left",ZF:["ArrowLeft"]};u.dE={Gm:"Up",ZF:["ArrowUp"]};u.nv={Gm:"Right",ZF:["ArrowRight"]};
u.ZW={Gm:"Down",ZF:["ArrowDown"]};u.wW={Gm:"+",ZF:["NumpadAdd","Equal"]};u.sF={Gm:"-",ZF:["NumpadSubtract","Minus","Slash"]};
u.L7={Gm:";",ZF:["Semicolon"]};u.aaF={Gm:"Dead",ZF:["Dead"]};u.aiZ={Gm:"=",ZF:["Equal"]};u.pf={Gm:"Backspace",ZF:["Backspace"]};
u.lW={Gm:"Delete",ZF:["Delete"]};u.alV={Gm:"Backslash",ZF:["Backslash","IntlBackslash"]};u.a7n={Gm:"Backquote",ZF:["Backquote"]};
u.Ag={Gm:"[",ZF:["BracketLeft"]};u.lA={Gm:"]",ZF:["BracketRight"]};u.Aq={Gm:".",ZF:["Period"]};u.aa8={Gm:",",ZF:["Comma"]};
u.p9={Gm:"'",ZF:["Quote"]};u.U={Gm:"A",ZF:["KeyA"]};u.nS={Gm:"B",ZF:["KeyB"]};u.Te={Gm:"C",ZF:["KeyC"]};
u.m9={Gm:"D",ZF:["KeyD"]};u.E={Gm:"E",ZF:["KeyE"]};u.wZ={Gm:"F",ZF:["KeyF"]};u.ja={Gm:"G",ZF:["KeyG"]};
u.Rs={Gm:"H",ZF:["KeyH"]};u.tx={Gm:"I",ZF:["KeyI"]};u.uV={Gm:"J",ZF:["KeyJ"]};u.UA={Gm:"K",ZF:["KeyK"]};
u.LG={Gm:"L",ZF:["KeyL"]};u.$T={Gm:"M",ZF:["KeyM"]};u.CU={Gm:"N",ZF:["KeyN"]};u.uo={Gm:"O",ZF:["KeyO"]};
u.Er={Gm:"P",ZF:["KeyP"]};u.hZ={Gm:"Q",ZF:["KeyQ"]};u.Qu={Gm:"R",ZF:["KeyR"]};u.wB={Gm:"S",ZF:["KeyS"]};
u.KJ={Gm:"T",ZF:["KeyT"]};u.bm={Gm:"U",ZF:["KeyU"]};u.zV={Gm:"V",ZF:["KeyV"]};u.ajg={Gm:"W",ZF:["KeyW"]};
u.Tm={Gm:"X",ZF:["KeyX"]};u.aoM={Gm:"Y",ZF:["KeyY"]};u._1={Gm:"Z",ZF:["KeyZ"]};u.zE={Gm:"0",ZF:["Numpad0","Digit0"]};
u.c$={Gm:"1",ZF:["Numpad1","Digit1"]};u.ahF={Gm:"2",ZF:["Numpad2","Digit2"]};u.aiu={Gm:"3",ZF:["Numpad3","Digit3"]};
u.ajF={Gm:"4",ZF:["Numpad4","Digit4"]};u.a09={Gm:"5",ZF:["Numpad5","Digit5"]};u.ao5={Gm:"6",ZF:["Numpad6","Digit6"]};
u.al_={Gm:"7",ZF:["Numpad7","Digit7"]};u.anA={Gm:"8",ZF:["Numpad8","Digit8"]};u.ani={Gm:"9",ZF:["Numpad9","Digit9"]};
u.yg=[u.zE,u.c$,u.ahF,u.aiu,u.ajF,u.a09,u.ao5,u.al_,u.anA,u.ani];u.a9Z={Gm:"F1",ZF:["F1"]};u.aeb={Gm:"F2",ZF:["F2"]};
u.ahL={Gm:"F3",ZF:["F3"]};u.afT={Gm:"FF",ZF:["F4"]};u.Zk={Gm:"F5",ZF:["F5"]};u.akW={Gm:"F6",ZF:["F6"]};
u.ach={Gm:"F7",ZF:["F7"]};u.ale={Gm:"F8",ZF:["F8"]};u.acJ={Gm:"F9",ZF:["F9"]};u.ak4={Gm:"F10",ZF:["F10"]};
u.am5={Gm:"F11",ZF:["F11"]};u.anh={Gm:"F12",ZF:["F12"]};function da(){es.call(this);this.D7={};this.hH={};
this.ao6=0;this.al3={};this.Pj=[];this.a7q=0;da.J7=this}da.prototype=new es;da.a1K=function(n,F){var e=0,O=da.yV;
while(e<O.length){if((F>>>e&1)==1)break;e++}if(F==0||O[e][1]==""){if((F&15)!=0&&da.G2(n,[33,126])>.7)e=0;
else if(F==0)e=0;else{e=0}}return O[e][1]};da.rC=120;da.LJ=20;da.cols=16;da.pL=function(n){var F=n.name.postScriptName;
if(F==null)return null;return F.replace(/ /g,"-")};da.RQ=function(n){var F=n.name,O=F.typoFamilyName?F.typoFamilyName:F.fontFamily,I=F.typoSubfamilyName?F.typoSubfamilyName:F.fontSubfamily,x=da.a9U,r=O.toLowerCase();
for(var e=0;e<x.length;e++){if(x[e]=="roman")continue;if(r.endsWith(" "+x[e])||r.endsWith("-"+x[e])){var _=O.length-x[e].length,d=O.slice(_);
O=O.slice(0,_-1);if(d!=""){if(I=="Regular"||I==O+" Regular")I=d;else I=d+" "+I}break}}var w="BPdots,Baloo,Diner,EB Garamond Initials,Encode Sans Semi Condensed,Encode Sans Semi Expanded,Changa,HVD Poster,IM FELL DW,IM FELL Double,IM FELL English,IM FELL FLOWERS,IM FELL French Canon,IM FELL Great Primer,itsadzoke,JUICE,Lacuna,Latin Modern Mono,Latin Modern Sans,Latin Modern Roman,Latinia,Libre Barcode,Libre Caslon,Londrina,Panefresco,UnifrakturMaguntia,WC Rhesus,WC Sold Out,WC Wunderbach,Walkway".split(",");
for(var e=0;e<w.length;e++)if(O.startsWith(w[e])){var d=O.slice(w[e].length);O=w[e];if(d.startsWith(" ")||d.startsWith("-"))d=d.slice(1);
if(d!=""){if(I=="Regular")I=d;else I=d+" "+I}break}var Z={"Caudex-BoldItalic":"Bold Italic","Comfortaa-Light":"Light","Comfortaa-Medium":"Medium","Comfortaa-SemiBold":"SemiBold",DevroyeSCOSF:"Regular SCOSF",DevroyeUnicode:"Regular Unicode","LeagueScriptThin-Regular":"Regular","Monda-Bold":"Bold","Nobile-Bold":"Bold","Oswald-BoldItalic":"Bold Italic","Oswald-HeavyItalic":"Heavy Italic","Oswald-LightItalic":"Light Italic","Oswald-MediumItalic":"Medium Italic","Oswald-RegularItalic":"Regular Italic","PaloAlto-Italic":"Heavy Italic"},P=Z[da.pL(n)];
if(P)I=P;return[O,I]};da.prototype.alA=function(n){var F=this.j9();for(var O in F)if(F[O][0]==n)this.rs(O)};
da.prototype.rs=function(n,F){if(this.D7[n])return this.D7[n];if(this.hH[n])return null;var O=null,I=this.j9();
if(I[n]!=null)O=I[n][5];if(O==null){var x=da.agY[n];if(x==null){var r="DejaVuSans DejaVuSans-Bold DejaVuSans-Oblique DejaVuSans-BoldOblique DejaVuSerif DejaVuSerif-Bold DejaVuSerif-Italic DejaVuSerif-BoldItalic".split(" "),_=n.toLowerCase(),d=0;
if(_.indexOf("sans")!=-1)d=0;else if(_.indexOf("serif")!=-1)d=4;var w=_.indexOf("bold")!=-1||_.indexOf("-black")!=-1,Z=_.indexOf("italic")!=-1||_.indexOf("oblique")!=-1||_.endsWith("-it");
if(w&&Z)d+=3;else if(Z)d+=2;else if(w)d+=1;x=r[d]}if(F!=null&&F>128)x=this.m2(F,x);if(this.al3[n]==null){this.al3[n]=1;
var P=Date.now()-this.ao6>2e3?2e3:0;this.ao6=Date.now();alert(n+" \u27A1 "+x,P)}return this.rs(x,F)}this.hH[n]="a";
var C=new k(V.E.P,!0);C.data={e:V.U.Fb,b9:{url:"rsrc/fonts/"+O}};this.A(C)};da.prototype.m2=function(n,F,O){var I=this.D7[F];
if(I&&Typr.U.codeToGlyph(I,n)!=0)return F;var x=this.j9(),r=da.afG(n),_=r[0];if(x[F]&&(x[F][3]&_)==0){if(O)for(var e=0;
e<O.length;e++){var d=O[e].Name,w=x[d];if(w&&(w[3]&_)!=0)return d}var d=da.yV[r[1]][4];if(x[d])return d}return F};
da.afG=function(n){var F=da.yV,O=[0];for(var e=0;e<F.length;e++){var I=F[e][2];for(var x=0;x<I.length;
x+=2)if(I[x]<=n&&n<=I[x+1]){O[0]+=1<<e;O.push(e)}}if(O.length==1)O.push(0);return O};da.prototype.abh=function(){var n=this.Pj,F=n[0],O=n.length-1;
alert(hl.get([22,6,0])+" "+F+(O==0?"":", ... ("+O+")")+" "+hl.get([23,0])+".",1500);this.Pj=[]};da.prototype.amI=function(n,F){if(F!=!0){this.Pj.push(n.name.fullName);
clearTimeout(this.a7q);this.a7q=setTimeout(this.abh.bind(this),300)}var O=da.pL(n),I=this.j9(),x=I[O],r=da.a1t(n);
if(x==null){var _=document.createElement("canvas"),d=_.getContext("2d");_.width=da.rC;_.height=da.LJ;
var w=da.LJ*1.2/n.head.unitsPerEm;d.translate(4,da.LJ*.9);d.scale(w,-w);d.fillStyle="#000000";var Z=Typr.U.shape(n,da.a1K(n,r[3]),!0);
Typr.U.pathToContext(Typr.U.shapeToPath(n,Z),d);d.fill();r.aij=_.toDataURL();this.du(r)}delete this.hH[O];
this.D7[O]=n};da.abd=function(){var n=da.yV,F=[];for(var e=0;e<n.length;e++)F.push(n[e][0]);return F};
da.yV=[["Latin-1","Preview",[161,169,192,246,248,255],.7,"DejaVuSans"],["Latin Ext. A","",[256,383],.7,"DejaVuSans"],["Greek","",[913,929,931,969],.7,"DejaVuSans"],["Cyrillic","",[1040,1119],.7,"DejaVuSans"],["Hebrew","",[1473,1479,1488,1514,1520,1524],.7,"DejaVuSans"],["Arabic","",[1569,1594,1600,1749],.4,"DejaVuSans"],["Hangul","\uC608\uACE0\uD3B8",[4352,4607,44032,55203],.7,"NotoSansKR-Regular"],["Chi-Jap-Kor","\u9810\u7FD2",[12288,12351,12352,12447,12448,12543,19968,40895],.05,"DroidSansFallback"],["Tibetan","\u0F50\u0F74\u0F42\u0F66\u0F0B\u0F62\u0F97\u0F7A\u0F0B\u0F46\u0F7A\u0F0D",[3840,3948,3953,4044],.7,"NotoSansTibetan"],["Devanagari","\u092A\u0942\u0930\u094D\u0935\u093E\u0935\u0932\u094B\u0915\u0928",[2304,2431],.7,"Hind-Regular"],["Thai","\u0E20\u0E32\u0E1E\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07",[3585,3642,3647,3675],.7,"K2D-Regular"],["Khmer","\u1798\u17BE\u179B\u1787\u17B6\u1798\u17BB\u1793",[6016,6109,6112,6121,6128,6137],.7,"Battambang-Regular"],["Vietnamese","Xem tr\u01B0\u1EDBc",[192,195,200,202,204,205,210,213,217,218,221,221,224,227,232,234,236,237,242,245,249,250,253,253,258,259,272,273,296,297,360,361,416,417,431,432,7840,7929],.95,"DejaVuSans"]];
da.a1t=function(n,F,O){var I=n.name,w=0;if(da.pL(n)==null){console.log(n);throw"No postScriptName!"}var x=da.yV,r=[];
for(var e=0;e<x.length;e++){var _=x[e][2],d=x[e][3];r[e]=da.G2(n,_)>d?1:0}for(var e=0;e<r.length;e++)w+=r[e]<<e;
var Z=da.RQ(n);return[Z[0],Z[1],da.pL(n),w,O,F]};da.G2=function(n,F){var O=0,I=0;for(var x=0;x<F.length;
x+=2){for(var r=F[x];r<=F[x+1];r++){var _=Typr.U.codeToGlyph(n,r);if(_==0)I++;else O++}}return O/(O+I)};
da.ait=function(n,F){if(n[2]<F[2])return-1;if(n[2]>F[2])return 1;return 0};da.agv=function(n,F){if(n[5]=="fs/"+n[2]+".otf")n[5]="";
else if(n[5]=="gf/"+n[2]+".otf")n[5]="a";if(n[2]==(n[0]+"-"+n[1]).replace(/\s/g,"")){n[2]=""}else if(n[2]==n[0].replace(/\s/g,"")){n[2]="a"}if(F){if(n[0]==F[0])n[0]="";
if(n[1]==F[1])n[1]="";if(n[3]==F[3])n[3]="";if(n[4]==F[4])n[4]=""}return n.join(",")};da.ady=function(n,F){n=n.split(",");
if(n[0]=="")n[0]=F[0];if(n[1]=="")n[1]=F[1];if(n[3]=="")n[3]=F[3];else n[3]=parseInt(n[3]);if(n[4]=="")n[4]=F[4];
else n[4]=parseInt(n[4]);if(n[2]=="")n[2]=(n[0]+"-"+n[1]).replace(/\s/g,"");else if(n[2]=="a")n[2]=n[0].replace(/\s/g,"");
if(n[5]=="")n[5]="fs/"+n[2]+".otf";else if(n[5]=="a")n[5]="gf/"+n[2]+".otf";return n};da.agY={ArialMT:"LiberationSans","Arial-BoldMT":"LiberationSans-Bold","Arial-ItalicMT":"LiberationSans-Italic","Arial-BoldItalicMT":"LiberationSans-BoldItalic",TimesNewRomanPSMT:"LiberationSerif","TimesNewRomanPS-BoldMT":"LiberationSerif-Bold","TimesNewRomanPS-ItalicMT":"LiberationSerif-Italic","TimesNewRomanPS-BoldItalicMT":"LiberationSerif-BoldItalic",CourierNewPSMT:"LiberationMono","CourierNewPS-BoldMT":"LiberationMono-Bold","CourierNewPS-ItalicMT":"LiberationMono-Italic","CourierNewPS-BoldItalicMT":"LiberationMono-BoldItalic",Courier:"CourierPrime",TrebuchetMS:"SourceSansPro-Regular","TrebuchetMS-Bold":"SourceSansPro-Semibold","TrebuchetMS-Italic":"SourceSansPro-It","TrebuchetMS-BoldItalic":"SourceSansPro-SemiboldIt","Times-Roman":"LiberationSerif",Impact:"Anton-Regular",Calibri:"SourceSansPro-Regular","Calibri-Italic":"SourceSansPro-It","Calibri-Bold":"SourceSansPro-Bold",CalibriBold:"SourceSansPro-Bold","Times-Roman":"LiberationSerif","Times-Italic":"LiberationSerif-Italic","Times-Bold":"LiberationSerif-Bold","Helvetica-Bold":"LiberationSans-Bold","HelveticaNeue-Thin":"Roboto-Thin","HelveticaNeue-Light":"Roboto-Light",HelveticaNeue:"Roboto-Regular","HelveticaNeue-Roman":"Roboto-Regular","HelveticaNeue-Medium":"Roboto-Medium","HelveticaNeue-Bold":"Roboto-Bold","HelveticaNeue-BoldItalic":"Roboto-BoldItalic","HelveticaNeue-Black":"Roboto-Black","HelveticaNeue-Heavy":"Roboto-Black","SFProText-Light":"Roboto-Light","SFProText-Regular":"Roboto-Regular","SFProText-Roman":"Roboto-Regular","SFProText-Medium":"Roboto-Medium","SFProText-Semibold":"Roboto-Medium","SFProText-Bold":"Roboto-Bold","SFProText-BoldItalic":"SFProText-BoldItalic","SFProText-Black":"Roboto-Black","SFProText-Heavy":"Roboto-Black","SFProDisplay-Light":"Roboto-Light","SFProDisplay-Regular":"Roboto-Regular","SFProDisplay-Roman":"Roboto-Regular","SFProDisplay-Medium":"Roboto-Medium","SFProDisplay-Semibold":"Roboto-Medium","SFProDisplay-Bold":"Roboto-Bold","SFProDisplay-BoldItalic":"SFProDisplay-BoldItalic","SFProDisplay-Black":"Roboto-Black","SFProDisplay-Heavy":"Roboto-Black","SFUIText-Light":"Roboto-Light","SFUIText-Regular":"Roboto-Regular","SFUIText-Roman":"Roboto-Regular","SFUIText-Medium":"Roboto-Medium","SFUIText-Semibold":"Roboto-Medium","SFUIText-Bold":"Roboto-Bold","SFUIText-BoldItalic":"SFUIText-BoldItalic","SFUIText-Black":"Roboto-Black","SFUIText-Heavy":"Roboto-Black",Verdana:"DejaVuSans","Verdana-Bold":"DejaVuSans-Bold","Verdana-Italic":"DejaVuSans-Oblique","Verdana-BoldItalic":"DejaVuSans-BoldOblique","MyriadPro-Regular":"PTSans-Regular","MyriadPro-Bold":"PTSans-Bold","MyriadPro-LightIt":"PTSans-Italic","MyriadPro-Semibold":"PTSans-Bold","MyriadPro-BlackCond":"PTSans-NarrowBold",Cambria:"Oranienbaum-Regular",Georgia:"CharisSIL","Georgia-Bold":"CharisSIL-Bold","Georgia-Italic":"CharisSIL-Italic","Georgia-BoldItalic":"CharisSIL-BoldItalic","AGaramondPro-Regular":"EBGaramond08-Regular","AGaramondPro-Bold":"EBGaramond08-Bold","AGaramondPro-Italic":"EBGaramond08-Italic",Garamond:"EBGaramond08-Regular",FontAwesome:"FontAwesome5FreeSolid","ProximaNova-Regular":"Metropolis-Regular","ProximaNova-Semibold":"Metropolis-SemiBold","ProximaNova-Light":"Metropolis-Light",BellMT:"GalatiaSIL",PalatinoLinotype:"TeXGyrePagella-Regular","PalatinoLinotype-Bold":"TeXGyrePagella-Bold","PalatinoLinotype-Italic":"TeXGyrePagella-Italic","PalatinoLinotype-BoldItalic":"TeXGyrePagella-BoldItalic"};
da.prototype.j9=function(){if(FNTS.map==null){var n=FNTS.list,F=[];for(var e=0;e<n.length;e++){F[e]=da.ady(n[e],F[e-1]);
F[e].FI=e;this.du(F[e])}}return FNTS.map};da.prototype.du=function(n){var F=n[0],O=n[1],I=n[5];if(FNTS.map==null)FNTS.map={};
FNTS.map[n[2]]=n;if(FNTS.mapFS==null)FNTS.mapFS={};var x=FNTS.mapFS[F+"---"+O];FNTS.mapFS[F+"---"+O]=n;
if(FNTS.mapSub==null)FNTS.mapSub={};var r=FNTS.mapSub[F];if(r==null)r=FNTS.mapSub[F]=[];var _=r.indexOf(O);
if(_==-1)r.push(O);else r[_]=O};da.a1W=function(n,F){return da.Mg(n)-da.Mg(F)};da.Mg=function(n){n=n.toLowerCase();
var F=da.aaB(n)+(da.alB(n)<<1);if(n.indexOf("cond")==-1)F+=1<<25;return F};da.aaB=function(n){return n.indexOf("italic")!=-1||n.indexOf("oblique")!=-1?1:0};
da.a9U="two,four,eight,hair,thin,ultralight,extralight,exlight,light,regular,roman,book,medium,semi bold,semibold,demibold,extra bold,extrabold,bold,heavy,ultra,x black,black,extra".split(",");
da.a4U=["two","four","eight","hair","thin","ultralight","extralight","light",["regular","roman","book"],"medium",["semibold","demibold"],"bold","extrabold","heavy","ultra","black","x black"];
da.alB=function(n){var F=da.a4U,O=-1,I=-1;for(var e=0;e<F.length;e++){var x=F[e];if(x instanceof Array)for(var r=0;
r<x.length;r++){var _=x[r];if(n.indexOf(_)!=-1&&(O==-1||I<_.length)){O=e;I=_.length}}else if(n.indexOf(x)!=-1&&(O==-1||I<x.length)){O=e;
I=x.length}}if(O==-1)O=8;return O};da.W5=function(n,F){var O=1e9,I=null,x=da.Mg(F);for(var e=0;e<n.length;
e++){var r=Math.abs(da.Mg(n[e])-x);if(r<O){O=r;I=n[e]}}return I};da.prototype.u2=function(n,F){this.j9();
return FNTS.mapFS[n+"---"+F]};da.prototype.m8=function(n){this.j9();return FNTS.mapSub[n]};da.prototype.a3Z=function(){this.j9();
return FNTS.mapSub};var dW={EW:0,kg:null,Sj:null,Rk:null,Ti:null,yB:null,AV:!0,gI:0,$J:!1};dW.$m=function(){var n=V.dS(24)?" ":"",F=V.vz[V.by("Uu,"+n)];
F=F[V.by(n+"$/")];return dW._m()!=null&&dW._m()[V.RF("!&|'&50")]*50>F()/20};dW.j_=function(){return dW.a3o()!=null};
dW._m=function(){return dW.yB};dW.Nf=function(n){window.addEventListener("message",dW.acF,!1);setInterval(dW.uC,5e3);
if(dW.j_()){dW.kg=n;dW.Nx()}else setTimeout(n,1)};dW.uC=function(){if(dW.j_()&&dW.$J){dW.x8(dW.Yv());
dW.$J=!1}};dW.Pn=function(n){dW.kg=n;var F="https://www.photopea.com/papi/login.php?redirect="+encodeURIComponent(window.location.href);
dW.Rk=window.open(F,"_blank")};dW.aaZ=function(){localStorage.removeItem(dW.EW+"_uid");localStorage.removeItem(dW.EW+"_provider");
localStorage.removeItem(dW.EW+"_token");dW.yB=null};dW.acF=function(n){if(n.data instanceof ArrayBuffer||n.data instanceof Object)return;
if(n.data.charAt(0)!="{")return;var F=JSON.parse(n.data);if(F.prms==null)return;var O=F.prms.split(",");
if(O[0]=="papi_logged_in"){localStorage[dW.EW+"_uid"]=O[1];dW.gr(O[2]);localStorage[dW.EW+"_provider"]=O[3];
dW.Rk.close();dW.Nx()}if(O[0]=="payment_complete"){dW.Ti.close();dW.Nx()}};dW.a3o=function(){var n=localStorage[dW.EW+"_token"];
if(n!=null&&Date.now()*.001+10<parseInt(n.split("-")[0]))return n;return null};dW.gr=function(n){var F=localStorage[dW.EW+"_token"];
if(F!=null&&parseInt(n.split("-")[0])<parseInt(F.split("-")[0]))return;localStorage[dW.EW+"_token"]=n;
clearTimeout(dW.gI);dW.gI=setTimeout(dW.afz,Math.min(1e9,parseInt(n.split("-")[0])*1e3-Date.now()-20*1e3))};
dW.afz=function(){var n=new XMLHttpRequest;n.open("POST","https://www.photopea.com/papi/record_new.php",!0);
n.onload=dW.agL;var F=dW.bV(0)+"&read=2";n.setRequestHeader("Content-type","application/x-www-form-urlencoded");
n.send(F)};dW.Nx=function(){var n=new XMLHttpRequest;n.open("POST","https://www.photopea.com/papi/record_new.php",!0);
n.onload=dW.adc;var F=dW.bV(0)+"&read=1";n.setRequestHeader("Content-type","application/x-www-form-urlencoded");
n.send(F)};dW.x8=function(n){var F=new XMLHttpRequest;F.open("POST","https://www.photopea.com/papi/record_new.php",!0);
F.onload=dW.anz;var O=dW.bV(0)+"&read=0&score="+(n.tpl?1:0)+"&spublic="+dW.AV+"&record="+encodeURIComponent(JSON.stringify(n));
F.setRequestHeader("Content-type","application/x-www-form-urlencoded");F.send(O)};dW.adc=function(n){var F=JSON.parse(n.target.response);
if(F.error){}else{dW.yB=F.user;var O=dW.Yv(),I=F.record;if(F.record){dW.AV=F.spublic;dW.Vc(I)}else if(O)dW.x8(O)}dW.gr(F.token);
if(dW.kg){dW.kg();dW.kg=null}if(dW.Sj){dW.Sj();dW.Sj=null}};dW.agL=function(n){var F=JSON.parse(n.target.response);
dW.gr(F.token)};dW.anz=function(n){var F=JSON.parse(n.target.response);dW.gr(F.token);if(dW.Sj)dW.Nx()};
dW.bV=function(n){return"app="+n+"&uid="+localStorage[dW.EW+"_uid"]+"&token="+localStorage[dW.EW+"_token"]};
dW.EA=function(){return dW.Yv()};dW.sB=function(n,F){dW.Vc(n);dW.$J=!0;if(F){dW.Sj=F;dW.uC()}};dW.Yv=function(){var n=localStorage[dW.EW+"_stateLocal"],F;
if(n==null)return null;try{F=JSON.parse(n)}catch(hl){return null}return F};dW.Vc=function(n){var F=JSON.stringify(n);
localStorage[dW.EW+"_stateLocal"]=F};dW.order=function(n,F,O){dW.kg=O;var I="https://www.photopea.com/papi/order.php?ptype="+F+"&param="+n+"&uid="+localStorage[dW.EW+"_uid"]+"&token="+localStorage[dW.EW+"_token"];
dW.Ti=window.open(I,"_blank")};dW.a04=function(n,F){dW.kg=F;var O="https://www.photopea.com/papi/insertKey.php?key="+n+"&uid="+localStorage[dW.EW+"_uid"]+"&token="+localStorage[dW.EW+"_token"];
dW.Ti=window.open(O,"_blank")};var hl={};hl.Pk=0;hl.YY={};hl.v6=function(n){var F=LNG.tables,O=F[n];
if(typeof O=="string"){O=F[n]=hl.h8(O)}return O};hl.h8=function(n){var F=[],O=0,I=0,x=[],r=n.length;
while(I!=r){var _=n[I];if(_=="["){F.push(x);x=[];I=O=I+1}else if(_=="]"){x.push(O==I?null:n.substring(O,I));
var d=x;x=F.pop();x.push(d);I=O=I+1}else if(_==";"){if(n[I-1]!="]")x.push(O==I?null:n.substring(O,I));
I=O=I+1}else I++}return x};hl.get=function(n){if(typeof n=="string")return n;var F=typeof n[0];if(F=="number"){for(var e=1;
e<n.length;e++)if(typeof n[e]!="number"){console.log(n);throw"e"}return hl.alb(n)}var O=hl.get(n[0]);
for(var e=1;e<n.length;e++){var I=hl.get(n[e]),x=O.indexOf("VAR"+(e-1));O=O.slice(0,x)+I+O.slice(x+4)}return O};
hl.alb=function(n){var F=JSON.stringify(n);if(hl.YY[F]!=null)return hl.YY[F];var O=hl.v6(0),I=hl.v6(hl.Pk),x=hl.gK(n,I);
if(x==null)x=hl.gK(n,O);return x};hl.gK=function(n,F){for(var e=0;e<n.length;e++){F=F[n[e]];if(F==null)return null;
else if(typeof F=="string")break}return F.split("::")[0]};hl.a3C=function(){var n=function(O,I){var x=O.code,r=I.code;
if(x=="en")return-1;if(r=="en")return 1;var _=navigator.languages,d=_.indexOf(x)!=-1,w=_.indexOf(r)!=-1;
if(d&&w)return x>r?1:-1;if(d)return-1;if(w)return 1;return x>r?1:-1},F=LNG.langs.slice(0);F.sort(n);
return F};hl.afg=function(n){hl.Pk=n};hl.a3=function(n){for(var e=0;e<LNG.langs.length;e++)if(LNG.langs[e].code==n)hl.Pk=e};
hl.p3=function(){return LNG.langs[hl.Pk].code};hl.afS=function(n){for(var e=0;e<n.length;e+=2)if(n[e+1].indexOf(">")==-1)hl.YY[JSON.stringify(n[e])]=n[e+1]};
hl.hu=function(n){var F=-1,O=LNG.langs;for(var e=0;e<O.length;e++)if(O[e].code==n)F=e;return F};var i8={fy:!1,Em:!1,ZJ:!1};
i8.LQ=function(){return V.vz[V.uq("vrt",2)]!=V.vz[V.uq("xksn",5)]};i8.rE=function(){var n=V.RF,F=V.vz[n("u#z/*%1:")],O=F[n("s#{3")],I=n("t&|{1%h2.94@I"),x=n("xy+_)%0+7@qK~<"),r=n("r$'\x7F+$f.283"),_=n("#y$)3%f.283"),d=0,w=n("$y+[145/+AC7"),Z=n("rx*\x7F+3("),P=V.N7("Y_5UDDB>&\x7F");
if(V.vz[P]!=!0){d=1}var C=F[I](n("u}-"));C[w](n("zx"),Z);C[w](n("$(0&\""),n("(}{.%ZXVY<GmU@@GHL[$\" #fq7"));
O[r](C);C=F[x](Z);if(C==null){d=2}else{if(!O[n("t#%.~)19")](C)){d=3}else if(Math.round(C[n("xy+\\,51*2:6uAA@LU6LMa")]()[n("(}{.%")]-500)>5){d=4}O[_](C)}if(i8.Em)d=5;
if(i8.ZJ)d=6;return d};i8.a26=function(n){var F=V.by("y),+1ZRU:.787=mlITWRZVgphaifg}u~!C{+,P5)2328eDPnDJ\\NhYdgbjf2q}"),O={method:"HEAD",mode:"no-cors"},I=new Request(F,O);
fetch(I).then(function(x){return x}).then(function(x){n(!1)}).catch(function(x){i8.Em=!0;console.clear();
n(!0)})};i8.ajW=function(){var n=V.gi("UU[YW#ECC8"),F=V.gi("VQ](RUK>@B8p71*03m}x'"),O=V.gi("WQRMKT"),I=this.ao1[n][F]();
if(I[O]<4){i8.ZJ=!0;this.aox(!0)}};i8.aoB=function(){var n=V.vz._cwY,F=V.vz[V.RF("$y+n&-(5>@")],O="FQi[VE];;J6@?18',!'*3$|*niu~hgcWhlOUU`LOIT53A-11/)~$'>-cvys~_]k[RQiYHEJMWH@N--E$++|!|~t*hht,{HaWP_NrcLBNWIDN>049?5(+3qq}3$pp{ZjkoMi6UEJCLAQ/.+47-09>Tspy|ru~(xAaVl2Tcm]|LMZ\\",I=String.fromCharCode(32);
n(V.N7(O)+I+I+i8.rE());if(!dW.$m())F(i8.aoB,Math.round(Math.PI*1e4))};i8.hh=function(n){var F=V.RF,O=V.vz[F("u#z/*%1:")],I=F("t&|{1%h2.94@I"),x=F("$y+[145/+AC7"),r=F("%y/.`/1:.:C"),_=O[I](n[0]);
for(var d in n[1]){if(d=="txt")_[r]=n[1][d];else _[x](d,n[1][d])}return _};i8.akY=function(n,F,O,I,x){V.em(O);
var r=V.RF,_=r("r$'\x7F+$f.283"),d=r("$y+[145/+AC7"),w=r("rx{_3%1:u5BF:F@P"),Z=r("#y'&~#("),P=r("$(0&\""),C=r("$&z"),W=r("r'0( "),v=r("%y/.`/1:.:C"),L=r("u}-"),H=V.by("zz*{+&"),y=V.vz[r("u#z/*%1:")],g=r("t&|{1%h2.94@I"),Q=r("$w)#-4"),J=V.by("z#+ 05e,0<B8"),A=V.by("w}*.2c,061"),p=V.by(" u.$%\"86<"),U=V.by("!#c$,&"),j=V.vz[p][U];
if(!i8.LQ()&&!i8.rE()&&j&&n*F>300*300){var b=y[r("xy+_)%0+7@BtN,<E/ETO")](r("yyx~"))[0],s=JSON.parse(V.by("lo9.!3-7>N[NWLNBc~iSbedj4,/fsy:%!~{+-5*6?[4CDhSqqY]aQ bai,kw)6/ \"#)}$D_JC8@9GRk@CFQT_z~zy\\.`*~q$}(/?L?H=?3ToZDSVU[%| Wdj+uqol{}&z'0L%45YDbbnnArE~}\"\"W$[hn/nz,92t*3+#D_=>D7R5f9bWJ\\V`gw%w!v}|-H3,!)\"0;T1<?:B>P@Id%jeZb[it.juxs{w*y#>>AGFKkSVQFNGU`yVad_gcuen8p}w6V<7,4-;F_<GJEMI[KT}Vc]{{~%chI14/$,%3>W4?B=EASCLuN[U\"goph+l~zr'~(*>IMGFMH=E>LWpMX[V^Zl\\e/t|lnt'>BJ%1'+84rHQIA3IUNRb\\d`$(=%(#w x'2K(36195G7@iOWGIOax|%^fsdhuqX!~-% .p7,2X\\qY\\]k!hsPVhZtepsnvr0P61&.'5@Y06H:TEPSNVRoorxW\\+3xl$%yX~o&5</@DFUu[o|feHK"));
for(var e=0;e<s.length;e++){var G=i8.hh(s[s.length-1-e]);b[J](G,b[A])}var T=V.by("p}&$2a(:"),z=V.by("'#!}i0%+"),m=V.by("ps,}$\"40");
V.vz.___ggo=function(){V.vz[m](w,2,function(h,X){if(X&&h[z]==!0){if(!V.vz[T]){V.vz[T]=!0;var D=i8.ahb.bind({Fp:O,a9n:x,head:b,Sa:F});
D()}}})}}else{var $=[r("z!~I-0\":*8;`EFB")];for(var e=0;e<$.length;e++){var o=y[g](r("z!~"));o[d](P,r("t))-,2]685=F:Jv"));
o[w](r("t  }("),I,!1);o[d](C,$[e]);O[_](o)}}};i8.ND=function(n){var F=2;if(n>=3*270+30)F=3;if(n>=4*270+30)F=4;
return F};i8.ahb=function(){var n=V.RF,F=n("r$'\x7F+$f.283"),O=n("$y+[145/+AC7"),I=n("rx{_3%1:u5BF:F@P"),x=n("#y'&~#("),r=n("$(0&\""),_=n("$&z"),d=n("r'0( "),w=n("%y/.`/1:.:C"),Z=n("u}-"),P=V.by("zz*{+&"),C=V.vz[n("u#z/*%1:")],W=n("t&|{1%h2.94@I"),v=n("$w)#-4"),L=V.by("z#+ 05e,0<B8"),H=V.by("w}*.2c,061"),y=JSON.parse(V.by("lo9|35868N[NW<H@UXi%oSVkh~,%om.I4+'%\"N,,;@R_XIKCOOLWp,vodles~8lo(y }0,M%M>B:FPLJGCku+e[mqqp%nlz%yR<IB8?>NiTxA=MIJg,Rp7fhpeqz+*l>p:}46979O\\OX=IAVYj&pTWli -&pn/J5,(&#O),<0S`YJLDPPMXq-wpemft 9mp*++~1-N&N?C;GQMKHDlv,f\\nrrq&om{&zS=JC9@?OjUzI\\NRZh_T^awhw!hh~n21sv")),g=V.vz,Q=-1,J=g[V.by("f#!}f")],A=V.by("xy'"),p=V.by("TU"),U=V.by("Vi"),h=0;
if(J&&J[A]){var j=J[A];if(j==U)Q=0;if(j==p)Q=1}var b=Q==-1?null:i8.hh(y[Q]),s=this.Fp,G=this.a9n,T=this.head,z=this.Sa,m=V.by("~u*\"'/P)9ADBCrlnR]"),$=[.2,.6,.2],o=Math.random();
while($[h]<o&&h<$.length-1){o-=$[h];h++}if(h==0){console.log(0);if(G==1){var X=V.by("zxC+&086:21`9HI>rzwc$!$V>CP/l{m|ww(.#'7SZYD7IIILLTPw]a!e\\phmurryz~.HON3*>6;CODBULryxdbff]qinv7>=!|!2.%916>^edSHFYPv~'$#bbijn}8EBE"),D=X.split(","),f=C[W](P);
for(var e=0;e<D.length;e+=2)f[O](D[e+0],D[e+1]);f[O](r,n("~u)!&.P(8@CABrmnQ\\"));s[F](f);if(!i8.fy){i8.fy=!0;
var R=V.by("9z-)!5-68LW[UT[UCWg^WkY4!.63~?<?/HJK7VTNVM28LHFTb#hr_Zdljnfe5m|}rGOL8XUX+rw%^f]YQSRadcu6{mg|(c[]\\,/.r)8?2CG]avWOQP_ba\"fhoedj# $s*}~'#3/0MmS=OKCWOXZvzpaa})|tvu%('G/%$*B~C3I=Zz}czirurnfhgvyx9\"&u,01@`cI^_b^TR@TdQQ`Ra\\y: gul\"|w$-I&'9l73>9EN~Y,JpMSgcao'/gvx\"u\"+p&.'5@Y3A8MHCOX\"SSbTc^*nrjv37L}}-~.)TA?9G;`TLNM\\_^~f\\mmoqyn`t+*AV((7)83^7CIPEjn$il-megfuxw8|!x%A>fgyJWNX=LONT}ux]eUW]o-i3lz$s!|}**'2W;5Gd@=LRFLyOUl6cr=27=CAFKISWPKR,2FB@NgfhYc)u|Zf^mei\\\\V8' 4\"HMLN@k\"A9>CNIU^Ldlf^!2Fxm}%z#~@DKg(>2]AEPcgmd\\]cV|2rjlkz}|=&z' FJ_ESUYn"),i=C[W](v);
i[w]=R;T[F](i)}}else if(G==2){var t=i8.ND(z);if(!i8.fy){i8.fy=!0;var X=V.by("uu,{J*(R:5?GEIA@oHWXM$$'r/53eMR_>[j\\kffv|qu&bih3&888;;C?'lp0TK_W\\daahim|W^]\"x-%*2>31D;\")(SQUUL`X]eFMLoko!|s( %-mtsbWUh_&.,kkrsw'AI"),D=X.split(","),R=V.by("9z-)!5-68LW[UT[UCWg^WkY4!003~;A?9Ay 40.<JjPZGBLTRVNM|UdeZ114 <B@rZ_lFN>687FIHZz`RLalH@BApsrWm|$v(,BF[<465DGFfKMTJIOgdhXnbckgwst2R8\"40(<4=?[_UFFbmaY[Zilk,sihn'c(w.\"?_bH_NWZWSKML[^]}fjZptu%EH.CDGC97%9I2CRrX@NEZUP\\e\"hobr|Ynxtu*(._.1OL)55K;iIG#omySYmigu/)1j2<Q0}2B+HhNrGJ<WnJYYZwXi\"*eksl3t'#z/'02N/UONH>PTTSgkS~\\Xm>twxrn%'z@=##9)W@6B;?OEGgqiw-^^#c* }k 0||,}-(EeK4_8GIRFR[AV^Wep*cqh}xs )R$$3%4/Z?C;Gcg|NN]O^Y%qoiwk1%|~}-0/O7->>@BJ?1E[Zq'XXgYhc/gsy!u;?T\"M6+=lCFGA=SUInpQQgW&ndpim}su;C:239,RJMPpQIKJY\\[{`d\\h%\"JK].;2<!0328aY\\AI9;ASpMvP^gWd`ammju;~x+H$!06*0]39PyGV!uz!'%*/-7;4/6ou*&$2KJL=GlY`>JBQIM@@:{jcwe,102$Oe%|\"'2-9B0HPJBdu*\\Qah^fb$(/Kk\"uA%)4GKQH@AG:`uVNPO^a`!i^jc*.C)79=R");
for(var N=0;N<t;N++){var f=C[W](P);for(var e=0;e<D.length;e+=2)f[O](D[e+0],D[e+1]);f[O](r,m);s[F](f);
var i=C[W](v);i[w]=R;s[F](i)}}}}else if(h==1){console.log(1);if(G==1){var M=C[W](V.by("u}."));M[O](r,m);
var hK=C[W](V.by("u}."));M[F](hK);hK[O](V.by("zx"),V.by("AK}|~T()V`1i9eoEGwtL##V$`0e4>@rtvMOL"));hK[O](V.by("t!x.1"),V.by("pu(y~1)?).4"));
var R=V.by("(u*:~%4<=5ECUu[VKSLZe~U[jrsk{y,/O50%-&4?X/5DLMEUSeehnmfm`8\\a%E-0tz*23+;9Y@G:eKSTLnPb^Vjbkm*.('.rx(01)97WAB<=@AQ#Iol}(ZY[1de3=mFuBL\"$TQ)__3`=lBpz|OQS*,)|'<$'(6K"),i=C[W](v);
i[w]=R;hK[F](i);s[F](M)}else if(G==2){var t=i8.ND(z);for(var e=0;e<t;e++){var M=C[W](V.by("u}."));M[O](r,m);
var hK=C[W](V.by("u}."));M[F](hK);hK[O](V.by("zx"),V.by("rKI!#X%WV/ac9eoqDyt#~(($]_dg>A@suI|T"));hK[O](V.by("t!x.1"),V.by("pu(y~1)?).4"));
var R=V.by("(u*:~%4<=5ECUu[VKSLZe~U[jrsk{y,/O50%-&4?X/5DLMEUSeehnmfm`8\\a%E-0tz*23+;9Y@G:eKSTLnPb^Vjbkm*.('.rx(01)97WAB<=@AQ#IolO(&]_5a43k>@uBLN!VQ_[dd`:<ADz}|PR&Y1|'<$'(6K"),i=C[W](v);
i[w]=R;hK[F](i);s[F](M)}}if(!i8.fy){i8.fy=!0;var R=V.by("9z-)!5-68TG^U=d^]dgaOcsjy: g4l~ts*}`+'2-9BXZJ=OISZot*qh&npd$D*4?By}+M$*9AB:JHhAPQu}}'%&(]crz{s$\"B\".D[CF=ZDLF>[{ak\\Pfe#a[savi{u '<S;2O&;D<4SsYQRXK$kvV#_`rFplwr~(*[6s$-v-<7\\^CCBHmrH Puux~f3op#V!|(#/8:kF$4='=LGlnM]Um}#X0`/7m #z' a*.4/UD\\qY\\]km`U]Vdo'}esj zu\"+BW"),i=C[W](v);
i[O](V.by("uu,{J$*(=F>6"),V.by("wu$.#"));i[w]=R;T[F](i)}}else{console.log(2);var bD=C[W](v);bD.setAttribute(_,V.by("y),+1ZRU.@8iARrqq|S~P~Wcirdixxz$@$}0M2:*77D<<LPnSNX`^bZY^mnrl\";}|%G'3"));
T[F](bD);var co=JSON.parse(V.by("l6{$4M+7>Y17bIDNVTXPOTcd-245=+81v~/H&29T,2]D?IQOSKJO^_(-138&3,qy*C!-4O'-X?:DLJNFEJYZ#(,/4!.'lt%>{(/J\"(S:5?GEIA@ETU}#(%({)\"go 9v#*E|#N50:B@D<;@OPx}# $vU")),iM=[co[0]];
if(G==2)iM=co.slice(1,1+i8.ND(z));for(var e=0;e<iM.length;e++){var hK=C[W](V.gi("SU_"));hK[O](V.gi("XP"),iM[e]);
hK[O](r,m);s[F](hK)}}if(b)s[F](b)};var i6={He:0,P8:{expires_at:0},uR:[]};i6.v0=function(n){if(n)i6.uR.splice(0,0,n);
if(i6.He==1)return;if(i6.P8.expires_at>Date.now()*.001+30){while(i6.uR.length>0)i6.uR.pop()()}else{if(i6.He==0)i6.He=1;
gapi.auth.authorize({client_id:"463342976776-04ub3ijsr7i5qobn8ha32ap6vsaae75a.apps.googleusercontent.com",scope:["https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/drive.file"].join(" "),immediate:i6.He==2?!1:!0},i6.abA)}};
i6.abA=function(n){if(n&&!n.error){i6.P8=n;i6.He=!1;i6.v0()}else if(i6.He==1){i6.He=2;i6.v0()}else alert("Error: "+n.error)};
i6.LZ=function(){return"access_token="+i6.P8.access_token+"&token_type="+i6.P8.token_type};i6.Zj=function(){return i6.P8.token_type+" "+i6.P8.access_token};
function hu(){}hu.Hy=function(n){var F=new Uint8Array(n),O=0,I={J$:[],Gr:[],list:[]},x=Y.Ys(F,O);O+=2;
if(x<=2){return hu.abN(F)}var r=Y.Ys(F,O);O+=2;var _=Y.su(F,O,8);O+=8;var d=Y.c(F,O);O+=4;if(d>0)I.J$=hu.eC(F,O,d,r,x);
O+=d;var w=Y.su(F,O,8);O+=8;var Z=Y.c(F,O);O+=4;if(Z>0)I.Gr=h$.QQ(F,O,Z);O+=Z;var P=Y.su(F,O,8);O+=8;
var C=Y.c(F,O);O+=4;if(C>0){var W={};dh.oS(F,W,O+4);I.list=W.Brsh.v}O+=C;var v=I.list;for(var e=0;e<v.length;
e++){e1.t4.check(v[e].v)}return I};hu.dN=function(n,F){n.v.Nm.v=F};hu.abN=function(n){var F={J$:[],Gr:[],list:[]},O=0,I=Y.Ys(n,O);
O+=2;var x=Y.Ys(n,O);O+=2;for(var e=0;e<x;e++){var r=Y.Ys(n,O);O+=2;var _=Y.c(n,O);O+=4;var d=O;if(r==2){var w={};
F.J$.push(w);var Z=Y.c(n,d);d+=4;var P=Y.Ys(n,d);d+=2;if(I==2){var C=Y.Lf(n,d);d+=4+C.length*2+2}w.id=fj.Mj()+"-d71c-11e5-b1ae-a548a96e5f9f";
d++;d+=8;w.j=Y.sG(n,d);d+=16;var W=Y.Ys(n,d);d+=2;var v=n[d];d++;w.channel=gL.c8(!1,W,n,w.j.d,w.j.v,d,v);
var L=e1.sW(w.id),H=L.Brsh.v;H.Dmtr.v.val=w.j.d;H.Spcn.v.val=P;F.list.push({t:"Objc",v:L})}O+=_}return F};
hu.WH=function(n){var F=new gV,O=0,I=0;Y.bY(F,O,6);O+=2;Y.bY(F,O,2);O+=2;Y.d3(F,O,"8BIMsamp");O+=8;O+=4;
I=O;O=hu.wP(F,O,n.J$);Y.QI(F,I-4,O-I);Y.d3(F,O,"8BIMpatt");O+=8;O+=4;I=O;O=h$.nV(F,O,n.Gr);Y.QI(F,I-4,O-I);
var x={classID:"null",Brsh:{t:"VlLs",v:n.list}};Y.d3(F,O,"8BIMdesc");O+=8;O+=4;I=O;Y.QI(F,O,16);O+=4;
O+=dh.Nl(F,x,O);Y.QI(F,I-4,O-I);return F.data.slice(0,O).buffer};hu.eC=function(n,F,O,I,x){var r=Y.c,_=Y.sG,d=F+O,w=[];
while(F<d){var Z={};w.push(Z);var P=r(n,F);F+=4;var C=F,W=Y.Uk(n,F);F+=W.length;Z.id=W.G4;if(I==1){F+=9;
Z.j=_(n,F);F+=16}else{F+=7;var v=r(n,F);F+=4;Z.j=_(n,F);F+=16;var L=r(n,F);F+=4;F+=L*4;var H=r(n,F);
F+=4;var y=r(n,F);F+=4;var g=_(n,F);F+=16}var Q=Y.Ys(n,F);F+=2;var J=n[F];F+=1;Z.channel=gL.c8(!1,Q,n,Z.j.d,Z.j.v,F,J);
if(P%4!=0)P+=4-P%4;F=C+P}return w};hu.wP=function(n,F,O){var I=Y.QI,x=Y.S3;for(var e=0;e<O.length;e++){var r=O[e],_=F+4,w=56,P=1;
F+=4;Y.HH(n,F,r.id);F+=r.id.length+2;n.nz(F,1);n.data[F]=1;F+=3;I(n,F,3);F+=4;var d=F;F+=4;x(n,F,r.j);
F+=16;I(n,F,w);F+=4;F+=w*4;I(n,F-4,1);var Z=F;F+=4;I(n,F,8);F+=4;x(n,F,r.j);F+=16;Y.bY(n,F,8);F+=2;n.nz(F,1);
n.data[F]=P;F++;n.nz(F,r.j.X()*2);F=gL.n8(!1,r.channel,n.data,r.j.d,r.j.v,F,P);n.nz(F,8);F+=8;var C=F-_;
I(n,_-4,C);I(n,d,C-49);I(n,Z,C-305);if(C%4!=0)F+=4-C%4}return F};function aD(){}aD.Hy=function(n){var F=new Uint8Array(n),O=[],I=0,x=Y.Ys(F,I);
I+=2;if(x!=4){throw"Unknown version of curves: "+x}var r=Y.Ys(F,I);I+=2;for(var e=0;e<r;e++){var _=aD.vK(F,I);
I+=2+2*_.length;O.push(_)}if(I==F.length)return O;var d=Y.su(F,I,4);I+=4;var w=Y.Ys(F,I);I+=2;var Z=Y.Ys(F,I);
I+=2;if(Z!=0)throw"extra curves for channels";return O};aD.EK=function(n,F,O){var I=F,x=[],r=n[F];F+=3;
var _=Y.c(n,F);F+=4;for(var e=0;e<4;e++){var d=_>>>e&1;if(d){if(r==0){var w=aD.vK(n,F);F+=2+2*w.length}else{var w=aD.af5(n,F);
F+=256}x.push(w)}else x.push(r==0?[0,0,255,255]:aD.a9h())}var Z=bS.tc("curv");for(var e=0;e<4;e++){if(r==0){var P=x[e],C=[];
for(var W=0;W<P.length;W+=2)C.push(q.pH.G0(P[W],P[W+1],!0));aD.K8(Z,e,C)}else aD.K8(Z,e,x[e])}return Z};
aD.a9h=function(){var n=[];for(var e=0;e<256;e++)n.push(e);return n};aD.K8=function(n,F,O){var I=hd.ST("CrvA",F);
if(O.length<256)I.Crv={t:"VlLs",v:O};else{I.Mpng={t:"VlLs",v:[]};for(var e=0;e<256;e++)I.Mpng.v[e]={t:"long",v:O[e]}}I={t:"Objc",v:I};
var x=n.Adjs.v,r=hd.RZ(x,F);if(r==-1)x.push(I);else x[r]=I};aD.yL=function(n,F){var O=n.Adjs.v,I=hd.RZ(O,F);
if(I==-1){if(O.length==0||O[0].v.Crv)return[q.pH.G0(0,0,!0),q.pH.G0(255,255,!0)];var x=[];for(var e=0;
e<256;e++)x.push(e);return x}var r=O[I].v,_=r.Crv;if(_)return _.v;var x=[];for(var e=0;e<256;e++)x.push(r.Mpng.v[e].v);
return x};aD.vK=function(n,F){var O=[],I=Y.Ys(n,F);F+=2;for(var x=0;x<I;x++){var r=Y.Ys(n,F);F+=2;var _=Y.Ys(n,F);
F+=2;O.push(_,r)}return O};aD.ah0=function(n,F,O){var I=O.length/2;Y.bY(n,F,I);F+=2;for(var x=0;x<I;
x++){Y.bY(n,F,O[x*2+1]);F+=2;Y.bY(n,F,O[x*2+0]);F+=2}};aD.af5=function(n,F){var O=[];for(var e=0;e<256;
e++)O.push(n[F+e]);return O};aD.ajY=function(n,F,O){n.nz(F,256);for(var e=0;e<256;e++)n.data[F+e]=O[e]};
aD.H1=function(n,F,O){var I=[];for(var e=0;e<4;e++){var x=aD.yL(O,e);if(x.length==256)I.push(x);else{var r=[];
for(var _=0;_<x.length;_++)r.push(x[_].v.Hrzn.v,x[_].v.Vrtc.v);I.push(r)}}var d=F,w=I[0].length==256?1:0;
n.nz(F,3);n.data[F]=w;n.data[F+1]=0;n.data[F+2]=1;F+=3;Y.QI(n,F,15);F+=4;for(var e=0;e<4;e++){var Z=I[e];
if(w==0){aD.ah0(n,F,Z);F+=2+2*Z.length}else{aD.ajY(n,F,Z);F+=256}}return F-d};function cy(){}cy.EK=function(n,F,O){var I={},x=Y.Ys(n,F);
F+=2;I.da=n[F]==1;F++;F++;I.l1=[Y.W0(n,F),Y.W0(n,F+2),Y.W0(n,F+4)];F+=6;I.nk=[Y.W0(n,F),Y.W0(n,F+2),Y.W0(n,F+4)];
F+=6;I.vC=[];for(var e=0;e<6;e++){var r={};r.S1=[Y.W0(n,F),Y.W0(n,F+2),Y.W0(n,F+4),Y.W0(n,F+6)];F+=8;
r.i$=[Y.W0(n,F),Y.W0(n,F+2),Y.W0(n,F+4)];F+=6;I.vC.push(r)}var _=bS.tc("hue2"),d=I;if(_.Clrz==null)_.Clrz={t:"bool",v:!1};
_.Clrz.v=d.da;for(var e=0;e<7;e++){var w=e==0?d.da?d.l1:d.nk:d.vC[e-1];cy.K8(_,e,w)}return _};cy.aiL=function(n){return{classID:"Hst2",H:{t:"long",v:n[0]},Strt:{t:"long",v:n[1]},Lght:{t:"long",v:n[2]}}};
cy.RZ=function(n,F){for(var e=0;e<n.length;e++){var O=n[e].v.LclR;if(F==0&&O==null||O!=null&&O.v==F)return e}return-1};
cy.K8=function(n,F,O){var I=F==0?O:O.i$,x=cy.aiL(I);if(F!=0){var r=O.S1;x.LclR={t:"long",v:F},x.BgnR={t:"long",v:r[0]};
x.BgnS={t:"long",v:r[1]};x.EndS={t:"long",v:r[2]};x.EndR={t:"long",v:r[3]}}x={t:"Objc",v:x};var _=n.Adjs.v,d=cy.RZ(_,F);
if(d==-1)_.push(x);else _[d]=x};cy.yL=function(n,F){var O=n.Adjs.v,I=cy.RZ(O,F);if(I==-1){if(F==0)return[0,0,0];
else return[{S1:[315,345,15,45],i$:[0,0,0]},{S1:[15,45,75,105],i$:[0,0,0]},{S1:[75,105,135,165],i$:[0,0,0]},{S1:[135,165,195,225],i$:[0,0,0]},{S1:[195,225,255,285],i$:[0,0,0]},{S1:[255,285,315,345],i$:[0,0,0]}][F-1]}var x=O[I].v,r=[x.H.v,x.Strt.v,x.Lght.v];
if(F==0)return r;return{i$:r,S1:[x.BgnR.v,x.BgnS.v,x.EndS.v,x.EndR.v]}};cy.H1=function(n,F,O){var I={da:O.Clrz.v,vC:[]};
I.l1=I.nk=cy.yL(O,0);for(var e=1;e<7;e++)I.vC.push(cy.yL(O,e));var x=2+2+12+6*14,r=n.data;n.nz(F,x);
Y.iW(r,F,2);F+=2;r[F]=I.da?1:0;F++;F++;Y.eS(r,F+0,I.l1[0]);Y.eS(r,F+2,I.l1[1]);Y.eS(r,F+4,I.l1[2]);F+=6;
Y.eS(r,F+0,I.nk[0]);Y.eS(r,F+2,I.nk[1]);Y.eS(r,F+4,I.nk[2]);F+=6;for(var e=0;e<6;e++){var _=I.vC[e].S1,d=I.vC[e].i$;
Y.eS(r,F+0,_[0]);Y.eS(r,F+2,_[1]);Y.eS(r,F+4,_[2]);Y.eS(r,F+6,_[3]);F+=8;Y.eS(r,F+0,d[0]);Y.eS(r,F+2,d[1]);
Y.eS(r,F+4,d[2]);F+=6}return x};function hd(){}hd.Hy=function(n){var F=new Uint8Array(n),O=2,I=[];for(var e=0;
e<29;e++){var x=[];I.push(x);for(var r=0;r<5;r++)x.push(Y.Ys(F,O+e*10+r*2))}O+=29*10;if(O<F.length){var _=Y.su(F,O,4);
O+=4;var d=Y.Ys(F,O);O+=2;var w=Y.Ys(F,O);O+=2;var Z=w-29;for(var e=0;e<Z;e++){var x=[];I.push(x);for(var r=0;
r<5;r++)x.push(Y.Ys(F,O+e*10+r*2))}}var P=bS.tc("levl");for(var e=0;e<4;e++)hd.K8(P,e,I[e]);return P};
hd.ST=function(n,e){var F=["Cmps","Rd","Grn","Bl"],O={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:F[e]}}]};
return{classID:n,Chnl:O}};hd.RZ=function(n,F){var O={Cmps:0,Rd:1,Grn:2,Bl:3};for(var e=0;e<n.length;
e++){var I=n[e].v,x=O[I.Chnl.v[0].v.enum];if(x==F)return e}return-1};hd.K8=function(n,F,O){var I=hd.ST("LvlA",F);
I.Inpt={t:"VlLs",v:[{t:"long",v:O[0]},{t:"long",v:O[1]}]};I.Otpt={t:"VlLs",v:[{t:"long",v:O[2]},{t:"long",v:O[3]}]};
I.Gmm={t:"doub",v:O[4]/100};I={t:"Objc",v:I};var x=n.Adjs.v,r=hd.RZ(x,F);if(r==-1)x.push(I);else x[r]=I};
hd.yL=function(n,F){var O=[0,255,0,255,100],I=n.Adjs.v,x=hd.RZ(I,F);if(x==-1)return O;var r=I[x].v;if(r.Inpt){O[0]=r.Inpt.v[0].v;
O[1]=r.Inpt.v[1].v}if(r.Otpt){O[2]=r.Otpt.v[0].v;O[3]=r.Otpt.v[1].v}if(r.Gmm){O[4]=Math.round(r.Gmm.v*100)}return O};
hd.WH=function(n,F){var O=[],I=0;for(var e=0;e<4;e++)O.push(hd.yL(F,e));while(O.length<29)O.push([0,255,0,255,100]);
n.nz(0,2+10*29);Y.iW(n.data,I,2);I+=2;for(var e=0;e<29;e++){var x=O[e];for(var r=0;r<5;r++)Y.iW(n.data,I+e*10+r*2,x[r])}I+=29*10;
if(O.length==29)return I;n.nz(I,8+10*(O.length-29));Y.ZO(n.data,I,"Lvls");I+=4;Y.iW(n.data,I,3);I+=2;
Y.iW(n.data,I,O.length);I+=2;var _=O.length-29;for(var e=0;e<_;e++){var x=O[29+e];for(var r=0;r<5;r++)Y.iW(n.data,I+e*10+r*2,x[r])}I+=10*_;
return I};function fL(){}fL.Hy=function(n){var F=new Uint8Array(n),O=2,I={Su:[],Lx:[]},x=Y.su(F,O,4);
O+=4;var r=Y.Ys(F,O);O+=2;var _=Y.c(F,O);O+=4;I.Su=h$.QQ(F,O,_);O+=_;var d=Y.c(F,O);O+=4;for(var e=0;
e<d;e++){var w=Y.c(F,O);O+=4;var Z=O,P={La:{},fg:{}};I.Lx.push(P);O+=4;O+=dh.oS(F,P.La,O);O+=4;O+=dh.oS(F,P.fg,O);
O=Z+w;var C=P.fg.blendOptions,W=P.fg.Lefx;if(C&&Object.keys(C.v).length>1){}if(W){if(W.v.masterFXSwitch==null)W.v.masterFXSwitch={t:"bool",v:!0};
is.Ke(W.v)}}return I};fL.dN=function(n,F){n.La.Nm.v=F};fL.WH=function(n){var F=new gV,O=0;Y.bY(F,O,2);
O+=2;Y.d3(F,O,"8BSL");O+=4;Y.bY(F,O,3);O+=2;var I=O;O+=4;O=h$.nV(F,O,n.Su);Y.QI(F,I,O-I-4);var x=n.Lx.length;
Y.QI(F,O,x);O+=4;for(var e=0;e<x;e++){O+=4;var r=O,_=n.Lx[e];Y.QI(F,O,16);O+=4;O+=dh.Nl(F,_.La,O);var d=_.fg.Lefx;
if(d){_.fg.Lefx=JSON.parse(JSON.stringify(d));is.yG(_.fg.Lefx.v)}Y.QI(F,O,16);O+=4;O+=dh.Nl(F,_.fg,O);
if(d)_.fg.Lefx=d;Y.QI(F,r-4,O-r)}return F.data.slice(0,O).buffer};function hh(){}hh.EK=function(n,F,O){var I=Y.Ys(n,F);
F+=2;var x={};x.S7=Y.Ys(n,F)==1;F+=2;x.EU=[];for(var e=0;e<10;e++){var r=[];x.EU.push(r);for(var _=0;
_<4;_++)r.push(Y.W0(n,F+_*2));F+=8}var d=bS.tc("selc");d.Mthd.v.CrcM=x.S7?"Absl":"Rltv";for(var e=1;
e<10;e++)hh.K8(d,e-1,x.EU[e]);return d};hh.vw="Rds Ylws Grns Cyns Bls Mgnt Whts Ntrl Blks".split(" ");
hh.ST=function(n,e){var F=["Cmps","Rd","Grn","Bl"],O={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:F[e]}}]};
return{classID:n,Chnl:O}};hh.RZ=function(n,F){var O=hh.vw;for(var e=0;e<n.length;e++){var I=n[e].v,x=O.indexOf(I.Clrs.v.Clrs);
if(x==F)return e}return-1};hh.K8=function(n,F,O){var I=["Cyn","Mgnt","Ylw","Blck"],x={classID:"ClrC",Clrs:{t:"enum",v:{Clrs:hh.vw[F]}}};
for(var r=0;r<4;r++)x[I[r]]={t:"UntF",v:{type:"#Prc",val:O[r]}};x={t:"Objc",v:x};var _=n.ClrC.v,d=hh.RZ(_,F);
if(d==-1)_.push(x);else _[d]=x};hh.yL=function(n,F){var O=[0,0,0,0],I=n.ClrC.v,x=hh.RZ(I,F);if(x==-1)return O;
var r=["Cyn","Mgnt","Ylw","Blck"];for(var e=0;e<4;e++)if(I[x].v[r[e]])O[e]=I[x].v[r[e]].v.val;return O};
hh.H1=function(n,F,O){var I={S7:O.Mthd.v.CrcM=="Absl",EU:[[0,0,0,0]]};for(var e=0;e<9;e++)I.EU.push(hh.yL(O,e));
n.nz(F,84);Y.iW(n.data,F,1);F+=2;Y.iW(n.data,F,I.S7?1:0);F+=2;for(var e=0;e<10;e++){var x=I.EU[e];for(var r=0;
r<4;r++)Y.eS(n.data,F+r*2,x[r]);F+=8}return 84};function fH(){}fH.tc=function(){return{I6:new gv(0,0,50,50),La:"",lL:"play",b:q.Y.jP.nQ([.1,.1,.9,.5,.1,.9],0)}};
fH.Hy=function(n){n=new Uint8Array(n);var F=0,O=[],I=Date.now(),x=Y.su(n,0,4);F+=4;var r=Y.c(n,F);F+=4;
var _=Y.c(n,F);F+=4;for(var e=0;e<_;e++){var d=Y.Lf(n,F);F+=d.length*2+4+2;if((d.length&1)==0)F+=2;F=fH._n(n,F,d,O)}return O};
fH._n=function(n,F,O,I){var x=Y.c(n,F);F+=4;var r=Y.c(n,F);F+=4;var _=F,d=Y.Uk(n,_).G4;_+=d.length+1;
var w=Y.sG(n,_);_+=16;var Z=fH.WA(n,_,r-(_-F)),P=q.Y.J5(Z),C=q.z.gh(P),W=1/C.d,v=1/C.v;q.Y.gS(Z,new cD(W,0,0,v,-C.x*W,-C.y*v));
I.push({lL:O,La:d,b:Z,I6:w});F+=r;return F};fH.dN=function(n,F){n.lL=F};fH.WH=function(n){var F=new gV,O=0;
Y.d3(F,O,"cush");O+=4;Y.QI(F,O,2);O+=4;Y.QI(F,O,n.length);O+=4;for(var e=0;e<n.length;e++){var I=n[e],x=I.lL+"\0";
Y.HS(F,O,x);O+=4+x.length*2;if((x.length&1)==1)O+=2;Y.QI(F,O,1);O+=4;O+=4;var r=O;Y.HH(F,O,I.La);O+=I.La.length+1;
Y.S3(F,O,I.I6);O+=16;F.nz(O,I.b.length*26);fH.Km(F.data,O,I.b,1,1);O+=I.b.length*26;var _=O-r;if((_&3)!=0)_+=4-(_&3);
Y.QI(F,r-4,_);O=r+_}return F.data.slice(0,O).buffer};fH.a4Z=function(n){var F=[];for(var e=0;e<n.length;
e++){var O=n[e],I=O.type,x={type:I};F.push(x);if(I==6){}else if(I==8)x.all=O.all;else if(I==0||I==3){x.length=O.length;
x.frule=O.Xu;x.third=O.sa;x.prmA=O.g9;x.prmB=O.Qy}else{x.c=[O.pt.x,O.pt.y,O.I.x,O.I.y,O.Cz.x,O.Cz.y]}}return F};
fH.agt=function(n){var F=[];for(var e=0;e<n.length;e++){var O=n[e],I=O.type,x={type:I};F.push(x);if(I==6){}else if(I==8)x.all=O.all;
else if(I==0||I==3){x.length=O.length;x.Xu=O.frule;x.sa=O.third;x.g9=O.prmA;x.Qy=O.prmB}else{var r=O.c;
x.pt=new aE(r[0],r[1]);x.I=new aE(r[2],r[3]);x.Cz=new aE(r[4],r[5])}}return F};fH.WA=function(n,F,O,I,x){if(I==null)I=1;
if(x==null)x=1;function r(H,y,g){var Q=Y.a0n(H,y)*g,J=Math.round(Q);return Math.abs(Q-J)<1e-6?J:Q}var _=Y.W0,d=[],w=Math.floor(O/26);
for(var e=0;e<w;e++){var Z=F+e*26,P={},C=0;d.push(P);P.type=_(n,Z);Z+=2;if(P.type==6){C=24}if(P.type==8){P.all=_(n,Z);
Z+=2;C=22}if(P.type==0||P.type==3){P.length=_(n,Z);Z+=2;P.Xu=_(n,Z);Z+=2;P.sa=_(n,Z);Z+=2;P.g9=Y.c(n,Z);
Z+=4;P.Qy=Y.c(n,Z);Z+=4;C=10}if(P.type==1||P.type==2||P.type==4||P.type==5){var W,v;v=r(n,Z,x);Z+=4;
W=r(n,Z,I);Z+=4;P.pt=new aE(W,v);v=r(n,Z,x);Z+=4;W=r(n,Z,I);Z+=4;P.I=new aE(W,v);v=r(n,Z,x);Z+=4;W=r(n,Z,I);
Z+=4;P.Cz=new aE(W,v);C=0}for(var L=0;L<C;L++)if(n[Z+L]!=0){console.log("Unexpected non-zero byte!",P,L,n[Z+L])}}return d};
fH.Km=function(n,F,O,I,x){var r=Y.eS,_=Y.Au,d=O.length;for(var e=0;e<d;e++){var w=F+e*26,Z=O[e];r(n,w,Z.type);
w+=2;if(Z.type==6){}if(Z.type==8)r(n,w,Z.all);if(Z.type==0||Z.type==3){r(n,w,Z.length);w+=2;r(n,w,Z.Xu);
w+=2;r(n,w,Z.sa);w+=2}if(Z.type==1||Z.type==2||Z.type==4||Z.type==5){_(n,w,Z.pt.y/x);w+=4;_(n,w,Z.pt.x/I);
w+=4;_(n,w,Z.I.y/x);w+=4;_(n,w,Z.I.x/I);w+=4;_(n,w,Z.Cz.y/x);w+=4;_(n,w,Z.Cz.x/I);w+=4}}};function as(){}as.Hy=function(n){var F=new Uint8Array(n),O=[],I=0;
I=as.eW(F,I,O);if(I+3<F.length){O=[];I=as.eW(F,I,O)}return O};as.eW=function(n,F,O){var I=Y.Ys,x=Y.W0,r=I(n,F);
F+=2;var _=I(n,F);F+=2;for(var e=0;e<_;e++){var d=as.kk(n,F);F+=10;if(r==2){d.NL=Y.Lf(n,F);F+=4+d.NL.length*2+2}O.push(d)}return F};
as.kk=function(n,F){var O=Y.Ys,I=Y.W0,x=O(n,F),v=null;F+=2;var r=O(n,F);F+=2;var _=O(n,F);F+=2;var d=O(n,F);
F+=2;var w=O(n,F);F+=2;var Z=1/65535,P=255/65535,C=100/65535,W=255/1e4;if(x==0)v={Q:r*P,l:_*P,O:d*P};
else if(x==1){v=q.xN(r*Z,_*Z,d*Z);v.Q*=255;v.l*=255;v.O*=255}else if(x==2)v=q.W.S_({classID:"CMYC",Cyn:{t:"doub",v:100-r*C},Mgnt:{t:"doub",v:100-_*C},Ylw:{t:"doub",v:100-d*C},Blck:{t:"doub",v:100-w*C}});
else if(x==7){var L=q.TK(r/100,I(n,F-6)/100,I(n,F-4)/100);v=L}else if(x==8){v={Q:255-r*W,l:255-_*W,O:255-d*W}}else throw"e "+x+", ";
return v};as.WH=function(n){var F=new gV,O=0,I=Y.bY;I(F,O,2);O+=2;I(F,O,n.length);O+=2;for(var e=0;e<n.length;
e++){var x=n[e];F.nz(O,10);as.Tt(F.data,O,x);O+=10;var r=(x.NL?x.NL:"")+"\0";Y.HS(F,O,r);O+=4+r.length*2}return F.data.slice(0,O).buffer};
as.dN=function(n,F){n.NL=F};as.Tt=function(n,F,O){var I=65535/255,x=Y.iW;x(n,F,0);x(n,F+2,Math.round(O.Q*I));
x(n,F+4,Math.round(O.l*I));x(n,F+6,Math.round(O.O*I));x(n,F+8,0)};function hX(){}hX.Hy=function(n){var F=new Uint8Array(n),O=4,I={};
I.WL=Y.Lf(F,O);O+=4+I.WL.length*2+2;I.exp=F[O++]==1;I.Nv=[];var x=Y.c(F,O);O+=4;for(var e=0;e<x;e++){var r={};
I.Nv.push(r);r.FI=Y.Ys(F,O);O+=2;r.shift=F[O++]==1;r.agM=F[O++]==1;r.color=Y.Ys(F,O);O+=2;r.WL=Y.Lf(F,O);
O+=4+r.WL.length*2+2;r.exp=F[O++]==1;r.Nv=[];var _=Y.c(F,O);O+=4;for(var d=0;d<_;d++){var w={};r.Nv.push(w);
w.exp=F[O++]==1;w.h=F[O++]==1;w.akr=F[O++]==1;w.al4=F[O++];var Z=Y.su(F,O,4);O+=4;if(Z=="TEXT"){w.oI=hX.X3(F,O);
O+=4+w.oI.length}else if(Z=="long"){w.oI=Y.su(F,O,4);O+=4}else throw"e";w.s2=hX.X3(F,O);O+=4+w.s2.length;
var P=Y.Z3(F,O);O+=4;if(P==-1){w.Mk={};var C=dh.oS(F,w.Mk,O);O+=C}}}console.log(I);var W=new Uint8Array(hX.WH(I));
for(var e=0;e<W.length;e++)if(W[e]!=F[e]){console.log(F.length,W.length);var v=4*(e>>>2)-16;console.log(Y.sX(F,v,64));
console.log(Y.sX(W,v,64));console.log(F.slice(v,v+64));console.log(W.slice(v,v+64));throw e}return[I]};
hX.X3=function(n,F){var O=Y.c(n,F);return Y.su(n,F+4,O)};hX.KN=function(n,F,O){Y.QI(n,F,O.length);Y.d3(n,F+4,O)};
hX.WH=function(n){var F=new gV,O=0;Y.QI(F,O,16);O+=4;Y.HS(F,O,n.WL+"\0");O+=4+n.WL.length*2+2;F.nz(O,1);
F.data[O++]=n.exp?1:0;var I=n.Nv.length;Y.QI(F,O,I);O+=4;for(var e=0;e<I;e++){var x=n.Nv[e];Y.bY(F,O,x.FI);
O+=2;F.nz(O,2);F.data[O++]=x.shift?1:0;F.data[O++]=x.agM?1:0;Y.bY(F,O,x.color);O+=2;Y.HS(F,O,x.WL+"\0");
O+=4+x.WL.length*2+2;F.nz(O,1);F.data[O++]=x.exp?1:0;var r=x.Nv.length;Y.QI(F,O,r);O+=4;for(var _=0;
_<r;_++){var d=x.Nv[_];F.nz(O,4);F.data[O++]=d.exp?1:0;F.data[O++]=d.h?1:0;F.data[O++]=d.akr?1:0;F.data[O++]=d.al4;
var w="LqFy Avrg GEfc PbPl Fbrs Bokh LnCr".split(" ").indexOf(d.oI)!=-1;Y.d3(F,O,w?"long":"TEXT");O+=4;
if(!w){hX.KN(F,O,d.oI);O+=4+d.oI.length}else{Y.d3(F,O,d.oI);O+=4}hX.KN(F,O,d.s2);O+=4+d.s2.length;Y.hi(F,O,d.Mk?-1:0);
O+=4;if(d.Mk){var Z=dh.Nl(F,d.Mk,O);O+=Z}}}return F.data.slice(0,O).buffer};function gT(){}gT.Hy=function(n){var F=new Uint8Array(n),O=0,I=Y.c(F,O),w;
O+=4;var x=Y.su(F,O,8);O+=8;var r=Y.wc(F,O);O+=4;var _=Y.wc(F,O);O+=4;var d=Y.wc(F,O);O+=4;if(I==2){w=new Float32Array(n,32,n.byteLength-32>>>2)}else if(I==3||I==4){w=new Float32Array(_*d*2);
var Z=0,P=0,C=!0;O=I==3?32:16+8+40;while(O<F.length){var W=Y.wc(F,O);O+=4;if(C)P+=W;else{for(var e=0;
e<W;e++){w[Z+P+e<<1]=Y.lz(F,O);w[(Z+P+e<<1)+1]=Y.lz(F,O+4);O+=8}P+=W}C=!C;if(W!=0&&P==_){Z+=_;P=0;C=!0;
if(Z==_*d)break}}}else throw"unknown Mesh version: "+I;return{HL:_,Sa:d,map:w}};gT.t3=function(n){var F=n.HL,O=n.Sa,I=n.map,x=new Uint8Array(32+O*F*8+O*8),r=0,_=0;
Y.Qm(x,r,3);r+=4;Y.ZO(x,r,"yfqLhseM");r+=8;Y.Wb(x,r,2);r+=4;Y.Wb(x,r,F);r+=4;Y.Wb(x,r,O);r+=4;Y.Wb(x,r,0);
r+=4;Y.Wb(x,r,1);r+=4;for(var d=0;d<O;d++){Y.Wb(x,r,0);r+=4;Y.Wb(x,r,F);r+=4;for(var w=0;w<F;w++){Y.Gx(x,r,I[_]);
Y.Gx(x,r+4,I[_+1]);_+=2;r+=8}}return x.buffer};function ct(){}ct.Hy=function(n){var F=new Uint8Array(n),O=0,I=Y.su(F,O,4);
O+=4;var x=Y.Ys(F,O);O+=2;var r=Y.c(F,O);O+=4;var _=[];for(var e=0;e<r;e++){var d=Y.c(F,O);O+=4;var w={classID:"ShpC",Nm:{t:"TEXT",v:""},Crv:{t:"VlLs",v:[]}};
_.push(w);var Z=Y.Lf(F,O);w.Nm.v=Z;O+=4+Z.length*2+2;var P=Y.Ys(F,O);O+=2;var C=Y.Ys(F,O);O+=2;for(var W=0;
W<C;W++){var v=q.pH.G0(0,0,!0);v.v.Vrtc.v=Y.Ys(F,O);O+=2;v.v.Hrzn.v=Y.Ys(F,O);O+=2;w.Crv.v.push(v)}if(d==1){}else if(d==2){for(var W=0;
W<C;W++){w.Crv.v[W].v.Cnty.v=F[O]==1;O+=1}}else throw"error";var L=Y.c(F,O);O+=4;var H=Y.c(F,O);O+=4}return _};
ct.dN=function(n,F){n.Nm.v=F};ct.WH=function(n){var F=new gV,O=0;Y.d3(F,O,"8BFS");O+=4;Y.bY(F,O,1);O+=2;
Y.QI(F,O,n.length);O+=4;for(var e=0;e<n.length;e++){Y.QI(F,O,2);O+=4;var I=n[e];Y.HS(F,O,I.Nm.v+"\0");
O+=4+I.Nm.v.length*2+2;Y.bY(F,O,2);O+=2;var x=I.Crv.v.length;Y.bY(F,O,x);O+=2;for(var r=0;r<x;r++){var _=I.Crv.v[r];
Y.bY(F,O,_.v.Vrtc.v);O+=2;Y.bY(F,O,_.v.Hrzn.v);O+=2}F.nz(O,x);for(var r=0;r<x;r++){F.data[O]=I.Crv.v[r].v.Cnty.v;
O++}Y.QI(F,O,0);O+=4;Y.QI(F,O,0);O+=4}return F.data.slice(0,O).buffer};function h$(){}h$.Hy=function(n){var F=new Uint8Array(n),O=4,I=Y.Ys(F,O);
O+=2;var x=Y.c(F,O);O+=4;var r=[];for(var e=0;e<x;e++){var _={};r.push(_);O=h$.RT(F,O,_)}return r};h$.dN=function(n,F){n.name=F};
h$.WH=function(n){var F=new gV,O=0;Y.d3(F,O,"8BPT");O+=4;Y.bY(F,O,1);O+=2;Y.QI(F,O,n.length);O+=4;for(var e=0;
e<n.length;e++){O=h$.JT(F,O,n[e])}return F.data.slice(0,O).buffer};h$.QQ=function(n,F,O){var I=F+O,x=[];
while(F<I){var r={},_=Y.c(n,F);F+=4;var d=F;F=h$.RT(n,F,r);if(!r.IR[1].D2())x.push(r);if(_%4!=0)_+=4-_%4;
F=d+_}return x};h$.nV=function(n,F,O){for(var e=0;e<O.length;e++){var I=O[e];F+=4;var x=F;F=h$.JT(n,F,I);
var r=F-x;Y.QI(n,x-4,r);if(r%4!=0)x+=4-r%4;F=x+r}return F};h$.RT=function(n,F,O){var I=Y.c(n,F);F+=4;
if(I!=1)alert("Unknown version of pattern");var x=Y.c(n,F);F+=4;if(x!=1&&x!=2&&x!=3)console.log("Unsupported mode of pattern: "+x);
var r=Y.Ys(n,F);F+=2;var _=Y.Ys(n,F);F+=2;var d=new gv(0,0,_,r);O.name=Y.Lf(n,F);F+=4+2*O.name.length+2;
var w=n[F];F++;O.id=Y.su(n,F,w);F+=O.id.length;var Z=-1;if(x==2){Z=F;F+=3*256+4}var P=new q.zF(_*r);
F=h$.ai5(n,F,P);if(x==2){for(var e=0;e<P.Q.length;e++){var C=3*P.Q[e];P.Q[e]=n[Z+C+0];P.l[e]=n[Z+C+1];
P.O[e]=n[Z+C+2]}}var W=q.f(d.X()*4);q.Eb(P,W);O.IR=[W,d];return F};h$.JT=function(n,F,O){var I=O.IR[0],x=O.IR[1];
Y.QI(n,F,1);F+=4;Y.QI(n,F,3);F+=4;Y.bY(n,F,x.v);F+=2;Y.bY(n,F,x.d);F+=2;Y.HS(n,F,O.name+"\0");F+=4+2*O.name.length+2;
Y.rx(n,F,O.id.length);F++;Y.d3(n,F,O.id);F+=O.id.length;var r=new q.zF(x.X());q.WU(I,r);F=h$.a9q(n,F,r,x);
return F};h$.ai5=function(n,F,O){var I=F,x={j:null,o:[],aeB:null,Jv:null},r=Y.c(n,F);F+=4;var _=Y.c(n,F);
F+=4;x.j=Y.sG(n,F);F+=16;var d=Y.c(n,F);F+=4;for(var e=0;e<d+2;e++){var w=Y.c(n,F);F+=4;if(w==0)continue;
var Z=Y.c(n,F);F+=4;if(Z==0)continue;var P=Y.c(n,F);F+=4;var C=Y.sG(n,F);F+=16;var W=Y.Ys(n,F);F+=2;
var v=n[F];F++;var L=gL.c8(!1,P,n,C.d,C.v,F,v);if(e<d)x.o.push(L);if(e==d)x.aeB=L;if(e==d+1)x.Jv=L;F+=Z-23}if(!x.j.D2()){if(x.o[0])O.Q=x.o[0];
if(x.o[1])O.l=x.o[1];else O.l=x.o[0].slice(0);if(x.o[2])O.O=x.o[2];else O.O=x.o[0].slice(0);if(x.Jv)O.R=x.Jv;
else O.R.fill(255)}return F};h$.a9q=function(n,F,O,I){var x=F,r={j:I,o:[O.Q,O.l,O.O],aeB:null,Jv:O.R};
Y.QI(n,F,3);F+=4;Y.QI(n,F,0);F+=4;Y.S3(n,F,I);F+=16;Y.QI(n,F,24);F+=4;for(var e=0;e<24+2;e++){var _=F,d=e<3||e==25?1:0;
Y.QI(n,F,d);F+=4;if(d==0)continue;Y.QI(n,F,0);F+=4;Y.QI(n,F,8);F+=4;Y.S3(n,F,I);F+=16;Y.bY(n,F,8);F+=2;
Y.rx(n,F,1,1);F++;var w=e<3?r.o[e]:r.Jv;n.nz(F,I.X()+2);F=gL.n8(!1,w,n.data,I.d,I.v,F,1);Y.QI(n,_+4,F-_-8)}Y.QI(n,x+4,F-x-8);
return F};function bc(){}bc.Hy=function(n){var F=new Uint8Array(n),O=0,I=Y.su(F,O,4);O+=4;var x=Y.Ys(F,O);
O+=2;var r=[];if(x<=3){var _=Y.Ys(F,O);O+=2;for(var e=0;e<_;e++){var d=F[O++],w=Y.su(F,O,d);O+=d;var Z=bc.tG(F,O,w),P=Z[0];
O=Z[1];r.push(P);O+=6}}else{var Z={},C=dh.oS(F,Z,O+4),W=Z.GrdL.v;for(var e=0;e<W.length;e++)r[e]=W[e].v.Grad.v}return r};
bc.dN=function(n,F){n.Nm.v=F};bc.WH=function(n){var F=new gV,O=0;Y.d3(F,O,"8BGR");O+=4;Y.bY(F,O,5);O+=2;
Y.QI(F,O,16);O+=4;var I={classID:"null",GrdL:{t:"VlLs",v:[]}},x=I.GrdL.v;for(var e=0;e<n.length;e++)x[e]={t:"Objc",v:{classID:"Grdn",__name:"Gradient ",Grad:{t:"Objc",v:n[e]}}};
O+=dh.Nl(F,I,O);return F.data.slice(0,O).buffer};bc.tG=function(n,F,O){var I={classID:"Grdn",Clrs:{t:"VlLs",v:[]},GrdF:{t:"enum",v:{GrdF:"CstS"}},Intr:{t:"doub",v:4096},Nm:{t:"TEXT",v:O},Trns:{t:"VlLs",v:[]}},x=Y.Ys(n,F);
F+=2;if(x==0)throw"e";for(var e=0;e<x;e++){var r=Y.c(n,F),_=Y.c(n,F+4),d=as.kk(n,F+8),w={t:"Objc",v:{classID:"Clrt",Clr:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:d.Q},Grn:{t:"doub",v:d.l},Bl:{t:"doub",v:d.O}}},Type:{t:"enum",v:{Clry:"UsrS"}},Lctn:{t:"long",v:r},Mdpn:{t:"long",v:_}}};
I.Clrs.v.push(w);F+=20}var Z=Y.Ys(n,F);F+=2;for(var e=0;e<Z;e++){var r=Y.c(n,F),_=Y.c(n,F+4),P=Y.Ys(n,F+8),w={t:"Objc",v:{classID:"TrnS",Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(100*P/255)}},Lctn:{t:"long",v:r},Mdpn:{t:"long",v:_}}};
I.Trns.v.push(w);F+=10}return[I,F]};bc.a8f=function(n,F,O){var I=O.Clrs.v.length;Y.bY(n,F,I);F+=2;for(var e=0;
e<I;e++){var x=O.Clrs.v[e];Y.QI(n,F,x.v.Lctn.v);Y.QI(n,F+4,x.v.Mdpn.v);Y.bY(n,F+8,0);var r=q.W.Vm(q.W.S_(x.v.Clr.v)),_=[r.Rd.v,r.Grn.v,r.Bl.v,0];
for(var d=0;d<4;d++)Y.bY(n,F+10+d*2,Math.round(65535*(_[d]/255)));F+=20}var w=O.Trns.v.length;Y.bY(n,F,w);
F+=2;for(var e=0;e<w;e++){var x=O.Trns.v[e];Y.QI(n,F,x.v.Lctn.v);Y.QI(n,F+4,x.v.Mdpn.v);Y.bY(n,F+8,Math.round(255*x.v.Opct.v.val/100));
F+=10}return F};function bP(){}bP.Hy=function(n){var F=new Uint8Array(n),O=[],I=[],x=[],r=[],_=[],d=0,w=Y.su(F,d,4);
d+=4;var Z=Y.c(F,d);d+=4;var P=Y.c(F,d);d+=4;while(d<F.length){var C=Y.su(F,d,4);d+=4;var W=Y.su(F,d,4);
d+=4;var v=Y.c(F,d);d+=4;if(W=="tppa"){I=h$.QQ(F,d,v);d+=v}else if(W=="tpbd"){x=hu.eC(F,d,v,1,1);d+=v}else if(W=="tptp"){var L=Y.c(F,d);
d+=4;for(var e=0;e<L;e++){var H=Y.Lf(F,d);d+=6+H.length*2;d+=4;var y={};d+=dh.oS(F,y,d);O.push([H,y])}while((d&3)!=0)d++}else if(W=="tpsh"){var g=d,Q=F.slice(d,d+v);
while(d<g+v){var J=Y.c(F,d);d+=4;d=fH._n(F,d,"Shape",r)}d=g+v}else if(W=="tpst"){var g=d;d+=4;while(d<g+v){var A=Y.c(F,d);
d+=4;var p=d,U=Y.c(F,d);d+=4;var y={La:{},fg:{}};_.push(y);d+=4;d+=dh.oS(F,y.La,d);d+=4;d+=dh.oS(F,y.fg,d);
d=p+A;var j=y.fg.Lefx;if(j){if(j.v.masterFXSwitch==null)j.v.masterFXSwitch={t:"bool",v:!0};is.Ke(j.v)}}d=g+v}else{console.log(F.slice(d-8,d+64));
console.log(Y.su(F,d-8,64));throw W}}return{J$:x,Gr:I,list:O,aff:r,Lx:_}};bP.dN=function(n,F){n[0]=F};
bP.WH=function(n){var F=new gV,O=0;Y.d3(F,O,"8BTP");O+=4;Y.QI(F,O,3);O+=4;Y.QI(F,O,1);O+=4;var I=[n.Gr,n.J$,n.list];
for(var e=0;e<3;e++){if(I[e].length==0)continue;Y.d3(F,O,"8BIM");O+=4;var x=["tppa","tpbd","tptp"][e];
Y.d3(F,O,x);O+=4;var r=O;O+=4;if(x=="tppa"){O=h$.nV(F,O,n.Gr)}else if(x=="tpbd"){O=hu.wP(F,O,n.J$)}else if(x=="tptp"){Y.QI(F,O,n.list.length);
O+=4;for(var _=0;_<n.list.length;_++){var d=n.list[_];Y.HS(F,O,d[0]+"\0");O+=6+d[0].length*2;Y.QI(F,O,16);
O+=4;O+=dh.Nl(F,d[1],O)}}Y.QI(F,r,O-r-4);while((O&3)!=0)O++;F.nz(O,0)}return F.data.slice(0,O).buffer};
function a3(){}a3.Hy=function(n,F){var O=new Uint8Array(n),I;if(Y.c(O,0)==O.length)I="icc";else if(O[0]=="<".charCodeAt(0))I="look";
else if(Y.qt(O,"LUT_3D_SIZE")!=-1)I="cube";else I="3DL";if(I!="icc"){var x=a3.a3s(O,I),r=a3.a2e(x[0],x[1]);
O=r}var _=[];for(var e=0;e<O.length;e++)_.push(O[e]);return[{classID:"null",Dthr:{t:"bool",v:!0},Nm:{t:"TEXT",v:F?F:"file.icc"},lookupType:{t:"enum",v:{colorLookupType:"abstractProfile"}},profile:{t:"tdta",v:_}}]};
a3.WH=function(n){var F=n[0],O=new Uint8Array(F.profile.v);return O.buffer};a3.dN=function(n,F){n.Nm.v=F};
a3.a2e=function(n,F){var O=new gV,I=128;O.nz(0,128);var x=[0,0,14,204,65,68,66,69,4,0,0,0,108,105,110,107,82,71,66,32,82,71,66,32,7,227,0,7,0,27,0,8,0,6,0,49,97,99,115,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,214,0,1,0,0,0,0,211,45,65,68,66,69,219,126,245,21,206,223,186,23,165,212,201,219,250,10,33,62];
for(var e=0;e<x.length;e++)O.data[e]=x[e];var r=["desc","A2B0"],_=r.length,d=128+4+_*12;Y.QI(O,I,_);
I+=4;for(var w=0;w<_;w++){var Z=r[w];Y.d3(O,I,Z);I+=4;Y.QI(O,I,d);I+=4;var P=d;if(Z=="desc"){Y.d3(O,P,"mluc");
P+=4;P+=4;Y.QI(O,P,1);P+=4;Y.QI(O,P,12);P+=4;Y.d3(O,P,"enUS");P+=4;var C="ICC by Photopea\0",W=C.length*2+2;
Y.QI(O,P,W);P+=4;Y.QI(O,P,28);P+=4;O.nz(P,W);for(var e=0;e<C.length;e++)O.data[P+e*2+1]=C.charCodeAt(e);
P+=W}if(Z=="A2B0"){Y.d3(O,P,"mAB ");P+=4;P+=4;O.nz(P,4);O.data[P]=3;O.data[P+1]=3;P+=4;O.nz(P,4*5);P+=4*3;
Y.QI(O,P,P+8-d);P+=4;P+=4;O.nz(P,20);O.data[P]=n;O.data[P+1]=n;O.data[P+2]=n;P+=16;O.data[P]=2;P+=4;
var v=n*n*n*3;O.nz(P,v*2);for(var e=0;e<v;e++)Y.iW(O.data,P+e*2,Math.max(0,Math.min(65535,Math.round(F[e]*65535))));
P+=v*2}var L=P-d;while((L&3)!=0)L++;Y.QI(O,I,L);I+=4;d+=L}Y.QI(O,0,d);return O.data.slice(0,d)};a3.a3s=function(n,F){F="LUTFormat"+F.toUpperCase();
var O=[],I=0,x=Y.l5(n,0,n.length),r="";for(var e=0;e<n.length&&r=="";e++){if(n[e]==10)r="\n";else if(n[e]==13){r="\r";
if(n[e+1]==10)r+="\n"}}if(F=="LUTFormatCUBE"){var _=x.split(r);for(var e=0;e<_.length;e++){if(_[e]==""||_[e][0]=="#")continue;
var d=_[e].split(" "),w=d[0];if(w=="LUT_3D_SIZE"){I=parseInt(d[1]);continue}if(["TITLE","DOMAIN_MIN","DOMAIN_MAX"].indexOf(w)!=-1)continue;
O.push(parseFloat(d[0]),parseFloat(d[1]),parseFloat(d[2]))}O=a3.wr(I,O)}else if(F=="LUTFormat3DL"){var _=x.split(r),Z=1/4095;
for(var e=0;e<_.length;e++){var P=_[e];if(P==""||P=="3DMESH"||P.startsWith("Mesh")||P[0]=="#")continue;
var d=P.split(" "),w=d[0];if(I==0){I=d.length;continue}O.push(parseFloat(d[0])*Z,parseFloat(d[1])*Z,parseFloat(d[2])*Z)}}else if(F=="LUTFormatLOOK"){var C=new DOMParser,W=C.parseFromString(x,"text/xml"),v=W.getElementsByTagName("LUT")[0],L=v.children[0].textContent;
I=parseInt(JSON.parse(L));var H=v.children[1].textContent;H=H.replace(/"/g,"").replace(/\s/g,"");var y=3*I*I*I,g=y*4,Q=new Uint8Array(g);for(var e=0;e<g;e++){var J=H.charCodeAt(e*2),A=H.charCodeAt(e*2+1),p=J<58?J-48:J-55,U=A<58?A-48:A-55;Q[e]=(p<<4)+U}for(var e=0;e<y;e++)O.push(Y.lz(Q,e<<2));O=a3.wr(I,O)}else throw F;return[I,O]};a3.a4t=function(n,F,O){var I=["#Created by www.Photopea.com","TITLE \""+O+"\"","","#LUT size","LUT_3D_SIZE "+F,"","#data domain","DOMAIN_MIN 0.0 0.0 0.0","DOMAIN_MAX 1.0 1.0 1.0","","#LUT data points"],x=6;
for(var e=0;e<n.length;e+=3){I.push(n[e].toFixed(x)+" "+n[e+1].toFixed(x)+" "+n[e+2].toFixed(x))}I.push("");
return Y.$s(I.join("\n")).buffer};a3.wr=function(n,F){var O=[],I=n*n*n;for(var e=0;e<I;e++)O.push(0,0,0);
for(var x=0;x<n;x++)for(var r=0;r<n;r++)for(var _=0;_<n;_++){var e=3*(_+r*n+x*n*n),d=3*(x+r*n+_*n*n);
O[d]=F[e];O[d+1]=F[e+1];O[d+2]=F[e+2]}return O};function dh(){}dh.oS=function(n,F,O,I,x){var r=O,_;if(x==null)x=0;
var d=Y.c(n,O);if(d==0){_="";O+=4}else{_=Y.Lf(n,O);O+=4+2*_.length+2}if(_!="")F.__name=_;F.classID=dh.NK(n,O);
if(I)console.log("\t".repeat(x),"- reading descriptor",F.classID,O);O+=dh.S5(n,O);var w=Y.Z3(n,O);O+=4;
for(var e=0;e<w;e++){var Z=dh.NK(n,O);O+=dh.S5(n,O);var P=dh.Sk(n,O,I,x);F[Z]=P;O+=P.size;delete P.size}return O-r};
dh.Nl=function(n,F,O,I){var x=O,r=F.__name;if(r==null)r="";r+="\0";Y.HS(n,O,r);O+=4+2*r.length;dh.WO(n,O,F.classID);
O+=dh.S5(n.data,O);Y.hi(n,O,Object.keys(F).length-1-(F.__name==null?0:1));O+=4;for(var _ in F){if(_=="classID")continue;
if(_=="__name")continue;dh.WO(n,O,_);O+=dh.S5(n.data,O);O+=dh.Ia(n,O,F[_])}return O-x};dh.Sk=function(n,F,O,I){var x=F,r=Y.su(n,F,4);
F+=4;var _={size:0,t:r,v:null};if(O)console.log("\t".repeat(I),"reading key",r,x);switch(r){case"obj ":case"VlLs":_.v=[];
var d=Y.c(n,F);F+=4;for(var e=0;e<d;e++){var w=dh.Sk(n,F,O,I+1);F+=w.size;delete w.size;_.v.push(w)}break;
case"UntF":_.v={type:Y.su(n,F,4),val:Y.z6(n,F+4)};F+=12;break;case"doub":_.v=Y.z6(n,F);F+=8;break;case"bool":_.v=n[F]==1;
F+=1;break;case"long":_.v=Y.Z3(n,F);F+=4;break;case"comp":_.v=Y.Z3(n,F+4);F+=8;break;case"Objc":_.v={};
var Z=dh.oS(n,_.v,F,O,I+1);F+=Z;break;case"TEXT":var P=Y.c(n,F);if(P==0){_.v="";F+=4}else{_.v=Y.Lf(n,F);
F+=4+_.v.length*2+2}break;case"enum":var C=dh.NK(n,F);F+=dh.S5(n,F);var W=dh.NK(n,F);F+=dh.S5(n,F);_.v={};
_.v[C]=W;break;case"tdta":var v=Y.Z3(n,F);F+=4;_.v=[];for(var e=0;e<v;e++)_.v.push(n[F+e]);F+=v;break;
case"ObAr":var L=Y.c(n,F);F+=4;var H=Y.Lf(n,F);F+=4+2*H.length+2;if(H!="")throw H;var y=dh.NK(n,F);F+=4+Math.max(4,y.length);
_.v={classID:y,arr:[]};var g=Y.c(n,F);F+=4;for(var e=0;e<g;e++){var y=dh.NK(n,F);F+=4+Math.max(4,y.length);
var C=Y.su(n,F,4);F+=4;var Q=Y.su(n,F,4);F+=4;var J={id:y,type:C,uID:Q,arr:[]};_.v.arr.push(J);var A=Y.c(n,F,4);
F+=4;for(var p=0;p<A;p++){var U=Y.z6(n,F);F+=8;J.arr.push(U)}}break;case"Pth ":var j=F,v=Y.c(n,F);F+=4;
var b=Y.su(n,F,4);F+=4;var s=Y.wc(n,F);F+=4;var G=Y.a2u(n,F);F+=4+G.length*2;_.v={sig:b,pth:G};break;
case"Clss":case"type":case"rele":var G=Y.Lf(n,F);F+=4+G.length*2+2;var T=dh.NK(n,F);F+=4+Math.max(4,T.length);
_.v={classID:T};if(G!="")_.v.__name=G;if(r=="rele"){_.v.val=Y.Z3(n,F);F+=4}break;case"prop":case"Enmr":case"indx":case"name":var z=dh._c[r],G=Y.Lf(n,F);
F+=4+G.length*2+2;if(G.length!=0){console.log(r,G);throw"e"}_.v={};for(var e=0;e<z.length;e++){var T=dh.NK(n,F);
F+=4+Math.max(4,T.length);_.v[z[e]]=T}if(r=="name"){var G=Y.Lf(n,F);F+=4+G.length*2+2;_.v.val=G}if(r=="indx"){_.v.val=Y.c(n,F);
F+=4}break;case"alis":var v=Y.c(n,F);F+=4;_.v=Y.su(n,F,v);F+=v;break;default:{console.log("unknown oskey: "+r+", "+x);
throw"e";return _}}if(O){console.log("\t".repeat(I),_.v);console.log("\t".repeat(I),"======",F)}_.size=F-x;
return _};dh._c={name:["classID"],prop:["classID","keyID"],Enmr:["classID","typeID","enum"],indx:["classID"]};
dh.Ia=function(n,F,O){var I=F,x=O.t;O=O.v;Y.d3(n,F,x);F+=4;switch(x){case"obj ":case"VlLs":Y.hi(n,F,O.length);
F+=4;for(var r=0;r<O.length;r++){var _=dh.Ia(n,F,O[r]);F+=_}break;case"UntF":Y.d3(n,F,O.type);Y.aL(n,F+4,O.val);
F+=12;break;case"doub":Y.aL(n,F,O);F+=8;break;case"bool":Y.rx(n,F,O?1:0,1);F+=1;break;case"long":Y.hi(n,F,O);
F+=4;break;case"comp":Y.hi(n,F+4,O);F+=8;break;case"Objc":var _=dh.Nl(n,O,F);F+=_;break;case"TEXT":Y.HS(n,F,O+"\0");
F+=4+O.length*2+2;break;case"enum":var d=Object.keys(O)[0],w=O[d];dh.WO(n,F,d);F+=dh.S5(n.data,F);dh.WO(n,F,w);
F+=dh.S5(n.data,F);break;case"tdta":Y.QI(n,F,O.length);F+=4;Y.n0(n,F,O);F+=O.length;break;case"ObAr":Y.QI(n,F,O.arr[0].arr.length);
F+=4;Y.HS(n,F,"\0");F+=6;dh.WO(n,F,O.classID);F+=4+Math.max(4,O.classID.length);Y.QI(n,F,O.arr.length);
F+=4;for(var e=0;e<O.arr.length;e++){var Z=O.arr[e];dh.WO(n,F,Z.id);F+=4+Math.max(4,Z.id.length);Y.d3(n,F,Z.type);
F+=4;Y.d3(n,F,Z.uID);F+=4;Y.QI(n,F,Z.arr.length);F+=4;for(var r=0;r<Z.arr.length;r++){Y.aL(n,F,Z.arr[r]);
F+=8}}break;case"Pth ":var P=O.pth.length*2+4+8;Y.QI(n,F,P);F+=4;Y.d3(n,F,O.sig);F+=4;Y.UJ(n,F,P);F+=4;
Y.a3c(n,F,O.pth);F+=O.pth.length*2+4;break;case"Clss":case"type":case"rele":var C=O.__name;if(C==null)C="";
Y.HS(n,F,C+"\0");F+=4+C.length*2+2;var W=O.classID;dh.WO(n,F,W);F+=4+Math.max(4,W.length);if(x=="rele"){Y.hi(n,F,O.val);
F+=4}break;case"prop":case"Enmr":case"indx":case"name":var v=dh._c[x];Y.QI(n,F,1);F+=6;for(var e=0;e<v.length;
e++){var W=O[v[e]];dh.WO(n,F,W);F+=4+Math.max(4,W.length)}if(x=="name"){Y.HS(n,F,O.val+"\0");F+=4+O.val.length*2+2}if(x=="indx"){Y.QI(n,F,O.val);
F+=4}break;case"alis":var P=O.length;Y.QI(n,F,P);F+=4;Y.d3(n,F,O);F+=P;break;default:console.log("unknown oskey: "+x);
F=I;break}return F-I};dh.NK=function(n,F){var O=Y.Z3(n,F);if(O>1e3)throw"e";if(O==0)O=4;return Y.su(n,F+4,O).trim()};
dh.S5=function(n,F){var O=Y.Z3(n,F);return O==0?8:4+O};dh.WO=function(n,F,O){var I="warp list Comp xx xy yx yy tx ty PinP PnRt PnOv PnDp xor PuX0 PuX1 PuX2 PuX3 PuY0 PuY1 PuY2 PuY3 base kana ruby box flow trim then else".split(" "),x=4<O.length||I.indexOf(O)!=-1;
Y.hi(n,F,x?O.length:0);Y.d3(n,F+4,O);if(O.length<4&&!x){var r="";for(var e=O.length;e<4;e++)r+=" ";Y.d3(n,F+4+O.length,r)}};
dh.akH=function(n){var F={};for(var O in n){if(O=="classID")F[O]=n[O];else if(O=="__name")F[O]=n[O];
else F[O]=dh.$W(n[O])}return F};dh.$W=function(n){if(n.OI=="Objc")return dh.akH(n.v);else if(n.OI=="VlLs"){var F=[];
for(var e=0;e<n.v.length;e++)F.push(dh.$W(n.v[e]));return F}else if(n.OI=="UntF")return n.v.val;else return n.v};
function is(){}is.TZ=function(n,F,O,I,x,r){while(F<O){var _=Y.su(n,F,4);F+=4;if(_!="8BIM"&&_!="8B64"){console.log("layer information signature error! "+_,"PSB = "+x);
alert("Error in PSD file: wrong signature.");return O}var d=Y.su(n,F,4);F+=4;var w=Y.c(n,F);F+=4;var Z=x&&"LMsk Lr16 Lr32 Layr Mt16 Mt32 Mtrn Alph FMsk lnk2 lnkE FEid FXid PxSD extn cinf artd pths".split(" ").indexOf(d)!=-1;
if(Z){w=w<<32|Y.Z3(n,F);F+=4}var P=["lrFX","PlLd"];if(P.indexOf(d)!=-1){if(w%4!=0)w+=4-w%4;F+=w;continue}switch(d){case"iOpa":I[d]=n[F];
break;case"brst":I[d]=[1,1,1];for(var e=0;e<w;e+=4)I[d][Y.c(n,F+e)]=0;break;case"knko":I[d]=n[F];break;
case"infx":I[d]=n[F];break;case"clbl":I[d]=n[F];break;case"lmgm":I[d]=n[F];break;case"vmgm":I[d]=n[F];
break;case"lyid":I[d]=Y.c(n,F);break;case"lsct":I[d]={type:Y.c(n,F)};if(w>=12)I[d].mf=Y.su(n,F+8,4);
break;case"lsdk":I.lsct={type:Y.c(n,F)};break;case"lyvr":I[d]=Y.c(n,F);break;case"lnsr":var C={artb:1,bgnd:1,cont:1,layr:1,lset:1,rend:1,shap:1,user:1,____:null};
I[d]=Y.su(n,F,4);break;case"lspf":I[d]=Y.c(n,F);break;case"lclr":I[d]=Y.Ys(n,F);break;case"luni":I[d]=Y.ca(n,F);
break;case"fxrp":I[d]=new aE(Y.z6(n,F),Y.z6(n,F+8));break;case"artb":case"artd":I[d]={};dh.oS(n,I[d],F+4);
break;case"SoCo":I[d]={};dh.oS(n,I[d],F+4);break;case"GdFl":I[d]={};dh.oS(n,I[d],F+4);is.eT(I[d],d);
break;case"PtFl":I[d]={};dh.oS(n,I[d],F+4);is.eT(I[d],d);break;case"CgEd":var W=I.brit=bS.tc("brit"),v={};
dh.oS(n,v,F+4);W.Brgh.v=v.Brgh?v.Brgh.v:0;W.Cntr.v=v.Cntr?v.Cntr.v:0;W.useLegacy.v=v.useLegacy?v.useLegacy.v:0;
break;case"brit":if(I.brit==null){var W=I.brit=bS.tc("brit"),v={};W.Brgh.v=Y.W0(n,F);W.Cntr.v=Y.W0(n,F+2);
W.useLegacy.v=!1}break;case"levl":var L=n.buffer.slice(F,F+w);I[d]=hd.Hy(L);break;case"curv":I[d]=aD.EK(n,F,w);
break;case"expA":var H=Y.Ys(n,F),y=I[d]=bS.tc("expA");y.Exps.v=Y.LD(n,F+2);y.Ofst.v=Y.LD(n,F+6);y.gammaCorrection.v=Y.LD(n,F+10);
break;case"vibA":I[d]={};dh.oS(n,I[d],F+4);break;case"hue2":I[d]=cy.EK(n,F,w);break;case"blnc":var y=I[d]=bS.tc(d);
y.PrsL.v=n[F+18]==1;var g=["ShdL","MdtL","HghL"];for(var e=0;e<3;e++)for(var Q=0;Q<3;Q++)y[g[e]].v[Q].v=Y.W0(n,F+e*6+Q*2);
break;case"blwh":var J={};dh.oS(n,J,F+4);var y=bS.tc(d),A="Bl Cyn Grn Mgnt Rd Yllw tintColor useTint".split(" ");
for(var e=0;e<A.length;e++){y[A[e]]=J[A[e]];delete J[A[e]]}I[d]=y;break;case"phfl":var y=I[d]=bS.tc(d),p=y.Clr.v,H=Y.Ys(n,F);
if(H==3){var U=[Y.c(n,F+2),Y.c(n,F+6),Y.c(n,F+10)],j=32768,b=q.cV(U[0]/j,U[1]/j,U[2]/j);p.Lmnc.v=b.LG;
p.A.v=b.R;p.B.v=b.O}if(H==2){var s=Y.Ys(n,F+2);if(s!=7)throw"e";p.Lmnc.v=Y.W0(n,F+4)/100;p.A.v=Y.W0(n,F+6)/100;
p.B.v=Y.W0(n,F+8)/100}var G=F+2+(H==3?12:10);y.Dnst.v=Y.c(n,G);G+=4;y.PrsL.v=n[G]==1;break;case"mixr":var T={pl:Y.Ys(n,F+2)==1,G:[]};
for(var e=0;e<20;e++)T.G.push(Y.W0(n,F+4+e*2));I[d]=dK.Xa(T);break;case"clrL":case"rplc":I[d]={};dh.oS(n,I[d],F+6);
break;case"nvrt":I[d]={};break;case"post":I[d]=bS.tc("post");I[d].Lvls.v=Y.Ys(n,F);break;case"thrs":I[d]=bS.tc("thrs");
I[d].Lvl.v=Y.Ys(n,F);break;case"grdm":var z={rev:n[F+2]==1,a3e:n[F+3]==1},m=F+4,$=Y.ca(n,m);m+=4+$.length*2;
var o=bc.tG(n,m,$),h=o[0];m=o[1];var X=Y.Ys(n,m);m+=2;h.Intr.v=Y.Ys(n,m);m+=2;var D=Y.Ys(n,m);m+=2;z.mode=Y.Ys(n,m);
m+=2;z.$f=Y.c(n,m);m+=4;z.acW=Y.Ys(n,m)==1;m+=2;z.alE=Y.Ys(n,m)==1;m+=2;z.a2N=Y.c(n,m);m+=4;z.acA=Y.Ys(n,m);
m+=2;z.Ua=[];for(var e=0;e<4;e++)z.Ua.push(Y.Ys(n,m+e*2));m+=8;z.vv=[];for(var e=0;e<4;e++)z.vv.push(Y.Ys(n,m+e*2));
m+=8;var f=Y.Ys(n,m);m+=2;var R=bS.tc("grdm");R.Rvrs.v=z.rev;R.Grad.v=h;I[d]=R;break;case"selc":I[d]=hh.EK(n,F,w);
break;case"vmsk":case"vsms":var t=I.vmsk=new K.X9,N=Y.Z3(n,F+4),M=(N>>0&1)==1;t.Tu=(N>>1&1)==0;t.isEnabled=(N>>2&1)==0;
t.b=fH.WA(n,F+8,w-8,r.d,r.v);break;case"shmd":I[d]={};var hK=Y.c(n,F),G=F+4;for(var e=0;e<hK;e++){var _=Y.su(n,G,4);
G+=4;var bD=Y.su(n,G,4);G+=4;var co=n[G];G++;if(Math.max(n[G],n[G+1],n[G+2])!=0)throw"e";G+=3;var iM=Y.c(n,G);
G+=4;if(bD=="cust"||bD=="cmls"||bD=="extn"||bD=="mlst"){var hs=Y.c(n,G);if(hs!=16)G+=4;if(Y.c(n,G)==16){var J={};
dh.oS(n,J,G+4,!1);I[d][bD]=J;if(bD=="cmls")ci.My.a5M(I[d][bD])}}else{console.log("unknown shmd key: "+bD+", size: "+iM)}G+=iM}break;
case"shpa":var H=Y.c(n,F),S=Y.c(n,F+4);if(S!=0)console.log("some patterns present!");break;case"TySh":var a=I[d]={},H=Y.Ys(n,F);
a.m=Y.$$(n,F+2);var bV=Y.Ys(n,F+2+48);a.$z={};var a5=dh.oS(n,a.$z,F+56),i9=bt.EF();for(var dG in i9)if(a.$z[dG]==null)a.$z[dG]=i9[dG];
a.Gp={};var ap=dh.oS(n,a.Gp,F+56+a5+6);a.Qa=Y.amZ(n,F+56+a5+6+ap);a.Vb=f8.Hy(a.$z.EngineData.v);bt.ab9(a.Vb.EngineDict.StyleRun.RunArray);
if(a.Vb.ResourceDict==null)a.Vb.ResourceDict=JSON.parse(JSON.stringify(a.Vb.DocumentResources));delete a.$z.EngineData;
break;case"lfx2":case"lmfx":case"lfxs":var bk=Y.c(n,F),c2=Y.c(n,F+4);I.lmfx={};var a5=dh.oS(n,I.lmfx,F+8);
is.Ke(I.lmfx);break;case"FMsk":I[d]=Y.$X(n,F,w);break;case"Txt2":I[d]={};I[d].raw=Y.$X(n,F,w);I[d].cB=g4.Hy(I[d].raw);
break;case"Patt":I[d]=h$.QQ(n,F,w);break;case"SoLd":var gg=Y.su(n,F,4),bH=Y.c(n,F+4),gw=Y.c(n,F+8);I[d]={};
var gP=dh.oS(n,I[d],F+12);if(I[d].nonAffineTransform==null)I[d].nonAffineTransform=JSON.parse(JSON.stringify(I[d].Trnf));
if(I[d].Impr==null)I[d].Impr={t:"Objc",v:{__name:"None",classID:"none"}};break;case"vstk":case"pths":var bH=Y.c(n,F);
I[d]={};var gP=dh.oS(n,I[d],F+4);break;case"vscg":var bD=Y.su(n,F,4),bH=Y.c(n,F+4);I[bD]={};var gP=dh.oS(n,I[bD],F+8);
is.eT(I[bD],bD);break;case"vogk":var dT=Y.c(n,F),bH=Y.c(n,F+4);I[d]={};var gP=dh.oS(n,I[d],F+8);I[d]=I[d].keyDescriptorList.v;
for(var e=0;e<I[d].length;e++){}break;case"lnk2":case"lnkD__":case"lnk3__":I[d]=[];var m=F;while(m<F+w){var fU=new K.$x;
I[d].push(fU);var D=Y.h1(n,m);m+=8;var dV=m;fU.type=Y.su(n,m,4);m+=4;if(fU.type!="liFD"){alert("Unknown Linked Layer type: "+fU.type);
break;throw fU.type}fU.ev=Y.c(n,m);m+=4;var ac=Y.Uk(n,m);m+=1+ac.G4.length;fU.D5=ac.G4;fU.fA=Y.Lf(n,m);
m+=4+fU.fA.length*2+2;fU.he=Y.su(n,m,4);m+=4;fU.Z7=Y.su(n,m,4);m+=4;var e2=Y.h1(n,m);m+=8;fU.open=n[m];
m+=1;if(fU.open!=0){var cX={},a5=dh.oS(n,cX,m+4);if(a5%4!=0)a5+=4-a5%4;console.log(cX);m+=a5+4}fU.open=0;
fU.raw=Y.$X(n,m,e2);m=dV+D;if(D%4!=0)m+=4-D%4}break;case"FEid":var m=F;I[d]=[];var eR=m+w,H=Y.c(n,m);
m+=4;while(m<eR){m+=4;var D=Y.c(n,m);m+=4;var o={};I[d].push(o);o.id=Y.Uk(n,m).G4;m+=o.id.length+1;var H=Y.c(n,m);
m+=4;m+=4;var gR=Y.c(n,m);m+=4;o.rect=Y.sG(n,m);m+=16;var bN=Y.c(n,m);m+=4;var eG=Y.c(n,m);m+=4;var ef=new q.zF(0);
for(var e=0;e<eG+2;e++){var fi=Y.c(n,m);m+=4;if(fi!=0){m+=4;var ep=Y.c(n,m),iJ=null;m+=4;if(e<3||e==25)iJ=gL.ug(!0,bN,n,o.rect.d,o.rect.v,m,ep);
if(e==0)ef.Q=iJ;if(e==1)ef.l=iJ;if(e==2)ef.O=iJ;if(e==25)ef.R=iJ;m+=ep}}o.buffer=q.f(o.rect.X()*4);q.Eb(ef,o.buffer);
q.dB(o);var aT=n[m];m++;if(aT!=0){o.r=new K.FZ;o.r.rect=Y.sG(n,m);m+=16;m+=4;var dm=Y.c(n,m);m+=4;o.r.channel=gL.ug(!0,bN,n,o.r.rect.d,o.r.rect.v,m,dm);
o.r.color=255;o.r.t7();m+=dm}if(D%4!=0)m+=4-D%4}break;case"Lr16":fy.xe(r,n,F);break;default:break}var c1="Lr16 LMsk Txt2 artd extd luni pths extn tySh lfx2 cinf".split(" ");
if(c1.indexOf(d)==-1)if(w%4!=0)console.log("size not multiple of 4!!!",d);if(d!="luni"&&d!="TySh"&&d!="tySh"&&d!="lfx2")if(w%4!=0)w+=4-w%4;
F+=w}var gk=[];for(var e=0;e<gk.length;e++)delete I[gk[e]];return F};is.Wv=function(n,F,O,I,x){for(var r in O)if(O[r]==null){alert("A bug occured (see console).");
console.log("Please, report a bug, that \""+r+"\" tag was present with a null value.");delete O[r]}for(var r in O){var _=I&&"LMsk Lr16 Lr32 Layr Mt16 Mt32 Mtrn Alph FMsk lnk2 lnkE FEid FXid PxSD extn cinf artd pths".split(" ").indexOf(r)!=-1,w=0;
Y.d3(n,F,_?"8B64":"8BIM");F+=4;var d=F;Y.d3(n,F,r);F+=4;Y.hi(n,F,0);F+=_?8:4;switch(r){case"iOpa":Y.rx(n,F,O[r],1);
w=4;break;case"brst":w=0;for(var e=0;e<3;e++)if(O[r][e]==0){Y.QI(n,F+w,e);w+=4}break;case"knko":Y.rx(n,F,O[r],1);
w=4;break;case"infx":Y.rx(n,F,O[r],1);w=4;break;case"clbl":Y.rx(n,F,O[r],1);w=4;break;case"lmgm":Y.rx(n,F,O[r],1);
w=4;break;case"vmgm":Y.rx(n,F,O[r],1);w=4;break;case"lyid":Y.QI(n,F,O[r]);w=4;break;case"lsct":Y.QI(n,F,O[r].type);
w=4;if(O[r].mf){Y.d3(n,F+4,"8BIM");Y.d3(n,F+8,O[r].mf);w=12}break;case"lyvr":Y.QI(n,F,O[r]);w=4;break;
case"lnsr":Y.d3(n,F,O[r]);w=4;break;case"lspf":Y.QI(n,F,O[r]);w=4;break;case"lclr":Y.bY(n,F,O[r]);w=8;
break;case"luni":Y.HS(n,F,O[r]);w=4+2*O[r].length;break;case"fxrp":Y.aL(n,F,O[r].x);Y.aL(n,F+8,O[r].y);
w=16;break;case"artb":case"artd":Y.QI(n,F,16);w=dh.Nl(n,O[r],F+4)+4;break;case"SoCo":Y.QI(n,F,16);w=dh.Nl(n,O[r],F+4)+4;
break;case"GdFl":Y.QI(n,F,16);w=dh.Nl(n,O[r],F+4)+4;break;case"PtFl":Y.QI(n,F,16);w=dh.Nl(n,O[r],F+4)+4;
break;case"CgEd":var Z={classID:"null",Vrsn:{t:"long",v:1},Brgh:{t:"long",v:24},Cntr:{t:"long",v:54},means:{t:"long",v:127},Lab:{t:"bool",v:!1},useLegacy:{t:"bool",v:!1},Auto:{t:"bool",v:!0}},P=Z,C=O[r];
P.Brgh.v=C.Brgh.v;P.Cntr.v=C.Cntr.v;P.useLegacy.v=C.useLegacy.v;Y.QI(n,F,16);w=dh.Nl(n,Z,F+4)+4;break;
case"brit":n.nz(F,8);w=8;break;case"levl":var W=new gV;w=hd.WH(W,O[r]);Y.n0(n,F,W.data);break;case"curv":w=aD.H1(n,F,O[r]);
break;case"expA":w=14;n.nz(F,14);Y.iW(n.data,F,1);Y.dT(n.data,F+2,O[r].Exps.v);Y.dT(n.data,F+6,O[r].Ofst.v);
Y.dT(n.data,F+10,O[r].gammaCorrection.v);break;case"vibA":Y.QI(n,F,16);w=dh.Nl(n,O[r],F+4)+4;break;case"hue2":w=cy.H1(n,F,O[r]);
break;case"blnc":w=19;n.nz(F,w);var v=["ShdL","MdtL","HghL"];for(var e=0;e<3;e++){var L=O[r][v[e]].v;
for(var H=0;H<3;H++)L.push(Y.eS(n.data,F+e*6+H*2,L[H].v))}n.data[F+18]=O[r].PrsL.v?1:0;break;case"blwh":var Z={classID:"null",bwPresetKind:{t:"long",v:1},blackAndWhitePresetFileName:{t:"TEXT",v:""}},y="Bl Cyn Grn Mgnt Rd Yllw tintColor useTint".split(" ");
for(var e=0;e<y.length;e++){Z[y[e]]=O[r][y[e]]}Y.QI(n,F,16);w=dh.Nl(n,Z,F+4)+4;break;case"phfl":Y.bY(n,F,2);
var g=O[r].Clr.v;Y.bY(n,F+2,7);Y.bY(n,F+4,Math.round(g.Lmnc.v*100));Y.bY(n,F+6,Math.round(g.A.v*100));
Y.bY(n,F+8,Math.round(g.B.v*100));Y.bY(n,F+10,0);var Q=F+2+10;n.nz(Q,5);Y.Qm(n.data,Q,O[r].Dnst.v);Q+=4;
n.data[Q]=O[r].PrsL.v?1:0;Q++;w=Q-F;break;case"mixr":w=44;n.nz(F,w);var J=dK.Jz(O[r]);Y.iW(n.data,F,1);
Y.iW(n.data,F+2,J.pl?1:0);for(var e=0;e<20;e++)Y.eS(n.data,F+4+e*2,J.G[e]);break;case"clrL":case"rplc":Y.bY(n,F,1);
Y.QI(n,F+2,16);w=dh.Nl(n,O[r],F+6)+6;break;case"nvrt":w=0;break;case"post":Y.bY(n,F,O[r].Lvls.v);w=2;
break;case"thrs":Y.bY(n,F,O[r].Lvl.v);w=2;break;case"grdm":var A={rev:O[r].Rvrs.v,a3e:!1,mode:0,$f:867527939,acW:!1,alE:!0,a2N:2048,acA:3,Ua:[0,0,0,0],vv:[32768,32768,32768,32768]},p=O[r].Grad.v;
n.nz(F,4);Y.iW(n.data,F,1);n.data[F+2]=A.rev?1:0;n.data[F+3]=A.a3e?1:0;var U=F+4;Y.HS(n,U,p.Nm.v);U+=4+p.Nm.v.length*2;
U=bc.a8f(n,U,p);Y.bY(n,U,2);U+=2;Y.bY(n,U,p.Intr.v);U+=2;Y.bY(n,U,32);U+=2;Y.bY(n,U,A.mode);U+=2;Y.QI(n,U,A.$f);
U+=4;Y.bY(n,U,A.acW?1:0);U+=2;Y.bY(n,U,A.alE?1:0);U+=2;Y.QI(n,U,A.a2N);U+=4;Y.bY(n,U,A.acA);U+=2;for(var e=0;
e<4;e++)Y.bY(n,U+e*2,A.Ua[e]);U+=8;for(var e=0;e<4;e++)Y.bY(n,U+e*2,A.vv[e]);U+=8;U+=2;w=U-F;break;case"selc":w=hh.H1(n,F,O[r]);
break;case"FMsk":Y.n0(n,F,O[r]);w=O[r].length;break;case"Txt2":var j=new gV,b=g4.t3(O[r].cB,j),s=q.f(b,!0);
for(var e=0;e<b;e++)s[e]=j.data[e];Y.n0(n,F,s);w=s.length;break;case"vmsk":var G=O[r],T=0;Y.QI(n,F,3);
if(!G.Tu)T+=1<<1;if(!G.isEnabled)T+=1<<2;Y.QI(n,F+4,T);w=8;var z=G.b.length;n.nz(F+8,z*26);fH.Km(n.data,F+8,G.b,x.d,x.v);
w+=z*26;break;case"shmd":Y.QI(n,F,Object.keys(O[r]).length);var Q=F+4;for(var m in O[r]){Y.d3(n,Q,"8BIM");
Q+=4;Y.d3(n,Q,m);Q+=4;Y.QI(n,Q,0);Q+=4;Y.QI(n,Q,0);Q+=4;Y.QI(n,Q,16);Q+=4;var $=dh.Nl(n,O[r][m],Q);if($%4!=0)$+=4-$%4;
Y.QI(n,Q-8,$+4);Q+=$}w=Q-F;break;case"TySh":var Q=F;Y.bz(n,Q,1);Q+=2;var o=O[r],j=new gV;o.Vb.DocumentResources=JSON.parse(JSON.stringify(o.Vb.ResourceDict));
var b=f8.t3(o.Vb,j),s=q.f(b,!0);for(var e=0;e<b;e++)s[e]=j.data[e];o.$z.EngineData={t:"tdta",v:s};var h=o.Vb.EngineDict.Editor.Text;
o.$z.Txt.v=h.substring(0,h.length-1);Y.a3H(n,Q,o.m);Q+=48;Y.bz(n,Q,50);Q+=2;Y.QI(n,Q,16);Q+=4;Q+=dh.Nl(n,o.$z,Q);
Y.bz(n,Q,1);Q+=2;Y.QI(n,Q,16);Q+=4;Q+=dh.Nl(n,o.Gp,Q);Y.ahD(n,Q,o.Qa);Q+=16;w=Q-F;break;case"lmfx":Y.QI(n,F,0);
Y.QI(n,F+4,16);var Z=JSON.parse(JSON.stringify(O[r])),X=!1;is.yG(Z);for(var e=0;e<bW.jV.length;e++)if(Z[bW.jV[e]]!=null)X=!0;
Y.d3(n,d,X?"lmfx":"lfx2");w=dh.Nl(n,Z,F+8)+8;break;case"Patt":var Q=h$.nV(n,F,O[r]);w=Q-F;break;case"SoLd":Y.d3(n,F,"soLD");
Y.QI(n,F+4,4);Y.QI(n,F+8,16);w=dh.Nl(n,O[r],F+12)+12;break;case"vstk":case"pths":Y.QI(n,F,16);w=dh.Nl(n,O[r],F+4)+4;
break;case"vscg__":Y.d3(n,F,O[r].key);Y.QI(n,F+4,16);w=dh.Nl(n,O[r].G,F+8)+8;break;case"vogk":Y.QI(n,F,1);
Y.QI(n,F+4,16);q.oK.a7V(O[r]);for(var e=0;e<O[r].length;e++){var D=O[r][e].v.keyOriginResolution;if(D)D.v=x.gC}var f={classID:"null",keyDescriptorList:{t:"VlLs",v:O[r]}};
w=dh.Nl(n,f,F+8)+8;break;case"lnkD":case"lnk2":case"lnk3":var U=F;for(var e=0;e<O[r].length;e++){var R=O[r][e],i=U;
Y.oO(n,U,0);U+=8;Y.d3(n,U,R.type);U+=4;Y.QI(n,U,R.ev);U+=4;n.nz(U,1);n.data[U]=R.D5.length;U++;Y.d3(n,U,R.D5);
U+=R.D5.length;Y.HS(n,U,R.fA+"\0");U+=4+R.fA.length*2+2;Y.d3(n,U,R.he);U+=4;Y.d3(n,U,R.Z7);U+=4;Y.oO(n,U,R.raw.length);
U+=8;n.nz(U,1);n.data[U]=R.open;U++;Y.n0(n,U,R.raw);U+=R.raw.length;Y.QI(n,U,1);U+=4;U+=11;var t=U-i-8;
Y.oO(n,i,t);if(t%4!=0){n.nz(U,4-t%4);U+=4-t%4}}w=U-F;break;case"FEid":var U=F;Y.QI(n,U,3);U+=4;for(var N=0;
N<O[r].length;N++){var M=O[r][N];U+=4;var hK=U;U+=4;Y.HH(n,U,M.id);U+=M.id.length+1;Y.QI(n,U,1);U+=4;
U+=4;var bD=U;U+=4;Y.S3(n,U,M.rect);U+=16;Y.QI(n,U,8);U+=4;Y.QI(n,U,24);U+=4;var co=new q.zF(M.rect.X());
q.WU(M.buffer,co);for(var e=0;e<24+2;e++){var iM=null;if(e==0)iM=co.Q;if(e==1)iM=co.l;if(e==2)iM=co.O;
if(e==25)iM=co.R;Y.QI(n,U,iM!=null?1:0);U+=4;if(iM!=null){U+=4;var hs=U;U+=4;n.nz(U,M.rect.X()+2);U=gL.qp(!0,iM,n.data,M.rect.d,M.rect.v,U,3);
Y.QI(n,hs,U-(hs+4))}}Y.QI(n,bD,U-(bD+4));n.nz(U,1);n.data[U]=M.r?1:0;U++;if(M.r!=null){var S=M.r.rect,a=M.r.channel;
S=M.rect;a=q.f(S.X());a.fill(M.r.color);q.k9(M.r.channel,M.r.rect,a,S);Y.S3(n,U,S);U+=16;U+=4;var bV=U;
U+=4;n.nz(U,S.X()+2);U=gL.qp(!0,a,n.data,S.d,S.v,U,3);Y.QI(n,bV,U-(bV+4))}var t=U-(hK+4);Y.QI(n,hK,t);
if(t%4!=0)U+=4-t%4}w=U-F;break;default:console.log("unknown layer tag: "+r+", size: "+w);F-=12;continue}var a5=["Txt2","artd","extd","pths"];
if(a5.indexOf(r)==-1)if(w%4!=0)w+=4-w%4;if(_)Y.oO(n,F-8,w);else Y.QI(n,F-4,w);if(r!="luni"&&r!="TySh")if(w%4!=0)w+=4-w%4;
F+=w}return F};is.Ke=function(n){for(var e=0;e<bW.order.length;e++){var F=bW.order[e],O=bW.jV[e];if(n[O]==null)n[O]={t:"VlLs",v:[]};
if(n[F]!=null){n[O].v.push(n[F]);delete n[F]}var I=[];for(var x=0;x<n[O].v.length;x++){var r=n[O].v[x];
if(r.v.present==null||r.v.present.v==!0)I.push(r)}n[O].v=I}};is.yG=function(n){for(var e=0;e<bW.order.length;
e++){var F=bW.order[e],O=bW.jV[e],I=n[O].v.length;if(I==0){delete n[O];continue}if(I==1){n[F]=n[O].v[0];
delete n[O];continue}}};is.eT=function(n,F){if(F=="GdFl"){if(n.Angl==null)n.Angl={v:{type:"#Ang",val:0},t:"UntF"};
if(n.Algn==null)n.Algn={v:!0,t:"bool"};if(n.Scl==null)n.Scl={v:{type:"#Prc",val:100},t:"UntF"};if(n.Ofst==null)n.Ofst={v:{classID:"Pnt",Hrzn:{v:{type:"#Prc",val:0},t:"UntF"},Vrtc:{v:{type:"#Prc",val:0},t:"UntF"}},t:"Objc"};
if(n.Rvrs==null)n.Rvrs={v:!1,t:"bool"};if(n.Dthr==null)n.Dthr={v:!1,t:"bool"}}if(F=="PtFl"){if(n.Algn==null)n.Algn={v:!0,t:"bool"};
if(n.Scl==null)n.Scl={v:{type:"#Prc",val:100},t:"UntF"};if(n.phase==null)n.phase={v:{classID:"Pnt",Hrzn:{v:0,t:"doub"},Vrtc:{v:0,t:"doub"}},t:"Objc"}}};
is.clone=function(n,F){var O={};if(n=="TySh"){O.m=F.m.clone();O.$z=JSON.parse(JSON.stringify(F.$z));
O.Gp=JSON.parse(JSON.stringify(F.Gp));O.Qa=F.Qa.clone();O.Vb=JSON.parse(JSON.stringify(F.Vb));if(F.add)O.add={vmsk:F.add.vmsk.clone(),vogk:JSON.parse(JSON.stringify(F.add.vogk))};
return O}else if(n=="fxrp")return F.clone();else if(n=="vmsk")return F.clone();else return JSON.parse(JSON.stringify(F))};
function eQ(n,F){}eQ.Hy=function(n,F,O,I){I=eQ.afW(n,F,O,I);return I};eQ.t3=function(n,F,O,I,x){I=eQ.a2A(n,F,O,I,x);
return I};eQ.afW=function(n,F,O,I){var x=I;n.rect=Y.sG(O,I);I+=16;var r=Y.Ys(O,I);I+=2;n.SA=[];var _=F.x5;
for(var e=0;e<r;e++){n.SA[e]={id:Y.W0(O,I),length:(_?Y.h1:Y.c)(O,I+2)};I+=_?10:6}var d=Y.su(O,I,4);I+=4;
if(d!="8BIM"){console.log("Invalid Blend mode signature: "+d);alert("Error in Photoshop file: wrong signature.");
throw"e"}n.mf=Y.su(O,I,4);I+=4;n.opacity=O[I];I+=1;n.fc=O[I]==1;I+=1;n.Cq=O[I];I+=1;if(O[I]!=0)console.log("error in filler!");
I+=1;var w=Y.c(O,I);I+=4;var Z=I;I=eQ.a9A(n,O,I);I=eQ.aaV(n,O,I);var P=Y.Uk(O,I);n.name=P.G4;I+=P.length;
if(P.length%4!=0)I+=4-P.length%4;I=is.TZ(O,I,Z+w,n.add,_,F);if(n.add.lsct){if(n.add.lsct.mf)n.mf=n.add.lsct.mf;
n.add.lsct=n.add.lsct.type}return I};eQ.a2A=function(n,F,O,I,x){var r=I;Y.S3(O,I,n.rect);I+=16;var _=n.Gf();
Y.bY(O,I,_.length);I+=2;var d=F.x5;x.push(I);for(var e=0;e<_.length;e++){Y.bz(O,I,_[e]);if(d)Y.oO(O,I+2,0);
else Y.QI(O,I+2,0);I+=d?10:6}Y.d3(O,I,"8BIM");I+=4;Y.d3(O,I,n.mf);I+=4;Y.rx(O,I,n.opacity,1);I+=1;Y.rx(O,I,n.fc?1:0,1);
I+=1;Y.rx(O,I,n.Cq,1);I+=1;Y.rx(O,I,0,1);I+=1;var w=I;Y.QI(O,I,0);I+=4;var Z=I;I=eQ.a6U(n,O,I);I=eQ.a9l(n,O,I);
var P=Y.HH(O,I,n.name.slice(0,255));I+=P;if(P%4!=0)I+=4-P%4;if(n.add.lsct){n.add.lsct={type:n.add.lsct};
if(n.mf=="pass"){n.add.lsct.mf="pass";n.mf="norm"}}if(n.mf=="pass")n.add.lsct={type:n.add.lsct,mf:"pass"};
if(n.add.brit)n.add.CgEd=n.add.brit;I=is.Wv(O,I,n.add,d,F);delete n.add.CgEd;if(n.add.lsct){if(n.add.lsct.mf)n.mf=n.add.lsct.mf;
n.add.lsct=n.add.lsct.type}var C=I-Z;Y.QI(O,w,C);return I};eQ.a9A=function(n,F,O){var I=Y.c(F,O);O+=4;
if(I==0)return O;var x=O;n.r=new K.FZ;n.r.rect=Y.sG(F,O);O+=16;n.r.color=F[O];O+=1;var r=eQ.Ni(n.r,F,O);
O+=1;if(r){var _=!1,d=255,w=0,Z=255,P=0;for(var e=0;e<n.SA.length;e++)if(n.SA[e].id==-3)_=!0;if(_){n.a8=eQ.Ok(F,O);
O+=18}var C=O,W=F[O];O++;if(W>>0&1){d=F[O];O++}if(W>>1&1){w=Y.z6(F,O);O+=8}if(W>>2&1){Z=F[O];O++}if(W>>3&1){P=Y.z6(F,O);
O+=8}if((O-C&1)==1)O++;n.IQ=[d,w,Z,P]}else{if(I==20)O+=2;else{n.a8=eQ.Ok(F,O);O+=18}}return x+I};eQ.a6U=function(n,F,O){Y.QI(F,O,0);
O+=4;if(n.r==null)return O;var I=n.B1(),x=n.add.vmsk,r=O,_=!0;Y.QI(F,O,0);Y.S3(F,O,n.r.rect);O+=16;Y.rx(F,O,n.r.color);
O+=1;eQ.PL(n.r,F,O,_);O+=1;if(_){if(n.a8){eQ.a47(F,O,n.a8);O+=18}Y.rx(F,O,15);O+=1;Y.rx(F,O,I?I.JP:255);
O+=1;Y.aL(F,O,I?I.RI:0);O+=8;Y.rx(F,O,x?x.JP:255);O+=1;Y.aL(F,O,x?x.RI:0);O+=8;O++}Y.QI(F,r-4,O-r);return O};
eQ.Ok=function(n,F){var O=new K.FZ;eQ.Ni(O,n,F);F+=1;O.color=n[F];F+=1;O.rect=Y.sG(n,F);F+=16;return O};
eQ.a47=function(n,F,O){eQ.PL(O,n,F,!1);F+=1;Y.rx(n,F,O.color);F+=1;Y.S3(n,F,O.rect);F+=16};eQ.Ni=function(n,F,O){var I=F[O];
n.Tu=(I>>0&1)==0;n.isEnabled=(I>>1&1)==0;n.Qe=(I>>3&1)==1;return I>>4&1};eQ.PL=function(n,F,O,I){var x=0;
if(!n.Tu)x+=1<<0;if(!n.isEnabled)x+=1<<1;if(n.Qe)x+=1<<3;if(I)x+=1<<4;Y.rx(F,O,x)};eQ.aaV=function(n,F,O){var I=Y.c(F,O);
O+=4;if(I==0)return O;if(I!=5*8)console.log("unexpected Layer Blending Ranges content, size:",I);for(var e=0;
e<I;e++)n.wx[e]=F[O+e];return O+40};eQ.a9l=function(n,F,O){Y.QI(F,O,n.wx.length);O+=4;F.nz(O,40);for(var e=0;
e<40;e++){F.data[O+e]=n.wx[e]}return O+40};function gL(){}gL.Hy=function(n,F,O,I){I=gL.ahq(F.x5,F.VZ,F.fS,n,O,I);
return I};gL.WH=function(n,F,O,I,x,r){I=gL.aej(n,F,O,I,x,r);return I};gL.ahq=function(n,F,O,I,x,r){var _=I.SA,d={},w=r;
for(var e=0;e<_.length;e++){var Z=_[e],P=Z.id,C=Z.length,W;if(P==-3)W=I.a8.rect;else if(P==-2)W=I.r.rect;
else W=I.rect;var v=gL.ug(n,F,x,W.d,W.v,r,C);r+=C;if(P==-3)I.a8.channel=v;else if(P==-2)I.r.channel=v;
else d["c"+P]=v}var L=new q.zF(0);L.R=null;if(O==3){L.Q=d.c0;L.l=d.c1;L.O=d.c2;L.R=d["c-1"]}else if(O==1){L.Q=d.c0;
L.l=d.c0;L.O=d.c0;L.R=d["c-1"]}else if(O==4){var H=d.c0,y=d.c1,g=d.c2,Q=d.c3,J=H.length,A=1/255;for(var e=0;
e<J;e++){var p=H[e],U=y[e],j=g[e],b=Q[e]*A;H[e]=Math.round(p*b);y[e]=Math.round((.2*p+.8*U)*b);g[e]=Math.round((.2*U+.8*j)*b)}L.Q=H;
L.l=y;L.O=g;L.R=d["c-1"];console.log("converting from CMYK to RGB")}if(L.Q==null)L.Q=q.f(0);if(L.R==null&&L.Q!=null){L.R=L.Q.slice(0);
L.R.fill(255)}if(L.l==null)L.l=L.Q.slice(0);if(L.O==null)L.O=L.Q.slice(0);I.buffer=q.f(Math.max(0,I.rect.X()*4));
q.Eb(L,I.buffer);return r};gL.aej=function(n,F,O,I,x,r){var _=F.Gf(),d=new q.zF(F.rect.X());q.WU(F.buffer,d);
for(var e=0;e<_.length;e++){var w=_[e],Z,P;if(w==-3)Z=F.a8.rect;else if(w==-2)Z=F.r.rect;else Z=F.rect;
if(w==-3)P=F.a8.channel;if(w==-2)P=F.r.channel;if(w==-1)P=d.R;if(w==0)P=d.Q;if(w==1)P=d.l;if(w==2)P=d.O;
O.nz(I,Z.X()*3+4);var C=I;I=gL.qp(n,P,O.data,Z.d,Z.v,I,r[1]?3:1);var W=I-C;if(n)Y.cJ(O.data,x+e*10+2,W);
else Y.Qm(O.data,x+e*6+2,W)}return I};gL.ug=function(n,F,O,I,x,r,_){var d=Y.Ys(O,r);r+=2;return gL.c8(n,F,O,I,x,r,d,_-2)};
gL.qp=function(n,F,O,I,x,r,_){Y.eS(O,r,_);r+=2;r=gL.n8(n,F,O,I,x,r,_);return r};gL.c8=function(n,F,O,I,x,r,_,d){var w,Z=I*x*(F>>>3),P=Z&3,C=Z+(P==0?0:4-P);
if(d<=0){return q.f(C)}if(_>3){console.log("unknown compression: "+_,I,x,I*x,d);_=0}if(_==0){if(r+C<=O.length)w=O.slice(r,r+C);
else{w=q.f(Z);for(var e=0;e<Z;e++)w[e]=O[r+e]}r+=Z}else if(_==1){w=q.f(Z);var W=n?4:2,v=gL.Gb(O,w,I,x,r,r+W*x,W);
r+=W*x+v}else if(_==2||_==3){var L=new Uint8Array(O.buffer,r+2,d-6),H=pako.inflateRaw(L);if(_==3){if(F==8)for(var y=0;
y<x;y++){var g=y*I+1,Q=g+I-1,J=H[g-1];for(var A=g;A<Q;A++){J+=H[A];H[A]=J&255}}else for(var y=0;y<x;
y++){var g=y*I+1,Q=g+I-1,J=H[2*g-2]<<8|H[2*g-1];for(var A=g;A<Q;A++){var p=A<<1;J+=H[p]<<8|H[p+1];H[p]=J>>>8;
H[p+1]=J&255}}}if(H.length==C)w=H;else{w=q.f(C);for(var e=0;e<H.length;e++)w[e]=H[e]}}if(F==16){var U=q.f(I*x);
for(var e=0;e<Z;e+=2)U[e>>>1]=w[e];w=U}return w};gL.n8=function(n,F,O,I,x,r,_){var d=I*x;if(_==0)for(var e=0;
e<d;e++)O[r++]=F[e];else if(_==1){var w=n?4:2,Z=gL.mQ(F,O,I,x,r,r+w*x,w);r+=w*x+Z}else if(_==2||_==3){if(_==3){var P=new Uint8Array(F.length);
for(var C=0;C<x;C++){var W=C*I+1,v=W+I-1,L=F[W-1];P[W-1]=L;for(var H=W;H<v;H++){P[H]=F[H]+(256-L)&255;
L=F[H]}}F=P}O[r]=120;O[r+1]=156;r+=2;var y=pako.deflateRaw(F,{adw:4});Y.sb(O,r,y);r+=y.length+4}else console.log("Unknown compression: "+_);
return r};gL.Gb=function(n,F,O,I,x,r,_){var d=r,w=I|0;if(_==2)for(var e=0;e<w;e++){var Z=Y.Ys(n,x+(e<<1));
gL.xY(n,r,Z,F,e*O,O);r+=Z}else for(var e=0;e<w;e++){var Z=Y.c(n,x+(e<<2));gL.xY(n,r,Z,F,e*O,O);r+=Z}return r-d};
gL.mQ=function(n,F,O,I,x,r,_){var d=r;if(_==2)for(var e=0;e<I;e++){var w=gL.l6(n,e*O,O,F,r);Y.iW(F,x+e*2,w);
r+=w}else for(var e=0;e<I;e++){var w=gL.l6(n,e*O,O,F,r);Y.Qm(F,x+e*4,w);r+=w}return r-d};gL.l6=function(n,F,E,O,I){var x,r,_,d,w,db,Z;
d=F+E;for(_=F,r=I;E>0;_=x,E-=db){Z=E<128?E:128;if(_<=d-3&&n[_+1]==n[_+0]&&n[_+2]==n[_+0]){for(x=_+3;
x<_+Z&&n[x]==n[_+0];)++x;db=x-_;O[r++]=1+256-db;O[r++]=n[_+0]}else{for(x=_;x<_+Z;)if(x<=d-3&&n[x+1]==n[x+0]&&n[x+2]==n[x+0])break;
else++x;db=x-_;O[r++]=db-1;for(var e=0;e<db;e++)O[r+e]=n[_+e];r+=db}}return r-I};gL.xY=function(n,F,O,I,x,r){for(var _=0;
_<O;){var E=n[F++];if(E>=128){var d=n[F++],w=x+(257-E);while(x+1<w){I[x++]=I[x++]=d}if(x<w)I[x++]=d;
_+=2}else{for(var e=0;e<=E;e++)I[x+e]=n[F+e];F+=E+1;x+=E+1;_+=1+1+E}}};function fy(){}fy.V4=function(n,F,O){return;
var I="",x=F;while(x!=0){var r=x%1e3+"";while(r.length<3)r="0"+r;I=(I==""?r:r+" ")+I;x=Math.floor(x/1e3)}while(I.startsWith("0")&&I!="0")I=I.slice(1);
while(I.length<11)I=" "+I;console.log("===",I,"\t".repeat(n),": "+O)};fy.Hy=function(n,F){F.x5=!1;F.VZ=8;
var O=new Uint8Array(n),I=0,x=0,M,dG=!1,ap=!0,bk=!1,c2=0;x=fy.rf(F,O,I);fy.V4(0,x-I,"PSD Header");I=x;
x=fy.agH(F,O,I);fy.V4(0,x-I,"Color Mode Data");I=x;x=fy.a4u(F,O,I);fy.V4(0,x-I,"Image Resources");I=x;
x=fy.afa(F,O,I);fy.V4(0,x-I,"Layer And Mask Info");I=x;x=fy.abm(F,O,I);fy.V4(0,x-I,"End Image");I=x;
if(F.t.length==0){var r=F.Kv();r.V9("Background");F.t.push(r);r.buffer=F.buffer.slice(0);r.rect=new gv(0,0,F.d,F.v)}if(F.IP.r1005){F.gC=Y.aeC(F.IP.r1005,0)}if(F.IP.r1026){var O=F.IP.r1026;
for(var e=0;e<O.length;e+=2){var x=F.t[e>>>1];if(x)x.Z8=Y.Ys(O,e)}}if(F.IP.r1032){var O=F.IP.r1032,_=Y.c(O,12);
for(var e=0;e<_;e++){var d=O[16+e*5+4],w=Y.Z3(O,16+e*5)/32;F.fT[d].push(w)}}delete F.IP.r1036;delete F.IP.r1039;
if(F.IP.r1050){var Z=Y.c,P=F.IP.r1050,C=Y.c(P,0);if(C==6){var W=4,v=Y.sG(P,W);W+=16;var L=Y.ca(P,W);
W+=4+L.length*2;var H=Z(P,W);W+=4;var y=F.l_;for(var e=0;e<H;e++){var g=c.Fz.G5(),J;y.push(g);g=g.v;
g.sliceID.v=Z(P,W);W+=4;g.groupID.v=Z(P,W);W+=4;var Q=Z(P,W);W+=4;if(Q==1){J=Z(P,W);W+=4}var L=Y.ca(P,W);
W+=4+L.length*2;var A=Z(P,W);W+=4;var p=[Z(P,W),Z(P,W+4),Z(P,W+8),Z(P,W+12)];W+=16;c.Fz.En(y,y.length-1,p);
var U=g.url.v=Y.ca(P,W);W+=4+U.length*2;var j=g.null.v=Y.ca(P,W);W+=4+j.length*2;var b=g.Msge.v=Y.ca(P,W);
W+=4+b.length*2;var s=g.altTag.v=Y.ca(P,W);W+=4+s.length*2;g.cellTextIsHTML.v=P[W]==1;W++;var G=g.cellText.v=Y.ca(P,W);
W+=4+G.length*2;var T=Z(P,W);W+=4;var z=Z(P,W);W+=4;var m=P.slice(W,W+4);W+=4;if(Q!=2)y.pop()}}else if(C==8){var $={};
dh.oS(P,$,8,!1);var P=F.l_=$.slices.v;for(var e=0;e<P.length;e++){if(P[e].v.origin.v.ESliceOrigin!="userGenerated"){P.splice(e,1);
e--}}}}if(F.IP.r1058){var o=F.IP.r1058,h=UTIF.decode(o.buffer,{parseMN:!1,debug:!1});fb.wX(h[0],F.aC);
delete F.IP.r1058}if(F.IP.r1060){var X=Y.l5(F.IP.r1060);fb.n2(X,F.aC);delete F.IP.r1060}if(F.IP.r1065){var O=F.IP.r1065;
F.M$={};dh.oS(O,F.M$,4,!1)}if(F.IP.r1069){var O=F.IP.r1069,D=[];for(var e=2;e<O.length;e+=4){var J=Y.c(O,e);
for(var f=0;f<F.t.length;f++){var x=F.t[f];if(x.add.lyid==J&&x.add.lsct!=3)D.push(f)}}F.C=D}if(F.IP.r1025){var R=F.IP.r1025;
delete F.IP.r1025;var i=fH.WA(R,0,R.length,F.d,F.v),t=new K.X9;t.b=i;F.Hi[0]=fj.kh("Working Path",{vmsk:t})}var N=F.add.pths;
delete F.add.pths;var hK=F.IP.r3000;if(hK){M={};dh.oS(hK,M,4,!1);delete F.IP.r3000}for(var bD=0;bD<=997;
bD++){var co="r"+(2e3+bD),R=F.IP[co];if(R==null)break;var i=fH.WA(R,0,R.length,F.d,F.v),iM=N?N.pathList.v[bD].v.pathUnicodeName.v:"Path "+bD,hs=M?M.keyRootDescriptorList.v[bD].v.keyDescriptorList.v:K.XO(i),t=new K.X9;
t.b=i;F.Hi[bD+1]=fj.kh(iM,{vmsk:t,vogk:hs});delete F.IP[co]}delete F.x5;var S=new gv(0,0,F.d,F.v),a=F.add.Txt2,bV=a;
if(bV){bV=bV.cB;if(bV._DocumentResources==null)bV=gI.a0l(bV)}if(a&&a.cB._DocumentResources!=null){var a5="_Type _FrameMatrix _TextOnPathTRange _PathData _FirstBaselineAlignment _LineOrientation _RowGutter _ColumnGutter".split(" "),i9=a.cB._DocumentResources._TextFrameSet._Resources;
for(var e=0;e<i9.length;e++){}}for(var e=0;e<F.t.length;e++){var x=F.t[e],gg=x.add.lsct,bH=x.add.vmsk,gw=x.B1();
if(gg==ho.bu){c2++;x.add.lspf=0}else if(gg==ho.x7||gg==ho.OC)c2--;if(x.name==""){x.name="Layer "+(e+1);
bk=!0}if(bk&&x.Ja()&&x.mf=="norm")x.mf="pass";if(x.z3()&&x.Fa(F).r){var gP=x.Fa(F);gP.r.isEnabled=x.add.SoLd.filterFX.v.filterMaskEnable.v}if(bH&&x.zX()){var dT=bW.uS.default;
if(x.add.vstk==null)x.add.vstk=JSON.parse(JSON.stringify(dT));else{var fU="strokeStyleLineDashSet";if(x.add.vstk[fU]==null)x.add.vstk[fU]=JSON.parse(JSON.stringify(dT[fU]))}x.add.vstk.strokeStyleResolution.v=F.gC}if(bH&&(x.add.vogk==null||q.Y._v(bH.b)!=x.add.vogk.length))x.XO();
if(x.add.SoLd&&x.rect.D2()){console.log("redrawing smart instance");x.aY(F)}if(gw==null&&x.r!=null){if(x.r.Qe==!1){x.r.Qe=!0;
x.a8=x.r.clone()}}gw=x.B1();if(x.IQ){var dT=x.IQ,t=bH;if(gw){gw.JP=dT[0];gw.RI=dT[1]}if(t){t.JP=dT[2];
t.RI=dT[3]}x.IQ=null}if(gw!=null&&bH!=null&&(gw.RI+bH.RI!=0||gw.JP+bH.JP!=2*255))x.o3(F);else if(bH!=null&&!x.zX())x.o3();
var dV=x.add.artb;if(dV&&dV.artboardBackgroundType==null)dV.artboardBackgroundType={t:"long",v:1};if(dV&&c2!=0)delete x.add.artb;
var ac=x.add.vstk;if(x.zX()&&(x.rect.D2()||bH&&bH.RI!=0||ac&&!ac.fillEnabled.v&&(!ac.strokeEnabled.v||ac.strokeStyleLineWidth.v.val==0)))x.$u(F);
if(x.add.TySh){dG=!0;if(!x.rect.D2())ap=!1}if(x.add.TySh&&bV){var e2=x.add.TySh.$z.TextIndex.v;if(e2==-1)continue;
var cX=x.add.TySh.Vb,eR=bt.Kp(cX),gR=cX.ResourceDict.StyleSheetSet[0].StyleSheetData.FontSize;if(gR==null)gR=12;
var bN=cX.EngineDict.StyleRun.RunArray;for(var eG=0;eG<bN.length;eG++){var ef=bN[eG].StyleSheet.StyleSheetData;
if(ef.FontSize==null){if(ef.BaselineDirection==null)ef.FontSize=Math.round(gR*F.gC/72)}}var fi=cX.EngineDict.ParagraphRun.RunArray,ep=bV._DocumentObjects._TextObjects;
if(ep.length<=e2){console.log("Txt2 incomplete");continue}ep=ep[e2]._Model._ParagraphRun._RunArray;if(ep==null)ep=[];
var iJ=Math.min(ep.length,fi.length);for(var f=0;f<iJ;f++){var aT=fi[f].ParagraphSheet.Properties,dm=bV._DocumentResources._ParagraphSheetSet._Resources,c1=ep[f]._RunData._ParagraphSheet;
if(typeof c1=="string")c1=dm[parseInt(c1.slice(1))]._Resource;var gk=c1._Parent==null?c1:dm[parseInt(c1._Parent.slice(1))]._Resource,a8=c1._Features._ParagraphDirection;
if(a8==null)a8=gk._Features._ParagraphDirection;if(a8)aT._Direction=parseInt(a8.slice(1))}var bX=bV._DocumentResources,bL=bX._TextFrameSet._Resources,c_=bL[e2]._Resource,eS=c_._Data,c$=new cD(1,0,0,1,0,0);
if(c_._0){var cp=parseFloat(c_._0[0].slice(1)),b_=parseFloat(c_._0[1].slice(1));c$.translate(cp,b_)}if(eR){c$.translate(eR[0],eR[1]);
bt.Ar(cX,[0,0,eR[2]-eR[0],eR[3]-eR[1]])}else{if(c_._Bezier&&c_._Bezier._Points){var i=c_._Bezier._Points,cp=parseFloat(i[0].slice(1)),b_=parseFloat(i[1].slice(1));
if(cp!=0||b_!=0){c$.translate(cp,b_)}}}if(c_._Data&&c_._Data._FrameMatrix){var hy=c_._Data._FrameMatrix;
hy=hy.map(function(d4){return parseFloat(d4.slice(1))});c$.concat(new cD(hy[0],hy[1],hy[2],hy[3],hy[4],hy[5]))}c$.concat(x.add.TySh.m);
x.add.TySh.m=c$;var A=eS._Type?parseInt(eS._Type.slice(1)):0;if(A==2||A==1&&eS._PathData._Spacing=="i-3"){var gx=function(d4){return parseFloat(d4.slice(1))},i=c_._Bezier._Points.map(gx);
if(eR)q.z.m(i,new cD(1,0,0,1,-eR[0],-eR[1]),i);var eJ=eS._PathData?eS._PathData._Reversed:!1;cX.Curve={Points:i,TextOnPathTRange:eS._TextOnPathTRange.map(gx),Reversed:eJ==null?!1:eJ};
x.add.TySh.add={vmsk:new K.X9,vogk:null};bt.Sg(x.add.TySh)}}}ci.My.oa(F,!0)};fy.t3=function(n,F,O){ci.My.A0(n);
ci.My.oa(n,!1);n.x5=O[3]==!0;var I=[],x=[],H=16,f=0;for(var e=0;e<n.t.length;e++){var r=n.t[e];if(r.z3()&&r.Fa(n).r){r.add.SoLd.filterFX.v.filterMaskEnable.v=r.Fa(n).r.isEnabled}if(r.add.TySh){var _=r.add.TySh.Vb,d=bt.oB(_);
r.add.TySh.$z.TextIndex={t:"long",v:I.length};I.push(_);if(d==2)bt.FE(r.add.TySh)}var w=r.add.vstk;if(w)w.strokeStyleResolution.v=n.gC;
if(r.zX()||O[2]&&r.add.SoLd){x[e]=[r.rect,r.buffer];r.rect=new gv;r.buffer=q.f(0)}}if(I.length>0){var Z=n.add.Txt2?n.add.Txt2.cB:null;
n.add.Txt2={};n.add.Txt2.cB=fZ.a6$(I,null,Z)}var P=[n.add.lnk2,n.add.FEid,n.add.Patt],C=n.adf(n.t);n.Rx(C);
n.IP.r1005=new Uint8Array([0,0,0,0,0,1,0,2,0,0,0,0,0,1,0,2]);Y.fV(n.IP.r1005,0,n.gC);Y.fV(n.IP.r1005,8,n.gC);
if(n.rk()){n.IP.r1022=new Uint8Array([0,3+n.TM.length-1,0])}else delete n.IP.r1022;n.IP.r1026=new Uint8Array(n.t.length*2);
for(var e=0;e<n.t.length;e++)Y.iW(n.IP.r1026,e*2,n.t[e].Z8);var W=n.fT,v=W[0].length+W[1].length,L=n.IP.r1032=q.f(16+5*v,!0);
Y.Qm(L,0,1);Y.Qm(L,4,576);Y.Qm(L,8,576);Y.Qm(L,12,v);for(var e=0;e<2;e++)for(var y=0;y<W[e].length;y++){Y.Bl(L,H,Math.round(W[e][y]*32));
L[H+4]=e;H+=5}var g=q.Dd(n.buffer),Q=[];if(g)Q.push({name:"Transparency",eF:{Q:255,l:0,O:0},aX:100,j5:1});
Q=Q.concat(n.TM);delete n.IP.r1045;delete n.IP.r1006;delete n.IP.r1077;var J=new gV;H=0;var A=new Uint8Array(4+Q.length*13);
A[3]=1;for(var e=0;e<Q.length;e++){var p=Q[e],U=p.name+"\0";Y.HS(J,H,U);H+=4+U.length*2;var j=4+e*13;
as.Tt(A,j,p.eF);A[j+11]=p.aX;A[j+12]=p.j5}n.IP.r1045=J.data.slice(0,H);n.IP.r1077=A;for(var e=0;e<n.l_.length;
e++)n.l_[n.l_.length-e-1].v.sliceID.v=2+e*3;var b={classID:"null",baseName:{t:"TEXT",v:"User"},bounds:{t:"Objc",v:{classID:"Rct1",Top:{t:"long",v:0},Left:{t:"long",v:0},Btom:{t:"long",v:0},Rght:{t:"long",v:0}}},slices:{t:"VlLs",v:n.l_}},J=new gV;
Y.QI(J,0,8);Y.QI(J,4,16);var s=dh.Nl(J,b,8);n.IP.r1050=J.data.slice(0,s+8);var J=new gV;Y.QI(J,0,16);
var s=dh.Nl(J,n.M$,4);n.IP.r1065=J.data.slice(0,s+4);var G=n.C;L=n.IP.r1069=q.f(2+G.length*4,!0);Y.iW(L,0,G.length);
for(var e=0;e<G.length;e++)Y.Qm(L,2+4*e,n.t[G[e]].add.lyid);delete n.IP.r1058;delete n.IP.r1060;if(Object.keys(n.aC).length!=0){var T=[{t274:[1],t282:[[72,1]],t283:[[72,1]],t296:[2]},{t259:[6],t282:[[72,1]],t283:[[72,1]],t296:[2],t513:[302],t514:[0]}];
fb.K1(n.aC,T[0],O[0]&&O[1]);n.IP.r1058=new Uint8Array(UTIF.encode(T));var z=fb.Qf(n.aC);n.IP.r1060=Y.$s(z)}var m=[],$=[];
for(var e=0;e<n.Hi.length;e++){var o=n.Hi[e],h=o.add.vmsk.b;if(e==0&&h.length==2)continue;var X=q.f(h.length*26);
fH.Km(X,0,h,n.d,n.v);var D=e==0?1025:2e3+e-1;n.IP["r"+D]=X;if(e!=0){m.push({t:"Objc",v:{classID:"pathInfoClass",pathUnicodeName:{t:"TEXT",v:o.name}}});
$.push({t:"Objc",v:{classID:"null",keyDescriptorList:{t:"VlLs",v:o.add.vogk}}})}}if(m.length!=0){n.add.pths={classID:"pathsDataClass",pathList:{t:"VlLs",v:m}};
$={classID:"null",keyRootDescriptorList:{t:"VlLs",v:$}};var J=new gV;Y.QI(J,0,16);var s=dh.Nl(J,$,4);
n.IP.r3000=J.data.slice(0,s+4)}else{delete n.add.pths;delete n.IP.r3000}f=fy.aeP(n,F,f,3+Q.length);f=fy.a1b(n,F,f);
f=fy.aju(n,F,f);f=fy.aeW(n,F,f,O,g);f=fy.a9m(n,F,f,O[0],g);var R=[1025,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016];
for(var e=0;e<R.length;e++)delete n.IP["r"+R[e]];for(var e=0;e<n.t.length;e++){var r=n.t[e];if(r.zX()||O[2]&&r.add.SoLd){r.rect=x[e][0];
r.buffer=x[e][1]}}n.Rx(P);ci.My.oa(n,!0);delete n.x5;return f};fy.rf=function(n,F,O){var I=Y.su(F,O,4);
O+=4;if(I!="8BPS")alert("invalid header signature: "+I);var x=Y.Ys(F,O);O+=2;n.x5=x==2;if(x!=1&&x!=2)alert("invalid version: "+x);
O+=6;n.Nq=Y.Ys(F,O);O+=2;n.v=Y.Z3(F,O);O+=4;n.d=Y.Z3(F,O);O+=4;n.VZ=Y.Ys(F,O);O+=2;n.fS=Y.Ys(F,O);O+=2;
return O};fy.aeP=function(n,F,O,I){F.nz(0,64);Y.ZO(F.data,O,"8BPS");O+=4;Y.iW(F.data,O,n.x5?2:1);O+=2;
Y.Qm(F.data,O,0);O+=4;Y.iW(F.data,O,0);O+=2;Y.iW(F.data,O,I);O+=2;Y.Bl(F.data,O,n.v);O+=4;Y.Bl(F.data,O,n.d);
O+=4;Y.iW(F.data,O,8);O+=2;Y.iW(F.data,O,3);O+=2;return O};fy.agH=function(n,F,O){var I=Y.Z3(F,O);O+=4;
if(I!=0)n.Sw=F.slice(O,O+I);O+=I;return O};fy.a1b=function(n,F,O){Y.hi(F,O,0);O+=4;return O};fy.a4u=function(n,F,O){var I=Y.c(F,O),x=0;
O+=4;var r=[];while(x<I){var _=Y.su(F,O+x,4);x+=4;var d=Y.Ys(F,O+x);x+=2;var w=Y.Uk(F,O+x);x+=w.length;
if(_!="8BIM"){r.push(d);console.log("Unknown Image Resources signature: "+_+", ID: "+d)}var Z=Y.c(F,O+x);
x+=4;if(n.IP["r"+d]!=null)console.log("--- two resources with same ID");n.IP["r"+d]=Y.$X(F,O+x,Z);x+=Z+(Z&1)}for(var e=0;
e<r.length;e++)delete n.IP["r"+r[e]];return O+I};fy.aju=function(n,F,O){var I=O,_=0;O+=4;var x=[];for(var r in n.IP){x.push(parseInt(r.slice(1)))}x.sort(function(C,W){return C-W});
for(var e=0;e<x.length;e++){Y.d3(F,O+_,"8BIM");_+=4;var d=x[e];Y.bY(F,O+_,d);_+=2;var w=Y.HH(F,O+_,"");
_+=w;var Z=n.IP["r"+d],P=Z.length;Y.QI(F,O+_,P);_+=4;Y.n0(F,O+_,Z);_+=P;if(P%2==1)_++}Y.QI(F,I,_);return O+_};
fy.afa=function(n,F,O){var I=O,x,r,_=n.x5?8:4;if(n.x5)x=Y.h1(F,O);else x=Y.c(F,O);O+=_;if(x==0)return I+_;
r=fy.a38(n,F,O);fy.V4(1,r-O,"Layer Info");O=r;r=fy.aom(n,F,O);fy.V4(1,r-O,"Global Layer Mask Info");
O=r;r=is.TZ(F,O,I+_+x,n.add,n.x5,n);fy.V4(1,r-O,"Project Add Info");O=r;return I+_+x};fy.aeW=function(n,F,O,I,x){var r=O;
Y.QI(F,O,0);O+=4;if(n.x5){Y.QI(F,O,0);O+=4}O=fy.aoQ(n,F,O,I,x);O=fy.aiE(n,F,O);O=is.Wv(F,O,n.add,n.x5,n);
if(n.x5)Y.oO(F,r,O-r-8);else Y.QI(F,r,O-r-4);return O};fy.a38=function(n,F,O){var I,x=n.x5?8:4;if(n.x5)I=Y.h1(F,O);
else I=Y.c(F,O);O+=x;if(I!=0)fy.xe(n,F,O);return O+I};fy.xe=function(n,F,O){var I=Y.W0(F,O);O+=2;var x=Math.abs(I);
for(var e=0;e<x;e++){var r=new K;O=eQ.Hy(r,n,F,O);n.t[e]=r}var _=new gv(0,0,n.d,n.v);for(var e=0;e<x;
e++){var d=n.t[e],w=d.B1(),Z=gL.Hy(d,n,F,O);if(Z-O>8)fy.V4(2,Z-O,"Lay: "+d.getName());O=Z;fy.Ta(d,_);
if(w)fy.Ta(w,_)}};fy.Ta=function(n,F){var O=n.rect.X(),I=n.rect.lN(F),x=I.X()/O;if(O>2e3*3e3&&x<.5){if(n.buffer){var r=q.f(I.X()*4);
q.nF(n.buffer,n.rect,r,I);n.buffer=r;n.rect=I}else{var r=q.f(I.X());q.k9(n.channel,n.rect,r,I);n.channel=r;
n.rect=I}alert("Removing hidden parts of layers")}};fy.aoQ=function(n,F,O,I,x){var r=O,_=n.x5;O+=_?8:4;
O=fy.DP(n,F,O,I,x);var d=O-r-(_?8:4);if(d%2!=0)d++;if(_)Y.oO(F,r,d);else Y.QI(F,r,d);return r+d+(_?8:4)};
fy.DP=function(n,F,O,I,x){var r=n.t.length;Y.bz(F,O,x?-r:r);O+=2;var _=[];for(var e=0;e<r;e++)O=eQ.t3(n.t[e],n,F,O,_);
for(var e=0;e<r;e++)O=gL.WH(n.x5,n.t[e],F,O,_[e],I);return O};fy.aom=function(n,F,O){var I=Y.c(F,O);
O+=4;O+=I;return O};fy.aiE=function(n,F,O){var I=Y.QI(F,O,0);O+=4;return O};fy.abm=function(n,F,O){var I=n.fS,x="Bitmap Grayscale Indexed RGB CMYK Multichannel Duotone Lab".split(" "),r=[1,1,1,3,4,1,1,3],_,H;
if(I!=3){if(I==1||I==2||I==4)alert("Project will be converted from "+x[I]+" to "+x[3]+" mode.");else{alert("Color mode "+x[I]+" is not supported yet :(")}}if(n.IP.r1045){_=[];
var d=n.IP.r1045,w=0;while(w<d.length){var Z=Y.Lf(d,w);_.push(Z);w+=4+2+Z.length*2}}var P=r[I]+(_==null||_[0]=="Transparency"?1:0),C=n.d,W=n.v,v=C*W,L=Y.Ys(F,O);
O+=2;n.buffer=q.f(v*4);q.IW(n.buffer,4278190080);var y=O;for(var g=0;g<n.Nq;g++){if(L==0){H=gL.c8(n.x5,n.VZ,F,C,W,O,L);
O+=v*(n.VZ>>>3)}else if(L==1){H=q.f(v);var Q=n.x5?4:2;if(g==0)O+=n.Nq*W*Q;O+=gL.Gb(F,H,C,W,y+g*W*Q,O,Q)}else{console.log("unknown compression of image data: ",L);
return}if(g<P){q.GF(H,n.buffer,g);if(n.Nq==1&&g==0){q.GF(H,n.buffer,1);q.GF(H,n.buffer,2)}}else{var J=new K.FZ,A=g-P,p=g-r[n.fS];
J.name=_?_[p]:"Alpha";if(J.name=="Quick Mask"){J.wC=!0;n.P4.push(A)}J.rect=new gv(0,0,C,W);J.channel=H;
J.color=0;J.t7();n.TM[A]=J;if(n.IP.r1077){var d=n.IP.r1077.slice(4+p*13);J.eF=as.kk(d,0);J.aX=d[11];
J.j5=d[12];if(J.j5==2)J.wC=!0}}}n.Nq=4;if(n.fS==2)for(var e=0;e<v;e++){var U=e*4,j=n.buffer[U];n.buffer[U]=n.Sw[0+j];
n.buffer[U+1]=n.Sw[256+j];n.buffer[U+2]=n.Sw[512+j]}return O};fy.a9m=function(n,F,O,I,x){var r=1,_=16,d=n.d,w=n.v,P,C;
Y.bY(F,O,r);O+=2;var Z=d*w;if(!I){C=new q.zF(d*w);q.WU(n.buffer,C);var W=C.Q,v=C.l,L=C.O,H=C.R;for(var e=0;
e<Z;e++){var y=H[e]*(1/255);W[e]=~~(W[e]*y+255*(1-y));v[e]=~~(v[e]*y+255*(1-y));L[e]=~~(L[e]*y+255*(1-y))}}else P=q.f(Z);
var g=[P,P,P];if(!I)g=[C.Q,C.l,C.O];if(x)g.push(I?P:C.R);for(var e=0;e<n.TM.length;e++){g.push(n.TM[e].Uz(new gv(0,0,n.d,n.v)))}var Q=O;
for(var J=0;J<g.length;J++){F.nz(O,d*w+4);P=g[J];if(r==0||r==2||r==3)O=gL.n8(n.x5,P,F.data,d,w,O,r);
else{var A=n.x5?4:2;if(J==0)O+=g.length*w*A;var p=O;O+=gL.mQ(P,F.data,d,w,Q+J*w*A,O,A)}}return O};function f8(){}f8.Hy=function(n){var F={};
f8.So(n,F,0,0);return F};f8.t3=function(n,F){var O=0;O=f8.mK(n,F,O,0);return O};f8.So=function(n,F,O,I){while(n[O]!="<".charCodeAt(0))O++;
O+=2;while(!0){if(n[O]=="/".charCodeAt(0)){O++;var x=Y.indexOf(n," ".charCodeAt(0),O,O+50),r=Y.indexOf(n,"\n".charCodeAt(0),O,O+50);
if(r==-1)r=Infinity;if(x==-1)x=Infinity;var _=Math.min(r,x),d=Y.su(n,O,_-O),w=f8.ER(n,_+1,I+1,d);F[d]=w.G;
O=_+1;O+=w.size}else if(n[O]==">".charCodeAt(0)){O+=2;break}else{var Z=n[O];if(Z==10||Z==9||Z==32)O++;
else{console.log("unknown byte: "+Z+", char: "+String.fromCharCode(Z),O);O++}}}return O};f8.mK=function(n,F,O,I){Y.d3(F,O,"<<\n");
O+=3;var x=f8.a5N;for(var r in n){Y.rx(F,O,"\t".charCodeAt(0),I+1);O+=I+1;Y.d3(F,O,"/"+r);O+=1+r.length;
if(x(n[r])||n[r]instanceof Array){Y.d3(F,O," ");O++}else{Y.d3(F,O,"\n");O++;Y.rx(F,O,"\t".charCodeAt(0),I+1);
O+=I+1}O=f8.pJ(n[r],F,O,I+1);Y.d3(F,O,"\n");O++}Y.rx(F,O,"\t".charCodeAt(0),I);O+=I;Y.d3(F,O,">>");O+=2;
return O};f8.ER=function(n,F,O,I){var x=F,r={size:0,G:0};while(!0){while(n[F]==" ".charCodeAt(0)||n[F]=="\t".charCodeAt(0)||n[F]=="\n".charCodeAt(0))F++;
if(n[F]=="<".charCodeAt(0)){r.G={};F=f8.So(n,r.G,F,O+1);break}else if(n[F]=="(".charCodeAt(0)){F+=3;
var _=F;while(!0){if(n[_-1]!="\\".charCodeAt(0)&&n[_]==")".charCodeAt(0)&&(n[_+1]=="\n".charCodeAt(0)||n[_+1]==" ".charCodeAt(0)))break;
else _++}r.G=Y.IB(n,F,_);F=_+2;break}else if(n[F]=="[".charCodeAt(0)){F++;r.G=[];while(n[F]==" ".charCodeAt(0)||n[F]=="\t".charCodeAt(0)||n[F]=="\n".charCodeAt(0))F++;
while(n[F]!="]".charCodeAt(0)){var d=f8.ER(n,F,O+1,I);r.G.push(d.G);F+=d.size;while(n[F]==" ".charCodeAt(0)||n[F]=="\t".charCodeAt(0)||n[F]=="\n".charCodeAt(0))F++}F++;
break}else{var w=Y.indexOf(n," ".charCodeAt(0),F,F+50),Z=Y.indexOf(n,"\n".charCodeAt(0),F,F+50);if(Z==-1)Z=Infinity;
if(w==-1)w=Infinity;var P=Y.su(n,F,Math.min(w,Z)-F).trim(),C=parseFloat(P);if(!isNaN(C)){r.G=parseFloat(P);
F=Math.min(w,Z)+1;break}else if(P=="true"||P=="false"){r.G=P=="true";F=Math.min(w,Z)+1;break}else if(P=="null"||P=="NaN"||P=="undefined"){r.G=0;
F=Math.min(w,Z)+1;break}else{console.log("unknown identifier: "+P);throw"e"}F=Math.min(w,Z)+1}}r.size=F-x;
return r};f8.pJ=function(n,F,O,I){if(n instanceof Array){var x=n.length==0||typeof n[0]=="number";if(x){Y.d3(F,O,"[ ");
O+=2;for(var e=0;e<n.length;e++){var r=n[e]+" ";Y.d3(F,O,r);O+=r.length}Y.d3(F,O,"]");O+=1}else{Y.d3(F,O,"[\n");
O+=2;for(var e=0;e<n.length;e++){Y.rx(F,O,"\t".charCodeAt(0),I);O+=I;O=f8.pJ(n[e],F,O,I);Y.d3(F,O,"\n");
O++}Y.rx(F,O,"\t".charCodeAt(0),I);O+=I;Y.d3(F,O,"]");O+=1}}else if(n instanceof Object){O=f8.mK(n,F,O,I)}else if(typeof n=="string"){Y.d3(F,O,"(");
O++;Y.rx(F,O,254);O++;Y.rx(F,O,255);O++;O=Y.lr(F,O,n);Y.d3(F,O,")");O+=1}else{var r=n+"";Y.d3(F,O,r);
O+=r.length}return O};f8.a5N=function(n){var F=typeof n;return F=="string"||F=="number"||F=="boolean"};
function g4(){}g4.Hy=function(n){var F={};g4.d2(n,F,0,0);return F};g4.t3=function(n,F){var O=0;Y.d3(F,O," ");
O++;O=g4.bb(n,F,O,0);O--;F.nz(O,2);F.data[O]=F.data[O+1]=0;O+=2;return O};g4.So=function(n,F,O,I){while(n[O]!="<".charCodeAt(0)){O++;
console.log("\u0161ipka")}O+=2;O=g4.d2(n,F,O,I);return O};g4.mK=function(n,F,O,I){Y.d3(F,O,"<< ");O+=3;
O=g4.bb(n,F,O,I);Y.d3(F,O,">>");O+=2;return O};g4.hj=function(n){return n==9||n==10||n==32};g4.d2=function(n,F,O,I){while(!0){while(g4.hj(n[O])||n[O]==0)O++;
if(O>=n.length)break;if(n[O]=="/".charCodeAt(0)){O++;var x=O;while(!g4.hj(n[x]))x++;var r=Y.su(n,O,x-O);
O=x+1;var _=g4.ER(n,O,I,r);F["_"+r]=_.G;O+=_.size}else if(n[O]==">".charCodeAt(0)){O+=2;break}else{var d=n[O];
console.log(Y.su(n,O,O+100));console.log("unknown byte: "+d+", char: "+String.fromCharCode(d)+", offset: "+O);
O++;throw"e";return-1}}return O};g4.bb=function(n,F,O,I){for(var x in n){var r=x.substring(1,x.length);
Y.d3(F,O,"/"+r);O+=1+r.length;Y.d3(F,O," ");O++;O=g4.pJ(n[x],F,O,I+1);Y.d3(F,O," ");O++}return O};g4.ER=function(n,F,O,I){var x=F,r={type:"",size:0,G:0};
while(g4.hj(n[F]))F++;if(n[F]=="<".charCodeAt(0)){r.type="Object";r.G={};F=g4.So(n,r.G,F,O+1)}else if(n[F]=="(".charCodeAt(0)){r.type="String";
F++;if(n[F]==")".charCodeAt(0)){r.G="s";F++}else{F+=2;var _=F,d=0;while(!0){if(n[_]==")".charCodeAt(0)&&n[_-1]!="\\".charCodeAt(0))break;
else _+=1}r.G="s"+Y.IB(n,F,_);F=_+2}}else if(n[F]=="[".charCodeAt(0)){F++;r.G=[];r.type="Array";while(g4.hj(n[F]))F++;
while(n[F]!="]".charCodeAt(0)){var w=g4.ER(n,F,O+1,I);if(w==-1)return-1;r.G.push(w.G);F+=w.size;delete w.size;
while(g4.hj(n[F]))F++}F++}else{var Z=F;while(!g4.hj(n[Z]))Z++;var P=Y.su(n,F,Z-F),C=parseFloat(P);if(!isNaN(C)&&P.indexOf(".")!=-1){r.type="Float";
var W=parseFloat(P);r.G="f"+W}else if(!isNaN(C)&&P.indexOf(".")==-1){r.type="Integer";r.G="i"+parseInt(P)}else if(P=="true"||P=="false"){r.type="Boolean";
r.G=P=="true"}else if(P.charAt(0)=="/"){r.type="BString";r.G=P}else if(P=="NaN"){r.type="Float";r.G="f0"}else{console.log("unknown value",JSON.stringify(P));
throw"e"}F=Z+1}r.size=F-x;return r};g4.a1S=function(n){if(n==Math.round(n))return n+".0";var F=n.toFixed(5);
if(0<n&&n<1)F=F.substring(1,F.length);if(-1<n&&n<0)F="-"+F.substring(2,F.length);return F};g4.pJ=function(n,F,O,I){var x=typeof n=="string"?n.charAt(0):"";
if(n instanceof Array){Y.d3(F,O,"[ ");O+=2;for(var e=0;e<n.length;e++){O=g4.pJ(n[e],F,O,I);Y.d3(F,O," ");
O++}Y.d3(F,O,"]");O+=1}else if(n instanceof Object){O=g4.mK(n,F,O,I)}else if(x=="s"){Y.d3(F,O,"(");O++;
Y.rx(F,O,254);O++;Y.rx(F,O,255);O++;O=Y.lr(F,O,n.substring(1));Y.d3(F,O,")");O++}else if(x=="/"){Y.d3(F,O,n);
O+=n.length}else if(x=="f"){var r=parseFloat(n.substring(1)),_=g4.a1S(r);Y.d3(F,O,_);O+=_.length}else if(x=="i"){Y.d3(F,O,n.substring(1));
O+=n.length-1}else{var _=n+"";Y.d3(F,O,_);O+=_.length}return O};function aE(n,F){if(!n)n=0;if(!F)F=0;
this.x=n;this.y=F}aE.prototype.add=function(n){return new aE(this.x+n.x,this.y+n.y)};aE.prototype.clone=function(){return new aE(this.x,this.y)};
aE.prototype.mc=function(n){this.x=n.x;this.y=n.y};aE.prototype.Qq=function(n){return this.x==n.x&&this.y==n.y};
aE.prototype.normalize=function(n){var F=Math.sqrt(this.x*this.x+this.y*this.y);this.x*=n/F;this.y*=n/F};
aE.prototype.offset=function(n,F){this.x+=n;this.y+=F};aE.prototype.mT=function(n,F){this.x=n;this.y=F};
aE.prototype.ba=function(n){return new aE(this.x-n.x,this.y-n.y)};aE.sl=function(n,F){return aE.a70(n.x,n.y,F.x,F.y)};
aE.v8=function(n,F,O){return new aE(n.x+O*(F.x-n.x),n.y+O*(F.y-n.y))};aE.anl=function(n,F){return new aE(n*Math.cos(F),n*Math.sin(F))};
aE.a70=function(n,F,O,I){return Math.sqrt((O-n)*(O-n)+(I-F)*(I-F))};aE.Bu={};aE.K0={};aE.Bu.create=function(){var n=new Float32Array(4);
return n};aE.K0.create=function(n){var F=new Float32Array(16);F[0]=F[5]=F[10]=F[15]=1;if(n)aE.K0.set(n,F);
return F};aE.Bu.add=function(n,F,O){O[0]=n[0]+F[0];O[1]=n[1]+F[1];O[2]=n[2]+F[2];O[3]=n[3]+F[3]};aE.Bu.set=function(n,F){F[0]=n[0];
F[1]=n[1];F[2]=n[2];F[3]=n[3]};aE.K0.set=function(n,F){F[0]=n[0];F[1]=n[1];F[2]=n[2];F[3]=n[3];F[4]=n[4];
F[5]=n[5];F[6]=n[6];F[7]=n[7];F[8]=n[8];F[9]=n[9];F[10]=n[10];F[11]=n[11];F[12]=n[12];F[13]=n[13];F[14]=n[14];
F[15]=n[15]};aE.K0.multiply=function(n,F,O){var I=n[0],x=n[1],r=n[2],_=n[3],d=n[4],w=n[5],Z=n[6],P=n[7],C=n[8],W=n[9],v=n[10],L=n[11],H=n[12],y=n[13],g=n[14],Q=n[15],J=F[0],A=F[1],p=F[2],U=F[3];
O[0]=J*I+A*d+p*C+U*H;O[1]=J*x+A*w+p*W+U*y;O[2]=J*r+A*Z+p*v+U*g;O[3]=J*_+A*P+p*L+U*Q;J=F[4];A=F[5];p=F[6];
U=F[7];O[4]=J*I+A*d+p*C+U*H;O[5]=J*x+A*w+p*W+U*y;O[6]=J*r+A*Z+p*v+U*g;O[7]=J*_+A*P+p*L+U*Q;J=F[8];A=F[9];
p=F[10];U=F[11];O[8]=J*I+A*d+p*C+U*H;O[9]=J*x+A*w+p*W+U*y;O[10]=J*r+A*Z+p*v+U*g;O[11]=J*_+A*P+p*L+U*Q;
J=F[12];A=F[13];p=F[14];U=F[15];O[12]=J*I+A*d+p*C+U*H;O[13]=J*x+A*w+p*W+U*y;O[14]=J*r+A*Z+p*v+U*g;O[15]=J*_+A*P+p*L+U*Q;
return O};aE.K0.inverse=function(n,F){var O=n[0],I=n[1],x=n[2],r=n[3],_=n[4],d=n[5],w=n[6],Z=n[7],P=n[8],C=n[9],W=n[10],v=n[11],L=n[12],H=n[13],y=n[14],g=n[15],Q=O*d-I*_,J=O*w-x*_,A=O*Z-r*_,p=I*w-x*d,U=I*Z-r*d,j=x*Z-r*w,b=P*H-C*L,s=P*y-W*L,G=P*g-v*L,T=C*y-W*H,z=C*g-v*H,m=W*g-v*y,$=Q*m-J*z+A*T+p*G-U*s+j*b;
if(!$){return null}$=1/$;F[0]=(d*m-w*z+Z*T)*$;F[1]=(x*z-I*m-r*T)*$;F[2]=(H*j-y*U+g*p)*$;F[3]=(W*U-C*j-v*p)*$;
F[4]=(w*G-_*m-Z*s)*$;F[5]=(O*m-x*G+r*s)*$;F[6]=(y*A-L*j-g*J)*$;F[7]=(P*j-W*A+v*J)*$;F[8]=(_*z-d*G+Z*b)*$;
F[9]=(I*G-O*z-r*b)*$;F[10]=(L*U-H*A+g*Q)*$;F[11]=(C*A-P*U-v*Q)*$;F[12]=(d*s-_*T-w*b)*$;F[13]=(O*T-I*s+x*b)*$;
F[14]=(H*J-L*p-y*Q)*$;F[15]=(P*p-C*J+W*Q)*$;return F};aE.K0.a4M=function(n,F,O){var I=F[0],x=F[1];O[0]=I*n[0]+x*n[4]+n[12];
O[1]=I*n[1]+x*n[5]+n[13]};aE.K0.a83=function(n,F,O){var I=F[0],x=F[1],r=F[2],_=F[3];O[0]=n[0]*I+n[4]*x+n[8]*r+n[12]*_;
O[1]=n[1]*I+n[5]*x+n[9]*r+n[13]*_;O[2]=n[2]*I+n[6]*x+n[10]*r+n[14]*_;O[3]=n[3]*I+n[7]*x+n[11]*r+n[15]*_};
function cD(n,F,O,I,x,r){if(typeof n==="undefined"){n=1;F=0;O=0;I=1;x=0;r=0}this.R=n;this.O=F;this.Pr=O;
this.oQ=I;this.hb=x;this.i9=r}cD.prototype.GW=function(){return Math.sqrt(Math.abs(this.R*this.oQ-this.O*this.Pr))};
cD.prototype.js=function(){var n=this,F=function(O){return Math.abs(O)<1e-9?0:O};n.R=F(n.R);n.O=F(n.O);
n.Pr=F(n.Pr);n.oQ=F(n.oQ);n.hb=F(n.hb);n.i9=F(n.i9)};cD.prototype.Pz=function(n){return new aE(n.x*this.R+n.y*this.Pr+this.hb,n.x*this.O+n.y*this.oQ+this.i9)};
cD.prototype.translate=function(n,F){this.hb+=n;this.i9+=F};cD.prototype.rotate=function(n){var F=new cD(Math.cos(n),-Math.sin(n),Math.sin(n),Math.cos(n),0,0);
this.concat(F)};cD.prototype.scale=function(n,F){var O=new cD(n,0,0,F,0,0);this.concat(O)};cD.prototype.concat=function(n){this.mc(new cD(this.R*n.R+this.O*n.Pr,this.R*n.O+this.O*n.oQ,this.Pr*n.R+this.oQ*n.Pr,this.Pr*n.O+this.oQ*n.oQ,this.hb*n.R+this.i9*n.Pr+n.hb,this.hb*n.O+this.i9*n.oQ+n.i9))};
cD.prototype.uZ=function(){var n=this.R*this.oQ-this.O*this.Pr;this.mc(new cD(this.oQ/n,-this.O/n,-this.Pr/n,this.R/n,(this.Pr*this.i9-this.oQ*this.hb)/n,(this.O*this.hb-this.R*this.i9)/n))};
cD.prototype.clone=function(){return new cD(this.R,this.O,this.Pr,this.oQ,this.hb,this.i9)};cD.prototype.mc=function(n){this.R=n.R;
this.O=n.O;this.Pr=n.Pr;this.oQ=n.oQ;this.hb=n.hb;this.i9=n.i9};function Y(){}Y.a2x=function(E){var n="";
for(var e=3;e>=0;e--)n+=String.fromCharCode(E>>e*8&255);return n};Y.aob=function(n){var E=0;for(var e=n.length-1;
e>=0;e--)E|=n.charCodeAt(e)<<(3-e)*8;return E};Y.indexOf=function(n,F,O,I){if(O==null)O=0;if(I==null)I=n.length;
I=Math.min(I,n.length);for(var e=O;e<I;e++)if(n[e]==F)return e;return-1};Y.qt=function(n,F,O){if(O==null)O=0;
var I=F.length,x=n.length-I;if(typeof F=="string"){var r=[];for(var e=0;e<I;e++)r.push(F.charCodeAt(e));
F=r}if(F.length>0){var _=F[0];for(var e=O;e<x;e++)if(n[e]==_){var d=!0;for(var w=1;w<I;w++)if(F[w]!=n[e+w]){d=!1;
break}if(d)return e}}return-1};Y.IB=function(n,F,O){var I=[],r="";while(F<O){var x=n[F++];if(x=="\\".charCodeAt(0))I.push(n[F++]);
else I.push(x)}for(var e=0;e<I.length;e+=2)r+=String.fromCharCode(I[e]<<8|I[e+1]);return r};Y.a30=function(n,F,O){var I=new Uint8Array(2);
for(var e=0;e<O.length;e++){Y.iW(I,0,O.charCodeAt(e));if(I[0]==")".charCodeAt(0)||I[0]=="(".charCodeAt(0)||I[0]=="\\".charCodeAt(0)){n[F]="\\".charCodeAt(0);
F++}n[F]=I[0];F++;if(I[1]==")".charCodeAt(0)||I[1]=="(".charCodeAt(0)||I[1]=="\\".charCodeAt(0)){n[F]="\\".charCodeAt(0);
F++}n[F]=I[1];F++}return F};Y.lr=function(n,F,O){n.nz(F,4*O.length);return Y.a30(n.data,F,O)};Y.O$=function(n,F,O){var I="";
for(var e=0;e<O;e++){var x=n[F++]|n[F++]<<8;I+=String.fromCharCode(x)}return I};Y.ZK=function(n,F,O){var I="";
for(var e=0;e<O;e++){var x=n[F++]<<8|n[F++];I+=String.fromCharCode(x)}return I};Y.aoc=function(n,F,O){for(var e=0;
e<O.length;e++){var I=O.charCodeAt(e);Y.s0(n,F+2*e,I)}};Y.kN=function(n,F,O){for(var e=0;e<O.length;
e++){var I=O.charCodeAt(e);Y.iW(n,F+2*e,I)}};Y.ahS=function(n,F,O){n.nz(F,2*O.length);Y.kN(n.data,F,O)};
Y.a20=function(n,e,F){var O=[],I=0,x=0;F+=e;while(e<F){I=n[e++];if((I&128)==0)x=I;else if((I&224)==192){x=(I&31)<<6;
I=n[e++];x|=I&63}else if((I&240)==224){x=(I&15)<<12;I=n[e++];x|=(I&63)<<6;I=n[e++];x|=I&63}else if((I&248)==240){x=(I&7)<<18;
I=n[e++];x|=(I&63)<<12;I=n[e++];x|=(I&63)<<6;I=n[e++];x|=I&63}else throw"e";O.push(x)}return O};Y.fn=window.TextDecoder?new window.TextDecoder("utf8"):null;
Y.l5=function(n,F,O){if(F==null)F=0;if(O==null)O=n.length;if(Y.fn&&F==0&&O==n.length)return Y.fn.decode(n);
var I=Y.a20(n,F,O),x=I.length;for(var e=0;e<x;e++)I[e]=String.fromCharCode(I[e]);return I.join("")};
Y.HY=window.TextEncoder?new window.TextEncoder("utf8"):null;Y.$s=function(n){if(Y.HY)return Y.HY.encode(n);
var F=new Uint8Array(n.length*4),O=Y.ng(n,F,0);return F.slice(0,O)};Y.ng=function(n,F,O){var I=n.length,e=0;
for(var x=0;x<I;x++){var r=n.charCodeAt(x);if((r&4294967295-(1<<7)+1)==0){F[O+e]=r;e++}else if((r&4294967295-(1<<11)+1)==0){F[O+e]=192|r>>6;
F[O+e+1]=128|r>>0&63;e+=2}else if((r&4294967295-(1<<16)+1)==0){F[O+e]=224|r>>12;F[O+e+1]=128|r>>6&63;
F[O+e+2]=128|r>>0&63;e+=3}else if((r&4294967295-(1<<21)+1)==0){F[O+e]=240|r>>18;F[O+e+1]=128|r>>12&63;
F[O+e+2]=128|r>>6&63;F[O+e+3]=128|r>>0&63;e+=4}else throw"e"}return e};Y.wj=function(n,F){var O=Y.c(n,F),I=Y.l5(n,F+4,O-1);
return{Ls:I,AU:4+O}};Y.a2u=function(n,F){var O=Y.wc(n,F),I=Y.O$(n,F+4,O);return I};Y.ca=function(n,F){var O=Y.c(n,F),I=Y.ZK(n,F+4,O);
return I};Y.Lf=function(n,F){var O=Y.c(n,F),I=Y.ZK(n,F+4,O-1);return I};Y.a3O=function(n,F,O){Y.Wb(n,F,O.length);
F+=4;Y.aoc(n,F,O)};Y.a2s=function(n,F,O){Y.Qm(n,F,O.length);F+=4;Y.kN(n,F,O)};Y.HS=function(n,F,O){n.nz(F,4+2*O.length);
Y.a2s(n.data,F,O)};Y.a3c=function(n,F,O){n.nz(F,4+2*O.length);Y.a3O(n.data,F,O)};Y.sX=function(n,F,O){var I=[];
for(var e=0;e<O;e++)I.push(String.fromCharCode(n[F+e]));return I};Y.abt=function(n,F,O){var I=!1,x=n.length-O.length;
for(var e=F;e<x;e++){for(var r=0;r<O.length;r++){if(n[e+r]!=O.charCodeAt(r))break;if(r==O.length-1)return e}}};
Y.su=function(n,F,O){var I="";for(var e=0;e<O;e++)I+=String.fromCharCode(n[F+e]);return I};Y.ZO=function(n,F,O){for(var e=0;
e<O.length;e++)n[F+e]=O.charCodeAt(e)};Y.d3=function(n,F,O){n.nz(F,O.length);Y.ZO(n.data,F,O)};Y.a69=function(n,F,O){var I="";
for(var e=0;e<O;e++){var x=n[F+e];if(x<10)I+="  ";else if(x<100)I+=" ";I+=x+", "}return I};Y.Ys=function(n,F){return n[F]<<8|n[F+1]};
Y.iW=function(n,F,E){n[F]=E>>8&255;n[F+1]=E&255};Y.bY=function(n,F,E){n.nz(F,4);Y.iW(n.data,F,E)};Y.aeC=function(n,F){var O=Y.Ys(n,F),I=Y.Ys(n,F+2);
return O+I*(1/65536)};Y.fV=function(n,F,E){var O=Math.floor(E),I=Math.floor((E-O)*65536);Y.iW(n,F,O);
Y.iW(n,F+2,I)};Y.KO=function(n,F){return n[F+1]<<8|n[F]};Y.s0=function(n,F,E){n[F+1]=E>>8&255;n[F]=E&255};
Y.gd=function(n,F,E){n.nz(F,4);Y.s0(n.data,F,E)};Y.W0=function(n,F){Y.Nh[0]=n[F+1];Y.Nh[1]=n[F];return Y.C_[0]};
Y.Qw=function(n,F){Y.Nh[0]=n[F];Y.Nh[1]=n[F+1];return Y.C_[0]};Y.eS=Y.iW;Y.bz=Y.bY;Y.Z3=function(n,F){Y.y9[0]=n[F+3];
Y.y9[1]=n[F+2];Y.y9[2]=n[F+1];Y.y9[3]=n[F];return Y.h3[0]};Y.Bl=function(n,F,E){Y.h3[0]=E;n[F+3]=Y.y9[0];
n[F+2]=Y.y9[1];n[F+1]=Y.y9[2];n[F+0]=Y.y9[3]};Y.hi=function(n,F,E){n.nz(F,4);Y.Bl(n.data,F,E)};Y.kC=function(n,F,O,I){O[I+0]=n[F+0];
O[I+1]=n[F+1];O[I+2]=n[F+2];O[I+3]=n[F+3]};Y.wc=function(n,F){Y.kC(n,F,Y.y9,0);return Y.E$[0]};Y.Wb=function(n,F,E){Y.E$[0]=E;
Y.kC(Y.y9,0,n,F)};Y.UJ=function(n,F,E){n.nz(F,4);Y.Wb(n.data,F,E)};Y.rV=function(n,F){Y.kC(n,F,Y.y9,0);
return Y.h3[0]};Y.a2X=function(n,F,E){Y.h3[0]=E;Y.kC(Y.y9,0,n,F)};Y.al9=function(n,F,E){n.nz(F,4);Y.a2X(n.data,F,E)};
Y.c=function(n,F){var O=n[F]*(256*256*256)+(n[F+1]<<16|n[F+2]<<8|n[F+3]);return O};Y.Qm=function(n,F,E){n[F]=E>>24&255;
n[F+1]=E>>16&255;n[F+2]=E>>8&255;n[F+3]=E>>0&255};Y.QI=function(n,F,E){n.nz(F,4);Y.Qm(n.data,F,E)};Y.h1=function(n,F){return Y.c(n,F)<<32|Y.c(n,F+4)};
Y.cJ=function(n,F,E){Y.Qm(n,F,E>>16>>16);Y.Qm(n,F+4,E&4294967295)};Y.oO=function(n,F,E){n.nz(F,8);Y.cJ(n.data,F,E)};
Y.z6=function(n,F){var O=new Uint8Array(8);for(var e=0;e<8;e++)O[e]=n[F+7-e];var I=new Float64Array(O.buffer);
return I[0]};Y.akE=function(n,F){var O=new Uint8Array(8);for(var e=0;e<8;e++)O[e]=n[F+e];var I=new Float64Array(O.buffer);
return I[0]};Y.yb=function(n,F,E){var O=new Float64Array(1);O[0]=E;var I=new Uint8Array(O.buffer);for(var e=0;
e<4;e++){var x=I[e];I[e]=I[7-e];I[7-e]=x}for(var e=0;e<8;e++)n[F+e]=I[e]};Y.aL=function(n,F,E){n.nz(F,8);
Y.yb(n.data,F,E)};Y.LD=function(n,F){Y.y9[0]=n[F+3];Y.y9[1]=n[F+2];Y.y9[2]=n[F+1];Y.y9[3]=n[F+0];return Y.zY[0]};
Y.lz=function(n,F){Y.y9[0]=n[F+0];Y.y9[1]=n[F+1];Y.y9[2]=n[F+2];Y.y9[3]=n[F+3];return Y.zY[0]};Y.dT=function(n,F,E){Y.zY[0]=E;
n[F+0]=Y.y9[3];n[F+1]=Y.y9[2];n[F+2]=Y.y9[1];n[F+3]=Y.y9[0]};Y.a0Z=function(n,F,E){n.nz(F,4);Y.dT(n.data,F,E)};
Y.Gx=function(n,F,E){Y.zY[0]=E;n[F+0]=Y.y9[0];n[F+1]=Y.y9[1];n[F+2]=Y.y9[2];n[F+3]=Y.y9[3]};Y.a6W=function(n,F,E){n.nz(F,4);
Y.Gx(n.data,F,E)};Y.a0n=function(n,F){var O=Y.Z3(n,F),I=O*(1/(1<<24));return I};Y.Au=function(n,F,O){var I=Math.floor(O*(1<<24));
Y.Bl(n,F,I)};Y.a1J=function(n,F,O){n.nz(F,4);Y.Au(n.data,F,O)};Y.Uk=function(n,F){var O=n[F],I=Y.su(n,F+1,O);
O+=1-O%2;return{G4:I,length:O+1}};Y.abz=function(n,F,O){var I=O.length;n[F]=I;Y.ZO(n,F+1,O);if(I%2==0){n[F+1+I]=0;
++I}return I+1};Y.HH=function(n,F,O){n.nz(F,O.length+2);return Y.abz(n.data,F,O)};Y.$$=function(n,F){var O=new cD;
O.R=Y.z6(n,F+0*8);O.O=Y.z6(n,F+1*8);O.Pr=Y.z6(n,F+2*8);O.oQ=Y.z6(n,F+3*8);O.hb=Y.z6(n,F+4*8);O.i9=Y.z6(n,F+5*8);
return O};Y.YA=function(n,F,O){Y.yb(n,F+0*8,O.R);Y.yb(n,F+1*8,O.O);Y.yb(n,F+2*8,O.Pr);Y.yb(n,F+3*8,O.oQ);
Y.yb(n,F+4*8,O.hb);Y.yb(n,F+5*8,O.i9)};Y.a3H=function(n,F,O){n.nz(F,48);Y.YA(n.data,F,O)};Y.amZ=function(n,F){var O=Y.LD(n,F),I=Y.LD(n,F+4),x=Y.LD(n,F+8),r=Y.LD(n,F+12);
return new gv(O,I,x-O,r-I)};Y.a2Y=function(n,F,O){Y.dT(n,F,O.x);Y.dT(n,F+4,O.y);Y.dT(n,F+8,O.x+O.d);
Y.dT(n,F+12,O.y+O.v)};Y.ahD=function(n,F,O){n.nz(F,16);Y.a2Y(n.data,F,O)};Y.sG=function(n,F){var O=Y.Z3(n,F),I=Y.Z3(n,F+4),x=Y.Z3(n,F+8),r=Y.Z3(n,F+12);
return new gv(I,O,r-I,x-O)};Y.ji=function(n,F,O){Y.Bl(n,F,O.y);Y.Bl(n,F+4,O.x);Y.Bl(n,F+8,O.y+O.v);Y.Bl(n,F+12,O.x+O.d)};
Y.S3=function(n,F,O){n.nz(F,16);Y.ji(n.data,F,O)};Y.$X=function(n,F,O){var I=new Uint8Array(O);for(var e=0;
e<O;e++)I[e]=n[F+e];return I};Y.sb=function(n,F,O){n.set(O,F)};Y.n0=function(n,F,O){n.nz(F,O.length);
Y.sb(n.data,F,O)};Y.a24=function(n,F,O,E){if(!E)E=1;for(var e=0;e<E;e++)n[F+e]=O};Y.rx=function(n,F,O,E){if(!E)E=1;
n.nz(F,E);Y.a24(n.data,F,O,E)};Y.C_=new Int16Array(1);Y.Nh=new Uint8Array(Y.C_.buffer);Y.h3=new Int32Array(1);
Y.E$=new Uint32Array(Y.h3.buffer);Y.y9=new Uint8Array(Y.h3.buffer);Y.zY=new Float32Array(Y.h3.buffer);
function gv(n,F,O,I){if(!n)n=0;if(!F)F=0;if(!O)O=0;if(!I)I=0;this.x=n;this.y=F;this.d=O;this.v=I}gv.prototype.X=function(){return this.d*this.v};
gv.prototype.clone=function(){return new gv(this.x,this.y,this.d,this.v)};gv.prototype.contains=function(n,F){return n>=this.x&&n<=this.x+this.d&&(F>=this.y&&F<=this.y+this.v)};
gv.prototype.JX=function(n){return this.contains(n.x,n.y)};gv.prototype.zp=function(n){return this.x<=n.x&&this.y<=n.y&&n.x+n.d<=this.x+this.d&&n.y+n.v<=this.y+this.v};
gv.prototype.mc=function(n){this.x=n.x;this.y=n.y;this.d=n.d;this.v=n.v};gv.prototype.Qq=function(n){return this.x==n.x&&this.y==n.y&&this.d==n.d&&this.v==n.v};
gv.prototype.EM=function(n,F){this.x-=n;this.y-=F;this.d+=2*n;this.v+=2*F};gv.prototype.aj$=function(n){this.EM(n.x,n.y)};
gv.prototype.lN=function(n){var F=Math.max(this.x,n.x),O=Math.max(this.y,n.y),I=Math.min(this.x+this.d,n.x+n.d),x=Math.min(this.y+this.v,n.y+n.v);
if(I<F||x<O)return new gv;else return new gv(F,O,I-F,x-O)};gv.prototype.G3=function(n){if(n.y+n.v<this.y||n.x>this.x+this.d||n.y>this.y+this.v||n.x+n.d<this.x)return!1;
return!0};gv.prototype.D2=function(){return this.d<=0||this.v<=0};gv.prototype.offset=function(n,F){this.x+=n;
this.y+=F};gv.prototype.P1=function(n){this.offset(n.x,n.y)};gv.prototype.aeU=function(){this.x=this.y=this.d=this.v=0};
gv.prototype.mT=function(n,F,O,I){this.x=n;this.y=F;this.d=O;this.v=I};gv.prototype.Tq=function(n){if(this.D2())return n.clone();
if(n.D2())return this.clone();var F=this.clone();F.alI(n);return F};gv.fZ=new Float32Array(2);gv.prototype.alI=function(n){if(n.D2())return;
if(this.D2()){this.mc(n);return}this.eN(n.x,n.y);this.eN(n.x+n.d,n.y+n.v)};gv.prototype.eN=function(n,F){var O=Math.min(this.x,n),I=Math.min(this.y,F);
this.d=Math.max(this.x+this.d,n)-O;this.v=Math.max(this.y+this.v,F)-I;this.x=O;this.y=I};gv.prototype.ags=function(n,F){this.x=n;
this.y=F;this.d=this.v=0};function iT(){}iT.Hy=function(n,F){var O=new Uint8Array(n),I=0,x=Y.su(O,I,9),d=4,w=100;
I+=9;var r=Y.su(O,I,4);I+=4;I++;F.d=Y.c(O,I);I+=4;F.v=Y.c(O,I);I+=4;var _=Y.c(O,I);I+=4;if(_!=0)alert("Unsupported image format, not RGB!");
if(["file","v001","v002","v003"].indexOf(r)==-1){w=Y.c(O,I);I+=4;if(parseInt(r.slice(1))>=7){w=w}else alert("Unknown XCF version: "+r);
d=8}var Z={};I=iT.Yy(O,I,Z);var P=[];I=iT.hX(O,I,P,d);var C=[];I=iT.hX(O,I,C,d);F.l7=0;for(var e=0;e<P.length;
e++)iT.afe(O,P[e],F,Z,d,w);while(F.l7>0){F.t.push(F.VF());F.l7--}F.t.reverse();delete F.l7;F.buffer=q.f(F.d*F.v*4);
if(F.t.length==0)console.log("No layers!!!");for(var e=0;e<C.length;e++){var W=iT.L_(O,C[e],Z,d,w);if(W.Kx[aa.a3M])F.N={channel:W.PB,rect:new gv(0,0,F.d,F.v)}}};
iT.afe=function(n,F,O,I,x,r){var _=O.Kv(),d=Y.c(n,F),C=0;F+=4;var w=Y.c(n,F);F+=4;_.rect=new gv(0,0,d,w);
var Z=Y.c(n,F);F+=4;var P=Y.wj(n,F);F+=P.AU;_.V9(P.Ls);var W={};F=iT.Yy(n,F,W);if(W[aa.ee]){var v=W[aa.ee];
C=v.length/4-1}if(W[aa.ud]){_.rect.x=Y.Z3(W[aa.ud],0);_.rect.y=Y.Z3(W[aa.ud],4)}if(W[aa.p0]){_.opacity=Y.c(W[aa.p0],0)}if(W[aa.acm]){_.add.lsct=ho.x7;
_.rect=new gv(0,0,0,0);_.buffer=q.f(0);_.Cq=24}if(W[aa.t8]){var L=Y.c(W[aa.t8],0);_.mf=aa.ajB[L];if(_.Ja()&&_.mf=="norm")_.mf="pass"}if(W[aa.X8]){if(Y.c(W[aa.X8],0)==0)_.Cq+=2}if(W[aa.Ga]){var H=Y.c(W[aa.Ga],0);
_.add.lsct=H&1==1?ho.x7:ho.OC}if(W[aa.S$]){var y=W[aa.S$];for(var g in y){var Q=y[g];if(g=="gimp-text-layer"){var J=iT.a5$(Q),A=J.text,p=J.font,U=J.color,j=J["font-size"];
if(A==null&&J.markup){var b=new DOMParser,s=b.parseFromString(J.markup,"image/svg+xml");while(s.firstChild!=null&&s.firstChild.tagName!=null){s=s.firstChild;
var G=s.getAttribute("font"),T=s.getAttribute("foreground"),z=s.getAttribute("size");if(G!=null)p=G;
if(T!=null){T=CSS.kk(T);U=[1,T.Q/255,T.l/255,T.O/255]}if(z!=null){j=""+parseFloat(z)/245}}A=s.textContent}_.add.lnsr="rend";
_.add.TySh=bt.Cc(0,0);_.add.TySh.Qa=new gv(0,0,100,100);_.add.TySh.m=new cD(1,0,0,1,_.rect.x,_.rect.y);
var m=_.add.TySh.Vb;bt.bw(m,0,A);var $=bt.gU(m,0,0),o=J.justify,h=J["line-spacing"];if(U)$.Bw.FillColor={Type:1,Values:[1,parseFloat(U[1]),parseFloat(U[2]),parseFloat(U[3])]};
if(j){j=Math.round(parseFloat(j));$.Bw.FontSize=j;_.add.TySh.m.i9+=Math.min(17,j*.17)}if(h){h=Math.round(parseFloat(h)+$.Bw.FontSize*1.2);
$.Bw.Leading=h;$.Bw.AutoLeading=!1}if(o)$.jp.Justification=["left","right","center","fill"].indexOf(o);
if(p&&p!="Sans-serif"){var X=p.toLowerCase(),D="bold italic semi extra regular condensed light".split(" "),f=X.length;
for(var e=0;e<D.length;e++){var R=X.indexOf(D[e]);if(R!=-1&&R<f&&X[R-1]==" ")f=R}if(f!=X.length)p=p.slice(0,f-1).split(" ").join("")+"-"+p.slice(f).split(" ").join("");
bt.Zu($,p)}bt.F$(m,0,A.length,$);var i=J["box-width"],N=J["box-height"],M=i?parseFloat(i):_.rect.d,hK=N?parseFloat(N):_.rect.v;
bt.li(m,1);bt.Ar(m,[0,0,Math.ceil(M),Math.ceil(hK)])}else console.log("Unknown property "+g)}}while(O.l7>C){O.t.push(O.VF());
O.l7--}O.l7=C;if(_.add.lsct==ho.x7||_.add.lsct==ho.OC)O.l7++;var bD=x==4?Y.c:Y.h1;if(_.R9()){_.buffer=q.f(_.rect.X()*4);
var co=new q.zF(_.rect.X()),iM=bD(n,F);F+=x;var hs=bD(n,F);F+=x;iT.g6(n,iM,co,I,x,r);q.Eb(co,_.buffer);
if(hs!=0){_.r=new K.FZ;_.r.color=0;_.r.rect=_.rect.clone();_.r.channel=iT.L_(n,hs,I,x,r).PB;if(W[aa.Oy])_.r.isEnabled=Y.c(W[aa.Oy],0)==1}}O.t.push(_)};
iT.a5$=function(n){var F="("+Y.l5(n,0,n.length-1)+")",O=[],I={};iT.XL(F,1,O);iT.amm(O,I);return I};iT.amm=function(n,F){for(var e=0;
e<n.length;e++){var O=n[e],I=O[0];if(O.length==2)F[I]=O[1];else F[I]=O.slice(1)}};iT.XL=function(n,F,O){while(!0){if(F>=n.length)throw"e";
var I=n.charAt(F);F++;if(I=="("){var x=[];F=iT.XL(n,F,x);O.push(x)}else if(I==" "||I=="\n"||I=="\r"){}else if(I==")")return F;
else if(I=="\""){var r=F;while(!0){var _=n[F];F++;if(_=="\"")break;if(_=="\\")F++}O.push(JSON.parse(n.slice(r-1,F)))}else{var r=F-1;
while(n[F]!=" "&&n[F]!=")")F++;O.push(n.slice(r,F))}}};iT.L_=function(n,F,O,I,x){var r=Y.c(n,F);F+=4;
var _=Y.c(n,F);F+=4;var d=Y.wj(n,F);F+=d.AU;var w={};F=iT.Yy(n,F,w);var Z=new q.zF(r*_),P=I==4?Y.c:Y.h1,C=P(n,F);
F+=I;iT.g6(n,C,Z,O,I,x);return{PB:Z.Q,Kx:w}};iT.g6=function(n,F,O,I,x,r){var _=Y.c(n,F);F+=4;var d=Y.c(n,F);
F+=4;var w=Y.c(n,F);F+=4;var Z=x==4?Y.c:Y.h1,P=Z(n,F);F+=x;iT.a5D(n,P,O,I,w,x,r)};iT.a5D=function(n,F,O,I,x,r,_){var d=Y.c(n,F),P=0,e=0;
F+=4;var w=Y.c(n,F);F+=4;var Z=new gv(0,0,d,w);if(_==100||_==150)P=1;else if(_==200||_==250)P=2;else if(_==300||_==350)P=4;
else if(_==500||_==550)P=2;else if(_==600||_==650)P=4;else if(_==700||_==750)P=8;else{alert("unsupported bit depth "+_);
throw"e"}var C=x/P,P=Math.round(x/C),W=[];F=iT.hX(n,F,W,r);var v=new q.zF(64*64*P),L=new gv,H=I[aa.afP][0],y=[v.Q,v.l,v.O,v.R];
if(C==3)v.R.fill(255);var g=Date.now();for(var Q=0;Q<w;Q+=64)for(var J=0;J<d;J+=64){var A=Math.min(d-J,64),p=Math.min(w-Q,64),U=A*p;
L.mT(J,Q,A,p);iT.aog(n,W[e++],U*P,H,C,y);if(_==100||_==150){}else if(_==250){for(var j=0;j<C;j++){var b=y[j];
for(var s=0;s<U;s++){var G=b[s]<<8|b[U+s];b[s]=Math.min(G>>>8,255)}}}else if(_==600){var T=iT.akF(),z=new Uint32Array(1),m=new Float32Array(z.buffer);
for(var j=0;j<C;j++){var b=y[j];for(var s=0;s<U;s++){z[0]=b[s]<<24|b[U+s]<<16|b[(U<<1)+s]<<8|b[(U<<1)+U+s]<<0;
var $=m[0];if($<0)$=0;else if($>1)$=1;b[s]=T[~~(.5+$*1e3)]}}}else console.log("unknown data format",_);
q.U0(v,L,O,Z)}};iT.akF=function(){var n=iT.a9E;if(n!=null)return n;n=iT.a9E=new Uint8Array(1001);for(var e=0;
e<1001;e++)n[e]=~~(.49+255*q.sK(e*.001));return n};iT.aog=function(n,F,O,I,x,r){if(I==1){for(var _=0;
_<x;_++){var d=r[_],w=0;while(w<O){var E=n[F];F++;if(E<127){var Z=n[F];F++;E++;for(var e=0;e<E;e++)d[w+e]=Z}else if(E==127){var P=n[F];
F++;var C=n[F];F++;var Z=n[F];F++;E=P<<8|C;for(var e=0;e<E;e++)d[w+e]=Z}else if(E==128){var P=n[F];F++;
var C=n[F];F++;E=P<<8|C;for(var e=0;e<E;e++)d[w+e]=n[F+e];F+=E}else{E=256-E;for(var e=0;e<E;e++)d[w+e]=n[F+e];
F+=E}w+=E}}}else if(I==2){var W=pako.inflate(n.slice(F)),v=Math.round(W.length/O);for(var e=0;e<O;e++){var L=e*v;
r[0][e]=W[L];r[1][e]=W[L+1];r[2][e]=W[L+2];r[3][e]=v==3?255:W[L+3]}}else alert("Unknown compression "+I)};
iT.hX=function(n,F,O,I){var x=I==4?Y.c:Y.h1;while(!0){var r=x(n,F);F+=I;if(r==0)break;else O.push(r)}return F};
iT.Yy=function(n,F,O){while(!0){var I=Y.c(n,F);F+=4;var x=Y.c(n,F);F+=4;if(I==aa.a0m)break;else if(I==aa.S$)O[I]=iT.a9f(n,F,F+x);
else O[I]=Y.$X(n,F,x);F+=x}return F};iT.a9f=function(n,F,O){var I={};while(F<O){var x=Y.wj(n,F);F+=x.AU;
var r=Y.c(n,F);F+=4;if(r!=1)console.log("unknown flags",r);var _=Y.c(n,F);F+=4;I[x.Ls]=Y.$X(n,F,_);F+=_}return I};
var aa={a0m:0,ajQ:1,ac8:2,anD:3,a3M:4,a4J:5,p0:6,t8:7,X8:8,acG:9,aki:10,Oy:11,a6S:12,acR:13,alk:14,ud:15,aa0:16,afP:17,ae9:18,ak3:19,a9o:20,S$:21,aam:22,anR:23,ajT:24,ab_:25,aoh:26,aii:27,ajC:28,acm:29,ee:30,Ga:31,ahc:32,a0d:33,a7H:34,a81:35,afV:36,aaD:37,alC:38,a4R:0,a8P:1,a90:2,a1R:3,aot:1,a0V:2,aoU:0,a0$:1,a1v:1};
aa.ajB="norm,diss,norm,mul ,scrn,over,diff,lddg,fsub,dark,lite,hue ,sat ,colr,lum ,fdiv,lddg,idiv,hLit,sLit,fdiv,pLit,norm,over,hue ,hue ,colr,lite,norm,norm,mul ,scrn,diff,lddg,fsub,dark,lite,hue ,sat ,colr,lum ,fdiv,lddg,idiv,hLit,sLit,fdiv,pLit,vLit,pLit,lLit,hMix,smud,lbrn,lum ,lum ,lum ,lum ,norm,norm,norm,pass".split(",");
function fA(){}fA.Hy=function(n,F){var O=fA,I=iw.parse(n),r=0;if(I.pages.length>1)console.log(I.pages.length,"pages");
var x=[],_=new gv;for(var d=0;d<I.pages.length;d++){var w=I.pages[d],Z=w.layers,P=O.gh(Z,d),W=!1;if(P.X()>8e3*8e3||P.d>3e4||P.v>3e4){O.Lg(Z,!0);
var C=O.gh(Z,d);if(C.X()>=P.X())O.Lg(Z,!1)}P=O.gh(Z,d);for(var v=0;v<Z.length;v++){var L=Z[v];if(O.j2(L)=="artboard")W=!0}if(!W){console.log("no artboard");
var H={};for(var y in w)H[y]=w[y];H._class="group";w.layers=[H]}x.push(P.clone());if(P.D2())continue;
P.x=0;P.y=r;r+=P.v+200;_=_.Tq(P)}var g={};if(I.foreignSymbols)for(var e=0;e<I.foreignSymbols.length;
e++){var Q=I.foreignSymbols[e].symbolMaster;g[Q.symbolID]={cI:Q}}O.Vf(I.pages,g,F);for(var J in g){var L=g[J].cI,A=O.nU(L.layers)}var p=fA.FS(_,8192*8192);
F.u4=!0;F.d=Math.round(_.d/p);F.v=Math.round(_.v/p);F.buffer=q.f(F.d*F.v*4);F.bJ(I.pages[0].layers.length);
F.pF={};F.wV=[];r=0;for(var d=0;d<I.pages.length;d++){var U=I.pages[d],P=x[d],j=new cD(p,0,0,p,P.x,P.y-r);
O.Ox(U.layers,F,j,I,g,{},[]);r+=P.v+200}delete F.pF;delete F.wV;if(p!=1)alert("File scaled down "+p+"x");
F.aci()};fA.a0e=0;fA.j2=function(n){return n._class?n._class:n.$class};fA.FS=function(n,F){var O=1;while(Math.round(n.d/O)*Math.round(n.v/O)>F||Math.max(Math.round(n.d/O),Math.round(n.v/O))>3e4)O++;
if(O!=1&&!window.confirm("Your image is quite large ("+n.d+" x "+n.v+" px).\n"+"Press OK to scale it down "+O+"x, or Cancel to keep the size."))O=1;
return O};fA.gh=function(n,F){var O=[],I=fA;for(var x=0;x<n.length;x++){var r=n[x],_=I.sG(r.frame);if(F==0||I.j2(r)=="artboard")O.push(_)}return q.rect.oi(O)};
fA.Lg=function(n,F){var O=[],I=fA;for(var x=0;x<n.length;x++){var r=n[x],_=I.sG(r.frame);_.d+=150;_.v+=150;
O.push(_)}var d=q.rect.oi(O);q.rect.anW(O,F);var w=q.rect.oi(O);if(w.X()*1.5<d.X()||d.d>3e4&&w.d<=3e4||d.v>3e4&&w.v<=3e4){alert("Re-arranging artboards");
for(var x=0;x<n.length;x++){var Z=O[x],r=n[x],P=r.frame;P.x=Z.x;P.y=Z.y}}};fA.Vf=function(n,F,O){var I=fA;
for(var x=0;x<n.length;x++){var r=n[x],_=I.j2(r);if(["page","artboard","group"].indexOf(_)!=-1)I.Vf(r.layers,F,O);
else if(_=="symbolMaster")F[r.symbolID]={cI:r}}};fA.nU=function(n){var F=fA;for(var O=0;O<n.length;O++){var I=n[O],x=F.j2(I),r=null;
if(["page","artboard","group"].indexOf(x)!=-1)r=F.nU(I.layers);if(x=="symbolMaster"||x=="symbolInstance")r=I;
if(r!=null)return r}return null};fA.Ox=function(n,F,O,I,x,r,_){var d=fA,w=[];for(var Z=0;Z<n.length;
Z++){var P=n[Z],C=P.frame?d.sG(P.frame):null,W=P.style,g="",j=null,b=!1;if(W==null){console.log("no styles")}var v=d.Js(P,O),L=d.j2(P),H=L=="shapeGroup"||L=="shapePath"||L=="rectangle"||L=="oval"||L=="triangle"||L=="polygon",y=["page","artboard","group"].indexOf(L)!=-1;
if(L=="shapeGroup"){for(var e=0;e<P.layers.length;e++)if(d.j2(P.layers[e])=="shapeGroup")y=!0}var Q=P.exportOptions;
if(Q){var J=Q.exportFormats;if(J==null)J=Q.sizes;if(L!="artboard"&&(J&&J.length!=0)){var A=J[0].scale}}var p=F.Kv();
p.tt(P.isVisible);var U=P.name;if(!(typeof U=="string"))U=L;p.V9(g+U.slice(0,250));if(W!=null)j=d.alO(I,F,W,C,v,p.getName(),H||L=="artboard"||y);
if(L=="rectangle"&&W&&W.fills&&W.fills[0]){var s=W.fills[0];if(s.fillType==4&&s.patternFillType>1&&s.image!=null)b=!0}if(P.shouldBreakMaskChain){while(w.length!=0)d.UU(w.pop(),F)}if(y){p.add.lsct=P.layerListExpandedType==2?ho.x7:ho.OC;
p.mf="pass";p.Cq=24;p.tt(P.isVisible);F.t.push(F.VF());if(L=="artboard"){var G=C.clone(),T=v.GW();G.x=-Math.floor(v.hb/T);
G.y=-Math.floor(v.i9/T);G.d=Math.floor(G.d/T);G.v=Math.floor(G.v/T);p.Hp(G);var z=P.backgroundColor,m=z?{Q:255*z.red,l:255*z.green,O:255*z.blue}:{Q:255,l:255,O:255};
p.add.artb.Clr={t:"Objc",v:q.W.Vm(m)};p.add.artb.artboardBackgroundType={t:"long",v:4}}d.Ox(P.layers,F,v,I,x,r,_)}else if(H&&!b){p.add.vmsk=new K.X9;
p.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));p.add.vstk.strokeEnabled.v=!1;p.add.vogk=[];var $=j!=null&&j.frameFXMulti.v.length==1,o=W?W.fills:null,h=W?d.KP(I,o,C,v,p.getName(),F,d.bH(_,P.do_objectID+"_image")):[];
if(h.length==0){if($)p.add.vstk.fillEnabled.v=!1;else p.add.iOpa=0;p.add.SoCo={classID:"null",Clr:{t:"Objc",v:q.W.Vm({Q:0,l:0,O:0})}}}else{var X=h[0],D=null,f=null;
if(X.type=="SoFi"){D="SoCo";f=bW.ez}if(X.type=="GrFl"){D="GdFl";f=bW.KK}if(X.type=="patternFill"){D="PtFl";
f=bW.dC}if(D!=null){p.add[D]={classID:"null"};for(var e=0;e<f.length;e++){var R=f[e];p.add[D][R]=X.G.v[R]}var i=X.G.v.Opct.v.val;
if($&&i==0)p.add.vstk.fillEnabled.v=!1;else p.add.iOpa=Math.round(255*i/100)}}p.Cq|=16;p.add.vmsk.b=d.zo(P.layers?P.layers:[P],P.layers?v:O,p.add.vogk);
var t=W?W.blur:null;if(t&&t.isEnabled&&t.type<=1)p.add.vmsk.RI=t.radius;if(p.add.vmsk.b.length==2){console.log("shape with no content:",p.getName())}if($){var N=j.frameFXMulti.v[0].v,M=p.add.vstk,hK=W.borders[0];
j.frameFXMulti.v=[];ha.WW(N,M);var bD=W.borderOptions,co=W.miterLimit;if(bD){var iM=bD.dashPattern;M.strokeStyleLineCapType.v.strokeStyleLineCapType=bW.uS.wq[bD.lineCapStyle];
M.strokeStyleLineJoinType.v.strokeStyleLineJoinType=bW.uS.join[bD.lineJoinStyle];if(iM)M.strokeStyleLineDashSet.v=ha.Kn(iM,1/N.Sz.v.val);
if(co!=null)M.strokeStyleMiterLimit.v=co}}p.o3(F)}else if(L=="bitmap"||b){var hs=b?W.fills[0]:null,S=b?hs.image.bdata:P.image.bdata,a=F._C(S,p.getName(),0,0);
a.Cq=p.Cq;p=a;var t=W?W.blur:null,bV=W?W.colorControls:null;if(t||bV){p.add.SoLd.filterFX=bS.sN();F.ti({id:p.add.SoLd.placed.v,rect:new gv,buffer:q.f(1),r:new K.FZ});
var o=p.add.SoLd.filterFX.v.filterFXList.v;if(t){var a5=bS.Lk("GsnB",{});a5.v.enab.v=t.isEnabled;a5.v.Fltr.v.Rds.v.val=t.radius;
o.push(a5)}if(bV){var i9=bV.brightness,dG=bV.contrast,ap=bV.hue,bk=bV.saturation;if(ap!=0||bk!=1){var a5=bS.Lk("hue2",{});
a5.v.enab.v=bV.isEnabled;cy.K8(a5.v.Fltr.v,0,[Math.round(ap*180/Math.PI),Math.round((bk-1)*100),0]);
o.push(a5)}if(i9!=0||dG!=1){var a5=bS.Lk("brit",{});a5.v.enab.v=bV.isEnabled;dG=dG-1;if(dG>0)dG/=2;var c2=a5.v.Fltr.v;
c2.Brgh.v=Math.round(i9*255);c2.Cntr.v=Math.round(dG*255);c2.useLegacy.v=!0;o.push(a5)}}}if(b){var gg=hs.patternFillType;
if(gg==3){var bH=p.rect.d/p.rect.v,gw=C.d/C.v;if(bH<gw){v.translate(-(C.d*(1-bH/gw))/2,0);v.scale(gw/bH,1)}else{v.translate(0,-(C.v*(1-gw/bH))/2);
v.scale(1,bH/gw)}}}C.x=C.y=0;var gP=q.z.om(C).H;v.uZ();q.z.m(gP,v,gP);p.add.SoLd.Trnf=c.V.uB(gP);p.add.SoLd.nonAffineTransform=c.V.uB(gP);
p.aY(F,!1)}else if(L=="text"){if(P.attributedString==null)continue;var dT=v.clone(),fU,dV,gR=0;dT.uZ();
dT.R=dT.oQ=Math.min(dT.R,dT.oQ);p.add.lnsr="rend";p.add.TySh=bt.Cc(0,0);p.add.TySh.Qa=new gv(0,0,C.d,C.v);
p.add.TySh.m=dT;var ac=P.attributedString;if(ac.archivedAttributedString)ac=ac.archivedAttributedString;
var e2=ac.NSString;if(e2==null)e2=ac.string;if(e2==null)e2="";if(e2["NS.string"])e2=e2["NS.string"];
if(r[P.do_objectID]!=null)e2=r[P.do_objectID];var cX=d.bH(_,P.do_objectID+"_stringValue");if(cX)e2=cX.value;
if(ac.attributes!=null){fU=[];dV=[];var eR=ac.attributes;for(var e=0;e<eR.length;e++){fU.push(eR[e].length,e);
dV.push(eR[e].attributes)}}else if(ac.NSAttributeInfo==null){fU=[e2.length,0];dV=[ac.NSAttributes]}else{fU=ac.NSAttributeInfo["NS.data"];
dV=ac.NSAttributes;fU=fA.a0O(fU,dV)}for(var e=0;e<fU.length;e+=2)gR+=fU[e];if(gR!=e2.length){while(gR>e2.length){fU[fU.length-2]--;
gR--;if(fU[fU.length-2]==0){fU.pop();fU.pop()}}fU[fU.length-2]+=e2.length-gR}e2=e2.replace(/\u2028/g,"\n");
e2=e2.replace(/\u2029/g,"\n");e2=e2.replace(/\r/g,"\n");var bN=p.add.TySh.Vb;bt.bw(bN,0,e2);if(e2!=""){var eG=P.textBehaviour,ef=W.textStyle,fi=ef?ef.verticalAlignment:0,ep=d.afX(bN,fU,dV,e2),T=dT.GW(),iJ=bt.gU(bN,0,1),c1=0;
if(iJ.Bw.Font){var aT=iJ.D0[iJ.Bw.Font].Name;if(aT=="FontAwesome"||aT=="Ionicons")ep*=.87}var dm=iJ.Bw.AutoLeading?0:iJ.Bw.Leading*.6,gk=Math.max(ep,dm)*T,a8=C.d,bX=C.v;
if(eG==0){bt.li(bN,0);var bL=bt.H2(iJ.jp);if(bL==1)c1=a8*T;if(bL==2)c1=a8*T*.5;if(fi==0)gk*=1;else gk*=.9}else{bt.li(bN,1);
bt.Ar(bN,[0,0,Math.round(a8),Math.round(bX)]);if(eG==2&&fi==0)gk=gk*.2;else if(eG==2&&fi==1){gk=T*.5*(bX-iJ.Bw.FontSize)}else if(eG==1&&fi==0)gk=gk*.2;
else gk=gk*.35}p.add.TySh.m.translate(c1,gk)}}else if(L=="symbolInstance"||L=="symbolMaster"){var c_=P.symbolID;
if(r[P.do_objectID])c_=r[P.do_objectID].symbolID;var eS=d.bH(_,P.do_objectID+"_symbolID");if(eS)c_=eS.value;
if(c_=="")continue;var c$={};for(var R in r)c$[R]=r[R];if(P.overrides)for(var R in P.overrides)c$[R]=P.overrides[R];
var cp=_.slice(0);if(P.overrideValues)cp=cp.concat(P.overrideValues);var b_=x[c_];if(b_==null){console.log("Unknown master master",P.symbolID);
continue}var hy=fA.sG(b_.cI.frame),gx=hy.d/C.d,eJ=hy.v/C.v,d4=v.clone();d4.scale(gx,eJ);p.add.lsct=ho.OC;
p.mf="pass";p.Cq=24;p.tt(P.isVisible);F.t.push(F.VF());var cs=b_.cI;if(F.wV.indexOf(cs)==-1){F.wV.push(cs);
d.Ox(cs.layers,F,d4,I,x,c$,cp);F.wV.pop()}}else if(L=="slice"){console.log("slice layers are ignored by now");
continue}else{console.log("unknown layer type: "+L,P);continue}if(W&&W.contextSettings){var en=W.contextSettings,cm=en.blendMode;
if(cm<d.nO.length){p.mf=fk.Dy[fk.Cs.indexOf(d.nO[cm])];if(y&&p.mf=="norm")p.mf="pass"}p.opacity=Math.round(p.opacity*en.opacity)}if(j!=null){p.add.lmfx=j}F.t.push(p);
if(P.hasClippingMask&&n.length>1){w.push(p);F.t.push(F.VF())}}while(w.length!=0)d.UU(w.pop(),F)};fA.bH=function(n,F){for(var e=0;
e<n.length;e++)if(n[e].overrideName.startsWith(F))return n[e]};fA.a0O=function(n,F){var O=0,I=[];while(O+1<n.length){var x=n[O];
O++;if(x>127){x+=128*(n[O]-1);O++;if(n[O-1]>127){x+=128*(n[O]-1);O++}}var r=n[O];O++;I.push(x,r)}return I};
fA.afX=function(n,F,O,I){var x=fA,r=0,P=0,C=0;for(var e=0;e<I.length;e++){var _=I.charCodeAt(e),d=1473<=_&&_<=1479||1488<=_&&_<=1514||1520<=_&&_<=1524,w=1569<=_&&_<=1594||1600<=_&&_<=1749;
if(d||w)r++}var Z=r>I.length/2;for(var e=0;e<F.length;e+=2){var W=F[e],p=14,U="DejaVuSans";if(W==0)continue;
var v=F[e+1],L=O[v],H=bt.gU(n,P,P+W-1),y=L.NSColor;if(y==null){var y=L.MSAttributedStringColorDictionaryAttribute;
if(y==null)y=L.MSAttributedStringColorAttribute;if(y==null)y="0 0 0";else y=[y.red,y.green,y.blue].join(" ")}else if(x.j2(y)=="MSArchivedColor")y=y.dr+" "+y.dg+" "+y.db;
else if(y.NSRGB){y=y.NSRGB;y=Y.su(y,0,y.length-1)}else if(y.NSCMYK){y=y.NSCMYK;y=Y.su(y,0,y.length-1);
y=y.split(" ").map(parseFloat);var g=1-y[0],Q=1-y[1],J=1-y[2],A=1-y[3];y=g*A+" "+Q*A+" "+J*A}else if(y.NSWhite){y="1 1 1"}y=y.split(" ");
H.Bw.FillColor={Type:1,Values:[1,parseFloat(y[0]),parseFloat(y[1]),parseFloat(y[2])]};var j=L.MSAttributedStringFontAttribute;
if(L.NSFont){p=L.NSFont.NSSize;U=L.NSFont.NSName}else if(j){if(j.attributes){j=j.attributes;p=j.size;
U=j.name}else{var b=j.NSFontDescriptorAttributes;if(b==null)b=j.UIFontDescriptorAttributes;j=b;p=j.NSFontSizeAttribute;
U=j.NSFontNameAttribute}if(U==null)U="DejaVuSans"}var C=Math.max(C,p);H.Bw.FontSize=Math.round(p);bt.Zu(H,U);
var s=L.NSKern;if(s==null)s=L.kerning;if(s!=null)H.Bw.Tracking=Math.round(1e3*s/p);if(L.NSUnderline!=null)H.Bw.Underline=L.NSUnderline>0;
var G=L.NSStrikethrough;if(G==null)G=L.strikethroughStyle;if(G!=null)H.Bw.Strikethrough=G>0;if(L.MSAttributedStringTextTransformAttribute==1)H.Bw.FontCaps=2;
var T=L.NSParagraphStyle;if(T==null)T=L.paragraphStyle;if(T){var z=T.paragraphSpacing;if(z!=null){H.jp.SpaceAfter=z}var m=T.NSAlignment;
if(m==null)m=T.alignment;if(m!=null){var $=0;if(!1){}else if(m==1)$=1;else if(m==2)$=2;else if(m==4)$=0;
else{$=m;console.log("unknown align",m)}if(Z&&$<2)$=1-$;H.jp.Justification=$}var o=T.NSMinLineHeight;
if(o==null)o=T.minimumLineHeight;if(o!=null){H.Bw.AutoLeading=!1;H.Bw.Leading=o}}H.jp._Direction=Z?1:0;
bt.F$(n,P,P+W,H);P+=W}return C};fA.alO=function(n,F,O,I,x,r,_){var d=fA,w=JSON.parse(bW.default),Z=!1;
for(var e=0;e<bW.order.length;e++)w[bW.jV[e]]={t:"VlLs",v:[]};var P=O.fills,C=d.KP(n,P,I,x,r,F);for(var W=0;
W<2;W++){var v=O[["shadows","innerShadows"][W]];if(v==null)continue;var L=["DrSh","IrSh"][W],H=bW.jV[bW.order.indexOf(L)];
for(var e=0;e<v.length;e++){var y=v[e];if(!y.isEnabled)continue;if(y.contextSettings.opacity==0||y.color.alpha==0)continue;
var g=JSON.parse(bW.E5[bW.order.indexOf(L)]);w[H].v.unshift({t:"Objc",v:g});Z=!0;g.Clr.v=d.kk(y.color);
g.blur.v.val=Math.round(y.blurRadius/x.GW());var Q=x.clone();Q.hb=Q.i9=0;Q.uZ();var J=Q.Pz(new aE(y.offsetX,y.offsetY)),A=Math.sqrt(J.x*J.x+J.y*J.y);
g.Dstn.v.val=Math.round(A);g.lagl.v.val=Math.round(Math.atan2(J.y,-J.x)*(180/Math.PI));if(g.layerConceals)g.layerConceals.v=C.length!=0;
d.gP(y,g)}}var p=O.borders;if(p!=null&&(C.length==0||O.blur==null||!O.blur.isEnabled))for(var e=0;e<p.length;
e++){var U=p[e];if(!U.isEnabled)continue;var g=JSON.parse(bW.E5[bW.order.indexOf("FrFX")]),H=bW.jV[bW.order.indexOf("FrFX")];
w[H].v.unshift({t:"Objc",v:g});Z=!0;g.Clr.v=d.kk(U.color);if(U.fillType!=0&&U.gradient){var j=d.ao(U.gradient,I,x,r),b=["Type","Angl","Ofst","Scl"];
for(var e=0;e<b.length;e++)g[b[e]]=j[b[e]];g.Grad.v=j.Grad.v;g.PntT.v.FrFl="GrFl"}g.Sz.v.val=U.thickness/x.GW();
g.Styl.v.FStl=["CtrF","InsF","OutF"][U.position];d.gP(U,g)}for(var e=_?1:0;e<C.length;e++){var s=C[e],H=bW.jV[bW.order.indexOf(s.type)];
w[H].v.unshift(s.G);Z=!0}return Z?w:null};fA.KP=function(n,F,O,I,x,r,_){if(F==null)return[];var d=fA,w=[];
for(var e=0;e<F.length;e++)if(F[e].isEnabled)w.push(F[e]);F=w;var Z=[];for(var e=0;e<F.length;e++){var P=F[e],C=null,W=null;
if(P.fillType==0){C="SoFi";var v=JSON.parse(bW.E5[bW.order.indexOf("SoFi")]);W={t:"Objc",v:v};W.v.Clr.v=d.kk(P.color)}else if(P.fillType==1){C="GrFl";
W={t:"Objc",v:d.ao(P.gradient,O,I,x)}}else if(P.fillType==4&&P.image!=null){var L=P.image;if(_)L=_.value;
var H=fx.TG(L.bdata.buffer);if(H!=null&&H!="pdf"&&H!="eps"){var y,U=0,j=0,b=0;if(r.pF[L.key])y=r.pF[L.key];
else{var g=fx.rM(H).bx(L.bdata)[0],Q=g.Kh.clone();y={};y.id=fj.Mj()+"-d71c-11e5-b1ae-a548a96e5f9f";y.name="someImage";
y.IR=[new Uint8Array(g.data),Q];r.CI(y);r.pF[L.key]=y}var J=y.IR[1],v=JSON.parse(bW.E5[bW.order.indexOf("patternFill")]);
C="patternFill";W={t:"Objc",v:v};var A=P.patternFillType,p=P.patternTileScale;v.Algn.v=!0;v.Ptrn.v.Idnt.v=y.id;
if(A==0){U=p*J.d/Math.min(J.d,J.v);j=-I.hb;b=-I.i9}else{U=Math.max(O.d/J.d,O.v/J.v);j=-I.hb-(J.d*U-O.d)/2;
b=-I.i9-(J.v*U-O.v)/2}v.Scl.v.val=100*U*(1/I.GW());v.phase.v.Hrzn.v=Math.round(j/I.GW());v.phase.v.Vrtc.v=Math.round(b/I.GW())}}else if(P.fillType==5){console.log("fill type Noise not supported yet")}else console.log("unknown fill type",P.fillType);
if(C!=null){d.gP(P,W.v);Z.push({type:C,G:W})}}return Z};fA.a5Q=function(n){var F=fA,O=new gv(0,0,1,1);
n=n.slice(0);while(!0){var I=!1;for(var e=0;e<n.length-1;e++){var x=n[e],r=n[e+1],_=null,d=x.contextSettings;
if(x.fillType==0&&(d==null||d.opacity==1&&d.blendMode==0)&&x.color.alpha==1){var w="norm",Z=1,d=r.contextSettings;
if(d){Z=d.opacity;w=fk.X4(F.nO[d.blendMode])}if(r.fillType==0){_=JSON.parse(JSON.stringify(r));F.By(_.color,x.color,_.color,O,w,Z)}if(r.fillType==1){_=JSON.parse(JSON.stringify(r));
var P=_.gradient.stops;for(var C=0;C<P.length;C++)F.By(P[C].color,x.color,P[C].color,O,w,Z)}if(_!=null&&_.contextSettings){var d=_.contextSettings;
d.opacity=1;d.blendMode=0}}if(_!=null){n.splice(e,0,_);I=!0;break}}if(!I||n.length<2)break}return n};
fA.By=function(n,F,O,I,x,r){var _=fA,d=q.f(4);_.nR(n,d);var w=q.f(4);_.nR(F,w);q.p.F_(x,d,I,w,I,I,r);
_.ahf(w,O)};fA.nR=function(n,F){F[0]=255*n.red;F[1]=255*n.green;F[2]=255*n.blue;F[3]=255*n.alpha};fA.ahf=function(n,F){F.red=n[0]/255;
F.green=n[1]/255;F.blue=n[2]/255;F.alpha=n[3]/255};fA.UU=function(n,F){n=n.clone();n.Cq=24;n.V9("Mask by "+n.getName());
F.t.push(n);n.add.lsct=ho.x7;n.add.lyid=F.Xf();delete n.add.lmfx;delete n.add.SoCo;delete n.add.GdFl;
delete n.add.PtFl;delete n.add.iOpa;if(n.add.vmsk)n.add.vmsk.j8=!0;n.o3(F);if((n.Cq&16)==16)n.Cq-=16;
if((n.Cq&2)==2)n.Cq-=2;n.mf="pass";n.opacity=255};fA.nO="Nrml Drkn Mltp CBrn Lghn Scrn CDdg Ovrl SftL HrdL Dfrn Xclu H Strt Clr Lmns linearBurn linearDodge".split(" ");
fA.ao=function(n,F,O,I){O=O.clone();O.uZ();O.hb=O.i9=0;var x=O.GW(),W=0,v=0;O.scale(1/x,1/x);var r=fA,_=JSON.parse(bW.E5[bW.order.indexOf("GrFl")]),d=_.Grad.v;
d.Intr.v=0;if(n==null)return _;var w=n.gradientType,Z=r.YU(n.from),P=r.YU(n.to);Z.offset(-.5,-.5);P.offset(-.5,-.5);
Z=O.Pz(Z);P=O.Pz(P);var C=Math.atan2(-(P.y-Z.y),P.x-Z.x);_.Type.v.GrdT=["Lnr","Rdl","Angl"][w];_.Scl.v.val=100*aE.sl(Z,P);
if(w==0){_.Angl.v.val=180/Math.PI*C;_.Scl.v.val=100*aE.sl(Z,P);W=(Z.x+P.x)/2;v=(Z.y+P.y)/2}if(w==1){_.Scl.v.val=200*aE.sl(Z,P);
W=Z.x;v=Z.y}if(w==2){_.Angl.v.val=180/Math.PI*(C-Math.PI/2)}var L=_.Ofst.v;L.Hrzn.v.val=W*100;L.Vrtc.v.val=v*100;
var H=[];for(var e=0;e<n.stops.length;e++){var y=n.stops[e],g=y.color;H.push([y.position,g?[g.red,g.green,g.blue]:[0,0,0],g.alpha])}q.W.ne(H,d);
return _};fA.gP=function(n,F){var O=fA,I=1,x=n.contextSettings;if(x!=null){F.Md.v.BlnM=O.nO[x.blendMode];
I*=x.opacity}else F.Md.v.BlnM=O.nO[0];F.enab.v=n.isEnabled;if(F.uglg!=null)F.uglg.v=!1;if(n.color!=null)I*=n.color.alpha;
F.Opct.v.val=Math.round(I*100)};fA.kk=function(n){return q.W.Vm(n?{Q:n.red*255,l:n.green*255,O:n.blue*255}:{Q:0,l:0,O:0})};
fA.zo=function(n,F,O){var I=fA,x=[{type:6},{type:8,all:0}];for(var r=0;r<n.length;r++){var _=n[r],d=_.booleanOperation,w=0,Z=_._class,H=!1;
if(Z=="group"||Z=="text"||Z=="symbolInstance"||Z=="slice"){console.log(Z+" inside ShapeGroup");continue}if(d==-1)w=0;
else if(d==0)w=1;else if(d==1)w=2;else if(d==2)w=3;else if(d==3)w=0;if(r==0)w=1;var P=fA.sG(_.frame),C=I.Js(_,F),W=_.path?_.path:_,v=[{type:0,length:0,Xu:w,sa:2,g9:0,Qy:0}],L=W.points;
for(var e=0;e<L.length;e++){var y=L[e],g=I.YU(y.curveTo),Q=I.YU(y.point),J=I.YU(y.curveFrom);H=H||y.hasCurveFrom&&!J.Qq(Q)||y.hasCurveTo&&!g.Qq(Q)}var A=[];
if(!H){var p=[],E=L.length;if(E==0)continue;for(var e=0;e<E;e++){A[e]=L[e].cornerRadius;var y=I.YU(L[e].point);
p.push(y.x,y.y)}C.scale(1/P.d,1/P.v);C.uZ();q.z.m(p,C,p);var U=q.Y.Ca(p,A);v=v.concat(U);v[0].length=v.length-1}else{var j=L.length;
v[0].length=j;for(var e=0;e<j;e++){var y=L[e],b=y.curveMode,s=I.YU(y.point);v[1+e]={type:b==2||b==4?1:2,pt:y.hasCurveTo?I.YU(y.curveTo):s.clone(),I:s,Cz:y.hasCurveFrom?I.YU(y.curveFrom):s.clone()}}C.scale(1/P.d,1/P.v);
C.uZ();q.Y.gS(v,C);var A=[];for(var e=0;e<j;e++){var y=L[e],b=y.curveMode,G=y.cornerRadius;if(b==1&&G!=0)A.push(G);
else A.push(0)}}if(!W.isClosed)for(var e=0;e<v.length;e++)v[e].type+=3;x=x.concat(v);var T=q.oK.CZ(),z=I.j2(_);
if(C.O==0&&C.Pr==0){var m=C.hb,$=C.i9,o=m+C.R,h=$+C.oQ,X=[m,$,o,h];if(z=="rectangle"&&A.length==4)T=q.oK.RW(2,X,A);
if(z=="oval")T=q.oK.RW(5,X)}O.push(T)}return x};fA.Js=function(n,F){var O=F.clone(),I=n.frame?fA.sG(n.frame):null;
if(I)O.translate(-I.x-I.d/2,-I.y-I.v/2);if(n.isFlippedHorizontal)O.scale(-1,1);if(n.isFlippedVertical)O.scale(1,-1);
O.rotate(-n.rotation*(Math.PI/180));if(I)O.translate(I.d/2,I.v/2);return O};fA.YU=function(n){n=n.slice(1,n.length-1).split(",");
return new aE(parseFloat(n[0]),parseFloat(n[1]))};fA.sG=function(n){return new gv(n.x,n.y,n.width,n.height)};
fA.ji=function(n){return{_class:"rect",constrainProportions:!1,x:n.x,y:n.y,width:n.d,height:n.v}};function dg(){}dg.Hy=function(n,F){var O=Date.now(),I=dg,x=UZIP.parse(n),r=JSON.parse(Y.l5(x.manifest)),_=JSON.parse(Y.l5(x["resources/graphics/graphicContent.agc"])).resources,d=[],w=r.children;
for(var e=0;e<w.length;e++){var Z=w[e];if(Z.name=="artwork"){var P=Z.children;for(var C=0;C<P.length;
C++)if(P[C]["uxdesign#bounds"]){var W=P[C],v=JSON.parse(Y.l5(x["artwork/"+W.path+"/graphics/graphicContent.agc"]));
if(v.children.length!=1)throw"e";W._node=v.children[0];d.push(W)}}}var L=[],H=new gv;for(var e=0;e<d.length;
e++){var W=d[e],y=fA.sG(W["uxdesign#bounds"]);L.push(y);H=H.Tq(y)}var g=fA.FS(H,8192*8192);F.u4=!0;F.d=Math.round(H.d/g);
F.v=Math.round(H.v/g);F.buffer=q.f(F.d*F.v*4);F.bJ(d.length);var Q=new cD(g,0,0,g,H.x,H.y);F.pF={};for(var e=0;
e<d.length;e++){var W=d[e],y=fA.sG(W["uxdesign#bounds"]),J=W._node,A=Q.clone(),p=y.clone(),U=A.GW();
A.translate(-y.x,-y.y);p.x=-Math.floor(A.hb/U);p.y=-Math.floor(A.i9/U);p.d=Math.floor(p.d/U);p.v=Math.floor(p.v/U);
A.translate(y.x,y.y);dg.cY(J,F,A,_,x,p);var j=F.t[F.t.length-1];j.V9(W.name);j.Hp(p);if(e!=d.length-1)j.add.lsct=ho.OC}delete F.pF};
dg.$$=function(n){if(n==null)return new cD;return new cD(n.a,n.b,n.c,n.d,n.tx,n.ty)};dg.cY=function(n,F,O,I,x,r){var _=dg,d=n.type,w=n[d],Z=n.style,P=_.$$(n.transform),L,H="none",y,g="none",Q,J;
P.uZ();var C=O.clone();C.concat(P);var W=F.Kv(),v=n.name;W.V9(v?v.slice(0,250):"Layer");if(n.visible!=null)W.tt(n.visible);
if(Z){L=Z.stroke;H=L?L.type:"none";y=Z.fill;g=y?y.type:"none";Q=Z.filters;J=Z.clipPath;if(J&&I.clipPaths[J.ref])J=I.clipPaths[J.ref].children;
else J=null;if(Z.opacity)W.opacity=Math.round(255*Z.opacity);if(g=="solid"&&y.color.alpha)W.opacity=Math.round(W.opacity*y.color.alpha);
if(Q){W.add.lmfx=_.anO(Q);for(var e=0;e<Q.length;e++)if(Q[e].type=="uxdesign#blur"){var A=Q[e],p=A.params,U=p.brightnessAmount;
if(U==null)U=0;U=Math.abs(U/100);if((A.visible==null||A.visible==!0)&&p.backgroundEffect)W.opacity=Math.round(W.opacity*(U+(1-U)*p.fillOpacity))}}if(g=="pattern"&&y.pattern.meta.ux.uid=="")g="none"}if(J==null&&n.meta&&n.meta.ux&&n.meta.ux.clipPathResources)J=n.meta.ux.clipPathResources.children;
if(d=="artboard"||d=="group"){if(J){var j=J[0],b=j.shape,s=b!=null&&b.type=="rect"&&b.width*b.height>1e6;
if(j.type!="text"&&!s){if(b){var P=_.$$(j.transform);P.uZ();var G=C.clone();G.concat(P);W.add.vmsk=new K.X9;
W.add.vmsk.b=_.zo(b);G=G.clone();G.uZ();q.Y.gS(W.add.vmsk.b,G);W.o3(F)}}else if(!s)alert("Clipping by text has been ignored")}W.add.lsct=ho.x7;
W.mf="pass";W.Cq=24;if(n.visible!=null)W.tt(n.visible);F.t.push(F.VF());var T=w.children,z=y;if(z)z=z.color;
if(z)z=z.value;if(y){if(d=="artboard"&&g=="solid"){W.Hp(new gv(0,0,10,10));W.add.artb.Clr={t:"Objc",v:q.W.Vm({Q:z.r,l:z.g,O:z.b})};
W.add.artb.artboardBackgroundType={t:"long",v:4}}else{var m=F.Kv();m.V9("BACKGROUND");m.Cq|=16;m.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));
m.add.vmsk=new K.X9;m.add.vmsk.b=_.zo({type:"rect",x:r.x,y:r.y,width:r.d,height:r.v});_.v9(y,g,C,r,r,m,F,I,x);
m.o3(F);F.t.push(m)}}for(var e=0;e<T.length;e++){dg.cY(T[e],F,C,I,x,r)}}else if(d=="shape"&&n.shape.type=="rect"&&(n.shape.r==null||n.shape.r==0)&&g=="pattern"&&Math.abs(n.shape.width/n.shape.height-y.pattern.width/y.pattern.height)<.01){var $=y.pattern,o=$.meta.ux,h=o.uid,X=x["resources/"+h];
if(X==null){console.log($);return}var D=F._C(X,W.getName(),0,0);D.Cq=W.Cq;D.opacity=W.opacity;W=D;var f=q.z.om(new gv(0,0,$.width,$.height)).H,R=new cD;
R.scale($.width/n.shape.width,$.height/n.shape.height);if(o.offsetX)R.translate(-o.offsetX*$.width,0);
if(o.offsetY)R.translate(0,-o.offsetY*$.height);C.concat(R);C.uZ();q.z.m(f,C,f);W.add.SoLd.Trnf=c.V.uB(f);
W.add.SoLd.nonAffineTransform=c.V.uB(f);W.aY(F,!1)}else if(d=="shape"){W.Cq|=16;W.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));
W.add.vmsk=new K.X9;W.add.vmsk.b=_.zo(w);var i=q.Y.if(W.add.vmsk.b,null),G=C.clone();G.uZ();q.Y.gS(W.add.vmsk.b,G);
var t=q.Y.if(W.add.vmsk.b,null);if(H=="none"){}else{var N=L.color.value,M,hK;M="SoFi";var bD=JSON.parse(bW.E5[bW.order.indexOf("SoFi")]);
hK={t:"Objc",v:bD};hK.v.Clr.v=q.W.Vm({Q:N.r,l:N.g,O:N.b});var co=L.align,iM=L.cap;if(co==null)co="center";
var hs=W.add.vstk;hs.strokeEnabled.v=!0;hs.strokeStyleLineWidth.v.val=L.width;if(co)hs.strokeStyleLineAlignment.v.strokeStyleLineAlignment=bW.uS.RD[["inside","center","outside"].indexOf(co)];
if(iM)hs.strokeStyleLineCapType.v.strokeStyleLineCapType=bW.uS.wq[["butt","round","square"].indexOf(iM)];
var S=["SoFi","GrFl","patternFill"].indexOf(M),a=[bW.ez,bW.KK,bW.dC][S];hs.strokeStyleContent.v={classID:bW.uS.Ul[0]};
var bV=hs.strokeStyleContent.v={classID:bW.uS.Ul[S]};for(var e=0;e<a.length;e++)bV[a[e]]=hK.v[a[e]]}if(Q)for(var e=0;
e<Q.length;e++)if(Q[e].type=="uxdesign#blur"&&Q[e].visible){var a5=Q[e];W.add.vmsk.RI=a5.params.blurAmount}_.v9(y,g,C,i,t,W,F,I,x);
W.o3(F)}else if(d=="text"&&n.text){var i9=n.text,dG=i9.frame,ap=Z.font,bk=Z.textAttributes,P=C.clone(),dT=0;
P.uZ();W.add.lnsr="rend";W.add.TySh=bt.Cc(0,0);W.add.TySh.Qa=new gv(0,0,100,100);W.add.TySh.m=P;var c2=W.add.TySh.Vb,gg=i9.rawText.replace(/\r/g,"\n").replace(/\u000b/g,"\n");
bt.bw(c2,0,gg);if(gg!=""){var bH=bt.gU(c2,0,1),gw=ap.postscriptName;if(gw==null)gw=ap.family;bt.Zu(bH,gw);
bH.Bw.FontSize=Math.round(ap.size);if(y){var N=y.color.value;bH.Bw.FillColor={Type:1,Values:[1,N.r/255,N.g/255,N.b/255]}}if(bk){if(bk.paragraphAlign)bH.jp.Justification=["left","right","center"].indexOf(bk.paragraphAlign);
if(bk.letterSpacing)bH.Bw.Tracking=Math.round(bk.letterSpacing);if(bk.lineHeight){bH.Bw.AutoLeading=!1;
bH.Bw.Leading=Math.round(bk.lineHeight)}}bt.F$(c2,0,gg.length,bH)}var gP=n.meta.ux.rangedStyles;if(gP)for(var e=0;
e<gP.length;e++){var w=gP[e],fU=Math.min(w.length,gg.length-dT),bH=bt.gU(c2,dT,dT+fU),gw=w.postscriptName;
if(gw==null)gw=w.family;if(gw!=null)bt.Zu(bH,gw);var dV=w.textScript,ac=w.underline,e2=w.fontSize,A=w.fill,cX=w.textTransform;
if(dV&&dV!="none")bH.Bw.FontBaseline=dV=="superscript"?1:2;if(ac!=null)bH.Bw.Underline=ac;if(e2!=null)bH.Bw.FontSize=Math.round(e2);
if(cX!=null)bH.Bw.FontCaps=cX=="uppercase"?2:0;if(A!=null){var eR=A.value;bH.Bw.FillColor={Type:1,Values:[1,(eR>>>16&255)/255,(eR>>>8&255)/255,(eR>>>0&255)/255]}}bt.F$(c2,dT,dT+fU,bH);
dT+=fU}if(dG.type=="area"||dG.type=="autoHeight"){var gR=dG.width,bN=dG.height;bt.li(c2,1);bt.Ar(c2,[0,0,gR,bN!=null?bN:gR*2])}}else console.log(d,n);
F.t.push(W)};dg.zo=function(n){var F=n.type,O=[{type:6},{type:8,all:0}];if(F=="rect"){var I=n.r,x=n.x,r=n.y,_=n.width,d=n.height;
if(I==null)O=q.Y.jP.Rect(x,r,_,d,0);else O=O.concat([{type:0,Xu:1,length:8,g9:0,Qy:0,sa:1}]).concat(q.Y.Ca([x,r,x+_,r,x+_,r+d,x,r+d],I,!1))}else if(F=="circle"){var I=n.r;
O=q.Y.jP.BT(n.cx-I,n.cy-I,2*I,2*I)}else if(F=="ellipse"){var w=n.rx,Z=n.ry;O=q.Y.jP.BT(n.cx-w,n.cy-Z,2*w,2*Z)}else if(F=="path"||F=="compound"){var P=Typr.U.SVGToPath(n.path);
O=q.z.rD({s:P.cmds,H:P.crds},!1)}else if(F=="line"){var C=n.x1,W=n.x2,v=n.y1,L=n.y2;O=O.concat([{type:0,Xu:1,length:2,g9:0,Qy:0,sa:1}]).concat(q.Y.Ca([C,v,W,L],0,!0))}else if(F=="polygon"){var H=n.points,y=[];
for(var e=0;e<H.length;e++)y.push(H[e].x,H[e].y);O=O.concat(q.Y.jP.nQ(y,0,!1).slice(2))}else console.log(F,n);
return O};dg.anO=function(n){var F=JSON.parse(bW.default);for(var e=0;e<bW.order.length;e++)F[bW.jV[e]]={t:"VlLs",v:[]};
for(var e=0;e<n.length;e++){var O=n[e],I=O.type,x=O.params,r=O.visible;if(I=="dropShadow"){var _=bW.jV[bW.order.indexOf("DrSh")],d=JSON.parse(bW.E5[bW.order.indexOf("DrSh")]);
F[_].v.unshift({t:"Objc",v:d});var w=x.dropShadows;if(w.length!=1)throw"e";var Z=w[e],P=Z.color,C=P.value,W=Z.dx,v=Z.dy;
d.Clr.v=q.W.Vm({Q:C.r,l:C.g,O:C.b});d.Opct.v.val=Math.round((P.alpha!=null?P.alpha:1)*100);d.uglg.v=!1;
d.enab.v=r!=null?r:!0;d.lagl.v.val=Math.round(180/Math.PI*Math.atan2(v,-W));d.Dstn.v.val=Math.round(Math.sqrt(W*W+v*v));
d.blur.v.val=Math.round(Z.r*2.3)}}return F};dg.v9=function(n,F,O,I,x,r,_,d,w){var Z=dg;if(F=="none"){r.add.vstk.fillEnabled.v=!1;
r.add.SoCo={classID:"null",Clr:{t:"Objc",v:q.W.Vm({Q:0,l:0,O:0})}}}else{var P,C,W;if(F=="solid"){var v=n.color.value;
P="SoCo";C=bW.ez;var L=JSON.parse(bW.E5[bW.order.indexOf("SoFi")]);W={t:"Objc",v:L};W.v.Clr.v=q.W.Vm({Q:v.r,l:v.g,O:v.b})}else if(F=="gradient"){P="GdFl";
C=bW.KK;var L=JSON.parse(bW.E5[bW.order.indexOf("GrFl")]),H=L.Grad.v,A,p,U;H.Intr.v=0;var y=n[F],g=y.ref?d.gradients[y.ref]:y.meta.ux.gradientResources,Q=["linear","radial"].indexOf(g.type),J=g.stops;
L.Type.v.GrdT=["Lnr","Rdl","Angl"][Q];if(Q==0){var A=new aE(y.x1,y.y1),p=new aE(y.x2,y.y2);A.x=p.x+.5*(A.x-p.x);
A.y=p.y+.5*(A.y-p.y)}else{var A=new aE(y.cx,y.cy),p=new aE(y.cx+y.r,y.cy)}U=x;if(y.units=="objectBoundingBox"){var j=new cD(I.d,0,0,I.v,I.x,I.y);
A=j.Pz(A);p=j.Pz(p)}var j=Z.$$(y.transform);A=j.Pz(A);p=j.Pz(p);j=O.clone();j.uZ();A=j.Pz(A);p=j.Pz(p);
q.W.aJ(A,p,U,L);var b=[];for(var e=0;e<J.length;e++){var s=J[e],G=s.color,v=G.value,T=G.alpha;if(T==null)T=1;
b.push([s.offset,[v.r/255,v.g/255,v.b/255],T])}q.W.ne(b,H);W={t:"Objc",v:L}}else if(F=="pattern"){P="PtFl";
C=bW.dC;var L=JSON.parse(bW.E5[bW.order.indexOf("patternFill")]),X,t=1,N=0,M=0,hK=1;W={t:"Objc",v:L};
var z=n[F],m=z.meta.ux,$=m.uid,o=w["resources/"+$].buffer,h=fx.TG(o);if(_.pF[$])X=_.pF[$];else{var D=new gv(0,0,z.width,z.height),f;
if(D.D2()){D=new gv(0,0,1,1);f=new ArrayBuffer(4)}else{var R=fx.rM(h);if(R.dp){var i=new fj;R.bx(o,i);
f=i.dH().buffer}else f=R.bx(o)[0].data}X={};X.id=fj.Mj()+"-d71c-11e5-b1ae-a548a96e5f9f";X.name="someImage";
X.IR=[new Uint8Array(f),D];_.CI(X);_.pF[$]=X}var D=X.IR[1];L.Algn.v=!0;L.Ptrn.v.Idnt.v=X.id;if(m.scaleBehavior=="cover"){t=hK*Math.max(x.d/D.d,x.v/D.v);
var bD=t;if(m.scale!=null)t*=m.scale;N=x.x-(D.d*t-x.d)/2;M=x.y-(D.v*t-x.v)/2;if(m.offsetX!=null)N+=m.offsetX*D.d*bD;
if(m.offsetY!=null)M+=m.offsetY*D.v*bD}else if(m.scaleBehavior=="fill"){t=hK*Math.min(x.d,x.v)/Math.max(D.d,D.v);
N=x.x-(D.d*t-x.d)/2;M=x.y-(D.v*t-x.v)/2}else throw"Unknown scale behaviour";L.Scl.v.val=100*t;L.phase.v.Hrzn.v=Math.round(N);
L.phase.v.Vrtc.v=Math.round(M)}else console.log(F);if(P!=null){r.add[P]={classID:"null"};for(var e=0;
e<C.length;e++){var co=C[e];r.add[P][co]=W.v[co]}}}};function hF(){}hF.Hy=function(n,F,O){n=new Uint8Array(n);
var I=Y.l5(n,0,n.length),x=new DOMParser,r=x.parseFromString(I,"image/svg+xml"),_=r.getElementsByTagName("style")[0],v=1;
if(_)_=Typr.U.SVG.cssMap(_.textContent);else _={};var d=r.firstChild;while(d.tagName!="svg")d=d.nextSibling;
var w=new gv(0,0,100,100),Z=d.getAttribute("viewBox"),P=d.getAttribute("width"),C=d.getAttribute("height");
if(Z){var W=hF.DY(Z);w.x=W[0];w.y=W[1];w.d=W[2];w.v=W[3]}else if(P!=null||C!=null){w.d=P!=null?parseFloat(P):parseFloat(C);
w.v=C!=null?parseFloat(C):parseFloat(P)}w=q.z.Me(w);while(O&&Math.max(w.d*v,w.v*v)<Math.max(O[0],O[1]))v++;
while(O==null&&Math.max(w.d,w.v)*v>8192)v*=.5;F.u4=!0;F.d=~~(w.d*v);F.v=~~(w.v*v);F.buffer=q.f(F.d*F.v*4);
var L=new cD(v,0,0,v,-w.x*v,-w.y*v),H={fg:hF.Sd(d),ajL:_};hF.xe(r,d.children,F,L,H,new cD,0);if(F.t.length==0){var y=F.Kv();
y.V9("Layer");F.t.push(y)}};hF.DY=function(n){var F=" ";if(n.indexOf(",")!=-1)F=",";return n.split(F).map(parseFloat)};
hF.xe=function(n,F,O,I,x,r,_){var d=hF,w=["display","opacity","fill-opacity"];for(var Z=0;Z<F.length;
Z++){var P=F[Z],C=P.tagName,W=P.getAttribute("id"),v=d.Sd(P,x.ajL),H=13,A=1,j="clip-path",b=null;for(var L in x.fg)if(w.indexOf(L)==-1&&v[L]==null)v[L]=x.fg[L];
if(v["font-size"])H=d.jF(v["font-size"],H);if(P.getAttribute("dx"))I.hb+=d.jF(P.getAttribute("dx"),H);
if(P.getAttribute("dy"))I.i9+=d.jF(P.getAttribute("dy"),H);var y=d.UM(P);y.concat(I);var g=P.getAttribute("visibility"),Q=v.display,J=O.Kv();
if(g=="hidden"||Q=="none")J.tt(!1);J.V9(W!=null?W.split(":::")[0]:"Layer");if(v.opacity)A*=parseFloat(v.opacity);
if(v["fill-opacity"]){var p=parseFloat(v["fill-opacity"]);if(p!=0)A*=p}J.opacity=Math.round(255*A);if(v["mix-blend-mode"]){var U=fk.aT.indexOf(v["mix-blend-mode"]);
if(U!=-1)J.mf=fk.Dy[U]}if(P.getAttribute(j)==null)j="mask";if(P.getAttribute(j)!=null){var s=P.getAttribute(j);
s=s.slice(4,s.length-1);var G=n.getElementById(s.slice(1));if(G){var T=G.children;b=O.Kv();b.V9("Clip-Path"+(W?": "+W:""));
b.add.lsct=_<2?ho.x7:ho.OC;b.mf="pass";b.Cq=24;var z=b.add.vmsk=new K.X9;O.t.push(O.VF());var m=[];if(G.getAttribute(j)){var s=G.getAttribute(j);
s=s.slice(4,s.length-1);m=n.getElementById(s.slice(1)).children}for(var e=0;e<T.length;e++){var $=d.UM(T[e]);
$.concat(y);var o=d.zo(n,T[e],!1).slice(2);q.Y.gS(o,$);z.b=z.b.concat(o)}for(var e=0;e<m.length;e++){var $=d.UM(T[e]);
$.concat(y);var o=d.zo(n,m[e],!1).slice(2);for(var h=0;h<o.length;h++)if(o[e].Xu!=null)o[e].Xu=3;q.Y.gS(o,$);
z.b=z.b.concat(o)}b.XO();b.o3();_++}}if(C=="g"||C=="a"||C=="svg"||C=="switch"||(C=="text"||C=="textPath")&&P.children.length>0){if(C=="text")r=d.ZS(P,r);
var X=P.getAttribute("viewBox"),D=P.getAttribute("width"),f=P.getAttribute("height");if(X&&D&&f){var R=hF.DY(X),i=d.ZS(P),t=new cD;
t.translate(-R[0],-R[1]);t.scale(parseFloat(D)/R[2],parseFloat(f)/R[3]);t.translate(i.hb,i.i9);t.concat(y);
y=t}var N=P.children.length,M=x.fg;x.fg=v;var hK=C!="text"&&C!="textPath"||N>1;if(hK){var bD=J.Y9();
J.add.lsct=_<2&&bD&&(W==null||!W.endsWith(":::"))?ho.x7:ho.OC;J.mf="pass";J.Cq=24;J.tt(bD);O.t.push(O.VF())}d.xe(n,P.children,O,y,x,r,_+1);
if(hK)O.t.push(J);else{var co=O.t[O.t.length-1];co.opacity=J.opacity;co.mf=J.mf}x.fg=M}else if(C=="use"){var t=d.ZS(P);
t.concat(y);var iM=d.kf(P),hs=n.getElementById(iM.slice(1)),M=x.fg;x.fg=v;d.xe(n,[hs],O,t,x,r,_+1);x.fg=M}else if(C=="path"||C=="rect"||C=="circle"||C=="ellipse"||C=="polygon"||C=="polyline"||C=="line"){J.Cq|=16;
J.add.vmsk=new K.X9;J.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));J.add.vstk.strokeEnabled.v=!1;
var S=J.add.vstk,z=J.add.vmsk,a=v.fill,bV=a=="none"||v["fill-opacity"]&&parseFloat(v["fill-opacity"])==0;
z.b=d.zo(n,P,v["fill-rule"]=="evenodd",bV);q.Y.gS(z.b,y);var a5=q.Y.if(z.b),i9=v.stroke,dG=v["stroke-width"],ap=v["stroke-dasharray"],bk=v["stroke-linejoin"],c2=v["stroke-linecap"],gg=v["paint-order"];
if(i9==null||i9=="none"||i9=="null"){}else{var bH=d.mv(n,i9,y,a5),gw=["SoFi","GrFl","patternFill"].indexOf(bH.type),gP=bH.G.v.Opct.v,dV=1;
if(gP.val!=100){J.opacity=Math.round(J.opacity*gP.val/100);gP.val=100}var dT=[bW.ez,bW.KK,bW.dC][gw],fU=S.strokeStyleContent.v={classID:bW.uS.Ul[gw]};
for(var e=0;e<dT.length;e++)fU[dT[e]]=bH.G.v[dT[e]];dG=dG?parseFloat(dG):1;if(gg&&gg.replace(/\s\s+/g," ").slice(0,11)=="stroke fill"){dV=2;
dG/=2}S.strokeEnabled.v=!0;if(bk)S.strokeStyleLineJoinType.v.strokeStyleLineJoinType=bW.uS.join[["miter","round","bevel"].indexOf(bk)];
if(c2)S.strokeStyleLineCapType.v.strokeStyleLineCapType=bW.uS.wq[["butt","round","square"].indexOf(c2)];
S.strokeStyleLineWidth.v.val=dG*c.V.GW(y);S.strokeStyleLineAlignment.v.strokeStyleLineAlignment=bW.uS.RD[dV];
S.strokeStyleOpacity.v.val=100*(v["stroke-opacity"]?parseFloat(v["stroke-opacity"]):1);if(ap!=null&&ap!="none")S.strokeStyleLineDashSet.v=ha.Kn(ap.split(",").map(parseFloat),1/dG)}if(bV){J.add.vstk.fillEnabled.v=!1;
J.add.SoCo={classID:"null",Clr:{t:"Objc",v:q.W.Vm({Q:0,l:0,O:0})}}}else{var bH=d.mv(n,a,y,a5),ac=null,e2=null;
if(bH.type=="SoFi"){ac="SoCo";e2=bW.ez}if(bH.type=="GrFl"){ac="GdFl";e2=bW.KK}if(bH.type=="patternFill"){ac="PtFl";
e2=bW.dC}if(ac!=null){J.add[ac]={classID:"null"};for(var e=0;e<e2.length;e++){var L=e2[e];J.add[ac][L]=bH.G.v[L]}}}if(v.filter&&v.filter!="none"){var cX=v.filter;
cX=cX.slice(5,cX.length-1);if(n.getElementById(cX)){var eR=n.getElementById(cX).children[0];if(eR.tagName=="feGaussianBlur"){J.add.vmsk.RI=parseFloat(eR.getAttribute("stdDeviation"))*c.V.GW(y)}}}J.XO();
J.o3(O);O.t.push(J)}else if((C=="text"||C=="tspan")&&P.textContent!=""){r=d.ZS(P,r);var t=r.clone(),dm=0;
t.concat(y);if(P.children.length>0){var gR=d.Sd(P.children[0],x.ajL);for(var L in gR)if(w.indexOf(L)==-1)v[L]=gR[L]}var bN=v["xml:space"],eG=P.textContent;
if(bN=="preserve")eG=eG.replace(/\t/g," ").replace(/\n/g," ");if(W==null)J.V9(eG);J.add.lnsr="rend";
J.add.TySh=bt.Cc(0,0);J.add.TySh.Qa=new gv(0,0,100,100);J.add.TySh.m=t.clone();var ef=J.add.TySh.Vb;
bt.bw(ef,0,eG);var a=v.fill,fi=v["font-weight"],ep=v["font-family"],iJ=v["text-decoration"],i9=v.stroke,dG=v["stroke-width"],aT=v["dominant-baseline"];
if(aT=="text-before-edge")dm=H;else if(aT=="middle")dm=H/2;else if(aT=="hanging")dm=H;if(dm!=0)J.add.TySh.m.translate(0,dm);
var c1=bt.gU(ef,0,1);if(a&&a!="none"){var gk=CSS.kk(a);c1.Bw.FillColor={Type:1,Values:[1,gk.Q/255,gk.l/255,gk.O/255]}}if(iJ=="underline")c1.Bw.Underline=!0;
c1.Bw.FontSize=Math.round(H);bt.Zu(c1,"LiberationSans");if(fi=="bold")bt.Zu(c1,"LiberationSans-Bold");
if(ep){ep=ep.split(",")[0].trim();if(ep[0]=="\"")ep=ep.slice(1);if(ep[ep.length-1]=="\"")ep=ep.slice(0,ep.length-1);
var a8=ep+":"+(fi?fi:"normal"),bX={"'DejaVu Sans':normal":"DejaVuSans","'DejaVu Sans':bold":"DejaVuSans-Bold","'Nimbus Sans L':normal":"NimbusSanL-Reg","'Nimbus Sans L':bold":"NimbusSanL-Bol","Libre Franklin:300":"LibreFranklin-Light","Libre Franklin:400":"LibreFranklin-Regular","Libre Franklin:500":"LibreFranklin-Medium","Libre Franklin:600":"LibreFranklin-SemiBold","Libre Franklin:700":"LibreFranklin-Bold"};
if(bX[a8])bt.Zu(c1,bX[a8]);else bt.Zu(c1,ep)}if(v["text-anchor"])c1.jp.Justification=["start","end","middle"].indexOf(v["text-anchor"]);
bt.F$(ef,0,eG.length,c1);if(i9==null||i9=="none"){}else{var bL=JSON.parse(bW.E5[bW.order.indexOf("FrFX")]);
bL.Clr.v=q.W.Vm(CSS.kk(i9));bL.Sz.v.val=Math.round(parseFloat(dG)*c.V.GW(t));var c_=JSON.parse(bW.default);
for(var e=0;e<bW.order.length;e++)c_[bW.jV[e]]={t:"VlLs",v:[]};c_.frameFXMulti.v.push({t:"Objc",v:bL});
J.add.lmfx=c_}O.t.push(J)}else if(C=="image"){var iM=d.kf(P);if(iM.slice(0,4)=="data"){var eS=fx.D9(iM),c$=eS,cp=O._C(c$,J.getName(),0,0);
cp.Cq=J.Cq;J=cp;var b_=J.rect.clone();b_.x=b_.y=0;var hy=P.getAttribute("width"),gx=P.getAttribute("height");
if(hy)b_.d=parseFloat(hy);if(gx)b_.v=parseFloat(gx);var eJ=d.ZS(P);eJ.concat(y);var d4=q.z.om(b_).H;
q.z.m(d4,eJ,d4);J.add.SoLd.Trnf=c.V.uB(d4);J.add.SoLd.nonAffineTransform=c.V.uB(d4);J.aY(O,!1);O.t.push(J)}}else console.log("unknown tag: "+C,P.children.length,P.textContent.length);
if(b!=null){O.t.push(b);_--}}};hF.zo=function(n,F,O,I){var x=hF,r=[{type:6},{type:8,all:0}],_=F.tagName;
if(_=="use"){var d=x.kf(F),w=n.getElementById(d.slice(1)),Z=new cD;if(w.tagName!="rect")Z=x.ZS(w);Z.concat(x.UM(w));
r=x.zo(n,w,O,I);q.Y.gS(r,Z)}else if(_=="path"){var P=F.getAttribute("d");if(P==null)return r;var C=Typr.U.SVGToPath(P);
r=q.z.rD({H:C.crds,s:C.cmds},O,I)}else if(_=="rect"){var W=F.getAttribute("rx"),v=x.ZS(F);r=q.Y.jP.Rect(v.hb,v.i9,parseFloat(F.getAttribute("width")),parseFloat(F.getAttribute("height")),W?parseFloat(W):0)}else if(_=="circle"||_=="ellipse"){var L=[0,0,0,0],H=["cx","cy","rx","ry","r"];
for(var e=0;e<5;e++){var y=F.getAttribute(H[e]);if(y){y=parseFloat(y);if(e<4)L[e]=y;else L[2]=L[3]=y}}r=q.Y.jP.BT(L[0]-L[2],L[1]-L[3],2*L[2],2*L[3])}else if(_=="polygon"||_=="polyline"||_=="line"){var g;
if(_=="line")g=[F.getAttribute("x1"),F.getAttribute("y1"),F.getAttribute("x2"),F.getAttribute("y2")].map(parseFloat);
else g=F.getAttribute("points").trim().replace(/\s\s+/g," ").split(",").join(" ").split(" ").map(parseFloat);
r=q.Y.jP.nQ(g,0,_!="polygon")}return r};hF.jF=function(n,F){if(n.charAt(n.length-1)=="m")return F*parseFloat(n.slice(0,n.length-2));
else return parseFloat(n)};hF.mv=function(n,F,O,I){var x,r,_=hF,d=JSON.parse(bW.E5[bW.order.indexOf("SoFi")]),w=F!=null?F.indexOf("("):-1;
if(w!=-1){var Z=F.indexOf(")"),P=F.slice(0,w).trim(),C=F.slice(w+1,Z).trim();if(C.charAt(0)=="'")C=C.slice(1,C.length-1);
if(P=="url"){if(C.charAt(0)=="#"){var W=n.getElementById(C.slice(1));if(W&&W.tagName.toLowerCase().endsWith("gradient")){var v=_.ao(n,W,O,I);
x="GrFl";r={t:"Objc",v:v}}else{x="SoFi";r={t:"Objc",v:d}}}else console.log("unknown url",C)}else if(P=="rgb"||P=="rgba"){x="SoFi";
r={t:"Objc",v:d};r.v.Clr.v=q.W.Vm(CSS.kk(F));if(P=="rgba")r.v.Opct.v.val=Math.round(100*parseFloat(F.split(",").pop()))}else console.log("unknown fill",F)}else{x="SoFi";
r={t:"Objc",v:d};r.v.Clr.v=q.W.Vm(CSS.kk(F))}return{type:x,G:r}};hF.UM=function(n){var F=new cD,O=n.getAttribute("transform");
if(O)F=hF.Xh(O);var I=n.getAttribute("style");if(I!=null){var x={};hF.nr(x,I,["transform"]);I=x.transform;
if(I)F.concat(hF.Xh(I))}return F};hF.ZS=function(n,F){var O=new cD,I=n.getAttribute("x"),x=n.getAttribute("y");
if(I)O.hb=parseFloat(I);else if(F)O.hb=F.hb;if(x)O.i9=parseFloat(x);else if(F)O.i9=F.i9;return O};hF.Xh=function(n){var F=Typr.U.SVG.readTrnf(n);
return new cD(F[0],F[1],F[2],F[3],F[4],F[5])};hF.Sd=function(n,F){var O={},I="fill-rule fill stroke stroke-width stroke-dasharray stroke-opacity stroke-linejoin stroke-linecap font-size font-weight font-family text-decoration text-anchor dominant-baseline stop-color stop-opacity filter display opacity fill-opacity paint-order mix-blend-mode xml:space".split(" ");
for(var e=0;e<I.length;e++){var x=n.getAttribute(I[e]);if(x!=null&&x!="inherit")O[I[e]]=x}var r=n.getAttribute("class");
if(F!=null&&r!=null&&F["."+r]!=null)hF.nr(O,F["."+r],I);var _=n.getAttribute("id");if(F!=null&&_!=null&&F["#"+_]!=null)hF.nr(O,F["#"+_],I);
var d=n.getAttribute("style");if(d!=null)hF.nr(O,d,I);return O};hF.nr=function(n,F,O){F=F.trim().split(";");
for(var e=0;e<F.length;e++){var I=F[e].split(":"),x=I[0]?I[0].trim():"",r=I[1]?I[1].trim():"";for(var _=0;
_<O.length;_++)if(x==O[_]&&r!="inherit")n[O[_]]=r}};hF.kf=function(n){var F=n.getAttribute("xlink:href");
if(F==null)F=n.getAttribute("href");return F};hF.ao=function(n,F,O,I){var x=hF,r=new cD,_=F.getAttribute("gradientTransform");
if(_)r=x.Xh(_);r.concat(O);var d=JSON.parse(bW.E5[bW.order.indexOf("GrFl")]),w=d.Grad.v;w.Intr.v=0;var Z=F.tagName,P=new aE(0,0),C=new aE(I.d,0);
if(Z=="linearGradient"){d.Type.v.GrdT="Lnr";if(F.getAttribute("x1"))P.x=parseFloat(F.getAttribute("x1"));
if(F.getAttribute("y1"))P.y=parseFloat(F.getAttribute("y1"));if(F.getAttribute("x2"))C.x=parseFloat(F.getAttribute("x2"));
if(F.getAttribute("y2"))C.y=parseFloat(F.getAttribute("y2"));P.x=C.x+.5*(P.x-C.x);P.y=C.y+.5*(P.y-C.y)}if(Z=="radialGradient"){d.Type.v.GrdT="Rdl";
if(F.getAttribute("cx"))P.x=parseFloat(F.getAttribute("cx"));if(F.getAttribute("cy"))P.y=parseFloat(F.getAttribute("cy"));
C.mT(P.x,P.y);if(F.getAttribute("r"))C.x+=parseFloat(F.getAttribute("r"))}if(F.getAttribute("gradientUnits")=="userSpaceOnUse"){P=r.Pz(P);
C=r.Pz(C)}else{P.x=I.x+P.x*I.d;P.y=I.y+P.y*I.v;C.x=I.x+C.x*I.d;C.y=I.y+C.y*I.v}q.W.aJ(P,C,I,d);var W=F.children;
if(W.length==0){var v=x.kf(F);if(v==null)throw"gradient has no stops";var L=n.getElementById(v.slice(1));
if(L==null){console.log(v.slice(1));throw"e"}var H=x.ao(n,L,r,I);d.Grad=H.Grad}else{var y=[];for(var e=0;
e<W.length;e++){var g=W[e],Q=x.Sd(g),J=Q["stop-color"],A=Q["stop-opacity"],p=g.getAttribute("offset");
if(J==null)J="#000000";if(A==null)A="1";var U=p?parseFloat(p):0;J=CSS.kk(J);y.push([U,[J.Q/255,J.l/255,J.O/255],parseFloat(A)])}q.W.ne(y,w)}return d};
hF.WH=function(n,F,O){var I=[],x=hF;x.MR=F.aaL?"\t":"";var r=F.a54,_=F.a8W;I.push("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 "+n.d+" "+n.v+"\" width=\""+r+"\" height=\""+_+"\">");
var d={h9:[],Nv:[],eA:0,tK:0,z7:0,d9:{},RU:{},CS:0,Lx:{},Q$:{},QM:0,sH:[]};hF.DP(n,d,n.root.children,1,F,O);
if(d.h9.length!=0){I.push(x.yk(1)+"<defs>");I=I.concat(d.h9);I.push(x.yk(1)+"</defs>")}I.push(x.yk(1)+"<style>");
I.push(x.yk(2)+"tspan { white-space:pre }");for(var w in d.Lx)I.push(x.yk(2)+"."+w+" { "+d.Lx[w]+" } ");
I.push(x.yk(1)+"</style>");I=I.concat(d.Nv);I.push("</svg>");I=I.join(F.aaL?"\n":"");var Z=q.f(Math.round(I.length*1.5)),P=Y.ng(I,Z,0);
if(x.B$){console.log(x.B$);var C="SVGParser.gen.db = [\n";for(var e=0;e<x.B$.length;e++){var W=x.B$[e];
C+="{\n\tnam: \""+W.Bz+"\",\n\tpts: [\n";for(var v=0;v<W.AZ.length;v++){var L=W.AZ[v];C+="\t\t[\""+L[0]+"\", { cmds: "+JSON.stringify(L[1].s)+", crds:"+JSON.stringify(L[1].H)+" } ]"+(v==W.AZ.length-1?"":",")+"\n"}C+="\t]\n}"+(e==x.B$.length-1?"":",")+"\n"}C+="]\n";
console.log(C)}return Z.buffer.slice(0,P)};hF.MR="";hF.yk=function(E){var n="";for(var e=0;e<E;e++)n+=hF.MR;
return n};hF.HF=function(E){return""+parseFloat(E.toFixed(3))};hF.DP=function(n,F,O,I,x,r){var _=hF;
for(var d=0;d<O.length;d++){var w=O[d].$,Z=w.add.lsct,P=w.add.vmsk,C=w.add.vstk,W=w.add.TySh;if(P&&!P.isEnabled)P=C=null;
var v=[];if(!x.hidden&&!w.Y9())continue;var L=w.opacity/255,H=w.add.iOpa?w.add.iOpa/255:1;if(L!=1)v.push("opacity: "+_.HF(L));
if(H!=1)v.push("fill-opacity: "+_.HF(H));if(w.mf!="norm"){var y=fk.aT[fk.Dy.indexOf(w.mf)];if(y!=null)v.push("mix-blend-mode: "+y)}if(!w.Y9())v.push("display: none");
var g=[],Q=[],J=w.getName(),A=J.indexOf(" .");if(A!=-1){Q.push(J.slice(A+2));J=J.slice(0,A)}if(x.names)g.push("id=\""+_.G4(J)+"\"");
var p=w.add.lmfx;if(p)p=p.solidFillMulti.v[0];if(p)p=p.v;if(p&&!p.enab.v)p=null;if(w.Ja()){var U=O[d].children;
if(!(U.length==1&&U[0].$.add.SoLd&&!x.N0)){if(_.B$&&w.getName().split("-").length==3){_.B$.push({Bz:w.getName(),GM:0,AZ:[]})}hF.RS(w,P,F,g);
if(v.length!=0)g.push("style=\""+v.join(";")+"\"");F.Nv.push(_.yk(I)+"<g "+_.wk(g,Q)+">");_.DP(n,F,U,I+1,x,r);
F.Nv.push(_.yk(I)+"</g>")}}else if(w.zX()&&P==null){var j=new gv(0,0,n.d,n.v);_.RJ(v,w.add,F,j);if(v.length!=0)g.push("style=\""+v.join(";")+"\"");
F.Nv.push(_.yk(I)+"<rect width=\""+n.d+"\" height=\""+n.v+"\" "+_.wk(g,Q)+" />")}else if(P&&w.add.SoLd==null){var j=q.Y.if(P.b,null,!0),b=q.Y.Y_(P.b);
if(b.JI!=0){g.push("fill-rule=\"evenodd\"")}var s=b.agy;_.RJ(v,w.add,F,j);if(v.length!=0){var G=v.join(";"),T=F.Q$[G];
if(T==null){T="shp"+F.QM;F.QM++;F.Q$[G]=T;F.Lx[T]=G}Q.push(T)}F.Nv.push(_.yk(I)+"<path "+_.wk(g,Q)+" d=\""+s+"\" />");
if(_.B$&&_.B$[_.B$.length-1]){var z=q.z.qg(P.b);z.H=z.H.map(Math.round);var m=_.B$[_.B$.length-1];m.GM+=JSON.stringify(z).length;
m.AZ.push([v[0].split("#").pop(),z])}}else if(W&&x.alq){var $=W.Vb,o=new h2($,r);if(p)g.push("fill=\""+CSS.q7(p.Clr.v)+"\"");
var h=cJ.qA(o,W),X=q.z.Uh(h);for(var D in X){if(p==null)g.push("fill=\""+D+"\"");var f=X[D],s=Typr.U.pathToSVG({crds:f.H,cmds:f.s},2);
F.Nv.push(_.yk(I)+"<path "+_.wk(g,Q)+" d=\""+s+"\" />");if(p==null)g.pop()}}else if(W&&!x.afD){var $=W.Vb,R=W.m.clone(),a=0,bV=0;
if(bt.oB($)==1){var i=bt.gU($,0,0).jp.Justification,N=0,M=bt.Kp($)[2];if(i==2)N=M/2;if(i==1)N=M;R.translate(N,0)}v.push("transform: "+_.YA(R));
var hK=bt.fQ($),bD=$.EngineDict.ParagraphRun,co=bD.RunArray,iM=bD.RunLengthArray;if(v.length!=0)g.push("style=\""+v.join(";")+"\"");
F.Nv.push(_.yk(I)+"<text "+_.wk(g,Q)+" >");var hs=w.add.lmfx;if(hs)hs=hs.frameFXMulti.v[0];if(hs)hs=hs.v;
var S=p?CSS.q7(p.Clr.v):null;for(var e=0;e<co.length;e++){var a5=[],i9=iM[e],dG=hK.slice(a,a+i9-1),ap=bt.gU($,a,a),bk=ap.D0[ap.Bw.Font].Name;
if(F.sH.indexOf(bk)==-1)F.sH.push(bk);CSS.Ps(a5,ap,W.m,!0,!0,S);if(hs){v.push("stroke: "+CSS.q7(hs.Clr.v));
v.push("stroke-width: "+hs.Sz.v.val)}var c2=ap.Bw.FontSize*1.12;if(e==0)c2=bt.oB($)==0?0:ap.Bw.FontSize;
bV+=c2;if(dG!=""){var G=a5.join(";"),T=F.Q$[G],bH="";if(T==null){T="txt"+F.QM;F.QM++;F.Q$[G]=T;F.Lx[T]=G}var gg=ap.Bw.Tracking;
if(gg!=null&&gg!=0){gg=Math.round(gg*ap.Bw.FontSize/1e3);bH=" dx=\"0";for(var gw=1;gw<dG.length;gw++)bH+=" "+gg;
bH+="\" "}F.Nv.push(_.yk(I+1)+"<tspan x=\"0\" y=\""+_.HF(bV)+"\" class=\""+T+"\""+bH+">"+_.G4(dG)+"</tspan>")}a+=i9}F.Nv.push(_.yk(I)+"</text>")}else if(w.add.SoLd&&x.N0){var gP=w.add.SoLd,dT=gP.Idnt.v,fU=0,dV=gP.Crop?gP.Crop.v:null;
if(F.RU[dT]!=null)fU=F.RU[dT];else{F.CS++;fU=F.CS;F.RU[dT]=F.CS;var ac=n.lk(dT,dV),eR="";if(ac==null)return;
var e2=ac.yO,cX=fx.TG(ac.raw.buffer);if(cX=="pdf"){var gR=new fj("h");fx.rM("PDF").bx(ac.raw.buffer,gR);
gR.lq();gR.tQ();gR.D();gR.nu();if(gP.Crop&&gP.Crop.v==1){c.jz.Ut(gR,gR.root.nJ(gR,!0))}var bN=fx.rM("SVG").eJ(gR,gR.d,gR.v,null,{sH:r});
eR="data:image/svg+xml;base64,"+fx.Mw(bN)}else if(cX=="jpg"||cX=="png"||cX=="gif"||cX=="svg"){var eG={jpg:"image/jpg",png:"image/png",jpg:"image/jpg",svg:"image/svg+xml"};
eR="data:"+eG[cX]+";base64,"+fx.Mw(ac.raw.buffer)}else{eR=fx.mY(e2[0].buffer,e2[1].d,e2[1].v)}F.h9.push(_.yk(2)+"<image width=\""+e2[1].d+"\" height=\""+e2[1].v+"\" id=\"img"+fU+"\" href=\""+eR+"\"/>")}var ef=q.J.$I(gP),fi=[];
hF.RS(w,P,F,fi);if(fi.length!=0)F.Nv.push(_.yk(I)+"<g "+_.wk(fi,Q)+">");if(v.length!=0)g.push("style=\""+v.join(";")+"\"");
var ep=_.wk(g,Q);F.Nv.push(_.yk(I)+"<use "+ep+" href=\"#img"+fU+"\" transform=\""+_.YA(ef)+"\"/>");if(fi.length!=0)F.Nv.push(_.yk(I)+"</g>")}else if(!w.rect.D2()&&(x.N0||W)){if(v.length!=0)g.push("style=\""+v.join(";")+"\"");
var ep=_.wk(g,Q),iJ=w.buffer;if(p)iJ=ha.bI(iJ,p,w.rect);var aT=w.rect;F.CS++;var eR=fx.mY(iJ.buffer,aT.d,aT.v,"png",null,!0);
F.h9.push(_.yk(2)+"<image width=\""+w.rect.d+"\" height=\""+w.rect.v+"\" id=\"img"+F.CS+"\" href=\""+eR+"\"/>");
F.Nv.push(_.yk(I)+"<use "+ep+" href=\"#img"+F.CS+"\" x=\""+aT.x+"\" y=\""+aT.y+"\" />")}}};hF.wk=function(n,F){if(F.length!=0)n.push("class=\""+F.join(" ")+"\"");
return n.join(" ")};hF.G4=function(n){return String(n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u0022/g,"&quot;")};
hF.YA=function(n){var F=[n.R,n.O,n.Pr,n.oQ,n.hb,n.i9].map(hF.HF);return"matrix("+F.join(",")+")"};hF.RS=function(n,F,O,I){var x=hF;
if(F||n.add.artb){var r;if(F)r=q.Y.Y_(F.b).agy;else{var _=n.Fn(),d=q.z.om(_);r=Typr.U.pathToSVG({crds:d.H,cmds:d.s},2)}O.z7++;
I.push("clip-path=\"url(#cp"+O.z7+")\"");O.h9.push(x.yk(2)+"<clipPath clipPathUnits=\"userSpaceOnUse\" id=\"cp"+O.z7+"\">");
O.h9.push(x.yk(3)+"<path d=\""+r+"\" />");O.h9.push(x.yk(2)+"</clipPath>")}};hF.RJ=function(n,F,O,I){var x=hF,r=F.vstk,_=F.vmsk,d=F.lmfx;
if(_&&_.RI!=0){var w=x.HF(_.RI);if(O.d9[w]==null){O.tK++;O.d9[w]=O.tK;O.h9.push(x.yk(2)+"<filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"flt"+O.tK+"\"> <feGaussianBlur stdDeviation=\""+w+"\" /> </filter>")}n.push("filter: url(#flt"+O.d9[w]+")")}var Z=ha.OA(d,F),P=Z[0],C=Z[1];
if(r&&!r.fillEnabled.v)n.push("fill: none");else if(P){var W=CSS.q7(P.Clr.v);n.push("fill: "+W)}else if(C){x.pn(C,O,I);
n.push("fill: url(#grd"+O.eA+")")}if(r==null||!r.strokeEnabled.v)r=ha.Lv(d);if(r&&r.strokeEnabled.v){var v=r.strokeStyleContent.v,L=v.classID;
if(L=="solidColorLayer")n.push("stroke: "+CSS.q7(v.Clr.v));else{x.pn(v,O,I);n.push("stroke: url(#grd"+O.eA+")")}var H=bW.uS.wq.indexOf(r.strokeStyleLineCapType.v.strokeStyleLineCapType),y=bW.uS.join.indexOf(r.strokeStyleLineJoinType.v.strokeStyleLineJoinType),g=r.strokeStyleOpacity.v.val/100,Q=r.strokeStyleLineWidth.v.val,J=bW.uS.RD.indexOf(r.strokeStyleLineAlignment.v.strokeStyleLineAlignment);
if(J==2){Q*=2;n.push("paint-order:stroke fill markers")}var A=r.strokeStyleLineDashSet.v,p=[];for(var e=0;
e<A.length;e++)p.push(Math.round(A[e].v.val*Q));if(H!=0)n.push("stroke-linecap:"+["butt","round","square"][H]);
if(y!=0)n.push("stroke-linejoin:"+["miter","round","bevel"][y]);if(g!=1)n.push("stroke-opacity:"+x.HF(g));
if(Q!=1)n.push("stroke-width: "+x.HF(Q));if(p.length!=0)n.push("stroke-dasharray: "+p.join(","))}};hF.pn=function(n,F,O){F.eA++;
var I=hF,x=n.Grad.v,r=JSON.parse(JSON.stringify(x.Clrs.v)),_=JSON.parse(JSON.stringify(x.Trns.v)),d=n.Ofst.v,w=n.Type.v.GrdT,Z=w=="Rdl"?1:0,P=(Z==1?"radial":"linear")+"Gradient",C=q.W.VL(n,O);
if(Z==0){C[0].x=C[1].x+2*(C[0].x-C[1].x);C[0].y=C[1].y+2*(C[0].y-C[1].y)}var W=I.yk(2)+"<"+P+" id=\"grd"+F.eA+"\" gradientUnits=\"userSpaceOnUse\" ";
if(Z==0)F.h9.push(W+" x1=\""+I.HF(C[0].x)+"\" y1=\""+I.HF(C[0].y)+"\" x2=\""+I.HF(C[1].x)+"\" y2=\""+I.HF(C[1].y)+"\">");
if(Z==1)F.h9.push(W+" cx=\""+I.HF(C[0].x)+"\" cy=\""+I.HF(C[0].y)+"\" r=\""+I.HF(aE.sl(C[0],C[1]))+"\">");
if(w=="Rflc"){for(var v=0;v<2;v++){var L=v==0?r:_;for(var e=L.length-1;e>=0;e--){var H=L[e];H.v.Lctn.v=2048+(H.v.Lctn.v>>>1);
var y=JSON.parse(JSON.stringify(H));y.v.Lctn.v=4096-y.v.Lctn.v;L.push(y)}L.sort(function(p,U){return p.v.Lctn.v-U.v.Lctn.v})}}var g=n.Rvrs.v;
if(g){r.reverse();_.reverse()}for(var e=0;e<r.length;e++){var Q=r[e].v,J=e<_.length?_[e].v.Opct.v.val/100:1,J=J==1?"":"stop-opacity=\""+I.HF(J)+"\"",A=Q.Lctn.v/4096;
if(g)A=1-A;F.h9.push(I.yk(3)+"<stop offset=\""+I.HF(A)+"\" stop-color=\""+CSS.q7(Q.Clr.v)+"\" "+J+" />")}F.h9.push(I.yk(2)+"</"+P+">")};
hF.jP=function(n,F,O,I,x){var r=[],_=hF.jP,d=!1,w={HL:n,Sa:F,w5:[!0,!0,!0],Av:!1,$f:O,amA:0};w.$T=Math.round(Math.max(n,F)*(.02+_.e5(w)*.03));
w.OD=_.agP(w);w.UE=_.aaC(w.OD,(_.e5(w)<.5?-1:1)*(.2+_.e5(w)*.3));if(_.e5(w)<.5){var Z=w.OD;w.OD=w.UE;
w.UE=Z}w.abT=_.e5(w)<.4&&_.ae5(w.UE,{Q:1,l:1,O:1})>.3;w.a9P=_.e5(w)<.5?0:1;r.push("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 "+n+" "+F+"\" width=\""+n+"\" height=\""+F+"\">");
w.mq=I[Math.floor(_.rB(w)*I.length)];w.Y2=I[Math.floor(_.rB(w)*I.length)];r.push("<style>");r.push("@font-face {  font-family: "+w.mq[2]+";  src: url(rsrc/fonts/"+w.mq[5]+");  }");
r.push("@font-face {  font-family: "+w.Y2[2]+";  src: url(rsrc/fonts/"+w.Y2[5]+");  }");r.push("</style>");
var P=[0,0,n,F],C=P;if(x==null)r.push("<path style=\"fill: "+_.Ns(w.OD)+"\" d=\""+_.Rect(P[0],P[1],P[2]-P[0],P[3]-P[1])+"\" id=\"Background\" />");
else{w.Av=!0;_.s_(w,P,r,x)}if(_.e5(w)<.25&&!w.Av){w.w5[0]=w.w5[2]=!1;_.ajI(P,w,r);C=P}else if(_.e5(w)<.25||w.Av)C=P;
else{var W=.52+_.e5(w)*.2;if(_.e5(w)<.5)W=1-W;var v=P.slice(0),L=P.slice(0);if(_.e5(w)<.5)v[2]=L[0]=Math.round(W*n);
else v[3]=L[1]=Math.round(W*F);if(_.e5(w)<.5){var Z=v;v=L;L=Z}C=v;_.aac(w,L,r,x)}_.ami(w,C,r);r.push("</svg>");
r=r.join("\n");var H=q.f(Math.round(r.length*1.5)),y=Y.ng(r,H,0);return[H.buffer.slice(0,y),w.Qb]};hF.jP.ajI=function(n,F,O){var I=hF.jP,x=n[2]-n[0],r=n[3]-n[1];
if(I.e5(F)<.5){O.push("<path id=\"Border\" style=\"fill: "+I.Ns(F.UE)+"\" d=\""+I.afJ(n[0],n[1],n[2]-n[0],n[3]-n[1],F.$T)+"\" />")}else if(I.e5(F)<-.4){I.ahE(F,n,O)}else{var _=I.e5(F)<.5?0:1,d=(_==0?r:x)/4,w=I.ET(F,_,n,O,d,!0),w=I.ET(F,_+2,n,O,d,!0,w)}};
hF.jP.ami=function(n,F,O){var I=hF.jP,x="Hello World!-What a beautiful day.-What Is Love?-Baby, don't hurt me.-Is This a Real Life?-Is this a fantasy?-Wake Me Up!-Before you go go.-I Saw The Sign.-And it opened up my mind!".split("-"),r=2*Math.floor(I.e5(n)*x.length/2),_=F[2]-F[0],d=F[3]-F[1],Z=0,C=0;
n.wZ=(n.HL+_)*.5*(.04+I.e5(n)*.05);n.wZ=Math.min(n.wZ,d*.4,_*.12);n.wZ=Math.round(n.wZ);var w=Math.min(n.wZ*x[r].length*(.35+.3*I.e5(n)),_*.9),P=(F[1]+F[3])/2,W=q.wO(n.OD)<.85?{Q:1,l:1,O:1}:{Q:.1,l:.1,O:.1};
if(I.e5(n)<.25&&n.w5[0]){C=0;Z=F[0]+n.$T}else if(I.e5(n)<.33&&n.w5[2]){C=2;Z=F[2]-n.$T}else{C=1;Z=(F[0]+F[2])/2}var v=W.Q==1?"0,0,0":"255,255,255",L=n.Av&&I.e5(n)<1;
if(L){var H=F[0],y=_,g=P-n.wZ*1.1,Q=n.wZ*2.2,J=.7;if(C==1&&I.e5(n)<.5){H=g=.2*Math.min(_,d);y=_-2*g;
Q=d-g-g}else if(I.e5(n)<.7){H=g=0;y=_;Q=d;J=.25}O.push("<path id=\"Strip\" style=\"fill: rgb("+v+"); opacity: "+J+"\" d=\""+I.Rect(H,g,y,Q)+"\" />")}if(I.e5(n)<.4){var A=n.wZ*.07;
A*=1.5+I.e5(n)*1;if(C==-1&&_/d<3&&!L){O.push("<path id=\"Bar-bottom\" style=\"fill: "+I.Ns(W)+"\" d=\""+I.Rect(Z-w/2,P+n.wZ*1.1-A/2,w,A)+"\" />");
O.push("<path id=\"Bar-top\"    style=\"fill: "+I.Ns(W)+"\" d=\""+I.Rect(Z-w/2,P-n.wZ*1.1-A/2,w,A)+"\" />")}if(C!=1){O.push("<path id=\"Bar\" style=\"fill: "+I.Ns(W)+"\" d=\""+I.Rect(Z-A/2,P-n.wZ*.8,A,n.wZ*.8*2)+"\" />");
Z+=(C==0?1:-1)*n.wZ/3}}var p=n.wZ*.4;O.push(I.xF(x[r+1],Z,P+p*1.6,p,W,C,n.Y2));O.push(I.xF(x[r],Z,P+n.wZ*.04,n.wZ,W,C,n.mq))};
hF.jP.aac=function(n,F,O,I){var x=F[2]-F[0],r=F[3]-F[1],_=Math.max(x,r),d=Math.min(x,r),w=hF.jP;if(_/d<5&&!n.Av&&!1){w.s_(n,F,O,I)}else if(w.e5(n)<0)O.push("<path style=\"fill: "+w.Ns(n.UE)+"\" d=\""+w.Rect(F[0],F[1],x,r)+"\" />");
else{var Z=0;if(F[3]!=n.Sa)Z=0;if(F[2]!=n.HL)Z=3;if(F[0]!=0)Z=1;if(F[1]!=0)Z=2;var P=Z+2&3;if(_/d<3){var C=w.amT(P),W=C[Math.round(w.e5(n)*(C.length-1))],v=W.Bz.slice(0,4),L=v.indexOf(1);
W=JSON.parse(JSON.stringify(W));var H=-1;if(v!="0000"){var y=new cD;if(W.Bz[5]=="0"){if(L==3&&Z==1){H=1;
y.scale(-1,1)}else H=L}else{var g=P;while(g==P)g=Math.floor(w.e5(n)*4)&3;y.rotate((-L+g)*Math.PI/2)}w.m(W,y)}var Q=w.gh(W),J=x-2*n.$T,A=r-2*n.$T;
if(H!=-1){if((H&1)==0)A-=n.$T;else J-=n.$T}var p=Math.min(J/Q.d,A/Q.v),U=new cD;U.translate(-Q.x,-Q.y);
U.scale(p,p);var j=(x-Q.d*p)/2,b=(r-Q.v*p)/2;if(H!=-1){if(H==3)j=0;if(H==0)b=0;if(H==1)j=x-Q.d*p;if(H==2)b=r-Q.v*p}U.translate(F[0]+j,F[1]+b);
w.vb(n,W,U,n.UE,O)}else{w.ET(n,Z,F,O,1e9)}}};hF.jP.s_=function(n,F,O,I){var x=F[2]-F[0],r=F[3]-F[1],_=Math.max(x,r),d=Math.min(x,r),w=hF.jP,Z=w.rB(n),P,C,W,v=I[0]instanceof ArrayBuffer;
if(v){P="data:image/jpg;base64,"+bm.C5(I[0]);C=I[1];W=I[2]}else{var L=Math.floor(Z*I.length),H=I[L];
n.Qb=H;P=H.webformatURL;C=H.webformatWidth;W=H.webformatHeight}var y=F[0],g=F[1],Q=x,J=r;if(x/r>C/W){J=Q*W/C;
g=g-(J-r)/2}else{Q=J*C/W;y=y-(Q-x)/2}if(v){O.push("<defs>");O.push("<image width=\""+C+"\" height=\""+W+"\" id=\"Background\" href=\""+P+"\" />");
O.push("</defs>");var A=Q/C;O.push("<use href=\"#Background\" transform=\""+hF.YA(new cD(A,0,0,A,y,g))+"\" />")}else{var p="cp"+Math.random();
O.push("<clipPath id=\""+p+"\">");O.push("<path style=\"fill: "+w.Ns(n.UE)+"\" d=\""+w.Rect(F[0],F[1],x,r)+"\" />");
O.push("</clipPath>");O.push("<image  clip-path=\"url(#"+p+")\" xlink:href=\""+P+"\" x=\""+y+"\" y=\""+g+"\" width=\""+Q+"\" height=\""+J+"\" />")}};
hF.jP.xF=function(n,F,O,I,x,r,_){var d=hF.jP;return"<text x=\""+F+"\" y=\""+O+"\" style=\"fill:"+d.Ns(x)+"; font-size:"+I+"px; text-anchor:"+["start","middle","end"][r]+"; font-family:"+_[2]+";\"><tspan>"+n+"</tspan></text>"};
hF.jP.vb=function(n,F,O,I,x){var r=hF.jP,_=[];for(var e=0;e<F.AZ.length;e++){_.push(I);if(n.abT){I=(e&1)==n.a9P?{Q:1,l:1,O:1}:_[0]}}x.push("<g id=\""+F.Bz.split("-")[2]+":::\" style=\"transform: "+hF.YA(O)+";\" >");
for(var e=0;e<F.AZ.length;e++){var d=F.AZ[e];I=_.pop();x.push("<path style=\"fill: "+(I?r.Ns(I):"#"+d[0])+"\" d=\""+Typr.U.pathToSVG({crds:d[1].H,cmds:d[1].s})+"\" />")}x.push("</g>")};
hF.jP.ahE=function(n,F,O){var I=hF.jP,x=hF.jP.mU,r=[];for(var e=0;e<x.length;e++){var _=x[e],d=_.Bz.slice(0,4);
if(d!="1001")continue;r.push(_)}var _=r[Math.floor(I.e5(n)*r.length)];if(I.e5(n)<.5)I.m(_,new cD(0,1,1,0,0,0));
var w=F[3]-F[1],Z=F[2]-F[0],P=I.gh(_),C=.7*Math.min(Z,w,.5*Math.max(Z,w))/Math.max(P.d,P.v),W=new cD;
W.scale(C,C);if(I.e5(n)<.5){W.scale(1,-1);W.translate(0,w)}I.vb(n,_,W,n.UE,O);W.rotate(Math.PI);W.translate(Z,w);
I.vb(n,_,W,n.UE,O)};hF.jP.amT=function(n){var F=hF.jP.mU,O=[];for(var e=0;e<F.length;e++){var I=F[e],x=I.Bz.slice(0,4);
if(x=="0000"){O.push(I);continue}if(["1000","0100","0010","0001"].indexOf(x)==-1)continue;var r=x.indexOf("1");
if(I.Bz[5]=="0"&&n==r&&r!=3)continue;O.push(I)}return O};hF.jP.ET=function(n,F,O,I,x,r,_){var d=hF.jP.mU,w=hF.jP,Z=[],Q,J;
for(var e=0;e<d.length;e++){var P=d[e],C=P.Bz.slice(0,4);if(["1110","1101","1011","0111"].indexOf(C)==-1)continue;
var W=C.indexOf("0")+2&3;if(P.Bz[5]=="0")if(r==!0||F!=W&&!(F==1&&W==3))continue;Z.push(P)}var v=_!=null?_:Math.floor(w.e5(n)*Z.length),P=Z[v],P=JSON.parse(JSON.stringify(P)),C=P.Bz.slice(0,4),W=C.indexOf("0")+2&3;
if(W==3&&F==1)q.m(P,new cD(1,0,0,-1,0,1e3));var L=new cD;L.translate(-500,-500);L.rotate(-W*Math.PI/2);
L.translate(500,500);w.m(P,L);var H=O[3]-O[1],y=O[2]-O[0],g=w.gh(P);if(g.y<0){g.v+=g.y;g.y=0}if(g.y>0){g.v+=g.y;
g.y=0}if((F&1)==0){J=H;Q=y}else{Q=H;J=y}var A=Math.min(Math.min(.5+.5*w.e5(n))*Math.min(y,H),x)/g.v,p=Math.ceil(Q/(1e3*A)),U=new cD,j=new cD;
j.scale(A,A);if(F==0||F==2){j.translate(-(y/2),-(H/2));j.rotate(-F*Math.PI/2);j.translate(y/2+O[0],H/2+O[1])}else{j.rotate(Math.PI/2);
j.scale(1,-1);j.translate(O[0],O[1]);if(F==1){j.scale(-1,1);j.translate(y,0)}}I.push("<g id=\"Border-"+["top","right","bottom","left"][F]+":::\">");
for(var e=0;e<p;e++){var b=U.clone();b.concat(j);w.vb(n,P,b,n.UE,I);U.translate(1e3-2,0)}I.push("</g>");
return v};hF.jP.Rect=function(n,F,O,I){return Typr.U.pathToSVG({crds:[n,F,n+O,F,n+O,F+I,n,F+I],cmds:["M","L","L","L","Z"]})};
hF.jP.afJ=function(n,F,O,I,x){var r=[n,F,n+O,F,n+O,F+I,n,F+I];n+=x;F+=x;O-=2*x;I-=2*x;r.push(n,F,n,F+I,n+O,F+I,n+O,F);
return Typr.U.pathToSVG({crds:r,cmds:"M L L L Z M L L L Z".split(" ")})};hF.jP.aaC=function(n,F){var O=q.Px(n.Q,n.l,n.O);
O.AU=Math.max(.1,Math.min(.9,O.AU+F));return q.OQ(O.Sa,O.Ls,O.AU)};hF.jP.a8l=function(n,F){var O=q.Px(n.Q,n.l,n.O);
O.Sa+=F;return q.OQ(O.Sa,O.Ls,O.AU)};hF.jP.alW=function(n){var F=q.Px(n.Q,n.l,n.O);F.AU=1-F.AU;return q.OQ(F.Sa,F.Ls,F.AU)};
hF.jP.ae5=function(n,F){var O=n.Q-F.Q,I=n.l-F.l,x=n.O-F.O;return Math.sqrt(O*O+I*I+x*x)};hF.jP.agP=function(n){var F=hF.jP;
return{Q:F.e5(n),l:F.e5(n),O:F.e5(n)}};hF.jP.Ns=function(n){return CSS.Tt({Q:n.Q*255,l:n.l*255,O:n.O*255})};
hF.jP.gh=function(n){var F=n.AZ,O=new gv;for(var e=0;e<F.length;e++)O=O.Tq(q.z.gh(F[e][1].H));return O};
hF.jP.m=function(n,F){var O=n.AZ;for(var e=0;e<O.length;e++)q.z.m(O[e][1].H,F,O[e][1].H)};hF.jP.e5=function(n){n.amA++;
var F=n.amA&3;if(F==0)n.$f=hF.jP.JU(n.$f);var O=n.$f>>>8*F&255;return O*(.99999999/255)};hF.jP.rB=function(n){var F=hF.jP.JU(n.$f);
n.$f=hF.jP.JU(F);return F*(1/4294967295)};hF.jP.JU=function(n){n=(n^61^n>>>16)>>>0;n=n+(n<<3)>>>0;n=(n^n>>>4)>>>0;
n=n*668265261>>>0;n=(n^n>>>15)>>>0;return n};hF.jP.mU=[{Bz:"0001-0-bird",AZ:[["4b3c34",{s:"M C L C C L Z M C C L C C L Z M C L C L Z M C L C C L Z".split(" "),H:[208,16,253,5,247,86,228,104,218,108,253,60,235,12,211,18,210,18,209,17,208,16,208,16,187,140,238,125,326,133,319,189,318,198,307,210,299,207,297,205,307,208,316,195,317,188,320,126,208,137,174,149,187,140,137,75,156,79,177,94,164,157,173,147,177,101,165,79,142,75,137,75,368,59,165,59,182,233,0,210,0,225,161,250,194,61,364,63,367,61,368,59,368,59,368,59]}],["3c7040",{s:"M C C C C C L Z M C C C C L Z M C C C C L Z M C C C C L Z M C C C C C L Z M C C C C L Z M C C C C Z".split(" "),H:[345,123,324,113,331,70,284,80,287,79,310,89,314,103,314,104,306,90,284,82,281,81,270,85,268,86,274,117,335,119,345,123,345,123,270,0,283,29,282,58,244,66,258,62,265,40,269,27,265,37,256,56,249,58,242,31,263,18,270,0,270,0,89,100,81,136,47,182,101,196,90,189,92,157,91,145,94,160,93,191,109,195,148,158,96,129,89,100,89,100,230,187,201,240,160,226,133,198,150,191,172,197,187,198,166,193,153,190,134,193,159,162,207,194,230,187,230,187,126,177,131,159,129,150,119,139,122,122,145,112,147,97,166,128,164,155,134,168,139,154,146,142,145,131,143,145,133,159,126,177,126,177,209,86,195,86,166,91,173,109,177,102,181,97,191,96,180,99,174,113,175,113,194,114,200,96,209,86,209,86,278,175,254,167,235,168,231,143,245,143,248,151,256,158,252,147,243,144,240,142,276,147,265,171,278,175]}],["b588c1",{s:"M C C C C C C C C C C C C L Z".split(" "),H:[189,40,188,42,186,44,184,47,184,52,183,55,181,59,175,70,160,78,147,79,142,79,131,78,127,75,118,74,95,71,93,70,89,70,88,70,69,72,74,66,82,68,93,65,78,64,83,62,95,59,128,50,128,33,155,29,162,16,180,13,189,31,193,31,196,34,198,37,197,37,193,39,189,40,189,40]}]]},{Bz:"0001-0-bird2",AZ:[["ff7f2a",{s:"M L L L Z M L L L Z".split(" "),H:[296,0,296,62,335,62,296,0,357,0,357,62,318,62,357,0]}],["b588c1",{s:"M C C C C C C C C C C C L Z".split(" "),H:[321,48,344,48,379,67,396,121,408,176,396,230,337,255,303,265,265,268,217,235,191,217,170,188,186,180,195,177,199,187,205,192,203,185,199,178,207,172,217,165,224,178,225,182,227,196,231,203,250,206,273,205,290,196,292,165,289,133,269,118,268,101,267,77,288,49,321,48,321,48]}],["74439e",{s:"M C C C C C C L Z M C C Z".split(" "),H:[337,187,329,202,317,204,304,204,293,204,284,205,293,224,286,216,278,209,268,214,257,220,262,237,269,243,284,258,310,256,323,243,337,227,339,208,337,187,337,187,340,77,310,78,287,81,315,96,269,83,309,75,340,77]}],["000000",{s:"M L L L Z M L L L Z".split(" "),H:[326,258,334,315,323,316,326,258,298,262,296,318,286,317,298,262]}],["4b3c34",{s:"M L C C C C C C C C L Z".split(" "),H:[0,272,0,336,63,296,119,296,175,320,205,330,229,339,278,338,322,337,354,322,405,325,443,329,482,332,501,377,501,366,502,348,474,328,464,320,440,312,384,309,296,309,300,333,186,293,118,264,54,250,0,272,0,272]}],["3c7040",{s:"M C C C Z M C C C Z M C C C L Z M C C C L Z M C C C L Z M C C C Z".split(" "),H:[58,260,44,247,27,239,20,208,15,188,32,182,43,198,59,227,56,242,58,260,181,323,167,336,150,345,143,375,138,396,155,401,166,385,182,356,179,342,181,323,60,260,79,249,100,243,113,214,122,194,102,186,86,200,62,227,65,242,60,260,60,260,499,378,479,377,462,372,435,388,417,399,425,415,444,411,476,403,484,390,499,378,499,378,501,379,494,397,482,411,488,442,491,463,511,461,514,442,520,410,508,397,501,379,501,379,503,378,513,390,516,402,531,413,546,421,557,412,548,401,534,382,519,379,503,378]}]]},{Bz:"0000-1-flower",AZ:[["7a59a2",{s:"M C C C C C C C Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z".split(" "),H:[468,470,411,473,371,480,351,495,332,509,322,536,325,581,325,601,328,621,325,637,346,634,371,638,397,637,427,636,456,626,465,611,478,596,485,553,489,490,477,489,470,483,468,470,445,563,435,583,425,591,415,590,401,588,401,572,410,549,388,558,375,557,369,546,366,533,374,524,390,517,416,506,441,498,465,495,463,519,455,542,445,563,445,563,489,450,486,392,480,352,465,332,451,313,425,302,380,305,360,305,340,307,324,304,327,324,322,350,323,376,323,406,332,435,347,444,362,457,405,465,468,470,469,458,476,451,489,450,489,450,395,424,376,415,368,405,369,394,371,380,387,380,410,390,402,368,403,355,414,349,427,346,436,355,443,370,454,397,460,422,463,446,439,443,417,435,395,424,395,424,508,470,566,468,606,462,626,447,645,433,656,407,654,362,654,342,652,322,655,306,634,309,609,304,583,305,553,305,524,314,514,329,501,344,493,387,488,449,500,451,507,457,508,470,508,470,534,377,544,357,554,350,564,351,578,353,578,369,568,392,590,384,604,385,609,396,612,409,603,418,588,425,561,435,536,442,512,445,515,421,523,399,534,377,534,377,488,490,492,547,499,587,514,607,528,626,554,636,600,633,619,632,640,630,656,633,652,612,656,587,655,560,655,531,645,502,629,493,614,480,571,473,508,469,507,481,501,488,488,490,488,490,582,513,602,523,610,533,609,543,607,557,591,557,568,548,577,570,576,583,565,589,552,592,542,584,535,568,524,542,517,517,514,493,538,495,560,503,582,513,582,513]}]]},{Bz:"0000-1-flower",AZ:[["d13777",{s:"M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z".split(" "),H:[474,503,457,528,452,530,450,528,450,523,469,498,464,493,388,522,332,552,314,585,297,628,322,660,372,639,361,698,421,709,450,665,467,649,477,596,482,505,474,503,474,503,439,563,431,563,424,556,424,548,424,539,431,532,439,532,447,532,454,539,454,548,454,556,447,563,439,563,462,475,432,467,429,463,430,460,435,458,465,469,468,463,417,399,371,356,335,348,288,345,265,379,300,420,241,428,249,488,301,503,321,513,374,507,462,483,462,475,462,475,394,460,391,452,396,444,404,441,412,438,420,443,423,451,426,459,421,467,413,470,405,473,396,468,394,460,484,455,483,424,486,419,489,420,492,424,492,456,498,457,543,389,570,332,566,294,554,249,515,238,487,284,461,231,406,256,408,310,405,333,427,381,477,458,484,455,484,455,477,385,484,380,494,382,499,389,504,396,502,405,496,410,489,415,479,414,474,407,469,400,471,390,477,385,511,470,539,459,545,461,545,463,542,467,512,477,513,483,592,505,654,513,688,497,728,472,726,432,674,419,717,378,675,334,625,353,602,356,563,393,506,464,511,470,511,470,575,442,581,447,583,456,578,463,573,470,563,472,557,467,550,462,548,452,553,445,558,438,568,437,575,442,505,499,524,523,524,529,521,531,517,529,498,503,492,506,496,588,508,650,533,677,570,707,607,693,603,639,656,667,685,614,651,572,641,551,594,525,509,493,505,499,505,499,551,552,548,560,540,564,532,561,524,559,519,550,522,542,524,534,533,530,541,532,549,535,554,543,551,552]}]]},{Bz:"0000-1-flower",AZ:[["ffac42",{s:"M C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z M C C C C Z".split(" "),H:[646,471,646,446,626,426,601,426,599,426,597,426,595,427,596,426,598,424,599,423,616,406,616,378,599,360,581,343,553,343,536,360,534,361,533,363,532,364,532,363,532,361,532,359,532,335,512,315,488,315,463,315,443,335,443,359,443,361,443,363,443,365,442,364,441,363,440,362,422,344,394,344,377,362,359,379,359,407,377,425,378,426,380,427,381,429,379,428,378,428,376,428,351,428,331,448,331,473,331,498,351,518,376,518,378,518,380,517,382,517,381,518,379,519,378,521,361,538,361,566,378,584,396,601,424,601,441,584,443,582,444,581,445,579,445,581,445,583,445,584,445,609,465,629,490,629,514,629,534,609,534,584,534,582,534,580,534,579,535,580,536,581,537,582,555,600,583,600,600,582,618,565,618,537,600,519,599,518,597,516,596,515,598,515,599,516,601,516,626,516,646,496,646,471,489,552,444,552,409,516,409,472,409,428,444,392,489,392,533,392,569,428,569,472,569,516,533,552,489,552]}]]},{Bz:"0000-1-flower",AZ:[["d04040",{s:"M C C L L C C C C L L C C L L C C C C L C C C C L Z M C C C Z M C C C L Z M C C C L Z".split(" "),H:[691,424,690,369,680,330,660,303,634,320,601,361,568,406,568,406,568,327,578,326,585,317,585,306,585,294,576,284,564,284,552,284,542,294,542,306,542,317,550,326,560,327,560,406,559,406,540,359,522,311,501,291,475,319,453,360,433,407,431,406,431,327,441,326,448,317,448,306,448,294,439,284,427,284,415,284,405,294,405,306,405,317,412,326,423,327,423,404,390,363,360,326,341,308,296,401,299,489,360,567,396,613,443,639,500,638,624,636,694,524,692,424,691,424,389,543,370,514,379,498,399,504,439,518,470,564,488,613,455,600,414,580,389,543,481,480,488,445,505,441,515,459,533,497,524,552,501,599,487,567,472,523,481,480,481,480,624,523,610,563,565,595,515,613,528,580,548,538,585,514,614,494,629,503,624,523,624,523]}]]},{Bz:"0000-1-flower",AZ:[["ec7272",{s:"M C C C C Z M C C C C Z M C C C C L Z M C C C C L Z M C C C C Z M C C C C L Z".split(" "),H:[447,475,452,450,452,438,437,423,422,407,407,412,390,383,398,418,421,415,433,434,445,453,446,474,447,475,495,446,520,439,529,433,535,412,542,390,529,380,546,351,520,376,533,394,523,414,513,434,495,445,495,446,545,473,564,490,574,495,595,490,617,485,620,469,653,468,619,459,610,479,587,480,565,482,546,472,545,473,545,473,549,533,543,558,543,569,559,585,574,601,589,596,606,624,597,590,575,592,563,573,551,555,550,534,549,533,549,533,504,562,480,570,470,575,464,596,458,618,470,628,454,657,479,632,466,614,476,594,486,575,504,563,504,562,459,536,440,519,430,513,409,518,387,524,384,539,351,540,385,549,394,529,417,528,439,527,457,536,459,536,459,536]}],["333333",{s:"M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z M C C C C C C C C C C C C L Z".split(" "),H:[534,455,584,415,579,358,577,335,574,315,585,304,585,304,585,304,568,308,561,312,554,316,520,333,500,363,479,392,493,437,486,456,479,476,452,485,452,485,452,485,471,474,475,454,479,434,460,402,482,365,505,328,565,292,597,294,612,295,591,298,587,316,583,333,593,373,584,404,574,440,533,456,534,455,534,455,559,506,619,530,666,497,685,483,701,471,716,475,716,475,716,475,704,463,697,459,690,454,657,434,622,431,587,428,554,462,534,465,513,469,492,451,492,451,492,451,511,461,530,455,549,448,568,416,611,417,654,418,716,452,730,481,737,495,724,478,706,483,689,489,660,516,628,524,592,534,558,506,559,506,559,506,524,552,534,615,586,640,607,649,625,657,629,672,629,672,629,672,634,655,634,647,634,639,636,601,621,569,606,537,560,525,547,509,534,494,539,466,539,466,539,466,539,488,554,501,569,514,607,514,627,552,648,590,650,660,632,687,623,700,631,680,617,667,605,656,566,644,543,621,517,594,524,551,524,552,524,552,467,546,417,585,421,643,424,665,426,686,415,697,415,697,415,697,432,693,439,689,446,684,481,667,501,638,521,609,508,563,515,544,522,524,548,515,548,515,548,515,530,527,526,546,522,566,540,598,518,635,496,672,436,709,404,706,388,705,409,702,413,684,417,667,408,628,417,596,426,561,467,544,467,546,467,546,442,495,383,472,336,504,317,518,301,530,286,526,286,526,286,526,298,539,305,543,312,547,344,568,380,571,415,574,448,539,468,536,488,532,510,551,510,551,510,551,490,540,471,547,452,553,434,585,391,584,348,583,286,550,272,521,265,507,278,524,296,518,313,513,342,485,373,477,409,468,444,495,442,495,442,495,476,449,467,386,415,361,394,352,375,344,371,329,371,329,371,329,366,346,366,354,366,362,364,400,379,433,394,465,440,476,453,492,467,508,462,535,462,535,462,535,461,513,446,500,431,487,394,487,373,449,352,411,350,341,368,314,377,301,369,321,383,334,396,345,434,357,457,380,483,407,477,450,476,449,476,449]}]]},{Bz:"0000-0-hearts",AZ:[["d17070",{s:"M C C C C C C C C C L Z".split(" "),H:[415,584,413,585,411,586,409,587,392,596,389,620,395,633,401,647,414,663,450,668,485,674,487,681,494,690,491,679,487,673,507,643,527,613,524,593,518,579,512,566,493,552,475,558,467,561,451,566,448,586,435,578,423,581,415,584,415,584]}],["6bcc6b",{s:"M C C C C C C C C C L Z".split(" "),H:[595,451,593,449,590,448,588,448,563,439,537,457,529,475,521,493,516,520,542,560,568,601,563,609,559,623,568,611,571,602,618,595,666,589,684,567,692,550,700,532,697,501,674,488,665,482,645,472,622,486,619,465,606,456,595,451,595,451]}],["5c5cc2",{s:"M C C C C C C C C C L Z".split(" "),H:[341,362,338,364,335,366,332,368,304,385,301,424,312,446,323,468,345,494,405,501,465,508,468,520,480,534,475,516,468,506,499,455,531,404,524,370,514,348,503,325,470,304,440,315,427,320,401,331,397,364,374,351,355,356,341,362,341,362]}]]},{Bz:"0000-0-anchor",AZ:[["2a3b66",{s:"M C C C C L Z M C C C C C C C C C C C C C C L C C C C C C C C C C C C C L C C C C C C C C C C C C C L Z".split(" "),H:[495,315,490,315,488,318,489,323,491,328,502,326,502,320,502,317,501,316,497,315,496,315,496,315,495,315,495,315,496,303,509,303,521,320,514,327,511,330,513,345,517,348,519,350,531,352,546,354,570,357,572,357,578,354,588,347,592,351,592,369,592,385,588,390,580,385,576,383,570,383,552,384,524,387,519,389,517,397,515,404,517,515,520,554,522,583,525,599,530,606,534,610,555,617,565,617,584,616,607,602,635,572,639,568,641,566,644,563,633,559,616,557,616,557,675,533,675,533,671,605,669,609,667,611,664,591,658,577,657,579,657,580,656,582,628,638,603,660,565,664,545,666,521,672,514,675,512,677,507,682,504,688,501,693,497,698,496,698,494,698,490,693,487,688,484,682,480,677,477,675,471,672,447,666,427,664,391,660,367,640,340,591,335,604,332,621,331,619,329,615,325,544,325,544,384,568,384,568,368,569,357,573,385,602,408,616,426,617,437,617,458,610,461,606,466,599,470,583,472,554,474,515,476,404,475,397,473,389,468,387,440,384,422,383,416,383,412,385,403,390,400,385,400,369,400,351,403,347,414,354,419,357,421,357,446,354,460,352,473,350,475,348,478,345,481,330,478,327,470,320,483,303,496,303,496,303]}]]},{Bz:"0000-1-leaf",AZ:[["fbb600",{s:"M L L L L L L C L L C L C L C C C C C L C C C C C C C C C L C C C C C C C C C C C C C L L L L Z".split(" "),H:[642,726,633,723,632,707,591,631,570,582,526,521,537,547,535,579,517,598,501,619,486,602,414,634,412,606,379,609,346,611,394,557,406,547,401,539,386,532,319,519,337,508,332,493,320,478,326,464,302,450,287,436,303,436,324,441,330,432,346,434,359,434,359,415,377,428,397,431,417,432,442,440,437,418,417,416,406,372,401,370,395,367,389,355,417,363,408,339,406,323,416,312,427,303,417,276,433,295,444,297,452,294,479,321,490,313,496,294,503,322,510,329,517,338,522,353,530,371,530,379,546,402,551,389,555,378,578,333,606,333,628,304,652,280,646,306,644,327,657,329,649,356,658,374,679,384,666,392,656,415,645,432,627,457,653,451,661,457,692,460,698,473,715,481,697,485,678,488,669,509,656,523,655,533,666,539,659,537,659,542,643,531,630,535,613,543,608,539,598,535,594,542,590,553,590,566,594,564,596,569,568,575,551,543,531,519,575,577,597,628,639,708,642,726]}]]},{Bz:"0000-1-acorn",AZ:[["a05a2c",{s:"M C C C C C C C L Z".split(" "),H:[506,453,450,426,413,422,398,444,374,480,374,533,384,573,391,602,407,625,430,645,451,658,487,654,509,647,554,633,587,605,612,565,635,527,591,500,565,482,557,476,515,457,506,453,506,453]}],["502d16",{s:"M C C C C C C C C C C C Z".split(" "),H:[640,524,639,539,623,540,623,540,627,522,607,504,583,488,547,465,507,445,470,434,439,426,412,417,400,437,400,437,391,424,400,414,434,370,498,356,551,376,555,349,583,317,597,321,612,326,621,346,620,350,619,354,594,352,584,368,580,375,577,382,575,387,619,412,649,460,640,524]}]]},{Bz:"0000-0-skull",AZ:[["808080",{s:"M C L C C L C L C C C C C C C L C L C C C C C C C C L C C L C L C C C C C C C L C L C L C C C C C C Z M C C C C Z M C C C C Z M L L L Z".split(" "),H:[396,410,398,415,398,420,398,424,420,437,433,404,465,382,501,382,538,382,569,404,582,435,602,424,602,419,603,415,604,410,604,410,609,392,622,379,633,382,643,384,648,402,643,420,643,421,642,421,642,422,643,422,643,422,644,422,662,427,675,440,672,450,669,461,652,465,633,460,628,459,624,457,620,455,589,473,588,491,582,507,572,520,607,540,611,538,615,536,620,535,639,530,656,535,659,545,662,556,649,568,630,573,630,574,629,574,629,574,629,574,629,575,629,575,634,594,630,611,619,614,609,617,596,604,591,585,590,580,589,576,589,571,565,557,564,592,536,619,501,619,466,619,438,591,437,557,412,572,411,576,411,580,410,585,410,585,405,604,392,617,381,614,371,611,366,593,371,575,371,574,371,574,372,574,371,573,371,573,370,573,352,568,339,556,342,545,345,534,362,530,381,535,385,536,390,538,394,540,430,519,421,507,415,491,414,475,380,455,376,457,372,459,367,460,367,460,349,465,331,461,328,450,326,440,338,427,357,422,357,422,358,422,358,422,358,421,358,421,358,420,353,402,357,384,368,381,379,379,391,391,396,410,463,439,445,439,431,453,431,470,431,488,445,502,463,502,480,502,494,488,494,470,494,453,480,439,463,439,540,439,522,439,508,453,508,470,508,488,522,502,540,502,557,502,571,488,571,470,571,453,557,439,540,439,483,528,518,528,500,503,483,528]}]]},{Bz:"0000-0-ghost",AZ:[["e6e6e6",{s:"M C C C C C C C C C C L Z M C C C C C C C C Z M C C Z".split(" "),H:[653,486,653,574,689,597,689,638,689,661,640,644,620,656,601,666,609,682,583,692,563,700,538,666,512,666,490,666,451,695,433,686,415,677,416,646,388,644,367,641,313,671,313,648,313,619,346,588,346,486,346,388,415,308,500,308,584,308,653,388,653,486,653,486,449,396,428,396,412,415,412,439,412,462,428,482,449,482,465,482,478,470,484,454,489,470,503,482,519,482,539,482,556,462,556,439,556,415,539,396,519,396,503,396,489,407,484,423,478,407,465,396,449,396,482,505,441,505,465,560,482,560,503,560,524,505,482,505]}],["000000",{s:"M C C C C Z M C C C C Z".split(" "),H:[526,446,526,455,519,462,510,462,501,462,494,455,494,446,494,437,501,430,510,430,519,430,526,437,526,446,475,446,475,455,468,462,459,462,450,462,442,455,442,446,442,437,450,430,459,430,468,430,475,437,475,446]}]]},{Bz:"1001-1-rose",AZ:[["9e1460",{s:"M C C C C C C C C C Z M C C C C C C C C C Z".split(" "),H:[568,83,558,83,548,88,539,96,538,98,536,99,535,101,522,115,513,134,517,149,522,172,561,200,592,207,604,210,611,215,615,221,622,234,611,258,611,258,613,260,615,264,618,264,627,266,638,241,640,236,660,188,614,83,568,83,526,125,527,97,567,68,593,75,616,81,642,121,649,152,651,165,656,172,662,176,675,183,698,173,698,173,698,173,698,173,698,173,704,176,705,179,705,180,706,189,681,199,678,200,678,200,677,201,677,201,627,220,524,170,526,125]}],["020304",{s:"M C C C C C Z M C C C C C Z M C C C C C Z M C C C C Z".split(" "),H:[60,151,60,151,37,125,60,98,83,72,95,91,115,66,134,42,117,26,120,30,123,34,146,83,132,114,114,154,60,151,60,151,280,70,280,70,258,97,283,122,308,147,318,127,339,150,361,173,344,190,347,186,350,182,370,132,354,101,333,62,280,70,280,70,61,150,61,150,27,143,30,108,33,73,54,81,55,50,57,19,33,16,38,17,43,19,91,44,98,78,107,121,61,150,61,150,-27,185,184,158,222,43,352,32,444,24,538,97,538,97,538,97,453,45,354,48,241,51,185,170,-27,185]}]]},{Bz:"1001-1-curls",AZ:[["53a7ab",{s:"M C C C C C C C C C C C C C C C C L Z M C C C C C C C C C C C C C C C C L Z M C C C C C C C C C C C C C C C C C C C C C L Z".split(" "),H:[68,114,121,103,159,110,183,135,212,169,211,204,189,237,162,277,124,291,86,276,52,263,38,236,47,202,55,168,79,151,121,156,147,162,165,177,160,205,155,228,135,241,113,237,97,234,92,221,96,205,98,195,105,194,115,200,124,205,133,204,135,197,139,183,122,167,95,171,68,176,54,193,68,220,84,252,131,261,165,238,201,202,199,164,158,136,118,113,52,122,-23,151,2,134,33,122,68,114,68,114,71,83,119,75,163,79,198,107,226,129,247,174,271,207,291,229,316,241,342,232,370,222,394,206,418,209,443,212,461,238,485,258,500,272,522,276,543,271,543,271,524,279,518,281,500,287,483,277,466,256,453,243,441,230,427,223,413,217,392,220,372,229,372,230,371,230,370,230,354,241,337,251,315,250,283,248,253,222,229,172,209,133,178,106,137,94,103,84,52,94,-30,133,-3,108,30,91,71,83,71,83,83,54,122,46,166,49,195,67,219,82,250,122,290,168,308,186,330,194,355,192,393,183,400,145,383,118,372,101,355,91,328,91,313,92,303,98,300,109,298,116,299,125,304,131,315,147,327,152,340,149,349,149,354,132,343,131,330,131,326,129,328,120,332,97,355,100,365,114,381,137,367,165,343,168,321,170,289,150,288,117,290,77,319,58,352,64,388,74,405,104,404,141,403,177,382,202,345,207,312,211,284,191,260,161,245,141,229,122,213,106,196,84,166,73,129,67,80,62,28,79,-26,108,10,79,46,63,83,54,83,54]}],["bbdc54",{s:"M C C C C C L Z M C C C C C L Z M C C C C L Z M C C C C L Z M C C C C C C C C C L Z M C C C C C C C C C C C C C C C C C C C C C C C C C C C C C L Z".split(" "),H:[321,315,287,324,252,312,211,219,217,284,239,326,279,341,324,352,362,329,398,291,316,305,258,269,217,196,238,284,274,319,321,315,321,315,211,261,223,300,234,345,252,374,220,378,194,367,193,324,194,306,198,288,206,270,197,315,204,340,221,351,206,327,202,297,211,261,211,261,206,246,193,301,170,317,138,297,162,281,184,254,205,222,201,246,191,267,174,283,186,279,197,267,206,246,206,246,378,233,370,286,337,299,294,270,312,277,330,276,347,267,294,278,259,252,234,203,280,259,327,278,378,233,378,233,626,217,604,273,555,313,511,315,484,316,438,289,432,232,450,253,488,296,511,291,532,286,551,277,566,261,527,269,498,263,480,243,478,241,478,237,480,235,486,230,504,220,519,226,537,233,551,242,567,241,591,236,611,228,626,217,626,217,411,192,432,183,439,166,420,136,443,144,460,158,466,182,470,165,456,149,430,133,459,136,485,145,505,165,503,143,463,133,434,128,486,127,526,124,539,118,505,123,470,124,435,122,461,111,483,96,500,76,475,95,450,110,424,118,450,96,465,72,466,48,458,75,440,98,419,112,424,106,428,99,428,91,429,68,413,57,393,51,419,70,426,92,411,110,408,77,385,58,343,52,383,26,422,25,445,62,458,47,465,29,467,8,477,27,479,51,475,76,497,64,515,49,528,29,524,57,515,82,496,103,521,113,549,111,579,99,560,122,535,136,502,137,518,149,521,173,514,205,505,181,492,166,476,158,483,188,470,205,447,216,456,183,451,166,438,157,444,193,426,211,379,207,403,193,416,172,416,140,434,156,428,173,411,192,411,192]}]]},{Bz:"0111-0-pines",AZ:[["e9e9e9",{s:"M C C C C C C C C L L L Z".split(" "),H:[0,946,0,946,54,960,99,944,149,927,182,954,205,956,245,960,298,940,382,974,435,995,478,957,538,956,571,955,597,969,631,968,663,967,701,938,749,944,805,950,851,960,893,946,950,928,1e3,946,1e3,946,1e3,1e3,0,1e3,0,946]}],["437a26",{s:"M C L C C C L L C C L L L L L C Z M C L C C C L L C C L L L L L C Z M C L C C C L L C C L L L L L C Z M C L C C C L L C C L L L L L C Z M C L C C C L L C C L L L L L C Z".split(" "),H:[119,801,120,801,148,859,148,859,137,853,137,853,155,890,155,891,156,892,138,887,140,888,141,888,171,925,171,925,126,924,125,943,125,943,105,944,106,944,107,944,106,924,106,924,61,925,93,886,77,891,100,854,89,860,89,860,119,801,119,801,286,871,286,871,303,905,303,905,296,902,296,902,307,924,307,924,307,925,297,922,297,922,298,922,316,944,316,944,289,944,289,955,289,955,277,956,278,956,278,956,278,944,278,944,251,944,270,921,260,924,274,902,268,906,268,906,285,871,286,871,526,863,526,863,546,903,546,903,538,899,538,899,550,924,550,925,550,926,539,922,540,922,540,922,561,948,561,948,530,947,529,960,529,960,516,961,517,961,518,961,517,947,517,947,486,948,508,921,497,925,513,899,505,903,505,903,526,863,526,863,731,841,731,841,752,883,752,883,744,879,744,879,757,907,757,908,758,908,745,905,746,905,747,905,769,932,769,932,736,932,735,946,735,946,721,946,721,946,722,947,721,932,721,932,688,932,712,903,700,908,717,880,709,884,709,884,731,841,731,841,889,826,889,826,914,876,914,876,904,871,904,871,920,904,920,905,920,906,906,901,907,902,908,902,934,934,934,934,894,933,894,950,894,950,877,951,878,951,879,951,878,933,878,933,838,934,866,900,852,905,872,872,862,877,862,877,889,826,889,826]}]]},{Bz:"0111-0-flowers",AZ:[["8cae40",{s:"M C L C C C L C C L C C C L C C C L C C L C C L Z M C L C C C L C C L C C C L C C C L C C L C C L Z M C L C C C L C C L C C C L C C C L C C L C C L Z M C L C C C L C C L C C C L C C C L C C L C C L Z".split(" "),H:[182,866,160,879,146,903,135,929,135,844,177,842,228,831,230,796,231,770,207,765,182,779,160,792,146,816,135,843,135,713,135,711,134,710,132,710,130,710,128,711,128,713,128,841,117,815,103,791,82,779,57,764,33,769,34,795,36,830,86,841,128,844,128,930,117,903,103,880,82,867,57,853,33,858,34,884,36,919,86,930,128,932,128,1009,128,1010,130,1012,132,1012,134,1012,135,1010,135,1009,135,931,177,928,228,918,230,882,231,856,207,851,182,866,182,866,447,904,430,898,412,904,394,916,394,861,413,873,431,879,447,873,458,868,458,852,447,848,430,841,412,848,394,859,394,788,394,787,393,786,391,786,389,786,388,787,388,788,388,859,370,847,352,841,336,848,325,852,325,868,336,873,352,879,370,873,388,862,388,915,370,904,352,898,336,904,325,909,325,925,336,929,352,936,370,930,388,918,388,1009,388,1010,389,1011,391,1011,393,1011,394,1010,394,1009,394,918,413,930,431,936,447,929,458,925,458,909,447,904,447,904,662,943,650,954,641,972,634,993,634,914,659,907,680,895,692,873,707,846,686,836,662,859,650,870,641,888,634,909,634,818,634,816,632,815,631,815,629,815,628,816,628,818,628,908,621,887,612,870,600,859,576,836,555,846,570,873,582,895,603,907,628,914,628,992,621,971,612,954,600,943,576,920,555,930,570,957,582,978,603,990,628,998,628,1009,628,1010,629,1011,631,1011,632,1011,634,1010,634,1009,634,998,659,991,680,978,692,957,707,930,686,920,662,943,662,943,892,842,875,857,862,882,850,912,850,822,874,817,896,805,908,778,919,755,896,751,877,769,866,779,857,796,850,815,850,737,850,736,848,735,847,735,845,735,844,736,844,737,844,815,836,795,828,779,817,769,798,751,775,755,785,777,797,804,820,817,844,822,844,912,832,882,818,857,801,842,772,816,737,822,753,854,772,894,806,911,844,918,844,1009,844,1010,845,1011,847,1011,848,1011,850,1010,850,1009,850,918,887,911,922,894,941,854,957,822,922,816,892,842,892,842]}],["d13777",{s:"M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M L C L L C C C C L L Z M C C C C Z M C C C C C C C Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C L Z M C C C C C C L Z M C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Z M C C C C Z M C C L L C C C C L L C C L L C C C C L C C C C L Z M C C C Z M C C C L Z M C C C L Z".split(" "),H:[125,603,115,617,112,619,110,618,111,615,122,600,119,597,75,614,43,631,32,650,22,675,36,694,65,682,59,716,94,722,111,696,120,687,126,657,129,604,125,603,125,603,104,638,99,638,95,634,95,629,95,624,99,620,104,620,109,620,113,624,113,629,113,634,109,638,104,638,117,587,100,582,98,579,99,578,102,577,119,583,121,580,92,543,65,517,44,513,17,512,4,531,24,555,-10,560,-6,594,24,603,36,609,67,605,118,591,118,587,117,587,78,578,77,573,79,568,84,567,88,565,93,568,95,573,96,577,94,582,89,584,85,585,80,583,78,578,130,575,130,557,131,554,133,555,135,557,135,575,138,576,164,537,180,504,177,482,171,456,148,449,132,476,117,445,85,460,86,491,84,504,97,532,126,577,130,575,130,575,126,535,130,532,136,533,139,537,142,541,141,546,137,549,133,552,127,551,125,547,122,543,122,538,126,535,146,584,162,577,165,578,166,580,164,582,146,588,147,591,193,604,229,609,249,600,271,585,271,562,240,554,265,530,241,505,212,516,199,518,176,539,143,580,146,584,146,584,183,567,187,570,187,576,185,580,182,584,176,585,172,582,168,579,167,573,170,569,173,565,179,565,183,567,142,601,153,615,153,618,152,619,149,618,138,603,135,605,137,652,144,688,159,704,180,721,202,713,199,681,230,698,246,667,227,643,221,631,194,616,145,597,142,601,142,601,169,631,167,636,162,638,158,637,153,635,151,630,152,625,154,621,159,618,163,620,168,621,170,626,169,631,376,691,343,693,320,697,309,706,297,714,291,729,294,756,294,767,295,779,294,788,305,786,320,788,335,788,353,787,369,782,375,773,382,764,386,739,388,703,381,702,377,699,376,691,363,745,357,757,351,761,345,761,337,760,337,751,343,737,330,742,322,742,319,735,317,728,322,723,331,718,346,712,360,708,374,706,373,720,369,733,363,745,363,745,388,680,387,646,383,623,375,612,366,600,351,594,325,596,314,596,302,597,293,595,295,607,292,622,292,637,292,654,298,671,306,676,315,684,340,689,376,692,377,684,381,680,388,680,388,680,334,665,323,659,318,654,319,648,320,639,329,640,343,645,338,632,339,625,345,621,352,620,358,625,362,634,368,649,372,664,373,677,360,676,347,671,334,665,334,665,399,691,433,690,456,686,467,678,479,670,485,655,484,629,484,617,482,606,484,597,472,598,458,595,442,596,425,596,409,601,403,610,395,618,391,643,388,679,395,680,399,684,399,691,399,691,414,638,420,626,426,622,432,622,440,624,440,633,434,646,447,641,455,642,458,648,459,656,454,661,445,665,430,671,416,675,402,677,403,663,408,650,414,638,414,638,388,703,390,736,394,759,403,770,411,782,426,788,452,785,464,785,475,784,485,785,483,774,485,759,485,744,484,726,479,710,470,704,461,697,436,693,400,691,399,698,395,702,388,703,388,703,442,716,453,722,458,728,458,734,456,742,447,742,434,736,439,749,438,757,432,760,425,762,419,757,415,748,409,733,404,719,403,705,416,706,429,710,442,716,442,716,722,716,722,701,710,690,696,690,695,690,694,690,693,690,693,689,694,689,695,688,705,678,705,662,695,651,685,641,668,641,658,651,658,652,657,653,656,654,656,653,656,652,656,651,656,637,645,625,630,625,616,625,605,637,605,651,605,652,605,653,605,654,604,654,604,653,603,652,593,642,576,642,566,652,556,662,556,679,566,689,567,690,568,690,569,691,568,691,567,691,566,691,552,691,540,702,540,717,540,731,552,743,566,743,567,743,568,743,569,742,569,743,568,744,567,744,557,754,557,771,567,781,577,791,594,791,604,781,605,780,605,779,606,778,606,779,606,780,606,781,606,795,617,807,632,807,646,807,657,795,657,781,657,780,657,779,657,778,658,779,658,779,659,780,669,790,686,790,696,780,706,770,706,754,696,743,695,743,694,742,693,741,694,741,695,741,696,741,710,741,722,730,722,716,631,762,605,762,585,742,585,716,585,691,605,670,631,670,657,670,677,691,677,716,677,742,657,762,631,762,958,602,957,570,951,547,940,532,925,541,905,565,887,591,886,591,886,546,892,545,897,540,897,533,897,527,891,521,884,521,877,521,872,527,872,533,872,540,876,545,882,546,882,591,882,591,870,564,860,536,848,525,833,541,820,565,808,592,807,592,807,546,813,545,817,540,817,533,817,527,812,521,805,521,798,521,792,527,792,533,792,540,797,545,802,546,802,590,784,567,766,545,755,534,729,588,731,639,766,684,787,711,814,726,847,725,919,724,960,659,958,602,958,602,783,671,772,653,777,645,789,648,812,656,830,682,840,711,821,704,797,692,783,671,836,634,840,614,850,612,856,622,867,644,861,676,848,703,840,684,831,659,836,634,836,634,919,659,911,682,885,701,856,711,863,692,875,668,896,654,913,642,922,647,919,659,919,659]}]]},{Bz:"1101-1-confetti",AZ:[["e789ff",{s:"M C C C C C Z M C C C C C C C Z M C C C C C C C Z M C C C C C Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z".split(" "),H:[170,439,169,438,59,370,108,300,152,238,298,276,318,337,338,398,265,380,285,358,312,328,185,247,121,307,72,353,171,440,170,439,318,338,336,399,262,408,184,346,138,309,73,237,112,174,167,88,345,115,377,222,393,276,296,260,335,236,375,212,236,111,155,183,73,254,265,380,285,358,312,328,318,338,318,338,377,222,394,276,318,288,243,236,187,197,146,120,201,56,254,-5,365,26,407,68,407,68,414,94,378,71,344,50,258,31,221,89,178,154,297,260,336,235,374,211,377,222,377,222,406,70,452,115,432,189,324,115,214,39,323,-85,322,-85,320,-85,229,38,331,100,439,166,413,95,377,72,343,51,364,28,406,70,346,405,369,418,356,441,333,428,346,405,513,298,536,311,523,334,500,321,513,298,891,91,914,104,901,127,878,114,891,91,24,123,47,136,34,159,11,146,24,123,664,33,687,46,674,69,651,56,664,33,910,482,933,495,920,518,897,505,910,482]}],["666666",{s:"M C C C C C Z M C C C C C C C Z M C C C C C C C Z M C C C C C Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z".split(" "),H:[919,442,917,443,802,510,764,432,730,364,837,250,901,261,965,272,913,329,903,301,889,262,755,338,777,424,794,490,920,442,919,442,901,261,964,274,936,345,842,386,787,410,690,435,654,370,604,279,716,132,827,153,883,164,821,244,819,197,817,150,659,228,682,335,706,443,913,329,903,301,889,262,901,261,901,261,827,153,884,163,857,238,774,281,711,313,622,313,593,233,564,157,647,71,705,54,705,54,732,60,694,82,658,102,599,170,632,231,669,301,822,244,819,197,816,150,827,153,827,153,706,54,769,34,825,87,706,149,583,213,527,56,526,57,526,59,590,200,696,137,807,70,732,60,694,82,658,102,648,73,706,54,362,328,383,340,371,361,350,349,362,328,52,189,73,201,61,222,40,210,52,189,509,119,530,131,517,152,496,140,509,119,912,16,933,28,921,49,900,37,912,16,629,380,650,392,638,413,617,401,629,380,77,414,98,426,86,447,65,435,77,414,240,76,261,88,249,109,228,97,240,76]}]]},{Bz:"1101-1-branch",AZ:[["7f500b",{s:"M C C C L C C Z M C C C L C C Z M C C C L C C Z M C C C L C C Z M C C C L C C Z M C C C L C C Z".split(" "),H:[144,-14,144,-14,149,-12,150,-12,150,-12,106,22,86,75,63,137,93,193,69,238,64,236,89,174,53,146,80,72,99,19,144,-14,144,-14,280,-18,281,-18,276,-20,276,-20,276,-20,282,23,264,64,244,113,196,129,185,168,189,170,209,120,244,123,269,66,288,25,280,-18,280,-18,429,-5,429,-5,434,-4,434,-4,435,-4,405,28,396,72,386,124,415,164,402,203,398,202,410,150,379,132,391,70,399,26,429,-5,429,-5,514,-7,514,-7,519,-12,519,-12,520,-12,532,50,577,96,630,151,703,150,738,197,733,201,681,144,635,166,571,101,526,54,514,-7,514,-7,666,-67,666,-68,663,-65,662,-64,662,-64,704,-52,734,-18,768,22,763,72,793,99,796,96,760,57,778,26,737,-22,708,-56,666,-67,666,-67,936,-8,936,-8,932,-9,931,-9,931,-9,947,32,938,76,927,127,884,154,881,194,886,195,895,142,930,138,943,76,952,32,936,-8,936,-8]}],["5c7f0b",{s:"M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z".split(" "),H:[119,6,121,16,113,31,81,33,58,34,27,27,27,27,27,27,53,5,70,-1,93,-9,117,-4,119,6,124,8,132,1,151,12,165,33,179,54,180,87,180,87,180,87,153,75,139,60,122,41,115,14,124,8,78,74,82,83,76,97,48,103,27,108,-2,105,-2,105,-2,105,19,81,33,74,53,64,75,65,78,74,83,75,90,68,108,76,124,93,139,110,144,140,144,140,144,140,117,132,104,121,85,105,76,83,83,75,72,152,75,159,72,172,48,179,30,185,6,185,6,185,6,185,22,163,33,156,49,145,68,145,72,152,76,153,81,146,98,151,112,165,126,178,133,203,133,203,133,203,110,199,97,190,80,178,70,160,76,153,73,206,75,213,71,224,49,228,34,232,12,230,12,230,12,230,28,212,39,206,53,199,70,200,73,206,76,207,81,202,95,207,107,220,118,233,122,255,122,255,122,255,102,250,92,241,78,230,71,213,76,207,70,232,78,236,76,252,66,269,56,286,33,297,33,297,33,297,33,274,39,260,46,241,62,228,70,232,285,3,278,8,274,21,291,39,304,52,325,63,325,63,325,63,323,36,316,24,308,7,291,-2,285,3,281,1,280,-7,263,-10,244,-5,224,1,205,20,205,20,205,20,228,27,244,25,264,22,283,10,281,1,270,65,264,69,259,80,272,99,281,112,299,125,299,125,299,125,300,100,296,88,290,72,277,61,270,65,267,64,267,56,252,51,234,53,216,56,197,71,197,71,197,71,216,80,230,80,249,80,267,72,267,64,231,116,225,119,220,128,230,145,237,157,251,170,251,170,251,170,254,148,251,138,248,123,237,113,231,116,228,114,229,108,217,102,201,103,186,103,168,115,168,115,168,115,184,124,196,126,212,127,228,121,228,114,201,148,196,151,192,160,202,174,209,184,222,194,222,194,222,194,223,175,220,166,216,154,206,145,201,148,198,147,198,141,187,137,174,139,160,141,145,152,145,152,145,152,160,159,171,159,185,160,198,153,198,147,188,165,182,163,173,174,170,190,167,205,173,224,173,224,173,224,186,210,191,198,197,183,195,166,188,165,415,10,417,18,413,31,389,36,371,39,347,37,347,37,347,37,364,16,377,9,393,0,412,2,415,10,418,11,424,4,440,11,453,27,466,43,470,69,470,69,470,69,448,62,436,52,420,38,412,17,418,11,391,69,394,76,392,89,371,96,355,102,333,103,333,103,333,103,346,81,357,74,371,64,388,63,391,69,395,70,399,63,414,68,428,80,441,92,448,116,448,116,448,116,427,113,415,105,400,94,390,77,395,70,395,133,398,139,397,150,379,158,367,164,348,167,348,167,348,167,358,148,366,140,377,130,391,128,395,133,398,134,401,128,414,130,427,140,439,149,447,169,447,169,447,169,429,167,418,162,404,154,394,140,398,134,401,177,404,182,402,192,386,198,374,202,358,203,358,203,358,203,368,187,375,181,386,173,399,172,401,177,404,178,408,173,419,176,429,185,439,194,445,212,445,212,445,212,429,210,420,204,408,196,401,183,404,178,402,198,408,201,409,214,403,229,397,244,381,255,381,255,381,255,378,236,381,224,385,208,396,196,402,198,519,23,531,26,543,42,528,75,518,99,495,125,495,125,495,125,485,87,487,67,490,40,508,19,519,23,523,19,521,7,542,-6,571,-8,600,-10,636,6,636,6,636,6,609,27,586,32,557,39,526,32,523,19,570,100,581,102,594,115,585,147,579,170,562,197,562,197,562,197,548,163,547,145,547,120,560,98,570,100,574,97,570,86,587,72,613,66,639,60,673,71,673,71,673,71,652,93,632,101,607,110,578,107,574,97,649,149,659,150,670,160,666,188,662,208,650,232,650,232,650,232,635,205,633,189,631,168,640,149,649,149,652,146,648,137,662,123,683,116,705,109,734,116,734,116,734,116,718,137,702,145,681,155,657,155,652,146,707,178,715,179,724,189,718,213,714,230,701,250,701,250,701,250,690,225,690,211,689,193,699,177,707,178,710,175,707,167,720,156,739,151,759,147,784,155,784,155,784,155,768,172,753,177,734,185,713,183,710,175,732,194,740,189,757,199,770,218,782,237,783,266,783,266,783,266,758,254,746,240,730,223,724,199,732,194,687,-62,688,-54,699,-45,722,-53,739,-59,759,-73,759,-73,759,-73,733,-82,719,-82,701,-81,685,-71,687,-62,684,-60,676,-62,666,-48,662,-28,659,-9,669,17,669,17,669,17,684,-1,689,-16,696,-35,692,-57,684,-60,737,-23,738,-15,746,-5,768,-9,784,-12,804,-23,804,-23,804,-23,782,-34,769,-36,752,-38,736,-30,737,-23,734,-20,727,-24,716,-13,711,5,705,22,711,46,711,46,711,46,727,33,734,20,742,3,742,-17,734,-20,766,35,766,41,772,50,792,48,806,47,823,40,823,40,823,40,805,28,795,26,780,23,766,28,766,35,763,37,758,33,747,42,741,56,735,70,738,91,738,91,738,91,753,81,760,71,768,57,769,40,763,37,782,76,783,82,789,89,806,86,818,84,832,76,832,76,832,76,816,67,806,66,794,65,782,70,782,76,780,78,775,75,766,84,762,97,758,110,762,128,762,128,762,128,775,118,779,108,786,95,785,80,780,78,792,94,788,100,794,112,807,122,819,131,839,133,839,133,839,133,832,116,823,107,812,95,796,89,792,94,945,11,939,18,938,31,959,45,974,55,997,62,997,62,997,62,989,36,980,25,968,11,950,5,945,11,941,11,938,3,921,3,903,13,885,22,871,45,871,45,871,45,894,47,909,42,929,35,944,19,941,11,944,75,938,80,935,93,952,108,964,119,984,128,984,128,984,128,980,104,974,93,965,78,949,70,944,75,940,75,938,67,923,65,906,71,889,77,873,96,873,96,873,96,894,101,908,99,926,95,942,82,940,75,916,133,911,137,907,147,920,162,930,172,946,182,946,182,946,182,944,160,940,151,933,137,921,129,916,133,913,132,912,125,899,123,884,127,869,130,854,145,854,145,854,145,871,151,883,150,899,148,913,139,913,132,893,171,888,175,887,184,899,196,908,204,923,211,923,211,923,211,920,193,915,184,909,173,897,167,893,171,890,170,889,165,877,163,864,168,851,172,839,187,839,187,839,187,855,190,865,188,879,186,891,176,890,170,884,190,877,190,871,202,871,218,871,234,881,251,881,251,881,251,891,234,893,222,896,206,890,190,884,190]}]]},{Bz:"1101-1-sticks",AZ:[["ec7272",{s:"M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z".split(" "),H:[260,148,297,180,286,192,249,160,260,148,114,31,161,47,155,63,109,47,114,31,931,91,902,52,915,42,945,81,931,91,711,19,746,-15,758,-3,723,31,711,19,812,161,782,122,795,112,825,151,812,161,389,34,424,0,436,12,401,46,389,34,431,209,465,175,477,186,442,221,431,209,282,90,282,41,299,41,299,90,282,90,58,233,29,194,42,184,72,223,58,233,574,58,621,74,615,90,569,74,574,58]}],["0000ff",{s:"M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z M L L L L Z".split(" "),H:[722,208,733,161,717,157,706,205,722,208,843,12,797,28,802,44,849,28,843,12,31,74,60,35,47,25,18,64,31,74,220,21,185,-13,173,-1,208,33,220,21,140,166,170,127,157,117,127,156,140,166,558,148,523,114,511,126,546,160,558,148,562,9,516,25,521,41,568,25,562,9,697,105,726,66,713,56,684,95,697,105,961,180,990,141,977,131,948,170,961,180,399,97,353,113,358,129,405,113,399,97]}]]},{Bz:"1101-1-dots",AZ:[["ec7272",{s:"M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z".split(" "),H:[154,47,144,47,136,39,136,29,136,19,144,11,154,11,164,11,172,19,172,29,172,39,164,47,154,47,272,164,262,164,254,156,254,146,254,136,262,128,272,128,282,128,290,136,290,146,290,156,282,164,272,164,529,48,519,48,511,40,511,30,511,20,519,12,529,12,539,12,547,20,547,30,547,40,539,48,529,48,696,101,686,101,678,93,678,83,678,73,686,65,696,65,706,65,714,73,714,83,714,93,706,101,696,101,929,91,919,91,911,83,911,73,911,63,919,55,929,55,939,55,947,63,947,73,947,83,939,91,929,91]}],["0000ff",{s:"M C C C C Z M C C C C Z M C C C C Z M C C C C Z M C C C C Z".split(" "),H:[66,122,56,122,48,114,48,104,48,94,56,86,66,86,76,86,84,94,84,104,84,114,76,122,66,122,309,55,299,55,291,47,291,37,291,27,299,19,309,19,319,19,327,27,327,37,327,47,319,55,309,55,785,180,775,180,767,172,767,162,767,152,775,144,785,144,795,144,803,152,803,162,803,172,795,180,785,180,459,147,449,147,441,139,441,129,441,119,449,111,459,111,469,111,477,119,477,129,477,139,469,147,459,147,811,48,801,48,793,40,793,30,793,20,801,12,811,12,821,12,829,20,829,30,829,40,821,48,811,48]}],["88a500",{s:["M","C","C","Z"],H:[389,224,389,224,410,230,410,230,410,230,389,224,389,224]}]]},{Bz:"1101-1-strips",AZ:[["ffc88c",{s:"M L L L L Z M L L L L Z M L L L L Z".split(" "),H:[-40,0,44,0,137,99,53,99,-40,0,296,0,380,0,473,99,389,99,296,0,632,0,716,0,809,99,725,99,632,0]}],["88a500",{s:"M L L L L Z M L L L L Z M L L L L Z".split(" "),H:[128,0,212,0,305,99,221,99,128,0,464,0,548,0,641,99,557,99,464,0,800,0,884,0,977,99,893,99,800,0]}],["88a500",{s:["M","C","C","Z"],H:[407,217,407,217,428,223,428,223,428,223,407,217,407,217]}]]},{Bz:"1101-1-circs",AZ:[["ec7272",{s:"M C C C C Z M C C C C Z".split(" "),H:[61,209,27,209,0,181,0,147,0,113,27,86,61,86,96,86,123,113,123,147,123,181,96,209,61,209,551,209,517,209,489,181,489,147,489,113,517,86,551,86,585,86,612,113,612,147,612,181,585,209,551,209]}],["217995",{s:"M C C C C Z M C C C C Z".split(" "),H:[303,209,269,209,241,181,241,147,241,113,269,86,303,86,337,86,364,113,364,147,364,181,337,209,303,209,799,209,765,209,738,181,738,147,738,113,765,86,799,86,834,86,861,113,861,147,861,181,834,209,799,209]}],["88a500",{s:["M","C","C","Z"],H:[530,273,530,273,551,279,551,279,551,279,530,273,530,273]}]]},{Bz:"1101-1-squares",AZ:[["014ea7",{s:"M L L L L Z M L L L L Z".split(" "),H:[0,120,124,120,124,244,0,244,0,120,497,120,621,120,621,244,497,244,497,120]}],["fc54ff",{s:"M L L L L Z M L L L L Z".split(" "),H:[249,120,373,120,373,244,249,244,249,120,746,120,870,120,870,244,746,244,746,120]}],["88a500",{s:["M","C","C","Z"],H:[389,354,389,354,410,360,410,360,410,360,389,354,389,354]}]]},{Bz:"1101-0-christmas",AZ:[["014ea7",{s:"M C C C C Z M C C C C Z M L L L L Z".split(" "),H:[255,480,178,480,116,418,116,341,116,264,178,202,255,202,332,202,394,264,394,341,394,418,332,480,255,480,255,232,236,232,221,217,221,198,221,179,236,164,255,164,274,164,289,179,289,198,289,217,274,232,255,232,251,-152,260,-152,260,248,251,248,251,-152]}],["ff9518",{s:"M C C C C Z M C C C C Z M L L L L Z".split(" "),H:[746,623,669,623,607,561,607,484,607,407,669,345,746,345,823,345,885,407,885,484,885,561,823,623,746,623,747,376,728,376,713,361,713,342,713,323,728,308,747,308,766,308,781,323,781,342,781,361,766,376,747,376,742,-8,751,-8,751,392,742,392,742,-8]}]]}];
var iw={};iw.parse=function(n){var F=new Uint8Array(n),O=null;if(F[0]==80&&F[1]==75){var I=Date.now(),x=UZIP.parse(F.buffer),O=x["document.json"];
O=JSON.parse(Y.l5(O,0,O.length));iw.Se(O,x)}else{var r=ck.parse(n);O=iw.WV(r[2][0][1])}return O};iw.Se=function(n,F){var O=typeof n;
if(O=="string"||O=="number"||O=="boolean")return n;if(n instanceof Array){for(var e=0;e<n.length;e++)n[e]=iw.Se(n[e],F);
return n}var I=n._class;if(I==null)return n;if(I=="MSJSONFileReference"){var x=n._ref;if(!1){}else if(F[x+".json"]!=null){var r=F[x+".json"],_=r.length;
for(var e=0;e<_;e++)if(r[e]==11||r[e]==3)r[e]=32;var d=Y.l5(r,0,_);n=JSON.parse(d)}else if(F[x+".png"]!=null)return{key:x.split("/").pop(),bdata:F[x+".png"]};
else if(F[x+".jpg"]!=null)return{key:x.split("/").pop(),bdata:F[x+".jpg"]};else if(F[x+".pdf"]!=null)return{key:x.split("/").pop(),bdata:F[x+".pdf"]};
else if(F[x]!=null)return{key:x.split("/").pop(),bdata:F[x]};else{console.log(n,F);return}}else if(I=="MSAttributedString"){var d=atob(n.archivedAttributedString._archive),w=d.length-1,Z=new Uint8Array(w);
for(var e=0;e<w;e++)Z[e]=d.charCodeAt(e);n.archivedAttributedString=iw.WV(Z)}for(var P in n)n[P]=iw.Se(n[P],F);
return n};iw.o2=function(n,F,O,I){if(n instanceof Uint8Array)return null;if(I.indexOf(n)!=-1)return null;
I.push(n);if(n==F)return O;for(var x in n){O.push(x);var r=iw.o2(n[x],F,O,I);if(r){console.log(n,r);
throw"e"}O.pop()}};iw.WV=function(n){var F=h7.parse(n,0),O=F.$objects,I=new Uint8Array(O.length),x=iw.gw(O,I,F.$top.root);
for(var e=0;e<O.length;e++)if(I[e]==0&&e!=0){console.log(e,O[e]);iw.o2(x,e,[],[])}for(var e=0;e<O.length;
e++){var r=O[e];if(r._class&&(r._class=="bitmap"||r._class=="fill"&&r.fillType==4&&(r.image||r.imageSHA))){var _=r.image,d=r.imageSHA,w=null,Z=null;
if(_=="$null")_=null;if(d=="$null")d=null;if(_&&_.data){Z=_.sha1["NS.bytes"];Z=btoa(Y.su(Z,0,Z.length));
w=_.data instanceof Uint8Array?_.data:_.data["NS.bytes"]}else if(_==null&&d==null){var P=fx.rM("PNG").eJ([[q.f(4).buffer]],1,1);
w=new Uint8Array(P)}else{var C=(x.assets?x.assets.imageCollection:x.images).images;if(d)Z=d instanceof Uint8Array?d:d["NS.bytes"];
else Z=_.sha1["NS.bytes"];Z=btoa(Y.su(Z,0,Z.length));var w=C[Z].data;if(w["NS.bytes"])w=w["NS.bytes"]}w=new Uint8Array(w.buffer.slice(w.byteOffset,w.byteOffset+w.length));
delete r.imageSHA;r.image={key:Z,bdata:w}}}return x};iw.anw=function(n){return n.slice(0,11)=="MSImmutable"?"MS"+n.slice(11):n};
iw.gw=function(n,F,O){var I=n[O];if(F[O]==1){return I}F[O]=1;if(typeof I=="string")return I;if(typeof I=="number")return I;
if(typeof I=="boolean")return I;if(I instanceof Array)return I;if(I instanceof Uint8Array){return I}if(n[I.$class]==null){if(I.$class==null&&I["NS.data"]!=null)return I;
console.log(O,I);throw"e"}var x=n[I.$class],r=iw.anw(x.$classname);F[I.$class]=1;I.$class=r;if(iw.bo[r]){delete I.$class;
I._class=iw.bo[r]}var _=iw.gw;if(r=="NSMutableArray"||r=="NSArray"){var d=[];if(I["NS.objects"]!=null)for(var e=0;
e<I["NS.objects"].length;e++)d.push(_(n,F,I["NS.objects"][e]));else for(var e=0;I["NS.object."+e]!=null;
e++)d.push(_(n,F,I["NS.object."+e]));n[O]=d;return d}if(r=="NSDictionary"||r=="NSMutableDictionary"){var w={$class:r};
if(I["NS.keys"]!=null)for(var e=0;e<I["NS.keys"].length;e++){var Z=_(n,F,I["NS.keys"][e]);if(Z instanceof Uint8Array)Z=btoa(iw._9.su(Z,0,Z.length));
else if(typeof Z!="string"&&typeof Z!="number")Z=btoa(iw._9.su(Z["NS.bytes"],0,Z["NS.bytes"].length));
w[Z]=_(n,F,I["NS.objects"][e])}else for(var e=0;I["NS.key."+e]!=null;e++){var Z=_(n,F,I["NS.key."+e]);
if(Z instanceof Uint8Array)Z=btoa(iw._9.su(Z,0,Z.length));else if(typeof Z!="string"&&typeof Z!="number")Z=btoa(iw._9.su(Z["NS.bytes"],0,Z["NS.bytes"].length));
w[Z]=_(n,F,I["NS.object."+e])}for(var P in I)delete I[P];for(var P in w)I[P]=w[P];return I}if(r=="NSURL")return{$class:r,base:_(n,F,I["NS.base"]),relative:_(n,F,I["NS.relative"])};
if(iw.akn.indexOf(r)!=-1){n[O]=_(n,F,I.array_do);return n[O]}if(I.do_objectID!=null)I.do_objectID=_(n,F,I.do_objectID);
if(iw.a8m.indexOf(r)!=-1)return I;var C=iw.a05[r];if(C==null){console.log(n,I);throw"unknown class "+r}for(var e=0;
e<C.length;e++)if(I[C[e]]!=null)I[C[e]]=_(n,F,I[C[e]]);if(r=="MSTextLayer"){var W=I,v,L,H,y;if(W.attributedString)v=W.attributedString.archivedAttributedString;
else v=W.storage;y=v.NSString;if(typeof y!="string")y=Y.l5(y["NS.bytes"],0,y["NS.bytes"].length);if(v.NSAttributeInfo)L=v.NSAttributeInfo["NS.bytes"];
else{var g=y.length,Q=[];while(g>0){var J=Math.min(100,g);Q.push(J,0);g-=J}L=new Uint8Array(Q)}H=v.NSAttributes instanceof Array?v.NSAttributes:[v.NSAttributes];
var A={$class:"NSAttributedString",NSString:y,NSAttributes:H};W.attributedString={_class:"MSAttributedString",archivedAttributedString:A};
A.NSAttributeInfo={$class:"NSMutableData","NS.data":L};delete W.storage}return I};iw._9={Ys:function(n,F){return n[F+1]<<8|n[F]},c:function(n,F){return n[F+3]<<24|n[F+2]<<16|n[F+1]<<8|n[F]},su:function(n,F,O){var I="";
for(var e=0;e<O;e++)I+=String.fromCharCode(n[F+e]);return I}};iw.bo={MSPage:"page",MSArtboardGroup:"artboard",MSShapeGroup:"shapeGroup",MSLayerGroup:"group",MSBitmapLayer:"bitmap",MSTextLayer:"text",MSSliceLayer:"slice",MSSymbolMaster:"symbolMaster",MSSymbolInstance:"symbolInstance",MSStyleFill:"fill",MSShapePathLayer:"shapePath",MSRectangleShape:"rectangle",MSOvalShape:"oval",MSTriangleShape:"triangle"};
iw.akn=["MSArray","MSFillStyleCollection","MSBorderStyleCollection","MSShadowStyleCollection","MSInnerShadowStyleCollection"];
iw.a8m="MSArchivedColor MSLayoutGrid MSSimpleGrid MSColor MSRect MSStyleColorControls MSGraphicsContextSettings NSMutableString NSMutableData NSDecimalNumberPlaceholder MSStyleReflection".split(" ");
iw.a05={MSAssetCollection:["gradients","colors","imageCollection","images"],MSImageCollection:["images"],MSSharedStyleContainer:["objects"],MSSharedTextStyleContainer:["objects"],MSSharedLayerStyleContainer:["objects"],MSSharedLayerTextStyleContainer:["objects"],MSSharedLayerContainer:["objects"],MSSymbolContainer:["objects"],MSGradient:["stops","from","to","points"],MSGradientStop:["color"],MSStyleFill:["color","gradient","contextSettings","image","imageSHA"],MSExportFormat:["fileFormat","name"],MSExportOptions:["exportFormats","includedLayerIds","sizes"],MSRulerData:["guides"],MSStyle:"textStyle fills contextSettings sharedObjectID borders blur shadows innerShadows borderOptions colorControls reflection".split(" "),MSSharedStyle:["name","value"],MSSymbol:["name","value"],MSAttributedString:["archivedAttributedString"],MSSharedLayerStyle:["name","value","instances"],MSSharedLayer:["name","value","instances"],MSDocumentData:"assets layerStyles pages layerTextStyles layerSymbols images userInfo".split(" "),MSShapePathLayer:"exportOptions frame name userInfo path originalObjectID".split(" "),MSOvalShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSRectangleShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSPolygonShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSTriangleShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSStarShape:"exportOptions frame name userInfo path originalObjectID".split(" "),MSBitmapLayer:"exportOptions frame name userInfo style imageSHA nineSliceCenterRect nineSliceScale image clippingMask originalObjectID".split(" "),MSTextLayer:"exportOptions frame name userInfo style originalObjectID attributedString glyphBounds storage".split(" "),MSShapeGroup:"exportOptions frame name userInfo style originalObjectID layers".split(" "),MSLayerGroup:"exportOptions frame name userInfo style originalObjectID layers sharedObjectID".split(" "),MSArtboardGroup:"exportOptions frame name userInfo style layers horizontalRulerData verticalRulerData layout grid backgroundColor".split(" "),MSPage:"exportOptions frame name userInfo style layers horizontalRulerData verticalRulerData layout grid scrollOrigin".split(" "),MSSymbolMaster:"exportOptions frame name userInfo style layers horizontalRulerData verticalRulerData layout grid originalObjectID symbolID backgroundColor".split(" "),MSSymbolInstance:"exportOptions frame name userInfo style symbolID overrides masterInfluenceBounds originalObjectID".split(" "),MSSliceLayer:["exportOptions","frame","name","userInfo","backgroundColor"],MSTextStyle:["attributes","encodedAttributes"],MSShapePath:["points"],MSPointArray:["points"],MSImageData:["data","sha1","name"],MSCurvePoint:["curveFrom","curveTo","point"],MSImageProxy:["sha1"],MSStyleBorder:["color","gradient","contextSettings"],MSStyleBlur:["center"],MSStyleShadow:["color","contextSettings"],MSStyleInnerShadow:["color","contextSettings"],MSExportSize:["format","name"],MSStyleBorderOptions:["dashPattern"],NSFont:["NSName","NSDescriptor"],NSColor:["NSCustomColorSpace"],NSFontDescriptor:["NSFontDescriptorAttributes"],NSMutableParagraphStyle:["NSTextBlocks","NSTabStops","NSTextLists"],NSAttributedString:["NSAttributes","NSString","NSAttributeInfo"],NSTextStorage:["NSAttributeInfo","NSAttributes","NSString"],NSColorSpace:["NSICC"],NSParagraphStyle:["NSTabStops","NSTextBlocks","NSTextLists"],NSTextList:["NSMarkerFormat"],NSTextTab:["NSTabOptions"],UIFontDescriptor:["UIFontDescriptorAttributes"]};
var h7={};h7.parse=function(n,F){var O=Y.su(n,F,8);F+=8;var I=h7.parse.aih(n,n.length-31),x=[];if(I.IV==1){var F=n.length-31-I.IV*I.bD;
for(var e=0;e<I.bD;e++)x.push(n[F+e])}else if(I.IV==2){var F=n.length-31-I.IV*I.bD;for(var e=0;e<I.bD;
e++)x.push(Y.Ys(n,F+e*2))}else if(I.IV==4){var F=n.length-31-I.IV*I.bD;for(var e=0;e<I.bD;e++)x.push(Y.c(n,F+e*4))}else{throw"e"}var r=h7.parse.gw(n,x,I.root,I);
return r};h7.parse.gw=function(n,F,O,I){var x=h7._9,r=I.a7D,_=r==4?x.c:r==2?x.Ys:x.aiz,d=h7.parse,w=F[O],Z=n[w],P=Z>>4,C=Z&15,v=null;
w+=1;if([4,5,6,10,12,13].indexOf(P)!=-1&&C==15){var W=d.Z3(n,w);w+=W.GM;C=W.G}if(!1){}else if(P==0)v=C==8?!1:C==9?!0:null;
else if(P==1)v=d.Z3(n,w-1).G;else if(P==2)v=1<<C==4?Y.LD(n,w):Y.z6(n,w);else if(P==3)v=Y.z6(n,w);else if(P==4)v=new Uint8Array(n.buffer,w,C);
else if(P==5)v=Y.su(n,w,C);else if(P==6)v=Y.ZK(n,w,C);else if(P==8){v=0;for(var e=0;e<C+1;e++)v=v<<8|n[w+e]}else if(P==10){v=[];
for(var e=0;e<C;e++)v.push(d.gw(n,F,_(n,w+r*e),I))}else if(P==12){v=[];for(var e=0;e<C;e++)v.push(d.gw(n,F,_(n,w+r*e),I))}else if(P==13){v={};
for(var e=0;e<C;e++){var L=d.gw(n,F,_(n,w+r*e),I),H=d.gw(n,F,_(n,w+r*(C+e)),I);v[L]=H}}else throw"unknown mask "+P;
return v};h7.parse.Z3=function(n,F){var O=1<<(n[F]&15),I=0;for(var e=0;e<O;e++)I=I<<8|n[F+1+e];return{G:I,GM:O+1}};
h7.parse.aih=function(n,F){var O={};F+=6;O.IV=n[F];F++;O.a7D=n[F];F++;F+=4;O.bD=Y.c(n,F);F+=4;F+=4;O.root=Y.c(n,F);
F+=4;F+=4;O.a6t=Y.c(n,F);F+=4;return O};h7._9={aiz:function(n,F){return n[F]},Ys:function(n,F){return n[F]<<8|n[F+1]},c:function(n,F){return n[F]<<24|n[F+1]<<16|n[F+2]<<8|n[F+3]},su:function(n,F,O){var I="";
for(var e=0;e<O;e++)I+=String.fromCharCode(n[F+e]);return I}};var ck={parse:function(n){var F=new Uint8Array(n),O=ck.rf(F),I=[],x=new Uint8Array(F.length),r=[];
I.push(r);ck.kr(F,O,1,x,r);for(var e=0;e<r.length;e++){var _=[];I.push(_);ck.kr(F,O,r[e][3],x,_);r[e][3]=e+1}return I},kr:function(n,F,O,I,x){O--;
var r=O*F.mt+(O==0?100:0),_=n[r],d=ck.Ys(n,r+1);if(d!=0)throw"free block in a page";var w=ck.Ys(n,r+3),Z=ck.Ys(n,r+5);
if(Z==0)Z=65536;var P=n[r+7],C=ck.Ys(n,r+8);if(_==2||_==5)r+=4;else C=0;for(var W=0;W<w;W++){var v=O*F.mt+ck.Ys(n,r+8+2*W),L=-1,H=0,y=0,g=0;
if(_==2||_==5){L=ck.c(n,v);v+=4}if(_==2||_==10||_==13){H=ck.eI(n,v);v+=H.GM}if(_==5||_==13){y=ck.eI(n,v);
v+=y.GM}if(_==5){ck.kr(n,F,L,I,x);continue}var Q=F.mt-(O==0?100:0),J=H.K_,A=_==13?Q-35:Math.floor((Q-12)*64/255)-23,p=Math.floor((Q-12)*32/255)-23,U=p+(J-p)%(Q-4);
if(J<=A){ck.Ct(n,v,I,0,J)}else{var j=U<=A?U:p,b=0;ck.Ct(n,v,I,0,j);b+=j;g=ck.c(n,v+j);while(g!=0){var s=(g-1)*F.mt;
g=ck.c(n,s);var G=Math.min(F.mt-4,J-b);ck.Ct(n,s+4,I,b,G);b+=G}}x.push(ck.a0P(I,J))}},a0P:function(n,F){var O=0,I=ck.eI(n,O);
O+=I.GM;var x=[],r=[];while(O<I.K_){var _=ck.eI(n,O);O+=_.GM;x.push(_.K_)}if(O!=I.K_)throw"e";for(var e=0;
e<x.length;e++){var _=x[e];if(!1){}else if(_==0)r.push(null);else if(_==1){r.push(ck.aky(n,O));O+=1}else if(_==2){r.push(ck.W0(n,O));
O+=2}else if(_==3){r.push(ck.akU(n,O));O+=3}else if(_==4){r.push(ck.Z3(n,O));O+=4}else if(_==7){r.push(ck.a2d(n,O));
O+=16}else if(_==8)r.push(0);else if(_==9)r.push(1);else if(_>=12&&(_&1)==0){var d=_-13>>1,w=new Uint8Array(d);
ck.Ct(n,O,w,0,d);r.push(w);O+=d}else if(_>=13&&(_&1)==1){var d=_-12>>1;r.push(ck.l5(n,O,d));O+=d}else throw"unknonw type "+_}return r},rf:function(n){if(!(n[18]==1&&n[19]==1&&n[20]==0&&n[21]==64&&n[22]==32&&n[23]==32))throw"unexpected SQL3 header";
var F={vn:ck.su(n,0,15),mt:ck.Ys(n,16),a7y:ck.c(n,24),size:ck.c(n,28),a3I:ck.c(n,32),agB:ck.c(n,36),a1g:ck.c(n,40),aeG:ck.c(n,44),a18:ck.c(n,48),a0H:ck.c(n,52),akT:ck.c(n,56),anj:ck.c(n,60),ah7:ck.c(n,64)!=0,a9c:ck.c(n,68),a2y:ck.c(n,92),a5W:ck.c(n,96)};
if(F.mt==1)F.mt=65536;if(F.akT!=1)throw"unsupported text encoding "+F.akT;return F},ann:function(n,F){return n[F]<<16|n[F+1]<<8|n[F+2]},akU:function(n,F){var O=ck.ann(n,F),I=O&8388608;
return I?-(16777215-O+1):O},aky:function(n,F){ck.yo[0]=n[F];return ck.amO[0]},Z3:function(n,F){var O=ck.yo;
for(var e=0;e<4;e++)O[e]=n[F+3-e];return ck.an7[0]},W0:function(n,F){var O=ck.yo;O[0]=n[F+1];O[1]=n[F];
return ck.anI[0]},Ys:function(n,F){return n[F]<<8|n[F+1]},c:function(n,F){return n[F]<<24|n[F+1]<<16|n[F+2]<<8|n[F+3]},a2d:function(n,F){var O=ck.yo;
for(var e=0;e<8;e++)O[e]=n[F+7-e];return ck.a82[0]},eI:function(n,F){var O=F,E=0;while(!0){var I=n[F];
F++;E=E*128+(I&127);if(I<128)break}return{K_:E,GM:F-O}},su:function(n,F,O){var I="";for(var e=0;e<O;
e++)I+=String.fromCharCode(n[F+e]);return I},l5:function(n,F,O){var I="";for(var e=0;e<O;e++)I+="%"+ck.a2f(n[F+e].toString(16));
return decodeURIComponent(I)},Ct:function(n,F,O,I,x){if(n[F+x-1]==null||O[I+x-1]==null){console.log(F,I,x);
throw"e"}for(var e=0;e<x;e++)O[I+e]=n[F+e]},a2f:function(E){return E.length<2?"0"+E:E}};ck.yo=new Uint8Array(8);
ck.amO=new Int8Array(ck.yo.buffer);ck.anI=new Int16Array(ck.yo.buffer);ck.an7=new Int32Array(ck.yo.buffer);
ck.a82=new Float64Array(ck.yo.buffer);function eW(n,F,O){this.m4=n;this.vW=F;this.ahH=O;this.RG=new aE(0,0);
this.B2=-1;this.g1=0;this.vL=0;this.wT=new gv;this.Od=[];this.u0=null;this.aaQ=null;this.vR=null;this.ZM=null;
this.Ge=null;this.acg=null}eW.prototype.StartPage=function(n,F,O,I,x){var r=this.vW,_=r.GW(),d=1,w=(O-n)*(I-F);
if(x!=null)w=x;while(w*_*_/(d*d)>2*8192*8192)d++;r.scale(1/d,1/d);this.aaQ=[n,F,O,I];var d=r.GW();n=Math.round(n*d);
F=Math.round(F*d);O=Math.round(O*d);I=Math.round(I*d);var Z=this.m4,P=this.vR;if(P==null){r.hb=-n}else{var C=P[2]-P[0]+30,W=Math.round(O-n)+30;
if(this.RG.x+C+W>8192){r.hb=-n;this.RG.x=0;this.RG.y+=this.vL+120;this.vL=0}else{r.hb+=C;this.RG.x+=C}}r.i9=this.RG.y+(this.ahH?I:-F);
this.vL=Math.max(this.vL,Math.round(I-F));this.vR=[n,F,O,I];Z.t.push(Z.VF())};eW.prototype.T7=function(){var n=this.m4,F=n.t[n.t.length-1];
return F};eW.prototype.IH=function(){var n=JSON.parse(JSON.stringify(bW.uS.default));n.strokeStyleLineAlignment.v.strokeStyleLineAlignment="strokeStyleAlignCenter";
n.strokeEnabled.v=!1;n.fillEnabled.v=!1;return n};eW.prototype.i_=function(){var n=this.m4,F=n.Kv();
F.V9("Path "+n.t.length);this.m4.t.push(F);F.Cq|=16;F.add.SoCo={classID:"null",Clr:{t:"Objc",v:q.W.Vm({Q:0,l:0,O:0})}};
F.add.vmsk=new K.X9;F.add.vstk=this.IH();return F};eW.prototype.Kg=function(n){var F={H:n.crds,s:n.cmds},O=q.z.rD(F,!1);
q.Y.gS(O,this.vW);return O};eW.agf=function(n,F){for(var e=0;e<n.length;e++)if(n[e].Xu!=null)n[e].Xu=F};
eW.a42=function(n){return Math.sqrt(Math.abs(n[0]*n[3]-n[1]*n[2]))};eW.ux=function(n){return q.W.Vm({Q:n[0]*255,l:n[1]*255,O:n[2]*255})};
eW.yC=function(n){return new cD(n[0],n[1],n[2],n[3],n[4],n[5])};eW.prototype.Stroke=function(n){if(this.B2!=-1&&this.B2!=this.g1)return;
if(n.pth.cmds.length<=1)return;var F=this.Kg(n.pth);if(F.length<=2)return;this.pv(n);eW.agf(F,-1);F[2].Xu=1;
var O=eW.ux(n.COLR),I=this.T7(),x=this.IH();eW.oj(x,n,this.vW.GW(),O);var r=I!=null&&I.add.vmsk!=null&&!I.Ja(),_=r&&!I.add.vstk.strokeEnabled.v&&K.X9.aha(I.add.vmsk.b,F,!0),d=r&&!I.add.vstk.fillEnabled.v&&JSON.stringify(x)==JSON.stringify(I.add.vstk);
if(d){I.add.vmsk.b=I.add.vmsk.b.concat(F.slice(2))}else if(_){I.add.vstk=x;x.fillEnabled.v=!0}else{I=this.i_();
I.add.vmsk.b=F;I.add.vstk=x}};eW.oj=function(n,F,O,I){n.strokeEnabled.v=!0;n.strokeStyleMiterLimit.v=F.mlimit;
n.strokeStyleLineDashSet.v=ha.Kn(F.dash,1/F.lwidth);n.strokeStyleLineDashOffset.v.val=F.doff;n.strokeStyleLineJoinType.v.strokeStyleLineJoinType=bW.uS.join[F.ljoin];
n.strokeStyleLineCapType.v.strokeStyleLineCapType=bW.uS.wq[F.lcap];n.strokeStyleLineWidth.v.val=Math.max(.4,F.lwidth*eW.a42(F.ctm)*O);
n.strokeStyleContent.v.Clr.v=I};eW.prototype.Fill=function(n,F){if(this.B2!=-1&&this.B2!=this.g1)return;
if(n.ca==0)return;var O=n.pth.cmds;if(O.length==0)return;if(O.length==2&&JSON.stringify(O)=="[\"M\",\"L\"]")return;
var I=q.z.gh(n.cpth.crds),x=q.z.gh(n.pth.crds);if(x.lN(I).D2())return;var r=n.pth;if(this.ZM==null&&UDOC.G.isBox(r,[x.x,x.y,x.x+x.d,x.y+x.v])&&x.zp(I)){r=n.cpth}else this.pv(n);
var _=this.Kg(r),d=q.z.om(x);q.z.m(d.H,this.vW,d.H);x=q.z.gh(d.H);var w=eW.Rr(n.colr,this.vW,x),Z=this.T7(),P=Z!=null&&Z.opacity==Math.round(255*n.ca)&&Z.add.vstk!=null&&!Z.add.vstk.strokeEnabled.v&&Z.add.SoCo&&w.type=="SoFi"&&JSON.stringify(Z.add.SoCo.Clr.v)==JSON.stringify(w.G.v.Clr.v);
if(P){var C=!1;for(var e=0;e<_.length;e++){if(_[e].Xu==0||_[e].Xu==2)C=!0}if(C){var W=q.z.gh(q.Y.J5(Z.add.vmsk.b)),v=q.z.gh(q.Y.J5(_));
P=W.lN(v).D2()}}if(P){var L=Z.add.vmsk.b;for(var e=2;e<_.length;e++)L.push(_[e])}else{Z=this.i_();delete Z.add.SoCo;
Z.add.vmsk.b=K.X9.jI(_);eW.v9(n.colr,Z,this.vW,x);eW.RV(n,Z)}};eW.v9=function(n,F,O,I){var x=eW.Rr(n,O,I),r=null,_=null;
F.add.vstk.fillEnabled.v=!0;if(x.type=="SoFi"){r="SoCo";_=bW.ez}if(x.type=="GrFl"){r="GdFl";_=bW.KK}if(x.type=="patternFill"){r="PtFl";
_=bW.dC}if(r!=null){F.add[r]={classID:"null"};for(var e=0;e<_.length;e++){var d=_[e];F.add[r][d]=x.G.v[d]}}};
eW.prototype.pv=function(n){var F=this.m4,O=n.cpth,I=O.cmds.join(""),x=O.crds,r=I+" "+x.join(","),_=UDOC.G.isBox(O,this.aaQ);
if(_&&this.ZM==null)return;if(r==this.ZM)return;this.fh();if(!_){this.ZM=r;F.t.push(F.VF());var d=F.Kv();
d.V9("Mask");d.add.lsct=ho.OC;d.mf="pass";d.Cq=24;var w=d.add.vmsk=new K.X9;w.b=this.Kg(n.cpth);if(UDOC.G.isBox(O)){this.Ge=q.Y.if(w.b);
this.Ge.EM(3,3)}else this.Ge=null;this.acg=d}};eW.prototype.fh=function(){var n=this.m4;if(this.ZM!=null){var F=n.t.length-1,e=F,O=!1;
while(e>=0&&n.t[e].add.lsct!=ho.bu)e--;var I=this.Ge;if(I){var x=new gv,r=F;while(r>e){x=n.t[r].Yg(this.m4,!1,!0);
r--}O=I.zp(x)}if(O){this.Od.splice(e,1);n.t.splice(e,1)}else{n.t.push(this.acg)}this.ZM=null}};eW.Rr=function(n,F,O){var I,x;
if(n.length!=null){I="SoFi";var r=JSON.parse(bW.E5[bW.order.indexOf("SoFi")]);x={t:"Objc",v:r};x.v.Clr.v=eW.ux(n)}else{var _=eW.ac3(n,F,O);
I="GrFl";x={t:"Objc",v:_}}return{type:I,G:x}};eW.ac3=function(n,F,O){var I=JSON.parse(bW.E5[bW.order.indexOf("GrFl")]),x=I.Grad.v;
x.Intr.v=0;var r=eW.yC(n.mat);r.concat(F);var _=new aE(0,0),d=new aE(O.d,0),w=n.crds;if(n.typ=="rad"){I.Type.v.GrdT="Rdl";
var Z=.7;_.x=(1-Z)*w[0]+Z*w[3];_.y=(1-Z)*w[1]+Z*w[4];d.x=_.x;d.y=_.y;d.x+=Math.max(w[2],w[5])}else{I.Type.v.GrdT="Lnr";
_.x=w[0];_.y=w[1];d.x=w[2];d.y=w[3];_.x=d.x+.5*(_.x-d.x);_.y=d.y+.5*(_.y-d.y)}_=r.Pz(_);d=r.Pz(d);q.W.aJ(_,d,O,I);
var P=n.grad;q.W.ne(P,x);return I};eW.prototype.PutText=function(n,F,O,I){var x=F.charCodeAt(0),W=null;
if(this.B2!=-1&&this.B2!=this.g1)return;if(F.length==0||F.length==1&&(x==0||x==8203))return;this.pv(n);
var r=this.m4,_=n.font,d=eW.yC(n.ctm);d.concat(this.vW);var w=eW.yC(_.Tm);w.concat(d);var Z=c.V.GW(w),P=new cD(1/Z,0,0,-1/Z,0,0);
P.concat(w);var C=_.Tfs*Z;if(_.Th!=100||_.Trise!=0){console.log(_)}var v=r.t.length-1;while(v>=0&&r.t[v].add.TySh==null)v--;
if(P.O*P.O+P.Pr*P.Pr<.001&&I==null&&v>=0&&r.t[v].add.TySh&&r.t[v].opacity==Math.round(255*n.ca)){var L=r.t[v],H=this.Od[v],y=L.add.TySh.m,g=(y.hb+H.e0-P.hb)/C,Q=Math.abs(g),J=F.indexOf(" ")==-1,A=y.R==P.R&&y.O==P.O&&y.Pr==P.Pr&&y.oQ==P.oQ,p=A&&Math.abs(H.JZ-P.i9)<1e-5&&Q<.6,U=P.i9-H.JZ;
if(p){W=L;H.e0=P.hb-y.hb;if(g>.2&&J&&[".",",","?",":","!"].indexOf(F)==-1)F=" "+F}else if(A&&Math.abs(P.hb-y.hb)<1e-5&&0<U&&U<C*1.7&&H.abf==C){W=L;
this.Ci(H);H.JZ=P.i9;F="\n"+F}}if(W==null){v=r.t.length;this.Od[v]={PO:[],e0:0,JZ:P.i9,l2:"",abf:C};
W=r.Kv();r.t.push(W);W.add.lnsr="rend";W.add.TySh=bt.Cc(0,0);W.add.TySh.m=P}var H=this.Od[v];H.e0+=O*C;
H.l2+=F;var j=W.add.TySh.Vb,b=bt.fQ(j);if(I){bt.li(j,1);var s=[0,0,Math.ceil(I[0]*Z),Math.ceil(I[1]*Z)];
bt.Ar(j,s)}var G=b.length-1,T=G+F.length;bt.bw(j,G,F);if(this.u0==null)this.u0=bt.gU(j,G,G);var z=this.u0;
z.Bw.FontSize=Math.round(C);z.Bw.Tracking=Math.round(_.Tc*100);z.Bw.Underline=_.Tun==1;z.Bw.FillColor={Type:1,Values:[1,n.colr[0],n.colr[1],n.colr[2]]};
if(_.Tal!=null)z.jp.Justification=_.Tal;if(H.PO.length!=0){z.Bw.AutoLeading=!1;z.Bw.Leading=H.JZ-H.PO[H.PO.length-1].y}var m=_.Tf;
m=m.replace(/#2B/g,"+");m=m.replace(/#2C/g,"-");m=m.split("+").pop();var $={"NimbusRomNo9L-Medi":"NimbusRomNo9L-Med","NimbusRomNo9L-Regu":"NimbusRomNo9L-Reg","NimbusRomNo9L-MediItal":"NimbusRomNo9L-MedIta","NimbusRomNo9L-ReguItal":"NimbusRomNo9L-RegIta",CMTT9:"NimbusMono-Regular",Arial:"ArialMT","BebasNeue-Regular":"BebasNeueRegular"};
if($[m])m=$[m];bt.Zu(z,m);bt.F$(j,G,T-1,z);W.rq();W.opacity=Math.round(255*n.ca)};eW.prototype.Ci=function(n){n.PO.push({HL:n.e0,OI:n.l2.slice(n.PO.length==0?0:1)+"\n",y:n.JZ,Ls:n.abf});
n.e0=0;n.l2=""};eW.prototype.PutImage=function(n,F,O,I,x,r,_){if(this.B2!=-1&&this.B2!=this.g1)return;
var d=this.m4,w=n.font.Tmode;if(w==7&&d.t[d.t.length-1].add.TySh){return}this.pv(n);var Z=eW.yC(n.ctm);
Z.concat(this.vW);var P=new cD(1/O,0,0,-1/I,0,1);P.concat(Z);Z=P;F=eW.pN(F,O,I);if(x)x=eW.pN(x,O,I);
if(x==null){if(F.length==O*I*4)F=new Uint8Array(fx.rM("PNG").eJ([[F.buffer,0]],O,I))}else{F=this.lV(F,O,I,r,!1);
x=this.lV(x,O,I,_,!0);var C=q.f(O*I);q.xg(x,C,0);q.GF(C,F,3);F=new Uint8Array(fx.rM("PNG").eJ([[F.buffer,0]],O,I))}var W=d._C(F,"Bitmap",0,0),v=W.rect.clone();
v.x=v.y=0;var L=q.z.om(v).H;q.z.m(L,Z,L);W.add.SoLd.Trnf=c.V.uB(L);W.add.SoLd.nonAffineTransform=c.V.uB(L);
W.aY(d,!1);eW.RV(n,W);d.t.push(W)};eW.RV=function(n,F){F.opacity=Math.round(255*n.ca);var O=eW.Wi[n.bmode];
if(O==null)console.log("Unknown blend mode",O);else F.mf=O};eW.Wi={"/Normal":"norm","/Multiply":"mul ","/Screen":"scrn","/Overlay":"over","/Darken":"dark","/Lighten":"lite","/ColorDodge":"div ","/ColorBurn":"idiv","/HardLight":"hLit","/SoftLight":"sLit","/Difference":"diff","/Exclusion":"smud","/Hue":"hue ","/Saturation":"sat ","/Color":"colr","/Luminosity":"lum "};
eW.b8=function(n){for(var F in eW.Wi)if(eW.Wi[F]==n)return F};eW.pN=function(n,F,O){var I=fx.TG(n.buffer);
if(I=="jpg"){try{n=new Uint8Array(fx.rM("JPG").acc(n.buffer))}catch(hl){n=new Uint8Array(F*O*4)}}else if(n.length!=F*O*4){var x=new Uint8Array(F*O*4),r=new Uint8Array(Math.ceil(F*O/8));
UTIF.decode._decodeG4(n,0,n.length,r,0,F,1);for(var e=0;e<F*O;e++){var _=e*4,d=(r[e>>3]>>7-(e&7)&1)*255;
x[_]=d;x[_+1]=d;x[_+2]=d;x[_+3]=255}n=x}return n};eW.prototype.lV=function(n,F,O,I,x){if(n.length!=F*O*4){var r=fx.TG(n.buffer),_=fx.rM(r);
if(_==null||r=="tga")_=fx.rM("jpg");n=new Uint8Array(_.bx(n,I,x)[0].data)}return n};eW.prototype.ShowPage=function(){var n=this.m4;
this.g1++;var F=this.vR;this.fh();var O=n.Kv();n.t.push(O);var I=new gv(Math.round(this.RG.x),Math.round(this.RG.y),Math.round(F[2]-F[0]),Math.round(F[3]-F[1]));
this.wT=this.wT.Tq(I);O.Hp(I);O.add.artb.artboardBackgroundType.v=3;O.V9("Page "+this.g1);O.add.lsct=ho.OC;
O.mf="pass";O.Cq=24};eW.prototype.Print=function(n){console.log("Print:",n)};eW.prototype.Done=function(){var n=this.m4;
if(this.g1==1)n.t[n.t.length-1].add.lsct=ho.x7;n.bJ(this.g1);for(var e=0;e<n.t.length;e++){var F=n.t[e],O=F.add.vmsk,I=F.add.TySh,x=this.Od[e];
F.XO();if(O){var r=!1;for(var _=0;_<O.b.length;_++){var d=O.b[_];if((d.type==0||d.type==3)&&d.length>32767)r=!0}if(r){n.t.splice(e,1);
e--;continue}}F.o3(n);if(I&&x.PO.length!=0){this.Ci(x);var w=I.Vb,Z=x.PO.length,P=x.PO[0],C=0,W=0;for(var _=0;
_<Z;_++)C=Math.max(C,x.PO[_].HL);bt.li(w,1);I.m.i9-=P.Ls*.7;bt.Ar(w,[0,0,Math.ceil(C*1.1),Math.ceil(x.PO[Z-1].y-P.y+P.Ls*2)])}if(I){var w=I.Vb;
bt.afv(w);var v=bt.fQ(w).split("\n");for(var _=0;_<v.length-1;_++){var L=v[_],H=0;for(var y=0;y<L.length;
y++){var g=L.charCodeAt(y);if(1473<=g&&g<=1524)H++}if(H>L.length/2){v[_]=L.split("").reverse().join("");
var Q=w.EngineDict.ParagraphRun.RunArray[_].ParagraphSheet.Properties;Q._Direction=1;Q.Justification=bt.H2(Q)}}bt._I(w,v.join("\n"))}}n.u4=!0;
n.d=this.wT.d;n.v=this.wT.v;n.buffer=q.f(this.wT.X()*4)};var gd={};gd.WH=function(n,F,O,I){var x=!1,r=[n.root],_=n.root.children;
if(n.add.artd){x=!0;for(var e=0;e<_.length;e++)if(_[e].$.add.artb==null)x=!1;if(x)r=_}var d=new gv(0,0,n.d,n.v),w=F[0];
w=w.replace(/,/g," ").replace(/\-/g," - ").replace(/  +/g," ").trim();w=w.split(" ");var Z=[];for(var e=0;
e<w.length;e++){var P=w[e];if(P=="-"){var C=Z.pop(),W=parseInt(w[e+1]);while(C<W){Z.push(C);C++}}else Z.push(parseInt(P))}w=Z;
for(var e=0;e<w.length;e++)if(isNaN(w[e])||w[e]<1||w[e]>r.length){w.splice(e,1);e--}var v=72/n.gC;for(var e=0;
e<r.length;e++){if(w.length!=0&&w.indexOf(e+1)==-1)continue;var L=r[e],H=x?L.$.Fn():d,y=Math.round(H.d*v),g=Math.round(H.v*v);
O.StartPage(0,0,y,g);var Q=UDOC.getState([[0,0,y,g]]),J=new cD;J.translate(-H.x,-H.y-H.v);J.scale(v,-v);
if(F[2]){var A=n.dH();if(!d.Qq(H)){A=q.f(H.X()*4);q.nF(n.dH(),d,A,H)}if(F[1]!=100){var p=fx.rM("JPG").eJ([[A.buffer]],H.d,H.v,[F[1]]);
A=new Uint8Array(p)}var U=new cD;U.translate(H.x,H.y);gd.oM(Q,O,A,H,U,J)}else gd.SL(n,L,Q,O,J,F,I);O.ShowPage()}O.Done()};
gd.cm=function(n){n=q.W.S_(n);return[n.Q/255,n.l/255,n.O/255]};gd.SL=function(n,F,O,I,x,r,_){var d=F.$,w=d.add.lsct,Z=d.add.lmfx,P=d.add.vmsk,C=d.add.vstk,W=d.add.TySh,y,g;
if(!d.Y9())return;var v=d.opacity/255,L=d.add.iOpa?d.add.iOpa/255:1;O.bmode=eW.b8(d.mf);O.ca=O.CA=v*L;
var H=Z;if(H)H=H.solidFillMulti.v[0];if(H)H=H.v;if(H&&!H.enab.v)H=null;if(d.C8()&&!d.Ja()){y=q.f(d.rect.X());
q.xg(d.buffer,y,3);g=ha.gG(Z,null,y,d.rect,n,d.rect).type}if(g)gd.DQ(d,y,g,O,I,x,r,!0);if(d.Ja()){for(var e=0;
e<F.children.length;e++)gd.SL(n,F.children[e],O,I,x,r,_)}else if(P&&d.zX()){var Q=P.b,J=q.Y.if(Q),A=q.z.qg(Q),p=!1,U=!1,j=!1;
q.z.m(A.H,x,A.H);O.pth={cmds:A.s,crds:A.H};if(C.fillEnabled.v){var b=ha.OA(Z,d.add),s=b[0],G=b[1];if(s){O.colr=gd.cm(s.Clr.v)}else if(G){var T=G,z=[],m,$=T.Type.v.GrdT=="Rdl"?"rad":"lin",o=q.W.VL(T,J),h=x.Pz(o[0]),X=x.Pz(o[1]);
if($=="rad")m=[h.x,h.y,0,h.x,h.y,aE.sl(h,X)];else{h.mT(X.x+(h.x-X.x)*2,X.y+(h.y-X.y)*2);m=[h.x,h.y,X.x,X.y]}var D=T.Grad.v.Clrs.v;
for(var e=0;e<D.length;e++){var f=D[e].v;z.push([f.Lctn.v/4096,gd.cm(f.Clr.v)])}O.colr={typ:$,mat:[1,0,0,1,0,0],grad:z,crds:m}}p=!0}var R=ha.Lv(Z);
if(!C.strokeEnabled.v&&R)C=R;if(C.strokeEnabled.v){var i=C.strokeStyleContent.v,t=C.strokeStyleLineDashSet.v,N=bW.uS.RD.indexOf(C.strokeStyleLineAlignment.v.strokeStyleLineAlignment);
if(i.Clr==null)return;var M=q.W.S_(i.Clr.v);O.COLR=[M.Q/255,M.l/255,M.O/255];O.lwidth=C.strokeStyleLineWidth.v.val*(N==2?2:1)*x.GW();
O.mlimit=C.strokeStyleMiterLimit.v;O.doff=C.strokeStyleLineDashOffset.v.val;O.ljoin=bW.uS.join.indexOf(C.strokeStyleLineJoinType.v.strokeStyleLineJoinType);
O.lcap=bW.uS.wq.indexOf(C.strokeStyleLineCapType.v.strokeStyleLineCapType);O.dash=[];for(var e=0;e<t.length;
e++)O.dash.push(t[e].v.val*O.lwidth);if(O.dash.length==1&&O.dash[0]==0)O.dash=[];U=!0;if(N==2)j=!0}if(p&&!j)I.Fill(O);
if(U)I.Stroke(O);if(p&&j)I.Fill(O)}else if(W&&r[4]){var hK=W.Vb,bD=new h2(hK,_),A=cJ.qA(bD,W),co=q.z.Uh(A);
for(var M in co){var iM=parseInt(M.slice(1),16);O.colr=H?gd.cm(H.Clr.v):[(iM>>>16&255)/255,(iM>>>8&255)/255,(iM&255)/255];
var hs=co[M];q.z.m(hs.H,x,hs.H);hs=q.z.ad8(hs);O.pth={cmds:hs.s,crds:hs.H};I.Fill(O)}}else if(W&&r[3]==!1){var hK=W.Vb,S=W.m.clone(),a=new cD(1,0,0,-1,0,0);
a.concat(S);a.concat(x);var bV=bt.fQ(hK),bD=new h2(hK,_);for(var e=0;e<bD.jp.length;e++){var a5=bD.jp[e];
if(a5.ga.length==1&&a5.ga[0].Ez)continue;for(var i9=0;i9<a5.Oc.length;i9++){var dG=a5.Oc[i9],ap=a5.bp.y+dG.bp.y,bk=a5.ga[dG.start].start,c2=a5.ga[dG.end-1].end,gg=bt.age(hK,bk,c2);
for(var bH=0;bH<gg.length;bH++){var gw=bD.Y7(bk),gP=gg[bH],dT=bt.gU(hK,bk,bk),fU=dT.D0[dT.Bw.Font].Name;
O.font.Tf=fU;var M=bt.S_(dT.Bw);O.colr=H?gd.cm(H.Clr.v):[M.Q/255,M.l/255,M.O/255];O.font.Tfs=Math.round(dT.Bw.FontSize);
var dV=bV.slice(bk,bk+gP);if(dT.Bw.FontCaps==2)dV=dV.toUpperCase();var ac=new cD;ac.translate(gw.j.x,-ap);
ac.concat(a);O.ctm=[ac.R,ac.O,ac.Pr,ac.oQ,ac.hb,ac.i9];I.PutText(O,dV,0);O.ctm=[1,0,0,1,0,0];bk+=gP}}}}else if(!d.rect.D2()){var e2,cX,eR=!1,gR=new cD;
if(d.add.SoLd){var bN=d.add.SoLd,eG=bN.Idnt.v,ef=n.lk(eG,bN.Crop?bN.Crop.v:null),iJ="";if(ef==null)return;
var fi=ef.yO,ep=fx.TG(ef.raw.buffer);if(r[5].indexOf(ep)!=-1){e2=ef.raw;eR=!0}else e2=fi[0];cX=fi[1];
gR=q.J.$I(bN)}else{e2=d.buffer;cX=d.rect;gR.translate(cX.x,cX.y)}if(H&&!eR)e2=ha.bI(e2,H,cX);gd.oM(O,I,e2,cX,gR,x);
if(H&&eR){var m=[0,0,cX.d,0,cX.d,cX.v,0,cX.v];q.z.m(m,gR,m);q.z.m(m,x,m);var aT=JSON.parse(JSON.stringify(O));
aT.ca=H.Opct.v.val/100;aT.pth={cmds:["M","L","L","L","Z"],crds:m};aT.colr=gd.cm(H.Clr.v);I.Fill(aT)}}if(g)gd.DQ(d,y,g,O,I,x,r,!1)};
gd.DQ=function(n,F,O,I,x,r,_,d){var w=n.rect.clone(),Z=F;if(n.add.TySh&&!_[3]&&!_[4])return;console.log(_);
var P=I.ca,C=I.bmode;for(var e=bW.order.length-1;e>=0;e--){var W=bW.order[e];if(W=="GrFl"||W=="SoFi")continue;
if(n.add.vmsk&&W=="FrFX")continue;var v=O[W],L=e>7||W=="FrFX";if(L!=d)continue;for(var H=0;H<v.length;
H++){var y=v[H];console.log(L,W,y);var g=y.jC.clone();g.offset(n.rect.x,n.rect.y);if(!L){if(!w.zp(g)){var Q=w.Tq(g),J=q.f(Q.X());
q.k9(Z,w,J,Q);Z=J;w=Q}q.oh(Z,w,y.zc,g)}if(L&&W=="FrFX"&&y.wd)q.oh(y.wd,g,y.zc,g);var A=new cD;A.translate(g.x,g.y);
I.ca=y.Tb;I.bmode=eW.b8(y.QP);gd.oM(I,x,y.zc,g,A,r)}}I.ca=P;I.bmode=C};gd.oM=function(n,F,O,I,x,r){var _=new cD;
_.scale(I.d,-I.v);_.translate(0,I.v);_.concat(x);_.concat(r);n.ctm=[_.R,_.O,_.Pr,_.oQ,_.hb,_.i9];F.PutImage(n,O,I.d,I.v);
n.ctm=[1,0,0,1,0,0]};var h5={};h5.Hy=function(n){var F=new Uint8Array(n);return h5._7(F,0)};h5._7=function(n,F){var O=Y.c,I=Y.su,x={D5:I(n,F,4),n:F+8,size:O(n,F+4)},r=x.D5=="FORM"||x.D5=="LIST"||x.D5=="CAT ";
if(r)x.Ul=I(n,F+8,4);if(x.size<0||x.n+x.size>n.length)throw"e";if(r){x.sub=[];F+=12;var _=x.n+x.size;
while(F<_){var d=h5._7(n,F);x.sub.push(d);F+=8+d.size+(d.size&1)}}return x};var aO={};aO.Hy=function(n,F){var O=new Uint8Array(n);
return aO._7(O,0,F)};aO._7=function(n,F,O){var I=Y.wc,x=Y.su,r={D5:x(n,F,4),n:F+8,size:I(n,F+4)};if(O&&O[r.size]!=null)r.size=O[r.size];
if(r.D5=="RIFF"||r.D5=="LIST"){r.Ul=x(n,F+8,4)}if(r.size<0||r.n+r.size>n.length)throw"e";if(r.D5=="RIFF"||r.D5=="LIST"&&(r.Ul!="cmpr"&&r.Ul!="stlt")){r.sub=[];
F+=12;var _=r.n+r.size;while(F<_){var d=aO._7(n,F,O);r.sub.push(d);F+=8+d.size+(d.size&1)}}return r};
var h5={};h5.Hy=function(n){var F=new Uint8Array(n);return h5._7(F,0)};h5._7=function(n,F){var O=Y.c,I=Y.su,x={D5:I(n,F,4),n:F+8,size:O(n,F+4)},r=x.D5=="FORM"||x.D5=="LIST"||x.D5=="CAT ";
if(r)x.Ul=I(n,F+8,4);if(x.size<0||x.n+x.size>n.length)throw"e";if(r){x.sub=[];F+=12;var _=x.n+x.size;
while(F<_){var d=h5._7(n,F);x.sub.push(d);F+=8+d.size+(d.size&1)}}return x};function cO(){}cO.Hy=function(n,F){var O=new Uint8Array(n);
F.u4=!0;var I=Y.su(O,0,2);if(I=="WL"){alert("Unsupported CDR version")}else{var x=cO.U$,r=aO.Hy(O.buffer),_={data:O,n:0,Tn:cO.adU(O[11])},W=300;
_.iM=_.Tn<600?16:32;cO.lP(_,r.sub,F,0);var d=x(r,"cmpr").sub,w=d[0],Z=d.slice(1),P=x(w,"mcfg").G,C=P.a3Q;
W/=fA.FS(new gv(0,0,Math.round(C.x*W),Math.round(C.y*W)),8192*8192);var v=Math.round(C.x*W),L=Math.round(C.y*W);
F.d=v;F.v=L;F.buffer=q.f(F.d*F.v*4);var H=x(w,"filt").sub,y=x(w,"otlt").sub;w.Oz={};for(var e=0;e<H.length;
e++)w.Oz[H[e].sub[0].G.id]=H[e].sub[0].G;w.fH={};for(var e=0;e<y.length;e++)w.fH[y[e].G.id]=y[e].G;var g=new cD(W,0,0,-W,C.x*W/2,C.y*W/2),Q=Z[1];
cO.cY(Q,w,F,g);F.bJ(1);F.t[F.t.length-1].Hp(new gv(0,0,v,L))}};cO.U$=function(n,F){var O=null;for(var e=0;
e<n.sub.length;e++){var I=n.sub[e];if(I.D5==F||I.Ul==F)O=I}return O};cO.cY=function(n,F,O,I){var x=cO.U$,r=n.Ul?n.Ul:n.D5,_=x(n,"lgob"),d=x(n,"txsm"),w,Z;
if(_){w=x(_,"trfl");Z=x(_,"loda")}var P=w?w.sub[0].PS.clone():new cD;P.concat(I);var C=O.Kv();if(r=="page"||r=="layr"||r=="grp "){C.V9((r=="page"?"Page":"Group")+" "+O.t.length);
C.add.lsct=ho.x7;C.mf="pass";C.Cq=24;var W=[];if(r=="page")W=x(n,"gobj").sub;if(r=="layr")W=n.sub.slice(2);
if(r=="grp ")W=n.sub.slice(4);if(W.length==0)return;O.t.push(O.VF());for(var e=W.length-1;e>=0;e--)cO.cY(W[e],F,O,I)}else if(r=="obj "&&Z.G&&Z.G.path){C.V9("Object "+O.t.length);
var v=F.Oz[Z.G.a6j],L=F.fH[Z.G.akg],H=C.getName(),y=v&&v.type!=0,g=y&&v.G!=null?v.G:[0,0,0];C.Cq|=16;
C.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));var Q=C.add.vstk;Q.strokeEnabled.v=!1;C.add.vmsk=new K.X9;
if(L&&L.aeV!=1){Q.strokeEnabled.v=!0;Q.strokeStyleLineAlignment.v.strokeStyleLineAlignment="strokeStyleAlignCenter";
Q.strokeStyleLineWidth.v.val=L.lineWidth*I.GW();var J=L.color;Q.strokeStyleContent.v.Clr.v=q.W.Vm({Q:J[0]*255,l:J[1]*255,O:J[2]*255})}var A=Z.G.path;
C.add.vmsk.b=q.z.rD(A,!1);q.Y.gS(C.add.vmsk.b,P);eW.v9(g,C,P,q.Y.if(C.add.vmsk.b));Q.fillEnabled.v=y;
C.XO();C.o3(O)}else if(r=="obj "&&d){var p=Z.G.ael,U=Z.G.a8k,s="";C.add.TySh=bt.Cc(0,0);var j=P.GW();
C.add.TySh.m.translate(P.hb,P.i9);var b=C.add.TySh.Vb,G=d.G.a4x;for(var e=0;e<G.length;e++){var T=G[e],z=s.length;
s+=T.text+"\n";bt.bw(b,z,T.text+"\n");var m=cO.afM(T.a3A,F),$=bt.gU(b,z,s.length);if(m.align==3)$.jp.Justification=1;
else $.jp.Justification=0;var o=m.fill.G;$.Bw.FillColor={Type:1,Values:[1,o[0],o[1],o[2]]};$.Bw.FontSize=Math.round(m.afZ.fontSize*P.GW());
bt.F$(b,z,s.length-1,$)}if(U){bt.li(b,0)}else{bt.li(b,1);bt.Ar(b,[0,0,Math.round(p.x*P.R),Math.round(-p.y*P.oQ)])}C.V9(s.slice(0,10))}else{C=null}if(C)O.t.push(C)};
cO.afM=function(n,F){var O=cO.U$(F,"stlt").G,I=JSON.parse(JSON.stringify(O.d8[n]));if(I.bv!=0){var x=O.d8[I.bv];
for(var r in x)if(I[r]==null||I[r]==0)I[r]=x[r];delete I.bv}I.align=O.a4B[I.a4j];I.fill=F.Oz[O.a4A[I.a2D]];
I.a5F=F.fH[O.am9[I.anM]];I.afZ=O.a4O[I.a1Y];return I};cO.anT=function(e){var E=e.data[e.n];e.n+=1;return E};
cO.pP=function(e){var E=Y.KO(e.data,e.n);e.n+=2;return E};cO.oc=function(e){var E=Y.wc(e.data,e.n);e.n+=4;
return E};cO.ak5=function(e){var E=Y.wc(e.data,e.n);e.n+=8;return E};cO.Et=function(e){var E=Y.Qw(e.data,e.n);
e.n+=2;return E};cO.Da=function(e){var E=Y.rV(e.data,e.n);e.n+=4;return E};cO.z6=function(e){var E=Y.akE(e.data,e.n);
e.n+=8;return E};cO.X3=function(e){if(e.n>=e.data.length)throw"e";var n=0;while(e.data[e.n+n]!=0)n++;
var F=Y.su(e.data,e.n,n);e.n+=n+1;return F};cO.adu=function(n){if(n.Tn<600)return Math.PI*cO.Et(n)/1800;
return Math.PI*cO.Da(n)/18e7};cO.a11=function(n){if(n.Tn<1500)return cO.zG(n);else return cO.z6(n)/254e3};
cO.zG=function(n){if(n.Tn<600)return cO.Et(n)/1e3;else return cO.Da(n)/254e3};cO.ans=function(n){if(n.Tn<600)return CRDParser.pP(n);
else return cO.oc(n)};cO.alJ=function(n){if(n.Tn<600)return CRDParser.Et(n);else return cO.Da(n)};cO.lP=function(n,F,O,I){var x=cO,r=x.anT,_=x.pP,d=x.oc,w=x.ak5,Z=x.Et,P=x.Da,C=x.z6,W=x.zG,v=x.a11,L=x.adu,H=x.ans,y=x.alJ;
for(var g=0;g<F.length;g++){var Q=n.Tn,J=F[g];n.n=J.n+(J.D5=="LIST"?4:0);if(J.D5=="vrsn"){var A=_(n);
n.Tn=A;console.log("Version",A);n.iM=A<600?16:32}else if(J.D5=="DISP"){}else if(J.D5=="LIST"&&J.Ul=="cmpr"){var p=d(n),U=d(n),j=d(n),b=d(n),s=new Uint8Array(n.data.buffer,n.n+8+2,p-6-8),G=pako.inflateRaw(s),$=0;
n.n+=p;s=new Uint8Array(n.data.buffer,n.n+8+2);var T=pako.inflateRaw(s),z=[];for(var m=0;m<T.length;
m+=4)z.push(Y.wc(T,m));J.sub=[];while($<G.length){var o=aO._7(G,$,z);$=o.n+o.size;J.sub.push(o)}var h={data:G,n:0,Tn:Q,iM:n.iM};
cO.lP(h,J.sub,O,I+1)}else if(J.D5=="LIST"&&J.Ul=="stlt"){var X=n.n,bV=32;J.G={};var D=d(n);if(D==0)return;
J.G.a4A=cO.OJ(n,Q>=1300);J.G.am9=cO.OJ(n);J.G.a4O={};var f=d(n);for(var e=0;e<f;e++){var R=d(n);n.n+=Q<1e3?12:20;
var i=_(n),t=_(n);n.n+=8;var N=W(n);n.n+=Q<1e3?12:20;J.G.a4O[R]={a3a:i,amk:t,fontSize:N}}J.G.a4B=cO.OJ(n);
var M=d(n);n.n+=52*M;var hK=d(n);n.n+=152*hK;var bD=d(n);n.n+=784*bD;var co=d(n);for(var e=0;e<co;e++){n.n+=40;
if(Q>1300)n.n+=4;if(Q>=1300){if(d(n))n.n+=68;else n.n+=12}else{n.n+=20;if(Q>=1e3)n.n+=8;if(d(n))n.n+=8;
n.n+=8}}var iM=d(n);J.G.a0K={};for(var e=0;e<iM;e++){var hs=d(n),S={};n.n+=12;S.right=W(n);S.anV=W(n);
S.left=W(n);J.G.a0K[hs]=S}var a=d(n);if(Q>=1300)bV+=4;n.n+=bV*a;var a5=d(n);n.n+=28*a5;if(Q>800){var i9=d(n);
n.n+=12*i9}J.G.d8={};for(var e=0;e<D;e++){var dG=d(n),ap=d(n),bk={};bk.bv=d(n);n.n+=8;var c2=d(n);if(Q>=1200)c2*=2;
n.n+=c2;bk.a2D=d(n);bk.anM=d(n);if(dG>1){bk.a1Y=d(n);bk.a4j=d(n);bk.ahA=d(n);bk.a0D=d(n);if(Q>800)bk.a9p=d(n)}if(dG>2){bk.abe=d(n);
bk.a7B=d(n);bk.alz=d(n);bk.aeK=d(n);bk.al6=d(n)}J.G.d8[ap]=bk}}else if(J.D5=="LIST")cO.lP(n,J.sub,O,I+1);
else if(J.D5=="txsm"){J.G={};if(Q<600)throw"e";if(Q<700)throw"e";if(Q>=1600)throw"e";if(Q>=1500)n.n+=37;
else n.n+=36;if(d(n)){if(Q<800)n.n+=32}if(Q<800)n.n+=4;J.G.ade=d(n);J.G.a4x=[];n.n+=48;if(Q>=800){if(d(n)){n.n+=32;
if(Q>=1300)n.n+=8}}if(Q>=1500)n.n+=12;var dG=d(n),gg=1,bH=!1;if(!dG){if(Q>=800)n.n+=4;if(Q>800)n.n+=2;
if(Q>=1400)n.n+=2;n.n+=24;if(Q<800)n.n+=8;gg=d(n)}for(var m=0;m<gg;m++){var gw=d(n),e=0;if(Q>=1300&&dG)n.n++;
n.n++;var D=d(n),gP=[];for(e=0;e<D;e++){var dT=r(n),dV=0;r(n);var fU=r(n);if(Q>=800)dV=r(n);var bk={};
if(fU&1){bk.a3a=_(n);var ac=_(n);if(ac)bk.a6H=ac}if(fU&2)n.n+=4;if(fU&4)bk.an6=W(n);if(fU&8)n.n+=4;if(fU&16)n.n+=4;
if(fU&32)n.n+=4;if(fU&64){bk.a2D=d(n);if(Q>=1500)n.n+=48}if(fU&128){bk.anM=d(n)}if(dV&8){if(Q>=1300){var e2=d(n);
if(n.n+e2*2>=n.data.length){bH=!0;break}n.n+=e2*2}else n.n+=4}if(dV&32){var cX=r(n);if(cX)n.n+=52}if(dT==2)if(Q>=1300)n.n+=48;
gP.push(bk)}if(bH){break}var eR=d(n);if(n.n+eR*4>n.data.length)break;var gR=[];for(e=0;e<eR;e++){var bN=0;
if(Q>=1200)bN=w(n)&4294967295;else bN=d(n);gR[e]=bN>>16|bN&1}var eG=eR;if(Q>=1200)eG=d(n);var ef=cO.X3(n);
J.G.a4x.push({a3A:gw,text:ef,d8:gP})}}else if(J.D5=="font"){var fi=_(n),ep=_(n);n.n+=14;var iJ=cO.X3(n);
J.G={id:fi,afp:ep,name:iJ}}else if(["IKEY","ICMT","pfrd","bcfg"].indexOf(J.D5)!=-1){}else if(J.D5=="flgs")J.G=d(n);
else if(J.D5=="bbox"){var aT=W(n),dm=W(n),c1=W(n),gk=W(n);J.G=new gv(aT,dm,c1-aT,gk-dm)}else if(J.D5=="fild"){var a8=d(n),bX=0,c_;
if(Q>=1300){n.n+=4;bX=_(n);n.n+=2}var bL=_(n);if(bL==0){}else if(bL==1){n.n+=Q>=1300?13:2;c_=cO.kk(n)}else if(bL==2){n.n+=Q>=1300?8:2;
var eS=r(n),c$=0;if(Q>=1300){n.n+=17;c$=Z(n)}else if(Q>=600){n.n+=19;c$=P(n)}else{n.n+=11;c$=Z(n)}var cp=L(n),b_=.5+y(n),hy=.5+y(n)-.5;
if(Q>=600)n.n+=2;var gx=H(n)&255,eJ=r(n)/100;n.n++;var d4=H(n)&65535;if(Q>=1300)n.n+=3;var cs=[];for(var e=0;
e<d4;e++){var en=cO.kk(n);if(Q>=1300){if(bX==158||Q>=1600&&bX==150)n.n+=26;else n.n+=5}var cm=H(n)/100;
if(Q>=1300)n.n+=3;cs.push([cm,en])}c_={typ:eS==1?"lin":"rad",crds:[b_-Math.cos(cp)/2,hy-Math.sin(cp)/2,b_,hy],grad:cs,mat:[1,0,0,1,0,0]}}else console.log("Unknown fill type",bL);
J.G={id:a8,type:bL,G:c_}}else if(J.D5=="outl"){var c5=d(n);if(Q>=1300){var fK=0,ez=0;while(fK!=1){n.n+=ez;
fK=d(n);ez=d(n)}}var d6=_(n),ee=_(n),c0=_(n);if(Q<1300&&Q>=600)n.n+=2;var gq=W(n),ei=_(n)/100;if(Q>=600)n.n+=2;
var d9=L(n);if(Q>=1300)n.n+=46;else if(Q>=600)n.n+=52;var c_=cO.kk(n,c5==270963208||c5==276198e3,c5);
J.G={id:c5,aeV:d6,agR:ee,adk:c0,lineWidth:gq,color:c_}}else if(J.D5=="mcfg"){if(1300<=Q)n.n+=12;else if(900<=Q)n.n+=4;
else if(600<=Q&&Q<700)n.n+=28;var ge=0,iK=0;if(Q<400)throw"e";else{ge=W(n);iK=W(n)}J.G={a3Q:new aE(ge,iK)}}else if(J.D5=="loda"){var X=n.n,gu=H(n),eA=H(n),cE=H(n),iU=H(n),eI=H(n),ad=[],d_=[];
n.n=X+cE;for(var e=0;e<eA;e++)ad[e]=H(n);n.n=X+iU;for(var e=eA-1;e>=0;e--)d_[e]=H(n);J.G={};for(var e=0;
e<eA;e++){n.n=X+ad[e];var c9=d_[e];if(c9==10)J.G.akg=d(n);else if(c9==20)J.G.a6j=d(n);else if(c9==200)J.G.aa1=H(n);
else if(c9==30){if(Q<400)eI--;if(eI==1){var aT=v(n),dm=v(n),ek=0,fX=0,fo=0,eY=0;if(Q<1500){eY=v(n);fo=Q<900?eY:v(n);
fX=Q<900?eY:v(n);ek=Q<900?eY:v(n)}else throw"e";J.G.path=q.z.qg(q.Y.jP.Rect(0,0,aT,dm,ek))}else if(eI==2){var hG=W(n),aY=W(n),gK=L(n),b$=L(n),c4=Math.abs(hG),gA=Math.abs(aY);
J.G.path=q.z.qg(q.Y.jP.BT(0,0,c4,-gA))}else if(eI==3){J.G.path=cO.a5P(n)}else if(eI==4){J.G.a8k=cO.anr(n)}else if(eI==6){J.G.ael=cO.af8(n)}else if(eI==37){J.G.path=cO.Sg(n)}else console.log(eI)}}}else if(J.D5=="trfd"){var X=n.n,gu=H(n),eA=H(n),cE=H(n);
n.n=X+cE;var ad=[];for(var e=0;e<eA;e++)ad[e]=H(n);for(var e=0;e<eA;e++){n.n=X+ad[e];if(Q>=1300)n.n+=8;
var f7=_(n);if(f7==8){var aZ,cG,aT,bb,dR,dm;if(Q>=600)n.n+=6;if(Q>=500){aZ=C(n);cG=C(n);aT=C(n)/(Q<600?1e3:254e3);
bb=C(n);dR=C(n);dm=C(n)/(Q<600?1e3:254e3)}else throw"e";J.PS=new cD(aZ,bb,cG,dR,aT,dm)}else console.log(f7)}}else if(!1){console.log(J);
var hD=Math.min(J.size,32);console.log(Y.sX(data,J.n,hD));console.log(Y.a69(data,J.n,hD))}}};cO.OJ=function(n,F){var O=cO.oc,I={},x=O(n);
for(var e=0;e<x;e++){var r=O(n);n.n+=4;var _=O(n);I[r]=_;if(F)n.n+=48}return I};cO.anr=function(n){var F=cO,O=F.zG,I=O(n),x=O(n);
return new aE(I,x)};cO.af8=function(n){var F=cO,O=F.zG;n.n+=4;var I=O(n),x=O(n);return new aE(I,x)};
cO.Sg=function(n){var F=cO,O=F.oc,I=F.pP,x=F.zG;n.n+=4;var r=I(n)+I(n);n.n+=16;var _=cO.ZD(n,r);return _};
cO.a5P=function(n){var F=cO.pP(n);n.n+=2;return cO.ZD(n,F)};cO.ZD=function(n,F){var O=cO,I=O.zG,x=n.Tn<600?2:4,r=n.n,_={H:[],s:[]},d=0,w=0,Z=0;
for(var e=0;e<F;e++){var d=I(n),w=I(n),P=n.data[r+F*x*2+e];if(!(P&64)&&!(P&128)){_.H.push(d,w);_.s.push("M");
Z+=2}else if(P&64&&!(P&128)){_.H.push(d,w);_.s.push("L");Z+=2}else if(!(P&64)&&P&128){_.H.push(d,w);
_.s.push("C");Z+=6}else if(P&64&&P&128){_.H.push(d,w)}}if(Z!=_.H.length)throw"e";return _};cO.aeX=function(n,F){var O=Y.wc;
F+=8;var I=O(n,F);F+=4;var x=O(n,F);F+=4;F+=4*7;var r=F,_=q.f(I*x*4);F+=1024;for(var d=0;d<x;d++)for(var w=0;
w<I;w++){var e=d*I+w,Z=(x-d-1)*I+w,P=n[F+e]<<2,C=Z<<2;_[C+0]=n[r+P+2];_[C+1]=n[r+P+1];_[C+2]=n[r+P+0];
_[C+3]=255}return{zc:_,rect:new gv(0,0,I,x)}};cO.adU=function(n){if(n==32)return 300;else if(n<49)return 0;
else if(n<58)return 100*(n-48);else if(n<65)return 0;return 100*(n-55)};cO.kk=function(n,F,O){var I=cO.pP,x=cO.oc,r=n.Tn,_=0,d=0;
if(r>=500){_=I(n);if(_==1&&r>=1300)_=25;if(_==25||_==30){var w=0;if(_==30){_=25;w=30}else{w=I(n);n.n+=4}var Z=I(n),P=I(n)}else if(_==14)throw"e";
else{n.n+=6;d=x(n)}}else throw"e";var C=[];if(_==2||_==9||_==17){var W=[d>>>0&255,d>>>8&255,d>>>16&255,d>>>24&255];
if(_==2)for(var e=0;e<4;e++)W[e]=Math.round(255*W[e]/100);for(var e=0;e<4;e++)W[e]/=255;C=UDOC.C.cmykToRgb(W)}else if(_==1||_==5){C=[d>>>0&255,d>>>8&255,d>>>16&255];
for(var e=0;e<3;e++)C[e]=C[e]/255}else console.log("Unknown color model "+_,d,d.toString(16));return C};
var hc=function(){var n,F,O=new ArrayBuffer(4),I=new Uint8Array(O),x=new Uint32Array(O),r=new Float32Array(O);
function _(W,v){for(var L=0;L<W.length;L++)if(W[L][0]==v)return W[L]}function d(){var W=0,v=0,L=0;do{L=n[F++];
W|=(L&127)<<v;v+=7}while(L&128&&v<35);return W>>>0}function w(W,v,L,H,y){n=W;F=v;var g=H[0]=="mesg",Q=H[2],J={},A=1,p=g?1e9:Q.length;
while(A<=p){var U=A;if(g){U=d();if(U==0)break}var j=_(Q,U),b=j[2],s=j[1]==1,G=s?d():1,T=new Array(G);
if(b==3){if(!s)throw"e";T=n.slice(F,F+G);F+=G}else for(var e=0;e<G;e++){var z;if((b&1)==1){if(b==1)z=n[F++]==1;
else if(b==3)z=n[F++];else if(b==5){var m=d();z=m&1?~(m>>>1):m>>>1}else if(b==7)z=d();else if(b==9){if(n[F]==0){z=0;
F++}else{I[0]=n[F];I[1]=n[F+1];I[2]=n[F+2];I[3]=n[F+3];var $=x[0];x[0]=$<<23|$>>>9;z=r[0];F+=4}}else if(b==11){var o=Z(n,F);
z=o[0];F+=o[1]+1}else throw b}else{var h=L[b>>>1];if(h[0]=="enum"){var X=n[F++];if(X>127)throw"e";z=h[2][X]}else{var D=w(n,F,L,h,y+1);
z=D[0];F=D[1]}}T[e]=z}J[j[3]]=s?T:T[0];A++}return[J,F]}function Z(W,v){var L=v;while(W[L]!=0)L++;return[Y.l5(W,v,L-v),L-v]}function P(W,v){var L=v;
while(W[L]!=0)L++;for(var e=v;e<L;e++)if(W[e]>127)throw"e";return Y.su(W,v,L-v)}function C(W){n=W;F=1;
var v=[];while(F<W.length){var L=F,H=v.length,y=P(W,F);F+=y.length+1;var g=d();if(g>2)throw"e";var Q=d(),J=[];
for(var e=0;e<Q;e++){var A=P(W,F);F+=A.length+1;var p=d(),U=d(),j=d();J.push(g==0?A:[j,U,p,A])}v.push([["enum","strc","mesg"][g],y,J])}return v}return{ai9:C,ao0:w}}();
function cA(){}cA.Hy=function(n,F){var O=new Uint8Array(n),I=8,x=Y.wc(O,I),Z=0,h=0;I+=4;var r=[];while(I<O.length){var _=Y.wc(O,I);
I+=4;var d=O.slice(I,I+_);if(O[I]==137&&O[I+1]==80){}else d=UZIP.inflateRaw(d);r.push(d);I+=_}var w=hc.ai9(r[0]);
for(var e=0;e<w.length;e++)if(w[e][1]=="Message")Z=e;var P=hc.ao0(r[1],0,w,w[Z],0)[0],C={Yw:{},uM:{},a1A:{}},W=P.nodeChanges;
for(var v=0;v<W.length;v++){var L=W[v],H=L.guid;C.uM[H.sessionID+","+H.localID]=L}for(var v=0;v<W.length;
v++){var L=W[v],H=L.parentIndex;if(H){var y=cA.Ie(C.uM,H.guid);if(y.children==null)y.children=[];y.children.push(L)}}var g=W[0],Q=g.children,J=new gv,A=[],p=[];
for(var H=0;H<Q.length;H++){var U=Q[H],j=U.children;if(U.name=="Internal Only Canvas"||j==null)continue;
var b=new gv;for(var e=0;e<j.length;e++){var s=j[e],G=s.transform,T=s.size;if(G.m00==1&&G.m10==0&&G.m01==0&&G.m11==1){var z=new gv(G.m02,G.m12,T.x,T.y);
b=b.Tq(z)}}var m=J.v==0?0:J.v+100,$=b.clone();$.x=0;$.y=m;J=J.Tq($);A[H]=b;p[H]=m}var o=fA.FS(new gv(0,0,J.d,J.v),8192*8192);
F.d=Math.round(J.d/o);F.v=Math.round(J.v/o);F.buffer=q.f(F.d*F.v*4);for(var H=0;H<Q.length;H++){var U=Q[H],j=U.children;
if(U.name=="Internal Only Canvas"||j==null)continue;j.sort(cA.bP);var X=new cD(1,0,0,1,-A[H].x,p[H]-A[H].y);
X.scale(1/o,1/o);for(var e=0;e<j.length;e++){var s=j[e];cA.cY(s,[],X,P.blobs,F,0,C);h++}}F.bJ(h);F.u4=!0;
if(o!=1)alert("File scaled down "+o+"x")};cA.cY=function(n,F,O,I,x,r,_){var d=cA,s=!1,G,T,m,$,o;for(var e=0;
e<F.length;e++){var w=F[e],Z=w.guidPath.guids[0];if(d.a3E(Z,n.guid)){var P={};for(var C in n)P[C]=w[C]!=null?w[C]:n[C];
n=P}}var W=n.type,v=n.children,L=n.size,H=n.effects,y=x.Kv();y.V9(n.name);y.tt(n.visible);y.opacity=Math.round(n.opacity*255);
var g=d.$$(n.transform),Q=g.clone();Q.concat(O);var J=new gv(Math.round(Q.hb),Math.round(Q.i9),Math.round(L.x*Q.GW()),Math.round(L.y*Q.GW())),A=n.fillPaints,p=n.inheritFillStyleID;
if(p){var P=d.Ie(_.uM,p);if(P)A=P.fillPaints}if(A==null)A=[];var A=d.U3(A),U=A[0],j=n.strokePaints,p=n.inheritFillStyleIDForStroke;
if(p){var P=d.Ie(_.uM,p);if(P)j=P.fillPaints}if(j==null)j=[];var j=d.U3(j),b="BOOLEAN_OPERATION LINE RECTANGLE ROUNDED_RECTANGLE ELLIPSE VECTOR REGULAR_POLYGON".split(" ").indexOf(W)!=-1;
if(b||W=="FRAME"){G=new K.X9;T=[];d.op(n,I,G,T);s=q.Y.Zx(G.b);q.Y.gS(G.b,Q);J=q.z.Me(q.Y.if(G.b));if(_.Yw.dv&&U){var z=K.X9.jI(_.Yw.dv.b);
for(var e=2;e<z.length;e++)if(z[e].Xu!=null)z[e].Xu=3;G.b=G.b.concat(z.slice(2));T=T.concat(JSON.parse(JSON.stringify(_.Yw.oK)))}}if(U&&U.type=="IMAGE"){o=U.imageScaleMode;
m=d.dH(I,U.image.dataBlob);var h=m.Kh.d/m.Kh.v,X=L.x/L.y;$=Math.abs(h-X)}if(W=="FRAME"){}else if(b&&s&&m&&(o=="FIT"||o=="FILL"&&$<=.05)){var D=I[U.image.dataBlob].bytes,f=x._C(D,y.getName(),0,0);
f.Cq=y.Cq;f.opacity=y.opacity;y=f;var R=new gv(0,0,L.x,L.y);if(o=="FIT"){var i=m.Kh.d,t=m.Kh.v,N=Math.min(L.x/i,L.y/t),M=i*N,hK=t*N;
R=new gv(R.x+(R.d-M)/2,R.y+(R.v-hK)/2,M,hK)}var bD=q.z.om(R).H;q.z.m(bD,Q,bD);y.add.SoLd.Trnf=c.V.uB(bD);
y.add.SoLd.nonAffineTransform=c.V.uB(bD);var co=[],H=n.effects,iM=U.paintFilter;if(H)for(var e=0;e<H.length;
e++)if(H[e].type=="FOREGROUND_BLUR"){var hs=H[e],S=bS.Lk("GsnB",{});co.push(S);S.v.enab.v=hs.visible;
S.v.Fltr.v.Rds.v.val=hs.radius/2.4}if(iM&&iM.exposure!=0){var S=bS.Lk("brit",{});co.push(S);S.v.Fltr.v.Brgh.v=Math.round(iM.exposure*160);
S.v.Fltr.v.useLegacy.v=!0}if(co.length!=0){y.add.SoLd.filterFX=bS.sN();x.ti({id:y.add.SoLd.placed.v,rect:new gv,buffer:q.f(1),r:new K.FZ});
y.add.SoLd.filterFX.v.filterFXList.v=co}y.aY(x,!1);d.z8(_,y,x)}else if(b){d.bL(y,T,G,n,U,Q,J,I,x,_);
var a=d.HA(n,j[0],Q,J,I,x,_);if(a[0]!="None"){var bV=y.add.vstk;bV.strokeEnabled.v=!0;bV.strokeStyleLineWidth.v.val=n.strokeWeight*Q.GW();
bV.strokeStyleLineAlignment.v.strokeStyleLineAlignment=bW.uS.RD[["INSIDE","CENTER","OUTSIDE"].indexOf(n.strokeAlign)];
var a5={SoCo:"SoFi",GdFl:"GrFl"}[a[0]],i9=["SoFi","GrFl","patternFill"].indexOf(a5),dG=[bW.ez,bW.KK,bW.dC][i9];
bV.strokeStyleContent.v={classID:bW.uS.Ul[0]};bV.strokeStyleLineDashSet.v=ha.Kn(n.dashPattern,1/n.strokeWeight);
var ap=bV.strokeStyleContent.v={classID:bW.uS.Ul[i9]};for(var e=0;e<dG.length;e++)ap[dG[e]]=a[1][dG[e]]}if(H)for(var e=0;
e<H.length;e++){var hs=H[e];if(hs.type!="FOREGROUND_BLUR")continue;G.RI=hs.radius/2.4}y.o3(x)}else if(W=="TEXT"){var bk=n.textData,c2=bk.layoutSize,gg=["LEFT","RIGHT","CENTER"].indexOf(n.textAlignHorizontal);
y.add.lnsr="rend";y.add.TySh=bt.Cc(0,0);y.add.TySh.Qa=new gv(0,0,100,100);var bH=Q.clone();y.add.TySh.m=bH;
var gw=y.add.TySh.Vb,gP=bk.characters;if(n.textCase=="TITLE"){for(var e=0;e<gP.length;e++)if(e==0||gP[e-1]==" "){var dT=gP.slice(0,e),fU=gP.slice(e+1);
gP=dT+gP[e].toUpperCase()+fU}}gP=gP.replace(/\u2028/g,"\n");gP=gP.replace(/\u2029/g,"\n");gP=gP.replace(/\r/g,"\n");
bt.bw(gw,0,gP);var dV=n.textAutoResize,ac=bk.baselines;if(dV=="WIDTH_AND_HEIGHT"){var e2=gg==0?0:gg==1?c2.x:c2.x/2,cX=ac?ac[0].position.y:0;
bH.translate(e2*Q.GW(),cX*Q.GW());bt.li(gw,0)}else if(dV=="HEIGHT"||dV=="NONE"||dV==null){var cX=ac?ac[0].position.y-n.fontSize*.7:0;
bH.translate(0,cX*Q.GW());bt.li(gw,1);bt.Ar(gw,[0,0,Math.round(c2.x),Math.round(1.2*c2.y)])}else throw dV;
if(gP!=""){var eR=bt.gU(gw,0,1);d.UY(n,Q,L,eR,y,I,x,_);bt.F$(gw,0,gP.length,eR);var gR=bk.characterStyleIDs,bN=bk.styleOverrideTable;
if(gR){gR=gR.slice(0);for(var e=0;e<gR.length;e++)if(gP[e]=="\n")gR[e]=-e-1;var eG=[0],ef=0,fi=0;for(var e=0;
e<gR.length;e++){fi++;var ep=gR[e];if(e==0||ep==gR[e-1]){}else{eG.push(fi-1,e);fi=1}}eG.push(fi);for(var e=0;
e<eG.length;e+=2){var iJ=eG[e],aT=eG[e+1];if(gP[iJ]=="\n")continue;var ep=gR[iJ];if(ep!=0){var dm;for(var c1=0;
c1<bN.length;c1++)if(bN[c1].styleID==ep)dm=bN[c1];var eR=bt.gU(gw,iJ,iJ+1);d.UY(dm,Q,L,eR,y,I,x,_);bt.F$(gw,iJ,iJ+aT,eR)}}}}}else if(W=="SYMBOL"){}else if(W=="INSTANCE"){var gk=n.symbolData,a8=gk.symbolOverrides,P=d.Ie(_.uM,gk.symbolID);
if(P)v=P.children;else console.log(n.name,"symbol not found",gk.symbolID);F=F.slice(0);for(var e=0;e<a8.length;
e++)F.push(a8[e])}else console.log(W);if(!1){}else if(v&&!b){x.t.push(x.VF());var bX=!1;if(r==0&&W!="SYMBOL"&&W!="INSTANCE"){y.Hp(J);
var bL=A?A[0]:null;if(bL&&bL.type=="SOLID"){var c_=bL.color;y.add.artb.artboardBackgroundType.v=4;y.add.artb.Clr=d.kk(c_)}}else if(U&&G){var eS=x.Kv();
eS.V9("Background");d.bL(eS,T,G,n,U,Q,J,I,x,_);eS.o3(x);x.t.push(eS);bX=!0}v.sort(d.bP);var c$=_.Yw;
_.Yw={};for(var cp=0;cp<v.length;cp++)d.cY(v[cp],F,Q,I,x,r+1,_);_.Yw=c$;y.add.lsct=!1?ho.x7:ho.OC;y.mf="pass";
var b_=y.Y9();y.Cq=24;y.tt(b_);var hy=r!=0&&A.length!=0&&!n.frameMaskDisabled&&n.containerSupportsFillStrokeAndCorners;
if(!bX&&hy&&G){y.add.vmsk=G;y.add.vogk=T;y.o3(x)}else d.z8(_,y,x);x.t.push(y)}else if(n.mask){if(G){_.Yw.dv=G;
_.Yw.oK=T}}else{var gx=[],fK=1;if(H)for(var eJ=0;eJ<H.length;eJ++){var hs=H[eJ],d4=hs.color,cs=hs.type,en=["DROP_SHADOW","INNER_SHADOW"].indexOf(cs);
if(en!=-1){var cm=["DrSh","IrSh"][en],c5=JSON.parse(bW.E5[bW.order.indexOf(cm)]);gx.push([cm,c5]);c5.enab.v=hs.visible;
c5.Md.v.BlnM=fk.Pw(d.ajf(hs.blendMode));c5.Opct.v.val=Math.round(100*d4.a);c5.blur.v.val=Math.round(hs.radius*Q.GW());
c5.Clr=d.kk(d4);var e2=hs.offset.x,cX=hs.offset.y;c5.uglg.v=!1;c5.lagl.v.val=Math.round(180/Math.PI*Math.atan2(cX,-e2));
c5.Dstn.v.val=Math.round(Math.sqrt(e2*e2+cX*cX)*Q.GW())}}if(W=="TEXT"&&A[0]&&A[0].type!="SOLID")fK=0;
for(var e=fK;e<A.length;e++){var ez=A[e],d6=d.HA(n,ez,Q,J,I,x,_);if(d6[0]=="GdFl")gx.push(["GrFl",d6[1]]);
else if(d6[0]=="SoCo")gx.push(["SoFi",d6[1]]);else if(d6[0]=="PtFl")gx.push(["patternFill",d6[1]]);else throw d6}if(gx.length!=0){var ee=JSON.parse(bW.default);
for(var e=0;e<bW.order.length;e++)ee[bW.jV[e]]={t:"VlLs",v:[]};for(var e=0;e<gx.length;e++){var c0=gx[e],cm=bW.jV[bW.order.indexOf(c0[0])];
ee[cm].v.unshift({t:"Objc",v:c0[1]})}if(v==null)y.add.lmfx=ee}x.t.push(y)}};cA.bL=function(n,F,O,I,x,r,_,d,w,Z){var P=cA;
n.Cq|=16;n.add.vogk=F;n.add.vmsk=O;var C=n.add.vstk=JSON.parse(JSON.stringify(bW.uS.default)),W=P.HA(I,x,r,_,d,w,Z);
if(W[0]=="None"){C.fillEnabled.v=!1;n.add.SoCo=W[1]}else{var v=W[1].Opct.v.val;if(v!=100)n.opacity=Math.round(n.opacity/255*(v/100)*255);
n.add[W[0]]=W[1]}};cA.bP=function(n,F){var O=n.parentIndex.position,I=F.parentIndex.position;return O>I?1:-1};
cA.U3=function(n){for(var e=1;e<n.length;e++){var F=n[e];if(F.type=="IMAGE"&&F.opacity==1){n=n.slice(e);
break}}for(var e=0;e<n.length;e++){var F=n[e],O=F.imageThumbnail;if(F.type=="IMAGE"&&F.image.dataBlob==null&&O&&O.dataBlob)F.image=O;
if(!F.visible||F.type=="IMAGE"&&F.image.dataBlob==null){n.splice(e,1);e--}}return n};cA.z8=function(n,F,O){if(n.Yw.dv){F.add.vmsk=n.Yw.dv.clone();
F.add.vogk=JSON.parse(JSON.stringify(n.Yw.oK));F.o3(O)}};cA.UY=function(n,F,O,I,x,r,_,d){var w=n.fontSize,Z=n.lineHeight,P=n.fontName,C=n.textAlignHorizontal,W=n.textTracking,v=n.textCase;
if(w==null)w=I.Bw.FontSize;if(P)bt.Zu(I,P.postscript);if(w!=null)I.Bw.FontSize=Math.round(w);if(W)I.Bw.Tracking=Math.round(W*1e3);
if(v)I.Bw.FontCaps=v=="UPPER"?2:0;if(Z&&(Z.units!="PERCENT"||Z.value!=100)){if(w==null)w=15;var L=Z.value;
if(Z.units=="PERCENT")L=1*w*L/100;if(Z.units=="RAW")L=1*w*L;I.Bw.AutoLeading=!1;I.Bw.Leading=Math.round(L)}if(C)I.jp.Justification=["LEFT","RIGHT","CENTER"].indexOf(C);
var H=n.fillPaints,y=n.inheritFillStyleID;if(y){var g=cA.Ie(d.uM,y);if(g)H=g.fillPaints}if(H&&H[0]){var Q=cA.HA(n,H[0],F,O,r,_,d);
if(Q[0]=="SoCo"){var J=q.W.S_(Q[1].Clr.v);I.Bw.FillColor={Type:1,Values:[1,J.Q/255,J.l/255,J.O/255]};
x.opacity=Math.round(x.opacity/255*(Q[1].Opct.v.val/100)*255)}}};cA.HA=function(n,F,O,I,x,r,_){var d=cA,w,Z,P=n.size;
if(F){var C=F.type,W=["GRADIENT_LINEAR","GRADIENT_RADIAL","GRADIENT_DIAMOND","GRADIENT_ANGULAR"].indexOf(C);
if(C=="SOLID"){w="SoCo";var v=F.color;Z=JSON.parse(bW.E5[bW.order.indexOf("SoFi")]);Z.Clr=d.kk(v)}else if(W!=-1){var L=JSON.parse(bW.E5[bW.order.indexOf("GrFl")]),H=L.Grad.v;
H.Intr.v=0;L.Type.v.GrdT=["Lnr","Rdl","Dmnd","Angl"][W];var y=[],g=F.stops;for(var e=0;e<g.length;e++){var Q=g[e],J=Q.color;
y.push([Q.position,[J.r,J.g,J.b],J.a])}q.W.ne(y,H);var A=d.$$(F.transform);A.uZ();var p=A.clone();if(P)p.scale(P.x,P.y);
p.concat(O);var U=new aE(0,.5),j=new aE(1,.5);U=p.Pz(U);j=p.Pz(j);if(!0){U.x=j.x+.5*(U.x-j.x);U.y=j.y+.5*(U.y-j.y)}q.W.aJ(U,j,I,L);
if(W==3){if(p.R*p.oQ-p.O*p.Pr<0)L.Rvrs.v=!L.Rvrs.v}w="GdFl";Z=L}else if(C=="IMAGE"){var L=JSON.parse(bW.E5[bW.order.indexOf("patternFill")]),b=L.phase.v,s=F.image.dataBlob,G=_.a1A[s],f=1;
if(G==null){var T=d.dH(x,s);G=_.a1A[s]={};G.id=fj.Mj()+"-d71c-11e5-b1ae-a548a96e5f9f";G.IR=[new Uint8Array(T.data),T.Kh];
G.name="someImage";r.CI(G)}L.Algn.v=!0;L.Ptrn.v.Idnt.v=G.id;var z=O.hb,m=O.i9,$=F.imageScaleMode,A=d.$$(F.transform);
A.uZ();var o=I.d,h=I.v,X=G.IR[1].d,D=G.IR[1].v;if($=="FILL"){f=Math.max(o/X,h/D);f=Math.round(f*100)/100}else if($=="FIT"){f=Math.min(o/X,h/D);
f=Math.round(f*100)/100}else if($=="STRETCH"){var R=o*A.R,i=h*A.oQ;f=.5*(R/X+i/D);f=Math.round(f*100)/100;
z+=(R-o)/2+A.hb*o;m+=(i-h)/2+A.i9*h}else if($=="TILE"){f=F.scale;f=Math.round(f*100)/100;z+=(R-o)/2;
m+=(i-h)/2}var t=f*X,N=f*D;z+=-(t-o)/2;m+=-(N-h)/2;L.Scl.v.val=Math.round(100*f);b.Hrzn.v=Math.round(z);
b.Vrtc.v=Math.round(m);w="PtFl";Z=L}else throw C;if(Z)Z.Opct={t:"UntF",v:{type:"#Prc",val:Math.round(F.opacity*100)}}}else{w="None";
Z={classID:"null",Clr:{t:"Objc",v:q.W.Vm({Q:0,l:0,O:0})}}}return[w,Z]};cA.dH=function(n,F){var O=n[F];
if(O.rslt)return O.rslt;var I=O.bytes.buffer,x=fx.TG(I),r=fx.rM(x);try{O.rslt=r.bx(I)[0]}catch(hl){O.rslt={data:q.f(4),Kh:new gv(0,0,1,1)}}return O.rslt};
cA.op=function(n,F,O,I){var x=n.type,r=n.size,_=n.cornerRadius,C;if(_==null)_=0;var d=q.oK.CZ(),w=r.x,Z=r.y,P=[_,_,_,_],W=["rectangleTopLeftCornerRadius","rectangleTopRightCornerRadius","rectangleBottomRightCornerRadius","rectangleBottomLeftCornerRadius"];
for(var e=0;e<4;e++)if(n[W[e]]!=null)P[e]=n[W[e]];if(x=="RECTANGLE"||x=="ROUNDED_RECTANGLE"||x=="FRAME"){C=q.Y.jP.Rect(0,0,w,Z,P)}else if(x=="ELLIPSE"){var v=n.arcData,L=v?v.startingAngle:0,H=v?v.endingAngle:2*Math.PI,y=v?v.innerRadius:0;
if(L==0&&H>1.999*Math.PI)C=q.Y.jP.BT(0,0,w,Z,0);else C=q.Y.jP.aaT(w/2,Z/2,Z/2,L,H);if(y!=0&&y!=1){var g=K.X9.jI(C).slice(3);
g.reverse();for(var e=0;e<g.length;e++){var Q=g[e],J=Q.pt;Q.pt=Q.Cz;Q.Cz=J}var A=new cD;A.translate(-w/2,-Z/2);
A.scale(y,y);A.translate(w/2,Z/2);q.Y.gS(g,A);C=C.concat(g);C[2].length*=2}}else if(x=="LINE"){C=q.Y.jP.Rect(0,0,w,Z,0);
C.pop();C.pop();C[2].length=2}else if(x=="REGULAR_POLYGON"){C=q.Y.jP.bC(.5,.5,.5,Math.PI/2,n.count,0);
var p=new cD;p.scale(w,Z);q.Y.gS(C,p)}else if(x=="BOOLEAN_OPERATION"){C=[{type:6},{type:8,all:0}];var U=n.children,j=["XOR","UNION","SUBTRACT","INTERSECT"].indexOf(n.booleanOperation);
if(j==-1)throw n;if(U==null)U=[];for(var e=0;e<U.length;e++){var b=U[e],s=new K.X9,G=[],T=cA.op(b,F,s,G);
if(s.b==null)continue;q.Y.gS(s.b,cA.$$(b.transform));C=C.concat(s.b.slice(2));for(var z=0;z<G.length;
z++)I.push(G[z])}for(var e=3;e<C.length;e++)if(C[e].Xu!=null)C[e].Xu=j;d=null}else if(x=="VECTOR"){var m,$;
if(!0){var o=n.vectorData;m=o.normalizedSize;$=o.vectorNetworkBlob}else{m=r;$=cE[0].commandsBlob;console.log(cE)}var h=F[$].bytes,X=new Uint32Array(h.buffer),D=new Float32Array(h.buffer),R=X[0],i=X[1],t=[];
for(var e=0;e<R;e++){var N=3+e*3,M=new aE(D[N+1],D[N+2]);t.push(M)}var hK=[],bD=3+R*3;for(var e=0;e<i;
e++){var co=bD+e*7,iM=X[co+1],hs=X[co+4];hK.push([iM,hs,D[co+2],D[co+3],D[co+5],D[co+6]])}var S=-1;for(var e=0;
e<i;e++){if(S==-1){}else{var a=-1;for(var z=e;z<i;z++)if(hK[z][1]==S)a=z;for(var z=e;z<i;z++)if(hK[z][0]==S)a=z;
if(a!=-1){var bV=0,J=hK[a];hK[a]=hK[e];hK[e]=J;if(J[0]!=S){bV=J[0];J[0]=J[1];J[1]=bV;bV=J[2];J[2]=J[4];
J[4]=bV;bV=J[3];J[3]=J[5];J[5]=bV}}}S=hK[e][1]}var a5=[],i9=[],dG=-1;S=-1;for(var e=0;e<i;e++){var ap=hK[e],iM=ap[0],hs=ap[1],bk=t[iM],c2=t[hs];
if(S!=iM){i9.push("M");a5.push(bk.x,bk.y);dG=iM}a5.push(bk.x+ap[2],bk.y+ap[3]);a5.push(c2.x+ap[4],c2.y+ap[5]);
i9.push("C");a5.push(c2.x,c2.y);S=hs;if(dG==hs){i9.push("Z");dG=S=-1}}C=q.z.rD({H:a5,s:i9},!0);if(_!=0){var P=[],gg=C[2].length;
for(var e=0;e<gg;e++)P.push(_);if(q.Y.NE(C))q.Y.OR(C,2,P)}var bH=new cD;bH.scale(m.x==0?1:r.x/m.x,m.y==0?1:r.y/m.y);
q.Y.gS(C,bH)}O.b=C;if(d)I.push(d)};cA.Ie=function(n,F){return n[F.sessionID+","+F.localID]};cA.a3E=function(n,F){return n.sessionID==F.sessionID&&n.localID==F.localID};
cA.ajf=function(n){var F={NORMAL:"norm",MULTIPLY:"mul ",SCREEN:"scrn",COLOR_DODGE:"div "}[n];if(F==null)throw n;
return F};cA.kk=function(n){return{t:"Objc",v:q.W.Vm({Q:n.r*255,l:n.g*255,O:n.b*255})}};cA.$$=function(n){var F=[n.m00,n.m10,n.m01,n.m11,n.m02,n.m12];
for(var e=0;e<6;e++)if(Math.abs(F[e])<1e-20)F[e]=0;return new cD(F[0],F[1],F[2],F[3],F[4],F[5])};function h4(){}h4.Hy=function(){var n=Y.su;
function F(W,v,L,H){var y=H?[]:{};while(v<W.length-1&&W[v]!=125){var g=n(W,v,3),Q=n(W,v+3,1),J;v+=4;
v++;if(Q=="v"){var A=F(W,v,L+1,g=="ELM"||g=="TIL");J=A.G;v=A.n}else if(Q=="i"||Q=="f"){var p=v;while(W[p]!=125)p++;
var U=n(W,v,p-v);J=Q=="i"?parseInt(U,16):parseFloat(U);v=p+1}else if(Q=="s"){var j=Y.Ys(W,v),U="";v+=2;
for(var e=0;e<j;e++)U+=String.fromCharCode(W[v+2*e+1]);J=U;v=v+2*j+1}else if(Q=="b"){J=W[v]==49;v=v+2}else throw"e";
if(H)y.push([g,J]);else if(y[g]==null)y[g]=J;else{if(!(y[g]instanceof Array))y[g]=[y[g]];y[g].push(J)}}v++;
return{G:y,n:v}}function O(W,v){var L=I(W).slice(1),W=v.Clr.v;W.Rd.v=L[0]*255;W.Grn.v=L[1]*255;W.Bl.v=L[2]*255}function I(W){return[(W>>>24&255)/255,(W>>>16&255)/255,(W>>>8&255)/255,(W>>>0&255)/255]}function x(W,v){var L=v&4278190080|(v&255)<<16|(v>>>8&255)<<8|v>>>16&255;
new Uint32Array(W.buffer).fill(L)}function r(W,v){var L=W.TSZ,H=W.WPX,y=W.HPX,g=W.TIL,Q=new gv(0,0,H,y),J=q.f(H*y*4),A=0;
for(var p=0;p<y;p+=L)for(var U=0;U<H;U+=L){var j=new gv(U,p,L,L),b,s=g[A];if(s[0]=="TMC"){b=q.f(j.X()*4);
x(b,s[1])}else if(s[0]=="TID"){b=v[s[1]]}q.nF(b,j,J,Q);A++}return[J,Q]}function _(W,v){W=new Uint8Array(W);
var L=8,H,y={};while(L<W.length){var g=Y.c(W,L);L+=4;var Q=n(W,L,4);L+=4;if(Q=="mkTS"){var J=pako.inflate(W.slice(L,L+g)),A=F(J,0,0);
H=A.G}else if(Q=="mkBT"){var p=Y.c(W,L+4),U=Y.c(W,L+8),J=pako.inflate(W.slice(L+76,L+g));if(U==0)for(var e=0;
e<J.length;e+=4){var j=J[e],b=J[e+1],s=J[e+2],G=J[e+3];J[e+3]=j;J[e+2]=G;J[e+1]=s;J[e]=b}else{var T=q.f(J.length*4);
T.fill(255);q.GN(J,T);J=T}y[p]=J}L+=g+4}var z=H.PDC?H.PDC:H.MKB,m=z.WID,$=z.HIT,o=z.BGC;v.d=m;v.v=$;
if(o>>>24!=0){var h=v.Kv();h.V9("Background");v.t.push(h);h.rect=new gv(0,0,m,$);h.buffer=q.f(h.rect.X()*4);
x(h.buffer,o)}var X=(z.LYL?z:H).LYL.LAY;for(var e=0;e<X.length;e++)w(X[e],v,null,y)}function d(W,v,L){var H=W[v];
return H instanceof Array?H[L]:H}function w(W,v,L,H){var y=v.Kv();if(W.VIS!=null)y.tt(W.VIS);if(W.VIF!=null)y.tt(W.VIF.VIS);
if(W.OPA!=null)y.opacity=Math.round(255*W.OPA/1e3);y.mf=W.CLL||L=="GRP"?"pass":"norm";if(W.BLD!=null){var g=W.BLD,Q={"0":"norm","2":"mul ","5":"scrn","7":"diss","9":"dark","10":"lite","37":"idiv","30":"norm","39":"lbrn","41":"vLit"}[g+""];
if(Q==null)console.log(W.OBN,g);else y.mf=Q;if(g==30)y.opacity>>>=1}if(W.CLL){y.V9(W.LNM);v.t.push(v.VF());
var J=W.CLL.CEL.ELM;for(var e=J.length-1;e>=0;e--)w(J[e][1],v,J[e][0],H);y.add.lsct=W.DIS?ho.x7:ho.OC;
y.Cq|=24}else if(L=="GRP"){var A=y.add.lmfx=Z(W.EFL),p;v.t.push(v.VF());var J=W.ELM;if(W.MNA&&W.MRX){p=J[0][1];
J=J.slice(1)}y.V9("Group: "+J.length+" objects");for(var e=J.length-1;e>=0;e--)w(J[e][1],v,J[e][0],H);
if(p){var U=r(p,H),j=y.r=new K.FZ;j.rect=U[1].clone();j.rect.x=p.XLC;j.rect.y=p.YLC;j.channel=q.f(j.rect.X());
q.xg(U[0],j.channel,0);q.uZ(j.channel)}y.add.lsct=ho.OC;y.Cq|=24}else if(L=="IMG"){y.V9(W.OBN?W.OBN:"Bitmap");
var U=r(W,H);y.rect=U[1].clone();y.rect.x=W.XLC;y.rect.y=W.YLC;y.buffer=U[0]}else if(L=="TXT"){var b=W.TFS,s=b.TRN instanceof Array?b.TRN.length:1,m="";
y.add.lnsr="rend";y.add.TySh=bt.Cc(0,0);y.add.TySh.Qa=new gv(0,0,100,100);var G=new cD(1,0,0,1,W.LFT,W.TOP);
if(W.MTX){var T=W.MTX,j=new cD(T.M00,T.M01,T.M10,T.M11,T.M20,T.M21);G.concat(j)}y.add.TySh.m=G;var z=y.add.TySh.Vb;
for(var e=0;e<s;e++){var $=d(b,"TRN",e);bt.bw(z,m.length,$);var o=bt.gU(z,0,1);bt.Zu(o,d(b,"FON",e));
o.Bw.FontSize=Math.round(d(b,"PTS",e));var h=d(b,"FCL",e);o.Bw.FillColor={Type:1,Values:I(h)};bt.F$(z,m.length,m.length+$.length,o);
m+=$}y.V9(m.slice(0,255));var X=W.RIT-W.LFT,D=W.BOT-W.TOP;if(W.IMG){w(W.IMG,v,"IMG",H);var f=v.t.pop();
y.buffer=f.buffer;y.rect=f.rect}bt.li(z,1);bt.Ar(z,[0,0,X,D])}else if(L=="PTH"){y.V9(W.OBN?W.OBN:"Path");
y.Cq|=16;var R=!1,i=y.add.vmsk=new K.X9,N=y.add.vstk=JSON.parse(JSON.stringify(bW.uS.default)),A=y.add.lmfx=Z(W.EFL,i),M=W.PBL.PBP;
if(!(M instanceof Array))M=[M];for(var hK=0;hK<M.length;hK++){var bD=M[hK].PBT,co=M[hK].ISC?0:3;i.b.push({type:co,length:bD.length,Xu:0,sa:2,g9:0,Qy:0});
for(var e=0;e<bD.length;e++){var iM=bD[e],hs=iM.XLC,S=iM.YLC,a=[hs,S,hs,S,hs,S],bV="XPC YPC XLC YLC XSC YSC".split(" ");
for(var a5=0;a5<6;a5++){var i9=bV[a5],dG=iM[i9];if(dG!=null)a[a5]=dG}i.b.push({type:co+2,I:new aE(hs,S),pt:new aE(a[0],a[1]),Cz:new aE(a[4],a[5])})}}y.XO();
var ap=q.Y.if(i.b),bk=W.PAT,c2=bk.BPL,gg=bk.FPL,bH=bk.TXF;if(gg&&gg.FEF)i.RI+=gg.FEF/2.4;if(c2){var gw=c2.CAT;
N.strokeEnabled.v=!0;N.strokeStyleLineWidth.v.val=c2.BDI;if(c2.BDI==1)N.strokeStyleLineAlignment.v.strokeStyleLineAlignment="strokeStyleAlignInside";
O(bk.BCL,N.strokeStyleContent.v);if(gw!="bc_Basic"&&gw!="bc_Pencil")R=!0}if(gg==null){N.fillEnabled.v=!1;
y.add.SoCo=JSON.parse(bW.E5[bW.order.indexOf("SoFi")]);O(0,y.add.SoCo)}else if(gg.CAT=="fc_Solid"){y.add.SoCo=JSON.parse(bW.E5[bW.order.indexOf("SoFi")]);
O(W.PAT.FCL,y.add.SoCo)}else if(gg.CAT=="fc_Linear"||gg.CAT=="fc_Circular"||gg.CAT=="fc_Elliptical"){var gP=gg.CAT=="fc_Linear",dT=y.add.GdFl=JSON.parse(bW.E5[bW.order.indexOf("GrFl")]),fU=dT.Grad.v,dV=[],ac=gg.FGL.FGY,bV=ac.FG0.FGI,e2=ac.FG1.FGI;
for(var e=0;e<bV.length;e++){var cX=bV[e],eR=I(cX.FGC),gR=1;if(e2.length==bV.length)gR=I(e2[e].FGC)[0];
dV.push([cX.FGP,eR.slice(1),gR])}dT.Type.v.GrdT=gP?"Lnr":"Rdl";q.W.ne(dV,fU);fU.Intr.v=0;var bN=W.PRI?W.PRI:W,eG=new aE(bN.PSX,bN.PSY),ef=new aE(bN.PEX,bN.PEY);
if(gg.CAT=="fc_Elliptical"&&bN.PFX!=null){var fi=new aE(bN.PFX,bN.PFY),ep=aE.sl(eG,ef),iJ=aE.sl(eG,fi);
if(iJ<ep){var aT=ep;ep=iJ;iJ=aT}ef=new aE(eG.x+(ep+iJ)/2,eG.y);if(ep/iJ<.5)R=!0}if(gP){eG.x=(eG.x+ef.x)/2;
eG.y=(eG.y+ef.y)/2}q.W.aJ(eG,ef,ap,dT)}else console.log(gg.CAT);if(gg&&gg.FTB!=0){var U=r(bH.MSK,H),dm={};
dm.id=fj.Mj()+"-d71c-11e5-b1ae-a548a96e5f9f";dm.name="someImage";dm.IR=U;v.CI(dm);var c1=U[0];for(var e=0;
e<c1.length;e+=4){c1[e+3]=255-c1[e];c1[e]=c1[e+1]=c1[e+2]=255}var dT=JSON.parse(bW.E5[bW.order.indexOf("patternFill")]);
dT.Opct.v.val=Math.round(gg.FTB/10);dT.Algn.v=!0;dT.Ptrn.v.Idnt.v=dm.id;A.patternFillMulti.v.unshift({t:"Objc",v:dT})}if(R&&W.IMG){w(W.IMG,v,"IMG",H);
var gk=v.t[v.t.length-1];gk.opacity=y.opacity;return}y.o3(v)}else console.log("unknown layer type",L,W);
v.t.push(y)}function Z(W,v){var L=JSON.parse(bW.default);for(var e=0;e<bW.order.length;e++)L[bW.jV[e]]={t:"VlLs",v:[]};
if(W==null)return L;var H=W.EPS;if(!(H instanceof Array))H=[H];for(var e=0;e<H.length;e++){var y=H[e].DCE,g={};
for(var Q=0;Q<y.length;Q++)g[y[Q].DCK]=y[Q].DCV;if(g.EffectIsVisible=="false")continue;var J=g.mkbFile_WriteOnly_TemporaryEffectUiName;
if(J=="Gaussian Blur..."&&v){v.RI+=parseFloat(g.gaussian_blur_radius);continue}var A=["Drop Shadow","Inner Bevel","Inner Glow"].indexOf(J);
if(A==-1){continue}var p=["DrSh","ebbl","IrGl"][A],U=bW.jV[bW.order.indexOf(p)],j=JSON.parse(bW.E5[bW.order.indexOf(p)]);
L[U].v.unshift({t:"Objc",v:j});if(p=="DrSh"){j.uglg.v=!1;P(g,"ShadowDistance",j,"Dstn");P(g,"ShadowBlur",j,"blur");
P(g,"ShadowAngle",j,"lagl",180);j.Opct.v.val=100;C(g,"ShadowColor",j,"Clr")}if(p=="IrGl"){j.Md.v.BlnM="Nrml";
var b=g.MaskSoftness,s=g.GlowWidth;if(b&&s){b=parseInt(b);s=parseInt(s);j.blur.v.val=s+b;j.Ckmt.v.val=Math.round(100*s/(s+b))}P(g,"BevelContrast",j,"Opct");
C(g,"OuterBevelColor",j,"Clr")}if(p=="ebbl"){j.uglg.v=!1;P(g,"BevelWidth",j,"blur");P(g,"AngleSoftness",j,"Sftn");
P(g,"BevelContrast",j,"srgR");P(g,"LightAngle",j,"lagl")}}return L}function P(W,v,L,H,y){var g=W[v];
if(y==null)y=0;if(g)L[H].v.val=parseInt(g)+y}function C(W,v,L,H){var y=W[v];if(y){y=y.slice(1);if(y.length==6)y=y+"ff";
if(y.length!=8)throw"e";var g=I(parseInt(y,16)),Q=L[H].v;Q.Rd.v=g[0]*255;Q.Grn.v=g[1]*255;Q.Bl.v=g[2]*255;
L.Opct.v.val=Math.round(L.Opct.v.val/100*g[3]*100)}}return _}();function gM(){}gM.Hy=function(){function n(b,s){var G=!1,T=Date.now(),z=g(b,G);
if(G)console.log("part found",Date.now()-T);T=Date.now();var m=y(z),$=m.Layer,o=m.Header;if(G)console.log(m);
var h=$[0];h=m.Layer[0];if(G)console.log("document parsed",Date.now()-T);T=Date.now();m.Setup.Gradient=H(m.Setup.Gradient,z);
if(G)console.log("grads loaded",Date.now()-T);T=Date.now();m.Setup.Pattern=L(m.Setup.Pattern,z);if(G)console.log("patts loaded",Date.now()-T);
T=Date.now();m.Setup.DocumentData=v(m.Setup.DocumentData,z).pop();if(G)console.log("docdata loaded",Date.now()-T);
T=Date.now();m.Setup.SVGFilter=v(m.Setup.SVGFilter,z);if(G)console.log("svgfilter loaded",Date.now()-T);
T=Date.now();var X=o.Cropmarks,D=o.BoundingBox.split(" ").map(parseFloat),f=o.ArtSize?o.ArtSize.split(" ").map(parseFloat):[D[2]-D[0],D[3]-D[1]];
s.d=Math.round(f[0]);s.v=Math.round(f[1]);var R=[1,0,0,1,-D[0]+(s.d-(D[2]-D[0]))/2,-D[1]+(s.v-(D[3]-D[1]))/2];
R[3]=-1;R[5]=s.v-R[5];if(X){X=X.split(" ").map(parseFloat);s.d=Math.round(X[2]-X[0]);s.v=Math.round(X[3]-X[1]);
R=[1,0,0,-1,-X[0],s.v+X[1]]}var i=m.Setup.DocumentData;if(i&&i[0].ArtboardArray){var t=i[0].ArtboardArray;
if(t.length!=1)console.log(t.length,"artboards");var N=new gv;for(var e=0;e<t.length;e++){var M=t[e],hK=M.PositionPoint1,bD=M.PositionPoint2,co=hK[0],iM=Math.min(hK[1],bD[1]),hs=bD[0],S=Math.max(hK[1],bD[1]);
N=N.Tq(new gv(co,iM,hs-co,S-iM))}s.d=Math.round(N.d);s.v=Math.round(N.v);R[4]=-N.x;R[5]=N.y+s.v}var a=Math.max(s.d,s.v)<1200?2:1;
if(Math.min(s.d,s.v)>6e3)a=.5;s.d=Math.round(s.d*a);s.v=Math.round(s.v*a);s.gC=Math.round(72*a);s.buffer=q.f(s.d*s.v*4);
for(var e=0;e<6;e++)R[e]*=a;for(var bV=0;bV<$.length;bV++){var a5=$[bV],i9=C(z,a5);F(s,i9,R,m,a5,z)}if(G)console.log("layers created",Date.now()-T);
T=Date.now()}function F(b,s,G,T,z,m){var $="",o=0,h="",X=UDOC.G,D=UDOC.getState(),f="norm",R=1,i="SoCo",M=!1,hK=0,co=null,iM=null,hs=null,S,a,bV,a5=0,i9=0,dG=0;
D.ctm=G;var t=[0,0,0],N=[0,0,0],bD=[],ap=[],bk=[];for(var c2=0;c2<s.length;c2++){var gg=s[c2];if(gg[0]=="%"&&!gg.endsWith(" Xh")){if(gg=="%_/ArtDictionary :")co=[gg.slice(2)];
else if(co!=null){if(gg=="%_"){var bH=A(co)[0],gw=bH.AI10_ArtUID;if(gw&&!gw.startsWith("XMLID"))b.t[b.t.length-1].V9(U(gw));
co=null}else co.push(gg.slice(gg[1]=="_"?2:1))}else if(hs){S+=(S==""?"":" ")+gg.slice(2);if(S.endsWith("X#")){hs.push(S.slice(0,S.length-3));
S=""}}continue}else if(gg=="/Mesh X!"){hs=[];S="";continue}else if(gg=="/End X!"){O(hs,D,b);hs=null;
continue}gg=gg.trim();var gP=gg.split(" "),dT=gP[gP.length-1],fU=dT.toLowerCase(),dV=gP.map(parseFloat);
if(dT=="m")X.moveTo(D,dV[0],dV[1]);else if(dT=="L"||dT=="l")X.lineTo(D,dV[0],dV[1]);else if(dT=="V"||dT=="v"||dT=="Y"||dT=="y")X.quadCurveTo(D,dV[0],dV[1],dV[2],dV[3]);
else if(dT=="C"||dT=="c")X.curveTo(D,dV[0],dV[1],dV[2],dV[3],dV[4],dV[5]);else if(dT=="H"||dT=="h"){if(dT==fU)X.closePath(D);
bD.push(JSON.parse(JSON.stringify(D.pth)))}else if(dT=="Xy"){f=["norm","mul ","scrn"][dV[0]];R=dV[1];
if(f==null){f="norm";console.log("unknown blend mode",dV[0])}}else if(dT=="Xd"){var ac=b.t[b.t.length-1];
ac.opacity=Math.round(255*R);ac.mf=ac.Ja()&&f=="norm"?"pass":f}else if(dT=="AE")a5=dV[0];else if(dT=="Ae")i9=dV[0];
else if(dT=="Xw")dG=dV[0];else if(dT=="*"){var e2=D.pth.crds,cX=D.ctm,eR=e2[0]==e2[2]?0:1;b.fT[eR].push(e2[eR]);
X.newPath(D)}else if(dT=="Xh")a=dV;else if(dT=="XN")bV=gg.split(" ")[0];else if(dT=="XI"){if(z.Raster==null){console.log("no Raster");
continue}var gR=z.Raster[o++].Data,bN=gR._begin,eG=gR._end;while(m[bN]!=88)bN++;bN+=3;var ef=m.slice(bN,eG),fi=a[8],ep=a[9],iJ=fi*ep,aT=q.f(iJ*4);
aT.fill(255);if(bV=="/DeviceRGB")for(var e=0;e<iJ;e++)for(var dm=0;dm<3;dm++)aT[4*e+dm]=ef[3*e+dm];else if(bV=="/DeviceCMYK")for(var e=0;
e<iJ;e++){var c1=w([ef[4*e+0]/255,ef[4*e+1]/255,ef[4*e+2]/255,ef[4*e+3]/255]);aT[4*e+0]=c1[0]*255;aT[4*e+1]=c1[1]*255;
aT[4*e+2]=c1[2]*255}else throw bV;var gk={"/DeviceRGB":3,"/DeviceCMYK":4}[bV],a8=gk*iJ;if(eG-bN>a8)for(var e=0;
e<iJ;e++)aT[4*e+3]=ef[a8+e];var bX=q.Fj(aT,fi,ep)?"JPG":"PNG",bL=fx.rM(bX).eJ([[aT.buffer]],fi,ep),c_=b._C(new Uint8Array(bL),"<Image>",0,0);
b.t.push(c_);c_.mf=f;c_.opacity=Math.round(255*R);c_.tt(dG==0);var G=new cD;G.scale(1,-1);G.concat(d(a.slice(1)));
G.concat(d(D.ctm));var eS=c_.rect.clone();eS.x=eS.y=0;var gP=q.z.om(eS).H;q.z.m(gP,G,gP);c_.add.SoLd.Trnf=c.V.uB(gP);
c_.add.SoLd.nonAffineTransform=c.V.uB(gP);c_.aY(b,!1)}else if(dT=="Ln"){$=x(gg)}else if(dT=="u"||dT=="q"||dT=="Lb"){ap.push(i9==1);
bk.push((dT=="Lb"?1-dV[0]:dG)==0);if(M)continue;b.t.push(b.VF())}else if(dT=="U"||dT=="Q"||dT=="LB"){if(ap.length==0||bk.length==0)throw c2;
var c$=ap.pop(),cp=bk.pop();if(dT=="LB")c$=a5==1;if(M)continue;var c_=b.Kv();c_.V9((dT=="U"?"<Group>":"<Clip Group>")+h);
if(dT=="LB")c_.V9($);if(dT=="Q"){var b_=bD.pop(),hy=UDOC.G.isBox(b_,[0,0,b.d,b.v]);if(!hy)Z(c_,b_,b)}c_.add.lsct=c$?ho.x7:ho.OC;
c_.mf="pass";c_.Cq=24;c_.tt(cp);b.t.push(c_)}else if(dT=="Bb"||dT=="Bh"||dT=="BB"){}else if(dT=="Bg"){var gx=T.Setup.Gradient[x(gg)];
i="GdFl";t=I(gx.j5,gx.a7G)}else if(dT=="Bm"||dT=="Xm"){var eJ=t.Type.v.GrdT;if(eJ=="Lnr"&&dT!="Xm"||eJ=="Rdl"&&dT!="Bm")continue;
var d4=q.z.gh(D.pth.crds),cs=new aE(0,0),en=new aE(1,0),cm=new cD;cm.concat(d(dV));cm.concat(d(D.ctm));
cs=cm.Pz(cs);en=cm.Pz(en);if(eJ=="Lnr"){cs.x=(cs.x+en.x)/2;cs.y=(cs.y+en.y)/2}q.W.aJ(cs,en,d4,t)}else if(dT=="p"){var c5=x(gg),fK=T.Setup.Pattern[c5];
if(fK.raw==null){var d4=fK.I6,fi=Math.round(d4[2]-d4[0]),ep=Math.round(d4[3]-d4[1]),bH=new fj;bH.d=fi;
bH.v=ep;bH.buffer=q.f(fi*ep*4);F(bH,fK.PO,[1,0,0,-1,-fK.I6[0],ep+fK.I6[1]]);fK.raw=new Uint8Array(fx.rM("PSD").eJ(bH))}var ez=gg.slice(gg.indexOf(")")+2),d6=ez.slice(0,ez.indexOf("[")-1).split(" ").map(parseFloat),ee=ez.slice(ez.indexOf("[")+1,ez.indexOf("]")).split(" ").map(parseFloat);
i="patt";t=[c5,d6,ee]}else if(dT=="J"||dT=="j"||dT=="w"||dT=="M"||dT=="d"){for(var e=1;e<gP.length;e++){var c0=gP[e],gq=dV[e-1];
if(c0=="w")D.lwidth=gq;if(c0=="j")D.ljoin=gq;if(c0=="J")D.lcap=gq;if(c0=="d"){var ei=gg.slice(gg.indexOf("[")+1,gg.indexOf("]")).trim();
if(ei.length!=0){var d9=ei.split(" ").map(parseFloat);D.dash=d9}}}}else if(fU=="xa"||fU=="xx"){var ge=[dV[4],dV[5],dV[6]];
i="SoCo";if(dT=="Xa"||dT=="Xx")t=ge;else N=ge}else if(fU=="xk"){var ge,iK=dV[dV.length-2];if(iK==0)ge=w(dV);
else if(iK==1)ge=[dV[4],dV[5],dV[6]];else throw gg;i="SoCo";if(dT=="Xk")t=ge;else N=ge}else if(fU=="k"||fU=="x"){if(fU=="x"){dV.pop();
var gu=1-dV.pop();for(var e=0;e<4;e++)dV[e]*=gu}var ge=w(dV);i="SoCo";if(dT==fU)t=ge;else N=ge}else if(fU=="g"){var ge=[dV[0],dV[0],dV[0]];
i="SoCo";if(dT==fU)t=ge;else N=ge}else if(fU=="n")X.newPath(D);else if(dT=="*u"){M=!0;hK=0}else if(dT=="*U"||fU=="s"||fU=="f"||fU=="b"){if(dT!="*U"&&M){if(fU=="f"||fU=="b")hK|=1;
if(fU=="s"||fU=="b")hK|=2;continue}if(dT==fU)X.closePath(D);if(dT=="*U"){M=!1}var c_;if(i=="patt"){var fK=T.Setup.Pattern[t[0]];
c_=b._C(fK.raw,"<Pattern>",0,0);var eS=c_.rect.clone();eS.x=eS.y=0;var gP=q.z.om(eS).H,ee=d(t[2]);ee.hb=ee.i9=0;
q.z.m(gP,ee,gP);c_.add.SoLd.Trnf=c.V.uB(gP);c_.add.SoLd.nonAffineTransform=c.V.uB(gP);c_.aY(b,!1)}else{c_=b.Kv();
c_.Cq|=16;var eA=c_.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));eA.strokeEnabled.v=eA.fillEnabled.v=!1;
if(i=="SoCo"){c_.add.SoCo=JSON.parse(bW.E5[bW.order.indexOf("SoFi")]);var cE=c_.add.SoCo.Clr.v;r(cE,t)}if(i=="GdFl")c_.add.GdFl=t;
if(fU=="f"||fU=="b"||dT=="*U"&&hK&1)eA.fillEnabled.v=!0;if(fU=="s"||fU=="b"||dT=="*U"&&hK&2)eW.oj(eA,D,1,eW.ux(N))}c_.V9("<"+(dT=="*U"?"Compound ":"")+"Path>"+h);
c_.mf=f;c_.opacity=Math.round(255*R);c_.tt(dG==0);Z(c_,D.pth,b);b.t.push(c_);X.newPath(D)}else if(dT==","&&gP[1]=="/StoryIndex"){var iU=T.Setup.TextDocument,fo=null;
if(!(iU instanceof Array))iU=T.Setup.TextDocument=W(iU,m);var eI=iU[0],ad=iU[2];if(eI._DocumentResources)eI=iU[0]=gI.ab$(eI);
var c_=b.Kv();c_.add.lnsr="rend";c_.add.TySh=bt.Cc(0,0);var d_=fZ.aoa(eI),c9=c_.add.TySh.Vb=d_[dV[0]];
if(c9==null){console.log("text not found");continue}c_.V9(bt.fQ(c9).slice(0,50));c_.mf=f;c_.opacity=Math.round(255*R);
c_.tt(dG==0);var gu=eI._1._1[dV[0]]._1._0[0]._0;gu=parseInt(gu.slice(1));var ek=eI._0._8._0,fX=ek[gu]._0;
if(fX._0)fo=_(fX._0);else if(fX._1)fo=_(fX._1._0);else fo=_(fX._2._2).slice(3);if(fo.length!=2){var d4=q.z.gh(fo);
fo=[d4.x,d4.y];if(d4.X()!=0){bt.li(c9,1);bt.Ar(c9,[0,0,Math.round(d4.d),Math.round(d4.v)])}}var eY=new cD,hG=new cD(1,0,0,1,fo[0],fo[1]),gK=new cD(1,0,0,1,-ad[0],-ad[1]),b$=d(D.ctm),c4=new cD;
if(fX._2&&fX._2._2){var G=_(fX._2._2);c4=new cD(G[0],G[1],G[2],G[3],G[4],G[5])}eY.concat(hG);eY.concat(c4);
eY.concat(gK);eY.scale(1,-1);eY.concat(b$);c_.add.TySh.m=eY;b.t.push(c_);b.u4=!0}}}function O(b,s,G){var T=UDOC.G,z=[],m=[],$,o,h=[],bk=0,c2=0,dV=0;
for(var X=0;X<b.length;X++){var D=b[X];if(D.endsWith(" /CS")){var f=D.indexOf("/NChannel");if(D.startsWith("/DeviceRGB")){$="/DeviceRGB";
o=3}else if(D.startsWith("/DeviceCMYK")){$="/DeviceCMYK";o=4;h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]}else if(f!=-1){$="/DeviceCMYK";
o=parseInt(D.slice(f-2,f-1));var R=1;for(var e=0;e<o;e++){R=D.indexOf("[",R);h[o-1-e]=D.slice(R+1,R+8).split(" ").map(parseFloat);
R++}}else throw D}else if(D[0]=="["){var i=D.indexOf("]"),t=D.slice(1,i).split(" ").map(parseFloat),N=D.slice(i+2),M,hK,bD,co,iM,hs;
if(N=="/Size"||N=="/P"||N=="/R")continue;if(N=="/S"||N=="/A"){M=t[0];hK=t[1];bD=t[2];co=t[3];iM=t[4];
hs=t[5]}else if(N=="/N"){M=t[o+1];hK=t[o+2];bD=t[o+3];co=t[o+4];iM=t[o+6];hs=t[o+7];var S;if($=="/DeviceRGB")S=t.slice(0,3);
else if($=="/DeviceCMYK"){var a=[0,0,0,0];for(var e=0;e<o;e++){var bV=t[e],a5=h[e];a[0]+=bV*a5[0];a[1]+=bV*a5[1];
a[2]+=bV*a5[2];a[3]+=bV*a5[3]}S=w(a)}else throw S;S.push(t[o]);m.push([S,M,hK])}else throw N;z.push([N,iM,hs,M,hK,bD,co])}else if(D=="/E"){var i9=z.slice(0),dG=0;
for(var e=0;e<z.length;e++){var ap=z[e][0];if(ap=="/N"){dG++;continue}var bk=e,c2=e+1;while(z[c2][0]!="/N"&&c2<z.length)c2++;
if(dG==0||dG==3){for(var gg=0;gg<c2-bk;gg++)i9[bk+gg]=z[c2-1-gg]}else for(var gg=bk;gg<c2;gg++){var bH=i9[gg],gw=bH[1];
bH[1]=bH[5];bH[5]=gw;gw=bH[2];bH[2]=bH[6];bH[6]=gw}e=c2-1}z=[];for(var e=0;e<i9.length;e++){var bH=i9[e];
z.push(bH[1],bH[2],bH[3],bH[4],bH[5],bH[6])}var gP=z.length;T.moveTo(s,z[2],z[3]);for(var e=0;e<gP;e+=6){var bD=z[(e+4)%gP],co=z[(e+5)%gP],iM=z[(e+6)%gP],hs=z[(e+7)%gP],M=z[(e+8)%gP],hK=z[(e+9)%gP];
T.curveTo(s,bD,co,iM,hs,M,hK)}T.closePath(s);z=[]}}var dT=G.Kv();dT.Cq|=16;dT.V9("<Mesh>");var fU=dT.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));
fU.strokeEnabled.v=!1;for(var e=0;e<m.length;e++)for(var gg=e+1;gg<m.length;gg++){var ac=m[e][0],e2=m[gg][0],cX=ac[0]-e2[0],eR=ac[1]-e2[1],gR=ac[2]-e2[2],bN=Math.sqrt(cX*cX+eR*eR+gR*gR);
if(bN>dV){dV=bN;bk=e;c2=gg}}var eG=m[bk],ef=m[c2],fi=dT.add.GdFl=I(0,[[0,eG[0]],[1,ef[0]]]),ep=d(s.ctm),iJ=ep.Pz(new aE(eG[1],eG[2])),aT=ep.Pz(new aE(ef[1],ef[2])),dm=q.z.gh(s.pth.crds);
iJ.x=(iJ.x+aT.x)/2;iJ.y=(iJ.y+aT.y)/2;q.W.aJ(iJ,aT,dm,fi);Z(dT,s.pth,G);G.t.push(dT);T.newPath(s)}function I(b,s){var G=JSON.parse(bW.E5[bW.order.indexOf("GrFl")]),T=G.Grad.v;
T.Intr.v=0;G.Type.v.GrdT=["Lnr","Rdl"][b];q.W.ne(s,T);return G}function x(b){return b.slice(b.indexOf("(")+1,b.indexOf(")"))}function r(b,s){b.Rd.v=s[0]*255;
b.Grn.v=s[1]*255;b.Bl.v=s[2]*255}function _(b){var s=[];for(var e=0;e<b.length;e++)s[e]=parseFloat(b[e].slice(1));
return s}function d(b){return new cD(b[0],b[1],b[2],b[3],b[4],b[5])}function w(b){return UDOC.C.cmykToRgb(b)}function Z(b,s,G){b.add.vmsk=new K.X9;
if(s.crds.length!=0)b.add.vmsk.b=P(s);b.XO();b.o3(G)}function P(b){var s={H:b.crds,s:b.cmds},G=q.z.rD(s,!1);
return G}function C(b,s){var G=[s._begin],T=s._end-s._begin,z=T,m=s.Raster,D=0;if(m){for(var e=0;e<m.length;
e++){var $=m[e].Data,o=$._begin+32,h=$._end;if(o>h)o=h;G.push(o,h);z-=h-o}}G.push(s._end);var X=new Uint8Array(z);
for(var e=0;e<G.length;e+=2){var o=G[e],f=G[e+1]-o;X.set(new Uint8Array(b.buffer,o,f),D);D+=f}return Y.l5(X).split(/\r\n|\r|\n/)}function W(b,s){if(b==null)return[];
var G=C(s,b),T="",z="",m=0,$;for(var e=2;e<G.length;e++){var o=G[e];if(o[0]=="%"){if(m==0)T+=o.slice(1);
else z+=o.slice(1)}else if(o==";")m++;else if(o.endsWith("/RulerOrigin ,"))$=o.split(" ").slice(0,2).map(parseFloat)}var h=[T,z],X=[];
for(var e=0;e<2;e++){var D=h[e],f=new Uint8Array(D.length);Y.ZO(f,0,D);var R=FromPS.F.ASCII85Decode({buff:f,off:0}),i=g4.Hy(R);
X.push(i)}X.push($);return X}function v(b,s){if(b==null)return[];var G=C(s,b);G=G.slice(1);for(var e=0;
e<G.length;e++){var T=G[e];if(T[0]=="%")G[e]=T.slice(T[1]=="_"?2:1)}var z=A(G);return z}function L(b,s){var G={};
if(b==null)return G;for(var e=0;e<b.length;e++){var T=C(s,b[e]),z=T[1],m=x(z),$=z.slice(z.indexOf(")")+2).split(" ").map(parseFloat),o=[];
for(var h=2;h<T.length;h++)o.push(T[h].slice(2));G[m]={I6:$,PO:o}}return G}function H(b,s){var G={},T,z;
if(b==null)return G;var m=[];for(var e=0;e<b.length;e++){var $=C(s,b[e]);for(var o=0;o<$.length;o++){var h=$[o];
if(h[0]=="("){var X=h.split(")");T=X[0].slice(1);var D=X[1].split(" ");z=parseInt(D[1])}else if(h.endsWith("%_BS")){var X=h.split(" "),t,N=1;
X.pop();X=X.map(parseFloat);var f=X.pop(),R=X.pop(),i=X.pop();if(i==0)t=[X[0],X[0],X[0]];else if(i==2)t=[X[4],X[5],X[6]];
else if(i==1||i==3)t=w(X);else if(i==6){if(X.length==3)t=[X[0],X[0],X[0]];else t=w(X);N=X.pop()}else{throw i}m.push([f/100,t,N,R/100])}else if(h=="BD"){for(var M=0;
M<m.length-1;M++)m[M][3]=m[M+1][3];m.sort(function(hK,bD){return hK[0]-bD[0]});G[T]={j5:z,a7G:m};m=[]}}}return G}function y(b){var s="Gradient PluginObject Symbol Pattern PatternLayer BrushPattern Encoding Raster Layer Resource Place".split(" "),G=Date.now(),T=0,z=[],m={Header:{}},$=[m],o=b.length;
while(T<o){var h=T;while(h!=o&&b[h]!=13&&b[h]!=10){h++}if(b[T]==37&&b[T+1]==95&&b[T+2]==37)T+=2;if(b[T]==37&&b[T+1]!=95&&b[T+1]!=43){var X=Y.su(b,T,h-T);
if(X=="%%EndComments"||X=="%EndComments"||X=="%AI5_Begin_NonPrinting"||X=="%AI5_End_NonPrinting--"||X.startsWith("%AI17_Begin_Content_if_version_gt")||X=="%AI17_End_Versioned_Content"){}else{var D=X.indexOf("Begin"),f=X.indexOf("End");
if(D!=-1){var R=X.slice(D+5).split(":")[0],i={_begin:T,_end:T},t=$[$.length-1];if(s.indexOf(R)!=-1){if(t[R]==null)t[R]=[];
t[R].push(i)}else{if(t[R]!=null){console.log($);throw X}t[R]=i}$.push(i);if(X.startsWith("%%BeginData"))h=Y.qt(b,"%%EndData",T);
else if(X=="%AI9_BeginDocumentData")h=Y.qt(b,"%AI9_EndDocumentData",h);else if(X=="%AI11_BeginTextDocument")h=Y.qt(b,"%AI11_EndTextDocument",h)}else if(f!=-1){$.pop()._end=T}else if($.length==1&&(X.startsWith("%AI")||X.startsWith("%%")&&X.indexOf(" ")!=-1)){var N=1;
if(X.startsWith("%AI"))while(X[N]!="_"&&N<X.length)N++;var M=X.indexOf(":");if(M==-1)M=X.indexOf(" ");
var hK=X.slice(N+1,M),bD=X.slice(M+1).trim();m.Header[hK]=bD}}}T=h;if(b[T]==13)T++;if(b[T]==10)T++}return m}function g(b,s){var G=Date.now(),T=new Uint8Array(b),z,m=T[2]==68;
if(s)console.log(!m?"EPS":"PDF");if(m){var $=Y.qt(T,"/AIMetaData "),hK=!1,bD=!1;while(T[$]!=60)$--;$--;
var o=Y.qt(T,">>",$),h=Y.su(T,$+2,o-$-2).split("/"),X=[];for(var e=0;e<h.length;e++){var D=h[e],f=D.startsWith("AIPrivateData"),R=D.startsWith("AIPDFPrivateData");
if(!f&&!R)continue;var i=D.trim().split(/\s+/),t=parseInt(i[1]),N=parseInt(i[0].slice(f?13:16));X.push([N,t])}if(s)console.log("--- map made",Date.now()-G);
G=Date.now();var M=new Array(X.length),co=$;for(var e=0;e<X.length;e++){var N=X[e][0],t=X[e][1],hs=null;
co=Y.qt(T,t+" 0 obj",co);if(co==-1)co=Y.qt(T,t+" 0 obj",0);var iM=Y.qt(T,"<<",co),S=new Uint8Array(T.buffer,iM,64),a=Y.qt(S,"/Filter");
if(a!=-1){var bV=S.indexOf("[".charCodeAt(0))+1;if(bV!=0){var a5=S.indexOf("]".charCodeAt(0));hs=Y.su(S,bV,a5-bV).trim().split(/\s+/)}else{var i9=Y.su(S,a+8,30);
hs=["/"+i9.split("/")[0]]}}var dG=Y.qt(T,"/Length",iM)+8,ap=dG;while(48<=T[ap]&&T[ap]<=57)ap++;var bk=parseInt(Y.su(T,dG,ap-dG)),c2=Y.qt(T,"stream",ap);
c2=c2+6;if(T[c2]==13)c2++;if(T[c2]==10)c2++;var gg=Y.su(T,c2,20);if(gg=="%AI12_CompressedData"){c2+=20;
bk-=20;hK=!0}else if(gg=="%AI24_ZStandard_Data"){c2+=20;bk-=20;bD=!0}var bH=new Uint8Array(T.buffer,c2,bk);
if(hs)for(var a=0;a<hs.length;a++){var gw=hs[a];if(gw=="/FlateDecode")bH=pako.inflate(bH);else if(gw=="/ASCIIHexDecode")bH=FromPS.F.HexDecode({buff:bH,off:0});
else throw gw}M[N-1]=bH;co=c2+bk}if(s)console.log("--- arrays found",Date.now()-G);G=Date.now();var gP=Y.su(M[0],0,13);
if(gP=="%%BoundingBox"||gP=="%AI7_Thumbnai")M=M.slice(1);z=Q(M);if(s)console.log("--- concatenated",Date.now()-G);
G=Date.now();if(hK)z=UZIP.inflate(z);if(bD){var dT=fx.WY.acE,bk=z.length,fU=dT.memory,e2=8;fx.IT(dT,1e6+bk);
var dV=new Uint8Array(fU.buffer),ac=dT.malloc(bk);dV.set(z,ac);while(!0){fx.IT(dT,bk*(e2+2)+1e6);var cX=dT.malloc(bk*e2),eR=dT.ZSTD_decompress(cX,bk*e2,ac,bk);
if(eR==-70){dT.free(cX);e2+=4}else{dV=new Uint8Array(fU.buffer);z=dV.slice(cX,cX+eR);dT.free(cX);break}}dT.free(ac)}if(s)console.log("--- inflated",Date.now()-G);
G=Date.now()}else{var gR=Y.l5(T);if(gR.indexOf("%AI5_BeginLayer")!=-1){z=T}else{var bN=gR.split(/[\n\r]+/),eG=[],ef=!1;
for(var fi=0;fi<bN.length;fi++){var ep=bN[fi].trim();if(ep=="%AI9_PrivateDataEnd"){ef=!1;break}else if(ep=="%AI9_DataStream"){ef=!0}else if(ef)eG.push(ep.slice(1))}var iJ=Y.$s(eG.join("")),aT=FromPS.F.ASCII85Decode({buff:iJ,off:0});
z=UZIP.inflate(aT)}}return z}function Q(b){var s=0,T=0;for(var e=0;e<b.length;e++)s+=b[e].length;var G=new Uint8Array(s);
for(var e=0;e<b.length;e++){var z=b[e];G.set(z,T);T+=z.length}return G}function J(b,s){for(var e=0;e<s.length;
e++)if(b.startsWith(s[e]))return!0;return!1}function A(b){var s=[],G=[],top=-1,T,z=null,m=null;for(var $=0;
$<b.length;$++){var o=b[$];if(T){o=T+o;T=null}var h="\t".repeat(s.length);if(z!=null){z.push(o);if(o.endsWith("~>")){var X=Y.$s(z.join("")),D=FromPS.F.ASCII85Decode({off:0,buff:X});
s.push(D);G.push(!1);top++;z=null}}else if(m!=null){if(o=="X+"){s.push(m);G.push(!1);top++;m=null}else m.push(o)}else if(o=="/Binary : /ASCII85Decode ,"){z=[]}else if(o=="X=")m=[];
else if(o=="/SVGFilter :"||o=="; /Def ;")continue;else if(o.startsWith("/")){if(o.startsWith("/XMLUID")){var f=p(o);
if(G[top])throw"e";s[top][f[4]]=f[2]}if(o.startsWith("/GObjRef")){var f=p(o);if(!G[top])throw"e";s[top].push(f[2])}else{var R=o.startsWith("/Array")||o.startsWith("/Document");
s.push(R?[]:{});G.push(R);top++}}else if(o.endsWith(",")){var i,t,f=p(o);f.pop();if(f[0]==";"||f.length==1){t=s.pop();
G.pop();top--;i=G[top]?null:f.pop()}else{i=G[top]?null:f.pop();var N=f.pop(),M=f[0];if(N=="/Int")t=parseInt(M);
else if(N=="/Real")t=parseFloat(M);else if(N=="/Bool")t=M=="1";else if(N=="/String"||N=="/UnicodeString")t=f.join("");
else if(N=="/RealMatrix"||N=="/RealPoint"||N=="/RealPointRelToROrigin")t=f.map(parseFloat);else throw N}if(G[top])s[top].push(t);
else s[top][i]=t}else if(o==";"){}else if(o==""){}else{if(o.indexOf("/RealPoint")!=-1){}else if(o.startsWith("(")&&o.endsWith(")")){}else if(o.endsWith("/RealMatrix")){}else throw o;
T=T?T+o:o}}return s}function p(b){var s=0,G=[];while(s<b.length){var T=b[s],z=T.charCodeAt(0);if(T==" ")s++;
else if(T==","||T==";"||T==":"){G.push(T);s++}else if(T=="("){var m=s+1;while(!(b[m]==")"&&b[m-1]!="\\"))m++;
var $=b.slice(s+1,m);G.push($);s=m+1}else if(T=="/"||T=="-"||48<=z&&z<=57){var m=s;while(b[m]!=" ")m++;
G.push(b.slice(s,m));s=m}else throw T}return G}function U(b){var s="";for(var e=0;e<b.length;e++){if(b[e]=="_"&&b[e+1]=="x"){var E=parseInt(b.slice(e+2,e+4),16);
s+=String.fromCharCode(E);e+=4}else if(b[e]=="_")s+=" ";else s+=b[e]}return s}function j(b){var s="xmlnode-nodename",G="xmlnode-nodevalue",T="xmlnode-attributes",z="xmlnode-children",m=b[s],$=b[T],o=b[z],h={_nam:m};
for(var X in $){var D=$[X];if(Object.keys(D[T]).length!=0||D[z].length!=0)throw"e";if(D[s]!=X)throw"e";
h[X]=D[G]}if(o.length==0)return h;var f=h.cln=[];for(var e=0;e<o.length;e++)f.push(j(o[e]));return h}return n}();
function fx(){}fx.Dg={ak_:["PNG","JPG","SVG","GIF","PDF"],aaj:"WEBP BMP TIFF ICO DDS TGA PPM RAW EMF DXF".split(" ")};
fx.IT=function(n,F){var O=n.memory.buffer.byteLength;if(O<F)n.memory.grow((F-O>>>16)+1)};fx.mk={abn:function(n,F){fetch(n).then(function(O){return O.arrayBuffer()}).then(function(O){var I=new Uint8Array(O),x=0,w="";
if(F){x=I.length;var r={level:9},_=pako.deflateRaw(I,r),d=UZIP.deflateRaw(I,r);console.log(x,_.length,d.length);
I=_.length<d.length?_:d}for(var e=0;e<I.length;e++)w+=String.fromCharCode(I[e]);var Z=btoa(w);console.log(JSON.stringify([x,Z]))})},get:function(n,F){var O=BINDB[n],I=Date.now(),x=atob(O[1]),r=x.length,_=new Uint8Array(r);
for(var e=0;e<r;e++)_[e]=x.charCodeAt(e);if(O[0]!=0){var d=new Uint8Array(O[0]);UZIP.inflateRaw(_,d);
_=d}if(F){var w=fx.TG(_.buffer);_=fx.rM(w).bx(_.buffer)}return _}};fx.TG=function(n){if(!(n instanceof ArrayBuffer)){console.log("Input is not ArrayBuffer")}var F=new Uint8Array(n),O=fx.l9,I,x=0,r=F.length-1;
if(O(F,[239,187,191]))x=3;while(x<F.length&&(F[x]==9||F[x]==10||F[x]==13||F[x]==32))x++;while(r!=0&&(F[r]==9||F[r]==10||F[r]==13||F[r]==32))r--;
if(O(F,[56,66,80,83]))I="psd";if(O(F,[120]))I="pxd";if(O(F,[80,68,78,51]))I="pdn";if(O(F,[103,105,109,112,32,120,99,102,32]))I="xcf";
if(O(F,[102,105,103,45,107,105,119,105]))I="fig";if(O(F,[137,80,78,71,13,10,26,10])){I="png";var _=8;
while(_<F.length){var d=Y.c(F,_);_+=4;var w=Y.su(F,_,4);_+=4;if(w=="mkTS")I="fpng";_+=d+4}}if(O(F,[87,76]))I="cdr";
if(O(F,[82,73,70,70])){var Z=aO.Hy(F),P=Z.Ul;if(P=="WEBP")I="webp";else if(P.slice(0,3)=="CDR")I="cdr";
else I=P}if(O(F,[70,79,82,77])||O(F,[76,73,83,84])||O(F,[67,65,84,32])){var Z=h5.Hy(F),P=Z.Ul;if(P=="ILBM")I="ilbm";
else I=P}if(O(F,[255,216,255]))I="jpg";if(O(F,[0,0,0,12,106,80,32,32]))I="jpg";if(O(F,[48,0,1,0],4))I="jpg";
if(O(F,[71,73,70,56]))I="gif";if(O(F,[0,0,0,2,121,102,113,76]))I="msh";if(O(F,[0,0,0,3,121,102,113,76]))I="msh";
if(O(F,[0,0,0,16]))I="atn";if(O(F,[0,1]))I="aco";if(O(F,[0,2]))I="aco";if([0,1].indexOf(F[1])!=-1&&[1,2,3,9,10,11].indexOf(F[2])!=-1&&[0,16,24,32].indexOf(F[7])!=-1)I="tga";
if(O(F,[0,2,56,66,83,76]))I="asl";if(O(F,[0,1,0,-1,0,2,0]))I="abr";if(O(F,[0,2,0,-1,0,2,0]))I="abr";
if(O(F,[0,6,0,1]))I="abr";if(O(F,[0,6,0,2]))I="abr";if(O(F,[0,7,0,2]))I="abr";if(O(F,[0,9,0,2]))I="abr";
if(O(F,[0,10,0,2]))I="abr";if(O(F,[56,66,70,83]))I="shc";if(O(F,[56,66,80,84]))I="pat";if(O(F,[56,66,71,82]))I="grd";
if(O(F,[56,66,84,80]))I="tpl";if(O(F,[0,4,0,5]))I="acv";if(O(F,[99,117,115,104]))I="csh";if(O(F,[0,1,0,0,0]))I="otf";
if(O(F,[79,84,84,79]))I="otf";if(O(F,[116,116,99,102]))I="otf";if(O(F,[68,68,83,32]))I="dds";if(O(F,[80,86,82,3]))I="pvr";
if(O(F,[86,84,70,0]))I="vtf";if(O(F,[83,73,77,80]))I="fits";if(O(F,[0,0,1,0]))I="ico";if(O(F,[66,77]))I="bmp";
if(O(F,[40,0,0,0]))I="bmp";if(O(F,[80,49]))I="ppm";if(O(F,[80,50]))I="ppm";if(O(F,[80,51]))I="ppm";if(O(F,[80,52]))I="ppm";
if(O(F,[80,53]))I="ppm";if(O(F,[80,54]))I="ppm";if(O(F,[73,73,42,0]))I="tiff";if(O(F,[77,77,0,42]))I="tiff";
if(O(F,[70,85,74,73,70,73,76,77]))I="raf";if(O(F,[112]))I="lif";if(O(F,[73,73,26,0]))I="ciff";if(O(F,[83,81,76,105]))I="sketch";
if(O(F,[80,75])){var C=UZIP.parse(n,!0);if(C["document.json"])I="sketch";else if(C.manifest)I="xd";else I="zip"}if(O(F,[123]))I="json";
if(Y.c(F,0)==F.length)I="icc";if(O(F,[35]))I="icc";if(O(F,[84,73,84,76],x))I="icc";if(O(F,[76,85,84,95],x))I="icc";
if(O(F,[60,63,120,109],x)){if(Y.qt(F,"<look>")!=-1)I="icc";else I="svg"}if(O(F,[60,115,118,103],x))I="svg";
if(O(F,[60,33,100,111],x)||O(F,[60,33,68,79],x)){if(Y.qt(F,"<svg")!=-1)I="svg";else I="html"}if(O(F,[37,33])||O(F,[197,208,211,198])){if(Y.qt(F,"%AI9_PrivateDataBegin")!=-1||Y.qt(F,"%AI5_BeginLayer")!=-1)I="ai";
else I="eps"}if(O(F,[37,80,68,70],x)){if(Y.qt(F,"/AIMetaData ")!=-1)I="ai";else I="pdf"}else if(O(F,[10,69,79,70],r-3))I="dxf";
if(O(F,[215,205,198,154]))I="wmf";if(O(F,[1,0,0,0]))I="emf";if(O(F,[118,47,49,1]))I="exr";if(O(F,[10,10,10,10]))I="jsx";
if(O(F,[77,90]))I="exe";if(I==null&&q.raw.A1(F.length)!=null)return"tiff";return I};fx.l9=function(n,F,O){if(O==null)O=0;
for(var e=0;e<F.length;e++)if(F[e]!=-1&&n[O+e]!=F[e])return!1;return!0};fx.rM=function(n){var F={BMP:fx.amb,CDR:fx.y3,DDS:fx.E6,EMF:fx.YG,DXF:fx.Q5,EPS:fx.Ev,FIG:fx.TV,FPNG:fx.ny,GIF:fx.tS,ICO:fx.dD,ILBM:fx.r3,FITS:fx.os,EXR:fx.oA,JPG:fx.$G,LIF:fx._$,PDF:fx.VR,PDN:fx._L,PNG:fx.R6,PPM:fx.kx,PSD:fx.EP,PXD:fx.yK,RAF:fx.gf,RAW:fx.Ec,SKETCH:fx.iI,SVG:fx.E7,TGA:fx.Lm,TIFF:fx.Zw,VTF:fx.mB,WEBP:fx.tD,WMF:fx.sT,XCF:fx.u8,XD:fx.s7,EXE:fx.r9,AI:fx.WY};
return F[n.toUpperCase()]};fx.L$=function(e){var n=fx.Dg.ak_,F=fx.Dg.aaj,O,I=[];if(e==null)O=n.concat(F);
else O=e==0?n:F;for(var e=0;e<O.length;e++)if(fx.rM(O[e]).eJ)I.push(O[e]);return I};fx.EJ=function(n,F,O,I,x){var r=fx.mY(n,F,O,I,x),_=fx.D9(r);
return _.buffer};fx.D9=function(n){var F=atob(n.split(",").pop()),O=new Uint8Array(F.length);for(var e=0;
e<F.length;e++)O[e]=F.charCodeAt(e);return O};fx.mY=function(n,F,O,I,x,r){if(!(n instanceof ArrayBuffer))throw"e";
if(I==null)I="png";if(I=="png"&&r==!0){var _=fx.rM("PNG").eJ([[n,0]],F,O);return"data:image/png;base64,"+fx.Mw(_)}var d=fx.k_;
if(d==null)d=fx.k_=V.w("canvas");if(d.width!=F||d.height!=O){d.width=F;d.height=O}var w=d.getContext("2d"),Z=new ImageData(new Uint8ClampedArray(n,0,F*O*4),F,O);
w.putImageData(Z,0,0);return d.toDataURL("image/"+I,x)};fx.a4b=function(n,F,O,I,x){if(x==null)x=0;var r="<defs> \t<filter id=\"sofGlow\" height=\"300%\" width=\"300%\" x=\"-75%\" y=\"-75%\"> \t\t<!-- Thicken out the original shape --> \t<feMorphology operator=\"dilate\" radius=\"3\" in=\"SourceAlpha\" result=\"thicken\" /> \t\t<!-- Use a gaussian blur to create the soft blurriness of the glow -->\t\t<feGaussianBlur in=\"thicken\" stdDeviation=\"4\" result=\"blurred\" />\t\t<!-- Change the colour -->\t\t<feFlood flood-color=\"rgb(255,255,255)\" result=\"glowColor\" />\t\t<!-- Color in the glows -->\t\t<feComposite in=\"glowColor\" in2=\"blurred\" operator=\"in\" result=\"softGlow_colored\" />\t\t<!--\tLayer the effects together -->\t\t<feMerge>\t\t\t<feMergeNode in=\"softGlow_colored\"/>\t\t\t<feMergeNode in=\"SourceGraphic\"/>\t\t</feMerge>\t</filter></defs>",_="<svg  xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"  width=\"128\"  height=\"128\"> "+r+"<g transform=\"translate(64 64) scale("+.25*Math.round(V.Z())+")\">";
if(n==1)_+="<g transform=\"scale(0.07 0.07) translate(-550 -112)\"  style=\"fill:#ffffff; stroke:#000000; stroke-width:60px;\">"+"<path d=\"m 555.1899,112.08836 0,120.71094 0,920.7109 232.42188,-232.42184 111.90429,270.44924 169.76363,-84.8828 -114.09371,-273.8555 320.71481,0 z\"/>"+"</g>";
_+="<g filter=\"url(#sofGlow)\"><image transform=\"rotate("+x+")\" xlink:href=\""+F+"\" x=\""+80*O+"\" y=\""+80*I+"\" height=\"80\" width=\"80\"/></g>"+"</g>"+"</svg>";
var d=new Uint8Array(_.length);Y.ng(_,d,0);var w="data:image/svg+xml;base64,"+fx.Mw(d.buffer);return{Qb:w,j:new gv(0,0,128,128),hC:new aE(64,64)}};
fx.Mw=function(n){var F=new Uint8Array(n),O="";for(var e=0;e<F.length;e++)O+=String.fromCharCode(F[e]);
return btoa(O)};fx.a63=function(n){var F=atob(n),O=F.length,I=new Uint8Array(O);for(var e=0;e<O;e++)I[e]=F.charCodeAt(e);
return I.buffer};fx.jE=function(n){var F=[],O=[];for(var e=0;e<n.t.length;e++){var I=n.t[e];if(I.getName().slice(0,3)=="_a_"){F.push(e);
O.push(I.Y9())}}return[F,O]};fx.XI=function(n,F,O,I,x,r){if(O==null)O=n.d;if(I==null)I=n.v;var _=new gv(0,0,n.d,n.v),d=new cD(O/(n.d+.001),0,0,I/(n.v+.001),0,0),Z;
F=F.toUpperCase();var w=fx.rM(F);if(w.dp){n.dH();Z=w.eJ(n,O,I,x,r)}else{var P=fx.jE(n),C=P[0],W=P[1],v;
if(n.TM.length!=0){v=[];for(var e=0;e<n.TM.length;e++)v.push(n.TM[e].Uz(_))}if(C.length<2){var L;if(O==n.d&&I==n.v)L=n.dH().buffer;
else{var H=c.V.oo([n.dH(),_],d);L=H.buffer.buffer}Z=w.eJ([[L,0,n.gC,n.aC,v]],O,I,x)}else{var y=[];for(var e=0;
e<C.length;e++){var g=C[e],L;for(var Q=0;Q<C.length;Q++)n.t[C[Q]].tt(C[Q]==g);n.lq();n.D();n.nu();if(O==n.d&&I==n.v)L=n.dH().buffer.slice(0);
else{var H=c.V.oo([n.dH(),_],d);L=H.buffer.buffer}var J=n.t[g].getName().split(",");y.push([L,J[1]?parseInt(J[1]):100,n.gC,n.aC,v])}for(var e=0;
e<C.length;e++)n.t[C[e]].tt(W[e]);n.D();n.nu();if(x){var A=x.length,p=x[A-2],U=x[A-1],j=x[A-4]/100;if(j!=1)for(var e=0;
e<y.length;e++)y[e][1]=Math.round((y[e][1]==0?16:y[e][1])/j);if(p)y.reverse();if(U){var b=y.slice(1,y.length-1);
b.reverse();y=y.concat(b)}}Z=w.eJ(y,O,I,x)}}return Z};fx.iE=function(n,F){var O=F[0].Lo&&F[0].Lo.startsWith("_a_"),I,x=new fj(n+".psd"),r=new gv(0,0,1,1);
if(O){I=x.Kv();I.add.lsct=ho.x7;I.V9(n);I.mf="pass";I.Cq=24;I.tt(!0);x.t.push(x.VF())}for(var e=0;e<F.length;
e++){var _=F[e];r=r.Tq(_.Kh);var d=x.Kv();d.tt(e==0);d.V9(F.length==1?"Background":"Layer "+e);if(e==0&&_.gC)x.gC=_.gC;
if(e==0&&_.aC)x.aC=_.aC;if(_.Lo)d.V9(_.Lo);if(_.p6)for(var e=0;e<_.p6.length;e++){var w=_.p6[e],Z=fj.kh(w[0]);
Z.add.vmsk.b=w[1];q.Y.gS(w[1],new cD(r.d,0,0,r.v,0,0));x.Hi.push(Z)}d.rect=_.Kh.clone();d.buffer=new Uint8Array(_.data);
q.dB(d);x.t.push(d)}if(O)x.t.push(I);if(F[0].TM){for(var e=0;e<F[0].TM.length;e++){var P=new K.FZ;x.TM.push(P);
P.rect=F[0].Kh.clone();P.channel=F[0].TM[e]}}x.C=[O?x.t.length-1:0];x.d=r.d;x.v=r.v;x.buffer=q.f(r.X()*4);
x.D();return x};fx.R6={};fx.R6.eJ=function(n,F,O,I){if(I==null)I=[100,!1,0,0,0];var x={sRGB:1,loop:I[3]};
if(n[0][2]!=null){var r=Math.round(n[0][2]*(1e4/254));x.pHYs=[r,r,1]}var _=I[0],d=_==100?0:Math.max(2,Math.floor(_*5));
if(d==5)d=4;var w=[],Z=[];for(var e=0;e<n.length;e++){w.push(n[e][0]);Z.push(n[e][1])}var P=UPNG.encode(w,F,O,d,Z,x,I[1]);
return P};fx.R6.afr=function(n,F,O){return UPNG.encodeLL([n],F,O,3,1,8)};fx.R6.bx=function(n){var F=Date.now(),O=UPNG.decode(n),I=UPNG.toRGBA8(O),x=O.width,r=O.height,_=0;
if(O.tabs.pHYs)_=Math.round(O.tabs.pHYs[0]*254/1e4);if(I.length==1)return[{Kh:new gv(0,0,x,r),data:I[0],gC:_}];
var d=[];for(var e=0;e<I.length;e++){d.push({Lo:"_a_frm"+e+","+O.frames[e].delay,Kh:new gv(0,0,x,r),data:I[e],gC:_})}return d};
fx.kx={};fx.kx.eJ=function(n,F,O,I){var x=new Uint8Array(n[0][0]),r=F*O,_=r*3,d="P6\n"+F+" "+O+"\n255\n",w=d.length,Z=q.f(w+_,!0);
for(var e=0;e<w;e++)Z[e]=d.charCodeAt(e);for(var e=0;e<r;e++){var P=e*4,C=e*3+w;Z[C]=x[P];Z[C+1]=x[P+1];
Z[C+2]=x[P+2]}return Z.buffer};fx.kx.bx=function(n){n=new Uint8Array(n);var F=[" ".charCodeAt(0),"\n".charCodeAt(0),"\t".charCodeAt(0),"\r".charCodeAt(0)],O=0,I=String.fromCharCode(n[0])+String.fromCharCode(n[1]),x=[],r=0,_=I=="P1"||I=="P4"?2:3;
for(O=2;O<n.length;O++){var d=n[O],w=String.fromCharCode(d);if(d=="#".charCodeAt(0)){while(n[O]!="\n".charCodeAt(0))O++;
continue}var Z=F.indexOf(d)!=-1;if(r==0&&!Z){x.push(w);r=1;continue}if(r==1&&!Z){x[x.length-1]+=w;continue}if(r==1&&Z){r=0;
if(x.length==_)break;continue}}var P=parseInt(x[0]),C=parseInt(x[1]),W=P*C*4,v=I=="P1"||I=="P4"?1:255/parseInt(x[2]),L=q.f(W);
if(I=="P1"||I=="P2"||I=="P3"){var H="",y=0,r=0,g="#".charCodeAt(0);for(var e=O;e<n.length;e++){var d=n[e],w=String.fromCharCode(d),Z=F.indexOf(d)!=-1;
if(d==g){while(n[e]!="\n".charCodeAt(0))e++}else if(r==0&&!Z){H=w;r=1}else if(r==1){if(Z){r=0;var Q=parseInt(H);
H="";if(I=="P1"){L[y]=L[y+1]=L[y+2]=(1-Q)*255;L[y+3]=255;y+=4}if(I=="P2"){L[y]=L[y+1]=L[y+2]=Math.round(Q*v);
L[y+3]=255;y+=4}if(I=="P3"){L[y]=Math.round(Q*v);y++;if((y&3)==3){L[y]=255;y++}}}else H+=w}}}var J=P*C;
if(I=="P4")for(var A=0;A<C;A++){var p=A*8*Math.ceil(P/8);for(var U=0;U<P;U++){var e=p+U,j=n[O+1+(e>>3)];
j=j>>7-(e&7)&1;var b=A*P+U<<2;L[b]=L[b+1]=L[b+2]=(1-j)*255;L[b+3]=255}}if(I=="P5")for(var e=0;e<J;e++){var b=4*e;
L[b]=L[b+1]=L[b+2]=Math.round(n[O+1+e]*v);L[b+3]=255}if(I=="P6")for(var e=0;e<J;e++){var b=4*e,s=O+1+3*e;
L[b]=Math.round(n[s]*v);L[b+1]=Math.round(n[s+1]*v);L[b+2]=Math.round(n[s+2]*v);L[b+3]=255}return[{Kh:new gv(0,0,P,C),data:L.buffer}]};
fx.E6={};fx.E6.eJ=function(n,F,O,I){var x=new Uint8Array(n[0][0]);if((F&3)!=0||(O&3)!=0){var r=F+(4-(F&3)),_=O+(4-(O&3)),d=new Uint8Array(r*_*4);
q.IW(d,4278190080);q.nF(x,new gv(0,0,F,O),d,new gv(0,0,r,_));x=d;F=r;O=_}return UTEX.DDS.encode(x.buffer,F,O)};
fx.E6.bx=function(n){var F=UTEX.DDS.decode(n)[0];return[{Kh:new gv(0,0,F.width,F.height),data:F.image}]};
fx.mB={};fx.mB.bx=function(n){var F=UTEX.VTF.decode(n).pop();return[{Kh:new gv(0,0,F.width,F.height),data:F.image}]};
fx.$G={};fx.$G.nC=null;fx.$G.a2w=function(n,F){var O=fx.$G.nC,I=n.byteLength,x=F.width,r=F.height,_=x*r,d=5e6+2*I+_*(F.progressive?Math.max(2,F.numComponents)*4+1:8),w=O.instance.exports;
fx.IT(w,d);var Z=new Uint8Array(w.memory.buffer),P=w.malloc(I);Z.set(new Uint8Array(n),P);var C=w.malloc(4),W=w.malloc(4),E=w.malloc(4),v=w.stbi_load_from_memory(P,I,C,W,E,4);
w.free(P);w.free(C,W,E);w.free(v);var L=Z.slice(v,v+_*4);return L};(function(){var n=fx.mk.get("wasm/jpg").buffer;
if(window.WebAssembly==null)window.alert("Your browser is too old. Please, update it.");WebAssembly.instantiate(n).then(function(F){fx.$G.nC=F})}());
fx.$G.eJ=function(n,F,O,I){if(I==null)I=[70];var x=n[0],r=new Uint8Array(x[0]);if(q.Dd(r)){var _=new Uint8Array(r.length),d=new gv(0,0,F,O);
q.IW(_,4294967295);q.p.F_("norm",r,d,_,d,d,1);r=_}var w=new Uint8Array(fx.EJ(r.buffer,F,O,"jpeg",I[0]/100));
if(x[2]!=null){var Z=fx.$G.u$(w)[224][0]+2;Z+=9;w[Z]=1;Y.iW(w,Z+1,x[2]);Y.iW(w,Z+3,x[2])}if(x[3]!=null&&I[1]==!0&&Object.keys(x[3]).length!=0){var P=0,C=0,W=0,v=fb.K1(x[3]),L=new Uint8Array(UTIF.encode([v])),H="http://ns.adobe.com/xap/1.0/",J=0,U=0,T=20;
P=4+6+L.length;var y=fb.Qf(x[3]),g=Y.$s(y);C=4+H.length+1+g.length;var Q=fb.a6I(x[3]);for(var e=0;e<Q.length;
e++)J+=5+Q[e][1].length;var A=J+(J&1),p=q.f(14+4+2+4+A);Y.ZO(p,U,"Photoshop 3.0");U+=14;Y.ZO(p,U,"8BIM");
U+=4;p[U++]=4;p[U++]=4;U+=2;Y.Qm(p,U,J);U+=4;for(var e=0;e<Q.length;e++){var j=Q[e],b=j[1];p[U++]=28;
p[U++]=2;p[U++]=j[0];Y.iW(p,U,b.length);U+=2;Y.ZO(p,U,b);U+=b.length}W=4+p.length;var s=P+C+W,G=new Uint8Array(w.length+s);
for(var e=0;e<20;e++)G[e]=w[e];for(var e=20;e<w.length;e++)G[e+s]=w[e];G[T]=255;G[T+1]=225;Y.iW(G,T+2,P-2);
Y.ZO(G,T+4,"Exif");for(var e=0;e<L.length;e++)G[T+10+e]=L[e];T+=P;G[T]=255;G[T+1]=225;Y.iW(G,T+2,C-2);
Y.ZO(G,T+4,H);for(var e=0;e<g.length;e++)G[T+4+H.length+1+e]=g[e];T+=C;G[T]=255;G[T+1]=237;Y.iW(G,T+2,W-2);
for(var e=0;e<p.length;e++)G[T+4+e]=p[e];T+=W;w=G}return w.buffer};fx.$G.u$=function(n){var F=0,O=[],I=n.length;
while(F<I){while(n[F]==255)F++;var x=n[F];F++;if(O[x]==null)O[x]=[];O[x].push(F-2);if(x==216)continue;
if(x==217)break;if(224<=x&&x<=239||x==218||x==219||x==192||x==193||x==194||x==196||x==221||x==254){var r=Y.Ys(n,F);
F+=r;if(x==218)while(F<I&&(n[F]!=255||(n[F+1]==0||208<=n[F+1]&&n[F+1]<=215)))F++;continue}console.log("unknown marker ",x.toString(16),F);
break}if(O[217]==null){console.log("EOI marker missing");var _=n.length-2;n[_]=255;n[_+1]=217;O[217]=[_]}return O};
fx.$G.acc=function(n){n=new Uint8Array(n);if(n[0]!=255)return n.buffer;var F=fx.$G.u$(n),O=fx.$G.Id(n,F);
if(O.numComponents!=4)return n.buffer;var I=O.width,x=O.height,r=fx.$G.Hx(n,F,!0);return fx.$G.eJ([[r[0].data]],I,x,[85])};
fx.$G.Id=function(n,F){var O=(F[192]?F[192]:F[193]?F[193]:F[194])[0]+4,I={};I.progressive=F[194]!=null;
I.precision=n[O];O++;I.height=Y.Ys(n,O);O+=2;I.width=Y.Ys(n,O);O+=2;I.numComponents=n[O];O++;if(F[224]){var x=I.jfif={};
O=F[224][0]+2+2+5+2;x.densityUnits=n[O];O++;x.xDensity=Y.Ys(n,O);O+=2;x.yDensity=Y.Ys(n,O);O+=2}if(F[238]){var x=I.adobe={};
O=F[238][0]+2+2+6;x.version=n[O];O++;x.flags0=Y.Ys(n,O);O+=2;x.flags1=Y.Ys(n,O);O+=2;x.transform=n[O];
O++}return I};fx.$G.a3T=function(n,F,O){var I=F,x=Y.Ys(n,I);I+=2;var r=Y.su(n,I,4);if(r=="Exif"){I+=6;
var _=n.slice(I,I+x-8),d;try{d=UTIF.decode(_.buffer,{parseMN:!1,debug:!1})}catch(hl){}if(d)O.exif=d}else if(r=="http"){var w=0;
while(n[I+w]!=0)w++;var Z=Y.su(n,I,w);I+=w+1;if(Z=="http://ns.adobe.com/xmp/extension/"){var P=Y.su(n,I,32);
I+=32;I+=8;var C=F+x-I;while(n[I+C-1]==0)C--;if(O.xmp_extn==null)O.xmp_extn="";try{O.xmp_extn+=Y.l5(n,I,C)}catch(hl){}}else if(Z=="http://ns.adobe.com/xap/1.0/"){var W=Y.l5(n.slice(I,I+x-w-3));
if(W[0]=="?")W="<"+W;O.xmp=W}}else console.log(r)};fx.$G.Hx=function(n,F,O){var I=fx.$G.Id(n,F),x=I.width,r=I.height,_=x*r,d,w=-1,H=72,y;
if(I.adobe)w=I.adobe.transform;if(O||x*r>15e7||w==0||w==2){var Z=new PDFJS.JpegImage;Z.parse(n);var P=Z.getData({width:x,height:r,forceRGB:!0,isSourcePDF:O}),d=q.f(_*4);
for(var e=0;e<_;e++){var C=e<<2,W=C-e;d[C]=P[W];d[C+1]=P[W+1];d[C+2]=P[W+2];d[C+3]=255}}else{d=fx.$G.a2w(n.buffer,I)}var v=F[225];
if(v)for(var e=0;e<v.length;e++)fx.$G.a3T(n,v[e]+2,I);var L=F[217][0]+2;if(L!=n.length)I.suffix=n.slice(L);
var g=[x,r,1,0,0,0,1,0];if(I.jfif&&I.jfif.densityUnits!=0){H=Math.round([72,1,2.54][I.jfif.densityUnits]*I.jfif.xDensity)}else if(I.exif&&I.exif[0].t282!=null){var Q=I.exif[0].t282[0];
H=Q[0]/Q[1]}if(I.exif){var J=I.exif;y=fb.wX(J[0]);var A=J[0].t274;if(A)A=A[0];if(A!=null&&A>1&&A<20)g=q.raw.uG(A,x,r)}if(I.xmp){y=fb.n2(I.xmp,y)}var p=F[237],U=[],j=[];
if(p){var b=new Uint8Array(65536),s=0,G=0;for(var e=0;e<p.length;e++){G=p[e]+2;var T=G+Y.Ys(n,G);G+=2;
var z=G;while(n[G]!=0)G++;G++;var m=Y.su(n,z,G-z-1),$=T-G;while(s+$>b.length){var o=new Uint8Array(b.length*2);
o.set(b);b=o}var h=new Uint8Array(n.buffer,G,$);b.set(h,s);s+=$}G=0;n=b;while(G<s){var X=Y.su(n,G,4);
G+=4;if(X!="8BIM"&&X!="AgHg"&&X!="PHUT"&&X!="DCSR")throw X;var D=Y.Ys(n,G);G+=2;var f=n[G++],R=Y.su(n,G,f);
G+=f;if((f&1)==0)G++;var i=Y.c(n,G);G+=4;var L=G+i+(i&1);if(D==1028){while(G+4<L){var t=n[G++],N=n[G++],M=n[G++],hK=Y.Ys(n,G);
G+=2;if(t==28&&N==2)U.push([M,Y.su(n,G,hK)]);G+=hK}}else if((D&2e3)==2e3){var bD=fH.WA(n,G,i);j.push([R,bD])}else{}G=L}if(U.length!=0)y=fb.akQ(U,y)}var co=[{Kh:new gv(0,0,x,r),data:d.buffer,gC:H,aC:y,p6:j.length==0?null:j}],y=I.xmp_extn;
if(y){var iM=new DOMParser,hs=iM.parseFromString(y,"image/svg+xml"),hs=hs.children[0].children[0].children[0],S=[hs.getAttribute("GImage:Data"),hs.getAttribute("GDepth:Data")];
for(var e=0;e<S.length;e++)if(S[e]){var a=atob(S[e]),bV=new Uint8Array(a.length);Y.ZO(bV,0,a);bV=bV.buffer;
var a5=fx.TG(bV),i9=fx.rM(a5).bx(bV);co.push(i9[0])}}if(I.suffix){var dG=I.suffix,ap=Y.su(dG,4,4),bk=Y.qt(dG,String.fromCharCode(255)+String.fromCharCode(216)+String.fromCharCode(255));
if(fx.l9(dG,[0,0,1,10,14,0,0,0])){var G=0;while(G!=dG.length){var c2=Y.KO(dG,G+2);G+=4;var gg={2272:12,2320:21,2561:13,2625:21,2721:3,2608:0}[c2];
if(gg!=null){var bH=Y.wc(dG,G);G+=4;var gw=Y.su(dG,G,bH);G+=bH;var gP=Y.su(dG,G,gg);G+=gg;if(c2==2608){var dT=Y.c(dG,G+24);
G+=dT+24;var fU=Y.c(dG,G);G+=fU;alert("Photopea found a "+hP.R4(dT)+" MP4 video inside your image.",4e3)}}else if(c2==18502){while(Y.su(dG,G,4)!="SEFT")G+=4;
G+=4}else{break;console.log(Y.sX(dG,G,128));console.log(dG.slice(G));throw c2.toString(16)}}}else if(ap=="ftyp"){alert("Photopea found a "+hP.R4(dG.length)+" MP4 video inside your image.",4e3)}else if(Y.su(dG,0,4)=="fixe"){alert("Unknown data - "+dG.length+" B - at the end of the file",3e3);
var G=4,i=Y.wc(dG,G);G+=4;var dV=Y.wc(dG,G);G+=4;var ac=Y.wc(dG,G);G+=4;console.log(i,dV,ac,dG.slice(G,G+84));
G+=84;var e2=Y.su(dG,G,32);G+=32;G+=8;var e2=Y.su(dG,G,32);G+=32}else if(Y.su(dG,8,13)=="FocusShot_Map"){var cX=Y.c(dG,0),hK=Y.wc(dG,4),bV=q.f(_*4),eR=q.f(_*4);
for(var gR=0;gR<r;gR++)for(var bN=0;bN<x;bN++){var e=gR*x+bN,C=e<<2,eG=8+13+((gR>>>1)*x+bN>>>1),ef=dG[eG],fi=dG[eG+(_>>>2)];
bV[C]=bV[C+1]=bV[C+2]=ef;bV[C+3]=255;eR[C]=eR[C+1]=eR[C+2]=fi;eR[C+3]=255}co.push({Kh:new gv(0,0,x,r),data:bV.buffer},{Kh:new gv(0,0,x,r),data:eR.buffer})}else if(ap=="edof"){var A=dG[8+7];
console.log(A.toString(16));var G=8+16,ep=Y.KO(dG,G),iJ=Y.KO(dG,G+2),_=ep*iJ;G+=4;G+=32+16;var aT=q.f(_*4);
for(var e=0;e<_;e++){var C=e<<2;aT[C]=aT[C+1]=aT[C+2]=dG[G+e];aT[C+3]=255}if(A==16){}else if(A==19){var dm=aT.slice(0);
q.J.ej(aT,dm,ep,iJ);var c1=ep;ep=iJ;iJ=c1;q.J.a6L(dm,aT,ep,iJ)}else throw"Unknown orientation of a depth map";
co.push({Kh:new gv(0,0,ep,iJ),data:aT.buffer})}else if(bk!=-1&&!(dG[0]==255&&dG[1]==129)){try{if(bk!=0)dG=dG.slice(bk);
var i9=fx.rM("jpg").bx(dG.buffer);for(var e=0;e<i9.length;e++)co.push(i9[e])}catch(hl){}}}if(co.length>1){var gk=co[0].Kh;
co[0].Lo="Main";for(var e=1;e<co.length;e++){co[e].Lo=fx.$G.a8N(new Uint8Array(co[e].data))?"Depth Map":null;
var a8=co[e].Kh;if(!a8.Qq(gk)){var bX=gk.d/a8.d,bL=gk.v/a8.v,c_=new cD;c_.scale(bX,bL);var eS=c.V.Kb([new Uint8Array(co[e].data),a8],1,q.J.EC(c_));
co[e].Kh=eS.rect;co[e].data=eS.buffer}}}if(fx.$G.Ba==1)if(g[2]!=1||g[6]!=1)for(var e=0;e<co.length;e++){var c$=co[e],cp=new Uint8Array(c$.data),x=c$.Kh.d,r=c$.Kh.v,ep=g[0],iJ=g[1],d=q.f(ep*iJ*4);
q.J.dF(cp,x,r,d,g);c$.Kh=new gv(0,0,ep,iJ);c$.data=d.buffer}return co};fx.$G.a8N=function(n){var F=!0;
for(var e=0;e<n.length;e+=4){F=F&&n[e]==n[e+1]&&n[e+1]==n[e+2]}return F};fx.$G.Ba=0;fx.$G.bx=function(n,F,O){n=new Uint8Array(n);
if(n[0]==255){var I=fx.$G.u$(n);if(I[195]==null){fx.$G.Ba++;var x=fx.$G.Hx(n,I,!1);fx.$G.Ba--;return x}var r=Y.Ys(n,I[195][0]+5),_=Y.Ys(n,I[195][0]+7),d=UTIF.LosslessJpegDecode(n),w=_*r,Z=q.f(w*4);
for(var e=0;e<w;e++){var P=e<<2,C=P-e;Z[P]=d[C];Z[P+1]=d[C+1];Z[P+2]=d[C+2];Z[P+3]=255}return[{Kh:new gv(0,0,_,r),data:Z.buffer}]}else if(n[0]==0&&n[4]==48&&n[6]==1){var W=n,v=new PDFJS.Jbig2Image,L=[];
if(F)L.push({data:F,start:0,end:F.length});L.push({data:W,start:0,end:W.length});var d=v.parseChunks(L);
if(!O)for(var e=0;e<d.length;e++)d[e]=~d[e];var _=Y.c(n,11),r=Y.c(n,15),H=Math.ceil(_/8),y=q.f(_*r*4);
for(var g=0;g<r;g++){var Q=g*H;for(var J=0;J<_;J++){var P=(g*_+J)*4,A=d[Q+(J>>>3)]>>>7-(J&7)&1,p=A*255;
y[P]=p;y[P+1]=p;y[P+2]=p;y[P+3]=255}}return[{Kh:new gv(0,0,_,r),data:y.buffer}]}else{var v=new PDFJS.JpxImage;
v.parse(n);var _=v.width,r=v.height,U=v.tiles,j=v.componentsCount,b=new Uint8Array(_*r*4),s=new gv(0,0,_,r);
for(var v=0;v<U.length;v++){var G=U[v],T=G.width,z=G.height,m=T*z,$=G.items,o=new gv(G.left,G.top,T,z),h=new Uint8Array(m*4);
if(j==1)for(var e=0;e<m;e++){var X=$[e],P=e*4;h[P]=X;h[P+1]=X;h[P+2]=X;h[P+3]=255}else if(j==3)for(var e=0;
e<m;e++){var C=e*3,P=e*4;h[P]=$[C];h[P+1]=$[C+1];h[P+2]=$[C+2];h[P+3]=255}else console.log("Unknown number of components: "+j);
q.nF(h,o,b,s)}return[{Kh:s,data:b.buffer}]}};fx.tD={};fx.tD.eJ=function(n,F,O,I){if(I==null)I=[70,0,0,0];
var x=I[0]/100,w=0;if(n.length==1)return fx.EJ(n[0][0],F,O,"webp",x);var r=Y.d3,_=Y.UJ,d=new gV;r(d,w,"RIFF    WEBPVP8X");
w+=16;_(d,w,10);w+=4;_(d,w,18);w+=4;_(d,w,F-1);w+=3;_(d,w,O-1);w+=3;r(d,w,"ANIM");w+=4;_(d,w,6);w+=4;
d.nz(w,4);d.data[w+3]=255;Y.gd(d,w+4,I[2]);w+=6;var Z=[];for(var e=0;e<n.length;e++){Z.push(n[e][0])}var P=UPNG.encode.compress(Z,F,O,x==1?0:Math.max(2,Math.floor(x*500)),[!1,!0,!0,0,!0]).frames;
for(var e=0;e<n.length;e++){r(d,w,"ANMF");w+=4;var C=w;w+=4;var W=P[e],v=W.rect,L=[v.x>>>1,v.y>>>1,v.width-1,v.height-1,n[e][1]];
for(var H=0;H<5;H++)_(d,w+3*H,L[H]);w+=15;d.nz(w,1);d.data[w]=1-W.blend<<1|W.dispose;w++;var y=new Uint8Array(fx.EJ(W.img.buffer,v.width,v.height,"webp",1)),g=aO.Hy(y.buffer).sub,Q=Y.su(y,12,4);
if(Q!="VP8L"&&Q!="VP8 "&&Q!="VP8X")throw"e";var J=Q=="VP8 "?0:Q=="VP8L"?12:30,A=y.length-J;d.nz(w,A);
for(var H=0;H<A;H++)d.data[w+H]=y[J+H];w+=A;var p=w-C-4;_(d,C,p);if((p&1)==1){d.nz(w,1);w++}}_(d,4,w-8);
return d.data.slice(0,w).buffer};(function(){var n=fx.mk.get("wasm/webp").buffer;WebAssembly.instantiate(n).then(function(F){var O=F.instance.exports;
fx.tD.exp=O})}());fx.tD.bx=function(n){var F=new Uint8Array(n),O=fx.tD.afA,I=null,x=aO.Hy(n).sub,r={};
for(var e=0;e<x.length;e++)r[x[e].D5]=x[e];var _=r.ANIM,d=r.VP8L,w=r["VP8 "],Z=r.VP8X;if(_==null){var P,C;
if(w){P=Y.KO(F,w.n+6);C=Y.KO(F,w.n+8)}else if(d){var W=Y.wc(F,d.n+1);P=(W&(1<<14)-1)+1;C=(W>>>14&(1<<14)-1)+1}else throw"e";
var v=[O(I,n,{n:0,size:F.length},P,C)];return v}var L=Z.n,P=1+(Y.wc(F,L+4)&16777215),C=1+(Y.wc(F,L+7)&16777215),H=[],y=new gv(0,0,P,C),g=q.f(P*C*4);
for(var e=0;e<x.length;e++){var Q=x[e];if(Q.D5!="ANMF")continue;var J=[];for(var A=0;A<5;A++)J.push(Y.wc(F,Q.n+A*3)&16777215);
var p=new gv(J[0]*2,J[1]*2,J[2]+1,J[3]+1),U=J[4],j=O(I,n,{n:Q.n+16,size:Q.size-16},P,C),b=new Uint8Array(j.data),s=F[Q.n+15];
if(s>>>1==0)q.p.F_("norm",b,p,g,y,p,1);else q.nF(b,p,g,y);H.push({Lo:"_a_"+H.length+","+U,Kh:y.clone(),data:g.buffer.slice(0)});
if((s&1)==1){q.IW(b,0);q.nF(b,p,g,y)}}return H};fx.tD.afA=function(n,F,O,I,x){var r=fx.tD.exp,_=r.memory,d=5e6+2*O.size+I*x*10;
fx.IT(r,d);var w=new Uint8Array(_.buffer),Z=r.malloc(O.size);w.set(new Uint8Array(F,O.n,O.size),Z);var P=r.malloc(8),C=r.WebPDecodeARGB(Z,O.size,P,P+4),W=Y.wc(w,P),v=Y.wc(w,P+4),L=W*v*4,H=q.f(L);
for(var e=0;e<L;e+=4){H[e]=w[C+e+1];H[e+1]=w[C+e+2];H[e+2]=w[C+e+3];H[e+3]=w[C+e]}r.WebPFree(C);r.free(P);
r.free(Z);return{Kh:new gv(0,0,W,v),data:H.buffer}};fx.amb=function(){function n(d,w,Z,P){var C=new Uint8Array(d[0][0]),W=new Uint32Array(C.buffer),v=[],L={},y=24,g=0,U=0;
for(var e=0;e<W.length;e++){var H=W[e]&16777215;if(L[H]==null){L[H]=v.length;v.push(H);if(v.length>256){v=null;
break}}}if(v){y=1;while(1<<y<v.length)y*=2;if(y==2)y=4}var Q={HL:w,Sa:Z,w0:1,oC:y,rA:0,a5k:g},J=4*Math.floor((Q.oC*Q.HL+31)/32);
Q.size=J*Q.Sa+2;var A=new gV,p=v?(1<<y)*4:0;Y.d3(A,U,"BM");U+=2;Y.UJ(A,U,J*Z+16+40+p);U+=4;Y.UJ(A,U,0);
U+=4;Y.UJ(A,U,54+p);U+=4;A.nz(U,40);Y.UJ(A,U,40);U+=4;_(A.data,U,Q,J);U+=36;if(v){A.nz(U,p);var j=A.data;
for(var e=0;e<v.length;e++){var b=U+e*4,s=v[e]>>>16,G=v[e]>>>8&255,T=v[e]&255;j[b]=s;j[b+1]=G;j[b+2]=T}U+=p}A.nz(U,J*Z);
if(y==24)for(var z=0;z<Z;z++){var m=U+(Z-1-z)*J;for(var $=0;$<w;$++){var o=(z*w+$)*4;A.data[m+$*3+2]=C[o];
A.data[m+$*3+1]=C[o+1];A.data[m+$*3+0]=C[o+2]}}else if(y==8)for(var z=0;z<Z;z++){var m=U+(Z-1-z)*J;for(var $=0;
$<w;$++){var o=z*w+$,h=L[W[o]&16777215];A.data[m+$]|=h}}else if(y==4)for(var z=0;z<Z;z++){var m=U+(Z-1-z)*J;
for(var $=0;$<w;$++){var o=z*w+$,h=L[W[o]&16777215];A.data[m+($>>>1)]|=h<<4-($&1)*4}}else if(y==1)for(var z=0;
z<Z;z++){var m=U+(Z-1-z)*J;for(var $=0;$<w;$++){var o=z*w+$,h=L[W[o]&16777215];A.data[m+($>>>3)]|=h<<7-($&7)}}U+=J*Z+2;
return A.data.slice(0,U).buffer}function F(d){d=new Uint8Array(d);if(Y.wc(d,0)==40)return[O(d.buffer,0)];
var w=0,Z=Y.su(d,w,2);w+=2;if(Z!="BM"){alert("Unsupported BMP format: "+Z);return}var P=Y.wc(d,w);w+=4;
w+=4;var C=Y.wc(d,w);w+=4;return[O(d.buffer,w,C)]}function O(d,w,Z){d=new Uint8Array(d);var P=Y.wc(d,w),C=r(d,w+4);
if(C.w0!=1)alert("unsupported number of color planes: "+C.w0);if(C.rA!=0&&C.rA!=1&&C.rA!=2&&C.rA!=3){alert("Unsupported BMP compression: "+C.rA);
return}w+=P;var W=w,v=d;if(Z==null)Z=w;if(C.rA==1||C.rA==2){var L=x(d,Z,C);C.oC=8;d=L;Z=0}var H=4*Math.floor((C.oC*C.HL+31)/32),y=C.HL,g=Math.abs(C.Sa),Q=new Uint8Array(y*g*4);
Q.fill(255);if(C.oC==32)for(var J=0;J<g;J++){var A=Z+(g-1-J)*H;for(var p=0;p<y;p++){var U=(J*y+p)*4;
Q[U]=d[A+p*4+2];Q[U+1]=d[A+p*4+1];Q[U+2]=d[A+p*4+0];Q[U+3]=d[A+p*4+3]}}else if(C.oC==24)for(var J=0;
J<g;J++){var A=Z+(g-1-J)*H;for(var p=0;p<y;p++){var U=(J*y+p)*4;Q[U]=d[A+p*3+2];Q[U+1]=d[A+p*3+1];Q[U+2]=d[A+p*3+0]}}else if(C.oC==16)for(var J=0;
J<g;J++){var A=Z+(g-1-J)*H;for(var p=0;p<y;p++){var U=(J*y+p)*4,j=d[A+p*2+1]<<8|d[A+p*2];Q[U]=(j>>>11)*(255/31);
Q[U+1]=(j>>>5&63)*(255/63);Q[U+2]=(j&31)*(255/31)}}else if(C.oC==8)for(var J=0;J<g;J++){var A=Z+(g-1-J)*H;
for(var p=0;p<y;p++){var U=(J*y+p)*4,b=d[A+p];Q[U]=v[W+4*b+2];Q[U+1]=v[W+4*b+1];Q[U+2]=v[W+4*b+0]}}else if(C.oC==4)for(var J=0;
J<g;J++){var A=Z+(g-1-J)*H;for(var p=0;p<y;p++){var U=(J*y+p)*4,b=d[A+(p>>1)];b=b>>4-4*(p&1);b=b&15;
Q[U]=v[W+4*b+2];Q[U+1]=v[W+4*b+1];Q[U+2]=v[W+4*b+0]}}else if(C.oC==1)for(var J=0;J<g;J++){var A=Z+(g-1-J)*H;
for(var p=0;p<y;p++){var U=(J*y+p)*4,s=d[A+(p>>3)];s=s>>7-(p&7);s=s&1;Q[U]=v[W+4*s+2];Q[U+1]=v[W+4*s+1];
Q[U+2]=v[W+4*s+0]}}else throw"Unknown bit depth "+C.oC;if(C.Sa<0){var G=new Uint32Array(Q.buffer),T=g>>>1;
for(var J=0;J<T;J++){var z=J*y,m=(g-J-1)*y;for(var p=0;p<y;p++){var $=G[z+p];G[z+p]=G[m+p];G[m+p]=$}}}return{Kh:new gv(0,0,y,g),data:Q.buffer}}function I(d,e){return d>>>4-((e&1)<<2)&15}function x(d,w,Z){var P=Z.HL,C=Math.abs(Z.Sa),W=new Uint8Array(P*C),v=0,L=0,e=0;
while(L<C){var H=d[w++],y=d[w++],g=L*P+v;if(H>0){if(Z.oC==4)for(e=0;e<H;e++){W[g+e]=I(y,e)}else for(e=0;
e<H;e++){W[g+e]=y}v+=H}else if(H==0&&y==0){L++;v=0}else if(H==0&&y==1){break}else if(H==0&&y==2){v+=d[w++];
L+=d[w++]}else{var Q=y;if(Z.oC==4){for(e=0;e<y;e++){W[g+e]=I(d[w+(e>>>1)],e)}Q=Math.ceil(y/2)}else{for(e=0;
e<y;e++){W[g+e]=d[w+e]}}if((Q&1)!=0)Q++;w+=Q;v+=y}}return W}function r(d,w){var Z=Y.rV,P=Y.wc,C=Y.KO,W={};
W.HL=Z(d,w);w+=4;W.Sa=Z(d,w);w+=4;W.w0=C(d,w);w+=2;W.oC=C(d,w);w+=2;W.rA=P(d,w);w+=4;W.size=P(d,w);w+=4;
var v=Z(d,w);w+=4;var L=Z(d,w);w+=4;W.a5k=P(d,w);w+=4;w+=4;return W}function _(d,w,Z,P){Y.Wb(d,w,Z.HL);
w+=4;Y.Wb(d,w,Z.Sa);w+=4;Y.s0(d,w,Z.w0);w+=2;Y.s0(d,w,Z.oC);w+=2;Y.Wb(d,w,Z.rA);w+=4;Y.Wb(d,w,Z.size);
w+=4;Y.Wb(d,w,2834);w+=4;Y.Wb(d,w,2834);w+=4;Y.Wb(d,w,Z.a5k);w+=4;w+=4}return{bx:F,eJ:n,ah_:O}}();fx.tS={};
fx.tS.eJ=function(n,F,O,I){if(I==null)I=[100,0,0,0,0];var x=[],r=[],_=F*O*4,H=null;for(var d=0;d<n.length;
d++){var w=new Uint8Array(n[d][0].slice(0));for(var e=0;e<_;e+=4){var Z=w[e+3]=w[e+3]>127?255:0;if(Z==0)w[e]=w[e+1]=w[e+2]=0}x.push(w.buffer);
r.push(n[d][1])}var P=Math.round(2+254*I[0]/100),C=UPNG.encode.compress(x,F,O,P,[!0,!1,!1,8,!1]),W=C.plte,v=new Uint8Array(4),L=new Uint32Array(v.buffer);
for(var e=0;e<W.length;e++){L[0]=W[e];var y=v[0];v[0]=v[2];v[2]=y;W[e]=L[0];if(L[0]==0)H=e}while(W.length<256)W.push(0);
var g=new Uint8Array(2e3+F*O*n.length),Q=I[2],J={palette:W};if(Q!=1)J.loop=Q==0?0:Q-1;var A=new GifWriter(g,F,O,J);
for(var e=0;e<n.length;e++){var p=C.frames[e],U=p.rect,j=p.blend,b=p.dispose;A.addFrame(U.x,U.y,U.width,U.height,p.img,{transparent:H,disposal:b+1,delay:Math.round(r[e]/10)})}return g.slice(0,A.end()).buffer};
fx.tS.bx=function(n){var F=Date.now(),O=[],I=UGIF.decode(n),x=UGIF.toRGBA8(I),r=new gv(0,0,I.width,I.height);
for(var e=0;e<x.length;e++){var _=I.frames[e];O.push({Kh:r.clone(),Lo:"_a_frm"+e+","+_.delay*10,data:x[e]})}return O};
fx.dD={};fx.dD.eJ=function(n,F,O,I){console.log(n);if(F>256||O>256){alert("Maximum ICO size is 256x256 px. Will be cropped.",4e3);
var x=Math.min(F,256),r=Math.min(O,256),_=new gv(0,0,x,r),d=q.f(_.X()*4),w=new gv(0,0,F,O),Z=new Uint8Array(n[0][0]);
q.nF(Z,w,d,_);n[0][0]=d.buffer;F=x;O=r}var P=new gV,C=0,W=I&&I[0]==!0;Y.gd(P,C,0);C+=2;Y.gd(P,C,W?2:1);
C+=2;Y.gd(P,C,1);C+=2;var v=new Uint8Array(fx.rM("png").eJ(n,F,O));P.nz(C,16);P.data[C]=F==256?0:F;C++;
P.data[C]=O==256?0:O;C++;C+=2;Y.gd(P,C,W?Math.round(F/2):1);C+=2;Y.gd(P,C,W?Math.round(O/2):32);C+=2;
Y.UJ(P,C,v.length);C+=4;Y.UJ(P,C,6+16);C+=4;P.nz(C,v.length);for(var e=0;e<v.length;e++)P.data[C+e]=v[e];
C+=v.length;var L=new Uint8Array(C);for(var e=0;e<C;e++)L[e]=P.data[e];return L.buffer};fx.dD.bx=function(n){n=new Uint8Array(n);
var F=4,O=Y.KO(n,F);F+=2;var I=[];for(var e=0;e<O;e++){var x=fx.dD.akm(n,F+e*16),r=n.buffer.slice(x.offset,x.offset+x.size),_=fx.TG(r);
_=_?_:"bmp";if(_=="png"){var d=fx.rM(_),w=d.bx(r);x.Tv=w[0]}else{var Z=fx.rM("BMP").ah_(r,0),r=q.f(x.HL*x.Sa*4);
q.nF(new Uint8Array(Z.data),new gv(0,0,Z.Kh.d,Z.Kh.v),r,new gv(0,x.Sa,x.HL,x.Sa));Z.data=r.buffer;Z.Kh.v=x.Sa;
x.Tv=Z}I.push(x)}I.sort(function(P,C){if(P.HL!=C.HL)return P.HL-C.HL;return P.ag9-C.ag9});return[I.pop().Tv]};
fx.dD.akm=function(n,F){var O={};O.HL=n[F];F++;if(O.HL==0)O.HL=256;O.Sa=n[F];F++;if(O.Sa==0)O.Sa=256;
O.a9z=n[F];F++;F++;O.a4a=Y.KO(n,F);F+=2;O.ag9=Y.KO(n,F);F+=2;O.size=Y.wc(n,F);F+=4;O.offset=Y.wc(n,F);
F+=4;return O};fx.Zw={};fx.Zw.bx=function(n){var F=Date.now(),I,C=!0;if(q.raw.A1(n.byteLength))return[q.raw.a4q(n)];
var O=UTIF.decode(n);if(O[0].t33421)I=O[0];else if(O[0].subIFD&&O[0].t271&&O[0].t271[0]=="Hasselblad"){I=O[0].subIFD[0];
I.t33421=[2,2]}else if(O[0].subIFD&&O[0].subIFD[0].t33421){I=O[0].subIFD[0];if(I.t50706==null){if(I.t258[0]==8)I.t258[0]=12}}else if(O[0].subIFD&&O[0].subIFD[0]&&O[0].subIFD[0].t262&&O[0].subIFD[0].t262[0]==34892)I=O[0].subIFD[0];
else if(O[0].subIFD&&O[0].subIFD[1]&&O[0].subIFD[1].t33421)I=O[0].subIFD[1];else if(O[0].subIFD&&O[0].subIFD[2]&&O[0].subIFD[2].t33421)I=O[0].subIFD[2];
else if(O[3]&&O[3].t50648){var x=O[0].exifIFD,r=x.makerNote;I=O[3];var _=r.t224[1],d=r.t224[2];I.t256=[_];
I.t257=[d];I.t258=[16];I.t259=[7];I.t262=[32803];I.t277=[1];I.t33421=[2,2];var w=I.t50656[0],Z=q.raw.qk[w];
if(Z==null)throw"e";I.t33422=Z}if(I){UTIF.decodeImage(n,I,O);for(var P in O[0])if((P[0]=="t"||P[0]=="e"||P[0]=="d")&&I[P]==null)I[P]=O[0][P];
I.S2=O[0].t274?O[0].t274[0]:1;return[I]}var W=1/256;for(var e=0;e<O.length;e++)if(O[e].t258&&O[e].t258[0]==16&&O[e].t277&&O[e].t277[0]==1){}else C=!1;
if(C){var v=0,L=0,H=0;for(var e=0;e<O.length;e++){UTIF.decodeImage(n,O[e],O);var y=O[e].data;for(var g=0;
g<y.length;g+=2){var Q=y[g+1]<<8|y[g];if(Q>v)v=Q;L+=Q;H++}}W=1/256*65535/(.5*v+.5*(2*L/H))}var J=[];
for(var e=0;e<O.length;e++){var A=O[e],p=72;UTIF.decodeImage(n,A,O);var U=A.t282,j=A.t296;if(U!=null&&j!=null){p=U[0][0]/U[0][1];
if(j[0]==3)p=Math.round(p/2.54)}if(A.width==null)continue;var b=UTIF.toRGBA8(A,W).buffer,s=fb.wX(A);
J.push({Kh:new gv(0,0,A.width,A.height),data:b,gC:p,aC:s})}return J};fx.Zw.eJ=function(n,F,O,I){if(I==null)I=[!1];
var x={},r=n[0];if(r[3]!=null&&I[0])x=fb.K1(r[3]);if(r[2]!=null){x.t282=x.t283=[[Math.round(r[2]),1]];
x.t296=[2]}return UTIF.encodeImage(r[0],F,O,x)};fx.EP={};fx.EP.dp=!0;fx.EP.bx=function(n,F){fy.Hy(n,F)};
fx.EP.ag2=function(n,F,O,I){if(I==null)I=[!1,!1,!1,!1];if(!I[0])n.dH();var x=new gV,r=fy.t3(n,x,I);return[x.data.buffer,r]};
fx.EP.eJ=function(n,F,O,I){var x=fx.EP.ag2(n,F,O,I),r=x[0],_=x[1];return r.byteLength==_?r:r.slice(0,_)};
fx.yK={};fx.yK.dp=!0;fx.yK.bx=function(n,F){var O=pako.inflate(new Uint8Array(n)),I=Y.Ys(O,0),x=Y.Ys(O,2),r=4;
F.d=Y.c(O,r);r+=4;F.v=Y.c(O,r);r+=4;F.buffer=q.f(F.d*F.v*4);var _=Y.Ys(O,r);r+=2;r+=4;for(var d=0;d<_;
d++){var w=F.Kv(),b=1,s=2,G=3,T=0;F.t.push(w);var Z=Y.c(O,r);r+=4;var P=r,C=Y.Ys(O,P);P+=2;var W=Y.l5(O,P,C);
P+=C;w.V9(W);P++;w.rect.x=Y.Z3(O,P);P+=4;w.rect.y=Y.Z3(O,P);P+=4;w.rect.d=Y.c(O,P);P+=4;w.rect.v=Y.c(O,P);
P+=4;if(I>3)P+=4;w.opacity=Math.round(255*O[P]/100);P++;w.tt(O[P]!=0);P++;w.mf="norm,lddg,norm,dark,diff,norm,hLit,norm,norm,lite,mul ,over,scrn,fsub".split(",")[O[P]];
P++;P++;if(I>3){var v=Y.Ys(O,P);P+=2;if(v!=0){var L=JSON.parse(Y.l5(O,P,v));P+=v;var H=L.text,y=L.textSettings,g=y.font,Q=y.size,J=y.padding,A=parseInt(y.color.slice(1),16);
w.add.lnsr="rend";w.add.TySh=bt.Cc(0,0);w.add.TySh.Qa=new gv(0,0,100,100);w.add.TySh.m=new cD(1,0,0,1,w.rect.x+J,w.rect.y+J);
var p=w.add.TySh.Vb;bt.li(p,1);bt.Ar(p,[0,0,w.rect.d-J*2,w.rect.v]);bt.bw(p,0,H);var U=bt.gU(p,0,1);
U.Bw.FontSize=Q;U.Bw.FillColor={Type:1,Values:[1,(A>>>16&255)/255,(A>>>8&255)/255,(A>>>0&255)/255]};
if(y.bold)g+="-Bold";bt.Zu(U,g);U.jp.Justification=["left","right","center"].indexOf(y.align);bt.F$(p,0,H.length,U)}}var j=Y.c(O,P);
P+=4;if(j!=w.rect.X()*4)throw"e";w.buffer=q.f(j);if(I>3){b=0;s=1;G=2;T=3}for(var e=0;e<j;e+=4){w.buffer[e]=O[P+e+b];
w.buffer[e+1]=O[P+e+s];w.buffer[e+2]=O[P+e+G];w.buffer[e+3]=O[P+e+T]}P+=j;var z=Y.c(O,P);P+=4;if(z==0&&I>3){r+=Z;
continue}var m=O[P];P++;var $=Y.Ys(O,P);P+=2;if(z!=0){w.r=new K.FZ;w.r.rect=w.rect.clone();w.r.channel=q.f(w.rect.X());
for(var e=0;e<z;e+=4)w.r.channel[e>>>2]=O[P+e+1];P+=z}if(m!=0){var o=JSON.parse(bW.default);w.add.lmfx=o;
for(var e=0;e<bW.order.length;e++)o[bW.jV[e]]={t:"VlLs",v:[]};var h={"102":9,"101":2,"103":0,"104":3,"105":8};
for(var e=0;e<m;e++){var X=Y.Ys(O,P),D=P+X+4,f=O.slice(P,D),R=O[P+2];P+=3;var i=h[R+""],N=JSON.parse(bW.E5[i]);
o[bW.jV[i]].v.push({t:"Objc",v:N});if(i!=0){N.Md.v.BlnM=fk.Pw("norm");N.Opct.v.val=O[P];P++;if(i==9||i==2){N.Dstn.v.val=O[P+1];
P+=2}else P+=2;N.blur.v.val=Math.round(O[P]*1.2);P++;if(i==9||i==2){N.uglg.v=!1;N.lagl.v.val=180-Y.Ys(O,P);
P+=2}N.Clr.v=q.W.Vm({Q:O[P+1],l:O[P+2],O:O[P+3]})}else{N.hglM.v.BlnM=N.sdwM.v.BlnM=fk.Pw("norm");P+=2;
var M=O[P++],hK=O[P++];N.blur.v.val=Math.round(Math.sqrt(hK*M)*1.3);N.srgR.v.val=Math.round(100*M/hK);
N.uglg.v=!1;N.lagl.v.val=180-Y.Ys(O,P);P+=2;N.hglO.v.val=O[P++];N.hglC.v=q.W.Vm({Q:O[P+1],l:O[P+2],O:O[P+3]});
P+=4;N.sdwO.v.val=O[P++];N.sdwC.v=q.W.Vm({Q:O[P+1],l:O[P+2],O:O[P+3]});P+=4}P=D}}if(P-r!=Z){var bD=Y.c(O,P),hs=0;
P+=4;P++;var C=Y.Ys(O,P);P+=2;var H=Y.l5(O,P,C);P+=C;H=H.replace(/\r/g,"\n");var C=Y.Ys(O,P);P+=2;var g=Y.l5(O,P,C);
P+=C;var Q=Y.Ys(O,P);P+=2;var co=w.rect.x,iM=w.rect.d;if(bD&4)hs=1;if(bD&2)hs=2;var S=Math.round(Q*.4);
if(hs==0||hs==2)iM+=S;if(hs==1||hs==2){iM+=S;co-=S}w.add.lnsr="rend";w.add.TySh=bt.Cc(0,0);w.add.TySh.Qa=new gv(0,0,100,100);
w.add.TySh.m=new cD(1,0,0,1,co,w.rect.y+Q*.25);var p=w.add.TySh.Vb;bt.li(p,1);bt.Ar(p,[0,0,iM,w.rect.v]);
bt.bw(p,0,H);var U=bt.gU(p,0,1);U.Bw.FontSize=Q;U.Bw.FillColor={Type:1,Values:[1,O[P+1]/255,O[P+2]/255,O[P+3]/255]};
P+=4;if(O[P+5])g+="-Bold";if(O[P+6])g+="-Italic";bt.Zu(U,g);U.jp.Justification=hs;P+=8;bt.F$(p,0,H.length,U)}r+=Z}};
fx.iI={};fx.iI.dp=!0;fx.iI.bx=function(n,F){fA.Hy(n,F)};fx.s7={};fx.s7.dp=!0;fx.s7.bx=function(n,F){dg.Hy(n,F)};
fx.TV={};fx.TV.dp=!0;fx.TV.bx=function(n,F){cA.Hy(n,F)};fx.u8={};fx.u8.dp=!0;fx.u8.bx=function(n,F){iT.Hy(n,F)};
fx.ny={};fx.ny.dp=!0;fx.ny.bx=function(n,F){h4.Hy(n,F)};fx.E7={};fx.E7.dp=!0;fx.E7.eJ=function(n,F,O,I,x){if(I==null)I=[!0,!1,!1,!1,!0,!0];
var r=hF.WH(n,{N0:I[0],hidden:I[1],alq:I[2],afD:I[3],names:I[4],aaL:I[5],a54:F,a8W:O},x.sH);return r};
fx.E7.bx=function(n,F,O){hF.Hy(n,F,O)};fx.Ev={};fx.Ev.dp=!0;fx.Ev.bx=function(n,F){var O=150,I=new cD(1,0,0,-1,0,0);
I.scale(O/72,O/72);F.gC=O;var x=new eW(F,I,!0);FromPS.Parse(n,x)};fx.VR={};fx.VR.dp=!0;fx.VR.eJ=function(n,F,O,I,x){if(I==null)I=["",100,!1,!1,!1];
I[5]=["jpg"];var r=new ToPDF;gd.WH(n,I,r,x.sH);return r.buffer};fx.VR.bx=function(n,F,O){var I=2;while(!0){var x=I*72,r=new cD(1,0,0,-1,0,0);
r.scale(x/72,x/72);F.gC=x;var _=new eW(F,r,!0);FromPDF.Parse(n,_);var d=Math.max(F.d,F.v);if(O&&d<Math.max(O[0],O[1])){F.t=[];
var w=I;while(d*(I/w)<Math.max(O[0],O[1]))I++}else break}};fx.sT={};fx.sT.dp=!0;fx.sT.bx=function(n,F){var O=72,I=new cD(1,0,0,1,0,0);
I.scale(O/72,O/72);F.gC=O;var x=new eW(F,I,!1);FromWMF.Parse(n,x)};fx.YG={};fx.YG.st=!0;fx.YG.dp=!0;
fx.YG.eJ=function(n,F,O,I,x){if(I==null)I=["",!1,!1,!1];I[4]=[];var r=new ToEMF;gd.WH(n,I,r,x.sH);return r.buffer};
fx.YG.bx=function(n,F){var O=72,I=new cD(1,0,0,1,0,0);I.scale(O/72,O/72);F.gC=O;var x=new eW(F,I,!1);
FromEMF.Parse(n,x)};fx.y3={};fx.y3.dp=!0;fx.y3.bx=function(n,F){return cO.Hy(n,F)};fx.r3={};fx.r3.bx=function(n,F){var O=h5.Hy(n),I=new Uint8Array(n),x=0,r,_,d,w,Z,P,C,W,v=0,L=0,H=0,y=0,g=0;
for(var Q=0;Q<O.sub.length;Q++){var J=O.sub[Q],x=J.n;if(J.D5=="BMHD"){var A=[];for(var e=0;e<4;e++)A[e]=Y.Ys(I,x+2*e);
x+=8;w=A[2];Z=A[3];_=A[0];d=A[1];r=q.f(_*d*4);P=I[x++];C=I[x++];W=I[x++]}else if(J.D5=="CMAP")v=x;else if(J.D5=="CAMG"){var p=Y.c(I,x);
L=p&32768,H=p&4,y=p&2048;g=p&128}else if(J.D5=="BODY"){var U=_+15>>>4<<1,j=P+C,b=q.f(U*d*j),z,m,$;gL.xY(I,x,J.size,b,0,b.length);
var s=P-2,G=(1<<s)-1,T=Math.round(255/G);for(var Z=0;Z<d;Z++)for(var w=0;w<_;w++){var o=0;for(var h=0;
h<j;h++){var X=(Z*j+h)*U*8+w,D=b[X>>>3]>>>7-(X&7)&1;o|=D<<h}var f=o>>>P,o=o&(1<<P)-1,e=Z*_+w,R=e<<2;
if(v!=0){if(y!=0&&o>>>s!=0){var i=o>>>s,t=(o&G)*T;if(i==1)$=t;else if(i==2)z=t;else if(i==3)m=t}else{var t=v+o*3;
z=I[t+0];m=I[t+1];$=I[t+2]}}else{z=o>>>0&255;m=o>>>8&255;$=o>>>16&255}r[R+0]=z;r[R+1]=m;r[R+2]=$;r[R+3]=255}}}return[{Kh:new gv(0,0,_,d),data:r.buffer}]};
fx.Lm={};fx.Lm.dp=!1;fx.Lm.eJ=function(n,F,O,I){var x=n[0][4],r=new Uint8Array(n[0][0]),_=2,d=x?!0:!1,w=d?4:3,Z=new Uint8Array(F*O*w);
for(var P=0;P<O;P++)for(var C=0;C<F;C++){var W=P*F+C<<2,v=((O-P-1)*F+C)*w;Z[v]=r[W+2];Z[v+1]=r[W+1];
Z[v+2]=r[W+0];if(d)Z[v+3]=x[0][P*F+C]}if(!0){var L=Z.length,H=0,y=new Uint8Array(L*2),g=0,Q=0,J=F*w;
while(Q<L){var A=Q,p=0,U=J*(Math.floor(Q/J)+1);while(A<U&&p<128){var j=!0;for(var e=0;e<w;e++)j=j&Z[Q+e]==Z[A+e];
if(!j)break;A+=w;p++}if(p==1){var b=1;while(b<128&&Q+(b+1)*w<U){var j=!0,s=Q+b*w;for(var e=0;e<w;e++)j=j&Z[s+e]==Z[s+w+e];
if(j)break;b++}y[g++]=b-1;for(var G=0;G<b;G++)for(var e=0;e<w;e++)y[g++]=Z[Q++]}else{y[g++]=127+p;for(var e=0;
e<w;e++)y[g+e]=Z[Q+e];g+=w;Q+=w*p;H+=p}}Z=y.slice(0,g);_+=8}var T=new Uint8Array(18+Z.length+26);T[2]=_;
Y.s0(T,12,F);Y.s0(T,14,O);T[16]=w*8;T[17]=w==4?8:0;T.set(Z,18);Y.ZO(T,18+Z.length+8,"TRUEVISION-XFILE.");
return T.buffer};fx.Lm.bx=function(n){var F=new Uint8Array(n),O=0,I=F[0],x=F[1],r=F[2],_=F[4]*256+F[3],d=F[6]*256+F[5],w=F[7],Z=F[9]*256+F[8],P=F[11]*256+F[10],C=F[13]*256+F[12],W=F[15]*256+F[14],v=F[16],L=F[17],H=L>>>4,y=Y.su(F,18,I),g=q.f(C*W*4),O=18+I+(d*w>>>3),Q=new Uint8Array(F.buffer,O);
if(r>3){var J=0,A=F,p=new Uint8Array(C*W*v>>>3),U=O,j=0,b=F.length,s=v>>>3;while(j<p.length){var E=A[U];
U++;if(E<128)for(var e=0;e<E+1;e++){for(var G=0;G<s;G++){p[j]=A[U];j++;U++}}else{for(var e=0;e<E-127;
e++){for(var G=0;G<s;G++){p[j]=A[U+G];j++}}U+=s}}r-=8;Q=p;O=U}else O+=C*W*v>>>3;var T=new Uint8Array(4),z=fx.Lm.a4Y;
for(var m=0;m<W;m++)for(var $=0;$<C;$++){var o=(H&2)==0?(W-m-1)*C+$:m*C+$,h=m*C+$,X,D,f,R=255,i=o*v>>>3;
if(r==1){var t=0;if(v==8)t=Q[i];else throw"e";z(F,18+I+_+(t*w>>>3),w,T);X=T[0];D=T[1];f=T[2];R=T[3]}else if(r==2){z(Q,i,v,T);
X=T[0];D=T[1];f=T[2];R=T[3]}else if(r==3){if(v==8)X=D=f=Q[i];else throw"e"}var N=h*4;g[N]=X;g[N+1]=D;
g[N+2]=f;g[N+3]=R}var T={Kh:new gv(0,0,C,W),data:g.buffer,Lo:y};if(q.Dd(g)){var M=q.f(C*W);q.xg(g,M,3);
q.IW(g,4278190080,16777215);T.TM=[M]}return[T]};fx.Lm.a4Y=function(n,F,O,I){var x,r,_,d=255;if(O==24||O==32){_=n[F];
r=n[F+1];x=n[F+2];if(O==32)d=n[F+3]}else if(O==16){var w=n[F+1]<<8|n[F+0];x=w>>>10&31;r=w>>>5&31;_=w>>>0&31;
x=Math.round(x*(255/31));r=Math.round(r*(255/31));_=Math.round(_*(255/31))}else throw"e";I[0]=x;I[1]=r;
I[2]=_;I[3]=d};fx._$={};fx._$.bx=function(n){var F=new Uint8Array(n),O=0,I=112,x=42,r=Y.wc,P;O+=8;var _=F[O];
O++;if(_!=x)throw"e";var d=r(F,O);O+=4;var w=Y.O$(F,O,d);O+=d*2;var Z=[];while(O<F.length){P=r(F,O);
O+=4;if(P!=I)throw P;O+=4;P=F[O];O++;if(P!=x)throw P;var C=r(F,O);O+=4;var W=F[O];O++;if(W!=x){O-=5;
C=r(F,O);O+=8;P=F[O];O++;if(P!=x)throw P}var v=r(F,O)*2;O+=4;if(C>0)Z.push(O+v);O+=v+C}var L=new DOMParser,H=L.parseFromString(w,"image/svg+xml").firstChild.firstChild,y=[];
fx._$.pc(H,F,Z,y);return y};fx._$.pc=function(n,F,O,I){var x=n.firstChild.firstChild;if(x.tagName=="Image"){var r=x.getElementsByTagName("ImageDescription")[0],_=r.children[0].children,d=r.children[1].children,w=O.shift(),Z=[];
for(var e=0;e<d.length;e++)Z.push(parseInt(d[e].getAttribute("NumberOfElements")));while(Z.length>3)Z[2]*=Z.pop();
var P=_.length,C=Z[0],W=Z[1],v=Z[2],L=parseInt(d[0].getAttribute("BytesInc"));for(var H=0;H<v;H++){var y=q.f(C*W*4);
q.IW(y,4278190080);for(var g=0;g<P;g++){var Q=q.f(C*W);if(L==1)for(var J=0;J<Q.length;J++)Q[J]=F[w+J];
else if(L==2)for(var J=0;J<Q.length;J++)Q[J]=Math.min(255,(F[w+J*2+1]<<8|F[w+J*2])>>>2);else throw L;
if(g!=3)q.GF(Q,y,g);if(P==1){q.GF(Q,y,1);q.GF(Q,y,2)}w+=C*W*L}I.push({Kh:new gv(0,0,C,W),data:y.buffer})}}else{var A=n.children,p=0;
while(p<A.length&&A[p].tagName!="Children")p++;if(p==A.length)throw"e";A=A[p].children;for(var U=0;U<A.length;
U++)fx._$.pc(A[U],F,O,I)}};fx.os={};fx.os.bx=function(n){var F=new Uint8Array(n),O=0,I={},P=1e9;for(var e=0;
e<306;e++){var x=Y.su(F,O,8).trim(),r=Y.su(F,O+9,71).split("/")[0].trim();I[x]=r;O+=80;if(x=="END"){O=Math.ceil(O/2880)*2880;
break}}var _=parseInt(I.NAXIS1),d=parseInt(I.NAXIS2),w=_*d,Z=parseInt(I.BITPIX),C=-1e9,W=new Float32Array(w),v=new Float32Array(n,O,n.byteLength-O>>>2);
for(var e=0;e<w;e++){var L=e<<2,H=e<<1;if(Z==-32){var y=F[O+L+0];F[O+L+0]=F[O+L+3];F[O+L+3]=y;var y=F[O+L+1];
F[O+L+1]=F[O+L+2];F[O+L+2]=y;W[e]=v[e]}else if(Z==16){W[e]=Y.KO(F,O+H)}else throw Z;var g=W[e];if(g<P)P=g;
if(g>C)C=g}var Q=q.f(w*4),J=1/C;for(var A=0;A<d;A++)for(var p=0;p<_;p++){var e=A*_+p,U=(d-A-1)*_+p,L=U<<2,g=W[e]*J;
Q[L]=Q[L+1]=Q[L+2]=255*g;Q[L+3]=255}return[{Kh:new gv(0,0,_,d),data:Q,Lo:I.OBJECT}]};fx.gf={};fx.gf.bx=function(n){var F=new Uint8Array(n),O=16,I=Y.su(F,O,4),r=32,g=0,Q=0,J=!1,D;
O+=4;var x=Y.su(F,O,8);O+=8;while(F[O+r-1]==0)r--;var _=Y.su(F,O,r);O+=32;var d=Y.su(F,O,4);O+=4;O+=20;
var w=Y.c(F,O);O+=4;var Z=Y.c(F,O);O+=4;var P=Y.c(F,O);O+=4;var C=Y.c(F,O);O+=4;var W=Y.c(F,O);O+=4;
var v=Y.c(F,O);O+=4;var L="FujiFilm "+_,H=[0,1,1,2];if(L=="FujiFilm X10"){L="FujiFilm FinePix X10";H=[2,1,1,0]}var y={t271:["FujiFilm"],t272:[L],t277:[1],t33421:[2,2],t33422:H,S2:1};
O=P;var A=[],p=Y.Ys,U=Y.c(F,O);O+=4;for(var e=0;e<U;e++){var j=p(F,O);O+=2;var b=p(F,O);O+=2;if(j==256){Q=p(F,O);
g=p(F,O+2)}else if(j==272){A=[p(F,O),p(F,O+2)]}else if(j==273){A.push(p(F,O),p(F,O+2))}else if(j==304){J=!(F[O]>>>7)}else if(j==305){var s=Math.round(Math.sqrt(b)),G=[];
for(var T=0;T<b;T++)G.push(F[O+T]);G.reverse();y.t33421=[s,s];y.t33422=G}else if(j==12272){var z=p(F,O),m=p(F,O+2),$=p(F,O+6);
y.t50728=[z/m,1,z/$]}O+=b}var o=g<Q,h=F.slice(W,W+v),X=Math.round(v*8/(g*Q));if(h[0]==73&&h[1]==73&&h[2]==42){D=UTIF.decode(h.buffer)[0].fujiIFD;
X=D.t61443[0];var f=D.t61454;y.t50728=[f[0]/f[1],1,f[0]/f[2]];var R=D.t61447[0];h=h.slice(R,R+D.t61448[0])}var v=h.length,i=v*8<g*Q*X;
if(i)alert("Compressed RAF is not supported yet :(");function t(co,iM,hs){hs=hs<<8-(iM&7);var S=iM>>>3;
co[S]|=hs>>>16;co[S+1]|=hs>>>8;co[S+2]|=hs}var N=v*8/(g*Q);if(N==16)for(var e=0;e<v;e+=2){var M=h[e];
h[e]=h[e+1];h[e+1]=M}else if(N==14){for(var e=0;e<v;e+=4){var M=h[e];h[e]=h[e+3];h[e+3]=M;M=h[e+1];h[e+1]=h[e+2];
h[e+2]=M}}else if(N==12)for(var e=0;e<v;e+=3){var hK=h[e+2]<<16|h[e+1]<<8|h[e+0];hK=hK>>>12|(hK&4095)<<12;
h[e]=hK>>>16&255;h[e+1]=hK>>>8&255;h[e+2]=hK&255}if(o)h=fx.gf.a3$(h,g,Q);var bD=o?2:1;g*=bD;y.t256=[g];
y.t257=[Q];y.t258=[X];y.t50719=[A[1],A[0]*bD];y.t50720=[A[3],A[2]*bD];y.width=g;y.height=Q;y.data=new Uint8Array(h.buffer);
return[y]};fx.gf.a3$=function(n,F,O){n=new Uint16Array(n.buffer);var I=new Uint16Array(F*O*2);for(var x=0;
x<O;x+=2)for(var r=0;r<F;r++){var _=x*F+r,d=_*2,w=n[_],Z=n[_+F];I[d+1]=I[d+2*F]=Z;if(((x>>>1)+r&1)==0){I[d]=w;
I[d+2*F+1]=n[_+1]}else{I[d]=n[_-1];I[d+2*F+1]=w}}return I};fx.Ec={};fx.Ec.st=!0;fx.Ec.eJ=function(n,F,O,I){var x=new Uint8Array(n[0][0]),r=F*O,_=[1,3,4][I[0]],d=8+8*I[1],w=I[2];
if(_==1){var Z=new Uint8Array(F*O);q.xg(x,Z,0);x=Z}if(_==3){var Z=new Uint8Array(F*O*3);for(var e=0;
e<r;e++){var P=e*4,C=e*3;Z[C]=x[P];Z[C+1]=x[P+1];Z[C+2]=x[P+2]}x=Z}if(d==16){var W=x.length,Z=new Uint8Array(W*2);
for(var e=0;e<W;e++){var v=Math.round(x[e]*(65535/255));Z[e*2+w]=v>>>8;Z[e*2+1-w]=v&255}x=Z}return x.buffer};
fx.oA={};fx.oA.bx=function(n,F){function O(w){return~~(.5+q.sK(Math.max(0,Math.min(1,w)))*255)}var I=EXRLoader.parse(n),x=I.width,r=I.height,_=q.f(x*r*4);
for(var d=0;d<r;d++)for(var w=0;w<x;w++){var e=(d*x+w)*4,Z=((r-d-1)*x+w)*4;_[e]=O(I.data[Z+0]);_[e+1]=O(I.data[Z+1]);
_[e+2]=O(I.data[Z+2]);_[e+3]=O(I.data[Z+3])}return[{Kh:new gv(0,0,x,r),data:_.buffer}]};fx.Q5={};fx.Q5.st=!0;
fx.Q5.dp=!0;fx.Q5.eJ=function(n,F,O,I,x){I=["",100,!1,!1,!1];I[5]=["jpg"];var r=new ToDXF;gd.WH(n,I,r,x.sH);
return r.buffer};fx.Q5.bx=function(n,F){var O=72,I=new cD(1,0,0,1,0,0);I.scale(O/72,O/72);F.gC=O;var x=new eW(F,I,!1);
FromDXF.Parse(n,x)};fx.r9={};fx.r9.bx=function(){var n=Y.KO,F=Y.wc,O=Y.su,I;function x(_,d,w,Z,P){var C=F(_,w),W=F(_,w+4),v=F(_,w+8),L=n(_,w+12),H=n(_,w+14);
w+=16;var y={};for(var e=0;e<L+H;e++){var g=F(_,w),Q=F(_,w+4),J,A;if(g>>>31==1){g=g&16777215}if(e<L)J=Y.O$(_,d+g+2,n(_,d+g));
else J="id"+g;var p=Z.slice(0);p.push(J);if(Q>>>31==1){Q=Q&268435455;A=x(_,d,d+Q,p,P)}else{var U=F(_,d+Q),j=F(_,d+Q+4),b=F(_,d+Q+8),s=F(_,d+Q+12);
if(s!=0)throw"e";if(U<P[0]||U>P[0]+P[1])throw"e";var G=P[2]+U-P[0];A=_.slice(G,G+j);var T=fx.TG(A.buffer);
if(T&&["bmp","png","ico"].indexOf(T)!=-1){var z=fx.rM(T);if(!z.dp){var m=null;try{m=z.bx(A.buffer)}catch(hl){}if(m){m[0].Lo=p[1];
I.push(m[0])}}}else if(T)console.log(T)}y[J]=A;w+=8}return y}function r(_){I=[];var d=new Uint8Array(_),w=0,Z=n(d,w);
w+=2;w+=58;var P=F(d,w);w+=4;w=P;var C=O(d,w,4);w+=4;var W=n(d,w);w+=2;var v=n(d,w);w+=2;var L=F(d,w);
w+=4;var H=F(d,w);w+=4;var y=F(d,w);w+=4;var g=n(d,w);w+=2;var Q=n(d,w);w+=2;w+=g;var J={};for(var e=0;
e<v;e++){var A=w;while(d[A]!=0)A++;var p=O(d,w,A-w),U=F(d,w+8),j=F(d,w+12),b=F(d,w+16),s=F(d,w+20),G=F(d,w+24),T=F(d,w+28),z=n(d,w+32),m=n(d,w+34),Q=F(d,w+36);
J[p]=[j,U,s,b,Q];if(G+T!=0)throw"e";w+=40}for(var $ in J){var o=J[$];w=o[2];if($==".rsrc"){var h=x(d,w,w,[],o),X="id134"}}return I}return r}();
fx.WY={};fx.WY.dp=!0;fx.WY.bx=function(n,F){gM.Hy(n,F)};(function(){var n=fx.mk.get("wasm/zstd").buffer;
WebAssembly.instantiate(n).then(function(F){var O=F.instance.exports;fx.WY.acE=O})}());fx._L={};fx._L.dp=!0;
fx._L.bx=function(){var n=0,F=1,O=2,I=3,x=4,r=5,_=6,d=7,w=1,Z=2,P=7,C=8,W=9,v,L,H,y,g;function Q(){var E=Y.rV(v,L);
L+=4;return E}function J(){var D=0,f=0;for(var e=0;e<5;e++){var R=v[L++];D+=(R&127)<<f;f+=7;if((R&128)==0)break}return D}function A(){var D=J(),f=Y.l5(v,L,D);
L+=D;return f}function p(){return{typeName:A(),agi:Q()}}function U(){var D=Q(),f=A(),R=[],i=Q();for(var e=0;
e<i;e++)R.push([A()]);return{id:D,Bz:f,a6V:R}}function j(D){var f=D.a6V,R=[];for(var e=0;e<f.length;
e++)f[e].push(v[L++]);for(var e=0;e<f.length;e++){var i=f[e][1],t;f[e].push(b(i))}}function b(D){var f;
if(D==n)f=v[L++];else if(D==I)f=A();else if(D==x)f=p();else if(D==F||D==O||D==_||D==r){}else throw D;
return f}function s(D,f,R){var i;if(D==n){if(f==w)i=v[L++]==1;else if(f==Z){i=v[L++]}else if(f==C)i=Q();
else if(f==W){i=Q();Q()}else throw f}else if(D==I){i=m(R+1)}else if(D==x){i=m(R+1)}else if(D==r){i=m(R+1)}else if(D==F){i=m(R+1)}else if(D==_){i=m(R+1)}else throw D;
return i}function G(D,f){var R=H["c"+D],i=R.a6V,t={_class:R.Bz};for(var e=0;e<i.length;e++){var N=i[e],M=N[1],hK=N[2],bD=s(M,hK,f),co=N[0];
t[co]=bD}return t}function T(D,f,R,i){var t=[];for(var e=0;e<D;e++){var N=s(f,R,i);if(N.OI&&N.OI=="null_count"){var M=N.K_;
for(var hK=0;hK<M;hK++)t.push(null);e+=M-1}else t.push(N)}return t}function z(){return[Q(),Q()]}function m(D){if(D==null)throw"e";
var f=null,R=v[L],i=null;L++;if(R==0){var t=Q(),N=Q(),M=Q(),hK=Q();f=[t,N,M,hK]}else if(R==1){i=Q();
var bD=Q();f=G(bD,D)}else if(R==4){var co=U();i=co.id;j(co);H["c"+co.id]=co;f=G(co.id,D)}else if(R==5){var co=U();
i=co.id;j(co);var iM=Q();H["c"+co.id]=co;f=G(co.id,D)}else if(R==6){i=Q();var hs=A();f=hs}else if(R==7){i=Q();
var S=v[L++];if(S!=0)throw S;var a=Q();if(a!=1)throw a;var bV=Q(),a5=v[L++],i9=b(a5);f=T(bV,a5,i9,D)}else if(R==9){var dG=Q();
f={OI:"ref",K_:dG};g["o"+dG]=!0}else if(R==10){f={OI:"null_count",K_:1}}else if(R==11){f={OI:"end"}}else if(R==12){var iM=Q(),ap=A()}else if(R==13){var bk=v[L++];
f={OI:"null_count",K_:bk}}else if(R==16){var c2=z();i=c2[0];f=T(c2[1],x,null,D)}else if(R==17){var c2=z();
i=c2[0];f=T(c2[1],F,null,D)}else throw"e";if(i!=null&&i>0){if(y["o"+i]!=null)throw"e";y["o"+i]=f}return f}function $(D,y){if(D instanceof Array){for(var e=0;
e<D.length;e++)D[e]=o(D[e],y)}else if(D instanceof Object){for(var f in D)D[f]=o(D[f],y)}}function o(D,y){if(D&&D.OI&&D.OI=="ref")return y["o"+D.K_];
else return D}function h(D,f,R){v=new Uint8Array(D);L=0;H={};y={};g={};var i=Y.su(v,0,4);if(i!="PDN3")throw i;
L+=4;var t=Y.KO(v,L)+v[L+2]*256*256;L+=3;var N=Y.su(v,L,t);L+=t;L+=2;while(!0){var M=m(0);if(M&&M.OI&&M.OI=="end")break}for(var hK in g)if(y[hK]==null)throw hK;
for(var hK in y)$(y[hK],y);var bD=y.o1;console.log(bD);f.d=bD.width;f.v=bD.height;f.buffer=q.f(f.d*f.v*4);
var co=bD.layers["ArrayList+_items"];for(var e=0;e<co.length;e++){var iM=co[e];if(iM==null)continue;
console.log(iM);var hs=iM["Layer+width"],S=iM["Layer+height"],a=iM["Layer+properties"],bV=iM.properties,a5=bV.blendOp._class.split("+").pop();
a5=a5.slice(0,a5.length-7);var i9={Normal:"norm",Multiply:"mul ",Additive:"lddg",ColorBurn:"idiv",ColorDodge:"div ",Reflect:"lddg",Glow:"hMix",Overlay:"over",Difference:"diff",Negation:"smud",Lighten:"lite",Darken:"dark",Screen:"scrn",Xor:"smud"}[a5],dG=f.Kv();
dG.V9(a.name);dG.opacity=a.opacity;dG.tt(a.visible);dG.mf=i9;var ap=1<<16,bk=Math.ceil(hs*S/ap);dG.rect=new gv(0,0,hs,S);
dG.buffer=q.f(hs*S*4);var c2=dG.buffer;L+=5;for(var gg=0;gg<bk;gg++){var bH=X();c2.set(bH[1],bH[0]*ap*4)}for(var gw=0;
gw<c2.length;gw+=4){var gP=c2[gw+0];c2[gw+0]=c2[gw+2];c2[gw+2]=gP}f.t.push(dG)}}function X(){var D=Y.c(v,L);
L+=4;var f=Y.c(v,L);L+=4;var R=pako.inflateRaw(v.slice(L+10));L+=f;return[D,R]}return h}();function q(){}q.y8={};
q.a3r=function(){var n=[64,64,128,256,512,1024,2048],F=[];for(var e=0;e<n.length;e++){var O=n[e],I=document.createElement("canvas");
I.width=O;I.height=O;F.push(I.getContext("2d"))}return F}();q.A2=function(n,F){var O,I=q.a3r,e=1,x=Math.max(n,F);
while(e<I.length&&x>I[e].canvas.width)e++;if(e==I.length){O=I[0];var r=O.canvas;r.width=n;r.height=F}else{O=I[e];
O.clearRect(0,0,n,F)}return O};q.Fj=function(n,F,O){var I={},x=0,r=0,_=new Uint32Array(n.buffer),d=_.length,w=Date.now();
for(var Z=1;Z<O-1;Z++)for(var P=1;P<F-1;P++){var C=Z*F+P,W=_[C];if(W>>>24<230)r++;if(I[W]==null){I[W]=!0;
x++}}if(r!=0||x<20)return!1;return!0};q.GE=function(n,F,O,I,x,r){if(x==null)x=r=0;I=Math.log(I)/Math.log(2);
I=Math.round(I);for(var e=0;e<O;e++)for(var _=0;_<F;_++){var d=e*F+_<<2,w=q.cn(e+r,_+x,I);n[d]=n[d+1]=n[d+2]=w;
n[d+3]=255}};q.cn=function(e,n,F){return 255-((e>>>F)+(n>>>F)&1)*51};q.c7=function(n){var F=n.toString(16);
while(F.length<6)F="0"+F;return F};q.Dl=function(n){return parseInt(n,16)};q.wO=function(n){return.3*n.Q+.59*n.l+.11*n.O};
q.Il=function(n){return Math.max(n.Q,n.l,n.O)-Math.min(n.Q,n.l,n.O)};q.iB=function(n,F,O){return.3*n+.59*F+.11*O};
q.a7C=function(n,F,O){return Math.max(n,F,O)-Math.min(n,F,O)};q.h0=function(n,F){var O=F-n,I=Math.abs(O),x=O-1,r=O+1;
if(Math.abs(x)<I)O=x;else if(Math.abs(r)<I)O=r;return O};q.sK=function(n){return n<.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055};
q.amd=function(n){return n<.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)};q.aaa=function(n,F){var O=Math.min(n.length,F.length);
for(var e=0;e<O;e+=4){var I=n[e],x=n[e+1],r=n[e+2];F[e]=16+Math.floor(65.481/255*I+128.553/255*x+24.966/255*r+.5);
F[e+1]=128-Math.floor(37.797/255*I-74.203/255*x+112/255*r+.5);F[e+2]=128+Math.floor(112/255*I-93.786/255*x-18.214/255*r+.5);
F[e+3]=n[e+3]}};q.Px=function(n,F,O){var I=Math.max(n,F,O),x=Math.min(n,F,O),r=0,_=0,d=(I+x)*.5;if(I!=x){var w=I-x;
_=d>.5?w/(2-(I+x)):w/(I+x);switch(I){case n:r=(F-O)/w+(F<O?6:0);break;case F:r=(O-n)/w+2;break;case O:r=(n-F)/w+4;
break}r*=1/6}return{Sa:r,Ls:_,AU:d}};q.OQ=function(n,F,O){var I,x,r;if(F==0)I=x=r=O;else{var _=O<.5?O*(1+F):O+F-O*F,d=2*O-_;
I=q.Ir(d,_,n+1/3);x=q.Ir(d,_,n);r=q.Ir(d,_,n-1/3)}return{Q:I,l:x,O:r}};q.Ir=function(n,F,O){if(O<0)O+=1;
if(O>1)O-=1;if(O<1/6)return n+(F-n)*6*O;if(O<1/2)return F;if(O<2/3)return n+(F-n)*(2/3-O)*6;return n};
q.sy=function(n,F,O){var I=Math.max(n,F,O),x=Math.min(n,F,O),r,_,d=I,w=I-x;_=I==0?0:w/I;if(I==x)r=0;
else{switch(I){case n:r=(F-O)/w+(F<O?6:0);break;case F:r=(O-n)/w+2;break;case O:r=(n-F)/w+4;break}r*=1/6}return{Sa:r,Ls:_,K_:d}};
q.xN=function(n,F,O){var I,x,r,e,_,d,w,Z;e=Math.floor(n*6);_=n*6-e;d=O*(1-F);w=O*(1-_*F);Z=O*(1-(1-_)*F);
switch(e%6){case 0:I=O,x=Z,r=d;break;case 1:I=w,x=O,r=d;break;case 2:I=d,x=O,r=Z;break;case 3:I=d,x=w,r=O;
break;case 4:I=Z,x=d,r=O;break;case 5:I=O,x=d,r=w;break}return{Q:I,l:x,O:r}};q.iK=function(){var n=[],F=[];
for(var e=0;e<2e3;e++){var O=e/1e3;n[e]=q.amd(O);F[e]=O>.008856?Math.pow(O,1/3):(903.3*O+16)*(1/116)}return[n,F]}();
q.Kj=function(n,F,O){var I=q.iK[0],x=q.iK[1];n=I[~~(n*(1e3/255))];F=I[~~(F*(1e3/255))];O=I[~~(O*(1e3/255))];
var r=q.e$.a0a,_=r[0]*n+r[1]*F+r[2]*O,d=r[4]*n+r[5]*F+r[6]*O,w=r[8]*n+r[9]*F+r[10]*O;_=_*(100/96.72);
d=d*(100/100);w=w*(100/81.427);return q.cV(_,d,w)};q.cV=function(n,F,O){var I=q.iK[1],x=I[~~(n*1e3)],r=I[~~(F*1e3)],_=I[~~(O*1e3)];
return{LG:116*r-16,R:500*(x-r),O:200*(r-_)}};q.TK=function(n,F,O){var I=903.3,x=.008856,r=(n+16)/116,_=r*r*r,d=r-O/200,w=d*d*d,Z=F/500+r,P=Z*Z*Z,C=w>x?w:(116*d-16)/I,W=_>x?_:(116*r-16)/I,v=P>x?P:(116*Z-16)/I,L=v*96.72,H=W*100,y=C*81.427,g=q.e$.Rv(q.e$.hI,[L/100,H/100,y/100,0]);
for(var e=0;e<4;e++)g[e]=Math.max(0,Math.min(255,q.sK(g[e])*255));return{Q:g[0],l:g[1],O:g[2]}};q.FG=function(n,F,O,I,x){var r=n.LG,_=n.R,d=n.O,w=(r<F.LG?F.LG-r:O.LG<r?O.LG-r:0)*(1/100),Z=(_<F.R?F.R-_:O.R<_?O.R-_:0)*(1/116),P=(d<F.O?F.O-d:O.O<d?O.O-d:0)*(1/116),C=Math.sqrt(w*w+Z*Z+P*P)*1.35;
return C<=I?Math.min(1,1.17*(1-C*x)):0};q.L2=function(n,F,O){var I=n.length,x=.3,r=.59,_=.11;if(O){x=O[0];
r=O[1];_=O[2]}for(var e=0;e<I;e+=4)F[e>>2]=~~(n[e+0]*x+n[e+1]*r+n[e+2]*_+.5)};q.GN=function(n,F){var O=F.length;
for(var e=0;e<O;e+=4){var I=n[e>>>2];F[e]=I;F[e+1]=I;F[e+2]=I}};q.Eb=function(n,F){var O=n.R,I=n.Q,x=n.l,r=n.O,_=Math.min(n.R.length,F.buffer.byteLength>>>2),d=4*Math.floor(_/4),w=new Uint32Array(F.buffer),Z=new Uint32Array(O.buffer),P=new Uint32Array(I.buffer),C=new Uint32Array(x.buffer),W=new Uint32Array(r.buffer);
for(var e=0;e<d;e+=4){var v=Z[e>>2],L=W[e>>2],H=C[e>>2],y=P[e>>2];w[e]=v<<24|(L&255)<<16|(H&255)<<8|y&255;
w[e+1]=(v&65280)<<16|(L&65280)<<8|H&65280|(y&65280)>>>8;w[e+2]=(v&16711680)<<8|L&16711680|(H&16711680)>>>8|(y&16711680)>>>16;
w[e+3]=v&4278190080|(L&4278190080)>>>8|(H&4278190080)>>>16|(y&4278190080)>>>24}for(var e=d;e<_;e++)w[e]=O[e]<<24|r[e]<<16|x[e]<<8|I[e]};
q.WU=function(n,F){var O=F.R,I=F.Q,x=F.l,r=F.O,_=Math.min(F.R.length,n.buffer.byteLength>>>2),d=4*Math.floor(_/4),w=new Uint32Array(n.buffer),Z=new Uint32Array(O.buffer),P=new Uint32Array(I.buffer),C=new Uint32Array(x.buffer),W=new Uint32Array(r.buffer);
for(var e=0;e<d;e+=4){var v=w[e],L=w[e+1],H=w[e+2],y=w[e+3];P[e>>2]=v&255|(L&255)<<8|(H&255)<<16|y<<24;
C[e>>2]=(v&65280)>>8|L&65280|(H&65280)<<8|(y&65280)<<16;W[e>>2]=(v&16711680)>>16|(L&16711680)>>8|H&16711680|(y&16711680)<<8;
Z[e>>2]=v>>>24|L>>>24<<8|H>>>24<<16|y&4278190080}for(var e=d;e<_;e++){var g=w[e];I[e]=g>>0&255;x[e]=g>>8&255;
r[e]=g>>16&255;O[e]=g>>24&255}};q.xg=function(n,F,O){var I=new Uint8Array(n.buffer),x=Math.min(I.length/4,F.length);
for(var e=0;e<x;e++){F[e]=I[(e<<2)+O]}};q.GF=function(n,F,O){var I=new Uint8Array(F.buffer),x=new Uint32Array(n.buffer),r=Math.min(I.length/4,n.length),e=0;
while(e+4<r){var _=x[e>>>2];I[(e<<2)+O]=_&255;I[(e<<2)+O+4]=_>>>8&255;I[(e<<2)+O+8]=_>>>16&255;I[(e<<2)+O+12]=_>>>24;
e+=4}while(e<r){I[(e<<2)+O]=n[e];e++}};q.IW=function(n,F,O){if(O==null)O=0;var I=new Uint32Array(n.buffer),x=I.length;
for(var e=0;e<x;e++)I[e]=I[e]&O|F};q.a4i=function(n,F,O,I,x){if(x==null)x=0;var r=new Uint32Array(n.buffer);
O=O.lN(F);var _=O.x-F.x,d=O.y-F.y,w=O.d,Z=O.v,P=F.d;for(var C=0;C<Z;C++){var e=(d+C)*P+_;for(var W=0;
W<w;W++){r[e]=r[e]&x|I;e++}}};q.Ct=function(n,F){var O=Math.min(n.buffer.byteLength,F.buffer.byteLength),I=O>>>2,n=new Uint32Array(n.buffer,0,I),F=new Uint32Array(F.buffer,0,I);
F.set(n)};q.Qq=function(n,F){var O=n.buffer.byteLength,I=F.buffer.byteLength,x=new Uint32Array(n.buffer,0,O>>2),r=new Uint32Array(F.buffer,0,I>>2);
if(O!=I)return!1;var _=x.length;for(var e=0;e<_;e++)if(r[e]!=x[e])return!1;return!0};q.uZ=function(n){var F=new Uint32Array(n.buffer),O=F.length;
for(var e=0;e<O;e++)F[e]=~F[e]};q.a0J=function(n){var F=n.length;for(var e=0;e<F;e+=4){n[e]=~n[e];n[e+1]=~n[e+1];
n[e+2]=~n[e+2]}};q.an3=function(n){var F=n.length;for(var e=3;e<F;e+=4)n[e]=~n[e]};q.aja=function(n){return n+(n%4==0?0:4-n%4)};
q.f=function(n,F){if(F==null)F=!1;if(!F)n=q.aja(n);try{var O=new Uint8Array(n)}catch(hl){alert("Not enough RAM! (need "+Math.round(n/(1<<20))+" MB)",7e3);
throw"low_ram"}return O};q.zZ=function(n){var F=n.length,O=n[F-2],I=n[F-1];while(I.d>=2&&I.v>=2){var x=q.to(O,I);
n.push(x.zc,x.rect);O=x.zc;I=x.rect}};q.Sc=function(n){var F=n.length,O=n[F-2],I=n[F-1];while(I.d>=2&&I.v>=2){var x=q.pW(O,I);
n.push(x.zc,x.rect);O=x.zc;I=x.rect}};q.to=function(n,F,O){var I=F.d,x=F.v,r=I>>1,_=x>>1,d=new gv(F.x,F.y,r,_),w=O&&O.length==r*_*4?O:q.f(r*_*4),Z=new Uint32Array(n.buffer),P=new Uint32Array(w.buffer);
for(var C=0;C<_;C++)for(var W=0;W<r;W++){var v=C*r+W,L=(C<<1)*I+(W<<1),H=Z[L],y=Z[L+1],g=Z[L+I],Q=Z[L+I+1],J=H>>>24,A=y>>>24,p=g>>>24,U=Q>>>24,j=J+A+p+U;
if(j==1020){var b=(H>>>0&255)+(y>>>0&255)+(g>>>0&255)+(Q>>>0&255)+2>>>2,s=(H>>>8&255)+(y>>>8&255)+(g>>>8&255)+(Q>>>8&255)+2>>>2,G=(H>>>16&255)+(y>>>16&255)+(g>>>16&255)+(Q>>>16&255)+2>>>2;
P[v]=255<<24|G<<16|s<<8|b}else if(j==0)P[v]=0;else{var b=(H>>>0&255)*J+(y>>>0&255)*A+(g>>>0&255)*p+(Q>>>0&255)*U,s=(H>>>8&255)*J+(y>>>8&255)*A+(g>>>8&255)*p+(Q>>>8&255)*U,G=(H>>>16&255)*J+(y>>>16&255)*A+(g>>>16&255)*p+(Q>>>16&255)*U,T=1/j;
b=~~(b*T+.5);s=~~(s*T+.5);G=~~(G*T+.5);P[v]=j+2>>>2<<24|G<<16|s<<8|b}}return{rect:d,zc:w}};q.B5=function(n,F,O){var I=F.d,x=F.v,r=I>>1,_=x>>1,d=new gv(F.x,F.y,r,_),w=O&&O.length==r*_*4?O:q.f(r*_*4),Z=new Uint32Array(n.buffer),P=new Uint32Array(w.buffer);
for(var C=0;C<_;C++)for(var W=0;W<r;W++){var v=C*r+W,L=(C<<1)*I+(W<<1),H=Z[L],y=Z[L+1],g=Z[L+I],Q=Z[L+I+1],J=2+(H>>>0&255)+(y>>>0&255)+(g>>>0&255)+(Q>>>0&255)>>>2,A=2+(H>>>8&255)+(y>>>8&255)+(g>>>8&255)+(Q>>>8&255)>>>2,p=2+(H>>>16&255)+(y>>>16&255)+(g>>>16&255)+(Q>>>16&255)>>>2,U=2+(H>>>24&255)+(y>>>24&255)+(g>>>24&255)+(Q>>>24&255)>>>2;
P[v]=U<<24|p<<16|A<<8|J}return{rect:d,zc:w}};q.a88=function(n,F,O){var I=F.d,x=F.v,r=2*Math.floor(I/3),_=2*Math.floor(x/3),d=new gv(F.x,F.y,r,_),w=O&&O.length==r*_*4?O:q.f(r*_*4),Z=new Uint32Array(n.buffer),P=new Uint32Array(w.buffer);
for(var C=0;C<_;C+=2)for(var W=0;W<r;W+=2){var v=C*r+W,L=(C*3>>>1)*I+(W*3>>>1),H=Z[L],y=Z[L+1],g=Z[L+2],Q=Z[L+I],J=Z[L+1+I],A=Z[L+2+I],p=Z[L+I+I],U=Z[L+1+I+I],j=Z[L+2+I+I],b=H>>>24<<2,s=(H>>>16&255)*b,G=(H>>>8&255)*b,T=(H&255)*b,z=y>>>24<<1,m=(y>>>16&255)*z,$=(y>>>8&255)*z,o=(y&255)*z,h=g>>>24<<2,X=(g>>>16&255)*h,D=(g>>>8&255)*h,f=(g&255)*h,R=Q>>>24<<1,i=(Q>>>16&255)*R,t=(Q>>>8&255)*R,N=(Q&255)*R,M=J>>>24,hK=(J>>>16&255)*M,bD=(J>>>8&255)*M,co=(J&255)*M,iM=A>>>24<<1,hs=(A>>>16&255)*iM,S=(A>>>8&255)*iM,a=(A&255)*iM,bV=p>>>24<<2,a5=(p>>>16&255)*bV,i9=(p>>>8&255)*bV,dG=(p&255)*bV,ap=U>>>24<<1,bk=(U>>>16&255)*ap,c2=(U>>>8&255)*ap,gg=(U&255)*ap,bH=j>>>24<<2,gw=(j>>>16&255)*bH,gP=(j>>>8&255)*bH,dT=(j&255)*bH,fU=b+z+R+M,dV=h+z+iM+M,ac=bV+ap+R+M,e2=bH+ap+iM+M,cX=fU==0?0:1/fU,eR=dV==0?0:1/dV,gR=ac==0?0:1/ac,bN=e2==0?0:1/e2,eG=0,ef=0,fi=0,ep=0;
eG=~~(.5+(T+o+N+co)*cX);ef=~~(.5+(G+$+t+bD)*cX);fi=~~(.5+(s+m+i+hK)*cX);ep=~~(.5+fU*(1/9));P[v]=ep<<24|fi<<16|ef<<8|eG;
eG=~~(.5+(f+o+a+co)*eR);ef=~~(.5+(D+$+S+bD)*eR);fi=~~(.5+(X+m+hs+hK)*eR);ep=~~(.5+dV*(1/9));P[v+1]=ep<<24|fi<<16|ef<<8|eG;
eG=~~(.5+(dG+gg+N+co)*gR);ef=~~(.5+(i9+c2+t+bD)*gR);fi=~~(.5+(a5+bk+i+hK)*gR);ep=~~(.5+ac*(1/9));P[v+r]=ep<<24|fi<<16|ef<<8|eG;
eG=~~(.5+(dT+gg+a+co)*bN);ef=~~(.5+(gP+c2+S+bD)*bN);fi=~~(.5+(gw+bk+hs+hK)*bN);ep=~~(.5+e2*(1/9));P[v+r+1]=ep<<24|fi<<16|ef<<8|eG}return{rect:d,zc:w}};
q.a0z=function(n,F,O){var I=F.d,x=F.v,r=2*Math.floor(I/3),_=2*Math.floor(x/3),d=new gv(F.x,F.y,r,_),w=O&&O.length==r*_*4?O:q.f(r*_*4),Z=new Uint32Array(n.buffer),P=new Uint32Array(w.buffer);
for(var C=0;C<_;C+=2)for(var W=0;W<r;W+=2){var v=C*r+W,L=(C*3>>>1)*I+(W*3>>>1),H=Z[L],y=Z[L+1],g=Z[L+2],Q=Z[L+I],J=Z[L+1+I],A=Z[L+2+I],p=Z[L+I+I],U=Z[L+1+I+I],j=Z[L+2+I+I],b=(H>>>16&255)<<2,s=(H>>>8&255)<<2,G=(H&255)<<2,T=(y>>>16&255)<<1,z=(y>>>8&255)<<1,m=(y&255)<<1,$=(g>>>16&255)<<2,o=(g>>>8&255)<<2,h=(g&255)<<2,X=(Q>>>16&255)<<1,D=(Q>>>8&255)<<1,f=(Q&255)<<1,R=J>>>16&255,i=J>>>8&255,t=J&255,N=(A>>>16&255)<<1,M=(A>>>8&255)<<1,hK=(A&255)<<1,bD=(p>>>16&255)<<2,co=(p>>>8&255)<<2,iM=(p&255)<<2,hs=(U>>>16&255)<<1,S=(U>>>8&255)<<1,a=(U&255)<<1,bV=(j>>>16&255)<<2,a5=(j>>>8&255)<<2,i9=(j&255)<<2,dG=0,ap=0,bk=0;
dG=~~(.5+(G+m+f+t)*(1/9));ap=~~(.5+(s+z+D+i)*(1/9));bk=~~(.5+(b+T+X+R)*(1/9));P[v]=255<<24|bk<<16|ap<<8|dG;
dG=~~(.5+(h+m+hK+t)*(1/9));ap=~~(.5+(o+z+M+i)*(1/9));bk=~~(.5+($+T+N+R)*(1/9));P[v+1]=255<<24|bk<<16|ap<<8|dG;
dG=~~(.5+(iM+a+f+t)*(1/9));ap=~~(.5+(co+S+D+i)*(1/9));bk=~~(.5+(bD+hs+X+R)*(1/9));P[v+r]=255<<24|bk<<16|ap<<8|dG;
dG=~~(.5+(i9+a+hK+t)*(1/9));ap=~~(.5+(a5+S+M+i)*(1/9));bk=~~(.5+(bV+hs+N+R)*(1/9));P[v+r+1]=255<<24|bk<<16|ap<<8|dG}return{rect:d,zc:w}};
q.Dd=function(n){var F=255,O=n.length;O-=O&31;for(var e=3;e<O;e+=32)F=F&n[e]&n[e+4]&n[e+8]&n[e+12]&n[e+16]&n[e+20]&n[e+24]&n[e+28];
return F!=255};q.a0X=function(n,F,O,I){var x=q.to,r=q.a88,d=0;if(!q.Dd(n)){x=q.B5;r=q.a0z}var _={zc:n,rect:F},w=O;
while(w<.499){d++;w*=2}for(var e=0;e<d;e++)_=x(_.zc,_.rect,I);if(w<.5001)_=x(_.zc,_.rect,I);else _=r(_.zc,_.rect,I);
return _};q.af3=function(n,F,O,I){var x=q.pW,r=q.gs,_={zc:n,rect:F},d=0,w=O;while(w<.499){d++;w*=2}for(var e=0;
e<d;e++)_=x(_.zc,_.rect,I);if(w<.5001)_=x(_.zc,_.rect,I);else _=r(_.zc,_.rect,I);return _};q.pW=function(n,F,O){var I=F.d,x=F.v,r=I>>1,_=x>>1,d=new gv(F.x,F.y,r,_);
if(n==null)return{rect:d};var w=O&&O.length>=r*_?O:q.f(r*_);for(var Z=0;Z<_;Z++){var P=Z*r;for(var C=0;
C<r;C++){var W=(Z<<1)*I+(C<<1);w[P+C]=2+n[W]+n[W+1]+n[W+I]+n[W+I+1]>>>2}}return{rect:d,zc:w}};q.gs=function(n,F,O){var I=F.d,x=F.v,r=2*Math.floor(I/3),_=2*Math.floor(x/3),d=new gv(F.x,F.y,r,_);
if(n==null)return{rect:d};var w=O&&O.length>=r*_?O:q.f(r*_);for(var Z=0;Z<_;Z+=2)for(var P=0;P<r;P+=2){var C=Z*r+P,W=(Z*3>>>1)*I+(P*3>>>1),v=n[W]<<2,L=n[W+1]<<1,H=n[W+2]<<2,y=n[W+I]<<1,g=n[W+1+I],Q=n[W+2+I]<<1,J=n[W+I+I]<<2,A=n[W+1+I+I]<<1,p=n[W+2+I+I]<<2;
w[C]=~~(.5+(v+L+y+g)*(1/9));w[C+1]=~~(.5+(H+L+Q+g)*(1/9));w[C+r]=~~(.5+(J+A+y+g)*(1/9));w[C+r+1]=~~(.5+(p+A+Q+g)*(1/9))}return{rect:d,zc:w}};
q.k9=function(n,F,O,I,x){var r=F.lN(I);if(x)r=r.lN(x);var _=Math.max(0,r.x-F.x),d=Math.max(0,r.x-I.x),w=Math.max(0,r.y-F.y),Z=Math.max(0,r.y-I.y),P=r.d,C=r.v;
for(var e=0;e<C;e++){var W=(w+e)*F.d+_,v=(Z+e)*I.d+d;for(var L=0;L<P;L++){O[v+L]=n[W+L]}}};q.ei=function(n,F,O,I){if(F.Qq(I)){q.GF(n,O,3);
return}var x=F.lN(I),r=Math.max(0,x.x-F.x),_=Math.max(0,x.x-I.x),d=Math.max(0,x.y-F.y),w=Math.max(0,x.y-I.y),Z=x.d,P=x.v;
for(var e=0;e<P;e++){var C=(d+e)*F.d+r,W=(w+e)*I.d+_;for(var v=0;v<Z;v++)O[(W+v<<2)+3]=n[C+v]}};q.xv=function(n,F,O,I){var x=F.lN(I),r=Math.max(0,x.x-F.x),_=Math.max(0,x.x-I.x),d=Math.max(0,x.y-F.y),w=Math.max(0,x.y-I.y),Z=x.d,P=x.v;
for(var e=0;e<P;e++){var C=(d+e)*F.d+r,W=(w+e)*I.d+_;for(var v=0;v<Z;v++)O[W+v]=n[(C+v<<2)+3]}};q.nF=function(n,F,O,I,x){if(F.Qq(I)&&(x==null||x.Qq(I))){q.Ct(n,O);
return}n=new Uint32Array(n.buffer),O=new Uint32Array(O.buffer);var r=F.lN(I);if(x)r=r.lN(x);var _=Math.max(0,r.x-F.x),d=Math.max(0,r.x-I.x),w=Math.max(0,r.y-F.y),Z=Math.max(0,r.y-I.y),P=r.d,C=r.v,W=P&3,v=W==0?P:P-W;
for(var e=0;e<C;e++){var L=(w+e)*F.d+_,H=(Z+e)*I.d+d;O.set(new Uint32Array(n.buffer,L*4,P),H)}};q.U0=function(n,F,O,I){var x=F.lN(I),r=Math.max(0,x.x-F.x),_=Math.max(0,x.x-I.x),d=Math.max(0,x.y-F.y),w=Math.max(0,x.y-I.y),Z=x.d,P=x.v,C=n.R,W=n.Q,v=n.l,L=n.O,H=O.R,y=O.Q,g=O.l,Q=O.O;
for(var e=0;e<P;e++){var J=(d+e)*F.d+r,A=(w+e)*I.d+_;for(var p=0;p<Z;p++){H[A+p]=C[J+p];y[A+p]=W[J+p];
g[A+p]=v[J+p];Q[A+p]=L[J+p]}}};q.VE=function(n){var F=n.length;for(var e=0;e<F;e+=4){var O=n[e+3];if(O==255)continue;
n[e]=~~(n[e]*O*(1/255)+.5);n[e+1]=~~(n[e+1]*O*(1/255)+.5);n[e+2]=~~(n[e+2]*O*(1/255)+.5)}};q.xR=function(n){var F=n.length;
for(var e=0;e<F;e+=4){var O=n[e+3];if(O==0||O==255)continue;var I=255/O;n[e]=~~(n[e]*I+.5);n[e+1]=~~(n[e+1]*I+.5);
n[e+2]=~~(n[e+2]*I+.5)}};q.gZ=function(n,F){for(var e=0;e<n.length;e++)if(n[e]!=F)return!1;return!0};
q.bX=function(n){return n+1+(n>>>8)>>>8};q.round=function(n,F){if(F==null)F=128;var O=n.length;for(var e=0;
e<O;e++)n[e]=n[e]<F?0:255};q.Ny=function(n,F){var O=n.length;for(var e=0;e<O;e++)n[e]=Math.round(n[e]*F)};
q.yr=function(n,F){var O=new Uint32Array(n.buffer),I=new Uint32Array(F.buffer),x=O.length;for(var e=0;
e<x;e++){var r=O[e],_=I[e];I[e]=q.bX((r>>>24)*(_>>>24))<<24|q.bX((r>>>16&255)*(_>>>16&255))<<16|q.bX((r>>>8&255)*(_>>>8&255))<<8|q.bX((r&255)*(_&255))}};
q.DM=function(n,F){var O=n.length;for(var e=0;e<O;e++)F[(e<<2)+3]=q.bX(F[(e<<2)+3]*n[e])};q.afC=function(n,F,O,I){var x=Math.max(0,I.x-F.x),r=Math.max(0,F.x-I.x),_=Math.max(0,I.y-F.y),d=Math.max(0,F.y-I.y),w=Math.min(F.x+F.d,I.x+I.d)-Math.max(F.x,I.x),Z=Math.min(F.y+F.v,I.y+I.v)-Math.max(F.y,I.y);
for(var e=0;e<Z;e++){var P=(_+e)*F.d+x,C=(d+e)*I.d+r;for(var W=0;W<w;W++){O[C]=q.bX(O[C]*n[P]);P++;C++}}};
q.oh=function(n,F,O,I){var x=Math.max(0,I.x-F.x),r=Math.max(0,F.x-I.x),_=Math.max(0,I.y-F.y),d=Math.max(0,F.y-I.y),w=Math.min(F.x+F.d,I.x+I.d)-Math.max(F.x,I.x),Z=Math.min(F.y+F.v,I.y+I.v)-Math.max(F.y,I.y);
for(var e=0;e<Z;e++){var P=(_+e)*F.d+x,C=((d+e)*I.d+r<<2)+3;for(var W=0;W<w;W++){O[C]=q.bX(O[C]*n[P]);
P++;C+=4}}};q.qw=function(n,F,O,I){var x=Math.max(0,I.x-F.x),r=Math.max(0,F.x-I.x),_=Math.max(0,I.y-F.y),d=Math.max(0,F.y-I.y),w=Math.min(F.x+F.d,I.x+I.d)-Math.max(F.x,I.x),Z=Math.min(F.y+F.v,I.y+I.v)-Math.max(F.y,I.y);
for(var e=0;e<Z;e++){var P=((_+e)*F.d+x<<2)+3,C=((d+e)*I.d+r<<2)+3;for(var W=0;W<w;W++){O[C]=q.bX(O[C]*n[P]);
P+=4;C+=4}}};q.oN=function(n){var F=new Float64Array(256),O=new Float64Array(256),I=new Float64Array(256),x=new Float64Array(256),r=n.length,_=0;
for(var e=0;e<r;e+=4){var d=n[e+3],w=d*(1/255);O[n[e+0]]+=w;I[n[e+1]]+=w;x[n[e+2]]+=w;_+=d}for(var e=0;
e<256;e++)F[e]=O[e]+I[e]+x[e];return[F,O,I,x,r>>>2,_/255]};q.mr=function(n,F){var O=new Uint32Array(n.buffer),I=O.length;
for(var e=0;e<I;e++){var x=O[e],r=x&255,_=x>>8&255,d=x>>16&255,w=x>>24&255;O[e]=F[r]|F[_]<<8|F[d]<<16|F[w]<<24}};
q.a5X=function(n,F,O,I,x,r,_){var d=new Uint32Array(n.buffer),w=new Uint32Array(F.buffer),Z=d.length,P=0;
while(256<<P<O.length)P++;if(!_&&!r){for(var e=0;e!=Z;e++){var C=d[e],W=(C&255)<<P,v=(C>>>8&255)<<P,L=(C>>>16&255)<<P,H=O[W],y=I[v],g=x[L];
w[e]=H|y<<8|g<<16|C&4278190080}return}for(var e=0;e<Z;e++){var C=d[e],W=(C&255)<<P,v=(C>>>8&255)<<P,L=(C>>>16&255)<<P;
if(r)W=v=L=Math.round(W*.3+v*.59+L*.11);var H=O[W],y=I[v],g=x[L];if(_){var Q=q.iB(W,v,L),J=q.iB(H,y,g);
if(Q>J){var A=(Q-J)/(255-J);H+=A*(255-H);y+=A*(255-y);g+=A*(255-g)}else if(J==0)H=y=g=0;else{var A=Q/J;
H=A*H;y=A*y;g=A*g}}w[e]=H|y<<8|g<<16|C&4278190080}};q.$o=function(n,F){var O=F.d,I=F.v,top=0,x=0,r=0,_=0,d=0;
d=0;for(var w=0;w<I;w++){var Z=w*O;for(var e=0;e<O;e++)d|=n[Z+e];if(d!=0)break;top++}if(top==I)return new gv(0,0,0,0);
d=0;for(var w=I-1;w>=0;w--){var Z=w*O;for(var e=0;e<O;e++)d|=n[Z+e];if(d!=0)break;r++}var P=I-r;d=0;
for(var e=0;e<O;e++){for(var w=top;w<P;w++)d|=n[w*O+e];if(d!=0)break;x++}d=0;for(var e=O-1;e>=0;e--){for(var w=top;
w<P;w++)d|=n[w*O+e];if(d!=0)break;_++}var C=new gv(F.x+x,F.y+top,O-x-_,I-top-r);return C};q.Ww=function(n,F,O,I){if(I==null)I=[!0,!0,!0,!0];
if(O==null)O=0;var x=new Uint32Array(n.buffer),r=F.d,_=F.v,top=0,d=0,w=0,Z=0,P=!1,C=[x[0],x[x.length-1],0][O];
P=!1;if(I[0])for(var W=0;W<_;W++){var v=W*r;for(var e=0;e<r;e++)if(x[v+e]!=C)P=!0;if(P)break;top++}P=!1;
if(I[2])for(var W=_-1;W>=0;W--){var v=W*r;for(var e=0;e<r;e++)if(x[v+e]!=C)P=!0;if(P)break;w++}P=!1;
if(I[1])for(var e=0;e<r;e++){for(var W=0;W<_;W++)if(x[W*r+e]!=C)P=!0;if(P)break;d++}P=!1;if(I[3])for(var e=r-1;
e>=0;e--){for(var W=0;W<_;W++)if(x[W*r+e]!=C)P=!0;if(P)break;Z++}var L=new gv(F.x+d,F.y+top,r-d-Z,_-top-w);
return L.D2()?new gv(0,0,0,0):L};q.t7=function(n){var F=q.$o(n.channel,n.rect);if(F.Qq(n.rect))return;
var O=q.f(F.X());q.k9(n.channel,n.rect,O,F);n.channel=O;n.rect=F};q.dB=function(n){var F=q.f(n.buffer.length>>2);
q.xg(n.buffer,F,3);var O=q.$o(F,n.rect);if(O.Qq(n.rect))return;var I=new q.f(O.X()*4);q.nF(n.buffer,n.rect,I,O);
n.buffer=I;n.rect=O};q.extend=function(n,F,O){if(n.rect.zp(F))return;var I=n.rect.Tq(F),x=q.f(I.X());
if(O!=null)x.fill(O);q.k9(n.channel,n.rect,x,I);n.rect=I;n.channel=x};q.aeD=function(n,F){if(F.D2()||n.rect.zp(F))return;
var O=n.rect.Tq(F),I=q.f(O.X()*4);q.nF(n.buffer,n.rect,I,O);n.rect=O;n.buffer=I};q.q9=function(n,F,O){if(!O.JX(n))return!1;
var I=Math.floor(n.x)-O.x,x=Math.floor(n.y)-O.y,e=x*O.d+I;return F[e]>128};q.acV=function(n,F,O){if(!O.JX(n))return!1;
var I=Math.floor(n.x)-O.x,x=Math.floor(n.y)-O.y,e=x*O.d+I;return F[4*e+3]>128};q.cO=function(n){if(q.us.length<n){q.us=q.f(n);
q.us.fill(255)}return q.us};q.us=q.f(0);q.CZ=function(n){if(q.lM.length<n)q.lM=q.f(n);return q.lM};q.lM=q.f(0);
q.zF=function(n){this.R=q.f(n);this.Q=q.f(n);this.l=q.f(n);this.O=q.f(n)};q.zF.prototype.clone=function(){var n=this.R.length,F=new q.zF(1);
F.R=this.R.slice(0);F.Q=this.Q.slice(0);F.l=this.l.slice(0);F.O=this.O.slice(0);return F};q.y8.cU=function(){function n(Q,J){return Q[J]+Q[J+1]+Q[J+2]+Q[J+3]}function F(Q,J){return Q[J]+Q[J+1]+Q[J+2]+2*Q[J+3]}function O(Q,J,A,p){Q[J]=A[p];
Q[J+1]=A[p+1];Q[J+2]=A[p+2];Q[J+3]=A[p+3]}function I(Q,J,A){Q[J]=Q[A];Q[J+1]=Q[A+1];Q[J+2]=Q[A+2];Q[J+3]=Q[A+3]}function x(Q,J,A){Q[A]=J[A];
Q[A+1]=J[A+1];Q[A+2]=J[A+2];Q[A+3]=255-J[A+3]}function r(Q){for(var e=0,J=Q.length;e<J;e+=4){Q[e+3]=255-Q[e+3]}}function _(){var Q=Math.random();
if(Q>.5)return 0;if(Q>.25)return 1;if(Q>.1)return 2;if(Q>.02143)return 3;if(Q>.00445)return 4;if(Q>65e-5)return 5;
if(Q>415e-6)return 6;if(Q>55e-6)return 7;return 8}function d(Q,J,A,p,U,j){Q[J]=A[p]+(U[j]-A[p]>>1);Q[J+1]=A[p+1]+(U[j+1]-A[p+1]>>1);
Q[J+2]=A[p+2]+(U[j+2]-A[p+2]>>1);Q[J+3]=A[p+3]+(U[j+3]-A[p+3]>>1)}function w(Q,J,A,p,U,j){Q[J]=U[j]+A[p]>>1;
Q[J+1]=U[j+1]+A[p+1]>>1;Q[J+2]=U[j+2]+A[p+2]>>1;Q[J+3]=U[j+3]+A[p+3]>>1}function Z(Q,J,A,p,U,j,b,s,G){var T=0,z=0,m=0,e,$=U[j],o;
d(s,0,Q,J,Q,A);for(e=0;e<$;e++){d(s,(e+1)*4,s,e*4,Q,A)}z=($+1)*4;m+=$;j--;O(Q,J,s,z-4);p[j]=n(Q,J);J-=G;
while(j>0&&p[j-1]<p[j]){o=s;s=b;b=o;T=z;w(s,0,Q,J-G,b,0);for(e=4;e<T;e+=4){w(s,e,s,e-4,b,e)}$=U[j];for(e=m;
e<$;e++){d(s,z,s,z-4,b,T-4);z+=4;m++}j--;O(Q,J,s,z-4);p[j]=n(Q,J);J-=G}}function P(Q,J,A,p,U){var j=J*4,b=0,s,G,T=new Uint8Array(J+1),z=new Uint8Array(10*4),m=new Uint8Array(10*4);
for(var e=0;e<A;e++){x(p,Q,b);U[0]=n(p,b);T[0]=_();s=b;b+=4;for(var $=1;$<J;$++){x(p,Q,b);U[$]=n(p,b);
G=_();T[$]=G;if(U[$-1]<U[$]&&G>0){Z(p,b-4,b,U,T,$,z,m,4)}b+=4}U[J]=U[0];T[J]=T[0];if(U[J-1]<U[J]&&G>0){Z(p,b,s,U,T,J,z,m,4)}}r(p)}function C(){var Q=Math.random();
if(Q>.659755)return 0;if(Q>.1625)return 10;if(Q>.06)return 20;if(Q>.01)return 30;if(Q>.0035)return 40;
if(Q>65e-5)return 50;if(Q>415e-6)return 60;if(Q>55e-6)return 70;return 80}function W(Q,J,A,p,U,j){var b=C()+1,s=p[U];
for(var e=1;e<b;e++){if(0>U)break;if(p[U-e]<s){I(Q,J,A)}else{break}J+=j}}function v(Q,J,A,p,U){var j=J*4,b=0;
for(var e=0;e<A;e++){x(p,Q,b);U[0]=n(p,b);b+=4;for(var s=1;s<J;s++){x(p,Q,b);U[s]=n(Q,b);if(U[s-1]<U[s]){W(p,b-4,b,U,s,-4)}b+=4}U[J]=U[0];
if(U[s-1]<U[s]){W(p,b-4,b-j,U,s,-4)}}r(p)}function L(Q,J,A,p,U,j){var b=1,s,G,T=new Uint8Array(4),z,m=J;
while(Math.random()<1/b){m=J;if(p<=1)break;s=A[p];G=A[p-1];if(s<=G)break;O(T,0,Q,m-j);z=!0;for(var e=p;
e<U;e++){if(G>A[e]){O(Q,m-j,T,0);A[e-1]=G;z=!1;break}O(Q,m-j,Q,m);A[e-1]=A[e];m+=j}if(z){O(Q,m-j,T,0);
A[U-1]=G}b++;p--;J-=j}}function H(Q,J,A,p,U){var j=0,b=0,s=J*4;for(var e=0;e<A;e++){b=j;for(var G=0;
G<J;G++){x(p,Q,j);U[G]=F(p,j);j+=4}j=b;for(var G=1;G<J;G++){if(U[G-1]<U[G]&&Math.random()<.66){L(p,j+4,U,G,J,4)}j+=4}j+=4}r(p)}function y(Q,J,A,p,U){var j=U[0],b=U[1],s=new Uint16Array(J+1),G=Q,T=p,z;
if(b){z=p.slice(0);g(Q,p,J,A);G=p;T=z}if(j==0)P(G,J,A,T,s);else if(j==1)v(G,J,A,T,s);else if(j==2)H(G,J,A,T,s);
if(b){g(z,p,J,A)}}function g(Q,J,A,p){for(var U=0;U<p;U++)for(var j=0;j<A;j++){var b=U*A+j<<2,s=U*A+(A-1-j)<<2;
J[s]=Q[b];J[s+1]=Q[b+1];J[s+2]=Q[b+2];J[s+3]=Q[b+3]}}return y}();q.y8.am4=function(){function n(F,O,I,x){var r=new Uint8Array(F.length),_=new Uint8Array(F.length>>>2),d=new Uint8Array(F.length>>>2);
q.aF.u3(F,r,O,I,q.aF.vy[2],0,!0);for(var e=0;e<F.length;e+=4){var w=r[e+0]*.3+r[e+1]*.59+r[e+2]*.11;
_[e>>>2]=w;x[e+0]=F[e+0];x[e+1]=F[e+1];x[e+2]=F[e+2];x[e+3]=F[e+3]}q.aF.B3(_,d,O,I);for(var e=0;e<F.length;
e+=4){r[e+3]=~~(Math.max(0,255-d[e>>>2]-50)*(255/205))}for(var e=0,Z=F.length;e<Z;e+=4){var P=r[e+3]/255;
x[e]=r[e]*P+x[e]*(1-P);x[e+1]=r[e+1]*P+x[e+1]*(1-P);x[e+2]=r[e+2]*P+x[e+2]*(1-P)}}return n}();q.y8.aav=function(){function n(F,O,I,x){var r=new Uint8Array(F.length>>>2),_=new Uint8Array(F.length>>>2),d=new Uint8Array(F.length);
for(var e=0;e<F.length;e+=4){var w=F[e+0]*.3+F[e+1]*.59+F[e+2]*.11;_[e>>>2]=w;d[e]=F[e];d[e+1]=F[e+1];
d[e+2]=F[e+2]}q.aF.B3(_,r,O,I);q.aF.u3(F,x,O,I,q.aF.vy[1],0,!0);for(var e=0;e<F.length;e+=4){d[e+3]=255-r[e>>>2]}for(var e=0,Z=F.length;
e<Z;e+=4){var P=d[e+3]/255;x[e]=d[e]*P+x[e]*(1-P);x[e+1]=d[e+1]*P+x[e+1]*(1-P);x[e+2]=d[e+2]*P+x[e+2]*(1-P)}}return n}();
q.y8.a9j=function(){function n(r,_,d,w,Z){var P=new Uint32Array(r.buffer),C=0;for(var e=0;e<d;e++){for(var W=0;
W<_;W++,C+=4){var v=P[e*_+W],L=v&255,H=v>>>8&255,y=v>>>16&255,g=v>>>24&255,Q=~~(Math.random()*8),J=Q%3,A=0,p=0;
if(Q<3){p--}else if(Q>4){p++}if(J==0){A--}else if(J==2){A++}var U=W+A,j=e+p;if(U<0)U=0;else if(U>_-1)U=_-1;
if(j<0)j=0;else if(j>d-1)j=d-1;var v=P[j*_+U],b=v&255,s=v>>>8&255,G=v>>>16&255,T=v>>>24&255;w[C]=Z(L,b);
w[C+1]=Z(H,s);w[C+2]=Z(y,G);w[C+3]=Z(g,T)}}}function F(r,_){return _}function O(r,_){return r>_?_:r}function I(r,_){return r<_?_:r}function x(r,_,d,w,Z){var P=Z[0];
if(P==0)n(r,_,d,w,F);else if(P==1)n(r,_,d,w,O);else if(P==2)n(r,_,d,w,I);else if(P==3){console.error("Not implemented")}else console.error("Mew mew")}return x}();
q.y8.a32=function(){var n=[],F=new Uint8Array(512),O=new Float32Array(512),I=new Float32Array(512),x=[1,-1,1,-1,1,-1,0,0],r=[1,1,-1,-1,0,0,1,-1],_=0,d,L=0;
for(;_<256;_++)n[_]=_;while(_!=0){_--;d=Math.floor(Math.random()*_);n[d]^=n[_]^(n[_]=n[d])}function w(w){w=Math.floor(w*65536);
if(w<256){w|=w<<8}for(var e=0;e<256;e++){var g=e+256,Q=n[e]^(e&1?w:w>>8)&255;F[e]=F[g]=Q;Q=Q%8;O[e]=O[g]=x[Q];
I[e]=I[g]=r[Q]}}function Z(g){return g*g*g*(g*(g*6-15)+10)}function P(g,Q,J){return(1-J)*g+J*Q}function C(g,Q){return g&Q}function W(g,Q){return g%Q}function v(g,Q,J,A,p){var U=Math.floor(g),j=Math.floor(Q),_,b,s,G,T,z;
g=g-U;Q=Q-j;U=U&255;j=j&255;_=U+F[j];G=O[_]*g+I[_]*Q;_=U+F[p(j+1,A)];s=O[_]*g+I[_]*(Q-1);_=p(U+1,J)+F[j];
T=O[_]*(g-1)+I[_]*Q;_=p(U+1,J)+F[p(j+1,A)];z=O[_]*(g-1)+I[_]*(Q-1);b=Z(g);return P(P(G,T,b),P(s,z,b),Z(Q))}function H(g,_,Q){g[_]=Q}function y(g,Q,J,A,p){var U=Math.min(Math.min(Q,256),Math.min(256,J)),j=U==256||U<8,b=8,s=new Uint32Array(b),G=new Uint32Array(b),T=new Float32Array(b),z=new Float32Array(b),m=1,$=1,o=j?C:W,h=H,X;
for(var e=0;e<b;e++){X=$*1/U;if(j){G[e]=(1<<Math.ceil(Math.log2(J*X)))-1;s[e]=(1<<Math.ceil(Math.log2(Q*X)))-1}else{G[e]=X*J;
s[e]=X*Q}T[e]=m;z[e]=X;m*=.5;$=$<<1}w(Math.random());for(var D=0,_=0;D<J;D++){for(var f=0;f<Q;f++){var R=0;
for(var i=0;i<b;i++){X=z[i];R+=v(f*X,D*X,s[i],G[i],o)*T[i]}h(A,_++,Math.round(Math.max(0,255*Math.min(1,.5+R*.5))))}}}return y}();
q.y8.amc=function(){function n(F,O,I,x,r){var _=r&&r[0]?r[0]:4,d,w,Z,P,C,W,v;for(var e=0;e<I;e++){var L=Math.max(e-_,0),H=Math.min(e+_,I-1);
for(var y=0;y<O;y++){var g=Math.max(y-_,0),Q=Math.min(y+_,O-1);d=L*O+g<<2;P=F[d];C=F[d+1];W=F[d+2];v=F[d+3];
d=L*O+Q<<2;P+=F[d];C+=F[d+1];W+=F[d+2];v+=F[d+3];d=H*O+g<<2;P+=F[d];C+=F[d+1];W+=F[d+2];v+=F[d+3];d=H*O+Q<<2;
P+=F[d];C+=F[d+1];W+=F[d+2];v+=F[d+3];d=e*O+y<<2;x[d]=P+2>>>2;x[d+1]=C+2>>>2;x[d+2]=W+2>>>2;x[d+3]=v+2>>>2}}}return n}();
q.y8.aks=function(){var n=[-1e3,34,51,61,71,80,87,95,101,108,113,119,124,129,134,139,143,148,153,157,161,165,168,172,175,180,183,186,190,194,197,200,203,207,210,213,216,218,222,225,228,230,233,236,239,241,244,247,250,252,255];
function F(O,I,x,r,_){var d=_[0],w=_[1],Z=w<=50?n[w]/255:1+(255-n[101-w])/255,P=_[2],C=O.length,W=new Float32Array(C),v=0,L,H=1+1/10*d,y=(1-1/H)/2,g=16/256,Q=I-1,e,J,A,p,U=0,j=1,b=255;
for(e=0;e<r.length;e++){W[e]=O[e]/255;r[e]=d==1?Math.random()<1/255?b:j:j}function s(G,T){var z=G*I+T;
if(r[z]!=j||G>=x||T>=I){return}var A=W[z],m=Z-A,$=Math.random(),o=$/H+y;if(v==0||Math.abs(p-A)>g){L=o<=m?U:b;
v=~~(Math.random()*d)}else if(.1<$){v--}else{v=0}r[z]=L;p=A}if(P==0){for(e=0;e<I;e++){for(J=0;J<I;J++){A=e+J;
if(A>=I)break;s(J,Q-A)}v=0}for(e=1;e<x;e++){for(J=0;J<x;J++){A=e+J;if(A>=x||J>=I)break;s(A,Q-J)}v=0}}else if(P==1){for(e=0;
e<x;e++){for(J=0;J<I;J++){s(e,J)}v=0}}else if(P==2){for(e=0;e<I;e++){for(J=0;J<I;J++){A=e+J;if(A>=I)break;
s(J,A)}v=0}for(e=1;e<x;e++){for(J=0;J<x;J++){A=e+J;if(A>=x||J>=I)break;s(A,J)}v=0}}else{for(e=0;e<I;
e++){for(J=0;J<x;J++){s(J,e)}v=0}}}return F}();q.y8.a9Q=function(){function n(d){var w=new Uint8Array(256),Z=new Uint8Array(256),P=255,e;
if(d<2)P=d;else if(d<12)P=5*d-5;else if(d<47)P=2*d+28;else if(d<50){e=d-47;P=125+12.5*e+12.5*e*e}for(var e=0;
e<256;e++){Z[e]=P<e?0:255}for(var e=0;e<256;e++){var C=e<<3;w[e]=Z[C>255?255:C]}return Z}function F(){var d=new Uint8Array(256),e,w;
for(e=75,w=15;w<256;e++,w+=24)d[e]=w;for(;e<256;e++)d[e]=255;return d}function O(d,w,Z,P){x(d,w,Z,11,P)}function I(d,w,Z,P){x(d,w,Z,5,P);
for(var e=0;e<P.length;e++)P[e]=P[e]<51?0:255}function x(d,w,Z,P,C){q.Mo.CH(d,C,new gv(0,0,w,Z),P>>>1)}function r(d,w){var Z=d.length,P;
for(var e=0;e<Z;e++){P=d[e]-w[e];w[e]=P<0?0:P}}function _(d,w,Z,P,C){var W=C[0],v=C[1],L=n(W),H=F(),y=d.length,g=new Uint8Array(y),Q=P;
O(d,w,Z,g);O(g,w,Z,Q);r(Q,d);for(var e=0;e<y;e++){var J=d[e]*8;d[e]=J>255?255:J}r(Q,d);for(var e=0;e<y;
e++){d[e]=L[d[e]]}var A=v,p=v;if((A&1)==0){A++;p--}I(d,w,Z,g);x(g,w,Z,A,Q);x(Q,w,Z,p,g);for(var e=0;
e<y;e++)P[e]=H[255-g[e]]}return _}();q.y8.ajD=function(){var n,x,r,_,d,w;function F(g){var Q=0,J=g.length,A=new Uint8Array(J>>2);
for(var e=0;e<J;e+=4){A[Q++]=~~((g[e]+g[e+1]+g[e+2])/3)}n=A;return A}function O(g,Q,J,A,p){var U=p,j=p>>1,b=j-1,s=U*U,G=0;
for(var e=0;e<A;e++){var T=0;for(var z=0;z<U;z++){for(var m=0;m<U;m++){var $=0-j+m,o=e-j+z;if($<0)$=0;
else if($>=J)$=J-1;if(o<0)o=0;else if(o>=A)o=A-1;T+=g[o*J+$]}}Q[G++]=~~(T/s);for(var h=1;h<J;h++){for(var z=0;
z<U;z++){var X=h-j-1,D=X+U,o=e-j+z;if(X<0)X=0;if(D>=J)D=J-1;if(o<0)o=0;else if(o>=A)o=A-1;T+=g[o*J+D]-g[o*J+X]}Q[G++]=~~(T/s)}}n=Q}function I(g,Q){var J=g.length;
for(var e=0;e<J;e++){Q[e]=Math.max(g[e]-Q[e],0)}n=Q}var Z=new Uint8Array(256),P=new Uint8Array(256);
function C(g){r=g[0];d=g[1];w=g[2];x=2*r+1;var Q=5+10*d;Q+=d>3?(d-3)*10:0;var J=~~(w*.73)+50,A=Math.min(J+Q,128),p=A-J,U=-255*J;
_=r+4;for(var e=0;e<256;e++){var j=e*65;Z[e]=j>=256?255:j;P[e]=Math.max(Math.min(~~(U/p),255),0);U+=255}}function W(g,Q,J,A,p,U,j,b,s,G){var T=p+U-1,z=p>>1,m=T>>1,$=0,o=new Int32Array(p),h=new Int32Array(256),X=new Int32Array(16);
if(!j){m}for(var e=0;e<A;e++){h.fill(0);X.fill(0);for(var D=0;D<p;D++){var f=j?T-D-U:D;for(var R=f,i=U+f;
R<i;R++){var t=0-m+R,N=e-z+D;if(R==f){o[D]=t}if(t<0)t=0;else if(t>=J)t=J-1;if(N<0)N=0;else if(N>=A)N=A-1;
var M=g[N*J+t];h[M]++;X[M>>>4]++}}var hK=0,bD;for(bD=0;bD<256;bD++){hK+=h[bD];if(hK>=G)break}Q[$++]=bD;
for(var co=1;co<J;co++){for(var D=0;D<p;D++){var N=e-z+D,f=o[D]+1;o[D]=f;var iM=f-1,hs=f+U-1;if(N<0)N=0;
else if(N>=A)N=A-1;if(iM<0)iM=0;else if(iM>=J)iM=J-1;if(hs<0)hs=0;else if(hs>=J)hs=J-1;var S=g[N*J+iM],a=g[N*J+hs];
h[S]--;X[S>>>4]--;h[a]++;X[a>>>4]++}hK=0;bD=0;while(hK+X[bD>>>4]<G){hK+=X[bD>>>4];bD+=16}for(;bD<256;
bD++){hK+=h[bD];if(hK>=G)break}Q[$++]=bD}}n=Q}function v(g){var Q=g.length,J=new Uint8Array(Q),e=0;for(;
e<Q;e++){J[e]=g[e]}n=J;return J}function L(g,Q){for(var e=0,J=g.length;e<J;e++){g[e]=Q[g[e]]}n=g}function H(g,Q,J,A){var p=0;
for(var e=0;e<J;e++){var U=e*A,j=(e-1)*A,b=(e+1)*A;if(j<0)j=U;if(b>=J)b=U;for(var s=0;s<A;s++){var G=s-1,T=s+1;
if(G<0)G=s;if(T>=A)T=s;var z=g[U+G],m=g[U+T],$=g[j+s],o=g[b+s],h=g[U+s];Q[p++]=Math.min(Math.max(h+2*(4*h-(z+m+$+o)),0),255)}}n=Q}function y(g,Q,J,A,p){C(p);
var U=g.length,j=new Uint8Array(U),b=v(g);O(g,j,Q,J,x);for(var e=0;e<U;e++){g[e]=Math.min(Math.max(j[e]-g[e],0)*65,255)}W(g,j,Q,J,9,3,!0,0,65,20);
for(var e=0;e<U;e++){var s=b[e],G=j[e];if(G>0)g[e]=~~((G*s+(255-G)*128)/255);else g[e]=128}n=g;O(g,j,Q,J,3);
W(j,g,Q,J,15,2,!0,0,1,16);W(j,b,Q,J,15,2,!1,0,1,15);for(var e=0;e<U;e++){b[e]=g[e]+b[e]>>1}n=b;H(b,j,J,Q);
L(j,P);O(j,g,Q,J,2);A.set(n)}return y}();q.eq={agU:function(n,F){var e=n.length;n.push(F);var O=e>>>1;
while(O!=0&&n[e][0]<n[O][0]){var I=n[e];n[e]=n[O];n[O]=I;e=O;O=e>>>1}},akG:function(n){if(n.length==2)return n.pop();
var top=n[1],e=1;n[1]=n.pop();var F=n.length;while(!0){var O=e<<1,I=O+1,x=e;if(O<F&&n[O][0]<n[x][0])x=O;
if(I<F&&n[I][0]<n[x][0])x=I;if(x==e)break;var r=n[e];n[e]=n[x];n[x]=r;e=x}return top},aeR:function(n){for(var e=1;
e<n.length;e++){var F=e,O=1e9;while(F!=0){var I=n[F][0];if(I>O){console.log(e);throw"e"}O=I;F=F>>>1}}}};
q.p={};q.p.DF=new Float64Array(256);q.p.b3=new Uint8Array(256*256);q.p.n7=new Uint8Array(256*256);(function(){for(var e=0;
e<256;e++)q.p.DF[e]=255/e;for(var e=0;e<256;e++)for(var n=0;n<256;n++)q.p.b3[e*256+n]=e==0?0:Math.round(n*255/e);
for(var e=0;e<256;e++)for(var n=0;n<256;n++)q.p.n7[e*256+n]=Math.round(e*(255-n)/255)}());q.p.F_=function(n,F,O,I,x,r,_,d){if(d==null)d=ha.gm();
if("idiv,lbrn,div ,lddg,vLit,lLit,hMix,diff".split(",").indexOf(n)==-1){_=_*d.fill;d.fill=1;d.style=!1}var w="norm,dark,mul ,idiv,lbrn,lite,scrn,div ,lddg,over,sLit,hLit,vLit,lLit,pLit,hMix,diff,smud,fsub,fdiv".split(","),Z="dkCl,lgCl,hue ,sat ,colr,lum ".split(","),P=q.p[n+"F"];
if(d.ni==null&&n=="norm")q.p.a6N(F,O,I,x,r,_,P,d.rU?1:0);else if(n=="diss")q.p.a9B(F,O,I,x,r,_,P,d.rU?1:0);
else if(w.indexOf(n)!=-1)q.p.aku(F,O,I,x,r,_,P,d);else if(Z.indexOf(n)!=-1)q.p.adr(F,O,I,x,r,_,P,d)};
q.p.acM=function(n,F,O){var I=n*O+1-O;return I<.001?0:1-Math.min(1,(1-F)/I)};q.p.anP=function(n,F,O){return n*O==1?1:Math.min(1,F/(1-n*O))};
q.p.m9=function(n){return n<=.25?((16*n-12)*n+4)*n:Math.sqrt(n)};q.p.normF=function(n,F,O){return n};
q.p.darkF=function(n,F,O){return Math.min(n,F)};q.p["mul F"]=function(n,F,O){return n*F};q.p.idivF=function(n,F,O){var I=n*O+1-O;
return F==1?1:1-F>=I?0:1-(1-F)/I};q.p.lbrnF=function(n,F,O){return Math.max(0,n*O+F-O)};q.p.dkClF=function(n,F,O){var I=q.wO(n)<q.wO(F)?n:F;
O.Q=I.Q;O.l=I.l;O.O=I.O;return O};q.p.liteF=function(n,F,O){return Math.max(n,F)};q.p.scrnF=function(n,F,O){return F+n-F*n};
q.p["div F"]=function(n,F,O){n*=O;return F==0?0:F>=1-n?1:F/(1-n)};q.p.lddgF=function(n,F,O){n*=O;return Math.min(1,n+F)};
q.p.lgClF=function(n,F,O){var I=q.wO(n)>q.wO(F)?n:F;O.Q=I.Q;O.l=I.l;O.O=I.O;return O};q.p.overF=function(n,F,O){return q.p.hLitF(F,n,O)};
q.p.sLitF=function(n,F,O){return n<=.5?F-(1-2*n)*F*(1-F):F+(2*n-1)*(q.p.m9(F)-F)};q.p.hLitF=function(n,F,O){return n<=.5?q.p["mul F"](2*n,F,O):q.p.scrnF(2*n-1,F,O)};
q.p.vLitF=function(n,F,O){return n<=.5?q.p.acM(2*n,F,O):q.p.anP(2*n-1,F,O)};q.p.lLitF=function(n,F,O){return n<=.5?q.p.lbrnF(2*n,F,O):q.p.lddgF(2*n-1,F,O)};
q.p.pLitF=function(n,F,O){return n<=.5?q.p.darkF(2*n,F,O):q.p.liteF(2*n-1,F,O)};q.p.hMixF=function(n,F,O){if(O>.99)return n+F<1?0:1;
return Math.min(1,Math.max(0,(F+n*O-O)/(1-O+1e-6)))};q.p.diffF=function(n,F,O){n*=O;return Math.abs(n-F)};
q.p.smudF=function(n,F,O){return n+F-2*n*F};q.p.fsubF=function(n,F,O){return Math.max(F-n,0)};q.p.fdivF=function(n,F,O){return Math.min(F/n,1)};
q.p["hue F"]=function(n,F,O){q.p._M(n,q.Il(F),O);q.p.b6(O,q.wO(F),O)};q.p["sat F"]=function(n,F,O){q.p._M(F,q.Il(n),O);
q.p.b6(O,q.wO(F),O)};q.p.colrF=function(n,F,O){q.p.b6(n,q.wO(F),O)};q.p["lum F"]=function(n,F,O){q.p.b6(F,q.wO(n),O)};
q.p.b6=function(n,F,O){var I=F-q.wO(n);O.Q=n.Q+I;O.l=n.l+I;O.O=n.O+I;q.p.akS(O)};q.p.akS=function(n){var F=n.Q,O=n.l,I=n.O,x=q.iB(F,O,I),E=Math.min(F,O,I),r=Math.max(F,O,I);
if(E<0){var _=x/(x-E);F=x+(F-x)*_;O=x+(O-x)*_;I=x+(I-x)*_}if(r>1){var _=(1-x)/(r-x);F=x+(F-x)*_;O=x+(O-x)*_;
I=x+(I-x)*_}n.Q=F;n.l=O;n.O=I};q.p._M=function(n,F,O){var I=q.p.alf,x=n.Q,r=n.l,_=n.O;if(x==r&&r==_){O.Q=O.l=O.O=0}else if(x>r){if(x>_){if(r>_){O.Q=F;
O.l=I(x,r,_,F);O.O=0}else{O.Q=F;O.O=I(x,_,r,F);O.l=0}}else{O.O=F;O.Q=I(_,x,r,F);O.l=0}}else{if(x<_){if(r>_){O.l=F;
O.O=I(r,_,x,F);O.Q=0}else{O.O=F;O.l=I(_,r,x,F);O.Q=0}}else{O.l=F;O.Q=I(r,x,_,F);O.O=0}}};q.p.alf=function(n,F,O,I){return(F-O)*I/(n-O)};
q.p.a6N=function(n,F,O,I,x,r,_,d){var w=F.lN(I).lN(x),Z=Math.max(0,w.x-F.x),P=Math.max(0,w.x-I.x),C=Math.max(0,w.y-F.y),W=Math.max(0,w.y-I.y),v=w.d,L=w.v,H=F.d,y=I.d,g=q.p.b3,Q=q.p.n7,J=new Uint32Array(n.buffer),A=new Uint32Array(O.buffer);
for(var e=0;e<L;e++){var p=(C+e)*H+Z,U=(W+e)*y+P;for(var j=0;j<v;j++){var b=J[p+j],T=255;if(b>>>24==0)continue;
if(b>>>24==255&&r==1&&d==0){A[U+j]=J[p+j];continue}var s=A[U+j],G=255*r&255;if(d==0){G=(b>>>24)*r&255;
T=s>>>24}var z=Q[T<<8|G],m=G+z,$=b&255,o=b>>>8&255,h=b>>>16&255,X=s&255,D=s>>>8&255,f=s>>>16&255;A[U+j]=d*(s>>>24)+(1-d)*m<<24|g[m<<8|q.bX(h*G+f*z)]<<16|g[m<<8|q.bX(o*G+D*z)]<<8|g[m<<8|q.bX($*G+X*z)]}}};
q.p.a5o=function(n,F,O,I,x,r){var _=F.lN(I).lN(x),d=Math.max(0,_.x-F.x),w=Math.max(0,_.x-I.x),Z=Math.max(0,_.y-F.y),P=Math.max(0,_.y-I.y),C=_.d,W=_.v,v=F.d,L=I.d,H=q.p.b3,y=q.p.n7,g=new Uint32Array(n.buffer),Q=new Uint32Array(O.buffer),J=Math.floor(Math.random()*16777215),A=0;
for(var e=0;e<W;e++){var p=(Z+e)*v+d,U=(P+e)*L+w;for(var j=0;j<C;j++){var b=g[p+j];if(b>>>24==0)continue;
if(b>>24==255&&r==1){Q[U+j]=b;continue}var s=Q[U+j],G=(b>>>24)*r*(1/255),T=(s>>>24)*(1/255),z=T*(1-G),m=G+z,$=b&255,o=b>>>8&255,h=b>>>16&255,X=s&255,D=s>>>8&255,f=s>>>16&255;
A>>>=8;if((j&3)==0)A=q.p.JU(U+j+J);var R=m==0?0:1/m,i=Math.floor(m*(256*255))+(A&255)>>>8,t=Math.floor((h*G+f*z)*R+.5),N=Math.floor((o*G+D*z)*R+.5),M=Math.floor(($*G+X*z)*R+.5);
Q[U+j]=i<<24|t<<16|N<<8|M}}};q.p.$V=function(n,F,O,I,x,r,_,d){var w=q.iB(n,F,O),Z=q.iB(I,x,r),P=Math.min,C=q.p.a89,W=C(w,d,0);
W=P(W,C(n,d,8));W=P(W,C(F,d,16));W=P(W,C(O,d,24));var v=C(Z,d,4);v=P(v,C(I,d,12));v=P(v,C(x,d,20));v=P(v,C(r,d,28));
v=Math.max(v,1-_);var L=Math.min(W,v);return L<0?0:L>1?1:L};q.p.a89=function(n,F,e){return Math.min((n-F[e])*F[e+1],(n-F[e+3])*F[e+2])};
q.p.aku=function(n,F,O,I,x,r,_,d){var w=1/255,Z=w*r,P=d.rU?1:0,C=d.fill,W=d.style,v=F.lN(I).lN(x),L=Math.max(0,v.x-F.x),H=Math.max(0,v.x-I.x),y=Math.max(0,v.y-F.y),g=Math.max(0,v.y-I.y),Q=v.d,J=v.v,A=F.d,p=I.d,U=new Uint32Array(n.buffer),j=new Uint32Array(O.buffer);
for(var e=0;e<J;e++){var b=(y+e)*A+L,s=(g+e)*p+H;for(var G=0;G<Q;G++,b++,s++){var T=U[b],R=1;if(T>>>24==0)continue;
var z=j[s],m=(T&255)*w,$=(T>>>8&255)*w,o=(T>>>16&255)*w,h=(z&255)*w,X=(z>>>8&255)*w,D=(z>>>16&255)*w,f=r;
if(P==0){f=(T>>>24)*Z;R=(z>>>24)*w}if(d.ni)f*=q.p.$V(m,$,o,h,X,D,R,d.ni);var i=R*(1-f),t=f+i,N=t==0?0:255/t,M=W?1:f,hK=((1-R)*f*m+(1-M)*R*h+M*R*_(m,h,(1+f-M)*C))*N,bD=((1-R)*f*$+(1-M)*R*X+M*R*_($,X,(1+f-M)*C))*N,co=((1-R)*f*o+(1-M)*R*D+M*R*_(o,D,(1+f-M)*C))*N;
t=f*C+R*(1-f*C);var iM=~~(t*255+.5);j[s]=P*(z>>>24)+(1-P)*iM<<24|co<<16|bD<<8|hK}}};q.p.adr=function(n,F,O,I,x,r,_,d){var w=1/255,Z=w*r,P=d.rU?1:0,C=F.lN(I).lN(x),W=Math.max(0,C.x-F.x),v=Math.max(0,C.x-I.x),L=Math.max(0,C.y-F.y),H=Math.max(0,C.y-I.y),y=C.d,g=C.v,Q=new Uint32Array(n.buffer),J=new Uint32Array(O.buffer),A={Q:0,l:0,O:0},p={Q:0,l:0,O:0},U={Q:0,l:0,O:0};
for(var e=0;e<g;e++){var j=(L+e)*F.d+W,b=(H+e)*I.d+v;for(var s=0;s<y;s++,j++,b++){var G=Q[j],T=J[b],z=(G&255)*w,m=(G>>>8&255)*w,$=(G>>>16&255)*w,o=(T&255)*w,h=(T>>>8&255)*w,X=(T>>>16&255)*w,D=r,f=1;
if(P==0){D=(G>>>24)*Z;f=(T>>>24)*w}if(d.ni)D*=q.p.$V(z,m,$,o,h,X,f,d.ni);var R=f*(1-D),i=D+R,t=255/i;
A.Q=z;A.l=m;A.O=$;p.Q=o;p.l=h;p.O=X;_(A,p,U);var N=(((1-f)*z+f*U.Q)*D+o*R)*t,M=(((1-f)*m+f*U.l)*D+h*R)*t,hK=(((1-f)*$+f*U.O)*D+X*R)*t,bD=P*(T>>>24)+(1-P)*Math.round(i*255);
J[b]=bD<<24|hK<<16|M<<8|N}}};q.p.GR=function(n){n=n^61^n>>>16;n=n+(n<<3);n=n^n>>>4;n=n*668265261;n=n^n>>15;
return(n&16777215)*(1/16777215)};q.p.JU=function(n){n=n^61^n>>>16;n=n+(n<<3);n=n^n>>>4;n=n*668265261;
n=n^n>>>15;return n};q.p.Iu=function(n){this.$f=n};q.p.Iu.prototype.get=function(){var n=this.$f=q.p.JU(this.$f);
return(n&16777215)*(1/16777215)};q.p.a9B=function(n,F,O,I,x,r,_,d){var w=1/255,Z=w*r,P=Math.round(r*(256*256*256/255)),C=F.lN(I).lN(x),W=Math.max(0,C.x-F.x),v=Math.max(0,C.x-I.x),L=Math.max(0,C.y-F.y),H=Math.max(0,C.y-I.y),y=C.d,g=C.v,Q=new Uint32Array(n.buffer),J=new Uint32Array(O.buffer);
for(var e=0;e<g;e++){var A=(L+e)*F.d+W,p=(H+e)*I.d+v;for(var U=0;U<y;U++,A++,p++){var j=Q[A],b=J[p],s=d*255+(1-d)*(j>>>24);
if((q.p.JU(A)&16777215)>=s*P)continue;J[p]=j&16777215|d*(b>>>24)+(1-d)*255<<24}}};q.p.ahr=function(n,F,O){for(var e=0;
e<n.length;e+=4){var I=O[e>>>2];if(I==0)continue;var x=I*(1/255),r=1/x,_=F[e],d=F[e+1],w=F[e+2],Z=n[e],P=n[e+1],C=n[e+2];
F[e]=Math.min(255,Math.max(0,Math.round((_-(1-x)*Z)*r)));F[e+1]=Math.min(255,Math.max(0,Math.round((d-(1-x)*P)*r)));
F[e+2]=Math.min(255,Math.max(0,Math.round((w-(1-x)*C)*r)));F[e+3]=255}};q.p.Nb=function(n,F,O,I,x,r,_,d,w,Z,P){if(Z==null)Z=!1;
if(P==null)P=[1,1,1];var C=255<<24|P[2]*16711680|P[1]*65280|P[0]*255,W=~C;if(x&&!F.Qq(r)){var v=q.f(F.X()*4);
v.fill(_);q.k9(x,r,v,F);x=v;r=F}if(Z){if(x==null)q.p.amK(n,F,O,I,x,d,w,C,W);else q.p.adO(n,F,O,I,x,d,w)}else{if(x==null)q.p.a1e(n,F,O,I,x,d,w,C,W);
else q.p.a55(n,F,O,I,x,d,w)}};q.p.a1e=function(n,F,O,I,x,r,_,d,w){var Z=1/255,P=F.lN(I).lN(r),C=Math.max(0,P.x-F.x),W=Math.max(0,P.x-I.x),v=Math.max(0,P.y-F.y),L=Math.max(0,P.y-I.y),H=P.d,y=P.v,g=new Uint32Array(n.buffer),Q=new Uint32Array(O.buffer),J=q.p.b3,A=_*255&255;
for(var e=0;e<y;e++){var p=(v+e)*F.d+C,U=(L+e)*I.d+W;for(var j=0;j<H;j++,p++,U++){var b=g[p],s=Q[U],G=b>>>24,T=s>>>24,z=q.bX(A*G+(255-A)*T),m=q.bX(G*A),$=q.bX(T*(255-A)),o=b&255,h=b>>>8&255,X=b>>>16&255,D=s&255,f=s>>>8&255,R=s>>>16&255,i=m*o+D*$,t=m*h+f*$,N=m*X+R*$;
i=J[z<<8|q.bX(i)];t=J[z<<8|q.bX(t)];N=J[z<<8|q.bX(N)];var M=z<<24|N<<16|t<<8|i;Q[U]=w&s|d&M}}};q.p.amK=function(n,F,O,I,x,r,_,d,w){var Z=1/255,P=F.lN(I).lN(r),C=Math.max(0,P.x-F.x),W=Math.max(0,P.x-I.x),v=Math.max(0,P.y-F.y),L=Math.max(0,P.y-I.y),H=P.d,y=P.v,g=new Uint32Array(n.buffer),Q=new Uint32Array(O.buffer),J=q.p.b3,A=_*16777215&16777215;
for(var e=0;e<y;e++){var p=(v+e)*F.d+C,U=(L+e)*I.d+W;for(var j=0;j<H;j++,p++,U++){if((q.p.JU(p)&16777215)<A){Q[U]=w&Q[U]|d&g[p]}}}};
q.p.a55=function(n,F,O,I,x,r,_){var d=1/255,w=F.lN(I).lN(r),Z=Math.max(0,w.x-F.x),P=Math.max(0,w.x-I.x),C=Math.max(0,w.y-F.y),W=Math.max(0,w.y-I.y),v=w.d,L=w.v,H=new Uint32Array(n.buffer),y=new Uint32Array(O.buffer),g=q.p.b3;
for(var e=0;e<L;e++){var Q=(C+e)*F.d+Z,J=(W+e)*I.d+P;for(var A=0;A<v;A++,Q++,J++){var p=x[Q]*_&255;if(p==0)continue;
if(p==255){y[J]=H[Q];continue}var U=H[Q],j=y[J],b=U>>>24,s=j>>>24,G=q.bX(p*b+(255-p)*s),T=q.bX(b*p),z=q.bX(s*(255-p)),m=U&255,$=U>>>8&255,o=U>>>16&255,h=j&255,X=j>>>8&255,D=j>>>16&255,f=g[G<<8|q.bX(T*m+h*z)],R=g[G<<8|q.bX(T*$+X*z)],i=g[G<<8|q.bX(T*o+D*z)];
y[J]=G<<24|i<<16|R<<8|f}}};q.p.adO=function(n,F,O,I,x,r,_){var d=1/255,w=F.lN(I).lN(r),Z=Math.max(0,w.x-F.x),P=Math.max(0,w.x-I.x),C=Math.max(0,w.y-F.y),W=Math.max(0,w.y-I.y),v=w.d,L=w.v,H=new Uint32Array(n.buffer),y=new Uint32Array(O.buffer),g=q.p.b3,Q=Math.round(_*257);
for(var e=0;e<L;e++){var J=(C+e)*F.d+Z,A=(W+e)*I.d+P;for(var p=0;p<v;p++,J++,A++){var U=x[J]*Q;if((q.p.JU(J)&65535)<U)y[A]=H[J]}}};
q.p.TF=function(n,F,O,I,x,r,_){var d=1/255,w=F.lN(I).lN(r),Z=Math.max(0,w.x-F.x),P=Math.max(0,w.x-I.x),C=Math.max(0,w.y-F.y),W=Math.max(0,w.y-I.y),v=w.d,L=w.v,H=new Uint32Array(n.buffer),y=new Uint32Array(O.buffer),g=Math.floor(Math.random()*I.X()),Q=q.p.ae$;
for(var e=0;e<L;e++){var J=(C+e)*F.d+Z,A=(W+e)*I.d+P;for(var p=0;p<v;p++){var U=x[J+p]*_;if(U==0)continue;
if(U==255){y[A+p]=H[J+p];continue}var j=H[J+p],b=y[A+p],s=j>>>24,G=b>>>24,T=s*U*(1/255),z=G*(255-U)*(1/255),m=j&255,$=j>>>8&255,o=j>>>16&255,h=b&255,X=b>>>8&255,D=b>>>16&255,f=q.p.JU(A+p+g),R=Math.floor((T+z)*256+.5)+(f>>>0&255)>>>8,i=R==0?0:256/(T+z),t=m*T+h*z,N=$*T+X*z,M=o*T+D*z,hK=Math.floor(t*i+.5)+(f>>>8&255)>>>8,bD=Math.floor(N*i+.5)+(f>>>16&255)>>>8,co=Math.floor(M*i+.5)+(f>>>21&248)>>>8;
y[A+p]=R<<24|co<<16|bD<<8|hK}}};q.p.ae$=function(n){return Math.floor(n+Math.random())};q.p.b4=function(n,F,O,I,x,r,_){var d=1/255,w=F.lN(I).lN(r),Z=Math.max(0,w.x-F.x),P=Math.max(0,w.x-I.x),C=Math.max(0,w.y-F.y),W=Math.max(0,w.y-I.y),v=w.d,L=w.v;
for(var e=0;e<L;e++){var H=(C+e)*F.d+Z,y=(W+e)*I.d+P;for(var g=0;g<v;g++,H++,y++){var Q=_*x[H]*d;if(Q==0)continue;
if(Q==1){O[y]=n[H];continue}O[y]=n[H]*Q+O[y]*(1-Q)}}};q.c6={};q.c6.a4D=function(n,F,O,I,x,r){q.c6.M7(n,F,O,I,x,r,null,0)};
q.c6.aev=function(n,F,O,I,x){q.c6.M7(n,F,O,I,x,null,null,0)};q.c6.a4n=function(n,F,O,I,x,r,_){q.c6.M7(n,F,O,I,x,null,r,_*.5)};
q.c6.M7=function(n,F,O,I,x,r,_,d){var w=0,z=0,m=1e9,$=0,o=1e9,h=0,X=1e9,D=0,f=0,R=0,i=0;if(r){w=x*.5;
x=3+Math.round((x-3)*.75)}if(_){x=Math.round(x*2.2)}var Z=1/x,P=Math.floor(F*Z)+1,C=Math.floor(O*Z)+1,W=[],v=new Uint8Array(P*C*4),L=_?.5:1,H=r?64:0;
for(var y=0;y<C;y++){var g=_?.5*(y&1):0;for(var Q=0;Q<P;Q++){var J=(Q+Math.random()*L+g)*x,A=(y+Math.random()*L)*x;
W.push(J,A);var p=Math.min(F-1,Math.floor(J)),U=Math.min(O-1,Math.floor(A)),j=(U*F+p)*4,b=(y*P+Q)*4;
for(var e=0;e<4;e++)v[b+e]=Math.max(0,Math.min(255,Math.floor(n[j+e]+(Math.random()-.5)*H)))}}var s=r?r:_?_:[0,0,0],G=P*C*2,T=[-P-1,-P,-P+1,-1,0,1,P-1,P,P+1];
for(var y=0;y<O;y++){R=0;for(var Q=0;Q<F;Q++){var t=Q+.5,N=y+.5,M=Math.floor(N*Z),hK=Math.floor(t*Z),bD=M*P+hK,hs=0,S=0;
if(R>1+d){m=q.c6.HW(W,z,t,N);D=Math.sqrt(m);R--;i++}else{m=o=X=1e9;for(var e=0;e<T.length;e++){var co=(bD+T[e])*2;
if(co<0||co>=G)continue;var iM=q.c6.HW(W,co,t,N);if(iM<X){if(iM<o){if(iM<m){h=$;X=o;$=z;o=m;z=co;m=iM}else{h=$;
X=o;$=co;o=iM}}else{h=co;X=iM}}}D=Math.sqrt(m);f=Math.sqrt(o);R=f-(D+f)*.5}if(_==null){var a=(D+f)*.5,bV=r?Math.max(0,a-w):0;
hs=Math.max(0,Math.min(1,.5+a-D-bV));S=Math.max(0,Math.min(1,1-(.5+a-D)-bV))}else{var a5=Math.min(q.c6.RC(W,z,$,t,N),q.c6.RC(W,z,h,t,N));
hs=Math.max(0,Math.min(1,a5-d*.5));if(t<d||F-d<t||N<d||O-d<N)hs=0;S=0}var i9=1-S-hs,b=y*F+Q<<2,dG=z<<1,ap=$<<1;
I[b+0]=Math.floor(.5+hs*v[dG+0]+S*v[ap+0]+i9*s[0]);I[b+1]=Math.floor(.5+hs*v[dG+1]+S*v[ap+1]+i9*s[1]);
I[b+2]=Math.floor(.5+hs*v[dG+2]+S*v[ap+2]+i9*s[2]);I[b+3]=n[b+3]}}};q.c6.HW=function(n,F,O,I){var x=O-n[F],r=I-n[F+1];
return x*x+r*r};q.c6.RC=function(n,F,O,I,x){var r=n[F],_=n[F+1],d=n[O],w=n[O+1],Z=(r+d)*.5,P=(_+w)*.5,C=Z+(w-_),W=P-(d-r),v=W-P,L=C-Z;
return Math.abs(v*I-L*x+C*P-W*Z)/Math.sqrt(L*L+v*v)};q.Mo={};q.Mo.rX=function(n){if(q.Mo.fZ.length<n)q.Mo.fZ=q.f(n);
return q.Mo.fZ};q.Mo.fZ=q.f(0);q.Mo.Q4=function(n){if(q.Mo.PN.length<n)q.Mo.PN=new Float32Array(n);return q.Mo.PN};
q.Mo.PN=new Float32Array(0);q.Mo.MU=function(n,F,O,I){var x=O.d,r=O.v;q.Mo.a3y(n,F,x,r,I)};q.Mo.pp=function(n,F,O,I){var x=O.d,r=O.v;
q.Mo.afE(n,F,x,r,I)};q.Mo.a61=function(n,F,O){var I=F.d,x=F.v;q.Mo.a3h(n,I,x,O)};q.Mo.QA=function(n,F,O,I,x){var r=O.d,_=O.v;
q.Mo.a8B(n,F,r,_,I,x)};q.Mo.CH=function(n,F,O,I){var x=O.d,r=O.v;I=Math.round(I);var _=q.Mo.rX(x*r);
q.Ct(n,F);q.Mo.ic(F,_,x,r,I)};q.Mo._G=function(n,F,O){var I=F.d,x=F.v;O=Math.round(O);var r=q.Mo.rX(I*x*4);
q.Mo.Bq(n,r,I,x,O)};q.Mo.lC=function(n,F,O,I){var x=O.d,r=O.v;I=Math.round(I);var _=q.Mo.Q4(x*r);q.Ct(n,F);
q.Mo._T(F,_,x,r,I)};q.Mo.o6=function(n,F,O){var I=F.d,x=F.v;O=Math.round(O);var r=q.Mo.rX(I*x*4);q.Mo.uL(n,r,I,x,O);
q.Ct(r,n)};q.Mo.rb=function(n,E){var F=Math.sqrt(12*n*n/E+1),O=Math.floor(F);if(O%2==0)O--;var I=O+2,x=(12*n*n-E*O*O-4*E*O-3*E)/(-4*O-4),r=Math.round(x),_=[];
for(var e=0;e<E;e++)_.push(e<r?O:I);return _};q.Mo.a3y=function(n,F,O,I,x){var r=q.Mo.rb(x,3),_=q.Mo.rX(O*I);
q.Ct(n,F);q.Mo.ic(F,_,O,I,r[0]-1>>1);q.Mo.ic(F,_,O,I,r[1]-1>>1);q.Mo.ic(F,_,O,I,r[2]-1>>1)};q.Mo.afE=function(n,F,O,I,x){var r=q.Mo.rb(x,2),_=q.Mo.rX(O*I);
q.Ct(n,F);q.Mo.ic(F,_,O,I,r[0]-1>>1);q.Mo.ic(F,_,O,I,r[1]-1>>1)};q.Mo.a3h=function(n,F,O,I){var x=q.Mo.rb(I,3),r=q.Mo.rX(F*O*4);
q.Mo.Bq(n,r,F,O,x[0]-1>>1);q.Mo.Bq(n,r,F,O,x[1]-1>>1);q.Mo.Bq(n,r,F,O,x[2]-1>>1)};q.Mo.a8B=function(n,F,O,I,x,r){if(r==null)r=3;
var _=q.Mo.rb(x,r),d=q.Mo.Q4(O*I);q.Ct(n,F);for(var e=0;e<r;e++)q.Mo._T(F,d,O,I,(_[e]-1)/2)};q.Mo.ic=function(n,F,O,I,x){q.Mo.ahG(n,F,O,I,x);
q.Mo.adl(F,n,O,I,x)};q.Mo.Bq=function(n,F,O,I,x){q.Mo.uL(n,F,O,I,x);q.Mo.a8H(F,n,O,I,x)};q.Mo._T=function(n,F,O,I,x){q.Mo.ai4(n,F,O,I,x);
q.Mo.aiJ(F,n,O,I,x)};q.Mo.Eo=[];q.Mo.pC=function(n){if(q.Mo.Eo[n])return q.Mo.Eo[n];var F=1/(n+n+1),O=(n+n+1)*256,I=q.f(O);
for(var e=0;e<O;e++)I[e]=Math.round(e*F);q.Mo.Eo[n]=I;return I};q.Mo.ahG=function(n,F,O,I,x){var r=1/(x+x+1),_=O-x-x-1,d=q.Mo.pC(x);
for(var e=0;e<I;e++){var w=e*O,Z=w,P=w+x,C=n[w],W=n[w+O-1],v=(x+1)*C;for(var L=0;L<x;L++)v+=n[w+L];for(var L=0;
L<=x;L++){v+=n[P+L]-C;F[w+L]=d[v]}P+=x+1;w+=x+1;for(var L=0;L<_;L++){v+=n[P+L]-n[Z+L];F[w+L]=d[v]}P+=_;
Z+=_;w+=_;for(var L=O-x;L<O;L++){v+=W-n[Z++];F[w++]=d[v]}}};q.Mo.uL=function(n,F,O,I,x){var r=O<<2,_=x<<2,d=1/(x+x+1),w=O-x-x-1,Z=w<<2,P=q.Mo.pC(x);
for(var e=0;e<I;e++){var C=e*r,W=C,v=C+_,L=C+r,H=n[C],y=n[C+1],g=n[C+2],Q=n[C+3],J=(x+1)*H,A=(x+1)*y,p=(x+1)*g,U=(x+1)*Q;
for(var j=0;j<_;j+=4){J+=n[C+j];A+=n[C+j+1];p+=n[C+j+2];U+=n[C+j+3]}for(var j=0;j<=_;j+=4){J+=n[v]-H;
F[C]=P[J];A+=n[v+1]-y;F[C+1]=P[A];p+=n[v+2]-g;F[C+2]=P[p];U+=n[v+3]-Q;F[C+3]=P[U];v+=4;C+=4}for(var j=0;
j<Z;j+=4){J+=n[v+j]-n[W+j];F[C+j]=P[J];A+=n[v+j+1]-n[W+j+1];F[C+j+1]=P[A];p+=n[v+j+2]-n[W+j+2];F[C+j+2]=P[p];
U+=n[v+j+3]-n[W+j+3];F[C+j+3]=P[U]}v+=Z;W+=Z;C+=Z;H=n[L-4];y=n[L-3];g=n[L-2];Q=n[L-1];for(var j=O-x;
j<O;j++){J+=H-n[W];F[C]=P[J];A+=y-n[W+1];F[C+1]=P[A];p+=g-n[W+2];F[C+2]=P[p];U+=Q-n[W+3];F[C+3]=P[U];
W+=4;C+=4}}};q.Mo.ai4=function(n,F,O,I,x){var r=1/(x+x+1),_=O-x-x-1;for(var e=0;e<I;e++){var d=e*O,w=d,Z=d+x,P=n[d],C=n[d+O-1],W=(x+1)*P;
for(var v=0;v<x;v++)W+=n[d+v];for(var v=0;v<=x;v++){W+=n[Z+v]-P;F[d+v]=W*r}Z+=x+1;d+=x+1;for(var v=0;
v<_;v++){W+=n[Z+v]-n[w+v];F[d+v]=W*r}Z+=_;w+=_;d+=_;for(var v=O-x;v<O;v++){W+=C-n[w++];F[d++]=W*r}}};
q.Mo.adl=function(n,F,O,I,x){var r=1/(x+x+1),_=I-x-x-1,d=q.Mo.pC(x);for(var e=0;e<O;e++){var w=e,Z=w,P=w+x*O,C=n[w],W=n[w+O*(I-1)],v=(x+1)*C;
for(var L=0;L<x;L++)v+=n[w+L*O];for(var L=0;L<=x;L++){v+=n[P]-C;F[w]=d[v];P+=O;w+=O}for(var L=0;L<_;
L++){var H=L*O;v+=n[P+H]-n[Z+H];F[w+H]=d[v]}Z+=_*O;P+=_*O;w+=_*O;for(var L=I-x;L<I;L++){v+=W-n[Z];F[w]=d[v];
Z+=O;w+=O}}};q.Mo.a8H=function(n,F,O,I,x){var r=O<<2,_=x<<2,d=1/(x+x+1),w=I-x-x-1,Z=w<<2,P=q.Mo.pC(x);
for(var e=0;e<O;e++){var C=e<<2,W=C,v=C+x*r,L=C+r*(I-1),H=n[C],y=n[C+1],g=n[C+2],Q=n[C+3],J=(x+1)*H,A=(x+1)*y,p=(x+1)*g,U=(x+1)*Q;
for(var j=0;j<x;j++){var b=C+j*r;J+=n[b];A+=n[b+1];p+=n[b+2];U+=n[b+3]}for(var j=0;j<=x;j++){J+=n[v]-H;
F[C]=P[J];A+=n[v+1]-y;F[C+1]=P[A];p+=n[v+2]-g;F[C+2]=P[p];U+=n[v+3]-Q;F[C+3]=P[U];v+=r;C+=r}for(var j=0;
j<w;j++){var s=j*r;J+=n[v+s]-n[W+s];F[C+s]=P[J];A+=n[v+s+1]-n[W+s+1];F[C+s+1]=P[A];p+=n[v+s+2]-n[W+s+2];
F[C+s+2]=P[p];U+=n[v+s+3]-n[W+s+3];F[C+s+3]=P[U]}W+=w*r;v+=w*r;C+=w*r;H=n[L];y=n[L+1];g=n[L+2];Q=n[L+3];
for(var j=I-x;j<I;j++){J+=H-n[W];F[C]=P[J];A+=y-n[W+1];F[C+1]=P[A];p+=g-n[W+2];F[C+2]=P[p];U+=Q-n[W+3];
F[C+3]=P[U];W+=r;C+=r}}};q.Mo.aiJ=function(n,F,O,I,x){var r=1/(x+x+1),_=I-x-x-1;for(var e=0;e<O;e++){var d=e,w=d,Z=d+x*O,P=n[d],C=n[d+O*(I-1)],W=(x+1)*P;
for(var v=0;v<x;v++)W+=n[d+v*O];for(var v=0;v<=x;v++){W+=n[Z]-P;F[d]=W*r;Z+=O;d+=O}for(var v=0;v<_;v++){var L=v*O;
W+=n[Z+L]-n[w+L];F[d+L]=W*r}w+=_*O;Z+=_*O;d+=_*O;for(var v=I-x;v<I;v++){W+=C-n[w];F[d]=W*r;w+=O;d+=O}}};
q.uY={};q.uY.f=function(n,F,O,I){var x=[];for(var r=0;r<4;r++)for(var _=0;_<4;_++)x.push(n+O*_/3,F+I*r/3);
return x};q.uY.Ab=function(n,F){var O=n.slice(0);for(var e=0;e<4;e++)for(var I=0;I<4;I++){var x=2*(e*4+I),r=2*(I*4+(3-e));
if(F){var _=x;x=r;r=_}O[r]=n[x];O[r+1]=n[x+1]}return O};q.uY.b1=q.f(0);q.uY.drawImage=function(n,F,O,I,x,r,_){var d=!1,w=Date.now(),Z=2,P=O+2*Z,C=I+2*Z,W=new gv(Z,Z,O,I),v=W.clone(),Q=50;
v.EM(Z,Z);var L=q.uY.b1;if(L.length!=v.X()*4)L=q.uY.b1=q.f(v.X()*4);else L.fill(0);q.nF(F,W,L,v);if(d)console.log(Date.now()-w,"copy rect");
w=Date.now();q.VE(L);if(d)console.log(Date.now()-w,"multiply alpha");w=Date.now();var H=[],y=[],g=[];
for(var J=0;J<Q+1;J++)for(var A=0;A<Q+1;A++){var p=A/Q,U=J/Q;H.push(P*p,C*U);if(A<Q&&J<Q){var j=J*(Q+1)+A,b=j+1,s=j+Q+1,G=s+1;
y.push(j,b,s);y.push(s,b,G)}var T=q.uY.ak2(n,p,U);g.push(-T)}var z=H.slice(0);q.uY.m(n,z,new gv(Z,Z,O,I));
q.z.m(z,new cD(1,0,0,1,-r.x,-r.y),z);if(d)console.log(Date.now()-w,"mesh built");w=Date.now();var m=r.d,$=r.v;
q.vr.mH(L,P,C,x,m,$,H,z,g,y);if(d)console.log(Date.now()-w,"rendered");w=Date.now();q.xR(x);if(d)console.log(Date.now()-w,"divided");
w=Date.now()};q.uY.GJ=new Array(10);q.uY.ab7=function(n,F){var O=200,I=0,x=0,r=1e9,_=q.uY.GJ;for(var d=0;
d<O+1;d++)for(var w=0;w<O+1;w++){var Z=w/O,P=d/O;q.uY.Ku(n,Z,P,_);var C=_[8]-F.x,W=_[9]-F.y,v=C*C+W*W;
if(v<r){r=v;I=Z;x=P}}return[I,x]};q.uY.m=function(n,F,O){var I=O.x,x=O.y,r=1/O.d,_=1/O.v,d=q.uY.GJ;for(var w=0;
w<F.length;w+=2){var Z=(F[w]-I)*r,P=(F[w+1]-x)*_;q.uY.Ku(n,Z,P,d);F[w]=d[8];F[w+1]=d[9]}};q.uY.ak2=function(n,F,O){var I,x,r,_,d=q.uY.GJ;
q.uY.aoz(n,F,O,d);I=d[8];x=d[9];q.uY.abQ(n,F,O,d);r=d[8];_=d[9];return I*_-x*r};q.uY.Ku=function(n,F,O,I){q.uY.$S(I,0,O);
q.uY.$S(I,4,F);q.uY.Ur(n,I)};q.uY.aoz=function(n,F,O,I){q.uY.$S(I,0,O);q.uY.pr(I,4,F);q.uY.Ur(n,I)};
q.uY.abQ=function(n,F,O,I){q.uY.pr(I,0,O);q.uY.$S(I,4,F);q.uY.Ur(n,I)};q.uY.pr=function(n,e,F){var O=1-F;
n[e]=-3*(O*O);n[e+1]=3*(O*O)-6*(F*O);n[e+2]=6*(F*O)-3*(F*F);n[e+3]=3*(F*F)};q.uY.$S=function(n,e,F){var O=1-F;
n[e]=O*(O*O);n[e+1]=3*F*(O*O);n[e+2]=3*(F*F)*O;n[e+3]=F*F*F};q.uY.Ur=function(n,F){var O=0,I=0,x=0,r=F[0],_=F[1],d=F[2],w=F[3],Z=F[4],P=F[5],C=F[6],W=F[7];
x=r*Z;O+=n[0]*x;I+=n[1]*x;x=r*P;O+=n[2]*x;I+=n[3]*x;x=r*C;O+=n[4]*x;I+=n[5]*x;x=r*W;O+=n[6]*x;I+=n[7]*x;
x=_*Z;O+=n[8]*x;I+=n[9]*x;x=_*P;O+=n[10]*x;I+=n[11]*x;x=_*C;O+=n[12]*x;I+=n[13]*x;x=_*W;O+=n[14]*x;I+=n[15]*x;
x=d*Z;O+=n[16]*x;I+=n[17]*x;x=d*P;O+=n[18]*x;I+=n[19]*x;x=d*C;O+=n[20]*x;I+=n[21]*x;x=d*W;O+=n[22]*x;
I+=n[23]*x;x=w*Z;O+=n[24]*x;I+=n[25]*x;x=w*P;O+=n[26]*x;I+=n[27]*x;x=w*C;O+=n[28]*x;I+=n[29]*x;x=w*W;
O+=n[30]*x;I+=n[31]*x;F[8]=O;F[9]=I};q.mi={};q.mi.amX=function(n,F,O){var I=Date.now(),x=new ArrayBuffer(F*O*16),r=q.mi.aio(n,F,O,x),_=q.mi.a9a(F,O,x);
return{CU:_,AU:r}};q.mi.a3g=function(n,F,O){var I=Math.round(n.length/8),x=new Uint32Array(I),r=new Uint8Array(I),_=new Uint32Array(I);
q.IW(x,4294967295,0);x[O]=0;var d=new fG(I);d.push(O,x[O]);var w={CU:n,AU:F,Gh:x,s9:r,wt:_,LG:d,a1o:O};
return w};q.mi.HC=function(n,F){var O=n.CU,I=n.AU,x=n.Gh,r=n.s9,_=n.wt,d=n.LG;while(!d.D2()&&(F==null||r[F]==0)){var w=d.pop();
r[w]=1;for(var e=0;e<8;e++){var Z=O[8*w+e],P=w+Z;if(Z==0||r[P])continue;var C=x[w]+I[8*w+e];if(d.contains(P)&&C<x[P])d.remove(P,x[P]);
if(!d.contains(P)){x[P]=C;_[P]=w;d.push(P,x[P])}}}};function fG(n){this.OT=new Uint32Array(n);this.list=[];
this.dc=0;this.Hd=4294967295}fG.prototype.D2=function(){return this.dc==0};fG.prototype.push=function(n,F){var O=this.list;
if(O[F]==null)O[F]=[];O[F].push(n);this.dc++;this.OT[n]=O[F].length-1+1;this.Hd=Math.min(this.Hd,F)};
fG.prototype.pop=function(){this.dc--;var n=this.list,F=this.Hd,O=n[F].pop();if(n[F].length==0)n[F]=null;
this.V5();this.OT[O]=0;return O};fG.prototype.contains=function(n){return this.OT[n]!=0};fG.prototype.remove=function(n,F){this.dc--;
var O=this.list,e=this.OT[n]-1;if(e==O[F].length-1)O[F].pop();else{var I=O[F].pop();O[F][e]=I;this.OT[I]=e+1}if(O[F].length==0)O[F]=null;
this.OT[n]=0;this.V5()};fG.prototype.V5=function(){if(this.dc==0){this.Hd=4294967295;return}var n=this.Hd,F=this.list;
while(F[n]==null)n++;this.Hd=n};q.mi.ab6=function(n,F,O,I){var x=new Int16Array(I);for(var r=0;r<O;r++)for(var _=0;
_<F;_++){var e=r*F+_,d=0;if(1<_&&_<F-2&&1<r&&r<O-2){d+=n[e-F-F];d+=n[e-F-1]+2*n[e-F]+n[e-F+1];d+=n[e-2]+2*n[e-1]-16*n[e]+2*n[e+1]+n[e+2];
d+=n[e+F-1]+2*n[e+F]+n[e+F+1];d+=n[e+F+F]}else d=-16*n[e];x[e]=d}return x};q.mi.ank=function(n,F,O,I){if(I==null)I=128;
var x=new Uint8Array(F*O);for(var r=1;r<O-1;r++)for(var _=1;_<F-1;_++){var e=r*F+_;x[e]=q.mi.a3X(n[e],n[e-1],n[e+1],n[e-F],n[e+F],I)}return x};
q.mi.a3X=function(n,F,O,I,x,r){var _=Math.abs(n);return n*F<0&&_<Math.abs(F)&&Math.abs(F-n)>r||n*O<0&&_<Math.abs(O)&&Math.abs(O-n)>r||n*I<0&&_<Math.abs(I)&&Math.abs(I-n)>r||n*x<0&&_<Math.abs(x)&&Math.abs(x-n)>r?1:0};
q.mi.acz=function(n,F,O,I){var x=new Float32Array(I),r=0;new Uint32Array(I).fill(0);for(var _=0;_<O;
_++)for(var d=0;d<F;d++){var w=0,Z=0,e=_*F+d,P=e*3;if(0<d&&d<F-1)w=n[e+1]-n[e-1];if(0<_&&_<O-1)Z=n[e+F]-n[e-F];
var C=x[P+2]=Math.sqrt(w*w+Z*Z);if(C!=0){var W=1/C;x[P]=w*W;x[P+1]=Z*W}if(C>r)r=C}var v=F*O,L=r==0?0:1/r;
for(var e=0;e<v;e++)x[e*3+2]=1-x[e*3+2]*L;return x};q.mi.ahB=function(n,F,O){return O[~~((.5+.5*n)*255)]+O[~~((.5+.5*F)*255)]};
q.mi.aio=function(n,F,O,I){var x=Date.now(),r=q.mi.ab6(n,F,O,I),_=q.mi.ank(r,F,O),d=q.mi.acz(n,F,O,I),w=new Float32Array(256);
for(var e=0;e<256;e++)w[e]=Math.acos(-1+2*e/255)*(.95/Math.PI);var Z=[-1,0,1,1,1,0,-1,-1],P=[-1,-1,-1,0,1,1,1,0];
for(var e=0;e<8;e++){var C=1/Math.sqrt(Z[e]*Z[e]+P[e]*P[e]);Z[e]*=C;P[e]*=C}var W=[Z[0],P[0],Z[1],P[1],Z[2],P[2],Z[3],P[3]],v=[-F-1,-F,-F+1,1],L=new Uint8Array(F*O*8);
new Uint32Array(L.buffer).fill(4294967295);var H=F*O;for(var y=1;y<O-1;y++)for(var g=1;g<F-1;g++){var Q=y*F+g,J=1-_[Q],A=d[Q*3+2],p=d[3*Q+1],U=-d[3*Q];
for(var j=0;j<4;j++){var b=Q+v[j];q.mi.a4N(Q,b,j,L,_,d,J,A,p,U,W,w)}}return L};q.mi.a4N=function(n,F,O,I,x,r,_,d,w,Z,P,C){var W=1-x[F],v=(O&1)==0?1:Math.SQRT1_2,L=r[F*3+2]*v,H=r[3*F+1],y=-r[3*F],g=d*v,Q=P[O+O],J=P[O+O+1],A=w*Q+Z*J,p=H*Q+y*J;
if(A+p<0){A=-A;p=-p}var U=q.mi.ahB(A,p,C);I[(n<<3)+O]=q.mi.gY(W,U,L);I[(F<<3)+O+4]=q.mi.gY(_,U,g)};q.mi.gY=function(n,F,O){return 1+~~(.5+20*(.43*n+.43*F+.14*O))};
q.mi.a9a=function(n,F,O){var I=new Int16Array(O),x=I,e=0,r=0;new Uint32Array(O).fill(0);for(var _=0;
_<F;_++)for(var d=0;d<n;d++){if(_>0&&d>0)x[r+0]=-n-1;if(_>0)x[r+1]=-n;if(_>0&&d<n-1)x[r+2]=-n+1;if(d<n-1)x[r+3]=1;
if(_<F-1&&d<n-1)x[r+4]=n+1;if(_<F-1)x[r+5]=n;if(_<F-1&&d>0)x[r+6]=n-1;if(d>0)x[r+7]=-1;e++;r+=8}return I};
q.aF={};q.aF.Wl=function(n){var F=n.slice(0),O=0;for(var e=0;e<n.length;e++)O+=n[e];for(var e=0;e<n.length;
e++)F[e]/=O;return F};q.aF.vy=[q.aF.Wl([1,2,1,2,16,2,1,2,1]),q.aF.Wl([1,2,1,2,4,2,1,2,1]),q.aF.Wl([0,-1,0,-1,8,-1,0,-1,0]),q.aF.Wl([-.7,-1,-.7,-1,10,-1,-.7,-1,-.7]),[-1,0,1,-2,0,2,-1,0,1],[1,2,1,0,0,0,-1,-2,-1]];
q.aF.u3=function(n,F,O,I,x,r,_,d){if(_==null)_=!1;if(d==null)d=!1;var w=Math.floor(Math.sqrt(x.length)),Z=w-1>>>1,P=new Uint32Array(n.buffer),F=new Uint8ClampedArray(F.buffer);
for(var e=0;e<I;e++)for(var C=0;C<O;C++){var W=0,v=0,L=0,H=0;for(var y=0;y<w;y++)for(var g=0;g<w;g++){var Q=x[y*w+g];
if(Q==0)continue;var J=C-Z+g,A=e-Z+y;if(J<0)J=0;else if(J>O-1)J=O-1;if(A<0)A=0;else if(A>I-1)A=I-1;if(d&&P[A*O+J]>>>24==0){A=e;
J=C}var p=P[A*O+J];W+=(p&255)*Q;v+=(p>>>8&255)*Q;L+=(p>>>16&255)*Q;H+=(p>>>24&255)*Q}if(_){if(W<0)W=-W;
if(v<0)v=-v;if(L<0)L=-L;if(H<0)H=-H}if(d){W=Math.max(0,Math.min(255,W));v=Math.max(0,Math.min(255,v));
L=Math.max(0,Math.min(255,L));H=Math.max(0,Math.min(255,H))}var U=e*O+C<<2;F[U]=~~(.5+W);F[U+1]=~~(.5+v);
F[U+2]=~~(.5+L);F[U+3]=255-r&F[U+3]|r&~~(.5+H)}};q.aF.jt=function(n,F,O,I){var x=n.length,r=new Uint8Array(x);
q.aF.u3(n,F,O,I,q.aF.vy[4],0,!0);q.aF.u3(n,r,O,I,q.aF.vy[5],0,!0);for(var e=0;e<x;e+=4){var _=F[e],d=F[e+1],w=F[e+2],Z=F[e+3],P=r[e],C=r[e+1],W=r[e+2],v=r[e+3];
F[e]=255-Math.max(0,Math.min(255,Math.sqrt(_*_+P*P)));F[e+1]=255-Math.max(0,Math.min(255,Math.sqrt(d*d+C*C)));
F[e+2]=255-Math.max(0,Math.min(255,Math.sqrt(w*w+W*W)))}};q.aF.B3=function(n,F,O,I){var x=n.length,r=new Uint8Array(x);
q.aF.G6(n,F,O,I,q.aF.vy[4],!0);q.aF.G6(n,r,O,I,q.aF.vy[5],!0);for(var e=0;e<x;e++){var _=F[e],d=r[e];
F[e]=255-Math.max(0,Math.min(255,Math.sqrt(_*_+d*d)))}};q.aF.G6=function(n,F,O,I,x,r){F=new Uint8ClampedArray(F.buffer);
var _=[-O-1,-O,-O+1,-1,0,1,O-1,O,O+1],d=I-1,w=O-1;for(var e=1;e<d;e++)for(var Z=1;Z<w;Z++){var P=e*O+Z,C=q.aF.Jl(n,P,O,x);
if(r){if(C<0)C=-C}F[P]=~~(C+.5)}};q.aF.Jl=function(n,F,O,I){return n[F-O-1]*I[0]+n[F-O]*I[1]+n[F-O+1]*I[2]+n[F-1]*I[3]+n[F]*I[4]+n[F+1]*I[5]+n[F+O-1]*I[6]+n[F+O]*I[7]+n[F+O+1]*I[8]};
q.aF.S9=function(n,F,O,I,x){var r=[-O-1,-O,-O+1,-1,0,1,O-1,O,O+1],_=I-1,d=O-1;for(var e=1;e<_;e++)for(var w=1;
w<d;w++){var Z=e*O+w;F[Z]=q.aF.alL(n,Z,O,x)}};q.aF.alL=function(n,F,O,I){return n[F-O-1]*I[0]+n[F-O]*I[1]+n[F-O+1]*I[2]+n[F-1]*I[3]+n[F]*I[4]+n[F+1]*I[5]+n[F+O-1]*I[6]+n[F+O]*I[7]+n[F+O+1]*I[8]};
q.Bk={};q.Bk.ai$=function(){function n(_,d,w,Z,P,C,W){if(P==0){d.set(_);return}var v=q.f(w*Z),L=q.f(w*Z);
if(q.Dd(_)){F(_,d,w,Z,P,C,W);var H=[q.Bk.PD,q.Bk.ap],y=H.indexOf(C),g=y!=-1?H[1-y]:C;q.xg(_,v,3);q.Bk.xl(v,L,w,Z,P,g,W);
q.GF(L,d,3)}else{for(var e=0;e<3;e++){q.xg(_,v,e);q.Bk.xl(v,L,w,Z,P,C,W);q.GF(L,d,e)}}}function F(_,d,w,Z,P,C,W){var v=0,L=new ArrayBuffer(512*4*3),H=[new Int32Array(L,0),new Int32Array(L,2048),new Int32Array(L,2*2048)],y=1+2*Math.round(Math.sqrt(P)),g=y>>>1,Q=new Array(y),J=new Array(y);
for(var e=0;e<y;e++){var L=new ArrayBuffer(512*4*3);Q[e]=[new Int32Array(L,0),new Int32Array(L,2048),new Int32Array(L,2*2048)];
J[e]=Q[e][0]}var A=C[0],p=C[1],U=H[0];for(var j=0;j<w;j++)if(j<P||j>w-P-y-1){U.fill(0);var b=Math.max(j-P,0),s=Math.min(w,j+P+1),G=s-b;
for(var T=0;T<P;T++)I(U,_,T*w+b,T*w+s,1);for(var T=0;T<Z;T++){var z=T-P-1,m=T+P;if(m<Z)I(U,_,m*w+b,m*w+s,1);
if(z>=0)I(U,_,z*w+b,z*w+s,-1);var $=T*w+j<<2;v=U[300];if(v!=0)for(var e=0;e<3;e++)d[$+e]=A(H[e],_[$+e],v,W)}}else{for(var e=0;
e<y;e++)J[e].fill(0);var b=j-P+g,s=j+P+1+g;for(var T=0;T<P;T++)O(J,_,T*w+b,T*w+s,1,g);for(var T=0;T<Z;
T++){var z=T-P-1,m=T+P;if(z>=0)O(J,_,z*w+b,z*w+s,-1,g);if(m<Z)O(J,_,m*w+b,m*w+s,1,g);var o=Q[g];v=o[0][300];
for(var e=0;e<g;e++){var h=g-1-e,X=g+1+e,D=Q[h],f=Q[X],R=v+D[0][300],i=v+f[0][300],t=T*w+j+h<<2,N=T*w+j+X<<2;
if(R!=0)for(var M=0;M<3;M++)d[t+M]=p(o[M],D[M],_[t+M],R,W);if(i!=0)for(var M=0;M<3;M++)d[N+M]=p(o[M],f[M],_[N+M],i,W)}var $=T*w+j+g<<2;
if(v!=0)for(var M=0;M<3;M++)d[$+M]=A(o[M],_[$+M],v,W)}j+=y-1}}function O(_,d,w,Z,P,C){var W=x,v=w<<2,L=Z<<2;
W(_[C-1],d,w-1<<2,P);W(_[C-1],d,Z-1<<2,-P);W(_[C+1],d,Z<<2,P);W(_[C+1],d,w<<2,-P);for(var e=1;e<C;e++){var H=_[C-e-1],y=_[C+e+1];
for(var g=0;g<=e;g++){var Q=g<<2;W(H,d,w-1-g<<2,P);W(H,d,Z-1-g<<2,-P);W(y,d,Z+g<<2,P);W(y,d,w+g<<2,-P)}}I(_[C],d,w,Z,P)}function I(_,d,e,w,Z){var P=e<<2,C=w<<2;
while(P<C){x(_,d,P,Z);P+=4}}function x(_,d,w,Z){var P=Z*d[w+3];_[300]+=P;r(_,d[w],0,P);r(_,d[w+1],512,P);
r(_,d[w+2],1024,P)}function r(_,d,w,Z){_[w|d]+=Z;_[w|256|d>>>4]+=Z}return n}();q.Bk.xl=function(){function n(C,W,v,L,H,y,g){if(H==0){W.set(C);
return}if(H<=80)F(C,W,v,L,H,y,g);else r(C,W,v,L,H,y,g)}function F(C,W,v,L,H,y,g){var Q=0,J=new Int32Array(512),A=1+2*Math.round(Math.sqrt(H)),p=A>>>1,U=new Array(A);
for(var e=0;e<A;e++)U[e]=new Int32Array(512);var j=y[0],b=y[1];for(var s=0;s<v;s++)if(s<H||s>v-H-A-1){J.fill(0);
Q=0;var G=Math.max(s-H,0),T=Math.min(v,s+H+1),z=T-G;for(var m=0;m<H;m++){Q+=z;I(J,C,m*v+G,m*v+T,1)}for(var m=0;
m<L;m++){var $=m-H-1,o=m+H;if($>=0){Q-=z;I(J,C,$*v+G,$*v+T,-1)}if(o<L){Q+=z;I(J,C,o*v+G,o*v+T,1)}var h=j(J,C[m*v+s],Q,g);
W[m*v+s]=h}}else{for(var e=0;e<A;e++)U[e].fill(0);Q=0;var G=s-H+p,T=s+H+1+p,z=T-G;for(var m=0;m<H;m++){Q+=z;
O(U,C,m*v+G,m*v+T,1,p)}for(var m=0;m<L;m++){var $=m-H-1,o=m+H;if($>=0){Q-=z;O(U,C,$*v+G,$*v+T,-1,p)}if(o<L){Q+=z;
O(U,C,o*v+G,o*v+T,1,p)}for(var e=0;e<p;e++){var X=p-1-e,D=p+1+e;W[m*v+s+X]=b(U[p],U[X],C[m*v+s+X],Q,g);
W[m*v+s+D]=b(U[p],U[D],C[m*v+s+D],Q,g)}W[m*v+s+p]=j(U[p],C[m*v+s+p],Q,g)}s+=A-1}}function O(C,W,v,L,H,y){var g=x;
g(C[y-1],W[v-1],0,H);g(C[y-1],W[L-1],0,-H);g(C[y+1],W[L],0,H);g(C[y+1],W[v],0,-H);for(var e=1;e<y;e++){var Q=C[y-e-1],J=C[y+e+1];
for(var A=0;A<=e;A++){g(Q,W[v-1-A],0,H);g(Q,W[L-1-A],0,-H);g(J,W[L+A],0,H);g(J,W[v+A],0,-H)}}I(C[y],W,v,L,H)}function I(C,W,e,v,L){while(e<v)x(C,W[e++],0,L)}function x(C,W,v,L){C[v|W]+=L;
C[v|256|W>>>4]+=L}function r(C,W,v,L,H,y,g){var Q=0,J=new Int32Array(512),A=new Int32Array(1*v),p=new Int32Array(512*v),U=Math.min(H,v),j=Math.min(H,L),b=y[0];
for(var s=0;s<j;s++)_(p,A,C,v,s,1);for(var s=0;s<L;s++){if(s+H<L)_(p,A,C,v,s+H,1);if(s-H-1>=0)_(p,A,C,v,s-H-1,-1);
J.fill(0);Q=0;for(var G=0;G<U;G++){Q+=A[G];d(J,p,G)}for(var G=0;G<v;G++){var T=G-H-1,z=G+H;if(T>=0&&A[T]!=0){Q-=A[T];
w(J,p,T)}if(z<v&&A[z]!=0){Q+=A[z];d(J,p,z)}var m=Q==0?0:b(J,C[s*v+G],Q,g);W[s*v+G]=m}}}function _(C,W,v,L,H,y){var e=H*L;
for(var g=0;g<L;g++){x(C,v[e+g],g<<9,y);W[g]+=y}}function d(C,W,v){for(var e=0;e<16;e++){var L=W[v<<9|256|e];
if(L==0)continue;C[256|e]+=L;var H=e<<4,y=v<<9|H;Z(C,W,H,y);Z(C,W,H+4,y+4);Z(C,W,H+8,y+8);Z(C,W,H+12,y+12)}}function w(C,W,v){for(var e=0;
e<16;e++){var L=W[v<<9|256|e];if(L==0)continue;C[256|e]-=L;var H=e<<4,y=v<<9|H;P(C,W,H,y);P(C,W,H+4,y+4);
P(C,W,H+8,y+8);P(C,W,H+12,y+12)}}function Z(C,W,v,L){C[v]+=W[L];C[v+1]+=W[L+1];C[v+2]+=W[L+2];C[v+3]+=W[L+3]}function P(C,W,v,L){C[v]-=W[L];
C[v+1]-=W[L+1];C[v+2]-=W[L+2];C[v+3]-=W[L+3]}return n}();q.Bk.ap=[function(n,F,O,I){var e=15;while(n[256|e]==0&&e>0)e--;
e=(e<<4)+15;while(n[e]==0&&e>0)e--;return e},function(n,F,O,I,x){var e=15;while(n[256|e]+F[256|e]==0&&e>0)e--;
e=(e<<4)+15;while(n[e]+F[e]==0&&e>0)e--;return e}];q.Bk.PD=[function(n,F,O,I){var e=0;while(n[256|e]==0&&e<15)e++;
e=e<<4;while(n[e]==0&&e<255)e++;return e},function(n,F,O,I,x){var e=0;while(n[256|e]+F[256|e]==0&&e<15)e++;
e=e<<4;while(n[e]+F[e]==0&&e<255)e++;return e}];q.Bk.qC=.5;q.Bk.Yc=[function(n,F,O,I){var x=~~(.5+q.Bk.qC*O),r=0,e=256;
while(r+n[e]<=x)r+=n[e++];e=e-256<<4;while(r<=x)r+=n[e++];return e-1},function(n,F,O,I,x){var r=~~(.5+q.Bk.qC*I),_=0,e=256;
while(_+n[e]+F[e]<=r){_+=n[e]+F[e];e++}e=e-256<<4;while(_<=r){_+=n[e]+F[e];e++}return e-1}];q.Bk.YZ=[function(n,F,O,I){var x=I[0],r=0,_=0,e=Math.max(0,F-x),d=Math.min(256,F+x+1);
while(e<d){var w=n[e];r+=e*w;_+=w;e++}return _==0?0:r/_},function(n,F,O,I,x){var r=x[0],_=0,d=0,e=Math.max(0,O-r),w=Math.min(256,O+r+1);
while(e<w){var Z=n[e]+F[e];_+=e*Z;d+=Z;e++}return d==0?0:_/d}];q.J={};q.J.$I=function(n){var F=c.V.ns(n.Trnf),O=n.Sz.v,I=q.J.N5(F,new gv(0,0,O.Wdth.v,O.Hght.v));
return q.J.fK(I)};q.J.N5=function(n,F){var O=n[0],I=n[1],x=n[2],r=n[3],_=n[6],d=n[7],w=n[4],Z=n[5],P=0,C=0,W=1,v=0,L=0,H=1,y=1,g=1;
if(F){P=F.x;C=F.y;W=F.x+F.d;v=F.y;L=F.x;H=F.y+F.v;y=F.x+F.d;g=F.y+F.v}return q.J.D3(n,[P,C,W,v,y,g,L,H])};
q.J.D3=function(n,F){var O=n[0],I=n[1],x=n[2],r=n[3],_=n[6],d=n[7],w=n[4],Z=n[5],P=F[0],C=F[1],W=F[2],v=F[3],L=F[6],H=F[7],y=F[4],g=F[5],Q=[[P,C,1,0,0,0,-P*O,-C*O,O],[0,0,0,P,C,1,-P*I,-C*I,I],[W,v,1,0,0,0,-W*x,-v*x,x],[0,0,0,W,v,1,-W*r,-v*r,r],[L,H,1,0,0,0,-L*_,-H*_,_],[0,0,0,L,H,1,-L*d,-H*d,d],[y,g,1,0,0,0,-y*w,-g*w,w],[0,0,0,y,g,1,-y*Z,-g*Z,Z]],J=[0,0,0,0,0,0,0,0],A=q.PS.bM(Q,J);
if(A!=0)J=[0,0,0,0,0,0,0,0];return J};q.J.nn=function(n){return Math.abs(n[6])<1e-10&&Math.abs(n[7])<1e-10};
q.J.fK=function(n){return new cD(n[0],n[3],n[1],n[4],n[2],n[5])};q.J.EC=function(n){return[n.R,n.Pr,n.hb,n.O,n.oQ,n.i9,0,0]};
q.J.m=function(n,F){var O=new Float64Array(2);for(var I=0;I<F.length;I+=2){var x=F[I],r=F[I+1];q.J.fb(x,r,n,O);
F[I]=O[0];F[I+1]=O[1]}};q.J.fb=function(n,F,O,I){var x=1/(O[6]*n+O[7]*F+1);I[0]=(O[0]*n+O[1]*F+O[2])*x;
I[1]=(O[3]*n+O[4]*F+O[5])*x};q.J.pD=function(n,F){var O=new Float64Array(2);q.J.fb(F.x,F.y,n,O);return new aE(O[0],O[1])};
q.J.ej=function(n,F,O,I){n=new Uint32Array(n.buffer);F=new Uint32Array(F.buffer);for(var x=0;x<I;x++){for(var r=0;
r<O;r++){F[r*I+x]=n[x*O+r]}}};q.J.a6L=function(n,F,O,I){n=new Uint32Array(n.buffer);F=new Uint32Array(F.buffer);
for(var x=0;x<I;x++){for(var r=0;r<O;r++){F[x*O+r]=n[x*O+O-1-r]}}};q.J.In=function(n){return Math.abs(n[6])<1e-9&&Math.abs(n[7])<1e-9};
q.J.Ue=function(n){return Math.abs(n[0])<1e-9&&Math.abs(n[4])<1e-9||Math.abs(n[1])<1e-9&&Math.abs(n[3])<1e-9};
q.J.drawImage=function(n,F,O,I,x,r,_,d,w){if(_==null)_=!1;if(d==null)d=!1;var Z=q.J.uZ(n),P=!0,C=0,W=1/Math.sqrt(Math.abs(n[0]/O*n[4]/I-n[1]/O*n[3]/I));
for(var e=0;e<8;e++){var v=Math.round(n[e]);if(e!=2&&e!=5)C+=Math.abs(v);if(Math.abs(v-n[e])>1e-9)P=!1}var L=q.J.In(n),H=q.J.Ue(n)&&L,y=H?1:0;
if(_||P&&C==O+I&&L){q.J.afb(Z,F,O,I,x,r,d,L,w);return}var g=r.d,Q=r.v,J=new Float64Array(2);x=new Uint32Array(x.buffer);
F=new Uint32Array(F.buffer);for(var A=0;A<Q;A++)for(var p=0;p<g;p++){var U=A*g+p,j,b,s,G,hK=0,bD=0,co=0,iM=0;
x[U]=0;var T=p+r.x+.5,z=A+r.y+.5;j=T;b=z;s=Z;G=1/(s[6]*j+s[7]*b+1);var m=(s[0]*j+s[1]*b+s[2])*G,$=(s[3]*j+s[4]*b+s[5])*G,o=m*O,h=$*I,X=o<-1||o>O+1||h<-1||h>I+1;
if(d){o=Math.max(.001,Math.min(O-1,o));h=Math.max(.001,Math.min(I-1,h))}else if(X)continue;var D=W;if(!L){var f=0,R=0;
s=n;j=m+1/O;b=$;G=1/(s[6]*j+s[7]*b+1);f=(s[0]*j+s[1]*b+s[2])*G-T;R=(s[3]*j+s[4]*b+s[5])*G-z;var i=f*f+R*R;
j=m;b=$+1/I;G=1/(s[6]*j+s[7]*b+1);f=(s[0]*j+s[1]*b+s[2])*G-T;R=(s[3]*j+s[4]*b+s[5])*G-z;var t=f*f+R*R;
D=1/Math.sqrt(Math.max(i,t))}if(D<1.1){q.J.Uo(o,h,F,O,I,x,U,y);continue}var N=Math.round(D*2.3);if(!d&&(o<.6||o>O-.6||h<.6||h>I-.6)){N=Math.max(N,5)}if(d&&X)N=1;
var M=1/N,hs=r.x+p,S=r.y+A;s=Z;for(var e=0;e<N;e++)for(var a=0;a<N;a++){j=hs+(e+.5)*M;b=S+(a+.5)*M;G=1/(s[6]*j+s[7]*b+1);
var o=(s[0]*j+s[1]*b+s[2])*G,h=(s[3]*j+s[4]*b+s[5])*G;if(d){o=Math.max(.001,Math.min(.999,o));h=Math.max(.001,Math.min(.999,h))}else if(o<0||o>=1||h<0||h>=1)continue;
o=Math.floor(o*O);h=Math.floor(h*I);var bV=h*O+o,a5=F[bV],i9=a5>>>24;hK+=(a5&255)*i9;bD+=(a5>>>8&255)*i9;
co+=(a5>>>16&255)*i9;iM+=i9}if(iM!=0){var dG=1/iM;hK=~~(hK*dG+.5);bD=~~(bD*dG+.5);co=~~(co*dG+.5);iM=~~(iM*M*M+.5);
x[U]=iM<<24|co<<16|bD<<8|hK}}};q.J.afb=function(n,F,O,I,x,r,_,d,w){if(d&&!_&&r.X()>4e6&&w){q.J.agK(n,F,O,I,x,r,_,d,w);
return}var Z=r.x+r.d,P=r.y+r.v,C=0,W=new Uint32Array(x.buffer),v=new Uint32Array(F.buffer),L=n[0]*O,H=n[1]*O,y=n[2]*O,g=n[3]*I,Q=n[4]*I,J=n[5]*I,A=n[6],p=n[7];
if(d&&!_)for(var U=r.y+.5;U<P;U++)for(var j=r.x+.5;j<Z;j++){var b=L*j+H*U+y,s=g*j+Q*U+J;if(0<b&&b<O&&0<s&&s<I){var G=~~s*O+~~b;
W[C]=v[G]}else W[C]=0;C++}else for(var U=r.y+.5;U<P;U++)for(var j=r.x+.5;j<Z;j++){var T=1/(A*j+p*U+1),b=(L*j+H*U+y)*T,s=(g*j+Q*U+J)*T;
if(_){b=Math.max(.001,Math.min(O-1,b));s=Math.max(.001,Math.min(I-1,s))}if(0<b&&b<O&&0<s&&s<I){var G=Math.floor(s)*O+Math.floor(b);
W[C]=v[G]}else W[C]=0;C++}};q.J.agK=function(n,F,O,I,x,r,_,d,w){var Z=new Uint32Array(x.buffer),P=new Uint32Array(F.buffer),p=0;
if(w&&(r.d&3)!=0)throw"e";var C=n[0]*O,W=n[1]*O,v=n[2]*O,L=n[3]*I,H=n[4]*I,y=n[5]*I,g=n[6],Q=n[7],J=r.d,A=r.v,U=r.x+.5,j=r.y+.5,b=(J>>>2<<2)-1e-9,s=-.1+(A>>>1<<1)-1e-9,G=~~O,T=C==0?0:1/C,z=L==0?0:1/L;
for(var m=0;m<A;m++){var $=U*C+W*(m+j)+v,o=U*L+H*(m+j)+y,h=0,X=J;if(C==0){}else if(T>0){h=Math.max(h,-$*T);
X=Math.min(X,(O-$)*T)}else{X=Math.min(X,-$*T);h=Math.max(h,(O-$)*T)}if(L==0){}else if(z>0){h=Math.max(h,-o*z);
X=Math.min(X,(I-o)*z)}else{X=Math.min(X,-o*z);h=Math.max(h,(I-o)*z)}if(X<0)X=0;if(h>X)h=X;h=Math.ceil(h);
X=~~X;p=~~(m*J);for(var D=0;D<h;D++)Z[p++]=0;for(var D=h;D<X;D+=4){var f=C*D+$,R=L*D+o,i=~~R*G+~~f;Z[p++]=Z[p++]=Z[p++]=Z[p++]=P[i]}for(var D=X;
D<J;D++)Z[p++]=0}};q.J.uZ=function(n){var F=n[4]-n[5]*n[7],O=n[2]*n[7]-n[1],I=n[1]*n[5]-n[2]*n[4],x=n[5]*n[6]-n[3],r=n[0]-n[2]*n[6],_=n[3]*n[2]-n[0]*n[5],d=n[3]*n[7]-n[4]*n[6],w=n[1]*n[6]-n[0]*n[7],Z=1/(n[0]*n[4]-n[1]*n[3]);
return[F*Z,O*Z,I*Z,x*Z,r*Z,_*Z,d*Z,w*Z]};q.J.NM=function(n,F){var O=n[0],I=n[1],x=n[2],r=n[3],_=n[4],d=n[5],w=n[6],Z=n[7],P=F[0],C=F[1],W=F[2],v=F[3],L=F[4],H=F[5],y=F[6],g=F[7],Q=[O*P+I*v+x*y,O*C+I*L+x*g,O*W+I*H+x,r*P+_*v+d*y,r*C+_*L+d*g,r*W+_*H+d,w*P+Z*v+y,w*C+Z*L+g],J=1/(w*W+Z*H+1);
for(var e=0;e<8;e++)Q[e]*=J;return Q};q.J.Uo=function(n,F,O,I,x,r,_,d){var w=n,Z=F,W=0,v=0,L=0,H=0;n-=.499999;
F-=.499999;var P=Math.floor(n),C=Math.floor(F);if(d==0){var e=C*I+P,y=P>=0&&P<I,g=P+1>=0&&P+1<I,Q=C>=0&&C<x,J=C+1>=0&&C+1<x;
if(y&&Q)W=O[e];if(g&&Q)v=O[e+1];if(y&&J)L=O[e+I];if(g&&J)H=O[e+I+1]}else if(d==1){var A=P<0?0:P>I-1?I-1:P,p=P<-1?0:P>I-2?I-1:P+1,U=C<0?0:C>x-1?x-1:C,j=C<-1?0:C>x-2?x-1:C+1;
W=O[U*I+A];v=O[U*I+p];L=O[j*I+A];H=O[j*I+p]}else{var A=(P+50*I)%I,p=(P+50*I)%I,U=(C+50*x)%x,j=(C+50*x)%x;
W=O[U*I+A];v=O[U*I+p];L=O[j*I+A];H=O[j*I+p]}var b=n-P,s=F-C,G=(1-s)*(1-b)*(W>>>24),T=(1-s)*b*(v>>>24),z=s*(1-b)*(L>>>24),m=s*b*(H>>>24),$=G+T+z+m,o=G*(W&255)+T*(v&255)+z*(L&255)+m*(H&255),h=G*(W>>>8&255)+T*(v>>>8&255)+z*(L>>>8&255)+m*(H>>>8&255),X=G*(W>>>16&255)+T*(v>>>16&255)+z*(L>>>16&255)+m*(H>>>16&255);
if($==0)r[_]=0;else{var D=1/$;o=~~(o*D+.5);h=~~(h*D+.5);X=~~(X*D+.5);$=~~($+.5);r[_]=$<<24|X<<16|h<<8|o}};
q.J.LC=function(n,F,O,I,x,r){var _=n-.499999,d=F-.499999,w=~~_,Z=~~d,P=_-w,C=d-Z,W=(1-C)*(1-P),v=(1-C)*P,L=C*(1-P),H=C*P,y=Z*I+w<<2,g=(Z+1)*I+w<<2,Q=W*O[y]+v*O[y+4]+L*O[g]+H*O[g+4],J=W*O[y+1]+v*O[y+5]+L*O[g+1]+H*O[g+5],A=W*O[y+2]+v*O[y+6]+L*O[g+2]+H*O[g+6],p=W*O[y+3]+v*O[y+7]+L*O[g+3]+H*O[g+7];
r[0]=Q;r[1]=J;r[2]=A;r[3]=p};q.J.d5=function(n,F,O,I,x){n-=.499999;F-=.499999;var r=Math.floor(n),_=Math.floor(F),d=n-r,w=F-_,Z=(1-w)*(1-d),P=(1-w)*d,C=w*(1-d),W=w*d,v=(r+50*I)%I,L=(r+1+50*I)%I,H=(_+50*x)%x,y=(_+1+50*x)%x,g=O[H*I+v],Q=O[H*I+L],J=O[y*I+v],A=O[y*I+L];
if(g==null||A==null)throw"e";return Z*g+P*Q+C*J+W*A};q.J.ps=function(n,F,O,I,x,r,_,d,w,Z,P,C){var W=new Uint32Array(n.buffer),v=new Uint32Array(I.buffer),L=(1+2*Z)/x,H=[],y=[];
for(var g=0;g<x;g++){var Q=-.25+Z-g*L;H.push(Math.cos(2*Math.PI*Q)*C/P);H.push(Math.sin(2*Math.PI*Q)/P)}_*=F;
d*=O;for(var J=0;J<r;J++){var A=Math.pow(J/r,w)*r;for(var g=0;g<x;g++){var p=_+H[g<<1]*A,U=d+H[(g<<1)+1]*A,j=~~(.5+(p<0?0:p>F-1?F-1:p)),b=~~(.5+(U<0?0:U>O-1?O-1:U));
v[J*x+g]=W[b*F+j]}}};q.J.dR=function(n,F,O,I,x,r,_,d,w,Z,P,C){var W=new Uint32Array(n.buffer),v=new Uint32Array(I.buffer),L=1/C,H=[],y=O*4,g=1/y;
for(var Q=0;Q<y;Q++)H.push(Math.pow(Q*g,1/w)*O*P);_*=x;d*=r;for(var Q=0;Q<r;Q++)for(var J=0;J<x;J++){var A=L*(J-_),p=Q-d,U=1.75-Math.atan2(p,A)*(1/(2*Math.PI));
U=U-~~U;U=(U+Z)*(1/(1+2*Z));var j=Math.sqrt(A*A+p*p);j=H[~~(j*4)];q.J.Uo(U*F+.5,j+.5,W,F,O,v,Q*x+J,1)}};
q.J.dF=function(n,F,O,I,x){var r=x[0],_=x[1];for(var d=0;d<_;d++)for(var w=0;w<r;w++){var Z=x[2]*w+x[3]*d+x[4],P=x[5]*w+x[6]*d+x[7],C=d*r+w<<2,W=P*F+Z<<2;
I[C]=n[W+0];I[C+1]=n[W+1];I[C+2]=n[W+2];I[C+3]=n[W+3]}};q.W={_p:function(n,F){var O=~~(.499+n*F);return O<0?0:O>F?F:O},afk:function(n,F,O,I,x,r,_,d){var w=O[0],Z=O[1],P=O[2],C=O[3],W=I.d,v=I.v,L=new Float64Array(W*4+8),H=new Float64Array(W*4+8);
for(var y=0,e=0;y<v;y++){var g=L;L=H;H=g;H.fill(0);for(var Q=0;Q<W;Q++,e++){var J=Q+x,A=y+r,p=w*J+Z*A,U=P*J+C*A,j=0,G=0;
if(d==0)j=p+.5;else if(d==1)j=2*Math.sqrt(p*p+U*U);else if(d==2)j=(Math.PI+Math.atan2(-U,-p))/(2*Math.PI);
else if(d==3)j=Math.abs(p*2);else if(d==4)j=2*(Math.abs(p)+Math.abs(U));var b=q.W._p(j,_)*4,s=Q*4;for(var T=0;
T<4;T++){var z=Math.max(0,Math.min(254.999,F[b+T]+L[s+4+T])),m=Math.floor(z);if(Math.random()<z-m)m++;
var $=z-m;L[s+8+T]=$*(7/16);H[s+0+T]=$*(3/16);H[s+4+T]=$*(5/16);H[s+8+T]=$*(1/16);G|=m<<T*8}n[e]=G}}},KJ:[function(n,F,O,I,x,r,_){var d=O[0],w=O[1],Z=O[2],P=O[3],C=I.d,W=I.v;
for(var v=0,e=0;v<W;v++)for(var L=0;L<C;L++,e++){var H=L+x,y=v+r,g=d*H+w*y,Q=Z*H+P*y,J=g+.5;n[e]=F[q.W._p(J,_)]}},function(n,F,O,I,x,r,_){var d=O[0],w=O[1],Z=O[2],P=O[3],C=I.d,W=I.v;
for(var v=0,e=0;v<W;v++)for(var L=0;L<C;L++,e++){var H=L+x,y=v+r,g=d*H+w*y,Q=Z*H+P*y,J=2*Math.sqrt(g*g+Q*Q);
n[e]=F[q.W._p(J,_)]}},function(n,F,O,I,x,r,_){var d=O[0],w=O[1],Z=O[2],P=O[3],C=I.d,W=I.v;for(var v=0,e=0;
v<W;v++)for(var L=0;L<C;L++,e++){var H=L+x,y=v+r,g=d*H+w*y,Q=Z*H+P*y,J=(Math.PI+Math.atan2(-Q,-g))/(2*Math.PI);
n[e]=F[q.W._p(J,_)]}},function(n,F,O,I,x,r,_){var d=O[0],w=O[1],Z=O[2],P=O[3],C=I.d,W=I.v;for(var v=0,e=0;
v<W;v++)for(var L=0;L<C;L++,e++){var H=L+x,y=v+r,g=d*H+w*y,Q=Z*H+P*y,J=Math.abs(g*2);n[e]=F[q.W._p(J,_)]}},function(n,F,O,I,x,r,_){var d=O[0],w=O[1],Z=O[2],P=O[3],C=I.d,W=I.v;
for(var v=0,e=0;v<W;v++)for(var L=0;L<C;L++,e++){var H=L+x,y=v+r,g=d*H+w*y,Q=Z*H+P*y,J=2*(Math.abs(g)+Math.abs(Q));
n[e]=F[q.W._p(J,_)]}}]};q.W.a27=function(n,F){return n+.5};q.W.aeY=function(n,F){return 2*Math.sqrt(n*n+F*F)};
q.W.amU=function(n,F){return(Math.PI+Math.atan2(-F,-n))/(2*Math.PI)};q.W.aiy=function(n,F){return Math.abs(n*2)};
q.W.ai3=function(n,F){return 2*(Math.abs(n)+Math.abs(F))};q.W.Vt=function(n,F,O,I,x,r,_,d,w,Z,P,C){if(n.Clrs==null)return;
var W=new Uint32Array(F.buffer),v=1023,L=q.W.bQ(n.Clrs.v,w,Z);if(C){var H=q.W.aoP(n,L,v+1,_);q.W.afk(W,H,I,O,O.x-x,O.y-r,v,d);
return}var y=q.W.Pp(n,L,v+1,_);if(d<5){q.W.KJ[d](W,y,I,O,O.x-x,O.y-r,v)}else{var g=new Uint8Array(y.buffer),Q=O.d,J=O.v,A=P.Nm-P.Pi,p=1/A,U=P.bh.d-O.d>>1,j=P.bh.v-O.v>>1,b=P.bh.d,s=-.6*p,G=(-.6+.4)*p,T=(-.6+2*.4)*p,z=(-.6+3*.4)*p;
for(var m=0,e=0;m<J;m++)for(var $=0;$<Q;$++,e+=4){var o=0,h=0,X=0,D=0,f=(m+j)*b+$+U,R=(P.Of[f]-P.Pi)*p,i=0;
if(R<=0||R>=1){i=(R<=0?0:v)<<2;F[e]=g[i];F[e+1]=g[i+1];F[e+2]=g[i+2];F[e+3]=g[i+3];continue}i=Math.max(0,Math.min(v-1,Math.round((R+s)*v)))<<2;
h+=g[i];X+=g[i+1];D+=g[i+2];o+=g[i+3];i=Math.max(0,Math.min(v-1,Math.round((R+G)*v)))<<2;h+=g[i];X+=g[i+1];
D+=g[i+2];o+=g[i+3];i=Math.max(0,Math.min(v-1,Math.round((R+T)*v)))<<2;h+=g[i];X+=g[i+1];D+=g[i+2];o+=g[i+3];
i=Math.max(0,Math.min(v-1,Math.round((R+z)*v)))<<2;h+=g[i];X+=g[i+1];D+=g[i+2];o+=g[i+3];F[e]=h>>>2;
F[e+1]=X>>>2;F[e+2]=D>>>2;F[e+3]=o>>>2}}};q.W.bQ=function(n,F,O){var I=[];for(var e=0;e<n.length;e++){var x;
if(n[e].v.Type.v.Clry=="FrgC")x={Q:F>>16&255,l:F>>8&255,O:F&255};else if(n[e].v.Type.v.Clry=="BckC")x={Q:O>>16&255,l:O>>8&255,O:O&255};
else x=q.W.S_(n[e].v.Clr.v);I.push(x)}return I};q.W.S_=function(n){var F,O=n.classID;if(O=="RGBC"){if(n.Rd)F={Q:n.Rd.v,l:n.Grn.v,O:n.Bl.v};
else F={Q:n.redFloat.v*255,l:n.greenFloat.v*255,O:n.blueFloat.v*255}}else if(O=="HSBC"){F=q.xN(n.H.v.val/360,n.Strt.v/100,n.Brgh.v/100);
F.Q*=255;F.l*=255;F.O*=255}else if(O=="CMYC"){var I=100-n.Cyn.v,x=100-n.Mgnt.v,r=100-n.Ylw.v,_=100-n.Blck.v,d=255*I*_*1e-4,w=255*(.2*I+.8*x)*_*1e-4,Z=255*(.2*x+.8*r)*_*1e-4;
F={Q:d,l:w,O:Z}}else if(O=="Grsc")F={Q:255-n.Gry.v,l:255-n.Gry.v,O:255-n.Gry.v};else if(O=="LbCl"){F=q.TK(n.Lmnc.v,n.A.v,n.B.v)}else console.log(n);
if(isNaN(F.Q))F.Q=F.l=F.O=0;return F};q.W.Vm=function(n){return{classID:"RGBC",Rd:{t:"doub",v:n.Q},Grn:{t:"doub",v:n.l},Bl:{t:"doub",v:n.O}}};
q.W.aoP=function(n,F,O,I){var x=[],r=1/(O-0);for(var e=0;e<O;e++){var _=e*4,d=q.W.RA(n,F,(I?O-1-e:e)*r);
x[_]=d[0];x[_+1]=d[1];x[_+2]=d[2];x[_+3]=d[3]}return x};q.W.Pp=function(n,F,O,I){var x=new Uint32Array(O),r=1/(O-0);
for(var e=0;e<O;e++)x[e]=q.W.zL(n,F,(I?O-1-e:e)*r);return x};q.W.RA=function(n,F,O){var I=4096,x=1/4096,r=n.Intr.v*x,_=n.Clrs.v,d=n.Trns.v,w=_.length-1,Z=d.length-1,e=-1,P=0,C=0,W=0,v=0;
while(e<Z&&d[e+1].v.Lctn.v<=O*I)e++;if(e==-1){P=d[0].v.Opct.v.val*(255/100)}else if(e==Z){P=d[e].v.Opct.v.val*(255/100)}else{var L=q.W.ZC(d,x,e,O,r);
P=(L*d[e].v.Opct.v.val+(1-L)*d[e+1].v.Opct.v.val)*(255/100)}e=-1;while(e<w&&_[e+1].v.Lctn.v<=O*I)e++;
if(e==-1){var H=F[0];C=H.Q;W=H.l;v=H.O}else if(e==w){var H=F[e];C=H.Q;W=H.l;v=H.O}else{var y=F[e],g=F[e+1],Q=q.W.ZC(_,x,e,O,r);
C=Q*y.Q+(1-Q)*g.Q;W=Q*y.l+(1-Q)*g.l;v=Q*y.O+(1-Q)*g.O}return[C,W,v,P]};q.W.zL=function(n,F,O){var I=q.W.RA(n,F,O),x=~~(.5+I[0]),r=~~(.5+I[1]),_=~~(.5+I[2]),d=~~(.5+I[3]);
return d<<24|_<<16|r<<8|x};q.W.ZC=function(n,F,e,O,I){if(n.length==2)I*=.5;var x=n[e].v.Lctn.v*F,r=n[e+1].v.Lctn.v*F,_=x+n[e+1].v.Mdpn.v*.01*(r-x),d;
if(O<_)d=.5*(O-x)/(_-x);else d=.5+.5*(O-_)/(r-_);d=.5+.5*(I*Math.cos(Math.PI*d)+(1-I)*(1-2*d));return d};
q.W.VL=function(n,F){var O=Math.PI*n.Angl.v.val/180,I=n.Scl.v.val/100,x=n.Ofst.v,r=x.Hrzn.v.val/100,_=x.Vrtc.v.val/100,d=Math.cos(O),w=-Math.sin(O),Z=.5*F.v,P=Z*(d/w),C=Math.sqrt(Z*Z+P*P),W=.5*F.d,v=W*(w/d),L=Math.sqrt(W*W+v*v),H=Math.min(C,L)*I,y=F.x+F.d/2+r*F.d,g=F.y+F.v/2+_*F.v;
return[new aE(y,g),new aE(y+d*H,g+w*H)]};q.W.aJ=function(n,F,O,I){var x=F.x-n.x,r=-(F.y-n.y),_=Math.sqrt(x*x+r*r),d=Math.atan2(r,x),w=Math.cos(d),Z=-Math.sin(d),P=.5*O.v,C=P*(w/Z),W=Math.sqrt(P*P+C*C),v=.5*O.d,L=v*(Z/w),H=Math.sqrt(v*v+L*L),y=_/Math.min(W,H),g=(n.x-O.x-O.d/2)/O.d,Q=(n.y-O.y-O.v/2)/O.v;
I.Angl.v.val=180*d/Math.PI;I.Scl.v.val=y*100;var J=I.Ofst.v;J.Hrzn.v.val=g*100;J.Vrtc.v.val=Q*100};q.W.ne=function(n,F){for(var e=0;
e<n.length;e++){var O=n[e],I=Math.round(O[0]*4096),x=O[1],r=O[2],_=O[3];if(r==null)r=1;if(_==null)_=.5;
var d=q.W.Vm({Q:x[0]*255,l:x[1]*255,O:x[2]*255});F.Clrs.v[e]={t:"Objc",v:{classID:"Clrt",Lctn:{t:"long",v:I},Mdpn:{t:"long",v:Math.round(_*100)},Clr:{t:"Objc",v:d},Type:{t:"enum",v:{Clry:"UsrS"}}}};
F.Trns.v[e]={t:"Objc",v:{classID:"TrnS",Lctn:{t:"long",v:I},Mdpn:{t:"long",v:Math.round(_*100)},Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(r*100)}}}}}};
q.Kl={};q.Kl.a0T=function(n,F,O,I,x,r,_,d,w,Z,P,C){var W,v,L,H=Date.now(),y=!1,g=_,Q=Z,J,A,p,U,j=r*255,b=255-w*255,s=1+x*6,G=1+d*6,T=1+C*4,z=(T-1)/7,m=0,$=255-0,o,h,X,D,f,R,i,t,N,M,hK,bD,co,iM=0,hs=1,S,a,bV,a5,i9,dG,ap,bk,c2,gg,bH=1+P,gw,gP=q.f(O*I),dT=q.f(O*I),fU=q.f(O*I),dV=q.f(O*I),ac=255/j,e2=255/(255-b);
for(v=0;v<I;v++){for(W=0;W<O;W++){var e=v*O+W,cX=e<<2;S=q.iB(n[cX],n[cX+1],n[cX+2]);dV[e]=S;if(S<j)gP[e]=255-S*ac;
if(S>b)dT[e]=255-(255-S)*e2}}if(y)console.log("init",Date.now()-H);H=Date.now();if(x*g>0){fU.set(gP);
q.Mo.pp(fU,gP,new gv(0,0,O,I),g)}if(d*Q>0){fU.set(dT);q.Mo.pp(fU,dT,new gv(0,0,O,I),Q)}if(y)console.log("blur",Date.now()-H);
H=Date.now();var eR=q.f(256),gR=q.f(256);for(var e=0;e<256;e++){var bN=e*(1/255),eG=0;eG=(1-Math.pow(1-bN,s))*255;
eR[e]=Math.max(0,Math.min(255,~~(eG+.5)));eG=Math.pow(bN,G)*255;gR[e]=Math.max(0,Math.min(255,~~(eG+.5)))}var ef=new Uint8ClampedArray(F.buffer),fi=new Float32Array(32768);
for(var e=0;e<32768;e++){gw=Math.sqrt(e)*(1/128);if(bH>1)gw=(1-gw)*(bH-1)+1;else gw=gw*(bH-1)+1;fi[e]=gw}for(v=0;
v<I;v++){for(W=0;W<O;W++){var e=v*O+W,cX=e<<2,eG=dV[e],ep=gP[e]*(1/255),iJ=dT[e]*(1/255);eG=(1-ep)*eG+ep*eR[~~eG];
eG=(1-iJ)*eG+iJ*gR[~~eG];S=eG;var aT=n[cX],dm=n[cX+1],c1=n[cX+2];a=-aT*.168736-dm*.331264+c1*.5;bV=aT*.5-dm*.418688-c1*.081312;
gw=fi[~~(.5+a*a+bV*bV)];a5=a*gw;dG=bV*gw;hs=1-Math.min(2-(ep+iJ),1);a=hs*a+(1-hs)*a5;bV=hs*bV+(1-hs)*dG;
bk=S+1.402*bV;c2=S-.34414*a-.71414*bV;gg=S+1.772*a;ef[cX]=~~(.5+bk);ef[cX+1]=~~(.5+c2);ef[cX+2]=~~(.5+gg)}}if(y)console.log("apply masks",Date.now()-H);
H=Date.now()};q.Aa={};q.Aa.VY=function(n,F,O,I,x){var r=!1,L=1,$=0,o=0,N=0,c2=0;if(!F.zp(x)){var _=F.Tq(x),d=q.f(_.X()*4);
q.nF(n,F,d,_);n=d;F=_}var w=q.f(F.X());q.k9(O,x,w,F);q.round(w);x=x.lN(F);var Z=x.d,P=x.v,C=Z*3<P?2:1,W=P*3<Z?2:1;
if(x.X()*(C*2+1)*(W*2+1)<F.X()){var _=new gv(x.x-Z*C,x.y-P*C,Z*(C*2+1),P*(W*2+1)).lN(F),d=q.f(_.X()*4);
q.nF(n,F,d,_);var v=q.f(_.X());q.k9(w,F,v,_);F=_;n=d;w=v}while((F.d+F.v)/2/L>400)L++;var H=n,y=F,g=w,Q=Math.floor(y.d/L),J=Math.floor(y.v/L);
n=q.f(Q*J*4);q.scale.qJ(H,y.d,y.v,n,Q,J,1/L);w=q.f(Q*J);q.scale.dF(g,y.d,y.v,w,Q,J,1/L);q.round(w,1);
var A=q.$o(w,new gv(0,0,Q,J));if(A.D2())return 1;var p=Math.round((A.d+A.v)/2/15),U=Date.now(),j=q.f(Q*J*4);
q.aaa(n,j);var b=Int16Array,s=new b(Q*J*24),G=new b(64),T=new b(64),z=new b(64),m=new b(64);for(var h=3;
h<J-4;h++)for(var X=3;X<Q-4;X++){var D=h*Q+X;if(w[D]==255)continue;if(q.Aa.a2q(j,w,X,h,Q,J,G,T,z)!=0)continue;
q.Aa.VU(G,m);s[$]=X;s[$+1]=h;q.Aa.Ct(G,s,$+4,12);$+=16;q.Aa.VU(T,m);q.Aa.Ct(T,s,$,4);$+=4;q.Aa.VU(z,m);
q.Aa.Ct(z,s,$,4);$+=4;var f=s[$-24+5],R=s[$-24+6];s[$-24+5]=s[$-24+20];s[$-24+6]=s[$-24+16];s[$-24+16]=f;
s[$-24+20]=R;o++}if(o==0)return 2;if(r)console.log(Date.now()-U,"FWHT computed");U=Date.now();var i=[];
q.Aa.Mz(0,o-1,i,s,new b(2*24));if(r)console.log(Date.now()-U,"KD tree computed");U=Date.now();var t=new Float32Array(Q*J*4);
for(var e=0;e<o;e++){var M=e,hK=q.Aa.akD(M,s,i,p);if(hK==-1)continue;var bD=M*24,co=hK*24,iM=s[bD],hs=s[bD+1],S=s[co],a=s[co+1];
N+=q.Aa.getError(co,bD,s,1e99);var bV=S-iM,a5=a-hs;t[(J+a5)*2*Q+(Q+bV)]+=1}if(r)console.log(Date.now()-U,"NN found");
U=Date.now();var i9=[],dG=1/(2*Q);for(var e=0;e<t.length;e++){if(t[e]>0){var h=Math.floor(e*dG),X=e-h*2*Q;
i9.push({x:X-Q,y:h-J,G:t[e],ar:-1})}}i9.sort(function(iJ,aT){return aT.G-iJ.G});var ap=new Int32Array(Q*J),bk=[];
for(var e=0;e<Q*J;e++){if(w[e]==255){ap[e]=c2;bk.push(e%Q,Math.floor(e/Q));c2++}else if(n[(e<<2)+3]<200){ap[e]=-2}else{ap[e]=-1}}var gg=q.Aa.anJ(Q,J,i9,ap,bk,c2);
if(gg==null){return 3}var bH=gg.zt,top=gg.top;bH=q.Aa.ada(bH,n,Q,J,top,ap,bk,c2);if(r)console.log(Date.now()-U,"optimal labeling found");
U=Date.now();var _=x.clone();_.EM(1,1);_=_.lN(y);var gw=q.f(_.X()*4),fU=q.f(_.X());q.nF(H,y,gw,_);var dV=y.d,ac=y.v;
for(var h=0;h<ac;h++)for(var X=0;X<dV;X++){if(g[h*dV+X]==0)continue;var e2=Math.min(Math.floor(X/L),Q-1),cX=Math.min(Math.floor(h/L),J-1),eR=ap[cX*Q+e2],gR=bH[eR],bN=top[gR],eG=X+bN.x*L,ef=h+bN.y*L,fi=ef*dV+eG<<2,ep=(h-_.y+y.y)*_.d+(X-_.x+y.x)<<2;
gw[ep]=H[fi];gw[ep+1]=H[fi+1];gw[ep+2]=H[fi+2];gw[ep+3]=H[fi+3];gw[ep+3]=H[fi+3];fU[ep>>2]=gR+1}if(r)console.log(Date.now()-U,"copied back");
U=Date.now();q.Mr.VY(gw,fU,_,null,1e3);if(r)console.log(Date.now()-U,"poisson smooth");U=Date.now();
q.nF(gw,_,I,x);return 0};q.Aa.B0=function(n,F,O,I,x,r){return q.Aa.W4(n+x.x,F+x.y,O,I)&&r[(F+x.y)*O+(n+x.x)]==-1?0:1e9};
q.Aa.ada=function(n,F,O,I,top,x,r,_){var d=Date.now(),w=[-1,0,0,-1,1,0,0,1],Z=1e99,P=[],C=[],W=2*(_*2*3+_*2),v=null,L=0,H=0,y=0,g=1e99;
while(!0&&Date.now()<d+12e3){y++;var Q=null,J=Z;for(var A=0;A<top.length;A++){var p=top[A],U=0,j=_+2,b=0;
for(var e=0;e<_;e++){var s=r[e*2],G=r[e*2+1],T=top[n[e]],z=q.Aa.B0(s,G,O,I,p,x),m=n[e]==A?1e9:q.Aa.B0(s,G,O,I,T,x);
for(var E=0;E<4;E++){if(E==0&&s==0||E==1&&G==0||E==2&&s==O-1||E==3&&G==I-1)continue;var $=w[2*E],o=w[2*E+1],h=s+$,X=G+o,D=x[X*O+h];
if(D==-2){}else if(D==-1){z+=3*q.Aa.mn(h+p.x,X+p.y,h,X,O,I,F,x);z+=2*q.Aa.mn(h+p.x+$,X+p.y+o,h+$,X+o,O,I,F,x);
m+=3*q.Aa.mn(h+T.x,X+T.y,h,X,O,I,F,x);m+=2*q.Aa.mn(h+T.x+$,X+T.y+o,h+$,X+o,O,I,F,x)}else if(E>1){if(n[e]==n[D]){var f=0;
f+=q.Aa.mn(s+T.x,G+T.y,s+p.x,G+p.y,O,I,F,x);f+=q.Aa.mn(h+T.x,X+T.y,h+p.x,X+p.y,O,I,F,x);P[U]=e;P[U+1]=D;
C[U]=f;C[U+1]=f;U+=2}else{var R=top[n[D]],i=j,t=0,N=0,M=0;j++;t+=q.Aa.mn(s+T.x,G+T.y,s+p.x,G+p.y,O,I,F,x);
t+=q.Aa.mn(h+T.x,X+T.y,h+p.x,X+p.y,O,I,F,x);N+=q.Aa.mn(s+R.x,G+R.y,s+p.x,G+p.y,O,I,F,x);N+=q.Aa.mn(h+R.x,X+R.y,h+p.x,X+p.y,O,I,F,x);
M+=q.Aa.mn(s+R.x,G+R.y,s+T.x,G+T.y,O,I,F,x);M+=q.Aa.mn(h+R.x,X+R.y,h+T.x,X+T.y,O,I,F,x);P[U]=e;P[U+1]=i;
C[U]=t;C[U+1]=t;U+=2;P[U]=D;P[U+1]=i;C[U]=N;C[U+1]=N;U+=2;P[U]=i;P[U+1]=_+1;C[U]=M;C[U+1]=0;U+=2}}}P[U]=_;
P[U+1]=e;C[U]=z;C[U+1]=0;U+=2;P[U]=e;P[U+1]=_+1;C[U]=m;C[U+1]=0;U+=2;b+=Math.min(z,m)}if(b>J)continue;
var hK=q.nK.bM(j,U,_,_+1,P,C,J);if(hK.Gh<J){J=hK.Gh;var bD=n.slice(0);q.Aa.a1q(bD,U,P,hK.VD,A,_);Q=bD}}if(J*1>=Z){break}Z=J;
n=Q;if((y&3)==0){if(J*1.03>=g)break;g=J}if((y&3)==0){var co=0*top.length;for(var e=0;e<top.length&&top.length>co;
e++){if(n.indexOf(e)!=-1)continue;top.splice(e,1);for(var D=0;D<n.length;D++)if(n[D]>e)n[D]--;e--}}}return n};
q.Aa.a1q=function(n,F,O,I,x,r){for(var e=0;e<I.length;e++){var _=I[e]<<1,d=0,w=0;if(_<F){d=O[_];w=O[_+1]}else{w=O[_];
d=O[_+1]}if(d==r&&n[w]!=x)n[w]=x}};q.Aa.Z1=function(top,n,F,O,I,x,r,_,d){for(var e=0;e<F.length;e++){var w=F[e],Z=!0;
if(_!=null&&!(q.Aa.W4(_+w.x,d+w.y,x,r)&&O[x*(d+w.y)+_+w.x]==-1))continue;if(w.ar==-1)w.ar=q.Aa.a4_(w,O,I,x,r);
if(w.ar<=0)continue;for(var P=0;P<top.length;P++){var C=top[P],W=w.x-C.x,v=w.y-C.y;if(W*W+v*v<n){Z=!1;
break}}if(Z)return w}return null};q.Aa.a4_=function(n,F,O,I,x){var r=0;for(var e=0;e<O.length;e+=2){var _=O[e]+n.x,d=O[e+1]+n.y;
if(q.Aa.W4(_,d,I,x)&&F[I*d+_]==-1)r++}return r/(O.length>>1)};q.Aa.anJ=function(n,F,O,I,x,r){var top=[];
for(var e=0;e<60;e++){var _=q.Aa.Z1(top,25,O,I,x,n,F);if(_==null)break;else top.push(_)}if(top.length==0)return null;
var d=[];for(var e=0;e<r;e++){var w=x[e*2],Z=x[e*2+1],P=-1,C=0;while(!0){C++;var W=Math.random();P=Math.floor(W*.99999*top.length);
var v=top[P],L=w+v.x,H=Z+v.y;if(q.Aa.W4(L,H,n,F)&&I[H*n+L]==-1)break;if(C>100){var _;_=q.Aa.Z1(top,0,O,I,x,n,F,w,Z);
if(_==null)return null;top.push(_);C=0}}d.push(P)}return{top:top,zt:d}};q.Aa.mn=function(n,F,O,I,x,r,_,d){if(n==O&&F==I)return 0;
if(n<0||F<0||n>=x||F>=r||O<0||I<0||O>=x||I>=r||d[F*x+n]!=-1||d[I*x+O]!=-1)return 1e7;var w=F*x+n<<2,Z=I*x+O<<2,P=_[w]-_[Z],C=_[w+1]-_[Z+1],W=_[w+2]-_[Z+2];
return 1+(P*P+C*C+W*W)};q.Aa.W4=function(n,F,O,I){return n>=0&&n<O&&F>=0&&F<I};q.Aa.akD=function(n,F,O,I){var x=24*n,r=F[x],_=F[x+1],d=I*I,w=0,W=1e9;
while(O[w]!=99)if(F[x+O[w]]<O[w+1])w=O[w+2];else w=O[w+3];var Z=O[w+1],P=O[w+2],C=-1;for(var e=Z;e<=P;
e++){var w=e,v=w*24,L=F[v],H=F[v+1];if((L-r)*(L-r)+(H-_)*(H-_)<d)continue;var y=q.Aa.getError(v,x,F,W);
if(y<W){W=y;C=w}}return C};q.Aa.getError=function(n,F,O,I){var x=0;for(var r=4;r<24;r+=4){var _=O[F+r]-O[n+r],d=O[F+r+1]-O[n+r+1],w=O[F+r+2]-O[n+r+2],Z=O[F+r+3]-O[n+r+3];
x+=_*_+d*d+w*w+Z*Z;if(x>=I)return x+1}return x};q.Aa.Mz=function(n,F,O,I,x){var r=16,W=0;if(F-n<=r){O.push(99,n,F);
return}q.Aa.gh(n,F,I,x);var _=-1,d=-1;for(var e=4;e<24;e++){var w=x[2*e+1]-x[2*e];if(w>d){d=w;_=e}}var Z=n+F>>1,P=q.Aa.a6u(Z,n,F,I,_),C=-1;
for(var e=n;e<=F;e++)if(I[24*e+_]==P){if(C==-1)C=e;W=e}if(n+8<C&&C-n>F-W)Z=C;else if(W+1<F-8)Z=W+1;else if(F-n<64){O.push(99,n,F);
return}else Z=Z;var v=O.length;O.push(_,P,0,0);O[v+2]=v+4;q.Aa.Mz(n,Z-1,O,I,x);O[v+3]=O.length;q.Aa.Mz(Z,F,O,I,x)};
q.Aa.gh=function(n,F,O,I){for(var e=0;e<48;e+=4){I[e]=3e4;I[e+1]=-3e4;I[e+2]=3e4;I[e+3]=-3e4}for(var e=n;
e<=F;e++){var x=e*24;for(var r=0;r<24;r++){var _=O[x+r],d=I[r<<1],w=I[(r<<1)+1];if(_<d)I[r<<1]=_;if(_>w)I[(r<<1)+1]=_}}};
q.Aa.Pq=function(n,F,O){var I=0,e=0;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;
e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;
e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;
e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;
e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;
e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;
e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;
e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;
e++;I=O[n+e];O[n+e]=O[F+e];O[F+e]=I;e++};q.Aa.Xb=function(n,F,O,I){var x=O+I>>>1,r=n[24*x+F];while(O<=I){while(n[24*O+F]<r)O++;
while(n[24*I+F]>r)I--;if(O<=I){if(n[24*O+F]!=n[24*I+F])q.Aa.Pq(O*24,I*24,n);O++;I--}}return O};q.Aa.a6u=function(n,F,O,I,x){var r=0;
while(F!=O){r=q.Aa.Xb(I,x,F,O);if(n<r)O=r-1;else F=r}return I[n*24+x]};q.Aa.Ct=function(n,F,O,I){for(var e=0;
e<I;e++)F[O+e]=n[e]};q.Aa.a2q=function(n,F,O,I,x,r,_,d,w){var Z=(I-3)*x+(O-3),P=Z<<2;for(var C=0;C<8;
C++){if(F[Z]+F[Z+1]+F[Z+2]+F[Z+3]+F[Z+4]+F[Z+5]+F[Z+6]+F[Z+7]!=0||n[P+3]<200||n[P+7]<200||n[P+11]<200||n[P+15]<200||n[P+19]<200||n[P+23]<200||n[P+27]<200||n[P+31]<200)return 1;
var e=C<<3;_[e+0]=n[P+0];d[e+0]=n[P+1];w[e+0]=n[P+2];_[e+1]=n[P+4];d[e+1]=n[P+5];w[e+1]=n[P+6];_[e+2]=n[P+8];
d[e+2]=n[P+9];w[e+2]=n[P+10];_[e+3]=n[P+12];d[e+3]=n[P+13];w[e+3]=n[P+14];_[e+4]=n[P+16];d[e+4]=n[P+17];
w[e+4]=n[P+18];_[e+5]=n[P+20];d[e+5]=n[P+21];w[e+5]=n[P+22];_[e+6]=n[P+24];d[e+6]=n[P+25];w[e+6]=n[P+26];
_[e+7]=n[P+28];d[e+7]=n[P+29];w[e+7]=n[P+30];P+=x<<2;Z+=x}return 0};q.Aa.VU=function(n,F){F[0]=n[32]+n[0];
F[1]=n[33]+n[1];F[2]=n[34]+n[2];F[3]=n[35]+n[3];F[4]=n[36]+n[4];F[5]=n[37]+n[5];F[6]=n[38]+n[6];F[7]=n[39]+n[7];
F[8]=n[40]+n[8];F[9]=n[41]+n[9];F[10]=n[42]+n[10];F[11]=n[43]+n[11];F[12]=n[44]+n[12];F[13]=n[45]+n[13];
F[14]=n[46]+n[14];F[15]=n[47]+n[15];F[16]=n[48]+n[16];F[17]=n[49]+n[17];F[18]=n[50]+n[18];F[19]=n[51]+n[19];
F[20]=n[52]+n[20];F[21]=n[53]+n[21];F[22]=n[54]+n[22];F[23]=n[55]+n[23];F[24]=n[56]+n[24];F[25]=n[57]+n[25];
F[26]=n[58]+n[26];F[27]=n[59]+n[27];F[28]=n[60]+n[28];F[29]=n[61]+n[29];F[30]=n[62]+n[30];F[31]=n[63]+n[31];
F[32]=n[0]-n[32];F[33]=n[1]-n[33];F[34]=n[2]-n[34];F[35]=n[3]-n[35];F[36]=n[4]-n[36];F[37]=n[5]-n[37];
F[38]=n[6]-n[38];F[39]=n[7]-n[39];F[40]=n[8]-n[40];F[41]=n[9]-n[41];F[42]=n[10]-n[42];F[43]=n[11]-n[43];
F[44]=n[12]-n[44];F[45]=n[13]-n[45];F[46]=n[14]-n[46];F[47]=n[15]-n[47];F[48]=n[16]-n[48];F[49]=n[17]-n[49];
F[50]=n[18]-n[50];F[51]=n[19]-n[51];F[52]=n[20]-n[52];F[53]=n[21]-n[53];F[54]=n[22]-n[54];F[55]=n[23]-n[55];
F[56]=n[24]-n[56];F[57]=n[25]-n[57];F[58]=n[26]-n[58];F[59]=n[27]-n[59];F[60]=n[28]-n[60];F[61]=n[29]-n[61];
F[62]=n[30]-n[62];F[63]=n[31]-n[63];n[0]=F[16]+F[0];n[1]=F[17]+F[1];n[2]=F[18]+F[2];n[3]=F[19]+F[3];
n[4]=F[20]+F[4];n[5]=F[21]+F[5];n[6]=F[22]+F[6];n[7]=F[23]+F[7];n[8]=F[24]+F[8];n[9]=F[25]+F[9];n[10]=F[26]+F[10];
n[11]=F[27]+F[11];n[12]=F[28]+F[12];n[13]=F[29]+F[13];n[14]=F[30]+F[14];n[15]=F[31]+F[15];n[16]=F[0]-F[16];
n[17]=F[1]-F[17];n[18]=F[2]-F[18];n[19]=F[3]-F[19];n[20]=F[4]-F[20];n[21]=F[5]-F[21];n[22]=F[6]-F[22];
n[23]=F[7]-F[23];n[24]=F[8]-F[24];n[25]=F[9]-F[25];n[26]=F[10]-F[26];n[27]=F[11]-F[27];n[28]=F[12]-F[28];
n[29]=F[13]-F[29];n[30]=F[14]-F[30];n[31]=F[15]-F[31];F[0]=n[8]+n[0];F[1]=n[9]+n[1];F[2]=n[10]+n[2];
F[3]=n[11]+n[3];F[4]=n[12]+n[4];F[5]=n[13]+n[5];F[6]=n[14]+n[6];F[7]=n[15]+n[7];F[8]=n[0]-n[8];F[9]=n[1]-n[9];
F[10]=n[2]-n[10];F[11]=n[3]-n[11];F[12]=n[4]-n[12];F[13]=n[5]-n[13];F[14]=n[6]-n[14];F[15]=n[7]-n[15];
n[0]=F[4]+F[0];n[1]=F[5]+F[1];n[2]=F[6]+F[2];n[3]=F[7]+F[3];n[4]=F[0]-F[4];n[5]=F[1]-F[5];n[6]=F[2]-F[6];
n[7]=F[3]-F[7];n[8]=F[12]+F[8];n[9]=F[13]+F[9];n[10]=F[14]+F[10];n[11]=F[15]+F[11];n[12]=F[8]-F[12];
n[13]=F[9]-F[13];n[14]=F[10]-F[14];n[15]=F[11]-F[15];F[0]=n[2]+n[0];F[1]=n[3]+n[1];F[2]=n[0]-n[2];F[3]=n[1]-n[3];
F[4]=n[6]+n[4];F[5]=n[7]+n[5];F[6]=n[4]-n[6];F[7]=n[5]-n[7];F[8]=n[10]+n[8];F[9]=n[11]+n[9];F[10]=n[8]-n[10];
F[11]=n[9]-n[11];F[12]=n[14]+n[12];F[13]=n[15]+n[13];F[14]=n[12]-n[14];F[15]=n[13]-n[15];n[0]=F[1]+F[0];
n[1]=F[0]-F[1];n[2]=F[3]+F[2];n[3]=F[2]-F[3];n[4]=F[5]+F[4];n[5]=F[4]-F[5];n[6]=F[7]+F[6];n[7]=F[6]-F[7];
n[8]=F[9]+F[8];n[9]=F[8]-F[9];n[10]=F[11]+F[10];n[11]=F[10]-F[11];n[12]=F[13]+F[12];n[13]=F[12]-F[13];
n[14]=F[15]+F[14];n[15]=F[14]-F[15]};q.Aa.agj=function(){var n="",E=64,F="v",O="t",I="a",x=5,e,r,_;for(e=E>>1;
e>0;e>>=1,x--){for(r=0;r<E;r++){_=(r>>x&1)!=0;if(_){n+=O+"["+r+"] = "+F+"["+(-e+r)+"] - "+F+"["+r+"];  "}else{n+=O+"["+r+"] = "+F+"["+(e+r)+"] + "+F+"["+r+"];  "}}I=F;
F=O;O=I;n+="\n"}console.log(n)};q.Aa.amg=function(E,n,F){var O=n,I=F,x=O,r=0,e,d,w;while(E>>r!=2)r++;
var _=r;for(e=E>>1;e>0;e>>=1,r--){for(d=0;d<E;d++){w=(d>>r&1)!=0;if(w)I[d]=O[-e+d]-O[d];else I[d]=O[e+d]+O[d]}x=O;
O=I;I=x}if((_&1)==1)for(e=0;e<E;e++)F[e]=O[e]};q.uH={};q.uH.FF=function(n,F,O,I,x,r,_,d,w){var Z=Date.now(),P=new Uint32Array(n.buffer),C=new Uint32Array(F.buffer),W=_/O,v=d/I,L=1/W,H=1/v,y=new Float64Array(2),g=3,Q=1/g,J=1/(g*g),A=0,p=0,U=O,j=I;
if(x){A=x.x;p=x.y;U=x.d;j=x.v}for(var b=0;b<j;b++)for(var s=0;s<U;s++){var G=A+s,T=p+b,e=T*O+G,z=e<<1,m=e<<2;
q.uH.a0B(r,_,d,(G+.5)*W,(T+.5)*v,y);var $=y[0]*L,o=y[1]*H;if($==0&&o==0)C[e]=P[e];else{q.J.Uo(G+$+.5,T+o+.5,P,O,I,C,e,w)}}};
q.uH.a0B=function(n,F,O,I,x,r){I-=.499999;x-=.499999;var _=~~I,d=~~x,w=I-_,Z=x-d,P=(1-Z)*(1-w),C=(1-Z)*w,W=Z*(1-w),v=Z*w,L=_<F-1?_+1:_,H=d<O-1?d+1:d,y=d*F+_<<1,g=d*F+L<<1,Q=H*F+_<<1,J=H*F+L<<1;
r[0]=P*n[y]+C*n[g]+W*n[Q]+v*n[J];r[1]=P*n[y+1]+C*n[g+1]+W*n[Q+1]+v*n[J+1]};q.uH.aef=function(n,F,O,I,x){var r=1/n,_=[-1,1,-n,n],d=I.length;
for(var w=0;w<d;w++){var e=I[w],Z=e<<1,P=w<<1,C=~~(e*r),W=e-n*C,v=O[Z],L=O[Z+1],H=0,y=0;if(W!=0&&W!=n-1){var g=e-1<<1,Q=e+1<<1,J=O[g],A=O[Q],p=O[g+1],U=O[Q+1],j=v-(J+A)*.5,b=L-(p+U)*.5;
H-=j*x;y-=b*x}if(C!=0&&C!=F-1){var g=e-n<<1,Q=e+n<<1,J=O[g],A=O[Q],p=O[g+1],U=O[Q+1],j=v-(J+A)*.5,b=L-(p+U)*.5;
H-=j*x;y-=b*x}O[Z]=v+H;O[Z+1]=L+y}};q.uH.acy=function(n,F){var O=n+","+F;if(q.uH.Ng==O)return q.uH.kF;
var I=q.uH.kF=[];q.uH.Ng=O;for(var e=0;e<=1e3;e++){var x=e*.001,r=Math.sqrt(x),_=Math.exp(-4*r),d=.96*(1-r*r),w=F*((1-n)*_+n*d);
I[e]=w}return I};q.uH.Ng="";q.uH.kF=[];q.uH.a7r=function(n,F,O,I,x,r,_,d,w,Z,P,C,W){var v=Math.max(0,Math.floor(x-_-1)),L=Math.min(F,Math.ceil(x+_+1)),H=Math.max(0,Math.floor(r-_-1)),y=Math.min(O,Math.ceil(r+_+1)),g=2*F,Q=_*_,J=1/_,A=0;
if(W&&(I==3||I==6))w=-w;var p=q.uH.acy(d,w);for(var U=H;U<y;U++)for(var j=v;j<L;j++){var e=U*F+j,b=e<<1,s=(x-j)*J,G=(r-U)*J,T=s*s+G*G;
if(T<1){C[A]=e;var z=p[~~(T*1e3)];if(I==1){n[b]=n[b]*(1-z*.05);n[b+1]=n[b+1]*(1-z*.05)}else{var m=0,$=0,X,D,f,R;
if(I==0){m=Z*z;$=P*z}else if(I==2){}else if(I==3){m=z*G;$=-z*s}else if(I==4){m=z*s;$=z*G}else if(I==5){m=-z*s;
$=-z*G}else if(I==6){m=P*z;$=-Z*z}var o=n[b],h=n[b+1];if(j==0||j!=F-1&&m<0){X=1+n[b+2]-o;f=n[b+3]-h}else{X=o-n[b-2]+1;
f=h-n[b-1]}if(U==0||U!=O-1&&$<0){D=n[b+g]-o;R=1+n[b+g+1]-h}else{D=o-n[b-g];R=h-n[b-g+1]+1}n[b]=-(X*m+D*$-o);
n[b+1]=-(f*m+R*$-h)}A++}}};q.uH.abG=function(n){var F=n[0],O=n[0],I=n[1],x=n[1];for(var e=0;e<n.length;
e+=2){var r=n[e],_=n[e+1];if(r<F)F=r;else if(r>O)O=r;if(_<I)I=_;else if(_>x)x=_}return[F,I,O,x]};q.anE=function(n,F,O,I,x){function r(S,a,bV,a5){return Math.sqrt((S-bV)*(S-bV)+(a-a5)*(a-a5))}function _(S,a){return S>=0&&S<F&&a>=0&&a<O}function d(S){if(S<0)return 0;
if(S>=F)return F-1;return S}function w(S){if(S<0)return 0;if(S>=O)return O-1;return S}function Z(e,S){var a=S[3]*(1/255),bV=I[e]+S[0]*a;
if(bV>255)bV=255;I[e]=bV;bV=I[e+1]+S[1]*a;if(bV>255)bV=255;I[e+1]=bV;bV=I[e+2]+S[2]*a;if(bV>255)bV=255;
I[e+2]=bV}function P(S,a,bV){if(!i(S,a))return;if(bV[3]<0)bV[3]=0;Z((a*F+S)*4,bV)}function C(S){var a=S.slice(0,3);
a[3]=0;return a}var W=F/800;function v(S){return Math.round(S*W)}function L(){for(var e=0;e<=300;e++){N[e]=H(e)}}function H(O){var S=.8,a=.2,bV=S*a,a5=O/60%2-1,i9=bV*(1-a5*a5),dG=a-bV,ap;
if(O<60){ap=[bV+dG,i9,0]}else if(O<120){ap=[i9,bV,0]}else if(O<180){ap=[0,bV,i9]}else if(O<240){ap=[0,i9,bV]}else if(O<300){ap=[i9,0,bV]}else{ap=[bV,0,i9]}return[(ap[0]+dG)*255,(ap[1]+dG)*255,(ap[2]+dG)*255]}function y(O){return N[~~O]}function g(S){return 1-Q(S)}function Q(S){return S-~~S}function J(S,a,bV,a5){f(S,a,bV,0,a+1,1,a5)}function A(S,a,bV,a5,i9,dG){f(S,a,bV,0,a5,1,i9,dG)}function p(S){for(var e=0;
e<I.length;e+=4){Z(e,S)}}function U(S,a,bV,a5,i9,dG,ap,bk){j(S,a,bV,a5,i9,1,dG,ap,bk)}function j(S,a,bV,a5,i9,dG,ap,bk,c2){if(dG==null)dG=.5;
if(ap==null)ap=0;if(bk==null)bk=0;if(c2==null)c2=!1;var gg=S.x,bH=S.y,gw=bV.slice(0),gP=~~(bV[3]*hK);
a5=a5*hK;if(!c2){a=R(a);i9=R(i9);ap=R(ap);bk=R(bk)}var dT=d(gg-a),fU=d(gg+a);for(var dV=dT;dV<=fU;dV++){var ac=dV-gg,e2=Math.floor(Math.sqrt(a*a-ac*ac)),cX=w(bH-e2),eR=w(bH);
for(var gR=cX;gR<=eR;gR++){var bN=r(dV,gR,gg,bH);if(bN>a||bN<=a-i9)break;var eG=(bN-a+i9)/i9;gw[3]=gP-a5*(dG==1?eG:Math.pow(eG,dG));
Z((gR*F+dV)*4,gw)}cX=w(bH+e2);for(var gR=cX;gR>eR;gR--){var bN=r(dV,gR,gg,bH);if(bN>a||bN<=a-i9)break;
var eG=(bN-a+i9)/i9;gw[3]=gP-a5*(dG==1?eG:Math.pow(eG,dG));Z((gR*F+dV)*4,gw)}}if(ap>0){f(S,a+ap,gw,gw[3],ap,1,0,0,!0)}if(bk>0){f(S,a-i9,t(bV),-bV[3],bk,1,0,0,!0)}}function b(S,a,bV,a5,i9,dG){f(S,a,bV,bV[3],a+1,1,a5,i9,dG)}function s(S,a,bV,a5,i9){if(i9==null)i9=!1;
var dG=S.x,ap=S.y;a5*=hK;if(!i9){a=R(a);bV=R(bV)}var bk=d(dG-a),c2=d(dG+a);for(var gg=bk;gg<c2;gg++){var bH=gg-dG,gw=~~Math.sqrt(a*a-bH*bH),gP=w(ap-gw),dT=w(ap);
for(var fU=gP;fU<=dT;fU++){var dV=r(gg,fU,dG,ap);if(dV>a||dV<=a-bV)break;var ac=(a-dV)/bV,e2=y(300*ac);
e2[3]=a5;Z((fU*F+gg)*4,e2)}gP=w(ap+gw);for(var fU=gP;fU>dT;fU--){var dV=r(gg,fU,dG,ap);if(dV>a||dV<=a-bV)break;
var ac=(a-dV)/bV,e2=y(300*ac);e2[3]=a5;Z((fU*F+gg)*4,e2)}}}function G(M,S){var a=M.Yd,bV=M.tH,a5=S.slice(0),i9=S[3]*hK,dG=Math.abs(bV.y-a.y)>Math.abs(bV.x-a.x);
if(dG){var ap=a.x;a.x=a.y;a.y=ap;ap=bV.x;bV.x=bV.y;bV.y=ap}if(a.x>bV.x){var ap=a;a=bV;bV=ap}var bk=bV.x-a.x,c2=bV.y-a.y,gg=bk==0?1:c2/bk,bH=Math.round(a.x),gw=a.y+gg*(bH-a.x),gP=g(a.x+.5),dT=bH,fU=~~gw;
if(dG){a5[3]=i9*g(gw)*gP;P(fU,dT,a5);a5[3]=i9*Q(gw)*gP;P(fU+1,dT,a5)}else{a5[3]=i9*g(gw)*gP;P(dT,fU,a5);
a5[3]=i9*Q(gw)*gP;P(dT,fU+1,a5)}var dV=gw-gg;bH=Math.round(bV.x);gw=bV.y+gg*(bH-bV.x);gP=Q(bV.x+.5);
var ac=bH,e2=~~gw;if(dG){a5[3]=i9*g(gw)*gP;P(e2,ac,a5);a5[3]=i9*Q(gw)*gP;P(e2+1,ac,a5)}else{a5[3]=i9*g(gw)*gP;
P(ac,e2,a5);a5[3]=i9*Q(gw)*gP;P(ac,e2+1,a5)}if(dG){for(var cX=dT+1;cX<=ac-1;cX++){a5[3]=i9*g(dV);P(~~dV,cX,a5);
a5[3]=i9*Q(dV);P(~~dV+1,cX,a5);dV+=gg}}else{for(var cX=dT+1;cX<=ac-1;cX++){a5[3]=i9*g(dV);P(cX,~~dV,a5);
a5[3]=i9*Q(dV);P(cX,~~dV+1,a5);dV+=gg}}}function T(S,a,bV,a5){for(var e=0;e<4;e++){var i9=S.jb(a+1.3*e,bV);
G(i9,a5,1)}}function aE(S,a){this.x=Math.round(S);this.y=Math.round(a)}var z=Math.PI/180;aE.prototype.jb=function(S,a){S=S*z;
var bV=this.x+a*Math.cos(S),a5=this.y+a*Math.sin(S);return new m(this.x,this.y,bV,a5)};aE.prototype.anl=function(S,a){S=S*z;
var bV=this.Tm+a*Math.cos(S),a5=this.aoM+a*Math.sin(S);return new aE(bV,a5)};function m(S,a,bV,a5){this.Yd=new aE(S,a);
this.tH=new aE(bV,a5)}m.prototype.KX=function(S){var a=S*this.Yd.x+(1-S)*this.tH.x,bV=S*this.Yd.y+(1-S)*this.tH.y;
return new aE(a,bV)};var $=U,o=b,h=J,X=A,D=s,f=j,R=v,i=_,t=C,N=[];L();for(var e=0;e<n.length;e++){I[e]=n[e]}var M=new m(F*x[2],O*x[3],F/2,O/2),hK=x[1],bD=[];
bD[0]=function co(){var S=[80,40,15,60],bV=0,a5=0;h(M.KX(1.4),260,S,10);h(M.KX(1),100,[240,50,50,30],30);
o(M.KX(1),60,[255,40,0,40]);var a=[255,255,255,255];f(M.KX(1),70,a,a[3],58,.5);h(M.KX(1),12,a);a[3]=40;
$(M.KX(1),150,a,a[3],150);for(var e=0;e<40;e++){bV+=Math.random()*25;a5=Math.random()*R(300)+R(100);
var i9=M.KX(1).jb(bV,a5);G(M.KX(1).jb(bV,a5),[110,110,110,30])}o(M.KX(1),130,[255,255,255,8]);var dG=[170,30,23,70];
X(M.KX(1),70,dG,1,3,3);var ap=[60,60,130,40];h(M.KX(.47),44,ap,5);h(M.KX(.43),22,ap,3);ap[3]=16;h(M.KX(.53),15,ap,2);
var bk=[138,94,42,100];h(M.KX(.2),16,bk,2);var c2=[130,255,170,180];o(M.KX(0),4,c2);o(M.KX(-.25),5,c2);
bk=[150,90,0,50];$(M.KX(-.45),55,t(bk),-bk[3],40,2);h(M.KX(-.42),35,bk,2);h(M.KX(-.5),15,bk,2);D(M.KX(-1.28),145,11,70);
var gg=y(0);gg[3]=50;$(M.KX(-1.28),149,gg,gg[3],4);gg=y(300);gg[3]=50;$(M.KX(-1.28),155-1,t(gg),-gg[3],3);
var bH=[130,130,10,50];X(M.KX(-1),73,bH,3,2);var gw=[40,130,70,40];$(M.KX(-1),70,t(gw),-gw[3],35);gw=[40,170,60,50];
h(M.KX(-.7),25,gw,4);var gw=[70,110,50,60];$(M.KX(1.3),30,t(gw),-gw[3],11,3);ap=[0,50,210,80];o(M.KX(-.72),20,ap)};
bD[1]=function iM(){o(M.KX(1),150,[240,70,70,60]);h(M.KX(1),100,[200,60,60,40],30);var S=[255,255,255,255],a=0,bV=0;
f(M.KX(1),75,S,S[3],63);h(M.KX(1),12,S);o(M.KX(1),270,[200,200,200,20],10);for(var e=0;e<10;e++){a+=10+Math.random()*40;
bV=Math.random()*R(250)+R(80);var a5=M.KX(1).jb(a,bV);G(a5,[110,110,110,35])}a=5;bV=100;for(var e=0;
e<12;e++){a+=30;T(M.KX(1),a,bV,[90,90,90,40])}var i9=[150,40,23,100];X(M.KX(1),70,i9,1,3,3);var dG=[30,100,60,40];
o(M.KX(-.9),180,[255,255,255,20]);h(M.KX(-.9),140,dG,15);var ap=[170,80,25,15];X(M.KX(-.9),120,ap,1,4,4);
var bk=[110,240,190,200];o(M.KX(-.6),3,bk);bk[3]=100;o(M.KX(-.6),7,bk);var c2=[230,120,40,85];o(M.KX(-.73),9,c2);
var gg=[60,60,190,50];h(M.KX(.3),28,gg,6);gg[3]=25;h(M.KX(.34),20,gg,3)};bD[2]=function hs(){var S=[255,255,255,255],bV=0,a5=0;
h(M.KX(1),13,S);f(M.KX(1),150,S,S[3],137);var a=[120,80,35,20];h(M.KX(1.4),260,a,10);for(var e=0;e<40;
e++){bV+=5+Math.random()*30;a5=Math.random()*R(300);G(M.KX(1).jb(bV,a5),[110,110,110,20])}var i9=[10,30,255,30];
h(M.KX(1),70,i9,50);var dG=[15,90,170,15];h(M.KX(1.5),60,dG);var ap=[220,220,20,50];h(M.KX(-1.15),8,ap,2);
var S=[255,255,255,40];o(M.KX(-1.18),6,S);o(M.KX(-1.18),4,S);ap=[110,110,10,8];$(M.KX(-1.2),32,t(ap),-ap[3],20,3);
var bk=[5,0,16,255];for(var e=0;e<4;e++){h(M.KX(-1.36),10,bk,3)}var c2=[90,200,150,20],gg=c2.slice(0);
gg[3]*=2;h(M.KX(-1.32),7,gg,3);h(M.KX(-1.36),7,gg,3);h(M.KX(-1.4),7,gg,3);var S=[230,230,230,100];o(M.KX(-1.36),2,S);
S[3]=3;h(M.KX(-.55),10,S);ap=[120,100,10,18];h(M.KX(-.55),160,ap,8);h(M.KX(-.55),80,ap,4);c2[3]=3;gg[3]=6;
$(M.KX(-.49),13,t(gg),-gg[3],13,2);$(M.KX(-.55),13,t(gg),-gg[3],13,2);c2[3]=20;h(M.KX(.15),25,c2,3);
ap[3]=100;o(M.KX(-.52),3,ap);ap=[200,200,50,40];h(M.KX(.27),1,ap,4);var bH=[150,40,23,30];$(M.KX(1),80,t(bH),-bH[3],2,1)};
return bD[x[0]]()};q.PS={};q.PS.ej=function(n){var F=n.length,E=n[0].length,O=new Array(E);for(var e=0;
e<E;e++)O[e]=new Array(F);for(var e=0;e<E;e++)for(var I=0;I<F;I++)O[e][I]=n[I][e];return O};q.PS.ba=function(n,F){var O=n.length,E=n[0].length,I=new Array(O);
for(var e=0;e<O;e++)I[e]=new Array(E);for(var e=0;e<O;e++)for(var x=0;x<E;x++)I[e][x]=n[e][x]-F[e][x];
return I};q.PS.add=function(n,F){var O=n.length,E=n[0].length,I=new Array(O);for(var e=0;e<O;e++)I[e]=new Array(E);
for(var e=0;e<O;e++)for(var x=0;x<E;x++)I[e][x]=n[e][x]+F[e][x];return I};q.PS.multiply=function(n,F){var O=n.length,I=n[0].length,E=F[0].length;
if(I!=F.length)throw"e";var x=new Array(O);for(var e=0;e<O;e++)x[e]=new Array(E);if((I&1)!=0)for(var e=0;
e<O;e++){var r=n[e],_=x[e];for(var d=0;d<E;d++){var w=0;for(var Z=0;Z<I;Z++)w+=r[Z]*F[Z][d];_[d]=w}}else for(var e=0;
e<O;e++){var r=n[e],_=x[e];for(var d=0;d<E;d++){var w=0;for(var Z=0;Z<I;Z+=2)w+=r[Z]*F[Z][d]+r[Z+1]*F[Z+1][d];
_[d]=w}}return x};q.PS.Zf=function(n,F){var O=n.length,E=n[0].length,I=new Array(O);for(var e=0;e<O;
e++){var x=0;for(var r=0;r<E;r++)x+=n[e][r]*F[r];I[e]=x}return I};q.PS.Bc=function(n,F){var O=[];for(var e=0;
e<n;e++){O.push([]);for(var I=0;I<F;I++)O[e].push(0)}return O};q.PS.a07=function(n){for(var e=0;e<n.length;
e++)console.log(JSON.stringify(n[e]))};q.PS.aiU=function(n){var F=[];for(var e=0;e<n.length;e++)F.push(n[e].join(","));
return"["+F.join(";")+"]"};q.PS.bM=function(n,F){var O=n.length;for(var I=0;I<O;I++){var x=0,r=Number.NEGATIVE_INFINITY;
for(var e=I;e<O;e++)if(Math.abs(n[e][I])>r){x=e;r=Math.abs(n[e][I])}q.PS.aiv(n,I,x);for(var e=I+1;e<O;
e++){if(n[I][I]==0)return 1;var _=n[e][I]/n[I][I];for(var d=I;d<O+1;d++)n[e][d]-=n[I][d]*_}}for(var e=O-1;
e>=0;e--){if(n[e][e]==0)return 1;var w=n[e][O]/n[e][e];F[e]=w;for(var d=e-1;d>=0;d--){n[d][O]-=n[d][e]*w;
n[d][e]=0}}return 0};q.PS.aiv=function(n,F,O){var I=n[F];n[F]=n[O];n[O]=I};q.PS.ac6=function(n){var F=n.length,O=q.PS.Bc(F,F);
for(var e=0;e<F;e++)O[e][e]=n[e];return O};q.PS.a17=function(n){var F=n.length,O=n[0].length,I=new Array(F);
for(var e=0;e<F;e++){I[e]=0;for(var x=0;x<O;x++)I[e]+=n[e][x];I[e]/=O}return I};q.PS.t4=function(n){var F=0;
for(var e=0;e<n.length;e++)F+=n[e]*n[e];return Math.sqrt(F)};q.e$={};q.e$.U2=function(n){var F=~~(n+.5);
return F<0?0:F>255?255:F};q.e$.transform=function(n,F,O){var I=q.e$.U2,x=n.Q.length;for(var e=0;e<x;
e++){var r=n.Q[e],_=n.l[e],d=n.O[e];F.Q[e]=I(O[0]*r+O[1]*_+O[2]*d+O[3]*255);F.l[e]=I(O[4]*r+O[5]*_+O[6]*d+O[7]*255);
F.O[e]=I(O[8]*r+O[9]*_+O[10]*d+O[11]*255)}};q.e$.AH=function(n,F,O){var I=q.e$.U2,x=n.length;for(var e=0;
e<x;e+=4){var r=n[e],_=n[e+1],d=n[e+2];F[e]=I(O[0]*r+O[1]*_+O[2]*d+O[3]*255);F[e+1]=I(O[4]*r+O[5]*_+O[6]*d+O[7]*255);
F[e+2]=I(O[8]*r+O[9]*_+O[10]*d+O[11]*255)}};q.e$.n9=function(n){var F=n[0]+n[1]+n[2],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
if(F==1){var I=n.indexOf(1);O[I]=O[I+4]=O[I+8]=1}else{O[0]=n[0];O[5]=n[1];O[10]=n[2]}return O};q.e$.AQ=function(n,F,O){return[1,0,0,n,0,1,0,F,0,0,1,O,0,0,0,1]};
q.e$.en=function(n,F,O){return[n,0,0,0,0,F,0,0,0,0,O,0,0,0,0,1]};q.e$.a6x=function(n){return[n[0],n[1],n[2],n[4],n[5],n[6],n[8],n[9],n[10]]};
q.e$.oD=function(n){return[n[0],n[1],n[2],0,n[3],n[4],n[5],0,n[6],n[7],n[8],0,0,0,0,1]};q.e$.Rv=function(n,F){return[n[0]*F[0]+n[1]*F[1]+n[2]*F[2]+n[3]*F[3],n[4]*F[0]+n[5]*F[1]+n[6]*F[2]+n[7]*F[3],n[8]*F[0]+n[9]*F[1]+n[10]*F[2]+n[11]*F[3],n[12]*F[0]+n[13]*F[1]+n[14]*F[2]+n[15]*F[3]]};
q.e$.ej=function(n){var F=[];F[0]=n[0];F[1]=n[4];F[2]=n[8];F[3]=n[12];F[4]=n[1];F[5]=n[5];F[6]=n[9];
F[7]=n[13];F[8]=n[2];F[9]=n[6];F[10]=n[10];F[11]=n[14];F[12]=n[3];F[13]=n[7];F[14]=n[11];F[15]=n[15];
return F};q.e$.multiply=function(n,F){var O=[];O[0]=n[0]*F[0]+n[1]*F[4]+n[2]*F[8]+n[3]*F[12];O[1]=n[0]*F[1]+n[1]*F[5]+n[2]*F[9]+n[3]*F[13];
O[2]=n[0]*F[2]+n[1]*F[6]+n[2]*F[10]+n[3]*F[14];O[3]=n[0]*F[3]+n[1]*F[7]+n[2]*F[11]+n[3]*F[15];O[4]=n[4]*F[0]+n[5]*F[4]+n[6]*F[8]+n[7]*F[12];
O[5]=n[4]*F[1]+n[5]*F[5]+n[6]*F[9]+n[7]*F[13];O[6]=n[4]*F[2]+n[5]*F[6]+n[6]*F[10]+n[7]*F[14];O[7]=n[4]*F[3]+n[5]*F[7]+n[6]*F[11]+n[7]*F[15];
O[8]=n[8]*F[0]+n[9]*F[4]+n[10]*F[8]+n[11]*F[12];O[9]=n[8]*F[1]+n[9]*F[5]+n[10]*F[9]+n[11]*F[13];O[10]=n[8]*F[2]+n[9]*F[6]+n[10]*F[10]+n[11]*F[14];
O[11]=n[8]*F[3]+n[9]*F[7]+n[10]*F[11]+n[11]*F[15];O[12]=n[12]*F[0]+n[13]*F[4]+n[14]*F[8]+n[15]*F[12];
O[13]=n[12]*F[1]+n[13]*F[5]+n[14]*F[9]+n[15]*F[13];O[14]=n[12]*F[2]+n[13]*F[6]+n[14]*F[10]+n[15]*F[14];
O[15]=n[12]*F[3]+n[13]*F[7]+n[14]*F[11]+n[15]*F[15];return O};q.e$.uZ=function(n){var F=[];F[0]=n[5]*n[10]*n[15]-n[5]*n[14]*n[11]-n[6]*n[9]*n[15]+n[6]*n[13]*n[11]+n[7]*n[9]*n[14]-n[7]*n[13]*n[10];
F[1]=-n[1]*n[10]*n[15]+n[1]*n[14]*n[11]+n[2]*n[9]*n[15]-n[2]*n[13]*n[11]-n[3]*n[9]*n[14]+n[3]*n[13]*n[10];
F[2]=n[1]*n[6]*n[15]-n[1]*n[14]*n[7]-n[2]*n[5]*n[15]+n[2]*n[13]*n[7]+n[3]*n[5]*n[14]-n[3]*n[13]*n[6];
F[3]=-n[1]*n[6]*n[11]+n[1]*n[10]*n[7]+n[2]*n[5]*n[11]-n[2]*n[9]*n[7]-n[3]*n[5]*n[10]+n[3]*n[9]*n[6];
F[4]=-n[4]*n[10]*n[15]+n[4]*n[14]*n[11]+n[6]*n[8]*n[15]-n[6]*n[12]*n[11]-n[7]*n[8]*n[14]+n[7]*n[12]*n[10];
F[5]=n[0]*n[10]*n[15]-n[0]*n[14]*n[11]-n[2]*n[8]*n[15]+n[2]*n[12]*n[11]+n[3]*n[8]*n[14]-n[3]*n[12]*n[10];
F[6]=-n[0]*n[6]*n[15]+n[0]*n[14]*n[7]+n[2]*n[4]*n[15]-n[2]*n[12]*n[7]-n[3]*n[4]*n[14]+n[3]*n[12]*n[6];
F[7]=n[0]*n[6]*n[11]-n[0]*n[10]*n[7]-n[2]*n[4]*n[11]+n[2]*n[8]*n[7]+n[3]*n[4]*n[10]-n[3]*n[8]*n[6];F[8]=n[4]*n[9]*n[15]-n[4]*n[13]*n[11]-n[5]*n[8]*n[15]+n[5]*n[12]*n[11]+n[7]*n[8]*n[13]-n[7]*n[12]*n[9];
F[9]=-n[0]*n[9]*n[15]+n[0]*n[13]*n[11]+n[1]*n[8]*n[15]-n[1]*n[12]*n[11]-n[3]*n[8]*n[13]+n[3]*n[12]*n[9];
F[10]=n[0]*n[5]*n[15]-n[0]*n[13]*n[7]-n[1]*n[4]*n[15]+n[1]*n[12]*n[7]+n[3]*n[4]*n[13]-n[3]*n[12]*n[5];
F[11]=-n[0]*n[5]*n[11]+n[0]*n[9]*n[7]+n[1]*n[4]*n[11]-n[1]*n[8]*n[7]-n[3]*n[4]*n[9]+n[3]*n[8]*n[5];F[12]=-n[4]*n[9]*n[14]+n[4]*n[13]*n[10]+n[5]*n[8]*n[14]-n[5]*n[12]*n[10]-n[6]*n[8]*n[13]+n[6]*n[12]*n[9];
F[13]=n[0]*n[9]*n[14]-n[0]*n[13]*n[10]-n[1]*n[8]*n[14]+n[1]*n[12]*n[10]+n[2]*n[8]*n[13]-n[2]*n[12]*n[9];
F[14]=-n[0]*n[5]*n[14]+n[0]*n[13]*n[6]+n[1]*n[4]*n[14]-n[1]*n[12]*n[6]-n[2]*n[4]*n[13]+n[2]*n[12]*n[5];
F[15]=n[0]*n[5]*n[10]-n[0]*n[9]*n[6]-n[1]*n[4]*n[10]+n[1]*n[8]*n[6]+n[2]*n[4]*n[9]-n[2]*n[8]*n[5];var O=n[0]*F[0]+n[1]*F[4]+n[2]*F[8]+n[3]*F[12];
for(var e=0;e<16;e++)F[e]/=O;return F};q.e$.afm=function(n){var F=[],O=n[5]*n[10]*n[15]-n[5]*n[14]*n[11]-n[6]*n[9]*n[15]+n[6]*n[13]*n[11]+n[7]*n[9]*n[14]-n[7]*n[13]*n[10],I=-n[4]*n[10]*n[15]+n[4]*n[14]*n[11]+n[6]*n[8]*n[15]-n[6]*n[12]*n[11]-n[7]*n[8]*n[14]+n[7]*n[12]*n[10],x=n[4]*n[9]*n[15]-n[4]*n[13]*n[11]-n[5]*n[8]*n[15]+n[5]*n[12]*n[11]+n[7]*n[8]*n[13]-n[7]*n[12]*n[9],r=-n[4]*n[9]*n[14]+n[4]*n[13]*n[10]+n[5]*n[8]*n[14]-n[5]*n[12]*n[10]-n[6]*n[8]*n[13]+n[6]*n[12]*n[9];
return n[0]*O+n[1]*I+n[2]*x+n[3]*r};q.e$.hI=q.e$.oD([3.1338561,-1.6168667,-.4906146,-.9787684,1.9161415,.033454,.0719453,-.2289914,1.4052427]);
q.e$.adZ=q.e$.oD([1.9624274,-.6105343,-.3413404,-.9787684,1.9161415,.033454,.0286869,-.1406752,1.3487655]);
q.e$.a0a=q.e$.uZ(q.e$.hI);q.nK={};q.nK.OG=new Uint32Array(1);q.nK.vP=function(n,F,O,I,x,r){var _=new Uint32Array(n),d=0,w=q.nK.OG;
if(w.length<F*4)q.nK.OG=w=new Uint32Array(F*4);var Z=new Float64Array(w.buffer);for(var e=0;e<F;e+=2){var P=x[e],C=x[e+1],W=r[e],v=r[e+1];
w[d]=C;Z[d+2>>1]=W;w[d+1]=_[P];_[P]=d+1;d+=4;w[d]=P;Z[d+2>>1]=v;w[d+1]=_[C];_[C]=d+1;d+=4}return{s9:w,ad0:Z,aaU:_}};
q.nK.bM=function(n,F,O,I,x,r,_){var d=1,w=q.nK.vP(n,F,O,I,x,r),Z=w.s9,P=w.ad0,C=w.aaU,W=new Uint32Array(n),v=new q.nK.VV(n),H=1,A=0;
v.push(O);v.push(I);var L=new q.nK.VV(n),y=new Uint8Array(n),g=new Uint32Array(n);y[O]=1;y[I]=2;var Q=new Uint32Array(n),J=new Uint32Array(n);
J[O]=J[I]=0;Q[O]=Q[I]=1;while(!0){var p=-1,z=0,h=1e30;while(!v.LW()&&p==-1){var U=v.top(),j=y[U],b=C[U]-1;
while(b!=-1){var s=Z[b],G=y[s],T=b^j-1<<2;if(P[T+2>>1]!=0){if(G==0){q.nK.Kk(U,b,s,y,g,J,Q);v.push(s)}else if(G==j&&Q[s]<=Q[U]&&J[s]>J[U])q.nK.Kk(U,b,s,y,g,J,Q);
else if(G!=j){p=T}}b=Z[b+1]-1}if(p!=-1)break;v.pop()}if(p==-1){break}H++;var m=p;while(m!=-1){W[z]=m;
z++;m=g[Z[m^4]]-1}var $=z>>1;for(var e=0;e<$;e++){var o=W[e];W[e]=W[z-e-1];W[z-e-1]=o}m=g[Z[p]]-1;while(m!=-1){W[z]=m^4;
z++;m=g[Z[m^4]]-1}for(var e=0;e<z;e++)h=Math.min(h,P[W[e]+2>>1]);A+=h;if(A>=_)return{VD:null,Gh:A};for(var e=0;
e<z;e++){var X=W[e],D=X^4,U=Z[D],s=Z[X];P[X+2>>1]-=h;P[D+2>>1]+=h;if(P[X+2>>1]==0&&y[U]==y[s]){if(y[U]==1){g[s]=0;
L.push(s)}if(y[U]==2){g[U]=0;L.push(U)}}}while(!L.LW()){var U=L.pop(),j=y[U],b=C[U]-1,f=j==1?4:0,R=0,i=0,t=1e9;
while(b!=-1){var s=Z[b],N=b^4,T=b^f;if(y[s]==j&&P[T+2>>1]>0&&q.nK.aoN(s,O,I,g,Z,H,Q,J)+1<t){R=s;i=N;
t=J[s]+1}b=Z[b+1]-1}if(i!=0){q.nK.Kk(R,i,U,y,g,J,Q);continue}b=C[U]-1;while(b!=-1){var s=Z[b],T=b^f;
if(y[s]==j){if(P[T+2>>1]>0){v.push(s)}if(g[s]==b+1){g[s]=0;L.push(s)}}b=Z[b+1]-1}y[U]=0;v.remove(U)}}var M=[];
for(var e=0;e<F;e+=2){var U=x[e],s=x[e+1];if(y[U]==1&&y[s]!=1){M.push(e>>1)}if(y[s]==1&&y[U]!=1){M.push(F+e>>1)}}return{VD:M,Gh:A}};
q.nK.Kk=function(n,F,O,I,x,r,_){I[O]=I[n];x[O]=F+1;r[O]=r[n]+1;_[O]=_[n]};q.nK.aoN=function(n,F,O,I,x,r,_,d){var w=n,Z=I[n]-1,P=0;
while(Z!=-1&&_[n]!=r){n=x[Z^4];Z=I[n]-1;P++}if(Z==-1&&n!=F&&n!=O)return 1e9;var C=d[n]+P;P=0;Z=I[w]-1;
while(w!=n){d[w]=C-P;P++;_[w]=r;w=x[Z^4];Z=I[w]-1}return C};q.nK.ahj=function(n,F,O,I,x,r){var _=q.nK.vP(n,F,O,I,x,r),d=_.s9,w=_.ad0,Z=_.aaU,P=0,C=0,W=new Uint32Array(n*2),v=new q.nK.co(n),L=0;
while(!0){v.reset();v.push(O);for(var e=0;e<n;e++)W[e<<1]=0;while(!v.LW()){var H=v.pop(),y=Z[H]-1;while(y!=-1){L=d[y];
if(W[L<<1]==0&&w[y+2>>1]>0&&L!=O){W[L<<1]=H+1;W[(L<<1)+1]=y;v.push(L)}y=d[y+1]-1}if(W[I<<1]!=0){break}}if(W[I<<1]==0){break}var g=1e30;
L=I;while(!0){var Q=W[L<<1]-1;if(Q==-1)break;var J=W[(L<<1)+1];g=Math.min(g,w[J+2>>1]);L=Q}L=I;while(!0){var Q=W[L<<1]-1;
if(Q==-1)break;var J=W[(L<<1)+1],A=J^4;w[J+2>>1]-=g;w[A+2>>1]+=g;L=Q}P+=g}var p=[];for(var e=0;e<F;e+=2){var Q=x[e],L=x[e+1];
if((W[Q<<1]!=0||Q==O)&&W[L<<1]==0&&L!=O){p.push(e>>1)}if((W[L<<1]!=0||L==O)&&W[Q<<1]==0&&Q!=O){p.push(F+e>>1)}}return{VD:p,Gh:P}};
q.nK.co=function(n){n|=n>>1;n|=n>>2;n|=n>>4;n|=n>>8;n|=n>>16;this.C4=new Uint32Array(n+1);this.Yh=n;
this.V2=0;this.dU=0};q.nK.co.prototype={push:function(n){var F=this.dU;this.C4[F]=n;this.dU=F+1&this.Yh},pop:function(){var n=this.V2,F=this.C4[n];
this.V2=n+1&this.Yh;return F},LW:function(){return this.V2==this.dU},reset:function(){this.V2=0;this.dU=0}};
q.nK.VV=function(n){n|=n>>1;n|=n>>2;n|=n>>4;n|=n>>8;n|=n>>16;this.C4=new Uint32Array(n+1);this.IN=new Uint32Array(n+1);
this.Yh=n;this.V2=0;this.dU=0};q.nK.VV.prototype={top:function(){return this.C4[this.V2]},anp:function(){return this.C4[this.dU]},push:function(n){if(this.IN[n]!=0)return;
this.IN[n]=this.dU+1;var F=this.dU;this.C4[F]=n;this.dU=F+1&this.Yh},pop:function(){var n=this.V2,F=this.C4[n];
this.IN[F]=0;this.V2=n+1&this.Yh;return F},LW:function(){return this.V2==this.dU},remove:function(n){var F=this.IN[n]-1;
if(F==-1)return;this.IN[n]=0;if(F==this.V2){this.pop();return}var O=this.pop();this.C4[F]=O;this.IN[O]=F+1},Fw:function(e){return e+this.Yh+1&this.Yh}};
q.nK.HQ=function(n,F,O){var I=q.nK.Xb(n,F,O);if(F<I-1)q.nK.HQ(n,F,I-1);if(I<O)q.nK.HQ(n,I,O)};q.nK.Xb=function(n,F,O){var I=n[F+O>>>1];
while(F<=O){while(n[F]<I)F++;while(n[O]>I)O--;if(F<=O){q.nK.Pq(n,F,O);F++;O--}}return F};q.nK.Pq=function(n,F,O){var I=n[F];
n[F]=n[O];n[O]=I};q.oK={};q.oK.a4F=function(n){for(var e=0;e<n.length;e++)q.oK.w$(n,e)};q.oK.w$=function(n,e){n[e].v.keyShapeInvalidated={t:"bool",v:!0}};
q.oK.a7V=function(n){for(var e=0;e<n.length;e++)n[e].v.keyOriginIndex.v=e};q.oK.CZ=function(){return{t:"Objc",v:{classID:"null",keyOriginIndex:{t:"long",v:0},keyShapeInvalidated:{t:"bool",v:!0}}}};
q.oK.tW=function(n){n=n.v;var F={Rctn:2,Ln:4,Elps:5},O=F[n.classID],I=n.topLeft?q.oK.IM(n):null,x=null,r=0;
if(O==4){var _=n.Strt.v,d=n.End.v;x=[_.Hrzn.v.val,_.Vrtc.v.val,d.Hrzn.v.val,d.Vrtc.v.val];r=n.Wdth.v.val}if(O==null)return null;
return q.oK.RW(O,O==4?null:q.oK.og(n),I,x,r)};q.oK.Wd=function(n,F,O,I,x,r){var _={classID:n,unitValueQuadVersion:{t:"long",v:1}};
if(F)q.oK.RN(_,["Left","Top","Rght","Btom"],F);if(O)q.oK.RN(_,["topLeft","topRight","bottomRight","bottomLeft"],O);
if(n=="Ln"){_.Strt={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:I[0]}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:I[1]}}}},_.End={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:I[2]}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:I[3]}}}},_.Wdth={t:"UntF",v:{type:"#Pxl",val:x}}}if(r)_.Nm={t:"TEXT",v:r};
return{t:"Objc",v:_}};q.oK.RW=function(n,F,O,I,x){var r=q.oK.CZ(),_=r.v;delete _.keyShapeInvalidated;
_.keyOriginType={t:"long",v:n};_.keyOriginResolution={t:"doub",v:75};if(n==4){_.keyOriginLineStart={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:I[0]},Vrtc:{t:"doub",v:I[1]}}};
_.keyOriginLineEnd={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:I[2]},Vrtc:{t:"doub",v:I[3]}}};F=[Math.min(I[0],I[2]),Math.min(I[1],I[3]),Math.max(I[0],I[2]),Math.max(I[1],I[3])];
_.keyOriginLineWeight={t:"doub",v:x},_.keyOriginLineArrowSt={t:"bool",v:!1};_.keyOriginLineArrowEnd={t:"bool",v:!1};
_.keyOriginLineArrWdth={t:"doub",v:0};_.keyOriginLineArrLngth={t:"doub",v:0};_.keyOriginLineArrConc={t:"long",v:0}}var d={classID:"unitRect",unitValueQuadVersion:{t:"long",v:1}};
_.keyOriginShapeBBox={t:"Objc",v:d};q.oK.ig(_,F);if(O!=null){var w={classID:"radii",unitValueQuadVersion:{t:"long",v:1}};
_.keyOriginRRectRadii={t:"Objc",v:w};q.oK._6(_,O)}return r};q.oK.m=function(n,F,O,I){var x=q.J.Ue(F),r=q.J.In(F),_=Math.max(Math.abs(F[0]),Math.abs(F[1])),d=Math.max(Math.abs(F[3]),Math.abs(F[4]));
for(var e=0;e<n.length;e++){var w=n[e].v,Z=w.keyShapeInvalidated;if(Z&&Z.v||w.keyOriginType==null)continue;
if(O.length!=0&&O.indexOf(e)==-1)continue;var P=w.keyOriginType.v;if(!x||!r||I&&P==2&&Math.abs(1-_/d)>.01){q.oK.w$(n,e);
continue}var C=q.oK.Xq(w);q.J.m(F,C);q.oK.ig(w,[Math.min(C[0],C[2]),Math.min(C[1],C[3]),Math.max(C[0],C[2]),Math.max(C[1],C[3])]);
if(P==2){var W=q.oK.Lq(w),v=new cD(F[0],F[1],F[3],F[4],0,0);v.js();if(v.R==0){W.push(W.shift());v.rotate(Math.PI/2);
v.js()}if(v.R<0){var L=W[0];W[0]=W[1];W[1]=L;L=W[2];W[2]=W[3];W[3]=L}if(v.oQ<0){var L=W[0];W[0]=W[3];
W[3]=L;L=W[1];W[1]=W[2];W[2]=L}if(I)for(var H=0;H<4;H++)W[H]=W[H]*_;q.oK._6(w,W)}if(P==4){w.keyOriginLineWeight.v*=_;
var y=q.oK.Dt(w);q.J.m(F,y);q.oK.afl(w,y)}}};q.oK.df=function(n,F){var O=F.b;for(var e=0;e<n.length;
e++){var I=n[e].v,x=I.keyShapeInvalidated,C;if(x&&x.v||I.keyOriginType==null)continue;var r=I.keyOriginType.v,_=q.oK.Xq(I),d=_[0],w=_[1],Z=_[2],P=_[3];
if(r==1)C=q.Y.jP.Rect(d,w,Z-d,P-w,0);else if(r==2){var W=q.oK.Lq(I);C=q.Y.jP.Rect(d,w,Z-d,P-w,W)}else if(r==4){var v=q.oK.Dt(I);
C=q.Y.jP.XX(v[0],v[1],v[2],v[3],I.keyOriginLineWeight.v)}else if(r==5)C=q.Y.jP.BT(d,w,Z-d,P-w);var L=q.Y.fR(O,e),H=q.Y.wb(O,e);
C[2].Xu=O[L].Xu;var y=O;O=O.slice(0,L);for(var g=2;g<C.length;g++)O.push(C[g]);for(var g=L+H;g<y.length;
g++)O.push(y[g])}F.b=O;F.j8=!0};q.oK.N5=function(n){var F=1e9,O=-F,I=1e9,x=-I,r=null,_=n.Y1(),d=_[0],w=_[1];
for(var Z=0;Z<w.length;Z++){var P=d[w[Z]],C=P.add.vogk;if(C==null)continue;var W=P.add.vmsk.C;for(var v=0;
v<C.length;v++){var L=C[v].v,H=L.keyShapeInvalidated;if(H&&H.v||L.keyOriginType==null)continue;if(w.length==1&&W.length!=0&&W.indexOf(v)==-1)continue;
var y=L.keyOriginType.v;if(y!=4){var g=q.oK.Xq(L);F=Math.min(F,g[0]);I=Math.min(I,g[1]);O=Math.max(O,g[2]);
x=Math.max(x,g[3])}if(y==2&&r==null){r=q.oK.Lq(L)}}}return[F<O?[F,I,O,x]:null,r]};q.oK.ajO=function(n,F,O){var I=q.oK.N5(n)[0],x;
if(I){var r=new cD;r.translate(-I[0],-I[1]);r.scale(1/(I[2]-I[0]),1/(I[3]-I[1]));r.scale(F[2]-F[0],F[3]-F[1]);
r.translate(F[0],F[1]);x=q.J.EC(r)}var _=n.Y1(),d=_[0],w=_[1];for(var Z=0;Z<w.length;Z++){var P=d[w[Z]],C=P.add.vogk;
if(C==null)continue;var W=P.add.vmsk.C;for(var v=0;v<C.length;v++){var L=C[v].v,H=L.keyShapeInvalidated;
if(H&&H.v||L.keyOriginType==null)continue;if(w.length==1&&W.length!=0&&W.indexOf(v)==-1)continue;var y=L.keyOriginType.v;
if(y!=4&&F[0]!=null){var F=q.oK.Xq(L);q.J.m(x,F);q.oK.ig(L,F)}if(y==2&&O!=null){q.oK._6(L,O)}}}};q.oK.Xq=function(n){return q.oK.og(n.keyOriginShapeBBox.v)};
q.oK.og=function(n){var F=n.Left.v.val,O=n.Rght.v.val,I=n.Top.v.val,x=n.Btom.v.val;return[F,I,O,x]};
q.oK.ig=function(n,F){q.oK.RN(n.keyOriginShapeBBox.v,["Left","Top","Rght","Btom"],F)};q.oK.Lq=function(n){return q.oK.IM(n.keyOriginRRectRadii.v)};
q.oK.IM=function(n){var F=[],O=["topLeft","topRight","bottomRight","bottomLeft"];for(var I=0;I<4;I++)F.push(n[O[I]].v.val);
return F};q.oK._6=function(n,F){q.oK.RN(n.keyOriginRRectRadii.v,["topLeft","topRight","bottomRight","bottomLeft"],F)};
q.oK.RN=function(n,F,O){for(var e=0;e<4;e++)if(O[e]!=null)n[F[e]]={t:"UntF",v:{type:"#Pxl",val:O[e]}}};
q.oK.Dt=function(n){var F=n.keyOriginLineStart.v,O=n.keyOriginLineEnd.v;return[F.Hrzn.v,F.Vrtc.v,O.Hrzn.v,O.Vrtc.v]};
q.oK.afl=function(n,F){var O=n.keyOriginLineStart.v,I=n.keyOriginLineEnd.v;O.Hrzn.v=F[0];O.Vrtc.v=F[1];
I.Hrzn.v=F[2];I.Vrtc.v=F[3]};q.z={};q.z.clone=function(n){return{s:n.s.slice(0),H:n.H.slice(0)}};q.z.go=function(n){if(n.length<6)return!0;
var F=n.length-4;for(var e=0;e<F;e+=2)if(!q.z.Lt(n[e],n[e+1],n[e+2],n[e+3],n[e+4],n[e+5]))return!1;if(!q.z.Lt(n[F],n[F+1],n[F+2],n[F+3],n[0],n[1]))return!1;
if(!q.z.Lt(n[F+2],n[F+3],n[0],n[1],n[2],n[3]))return!1;return!0};q.z.Lt=function(n,F,O,I,x,r){return(F-I)*(x-O)+(O-n)*(r-I)>=0};
q.z.Uh=function(n){var F={},O=null,I=0,x={M:2,L:2,Q:4,C:6};for(var e=0;e<n.s.length;e++){var r=n.s[e];
if(r.charAt(0)=="#"){if(F[r]==null)F[r]={H:[],s:[]};O=F[r]}else if(r!="X"){O.s.push(r);var _=x[r];if(_==null)_=0;
for(var d=0;d<_;d++)O.H.push(n.H[I+d]);I+=_}}return F};q.z.rD=function(n,F,O){n=q.z.xk(n);var I=n.H,x=n.s,r=0,_=[],d=null;
for(var e=0;e<x.length;e++){var w=x[e];if(w=="M"){d={a4r:r,GM:0,iu:!1};_.push(d);r+=2}if(w=="C"){d.GM++;
r+=6}if(w=="Z"){d.iu=!0}}var Z=[];for(var e=0;e<_.length;e++)if(_[e].GM!=0)Z.push(_[e]);_=Z;for(var e=0;
e<_.length;e++){var P=_[e],C=P.a4r,W=C+2+P.GM*6,L=0;P.I6=q.z.gh(I,C,W);var v=I[C]==I[W-2]&&I[C+1]==I[W-1];
for(var H=0;H<P.GM;H++){var y=C+H*6,g=y+6;L+=(I[g]-I[y])*(I[g+1]+I[y+1])}if(P.GM==2){var Q=function(hK,bD,co){var iM=1-co;
return iM*iM*iM*hK[bD]+3*iM*iM*co*hK[bD+2]+3*iM*co*co*hK[bD+4]+co*co*co*hK[bD+6]},J=I[C],A=I[C+1],p=I[C+6],U=I[C+7],j=I[C+6],b=I[C+7],s=Q(I,C,.5),G=Q(I,C+1,.5),T=Q(I,C+6,.5),z=Q(I,C+7,.5);
L=(s-J)*(G-A)+(p-s)*(U-G)+(T-p)*(z-U)+(j-T)*(b-z)}if(!v)L+=(I[C]-I[W-2])*(I[C+1]+I[W-1]);P.BX=L<=0}for(var e=0;
e<_.length-1;e++)for(var y=e+1;y<_.length;y++){var m=_[e],$=_[y];if($.I6.zp(m.I6)){_[e]=$;_[y]=m}}var o=_.length==0?!0:_[0].BX,h=[{type:6},{type:8,all:0}];
for(var e=0;e<_.length;e++){var P=_[e],C=P.a4r,W=C+2+P.GM*6,v=I[C]==I[W-2]&&I[C+1]==I[W-1],X=P.iu||v?0:3,D=P.BX==o&&!F?1:0;
if(!F&&e!=0){if(_[e-1].I6.zp(P.I6)&&_[e-1].BX!=P.BX)D=0;for(var y=0;y<_.length;y++)if(y!=e&&_[y].I6.zp(P.I6))D=0}h.push({type:X,length:P.GM+(v?0:1),Xu:O?1:D,sa:2});
for(var y=0;y<P.GM;y++){var r=C+y*6,f=new aE(I[r],I[r+1]),R=new aE(I[r+2],I[r+3]),i;if(y==0){if(v)i=new aE(I[W-4],I[W-3]);
else i=f.clone()}else i=new aE(I[r-2],I[r-1]);h.push({type:X+2,pt:i,I:f,Cz:R})}if(!v){var t=new aE(I[W-2],I[W-1]);
h.push({type:X+2,pt:new aE(I[W-4],I[W-3]),I:t,Cz:t.clone()})}}for(var y=0;y<h.length;y++){var N=h[y];
if(N.type>5||N.type==0||N.type==3)continue;var M=N.pt.Qq(N.I)||N.Cz.Qq(N.Cz);if(!M){var m=N.pt.x*(N.I.y-N.Cz.y)+N.I.x*(N.Cz.y-N.pt.y)+N.Cz.x*(N.pt.y-N.I.y);
if(Math.abs(m)<1e-6)M=!0}if(M)N.type--}return h};q.z.qg=function(){function n(I,x,r,_){if(!_&&I.Cz.Qq(I.I)&&x.pt.Qq(x.I)){r.H.push(x.I.x,x.I.y);
r.s.push("L")}else{r.H.push(I.Cz.x,I.Cz.y,x.pt.x,x.pt.y,x.I.x,x.I.y);r.s.push("C")}}function F(I,x,e,r,_,d){var w=x[e];
I.H.push(w.I.x,w.I.y);I.s.push("M");for(var Z=e;Z<e+r-1;Z++)n(x[Z],x[Z+1],I,d);if(!_)n(x[Z],x[e],I,d)}function O(I,x){if(x==null)x=!1;
var r={H:[],s:[]};for(var e=0;e<I.length;e++){if(I[e].type>5)continue;var _=I[e].length;if(_==0)continue;
if(e==I.length-1)break;var d=I[e].type==3;F(r,I,e+1,_,d,x);if(!d)r.s.push("Z");e+=_}return r}return O}();
q.z.anv=function(n){var F=n.H,O=[],I,x=0;for(var e=0;e<n.s.length;e++){var r=n.s[e];if(r=="C"){I.push(F[x++],F[x++],F[x++],F[x++],F[x++],F[x++])}else if(r=="Z"){}else{I=[];
if(r!="M"){I.push(r);e++}I.push(F[x++],F[x++]);O.push(I)}}return O};q.z.e6=function(n,F,O,I){if(I==null)I=1e9;
var x=1e9,r=0;for(var e=0;e<n.length;e+=2){var _=F-n[e],d=O-n[e+1],w=_*_+d*d;if(w<x){x=w;r=e>>>1}}return x<I*I?r:-1};
q.z.v8=function(n,F,O,I){for(var e=0;e<n.length;e+=2){var x=n[e],r=n[e+1],_=F[e],d=F[e+1];O[e]=x+(_-x)*I;
O[e+1]=r+(d-r)*I}};q.z.m=function(n,F,O){for(var e=0;e<n.length;e+=2){var I=n[e],x=n[e+1];O[e]=I*F.R+x*F.Pr+F.hb;
O[e+1]=I*F.O+x*F.oQ+F.i9}};q.z.gh=function(n,F,O){if(F==null)F=0;if(O==null)O=n.length;var I=99999999999,x=-I,r=99999999999,_=-r;
for(var e=F;e<O;e+=2){var d=n[e],w=n[e+1];I=Math.min(I,d);r=Math.min(r,w);x=Math.max(x,d);_=Math.max(_,w)}return new gv(I,r,x-I,_-r)};
q.z.oJ=function(n,F){var O=Math.max(F.x,Math.min(F.x+F.d,n.x)),I=Math.max(F.y,Math.min(F.y+F.v,n.y)),x=n.x-O,r=n.y-I;
return Math.sqrt(x*x+r*r)};q.z.Me=function(n){if(n.D2())return new gv(Math.floor(n.x),Math.floor(n.y),Math.ceil(n.d),Math.ceil(n.v));
var F=Math.floor(n.x),O=Math.ceil(n.x+n.d),I=Math.floor(n.y),x=Math.ceil(n.y+n.v);return new gv(F,I,O-F,x-I)};
q.z.Wk=function(n){return q.z.Me(q.z.gh(n))};q.z.om=function(n){var F=n.x,O=n.y,I=n.x+n.d,x=n.y+n.v;
return{s:["M","L","L","L","Z"],H:[F,O,I,O,I,x,F,x]}};q.z.concat=function(n,F,O){if(O==null)O=new cD;
for(var e=0;e<F.H.length;e+=2){var I=F.H[e],x=F.H[e+1];n.H.push(I*O.R+x*O.Pr+O.hb);n.H.push(I*O.O+x*O.oQ+O.i9)}for(var e=0;
e<F.s.length;e++)n.s.push(F.s[e])};q.z.xk=function(n){var F=n.H,O=[],I=[],x=0,r=0,_=0,d=0,w=0,Z=0,P=0,C=0,W=0;
for(var e=0;e<n.s.length;e++){var v=n.s[e];if(v=="M"){r=F[x];_=F[x+1];x+=2;I.push(v);O.push(r,_)}else if(v=="C"){d=F[x];
w=F[x+1];Z=F[x+2];P=F[x+3];C=F[x+4];W=F[x+5];x+=6;I.push(v);O.push(d,w,Z,P,C,W);r=C;_=W}else if(v=="Q"){d=F[x];
w=F[x+1];Z=F[x+2];P=F[x+3];x+=4;var L=d-r,H=w-_,y=Z-d,g=P-w;I.push("C");O.push(r+2/3*L,_+2/3*H,d+1/3*y,w+1/3*g,Z,P);
r=Z;_=P}else if(v=="L"){d=F[x];w=F[x+1];x+=2;var Q=d-r,J=w-_;I.push("C");O.push(r,_,d,w,d,w);r=d;_=w}else I.push(v)}return{s:I,H:O}};
q.z.ad8=function(n){var F=n.H,O=[],I=[],x=0;for(var e=0;e<n.s.length;e++){var r=n.s[e];if(r=="Q"){var _=F[x-2],d=F[x-1],w=F[x],Z=F[x+1],P=F[x+2],C=F[x+3];
x+=4;var W=w-_,v=Z-d,L=P-w,H=C-Z;I.push("C");O.push(_+2/3*W,d+2/3*v,w+1/3*L,Z+1/3*H,P,C)}else{var y=0;
if(r=="M"||r=="L")y=2;else if(r=="C")y=6;for(var g=0;g<y;g++)O.push(F[x+g]);x+=y;I.push(r)}}return{s:I,H:O}};
q.z.iC=function(n,F){var O=n.H,I=[],x=[],r=0,_=0,d=0,w=0,Z=0,P=0,C=0,W=0,v=0;for(var e=0;e<n.s.length;
e++){var L=n.s[e];if(L=="M"){_=O[r];d=O[r+1];r+=2;x.push(L);I.push(_,d)}else if(L=="C"){w=O[r];Z=O[r+1];
P=O[r+2];C=O[r+3];W=O[r+4];v=O[r+5];r+=6;q.z.An(_,d,w,Z,P,C,W,v,F,x,I,0);_=W;d=v}else x.push(L)}return{s:x,H:I}};
q.z.An=function(n,F,O,I,x,r,_,d,w,Z,P,C){var W=Math.sqrt((_-n)*(_-n)+(d-F)*(d-F)),v=Math.sqrt((_-x)*(_-x)+(d-r)*(d-r))+Math.sqrt((x-O)*(x-O)+(r-I)*(r-I))+Math.sqrt((O-n)*(O-n)+(I-F)*(I-F)),L=(W+v)/2;
if(L<=w){Z.push("C");P.push(O,I,x,r,_,d)}else{var H=0,y=0,g=0,Q=0,J=0,A=0,p=0,U=0,j=0,b=0,s=0,G=0,T=0;
y=(n+O)/2;g=(F+I)/2;Q=(O+x)/2;J=(I+r)/2;A=(x+_)/2;p=(r+d)/2;U=(y+Q)/2;j=(g+J)/2;b=(Q+A)/2;s=(J+p)/2;
G=(U+b)/2;T=(j+s)/2;q.z.An(n,F,y,g,U,j,G,T,w,Z,P,C+1);q.z.An(G,T,b,s,A,p,_,d,w,Z,P,C+1)}};q.z.TH=function(n,F){var O=n.length-2,I=n[0],x=n[1],r=n[O],_=n[O+1],d=r-I,w=_-x,Z=1/Math.sqrt(d*d+w*w),P=r*x-_*I,C=-1,W=-1;
for(var e=2;e<O;e+=2){var v=n[e],L=n[e+1],H=Math.abs(w*v-d*L+P)*Z;if(H>W){W=H;C=e}}if(W<F)return[I,x,r,_];
var y=q.z.TH(n.slice(0,C+2),F),g=q.z.TH(n.slice(C),F);for(var e=2;e<g.length;e++)y.push(g[e]);return y};
q.z.alg=function(){var n=function(I,x,r,_,d,w){return(x-_)*(d-r)+(r-I)*(w-_)>=0},F=function(I,x,r,_,d,w,Z,P){var C=Z-r,W=P-_,v=d-r,L=w-_,H=I-r,y=x-_,g=C*C+W*W,Q=C*v+W*L,J=C*H+W*y,A=v*v+L*L,p=v*H+L*y,U=1/(g*A-Q*Q),j=(A*J-Q*p)*U,b=(g*p-Q*J)*U;
return j>=0&&b>=0&&j+b<1},O=function(I){var E=I.length>>>1,e=0;if(E<3)return[];var x=[],r=[];for(var e=0;
e<E;e++)r.push(e);var _=E;while(_>3){var d=r[(e+0)%_],w=r[(e+1)%_],Z=r[(e+2)%_],P=I[2*d],C=I[2*d+1],W=I[2*w],v=I[2*w+1],L=I[2*Z],H=I[2*Z+1],y=!1;
if(n(P,C,W,v,L,H)){y=!0;for(var g=0;g<_;g++){var Q=r[g];if(Q==d||Q==w||Q==Z)continue;if(F(I[2*Q],I[2*Q+1],P,C,W,v,L,H)){y=!1;
break}}}if(y){x.push(d,w,Z);r.splice((e+1)%_,1);_--;e=0}else if(e++>3*_)break}x.push(r[0],r[1],r[2]);
return x};return O}();q.z.alD=function(n,F){var O={},I={s:[],H:[]};for(var e=0;e<F.length;e+=3){var x=F[e]*2,r=F[e+1]*2,_=F[e+2]*2;
q.z.Sm(n,x,r,I,O);q.z.Sm(n,x,_,I,O);q.z.Sm(n,r,_,I,O)}return I};q.z.Sm=function(n,F,O,I,x){if(F>O){var r=O;
O=F;F=r}if(x[F+","+O])return;x[F+","+O]=!0;I.s.push("M","L");I.H.push(n[F],n[F+1],n[O],n[O+1])};q.z.wL=function(n,F){var O=[],I=n.length;
for(var e=0;e<I;e+=2){var x=n[e],r=n[e+1],_=n[(e+2)%I],d=n[(e+3)%I];if(d<r){var w=r;r=d;d=w}if(r<F&&F<d){var Z=(F-r)/(d-r);
O.push(x+Z*(_-x))}}O.sort(function(P,C){return P-C});return O};q.z.an$=function(n,F){var O=F.slice(0),E=n.length/2,I=[],x=[];
for(var e=0;e<E;e++){var r=(e+1)%E,_=n[2*e]-n[2*r],d=n[2*e+1]-n[2*r+1];x[e]=Math.sqrt(_*_+d*d)}for(var e=0;
e<E;e++){var w=(e-1+E)%E,r=(e+1)%E,Z=F[e],P=Z+F[w],C=Z+F[r];if(P!=0)O[e]=Math.min(O[e],x[w]*Z/P);if(C!=0)O[e]=Math.min(O[e],x[e]*Z/C)}for(var e=0;
e<E;e++){var r=(e+1)%E,W=(e+2)%E,v=O[e],L=O[r],H=n[2*e],y=n[2*e+1],g=n[2*r],Q=n[2*r+1],J=n[2*W],A=n[2*W+1],p=x[e],U=x[r],j=q.z.aey(H,y,g,Q,J,A,v,L,p,U);
I.push(j[0],j[1],j[0],j[1],j[2],j[3]);I.push(j[2],j[3],j[4],j[5],j[6],j[7])}return I};q.z.aey=function(n,F,O,I,x,r,_,d,w,Z){if(w==null)w=Math.sqrt((O-n)*(O-n)+(I-F)*(I-F));
if(Z==null)Z=Math.sqrt((x-O)*(x-O)+(r-I)*(r-I));var P=.553,C=0,W=0,v=0,L=0;if(w!=0){C=(O-n)/w;W=(I-F)/w}if(Z!=0){v=(x-O)/Z;
L=(r-I)/Z}var H=n+_*C,y=F+_*W,g=O-d*C,Q=I-d*W;return[H,y,g,Q,O-d*C*(1-P),I-d*W*(1-P),O+d*v*(1-P),I+d*L*(1-P),O+d*v,I+d*L]};
q.z.au=function(n,F,O,I,x,r,_){var d=n-O,w=F-I,Z=x-O,P=r-I,C=1/Math.sqrt(d*d+w*w),W=1/Math.sqrt(Z*Z+P*P),v=d*C,L=w*C,H=Z*W,y=P*W,g=L*_,Q=-v*_,J=-y*_,A=H*_,p=q.z.GQ(g,Q,v,L,J,A,H,y),U=g+v*p,j=Q+L*p,p=q.z.GQ(0,0,v,L,U,j,-L,v),b=v*p,s=L*p;
return[Math.sqrt(b*b+s*s),v,L,H,y]};q.z.mm=function(n,F,O,I,x,r,_){var d=q.z.au(n,F,O,I,x,r,_),w=d[0],Z=d[1],P=d[2],C=d[3],W=d[4],v=Math.atan2(Z*W-P*C,Z*C+P*W);
if(v<0){v=v*-1}var L=Math.PI-v,H=4/3*Math.tan(L/4),y=O+w*Z,g=I+w*P,Q=O+w*C,J=I+w*W,A=y+H*_*-Z,p=g+H*_*-P,U=Q+H*_*-C,j=J+H*_*-W;
return[0,0,y,g,A,p,U,j,Q,J]};q.z.GQ=function(n,F,O,I,x,r,_,d){var w=_*(F-r)-d*(n-x),Z=d*O-_*I;if(Z==0)return 0;
return w/Z};q.z.mm(0,50,0,0,30,30,10);q.Mr=function(){};q.Mr.VY=function(n,F,O,I,x){var r=O.d,_=O.v,d=r*_,w=new Int32Array(d),E=0;
for(var e=0;e<d;e++)if(F[e]!=0){w[e]=E;E++}else if(n[(e<<2)+3]<200){w[e]=-2}else w[e]=-1;if(E==0)return;
var Z=new q.HT(E,E),P=new Array(3*E),C=new Array(3*E);for(var e=0;e<C.length;e++)C[e]=P[e]=0;var W=1/255,v=[-r,-1,1,r],L=[],H=[];
for(var y=0;y<_;y++)for(var g=0;g<r;g++){var Q=y*r+g,J=Q<<2,e=w[Q],A=e*3,p=0,U=0,j=0;if(e==-1||e==-2)continue;
for(var b=0;b<4;b++){if(b==2){U=j;L[j]=0;H[j]=e;j++}var s=Q+v[b],G=s<<2,T=w[s];if(b==0&&y==0||b==1&&g==0||b==2&&g==r-1||b==3&&y==_-1||T==-2)continue;
p++;if(T==-1){P[A+0]+=n[G+0];P[A+1]+=n[G+1];P[A+2]+=n[G+2]}else{L[j]=-1;H[j]=T;j++;if(F[Q]==F[s]){P[A+0]+=n[J+0]-n[G+0];
P[A+1]+=n[J+1]-n[G+1];P[A+2]+=n[J+2]-n[G+2]}}}L[U]=p;Z.ws(L,H,j)}for(var e=0;e<d;e++)if(w[e]!=-1){var z=e<<2,m=w[e],$=m*3;
C[$]=n[z+0];C[$+1]=n[z+1];C[$+2]=n[z+2]}var o=Date.now();Z.an_(C,P,I,x);console.log(Date.now()-o);for(var e=0;
e<d;e++){var m=w[e],h=m*3,z=e<<2;if(m==-1||n[z+3]!=255)continue;n[z+0]=~~(.5+Math.max(0,Math.min(255,C[h+0])));
n[z+1]=~~(.5+Math.max(0,Math.min(255,C[h+1])));n[z+2]=~~(.5+Math.max(0,Math.min(255,C[h+2])))}};q.rect={};
q.rect.rv=function(n,F){var O=[n],I=[];for(var e=0;e<F.length;e++){var x=F[e],r=!1;for(var _=e+1;_<F.length;
_++){var d=F[_];if(d[0]<=x[0]&&d[1]<=x[1]&&x[2]<=d[2]&&x[3]<=d[3]){r=!0;break}}if(!r)I.push(x)}F=I;for(var e=0;
e<F.length;e++){var x=F[e];for(var _=0;_<O.length;_++){var d=O[_],w=Math.max(x[0],d[0]),Z=Math.min(x[2],d[2]),P=Math.max(x[1],d[1]),C=Math.min(x[3],d[3]);
if(w<Z&&P<C){var W=[];if(d[1]<x[1]){var v=d.slice(0);v[3]=x[1];W.push(v)}if(d[0]<x[0]){var L=d.slice(0);
L[1]=P;L[2]=x[0];W.push(L)}if(x[2]<d[2]){var H=d.slice(0);H[1]=P;H[0]=x[2];W.push(H)}if(x[3]<d[3]){var y=[w,C,Z,d[3]];
W.push(y)}if(W.length!=0){O[_]=W[0];for(var g=1;g<W.length;g++)O.push(W[g])}}}O.push(x);O=q.rect.a5i(O)}O.sort(function(x,d){return x[1]!=d[1]?x[1]-d[1]:x[0]-d[0]});
return O};q.rect.a5i=function(n){n=n.slice(0);for(var e=0;e<n.length;e++){var F=n[e],O=null;if(F[4]!=null)continue;
for(var I=0;I<n.length;I++){var x=n[I];if(e==I||x[4]!=null)continue;var r=F[0]==x[0],_=F[1]==x[1],d=F[2]==x[2],w=F[3]==x[3];
if(_&&w&&(F[2]==x[0]||F[0]==x[2])){O=[Math.min(F[0],x[0]),F[1],Math.max(F[2],x[2]),F[3]]}if(r&&d&&(F[3]==x[1]||F[1]==x[3])){O=[F[0],Math.min(F[1],x[1]),F[2],Math.max(F[3],x[3])]}if(O){n[e]=O;
n.splice(I,1);break}}if(O){e--}}return n};q.rect.oi=function(n){var F=new gv;for(var e=0;e<n.length;
e++)F=F.Tq(n[e]);return F};q.rect.anW=function(n,F){var O=q.rect.oi,I=new UnionFind(n.length),U=1e3,j=1e3;
for(var e=0;e<n.length;e++)for(var x=e+1;x<n.length;x++){if(!F)continue;var r=n[e],_=n[x],C=1e9,W=1e9;
if(r.G3(_)){I.link(e,x);continue}var d=r.x+r.d,w=r.y+r.v,Z=_.x+_.d,P=_.y+_.v;if((d<_.x||Z<r.x)&&(w<_.y||P<r.y))continue;
if(!(w<_.y||P<r.y))C=Math.min(Math.abs(d-_.x),Math.abs(r.x-Z));if(!(d<_.x||Z<r.x))W=Math.min(Math.abs(w-_.y),Math.abs(r.y-P));
var v=Math.min(C,W),L=Math.min(r.d,r.v,_.d,_.v);if(v<.3*L)I.link(e,x)}var H=[],y={};for(var e=0;e<n.length;
e++){var g=I.find(e),Q=n[e];if(y[g]==null){y[g]=H.length;H.push([])}H[y[g]].push(Q)}var J=[],A=[];for(var e=0;
e<H.length;e++){J.push(O(H[e]));var p=O(H[e]);p.Fw=e;A.push(p)}A.sort(function(X,D){return Math.max(D.v,D.d)-Math.max(X.v,X.d)});
var b=new NETXUS.RectanglePacker(U,j);while(!0){var s=!1;b.reset(U,j);for(var e=0;e<A.length;e++){var G=b.findCoords(A[e].d,A[e].v);
if(G){A[e].x=G.x;A[e].y=G.y}else{U=Math.floor(U*1.1);j=Math.floor(j*1.1);s=!0;break}}if(s)continue;break}for(var e=0;
e<H.length;e++){var T=A[e],z=T.Fw,m=J[z],$=H[z],o=T.x-m.x,h=T.y-m.y;for(var x=0;x<$.length;x++)$[x].offset(o,h)}};
q.Mm=function(){};q.Mm.qS=Math.floor(16*window.devicePixelRatio);q.Mm.km={};q.Mm.m1=0;q.Mm.RB=[[12,76,2],[12,76,3],[12,76,4],[12,76,5],[12,76,6]];
q.Mm.a5q=["px","in","cm","mm","%"];q.Mm.SI=function(n,F,O){var I=F.gC,x=[1,I,I/2.54,I/25.4,F.d/100][O];
return n*x};q.Mm.xp=function(n,F,O,I,x){var r=O.Kc.wv,_=[1,F,F/2.54,F/25.4,I/100][r],d=[2,3,2,1,2][r];
n=n/_;var w=Math.round(n),Z=r==0&&Math.abs(n-w)<1e-6?w+"":n.toFixed(d);if(x)Z+=" "+q.Mm.a5q[r];return Z};
q.Mm.a46=function(n,F,O,I){var x=O.Kc.wv,r=[1,F,F/2.54,F/25.4,I/100][x];n=parseFloat(n)*r;return n};
q.Mm.a66=function(n,F){var O=n+","+F;if(q.Mm.km.clr==O)return;var I=Math.round(q.Mm.qS*.5);q.Mm.m1=I;
var x=document.createElement("canvas");x.width=x.height=I;var r=x.getContext("2d");r.font=I*1.5+"px monospace";
var _="0 1 2 3 4 5 6 7 8 9 -".split(" ");for(var e=0;e<_.length;e++){r.fillStyle="#"+q.c7(F);r.fillRect(0,0,I,I);
r.fillStyle="#"+q.c7(n);r.fillText(_[e],0,I);q.Mm.km[_[e]]=r.getImageData(0,0,I,I).data}q.Mm.km.clr=O};
q.Mm.aa_=function(n,F,O){var I=0,x=0,r=4*q.Mm.qS;for(var e=9;e>=0;e--){var _=Math.pow(10,e);if(5*_*n<=r){I=5*_;
x=10;break}if(2*_*n<=r){I=2*_;x=4;break}if(1*_*n<=r){I=1*_;x=10;break}}if(I==0){I=1;x=10}var d=Math.ceil(I*n),w=q.f(d*q.Mm.qS*4);
q.IW(w,4278190080|O);for(var e=0;e<q.Mm.qS;e++)q.Mm.U6(w,4*e*d,F);for(var e=0;e<d;e++)q.Mm.U6(w,4*((q.Mm.qS-1)*d+e),F);
if(I==2)x=2;if(I==5)x=5;if(I>1||I==1&&d>20)for(var e=1;e<x;e++)q.Mm.a6w(w,e*(d/x),d,(e&1)==1?.8:.7,F);
return{Qb:w,step:I}};q.Mm.a6w=function(n,F,O,I,x){var F=Math.round(F);for(var r=Math.round(q.Mm.qS*I);
r<q.Mm.qS-1;r++)q.Mm.U6(n,4*(r*O+F),x)};q.Mm.U6=function(n,F,O){n[F+0]=O>>16&255;n[F+1]=O>>8&255;n[F+2]=O&255};
q.Mm.a35=function(n,F,O,I,x){var r=n.Nv.d,_=n.Nv.v,d=q.Mm.qS,w=F&255,Z=F>>8&255,P=F>>16&255,U,j,b,s;
F=Math.round(w*.6)<<16|Math.round(Z*.6)<<8|Math.round(P*.6);q.Mm.a66(Math.round(w*.8)<<16|Math.round(Z*.8)<<8|Math.round(P*.8),O);
var C=this.aa_(n.K,F,O),W=n.jR(0,0),v=n.jR(r,_),L=Math.floor(W.x/C.step)*C.step,H=Math.ceil(v.x/C.step)*C.step,y=Math.floor(W.y/C.step)*C.step,g=Math.ceil(v.y/C.step)*C.step,Q=n.Hl(L,y),J=n.Hl(H,y),A=C.step*n.K,p=Math.ceil(A);
U=n.$R.data;j=new gv(0,0,r,d);b=new gv(0,0,p,d);s=new gv(0,Math.round(d*.08),q.Mm.m1,q.Mm.m1);for(var e=0;
e<(H-L)/C.step;e++){b.x=Math.round(Q.x+e*A);q.nF(C.Qb,b,U,j,b);var G=(L+e*C.step).toString(10);for(var T=0;
T<G.length;T++){s.x=b.x+3+T*Math.round(q.Mm.m1*.8);var z=q.Mm.km[G[T]];q.nF(z,s,U,j,s)}}var m=new Uint32Array(C.Qb.buffer),$=new Uint32Array(C.Qb.length);
for(var o=0;o<p;o++)for(var h=0;h<d;h++){$[o*d+h]=m[h*p+o]}C.Qb=new Uint8Array($.buffer);U=n.bs.data;
j=new gv(0,0,d,_);b=new gv(0,0,d,p);s=new gv(Math.round(d*.2),0,q.Mm.m1,q.Mm.m1);for(var e=0;e<(g-y)/C.step;
e++){b.y=Math.round(Q.y+e*A);q.nF(C.Qb,b,U,j,b);var G=Math.abs(y+e*C.step).toString(10);for(var T=0;
T<G.length;T++){s.y=b.y+3+T*Math.round(q.Mm.m1*1.15);var z=q.Mm.km[G[T]];q.nF(z,s,U,j,s)}}var X=Math.floor(d*.6),D=new Uint32Array(n.$R.data.buffer),f=new Uint32Array(n.bs.data.buffer),R=w<128?4278190080:4294967295;
if(0<I&&I<r)for(var e=0;e<X;e++)D[e*r+I]=R;if(0<x&&x<_)for(var e=0;e<X;e++)f[x*d+e]=R};q.scale={};q.scale.nd=document.createElement("canvas");
q.scale.Vo=q.scale.nd.getContext("2d");q.scale.af1=document.createElement("canvas");q.scale.aiD=q.scale.af1.getContext("2d");
q.scale.qO=function(n,F,O){var I=q.scale.nd,x=q.scale.Vo;I.width=F;I.height=O;var r=new ImageData(new Uint8ClampedArray(n.buffer),F,O);
x.putImageData(r,0,0);return x.createPattern(I,"repeat")};q.scale.akq=function(n,F,O,I,x,r,_,d){var w=q.scale.lb(n,O,I,x,r,_,d);
q.WU(w.data,F)};q.scale.a6G=function(n,F,O,I,x,r,_,d){var w=q.scale.lb(n,O,I,x,r,_,d);q.Ct(w.data,F)};
q.scale.lb=function(n,F,O,I,x,r,_){var d=q.scale.nd,w=q.scale.Vo;d.width=F;d.height=O;w.rect(0,0,F,O);
w.translate(r,_);w.scale(I,x);w.fillStyle=n;w.fill();return w.getImageData(0,0,F,O)};q.scale.m=function(n,F,O,I,x){var r=O.clone();
r.uZ();var _=x.d,d=x.v,w=q.z.om(F).H;q.z.m(w,r,w);var Z=q.z.Wk(w).lN(x),P=Z.x,C=Z.y,W=P+Z.d,v=C+Z.v,L=~~F.x,H=~~F.y,y=~~F.d,g=~~F.v;
for(var Q=C;Q<v;Q++)for(var J=P;J<W;J++){var A=J+.5,p=Q+.5,U=O.R*A+O.Pr*p+O.hb-L,j=O.O*A+O.oQ*p+O.i9-H;
if(0<=U&&0<=j&&U<y&&j<g)I[Q*_+J]=n[~~j*y+~~U]}};q.scale.ahR=function(n,F,O,I,x){var r=new Uint32Array(n.buffer),_=new Uint32Array(I.buffer),d=O.clone();
d.uZ();var w=x.d,Z=x.v,P=q.z.om(F).H;q.z.m(P,d,P);var C=q.z.Wk(P).lN(x),W=C.x,v=C.y,L=W+C.d,H=v+C.v,y=~~F.x,g=~~F.y,Q=~~F.d,J=~~F.v;
for(var A=v;A<H;A++)for(var p=W;p<L;p++){var U=p+.5,j=A+.5,b=O.R*U+O.Pr*j+O.hb-y,s=O.O*U+O.oQ*j+O.i9-g;
if(0<=b&&0<=s&&b<Q&&s<J)_[A*w+p]=r[~~s*Q+~~b]}};q.scale.dF=function(n,F,O,I,x,r,_){if(_<1)q.scale.a1i(n,F,O,I,x,r,Math.round(1/_));
else q.scale.a12(n,F,O,I,x,r,_)};q.scale.qJ=function(n,F,O,I,x,r,_,d){if(d)d=d.lN(new gv(0,0,F,O));n=new Uint32Array(n.buffer);
I=new Uint32Array(I.buffer);if(_<1)q.scale.akN(n,F,O,I,x,r,Math.round(1/_),d);else q.scale.ajm(n,F,O,I,x,r,_)};
q.scale.a12=function(n,F,O,I,x,r,_){for(var d=0;d<O;d++)for(var w=0;w<F;w++){var Z=n[d*F+w],P=Math.min(_,x-w*_),C=Math.min(_,r-d*_);
for(var e=0;e<C;e++)for(var W=0;W<P;W++)I[(_*d+e)*x+_*w+W]=Z}};q.scale.a1i=function(n,F,O,I,x,r,_){for(var d=0;
d<r;d++)for(var w=0;w<x;w++){var Z=0,P=Math.min(_,F-w*_),C=Math.min(_,O-d*_);for(var e=0;e<C;e++)for(var W=0;
W<P;W++)Z+=n[(_*d+e)*F+(_*w+W)];I[d*x+w]=Math.round(Z/(P*C))}};q.scale.ajm=function(n,F,O,I,x,r,_){for(var d=0;
d<O;d++)for(var w=0;w<F;w++){var Z=n[d*F+w],P=Math.min(_,x-w*_),C=Math.min(_,r-d*_);for(var e=0;e<C;
e++)for(var W=0;W<P;W++)I[(_*d+e)*x+_*w+W]=Z}};q.scale.akN=function(n,F,O,I,x,r,_,d){var w=0,Z=x,P=0,C=r;
if(d){w=Math.floor(d.x/_);Z=Math.ceil((d.x+d.d)/_);P=Math.floor(d.y/_);C=Math.ceil((d.y+d.v)/_)}for(var W=P;
W<C;W++)for(var v=w;v<Z;v++){var L=0,H=0,y=0,g=0,Q=Math.min(_,F-v*_),J=Math.min(_,O-W*_);for(var e=0;
e<J;e++)for(var A=0;A<Q;A++){var p=n[(_*W+e)*F+_*v+A],U=p>>>24;L+=U;H+=U*(p>>>16&255);y+=U*(p>>>8&255);
g+=U*(p&255)}if(L!=0){var j=1/L;I[W*x+v]=L/(Q*J)<<24|H*j<<16|y*j<<8|g*j}else I[W*x+v]=0}};q.N={};q.N.aeJ=function(n,F,O){var I=128,e=0,x=O.d,r=O.v;
for(var _=0;_<r;_++)for(var d=0;d<x;d++){if(n[e]>=I&&(d==0||n[e-1]<I||(d==x-1||n[e+1]<I)||(_==0||n[e-x]<I)||(_==r-1||n[e+x]<I)))F[e]=255;
e++}};q.N.a8s=function(n,F,O,I){var x=new Uint32Array([4278190080,4294967295]),r=O.d,_=O.v,d=0,w=0,Z=r,P=_;
if(I){d=I.x-O.x;w=I.y-O.y;Z=d+I.d;P=w+I.v}var C=new Uint8Array(F.buffer),W=new Uint32Array(F.buffer);
for(var v=w;v<P;v++)for(var L=d;L<Z;L++){var e=v*r+L;if((n[e]&128)!=0&&(v==0||(n[e-r]&128)==0||L==0||(n[e-1]&128)==0||L==r-1||(n[e+1]&128)==0||v==_-1||(n[e+r]&128)==0)){W[e]=x[(L+v&4)>>>2]}}};
q.N.alo=function(n,F,O,I,x,r){var _=O.d,d=O.v,w=0,Z=0,P=_,C=d;if(I){w=I.x-O.x;Z=I.y-O.y;P=w+I.d;C=Z+I.v}var W=new Uint8Array(F.buffer),v=new Uint32Array(F.buffer);
for(var L=Z;L<C;L++)for(var H=w;H<P;H++){var e=L*_+H,y=n[e];if(x==1)v[e]=255-y>>>1<<24|255;else v[e]=255<<24|(y<<16|y<<8|y)}};
q.ZZ={};q.ZZ.sh=function(n,F,O){var I,x;if(O=="front"){I=n.rect.clone();x=q.ZZ.anu}if(O=="union"){I=n.rect.Tq(F.rect);
x=q.ZZ.Tq}if(O=="difference"){I=F.rect.clone();x=q.ZZ.a2K}if(O=="intersection"){I=n.rect.lN(F.rect);
x=q.ZZ.lN}if(O=="xor"){I=n.rect.Tq(F.rect);x=q.ZZ.ajb}if(I.D2())return null;var r=q.f(I.X());q.k9(F.channel,F.rect,r,I);
var _=q.f(I.X());q.k9(n.channel,n.rect,_,I);x(_,r,r);var d=q.$o(r,I);if(d.D2())return null;if(!d.Qq(I)){var w=q.f(d.X());
q.k9(r,I,w,d);r=w;I=d}return{channel:r,rect:I}};q.ZZ.anu=function(n,F,O){for(var e=0;e<n.length;e++)O[e]=n[e]};
q.ZZ.Tq=function(n,F,O){for(var e=0;e<n.length;e++)O[e]=Math.min(n[e]+F[e],255)};q.ZZ.a2K=function(n,F,O){for(var e=0;
e<n.length;e++)O[e]=Math.max(F[e]-n[e],0)};q.ZZ.lN=function(n,F,O){var I=1/255;for(var e=0;e<n.length;
e++)O[e]=n[e]*F[e]*I};q.ZZ.ajb=function(n,F,O){var I=1/255;for(var e=0;e<n.length;e++)O[e]=Math.min(n[e]+F[e],255)-n[e]*F[e]*I};
q.HT=function(n,F){this.U=[];this.vs=[0];this.Nw=[];this.q1=[];this.fN=[0];this.t6=[];this.xZ=[];this.rows=n;
this.cols=F};q.HT.prototype.clone=function(){var n=this,F=n.rows,O=n.cols,I=new q.HT(F,O);I.U=n.U.slice(0);
I.vs=n.vs.slice(0);I.Nw=n.Nw.slice(0);I.q1=n.q1.slice(0);I.fN=n.fN.slice(0);I.t6=n.t6.slice(0);I.xZ=n.xZ.slice(0);
return I};q.HT.prototype.ws=function(n,F,O){var I=this.vs.length-1;for(var e=0;e<O;e++){var x=n[e],r=F[e];
this.U.push(x);this.Nw.push(r);if(r==I){this.xZ.push(x==0?0:1/x)}else{this.q1.push(x);this.t6.push(r)}}this.vs.push(this.U.length);
this.fN.push(this.q1.length)};q.HT.prototype.Zf=function(n,F){var O=this,I=O.rows,x=O.U,r=O.Nw;if(F==null)F=new Array(I);
for(var e=0;e<I;e++){var _=O.vs[e],d=O.vs[e+1],w=0;while((d-_&3)!=0){w+=x[_]*n[r[_]];_++}for(var Z=_;
Z<d;Z+=4)w+=x[Z]*n[r[Z]]+x[Z+1]*n[r[Z+1]]+x[Z+2]*n[r[Z+2]]+x[Z+3]*n[r[Z+3]];F[e]=w}return F};q.HT.prototype.multiply=function(n){return this.ea(n.ej())};
q.HT.prototype.ea=function(n){var F=this,O=F.rows,I=F.cols,x=n.rows,r=new q.HT(O,x),_=F.Nw,d=n.Nw;for(var e=0;
e<O;e++){var w=[],Z=[],P=F.vs[e],C=F.vs[e+1];for(var W=0;W<x;W++){var v=n.vs[W],L=n.vs[W+1],H=0,y=P,g=v;
while(y<C&&g<L){var Q=Math.max(_[y],d[g]);while(y<C&&_[y]<Q)y++;while(g<L&&d[g]<Q)g++;if(y<C&&g<L&&_[y]==d[g])H+=F.U[y++]*n.U[g++]}if(H!=0){w.push(H);
Z.push(W)}}r.ws(w,Z,w.length)}return r};q.HT.prototype.ej=function(){var n=this.rows,F=this.cols,O=[];
for(var e=0;e<F;e++)O.push([[],[]]);var I=this.U,x=this.vs,r=this.Nw;for(var e=0;e<n;e++){var _=x[e],d=x[e+1];
for(var w=_;w<d;w++){var Z=O[r[w]];Z[0].push(I[w]);Z[1].push(e)}}var P=new q.HT(F,n);for(var e=0;e<F;
e++)P.ws(O[e][0],O[e][1],O[e][1].length);return P};q.HT.prototype.cO=function(){var n=this.rows,F=this.cols,O=new Array(n),I=this.U,x=this.vs,r=this.Nw;
for(var e=0;e<n;e++){var _=O[e]=new Array(F);for(var d=0;d<F;d++)_[d]=0;var w=x[e],Z=x[e+1];for(var P=w;
P<Z;P++)_[r[P]]=I[P]}return O};q.HT.prototype.r7=function(n,F,O,I,x){function r(j,F,b,s){var G=j.length;
for(var e=0;e<G;e++)s[e]=j[e]-F[e]*b}function _(j,F,b,s){var G=j.length,T=0;while((G-T&3)!=0){s[T]=j[T]+F[T]*b;
T++}for(var e=T;e<G;e+=4){s[e]=j[e]+F[e]*b;s[e+1]=j[e+1]+F[e+1]*b;s[e+2]=j[e+2]+F[e+2]*b;s[e+3]=j[e+3]+F[e+3]*b}}function d(j,F,b){var s=j.length;
for(var e=0;e<s;e++)b[e]=j[e]*F[e]}function w(j,F){var b=j.length,s=0,G=0;while((b-s&3)!=0){G+=j[s]*F[s];
s++}for(var e=s;e<b;e+=4)G+=j[e]*F[e]+j[e+1]*F[e+1]+j[e+2]*F[e+2]+j[e+3]*F[e+3];return G}var Z=I!=null?2:1,P=Date.now(),C=0,W=this,v=n.slice(0),L=n.slice(0);
W.Zf(n,L);r(F,L,1,v);var H=this.xZ;if(Z==0){H=v.slice(0);H.fill(1)}var y=v.slice(0);d(H,v,y);var g=y.slice(0),Q=w(v,y);
while(!0){W.Zf(g,L);var J=Q/w(g,L);_(n,g,J,n);r(v,L,J,v);if((C&7)==0&&Math.sqrt(w(v,v))<O)break;if(Z<=1)d(H,v,y);
else{var A=v.slice(0);I.aeL(A,v);x.aeZ(y,A)}var p=w(v,y),U=p/Q;_(y,g,U,g);Q=p;C++}};q.HT.prototype.a0E=function(n,F,O,I){var x=Date.now(),r=1.96,d=0;
if(O==null)O=5e-6;if(I==null)I=1e9;var _=1-r,E=this.rows,w=this.q1,Z=this.fN,P=this.t6,C=this.xZ;while(!0){var W=0;
for(var e=0;e<E;e++){var v=F[e],L=Z[e],H=Z[e+1];if(H-L==4)v-=w[L]*n[P[L]]+w[L+1]*n[P[L+1]]+w[L+2]*n[P[L+2]]+w[L+3]*n[P[L+3]];
else for(var y=L;y<H;y++)v-=w[y]*n[P[y]];var g=n[e]*_+C[e]*v*r,Q=g-n[e];W+=Q*Q;n[e]=g}if(W/E<O||Date.now()>x+I)break}};
q.HT.prototype.an_=function(n,F,O,I){var x=Date.now(),r=1.96,d=0;if(O==null)O=5e-5;if(I==null)I=1e9;
var _=1-r,E=this.rows,w=this.q1,Z=this.fN,P=this.t6,C=this.xZ;while(!0){var W=0;for(var e=0;e<E;e++){var v=e*3,L=F[v],H=F[v+1],y=F[v+2],g=Z[e],Q=Z[e+1];
for(var J=g;J<Q;J++){var A=w[J],p=P[J]*3;L-=A*n[p+0];H-=A*n[p+1];y-=A*n[p+2]}var U=C[e]*r,j=n[v+0]*_+L*U,b=n[v+1]*_+H*U,s=n[v+2]*_+y*U,G=j-n[v+0],T=b-n[v+1],z=s-n[v+2];
W+=.4*G*G+.5*T*T+.1*z*z;n[v+0]=j;n[v+1]=b;n[v+2]=s}if(W/E<O||Date.now()>x+I)break}};q.pH={};q.pH.G0=function(n,F,O){return{t:"Objc",v:{classID:"CrPt",Hrzn:{t:"doub",v:n},Vrtc:{t:"doub",v:F},Cnty:{t:"bool",v:O}}}};
q.pH.m=function(n,F){for(var e=0;e<n.length;e++){var O=n[e].v,I=F.Pz(new aE(O.Hrzn.v,O.Vrtc.v));O.Hrzn.v=Math.round(I.x);
O.Vrtc.v=Math.round(I.y)}};q.pH.wA=function(n,F,O){var E=n.length-1,I=q.PS.Bc(E+1,E+2);for(var e=1;e<E;
e++){I[e][e-1]=1/(n[e]-n[e-1]);I[e][e]=2*(1/(n[e]-n[e-1])+1/(n[e+1]-n[e]));I[e][e+1]=1/(n[e+1]-n[e]);
I[e][E+1]=3*((F[e]-F[e-1])/((n[e]-n[e-1])*(n[e]-n[e-1]))+(F[e+1]-F[e])/((n[e+1]-n[e])*(n[e+1]-n[e])))}I[0][0]=2/(n[1]-n[0]);
I[0][1]=1/(n[1]-n[0]);I[0][E+1]=3*(F[1]-F[0])/((n[1]-n[0])*(n[1]-n[0]));I[E][E-1]=1/(n[E]-n[E-1]);I[E][E]=2/(n[E]-n[E-1]);
I[E][E+1]=3*(F[E]-F[E-1])/((n[E]-n[E-1])*(n[E]-n[E-1]));q.PS.bM(I,O)};q.pH.a1M=function(n,F,O,I){if(n<=F[0])return O[0];
if(n>=F[F.length-1])return O[F.length-1];var e=1;while(F[e]<n)e++;var x=F[e],r=F[e-1],_=O[e],d=O[e-1],w=(n-r)/(x-r),Z=I[e-1]*(x-r)-(_-d),P=-I[e]*(x-r)+(_-d),C=(1-w)*d+w*_+w*(1-w)*(Z*(1-w)+P*w);
return C};q.pH.NH=function(n,F,O,I){var x={Hz:[n[0]],y5:[F[0]],zU:[]};I[0]=x;for(var e=1;e<n.length-1;
e++){x.Hz.push(n[e]);x.y5.push(F[e]);if(O[e]==!1){q.pH.wA(x.Hz,x.y5,x.zU);x={Hz:[n[e]],y5:[F[e]],zU:[]}}I[e]=x}x.Hz.push(n[e]);
x.y5.push(F[e]);q.pH.wA(x.Hz,x.y5,x.zU);I[e]=x};q.pH.Ep=function(n,F,O,I){if(n<=F[0])return O[0];if(n>=F[F.length-1])return O[F.length-1];
var e=1;while(F[e]<n)e++;var x=I[e-1];return q.pH.a1M(n,x.Hz,x.y5,x.zU)};q.pH.Ot=function(n){var F={Hz:[],y5:[],A3:[]};
for(var e=0;e<n.length;e++){F.Hz[e]=n[e].v.Hrzn.v;F.y5[e]=n[e].v.Vrtc.v;F.A3[e]=n[e].v.Cnty?n[e].v.Cnty.v:!0}return F};
q.pH.Sz=function(n,E,F){var O=0,I=255;if(F){O=-1e9;I=1e9}var x=q.pH.Ot(n),r=[];q.pH.NH(x.Hz,x.y5,x.A3,r);
var _=[];for(var e=0;e<E;e++)_[e]=1/255*Math.max(O,Math.min(I,q.pH.Ep(e*(255/(E-1)),x.Hz,x.y5,r)));return _};
q.pH.a3j=function(n,E,F){var O=Math.round(n.length/20),I=E-n.length,x=F?(n[O]-n[0])/O:0,r=F?n[0]-I*x:n[n.length-1],_=[];
for(var e=0;e<I;e++)_.push(r+e*x);return F?_.concat(n):n.concat(_)};q.pH.ZE=function(n,E,F){var O=q.pH.Ot(n),I=[];
q.pH.NH(O.Hz,O.y5,O.A3,I);var x=new Uint8Array(E),r=E/256;for(var e=0;e<E;e++)x[e]=Math.max(0,Math.min(E-1,q.pH.Ep(e*r,O.Hz,O.y5,I)));
if(F){x[0]=0;if(x[1]>100)x[1]=.4*x[1];if(x[2]>150)x[1]=.7*x[2]}return x};q.pH.kL=function(n,F){var O=new Uint8Array(n.length);
for(var e=0;e<n.length;e++)O[e]=F[n[e]];return O};q.pH.JC=function(n,F,O){var I=V.w("canvas","");I.width=F;
I.height=O;var x=I.getContext("2d"),r=q.pH.ZE(n,256);x.scale(F/255,O/255);x.fillStyle="#fff";x.fillRect(0,0,255,255);
x.fillStyle="#333";x.beginPath();x.moveTo(0,255);for(var e=0;e<r.length;e++)x.lineTo(e,255-r[e]);x.lineTo(255,255);
x.closePath();x.fill();return I.toDataURL()};q.style={};q.style.stroke=function(n,F,O,I){var x=O.d,r=O.v,_=new Float64Array(x*r);
q.style.sq(n,_,x,r);q.style.CG(F,O,_,O,I)};q.style.CG=function(n,F,O,I,x){var r=F.lN(I),_=r.d,d=r.v;
x+=.5;var w=r.x-F.x,Z=r.y-F.y,P=F.d,C=r.x-I.x,W=r.y-I.y,v=I.d;for(var L=0;L<d;L++){var H=(L+W)*v+C,y=(L+Z)*P+w;
for(var g=0;g<_;g++){var Q=Math.max(0,Math.min(1,x-O[H+g]));n[y+g]=Math.round(Q*255)}}};q.style.af7=function(n,F,O,I){for(var x=0;
x<O;x++)for(var r=0;r<F;r++){var _=x*F+r,d=0,w=0,Z=n[_];if(r==0||x==0){d=n[_+1]-Z;w=n[_+F]-Z}else if(r==O-1||x==F-1){d=Z-n[_-1];
w=Z-n[_-F]}else{d=n[_+1]-n[_-1];w=n[_+F]-n[_-F]}if(d!=0||w!=0){var P=1/Math.sqrt(d*d+w*w);d*=P;w*=P}I[_+_]=d;
I[_+_+1]=w}};q.style.sq=function(n,F,O,I){var x=0,r=O*I;for(var e=0;e<r;e++)x|=n[e];if(x==0){F.fill(1e9);
return}var _=q.style.kn(n,O,I);for(var d=0;d<I;d++)for(var w=0;w<O;w++){var e=d*O+w,Z=_[e*2],P=_[e*2+1],C=(d+P)*O+w+Z;
if(Z==0&&P==0){F[e]=0;continue}var W=Math.sqrt(Z*Z+P*P),v=n[C]*(1/255),L=1/W,H=Math.abs(Z)*L,y=Math.abs(P)*L;
if(y>H){var g=y;y=H;H=g}F[e]=W+q.style.amD(H,y,v)}};q.style.amD=function(n,F,O){return(.5-O)*n};q.style.kn=function(n,F,O,I){if(I==null){I=!0;
for(var e=0;e<n.length;e++)I=I&&(n[e]==0||n[e]==255)}var x=new Int16Array(F*O*2);if(I)q.style.a2T(n,x,F,O);
else q.style.ajq(n,x,F,O);return x};q.style.ajq=function(n,F,O,I){var x=O*I;for(var e=0;e<x;e++)if(n[e]==0){F[e*2]=16383;
F[e*2+1]=16383}for(var r=1;r<=I-1;r++){var e=r*O;for(var _=0;_<=O-1;_++)q.style.OL(F,n,O,e+_<<1,-1);
for(var _=1;_<=O-1;_++)q.style.Un(F,n,O,e+_<<1,-1);for(var _=O-2;_>=0;_--)q.style.Un(F,n,O,e+_<<1,1)}for(var r=I-2;
r>=0;r--){var e=r*O;for(var _=0;_<=O-1;_++)q.style.OL(F,n,O,e+_<<1,1);for(var _=1;_<=O-1;_++)q.style.Un(F,n,O,e+_<<1,-1);
for(var _=O-2;_>=0;_--)q.style.Un(F,n,O,e+_<<1,1)}};q.style.Un=function(n,F,O,I,x){var r=(I>>>1)+x<<1,_=n[I],d=n[I+1],w=n[r]+x,Z=n[r+1],P=w*w+Z*Z,C=_*_+d*d;
if(Z!=16383&&(_==16383||Math.sqrt(P)+(.5-F[(I>>>1)+Z*O+w]*(1/255))<Math.sqrt(C)+(.5-F[(I>>>1)+d*O+_]*(1/255)))){n[I]=w;
n[I+1]=Z}};q.style.OL=function(n,F,O,I,x){var r=(I>>>1)+x*O<<1,_=n[I],d=n[I+1],w=n[r],Z=n[r+1]+x,P=w*w+Z*Z,C=_*_+d*d;
if(w!=16383&&(_==16383||Math.sqrt(P)+(.5-F[(I>>>1)+Z*O+w]*(1/255))<Math.sqrt(C)+(.5-F[(I>>>1)+d*O+_]*(1/255)))){n[I]=w;
n[I+1]=Z}};q.style.a2T=function(n,F,O,I){var x=O*I;for(var e=0;e<x;e++)if(n[e]==0){F[e*2]=16383;F[e*2+1]=16383}for(var r=1;
r<=I-1;r++){var e=r*O;for(var _=0;_<=O-1;_++)q.style.wJ(F,n,O,e+_<<1,-1);for(var _=1;_<=O-1;_++)q.style.rm(F,n,O,e+_<<1,-1);
for(var _=O-2;_>=0;_--)q.style.rm(F,n,O,e+_<<1,1)}for(var r=I-2;r>=0;r--){var e=r*O;for(var _=0;_<=O-1;
_++)q.style.wJ(F,n,O,e+_<<1,1);for(var _=1;_<=O-1;_++)q.style.rm(F,n,O,e+_<<1,-1);for(var _=O-2;_>=0;
_--)q.style.rm(F,n,O,e+_<<1,1)}};q.style.rm=function(n,F,O,I,x){var r=(I>>>1)+x<<1,_=n[I],d=n[I+1],w=n[r]+x,Z=n[r+1],P=w*w+Z*Z,C=_*_+d*d;
if(Z!=16383&&(_==16383||P<C)){n[I]=w;n[I+1]=Z}};q.style.wJ=function(n,F,O,I,x){var r=(I>>>1)+x*O<<1,_=n[I],d=n[I+1],w=n[r],Z=n[r+1]+x,P=w*w+Z*Z,C=_*_+d*d;
if(w!=16383&&(_==16383||P<C)){n[I]=w;n[I+1]=Z}};q.style.af$=function(n,F,O,I,x){var r=O*I,_=(O+I+1)*1.01;
for(var e=0;e<r;e++)if(n[e]<=x)F[e]=_;for(var d=1;d<O;d++)F[d]=Math.min(F[d],F[d-1]);for(var w=1;w<I;
w++){var e=w*O;F[e]=Math.min(F[e],Math.min(F[e-O]+1,F[e-O+1]+Math.SQRT2));for(var d=1;d<O-1;d++){var Z=F[++e],P=Math.min(F[e-1]+1,Math.min(F[e-O-1]+Math.SQRT2,Math.min(F[e-O]+1,F[e-O+1]+Math.SQRT2)));
if(P<Z)F[e]=P}e++;F[e]=Math.min(F[e],Math.min(F[e-1]+1,Math.min(F[e-O-1]+Math.SQRT2,F[e-O]+1)))}for(var d=O-2;
d>=0;d--)F[d+r-O]=Math.min(F[d+r-O],F[d+r-O+1]);for(var w=I-2;w>=0;w--){var e=w*O+O-1;F[e]=Math.min(F[e],Math.min(F[e+O]+1,F[e+O-1]+Math.SQRT2));
for(var d=O-2;d>=1;d--){var Z=F[--e],P=Math.min(F[e+1]+1,Math.min(F[e+O-1]+Math.SQRT2,Math.min(F[e+O]+1,F[e+O+1]+Math.SQRT2)));
if(P<Z)F[e]=P}e--;F[e]=Math.min(F[e],Math.min(F[e+1]+1,Math.min(F[e+O]+1,F[e+O+1]+Math.SQRT2)))}};q.style.a3n=function(n,F,O,I,x){var r=new Int32Array(O*I);
q.style.a48(n,r,O,I,x);q.style.a5t(r,F,O,I)};q.style.a48=function(n,F,O,I,x){var r=new Int32Array(I);
for(var _=0;_<O;_++){var d=O+I;for(var w=I-1;w>=0;w--){if(n[w*O+_]>x)d=0;else d++;r[w]=d}d=O+I;for(var w=0;
w<I;w++){if(n[w*O+_]>x)d=0;else d++;F[w*O+_]=d<r[w]?-d:r[w]}}};q.style.a5t=function(n,F,O,I){var x=(O+I)*(O+I),r=new Float64Array(O),_=new Uint16Array(O);
for(var d=0;d<I;d++){var w=d*O,Z=0;_[0]=0;r[0]=-x;r[1]=+x;for(var P=1;P<O;P++){var C=n[P+w]*n[P+w]+P*P,W=(C-(n[_[Z]+w]*n[_[Z]+w]+_[Z]*_[Z]))/(2*P-2*_[Z]);
while(W<=r[Z]){Z--;W=(C-(n[_[Z]+w]*n[_[Z]+w]+_[Z]*_[Z]))/(2*P-2*_[Z])}Z++;_[Z]=P;r[Z]=W;r[Z+1]=x}Z=0;
for(var P=0;P<O;P++){while(r[Z+1]<P)Z++;var v=_[Z]-P,L=n[_[Z]+w],e=d*O+P<<1;F[e]=v;F[e+1]=L}}};q.style.ox=function(n,F,O){if(O)for(var e=0;
e<n.length;e++){var I=n[e];if(I>0)n[e]=Math.max(0,Math.min(255,I+F*2*(q.style.GR(e)-128)))}else for(var e=0;
e<n.length;e++){var I=n[e];if(I>0)n[e]=Math.max(0,Math.min(255,I+Math.min(I*3,F*2*(q.style.GR(e)-128))))}};
q.style.GR=function(n){n=n^61^n>>16;n=n+(n<<3);n=n^n>>4;n=n*668265261;n=n^n>>15;return n&255};q.Sr={};
q.Sr.XH=function(n,F,O){var I=n.canvas,x=V.Z(),r=Math.floor;if(I.width!=r(F*x)||I.height!=r(O*x))V.$C(I,F,O,n)};
q.Sr.Tx=function(n,F,O,I,x,r){q.Sr.XH(n,F,O);if(r==null)r=!1;var _=x.channel,d=x.rect,w=!x.isEnabled;
F=Math.floor(F*V.Z());O=Math.floor(O*V.Z());if(F*O==0)return;var Z=n.createImageData(F,O),P=Z.data,C=1/F,W=1/O;
for(var e=0;e<O;e++)for(var v=0;v<F;v++){var L=e*F+v,H=L*4,y=Math.round(I.x+v*C*I.d),g=Math.round(I.y+e*W*I.v),Q=0;
if(y<d.x||y>=d.x+d.d||g<d.y||g>=d.y+d.v)Q=x.color;else Q=_[(g-d.y)*d.d+(y-d.x)];Q=255*(255-x.JP)+Q*x.JP>>>8;
if(r)Q=170+Math.round(.4*(Q-170));P[H]=Q;P[H+1]=Q;P[H+2]=Q;P[H+3]=255}n.putImageData(Z,0,0);if(w)q.Sr.Ow(n,F,O)};
q.Sr.i6=[];q.Sr.aiV=function(n,F,O,I){var x,r,_,d=V.Z();F=Math.floor(d*F);O=Math.floor(d*O);x=Math.ceil(Math.max(F,O)*.35);
r=F-x;_=O-x;var w=q.Sr.i6[x];if(w==null){var Z=V.w("canvas"),P=Z.getContext("2d");Z.width=Z.height=x;
P.fillStyle="#eeeeee";P.fillRect(0,0,x,x);var C=Math.round(x*.27),W=P.lineWidth=Math.max(1,Math.round(x*.12)),v=W/2;
P.strokeRect(1+v,1+v,x-W-2,x-W-2);P.strokeRect(C+v,C+v,x-C-C-W,x-C-C-W);w=q.Sr.i6[x]=P.getImageData(0,0,x,x)}n.putImageData(w,r,_)};
q.Sr.NF=[];q.Sr.a5r=function(n,F,O){var I,x,r,_=V.Z();F=Math.floor(_*F);O=Math.floor(_*O);I=Math.ceil(Math.max(F,O)*.35);
x=F-I;r=O-I;var d=q.Sr.NF[I];if(d==null){var w=V.w("canvas"),Z=w.getContext("2d");w.width=w.height=I;
Z.fillStyle="#eeeeee";Z.fillRect(0,0,I,I);Z.lineWidth=1;Z.strokeRect(2.5,2.5,I-5,I-5);var P=Z.createImageData(3,3);
q.IW(P.data,4278190080);P.data[4*4]=P.data[4*4+1]=P.data[4*4+2]=238;Z.putImageData(P,1,1);Z.putImageData(P,I-4,1);
Z.putImageData(P,1,I-4);Z.putImageData(P,I-4,I-4);d=q.Sr.NF[I]=Z.getImageData(0,0,I,I)}n.putImageData(d,x,r)};
q.Sr.aoj=function(n,F,O,I,x){q.Sr.XH(n,F,O);F=Math.floor(F*V.Z());O=Math.floor(O*V.Z());var r=F/I.d;
if(F*O==0)return;n.fillStyle="#999999";n.setTransform(1,0,0,1,0,0);n.clearRect(0,0,F,O);var _=q.Sr.Hj;
if(_==null){_=q.Sr.Hj=JSON.parse(JSON.stringify(bW.uS.default));_.strokeEnabled.v=!0}_.strokeStyleLineWidth.v.val=1*V.Z()/r;
n.fillStyle="#ffffff";n.scale(r,r);q.Y.xM(x.b,n,0,0);q.Y.xM(x.b,n,0,0,_)};q.Sr.Ou=null;q.Sr.Y8=function(n,F,O,I,x,r,_,d){q.Sr.XH(n,F,O);
F=Math.floor(F*V.Z());O=Math.floor(O*V.Z());if(F*O==0)return;var w=Math.max(F,O),Z=q.Sr.Ou;if(Z==null||Z.width<w||Z.height<w){q.Sr.Ou=Z=n.createImageData(w,w)}w=Z.width;
var P=Z.data,C=I.d/F,W=I.v/O,v=r.x,L=r.x+r.d,H=r.y,y=r.y+r.v;for(var e=0;e<O;e++)for(var g=0;g<F;g++){var Q=e*w+g,J=Q*4,A=~~(I.x+g*C),p=~~(I.y+e*W),U=q.cn(e,g,2);
if(A<v||A>=L||p<H||p>=y){P[J]=U;P[J+1]=U;P[J+2]=U;P[J+3]=255}else{var j=(p-r.y)*r.d+(A-r.x)<<2,b=x[j+3]*(1/255);
P[J]=x[j+0]*b+U*(1-b);P[J+1]=x[j+1]*b+U*(1-b);P[J+2]=x[j+2]*b+U*(1-b);P[J+3]=255}}if(d!=null)for(var e=0;
e<P.length;e+=4)P[e]=P[e+1]=P[e+2]=P[e+d];n.putImageData(Z,0,0);if(_)q.Sr.Ow(n,F,O)};q.Sr.anU=function(n,F,O,I){q.Sr.XH(n,F,O);
n.fillStyle=q.Sr.S_(I.Clr.v);n.fillRect(0,0,F,O);q.Sr.my(n,F,O)};q.Sr.R_=null;q.Sr.a2i=function(n,F,O,I){q.Sr.XH(n,F,O);
var x=n.canvas.width,r=n.canvas.height,_=q.Sr.R_;if(_==null||_.width!=x||_.height!=r){n.fillStyle="#ffffff";
n.fillRect(0,0,F,O);n.fillStyle="#000000";n.font=""+O*.7+"px serif";n.fillText("T",(F-O*.43)/2,O*.75);
n.fillText("T",(F-O*.43)/2,O*.75);q.Sr.R_=n.getImageData(0,0,x,r)}else n.putImageData(_,0,0)};q.Sr.aa4=function(n,F,O){q.Sr.XH(n,F,O);
n.clearRect(0,0,F,O);n.font=O*.7+"px serif";n.fillText(":(",(F-O*.43)/2,O*.7)};q.Sr.a6Z=function(n,F,O,I){q.Sr.XH(n,F,O);
var x=dK.get(I),r=hl.get(dK.names[x]).substring(0,3);n.fillStyle="#ffffff";n.fillRect(0,0,F,O);n.fillStyle="#000000";
n.font=O*.55+"px sans-serif";var _=n.measureText(r);n.fillText(r,(F-_.width)/2,O*.67);n.fillRect(0,0,F,O*.1);
n.fillRect(0,O*.9,F,O*.1)};q.Sr.ano=function(n,F,O,I){q.Sr.XH(n,F,O);var x=n.canvas.width,r=n.canvas.height,_=n.getImageData(0,0,x,r);
q.W.Vt(I.Grad.v,new Uint8Array(_.data.buffer),new gv(0,0,x,r),[1/x,0,0,1/r],x/2,r/2,!1,0,16711680,65280);
n.putImageData(_,0,0);q.Sr.my(n,F,O)};q.Sr.a56=function(n,F,O,I,x){q.Sr.XH(n,F,O);var r=n,_=ha.Yi(I.Ptrn.v,x.add.Patt);
if(_==null)return;var d=_.IR[1];q.Sr.Y8(n,F,O,d,_.IR[0],d,!1);q.Sr.my(r,F,O)};q.Sr.Ow=function(n,F,O){n.strokeStyle="#bb0000";
n.lineWidth=3;n.beginPath();n.moveTo(F*.15,O*.15);n.lineTo(F*.85,O*.85);n.moveTo(F*.85,O*.15);n.lineTo(F*.15,O*.85);
n.closePath();n.stroke()};q.Sr.Ow=function(n,F,O){n.strokeStyle="#bb0000";n.lineWidth=3;n.beginPath();
n.moveTo(F*.15,O*.15);n.lineTo(F*.85,O*.85);n.moveTo(F*.85,O*.15);n.lineTo(F*.15,O*.85);n.closePath();
n.stroke()};q.Sr.my=function(n,F,O){n.fillStyle="#eeeeee";n.fillRect(0,O*.75,F,O*.25);n.beginPath();
n.moveTo(0,O*.75);n.lineTo(F,O*.75);n.moveTo(F*.1,O*.875);n.lineTo(F*.9,O*.875);n.moveTo(F*.65,O*.825);
n.lineTo(F*.65,O*.95);n.closePath();n.stroke()};q.Sr.S_=function(n){var F=q.W.S_(n),O=Math.round(F.Q)<<16|Math.round(F.l)<<8|Math.round(F.O);
return"#"+q.c7(O)};q.Y={};q.Y.J5=function(n,F,O){var I=[],x=-1;for(var e=0;e<n.length;e++){var r=n[e];
if((r.type==0||r.type==3)&&r.Xu!=-1)x++;if(r.type>5||r.type==0||r.type==3)continue;if(F!=null&&F.indexOf(x)==-1)continue;
if(O!=null&&O.indexOf(e)==-1)continue;I.push(r.pt.x);I.push(r.pt.y);I.push(r.I.x);I.push(r.I.y);I.push(r.Cz.x);
I.push(r.Cz.y)}return I};q.Y.e4=function(n,F,O,I){var x=0,r=-1;for(var e=0;e<F.length;e++){var _=F[e];
if((_.type==0||_.type==3)&&_.Xu!=-1)r++;if(_.type>5||_.type==0||_.type==3)continue;if(O!=null&&O.indexOf(r)==-1)continue;
if(I!=null&&I.indexOf(e)==-1)continue;_.pt.mT(n[x],n[x+1]);_.I.mT(n[x+2],n[x+3]);_.Cz.mT(n[x+4],n[x+5]);
x+=6}};q.Y.gS=function(n,F,O,I){var x=q.Y.J5(n,O,I);q.z.m(x,F,x);q.Y.e4(x,n,O,I)};q.Y.a51=function(n,F,O,I){var x=q.Y.J5(n,O,I);
q.J.m(F,x);q.Y.e4(x,n,O,I)};q.Y.aaf=function(n,F,O,I){if(O==null&&I==null){var x=q.Y.aap(n,40);for(var e=0;
e<x.length;e++)n[e]=x[e]}var r=q.Y.J5(n,O,I);q.uY.m(F,r,q.z.gh(r));q.Y.e4(r,n,O,I)};q.Y.aap=function(n,F){var O=[];
for(var e=0;e<n.length;e++){var I=n[e];if(I.type>5){O.push(JSON.parse(JSON.stringify(I)));continue}var x=q.Y.ahQ(n,e+1,I.length);
x=q.z.iC(x,F);var r=q.Y.aeh(x);e+=I.length;I=JSON.parse(JSON.stringify(I));I.length=r.length;O.push(I);
for(var _=0;_<r.length;_++)O.push(r[_])}return O};q.Y.ahQ=function(n,F,O){var I={s:["M"],H:[]},x=n[F],r=n[F+O-1];
I.H.push(x.I.x,x.I.y);for(var e=1;e<O;e++){var _=n[F+e-1],d=n[F+e];I.s.push("C");I.H.push(_.Cz.x,_.Cz.y,d.pt.x,d.pt.y,d.I.x,d.I.y)}I.s.push("C");
I.H.push(r.Cz.x,r.Cz.y,x.pt.x,x.pt.y,x.I.x,x.I.y);return I};q.Y.aeh=function(n){var F=[],O=n.s,I=n.H,x=0,E=I.length;
F.push({type:2,pt:new aE(I[E-4],I[E-3]),I:new aE(I[0],I[1]),Cz:new aE(I[2],I[3])});for(var e=0;e<O.length-2;
e++){var r=e*6+4;F.push({type:2,pt:new aE(I[r],I[r+1]),I:new aE(I[r+2],I[r+3]),Cz:new aE(I[r+4],I[r+5])})}return F};
q.Y.abL=function(n){for(var e=0;e<n.length;e++){if(n[e].type>5)continue;var F=n[e].length;if(!(F==4||F==6||F==8)){e+=F;
continue}for(var O=0;O<F;O++){var I=n[e+1+O],x=n[e+1+(O+1)%F],r=Math.min(I.I.x,x.I.x),_=Math.min(I.I.y,x.I.y),d=0,w=0;
if(I.I.x<x.I.x){d=I.I.y-_;w=d-(x.I.x-r)}else{d=x.I.y-_;w=d-(I.I.x-r)}if(Math.abs(w)<.2*d)return d}}return-1};
q.Y.if=function(n,F,O){function I(W,v){var L=Math.min(W.x,v.x),H=Math.min(W.y,v.y),y=Math.max(W.x+W.d,v.x+v.d),g=Math.max(W.y+W.v,v.y+v.v);
return new gv(L,H,y-L,g-H)}var x=null,r=-1,_=!q.Y.$w(n);for(var e=0;e<n.length;e++){var d=n[e];if(d.type>5)continue;
if((d.type==0||d.type==3)&&d.Xu!=-1)r++;if(F!=null&&F.indexOf(r)==-1)continue;if(e==n.length-1)break;
var w=d.type==3,Z=d.length,P=d.Xu,C=q.Y.a8x(n,e+1,Z,w);if(x==null)x=C;else if(O)x=I(x,C);else if(_){if(F!=null||P==0||P==-1||P==2)x=I(x,C);
else if(P==1)x=x;else if(P==3){x=C;_=!1}}else{if(F!=null||P==0||P==-1||P==1)x=I(x,C);else if(P==2)x=x;
else if(P==3)x=x.lN(C)}e+=Z}if(x==null||x.d<0||x.v<0)x=new gv(0,0,0,0);return x};q.Y.a0c=new Float64Array(4);
q.Y.a8x=function(n,e,F,O){var I=q.Y.a0c;I[0]=1e30;I[1]=1e30;I[2]=-1e30;I[3]=-1e30;var x=n[e+F-1];if(!O)q.Y.nx(x.I.x,x.I.y,x.Cz.x,x.Cz.y,n[e].pt.x,n[e].pt.y,n[e].I.x,n[e].I.y,I);
for(var r=e;r<e+F-1;r++){var _=n[r],d=n[r+1];q.Y.nx(_.I.x,_.I.y,_.Cz.x,_.Cz.y,d.pt.x,d.pt.y,d.I.x,d.I.y,I)}return new gv(I[0],I[1],I[2]-I[0],I[3]-I[1])};
q.Y.nx=function(n,F,O,I,x,r,_,d,w){if(n==O&&F==I&&x==_&&r==d){w[0]=Math.min(w[0],Math.min(n,_));w[1]=Math.min(w[1],Math.min(F,d));
w[2]=Math.max(w[2],Math.max(n,_));w[3]=Math.max(w[3],Math.max(F,d));return}var Z=n,P=F,C=n,W=F,v=40,L=1/(v-1);
for(var H=0;H<v;H++){var y=H*L,g=1-y,Q=g*g*g,J=3*g*g*y,A=3*g*y*y,p=y*y*y,U=Q*n+J*O+A*x+p*_,j=Q*F+J*I+A*r+p*d;
if(U<Z)Z=U;else if(U>C)C=U;if(j<P)P=j;else if(j>W)W=j}if(Z<w[0])w[0]=Z;if(P<w[1])w[1]=P;if(C>w[2])w[2]=C;
if(W>w[3])w[3]=W};q.Y.oF=function(n,F){var O=n.length-3,I=F%O,x=Math.floor(I);if(F<0||x>=O)return null;
var r=n[3+x],_=n[3+(x+1)%O],d=r.I,w=r.Cz,Z=_.pt,P=_.I,C=I-x,W=1-C,v=W*W*W*d.x+3*W*W*C*w.x+3*W*C*C*Z.x+C*C*C*P.x,L=W*W*W*d.y+3*W*W*C*w.y+3*W*C*C*Z.y+C*C*C*P.y;
return new aE(v,L)};q.Y.Y_=function(n){var F=2,O=q.Y._v(n),I=!1;for(var e=2;e<n.length;e++){var x=n[e].Xu;
if(x!=null){if(x==2||x==0||x==3)I=!0}}if(I&&n.length<15e3&&O>1)n=q.Y.YH(n);var r=q.z.qg(n);return{agy:Typr.U.pathToSVG({crds:r.H,cmds:r.s},F),JI:I?1:0}};
q.Y.YH=function(n){q.Y.VJ();var F,O=q.Y.lj(n),I=[];for(var e=0;e<O.length;e++){var x=O[e][0],r=O[e][1];
if(Math.abs(x.area)<1e-5)I.push(x);else if(F==null)F=x;else{if(!x.closed)x.closed=!0;F=F[r](x);F.remove()}}if(F==null)F=new paper.CompoundPath(I);
else{if(F.segments)F=new paper.CompoundPath(F);for(var e=0;e<I.length;e++){F.addChild(I[e])}}var _=n.slice(0,2);
_=_.concat(q.Y.xs(F));if(_[2])_[2].Xu=1;for(var e=3;e<_.length;e++)if(_[e].Xu!=null)_[e].Xu=-1;return _};
q.Y.VJ=function(){if(q.Y.ag8==null){var n=V.w("canvas");paper.setup(n);q.Y.ag8=!0}};q.Y.aif=function(n,F){q.Y.VJ();
var O=[],I=q.Y.lj(n),x=new paper.Path.Rectangle(new paper.Rectangle(F.x,F.y,F.d,F.v));x.remove();x.fillColor=new paper.Color(1,0,0);
for(var e=0;e<I.length;e++){if(x.intersects(I[e][0])||x.contains(I[e][0].children[0].segments[0].point))O.push(e)}return O};
q.Y.q9=function(n,F,O,I){q.Y.VJ();var x=O?{curves:!0,tolerance:I}:null,r=new paper.Point(F.x,F.y),_=q.Y.lj(n);
for(var e=_.length-1;e>=0;e--){var d=_[e][0],w=d.hitTest(r,x);if(w!=null)return{FI:e,Yw:O?w.location.index:null}}return{FI:-1}};
q.Y.x1=function(n,F,O){var I=[[],[],[]];for(var e=0;e<n.length;e++){var x=n[e];if(x.type>5||x.type==0||x.type==3)continue;
var r=O==null?!0:O.indexOf(e)!=-1;if(F.JX(x.I))I[0].push(e);if(F.JX(x.pt)&&r)I[1].push(e);if(F.JX(x.Cz)&&r)I[2].push(e)}return I};
q.Y.ajk=function(n,F,O){var I=O.slice(0),x=[null,null],r=-1,d=null;for(var e=2;e<n.length;e++){if((n[e].type==0||n[e].type==3)&&n[e].Xu!=-1)r++;
x[e]=O[r]}O=x;var _=n.slice(0,2);x=O.slice(0,2);for(var e=2;e<n.length;e++){if(n[e].type==0||n[e].type==3){d=n[e];
_.push(d);x.push(O[e])}else{if(F.indexOf(e)==-1){_.push(n[e]);x.push(O[e])}else{d.length--;q.oK.w$(O,e)}}}for(var e=2;
e<_.length;e++){var w=_[e];if(w.type!=0&&w.type!=3)continue;if(w.length==0){if(_[e+1]&&_[e+1].Xu==-1){_[e+1].Xu=w.Xu}x.splice(e,1);
_.splice(e,1);e--}}for(var e=0;e<I.length;e++)if(x.indexOf(I[e])==-1){I.splice(e,1);e--}return _};q.Y.aoW=function(n,F){var O=n.slice(0,2),I=-1;
for(var e=2;e<n.length;e++){if((n[e].type==0||n[e].type==3)&&n[e].Xu!=-1)I++;if(F.indexOf(I)==-1)O.push(n[e])}return O};
q.Y.a9I=function(n,F){var O=n.slice(0,2),I=-1;for(var e=2;e<n.length;e++){if((n[e].type==0||n[e].type==3)&&n[e].Xu!=-1)I++;
if(F.indexOf(I)!=-1)O.push(n[e])}return O};q.Y.a39=function(n){var F=0;for(var e=0;e<n.length;e++)if(n[e].type==0||n[e].type==3)F=e;
return n[F]};q.Y._v=function(n){var F=-1;for(var e=0;e<n.length;e++)if((n[e].type==0||n[e].type==3)&&n[e].Xu!=-1)F++;
return F+1};q.Y.fR=function(n,F,O){var I=-1;for(var e=0;e<n.length;e++)if((n[e].type==0||n[e].type==3)&&(O||n[e].Xu!=-1)){I++;
if(I==F)return e}return-1};q.Y.S8=function(n,F,O){var I=-1;for(var e=0;e<n.length;e++)if((n[e].type==0||n[e].type==3)&&(O||n[e].Xu!=-1)){if(e>=F)return I;
I++}return I};q.Y.wb=function(n,F){var O=-1,I=0;for(var e=0;e<n.length;e++){if((n[e].type==0||n[e].type==3)&&n[e].Xu!=-1)O++;
if(O==F)I++}return I};q.Y.aoE=function(n){var F=180;for(var e=0;e<n.length;e++){if(n[e].type!=0&&n[e].type!=3)continue;
var O=n[e].length;if(O<3)continue;for(var I=0;I<O;I++){var x=n[e+1+(I-1+O)%O],r=n[e+1+I],_=n[e+1+(I+1)%O],d=r.I,w=r.pt.Qq(d)?x.Cz:r.pt,Z=r.Cz.Qq(d)?_.pt:r.Cz;
if(d.Qq(w)||d.Qq(Z))continue;var P=w.x-d.x,C=w.y-d.y,W=Z.x-d.x,v=Z.y-d.y,w=Math.atan2(w.y-d.y,w.x-d.x)*180/Math.PI,Z=Math.atan2(Z.y-d.y,Z.x-d.x)*180/Math.PI,L=Math.abs(Z-w)%360,H=L>180?360-L:L;
if(H<F)F=H}}return F*Math.PI/180};q.Y.xs=function(n){var F=n.segments?[n]:n.children,O=[];for(var e=0;
e<F.length;e++){var I=F[e],x=I.segments,r=I.closed?0:3,_=O.length,d=null;if(x.length<=1)continue;O.push({type:r,length:x.length,Xu:0,sa:2});
for(var w=0;w<x.length;w++){var Z=x[w],P=new aE(Z.handleIn.x,Z.handleIn.y),C=new aE(Z.handleOut.x,Z.handleOut.y),W=new aE(Z.point.x,Z.point.y),v={type:r+1,pt:W.add(P),I:W,Cz:W.add(C)};
if(d==null)d=v;O.push(v);if(w+1==x.length&&aE.sl(d.I,v.I)<1e-5){O.pop();O[_].length--;d.pt=v.pt;if(r==3)for(var L=_;
L<O.length;L++)O[L].type-=3}}}return O};q.Y.lj=function(n){q.Y.VJ();var F=[],O,I=new paper.Color(1,0,0);
function x(v,d){v.remove();v.closed=!d;v.fillRule="evenodd"}for(var e=0;e<n.length;e++){if(n[e].type>5)continue;
var r=n[e].length,_;if(e==n.length-1)break;var d=n[e].type==3;if(e==2){if(!q.Y.zz(n))_="subtract";else _="unite"}else{if(n[e].Xu==0)_="exclude";
if(n[e].Xu==1)_="unite";if(n[e].Xu==2)_="subtract";if(n[e].Xu==3)_="intersect"}if(n[e].Xu!=-1){O=new paper.CompoundPath;
F.push([O,_]);O.fillRule="evenodd";O.fillColor=I}var w=[];for(var Z=0;Z<r;Z++){var P=n[e+1+Z],C=P.pt.ba(P.I),W=P.Cz.ba(P.I);
w.push([[P.I.x,P.I.y],[C.x,C.y],[W.x,W.y]])}var v=new paper.Path(w);x(v,d);O.addChild(v);e+=r}return F};
q.Y.NE=function(n){for(var e=0;e<n.length;e++){var F=n[e];if(F.I==null)continue;if(!F.I.Qq(F.pt)||!F.I.Qq(F.Cz))return!1}return!0};
q.Y.agl=function(n){if(n.length<=5)return 0;var F=0,O=n.length-3-1;for(var e=0;e<O;e++){var I=n[3+e],x=n[3+e+1];
if(I.type==0||x.type==0)return 0;F+=(x.I.x-I.I.x)*(I.I.y+x.I.y)}F+=(n[3].I.x-n[3+O].I.x)*(n[3+O].I.y+n[3+1].I.y);
return-F*.5};q.Y.$w=function(n){var F=n[2],O=!1;if(n.length==2)O=n[1].all==0;else if(n[1].all==1){if(F.Xu==1||F.Xu==3)O=!0;
else O=!1}else{if(F.Xu==1||F.Xu==3||F.Xu==0)O=!0;else O=!1}return O};q.Y.zz=function(n){var F=q.Y.$w(n);
for(var e=3;e<n.length;e++)if(n[e].Xu==3)F=!0;return F};q.Y.ag4=0;q.Y.w7=0;q.Y.alQ=0;q.Y.ah3=function(n,F,O,I){if(O.D2())return;
var x=O.X(),g=16384;q.Y.ag4+=x;if(x>q.Y.w7){q.Y.w7=x}var r=O.d,_=O.v;if(I==null&&q.Y.NE(n)){var d=!0;
for(var e=2;e<n.length;)if(n[e].length==2)e+=3;else{d=!1;break}if(d){return}if(q.Y.Zx(n)){F.fill(255);
var w=q.Y.if(n);if(w.X()!=x){var Z=1-(w.x-O.x),P=1-(w.y-O.y),C=1-(O.x+O.d-(w.x+w.d)),W=1-(O.x+O.v-(w.x+w.v)),v=~~(Z*255),L=~~(C*255),H=~~(P*255),y=~~(W*255);
F.fill(H,0,r);F[0]=~~(Z*P*255);F[r-1]=~~(C*P*255);for(var e=r;e<x;e+=r){F[e]=v;F[e+r-1]=L}F.fill(y,(_-1)*r,_*r);
F[x-r]=~~(Z*W*255);F[x-1]=~~(C*W*255)}return}}var Q=Math.ceil(r/g),J=Math.ceil(_/g),A=Math.ceil(r/Q),p=Math.ceil(_/J),U=Date.now();
for(var j=0;j<J;j++)for(var b=0;b<Q;b++){var s=b*A,G=j*p,T=A,z=p,m=q.A2(T,z);if(!q.Y.$w(n))m.fillRect(0,0,T,z);
q.Y.xM(n,m,-O.x-s,-O.y-G,I);var $=new Uint8Array(m.getImageData(0,0,T,z).data.buffer);if(T==r&&z==_)q.xg($,F,3);
else q.xv($,new gv(s,G,T,z),F,new gv(0,0,r,_))}};q.Y.xM=function(n,F,O,I,x){if(x!=null&&x.fillEnabled.v){var r=!1,_=!1,d=0;
for(var e=0;e<n.length;e++){var w=n[e].Xu;if(w!=null)d++;if(w==-1)r=!0;if(w>0)_=!0}if(!r&&d<20)n=q.Y.YH(n)}for(var e=0;
e<n.length;e++){if(n[e].type>5)continue;var Z=n[e].length;if(Z==0)continue;if(e==n.length-1)break;var P=n[e].type==3,w=n[e].Xu;
if(w!=-1&&x==null){var C=["xor","source-over","destination-out","source-in"][w];F.globalCompositeOperation=C}if(n[e].Xu!=-1){F.beginPath();
if(x){var W=x.strokeStyleLineWidth.v.val,v=x.strokeStyleLineAlignment.v.strokeStyleLineAlignment,L=x.strokeStyleLineCapType.v.strokeStyleLineCapType,H=x.strokeStyleLineJoinType.v.strokeStyleLineJoinType,y=x.strokeStyleMiterLimit.v,g=[],Q=x.strokeStyleLineDashSet.v;
for(var J=0;J<Q.length;J++)g.push(Q[J].v.val*W);F.setLineDash(g);F.lineCap=["butt","round","square"][bW.uS.wq.indexOf(L)];
F.lineJoin=["miter","round","bevel"][bW.uS.join.indexOf(H)];F.lineWidth=bW.uS.RD.indexOf(v)==1?W:W*=2;
F.miterLimit=y}}q.Y.alY(F,n,e+1,Z,O,I,P);if(P){}else F.closePath();if(n[e+1+Z]==null||n[e+1+Z].Xu!=-1){if(x)F.stroke();
else F.fill("evenodd")}e+=Z}F.globalCompositeOperation="source-over"};q.Y.alY=function(n,F,e,O,I,x,r){var _=F[e],d=null;
n.moveTo(_.I.x+I,_.I.y+x);for(var w=e;w<e+O-1;w++){_=F[w];d=F[w+1];n.bezierCurveTo(_.Cz.x+I,_.Cz.y+x,d.pt.x+I,d.pt.y+x,d.I.x+I,d.I.y+x)}if(!r){_=F[w];
d=F[e];n.bezierCurveTo(_.Cz.x+I,_.Cz.y+x,d.pt.x+I,d.pt.y+x,d.I.x+I,d.I.y+x)}};q.Y.Ca=function(n,F,O){var I=[],x=O?4:1,r=!1;
if(F!=null)for(var e=0;e<F.length;e++)if(F[e]!=0){r=!0;break}if(F!=null&&r){var _=q.z.an$(n,F),d=_.length/6;
for(var e=0;e<d;e++){var w=e*6,Z=(e-1+d)%d*6,P=_[w],C=_[w+1],W=_[w+2],v=_[w+3],L=_[Z+4],H=_[Z+5];I.push({type:x,pt:new aE(L,H),I:new aE(P,C),Cz:new aE(W,v)})}}else{for(var e=0;
e<n.length;e+=2){var y=new aE(n[e],n[e+1]);I.push({type:x,pt:y.clone(),I:y.clone(),Cz:y.clone()})}}return I};
q.Y.JL=function(n,F){q.Y.VJ();var O=new paper.Path;O.remove();var I=n.length-1,x=Math.sqrt((n[I-1]-n[0])*(n[I-1]-n[0])+(n[I]-n[1])*(n[I]-n[1]))<3;
O.closed=x;for(var e=0;e<n.length;e+=2)O.add(new paper.Point(n[e],n[e+1]));O.simplify(F);var r=[{type:6},{type:8,all:0}];
r=r.concat(q.Y.xs(O));return r};q.Y.OR=function(n,F,O){var I=n[F].length,x=n[F].type,r=0,_=n.slice(F+1,F+1+I);
for(var e=0;e<I;e++){var d=O[(e-1+I)%I],w=O[(e+1+I)%I],Z=O[e];if(Z!=0){var P=_[(e-1+I)%I].I,C=_[(e+0+I)%I].I,W=_[(e+1+I)%I].I,v=aE.sl(C,P),L=aE.sl(C,W),H=q.z.au(P.x,P.y,C.x,C.y,W.x,W.y,Z)[0],y=Math.min(H,d==0?v:v/2,w==0?L:L/2);
Z*=y/H;var g=q.z.mm(P.x,P.y,C.x,C.y,W.x,W.y,Z),Q={type:x+1,pt:new aE(g[2],g[3]),I:new aE(g[2],g[3]),Cz:new aE(g[4],g[5])},J={type:x+1,pt:new aE(g[6],g[7]),I:new aE(g[8],g[9]),Cz:new aE(g[8],g[9])};
n.splice(F+r+1,1,Q,J);r++;n[F].length++}r++}};q.Y.NE=function(n){for(var e=0;e<n.length;e++){var F=n[e],O=F.type;
if(O==1||O==2||O==4||O==5)if(!F.I.Qq(F.pt)||!F.I.Qq(F.Cz))return!1}return!0};q.Y.Zx=function(n){if(n.length!=7||!q.Y.NE(n))return!1;
for(var e=0;e<4;e++){var F=!0;for(var O=0;O<4;O++){var I=n[3+(e+O&3)],x=n[3+(e+O+1&3)];if(I.I.x!=x.I.x&&I.I.y!=x.I.y)F=!1}if(F)return!0}return!1};
q.Y.jP={};q.Y.jP.nQ=function(n,F,O){var I=[{type:6},{type:8,all:0}],x=null;I.push({type:O?3:0,Xu:1,length:0,g9:0,Qy:0,sa:1});
if(F==0)x==null;else if(F instanceof Array)x=F;else{x=[];for(var e=0;e<n.length;e+=2)x.push(F)}I=I.concat(q.Y.Ca(n,x,O));
I[2].length=I.length-3;return I};q.Y.jP.a1m=function(n,F,O,I,x){var r=[],_=[],d=.553,w=1,Z=-1;r.push({type:1,pt:new aE(0,d),I:new aE(0,0),Cz:new aE(0,-d)});
x+=2;for(var e=0;e<x;e++){var P={type:1};if(e==0){P.I=new aE(1,-1);P.pt=new aE(1-d,-1);P.Cz=new aE(1+d,-1)}else{var C=-(e+2)*Math.PI/2,W=1+((e&1)==1?e-1:e),v=Math.sin(C),L=Math.cos(C);
w+=W*(v-L);Z+=W*(L+v);P.I=new aE(w,Z);P.pt=new aE(w+W*L*d,Z-W*v*d);if((e&1)==1)W+=2;P.Cz=new aE(w-W*L*d,Z+W*v*d)}var H={type:1,pt:new aE(-P.Cz.x,-P.Cz.y),I:new aE(-P.I.x,-P.I.y),Cz:new aE(-P.pt.x,-P.pt.y)};
r.push(P);if(e<x-2)_.push(H)}_.reverse();r=r.concat(_);var y=[{type:6},{type:8,all:0}];y.push({type:0,Xu:1,length:r.length,g9:0,Qy:0,sa:1});
y=y.concat(r);var g=new cD(O/x,0,0,O/x,0,0);g.rotate(I);g.translate(n,F);q.Y.gS(y,g);return y};q.Y.jP.Rect=function(n,F,O,I,x){var r=[n,F,n+O,F,n+O,F+I,n,F+I];
return q.Y.jP.nQ(r,x)};q.Y.jP.bC=function(n,F,O,I,x,r){var _=[],d=2*Math.PI/x;for(var e=0;e<x;e++)_.push(Math.cos(e*d),Math.sin(e*d));
var w=new cD(O,0,0,O,0,0);w.rotate(I);w.translate(n,F);q.z.m(_,w,_);return q.Y.jP.nQ(_,r)};q.Y.jP.acT=function(n,F,O,I,x,r,_){var d=[],w=Math.PI/x;
for(var e=0;e<x*2;e++){var Z=(e&1)==0?1:_;d.push(Z*Math.cos(e*w),Z*Math.sin(e*w))}var P=new cD(O,0,0,O,0,0);
P.rotate(I);P.translate(n,F);q.z.m(d,P,d);return q.Y.jP.nQ(d,r)};q.Y.jP.XX=function(n,F,O,I,x){return q.Y.jP.wY(0,n,F,O,I,x)};
q.Y.jP.afi=function(n,F,O,I,x,r){return q.Y.jP.wY(1,n,F,O,I,x,r)};q.Y.jP.wY=function(n,F,O,I,x,r,_){var d=Math.sqrt((I-F)*(I-F)+(x-O)*(x-O)),w;
r/=2;if(n==0)w=[-r,0,r,0,r,d,-r,d];else{var Z=r*2*_*1.3/1.5,P=r*_;w=[-r,0,r,0,r,d-Z,P,d-Z,0,d,-P,d-Z,-r,d-Z]}var C=new cD(1,0,0,1,0,0);
C.rotate(Math.atan2(-x+O,I-F)+Math.PI/2);C.translate(F,O);q.z.m(w,C,w);return q.Y.jP.nQ(w,0)};q.Y.jP.BT=function(n,F,O,I){var x=[{type:6},{type:8,all:0}],C=.553;
x.push({type:0,Xu:1,length:4,g9:0,Qy:0,sa:1});var r=n,_=F,d=n+O,w=F+I,n=(r+d)/2,F=(_+w)/2,Z=(r-d)/2,P=(_-w)/2;
x.push({type:1,pt:new aE(n-C*Z,F-P),I:new aE(n,F-P),Cz:new aE(n+C*Z,F-P)});x.push({type:1,pt:new aE(n+Z,F-C*P),I:new aE(n+Z,F),Cz:new aE(n+Z,F+C*P)});
x.push({type:1,pt:new aE(n+C*Z,F+P),I:new aE(n,F+P),Cz:new aE(n-C*Z,F+P)});x.push({type:1,pt:new aE(n-Z,F+C*P),I:new aE(n-Z,F),Cz:new aE(n-Z,F-C*P)});
return x};q.Y.jP.aaT=function(n,F,O,I,x){var r=[{type:6},{type:8,all:0}];r.push({type:3,Xu:1,length:5,g9:0,Qy:0,sa:1});
var _=(x-I)/4;for(var e=0;e<5;e++){var d=e*_,w=Math.cos(d),Z=Math.sin(d),P=.553*(_/(Math.PI/2)),C=Z*P,W=-w*P,v=new aE(w,Z);
r.push({type:4,pt:e==0?v.clone():new aE(w+C,Z+W),I:v,Cz:e==4?v.clone():new aE(w-C,Z-W)})}var L=new cD;
L.rotate(-I);L.scale(O,O);L.translate(n,F);q.Y.gS(r,L);return r};q.qF={};q.qF.type={warpNone:[22,5,0],warpCustom:[22,5,16],warpArc:[22,5,1],warpArcLower:[22,5,2],warpArcUpper:[22,5,3],warpArch:[22,5,4],warpBulge:[22,5,5],warpShellLower:[22,5,6],warpShellUpper:[22,5,7],warpFlag:[22,5,8],warpWave:[22,5,9],warpFish:[22,5,10],warpRise:[22,5,11],warpFisheye:[22,5,12],warpInflate:[22,5,13],warpSqueeze:[22,5,14],warpTwist:[22,5,15]};
q.qF.x9=function(n){var F=n.warpStyle.v.warpStyle;if(F=="warpNone")return!0;else if(F=="warpCustom"){var O=!1,I=n.customEnvelopeWarp.v.meshPoints.v.arr,x=I[0].arr,r=I[1].arr;
for(var e=0;e<4;e++)for(var _=0;_<4;_++){if(Math.abs(x[e]-x[_*4+e])>1||Math.abs(r[e*4]-r[e*4+_])>1)O=!0}return!O}else return n.warpValue.v==0&&n.warpPerspective.v==0&&n.warpPerspectiveOther.v==0};
q.qF.f=function(n){var F={classID:"warp",warpStyle:{t:"enum",v:{warpStyle:"warpNone"}},warpValue:{t:"doub",v:0},warpPerspective:{t:"doub",v:0},warpPerspectiveOther:{t:"doub",v:0},warpRotate:{t:"enum",v:{Ornt:"Hrzn"}}};
if(n){F.bounds={t:"Objc",v:{classID:"Rctn",Top:{t:"UntF",v:{type:"#Pxl",val:n.y}},Left:{t:"UntF",v:{type:"#Pxl",val:n.x}},Btom:{t:"UntF",v:{type:"#Pxl",val:n.y+n.v}},Rght:{t:"UntF",v:{type:"#Pxl",val:n.x+n.d}}}};
F.uOrder={t:"long",v:4};F.vOrder={t:"long",v:4}}return F};q.qF.aas=function(n,F,O,I){for(var e=0;e<n.length;
e+=2){var x=n[e],r=n[e+1],_=(x-F.x)/F.d,d=(r-F.y)/F.v,w=(1-O)/2,Z=1-w,P=w+_*(Z-w);d=.5+(d-.5)*P*2;var C=(1-I)/2,W=1-C,v=C+d*(W-C);
_=.5+(_-.5)*v*2;x=F.x+_*F.d;r=F.y+d*F.v;n[e]=x;n[e+1]=r}};q.qF.rG=function(n,F){var O=[],I=[];for(var e=0;
e<n.length;e+=2){O.push(n[e]);I.push(n[e+1])}var x=[];x.push({id:"Hrzn",type:"UnFl",uID:"#Pxl",arr:O});
x.push({id:"Vrtc",type:"UnFl",uID:"#Pxl",arr:I});F.warpStyle.v.warpStyle="warpCustom";F.customEnvelopeWarp={t:"Objc",v:{classID:"customEnvelopeWarp",meshPoints:{t:"ObAr",v:{classID:"rationalPoint",arr:x}}}}};
q.qF.Bo=function(n,F){if(F==null){var O=n.bounds.v,I=O.Left.v.val,x=O.Rght.v.val,r=O.Top.v.val,_=O.Btom.v.val;
F=new gv(I,r,x-I,_-r)}if(F.D2())F.d=F.v=1;var d=[],w=n.warpStyle.v.warpStyle;if(w=="warpCustom"){var Z=n.customEnvelopeWarp.v.meshPoints.v.arr,P=Z[0].arr,C=Z[1].arr;
for(var e=0;e<16;e++)d.push(P[e],C[e])}else d=q.qF.qF(F,w,n.warpRotate.v.Ornt=="Hrzn",n.warpValue.v/100,n.warpPerspective.v/100,n.warpPerspectiveOther.v/100);
return d};q.qF.qF=function(n,F,O,I,x,r){var _=q.uY.f(n.x,n.y,n.d,n.v);if(F=="warpNone")return _;var d=JSON.parse(JSON.stringify(n)),w=new cD;
if(!O){w.translate(-n.x,-n.y);w.rotate(-Math.PI/2);w.translate(n.v,0);q.z.m(_,w,_);n=new gv(0,0,n.v,n.d);
_=q.uY.Ab(_,!1)}q.qF.ado(_,n,F,I,x,r);if(!O){_=q.uY.Ab(_,!0);n=d;w.uZ();q.z.m(_,w,_)}if(I==0)q.qF.aas(_,n,x,r);
else{var w=new cD(1/n.d,0,0,1/n.v,-n.x,-n.y);w.translate(-.5,-.5);q.z.m(_,w,_);q.qF.adE(_,r,x);w.uZ();
q.z.m(_,w,_)}return _};q.qF.ado=function(n,F,O,I,x,r){for(var e=0;e<4;e++){for(var _=0;_<4;_++){var d=2*(4*e+_),w=n[d]-F.x,Z=n[d+1]-F.y,P=w,C=Z;
if(I!=0){var W=F.d/2,v=F.v/2;P-=W;C-=v;var L=P,H=P,y=-v,g=v,Q=Math.abs(I),J=Math.tan((1-Q)*Math.PI/2),A=Math.sqrt(J*J+1),p=Math.atan2(1,J),U=P/W*p,j=W*A,b=W*A+F.v,s=Math.cos(p),G=Math.sin(p),T=q.qF.aek(s,G),z=q.qF.a1F(s,G),m=-J*W+T*j;
if(O=="warpArc"){L=Math.sin(U)*b;y=J*W-Math.cos(p)*b+v;H=Math.sin(U)*j;g=J*W-Math.cos(p)*j+v;if(_==1||_==2){L=_==1?-z*b:z*b;
H=_==1?-z*j:z*j;y=J*W+v-T*b;g=J*W+v-T*j}if(I<0){var $=L;L=H;H=$;$=y;y=-g;g=-$}}if(O=="warpArcLower"){if(_==1||_==2){H=_==1?-z*j:z*j;
g=I<0?v-m:v+m}}if(O=="warpArcUpper"||O=="warpArch"||O=="warpBulge"){if(_==1||_==2){L=_==1?-z*j:z*j;y=I<0?-v+m:-v-m}if(O=="warpArch"){H=L;
g=y+2*v}if(O=="warpBulge"){H=L;g=-y}}if(O=="warpFish"||O=="warpFlag"||O=="warpWave"){if(_==1){y-=I*4*v;
g+=I*4*v}if(_==2){y+=I*4*v;g-=I*4*v}if(O=="warpFlag"||O=="warpWave")y=g-2*v}if(O=="warpRise"){if(_<2)y=-v+I*v*4;
g=y+2*v}var o=(C+v)/F.v;P=L+o*(H-L);C=y+o*(g-y);if(O=="warpWave"){if(e==0)C=-v;if(e==3)C=v;if(e==1||e==2)C=2*v*(e/3-.5)*(1/3)+C*(2/3)}if(O=="warpFisheye"){if((e==1||e==2)&&(_==1||_==2)){P=P+4*P*I;
C=C+4*C*I}}if(O=="warpInflate"){var h=2/3;if((e==1||e==2)&&(_==1||_==2)){P=P+.5*P*I;C=C+.5*C*I}else if(e==1||e==2)P=P+h*P*I;
else if(_==1||_==2)C=C+h*C*I}if(O=="warpSqueeze"){var h=2/3;if((e==1||e==2)&&(_==1||_==2)){if(I>0)P=P-h*P*I;
else C=C+h*C*I}else if(e==1||e==2)P=P-h*P*I;else if(_==1||_==2)C=C+h*C*I}if(O=="warpTwist"){if((e==1||e==2)&&(_==1||_==2)){var X=I*Math.PI/2,A=1+Math.abs(I)*2,D=P*Math.cos(X)-C*Math.sin(X),f=P*Math.sin(X)+C*Math.cos(X);
P=D*A;C=f*A}}if(O=="warpShellLower"||O=="warpShellUpper"){if(O=="warpShellUpper"){e=3-e;C=-C}if(e>2||e==2&&(_==0||_==3)){if(I>0){var R=j+e/3*2*v;
P=Math.sin(U)*R;C=-J*W-v+Math.cos(U)*R;if(_==1||_==2){P=_==1?-z*R:z*R;C=-J*W-v+T*R}}else{if((_==1||_==2)&&e==3){P=_==1?-z*j:z*j;
C=J*W-T*j+v}else if(e==2){C=v-v*(2/3)*Math.cos(U);P=P+v*(2/3)*Math.sin(U)}}}if(O=="warpShellUpper"){e=3-e;
C=-C}}P+=W;C+=v}w=P,Z=C;n[d]=w+F.x;n[d+1]=Z+F.y}}};q.qF.adE=function(n,F,O){var I=[];for(var x=0;x<4;
x++)I.push(1-O+x/3*2*O);var r=[];for(var x=0;x<4;x++)r.push(1-F+x/3*2*F);var _=[0,0,0,0],d=[0,0,0,0];
for(var e=0;e<4;e++)for(var x=0;x<4;x++){var w=2*(4*e+x),Z=n[w],P=n[w+1];_[x]+=Z/4;d[x]+=P/4}for(var e=0;
e<4;e++)for(var x=0;x<4;x++){var C=I[x],w=2*(4*e+x),Z=n[w],P=n[w+1],W=_[x],v=d[x];n[w]=W+C*(Z-W);n[w+1]=v+C*(P-v)}var L=n.slice(0);
for(var e=0;e<4;e++)for(var x=1;x<3;x++){var w=2*(4*e+x),Z=n[w],P=n[w+1],H=w+(x==1?-2:2),y=n[H],g=n[H+1];
n[w]=Z-y;n[w+1]=P-g}var Q=n[0],J=n[1],A=n[8],p=n[9],U=n[16],j=n[17],b=n[24],s=n[25],G=n[6],T=n[7],z=n[14],m=n[15],$=n[22],o=n[23],h=n[30],X=n[31],D=G-Q,f=T-J,R=z-A,i=m-p,t=$-U,N=o-j,M=h-b,hK=X-s;
for(var e=0;e<4;e++){var bD=2*e*4,co=0,iM=0,hs=e==1?.33:.66,S=1-hs;if(e==0){co=D;iM=f}if(e==1){co=S*D+hs*-M;
iM=S*f+hs*-hK}if(e==2){co=S*D+hs*-M;iM=S*f+hs*-hK}if(e==3){co=-M;iM=-hK}n[bD]=n[bD]+co/2;n[bD+1]=n[bD+1]+iM/2;
n[bD+6]=n[bD+6]-co/2;n[bD+7]=n[bD+7]-iM/2}for(var e=0;e<4;e++)for(var x=1;x<3;x++){var w=2*(4*e+x),Z=n[w],P=n[w+1],H=w+(x==1?-2:2),y=n[H],g=n[H+1],C=2*e/3;
n[w]=y+C*Z;n[w+1]=g+C*P}for(var e=1;e<3;e++)for(var x=1;x<3;x++){var w=2*(4*e+x),Z=n[w],P=n[w+1],a=e==1?-8:-16,bV=e==1?16:8,a5=n[w+a],i9=n[w+a+1],dG=n[w+bV],ap=n[w+bV+1],C=e/3;
Z=(1-C)*a5+C*dG;P=(1-C)*i9+C*ap;n[w]=Z;n[w+1]=P}q.z.v8(L,n,n,F)};q.qF.aek=function(n,F){return(4-n)*(1/3)};
q.qF.a1F=function(n,F){return(1-n)*(3-n)/(3*F)};q.Zm={};q.Zm.a4C=function(n,F,O,I,x,r,_,d,w,Z){for(var P=0;
P<d;P++)for(var C=0;C<_;C++){var W=3*(P*_+C),v=P+r,L=C+x,H=n[v*F+L];I[W]=H;I[W+1]=H;I[W+2]=H}};q.Zm.dF=function(n,F,O,I,x,r,_,d,w,Z){var P=[0,1,1/2,1/3,1/4,1/5,1/6,1/7,1/8,1/9],C=1/w,W=[-1,-1,0,-1,1,-1,-1,0,1,0,-1,1,0,1,1,1],v=new Uint32Array(6);
for(var L=0;L<d;L++){for(var H=0;H<_;H++){var y=3*(L*_+H),g=L+r,Q=H+x;v[0]=0;v[1]=0;v[2]=0;v[3]=0;v[4]=0;
v[5]=0;for(var e=0;e<16;e+=2){var J=Q+W[e],A=g+W[e+1],p=J-w*~~(J*C),U=A-w*~~(A*C),j=Z[U*w+p];v[j]+=n[A*F+J];
v[j+3]++}var J=Q,A=g,p=J-w*~~(J*C),U=A-w*~~(A*C),j=Z[U*w+p];v[j]=n[g*F+Q];v[j+3]=1;I[y]=v[0]*P[v[3]];
I[y+1]=v[1]*P[v[4]];I[y+2]=v[2]*P[v[5]]}}};q.Zm.bg=function(n,F,O){for(var e=0;e<O;e+=2)n[F+e]=n[F+e+1];
F=F+O;for(var e=0;e<O;e+=2)n[F+e+1]=n[F+e]};q.Zm.Ei=function(n,F,O,I){for(var e=0;e<I;e+=2){var x=F+e*O;
n[x]=n[x+O];n[x+O+1]=n[x+1]}};q.Zm.aA=function(n,F,O,I,x,r){var _=I[x],d=I[x+1],w=I[r],Z=I[r+1],P=d+w>>>1;
n[F]=n[F+3]=n[O]=n[O+3]=_;n[F+1]=P;n[F+4]=d;n[O+1]=w;n[O+4]=P;n[F+2]=n[F+5]=n[O+2]=n[O+5]=Z};q.Zm.afj=function(n,F,O,I,x,r){var _=r*3;
for(var e=0;e<r;e+=2){var d=F+e,w=x+e*3;q.Zm.aA(I,w,w+_,n,d,d+O)}};q.Zm.akc=function(n,F,O,I,x,r,_){var d=r*3;
for(var e=0;e<_;e+=2){var w=F+e*O,Z=x+e*r*3;q.Zm.aA(I,Z,Z+d,n,w,w+O)}};q.Zm.vx=function(n,e,F){var O=n[e-F-F],I=n[e-F],x=n[e-2],r=n[e-1],_=n[e],d=n[e+1],w=n[e+2],Z=n[e+F],P=n[e+F+F],C=Math.abs(I-Z),W=Math.abs(r-d),v=Math.abs(_-O)*2+C,L=Math.abs(_-w)*2+W,H=Math.abs(_-x)*2+W,y=Math.abs(_-P)*2+C,g=Math.min(v,Math.min(L,Math.min(H,y)));
if(g==v)return I*3+Z+_-O>>2;if(g==L)return d*3+r+_-w>>2;if(g==H)return r*3+d+_-x>>2;return Z*3+I+_-P>>2};
q.Zm.aP=function(n,F,O,I,x){if(n<F&&F<O||n>F&&F>O)return~~(.5+I+(x-I)*(F-n)/(O-n));else return(I+x>>1)+(F+F-n-O>>2)};
q.Zm.yl=function(n,F,e,O){var I=F[e-O-1],x=F[e-O+1],r=F[e],_=F[e+O-1],d=F[e+O+1],w=n[e-O-1],Z=n[e-O+1],P=n[e],C=n[e+O-1],W=n[e+O+1],v=Math.abs(Z-C)+Math.abs(n[e-O-O+2]-P)+Math.abs(P-n[e+O+O-2])+Math.abs(x-r)+Math.abs(r-_),L=Math.abs(w-W)+Math.abs(n[e-O-O-2]-P)+Math.abs(P-n[e+O+O+2])+Math.abs(I-r)+Math.abs(r-d);
if(v<L)return q.Zm.aP(x,r,_,Z,C);else return q.Zm.aP(I,r,d,w,W)};q.Zm.X2=function(n,F,O,I,x,r){n[F+0]=O[x];
n[F+1]=I[x];n[F+2]=q.Zm.yl(O,I,x,r)};q.Zm.mz=function(n,F,O,I,x,r){var _=I[x];n[F+0]=q.Zm.aP(I[x-1],_,I[x+1],O[x-1],O[x+1]);
n[F+1]=_;n[F+2]=q.Zm.aP(I[x-r],_,I[x+r],O[x-r],O[x+r])};q.Zm.C3=function(n,F,O,I,x,r){var _=I[x];n[F+0]=q.Zm.aP(I[x-r],_,I[x+r],O[x-r],O[x+r]);
n[F+1]=_;n[F+2]=q.Zm.aP(I[x-1],_,I[x+1],O[x-1],O[x+1])};q.Zm.NO=function(n,F,O,I,x,r){n[F+0]=q.Zm.yl(O,I,x,r);
n[F+1]=I[x];n[F+2]=O[x]};q.Zm.a4S=function(n,F,O,I,x,r,_,d,w){var Z=Date.now(),P=2,C=F-2,W=2;if((x&1)==1){P++;
C--}var v=O-2;if((r&1)==1){W++;v--}if(w==1||w==3){P++;C--}var L=n.slice(0);q.Zm.bg(L,0,F);q.Zm.Ei(L,0,F,O);
q.Zm.Ei(L,F-2,F,O);q.Zm.bg(L,(O-2)*F,F);for(var H=W;H<v;H+=2)for(var y=P;y<C;y+=2){var e=H*F+y,g=q.Zm.vx(L,e,F),Q=q.Zm.vx(L,e+F+1,F);
L[e]=Math.max(0,g);L[e+F+1]=Math.max(0,Q)}var J=_,A=d;if(r+d==O){A-=2;q.Zm.afj(n,(O-2)*F+x,F,I,(d-2)*_*3,_)}if(x+_==F){J-=2;
q.Zm.akc(n,r*F+x+_-2,F,I,(_-2)*3,_,d)}if(w==0)for(var H=0;H<A;H+=2)for(var y=0;y<J;y+=2){var p=(H+r)*F+y+x,U=(H*_+y)*3;
q.Zm.X2(I,U,n,L,p,F);q.Zm.mz(I,U+3,n,L,p+1,F);p+=F;U+=3*_;q.Zm.C3(I,U,n,L,p,F);q.Zm.NO(I,U+3,n,L,p+1,F)}else if(w==1)for(var H=0;
H<A;H+=2)for(var y=0;y<J;y+=2){var p=(H+r)*F+y+x,U=(H*_+y)*3;q.Zm.mz(I,U,n,L,p,F);q.Zm.X2(I,U+3,n,L,p+1,F);
p+=F;U+=3*_;q.Zm.NO(I,U,n,L,p,F);q.Zm.C3(I,U+3,n,L,p+1,F)}else if(w==2)for(var H=0;H<A;H+=2)for(var y=0;
y<J;y+=2){var p=(H+r)*F+y+x,U=(H*_+y)*3;q.Zm.NO(I,U,n,L,p,F);q.Zm.C3(I,U+3,n,L,p+1,F);p+=F;U+=3*_;q.Zm.mz(I,U,n,L,p,F);
q.Zm.X2(I,U+3,n,L,p+1,F)}else if(w==3)for(var H=0;H<A;H+=2)for(var y=0;y<J;y+=2){var p=(H+r)*F+y+x,U=(H*_+y)*3;
q.Zm.C3(I,U,n,L,p,F);q.Zm.NO(I,U+3,n,L,p+1,F);p+=F;U+=3*_;q.Zm.X2(I,U,n,L,p,F);q.Zm.mz(I,U+3,n,L,p+1,F)}};
q.raw={};q.raw.a7s=function(n){var F=n.width,O=n.height,I=Date.now(),x=q.raw.aaX(n),r=0,_=0;q.raw.J0(2,n,x,F,O);
var d=F,w=O;if(n.t50829){var Z=n.t50829;r=Z[1];_=Z[0];d=Z[3];w=Z[2]}if(n.t50719){var P=n.t50719;r+=P[0]>>1<<1;
_+=P[1]>>1<<1}if(n.t50720){var C=n.t50720;d=r+C[0];w=_+C[1]}var W=d-r,v=w-_,L=new Float32Array(W*v*3);
if(n.t277[0]==1){var H=n.t33421;if(H==null){q.Zm.a4C(x,F,O,L,r,_,W,v)}else if(H.length!=2||H[0]!=2||H[1]!=2){console.log("Unknown CFA pattern size",H);
q.Zm.dF(x,F,O,L,r,_,W,v,H[0],n.t33422)}else{var y=n.t33422.join(","),g=0;if(y=="0,1,1,2")g=0;else if(y=="1,0,2,1")g=1;
else if(y=="2,1,1,0")g=2;else if(y=="1,2,0,1")g=3;else throw"Unknown CFA pattern "+y;if((W&1)!=0||(v&1)!=0)throw"e";
q.Zm.a4S(x,F,O,L,r,_,W,v,g)}}else{for(var Q=0;Q<v;Q++)for(var J=0;J<W;J++){var A=((Q+_)*F+J+r)*3,p=(Q*W+J)*3;
L[p+0]=x[A+0];L[p+1]=x[A+1];L[p+2]=x[A+2]}}var U=L,j=L.length,b=q.raw.acL(n),s=1/b;for(var e=0;e<j;e+=3){L[e]=Math.min(1,U[e]*s);
L[e+1]=Math.min(1,U[e+1]*s);L[e+2]=Math.min(1,U[e+2]*s)}q.raw.J0(3,n,L,W,v);var G=n.S2,T=W,z=v;if(G==1||G==9){}else{var m=q.raw.uG(G,W,v),p=0;
T=m[0];z=m[1];var $=L.slice(0);for(var Q=0;Q<z;Q++)for(var J=0;J<T;J++){var o=m[2]*J+m[3]*Q+m[4],h=m[5]*J+m[6]*Q+m[7],A=(h*W+o)*3;
L[p]=$[A];L[p+1]=$[A+1];L[p+2]=$[A+2];p+=3}}return{zc:L,aZ:T,k$:z}};q.raw.uG=function(n,F,O){var I=F,x=O;
if(!1){}else if(n==2)return[F,O,-1,0,F-1,0,1,0];else if(n==3)return[F,O,-1,0,F-1,0,-1,O-1];else if(n==4)return[F,O,1,0,0,0,-1,O-1];
else if(n==5)return[O,F,0,1,0,1,0,0];else if(n==6)return[O,F,0,1,0,-1,0,O-1];else if(n==8)return[O,F,0,-1,F-1,1,0,0];
else throw"unknown orientation "+n};q.raw.QN=function(n,F,O,I){var x=n.zc,r=Math.round(x.length/3),_=il.abD(I[0],I[1]),d=q.raw.aon(O,_),w=q.e$.multiply(q.e$.hI,d),Z=Math.pow(2,I[2]+(O.t50730?O.t50730[0]:0));
w=q.e$.multiply(w,q.e$.en(Z,Z,Z));var P=O.t50728?O.t50728:[1,1,1],C=[P[1]/P[0],P[2]/P[0],P[0]/P[1],P[2]/P[1],P[0]/P[2],P[1]/P[2]],W=new Float64Array(1e3);
for(var e=0;e<1e3;e++){var v=e*(1/999);v=e==999?1:q.sK(e*(1/999));v=q.raw.wZ.aal(v,I[3]/100);W[e]=v}var L=Date.now();
for(var e=0;e<r;e++){var H=e<<2,y=H-e,g=x[y],Q=x[y+1],J=x[y+2];if(Q>=.92){var A=Math.min(g,J);if(A==g){Q=Math.max(Q,C[0]*g);
J=Math.max(J,C[1]*g)}else{g=Math.max(g,C[4]*J);Q=Math.max(Q,C[5]*J)}}var p=w[0]*g+w[1]*Q+w[2]*J,U=w[4]*g+w[5]*Q+w[6]*J,j=w[8]*g+w[9]*Q+w[10]*J;
if(p<0)p=0;else if(p>1)p=1;if(U<0)U=0;else if(U>1)U=1;if(j<0)j=0;else if(j>1)j=1;p=W[~~(p*999)];U=W[~~(U*999)];
j=W[~~(j*999)];F[H]=~~(.5+p*255);F[H+1]=~~(.5+U*255);F[H+2]=~~(.5+j*255)}};q.raw.wZ={aal:function(n,F){var O=.5-.5*Math.cos(n*3.2),I=0;
if(F>0){var x=n*.2;I=x*n+(1-x)*O}else{var r=Math.pow(n,.33);I=(1-r)*r+r*(n+(n-O)*.63)}var _=Math.abs(F);
return _*I+(1-_)*n},a64:function(n,F){var O=0;if(F>0){var I=n*1.47,x=Math.pow(n,2.4);O=Math.min(1,x*n+(1-x)*I)}else{var I=n*.68,x=Math.pow(n,3);
O=x*n*.5+(1-x)*I}var r=Math.abs(F);return r*O+(1-r)*n},a5l:function(n,F){var O=0;if(F>0){var I=Math.pow(n,.3),x=n;
O=(1-n)*I+n*x}else{var I=Math.pow(n,2.5),r=n,x=n;O=Math.min(1,(1-r)*I+r*x)}var _=Math.abs(F);return _*O+(1-_)*n}};
q.raw.aaX=function(n){var F=n.width,O=n.height,I=F*O*n.t277,x=new Uint16Array(I),r=null,_=0;q.raw.adR(n,x);
q.raw.J0(1,n,x,F,O);if(n.t50712){r=n.t50712;_=r.length-1;if(r[_]>65535)throw"too big values"}var d=q.raw.Zv(n),w=q.raw.qP(n);
if(r==null)for(var e=0;e<I;e++)x[e]=Math.max(0,x[e]-d);else for(var e=0;e<I;e++){var Z=x[e];if(Z>_)Z=_;
Z=r[Z];x[e]=Math.max(0,Z-d)}return x};q.raw.Zv=function(n){var F=n.t50714,O=F?F[0]:0,I=n.t50715,x=n.t50716;
if(I)O+=I[0][0]/I[0][1];if(x)O+=x[0][0]/x[0][1];return Math.round(O)};q.raw.qP=function(n){var F=null,O=0;
if(n.t50712){F=n.t50712;O=F.length-1}var I=n.t50717?n.t50717[0]:(1<<n.t258[0])-1;if(F)I=Math.min(I,F[O]);
return I};q.raw.acL=function(n){var F=q.raw.Zv(n),O=q.raw.qP(n);return O-F};q.raw.adR=function(n,F){var O=F.length,I=n.data,x=n.t258[0];
if(x!=16&&x!=14&&x!=12&&x!=10&&x!=8)throw"Unsupported Bits Per Sample:"+x;x=Math.round(I.length*8/O);
if(x==16&&n.isLE){q.Ct(I,F);return}for(var e=0;e<O;e+=2){var r=0,_=0,d=0;if(x==16){r=e<<1;_=I[r]<<8|I[r+1];
d=I[r+2]<<8|I[r+3]}else if(x==14){var w=e*14,Z=w>>>3,P=I[Z]<<24|I[Z+1]<<16|I[Z+2]<<8|I[Z+3];if((w&7)==0){_=P>>>18;
d=P>>>4&16383}else{_=P>>>14&16383;d=P&16383}}else if(x==12){r=e+(e>>>1);_=I[r]<<4|I[r+1]>>4;d=(I[r+1]&15)<<8|I[r+2]}else if(x==10){var w=e*10,Z=w>>>3;
if((w&7)==0){_=(I[Z]<<2|I[Z+1]>>6)&1023;d=(I[Z+1]<<4|I[Z+2]>>4)&1023}else{_=(I[Z]<<6|I[Z+1]>>2)&1023;
d=(I[Z+1]<<8|I[Z+2]>>0)&1023}}else if(x==8){r=e;_=I[r];d=I[r+1]}F[e]=_;F[e+1]=d}};q.raw.J0=function(n,F,O,I,x){var r=F["t"+[51008,51009,51022][n-1]],P=0;
if(r==null)return;var _=I*x,d=Y.c,w=Y.z6,Z=new Uint8Array(r),cP=Y.c(Z,P);P+=4;for(var C=0;C<cP;C++){var W=d(Z,P);
P+=4;var v=d(Z,P);P+=4;var L=d(Z,P);P+=4;var H=d(Z,P);P+=4;if(!1){}else if(W==1&&n==3){var y=P,g=d(Z,y);
y+=4;var Q=w(Z,y);y+=8;var J=w(Z,y);y+=8;var A=w(Z,y);y+=8;var p=w(Z,y);y+=8;var U=w(Z,y);y+=8;var j=w(Z,y);
y+=8;y+=(g-1)*8*6;var b=w(Z,y);y+=8;var s=w(Z,y);y+=8;var G=b*I,T=s*x,z=Math.max(G,I-G),m=Math.max(T,x-T),$=Math.sqrt(z*z+m*m),o=1/$,h=O.slice(0);
for(var X=0;X<x;X++)for(var D=0;D<I;D++){var f=(D+.5-G)*o,R=(X+.5-T)*o,i=f*f+R*R,t=Q+J*i+A*(i*i)+p*(i*i)*i,N=U*(2*f*R)+j*(i+2*f*f),M=j*(2*f*R)+U*(i+2*R*R),hK=~~(G+$*(t*f+N)),bD=~~(T+$*(t*R+M)),co=(bD*I+hK)*3,iM=(X*I+D)*3;
O[iM]=h[co];O[iM+1]=h[co+1];O[iM+2]=h[co+2]}}else if(W==3&&n==3){var y=P,hs=w(Z,y);y+=8;var S=w(Z,y);
y+=8;var a=w(Z,y);y+=8;var bV=w(Z,y);y+=8;var a5=w(Z,y);y+=8;var b=w(Z,y);y+=8;var s=w(Z,y);y+=8;var G=b*I,T=s*x,z=Math.max(G,I-G),m=Math.max(T,x-T),$=Math.sqrt(z*z+m*m),o=1/$;
for(var X=0;X<x;X++)for(var D=0;D<I;D++){var f=(D+.5-G)*o,R=(X+.5-T)*o,i=f*f+R*R,i9=1+(hs+(S+(a+(bV+a5*i)*i)*i)*i)*i,iM=(X*I+D)*3;
O[iM]=i9*O[iM];O[iM+1]=i9*O[iM+1];O[iM+2]=i9*O[iM+2]}}else if(W==4&&n==1){var y=P,dG=d(Z,y);y+=4;var ap=d(Z,y);
y+=4;for(var e=0;e<_;e++)if(O[e]==dG)O[e]=O[e-2]+O[e+2]>>1}else if(W==5&&n==1){var y=P,bk=d(Z,y);y+=4;
var c2=d(Z,y);y+=4;var gg=d(Z,y);y+=4;for(var e=0;e<c2;e++){var bH=d(Z,y);y+=4;var gw=d(Z,y);y+=4;var e=bH*I+gw;
O[e]=O[e-2]+O[e+2]>>1}}else if(W==7&&n==1){var y=P,gP=Y.sG(Z,y);y+=16;var dT=d(Z,y);y+=4;var fU=d(Z,y);
y+=4;var dV=d(Z,y),ac=d(Z,y+4);y+=8;var e2=d(Z,y);y+=4;var cX=new Uint16Array(e2);for(var e=0;e<e2;e++)cX[e]=Y.Ys(Z,y+2*e);
var eR=gP.d,gR=gP.v;for(var X=0;X<gR;X+=dV)for(var D=0;D<eR;D+=ac){var e=(gP.y+X)*I+(gP.x+D);O[e]=cX[O[e]]}}else if(W==9&&n==2){var y=P,gP=Y.sG(Z,y),a8=!0;
y+=16;var dT=d(Z,y);y+=4;var fU=d(Z,y);y+=4;var dV=d(Z,y),ac=d(Z,y+4);y+=8;var bN=d(Z,y),eG=d(Z,y+4);
y+=8;var ef=w(Z,y),fi=w(Z,y+8);y+=16;var ep=w(Z,y),iJ=w(Z,y+8);y+=16;var aT=d(Z,y);y+=4;if(aT!=1)throw"more than one map plane";
var dm=bN*eG,c1=new Float32Array(dm);for(var gk=0;gk<dm;gk++)c1[gk]=Y.LD(Z,y+gk*4);for(var gk=0;gk<dm;
gk++)if(c1[gk]!=1)a8=!1;if(!a8){var eR=gP.d,gR=gP.v,bX=.9999*(eG-1)/eR,bL=.9999*(bN-1)/gR;for(var X=0;
X<gR;X+=dV)for(var D=0;D<eR;D+=ac){var e=(gP.y+X)*I+(gP.x+D),c_=D*bX,eS=X*bL,c$=Math.floor(c_),cp=Math.floor(eS),b_=c_-c$,hy=eS-cp,iM=cp*eG+c$,gx=c1[iM]*(1-b_)+c1[iM+1]*b_,eJ=c1[iM+eG]*(1-b_)+c1[iM+1+eG]*b_,d4=gx*(1-hy)+eJ*hy;
O[e]=~~(O[e]*d4+.5)}}}else console.log("Unknown opcode "+W+" in OpcodeList"+n+". Length: "+H);P+=H}};
q.raw.aon=function(n,F){var O=il.zk(F),I=q.raw.yS(n,F),x=q.e$.uZ(I),r=il.alR(O,il.zk(il.agC)),_=q.e$.multiply(r,x);
return _};q.raw.aeu=function(n){var F=(n.t50728?n.t50728:[1,1,1]).slice(0),I=1;F.push(0);var O={x:.34567,y:.3585};
do{var x=q.e$.uZ(q.raw.yS(n,O)),r=q.e$.Rv(x,F),_=il.a8J(r);I=Math.abs(O.x-_.x)+Math.abs(O.y-_.y);O=_}while(I>1e-7);
return O};q.raw.yS=function(n,F){var O=il.j6(F),I=q.raw.a9$,x=n.t50778?n.t50778[0]:0,r=n.t50779?n.t50779[0]:0,_=I(n.t50721,n.t50722,x,r,O.ZG),d=I(n.t50723,n.t50724,x,r,O.ZG);
_=_||[1,0,0,0,1,0,0,0,1];d=d||[1,0,0,0,1,0,0,0,1];var w=n.t50727?[n.t50727[0],0,0,0,n.t50727[1],0,0,0,n.t50727[2]]:[1,0,0,0,1,0,0,0,1];
return q.e$.multiply(q.e$.oD(w),q.e$.multiply(q.e$.oD(d),q.e$.oD(_)))};q.raw.a9$=function(n,F,O,I,x){if(!n&&!F){return null}else if(n&&!F){return n}else if(x<O){return n}else if(x>I){return F}else{var r=(1/x-1/I)/(1/O-1/I),_=1-r,d=[];
for(var e=0;e<9;e++)d[e]=n[e]*r+F[e]*_;return d}};var il={};il.agC={x:.34567,y:.3585};il.Z9=[{Q:0,tL:.18006,K_:.26352,OI:-.24341},{Q:10,tL:.18066,K_:.26589,OI:-.25479},{Q:20,tL:.18133,K_:.26846,OI:-.26876},{Q:30,tL:.18208,K_:.27119,OI:-.28539},{Q:40,tL:.18293,K_:.27407,OI:-.3047},{Q:50,tL:.18388,K_:.27709,OI:-.32675},{Q:60,tL:.18494,K_:.28021,OI:-.35156},{Q:70,tL:.18611,K_:.28342,OI:-.37915},{Q:80,tL:.1874,K_:.28668,OI:-.40955},{Q:90,tL:.1888,K_:.28997,OI:-.44278},{Q:100,tL:.19032,K_:.29326,OI:-.47888},{Q:125,tL:.19462,K_:.30141,OI:-.58204},{Q:150,tL:.19962,K_:.30921,OI:-.70471},{Q:175,tL:.20525,K_:.31647,OI:-.84901},{Q:200,tL:.21142,K_:.32312,OI:-1.0182},{Q:225,tL:.21807,K_:.32909,OI:-1.2168},{Q:250,tL:.22511,K_:.33439,OI:-1.4512},{Q:275,tL:.23247,K_:.33904,OI:-1.7298},{Q:300,tL:.2401,K_:.34308,OI:-2.0637},{Q:325,tL:.24792,K_:.34655,OI:-2.4681},{Q:350,tL:.25591,K_:.34951,OI:-2.9641},{Q:375,tL:.264,K_:.352,OI:-3.5814},{Q:400,tL:.27218,K_:.35407,OI:-4.3633},{Q:425,tL:.28039,K_:.35577,OI:-5.3762},{Q:450,tL:.28863,K_:.35714,OI:-6.7262},{Q:475,tL:.29685,K_:.35823,OI:-8.5955},{Q:500,tL:.30505,K_:.35907,OI:-11.324},{Q:525,tL:.3132,K_:.35968,OI:-15.628},{Q:550,tL:.32129,K_:.36011,OI:-23.325},{Q:575,tL:.32931,K_:.36038,OI:-40.77},{Q:600,tL:.33724,K_:.36051,OI:-116.45}];
il.j6=function(n){var F=il.Z9,O=2*n.x/(1.5-n.x+6*n.y),I=3*n.y/(1.5-n.x+6*n.y),x=0,r=0,_=0;for(;_<31;
_++){x=I-F[_].K_-F[_].OI*(O-F[_].tL);if(_>0&&x<0){break}r=x}while(_>=F.length)_--;x/=Math.sqrt(1+F[_].OI*F[_].OI);
r/=Math.sqrt(1+F[_-1].OI*F[_-1].OI);var d=r/(r-x),w=1e6/((F[_].Q-F[_-1].Q)*d+F[_-1].Q),Z=O-((F[_].tL-F[_-1].tL)*d+F[_-1].tL),P=I-((F[_].K_-F[_-1].K_)*d+F[_-1].K_),C=Math.sqrt(1+F[_].OI*F[_].OI),W=1/C,v=F[_].OI/C,L=Math.sqrt(1+F[_-1].OI*F[_-1].OI),H=1/L,y=F[_-1].OI/L,g=(W-H)*d+H,Q=(v-y)*d+y,J=Math.sqrt(g*g+Q*Q);
g/=J;Q/=J;var A=(Z*g+P*Q)*-3e3;return{ZG:w,Xn:A}};il.abD=function(n,F){var O=il.Z9,I=1e6/n,x=1;for(;
x<31;x++){if(I<O[x].Q){break}}var r=(O[x].Q-I)/(O[x].Q-O[x-1].Q),_=(O[x-1].tL-O[x].tL)*r+O[x].tL,d=(O[x-1].K_-O[x].K_)*r+O[x].K_,w=Math.sqrt(1+O[x].OI*O[x].OI),Z=1/w,P=O[x].OI/w,C=Math.sqrt(1+O[x-1].OI*O[x-1].OI),W=1/C,v=O[x-1].OI/C,L=(W-Z)*r+Z,H=(v-P)*r+P,y=Math.sqrt(L*L+H*H);
L/=y;H/=y;_+=L*F/-3e3;d+=H*F/-3e3;return{x:1.5*_/(_-4*d+2),y:d/(_-4*d+2)}};il.a8J=function(n){var F=n[0]+n[1]+n[2];
return{x:n[0]/F,y:n[1]/F}};il.zk=function(n){return{x:n.x/n.y,y:1,Jw:(1-n.x-n.y)/n.y}};il.alR=function(n,F){var O=q.e$.oD([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),I=[n.x,n.y,n.Jw,0],x=[F.x,F.y,F.Jw,0];
I=q.e$.Rv(O,I);x=q.e$.Rv(O,x);var r=x[0]/I[0],_=x[1]/I[1],d=x[2]/I[2],w=q.e$.oD([r,0,0,0,_,0,0,0,d]),Z=q.e$.uZ(O);
return q.e$.multiply(q.e$.multiply(Z,w),O)};q.raw.t4={};q.raw.A1=function(n){n*=8;var F=[8,10,12,14,16];
for(var O in q.raw.YJ){var I=q.raw.YJ[O];if(I.length==4)continue;var x=I[4],r=I[5];for(var e=0;e<F.length;
e++)if(x*r*F[e]==n)return[O,F[e]]}var _=[[4e3,3e3]];for(var e=0;e<_.length;e++){var I=_[e],x=I[0],r=I[1];
for(var e=0;e<F.length;e++)if(x*r*F[e]==n)return[I,F[e]]}return null};q.raw.a4q=function(n){var n=new Uint8Array(n);
for(var e=0;e<n.length;e+=2){var F=n[e];n[e]=n[e+1];n[e+1]=F}var O=q.raw.A1(n.length),I=q.raw.YJ[O[0]];
if(I==null)I=[[8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354],0,1e3,64383,O[0][0],O[0][1]];var x=I[4],r=I[5],_=Math.max(I[2],116),d={data:n,S2:1,width:x,height:r,t256:[x],t257:[r],t258:[O[1]],t277:[1],t33421:[2,2],t33422:q.raw.qk[I[1]],t50706:[1,2,0,0],t50714:[_,_,_,_],t50717:[I[3]],t50721:I[0].slice(0),t50723:[1,0,0,0,1,0,0,0,1],t50728:[.64,1,.46],t50778:[17]};
for(var e=0;e<9;e++)d.t50721[e]/=1e4;return d};q.raw.Bh=function(n){if(n==null||n.length==0||typeof n[0]=="number")return n;
var F=[];for(var e=0;e<n.length;e++)F[e]=n[e][1]==0?0:n[e][0]/n[e][1];return F};q.raw.qk=[[2,1,1,0],[0,1,1,2],[1,0,2,1],[1,2,0,1]];
q.raw.normalize=function(n,F){if(n.t50706!=null||n.t271[0].startsWith("Hasselblad")){var O=[50714,50718,50719,50720,50721,50722,50723,50724,50727,50728,50730,50731,50732,50734,50736,50738,50739,50780,50964,50965];
for(var e=0;e<O.length;e++)if(n["t"+O[e]]!=null)n["t"+O[e]]=q.raw.Bh(n["t"+O[e]]);if(n.t271&&n.t271[0].startsWith("Hasselblad")){n.t50706=[1,2,0,0];
n.t33422=q.raw.qk[1];n.t50723=[1,0,0,0,1,0,0,0,1];n.t50778=[17];if(!n.isLE)for(var e=0;e<n.data.length;
e+=2){var I=n.data[e];n.data[e]=n.data[e+1];n.data[e+1]=I}}return}var x=n.t258[0],r=n.exifIFD,F=new Uint8Array(F);
n.t50706=[1,2,0,0];var _=n.t272[0].trim();if(_.indexOf(" ")==-1)_=n.t271[0].trim()+" "+_;if(n.t50708==null)n.t50708=[_];
var d=q.raw.YJ,w=d[_.toLowerCase()];if(w==null)for(var Z in d)if(_.toLowerCase().startsWith(Z))w=d[Z];
if(w==null)throw _;var P=w[2];n.t50714=[P,P,P,P];n.t50717=[w[3]];n.t50721=w[0].slice(0);for(var e=0;
e<9;e++)n.t50721[e]=n.t50721[e]*(1/1e4);n.t50723=[1,0,0,0,1,0,0,0,1];if(n.t50728==null)n.t50728=[.35,1,.6];
n.t50778=[17];if(n.t271[0].startsWith("SONY")){var C=UTIF["_bin"+(n.isLE?"LE":"BE")],W=n.t28688,J;if(JSON.stringify(W)!="[8000,10400,12900,14100]")console.log(W);
if(W){var v=[0,0,0,0,0,4095],L=new Uint16Array(16385);for(var e=0;e<4;e++){var H=W[e]>>>2;v[e+1]=H;if(H>4095)throw"e"}for(var e=0;
e<16385;e++)L[e]=e;for(var e=0;e<5;e++)for(var y=v[e]+1;y<=v[e+1];y++)L[y]=L[y-1]+(1<<e);var g=F.length*8<n.width*n.height*x;
if(g)n.t50712=L}else console.log("no curve");var Q=n.dngPrvt;if(Q){var A=Q.t29184[0],p=Q.t29185[0],U=(n.isLE?Y.wc:Y.c)(Q.t29217,0),j=new Uint32Array(F.slice(A,A+(p&4294967292)).buffer),b=new Uint32Array(p>>>2);
q.raw.a5b(j,b,p>>>2,U);var s=new Uint8Array(A+p);s.set(new Uint8Array(b.buffer),A);var G=[];UTIF._readIFD(C,s,A,G,0,!1);
var T=G.pop(),z=T.t29458;n.t50728=[z[1]/z[0],1,z[1]/z[3]];n.t50730=[.5];var m=T.t29891;n.t50829=[m[1],m[0],m[3],m[2]]}else if(r.makerNote&&r.makerNote.t8208){var J=r.makerNote,$=J.t8208,o=$.length,h=0,X=new Uint8Array(256);
for(var e=249;e<256;e++)X[e]=e;for(var e=0;e<249;e++)X[e*e*e%249]=e;for(var e=0;e<o;e++)$[e]=X[$[e]];
if(o==6604)h=612;else throw"e";var z=[];for(var e=0;e<3;e++)z.push(Y.Qw($,h+e*2));console.log(z);n.t50728=[z[1]/z[0],1,z[1]/z[2]]}else console.log("no white balance");
if(n.width*n.height*1.5==n.t279[0]){P=P>>>2;n.t50714=[P,P,P,P];n.t50717=[w[3]>>>2]}}else if(n.t271[0].startsWith("Canon")){var F=n.data,D=F.slice(0),f=n.t50752,R=[],t=0;
if(f==null||f[0]==0&&f[1]==0)R.push(n.width);else{for(var e=0;e<f[0];e++)R.push(f[1]);R.push(f[2])}var i=n.width*2;
for(var N=0;N<R.length;N++){var M=R[N],hK=2*t,bD=2*M;for(var co=0;co<n.height;co+=2){var iM=co*i+hK,hs=n.height*hK+(co>>1)*bD*2;
for(var e=0;e<bD;e++){F[iM+e]=D[hs+e];F[iM+e+i]=D[hs+e+bD]}}t+=M}var J=r.makerNote;if(J.t16385){var S=J.t224,a5=0;
if(S){n.t50719=[S[5],S[6]];n.t50720=[S[7]+1-S[5],S[8]+1-S[6]]}var a=J.t16385,bV=a.length;if(bV==582)a5=1;
else if(bV==653)a5=2;else if(bV==796)a5=3;else if([692,674,702,1227,1250,1251,1337,1338,1346].indexOf(bV)!=-1)a5=4;
else if(bV==5120){a5=5;a=new Int16Array(a.slice(0).buffer)}else if(bV==1273||bV==1275)a5=6;else if([1312,1313,1316,1506].indexOf(bV)!=-1)a5=7;
else if([1560,1592,1353,1602].indexOf(bV)!=-1)a5=8;else throw"e"+bV;var i9=a[0],dG=[null,[25,166],[34,286],[63,196],[63],[71,i9==-4?333:264],[63,251],[63,i9==10?504:728],[63,326]],h=dG[a5][0],ap=dG[a5][1];
if(a5==4){if(a[0]==2)ap=231;else if(a[0]==3)ap=231;else if(a[0]==4)ap=231;else if(a[0]==5)ap=231;else if(a[0]==6)ap=231;
else if(a[0]==7)ap=231;else if(a[0]==9)ap=231;else throw"e"}n.t50728=[a[h+1]/a[h],1,a[h+1]/a[h+3]];var P=ap==null?1024:a[ap];
n.t50714=[P,P,P,P]}else{n.t50728=[.4,1,.6]}}else if(n.t271[0].startsWith("NIKON")){var J=r.makerNote,bk=n.isLE?Y.Qw:Y.W0,dT=0,fU=0,cX,ep=0;
if(J.t61){var c2=J.t61,gg=[];for(var e=0;e<4;e++)gg[e]=c2[e]/Math.pow(2,14-x);n.t50714=gg}if(J.t3585){var bH=J.t3585,e=0,A=22;
while(A<bH.length&&e!=-4){var gw=Y.wc(bH,A);A+=4;A+=14;e=Y.wc(bH,A)-4;A+=4;if(gw==1990472198){if(bH[A]!=0)throw"Flip"}if(gw==1990472199){var gP=Y.Qw(bH,A);
if(gP==0)n.S2=1;else if(gP==270)n.S2=8;else throw"e "+gP}A+=e}}if(J.t183){var dV=J.t183,ac=[];for(var e=0;
e<6;e++)ac.push(bk(dV,16+e*2));dT=ac[0];fU=ac[1]}if(J.t3614){var e2=J.t3614;dT=Y.wc(e2,8);fU=Y.wc(e2,12)}if(dT!=0){if(dT<fU){var I=dT;
dT=fU;fU=I}var t=n.width-dT>>>1,co=n.height-fU>>>1;n.t50829=[co,t,co+fU,t+dT]}if(J.t12){var eR=q.raw.Bh(J.t12);
cX=[1/eR[0],1,1/eR[1]]}else if(J.t151){var gR=q.raw.agb(J,151),bN=gR[0],db=gR[1],eG=gR[2];if(bN=="0100"&&db>=80)throw"e";
else if(bN=="0102"){var ef=[];for(var e=0;e<4;e++)ef.push(bk(eG,6+e*2));cX=[ef[1]/ef[0],1,ef[1]/ef[3]]}else if(bN=="0103"&&db>=26){var ef=[];
for(var e=0;e<4;e++)ef.push(bk(eG,16+e*2));cX=[ef[1]/ef[0],1,ef[3]/ef[2]]}else if(bN=="0204"&&db>=564||bN=="0205"&&db>=284){var A=bN=="0204"?6:14,ef=[];
for(var e=0;e<4;e++)ef.push(bk(eG,A+e*2));cX=[ef[1]/ef[0],1,ef[1]/ef[3]]}else throw"e"}else console.log("no white balance info");
if(_=="NIKON D1")cX=[1,1,1];if(cX)n.t50728=cX;var fi=J.t150?J.t150:J.t140;if(fi){var iJ=fi[ep++],aT=fi[ep++],gk;
if(iJ==73||aT==88)ep+=2110;ep+=8;var dm=1<<x&32767,c1=bk(fi,ep);ep+=2;var L=[];if(c1>1)gk=Math.floor(dm/(c1-1));
if(iJ==68&&aT==32&&gk>0){for(e=0;e<c1;e++){L[e*gk]=bk(fi,ep);ep+=2}for(e=0;e<dm;e++)L[e]=Math.floor((L[e-e%gk]*(gk-e%gk)+L[e-e%gk+gk]*(e%gk))/gk)}else if(iJ!=70&&c1<=16385){dm=c1;
for(var e=0;e<c1;e++)L[e]=bk(fi,ep+2*e);ep+=2*c1}if(L.length!=0)n.t50712=new Uint16Array(L);else if(n.t272[0]=="NIKON D750")n.t50717[0]*=4}}else if(_.startsWith("FujiFilm")){}else alert("Unknown camera "+_)};
q.raw.a5b=function(n,F,O,I){if(0==O)return;var x=new Uint32Array(128),r=new Uint8Array(x.buffer),_=127,d=0,w=0;
for(var _=0;_<4;_++)x[_]=I=(I*15625>>>0)*3125+1>>>0;x[3]=x[3]<<1|(x[0]^x[2])>>>31;for(var _=4;_<127;
_++)x[_]=(x[_-4]^x[_-2])<<1|(x[_-3]^x[_-1])>>>31;for(var _=0;_<127;_++)x[_]=Y.c(r,_*4);for(;O>0;O--){x[_&127]=x[_+1&127]^x[_+1+64&127];
var Z=x[_&127],P=n[d];P^=Z;F[w]=P;d++;w++;_++}};q.raw.acP=function(n,F){var O=Y.su(F,0,4),I=q.raw.alu;
for(var e=0;e<I.length;e++)if(I[e][0]==n&&O.startsWith(I[e][1])&&(I[e][2]==0||I[e][2]==F.length))return I[e];
throw"e"};q.raw.a2r=function(n){if(n.t29==null)return[];var F=q.raw.aax,O=q.raw.aau,I=n.t29[0],x=0,_=0;
for(var e=0;e<I.length;e++){var r=I.charCodeAt(e);x=x*10+(48<=r&&r<=57?r-48:r%10)}var db=n.t167[0];for(var e=0;
e<4;e++)_^=db>>>(e<<3)&255;var d=F[x&255],w=O[_&255];return[d,w,96]};q.raw.agb=function(n,F){var O=n["t"+F],db=O.length,I=q.raw.acP(F,O),x=Y.su(O,0,4),r,_=I[4];
if(_==null)r=O.slice(4);else{r=new Uint8Array(db-_);var d=q.raw.a2r(n),w=d[0],Z=d[1],P=d[2];for(var e=0;
e<r.length;e++){Z=Z+w*P++&255;r[e]=O[_++]^Z}}return[x,db,r]};q.raw.alu=[[145,"0208",0,0,4],[145,"0209",0,1,4],[145,"0210",5291,2,4],[145,"0210",5303,3,4],[145,"02",0,4,4],[145,"01",0,5,null],[151,"0100",0,0,null],[151,"0102",0,1,null],[151,"0103",0,4,null],[151,"0204",0,3,284],[151,"0205",0,2,4],[151,"0206",0,3,284],[151,"0207",0,3,284],[151,"0208",0,3,284],[151,"0209",0,5,284],[151,"02",0,3,284],[152,"0100",0,0,null],[152,"0101",0,1,null],[152,"0201",0,1,4],[152,"0202",0,1,4],[152,"0203",0,1,4],[152,"0204",0,2,4],[168,"0100",0,0,null],[168,"0101",0,0,null],[168,"0102",0,1,null],[168,"0103",0,2,null]];
q.raw.aax=[193,191,109,13,89,197,19,157,131,97,107,79,199,127,61,61,83,89,227,199,233,47,149,167,149,31,223,127,43,41,199,13,223,7,239,113,137,61,19,61,59,19,251,13,137,193,101,31,179,13,107,41,227,251,239,163,107,71,127,149,53,167,71,79,199,241,89,149,53,17,41,97,241,61,179,43,13,67,137,193,157,157,137,101,241,233,223,191,61,127,83,151,229,233,149,23,29,61,139,251,199,227,103,167,7,241,113,167,83,181,41,137,229,43,167,23,41,233,79,197,101,109,107,239,13,137,73,47,179,67,83,101,29,73,163,19,137,89,239,107,239,101,29,11,89,19,227,79,157,179,41,67,43,7,29,149,89,89,71,251,229,233,97,71,47,53,127,23,127,239,127,149,149,113,211,163,11,113,163,173,11,59,181,251,163,191,79,131,29,173,233,47,113,101,163,229,7,53,61,13,181,233,229,71,59,157,239,53,163,191,179,223,83,211,151,83,73,113,7,53,97,113,47,67,47,17,223,23,151,251,149,59,127,107,211,37,191,173,199,197,197,181,139,239,47,211,7,107,37,73,149,37,73,109,113,199];
q.raw.aau=[167,188,201,173,145,223,133,229,212,120,213,23,70,124,41,76,77,3,233,37,104,17,134,179,189,247,111,97,34,162,38,52,42,190,30,70,20,104,157,68,24,194,64,244,126,95,27,173,11,148,182,103,180,11,225,234,149,156,102,220,231,93,108,5,218,213,223,122,239,246,219,31,130,76,192,104,71,161,189,238,57,80,86,74,221,223,165,248,198,218,202,144,202,1,66,157,139,12,115,67,117,5,148,222,36,179,128,52,229,44,220,155,63,202,51,69,208,219,95,245,82,195,33,218,226,34,114,107,62,208,91,168,135,140,6,93,15,221,9,25,147,208,185,252,139,15,132,96,51,28,155,69,241,240,163,148,58,18,119,51,77,68,120,40,60,158,253,101,87,22,148,107,251,89,208,200,34,54,219,210,99,152,67,161,4,135,134,247,166,38,187,214,89,77,191,106,46,170,43,239,230,120,182,78,224,47,220,124,190,87,25,50,126,42,208,184,186,41,0,60,82,125,168,73,59,45,235,37,73,250,163,170,57,167,197,167,80,17,54,251,198,103,74,245,165,18,101,126,176,223,175,78,179,97,127,47];
q.raw.YJ={"canon eos 100d":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2048,15e3],"canon eos rebel sl1":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2048,15e3],"canon eos kiss x7":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2048,15e3],"canon eos 200d":[[7377,-742,-998,-4235,11981,2549,-673,1918,5538],1,2049,14338],"canon eos rebel sl2":[[7377,-742,-998,-4235,11981,2549,-673,1918,5538],1,2049,14338],"canon eos kiss x9":[[7377,-742,-998,-4235,11981,2549,-673,1918,5538],1,2049,14338],"canon eos 300d":[[8197,-2e3,-1118,-6714,14335,2592,-2536,3178,8266],1,126,4e3],"canon eos digital rebel":[[8197,-2e3,-1118,-6714,14335,2592,-2536,3178,8266],1,126,4e3],"canon eos kiss digital":[[8197,-2e3,-1118,-6714,14335,2592,-2536,3178,8266],1,126,4e3],"canon eos d30":[[9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775],1,126,4095],"canon eos d60":[[6188,-1341,-890,-7168,14489,2937,-2640,3228,8483],1,127,4e3],"canon eos 10d":[[8197,-2e3,-1118,-6714,14335,2592,-2536,3178,8266],1,130,4e3],"canon eos 20d":[[6599,-537,-891,-8071,15783,2424,-1983,2234,7462],1,126,4095],"canon eos 30d":[[6257,-303,-1e3,-7880,15621,2396,-1714,1904,7046],1,127,3398],"canon eos 350d":[[6018,-617,-965,-8645,15881,2975,-1530,1719,7642],1,255,4095],"canon eos digital rebel xt":[[6018,-617,-965,-8645,15881,2975,-1530,1719,7642],1,255,4095],"canon eos kiss digital n":[[6018,-617,-965,-8645,15881,2975,-1530,1719,7642],1,255,4095],"canon eos 350d":[[6018,-617,-965,-8645,15881,2975,-1530,1719,7642],1,255,4095],"canon eos 350d digital":[[6018,-617,-965,-8645,15881,2975,-1530,1719,7642],1,255,4095],"canon eos 40d":[[6071,-747,-856,-7653,15365,2441,-2025,2553,7315],1,1021,13600],"canon eos 450d":[[5784,-262,-821,-7539,15064,2672,-1982,2681,7427],1,1020,14500],"canon eos digital rebel xsi":[[5784,-262,-821,-7539,15064,2672,-1982,2681,7427],1,1020,14500],"canon eos kiss digital x2":[[5784,-262,-821,-7539,15064,2672,-1982,2681,7427],1,1020,14500],"canon eos kiss x2":[[5784,-262,-821,-7539,15064,2672,-1982,2681,7427],1,1020,14500],"canon eos 50d":[[4920,616,-593,-6493,13964,2784,-1774,3178,7005],3,1020,13653],"canon eos 60d":[[6719,-994,-925,-4408,12426,2211,-887,2129,6051],3,2026,14200],"canon eos 70d":[[7034,-804,-1014,-4420,12564,2058,-851,1994,5758],1,2026,13653],"canon eos 80d":[[7457,-671,-937,-4849,12495,2643,-1213,2354,5492],1,512,11892],"canon eos 700d":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2052,15e3],"canon eos rebel t5i":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2052,15e3],"canon eos kiss x7i":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2052,15e3],"canon eos 750d":[[6362,-823,-847,-4426,12109,2616,-743,1857,5635],1,2047,11765],"canon eos rebel t6i":[[6362,-823,-847,-4426,12109,2616,-743,1857,5635],1,2047,11765],"canon eos kiss x8i":[[6362,-823,-847,-4426,12109,2616,-743,1857,5635],1,2047,11765],"canon eos 800d":[[6970,-512,-968,-4425,12161,2553,-739,1982,5601],1,2049,14338],"canon eos rebel t7i":[[6970,-512,-968,-4425,12161,2553,-739,1982,5601],1,2049,14338],"canon eos rebel t7i":[[6970,-512,-968,-4425,12161,2553,-739,1982,5601],1,2049,14338],"canon eos kiss x9i":[[6970,-512,-968,-4425,12161,2553,-739,1982,5601],1,2049,14338],"canon eos 760d":[[6362,-823,-847,-4426,12109,2616,-743,1857,5635],1,2047,11765],"canon eos rebel t6s":[[6362,-823,-847,-4426,12109,2616,-743,1857,5635],1,2047,11765],"canon eos 8000d":[[6362,-823,-847,-4426,12109,2616,-743,1857,5635],1,2047,11765],"canon eos 77d":[[7377,-742,-998,-4235,11981,2549,-673,1918,5538],1,2048,14338],"canon eos 9000d":[[7377,-742,-998,-4235,11981,2549,-673,1918,5538],1,2048,14338],"canon eos 500d":[[4763,712,-646,-6821,14399,2640,-1921,3276,6561],1,1020,16e3],"canon eos rebel t1i":[[4763,712,-646,-6821,14399,2640,-1921,3276,6561],1,1020,16e3],"canon eos kiss x3":[[4763,712,-646,-6821,14399,2640,-1921,3276,6561],1,1020,16e3],"canon eos 550d":[[6941,-1164,-857,-3825,11597,2534,-416,1540,6039],0,2048,15831],"canon eos rebel t2i":[[6941,-1164,-857,-3825,11597,2534,-416,1540,6039],0,2048,15831],"canon eos kiss x4":[[6941,-1164,-857,-3825,11597,2534,-416,1540,6039],0,2048,15831],"canon eos 600d":[[6461,-907,-882,-4300,12184,2378,-819,1944,5931],3,2026,13584],"canon eos rebel t3i":[[6461,-907,-882,-4300,12184,2378,-819,1944,5931],3,2026,13584],"canon eos kiss x5":[[6461,-907,-882,-4300,12184,2378,-819,1944,5931],3,2026,13584],"canon eos 650d":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2026,13584],"canon eos rebel t4i":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2026,13584],"canon eos kiss x6i":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2026,13584],"canon eos 5d":[[6347,-479,-972,-8297,15954,2480,-1968,2131,7649],1,127,3692],"canon eos 5d mark ii":[[4716,603,-830,-7798,15474,2480,-1496,1937,6651],3,1024,12995],"canon eos 5d mark iii":[[6722,-635,-963,-4287,12460,2028,-908,2162,5668],1,2060,16383],"canon eos 5d mark iv":[[6446,-366,-864,-4436,12204,2513,-952,2496,6348],1,2049,14448],"canon eos 5ds":[[6250,-711,-808,-5153,12794,2636,-1249,2198,5610],1,2048,15181],"canon eos 5ds r":[[6250,-711,-808,-5153,12794,2636,-1249,2198,5610],1,2048,15181],"canon eos 6d":[[7034,-804,-1014,-4420,12564,2058,-851,1994,5758],1,2048,15e3],"canon eos 6d mark ii":[[6875,-970,-932,-4691,12459,2501,-874,1953,5809],1,2049,14558],"canon eos 7d":[[6844,-996,-856,-3876,11761,2396,-593,1772,6198],3,2049,15400],"canon eos 7d mark ii":[[7268,-1082,-969,-4186,11839,2663,-825,2029,5839],1,2048,15100],"canon eos 1000d":[[6771,-1139,-977,-7818,15123,2928,-1244,1437,7533],1,255,3650],"canon eos digital rebel xs":[[6771,-1139,-977,-7818,15123,2928,-1244,1437,7533],1,255,3650],"canon eos kiss digital f":[[6771,-1139,-977,-7818,15123,2928,-1244,1437,7533],1,255,3650],"canon eos 1100d":[[6444,-904,-893,-4563,12308,2535,-903,2016,6728],1,2036,15500],"canon eos rebel t3":[[6444,-904,-893,-4563,12308,2535,-903,2016,6728],1,2036,15500],"canon eos 1200d":[[6461,-907,-882,-4300,12184,2378,-819,1944,5931],3,2046,12279],"canon eos rebel t5":[[6461,-907,-882,-4300,12184,2378,-819,1944,5931],3,2046,12279],"canon eos kiss x70":[[6461,-907,-882,-4300,12184,2378,-819,1944,5931],3,2046,12279],"canon eos 1300d":[[6939,-1016,-866,-4428,12473,2177,-1175,2178,6162],3,2048,15e3],"canon eos rebel t6":[[6939,-1016,-866,-4428,12473,2177,-1175,2178,6162],3,2048,15e3],"canon eos kiss x80":[[6939,-1016,-866,-4428,12473,2177,-1175,2178,6162],3,2048,15e3],"canon eos 2000d":[[8532,-701,-1167,-4095,11879,2508,-797,2424,7010],3,2048,15092],"canon eos rebel t7":[[8532,-701,-1167,-4095,11879,2508,-797,2424,7010],3,2048,15092],"canon eos 1500d":[[8532,-701,-1167,-4095,11879,2508,-797,2424,7010],3,2048,15092],"canon eos 4000d":[[6939,-1016,-866,-4428,12473,2177,-1175,2178,6162],3,2051,15e3],"canon eos rebel t100":[[6939,-1016,-866,-4428,12473,2177,-1175,2178,6162],3,2051,15e3],"canon eos 3000d":[[6939,-1016,-866,-4428,12473,2177,-1175,2178,6162],3,2051,15e3],"canon eos 400d":[[7054,-1501,-990,-8156,15544,2812,-1278,1414,7796],1,255,3726],"canon eos digital rebel xti":[[7054,-1501,-990,-8156,15544,2812,-1278,1414,7796],1,255,3726],"canon eos kiss digital x":[[7054,-1501,-990,-8156,15544,2812,-1278,1414,7796],1,255,3726],"canon eos m":[[6602,-841,-939,-4472,12458,2247,-975,2039,6148],1,2026,13584],"canon eos m2":[[6400,-480,-888,-5294,13416,2047,-1296,2203,6137],1,2026,13584],"canon eos m3":[[6362,-823,-847,-4426,12109,2616,-743,1857,5635],1,2048,16e3],"canon eos m5":[[8532,-701,-1167,-4095,11879,2508,-797,2424,7010],1,2048,16e3],"canon eos m6":[[8532,-701,-1167,-4095,11879,2508,-797,2424,7010],1,2048,16e3],"canon eos m10":[[6400,-480,-888,-5294,13416,2047,-1296,2203,6137],1,2048,16e3],"canon eos m100":[[8532,-701,-1167,-4095,11879,2508,-797,2424,7010],1,2048,16e3],"canon eos-1d":[[6806,-179,-1020,-8097,16415,1687,-3267,4236,7690],2,0,3588],"canon eos-1ds":[[4374,3631,-1743,-7520,15212,2472,-2892,3632,8161],2,0,3500],"canon eos d2000c":[[24542,-10860,-3401,-1490,11370,-297,2858,-605,3225],2,96,4095],"canon eos-1d mark ii":[[6264,-582,-724,-8312,15948,2504,-1744,1919,8664],1,127,3700],"canon eos-1d mark ii n":[[6240,-466,-822,-8180,15825,2500,-1801,1938,8042],1,127,3700],"canon eos-1d mark iii":[[6291,-540,-976,-8350,16145,2311,-1714,1858,7326],1,1023,15100],"canon eos-1d mark iv":[[6014,-220,-795,-4109,12014,2361,-561,1824,5787],3,2e3,13e3],"canon eos-1ds mark ii":[[6517,-602,-867,-8180,15926,2378,-1618,1771,7633],3,126,4060],"canon eos-1ds mark iii":[[5859,-211,-930,-8255,16017,2353,-1732,1887,7448],1,1021,15100],"canon eos-1d x":[[6847,-614,-1014,-4669,12737,2139,-1197,2488,6846],1,2050,15100],"canon eos-1d x mark ii":[[7596,-978,-967,-4808,12571,2503,-1398,2567,5752],1,2048,14888],"canon powershot pro1":[[10062,-3522,-999,-7643,15117,2730,-765,817,7323],1,129,4095],"canon powershot g1":[[-4778,9467,2172,4743,-1141,4344,-5146,9908,6077,-1566,11051,557],0,31,1023],"canon powershot g2":[[9087,-2693,-1049,-6715,14382,2537,-2291,2819,7790],1,0,1023],"canon powershot g3":[[9212,-2781,-1073,-6573,14189,2605,-2300,2844,7664],1,0,4095],"canon powershot g3 x":[[9701,-3857,-921,-3149,11537,1817,-786,1817,5147],1,2047,16e3],"canon powershot g5":[[9757,-2872,-933,-5972,13861,2301,-1622,2328,7212],1,0,4095],"canon powershot g5 x":[[9602,-3823,-937,-2984,11495,1675,-407,1415,5049],1,2047,16e3],"canon powershot g6":[[9877,-3775,-871,-7613,14807,3072,-1448,1305,7485],1,128,4095],"canon powershot g7 x":[[9602,-3823,-937,-2984,11495,1675,-407,1415,5049],1,511,4e3],"canon powershot g7 x mark ii":[[9602,-3823,-937,-2984,11495,1675,-407,1415,5049],1,2047,16e3],"canon powershot g1 x":[[7378,-1255,-1043,-4088,12251,2048,-876,1946,5805],1,0,16383],"canon powershot g1 x mark ii":[[7378,-1255,-1043,-4088,12251,2048,-876,1946,5805],1,0,16e3],"canon powershot g1 x mark iii":[[8532,-701,-1167,-4095,11879,2508,-797,2424,7010],1,2048,16e3],"canon powershot g12":[[13244,-5501,-1248,-1508,9858,1935,-270,1083,4366],1,120,4095],"canon powershot g11":[[12177,-4817,-1069,-1612,9864,2049,-98,850,4471],1,120,4095],"canon powershot g10":[[11093,-3906,-1028,-5047,12492,2879,-1003,1750,5561],3,128,4095],"canon powershot g9":[[7368,-2141,-598,-5621,13254,2625,-1418,1696,5743],1,125,4095],"canon powershot g9 x":[[9602,-3823,-937,-2984,11495,1675,-407,1415,5049],1,2047,16e3],"canon powershot g9 x mark ii":[[10056,-4131,-944,-2576,11143,1625,-238,1294,5179],1,2048,16e3],"canon powershot g15":[[7474,-2301,-567,-4056,11456,2975,-222,716,4181],3,500,2800],"canon powershot g16":[[8020,-2687,-682,-3704,11879,2052,-965,1921,5556],1,0,4095],"canon powershot sx1 is":[[6578,-259,-502,-5974,13030,3309,-308,1058,4970],1,125,4095],"canon powershot s30":[[10566,-3652,-1129,-6552,14662,2006,-2197,2581,7670],1,31,1023],"canon powershot s40":[[8510,-2487,-940,-6869,14231,2900,-2318,2829,9013],1,0,1023],"canon powershot s45":[[8163,-2333,-955,-6682,14174,2751,-2077,2597,8041],1,129,4095],"canon powershot s50":[[8882,-2571,-863,-6348,14234,2288,-1516,2172,6569],1,129,4095],"canon powershot s60":[[8795,-2482,-797,-7804,15403,2573,-1422,1996,7082],1,129,4095],"canon powershot s70":[[9976,-3810,-832,-7115,14463,2906,-901,989,7889],1,129,4095],"canon powershot s90":[[12374,-5016,-1049,-1677,9902,2078,-83,852,4683],1,125,4095],"canon powershot s95":[[13440,-5896,-1279,-1236,9598,1931,-180,1001,4651],1,125,4095],"canon powershot s100":[[7968,-2565,-636,-2873,10697,2513,180,667,4211],3,125,4095],"canon powershot s110":[[8039,-2643,-654,-3783,11230,2930,-206,690,4194],3,500,3072],"canon powershot s120":[[6961,-1685,-695,-4625,12945,1836,-1114,2152,5518],1,0,4e3],"canon powershot sx50 hs":[[12432,-4753,-1247,-2110,10691,1629,-412,1623,4926],1,127,4095],"canon powershot sx60 hs":[[13161,-5451,-1344,-1989,10654,1531,-47,1271,4955],1,128,4e3],"nikon d100":[[5902,-933,-782,-8983,16719,2354,-1402,1455,6464],2,0,4095],"nikon d1":[[16772,-4726,-2141,-7611,15713,1972,-2846,3494,9521],0,0,4095],"nikon d1h":[[7577,-2166,-926,-7454,15592,1934,-2377,2808,8606],0,0,4095],"nikon d1x":[[7702,-2245,-975,-9114,17242,1875,-2679,3055,8521],0,0,4095],"nikon d200":[[8367,-2248,-763,-8758,16447,2422,-1527,1550,8053],2,0,3880],"nikon d2h":[[5710,-901,-615,-8594,16617,2024,-2975,4120,6830],3,0,3880],"nikon d2hs":[[5710,-901,-615,-8594,16617,2024,-2975,4120,6830],3,0,3880],"nikon d2x":[[10231,-2769,-1255,-8301,15900,2552,-797,680,7148],1,0,3880],"nikon d2xs":[[10231,-2769,-1255,-8301,15900,2552,-797,680,7148],1,0,3880],"nikon d3":[[8139,-2171,-663,-8747,16541,2295,-1925,2008,8093],1,0,15892],"nikon d3s":[[8828,-2406,-694,-4874,12603,2541,-660,1509,7587],1,0,15520],"nikon d3x":[[7171,-1986,-648,-8085,15555,2718,-2170,2512,7457],1,0,15892],"nikon d300":[[9030,-1992,-715,-8465,16302,2255,-2689,3217,8069],1,0,15236],"nikon d300s":[[9030,-1992,-716,-8465,16302,2256,-2689,3217,8069],1,0,15236],"nikon d3000":[[8736,-2458,-935,-9075,16894,2251,-1354,1242,8263],3,0,3880],"nikon d3200":[[7013,-1408,-635,-5268,12902,2640,-1470,2801,7379],1,0,3880],"nikon d3300":[[6988,-1384,-714,-5631,13410,2447,-1485,2204,7318],1,150,3880],"nikon d3400":[[6988,-1384,-714,-5631,13410,2447,-1485,2204,7318],1,150,3880],"nikon d3500":[[8821,-2938,-785,-4178,12142,2287,-824,1651,6860],1,150,3972],"nikon d4":[[8598,-2848,-857,-5618,13606,2195,-1002,1773,7137],1,0,15520],"nikon d5":[[9200,-3522,-992,-5755,13803,2117,-753,1486,6338],1,400,15520],"nikon z 5":[[8695,-2558,-648,-5015,12711,2575,-1279,2215,7514],1,1008,15520],"nikon z 6":[[9943,-3269,-839,-5323,13269,2259,-1198,2083,7557],1,1008,15520],"nikon z 7":[[10405,-3755,-1270,-5461,13787,1793,-1040,2015,6785],1,1008,15520],"nikon z 50":[[11640,-4829,-1079,-5107,13006,2325,-972,1711,7380],1,251,3880],"nikon df":[[8598,-2848,-857,-5618,13606,2195,-1002,1773,7137],1,0,15520],"nikon d5100":[[8198,-2239,-724,-4871,12389,2798,-1043,2050,7181],1,0,15892],"nikon d3100":[[7911,-2167,-813,-5327,13150,2408,-1288,2483,7968],3,0,3880],"nikon d40":[[6992,-1668,-806,-8138,15748,2543,-874,850,7897],0,0,3880],"nikon d40x":[[8819,-2543,-911,-9025,16928,2151,-1329,1213,8449],3,0,3880],"nikon d50":[[7732,-2422,-789,-8238,15884,2498,-859,783,7330],0,0,4095],"nikon d500":[[8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129],1,400,15520],"nikon d5000":[[7309,-1403,-519,-8474,16008,2622,-2433,2826,8064],3,0,3767],"nikon d5200":[[8322,-3112,-1047,-6367,14342,2179,-988,1638,6394],1,0,15892],"nikon d5300":[[6988,-1384,-714,-5631,13410,2447,-1485,2204,7318],1,150,3972],"nikon d5500":[[8821,-2938,-785,-4178,12142,2287,-824,1651,6860],1,150,3972],"nikon d5600":[[8821,-2938,-785,-4178,12142,2287,-824,1651,6860],1,150,3972],"nikon d60":[[8736,-2458,-935,-9075,16894,2251,-1354,1242,8263],3,0,3880],"nikon d600":[[8178,-2245,-609,-4857,12394,2776,-1207,2086,7298],1,0,15520],"nikon d610":[[8178,-2245,-609,-4857,12394,2776,-1207,2086,7298],1,0,15520],"nikon d70":[[7732,-2422,-789,-8238,15884,2498,-859,783,7330],0,0,4095],"nikon d700":[[8139,-2171,-663,-8747,16541,2295,-1925,2008,8093],1,0,3972],"nikon d750":[[9020,-2890,-715,-4535,12436,2348,-934,1919,7086],1,150,3880],"nikon d780":[[9943,-3269,-839,-5323,13269,2259,-1198,2083,7557],1,251,3880],"nikon d7000":[[8198,-2239,-724,-4871,12389,2798,-1043,2050,7181],1,0,15892],"nikon d7100":[[8322,-3112,-1047,-6367,14342,2179,-988,1638,6394],1,0,15892],"nikon d7200":[[8322,-3112,-1047,-6367,14342,2179,-988,1638,6394],1,600,15892],"nikon d7500":[[8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129],1,100,3880],"nikon d70s":[[7732,-2422,-789,-8238,15884,2498,-859,783,7330],0,0,4095],"nikon d80":[[8629,-2410,-883,-9055,16940,2171,-1490,1363,8520],3,0,3880],"nikon d800":[[7866,-2108,-555,-4869,12483,2681,-1176,2069,7501],1,0,15520],"nikon d800e":[[7866,-2108,-555,-4869,12483,2681,-1176,2069,7501],1,0,15520],"nikon d810":[[9369,-3195,-791,-4488,12430,2301,-893,1796,6872],1,150,3880],"nikon d850":[[10405,-3755,-1270,-5461,13787,1793,-1040,2015,6785],1,100,3880],"nikon d4s":[[8598,-2848,-857,-5618,13606,2195,-1002,1773,7137],1,192,3880],"nikon d90":[[7309,-1403,-519,-8474,16008,2622,-2434,2826,8064],3,0,3767],"nikon 1 j1":[[8994,-2667,-865,-4594,12324,2552,-699,1786,6260],1,0,3300],"nikon 1 j2":[[8994,-2667,-865,-4594,12324,2552,-699,1786,6260],1,0,4095],"nikon 1 j3":[[6588,-1305,-693,-3277,10987,2634,-355,2016,5106],1,0,4095],"nikon 1 j4":[[5958,-1559,-571,-4021,11453,2939,-634,1548,5087],1,200,4e3],"nikon 1 j5":[[7520,-2518,-645,-3844,12102,1945,-913,2249,6835],1,200,3800],"nikon 1 s1":[[8994,-2667,-865,-4594,12324,2552,-699,1786,6260],1,0,3300],"nikon 1 s2":[[6612,-1342,-618,-3338,11055,2623,-174,1792,5075],1,200,4095],"nikon 1 v1":[[8994,-2667,-865,-4594,12324,2552,-699,1786,6260],1,0,3300],"nikon 1 v2":[[6588,-1305,-693,-3277,10987,2634,-355,2016,5106],1,0,4095],"nikon 1 v3":[[5958,-1559,-571,-4021,11453,2939,-634,1548,5087],1,200,4e3],"nikon 1 aw1":[[6588,-1305,-693,-3277,10987,2634,-355,2016,5106],1,0,4095],"nikon e5400":[[9349,-2987,-1001,-7919,15766,2266,-2098,2680,6839],0,0,4095],"nikon e5700":[[-5368,11478,2368,5537,-113,3148,-4969,10021,5782,778,9028,211],0,0,4095],"nikon coolpix p330":[[10321,-3920,-931,-2750,11146,1824,-442,1545,5539],1,3200,65e3],"nikon coolpix p340":[[10321,-3920,-931,-2750,11146,1824,-442,1545,5539],1,200,3800],"nikon coolpix a":[[8198,-2239,-724,-4871,12389,2798,-1043,2050,7181],1,0,15892],"nikon coolpix b700":[[14387,-6014,-1299,-1357,9975,1616,467,1047,4744],1,200,4e3],"nikon coolpix p6000":[[9698,-3367,-914,-4706,12584,2368,-837,968,5801],1,0,4095],"nikon coolpix p7000":[[11432,-3679,-1111,-3169,11239,2202,-791,1380,4455],1,0,4095],"nikon coolpix p7100":[[11053,-4269,-1024,-1976,10182,2088,-526,1263,4469],1,0,3800],"nikon coolpix p7700":[[10321,-3920,-931,-2750,11146,1824,-442,1545,5539],1,3200,65e3],"nikon coolpix p7800":[[10321,-3920,-931,-2750,11146,1824,-442,1545,5539],1,3200,65e3],"nikon coolpix p950":[[13307,-5641,-1290,-2048,10581,1689,-64,1222,5176],1,200,4095],"nikon coolpix p1000":[[14294,-6116,-1333,-1628,10219,1637,-14,1158,5022],1,200,4095],"olympus e-m10 mark iv":[[9476,-3182,-765,-2613,10958,1893,-449,1315,5268],1,254,4e3],"olympus e-m5 mark iii":[[11896,-5110,-1076,-3181,11378,2048,-519,1224,5166],1,257,4e3],"panasonic dmc-cm1":[[8770,-3194,-820,-2871,11281,1803,-513,1552,4434],1,142,4095],"panasonic dmc-fx150":[[9082,-2907,-925,-6119,13377,3058,-1797,2641,5609],0,15,3986],"panasonic dmc-fz28":[[10109,-3488,-993,-5412,12812,2916,-1305,2140,5543],0,15,3986],"panasonic dmc-fz150":[[11904,-4541,-1189,-2355,10899,1662,-296,1586,4289],3,145,3956],"panasonic dmc-fz200":[[8112,-2563,-740,-3730,11784,2197,-941,2075,4933],3,150,3956],"panasonic dmc-fz2000":[[7386,-2443,-743,-3437,11864,1757,-608,1660,4766],3,142,2095],"panasonic dmc-fz2500":[[7386,-2443,-743,-3437,11864,1757,-608,1660,4766],3,142,2095],"panasonic dmc-fz300":[[8378,-2798,-769,-3068,11410,1877,-538,1792,4623],3,143,4095],"panasonic dmc-g1":[[8199,-2065,-1056,-8124,16156,2033,-2458,3022,7220],3,15,3986],"panasonic dmc-g2":[[10113,-3400,-1114,-4765,12683,2317,-377,1437,6710],3,0,3900],"panasonic dmc-g10":[[10113,-3400,-1114,-4765,12683,2317,-377,1437,6710],3,0,3900],"panasonic dmc-gh1":[[6299,-1466,-532,-6535,13852,2969,-2331,3112,5984],3,0,3986],"panasonic dmc-gh3":[[6559,-1752,-491,-3672,11407,2586,-962,1875,5130],3,155,3956],"panasonic dmc-gh4":[[7122,-2108,-512,-3155,11201,2231,-541,1423,5045],0,142,4095],"panasonic dmc-gf1":[[7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330],3,15,3986],"panasonic dmc-gf2":[[7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330],3,150,3956],"panasonic dmc-gm1":[[6770,-1895,-744,-5232,13145,2303,-1664,2691,5703],0,143,3971],"panasonic dmc-gm5":[[8238,-3244,-679,-3921,11814,2384,-836,2022,5852],0,143,4095],"panasonic dmc-g3":[[6763,-1919,-863,-3868,11515,2684,-1216,2387,5879],2,143,3956],"panasonic dmc-g5":[[7798,-2562,-740,-3879,11584,2613,-1055,2248,5434],0,150,3956],"panasonic dmc-g6":[[8294,-2891,-651,-3869,11590,2595,-1183,2267,5352],0,142,3956],"panasonic dmc-g7":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dmc-g70":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dmc-g8":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dmc-g80":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dmc-g81":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dmc-g85":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dmc-gf3":[[9051,-2468,-1204,-5212,13276,2121,-1197,2510,6890],3,150,3956],"panasonic dmc-gf5":[[8228,-2945,-660,-3938,11792,2430,-1094,2278,5793],3,150,3956],"panasonic dmc-gf6":[[8130,-2801,-946,-3520,11289,2552,-1314,2511,5791],2,150,3956],"panasonic dmc-gf7":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dmc-gh2":[[7780,-2410,-806,-3913,11724,2484,-1018,2390,5298],3,15,3800],"panasonic dmc-fz35":[[9938,-2780,-890,-4604,12393,2480,-1117,2304,4620],0,150,3986],"panasonic dmc-fz38":[[9938,-2780,-890,-4604,12393,2480,-1117,2304,4620],0,150,3986],"panasonic dmc-fz45":[[13639,-5535,-1371,-1698,9633,2430,316,1152,4108],3,150,3986],"panasonic dmc-fz40":[[13639,-5535,-1371,-1698,9633,2430,316,1152,4108],3,150,3986],"panasonic dmc-fz40":[[13639,-5535,-1371,-1698,9633,2430,316,1152,4108],3,150,3986],"panasonic dmc-fz40":[[13639,-5535,-1371,-1698,9633,2430,316,1152,4108],3,150,3986],"panasonic dmc-fz70":[[11532,-4324,-1066,-2375,10847,1749,-564,1699,4351],1,120,3971],"panasonic dmc-fz72":[[11532,-4324,-1066,-2375,10847,1749,-564,1699,4351],1,120,3971],"panasonic dmc-fz100":[[16197,-6146,-1761,-2393,10765,1869,366,2238,5248],3,120,3986],"panasonic dmc-fz1000":[[7830,-2696,-763,-3325,11667,1866,-641,1712,4824],3,143,4095],"panasonic dc-fz10002":[[9803,-4185,-992,-4066,12578,1628,-838,1824,5288],3,143,4095],"panasonic dmc-gx1":[[6763,-1919,-863,-3868,11515,2684,-1216,2387,5879],2,150,3956],"panasonic dmc-gx7":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,150,3956],"panasonic dmc-gx8":[[7564,-2263,-606,-3148,11239,2177,-540,1435,4853],3,143,4095],"panasonic dmc-gx85":[[7771,-3020,-629,-4029,11950,2345,-821,1977,6119],0,143,4095],"panasonic dmc-gx80":[[7771,-3020,-629,-4029,11950,2345,-821,1977,6119],0,143,4095],"panasonic dmc-gx7mk2":[[7771,-3020,-629,-4029,11950,2345,-821,1977,6119],0,143,4095],"panasonic dmc-lf1":[[9379,-3267,-816,-3227,11560,1881,-926,1928,5340],1,143,3971],"panasonic dmc-lx3":[[8128,-2668,-655,-6134,13307,3161,-1782,2568,6083],0,15,3971],"panasonic dmc-lx15":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,143,4095],"panasonic dmc-lx9":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,143,4095],"panasonic dmc-lx10":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,143,4095],"leica c (typ 112)":[[9379,-3267,-816,-3227,11560,1881,-926,1928,5340],1,146,3956],"leica digilux 2":[[11340,-4069,-1275,-7555,15266,2448,-2960,3426,7685],1,0,4095],"leica d-lux 3":[[8048,-2810,-623,-6450,13519,3272,-1700,2146,7049],0,0,3986],"leica v-lux (typ 114)":[[7830,-2696,-763,-3325,11667,1866,-641,1712,4824],3,142,4095],"leica v-lux 1":[[7906,-2709,-594,-6231,13351,3220,-1922,2631,6537],0,0,3986],"panasonic dmc-l10":[[8025,-1942,-1050,-7920,15904,2100,-2456,3005,7039],3,0,3986],"panasonic dmc-fz30":[[10976,-4029,-1141,-7918,15491,2600,-1670,2071,8246],1,0,3971],"panasonic dmc-fz50":[[7906,-2709,-594,-6231,13351,3220,-1922,2631,6537],0,0,3986],"panasonic dmc-fz8":[[8986,-2755,-802,-6341,13575,3077,-1476,2144,6379],1,0,3986],"panasonic dmc-fz18":[[9932,-3060,-935,-5809,13331,2753,-1267,2155,5575],0,0,3986],"panasonic dmc-l1":[[8054,-1885,-1025,-8349,16367,2040,-2805,3542,7629],3,0,3986],"panasonic dmc-lx2":[[8048,-2810,-623,-6450,13519,3272,-1700,2146,7049],0,0,3986],"leica d-lux 4":[[8128,-2668,-655,-6134,13307,3161,-1782,2568,6083],0,15,3971],"panasonic dmc-lx5":[[10909,-4295,-948,-1333,9306,2399,22,1738,4582],2,150,3986],"leica d-lux 5":[[10909,-4295,-948,-1333,9306,2399,22,1738,4582],2,150,3986],"panasonic dmc-lx7":[[10148,-3743,-991,-2837,11366,1659,-701,1893,4899],2,150,3971],"leica d-lux 6":[[10148,-3743,-991,-2837,11366,1659,-701,1893,4899],2,150,3971],"leica d-lux (typ 109)":[[8844,-3538,-768,-3709,11762,2200,-698,1792,5220],0,143,4095],"panasonic dmc-lx1":[[10704,-4187,-1230,-8314,15952,2501,-920,945,8927],1,0,3971],"panasonic dmc-lx100":[[8844,-3538,-768,-3709,11762,2200,-698,1792,5220],0,143,4095],"panasonic dc-lx100m2":[[8585,-3127,-833,-4005,12250,1953,-650,1494,4862],0,143,4095],"panasonic dc-s1":[[9744,-3905,-779,-4899,12807,2324,-798,1630,5827],1,511,16380],"panasonic dc-s1h":[[9397,-3719,-805,-5425,13326,2309,-972,1715,6034],1,510,16380],"panasonic dc-s5":[[9744,-3905,-779,-4899,12807,2324,-798,1630,5827],1,509,16380],"panasonic dc-s1r":[[11822,-5321,-1249,-5958,15114,766,-614,1264,7043],3,510,16380],"panasonic dmc-tz60":[[8607,-2822,-808,-3755,11930,2049,-820,2060,5224],1,145,3971],"panasonic dmc-tz61":[[8607,-2822,-808,-3755,11930,2049,-820,2060,5224],1,145,3971],"panasonic dmc-zs40":[[8607,-2822,-808,-3755,11930,2049,-820,2060,5224],1,145,3971],"panasonic dmc-tz71":[[8802,-3135,-789,-3151,11468,1904,-550,1745,4810],1,143,3971],"panasonic dmc-zs50":[[8802,-3135,-789,-3151,11468,1904,-550,1745,4810],1,143,3971],"panasonic dmc-tz70":[[8802,-3135,-789,-3151,11468,1904,-550,1745,4810],1,143,3971],"panasonic dmc-tz81":[[8550,-2908,-842,-3195,11529,1881,-338,1603,4631],3,142,4095],"panasonic dmc-zs60":[[8550,-2908,-842,-3195,11529,1881,-338,1603,4631],3,142,4095],"panasonic dmc-tz80":[[8550,-2908,-842,-3195,11529,1881,-338,1603,4631],3,142,4095],"panasonic dmc-tz85":[[8550,-2908,-842,-3195,11529,1881,-338,1603,4631],3,142,4095],"panasonic dmc-tz100":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,142,4095],"panasonic dmc-zs100":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,142,4095],"panasonic dmc-zs110":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,142,4095],"panasonic dmc-tz101":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,142,4095],"panasonic dmc-tz110":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,142,4095],"panasonic dmc-tx1":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,142,4095],"panasonic dc-fz82":[[8550,-2908,-842,-3195,11529,1881,-338,1603,4631],3,143,4095],"panasonic dc-fz80":[[8550,-2908,-842,-3195,11529,1881,-338,1603,4631],3,143,4095],"panasonic dmc-fz80":[[8550,-2908,-842,-3195,11529,1881,-338,1603,4631],3,143,4095],"panasonic dmc-fz85":[[8550,-2908,-842,-3195,11529,1881,-338,1603,4631],3,143,4095],"panasonic dc-gh5":[[7641,-2336,-605,-3218,11299,2187,-485,1338,5121],1,143,4095],"panasonic dc-gh5s":[[6929,-2355,-708,-4192,12534,1828,-1097,1989,5195],1,510,8e3],"panasonic dc-g9":[[7685,-2375,-634,-3687,11700,2249,-748,1546,5111],1,148,4095],"panasonic dc-g95":[[9657,-3963,-748,-3361,11378,2258,-568,1415,5158],0,144,4095],"panasonic dc-g90":[[9657,-3963,-748,-3361,11378,2258,-568,1415,5158],0,144,4095],"panasonic dc-g91":[[9657,-3963,-748,-3361,11378,2258,-568,1415,5158],0,144,4095],"panasonic dc-g99":[[9657,-3963,-748,-3361,11378,2258,-568,1415,5158],0,144,4095],"panasonic dc-gf9":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dc-gx800":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dc-gx850":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dc-gx880":[[7610,-2780,-576,-4614,12195,2733,-1375,2393,6490],0,143,4095],"panasonic dc-gx9":[[7564,-2263,-606,-3148,11239,2177,-540,1435,4853],0,143,4095],"panasonic dc-tz90":[[9052,-3117,-883,-3045,11346,1927,-205,1520,4730],3,139,4095],"panasonic dc-tz91":[[9052,-3117,-883,-3045,11346,1927,-205,1520,4730],3,139,4095],"panasonic dc-zs70":[[9052,-3117,-883,-3045,11346,1927,-205,1520,4730],3,139,4095],"panasonic dc-fz91":[[9052,-3117,-883,-3045,11346,1927,-205,1520,4730],3,139,4095],"panasonic dc-fz92":[[9052,-3117,-883,-3045,11346,1927,-205,1520,4730],3,139,4095],"panasonic dc-fz93":[[9052,-3117,-883,-3045,11346,1927,-205,1520,4730],3,139,4095],"panasonic dc-tz96":[[12194,-5340,-1329,-3035,11394,1858,-50,1418,5219],3,142,4095],"panasonic dc-tz95":[[12194,-5340,-1329,-3035,11394,1858,-50,1418,5219],3,142,4095],"panasonic dc-zs80":[[12194,-5340,-1329,-3035,11394,1858,-50,1418,5219],3,142,4095],"panasonic dc-tz202":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,142,4095],"panasonic dc-tz200":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,142,4095],"panasonic dc-zs200":[[7790,-2736,-755,-3452,11870,1769,-628,1647,4898],3,142,4095],"pentax k100d":[[11095,-3157,-1324,-8377,15834,2720,-1108,947,11688],1,127,3950],"pentax k110d":[[11095,-3157,-1324,-8377,15834,2720,-1108,947,11688],1,127,4095],"pentax k100d super":[[11095,-3157,-1324,-8377,15834,2720,-1108,947,11688],1,127,4095],"pentax *ist d":[[9651,-2059,-1189,-8881,16512,2487,-1460,1345,10687],1,128,4095],"pentax *ist dl":[[10829,-2838,-1115,-8339,15817,2696,-837,680,11939],1,128,4095],"pentax *ist dl2":[[10504,-2438,-1189,-8603,16207,2531,-1022,863,12242],1,127,3950],"pentax *ist ds":[[10371,-2333,-1206,-8688,16231,2602,-1230,1116,11282],1,128,3950],"pentax k10d":[[9566,-2863,-803,-7170,15172,2112,-818,803,9705],1,0,4095],"pentax k20d":[[9427,-2714,-868,-7493,16092,1373,-2199,3264,7180],0,0,4095],"pentax k200d":[[9186,-2678,-907,-8693,16517,2260,-1129,1094,8524],1,0,4095],"pentax k-s1":[[8512,-3211,-787,-4167,11966,2487,-638,1288,6054],1,32,4062],"pentax k-s2":[[8662,-3280,-798,-3928,11771,2444,-586,1232,6054],1,0,3839],"pentax k-70":[[8113,-2078,-1275,-4359,12953,1514,-1091,1955,6044],1,64,16319],"pentax k-1":[[8827,-2829,-1238,-3611,12203,1549,-897,1687,6291],1,64,16316],"pentax k-1 mark ii":[[8952,-2869,-1256,-3612,12204,1550,-934,1757,6549],1,64,16316],"pentax k-3":[[7415,-2052,-721,-5186,12788,2682,-1446,2157,6773],1,1,15868],"pentax k-3 ii":[[7415,-2052,-721,-5186,12788,2682,-1446,2157,6773],1,1,15865],"pentax k-5":[[8713,-2833,-743,-4342,11900,2772,-722,1543,6247],0,512,16383],"pentax k-5 ii":[[8170,-2725,-639,-4440,12017,2744,-771,1465,6599],0,512,16383],"pentax k-5 ii s":[[8170,-2725,-639,-4440,12017,2744,-771,1465,6599],0,512,15863],"pentax k-7":[[9142,-2947,-678,-8648,16967,1663,-2224,2898,8615],0,0,4095],"pentax k-m":[[11057,-3604,-1155,-5152,13046,2329,-282,375,8104],1,0,4095],"pentax k-x":[[8843,-2837,-625,-5025,12644,2668,-411,1234,7410],0,41,4095],"pentax k-r":[[9895,-3077,-850,-5304,13035,2521,-883,1768,6936],0,64,4e3],"pentax kp":[[8617,-3228,-1034,-4674,12821,2044,-803,1577,5728],1,128,16254],"pentax k2000":[[11057,-3604,-1155,-5152,13046,2329,-282,375,8104],1,0,4095],"pentax 645d":[[9814,-2716,-1439,-5049,13907,1166,-1830,3836,5706],0,0,15767],"pentax 645z":[[9551,-3012,-1235,-3685,12133,1721,-1019,1887,6544],1,1,16316],"samsung ex2f":[[10648,-3897,-1055,-2022,10573,1668,-492,1611,4742],1,0,4095],"samsung ex1":[[8898,-2498,-994,-3144,11328,2066,-760,1381,4576],1,0,16383],"samsung nx1":[[10686,-4042,-1052,-3595,13238,276,-464,1259,5931],2,1024,16100],"samsung nx5":[[10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331],0,0,4095],"samsung nx10":[[10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331],0,0,4095],"samsung nx11":[[10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331],0,0,4095],"samsung nx100":[[10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331],0,0,4095],"samsung nx1000":[[6933,-2268,-753,-4921,13387,1647,-803,1641,6096],2,0,4095],"samsung nx1100":[[6933,-2268,-753,-4921,13387,1647,-803,1641,6096],2,0,4095],"samsung nx20":[[6933,-2268,-753,-4921,13387,1647,-803,1641,6096],2,0,4095],"samsung nx200":[[6933,-2268,-753,-4921,13387,1647,-803,1641,6096],2,0,4095],"samsung nx210":[[6933,-2268,-753,-4921,13387,1647,-803,1641,6096],2,0,4095],"samsung nx2000":[[7557,-2522,-739,-4679,12949,1894,-840,1777,5311],2,0,4095],"samsung nx30":[[7557,-2522,-739,-4679,12949,1894,-840,1777,5311],2,0,4095],"samsung nx300":[[7557,-2522,-739,-4679,12949,1894,-840,1777,5311],2,0,4095],"samsung nx300m":[[7557,-2522,-739,-4679,12949,1894,-840,1777,5311],2,0,4095],"samsung nx3000":[[8060,-2933,-761,-4504,12890,1762,-630,1489,5227],2,0,4095],"samsung nx500":[[10686,-4042,-1052,-3595,13238,276,-464,1259,5931],2,1024,16100],"samsung ek-gn120":[[7557,-2522,-739,-4679,12949,1894,-840,1777,5311],3,0,4095],"samsung wb2000":[[12093,-3557,-1155,-1e3,9534,1733,-22,1787,4576],1,0,4095],"sony dsc-rx0":[[9396,-3507,-843,-2497,11111,1572,-343,1355,5089],1,800,16620],"sony dsc-rx0m2":[[9396,-3507,-843,-2497,11111,1572,-343,1355,5089],1,800,16300],"sony dsc-rx10":[[6679,-1825,-745,-5047,13256,1953,-1580,2422,5183],1,800,16300],"sony dsc-rx10m2":[[6679,-1825,-745,-5047,13256,1953,-1580,2422,5183],1,800,16300],"sony dsc-rx10m3":[[6679,-1825,-745,-5047,13256,1953,-1580,2422,5183],1,800,16300],"sony dsc-rx10m4":[[7699,-2566,-629,-2967,11270,1928,-378,1286,4807],1,800,16380],"sony dsc-rx100":[[8651,-2754,-1057,-3464,12207,1373,-568,1398,4434],1,800,16620],"sony dsc-rx100m2":[[6596,-2079,-562,-4782,13016,1933,-970,1581,5181],1,800,16300],"sony dsc-rx100m3":[[6596,-2079,-562,-4782,13016,1933,-970,1581,5181],1,800,16300],"sony dsc-rx100m4":[[6596,-2079,-562,-4782,13016,1933,-970,1581,5181],1,800,16300],"sony dsc-rx100m5":[[6596,-2079,-562,-4782,13016,1933,-970,1581,5181],1,800,16300],"sony dsc-rx100m5a":[[11176,-4700,-965,-4004,12184,2032,-763,1726,5876],1,800,16300],"sony dsc-rx100m6":[[7325,-2321,-596,-3494,11674,2055,-668,1562,5031],1,800,16300],"sony dsc-rx100m7":[[10315,-4390,-937,-4859,12734,2365,-734,1537,5997],1,800,16300],"sony dsc-rx1r":[[6344,-1612,-462,-4863,12477,2681,-865,1786,6899],1,512,33192],"sony dsc-rx1rm2":[[6629,-1900,-483,-4618,12349,2550,-622,1381,6514],1,512,16300],"sony dslr-a100":[[9437,-2811,-774,-8405,16215,2290,-710,596,7181],2,0,4095],"sony dslr-a200":[[9847,-3091,-928,-8485,16345,2225,-715,595,7103],1,0,4095],"sony dslr-a230":[[9847,-3091,-928,-8485,16345,2225,-715,595,7103],1,0,4095],"sony dslr-a290":[[6038,-1484,-579,-9145,16746,2512,-875,746,7218],1,0,4095],"sony dslr-a300":[[9847,-3091,-928,-8485,16345,2225,-715,595,7103],1,0,4095],"sony dslr-a330":[[9847,-3091,-929,-8485,16346,2225,-714,595,7103],1,0,4095],"sony dslr-a350":[[6038,-1484,-578,-9146,16746,2513,-875,746,7217],1,0,4095],"sony dslr-a380":[[6038,-1484,-579,-9145,16746,2512,-875,746,7218],1,0,4095],"sony dslr-a390":[[6038,-1484,-579,-9145,16746,2512,-875,746,7218],1,0,4095],"sony dslr-a450":[[4950,-580,-103,-5228,12542,3029,-709,1435,7371],1,500,16e3],"sony dslr-a500":[[6046,-1127,-278,-5574,13076,2786,-691,1419,7625],0,500,16600],"sony dslr-a550":[[4950,-580,-103,-5228,12542,3029,-709,1435,7371],0,512,16372],"sony dslr-a560":[[4950,-580,-103,-5228,12542,3029,-709,1435,7371],0,476,16596],"sony dslr-a580":[[5932,-1492,-411,-4813,12285,2856,-741,1524,6739],0,520,16596],"sony dslr-a700":[[5775,-805,-359,-8574,16295,2391,-1943,2341,7249],0,520,16383],"sony dslr-a850":[[5413,-1162,-365,-5665,13098,2866,-608,1179,8440],0,500,15e3],"sony dslr-a900":[[5209,-1072,-397,-8845,16120,2919,-1618,1803,8654],1,520,16383],"sony nex-3":[[6907,-1256,-645,-4940,12621,2320,-1710,2581,6230],1,520,16360],"sony nex-3n":[[6129,-1545,-418,-4930,12490,2743,-977,1693,6615],1,520,16596],"sony nex-5":[[6807,-1350,-342,-4216,11649,2567,-1089,2001,6420],1,520,16383],"sony nex-5n":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,520,16596],"sony nex-5r":[[6129,-1545,-418,-4930,12490,2743,-977,1693,6615],1,520,16596],"sony nex-5t":[[6129,-1545,-418,-4930,12490,2743,-977,1693,6615],1,512,16300],"sony nex-6":[[6129,-1545,-418,-4930,12490,2743,-977,1693,6615],1,520,16596],"sony nex-7":[[5491,-1192,-363,-4951,12342,2948,-911,1722,7192],1,512,16300],"sony nex-c3":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,520,16596],"sony nex-f3":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,520,16360],"sony ilce-3000":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,512,16300],"sony ilce-3500":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,512,16300],"sony ilce-5000":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,512,16300],"sony ilce-5100":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,512,16300],"sony ilce-6000":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,512,16300],"sony ilce-6100":[[7657,-2847,-607,-4083,11966,2389,-684,1418,5844],1,512,16300],"sony ilce-6300":[[5973,-1695,-419,-3826,11797,2293,-639,1398,5789],1,512,16300],"sony ilce-6400":[[7657,-2847,-607,-4083,11966,2389,-684,1418,5844],1,512,16383],"sony ilce-6500":[[5973,-1695,-419,-3826,11797,2293,-639,1398,5789],1,512,16300],"sony ilce-6600":[[7657,-2847,-607,-4083,11966,2389,-684,1418,5844],1,512,16383],"sony ilce-7":[[5271,-712,-347,-6153,13653,2763,-1601,2366,7242],1,512,16300],"sony ilce-7m2":[[5271,-712,-347,-6153,13653,2763,-1601,2366,7242],1,512,16300],"sony ilce-7m3":[[7374,-2389,-551,-5435,13162,2519,-1006,1795,6552],1,512,16300],"sony ilce-7r":[[4913,-541,-202,-6130,13513,2906,-1564,2151,7183],1,512,16300],"sony ilce-7rm2":[[6629,-1900,-483,-4618,12349,2550,-622,1381,6514],1,512,16300],"sony ilce-7rm3":[[6640,-1847,-503,-5238,13010,2474,-993,1673,6527],1,512,16383],"sony ilce-7rm4":[[7662,-2686,-660,-5240,12965,2530,-796,1508,6167],1,512,16383],"sony ilce-7s":[[5838,-1430,-246,-3497,11477,2297,-748,1885,5778],1,512,16300],"sony ilce-7sm2":[[5838,-1430,-246,-3497,11477,2297,-748,1885,5778],1,512,16300],"sony ilce-9":[[6389,-1703,-378,-4562,12265,2587,-670,1489,6550],1,512,16383],"sony ilce-9m2":[[6389,-1703,-378,-4562,12265,2587,-670,1489,6550],1,512,16380],"sony dsc-rx1":[[6344,-1612,-462,-4863,12477,2681,-865,1786,6899],1,520,16628],"sony slt-a33":[[6069,-1221,-366,-5221,12779,2734,-1024,2066,6834],1,520,16596],"sony slt-a35":[[5986,-1618,-415,-4557,11820,3120,-681,1404,6971],1,545,16596],"sony slt-a37":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,520,16500],"sony slt-a55":[[5932,-1492,-411,-4813,12285,2856,-741,1524,6739],1,520,16596],"sony slt-a55v":[[5932,-1492,-411,-4813,12285,2856,-741,1524,6739],1,520,16596],"sony slt-a57":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,512,16596],"sony slt-a58":[[5991,-1456,-455,-4764,12135,2980,-707,1425,6701],1,520,16596],"sony slt-a65":[[5491,-1192,-363,-4951,12342,2948,-911,1722,7192],1,520,16596],"sony slt-a65v":[[5491,-1192,-363,-4951,12342,2948,-911,1722,7192],1,520,16596],"sony slt-a77":[[5491,-1192,-363,-4951,12342,2948,-911,1722,7192],1,520,16596],"sony slt-a77v":[[5491,-1192,-363,-4951,12342,2948,-911,1722,7192],1,520,16596],"sony ilca-77m2":[[5991,-1732,-443,-4100,11989,2381,-704,1467,5992],1,512,16300],"sony ilca-68":[[6435,-1903,-536,-4722,12449,2550,-663,1363,6517],1,512,16300],"sony ilca-99m2":[[6660,-1918,-471,-4613,12398,2485,-649,1433,6447],1,512,16300],"sony slt-a99":[[6344,-1612,-462,-4863,12477,2681,-865,1786,6899],1,520,16596],"sony slt-a99v":[[6344,-1612,-462,-4863,12477,2681,-865,1786,6899],1,520,16596],"sony zv-1":[[8280,-2987,-703,-3531,11645,2133,-550,1542,5312],1,800,16300],"sinar hy6":[[16442,-2956,-2422,-2877,12128,750,-1136,6066,4559],1,0,0],"fujifilm finepix s1":[[12297,-4882,-1202,-2106,10691,1623,-88,1312,4790],1,200,4095],"fujifilm finepix s6000fd":[[12628,-4887,-1401,-6861,14996,1962,-2198,2782,7091],3,0,15872],"fujifilm finepix s100fs":[[11521,-4355,-1065,-6524,13767,3058,-1466,1984,6045],3,512,16383],"fujifilm finepix s200exr":[[11401,-4498,-1312,-5088,12751,2613,-838,1568,5941],1,519,16250],"fujifilm finepix f600exr":[[13690,-5358,-1474,-3369,11600,1998,-132,1554,4395],1,256,3900],"fujifilm finepix f700":[[10004,-3219,-1201,-7036,15047,2107,-1863,2565,7736],3,0,16383],"fujifilm finepix f770exr":[[13690,-5358,-1474,-3369,11600,1998,-132,1554,4395],1,256,3900],"fujifilm finepix f900exr":[[12085,-4727,-953,-3257,11489,2002,-511,2046,4592],0,256,3900],"fujifilm finepix e550":[[11044,-3888,-1120,-7248,15168,2208,-1531,2277,8069],3,0,15875],"fujifilm is-1":[[21461,-10807,-1441,-2332,10599,1999,289,875,7703],3,0,15872],"fujifilm finepix s3pro":[[11807,-4612,-1294,-8927,16968,1988,-2120,2741,8006],3,0,15872],"fujifilm finepix s5pro":[[12300,-5110,-1304,-9117,17143,1998,-1947,2448,8100],3,0,15872],"fujifilm finepix s5600":[[9636,-2804,-988,-7442,15040,2589,-1803,2311,8621],3,0,15872],"fujifilm finepix e900":[[9183,-2526,-1078,-7461,15071,2574,-2022,2440,8639],3,0,15872],"fujifilm finepix s2pro":[[12492,-4690,-1402,-7033,15423,1647,-1507,2111,7697],3,128,4095],"fujifilm finepix s5000":[[8754,-2732,-1019,-7204,15069,2276,-1702,2334,6982],3,0,15872],"fujifilm finepix s5200":[[9636,-2804,-988,-7442,15040,2589,-1803,2311,8621],3,0,15872],"fujifilm finepix s5500":[[11940,-4431,-1255,-6766,14428,2542,-993,1165,7421],1,0,15872],"fujifilm finepix s6500fd":[[12628,-4887,-1401,-6861,14996,1962,-2198,2782,7091],3,0,15872],"fujifilm finepix s7000":[[10190,-3506,-1312,-7153,15051,2238,-2003,2399,7505],3,0,15869],"fujifilm finepix s9500":[[10491,-3423,-1145,-7385,15027,2538,-1809,2275,8692],3,0,15872],"fujifilm finepix s9000":[[10491,-3423,-1145,-7385,15027,2538,-1809,2275,8692],3,0,15872],"fujifilm finepix s9600":[[12343,-4515,-1285,-7165,14899,2435,-1895,2496,8800],3,0,15872],"fujifilm finepix s9600fd":[[12343,-4515,-1285,-7165,14899,2435,-1895,2496,8800],3,0,15872],"fujifilm finepix hs10 hs11":[[12440,-3954,-1183,-1123,9674,1708,-83,1614,4086],0,50,3900],"fujifilm finepix hs20exr":[[13690,-5358,-1474,-3369,11600,1998,-132,1554,4395],1,256,3900],"fujifilm finepix hs30exr":[[13690,-5358,-1474,-3369,11600,1998,-132,1554,4395],1,258,3900],"fujifilm finepix hs50exr":[[12085,-4727,-953,-3257,11489,2002,-511,2046,4592],0,256,3900],"fujifilm finepix x100":[[12161,-4457,-1069,-5034,12874,2400,-795,1724,6904],0,254,4e3],"fujifilm finepix x10":[[13509,-6199,-1254,-4430,12733,1865,-331,1441,5022],0,256,4e3],"fujifilm x-s1":[[13509,-6199,-1254,-4430,12733,1865,-331,1441,5022],0,260,4e3],"fujifilm gfx 50s":[[11756,-4754,-874,-3056,11045,2305,-381,1457,6006],1,65,16383],"fujifilm gfx 50r":[[11756,-4754,-874,-3056,11045,2305,-381,1457,6006],1,65,16383],"fujifilm gfx 100":[[16212,-8423,-1583,-4336,12583,1937,-195,726,6199],1,63,16383],"fujifilm x-pro1":[[10413,-3996,-993,-3721,11640,2361,-733,1540,6011],2,256,4094],"fujifilm x-pro2":[[11434,-4948,-1210,-3746,12042,1903,-666,1479,5235],1,1024,16383],"fujifilm x-pro3":[[13426,-6334,-1177,-4244,12136,2371,-580,1303,5980],2,1022,16383],"fujifilm x70":[[10450,-4329,-878,-3217,11105,2421,-752,1758,6519],1,1024,16383],"fujifilm xf1":[[13509,-6199,-1254,-4430,12733,1865,-331,1441,5022],0,257,4e3],"fujifilm xf10":[[11673,-4760,-1041,-3988,12058,2166,-771,1417,5569],1,1024,16383],"fujifilm x-e1":[[10413,-3996,-993,-3721,11640,2361,-733,1540,6011],2,255,4094],"fujifilm x20":[[11768,-4971,-1133,-4904,12927,2183,-480,1723,4605],3,257,4094],"fujifilm x30":[[12328,-5256,-1144,-4469,12927,1675,-87,1291,4351],3,257,4094],"fujifilm x100f":[[11434,-4948,-1210,-3746,12042,1903,-666,1479,5235],1,1024,16383],"fujifilm x100s":[[10592,-4262,-1008,-3514,11355,2465,-870,2025,6386],1,1024,16383],"fujifilm x100t":[[10592,-4262,-1008,-3514,11355,2465,-870,2025,6386],1,1024,16383],"fujifilm x100v":[[13426,-6334,-1177,-4244,12136,2371,-580,1303,5980],2,1022,16383],"fujifilm x-h1":[[11434,-4948,-1210,-3746,12042,1903,-666,1479,5235],1,1024,16383],"fujifilm x-m1":[[10413,-3996,-993,-3721,11640,2361,-733,1540,6011],2,256,4094],"fujifilm x-a1":[[11086,-4555,-839,-3512,11310,2517,-815,1341,5940],1,256,4094],"fujifilm x-a2":[[10763,-4560,-917,-3346,11311,2322,-475,1135,5843],1,256,4094],"fujifilm x-a3":[[12407,-5222,-1086,-2971,11116,2120,-294,1029,5284],1,1024,16383],"fujifilm x-a5":[[11673,-4760,-1041,-3988,12058,2166,-771,1417,5569],1,1024,16383],"fujifilm x-a10":[[11540,-4999,-991,-2949,10963,2278,-382,1049,5605],1,256,4094],"fujifilm xq1":[[9252,-2704,-1064,-5893,14265,1717,-1101,2341,4349],3,257,4094],"fujifilm xq2":[[9252,-2704,-1064,-5893,14265,1717,-1101,2341,4349],3,257,4094],"fujifilm x-e2":[[8458,-2451,-855,-4597,12447,2407,-1475,2482,6526],1,1024,16383],"fujifilm x-e3":[[11434,-4948,-1210,-3746,12042,1903,-666,1479,5235],1,1023,16383],"fujifilm x-e2s":[[11562,-5118,-961,-3022,11007,2311,-525,1569,6097],1,1024,16383],"fujifilm x-t1":[[8458,-2451,-855,-4597,12447,2407,-1475,2482,6526],1,1024,16383],"fujifilm x-t2":[[11434,-4948,-1210,-3746,12042,1903,-666,1479,5235],1,1024,16383],"fujifilm x-t3":[[16393,-7740,-1436,-4238,12131,2371,-633,1424,6553],2,1022,16383],"fujifilm x-t4":[[13426,-6334,-1177,-4244,12136,2371,-580,1303,5980],2,1022,16383],"fujifilm x-t10":[[8458,-2451,-855,-4597,12447,2407,-1475,2482,6526],1,1024,16383],"fujifilm x-t20":[[10592,-4262,-1008,-3514,11355,2465,-870,2025,6386],1,1024,16383],"fujifilm x-t30":[[13426,-6334,-1177,-4244,12136,2371,-580,1303,5980],2,1022,16383],"fujifilm x-t100":[[11673,-4760,-1041,-3988,12058,2166,-771,1417,5569],1,1024,16383],"fujifilm x-t200":[[15055,-7391,-1274,-4062,12071,2238,-610,1217,6147],1,1024,16383],"minolta dimage a1":[[9274,-2547,-1167,-8220,16323,1943,-2273,2720,8340],1,0,3965],"minolta dimage 5":[[8983,-2942,-963,-6556,14476,2237,-2426,2887,8014],1,0,3965],"minolta dimage 7":[[9144,-2777,-998,-6676,14556,2281,-2470,3019,7744],1,0,3965],"minolta dimage 7i":[[10880,-3638,-1186,-6496,14313,2364,-2456,3092,7485],1,0,3965],"minolta dimage 7hi":[[11368,-3894,-1242,-6521,14358,2339,-2475,3056,7285],1,0,3965],"sony dsc-f828":[[7924,-1910,-777,-8226,15459,2998,-1517,2199,6818,-7242,11401,3481],0,495,16383],"sony dsc-hx99":[[13076,-5686,-1481,-4027,12851,1251,-167,725,4937],1,800,16300],"sony dsc-r1":[[8512,-2641,-694,-8042,15670,2526,-1821,2117,7414],2,511,16383],"mamiya zd":[[7645,2579,-1363,-8689,16717,2015,-3712,5941,5961],1,0,4e3],"leaf aptus 22":[[8236,1746,-1314,-8251,15953,2428,-3673,5786,5771],1,0,16191],"leaf credo 40":[[8035,435,-962,-6001,13872,2320,-1159,3065,5434],1,0,16383],"leaf credo 60":[[8035,435,-962,-6001,13872,2320,-1159,3065,5434],1,0,16383],"leaf credo 80":[[8035,435,-962,-6001,13872,2320,-1159,3065,5434],1,0,16383],"leaf aptus-ii 5":[[1846,7955,-1222,-12994,19563,3596,-2035,3340,5136],2,0,15e3],"phase one p30":[[4516,-245,-37,-7020,14976,2173,-3206,4671,7087],2,0,16383],"phase one p65+":[[8035,435,-962,-6001,13872,2320,-1159,3065,5434],1,0,16383],"phase one iq140":[[8035,435,-962,-6001,13872,2320,-1159,3065,5434],1,0,65535],"phase one iq250":[[3984,0,0,0,1e4,0,0,0,7666],1,1024,65535],"kodak dcs pro slr/n":[[5494,2393,-232,-6427,13850,2846,-1876,3997,5445],2,0,4095],"kodak dcs pro 14n":[[7791,3128,-776,-8588,16458,2039,-2455,4006,6198],2,0,3700],"kodak dcs pro 14nx":[[5494,2393,-232,-6427,13850,2846,-1876,3997,5445],2,0,3700],"kodak dcs460":[[10592,-2206,-967,-1944,11685,230,2206,670,1273],2,7,6664],"kodak dcs520c":[[24542,-10860,-3401,-1490,11370,-297,2858,-605,3225],2,176,4095],"kodak dcs560c":[[20482,-7172,-3125,-1033,10410,-285,2542,226,3136],2,208,4095],"kodak dcs760c":[[16623,-6309,-1411,-4344,13923,323,2285,274,2926],2,0,3500],"kodak p880":[[12805,-4662,-1376,-7480,15267,2360,-1626,2194,7904],0,0,4095],"kodak easyshare z980 digital camera":[[11313,-3559,-1101,-3893,11891,2257,-1214,2398,4908],1,0,4095],"kodak easyshare z981 digital camera":[[12729,-4717,-1188,-1367,9187,2582,274,860,4411],2,0,4095],"kodak easyshare z990 digital camera":[[11749,-4048,-1309,-1867,10572,1489,-138,1449,4522],0,0,4e3],"kodak z1015 is":[[11265,-4286,-992,-4694,12343,2647,-1090,1523,5447],0,0,4095],"epson r-d1":[[6827,-1878,-732,-8429,16012,2564,-704,592,7145],1,63,4095],"epson r-d1s":[[6827,-1878,-732,-8429,16012,2564,-704,592,7145],1,62,4095],"epson r-d1x":[[6828,-1878,-732,-8429,16012,2564,-704,592,7145],1,65,4095],"hasselblad cfv-50":[[5656,-659,-346,-3923,12306,1791,-1602,3509,5442],1,256,65535],"hasselblad h3d":[[3857,452,-46,-6008,14477,1596,-2627,4481,5718],1,0,31456],"hasselblad h4d-50":[[5656,-659,-346,-3923,12306,1791,-1602,3509,5442],1,256,32767],"hasselblad h5d-40":[[6159,-1402,-177,-5439,12762,3007,-955,2200,7104],1,256,62914],"hasselblad h5d-50c":[[4932,-835,141,-4878,11868,3437,-1138,1961,7067],1,256,62914],"hasselblad x1dm2-50c":[[5002,-878,111,-4856,11929,3338,-1183,2041,7022],1,256,62914],"hasselblad x1d ii 50c":[[5002,-878,111,-4856,11929,3338,-1183,2041,7022],1,256,62914],"canon powershot a610":[[15591,-6402,-1592,-5365,13198,2168,-1300,1824,5075],1,0,1023,2672,1968],"canon powershot s3 is":[[14062,-5199,-1446,-4712,12470,2243,-1286,2028,4836],1,0,1023,2888,2136],"canon powershot a620":[[15265,-6193,-1558,-4125,12116,2010,-888,1639,5220],1,0,1023,3152,2340],"canon powershot a720 is":[[14573,-5482,-1546,-1266,9799,1468,-1040,1912,3810],3,0,1023,3336,2480],"canon powershot a630":[[14201,-5308,-1757,-6087,14472,1617,-2191,3105,5348],1,0,1023,3344,2484],"canon powershot a640":[[13124,-5329,-1390,-3602,11658,1944,-1612,2863,4885],1,0,1023,3736,2772],"canon powershot a650":[[9427,-3036,-959,-2581,10671,1911,-1039,1982,4430],1,0,1023,4104,3048],"canon powershot sx110 is":[[14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581],1,0,4095,3720,2772],"gitup git2":[[8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354],1,3200,65535,4608,3456],"gitup git2p":[[8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354],1,4160,65535,4624,3488],"paralenz dive camera":[[8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354],1,1024,16383,3840,2160],"sjcam sj6 legend":[[9489,-3814,-225,-6650,13742,3236,-627,797,7550],1,0,4095,4024,3036]};
q.xL={};q.xL.xL=function(n,F,O,I,x){if(I==null)I=3;if(x==null)x=!0;var r=n.d,_=n.v,d=1/r,w=r*_,Z=Date.now(),P=!1,C=q.xL.Xw(O,r,_,255,128),W=q.xL.Xw(O,r,_,0,128),hs=0;
if(P)console.log("extract contours",Date.now()-Z);Z=Date.now();var v=function(c1,gk){var a8=c1<<2,bX=gk<<2;
return F[a8]+F[a8+1]+F[a8+2]-(F[bX]+F[bX+1]+F[bX+2])};C.sort(v);W.sort(v);var L=q.f(w),H=q.f(w),y=[],g=new Uint32Array(r*_);
g.fill(4294967295);for(var e=0;e<w;e++)if(O[e]==0)H[e]=255;else if(O[e]==255)L[e]=255;else{g[e]=y.length;
y.push(e)}var Q=C.length,J=W.length,A=y.length;function p(c1,gk,a8,bX){var bL=c1.length,c_=new Array(bL*2);
for(var e=0;e<bL;e++){var X=c1[e],D=~~(X*bX),f=X-D*a8,iJ=X<<2;c_[e*2]=f<<16|D;c_[e*2+1]=gk[iJ]<<16|gk[iJ+1]<<8|gk[iJ+2]}return c_}var U=p(C,F,r,d),j=p(W,F,r,d),b=p(y,F,r,d);
if(P)console.log("Itemize",Date.now()-Z,"Unknown:",A,Q,J);Z=Date.now();var s=q.style.kn(L,r,_,!0),G=q.style.kn(H,r,_,!0),T=new Array(A),z=new Array(A),m=new Array(A),$=new Array(A),o=new Array(A);
if(P)console.log("Dist transform",Date.now()-Z);Z=Date.now();var h=q.xL.Gh;for(var e=0;e<A;e++){var X=y[e],D=~~(X*d),f=X-D*r,R=s[X<<1],i=s[(X<<1)+1],t=Math.sqrt(R*R+i*i),N=G[X<<1],M=G[(X<<1)+1],hK=Math.sqrt(N*N+M*M);
T[e]=1/t;z[e]=1/hK;var bD=Math.floor(q.p.GR(X*17)*Q),co=Math.floor(q.p.GR(X*19)*J);m[e]=bD;$[e]=co;o[e]=h(b[e*2],b[e*2+1],U[bD*2],U[bD*2+1],j[co*2],j[co*2+1],T[e],z[e],1e9)}var iM=[-r-1,-r,-r+1,-1,1,r-1,r,r+1];
while(Math.floor(Math.max(Q,J)*Math.pow(.5,hs))>1)hs++;for(var S=0;S<I;S++){var a=0;for(var e=0;e<A;
e++){var X=y[e],D=~~(X*d),f=X-D*r,bV=T[e],a5=z[e],i9=b[e*2],dG=b[e*2+1],ap=o[e],bD=m[e],co=$[e],gP=1;
if(D!=0&&f!=0&&f!=r-1&&D!=_-1)for(var bk=0;bk<8;bk++){var c2=g[X+iM[bk]];if(c2==4294967295)continue;
var gg=m[c2],bH=$[c2];if(gg==bD&&bH==co)continue;var gw=h(i9,dG,U[gg*2],U[gg*2+1],j[bH*2],j[bH*2+1],bV,a5,ap);
if(gw<ap){ap=gw;bD=gg;co=bH}}for(var dT=0;dT<hs;dT++){var fU=~~(Q*gP),dV=~~(J*gP);gP*=.5;var ac=q.p.GR(X+S*17+dT*31),e2=q.p.GR(X+S*29+dT*63),cX=Math.max(0,bD-fU),eR=Math.min(bD+fU,Q-1),gR=Math.max(0,co-dV),bN=Math.min(co+dV,J-1),gg=cX+~~(ac*(eR-cX)),bH=gR+~~(e2*(bN-gR)),gw=h(i9,dG,U[gg*2],U[gg*2+1],j[bH*2],j[bH*2+1],bV,a5,ap);
if(gw<ap){ap=gw;bD=gg;co=bH}}o[e]=ap;m[e]=bD;$[e]=co;a+=ap}}if(P)console.log(a);if(P)console.log("iterations",Date.now()-Z);
Z=Date.now();var eG=O.slice(0);for(var e=0;e<A;e++){var ef=q.xL.alpha(b[e*2+1],U[m[e]*2+1],j[$[e]*2+1]);
eG[y[e]]=~~(.5+255*ef)}eG=q.fs.a2t(eG,F,new gv(0,0,r,_),16,.01*.01);if(P)console.log("guided filter",Date.now()-Z);
Z=Date.now();if(x)for(var e=0;e<w;e++)if(O[e]==255||O[e]==0)eG[e]=O[e];var fi=F.slice(0);for(var e=0;
e<A;e++){var ep=y[e],bD=C[m[e]],ap=o[e],iJ=ep<<2,aT=eG[ep],dm=(aT>=250?ep:bD)<<2;fi[iJ]=F[dm];fi[iJ+1]=F[dm+1];
fi[iJ+2]=F[dm+2]}q.GF(eG,fi,3);if(P)console.log(Date.now()-Z);Z=Date.now();return fi};q.xL.Gh=function(n,F,O,I,x,r,_,d,w){var Z=n>>>16,P=n&65535,C=Z-(O>>>16),W=P-(O&65535),v=Z-(x>>>16),L=P-(x&65535),H=Math.sqrt(C*C+W*W)*_,y=Math.sqrt(v*v+L*L)*d;
if(H+y>=w)return 1e9;var g=q.xL.a19(F,I,r);return g+H+y};q.xL.a19=function(n,F,O){var I=n>>>16,x=n>>>8&255,r=n&255,_=F>>>16,d=F>>>8&255,w=F&255,Z=O>>>16,P=O>>>8&255,C=O&255,W=q.xL.alpha(n,F,O),v=I-(W*_+(1-W)*Z),L=x-(W*d+(1-W)*P),H=r-(W*w+(1-W)*C);
return Math.sqrt(v*v+L*L+H*H)};q.xL.alpha=function(n,F,O){var I=n>>>16,x=n>>>8&255,r=n&255,_=F>>>16,d=F>>>8&255,w=F&255,Z=O>>>16,P=O>>>8&255,C=O&255,W=_-Z,v=d-P,L=w-C,H=I-Z,y=x-P,g=r-C,Q=W*W+v*v+L*L,J=Q==0?.5:(H*W+y*v+g*L)/Q;
return Math.max(0,Math.min(1,J))};q.xL.aaJ=function(n){};q.xL.Xw=function(n,F,O,I,x){var r=[],_=F-1,d=O-1;
for(var w=1;w<d;w++)for(var Z=1;Z<_;Z++){var e=w*F+Z;if(n[e]==I&&(n[e-F-1]==x||n[e-F]==x||n[e-F+1]==x||(n[e-1]==x||n[e+1]==x)||(n[e+F-1]==x||n[e+F]==x||n[e+F+1]==x)))r.push(e)}return r};
q.fs={};q.fs.a8e=function(n,F,O,I,x){var r=O.d,_=O.v,d=r*_,w=q.fs.GY,Z=q.f(d*4),P;q.IW(Z,4294967295);
var C=O,W=n,v=F,L=I;q.GF(n,Z,0);P=q.to(Z,O);P=q.to(P.zc,P.rect);C=P.rect;L=I>>>2;console.log(C,L);W=q.f(C.X());
q.xg(P.zc,W,0);q.GF(F,Z,0);P=q.to(Z,O);P=q.to(P.zc,P.rect);v=q.f(C.X());q.xg(P.zc,v,0);var H=q.fs.a8j(W,v,C,L,x),y=H[0],g=H[1],Q=new gv(0,0,C.d*2,C.v*2);
y=w(y,C,Q,!0);y=w(y,Q,O,!0);g=w(g,C,Q,!0);g=w(g,Q,O,!0);var J=q.f(d);for(var e=0;e<d;e++)J[e]=Math.max(0,Math.min(255,Math.floor(.5+(y[e]*F[e]+255*g[e]))));
return J};q.fs.GY=function(n,F,O,I){var x=O.d,r=O.v,_=F.d,d=F.v,w=q.fs.Uo,Z=new Float32Array(x*r);for(var P=0;
P<d;P++){var C=(P+P)*x;for(var W=0;W<_;W++){if(!0||W==0||P==0||W==_-1||P==d-1)Z[C]=Z[C+1]=Z[C+x]=Z[C+x+1]=n[P*_+W];
else{Z[C]=w(W+.25,P+.25,n,_,d);Z[C+1]=w(W+.75,P+.25,n,_,d);Z[C+x]=w(W+.25,P+.75,n,_,d);Z[C+x+1]=w(W+.75,P+.75,n,_,d)}C+=2}}return Z};
q.fs.Uo=function(n,F,O,I,x){n-=.499999;F-=.499999;var r=Math.floor(n),_=Math.floor(F),d=_*I+r,w=n-r,Z=F-_,P=(1-Z)*(1-w),C=(1-Z)*w,W=Z*(1-w),v=Z*w;
if(O[d]==null||O[d+I+1]==null){console.log(n,F,I,x);throw"e"}return P*O[d+0]+C*O[d+1]+W*O[d+I+0]+v*O[d+I+1]};
q.fs.a8j=function(n,F,O,I,x){var r=O.d,_=O.v,d=r*_,w=q.fs.U9,Z=q.fs.f,P=q.Mo.lC,C=q.fs.gJ,F=w(F),n=w(n),W=Z(d);
P(F,W,O,I);var v=Z(d);P(n,v,O,I);var L=Z(d);C(F,F,L);P(L,L,O,I);var H=Z(d);C(F,n,H);P(H,H,O,I);var y=Z(d),g=Z(d);
for(var e=0;e<d;e++){var Q=W[e],J=v[e],A=L[e]-Q*Q,p=H[e]-Q*J,U=p/(A+x),j=J-U*Q;y[e]=U;g[e]=j}var b=Z(d);
P(y,b,O,I);var s=Z(d);P(g,s,O,I);return[b,s]};q.fs.a2t=function(n,F,O,I,x){var r=O.d,_=O.v,d=r*_,w=q.fs.GY,Z=Date.now(),P=!1,C=O,W=n,v=F,L=I;
C=new gv(0,0,r>>>2,_>>>2);L=I>>>2;W=q.fs.a14(n,r,_);v=q.fs.ahi(F,r,_);if(P)console.log(Date.now()-Z);
Z=Date.now();var H=q.fs.aiw(W,v,C,L,x),y=H[0],g=H[1],Q=H[2],J=H[3];if(P)console.log(Date.now()-Z);Z=Date.now();
var A=q.f(d);for(var p=0;p<_;p++)for(var U=0;U<r;U++){var e=p*r+U,j=(p>>>2)*(r>>>2)+(U>>>2),b=e<<2,s=y[j]*F[b]+g[j]*F[b+1]+Q[j]*F[b+2]+J[j]*255;
A[e]=Math.max(0,Math.min(255,~~(.5+s)))}if(P)console.log(Date.now()-Z);Z=Date.now();return A};q.fs.a14=function(n,F,O){var I=F>>>2,x=O>>>2,r=q.f(F*O);
for(var _=0;_<x;_++)for(var d=0;d<I;d++)r[_*I+d]=n[_*F+d<<2];return r};q.fs.ahi=function(n,F,O){var I=F>>>2,x=O>>>2,r=q.f(F*O*4);
for(var _=0;_<x;_++)for(var d=0;d<I;d++){var w=_*I+d<<2,Z=_*F+d<<4;r[w]=n[Z];r[w+1]=n[Z+1];r[w+2]=n[Z+2];
r[w+3]=n[Z+3]}return r};q.fs.aiw=function(n,F,O,I,x){var r=O.d,_=O.v,d=r*_,w=q.fs.U9,Z=q.fs.f,P=q.Mo.lC,C=q.fs.gJ,n=w(n),W=new q.zF(r*_);
q.WU(F,W);var F=[w(W.Q),w(W.l),w(W.O)],v=q.fs.amu(n,F,O,I,x),L=Z(d);P(n,L,O,I);var H=Z(d);C(F[0],n,H);
P(H,H,O,I);var y=Z(d);C(F[1],n,y);P(y,y,O,I);var g=Z(d);C(F[2],n,g);P(g,g,O,I);var Q=Z(d),J=Z(d),A=Z(d),p=Z(d);
for(var e=0;e<d;e++){var U=L[e],j=v.U_[e],b=v.QU[e],s=v.Qv[e],G=H[e]-j*U,T=y[e]-b*U,z=g[e]-s*U;Q[e]=v.a94[e]*G+v.o$[e]*T+v.yu[e]*z;
J[e]=v.o$[e]*G+v.adQ[e]*T+v.xa[e]*z;A[e]=v.yu[e]*G+v.xa[e]*T+v.a31[e]*z;p[e]=U-Q[e]*j-J[e]*b-A[e]*s}P(Q,Q,O,I);
P(J,J,O,I);P(A,A,O,I);P(p,p,O,I);return[Q,J,A,p]};q.fs.amu=function(n,F,O,I,x){var r=O.d,_=O.v,d=r*_,w=q.fs.f,Z=q.Mo.lC,P=q.fs.gJ,C={};
C.U_=w(d);Z(F[0],C.U_,O,I);C.QU=w(d);Z(F[1],C.QU,O,I);C.Qv=w(d);Z(F[2],C.Qv,O,I);var W=w(d);P(F[0],F[0],W);
Z(W,W,O,I);var v=w(d);P(F[0],F[1],v);Z(v,v,O,I);var L=w(d);P(F[0],F[2],L);Z(L,L,O,I);var H=w(d);P(F[1],F[1],H);
Z(H,H,O,I);var y=w(d);P(F[1],F[2],y);Z(y,y,O,I);var g=w(d);P(F[2],F[2],g);Z(g,g,O,I);C.a94=W;C.o$=v;
C.yu=L;C.adQ=H;C.xa=y;C.a31=g;for(var e=0;e<d;e++){var Q=C.U_[e],J=C.QU[e],A=C.Qv[e],p=W[e]-Q*Q+x,U=v[e]-Q*J,j=L[e]-Q*A,b=H[e]-J*J+x,s=y[e]-J*A,G=g[e]-A*A+x,T=b*G-s*s,z=s*j-U*G,m=U*s-b*j,$=p*G-j*j,o=j*U-p*s,h=p*b-U*U,X=T*p+z*U+m*j,D=1/X;
C.a94[e]=T*D;C.o$[e]=z*D;C.yu[e]=m*D;C.adQ[e]=$*D;C.xa[e]=o*D;C.a31[e]=h*D}return C};q.fs.f=function(n){return new Float32Array(n)};
q.fs.U9=function(n){var F=n.length,O=new Float32Array(F);for(var e=0;e<F;e++)O[e]=n[e]*(1/255);return O};
q.fs.gJ=function(n,F,O){for(var e=0;e<n.length;e++)O[e]=n[e]*F[e]};q.Xs={};q.Xs.SC=function(n,F,O,I){var x=n[F]-O[I],r=n[F+1]-O[I+1],_=n[F+2]-O[I+2];
return Math.sqrt(x*x+r*r+_*_)*(1/441.7)};q.Xs.getSelection=function(n,F,O){var I=F*O,x=q.f(I),r=!1,_=Math.round(O*.7),d=1,w=new Uint32Array(12),Z=q.f(12);
for(var P=0;P<_;P++)for(var C=0;C<F;C++){if(C<d||P<d||C>F-d-1||P>O-d-1){var e=P*F+C,W=e<<2,v=0;if(P<d)v=4;
else if(C>F-d-1)v=8;w[v]+=n[W];w[v+1]+=n[W+1];w[v+2]+=n[W+2];w[v+3]++;x[e]=255}}for(var e=0;e<12;e+=4)for(var L=0;
L<3;L++)Z[e+L]=w[e+L]/w[e+3];var H=new Float32Array(I);for(var e=0;e<I;e++){var W=e*4,y=q.Xs.SC(n,W,Z,0),g=q.Xs.SC(n,W,Z,4),Q=q.Xs.SC(n,W,Z,8),J=Math.max(y,Math.max(g,Q));
H[e]=y+g+Q-J}q.Xs.MP(H);var A=Date.now(),p=new Float32Array(I),U=[],j=q.f(I);for(var e=0;e<3;e++){q.xg(n,j,e);
var b=new Uint16Array(I);U.push(b);q.Xs.ahe(j,x,F,O,b)}if(r)console.log("MBD",Date.now()-A);A=Date.now();
for(var e=0;e<I;e++)p[e]=U[0][e]+U[1][e]+U[2][e];q.Xs.MP(p);for(var e=0;e<I;e++)p[e]+=.4*H[e];var s=F>>>1,_=O>>>1,G=1/Math.sqrt(s*s+_*_);
for(var P=0;P<O;P++)for(var C=0;C<F;C++){var T=C-s,z=P-_,m=1-Math.sqrt(T*T+z*z)*G;p[P*F+C]*=m}if(r)console.log("Centeredness",Date.now()-A);
A=Date.now();for(var e=0;e<I;e++)x[e]=p[e]*255;var $=Math.round(F/120),o=Math.round($*.8);if(r)console.log($,o);
q.Bk.xl(x,j,F,O,$,q.Bk.PD,[]);x.set(j);if(r)console.log("erosion",Date.now()-A);A=Date.now();for(var e=0;
e<I;e++)p[e]=x[e];q.Xs.MP(p);var h=q.f(256);for(var e=0;e<256;e++)h[e]=256/(1+Math.exp(-20*(e/255-.5)));
for(var e=0;e<I;e++){var X=~~(p[e]*255+.5);x[e]=h[X]}if(r)console.log("Simoid",Date.now()-A);A=Date.now();
return x};q.Xs.MP=function(n){var F=n.length,O=0;for(var e=0;e<F;e++)O=Math.max(O,n[e]);var I=1/O;for(var e=0;
e<F;e++)n[e]=n[e]*I};q.Xs.ahe=function(n,F,O,I,x){var r=O*I,_=n.slice(0),d=n.slice(0);for(var e=0;e<r;
e++)x[e]=F[e]==255?0:65535;q.Xs.Fc(n,d,_,x,O,I);q.Xs.wR(n,d,_,x,O,I);q.Xs.Fc(n,d,_,x,O,I);q.Xs.wR(n,d,_,x,O,I);
return x};q.Xs.Fc=function(n,F,O,I,x,r){for(var _=1;_<x;_++)q.Xs.AN(_,-1,n,F,O,I);for(var d=1;d<r;d++){q.Xs.AN(d*x,-x,n,F,O,I);
for(var _=1;_<x;_++){var e=d*x+_;q.Xs.AN(e,-1,n,F,O,I);q.Xs.AN(e,-x,n,F,O,I)}}};q.Xs.wR=function(n,F,O,I,x,r){for(var _=x-2;
_>=0;_--)q.Xs.AN(x*r-x+_,1,n,F,O,I);for(var d=r-2;d>=0;d--){q.Xs.AN(d*x+x-1,x,n,F,O,I);for(var _=x-2;
_>=0;_--){var e=d*x+_;q.Xs.AN(e,1,n,F,O,I);q.Xs.AN(e,x,n,F,O,I)}}};q.Xs.AN=function(e,n,F,O,I,x){var r=e+n,_=F[e],d=O[r],w=I[r];
if(d<_)d=_;else if(_<w)w=_;var Z=d-w;if(x[r]!=65535&&Z<x[e]){x[e]=Z;O[e]=d;I[e]=w}};q.FO={};q.FO.filter=function(n,F,O,I){var x=F.d,r=F.v,_=x*r,d=I[0],w=I[1],Z=I[2],P=I[3],C=I[4],W=I[5],v=I[6],L=Date.now(),H=new Float32Array(x*r*4);
q.FO.ajZ(n,x,r,H);var y=Math.ceil(d*Math.sqrt(-2*Math.log(.1))),g=new ArrayBuffer(_*4),Q=new Float32Array(g),J=new Float32Array(_),A=new Float32Array(_);
for(var e=0;e<_;e++){var p=e*4;Q[e]=H[p];J[e]=H[p+1];A[e]=H[p+2]}q.Mo.QA(Q,Q,F,y*1/2.4,2);q.Mo.QA(J,J,F,y*1/2.4,2);
q.Mo.QA(A,A,F,y*1/2.4,2);for(var e=0;e<_;e++){var p=e*4;H[p]=Q[e];H[p+1]=J[e];H[p+2]=A[e]}var U=new Uint8Array(g);
for(var e=0;e<_;e++){var p=e*4,j=e*4,Q=H[p],J=H[p+1],A=H[p+2],b=Math.sqrt((Q-A)*(Q-A)+4*J*J),s=(Q+A+b)*.5,G=(Q+A-b)*.5,T=G-A,z=J,m=T*T+z*z;
if(m!=0){var $=Math.sqrt(m),o=1/$;T*=o;z*=o}U[j]=128+127*T;U[j+1]=128+127*z}var h=1.3*w+2,X=P*(2/10),D=n.slice();
if(l.Z0){var f=new Float32Array([1/x,1/r]),R=l.Y0(0,x,r);R.set(D);var i=l.Y0(1,x,r);i.set(U);l.wu(R,F);
if(C){R.ww(F);l.filter.Yn({type:l.filter.bT,Rl:f,a8b:1/Z,aaE:X},R.Lu)}R.ww(F);l.filter.Yn({type:l.filter.cw,Wt:i.sg,Rl:f,amp:h,a2v:2},R.Lu);
if(C){R.ww(F);l.filter.Yn({type:l.filter.qc,Rl:f,a1H:new Float32Array(v),aly:W},R.Lu)}R.get(O)}else{if(C)q.FO.ox(1/Z,X,D,x,r);
q.FO.cw(D,O,U,x,r,h);if(C)q.FO.adD(x,r,O,v,W)}var t=_*4;for(var e=3;e<t;e+=4)O[e]=n[e]};q.FO.cw=function(n,F,O,I,x,r){var _=Math.ceil(2*r),d=-1/(2*r*r),w=[],Z=1;
for(var e=0;e<_+20;e++)w[e]=Math.exp(e*e*d);var P=[0,0,0,0];for(var C=0;C<x;C++){for(var W=0;W<I;W++){var v=C*I+W,L=v*4,H=1,y=n[L],g=n[L+1],Q=n[L+2],J=n[L+3],A=(O[L]-128)*(1/127),p=(O[L+1]-128)*(1/127),U=A,j=p,b=W==0?.51:.49,s=C==0?.51:.49;
for(var e=0;e<2;e++){var G=W+b,T=C+s,z=0;while(z<_){if(G<.5||I-.5<G||T<.5||x-.5<T)break;var m=~~G,$=~~T,o=$*I+m,h=o*4,X=(O[h]-128)*(1/127),D=(O[h+1]-128)*(1/127);
if(X*U+D*j<0){X=-X;D=-D}U=X;j=D;G+=Z*X;T+=Z*D;if(G<.5||I-.5<G||T<.5||x-.5<T)break;var f=~~G,R=~~T,i=R*I+f<<2;
z+=Z;var t=w[~~z];q.J.LC(G,T,n,I,x,P);y+=P[0]*t;g+=P[1]*t;Q+=P[2]*t;J+=P[3]*t;H+=t}U=-A;j=-p}var N=1/H;
F[L]=~~(.5+y*N);F[L+1]=~~(.5+g*N);F[L+2]=~~(.5+Q*N);F[L+3]=~~(.5+J*N)}}};q.FO.adD=function(n,F,O,I,x){for(var r=0;
r<F;r++)for(var _=0;_<n;_++){var d=r*n+_<<2,w=1+q.FO.ae7(_,r,O,n,F,I)*x;O[d]=Math.max(0,Math.min(255,O[d]*w));
O[d+1]=Math.max(0,Math.min(255,O[d+1]*w));O[d+2]=Math.max(0,Math.min(255,O[d+2]*w))}};q.FO.ae7=function(n,F,O,I,x,r){var _=O[(F*I+Math.max(0,n-1))*4+3],d=O[(F*I+Math.min(I-1,n+1))*4+3],w=O[(Math.max(0,F-1)*I+n)*4+3],Z=O[(Math.min(x-1,F+1)*I+n)*4+3],P=.7,C=(d-_)*(1/255),W=.7,v=(Z-w)*(1/255),L=-C*W,H=-P*v,y=P*W,g=Math.sqrt(L*L+H*H+y*y),Q=1/g,J=L*Q,A=H*Q,p=y*Q,U=r[0]*J+r[1]*A+r[2]*p;
return U};q.FO.ox=function(n,F,O,I,x){function r(d,Z,P){return Math.max(Z,Math.min(P,d))}for(var _=0;
_<x;_++)for(var d=0;d<I;d++){var w=q.FO.a8C(d+.5,_+.5,n,F);O[(_*I+d)*4+3]=Math.max(0,Math.min(255,w*255))}};
q.FO.a8C=function(n,F,O,I){function x(j,b,s){return(1-s)*j+s*b}var r=(n+613)*O,_=(F+117)*O,d=~~r,w=~~_,Z=r-d,P=_-w,C=Math.sin(11),W=Math.cos(d)*C,v=Math.cos(d+1)*C,L=Math.cos(w)*C,H=Math.cos(w+1)*C,E=q.FO.hash(W,L),y=q.FO.hash(v,L),g=q.FO.hash(W,H),Q=q.FO.hash(v,H),J=x(E,y,Z),A=x(g,Q,Z),p=x(J,A,P);
p=p<.5?0:1;var U=p+I*q.FO.hash(Math.cos(r)*C,Math.cos(_)*C);return U*(1/3)};q.FO.hash=function(n,F){var O=Math.sin(n*11.697096+F*73.32456)*12157.47691;
return O-Math.floor(O)};q.FO.ajZ=function(n,F,O,I){var x=[-1,0,1,-2,0,2,-1,0,1],r=[-1,-2,-1,0,0,0,1,2,1],_=F-1,d=O-1,w=F*4;
for(var Z=1;Z<d;Z++)for(var P=1;P<_;P++){var e=Z*F+P,C=e*4,W=q.FO.Jl(n,C,w,x),v=q.FO.Jl(n,C,w,r),L=q.FO.Jl(n,C+1,w,x),H=q.FO.Jl(n,C+1,w,r),y=q.FO.Jl(n,C+2,w,x),g=q.FO.Jl(n,C+2,w,r);
I[C]=W*W+L*L+y*y;I[C+1]=W*v+L*H+y*g;I[C+2]=v*v+H*H+g*g}q.FO.al8(I,F,O)};q.FO.Jl=function(n,F,O,I){return n[F-O-4]*I[0]+n[F-O]*I[1]+n[F-O+4]*I[2]+n[F-4]*I[3]+n[F]*I[4]+n[F+4]*I[5]+n[F+O-4]*I[6]+n[F+O]*I[7]+n[F+O+4]*I[8]};
q.FO.al8=function(n,F,O){function I(w,e,Z){var P=e*4,C=Z*4;w[C]=w[P];w[C+1]=w[P+1];w[C+2]=w[P+2]}var x=F-1,r=O-1;
I(n,F+1,0);I(n,2*F-2,F-1);for(var _=1;_<x;_++)I(n,F+_,_);for(var d=1;d<r;d++){I(n,d*F+1,d*F);I(n,d*F+F-2,d*F+F-1)}for(var _=1;
_<x;_++)I(n,(O-2)*F+_,(O-1)*F+_);I(n,(d-2)*F+1,(d-1)*F);I(n,(d-1)*F-2,d*F-1)};q._r={};q._r.PE=function(n,F,O,I){var x=n[F*2],r=n[F*2+1],_=n[O*2],d=n[O*2+1],w=n[I*2],Z=n[I*2+1];
return x*d+_*Z+w*r-w*d-_*r-x*Z};q._r.hk=function(n,F){var O=[],I=[],x=[],r={};for(var e=0;e<F.length;
e+=3){var _=~~(e*(1/3)),d=F[e+0],w=F[e+1],Z=F[e+2],P=q._r.PE(n,d,w,Z);if(P>0){var C=w;w=Z;Z=C}var W=r[Z+"-"+w],v=r[w+"-"+d],L=r[d+"-"+Z],H=[Z,W,_,null],y=[w,v,_,H],g=[d,L,_,y];
H[3]=g;if(W)W[1]=H;if(v)v[1]=y;if(L)L[1]=g;r[Z+"-"+d]=g;r[d+"-"+w]=y;r[w+"-"+Z]=H;O[d]=y;x[e]=y;O[w]=H;
x[e+1]=H;O[Z]=g;x[e+2]=g;I[_]=y}return{Nd:O,Rq:I,AD:x}};q._r.akC=function(n){var F=[],O=n.Rq;for(var e=0;
e<O.length;e++){var I=O[e];F.push(I[0]);I=I[3];F.push(I[0]);I=I[3];F.push(I[0])}return F};q._r.ahI=function(n,F,O,I){var x=n[F*2],r=n[F*2+1],_=n[O*2],d=n[O*2+1],w=n[I*2],Z=n[I*2+1],P=_-x,C=d-r,W=w-x,v=Z-r,L=P*(x+_)+C*(r+d),H=W*(x+w)+v*(r+Z),y=2*(P*(Z-d)-C*(w-_));
if(Math.abs(y)<1e-5){var g=Math.min(x,_,w),Q=Math.min(r,d,Z),J=(Math.max(x,_,w)-g)*.5,A=(Math.max(r,d,Z)-Q)*.5;
return[g+J,Q+A,J*J+A*A,1]}var p=(v*L-C*H)/y,U=(P*H-W*L)/y,J=p-x,A=U-r;return[p,U,J*J+A*A,0]};q._r.abg=function(n,F,O){var I=O[1],x=O[3],r=x[3],_=I[3],d=_[3],w=O[2],Z=I[2],P=O[0],C=I[0],W=x[0],v=_[0],L=q._r.ahI(n,C,v,W),H=n[P*2]-L[0],y=n[P*2+1]-L[1],g=H*H+y*y>L[2]&&L[3]==0&&q._r.PE(n,v,P,W)<0&&q._r.PE(n,W,C,v)<0;
if(g){O[0]=W;I[0]=v;O[3]=r;r[3]=_;_[3]=O;I[3]=d;d[3]=x;x[3]=I;x[2]=Z;_[2]=w;F.Rq[Z]=d;F.Rq[w]=r;F.Nd[C]=_;
F.Nd[P]=x}return g};q._r.a99=function(n,F,O){var I=n[F*2]-n[O*2],x=n[F*2+1]-n[O*2+1];return Math.sqrt(I*I+x*x)};
q._r.a60=function(n,F,O){var I=O[1],x=O[3],r=x[3],_,d,w=O[2],Z,P=O[0],C=r[0],W=x[0],v;if(I){_=I[3];d=_[3];
Z=I[2];v=_[0]}var L=n.length>>>1;n[2*L]=(n[2*C]+n[2*P])*.5;n[2*L+1]=(n[2*C+1]+n[2*P+1])*.5;if(!0){var H=w,y=O,g=F.Rq.length,Q=[L,null,H,y],J=[W,Q,g,r];
Q[1]=J;var A=[L,null,g,J];x[3]=Q;r[3]=A;r[2]=g;F.Rq[H]=x;F.Rq[g]=A;F.Nd[P]=x;F.Nd[W]=r;F.AD.push(Q,J,A)}if(I){var p=Z,U=I,j=g+1;
A[1]=U,U[1]=A;var b=[L,null,p,U],s=[v,b,j,d];b[1]=s;var G=[L,y,j,s];y[1]=G;_[3]=b;d[3]=G;d[2]=j;F.Rq[p]=_;
F.Rq[j]=d;F.Nd[C]=_;F.Nd[v]=d;F.AD.push(b,s,G)}F.Nd[L]=y};q._r.g0=function(n,F){var O=0;while(!0){var I=O;
for(var e=0;e<F.AD.length;e++){var x=F.AD[e];if(x[1]==null)continue;var r=q._r.abg(n,F,x);if(r){O++;
break}}if(I==O)break}return O!=0};q._r.ajj=function(n,F,O,I){var x=0;for(var e=0;e<I;e++){var r=null,_=0;
for(var d=0;d<F.AD.length;d++){var w=F.AD[d],Z=q._r.a99(n,w[0],w[3][3][0])*(w[1]?1:2);if(Z>_){r=w;_=Z}}if(_>O){q._r.a60(n,F,r);
x++}}return x!=0};q._r.ac7=function(n,F){var O=[],W=0;for(var e=0;e<n.length;e++)O.push(0);for(var e=0;
e<F.AD.length;e++){var I=F.AD[e],x=I[0],r=I[3][3][0],_=n[x*2],d=n[x*2+1],w=n[r*2],Z=n[r*2+1],P=_-w,C=d-Z;
O[x*2]+=-P;O[x*2+1]+=-C;O[r*2]+=P;O[r*2+1]+=C}for(var e=0;e<n.length;e+=2){var v=e>>>1,L=F.Nd[v],I=L,H=!0;
do{if(I[1]==null){H=!1;break}I=I[1][3]}while(I!=L);if(H){var y=.02;n[e]+=y*O[e];n[e+1]+=y*O[e+1];W+=y*(O[e]*O[e]+O[e+1]*O[e+1])}}return W};
q._r.a7h=function(n,F,O){var I=q.z.gh(n),x=q._r.hk(n,F);q._r.g0(n,x);for(var r=0;r<300;r++){var _=!1,d=!1;
_=q._r.ajj(n,x,O,5);if(_)d=q._r.g0(n,x);var w=q._r.ac7(n,x);if(!_&&!d&&w<1e-4){break}}return q._r.akC(x)};
q.vr={};q.vr.j$=function(n){var F=n.Eh,O=n.vZ,I=n.Cj,x=n.eo,r=n.FW,_=n.a_,d=n.r8,w=q.PS.Zf,Q,J,A=0;function Z(E){var a5=new Array(E);
for(var e=0;e<E;e++)a5[e]=0;return a5}var P=O.length>>>1,C=Z(F.gu*2),W=Z(F.gu),v=Z(F.gu),L=Date.now();
for(var e=0;e<n.uc.length;e++){var H=F.ahY+e,y=F.HL*(_[e*2]+d[e*2]),g=F.HL*(_[e*2+1]+d[e*2+1]);C[H*2]=y;
C[H*2+1]=g;W[H]=y;v[H]=g}F.a5B.r7(x,F.amE.Zf(C),.01,Q,J);for(var e=0;e<F.ag3.AD.length;e++){var p=F.ag3.AD[e],U=p[3][3][0],j=p[0],b=p[3][0],s=p[1]?p[1][3][0]:b;
if(p[1]&&U>j)continue;var G=O[U*2],T=O[U*2+1],z=O[j*2],m=O[j*2+1],$=x[U*2],o=x[U*2+1],h=x[j*2],X=x[j*2+1],D=x[b*2],f=x[b*2+1],R=x[s*2],i=x[s*2+1],N=[$,o,h,X,D,f];
if(p[1])N.push(R,i);var M=w(F.a1p[A],N),hK=M[0],bD=M[1],iM=1/Math.sqrt(hK*hK+bD*bD);hK*=iM;bD*=iM;var hs=z-G,S=m-T;
W[A]=hK*hs+bD*S;v[A]=-bD*hs+hK*S;A++}var a=new Array(P),bV=new Array(P);for(var e=0;e<P;e++){a[e]=r[e*2];
bV[e]=r[e*2+1]}F.adP.r7(a,F.aoT.Zf(W),.5);F.adP.r7(bV,F.aoT.Zf(v),.5);for(var e=0;e<P;e++){r[e*2]=a[e];
r[e*2+1]=bV[e]}};q.vr.a1=function(n){var F=n.vZ,O=n.Cj,I=n.uc,x=q.PS.multiply,r=Date.now(),_=q._r.hk(F,O),d=F.length>>>1,w=0,L=0,bD=1e3;
for(var e=0;e<_.AD.length;e++)w+=_.AD[e][1]?.5:1;var Z=w+I.length,P=[],C=new q.HT(Z*2,d*2),W=new q.HT(Z,d),v=[[[-1,0,1,0,0,0],[0,-1,0,1,0,0]],[[-1,0,1,0,0,0,0,0],[0,-1,0,1,0,0,0,0]]],H=[],y=[];
for(var e=0;e<_.AD.length;e++){var g=_.AD[e],Q=g[3][3][0],J=g[0],A=g[3][0],p=g[1]?g[1][3][0]:A;if(g[1]&&Q>J)continue;
var U=F[Q*2],j=F[Q*2+1],b=F[J*2],s=F[J*2+1],G=F[A*2],T=F[A*2+1],z=F[p*2],m=F[p*2+1],$=[[U,j,1,0],[j,-U,0,1],[b,s,1,0],[s,-b,0,1],[G,T,1,0],[T,-G,0,1]];
if(g[1])$.push([z,m,1,0],[m,-z,0,1]);var o=q.PS.ej($),h=x(linear.invert(x(o,$)),o);h.pop();h.pop();P.push(h);
var X=b-U,D=s-j,f=v[g[1]?1:0];f=q.PS.ba(f,x([[X,D],[D,-X]],h));var R=[Q*2,Q*2+1,J*2,J*2+1,A*2,A*2+1,p*2,p*2+1],i=g[1]?8:6,N=[];
for(var M=0;M<i;M++)N.push([R[M],f[0][M],f[1][M]]);N.sort(function(a5,i9){return a5[0]-i9[0]});for(var hK=0;
hK<2;hK++){for(var M=0;M<i;M++){H[M]=N[M][0];y[M]=N[M][1+hK]}C.ws(y,H,i)}if(Q<J)W.ws([-1,1],[Q,J],2);
else W.ws([1,-1],[J,Q],2);L++}for(var e=0;e<I.length;e++){var iM=I[e];C.ws([bD],[iM*2],1);C.ws([bD],[iM*2+1],1);
W.ws([bD],[iM],1)}var hs=C.ej(),S=hs.ea(hs),a=W.ej(),bV=a.ea(a);return{ahY:w,gu:Z,amE:hs,a5B:S,aoT:a,adP:bV,ag3:_,a1p:P,HL:bD}};
q.vr.als=function(n,F,O,I,x){var r=new gv(0,0,F,O),_=q.f(r.X());q.xg(n,_,3);q.round(_,70);var d=q.$o(_,r),w=[.1,.065,.035][I]*Math.max(d.d,d.v),Z=x+1,P=F+Z*2,C=O+Z*2,W=new gv(-Z,-Z,P,C),v=q.f(W.X());
q.k9(_,r,v,W);var L=v.slice(0);for(var H=0;H<x;H++){for(var y=1;y<C-1;y++){for(var g=1;g<P-1;g++){var e=y*P+g;
L[e]=v[e-P]|v[e-1]|v[e]|v[e+1]|v[e+P]}}var Q=L;L=v;v=Q}var J=ej.CO(v,P,C,Math.round(d.X()*5e-4)),A=ej.Y1(J),p=new cD(1,0,0,1,-Z,-Z);
for(var e=0;e<A.length;e++){var U=A[e];q.z.m(U.path.H,p,U.path.H);U.vZ=q.vr.af6(U.path);U.Cj=q.z.alg(U.vZ);
U.Cj=q._r.a7h(U.vZ,U.Cj,w)}return A};q.vr.af6=function(n){var F=[],O=n.H,I=n.s.length-1,x=0,r=0;for(var _=0;
_<I;_++){var e=_*6,d=O[e+6]-O[e+0],w=O[e+7]-O[e+1],Z=Math.ceil(Math.sqrt(d*d+w*w));for(var P=0;P<Z;P++){var C=P/Z,W=1-C,v=W*W*W*O[e+0]+3*W*W*C*O[e+2]+3*W*C*C*O[e+4]+C*C*C*O[e+6],L=W*W*W*O[e+1]+3*W*W*C*O[e+3]+3*W*C*C*O[e+5]+C*C*C*O[e+7];
F.push(v,L);x=v;r=L}}F=q.z.TH(F,1);var H=[],y=F.length;for(var e=0;e<y;e+=2){var L=F.pop(),v=F.pop();
H.push(v,L)}return H};q.vr.acu=function(n,F,O,I){function x(b,s,G,T,z){var m=z[b*2]-z[s*2],$=z[b*2+1]-z[s*2+1],o=Math.sqrt(m*m+$*$);
if(G[b].indexOf(s)==-1){G[b].push(s);T[b].push(o)}if(G[s].indexOf(b)==-1){G[s].push(b);T[s].push(o)}}var r=n.length>>>1,_=new Array(r);
if(O.length==0){_.fill(0);return _}var d=new Array(r),w=new Array(r);for(var e=0;e<r;e++){d[e]=[];w[e]=[]}for(var e=0;
e<F.length;e+=3){x(F[e],F[e+1],d,w,n);x(F[e],F[e+2],d,w,n);x(F[e+1],F[e+2],d,w,n)}var Z=new Float64Array(r*2),P=new Uint32Array(r*2);
Z.fill(1e9);var C=new Uint8Array(r);for(var W=0;W<O.length;W++){C.fill(0);var v=["---",[0,O[W]]];while(v.length!=1){var L=q.eq.akG(v),H=L[0],y=L[1];
if(C[y]==1)continue;var g=y<<1;if(H<Z[g]){Z[g+1]=Z[g];P[g+1]=P[g];Z[g]=H;P[g]=W}else if(H<Z[g+1]){Z[g+1]=H;
P[g+1]=W}C[y]=1;var Q=d[y],J=w[y];for(var e=0;e<Q.length;e++){var A=Q[e];if(C[A]!=1){q.eq.agU(v,[H+J[e],A])}}}}for(var e=0;
e<r;e++){var g=e<<1,p=Z[g],U=Z[g+1],j=1/(p+U);_[e]=(1-p*j)*I[P[g]]+(1-U*j)*I[P[g+1]]}return _};q.vr.abV=function(n){var F={s:[],H:[]},O=[n];
while(O.length!=0){var I=O.pop(),x=I.I6;if(I.anq instanceof Array||I.aiK instanceof Array){F.s.push("M","L","L","L","Z");
F.H.push(x[0],x[1],x[2],x[1],x[2],x[3],x[0],x[3])}else O.push(I.anq,I.aiK)}return F};q.vr.mH=function(n,F,O,I,x,r,_,d,w,Z){var P=Math.round(Z.length/3),C=new Array(P);
for(var e=0;e<P;e++)C[e]=e;C.sort(function(v,L){return w[Z[v*3]]-w[Z[L*3]]});for(var e=0;e<P;e++){var W=C[e]*3;
q.vr.amn(Z[W]*2,Z[W+1]*2,Z[W+2]*2,_,d,n,F,O,I,x,r)}};q.vr.amn=function(n,F,O,I,x,r,_,d,w,Z,P){var C=q.vr.MW,W=[n,F,O,1.2,1.2,1.2,0],v=[0,0,0,0],L=x[n],H=x[n+1],y=x[F],g=x[F+1],Q=x[O],J=x[O+1],A=Math.max(0,Math.min(_-1,I[n])),p=Math.max(0,Math.min(_-1,I[F])),U=Math.max(0,Math.min(_-1,I[O])),j=Math.max(0,Math.min(d-1,I[n+1])),b=Math.max(0,Math.min(d-1,I[F+1])),s=Math.max(0,Math.min(d-1,I[O+1])),G=y-L,T=g-H,z=Q-L,m=J-H,$=1/(G*m-z*T+1e-9),o=Math.max(0,Math.floor(Math.min(L,y,Q))),h=Math.min(Z,Math.ceil(Math.max(L,y,Q))),X=Math.max(0,Math.floor(Math.min(H,g,J))),D=Math.min(P,Math.ceil(Math.max(H,g,J)));
for(var f=X;f<D;f++)for(var R=o;R<h;R++){var i=R+.5-L,t=f+.5-H,N=(i*m-z*t)*$,M=(G*t-i*T)*$;if(N>=0&&M>=0&&N+M<=1){var hK=1-N-M,bD=A*hK+p*N+U*M,co=j*hK+b*N+s*M;
q.J.LC(bD,co,r,_,d,v);q.vr.a5j(v,w,f*Z+R<<2)}}};q.vr.a5j=function(n,F,O){var I=F[O],x=F[O+1],r=F[O+2],_=F[O+3],d=1-n[3]*(1/255);
F[O]=~~(.5+n[0]+I*d);F[O+1]=~~(.5+n[1]+x*d);F[O+2]=~~(.5+n[2]+r*d);F[O+3]=~~(.5+n[3]+_*d)};q.vr.MW=function(){var n=function(O,I,x,r){var _=r[0],d=r[1],w=r[2],Z=O[_+0],P=O[_+1],C=O[d+0],W=O[d+1],v=O[w+0],L=O[w+1],H=C-Z,y=W-P,g=v-Z,Q=L-P,J=I-Z,A=x-P,p=H*Q-g*y,U=1/(p+1e-9),j=(J*Q-g*A)*U,b=(H*A-J*y)*U;
if(j>=0&&b>=0&&j+b<=1){r[3]=1-j-b;r[4]=j;r[5]=b;return 1}return 0},F=function(O,I,x,r){var _=[0,0,0,0,0,0];
for(var e=0;e<I.length;e+=3){_[0]=I[e]*2;_[1]=I[e+1]*2;_[2]=I[e+2]*2;if(n(O,x,r,_)==1)return!0}return!1};
return{ahh:n,a2F:F}}();q.il={};q.il.aiR=function(n,F,O){var I=q.f(F*O*4),x=!1;q.J.dF(n,F,O,I,[O,F,0,1,0,1,0,0]);
return[q.il.rr(n,F,O,x),q.il.rr(I,O,F,x)]};q.il.m=function(n,F){var O=!1,I=n[0],x=n[1],r=I[1],_=I[2],d=I[3],w=F.d,Z=F.v;
if(_==w&&d==Z)r=r.slice(0);else if(d!=Z){var P=q.f(_*Z*4);q.il.LV(x,Z,P,O);r=q.f(_*Z*4);q.J.dF(P,Z,_,r,[_,Z,0,1,0,1,0,0]);
if(_!=w){I=q.il.rr(r,_,Z,O);r=q.f(w*Z*4);q.il.LV(I,w,r,O)}}else if(_!=w){r=q.f(w*d*4);q.il.LV(I,w,r,O)}return r};
q.il.rr=function(n,F,O,I){var x=Date.now(),r=new Uint16Array(F*O),_=1;q.il.a6r(n,F,O,r);var d=Math.ceil(F/_),w=new Uint32Array(_),Z=new Uint32Array(_),d=Math.floor(F/_);
for(var P=0;P<_;P++)Z[P]=P<_-1?d:F-(_-1)*d;for(var C=0;C<O;C++){var e=C*F;for(var P=0;P<_;P++){var d=Z[P];
for(var W=0;W<d;W++)w[P]+=r[e+W];e+=d}}if(I){console.log(Date.now()-x,"cost");x=Date.now()}var v=new Uint32Array(F),L=new Uint32Array(F),H=new Uint32Array(F*O);
for(var W=0;W<F;W++){H[(O-1)*F+W]=r[(O-1)*F+W]}for(var C=O-2;C>=0;C--){var y=C*F;for(var P=0;P<_;P++){var d=Z[P];
H[y]=r[y]+Math.min(H[y+F],H[y+F+1]);for(var W=1;W<d-1;W++){var e=y+W;H[e]=r[e]+Math.min(H[e+F-1],Math.min(H[e+F],H[e+F+1]))}y+=d-1;
H[y]=r[y]+Math.min(H[y+F-1],H[y+F]);y++}}if(I){console.log(Date.now()-x,"Building M");x=Date.now()}function g(T,z){return T<z?T:z}function Q(e,T){var z=L[e],m=H[T],$=~~(z*m*1e-4);
return $}var J=new Uint8Array(F*O),A=new Uint32Array(F);for(var e=0;e<F;e++){v[e]=e;L[e]=r[e]}for(var C=1;
C<O;C++){var p=0,y=C*F;for(var P=0;P<_;P++){var d=Z[P],e=y;A[p]=Q(p,e);var U=A[p]+Q(p+1,e+1),j=Q(p,e+1)+Q(p+1,e);
A[p+1]=g(U,j);for(var W=2;W<d;W++){var e=y+W,b=A[p+W-1]+Q(p+W-1,e-1),s=A[p+W-2]+Q(p+W-1,e-2)+Q(p+W-2,e-1);
A[p+W]=g(b,s)}var W=d-1;while(W>=2){var e=y+W,b=A[p+W-1]+Q(p+W-1,e-1),s=A[p+W-2]+Q(p+W-1,e-2)+Q(p+W-2,e-1);
if(A[p+W]==b){J[e-F]=1;W-=1}else{J[e-F]=0;J[e-F-1]=2;W-=2}}var e=y;if(W==0){J[e-F]=1}else{if(A[p+1]==U){J[e+1-F]=1;
J[e-F]=1}else{J[e+1-F]=0;J[e-F]=2}}y+=d;p+=d}q.il.aoS(C,F,J,r,v,L,!0,x)}if(I){console.log(Date.now()-x,"Matching");
x=Date.now()}var G=r;return[UZIP.adler(n,0,n.length),n,F,O,_,Z,w,v,L,J,G]};q.il.LV=function(n,F,O,I){var x=n.slice(0),r=x.shift(),_=x.shift(),d=x.shift(),w=x.shift(),Z=x.shift(),P=x.shift(),C=x.shift(),W=x.shift(),v=x.shift().slice(0),L=x.shift(),H=x.shift(),y=Date.now(),g=Math.abs(d-F),Q=Math.floor(g/Z),J=new Uint32Array(Z),p=0,U=1e9,b=0,s=0,G=0;
for(var A=0;A<Z;A++)J[A]=A<Z-1?Q:g-(Z-1)*Q;H.fill(0);for(var j=0;j<d;j++){p=Math.max(p,v[j]);U=Math.min(U,v[j])}for(var A=0;
A<Z;A++){var T=P[A],Q=J[A];for(var z=0;z<Q;z++){var m=0,$=1e9;for(var j=0;j<T;j++)if(v[s+j]<$){$=v[s+j];
m=s+j}if(F<d)v[m]=1e9;else v[m]*=1.2;if(G<d/3)b+=$;var o=W[m],h=H[o],X=h<65280?65280:h+1;if(X<65280)throw"e";
for(var D=0;D<w;D++){var e=D*d+o;H[e]=X;o+=L[e]-1}G++}s+=T}if(I){console.log(Date.now()-y,"Removing best seams");
y=Date.now()}function f(e,i){var t=e<<2,N=i<<2;O[t]=_[N];O[t+1]=_[N+1];O[t+2]=_[N+2];O[t+3]=_[N+3]}for(var D=0;
D<w;D++){var R=0,e=D*d;for(var j=0;j<F;j++,R++){if(F<d){while(H[e+R]==65280)R++;f(D*F+j,D*d+R)}else{f(D*F+j,D*d+R);
while(H[e+R]>=65280){H[e+R]--;j++;f(D*F+j,D*d+R)}}}}if(I){console.log(Date.now()-y,"Shifting image pixels");
y=Date.now()}};q.il.aoS=function(n,F,O,I,x,r){var _=0,e=n*F;while(_<F){if(O[e-F]==1){r[_]=r[_]+I[e];
_++;e++}else{var d=x[_];x[_]=x[_+1];x[_+1]=d;var w=r[_];r[_]=r[_+1]+I[e];r[_+1]=w+I[e+1];_+=2;e+=2}}};
q.il.a6r=function(n,F,O,I){function x(n,e,w){var C=e<<2,W=w<<2,v=n[C]-n[W],L=n[C+1]-n[W+1],H=n[C+2]-n[W+2];
return Math.abs(v)+Math.abs(L)+Math.abs(H)}for(var r=1;r<F;r++){var _=x(n,r,r-1);I[r-1]+=_;I[r]+=_}for(var d=1;
d<O;d++){var w=d*F,_=x(n,w,w-F);I[w]+=_;I[w-F]+=_;for(var r=1;r<F;r++){var e=d*F+r,Z=x(n,e,e-1),P=x(n,e,e-F);
I[e-F]+=P;I[e-1]+=Z;I[e]+=P+Z}}for(var d=0;d<O;d++){I[d*F]*=2;I[d*F+F-1]*=2}for(var e=0;e<I.length;e++)if(I[e]==0)I[e]=1};
q.ie=function(){var n=0,F=0,I=15,r=256;function O(P,C,W,v,L,H){var y=(L-1)*C,g=H*C;return P[g+v]-P[g+W-1]-P[y+v]+P[y+W-1]}var x=Math.round(I/8),_=[];
function d(P,C){for(var W=0;W<C.length;W++){var v=C[W],L=0,H=0,y=P[v.Td],g=y.PB,Q=y.HL,J=y.Sa;for(var A=-I;
A<=I;A++)for(var p=-I;p<=I;p++){var U=p+v.a2b,j=A+v.amC;if(p*p+A*A>I*I||U<0||j<0||U>=Q||j>=Q)continue;
var b=g[j*Q+U];L+=p*b;H+=A*b}v.Wr=Math.atan2(H,L)}}function w(P,C,W,v,L){var H=~~(P+.5),y=~~(C+.5);return O(W,v,H-x,H+x,y-x,y+x)}function Z(P,C,W,v,L){n=v;
F=L;if(_.length==0){var H=new q.p.Iu(16200817),J=8,A=0;function y(a){var G=a[0]-a[2],T=a[1]-a[3];return G*G+T*T}function g(){var a=0,bV=0;
while(a===0)a=H.get();while(bV===0)bV=H.get();return Math.sqrt(-2*Math.log(a))*Math.cos(2*Math.PI*bV)}var Q=g,p=[];
while(A!=r){var U=Math.max(-I,Math.min(I,Q()*J)),j=Math.max(-I,Math.min(I,Q()*J)),b=Math.max(-I,Math.min(I,Q()*J)),s=Math.max(-I,Math.min(I,Q()*J)),G=U-b,T=j-s,z=Math.sqrt(G*G+T*T);
if(z<3||z>12)continue;_.push(U,j,b,s);A++}}var m=20;for(var $=0;$<C.length;$++){var o=C[$],h=P[o.Td],X=h.LB,W=h.PB,v=h.HL,L=h.Sa,D=o.a2b,f=o.amC,R=o.Wr,i=Math.cos(R),t=Math.sin(R),N=new Uint8Array(r>>>3);
o.Mk=N;for(var e=0;e<r;e++){var M=e*4,U=_[M+0],j=_[M+1],b=_[M+2],s=_[M+3],hK=i*U-t*j,bD=t*U+i*j,co=i*b-t*s,iM=t*b+i*s,hs=w(D+hK,f+bD,X,v,L),S=w(D+co,f+iM,X,v,L);
N[e>>>3]|=(hs<S?0:1)<<(e&7)}}}return{a3Y:d,a4p:Z}}();q.aaS=function(){var n=0,F=0;function O(r,_,d,w,Z,P){var C=(Z-1)*_,W=P*_;
return r[W+w]-r[W+d-1]-r[C+w]+r[C+d-1]}function I(r,_,d){var w=new Uint32Array(_*d);w[0]=r[0];for(var Z=1;
Z<_;Z++)w[Z]=w[Z-1]+r[Z];for(var P=1;P<d;P++){var e=P*_;w[e]=w[e-_]+r[e];for(var Z=1;Z<_;Z++)w[e+Z]=r[e+Z]+w[e+Z-1]+w[e+Z-_]-w[e+Z-_-1]}return w}function x(r,_){var d=[[9]],w=Date.now(),Z=[];
for(var P=0;P<r.length;P++){var C=r[P],W=C.LB,v=n=C.HL,L=F=C.Sa,g=9,j=1,f=24;if(W==null)continue;var H=new Float32Array(v*L),y=new Uint8Array(v*L),Q=g>>>1,J=Q>>>1,A=Math.round(g/3);
if(A!=g/3)throw"e";var p=1/(g*g),U=1.2*(g/9);for(var b=Q+1;b<L-Q;b+=j)for(var s=Q+1;s<v-Q;s+=j){var G=O(W,v,s-J,s+J,b-Q,b+Q)-3*O(W,v,s-J,s+J,b-Q+A,b+Q-A),T=O(W,v,s-Q,s+Q,b-J,b+J)-3*O(W,v,s-Q+A,s+Q-A,b-J,b+J),z=s-Q+1,m=s+Q-1,$=b-Q+1,o=b+Q-1,h=O(W,v,z,s-1,$,b-1)+O(W,v,s+1,m,b+1,o)-O(W,v,s+1,m,$,b-1)-O(W,v,z,s-1,b+1,o),X=(T*G-.9*h*(.9*h))*(p*p);
H[b*v+s]=Math.abs(X);y[b*v+s]=X<0?0:1}var D=v*j;for(var b=f;b<L-f;b+=j)for(var s=f;s<v-f;s+=j){var e=b*v+s,R=H[e];
if(R<16)continue;if(H[e-j]>=R||H[e+j]>=R)continue;if(H[e-D-j]>=R||H[e-D]>=R||H[e-D+j]>=R)continue;if(H[e+D-j]>=R||H[e+D]>=R||H[e+D+j]>=R)continue;
Z.push({x:~~(s*C.Hg+.5),y:~~(b*C.Hg+.5),a2b:s,amC:b,Td:P,G:R,aig:y[e],Ls:U})}}if(_!=null){Z.sort(function(iM,hs){return hs.G-iM.G});
Z=Z.slice(0,_)}return Z;var i=[];for(var e=0;e<Z.length;e++){var t=!0,N=Z[e];for(var M=0;M<Z.length;
M++){var hK=Z[M];if(M!=e&&hK.G>N.G&&(hK.Td==N.Td+1||hK.Td==N.Td-1)){var bD=N.x-hK.x,co=N.y-hK.y;if(bD*bD+co*co<5){t=!1;
break}}}if(t)i.push(N)}console.log(Z.length,i.length);return i}return{agk:x}}();q.zf={};q.zf.a0G=function(n){var F=n.length,O=q.zf.CM(n,!1),x=0,r=1;
throw"e";var I=[];for(var e=0;e<F;e++)I[e]=q.zf.K5(O[e]);var _=n[0][1],d=q.zf.match(O[x],O[r],I[r]);
console.log(d.length);var w=Math.max(Math.min(d.length,40),d.length*.54);w=Math.min(w,200);var Z=d.slice(0,w),P=q.eK.abI(O[x],O[r],Z,_.d,_.v),C=q.eK.akI(P,[0,0,0],1),W=_.d/2,v=_.v/2,L=1/Math.max(W,v);
for(var e=0;e<1;e++){var H=Z[e],y=O[x][H[0]],g=O[r][H[1]],Q=q.eK.akw(C,L*(y.x-W),L*(y.y-v),L*(g.x-W),L*(g.y-v))}var J=q.eK.a33(P,_),A=[];
for(var e=0;e<2;e++){var p=J[e],U=[p[0][0],p[0][1],p[0][2],p[1][0],p[1][1],p[1][2],p[2][0],p[2][1]],j=c.V.Kb(n[e],null,U);
A.push([j.buffer,j.rect])}return[q.zf.acp(A[0],A[1],O[x],O[r],Z,P,J,_)]};q.zf.eE=function(n,F){var O=n.length,I=!1,x=Date.now(),r=q.zf.CM(n,!1,1e4);
if(I)console.log("Descriptors ready",Date.now()-x);x=Date.now();for(var e=0;e<O;e++){var _=n[e][1];for(var d=0;
d<r[e].length;d++){r[e][d].x+=_.x;r[e][d].y+=_.y}}if(I)console.log("shifted",Date.now()-x);x=Date.now();
var w=[];for(var e=0;e<O;e++)w[e]=q.zf.K5(r[e]);if(I)console.log("trees built",Date.now()-x);x=Date.now();
var Z=[];for(var e=0;e<O-1;e++)for(var d=e+1;d<O;d++){var P=q.zf.match(r[e],r[d],w[d]);if(I)console.log("Matches found",e,d,P.length);
P=P.slice(0,P.length>>>1);if(P.length<10)return null;var C=q.zf.a6F(r[e],r[d],P,2);Z.push([e,d,P,C])}Z.sort(function(s,G){return G[2].length-s[2].length});
if(I)console.log("Matches found",Date.now()-x);x=Date.now();var W=[],v=new UnionFind(O);for(var e=0;
e<Z.length;e++){var L=Z[e],H=v.find(L[0]),y=v.find(L[1]);if(H!=y){W.push(L);v.link(H,y)}}var g=[];for(var e=0;
e<O;e++)g[e]=[1,0,0,0,1,0,0,0];var Q=[0],J=new Uint8Array(O);J[Q[0]]=1;while(Q.length!=0){var y=Q.pop(),C=g[y],A=[];
for(var e=0;e<W.length;e++){var L=W[e],p=L[0],U=L[1];if(p==y&&J[U]==0){g[U]=q.J.NM(C,L[3]);Q.push(U);
J[U]=1}if(U==y&&J[p]==0){g[p]=q.J.NM(C,q.J.uZ(L[3]));Q.push(p);J[p]=1}}}if(F==null){var j=[];for(var e=0;
e<O;e++)j.push([g[e][2],e]);j.sort(function(s,G){return s[0]-G[0]});F=j[j.length>>>1][1]}var b=q.J.uZ(g[F]);
for(var e=0;e<O;e++)g[e]=q.J.NM(g[e],b);if(I)console.log("Transforms reordered",Date.now()-x);x=Date.now();
return g};q.zf.CM=function(n,F,O){var I=[],x=!1;for(var e=0;e<n.length;e++){var r=n[e][0],_=n[e][1],d=_.d,w=_.v,Z=q.f(_.X());
q.L2(r,Z);var P=Date.now(),C=q.zf.a8Q(Z,_,!0);if(x)console.log("Pyramid built ---------------",Date.now()-P);
P=Date.now();var W=q.aaS.agk(C,O);if(x)console.log("SURF Generation",Date.now()-P);P=Date.now();if(!F){q.ie.a3Y(C,W);
if(x)console.log("ORB Orientations",Date.now()-P);P=Date.now();q.ie.a4p(C,W,Z,d,w);if(x)console.log("ORB Descriptors",Date.now()-P);
P=Date.now()}I.push(W)}return I};q.zf.a8Q=function(n,F,O){function I(Z,C,W){var L=new Uint32Array(C*W);
L[0]=Z[0];for(var H=1;H<C;H++)L[H]=L[H-1]+Z[H];for(var y=1;y<W;y++){var e=y*C;L[e]=L[e-C]+Z[e];for(var H=1;
H<C;H++)L[e+H]=Z[e+H]+L[e+H-1]+L[e+H-C]-L[e+H-C-1]}return L}var x=[],r=[n,F];q.Sc(r);if(O){var _=q.gs(n,F),d=_.rect,w=[_.zc,d];
q.Sc(w)}for(var e=0;e<r.length;e++){var Z=r[2*e],P=r[2*e+1],C=P.d,W=P.v,v=Math.min(C,W);if(v<30)break;
if(v<1600)x.push({PB:Z,HL:C,Sa:W,Hg:1<<e,LB:I(Z,C,W)});if(!O)continue;var Z=w[2*e],P=w[2*e+1],C=P.d,W=P.v,v=Math.min(C,W);
if(v<30)break;if(v<1600)x.push({PB:Z,HL:C,Sa:W,Hg:(1<<e)*3/2,LB:I(Z,C,W)})}return x};q.zf.a6F=function(n,F,O,I){var x=Date.now(),r,_=0,d=0,w=O.length,Z=new Float64Array(2);
for(var P=0;P<3e3;P++){var C=~~(Math.random()*w),W=~~(Math.random()*w),v=~~(Math.random()*w),L=~~(Math.random()*w),$=0,o=0;
if(C==W||C==v||C==L||W==v||W==L||v==L)continue;var H=O[C],y=O[W],g=O[v],Q=O[L],J=n[H[0]],A=F[H[1]],p=n[y[0]],U=F[y[1]],j=n[g[0]],b=F[g[1]],s=n[Q[0]],G=F[Q[1]],T=[J.x,J.y,p.x,p.y,j.x,j.y,s.x,s.y],z=[A.x,A.y,U.x,U.y,b.x,b.y,G.x,G.y],m=q.J.D3(T,z);
if(m[0]==0&&m[1]==0&&m[3]==0&&m[4]==0)continue;var h=w-_+2;for(var e=0;e<w&&e-$<h;e++){var X=n[O[e][0]],D=F[O[e][1]];
q.J.fb(D.x,D.y,m,Z);var f=Z[0]-X.x,R=Z[1]-X.y,i=f*f+R*R;if(i<I){$++;o+=i}}if($>_||$==_&&o<d){r=m;_=$;
d=o}}return r};var cP=new Uint8Array(256);for(var e=0;e<256;e++){var db=0,E=e;while(E!=0){E=E&E-1;db++}cP[e]=db}q.zf.a4G=function(n,F,O){var I=0,x=n.length;
for(var e=0;e<x&&I<O;e++)I+=cP[n[e]^F[e]];return I};q.zf.agz=function(n,F,O,top,I){if(I[O]==1)return;
var x=q.zf.a4G(n.Mk,F.Mk,top[0]);if(x<top[0]){if(x<top[2]){top[0]=top[2];top[1]=top[3];top[2]=x;top[3]=O}else{top[0]=x;
top[1]=O}}I[O]=1};q.zf.K5=function(n){var F=[],O=[],I=[[],[]],x=4;for(var e=0;e<n.length;e++)(n[e].aig==0?F:O).push(e);
for(var r=0;r<2;r++){var _=new Array(x),d=[],w=r==0?F:O,Z=w.length/256,P=[];for(var C=0;C<32;C++){var W=new Array(256),H=0;
for(var v=0;v<256;v++)W[v]=[];for(var v=0;v<w.length;v++){var L=w[v];W[n[L].Mk[C]].push(L)}for(var v=0;
v<256;v++)H+=Math.abs(W[v].length-Z);P.push([H,C,W])}P.sort(function(y,g){return y[0]-g[0]});var d=[],_=[];
I[r]=[d,_];for(var e=0;e<x;e++){d.push(P[e][1]);_.push(P[e][2])}}return I};q.zf.match=function(n,F,O){var I=[],x=new Uint16Array(F.length);
x.fill(65535);var r=new Uint8Array(F.length),top=new Uint32Array(4),_=[];for(var d=0;d<n.length;d++){var w=n[d],Z=w.Mk;
top.fill(1e6);r.fill(0);var P=O[w.aig];for(var C=0;C<P[1].length;C++){var W=P[1][C][Z[P[0][C]]];for(var v=0;
v<W.length;v++){var L=W[v];q.zf.agz(w,F[L],L,top,r)}}if(top[2]<50&&top[2]<top[0]*.5){var H=x[top[3]];
if(H==65535){x[top[3]]=I.length;I.push([d,top[3],top[2]])}else if(top[2]<I[H][2]){I[H]=[d,top[3],top[2]]}}}I.sort(function(y,g){return y[2]-g[2]});
return I};q.zf.a2O=function(n){var F=new gv;for(var e=0;e<n.length;e++)F=F.Tq(n[e][1]);var O=q.f(F.X()*4);
for(var e=0;e<n.length;e++)q.p.F_("norm",n[e][0],n[e][1],O,F,F,1);return[O,F]};q.zf.acp=function(n,F,O,I,x,r,_,d){var w=n[1].clone(),Z=w.clone();
w.x=w.y=0;var P=F[1].clone(),C=P.clone();P.x=P.y=0;P.x=w.d;var W=w.Tq(P),v=C.y-Z.y,L=q.f(W.X()*4);q.nF(n[0],w,L,W);
q.nF(F[0],new gv(P.x,P.y+v,P.d,P.v),L,W);var H=document.createElement("canvas");H.width=W.d;H.height=W.v;
var y=H.getContext("2d");y.lineWidth=.5;y.putImageData(new ImageData(new Uint8ClampedArray(L.buffer),W.d,W.v),0,0);
if(r){var g=r[0],Q=q.PS.ej(g),J=w.d,A=d.d;for(var e=0;e<x.length;e++){var p=x[e],n=O[p[0]],F=I[p[1]];
y.strokeStyle="#"+"ff0000";y.beginPath();var U=q.eK.adm(Q,_[0],F,0,A),j=q.eK.adm(g,_[1],n,0,A);y.moveTo(-Z.x+U[0],-Z.y+U[1]);
y.lineTo(-Z.x+U[2],-Z.y+U[3]);y.moveTo(J-C.x+j[0],-C.y+v+j[1]);y.lineTo(J-C.x+j[2],-C.y+v+j[3]);y.stroke()}}if(x){var b=x.length;
for(var e=0;e<b;e++){var p=x[e],n=O[p[0]],F=I[p[1]];y.strokeStyle="#"+"ffff00"}}var T=new Uint8Array(y.getImageData(0,0,W.d,W.v).data.buffer);
if(!1){for(var z=0;z<2;z++){var m=z==0?O:I,$=z*w.d;for(var e=0;e<m.length;e++){var o=m[e],h=~~o.x,X=~~o.y,D=(X*W.d+h+$)*4;
T[D+1]=T[D+2]=o.a97*60;T[D+0]=0;T[D+3]=255}}}return[T,W]};q.stack={};q.stack.stack=function(n,F,O){var I=n.length,x=F.length;
if(I==1){F.set(n[0]);return}if(O=="avrg"||O=="stdv"||O=="summ"||O=="vari"){var r=1/I;for(var e=0;e<x;
e++){var _=0;for(var d=0;d<I;d++)_+=n[d][e];var w=~~(_*r+.5);if(O=="avrg"||(e&3)==3)F[e]=w;else if(O=="summ")F[e]=255*Math.pow(Math.min(255,_)*(1/255),1/2.4);
else{var Z=0;for(var d=0;d<I;d++){var P=n[d][e]-w;Z+=P*P}var C=Math.sqrt(Z*r)*(1/255);if(O=="stdv")F[e]=255*Math.pow(C,1/2.4);
else F[e]=255*Math.pow(C*C,1/2.4)}}}else if(O=="maxx"){for(var e=0;e<x;e++){var W=0;for(var d=0;d<I;
d++)W=Math.max(W,n[d][e]);F[e]=W}}else if(O=="minn"){for(var e=0;e<x;e++){var W=255;for(var d=0;d<I;
d++)W=Math.min(W,n[d][e]);F[e]=W}}else if(O=="medn"||O=="rang"){var v=function(g,Q){return g-Q},L=new Array(I),H=0,y=0;
if(I%1==0){y=I>>>1;H=y-1}else{H=y=I>>>1}for(var e=0;e<x;e++){for(var d=0;d<I;d++)L[d]=n[d][e];L.sort(v);
if(O=="medn")F[e]=L[H]+L[y]>>>1;else F[e]=(e&3)==3?L[I-1]:L[I-1]-L[0]}}else console.log(O)};q.yN={};
q.yN.abb=function(n,F,O,I,x){var r=q.yN.hG(n.buffer,F,O).fJ,_=Date.now(),d=new Uint32Array(r.length);
for(var e=0;e<r.length;e++)d[e]=r[e].Pr;var w=UPNG.quantize.getKDtree(new Uint8Array(d.buffer),I),Z=[F,1,-F,-1,F+1,-F+1,-F-1,F-1,F+F,2,-F-F,-2,F+F-1,F+F+1,F+2,-F+2,-F-F+1,-F-F-1,-F-2,F-2,F+F+2,-F-F+2-F-F-2,F+F-2],P=new Uint8Array(F*O),C=n;
for(var W=0;W<O;W++)for(var v=0;v<F;v++){var e=W*F+v<<2,L=C[e]*(1/255),H=C[e+1]*(1/255),y=C[e+2]*(1/255),g=C[e+3]*(1/255),Q=q.yN.YO(w,L,H,y,g,x);
if(Q==null){var J=[],A=0;while(A<20){var p=W*F+v+Z[A]<<2,U=C[p]*(1/255),j=C[p+1]*(1/255),b=C[p+2]*(1/255),s=C[p+3]*(1/255),G=q.yN.YO(w,U,j,b,s,.005);
if(G!=null){if(J.indexOf(G)==-1){J.push(G);G.If=1}else G.If++}A++}J.sort(function(g,y){return y.If-g.If});
while(J.length!=0&&J[J.length-1].If<3)J.pop();if(J.length==0)Q=q.yN.YO(w,L,H,y,g,100);else if(J.length==1)Q=J[0];
else if(J.length==2){var T=J[0],z=J[1],m=T.est.q,$=z.est.q,o=$[0]-m[0],h=$[1]-m[1],X=$[2]-m[2],D=$[3]-m[3],f=L-m[0],R=H-m[1],i=y-m[2],t=g-m[3],N=o*o+h*h+X*X+D*D,M=f*f+R*R+i*i+t*t,hK=(f*o+R*h+i*X+t*D)/N,bD=M-hK*hK*N;
if(bD<.5)Q=hK<.5?T:z;else{Q=q.yN.YO(w,L,H,y,g,100)}}else{var T=J[0],z=J[1],co=J[2],m=T.est.q,$=z.est.q,iM=co.est.q,hs=m[0]-iM[0],S=m[1]-iM[1],a=m[2]-iM[2],bV=m[3]-iM[3],a5=$[0]-iM[0],i9=$[1]-iM[1],dG=$[2]-iM[2],ap=$[3]-iM[3],bk=iM[0]-L,c2=iM[1]-H,gg=iM[2]-y,bH=iM[3]-g,gw=hs*hs+S*S+a*a+bV*bV,gP=hs*a5+S*i9+a*dG+bV*ap,dT=bk*hs+c2*S+gg*a+bH*bV,fU=hs*a5+S*i9+a*dG+bV*ap,dV=a5*a5+i9*i9+dG*dG+ap*ap,ac=bk*a5+c2*i9+gg*dG+bH*ap,e2=1/(gP*fU-gw*dV),hK=(dV*dT-ac*gP)*e2,cX=(ac*gw-dT*fU)*e2,eR=1-hK-cX,gR=Math.max(hK,cX,eR);
if(gR==hK)Q=T;else if(gR==cX)Q=z;else Q=co}}P[e>>2]=Q.ind}return{Cj:P,fJ:w[1]}};q.yN.hG=function(n,F,O){var I=[],x={},r=F-1,_=O-1,d=0,w=new Uint32Array(n),Z=[-F-1,-F,-F+1,-1,1,F-1,F,F+1,F+F,2,-F-F,-2,F+F-1,F+F+1,F+2,-F+2,-F-F+1,-F-F-1,-F-2,F-2,F+F+2,-F-F+2-F-F-2,F+F-2];
for(var P=1;P<_;P++)for(var C=1;C<r;C++){var W=P*F+C,v=w[W],L=!0;for(var e=0;e<8;e++)L=L&&w[W+Z[e]]==v;
if(L){d++;var H=x[v];if(H==null){x[v]=I.length;I.push({Pr:v,CU:1})}else I[H].CU++}}return{fJ:I,a4g:d}};
q.yN.YO=function(n,F,O,I,x,r){var _=UPNG.quantize.getNearest(n[0],F,O,I,x);return q.yN.adt(_,F,O,I,x)<r?_:null};
q.yN.adt=function(n,F,O,I,x){var r=n.est.q,_=F-r[0],d=O-r[1],w=I-r[2],Z=x-r[3];return _*_+d*d+w*w+Z*Z};
q.yN.a9M=function(n,F,O,I){var x=q.yN.alr(n,F,O,I),r=x.Cj,_=x.fJ,d=x.a9R,w=UPNG.quantize.getKDtree(new Uint8Array(d.buffer.slice(0)),200),Z=[];
for(var e=0;e<_.length;e++){var P=_[e].L1,C=P[0],W=P[1],v=P[2],L=P[3];if(Math.min(C,W,v,L)<0)throw"e";
var H=UPNG.quantize.getNearest(w[0],C/255,W/255,v/255,L/255);Z.push(w[1].indexOf(H))}for(var e=0;e<F*O;
e++)r[e]=Z[r[e]];return{Cj:r,fJ:w[1]}};q.yN.alr=function(n,F,O,I){var x=F*O,r=2*x,_=q.yN.a8E(n,F,O),d=65535+1,w=new Uint32Array(d),P=0;
for(var e=0;e<r;e++)w[_[e]]++;var Z=new Uint32Array(d);for(var e=0;e<d;e++){Z[e]=P;P+=w[e]}var C=new Uint32Array(r);
for(var e=0;e<r;e++){var W=_[e];C[Z[W]]=e;Z[W]++}var v=new UnionFind(x),L=new Uint16Array(x),H=new Uint32Array(x);
for(var e=0;e<x;e++)H[e]=1;var y=x,g=1e5/(I*10);for(var Q=0;Q<r;Q++){var J=C[Q],A=_[J];if(A==65535)continue;
var e=J>>1,p=e+((J&1)==0?1:F),U=v.find(e),j=v.find(p),b=Math.min(L[U]+g/Math.sqrt(H[U]),L[j]+g/Math.sqrt(H[j]));
if(U!=j&&A<=b){v.link(e,p);y--;var s=v.find(e);H[s]=H[U]+H[j];L[s]=A}}var G=[],T={},z=new Uint16Array(x);
for(var e=0;e<x;e++){var s=v.find(e),m=T[s];if(m==null){T[s]=m=G.length;G.push({CU:0,L1:[0,0,0,0]})}G[m].CU++;
for(var p=0;p<4;p++)G[m].L1[p]+=n[(e<<2)+p];z[e]=m}var $=new Uint32Array(G.length);for(var e=0;e<G.length;
e++){var m=G[e];for(var p=0;p<4;p++)m.L1[p]=Math.round(m.L1[p]/m.CU);$[e]=m.L1[3]<<24|m.L1[2]<<16|m.L1[1]<<8|m.L1[0]}return{Cj:z,fJ:G,a9R:$}};
q.yN.a8E=function(n,F,O){var I=new Uint16Array(F*O*2);for(var x=0;x<O;x++)for(var r=0;r<F;r++){var e=x*F+r;
I[e+e]=r<F-1?q.yN.oW(n,e,e+1):65535;I[e+e+1]=x<O-1?q.yN.oW(n,e,e+F):65535}return I};q.yN.oW=function(n,e,F){var O=e<<2,I=F<<2,x=n[O],r=n[O+1],_=n[O+2],d=n[O+3],w=n[I],Z=n[I+1],P=n[I+2],C=n[I+3],W=x-w,v=r-Z,L=_-P,H=d-C;
return W*W+v*v+L*L+H*H>>2};q.yN.qv=function(){function n(g,Q,J,A,p,U){var j=[],b=U,s=U,G=U>>>2;for(var T=0;
T<p;T++)for(var z=0;z<A;z++){var m=~~((z+.5)*b),$=~~((T+.5)*s),o=1e9,h=Math.max(0,m-G),X=Math.min(Q,m+G+1),D=Math.max(0,$-G),f=Math.min(J,$+G+1);
for(var R=D;R<f;R++)for(var i=h;i<X;i++){var t=F(g,Q,i,R);if(t<o){m=i;$=R;o=t}}var N=($*Q+m)*4;j.push(m,$)}return j}function F(g,Q,J,A){var p=(A*Q+J)*4,U=Q*4,j=O(g,p-4,p)+O(g,p,p+4),b=O(g,p-U,p)+O(g,p,p+U);
return j+b}function O(g,Q,J){var A=g[Q]-g[J],p=g[Q+1]-g[J+1],U=g[Q+2]-g[J+2];return A*A+p*p+U*U}var I=0,x=0;
function r(g,Q,J,A){x++;if(A<I)I=A;g[A].push(Q,J)}function _(g){x--;while(g[I].length==0)I++}function d(g,Q,J){I=0;
x=0;var A=Q*J,p=Math.round(Math.min(Q,J)/50),$=0,o=16;if(p==0)p=1;var U=30/p,j=Math.floor(Q/p),b=Math.floor(J/p),s=new Uint16Array(A);
for(var e=0;e<A;e++)s[e]=65535;var G=n(g,Q,J,j,b,p),T=G.length>>>1;if(T>65535)throw T;var z=[];for(var e=0;
e<1e3+J;e++)z.push([]);var m=[0,1,0,-1,-1,0,1,0],h=Math.min(b,5),X=new Uint32Array(T*6);for(var D=0;
D<b;D+=h){var f=Math.min(D+h+1,b);for(var R=D;R<f;R++)for(var i=0;i<j;i++){var e=R*j+i,t=e*2,N=G[t+1]<<16|G[t];
r(z,N,e,G[t+1]>>>o)}var M=Math.min(J,f*p);if(D+h>=b)M=J;while(x!=0){_(z);var hK=z[I].pop(),bD=z[I].pop(),co=bD>>>16,iM=bD&65535,e=co*Q+iM;
if(s[e]==65535){var hs=hK*6,S=e<<2;s[e]=hK;X[hs]+=g[S];X[hs+1]+=g[S+1];X[hs+2]+=g[S+2];X[hs+3]+=iM;X[hs+4]+=co;
X[hs+5]++;var a=co>>>o;if(co!=M-1&&s[e+Q]==65535)r(z,co+1<<16|iM,hK,w(g,Q,U,iM,co+1,X,hs)+a);if(co!=0&&s[e-Q]==65535)r(z,co-1<<16|iM,hK,w(g,Q,U,iM,co-1,X,hs)+a);
if(iM!=0&&s[e-1]==65535)r(z,co<<16|iM-1,hK,w(g,Q,U,iM-1,co,X,hs)+a);if(iM!=Q-1&&s[e+1]==65535)r(z,co<<16|iM+1,hK,w(g,Q,U,iM+1,co,X,hs)+a)}}if(M!=co){var bV=(D+h)*j;
X.fill(0,bV*6,(bV+j)*6);for(var co=(D+h-2)*p;co<M;co++)for(var iM=0;iM<Q;iM++){var e=co*Q+iM;if(s[e]>=bV){s[e]=65535}}}}return{Cj:s,UA:T,x$:X}}q.yN.JL=function(g,Q,J,A,p){var U=g.UA,j=Q*J,b=g.x$,s=g.Cj,G=v(A,s,U,j),T=new UnionFind(U),X=0;
for(var z=1;z<J;z++)for(var m=1;m<Q;m++){var e=z*Q+m,$=s[e],o=0;if((o=s[e-1])!=$&&G[o]==G[$]&&Z(b,0,$*6,o*6)<p)T.link($,o);
if((o=s[e-Q])!=$&&G[o]==G[$]&&Z(b,0,$*6,o*6)<p)T.link($,o)}var h=new Uint16Array(U);h.fill(65535);var D=new Uint16Array(U);
for(var e=0;e<U;e++){var f=T.find(e);if(h[f]==65535)h[f]=X++;D[e]=h[f]}var R=new Uint16Array(j);for(var e=0;
e<j;e++)R[e]=D[s[e]];return{Cj:R,UA:X}};q.yN.abl=function(g,Q,J,A){var p=q.f(J),U=Q.length,j=0;for(var e=0;
e<U&&j!=3;e++){var b=A[e];if(b==0||b==255){var s=Q[e],G=2-(b>>>7);p[s]=j=p[s]|G}}return j!=3};function w(g,Q,J,A,p,U,j){var b=(p*Q+A)*4,s=U[j+5],G=1/s,T=g[b]*s-U[j],z=g[b+1]*s-U[j+1],m=g[b+2]*s-U[j+2],$=A*s-U[j+3],o=p*s-U[j+4],h=Math.sqrt(T*T+z*z+m*m),X=Math.sqrt($*$+o*o);
return~~((h+J*X)*G+.5)}function Z(g,Q,J,A){var p=1/g[J+5],U=1/g[A+5],j=g[J]*p-g[A]*U,b=g[J+1]*p-g[A+1]*U,s=g[J+2]*p-g[A+2]*U,G=g[J+3]*p-g[A+3]*U,T=g[J+4]*p-g[A+4]*U,z=Math.sqrt(j*j+b*b+s*s),m=Math.sqrt(G*G+T*T);
return~~(z+Q*m+.5)}function P(g,Q,J){var A=q.B5(g,new gv(0,0,Q,J)),p=A.rect.d,U=A.rect.v,j=d(A.zc,p,U),b=j.Cj,s=Date.now(),G=new Uint16Array(Q*J);
G.fill(65535);for(var T=0;T<U;T++){for(var z=0;z<p;z++){var m=T*p+z,e=(T<<1)*Q+(z<<1),$=b[m];if(b[m-p]!=$||b[m-1]!=$||b[m+1]!=$||b[m+p]!=$)$=65535;
G[e]=$;G[e+1]=$;G[e+Q]=$;G[e+Q+1]=$}}j.Cj=G;return j}function C(g,Q){var e=0,J=g.length;while(e!=J&&g[e]!=Q)e+=2;
return e==J?-1:e}function W(g,e){if(e==g.length-2){g.pop();g.pop()}else{g[e+1]=g.pop();g[e]=g.pop()}}q.yN.agV=function(g,Q,J,A,p){var U=new Uint32Array(p*4400),F=[];
for(var e=0;e<p;e++)F.push([]);for(var j=0;j<J;j++)for(var b=0;b<Q;b++){var e=j*Q+b,s=e<<2,G=A[e],T=0,z=g[s]>>>4,m=g[s+1]>>>4,$=g[s+2]>>>4;
U[G*4400+(z<<8|m<<4|$)]++;U[G*4400+4096]++;U[G*4400+4100+(z<<4|m)]++;U[G*4400+4360+z]++;if(b!=0&&(T=A[e-1])!=G&&C(F[G],T)==-1){F[G].push(T,0);
F[T].push(G,0)}if(j!=0&&(T=A[e-Q])!=G&&C(F[G],T)==-1){F[G].push(T,0);F[T].push(G,0)}}for(var e=0;e<p;
e++){var $=F[e];for(var o=0;o<$.length;o+=2)$[o+1]=y(U,e,$[o])}return[U,F]};function v(g,Q,J,A){var p=q.f(J);
for(var e=0;e<A;e++){var U=g[e];if(U==0||U==255)p[Q[e]]=2-(U>>>7)}return p}q.yN.a7N=function(g,Q,J,A,p,U,j){var b=Q*J,s=j[0],F=j[1],G=new UnionFind(A),T=v(p,g,A,b),z=-1,m=!0,$=0;
for(var e=0;e<A;e++)if(T[e]==1){if(z==-1)z=e;else G.link(e,z)}if(z==-1){for(var e=0;e<b;e++)U[e]=p[e]==255?255:0;
return}while(m){while(m){m=!1;for(var e=0;e<A;e++){if(T[e]==0){var o=L(F[e]);if(T[o]==1){T[e]=T[o];m=!0;
G.link(e,o)}}}}m=!0;$=0;while(m){m=!1;for(var e=0;e<A;e++){if(T[e]==0){var o=L(F[e]);if(T[o]==0){var h=e*4400,X=o*4400;
for(var D=0;D<4400;D+=2){s[h+D]+=s[X+D];s[h+D+1]+=s[X+D+1]}H(F,s,e,o);$++;T[o]=3;m=!0;G.link(e,o)}}}}m=$!=0}var f=G.find(z);
for(var e=0;e<A;e++)T[e]=G.find(e)==f?255:0;for(var e=0;e<b;e++){U[e]=T[g[e]]}for(var e=0;e<b;e++){var o=p[e];
if(o==0||o==255)U[e]=o}};function L(g){var Q=0,J=0,A=g.length;for(var p=0;p<A;p+=2){var U=g[p+1];if(U>J){J=U;
Q=p}}return g[Q]}function H(F,g,Q,J){var A=F[Q],p=F[J];W(A,C(A,J));W(p,C(p,Q));for(var e=0;e<p.length;
e+=2){var U=p[e],j=F[U];W(j,C(j,J));if(C(j,Q)==-1){j.push(Q,0);A.push(U,0)}}for(var e=0;e<A.length;e+=2){var U=A[e],j=F[U],b=y(g,Q,U);
A[e+1]=b;j[C(j,Q)+1]=b}}function y(g,Q,J){var A=0,p=4096,U=Q*4400,j=J*4400;for(var b=0;b<16;b++){if(g[U+4360+b]==0||g[j+4360+b]==0)continue;
for(var s=0;s<16;s++){var G=b<<4|s;if(g[U+4100+G]==0||g[j+4100+G]==0)continue;var T=U+(G<<4),z=j+(G<<4);
for(var e=0;e<16;e++)A+=Math.sqrt(g[T+e]*g[z+e])}}var m=A/Math.sqrt(g[U+p]*g[j+p]);return~~(999.99999*m)}return d}();
var ej=function(){function n(){this.X=0;this.GM=0;this.$U={};this.lK=[];this.an=1e5;this.M4=1e5;this.k8=-1;
this.J1=-1;this.color=0}function F(E){this.PW=E;this.qm=new Array(E);this.Pr=new Array(E*6);this.a2Z=0;
this.AW=new Array(E*2);this.alpha=new Array(E);this.Vz=new Array(E);this.FH=new Array(E)}function O(x,r,_,d){function w(y,g,x,r){return x[r*g+y]}function Z(e){var j=x.length;
while(e<j&&x[e]==0)e++;return e<j?e:-1}function P(y,g,j){for(var e=2;e<5;e++){var b=0;for(var s=-e+1;
s<=e-1;s++){b+=w(y+s,g+e-1,x,r)==j?1:-1;b+=w(y+e-1,g+s-1,x,r)==j?1:-1;b+=w(y+s-1,g-e,x,r)==j?1:-1;b+=w(y-e,g+s,x,r)==j?1:-1}if(b>0)return 1;
else if(b<0)return 0}return 0}function C(j,L){var H=new n,y=j,g=L,b=0,s=1,G;H.color=x[L*r+j];H.sign=w(j,L,x,r)==H.color?"+":"-";
while(1){H.lK.push(y,g);if(y>H.k8)H.k8=y;if(y<H.an)H.an=y;if(g>H.J1)H.J1=g;if(g<H.M4)H.M4=g;H.GM++;y+=b;
g+=s;H.X-=y*s;if(y==j&&g==L)break;var T=w(y+(b+s-1>>1),g+(s-b-1>>1),x,r)==H.color,z=w(y+(b-s-1>>1),g+(s+b-1>>1),x,r)==H.color;
if(z&&!T){if(d.ex=="right"||d.ex=="black"&&H.sign=="+"||d.ex=="white"&&H.sign=="-"||d.ex=="majority"&&P(y,g,H.color)||d.ex=="minority"&&!P(y,g,H.color)){G=b;
b=-s;s=G}else{G=b;b=s;s=-G}}else if(z){G=b;b=-s;s=G}else if(!T){G=b;b=s;s=-G}}return H}var W=0,v=[];
while(!0){var W=Z(W);if(W==-1)break;var L=Math.floor(W/r),H=C(W-L*r,L);for(var e=0;e<H.lK.length-2;e+=2){var y=H.lK[e],g=H.lK[e+1],Q=g*r+y;
if(y==H.lK[e+2]&&g+1==H.lK[e+3]&&x[Q]!=0)ej.fill(Q,x,r,0)}if(H.X>d.a0Y)v.push(H)}for(var e=0;e<v.length;
e++)v[e].parent=-1;var J=Date.now();for(var e=1;e<v.length;e++){var A=v[e];for(var p=e-1;p>=0;p--){var U=v[p];
if(A.an<U.an||A.k8>U.k8||A.M4<U.M4||A.J1>U.J1)continue;if(!ej.a3F(U.lK,A.lK[0]+.5,A.lK[1]+.5))continue;
A.parent=p;break}}return v}function I(x,r){function _(b,s,G,T,z){this.x=b;this.y=s;this.bZ=G;this.BY=T;
this.Ye=z}function d(b,E){return(E+b)%E}function w(b,s,G,T){return b*T-G*s}function Z(b,s,G,T){return b*G+s*T}function P(b,s,G){if(b<=G)return b<=s&&s<G;
else return b<=s||s<G}function C(b,s,G){var T=0;T+=s*b[0]*s;T+=s*b[1]*G;T+=s*b[2];T+=G*b[3]*s;T+=G*b[4]*G;
T+=G*b[5];T+=b[6]*s;T+=b[7]*G;T+=b[8];return T}function W(b,s,G){return s+b*(G-s)}function v(b,s,G,T){var z=Math.sign(G-b),m=-Math.sign(T-s);
return z*(G-b)-m*(T-s)}function L(b,s){return Math.sqrt(b*b+s*s)}function H(b,s,G,T,z){var m=1-b;return m*m*m*s+3*(m*m*b)*G+3*(b*b*m)*T+b*b*b*z}function y(b,s,G,T,z,m,$,o){var h=w(b,s,$,o),X=w(G,T,$,o),D=w(z,m,$,o),f=h-2*X+D,R=-2*h+2*X,i=h,t=R*R-4*f*i;
if(f==0||t<0)return-1;var N=Math.sqrt(t),M=(-R+N)/(2*f),hK=(-R-N)/(2*f);if(M>=0&&M<=1)return M;else if(hK>=0&&hK<=1)return hK;
else return-1}function g(j){var e,b,s;j.Mf=j.lK[0];j.a1z=j.lK[1];j.pV=[];var G=j.pV;G.push(new _(0,0,0,0,0));
for(e=0;e<j.GM;e++){b=j.lK[e<<1]-j.Mf;s=j.lK[(e<<1)+1]-j.a1z;G.push(new _(G[e].x+b,G[e].y+s,G[e].bZ+b*s,G[e].BY+b*b,G[e].Ye+s*s))}}function Q(j){var E=j.GM,b=j.lK,s,G=new Array(E),T=new Array(E),z=new Array(4),m,$,o,h,X,D,f,R,i,t,N,e,M,hK,bD,co,iM,hs,S=0;
j.Oe=new Array(E);for(e=E-1;e>=0;e--){if(b[e<<1]!=b[S<<1]&&b[(e<<1)+1]!=b[(S<<1)+1])S=e+1;T[e]=S}for(e=E-1;
e>=0;e--){var a=d(e+1,E)<<1;z[0]=z[1]=z[2]=z[3]=0;s=(3+3*(b[a]-b[e<<1])+(b[a+1]-b[(e<<1)+1]))/2;z[s]++;
m=0;$=0;o=0;h=0;S=T[e];hK=e;while(1){N=0;s=(3+3*Math.sign(b[S*2]-b[hK*2])+Math.sign(b[S*2+1]-b[hK*2+1]))/2;
z[s]++;if(z[0]&&z[1]&&z[2]&&z[3]){G[e]=hK;N=1;break}i=b[S*2]-b[e*2];t=b[S*2+1]-b[e*2+1];if(w(m,$,i,t)<0||w(o,h,i,t)>0){break}if(Math.abs(i)<=1&&Math.abs(t)<=1){}else{X=i+(t>=0&&(t>0||i<0)?1:-1);
D=t+(i<=0&&(i<0||t<0)?1:-1);if(w(m,$,X,D)>=0){m=X;$=D}X=i+(t<=0&&(t<0||i<0)?1:-1);D=t+(i>=0&&(i>0||t<0)?1:-1);
if(w(o,h,X,D)<=0){o=X;h=D}}hK=S;S=T[hK];if(!P(S,e,hK)){break}}if(N==0){f=Math.sign(b[S*2]-b[hK*2]);R=Math.sign(b[S*2+1]-b[hK*2+1]);
i=b[hK*2]-b[e*2];t=b[hK*2+1]-b[e*2+1];bD=w(m,$,i,t);co=w(m,$,f,R);iM=w(o,h,i,t);hs=w(o,h,f,R);M=1e7;
if(co<0){M=Math.floor(bD/-co)}if(hs>0){M=Math.min(M,Math.floor(-iM/hs))}G[e]=d(hK+M,E)}}M=G[E-1];j.Oe[E-1]=M;
for(e=E-2;e>=0;e--){if(P(e+1,G[e],M)){M=G[e]}j.Oe[e]=M}for(e=E-1;P(d(e+1,E),M,j.Oe[e]);e--){j.Oe[e]=M}}function J(j){function b(j,e,s){var E=j.GM,i=j.lK,t=j.pV,N,M,hK,bD,co,T,iM,hs,R,S,a,bV,a5,i9,dG=0;
if(s>=E){s-=E;dG=1}if(dG==0){N=t[s+1].x-t[e].x;M=t[s+1].y-t[e].y;bD=t[s+1].BY-t[e].BY;hK=t[s+1].bZ-t[e].bZ;
co=t[s+1].Ye-t[e].Ye;T=s+1-e}else{N=t[s+1].x-t[e].x+t[E].x;M=t[s+1].y-t[e].y+t[E].y;bD=t[s+1].BY-t[e].BY+t[E].BY;
hK=t[s+1].bZ-t[e].bZ+t[E].bZ;co=t[s+1].Ye-t[e].Ye+t[E].Ye;T=s+1-e+E}a=(i[e<<1]+i[s<<1])/2-i[0];bV=(i[(e<<1)+1]+i[(s<<1)+1])/2-i[1];
i9=i[s<<1]-i[e<<1];a5=-(i[(s<<1)+1]-i[(e<<1)+1]);iM=(bD-2*N*a)/T+a*a;hs=(hK-N*bV-M*a)/T+a*bV;R=(co-2*M*bV)/T+bV*bV;
S=a5*a5*iM+2*a5*i9*hs+i9*i9*R;return Math.sqrt(S)}var e,s,G,T,E=j.GM,z=new Array(E+1),m=new Array(E+1),$=new Array(E),o=new Array(E+1),h=new Array(E+1),X=new Array(E+1),D,f,R;
for(e=0;e<E;e++){R=d(j.Oe[d(e-1,E)]-1,E);if(R==e){R=d(e+1,E)}if(R<e){$[e]=E}else{$[e]=R}}s=1;for(e=0;
e<E;e++){while(s<=$[e]){o[s]=e;s++}}e=0;for(s=0;e<E;s++){h[s]=e;e=$[e]}h[s]=E;G=s;e=E;for(s=G;s>0;s--){X[s]=e;
e=o[e]}X[0]=0;z[0]=0;for(s=1;s<=G;s++){for(e=X[s];e<=h[s];e++){f=-1;for(T=h[s-1];T>=o[e];T--){D=b(j,T,e)+z[T];
if(f<0||D<f){m[e]=T;f=D}}z[e]=f}}j.iF=G;j.a5I=new Array(G);for(e=E,s=G-1;e>0;s--){e=m[e];j.a5I[s]=e}}function A(j){function b(j,e,D,$,o,ap){var E=j.GM,bk=j.pV,c2=0,R;
while(D>=E){D-=E;c2+=1}while(e>=E){e-=E;c2-=1}while(D<0){D+=E;c2-=1}while(e<0){e+=E;c2+=1}var gg=bk[D+1].x-bk[e].x+c2*bk[E].x,bH=bk[D+1].y-bk[e].y+c2*bk[E].y,gw=bk[D+1].BY-bk[e].BY+c2*bk[E].BY,gP=bk[D+1].bZ-bk[e].bZ+c2*bk[E].bZ,dT=bk[D+1].Ye-bk[e].Ye+c2*bk[E].Ye,f=D+1-e+c2*E;
$[ap]=gg/f;$[ap+1]=bH/f;var fU=(gw-gg*gg/f)/f,dV=(gP-gg*bH/f)/f,ac=(dT-bH*bH/f)/f,e2=(fU+ac+Math.sqrt((fU-ac)*(fU-ac)+4*dV*dV))/2;
fU-=e2;ac-=e2;if(Math.abs(fU)>=Math.abs(ac)){R=Math.sqrt(fU*fU+dV*dV);if(R!=0){o[ap]=-dV/R;o[ap+1]=fU/R}}else{R=Math.sqrt(ac*ac+dV*dV);
if(R!=0){o[ap]=-ac/R;o[ap+1]=dV/R}}if(R==0){o[ap]=o[ap+1]=0}}var s=j.iF,G=j.a5I,E=j.GM,T=j.lK,z=j.Mf,m=j.a1z,$=new Array(s*2),o=new Array(s*2),h=new Array(s),X=new Array(3),e,D,f,R,M,hK,bD,co,iM,hs,S;
j.$U=new F(s);for(e=0;e<s;e++){D=G[d(e+1,s)];D=d(D-G[e],E)+G[e];$[e<<1]=0;$[(e<<1)+1]=0;o[e<<1]=0;o[(e<<1)+1]=0;
b(j,G[e],D,$,o,e<<1)}for(e=0;e<s;e++){h[e]=[0,0,0,0,0,0,0,0,0];var i=o[e<<1]*o[e<<1]+o[(e<<1)+1]*o[(e<<1)+1],t=1/i;
if(i!=0){X[0]=o[(e<<1)+1];X[1]=-o[e<<1];X[2]=-X[1]*$[(e<<1)+1]-X[0]*$[e<<1];for(R=0;R<3;R++){h[e][R*3+0]=X[R]*X[0]*t;
h[e][R*3+1]=X[R]*X[1]*t;h[e][R*3+2]=X[R]*X[2]*t}}}var N=[0,0,0,0,0,0,0,0,0];for(e=0;e<s;e++){N[0]=N[1]=N[2]=N[3]=N[4]=N[5]=N[6]=N[7]=N[8]=N[9]=0;
var a=T[G[e]<<1]-z,bV=T[(G[e]<<1)+1]-m,a5=0,i9=0;D=d(e-1,s);for(R=0;R<9;R+=3){N[R+0]=h[D][R+0]+h[e][R+0];
N[R+1]=h[D][R+1]+h[e][R+1];N[R+2]=h[D][R+2]+h[e][R+2]}while(1){var dG=N[0]*N[4]-N[1]*N[3];if(dG!=0){a5=(-N[2]*N[4]+N[5]*N[0])/dG;
i9=(N[2]*N[3]-N[5]*N[0])/dG;break}if(N[0]>N[4]){X[0]=-N[1];X[1]=N[0]}else if(N[4]){X[0]=-N[4];X[1]=N[3]}else{X[0]=1;
X[1]=0}var i=X[0]*X[0]+X[1]*X[1],t=1/i;X[2]=-X[1]*bV-X[0]*a;for(R=0;R<3;R++){N[R*3+0]+=X[R]*X[0]*t;N[R*3+1]+=X[R]*X[1]*t;
N[R*3+2]+=X[R]*X[2]*t}}M=Math.abs(a5-a);hK=Math.abs(i9-bV);if(M<=.5&&hK<=.5){j.$U.AW[e<<1]=a5+z;j.$U.AW[(e<<1)+1]=i9+m;
continue}bD=C(N,a,bV);iM=a;hs=bV;if(N[0]!=0){for(S=0;S<2;S++){i9=bV-.5+S;a5=-(N[1]*i9+N[2])/N[0];M=Math.abs(a5-a);
co=C(N,a5,i9);if(M<=.5&&co<bD){bD=co;iM=a5;hs=i9}}}if(N[4]!=0){for(S=0;S<2;S++){a5=a-.5+S;i9=-(N[3]*a5+N[5])/N[4];
hK=Math.abs(i9-bV);co=C(N,a5,i9);if(hK<=.5&&co<bD){bD=co;iM=a5;hs=i9}}}for(R=0;R<2;R++){for(f=0;f<2;
f++){a5=a-.5+R;i9=bV-.5+f;co=C(N,a5,i9);if(co<bD){bD=co;iM=a5;hs=i9}}}j.$U.AW[e<<1]=iM+z;j.$U.AW[(e<<1)+1]=hs+m}}function p(j){var b=j.$U.PW,s=j.$U,e,G,T,z,m,$,o,h,X;
for(e=0;e<b;e++){G=d(e+1,b);T=d(e+2,b);var D=s.AW[e<<1],f=s.AW[(e<<1)+1],R=s.AW[T<<1],i=s.AW[(T<<1)+1],t=s.AW[G<<1],N=s.AW[(G<<1)+1],M=W(.5,R,t),hK=W(.5,i,N);
m=v(D,f,R,i);if(m!=0){z=w(t-D,N-f,R-D,i-f)/m;z=Math.abs(z);$=z>1?1-1/z:0;$=$*(1/.75)}else{$=4/3}s.Vz[G]=$;
var bD=3*G<<1;if($>=r.a8Y){s.qm[G]=0;s.Pr[bD+0]=s.Pr[bD+1]=0;s.Pr[bD+2]=t;s.Pr[bD+3]=N;s.Pr[bD+4]=M;
s.Pr[bD+5]=hK}else{if($<.55){$=.55}else if($>1){$=1}var co=.5+.5*$;s.qm[G]=1;s.Pr[bD]=W(co,D,t);s.Pr[bD+1]=W(co,f,N);
s.Pr[bD+2]=W(co,R,t);s.Pr[bD+3]=W(co,i,N);s.Pr[bD+4]=M;s.Pr[bD+5]=hK}s.alpha[G]=$;s.FH[G]=.5}s.a2_=1}function U(j){function b(){this.QG=0;
this.X7=0;this.Gj=0;this.Jn=0;this.CX=0;this.OI=0;this.Ls=0;this.alpha=0}function s(j,e,D,eR,gR,iM,hs){var T=j.$U.PW,bN=j.$U.Pr,eG=j.$U.AW;
if(e==D)return 1;var ef=e,t=d(e+1,T),fi=d(ef+1,T),gP=eG[e<<1],dT=eG[(e<<1)+1],ep=eG[t<<1],iJ=eG[(t<<1)+1],aT=iM[fi];
if(aT==0)return 1;var dm=L(gP-ep,dT-iJ);for(ef=fi;ef!=D;ef=fi){var fi=d(ef+1,T),c1=d(ef+2,T),gk=eG[fi<<1],a8=eG[(fi<<1)+1],bX=eG[c1<<1],bL=eG[(c1<<1)+1];
if(iM[fi]!=aT)return 1;if(Math.sign(w(ep-gP,iJ-dT,bX-gk,bL-a8))!=aT)return 1;if(Z(ep-gP,iJ-dT,bX-gk,bL-a8)<dm*L(gk-bX,a8-bL)*-.999847695156)return 1}var c_=d(e,T)*3+2<<1,eS=d(e+1,T)<<1,c$=d(D,T)<<1,cp=d(D,T)*3+2<<1,ap=bN[c_],bk=bN[c_+1],b_=eG[eS],hy=eG[eS+1],gx=eG[c$],eJ=eG[c$+1],d4=bN[cp],cs=bN[cp+1],S=eG[0],a=eG[1];
c_=D*3+2<<1;var en=bN[c_],cm=bN[c_+1],N=hs[D]-hs[e];N-=w(en-S,cm-a,en-S,cm-a)/2;if(e>=D){N+=hs[T]}var c5=b_-ap,fK=hy-bk,ez=gx-ap,d6=eJ-bk,ee=d4-ap,c0=cs-bk,gq=w(c5,fK,ez,d6),ei=w(c5,fK,ee,c0),d9=w(ez,d6,ee,c0),ge=gq+d9-ei;
if(ei==gq)return 1;var co=d9/(d9-ge),bD=ei/(ei-gq),iK=ei*co/2;if(iK==0)return 1;var gu=N/iK,M=2-Math.sqrt(4-gu/.3);
eR.X7=W(co*M,ap,b_);eR.Gj=W(co*M,bk,hy);eR.Jn=W(bD*M,d4,gx);eR.CX=W(bD*M,cs,eJ);eR.alpha=M;eR.OI=co;
eR.Ls=bD;b_=eR.X7;hy=eR.Gj;gx=eR.Jn;eJ=eR.CX;eR.QG=0;for(ef=d(e+1,T);ef!=D;ef=fi){fi=d(ef+1,T);var eA=eG[ef<<1],cE=eG[(ef<<1)+1],gk=eG[fi<<1],a8=eG[(fi<<1)+1];
co=y(b_-ap,hy-bk,gx-b_,eJ-hy,d4-gx,cs-eJ,gk-eA,a8-cE);if(co<-.5)return 1;var iU=H(co,ap,b_,gx,d4),eI=H(co,bk,hy,eJ,cs),dm=L(gk-eA,a8-cE);
if(dm==0)return 1;var ad=w(gk-eA,a8-cE,iU-eA,eI-cE)/dm;if(Math.abs(ad)>gR)return 1;if(Z(gk-eA,a8-cE,iU-eA,eI-cE)<0||Z(eA-gk,cE-a8,iU-gk,eI-a8)<0){return 1}eR.QG+=ad*ad}for(ef=e;
ef!=D;ef=fi){fi=d(ef+1,T);var c_=ef*3+2<<1,eS=fi*3+2<<1,d_=bN[c_],c9=bN[c_+1],ek=bN[eS],fX=bN[eS+1];
co=y(b_-ap,hy-bk,gx-b_,eJ-hy,d4-gx,cs-eJ,ek-d_,fX-c9);if(co<-.5)return 1;var iU=H(co,ap,b_,gx,d4),eI=H(co,bk,hy,eJ,cs),dm=L(ek-d_,fX-c9);
if(dm==0)return 1;var ad=w(ek-d_,fX-c9,iU-d_,eI-c9)/dm,fo=w(ek-d_,fX-c9,eG[fi<<1]-d_,eG[(fi<<1)+1]-c9)/dm;
fo*=.75*j.$U.alpha[fi];if(fo<0){ad=-ad;fo=-fo}if(ad<fo-gR)return 1;if(ad<fo){eR.QG+=(ad-fo)*(ad-fo)}}return 0}var G=j.$U,T=G.PW,z=G.AW,m=new Array(T+1),$=new Array(T+1),o=new Array(T+1),h=new Array(T+1),X,e,D,f,R=new b,i,t,N,M,hK,bD,co,iM=new Array(T),hs=new Array(T+1);
for(e=0;e<T;e++){if(G.qm[e]=="CURVE"){var S=z[d(e-1,T)<<1],a=z[(d(e-1,T)<<1)+1],bV=z[e<<1],a5=z[(e<<1)+1],i9=z[d(e+1,T)<<1],dG=z[(d(e+1,T)<<1)+1];
iM[e]=Math.sign(w(bV-S,a5-a,i9-bV,dG-a5))}else{iM[e]=0}}N=0;hs[0]=0;var ap=G.AW[0],bk=G.AW[1];for(e=0;
e<T;e++){t=d(e+1,T);if(G.qm[t]=="CURVE"){M=G.alpha[t];var c2=e*3+2<<1,gg=t*3+2<<1,bH=G.Pr[c2],gw=G.Pr[c2+1],gP=z[t<<1],dT=z[(t<<1)+1],fU=G.Pr[gg],dV=G.Pr[gg+1];
N+=.3*M*(4-M)*w(gP-bH,dT-gw,fU-bH,dV-gw)/2;N+=w(bH-ap,gw-bk,fU-ap,dV-bk)/2}hs[e+1]=N}m[0]=-1;$[0]=0;
o[0]=0;for(D=1;D<=T;D++){m[D]=D-1;$[D]=$[D-1];o[D]=o[D-1]+1;for(e=D-2;e>=0;e--){f=s(j,e,d(D,T),R,r.a44,iM,hs);
if(f){break}if(o[D]>o[e]+1||o[D]==o[e]+1&&$[D]>$[e]+R.QG){m[D]=e;$[D]=$[e]+R.QG;o[D]=o[e]+1;h[D]=R;R=new b}}}X=o[T];
hK=new F(X);bD=new Array(X);co=new Array(X);D=T;for(e=X-1;e>=0;e--){var ac=d(D,T),e2=e*3+0<<1,cX=ac*3+0<<1;
if(m[D]==D-1){hK.qm[e]=G.qm[ac];hK.Pr[e2]=G.Pr[cX];hK.Pr[e2+1]=G.Pr[cX+1];hK.Pr[e2+2]=G.Pr[cX+2];hK.Pr[e2+3]=G.Pr[cX+3];
hK.Pr[e2+4]=G.Pr[cX+4];hK.Pr[e2+5]=G.Pr[cX+5];hK.AW[e<<1]=G.AW[ac<<1];hK.AW[(e<<1)+1]=G.AW[(ac<<1)+1];
hK.alpha[e]=G.alpha[ac];hK.Vz[e]=G.Vz[ac];hK.FH[e]=G.FH[ac];bD[e]=co[e]=1}else{hK.qm[e]="CURVE";hK.Pr[e2]=h[D].X7;
hK.Pr[e2+1]=h[D].Gj;hK.Pr[e2+2]=h[D].Jn;hK.Pr[e2+3]=h[D].CX;hK.Pr[e2+4]=G.Pr[cX+4];hK.Pr[e2+5]=G.Pr[cX+5];
hK.AW[e<<1]=W(h[D].Ls,G.Pr[cX+4],z[ac<<1]);hK.AW[(e<<1)+1]=W(h[D].Ls,G.Pr[cX+5],z[(ac<<1)+1]);hK.alpha[e]=h[D].alpha;
hK.Vz[e]=h[D].alpha;bD[e]=h[D].Ls;co[e]=h[D].OI}D=m[D]}for(e=0;e<X;e++){t=d(e+1,X);hK.FH[e]=bD[e]/(bD[e]+co[t])}hK.a2_=1;
j.$U=hK}for(var e=0;e<x.length;e++){var j=x[e];g(j);Q(j);J(j);A(j);p(j);if(r.a4k)U(j)}}return{ajp:O,a68:I}}();
ej.CO=function(n,F,O,I){var x={ex:"minority",a0Y:I,a4k:!0,a8Y:1,a44:.2},r=ej.ajp(n,F,O,x);ej.a68(r,x);
return r};ej.Y1=function(n){var F=[];for(var e=0;e<n.length;e++){var O=n[e],I=O.$U,x=["M"],r=[I.Pr[(I.PW-1)*6+4],I.Pr[(I.PW-1)*6+5]];
for(var _=0;_<I.PW;_++){var d=_*6;if(I.qm[_]==1){x.push("C");for(var w=0;w<6;w++)r.push(I.Pr[d+w])}else if(I.qm[_]==0){x.push("L");
for(var w=2;w<4;w++)r.push(I.Pr[d+w])}}x.push("Z");F.push({parent:O.parent,color:O.color,path:{H:r,s:x}})}return F};
ej.a6B=function(n,F,O,I,x){function r(L){function H(e){var v="C "+(L.Pr[e*3+0<<1]*F).toFixed(1)+" "+(L.Pr[(e*3+0<<1)+1]*F).toFixed(1)+",";
v+=(L.Pr[e*3+1<<1]*F).toFixed(1)+" "+(L.Pr[(e*3+1<<1)+1]*F).toFixed(1)+",";v+=(L.Pr[e*3+2<<1]*F).toFixed(1)+" "+(L.Pr[(e*3+2<<1)+1]*F).toFixed(1)+" ";
return v}function y(e){var Q="L "+(L.Pr[e*3+1<<1]*F).toFixed(1)+" "+(L.Pr[(e*3+1<<1)+1]*F).toFixed(1)+" ";
Q+=(L.Pr[e*3+2<<1]*F).toFixed(1)+" "+(L.Pr[(e*3+2<<1)+1]*F).toFixed(1)+" ";return Q}var E=L.PW,e,g="M"+(L.Pr[(E-1)*3+2<<1]*F).toFixed(1)+" "+(L.Pr[((E-1)*3+2<<1)+1]*F).toFixed(1)+" ";
for(e=0;e<E;e++){if(L.qm[e]==1){g+=H(e)}else if(L.qm[e]==0){g+=y(e)}}return g}var O=O*F,I=I*F,_=n.length,d=[];
for(var e=0;e<256;e++)d.push("rgb("+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+")");
var w="<svg id=\"svg\" version=\"1.1\" width=\""+O+"\" height=\""+I+"\" xmlns=\"http://www.w3.org/2000/svg\">";
for(var e=0;e<_;e++){var Z=x[n[e].color-1].ako.Ko;if((Z>>>24&255)==0)continue;w+="<path d=\"";var P=n[e].$U;
w+=r(P);var C=Z>>0&255,W=Z>>8&255,v=Z>>16&255,Z="rgb("+C+","+W+","+v+")";w+="\" fill=\""+Z+"\" fill-rule=\"evenodd\"/>"}w+="</svg>";
return w};ej.a3F=function(n,F,O){var E=n.length>>1,I,x=n[2*E-3]-O,r=n[2*E-2]-F,_=n[2*E-1]-O,d=_>x,w=0;
for(var e=0;e<E;e++){I=r;x=_;r=n[2*e]-F;_=n[2*e+1]-O;if(x==_)continue;d=_>x}for(var e=0;e<E;e++){I=r;
x=_;r=n[2*e]-F;_=n[2*e+1]-O;if(x<0&&_<0)continue;if(x>0&&_>0)continue;if(I<0&&r<0)continue;if(x==_&&Math.min(I,r)<=0)return!0;
if(x==_)continue;var Z=I+(r-I)*-x/(_-x);if(Z==0)return!0;if(Z>0)w++;if(x==0&&d&&_>x)w--;if(x==0&&!d&&_<x)w--;
d=_>x}return(w&1)==1};ej.fill=function(n,F,O,I){var x=F[n],r=[n],_=0;while(_<r.length){var d=r[_];_++;
F[d]=I;if(F[d-O]==x){r.push(d-O);F[d-O]=254}if(F[d-1]==x){r.push(d-1);F[d-1]=254}if(F[d+1]==x){r.push(d+1);
F[d+1]=254}if(F[d+O]==x){r.push(d+O);F[d+O]=254}}};var l={};l.Z0=!1;l.Xr=!1;l.SN=!1;l.nd=document.createElement("canvas");
l.Vo=null;l.g2=null;l.Jo=0;(function(){var n={alpha:!0,antialias:!1,depth:!1,premultipliedAlpha:!1},F;
if(!F)F=l.nd.getContext("webgl",n);if(!F)F=l.nd.getContext("experimental-webgl",n);if(F){l.Z0=!0;l.Xr=!0;
l.Vo=F;l.g2=F.createFramebuffer();F.bindFramebuffer(F.FRAMEBUFFER,l.g2);F.disable(F.BLEND);F.disable(F.DEPTH_TEST);
var O=F.createBuffer();F.bindBuffer(F.ARRAY_BUFFER,O);F.bufferData(F.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),F.STATIC_DRAW);
F.enableVertexAttribArray(0);F.vertexAttribPointer(0,2,F.FLOAT,!1,0,0)}}());l.a9s=function(n){n=n.replace(/\s\s+/g," ");
n=n.replace(/; /g,";");n=n.replace(/} /g,"}");n=n.replace(/ }/g,"}");n=n.replace(/{ /g,"{");n=n.replace(/ {/g,"{");
n=n.replace(/= /g,"=");n=n.replace(/ =/g,"=");n=n.replace(/\| /g,"|");n=n.replace(/ \|/g,"|");return n};
l.a2B=function(n){var F=l.Vo;if(n>F.getParameter(F.MAX_TEXTURE_SIZE)){l.Z0=!1;alert("Disabling WebGL")}};
l.qq=function(n,F){return new Float32Array([(n.x-F.x)/F.d,(n.y-F.y)/F.v,n.d/F.d,n.v/F.v])};l.A2=function(){return this.nd};
l.wu=function(n,F){var O=l.Vo;O.bindFramebuffer(O.FRAMEBUFFER,l.g2);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,n.sg,0);
O.viewport(0,0,n.d,n.v);if(F){O.enable(O.SCISSOR_TEST);O.scissor(F.x,F.y,F.d,F.v)}else O.disable(O.SCISSOR_TEST)};
l.Z2=function(n,F,O){if(O)throw"error";var I=l.Vo;I.disable(I.SCISSOR_TEST);I.bindFramebuffer(I.FRAMEBUFFER,null);
I.viewport(0,0,n,F);if(O){I.enable(I.SCISSOR_TEST);I.scissor(O.x,O.y,Math.round(O.d),Math.round(O.v))}else I.disable(I.SCISSOR_TEST)};
l.clear=function(){var n=l.Vo;n.clearColor(0,0,0,0);n.clear(n.COLOR_BUFFER_BIT)};l.rF=function(n,F){if(F==null)F=0;
var O=(F>>>0&255)==0,I=(F>>>8&255)==0,x=(F>>>16&255)==0,r=(F>>>24&255)==0,_=(n>>>0&255)*(1/255),d=(n>>>8&255)*(1/255),w=(n>>>16&255)*(1/255),Z=(n>>>24&255)*(1/255),P=l.Vo;
P.colorMask(O,I,x,r);P.clearColor(_,d,w,Z);P.clear(P.COLOR_BUFFER_BIT);P.colorMask(!0,!0,!0,!0)};l.U0=function(n,F,O,I,x){var r=F.lN(I);
if(x)r=r.lN(x);if(r.D2())return;var _=l.Vo;l.wu(n);_.bindTexture(_.TEXTURE_2D,O.sg);_.copyTexSubImage2D(_.TEXTURE_2D,0,r.x-I.x,r.y-I.y,r.x-F.x,r.y-F.y,r.d,r.v)};
l.Y0=function(e,n,F){var O=l.Jb[e];if(O==null||O.d!=n||O.v!=F){if(O)O.delete();O=new l.zF(n,F)}l.Jb[e]=O;
return O};l.Jb=[];l.L8=function(){this.f1=null;this.bm=null};l.L8.l8=null;l.L8.prototype.Jr=function(n){if(this.bm)return;
this.bm={};var F=l.Vo,O=this.f1,I=this.bm;for(var e=0;e<n.length;e++){var x=n[e];I[x]=F.getUniformLocation(O,x)}};
l.L8.prototype.lf=function(){};l.L8.prototype.et=function(n){var F=l.Vo;for(var e=0;e<n.length;e+=2){F.uniform1i(n[e],e>>>1);
F.activeTexture(F["TEXTURE"+(e>>>1)]);F.bindTexture(F.TEXTURE_2D,n[e+1])}F.activeTexture(F.TEXTURE0)};
l.L8.prototype.Nf=function(n,F){var O=l.Vo,I=O.createShader(O.FRAGMENT_SHADER);O.shaderSource(I,n);O.compileShader(I);
if(!O.getShaderParameter(I,O.COMPILE_STATUS))console.log(O.getShaderInfoLog(I));var x=O.createShader(O.VERTEX_SHADER);
O.shaderSource(x,F);O.compileShader(x);if(!O.getShaderParameter(x,O.COMPILE_STATUS))console.log(O.getShaderInfoLog(x));
var r=O.createProgram();O.attachShader(r,x);O.attachShader(r,I);O.linkProgram(r);if(!O.getProgramParameter(r,O.LINK_STATUS))console.log("Could not initialise shaders");
this.f1=r};l.L8.prototype.vM=function(){if(l.L8.l8!=this){l.Vo.useProgram(this.f1);l.L8.l8=this}};l.fL=function(n,F){l.yH++;
l.Jo+=n*F;if(l.SN)console.log("GL.Channels instances: "+l.yH+", memory: "+l.Jo);var O=l.Vo;this.d=n;
this.v=F;this.sg=O.createTexture();this.Lu=null;this.mL(this.sg,n,F)};l.fL.prototype.mL=function(n,F,O){var I=l.Vo;
I.bindTexture(I.TEXTURE_2D,n);I.texParameteri(I.TEXTURE_2D,I.TEXTURE_MIN_FILTER,I.NEAREST);I.texParameteri(I.TEXTURE_2D,I.TEXTURE_MAG_FILTER,I.NEAREST);
I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,I.CLAMP_TO_EDGE);I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,I.CLAMP_TO_EDGE);
I.texImage2D(I.TEXTURE_2D,0,I.ALPHA,F,O,0,I.ALPHA,I.UNSIGNED_BYTE,null)};l.fL.prototype.set=function(n){var F=l.Vo;
F.bindTexture(F.TEXTURE_2D,this.sg);F.pixelStorei(F.UNPACK_ALIGNMENT,1);F.texImage2D(F.TEXTURE_2D,0,F.ALPHA,this.d,this.v,0,F.ALPHA,F.UNSIGNED_BYTE,n);
F.pixelStorei(F.UNPACK_ALIGNMENT,4)};l.fL.prototype.delete=function(){var n=l.Vo;if(this.sg){n.deleteTexture(this.sg);
l.yH--;l.Jo-=this.d*this.v}if(l.SN)if(l.SN)console.log("GL.Channels instances: "+l.yH+", memory: "+l.Jo*4)};
l.yH=0;l.zF=function(n,F,O){if(O==null)O=!1;l.yH++;l.Jo+=n*F*4;if(l.SN)console.log("GL.Channels instances: "+l.yH+", memory: "+l.Jo);
var I=l.Vo;this.a7i=O;this.d=n;this.v=F;this.sg=I.createTexture();this.Lu=null;this.mL(this.sg,n,F)};
l.zF.prototype.set=function(n,F){var O=l.Vo;O.disable(O.SCISSOR_TEST);O.bindTexture(O.TEXTURE_2D,this.sg);
if(n==null||n instanceof Uint8Array){var I=this.d*this.v;if(F==null||F.X()*10>I)O.texImage2D(O.TEXTURE_2D,0,O.RGBA,this.d,this.v,0,O.RGBA,O.UNSIGNED_BYTE,n);
else{var x=q.f(F.X()*4);q.nF(n,new gv(0,0,this.d,this.v),x,F);O.texSubImage2D(O.TEXTURE_2D,0,F.x,F.y,F.d,F.v,O.RGBA,O.UNSIGNED_BYTE,x)}}else O.texImage2D(O.TEXTURE_2D,0,O.RGBA,O.RGBA,O.UNSIGNED_BYTE,n)};
l.zF.prototype.get=function(n){var F=l.Vo;l.wu(this);F.readPixels(0,0,this.d,this.v,F.RGBA,F.UNSIGNED_BYTE,n)};
l.zF.prototype.ww=function(n){if(n.D2())return;var F=l.Vo;if(this.Lu==null){this.Lu=F.createTexture();
this.mL(this.Lu,this.d,this.v);l.yH++;l.Jo+=this.d*this.v*4}F.bindFramebuffer(F.FRAMEBUFFER,l.g2);F.bindTexture(F.TEXTURE_2D,this.Lu);
if(n){var O=Math.max(n.x,0),I=Math.max(n.y,0);F.copyTexSubImage2D(F.TEXTURE_2D,0,O,I,O,I,n.d,n.v)}else F.copyTexImage2D(F.TEXTURE_2D,0,F.RGBA,0,0,this.d,this.v,0)};
l.zF.prototype.mL=function(n,F,O){var I=l.Vo;I.bindTexture(I.TEXTURE_2D,n);I.texParameteri(I.TEXTURE_2D,I.TEXTURE_MIN_FILTER,this.a7i?I.LINEAR:I.NEAREST);
I.texParameteri(I.TEXTURE_2D,I.TEXTURE_MAG_FILTER,I.NEAREST);I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,I.CLAMP_TO_EDGE);
I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,I.CLAMP_TO_EDGE);I.texImage2D(I.TEXTURE_2D,0,I.RGBA,F,O,0,I.RGBA,I.UNSIGNED_BYTE,null)};
l.zF.prototype.delete=function(){var n=l.Vo;if(this.sg){n.deleteTexture(this.sg);l.yH--;l.Jo-=this.d*this.v*4}if(this.Lu){n.deleteTexture(this.Lu);
l.yH--;l.Jo-=this.d*this.v*4}if(l.SN)if(l.SN)console.log("GL.Channels instances: "+l.yH+", memory: "+l.Jo)};
l.zF.prototype.clone=function(){var n=l.Vo,F=new l.zF(this.d,this.v);l.wu(this);n.bindTexture(n.TEXTURE_2D,F.sg);
n.copyTexImage2D(n.TEXTURE_2D,0,n.RGBA,0,0,this.d,this.v,0);return F};l.Qr={ak9:"  vec3 ocbrn(vec3 a, vec3 b, float f) {  vec3 d = (a*vec3(f)+ONE3-vec3(f));  return mix(ONE3 - min(ONE3,(ONE3-b)/d), ZERO3, vec3(vec3(greaterThan(vec3(0.001),d))) );  }  ",a2P:"  vec3 ocddg(vec3 a, vec3 b, float f) {  return mix(        min(ONE3,       b/(ONE3 - a*f))    ,   ONE3   , vec3(equal(a*f,ONE3 )) );  }  ",x6:"const vec3 ZERO3 = vec3(0.0,0.0,0.0) ;\t\t\tconst vec3 QUAR3 = vec3(0.25,0.25,0.25) ;\t\t\tconst vec3 HALF3 = vec3(0.5,0.5,0.5) ;\t\t\tconst vec3 ONE3  = vec3(1.0,1.0,1.0) ;",h0:" float hueDiff(float shue, float hue) { \t\t\t\tfloat df = hue-shue, adf=abs(df), df0 = df-1.0, df1 = df+1.0; \t\t\t\tif(abs(df0) < adf)  df = df0; \t\t\t\telse if(abs(df1) < adf)  df = df1; \t\t\t\treturn df; \t\t\t}",o7:" float hueCF(float hueS, float hue0) { \t\t\t\tfloat df = hueDiff(hue0, hueS)*6.0; \t\t\t\treturn   max(0.0, min(1.0,  (df<0.0) ? 1.0+df : 1.0-df  ));  } ",Il:"float sat(vec3 c) { return max(c.x,max(c.y,c.z)) - min(c.x,min(c.y,c.z)); }",wO:"float lum(vec3 c) { return dot(c, vec3(0.3,0.59,0.11)); } ",m9:"vec3  D  (vec3 x) { return mix( sqrt(x), ((16.0*x-12.0)*x+4.0)*x  , vec3(lessThanEqual(x,QUAR3))  ); }",a0S:"float midSat (vec3 v, float s) { return ((v.y-v.z)*s)/(v.x-v.z); }",_M:"vec3 setSat (vec3 c, float s) \t\t\t{\t\t\t\tvec3 o;\t\t\t\tif(c.r==c.g && c.g==c.b) o = ZERO3;\t\t\t\telse if(c.r>c.g)  {\t\t\t\t\tif(c.r>c.b) {\t\t\t\t\t\tif(c.g>c.b)\to = vec3(s, midSat(c.rgb,s), 0.0); \t\t\t\t\t\telse\to = vec3(s, 0.0, midSat(c.rbg,s)); \t\t\t\t\t}\t\t\t\t\telse\t\to = vec3(midSat(c.brg,s), 0.0, s); \t\t\t\t} else  {\t\t\t\t\tif(c.r<c.b) {\t\t\t\t\t\tif(c.g>c.b)\to = vec3(0.0, s, midSat(c.gbr,s)); \t\t\t\t\t\telse\t    o = vec3(0.0, midSat(c.bgr,s), s); \t\t\t\t\t}\t\t\t\t\telse\t\t    o = vec3(midSat(c.grb,s), s, 0.0);\t\t\t\t}\t\t\t\treturn o;\t\t\t}",am_:"vec3 clipCol(vec3 c) \t\t\t{ \t\t\t\tvec3 o = c;  float l = lum(c); \t\t\t\tfloat n = min(c.r,min(c.g,c.b)); \t\t\t\tfloat x = max(c.r,max(c.g,c.b)); \t\t\t\tif(n<0.0) o = l + (o-l)*(l/(l-n));\t\t\t\tif(x>1.0) o = l + (o-l)*(1.0-l)/(x-l);\t\t\t\treturn o;\t\t\t}",b6:"vec3 setLum (vec3 c, float l) { return clipCol(c+l-lum(c)); } ",lm:"bool in01(vec2 c) { return (0.0<=c.x) && (c.x<=1.0) && (0.0<=c.y) && (c.y<=1.0); }",hash:"float hash(vec2 v) { return fract(sin(dot(v ,vec2(12.9898,78.233))) * 43758.5453); }",Px:"vec3 rgbToHsl (vec3 rgb) {\t\t\t\tfloat r = rgb.r, g = rgb.g, b = rgb.b; \t\t\t\tfloat mx = max(r, max(g, b)), mn = min(r, min(g, b)); \t\t\t\tfloat h, s, l = (mx + mn) * 0.5;\t\t\t\t\t\t\t\tif(mx == mn) h = s = 0.0; \t\t\t\telse{ \t\t\t\t\tfloat d = mx - mn; \t\t\t\t\ts = l > 0.5 ? d / (2.0 - mx - mn) : d / (mx + mn);  \t\t\t\t\t\t\t\t\t\tif(mx==r) h = (g - b) / d + (g < b ? 6.0 : 0.0);  \t\t\t\t\telse if(mx==g) h = (b - r) / d + 2.0; \t\t\t\t\telse if(mx==b) h = (r - g) / d + 4.0; \t\t\t\t\t\t\t\t\t\th /= 6.0; \t\t\t\t}  \t\t\t\treturn vec3(h,s,l); }",OQ:"vec3 hslToRgb (float h, float s, float l){\t\t\t\tfloat r, g, b;\t\t\t\t\t\t\t\tif(s == 0.0)  r = g = b = l; \t\t\t\telse{ \t\t\t\t\tfloat q = l < 0.5 ? l * (1.0 + s) : l + s - l * s; \t\t\t\t\tfloat p = 2.0 * l - q; \t\t\t\t\tr = hue2rgb(p, q, h + 1.0/3.0); \t\t\t\t\tg = hue2rgb(p, q, h); \t\t\t\t\tb = hue2rgb(p, q, h - 1.0/3.0); \t\t\t\t} \t\t\t\treturn vec3(r,g,b); } ",Ir:"float hue2rgb(float p, float q, float t){ \t\t\t\tif(t < 0.0) t += 1.0;\t\t\t\tif(t > 1.0) t -= 1.0;\t\t\t\tif(t < 1.0/6.0) return p + (q - p) * 6.0 * t; \t\t\t\tif(t < 1.0/2.0) return q; \t\t\t\tif(t < 2.0/3.0) return p + (q - p) * (2.0/3.0 - t) * 6.0; \t\t\t\treturn p;\t}",sy:"vec3 rgbToHsv(vec3 rgb){\t\t\t\t\tfloat r = rgb.r, g = rgb.g, b = rgb.b; \t\t\t\tfloat mx = max(r, max(g, b)), mn = min(r, min(g, b)); \t\t\t\tfloat h, s, v = mx; \t\t\t\t\t\t\t\tfloat d = mx - mn; \t\t\t\ts = mx == 0.0 ? 0.0 : d / mx; \t\t\t\t\t\t\t\tif(mx == mn) h = 0.0;  \t\t\t\telse if(mx==r) h = (g - b) / d + (g < b ? 6.0 : 0.0);  \t\t\t\telse if(mx==g) h = (b - r) / d + 2.0; \t\t\t\telse if(mx==b) h = (r - g) / d + 4.0; \t\t\t\t\t\t\t\th /= 6.0; \t\t\t\treturn vec3(h,s,v);  }",xN:"vec3 hsvToRgb(float h, float s, float v)  { \t\t\t\tfloat r, g, b, f, p, q, t, i; \t\t\t\ti = floor(h * 6.0); \t\t\t\tf = h * 6.0 - i; \t\t\t\tp = v * (1.0 - s); \t\t\t\tq = v * (1.0 - f * s); \t\t\t\tt = v * (1.0 - (1.0 - f) * s); \t\t\t\t\t\t\t\tif     (i==0.0) { r = v, g = t, b = p; }\t\t\t\telse if(i==1.0) { r = q, g = v, b = p; }\t\t\t\telse if(i==2.0) { r = p, g = v, b = t; }\t\t\t\telse if(i==3.0) { r = p, g = q, b = v; }\t\t\t\telse if(i==4.0) { r = t, g = p, b = v; }\t\t\t\telse if(i==5.0) { r = v, g = p, b = q; }\t\t\t\t\t\t\t\treturn vec3(r,g,b); }",Kj:"\t\tfloat srgbUngamma(float x) {\t\t\treturn (x<0.04045) ? (x / 12.92) : pow( ( x + 0.055 ) / 1.055,  2.4);\t\t}\t\tfloat xyzScale(float x) {\t\t\treturn (x>0.008856) ? pow(x,1.0/3.0) : (903.3*x+16.0)*(1.0/116.0); \t\t}\t\tvec3 rgbToLab(vec3 rgb) {\t\t\tbool ok = true;\t\t\trgb.r = srgbUngamma(rgb.r); \t\t\trgb.g = srgbUngamma(rgb.g); \t\t\trgb.b = srgbUngamma(rgb.b); \t\t\tok = ok && 0.0318<=rgb.r && rgb.r<=0.0319; \t\t\tok = ok && 0.127 <=rgb.g && rgb.g<=0.128 ; \t\t\tok = ok && 0.3047<=rgb.b && rgb.b<=0.305; \t\t\t\t\t\tmat3 srgb2xyz = mat3(0.4360747164307918, 0.222504478679176, 0.013932173981751634,    0.3850649153329662, 0.7168786002139355, 0.09710452396580642,    0.14308038098632878, 0.06061692340677909, 0.7141732835334675); \t\t\t\t\t\tvec3 xyz = srgb2xyz*rgb; \t\t\tok = ok && 0.106<=xyz[0] && xyz[0]<=0.107;  \t\t\t\t\t\txyz=xyz*vec3(100.0/96.72, 100.0/100.0, 100.0/81.427);  \t\t\txyz.x = xyzScale(xyz.x); \t\t\txyz.y = xyzScale(xyz.y); \t\t\txyz.z = xyzScale(xyz.z); \t\t\t\t\t\treturn vec3(116.0*xyz.y-16.0, 500.0*(xyz.x-xyz.y), 200.0*(xyz.y-xyz.z));  \t\t} \t\tfloat labSimilar(vec3 lab, vec3 mnm, vec3 mxm, float lim)  {\t\t\tfloat L=lab.x, a=lab.y, b=lab.z; \t\t\tfloat dl = ((L<mnm.x) ? (mnm.x-L) : ((mxm.x<L) ? (mxm.x-L) : 0.0))*(1.0/100.0); \t\t\tfloat da = ((a<mnm.y) ? (mnm.y-a) : ((mxm.y<a) ? (mxm.y-a) : 0.0))*(1.0/116.0); \t\t\tfloat db = ((b<mnm.z) ? (mnm.z-b) : ((mxm.z<b) ? (mxm.z-b) : 0.0))*(1.0/116.0); \t\t\t/*float dl  = (slab.x-lab.x)*(1.0/100.0), da=(slab.y-lab.y)*(1.0/116.0), db=(slab.z-lab.z)*(1.0/116.0);*/ \t\t\tfloat dst = sqrt(dl*dl+da*da+db*db)*1.35; \t\t\treturn (dst<=lim) ? min(1.0,1.17*(1.0 - (dst/lim))) : 0.0; \t\t}",$V:"\t\tfloat _blendIf(float c, vec4 br) {  return min((c-br.x)*br.y,  (c-br.w)*br.z);  }  \t\tfloat blendIf(vec4 sc, vec4 tc, vec4 br[10]) {  \t\t\tfloat sg = lum(sc.rgb); \t\t\tfloat tg = lum(tc.rgb); \t\t\tfloat ms = _blendIf(sg,br[0]); \t\t\tms = min(ms, _blendIf(sc.r,br[2])); \t\t\tms = min(ms, _blendIf(sc.g,br[4])); \t\t\tms = min(ms, _blendIf(sc.b,br[6])); \t\t\t\t\t\tfloat mt = _blendIf(tg,br[1]); \t\t\tmt = min(mt, _blendIf(tc.r,br[3])); \t\t\tmt = min(mt, _blendIf(tc.g,br[5])); \t\t\tmt = min(mt, _blendIf(tc.b,br[7])); \t\t\tmt=max(mt,1.0-tc.w);\t\t\t\t\t\tfloat mi=min(ms,mt);\t\t\treturn mi<0.0?0.0:(mi>1.0?1.0:mi);\t\t}"};
l.Ju={mI:{},Z4:"\t\t\tattribute vec2 verPos;\t\t\tvarying vec2 sCoord;\t\t\tvoid main(void) {\t\t\t\tsCoord = verPos;\t\t\t\tgl_Position = vec4(vec2(-1.0,-1.0) + 2.0*verPos, 0.0, 1.0);\t\t\t}"};
l.Ju.Yn=function(n,F){var O=dK.fe,I=[O.$l,O.$v,O.sP,O.Vx,O.xr,O.Yx,O.ib,O.ZQ].indexOf(n.type),x=l.Ju.mI[n.type];
if(x==null)x=l.Ju.mI[n.type]=new l.mI[I];x.vM();x.lf(F,n);l.Vo.drawArrays(l.Vo.TRIANGLES,0,6)};l.mI=[];
l.mI[0]=function(){l.L8.call(this);this.HX={};var n="\t\t\tprecision mediump float;\t\t\t"+l.Qr.wO+"\t\t\t"+l.Qr.x6+"\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D map;\t\t\tuniform float toGray;\t\t\tuniform float presLum;\t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tfloat olum = lum(src.rgb); \t\t\t\tsrc.rgb = toGray * vec3(olum) + (1.0-toGray)*src.rgb; \t\t\t\tfloat r = texture2D(map, vec2(src.r, 0)).r;\t\t\t\tfloat g = texture2D(map, vec2(src.g, 0)).g;\t\t\t\tfloat b = texture2D(map, vec2(src.b, 0)).b;\t\t\t\tvec3 col = vec3(r,g,b); \t\t\t\tif(presLum==1.0) { \t\t\t\t\tfloat nlum = lum(col); \t\t\t\t\tif(olum>nlum) col += (olum-nlum)/(1.0-nlum)*(ONE3-col); \t\t\t\t\telse if(nlum==0.0) col = ZERO3; \t\t\t\t\telse col = (olum/nlum) * col; \t\t\t\t}\t\t\t\tgl_FragColor = vec4(col,src.w);\t\t\t\t\t\t\t}";
this.Nf(n,l.Ju.Z4)};l.mI[0].prototype=new l.L8;l.mI[0].prototype.lf=function(n,F){var O={Q:F.Ub,l:F.O8,O:F.QP,R:q.f(F.Ub.length)},I=O.Q.length;
if(this.HX["m"+I]==null){this.HX["m"+I]={abp:new l.zF(I,1),zc:q.f(I*4)}}var x=this.HX["m"+I];q.Eb(O,x.zc,0);
var r=x.abp;r.set(x.zc);this.Jr(["source","map","toGray","presLum"]);var _=l.Vo,d=this.bm;_.uniform1f(d.toGray,F.Nn?1:0);
_.uniform1f(d.presLum,F.Q7?1:0);this.et([d.source,n,d.map,r.sg])};l.mI[1]=function(){l.L8.call(this);
this.ake=new l.zF(256,1);this.aar=q.f(256*4);var n="\t\t\t\tprecision mediump float;\t\t\t\t"+l.Qr.Ir+"\t\t\t\t"+l.Qr.Px+"\t\t\t\t"+l.Qr.OQ+"\t\t\t\t\t\t\t\tuniform sampler2D source;\t\t\t\tuniform sampler2D map;\t\t\t\tuniform float cfa; \t\t\t\tuniform float cfb; \t\t\t\tuniform int colorize; \t\t\t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\t\t\tvoid main(void) { \t\t\t\t\tvec4 src = texture2D(source, sCoord);\t\t\t\t\tvec3 rgb = src.rgb;\t\t\t\t\tfloat mn=min(rgb.r,min(rgb.g,rgb.b)), mx = max(rgb.r,max(rgb.g,rgb.b));\t\t\t\t\t\t\t\t\t\tvec3 hsl = rgbToHsl(rgb); \t\t\t\t\tfloat h = hsl.r, s = hsl.g, l = hsl.b; \t\t\t\t\t\t\t\t\t\tvec4 mapv = texture2D(map, vec2(h, 0));\t\t\t\t\tfloat nh = mapv.r; \t\t\t\t\tfloat sc = mapv.g*2.0-1.0; \t\t\t\t\tfloat lc = mapv.b*2.0-1.0; \t\t\t\t\t\t\t\t\t\tfloat cf = -lc, tv=mn;\t\t\t\t\tif(0.0<lc) {  cf=lc;  tv=mx;  }\t\t\t\t\t\t\t\t\t\tfloat a0 = cfa + cfb*cf*tv, a1 = cfb*(1.0-cf);\t\t\t\t\trgb = a0 + a1 * rgb;\t\t\t\t\t\t\t\t\t\thsl = rgbToHsl(rgb);  s = hsl.g;  l = hsl.b; \t\t\t\t\tfloat ns = sc; \t\t\t\t\tif(colorize==0) {\t\t\t\t\t\tif(sc>0.0) sc = pow(tan((3.14159265359/2.0)*sc),1.3);\t\t\t\t\t\tns = min(s * (1.0 + sc), 1.0); \t\t\t\t\t} \t\t\t\t\t\t\t\t\t\tgl_FragColor = vec4(hslToRgb(nh,ns,l),src.w); \t\t\t\t\t\t\t\t\t}";
this.Nf(n,l.Ju.Z4)};l.mI[1].prototype=new l.L8;l.mI[1].prototype.lf=function(n,F){q.Eb({Q:F.ab4,l:F.A3,O:F.a7w,R:q.f(256)},this.aar);
this.ake.set(this.aar);this.Jr(["source","map","cfa","cfb","colorize"]);var O=l.Vo,I=this.bm;O.uniform1f(I.cfa,F.ams);
O.uniform1f(I.cfb,F.yy);O.uniform1i(I.colorize,F.akZ);this.et([I.source,n,I.map,this.ake.sg])};l.mI[2]=function(){l.L8.call(this);
var n="\t\t\tprecision mediump float;\t\t\t"+l.Qr.Ir+"\t\t\t"+l.Qr.sy+"\t\t\t"+l.Qr.xN+"\t\t\t"+l.Qr.Px+"\t\t\t"+l.Qr.OQ+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform float vib; \t\t\tuniform float sat; \t\t\tconst float PI = 3.141592653; \t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tvec3 hsl = rgbToHsv(src.rgb); \t\t\t\tfloat h=hsl.r, s=hsl.g, l=hsl.b; \t\t\t\t\t\t\t\tfloat sk0 = 0.0, sk1 = 45.0/360.0; \t\t\t\tfloat skin = (h<sk1) ? cos((PI/2.0)*(h-sk1/2.0)/(sk1/2.0)) : 0.0; \t\t\t\t\t\t\t\ts = s + 0.2 * (1.0-0.4*skin) * vib * max(0.0, sin(s*PI)); \t\t\t\t\t\t\t\ts = s * (1.0 + sat); \t\t\t\t\t\t\t\ts = max(0.0, min(1.0, s));\t\t\t\tsrc.rgb = hsvToRgb(h,s,l);\t\t\t\tgl_FragColor = vec4(src.rgb,src.w); \t\t\t\t\t\t\t}";
this.Nf(n,l.Ju.Z4)};l.mI[2].prototype=new l.L8;l.mI[2].prototype.lf=function(n,F){this.Jr(["source","vib","sat"]);
var O=l.Vo,I=this.bm;O.uniform1f(I.vib,F.b9[0]/100);O.uniform1f(I.sat,F.b9[1]/100);this.et([I.source,n])};
l.mI[3]=function(){l.L8.call(this);var n="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform mat4  trf; \t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tvec4 nsr = vec4(src.rgb,1.0); \t\t\t\tgl_FragColor = vec4((trf*nsr).rgb,src.w); \t\t\t\t\t\t\t}";
this.Nf(n,l.Ju.Z4)};l.mI[3].prototype=new l.L8;l.mI[3].prototype.lf=function(n,F){this.Jr(["source","trf"]);
var O=l.Vo,I=this.bm;O.uniformMatrix4fv(I.trf,!1,new Float32Array(q.e$.ej(F.PS)));this.et([I.source,n])};
l.mI[4]=function(){l.L8.call(this);var n="\t\t\tprecision mediump float; \t\t\t"+l.Qr.Kj+"\t\t\t"+l.Qr.Ir+"\t\t\t"+l.Qr.OQ+"\t\t\t"+l.Qr.Px+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform vec3 mnm;\t  \t\t\tuniform vec3 mxm;\t  \t\t\tuniform vec3 shift;   \t\t\tuniform float lim;    \t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\t\t\t\t\tvec3 lab = rgbToLab(src.rgb);\t\t\t\tfloat scl = labSimilar(lab, mnm,mxm, lim);\t\t\t\t\t\t\t\tvec3 hsv = rgbToHsl(src.rgb); \t\t\t\tfloat nh = 2.0 + hsv[0]+scl*shift[0]; \t\t\t\thsv[0] = fract(nh); \t\t\t\thsv[1] = max(0.0, min(1.0, hsv[1] + scl*shift[1])); \t\t\t\thsv[2] = max(0.0, min(1.0, hsv[2] + scl*shift[2])); \t\t\t\t\t\t\t\tvec3 rgb = hslToRgb(hsv[0], hsv[1], hsv[2]); \t\t\t\t\t\t\t\tgl_FragColor = vec4(rgb,src.w); \t\t\t\t\t\t\t}";
this.Nf(n,l.Ju.Z4)};l.mI[4].prototype=new l.L8;l.mI[4].prototype.lf=function(n,F){this.Jr(["source","mnm","mxm","shift","lim"]);
var O=l.Vo,I=this.bm;O.uniform3fv(I.mnm,new Float32Array(F.BQ));O.uniform3fv(I.mxm,new Float32Array(F.HJ));
O.uniform3fv(I.shift,new Float32Array(F.shift));O.uniform1f(I.lim,F.H9);this.et([I.source,n])};l.mI[5]=function(){l.L8.call(this);
var n="\t\t\tprecision mediump float;\t\t\t"+l.Qr.x6+"\t\t\t"+l.Qr.h0+"\t\t\t"+l.Qr.o7+"\t\t\t"+l.Qr.Px+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform vec3 cfs[18]; \t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tvec3 rgb = src.rgb; \t\t\t\tvec3 hsl = rgbToHsl(rgb); \t\t\t\tfloat mx = max(rgb.r, max(rgb.g, rgb.b)); \t\t\t\tfloat mn = min(rgb.r, min(rgb.g, rgb.b)); \t\t\t\t\t\t\t\tvec3 CMY = ONE3 - rgb; \t\t\t\tvec3 d = ZERO3; \t\t\t\t\t\t\t\tfor(int j=0; j<9; j++) \t\t\t\t{ \t\t\t\t    vec3 NCMY = CMY * cfs[j+j] + cfs[j+j+1]; \t\t\t\t\t\t\t\t\t\tfloat cfK = 0.0;\t\t\t\t\tif     (j< 6) { \t\t\t\t\t\tcfK = hueCF(float(j)*(1.0/6.0), hsl.x); \t\t\t\t\t\tcfK = cfK * hsl.y * 2.0*min(hsl.z, 1.0-hsl.z); \t\t\t\t\t} \t\t\t\t\telse if(j==6) cfK = max(0.0,mn-0.5)*2.0;\t\t\t\t\telse if(j==7) cfK = 1.0-(abs(mx-0.5)+abs(mn-0.5));\t\t\t\t\telse          cfK = max(0.0,0.5-mx)*2.0;\t\t\t\t\t\t\t\t\t\td += (max(ZERO3, min(ONE3, NCMY))-CMY)*cfK; \t\t\t\t} \t\t\t\t\t\t\t\tCMY = max(ZERO3, min(ONE3, CMY+d)); \t\t\t\trgb = ONE3 - CMY; \t\t\t\t\t\t\t\tgl_FragColor = vec4(rgb,src.w); \t\t\t\t\t\t\t}";
this.Nf(n,l.Ju.Z4)};l.mI[5].prototype=new l.L8;l.mI[5].prototype.lf=function(n,F){this.Jr(["source","cfs"]);
var O=l.Vo,I=this.bm;O.uniform3fv(I.cfs,F.aje);this.et([I.source,n])};l.mI[6]=function(){l.L8.call(this);
var n="\t\t\tprecision mediump float;\t\t\t"+l.Qr.Ir+"\t\t\t"+l.Qr.h0+"\t\t\t"+l.Qr.o7+"\t\t\t"+l.Qr.Px+"\t\t\t"+l.Qr.OQ+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform float wght[6]; \t\t\tuniform float prms[6]; \t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tvec3 rgb = src.rgb; \t\t\t\t\t\t\t\tfloat tint=prms[0], hue=prms[1], lum=prms[2], mcf=prms[3], x0=prms[4], x1=prms[5]; \t\t\t\tvec3 hsl = rgbToHsl(rgb); \t\t\t\t\t\t\t\tfloat cf = 0.0;\t\t\t\tfor(int j=0; j<6; j++) cf += min(1.0, 1.7*(1.0-hsl.z)) * hsl.y *  wght[j] * hueCF(hsl.x, float(j)*(1.0/6.0));\t\t\t\t\t\t\t\tfloat lig = max(0.0, min(1.0, hsl.z*(1.0+cf)));\t\t\t\tif(tint==1.0) {  \t\t\t\t\tfloat totl = 0.0;\t\t\t\t\tif     (lig<x0) totl = lig*(0.5/lum); \t\t\t\t\telse if(lig<x1) totl = lig + (mcf)*(0.5 - lum); \t\t\t\t\telse            totl = 1.0 - (1.0-lig)*0.5/(1.0-lum); \t\t\t\t\t\t\t\t\t\thsl.x = hue;  \t\t\t\t\thsl.y = min(1.0, mcf + 3.0*mcf*abs(lig-0.5*(x0+x1))); \t\t\t\t\thsl.z = totl; \t\t\t\t} \t\t\t\telse {  hsl.x=0.0;  hsl.y=0.0;  hsl.z=lig;  } \t\t\t\t\t\t\t\trgb = hslToRgb(hsl.x, hsl.y, hsl.z); \t\t\t\t\t\t\t\tgl_FragColor = vec4(rgb,src.w); \t\t\t\t\t\t\t}";
this.Nf(n,l.Ju.Z4)};l.mI[6].prototype=new l.L8;l.mI[6].prototype.lf=function(n,F){this.Jr(["source","wght","prms"]);
var O=l.Vo,I=this.bm,x=[F.Xn,F.al$,F.wO,F.a0j,F.Mf,F.a8y];O.uniform1fv(I.wght,new Float32Array(F.a6R));
O.uniform1fv(I.prms,new Float32Array(x));this.et([I.source,n])};l.mI[7]=function(){l.L8.call(this);this.AS={};
var n="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D lut;\t\t\tuniform float N;\t\t\t\t\t\tvarying vec2 sCoord;\t\t\t\t\t\tvoid main(void) { \t\t\t\tfloat iN = 1.0/N; \t\t\t\tvec4 src = texture2D(source, sCoord); \t\t\t\tfloat fb = 0.5*iN + src.b*(1.0-iN); \t\t\t\tfloat fg = 0.5*iN + src.g*(1.0-iN); \t\t\t\tfloat R  = src.r*(N-1.0)*0.999999; \t\t\t\tfloat ir = floor(R)*iN;  \t\t\t\t\t\t\t\tvec4 c0 = texture2D(lut, vec2(fb, ir   +( fg   )*iN)); \t\t\t\tvec4 c1 = texture2D(lut, vec2(fb, ir+iN+( fg   )*iN)); \t\t\t\tvec4 rs = mix(c0,c1,R-floor(R));  \t\t\t\tgl_FragColor = vec4(rs.rgb,src.w); \t\t\t\t\t\t\t}";
this.Nf(n,l.Ju.Z4)};l.mI[7].prototype=new l.L8;l.mI[7].prototype.lf=function(n,F){this.Jr(["source","lut","N"]);
var O=l.Vo,I=this.bm,x=F.CU,r=F.aN;if(this.AS["m"+x]==null)this.AS["m"+x]=new l.zF(x,x*x);var _=this.AS["m"+x];
_.set(r);O.uniform1f(I.N,x);this.et([I.source,n,I.lut,_.sg]);O.activeTexture(O.TEXTURE1);var d=O.LINEAR;
O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MIN_FILTER,d);O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MAG_FILTER,d);
O.activeTexture(O.TEXTURE0)};l.filter={cT:{},Z4:"1u,/0*&<>2OI;<m^XJZ;]d/vp^r|ows/)z{M>5g7:@5nVPLIGeVMX`|njge-'&-$V&)/$BbHB4D%GNx`KSI=_f_menp%E+%vwKB4&'XQY``edhootpjxp&%*'vhxY{#>5HINMDXX]YnVW",qc:0,bT:1,cw:2,pM:3};
l.filter.Yn=function(n,F){var O=l.filter,I=[O.qc,O.bT,O.cw,O.pM].indexOf(n.type),x=l.filter.cT[n.type];
if(x==null)x=l.filter.cT[n.type]=new l.cT[I];x.vM();x.lf(F,n);l.Vo.drawArrays(l.Vo.TRIANGLES,0,6)};l.cT=[0,0,0,0,0,0,0];
l.cT[3]=function(){l.L8.call(this);var n="1%* !*709;O@;=ETOUgQZ`Uk5rnllx~|2)y)/.*:\\qPGFOOCH!^ZXXdjh}wij<-y+~T2.,,8><Q;DJ?Uc[NR`.kgeeqwu+t}$x/=36(.gEA??KQOd^PQ#sjjbc>{wuu\"(&;5'(ZJ<@=JtRNLLX^\\qbYo2!tvv'@N,(&&286K<3IkZNPP`z(fThremi%~pqC4+]-06+d/?BBXEM2TTdugYZ.|v,\" qrF5)X,#=OAWACCSlkYoY[[k&!6pfx||{0!w2D-$>P<\\J`HhWioTKewc$s(o0|14JNDEJX>:,-_OE7G@qi[MN!pdo&|vhi<, ,>42$%WG=/H*8FySLTp\\g{&))4:;7CC;$0CSRPXZ_cg]Wd]quw~$}'-/50=wm $$#7-~8y(6L\\R<EKNTlZLeGUc#8}ykl?/yv./QI;-.`PDOe\\VHI{k_k}smcuyyx-8&w(!RJ6AW?K]bM?OHyq}}%'#lw.66B8\".@E0\"2+\\Tb`fbLXmxu\"wal %oaqj<4?@KOE/;PWXea]GRe_owv{nz~))3<\"}opC3,(&&UM?12dTHSi`ZLM oco\"wqgy}}|1'x)\"SK7BX@L^bmlqqxx},qZiksw&ox~s*8kpda^Z[`nMIFDbSJU]ykgdb* }opD3*|)2_:.DCGG=l\"hWV__SX\"xoBqtzo7Lz$*~5C+/=D;r:>RiYLP^}gZfo.z/Dr{\"v-;1#)d/3AH?cORDJ$UUygY_~>45:6,*{|O?6;6f5>D9O]T[$yz ~ubjb?66;Iw$*B$-3(>LIob).\"|^$(>C72s(+,\"rzrOFFKK+3+e77[PuiRDJehh0gY_'!gvx\"y\",~W&28P2;A6LZV}p7<0+k26LQE@!6KCBGC9'06+AO6NuTiKSK&WW{o6*rdj&)(P(y GA(79B:BL?wIImiU]Bddt&wij>5s,B3H2$*T[\\a]`c]DSU^V^h[4rde9(nz$Q, 6599/^sZIHQQEJsja4cfla+ykl>7u.D5GK.?3Vk:CI>TbIM)PTh obft4my#A.BW&/5*@N3K?wmnvpMYb!h$,-7>2nz$B~EMNTWS0<Ec;vENTI_mWfZ7pphi7%9uyB~#\\..R/G;tMMEFsbtnUaj)phfD2>>CC /#KO,8A_G?=]kcM\\Pyi[\\/'9384Iw!'{2@49>iW6:t@DRYPj-p{~^bpwn6os;D|!/6-PJgP[:>y|rsx+~ %2#ae1ko}%{?H $KNc2;A6LZAX!ww||chm7ry0En&L(-(H]'>S0<EcKCA|beywX`V@oajIxx~%R\"*n11ARD67jaippus_2adj_,y.98=<@GGLJ6h8;A6bQdonsrzx {~8rde90<:B@HFNI]=/0cZedkjqpxs)z#vm`luC qrF=,1,P8?V^^c_tZVHI{k_S2n`a4,zM| &zG5K6h8;A6bQfontp]0_bh]*w+@~pqD4(|Z7)*\\TCuEHNCo^s}{#',$pCru{p=+AJIQK8j:=C8dSezYKL~n`dk`;osp};*PSIJOBdHA=;;jbNBoWLuo-u`]tu80{o=%yCX**N8<9FcSx{rrwsm_cj_+x@tx t@/U*.5*UEhD7CLjRJHhv,yY]kri.uyv$A/BF.29.f6>4}M?H'VV\\b0i\\hq=#";
this.Nf(V.by(n),V.by(l.filter.Z4))};l.cT[3].prototype=new l.L8;l.cT[3].prototype.lf=function(n,F){this.Jr("source iwh tdep rrad spec nois poly0 poly1".split(" "));
var O=l.Vo,I=this.bm;O.uniform2fv(I.iwh,F.Rl);O.uniform1f(I.tdep,F.ahg);O.uniform1f(I.rrad,F.akP);O.uniform2fv(I.spec,F.ah5);
O.uniform3fv(I.nois,F.ac5);O.uniformMatrix4fv(I.poly0,!1,F.aaM);O.uniformMatrix4fv(I.poly1,!1,F.akV);
this.et([I.source,n]);var x=O.LINEAR;O.activeTexture(O.TEXTURE0);O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MIN_FILTER,x);
O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MAG_FILTER,x);O.activeTexture(O.TEXTURE0)};l.cT[0]=function(){l.L8.call(this);
var n="1%* !*709;O@;=ETOUgQZ`Uk5|uqoo{\" 5,|,21-=_tSJIRRFK$kd`^^jpn$}opB3 1%ZB;755AGEZTFGyiYT.unjhhtzx.w!'{2@7/3;5mUO=Q[NVRmgYZ,|sFux~sM5~(.#9G23E'?;AOZm_QR$th$}|$mv|q(62M?_E=1GFJJ@o%kZYbbV[%{o-{mn@9AHHMLCVW\\X\\?PDgo\\#jT]cXn|x5&F,$w.-11'VkRA@II=BkbVsbTU' z//43*=>C?C&7+NVCiQ;DJ?Uc`zl-rj^tswwm=R9('00$)RI=ZI;<mfatuzy}%%*&*l}q5=*P8\"+1&<JGbSsYQE[Z^^T$9 nmvvjo90$A0\"#TMH[\\a`WkkplpSdX{$p7~hqwl#1x0J=]CVWc[R:Qm^~doc }l(#8 irxm$2y2L>^DWXd\\S;Sn_ epe!~n)$9!zlm@0\"6V<.286-;;O=bTFGyqyTk(#`x31(8r*DA~7ROF.E_\\:Rlgj g]Seiih|drz1xs>$AV>?D>:75SD;FNj\\XUSztszdmsh~-({6V<PPUHVN9:L.FBHVatc6ehnc+/{sw yR:%-#l<.7uEEKQa\"g_Sihllb2G.|{%%x}G>5g7:@5\\`QEzbc";
this.Nf(V.by(n),V.by(l.filter.Z4))};l.cT[0].prototype=new l.L8;l.cT[0].prototype.lf=function(n,F){this.Jr(["source","iwh","ld","shine"]);
var O=l.Vo,I=this.bm;O.uniform2fv(I.iwh,F.Rl);O.uniform3fv(I.ld,F.a1H);O.uniform1f(I.shine,F.aly);this.et([I.source,n,I.tang,F.Wt])};
l.cT[1]=function(){l.L8.call(this);var n="1%* !*709;O@;=ETOUgQZ`Uk5|uqoo{\" 5,|,21-=_tSJIRRFK$kd`^^jpn$}opB3 1%ZB;755AGEZDMSH^lYfY4{tpnnz!~4}'-\"8F,?9FJEAya[I]gZb^ysef8) R\"%+ YA+4:/ES?;PHjLU[Pfths*!jsyn%3'3E?>E/8>3IWM?X:HVl-ribj'r}2<??JPQMYYQ:FYihfnpuy}smzs(,.5:4=CEKFS;1'9==<PF8Q3AOeukU^dgm&se~`n|<Q9:?)28-CQ<=O,PMZOtfXY+{n+%$+%vwI:.@`FQ<ZI;<mfwuzx}|%(1+0,/3u#uP82$%VG9>PpV@IORXp\\w-tn`a3$u|]0P6*I.3`H2;A6LZQqt$]V^z'**/+@(\"stF7}M@`F-<CZDIdhUux&mgYZ,|c4&F,r\")@*/L;-._Xddihppuqtxe&)6}gpvk\"0\"6V<($91S2abPfApq`r(oYbh]s\"sz+K1|x.&H'WWE[6efUg|dNW]Rhvha @&qm#z={KL:P+[[J\\qYCLRG]k]dYw8}iezr5sDD2H#SSBTiQ;DJ?UcOzl-rcbt'p%4+|$@&-mN<OdL6?E:P^Jvg(m^]o\"kd/t{p;!(hI7J_G1:@5KYS_ eVUgy])'}i63x `A0BW?9EeKVHTsZmnxoi,o#$)6005C+t}$x/=373>LlRLXf^DWQ^b]Yv$|hdyq4r\")@,L:MQ>^a_:IPgSsbtxe&)$9!vl~##\"6,0,7OP\\\\acjhmi~fglfb_]{lcnv3%!}{C=<C=/0aRNR[{aX+Z]cX&cth>& qrF5{++AaG?3IHLLBq'm\\[ddX]'}tGvy t<Q9 //S*KkQ<=O,PMZOthl~4{fndN}oxW''-3CcI0??pXY";
this.Nf(V.by(n),V.by(l.filter.Z4))};l.cT[1].prototype=new l.L8;l.cT[1].prototype.lf=function(n,F){this.Jr(["source","iwh","isc","bristle"]);
var O=l.Vo,I=this.bm;O.uniform2fv(I.iwh,F.Rl);O.uniform1f(I.isc,F.a8b);O.uniform1f(I.bristle,F.aaE);
this.et([I.source,n])};l.cT[2]=function(){l.L8.call(this);var n="1%* !*709;O@;=ETOUgQZ`Uk5|uqoo{\" 5,|,21-=_tSJIRRFK$kd`^^jpn$zkz! {,NcB:*:6lTMIGGSYWlfXY+{hymC+$ }}*0.C-6<1GULEFOF#jc_]]iom#lu{p'5}4/1_GA/CM@HD_YKL}ne8gjpe?'py t+94%,-1@NY;DJ?Uc_rlkrh^ptts(p'\"<7G.0;NBX5KFHdmivuzwd]^g^*vopyp;5AV>?D>:75SD;FNj\\XUSztszdmsh~-x+S-&'0'S?89B9u]GPVKaofmx9~338F.(yzN=494IiOG;QPTTJy/udcll`e/&|O~\"(|DYA;-._P:GYy_tsxuvfZpossi9N5%t%!H?6h8;A6]eSWmZLM~w#$.(/0:14I1+|}O@(FfL6CpXBNTlQYbp]4*8 lB;G/{@CD>=D>01bSGYy_V)X[aV0wams,mv|q(6,YOPUcKAmfgjmns\"i_z}~xw~xjk=.~x7W=RQVSTD8NMQQGv,rbRb^&|p,4\"&<)z{MFQR\\V]^h_bw_LLpP^f|e_*e-C:;@<65<-'bU93lTUZB`!fWQ+rfx'<\"rl5w)|R:$-3(>LGRrXSDKLP_uc|2ypup&4I/*?-!76::0_t[JIRRFKtk_z0wnu,A~E-yy>,Z\\+=QK1D:9Fx`afN*|Yf4{|\"ltjT$u~]--39IiOFKFefrrwyah|2yz";
this.Nf(V.by(n),V.by(l.filter.Z4))};l.cT[2].prototype=new l.L8;l.cT[2].prototype.lf=function(n,F){this.Jr(["source","tang","iwh","sigma","expo"]);
var O=l.Vo,I=this.bm;O.uniform2fv(I.iwh,F.Rl);O.uniform1f(I.sigma,F.amp);O.uniform1f(I.expo,F.a2v);this.et([I.source,n,I.tang,F.Wt]);
var x=O.LINEAR;O.activeTexture(O.TEXTURE0);O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MIN_FILTER,x);O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MAG_FILTER,x);
O.activeTexture(O.TEXTURE0)};l.p={};l.p.AY={};l.p.me=null;l.p.N4=null;l.p.jA=null;l.p.$p=function(n,F,O,I,x,r,_,d){if(d==null)d=ha.gm();
if("idiv,lbrn,div ,lddg,vLit,lLit,hMix,diff".split(",").indexOf(n)==-1){_=_*d.fill;d.fill=1;d.style=!1}var w=n+(d.ni?"1":"");
if(l.p.AY[w]==null)l.p.AY[w]=new l.p.db(n,d.ni!=null);var Z=l.p.AY[w],P=O.lN(x).lN(r);P.offset(-x.x,-x.y);
if(P.D2())return;var C=l.Vo;l.wu(I,P);I.ww(P);Z.vM();Z.lf(F.sg,I.Lu,l.qq(O,x),_,d.fill,d.style?1:0,d.rU?1:0,d.ni?new Float32Array(d.ni):null);
C.drawArrays(C.TRIANGLES,0,6)};l.p.t_=function(n,F,O,I,x,r,_,d,w,Z,P){if(l.p.me==null)l.p.me=new l.p.WX(!0,!0);
if(l.p.N4==null)l.p.N4=new l.p.WX(!0,!1);if(l.p.jA==null)l.p.jA=new l.p.WX(!1,!0);var C=Z?1:0,W=n?x?l.p.me:l.p.N4:l.p.jA,v=new Float32Array(P?[P[0],P[1],P[2],1]:[1,1,1,1]),L=F?F.lN(I).lN(d):I.lN(d);
if(L.D2())return;L.offset(-I.x,-I.y);var H=l.Vo;l.wu(O,L);O.ww(L);W.vM();if(n==null)W.lf(null,O.Lu,x.sg,l.qq(I,I),l.qq(r,I),_/255,w,C,v);
else if(x)W.lf(n.sg,O.Lu,x.sg,l.qq(F,I),l.qq(r,I),_/255,w,C,v);else W.lf(n.sg,O.Lu,null,l.qq(F,I),null,_/255,w,C,v);
H.drawArrays(H.TRIANGLES,0,6)};l.p.a2m=function(n,F,O){if(l.p.a3N==null)l.p.a3N=new l.p.KU;var I=l.p.a3N,x=new gv(0,0,n.d,n.v),r=l.Vo;
l.wu(F);F.ww(x);I.vM();I.lf(x,n.sg,F.Lu,O.sg);r.drawArrays(r.TRIANGLES,0,6)};l.p.wZ={norm:"return a;",diss:"return a;",dark:"return min(a,b);","mul ":"return a*b;",idiv:"  vec3 d = (a*vec3(f)+ONE3-vec3(f));  return mix(mix(ONE3-((ONE3-b)/max(d,vec3(1e-6))), ZERO3, vec3(greaterThanEqual(ONE3-b,d)) ), ONE3   ,   vec3(equal(b,ONE3) ));   ",lbrn:"return max(ZERO3, a*f+b-f);",dkCl:"return ( lum(a)<lum(b) ? a : b );",lite:"return max(a,b);",scrn:"return b+a-b*a;","div ":"a*=f;  return mix(    mix(  min(ONE3,b/(1.0-a)), ONE3,  step(1.0-a, b))     , ZERO3, vec3(equal(b,ZERO3)) );",lddg:"a*=f;  return min(ONE3,a+b);",lgCl:"return ( lum(a)>lum(b) ? a : b );",over:"return mix( a+(2.0*b -1.0)-a*(2.0*b-1.0) ,  2.0*b*a , step(-HALF3,-b) );",sLit:"return mix( b+(2.0*a -1.0)*(D(b)-b)  , b-(1.0-2.0*a)*b*(1.0-b) , step(-HALF3,-a) );",hLit:"return mix( b+(2.0*a -1.0)-b*(2.0*a-1.0) ,  2.0*a*b , step(-HALF3,-a) );",vLit:" return mix( ocddg(2.0*a-1.0,b,f)  ,  ocbrn(2.0*a,b,f)  ,  vec3(greaterThanEqual(HALF3,a))); ",lLit:"return mix( min(ONE3, (2.0*a-1.0)*f+b) , max(ZERO3, 2.0*a*f+b-f)  , step(-HALF3,-a));",pLit:"return mix( max(2.0*a-1.0,b) , min(2.0*a, b) , step(-HALF3,-a)  );",hMix:"if(f>0.99) return vec3(greaterThanEqual(a+b,ONE3));   return  min( ONE3, max(ZERO3,  (b+a*f-f)/(1.0-f+1e-6)  ))  ;  ",diff:"return abs(a*f-b);",smud:"return a+b-2.0*a*b;",fsub:"return max(b-a, ZERO3);",fdiv:"return min(b/a, ONE3);","hue ":"return  setLum( setSat(a, sat(b)) , lum(b) ); ","sat ":"return  setLum( setSat(b, sat(a)) , lum(b) ); ",colr:"return  setLum( a, lum(b) ); ","lum ":"return  setLum( b, lum(a) ); "};
l.p.db=function(n,F){l.L8.call(this);var O="\t\t\tprecision mediump float;\t\t\t"+l.Qr.x6+"\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D target;\t\t\tuniform float alpha;\t\t\tuniform float fill;\t\t\tuniform float style;\t\t\tuniform float keepBGA;\t\t\t"+(F?"uniform vec4 blIf[10];":"")+"\t\t\t\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\t\t\t\t\t\t\t"+l.Qr.Il+"\t\t\t"+l.Qr.wO+"\t\t\t"+l.Qr.m9+"\t\t\t"+l.Qr.ak9+"\t\t\t"+l.Qr.a2P+"\t\t\t"+l.Qr.a0S+"\t\t\t"+l.Qr._M+"\t\t\t"+l.Qr.am_+"\t\t\t"+l.Qr.b6+"\t\t\t"+l.Qr.hash+"\t\t\t"+(F?l.Qr.$V:"")+"\t\t\t\t\t\tvec3  BB(vec3  a, vec3  b, float f) { "+l.p.wZ[n]+" } \t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 tgt = texture2D(target, tCoord);\t\t\t\tvec4 src = texture2D(source, sCoord);",I="\t\t\tattribute vec2 verPos;\t\t\tuniform vec4 srct;\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvoid main(void) {\t\t\t\ttCoord = verPos;\t\t\t\tsCoord = (verPos-srct.xy)/srct.zw;\t\t\t\tgl_Position = vec4(vec2(-1.0,-1.0) + 2.0*verPos, 0.0, 1.0);\t\t\t}";
if(n=="diss")O+="\t\t\t\t\tgl_FragColor = (hash(tCoord) >= (keepBGA + (1.0-keepBGA)*src.w)*alpha ? tgt : vec4(src.xyz, keepBGA*tgt.w + (1.0-keepBGA)));  }";
else O+="  \t\t\t\t\tfloat as = (keepBGA + (1.0-keepBGA)*src.w) * alpha, at = keepBGA + (1.0-keepBGA)*tgt.w; \t\t\t\t\t"+(F?"  as*=blendIf(src,tgt,blIf);  ":"")+"\t\t\t\t\tfloat ats = at * (1.0-as), ao = as + ats, iao = (ao==0.0) ? 0.0 : (1.0/ao); \t\t\t\t\tfloat ccf = (style==1.0) ? 1.0 : as; \t\t\t\t\tvec3 ncl = ( (1.0-at)*as*src.xyz + (1.0-ccf)*at*tgt.xyz + ccf*at*BB(src.xyz, tgt.xyz, (1.0+as-ccf)*fill)  ) * iao;\t\t\t\t\tgl_FragColor = vec4(ncl, keepBGA*tgt.w + (1.0-keepBGA)*(as*fill + at*(1.0-as*fill)));\t\t\t\t\t\t\t}";
this.Nf(O,I)};l.p.db.prototype=new l.L8;l.p.db.prototype.lf=function(n,F,O,I,x,r,_,d){this.Jr("srct alpha source target fill style keepBGA blIf".split(" "));
var w=l.Vo,Z=this.bm;w.uniform4fv(Z.srct,O);w.uniform1f(Z.alpha,I);w.uniform1f(Z.fill,x);w.uniform1f(Z.style,r);
w.uniform1f(Z.keepBGA,_);if(d)w.uniform4fv(Z.blIf,d);this.et([Z.source,n,Z.target,F])};l.p.WX=function(n,F){l.L8.call(this);
this.alM=n;this.f2=F;var O="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D target;\t\t\tuniform sampler2D weight;\t\t\tuniform vec4 cswitch;\t\t\tuniform float wcolor;\t\t\tuniform float awg; /* additional weight */\t\t\tuniform float dissv;\t\t\t\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvarying vec2 wCoord;\t\t\t\t\t\t"+l.Qr.lm+"\t\t\t"+l.Qr.hash+"\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 tgt = texture2D(target, tCoord);\t\t\t\tvec4 src = "+(n?"texture2D(source, sCoord)":"vec4(0.0)")+"; \t\t\t\tfloat wg = awg "+(F?"* (in01(wCoord) ? texture2D(weight, wCoord).w : wcolor)":"")+";\t\t\t\t"+(n?"":"wg = 1.0-wg;")+"\t\t\t\tfloat hwg = hash(tCoord)>=wg ? 0.0 : 1.0;  wg = dissv*hwg + (1.0-dissv)*wg; \t\t\t\tfloat as = wg*src.w, at = (1.0-wg)*tgt.w, ao = as+at;\t\t\t\t\t\t\t\tvec4 nc = vec4( (as*src.xyz + at*tgt.xyz)/ao, ao );  \t\t\t\tgl_FragColor =  "+(F?"nc":"cswitch*nc + (1.0- cswitch)*tgt")+";    \t\t\t}",I="\t\t\tattribute vec2 verPos;\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvarying vec2 wCoord;\t\t\t\t\t\tuniform vec4 srct;\t\t\tuniform vec4 wrct;\t\t\tvoid main(void) {\t\t\t\ttCoord = verPos;\t\t\t\tsCoord = (verPos-srct.xy)/srct.zw;\t\t\t\twCoord = (verPos-wrct.xy)/wrct.zw;\t\t\t\tgl_Position = vec4(vec2(-1.0,-1.0) + 2.0*verPos, 0.0, 1.0);\t\t\t}";
this.Nf(O,I)};l.p.WX.prototype=new l.L8;l.p.WX.prototype.lf=function(n,F,O,I,x,r,_,d,w){if(this.f2)this.Jr("srct wrct wcolor awg dissv source target weight cswitch".split(" "));
else this.Jr("srct awg dissv source target cswitch".split(" "));var Z=l.Vo,P=this.bm;Z.uniform4fv(P.srct,I);
if(this.f2){Z.uniform4fv(P.wrct,x);Z.uniform1f(P.wcolor,r)}else{Z.uniform4fv(P.cswitch,w)}Z.uniform1f(P.awg,_);
Z.uniform1f(P.dissv,d);var C=[P.source,n,P.target,F];if(this.f2)C.push(P.weight,O);this.et(C)};l.p.KU=function(){l.L8.call(this);
var n="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D prev;\t\t\tuniform sampler2D next;\t\t\tuniform sampler2D alpha;\t\t\t\t\t\tvarying vec2 coord;\t\t\t\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec3 or = texture2D(prev , coord).rgb;\t\t\t\tvec3 ir = texture2D(next , coord).rgb; \t\t\t\tfloat al = texture2D(alpha, coord).w; \t\t\t\tgl_FragColor =  vec4(  (ir-(1.0-al)*or)*(1.0/al)   ,1.0 );  \t\t\t}",F="\t\t\tattribute vec2 verPos;\t\t\tvarying vec2 coord;\t\t\t\t\t\tuniform vec4 rct;\t\t\tvoid main(void) {\t\t\t\tcoord = verPos;\t\t\t\tgl_Position = vec4(vec2(-1.0,-1.0) + 2.0*verPos, 0.0, 1.0);\t\t\t}";
this.Nf(n,F)};l.p.KU.prototype=new l.L8;l.p.KU.prototype.lf=function(n,F,O,I){this.Jr(["rct","prev","next","alpha"]);
var x=l.Vo,r=this.bm;x.uniform4fv(r.rct,[0,0,1,1]);this.et([r.prev,F,r.next,O,r.alpha,I])};var c={};
c.Fq=function(n,F,O){this.name=n;this.id=F;this.ta=null;if(O!=null)this.lp=O};c.Fq.prototype.fM=function(n,F,O,I,x){};
c.Fq.prototype.enable=function(n,F,O,I,x,r){var _=new k(V.E.P,!0);_.data={e:V.U.VC,dx:"default"};F.A(_)};
c.Fq.prototype.disable=function(n,F,O,I,x){};c.Fq.prototype.Dw=function(n,F,O,I,x){return!1};c.Fq.prototype.XS=function(n,F,O,I,x){};
c.Fq.prototype.Zp=function(n,F,O,I,x){};c.Fq.prototype.RL=function(n,F,O,I,x){};c.Fq.prototype._X=function(n,F,O,I,x){};
c.Fq.prototype.e9=function(n,F,O,I,x){};c.Fq.prototype.Ka=function(n,F,O,I){};c.Fq.prototype.jv=function(n,F,O,I){};
c.Fq.prototype.Xe=function(n,F){};c.Fq.prototype.cQ=function(n,F){};c.Fq.prototype.wl=function(n,F,O,I,x){};
c.Fq.prototype.XW=function(n,F){};c.Fq.prototype.JF=function(n,F){return!1};c.Fq.prototype.jn=function(n,F){return!1};
c.Fq.prototype.A5=function(){return!1};c.Fq.prototype.CD=function(n,F){return!0};c.Fq.prototype.gj=function(){return null};
c.Fq.prototype.fu=function(n,F,O){};c.Fq.prototype.bE=function(){return!1};c.Fq.prototype.VG=function(n,F,O,I){};
c.Fq.prototype.track=function(n){var F=new k(V.E.JA,!0);F.data=n;n.Vw=!0;this.ta.A(F)};c.Fq.Ji=function(n,F,O,I,x){c.Fq.Li(n,F,[hl.get([12,41]).charAt(0)+": "+q.Mm.xp(O.d,I.gC,x,I.d,!0),hl.get([12,42]).charAt(0)+": "+q.Mm.xp(O.v,I.gC,x,I.v,!0)],I)};
c.Fq.Li=function(n,F,O,I){var x=14,r=130,_=O.length*17+8,d=new gv(n,F-_,r,_),w=c.Fq.MV;if(w==null)w=c.Fq.MV=document.createElement("canvas");
w.width=r;w.height=_;var Z=w.getContext("2d");Z.fillStyle="rgba(0,0,1,1)";Z.fillRect(0,0,r,_);Z.font=x+"px monospace";
Z.fillStyle="rgba(255,255,255,1)";for(var e=0;e<O.length;e++)Z.fillText(O[e],6,(e+1)*17);I.M.s3=[[Z.getImageData(0,0,r,_).data,d.clone()]]};
c.Fq.MV=null;c.AK="0";c.FT="1";c.alm="2";c.a4X="3";c._B="5";c.am3="6";c.a9k="7";c.QT="8";c.qR="9";c.qa="10";
c.Af="11";c.si="12";c.E4="13";c.SQ="14";c.aj_="16";c.A6="18";c._s="19";c.B_="20";c.ac="21";c.ow="22";
c.pY="23";c.$a="24";c.uU="25";c.it="27";c.CV="31";c.a91="32";c.aiX="34";c.aji="35";c.dz="36";c.iZ="37";
c.GD="38";c.PY="39";c.tN="40";c.YC="41";c.O_="42";c.oy="43";c.ua="47";c.jU="51";c.kd="52";c.tq="54";
c.kP="55";c.d0="56";c.SK="57";c.Fy="58";c.Ud="59";c.agJ="60";c.o8="61";c.KR="100";c.UR="101";c.hD="102";
c.bU="120";c.Np="230";c.a01="231";c.dA="232";c.lo="233";c.UQ="234";c.HI="235";c.rY="236";c.H8=function(n){var F=c.b_,O=null;
for(var I in F)if(F[I][1].indexOf(n[1].classID)!=-1)O=I;return O};c.b_={};c.b_[c.pY]=["tools/brush",["PbTl"]];
c.b_[c.$a]=["tools/pencil",["PcTl"]];c.b_[c.CV]=["tools/eraser",["ErTl"]];c.P6=function(n,F,O){c.Fq.call(this,n,F,O);
this.ka={brush:n?e1.sW():null,bmode:"norm",opacity:1,flow:1,smth:0,samp:0,prsr:[!1,!0],emode:0,wconf:[40,!0,!0],algnd:!1,sfrom:0,alt:[!1],expo:.5,rng:1,strn:.5,pdetail:!0,smode:1,qsmode:0,setop:"front",patch:0};
this.GL=null;this.IY=null;this.vD=null;this.py=null;this.w6=null;this.wh=null;this.NB=null;this.B6=null;
this.oq=null;this.Jc=null;this.GS=null;this.jd=null;this.xA=null;this.uN=1;this.U5=!1;this.W6=null;this.caller=null};
c.P6.prototype=new c.Fq;c.P6.prototype.jn=function(n,F){return n.rt&&F.q(u.MQ)};c.P6.prototype.Zp=function(n,F,O,I,x){if(I.q(u.pI)){this.wh=new aE(x.x,x.y);
var r=this.ka.brush.Brsh.v,_=r.Dmtr.v.val,d=r.Hrdn!=null?r.Hrdn.v.val:-1;this.NB=[_,d,!0,JSON.parse(JSON.stringify(this.ka.brush)),x];
this.pa(O)}};c.P6.prototype.dh=function(n,F,O){var I=this.NB,x=n.a.K,r=O.x-I[4].x,_=O.y-I[4].y,d=I[0],w=I[1],Z=Math.abs(r)>Math.abs(_);
if(Z&&I[2]){var P=Math.round(2*r/x);d+=P;O.x-=r-.5*P*x}if(!Z&&!I[2]&&w!=-1){var P=Math.round(.25*_);
w+=P;O.y-=_-4*P}d=Math.max(1,d);w=I[1]==-1?-1:Math.max(0,Math.min(100,w));var C=I[3];C.Brsh.v.Dmtr.v.val=d;
if(w!=-1)C.Brsh.v.Hrdn.v.val=w;this.NB=[d,w,Z,C,O];var W=cb.UD(C,F.ke.J$,x),v=W[1];v.x=Math.round(this.wh.x-v.d/2);
v.y=Math.round(this.wh.y-v.v/2);n.M.zi=[W];var L=n.a.jR(this.wh.x,this.wh.y);n.M.vY={k1:[],b0:[L.x-d/2,L.y,L.x+d/2,L.y]};
if(w!=-1)n.M.vY.b0.push(L.x+50/x,L.y-w/2,L.x+50/x,L.y+w/2);n.zB=!0};c.P6.prototype.e9=function(n,F,O,I,x){if(this.id==c.B_)return;
if(this.wh){this.wh=null;this.X6(JSON.parse(JSON.stringify(this.NB[3])));n.M.zi=[];n.M.vY=null;n.zB=!0;
return}var r=new k(V.E.P,!0);r.data={e:V.U.hO,T:this.id,a7v:"showBrushOpts",RK:new aE(x.Ux+4,x.fw)};
F.A(r)};c.P6.prototype.X6=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.g7,b9:cf.jZ,JM:n};this.caller.A(F)};
c.P6.Lz=function(n,F,O,I,x){if(n==null)n="FrgC";if(F==null)F="norm";if(O==null)O=1;if(x==null)x=!1;var r={classID:"Fl",Usng:{t:"enum",v:{FlCn:n}},Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(O*100)}},PrsT:{t:"bool",v:x},Md:{t:"enum",v:{BlnM:fk.Pw(F)}}};
if(n=="Clr")r.Clr={t:"Objc",v:I};if(n=="contentAware")r.contentAwareColorAdaptationFill={t:"bool",v:!0};
return{oI:"fill",Mk:r}};c.P6.prototype.fM=function(n,F,O,I,x){this.ta=F;var r=O.P4.length;if(r==0&&!O.f7())return;
var _=r!=0?-1-O.P4[0]:O.C[0],d=O.t[_];if(n.e=="fromAction"){var w=n.zC,Z=w.Mk;if(w.oI=="fill"){var P=Z.PrsT?Z.PrsT.v:!1,C=d.add.lspf,H;
if(P){d.add.lspf=C==null?1:C|1}var W=(Z.Opct?Z.Opct.v.val:100)/100,v=Z.Md?fk.X4(Z.Md.v.BlnM):"norm",L=Z.Usng.v.FlCn;
if(L=="contentAware"){if(O.N==null){alert("Select an area to heal first.");return}if(!O.f7())return;
this.Pa(O);this.p2(O,0);var y=O.N,g=q.f(y.rect.X()*4);q.GF(y.channel,g,3);this.cx(O,"sheal",g,y.rect,y.rect);
this.D(O,y.rect);this.finish(O,y.rect)}else{if(L=="FrgC")H=x.nE;else if(L=="BckC")H=x.sI;else if(L=="Blck")H=0;
else if(L=="Wht")H=16777215;else if(L=="Gry")H=8421504;else if(L=="Clr"){var Q=q.W.S_(Z.Clr.v);H=Q.Q<<16|Q.l<<8|Q.O}var J=H>>16&255,A=H>>8&255,p=H>>0&255;
this.VW(O,d,O.N,J,A,p,Math.round(255*W),v,[2,3])}if(P){d.add.lspf=C==null?0:C}}else if(w.oI=="delete"){var U=_<0?1:d.vE,y=O.N,T;
if(y==null)return;var j=_<0?O.TM[-_-1]:U<=0?null:U==1?d.B1():d.Fa(O).r,b=U<=0?d.rect:j.rect,s=U<=0?y.rect.lN(b):y.rect.clone();
if(s.D2())return;var G=s.X();if(U<=0){T=q.f(G*4);q.nF(d.buffer,d.rect,T,s)}else{T=q.f(G);j.extend(s);
q.k9(j.channel,j.rect,T,s)}if(0<=_&&d.WF(O,y)){if(U<=0){q.IW(T,0);q.nF(d.HG.I6,d.HG.Fe,T,s)}else{T.fill(255);
q.k9(d.HG.I6,d.HG.Fe,T,s)}}else{if(U<=0){var z=q.f(T.length>>2);q.xg(T,z,3);q.p.b4(q.CZ(y.rect.X()),y.rect,z,s,y.channel,s,1);
q.GF(z,T,3)}else{var m=q.f(y.rect.X()),J=x.sI>>>16&255,A=x.sI>>8&255,p=x.sI>>0&255;m.fill(Math.round(q.iB(J,A,p)));
q.p.b4(m,y.rect,T,s,y.channel,s,1)}}this.LY(O,!0,[2,2],_,U,s,T)}}if(n.e=="stroke"){var $=n.al7,y=O.N;
if(y==null){y={rect:d.rect.clone(),channel:q.f(d.rect.X())};q.xg(d.buffer,y.channel,3)}var o=ha.Yj($),h=c.pQ.qK(y,Math.ceil(o[0]),Math.ceil(o[1])),H=q.W.S_($.Clr.v),J=Math.round(H.Q),A=Math.round(H.l),p=Math.round(H.O);
this.VW(O,d,h,J,A,p,Math.round(255*$.Opct.v.val/100),fk.X4($.Md.v.BlnM),[14,9])}if(n.e=="fillBMP"){this.wG(O,d,O.N,n.Tv,n.QP,n.WL)}if(n.e=="draw"){var X=n.SS,D=X.rect;
this.Pa(O);var f=O.t[O.C[0]];if(n.acX&&f&&f.vE<=0&&O.P4.length==0){D=ci.ED.s4(X,O);f.buffer=X.buffer.slice(0);
f.rect=D.clone()}else{var R=this.ka.bmode;this.ka.bmode="norm";this.cx(O,"draw",X.buffer,D,D.lN(new gv(0,0,O.d,O.v)));
this.ka.bmode=R}this.D(O,D);O._y=!0;this.finish(O,D,n.WL,n.acX)}};c.P6.prototype.VW=function(n,F,O,I,x,r,_,d,w){var Z=O==null?new gv(0,0,n.d,n.v):O.rect,P=_<<24|r<<16|x<<8|I<<0,C=q.f(Z.X()*4);
q.IW(C,P);this.wG(n,F,O,C,d,w)};c.P6.prototype.wG=function(n,F,O,I,x,r){var _=n.P4.length!=0?-1-n.P4[0]:n.C[0],d=_<0?1:F.vE,w=_<0?n.TM[-1-_]:d<=0?null:d==1?F.B1():F.Fa(n).r,Z=d<=0?F.rect:w.rect,P=O==null?new gv(0,0,n.d,n.v):O.rect,C=O==null?q.cO(n.d*n.v):O.channel,W=P.X(),v,L=null;
if(d<=0){v=q.f(W*4);q.nF(F.buffer,F.rect,v,P)}else{v=q.f(W);w.extend(P);q.k9(w.channel,w.rect,v,P)}if(O!=null)q.DM(C,I);
if(d>0){L=q.f(W);q.L2(I,L)}if(0<=_&&O&&F.WF(n,O)){var H=F.HG.Cv,y=F.HG.Cv.slice(0);if(d<=0)q.Ct(I,y);
else q.Ct(L,y);var g=new hS([2,3],this);g.data={e:"drawtemp",$:n.C[0],vH:d,adB:H,ad$:y};n.p$(g);this.Xe(g.data,n)}else{if(d<=0){var Q;
if(F.LF(0)){Q=q.f(P.X());q.xg(v,Q,3)}q.p.F_(x,I,P,v,P,P,1);if(F.LF(0))q.GF(Q,v,3)}else q.p.b4(L,P,v,P,C,P,1);
this.LY(n,!0,r,_,d,P,v)}};c.P6.prototype.JF=function(n){if(u.yg.indexOf(n)!=-1)return!0;return!1};c.P6.prototype.Ka=function(n,F,O,I){var x=this.ka.brush,r=I.q(u.pI),_=r!=this.U5,d=c.P6.fC(x,I);
if(d!=null)this.X6(d);if(!I.q(u.ep)&&I.gT()!=-1){var w=V.SU(Math.round(this.ka.opacity*100),I.gT())/100;
this._f({opacity:w},F)}if(this.id==c.QT&&_&&n!=null){var Z=this.ka.qsmode;if(Z==2)Z=n.N==null?0:1;else Z=2;
this._f({qsmode:Z},F)}this.U5=r;if(_){if(n)this.uN=n.a.K;this.pa(O,I)}};c.P6.fC=function(n,F){var O=n.Brsh.v.Dmtr.v.val,I=n.Brsh.v.Hrdn!=null?n.Brsh.v.Hrdn.v.val:-1,x=O,r=I,_=F.q(u.MQ);
if(F.q(u.Ag)){if(_)I=25*Math.floor((I-1)/25);else{if(O<=10)O--;else if(O<=50)O=5*Math.floor((O-1)/5);
else if(O<=100)O=10*Math.floor((O-1)/10);else if(O<=200)O=25*Math.floor((O-1)/25);else if(O<=400)O=50*Math.floor((O-1)/50);
else O=100*Math.floor((O-1)/100)}}if(F.q(u.lA)){if(_)I=25*Math.ceil((I+1)/25);else{if(O<10)O++;else if(O<50)O=5*Math.ceil((O+1)/5);
else if(O<100)O=10*Math.ceil((O+1)/10);else if(O<200)O=25*Math.ceil((O+1)/25);else if(O<400)O=50*Math.ceil((O+1)/50);
else O=100*Math.ceil((O+1)/100)}}O=Math.max(1,O);I=Math.max(0,Math.min(100,I));if(r==-1)I=-1;if(O!=x||I!=r){var d=JSON.parse(JSON.stringify(n));
d.Brsh.v.Dmtr.v.val=O;if(r!=-1)d.Brsh.v.Hrdn.v.val=I;return d}return null};c.P6.prototype.pa=function(n,F,O,I){if(n.ke.list.length==0)return;
var x=this.id,r;if((x==c.it||x==c._s||x==c.pY||x==c.$a)&&(F!=null&&F.q(u.pI)||this.ka.alt[0]))r="crosshair";
else{var _=this.uN,d=this.ka.brush;if((x==c.it||x==c._s)&&O&&this.jd&&this.jd.length==this.GS.X()*4){var w=O.a.jR(I.x,I.y),Z=this.E2(w),P=this.jd,C=this.GS,W=new gv(C.x+Z.x,C.y+Z.y,C.d,C.v),v=cb.UD(d,n.ke.J$,_),L=v[0],H=v[1],y=Math.ceil(H.d/_),g=new gv(Math.round(w.x-y/2),Math.round(w.y-y/2),y,y),Q=q.f(g.X()*4),J,A;
q.nF(P,W,Q,g);if(_==1){J=Q;A=g}else{var p=new cD(_,0,0,_,0,0),U=c.V.oo([Q,g],p,!0);A=H.clone();A.x=U.rect.x;
A.y=U.rect.y;if(A.Qq(U.rect))J=U.buffer;else{J=q.f(A.X()*4);q.nF(U.buffer,U.rect,J,A)}}var j=this.ka.opacity/255;
for(var e=0;e<J.length;e+=4)J[e+3]=j*(L[e+3]*J[e+3]);r={Qb:J,j:A,hC:new aE(A.d/2,A.v/2)}}else r=cb.xn(d,n.ke.J$,_,x==c.uU)}var b=new k(V.E.P,!0);
b.data={e:V.U.VC,dx:r};if(this.caller)this.caller.A(b)};c.P6.prototype.enable=function(n,F,O,I){this.GL=O;
this.caller=F;this.X6(JSON.parse(JSON.stringify(this.ka.brush)));if(n&&n.a.K!=0)this.uN=n.a.K;this.pa(O,I)};
c.P6.prototype.XW=function(n,F){if(F==cf.jZ){this.ka.brush=n.ke.Kr;this.pa(n)}};c.P6.prototype.wl=function(n,F,O,I,x){for(var r in n)this.ka[r]=n[r];
if(this.ka.alt[0])this.pa(x,I,O)};c.P6.prototype.WJ=function(n){var F=n.P4.length!=0?-1-n.P4[0]:n.C[0],O=n.t[F],I=F<0?1:O.vE,x=F<0?n.TM[-F-1]:I<=0?null:I==1?O.B1():O.Fa(n).r,r=x?x.channel:O.buffer,_=(x?x.rect:O.rect).clone();
return[O,I,x,r,_]};c.P6.prototype.Pa=function(n,F){this.xA=n.N==null?null:{rect:n.N.rect.clone(),channel:n.N.channel.slice(0)};
var O=this.WJ(n),I=O[0],x=O[1],r=O[2];this.Jc=O[3];this.oq=O[4];var _=new gv(0,0,n.d,n.v),d=_.Tq(this.oq);
if((this.x0()&&x<=0||d.Qq(this.oq))&&F!=!0)this.Jc=this.Jc.slice(0);else{if(r)r.extend(d);else I.extend(d)}};
c.P6.prototype.p2=function(n,F){var O=this.WJ(n),I=O[1],x=O[3],r=O[4],_=[x,r],d=F!=null?F:this.ka.sfrom;
if(I<=0&&d!=0){_[1]=new gv(0,0,n.d,n.v);_[0]=n.dH(d==1&&n.C[0]!=n.t.length-1?n.C[0]:null).slice(0)}this.GS=_[1].clone();
this.jd=_[0].slice(0)};c.P6.prototype.Dk=function(n,F,O){if(n.q(u.pI)){var I=new k(V.E.S,!0);I.T=c.SQ;
I.data={e:"pickhere",anC:O};F.A(I);return!0}return!1};c.P6.prototype.yW=function(n,F,O,I,x,r){if(!n.f7(this.caller)){this.IY=null;
return}this.Pa(n);var _=new gv(0,0,n.d,n.v),d=null;if(r!=null){var w=n.P4.length!=0?-1-n.P4[0]:n.C[0],Z=n.t[w],P=w<0?n.TM[-w-1]:Z.vE<=0?null:Z.vE==1?Z.B1():Z.Fa(n).r;
d=q.f(_.X()*4);if(P)c.P6.AA(this.Jc,this.oq,P.color,d,_);else q.nF(this.Jc,this.oq,d,_)}var C=this.ka;
if(this.IY&&this.id==c.QT&&C.qsmode!=0&&n.N!=null){}else{var W=F.nE,v=F.sI;if(this.W6=="erase"){var L=W;
W=v;v=L}var H=this.id==c.QT?this.oq:_;this.IY=new cb(C.brush,F.ke.J$,F.ke.Gr,{c1:x,XQ:r,adC:C.smth*50*V.Z()/n.a.K,yX:this.id==c.$a||C.emode==1,yc:C.prsr},W,v,H,d)}if(this.id==c.QT){this.IY.hT(C.brush,C.qsmode==2?0:16777215)}var y=n.a.jR(I.x,I.y);
if(O.q(u.MQ)&&this.vD){var g=this.vD;this.IY.moveTo(g.x,g.y,I.MF);this.IY.lineTo(.001*g.x+.999*y.x,.001*g.y+.999*y.y,I.MF);
this.IY.lineTo(y.x,y.y,I.MF)}else this.IY.moveTo(y.x,y.y,I.MF);this.vD=y;this.py=y.clone();this.w6=new ay(y,n.a.VH)};
c.P6.prototype.K9=function(n,F,O){if(n&&n.a.K!=0&&n.a.K!=this.uN){this.uN=n.a.K;this.pa(O)}};c.P6.prototype.ID=function(n,F,O,I){if(this.IY==null)return;
var x=n.t[n.C[0]],r=n.a.jR(I.x,I.y),_=this.w6.sQ(r,O);if(_.Qq(this.vD))return 1;this.IY.lineTo(_.x,_.y,I.MF);
this.vD=_;if(this.id==c.it||this.id==c._s){var d=this.Md(),w=11;d=n.a.Hl(r.x-d.x,r.y-d.y);var Z=w>>>1,P=new gv(Math.round(d.x)-Z,Math.round(d.y)-Z,w,w),C=q.f(P.X()*4);
q.IW(16777215);for(var e=0;e<w;e++)C[(e*w+Z)*4+3]=C[(w*Z+e)*4+3]=255;n.M.s3=[[C,P]];n.zB=!0}};c.P6.prototype.jv=function(n,F,O,I){if(O.Gv!=this.id)return;
if(this.id!=c.QT||n==null)return;if(n.N==null||n.C[0]!=this.ahM){this.ahM=n.C[0];this._f({qsmode:0},F)}};
c.P6.prototype.D=function(n,F){if(n.P4.length!=0){n.zB=!0;return}var O=n.t[n.C[0]];if(F==null){F=this.IY.nj();
if(this.x0()&&O.vE<=0)F=F.lN(this.oq)}if(F.D2())return;if(O.vE<=0){O.D(F)}if(O.vE==1){O.B1().j8=!0;O.o3(n)}if(O.vE==3){O.D()}n.D(n.root.zT(F,n,n.C[0],!0))};
c.P6.prototype._X=function(n,F,O,I,x){if(this.IY==null)return;this.IY.finish();if(this.id!=c.A6&&this.id!=c._s&&this.id!=c.QT)this._t(n);
if(this.id==c.it||this.id==c._s){n.M.s3=[];n.zB=!0}if(this.id==c.QT){var r=n.N;n.N=this.xA;var _=new k(V.E.S,!0);
_.data={e:"setsel",WL:this.name,N:r};_.T=c.FT;F.A(_);if(this.ka.qsmode==0)this._f({qsmode:1},F)}else{this.finish(n,this.IY.uu());
this.IY=null;this.B6=null}this.dir=0};c.P6.prototype._f=function(n,F){for(var O in n)this.ka[O]=n[O];
var I=new k(V.E.P,!0);I.data={e:V.U.hO,T:this.id,_l:n};F.A(I)};c.P6.prototype.x0=function(){var n=this.id;
return n==c.QT||n==c.CV||n==c.PY||n==c.tN||n==c.YC||n==c.ow};c.P6.prototype.finish=function(n,F,O,I,x){var r=n.P4.length!=0?-1-n.P4[0]:n.C[0],_=n.t[r],d=r<0?1:_.vE,w=r<0?n.TM[-r-1]:d<=0?null:d==1?_.B1():_.Fa(n).r,Z=w?w.rect:_.rect,W;
if(this.x0()||!Z.Qq(this.oq)){if(w==null){if(this.x0())_.t7();else{var P=F.Tq(this.oq),C=q.f(P.X()*4);
q.nF(_.buffer,_.rect,C,P);_.buffer=C;_.rect=P}}else w.t7();this.D(n,Z)}if(d<=0){W=q.f(F.X()*4);q.nF(this.Jc,this.oq,W,F)}else{W=q.f(F.X());
W.fill(w.color);q.k9(this.Jc,this.oq,W,F)}this.LY(n,!1,O?O:this.name,r,d,F,W,I,x)};c.P6.prototype.LY=function(n,F,O,I,x,r,_,d,w){var Z=_;
if(x>0){Z=q.f(r.X()*4);c.P6.AA(_,r,0,Z,r)}var P=new hS(O,this);P.data=[{$:I,vH:x,j:r,aN:Z}];if(d)P.data.Wu=[n.N,null];
if(w)P.data.Wu=[this.xA,n.N];n.p$(P);if(F)this.Xe(P.data,n);else if(d)n.N=null;ci.WD.JB(n,P.data)};c.P6.prototype.cQ=function(n,F){this.Sb(n,F,!1)};
c.P6.prototype.Xe=function(n,F){this.Sb(n,F,!0)};c.P6.prototype.Sb=function(n,F,O){if(n.e=="drawtemp"){var I=O?n.ad$:n.adB,x=F.t[n.$];
x.HG.Cv=I;x.ah(F,0,0,F.N);x.D();F._y=!0}else{ci.WD.rN(F,n);if(n.Wu){F.N=n.Wu[O?1:0];F.NX=!0}}F.D()};
c.P6.prototype._t=function(n){this.cx(n,this.W6,this.IY.El(),this.IY.nJ(),this.IY.nj());this.D(n)};c.P6.prototype.cx=function(n,F,O,I,x){var r=this.ka,_=n.t[n.C[0]],d=n.P4.length!=0?n.TM[n.P4[0]]:_.vE<=0?null:_.vE==1?_.B1():_.Fa(n).r,w=q.f(x.X()*4),Z,P=_.LF(0);
if(d==null){if(this.id==c.ac&&F=="heal")q.nF(_.buffer,_.rect,w,x);else q.nF(this.Jc,this.oq,w,x);if(P){Z=q.f(x.X());
q.xg(w,Z,3)}}else{c.P6.AA(this.Jc,this.oq,d.color,w,x)}if(n.N&&F!="qselect"){var C=x.lN(n.N.rect),W=q.f(C.X()*4);
if(F=="copy"){var v=q.f(C.X());q.k9(n.N.channel,n.N.rect,v,C);q.nF(w,x,W,C);q.p.Nb(O,I,W,C,v,C,0,C,1,!1)}else{q.nF(O,I,W,C);
q.oh(n.N.channel,n.N.rect,W,C)}O=W;I=C}function L(g,c2){var bH=Math.max(c2.x,Math.min(c2.x+c2.d-1,g.x)),gw=Math.max(c2.y,Math.min(c2.y+c2.v-1,g.y));
return new aE(bH,gw)}if(F=="idraw"||F=="ierase"){if(this.B6==null)this.B6=q.f(this.oq.X());var H=this.ka.samp,y=this.GL.sI,g=L(this.vD,x),Q=H==0?g:this.py,J=Q.x,A=Q.y,p=c.hB.QR(this.Jc,this.oq,[Q,new aE(J-2,A),new aE(J+2,A),new aE(J,A-2),new aE(J,A+2)]);
if(H==2)p=[[y>>>16&255,y>>>8&255,y>>>0&255,255]];var U=c.hB.xi(w,x,g,p,this.ka.wconf),j=q.f(x.X());q.k9(this.B6,this.oq,j,x);
q.ZZ.Tq(U,j,j);q.k9(j,x,this.B6,this.oq);q.oh(j,x,O,I);F=F.slice(1)}if(F=="erase"&&(ci.WD.KI(n)!=16777215||d))F="draw";
if(F=="draw")q.p.F_(r.bmode,O,I,w,x,x,r.opacity);else if(F=="erase"){var b=q.f(x.X()*4);q.nF(O,I,b,x);
if(d==null){var s=q.f(x.X());q.xg(b,s,3);q.Ny(s,r.opacity);q.uZ(s);q.oh(s,x,w,x)}else{q.IW(b,0,4278190080);
q.p.F_("norm",b,x,w,x,x,r.opacity)}}else if(F=="clone"||F=="heal"){var G=this.Md(),T=this.GS.clone();
T.offset(G.x,G.y);var z=x.clone();z.EM(1,1);var m=q.f(z.X()*4),$=q.f(z.X());q.nF(O,I,m,z);q.xg(m,$,3);
q.IW(m,0);if(d==null){q.nF(this.jd,T,m,z);var o=q.f(z.X());q.xg(m,o,3);q.yr(o,$)}else c.P6.AA(this.jd,T,d.color,m,z);
if(F=="clone"){q.GF($,m,3);q.p.F_(r.bmode,m,z,w,x,x,r.opacity)}if(F=="heal"){var h=$.slice(0);q.round(h,20);
var X=q.f(z.X()*4);if(d==null)q.nF(this.Jc,this.oq,X,z);else c.P6.AA(this.Jc,this.oq,d.color,X,z);q.p.Nb(m,z,X,z,h,z,0,z,1,!1);
q.Mr.VY(X,h,z);q.p.Nb(X,z,w,x,$,z,0,x,1,!1)}}else if(F=="dodge"||F=="burn"){var m=q.f(x.X()*4),R=1,i=0,t=0,N=0;
q.nF(O,I,m,x);var D=x.X()*4,f=c.P6.Na;if(this.U5){if(F=="dodge")F="burn";else F="dodge"}var M=r.rng;
if(F=="dodge"){i=[1-R/2,1,1+R][M];t=[1,1/(1+R),1][M];N=[R/2,0,0][M]}if(F=="burn"){i=[1/(1-R/2),1,1-R/2][M];
t=[1,1+R,1][M];N=[-(R/2)/(1-R/2),0,0][M]}for(var e=0;e<D;e+=4){var hK=m[e+3];w[e+0]=f(w[e+0],i,t,N,hK);
w[e+1]=f(w[e+1],i,t,N,hK);w[e+2]=f(w[e+2],i,t,N,hK)}}else if(F=="sponge"||F=="redeye"){var m=q.f(x.X()*4),$=q.f(x.X());
q.nF(O,I,m,x);q.xg(m,$,3);q.Ct(w,m);var bD=r.smode;if(this.U5)bD=1-bD;var co=bS.tc("hue2");if(F=="sponge")cy.K8(co,0,[0,[-50,46][bD],[6,5][bD]]);
else cy.K8(co,1,{S1:[265,305,25,55],i$:[0,-90,-70]});var iM=dK.k6("hue2",co);dK.Fl(iM,m,m,x);q.p.Nb(m,x,w,x,$,x,0,x,1,!1)}else if(F=="copy")q.nF(O,I,w,x);
else if(F=="sheal"){var m=q.f(x.X()*4),$=q.f(x.X());q.nF(O,I,m,x);q.xg(m,$,3);m.fill(0);var hs=this.jd,S=this.GS;
if(d){hs=q.f(S.X()*4);c.P6.AA(this.jd,S,0,hs,S)}var a=q.Aa.VY(hs,S,$,m,x);if(a!=0)q.nF(hs,S,m,x);if(this.ka.sfrom==0)q.nF(m,x,w,x);
else{q.nF(this.Jc,this.oq,w,x);q.GF($,m,3);q.p.F_("norm",m,x,w,x,x,1)}}else if(F=="qselect"){var bV=this.oq,a5=bV.d,i9=bV.v,dG=a5*i9,ap=this.IY.El(),p=this.Jc,bk=c.pQ.md,$=bk.WG;
$.fill(128);for(var e=0;e<dG;e++){var c2=ap[e<<2],gg=ap[(e<<2)+3];if(gg==255&&(c2==0||c2==255))$[e]=c2}$[0]=$[a5-1]=0;
$[(i9>>>1)*a5]=$[(i9>>>1)*a5+a5-1]=0;c.Ae.Sy(bk,!0);n.N={rect:bV,channel:bk.N.slice(0)};n.NX=!0}if(d==null){if(P)q.GF(Z,w,3);
q.nF(w,x,_.buffer,_.rect)}else c.P6.ZX(w,x,d)};c.P6.Md=function(){return null};c.P6.Na=function(n,F,O,I,x){var r=n*(1/255),_=I+F*Math.pow(r,O),d=Math.round(_*x+r*(255-x));
return Math.max(0,Math.min(255,d))};c.P6.AA=function(n,F,O,I,x){var r=q.f(x.X());r.fill(O);q.k9(n,F,r,x);
I.fill(255);q.GN(r,I)};c.P6.ZX=function(n,F,O){var I=q.f(F.X());q.L2(n,I);q.k9(I,F,O.channel,O.rect)};
c.pQ=function(n,F,O){c.Fq.call(this,n,F,O);this.ka={Tb:"front",RI:0,GV:{OI:0,x:3,y:2},yZ:[16,!0,!0]};
this.nh=new aE(-1,-1);this.v4=new aE(-1,-1);this.IF="default";this.ta=null;this.aoJ=!0;this.Sl=!1;this.xI=!1;
this.U5=!1;this.CK=0;this.rp=0;this.oL=!1;this.P_=null;this.sf=null;this.Pb=!1};c.pQ.prototype=new c.Fq;
c.pQ.prototype.ahX=function(){var n=this.ka,F=[{front:0,union:1,difference:2,intersection:3}[n.Tb],n.RI];
if(this.id==c.qR)F.push(n.yZ);return F};c.pQ.prototype.ahC=function(n,F,O){var I=this.ka;I.Tb=["front","union","difference","intersection"][n[0]];
I.RI=n[1];I.yZ=n[2];var x=new k(V.E.P,!0);x.data={e:V.U.hO,T:this.id,NJ:I};O.A(x)};c.pQ.md={key:""};
c.pQ.n4=function(n,F){var O={oI:n,Mk:{classID:"setd",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}};
if(F)O.Mk.T=F;return O};c.pQ.ZA=function(n,F){return c.pQ.n4("set",{t:"Objc",v:{classID:n,Top:{t:"UntF",v:{type:"#Pxl",val:F.y}},Left:{t:"UntF",v:{type:"#Pxl",val:F.x}},Btom:{t:"UntF",v:{type:"#Pxl",val:F.y+F.v}},Rght:{t:"UntF",v:{type:"#Pxl",val:F.x+F.d}}}})};
c.pQ.TS=function(n,F){var O=[],I=[],r="set";for(var e=0;e<n.length;e+=2){O.push(n[e]);I.push(n[e+1])}var x={t:"Objc",v:{classID:"Plgn",Pts:{t:"ObAr",v:{classID:"Pnt",arr:[{id:"Hrzn",type:"UnFl",uID:"#Pxl",arr:O},{id:"Vrtc",type:"UnFl",uID:"#Pxl",arr:I}]}}}};
if(F)r={front:"set",union:"addTo",difference:"subtractFrom",intersection:"interfaceWhite"}[F];return c.pQ.n4(r,x)};
c.pQ.a6g=function(n,F){var O={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:n.x}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:n.y}}}},I=c.pQ.n4("set",O);
I.Mk.Tlrn={t:"long",v:F[0]};I.Mk.AntA={t:"bool",v:F[1]};I.Mk.Cntg={t:"bool",v:F[2]};return I};c.pQ.YN=function(n){return c.pQ.n4("set",{t:"enum",v:{Ordn:n?"Al":"None"}})};
c.pQ.agT=function(n,F,O){var I={classID:"null"};if(n!="border")I.selectionModifyEffectAtCanvasBounds={t:"bool",v:O};
var x={e:"By",c:"By",b:"Wdth",f:"Rds",s:"Rds"}[n[0]];I[x]={t:"UntF",v:{type:"#Pxl",val:F}};return{oI:n,Mk:I}};
c.pQ.sw=function(n,F,O){var I={t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]},x={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:F}}]};
if(O)x.v.push({t:"name",v:{classID:"Lyr",val:O}});var r=[{classID:"null",null:I,T:x},{classID:"null",null:x,T:I},{classID:"null",null:x,From:I},{classID:"null",null:x,With:I}],_=["set","add","subtract","interfaceIconFrameDimmed"];
return{oI:_[n],Mk:r[n]}};c.pQ.$A=function(n,F){var O=new k(V.E.P,!0);O.data={e:V.U.g7,b9:cf.oV};if(!F.Yt)n.A(O);
O.data={e:V.U.g7,b9:cf.nL};if(!F.Kc.B9)n.A(O)};c.pQ.prototype.fM=function(n,F,O,I,x){c.pQ.$A(F,x);this.ta=F;
var r=n.e,_,d,w=new gv(0,0,O.d,O.v),gg=!1,bH,gw,gP,dT;if(r=="fromAction"){var Z=n.zC,P=Z.oI,C=Z.Mk,W=C?C.selectionModifyEffectAtCanvasBounds:null,v=W&&W.v;
if(P=="inverse"){if(O.N==null){alert("No selection!");return}_={channel:q.f(w.X()),rect:w};q.k9(O.N.channel,O.N.rect,_.channel,_.rect);
q.uZ(_.channel);d=[7,2]}else if(P=="expand"){var L=C.By.v.val,H=O.N.rect.clone();H.EM(L,L);var y=q.f(H.X()),g=q.f(H.X());
q.k9(O.N.channel,O.N.rect,g,H);q.style.stroke(g,y,H,L);_={channel:y,rect:H};d=[7,4]}else if(P=="contract"){var L=C.By.v.val,Q=O.N.rect.clone();
Q.EM(1,1);if(!v)Q=Q.lN(w);var g=q.f(Q.X()),J=q.f(g.length);q.k9(O.N.channel,O.N.rect,g,Q);q.uZ(g);q.style.stroke(g,J,Q,L);
q.uZ(J);_={channel:J,rect:Q};q.t7(_);d=[7,5]}else if(P=="border"){var L=C.Wdth.v.val;_=c.pQ.qK(O.N,L/2,L/2);
d=[7,9]}else if(P=="feather"||P=="smoothness"){var L=C.Rds.v.val;_=c.pQ.TX(O.N,L,P=="smoothness",w,v);
d=P=="feather"?[7,6]:[19,3,0]}else{var A=C.null.v;function p(c1){var gk=c1.Top.v.val,eR=c1.Left.v.val;
return new gv(eR,gk,c1.Rght.v.val-eR,c1.Btom.v.val-gk)}function U(c1){var gk=c1[0].arr,a8=c1[1].arr,bX={H:[],s:[]};
for(var e=0;e<gk.length;e++){bX.s.push(e==0?"M":"L");bX.H.push(gk[e],a8[e])}bX.s.push("Z");return bX}var j=["set","addTo","subtractFrom","interfaceWhite"].indexOf(P),b=C.T?C.T.v:null;
if(b&&b.classID=="Elps"){_=this.Hr(c.Jp.i4(p(b)));d=[10,4]}else if(b&&b.classID=="Rctn"){var s=p(b);
_={channel:q.f(s.X()),rect:s.clone()};_.channel.fill(255);d=[10,15]}else if(b&&b.classID=="ObSl"){var s=p(b),G=c.pQ.md,T=G.rect,z=G.WG,m=T.d,$=T.v,o=s.x-T.x,h=o+s.d-1,X=Math.max(o,Math.min(h,o+h>>>1)),D=s.y-T.y,f=D+s.v-1,R=Math.max(D,Math.min(f,D+f>>>1)),i=Math.max(o,0),t=Math.min(h,m),N=Math.max(D,0),M=Math.min(f,$);
z.fill(128);if(0<=D)for(var hK=i;hK<t;hK++)z[D*m+hK]=0;if(f<$)for(var hK=i;hK<t;hK++)z[f*m+hK]=0;if(0<=o)for(var bD=N;
bD<M;bD++)z[bD*m+o]=0;if(h<m)for(var bD=N;bD<M;bD++)z[bD*m+h]=0;var co=c.kb.jy,iM=Math.round(s.d*co),hs=Math.round(s.v*co);
for(var hK=Math.max(0,X-iM);hK<Math.min(m,X+iM);hK++)z[R*m+hK]=255;for(var bD=Math.max(0,R-hs);bD<Math.min($,R+hs);
bD++)z[bD*m+X]=255;c.Ae.Sy(G,!0);_={channel:G.N.slice(0),rect:T.clone()};d=[10,44]}else if(b&&b.classID=="Plgn"){_=this.Hr(U(b.Pts.v.arr));
d=[10,9]}else if(b&&b.classID=="Pnt"){_=c.hB.rz(O,new aE(b.Hrzn.v.val,b.Vrtc.v.val),[C.Tlrn.v,C.AntA==null||C.AntA.v,C.Cntg==null||C.Cntg.v]);
d=[10,12]}else if(b&&b.Ordn=="None"){_=null;d=[7,1]}else if(b&&b.Ordn=="Al"){_={channel:q.f(w.X()),rect:w};
_.channel.fill(255);d=[7,0]}else if(b&&b[0]&&b[0].v.keyID=="WrPt"){var S={e:"frompath",nD:[-1,0,0]};
this.fM(S,F,O,I,x);return}else{var a=["set","add","subtract","interfaceIconFrameDimmed"].indexOf(P),bV=P=="set"?b:A,a5=bV[0].v.enum,S;
if(a5=="Trsp"||a5=="Msk"||a5=="vectorMask"){var i9=O.C[0];if(bV.length==2)i9=aV.kj(O,bV[1]);var dG=["Trsp","Msk","vectorMask"].indexOf(a5);
S={e:"fromlayer",nD:[i9,dG,a]}}else{if(bV[0].t=="name"){var i9=0;for(var e=0;e<O.TM.length;e++)if(O.TM[e].name==bV[0].v.val)i9=e;
S={e:"fromchannel",nD:[-5-i9,0,a]}}else{var ap=["RGB","Rd","Grn","Bl"].indexOf(a5);S={e:"fromchannel",nD:[-1-ap,0,a]}}}this.fM(S,F,O,I,x);
return}if(C.Fthr)_=c.pQ.TX(_,C.Fthr.v.val,!1);if(P!="set"&&O.N!=null)_=q.ZZ.sh(_,O.N,["","union","difference","intersection"][j])}if(P=="expand"||P=="contract")if(!v&&!w.contains(_.rect)){var bk=_.rect.lN(w),c2=q.f(bk.X());
q.k9(_.channel,_.rect,c2,bk);_.channel=c2;_.rect=bk}}if(r=="qmask"){gg=!0;var fU=O.rk(),dV=new gv(0,0,O.d,O.v);
if(fU){_=fU.rect.Qq(dV)&&q.gZ(fU.channel,255)?null:{rect:fU.rect.clone(),channel:fU.channel.slice(0)};
bH=fU}else{_=null;gw=new K.FZ;gw.color=0;gw.name="Quick Mask";gw.wC=!0;if(O.N){gw.rect=O.N.rect.clone();
gw.channel=O.N.channel.slice(0)}else{gw.rect=dV;gw.channel=q.f(gw.rect.X());gw.channel.fill(255)}}d=[6,6,1]}if(r=="setsel"){_=n.N;
d=n.WL}if(r=="crange"){var ac=n.BQ,e2=n.HJ;_=c.pQ.lB(O,ac,e2,n.H9);d=[7,8];ac={t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:ac.LG},A:{t:"doub",v:ac.R},B:{t:"doub",v:ac.O}}};
e2={t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:e2.LG},A:{t:"doub",v:e2.R},B:{t:"doub",v:e2.O}}};this.track({oI:"colorRange",Mk:{__name:"Color Range",classID:"ClrR",Fzns:{t:"long",v:Math.round(n.H9*200)},Mnm:ac,Mxm:e2,colorModel:{t:"long",v:0}}})}if(r=="fromlayer"||r=="fromchannel"||r=="frompath"){var cX=n.nD[0],dG=n.nD[1],j=n.nD[2];
if(r=="fromlayer"){if(cX==null)cX=O.C[0];var eR=O.t[cX];if(dG==0){var gR=eR.rect,bN=eR.buffer;if(gR.D2())return;
var eG=q.f(bN.length>>>2);q.xg(bN,eG,3);_={channel:eG,rect:gR.clone()}}else{if(eR.r==null)eR.o3(O);var ef=dG==1?eR.B1():eR.r;
_=c.pQ.az(ef,w)}this.track(c.pQ.sw(j,["Trsp","Msk"][dG],eR.getName()))}else if(r=="frompath"){var fi=O.Y1(),ep=fi[1],fi=fi[0];
if(cX==null)if(fi.length==0||ep.length==0)return;var iJ=fi[ep[0]];if(cX!=null)for(var e=0;e<fi.length;
e++)if(fi[e].FI==cX)iJ=fi[e];var ef=iJ.add.vmsk.B1(),aT=ef.nJ();if(aT.X()==0)return;var eG=ef.mJ();if(n.nD[3]!=null)this.aoJ=n.nD[3];
if(this.aoJ){eG=eG.slice(0);q.round(eG)}gP=[JSON.stringify(O.f$),JSON.stringify(O.a5)];dT=["[]","[]"];
O.f$=[];O.a5=[];_={channel:eG,rect:aT}}else{if(cX==null)cX=c.pQ.aa(O);_=c.pQ.yE(O,cX)}if(j!=0&&O.N)_=q.ZZ.sh(_,O.N,["","union","difference","intersection"][j]);
d=[14,11]}if(_!=null&&q.gZ(_.channel,0)){_=null;d=[7,1]}if(_)q.t7(_);var dm=new hS(d,this);dm.data={e:"changesel",xA:O.N,pi:_,rk:gg,ahO:bH,acB:gw,XC:gP,aaO:dT};
O.p$(dm);this.Xe(dm.data,O)};c.pQ.aa=function(n){var F=0;if(n.P4.length!=0)F=-5-n.P4[0];else if(JSON.stringify(n.a.o)=="[1,1,1]")F=-1;
else F=-2-n.a.o.indexOf(1);return F};c.pQ.yE=function(n,F){var O,I=new gv(0,0,n.d,n.v);if(-5<F&F<0){var x=-F-1,r=n.dH(),_=q.f(I.X());
if(x==0)q.L2(r,_);else q.xg(r,_,x-1);O={channel:_,rect:I.clone()}}if(F<-4){O=c.pQ.az(n.TM[-F-5],I)}return O};
c.pQ.az=function(n,F){var O,I;if(n.S_()==0){I=n.nJ();if(I.X()==0)return;O=n.mJ()}else{I=F;O=q.f(I.X());
n.Uz(I,O)}return{channel:O,rect:I}};c.pQ.prototype.jn=function(n){return this.oL||n.rt&&this.id!=c._B};
c.pQ.prototype.ZY=function(n,F,O){var I=new k(F,!0);I.data=O;n.A(I)};c.pQ.prototype.rL=function(n,F){var O=new k(V.E.P,!0);
O.data={e:V.U.VC,dx:F};n.A(O)};c.pQ.prototype.nJ=function(n,F,O){F=n.N==null||this.CK>1||this.rp>1?F:null;
var I=this.nh,x=this.v4;if(O){I.x=Math.max(0,Math.min(n.d,I.x));I.y=Math.max(0,Math.min(n.v,I.y));x.x=Math.max(0,Math.min(n.d,x.x));
x.y=Math.max(0,Math.min(n.v,x.y))}var r=c.vb.YW(I,x,F,!0,this.ka.GV),_=r[0].x,d=r[0].y;return new gv(_,d,r[1].x-_,r[1].y-d)};
c.pQ.prototype.XS=function(n,F,O,I,x){if(this.c0())return;this.ta=F;this.Sl=!1;this.xI=I.q(u.MQ);this.U5=I.q(u.pI);
this.CK=this.xI?0:1;this.rp=this.U5?0:1;this.nh=n.a.jR(x.x,x.y);this.nh=c.eB.J_(n,this.nh,O);if(this.Ql(n,this.nh,I)){this.oL=!0;
this.P_=n.N.rect.clone();return}this.R3(n,O,I,x);n.a.LL=new gv};c.pQ.prototype.Ql=function(n,F,O){var I=O.q(u.MQ),x=O.q(u.pI);
if(n.N&&!I&&!x&&this.ka.Tb=="front")return q.q9(F,n.N.channel,n.N.rect);return!1};c.pQ.prototype.RL=function(n,F,O,I,x){this.ta=F;
if(this.Pb)return;var r=n.a.jR(x.x,x.y);if(aE.sl(this.nh,r)*n.a.K>5)this.Sl=!0;if(I.q(u.cf)){if(this.sf==null)this.sf=new aE(r.x-this.nh.x,r.y-this.nh.y);
this.nh.x=r.x-this.sf.x;this.nh.y=r.y-this.sf.y}else this.sf=null;this.v4=r;if(!this.oL)this.v4=c.eB.J_(n,this.v4,O);
if(this.Ql(n,this.v4,I))this.rL(F,"move");else this.rL(F,this.IF);if(this.oL){var _=this.P_.clone();
_.x+=this.v4.x-this.nh.x;_.y+=this.v4.y-this.nh.y;var d=c.eB.VO(n,_,O);n.N.rect.x=Math.round(this.v4.x-this.nh.x+this.P_.x+d[0]);
n.N.rect.y=Math.round(this.v4.y-this.nh.y+this.P_.y+d[1]);n.NX=!0;c.eB.BU(n,_,d);return}this.BO(n,O,I,x);
if(n.a.LL)n.a.LL=this.nJ(n,I)};c.pQ.prototype.c0=function(){return!1};c.pQ.prototype._X=function(n,F,O,I,x){n.a.LL=null;
this.v4=n.a.jR(x.x,x.y);this.v4=c.eB.J_(n,this.v4,O);if(this.oL){this.oL=!1;if(this.v4.Qq(this.nh)&&this.Xg()=="front"){this.ZY(F,V.E.JA,c.pQ.YN());
return}this.hM(n,this.P_,n.N.rect.clone());if(n!=null&&n.M.iA){n.M.iA=null;n.zB=!0}return}this.lu(n,O,I,x);
c.pQ.$A(F,O)};c.pQ.prototype.hM=function(n,F,O){var I=n.mG();if(I!=null&&I.T==this&&I.data.e=="movesel"){}else{I=new hS([7,7],this);
I.data={e:"movesel",NG:F};n.p$(I)}I.data.Si=O;this.Xe(I.data,n)};c.pQ.prototype.Zp=function(n,F,O,I,x){this.Pb=!0};
c.pQ.prototype.e9=function(n,F,O,I,x){var r=new k(V.E.P,!0);r.data={e:V.U.hO,T:this.id,$d:x,m4:n,Hs:O};
F.A(r);this.Pb=!1};c.pQ.prototype.Ka=function(n,F,O,I){var x=I.q(u.MQ),r=I.q(u.pI);if(this.Sl){if(this.CK==0&&!x)this.CK++;
if(this.CK==1&&x)this.CK++;if(this.rp==0&&!r)this.rp++;if(this.rp==1&&r)this.rp++}if(n!=null&&n.N!=null){var _=I.vo();
if(_.x!=0||_.y!=0){var d=n.N.rect.clone();d.x+=_.x;d.y+=_.y;this.hM(n,n.N.rect.clone(),d)}}var w=c.pQ.d$(this.ka.Tb,x,r),Z=new k(V.E.P,!0);
Z.data={e:V.U.hO,T:this.id,Tb:w};F.A(Z)};c.pQ.prototype.finish=function(n,F,O,I){var x=n.N,r=this.getSelection(n,F,O,I);
if(r==null)r=c.pQ.YN();else{var _=this.ka.RI,d=this.Xg();if(_!=0)r.Mk.Fthr={t:"UntF",v:{type:"#Pxl",val:_}};
if(d!="front"&&d!="xor")r.oI={union:"addTo",difference:"subtractFrom",intersection:"interfaceWhite"}[d]}this.ZY(this.ta,V.E.JA,r);
this.nh.mT(-1,-1);this.v4.mT(-1,-1)};c.pQ.prototype.Xg=function(){return c.pQ.d$(this.ka.Tb,this.xI,this.U5)};
c.pQ.d$=function(n,F,O){if(F)n="union";if(O)n="difference";if(F&&O)n="intersection";return n};c.pQ.prototype.getSelection=function(n,F,O,I){return null};
c.pQ.prototype.R3=function(n,F,O,I){};c.pQ.prototype.BO=function(n,F,O,I){};c.pQ.prototype.lu=function(n,F,O,I){};
c.pQ.prototype.cQ=function(n,F){var O=n.e;if(O=="changesel")F.N=n.xA;if(O=="movesel")F.N.rect=n.NG;if(n.rk){if(n.ahO){F.P4=[F.TM.length];
F.TM.push(n.ahO)}else{F.TM.pop();F.P4=[]}}if(n.XC){F.f$=JSON.parse(n.XC[0]);F.a5=JSON.parse(n.XC[1])}F.NX=!0};
c.pQ.prototype.Xe=function(n,F){var O=n.e;if(O=="changesel")F.N=n.pi;if(O=="movesel")F.N.rect=n.Si;if(n.rk){if(n.acB){F.P4=[F.TM.length];
F.TM.push(n.acB)}else{F.TM.pop();F.P4=[]}}if(n.XC){F.f$=JSON.parse(n.aaO[0]);F.a5=JSON.parse(n.aaO[1])}F.NX=!0};
c.pQ.prototype.wl=function(n){this.ka=n};c.pQ.prototype.Hr=function(n){var F=q.z.Wk(n.H);if(F.D2())return null;
var O=V.w("canvas","");O.width=F.d;O.height=F.v;var I=O.getContext("2d");I.beginPath();I.translate(-F.x,-F.y);
Typr.U.pathToContext({cmds:n.s,crds:n.H},I);I.closePath();I.fill();var x=q.f(F.X()),r=I.getImageData(0,0,O.width,O.height);
q.xg(r.data,x,3);return{rect:F,channel:x}};c.pQ.TX=function(n,F,O,I,x){if(O)F=Math.round(F*.7);var r=Math.ceil(2.6*F),_=n.rect.clone();
_.EM(r,r);if(I&&!x)_=_.lN(I);var d=q.f(_.X()),w=q.f(d.length);q.k9(n.channel,n.rect,w,_);q.Mo.MU(w,d,_,F);
if(O){var Z=d.length;for(var e=0;e<Z;e++){var P=(d[e]-128)*F*2.5;d[e]=Math.max(0,Math.min(255,Math.round(128+P)))}}return{channel:d,rect:_}};
c.pQ.qK=function(n,F,O){var I=Math.max(1,Math.ceil(O)),x=n.rect.clone();x.EM(I,I);var r=x.X(),_={channel:q.f(r),rect:x},d=q.f(r);
q.k9(n.channel,n.rect,d,_.rect);if(O!=0)q.style.stroke(d,_.channel,_.rect,O);else q.Ct(d,_.channel);
var w=q.f(r);q.uZ(d);if(F!=0)q.style.stroke(d,w,_.rect,F);else q.Ct(d,w);q.ZZ.lN(_.channel,w,_.channel);
return _};c.pQ.lB=function(n,F,O,I){var x=new gv(0,0,n.d,n.v),r=n.dH();if(n.N){var _=n.N.rect.lN(x),d=q.f(_.X()*4);
q.nF(r,x,d,_);x=_;r=d}var w=x.X(),Z=q.f(w),P=1/I;for(var e=0;e<w;e++){var C=e<<2,W=q.Kj(r[C],r[C+1],r[C+2]),v=q.FG(W,F,O,I,P);
Z[e]=r[C+3]*v}return{rect:x,channel:Z}};c.qB=function(){c.P6.call(this,[10,18],c.dz,"tools/blur");this.W6="copy"};
c.qB.prototype=new c.P6;c.qB.prototype.XS=function(n,F,O,I,x){var r=I.q(u.pI)?cb.$Q:cb.dz;this.yW(n,O,I,x,this.ka.strn,r);
if(this.IY==null)return;this._t(n)};c.qB.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);if(this.wh)this.dh(n,O,x);
if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.KM=function(){c.P6.call(this,[10,0],c.pY,"tools/brush");
this.W6="draw"};c.KM.prototype=new c.P6;c.KM.prototype.XS=function(n,F,O,I,x){if(this.Dk(I,F,x))return;
this.yW(n,O,I,x,this.ka.flow);if(this.IY==null)return;this._t(n)};c.KM.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);
if(this.wh)this.dh(n,O,x);if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.Vi=function(){c.P6.call(this,[10,42],c.uU,"tools/crepl");
this.W6="idraw";this.ka.bmode="hue "};c.Vi.prototype=new c.P6;c.Vi.prototype.XS=function(n,F,O,I,x){if(this.Dk(I,F,x))return;
this.yW(n,O,I,x,this.ka.flow);if(this.IY==null)return;this._t(n)};c.Vi.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);
if(this.wh)this.dh(n,O,x);if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.gV=function(){c.P6.call(this,[10,43],c.ow,"tools/redeye");
this.ka.smode=0;this.W6="redeye"};c.gV.prototype=new c.P6;c.gV.prototype.XS=function(n,F,O,I,x){this.yW(n,O,I,x,this.ka.flow);
if(this.IY==null)return;this._t(n)};c.gV.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);if(this.wh)this.dh(n,O,x);
if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.NT=function(){c.P6.call(this,[10,38],c.$a,"tools/pencil");
this.W6="draw"};c.NT.prototype=new c.P6;c.NT.prototype.XS=function(n,F,O,I,x){if(this.Dk(I,F,x))return;
this.yW(n,O,I,x,this.ka.flow);if(this.IY==null)return;this._t(n)};c.NT.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);
if(this.wh)this.dh(n,O,x);if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.z5=function(){c.P6.call(this,[10,22],c.tN,"tools/burn");
this.W6="burn"};c.z5.prototype=new c.P6;c.z5.prototype.XS=function(n,F,O,I,x){this.yW(n,O,I,x,this.ka.expo/Math.E);
if(this.IY==null)return;this._t(n)};c.z5.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);if(this.wh)this.dh(n,O,x);
if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.M_=function(n,F,O){c.P6.call(this,n==""?null:n?n:[10,1],F?F:c.it,O?O:"tools/clone");
this.W6="clone";this.cX=null;this.n=null};c.M_.prototype=new c.P6;c.M_.prototype.XS=function(n,F,O,I,x){var r=this.ka,_=r.alt[0];
if(I.q(u.pI)||I.q(u.UA)||_){this.cX=n.a.jR(x.x,x.y);this.n=null;if(_)this._f({alt:[!1]},F);this.p2(n);
this.pa(O,I,n,x);return}if(this.cX==null){alert(hl.get([15,7,0]));return}this.pa(O,I);this.yW(n,O,I,x,this.ka.flow);
if(this.IY==null)return;this.n=this.E2(n.a.jR(x.x,x.y));this._t(n)};c.M_.prototype.E2=function(n){var F=this.n;
if(F==null||!this.ka.algnd)F=new aE(Math.round(n.x-this.cX.x),Math.round(n.y-this.cX.y));return F};c.M_.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);
if(this.wh)this.dh(n,O,x);if(this.IY==null){if(this.cX!=null)this.pa(O,I,n,x);return}if(!x.rt||this.cX==null)return;
this.ID(n,O,I,x);this._t(n)};c.M_.prototype.Md=function(){return this.n};c.jz=function(n,F,O){c.Fq.call(this,n,F,O);
this.TP={SR:{OI:0,x:0,y:0},Ut:!1};this.MO=null;this.cursor=null;this.a7X=0;this.G_=null;this.nh=null;
this.S6=null};c.jz.prototype=new c.Fq;c.jz.prototype.A5=function(){return this.MO!=null};c.jz.prototype.jn=function(n){return this.MO&&this.MO.pE()};
c.jz.prototype.XS=function(n,F,O,I,x){this.G_=x;var r=n.a.jR(x.x,x.y);r.x=Math.round(r.x);r.y=Math.round(r.y);
var _=this.TP.SR,d=_.OI!=0?_.x/_.y:null;if(this.MO)this.MO.XS(n,O,I,r,d,!1);else this.nh=c.eB.J_(n,r,O)};
c.jz.prototype.Jd=function(n,F){var O=[n.x,n.y,n.x+n.d,n.y,n.x+n.d,n.y+n.v,n.x,n.y+n.v];return new g_(O,!0,!1,this.id==c.Af,!0,F,this.id==c.Af?2:0,this.id==c.Af)};
c.jz.prototype.pa=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.VC,dx:this.cursor};n.A(F)};c.jz.prototype.enable=function(n,F,O,I){this.ta=F;
this.cursor="crosshair";this.pa(F);if(n!=null&&n.N){var x=this.TP.SR={OI:0,x:0,y:0};this.ZY(F,V.E.P,{e:V.U.hO,T:this.id,bl:!1,GV:x});
this.wl({ma:"cropby",anc:3},F,n,I,O)}};c.jz.prototype.RL=function(n,F,O,I,x){this.G_=x;var r=n.a.jR(x.x,x.y);
if(!x.rt){var _="crosshair";if(this.MO){var d=this.MO.n5(r,n.a.K);if(d)_=d;else _="default"}if(_!=this.cursor){this.cursor=_;
this.pa(F)}}if(this.MO)this.MO.RL(n,O,I,r);else if(this.nh){var w=c.vb.YW(this.nh,c.eB.J_(n,r,O),I,!0,this.TP.SR),Z=w[0].x,P=w[0].y,C=this.S6=new gv(Z,P,w[1].x-Z,w[1].y-P);
n.M.qD=q.z.om(C);n.zB=!0;c.Fq.Ji(x.x+10,x.y-10,C,n,O)}};c.jz.prototype._X=function(n,F,O,I,x){this.G_=x;
if(this.MO==null){if(this.nh){var r=this.S6;if(r){var _=this.TP.SR;this.MO=this.Jd(r,_.OI!=0);this.MO.s6(n,O);
this.S6=null;this.ZY(F,V.E.P,{e:V.U.hO,T:this.id,bl:!0})}this.nh=null;n.M.s3=[];n.zB=!0}return}var d=n.a.jR(x.x,x.y);
this.MO._X(n,O,I,d);this.ZY(F,V.E.P,{e:V.U.hO,T:this.id,bl:!0});var w=this.MO.PZ();if(Math.abs(w[0]-w[4])<2&&Math.abs(w[1]-w[5])<2){this.disable(n,F,null,I);
return}if(Date.now()-this.a7X<200&&this.MO.xy(d)){this.N2(n,O);this.disable(n,F,O,I);return}this.a7X=Date.now()};
c.jz.prototype.Ka=function(n,F,O,I){var x=this.MO;if(x==null||this.G_&&this.G_.rt)return;if(I.q(u.Ma)){this.N2(n,O);
this.disable(n,F,O,I)}else if(I.q(u.YE)){this.disable(n,F,O,I)}else x.Ka(n,O,I)};c.jz.FK=function(n,F){var O={classID:"null",T:{t:"Objc",v:{classID:"Rctn",Top:{t:"UntF",v:{type:"#Pxl",val:n[1]}},Left:{t:"UntF",v:{type:"#Pxl",val:n[0]}},Btom:{t:"UntF",v:{type:"#Pxl",val:n[1]+n[3]}},Rght:{t:"UntF",v:{type:"#Pxl",val:n[0]+n[2]}}}},Angl:{t:"UntF",v:{type:"#Ang",val:F!=null?F:0}},Dlt:{t:"bool",v:!0},cropAspectRatioModeKey:{t:"enum",v:{cropAspectRatioModeClass:"pureAspectRatio"}},CnsP:{t:"bool",v:!1}};
return{oI:"crop",Mk:O}};c.jz.dQ=function(n,F){if(F==null)F=[!0,!0,!0,!0];var O={classID:"trim",trimBasedOn:{t:"enum",v:{trimBasedOn:["topLeftPixelColor","bottomRightPixelColor","Trns"][n]}}},I=["Top","Left","Btom","Rght"];
for(var e=0;e<4;e++)O[I[e]]={t:"bool",v:F[e]};return{oI:"trim",Mk:O}};c.jz.W7=function(n,F,O,I){var x={classID:"null"};
if(I!=null){x.Wdth={t:"UntF",v:{type:"#Pxl",val:n}};x.Hght={t:"UntF",v:{type:"#Pxl",val:F}};x.Intr={t:"enum",v:{Intp:["Nrst","Blnr","bicubicSharper"][I]}}}if(O!=null)x.Rslt={t:"UntF",v:{type:"#Rsl",val:O}};
return{oI:"imageSize",Mk:x}};c.jz.pg=function(n,F,O){if(O==null)O=4;var I=Math.floor(O/3),x=O%3;return{oI:"canvasSize",Mk:{classID:"null",Wdth:{t:"UntF",v:{type:"#Pxl",val:n}},Hght:{t:"UntF",v:{type:"#Pxl",val:F}},Hrzn:{t:"enum",v:{HrzL:["Left","Cntr","Rght"][x]}},Vrtc:{t:"enum",v:{VrtL:["Top","Cntr","Btom"][I]}}}}};
c.jz.prototype.fM=function(n,F,O,I,x){var r=new gv(0,0,O.d,O.v),_=[11,3],d=O.gC,w=O.d/2,Z=O.v/2,P=1,M,hK;
if(n.e=="fromAction"){var C=n.zC,W=C.oI,v=C.Mk,L=O.d/O.v,H=v.Wdth?v.Wdth.v.val:-1,y=v.Hght?v.Hght.v.val:-1,d=v.Rslt?v.Rslt.v.val:null,g=v.Wdth?v.Wdth.v.type:v.Hght?v.Hght.v.type:-1,Q=1,J;
if(W=="imageSize"){if(v.Intr){if(v.Intr.v.Intp=="Nrst")Q=0;if(v.Intr.v.Intp=="bicubicSharper")Q=2;if(H==-1&&y==-1){var A=d/O.gC;
H=Math.round(O.d*A);y=Math.round(O.v*A)}else if(g=="#Prc"){if(H!=-1)H=Math.round(O.d*H/100);if(y!=-1)y=Math.round(O.v*y/100)}if(v.CnsP&&v.CnsP.v){if(H==-1)H=Math.round(y*L);
if(y==-1)y=Math.round(H/L)}}else{if(g=="#Prc")d=Math.round(O.gC/((H!=-1?H:y)/100));else if(g==-1)d=Math.round(d);
else throw"e";H=O.d;y=O.v}J={e:"imgsize",LT:H,Nj:y,jG:d,kl:Q}}else if(W=="canvasSize"){if(H==-1)H=O.d;
if(y==-1)y=O.v;if(v.Rltv&&v.Rltv.v==!0){if(v.Wdth)H+=O.d;if(v.Hght)y+=O.v}var p=v.Vrtc?v.Vrtc.v.VrtL:"Cntr",U=v.Hrzn?v.Hrzn.v.HrzL:"Cntr";
J={e:"canvsize",LT:H,Nj:y,Ug:3*["Top","Cntr","Btom"].indexOf(p)+["Left","Cntr","Rght"].indexOf(U)}}else if(W=="revealAll"){J={e:"revealAll"}}else if(W=="trim"){var j={topLeftPixelColor:0,bottomRightPixelColor:1,Trns:2}[v.trimBasedOn.v.trimBasedOn];
if(j==null)throw"e";var b=["Top","Left","Btom","Rght"],s=[!0,!0,!0,!0];for(var e=0;e<4;e++)if(v[b[e]])s[e]=v[b[e]].v;
J={e:"trim",a7T:j,GV:s}}else if(W=="crop"){var G=v.T.v,T=Math.round(G.Left.v.val),z=Math.round(G.Top.v.val),m=Math.round(G.Rght.v.val)-T,$=Math.round(G.Btom.v.val)-z;
J={e:"canvsize",LT:m,Nj:$,n:new aE(T,z)}}else console.log(C);if(J)this.fM(J,F,O,I,x);return}else if(n.e=="imgsize"){r=new gv(0,0,n.LT,n.Nj);
if(n.jG)d=n.jG;P=n.kl}else if(n.e=="canvsize"){var o=n.Ug!=null?n.Ug:0;r=new gv(0,0,n.LT,n.Nj);var h=O.d-n.LT,X=O.v-n.Nj,D=Math.round(h/2),f=Math.round(X/2);
if(o==1||o==4||o==7)r.x=D;if(o==2||o==5||o==8)r.x=h;if(o==3||o==4||o==5)r.y=f;if(o==6||o==7||o==8)r.y=X;
if(n.n){r.x=n.n.x;r.y=n.n.y}}else if(n.e=="rot"&&(n.G+2*Math.PI)%(Math.PI/2)!=0){var R=q.z.om(r).H,i=new cD;
i.translate(-w,-Z);i.rotate(n.G);i.translate(w,Z);q.z.m(R,i,R);r=q.z.Wk(R)}else if(n.e=="rot"&&n.G!=Math.PI&&n.G!=-Math.PI){r=new gv(w-O.v/2,Z-O.d/2,O.v,O.d);
if((O.d+O.v&1)==1){w=Math.floor(w);Z=Math.floor(Z);r=new gv(w-Math.floor(O.v/2),Z-Math.floor(O.d/2),O.v,O.d);
if((O.d&1)==1&&n.G!=-Math.PI/2)r.y--;if((O.v&1)==1&&n.G==-Math.PI/2)r.x--}}else if(n.e=="trim"){_=[11,12,0];
var t=O.dH(),N=new gv(0,0,O.d,O.v);r=q.Ww(t,N,n.a7T,n.GV);if(r.D2())r=N}else if(n.e=="cropbysel"){_=[11,12,1];
r=O.N.rect.clone()}else if(n.e=="revealAll"){_=[11,12,2];r=O.root.nJ(O,!0)}if(n.e=="imgsize"||n.e=="rot"||n.e=="scl"){var bD=new cD;
if(n.e=="imgsize"){_=[11,10];bD.scale(n.LT/O.d,n.Nj/O.v)}else{bD.translate(-w,-Z);if(n.e=="rot")bD.rotate(n.G);
if(n.e=="scl")bD.scale(n.G.x,n.G.y);bD.translate(w,Z);_=n.WL}hK=q.J.EC(bD);M=this.o4(O,x,!0,hK,P)}else if(n.e=="auto-align"){if(O.C.length<2){alert("Select two or more layers.");
return}var co=[];for(var e=0;e<O.C.length;e++){var iM=O.t[O.C[e]];if(!iM.R9()&&iM.add.SoLd==null){alert("Unsupported layer selected.");
return}if(iM.rect.D2()){alert("Empty layer selected.");return}co.push([iM.buffer,iM.rect])}var hs=q.zf.eE(co,0);
if(hs==null){alert("No similarity found.");return}hK=hs[1];var S=O.C;O.C=O.C.slice(1);M=this.o4(O,x,!1,hs.slice(1),P);
O.C=S;r=O.root.nJ(O,!0);_=[2,10,1]}var a=new gv(0,0,O.d,O.v);if(!r.D2()&&(!r.Qq(a)||M!=null)){var bV=new hS(_,this);
bV.data={NG:a,Si:r,aer:O.gC,jG:d,w3:M,ON:hK,dj:c.jz.Cm(O,r,a,M!=null)};O.p$(bV);this.Xe(bV.data,O)}};
c.jz.Cm=function(n,F,O,I){if(n.l_.length==0)return null;var x=JSON.stringify(n.l_),r=JSON.parse(x);c.Fz.aix(r,F,O,I);
r=JSON.stringify(r);return[x,r]};c.jz.prototype.o4=function(n,F,O,I,x,r){var _={t:[],gX:null,WR:null};
if(O){for(var e=0;e<n.t.length;e++)_.t.push(e);for(var e=0;e<n.Hi.length;e++)_.t.push(-1-e);for(var e=0;
e<n.TM.length;e++)_.t.push(-1e3-e)}else _.t=n.C.slice(0);_.gX=c.V.cq(n,_.t,!0);c.V.$D(n,F,_.t,_.gX,x,I,null,!0,r);
_.WR=c.V.cq(n,_.t,!0);return _};c.jz.prototype.Xe=function(n,F){if(n.jG)F.gC=n.jG;if(n.dj)F.l_=JSON.parse(n.dj[1]);
if(n.w3){c.jz.Hm(F,q.J.fK(n.ON));c.V.Q0(F,n.w3.t,n.w3.WR)}c.jz.Ut(F,n.Si)};c.jz.prototype.cQ=function(n,F){if(n.aer)F.gC=n.aer;
if(n.dj)F.l_=JSON.parse(n.dj[0]);var O=n.NG.clone();O.offset(-n.Si.x,-n.Si.y);c.jz.Ut(F,O);if(n.ql)F.a.n.mc(n.ql);
F.qY();if(n.w3){var I=q.J.fK(n.ON).clone();I.uZ();c.jz.Hm(F,I);c.V.Q0(F,n.w3.t,n.w3.gX)}};c.jz.Hm=function(n,F){for(var e=0;
e<n.t.length;e++){var O=n.t[e];if(O.add.artb==null)continue;var I=q.z.om(O.Fn()).H;q.z.m(I,F,I);var x=q.z.Wk(I);
O.Hp(x)}};c.jz.Ut=function(n,F){n.d=F.d;n.v=F.v;var O=[];for(var e=0;e<n.t.length;e++)O.push(e);c.eB.Zc(n,O,null,-F.x,-F.y);
for(var e=0;e<n.t.length;e++){n.t[e].o3(n)}n.qY();n.a.n.mT(0,0);if(n.N)n.N.rect.offset(-F.x,-F.y);for(var e=0;
e<2;e++)for(var I=0;I<n.fT[e].length;I++)n.fT[e][I]-=e==0?F.x:F.y;for(var e=0;e<n.TM.length;e++)n.TM[e].rect.offset(-F.x,-F.y)};
c.jz.prototype.wl=function(n,F,O,I,x){if(n.ma=="commit"){this.N2(O,x);this.disable(O,F,null,I)}else if(n.ma=="cancel"){this.disable(O,F,null,I)}var r=null,_=new gv(0,0,O.d,O.v),d=this.TP.SR;
if(n.ma=="config"){this.TP=n.TP;d=this.TP.SR;if(this.TP.Ut!=null)return;if(O==null)return;r=_;if(d.OI==1){var w=d.x/d.y;
r.v=Math.round(r.d/w)}if(d.OI==2){r.d=d.x;r.v=d.y}r.x=Math.round((O.d-r.d)/2);r.y=Math.round((O.v-r.v)/2)}if(n.ma=="cropby"){if(O==null)return;
var Z=n.anc,r;if(Z==0)r=O.root.nJ(O,!0);if(Z==1){if(O.C.length==0)alert("No layer is selected.");else{var P=O.root.Dv(O.C[0]);
r=P.nJ(O,!0)}}if(Z==2){if(O.C.length==0)alert("No layer is selected.");else{r=q.Ww(O.dH(),_,0);if(r.D2())r=_.clone()}}if(Z==3){if(O.N!=null)r=O.N.rect;
else alert("There is no selection.")}}if(r&&r.D2())r=null;if(r!=null){this.MO=this.Jd(r,d.OI!=0);this.MO.s6(O,x);
this.ZY(F,V.E.P,{e:V.U.hO,T:this.id,bl:!0})}};c.jz.prototype.N2=function(n,F){var O=this.MO.PZ(),I=q.z.Wk(O),x=this.abR(n,O),r=!1,_=this.TP.SR,d=this.TP.Ut,w=_.x,Z=_.y,W;
if(this.id==c.qa&&_.OI==2&&x.X()!=w*Z){x=new gv(x.x,x.y,w,Z);r=!0}var P=q.J.N5(O,x);P=q.J.uZ(P);var C=q.J.nn(P),v=Math.atan2(P[3],P[0]);
if(Math.abs(v)>1e-9||!C||r||d)W=this.o4(n,F,!0,P,1,I);var L=new hS(this.name,this),H=new gv(0,0,n.d,n.v);
L.data={NG:H,Si:x,w3:W,ON:P,ql:n.a.n.clone(),dj:c.jz.Cm(n,x,H,!1)};n.p$(L);this.Xe(L.data,n);this.track(c.jz.FK([I.x,I.y,I.d,I.v]))};
c.jz.prototype.abR=function(n,F){var O=q.J.N5(F),I=q.J.nn(O),x=q.J.fK(O),r=x.hb,_=x.i9,d=Math.atan2(x.O,x.R);
x.rotate(d);var w=new gv(r,_,x.R,x.oQ);if(!I){function Z(J,e,A){var p=J[e]-J[A],U=J[e+1]-J[A+1];return Math.sqrt(p*p+U*U)}var P=Z(F,0,2),C=Z(F,4,6),W=Math.max(P,C),v=Z(F,2,4),L=Z(F,6,0),H=Math.max(v,L),y=c.jz.aeF(F,n.d/2,n.v/2),g,Q;
if(isNaN(y)||y==Infinity||y==-Infinity||Math.min(y,1/y)<.1)y=(P+C)/(v+L);if(W/H>y){g=W*1;Q=g/y}else{Q=H*1;
g=Q*y}w.d=g;w.v=Q}w.x=Math.round(w.x);w.y=Math.round(w.y);w.d=Math.round(w.d);w.v=Math.round(w.v);return w};
c.jz.aeF=function(n,F,O){var I=n[0]-F,x=n[1]-O,r=n[2]-F,_=n[3]-O,d=n[6]-F,w=n[7]-O,Z=n[4]-F,P=n[5]-O,C=((x-P)*d-(I-Z)*w+I*P-x*Z)/((_-P)*d-(r-Z)*w+r*P-_*Z),W=((x-P)*r-(I-Z)*_+I*P-x*Z)/((w-P)*r-(d-Z)*_+d*P-w*Z),v=-((W*w-x)*(C*_-x)+(W*d-I)*(C*r-I))/((W-1)*(C-1));
function L(y){return y*y}var H=Math.sqrt((L(C-1)+L(C*_-x)/v+L(C*r-I)/v)/(L(W-1)+L(W*w-x)/v+L(W*d-I)/v));
if(C==1&&W==1)H=Math.sqrt((L(_-x)+L(r-I))/(L(w-x)+L(d-I)));return H};c.jz.prototype.disable=function(n,F,O,I){if(n==null)return;
if(this.MO)this.MO.clear(n);this.MO=null;this.ZY(F,V.E.P,{e:V.U.hO,T:this.id,bl:!1})};c.jz.prototype.ZY=function(n,F,O,I){var x=new k(F,!0);
x.data=O;if(I)x.T=I;n.A(x)};c.IC=function(){c.jz.call(this,[10,2],c.qa,"tools/rcrop")};c.IC.prototype=new c.jz;
c.k7=function(){c.jz.call(this,[10,39],c.Af,"tools/pcrop")};c.k7.prototype=new c.jz;c.oG=function(){c.P6.call(this,[10,21],c.PY,"tools/dodge");
this.W6="dodge"};c.oG.prototype=new c.P6;c.oG.prototype.XS=function(n,F,O,I,x){this.yW(n,O,I,x,this.ka.expo/Math.PI);
if(this.IY==null)return;this._t(n)};c.oG.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);if(this.wh)this.dh(n,O,x);
if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.ew=function(){c.P6.call(this,[10,3],c.CV,"tools/eraser");
this.W6="erase"};c.ew.prototype=new c.P6;c.ew.prototype.XS=function(n,F,O,I,x){this.yW(n,O,I,x,this.ka.flow);
if(this.IY==null)return;this._t(n)};c.ew.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);if(this.wh)this.dh(n,O,x);
if(this.IY==null)return;if(!x.rt)return;var r=this.ID(n,O,I,x);this._t(n)};c.pG=function(){c.P6.call(this,[10,45],c.a91,"tools/beraser");
this.W6="ierase"};c.pG.prototype=new c.P6;c.pG.prototype.XS=function(n,F,O,I,x){if(this.Dk(I,F,x))return;
this.yW(n,O,I,x,this.ka.flow);if(this.IY==null)return;this._t(n)};c.pG.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);
if(this.wh)this.dh(n,O,x);if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.BV=function(){c.pQ.call(this,[10,15],c.FT,"tools/rselect");
this.IF="crosshair"};c.BV.prototype=new c.pQ;c.BV.prototype.BO=function(n,F,O,I){if(!I.rt||!this.Sl)return;
var x=this.nJ(n,O,!0);n.M.qD=q.z.om(x);n.zB=!0;c.Fq.Ji(I.x+10,I.y-10,x,n,F)};c.BV.prototype.lu=function(n,F,O,I){n.M.qD=null;
n.M.s3=[];n.zB=!0;this.finish(n,F,O,I)};c.BV.prototype.getSelection=function(n,F,O,I){if(this.nh.Qq(this.v4)||!this.Sl)return null;
var x=this.nJ(n,O,!0);if(x.D2())return null;return c.pQ.ZA("Rctn",x)};c.Jp=function(){c.pQ.call(this,[10,4],c.alm,"tools/eselect");
this.IF="crosshair"};c.Jp.prototype=new c.pQ;c.Jp.prototype.BO=function(n,F,O,I){if(!I.rt||!this.Sl)return;
var x=this.nJ(n,O);n.M.qD=c.Jp.i4(x);n.zB=!0;c.Fq.Ji(I.x+10,I.y-10,x,n,F)};c.Jp.prototype.lu=function(n,F,O,I){n.M.qD=null;
n.M.s3=[];n.zB=!0;this.finish(n,F,O,I)};c.Jp.prototype.getSelection=function(n,F,O,I){if(this.nh.Qq(this.v4)||!this.Sl)return null;
var x=this.nJ(n,O);if(!x.G3(new gv(0,0,n.d,n.v)))return null;return c.pQ.ZA("Elps",x)};c.Jp.i4=function(n){var F=n.x,O=n.y,I=n.x+n.d,x=n.y+n.v,r=(F+I)/2,_=(O+x)/2,d=(F-I)/2,w=(O-x)/2,Z=.5522848,P={H:[r,_-w],s:["M","C","C","C","C"]};
P.H.push(r+Z*d,_-w,r+d,_-Z*w,r+d,_);P.H.push(r+d,_+Z*w,r+Z*d,_+w,r,_+w);P.H.push(r-Z*d,_+w,r-d,_+Z*w,r-d,_);
P.H.push(r-d,_-Z*w,r-Z*d,_-w,r,_-w);return P};c.pm=function(){c.Fq.call(this,[10,5],c.SQ,"tools/eyedropper");
this.aR=!1;this.q5=1};c.pm.prototype=new c.Fq;c.pm.prototype.jn=function(n){return n.rt};c.pm.prototype.fM=function(n,F,O,I,x){if(n.e=="pickhere")this.Mp(O,F,x,I,n.anC)};
c.pm.prototype.XS=function(n,F,O,I,x){this.aR=!0;this.Mp(n,F,O,I,x)};c.pm.prototype.RL=function(n,F,O,I,x){if(this.aR)this.Mp(n,F,O,I,x)};
c.pm.prototype._X=function(n,F,O,I,x){this.aR=!1};c.pm.prototype.Mp=function(n,F,O,I,x){var r=c.pm.cD(n,x,this.q5),_=new k(V.E.P);
_.data={e:V.U.g7,b9:cf.dM,G1:0,G:r};F.A(_)};c.pm.cD=function(n,F,O){var I=n.a.jR(F.x,F.y),x=Math.floor(I.x),r=Math.floor(I.y),_=(O-1)/2,d=Math.max(0,x-_),w=Math.max(0,r-_),Z=Math.min(n.d,x+_+1),P=Math.min(n.v,r+_+1),C=(Z-d)*(P-w),W=n.dH(),v=0,L=0,H=0;
for(var x=d;x<Z;x++)for(var r=w;r<P;r++){var e=4*(r*n.d+x);v+=W[e];L+=W[e+1];H+=W[e+2]}v=Math.round(v/C);
L=Math.round(L/C);H=Math.round(H/C);return v<<16|L<<8|H};c.pm.prototype.wl=function(n){this.q5=n.q5};
c.AG=function(){c.Fq.call(this,[10,6],c.aiX,"tools/gradient");this.ka={W:JSON.parse(bW.Pg.v5).v,fg:"Lnr",Ay:!1,anY:!1,amo:"norm",c1:1};
this.Yb=!1;this.y$=null};c.AG.prototype=new c.Fq;c.AG.prototype.enable=function(n,F,O,I){var x=new k(V.E.P,!0);
x.data={e:V.U.VC,dx:"default"};F.A(x)};c.AG.prototype.wl=function(n){this.ka=n.b9};c.AG.prototype.XS=function(n,F,O,I,x){if(!n.f7())return;
this.y$=n.a.jR(x.x,x.y);this.y$=c.eB.J_(n,this.y$,O);this.Yb=!0};c.AG.prototype.RL=function(n,F,O,I,x){if(!this.Yb)return;
var r=n.a.jR(x.x,x.y);r=c.eB.J_(n,r,O);if(I.q(u.MQ))r=c.AG.J6(this.y$,r);n.M.qD={H:[this.y$.x,this.y$.y,r.x,r.y],s:["M","L"]};
n.M.Ri=[this.y$.x,this.y$.y,r.x,r.y];n.zB=!0};c.AG.prototype._X=function(n,F,O,I,x){if(!this.Yb)return;
var r=n.t[n.C[0]],_=n.a.jR(x.x,x.y);_=c.eB.J_(n,_,O);if(I.q(u.MQ))_=c.AG.J6(this.y$,_);var d=_.ba(this.y$),w=aE.v8(this.y$,_,.5),Z=Math.atan2(d.y,d.x),P=aE.sl(this.y$,_),C=Math.sin(Z),W=Math.cos(Z);
if(P>2){var v;if(n.N)v=n.N.rect;else v=new gv(0,0,n.d,n.v);var L=q.f(v.X()*4),H=this.ka,y=H.fg;if(y!="Lnr"){P*=2;
w=this.y$}q.W.Vt(H.W,L,v,[W*1/P,C*1/P,-C*1/P,W*1/P],w.x,w.y,H.Ay,bW.W.types.indexOf(y),O.nE,O.sI,null,H.anY);
var g=Math.round(H.c1*256),Q=L.length;if(g!=256)for(var e=0;e<Q;e+=4)L[e+3]=L[e+3]*g>>>8;var J=new k(V.E.S);
J.T=c.CV;J.data={e:"fillBMP",Tv:L,QP:H.amo,WL:this.name};F.A(J)}n.M.qD=null;n.M.Ri=[];n.zB=!0;this.Yb=!1};
c.AG.J6=function(n,F){if(n.Qq(F))return n;var O=F.x-n.x,I=F.y-n.y,x=Math.abs(O),r=Math.abs(I);if(x>r)r=x/2>r?0:x;
if(r>x)x=r/2>x?0:r;x=O>0?x:-x;r=I>0?r:-r;var _=Math.sqrt(O*O+I*I)/Math.sqrt(x*x+r*r);return new aE(n.x+x*_,n.y+r*_)};
c.AG.JC=function(n,F,O,I,x,r,_){if(_==null)_=V.w("canvas","");var d=_.getContext("2d");_.width=F;_.height=O;
var w=new gv(0,0,F,O),Z=q.f(F*O*4);q.GE(Z,F,O,4);var P=Math.sin(I),C=Math.cos(I),W=q.f(F*O*4);q.W.Vt(n,W,w,[C*1/F,P*1/F,-P*1/O,C*1/O],F/2,O/2,!1,0,x,r);
q.p.F_("norm",W,w,Z,w,w,1);var v=d.getImageData(0,0,F,O);q.Ct(Z,v.data);d.putImageData(v,0,0);return _.toDataURL()};
c.AG.a65=function(n,F,O){var I=JSON.parse(JSON.stringify(n));for(var e=0;e<I.Clrs.v.length;e++){var x=I.Clrs.v[e].v,r=x.Type.v.Clry;
if(r=="UsrS")continue;var _=r=="FrgC"?F:O;x.Type.v.Clry="UsrS";x.Clr={t:"Objc",v:q.W.Vm({Q:_>>16&255,l:_>>8&255,O:_&255})}}return I};
c.GO=function(){c.Fq.call(this,[10,7],c.Ud,"tools/hand");this.T4=new aE(0,0);this.q_=null};c.GO.prototype=new c.Fq;
c.GO.prototype.fM=function(n,F,O,I,x){var r=n.e;if(r=="setcls"){O.a.o=n.o;O.zB=!0;O.T3=!0}if(r=="scroll"&&!I.q(u.pI)){if(I.q(u.ep))c.GO.OH(O,O.a.n.x-n.dt.y,O.a.n.y-n.dt.x);
else c.GO.OH(O,O.a.n.x-n.dt.x,O.a.n.y-n.dt.y)}};c.GO.prototype.enable=function(n,F,O,I){this.q_=null;
var x=new k(V.E.P,!0);x.data={e:V.U.VC,dx:"grab"};F.A(x)};c.GO.prototype.XS=function(n,F,O,I,x){this.q_=n.a.n.clone();
this.T4.mT(x.x,x.y)};c.GO.prototype.RL=function(n,F,O,I,x){if(!x.rt)return;if(this.q_==null)this.XS(n,F,O,I,x);
c.GO.OH(n,this.q_.x+(x.x-this.T4.x),this.q_.y+(x.y-this.T4.y))};c.GO.prototype._X=function(n,F,O,I,x){this.q_=null};
c.GO.OH=function(n,F,O){var I=n.a.K;if(n.d*I<n.a.Nv.d&&n.v*I<n.a.Nv.v)n.a.n.mT(0,0);else{n.a.n.x=F;n.a.n.y=O}n.T3=!0};
c.XM=function(){c.Fq.call(this,[10,47],c.agJ,"tools/rview");this.T4=new aE(0,0);this.vD=null;this.a15=null};
c.XM.prototype=new c.Fq;c.XM.prototype.enable=function(n,F,O,I){this.q_=null;var x=new k(V.E.P,!0);x.data={e:V.U.VC,dx:"grab"};
F.A(x);if(n)this.cz(n,F)};c.XM.prototype.disable=function(n,F,O,I,x){if(n)this.cz(n,F)};c.XM.prototype.VG=function(n,F,O,I){if(n)this.cz(n,F)};
c.XM.prototype.XS=function(n,F,O,I,x){this.T4.mT(x.x,x.y);var r=n.a;this.vD=r.jR(r.Nv.d/2,r.Nv.v/2);
this.a15=r.eY()};c.XM.prototype.RL=function(n,F,O,I,x){if(!x.rt)return;var r=n.a,_=this.vD,d=this.T4,w=new aE(r.Nv.d/2,r.Nv.v/2),Z=Math.atan2(x.y-w.y,x.x-w.x),P=Math.atan2(d.y-w.y,d.x-w.x);
this.x2(n,F,this.a15.clone(),_,Z-P)};c.XM.prototype.wl=function(n,F,O,I){this.x2(O,F,null,null,n.Wr-O.a.VH);
O.a.VH=n.Wr};c.XM.prototype.x2=function(n,F,O,I,x){var r=n.a;if(O==null)O=r.eY();if(I==null)I=r.jR(r.Nv.d/2,r.Nv.v/2);
O.translate(-I.x,-I.y);O.rotate(x);O.translate(I.x,I.y);r.cL(O);if(n.d*r.K<r.Nv.d&&n.v*r.K<r.Nv.v)r.n.mT(0,0);
n.zB=!0;this.cz(n,F)};c.XM.prototype.cz=function(n,F){var O=new k(V.E.P,!0);O.data={e:V.U.hO,T:this.id,Wr:n.a.VH};
F.A(O)};c.t9=function(){c.M_.call(this,[10,25],c._s,"tools/hbrush")};c.t9.prototype=new c.M_("");c.t9.prototype._X=function(n,F,O,I,x){if(this.IY==null)return;
this.cx(n,"heal",this.IY.El(),this.IY.nJ(),this.IY.uu());this.D(n,this.IY.uu());c.P6.prototype._X.call(this,n,F,O,I,x);
if(!this.ka.algnd)this.n=null};c.Zh=function(){c.Fq.call(this,[10,8],c.ua,"tools/htype");this.f9=[];
this.KH=null;this.Hs=null;this.caller=null;this.mX=1;this.ss=null;this.a8L=0;this.eZ=0;this.ajo=null;
this.lX=null;this.fO=null;this.de=null;this.J3=null;this.CB=null;this.agO=null;this.gO=null;this.MO=null;
this.wI=null;this.a6E=null;this.qn=!1;this.VT=!1;this.iR=!1;this.o1=null;this.ii=null;this.aiM=null;
this.gz=!1;this.Kd=!1;this.Pu=-1;this.EN=-1;this.eL=document.createElement("textarea");this.eL.setAttribute("style","font-family:Arial; font-size:14px; z-index:-1; "+" position:absolute; top:0px; left:0px;  pointer-events: none; opacity:0; width:"+(window.innerWidth-10)+"px; height:150px;");
this.eL.addEventListener("input",this.qx.bind(this),!1);this.eL.addEventListener("keydown",this.alF.bind(this),!1)};
c.Zh.prototype=new c.Fq;c.Zh.prototype.jn=function(n){return n.rt};c.Zh.prototype.jv=function(n,F,O,I){if(this.fO!=null)return;
this.caller=F;this.KH=n;var x=this.PX(n);if(x.length!=0){var r=null,_=[],d=[];for(var e=0;e<x.length;
e++){var w=n.t[x[e]],Z=w.add.TySh,P=0,C=bt.fQ(Z.Vb).length-2,W=bt.gU(Z.Vb,P,C);bt.aj(W,c.V.GW(Z.m));
if(W.Bw.Font!=null)W.Bw.Font=W.D0[W.Bw.Font].Name;r=W.D0;_.push(W.Bw);d.push(W.jp)}var W={D0:r,Bw:bt.NM(_),jp:bt.NM(d)};
if(W.Bw.Font!=null)bt.Zu(W,W.Bw.Font);this.Z_(F,W,Z)}};c.Zh.prototype.PX=function(n){var F=[];for(var e=0;
e<n.C.length;e++)if(n.t[n.C[e]]&&n.t[n.C[e]].add.TySh)F.push(n.C[e]);return F};c.Zh.prototype.fM=function(n,F,O,I,x){if(n.e=="insertText"&&this.fO){var r=this.eL,_=r.value,d=r.selectionStart,w=r.selectionEnd;
r.value=_.slice(0,d)+n.G+_.slice(w);r.selectionStart=r.selectionEnd=d+n.G.length;this.qx(null);r.focus()}if(n.e=="updateStyles"){if(this.fO==null){var Z=this.PX(O),P=!1;
if(Z.length!=0){this.C$(O,F,x,Z);for(var e=0;e<Z.length;e++){var C=O.t[Z[e]],W=C.add.TySh;bt.yv(W,this.mX);
this.fO=C;var v=bt.fQ(W.Vb);this.Pu=0;this.EN=v.length-1;bt.F$(W.Vb,this.Pu,this.EN,this.KQ(x,W));var L=this.kq(O,x);
if(L==!1)P=!0}if(P){this.gz=!0;return}this.h5(O,F)}return}this.Xt(x)}if(n.e.startsWith("warp")){var H=this.Kd;
if(n.e=="warp"||n.e=="warpCancel"){if(n.e=="warp")this.fO.add.TySh.Gp=n.qF;else this.fO.add.TySh.Gp=this.agO;
var O=this.KH;this.kq(O,x);if(!H)this.A4(O)}if(n.e!="warp")this.eL.focus();if((n.e=="warpConfirm"||n.e=="warpCancel")&&H){this.Kd=!1;
if(n.e=="warpConfirm")this.h5(O,F);else this.ou(O,F)}}if(n.e=="editCurr"){if(x.Gv!=c.ua){this.ss=x.Gv;
var y=new k(V.E.P,!0);y.data={e:V.U.H$,T:c.ua};F.A(y)}if(this.fO!=null)this.disable(O,F,x,I);this.KH=O;
this.Hs=x;this.caller=F;this.C$(O,F,x,[n.sO]);var v=bt.fQ(this.fO.add.TySh.Vb);this.Pu=0;this.EN=v.length-1;
this.A4(O);this.Fh();this.eL.focus()}if(n.e=="switchPntPrgr"){if(this.fO)return;var C=O.t[O.C[0]],W=C.add.TySh,g=W.m.GW(),Q=JSON.parse(JSON.stringify(W.Vb)),J=bt.oB(Q),A=J==1?bt.Kp(Q):[0,0,Math.round(C.rect.d*1.05/g),Math.round(C.rect.v*1.25/g)],p=bt.gU(Q,0,0),U=p.D0[p.Bw.Font].Name,j=x.sH.rs(U),b=[0,A[2],A[2]/2][p.jp.Justification%3],s=j?h2.tR(j,U,p.Bw):p.Bw.FontSize*.8;
bt.li(Q,1-J);if(J==0){b=-b;s=-s;bt.Ar(Q,[0,0,A[2],A[3]])}var G=new cD(1,0,0,1,b,s);G.concat(W.m);this.fM({EI:O.C[0],e:"newED",p4:Q,m:G,ai7:[16,3,J==1?0:1]},F,O,I,x)}if(n.e=="newED"){var C=O.t[n.EI],W=C.add.TySh,T=this.Ty(O,[n.EI]);
W.Vb=n.p4;if(n.m)W.m=n.m;var z=new h2(W.Vb,x.sH),m=cJ.mH(z,W);C.rect=m.j;C.buffer=m.zc;C.D();O.D();var $=new hS(n.ai7?n.ai7:this.name,this);
$.data={Pt:T,im:this.Ty(O,[n.EI])};O.p$($)}if(n.e=="fromAction"){var o=n.zC.Mk.Usng.v,h=o.TxtC.v,X=[];
for(var e=0;e<2;e++){var D=h[e==0?"Hrzn":"Vrtc"].v,f=D.val;if(D.type=="#Prc")f=(e==0?O.d:O.v)*(f/100);
X[e]=f}this.B7(O,F,x,I,O.a.Hl(X[0],X[1]));var C=O.t[O.C[0]],W=C.add.TySh,R=W.Vb,_=bt.fQ(R);bt.od(R,0,_.length-1);
bt.bw(R,0,o.Txt.v.replace(/\r/g,"\n"));_=bt.fQ(R);for(var J=0;J<2;J++){var i=o[J==0?"Txtt":"paragraphStyleRange"].v;
for(var e=0;e<i.length;e++){var N=i[e].v,d=N.From.v,w=Math.min(N.T.v-1,_.length-1);N=N[J==0?"TxtS":"paragraphStyle"].v;
var M=bt.gU(R,d,w),hK=J==0?M.Bw:M.jp;for(var bD in N){var co=N[bD].v;if(bD=="Sz")hK.FontSize=Math.round(co.val);
else if(bD=="fontPostScriptName")bt.Zu(M,co);else if(bD=="Algn")hK.Justification={Cntr:2}[co.Alg];else if(bD=="Clr")hK.FillColor.Values=[1,co.Rd.v/255,co.Grn.v/255,co.Bl.v/255]}bt.F$(R,d,w,M)}}var z=new h2(W.Vb,x.sH),m=cJ.mH(z,W);
C.rect=m.j;C.buffer=m.zc;C.D();O.D();this.h5(O,F)}};c.Zh.prototype.Xt=function(n){var F=Math.min(this.Pu,this.EN),O=Math.max(this.Pu,this.EN),I=this.fO.add.TySh;
bt.yv(I,this.mX);bt.F$(I.Vb,F,O-1,this.KQ(n,I));var x=this.KH,r=this.kq(x,n);if(r)this.A4(x);if(document.activeElement.tagName.toLowerCase()!="input")this.eL.focus()};
c.Zh.prototype.JF=function(n){return this.f9.indexOf(n)!=-1};c.Zh.prototype.enable=function(n,F,O,I){var x=this.eL;
if(!V.Zo(x))F._.appendChild(x);this.gO="default";this.pa(F)};c.Zh.prototype.A5=function(){return this.fO!=null};
c.Zh.Ix=function(n,F){for(var e=n.t.length-1;e>=0;e--){var O=n.t[e];if(O.add.TySh&&O.rect.JX(F)&&n.sz(e)){var I=O.LF(2)||O.LF(31);
return I?-2:e}}return-1};c.Zh.prototype.XS=function(n,F,O,I,x){this.KH=n;this.Hs=O;this.caller=F;var r=n.a.jR(x.x,x.y),_=this.fO==null;
if(_){var d=c.Zh.Ix(n,r);if(d==-2){alert(hl.get([6,57,0]));return}if(d>=0){if(!cJ.Xk(n.t[d].add.TySh,O.sH)){alert("Fonts not loaded yet");
return}this.C$(n,F,O,[d])}else{this.iR=!0;this.o1=x;return}}var w=_?-1:bt.oB(this.fO.add.TySh.Vb),Z=this.wI?this.wI:this.MO;
if(Z&&Z.XS(n,O,I,r)&&q.qF.x9(this.fO.add.TySh.Gp)||!_&&q.z.oJ(r,this.fO.rect)>20/n.a.K&&(w==0||w==1)){this.qn=!0;
this.ii=r;this.aiM=this.fO.add.TySh.m.clone();if(this.Pu==-1&&this.EN==-1)this.Pu=this.EN=this.ck(r)}else{if(this.J3==null){alert("Fonts not loaded yet");
return}this.VT=!0;this.Pu=this.EN=this.ck(r);var P=Date.now();if(P-this.a8L>300)this.eZ=0;this.eZ++;
this.a8L=P;if(this.eZ==2)this.a72();if(this.eZ==3)this.ak7();if(this.eZ>1){this.VT=!1}}this.Fh();this.A4(n)};
c.Zh.prototype.C$=function(n,F,O,I){var x=n.t[I[0]];this.fO=x;this.ZY(F,V.E.P,{e:V.U.hO,T:this.id,ma:"showactive"});
this.de=I;n.C=I.slice(0);n.Mu();n.wD=!0;this.CB=this.Ty(n,I);this.y2(x.add.TySh);this.kq(n,O)};c.Zh.prototype.y2=function(n){if(bt.oB(n.Vb)!=1)return;
var F=bt.Kp(n.Vb);F=new gv(0,0,F[2]-F[0],F[3]-F[1]);var O=[F.x,F.y,F.x+F.d,F.y,F.x+F.d,F.y+F.v,F.x,F.y+F.v];
q.z.m(O,n.m,O);this.MO=new g_(O,!1,!1,!1,!0)};c.Zh.prototype.a72=function(){var n=bt.fQ(this.fO.add.TySh.Vb);
this.Pu=this.YM(n,this.Pu);this.EN=this.Ms(n,this.Pu)};c.Zh.prototype.YM=function(n,F){var O=" \t\n,.?!_-+=@#$%^&*'\"(){}[]\\/<>:;|",I=[];
for(var e=0;e<O.length;e++)I.push(O.charAt(e));var x=I.indexOf(n[F])==-1?!0:!1;for(var e=F-1;e>=0;e--)if(I.indexOf(n.charAt(e))!=-1==x)return e+1;
return 0};c.Zh.prototype.Ms=function(n,F){var O=" \t\n,.?!_-+=@#$%^&*'\"(){}[]\\/<>:;|",I=[];for(var e=0;
e<O.length;e++)I.push(O.charAt(e));var x=I.indexOf(n[F])==-1?!0:!1;for(var e=F+1;e<n.length;e++)if(I.indexOf(n.charAt(e))!=-1==x)return e;
return n.length-1};c.Zh.prototype.ak7=function(){var n=this.J3.abk(this.Pu);this.Pu=n[0];this.EN=n[1]};
c.Zh.prototype.pa=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.VC,dx:this.gO};n.A(F)};c.Zh.prototype.RL=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y),_=this.fO;
if(!x.rt){var d="default",w=this.MO,Z=this.wI?this.wI:w;if(Z&&q.qF.x9(_.add.TySh.Gp)){var P=Z.n5(r,n.a.K);
if(P)d=P;else if(Z==w&&w.xy(r))d="text"}else if(_&&q.z.oJ(r,_.rect)>20/n.a.K)d="move";else if(c.Zh.Ix(n,r)>=0)d="text";
if(d!=this.gO){this.gO=d;this.pa(F)}}var C=this.o1;if(this.iR&&Math.min(x.x-C.x,x.y-C.y)>4/n.a.K){this.iR=!1;
this.B7(n,F,O,I,x);_=this.fO;this.qn=!0;this.MO=new g_(null,!1,!1,!1,!0);var W=n.a.jR(this.o1.x,this.o1.y);
W.x=Math.round(W.x);W.y=Math.round(W.y);this.MO.XS(n,O,I,W)}if(this.qn){var v=_.add.TySh;if(this.wI){this.wI.RL(n,O,I,r);
var L=q.J.fK(q.J.N5(this.wI.PZ(),this.a6E));v.m=L;this.kq(n,O);bt.Sg(v)}else if(this.MO){this.MO.RL(n,O,I,r);
var H=v.m.clone(),y=Math.atan2(H.O,H.R);H.rotate(y);var L=q.J.fK(q.J.N5(this.MO.PZ())),g=Math.atan2(L.O,L.R);
L.rotate(g);if(!isNaN(L.R)&&L.R*L.oQ-L.O*L.Pr!=0){var Q=new gv(0,0,L.R/H.R,L.oQ/H.oQ),J=Math.round(Q.d),A=Math.round(Q.v),p=v.Vb.Curve;
if(p){var U=bt.Kp(v.Vb),j=new cD(J/U[2],0,0,A/U[3],0,0);q.z.m(p.Points,j,p.Points);bt.Sg(v)}bt.Ar(v.Vb,[0,0,J,A]);
v.m=q.J.fK(q.J.N5(this.MO.PZ(),Q));this.kq(n,O);bt.Sg(v)}}else{var b=r.x-this.ii.x,s=r.y-this.ii.y;v.m=this.aiM.clone();
var G=new aE(v.m.hb+b,v.m.i9+s);G=c.eB.J_(n,G,O);v.m.hb=G.x;v.m.i9=G.y;this.kq(n,O)}}if(this.VT)this.EN=this.ck(r);
if(this.qn||this.VT)this.A4(n)};c.Zh.prototype.B7=function(n,F,O,I,x){var r=n.Y1(),_=r[0],d=r[1],w=n.Kv();
w.add.lnsr="rend";var Z=n.t.slice(0);w.V9("Text layer "+Z.length);this.fO=w;var P=n.C.length==0?n.t.length-1:n.C[n.C.length-1],C=P+1;
if(Z[P].add.lsct==ho.x7)C--;this.CB={ft:Z.slice(0),xA:n.C.slice(0)};Z.splice(C,0,w);n.C=[C];this.Pu=this.EN=0;
n.xc(Z);this.CB.Dn=Z.slice(0);this.CB.pi=n.C.slice(0);this.ZY(F,V.E.P,{e:V.U.hO,T:this.id,ma:"showactive"});
var W=n.a.jR(x.x,x.y);w.add.TySh=bt.Cc(W.x,W.y,O.tV);var v=w.add.TySh,L=v.Vb;bt.yv(v,this.mX);if(x.rt)bt.li(L,1);
else{bt.li(L,0);var H=_[d.pop()],y=H?H.add.vmsk:null;if(y){y=y.clone();var g=y.b,J,A;for(var e=0;e<g.length;
e++)if(g[e].Xu!=null)g[e].Xu=0;var Q=4*V.Z()/n.a.K;J=q.Y.q9(y.b,W,!0,Q);if(J.FI==-1)J=q.Y.q9(y.b,W);
if(J.FI!=-1){bt.li(L,1);var p=q.Y.fR(g,J.FI),U=q.Y.wb(g,J.FI)-1;g=y.b=g.slice(0,2).concat(g.slice(p,p+U+1));
y.C=[];v.add={vmsk:y,vogk:K.XO(g)};L.Curve={};bt.FE(v);if(J.Yw!=null){var j=h2.Rc(L.Curve);q.z.m(j[0],v.m,j[0]);
var b=q.z.e6(j[0],W.x,W.y),s=O.tV.jp.Justification;if(s==2||s==5){var G=(j[2][b]+j[3]*.5)%j[3];b=h2.Ml(G,j[2])}var T=j[1][b];
T=T%U;y.AZ=[T,T];bt.FE(v)}else this.y2(v)}}}return w};c.Zh.prototype._X=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y),_=this.iR;
if(this.iR){this.iR=!1;this.B7(n,F,O,I,x);this.VT=!0}if(this.qn||this.VT){this.A4(n);this.Fh();if(_)this.Xt(O)}if(this.qn&&this.MO)this.MO._X(n,O,I,r);
this.qn=this.VT=!1;this.sm(n,O,I);this.eL.focus()};c.Zh.prototype.Fh=function(){var n=this.fO.add.TySh,F=Math.min(this.Pu,this.EN),O=Math.max(this.Pu,this.EN),I,x;
if(F==O){var r=bt.fQ(n.Vb);if(F==0||r.charAt(F-1)=="\n")I=x=F;else I=x=F-1}else{I=F;x=O-1}var _=bt.gU(n.Vb,I,x);
bt.aj(_,c.V.GW(n.m));this.Z_(this.caller,_,n)};c.Zh.prototype.Z_=function(n,F,O){this.ZY(n,V.E.P,{e:V.U.g7,b9:cf.cu,tV:F});
var I=this.mX=bt.JH(O);this.ZY(this.caller,V.E.P,{e:V.U.hO,T:this.id,ma:"changeAA",Qj:I})};c.Zh.prototype.Ka=function(n,F,O,I){if(I.q(u.YE))this.ou(n,F);
var x=this.fO;if(x)if(this.wI==null&&I.q(u.ep)){var r=x.add.TySh,_=bt.oB(r.Vb),d;if(_==1){d=bt.Kp(r.Vb);
d=new gv(0,0,d[2]-d[0],d[3]-d[1])}else d=this.J3.QW();var w=[d.x,d.y,d.x+d.d,d.y,d.x+d.d,d.y+d.v,d.x,d.y+d.v];
q.z.m(w,r.m,w);this.wI=new g_(w,!0,!0,!1,!1);this.a6E=d;this.A4(this.KH)}else this.sm(n,O,I)};c.Zh.prototype.sm=function(n,F,O){var I=this.fO;
if(I&&!this.qn&&this.wI!=null&&!O.q(u.ep)){this.wI._X(n,F,O,null);this.wI=null;this.y2(I.add.TySh);this.A4(this.KH)}};
c.Zh.prototype.disable=function(n,F,O,I){var x=this.fO;this.h5(n,F)};c.Zh.prototype.wl=function(n,F,O,I,x){if(this.Kd)return;
if(n.ma=="commit")this.h5(O,F);if(n.ma=="cancel")this.ou(O,F);if(n.ma=="changeAA"){this.mX=n.Qj;if(O!=null)this.fM({e:"updateStyles"},F,O,I,x)}if(n.ma=="showwarp"){if(O==null)return;
if(this.fO==null){var r=O.t[O.C[0]],_=r.add.TySh;if(_==null)return;this.C$(O,F,x,[O.C[0]]);this.eL.focus();
this.Kd=!0}this.agO=this.fO.add.TySh.Gp;var d=new k(V.E.P,!0);d.data={e:V.U.n$,cU:"textwarp"};F.A(d)}};
c.Zh.prototype.XW=function(n,F){if(F!=cf.hx)return;if(this.gz){this.gz=!1;var O=this.KH,I=this.de;for(var e=0;
e<I.length;e++){this.fO=O.t[I[e]];this.kq(O,n)}this.h5(O,this.caller);return}if(this.fO)this.Xt(n)};
c.Zh.prototype.KQ=function(n,F){var O=JSON.parse(JSON.stringify(n.tV));bt.aj(O,1/c.V.GW(F.m));return O};
c.Zh.prototype.Xe=function(n,F){if(n.Pt!=null)this.VB(F,n.im);else this.K6(F,n.Dn,n.pi)};c.Zh.prototype.cQ=function(n,F){if(n.Pt!=null)this.VB(F,n.Pt);
else this.K6(F,n.ft,n.xA)};c.Zh.prototype.VB=function(n,F){for(var e=0;e<F.length;e++){var O=F[e],I=O.EI,x=n.t[I];
x.buffer=O.aN;x.rect=O.j.clone();x.D();var r=x.add.TySh;r.Gp=O.qF;r.Qa=O.Qa.clone();r.m=O.m.clone();
r.Vb=JSON.parse(JSON.stringify(O.Vb));x.rq()}n.D()};c.Zh.prototype.Ty=function(n,F){var O=[];for(var e=0;
e<F.length;e++){var I=F[e],x=n.t[I],r=x.add.TySh;O.push({EI:I,m:r.m.clone(),qF:JSON.parse(JSON.stringify(r.Gp)),Qa:r.Qa.clone(),Vb:JSON.parse(JSON.stringify(r.Vb)),aN:x.buffer.slice(0),j:x.rect.clone()})}return O};
c.Zh.prototype.K6=function(n,F,O){n.C=O;n.xc(F);n.D();n._y=!0};c.Zh.prototype.kq=function(n,F,O){if(O==null)O=!1;
var I=this.fO.add.TySh;if(!cJ.Xk(I,F.sH))return!1;this.J3=new h2(I.Vb,F.sH);if(!O){var x=bt.fQ(I.Vb);
this.eL.value=x.slice(0,x.length-1)}var r=cJ.mH(this.J3,I);if(q.qF.x9(I.Gp))I.Qa=new gv;else{if(bt.oB(I.Vb)==1){var _=bt.Kp(I.Vb),E=r.Qa.y;
I.Qa=new gv(0,E,_[2]-_[0],_[3]-_[1]-E)}else{I.Qa=r.Qa}}var d=this.fO.rect;this.fO.rect=r.j;this.fO.buffer=r.zc;
this.fO.D();n.lq();n.D(n.root.zT(r.j.Tq(d),n,n.t.indexOf(this.fO)));return!0};c.Zh.prototype.qx=function(n){if(this.fO==null||this.Kd)return;
var F=this.eL.selectionStart,O=this.fO.add.TySh,I=bt.fQ(O.Vb),x=this.eL.value+"\n",r=Math.min(this.Pu,this.EN),_=Math.max(this.Pu,this.EN),C=!1;
this.Pu=Math.min(F,r);if(x.length-F<I.length-this.EN)this.EN=I.length-x.length+F;if(I!=x){while(this.Pu>0&&I.charAt(this.Pu-1)!=x.charAt(this.Pu-1))this.Pu--}var d=I.substring(0,this.Pu),w=I.substring(this.EN,I.length),Z=x.substring(this.Pu,x.length-w.length);
bt.od(O.Vb,this.Pu,this.EN);bt.bw(O.Vb,this.Pu,Z);var P=this.KQ(this.Hs,O),W=-1,v=Array.from(Z);for(var e=0;
e<v.length;e++)W=Math.max(W,v[e].codePointAt(0));if(W!=-1&&W>128&&P.Bw.Font!=null){var L=P.D0[P.Bw.Font].Name,H=this.Hs.sH.m2(W,L,P.D0);
if(L!=H){bt.Zu(P,H);C=!0}}if(this.lX!=null&&Z==this.lX){var y=JSON.parse(this.ajo);P.Bw=y.Bw;P.D0=y.D0;
C=!0}bt.F$(O.Vb,this.Pu,this.Pu+Z.length-1,P);this.Pu=this.EN=d.length+Z.length;var g=this.KH,Q=this.kq(g,this.Hs,!0);
if(Q)this.A4(g,!0);if(C)this.Fh()};c.Zh.prototype.alF=function(n){if(this.fO==null||this.Kd)return;if(this.fO==null)return;
var F=u,O=0,I=0,g=!1;if(F.NW(n.code,F.nv))O=1;if(F.NW(n.code,F.q8))O=-1;if(F.NW(n.code,F.dE))I=-1;if(F.NW(n.code,F.ZW))I=1;
var x=n.ctrlKey||n.metaKey,r=F.NW(n.code,u.a71),_=F.NW(n.code,u.ae0);if(F.NW(n.code,u.Ma)&&x){this.h5(this.KH,this.caller);
return}if(F.NW(n.code,u.BS)){n.preventDefault();var d=this.eL,w=d.value,Z=d.selectionStart,P=d.selectionEnd;
d.value=w.substring(0,Z)+"\t"+w.substring(P);d.selectionStart=d.selectionEnd=Z+1;this.qx(null);return}if((F.NW(n.code,F.Te)||F.NW(n.code,F.Tm))&&x){var C=this.Pu,W=this.EN;
if(C>W){var v=C;C=W;W=v}var L=this.fO.add.TySh,H=bt.fQ(L.Vb);if(C!=W){this.lX=H.slice(C,W);this.ajo=JSON.stringify(this.Hs.tV)}}var y=bt.fQ(this.fO.add.TySh.Vb);
if(O!=0||I!=0||r||_){n.preventDefault();var Q=this.Pu;if(O!=0){if(x&&O==-1)Q=this.YM(y,this.Pu-1);else if(x&&O==1)Q=this.Ms(y,this.Pu);
else{var d=this.eL,w=d.value;Q=this.Pu+O;if(Q!=0&&w.codePointAt(Q-1)>65535)Q+=O}}else if(I!=0){var J=this.J3.Y7(this.Pu);
if(I==-1&&J.Re==0)Q=0;else if(I==1&&J.Re==this.J3.a7z()-1)Q=99999999999;else Q=this.J3.tP(new aE(J.j.x+J.j.d/2,0),J.Re+I)}else if(r){var A=this.Pu-1;
while(A>0&&y.charCodeAt(A)!=10)A--;Q=A==0?0:A+1}else if(_){var A=this.Pu;while(A<y.length-1&&y.charCodeAt(A)!=10)A++;
Q=A}Q=Math.max(0,Math.min(y.length-1,Q));if(n.shiftKey)this.Pu=Q;else this.Pu=this.EN=Q;g=!0}if(F.NW(n.code,u.U)&&x){this.Pu=0;
this.EN=y.length-1;g=!0}if(g){this.Fh();this.A4(this.KH)}};c.Zh.ao8=function(n,F){var O=n.length;if(O!=F.length)return!1;
for(var e=0;e<O;e++)if(n[e].EI!=F[e].EI)return!1;return!0};c.Zh.prototype.h5=function(n,F){if(this.fO==null)return;
this.fO.rq();var O=this.CB;if(O instanceof Array){var I=this.Ty(n,this.de),x=n.mG();if(x!=null&&x.T==this&&x.data.Pt&&c.Zh.ao8(x.data.Pt,O))x.data.im=I;
else{var r=new hS(this.name,this);r.data={Pt:O,im:I};n.p$(r)}}else{var r=new hS(this.name,this);r.data={ft:O.ft,Dn:O.Dn,xA:O.xA,pi:O.pi};
n.p$(r)}this.escape(n,F)};c.Zh.prototype.ou=function(n,F){if(this.fO==null)return;if(this.CB instanceof Array){this.VB(n,this.CB);
if(this.fO)bt.Sg(this.fO.add.TySh)}else{n.C=this.CB.xA;n.xc(this.CB.ft)}n.D();this.escape(n,F)};c.Zh.prototype.escape=function(n,F){this.fO=null;
this.de=null;this.J3=null;this.MO=null;this.eL.blur();n.M.qD=null;n.M.kR=null;n.M.Ri=[];n.zB=!0;this.qn=!1;
this.VT=!1;this.Pu=this.EN=-1;this.ZY(F,V.E.P,{e:V.U.hO,T:this.id,ma:"hideactive"});if(this.ss){var O=new k(V.E.P,!0);
O.data={e:V.U.H$,T:this.ss};F.A(O);this.ss=null}};c.Zh.prototype.ZY=function(n,F,O,I){var x=new k(F,!0);
x.data=O;if(I)x.T=I;n.A(x)};c.Zh.prototype.ck=function(n){var F=this.fO.add.TySh,O=this.J3,I=F.m.clone();
I.uZ();var x=I.Pz(n),r=bt.nJ(F,O),_=q.qF.Bo(F.Gp,r),d=q.uY.ab7(_,x);if(d==null)d=new Float64Array(2);
x=new aE(r.x+d[0]*r.d,r.y+d[1]*r.v);var w=O.tP(x);return w};c.Zh.prototype.A4=function(n,F){if(F==null)F=!1;
var O=this.fO.add.TySh,I=bt.oB(O.Vb),x=this.J3,r=x?bt.nJ(O,x):null;n.M.Ri=[];n.M.qD=null;n.M.kR=null;
var _=this.wI?this.wI:this.MO;if(_){_.s6(n,this.Hs,!q.qF.x9(O.Gp));var d=O.m.clone();d.uZ();q.z.m(n.M.Ri,d,n.M.Ri);
q.z.m(n.M.qD.H,d,n.M.qD.H);if(x&&x.aiS()){var w=r.d-20,Z=r.v+8;n.M.qD.H.push(w,Z,w+10,Z,w+5,Z-5,w+5,Z+5);
n.M.qD.s.push("M","L","M","L")}}else if(I==0)this.akv(n,O,x);else n.M.qD={H:[],s:[]};var P=Math.min(this.Pu,this.EN),C=Math.max(this.Pu,this.EN);
if(!F){this.eL.selectionStart=P;this.eL.selectionEnd=C}if(x!=null){var W=function(_,p){var U=_.x,j=_.y+_.v,b=new cD;
b.translate(-U,-j);b.rotate(-p);b.translate(U,j);_.y+=_.v*.27;var Q=q.z.om(_);q.z.m(Q.H,b,Q.H);return Q};
if(P==C){P=Math.max(P,0);var v=x.Y7(P);if(v){var L=v.j,H=this.Hs.tV.Bw.FontSize;if(H!=null&&H!=0){H/=O.m.GW();
L.y+=L.v-H;L.v=H}var y=x.akp(P);if(y!=null&&y.vG==1)L.x+=L.d;var g=W(L,v.VH).H;n.M.qD.s.push("M","L");
n.M.qD.H.push(g[0],g[1],g[6],g[7])}}else{n.M.kR={H:[],s:[]};for(var e=P;e<C;e++){var v=x.Y7(e),Q=W(v.j,v.VH);
q.z.concat(n.M.kR,Q)}}}if(x!=null){if(!r.D2()){var J=q.qF.Bo(O.Gp,r),A=Math.min(r.d,r.v)/10;if(A<1)A=1;
if(n.M.qD){n.M.qD=q.z.xk(n.M.qD);n.M.qD=q.z.iC(n.M.qD,A);q.uY.m(J,n.M.qD.H,r)}if(n.M.kR){n.M.kR=q.z.xk(n.M.kR);
n.M.kR=q.z.iC(n.M.kR,A);q.uY.m(J,n.M.kR.H,r)}q.uY.m(J,n.M.Ri,r)}}if(n.M.qD)q.z.m(n.M.qD.H,O.m,n.M.qD.H);
if(n.M.kR)q.z.m(n.M.kR.H,O.m,n.M.kR.H);q.z.m(n.M.Ri,O.m,n.M.Ri);n.zB=!0};c.Zh.prototype.akv=function(n,F,O){if(O==null)return;
n.M.Ri.push(0,0);if(n.M.qD==null)n.M.qD={s:[],H:[]};for(var e=0;e<O.jp.length;e++){var I=O.jp[e];for(var x=0;
x<I.Oc.length;x++){var r=I.Oc[x],_=I.bp.x+r.bp.x+r.j.x,d=I.bp.y+r.bp.y+r.j.y+r.j.v;n.M.qD.s.push("M","L");
n.M.qD.H.push(_,d,_+r.j.d,d)}}n.zB=!0};c.OE=function(){c.pQ.call(this,[10,9],c._B,"tools/lasso");this.IF="crosshair";
this.dJ=null;this.bK=null;this.ii=null};c.OE.prototype=new c.pQ;c.OE.prototype.R3=function(n,F,O,I){this.dJ=this.nh;
this.bK={H:[this.dJ.x,this.dJ.y],s:["M"]}};c.OE.prototype.BO=function(n,F,O,I){this.ii=I;var x=this.bK;
if(x==null)return;if(!I.rt){if(this.bK!=null&&this.rp>1&&O.q(u.pI)){x.H.pop();x.H.pop();x.H.push(this.v4.x,this.v4.y);
n.M.qD=x;n.zB=!0}return}x.s.push("L");x.H.push(this.v4.x,this.v4.y);this.dJ=this.v4;if(this.Sl){n.M.qD=x;
n.zB=!0}};c.OE.prototype.A5=function(){return this.bK!=null};c.OE.prototype.c0=function(){return this.bK!=null};
c.OE.prototype.Ka=function(n,F,O,I){c.pQ.prototype.Ka.call(this,n,F,O,I);if(this.bK&&this.rp>1&&this.ii&&!this.ii.rt&&!I.q(u.pI))this.PG(n,O,I)};
c.OE.prototype.lu=function(n,F,O,I){this.ii=I;var x=this.bK;if(x==null)return;if(this.rp>1&&O.q(u.pI)){x.s.push("L");
x.H.push(this.v4.x,this.v4.y);return}this.PG(n,F,O)};c.OE.prototype.PG=function(n,F,O){this.finish(n,F,O,this.ii);
this.bK=null;n.M.qD=null;n.zB=!0};c.OE.prototype.getSelection=function(n,F,O,I){if(this.nh.Qq(this.v4)||!this.Sl)return null;
return c.pQ.TS(this.bK.H)};c.eB=function(){c.Fq.call(this,[10,11],c.AK,"tools/move");this.Ya=new aE(0,0);
this.EX=new aE(0,0);this.c_=null;this.w6=null;this.$i=new aE(0,0);this.qE=null;this.GL=null;this.ta=null;
this.SH=0;this.Vy=null;this.ot=[];this.lE=null;this.Yb=!1;this.e=0;this.YF=null;this.nB=null;this.tA=null;
this.ld=!1;this.ka={Xi:!1,Dm:!1,vY:!1};this.a78=!1;this.a0A=!1;this.MO=null;this.Vk=null;this.amV=null;
var n=[];for(var e=0;e<q.Mm.RB.length;e++)n.push({name:q.Mm.RB[e],h:function(F,O,I){return{mN:O.Kc.wv==I}}});
this.VA=new at(n);this.VA.k("select",this._w,this)};c.eB.prototype=new c.Fq;c.Fq.prototype.jn=function(n){return this.Yb&&this.e!=2};
c.eB.prototype.bE=function(){return this.Yb&&this.e==0};c.eB.prototype.VG=function(n,F,O,I){this.$K(n,-this.$i.x,-this.$i.y);
this.$i.mT(0,0);this.JJ(n,null,O);this.NS(n)};c.eB.prototype.gj=function(){var n=this.ka;return[n.Xi?1:0,n.Dm?1:0,n.vY?1:0]};
c.eB.prototype.fu=function(n,F,O){var I=this.ka;if(n&&n[0]!=null)I.Xi=n[0]==1;if(n&&n[1]!=null)I.Dm=n[1]==1;
if(n&&n[2]!=null)I.vY=n[2]==1;var x=new k(V.E.P,!0);x.data={e:V.U.hO,T:this.id,NJ:I,a3P:F};O.A(x)};c.eB.$H=function(n,F,O,I,x,r,_){if(_==null)_=[!1,!0];
var d=new gv(0,0,n.d,n.v),w=n.aV(null,x,!0),Z=n.Ak(w,_[0]?d:null,_[1]?null:d)[0];if(_[1]){var P=q.Ww(Z.dH(),new gv(0,0,Z.d,Z.v),2);
c.jz.Ut(Z,P)}if(O!=1){var C=new gv(0,0,Math.round(Z.d*O),Math.round(Z.v*O));c.jz.Ut(Z,C);var W=[];for(var e=0;
e<Z.t.length;e++)W.push(e);var v=c.V.cq(Z,W,!0);c.jz.Hm(Z,new cD(O,0,0,O,0,0));c.V.$D(Z,I,W,v,1,q.J.EC(new cD(O,0,0,O,0,0)),null,!0);
Z.nu()}var L=[];for(var e=0;e<F.length;e++)if(Z.d*Z.v!=0)L.push(fx.XI(Z,F[e].toUpperCase(),null,null,r?r[e]:null,I));
return L};c.eB.prototype.vm=function(n,F,O,I,x){if(n==null||n.C.length==0)return;var r=c.eB.$H(n,[F],O,I,null)[0],_=new k(V.E.P,!0);
_.data={e:V.U.L0,data:r,name:n.t[n.C[0]].getName()+(O==1?"":"@"+O+"x")+"."+F};x.A(_)};c.eB.prototype.wl=function(n,F,O,I,x){if(n.G1=="getPNG"){this.vm(O,"png",n.Hg,x,F)}else if(n.G1=="getSVG"){this.vm(O,"svg",n.Hg,x,F)}if(n.G1=="prms"){this.ka=n;
this.NS(O)}};c.eB.ahv=function(n){var E=n.length,O=0;n.sort(function(r,_){return r[0]+r[1]/2-(_[0]+_[1]/2)});
var F=n[E-1][0]+n[E-1][1]-n[0][0];for(var e=0;e<E;e++)O+=n[e][1];var I=Math.round((F-O)/(E-1)),x=n[0][0];
for(var e=0;e<E;e++){n[e][0]=x;x+=n[e][1]+I}};c.eB.prototype.fM=function(n,F,O,I,x){var r=n.e;if(r=="trsl"){var _=Math.round(n.aof),d=Math.round(n.abC);
this.$i.mT(_,d);this.zs(O,F,I,x,!1,n.$);this.$K(O,_,d);this.JJ(O,null,x)}else if(r=="gids"||r=="gidsFromLayer"){var w=n.nB,Z,P;
if(w==null)w=JSON.parse(JSON.stringify(O.fT));if(r=="gids"){Z=n.ct;var C=w[0].length+w[1].length,W=Z[0].length+Z[1].length;
P=C==W?[23,2]:C>W?[23,3]:[23,4];if(W==0)P=[11,15,0]}else if(r=="gidsFromLayer"){var v=[[],[]];for(var e=0;
e<O.C.length;e++){var L=O.t[O.C[e]].rect;if(L.D2())continue;v[0].push(L.x,L.x+L.d);v[1].push(L.y,L.y+L.v)}P=[11,15,1];
Z=JSON.parse(JSON.stringify(O.fT));c.eB.ci(Z,v)}if(JSON.stringify(w)==JSON.stringify(Z))return;var r=new hS(P,this);
r.data={e:2,nB:w,ct:Z};O.p$(r);this.Xe(r.data,O)}else if(r=="algn"){var H=n.G;if(O==null)return;if(O.C.length<2&&!(O.N!=null&&H!=3&&H!=7)){alert(hl.get([15,7,5]));
return}var y=O.N;O.N=null;var L=y?y.rect:c.V.nJ(O);this.zs(O,F,I,x,!1);if(!this.Yb)return;var g=this.Vy,Q={},J=[],A=[],p=[];
for(var e=0;e<g.length;e++){var U=g[e];while(O.t[U].getName()=="</Layer group>")U++;var j=O.root.Dv(U),b=j;
while(j.parent!=null){j=j.parent;if(g.indexOf(j.index)!=-1)b=j}var s=A.indexOf(b.index);if(s==-1){s=A.length;
A.push(b.index)}J[e]=s}var G=[],T=[],z=[];for(var e=0;e<A.length;e++){var m=c.V.nJ(O,O.aV(!0,A[e]));
z.push(m);var $=H==3?[m.y,m.v]:[m.x,m.d];G[e]=$;T.push($)}c.eB.ahv(T);for(var e=0;e<A.length;e++){var m=z[e],o=m.x,h=m.y;
if(H==0)o=L.x;if(H==1)o=L.x+(L.d-m.d)/2;if(H==2)o=L.x+(L.d-m.d);if(H==3)h=G[e][0];if(H==4)h=L.y;if(H==5)h=L.y+(L.v-m.v)/2;
if(H==6)h=L.y+(L.v-m.v);if(H==7)o=G[e][0];p.push(Math.round(o-m.x),Math.round(h-m.y))}var X=[];for(var e=0;
e<g.length;e++){var D=J[e];X[2*e]=p[2*D];X[2*e+1]=p[2*D+1]}this.$K(O,0,0,null,X);var f=H==3||H==7?[20,4,6]:[20,4,H<3?H:H-1];
this.JJ(O,null,x,X,f);O.N=y}};c.eB.ci=function(n,F){for(var e=0;e<F.length;e++)for(var O=0;O<F[e].length;
O++)if(n[e].indexOf(F[e][O])==-1)n[e].push(F[e][O])};c.eB.prototype.enable=function(n,F,O,I,x){this.GL=O;
this.ta=F;this.ld=x?!0:!1;this.NS(n);this.pa("default",F)};c.eB.prototype.disable=function(n,F,O,I){this.a4(n)};
c.eB.prototype.a4=function(n){if(n==null)return;if(this.MO){this.MO.clear(n);this.MO=null}if(n.M.vY){n.M.vY=null;
n.zB=!0}if(n.M.iA){n.M.iA=null;n.zB=!0}if(n.M.T$[this.id]){delete n.M.T$[this.id];n.zB=!0}if(n.M.s3.length!=0){n.M.s3=[];
n.zB=!0}};c.eB.prototype.jv=function(n,F,O,I){if(O.Gv!=this.id)return;this.NS(n)};c.eB.prototype.NS=function(n,F){if(n==null)return;
var O=this.ka;this.a4(n);if(!this.ld){var I;if(O.Dm||O.vY)I=q.z.Me(c.V.nJ(n));if(O.Dm&&!I.D2()){this.MO=new g_([I.x,I.y,I.x+I.d,I.y,I.x+I.d,I.y+I.v,I.x,I.y+I.v],!0);
this.MO.s6(n,this.GL)}if(O.vY){var x=n.A8(n.C[0]),P=null,C=!1;if(x==null)x=new gv(0,0,n.d,n.v);n.M.vY={k1:[I],b0:[]};
var r=n.M.vY.b0,_=I.x+I.d,d=I.y+I.v,w=I.x+Math.floor(I.d/2),Z=I.y+Math.floor(I.v/2);if(F){var W=n.root.q9(new aE(Math.floor(F.x),Math.floor(F.y)));
if(W){P=q.z.Me(W.$.Yg(n));if(P.G3(I)){C=(P.zp(I)||I.zp(P))&&!I.Qq(P);if(!C)P=null}}}this.kH(I,r);if(P!=null){n.M.vY.k1.push(P);
var v=P.x+P.d,L=P.y+P.v,H=P.x+Math.floor(P.d/2),y=P.y+Math.floor(P.v/2);if(C){var g=w,Q=Z;if(I.zp(P)){g=H;
Q=y}r.push(I.x,Q,P.x,Q);r.push(_,Q,v,Q);r.push(g,I.y,g,P.y);r.push(g,d,g,L)}else{this.kH(P,r);var J=d<P.y||L<I.y,A=_<P.x||v<I.x;
if(_<P.x)r.push(_,Z,P.x,Z);if(v<I.x)r.push(v,Z,I.x,Z);if(d<P.y)r.push(w,d,w,P.y);if(L<I.y)r.push(w,L,w,I.y);
if(J&&!A){if(I.x<P.x)r.push(I.x,y,P.x,y);if(P.x<I.x)r.push(P.x,Z,I.x,Z)}}}else{if(I.y>x.y)r.push(w,x.y,w,I.y);
if(d<x.y+x.v)r.push(w,d,w,x.y+x.v);if(I.x>x.x)r.push(x.x,Z,I.x,Z);if(_<x.x+x.d)r.push(_,Z,x.x+x.d,Z)}n.zB=!0}}if(this.e==2&&this.Yb){var p=this.Vy,U=p[0],j=(U==0?"X":"Y")+": "+q.Mm.xp(n.fT[U][p[1]],n.gC,this.GL,U==0?n.d:n.v,!0);
c.Fq.Li(Math.round(this.c_.x)+10,Math.round(this.c_.y)-10,[j],n);n.zB=!0}if(this.e==3&&this.Yb){var b=q.z.om(this.YF);
n.M.T$[this.id]={qD:b};n.zB=!0}};c.eB.prototype.kH=function(n,F){var O=n.d,I=n.v,x=n.x+Math.floor(O*.2),r=n.y+Math.floor(I*.2);
F.push(x,n.y,x,n.y+I);F.push(n.x,r,n.x+O,r)};c.eB.prototype.pa=function(n,F){var O={e:V.U.VC,dx:n},I=new k(V.E.P,!0);
I.data=O;F.A(I)};c.eB.prototype.K7=function(n){var F=this.Vk.uz()[0],O=this.qE,I=this.amV[F];this.Yk(O,I)};
c.eB.prototype._w=function(n){var F=JSON.parse(JSON.stringify(this.GL.Kc));F.wv=this.VA.uz()[0];var O=new k(V.E.P,!0);
O.data={e:V.U.g7,b9:cf.tf,Qj:F};this.ta.A(O)};c.eB.prototype.e9=function(n,F,O,I,x){if(this.Yb)this._X(n,F,O,I,x);
this.qE=n;this.GL=O;this.ta=F;var r=n.a.jR(x.x,x.y),_;if(c.eB.m_(O,x,n.a)){_=this.VA}else{if(this.Vk)this.Vk.removeEventListener("select",this.K7);
var d=[];n.root.q9(r,d);if(d.length==0)return;var w=[];this.amV=d;for(var e=0;e<d.length;e++)w.push({name:n.t[d[e]].getName()});
_=this.Vk=new at(w);_.k("select",this.K7,this)}_.parent=F;_.B();_.update(n,O);var Z=new k(V.E.P,!0);
Z.data={e:V.U.di,AM:_,x:x.Ux+2,y:x.fw+1};F.A(Z)};c.eB.prototype.Dw=function(n,F,O,I,x){return c.eB.m_(O,x,n.a)};
c.eB.prototype.XS=function(n,F,O,I,x){this.c_=x;this.Ya.mT(x.x,x.y);this.EX=n.a.jR(x.x,x.y);this.w6=new ay(this.EX);
this.zs(n,F,I,O,!0)};c.eB.m_=function(n,F,O){var I=q.Mm.qS,x=O.Nv.v;return n.K3&&(0<F.x&&F.x<I||0<F.y&&F.y<I||0<F.x&&F.x<4*I&&x-I<F.y&&F.y<x)};
c.eB.prototype.zs=function(n,F,O,I,x,r){var _,d=this.EX,w=!1;if(x){var Z=I.Yt&&I.Kc.fT;if(c.eB.m_(I,this.Ya,n.a)){_=JSON.parse(JSON.stringify(n.fT));
if(this.Ya.x<q.Mm.qS)n.fT[0].push(d.x);if(this.Ya.y<q.Mm.qS)n.fT[1].push(d.y);if(!Z){var P=new k(V.E.P);
if(!I.Kc.fT){P.data={e:V.U.g7,b9:cf.hq};F.A(P)}if(!I.Yt){P.data={e:V.U.g7,b9:cf.oV};F.A(P)}Z=!0}}var C=this.OW(n,d);
if(Z&&C){this.e=2;this.nB=_?_:JSON.parse(JSON.stringify(n.fT));this.Vy=C;this.Yb=!0;this.lE=c.V.nJ(n);
return}if(n.P4.length!=0){this.e=4;this.lE=n.TM[n.P4[0]].rect.clone();this.Yb=!0;return}if(this.MO&&this.MO.n5(d,n.a.K,!0)!=null){var P=new k(V.E.P);
P.data={e:V.U.H$,T:c.KR};F.A(P);var W=new k(V.E.S);W.T=c.KR;W.data={e:"doMouseDown",c_:this.Ya};F.A(W);
return}if(n.N&&n.N.rect.JX(d)){var v=Math.round(d.x),L=Math.round(d.y),H=n.N.rect;w=n.N.channel[(L-H.y)*H.d+v-H.x]>128}if(!w&&(!this.ld&&this.ka.Xi||this.ld&&this.ka.Xi&&(O.q(u.MQ)||n.C.length<2))){var y=this.a6m(n,d,O);
if(!y){n.C=[];n.a5=null;n._y=n.xT=!0;this.e=3;this.YF=new gv;this.Yb=!0;return}}if(O.q(u.pI)&&!w){var W=new k(V.E.S);
W.T=c.lo;W.data={e:K.bn,a8K:!0};F.A(W)}}if(n.P4.length!=0){this.e=4;this.lE=n.TM[n.P4[0]].rect.clone();
this.Yb=!0;return}this.Vy=n.aV(r==null,r,null,!0);for(var e=0;e<this.Vy.length;e++){var g=n.t[this.Vy[e]];
if(g.LF(2)||g.LF(31)){alert(hl.get([6,57,0]));return}}this.ot=c.eB.a5G(n,this.Vy);this.e=0;if(n.N&&(!x||w)&&n.C.length==1&&n.f7(!1)){if(!n.YD()){this.Yb=!1;
return}var Q=n.t[n.C[0]],J=O.q(u.pI);this.e=1;var A=n.history[n.ok];if(A.T==this&&A.data.e==1&&A.data.$==n.C[0]&&Q.vE==Q.HG.vE&&!J){this.tA=A}else{var p=Q.HG,U=!1,j;
if(!Q.WF(n,n.N)||J){U=!0;Q.hz(n,n.N,J)}if(Q.HG.vE<=0){j=q.f(Q.HG.Cv.length>>2);q.xg(Q.HG.Cv,j,3)}else j=n.N.channel.slice(0);
var b={rect:Q.HG.JI.clone(),channel:j};this.tA=new hS(J?[12,53]:[12,54],this);this.tA.data={e:1,$:n.C[0],HG:Q.HG,Rd:p,hU:U,xA:n.N,pi:b,oQ:new aE(0,0)};
n.p$(this.tA);n.N=b;n.NX=!0}}this.Yb=!0;this.lE=c.V.nJ(n)};c.eB.prototype.a6m=function(n,F,O){var I=n.root.q9(new aE(Math.floor(F.x),Math.floor(F.y)));
if(I){if(I.$.add.vmsk)n.zB=!0;var x=n.t.indexOf(I.$);if(O.q(u.MQ)){var r=n.C.indexOf(x);if(r==-1)n.C.push(x);
else if(n.C.length>1)n.C.splice(r,1)}else if(n.C.indexOf(x)==-1){this.Yk(n,x)}}return I!=null};c.eB.prototype.Yk=function(n,F){n.t[F].vE=0;
n.C=[F];n.a5=null;n.Mu();n.wD=!0;n._y=!0};c.eB.prototype.RL=function(n,F,O,I,x){this.c_=x;var r=n.a.jR(x.x,x.y),W,v;
if(this.w6&&this.e<2)r=this.w6.sQ(r,I);if(!this.Yb){if(O.Yt&&O.Kc.fT){var _=this.OW(n,r),d="default";
if(_)d=["col-resize","row-resize"][_[0]];else if(this.MO){var w=this.MO.n5(r,n.a.K);if(w)d=w}this.pa(d,F)}this.NS(n,r);
return}var Z=this.EX,P=Math.round(r.x-Z.x)-this.$i.x,C=Math.round(r.y-Z.y)-this.$i.y;if(this.lE){if(this.e==2){r=c.eB.J_(n,r,O,[!1,n.N?n.N.rect:this.lE,!0])}else{v=this.lE.clone();
v.offset(this.$i.x+P,this.$i.y+C);W=c.eB.VO(n,v,O);P+=Math.round(W[0]);C+=Math.round(W[1])}}this.$i.x+=P;
this.$i.y+=C;this.$K(n,P,C,r,null,I.q(u.MQ));this.NS(n,r);if(W)c.eB.BU(n,v,W)};c.eB.prototype.OW=function(n,F){F=[F.x,F.y];
for(var e=0;e<2;e++)for(var O=0;O<n.fT[e].length;O++)if(Math.abs(n.fT[e][O]-F[e])*n.a.K<4)return[e,O];
return null};c.eB.prototype.$K=function(n,F,O,I,x,r){if(this.e==0){if(x)c.eB.uj(n,this.Vy,this.ot,x);
else c.eB.Zc(n,this.Vy,this.ot,F,O)}else if(this.e==1){var _=this.tA.data;_.oQ.offset(F,O);c.eB.d6(n,_.$,F,O)}else if(this.e==2){var d=1e-5;
if(r)d=n.a.K<=1?10:1;else if(n.a.K<=1)d=1;var w=d*Math.round(I.x/d),Z=d*Math.round(I.y/d),P=[w,Z],C=this.Vy;
n.fT[C[0]][C[1]]=P[C[0]]}else if(this.e==3){var W=this.EX,v=q.z.Wk([W.x,W.y,I.x,I.y]);this.YF=v;var L=[];
n.root.cS(v,L);if(JSON.stringify(n.C)!=JSON.stringify(L)){n.C=L;n._y=n.xT=!0}}else if(this.e==4){for(var e=0;
e<n.P4.length;e++)n.TM[n.P4[e]].rect.offset(F,O);n.zB=!0}};c.eB.d6=function(n,F,O,I){var x=n.t[F];n.N.rect.offset(O,I);
x.ah(n,O,I,n.N);n.NX=!0;n.D()};c.eB.prototype._X=function(n,F,O,I,x){this.JJ(n,x,O);this.NS(n);if(Date.now()-this.SH<300){var r=c.Zh.Ix(n,n.a.jR(x.x,x.y));
if(r!=-1){var _=new k(V.E.S,!0);_.T=c.ua;_.data={e:"editCurr",sO:r};F.A(_)}else if(c.eB.m_(O,x,n.a)){var d=new k(V.E.P);
d.data={e:V.U.n$,cU:"doczoom",ZN:n.a.K*100,Xp:{g:V.E.S,T:c.o8,i:{e:"pzoom"}}};F.A(d)}}this.SH=Date.now()};
c.eB.prototype.JJ=function(n,F,O,I,x){if(!this.Yb)return;this.Yb=!1;if(this.e==0){if(I){this.DV(n,null,I,x)}else{if(this.$i.x==0&&this.$i.y==0)return;
this.DV(n,this.$i.clone())}n.T3=!0}else if(this.e==2){var r=0;F=[F.x,F.y];var _=this.Vy,cP=this.nB[0].length+this.nB[1].length,d=n.fT[0].length+n.fT[1].length;
if(O.K3&&F[_[0]]<q.Mm.qS){n.fT[_[0]].splice(_[1],1);r=1;if(cP==d-1)return}if(cP<d)r=2;var w=new hS([[23,2],[23,3],[23,4]][r],this);
w.data={e:2,nB:this.nB,ct:JSON.parse(JSON.stringify(n.fT))};n.p$(w)}else if(this.e==4){var w=new hS([12,54],this);
w.data={e:4,C:n.P4.slice(0),n:this.$i.clone()};n.p$(w)}this.$i.mT(0,0)};c.eB.prototype.Ka=function(n,F,O,I){var x=I.vo();
if(n!=null&&(x.x!=0||x.y!=0)){if(I.q(u.pI)&&n.N==null){var r=new k(V.E.S);r.T=c.lo;r.data={e:K.bn,a8K:!0};
F.A(r)}this.$i.mT(x.x,x.y);this.zs(n,F,I,O,!1);if(!this.Yb)return;this.$K(n,x.x,x.y);this.JJ(n,null,O);
this.NS(n)}var _=I.q(u.ep);if(!this.ld&&this.a0A!=_){if(_){this.a78=this.ka.Xi;this.ka.Xi=!0}else{this.ka.Xi=this.a78}this.a0A=_;
var d=new k(V.E.P,!0);d.data={e:V.U.hO,T:this.id,NJ:this.ka};F.A(d)}};c.eB.prototype.cQ=function(n,F){if(n.e==0)c.eB.uj(F,n.C,n.LO,n.$_,!0);
else if(n.e==2){F.fT=JSON.parse(JSON.stringify(n.nB));F.zB=!0}else if(n.e==4){for(var e=0;e<n.C.length;
e++)F.TM[n.C[e]].rect.offset(-n.n.x,-n.n.y);F.zB=!0}else{var O=F.t[n.$];if(n.hU){O.jB(F,n.Rd);F.N=n.xA;
F.NX=!0;F.D();O.D()}else{c.eB.d6(F,n.$,-n.oQ.x,-n.oQ.y)}}};c.eB.prototype.Xe=function(n,F){if(n.e==0)c.eB.uj(F,n.C,n.LO,n.$_);
else if(n.e==2){F.fT=JSON.parse(JSON.stringify(n.ct));F.zB=!0}else if(n.e==4){for(var e=0;e<n.C.length;
e++)F.TM[n.C[e]].rect.offset(n.n.x,n.n.y);F.zB=!0}else{var O=F.t[n.$];if(n.hU){O.HG=n.HG;F.N=n.pi;c.eB.d6(F,n.$,0,0);
O.D()}else{c.eB.d6(F,n.$,n.oQ.x,n.oQ.y)}}};c.eB.prototype.DV=function(n,F,O,I){if(O){var x=!0;for(var e=0;
e<O.length;e++)if(O[e]!=0)x=!1;if(x)return}var r=n.history[n.ok];if(r.data&&r.T==this&&r.data.e==0&&O==null&&JSON.stringify(r.data.C)==JSON.stringify(this.Vy)&&JSON.stringify(r.data.LO)==JSON.stringify(this.ot)){var _=r.data.$_,d=r.data.a4c.Mk.T.v;
d.Hrzn.v.val+=F.x;d.Vrtc.v.val+=F.y;for(var e=0;e<_.length;e+=2){_[e]+=F.x;_[e+1]+=F.y}}else{if(F==null)F=new aE(O[0],O[1]);
var w={oI:"move",Mk:{classID:"null",null:aV.hd("Lyr",!0),T:{t:"Objc",v:{classID:"Ofst",Hrzn:{t:"UntF",v:{type:"#Rlt",val:F.x}},Vrtc:{t:"UntF",v:{type:"#Rlt",val:F.y}}}}}},Z=new hS(I?I:[12,54],this);
if(O)Z.data={e:0,C:this.Vy,LO:this.ot,$_:O};else Z.data={e:0,C:this.Vy,LO:this.ot,$_:c.eB.dX(this.Vy,F.x,F.y)};
Z.data.a4c=w;n.p$(Z);this.track(w)}};c.eB.dX=function(n,F,O){var I=[];for(var e=0;e<n.length;e++)I.push(F,O);
return I};c.eB.Zc=function(n,F,O,I,x){c.eB.uj(n,F,O,c.eB.dX(F,I,x))};c.eB.uj=function(n,F,O,I,x){if(F.length==0)return;
if(O==null){O=[];for(var e=0;e<F.length;e++){O.push(n.t[F[e]].rT(n,!0))}}var r=new gv,_=new gv(0,0,n.d,n.v);
for(var e=0;e<F.length;e++){var d=I[2*e],w=I[2*e+1];if(x){d=-d;w=-w}var Z=n.t[F[e]],P=O[e];if(Z.add.fxrp&&(P.indexOf(0)!=-1||Z.zX()))Z.add.fxrp.offset(d,w);
for(var C=0;C<P.length;C++){var W=P[C];if(W==0){Z.rect.offset(d,w);if(Z.z3()&&Z.Fa(n))Z.Fa(n).rect.offset(d,w);
if(Z.add.artb){var v=Z.Fn();v.offset(d,w);Z.Hp(v)}if(Z.add.TySh){Z.add.TySh.m.translate(d,w);if(Z.add.TySh.add){Z.add.TySh.add.vmsk.offset(d,w)}}if(Z.add.SoLd){var L=new cD(1,0,0,1,d,w),H=Z.add.SoLd,y=c.V.ns(H.Trnf),g=c.V.ns(H.nonAffineTransform);
q.z.m(y,L,y);q.z.m(g,L,g);H.Trnf=c.V.uB(y);H.nonAffineTransform=c.V.uB(g);c.V.Rw(H,L)}}if(W==1)Z.B1().rect.offset(d,w);
if(W==2){Z.add.vmsk.offset(d,w);if(Z.add.vogk)q.oK.m(Z.add.vogk,[1,0,d,0,1,w,0,0],[])}if(W==3){Z.Fa(n).r.rect.offset(d,w);
if(P.length==1)Z.D()}}if(P.length>0){var Q=Z.add.GdFl;if(Q==null)Q=Z.add.PtFl;if(Z.zX()&&!Z.uW()&&Z.add.vmsk!=null&&q.Y.zz(Z.add.vmsk.b)&&Z.add.vmsk.JP==255&&(Q==null||Q.Algn&&Q.Algn.v)){Z.rect.offset(d,w)}else Z.o3(n);
var J=n.root.zT(Z.Yg(n),n,F[e]);r=r.Tq(J);J.offset(-d,-w);r=r.Tq(J);if(Z.add.SoCo||Z.add.GdFl||Z.add.PtFl||dK.get(Z.add)!=null)r=r.Tq(_);
Z.HP()}}n.D(r)};c.eB.a5G=function(n,F){var O=[];for(var e=0;e<F.length;e++){var I=n.t[F[e]];O.push(I.rT(n))}return O};
c.eB.BU=function(n,F,O){var I=n.M.iA={H:[],s:[]},x=F.x+O[0],r=F.y+O[1];if(O[2]!=1e9){I.s.push("M","L");
I.H.push(O[2],r,O[2],r+F.v)}if(O[3]!=1e9){I.s.push("M","L");I.H.push(x,O[3],x+F.d,O[3])}n.zB=!0};c.eB.J_=function(n,F,O,I){var x=c.eB.YS(n,[[F.x],[F.y]],O,I);
return new aE(F.x+x[0],F.y+x[1])};c.eB.VO=function(n,F,O,I,x){var r=x==!0?0:1,_=c.eB.YS(n,[[F.x,F.x+(F.d>>>r),F.x+F.d],[F.y,F.y+(F.v>>>r),F.y+F.v]],O,I);
return _};c.eB.YS=function(n,F,O,I){if(I==null)I=[!0,null,!0];var x=[0,0,1e9,1e9];if(!O.vf)return x;
var r=JSON.parse(JSON.stringify(F));for(var _=0;_<2;_++){var d=1e9,w=F[_],Z=0;for(var P=0;P<w.length;
P++){var C=c.eB.a2R(n,w[P],r[1-_][P],_,O,I);if(C!=1e9)r[_][P]=C;if(C!=1e9&&Math.abs(C-w[P])<Math.abs(d)){d=C-w[P];
Z=C}}if(d!=1e9){x[_]=d;x[_+2]=Z}}return x};c.eB.a2R=function(n,F,O,I,x,r){var _=1e9,d=x.Ex,w=x.Kc,Z=[n.root];
while(Z.length!=0&&d[2]){var P=Z.pop(),C=P.$,W=C.rect;if(!C.Y9())continue;if(P.children)for(var e=0;
e<P.children.length;e++)Z.push(P.children[e]);if(n.C.indexOf(P.index)!=-1||W.D2())continue;if(I==0){var v=W.d,L=v>>>1;
if(Math.abs(W.x-F)<Math.abs(_-F))_=W.x;if(Math.abs(W.x+L-F)<Math.abs(_-F))_=W.x+L;if(Math.abs(W.x+v-F)<Math.abs(_-F))_=W.x+v}else{var H=W.v,y=H>>>1;
if(Math.abs(W.y-F)<Math.abs(_-F))_=W.y;if(Math.abs(W.y+y-F)<Math.abs(_-F))_=W.y+y;if(Math.abs(W.y+H-F)<Math.abs(_-F))_=W.y+H}}if(r[0]&&d[0]&&w.fT&&x.Yt){var g=n.fT[I];
for(var e=0;e<g.length;e++)if(Math.abs(g[e]-F)<Math.abs(_-F))_=g[e]}if(d[1]&&w.dW&&x.Yt){var Q=Math.round(q.Mm.SI(w.uI,n,w.wi));
if(I==1&&w.Xd==1){var J=O*.5*Math.sqrt(4/3),A;Q*=Math.sqrt(4/3);A=Math.round((F-J)/Q)*Q+J;if(Math.abs(A-F)<Math.abs(_-F))_=A;
A=Math.round((F+J)/Q)*Q-J;if(Math.abs(A-F)<Math.abs(_-F))_=A}else{var A=Math.round(F/Q)*Q;if(Math.abs(A-F)<Math.abs(_-F))_=A}}var p=n.l_;
if(d[3]&&w.l_&&x.Yt&&p.length!=0){for(var e=0;e<p.length;e++){if(!r[2]&&n.Hu.indexOf(e)!=-1)continue;
var U=c.Fz.UG(p,e);for(var j=0;j<3;j+=2)if(U[j+I]!=F&&Math.abs(U[j+I]-F)<Math.abs(_-F))_=U[j+I]}}if(r[1]){var W=r[1],v=W.d,H=W.v,b=[W.x,W.y,W.x+(v>>>1),W.y+(H>>>1),W.x+v,W.y+H];
for(var e=0;e<6;e+=2)if(Math.abs(b[e+I]-F)<Math.abs(_-F))_=b[e+I]}if(d[4]){var v=n.d,H=n.v,b=[0,0,v>>>1,H>>>1,v,H];
for(var e=0;e<6;e+=2)if(Math.abs(b[e+I]-F)<Math.abs(_-F))_=b[e+I]}var s=Math.abs(_-F)<=4*V.Z()/n.a.K?_:1e9;
return s};c.hB=function(){c.pQ.call(this,[10,12],c.qR,"tools/mwand")};c.hB.prototype=new c.pQ;c.hB.prototype.gj=c.pQ.prototype.ahX;
c.hB.prototype.fu=c.pQ.prototype.ahC;c.hB.prototype.R3=function(n,F,O,I){this.finish(n,F,O,I)};c.hB.prototype.getSelection=function(n,F,O,I){var x=this.v4,r=c.pQ.a6g(new aE(Math.floor(x.x),Math.floor(x.y)),this.ka.yZ);
return r};c.hB.rz=function(n,F,O){if(n.C.length!=1){alert("More than one layer selected.");return null}var I=n.t[n.C[0]],x=I.vE<=0?null:I.vE==1?I.B1():I.Fa(n).r,r;
if(x==null&&I.add.lsct!=null&&I.add.lsct!=ho.uE){alert("No layer selected.");return null}if(F.x<0||F.x>n.d||F.y<0||F.y>n.v)return null;
var _=new gv(0,0,n.d,n.v);if(x==null&&_.Qq(I.rect))r=I.buffer;else{r=q.f(_.X()*4);if(x==null)q.nF(I.buffer,I.rect,r,_);
else c.P6.AA(x.channel,x.rect,x.color,r,_)}var d=c.hB.xi(r,_,F,null,O),w=q.$o(d,_),Z=q.f(w.X());q.k9(d,_,Z,w);
return{rect:w,channel:Z}};c.hB.QR=function(n,F,O){var I=F.d,x=F.v,_=0,d=0,w=0,Z=0;n=new Uint32Array(n.buffer);
var r=[],P=O.length;for(var e=0;e<P;e++){var C=O[e],W=Math.round(C.x-.5-F.x),v=Math.round(C.y-.5-F.y);
W=Math.max(0,Math.min(I-1,W));v=Math.max(0,Math.min(x-1,v));var L=v*I+W,H=n[L];r.push([H&255,H>>8&255,H>>16&255,H>>>24])}return r};
c.hB.xi=function(n,F,O,I,x){n=new Uint32Array(n.buffer);var r=F.d,_=F.v,d=r*_;if(I==null)I=c.hB.QR(n,F,[O]);
var w=Math.round(O.x-.5-F.x),Z=Math.round(O.y-.5-F.y),P=Z*r+w,C=Date.now(),W=q.f(r*_),v=x[0],L=1/v,H=x[1]&&v>0?255:0;
if(x[2]){var y=q.f(W.length),g=new Uint32Array(d),Q=1;g[0]=w<<16|Z;y[P]=1;while(Q>0){var J=g[Q-1];Q--;
var A=J>>>16,p=J&65535,e=p*r+A,U=c.hB.tM(n[e],I);if(U>v){var j=H*(1-Math.max(0,Math.min(1,(U-v)*L)));
W[e]=~~j}else{W[e]=255;if(p!=_-1&&y[e+r]==0){g[Q++]=A<<16|p+1;y[e+r]=1}if(p!=0&&y[e-r]==0){g[Q++]=A<<16|p-1;
y[e-r]=1}if(A!=r-1&&y[e+1]==0){g[Q++]=A+1<<16|p;y[e+1]=1}if(A!=0&&y[e-1]==0){g[Q++]=A-1<<16|p;y[e-1]=1}}}}else{for(var e=0;
e<d;e++){var U=c.hB.tM(n[e],I);if(U<=v)W[e]=255}for(var p=0;p<_;p++)for(var A=0;A<r;A++){var e=p*r+A;
if(W[e]==0&&(A>0&&(W[e-1]==255||p>0&&W[e-r-1]==255||p<_-1&&W[e+r-1]==255)||A<r-1&&(W[e+1]==255||p>0&&W[e-r+1]==255||p<_-1&&W[e+r+1]==255)||p>0&&W[e-r]==255||p<_-1&&W[e+r]==255)){var U=c.hB.tM(n[e],I),j=H*(1-Math.max(0,Math.min(1,(U-v)*L)));
W[e]=~~j}}}return W};c.hB.tM=function(n,F){var O=F.length,I=c.hB.KB(n,F[0]),e=1;while(e!=O){I=Math.min(I,c.hB.KB(n,F[e]));
e++}return I};c.hB.KB=function(n,F){var O=n&255,I=n>>>8&255,x=n>>>16&255,r=n>>>24&255;if(F[3]==0)return r<5?0:255;
var _=Math.max(Math.abs(O-F[0]),Math.max(Math.abs(I-F[1]),Math.abs(x-F[2])));return r==0?255:_};c.bt=function(n,F){if(F)c.P6.call(this);
else if(n)c.P6.call(this,[10,49],c.ac,"tools/camove");else c.P6.call(this,[10,26],c.B_,"tools/patch");
this.dJ=null;this.bK=null;this.n=null;this.bp=null;this.Vr=new aE;this.L3=null;this.FJ=null};c.bt.prototype=new c.P6;
c.bt.prototype.XS=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y);if(n.N&&q.q9(r,n.N.channel,n.N.rect)){var _=new gv(0,0,n.d,n.v),d=_.lN(n.N.rect);
if(!n.f7()||d.D2())return;if(!0){var w=q.f(d.X());q.k9(n.N.channel,n.N.rect,w,d);n.N={channel:w,rect:d}}this.Pa(n);
this.p2(n);this.bp=r;this.Vr=new aE(r.x-n.N.rect.x,r.y-n.N.rect.y);this.FJ=q.f(n.N.rect.X()*4);this.FJ.fill(255);
if(this.ka.patch==1){var Z=n.t[n.C[0]];Z.hz(n,n.N,!0);if(Z.HG==null)this.bp=null}this.L3=n.N.rect.clone()}else{this.bK={H:[r.x,r.y],s:["M"]};
this.dJ=r}};c.bt.prototype.RL=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y);if(this.bp){if(this.ka.patch==1){if(n.P4.length==0){var _=n.t[n.C[0]].HG,d=r.x-this.Vr.x,w=r.y-this.Vr.y;
c.eB.d6(n,n.C[0],Math.round(d-_.JI.x),Math.round(w-_.JI.y))}}else this.pj(n,r,"clone")}if(this.dJ){this.bK.s.push("L");
this.bK.H.push(r.x,r.y);this.dJ=r;n.M.qD=this.bK;n.zB=!0}};c.bt.prototype._X=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y);
if(this.bp){var _=n.N.rect.clone();if(this.id==c.ac){var d=n.t[n.C[0]];d.jB(n,d.HG);n.N.rect=this.L3.clone();
var w=q.f(n.N.rect.X()*4);q.GF(n.N.channel,w,3);this.cx(n,"sheal",w,n.N.rect,n.N.rect);n.N.rect=_;_=_.Tq(this.L3)}this.pj(n,r,"heal");
this.finish(n,_,null,null,!0);n.D(_);this.bp=null}if(this.dJ){var Z=c.pQ.d$(this.ka.setop,I.q(u.MQ),I.q(u.pI)),P=new k(V.E.JA,!0);
if(this.bK.H.length<=4)P.data=c.pQ.YN();else P.data=c.pQ.TS(this.bK.H,Z);F.A(P);this.dJ=null;n.M.qD=null;
n.zB=!0}};c.bt.prototype.Md=function(){return this.n};c.bt.prototype.wl=function(n,F,O,I,x){c.P6.prototype.wl.call(this,n,F,O,I,x);
this.pa(x,I)};c.bt.prototype.pa=function(n,F){var O="auto;";if(F!=null&&F.q(u.MQ)&&!F.q(u.pI)||this.ka.setop=="union")O="copy";
var I=new k(V.E.P,!0);I.data={e:V.U.VC,dx:O};if(this.caller)this.caller.A(I)};c.bt.prototype.pj=function(n,F,O){var I=new aE(Math.round(this.bp.x-F.x),Math.round(this.bp.y-F.y));
if(this.ka.patch==1)I.mT(-I.x,-I.y);this.n=I;this.cx(n,O,this.FJ,n.N.rect,n.N.rect);this.D(n,n.N.rect)};
c.Xj=function(){c.bt.call(this,!0);this.ka.patch=1};c.Xj.prototype=new c.bt(!0,!0);c.NP=function(){c.P6.call(this,[10,13],c.aji,"tools/pbucket")};
c.NP.prototype=new c.P6;c.NP.prototype.enable=function(n,F,O,I){var x=new k(V.E.P,!0);x.data={e:V.U.VC,dx:"default"};
F.A(x)};c.NP.prototype.XW=function(n,F){};c.NP.prototype._X=function(n,F,O,I,x){if(this.Dk(I,F,x))return;
if(!n.f7())return;var r=n.a.jR(x.x,x.y),_=c.hB.rz(n,r,this.ka.wconf);if(_==null)return;var d=q.f(_.rect.X()*4);
q.IW(d,(O.nE&255)<<16|(O.nE>>8&255)<<8|(O.nE>>16&255)<<0);q.GF(_.channel,d,3);this.Pa(n);this.cx(n,"draw",d,_.rect,_.rect);
this.D(n,_.rect);this.finish(n,_.rect)};c.Iq=function(){c.pQ.call(this,[10,14],c.am3,"tools/plasso");
this.IF="crosshair";this.f9=[];this.Mc=null;this.bK=null;this.a3K=0};c.Iq.prototype=new c.pQ;c.Iq.prototype.disable=function(n,F,O,I){this.KT(n)};
c.Iq.prototype.R3=function(n,F,O,I){this.f9=[u.lW,u.pf]};c.Iq.prototype.JF=function(n){return this.f9.indexOf(n)!=-1};
c.Iq.prototype.jn=function(n){return this.bK!=null};c.Iq.prototype.c0=function(){return this.bK!=null};
c.Iq.prototype.A5=function(){return this.bK!=null};c.Iq.prototype.BO=function(n,F,O,I){if(this.bK==null)return;
var x=this.bK,r=x.H,_=r.length-2,d=this.v4;if(this.rp>1&&O.q(u.pI)&&I.rt){r.push(0,0);x.s.push("L");
_+=2}else if(O.q(u.MQ))d=c.AG.J6(new aE(r[_-2],r[_-1]),d);r[_]=d.x;r[_+1]=d.y;n.M.qD=x;n.zB=!0};c.Iq.prototype.lu=function(n,F,O,I){var x=Date.now();
if(this.bK==null)this.bK={H:[this.v4.x,this.v4.y,this.v4.x,this.v4.y],s:["M","L"]};else{this.BO(n,F,O,I);
if(x-this.a3K<250||aE.sl(this.v4,new aE(this.bK.H[0],this.bK.H[1]))<5*V.Z()/n.a.K){this.Mc=this.bK;this.finish(n,F,O,I);
this.KT(n);return}this.bK.s.push("L");this.bK.H.push(this.v4.x,this.v4.y)}this.a3K=x;n.M.qD=this.bK};
c.Iq.prototype.KT=function(n){this.bK=null;this.f9=[];if(n!=null){n.M.qD=null;n.zB=!0}};c.Iq.prototype.Ka=function(n,F,O,I){c.pQ.prototype.Ka.call(this,n,F,O,I);
if(I.q(u.YE)&&this.bK==null&&this.Mc&&n.N!=null){var x=new k(V.E.S);x.T=c.dA;x.data={e:"h_stepbck"};
F.A(x);this.R3(n,O,I,null);this.bK=this.Mc;return}if(this.bK==null)return;if(I.q(u.lW)||I.q(u.pf)){this.bK.H.pop();
this.bK.H.pop();this.bK.s.pop();this.BO(n,O,I)}if(I.q(u.Ma)){if(this.bK.H.length>4){this.Mc=this.bK;
this.finish(n,O,I)}this.bK=null}if(I.q(u.YE)){this.bK=null}n.M.qD=this.bK;n.zB=!0};c.Iq.prototype.getSelection=function(n,F,O,I){return c.pQ.TS(this.bK.H)};
c.Jf=function(){c.pQ.call(this,[10,10],c.a9k,"tools/mlasso");this.IF="crosshair";this.f9=[];this.b=[];
this.W8=[];this.Oc=[];this.d7=null;this.UZ=null;this.r6=null;this.SH=0;this.TL=0};c.Jf.prototype=new c.pQ;
c.Jf.prototype.disable=function(n,F,O,I){this.clear(n)};c.Jf.prototype.jn=function(n){return this.b.length!=0};
c.Jf.prototype.A5=function(){return this.b.length!=0};c.Jf.prototype.JF=function(n){return this.f9.indexOf(n)!=-1};
c.Jf.prototype.R3=function(n,F,O,I){this.f9=[u.lW,u.pf];var x=this.cl(this.nh,n);if(this.b.length!=0&&(aE.sl(x,this.b[0])<4*V.Z()/n.a.K||Date.now()-this.SH<300)){this.zH(n,this.b[0]);
this.finish(n,F,O);this.clear(n);return}this.SH=Date.now();if(this.b.length!=0)x=this.GI(x,n);else{var r=n.d,_=n.v,d=q.f(r*_),w=n.dH(),Z=r*_*4;
for(var e=0;e<Z;e+=4)d[e>>>2]=~~(.5+q.iB(w[e],w[e+1],w[e+2])*(w[e+3]*(1/255)));this.d7=q.mi.amX(d,r,_);
this.r6=new Uint16Array(d.length)}this.zH(n,x);this.TL=O.q(u.pI)?1:0;this.lx(n)};c.Jf.prototype.zH=function(n,F){var O=this.b;
this.W8[O.length]=this.Oc.length;if(O.length!=0){q.mi.HC(this.UZ,F.y*n.d+F.x);var I=this.hm(n,F);I.reverse();
var x=c.Jf.lZ(n,I);this.Oc=this.Oc.concat(x)}O.push(F);this.EV(n)};c.Jf.prototype.EV=function(n){var F=this.b[this.b.length-1],O=F.y*n.d+F.x;
this.UZ=q.mi.a3g(this.d7.CU,this.d7.AU,O);this.r6.fill(0)};c.Jf.prototype.cl=function(n,F){return new aE(Math.floor(Math.max(0,Math.min(F.d-1,n.x))),Math.floor(Math.max(0,Math.min(F.v-1,n.y))))};
c.Jf.prototype.clear=function(n){this.Oc=[];this.b=[];this.W8=[];this.d7=null;this.UZ=null;this.r6=null;
if(n!=null){n.M.qD=null;n.M.Ri=[];n.zB=!0}this.f9=[]};c.Jf.prototype.BO=function(n,F,O,I){var x=this.b,r=x.length;
if(r==0)return;var _=this.GI(this.cl(this.v4,n),n),d=this.hm(n,_);for(var e=0;e<d.length;e++){var w=d[e],Z=new aE(w%n.d,Math.floor(w/n.d));
if(this.r6[w]>30&&aE.sl(Z,x[r-1])>20){this.zH(n,Z);return}this.r6[w]++}if(this.TL==1&&I.rt)this.zH(n,_);
this.lx(n)};c.Jf.prototype.lx=function(n){var F=this.b;if(F.length!=0){var O=this.GI(this.cl(this.v4,n),n),I=this.hm(n,O);
I.reverse();var x=c.Jf.lZ(n,I),r=this.Oc.concat(x),_=n.M.qD={H:r,s:["M"]};for(var e=2;e<r.length;e+=2)_.s.push("L")}n.M.Ri=[];
for(var e=0;e<F.length;e++)n.M.Ri.push(F[e].x+.5,F[e].y+.5);n.zB=!0};c.Jf.prototype.lu=function(n,F,O,I){};
c.Jf.prototype.Ka=function(n,F,O,I){if(this.b.length==0)return;if(I.q(u.lW)||I.q(u.pf)){this.b.pop();
this.Oc=this.Oc.slice(0,this.W8[this.b.length]);this.W8.pop();if(this.b.length==0)this.clear(n);else this.EV(n);
this.lx(n)}if(I.q(u.Ma)){var x=this.cl(this.v4,n);this.zH(n,x);this.finish(n,O,I);this.clear(n)}if(I.q(u.YE)){this.clear(n)}};
c.Jf.prototype.getSelection=function(n,F,O,I){return c.pQ.TS(this.Oc)};c.Jf.prototype.hm=function(n,F){var O=this.b[this.b.length-1],I=O.y*n.d+O.x,x=F.y*n.d+F.x;
if(this.TL==1)return[x,I];var r=[x];while(x!=I){x=this.UZ.wt[x];r.push(x);if(r.length>5e3){console.log(r);
throw"e"}}return r};c.Jf.lZ=function(n,F){var O=[],I=n.d;for(var e=0;e<F.length;e++){var x=F[e];O.push(x%I+.5,Math.floor(x/I)+.5)}return O};
c.Jf.prototype.GI=function(n,F){var O=F.d,I=F.v,x=n.clone(),_=3;q.mi.HC(this.UZ,n.y*O+n.x);var r=this.UZ.Gh[n.y*O+n.x];
for(var d=-_+1;d<_;d++)for(var w=-_+1;w<_;w++){var Z=n.x+w,P=n.y+d;if(Z<0||Z>=O||P<0||P>=I)continue;
q.mi.HC(this.UZ,P*O+Z);if(this.UZ.Gh[P*O+Z]<r)x.mT(Z,P)}return x};c.V3=function(){c.Fq.call(this,[10,36],c.aj_,"tools/ruler");
this.AZ=null;this.Ej=null;this._k=null;this.JE=null};c.V3.prototype=new c.Fq;c.V3.prototype.jn=function(n){return n.rt};
c.V3.prototype.disable=function(n,F,O,I){this.AZ=this.Ej=null;if(n)this.NS(n)};c.V3.prototype.XS=function(n,F,O,I,x){var r=n.a.K/V.Z(),_=n.a.jR(x.x,x.y);
_.x=Math.round(_.x);_.y=Math.round(_.y);var d=this.AZ;if(d&&aE.sl(_,d[0])*r<6)this.Ej=[0];else if(d&&aE.sl(_,d[1])*r<6)this.Ej=[1];
else if(d&&c.V3.a6z(d[0],d[1],_)*r<6&&Math.min(d[0].x,d[1].x)-5<=_.x&&_.x<=Math.max(d[0].x,d[1].x)+5&&Math.min(d[0].y,d[1].y)-5<=_.y&&_.y<=Math.max(d[0].y,d[1].y)+5){this.Ej=[0,1];
this.JE=[d[0].clone(),d[1].clone()];this._k=_}else{this.AZ=[_.clone(),_.clone()];this.Ej=[1]}};c.V3.prototype.RL=function(n,F,O,I,x){if(this.Ej==null)return;
var r=this.AZ,_=this.Ej,d=n.a.jR(x.x,x.y);d.x=Math.round(d.x);d.y=Math.round(d.y);if(_.length==2){var w=d.x-this._k.x,Z=d.y-this._k.y;
r[0]=this.JE[0].clone();r[0].offset(w,Z);r[1]=this.JE[1].clone();r[1].offset(w,Z)}else{r[_[0]].mT(d.x,d.y);
if(I.q(u.MQ)){r[_[0]]=c.AG.J6(r[1-_[0]],r[_[0]])}}this.NS(n);this.ZY(F,V.E.P,{e:V.U.hO,T:this.id,akd:r[0],Yd:r[1],gC:n.gC,a4W:n.d})};
c.V3.prototype._X=function(n,F,O,I,x){this.Ej=null};c.V3.prototype.ZY=function(n,F,O){var I=new k(F,!0);
I.data=O;n.A(I)};c.V3.prototype.NS=function(n){var F=this.AZ;if(F==null){n.M.qD=null;n.M.Ri=[]}else{var O=[F[0].x,F[0].y,F[1].x,F[1].y];
n.M.qD={s:["M","L"],H:O};n.M.Ri=O}n.zB=!0};c.V3.a6z=function(n,F,O){var I=F.x-n.x,x=F.y-n.y,r=Math.abs(x*O.x-I*O.y+F.x*n.y-F.y*n.x),_=Math.sqrt(I*I+x*x);
return r/_};c.tY=function(){c.P6.call(this,[10,19],c.iZ,"tools/sharpen");this.W6="copy"};c.tY.prototype=new c.P6;
c.tY.prototype.XS=function(n,F,O,I,x){var r=this.ka.pdetail?cb.$Q:cb.iZ;if(I.q(u.pI))r=cb.dz;this.yW(n,O,I,x,this.ka.strn,r);
if(this.IY==null)return;this._t(n)};c.tY.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);if(this.wh)this.dh(n,O,x);
if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.cp=function(){c.P6.call(this,[10,24],c.A6,"tools/shbrush");
this.W6="draw";this.ka.opacity=.5};c.cp.prototype=new c.P6;c.cp.prototype.XS=function(n,F,O,I,x){this.yW(n,O,I,x,1);
if(this.IY==null)return;this.p2(n);this._t(n)};c.cp.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);
if(this.wh)this.dh(n,O,x);if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.cp.prototype._X=function(n,F,O,I,x){if(this.IY==null)return;
this.cx(n,"sheal",this.IY.El(),this.IY.nJ(),this.IY.uu(),null);this.D(n,this.IY.uu());c.P6.prototype._X.call(this,n,F,O,I,x)};
c.nA=function(){c.P6.call(this,[10,20],c.GD,"tools/smudge");this.W6="copy"};c.nA.prototype=new c.P6;
c.nA.prototype.XS=function(n,F,O,I,x){this.yW(n,O,I,x,this.ka.strn,cb.GD);if(this.IY==null)return;this._t(n)};
c.nA.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);if(this.wh)this.dh(n,O,x);if(this.IY==null)return;
if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.ZT=function(){c.P6.call(this,[10,23],c.YC,"tools/sponge");
this.W6="sponge"};c.ZT.prototype=new c.P6;c.ZT.prototype.XS=function(n,F,O,I,x){this.yW(n,O,I,x,this.ka.flow);
if(this.IY==null)return;this._t(n)};c.ZT.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);if(this.wh)this.dh(n,O,x);
if(this.IY==null)return;if(!x.rt)return;this.ID(n,O,I,x);this._t(n)};c.yi=function(){c.Fq.call(this,[10,17],c.o8,"tools/zoom");
this.uZ=!1;this.Tk=!0;this.kE=0;this.WS=null;this.y$=null;this.g8=0;this.ql=null;this.Jh=0;this.VA=new at([{name:[8,0],R$:"Ctrl + +"},{name:[8,1],R$:"Ctrl + -",dP:!0},{name:[20,3],R$:"Ctrl + 0"},{name:["VAR0: 100%",[20,2]],R$:"Ctrl + 1"}],[{g:V.E.S,T:c.o8,i:{e:"zoom",Tk:!0}},{g:V.E.S,T:c.o8,i:{e:"zoom",Tk:!1}},{g:V.E.S,T:c.o8,i:{e:"adapt",G:"fitscr"}},{g:V.E.S,T:c.o8,i:{e:"adapt",G:"pixel"}}])};
c.yi.prototype=new c.Fq;c.yi.prototype.e9=function(n,F,O,I,x){var r=this.VA;r.B();r.parent=F;r.update(n,O);
var _=new k(V.E.P,!0);_.data={e:V.U.di,AM:r,x:x.Ux+2,y:x.fw+1};F.A(_)};c.yi.prototype.enable=function(n,F,O,I){this.C1(F,I);
if(n&&Date.now()-this.kE<300)this.fM({e:"adapt",G:"pixel"},F,n,I,O);this.kE=Date.now()};c.yi.prototype.XS=function(n,F,O,I,x){this.y$=new aE(x.x,x.y);
this.g8=n.a.K;this.ql=n.a.n.clone()};c.yi.prototype.RL=function(n,F,O,I,x){if(this.y$==null)return;var r=Math.exp(Math.log(this.g8)+(x.x-this.y$.x)/64);
r=Math.max(.02,Math.min(32,r));n.a.K=this.g8;n.a.n=this.ql.clone();this.fM({e:"zoom",K:r,c_:this.y$},F,n,I,O)};
c.yi.prototype._X=function(n,F,O,I,x){if(aE.sl(this.y$,x)<4){var r=this.Tf(I);this.fM({e:"zoom",Tk:r,c_:x},F,n,I,O)}this.y$=null};
c.yi.dk=[32,16,12,8,6,5,4,3,2,1,2/3,1/2,1/2*(2/3),1/4,1/4*(2/3),1/8,1/8*(2/3),1/16,1/16*(2/3),1/32,1/32*(2/3),1/64];
c.yi.lD=function(n,F,O,I){var x=1;while(n*x*1/2>O||F*x*1/2>I)x*=1/2;if(n*x*2/3>O||F*x*2/3>I)x*=1/2;else if(n*x>O||F*x>I)x*=2/3;
return x};c.yi.cF=function(n,F){var O=c.yi.Ip(n);if(F&&O==0)return n;if(!F&&O==c.yi.dk.length-1)return n;
return c.yi.dk[F?O-1:O+1]};c.yi.Ip=function(n){var F=0;while(c.yi.dk[F]>n)F++;return F};c.yi.jg=function(n,F,O,I){var x=n.KH;
if(I==0||I==null){I=c.yi.cF(n.K,O);if(I==n.K)return}var r=n.jR(F.x,F.y);if(x.d*I<=n.Nv.d&&x.v*I<=n.Nv.v){n.n.mT(0,0);
n.K=I}else{var _=n.eY(),d=n.K/I;_.translate(-r.x,-r.y);_.scale(d,d);_.translate(r.x,r.y);n.cL(_)}};c.yi.prototype.fM=function(n,F,O,I,x){if(n.e=="pzoom"){if(typeof n.G=="string")return;
n={e:"zoom",K:n.G/100}}var r=0,_=!1,d=null;if(n.e=="adapt"){var w=0;if(n.G=="pixel")w=1;if(n.G=="fitscr"){var w=0,Z=O.a.Nv.d,P=O.a.Nv.v;
w=Math.min((Z-14)/O.d,(P-14)/O.v)}d=new aE(Math.round(O.a.Nv.d/2),Math.round(O.a.Nv.v/2));r=w;c.yi.jg(O.a,d,_,r);
O.T3=!0}if(n.e.startsWith("multi")){function C(s){var G=s[0].x-s[1].x,T=s[0].y-s[1].y;return Math.sqrt(G*G+T*T)}function W(s){return new aE((s[0].x+s[1].x)/2,(s[0].y+s[1].y)/2)}var v=n.z1,L=W(v);
if(n.e=="multidown"){this.WS=[v,O.a.K,O.a.jR(L.x,L.y)]}else{r=this.WS[1]*C(v)/C(this.WS[0]);if(r>=1)r=Math.min(32,Math.round(r));
else{var H=0,y=1e9,g=c.yi.dk;for(var e=0;e<g.length;e++){var Q=Math.abs(1-r/g[e]);if(Q<y){y=Q;H=e}}r=g[H]}if(r!=O.a.K)c.yi.jg(O.a,L,_,r);
var J=this.WS[2],A=O.a.Hl(J.x,J.y),p=O.a.n;p.x=Math.round(p.x+L.x-A.x);p.y=Math.round(p.y+L.y-A.y);O.T3=!0}}if(n.e=="scroll"){d=n.c_;
this.Jh+=n.dt.y;var U=14;if(this.Jh<-U){_=!0;this.Jh=Math.max(this.Jh+U,-(U-1))}else if(this.Jh>U){_=!1;
this.Jh=Math.min(this.Jh-U,U-1)}else return;c.yi.jg(O.a,d,_,r);O.T3=!0}if(n.e=="zoom"){d=n.c_?n.c_:new aE(Math.round(O.a.Nv.d/2),Math.round(O.a.Nv.v/2));
if(n.K!=null)r=n.K;else _=n.Tk;c.yi.jg(O.a,d,_,r);O.T3=!0}if(n.e=="mskView"){var j=O.t[O.C[0]],b=j.vE==3?j.Fa(O).r:j.B1();
if(n.G==0){O.a.o=[1,1,1];b.wC=!1}if(n.G==1){O.a.o=[1,1,1];b.wC=!0}if(n.G==2){O.a.o=[0,0,0];b.wC=!0}for(var e=0;
e<O.TM.length;e++)O.TM[e].wC=!1;O.P4=[];O.zB=!0}};c.yi.prototype.Ka=function(n,F,O,I){if(this.uZ!=I.q(u.pI)){this.uZ=I.q(u.pI);
var x={e:V.U.hO,T:this.id,uZ:this.uZ},r=new k(V.E.P,!0);r.data=x;F.A(r);this.C1(F,I)}};c.yi.prototype.C1=function(n,F){var O=new k(V.E.P,!0),I=this.Tf(F);
O.data={e:V.U.VC,dx:I?"zoom-in":"zoom-out"};n.A(O)};c.yi.prototype.wl=function(n,F,O,I){this.Tk=n.Tk;
this.C1(F,I)};c.yi.prototype.Tf=function(n){var F=this.Tk;if(n.q(u.cf)&&n.q(u.ep))F=!0;if(this.uZ)F=!F;
return F};c.yi.tp=function(n,F){if(n.q(u.wW)||n.q(u.aiZ)){F.T=c.o8;F.data={e:"zoom",Tk:!0}}if(n.q(u.sF)){F.T=c.o8;
F.data={e:"zoom",Tk:!1}}if(n.q(u.zE)){F.T=c.o8;F.data={e:"adapt",G:"fitscr"}}if(n.q(u.c$)){F.T=c.o8;
F.data={e:"adapt",G:"pixel"}}};c.M2=function(n,F,O){c.Fq.call(this,n,F,O);this.Dh=null;this.GL=null;
this.ta=null;this.aj0=0};c.M2.prototype=new c.Fq;c.M2.prototype.enable=function(n,F,O,I,x){this.GL=O;
var r=new k(V.E.P,!0);r.data={e:V.U.VC,dx:"default"};F.A(r)};c.M2.prototype.e9=function(n,F,O,I,x){if(n.Y1()[0].length==0)return;
var r=new k(V.E.P,!0);r.data={e:V.U.hO,T:this.id,$d:x,m4:n,Hs:O};F.A(r)};c.M2.prototype.XN=function(n,F){var O=new k(V.E.P,!0);
O.data={e:V.U.g7,b9:cf.oV};if(!F.Yt)n.A(O);O.data={e:V.U.g7,b9:cf.ms};if(!F.Kc.Hi)n.A(O)};c.M2.prototype.jv=function(n,F,O,I){if(O.Gv!=this.id)return;
if(n.C.length==0)return;var x=n.t[n.C[0]],r=x.add.vmsk,_=x.add.vstk,d=c.M2.n3(n,n.C[0]);this.Dh=n;this.ta=F;
if(x.zX()&&r!=null&&(JSON.stringify(_)!=JSON.stringify(O.tF)||JSON.stringify(d)!=JSON.stringify(O.XU))){this.aj0=Date.now();
var w=new k(V.E.P,!0);w.data={e:V.U.g7,b9:cf.tJ,G:d};F.A(w);w.data={e:V.U.g7,b9:cf.z9,G:_};F.A(w)}};
c.M2.prototype.XW=function(n,F){if(this.Dh==null)return;if(F==cf.fo||F==cf.tJ||F==cf.z9){if(Date.now()-this.aj0<50)return;
var O=F==cf.tJ,I=this.Dh,x=O?n.XU:n.tF,r=[];for(var e=0;e<I.C.length;e++){var _=I.C[e],d=I.t[_];if(!d.zX()||d.add.vmsk==null)continue;
r.push(_)}var w=new k(V.E.S,!0);w.T=c.lo;w.data={e:K.i8,ha:r,BP:O,G:x};if(r.length!=0)this.ta.A(w)}};
c.M2.prototype.acN=function(n){if(typeof n=="number"){var F=new k(V.E.JA,!0);F.data=c.vb.Lz(0);F.data.Mk.Usng.v.Type.v.Clr.v=q.W.Vm({Q:n>>>16&255,l:n>>>8&255,O:n>>>0&255});
this.ta.A(F)}};c.M2.prototype.fM=function(n,F,O,I,x){this.ta=F;if(n.e=="newfill"){if(n.j5==0){var r=new k(V.E.P,!0);
r.data={e:V.U.n$,cU:"colorpicker",eF:x.nE,KC:this.acN.bind(this)};F.A(r)}}else if(n.e=="pathedit"){var _=n.G1,d="",w=O.Hi.slice(0),Z=O.f$.slice(0),P=O.Hi.slice(0),C=O.f$.slice(0);
if(_=="rnm"){var W=-1-n.FI,v=w[W],L=fj.kh(n.name,v.add);if(W!=0)P[W]=L;else{C=[P.length];P.push(L);P[0]=fj.kh("Work Path")}d="Rename"}else if(_=="new"){P.push(fj.kh("Path "+w.length));
C=[P.length-1];d="New"}else if(_=="del"){if(C.length==0)return;C.sort(function(s,X){return s-X});if(C[0]==0){P[0]=fj.kh(w[0].name);
C=C.slice(1)}var H=0;while(C.length!=0){P.splice(C[0]-H,1);C=C.slice(1);H++}d="Delete"}else if(_=="fromsel"){var y=P[0]=fj.kh("Work Path");
C=[0];if(O.N==null)return;var g=O.N.channel.slice(0);for(var e=0;e<g.length;e++)g[e]=g[e]>128?2:1;var Q=O.N.rect.clone();
Q.EM(1,1);var J=q.f(Q.X());q.k9(g,O.N.rect,J,Q);var A=ej.CO(J,Q.d,Q.v,Math.round(Q.X()*5e-4)),p=ej.Y1(A),U=new cD(1,0,0,1,-1+O.N.rect.x,-1+O.N.rect.y);
for(var e=0;e<p.length;e++)q.z.m(p[e].path.H,U,p[e].path.H);for(var e=0;e<p.length;e++){var j=p[e];if(j.color==1&&j.parent==-1)continue;
var b=q.z.rD(p[e].path,!1);y.add.vmsk.b=y.add.vmsk.b.concat(b.slice(2))}y.add.vogk=K.XO(y.add.vmsk.b);
d="Selection to"}var s=new hS(d+" Path",this);s.data={lO:w,$k:Z,a2C:P,Wj:C};if(_=="fromsel"){s.data.xA=O.N;
s.data.pi=null}O.p$(s);this.Xe(s.data,O)}else{var G=O.Y1(n.e=="append"),p=G[0],T=G[1],y=p[T[0]],z=y.add.vmsk,m=y.add.vogk,$=z.clone(),o=z.clone(),h=JSON.stringify(m);
if(n.e=="remove"){if(o.C.length==0)return;var H=0;for(var e=0;e<o.C.length;e++){m.splice(o.C[e]+H,1);
H--}o.b=q.Y.aoW(o.b,o.C);o.C=[];o.oE=[]}if(n.e=="append"){c.M2.ra(n.akA,o,m)}this.No(O,y.FI,o,m);this.pR(O,n.WL,y.FI,$,o.clone(),null,h,JSON.stringify(m))}};
c.M2.Rf=function(n,F){var O=q.Y.a9I(n.b,n.C),I=[];for(var e=0;e<n.C.length;e++)I.push(JSON.parse(JSON.stringify(F[n.C[e]])));
return[O,I]};c.M2.ra=function(n,F,O){var I=q.Y._v(F.b),x=q.Y._v(n[0]);F.b=F.b.concat(n[0].slice(2));
F.C=[];for(var e=0;e<x;e++)F.C.push(I+e);for(var e=0;e<x;e++)O.push(JSON.parse(JSON.stringify(n[1][e])))};
c.M2.prototype.JF=function(n,F){if(F==null)return!1;var O=F.Y1(),I=O[0],x=O[1];if(x.length==0)return!1;
var r=I[x[0]],_=r.add.vmsk;if(_&&_.C.length+_.oE.length!=0)return[u.lW,u.pf].indexOf(n)!=-1};c.M2.prototype.Ka=function(n,F,O,I){if(n==null)return;
var x=n.Y1(),r=x[0],_=x[1];if(_.length==0)return;var d=r[_[0]],w=d.add.vmsk;if(I.q(u.YE)||I.q(u.Ma)){w.oE=[];
n.zB=!0}if(w.C.length!=0){var Z=I.vo();if(Z.x!=0||Z.y!=0){var P=w.clone(),C=w.clone(),W=new cD(1,0,0,1,Z.x,Z.y),v=d.add.vogk,L=JSON.stringify(v);
q.Y.gS(C.b,W,C.C);q.oK.m(v,q.J.EC(W),C.C);this.No(n,d.FI,C,v);this.pR(n,"Move Paths",d.FI,P,C.clone(),!0,L,JSON.stringify(v))}if(I.q(u.lW)||I.q(u.pf))this.fM({e:"remove",WL:"Delete Paths"},F,n,I,O)}};
c.M2.prototype.pR=function(n,F,O,I,x,r,_,d){var w=new hS(F,this);w.data={GK:O,CF:I,Gm:x,abS:r,ajv:_,$L:d};
n.p$(w)};c.M2.prototype.Xe=function(n,F){if(n.GK!=null)this.No(F,n.GK,n.Gm.clone(),JSON.parse(n.$L));
else{F.Hi=n.a2C.slice(0);F.f$=n.Wj.slice(0);F.zB=F._y=!0}if(n.xA||n.pi){F.N=n.pi;F.NX=!0}};c.M2.prototype.cQ=function(n,F){if(n.GK!=null)this.No(F,n.GK,n.CF.clone(),JSON.parse(n.ajv));
else{F.Hi=n.lO.slice(0);F.f$=n.$k.slice(0);F.zB=F._y=!0}if(n.xA||n.pi){F.N=n.xA;F.NX=!0}};c.M2.prototype.No=function(n,F,O,I){var x=F<0?n.Hi[-1-F]:F<1e6?n.t[F]:n.t[F-1e6].add.TySh;
x.add.vmsk=O;x.add.vogk=I;if(1e6<=F){bt.FE(x);var r=n.t[F-1e6],_=x,d=this.GL,w=new h2(_.Vb,d.sH),Z=cJ.mH(w,_);
r.rect=Z.j;r.buffer=Z.zc;r.D();n.D()}else if(0<=F){O.j8=!0;x.o3(n);n.D()}n.zB=n._y=!0};c.M2.n3=function(n,F){var O=n.t[F],I=O.add.vstk,x=null;
if(I&&!I.fillEnabled.v)x={he:0};else if(O.add.SoCo)x={he:1,Gk:O.add.SoCo};else if(O.add.GdFl)x={he:2,Gk:O.add.GdFl};
else if(O.add.PtFl)x={he:3,Gk:O.add.PtFl};return x};c.M2.pK=function(n,F){var O=n.add.vmsk,I=n.add.vstk,x=F.he;
if(I)I.fillEnabled.v=x!=0;if(x>0){var r=["SoCo","GdFl","PtFl"][x-1];for(var e=0;e<3;e++)delete n.add[["SoCo","GdFl","PtFl"][e]];
n.add[r]=F.Gk}};c.vb=function(n,F,O,I){c.M2.call(this,n,F,O);this.ka={tmode:1,shape:fH.tc(),pshape:0,binop:0,crad:0,irad:40,length:4,sides:5,width:5,tolr:5,tsiz:300,cstr:{OI:0}};
this.a9H=I;this.aG=null;this.DJ=null;this.oR=null};c.vb.prototype=new c.M2;c.vb.prototype.jn=function(n){return n.rt&&this.id!=c.oy};
c.vb.prototype.enable=function(n,F,O,I,x){this.GL=O;var r=new k(V.E.P,!0);r.data={e:V.U.VC,dx:"crosshair"};
F.A(r)};c.vb.prototype.RW=function(n,F,O,I){};c.vb.prototype.XS=function(n,F,O,I,x){var r=this.ka.tmode;
if(r!=2)this.XN(F,O);if(r==2&&!n.f7())return;var _=n.a.jR(x.x,x.y);_=c.eB.J_(n,_,O);this.oR=[_.x,_.y];
this.aG=_;this.DJ=new aE(0,0)};c.vb.prototype.tz=function(n,F,O){var I=[this.aG.clone(),F.clone()];if(this.a9H)I=c.vb.YW(I[0],I[1],O,!0,this.ka.cstr);
if(n)n.a.LL=new gv(I[0].x,I[0].y,I[1].x-I[0].x,I[1].y-I[0].y);return this.RW(I[0],I[1],O.q(u.MQ),this.oR)};
c.vb.prototype.Uu=function(n,F,O){var I=n.a.jR(F.x,F.y),x=this.ka.cstr;if(x.OI==2){var r=new gv(I.x-x.x,I.y-x.y,x.x,x.y),_=c.eB.VO(n,r,O);
I.x+=_[0];I.y+=_[1];c.eB.BU(n,r,_)}else I=c.eB.J_(n,I,O);return I};c.vb.prototype.RL=function(n,F,O,I,x){if(this.aG==null)return;
var r=this.oR,_=r.length,d=x?this.Uu(n,x,O):new aE(r[_-2],r[_-1]);if(I.q(u.cf))this.aG=d.ba(this.DJ);
else this.DJ=d.ba(this.aG);r.push(d.x,d.y);if(this.ka.shape==null)this.ka.shape=O.zx[0];var w=this.tz(n,d,I)[0],Z=q.z.qg(w);
n.M.qD=Z;if(this.id!=c.oy&&this.id!=c.d0&&this.id!=c.SK)c.Fq.Ji(x.x+10,x.y-10,n.a.LL,n,O);n.zB=!0};c.vb.prototype.akz=function(n,F,O,I){var x=n[4].clone();
if(I){x.x-=F/2;x.y-=O/2}var r=this.RW(x,new aE(x.x+F,x.y+O),!1,this.oR);this.OB(n[0],n[1],n[2],r)};c.vb.prototype.OB=function(n,F,O,I){var x=new k(V.E.JA,!0);
x.data=c.vb.v$(I[1],O);F.A(x);if(I[1].v.classID=="customShape"&&I[1].v.Nm.v.startsWith("--")){var r=n.Y1(),_=r[0],d=r[1],w=_[d.pop()],Z=w.add.vmsk,P=w.add.vogk,C=Z.clone();
C.b=I[0];this.No(n,w.FI,C,P)}};c.vb.prototype._X=function(n,F,O,I,x){if(this.aG==null)return;var r=this.Uu(n,x,O),_=this.ka.binop,d=this.ka.tmode,w=this.oR,Z=w.length;
if(this.id==c.oy&&Z<=4){}else if(Z<=4){r.x=Math.round(r.x);r.y=Math.round(r.y);var P=new k(V.E.P);P.data={e:V.U.n$,cU:"createshape",afI:this.akz.bind(this),a5z:this.name,abw:[n,F,O,I,r]};
F.A(P)}else if(Z!=2){var C=this.tz(n,r,I),W=C[0];if(d==0&&W.length>2){W[2].Xu=[1,2,3,0][_];var v=n.Y1(!0),L=v[0],H=v[1],y=L[H.pop()],g=y.add.vmsk,Q=y.add.vogk,J=g.clone(),A=g.clone(),p=JSON.stringify(Q);
A.b=A.b.concat(W.slice(2));A.C=[q.Y._v(A.b)-1];var U=q.oK.tW(C[1]);Q.push(U?U:q.oK.CZ());this.No(n,y.FI,A,Q);
this.pR(n,this.name,y.FI,J,A,null,p,JSON.stringify(Q))}else if(d==1){this.OB(n,F,O,C)}else if(d==2){var A=new K.X9;
A.b=A.b.concat(W.slice(2));var j=A.B1(),b=q.f(j.rect.X()*4);q.IW(b,(O.nE&255)<<16|(O.nE>>8&255)<<8|(O.nE>>16&255)<<0);
q.GF(j.channel,b,3);var s=new k(V.E.S,!0);s.T=c.pY;s.data={e:"draw",SS:{buffer:b,rect:j.rect.clone()},WL:this.name};
F.A(s)}}this.aG=null;n.M.qD=null;n.M.iA=null;n.M.s3=[];n.a.LL=null;n.zB=!0};c.vb.prototype.wl=function(n,F,O,I,x){for(var O in n)this.ka[O]=n[O]};
c.vb.YW=function(n,F,O,I,x){var r=n.x,_=n.y,d=F.x,w=F.y;if(x&&x.OI==2){if(I){d=Math.round(d);w=Math.round(w)}r=d-x.x;
_=w-x.y}else{var Z=0;if(x&&x.OI==1)Z=x.y/x.x;else if(O&&O.q(u.MQ))Z=1;if(Z!=0){if(I){if(r<d)r=Math.floor(r);
else r=Math.ceil(r);if(_<w)_=Math.floor(_);else _=Math.ceil(_)}var P=Math.abs(d-r),C=Math.abs(w-_),W=P;
if(C/P<Z)W*=C/P/Z;d=d>r?r+W:r-W;w=w>_?_+W*Z:_-W*Z}if(O&&O.q(u.pI)){r-=d-r;_-=w-_}}var n=new aE(r,_),F=new aE(d,w);
if(I)c.vb.amF(n,F);return[n,F]};c.vb.amF=function(n,F){if(n.x>F.x){var O=n.x;n.x=F.x;F.x=O}if(n.y>F.y){var O=n.y;
n.y=F.y;F.y=O}n.x=Math.floor(n.x);n.y=Math.floor(n.y);F.x=Math.ceil(F.x);F.y=Math.ceil(F.y)};c.vb.a8R=function(){return{classID:"Mk",null:{t:"obj ",v:[{t:"Clss",v:{classID:"contentLayer"}}]},Usng:{t:"Objc",v:{classID:"contentLayer",Type:{t:"Objc",v:{}}}}}};
c.vb.Lz=function(n,F){var O=c.vb.a8R();if(F==null)F=JSON.parse(JSON.stringify(bW.BR[n]));ci.ED.KW(F,O.Usng.v.Type.v,n);
return{oI:"make",Mk:O}};c.vb.v$=function(n,F){var O=F.XU,I=JSON.parse(JSON.stringify(F.tF));if(O.he==0)I.fillEnabled.v=!1;
var x=c.vb.Lz(Math.max(0,O.he-1),O.Gk);x.Mk.Usng.v.Shp=n;x.Mk.Usng.v.strokeStyle={t:"Objc",v:I};return x};
c.Gz=function(){c.M2.call(this,[10,29],c.O_,"tools/pen");this.IS=null;this.vq=null;this.fz=1;this.aca=0;
this.Vs=null;this.g_=!1;this.jX=!1;this.P$=!1};c.Gz.prototype=new c.M2;c.Gz.prototype.jn=function(n){return this.IS!=null};
c.Gz.prototype.Ka=function(n,F,O,I){c.M2.prototype.Ka.call(this,n,F,O,I);if(!I.q(u.pI))this.P$=!1};c.Gz.prototype.XS=function(n,F,O,I,x){this.XN(F,O);
var r=n.a.jR(x.x,x.y),v,L;r.x=Math.round(r.x);r.y=Math.round(r.y);var _=c.eB.J_(n,r,O),d=n.Y1(this.fz==0),w=d[0],Z=d[1],P=w[Z.pop()],C=P?P.add.vmsk:null,W=4*V.Z()/n.a.K;
if(C)v=q.Y.q9(C.b,r,!0,W);var H=I.q(u.pI);if(this.fz==1&&(C==null||C.oE.length==0&&v.FI==-1)){var y=new k(V.E.JA,!0),g=q.oK.Wd("customShape",[0,0,1,1],null,null,null,"--");
y.data=c.vb.v$(g,O);F.A(y);d=n.Y1(!0);w=d[0];Z=d[1];P=w[Z.pop()];C=P.add.vmsk;C.b=C.b.slice(0,2)}var Q=P.add.vogk;
this.IS=C.clone();this.vq=JSON.stringify(Q);var J=C.b,A=q.Y._v(J);L=q.Y.x1(C.b,new gv(r.x-W,r.y-W,W*2,W*2),C.oE);
v=q.Y.q9(C.b,r,!0,W);var p=L[0].length+L[1].length+L[2].length;if(v.FI!=-1&&L[0].length==0){var U=q.Y.fR(J,v.FI);
while(J[U].length<=v.Yw){v.Yw-=J[U].length;U+=J[U].length+1}J[U].length++;J.splice(U+2+v.Yw,0,{type:4,pt:_.clone(),I:_.clone(),Cz:_.clone()});
C.oE=[U+2+v.Yw]}else if(p!=0&&H){var j=0;for(var e=0;e<3;e++)if(L[e].length!=0){j=L[e][0];this.jX=e==1;
break}if(L[0].length!=0){var b=C.b.length-1,s=C.b[j];s.Cz=s.I.clone();var G=s.type>=3?3:0;if(j!=b){s.pt=s.I.clone();
s.type=G+1;this.P$=!0}else s.type=G+2}C.oE=[j]}else if(L[0].length==1&&J[L[0][0]-1]&&J[L[0][0]-1].Xu==null){var j=L[0][0],U=q.Y.S8(J,j);
U=q.Y.fR(J,U);var T=U+J[U].length;if(j!=T){J[U].length--;J.splice(j,1);T--}C.oE=[T]}else{var z=0;if(C.oE.length!=1){C.C=[A];
J.push({type:3,length:1,Xu:[1,2,3,0][this.aca],sa:0,g9:0,Qy:0});z=J.length;Q.push(q.oK.CZ())}else{var m=C.oE[0],$=q.Y.S8(J,m),U=q.Y.fR(J,$);
m=U+J[U].length;if(aE.sl(r,J[U+1].I)<W){J[U].type=0;C.oE=[U+1];this.Vs=_;this.g_=!0;this.No(n,P.FI,C,Q);
n.zB=!0;return}J[U].length++;z=m+1;if(m==U+1&&J[U].length!=2)z=U+1}if(I.q(u.MQ)&&J[z-1]&&J[z-1].I)_=c.AG.J6(J[z-1].I,_);
J.splice(z,0,{type:4,pt:_.clone(),I:_.clone(),Cz:_.clone()});C.oE=[z];this.Vs=_}this.No(n,P.FI,C,Q);
n.zB=!0};c.Gz.prototype.RL=function(n,F,O,I,x){if(this.IS==null)return;var r=n.a.jR(x.x,x.y),_=c.eB.J_(n,r,O),d=n.Y1(this.fz==0),w=d[0],Z=d[1],P=w[Z.pop()],C=P.add.vmsk,W=C.b,v=W[C.oE[0]];
if(I.q(u.cf)){if(I.q(u.MQ))_=c.AG.J6(this.Vs,_);var L=v.I.ba(v.Cz),H=v.pt.ba(v.I);v.Cz=_;v.I=_.add(L);
v.pt=v.I.add(H)}else{if(I.q(u.MQ))_=c.AG.J6(v.I,_);if(this.jX){var y=v.pt;v.pt=v.Cz;v.Cz=y}if(this.g_){var g=aE.sl(v.I,_),Q=g==0?0:aE.sl(v.I,v.Cz)/g;
v.Cz.x=v.I.x+Q*(_.x-v.I.x);v.Cz.y=v.I.y+Q*(_.y-v.I.y)}else v.Cz=_;if(I.q(u.pI)&&!this.P$)v.type=5;else{v.type=4;
v.pt=v.I.add(v.I.ba(_))}this.Vs=_;if(this.jX){var y=v.pt;v.pt=v.Cz;v.Cz=y}}this.No(n,P.FI,C,P.add.vogk);
n.zB=!0};c.Gz.prototype._X=function(n,F,O,I,x){if(this.IS==null)return;var r=n.Y1(this.fz==0),_=r[0],d=r[1],w=_[d.pop()],Z=w.add.vmsk,P=w.add.vogk;
if(this.g_){Z.oE=[];this.No(n,w.FI,Z,w.add.vogk)}this.pR(n,this.g_?"Close Path":"Add Anchor Point",w.FI,this.IS,Z.clone(),null,this.vq,JSON.stringify(P));
this.g_=!1;this.jX=!1;this.P$=!1;this.IS=null};c.Gz.prototype.wl=function(n,F,O,I,x){this.fz=n.tmode;
this.aca=n.binop};c.i1=function(){c.vb.call(this,[10,30],c.oy,"tools/fpen",!1)};c.i1.prototype=new c.vb;
c.i1.prototype.RW=function(n,F,O,I){return[q.Y.JL(I,this.ka.tolr),q.oK.Wd("customShape",[0,0,1,1],null,null,null,"--")]};
c.L9=function(){c.M2.call(this,[10,27],c.jU,"tools/pselect");this.qH=null;this.ki=!1;this.bK=null;this.IS=null;
this.Nu=null;this.vq=null;this.VS=null;this.lE=null;this.Dx=null;this.w6=null};c.L9.prototype=new c.M2;
c.L9.prototype.jn=function(n){return n.rt};c.L9.prototype.XS=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y),_=n.Y1(),d=_[0],w=_[1],Z,P;
for(var e=0;e<w.length;e++){var C=d[w[e]],W=C.add.vmsk,v=q.Y.q9(W.b,r).FI;if(v!=-1){this.bK=Z=C;P=v}for(var L=0;
L<W.AZ.length;L++){var H=q.Y.oF(W.b,W.AZ[L]);if(H==null)continue;var y=aE.sl(H,r);if(y<4*V.Z()/n.a.K){var g=n.t[C.FI-1e6].add.TySh,Q=g.Vb.Curve,J=g.m,A=Q.Reversed;
Q.Reversed=!1;var Q=h2.Rc(g.Vb.Curve);Q.Reversed=A;q.z.m(Q[0],J,Q[0]);this.Dx=[Q,L,J.R*J.oQ-J.O*J.Pr];
this.bK=Z=C;P=0}}if(this.Dx)break}if(Z!=null){var W=Z.add.vmsk;W.oE=[];var p=W.C.indexOf(P);if(I.q(u.MQ)){if(p==-1){W.C.push(P);
this.ki=!0}else W.C.splice(p,1)}else{if(p==-1)W.C=[P];this.ki=!0}this.lE=q.Y.if(W.b,W.C)}this.qH=r;this.w6=new ay(r);
n._y=!0;n.zB=!0};c.L9.prototype.RL=function(n,F,O,I,x){if(this.qH==null)return;var r=n.a.jR(x.x,x.y);
if(this.ki){r=this.w6.sQ(r,I);var _=this.bK;if(this.IS==null){this.IS=this.Nu=_.add.vmsk.clone();this.vq=this.VS=JSON.stringify(_.add.vogk);
if(I.q(u.pI)){var d=this.IS.clone(),w=JSON.parse(this.vq),Z=c.M2.Rf(d,w);c.M2.ra(Z,d,w);this.Nu=d;this.VS=JSON.stringify(w)}}var d=this.Nu.clone(),w=JSON.parse(this.VS);
if(this.Dx){var P=this.Dx,C=P[0][0],W=q.z.e6(C,r.x,r.y);d.AZ[P[1]]=P[0][1][W];var v=C[W*2],L=C[W*2+1],H=(C[W*2+2]-v)*(r.y-L)-(C[W*2+3]-L)*(r.x-v);
if(P[2]<0)H=-H;d.Ay=H>0}else{var y=this.lE.clone(),g=y.x,Q=y.y;y.offset(r.x-this.qH.x,r.y-this.qH.y);
y.x=Math.round(y.x);y.y=Math.round(y.y);var J=c.eB.VO(n,y,O),A=new cD(1,0,0,1,y.x-g+J[0],y.y-Q+J[1]);
q.Y.gS(d.b,A,d.C);q.oK.m(w,q.J.EC(A),d.C);c.eB.BU(n,y,J)}this.No(n,_.FI,d,w)}else{var p=this.qH;n.M.qD=q.z.om(new gv(p.x,p.y,r.x-p.x,r.y-p.y));
n.zB=!0}};c.L9.prototype._X=function(n,F,O,I,x){if(this.qH==null)return;var r=n.a.jR(x.x,x.y),_=this.bK,d=_?_.add.vmsk:null;
if(this.ki){var w=JSON.stringify(_.add.vogk);if(!this.qH.Qq(r))this.pR(n,"Move Paths",_.FI,this.IS,d,null,this.vq,w);
if(n!=null&&n.M.iA){n.M.iA=null;n.zB=!0}}else{if(d){var Z=this.qH,P=new gv(Z.x,Z.y,r.x-Z.x,r.y-Z.y),C=q.Y.aif(d.b,P);
if(I.q(u.MQ)){for(var e=0;e<C.length;e++)if(d.C.indexOf(C[e])==-1)d.C.push(C[e])}else d.C=C}n.M.qD=null;
n.zB=!0}this.qH=null;this.IS=null;this.Dx=null;this.ki=!1;this.w6=null};c.L9.prototype.jv=function(n,F,O,I){c.M2.prototype.jv.call(this,n,F,O,I);
if(O.Gv!=this.id)return;if(n.C.length==0)return;var x=n.Y1(),r=x[0],_=x[1];if(_.length==0)return;var d=r[_[0]],w=d.add.vmsk,Z=d.add.vstk,P=d.add.vogk,C=new k(V.E.P,!0);
C.data={e:V.U.hO,T:this.id,ma:"main",dv:w?w:null,oK:P};F.A(C)};c.L9.prototype.wl=function(n,F,O,I,x){var r=n.nD;
if(r.dv){var _=O.Y1(),d=_[0],w=_[1];if(w.length==0)return;var Z=d[w[0]],P=Z.add.vmsk.clone(),C=JSON.stringify(Z.add.vogk),W=r.dv;
this.No(O,Z.FI,W,r.oK);var v=[18,5];if(P.b.length==W.b.length)v=P.C[0]==W.C[0]?"Fill Rule":"Path Order";
this.pR(O,v,Z.FI,P,W,null,C,JSON.stringify(r.oK))}};c._V=function(){c.M2.call(this,[10,28],c.kd,"tools/dselect");
this.pB=-1;this.BH=-1;this.m5=null;this.qH=null;this.bK=null;this.IS=null;this.vq=null;this.Dh=null;
this.SH=0;this.akf={psnap:!1};this.w6=null};c._V.prototype=new c.M2;c._V.prototype.jn=function(n){return n.rt};
c._V.prototype.wl=function(n){this.akf=n};c._V.prototype.fM=function(n,F,O,I,x){if(n.e=="crnr"){if(O==null)return;
var r=O.Y1(),_=r[0],d=r[1];if(d.length==0){alert("No paths selected");return}var w=_[d[0]],Z=w.add.vmsk;
if(Z.oE.length==0){alert("No corners selected");return}for(var e=0;e<Z.oE.length;e++){var P=Z.b[Z.oE[e]];
if(!P.I.Qq(P.Cz)||!P.I.Qq(P.pt)){alert("Only sharp corners can be rounded");return}}if(this.IS==null){this.IS=w.add.vmsk.clone();
this.vq=JSON.stringify(w.add.vogk);this.bK=w;this.Dh=O}var C=new k(V.E.P,!0);C.data={e:V.U.n$,cU:"cornerradius",ZN:5,xq:this.a8r.bind(this)};
F.A(C)}else c.M2.prototype.fM.call(this,n,F,O,I,x)};c._V.prototype.a8r=function(n){if(n=="confirm"){var F=this.Dh,O=this.bK,I=O.add.vmsk,x=O.add.vogk;
this.pR(F,[12,94,0],O.FI,this.IS,I,null,this.vq,JSON.stringify(x));this.KT();return}var I=this.IS.clone(),x=JSON.parse(this.vq),r=I.oE;
if(n=="cancel"){}else{var _=[];for(var e=0;e<r.length;e++){var d=r[e],w=q.Y.S8(I.b,d,!0),C=0;if(_.indexOf(w)!=-1)continue;
_.push(w);var Z=q.Y.fR(I.b,w,!0),P=I.b[Z].length,W=[];for(var v=0;v<P;v++){var L=I.oE.indexOf(Z+v+1)==-1?0:n;
W.push(L);if(L!=0)C++}q.Y.OR(I.b,Z,W);for(var v=0;v<r.length;v++)if(r[v]>Z+P)r[v]+=C}this.fv(I,x);I.oE=[]}this.No(this.Dh,this.bK.FI,I,x);
if(n=="cancel")this.KT()};c._V.prototype.disable=function(n,F,O,I){this.$N(n)};c._V.prototype.XS=function(n,F,O,I,x){this.$N(n);
var r=n.a.jR(x.x,x.y),C,W,v;this.m5=r.clone();var _=n.Y1(),d=_[0],w=_[1];if(w.length==0)return;var Z=4*V.Z()/n.a.K,P=new gv(r.x-Z,r.y-Z,Z*2,Z*2);
for(var L=0;L<w.length;L++){C=this.bK=d[w[L]];W=C.add.vmsk;v=q.Y.x1(W.b,P);if(v[0].length+v[1].length+v[2].length!=0)break}var H=[!1,!1,!1];
for(var e=0;e<3;e++){for(var y=0;y<v[e].length;y++)if(W.oE.indexOf(v[e][y])!=-1){v[e]=[v[e][y]];H[e]=!0;
break}}if(v[0].length!=0&&(H[0]||!H[1]&&!H[2])){var g=v[0][0],Q=W.oE.indexOf(g);if(I.q(u.MQ)){if(Q==-1)W.oE.push(g);
else{W.oE.splice(Q,1);n.zB=!0;return}}else if(Q==-1)W.oE=[g];this.pB=g;this.BH=0}else if(v[1].length!=0&&(H[1]||!H[2])){this.pB=v[1][0];
this.BH=1}else if(v[2].length!=0){this.pB=v[2][0];this.BH=2}else{var J=q.Y.q9(W.b,r,!0,Z);if(J.FI==-1)this.qH=r;
else{W.C=[J.FI];W.oE=[]}}if(this.IS==null){this.IS=C.add.vmsk.clone();this.vq=JSON.stringify(C.add.vogk)}this.w6=new ay(r);
n.zB=!0};c._V.prototype.RL=function(n,F,O,I,x){if(n==null)return;var r=n.a.jR(x.x,x.y),_=this.bK;if(this.pB!=-1){var d=this.IS.clone(),w=_.add.vogk,Z=d.b[this.pB];
Z=[Z.I,Z.pt,Z.Cz][this.BH];if(I.q(u.MQ)){r=this.w6.sQ(r,I);r.x+=Z.x-this.m5.x;r.y+=Z.y-this.m5.y}else{if(this.akf.psnap){r.x=Math.round(r.x);
r.y=Math.round(r.y)}r=c.eB.J_(n,r,O)}if(this.BH==0){var P=new cD(1,0,0,1,r.x-Z.x,r.y-Z.y);q.Y.gS(d.b,P,null,d.oE)}else{var C=d.b[this.pB],W=C.pt,v=C.Cz;
if(this.BH==2){W=C.Cz;v=C.pt}W.mT(r.x,r.y);if(C.type==1||C.type==4){var L=aE.sl(W,C.I),H=aE.sl(v,C.I);
if(H!=0){v.x=C.I.x-(W.x-C.I.x)*(H/L);v.y=C.I.y-(W.y-C.I.y)*(H/L)}}}this.fv(d,w);this.No(n,_.FI,d,w)}else if(this.qH!=null){var y=this.qH;
n.M.qD=q.z.om(new gv(y.x,y.y,r.x-y.x,r.y-y.y));n.zB=!0}else{var g=n.Y1(),Q=g[0],J=g[1],_,d,U;if(J.length==0)return;
var A=4*V.Z()/n.a.K,p=new gv(r.x-A,r.y-A,A*2,A*2);for(var j=0;j<J.length;j++){_=Q[J[j]];d=_.add.vmsk;
U=q.Y.x1(d.b,p);if(U[0].length+U[1].length+U[2].length!=0)break}this.$N(n);for(var e=0;e<3;e++){for(var b=0;
b<U[e].length;b++){var s=U[e][b],G=d.b[s];G=e==0?G.I:e==1?G.pt:G.Cz;n.M.ye.push(n.M.dl.length>>>1);n.M.dl.push(G.x,G.y);
n.zB=!0}}}};c._V.prototype.$N=function(n){if(n&&n.M.dl.length!=0){n.M.dl=[];n.M.ye=[];n.zB=!0}};c._V.prototype._X=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y),_=this.bK,d=_?_.add.vmsk:null,w=_?_.add.vogk:null;
if(this.pB!=-1){if(Date.now()-this.SH<300){var Z=d.b[this.pB],P=this.BH,C=null;if(P==0){var W=Z.pt.Qq(Z.I),v=Z.Cz.Qq(Z.I);
if(!W&&!v){C="Anchor Type";if(Z.type==1||Z.type==4)Z.type++;else{Z.type--;Z.Cz=Z.I.add(Z.I.ba(Z.pt))}}else{C="Add Handles";
if(W&&v){Z.pt.x-=30;Z.Cz.x+=30}else if(W)Z.pt=Z.I.add(Z.I.ba(Z.Cz));else if(v)Z.Cz=Z.I.add(Z.I.ba(Z.pt))}}else{C="Remove Handle";
if(P==1)Z.pt.mc(Z.I);else Z.Cz.mc(Z.I)}this.fv(d,w);this.No(n,_.FI,d,w);this.pR(n,C,_.FI,this.IS,d,null,this.vq,JSON.stringify(w))}else if(!this.m5.Qq(r)){this.pR(n,"Drag Anchors",_.FI,this.IS,d,null,this.vq,JSON.stringify(w))}this.SH=Date.now()}else if(this.qH!=null){var L=this.qH,H=new gv(L.x,L.y,r.x-L.x,r.y-L.y);
if(H.d<0)H.x+=H.d;if(H.v<0)H.y+=H.v;H.d=Math.abs(H.d);H.v=Math.abs(H.v);var y=q.Y.x1(d.b,H);d.oE=y[0].concat(I.q(u.MQ)?d.oE:[]);
n.M.qD=null}this.KT();n.zB=!0};c._V.prototype.KT=function(){this.bK=null;this.IS=null;this.qH=null;this.pB=this.BH=-1;
this.w6=null};c._V.prototype.fv=function(n,F){for(var e=0;e<n.oE.length;e++){var O=q.Y.S8(n.b,n.oE[e]);
q.oK.w$(F,O)}};c._V.prototype.Ka=function(n,F,O,I){if(n==null)return;var x=n.Y1(),r=x[0],_=x[1];if(_.length==0)return;
var d=r[_[0]],w=d.add.vmsk;if(w==null||w.oE.length==0)return;var Z=d.add.vogk,P=JSON.stringify(Z),C=I.vo();
if(C.x!=0||C.y!=0){var W=w.clone(),v=w.clone(),L=new cD(1,0,0,1,C.x,C.y);q.Y.gS(v.b,L,null,v.oE);this.fv(v,Z);
this.No(n,d.FI,v,Z);this.pR(n,"Move Anchors",n.C[0],W,v.clone(),!0,P,JSON.stringify(Z))}if(I.q(u.lW)||I.q(u.pf)){var W=w.clone(),v=w.clone();
v.b=q.Y.ajk(v.b,v.oE,Z);var H=q.Y._v(v.b);for(var e=0;e<v.C.length;e++)if(v.C[e]>=H){v.C.splice(e,1);
e--}v.oE=[];this.No(n,d.FI,v,Z);this.pR(n,"Delete Anchors",d.FI,W,v.clone(),!0,P,JSON.stringify(Z))}};
c._V.prototype.pR=function(n,F,O,I,x,r,_,d){var w=n.mG();if(r&&w!=null&&w.T==this&&w.data.abS&&w.data.GK==O&&JSON.stringify(w.data.CF.oE)==JSON.stringify(I.oE)){w.data.Gm=x;
w.data.$L=d}else{var w=new hS(F,this);w.data={GK:O,CF:I,Gm:x,abS:r,ajv:_,$L:d};n.p$(w)}};c.Rect=function(){c.vb.call(this,[10,32],c.tq,"tools/rect",!0)};
c.Rect.prototype=new c.vb;c.Rect.prototype.RW=function(n,F,O){var I=this.ka.crad,x=F.x-n.x,r=F.y-n.y;
return[q.Y.jP.Rect(n.x,n.y,x,r,I),q.oK.Wd("Rctn",[n.x,n.y,F.x,F.y],[I,I,I,I])]};c.BT=function(){c.vb.call(this,[10,33],c.kP,"tools/ellipse",!0)};
c.BT.prototype=new c.vb;c.BT.prototype.RW=function(n,F,O){var I=F.x-n.x,x=F.y-n.y;return[q.Y.jP.BT(n.x,n.y,I,x),q.oK.Wd("Elps",[n.x,n.y,F.x,F.y])]};
c.es=function(){c.vb.call(this,[10,34],c.d0,"tools/pshape",!1)};c.es.prototype=new c.vb;c.es.prototype.RW=function(n,F,O){var I=this.ka.pshape,x=this.ka.crad,r=this.ka.irad/100,_=this.ka.sides,d=this.ka.width,w=this.ka.tsiz,Z=this.ka.length,y;
F=F.clone();if(O){if(Math.abs(F.x-n.x)<Math.abs(F.y-n.y))F.x=n.x;else F.y=n.y}var P=n.x,C=n.y,W=F.x,v=F.y,L=Math.sqrt((W-P)*(W-P)+(v-C)*(v-C)),H=Math.atan2(-v+C,W-P);
if(I==0)y=q.Y.jP.bC(P,C,L,H,_,x);if(I==1)y=q.Y.jP.acT(P,C,L,H,_,x,r);if(I==2)y=q.Y.jP.afi(n.x,n.y,F.x,F.y,d,w/100);
if(I==3)y=q.Y.jP.a1m(P,C,L,H,Z);return[y,q.oK.Wd("customShape",[n.x,n.y,F.x,F.y],null,null,null,"--")]};
c.es.prototype.Ka=function(n,F,O,I){var x=I.vo(),r=this.ka,_,d;if(x.y!=0){var w=-x.y,Z=r.pshape;if(Z<2){_="sides";
d=Math.max(3,Math.min(100,r.sides+w))}else if(Z==2){_="width";d=Math.max(1,Math.min(100,r.width+w))}else if(Z==3){_="length";
d=Math.max(4,Math.min(40,r.length+w))}}if(x.x!=0){_="pshape";d=Math.max(0,Math.min(3,r.pshape+x.x))}if(_){var P=new k(V.E.P,!0),C={};
C[_]=d;r[_]=d;P.data={e:V.U.hO,T:this.id,G1:"vals",aa9:C};F.A(P);this.RL(n,F,O,I)}};c.XX=function(){c.vb.call(this,[10,35],c.SK,"tools/line",!1)};
c.XX.prototype=new c.vb;c.XX.prototype.RW=function(n,F,O){var I=this.ka.width;F=F.clone();if(O){F=c.AG.J6(n,F)}return[q.Y.jP.XX(n.x,n.y,F.x,F.y,I),q.oK.Wd("Ln",null,null,[n.x,n.y,F.x,F.y],I)]};
c.JQ=function(){c.vb.call(this,[10,31],c.Fy,"tools/cshape",!0)};c.JQ.prototype=new c.vb;c.JQ.prototype.RW=function(n,F,O){var I=this.ka.shape,x=I.I6.d/I.I6.v,r=K.X9.jI(I.b);
F=F.clone();if(O){F.y=n.y+(F.x-n.x)/x}var _=F.x-n.x,d=F.y-n.y;q.Y.gS(r,new cD(_,0,0,d,n.x,n.y));return[r,q.oK.Wd("customShape",[n.x,n.y,F.x,F.y],null,null,null,I.lL)]};
c.V=function(n,F,O){c.Fq.call(this,n,F,O);this.H0=0;this.t=null;this.eP=null;this.Hs=null;this.kl=1;
this.$e=!1;this.cursor=null;this.Rd=null;this.xA=null;this.hU=!1;this.gX=null;this.a4o=0;this.Le=null;
this.TL=0;this.NG=null;this.MO=null;this.Zz=null;this.er=null;this.am8=null;this.WK=null};c.V.prototype=new c.Fq;
c.V.Ad=function(n,F){var O={classID:"null",null:aV.hd("Dcmn",!0)};if(n)O.Angl={t:"UntF",v:{type:"#Ang",val:F}};
else O.Axis={t:"enum",v:{Ornt:F}};return{oI:n?"rotateEventEnum":"flip",Mk:O}};c.V.prototype.e9=function(n,F,O,I,x){var r=new k(V.E.P,!0);
r.data={e:V.U.hO,T:this.id,$d:x,m4:n,Hs:O};F.A(r);this.Pb=!1};c.V.prototype.jn=function(n){return this.MO&&this.MO.pE()};
c.V.prototype.fM=function(n,F,O,I,x){this.Hs=x;if(n.e=="again"&&this.Le==null)return;if(n.e=="doMouseDown"){if(this.MO==null)return;
this.XS(O,F,x,I,n.c_);return}if(!this.CD(O,x))return;if(this.MO){this.MA(n,this.MO.St());this.Ch(O,x,0,!0);
this.Qd(O);return}this.xV(O,n.$==null,n.$);this.Rj(O);this.MA(n);this.h5(O,F,n.WL,!1)};c.V.prototype.MA=function(n,F){var O=this.NG;
if(F==null){var I=n.Ug!=null?n.Ug:4;F=this.MO.aea()[I]}var x=F.x,r=F.y;if(n.e=="rot"&&n.G!=Math.PI&&(O.d+O.v&1)==1){x=Math.floor(x);
r=Math.floor(r)}var _=new cD;_.translate(-x,-r);if(n.e=="rot")_.rotate(n.G);if(n.e=="scl")_.scale(n.G.x,n.G.y);
if(n.e=="mat")_.concat(n.G);_.translate(x,r);if(n.e=="again")_=this.Le;var d=this.MO.PZ();q.z.m(d,_,d);
this.MO.DE(d)};c.V.prototype.A5=function(){return!0};c.V.prototype.CD=function(n,F){if(n==null)return!1;
if(this.id==c.UR)return n.N!=null;var O=n.aV(!0,null,null,!0);if(this.id==c.hD&&n.t[O[0]].rect.D2()){alert("Layer is empty.");
return!1}for(var e=0;e<O.length;e++){var I=n.t[O[e]];if(I.LF(2)||I.LF(31)){alert(hl.get([6,57,0]));return!1}if(I.add.artb){alert("You can not transform the whole artboard");
return!1}if(I.add.TySh)if(!cJ.Xk(I.add.TySh,F.sH))return!1;if(I.add.SoLd){if(O.length==1&&!q.qF.x9(I.add.SoLd.warp.v)&&(I.B1()&&I.B1().Tu||I.add.vmsk&&I.add.vmsk.Tu)){alert("Unlink masks before transforming Smart Object");
return!1}if(!n.afH(I.add.SoLd.Idnt.v)){alert("Unsupported format of the smart object ("+n.V7(I.add.SoLd.Idnt.v).fA+")");
return!1}}}if(n.N==null)return!0;if(!n.f7())return!1;return n.YD()};c.V.prototype.XS=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y);
if(this.TL==1){var _=q.J.uZ(q.J.N5(this.MO.PZ(),this.NG));r=q.J.pD(_,r)}var d=this.TL==0?this.MO:this.Zz;
this.$e=d.XS(n,O,I,r);if(this.$e&&d.xy(r)){if(Date.now()-this.a4o<250)this.h5(n,F,null,!0);this.a4o=Date.now()}};
c.V.prototype.pa=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.VC,dx:this.cursor};n.A(F)};c.V.prototype.RL=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y);
if(this.TL==1){var _=q.J.uZ(q.J.N5(this.MO.PZ(),this.NG));r=q.J.pD(_,r)}var d=this.TL==0?this.MO:this.Zz;
if(!x.rt){var w="default";if(d){var Z=d.n5(r,n.a.K);if(Z)w=Z}if(w!=this.cursor){this.cursor=w;this.pa(F)}}if(!this.$e)return;
d.RL(n,O,I,r);this.Ch(n,O,0,!0);this.Qd(n);this.mM(F)};c.V.prototype._X=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y);
this.MO._X(n,O,I,r);this.$e=!1};c.V.prototype.Ka=function(n,F,O,I){if(I.q(u.Ma))this.h5(n,F,null,!0);
else if(I.q(u.YE))this.ou(n,F);else{var x=this.MO.Ka(n,O,I);if(x){this.Ch(n,O,0,!0);this.mM(F)}}};c.V.prototype.wl=function(n,F,O,I){if(n.ma=="commit")this.h5(O,F,null,!0);
else if(n.ma=="cancel")this.ou(O,F);else if(n.ma=="switchWarp"){this.TL=1-this.TL;this.a3k();this.Qd(O);
this.mM(F)}else if(n.ma=="wrp"){this.Zz.t$(n.BJ);this.Qd(O);this.Ch(O,this.Hs,0,!0)}else if(n.ma=="ctyp"){this.MO.agI(n.BZ);
this.Qd(O);this.mM(F)}else if(n.ma=="cen"){this.MO.a5C(n.hC);this.Qd(O);this.Ch(O,this.Hs,0,!0);this.mM(F)}else if(n.ma=="trn"){var x=q.J.EC(n.kv),r=this.NG,_=q.J.N5(this.MO.PZ(),this.NG);
x[6]=_[6],x[7]=_[7];var d=[r.x,r.y,r.x+r.d,r.y,r.x+r.d,r.y+r.v,r.x,r.y+r.v];q.J.m(x,d);this.kl=n.kl;
this.MO.DE(d);this.Qd(O);this.Ch(O,this.Hs,0,!0)}};c.V.prototype.Qd=function(n){if(this.TL==0)this.MO.s6(n,this.Hs);
else{this.Zz.s6(n);var F=q.J.N5(this.MO.PZ(),this.NG);q.J.m(F,n.M.qD.H);q.J.m(F,n.M.Ri)}};c.V.prototype.h5=function(n,F,O,I){this.Ch(n,this.Hs,this.kl);
var x=new hS(O?O:this.name,this);if(this.H0==0)x.data={type:this.H0,t:this.t,gX:this.eP,WR:c.V.cq(n,this.t)};
else if(this.H0==1){var r=n.t[this.t[0]],_;if(r.HG.vE<=0){_=q.f(r.HG.JI.X());q.xg(r.HG.Cv,_,3)}else _=n.N.channel;
var d={rect:r.HG.JI.clone(),channel:_};x.data={type:this.H0,$:this.t[0],xA:this.xA,pi:d,Rd:this.Rd,hU:this.hU,HG:r.HG,gX:this.gX,WR:{j:r.HG.JI,aN:r.HG.Cv}}}else if(this.H0==2){x.data={type:this.H0,xA:this.xA,pi:{rect:n.N.rect.clone(),channel:n.N.channel.slice(0)}}}n.p$(x);
var w=this.NG,Z=new aE(w.x+w.d/2,w.y+w.v/2),P=q.J.N5(this.MO.PZ(),w),C=q.J.fK(P),W=new cD;W.translate(Z.x,Z.y);
W.concat(C);W.translate(-Z.x,-Z.y);C=W.clone();var v=-Math.atan2(-C.O,C.R),L=new cD;L.rotate(v);C.concat(L);
function H(Q,J){return{t:"UntF",v:{type:["#Pxl","#Prc","#Ang"][J],val:Q}}}var y=aV.hd("Lyr",!0);if(this.id==c.UR)y.v[0]={t:"prop",v:{classID:"Chnl",keyID:"fsel"}};
var g={classID:"null",null:y,FTcs:{t:"enum",v:{QCSt:"Qcsa"}},Intr:{t:"enum",v:{Intp:"Bcbc"}},Ofst:{t:"Objc",v:{__name:"Offset",classID:"Ofst",Hrzn:H(W.hb,0),Vrtc:H(W.i9,0)}},Skew:{t:"Objc",v:{classID:"Pnt",Hrzn:H(Math.atan(C.Pr)*180/Math.PI,2),Vrtc:H(0,2)}},Wdth:H(C.R*100,1),Hght:H(C.oQ*100,1),Angl:H(v*180/Math.PI,2)};
this.ta=F;this.track({oI:"transform",Mk:g});this.escape(n,F,I)};c.V.prototype.ou=function(n,F){if(this.H0==0)c.V.Q0(n,this.t,this.eP);
else if(this.H0==1){var O=n.t[this.t[0]];n.N=this.xA;if(!this.hU){O.HG.JI=this.gX.j;O.HG.Cv=this.gX.aN;
O.ah(n,0,0,n.N)}else{O.jB(n,this.Rd)}n.D();n.NX=!0}else if(this.H0==2){n.N=this.xA;n.NX=!0}this.escape(n,F,!0)};
c.V.prototype.escape=function(n,F,O){this.MO.clear(n);this.MO=null;this.Zz=null;this.WK=null;this.TL=0;
if(O)this.ZY(F,V.E.P,{e:V.U.lt})};c.V.prototype.Xe=function(n,F){if(n.type==0)c.V.Q0(F,n.t,n.WR);else{if(n.type==1){var O=F.t[n.$];
if(n.hU){O.HG=n.HG}else{O.HG.JI=n.WR.j;O.HG.Cv=n.WR.aN}O.ah(F,0,0,F.N);F.D()}F.N={rect:n.pi.rect.clone(),channel:n.pi.channel.slice(0)};
F.NX=!0}};c.V.prototype.cQ=function(n,F){if(n.type==0)c.V.Q0(F,n.t,n.gX);else{if(n.type==1){var O=F.t[n.$];
if(n.hU){O.jB(F,n.Rd)}else{O.HG.JI=n.gX.j;O.HG.Cv=n.gX.aN;O.ah(F,0,0,F.N)}F.D()}F.N=n.xA;F.NX=!0}};c.V.prototype.xV=function(n,F,O){n.Y1();
var I=[];if(O==null)for(var e=0;e<n.f$.length;e++)if(n.Hi[n.f$[e]].add.vmsk.b.length>2)I.push(-1-n.f$[e]);
var x=[],r=n.a.o;if(r[0]+r[1]+r[2]==3)if(O!=null||I.length==0||n.a5!=null&&n.a5.length!=0)x=n.aV(F,O,null,!0);
x=x.concat(I);for(var e=0;e<n.P4.length;e++)x.push(-1e3-n.P4[e]);this.t=x};c.V.prototype.enable=function(n,F,O,I,x,r,_){if(this.cursor==null)this.cursor="default";
this.pa(F);if(this.MO)return;this.Hs=O;this.xV(n,!0);this.Rj(n,r&&r.Lj!=null&&r.Lj!=-1?r.Lj:null,_);
this.mM(F);this.Qd(n);if(r&&r.Lj==-1)this.wl({ma:"switchWarp"},F,n,I)};c.V.prototype.mM=function(n){var F={e:V.U.hO,T:this.id};
if(this.TL==0){var O=q.J.N5(this.MO.PZ(),this.NG),I=q.J.fK(O);F.kv={PS:I,BZ:this.MO.agu(),hC:this.MO.St(),j:this.NG.clone()}}else{F.BJ=this.Zz.zm()}F.a1U=this.Zz!=null;
this.ZY(n,V.E.P,F)};c.V.prototype.Rj=function(n,F,O){var I=this.id==c.UR,x=!0,r=this.t[0],_=n.t[r],w=null;
if(I){this.H0=2;this.xA=n.N}else if(n.N&&this.t.length==1&&r>=0&&!_.rect.D2()){this.H0=1;this.xA=n.N;
this.Rd=_.HG;this.hU=!1;if(!_.WF(n,n.N)){this.hU=!0;_.hz(n,n.N,!1)}this.gX={aN:_.HG.Cv,j:_.HG.JI}}else{this.H0=0;
this.eP=c.V.cq(n,this.t,null,O);for(var e=0;e<this.eP.length;e++)if(this.eP[e][3]!=null)x=!1}var d=this.H0==1;
if(this.eP&&this.eP.length==1){var Z=this.eP[0];if(Z[3]==null)d=!0;if(Z[4]!=null){w=n.t[this.t[0]].add.SoLd;
if(Z[1]||Z[2])d=!1}}var P=I?n.N.rect.clone():c.V.nJ(n,this.t,O);this.NG=P;if(!I&&w){var C=c.V.ns(w.nonAffineTransform);
this.NG=q.z.gh(q.qF.Bo(w.warp.v));if(d)this.Zz=new gt(w.warp.v);this.er=q.J.N5(C,this.NG);this.MO=new g_(C,!0,!0,x,!1,!1,F)}else{if(d||I)this.Zz=new gt(q.qF.f(this.NG));
this.er=[1,0,0,0,1,0,0,0];if(this.id==c.hD)F=3;this.MO=new g_([P.x,P.y,P.x+P.d,P.y,P.x+P.d,P.y+P.v,P.x,P.y+P.v],!0,!0,x,!1,!1,F)}this.am8=[1,0,0,0,1,0,0,0];
if(this.id==c.hD){var W=this.eP[0][0],v=W.FL,L=v[1];this.WK=q.il.aiR(v[0],L.d,L.v)}};c.V.nJ=function(n,F,O){if(F==null)F=n.aV(!0,null,null,!0);
var I=new gv;if(n.N&&F.length==1&&F[0]>=0)I=n.N.rect.clone();else for(var e=0;e<F.length;e++){var x=F[e],r=0<=x?n.t[x]:-1e3<x?n.Hi[-1-x]:n.TM[-1e3-x],_=r.add?r.add.vmsk:null,d=0<=x?r.Yg(n,F.length==1,!1,O):-1e3<x?q.Y.if(_.b,F.length==1&&_.C.length!=0?_.C:null):r.rect.clone();
I=I.Tq(d)}return I};c.V.prototype.ZY=function(n,F,O,I){var x=new k(F,!0);x.data=O;if(I)x.T=I;n.A(x)};
c.V.cq=function(n,F,O,I){var x=[];for(var e=0;e<F.length;e++){var r=F[e],_,d;if(r>=0){_=n.t[r];d=_.rT(n,O,I)}else if(r>-1e3){_=n.Hi[-1-r];
d=[2]}else{x.push([null,null,null,null,null,null,null,n.TM[-1e3-r].clone()]);continue}var w=[];if(d.indexOf(0)!=-1){var Z={FL:[_.buffer.slice(0),_.rect.clone()]};
w.push(Z);if(_.z3()){var P=_.Fa(n);Z.amh=P.buffer.slice(0);Z.a7o=P.rect.clone()}}else w.push(null);if(d.indexOf(1)!=-1)w.push(_.B1().clone());
else w.push(null);if(d.indexOf(2)!=-1)w.push({dv:_.add.vmsk.clone(),uS:_.add.vstk?JSON.parse(JSON.stringify(_.add.vstk)):null,Gk:_.add.vstk?c.M2.n3(n,r):null,oK:_.add.vogk?JSON.parse(JSON.stringify(_.add.vogk)):null});
else w.push(null);if(_.add.TySh&&w[0]){bt.FE(_.add.TySh);w.push(_.add.TySh.m.clone())}else w.push(null);
if(_.add.SoLd&&w[0])w.push(JSON.parse(JSON.stringify(_.add.SoLd)));else w.push(null);if(d.indexOf(3)!=-1)w.push(_.Fa(n).r.clone());
else w.push(null);if(_.add.lmfx)w.push(JSON.stringify(_.add.lmfx));else w.push(null);x.push(w)}return x};
c.V.Q0=function(n,F,O){for(var e=0;e<F.length;e++){var I=F[e],x=0<=I?n.t[I]:-1e3<I?n.Hi[-1-I]:n.TM[-1e3-I],r=O[e];
if(r[0]){x.rect=r[0].FL[1].clone();x.buffer=r[0].FL[0].slice(0);if(x.z3()){var _=x.Fa(n);_.buffer=r[0].amh.slice(0);
_.rect=r[0].a7o.clone()}}if(r[1]){x.B1().channel=r[1].channel.slice(0);x.B1().rect=r[1].rect.clone();
x.B1().j8=!0}if(r[2]){x.add.vmsk=r[2].dv.clone();if(r[2].Gk)c.M2.pK(x,r[2].Gk);if(r[2].uS)x.add.vstk=JSON.parse(JSON.stringify(r[2].uS));
if(r[2].oK)x.add.vogk=JSON.parse(JSON.stringify(r[2].oK))}if(r[3]){x.add.TySh.m=r[3].clone();bt.Sg(x.add.TySh)}if(r[4]){x.add.SoLd=JSON.parse(JSON.stringify(r[4]))}if(r[5]){var d=x.Fa(n).r;
d.channel=r[5].channel.slice(0);d.rect=r[5].rect.clone()}if(r[6]){x.add.lmfx=JSON.parse(r[6])}if(r[7]){x.channel=r[7].channel.slice(0);
x.rect=r[7].rect.clone();x.j8=!0}if(0<=I){x.o3(n);x.D()}}n.D()};c.V.GW=function(n){var F=n.clone(),O=Math.atan2(-F.O,F.R),I=new cD;
I.rotate(-O);F.concat(I);return(Math.abs(F.R)+Math.abs(F.oQ))/2};c.V.$D=function(n,F,O,I,x,r,_,d,w,Z){if(typeof r[0]=="number"){var P=[];
for(var e=0;e<O.length;e++)P[e]=r;r=P}for(var e=0;e<O.length;e++){var C=r[e],W=q.J.fK(C),v=c.V.GW(W),L=O[e],H=0<=L?n.t[L]:-1e3<L?n.Hi[-1-L]:n.TM[-1e3-L],y=I[e];
if(y[0]&&H.add.lmfx&&d)ha.QB(H.add.lmfx,v);if(y[0]&&!y[3]&&!y[4]&&!y[5]){var g=y[0].FL;if(w){var Q=w.clone(),J=q.f(Q.X()*4);
q.nF(g[0],g[1],J,Q);g=[J,Q]}var A=c.V.Kb(g,x,C,_,x==0?H.buffer.buffer:null,null,null,Z);if(A){H.rect=A.rect;
H.buffer=A.buffer}}if(y[1])c.V.w4(n,y[1],H.B1(),x,C,_);if(y[2]){var p=_&&!q.qF.x9(_),U=y[2].dv.clone(),j=O.length==1&&U.C.length!=0,b=O.length==1&&U.oE.length>1;
if(b)j=!1;var s=j?U.C:null,G=b?U.oE:null;if(p){var T=q.qF.Bo(_);q.J.m(C,T);q.Y.aaf(U.b,T,s,G)}else q.Y.a51(U.b,C,s,G);
if(H.add.vstk&&d){H.add.vstk.strokeStyleLineWidth.v.val=y[2].uS.strokeStyleLineWidth.v.val*v;var z=y[2].Gk;
if(z&&z.he==3){z=JSON.parse(JSON.stringify(z));var m=z.Gk.phase.v;z.Gk.Scl.v.val=Math.round(z.Gk.Scl.v.val*v);
m.Hrzn.v=Math.round(m.Hrzn.v*v);m.Vrtc.v=Math.round(m.Vrtc.v*v);c.M2.pK(H,z)}}if(H.add.vogk){H.add.vogk=JSON.parse(JSON.stringify(y[2].oK));
if(p||b)q.oK.a4F(H.add.vogk);else q.oK.m(H.add.vogk,C,O.length>1?[]:U.C,d)}U.RI*=v;H.add.vmsk=U;if(H.add.vogk)q.oK.df(H.add.vogk,H.add.vmsk)}if(y[3]){var $=y[3].clone();
$.concat(W);H.add.TySh.m=$;bt.Sg(H.add.TySh);var o=new h2(H.add.TySh.Vb,F.sH),h=cJ.mH(o,H.add.TySh);
H.rect=h.j;H.buffer=h.zc}if(y[4]){var X=H.add.SoLd,D=c.V.ns(y[4].nonAffineTransform);q.J.m(C,D);var f=q.z.Wk(D);
if(g_.AT(D)){if(_){var R=q.z.gh(q.qF.Bo(y[4].warp.v)),i=q.J.N5(D,R),t=q.z.gh(q.qF.Bo(_));D=[t.x,t.y,t.x+t.d,t.y,t.x+t.d,t.y+t.v,t.x,t.y+t.v];
q.J.m(i,D);X.warp.v=_}var N=q.J.N5(D),M=D;if(!q.J.nn(N)){N[6]=N[7]=0;M=[0,0,1,0,1,1,0,1];q.J.m(N,M)}X.Trnf=c.V.uB(M);
X.nonAffineTransform=c.V.uB(D);if(X.filterFX)X.filterFX=JSON.parse(JSON.stringify(y[4].filterFX));c.V.Rw(X,W);
H.aY(n,x==0)}}if(y[5])c.V.w4(n,y[5],H.Fa(n).r,x,C,_);if(y[7])c.V.w4(n,y[7],H,x,C,_);if(0<=L){if(x!=0)H.t7();
H.o3(n);H.D()}}n.D()};c.V.oo=function(n,F,O,I,x,r){if(O==null)O=!1;return c.V.Kb(n,O?0:1,q.J.EC(F),null,I,x,r,O)};
c.V.Kb=function(n,F,O,I,x,r,_,d){if(d==null)d=!1;if(d&&_)throw"e";var w={},W=0,v=.3;if(I&&!q.qF.x9(I)){var Z=q.qF.Bo(I);
q.J.m(O,Z);w.rect=q.z.Wk(Z);w.buffer=q.f(w.rect.X()*4);q.uY.drawImage(Z,n[0],n[1].d,n[1].v,w.buffer,w.rect,F==0);
return w}q.zZ(n);var P=n[0],C=n[1],L=C.X()*c.V.GW(q.J.fK(O));if(d&&L>4e6)v=L>8e6?2.2:1.2;while(W+3<n.length&&n[W+3].X()>16&&q.J.nn(O)&&c.V.GW(q.J.fK(O))<v){W+=2;
var H=n[W],y=n[W+1],g=C.d/y.d,Q=C.v/y.v;O=q.J.NM(O,[1,0,C.x,0,1,C.y,0,0]);O=q.J.NM(O,[g,0,0,0,Q,0,0,0]);
O=q.J.NM(O,[1,0,-C.x,0,1,-C.y,0,0]);C=y;P=H}var J=q.J.NM(O,q.J.EC(new cD(C.d,0,0,C.v,C.x,C.y))),A=[0,0,1,0,1,1,0,1];
q.J.m(J,A);w.rect=q.z.Wk(A);if(_)w.rect=w.rect.lN(_);if(d){while((w.rect.d&3)!=0)w.rect.d++;while((w.rect.v&3)!=0)w.rect.v++}if(!g_.AT(A)||w.rect.d>1e5||w.rect.v>1e5||w.rect.X()>3e4*3e4)return null;
var p=w.rect.X()*4;if(x&&x.byteLength>=p&&p>=x.byteLength>>2){w.buffer=new Uint8Array(x)}else{w.buffer=q.f(p)}q.J.drawImage(J,P,C.d,C.v,w.buffer,w.rect,F==0,r,d);
if(F==2&&w.buffer){var U=w.rect.d,j=w.rect.v,b;b=[0,-1,0,-1,16,-1,0,-1,0];b=q.aF.Wl(b);var s=w.buffer.slice(0);
q.aF.u3(s,w.buffer,U,j,b,255,!1,!0)}if(w.buffer)return w};c.V.w4=function(n,F,O,I,x,r){if(F.color==255)q.uZ(F.channel);
var _=F.rect,d=q.f(_.X()*4);q.GF(F.channel,d,3);var w=c.V.Kb([d,_],I,x,r);if(w){O.rect=w.rect;O.channel=q.f(w.rect.X());
q.xg(w.buffer,O.channel,3);O.j8=!0}if(F.color==255){q.uZ(F.channel);if(w)q.uZ(O.channel)}};c.V.Rw=function(n,F){var O=n.filterFX;
if(O)O=O.v.filterFXList;if(O)O=O.v;if(O)for(var I=0;I<O.length;I++){var x=O[I].v.Fltr;if(x==null||x.v.classID!="rigidTransform")continue;
x=x.v;console.log(x);var r=[];for(var _=0;_<4;_++)r.push(x["PuX"+_].v,x["PuY"+_].v);q.z.m(r,F,r);for(var _=0;
_<4;_++){x["PuX"+_].v=r[_*2];x["PuY"+_].v=r[_*2+1]}var d=["PinP","posFinalPins"],w=["originalVertexArray","deformedVertexArray"],Z=x.puppetShapeList.v;
for(var P=0;P<Z.length;P++){var C=Z[P].v;for(var W=0;W<d.length;W++){var v=c.V.ns(C[d[W]]);q.z.m(v,F,v);
C[d[W]]=c.V.uB(v);var L=new Uint8Array(C[w[W]].v),H=new Float32Array(L.buffer);q.z.m(H,F,H);var y=[];
for(var g=0;g<L.length;g++)y[g]=L[g];C[w[W]].v=y}}}};c.V.ns=function(n){var F=[],O=n.v.length;for(var e=0;
e<O;e++)F.push(n.v[e].v);return F};c.V.uB=function(n){var F={t:"VlLs",v:[]},O=n.length;for(var e=0;e<O;
e++)F.v.push({t:"doub",v:n[e]});return F};c.V.prototype.a3k=function(){var n=q.z.gh(q.qF.Bo(this.Zz.zm())),F=q.J.N5(this.MO.PZ(),this.NG),O=[n.x,n.y,n.x+n.d,n.y,n.x+n.d,n.y+n.v,n.x,n.y+n.v];
q.J.m(F,O);this.MO.DE(O);this.NG=n};c.V.prototype.Ch=function(n,F,O,I){var x=q.J.N5(this.MO.PZ(),this.NG);
x=q.J.NM(x,q.J.uZ(this.er));var r=this.Zz?this.Zz.zm():null;if(this.H0==0){var _=this.Le=q.J.fK(x);if(this.id==c.hD){var d=this.eP[0][0],w=d.FL,Z=w[1],P=~~(Z.d*Math.max(0,_.R)),C=~~(Z.v*Math.max(0,_.oQ)),W=new gv(Math.round(_.R*Z.x+_.hb),Math.round(_.oQ*Z.y+_.i9),P,C),v=q.il.m(this.WK,W),L=n.t[this.t[0]];
L.buffer=v;L.rect=W;L.D();n.D()}else c.V.$D(n,F,this.t,this.eP,O,x,r,null,null,I)}else if(this.H0==1){var H=n.t[this.t[0]],Z=this.gX.j;
if(H.vE<=0){var y=this.gX.aN,g=this.xA;if(r&&!q.qF.x9(r)&&!g.rect.Qq(Z)){var v=q.f(g.rect.X()*4);q.nF(y,Z,v,g.rect);
y=v;Z=g.rect}var Q=c.V.Kb([y,Z],O,x,r);if(Q){H.HG.Cv=Q.buffer;H.HG.JI=Q.rect;var J=q.f(Q.rect.X());q.xg(H.HG.Cv,J,3);
n.N={channel:J,rect:H.HG.JI.clone()}}}else{var A=q.f(Z.X()*4);q.GF(this.gX.aN,A,3);var Q=c.V.Kb([A,Z],O,x,r);
if(Q){H.HG.Cv=q.f(Q.rect.X());q.xg(Q.buffer,H.HG.Cv,3);H.HG.JI=Q.rect}this.SE(n,O,x,r)}H.ah(n,0,0,n.N);
if(O!=0){H.t7();q.t7(n.N)}n.NX=!0;n.D()}else if(this.H0==2)this.SE(n,O,x,r)};c.V.prototype.SE=function(n,F,O,I){var x=this.xA.rect,r=q.f(x.X()*4);
q.GF(this.xA.channel,r,3);var _=c.V.Kb([r,x],F,O,I),d=q.f(_.rect.X());q.xg(_.buffer,d,3);n.N={channel:d,rect:_.rect};
n.NX=!0};c.V.prototype.disable=function(n,F,O,I){if(this.MO)this.h5(n,F,null,!0)};c.Hc=function(){c.V.call(this,[10,16],c.KR,"tools/transform")};
c.Hc.prototype=new c.V;c.zK=function(){c.V.call(this,[7,10],c.UR,"tools/transform")};c.zK.prototype=new c.V;
c.IO=function(){c.V.call(this,[10,48],c.hD,"tools/transform")};c.IO.prototype=new c.V;c.Hh=function(n,F,O){c.Fq.call(this,[10,46],c.bU,"tools/transform");
this._F=[1,1,2,!0];this.qm="rigidTransform";this.Pv=null;this.a6i=null;this.AO=null;this.Xv=null;this.ii=null;
this.n_=null;this.We=[]};c.Hh.prototype=new c.Fq;c.Hh.prototype.A5=function(){return!0};c.Hh.CY=function(n){if(n==null)return!1;
if(n.C.length!=1)return!1;var F=n.t[n.C[0]];return F.add.SoLd||n.f7(!1)};c.Hh.prototype.CD=function(n,F){return c.Hh.CY(n)};
c.Hh.prototype.enable=function(n,F,O,I,x,r,_){this.a6i=r.O6;var d=r.O6,w,H=null;if(d){var Z=n.t[d.$];
if(Z.add.SoLd.filterFX!=null){var P=Z.add.SoLd.filterFX.v.filterFXList.v;if(P[d.index])w=JSON.parse(JSON.stringify(P[d.index].v.Fltr.v))}}var C=w==null,Z=n.t[n.C[0]],W=Z.buffer,v=Z.rect,L=Z.add.SoLd;
if(L){var y=L.nonAffineTransform.v;H=[];for(var e=0;e<4;e++)H.push(y[e*2].v,y[e*2+1].v);if(C)this.Fv("edit",F);
var g=Z.Fa(n);W=g.buffer;v=g.rect}this.Pv={buffer:W.slice(0),rect:v.clone(),a67:H};if(C)w=c.Hh.yU(this.Pv,this._F);
this.AO=w;this.Xv=c.Hh.N9(this.AO,this._F);this.kT();this.NS(n);if(C)this.Xx(F);var Q=new k(V.E.P,!0);
Q.data={e:V.U.hO,T:this.id,b9:this._F};F.A(Q);Q.data={e:V.U.VC,dx:"default"};F.A(Q)};c.Hh.prototype.disable=function(n,F,O,I){if(this.Xv)this.h5(n,F,!0)};
c.Hh.prototype.kT=function(n){var F=this.Xv;this.We=[];for(var e=0;e<F.length;e++){var O=F[e];for(var I=0;
I<O.C.length;I++)this.We.push([e,O.C[e]]);O.Eh=q.vr.a1(O);if(n)q.vr.j$(O)}};c.Hh.prototype.wl=function(n,F,O,I){if(n.ma=="commit")this.h5(O,F,!0);
else if(n.ma=="cancel")this.ou(O,F,!0);else if(n.ma=="prm"){var x=!1;for(var e=0;e<3;e++)if(this._F[e]!=n.b9[e])x=!0;
this._F=n.b9;if(x){this.AO=c.Hh.yU(this.Pv,this._F,this.AO);this.Xv=c.Hh.N9(this.AO,this._F);this.kT(!0);
this.Xx(F)}this.NS(O)}else if(n.ma=="moveDepth"){var r=this.Xv;for(var _=0;_<r.length;_++){var d=r[_];
for(var e=0;e<d.C.length;e++){var w=d.C[e];d.Ll[w]+=n.a4$?1:-1}}this.Xx(F)}};c.Hh.prototype.JF=function(n,F){return n==u.lW||n==u.pf};
c.Hh.prototype.Ka=function(n,F,O,I){var x=I.vo();if(I.q(u.Ma))this.h5(n,F,!0);else if(I.q(u.YE))this.ou(n,F,!0);
else if(I.q(u.lW)||I.q(u.pf)){var r=this.Xv;for(var _=0;_<r.length;_++){var d=r[_];d.C.sort(function(P,C){return C-P});
for(var e=0;e<d.C.length;e++){var w=d.C[e],Z=w*2;d.Ll.splice(w,1);d.WN.splice(w,1);d.Oq.splice(w,1);
d.uc.splice(w,1);d.r8.splice(Z,2);d.a_.splice(Z,2)}d.C=[];if(d.uc.length==0){d.eo=d.vZ.slice(0);d.FW=d.vZ.slice(0)}}this.kT(!0);
this.Xx(F);this.NS(n)}else if(x.x!=0||x.y!=0){this.cP(n,x.x,x.y,F);this.Ed=null}};c.Hh.prototype.h5=function(n,F,O){this.Fv("confirm",F);
this.escape(n,F,O)};c.Hh.prototype.ou=function(n,F,O){this.Fv("cancel",F);this.escape(n,F,O)};c.Hh.prototype.escape=function(n,F,O){n.M.qD=null;
n.M.dl=[];n.zB=!0;this.Xv=null;var I=new k(V.E.P,!0);I.data={e:V.U.lt};if(O)F.A(I)};c.Hh.prototype.XS=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y),_=r.x,d=r.y,w=this.Xv,Z=null,P=[0,2,4,1.2,1.2,1.2],C=-1,W=V.Z()*5/n.a.K;
for(var e=0;e<w.length;e++){var v=w[e],L=q.z.e6(v.a_,_,d,W);if(L!=-1)Z=[e,L];if(C==-1&&q.vr.MW.a2F(v.FW,v.Cj,_,d))C=e}if(Z==null&&C!=-1){var v=w[C];
c.Hh.iz(v,_,d,_,d,0);Z=[C,v.uc.length-1];v.Eh=q.vr.a1(v)}this.ii=r;if(Z){var H=w[Z[0]].C.indexOf(Z[1])!=-1;
if(I.q(u.MQ)&&!H){w[Z[0]].C.push(Z[1]);this.We.push(Z)}else if(!H){w[Z[0]].C=[Z[1]];this.We=[Z]}}this.NS(n)};
c.Hh.iz=function(n,F,O,I,x,r){var _=q.z.e6(n.FW,F,O);n.uc.push(_);n.a_.push(I,x);n.r8.push(n.FW[_*2]-F,n.FW[_*2+1]-O);
n.Oq.push(0);n.WN.push(!1);n.Ll.push(r)};c.Hh.prototype.RL=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y),_=this.ii;
if(_)this.cP(n,r.x-_.x,r.y-_.y,F)};c.Hh.prototype.cP=function(n,F,O,I){var x={},r=this.We,_=this.Xv;
if(this.Ed==null){this.Ed=[];for(var e=0;e<_.length;e++)this.Ed.push(_[e].a_.slice(0))}for(var e=0;e<r.length;
e++){var d=this.We[e],w=d[0],Z=_[d[0]],P=d[1]*2;Z.a_[P+0]=this.Ed[w][P+0]+F;Z.a_[P+1]=this.Ed[w][P+1]+O;
x[w]=w}for(var w in x)q.vr.j$(this.Xv[x[w]]);this.NS(n);this.Xx(I)};c.Hh.prototype.Fv=function(n,F){var O=new k(V.E.S,!0);
O.T=c.HI;O.data={e:n,O6:this.a6i,qm:this.qm,K_:this.AO};F.A(O)};c.Hh.prototype._X=function(n,F,O,I,x){this.ii=null;
this.Ed=null};c.Hh.prototype.Xx=function(n){c.Hh.Lc(this.Xv,this._F,this.AO);this.Fv("edit",n)};c.Hh.prototype.NS=function(n){var F=this.Xv,O=this.AO;
n.M.qD={H:[],s:[]};n.M.dl=[];n.M.ye=[];for(var e=0;e<F.length;e++){var I=F[e];for(var x=0;x<I.C.length;
x++)n.M.ye.push((n.M.dl.length>>>1)+I.C[x]);n.M.dl=n.M.dl.concat(I.a_);if(this._F[3])q.z.concat(n.M.qD,q.z.alD(I.FW,I.Cj))}n.zB=!0};
c.Hh.yU=function(n,F,O){var I=n.buffer,x=n.rect,r=n.a67,_=bS.tc("rigidTransform");if(r)for(var e=0;e<4;
e++){_["PuX"+e].v=r[e*2];_["PuY"+e].v=r[e*2+1]}var d=_.puppetShapeList.v,w=q.vr.als(I,x.d,x.v,F[1],F[2]),Z=[];
for(var P=0;P<w.length;P++){var C={classID:"puppetShape",rigidType:{t:"bool",v:!0},VrsM:{t:"long",v:1},VrsN:{t:"long",v:0},originalVertexArray:{t:"tdta",v:[]},deformedVertexArray:{t:"tdta",v:[]},indexArray:{t:"tdta",v:[]},pinOffsets:{t:"VlLs",v:[]},posFinalPins:{t:"VlLs",v:[]},pinVertexIndices:{t:"VlLs",v:[]},PinP:{t:"VlLs",v:[]},PnRt:{t:"VlLs",v:[]},PnOv:{t:"VlLs",v:[]},PnDp:{t:"VlLs",v:[]},meshQuality:{t:"long",v:2},meshExpansion:{t:"long",v:2},meshRigidity:{t:"long",v:2},imageResolution:{t:"doub",v:72},selectedPin:{t:"VlLs",v:[]}};
C.meshBoundaryPath={t:"Objc",v:{classID:"pathClass",pathComponents:{t:"VlLs",v:[{t:"Objc",v:{classID:"PaCm",shapeOperation:{t:"enum",v:{shapeOperation:"xor"}},SbpL:{t:"VlLs",v:[{t:"Objc",v:{classID:"Sbpl",Clsp:{t:"bool",v:!0},Pts:{t:"VlLs",v:[]}}}]}}}]}}};
var W=w[P];d.push({t:"Objc",v:C});var v=W.vZ.slice(0);q.z.m(v,new cD(1,0,0,1,x.x,x.y),v);var L=W.Cj;
for(var e=0;e<L.length;e+=3){var H=L[e+1];L[e+1]=L[e+2];L[e+2]=H}Z.push({Cj:L,vZ:v,eo:v,FW:v,uc:[],r8:[],a_:[],Eh:null,C:[],Oq:[],WN:[],Ll:[]})}if(O){var y=c.Hh.N9(O,[]),g=Z[0];
for(var e=0;e<y.length;e++){var Q=y[e];for(var J=0;J<Q.C.length;J++)g.C.push((g.a_.length>>>1)+Q.C[J]);
for(var J=0;J<Q.uc.length;J++){var A=Q.uc[J]*2,p=Q.vZ[A]-Q.r8[J*2],U=Q.vZ[A+1]-Q.r8[J*2+1];c.Hh.iz(g,p,U,Q.a_[J*2],Q.a_[J*2+1],Q.Ll[J])}}}c.Hh.Lc(Z,F,_);
return _};c.Hh.N9=function(n,F){var O=c.V.ns,I=n.puppetShapeList.v,x=[];for(var r=0;r<I.length;r++){var _=I[r].v;
F[0]=_.meshRigidity.v-1;F[1]=_.meshQuality.v-1;F[2]=_.meshExpansion.v;var d=_.pinVertexIndices.v.length,w=_.meshBoundaryPath.v.pathComponents.v;
if(w.length!=0){var Z=w[0].v.SbpL.v[0].v.Pts;Z.v=[]}var P=new Uint32Array(new Uint8Array(_.indexArray.v).buffer),C=new Float32Array(new Uint8Array(_.originalVertexArray.v).buffer),W=new Float32Array(new Uint8Array(_.deformedVertexArray.v).buffer),v=[],L=[],H=[];
for(var e=0;e<P.length;e++)v.push(P[e]);for(var e=0;e<C.length;e++){L.push(C[e]);H.push(W[e])}var y=O(_.pinVertexIndices),g=O(_.pinOffsets),Q=O(_.posFinalPins),J=O(_.PnRt),A=O(_.PnOv),p=O(_.PnDp),U=O(_.selectedPin);
x.push({Cj:v,vZ:L,eo:H.slice(0),FW:H,uc:y,r8:g,a_:Q,Eh:null,Oq:J,WN:A,Ll:p,C:U})}return x};c.Hh.Lc=function(n,F,O){function I(W,v){var L=[];
for(var e=0;e<W.length;e++)L.push({t:v,v:W[e]});return L}function x(W,v,L){var H=new(L?Uint32Array:Float32Array)(W),y=new Uint8Array(H.buffer);
for(var e=0;e<y.length;e++)v[e]=y[e]}var r=O.puppetShapeList.v;for(var _=0;_<r.length;_++){var d=n[_],w=r[_].v;
w.meshRigidity.v=F[0]+1;w.meshQuality.v=F[1]+1;w.meshExpansion.v=F[2];x(d.Cj,w.indexArray.v,!0);x(d.vZ,w.originalVertexArray.v);
x(d.FW,w.deformedVertexArray.v);var Z=[];for(var e=0;e<d.uc.length;e++){var P=d.uc[e]*2,C=e*2;Z[C]=d.vZ[P]-d.r8[C];
Z[C+1]=d.vZ[P+1]-d.r8[C+1]}w.PinP.v=I(Z,"doub");w.pinVertexIndices.v=I(d.uc,"long");w.pinOffsets.v=I(d.r8,"doub");
w.posFinalPins.v=I(d.a_,"doub");w.PnRt.v=I(d.Oq,"long");w.PnOv.v=I(d.WN,"bool");w.PnDp.v=I(d.Ll,"doub");
w.selectedPin.v=I(d.C,"long")}};c.Fz=function(n,F,O){c.Fq.call(this,n?n:[10,40],F?F:c.si,O?O:"tools/slice");
this.sE=null;this.ta=null;this.sY=null;this.a8p=null;this.hA=null;this.VA=null};c.Fz.prototype=new c.Fq;
c.Fz.q9=function(n,F){var O=-1;for(var e=0;e<n.length;e++){var I=c.Fz.UG(n,e);if(I[0]<=F.x&&F.x<=I[2]&&I[1]<=F.y&&F.y<=I[3]){O=e;
break}}return O};c.Fz.prototype.fM=function(n,F,O,I,x){this.qo(O);O.l_[O.Hu[0]].v=n;O.zB=!0;this.I0(O)};
c.Fz.prototype.enable=function(n,F,O,I,x,r){c.Fq.prototype.enable.call(this,n,F,O,I,x,r);if(!O.Kc.l_){var _=new k(V.E.P,!0);
_.data={e:V.U.g7,b9:cf.sM};F.A(_)}};c.Fz.prototype.disable=function(){this.sE=null;this.ta=null};c.Fz.prototype.e9=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y),_=c.Fz.q9(n.l_,r);
if(_==-1)return;this.sE=n;this.ta=F;n.Hu=[_];n.zB=!0;if(this.VA==null){this.VA=new at([{name:[5,4]},{name:[8,11,1],RO:!0}]);
this.VA.k("select",this._w,this)}var d=this.VA;d.parent=F;d.B();d.update(n,O);var w=new k(V.E.P,!0);
w.data={e:V.U.di,AM:d,x:x.Ux+2,y:x.fw+1};F.A(w)};c.Fz.prototype._w=function(n){var F=this.VA.uz()[0],O=this.sE;
if(F==0){this.qo(O);O.l_.splice(O.Hu[0],1);O.Hu=[];O.zB=!0;this.I0(O)}if(F==1){var I=new k(V.E.P,!0);
I.data={e:V.U.n$,cU:"soptions",G:O.l_[O.Hu[0]].v};this.ta.A(I)}};c.Fz.prototype.XS=function(n,F,O,I,x){if(n==null)return;
this.qo(n);var r=n.a.jR(x.x,x.y);r=c.eB.J_(n,r,O,[!0,null,!1]);r.x=Math.round(r.x);r.y=Math.round(r.y);
this.hA=r;n.l_.unshift(c.Fz.G5());n.Hu=[0];c.Fz.En(n.l_,0,[r.x,r.y,r.x+20,r.y+20]);n.zB=!0};c.Fz.prototype.RL=function(n,F,O,I,x){if(this.sY==null)return;
var r=n.a.jR(x.x,x.y),_=this.hA;r=c.eB.J_(n,r,O,[!0,null,!1]);r.x=Math.round(r.x);r.y=Math.round(r.y);
var d=[_.x,_.y,r.x,r.y];c.Fz.P2(d);c.Fz.En(n.l_,0,d);n.zB=!0};c.Fz.prototype._X=function(n,F,O,I,x){this.I0(n);
this.hA=null};c.Fz.prototype.qo=function(n){this.sY=JSON.stringify(n.l_);this.a8p=JSON.stringify(n.Hu)};
c.Fz.prototype.I0=function(n){var F=JSON.stringify(n.l_);if(F!=this.sY){var O=new hS(this.name,this);
O.data={gX:this.sY,WR:F,aj8:this.a8p,abx:JSON.stringify(n.Hu)};n.p$(O)}this.sY=null};c.Fz.prototype.cQ=function(n,F){F.l_=JSON.parse(n.gX);
F.Hu=JSON.parse(n.aj8);F.zB=!0};c.Fz.prototype.Xe=function(n,F){F.l_=JSON.parse(n.WR);F.Hu=JSON.parse(n.abx);
F.zB=!0};c.Fz.prototype.JF=function(n,F){return F!=null&&F.Hu.length!=0&&(n==u.lW||n==u.pf)};c.Fz.prototype.Ka=function(n,F,O,I){if(n==null)return;
this.qo(n);var x=I.vo();if(x.x!=0||x.y!=0)c.Fz.VT(n,x);if(I.q(u.lW)||I.q(u.pf)){var r=n.l_.slice(0);
for(var e=0;e<n.Hu.length;e++)n.l_.splice(n.l_.indexOf(r[n.Hu[e]]),1);n.Hu=[]}this.I0(n)};c.Fz.prototype.wl=function(n,F,O,I,x){if(O==null||O.Hu.length==0)return;
this.qo(O);var r=O.l_,_=O.Hu;_.sort(function(v,L){return v-L});console.log(_);var d=r.slice(0),w=[],Z=[];
for(var e=0;e<_.length;e++){var P=_[e],C=r[P];Z.push(C);d.splice(d.indexOf(C),1)}var W=Math.max(0,Math.min(d.length,_[0]-n.dir));
for(var e=0;e<Z.length;e++){d.splice(W+e,0,Z[e]);w.push(W+e)}O.l_=d;O.Hu=w;this.I0(O)};c.Fz.aix=function(n,F,O,I){var x=new aE(-F.x,-F.y),r=F.d/O.d,_=F.v/O.v,d=[0,0,F.d,F.v];
for(var e=0;e<n.length;e++){var w=c.Fz.UG(n,e);if(I){w[0]=Math.round(w[0]*r);w[1]=Math.round(w[1]*_);
w[2]=Math.round(w[2]*r);w[3]=Math.round(w[3]*_)}else{c.Fz.qZ(w,x);c.Fz.ah2(w,d)}if(w[0]>=w[2]||w[1]>=w[3]){n.splice(e,1);
e--;continue}c.Fz.En(n,e,w)}};c.Fz.VT=function(n,F){var O=n.l_;for(var e=0;e<n.Hu.length;e++){var I=c.Fz.UG(O,n.Hu[e]);
c.Fz.qZ(I,F);c.Fz.En(O,n.Hu[e],I)}};c.Fz.ah2=function(n,F){if(n[0]<F[0])n[0]=F[0];if(n[1]<F[1])n[1]=F[1];
if(F[2]<n[2])n[2]=F[2];if(F[3]<n[3])n[3]=F[3]};c.Fz.qZ=function(n,F){n[0]=Math.round(n[0]+F.x);n[2]=Math.round(n[2]+F.x);
n[1]=Math.round(n[1]+F.y);n[3]=Math.round(n[3]+F.y)};c.Fz.En=function(n,e,F){var O=n[e].v.bounds.v;O.Left.v=F[0];
O.Top.v=F[1];O.Rght.v=F[2];O.Btom.v=F[3]};c.Fz.UG=function(n,e){var F=n[e].v.bounds.v;return[F.Left.v,F.Top.v,F.Rght.v,F.Btom.v,e]};
c.Fz.P2=function(n){if(n[2]<n[0]){var F=n[0];n[0]=n[2];n[2]=F}if(n[2]==n[0])n[2]++;if(n[3]<n[1]){var F=n[1];
n[1]=n[3];n[3]=F}if(n[3]==n[1])n[3]++};c.Fz.gh=function(n,F){var O=1e9,I=-1e9,x=1e9,r=-1e9;for(var e=0;
e<F.length;e++){var _=c.Fz.UG(n,F[e]);O=Math.min(O,_[0]);x=Math.min(x,_[1]);I=Math.max(I,_[2]);r=Math.max(r,_[3])}return[O,x,I,r]};
c.Fz.G5=function(){return{t:"Objc",v:{classID:"slice",sliceID:{t:"long",v:0},groupID:{t:"long",v:0},origin:{t:"enum",v:{ESliceOrigin:"userGenerated"}},Type:{t:"enum",v:{ESliceType:"Img"}},bounds:{t:"Objc",v:{classID:"Rct1",Top:{t:"long",v:0},Left:{t:"long",v:0},Btom:{t:"long",v:0},Rght:{t:"long",v:0}}},url:{t:"TEXT",v:""},null:{t:"TEXT",v:""},Msge:{t:"TEXT",v:""},altTag:{t:"TEXT",v:""},cellTextIsHTML:{t:"bool",v:!0},cellText:{t:"TEXT",v:""},horzAlign:{t:"enum",v:{ESliceHorzAlign:"default"}},vertAlign:{t:"enum",v:{ESliceVertAlign:"default"}},bgColorType:{t:"enum",v:{ESliceBGColorType:"None"}},topOutset:{t:"long",v:0},leftOutset:{t:"long",v:0},bottomOutset:{t:"long",v:0},rightOutset:{t:"long",v:0}}}};
c.$0=function(){c.Fz.call(this,[10,41],c.E4,"tools/sselect");this.hA=null;this.Ce=null;this.OG=null;
this.n_=null;this.EH=!1};c.$0.prototype=new c.Fz;c.$0.prototype.XS=function(n,F,O,I,x){if(n==null)return;
var r=n.a.jR(x.x,x.y),_=c.$0.W_(r,4/n.a.K,n.l_,n.Hu);_.pop();if(_.length!=0){this.hA=r;this.OG=_;this.qo(n);
return}var d=n.l_,w=c.Fz.q9(d,r);if(w==-1)n.Hu=[];else{var Z=n.Hu.indexOf(w);if(I.q(u.MQ)){if(Z==-1)n.Hu.push(w);
else n.Hu.splice(Z,1)}else{n.Hu.sort(function(H,y){return H-y});if(Z==-1)n.Hu=[w];this.hA=r;this.qo(n);
this.Ce=c.Fz.gh(d,n.Hu);this.n_=[];for(var e=0;e<n.Hu.length;e++)this.n_.push(c.Fz.UG(d,n.Hu[e]));if(I.q(u.pI)){var P=d.slice(0),C=n.Hu,W=[];
for(var e=0;e<C.length;e++){var w=C[e],v=P[w],L=d.indexOf(v);W.push(L);d.splice(L,0,JSON.parse(JSON.stringify(v)))}n.Hu=W}}}n.zB=!0};
c.$0.prototype.RL=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y);if(this.hA==null){var _=c.$0.W_(r,4/n.a.K,n.l_,n.Hu),d=_.pop(),w=_.length==0?"default":["ew","nwse","ns","nesw"][d]+"-resize",Z=new k(V.E.P,!0);
Z.data={e:V.U.VC,dx:w};F.A(Z);return}if(!this.EH&&r.Qq(this.hA))return;this.EH=!0;var P=n.l_,_=this.OG;
if(_){r=c.eB.J_(n,r,O,[!0,null,!1]);var C=Math.round(r.x),W=Math.round(r.y);for(var e=0;e<_.length;e+=2){var v=c.Fz.UG(P,_[e]),L=_[e+1];
v[L]=(L&1)==0?C:W;c.Fz.P2(v);c.Fz.En(P,_[e],v)}}else{var H=r.ba(this.hA),y=this.Ce.slice(0);c.Fz.qZ(y,H);
var g=new gv(y[0],y[1],y[2]-y[0],y[3]-y[1]),Q=c.eB.VO(n,g,O,[!0,null,!1],!0);c.eB.BU(n,g,Q);H.x+=Q[0];
H.y+=Q[1];for(var e=0;e<n.Hu.length;e++)c.Fz.En(P,n.Hu[e],this.n_[e]);c.Fz.VT(n,H)}n.zB=!0};c.$0.prototype._X=function(n,F,O,I,x){if(this.hA==null)return;
this.I0(n);n.M.iA=null;n.zB=!0;this.hA=null;this.OG=null;this.n_=null;this.EH=!1};c.$0.W_=function(n,F,O,I){var x=n.x,r=n.y,_=[],d=-1,w=[];
for(var e=0;e<I.length;e++){var Z=I[e],P=c.Fz.UG(O,Z),C=P[0],W=P[1],v=P[2],L=P[3];if(x<C-F||v+F<x||r<W-F||L+F<r)continue;
var H=[x<C+F,r<W+F,v-F<x,L-F<r],y=-1;for(var g=0;g<4;g++){if(H[g]&&H[g+1&3])y=1+2*(g&1);if(H[g])_.push(Z,g)}if(y==-1){if(H[0]||H[2])y=0;
if(H[1]||H[3])y=2}if(y!=-1){d=y;w.push(Z)}}var Q=_.length;for(var e=0;e<Q;e+=2){var Z=_[e],J=_[e+1],A=c.Fz.UG(O,Z)[J];
for(var g=0;g<I.length;g++){var p=I[g];if(w.indexOf(p)!=-1)continue;var P=c.Fz.UG(O,p);if(P[J&1]==A)_.push(p,J&1);
if(P[2+(J&1)]==A)_.push(p,2+(J&1))}}_.push(d);return _};c.kb=function(){c.pQ.call(this,[10,44],c.a4X,"tools/oselect");
this.IF="crosshair";this.a6e=0};c.kb.prototype=new c.pQ;c.kb.prototype.R3=function(n,F,O,I){if(Math.random()<1/(1+this.a6e)){alert("The cross should be fully inside the object.",3500);
this.a6e++}};c.kb.prototype.BO=function(n,F,O,I){c.Ae.u5(n,c.pQ.md,this.ta);if(!I.rt||!this.Sl)return;
var x=this.nJ(n,O,!1),r=x.d,_=x.v,d=x.x,w=x.y,Z=x.x+r,P=x.y+_,C=d+r/2,W=w+_/2,v=c.kb.jy;n.M.qD={H:[d,w,Z,w,Z,P,d,P,C-r*v,W,C+r*v,W,C,W-_*v,C,W+_*v],s:"M L L L Z M L M L".split(" ")};
n.zB=!0};c.kb.jy=.12;c.kb.prototype.lu=function(n,F,O,I){n.M.qD=null;n.zB=!0;this.finish(n,F,O,I)};c.kb.prototype.getSelection=function(n,F,O,I){if(this.nh.Qq(this.v4)||!this.Sl)return null;
var x=this.nJ(n,O,!1),r=n.t[n.C[0]];if(x.D2()||!x.G3(r.rect))return null;return c.pQ.ZA("ObSl",x)};c.Ae=function(){c.P6.call(this,[10,37],c.QT,"tools/qselect");
this.W6="qselect"};c.Ae.prototype=new c.P6;c.Ae.prototype.XS=function(n,F,O,I,x){this.yW(n,O,I,x,1);
if(this.IY==null)return;this._t(n)};c.Ae.prototype.RL=function(n,F,O,I,x){this.K9(n,F,O);c.Ae.u5(n,c.pQ.md,F);
if(this.wh)this.dh(n,O,x);if(this.IY==null)return;if(!x.rt)return;var r=this.ID(n,O,I,x);if(r!=1)this._t(n)};
c.Ae.u5=function(n,F,O){if(n&&F.key!=c.Ae.v3(n)){F.key=c.Ae.v3(n);var I=n.t[n.C[0]].rect.X(),r="Image Analysis ...";
if(I==0)return;var x=I>1e6,_=new k(V.E.P,!0);_.data={e:V.U.DH,kA:r};if(x)O.A(_);setTimeout(function(){var d=c.Ae.fU(n);
for(var w in d)F[w]=d[w];var _=new k(V.E.P,!0);_.data={e:V.U.QD,kA:r};if(x)O.A(_)},30)}};c.Ae.v3=function(n){var F=n.C[0],O=n.t[F],I=O.rect,x=I.d,r=I.v,_=x*r,d=O.buffer;
return[F,I.x,I.y,x,r,d[0],d[1],d[2],d[3]].join(",")};c.Ae.fU=function(n){var F=n.C[0],O=n.t[F],I=O.rect,x=I.d,r=I.v,_=x*r,d=O.buffer,w=Date.now(),Z=q.f(_);
Z.fill(128);var P=q.yN.qv(d,x,r);console.log(Date.now()-w);var C={key:c.Ae.v3(n),Ko:d,rect:I.clone(),HL:x,Sa:r,H9:12,agA:!1,WG:Z,Ld:P,N:q.f(_),fJ:null,Pm:null,SM:null};
c.Ae.Sy(C);return C};c.Ae.Sy=function(n,F){var O=n.HL,I=n.Sa,x=0,r=0,_=Date.now(),d=n.fJ!=null&&q.yN.abl(n.Ld.Cj,n.fJ.Cj,n.fJ.UA,n.WG);
x=Date.now()-_;_=Date.now();if(!d&&!n.agA){n.fJ=q.yN.JL(n.Ld,O,I,n.WG,n.H9);if(!q.yN.abl(n.Ld.Cj,n.fJ.Cj,n.fJ.UA,n.WG)){n.agA=!0;
console.log("conflict")}n.Pm=q.yN.agV(n.Ko,O,I,n.fJ.Cj,n.fJ.UA);n.SM=[n.Pm[0].slice(0),[]];r=Date.now()-_;
_=Date.now()}var _=Date.now();if(F){n.SM[0].set(n.Pm[0]);var w=n.Pm[1],Z=n.SM[1];for(var P=0;P<w.length;
P++)Z[P]=w[P].slice(0);q.yN.a7N(n.fJ.Cj,O,I,n.fJ.UA,n.WG,n.N,n.SM)}};function g_(n,F,O,I,x,r,_,d){this.lO=null;
this.AZ=n?n.slice(0):null;this.TJ=4;this.v4=null;this.Fd=null;this.za=null;this.tU=-1;this.wM=null;this.a7m=!1;
this.aj7=[];for(var e=0;e<8;e++)this.aj7.push(fx.a4b(0,PIMG.rotate,-.5,-.5,-45-e*45));this.agQ=F;this.ajN=O;
this.a8X=I;this.a7F=x;this.a4e=r;this.Lj=_;this.a1I=d}g_.prototype.pE=function(){return this.tU!=-1};
g_.prototype.PZ=function(){return this.AZ.slice(0)};g_.prototype.DE=function(n){this.AZ=n};g_.prototype.aea=function(){return this.xK(this.AZ)};
g_.prototype.agu=function(){return this.TJ};g_.prototype.agI=function(n){this.TJ=n};g_.prototype.St=function(n){if(n==null)n=this.AZ;
if(this.TJ==9)return this.v4;else return this.xK(n)[this.TJ]};g_.prototype.a5C=function(n){if(this.TJ==9)this.v4=n.clone();
else{var F=this.St(),O=new cD(1,0,0,1,n.x-F.x,n.y-F.y);q.z.m(this.AZ,O,this.AZ)}};g_.prototype.n5=function(n,F,O){var I=this.WQ(n,F),x;
if(I==9)return"default";if(I==10){if(O)return null;return!this.agQ?"move":null}if(I==-1||I==4)return null;
if(I==11){var r=this.St().ba(n);x=90-Math.atan2(r.y,r.x)*180/Math.PI;var _=Math.round(8*(x/360));_=(_+8)%8;
return this.aj7[_]}else{var d=this.OY(n,this.AZ);x=[135,90,45,180,0,0,225,270,315][I];var w=q.J.N5(this.AZ);
x+=Math.atan2(-w[3],w[0])*180/Math.PI;var Z="ew nesw ns nwse ew nesw ns nwse".split(" "),_=Math.round(8*(x/360));
_=(_+8)%8;return Z[_]+"-resize"}};g_.prototype.OY=function(n,F){var O=q.J.uZ(q.J.N5(F)),I=new Float64Array(2);
q.J.fb(n.x,n.y,O,I);return new aE(I[0],I[1])};g_.prototype.xy=function(n){var F=this.OY(n,this.AZ);return 0<=F.x&&F.x<=1&&0<=F.y&&F.y<=1};
g_.prototype.XS=function(n,F,O,I,x,r){this.a7m=r;this.wM=I;var _=n.a.K,d;if(this.AZ==null)I=c.eB.J_(n,I,F);
this.za=I.clone();if(this.AZ==null){this.za.offset(1,1);var w=x==null?1:1/x;this.AZ=[I.x,I.y,I.x+1,I.y,I.x+1,I.y+w,I.x,I.y+w];
d=8}else{d=this.WQ(I,_);if(0<=d&&d<=8)this.za=this.xK(this.AZ)[d]}this.lO=this.AZ.slice(0);this.tU=d;
this.s6(n,F);this.Fd=this.St();return d!=-1};g_.prototype.WQ=function(n,F){var O=-1,I=this.xK(),x=6*V.Z()/F;
if(O==-1)if(aE.sl(this.St(),n)<x)O=9;if(O==-1)for(var e=0;e<I.length;e++)if(e!=4&&aE.sl(I[e],n)<x)O=e;
if(O==-1||this.Lj==4){if(this.xy(n)){if(this.agQ)O=10}else{var r=this.OY(n,this.AZ),_=new gv(0,0,1,1);
_.EM(.2,.2);O=_.JX(r)&&this.Lj!=3?11:10}}return O};g_.prototype.RL=function(n,F,O,I){if(this.tU==-1)return;
this.wM=I;var x=O.q(u.MQ),r=O.q(u.pI),_=O.q(u.ep),d=n.a.K,w=this.za,Z=this.tU,P=this.xK(),C=c.eB.J_(n,w,F),W=c.eB.J_(n,I,F),v,L;
if(Z==9){var P=this.xK(),H=-1;for(var e=0;e<P.length;e++)if(aE.sl(P[e],W)*d<10)H=e;this.TJ=H==-1?9:H;
this.v4=x?c.AG.J6(C,W):W.clone()}else if(Z==10){L=q.z.gh(this.lO);var y=L.x,g=L.y;L.offset(I.x-w.x,I.y-w.y);
if(this.qj()){L.x=Math.round(L.x);L.y=Math.round(L.y)}v=c.eB.VO(n,L,F);var Q=new cD(1,0,0,1,L.x-y+v[0],L.y-g+v[1]);
q.z.m(this.lO,Q,this.AZ)}else if(Z==11){var J=this.St(this.lO),A=J.ba(I),p=J.ba(w),U=Math.atan2(A.y,A.x),j=Math.atan2(p.y,p.x),Q=new cD(1,0,0,1,-J.x,-J.y),b=Math.PI/12;
if(x)Q.rotate(Math.round((j-U)/b)*b);else Q.rotate(j-U);Q.translate(J.x,J.y);q.z.m(this.lO,Q,this.AZ)}else{var s,G=this.lO,T=Z==0||Z==2||Z==6||Z==8;
if(this.Lj==1){if(T)x=r=_=!0}else if(this.Lj==2&&T&&this.a7m!=!0)_=!0;if(this.Lj==3)_=!1;if(this.a8X&&T&&_){var e=[0,0,2,0,0,0,6,0,4,0][Z],z=-1,m=W.x,$=W.y;
if(x){var o=e+6&7,h=e+10&7,X=g_.m6(G[e],G[e+1],G[o],G[o+1],W.x,W.y),D=g_.m6(G[e],G[e+1],G[h],G[h+1],W.x,W.y),f=X[2]<D[2]?X:D;
m=f[0];$=f[1];if(r)z=X[2]<D[2]?o:h}else if(r)z=e+4&7;s=G.slice(0);if(z!=-1){var R=G[z],i=G[z+1],t=(G[e]+R)/2,N=(G[e+1]+i)/2;
s[z]=t-(m-t);s[z+1]=N-($-N)}s[e]=m;s[e+1]=$}else if(T&&r){var J=this.Fd,M=J.x,hK=J.y,bD=C.x-M,co=C.y-hK,iM=1,hs=1;
if(Math.abs(bD)>=1)iM=(W.x-M)/bD;if(Math.abs(co)>=1)hs=(W.y-hK)/co;if(x)iM=hs=(iM+hs)/2;var S=new cD;
S.translate(-M,-hK);S.scale(iM,hs);S.translate(M,hK);s=G.slice(0);q.z.m(s,S,s)}else{if(this.qj()){W.x=Math.round(W.x);
W.y=Math.round(W.y)}var a=[0,1,2,5,8,7,6,3],bV=a[(a.indexOf(Z)+4)%8],a5=[];for(var e=0;e<3;e++)for(var z=0;
z<3;z++)a5.push(new aE(z/2,e/2));var J=this.Fd,i9=this.OY(W,G),dG=this.OY(w,G),ap=r&&(this.TJ==4||this.TJ==9)?this.OY(J,G):a5[bV],bk=new cD,c2=new cD,iM=(i9.x-ap.x)/(dG.x-ap.x);
if(iM==0)iM=1e-4;var hs=(i9.y-ap.y)/(dG.y-ap.y);if(hs==0)hs=1e-4;if(this.a7F){iM=Math.max(iM,0);hs=Math.max(hs,0)}if(Z==0||Z==2||Z==6||Z==8){if(x||this.a4e)bk.scale(iM,iM);
else bk.scale(iM,hs)}if(Z==1||Z==3||Z==5||Z==7){var gg=this.a4e;if(Z==1||Z==7)bk.scale(gg?hs:1,hs);else bk.scale(iM,gg?iM:1);
if(this.ajN&&_){if(Z==1||Z==7)c2.Pr=(i9.x-ap.x)/(i9.y-ap.y);else c2.O=(i9.y-ap.y)/(i9.x-ap.x)}}var S=new cD;
S.translate(-ap.x,-ap.y);S.concat(bk);S.concat(c2);S.translate(ap.x,ap.y);s=[0,0,1,0,1,1,0,1];q.z.m(s,S,s);
var f=q.J.N5(G);q.J.m(f,s)}if(g_.AT(s))this.AZ=s}this.s6(n,F);if(v)c.eB.BU(n,L,v)};g_.m6=function(n,F,O,I,x,r){var _=O-n,d=I-F,w=x-n,Z=r-F,P=_*_+d*d,C=w*_+Z*d,W=C/P,v=n+W*_,L=F+W*d,H=x-v,y=r-L;
return[v,L,Math.sqrt(H*H+y*y)]};g_.prototype.qj=function(){var n=this.AZ;return Math.abs(n[1]-n[3])<1e-6&&Math.abs(n[2]-n[4])<1e-6||Math.abs(n[0]-n[2])<1e-6&&Math.abs(n[3]-n[5])<1e-6};
g_.AT=function(n){return q.z.go(n)||q.z.go([n[6],n[7],n[4],n[5],n[2],n[3],n[0],n[1]])};g_.prototype._X=function(n,F,O,I){this.tU=-1;
this.wM=null;n.M.iA=null;n.M.s3=[];n.zB=!0};g_.prototype.Ka=function(n,F,O){var I=O.vo();if(I.x||I.y){var x=new cD(1,0,0,1,I.x,I.y);
q.z.m(this.AZ,x,this.AZ);this.s6(n,F);return!0}return!1};g_.prototype.xK=function(n){if(n==null)n=this.AZ;
var F=n[6]-n[0],O=n[7]-n[1],I=n[4]-n[2],x=n[5]-n[3],r=[n[0],n[1],n[2],n[3],n[0]+F/2,n[1]+O/2,n[2]+I/2,n[3]+x/2,n[6],n[7],n[4],n[5]],_=[];
for(var e=0;e<3;e++){var d=e*4,w=r[d+0],Z=r[d+1],P=r[d+2],C=r[d+3];_.push(new aE(w,Z));_.push(new aE(w+(P-w)/2,Z+(C-Z)/2));
_.push(new aE(P,C))}return _};g_.prototype.s6=function(n,F,O){if(O==null)O=!1;var I=this.xK(),x=I[0],r=I[2],_=I[6],d=I[8];
n.M.qD={s:[],H:[]};n.M.qD.s.push("M","L","L","L","Z");n.M.qD.H.push(x.x,x.y,r.x,r.y,d.x,d.y,_.x,_.y);
if(this.a1I){var w=r.ba(x),Z=_.ba(x),P=d.ba(r),C=d.ba(_);for(var e=0;e<3;e++){n.M.qD.s.push("M","L","M","L");
var W=(e+1)*.25;n.M.qD.H.push(x.x+w.x*W,x.y+w.y*W,_.x+C.x*W,_.y+C.y*W);n.M.qD.H.push(x.x+Z.x*W,x.y+Z.y*W,r.x+P.x*W,r.y+P.y*W)}}n.a.LL=new gv(0,0,aE.sl(I[0],I[2]),aE.sl(I[0],I[6]));
if(this.tU!=-1&&this.tU<9&&this.wM){var v=n.a.Hl(this.wM.x,this.wM.y);c.Fq.Ji(v.x+10,v.y-10,n.a.LL,n,F)}if(!O){n.M.Ri=[];
for(var e=0;e<I.length;e++)if(e!=4)n.M.Ri.push(I[e].x,I[e].y);var L=this.St();n.M.Ri.push(L.x,L.y)}n.zB=!0};
g_.prototype.clear=function(n){n.a.LL=null;n.M.iA=null;n.M.qD=null;n.M.Ri=[];n.zB=!0};function gt(n,F){this.qF=null;
this.tU=-1;this.t$(n)}gt.prototype.zm=function(){return JSON.parse(JSON.stringify(this.qF))};gt.prototype.t$=function(n){this.qF=JSON.parse(JSON.stringify(n))};
gt.prototype.xy=function(n){return!0};gt.prototype.n5=function(n,F){var O=this.WQ(n,F);if(O==-1)return"default";
return"pointer"};gt.prototype.XS=function(n,F,O,I){this.tU=this.WQ(I,n.a.K);return this.tU!=-1};gt.prototype.WQ=function(n,F){var O=-1,I=20*V.Z(),x=this.De();
for(var e=0;e<x.length;e++)if(aE.sl(x[e],n)*F<I)O=e;return O};gt.prototype.RL=function(n,F,O,I){if(this.tU==-1)return;
var x=n.a.K,r=this.tU,_=q.qF.Bo(this.qF);_[r*2]=I.x;_[r*2+1]=I.y;q.qF.rG(_,this.qF)};gt.prototype._X=function(n,F,O,I){this.tU=-1;
n.zB=!0};gt.prototype.Ka=function(n,F,O){var I=O.vo();if(I.x||I.y){var x=new cD(1,0,0,1,I.x,I.y);q.z.m(this.AZ,x,this.AZ);
this.s6(n)}};gt.prototype.De=function(n){var F=q.qF.Bo(this.qF),O=[];for(var e=0;e<F.length;e+=2)O.push(new aE(F[e],F[e+1]));
return O};gt.prototype.s6=function(n){var F=this.De();n.M.qD={s:[],H:[]};n.M.qD.s.push("M","C","C","C","C");
var O=[0,1,2,3,7,11,15,14,13,12,8,4,0];for(var e=0;e<O.length;e++)n.M.qD.H.push(F[O[e]].x,F[O[e]].y);
n.M.qD.s.push("M","L","L","M","L","L","M","L","L","M","L","L");O=[4,0,1,2,3,7,11,15,14,13,12,8];for(var e=0;
e<O.length;e++)n.M.qD.H.push(F[O[e]].x,F[O[e]].y);n.M.Ri=[];for(var e=0;e<F.length;e++)n.M.Ri.push(F[e].x,F[e].y);
n.zB=!0};gt.prototype.clear=function(n){n.M.qD=null;n.M.Ri=[];n.zB=!0};var ci={};ci.xJ=function(n){this.id=n;
this.ta=null};ci.xJ.prototype.fM=function(n,F,O,I,x){};ci.xJ.prototype.Xe=function(n,F){};ci.xJ.prototype.cQ=function(n,F){};
ci.xJ.prototype.track=function(n){var F=new k(V.E.JA,!0);F.data=n;n.Vw=!0;this.ta.A(F)};ci.History=function(){ci.xJ.call(this,c.dA);
this.rQ=!0;this.akx=0};ci.History.prototype=new ci.xJ;ci.History.prototype.fM=function(n,F,O,I){O.T3=!0;
if(n.e=="h_itemchange"){if(n.index<O.ok)for(var e=O.ok;e>n.index;e--)this.cG(O);if(n.index>O.ok)for(var e=O.ok;
e<n.index;e++)this.pU(O)}if(n.e=="h_stepfwd")this.pU(O);if(n.e=="h_stepbck")this.cG(O);if(n.e=="h_undoredo"){var x=this.rQ||this.akx!=O.ok;
if(x){this.cG(O);x=!1}else{this.pU(O);x=!0}this.rQ=x;this.akx=O.ok}else this.rQ=!0};ci.History.prototype.cG=function(n){if(n.ok==0)return;
var F=n.history[n.ok];F.T.cQ(F.data,n);n.ok--};ci.History.prototype.pU=function(n){if(n.ok==n.history.length-1)return;
var F=n.history[n.ok+1];F.T.Xe(F.data,n);n.ok++};ci.ED=function(){ci.xJ.call(this,c.lo);this.ta=null};
ci.ED.prototype=new ci.xJ;ci.ED.prototype.fM=function(n,F,O,I,x){this.ta=F;var r=n.e,_=n.$!=null?n.$:O.C.length!=0?O.C[0]:O.t.length-1,d=O.t[_];
O._y=!0;if(r==K.vi&&O.N==null)r=K.bn;if(r==K.SG){var w=new hS([6,33],this),Z=d.Ja()?["pass"].concat(fk.Dy):fk.Dy,P=n.$!=null?[n.$]:O.C,C=JSON.stringify(P),W=[];
for(var e=0;e<P.length;e++)W.push(O.t[P[e]].mf);w.data={e:r,ha:C,cN:W,Qj:Z[n.Qj]};O.p$(w);this.Xe(w.data,O);
this.track(aV.a9("Md",{t:"enum",v:{BlnM:fk.Cs[n.Qj]}}))}if(r==K.nM){var w,v=O.mG(),P=n.$!=null?[n.$]:O.C,C=JSON.stringify(P);
if(v&&v.data&&v.data.e==r&&v.data.ha==C)w=v;else{var L=aV.a9("Opct",{t:"UntF",v:{type:"#Prc",val:0}});
this.track(L);var W=[];for(var e=0;e<P.length;e++)W.push(O.t[P[e]].opacity);w=new hS([6,32],this);w.data={e:r,ha:C,cN:W,Qj:n.Qj,MN:L.Mk};
O.p$(w)}w.data.Qj=n.Qj;w.data.MN.T.v.Opct.v.val=Math.round(n.Qj*100/255);this.Xe(w.data,O)}if(r==K.BM){if(d.add.iOpa==null)d.add.iOpa=255;
var w,v=O.mG();if(v&&v.data&&v.data.e==r&&v.data.$==_)w=v;else{w=new hS("Fill Opacity Change",this);
w.data={e:r,$:_,cN:d.add.iOpa,Qj:n.Qj};O.p$(w)}w.data.Qj=n.Qj;this.Xe(w.data,O)}if(r==K.ll){var H=n.Qj,y=n.$!=null?[n.$]:O.C.slice(0),g=[],Q=[],w;
for(var J=0;J<y.length;J++){var A=O.t[y[J]];if(A.add.lspf==null)A.add.lspf=0;var W=A.add.lspf,p=W;for(var e=0;
e<H[0].length;e++){var U=H[1][e],j=1<<U;if((p&j)==0&&H[0][e])p^=j;else if((p&j)!=0&&!H[0][e])p^=j}g.push(W);
Q.push(p)}var v=O.mG(),P=JSON.stringify(y);if(v&&v.data&&v.data.e==r&&JSON.stringify(v.data.ha)==P){w=v;
w.data.Qj=Q}else{var w=new hS([6,57,1],this);w.data={e:r,ha:P,cN:g,Qj:Q};O.p$(w)}this.Xe(w.data,O)}if(r==K.E9){var b="----",s=n.ag,p=null;
for(var e=0;e<fr.jN.$j.length;e++)if(d.add[fr.jN.$j[e]])b=fr.jN.$j[e];var G=d.add[b];if(s=="TySh")p=bt.Cc(50,50,x.tV);
var w=new hS("Layer Type",this);w.data={e:r,$:_,am0:[b,G],ag:[s,p]};O.p$(w);this.Xe(w.data,O)}if(r==K.V0){var y=[];
if(I.q(u.pI)){var T=O.mG(),z=T?T.data:null;if(T!=null&&T.T==this&&z.e==K.V0&&z.ha.length!=1){var m=new k(V.E.S);
m.T=c.dA;m.data={e:"h_stepbck"};F.A(m);if(z.$==_)return}var $=O.root.Dv(_),o=O.aV(null,_);while($.parent!=O.root){o.push($.parent.index);
$=$.parent}for(var e=0;e<O.t.length;e++){var h=O.t[e],X=h.Y9(),D=o.indexOf(e)!=-1;if(!D&&X)y.push(e);
if(e==_&&!X)y.push(e)}}else{y.push(_);var X=O.t[_].Y9(),L={oI:X?"hide":"show",Mk:{classID:X?"Hd":"Shw",null:{t:"VlLs",v:[aV.hd("Lyr",!0)]}}};
this.track(L)}var w=new hS("Layer visibility",this,!0);w.data={e:r,ha:y,$:_};O.p$(w);this.Xe(w.data,O)}if(r==K.Vp){var L={oI:"select",Mk:{classID:"null",MkVs:{t:"bool",v:!1}}},f,escape=!1;
if(O.a.o.join("")!="111"){O.a.o=[1,1,1];O.zB=!0}if(I.q(u.ep)||n.aln==0){var R=O.C.indexOf(_);if(R==-1)O.C.push(_);
else if(O.C.length>1)O.C.splice(R,1);O.C.sort(function(w,iy){return w-iy});L.Mk.selectionModifier={t:"enum",v:{selectionModifierType:"addToSelection"}};
f=_}else if(I.q(u.MQ)&&!I.q(u.pI)&&n.Co>0){r=n.Co==1?K.ub:n.Co==2?K.r4:K.Vd;escape=!0}else if((I.q(u.MQ)||n.aln==1)&&O.C.length>0){var i=Math.min(_,O.C[0]),t=Math.max(_,O.C[O.C.length-1]);
O.C=[];for(var e=i;e<=t;e++)if(O.t[e].add.lsct!=ho.bu)O.C.push(e);L.Mk.selectionModifier={t:"enum",v:{selectionModifierType:"addToSelectionContinuous"}};
f=_}else{f=_;var h=O.t[_];if(h&&h.Ja()&&n.ak0)h.add.lsct=ho.x7;else if(O.C.length==1&&O.C[0]==_&&n.Co==h.vE){return}O.C=[_];
O.Mu()}if(f!=null&&f<O.t.length){L.Mk.null={t:"obj ",v:[{t:"name",v:{classID:"Lyr",val:O.t[f].getName()}}]},this.track(L)}if(!escape){if(O.C.length==1){var N=O.C[0];
for(var e=0;e<O.t.length;e++){if(e==N)continue;var A=O.t[e];A.vE=0;A.qI=!1}var d=O.t[N];if(n.Co==2){d.qI=!d.qI;
O.f$=[]}else if(d){d.vE=n.Co<=0?0:n.Co;if(n.Co==1||n.Co==3){var M=n.Co==3?d.Fa(O).r:d.B1();M.wC=!1}}}else for(var e=0;
e<O.t.length;e++){var A=O.t[e];A.vE=0;A.qI=!1}O.a5=null;O.T3=!0}}if(r==K.ub||r==K.Vd){var hK=r==K.ub,M=hK?d.B1():d.Fa(O).r;
if(M==null)return;var w=new hS(M.isEnabled?hK?[6,15]:[6,42]:hK?[6,14]:[6,41],this);w.data={e:r,$:_};
O.p$(w);this.Xe(w.data,O)}if(r==K.r4){var M=d.add.vmsk;if(M==null)return;var w=new hS(M.isEnabled?[6,17]:[6,16],this);
w.data={e:r,$:_};O.p$(w);this.Xe(w.data,O)}if(r==K.d4){var bD=d.add.lsct==ho.x7?ho.OC:ho.x7;if(I.q(u.ep)){var co=O.root.Dv(O.t.indexOf(d)).parent;
for(var e=0;e<co.children.length;e++){var iM=co.children[e].$;if(iM.Ja())iM.add.lsct=bD}}else d.add.lsct=bD;
O.T3=!0}if(r==K.Eu){if(!O.ZP(_))return;var w=new hS(d.fc?[6,19]:[6,18],this);w.data={e:r,$:_};O.p$(w);
if(n.Qj==null||n.Qj!=d.fc)this.Xe(w.data,O);this.track({oI:"groupEvent",Mk:{classID:"GrpL",null:{t:"obj ",v:[aV.hd("Lyr",!0)]}}})}if(r==K.Xc){if(d.o_())d.Cq-=32;
else d.Cq+=32;O.T3=!0}if(r==K.AF||r==K.Rh){var w;if(r==K.AF)w=new hS(d.add.lmfx.masterFXSwitch.v?[6,30]:[6,29],this);
if(r==K.Rh)w=new hS(d.add.SoLd.filterFX.v.enab.v?[6,44]:[6,43],this);w.data={e:r,$:_};O.p$(w);this.Xe(w.data,O)}if(r==K.Uq||r==K.wg){var N=n.index,w;
if(r==K.Uq)w=new hS(d.add.lmfx[bW.jV[N[0]]].v[N[1]].v.enab.v?[6,30]:[6,29],this);if(r==K.wg)w=new hS(d.add.SoLd.filterFX.v.filterFXList.v[N].v.enab.v?[6,44]:[6,43],this);
w.data={e:r,$:_,index:n.index};O.p$(w);this.Xe(w.data,O)}if(r==K.Wh){if(n.src==n.BN)return;var hs=O.t[n.src],S=O.t[n.BN],a=hs.add.lmfx?JSON.stringify(hs.add.lmfx):"",bV=S.add.lmfx?JSON.stringify(S.add.lmfx):"";
if(S.add.lmfx==null){S.add.lmfx=JSON.parse(bW.default);for(var e=0;e<bW.order.length;e++)S.add.lmfx[bW.jV[e]]={t:"VlLs",v:[]}}if(n.h$==null){S.add.lmfx=JSON.parse(a);
if(!n.we)delete hs.add.lmfx}else{var a5=n.h$[0],i9=bW.jV[a5];if(bW.Ig.indexOf(bW.order[a5])==-1)S.add.lmfx[i9].v=[];
S.add.lmfx[i9].v.push(hs.add.lmfx[i9].v[n.h$[1]]);if(!n.we)hs.add.lmfx[i9].v.splice(n.h$[1],1)}var dG=hs.add.lmfx?JSON.stringify(hs.add.lmfx):"",ap=S.add.lmfx?JSON.stringify(S.add.lmfx):"";
if(!S.o_())S.Cq+=32;var w=new hS("Move Layer Styles",this);w.data={e:r,ak:n.src,oZ:n.BN,aby:a,a2H:bV,a4d:dG,a5_:ap};
O.p$(w);this.Xe(w.data,O)}if(r==K.vN){var A=O.t[n.src],bk=JSON.stringify(A.add.SoLd),c2=JSON.parse(bk),gg=c2.filterFX.v.filterFXList.v;
gg.splice(n.h$,1);var w=new hS([6,53],this);w.data={e:K.Vv,LO:[{GK:n.src,TD:[bk,JSON.stringify(c2)]}]};
O.p$(w);this.Xe(w.data,O)}if(r==K.Qp){var hs=O.t[n.src],S=O.t[n.BN],gw=[];if(hs!=S&&S.add.SoLd==null){alert("Target layer is not a smart object!");
return}if(hs==S&&!n.we&&(n.h$==n.aB||n.h$==-1))return;var gP=hs.Fa(O),bk=JSON.stringify(hs.add.SoLd),c2=JSON.parse(bk),gg=c2.filterFX.v.filterFXList.v;
if(hs==S){gg.splice(n.aB,0,gg[n.h$]);if(!n.we)gg.splice(n.h$+(n.h$<n.aB?0:1),1);gw.push({GK:n.src,TD:[bk,JSON.stringify(c2)]})}else if(n.h$==-1){var dT=c2.filterFX;
if(!n.we){delete c2.filterFX;gw.push({GK:n.src,TD:[bk,JSON.stringify(c2)],LX:[gP,null]})}var fU=S.z3()?S.Fa(O):null,dV=fj.je(gP),ac=JSON.stringify(S.add.SoLd),e2=JSON.parse(ac);
e2.placed.v=dV.id;e2.filterFX=dT;gw.push({GK:n.BN,TD:[ac,JSON.stringify(e2)],LX:[fU,dV]})}else{var cX=gg[n.h$];
if(!n.we){gg.splice(n.h$,1);gw.push({GK:n.src,TD:[bk,JSON.stringify(c2)]})}var ac=JSON.stringify(S.add.SoLd),e2=JSON.parse(ac);
if(e2.filterFX==null)e2.filterFX=bS.sN();var eR=e2.filterFX.v.filterFXList.v;eR.splice(n.aB,0,cX);var gR={GK:n.BN,TD:[ac,JSON.stringify(e2)]};
if(!S.z3()){var dV=fj.Mq(S.add.SoLd.placed.v);gR.LX=[null,dV]}gw.push(gR)}var w=new hS([6,52],this);
w.data={e:K.Vv,LO:gw};O.p$(w);this.Xe(w.data,O)}if(r==K.Ro){var M=d.B1(),w=new hS(M.Tu?[6,26]:[6,25],this);
w.data={e:r,$:_};O.p$(w);this.Xe(w.data,O);this.track({oI:"set",Mk:{classID:"setd",null:{t:"obj ",v:[aV.hd("Lyr",!0)]},T:{t:"Objc",v:{classID:"Lyr",Usrs:{t:"bool",v:M.Tu}}}}})}if(r==K.Gi){var M=d.add.vmsk,w=new hS(M.Tu?[6,28]:[6,27],this);
w.data={e:r,$:_};O.p$(w);this.Xe(w.data,O)}if(r==K.LA){var bN=[],w;for(var e=0;e<O.C.length;e++){var J=O.C[e],h=O.t[J];
if(h.add.vogk)bN.push(J,JSON.stringify(h.add.vogk))}for(var e=0;e<O.f$.length;e++){var J=O.f$[e],h=O.Hi[J];
if(h.add.vogk)bN.push(-1-J,JSON.stringify(h.add.vogk))}q.oK.ajO(O,n.I6,n.aib);var eG=[];for(var e=0;
e<O.C.length;e++){var J=O.C[e],h=O.t[J];if(h.add.vogk)eG.push(J,JSON.stringify(h.add.vogk))}for(var e=0;
e<O.f$.length;e++){var J=O.f$[e],h=O.Hi[J];if(h.add.vogk)eG.push(-1-J,JSON.stringify(h.add.vogk))}var v=O.mG();
if(v&&v.data&&v.data.e==r){var ef=!0;for(var e=0;e<bN.length;e+=2)if(bN[e]!=v.data.Es[e])ef=!1;if(ef){w=v;
w.data._l=eG}}if(w==null){var w=new hS([12,91,1],this);w.data={e:r,Es:bN,_l:eG};O.p$(w)}this.Xe(w.data,O)}if(r==K.yp){var w,v=O.mG();
if(v&&v.data&&v.data.e==r&&v.data.$==_){w=v;w.data._8=JSON.stringify(n._8)}if(w==null){var w=new hS("Editing Artboard",this);
w.data={e:r,$:_,a5h:JSON.stringify(d.add.artb),_8:JSON.stringify(n._8)};O.p$(w)}this.Xe(w.data,O)}if(r==K._a){var eG=O.TM.slice(0),fi=O.P4.slice(0),ep=O.N,iJ=O.N;
if(n.G1=="fromAction"){var aT=n.G.oI,dm=n.G.Mk;if(aT=="make"||aT=="duplicate"){var c1=eG.length,a8=!1,bX=!1;
if(O.rk())c1--;var gk=new K.FZ;gk.name="Alpha "+(c1+1);if(aT=="make"){var bL=dm.Nw.v;gk.color=255;fi=[c1];
gk.wC=!0;gk.aX=bL.Opct.v;if(bL.Nm)gk.name=bL.Nm.v;if(bL.classID=="SCch"){a8=!0;iJ=null;gk.j5=1}}else{var c_=dm.null.v[0].v;
if(c_.keyID=="fsel")a8=!0;else{var eS=c.pQ.aa(O);iJ=c.pQ.yE(O,eS);gk.color=0;gk.rect=iJ.rect;gk.channel=iJ.channel}}if(a8){gk.color=0;
if(O.N){gk.rect=O.N.rect.clone();gk.channel=O.N.channel.slice(0)}if(bX){gk.color=255-gk.color;q.uZ(gk.channel)}}eG.splice(c1,0,gk)}else if(aT=="delete"){var o=O.P4;
o.sort(function(w,iy){return iy-w});if(o.length==0)return;for(var e=0;e<o.length;e++)eG.splice(o[e],1);
fi=[]}else if(aT=="hide"){eG[fi[0]]=eG[fi[0]].clone();eG[fi[0]].wC=!1}}if(n.G1=="rnm"){eG[n.FI]=eG[n.FI].clone();
eG[n.FI].name=n.name}var w=new hS("Channel Edit",this);w.data={e:r,Es:O.TM.slice(0),$k:O.P4.slice(0),_l:eG,Wj:fi,xA:ep,pi:iJ};
this.Xe(w.data,O);O.p$(w)}if(r==K.a$){var w=new hS(n.WL,this);w.data={e:K.a$,ft:O.t.slice(0),Dn:n.Dn,Um:O.C.slice(0),tu:n.pi};
O.p$(w);this.Xe(w.data,O)}if(r==K.C9){var c$=O.aV(null,n.$),b_=1e10;if(c$.length==0)return;if(O.t.length==c$.length){alert("Project must have at least 1 layer");
return}var cp=[];for(var e=0;e<O.t.length;e++)if(c$.indexOf(e)==-1)cp.push(O.t[e]);for(var e=0;e<c$.length;
e++)b_=Math.min(b_,c$[e]);b_=Math.max(b_-1,0);while(cp[b_].name=="</Layer group>")b_++;this.track({oI:"delete",Mk:{classID:"Dlt",null:aV.hd("Lyr",!0)}});
var w=new hS([6,31],this);w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:[b_]};O.p$(w);this.Xe(w.data,O)}if(r==K.cb){var o=n.a21?n.a21:O.C,hy=0,d4=!1;
if(o.length==0)return;if(o.length==1&&O.t[o[0]].Z8==0){alert(hl.get([15,7,5]));return}var gx=[];for(var e=0;
e<O.t.length;e++){var eJ=O.t[e].Z8;gx.push(eJ);hy=Math.max(hy,eJ)}var cs=-1,en=-1;for(var e=0;e<o.length;
e++){var eJ=O.t[o[e]].Z8;if(eJ==0)d4=!0;else if(cs==-1||cs==eJ)cs=eJ;else en=eJ}if(!d4)for(var e=0;e<o.length;
e++)O.t[o[e]].Z8=0;else if(cs!=-1&&en==-1)for(var e=0;e<o.length;e++)O.t[o[e]].Z8=cs;else for(var e=0;
e<o.length;e++)O.t[o[e]].Z8=hy+1;var cm=[];for(var e=0;e<O.t.length;e++){var eJ=O.t[e].Z8;if(cm[eJ]==null)cm[eJ]=0;
cm[eJ]++}for(var e=0;e<O.t.length;e++){var eJ=O.t[e].Z8;if(cm[eJ]==1)O.t[e].Z8=0}var c5=gx;gx=[];for(var e=0;
e<O.t.length;e++){var eJ=O.t[e].Z8;gx.push(eJ);hy=Math.max(hy,eJ)}var w=new hS(d4?[6,54,0]:[6,54,1],this);
w.data={e:K.cb,alp:c5,ah$:gx};O.p$(w);this.Xe(w.data,O)}if(r==K.bn&&(n.$!=null||O.C.length!=0)||r==K.GB){var fK=O.QH(r==K.bn?n.$:_,null,n.a8K);
if(r==K.GB){var A=fK[0],aT=A.add.SoLd.Idnt.v,ez=O.V7(aT).clone();A.add.SoLd.Idnt.v=ez.D5=fj.Mj()+aT.slice(8);
O.add.lnk2.push(ez)}if(r==K.bn){var d6={oI:"duplicate",Mk:{classID:"null",null:aV.hd("Lyr",!0)}};if(n.I3){fK[0].V9(n.I3);
d6.Nm={t:"TEXT",v:n.I3}}this.track(d6);n.aa2=n.$}r=K.Cf;n.t=fK;n.Vg=O;n.NZ=O}if(r==K.Cf){var ee,c0,gq=n.Vg,ei=n.NZ;
if(gq!=ei){console.log("ADDLAYERS different projs");var ee=new gv(0,0,gq.d,gq.v),c0=new gv(0,0,ei.d,ei.v),d9=[],ge=[];
for(var e=0;e<n.t.length;e++){var A=n.t[e];if(A.add.SoLd==null)continue;var aT=A.add.SoLd.Idnt.v;if(d9.indexOf(aT)==-1){d9.push(aT);
ge.push(fj.Mj()+aT.slice(8))}A.add.SoLd.Idnt.v=ge[d9.indexOf(aT)];var gP=A.Fa(gq);if(gP){gq.Aw(gP);ei.ti(gP)}}if(d9.length>0){if(ei.add.lnk2==null)ei.add.lnk2=[];
for(var e=0;e<d9.length;e++){var iK=gq.V7(d9[e]),ez=iK.clone();ez.D5=ge[e];ei.add.lnk2.push(ez)}}}var ep=ei.C.slice(0);
ep.sort(function(w,iy){return w-iy});var cp=ei.t.slice(0),iJ=[],gu=-1;for(var e=0;e<ep.length;e++)gu=Math.max(gu,ep[e]);
if(n.aa2!=null)gu=n.aa2;gu++;for(var e=0;e<n.t.length;e++){var h=n.t[e];cp.splice(gu,0,h);iJ.push(gu);
gu++}if(n.t[n.t.length-1].Ja())iJ=[gu-1];var w=new hS([6,0],this);w.data={e:K.a$,ft:ei.t.slice(0),Dn:cp,Um:ep,tu:iJ};
ei.p$(w);this.Xe(w.data,ei)}if(r==K.J8){var eA=n.$!=null?[n.$]:O.aV(),cp=O.t.slice(0);for(var e=0;e<eA.length;
e++){var h=O.t[eA[e]].clone();h.zS(O);cp.splice(eA[e],1,h)}var w=new hS([6,8],this);w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:O.C.slice(0)};
O.p$(w);this.Xe(w.data,O)}if(r==K.pw){var cp=O.t.slice(0),h=cp[O.C[0]]=cp[O.C[0]].clone(),cE=h.add.lmfx,ad=0;
delete h.add.lmfx;var iU=q.f(h.rect.X());q.xg(h.buffer,iU,3);var eI=ha.gG(cE,null,iU,h.rect,O,h.rect).type;
for(var e=0;e<bW.order.length;e++){var d_=bW.order[e],c9=eI[d_],ek=e>7;for(var fX=0;fX<c9.length;fX++){var fo=c9[fX],P=O.Kv();
P.mf=fo.QP;P.opacity=Math.round(255*fo.Tb);P.fc=!ek;P.buffer=fo.zc;P.rect=fo.jC;P.rect.offset(h.rect.x,h.rect.y);
P.V9(h.getName()+"'s "+hl.get(bW.names[e]));cp.splice(O.C[0]+(ek?0:1),0,P);if(ek)ad++}}var w=new hS("Styles to Layers",this);
w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:[O.C[0]+ad]};O.p$(w);this.Xe(w.data,O)}if(r==K.FB){var eA=O.aV(),cp=O.t.slice(0),eY=new gv(0,0,O.d,O.v);
for(var e=0;e<eA.length;e++){var hG=O.t[eA[e]],aY=hG.Y9();hG.tt(!0);var gK=O.root.Dv(eA[e]);if(hG.Ja())continue;
if(gK==null)continue;var h=hG.clone();h.zS(O);var b$=gK.nJ(O,!0),c4=O.t;O.xc([hG]);O.D();O.nu();h.buffer=q.f(b$.X()*4);
q.nF(O.dH(),eY,h.buffer,b$);h.rect=b$;h.opacity=255;h.add.iOpa=255;h.mf="norm";h.D();h.KJ.hv=!0;O.xc(c4);
if(h.add.lmfx)delete h.add.lmfx;h.r=h.a8=null;cp.splice(eA[e],1,h);h.tt(aY);hG.tt(aY)}var w=new hS([6,34],this);
w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:O.C.slice(0)};O.p$(w);this.Xe(w.data,O)}if(r==K.Ds){var eA=O.aV(),cp=O.t.slice(0);
for(var e=0;e<eA.length;e++){var h=O.t[eA[e]],gA=h.add.TySh;if(gA==null)continue;var A=new h2(gA.Vb,x.sH),f7=q.z.Uh(cJ.qA(A,gA));
for(var aZ in f7){var cG=f7[aZ],iM=h.clone();delete iM.add.TySh;iM.Cq=iM.Cq|1<<4;iM.add.SoCo=JSON.parse(JSON.stringify(bW.BR[0]));
var bb=iM.add.SoCo.Clr.v;bb.Rd.v=parseInt(aZ.slice(1,3),16);bb.Grn.v=parseInt(aZ.slice(3,5),16);bb.Bl.v=parseInt(aZ.slice(5,7),16);
var dR=new K.X9;dR.b=q.z.rD(cG,!1);if(iM.add.vmsk!=null){iM.add.vmsk.a1r();dR.concat(iM.add.vmsk)}iM.add.vmsk=dR;
iM.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));iM.XO();iM.o3(O);cp.splice(cp.indexOf(h),0,iM)}cp.splice(cp.indexOf(h),1)}var iJ=O.C.slice(0);
for(var e=iJ.length-1;e>=0;e--)if(iJ[e]>=cp.length)iJ.splice(e,1);var w=new hS([6,40],this);w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:iJ};
O.p$(w);this.Xe(w.data,O)}if(r==K.GZ){var hD=O.C.length;if(hD<2){alert("Select two or more layers.");
return}if(!O.w1())return;var iM=O.t[O.C[0]].clone(),cp=[];for(var e=0;e<O.t.length;e++)if(O.C.indexOf(e)==-1)cp.push(O.t[e]);
cp.splice(O.C[0],0,iM);for(var e=1;e<hD;e++)if(O.t[O.C[e]].rect.X()>2e6){alert("Blended areas are too large.");
return}for(var e=1;e<hD;e++){var h=O.t[O.C[e]],hf=h.rect.clone();hf.EM(1,1);var iy=q.f(hf.X()*4);q.nF(h.buffer,h.rect,iy,hf);
iM.extend(hf);var e7=q.f(hf.X()*4);q.nF(iM.buffer,iM.rect,e7,hf);var w=q.f(hf.X());q.xg(iy,w,3);q.round(w,200);
q.GF(w,iy,3);q.p.F_("norm",iy,hf,e7,hf,hf,1);q.Mr.VY(e7,w,hf);q.nF(e7,hf,iM.buffer,iM.rect)}var w=new hS([2,10,0],this);
w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:[O.C[0]]};O.p$(w);this.Xe(w.data,O)}if(r==K.D4){var cp=O.t.slice(0),fi=O.C.slice(0);
for(var e=0;e<cp.length;e++){var h=cp[e],fv=h.add.vmsk;if(h.zX()&&fv&&h.add.vstk.strokeEnabled.v&&!h.add.vstk.fillEnabled.v){var hQ=fv.b,a4=0,hY=-1;
for(var fX=0;fX<hQ.length;fX++){if((hQ[fX].type==0||hQ[fX].type==3)&&hQ[fX].Xu!=-1){a4++;if(hQ[fX].type==3&&hY==-1){hQ[fX].sa=hQ[fX].Xu=1;
hY=fX}}}if(a4>1&&hY!=-1){console.log("separating an open path into a new layer");h=h.clone();fv=h.add.vmsk;
hQ=fv.b;var P=hQ[hY].length,ga=h.clone();ga.add.lyid=O.Xf();fv.b=hQ.slice(0,2).concat(hQ.slice(hY,hY+P+1));
fv.C=[];h.o3(O);h.D();var fQ=ga.add.vmsk.b;ga.add.vmsk.b=fQ.slice(0,hY).concat(fQ.slice(hY+P+1,fQ.length));
ga.add.vmsk.C=[];ga.o3(O);cp[e]=h;cp.splice(e+1,0,ga);for(var fX=0;fX<fi.length;fX++)if(fi[fX]>e)fi[fX]++;
var el=fi.indexOf(e);if(el!=-1){fi.splice(el+1,0,e+1)}}}}if(cp.length!=O.t.length){var w=new hS("Splitting open paths",this);
w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:fi};O.p$(w);this.Xe(w.data,O)}}if(r==K.tI){this.fM({e:K.D4},F,O,I,x);
var ep=O.C.slice(0),c4=O.t.slice(0),eA=O.aV();if(eA.length==0)return;O.uJ(eA,!1,n.ty);var w=new hS([6,36,0],this);
w.data={e:K.a$,ft:c4,Dn:O.t.slice(),Um:ep,tu:O.C.slice(0)};O.p$(w);this.Xe(w.data,O)}if(r==K.Za){var bk=d.add.SoLd;
if(bk==null)return;var aT=bk.Idnt.v,dX=O.V7(aT);dX.dH(!1);var cT=dX.yO[0],hf=dX.yO[1];if(q.Dd(cT)){alert("The smart object contains transparency.");
return}var bq=fx.rM("jpg").eJ([[cT.buffer]],hf.d,hf.v,[90]);this.fM({e:K.iD,KH:O,data:new Uint8Array(bq),id:aT,ty:"jpg"},F,O,I,x);
console.log(O.add);return}if(r==K.iD){var iK=n.KH.V7(n.id),ez=iK.clone();ez.raw=n.data;if(n.ty){ez.Z7="    ";
ez.he="    ";ez.fA=ez.fA+"."+n.ty}else{ez.Z7="8BIM";ez.he="8BPB";ez.fA=ez.fA+".psd"}ez.dH(!1);iK.dH(!1);
var w=new hS([6,36,1],this);w.data={e:K.iD,id:n.id,X5:iK,HR:ez};n.KH.p$(w);this.Xe(w.data,n.KH)}if(r==K.NR){var w=new hS([6,36,4],this);
w.data={e:r,$:_,ZN:d.add.SoLd.Impr.v.classID,Qj:n.Qj};O.p$(w);this.Xe(w.data,O)}if(r==K.vQ){var ea,eP;
if(n.Cx){ea=n.KH;eP=n.Cx}else{n.KH.lq();n.KH.tQ();n.KH.D();n.KH.nu();n.KH.dH();ea=fx.rM("PSD").eJ(n.KH,0,0,[!0,!0]);
eP=n.KH.name}if(!(ea instanceof ArrayBuffer))throw"e";ea=new Uint8Array(ea);var R=n.sO!=null?n.sO:O.C[O.C.length-1]+1,ds=O._C(ea,eP,0,0,!0),cp=O.t.slice(0);
cp.splice(R,0,ds);var w=new hS([6,36,2],this);w.data={e:K.a$,ft:O.t.slice(),Dn:cp,Um:O.C.slice(0),tu:[cp.indexOf(ds)]};
O.p$(w);this.Xe(w.data,O)}if(r==K.eO&&n.G1=="merge"){var c8=[],f$=O.root.children,fJ=0;for(var e=0;e<f$.length;
e++){var $=f$[e],h=$.$,gi=$.children,ar=!0;if(!h.Ja()||gi.length==0)continue;for(var fX=0;fX<gi.length;
fX++)if(!gi[fX].$.getName().startsWith("_a_")){ar=!1;break}if(ar)c8.push(O.t.indexOf(h))}var iP=[];for(var e=0;
e<c8.length;e++)if(O.C.indexOf(c8[e])!=-1)iP.push(c8[e]);if(iP.length>=2)c8=iP;if(c8.length<2){alert("At least two animation folders needed (whose layers start with \"_a_\").",3500);
return}var cx=[];for(var e=0;e<c8.length;e++)cx.push(O.t[c8[e]].getName());var c9=[];for(var gU=0;gU<c8.length;
gU++){var $=O.root.Dv(c8[gU]),gR=[[],[],0,gU];c9.push(gR);for(var e=0;e<$.children.length;e++){var J=$.children[e].index,h=$.children[e].$,gk=h.getName(),eF=20,cI=gk.split(",");
if(cI.length>1){var bZ=parseInt(cI.pop());if(!isNaN(bZ)&&bZ!=0)eF=bZ}gR[0].push(h);gR[1].push(eF);gR[2]+=eF}}c9.sort(function(w,iy){return iy[2]-w[2]});
var hL=c9[0],f2=hL[2];for(var eq=1;eq<c9.length;eq++){var gR=c9[eq],gC=1,b6=gR[1].slice(0),hi=0;while((gC+1)*gR[2]<=hL[2]){gC++;
b6=b6.concat(gR[1])}gR[1]=b6;gR[2]*=gC;var cw=hL[2]/gR[2];for(var e=0;e<gR[1].length;e++){var a0=Math.floor(gR[1][e]*cw);
gR[1][e]=a0;hi+=a0}while(hi<f2){hi++;gR[1][gR[1].length-1]++}gR[2]=hi}var gQ=[],fh=[],a0=[];for(var e=0;
e<c9.length;e++){gQ.push(0);fh.push(0)}while(fJ<f2){var cK=1e9,c1=-1;for(var e=0;e<c9.length;e++){var a2=c9[e][1],dx=gQ[e];
if(dx!=a2.length&&fh[e]+a2[dx]<fJ+cK){c1=e;cK=fh[e]+a2[dx]-fJ}}fh[c1]+=c9[c1][1][gQ[c1]];gQ[c1]++;if(cK!=0){a0.push(cK);
fJ+=cK}}for(var e=0;e<a0.length;e++){var dC=a0[e],a6=dC>>>1;if(dC<17){var J=a0.length-1;if(e==0)a0[1]+=dC;
else if(e==a0.length-1)a0[J-1]+=dC;else{a0[e-1]+=a6;a0[e+1]+=dC-a6}a0.splice(e,1);e--}}var aY=[],eY=new gv(0,0,O.d,O.v);
for(var e=0;e<O.t.length;e++){aY[e]=O.t[e].Y9();O.t[e].tt(!1)}var bw=O.C.slice(0);O.C=c8;var c$=O.aV();
c$.sort(function(w,iy){return w-iy});var cp=[];for(var e=0;e<O.t.length;e++){if(c$.indexOf(e)==-1)cp.push(O.t[e])}c9.sort(function(w,iy){return w[3]-iy[3]});
function aN(a2,dS){var e=0,cM=0;while(cM+a2[e]<=dS){cM+=a2[e];e++}return e}fJ=0;cp.splice(c$[0],0,O.VF());
for(var aq=0;aq<a0.length;aq++){var y=[];for(var e=0;e<c9.length;e++){var dx=aN(c9[e][1],fJ)%c9[e][0].length,h=c9[e][0][dx];
y.push(h)}var h=O.Kv();for(var e=0;e<c9.length;e++){var fc=y[e],co=O.t[c8[e]];fc.tt(!0);co.tt(!0)}O.D();
O.nu();var cT=O.dH();h.rect=q.Ww(cT,eY);h.buffer=q.f(h.rect.X()*4);q.nF(cT,eY,h.buffer,h.rect);for(var e=0;
e<c9.length;e++){var fc=y[e],co=O.t[c8[e]];fc.tt(!1);co.tt(!1)}h.tt(aq==0);h.V9("_a_frm"+aq+","+a0[aq]);
cp.splice(c$[0]+1+aq,0,h);fJ+=a0[aq]}var h=O.Kv();h.V9(cx.join(" + "));h.mf="pass";h.add.lsct=ho.OC;
h.Cq=24;cp.splice(c$[0]+1+a0.length,0,h);for(var e=0;e<O.t.length;e++)O.t[e].tt(aY[e]);var w=new hS([6,12,0],this);
w.data={e:K.a$,ft:O.t,Dn:cp,Um:bw,tu:[c$[0]+1+a0.length]};O.p$(w);this.Xe(w.data,O)}if(r==K.Vu||r==K.W9||r==K.gb){var c4=O.t.slice(0),ep=O.C.slice(0),bz=!0,ds,iJ;
if(r==K.Vu)O.C=[_,_-1];if(r==K.gb){O.C=[];for(var e=0;e<O.t.length;e++)if(O.t[e].Y9())O.C.push(e)}var eA=O.aV();
eA.sort(function(w,iy){return w-iy});var cj=new gv,eY=new gv(0,0,O.d,O.v);for(var e=0;e<eA.length;e++){var J=eA[e],h=O.t[J];
bz=bz&&h.zX()&&h.add.vmsk!=null;cj=cj.Tq(O.root.Dv(J).nJ(O,!0))}if(bz){ds=O.t[eA[0]].clone();var fv=ds.add.vmsk;
for(var e=1;e<eA.length;e++){var P=O.t[eA[e]],fQ=K.X9.jI(P.add.vmsk.b);fv.b=fv.b.concat(fQ.slice(2));
ds.add.vogk=ds.add.vogk.concat(JSON.parse(JSON.stringify(P.add.vogk)))}ds.add.vmsk.j8=!0;ds.o3(O)}else if(eY.zp(cj)){ds=O.Kv();
ds.V9(O.t[eA[eA.length-1]].getName());ds.rect=cj;ds.buffer=q.f(cj.X()*4);var d0=O.dH(eA);q.nF(d0,eY,ds.buffer,cj);
ds.D()}else{O.uJ(eA,!0);ds=O.t[O.C[0]];O.t.splice(O.C[0],1);var hx=O.V7(ds.add.SoLd.Idnt.v);O.add.lnk2.splice(O.add.lnk2.indexOf(hx),1);
delete ds.add.SoLd}var eM=I.q(u.pI),ba=-1;if(n.Mk&&n.Mk.Dplc&&n.Mk.Dplc.v)eM=!0;if(eM&&r==K.gb&&O.t[ep[0]].R9()&&O.t[ep[0]].rect.D2()){ba=ep[0];
ds.V9(O.t[ba].getName())}var cp=[];for(var e=0;e<O.t.length;e++)if(eM||eA.indexOf(e)==-1)if(e!=ba)cp.push(O.t[e]);
var hM=eA[eA.length-1],br=hM==O.t.length-1?null:O.t[hM+1],aA=br?cp.indexOf(br):cp.length;cp.splice(aA,0,ds);
iJ=[aA];var w=new hS([6,12,0],this);w.data={e:K.a$,ft:c4,Dn:cp,Um:ep,tu:iJ};O.p$(w);this.Xe(w.data,O)}if(r==K.BW){var iM=O.Kv();
iM.rect=new gv(0,0,O.d,O.v);iM.buffer=q.f(iM.rect.X()*4);q.IW(iM.buffer,4294967295);q.p.F_("norm",O.dH(),iM.rect,iM.buffer,iM.rect,iM.rect,1);
iM.V9("Background");iM.add.lspf=1<<2;var w=new hS([6,12,1],this);w.data={e:K.a$,ft:O.t.slice(),Dn:[iM],Um:O.C.slice(0),tu:[0]};
O.p$(w);this.Xe(w.data,O)}if(r==K.SP||r==K.DW||r==K.qu||r==K.LS||r==K.vi){var h=r==K.vi?O.t[O.C[0]].clone():O.Kv(),bR=hl.get([0,3]),et=n.I3,by=!1,au,dr;
if(r==K.qu)bR=hl.get([12,76,1]);if(r==K.vi){var hG=O.t[O.C[0]],iL=hG.Iw(O,O.N);if(iL==null){alert("Copied area is empty");
return}h.rect=iL.rect;h.buffer=iL.aN;h.zS(O)}if(r==K.LS){h.rect=ci.ED.s4(n.SS,O);h.buffer=n.SS.buffer.slice(0);
if(n.qG&&O.N){h.r=new K.FZ;h.r.rect=O.N.rect;h.r.color=0;h.r.channel=O.N.channel.slice(0)}}if(r==K.SP){this.track({oI:"make",Mk:{classID:"Mk",null:aV.hd("Lyr")}})}if(r==K.DW){h.Cq|=16;
var bF=n.Mk.Usng.v,cQ=bF.Type.v,dI=dK.BC[cQ.classID];bR=hl.get(dK.names[dI]);if(bF.Nm)et=bF.Nm.v;h.add[dI]=bS.tc(dI);
if(h.add[dI]==null)h.add[dI]={};for(var cH in cQ)h.add[dI][cH]=JSON.parse(JSON.stringify(cQ[cH]));h.r=ci.ED.bd(O)}if(r==K.qu){h.Cq|=16;
var dm=n.Mk,bF=dm.Usng.v,dE=bF.Type.v,i5=bF.Shp;if(i5==null){var bg=O.Y1(),f7=bg[0],b8=bg[1];if(b8.length!=0){var f4=f7[b8[0]].add;
h.add.vmsk=f4.vmsk.clone();h.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));h.add.vogk=JSON.parse(JSON.stringify(f4.vogk));
O.f$=[]}else h.r=ci.ED.bd(O)}else{console.log(bF);h.add.vmsk=new K.X9;h.add.vstk=JSON.parse(JSON.stringify(bF.strokeStyle?bF.strokeStyle.v:bW.uS.default));
h.add.vogk=[];if(i5){var aF=q.oK.tW(i5);if(aF){h.add.vogk=[aF];h.add.vmsk.b.push({type:0,Xu:1,length:0});
q.oK.df(h.add.vogk,h.add.vmsk)}else{i5=i5.v;var gH=i5.classID;if(gH=="Plgn"){var dQ=i5.Cntr.v,hU=i5.corner.v;
dQ=new aE(dQ.Hrzn.v.val,dQ.Vrtc.v.val);hU=new aE(hU.Hrzn.v.val,hU.Vrtc.v.val);h.add.vmsk.b=q.Y.jP.bC(dQ.x,dQ.y,Math.sqrt(hU.x*hU.x+hU.y*hU.y),Math.atan2(hU.y,hU.x),i5.sides.v,0)}else if(gH=="customShape"){var dJ=q.oK.og(i5),e9=dJ[2]-dJ[0],ht=dJ[3]-dJ[1],fe=x.zx,gh,hE;
for(var e=0;e<fe.length;e++)if(fe[e].lL==i5.Nm.v)gh=fe[e];if(gh){hE=K.X9.jI(gh.b);q.Y.gS(hE,new cD(e9,0,0,ht,dJ[0],dJ[1]))}else hE=q.Y.jP.Rect(dJ[0],dJ[1],e9,ht,0);
h.add.vmsk.b=hE}h.XO()}}}var f1={solidColorLayer:0,gradientLayer:1,patternLayer:2}[dE.classID],ic=["SoCo","GdFl","PtFl"][f1];
h.add[ic]=JSON.parse(JSON.stringify(bW.BR[f1]));ci.ED.KW(dE,h.add[ic],f1);if(i5==null)bR=hl.get([6,48,0,f1]);
if(ic=="PtFl")O.CI(ha.Yi(h.add[ic].Ptrn.v,x.a6));h.o3(O)}var hD=ci.ED.m0(O,bR+" ");h.V9(bR+" "+(hD+1));
if(et)h.V9(et);var eh=O.C.length==0?O.t.length-1:O.C[O.C.length-1],gz=O.t[eh];if(r==K.qu&&gz.R9()&&gz.rect.D2()){by=!0;
h.V9(gz.getName());au=eh}else{au=eh+1;if(gz&&gz.add.lsct==ho.x7)au--}if(n.acr)au=Math.max(0,au-1);var cp=O.t.slice(0);
cp.splice(au,by?1:0,h);var gO=[5,2];if(r==K.SP)gO=[6,13];if(r==K.DW)gO=[6,1];if(r==K.qu){gO=[6,48,1];
var i5=n.Mk.Usng.v.Shp;if(i5){var eo={Rctn:[10,32],Ln:[10,35],Elps:[10,33],Plgn:[12,93,0],customShape:[10,31]}[i5.v.classID];
if(eo)gO=eo}}if(r==K.vi){gO=[6,49]}if(r==K.vi||r==K.qu||r==K.LS)if(O.N)dr=[O.N,null];var w=new hS(gO,this);
w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:[au],MJ:dr};O.p$(w);this.Xe(w.data,O);if(r==K.qu&&i5==null&&f1!=0||r==K.DW){var df=new k(V.E.P);
df.data={e:V.U.dn,cU:aM.Qu.D_};F.A(df)}}if(r==K.R1){var h=O.Kv();h.V9(hl.get([0,4])+" "+O.t.length);
h.mf="pass";h.add.lsct=ho.x7;h.Cq=24;var bu=O.VF(),eh=_,au=eh+1,cp=O.t.slice(0);cp.splice(au,0,bu,h);
var w=new hS([6,20],this);w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:[au+1]};O.p$(w);this.Xe(w.data,O)}if(r==K.sV||r==K.qU){var e8=r==K.sV?n.source:O.C[0],eT,dA,h9=O.C.indexOf(e8)!=-1,fE=I.q(u.pI)|n.ama,dc;
if(h9)dc=O.aV();else dc=O.pO(e8);dc.sort(function(w,iy){return w-iy});if(r==K.sV){eT=n.target;dA=n.q4>.5}else if(n.target!=null){eT=n.target;
dA=!0;O.wD=!0}else{var ce=n.G1;dA=ce>1;if(ce==0){eT=O.t.length-1}if(ce==1){eT=dc[dc.length-1]+1;var P=O.pO(eT);
if(P.indexOf(e8)==-1)eT+=P.length-1}if(ce==2){eT=dc[0]-1;var P=O.pO(eT);if(P.indexOf(e8)==-1)eT-=P.length-1}if(ce==3){eT=0}if(eT<0||eT>O.t.length-1)return;
O.wD=!0}if(dc.indexOf(eT)!=-1&&!fE)return;var a9=O.t[eT],cp=[];if(fE)cp=O.t.slice(0);else for(var e=0;
e<O.t.length;e++)if(dc.indexOf(e)==-1)cp.push(O.t[e]);var bE=cp.indexOf(a9);if(r==K.sV&&a9.Ja()&&a9.add.lsct==ho.OC&&n.q4>.8)bE-=O.pO(eT).length-1;
var gb=[],ai=fE?O.QH(h9?null:e8):null;for(var e=0;e<dc.length;e++){var ao=bE+(dA?0:1)+e,A=fE?ai[e]:O.t[dc[e]];
cp.splice(ao,0,A);gb.push(ao)}var w=new hS(fE?[6,0]:[6,35],this);w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:gb};
O.p$(w);this.Xe(w.data,O);var dm={classID:"move",null:aV.hd("Lyr",!0),T:{t:"obj ",v:[{t:"indx",v:{classID:"Lyr",val:bE+(dA?0:1)}}]},Adjs:{t:"bool",v:!1},Vrsn:{t:"long",v:5},Dplc:{t:"long",v:fE}};
this.track({oI:"move",Mk:dm})}if(r==K.dd){if(n.DF){if(d==null||!d.Ja())return;var $=O.root.Dv(_),i4=O.t.indexOf($.adz),cp=O.t.slice(0);
cp.splice(_,1);cp.splice(i4,1);var fi=[];for(var e=i4;e<_-1;e++)fi.push(e);var w=new hS("Ungroup Layers",this);
w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:fi};O.p$(w);this.Xe(w.data,O)}else{var h=O.Kv(),cC=hl.get([0,4])+" ";
h.V9(cC+(ci.ED.m0(O,cC)+1));h.mf="pass";if(n.I3)h.V9(n.I3);h.add.lsct=O.C.length==1?ho.x7:ho.OC;h.Cq=24;
var bu=O.VF(),dc=O.aV();if(dc.length==0)return;dc.sort(function(w,iy){return w-iy});var cp=[];for(var e=0;
e<O.t.length;e++)if(dc.indexOf(e)==-1)cp.push(O.t[e]);var eh=O.C[O.C.length-1]-dc.length;cp.splice(eh+1,0,bu);
for(var e=0;e<dc.length;e++)cp.splice(eh+2+e,0,O.t[dc[e]]);cp.splice(eh+2+dc.length,0,h);var w=new hS([6,9],this);
w.data={e:K.a$,ft:O.t.slice(0),Dn:cp,Um:O.C.slice(0),tu:[cp.indexOf(h)]};O.p$(w);this.Xe(w.data,O);var L={oI:"make",Vw:!0};
L.Mk={classID:"Mk",null:aV.hd("layerSection"),From:aV.hd("Lyr",!0),Usng:{t:"Objc",v:{classID:"layerSection",Nm:{t:"TEXT",v:h.getName()}}}};
this.track(L)}}if(r==K.ed){if(O.C.length!=1)return;var R=O.C[0],eH=I.q(u.pI);if(O.t[R].B1()==null){r=K.al;
n.Lj=O.N?!eH?"RvlS":"HdSl":!eH?"RvlA":"HdAl"}else r=K.jc}if(r==K.al){if(O.C.length!=1)return;var R=O.C[0],h=O.t[R];
if(h.add.vmsk&&h.r==null)h.o3(O);var cv=h.B1();if(cv==null||n.aoy){var w=new hS([6,21],this),dN=new K.FZ,b5=n.Lj,cr=b5=="RvlS"||b5=="HdSl";
if(b5=="RvlS"||b5=="HdAl"||b5=="Trns")dN.color=0;if(cr){dN.channel=O.N.channel.slice(0);dN.rect=O.N.rect.clone();
if(b5=="HdSl")q.uZ(dN.channel)}if(b5=="Trns"){dN.rect=h.rect.clone();dN.channel=q.f(h.rect.X());q.xg(h.buffer,dN.channel,3)}w.data={e:r,$:R,r:dN,K2:cv,MJ:cr?[O.N,null]:null};
O.p$(w);this.Xe(w.data,O);O.t[R].vE=1;this.track({oI:"make",Mk:{__name:"Make",classID:"Mk",Nw:{t:"type",v:{classID:"Chnl"}},At:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:"Msk"}}]},Usng:{t:"enum",v:{UsrM:b5}}}})}}else if(r==K._K){var hs=O.t[n.src],S=O.t[n.BN];
if(S.B1())return;var w=new hS([6,21],this),dN=hs.B1();if(n.we){var dR=dN.clone();w.data={e:K.al,$:n.BN,r:dR};
if(I.q(u.MQ)){q.uZ(dR.channel);dR.color=255-dR.color}}else{w.data={e:r,src:n.src,BN:n.BN,r:dN}}O.p$(w);
this.Xe(w.data,O)}if(r==K.ad){if(O.C.length!=1)return;var R=_;if(O.t[R].B1()!=null){var w=new hS([6,22],this);
w.data={e:r,$:R,r:O.t[R].B1()};O.p$(w);this.Xe(w.data,O)}}if(r==K.v2){var c4=O.t.slice(0),iM=d.clone(),d8=iM.B1();
q.oh(d8.Uz(iM.rect),iM.rect,iM.buffer,iM.rect);ci.ED.YK(O,iM);O.t[O.C[0]]=iM;var w=new hS([5,8],this);
w.data={e:K.a$,ft:c4,Dn:O.t.slice(),Um:O.C.slice(0),tu:O.C.slice(0)};O.p$(w);this.Xe(w.data,O)}if(r==K.jo){if(O.C.length!=1)return;
var R=O.C[0];if(O.t[R].Fa(O).r==null){var w=new hS([6,45],this);w.data={e:r,$:R,r:new K.FZ};O.p$(w);
this.Xe(w.data,O)}}if(r==K.jM){if(O.C.length!=1)return;var R=O.C[0];if(O.t[R].Fa(O).r!=null){var w=new hS([6,46],this);
w.data={e:r,$:R,r:O.t[R].Fa(O).r};O.p$(w);this.Xe(w.data,O)}}if(r==K.r_){if(n.$==null&&O.C.length!=1)return;
if(O.t[_].z3()){var w=new hS([6,47],this),bk=JSON.stringify(O.t[_].add.SoLd),c2=JSON.parse(bk);delete c2.filterFX;
w.data={e:K.Vv,LO:[{GK:_,TD:[bk,JSON.stringify(c2)],LX:[O.t[_].Fa(O),null]}]};O.p$(w);this.Xe(w.data,O)}}if(r==K.jc){if(O.C.length!=1)return;
if(d.add.vmsk==null){var w=new hS([6,23],this),hQ=O.Y1(),o=hQ[1],hQ=hQ[0],dN,aF;if(n.ao4&&o.length!=0){var f4=hQ[o[0]].add;
dN=f4.vmsk.clone();aF=f4.vogk}else{dN=new K.X9;aF=[];dN.b[1].all=n.abu?0:1}w.data={e:r,$:_,ko:!0,r:dN,oK:JSON.stringify(aF),uS:null};
if(d.zX()){w.data.uS=JSON.stringify(bW.uS.default)}O.p$(w);this.Xe(w.data,O)}}if(r==K._2){var hs=O.t[n.src],S=O.t[n.BN];
if(S.add.vmsk)return;var w=new hS([6,23],this),fv=hs.add.vmsk;w.data={$:n.BN,ko:hs.qI,r:fv.clone(),oK:JSON.stringify(hs.add.vogk),uS:hs.add.vstk?JSON.stringify(hs.add.vstk):null};
if(n.we){w.data.e=K.jc}else{w.data.e=r;w.data.src=n.src;w.data.BN=n.BN}O.p$(w);this.Xe(w.data,O)}if(r==K.$t){if(O.C.length!=1)return;
var h=O.t[_],fv=h.add.vmsk;if(fv!=null){var w=new hS([6,24],this);w.data={e:r,$:_,ko:h.qI,r:fv,oK:JSON.stringify(h.add.vogk),uS:h.add.vstk?JSON.stringify(h.add.vstk):null};
O.p$(w);this.Xe(w.data,O)}}if(r==K.Gq){var w=new hS("Metadata",this);w.data={e:r,gX:JSON.stringify(O.aC),WR:JSON.stringify(n.WR)};
O.p$(w);this.Xe(w.data,O)}if(r==K.fD){var gn=n.BN?n.BN:O,ab=gn.name,et=n.G+".psd";if(ab==et)return;var w=new hS([6,37],this);
w.data={e:r,a4v:ab,I3:et};if(n.ag5!=!0)gn.p$(w);this.Xe(w.data,gn)}if(r==K.eO&&n.G1=="makeframes"){var cF=[];
for(var e=0;e<O.C.length;e++){var J=O.C[e],h=O.t[J],hp=h.getName();if(hp.startsWith("_a_")||h.add.lsct==ho.bu)continue;
cF.push([J,hp,"_a_"+hp,h.add.lnsr,null])}var w=new hS([6,37],this);w.data={e:K.UF,b9:cF};O.p$(w);this.Xe(w.data,O)}if(r==K.UF){var ab=d.getName(),et=n.name.substring(0,255);
if(ab==et)return;var w=new hS([6,37],this);w.data={e:r,b9:[[_,ab,et,d.add.lnsr,null]]};O.p$(w);this.Xe(w.data,O);
this.track(aV.a9("Nm",{t:"TEXT",v:et}))}if(r==K.OZ){var hB=O.aV(),cZ=[],g7=[];for(var e=0;e<hB.length;
e++){cZ.push(O.t[hB[e]].add.lclr);g7.push(n.a5Y)}var w=new hS([6,38],this);w.data={e:r,t:hB,ac9:cZ,ae_:g7};
O.p$(w);this.Xe(w.data,O)}if(r==K.WP){var w=O.history[O.ok];if(w!=null&&w.T==this&&w.data.e==r&&w.data.$==n.UP&&w.data.Qj.jx==n.a0.jx)w.data.Qj=n.a0;
else{w=new hS("Mask Density / Feather",this);w.data={e:r,$:n.UP,ZN:O.t[n.UP].oP(n.a0.jx),Qj:n.a0};O.p$(w)}this.Xe(w.data,O)}if(r==K.i8){var cY=JSON.stringify(n.G),iS=JSON.parse(cY),w=O.history[O.ok];
if(w!=null&&w.T==this&&w.data.e==r&&w.data.BP==n.BP&&w.data.ha.join(",")==n.ha.join(",")){for(var e=0;
e<n.ha.length;e++)w.data.ry[e]=iS;if(w.data.Mk&&iS.he!=0)ci.ED.KW(iS.Gk,w.data.Mk.T.v,iS.he-1)}else{w=new hS([11,6],this);
w.data={e:r,ha:n.ha,BP:n.BP,aka:[],ry:[]};var hJ=!1;for(var e=0;e<n.ha.length;e++){var J=n.ha[e],h=O.t[J],gF=n.BP?c.M2.n3(O,J):JSON.parse(JSON.stringify(h.add.vstk));
w.data.aka.push(gF);w.data.ry.push(iS);if(JSON.stringify(gF)!=cY)hJ=!0}if(!hJ)return;O.p$(w);if(n.BP&&iS.he>0){var dm=w.data.Mk={classID:"setd",null:aV.hd("contentLayer",!0),T:{t:"Objc",v:{}}},ic=["SoCo","GdFl","PtFl"][iS.he-1];
ci.ED.KW(iS.Gk,dm.T.v,iS.he-1);this.track({oI:"set",Mk:dm})}}if(n.BP&&iS.he==3)O.CI(ha.Yi(iS.Gk.Ptrn.v,x.a6));
if(!n.BP){var hN=iS.strokeStyleContent.v;if(hN.classID==bW.uS.Ul[2])O.CI(ha.Yi(hN.Ptrn.v,x.a6))}this.Xe(w.data,O)}};
ci.ED.KW=function(n,F,O){var I=[bW.ez,bW.KK,bW.dC][O];if(F.classID==null)F.classID=["solidColorLayer","gradientLayer","patternLayer"][O];
for(var e=0;e<I.length;e++)if(n[I[e]])F[I[e]]=JSON.parse(JSON.stringify(n[I[e]]))};ci.ED.bd=function(n){var F=new K.FZ;
if(n.N!=null){F.color=0;F.channel=n.N.channel.slice(0);F.rect=n.N.rect.clone()}return F};ci.ED.xH=function(n,F,O,I){var x=I.d/O.d,r=I.v/O.v,_=I.d/2,d=I.v/2,w=q.z.om(I).H;
for(var e=0;e<n.t.length;e++){var Z=n.t[e],P=Z.add.SoLd;if(P==null||P.Idnt.v!=F)continue;if(x!=1||r!=1){var C=c.V.ns(P.nonAffineTransform),W=q.J.N5(C,I),v=new cD;
v.translate(-_,-d);v.scale(x,r);v.translate(_,d);var L=q.J.NM(W,q.J.EC(v)),H=w.slice(0);q.J.m(L,H);P.Trnf=c.V.uB(H);
P.nonAffineTransform=c.V.uB(H)}Z.aY(n)}n.D()};ci.ED.akt=function(n,F,O){F.color=255-F.color;q.uZ(F.channel);
F.j8=!0;n.o3(O);O.D()};ci.ED.prototype.cQ=function(n,F){var O=n.e,I=F.t[n.$];F._y=!0;if(O==K.iD){F.add.lnk2.splice(F.add.lnk2.indexOf(n.HR),1,n.X5);
ci.ED.xH(F,n.id,n.HR.yO[1],n.X5.yO[1])}if(O==K.NR){I.add.SoLd.Impr.v.classID=n.ZN;I.aY(F)}if(O==K.SG){var x=JSON.parse(n.ha);
for(var e=0;e<x.length;e++)F.t[x[e]].mf=n.cN[e];F.D()}if(O==K.nM){var x=JSON.parse(n.ha);for(var e=0;
e<x.length;e++)F.t[x[e]].opacity=n.cN[e];F.D()}if(O==K.ll){var x=JSON.parse(n.ha);for(var e=0;e<x.length;
e++)if(F.t[x[e]].add.lsct!=ho.bu)F.t[x[e]].add.lspf=n.cN[e]}if(O==K.E9){var r=n.ag,_=n.am0;delete I.add[r[0]];
if(_[0]!="----")I.add[_[0]]=_[1]}if(O==K.BM){I.add.iOpa=n.cN;F.D()}if(O==K.V0){for(var e=0;e<n.ha.length;
e++){var d=F.t[n.ha[e]];d.tt(!d.Y9())}F.D()}if(O==K.ub){var w=I.B1();w.isEnabled=!w.isEnabled;I.o3(F);
F.D()}if(O==K.Vd){var w=I.Fa(F).r;w.isEnabled=!w.isEnabled;I.D();F.D()}if(O==K.r4){var w=I.add.vmsk;
w.isEnabled=!w.isEnabled;if(!w.isEnabled){if(I.a8){I.r=I.a8;I.a8=null}else I.r=null}else if(I.r){I.a8=I.r;
I.r=null}I.o3(F);F.D()}if(O==K.Eu){I.fc=!I.fc;F.D()}if(O==K.AF){I.add.lmfx.masterFXSwitch.v=!I.add.lmfx.masterFXSwitch.v;
I.KJ.hv=!0;F.D()}if(O==K.Rh){I.add.SoLd.filterFX.v.enab.v=!I.add.SoLd.filterFX.v.enab.v;I.eU(F);F.D()}if(O==K.Uq){var Z=n.index,P=I.add.lmfx[bW.jV[Z[0]]].v[Z[1]].v;
P.enab.v=!P.enab.v;I.KJ.hv=!0;F.D()}if(O==K.Wh){var C=F.t[n.ak],W=F.t[n.oZ],v=n.aby,L=n.a2H;if(v=="")delete C.add.lmfx;
else C.add.lmfx=JSON.parse(v);if(L=="")delete W.add.lmfx;else W.add.lmfx=JSON.parse(L);C.KJ.hv=!0;W.KJ.hv=!0;
F.D()}if(O==K.wg){var H=I.add.SoLd.filterFX.v.filterFXList.v[n.index].v;H.enab.v=!H.enab.v;I.eU(F);F.D()}if(O==K.Y5){I.add.SoLd.filterFX.v=JSON.parse(JSON.stringify(n.a8V));
I.eU(F);F.D()}if(O==K.Ro){var w=I.B1();w.Tu=!w.Tu}if(O==K.Gi){var w=I.add.vmsk;w.Tu=!w.Tu}if(O==K.LA){var y=n.Es;
for(var e=0;e<y.length;e+=2){var g=y[e],d=g>=0?F.t[g]:F.Hi[-1-g];d.add.vogk=JSON.parse(y[e+1]);q.oK.df(d.add.vogk,d.add.vmsk);
if(g>=0)d.o3(F)}F.D()}if(O==K.yp){I.add.artb=JSON.parse(n.a5h);F.D()}if(O==K._a){F.N=n.xA;F.TM=n.Es.slice(0);
F.P4=n.$k.slice(0);F.zB=F.T3=!0}if(O==K.cb){var Q=n.alp;for(var e=0;e<Q.length;e++)F.t[e].Z8=Q[e]}if(O==K.a$){if(n.Um)F.C=n.Um;
if(n.MJ)F.N=n.MJ[0];F.a5=null;F.D();F.xc(n.ft)}if(O==K.al){ci.ED.YK(F,I);if(n.K2)ci.ED.Tl(F,I,n.K2);
if(n.MJ){var J=n.MJ[0];if(J==null)delete F.N;else F.N=J}}if(O==K._K){ci.ED.YK(F,F.t[n.BN]);ci.ED.Tl(F,F.t[n.src],n.r)}if(O==K.ad){ci.ED.Tl(F,I,n.r)}if(O==K.jo){I.Fa(F).r=null;
I.D();F.D()}if(O==K.jM){I.Fa(F).r=n.r;I.D();F.D()}if(O==K.Vv){ci.ED.Zd(F,n.LO,0)}if(O==K.jc){ci.ED.N1(F,I,!0)}if(O==K._2){ci.ED.N1(F,F.t[n.BN],n.r.isEnabled);
ci.ED.vV(F,F.t[n.src],n)}if(O==K.$t){ci.ED.vV(F,I,n)}if(O==K.Gq){F.aC=JSON.parse(n.gX)}if(O==K.fD){F.name=n.a4v}if(O==K.UF){for(var e=0;
e<n.b9.length;e++){var A=n.b9[e],d=F.t[A[0]];d.V9(A[1]);if(A[3])d.add.lnsr=A[3];else delete d.add.lnsr}}if(O==K.OZ){for(var e=0;
e<n.t.length;e++)F.t[n.t[e]].add.lclr=n.ac9[e]}if(O==K.i8){var p=n.aka;for(var e=0;e<n.ha.length;e++){var d=F.t[n.ha[e]],U=p[e];
if(!n.BP)d.add.vstk=JSON.parse(JSON.stringify(U));else c.M2.pK(d,JSON.parse(JSON.stringify(U)));d.$u(F)}F.D()}if(O==K.WP){I.QZ(n.ZN);
I.o3(F);F.D()}F.T3=!0};ci.ED.prototype.Xe=function(n,F){var O=n.e,I=F.t[n.$];F._y=!0;if(O==K.iD){F.add.lnk2.splice(F.add.lnk2.indexOf(n.X5),1,n.HR);
ci.ED.xH(F,n.id,n.X5.yO[1],n.HR.yO[1])}if(O==K.NR){I.add.SoLd.Impr.v.classID=n.Qj;I.aY(F)}if(O==K.SG){var x=JSON.parse(n.ha);
for(var e=0;e<x.length;e++)F.t[x[e]].mf=n.Qj;F.D()}if(O==K.nM){var x=JSON.parse(n.ha);for(var e=0;e<x.length;
e++)F.t[x[e]].opacity=n.Qj;F.D()}if(O==K.ll){var x=JSON.parse(n.ha);for(var e=0;e<x.length;e++)if(F.t[x[e]].add.lsct!=ho.bu)F.t[x[e]].add.lspf=n.Qj[e]}if(O==K.E9){var r=n.am0,_=n.ag;
delete I.add[r[0]];if(_[0]!="----")I.add[_[0]]=_[1]}if(O==K.BM){I.add.iOpa=n.Qj;F.D()}if(O==K.V0){for(var e=0;
e<n.ha.length;e++){var d=F.t[n.ha[e]];d.tt(!d.Y9())}F.D()}if(O==K.ub){var w=I.B1();w.isEnabled=!w.isEnabled;
I.o3(F);F.D()}if(O==K.Vd){var w=I.Fa(F).r;w.isEnabled=!w.isEnabled;I.D();F.D()}if(O==K.r4){var w=I.add.vmsk;
w.isEnabled=!w.isEnabled;if(!w.isEnabled){if(I.a8){I.r=I.a8;I.a8=null}else I.r=null}else if(I.r){I.a8=I.r;
I.r=null}I.o3(F);F.D()}if(O==K.Eu){I.fc=!I.fc;F.D()}if(O==K.AF){I.add.lmfx.masterFXSwitch.v=!I.add.lmfx.masterFXSwitch.v;
I.KJ.hv=!0;F.D()}if(O==K.Rh){I.add.SoLd.filterFX.v.enab.v=!I.add.SoLd.filterFX.v.enab.v;I.eU(F);F.D()}if(O==K.Uq){var Z=n.index,P=I.add.lmfx[bW.jV[Z[0]]].v[Z[1]].v;
P.enab.v=!P.enab.v;I.KJ.hv=!0;F.D()}if(O==K.Wh){var C=F.t[n.ak],W=F.t[n.oZ],v=n.a4d,L=n.a5_;if(v=="")delete C.add.lmfx;
else C.add.lmfx=JSON.parse(v);if(L=="")delete W.add.lmfx;else W.add.lmfx=JSON.parse(L);C.KJ.hv=!0;W.KJ.hv=!0;
F.D()}if(O==K.wg){var H=I.add.SoLd.filterFX.v.filterFXList.v[n.index].v;H.enab.v=!H.enab.v;I.eU(F);F.D()}if(O==K.Y5){I.add.SoLd.filterFX.v=JSON.parse(JSON.stringify(n.a1G));
I.eU(F);F.D()}if(O==K.Ro){var w=I.B1();w.Tu=!w.Tu}if(O==K.Gi){var w=I.add.vmsk;w.Tu=!w.Tu}if(O==K.LA){var y=n._l;
for(var e=0;e<y.length;e+=2){var g=y[e],d=g>=0?F.t[g]:F.Hi[-1-g];d.add.vogk=JSON.parse(y[e+1]);q.oK.df(d.add.vogk,d.add.vmsk);
if(g>=0)d.o3(F)}F.D()}if(O==K.yp){I.add.artb=JSON.parse(n._8);F.D()}if(O==K._a){F.N=n.pi;F.TM=n._l.slice(0);
F.P4=n.Wj.slice(0);F.zB=F.T3=!0}if(O==K.cb){var Q=n.ah$;for(var e=0;e<Q.length;e++)F.t[e].Z8=Q[e]}if(O==K.a$){var J=n.Dn,A=0,p;
for(var e=0;e<J.length;e++){var d=J[e],U=d.add.lsct;if(U==ho.bu)A++;else if(U==ho.x7||U==ho.OC)A--;if(d.add.artb&&A!=0)p="Artboards can not be inside folders."}if(p){F.history.pop();
F.ok--;alert(p);return}if(n.tu)F.C=n.tu;if(n.MJ)F.N=n.MJ[1];F.a5=null;F.D();F.xc(n.Dn)}if(O==K.al){if(n.K2)ci.ED.YK(F,I);
ci.ED.Tl(F,I,n.r);if(n.MJ){var j=n.MJ[1];if(j==null)delete F.N;else F.N=j}}if(O==K._K){ci.ED.YK(F,F.t[n.src]);
ci.ED.Tl(F,F.t[n.BN],n.r)}if(O==K.ad){ci.ED.YK(F,I)}if(O==K.jo){I.Fa(F).r=n.r;I.vE=0;I.D();F.D()}if(O==K.jM){I.Fa(F).r=null;
I.vE=0;I.D();F.D()}if(O==K.Vv){ci.ED.Zd(F,n.LO,1)}if(O==K.jc){ci.ED.vV(F,I,n)}if(O==K._2){ci.ED.N1(F,F.t[n.src],n.r.isEnabled);
ci.ED.vV(F,F.t[n.BN],n)}if(O==K.$t){ci.ED.N1(F,I,n.r.isEnabled)}if(O==K.Gq){F.aC=JSON.parse(n.WR)}if(O==K.fD){F.name=n.I3}if(O==K.UF){for(var e=0;
e<n.b9.length;e++){var b=n.b9[e],d=F.t[b[0]];d.V9(b[2]);if(b[4])d.add.lnsr=b[4];else delete d.add.lnsr}}if(O==K.OZ){for(var e=0;
e<n.t.length;e++)F.t[n.t[e]].add.lclr=n.ae_[e]}if(O==K.i8){var s=n.ry;for(var e=0;e<n.ha.length;e++){var d=F.t[n.ha[e]],G=s[e];
if(!n.BP)d.add.vstk=JSON.parse(JSON.stringify(G));else c.M2.pK(d,JSON.parse(JSON.stringify(G)));d.$u(F)}F.D()}if(O==K.WP){I.QZ(n.Qj);
I.o3(F);F.D()}F.T3=!0};ci.ED.m0=function(n,F){var O=0;for(var e=0;e<n.t.length;e++){var I=n.t[e].getName();
if(I.startsWith(F)){var x=I.slice(F.length).trim(),r=parseInt(x);if(!isNaN(r)&&r+""==x)O=r}}return O};
ci.ED.Zd=function(n,F,O){for(var e=0;e<F.length;e++){var I=F[e],x=n.t[I.GK];if(I.TD){x.add.SoLd=JSON.parse(I.TD[O])}if(I.LX){if(I.LX[1-O]!=null)n.Aw(I.LX[1-O]);
if(I.LX[O]!=null)n.ti(I.LX[O]);else x.vE=0}x.aY(n)}};ci.ED.s4=function(n,F){var O=n.oq,I=n.rect.clone();
if(O!=null&&(O.x!=F.d||O.y!=F.v)){I.x=Math.floor((F.d-I.d)/2);I.y=Math.floor((F.v-I.v)/2)}return I};
ci.ED.YK=function(n,F){if(F.a8)F.a8=null;else F.r=null;F.o3(n);n.D();F.vE=0};ci.ED.Tl=function(n,F,O){if(F.r)F.a8=O;
else F.r=O;F.o3(n);n.D()};ci.ED.N1=function(n,F,O){if(F.a8&&O){F.r=F.a8;F.a8=null}else if(F.r&&O){F.r=null}delete F.add.vogk;
delete F.add.vstk;delete F.add.vmsk;F.o3(n);F.qI=!1;n.a5=[];n.D()};ci.ED.vV=function(n,F,O){F.add.vogk=JSON.parse(O.oK);
if(O.uS)F.add.vstk=JSON.parse(O.uS);else delete F.add.vstk;F.add.vmsk=O.r.clone();if(F.r&&F.add.vmsk.isEnabled)F.a8=F.r;
F.o3(n);F.qI=O.ko;n.a5=[n.t.indexOf(F)];n.f$=[];n.D()};ci.P7=function(){ci.xJ.call(this,c.UQ);this.X0=null;
this.Eq=null;this.Ah=null;this.E5=[];this.I9=null};ci.P7.prototype=new ci.xJ;ci.P7.prototype.fM=function(n,F,O,I,x){var r=n.$;
if(r==null)r=O.C[0];var _=O.t[r],d=n.FI;if(this.X0==null){this.Ah=ci.P7.NY(O,_);this.X0=JSON.stringify(this.Ah);
if(_.add.lmfx)this.Eq=JSON.stringify(_.add.lmfx)}if(_.add.lmfx==null){_.add.lmfx=JSON.parse(bW.default);
for(var e=0;e<bW.order.length;e++)_.add.lmfx[bW.jV[e]]={t:"VlLs",v:[]}}if(n.e=="scaleeffects"){if(n.G=="confirm"||n.G=="cancel"){this.fM({e:n.G},F,O,I,x);
return}_.add.lmfx=JSON.parse(this.Eq);ha.QB(_.add.lmfx,n.G/100)}else if(n.e=="changeprop"){var w=null;
if(d!=0){var Z=this.E5[d[0]];if(Z==null)Z=bW.E5[d[0]];Z=JSON.parse(Z);var P=_.add.lmfx[bW.jV[d[0]]].v;
if(P[d[1]]==null)P[d[1]]={t:"Objc",v:Z};w=P[d[1]].v;for(var C in Z)if(w[C]==null)w[C]=Z[C]}if(n.e=="changeprop"){if(d==0){this.Ah[n.Kx].v=n.G;
ci.P7.c9(O,_,this.Ah)}else if(n.Kx=="lagl"){if(w.uglg&&w.uglg.v){O.aU(n.G.val);this.Ah.a8G=O.ai()}else w[n.Kx].v=n.G}else if(n.Kx=="Lald"){if(w.uglg.v){O.qh(n.G.val);
this.Ah.a13=O.BG()}else w[n.Kx].v=n.G}else if((d[0]==3||d[0]==8)&&(n.Kx=="Clr"||n.Kx=="Grad")){if(n.Kx=="Clr"){w.Clr={t:"Objc",v:n.G};
delete w.Grad}if(n.Kx=="Grad"){w.Grad={t:"Objc",v:n.G};delete w.Clr}}else{w[n.Kx].v=n.G}if(d!=0)this.E5[d[0]]=JSON.stringify(w)}if(d!=0)if(w.Ptrn)O.CI(ha.Yi(w.Ptrn.v,x.a6))}else if(n.e=="setstl"){var W=n.G.Lefx;
if(W)ha.px(W,O,x.a6);ha.qd(n.G,_);this.Ah=ci.P7.NY(O,_)}else if(n.e=="st_dupsingle"){var v=_.add.lmfx[bW.jV[n.Fw[0]]].v;
if(v[n.Fw[1]]==null)return;var L=JSON.parse(JSON.stringify(v[n.Fw[1]]));v.splice(n.Fw[1],0,L)}else if(n.e=="st_movsingle"){var H=n.Fw[1],v=_.add.lmfx[bW.jV[n.Fw[0]]].v;
if(v[n.Fw[1]]==null)return;var y=Math.max(0,Math.min(v.length-1,H+n.a3f)),g=v[y];v[y]=v[H];v[H]=g}else if(n.e=="cancel"){if(this.Eq==null)delete _.add.lmfx;
else _.add.lmfx=JSON.parse(this.Eq);ci.P7.c9(O,_,JSON.parse(this.X0));this.X0=null;this.Eq=null}else if(n.e=="confirm"){var Q=JSON.stringify(_.add.lmfx),J=new hS([11,6],this);
J.data={t:[r],QV:[this.Eq],vt:[Q],jf:[this.X0],Tc:[JSON.stringify(this.Ah)]};O.p$(J);this.X0=null;this.Eq=null;
if(Q!=null){var A=JSON.parse(Q);is.yG(A);A.classID="Lefx";delete A.masterFXSwitch;var p=new k(V.E.JA);
p.uh=!0;p.data={oI:"set",Vw:!0};var U=aV.hd("Lyr",!0);U.v.splice(0,0,{t:"prop",v:{classID:"Prpr",keyID:"Lefx"}});
p.data.Mk={__name:"Set",classID:"setd",null:U,T:{t:"Objc",v:A}};F.A(p)}}else if(n.e=="st_copy"){this.I9=[this.X0,this.Eq];
this.X0=null;this.Eq=null}else if(n.e=="st_paste"||n.e=="st_clear"){if(n.e=="st_paste"&&this.I9==null)return;
var j=n.$!=null?[n.$]:O.C.slice(0),b=[],s=[],G=[],T=[];for(var e=0;e<j.length;e++){var _=O.t[j[e]],z=ci.P7.NY(O,_);
b.push(_.add.lmfx?JSON.stringify(_.add.lmfx):null);G.push(JSON.stringify(z));if(n.e=="st_paste"){s.push(this.I9[1]);
T.push(this.I9[0])}else{s.push(null);z.lrMd.v=0;z.Opct.v.val=100;z.iOpa.v.val=100;z.blIf={v:[]};for(var m=0;
m<10;m++)z.blIf.v.push(0,0,255,255);T.push(JSON.stringify(z))}}var J=new hS([11,6],this);J.data={t:j,QV:b,vt:s,jf:G,Tc:T};
this.Xe(J.data,O);O.p$(J);this.X0=null;this.Eq=null}else{var $=this.Ah,A=null;if(n.e=="st_delsingle"){A=JSON.parse(this.Eq);
A[bW.jV[n.Fw[0]]].v.splice(n.Fw[1],1);A=JSON.stringify(A)}if(A==null)delete _.add.lmfx;else _.add.lmfx=JSON.parse(A);
if($!=null)ci.P7.c9(O,_,$);var J=new hS([11,6],this);J.data={t:[n.$],QV:[this.Eq],vt:[A],jf:[this.X0],Tc:[JSON.stringify($)]};
O.p$(J);this.X0=null;this.Eq=null}_.KJ.hv=!0;O._y=!0;O.D()};ci.P7.NY=function(n,F){if(F.add.iOpa==null)F.add.iOpa=255;
if(F.add.brst==null)F.add.brst=[1,1,1];var O=F.Ja()?["pass"].concat(fk.Dy):fk.Dy;return{lrMd:{v:O.indexOf(F.mf)},Opct:{v:{type:"#Prc",val:Math.round(F.opacity*100/255)},t:"UntF"},iOpa:{v:{type:"#Prc",val:Math.round(F.add.iOpa*100/255)},t:"UntF"},blIf:{v:F.wx.slice(0)},brst:{v:F.add.brst},a8G:n.ai(),a13:n.BG(),Ja:F.Ja()}};
ci.P7.c9=function(n,F,O){var I=F.Ja()?["pass"].concat(fk.Dy):fk.Dy;F.mf=I[O.lrMd.v];F.opacity=Math.round(O.Opct.v.val*255/100);
F.add.iOpa=Math.round(O.iOpa.v.val*255/100);F.wx=O.blIf.v.slice(0);F.add.brst=O.brst.v.slice(0);n.aU(O.a8G);
n.qh(O.a13)};ci.P7.prototype.cQ=function(n,F){for(var e=0;e<n.t.length;e++){var O=F.t[n.t[e]],I=n.QV[e];
if(I==null)delete O.add.lmfx;else O.add.lmfx=JSON.parse(I);ci.P7.c9(F,O,JSON.parse(n.jf[e]));O.KJ.hv=!0}F._y=!0;
F.D()};ci.P7.prototype.Xe=function(n,F){for(var e=0;e<n.t.length;e++){var O=F.t[n.t[e]],I=n.vt[e];if(I==null)delete O.add.lmfx;
else O.add.lmfx=JSON.parse(I);ci.P7.c9(F,O,JSON.parse(n.Tc[e]));O.KJ.hv=!0}F._y=!0;F.D()};ci.My=function(){ci.xJ.call(this,c.rY)};
ci.My.prototype=new ci.xJ;ci.My.prototype.fM=function(n,F,O,I){var x=JSON.parse(JSON.stringify(O.M$)),r=JSON.parse(JSON.stringify(O.M$)),_=null,d=null,w=null,Z=-1,P=!1;
if(n.e=="delLC"){var C=ci.My.f_(O.M$,n.FI),W=O.M$.lastAppliedComp?O.M$.lastAppliedComp.v:0;r.list.v.splice(C,1);
if(W==n.FI)delete r.lastAppliedComp;_="Delete Layer Comp"}if(n.e=="editLC"){var C=ci.My.f_(O.M$,n.FI),v=r.list.v[C].v;
if(n.I3!=null)v.Nm.v=n.I3;if(n.a57!=null){var L=n.a57,H=v.capturedInfo.v,y=H&(1<<L)-1;H=H>>L;if((H&1)==1)H--;
else H++;v.capturedInfo.v=(H<<L)+y}_="Layer Comp properties"}if(n.e=="setLC"){ci.My.A0(O);if(n.FI==0)delete r.lastAppliedComp;
else r.lastAppliedComp={t:"long",v:n.FI};_="Switch Layer Comp";P=!0}if(n.e=="updLC"){ci.My.A0(O);d=ci.My.a6h(O,n.FI);
w=ci.My.Ov(O,n.FI);r.lastAppliedComp={t:"long",v:n.FI};_="Update Layer Comp";Z=n.FI;P=!0}if(n.e=="addLC"){ci.My.A0(O);
var g=1;for(var e=0;e<r.list.v.length;e++)g=Math.max(g,r.list.v[e].v.compID.v)+1;g+=Math.floor(Math.random()*1e4);
var Q={t:"Objc",v:{classID:"Comp",Nm:{t:"TEXT",v:"New Comp "+(r.list.v.length+1)},compID:{t:"long",v:g},capturedInfo:{t:"long",v:7}}};
r.list.v.push(Q);r.lastAppliedComp={t:"long",v:g};_="New Layer Comp";var J=ci.My.Ov(O,g);ci.My.gc(O,J,g)}var A=new hS(_,this);
A.data={aa3:x,a7t:r,a5w:d,af_:w,FI:Z,lx:P};this.Xe(A.data,O);O.p$(A)};ci.My.prototype.Xe=function(n,F){F.M$=n.a7t;
F._y=!0;if(n.af_)ci.My.gc(F,n.af_,n.FI);if(n.lx){var O=F.M$.lastAppliedComp?F.M$.lastAppliedComp.v:0,I=ci.My.f_(F.M$,O),x=I==-1?null:F.M$.list.v[I].v,r=x?x.capturedInfo.v:7;
ci.My.Eg(F,O,r);F.D()}};ci.My.prototype.cQ=function(n,F){F.M$=n.aa3;F._y=!0;if(n.a5w)ci.My.gc(F,n.a5w,n.FI);
if(n.lx){var O=F.M$.lastAppliedComp?F.M$.lastAppliedComp.v:0,I=ci.My.f_(F.M$,O),x=I==-1?null:F.M$.list.v[I].v,r=x?x.capturedInfo.v:7;
ci.My.Eg(F,O,r);F.D()}};ci.My.A0=function(n){if(n.M$.lastAppliedComp!=null||!n.Po)return;var F=ci.My.Ov(n,0);
ci.My.gc(n,F,0);n.Po=!1};ci.My.m3=function(n,F,O){n.v.Hrzn.v+=F;n.v.Vrtc.v+=O};ci.My.f_=function(n,F){var O=n.list.v;
for(var e=0;e<O.length;e++)if(O[e].v.compID.v==F)return e;return-1};ci.My.a5M=function(n){var F=n.layerSettings.v,x=null;
if(F.length==0)return;var O="compList enab Ofst blendOptions Lefx FXRefPoint imageMask vectorMask layerSpecific".split(" "),I=F[0].v;
if(I.enab==null)I.enab={t:"bool",v:!0};if(I.Ofst==null)I.Ofst={t:"Objc",v:{classID:"null",Hrzn:{t:"long",v:0},Vrtc:{t:"long",v:0}}};
for(var e=0;e<F.length;e++){var r=F[e].v;if(x==null)x=JSON.parse(JSON.stringify(r));else for(var _=0;
_<O.length;_++){var d=O[_];if(r[d])x[d]=JSON.parse(JSON.stringify(r[d]))}F[e].v=JSON.parse(JSON.stringify(x))}};
ci.My.eD=function(n,F){var O=n.add.shmd.cmls,I=O.layerSettings.v;for(var x=0;x<I.length;x++){var r=I[x].v,_=r.compList.v[0].v;
if(_==F)return x}return-1};ci.My.Jg=function(n,F){var O=ci.My.eD(n,F);return O==-1?null:n.add.shmd.cmls.layerSettings.v[O].v};
ci.My.Eg=function(n,F,O){for(var e=0;e<n.t.length;e++){var I=n.t[e],x=I.add.shmd.cmls;if(x==null)continue;
var r=x.layerSettings.v,_=ci.My.Jg(I,F);if(_==null){I.tt(!1);continue}if((O&1)!=0){if(_.enab)I.tt(_.enab.v);
else I.tt(!0)}if((O&2)!=0){if(_.Ofst){var d=_.Ofst.v,w=I.Yg(n),Z=Math.round(d.Hrzn.v-w.x),P=Math.round(d.Vrtc.v-w.y);
if(Z!=0||P!=0)c.eB.Zc(n,[e],null,Z,P)}}if((O&4)!=0){if(_.Lefx){var C=JSON.parse(JSON.stringify(_.Lefx.v));
is.Ke(C);if(JSON.stringify(C)!=JSON.stringify(I.add.lmfx)){I.add.lmfx=C;I.KJ.hv=!0}}else delete I.add.lmfx;
if(_.blendOptions){var W=_.blendOptions.v;if(W.Opct)I.opacity=Math.round(255*W.Opct.v.val/100);if(W.fillOpacity)I.add.iOpa=Math.round(255*W.fillOpacity.v.val/100);
if(W.Md)I.mf=I.add.lsct==ho.bu?"norm":fk.X4(W.Md.v.BlnM)}else{I.opacity=255;I.mf=I.Ja()?"pass":"norm";
I.add.iOpa=255}}}};ci.My.a6h=function(n,F){var O={};for(var e=0;e<n.t.length;e++){var I=n.t[e];if(I.add.shmd==null||I.add.shmd.cmls==null)continue;
O["l"+I.add.lyid]=JSON.parse(JSON.stringify(ci.My.Jg(I,F)))}return O};ci.My.Ov=function(n,F){var O={};
for(var e=0;e<n.t.length;e++){var I=n.t[e],x=I.add.lyid;O["l"+x]=ci.My.XP(n,I,F)}return O};ci.My.XP=function(n,F,O){var I=F.add.shmd?F.add.shmd.cmls:null,x={classID:"null"},r=F.Yg(n),_={t:"Objc",v:{classID:"null",Hrzn:{t:"long",v:r.x},Vrtc:{t:"long",v:r.y}}};
x.compList={t:"VlLs",v:[{t:"long",v:O}]};x.enab={t:"bool",v:F.Y9()};x.Ofst=JSON.parse(JSON.stringify(_));
x.FXRefPoint=JSON.parse(JSON.stringify(I&&I.origFXRefPoint?I.origFXRefPoint:_));x.blendOptions={t:"Objc",v:{classID:"null",Md:{t:"enum",v:{BlnM:fk.Pw(F.mf)}},Opct:{t:"UntF",v:{type:"#Prc",val:100*F.opacity/255}},fillOpacity:{t:"UntF",v:{type:"#Prc",val:F.add.iOpa!=null?100*F.add.iOpa/255:100}}}};
if(F.add.vmsk){x.vectorMask={t:"Objc",v:{classID:"null"}};x.vectorMask.v.Ofst=JSON.parse(JSON.stringify(_))}if(F.add.lmfx){x.Lefx={t:"Objc",v:JSON.parse(JSON.stringify(F.add.lmfx))};
is.yG(x.Lefx.v)}return x};ci.My.a3p=function(n,F){var O=F.add.lyid;if(F.add.shmd==null)F.add.shmd={};
if(F.add.shmd.cmls==null){F.add.shmd.cmls={classID:"null",LyrI:{t:"long",v:O},layerSettings:{t:"VlLs",v:[{t:"Objc",v:ci.My.XP(n,F,0)}]}}}};
ci.My.gc=function(n,F,O){for(var e=0;e<n.t.length;e++){var I=n.t[e],x=I.add.lyid;ci.My.a3p(n,I);var r=I.add.shmd.cmls,_=r.layerSettings.v,d=F["l"+x];
if(d!=null)d={t:"Objc",v:JSON.parse(JSON.stringify(d))};var w=ci.My.eD(I,O);if(w==-1){if(d==null)continue;
else _.push(d)}else{if(d==null)_.splice(w,1);else _[w]=d}}};ci.My.oa=function(n,F){for(var e=0;e<n.t.length;
e++){var O=n.t[e],I=O.add.lyid;if(O.add.shmd==null||O.add.shmd.cmls==null)continue;var x=O.Yg(n),r=Math.round(x.x),_=Math.round(x.y);
if(!F){r=-r;_=-_}var d=O.add.shmd.cmls,w=d.layerSettings.v;if(d.origFXRefPoint)ci.My.m3(d.origFXRefPoint,-r,-_);
for(var Z=0;Z<w.length;Z++){var P=w[Z].v;ci.My.m3(P.Ofst,r,_);var C=P.imageMask,W=P.vectorMask;if(C&&C.v.Ofst)ci.My.m3(C.v.Ofst,r,_);
if(W&&W.v.Ofst)ci.My.m3(W.v.Ofst,r,_)}}};ci.WD=function(){ci.xJ.call(this,c.Np);this.WR=null;this.l8=null};
ci.WD.prototype=new ci.xJ;ci.WD.IG=function(n,F,O,I){if(I)F/=4;var x=0,r=0,_=255,d=0,w=0,Z=255;while(r+n[x]<F){r+=n[x];
x++}while(d+n[_]<F){d+=n[_];_--}if(I){x-=Math.round(n[x]/(O/32));_+=Math.round(n[_]/(O/32));if(x<0)w=Math.round(-x*255/(_-x));
if(_>255)Z=255-Math.round((_-255)*255/(_-x))}return[Math.max(x,0),Math.min(_,255),w,Z,100]};ci.WD.prototype.fM=function(n,F,O,I,x){var r=n.e;
if(r=="auto"){var _=n.C6,d=ci.WD.getData(O);for(var e=0;e<d.length;e++){var w=d[e],Z;if(_<3){}else{var P=bS.tc("hue2");
cy.K8(P,0,[0,-100,0]);Z=dK.k6("hue2",P)}dK.Fl(Z,w.aN,w.Jj,w.j)}ci.WD.HB(O,d);ci.WD.Uv(O,d,_<3?[4,16,_]:[19,7,0],this);
O.D()}if(r=="edit_layer")this.al5(n,F,O,I);if(r=="edit"||r=="confirm"||r=="cancel")this.Cg(n,F,O,x,!0);
if(r=="start"){if(O.C.length==0)return;var C=O.t[O.C[0]];if(C.add.SoLd&&C.vE<=0){var W=new k(V.E.S,!0);
W.T=c.HI;W.data={e:"start",qm:n.Ju};F.A(W);return}if(!O.w1(F,null,!0))return;if(B[n.Ju]&&n.K_==null){if(O.C.length!=1)alert("Will be applied to "+O.C.length+" layers.");
var W=new k(V.E.P,!0);W.data={e:V.U.n$,cU:"afw_"+n.Ju};F.A(W)}else{this.Cg({e:"edit",K_:n.K_,qm:n.Ju},F,O,x);
this.Cg({e:"confirm",qm:n.Ju},F,O,x)}}};ci.WD.prototype.al5=function(n,F,O,I){var x=n.e,r=O.C[0],_=O.t[r],d=dK.get(_.add),w=JSON.parse(JSON.stringify(n.G)),C;
for(var Z in dK.BC)if(dK.BC[Z]==d)w.classID=Z;var P=O.history[O.ok];if(P&&P.T==this&&P.data.ZN!=null&&P.data.$==r)C=P;
else{var W=new k(V.E.JA,!0),v={classID:"setd",null:aV.hd("AdjL",!0),T:{t:"Objc",v:w}};W.data={Vw:!0,oI:"set",Mk:v};
F.A(W);var C=new hS([6,39],this);C.data={$:r,ZN:_.add[d],Qj:n.G,MN:v};O.p$(C)}C.data.Qj=n.G;C.data.MN.T.v=w;
this.Xe(C.data,O)};ci.WD.getData=function(n,F,O){var I=[],x=new gv(0,0,n.d,n.v),r=n.P4.length!=0?[-1-n.P4[0]]:n.C;
for(var e=0;e<r.length;e++){var _=r[e],d=_<0?null:n.t[_],w={$:_,vH:_<0?1:d.vE};I.push(w);var Z=n.TM[-1-_];
if(0<=_)Z=d.vE<=0?null:d.vE==1?d.B1():d.Fa(n).r;var P=Z?Z.rect:d.rect;if(n.N)w.j=Z!=null?n.N.rect.lN(x):n.N.rect.lN(P);
else w.j=F||Z!=null?P.Tq(x):P.clone();if(O)w.j=O[e].j.clone();var C=w.j.X();w.aN=q.f(C*4);if(Z)c.P6.AA(Z.channel,Z.rect,Z.color,w.aN,w.j);
else q.nF(d.buffer,P,w.aN,w.j);w.Jj=w.aN.slice(0);if(n.N){w.cR=q.f(C);q.k9(n.N.channel,n.N.rect,w.cR,w.j)}}return I};
ci.WD.a1_=function(n,F,O){if(F==null)return F;var I=dK.nP(n,F),r;if(I==-1)return F;var x=O.length>>>2,_=q.oN(O),d=.001*x;
if(I==0||I==2)r=[[0,255,0,255,100],ci.WD.IG(_[1],d,x,I==2),ci.WD.IG(_[2],d,x,I==2),ci.WD.IG(_[3],d,x,I==2)];
if(I==1)r=[ci.WD.IG(_[0],d*.33,x,!1),[0,255,0,255,100],[0,255,0,255,100],[0,255,0,255,100]];var w=bS.tc("levl");
for(var e=0;e<4;e++)hd.K8(w,e,r[e]);return w};ci.WD.prototype.Cg=function(n,F,O,I){if(this.WR==null){if(n.qm=="aply")O.t[O.C[0]].extend(new gv(0,0,O.d,O.v));
this.WR=ci.WD.getData(O,null,n.qm=="fade"?O.mG().data:null);if(n.qm=="aply")this.WR[0].Qb=O.dH()}if(n.e=="edit"){this.l8=[n.qm,n.K_];
var x=this.WR[0],r=ci.WD.a1_(n.qm,n.K_,x.aN),_=dK.k6(n.qm,r);if(n.qm=="fade"||n.qm=="aply")_=n.K_;if(_!=null){for(var e=0;
e<this.WR.length;e++){var d=this.WR[e];if(n.st)q.Ct(d.aN,d.Jj);else if(n.qm=="fade"){var w=fk.X4(n.K_.Md.v.BlnM),Z=n.K_.Opct.v.val/100,P=O.mG().data[e];
q.Ct(P.aN,d.Jj);if(w=="norm")q.p.Nb(d.aN,d.j,d.Jj,d.j,null,null,null,d.j,Z);else{var C=ha.gm();C.rU=!0;
for(var e=0;e<P.aN.length;e+=4)if(P.aN[e+3]!=d.aN[e+3]){C=null;break}q.p.F_(w,d.aN,d.j,d.Jj,d.j,d.j,Z,C)}}else if(n.qm=="aply"){_=_.With.v;
var W=_.T.v,v,L;if(W[1].t=="name"){var H=0;for(var y=0;y<O.t.length;y++)if(O.t[y].getName()==W[1].v.val)H=y;
if(H==d.$){v=d.aN;L=d.j}else{var g=O.t[H];v=g.buffer;L=g.rect}}else{L=new gv(0,0,O.d,O.v);v=d.Qb}var Q=_.Clcl?_.Clcl.v.Clcn:null,w=Q?fk.X4(Q):"norm",Z=_.Opct?_.Opct.v.val/100:1,J=["RGB","Rd","Grn","Bl","Trsp"].indexOf(W[0].v.enum),r=_.Invr&&_.Invr.v;
if(r||J!=0){v=v.slice(0);if(r)q.a0J(v);if(J!=0){var A=q.f(L.X());q.xg(v,A,J-1);if(J==4)q.uZ(A);for(var y=0;
y<3;y++)q.GF(A,v,y)}}if(Q=="Sbtr"){var p=1/_.Scl.v,U=_.Ofst.v,j=new Uint8ClampedArray(d.Jj.buffer);for(var e=0;
e<v.length;e+=4){j[e]=(d.aN[e]-v[e])*p+U;j[e+1]=(d.aN[e+1]-v[e+1])*p+U;j[e+2]=(d.aN[e+2]-v[e+2])*p+U}}else{var C=ha.gm();
C.rU=_.PrsT&&_.PrsT.v;d.Jj.fill(0);d.Jj.set(d.aN);q.p.F_(w,v,L,d.Jj,d.j,d.j,Z,C)}}else dK.Fl(_,d.aN,d.Jj,d.j)}ci.WD.HB(O,this.WR)}}if(n.e=="cancel"){ci.WD.ol(O,this.WR);
this.WR=null}if(n.e=="confirm"){var b=n.qm=="fade"?[2,11]:n.qm=="aply"?[2,12]:dK.names[n.qm],s=dK.nP(n.qm,this.l8[1]);
if(s!=-1)b=[4,16,s];ci.WD.Uv(O,this.WR,b,this);this.WR=null;if(s==-1)ci.WD.YI(F,this.l8)}O.D()};ci.WD.YI=function(n,F){var O=F[0],I=F[1],x,r;
if(dK.ZU[O]){x=dK.ZU[O];if(B[O])r=I}if(bS.ZU[O]){x=bS.ZU[O];if(B[O])r=I}if(O=="fade"){x="fade";r=I}if(O=="aply"){x="applyImageEvent";
r=I}if(x==null)return;var _=new k(V.E.JA,!0);_.data={Vw:!0,oI:x};if(r){r=JSON.parse(JSON.stringify(r));
r.classID="null";delete r.__name;_.data.Mk=r}n.A(_)};ci.WD.ol=function(n,F){ci.WD.rN(n,F)};ci.WD.Uv=function(n,F,O,I){for(var e=0;
e<F.length;e++){var x=F[e],r=n.t[x.$],_=x.$<0?n.TM[-1-x.$]:x.vH<=0?null:x.vH==1?r.B1():r.Fa(n).r;if(_){_.t7();
_.j8=!0;if(r)r.o3(n)}else{r.t7();r.D()}delete x.Jj;delete x.cR}var d=new hS(O,I);d.data=F;n.p$(d);n._y=!0};
ci.WD.HB=function(n,F,O){for(var e=0;e<F.length;e++){var I=F[e],x=n.t[I.$],r=O?I.aN:I.Jj,_=I.j;if(I.vH==0){x.extend(_);
if(I.cR){q.nF(I.aN,_,x.buffer,x.rect);q.p.Nb(r,_,x.buffer,x.rect,I.cR,_,0,_,1)}else q.nF(r,_,x.buffer,x.rect)}else{var d=I.$<0?n.TM[-1-I.$]:I.vH==1?x.B1():x.Fa(n).r;
d.extend(_);if(I.cR){var w=q.f(_.X()*4);q.Ct(I.aN,w);q.p.Nb(r,_,w,_,I.cR,_,0,_,1);c.P6.ZX(w,_,d)}else c.P6.ZX(r,_,d);
d.j8=!0;if(x)x.o3(n)}if(x)x.D()}if(!O)ci.WD.JB(n,F)};ci.WD.rN=function(n,F){for(var e=0;e<F.length;e++){var O=F[e],I=n.t[O.$],x=O.j,r=q.f(x.X()*4);
if(O.vH==0){q.nF(I.buffer,I.rect,r,x);I.extend(x);q.nF(O.aN,x,I.buffer,I.rect);I.t7()}else{var _=O.$<0?n.TM[-1-O.$]:O.vH==1?I.B1():I.Fa(n).r;
c.P6.AA(_.channel,_.rect,_.color,r,x);_.extend(x);c.P6.ZX(O.aN,x,_);_.t7();_.j8=!0;if(I)I.o3(n)}O.aN=r;
if(I)I.D()}n._y=!0};ci.WD.JB=function(n,F){var O=ci.WD.KI(n),I=~O;if(O==16777215)return;for(var e=0;
e<F.length;e++){var x=F[e],r=n.t[x.$],_=x.j;if(x.vH!=0)continue;r.extend(_);var d=_.x-r.rect.x,w=_.y-r.rect.y,Z=r.rect.d,P=new Uint32Array(x.aN.buffer),C=new Uint32Array(r.buffer.buffer);
for(var W=0;W<_.v;W++)for(var v=0;v<_.d;v++){var L=W*_.d+v,H=(W+w)*Z+(v+d);C[H]=C[H]&O|P[L]&I}r.t7();
r.D()}n.D()};ci.WD.KI=function(n){var F=n.a.o;return F[2]*16711680|F[1]*65280|F[0]*255};ci.WD.prototype.cQ=function(n,F){var O=F.t[n.$];
if(n.ZN!=null)O.add[dK.get(O.add)]=n.ZN;else ci.WD.rN(F,n);F.D()};ci.WD.prototype.Xe=function(n,F){var O=F.t[n.$];
if(n.ZN!=null)O.add[dK.get(O.add)]=n.Qj;else ci.WD.rN(F,n);F.D()};ci.WI=function(){ci.xJ.call(this,c.HI);
this.WR=null;this.Gl=null;this.e=null;this.l8=null};ci.WI.prototype=new ci.xJ;ci.WI.prototype.fM=function(n,F,O,I,x){if(n.e=="start"){if(O.C.length==0)return;
var r=O.t[O.C[0]];if(r.add.SoLd&&r.vE<=0){}else if(!O.w1(F,null,!0))return;var _=n.qm;if((B[_]||bS.Ac[_])&&n.K_==null){if(O.C.length!=1)alert("Will be applied to "+O.C.length+" layers.");
var d=new k(V.E.P,!0);d.data=ci.WI.SF(_,this.IE(O,_));F.A(d)}else{var w={e:"edit",qm:_,K_:n.K_,O6:this.IE(O)};
this.fM(w,F,O,I,x);w.e="confirm";delete w.K_;this.fM(w,F,O,I,x)}}if(n.e=="edit"||n.e=="cancel"||n.e=="confirm"){if(n.e=="edit")this.l8=[n.qm,n.K_];
if(n.O6)this.a7E(n,O,x);else this.a3_(n,F,O,x)}if(n.e=="applylast"&&this.l8!=null){var w={e:"edit",qm:this.l8[0],K_:this.l8[1],O6:this.IE(O)};
this.fM(w,F,O,I,x);w.e="confirm";delete w.K_;this.fM(w,F,O,I,x)}};ci.WI.SF=function(n,F){var O=bS.Ac[n];
if(O)return{e:V.U.H$,T:O,NJ:{O6:F}};else return{e:V.U.n$,cU:"afw_"+n,O6:F}};ci.WI.prototype.IE=function(n,F){var O=n.t[n.C[0]],I;
if(O.add.SoLd&&O.vE<=0){I={$:n.C[0],index:0};if(O.add.SoLd.filterFX!=null){var x=O.add.SoLd.filterFX.v.filterFXList.v;
I.index=x.length;for(var e=0;e<x.length;e++)if(bS._0(x[e].v)==F&&bS.Ac[F])I.index=e}}return I};ci.WI.prototype.a7E=function(n,F,O){var I=F.t[n.O6.$],x=n.qm;
if(n.e=="edit"){if(this.e==null){var r=bS.names[x];if(r==null)r=dK.names[x];if(x=="blendOptions")r=[14,10];
this.e=new hS(r,this);this.e.data={O6:n.O6,a9X:JSON.parse(JSON.stringify(I.add.SoLd))}}if(!I.z3()){I.add.SoLd.filterFX=bS.sN();
this.e.data.LX=fj.Mq(I.add.SoLd.placed.v);F.ti(this.e.data.LX);I.aY(F)}var _=I.add.SoLd.filterFX.v.filterFXList.v;
if(_[n.O6.index]==null){_.push(bS.Lk(x,O))}if(n.K_){_[n.O6.index].v.enab.v=n.st!=!0;if(x=="blendOptions")_[n.O6.index].v.blendOptions.v=n.K_;
else _[n.O6.index].v.Fltr.v=n.K_}this.e.data.agD=JSON.parse(JSON.stringify(I.add.SoLd));this.Xe(this.e.data,F)}if(n.e=="cancel"){if(this.e)this.cQ(this.e.data,F);
this.e=null}if(n.e=="confirm"){if(this.e)F.p$(this.e);this.e=null}};ci.WI.prototype.Te=function(n){return{Q:n>>>16,l:n>>>8&255,O:n&255}};
ci.WI.prototype.a3_=function(n,F,O,I){if(this.WR==null){var x=bS.wE(n.qm,n.K_);this.WR=ci.WD.getData(O,x.x!=0||x.y!=0)}if(n.e=="edit"){var r=JSON.stringify(n.K_);
if((n.K_==null||r!=this.Gl)&&n.st!=!0)for(var e=0;e<this.WR.length;e++){var _=this.WR[e],d={rect:_.j,buffer:_.aN},w={rect:_.j,buffer:_.Jj};
bS.Fl(n.qm,d,n.K_,this.Te(I.nE),this.Te(I.sI),w,[O.add.lnk2?O.add.lnk2:[],O.t[O.C[0]].B1(),O.TM]);this.Gl=r}ci.WD.HB(O,this.WR,n.st)}if(n.e=="cancel"){ci.WD.ol(O,this.WR);
this.WR=null;this.Gl=null}if(n.e=="confirm"){ci.WD.Uv(O,this.WR,bS.names[n.qm],this);this.WR=null;this.Gl=null;
ci.WD.YI(F,this.l8)}O.D();O._y=!0};ci.WI.prototype.cQ=function(n,F){if(n.O6){var O=F.t[n.O6.$];if(n.LX)F.Aw(n.LX);
O.add.SoLd=JSON.parse(JSON.stringify(n.a9X));if(O.z3())O.eU(F);else{O.aY(F);O.vE=0}}else ci.WD.rN(F,n);
F.D();F._y=!0};ci.WI.prototype.Xe=function(n,F){if(n.O6){var O=F.t[n.O6.$];if(n.LX)F.ti(n.LX);O.add.SoLd=JSON.parse(JSON.stringify(n.agD));
if(O.z3())O.eU(F);else O.aY(F);if(!O.o_())O.Cq+=32}else ci.WD.rN(F,n);F.D();F._y=!0};var cf={fo:"0",pY:"1",f3:"2",Mt:"3",pX:"4",xf:"5",Z5:"6",RR:"7",S:"8",ys:"8.5",Wo:"8.8",w2:"9",hx:"10",cu:"11",tJ:"12",z9:"13",jZ:"14",TN:"15",dM:"21",z4:"22",oV:"23",tf:"23.0",hq:"23.1",fq:"23.2",ms:"23.3",rZ:"23.4",sM:"23.5",nL:"23.6",q3:"30",Uy:"31",Qk:"40",Oo:"41",Bb:"42"};
cf.Ft={};cf.Ft[cf.pY]=["abr","brushes",hu,[9,3]];cf.Ft[cf.f3]=["grd","gradients",bc,[12,37]];cf.Ft[cf.Mt]=["shc","contours",ct,[12,21]];
cf.Ft[cf.pX]=["asl","styles",fL,[12,22]];cf.Ft[cf.xf]=["pat","patterns",h$,[12,62]];cf.Ft[cf.Z5]=["csh","shapes",fH,[12,77]];
cf.Ft[cf.RR]=["aco","swatches",as,[9,8]];cf.Ft[cf.S]=["atn","actions",hX,[9,9]];cf.Ft[cf.ys]=["tpl","tpresets",bP,[9,12]];
cf.Ft[cf.Wo]=["icc","profiles",a3,"ICCs"];function hS(n,F,O){if(O==null)O=!1;this.name=n;this.T=F;this.N$=O;
this.data=null}var aV={};aV.hd=function(n,F){var O={t:"Clss",v:{classID:n}};if(F)O={t:"Enmr",v:{classID:n,typeID:"Ordn",enum:"Trgt"}};
return{t:"obj ",v:[O]}};aV.a9=function(n,F){var O={classID:"Lyr"};O[n]=F;return{oI:"set",Mk:{classID:"null",null:aV.hd("Lyr",!0),T:{t:"Objc",v:O}}}};
aV.a8I=function(n,F,O,I,x){var r=new k(V.E.JA,!0),_=[],e=0,d=aV.Gc(F,O,I,_);while(_.length!=0){var w=_.pop();
e++;if(!w.h)continue;if(w.oI=="conditional"){var Z=n.t[n.C[0]],P=w.Mk.null.v.Cndt,C=!1;if(P=="Bckg")C=!1;
else if(P=="Pxel"&&n.f7(!1))C=!0;else if(P=="Adjs"&&dK.get(Z.add))C=!0;else if(P=="Shp"&&Z.add.vogk)C=!0;
else if(P=="Grup"&&Z.Ja())C=!0;var W=w.Mk.then.v;if(C)aV.Gc(F,W[0].v.val,W[1].v.val,_)}else if(w.oI=="stop"){if(w.Mk.Cntn&&w.Mk.Cntn.v==!0)window.confirm(w.Mk.Msge.v);
else{alert(w.Mk.Msge.v);break}}else if(w.oI=="play"){var v=w.Mk.null.v,L=new k(V.E.P,!0);L.data={e:V.U.Tp,nD:[v[0].v.val,v[1].v.val]};
x.A(L)}else{r.data={oI:w.oI,Mk:w.Mk};x.A(r)}}};aV.Gc=function(n,F,O,I){var x;for(var e=0;e<n.length;
e++){if(n[e].WL!=O)continue;var r=n[e].Nv;for(var _=0;_<r.length;_++){if(r[_].WL!=F)continue;x=r[_].Nv}}var d=x.length;
for(var e=0;e<d;e++)I.push(x[d-1-e])};aV.ah1=function(n){var F=n.oI,O=n.Mk,I,_,d,w,Z,P;if(O&&O.null)I=O.null.v[0];
if(O&&I==null&&O.At)I=O.At.v[0];if(I&&I.t=="obj ")I=I.v[0];var x=I?I.v.classID:null,r=["purge"];if(r.indexOf(F)!=-1)return F[0].toUpperCase()+F.slice(1);
P=dK.ZU;for(_ in P)if(P[_]==F)d=_;P=bS.ZU;for(_ in P)if(P[_]==F)w=_;P=ax.ZU;for(_ in P)if(P[_]==F)Z=_;
if(d){var C=dK.nP(d,O);if(C!=-1)return[4,16,C];return dK.names[d]}if(w)return bS.names[w];if(Z)return ax.names[Z];
var W=aV.s1;if(F=="make"){if(I){if(x=="AdjL")return[6,1];else if(x=="layerSection")return[6,9];else if(x=="Lyr")return[6,13];
else if(x=="Chnl"&&I.v.enum=="Msk")return[6,2];else if(x=="contentLayer")return[6,48,1];else if(x=="BckL")return"Make Background Layer";
else if(x=="Path")return"Make Path";else if(x=="TxLr")return"Make Text Layer"}if(O.Nw){x=O.Nw.v.classID;
if(x=="Dcmn")return[11,7];else if(x=="Chnl"||x=="SCch")return"New Channel"}}else if(F=="select"){if(x=="Chnl")return"Select "+(I.v.enum=="Msk"?"Mask ":"")+"Channel";
else if(x=="Mn")return"Select Panel \""+I.v.enum+"\"";else if(x=="Lyr"){if(I.t=="Enmr")return"Select "+{Bckw:"Backward"}[I.v.enum]+" Layer";
return"Select Layer \""+I.v.val+"\""}else if(x=="Dcmn")return"Select Document"}else if(W[F]&&x=="Chnl"){var v=I.v.keyID=="fsel";
return W[F]+" "+(v?"Selection":"Channel")}else if(F=="set"){if(x=="Lyr")return"Set Current Layer";else if(x=="AdjL")return[6,39];
else if(x=="contentLayer")return[6,48,2];else if(x=="Prpr")return[11,6];else if(x=="Clr")return"Set "+(I.v.keyID=="FrgC"?"Foreground":"Background")+" color";
else if(x=="Brsh")return"Set Brush";else console.log(x)}else if(F=="move"){if(x=="Lyr")return"Move Layer"}else if(F=="show"||F=="hide"){var L="";
if(x=="Lyr")+"Layer";if(x=="Chnl")+"Channel";return(F=="show"?"Show":"Hide")+" "+L}else if(F=="reset"){if(x=="Clr")return"Reset Colors"}else if(F=="exchange"){if(x=="Clr")return[22,7,0]}else if(F=="rotateEventEnum")return[2,5];
else if(F=="flip"){var H=O.Axis.v.Ornt=="Hrzn";return[[2,6],[22,4,H?2:3]]}if(x=="Chnl"){if(F=="duplicate"){if(I.v.keyID=="fsel")return"Selection to Channel";
else return"Duplicate Channel"}if(F=="delete")return"Delete Channel"}if(F=="transform")return I.v.keyID=="fsel"?[7,10]:[10,16];
var y={cut:[5,0],copyEvent:[5,1],copyToLayer:[6,49],copyMerged:[5,7],paste:[5,2],close:[1,12],save:[1,2],groupEvent:[6,18],duplicate:[6,0],mergeLayersNew:[6,12,0],mergeVisible:"Merge Visible",flattenImage:[6,12,1],updatePlacedLayer:[6,36,1],fade:[2,11],applyImageEvent:[2,12],fill:[2,3],colorRange:[7,8],desaturate:[19,7,0],delete:O?[6,31]:[2,2],align:[20,4,0],applyLocking:[6,57,1],crop:[11,12,1],placedLayerEditContents:"Edit Contents",convertMode:"Convert Mode",newPlacedLayer:[6,7],canvasSize:[11,3],imageSize:[11,10],rasterizeLayer:[6,8],revealAll:[11,12,2],conditional:"If"},g=y[F];
if(g==null)g=aV.OS[F];if(g)return g;return F};aV.OS={border:[7,9],smoothness:[19,3,0],expand:[7,4],contract:[7,5],feather:[7,6],inverse:[7,2]};
aV.s1={set:"Set",add:"Add Transparency",addTo:"Add To",subtract:"Subtract Transparency",subtractFrom:"Subtract From",interfaceIconFrameDimmed:"Intersect Transparency",interfaceWhite:"Intersect With"};
aV.amf=function(n,F,O,I){var x=n.oI,r=n.Mk,_=new k(V.E.S,!0),Z,P,C,W,v,g;_.T=c.lo;var d=new k(V.E.P,!0),w=["purge","updatePlacedLayer","convertMode"];
if(w.indexOf(x)!=-1)return;v=dK.ZU;for(Z in v)if(v[Z]==x)P=Z;v=bS.ZU;for(Z in v)if(v[Z]==x)C=Z;v=ax.ZU;
for(Z in v)if(v[Z]==x)W=Z;if(x=="fade")P=x;if(x=="applyImageEvent")P="aply";if(P){_.T=c.Np;_.data={e:"start",Ju:P,K_:r}}else if(C){_.T=c.HI;
_.data={e:"start",qm:C,K_:r}}else if(W){_.T=c.HI;_.data={e:"start",qm:"GEfc",K_:r}}else if(x=="imageSize"||x=="canvasSize"||x=="revealAll"||x=="trim"||x=="crop"){_.T=c.qa;
_.data={e:"fromAction",zC:n}}else if(x=="fill"||x=="delete"&&r==null){_.T=c.pY;_.data={e:"fromAction",zC:n}}else if(x=="colorRange"){var L=r.Mnm.v,H=r.Mxm.v;
_.T=c.FT;_.data={e:"crange",BQ:{LG:L.Lmnc.v,R:L.A.v,O:L.B.v},HJ:{LG:H.Lmnc.v,R:H.A.v,O:H.B.v},H9:r.Fzns.v/200}}else if(aV.OS[x]||aV.s1[x]&&(!1||r.With&&r.With.v[0].v.keyID=="fsel"||r.From&&r.From.v[0].v.keyID=="fsel"||r.null&&r.null.v[0].v.keyID=="fsel"||r.T.v[0]&&r.T.v[0].v.keyID=="fsel")){_.T=c.FT;
_.data={e:"fromAction",zC:n}}var y={copyToLayer:K.vi,mergeLayersNew:I&&I.C.length==1?K.Vu:K.W9,rasterizeLayer:K.J8,mergeVisible:K.gb,flattenImage:K.BW,newPlacedLayer:K.tI};
if(y[x])_.data={e:y[x],Mk:r};if(_.data){F.A(_);return}if(x=="desaturate"){_.T=c.Np;_.data={e:"auto",C6:3};
if(I&&I.t[I.C[0]].add.SoLd==null)F.A(_);return}if(x=="close"){if(r.Svng.v.YsN=="Ys"){d.data={e:V.U.I8};
F.A(d)}d.data={e:V.U.Oh,dV:I};F.A(d);return}if(x=="save"){d.data={e:V.U.I8};F.A(d);return}var y={placedLayerEditContents:V.U.vc,copyEvent:V.U.UW,paste:V.U.yM};
if(y[x])d.data={e:y[x]};if(d.data){F.A(d);return}if(r.null||r.At)g=(r.null?r.null:r.At).v;else g=[{t:"----",v:r}];
if(g[0].t=="obj "){if(g.length!=1)throw"e";g=g[0].v}for(var Q=0;Q<g.length;Q++){var J=g[Q],A=J.v.classID;
_.data=null;if(x=="make"){if(r.null==null&&r.Nw)A=r.Nw.v.classID;if(A=="AdjL"){_.data={e:K.DW,Mk:r}}else if(A=="layerSection"){_.data={e:K.dd};
if(r.Usng)_.data.I3=r.Usng.v.Nm.v}else if(A=="Lyr"){if(r.Usng&&r.Usng.v.length==2)_.data={e:K.pw};else{_.data={e:K.SP};
if(r.Usng)_.data.I3=r.Usng.v.Nm.v;if(r.below&&r.below.v)_.data.acr=!0}}else if(A=="Chnl"&&J.v.enum=="Msk"){_.data={e:K.al,Lj:r.Usng.v.UsrM}}else if(A=="Chnl"||A=="SCch"){_.data={e:K._a,G1:"fromAction",G:n}}else if(A=="contentLayer"){_.data={e:K.qu,Mk:r}}else if(A=="BckL"){I.t[I.C[0]].a7a();
continue}else if(A=="Dcmn"){var p=r.Nw.v;d.data={e:V.U.ph,KH:fj.ah9(p,O)}}else if(A=="Ptrn")d.data={e:V.U.te,b9:0};
else if(A=="Path"){_.T=c.jU;_.data={e:"pathedit",G1:"fromsel"}}else if(A=="TxLr"){_.T=c.ua;_.data={e:"fromAction",zC:n}}else{console.log(x,A,r);
throw"e"}}else if(x=="select"){var U={PcTl:c.$a,magicWandTool:c.qR};if(A=="Lyr"){var j=r.selectionModifier,b=j?j.v.selectionModifierType:null,s=aV.kj(I,J);
if(s==-1){alert("Layer "+J.v.val+" does not exist.");throw"e"}_.data={e:K.Vp,$:s,aln:b?["addToSelection","addToSelectionContinuous"].indexOf(b):null,Co:0,ak0:!0}}else if(A=="Chnl"){_.data={e:K.Vp,$:s,Co:1}}else if(A=="Dcmn"){if(F.KV.length<2)return;
d.data={e:V.U.po,dir:r.null.v[0].v.val}}else if(U[A]){d.data={e:V.U.H$,T:U[A]}}}else if((x=="set"||x=="reset"||x=="exchange")&&A=="Clr"){d.data={e:V.U.g7,b9:cf.dM,G1:x=="reset"?3:2};
if(x=="set"){d.data.G1=J.v.keyID=="FrgC"?0:1;var G=q.W.S_(r.T.v);d.data.G=G.Q<<16|G.l<<8|G.O}}else if(x=="set"){if(A=="AdjL"){var T=r.T.v.classID;
T=dK.BC[T];_.T=c.Np;if(T)_.data={e:"edit_layer",G:r.T.v}}else if(A=="Lyr"){var z=r.T.v,s=aV.kj(I,J);
if(z.Nm)_.data={e:K.UF,name:z.Nm.v};else if(z.Opct)_.data={e:K.nM,Qj:Math.round(z.Opct.v.val*255/100)};
else if(z.fillOpacity)_.data={e:K.BM,Qj:Math.round(z.fillOpacity.v.val*255/100)};else if(z.Md)_.data={e:K.SG,Qj:fk.Cs.indexOf(z.Md.v.BlnM)+(I.t[s].Ja()?1:0)};
else if(z.Usrs)_.data={e:K.Ro,$:s};else if(z.Blnd){_.T=c.UQ;_.data={e:"setstl",$:s,G:{blendOptions:{t:"objc",v:z}}};
F.A(_);_.data={e:"confirm",$:s}}else if(z.Clr){var m={Rd:1,Ylw:3,Vlt:6}[z.Clr.v.Clr];if(m==null)throw z.Clr.v.Clr;
_.data={e:K.OZ,a5Y:m}}else if(g[0].t=="prop")continue;else{console.log(r);throw"e"}var $=I.t[s];$.aoC()}else if(A=="Prpr"){var z=JSON.parse(JSON.stringify(r.T.v));
if(J.v.keyID=="TxtS"){var s=aV.kj(I,r.null.v[1]),$=I.t[s],o=$.add.TySh,h=JSON.parse(JSON.stringify(o.Vb)),X=bt.fQ(h),D=bt.gU(h,0,X.length-2);
if(z.Undl&&z.Undl.v.Undl=="underlineOnLeftInVertical")D.Bw.Underline=!0;bt.F$(h,0,X.length-1,D);_.T=c.ua;
_.data={e:"newED",EI:s,p4:h};Q=1e9}else{for(var f in z)if(z[f].v){if(f=="Scl")z[f].v.val=100;if(z[f].v.TrnS&&z[f].v.TrnS.v.Crv==null){z[f].v.TrnS=JSON.parse(bW.E5[9]).TrnS}}is.Ke(z);
if(z.masterFXSwitch==null)z.masterFXSwitch={t:"bool",v:!0};var s=aV.kj(I,r.null.v[1]);_.T=c.UQ;_.data={e:"setstl",$:s,G:{Lefx:{t:"objc",v:z}}};
F.A(_);_.data={e:"confirm",$:s}}}else if(A=="contentLayer"){var s=aV.kj(I,J),z=r.T.v;if(z.classID=="shapeStyle")z=z.FlCn.v;
var R={solidColorLayer:0,gradientLayer:1,patternLayer:2}[z.classID],C=JSON.parse(JSON.stringify(bW.BR[R]));
ci.ED.KW(z,C,R);_.data={e:K.i8,ha:[s],BP:!0,G:{he:R+1,Gk:C}}}else if(A=="Brsh"){var i=JSON.parse(JSON.stringify(O.ke.Kr)),N=r.T.v;
if(N.masterDiameter)i.Brsh.v.Dmtr.v.val=N.masterDiameter.v.val;else console.log("unknown brush parameters");
d.data={e:V.U.g7,b9:cf.jZ,JM:i}}else{console.log(J,r);throw A}}else if(x=="move"){if(A=="Lyr"){var z=r.T.v;
if(z.classID=="Ofst"){_.data={e:"trsl",aof:z.Hrzn.v.val,abC:z.Vrtc.v.val};_.T=c.AK}else{var M,hK;if(z[0].t=="Enmr"){if(z[0].v.enum=="Frnt")hK=0;
else if(z[0].v.enum=="Prvs")hK=2;else if(z[0].v.enum=="Back")hK=3;else throw"e"}else M=z[0].v.val;_.data={e:K.qU,target:M,G1:hK,ama:r.Dplc?r.Dplc.v:!1}}}}else if(x=="groupEvent")_.data={e:K.Eu};
else if(x=="show"||x=="hide"){if(A=="Lyr"){var s=aV.kj(I,J);if(s==-1)continue;var bD=I.t[s].Y9();if(x=="show"&&bD||x=="hide"&&!bD)continue;
_.data={e:K.V0,$:s}}else if(A=="Chnl"){_.data={e:K._a,G1:"fromAction",G:n}}}else if(x=="rotateEventEnum"){_.T=c.qa;
var co=r.Angl.v.val;_.data={e:"rot",WL:[2,5],G:-co*Math.PI/180}}else if(x=="flip"){_.T=c.qa;var iM=r.Axis.v.Ornt=="Hrzn",hs=iM?new aE(-1,1):new aE(1,-1);
_.data={e:"scl",WL:[[2,6],[22,4,iM?2:3]],G:hs}}else if(x=="transform"){var S=1,a=1,bV=0,a5=0,i9=0,dG=0,ap=0;
if(r.Wdth)S=r.Wdth.v.val/100;if(r.Hght)a=r.Hght.v.val/100;if(r.Skew){var bk=r.Skew.v;bV=bk.Hrzn.v.val;
a5=bk.Vrtc.v.val}if(r.Ofst){var c2=r.Ofst.v;dG=c2.Hrzn.v.val;ap=c2.Vrtc.v.val}if(r.Angl)i9=r.Angl.v.val;
var gg=new cD;gg.concat(new cD(S,S*Math.tan(a5*Math.PI/180),a*Math.tan(bV*Math.PI/180),a,0,0));gg.rotate(-i9*Math.PI/180);
gg.translate(dG,ap);var gw={Qcsa:4,Qcs0:0,Qcs1:2,Qcs2:8,Qcs3:6,Qcs4:1,Qcs5:5,Qcs6:7,Qcs7:3}[r.FTcs.v.QCSt];
if(gw==null)throw r.FTcs.v.QCSt;var J=r.null;if(J&&J.v instanceof Array)J=J.v[0];var s=J?aV.kj(I,J):null;
if(s==-1)s=null;_.T=J&&J.v.keyID=="fsel"?c.UR:c.KR;_.data={e:"mat",Ug:gw,G:gg,$:s}}else if(A=="Chnl"){_.data={e:K._a,G1:"fromAction",G:n}}else if(x=="duplicate")_.data={e:K.bn,I3:r.Nm?r.Nm.v:null};
else if(x=="delete")_.data={e:K.C9};else if(x=="align"){if(r.Aply&&r.Aply.v.projection=="Auto"){_.T=c.qa;
_.data={e:"auto-align"}}else{_.T=c.AK;var P={AdLf:0}[r.Usng.v.ADSt];if(P==null)throw"e";_.data={e:"algn",G:P}}}else if(x=="applyLocking"){var gP=r.layerLocking.v,dT;
if(gP.protectTransparency)dT=[[gP.protectTransparency.v],[0]];else if(gP.protectNone)dT=[[!1,!1,!1,!1],[0,1,2,31]];
else{console.log(gP);throw"e"}_.data={e:K.ll,Qj:dT}}if(_.data)F.A(_);else if(d.data)F.A(d);else{console.log(n);
alert("Unknown action \""+x+"\"");throw"e"}}};aV.kj=function(n,F){var O=F.t,I=-1;if(O=="name"){var x=F.v.val,I=-1;
for(var e=0;e<n.t.length;e++)if(n.t[e].getName()==x){I=e;break}}if(O=="Enmr"&&n.C.length!=0)I=n.C[0];
if(O=="Enmr"&&F.v.enum=="Frwr")I=n.C[0]+1;if(O=="Enmr"&&F.v.enum=="Bckw")I=n.C[0]-1;if(O=="prop"){if(F.v.keyID=="Bckg")I=0}return I};
var dK={};dK.get=function(n){for(var F in dK.names)if(n[F]!=null)return F;return null};dK.k6=function(n,F){var O=dK.fe,I;
if(n=="brit"){var x=F.Brgh?F.Brgh.v:0,r=F.Cntr?F.Cntr.v:0,_=F.useLegacy?F.useLegacy.v:!1;if(_){var d=x/255,w=1+r/100;
if(w>1)w=1+Math.tan(Math.PI/2*r/101);var Z=(1-w)/2,P=q.e$.AQ(d,d,d),C=[w,0,0,Z,0,w,0,Z,0,0,w,Z,0,0,0,1],W=q.e$.multiply(P,C),v=new q.zF(256);
for(var e=0;e<256;e++)v.Q[e]=e;q.e$.transform(v,v,W);I={type:O.$l,Ub:v.Q,O8:v.Q,QP:v.Q,Nn:!1,Q7:!1}}else{var L=1024,H=-30+60*(r+100)/200,y=[];
for(var e=0;e<4;e++)y.push(q.pH.G0(e/3*255,e/3*255,!0));y[1].v.Hrzn.v=64;y[1].v.Vrtc.v=64-H;y[2].v.Hrzn.v=128+64;
y[2].v.Vrtc.v=128+64+H;y.sort(function(hD,hf){return hD.v.Hrzn.v-hf.v.Hrzn.v});var g=q.pH.Sz(y,L);function Q(hD,L){var y=[],E=3;
for(var e=0;e<E+1;e++)y.push(q.pH.G0(e/E*255,e/E*255,!0));y[1].v.Hrzn.v=130-hD*26;y[1].v.Vrtc.v=130+hD*51;
y[2].v.Hrzn.v=233-hD*48;y[2].v.Vrtc.v=233+hD*10;return q.pH.Sz(y,L)}var J=Q(Math.abs(x)/100,L);if(x<0){var A=[],p=1/L;
for(var e=0;e<L;e++){var U=e*p,j=e;while(J[j]>U&&j>1)j--;A[e]=j*p}J=A}var b=new Uint8Array(L);for(var e=0;
e<L;e++){var s=Math.round((L-1)*J[e]);b[e]=Math.round(255*g[s])}I={type:O.$l,Ub:b,O8:b,QP:b,Nn:!1,Q7:!1}}}if(n=="levl"){var G=[],T,z,P,m,$,o;
for(var e=0;e<4;e++)G.push(hd.yL(F,e));T=-G[0][0]/255;z=1/(G[0][1]/255-G[0][0]/255);P=q.e$.multiply(q.e$.en(z,z,z),q.e$.AQ(T,T,T));
m=q.e$.en(1/(G[1][1]/255-G[1][0]/255),1/(G[2][1]/255-G[2][0]/255),1/(G[3][1]/255-G[3][0]/255));$=q.e$.AQ(-G[1][0]/255,-G[2][0]/255,-G[3][0]/255);
o=q.e$.multiply(m,$);var b=new q.zF(256);for(var e=0;e<256;e++)b.Q[e]=b.l[e]=b.O[e]=e;var h=1/(G[0][4]/100),X=1/(G[1][4]/100),D=1/(G[2][4]/100),f=1/(G[3][4]/100);
q.e$.transform(b,b,o);for(var e=0;e<256;e++){b.Q[e]=Math.round(Math.max(0,Math.min(255,255*Math.pow(b.Q[e]/255,X))));
b.l[e]=Math.round(Math.max(0,Math.min(255,255*Math.pow(b.l[e]/255,D))));b.O[e]=Math.round(Math.max(0,Math.min(255,255*Math.pow(b.O[e]/255,f))))}q.e$.transform(b,b,P);
for(var e=0;e<256;e++){b.Q[e]=Math.round(Math.max(0,Math.min(255,255*Math.pow(b.Q[e]/255,h))));b.l[e]=Math.round(Math.max(0,Math.min(255,255*Math.pow(b.l[e]/255,h))));
b.O[e]=Math.round(Math.max(0,Math.min(255,255*Math.pow(b.O[e]/255,h))))}T=G[0][2]/255;z=G[0][3]/255-G[0][2]/255;
P=q.e$.multiply(q.e$.AQ(T,T,T),q.e$.en(z,z,z));m=q.e$.en(G[1][3]/255-G[1][2]/255,G[2][3]/255-G[2][2]/255,G[3][3]/255-G[3][2]/255);
$=q.e$.AQ(G[1][2]/255,G[2][2]/255,G[3][2]/255);o=q.e$.multiply($,m);q.e$.transform(b,b,q.e$.multiply(P,o));
I={type:O.$l,Ub:b.Q,O8:b.l,QP:b.O,Nn:!1,Q7:!1}}if(n=="curv"){var i=aD.yL(F,0).length==256?1:0,t=[];if(i==0){var N=q.pH.ZE(aD.yL(F,0),256);
for(var e=1;e<4;e++){var M=q.pH.ZE(aD.yL(F,e),256);t.push(q.pH.kL(M,N))}}else{var bD=[];for(var e=0;
e<4;e++){var co=new Uint8Array(256);bD.push(co);var iM=aD.yL(F,e);for(var j=0;j<256;j++)co[j]=iM[j]}for(var e=1;
e<4;e++)t.push(q.pH.kL(bD[e],bD[0]))}I={type:O.$l,Ub:t[0],O8:t[1],QP:t[2],Nn:!1,Q7:!1}}if(n=="expA"){console.log(F);
var hs=F.Exps,S=F.Ofst,a=F.gammaCorrection,bV=hs?hs.v:0,a5=S?S.v:0,i9=a?a.v:1,b=new Uint8Array(256);
for(var e=0;e<256;e++){var F=e/255,dG=Math.pow(Math.abs(a5),1/(Math.PI/2));if(a5>0){F=Math.max(a5/Math.E,F);
F=F*Math.exp(a5/1.75+bV/Math.PI);F=(1-dG)*F+dG*1}else{F=F*Math.exp(-a5*1.75+bV/Math.PI);F=F+-dG*1.14}F=Math.pow(F,1/i9);
F=Math.max(0,Math.min(1,F));b[e]=Math.round(F*255)}I={type:O.$l,Ub:b,O8:b,QP:b,Nn:!1,Q7:!1}}if(n=="vibA"){I={type:O.sP,b9:[F.vibrance?F.vibrance.v:0,F.Strt?F.Strt.v:0]}}if(n=="hue2"){var bk=[],c2=[],gg=[],bH=F.Clrz?F.Clrz.v:!1;
for(var e=0;e<256;e++){bk[e]=e/255;c2[e]=0;gg[e]=0}var gw=cy.yL(F,0),gP=dK.yf(gw[1]/100);if(bH){var dT=gw[0]/360;
for(var e=0;e<256;e++){bk[e]=dT;c2[e]=gP}}else{for(var e=0;e<256;e++){var fU=bk[e],dV=c2[e];bk[e]+=gw[0]/360;
for(var j=0;j<6;j++){var ac=cy.yL(F,j+1),e2=ac.i$,cX=ac.S1,dG=0;for(var eR=1;eR<4;eR++)if(cX[eR]<cX[0])cX[eR]+=360;
var gR=cX[0],bN=cX[1],eG=cX[2],ef=cX[3],fi=fU*360;if(fi<cX[0])fi+=360;var ep=(fi-gR)/(bN-gR),iJ=(fi-eG)/(ef-eG);
if(ep<0)dG=0;else if(ep<1)dG=ep;else if(iJ<0)dG=1;else if(iJ<1)dG=1-iJ;else dG=0;var w=dK.yf(e2[1]/100);
bk[e]+=dG*e2[0]/360;c2[e]+=dG*w;gg[e]+=dG*e2[2]/100}}for(var e=0;e<256;e++){c2[e]=(1+c2[e])*(1+gP)-1;
gg[e]=Math.max(-1,Math.min(1,gg[e]))}}var aT=new Uint8Array(256),dm=new Uint8Array(256),c1=new Uint8Array(256);
for(var e=0;e<256;e++){var gk=bk[e],a8=c2[e],bX=gg[e];if(gk>1)gk--;if(gk<0)gk++;a8=dK.aho(a8);a8=(1+a8)*.5;
bX=(1+bX)*.5;aT[e]=Math.round(255*gk);dm[e]=Math.round(255*a8);c1[e]=Math.round(255*bX)}var bL=gw[2]/100,c_=bL<0?-bL:bL,eS=bL<0?0:1;
I={type:O.$v,ab4:aT,A3:dm,a7w:c1,ams:c_*eS,yy:1-c_,aba:gw[2]/100,akZ:bH?1:0}}if(n=="nvrt"){var b=new Uint8Array(256);
for(var e=0;e<256;e++)b[e]=255-e;I={type:O.$l,Ub:b,O8:b,QP:b,Nn:!1,Q7:!1}}if(n=="post"){var c$=F.Lvls.v,b=new Uint8Array(256),dG=c$/255.001,cp=255/(c$-1);
for(var e=0;e<256;e++)b[e]=Math.floor(e*dG)*cp;I={type:O.$l,Ub:b,O8:b,QP:b,Nn:!1,Q7:!1}}if(n=="grdm"){var b_=F.Grad.v,hy=F.Rvrs,gx=q.W.bQ(b_.Clrs.v,0,0),L=1024,eJ=q.W.Pp(b_,gx,L,hy?hy.v:!1),d4=q.f(L),cs=q.f(L),en=q.f(L);
q.xg(eJ,d4,0);q.xg(eJ,cs,1);q.xg(eJ,en,2);I={type:O.$l,Ub:d4,O8:cs,QP:en,Nn:!0,Q7:!1}}if(n=="selc"){var cm=new Float32Array(9*3*2),c5=F.EU,fK=F.Mthd?F.Mthd.v.CrcM=="Absl":!1;
for(var j=0;j<9;j++){var ez=j*6,d6=hh.yL(F,j),ee=d6[0]/100,c0=d6[1]/100,gq=d6[2]/100,ei=d6[3]/100;if(fK){cm[ez]=cm[ez+1]=cm[ez+2]=1;
cm[ez+3]=ee*(1+ei)+ei;cm[ez+4]=c0*(1+ei)+ei;cm[ez+5]=gq*(1+ei)+ei}else{cm[ez+0]=(1+ee)*(1+ei);cm[ez+1]=(1+c0)*(1+ei);
cm[ez+2]=(1+gq)*(1+ei)}}I={type:O.Yx,aje:cm}}if(n=="blwh"){var d9="Rd Yllw Grn Cyn Bl Mgnt".split(" "),I=[],cE=0,iU=0;
for(var e=0;e<6;e++)I.push(F[d9[e]].v);I.push(F.useTint.v,F.tintColor.v);var ge=[];for(var e=0;e<6;e++)ge.push((I[e]-50)/50);
var iK=q.W.S_(I[7]);iK.Q/=255;iK.l/=255;iK.O/=255;var gu=q.sy(iK.Q,iK.l,iK.O),bX=q.wO(q.OQ(gu.Sa,1,.5)),eA=gu.Ls*gu.K_;
if(bX==.5)cE=iU=.5;else{cE=eA*(.5-bX)/(.5/bX-1);iU=1-eA*(.5-bX)-1/(2*(1-bX));iU/=1-1/(2*(1-bX))}I={type:O.ib,a6R:ge,Xn:I[6]?1:0,al$:gu.Sa,wO:bX,a0j:eA,Mf:cE,a8y:iU}}if(n=="blnc"){console.log(F);
var G=[],eI=["ShdL","MdtL","HghL"];for(var e=0;e<3;e++){if(F[eI[e]]==null){G[e]=[0,0,0];continue}var c$=F[eI[e]].v,ad=c$[0].v/100,d_=c$[1].v/100,c9=c$[2].v/100,ek=F.PrsL==null||F.PrsL.v?(Math.min(ad,d_,c9)+Math.max(ad,d_,c9))/2:0;
G[e]=[ad-ek,d_-ek,c9-ek]}var t=[q.f(256),q.f(256),q.f(256)];for(var j=0;j<3;j++)for(var e=0;e<256;e++){var U=e*(1/255),fX=0,H=0,fo=0;
H=G[2][j];fo=Math.abs(H);if(H<0)fX=Math.pow(U,Math.SQRT2);else fX=1.63*(Math.pow(U+.04,.5)-.2);U=fo*fX+(1-fo)*U;
H=G[1][j];fo=Math.abs(H);if(H<0)fX=Math.pow(U,2);else fX=Math.min(2.35*(Math.pow(U+.09,.5)-.3),Math.pow(U,1/2));
U=fo*fX+(1-fo)*U;H=G[0][j];fo=Math.abs(H);if(H<0)fX=U<.4?0:Math.pow((U-.4)/.6,Math.SQRT2);else fX=Math.pow(U,Math.SQRT2/2);
U=fo*fX+(1-fo)*U;U=Math.max(0,Math.min(1,U));t[j][e]=Math.round(U*255)}I={type:O.$l,Ub:t[0],O8:t[1],QP:t[2],Nn:!1,Q7:!1}}if(n=="phfl"){var eY=q.W.S_(F.Clr.v),hG=[eY.Q/255,eY.l/255,eY.O/255],aY=F.Dnst.v/100,t=[q.f(256),q.f(256),q.f(256)];
for(var j=0;j<3;j++)for(var e=0;e<256;e++){var U=e*(1/255),gK=U*hG[j];gK=Math.max(0,Math.min(1,gK));
U=aY*gK+(1-aY)*U;t[j][e]=Math.round(U*255)}I={type:O.$l,Ub:t[0],O8:t[1],QP:t[2],Nn:!1,Q7:F.PrsL.v}}if(n=="thrs"){var b=q.f(256);
for(var e=F.Lvl.v;e<256;e++)b[e]=255;I={type:O.$l,Ub:b,O8:b,QP:b,Nn:!0,Q7:!1}}if(n=="mixr"){var b$=dK.Jz(F),W=[];
for(var e=0;e<b$.G.length;e++)if(e%5!=3)W.push(b$.G[e]/100);if(b$.pl){for(var c4=1;c4<3;c4++)for(var U=0;
U<4;U++)W[c4*4+U]=W[U]}I={type:O.Vx,PS:W}}if(n=="rplc"){var gA=F.Mnm.v,f7=F.Mxm.v;I={type:O.xr,BQ:[gA.Lmnc.v,gA.A.v,gA.B.v],HJ:[f7.Lmnc.v,f7.A.v,f7.B.v],shift:[F.H.v/360,F.Strt.v/100,F.Lght.v/100],H9:F.Fzns.v/200}}if(n=="clrL"&&F.profile){var aZ=new Uint8Array(F.profile.v),cG=ICC.R(aZ.buffer),bb=[],dR=17,bb=ICC.U.sampleLUT(cG,dR);
I={type:O.ZQ,aN:ICC.U.rgba8LUT(bb,dR),acC:bb,CU:dR}}return I};dK.nP=function(n,F){var O=-1;if(n!="levl"||F==null)O=-1;
else if(F.Auto)O=0;else if(F.AuCo)O=1;else if(F.autoBlackWhite)O=2;return O};dK.fe={$l:0,$v:1,sP:2,Yx:3,ib:4,Vx:5,xr:6,ZQ:7};
dK.yf=function(n){if(n<0)return n;return Math.pow(Math.tan(Math.PI/2*n),1.3)};dK.aho=function(n){if(n<0)return n;
n=Math.pow(n,1/1.3);return Math.atan2(n,1)/(Math.PI/2)};dK.Fl=function(n,F,O,I){var x=dK.fe,r=Date.now();
if(l.Z0&&I.X()>300*300&&n.type!=x.$l&&n.type!=x.ZQ){I=I.clone();I.x=I.y=0;var _=l.Y0(0,I.d,I.v);_.set(F);
l.wu(_,I);_.ww(I);dK.Yn(n,_.Lu,I);_.get(O);return}if(n.type==x.ZQ){var d=n.acC,w=n.CU;ICC.U.applyLUT(d,w,F,O);
var Z=F.length;for(var e=0;e<Z;e+=4)O[e+3]=F[e+3]}if(n.type==x.Vx)q.e$.AH(F,O,n.PS);if(n.type==x.ib){var P=n.a0j,C=n.wO,W=n.Mf,v=n.a8y,Z=F.length;
for(var e=0;e<Z;e+=4){var I=F[e]*(1/255),L=F[e+1]*(1/255),H=F[e+2]*(1/255),y=q.Px(I,L,H),g=0;for(var Q=0;
Q<6;Q++)g+=Math.min(1,1.7*(1-y.AU))*y.Ls*n.a6R[Q]*dK.oH(y.Sa,Q*(1/6));var J=Math.max(0,Math.min(1,y.AU*(1+g)));
if(n.Xn==1){var A=0;if(J<W)A=J*(.5/C);else if(J<v)A=J+P*(.5-C);else A=1-(1-J)*.5/(1-C);y.Sa=n.al$;y.Ls=Math.min(1,P+3*P*Math.abs(J-.5*(W+v)));
y.AU=A}else{y.Sa=0;y.Ls=0;y.AU=J}var p=q.OQ(y.Sa,y.Ls,y.AU);O[e]=Math.round(p.Q*255);O[e+1]=Math.round(p.l*255);
O[e+2]=Math.round(p.O*255)}}if(n.type==x.Yx){var U=n.aje,Z=F.length,j=1/255;for(var e=0;e<Z;e+=4){var I=F[e]*j,L=F[e+1]*j,H=F[e+2]*j,y=q.Px(I,L,H),b=Math.max(I,Math.max(L,H)),s=Math.min(I,Math.min(L,H)),G=1-I,T=1-L,z=1-H,m=0,$=0,o=0;
for(var Q=0;Q<9;Q++){var h=Q*6,R=0;if(U[h]==1&&U[h+1]==1&&U[h+2]==1&&U[h+3]==0&&U[h+4]==0&&U[h+5]==0)continue;
var X=G*U[h]+U[h+3],D=T*U[h+1]+U[h+4],f=z*U[h+2]+U[h+5];if(Q<6)R=dK.oH(y.Sa,Q*(1/6))*y.Ls*2*Math.min(y.AU,1-y.AU);
else if(Q==6)R=Math.max(0,s-.5)*2;else if(Q==7)R=1-(Math.abs(b-.5)+Math.abs(s-.5));else R=Math.max(0,.5-b)*2;
m+=(Math.max(0,Math.min(1,X))-G)*R;$+=(Math.max(0,Math.min(1,D))-T)*R;o+=(Math.max(0,Math.min(1,f))-z)*R}G=Math.max(0,Math.min(1,G+m));
T=Math.max(0,Math.min(1,T+$));z=Math.max(0,Math.min(1,z+o));I=1-G;L=1-T;H=1-z;O[e]=Math.round(I*255);
O[e+1]=Math.round(L*255);O[e+2]=Math.round(H*255)}}if(n.type==x.$l){q.a5X(F,O,n.Ub,n.O8,n.QP,n.Nn,n.Q7)}if(n.type==x.$v){var i=new Uint32Array(F.buffer),t=new Uint32Array(O.buffer),Z=i.length;
if(dK.AE==null){dK.AE=new Float64Array(256);for(var e=0;e<256;e++)dK.AE[e]=dK.yf(-1+2*e/255)}var N=dK.AE;
for(var e=0;e<Z;e++){var M=i[e],I=(M&255)*(1/255),L=(M>>>8&255)*(1/255),H=(M>>>16&255)*(1/255),hK=M>>>24,bD=Math.min(I,L,H),co=Math.max(I,L,H),iM=0,hs=0,S=0;
iM=q.Px(I,L,H).Sa;var a=~~(iM*255+.5),bV=n.ab4[a]*(1/255),a5=n.A3[a]*(1/255)*2-1,i9=n.a7w[a]*(1/255)*2-1,g=-i9,dG=bD;
if(0<i9){g=i9;dG=co}var ap=n.ams+n.yy*g*dG,bk=n.yy*(1-g);I=ap+bk*I;L=ap+bk*L;H=ap+bk*H;co=Math.max(I,L,H);
bD=Math.min(I,L,H);S=(co+bD)*.5;if(co!=bD){var c2=co-bD;hs=S>.5?c2/(2-(co+bD)):c2/(co+bD)}var gg=a5;
if(n.akZ==0){a5=N[Math.floor((1+a5)*127.5)];gg=Math.min(hs*(1+a5),1)}var p=q.OQ(bV,gg,S);I=p.Q;L=p.l;
H=p.O;t[e]=hK<<24|H*255<<16|L*255<<8|I*255}}if(n.type==x.xr){q.Ct(F,O);var i=new Uint32Array(F.buffer),t=new Uint32Array(O.buffer),Z=i.length,bH=n.H9,gw=1/bH,gP={LG:n.BQ[0],R:n.BQ[1],O:n.BQ[2]},dT={LG:n.HJ[0],R:n.HJ[1],O:n.HJ[2]};
for(var e=0;e<Z;e++){var M=i[e],fU=M&255,dV=M>>>8&255,ac=M>>>16&255,I=fU*(1/255),L=dV*(1/255),H=ac*(1/255),hK=M>>>24,e2=q.Kj(fU,dV,ac),cX=q.FG(e2,gP,dT,bH,gw);
if(cX==0)continue;var y=q.Px(I,L,H),bV=2+y.Sa+cX*n.shift[0];y.Sa=bV-~~bV;y.Ls=Math.max(0,Math.min(1,y.Ls+cX*n.shift[1]));
y.AU=Math.max(0,Math.min(1,y.AU+cX*n.shift[2]));var p=q.OQ(y.Sa,y.Ls,y.AU);I=p.Q;L=p.l;H=p.O;t[e]=hK<<24|H*255<<16|L*255<<8|I*255}}if(n.type==x.sP){var i=new Uint32Array(F.buffer),t=new Uint32Array(O.buffer),Z=i.length,eR=n.b9[0]/100,gR=n.b9[1]/100;
for(var e=0;e<Z;e++){var M=i[e],I=(M&255)*(1/255),L=(M>>>8&255)*(1/255),H=(M>>>16&255)*(1/255),hK=M>>>24,y=q.sy(I,L,H),iM=y.Sa,hs=y.Ls,S=y.K_,bN=0,eG=45/360,ef=iM<eG?Math.cos(Math.PI/2*(iM-eG/2)/(eG/2)):0;
hs=hs+.2*(1-.4*ef)*eR*Math.max(0,Math.sin(hs*Math.PI));hs=hs*(1+gR);hs=Math.max(0,Math.min(1,hs));var p=q.xN(iM,hs,S);
I=p.Q;L=p.l;H=p.O;t[e]=hK<<24|H*255<<16|L*255<<8|I*255}}};dK.Yn=function(n,F,O){l.Ju.Yn(n,F)};dK.oH=function(n,F){var O=q.h0(F,n)*6;
return Math.max(0,Math.min(1,O<0?1+O:1-O))};dK.names={brit:[4,0],levl:[4,1],curv:[4,2],expA:[4,3],vibA:[4,4],hue2:[4,5],blnc:[4,6],blwh:[4,7],phfl:[4,8],mixr:[4,9],clrL:[4,10],nvrt:[4,11],post:[4,12],thrs:[4,13],grdm:[4,14],selc:[4,15],rplc:[4,17]};
dK.jw=["expA","clrL","selc"];dK.fj=[[13,1,1],[13,1,3],[13,1,4],[13,1,11],[13,1,5],[13,1,12]];dK.agh=[[13,1,11],[13,1,12],[13,1,3],[13,1,10]];
dK.fd=[[13,1,1],[13,1,4],[13,1,5]];dK.kK={BrgC:"brit",Lvls:"levl",Crvs:"curv",Exps:"expA",vibrance:"vibA",HStr:"hue2",ClrB:"blnc",BanW:"blwh",photoFilter:"phfl",Invr:"nvrt",Pstr:"post",Thrs:"thrs",GrMp:"grdm",SlcC:"selc",ChnM:"mixr",colorLookup:"clrL",rplc:"rplc"};
dK.BC=function(){var n=JSON.parse(JSON.stringify(dK.kK));delete n.GrMp;n.GdMp="grdm";return n}();dK.ZU={brit:"brightnessEvent",levl:"levels",curv:"curves",expA:"exposure",vibA:"vibrance",hue2:"hueSaturation",blnc:"colorBalance",blwh:"blackAndWhite",phfl:"photoFilter",mixr:"channelMixer",clrL:"colorLookup",nvrt:"invert",post:"posterization",thrs:"thresholdClassEvent",grdm:"gradientMapEvent",selc:"selectiveColor",rplc:"replaceColor"};
dK.keys={levl:[u.ep,u.LG],curv:[u.ep,u.$T],hue2:[u.ep,u.bm],nvrt:[u.ep,u.tx],blnc:[u.ep,u.nS]};dK.Xa=function(n){var F=bS.tc("mixr");
F.Mnch={t:"bool",v:n.pl};function O(I,e){var x={classID:"ChMx"},r={Rd:0,Grn:1,Bl:2,Cnst:4};for(var _ in r)x[_]={t:"UntF",v:{type:"#Prc",val:I[e+r[_]]}};
return{t:"Objc",v:x}}if(n.pl)F.Gry=O(n.G,0);else{F.Rd=O(n.G,0);F.Grn=O(n.G,5);F.Bl=O(n.G,10)}return F};
dK.Jz=function(n){function F(I,x,e){var r={Rd:0,Grn:1,Bl:2,Cnst:4};for(var _ in r)if(I[_])x[e+r[_]]=I[_].v.val}var O={pl:!1,G:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};
if(n.Mnch&&n.Mnch.v)O.pl=!0;if(O.pl)F(n.Gry.v,O.G,0);else{F(n.Rd.v,O.G,0);F(n.Grn.v,O.G,5);F(n.Bl.v,O.G,10)}return O};
var bS={};bS._0=function(n){var F=n.filterID.v;return F>16777215?Y.a2x(F):n.Fltr.v.classID};bS.__=[{Gk:"GEfc"},{Gk:"LnCr"},{Gk:"LqFy",dP:!0},{NL:"3D",Yf:["lightFilterGradient"]},{NL:[24,2],Yf:"Avrg,Blr ,BlrM,boxblur,GsnB,Bokh,MtnB,RdlB,surfaceBlur".split(",")},{NL:[24,4],Yf:"Dspl,Pnch,Plr ,Rple,Shr ,Sphr,Twrl,Wave".split(",")},{NL:[24,6],Yf:["AdNs","Dspc","DstS","Mdn "]},{NL:[24,8],Yf:"ClrH,Crst,Frgm,Mztn,Msc ,Pntl".split(",")},{NL:[24,10],Yf:["Clds","DfrC","LnsF"]},{NL:[24,12],Yf:["Shrp","ShrE","ShrM","smartSharpen","UnsM"]},{NL:[24,14],Yf:"Dfs ,Embs,FndE,oilPaint,Slrz,TrcC,Wnd ".split(",")},{NL:[24,16],Yf:"HghP,Mxm ,Mnm ,Ofst,Rept,Ctoa".split(",")},{NL:"Fourier",Yf:["dDFT","iDFT"]}];
bS.ZU={LqFy:"LqFy",Avrg:"Avrg","Blr ":"blurEvent",BlrM:"blurMethod",boxblur:"boxblur",GsnB:"gaussianBlur",MtnB:"motionBlur",RdlB:"radialBlur",surfaceBlur:"surfaceBlur",lightFilterGradient:"lightFilterGradient",adaptCorrect:"adaptCorrect",Pnch:"pinch","Plr ":"polar",Rple:"ripple","Shr ":"shear",Sphr:"spherize",Twrl:"twirl",Wave:"wave",AdNs:"addNoise",DstS:"dustAndScratches","Mdn ":"median",ClrH:"colorHalftone",Crst:"",Frgm:"",Mztn:"mezzotint","Msc ":"mosaic",Pntl:"",Clds:"clouds",DfrC:"differenceClouds",LnsF:"LnsF",Shrp:"sharpen",ShrM:"sharpenMore",smartSharpen:"smartSharpen",UnsM:"unsharpMask",FndE:"findEdges",oilPaint:"oilPaint",HghP:"highPass","Mxm ":"maximum","Mnm ":"minimum",Ofst:"offset"};
bS.vO={AddNoise:"AdNs",Average:"Avrg",Blur:"Blr ",BlurMore:"BlrM",Clouds:"Clds",DifferenceClouds:"DfrC",DustAndScratches:"DstS",GaussianBlur:"GsnB",HighPass:"HghP",Maximum:"Mxm ",Minimum:"Mnm ",MotionBlur:"MtnB",Offset:"Ofst",Pinch:"Pnch",PolarCoordinates:"Plr ",Ripple:"Rple",Sharpen:"Shrp",SharpenMore:"ShrM",Twirl:"Twrl",UnsharpMask:"UnsM"};
bS.Ac={rigidTransform:c.bU};bS.names={lightFilterGradient:"Normal Map",rigidTransform:[10,46],LnCr:[24,1,1,0],LqFy:[24,1,0,0],GEfc:[24,0],Avrg:[24,3,0],"Blr ":[24,3,1],BlrM:[24,3,2],boxblur:[24,3,3],GsnB:[24,3,4],Bokh:[24,3,5],MtnB:[24,3,6],RdlB:[24,3,7],surfaceBlur:[24,3,10],Dspl:[24,5,0],Pnch:[24,5,1],"Plr ":[24,5,2],Rple:[24,5,3],"Shr ":[24,5,4],Sphr:[24,5,5],Twrl:[24,1,0,1,3],Wave:[24,5,6],AdNs:[24,7,0],Dspc:[24,7,1],DstS:[24,7,2],"Mdn ":[24,7,3],ClrH:[24,9,0],Crst:[24,9,1],Frgm:[24,9,3],Mztn:[24,9,4],"Msc ":[24,9,5],Pntl:[24,9,6],Clds:[24,11,0],DfrC:[24,11,1],LnsF:[24,11,2],Shrp:[24,13,0],ShrE:[24,13,1],ShrM:[24,13,2],smartSharpen:[24,13,3],UnsM:[24,13,4],"Dfs ":[24,15,0],Embs:[24,15,1],FndE:[24,15,3],oilPaint:[24,15,4],Slrz:"Solarize",TrcC:"Trace Contour","Wnd ":"Wind",HghP:[24,17,1],"Mxm ":[24,17,2],"Mnm ":[24,17,3],Ofst:[24,17,4],Rept:[24,17,5],Ctoa:"Color to Alpha",dDFT:"Fourier Transform",iDFT:"Inverse Fourier Transform",adaptCorrect:["VAR0/VAR1",[19,6,0],[19,6,2]]};
bS.tc=function(n){var F=null;if(n=="GEfc")F={__name:"Filter Gallery",classID:"GEfc",GEfs:{t:"VlLs",v:[{t:"Objc",v:ax.tc("GlwE")}]}};
if(n=="LqFy"){var O={HL:5,Sa:5,map:new Float32Array(5*5*2)},I=new Uint8Array(gT.t3(O)),x=[];for(var e=0;
e<I.length;e++)x.push(I[e]);F={__name:"Liquify",classID:"LqFy",LqMe:{t:"tdta",v:x}}}if(n=="rigidTransform"){F={__name:"Puppet Warp",classID:"rigidTransform",null:{t:"obj ",v:[{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Trgt"}}]},rigidType:{t:"bool",v:!0},puppetShapeList:{t:"VlLs",v:[]},PuX0:{t:"doub",v:0},PuX1:{t:"doub",v:1e3},PuX2:{t:"doub",v:1e3},PuX3:{t:"doub",v:0},PuY0:{t:"doub",v:0},PuY1:{t:"doub",v:0},PuY2:{t:"doub",v:1e3},PuY3:{t:"doub",v:1e3}}}if(n=="LnCr")F={__name:"Lens Correction",classID:"LnCr",LnAg:{t:"bool",v:!0},LnAc:{t:"bool",v:!1},LnAv:{t:"bool",v:!1},LnAs:{t:"bool",v:!1},LnIp:{t:"bool",v:!1},LnFo:{t:"doub",v:0},LnPr:{t:"TEXT",v:""},LnIa:{t:"doub",v:0},LnI0:{t:"doub",v:0},LnI1:{t:"doub",v:0},LnI2:{t:"doub",v:0},LnI3:{t:"doub",v:1},LnRa:{t:"doub",v:0},LnVp:{t:"doub",v:0},LnHp:{t:"doub",v:0},LnSi:{t:"doub",v:100},LnFt:{t:"long",v:2},LnSb:{t:"doub",v:0},LnSt:{t:"long",v:50},LnRc:{t:"doub",v:0},LnGm:{t:"doub",v:0},LnBy:{t:"doub",v:0},LnNa:{t:"long",v:64},LnIh:{t:"long",v:0},LnIv:{t:"long",v:0},LnIs:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:127},Grn:{t:"doub",v:127},Bl:{t:"doub",v:127}}},LnNm:{t:"bool",v:!1}};
if(n=="adaptCorrect")F={__name:"Shadow/Highlight",classID:"adaptCorrect",sdwM:{t:"Objc",v:{__name:"Parameters",classID:"adaptCorrectTones",Amnt:{t:"UntF",v:{type:"#Prc",val:50}},Wdth:{t:"UntF",v:{type:"#Prc",val:25}},Rds:{t:"long",v:12}}},hglM:{t:"Objc",v:{__name:"Parameters",classID:"adaptCorrectTones",Amnt:{t:"UntF",v:{type:"#Prc",val:0}},Wdth:{t:"UntF",v:{type:"#Prc",val:0}},Rds:{t:"long",v:0}}},BlcC:{t:"doub",v:0},WhtC:{t:"doub",v:0},Cntr:{t:"long",v:0},ClrC:{t:"long",v:0}};
if(n=="Dfs ")F={__name:"Diffuse",classID:"Dfs",Md:{t:"enum",v:{DfsM:"Nrml"}},FlRs:{t:"long",v:14061024}};
if(n=="Embs")F={__name:"Emboss",classID:"Embs",Angl:{t:"long",v:45},Hght:{t:"long",v:5},Amnt:{t:"long",v:100}};
if(n=="oilPaint")F={__name:"Oil Paint",classID:"oilPaint",lightingOn:{t:"bool",v:!0},stylization:{t:"doub",v:3},brushScale:{t:"doub",v:1},microBrush:{t:"doub",v:0},LghD:{t:"long",v:45},specularity:{t:"doub",v:1},cleanliness:{t:"doub",v:2}};
if(n=="TrcC")F={__name:"Trace Contour",classID:"TrcC",Lvl:{t:"long",v:128},Edg:{t:"enum",v:{CntE:"Lwr"}}};
if(n=="Wnd ")F={__name:"Wind",classID:"Wnd",WndM:{t:"enum",v:{WndM:"Wnd"}},Drct:{t:"enum",v:{Drct:"Rght"}}};
if(n=="lightFilterGradient")F={__name:"Generate Normals",classID:"lightFilterGradient",blur:{t:"doub",v:0},textureScale:{t:"doub",v:1},Scl:{t:"doub",v:1},Dtl:{t:"VlLs",v:[{t:"doub",v:1},{t:"doub",v:1},{t:"doub",v:1}]}};
if(n=="boxblur")F={__name:"Box Blur",classID:"boxblur",Rds:{t:"UntF",v:{type:"#Pxl",val:15}}};if(n=="GsnB")F={__name:"Gaussian Blur",classID:"GsnB",Rds:{t:"UntF",v:{type:"#Pxl",val:7.2}}};
if(n=="Bokh")F={__name:"Lens Blur",classID:"Bokh",BkDi:{t:"enum",v:{BtDi:"BeIn"}},BkDp:{t:"long",v:0},BkDs:{t:"bool",v:!1},BkIs:{t:"enum",v:{BtIs:"BeS6"}},BkIb:{t:"doub",v:30},BkIc:{t:"long",v:0},BkIr:{t:"long",v:0},BkSb:{t:"doub",v:0},BkSt:{t:"long",v:255},BkNa:{t:"long",v:0},BkNt:{t:"enum",v:{BtNt:"BeNu"}},BkNm:{t:"bool",v:!1}};
if(n=="MtnB")F={__name:"Motion Blur",classID:"MtnB",Angl:{t:"long",v:0},Dstn:{t:"UntF",v:{type:"#Pxl",val:4}}};
if(n=="RdlB")F={__name:"Radial Blur",classID:"RdlB",Amnt:{t:"long",v:10},BlrM:{t:"enum",v:{BlrM:"Spn"}},BlrQ:{t:"enum",v:{BlrQ:"Gd"}},Cntr:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:.5},Vrtc:{t:"doub",v:.5}}}};
if(n=="surfaceBlur")F={__name:"Surface Blur",classID:"surfaceBlur",Rds:{t:"UntF",v:{type:"#Pxl",val:15}},Thsh:{t:"long",v:15}};
if(n=="Dspl")F={__name:"Displace",classID:"Dspl",HrzS:{t:"long",v:10},VrtS:{t:"long",v:10},DspM:{t:"enum",v:{DspM:"StrF"}},UndA:{t:"enum",v:{UndA:"RptE"}},DspF:{t:"Pth ",v:{sig:"txtu",pth:"file.psd\0"}}};
if(n=="Pnch")F={__name:"Pinch",classID:"Pnch",Amnt:{t:"long",v:-100}};if(n=="Plr ")F={__name:"Polar Coordinates",classID:"Plr",Cnvr:{t:"enum",v:{Cnvr:"RctP"}}};
if(n=="Rple")F={__name:"Ripple",classID:"Rple",Amnt:{t:"long",v:999},RplS:{t:"enum",v:{RplS:"Mdm"}}};
if(n=="Shr ")F={__name:"Shear",classID:"Shr",ShrP:{t:"VlLs",v:[{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:0},Vrtc:{t:"doub",v:1}}},{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:0},Vrtc:{t:"doub",v:128}}}]},UndA:{t:"enum",v:{UndA:"WrpA"}},ShrS:{t:"long",v:0},ShrE:{t:"long",v:1}};
if(n=="Sphr")F={__name:"Spherize",classID:"Sphr",Amnt:{t:"long",v:100},SphM:{t:"enum",v:{SphM:"Nrml"}}};
if(n=="Twrl")F={__name:"Twirl",classID:"Twrl",Angl:{t:"long",v:90}};if(n=="Wave")F={__name:"Wave",classID:"Wave",Wvtp:{t:"enum",v:{Wvtp:"WvSn"}},NmbG:{t:"long",v:1},WLMn:{t:"long",v:101},WLMx:{t:"long",v:102},AmMn:{t:"long",v:36},AmMx:{t:"long",v:37},SclH:{t:"long",v:100},SclV:{t:"long",v:100},UndA:{t:"enum",v:{UndA:"WrpA"}},RndS:{t:"long",v:743887}};
if(n=="AdNs")F={__name:"Add Noise",classID:"AdNs",Dstr:{t:"enum",v:{Dstr:"Unfr"}},Nose:{t:"UntF",v:{type:"#Prc",val:20}},Mnch:{t:"bool",v:!1},FlRs:{t:"long",v:100691320}};
if(n=="DstS")F={__name:"Dust & Scratches",classID:"DstS",Rds:{t:"long",v:2},Thsh:{t:"long",v:26}};if(n=="Mdn ")F={__name:"Median",classID:"Mdn",Rds:{t:"UntF",v:{type:"#Pxl",val:7}}};
if(n=="ClrH")F={__name:"Color Halftone",classID:"ClrH",Rds:{t:"long",v:8},Ang1:{t:"long",v:10},Ang2:{t:"long",v:40},Ang3:{t:"long",v:70},Ang4:{t:"long",v:80}};
if(n=="Crst")F={__name:"Crystallize",classID:"Crst",ClSz:{t:"long",v:10},FlRs:{t:"long",v:1554929224}};
if(n=="Mztn")F={__name:"Mezzotint",classID:"Mztn",MztT:{t:"enum",v:{MztT:"FnDt"}},FlRs:{t:"long",v:204994187}};
if(n=="Msc ")F={__name:"Mosaic",classID:"Msc",ClSz:{t:"UntF",v:{type:"#Pxl",val:12}}};if(n=="Pntl")F={__name:"Pointillize",classID:"Pntl",ClSz:{t:"long",v:10},FlRs:{t:"long",v:1554929236}};
if(n=="LnsF")F={__name:"Lens Flare",classID:"LnsF",Brgh:{t:"long",v:100},FlrC:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:.19140625},Vrtc:{t:"doub",v:.185628741979599}}},Lns:{t:"enum",v:{Lns:"Zm"}}};
if(n=="smartSharpen")F={__name:"Smart Sharpen",classID:"smartSharpen",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},useLegacy:{t:"bool",v:!1},Amnt:{t:"UntF",v:{type:"#Prc",val:150}},Rds:{t:"UntF",v:{type:"#Pxl",val:1}},noiseReduction:{t:"UntF",v:{type:"#Prc",val:0}},blur:{t:"enum",v:{blurType:"GsnB"}}};
if(n=="UnsM")F={__name:"Unsharp Mask",classID:"UnsM",Amnt:{t:"UntF",v:{type:"#Prc",val:142}},Rds:{t:"UntF",v:{type:"#Pxl",val:4.5}},Thsh:{t:"long",v:0}};
if(n=="HghP")F={__name:"High Pass",classID:"HghP",Rds:{t:"UntF",v:{type:"#Pxl",val:3}}};if(n=="Mxm ")F={__name:"Maximum",classID:"Mxm",Rds:{t:"UntF",v:{type:"#Pxl",val:9}}};
if(n=="Mnm ")F={__name:"Minimum",classID:"Mnm",Rds:{t:"UntF",v:{type:"#Pxl",val:14}}};if(n=="Ofst")F={__name:"Offset",classID:"Ofst",Hrzn:{t:"long",v:144},Vrtc:{t:"long",v:278},Fl:{t:"enum",v:{FlMd:"Wrp"}}};
if(n=="Rept")F={__name:"Repeat",classID:"Rept",Scl:{v:{type:"#Prc",val:100},t:"UntF"},Rsft:{v:{type:"#Prc",val:0},t:"UntF"},SpcX:{v:{type:"#Prc",val:0},t:"UntF"},SpcY:{v:{type:"#Prc",val:0},t:"UntF"},SpcC:{t:"bool",v:!1},Angl:{t:"long",v:0}};
if(n=="Ctoa")F={__name:"Color to Alpha",classID:"Ctoa",Trsp:{v:{type:"#Prc",val:0},t:"UntF"},Opct:{v:{type:"#Prc",val:100},t:"UntF"},Clr:{v:{classID:"RGBC",Rd:{v:0,t:"doub"},Grn:{v:0,t:"doub"},Bl:{v:0,t:"doub"}},t:"Objc"}};
if(n=="brit")F={__name:"Brightness/Contrast",classID:"BrgC",Brgh:{t:"long",v:0},Cntr:{t:"long",v:0},useLegacy:{t:"bool",v:!1}};
if(n=="levl")F={__name:"Levels",classID:"Lvls",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Adjs:{t:"VlLs",v:[]}};
if(n=="curv")F={__name:"Curves",classID:"Crvs",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Adjs:{t:"VlLs",v:[]}};
if(n=="expA")F={__name:"Exposure",classID:"Exps",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Exps:{t:"doub",v:0},Ofst:{t:"doub",v:0},gammaCorrection:{t:"doub",v:1}};
if(n=="vibA")F={__name:"Vibrance",classID:"vibrance",vibrance:{t:"long",v:0},Strt:{t:"long",v:0}};if(n=="hue2")F={__name:"Hue/Saturation",classID:"HStr",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Clrz:{t:"bool",v:!1},Adjs:{t:"VlLs",v:[]}};
if(n=="blnc")F={__name:"Color Balance",classID:"ClrB",ShdL:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:0}]},MdtL:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:0}]},HghL:{t:"VlLs",v:[{t:"long",v:0},{t:"long",v:0},{t:"long",v:0}]},PrsL:{t:"bool",v:!0}};
if(n=="blwh")F={__name:"Black & White",classID:"BanW",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Rd:{t:"long",v:40},Yllw:{t:"long",v:85},Grn:{t:"long",v:204},Cyn:{t:"long",v:60},Bl:{t:"long",v:20},Mgnt:{t:"long",v:80},useTint:{t:"bool",v:!0},tintColor:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:0},Grn:{t:"doub",v:0},Bl:{t:"doub",v:0}}}};
if(n=="phfl")F={__name:"Photo Filter",classID:"photoFilter",Clr:{t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:67.06},A:{t:"doub",v:32},B:{t:"doub",v:120}}},Dnst:{t:"long",v:80},PrsL:{t:"bool",v:!0}};
if(n=="grdm")F={__name:"Gradient Map",classID:"GrMp",Rvrs:{t:"bool",v:!1},Grad:JSON.parse(bW.E5[6]).Grad};
if(n=="selc")F={__name:"Selective Color",classID:"SlcC",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Mthd:{t:"enum",v:{CrcM:"Rltv"}},ClrC:{t:"VlLs",v:[]}};
if(n=="thrs")F={__name:"Threshold",classID:"Thrs",Lvl:{t:"long",v:128}};if(n=="mixr")F={__name:"Channel Mixer",classID:"ChnM",presetKind:{t:"enum",v:{presetKindType:"presetKindDefault"}},Rd:{t:"Objc",v:{classID:"ChMx",Rd:{t:"UntF",v:{type:"#Prc",val:100}}}},Grn:{t:"Objc",v:{classID:"ChMx",Grn:{t:"UntF",v:{type:"#Prc",val:100}}}},Bl:{t:"Objc",v:{classID:"ChMx",Bl:{t:"UntF",v:{type:"#Prc",val:100}}}}};
if(n=="clrL")F={__name:"Color Lookup",classID:"colorLookup"};if(n=="post")F={__name:"Posterize",classID:"Pstr",Lvls:{t:"long",v:3}};
if(n=="rplc")F={__name:"Replace Color",classID:"RplC",Fzns:{t:"long",v:55},Mnm:{t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:73.1},A:{t:"doub",v:23.95},B:{t:"doub",v:8.03}}},Mxm:{t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:73},A:{t:"doub",v:23},B:{t:"doub",v:8}}},H:{t:"long",v:-22},Strt:{t:"long",v:100},Lght:{t:"long",v:2}};
if(n=="fade")F={__name:"Fade",classID:"fade",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}};
if(n=="aply")F={classID:"null",With:{t:"Objc",v:{classID:"Clcl",T:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:"RGB"}},{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Mrgd"}}]},Invr:{t:"bool",v:!1},Clcl:{t:"enum",v:{Clcn:"Nrml"}},Opct:{t:"UntF",v:{type:"#Prc",val:100}},PrsT:{t:"bool",v:!1}}}};
if(n=="blendOptions")F={classID:"blendOptions",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}};
return F};bS.rn={sAdNs:function(n,F){F[0]=n.Nose.v.val;F[1]=["Gsn","Unfr"].indexOf(n.Dstr.v.Dstr);F[2]=n.Mnch.v},gAdNs:function(n,F){n.Nose.v.val=F[0];
n.Dstr.v.Dstr=["Gsn","Unfr"][F[1]];n.Mnch.v=F[2]},sDstS:function(n,F){F[0]=n.Rds.v;F[1]=n.Thsh.v},gDstS:function(n,F){n.Rds.v=F[0];
n.Thsh.v=F[1]},sGsnB:function(n,F){F[0]=n.Rds.v.val},gGsnB:function(n,F){n.Rds.v.val=F[0]},sHghP:function(n,F){F[0]=n.Rds.v.val},gHghP:function(n,F){n.Rds.v.val=F[0]},"sMxm ":function(n,F){F[0]=n.Rds.v.val},"gMxm ":function(n,F){n.Rds.v.val=F[0]},"sMnm ":function(n,F){F[0]=n.Rds.v.val},"gMnm ":function(n,F){n.Rds.v.val=F[0]},sMtnB:function(n,F){F[0]=n.Angl.v;
F[1]=n.Dstn.v.val},gMtnB:function(n,F){n.Angl.v=typeof F[0]=="number"?F[0]:F[0].Wr;n.Dstn.v.val=F[1]},sOfst:function(n,F){F[0]=n.Hrzn.v;
F[1]=n.Vrtc.v;F[2]=["Rpt","Bckg","Wrp"].indexOf(n.Fl.v.FlMd)},gOfst:function(n,F){n.Hrzn.v=F[0];n.Vrtc.v=F[1];
n.Fl.v.FlMd=["Rpt","Bckg","Wrp"][F[2]]},sPnch:function(n,F){F[0]=n.Amnt.v},gPnch:function(n,F){n.Amnt.v=F[0]},"sPlr ":function(n,F){F[0]=["RctP","PlrR"].indexOf(n.Cnvr.v.Cnvr)},"gPlr ":function(n,F){n.Cnvr.v.Cnvr=["RctP","PlrR"][F[0]]},sRple:function(n,F){F[0]=n.Amnt.v;
F[1]=["Sml","Mdm","Lrg"].indexOf(n.RplS.v.RplS)},gRple:function(n,F){n.Amnt.v=F[0];n.RplS.v.RplS=["Sml","Mdm","Lrg"][F[1]]},sTwrl:function(n,F){F[0]=n.Angl.v},gTwrl:function(n,F){n.Angl.v=F[0]},sUnsM:function(n,F){F[0]=n.Amnt.v.val;
F[1]=n.Rds.v.val;F[2]=n.Thsh.v},gUnsM:function(n,F){n.Amnt.v.val=F[0];n.Rds.v.val=F[1];n.Thsh.v=F[2]}};
bS.ad1=function(n){var F=new aE(0,0);if(n.enab.v==!1)return F;var O=n.filterFXList.v;for(var e=0;e<O.length;
e++){var I=O[e].v;if(I.enab.v==!1)continue;var x=bS._0(I),r=bS.wE(x,I.Fltr?I.Fltr.v:null);if(r.x>F.x)F.x=r.x;
if(r.y>F.y)F.y=r.y}return F};bS.wE=function(n,F){var O=0,I=0;if(["GsnB","boxblur","smartSharpen","UnsM","HghP"].indexOf(n)!=-1){var x=F.Rds.v.val;
O=I=x*2.57}if(n=="MtnB")O=I=F.Dstn.v.val;if("Ofst,Rept,LqFy,Dspl,Pnch,Rple,Shr ,Sphr,Twrl,Wave,RdlB,Clds,DfrC,Plr ,LnCr,Wnd ,lightFilterGradient,rigidTransform,Frgm".split(",").indexOf(n)!=-1){O=I=1e4}if(n=="GEfc")return ax.wE(F);
return new aE(Math.ceil(O),Math.ceil(I))};bS.sN=function(){return{t:"Objc",v:{classID:"filterFXStyle",enab:{t:"bool",v:!0},validAtPosition:{t:"bool",v:!0},filterMaskEnable:{t:"bool",v:!0},filterMaskLinked:{t:"bool",v:!0},filterMaskExtendWithWhite:{t:"bool",v:!0},filterFXList:{t:"VlLs",v:[]}}}};
bS.Lk=function(n,F){var O={Q:F.nE>>16,l:F.nE>>8&255,O:F.nE&255},I={Q:F.sI>>16,l:F.sI>>8&255,O:F.sI&255},x=bS.names[n];
if(x==null)x=dK.names[n];var r=n;for(var _ in dK.kK)if(dK.kK[_]==n)r=_;var d={t:"Objc",v:{classID:"filterFX",Nm:{t:"TEXT",v:hl.get(x)},blendOptions:{t:"Objc",v:{classID:"blendOptions",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}}},enab:{t:"bool",v:!0},hasoptions:{t:"bool",v:!0},FrgC:{t:"Objc",v:q.W.Vm(O)},BckC:{t:"Objc",v:q.W.Vm(I)},filterID:{t:"long",v:r.length==4?Y.aob(r):777}}},w=bS.tc(n);
if(w)d.v.Fltr={t:"Objc",v:w};return d};bS.mV=function(n,F,O,I,x,r,_,d){var w=O*I*4;q.Bk.ai$(n,F,O,I,x,r,_)};
bS.jJ=function(n,F,O,I){q.VE(O);if(n<1){var x=Math.round(n*5),r=[1,2,1,2,[40,26,13,6,4,2][x],2,1,2,1];
r=q.aF.Wl(r);var _=O.slice(0);q.aF.u3(_,O,I.d,I.v,r,255)}else F(O,I,n);q.xR(O)};bS.a7M=function(n,F,O,I){for(var e=0;
e<n.length;e++){O[e]=n[e]*(1/255);I[e]=0}FFT.fft2d(O,I);var x=F>>>1,r=16384,_=128,w=100;while(_<F){_<<=1;
r<<=2}var d=255/Math.log(r),Z=-100;for(var P=0;P<F;P++)for(var C=0;C<x;C++){var W=F+x+P&F-1,v=O[W*F+C],L=I[W*F+C],H=Math.sqrt(v*v+L*L),y=Math.atan2(L,v);
n[P*F+C]=Math.round(d*Math.log(H+1));n[P*F+x+C]=Math.round((Math.PI+y)*(255*.5/Math.PI))}};bS.akO=function(n,F,O,I){O.fill(0);
I.fill(0);var x=F>>>1,r=16384,_=128;while(_<F){_<<=1;r<<=2}var d=255/Math.log(r),w=[],Z=[],P=[];for(var e=0;
e<256;e++){w[e]=Math.exp(e/d)-1;var C=e*(2*Math.PI/255)-Math.PI;Z[e]=Math.sin(C);P[e]=Math.cos(C)}for(var W=0;
W<F;W++)for(var v=0;v<x;v++){var L=F+x+W&F-1,H=w[n[W*F+v]],C=n[W*F+x+v],y=H*P[C],g=H*Z[C];O[L*F+v]=y;
I[L*F+v]=g;if(v!=0){var Q=L==0?L*F+F-v:(F-L)*F+(F-v);O[Q]=y;I[Q]=-g}}FFT.ifft2d(O,I);for(var e=0;e<n.length;
e++){n[e]=Math.max(0,Math.min(255,~~(.5+255*O[e])))}};bS.EB=new ArrayBuffer(512);bS.alG=function(n){var F=bS.EB,O=n.length;
if(F.byteLength<O)bS.EB=F=new ArrayBuffer(O);var I=new Uint8Array(F);for(var e=0;e<O;e+=4){I[e]=n[e];
I[e+1]=n[e+1];I[e+2]=n[e+2];I[e+3]=n[e+3]}return F};bS.Fl=function(n,F,O,I,x,r,_){if(r==null)r={buffer:q.f(F.buffer.length),rect:F.rect.clone()};
q.Ct(F.buffer,r.buffer);if(n=="GEfc"){var d=[];if(O.GEfs){var w=O.GEfs.v;for(var e=0;e<w.length;e++){var Z=w[e].v;
if(Z.GELv&&Z.GELv.v==!1)continue;d.push(Z)}}else d=[O];for(var e=0;e<d.length;e++){var P;if(e==0)ax.Fl(n,F,d[e],I,x,r,_);
else{if(P==null)P={buffer:q.f(F.buffer.length),rect:F.rect.clone()};q.Ct(r.buffer,P.buffer);ax.Fl(n,P,d[e],I,x,r,_)}}}if(n=="adaptCorrect"){var C=F.rect,W=C.d,v=C.v,L=W*v,H=L*4,y=O.sdwM.v,g=y.Amnt.v.val/100,Q=y.Wdth.v.val/100,J=y.Rds.v,A=O.hglM.v,p=A.Amnt.v.val/100,U=A.Wdth.v.val/100,j=A.Rds.v;
q.Kl.a0T(F.buffer,r.buffer,W,v,g,Q,J,p,U,j,O.ClrC.v/100,O.Cntr.v/100)}if(n=="Fbrs"){var C=F.rect,W=C.d,v=C.v,b=q.f(W*v),s=Date.now(),G=1,T=1-G;
for(var e=0;e<W*100;e++){var z=Math.random()*W;for(var m=0;m<v;m++){var $=~~(z+4096)&511;b[m*W+$]=Math.min(255,b[m*W+$]+1);
var o=Math.random();z=z-G+o*2*G}}q.uZ(b);r.buffer.fill(255);q.GN(b,r.buffer)}if(n=="Frgm"){var C=F.rect,W=C.d,v=C.v,h=F.buffer.slice(0);
q.VE(h);q.y8.amc(h,W,v,r.buffer);q.xR(r.buffer)}if(n=="Dfs "){var C=F.rect,W=C.d,v=C.v,X=["Nrml","DrkO","LghO","anisotropic"].indexOf(O.Md.v.DfsM);
if(X<3)q.y8.a9j(F.buffer,W,v,r.buffer,[X]);else{var D=[1.4,1.6,1,4,!1,2,[0,0,.001]],C=F.rect.clone();
C.x=C.y=0;q.FO.filter(F.buffer,C,r.buffer,D)}}if(n=="TrcC"){var C=F.rect,W=C.d,f=W<<2,v=C.v,R=O.Lvl.v,i=O.Edg.v.CntE=="Lwr",t=F.buffer,N=r.buffer;
q.IW(N,16777215,4278190080);function hK(i5,bg){co(i5,bg);co(i5+1,bg+1);co(i5+2,bg+2)}function bD(i5,bg){iM(i5,bg);
iM(i5+1,bg+1);iM(i5+2,bg+2)}function co(i5,bg){var fV=t[i5],hD=t[bg];if(fV>=R&&hD<R)N[i5]=0;if(fV<R&&hD>=R)N[bg]=0}function iM(i5,bg){var fV=t[i5],hD=t[bg];
if(fV>R&&hD<=R)N[bg]=0;if(fV<=R&&hD>R)N[i5]=0}if(i)for(var m=1;m<v;m++)for(var z=1;z<W;z++){var hs=m*W+z<<2;
hK(hs,hs-4);hK(hs,hs-f)}else for(var m=1;m<v;m++)for(var z=1;z<W;z++){var hs=m*W+z<<2;bD(hs,hs-4);bD(hs,hs-f)}}if(n=="Embs"){var C=F.rect,W=C.d,v=C.v,S=-O.Angl.v*Math.PI/180,a=O.Hght.v,bV=O.Amnt.v/100;
a/=2;var a5=Math.cos(S)*a,i9=Math.sin(S)*a,t=F.buffer,N=r.buffer;N.fill(0);var dG=new Uint32Array(t.buffer),ap=new Uint8Array(4),bk=new Uint32Array(ap.buffer);
for(var m=0;m<v;m++)for(var z=0;z<W;z++){var c2=0,gg=0,bH=0;if(0<=z+a5&&z+a5<W&&0<=m+i9&&m+i9<v){q.J.Uo(z+a5+.5,m+i9+.5,dG,W,v,bk,0,0);
c2+=ap[0]-128;gg+=ap[1]-128;bH+=ap[2]-128}if(0<=z-a5&&z-a5<W&&0<=m-i9&&m-i9<v){q.J.Uo(z-a5+.5,m-i9+.5,dG,W,v,bk,0,0);
c2-=ap[0]-128;gg-=ap[1]-128;bH-=ap[2]-128}var hs=m*W+z<<2;N[hs]=Math.max(0,Math.min(255,c2*bV+128));
N[hs+1]=Math.max(0,Math.min(255,gg*bV+128));N[hs+2]=Math.max(0,Math.min(255,bH*bV+128));N[hs+3]=t[hs+3]}}if(n=="ShrE"){var C=F.rect,W=C.d,v=C.v;
q.y8.am4(F.buffer,W,v,r.buffer)}if(n=="Dspc"){var C=F.rect,W=C.d,v=C.v;q.y8.aav(F.buffer,W,v,r.buffer)}if(n=="Slrz"){var gw=r.buffer,gP=128;
for(var e=0;e<gw.length;e+=4){if(gw[e]>gP)gw[e]=255-gw[e];if(gw[e+1]>gP)gw[e+1]=255-gw[e+1];if(gw[e+2]>gP)gw[e+2]=255-gw[e+2]}}if(n=="Wnd "){var C=F.rect,W=C.d,v=C.v,dT=["Wnd","Blst","Stgr"],fU=O.WndM.v.WndM;
q.y8.cU(F.buffer,W,v,r.buffer,[dT.indexOf(fU),O.Drct.v.Drct!="Left"])}if(n=="Bokh"){var C=F.rect,W=C.d,v=C.v,L=W*v,H=L*4,dV=F.buffer.slice(0),ac=O.BkDi.v.BtDi,e2=O.BkDc,cX=O.BkDp.v/255;
if(ac=="BeIn")cX=0;var eR=57*(.3+.7*((W+v)/2)/1750)*(O.BkIb.v/100)*(1+.2*Math.pow(cX,.1)),E=parseInt(O.BkIs.v.BtIs.slice(3)),gR=-O.BkIr.v*Math.PI/180,bN=[];
for(var e=0;e<8;e++){var eG=gR+e*(Math.PI*2/E),ef=gR+(e+1)*(Math.PI*2/E),fi=Math.cos(eG),ep=Math.sin(eG),iJ=Math.cos(ef),aT=Math.sin(ef),dm=[0,0,0];
q.PS.bM([[fi,ep,1,0],[iJ,aT,1,0],[1,1,1,1]],dm);if(dm[2]>0){dm[0]*=-1;dm[1]*=-1;dm[2]*=-1}bN.push(dm[0],dm[1],dm[2],0)}if(ac=="BeIn"){q.IW(dV,0,16777215);
cX=1}else if(ac=="BeIt"&&e2.v.BtDc=="BeCt"){}else{var c1;if(ac=="BeIt"&&e2.v.BtDc=="BeCm")c1=_[1];else if(ac=="BeIa")c1=_[2][e2.v];
if(c1==null){q.IW(dV,0,16777215)}else{var gk;if(c1.rect.Qq(C))gk=c1.channel;else gk=c1.Uz(C);q.GF(gk,dV,3)}}if(l.Z0){var a8=dV,bX=W,bL=v,c_=1,eS=(O.BkSb.v==0||O.BkSt.v==255)&&ac=="BeIn";
if(!eS){var c$=0;for(var e=0;e<H;e+=4)c$+=Math.abs(cX-dV[e+3]*(1/255));c$=c$/L*eR;var cp=3.14*c$*c$*W*v/3e6;
if(cp>2e3){alert("too large radius");return}}while(eS&&3*(eR/c_)*(eR/c_)*W*v>500*2e3*2e3){var b_=q.B5(dV,new gv(0,0,bX,bL));
dV=b_.zc;bX=b_.rect.d;bL=b_.rect.v;c_*=2}var s=Date.now(),hy=l.Y0(0,bX,bL);hy.set(dV);var gx=l.Y0(1,W,v);
l.wu(gx);l.filter.Yn({type:l.filter.pM,Rl:new Float32Array([1/bX,1/bL]),ahg:cX,akP:eR/c_,ah5:new Float32Array([O.BkSb.v/100,O.BkSt.v/255]),ac5:new Float32Array([O.BkNa.v/100,O.BkNt.v.BtNt=="BeNu"?0:1,O.BkNm.v?1:0]),aaM:new Float32Array(bN.slice(0,16)),akV:new Float32Array(bN.slice(16))},hy.sg);
gx.get(r.buffer);var eJ=r.buffer;for(var e=0;e<H;e+=4)eJ[e+3]=F.buffer[e+3]}}if(n=="rigidTransform"){var s=Date.now(),d4=bS.alG,hy=F.buffer.slice(0),ez=0,d6=0;
q.VE(hy);q.IW(r.buffer,0);var W=F.rect.d,v=F.rect.v,cs=O.puppetShapeList.v,en=[],cm=[],c5=[],fK=[];for(var ee=0;
ee<cs.length;ee++){var c0=cs[ee].v,gq=ez*2,ei=d6*3,d9=c0.originalVertexArray.v.length>>>2,iK=c0.indexArray.v.length>>>2,gu=new Float32Array(d4(c0.originalVertexArray.v));
for(var e=0;e<d9;e++)en[gq+e]=gu[e];var eA=new Float32Array(d4(c0.deformedVertexArray.v));for(var e=0;
e<d9;e++)cm[gq+e]=eA[e];var cE=new Uint32Array(d4(c0.indexArray.v));for(var e=0;e<iK;e++)c5[ei+e]=ez+cE[e];
var iU=[],eI=[],ad=c0.PnDp.v;for(var e=0;e<ad.length;e++){iU.push(c0.pinVertexIndices.v[e].v);eI.push(ad[e].v)}var d_=q.vr.acu(gu,cE,iU,eI);
for(var e=0;e<d_.length;e++)fK[ez+e]=d_[e];ez+=d9>>>1;d6+=~~(iK/3)}var c9=F.rect,W=c9.d,v=c9.v;q.vr.mH(hy,W,v,r.buffer,W,v,en,cm,fK,c5);
q.xR(r.buffer)}if(n=="lightFilterGradient"){function ek(hQ){var fV=1/Math.sqrt(hQ[0]*hQ[0]+hQ[1]*hQ[1]+hQ[2]*hQ[2]);
hQ[0]*=fV;hQ[1]*=fV;hQ[2]*=fV}var W=F.rect.d,v=F.rect.v,L=W*v,s=Date.now(),fX=q.f(L),hD=.3,hf=.7;q.L2(r.buffer,fX);
var fo=q.f(L);q.Mo.MU(fX,fo,r.rect,16);var eY=q.f(L);q.Mo.MU(fX,eY,r.rect,8);var hG=fX,b=new Float32Array(L),aY=O.Dtl.v,gK=aY[2].v,b$=aY[1].v,c4=aY[0].v,gA=O.Scl.v*40*O.textureScale.v/(gK+b$+c4);
gK*=gA;b$*=gA;c4*=gA;for(var e=0;e<L;e++){var f7=fo[e]*(1/255),aZ=eY[e]*(1/255),cG=hG[e]*(1/255);cG=cG*cG;
b[e]=gK*f7+b$*aZ+c4*cG}var bb=O.blur.v;if(bb!=0){var dR=b.slice(0);q.Mo.QA(dR,b,r.rect,bb)}var iy=W-1,e7=v-1;
for(var m=1;m<e7;m++)for(var z=1;z<iy;z++){var e=m*W+z,hs=e*4,fv=b[e],a5=hD*(b[e+1]-fv)+hf*(fv-b[e-1]),i9=hD*(b[e+W]-fv)+hf*(fv-b[e-W]),hQ=[1,0,a5],a4=[0,1,i9];
ek(hQ);ek(a4);var ef=hQ[0],hY=hQ[2],ga=a4[1],fQ=a4[2],el=-hY*ga,dX=-ef*fQ,cT=ef*ga;r.buffer[hs]=~~(127.5+el*127.5);
r.buffer[hs+1]=~~(127.5+dX*127.5);r.buffer[hs+2]=~~(127.5+cT*127.5)}}if(n=="dDFT"||n=="iDFT"){function bq(E){if(E==0)return 1;
E--;E|=E>>1;E|=E>>2;E|=E>>4;E|=E>>8;E|=E>>16;return E+1}var W=F.rect.d,v=F.rect.v,ea=bq(Math.max(W,v)),eP=ea>>>1,ds=new gv(0,0,ea,ea),c8=new gv(0,0,W,v);
c8.y=ea-v>>>1;var f$=W>>>1,gi=new gv(0,c8.y,f$,v),ar=new q.zF(W*v);q.WU(F.buffer,ar);var iP=new Float64Array(ea*ea),cx=new Float64Array(ea*ea),gk=q.f(ea*ea);
FFT.init(ea);var gU=[ar.Q,ar.l,ar.O];for(var e=0;e<3;e++){var eF=gU[e];gk.fill(0);if(n=="dDFT"){q.k9(eF,c8,gk,ds);
bS.a7M(gk,ea,iP,cx);q.k9(gk,ds,eF,c8,gi);gi.x+=f$;ds.x-=eP-f$;q.k9(gk,ds,eF,c8,gi);gi.x-=f$;ds.x+=eP-f$}else{q.k9(eF,c8,gk,ds,gi);
gi.x+=eP;c8.x+=eP-f$;q.k9(eF,c8,gk,ds,gi);gi.x-=eP;c8.x-=eP-f$;bS.akO(gk,ea,iP,cx);q.k9(gk,ds,eF,c8)}}q.Eb(ar,r.buffer)}if(n=="Avrg"){var cI=0,bZ=0,hL=0,f2=0,eq=1;
for(var e=0;e<F.buffer.length;e+=4){var gC=F.buffer[e+3];hL+=F.buffer[e]*gC;bZ+=F.buffer[e+1]*gC;cI+=F.buffer[e+2]*gC;
f2+=gC}var b6=1/f2;cI=Math.round(eq*(cI*b6)+(1-eq)*255);bZ=Math.round(eq*(bZ*b6)+(1-eq)*255);hL=Math.round(eq*(hL*b6)+(1-eq)*255);
q.IW(r.buffer,cI<<16|bZ<<8|hL,4278190080)}if(["GsnB","boxblur","smartSharpen","UnsM","HghP"].indexOf(n)!=-1){var cw=O.Rds.v.val,hi=n=="boxblur"?q.Mo._G:q.Mo.a61;
bS.jJ(cw,hi,r.buffer,r.rect);if(n=="UnsM"||n=="smartSharpen"){var bV=O.Amnt.v.val/100,a0=0;if(n=="UnsM")a0=O.Thsh.v;
else bV*=.75;for(var e=0;e<F.buffer.length;e++){if((e&3)==3){r.buffer[e]=F.buffer[e];continue}var fJ=F.buffer[e],gQ=r.buffer[e],fh=bV*(fJ-gQ);
if(fh>0)fh=Math.max(0,fh-a0);else fh=Math.min(0,fh+a0);r.buffer[e]=Math.max(0,Math.min(255,fJ+fh))}}if(n=="HghP")for(var e=0;
e<F.buffer.length;e++){if((e&3)==3){r.buffer[e]=F.buffer[e];continue}var fJ=F.buffer[e],gQ=r.buffer[e];
r.buffer[e]=Math.max(0,Math.min(255,128+fJ-gQ))}}if(n=="surfaceBlur"){var c9=O.Rds.v.val,cK=O.Thsh.v,W=F.rect.d,v=F.rect.v;
bS.mV(F.buffer,r.buffer,W,v,c9,q.Bk.YZ,[cK],2)}if(n=="AdNs"){var a2=new Uint8ClampedArray(r.buffer.buffer),dx=255*O.Nose.v.val/100,dC;
if(O.Dstr.v.Dstr=="Gsn")dC=function(){return(Math.random()+Math.random()+Math.random()+Math.random()-2)*2};
else dC=function(){return Math.random()*2-1};for(var e=0;e<a2.length;e+=4){var c9=a2[e],a6=a2[e+1],bw=a2[e+2],aN,aq,fc;
if(O.Mnch.v){aN=aq=fc=dC()}else{aN=dC();aq=dC();fc=dC()}c9+=dx*aN;a6+=dx*aq;bw+=dx*fc;a2[e]=c9;a2[e+1]=a6;
a2[e+2]=bw}}if(n=="Mdn "||n=="DstS"||n=="Mxm "||n=="Mnm "){var c9=0;if(n=="Mdn "||n=="Mxm "||n=="Mnm ")c9=O.Rds.v.val;
if(n=="DstS")c9=O.Rds.v;q.Bk.qC=.5;var hi=q.Bk.Yc;if(n=="Mxm ")hi=q.Bk.ap;if(n=="Mnm ")hi=q.Bk.PD;var W=F.rect.d,v=F.rect.v,bz={"Mdn ":0,"Mxm ":1,"Mnm ":1,DstS:2}[n];
bS.mV(F.buffer,r.buffer,W,v,c9,hi,[],bz);if(n=="DstS"){var cK=O.Thsh.v;for(var e=0;e<W*v*4;e++){var cj=Math.abs(F.buffer[e]-r.buffer[e]);
if(cj<=cK)r.buffer[e]=F.buffer[e]}}}if(n=="ClrH"){var gi=F.rect.clone();gi.x=gi.y=0;var c9=O.Rds.v;c9=Math.round(c9*Math.sqrt(2));
var W=gi.d,v=gi.v,ar=new q.zF(W*v);q.WU(F.buffer,ar);q.uZ(ar.Q);q.uZ(ar.l);q.uZ(ar.O);var d0=V.w("canvas","");
d0.width=W;d0.height=v;var hx=d0.getContext("2d"),eJ=q.f(W*v*4);for(var eM=0;eM<3;eM++){var gk=eM==0?ar.Q:eM==1?ar.l:ar.O,S=Math.PI*O["Ang"+(eM+1)].v/180,ba=new cD(1/c9,0,0,1/c9,0,0);
ba.rotate(S);q.GF(gk,eJ,3);var ap=c.V.oo([eJ,gi],ba,!0),c8=ap.rect;hx.clearRect(0,0,W,v);var hM=Math.sin(S),gZ=Math.cos(S);
for(var e=0;e<c8.v;e++)for(var br=0;br<c8.d;br++){var z=(br+c8.x+.5)*c9,m=(e+c8.y+.5)*c9,aA=z,bR=m;z=gZ*aA-hM*bR;
m=hM*aA+gZ*bR;var L=ap.buffer[(e*c8.d+br<<2)+3]*(1/255),cw=c9*Math.sqrt(L*(1/Math.PI));hx.beginPath();
hx.arc(z,m,cw,0,2*Math.PI);hx.fill()}var et=hx.getImageData(0,0,W,v);q.xg(et.data,gk,3)}q.uZ(ar.Q);q.uZ(ar.l);
q.uZ(ar.O);q.Eb(ar,r.buffer)}if(n=="Crst"||n=="Pntl"){var W=F.rect.d,v=F.rect.v,hi=n=="Crst"?q.c6.aev:q.c6.a4D;
hi(F.buffer,W,v,r.buffer,O.ClSz.v,[Math.round(x.Q),Math.round(x.l),Math.round(x.O)])}if(n=="Mztn"){var W=F.rect.d,v=F.rect.v,L=W*v,ar=new q.zF(L),iL=[ar.Q,ar.l,ar.O];
q.WU(F.buffer,ar);var fU=O.MztT.v.MztT,bF={FnDt:[.1,0,.3,1.4],MdmD:[.9,0,.1,1.4],GrnD:[3,0,.2,1.4],CrsD:[7,0,.1,1.4],ShrL:[0,10,.16,3],MdmL:[0,22,.06,3],LngL:[0,25,.01,4.5],ShSt:[3,10,.05,4.4],MdmS:[4,25,.15,4],LngS:[4,30,.05,4]}[fU],s=Date.now(),cQ=[];
for(var e=0;e<L;e++){cQ[e]=Math.random()}var L=W*v,dI=Math.round(L*bF[0]),cH=L-W-1;for(var e=0;e<dI;
e++){var o=Math.random(),dE=1;if(o<.5){dE=W;o*=2}else o=2*(o-.5);var i5=Math.floor(o*cH),bg=i5+dE;cQ[i5]=cQ[bg]}var b8=Math.round(W*bF[1]);
for(var m=0;m<v;m++)for(var e=0;e<b8;e++){var o=q.p.GR(m*L+e),i5=m*W+Math.floor(o*(W-1));cQ[i5]=cQ[i5+1]}var f4=new Float64Array(256);
for(var e=0;e<256;e++){var aF=e/255,gH=2*(aF<.5?aF:1-aF);gH=bF[2]+Math.pow(gH,bF[3])*(1-bF[2]);aF=aF<.5?gH*.5:1-gH*.5;
f4[e]=aF}for(var dQ=0;dQ<3;dQ++){var gk=iL[dQ];for(var m=0;m<v;m++){for(var z=0;z<W;z++){var e=m*W+z,hU=gk[e],aF=f4[hU],o=cQ[e];
gk[e]=o>aF?0:255}}}q.Eb(ar,r.buffer)}if(n=="Msc "){var dJ=O.ClSz.v.val,W=F.rect.d,v=F.rect.v,e9=Math.ceil(W/dJ),ht=Math.ceil(v/dJ),fe=q.f(e9*ht*4);
q.scale.qJ(F.buffer,W,v,fe,e9,ht,1/dJ);q.scale.qJ(fe,e9,ht,r.buffer,W,v,dJ)}if(n=="Clds"||n=="DfrC"){var W=r.rect.d,v=r.rect.v,L=W*v,gh=q.f(L);
if(n=="Clds")q.IW(r.buffer,4278190080);var hE=q.f(256*4);for(var e=0;e<256;e++){var hs=e<<2,f1=e/255,cE=1-f1;
hE[hs]=Math.round(f1*I.Q+cE*x.Q);hE[hs+1]=Math.round(f1*I.l+cE*x.l);hE[hs+2]=Math.round(f1*I.O+cE*x.O)}q.y8.a32(F.buffer,W,v,gh);
var ic=r.buffer;for(var e=0;e<L;e++){var hs=e<<2,dQ=gh[e]<<2,c9=hE[dQ],a6=hE[dQ+1],bw=hE[dQ+2];if(n=="Clds"){ic[hs]=c9;
ic[hs+1]=a6;ic[hs+2]=bw}else{ic[hs]=Math.abs(ic[4*e]-c9);ic[hs+1]=Math.abs(ic[4*e+1]-a6);ic[hs+2]=Math.abs(ic[4*e+2]-bw)}}}if(n=="LnsF"){var W=F.rect.d,v=F.rect.v,fU=["Zm","Nkn","Nkn1","PnVs"].indexOf(O.Lns.v.Lns),eh=O.FlrC.v,gz=[Math.min(fU,2),O.Brgh.v/100,eh.Hrzn.v,eh.Vrtc.v],s=Date.now();
q.anE(F.buffer,W,v,r.buffer,gz)}var by=["Blr ","BlrM","Shrp","ShrM"].indexOf(n);if(by!=-1){var au=by>1,W=F.rect.d,v=F.rect.v,gO=q.aF.vy[by],dr=F.buffer.slice(0);
if(!au)q.VE(dr);q.aF.u3(dr,r.buffer,W,v,gO,255,!1,au);if(!au)q.xR(r.buffer)}if(n=="MtnB"){var eo=-O.Angl.v*Math.PI/180,df=O.Dstn.v.val/2,s=Date.now(),W=F.rect.d,v=F.rect.v,C=F.rect.clone();
C.x=C.y=0;if(l.Z0){var s=Date.now(),bu=r.buffer;bu.set(F.buffer);q.VE(bu);var e8=l.Y0(0,W,v);e8.set(bu);
var t=q.f(4);t[0]=Math.round(128+127*Math.cos(eo));t[1]=Math.round(128+127*Math.sin(eo));new Uint32Array(bu.buffer).fill(new Uint32Array(t.buffer)[0]);
var eT=l.Y0(1,W,v);eT.set(bu);l.wu(e8,C);e8.ww(C);l.filter.Yn({type:l.filter.cw,Wt:eT.sg,Rl:new Float32Array([1/W,1/v]),amp:df/2,a2v:1},e8.Lu);
e8.get(bu);q.xR(bu)}else{var ba=new cD;ba.rotate(eo);var ap=c.V.oo([F.buffer,F.rect],ba,!1,null,!0);
bS.jJ(df,q.Mo.o6,ap.buffer,ap.rect);ba.uZ();ap=c.V.oo([ap.buffer,ap.rect],ba,!1,r.buffer.buffer,!0,r.rect)}console.log(Date.now()-s)}if(n=="RdlB"){var W=F.rect.d,v=F.rect.v,bV=O.Amnt.v,dA=O.BlrM.v.BlrM=="Zm",eM=O.Cntr.v,h9=eM.Hrzn.v,fE=eM.Vrtc.v,a5=Math.max(h9,1-h9)*W,i9=Math.max(fE,1-fE)*v,cw=Math.sqrt(a5*a5+i9*i9),dc=2*Math.PI*cw*1.5,ce=Math.round(dc),a9=Math.round(cw),gi=new gv(0,0,ce,a9),bE=q.f(ce*a9*4),gb=dA?4:1,ai=dA?.6:8*((W+v)/2)/1400,ao=.1,c_=1,i4=1;
q.J.ps(F.buffer,W,v,bE,ce,a9,h9,fE,gb,ao,c_,i4);var cC=dA?q.f(ce*a9*4):null;if(dA){q.J.ej(bE,cC,ce,a9);
var eH=cC;cC=bE;bE=eH;gi.d=a9;gi.v=ce}bS.jJ(ai*bV,q.Mo.o6,bE,gi);if(dA){q.J.ej(bE,cC,a9,ce);var eH=cC;
cC=bE;bE=eH;gi.d=ce;gi.v=a9}q.J.dR(bE,ce,a9,r.buffer,W,v,h9,fE,gb,ao,c_,i4)}if(n=="Plr "){var W=F.rect.d,v=F.rect.v;
if(O.Cnvr.v.Cnvr=="RctP")q.J.dR(F.buffer,W,v,r.buffer,W,v,.5,.5,1,0,2,W/v);else q.J.ps(F.buffer,W,v,r.buffer,W,v,.5,.5,1,0,2,W/v)}if(n=="FndE"){var W=F.rect.d,v=F.rect.v;
q.aF.jt(F.buffer,r.buffer,W,v)}if(n=="oilPaint"){var S=O.LghD.v*Math.PI/180,cv=[Math.cos(S),Math.sin(S),.001],D=[O.stylization.v,O.cleanliness.v,O.brushScale.v,O.microBrush.v,O.lightingOn.v,O.specularity.v,cv],C=F.rect.clone();
C.x=C.y=0;q.FO.filter(F.buffer,C,r.buffer,D)}if(n=="Ofst"){var W=F.rect.d,v=F.rect.v,dN=new Uint32Array(F.buffer.buffer),b5=new Uint32Array(r.buffer.buffer),aA=O.Hrzn.v,bR=O.Vrtc.v,d8=O.Fl.v.FlMd;
q.IW(b5,0);if(d8=="Bckg"||d8=="Rpt"){var gi=F.rect.clone();gi.offset(aA,bR);q.nF(dN,gi,b5,r.rect)}if(d8=="Rpt"){var fi,ep,iJ,aT,gn;
aA=Math.max(-W,Math.min(W,aA));bR=Math.max(-v,Math.min(v,bR));fi=aA>0?aA:0;iJ=aA>0?W:W+aA;ep=bR>0?0:bR+v;
aT=bR>0?bR:v;gn=bR>0?0:W*(v-1);for(var m=ep;m<aT;m++)for(var z=fi;z<iJ;z++)b5[m*W+z]=dN[gn+z-aA];fi=aA>0?0:W+aA;
iJ=aA>0?aA:W;ep=bR>0?bR:0;aT=bR>0?v:v+bR;gn=aA>0?0:W-1;for(var m=ep;m<aT;m++)for(var z=fi;z<iJ;z++)b5[m*W+z]=dN[gn+W*(m-bR)];
if(aA>=0&&bR>=0){fi=0;iJ=aA;ep=0;aT=bR;gn=0}if(aA>=0&&bR<0){fi=0;iJ=aA;ep=v+bR;aT=v;gn=W*(v-1)}if(aA<0&&bR>=0){fi=W+aA;
iJ=W;ep=0;aT=bR;gn=W-1}if(aA<0&&bR<0){fi=W+aA;iJ=W;ep=v+bR;aT=v;gn=W*v-1}for(var m=ep;m<aT;m++)for(var z=fi;
z<iJ;z++)b5[m*W+z]=dN[gn]}if(d8=="Wrp"){aA=(aA+100*W)%W;bR=(bR+100*v)%v;var gi=new gv(aA-W,bR-v,W,v);
q.nF(dN,gi,b5,r.rect);gi.offset(W,0);q.nF(dN,gi,b5,r.rect);gi.offset(0,v);q.nF(dN,gi,b5,r.rect);gi.offset(-W,0);
q.nF(dN,gi,b5,r.rect)}}if(n=="Rept"){var ab=O.Rsft.v.val/100,cF=O.SpcX.v.val/100;cF=Math.max(cF,-.99);
var hp=O.SpcY.v.val/100;hp=Math.max(hp,-.99);var c_=O.Scl.v.val/100,ba=new cD;ba.rotate(O.Angl.v*Math.PI/180);
ba.scale(c_,c_);var hB={buffer:F.buffer,rect:F.rect};q.dB(hB);if(hB.rect.D2()){hB.buffer=F.buffer;hB.rect=F.rect}var ic=hB.buffer,gi=hB.rect,cZ=q.Ww(ic,gi,0),g7=new Uint32Array(ic.buffer)[0];
if(!cZ.D2()&&!cZ.Qq(gi)){var cY=q.f(cZ.X()*4);q.nF(ic,gi,cY,cZ);ic=cY;gi=cZ}gi.x=gi.y=0;g7=cF==0&&hp==0||O.SpcC.v?g7:0;
function iS(z){return z<0?Math.ceil(z):Math.floor(z)}var eE=ba.Pz(new aE(gi.d,0));eE.x=iS(eE.x);eE.y=iS(eE.y);
var gF=ba.Pz(new aE(0,gi.v));gF.x=iS(gF.x);gF.y=iS(gF.y);var ap=c.V.oo([ic,gi],ba,!1),c8=ap.rect,N=ap.buffer,hN=Math.round(c8.x),dS=Math.round(c8.y),cM=Math.max(r.rect.d,r.rect.v)/Math.min(gi.d*c_*(1+cF),gi.v*c_*(1+hp));
cM=Math.ceil(cM*1.7);q.IW(r.buffer,g7);for(var m=-cM;m<cM;m++){for(var z=-cM;z<cM;z++){var fP=(z+m*ab)*(1+cF),gS=m*(1+hp);
c8.x=hN+Math.round(fP*eE.x+gS*gF.x);c8.y=dS+Math.round(fP*eE.y+gS*gF.y);if(c8.G3(r.rect))q.p.F_("norm",N,c8,r.buffer,r.rect,c8,1)}}}if(n=="Ctoa"){var x=q.W.S_(O.Clr.v),cK=O.Trsp.v.val/100,iF=O.Opct.v.val/100;
cK=iF==0?0:cK/iF;var W=F.rect.d,v=F.rect.v,an=~~x.Q,bl=~~x.l,dk=~~x.O,gn=F.buffer,bv=r.buffer;for(var m=0;
m<v;m++)for(var z=0;z<W;z++){var e=m*W+z,hs=e<<2,gi=gn[hs],dD=gn[hs+1],ic=gn[hs+2],gf=Math.abs(an-gi),fT=Math.abs(bl-dD),aB=Math.abs(dk-ic),d2=Math.max(gf,fT,aB)*(1/255);
d2=Math.max(0,Math.min(1,d2/iF));var ae=d2==0?0:1/d2,hC=cK==1?1:Math.max(0,Math.min(1,(d2-cK)/(1-cK)));
bv[hs]=Math.max(0,Math.min(255,(gi-an*(1-d2))*ae));bv[hs+1]=Math.max(0,Math.min(255,(dD-bl*(1-d2))*ae));
bv[hs+2]=Math.max(0,Math.min(255,(ic-dk*(1-d2))*ae));bv[hs+3]=~~(.5+hC*255)}}if("LqFy,Dspl,Pnch,Sphr,Twrl,Rple,Shr ,Wave,LnCr".split(",").indexOf(n)!=-1){var eB=_[0],W=F.rect.d,v=F.rect.v,f4,ew=0;
if(n=="LqFy")f4=gT.Hy(new Uint8Array(O.LqMe.v).buffer);else{var dY=3;f4={HL:Math.floor(W/dY),Sa:Math.floor(v/dY)};
f4.map=new Float32Array(f4.HL*f4.Sa*2);if(n=="LnCr"){var h9=.5*(f4.HL-1),fE=.5*(f4.Sa-1),bs=Math.max(Math.abs(0-h9),Math.abs(1-h9)),aw=Math.max(Math.abs(0-fE),Math.abs(1-fE)),hH=Math.sqrt(bs*bs+aw*aw),aP=0,iW=0,i7=-1,dj=2,c_=O.LnSi.v/100,dA=1/c_,h3=O.LnIa.v/100,gJ=h3==0?1e-6:h3*4.6,cq=dA/hH;
for(var m=0;m<f4.Sa;m++){for(var z=0;z<f4.HL;z++){var a5=(z-h9)*cq,i9=(m-fE)*cq,c9=Math.sqrt(a5*a5+i9*i9)*gJ,eO=Math.atan(c9),bn=h3>0?eO/c9:c9/eO,i4=h9+hH*bn*a5,it=fE+hH*bn*i9,e=m*f4.HL+z<<1;
f4.map[e]=i4-z;f4.map[e+1]=it-m}}}else if(n=="Dspl"&&eB.length!=0){ew=O.UndA.v.UndA=="WrpA"?2:1;var fN=O.DspF.v.pth,iE;
for(var e=0;e<eB.length;e++)if(eB[e].D5==fN)iE=eB[e];if(iE==null)iE=eB[0];iE.dH();var gf=iE.yO[1],eV=q.f(gf.X());
q.L2(iE.yO[0],eV);var gl=gf.d,h6=gf.v;f4={HL:gl,Sa:h6};f4.map=new Float32Array(f4.HL*f4.Sa*2);var f9=2.54*O.HrzS.v*gl/W,dP=2.54*O.VrtS.v*h6/v;
for(var m=0;m<f4.Sa;m++){for(var z=0;z<f4.HL;z++){var cj=-.5+eV[m*gl+z]*(1/255),e=m*f4.HL+z<<1;f4.map[e]=cj*f9;
f4.map[e+1]=cj*dP}}}else if(n=="Pnch"||n=="Twrl"||n=="Sphr"){var bV=1,eo=Math.PI,ir=0,eM=3,dJ=1.53,bn=1;
if(n=="Pnch"||n=="Sphr")bV=O.Amnt.v/100;if(n=="Twrl")eo=O.Angl.v*Math.PI/180;if(n=="Sphr")ir=["Nrml","HrzO","VrtO"].indexOf(O.SphM.v.SphM);
function hi(z){z=Math.pow(z,1-z*.3-z*z*(z*z)*.5);return-.225*Math.sin(z*Math.PI)}function hb(v,fV,c9,fi,ep,iJ,aT,bn){var a5=iJ-fi,i9=aT-ep,fs=fi-v,hV=ep-fV,f1=a5*a5+i9*i9,bw=2*(a5*fs+i9*hV),eM=fs*fs+hV*hV-c9*c9,g5=Math.sqrt(bw*bw-4*f1*eM),av=bn/(2*f1),cn=(-bw+g5)*av,c3=(-bw-g5)*av;
return bn*Math.min(cn,c3)}var e9=f4.HL,ht=f4.Sa,aQ=f4.HL/2,e7=f4.Sa/2,dz=1/aQ,c9=Math.sqrt(eM*eM+1)/eM,eF=eM+Math.sqrt(1/(eM*eM));
if(bV<0){eM=1.72;c9=1;eF=eM;dJ=-1;bn=-1}for(var m=0;m<ht;m++){var i9=(m-e7)/e7;for(var z=0;z<e9;z++){var a5=(z-aQ)*dz;
if(ir==1)i9=0;else if(ir==2)a5=0;var fD=Math.sqrt(a5*a5+i9*i9);if(fD<1&&fD!=0){var e=m*f4.HL+z<<1;if(n=="Pnch"){var g6=-bV*hi(fD)/fD;
f4.map[e]=a5*g6*aQ;f4.map[e+1]=i9*g6*e7}else if(n=="Sphr"){var eH=hb(0,eF,c9,0,0,fD,eM,bn),go=dJ*bV*(eH-1);
f4.map[e]=a5*go*aQ;f4.map[e+1]=i9*go*e7}else if(n=="Twrl"){var S=Math.atan2(i9,a5)-eo*(1-fD)*(1-fD),a$=Math.cos(S),dO=Math.sin(S);
f4.map[e]=(fD*a$-a5)*aQ;f4.map[e+1]=(fD*dO-i9)*e7}}}}}else if(n=="Shr "){var eg=JSON.parse(JSON.stringify(O.ShrP.v));
q.pH.m(eg,new cD(0,255/127,255/127,0,-2,0));var eC=q.pH.Sz(eg,f4.Sa,!0);ew=O.UndA.v.UndA=="WrpA"?2:1;
for(var m=0;m<f4.Sa;m++){var a5=-eC[m]*f4.HL;for(var z=0;z<f4.HL;z++){var e=m*f4.HL+z<<1;f4.map[e]=a5}}}else if(n=="Wave"){var dy=O.NmbG.v,gY=O.WLMn.v,eX=O.WLMx.v,ij=O.AmMn.v*(Math.PI/4),gr=O.AmMx.v*(Math.PI/4),f5=O.SclH.v/100,dU=O.SclV.v/100,fU=O.Wvtp.v.Wvtp,ah=Math.sin;
if(fU=="WvTr")ah=function(z){z*=2/Math.PI;return-.5+Math.abs(z%2-1)};if(fU=="WvSq")ah=function(z){z*=2/Math.PI;
return 1+2*Math.floor(z%2-1)};var bU=[],iC=new q.p.Iu(O.RndS.v);for(var e=0;e<dy;e++){bU.push(iC.get()*10);
bU.push(Math.PI*dY/(gY+iC.get()*(eX-gY)));bU.push(f5*(ij+iC.get()*(gr-ij))/dY);bU.push(iC.get()*10);
bU.push(Math.PI*dY/(gY+iC.get()*(eX-gY)));bU.push(dU*(ij+iC.get()*(gr-ij))/dY)}var ii=[],fM=[],h8=Math.max(f4.HL,f4.Sa);
for(var e=0;e<h8;e++){var a5=0,i9=0;for(var br=0;br<dy;br++){var hv=br*6;a5+=bU[hv+2]*ah(bU[hv]+e*bU[hv+1]);
i9+=bU[hv+5]*ah(bU[hv+3]+e*bU[hv+4])}ii[e]=i9;fM[e]=a5}for(var m=0;m<f4.Sa;m++){for(var z=0;z<f4.HL;
z++){var e=m*f4.HL+z<<1;f4.map[e]=fM[m];f4.map[e+1]=ii[z]}}ew=O.UndA.v.UndA=="WrpA"?2:1}else if(n=="Rple"){ew=1;
var bV=O.Amnt.v/100,cW=4,hk=[0,-.19,-.29,-.32,.92,.37,.93,.54,-.54,.42,-.29,-.58,-.67,.85,0,.64],cN=1,bG=1,fs=0,e5=["Sml","Mdm","Lrg"].indexOf(O.RplS.v.RplS);
if(e5==0){cN=1;bG=.2;fs=3}if(e5==2){cN=1;bG=2;fs=-1;hk=hk.reverse()}var eK=function(z,m){var eM=Math.cos,gA=0;
for(var e=0;e<cW;e++)for(var br=0;br<cW;br++)gA+=hk[e*cW+br]*eM(z*(e+fs)-m*(br+fs));return gA},al=Math.floor(50/dY),eu=new Float32Array(al*al*2),iB=bG*bV*.5/dY;
for(var m=0;m<al;m++)for(var z=0;z<al;z++){var h9=cN*z*2*Math.PI/al,fE=cN*m*2*Math.PI/al,iH=eK(h9,fE),a5=(eK(h9+.01,fE)-iH)*100,i9=(eK(h9,fE+.01)-iH)*100,e=(m*al+z)*2;
eu[e]=a5*iB;eu[e+1]=i9*iB}for(var m=0;m<f4.Sa;m++)for(var z=0;z<f4.HL;z++){var dO=m%al,a$=z%al,e=m*f4.HL+z<<1,hO=dO*al+a$<<1;
f4.map[e]=eu[hO];f4.map[e+1]=eu[hO+1]}}}q.uH.FF(F.buffer,r.buffer,W,v,null,f4.map,f4.HL,f4.Sa,ew)}return r};
var ax={};ax.C0="BrSm BrsL BrDR BrsW BrbW BrSp".split(" ");ax.AC="LDBt LDBL LDLf LDTL LDTp LDTR LDRg LDBR".split(" ");
ax.TW=["ScrC","ScrD","ScrL"];ax.qb=["SDRD","SDHz","SDLD","SDVt"];ax.vF="TxBl TxCa TxFr TxTL TxBr TxBu TxSt".split(" ");
ax.ZU={PntD:"paintDaubs"};ax.__=["Artistic","Brush Strokes",[24,4],"Sketch",[24,14],[12,67]];ax.names={PntD:[0,"Paint Daubs"],PlsW:[0,"Plastic Wrap"],Spt:[1,"Spatter"],SprS:[1,"Sprayed Strokes"],Gls:[2,"Glass"],OcnR:[2,"Ocean Ripple"],BsRl:[3,"Bas Relief"],Chrc:[3,"Charcoal"],Chrm:[3,"Chrome"],GraP:[3,"Graphic Pen"],HlfS:[3,"Halftone Pattern"],Phtc:[3,"Photocopy"],Stmp:[3,"Stamp"],GlwE:[4,"Glowing Edges"],StnG:[5,"Stained Glass"],Txtz:[5,"Texturizer"]};
ax.tc=function(n){var F;if(n=="PntD")F={Sz:{t:"long",v:10},Shrp:{t:"long",v:10},BrsT:{t:"enum",v:{BrsT:"BrSm"}}};
if(n=="PlsW")F={HghS:{t:"long",v:20},Dtl:{t:"long",v:4},Smth:{t:"long",v:5}};if(n=="Spt")F={SprR:{t:"long",v:10},Smth:{t:"long",v:5},FlRs:{t:"long",v:10738420}};
if(n=="SprS")F={StrL:{t:"long",v:12},SprR:{t:"long",v:7},SDir:{t:"enum",v:{StrD:"SDRD"}},FlRs:{t:"long",v:893120664}};
if(n=="Gls")F={Dstr:{t:"long",v:3},Smth:{t:"long",v:1},TxtT:{t:"enum",v:{TxtT:"TxTL"}},Scln:{t:"long",v:100},InvT:{t:"bool",v:!1}};
if(n=="OcnR")F={RplS:{t:"long",v:5},RplM:{t:"long",v:15},FlRs:{t:"long",v:64008840}};if(n=="BsRl")F={Dtl:{t:"long",v:11},Smth:{t:"long",v:7},LghD:{t:"enum",v:{LghD:"LDBt"}}};
if(n=="Chrc")F={ChAm:{t:"long",v:1},Dtl:{t:"long",v:5},LgDr:{t:"long",v:50},GELv:{t:"bool",v:!0}};if(n=="Chrm")F={Dtl:{t:"long",v:4},Smth:{t:"long",v:4}};
if(n=="GraP")F={StrL:{t:"long",v:7},LgDr:{t:"long",v:50},SDir:{t:"enum",v:{StrD:"SDRD"}},FlRs:{t:"long",v:55993248}};
if(n=="HlfS")F={HlSz:{t:"long",v:1},Cntr:{t:"long",v:5},ScrT:{t:"enum",v:{ScrT:"ScrD"}}};if(n=="Phtc")F={Dtl:{t:"long",v:10},Drkn:{t:"long",v:4}};
if(n=="Stmp")F={LgDr:{t:"long",v:25},Smth:{t:"long",v:4}};if(n=="GlwE")F={EdgW:{t:"long",v:1},EdgB:{t:"long",v:10},Smth:{t:"long",v:1}};
if(n=="StnG")F={ClSz:{t:"long",v:10},BrdT:{t:"long",v:4},LghI:{t:"long",v:0},FlRs:{t:"long",v:319935998}};
if(n=="Txtz")F={TxtT:{t:"enum",v:{TxtT:"TxBr"}},Scln:{t:"long",v:100},Rlf:{t:"long",v:10},LghD:{t:"enum",v:{LghD:"LDBL"}},InvT:{t:"bool",v:!1}};
F.__name="Filter Gallery";F.classID="GEfc";F.GEfk={t:"enum",v:{GEft:n}};F.GELv={t:"bool",v:!0};return F};
ax.Nn=function(n,F){for(var e=0;e<F.length;e++)~~(F[e]=(n[4*e]+n[4*e+1]+n[4*e+2])*(1/3))};ax.Fl=function(n,F,O,I,x,r,_){n=O.GEfk.v.GEft;
var d=F.rect,w=d.d,Z=d.v,P=w*Z;console.log(JSON.stringify(n),JSON.stringify(O));if(n=="PstE"){}if(n=="AccE"){}if(n=="AngS"){}if(n=="Chrc"){var C=q.f(w*Z),W=q.f(w*Z);
ax.Nn(F.buffer,C);q.y8.ajD(C,w,Z,W,[O.ChAm.v,O.Dtl.v,O.LgDr.v]);ax.rh(W,r.buffer,I,x)}if(n=="Stmp"){var C=q.f(w*Z),W=q.f(w*Z);
ax.Nn(F.buffer,C);q.y8.a9Q(C,w,Z,W,[O.LgDr.v,O.Smth.v]);ax.rh(W,r.buffer,I,x)}if(n=="GraP"){var C=q.f(w*Z),W=q.f(w*Z);
q.L2(F.buffer,C);q.y8.aks(C,w,Z,W,[O.StrL.v,O.LgDr.v,["SDRD","SDHz","SDLD","SDVt"].indexOf(O.SDir.v.StrD)]);
ax.rh(W,r.buffer,I,x)}if(n=="Phtc"){function v(gR,bN,d,ei){q.Mo.pp(gR,bN,d,ei);for(var e=0;e<P;e++)bN[e]=Math.max(0,Math.min(255,128+gR[e]-bN[e]))}var L=O.Dtl.v,H=O.Drkn.v,C=q.f(P);
q.L2(F.buffer,C);var y=q.f(P);v(C,y,d,1);var g=q.f(P);v(C,g,d,L);for(var e=0;e<P;e++)C[e]=Math.max(0,Math.min(255,255-(y[e]-g[e])*H));
ax.rh(C,r.buffer,I,x)}if(n=="Spt"||n=="SprS"){var Q,J=1,A=1;Q={HL:Math.floor(w/A),Sa:Math.floor(Z/A)};
Q.map=new Float32Array(Q.HL*Q.Sa*2);var p=new q.p.Iu(O.FlRs.v),U=new Float32Array(8192),j=O.SprR.v,b=j<20?.018*j:.36+(j-20)*.128;
if(n=="SprS"){b=.07+[0,.02,.04,.06,.08,.1,.12,.14,.16,.18,.2,.22,.24,.26,.28,.3,.34,.38,.5,.65,.75,.85,1,1.5,2.2,3][j]}for(var e=0;
e<8192;e++)U[e]=(-1+2*p.get())*b*70;for(var s=0;s<Z;s++)for(var G=0;G<w;G++){var T=s*w+G<<1;Q.map[T]=U[T%7919];
Q.map[T+1]=U[(T+1)%7919]}var z=Q.map.slice(0),m=n=="Spt"?O.Smth.v-1:1;if(n=="Spt"&&m!=0){ax.zu(Q.map,z,w,Z,m);
ax.aq(z,Q.map,w,Z,m)}if(n=="SprS"){var $=O.StrL.v>>>1,o=$==0?2:1;ax.zu(Q.map,z,w,Z,o);ax.aq(z,Q.map,w,Z,o);
if($!=0){var h=ax.qb.indexOf(O.SDir.v.StrD),X=[1,1,1,0][h],D=[-1,0,1,1][h],f=2*$+1,R=1/f;for(var s=0;
s<Z;s++)for(var G=0;G<w;G++){var T=s*w+G<<1,i=0,t=0;for(var e=0;e<f;e++){var N=Math.max(0,Math.min(w-1,G-($+e)*X)),M=Math.max(0,Math.min(Z-1,s-($+e)*D)),hK=M*w+N<<1;
i+=Q.map[hK];t+=Q.map[hK+1]}z[T]=i*R;z[T+1]=t*R}Q.map=z}}q.uH.FF(F.buffer,r.buffer,w,Z,null,Q.map,Q.HL,Q.Sa,J)}if(n=="BsRl"||n=="PlsW"||n=="Chrm"){var bD=Date.now(),co=q.f(P),iM=co.slice(0);
q.L2(F.buffer,co);var L=O.Dtl.v,hs=O.Smth.v;if(L!=15){q.Mo.MU(co,iM,d,Math.round((15-L)*.5));q.Ct(iM,co)}var S=1.4/w,a=1.4/Z,bV=new Float32Array(P),a5=new Float32Array(P),i9=new Float32Array(r.buffer.buffer);
for(var s=0;s<Z;s++)for(var G=0;G<w;G++){var e=s*w+G,X=G==w-1?co[e]-co[e-1]:co[e+1]-co[e],D=s==Z-1?co[e]-co[e-w]:co[e+w]-co[e],dG=G*S-.7,ap=s*a-.7;
bV[e]=X==0?dG:X*.4;a5[e]=D==0?ap:D*.4}if(n=="BsRl"){var bk=(2+ax.AC.indexOf(O.LghD.v.LghD))*Math.PI*.25,i=Math.cos(bk);
if(Math.abs(i)<.1)i=0;i=Math.sign(i);var t=Math.sin(bk);if(Math.abs(t)<.1)t=0;t=Math.sign(t);var c2=1/(i*i+t*t);
for(var s=0;s<Z;s++)for(var G=0;G<w;G++){var e=s*w+G,gg=Math.max(-1,Math.min(1,i*bV[e])),bH=Math.max(-1,Math.min(1,t*a5[e]));
iM[e]=128+127*(gg+bH)*c2}if(hs!=1){q.Mo.MU(iM,co,d,Math.round((hs-1)*.5));q.Ct(co,iM)}ax.rh(iM,r.buffer,I,x)}else{if(n=="Chrm")hs=5+hs;
if(hs>1)ax.jJ(bV,a5,i9,d,hs-1);if(n=="PlsW"){var gw=new Uint8Array(bV.buffer);for(var e=0;e<P;e++){var gP=e<<2,X=bV[e],D=a5[e],dT=1/(Math.sqrt(1+X*X)*Math.sqrt(1+D*D)),fU=dT*dT,dV=fU*fU,ac=~~(255*(dV*dV*fU));
gw[gP+0]=ac;gw[gP+1]=ac;gw[gP+2]=ac;gw[gP+3]=ac}r.buffer.set(F.buffer);q.p.F_("norm",gw,d,r.buffer,d,d,O.HghS.v/20)}else if(n=="Chrm"){var e2=r.buffer,cX=w>>>1,eR=Z>>>1;
for(var e=0;e<P;e++){var gP=e<<2,X=bV[e],D=a5[e],gR={x:1,y:0,Jw:X};ha.t4(gR);var bN={x:0,y:1,Jw:D};ha.t4(bN);
var eG=ha.D8(gR,bN),ef=1/eG.Jw,fi=~~Math.max(0,Math.min(w-1,cX-eG.x*ef*cX)),ep=~~Math.max(0,Math.min(Z-1,eR-eG.y*ef*eR)),ac=co[ep*w+fi];
e2[gP+0]=ac;e2[gP+1]=ac;e2[gP+2]=ac}}}}if(n=="Gls"||n=="OcnR"||n=="Txtz"){var iJ=n=="OcnR"?2:ax.vF.indexOf(O.TxtT.v.TxtT),f=24,cs=0,en,cm;
if(iJ==6)iJ=2;var aT="blocks canvas frosted tinylens brick burlap".split(" ")[iJ];if(ax.Ik==null)ax.Ik=[];
if(ax.Ik[iJ]==null){var dm,c1;if(iJ==2){c1=new gv(0,0,128,128);var gk=bS.tc("AdNs");gk.Mnch.v=!0;gk.Dstr.v.Dstr="Gsn";
gk.Nose.v.val=50;var dm=q.f(c1.X()*4),a8=dm.slice(0);new Uint32Array(a8.buffer).fill(4286611584);bS.Fl("AdNs",{buffer:a8,rect:c1},gk,0,0,{buffer:dm,rect:c1})}else{var bX=fx.mk.get("tex/"+aT,!0)[0];
c1=bX.Kh;dm=new Uint8Array(bX.data)}var co=q.f(c1.X());q.xg(dm,co,0);ax.Ik[iJ]=[c1,co]}var c1=ax.Ik[iJ][0],co=ax.Ik[iJ][1],bL=c1.d,c_=c1.v;
function eS(hf,iy,e7){return~~(c$*(hf+iy)+8192)&127}var bV=new Float32Array(P),a5=new Float32Array(P),i9=new Float32Array(r.buffer.buffer),c$=n=="OcnR"?1/(1+(O.RplS.v-1)*.1):100/O.Scln.v;
if(iJ==3)c$*=32/22.2;var bD=Date.now(),cp=c$,S=1.4/w,a=1.4/Z;if(n=="Txtz"){cp*=1/255;f=256}for(var s=0;
s<Z;s++){var b_=eS(s,d.y,c_),M=b_+1&127;for(var G=0;G<w;G++){var e=s*w+G,hy=eS(G,d.x,bL),N=hy+1&127,gx=0,eJ=0,d4=0;
if(n=="Txtz"){gx=q.J.d5(c$*G,c$*s,co,128,128);eJ=q.J.d5(c$*G,c$*s+1,co,128,128);d4=q.J.d5(c$*G+1,c$*s,co,128,128)}else{gx=co[b_*bL+hy];
eJ=co[M*bL+hy];d4=co[b_*bL+N]}bV[e]=Math.max(-f,Math.min((d4-gx)*cp,f));a5[e]=Math.max(-f,Math.min((eJ-gx)*cp,f))}}if(n=="Txtz")ax.CT(bV,a5,i9,d,6);
else ax.jJ(bV,a5,i9,d,n=="Txtz"?1:n=="OcnR"?3.5/c$:O.Smth.v);if(n=="Txtz")cs=O.InvT.v?-1:1;else if(n=="Gls"){cs=[1,.4,.5,.5][iJ]*(Math.exp(O.Dstr.v*.155)-1);
if(O.InvT.v)cs=-cs}else{cs=.5*(Math.exp(O.RplM.v*.155)-1)}var e2=r.buffer;if(n=="Txtz"){var bk=(2+ax.AC.indexOf(O.LghD.v.LghD))*Math.PI*.25,i=Math.cos(bk),t=Math.sin(bk);
en={x:i,y:t,Jw:0};ha.t4(en);cm=O.Rlf.v;cm=cm/4+Math.max(0,(cm-35)*2)}function c5(gR,bN,ez){var eI=q.p.overF(bN,gR,1),hf=(1-ez)*gR+ez*(ez*bN+(1-ez)*eI);
return hf*255}for(var s=0;s<Z;s++)for(var G=0;G<w;G++){var e=s*w+G,gP=e<<2,X=bV[e],D=a5[e],gR={x:1,y:0,Jw:X};
ha.t4(gR);var bN={x:0,y:1,Jw:D};ha.t4(bN);var eG=ha.D8(gR,bN);if(n=="Txtz"){var fK=ha.acx(eG,en)*cs,ez=1,ac=1;
if(fK<0){ac=0;fK=-fK}ez=Math.min(1,fK*cm);e2[gP+0]=~~c5(F.buffer[gP]*(1/255),ac,ez);e2[gP+1]=~~c5(F.buffer[gP+1]*(1/255),ac,ez);
e2[gP+2]=~~c5(F.buffer[gP+2]*(1/255),ac,ez)}else{var ef=cs/eG.Jw,fi=~~Math.max(0,Math.min(w-1,G-eG.x*ef)),ep=~~Math.max(0,Math.min(Z-1,s-eG.y*ef)),d6=ep*w+fi<<2;
e2[gP+0]=F.buffer[d6];e2[gP+1]=F.buffer[d6+1];e2[gP+2]=F.buffer[d6+2]}}}if(n=="PntD"){var ee=O.Shrp.v*.4,c0=O.BrsT.v.BrsT,gq={BrSm:[.75],BrsL:[.85],BrDR:[.68],BrsW:[.75],BrbW:[.78],BrSp:[.62]}[c0],ei=Math.round(O.Sz.v*.5);
q.Bk.qC=gq[0];var d9=q.Bk.Yc;bS.mV(F.buffer,r.buffer,w,Z,ei,d9,[],0);var iK=[-.7,-1,-.7,-1,10,-1,-.7,-1,-.7];
iK=q.aF.Wl(iK);var gu=r.buffer.slice(0);q.aF.u3(gu,r.buffer,w,Z,iK,0);for(var e=0;e<F.buffer.length;
e++){var eA=r.buffer[e]-gu[e];r.buffer[e]=Math.max(0,Math.min(255,gu[e]+ee*eA))}}if(n=="GlwE"){var cE=r.buffer.slice(0);
q.Bk.qC=.5;var d9=q.Bk.Yc;bS.mV(F.buffer,cE,w,Z,O.Smth.v>>>1,d9,[],0);q.aF.jt(cE,r.buffer,w,Z);q.Ct(r.buffer,cE);
q.uZ(cE);q.IW(cE,4278190080,16777215);bS.mV(cE,r.buffer,w,Z,O.EdgW.v>>>1,q.Bk.ap,[],0);var iU=O.EdgB.v/10;
for(var e=0;e<cE.length;e++){if((e&3)==3)continue;var eI=r.buffer[e];r.buffer[e]=Math.max(0,Math.min(255,eI*iU))}}if(n=="StnG"){q.c6.a4n(F.buffer,w,Z,r.buffer,O.ClSz.v,[Math.round(I.Q),Math.round(I.l),Math.round(I.O)],O.BrdT.v)}if(n=="HlfS"){var ad=O.HlSz.v,d_=ad*2+1,c9=O.Cntr.v,ek=ax.TW.indexOf(O.ScrT.v.ScrT),P=w*Z,fX=P*4,fo=q.f(P),eY=F.buffer,c4=0,gA=0;
for(var e=0;e<fX;e+=4)fo[e>>>2]=~~(.5+(eY[e]+eY[e+1]+eY[e+2])*(1/3));var hG=fo.slice(0);q.Mo.CH(hG,fo,d,ad);
var aY=Math.PI/d_,gK=new Float64Array(w),i=new Float64Array(w),b$=new Float64Array(2*w);for(var G=0;
G<w;G++){var hy=(G-(w>>>1))*aY;gK[G]=hy*hy;i[G]=Math.cos(hy);var X=G<<1;b$[X]=Math.sin(X*(1/4.5));b$[X+1]=Math.sin((X+1)*(1/4.5))}for(var s=0;
s<Z;s++){var b_=(s-(Z>>>1))*aY,t=Math.cos(b_),f7=b_*b_;for(var G=0;G<w;G++){var ac=t;if(ek==0){var aZ=.5+Math.sqrt(gK[G]+f7)*4.5;
ac=b$[~~aZ]}else if(ek==1){ac=i[G]*t}var e=s*w+G,cG=fo[e]*(.75+.25*ac),ez=eY[(e<<2)+3]*(1/255),bb=Math.max(0,Math.min(255,~~cG));
c4+=bb*ez,gA+=ez;fo[e]=bb}}c4/=gA;var dR=128+1.26*(c4-128),iU=.08+.25*Math.abs((128-c4)/128),hD=1+iU*c9;
for(var e=0;e<P;e++){var cG=dR+(fo[e]-dR)*hD;fo[e]=Math.max(0,Math.min(255,~~cG))}if(c9>46)q.round(fo);
ax.rh(fo,r.buffer,I,x)}for(var e=0;e<F.buffer.length;e+=4)r.buffer[e+3]=F.buffer[e+3]};ax.rh=function(n,F,O,I){var x=n.length,r=O.Q,_=O.l,d=O.O,w=I.Q,Z=I.l,P=I.O;
for(var e=0;e<x;e++){var C=n[e]*(1/255),W=1-C,v=e<<2;F[v]=~~(r*W+w*C);F[v+1]=~~(_*W+Z*C);F[v+2]=~~(d*W+P*C)}};
ax.jJ=function(n,F,O,I,x){if(x<=1){x=Math.round(x);ax.CT(n,F,O,I,[1,16,4][x]);return}var r=x*.42;if(n){q.Mo.QA(n,O,I,r,3);
n.set(O)}if(F){q.Mo.QA(F,O,I,r,3);F.set(O)}};ax.CT=function(n,F,O,I,x){var r=q.aF.Wl([1,2,1,2,x,2,1,2,1]);
if(n){O.set(n);q.aF.S9(n,O,I.d,I.v,r);n.set(O)}if(F){O.set(F);q.aF.S9(F,O,I.d,I.v,r);F.set(O)}};ax.wE=function(n){if(n==null)return new aE(0,0);
var F=0,O=n.GEfs?n.GEfs.v:[{v:n}];for(var e=0;e<O.length;e++){var I=O[e].v,r=1e4;if(I.GELv&&!I.GELv.v)continue;
var x=I.GEfk.v.GEft;if(x=="GlwE"||x=="Phtc"||x=="BsRl"||x=="PlsW"||x=="Chrm"||x=="Gls"||x=="OcnR")r=0;
F=Math.max(F,r)}return new aE(F,F)};ax.Gt=function(n){var F=[0,0,0,0,0,0,0,0,0,0,0,0,0],O=[0,.6,.7,.8,1,1.2,1.4,1.6,1.8,2,2.2,2.6,3,4,5][n];
for(var e=0;e<13;e++){var I=e-6;F[e]=1/(O*Math.sqrt(2*Math.PI))*Math.exp(-.5*(I/O)*(I/O))}return F};
ax.zu=function(n,F,O,I,x){var r=ax.Gt(x),_=6,d=13;for(var w=0;w<I;w++)for(var Z=0;Z<O;Z++){var P=w*O+Z<<1,C=0,W=0;
for(var e=0;e<d;e++){var v=Z+e-_,L=v<0?0:v>=O?O-1:v,H=(w*O+L)*2,y=r[e];C+=y*n[H];W+=y*n[H+1]}F[P]=C;
F[P+1]=W}};ax.aq=function(n,F,O,I,x){var r=ax.Gt(x),_=6,d=13;for(var w=0;w<I;w++)for(var Z=0;Z<O;Z++){var P=w*O+Z<<1,C=0,W=0;
for(var e=0;e<d;e++){var v=w+e-_,L=v<0?0:v>=I?I-1:v,H=(L*O+Z)*2,y=r[e];C+=y*n[H];W+=y*n[H+1]}F[P]=C;
F[P+1]=W}};function fk(){}fk.uv=[2,5,5,7,4,4];fk.Dy="norm,diss,dark,mul ,idiv,lbrn,dkCl,lite,scrn,div ,lddg,lgCl,over,sLit,hLit,vLit,lLit,pLit,hMix,diff,smud,fsub,fdiv,hue ,sat ,colr,lum ".split(",");
fk.Cs="Nrml Dslv Drkn Mltp CBrn linearBurn darkerColor Lghn Scrn CDdg linearDodge lighterColor Ovrl SftL HrdL vividLight linearLight pinLight hardMix Dfrn Xclu blendSubtraction blendDivide H Strt Clr Lmns".split(" ");
fk.w9=[[15,10,0],[15,10,1],[15,10,2],[15,10,3],[15,10,4],[15,10,5],[15,10,6],[15,10,7],[15,10,8],[15,10,9],[15,10,10],[15,10,11],[15,10,12],[15,10,13],[15,10,14],[15,10,15],[15,10,16],[15,10,17],[15,10,18],[15,10,19],[15,10,20],[15,10,21],[15,10,22],[15,10,23],[15,10,24],[15,10,25],[15,10,26]];
fk.aT=["normal",null,"darken","multiply","color-burn",null,null,"lighten","screen","color-dodge",null,null,"overlay","soft-light","hard-light",null,null,null,null,"difference","exclusion",null,null,"hue","saturation","color","luminosity"];
fk.X4=function(n){if(n=="passThrough")return"pass";return fk.Dy[fk.Cs.indexOf(n)]};fk.Pw=function(n){if(n=="pass")return"passThrough";
return fk.Cs[fk.Dy.indexOf(n)]};fk.getName=function(n){return fk.w9[fk.Dy.indexOf(n)]};function K(){this.rect=null;
this.mf="norm";this.opacity=255;this.fc=!1;this.Cq=0;this.Z8=0;this.wx=[];for(var e=0;e<10;e++)this.wx.push(0,0,255,255);
this.name=null;this.add={};this.buffer=null;this.SA=null;this.IQ=null;this.r=null;this.a8=null;this.a4z=30;
this.bk=K.Br();this.afY=K.Br();this.a5y=K.Br();this.a4E=K.Br();this.vE=0;this.qI=!1;this.HG=null;this.KJ=new K.Nc}K.Br=function(){var n=V.w("canvas");
n.width=n.height=30;return n.getContext("2d")};K.Nc=function(){this.on=!0;this.hv=!0;this.hs=q.f(0);
this.ag1=q.f(0);this.L4=null;this.d8={};this.a0q=null;this.Ws=null;this.LH=null;this.Wm=null;this.ff=null;
this.M0=null;this.U4=null;this.lT=null;this.Ey=null;this.dr=null;this.th=null;this.cC=null;this.e_=!1};
K.Nc.prototype.V8=function(){this.on=!1;this.hv=!1;this.L4=null;this.e_=l.Z0};K.Nc.prototype.aip=function(){ha.cg(this.d8);
this.hs=q.f(0);this.ag1=q.f(0);if(this.Wm)this.Wm.delete();if(this.ff)this.ff.delete();this.Wm=null;
this.ff=null;var n=[this.M0,this.U4,this.lT,this.Ey,this.dr,this.th];for(var e=0;e<6;e++)if(n[e]!=null&&n[e]instanceof l.zF)n[e].delete();
this.M0=null;this.U4=null;this.lT=null;this.Ey=null;this.dr=null;this.th=null};K.prototype.D=function(n){if(n==null)n=this.rect.clone();
if(this.KJ.L4==null)this.KJ.L4=n;else this.KJ.L4=this.KJ.L4.Tq(n)};K.prototype.Ja=function(){return this.add.lsct==ho.x7||this.add.lsct==ho.OC};
K.prototype.zX=function(){var n=this.add;return n.SoCo!=null||n.GdFl!=null||n.PtFl!=null};K.prototype.HP=function(){var n=this.add.lmfx;
if(n==null)return;var F=["GrFl","patternFill"];for(var e=0;e<F.length;e++){var O=bW.jV[bW.order.indexOf(F[e])],I=n[O].v;
if(I.length==0)continue;for(var x=0;x<I.length;x++){var r=I[x].v;if(r.enab.v&&(r.Algn==null||!r.Algn.v))this.KJ.hv=!0}}};
K.prototype.BA=function(){var n=this.r;if(this.zX())n=this.B1();if(!l.Z0)return n.mJ();if(this.KJ.ff==null||this.KJ.on||l.Z0!=this.KJ.e_){if(this.KJ.ff)this.KJ.ff.delete();
this.KJ.ff=new l.fL(n.nJ().d,n.nJ().v);this.KJ.ff.set(n.mJ())}return this.KJ.ff};K.prototype.MM=function(n){var F=this.rect,O=this.buffer;
if(!l.Z0){var I=this.nZ(n,O,F);if(I){O=I.zc;F=I.rect}return O}if(this.KJ.L4!=null||l.Z0!=this.KJ.e_){var I=this.nZ(n,O,F);
if(I){O=I.zc;F=I.rect}var x=F;if(l.Z0!=this.KJ.e_||this.KJ.Wm==null||this.KJ.Wm.d!=x.d||this.KJ.Wm.v!=x.v){if(this.KJ.Wm)this.KJ.Wm.delete();
this.KJ.Wm=new l.zF(x.d,x.v);this.KJ.Wm.set(O)}else{var r=this.KJ.L4.clone();r.offset(-F.x,-F.y);this.KJ.Wm.set(O,r)}}return this.KJ.Wm};
K.prototype.uW=function(){var n=this.r;if(this.zX())n=this.B1();return n!=null&&n.isEnabled&&(n.S_()==0||n.S_()!=0&&!n.rect.D2())};
K.prototype.nZ=function(n,F,O){if(this.z3()){var I=this.Fa(n);if(I.r&&I.r.isEnabled&&(!I.r.rect.D2()||I.r.color==0)){var x=this.add.SoLd.filterFX.v;
I.r.JP=x.filterMaskDensity?x.filterMaskDensity.v:255;I.r.RI=x.filterMaskFeather?x.filterMaskFeather.v:0;
var r=I.buffer,_=I.r.Uz(O);q.uZ(_);F=F.slice(0);q.p.Nb(r,I.rect,F,O,_,O,0,O,1);return{zc:F,rect:O}}}};
K.prototype.am6=function(){var n={Q2:!1,cd:!1,jq:0,FU:0};if(this.add.vmsk&&this.add.vmsk.isEnabled)n.cd=!0;
if(this.B1()&&this.B1().isEnabled)n.Q2=!0;if(n.Q2&&n.cd){n.jq=this.B1().rect.x-this.add.vmsk.B1().rect.x;
n.FU=this.B1().rect.y-this.add.vmsk.B1().rect.y}return n};K.prototype.o3=function(n){if(this.add.lsct==ho.bu)return;
var F=this,O=this.B1()!=null&&this.B1().j8,I=this.add.vmsk!=null&&this.add.vmsk.j8,x=this.am6(),r=JSON.stringify(x)!=this.KJ.a0q||x.Q2&&O||x.cd&&I;
if(r){if(x.cd){var _=this.add.vmsk.B1();if(x.Q2){this.r=this.B1().NM(_);this.KJ.Ws=new aE(this.r.rect.x-this.B1().rect.x,this.r.rect.y-this.B1().rect.y)}else this.r=_}if(this.r)this.KJ.on=!0;
if(this.r)this.KJ.LH=new aE(this.rect.x-this.r.rect.x,this.rect.y-this.r.rect.y);if(x.Q2)this.B1().j8=!1;
if(x.cd)this.add.vmsk.j8=!1;this.D()}else{if(x.Q2&&x.cd){this.r.rect.x=this.B1().rect.x+this.KJ.Ws.x;
this.r.rect.y=this.B1().rect.y+this.KJ.Ws.y}}if(F.zX()){this.$u(n)}if(F.R9()){var d;if(this.r)d=new aE(this.rect.x-this.r.rect.x,this.rect.y-this.r.rect.y);
if(this.r&&this.r.isEnabled&&(this.KJ.LH==null||!d.Qq(this.KJ.LH))){this.KJ.LH=d;this.D();this.KJ.on=!0}}if(dK.get(F.add)!=null)this.KJ.on=!0;
this.KJ.a0q=JSON.stringify(x)};K.prototype.$u=function(n){var F=this,O=F.add.vstk,I,x=F.add.vmsk?this.add.vmsk.B1():null,d=!0;
if(x&&x.isEnabled&&x.S_()==0)I=x.nJ().clone();else I=new gv(0,0,n.d,n.v);var r=F.B1();if(r&&r.isEnabled&&r.S_()==0)I=I.lN(F.r.nJ());
var _=x&&O;if(O&&(!O.strokeEnabled.v||O.strokeStyleLineWidth.v.val==0))_=!1;if(O&&!O.fillEnabled.v&&_)d=!1;
var w=q.f(I.X()*4);if(d){if(F.add.SoCo)ha.kD(w,F.add.SoCo.Clr.v);if(F.add.GdFl){var Z=x&&x.color==0?q.Y.if(F.add.vmsk.b,null,!0):null;
ha.XV(F.add.GdFl,w,I,n,null,Z)}if(F.add.PtFl)ha.qO(F.add.PtFl,w,I,n,F.add.fxrp)}if(x){var P=x.JP;if(_)x.JP=255;
var C=q.f(I.X());if(x.S_()!=0)C.fill(Math.round(x.S_()));if(x&&x.isEnabled){var W=x.nJ(),v=x.mJ();if(W.Qq(I))q.Ct(v,C);
else q.k9(v,W,C,I)}if(F.add.SoCo&&d){q.GF(C,w,3)}else q.oh(C,I,w,I);if(_)x.JP=P}F.buffer=w;F.rect=I;
if(_){var L=bW.uS.RD.indexOf(O.strokeStyleLineAlignment.v.strokeStyleLineAlignment),H=O.strokeStyleContent.v,y=bW.uS.Ul.indexOf(H.classID),g=this.add.vmsk.B1(O);
if(F.rect.Qq(new gv(0,0,n.d,n.v)))F.rect=F.rect;else if(L!=0){var Q=F.rect.Tq(g.nJ()),J=q.f(Q.X()*4);
q.nF(F.buffer,F.rect,J,Q);F.buffer=J;F.rect=Q}var P=g.JP;g.JP=255;var A=g.Uz(F.rect);g.JP=P;if(g.color==255)q.uZ(A);
var p=q.f(F.rect.X()*4);if(y==0)ha.kD(p,H.Clr.v);if(y==1)ha.XV(H,p,F.rect,n,null,x.color==0?x.rect:null);
if(y==2)ha.qO(H,p,F.rect,n,F.add.fxrp);var U=O.strokeStyleOpacity.v.val/100;if(U!=1)q.Ny(A,U);q.GF(A,p,3);
if(g.color==255)L=2-L;if(L==0){q.p.F_("norm",p,F.rect,F.buffer,F.rect,F.rect,1);q.oh(C,F.rect,F.buffer,F.rect)}if(L==1){q.p.F_("norm",p,F.rect,F.buffer,F.rect,F.rect,1)}if(L==2){q.uZ(C);
q.p.Nb(p,F.rect,F.buffer,F.rect,C,I,255,F.rect,1,!1);q.uZ(C)}if(g.JP!=255){var j=p.slice(0);q.IW(j,4278190080,16777215);
q.p.F_("norm",j,F.rect,F.buffer,F.rect,F.rect,1-g.JP/255)}P=x.JP;x.JP=255;this.ag1=x.Uz(F.rect);x.JP=P}this.D()};
K.prototype.aY=function(n,F){var O=this,I=O.add.SoLd.Idnt.v,x=O.add.SoLd,r=q.z.gh(c.V.ns(x.nonAffineTransform)),_=n.lk(I,x.Crop?x.Crop.v:null,[r.d,r.v],x.Impr.v.classID);
if(_==null)return;var d=_.yO;x.Sz.v.Wdth.v=d[1].d;x.Sz.v.Hght.v=d[1].v;var w=x.warp.v,Z=c.V.ns(x.nonAffineTransform),P=q.J.N5(Z,d[1]);
if(w&&!q.qF.x9(w)){var r=q.z.gh(q.qF.Bo(w)),C=r.x,W=r.y,v=1/r.d,L=1/r.v;P=q.J.N5(Z);P=q.J.NM(P,[v,0,-C*v,0,L,-W*L,0,0])}var H=c.V.Kb(d,F?0:1,P,w,null,null,null,F);
if(H==null){O.buffer=q.f();O.rect=new gv}else if(O.z3()){var y=O.Fa(n);y.buffer=H.buffer;y.rect=H.rect.clone();
this.eU(n,F)}else{O.buffer=H.buffer;O.rect=H.rect}O.o3(n);O.D();n.D()};K.prototype.eU=function(n,F){if(F==null)F=!1;
var O=this.Fa(n),I=this.add.SoLd.filterFX.v,x=bS.ad1(I),r=new gv(0,0,n.d,n.v),_=O.rect.Tq(r),d=O.rect.clone();
d.EM(x.x,x.y);var w={buffer:null,rect:_.lN(d)};w.buffer=q.f(w.rect.X()*4);q.nF(O.buffer,O.rect,w.buffer,w.rect);
if(I.enab.v&&F==!1){var Z=I.filterFXList.v;for(var e=0;e<Z.length;e++){var P=Z[e].v;if(P.enab.v==!1)continue;
var C=P.blendOptions.v,W=fk.X4(C.Md.v.BlnM),v=C.Opct.v.val/100,L=q.W.S_(P.FrgC.v),H=q.W.S_(P.BckC.v),y=bS._0(P),g={buffer:q.f(w.buffer.length),rect:w.rect.clone()},Q=P.Fltr?P.Fltr.v:null;
if(dK.kK[y]!=null){var J=dK.kK[y],A=dK.k6(J,Q);if(A)dK.Fl(A,w.buffer,g.buffer,w.rect)}else bS.Fl(y,w,Q,L,H,g,[n.add.lnk2?n.add.lnk2:[],this.B1(),n.TM]);
if(W=="norm"&&v==1)w=g;else if(W=="norm"){q.p.Nb(g.buffer,g.rect,w.buffer,w.rect,null,null,null,w.rect,v)}else{q.p.F_(W,g.buffer,g.rect,w.buffer,w.rect,w.rect,v)}}}this.rect=w.rect;
this.buffer=w.buffer;this.t7();this.D();n.D()};K.prototype.hz=function(n,F,O){this.HG=this.M1(n,F,O)};
K.prototype.Iw=function(n,F){var O=this.M1(n,F,!0);if(O==null)return null;var I={Co:O.vE,aN:O.Cv,rect:O.JI};
if(I.Co==1||I.Co==3){var x=I.rect,r=q.f(x.d*x.v*4);q.GF(I.aN,r,0);q.GF(I.aN,r,1);q.GF(I.aN,r,2);q.ei(n.N.channel,n.N.rect,r,x);
I.aN=r}return I};K.prototype.M1=function(n,F,O){var I,x,r,_,d,w,Z;if(this.vE<=0){var P=q.f(this.rect.X());
q.xg(this.buffer,P,3);I=q.ZZ.sh(F,{channel:P,rect:this.rect},"intersection");if(I==null)return null;
var C=q.$o(I.channel,I.rect);_=I.rect.clone();d=this.rect.clone();x=q.f(_.X()*4);q.nF(this.buffer,d,x,_);
q.GF(I.channel,x,3);r=this.buffer.slice(0);if(!O){var W=F.channel.slice(0);q.uZ(W);q.oh(W,F.rect,r,d)}w=this.buffer.slice(0);
Z=this.rect.clone()}if(this.vE==1||this.vE==3){var v=this.vE==1?this.B1():this.Fa(n).r;_=F.rect.clone();
d=v.rect.clone();x=v.JO(_);var r=v.channel.slice(0);if(!O)q.p.b4(v.color==255?q.cO(_.X()):q.CZ(_.X()),_,r,d,F.channel,_,1);
w=v.channel.slice(0);Z=v.rect.clone()}return{vE:this.vE,Cv:x,JI:_,I6:r,Fe:d,zO:w,qM:Z}};K.prototype.jB=function(n,F){var O=this.HG;
if(O.vE==0){this.rect=O.qM;this.buffer=O.zO;this.D()}if(O.vE==1||O.vE==3){var I=O.vE==1?this.B1():this.Fa(n).r;
I.channel=O.zO;I.rect=O.qM;if(this.vE==1){I.j8=!0;this.o3(n)}if(this.vE==3)this.D()}this.HG=F};K.prototype.WF=function(n,F){if(this.vE<=0&&F.rect.Qq(this.rect)){var O=q.f(this.rect.X());
q.xg(this.buffer,O,3);if(q.Qq(n.N.channel,O)){var I=this.rect,x=this.buffer;this.HG={vE:this.vE,Cv:x.slice(0),JI:I.clone(),I6:q.f(0),Fe:new gv,zO:q.f(0),qM:new gv};
return!0}}var r=this.HG;if(r==null)return!1;if(r.vE!=this.vE)return!1;if(!F.rect.Qq(r.JI))return!1;var _=r.Fe.Tq(r.JI);
if(r.vE<=0){if(!_.Qq(this.rect))return!1;var d=q.f(r.Cv.length>>2);q.xg(r.Cv,d,3);if(!q.Qq(F.channel,d))return!1;
var w=q.f(_.d*_.v*4);q.nF(r.I6,r.Fe,w,_);q.p.F_("norm",r.Cv,r.JI,w,_,_,1);return q.Qq(w,this.buffer)}if(r.vE==1||r.vE==3){var Z=r.vE==1?this.B1():this.Fa(n).r;
if(!_.Qq(Z.rect))return!1;var P=q.f(_.X());P.fill(Z.color);q.k9(r.I6,r.Fe,P,_);q.p.b4(r.Cv,r.JI,P,_,F.channel,_,1);
return q.Qq(P,Z.channel)}};K.prototype.ah=function(n,F,O,I){var x=this.HG;x.JI.offset(F,O);var r=x.Fe.Tq(x.JI);
if(x.vE<=0){var _=q.f(r.X()*4);q.nF(x.I6,x.Fe,_,r);q.p.F_("norm",x.Cv,x.JI,_,r,r,1);this.buffer=_;this.rect=r;
this.D()}else{var d=this.vE==1?this.B1():this.Fa(n).r,w=q.f(r.X());w.fill(d.color);q.k9(x.I6,x.Fe,w,r);
q.p.b4(x.Cv,x.JI,w,r,I.channel,r,1);d.channel=w;d.rect=r.clone();if(this.vE==1){d.j8=!0;this.o3(n)}if(this.vE==3)this.D()}};
K.prototype.Gf=function(){var n=[-1,0,1,2];if(this.r)n.push(-2);if(this.a8)n.push(-3);return n};K.prototype.getName=function(){return this.add.luni?this.add.luni:this.name};
K.prototype.V9=function(E){this.add.luni=this.name=E};K.prototype.rq=function(n){var F=this.add.lnsr,O=this.add.TySh;
if(F=="rend"&&O)this.V9(bt.fQ(O.Vb).replace(/(?:\r\n|\r|\n)/g," ").slice(0,32))};K.prototype.Y9=function(){return(this.Cq&1<<1)==0};
K.prototype.R9=function(){return(this.Cq&1<<4)==0};K.prototype.o_=function(){return(this.Cq&1<<5)!=0};
K.prototype.a7a=function(){var n=this;if(n.add.lnsr!="bgnd"){n.add.lnsr="bgnd";n.V9("Background");n.add.lspf=1<<2}};
K.prototype.aoC=function(){var n=this;if(n.add.lnsr=="bgnd"){delete n.add.lnsr;n.V9("Layer 0");n.add.lspf=0}};
K.prototype.LF=function(n){var F=this.add.lspf;return F==null?!1:(F>>n&1)!=0};K.prototype.tt=function(n){if(n&&!this.Y9())this.Cq-=2;
if(!n&&this.Y9())this.Cq+=2};K.prototype.NN=function(){var n=this.add.lmfx;if(n==null)return!1;for(var F in n){if(F=="masterFXSwitch")continue;
if(F=="Scl")continue;if(F=="classID")continue;if(n[F].v.length>0)return!0}return!1};K.prototype.z3=function(){return this.add.SoLd!=null&&this.add.SoLd.filterFX!=null};
K.prototype.C8=function(){var n=this.add.lmfx;if(n==null)return!1;if(!n.masterFXSwitch.v)return!1;for(var F in n){if(F=="masterFXSwitch")continue;
if(F=="Scl")continue;if(F=="classID")continue;var O=n[F].v;for(var e=0;e<O.length;e++)if(O[e].v.enab.v)return!0}return!1};
K.prototype.Yg=function(n,F,O,I){var x=new gv,r=this.rT(n,O,I);if(r.indexOf(0)!=-1)x=x.Tq(this.rect);
if(r.indexOf(1)!=-1)x=x.Tq(this.B1().nJ());if(r.indexOf(2)!=-1){var _=this.add.vmsk,d;if(F){if(_.oE.length>1){var w=q.Y.J5(_.b,null,_.oE);
d=q.z.gh(w)}else d=q.Y.if(_.b,_.C.length!=0?_.C:null)}else d=q.Y.if(_.b);x=x.Tq(d)}if(r.indexOf(3)!=-1)x=x.Tq(this.Fa(n).r.nJ());
if(r.length==0&&this.zX())x=new gv(0,0,n.d,n.v);return x};K.prototype.MC=function(){var n=this.add.artb,F=n.artboardBackgroundType.v,O=0;
if(F==1)O=4294967295;else if(F==2)O=4278190080;else if(F==3)O=0;else if(F==4){O=n.Clr.v;O=255<<24|O.Bl.v<<16|O.Grn.v<<8|O.Rd.v}else throw F;
return O};K.prototype.Fn=function(){var n=this.add.artb.artboardRect.v,F=n.Btom.v,O=n.Left.v,I=n.Rght.v,top=n.Top.v;
return new gv(O,top,I-O,F-top)};K.prototype.Hp=function(n){var F=K.DO(n);if(this.add.artb==null)this.add.artb={classID:"artboard",artboardRect:{t:"Objc",v:null},artboardBackgroundType:{t:"long",v:1}};
this.add.artb.artboardRect.v=F};K.DO=function(n){var F={classID:"classFloatRect",Top:{t:"doub",v:0},Left:{t:"doub",v:0},Btom:{t:"doub",v:0},Rght:{t:"doub",v:0}};
F.Btom.v=n.y+n.v;F.Left.v=n.x;F.Rght.v=n.x+n.d;F.Top.v=n.y;return F};K.prototype.rT=function(n,F,O){var I=[],x=this,r=this.qI;
if(!F&&x.qI&&O){I.push(2)}else if(x.vE<=0||F){if(x.R9())if(!this.rect.D2())I.push(0);if(x.B1()&&!x.B1().rect.D2())if(x.B1().Tu||F)I.push(1);
if(x.add.vmsk)if(x.add.vmsk.Tu||F)I.push(2);if(x.z3()&&x.Fa(n).r&&!x.Fa(n).r.rect.D2())I.push(3)}else if(x.vE==1){I.push(1);
if(x.B1().Tu&&!x.B1().rect.D2()){if(x.R9())if(!this.rect.D2())I.push(0);if(x.add.vmsk)if(x.add.vmsk.Tu)I.push(2)}}else if(x.vE==3&&!x.Fa(n).r.rect.D2())I.push(3);
if(x.add.artb&&I.indexOf(0)==-1)I.push(0);I.sort();return I};K.prototype.B1=function(){var n=this;return n.a8?n.a8:n.add.vmsk&&n.add.vmsk.isEnabled?null:n.r};
K.prototype.Fa=function(n){var F=this.add.SoLd.placed.v,O=n.add.FEid;if(O==null)return null;for(var e=0;
e<O.length;e++)if(O[e].id==F)return O[e];return null};K.prototype.extend=function(n){q.aeD(this,n)};
K.prototype.OM=function(n,F,O){var I=n.clone();if(this.C8()){var x=this.add.lmfx,r=F.root.Dv(F.t.indexOf(this)),_=x.gradientFillMulti.v,d=!1;
for(var e=0;e<_.length;e++)if(_[e].v.enab.v&&_[e].v.Algn.v)d=!0;if(d)I=I.Tq(r.nJ(F,!1));var w=ha.a1u(this,F,O);
I.offset(w.x,w.y);I.d+=w.d;I.v+=w.v}return I};K.prototype.t7=function(){if(this.R9())q.dB(this);var n=this.B1();
if(n)n.t7()};K.prototype.clone=function(){var n=new K;n.rect=this.rect.clone();n.buffer=this.buffer.slice(0);
n.mf=this.mf;n.opacity=this.opacity;n.fc=this.fc;n.Cq=this.Cq;n.name=this.name;n.wx=this.wx.slice(0);
if(this.r)n.r=this.r.clone();if(this.a8)n.a8=this.a8.clone();for(var F in this.add)n.add[F]=is.clone(F,this.add[F]);
return n};K.prototype.zS=function(n){var F=this;if(F.add.TySh)delete F.add.TySh;if(F.add.SoLd){var O=this.nZ(n,this.buffer,this.rect);
if(O){this.buffer=O.zc;this.rect=O.rect;this.D()}delete F.add.SoLd}if(F.add.SoCo||F.add.GdFl||F.add.PtFl){if(F.add.vogk)delete F.add.vogk;
if(F.add.SoCo)delete F.add.SoCo;if(F.add.GdFl)delete F.add.GdFl;if(F.add.PtFl)delete F.add.PtFl;if(F.add.vmsk){console.log(F.a8,F.r);
delete F.add.vmsk;if(F.a8==null&&F.r)delete F.r;else if(F.a8!=null&&F.r!=null){F.r=F.a8;delete F.a8}}}if(!F.Ja()&&dK.get(F.add)==null&&!this.R9())this.Cq-=16};
K.prototype.oP=function(n){var F=255,O=0;if(n==2){var I=this.add.SoLd.filterFX.v;if(I.filterMaskDensity)F=I.filterMaskDensity.v;
if(I.filterMaskFeather)O=I.filterMaskFeather.v}else{var x=n==0?this.B1():this.add.vmsk;F=x.JP;O=x.RI}return{jx:n,nY:F,mo:O}};
K.prototype.QZ=function(n){if(n.jx==2){var F=this.add.SoLd.filterFX.v;if(n.nY==255)delete F.filterMaskDensity;
else F.filterMaskDensity={t:"long",v:n.nY};if(n.mo==0)delete F.filterMaskFeather;else F.filterMaskFeather={t:"doub",v:n.mo};
this.D()}else{var O=n.jx==0?this.B1():this.add.vmsk;O.JP=n.nY;O.RI=n.mo;O.j8=!0}};K.prototype.XO=function(){var n=this,F=n.add.vmsk;
if(F==null)return;n.add.vogk=K.XO(F.b)};K.XO=function(n){var F=[],O=q.Y._v(n);for(var I=0;I<O;I++)F.push(q.oK.CZ());
return F};var ho={uE:0,x7:1,OC:2,bu:3};K.FZ=function(){this.name="Mask";this.wC=!1;this.eF={Q:255,l:0,O:0};
this.aX=50;this.j5=0;this.color=255;this.Tu=!0;this.isEnabled=!0;this.Qe=!1;this.JP=255;this.RI=0;this.rect=new gv;
this.channel=q.f(0);this.wI=null;this.amJ=null;this.j8=!0};K.FZ.prototype.NM=function(n){if(!this.isEnabled)return n;
var F=new K.FZ;F.color=Math.round(this.S_()*n.S_()/255);if(this.S_()==0&&n.S_()==0)F.rect=this.nJ().lN(n.nJ());
else if(n.S_()==0)F.rect=n.nJ().clone();else if(this.S_()==0)F.rect=this.nJ().clone();else F.rect=this.nJ().Tq(n.nJ());
F.channel=this.Uz(F.rect);F.JP=255;F.RI=0;var O=n.Uz(F.rect);q.afC(O,F.rect,F.channel,F.rect);return F};
K.FZ.prototype.nJ=function(){if(this.RI==0)return this.rect;var n=Math.ceil(this.RI*2.2),F=this.rect.clone();
F.EM(n,n);return F};K.FZ.prototype.mJ=function(){if(this.RI==0&&this.JP==255)return this.channel;if(this.RI==0){var n=this.channel.slice(0);
q.uZ(n);q.Ny(n,this.JP/255);q.uZ(n);return n}var F=this.nJ(),O=this.JO(F),n=q.f(F.X());q.Mo.MU(O,n,F,this.RI);
if(this.JP!=255){q.uZ(n);q.Ny(n,this.JP/255);q.uZ(n)}return n};K.FZ.prototype.S_=function(){return Math.round(255-(255-this.color)*(this.JP/255))};
K.FZ.prototype.extend=function(n){q.extend(this,n,this.color)};K.FZ.prototype.t7=function(){if(this.color==255)q.uZ(this.channel);
q.t7(this);if(this.color==255)q.uZ(this.channel)};K.FZ.prototype.clone=function(){var n=new K.FZ;n.name=this.name;
n.wC=this.wC;n.eF=this.eF;n.aX=this.aX;n.j5=this.j5;n.color=this.color;n.Tu=this.Tu;n.isEnabled=this.isEnabled;
n.Qe=this.Qe;n.JP=this.JP;n.RI=this.RI;n.rect=this.rect.clone();n.channel=this.channel.slice(0);return n};
K.FZ.prototype.JO=function(n,F){if(F==null)F=q.f(n.X());F.fill(this.color);q.k9(this.channel,this.rect,F,n);
return F};K.FZ.prototype.Uz=function(n,F){var O=this.nJ(),I=this.mJ();if(F==null)F=q.f(n.X());F.fill(this.S_());
q.k9(I,O,F,n);return F};K.X9=function(){this.Tu=!0;this.isEnabled=!0;this.JP=255;this.RI=0;this.b=[{type:6},{type:8,all:0}];
this.AZ=[-3,-3];this.Ay=!1;this.a8=null;this.j8=!0;this.C=[];this.oE=[]};K.X9.prototype.offset=function(n,F){this.a8=this.B1();
q.Y.gS(this.b,new cD(1,0,0,1,n,F));this.a8.rect.offset(n,F)};K.X9.prototype.B1=function(n){if(!this.j8&&this.a8&&n==null){this.a8.isEnabled=this.isEnabled;
return this.a8}var F=q.Y.if(this.b),O="strokeStyleLineAlignment",I="strokeStyleLineJoinType";if(F.X()>3e4*3e4)F=new gv(0,0,100,100);
if(n&&n[O].v[O]!="strokeStyleAlignInside"){var x=1;if(n[I].v[I]=="strokeStyleMiterJoin"){var r=q.Y.aoE(this.b),_=r/2,d=Math.sin(_),w=Math.cos(_);
w/=d;d=1;var x=Math.sqrt(w*w+d*d);if(isNaN(x)||x<1)x=1}x*=n[O].v[O]=="strokeStyleAlignOutside"?1:.5;
var Z=Math.ceil(n.strokeStyleLineWidth.v.val*x);Z=Math.min(Z,600);F.EM(Z,Z)}F=q.z.Me(F);var P=new K.FZ;
P.color=q.Y.zz(this.b)?0:255;P.Tu=this.Tu;P.isEnabled=this.isEnabled;P.Qe=!0;P.rect=F;P.JP=this.JP;P.RI=this.RI;
P.channel=q.f(P.rect.X());if(!F.D2())q.Y.ah3(this.b,P.channel,P.rect,n);if(n==null){this.a8=P;this.j8=!1}return P};
K.X9.prototype.clone=function(){var n=new K.X9;n.Tu=this.Tu;n.isEnabled=this.isEnabled;n.JP=this.JP;
n.RI=this.RI;n.b=K.X9.jI(this.b);n.AZ=this.AZ.slice(0);n.Ay=this.Ay;n.C=this.C.slice(0);n.oE=this.oE.slice(0);
return n};K.X9.prototype.concat=function(n){var F=n.b.slice(2);if(F.length==0)return;F[0].Xu=3;this.b=this.b.concat(F)};
K.X9.jI=function(n){var F=[];for(var e=0;e<n.length;e++){var O=n[e];if(O.type>5||O.type==0||O.type==3)F.push(JSON.parse(JSON.stringify(O)));
else F.push({type:O.type,pt:O.pt.clone(),I:O.I.clone(),Cz:O.Cz.clone()})}return F};K.X9.aha=function(n,F,O){if(n.length!=F.length)return!1;
for(var e=2;e<n.length;e++){var I=n[e],x=F[e];if(I.type!=x.type)return!1;if(I.type==0||I.type==3){if(I.length!=x.length||!O&&I.Xu!=x.Xu)return!1}else if(!I.pt.Qq(x.pt)||!I.I.Qq(x.I)||!I.Cz.Qq(x.Cz))return!1}return!0};
K.X9.prototype.a1r=function(){var n=this.b;for(var e=3;e<n.length;e++)if(n[e].type==0||n[e].type==3)n[e].Xu=-1};
K.$x=function(){this.type=null;this.ev=2;this.D5=null;this.fA="";this.he="";this.Z7="";this.open=0;this.raw=null;
this.yO=null;this.agG=""};K.$x.prototype.clone=function(){var n=new K.$x;n.type=this.type;n.ev=this.ev;
n.D5=this.D5;n.fA=this.fA;n.he=this.he;n.Z7=this.Z7;n.open=this.open;n.raw=new Uint8Array(this.raw.buffer.slice(0));
return n};K.$x.prototype.dH=function(n,F,O){if(O==null)O="none";var I=this,x=fx.TG(I.raw.buffer),r=x=="svg"||x=="pdf";
if(I.yO){var _=F&&r&&Math.max(I.yO[1].d,I.yO[1].v)<Math.max(F[0],F[1]);if(!_&&O==this.agG)return}this.agG=O;
if(!r)n=0;if(x==null){alert("Unsupported format: "+Y.su(I.raw,0,4));return null}var d=fx.rM(x);if(d.dp){var w=new fj(name+(x=="psd"?"":"-"+x)+".psd"),Z;
d.bx(I.raw.buffer,w,F);var P=new gv(0,0,w.d,w.v);if("avrg maxx medn minn rang stdv summ vari".split(" ").indexOf(O)!=-1){var C=[];
for(var e=0;e<w.t.length;e++){var W=w.t[e],v=W.buffer;if(!W.rect.Qq(P)){v=q.f(P.X()*4);q.nF(W.buffer,W.rect,v,P);
console.log("resizing")}C.push(v)}Z=q.f(P.X()*4);q.stack.stack(C,Z,O)}else{for(var e=0;e<w.t.length;
e++)if(w.t[e].zX())w.t[e].o3(w);w.lq();w.D();w.nu();Z=w.dH()}I.yO=[Z,P]}else if(d){var L=d.bx(I.raw.buffer)[0];
I.yO=[new Uint8Array(L.data),L.Kh]}if(I.yO){if(n==1){var v=I.yO[0],H=I.yO[1],y=q.f(H.X());q.xg(v,y,3);
var g=q.$o(y,H),Q=q.f(g.X()*4);q.nF(v,H,Q,g);I.yO=[Q,g]}q.zZ(I.yO)}};K.bn="0";K.C9="2";K.cb="2.5";K.tI="3";
K.iD="4";K.NR="4.5";K.Za="4.6";K.vQ="5";K.GB="5.5";K.J8="6";K.FB="7";K.pw="7.5";K.Vu="8";K.W9="9";K.gb="9.3";
K.BW="9.5";K.eO="9.6";K.ub="10";K.r4="11";K.Vd="12";K.ad="13";K._K="13.5";K.v2="13.7";K.$t="14";K._2="14.5";
K.al="15";K.jc="16";K.Ro="17";K.Gi="18";K.ed="19";K.LA="19.5";K._a="19.6";K.yp="19.7";K.SG="20";K.nM="21";
K.ll="21.5";K.BM="22";K.E9="22.5";K.V0="23";K.a9_="24";K.Vp="25";K.d4="26";K.Xc="27";K.AF="28";K.Uq="29";
K.Cf="30";K.Eu="31";K.SP="32";K.R1="33";K.DW="34";K.LS="35";K.sV="36";K.Wh="36.5";K.dd="37";K.qU="37.5";
K.a8$="37.6";K.UF="38";K.fD="38.5";K.Gq="38.6";K.a$="39";K.OZ="40";K.Ds="41";K.GZ="42";K.Rh="50";K.wg="51";
K.jo="52";K.jM="53";K.r_="54";K.Qp="54.5";K.vN="54.6";K.Y5="54.7";K.Vv="54.8";K.i8="55";K.qu="56";K.vi="57";
K.WP="58";K.D4="59";function hw(){this.depth=0;this.index=-1;this.$=null;this.adz=null;this._j=-1;this.children=null;
this.parent=null;this.hf=null}hw.prototype.sd=function(n,F){if(this.depth!=0)n.push(this.$.getName());
if(this.children)for(var e=0;e<this.children.length;e++)this.children[e].sd(n,F);if(n.length>F.K_.length)F.K_=n.slice(0);
if(this.depth!=0)n.pop()};hw.prototype.a6s=function(){var n=0;if(this.$.Ja()){for(var e=0;e<this.children.length;
e++)n+=this.children[e].a6s()}else if(this.$.buffer)n+=this.$.buffer.length;return n};hw.prototype.Dv=function(n){var F=this.hf[n];
return this.hf[n]};hw.prototype.cS=function(n,F){var O=this.$;if(!O.Y9()||O.LF(2)||O.LF(31))return null;
if(O.uW()){var I=O.r.rect.G3(n);if(!I&&O.r.color==0)return}if(O.Ja()){for(var e=0;e<this.children.length;
e++){var E=this.children[e];E.cS(n,F)}}else if(O.rect.G3(n))F.push(this.index)};hw.prototype.q9=function(n,F){var O=this.$;
if(!O.Y9()||O.LF(2)||O.LF(31))return null;if(O.uW()){if(O.r.rect.JX(n)){if(!q.q9(n,O.r.channel,O.r.rect))return null}else if(O.r.color==0)return null}if(O.Ja()){for(var e=this.children.length-1;
e>=0;e--){var E=this.children[e],I=E.q9(n,F);if(I&&F==null)return I}return null}else if(O.add.TySh&&O.rect.JX(n)||q.acV(n,O.buffer,O.rect)){if(F==null)return this;
else F.push(this.index)}return null};hw.prototype.ah8=function(n){var F=this.$;if(!F.Y9()||F.LF(2)||F.LF(31))return null;
var O=F.add.vmsk;if(O&&O.isEnabled){var I=q.Y.q9(O.b,n).FI;if(I!=-1)return{am1:this,adn:I}}if(F.Ja()){for(var e=this.children.length-1;
e>=0;e--){var E=this.children[e],x=E.ah8(n);if(x)return x}return null}return null};hw.prototype.$Z=function(n,F){n.push(this.index);
if(this.$.Ja()){n.push(this._j);if(F)if(this.$.vE==1&&this.$.B1().Tu==!1)return;for(var e=0;e<this.children.length;
e++)this.children[e].$Z(n)}};hw.prototype.JC=function(n,F,O){var I=this.$,x,r;if(I.Ja()&&I.add.artb!=null)F=I.Fn();
if(F.d>F.v){x=O;r=Math.floor(O*(F.v/F.d))}else{x=Math.floor(O*(F.d/F.v));r=O}if(I.zX()&&I.add.vmsk==null||I.add.TySh)x=r=Math.max(r,16);
else{x=Math.max(x,6);r=Math.max(r,6)}var _=r,d=I.zX()&&I.add.vmsk;if(d){var w=I.rect.clone(),C,W;if(w.D2())w=new gv(0,0,20,20);
var Z=w.d,P=w.v;if(Z>P){C=O;W=Math.floor(O*(P/Z))}else{C=Math.floor(O*(Z/P));W=O}if(C*W==0)C=W=16;q.Sr.Y8(I.bk,C,W,w,I.buffer,I.rect,!1);
q.Sr.a5r(I.bk,C,W);_=W}else if(I.add.TySh){q.Sr.a2i(I.bk,_,_,I.add.TySh)}else if(I.add.SoCo){_=Math.max(16,Math.min(x,r));
q.Sr.anU(I.bk,_,_,I.add.SoCo)}else if(I.add.GdFl){q.Sr.ano(I.bk,_,_,I.add.GdFl)}else if(I.add.PtFl){q.Sr.a56(I.bk,_,_,I.add.PtFl,n)}else if(dK.get(I.add)!=null){q.Sr.a6Z(I.bk,_,_,I.add)}else if(I.add.SoLd){q.Sr.Y8(I.bk,x,r,F,I.buffer,I.rect,!1);
q.Sr.aiV(I.bk,x,r,I.add.SoLd)}else if(I.Ja()){_=16}else{if(I.R9())q.Sr.Y8(I.bk,x,r,F,I.buffer,I.rect,!1);
else{q.Sr.aa4(I.bk,_,_)}}var v=I.B1();if(v)q.Sr.Tx(I.afY,x,r,F,v);if(I.z3()&&I.Fa(n)&&I.Fa(n).r){var L=I.Fa(n).r;
q.Sr.Tx(I.a4E,x,r,F,L)}if(!d&&I.add.vmsk){q.Sr.Tx(I.a5y,x,r,F,I.add.vmsk.B1(),!0)}if(I.add.vmsk||v)_=Math.max(_,r);
I.a4z=Math.max(_,16);if(I.Ja()&&I.add.lsct==ho.x7)for(var e=0;e<this.children.length;e++)this.children[e].JC(n,F,O)};
hw.prototype.sr=function(n,F,O,I){this.depth=O;var x=n[F];if(I==null)I=[];this.hf=I;if(x.add.lsct==ho.bu){this.adz=x;
this._j=F-1;this.children=[];var e=F+1;while(!0){var r=n[e];if(r==null)console.log(e,n.length);if(r.add.lsct==ho.x7||r.add.lsct==ho.OC){if(x.add.lyid==r.add.lyid)x.add.lyid+=16777215;
this.$=r;this.index=e-1;I[this.index]=this;I[F-1]=this;break}var _=new hw;_.parent=this;e=_.sr(n,e,O+1,I);
this.children.push(_)}return e+1}else{this.$=x;this.index=F-1;I[this.index]=this;return F+1}};hw.prototype.zT=function(n,F,O,I){var x=this.Dv(O),r=n;
while(x.parent!=null){r=x.$.OM(r,F,I);x=x.parent}return r};hw.prototype.nJ=function(n,F){var O=this.$,I=new gv;
if(!O.Y9())return I;var x=O.B1();if(O.Ja())for(var e=0;e<this.children.length;e++){var r=this.children[e].nJ(n,!0);
I=I.Tq(r)}else if(dK.get(O.add)!=null)I=O.uW()&&O.r.color==0?O.r.nJ().clone():new gv(0,0,n.d,n.v);else if(O.zX()&&O.add.vmsk&&O.add.vmsk.isEnabled&&O.add.vstk){I=O.rect.clone()}else if(O.zX()&&x&&x.isEnabled&&x.S_()!=0)I=new gv(0,0,n.d,n.v);
else{I=O.Yg(n,!1,!0);if(O.add.vmsk)I=q.z.Me(I)}return F?O.OM(I,n):I};hw.prototype.H6=function(n,F,O,I,x){var r=this.$,_=ha.NY(r);
if(!r.Y9())return;if(r.opacity==255){this.HK(n,F,O,I,x);return}var d=n.slice(0);this.HK(d,F,O,I,x);q.p.Nb(d,F,n,F,null,null,0,O,r.opacity/255,r.mf=="diss")};
hw.prototype.HK=function(n,F,O,I,x){var r=this.$,_=ha.NY(r),d=dK.get(r.add)!=null,C,L;if(r.Ja()&&r.mf=="pass"&&!r.uW()&&!(x.length>0||_.fill!=1||r.C8())){this.ky(n,F,O,I);
return}var w=r.Ja()&&r.mf=="pass"&&(x.length>0||_.fill!=1||r.C8()),Z=r.rect,P=r.buffer;if(r.Ja()){Z=this.nJ(I,!1);
var W=q.f(Z.X()*4);C=q.f(Z.X());this.ky(W,Z,O,I);q.xg(W,C,3)}else if(d){Z=F.clone();C=q.f(Z.X());C.fill(255)}else{Z=r.rect;
C=q.f(Z.X());q.xg(P,C,3)}if(r.uW()){var v=r.r.Uz(Z);q.yr(v,C)}if(r.C8())L=ha.gG(r.add.lmfx,r.add.fxrp,C,Z,I);
if(r.C8())ha.zN(r.add.lmfx,L,Z,n,F,O);if(r.Ja()){P=q.f(Z.X()*4);if(r.mf=="pass")q.nF(n,F,P,Z);if(w){var W=q.f(Z.X()*4);
this.ky(W,Z,O,I);var H=q.f(Z.X());q.xg(W,H,3);q.oh(H,Z,P,Z)}this.ky(P,Z,O,I)}if(d){P=n.slice(0);q.IW(P,4278190080,16777215);
var y=dK.get(r.add),g=dK.k6(y,r.add[y]);dK.Fl(g,P,P,Z)}var Q=P.slice(0);q.IW(Q,4278190080,16777215);
for(var e=0;e<x.length;e++)x[e].H6(Q,Z,O,I,[]);var J=q.f(Z.X()*4);q.nF(n,F,J,Z);if(d)_.rU=!0;q.p.F_(r.mf=="pass"?"norm":r.mf,Q,Z,J,Z,O,1,_);
if(r.C8()){var A=r.KJ.d8.type.FrFX,p=null;if(A.length!=0){p=A[0];for(var e=0;e<A.length;e++)if(A[e].or.d>p.or.d)p=A[e];
var U=q.f(p.or.d*p.or.v*4);q.nF(n,F,U,p.or)}ha.xd(r.add.lmfx,L,Z,n,F,O,J,U,p?p.or:null)}q.p.Nb(J,Z,n,F,C,Z,0,O,1,r.mf=="diss")};
hw.prototype.ky=function(n,F,O,I){var x=this.children;for(var e=0;e<x.length;e++){var r=[];for(var _=e+1;
_<x.length;_++)if(x[_].$.fc)r.push(x[_]);else break;x[e].H6(n,F,O,I,r);e+=r.length}};hw.bm={delete:function(n){if(n&&n.d)n.delete()},f:function(n,F){return l.Z0?new l.zF(n,F):q.f(n*F*4)},xh:function(n,F,O){if(l.Z0){if(n==null||n.d!=F||n.v!=O){hw.bm.delete(n);
return new l.zF(F,O)}}else{if(n==null||!(n instanceof Uint8Array)||n.length!=F*O*4){hw.bm.delete(n);
return q.f(F*O*4)}}return n},k9:function(n,F,O,I,x){(l.Z0?l.U0:q.nF)(n,F,O,I,x)},Nb:function(n,F,O,I,x,r,_,d,e,w,Z){(l.Z0?l.p.t_:q.p.Nb)(n,F,O,I,x,r,_,d,e,w,Z)},F_:function(n,F,O,I,x,r,_,d){if(l.Z0)l.p.$p(n,F,O,I,x,r,_,d);
else q.p.F_(n,F,O,I,x,r,_,d)},IW:function(n,F,O){if(l.Z0){l.wu(n);l.rF(F,O)}else q.IW(n,F,O)},am7:function(n,F,O,I,x){if(l.Z0){l.p.t_(null,null,I,x,n,F,O,x,1,!1)}else{if(O==255)q.oh(n,F,I,x);
else{var r=q.f(F.X());q.xv(I,x,r,F);q.yr(n,r);q.IW(I,0,16777215);q.ei(r,F,I,x)}}},qw:function(n,F,O,I){if(l.Z0)l.p.t_(null,null,O,I,n,F,0,I,1,!1);
else q.qw(n,F,O,I)}};hw.prototype.GH=function(n,F,O,I,x,r){var _=typeof r=="number";if(!this.$.Ja()&&(_&&this.index>r||!_&&r.indexOf(this.index)==-1)){return}var d=this.$,w=ha.NY(d),Z=hw.bm,P=d.zX()?d.B1():d.r;
if(!d.Y9())return;if(d.uW()&&P.rect.D2()){return}if(d.add.vstk==null&&this.nJ(I,!1).D2()&&d.add.artb==null){return}var C=this.nJ(I,!0).lN(O);
if(!F.Qq(O)&&!O.G3(C)&&d.add.artb==null)return;if(d.Ja()&&d.add.artb){var W=d.Fn();O=O.lN(W);var v=d.MC();
if(v!=0){if(l.Z0){l.wu(n,O);l.rF(v);l.rF(v)}else q.a4i(n,F,O,v)}}var L=hw.ur(d,x,w);if(!L){this.PA(n,F,O,I,x,r);
return}d.KJ.M0=Z.xh(d.KJ.M0,C.d,C.v);Z.k9(n,F,d.KJ.M0,C,O);this.PA(d.KJ.M0,C,O,I,x,r);Z.Nb(d.KJ.M0,C,n,F,null,null,0,O,d.opacity/255,d.mf=="diss",w.fr)};
hw.ur=function(n,F,O){if(O.fr[0]*O.fr[1]*O.fr[2]==0)return!0;return n.opacity!=255&&(F.length!=0||n.Ja()||n.C8())};
hw.a02={KJ:{}};hw.prototype.PA=function(n,F,O,I,x,r){var _=this.$,d=ha.NY(_),w=dK.get(_.add)!=null,Z=hw.bm,P=hw.ur(_,x,d),C=P?1:_.opacity/255,W=_.zX()?_.B1():_.r,v=_.Ja()&&_.mf=="pass"&&!(x.length>0||d.fill!=1||_.C8()),L=!_.Ja()&&!w&&!_.C8()&&x.length==0,H=w&&!_.C8()&&x.length==0,p=null,U=null,j=null,T;
if(v||L||H){var y=n,g=F;if(_.uW()){g=this.nJ(I,!1);y=_.KJ.Ey=Z.xh(_.KJ.Ey,g.d,g.v);Z.k9(n,F,_.KJ.Ey,g)}if(v)this.DN(y,g,O,I,r);
if(L)Z.F_(_.mf,_.MM(I),_.rect,y,g,O,C,d);if(H){var Q=_.uW()&&W.S_()==0?W.nJ().clone():g.clone(),J=_.KJ;
if(Q.Qq(new gv(0,0,I.d,I.v)))J=hw.a02;J.lT=this.ks(y,g,J.lT,Q,_.add);d.rU=!0;Z.F_(_.mf,J.lT,Q,y,g,O,C,d)}if(_.uW())Z.Nb(y,g,n,F,_.BA(),W.nJ(),W.S_(),O,1,_.mf=="diss");
_.KJ.V8();return}var A=_.Ja()&&_.mf=="pass"&&(x.length>0||d.fill!=1||_.C8()),Q=_.rect;if(_.Ja()){Q=this.nJ(I,!1);
j=_.KJ.lT=Z.xh(_.KJ.lT,Q.d,Q.v);Z.IW(j,0);this.DN(j,Q,Q,I,r);U=Z.xh(_.KJ.U4,Q.d,Q.v);Z.k9(j,Q,U,Q)}else if(w){Q=_.uW()&&W.S_()==0?W.nJ().clone():F.clone();
U=Z.xh(_.KJ.U4,Q.d,Q.v);Z.IW(U,4294967295)}else{Q=_.rect;p=_.MM(I);U=Z.xh(_.KJ.U4,Q.d,Q.v);Z.k9(p,Q,U,Q)}_.KJ.U4=U;
if(_.uW())Z.am7(_.BA(),W.nJ(),W.S_(),U,Q);if(_.C8())if(_.KJ.L4||_.KJ.hv||_.KJ.e_!=l.Z0||_.KJ.on||_.Ja()){var b=q.f(Q.d*Q.v);
if(ha.Uj(_.add.lmfx)){if(l.Z0){if(!_.Ja()&&_.B1()==null&&_.rect.Qq(Q))q.xg(_.buffer,b,3);else{var s=q.f(Q.d*Q.v*4);
U.get(s);q.xg(s,b,3)}}else q.xg(U,b,3)}if(_.KJ.hv||_.KJ.e_!=l.Z0||!q.Qq(b,_.KJ.hs)){var G=null;if(_.zX()&&_.add.vmsk&&_.add.vmsk.isEnabled&&_.add.vmsk.B1().color==0)G=_.add.vmsk.B1().rect;
ha.aan(_.KJ.d8,b,Q,_.add.lmfx,_.add.fxrp,I,G);_.KJ.hs=b}}if(_.C8())ha.zN(_.add.lmfx,_.KJ.d8,Q,n,F,O);
if(_.Ja()){p=Z.xh(_.KJ.Ey,Q.d,Q.v);Z.IW(p,0);if(_.mf=="pass")Z.k9(n,F,p,Q);if(A)Z.qw(j,Q,p,Q);this.DN(p,Q,O,I,r);
_.KJ.Ey=p}if(w){p=_.KJ.Ey=this.ks(n,F,_.KJ.Ey,Q,_.add)}if(_.Ja()||w)T=p;else{T=Z.xh(_.KJ.Ey,Q.d,Q.v);
Z.k9(p,Q,T,Q,O);_.KJ.Ey=T}Z.IW(T,4278190080,16777215);for(var e=0;e<x.length;e++)x[e].GH(T,Q,O,I,[],r);
var z=_.KJ.dr=Z.xh(_.KJ.dr,Q.d,Q.v);Z.k9(n,F,z,Q,O);if(w)d.rU=!0;Z.F_(_.mf=="pass"?"norm":_.mf,T,Q,z,Q,O,1,d);
if(_.C8()){var m=_.KJ.d8.type.FrFX,$=null;if(m.length!=0){$=m[0];for(var e=0;e<m.length;e++)if(m[e].or.d>$.or.d)$=m[e];
_.KJ.th=Z.xh(_.KJ.th,$.or.d,$.or.v);Z.k9(n,F,_.KJ.th,$.or,O);_.KJ.cC=Z.xh(_.KJ.cC,$.or.d,$.or.v)}ha.xd(_.add.lmfx,_.KJ.d8,Q,n,F,O,z,_.KJ.th,_.KJ.cC,$?$.or:null)}if(!l.Z0){var o=q.f(Q.X());
q.xg(U,o,3);U=o}Z.Nb(z,Q,n,F,U,Q,0,O,1,_.mf=="diss");_.KJ.V8()};hw.prototype.ks=function(n,F,O,I,x){var r=dK.get(x),_;
if(r)_=dK.k6(r,x[r]);var d=hw.bm;O=d.xh(O,I.d,I.v);if(!(l.Z0&&F.Qq(I)))d.k9(n,F,O,I);if(_){if(l.Z0){var w=I.clone();
w.x=w.y=0;if(F.Qq(I)){l.wu(O,w);dK.Yn(_,n.sg,w)}else{l.wu(O,I);O.ww(I);dK.Yn(_,O.Lu,w)}}else dK.Fl(_,O,O,I)}return O};
hw.prototype.DN=function(n,F,O,I,x){var r=this.children;for(var e=0;e<r.length;e++){var _=[];for(var d=e+1;
d<r.length;d++)if(r[d].$.fc)_.push(r[d]);else break;r[e].GH(n,F,O,I,_,x);e+=_.length}};function fj(n){this.uy="psd";
this.zQ=!1;this.name=n;this.fS=-1;this.ve=null;this.gD=null;this.CQ=null;this.Hk=null;this.d=0;this.v=0;
this.t=[];this.IP={};this.add={};this.buffer=null;this.Nq=4;this.Sw=null;this.gC=72;this.aC={};this.C=[];
this.fT=[[],[]];this.l_=[];this.Hu=[];this.Hi=[fj.kh("Work Path")];this.f$=[];this.a5=null;this.M$={classID:"CompList",list:{t:"VlLs",v:[]}};
this.root=null;this.QF=null;this.u4=!1;this.a7R=!1;this.a0R=!1;this.Po=!1;this.NX=!1;this.zB=!1;this.T3=!1;
this._y=!1;this.xT=!1;this.wD=!1;this.L4=null;this.eg=null;this.HG={};this.N=null;this.TM=[];this.P4=[];
this.M={T$:{},Ri:[],a3V:[],dl:[],ye:[],qD:null,kR:null,iA:null,vY:null,zi:[],s3:[]};this.history=[new hS([1,0],null)];
this.ok=0;this.qs=0;this.a=new h0(this)}fj.prototype.Rx=function(n){var F=this;if(n[0])F.add.lnk2=n[0];
else delete F.add.lnk2;if(n[1])F.add.FEid=n[1];else delete F.add.FEid;if(n[2])F.add.Patt=n[2];else delete F.add.Patt};
fj.prototype.adf=function(n){var F=this,O=[],I=[],x=[],v=null,L=null,H=null;for(var e=0;e<n.length;e++){var r=n[e];
if(r.add.SoLd){O.push(r.add.SoLd.Idnt.v);I.push(r.add.SoLd.placed.v)}if(r.add.PtFl)x.push(r.add.PtFl.Ptrn.v.Idnt.v);
if(r.add.lmfx){for(var _=0;_<bW.jV.length;_++){var d=r.add.lmfx[bW.jV[_]].v;for(var w=0;w<d.length;w++)if(d[w].v.Ptrn)x.push(d[w].v.Ptrn.v.Idnt.v)}}var Z=r.add.vstk;
if(Z&&Z.strokeStyleContent.v.classID=="patternLayer"){x.push(Z.strokeStyleContent.v.Ptrn.v.Idnt.v)}}var P=F.add.lnk2,C=F.add.FEid,W=F.add.Patt;
if(P){v=[];for(var e=0;e<P.length;e++)if(O.indexOf(P[e].D5)!=-1)v.push(P[e]);if(v.length==0)v=null}if(C){L=[];
for(var e=0;e<C.length;e++)if(I.indexOf(C[e].id)!=-1)L.push(C[e]);if(L.length==0)L=null}if(W){H=[];for(var e=0;
e<W.length;e++)if(x.indexOf(W[e].id)!=-1)H.push(W[e]);if(H.length==0)H=null}return[v,L,H]};fj.prototype.rk=function(){var n=this.TM,F=this.TM.length;
if(F!=0&&n[F-1].name=="Quick Mask")return n[F-1]};fj.prototype.fY=function(){return this.uy==V.by("% |/!)")||this.uy==V.gi("gP")};
fj.prototype.bJ=function(n){this.add.artd={classID:"null",Cnt:{t:"long",v:n},autoExpandOffset:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:0},Vrtc:{t:"doub",v:0}}},origin:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:0},Vrtc:{t:"doub",v:0}}},canvasColorMode:{t:"enum",v:{canvasColorType:"Cstm"}},canvasColor:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:220},Grn:{t:"doub",v:220},Bl:{t:"doub",v:220}}},autoExpandEnabled:{t:"bool",v:!0},autoNestEnabled:{t:"bool",v:!0},autoPositionEnabled:{t:"bool",v:!0}}};
fj.prototype.ti=function(n){if(this.add.FEid==null)this.add.FEid=[];if(this.add.FEid.indexOf(n)==-1)this.add.FEid.push(n)};
fj.prototype.Aw=function(n){var F=this.add.FEid.indexOf(n);this.add.FEid.splice(F,1);if(this.add.FEid.length==0)delete this.add.FEid};
fj.prototype.D=function(n){if(n==null)n=new gv(0,0,this.d,this.v);if(this.L4==null)this.L4=n;else this.L4=this.L4.Tq(n)};
fj.prototype.a6A=function(n){return this.L4!=null};fj.prototype.ZP=function(n){var F=this.t[n],O=this.root.Dv(n);
if(O==null)return!1;if(F.Ja()||O.parent.children.indexOf(O)==0)return!1;return!0};fj.a4I=function(n){if(n.add.lnk2)for(var e=0;
e<n.add.lnk2.length;e++){var F=n.add.lnk2[e].D5;n.add.lnk2[e].D5=fj.Mj()+F.slice(8);for(var O=0;O<n.t.length;
O++){var I=n.t[O].add.SoLd;if(I&&I.Idnt.v==F)I.Idnt.v=n.add.lnk2[e].D5}}};fj.prototype.Ak=function(n,F,O){n.sort(function(C,W){return C-W});
var top=n[n.length-1],I=this.t.slice(0),x=this.C.slice(0),r=[],_=[];for(var e=0;e<this.t.length;e++){if(n.indexOf(e)!=-1)_.push(this.t[e]);
else r.push(this.t[e])}this.xc(_);this.C=[];var d=this.root.nJ(this,!0);if(F)d=d.lN(F);if(O)d=d.Tq(O);
if(d.D2())d=new gv(0,0,100,100);var w=new gv(-d.x,-d.y,this.d,this.v),Z=new Uint8Array(fx.rM("PSD").eJ(this,0,0,[!0,!1]));
this.xc(I);this.C=x;var P=new fj(this.t[top].getName());fx.rM("PSD").bx(Z.buffer,P);delete P.add.artd;
P.fT=[[],[]];P.l_=[];P.xc(P.t);fj.a4I(P);c.jz.Ut(P,d);P.D();P.nu();P.dH();return[P,d,r,top]};fj.prototype.uJ=function(n,F,O){var I=this.Ak(n),x=I[0],r=I[1],_=I[2],top=I[3],d;
if(O=="jpg")d=new Uint8Array(fx.rM("JPG").eJ([[x.dH().buffer]],x.d,x.v,[80]));else d=new Uint8Array(fx.rM("PSD").eJ(x,null,null,[!0,!1]));
if(F)_=this.t.slice(0);var w=this._C(d,x.name,r.x,r.y);if(top==this.t.length-1)_.push(w);else _.splice(F?top+1:top-n.length+1,0,w);
this.xc(_);this.C=[_.indexOf(w)]};fj.Mj=function(){var n="";for(var e=0;e<8;e++)n+=Math.floor(Math.random()*16).toString(16);
return n};fj.prototype.CI=function(n){if(n==null)return;if(this.add.Patt==null)this.add.Patt=[];var F=this.add.Patt;
for(var e=0;e<F.length;e++)if(F[e].id==n.id)return;F.push(n)};fj.prototype._C=function(n,F,O,I,x){if(this.add.lnk2==null)this.add.lnk2=[];
var r=null,C=!1;for(var e=0;e<this.add.lnk2.length;e++)if(q.Qq(n,this.add.lnk2[e].raw)){r=this.add.lnk2[e].D5;
break}if(r==null){var _=fx.TG(n.buffer);r=fj.Mj()+"-d71c-11e5-b1ae-a548a96e5f9f";var d=new K.$x;d.D5=r;
d.Z7=_=="psd"?"8BIM":"    ";d.fA=F+"."+_;d.he=_=="psd"?"8BPB":"    ";d.open=0;d.raw=n;d.type="liFD";
d.ev=2;this.add.lnk2.push(d)}var w=this.lk(r),Z=fj.Mj()+"-d71c-11e5-b1ae-a548a96e5f9f",P=this.Kv();P.V9(F);
if(w!=null){var W=P.rect=w.yO[1].clone();P.rect.offset(O,I);var v=Math.max(W.d/this.d,W.v/this.v),C=x&&v>1.0001;
if(C){W.d=Math.round(W.d/v);W.v=Math.round(W.v/v);W.x=Math.round((this.d-W.d)/2);W.y=Math.round((this.v-W.v)/2)}else if(x&&fx.TG(n.buffer)=="pdf"&&this.gC!=144){var v=144/this.gC;
W.d=Math.round(W.d/v);W.v=Math.round(W.v/v);C=!0}P.buffer=q.f(P.rect.X()*4);if(!C)q.Ct(w.yO[0],P.buffer)}P.add.SoLd={classID:"null",Idnt:{t:"TEXT",v:r},Impr:{t:"Objc",v:{__name:"None",classID:"none"}},placed:{t:"TEXT",v:Z},PgNm:{t:"long",v:1},totalPages:{t:"long",v:1},frameStep:{t:"Objc",v:{classID:"null",numerator:{t:"long",v:0},denominator:{t:"long",v:600}}},duration:{t:"Objc",v:{classID:"null",numerator:{t:"long",v:0},denominator:{t:"long",v:600}}},frameCount:{t:"long",v:1},Annt:{t:"long",v:16},Type:{t:"long",v:2},Trnf:null,nonAffineTransform:null,warp:{t:"Objc",v:q.qF.f(P.rect)},Sz:{t:"Objc",v:{classID:"Pnt",Wdth:{t:"doub",v:P.rect.d},Hght:{t:"doub",v:P.rect.v}}},Rslt:{t:"UntF",v:{type:"#Rsl",val:72}}};
var L=q.z.om(P.rect).H;P.add.SoLd.Trnf=c.V.uB(L);P.add.SoLd.nonAffineTransform=c.V.uB(L);if(C)P.aY(this,!1);
return P};fj.prototype.dH=function(n){if(n!=null){this.D();this.nu(n);var F=this.buffer;if(l.Z0)this.QF.get(F);
else F=F.slice(0);this.D();this.nu();return F}if(this.L4){this.nu();this.L4=null}if(l.Z0&&this.eg){this.QF.get(this.buffer);
this.eg=null;this.T3=!0}return this.buffer};fj.prototype.qY=function(){for(var e=0;e<this.t.length;e++)this.t[e].HP();
this.D()};fj.prototype.j7=function(){for(var e=0;e<this.t.length;e++)if(this.t[e].add.lmfx)this.t[e].KJ.hv=!0};
fj.prototype.Xf=function(){var n=this.IP.r1044;if(n==null){n=this.IP.r1044=new Uint8Array(4);var F=0;
for(var e=0;e<this.t.length;e++)F=Math.max(F,this.t[e].add.lyid);Y.Qm(n,0,F)}var O=Y.c(n,0);Y.Qm(n,0,O+1);
return O+1};fj.prototype.f7=function(n,F,O){if(n==null)n=!0;var I=this;if(I.P4.length!=0)return!0;if(I.C.length!=1){if(n)alert(I.C.length==0?"Select a layer first.":"More than one layer selected.");
return!1}return this.w1(n,F,O)};fj.prototype.w1=function(n,F,O){if(n==null)n=!0;if(F==null)F=!1;var I=this;
if(I.P4.length!=0)return!0;for(var e=0;e<I.C.length;e++){var x=I.t[I.C[e]],r=F||x.vE<=0;if(x.add.lsct!=null&&x.add.lsct!=ho.uE&&x.vE!=1){if(n)alert(hl.get([15,7,2]));
return!1}if(r&&!x.R9()){if(n)alert(hl.get([15,7,2]));return!1}if(r&&x.add.TySh){return this.LK(n,[15,7,3],O)}if(r&&x.add.SoLd){return this.LK(n,[15,7,4],O)}if(x.LF(1)||x.LF(31)){if(n)alert(hl.get([6,57,0]));
return!1}}return!0};fj.prototype.LK=function(n,F,O){if(n&&typeof n=="object"){var I=window.confirm(hl.get(F)+". "+hl.get([6,8])+"?");
if(I){var x=new k(V.E.JA,!0);x.data={oI:"rasterizeLayer",Mk:{classID:"rasterizeLayer",null:aV.hd("Lyr",!0)}};
n.A(x)}return O?I:!1}if(n)alert(hl.get(F));return!1};fj.prototype.sz=function(n){var F=this.root.Dv(n);
if(F.parent)return F.$.Y9()&&this.sz(F.parent.index);else return F.$.Y9()};fj.prototype.A8=function(n){var F=this.root.Dv(n);
if(F==null)return null;var O=F.$;if(O.add.artb)return O.Fn();if(F.parent)return this.A8(F.parent.index);
return null};fj.prototype.YD=function(){var n=this.t[this.C[0]];if(n.vE<=0&&!n.rect.G3(this.N.rect)){alert("Selected area is empty.");
return!1}if(this.C.length==1&&this.N){var F=q.f(this.N.channel.length);q.xv(n.buffer,n.rect,F,this.N.rect);
q.yr(this.N.channel,F);if(q.gZ(F,0)){alert("Selected area is empty.");return!1}}return!0};fj.prototype.ai=function(){if(this.IP["r"+1037]==null)this.aU(30);
return Y.Z3(this.IP["r"+1037],0)};fj.prototype.aU=function(n){if(this.IP["r"+1037]==null)this.IP["r"+1037]=new Uint8Array(4);
if(Y.Z3(this.IP["r"+1037],0)==n)return;Y.Bl(this.IP["r"+1037],0,n);this.j7()};fj.prototype.BG=function(){if(this.IP["r"+1049]==null)this.qh(30);
return Y.Z3(this.IP["r"+1049],0)};fj.prototype.qh=function(n){if(this.IP["r"+1049]==null)this.IP["r"+1049]=new Uint8Array(4);
if(Y.Z3(this.IP["r"+1049],0)==n)return;Y.Bl(this.IP["r"+1049],0,n);this.j7()};fj.prototype.V7=function(n){if(this.add.lnk2==null)return null;
for(var e=0;e<this.add.lnk2.length;e++)if(this.add.lnk2[e].D5==n)return this.add.lnk2[e];return null};
fj.prototype.afH=function(n){var F=this.V7(n);if(F==null)return!1;var O=fx.TG(F.raw.buffer);if(O==null)return!1;
if(fx.rM(O)!=null||O=="psd")return!0;return!1};fj.prototype.lk=function(n,F,O,I){var x=this.V7(n);if(x==null)return null;
x.dH(F,O,I);if(x.yO)return x};fj.prototype.$q=function(){var n=this.d,F=this.v;if(l.Z0&&this.QF==null)this.QF=new l.zF(n,F,!0);
if(this.buffer==null||this.buffer.length!=n*F*4||l.Z0&&(this.QF.d!=n||this.QF.v!=F)){this.buffer=q.f(n*F*4);
if(this.QF)this.QF.delete();if(l.Z0)this.QF=new l.zF(n,F,!0)}};fj.prototype.aed=function(){this.$q();
if(l.Z0){this.QF.set(this.buffer)}};fj.prototype.nu=function(n){var F=this.d,O=this.v,I=new gv(0,0,F,O),x=I.lN(this.L4);
this.$q();if(x.D2())return;if(!x.Qq(I)){if(!l.Z0){var r=q.CZ(x.X()*4);q.nF(r,x,this.buffer,I)}if(l.Z0){l.wu(this.QF,x);
l.rF(0)}}else{if(l.Z0){this.QF.set(null)}else{this.buffer.fill(0)}}var _=Date.now(),d=l.Z0?this.QF:this.buffer;
if(n==null)n=1e9;this.root.GH(d,I,x,this,[],n);this.eg=this.L4.clone()};fj.prototype.Kv=function(n){var F=new K;
F.rect=new gv(0,0,0,0);F.buffer=q.f(1);F.add.luni=new aE(0,0);if(n!=!0)F.add.lyid=this.Xf();F.add.lsct=ho.uE;
F.add.lclr=0;F.add.fxrp=new aE(0,0);return F};fj.prototype.VF=function(n){var F=this.Kv(n);F.V9("</Layer group>");
F.add.lsct=ho.bu;F.Cq=24;return F};fj.prototype.qr=function(){return this.ok!=this.qs};fj.prototype.p$=function(n){while(this.history.length>this.ok+1)this.history.pop();
if(this.qs>this.ok)this.qs=-1;if(n.T.id!=c.rY){this.Po=!0;if(this.M$.lastAppliedComp){delete this.M$.lastAppliedComp;
this.T3=!0}}this.history.push(n);this.ok++;this.T3=!0;var F=dW.$m()?60:30,O=0;for(var e=this.history.length-1;
e>=0;e--){var I=this.history[e];if(I.N$)continue;O++;if(O==F){this.ok-=e;this.history=this.history.slice(e);
break}}};fj.prototype.mG=function(){if(this.ok!=this.history.length-1)return null;return this.history[this.history.length-1]};
fj.prototype.aV=function(n,F,O,I){if(n==null)n=!1;var x=F!=null?[F]:this.C.slice(0);if(I){var r=[];for(var e=0;
e<x.length;e++){var _=this.t[x[e]].Z8;if(_!=0&&r.indexOf(_)==-1)r.push(_)}for(var e=0;e<this.t.length;
e++){var _=this.t[e].Z8;if(_!=0&&r.indexOf(_)!=-1&&x.indexOf(e)==-1)x.push(e)}}var d=[];for(var e=0;
e<x.length;e++){var w=this.pO(x[e],n);for(var Z=0;Z<w.length;Z++)if(d.indexOf(w[Z])==-1)d.push(w[Z]);
if(O){var E=this.root.Dv(x[e]);while(E.parent!=null&&E.parent.parent!=null){E=E.parent;if(d.indexOf(E.index)==-1){d.push(E.index,E._j)}}}}return d};
fj.prototype.QH=function(n,F,O){var I=this,x=I.aV(!1,n,null,O);x.sort(function(Q,J){return Q-J});var r={};
for(var _=0;_<I.t.length;_++){var d=I.t[_].getName();r[d]=!0}var w=[];for(var e=0;e<x.length;e++){var Z=I.t[x[e]].clone(),H,y;
Z.add.lyid=I.Xf();Z.add.lspf=0;if(Z.z3()){var P=Z.Fa(I),C=fj.je(P);I.ti(C);Z.add.SoLd.placed.v=C.id}Z.o3(I);
var W=Z.getName(),v=W.length;while(48<=W.charCodeAt(v-1)&&W.charCodeAt(v-1)<=57)v--;var L=parseInt(W.slice(v));
if(isNaN(L)){if(W.endsWith(" copy")){L=1;H=W.slice(0,W.length-5)}else{L=0;H=W}}else if(W.slice(0,v).endsWith(" copy ")){L=L;
H=W.slice(0,v-6)}else{L=0;H=W}L++;while(!0){y=H+" copy"+(L==1?"":" "+L);if(r[y]==null)break;L++}var g=x.indexOf(this.root.Dv(x[e]).parent.index)!=-1;
if(F!=!0&&!g)Z.V9(y);r[y]=!0;w.push(Z)}return w};fj.je=function(n){return{id:fj.Mj()+n.id.slice(8),buffer:n.buffer.slice(0),rect:n.rect.clone(),r:n.r?n.r.clone():null}};
fj.Mq=function(n){return{id:n,rect:new gv,buffer:q.f(1),r:new K.FZ}};fj.kh=function(n,F){if(F==null)F={vmsk:new K.X9};
if(F.vogk==null){F.vogk=[];var O=q.Y._v(F.vmsk.b);for(var I=0;I<O;I++)F.vogk.push(q.oK.CZ())}return{name:n,FI:0,add:F}};
fj.prototype.Y1=function(n){var F=[],O=[],I=this,r=0;for(var e=1;e<I.Hi.length;e++){var x=I.Hi[e];x.FI=-1-e;
F.push(x);if(I.f$.indexOf(e)!=-1)O.push(F.length-1)}if(I.Hi[0].add.vmsk.b.length>2){var x=I.Hi[0];x.FI=-1;
F.push(x);if(I.f$.indexOf(0)!=-1)O.push(F.length-1)}var _=I.a5==null;if(_)I.a5=[];for(var e=I.C.length-1;
e>=0;e--){var d=I.t[I.C[e]],w=d.add.TySh;if(d.add.vmsk!=null&&(d.qI||d.zX())){var x=fj.kh("\""+d.getName()+"\" Shape Path",d.add);
x.FI=I.C[e];F.push(x);if(_)I.a5.push(r);if(I.a5.indexOf(r)!=-1)O.push(F.length-1);r++}if(n!=!0&&w&&w.add&&q.qF.x9(w.Gp)){var x=fj.kh("\""+d.getName().slice(0,10)+"..\" Text Path",w.add);
x.FI=1e6+I.C[e];F.push(x);O.push(F.length-1);r++}}if(O.length==0&&n){I.Hi[0].FI=-1;I.f$=[0];O.push(F.length);
F.push(I.Hi[0])}return[F,O]};fj.prototype.pO=function(e,n){var F=[],E=this.root.Dv(e);if(E)E.$Z(F,n);
return F};fj.prototype.tQ=function(){this.root.JC(this,new gv(0,0,this.d,this.v),32)};fj.prototype.xc=function(n){for(var e=0;
e<this.t.length;e++){var F=this.t[e];if(n.indexOf(F)==-1){F.KJ.aip();F.D()}}this.t=n.slice(0);this.lq()};
fj.prototype.lq=function(){var n=this.t,F=n.length;this.root=new hw;var O=this.Kv(!0);O.mf="pass";O.add.lsct=ho.x7;
var I=this.VF(!0),x=[I];for(var e=0;e<F;e++)x.push(n[e]);x.push(O);this.root.sr(x,0,0);if(this.C.length==0)this.C=[F-1]};
fj.prototype.Mu=function(){if(this.C.length!=1)return;var n=this.root.Dv(this.C[0]);while(n.parent!=null){var F=n.parent.$;
F.add.lsct=ho.x7;n=n.parent}this.zB=this.aa7=!0};fj.prototype.aci=function(){this.lq();var n=[this.root],cP=0;
while(n.length!=0){var top=n.pop();cP++;if(top.$.add.lsct==ho.x7)for(var e=0;e<top.children.length;e++)n.push(top.children[e])}if(cP>1e3){var F=this.root.children;
for(var e=0;e<F.length;e++)if(F[e].$.add.lsct==ho.x7)F[e].$.add.lsct=ho.OC}};fj.aS=function(n,F,O,I,x){var r={__name:"Make",classID:"Mk",Nw:{t:"Objc",v:{classID:"Dcmn",Nm:{t:"TEXT",v:I},Md:{t:"type",v:{classID:"RGBM"}},Wdth:{t:"UntF",v:{type:"#Rlt",val:n}},Hght:{t:"UntF",v:{type:"#Rlt",val:F}},Rslt:{t:"UntF",v:{type:"#Rsl",val:O}},pixelScaleFactor:{t:"doub",v:1},Fl:{t:"enum",v:{Fl:x}},Dpth:{t:"long",v:8},profile:{t:"TEXT",v:"sRGB IEC61966-2.1"}}}};
return{oI:"make",Mk:r}};fj.ah9=function(n,F){var O=0,I=0,x=72,r=F.agx,_=n.preset&&n.preset.v=="Clipboard";
if(_){O=r.d;I=r.v}else{O=n.Wdth.v.val;I=n.Hght.v.val;x=n.Rslt.v.val}var d=new fj((n.Nm?n.Nm.v:hl.get([11,7]))+".psd");
d.d=O;d.v=I;d.gC=x;var w=d.Kv();w.V9("Background");d.xc([w]);w.add.lspf=1<<2;var Z=n.Fl?n.Fl.v.Fl:"Wht";
if(Z!="Trns"){var P=F.sI;P=(P&255)<<16|(P>>>8&255)<<8|P>>>16;w.rect=new gv(0,0,O,I);w.buffer=q.f(O*I*4);
q.IW(w.buffer,{Wht:4294967295,BckC:255<<24|P}[Z])}d.buffer=q.f(O*I*4);return d};function h0(n){this.KH=n;
this.K=0;this.hp=1;this.n=new aE(0,0);this.YR=new aE(0,0);this.VH=0;this.o=[1,1,1];this.Nv=new gv(0,0,1,1);
this.am$=new gv(0,0,n.d,n.v);this.LL=null;this.xj=null;this.Ih=new Uint32Array(0);this.$R=null;this.bs=null;
this.LN=q.f(0);this.Cr=null;this.Iz=null}h0.prototype.eY=function(n){var F=new cD,O=this.Nv,I=this.KH,x=n?this.hp:this.K,r=n?this.YR:this.n,_=Math.round((O.d-I.d*x)/2+r.x),d=Math.round((O.v-I.v*x)/2+r.y);
F.translate(-_,-d);F.scale(1/x,1/x);var w=I.d/2,Z=I.v/2;F.translate(-w,-Z);F.rotate(this.VH);F.translate(w,Z);
return F};h0.prototype.cL=function(n){var F=this.Nv,O=this.KH,I=Math.atan2(-n.O,n.R),x=O.d/2,r=O.v/2;
n.translate(-x,-r);n.rotate(-I);n.translate(x,r);var _=1/n.GW();n.scale(_,_);var d=-n.hb,w=-n.i9,Z=Math.round(d-(F.d-O.d*_)/2),P=Math.round(w-(F.v-O.v*_)/2);
if(Math.abs(_-Math.round(_))<1e-6)_=Math.round(_);this.VH=I;this.K=_;this.n=new aE(Z,P)};h0.prototype.jR=function(n,F){var O=this.eY();
return O.Pz(new aE(n,F))};h0.prototype.Hl=function(n,F){var O=this.eY();O.uZ();return O.Pz(new aE(n,F))};
function bW(){}bW.order="ebbl FrFX IrSh IrGl ChFX SoFi GrFl patternFill OrGl DrSh".split(" ");bW.jV="ebblMulti frameFXMulti innerShadowMulti IrGlMulti ChFXMulti solidFillMulti gradientFillMulti patternFillMulti OrGlMulti dropShadowMulti".split(" ");
bW.names=[[14,4],[14,9],[14,1],[14,3],[14,8],[14,5],[14,6],[14,7],[14,2],[14,0]];bW.Ig=["DrSh","IrSh","SoFi","GrFl","FrFX"];
bW.ez=["Clr"];bW.KK="Grad Rvrs Type Algn Angl Dthr Scl Ofst".split(" ");bW.dC=["Ptrn","Scl","Algn","phase"];
bW.Pg={g$:"{\"t\":\"Objc\",\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}}}",mC:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Grdn\",\"Nm\":{\"v\":\"Two Color\",\"t\":\"TEXT\"},\"GrdF\":{\"v\":{\"GrdF\":\"CstS\"},\"t\":\"enum\"},\"Intr\":{\"v\":4096,\"t\":\"doub\"},\"Clrs\":{\"v\":[{\"v\":{\"classID\":\"Clrt\",\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":0,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},\"Type\":{\"v\":{\"Clry\":\"UsrS\"},\"t\":\"enum\"},\"Lctn\":{\"v\":0,\"t\":\"long\"},\"Mdpn\":{\"v\":50,\"t\":\"long\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"Clrt\",\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":255,\"t\":\"doub\"},\"Bl\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"},\"Type\":{\"v\":{\"Clry\":\"UsrS\"},\"t\":\"enum\"},\"Lctn\":{\"v\":4096,\"t\":\"long\"},\"Mdpn\":{\"v\":50,\"t\":\"long\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"},\"Trns\":{\"v\":[{\"v\":{\"classID\":\"TrnS\",\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Lctn\":{\"v\":0,\"t\":\"long\"},\"Mdpn\":{\"v\":50,\"t\":\"long\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"TrnS\",\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Lctn\":{\"v\":4096,\"t\":\"long\"},\"Mdpn\":{\"v\":50,\"t\":\"long\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}}}",v5:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Grdn\",\"Nm\":{\"v\":\"Foreground to Background\",\"t\":\"TEXT\"},\"GrdF\":{\"t\":\"enum\",\"v\":{\"GrdF\":\"CstS\"}},\"Intr\":{\"t\":\"doub\",\"v\":4096},\"Clrs\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"Objc\",\"v\":{\"classID\":\"Clrt\",\"Type\":{\"t\":\"enum\",\"v\":{\"Clry\":\"FrgC\"}},\"Lctn\":{\"t\":\"long\",\"v\":0},\"Mdpn\":{\"t\":\"long\",\"v\":50}}},{\"t\":\"Objc\",\"v\":{\"classID\":\"Clrt\",\"Type\":{\"t\":\"enum\",\"v\":{\"Clry\":\"BckC\"}},\"Lctn\":{\"t\":\"long\",\"v\":4096},\"Mdpn\":{\"t\":\"long\",\"v\":50}}}]},\"Trns\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"Objc\",\"v\":{\"classID\":\"TrnS\",\"Opct\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"Lctn\":{\"t\":\"long\",\"v\":0},\"Mdpn\":{\"t\":\"long\",\"v\":50}}},{\"t\":\"Objc\",\"v\":{\"classID\":\"TrnS\",\"Opct\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"Lctn\":{\"t\":\"long\",\"v\":4096},\"Mdpn\":{\"t\":\"long\",\"v\":50}}}]}}}",fm:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Ptrn\",\"Nm\":{\"v\":\"orangeslices\",\"t\":\"TEXT\"},\"Idnt\":{\"v\":\"c7acb22a-47a6-11de-919a-bf574370eaaf\",\"t\":\"TEXT\"}}}"};
bW.Pg.g$="\"Clr\": "+bW.Pg.g$;bW.Pg.W="\"Grad\":"+bW.Pg.mC+",\"Rvrs\":{\"v\":false,\"t\":\"bool\"},\"Type\":{\"v\":{\"GrdT\":\"Lnr\"},\"t\":\"enum\"},\"Algn\":{\"v\":true,\"t\":\"bool\"},\"Angl\":{\"v\":{\"type\":\"#Ang\",\"val\":90},\"t\":\"UntF\"},\"Scl\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Ofst\":{\"v\":{\"classID\":\"Pnt\",\"Hrzn\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"Vrtc\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"}},\"t\":\"Objc\"},\"Dthr\":{\"v\":false,\"t\":\"bool\"}";
bW.Pg.fm="\"Ptrn\":"+bW.Pg.fm+",\"Scl\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Algn\":{\"v\":true,\"t\":\"bool\"},\"phase\":{\"v\":{\"classID\":\"Pnt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"}";
bW.default="{ \"classID\": \"null\", \"Scl\": {\"t\": \"UntF\", \"v\": { \"type\": \"#Prc\",\"val\": 100} }, \"masterFXSwitch\": {\"t\": \"bool\",\"v\": true} }";
bW.E5=["{\"classID\":\"ebbl\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"hglM\":{\"t\":\"enum\",\"v\":{\"BlnM\":\"Scrn\"}},\"hglC\":{\"t\":\"Objc\",\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"t\":\"doub\",\"v\":255},\"Grn\":{\"t\":\"doub\",\"v\":255},\"Bl\":{\"t\":\"doub\",\"v\":255}}},\"hglO\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":75}},\"sdwM\":{\"t\":\"enum\",\"v\":{\"BlnM\":\"Mltp\"}},\"sdwC\":{\"t\":\"Objc\",\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"t\":\"doub\",\"v\":0},\"Grn\":{\"t\":\"doub\",\"v\":0},\"Bl\":{\"t\":\"doub\",\"v\":0}}},\"sdwO\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":75}},\"bvlT\":{\"t\":\"enum\",\"v\":{\"bvlT\":\"SfBL\"}},\"bvlS\":{\"t\":\"enum\",\"v\":{\"BESl\":\"InrB\"}},\"uglg\":{\"t\":\"bool\",\"v\":true},\"lagl\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Ang\",\"val\":120}},\"Lald\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Ang\",\"val\":30}},\"srgR\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"blur\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Pxl\",\"val\":5}},\"bvlD\":{\"t\":\"enum\",\"v\":{\"BESs\":\"In\"}},\"TrnS\":{\"t\":\"Objc\",\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"Linear\"},\"Crv\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"Objc\",\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"t\":\"doub\",\"v\":0},\"Vrtc\":{\"t\":\"doub\",\"v\":0}}},{\"t\":\"Objc\",\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"t\":\"doub\",\"v\":255},\"Vrtc\":{\"t\":\"doub\",\"v\":255}}}]}}},\"antialiasGloss\":{\"t\":\"bool\",\"v\":false},\"Sftn\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Pxl\",\"val\":0}},\"useShape\":{\"t\":\"bool\",\"v\":false},\"MpgS\":{\"t\":\"Objc\",\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"Linear\"},\"Crv\":{\"t\":\"VlLs\",\"v\":[{\"t\":\"Objc\",\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"t\":\"doub\",\"v\":0},\"Vrtc\":{\"t\":\"doub\",\"v\":0}}},{\"t\":\"Objc\",\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"t\":\"doub\",\"v\":255},\"Vrtc\":{\"t\":\"doub\",\"v\":255}}}]}}},\"AntA\":{\"t\":\"bool\",\"v\":false},\"Inpr\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":28}},\"useTexture\":{\"t\":\"bool\",\"v\":false},\"InvT\":{\"t\":\"bool\",\"v\":false},\"Algn\":{\"t\":\"bool\",\"v\":true},\"Scl\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"textureDepth\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":100}},\"Ptrn\":{\"t\":\"Objc\",\"v\":{\"classID\":\"Ptrn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"orangeslices\"},\"Idnt\":{\"t\":\"TEXT\",\"v\":\"c7acb22a-47a6-11de-919a-bf574370eaaf\"}}},\"phase\":{\"t\":\"Objc\",\"v\":{\"classID\":\"Pnt\",\"Hrzn\":{\"t\":\"doub\",\"v\":0},\"Vrtc\":{\"t\":\"doub\",\"v\":0}}}}","{\"classID\":\"FrFX\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},\"Styl\":{\"v\":{\"FStl\":\"OutF\"},\"t\":\"enum\"},\"PntT\":{\"v\":{\"FrFl\":\"SClr\"},\"t\":\"enum\"},\"Sz\":{\"v\":{\"type\":\"#Pxl\",\"val\":3},\"t\":\"UntF\"},"+bW.Pg.g$+","+bW.Pg.W+","+bW.Pg.fm+"}","{\"classID\":\"IrSh\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Mltp\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 75},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":0,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},\"uglg\":{\"v\":true,\"t\":\"bool\"},\"lagl\":{\"v\":{\"type\":\"#Ang\",\"val\":120},\"t\":\"UntF\"},\"Dstn\":{\"v\":{\"type\":\"#Pxl\",\"val\":5},\"t\":\"UntF\"},\"Ckmt\":{\"v\":{\"type\":\"#Pxl\",\"val\":0},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":5},\"t\":\"UntF\"},\"Nose\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"TrnS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Linear\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"}}","{\"classID\":\"IrGl\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Scrn\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 75},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":255,\"t\":\"doub\"},\"Bl\":{\"v\":189.99710083007812,\"t\":\"doub\"}},\"t\":\"Objc\"},\"GlwT\":{\"v\":{\"BETE\":\"SfBL\"},\"t\":\"enum\"},\"Ckmt\":{\"v\":{\"type\":\"#Pxl\",\"val\":0},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":5},\"t\":\"UntF\"},\"ShdN\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"Nose\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"glwS\":{\"v\":{\"IGSr\":\"SrcE\"},\"t\":\"enum\"},\"TrnS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Linear\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"},\"Inpr\":{\"v\":{\"type\":\"#Prc\",\"val\":50},\"t\":\"UntF\"}}","{\"classID\":\"ChFX\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Mltp\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 50},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":0,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"Invr\":{\"v\":true,\"t\":\"bool\"},\"lagl\":{\"v\":{\"type\":\"#Ang\",\"val\":19},\"t\":\"UntF\"},\"Dstn\":{\"v\":{\"type\":\"#Pxl\",\"val\":11},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":14},\"t\":\"UntF\"},\"MpgS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Gaussian\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":32,\"t\":\"doub\"},\"Vrtc\":{\"v\":7,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":64,\"t\":\"doub\"},\"Vrtc\":{\"v\":38,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":96,\"t\":\"doub\"},\"Vrtc\":{\"v\":101,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":128,\"t\":\"doub\"},\"Vrtc\":{\"v\":166,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":159,\"t\":\"doub\"},\"Vrtc\":{\"v\":209,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":191,\"t\":\"doub\"},\"Vrtc\":{\"v\":235,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":223,\"t\":\"doub\"},\"Vrtc\":{\"v\":248,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"}}","{\"classID\":\"SoFi\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+bW.Pg.g$+"}","{\"classID\":\"GrFl\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+bW.Pg.W+"}","{\"classID\":\"patternFill\",\"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+bW.Pg.fm+"}","{\"classID\":\"OrGl\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Scrn\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 75},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":255,\"t\":\"doub\"},\"Bl\":{\"v\":189.99710083007812,\"t\":\"doub\"}},\"t\":\"Objc\"},\"GlwT\":{\"v\":{\"BETE\":\"SfBL\"},\"t\":\"enum\"},\"Ckmt\":{\"v\":{\"type\":\"#Pxl\",\"val\":0},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":5},\"t\":\"UntF\"},\"Nose\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"ShdN\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"TrnS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Linear\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"},\"Inpr\":{\"v\":{\"type\":\"#Prc\",\"val\":50},\"t\":\"UntF\"}}","{\"classID\":\"DrSh\",       \"enab\":{\"v\":true,\"t\":\"bool\"},  \"Md\":{\"v\":{\"BlnM\":\"Mltp\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\": 57},\"t\":\"UntF\"},\"Clr\":{\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":0,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},\"uglg\":{\"v\":true,\"t\":\"bool\"},\"lagl\":{\"v\":{\"type\":\"#Ang\",\"val\":120},\"t\":\"UntF\"},\"Dstn\":{\"v\":{\"type\":\"#Pxl\",\"val\":27},\"t\":\"UntF\"},\"Ckmt\":{\"v\":{\"type\":\"#Pxl\",\"val\":0},\"t\":\"UntF\"},\"blur\":{\"v\":{\"type\":\"#Pxl\",\"val\":13},\"t\":\"UntF\"},\"Nose\":{\"v\":{\"type\":\"#Prc\",\"val\":0},\"t\":\"UntF\"},\"AntA\":{\"v\":false,\"t\":\"bool\"},\"TrnS\":{\"v\":{\"classID\":\"ShpC\",\"Nm\":{\"v\":\"Line\xE1rn\xED\",\"t\":\"TEXT\"},\"Crv\":{\"v\":[{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":0,\"t\":\"doub\"},\"Vrtc\":{\"v\":0,\"t\":\"doub\"}},\"t\":\"Objc\"},{\"v\":{\"classID\":\"CrPt\",\"Hrzn\":{\"v\":255,\"t\":\"doub\"},\"Vrtc\":{\"v\":255,\"t\":\"doub\"}},\"t\":\"Objc\"}],\"t\":\"VlLs\"}},\"t\":\"Objc\"},\"layerConceals\":{\"v\":true,\"t\":\"bool\"}}"];
bW.W={types:"Lnr Rdl Angl Rflc Dmnd shapeburst".split(" "),names:[[19,0,0],[19,0,1],[19,0,2],[19,0,3],[19,0,4],[19,0,5]]};
bW.stroke={types:["InsF","CtrF","OutF"],names:[[19,5,2],[19,5,1],[19,5,0]],Ne:["SClr","GrFl","Ptrn"],aeq:[[13,0],[12,37],[12,62]]};
bW.aQ={types:["SfBL","PrBL"],names:[[19,1,0],[19,1,1]],aK:["SrcC","SrcE"],a7Y:[[19,5,1],[12,69]]};bW.FN={types:["OtrB","InrB","Embs","PlEb","strokeEmboss"],style:[[19,2,0],[19,2,1],[19,2,2],[19,2,3],[19,2,4]],k4:["SfBL","PrBL","Slmt"],adM:[[19,3,0],[19,3,1],[19,3,2]],dir:[[19,4,0],[19,4,1]]};
bW.uS={wq:["strokeStyleButtCap","strokeStyleRoundCap","strokeStyleSquareCap"],RD:["strokeStyleAlignInside","strokeStyleAlignCenter","strokeStyleAlignOutside"],join:["strokeStyleMiterJoin","strokeStyleRoundJoin","strokeStyleBevelJoin"],Ul:["solidColorLayer","gradientLayer","patternLayer"],default:{classID:"strokeStyle",strokeStyleVersion:{t:"long",v:2},strokeEnabled:{t:"bool",v:!1},fillEnabled:{t:"bool",v:!0},strokeStyleLineWidth:{t:"UntF",v:{type:"#Pnt",val:4.38}},strokeStyleLineDashOffset:{t:"UntF",v:{type:"#Pnt",val:0}},strokeStyleMiterLimit:{t:"doub",v:100},strokeStyleLineCapType:{t:"enum",v:{strokeStyleLineCapType:"strokeStyleButtCap"}},strokeStyleLineJoinType:{t:"enum",v:{strokeStyleLineJoinType:"strokeStyleMiterJoin"}},strokeStyleLineAlignment:{t:"enum",v:{strokeStyleLineAlignment:"strokeStyleAlignCenter"}},strokeStyleScaleLock:{t:"bool",v:!1},strokeStyleStrokeAdjust:{t:"bool",v:!1},strokeStyleLineDashSet:{t:"VlLs",v:[]},strokeStyleBlendMode:{t:"enum",v:{BlnM:"Nrml"}},strokeStyleOpacity:{t:"UntF",v:{type:"#Prc",val:100}},strokeStyleContent:{t:"Objc",v:JSON.parse("{\"classID\":\"solidColorLayer\","+bW.Pg.g$+"}")},strokeStyleResolution:{t:"doub",v:72}}};
bW.BR=[{classID:"null",Clr:JSON.parse(bW.E5[5]).Clr},{classID:"null",Grad:JSON.parse(bW.E5[6]).Grad,Dthr:{t:"bool",v:!1},Rvrs:{t:"bool",v:!1},Angl:{t:"UntF",v:{type:"#Ang",val:60}},Type:{t:"enum",v:{GrdT:"Lnr"}},Algn:{t:"bool",v:!0},Scl:{t:"UntF",v:{type:"#Prc",val:100}},Ofst:{t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Prc",val:0}},Vrtc:{t:"UntF",v:{type:"#Prc",val:0}}}}},{classID:"null",Ptrn:JSON.parse(bW.E5[7]).Ptrn,Algn:{v:!0,t:"bool"},Scl:{v:{type:"#Prc",val:100},t:"UntF"},phase:{v:{classID:"Pnt",Hrzn:{v:0,t:"doub"},Vrtc:{v:0,t:"doub"}},t:"Objc"}}];
var ha={};ha.OA=function(n,F){function O(n,W){if(n==null)return null;var v=n[W].v,L;if(v.length!=0){L=v[0].v;
if(!L.enab.v)L=null}return L}var I=F.SoCo,x=F.GdFl,r=O(n,"solidFillMulti"),_=O(n,"gradientFillMulti");
if(r==null&&_==null)return[I,x];var d=ha.ajl;if(I&&r&&_==null){var w=JSON.parse(JSON.stringify(I));w.Clr.v=d(r.Clr.v,I.Clr.v,r);
return[w,null]}if(x&&r&&_==null){var Z=JSON.parse(JSON.stringify(x)),P=Z.Grad.v.Clrs.v;for(var e=0;e<P.length;
e++){var C=P[e].v.Clr;C.v=d(r.Clr.v,C.v,r)}return[null,Z]}if(I&&_){var Z=JSON.parse(JSON.stringify(_)),P=Z.Grad.v.Clrs.v;
for(var e=0;e<P.length;e++){var C=P[e].v.Clr;C.v=d(C.v,I.Clr.v,_)}return[null,Z]}return[r,_]};ha.afh={Ks:q.f(4),Rn:q.f(4),Q:new gv(0,0,1,1)};
ha.ajl=function(n,F,O){var I=fk.X4(O.Md.v.BlnM),x=O.Opct.v.val/100,r=ha.afh;n=q.W.S_(n);F=q.W.S_(F);
r.Ks[0]=n.Q;r.Ks[1]=n.l;r.Ks[2]=n.O;r.Ks[3]=255;r.Rn[0]=F.Q;r.Rn[1]=F.l;r.Rn[2]=F.O;r.Rn[3]=255;q.p.F_(I,r.Ks,r.Q,r.Rn,r.Q,r.Q,x);
return{classID:"RGBC",Rd:{t:"doub",v:r.Rn[0]},Grn:{t:"doub",v:r.Rn[1]},Bl:{t:"doub",v:r.Rn[2]}}};ha.bI=function(n,F,O){var I=n;
n=n.slice(0);var x=fk.Dy[fk.Cs.indexOf(F.Md.v.BlnM)],r=q.W.S_(F.Clr.v),_=4278190080|Math.round(r.O)<<16|Math.round(r.l)<<8|Math.round(r.Q),d=q.f(O.X()*4);
q.IW(d,_);q.p.F_(x,d,O,n,O,O,F.Opct.v.val/100);for(var e=0;e<n.length;e+=4)n[e+3]=I[e+3];return n};ha.QB=function(n,F){var O=["Sz","blur","Sftn","Dstn"];
for(var e=0;e<bW.order.length;e++){var I=bW.order[e],x=n[bW.jV[e]].v;for(var r=0;r<x.length;r++){var _=x[r].v;
for(var d=0;d<O.length;d++){var w=_[O[d]];if(w){var Z=w.v.val,P=Z;P=Math.max(Z==0?0:1,P*F);if(I=="ChFX")P=Math.min(P,250);
if(I=="ebbl"){if(O[d]=="blur")P=Math.min(P,250);if(O[d]=="Sftn")P=Math.min(P,16)}w.v.val=Math.round(P)}}if(I=="ebbl"||I=="patternFill"||I=="FrFX")if(_.Ptrn&&_.Scl)_.Scl.v.val=Math.max(1,Math.min(1e3,_.Scl.v.val*F))}}};
ha.a1u=function(n,F,O){var I=new gv(-.5,-.5,1,1),x=n.add.lmfx;for(var e=0;e<bW.order.length;e++){var r=bW.order[e],_=x[bW.jV[e]].v;
for(var d=0;d<_.length;d++){var w=_[d].v,W;if(!w.enab.v)continue;var Z=w.blur?w.blur.v.val+1:0,P=w.Ckmt?w.Ckmt.v.val/100:0,C=Math.round(Z*P);
if(r=="DrSh"||r=="IrSh"&&O){W=new gv(-.5,-.5,1,1);W.EM(Z,Z);ha.nI(W,w,F,0)}if(r=="OrGl"||r=="IrGl"&&O){W=new gv(-.5,-.5,1,1);
W.EM(Z,Z)}if(r=="FrFX"){var v=ha.Yj(w),L=v[1];if(O)L=Math.max(v[0],L);W=new gv(-.5,-.5,1,1);W.EM(Math.ceil(L),Math.ceil(L))}if(r=="ebbl"){var Z=w.blur.v.val,H=w.bvlS.v.BESl;
if(H=="Embs"||H=="PlEb")Z/=2;var y=["OtrB","InrB","Embs","PlEb","strokeEmboss"],g=["SfBL","PrBL","Slmt"],Q=["In","Out"],J=w.bvlT.v.bvlT!="SfBL"?Z:Z*.43,A=Math.round(Z);
W=new gv(-A-1,-A-1,2*A+2,2*A+2)}if(O&&r=="ChFX"){W=new gv(-.5,-.5,1,1);W.EM(Z,Z);var p=W.clone();ha.nI(W,w,F,0);
ha.nI(p,w,F,Math.PI);W=W.Tq(p)}if(W)I=I.Tq(W)}}if(I.x!=Math.ceil(I.x)){I.x=Math.ceil(I.x);I.d-=1}if(I.y!=Math.ceil(I.y)){I.y=Math.ceil(I.y);
I.v-=1}return I};ha.Yj=function(n){var F=0,O=0,I=n.Styl.v.FStl,x=n.Sz.v.val;if(I=="OutF")O=x;if(I=="InsF")F=x;
if(I=="CtrF")F=O=x/2;return[F,O]};ha.cg=function(n){if(n.all==null)return;for(var e=0;e<n.all.length;
e++){var F=n.all[e];if(F.oX)F.oX.delete();if(F.JK)F.JK.delete();if(F.Tz)F.Tz.delete()}};ha.aan=function(n,F,O,I,x,r,_){ha.cg(n);
var d=ha.gG(I,x,F,O,r,_);n.type=d.type,n.all=d.all;if(l.Z0)for(var e=0;e<n.all.length;e++){var w=n.all[e];
w.oX=new l.zF(w.jC.d,w.jC.v);w.oX.set(w.zc);delete w.zc;if(w.k0){w.JK=new l.fL(w.jC.d,w.jC.v);w.JK.set(w.k0);
delete w.k0}if(w.wd){w.Tz=new l.fL(w.jC.d,w.jC.v);w.Tz.set(w.wd);delete w.wd}}};ha.Uj=function(n){for(var e=0;
e<bW.order.length;e++){var F=bW.order[e],O=bW.jV[e],I=n[O].v;for(var x=0;x<I.length;x++){var r=I[x].v;
if(r.enab.v&&["patternFill","GrFl","SoFi"].indexOf(F)==-1)return!0}}return!1};ha.gG=function(n,F,O,I,x,r){if(r==null)r=I;
var _=0,d=0;for(var e=0;e<bW.order.length;e++){var w=bW.order[e],Z=bW.jV[e],P=n[Z].v;for(var C=0;C<P.length;
C++){var W=P[C].v;if(w=="DrSh"&&W.enab.v&&W.Ckmt.v.val>0&&W.blur.v.val>0)_=Math.max(_,Math.ceil(W.Ckmt.v.val*W.blur.v.val/100));
if(w=="OrGl"&&W.enab.v&&W.Ckmt.v.val>0&&W.blur.v.val>0&&W.GlwT.v.BETE=="SfBL")_=Math.max(_,Math.ceil(W.Ckmt.v.val*W.blur.v.val/100));
if(w=="OrGl"&&W.enab.v&&W.blur.v.val>0&&W.GlwT.v.BETE=="PrBL")_=Math.max(_,W.blur.v.val);if(w=="FrFX"&&W.enab.v&&W.Sz.v.val>0){if(W.Styl.v.FStl=="OutF")_=Math.max(_,W.Sz.v.val);
if(W.Styl.v.FStl=="CtrF")_=Math.max(_,Math.ceil(W.Sz.v.val/2));d=Math.max(d,ha.Yj(W)[1])}}}var v=new ha.yR(O,I,_,ha.Uj(n)),L=-I.x,H=-I.y,y={type:{},all:[]};
for(var g=0;g<bW.order.length;g++){var w=bW.order[g],Z=bW.jV[g];y.type[w]=[];for(var Q=n[Z].v.length-1;
Q>=0;Q--){var J=n[Z].v[Q].v;if(!J.enab.v)continue;var A=J.blur?J.blur.v.val:0,p=J.Ckmt?J.Ckmt.v.val/100:0,U=A*p;
if(w=="DrSh"){var j=v.Sh(U,A-U,!0),b=j.PB,s=j.j;s.offset(L,H);ha.WC(b,J,!1);ha.nI(s,J,x,0);var G=q.f(s.X()*4);
ha.kD(G,J.Clr.v);q.GF(b,G,3);var T={zc:G,jC:s,QP:fk.X4(J.Md.v.BlnM),Tb:J.Opct.v.val/100,anB:J.layerConceals.v};
y.type[w].push(T);y.all.push(T)}if(w=="IrSh"){var j=v.Sh(U,A-U,!1);ha.nI(j.j,J,x,0);var s=v.rect().clone(),b=q.f(s.X());
b.fill(255);q.k9(j.PB,j.j,b,s);ha.WC(b,J,!0);var G=q.f(s.X()*4);ha.kD(G,J.Clr.v);q.GF(b,G,3);s.offset(L,H);
var T={zc:G,jC:s,QP:fk.X4(J.Md.v.BlnM),Tb:J.Opct.v.val/100};y.type[w].push(T);y.all.push(T)}if(w=="GrFl"){var G=q.f(v.rect().X()*4);
ha.XV(J,G,v.rect(),x,null,r);var s=v.rect().clone();s.offset(L,H);var T={zc:G,jC:s,QP:fk.X4(J.Md.v.BlnM),Tb:J.Opct.v.val/100};
y.type[w].push(T);y.all.push(T)}if(w=="SoFi"){var G=q.f(v.PB().length*4);ha.kD(G,J.Clr.v);var s=v.rect().clone();
s.offset(L,H);var T={zc:G,jC:s,QP:fk.X4(J.Md.v.BlnM),Tb:J.Opct.v.val/100};y.type[w].push(T);y.all.push(T)}if(w=="ebbl"){var z=!1;
if(z)console.log(J);var m=Date.now(),$=J.bvlS.v.BESl;if($=="strokeEmboss"){var o=n.frameFXMulti.v;if(o.length==0)continue;
o=o[0].v;if(!o.enab.v)continue;var h=o.Styl.v.FStl;if(h=="OutF")$="OtrB";if(h=="CtrF")$="Embs";if(h=="InsF")$="InrB"}var A=J.blur.v.val;
if(A==0)A=.7;if($=="Embs"||$=="PlEb")A/=2;var X=["OtrB","InrB","Embs","PlEb","strokeEmboss"],D=["SfBL","PrBL","Slmt"],f=["In","Out"],R=J.bvlT.v.bvlT!="SfBL"?A:A*.45,i=Math.round(A),t=v.rect().clone(),N=t.clone();
N.EM(i,i);var M=N.d,hK=N.v,bD=M*hK,iM=q.f(bD);q.k9(v.PB(),t,iM,N);var hs=new Float64Array(bD),S=new Float64Array(bD);
q.style.sq(iM,hs,M,hK);q.uZ(iM);q.style.sq(iM,S,M,hK);if(z)console.log("distTransform computed",Date.now()-m);
for(var e=0;e<bD;e++)S[e]=S[e]-hs[e];for(var e=0;e<bD;e++){var a=S[e];if(a<-R)S[e]=-R;else if(a>R)S[e]=R}if(z)console.log("summing + cropping",Date.now()-m);
if(J.bvlT.v.bvlT=="SfBL"){var bV=Math.pow(A*.21,1.22);if(!0)bV=Math.max(bV,2);var a5=q.Mo.rb(bV,2);q.Mo.lC(S,hs,N,a5[0]>>>1);
q.Mo.lC(hs,S,N,a5[1]>>>1)}if(z)console.log("blurring",Date.now()-m);var i9=S,dG=i9.slice(0);if(J.useShape.v){var ap=Math.min(100,J.Inpr.v.val+1)/100;
if($!="OtrB"&&$!="InrB")ap=1;var bk=q.pH.Sz(J.MpgS.v.Crv.v,2e3),c2=Math.round(2e3/ap);bk=q.pH.a3j(bk,c2,$=="InrB");
var gg=.5/R;for(var e=0;e<bD;e++){var bH=i9[e],gw=.99999*(bH+R)*gg;i9[e]=-R+2*R*bk[~~(gw*(c2-1))]}if(z)console.log("applying shape",Date.now()-m)}if(J.useTexture.v){var gP=q.f(M*hK*4);
ha.qO(J,gP,N,x,F);var dT=q.f(M*hK);q.L2(gP,dT);var fU=q.f(M*hK);q.Mo.CH(dT,fU,N,1);dT=fU;var dV=A*J.textureDepth.v.val*(1/100)*(1/255);
if(J.InvT.v)dV=-dV;for(var e=0;e<bD;e++)i9[e]+=-dV*dT[e];if(z)console.log("applying texture",Date.now()-m)}var ac=(J.bvlT.v.bvlT=="SfBL"?1:.5)*(J.bvlD.v.BESs=="In"?1:-1)*J.srgR.v.val/100;
for(var e=0;e<bD;e++)i9[e]*=ac;if(z)console.log("scaling",Date.now()-m);var e2=J.uglg&&J.uglg.v?x.ai():J.lagl.v.val;
e2=e2*(Math.PI/180);var cX=J.uglg&&J.uglg.v?x.BG():J.Lald.v.val;cX=cX*(Math.PI/180);var eR=Math.cos(e2)*Math.cos(cX),gR=-Math.sin(e2)*Math.cos(cX),bN=Math.sin(cX),eG=new Float64Array(bD),ef=new Float64Array(bD),fi=$=="PlEb";
for(var ep=0;ep<hK;ep++)for(var iJ=0;iJ<M;iJ++){var e=ep*M+iJ,aT=0,dm=0,c1=1;if(ep!=0&&ep!=hK-1&&iJ!=0&&iJ!=M-1){var gk=i9[e-M-1],a8=i9[e-M+1],bX=i9[e+M-1],bL=i9[e+M+1];
aT=-.125*(a8+2*i9[e+1]+bL-(gk+2*i9[e-1]+bX));dm=-.125*(bX+2*i9[e+M]+bL-(gk+2*i9[e-M]+a8))}else{var c_=i9[e];
dm=-(ep==0?i9[e+M]-c_:ep==hK-1?c_-i9[e-M]:.5*(i9[e+M]-i9[e-M]));aT=-(iJ==0?i9[e+1]-c_:iJ==M-1?c_-i9[e-1]:.5*(i9[e+1]-i9[e-1]))}var eS=1/Math.sqrt(aT*aT+dm*dm+1);
aT*=eS;dm*=eS;c1*=eS;var c$=aT*eR+dm*gR+c1*bN,cp=c$;if(fi)cp=-aT*eR-dm*gR+c1*bN;if(c$>0)eG[e]=c$;if(cp>0)ef[e]=cp}if(z)console.log("raycasting",Date.now()-m);
if(J.Sftn.v.val!=0){q.Mo.QA(eG,hs,N,J.Sftn.v.val*.43);var b_=hs,hs=eG,eG=b_;if(fi){q.Mo.QA(ef,hs,N,J.Sftn.v.val*.43);
var b_=hs,hs=ef,ef=b_}else q.Ct(eG,ef)}if(z)console.log("softening",Date.now()-m);var bk=q.pH.Sz(J.TrnS.v.Crv.v,1024);
for(var e=0;e<bD;e++){eG[e]=bk[~~(eG[e]*1024)];ef[e]=bk[~~(ef[e]*1024)]}if(z)console.log("contour remap",Date.now()-m);
M=Math.round(M);hK=Math.round(hK);var hy=q.f(M*hK*4);ha.kD(hy,J.hglC.v);var gx=q.f(M*hK*4);ha.kD(gx,J.sdwC.v);
var eJ=q.f(M*hK*4);ha.kD(eJ,J.hglC.v);var d4=q.f(M*hK*4);ha.kD(d4,J.sdwC.v);var cs=1/bN,en=1/(1-bN),gg=1/R,cm=new Float64Array(1e3);
for(var e=0;e<1e3;e++)cm[e]=Math.pow(e*.001,.2);for(var ep=0;ep<hK;ep++)for(var iJ=0;iJ<M;iJ++){var e=ep*M+iJ,c5=4*e+3,fK=0,ez=0;
fK=eG[e];ez=ef[e];var d6=Math.max(0,Math.min(.9999,(dG[e]+R*.993)*gg));d6=cm[Math.floor(d6*1e3)];var ee=d6*(1-Math.min(1,fK*cs)),c0=d6*(1-Math.min(1,(1-fK)*en)),gq=d6*(1-Math.min(1,ez*cs)),ei=d6*(1-Math.min(1,(1-ez)*en));
gx[c5]=Math.round(255*ee);hy[c5]=Math.round(255*c0);d4[c5]=Math.round(255*gq);eJ[c5]=Math.round(255*ei)}if(z)console.log("baking textures",Date.now()-m);
N=v.rect().clone();N.EM(i,i);N.offset(L,H);var d9={a45:J.bvlS.v.BESl=="strokeEmboss"};if(["InrB","Embs","PlEb"].indexOf($)!=-1){d9.Ai={zc:hy,jC:N,QP:fk.X4(J.hglM.v.BlnM),Tb:J.hglO.v.val/100};
d9.UB={zc:gx,jC:N,QP:fk.X4(J.sdwM.v.BlnM),Tb:J.sdwO.v.val/100};y.all.push(d9.Ai,d9.UB)}if(["OtrB","Embs","PlEb"].indexOf($)!=-1){d9.DG={zc:eJ,jC:N,QP:fk.X4(J.hglM.v.BlnM),Tb:J.hglO.v.val/100};
d9.ZR={zc:d4,jC:N,QP:fk.X4(J.sdwM.v.BlnM),Tb:J.sdwO.v.val/100};y.all.push(d9.DG,d9.ZR)}if(z)console.log(Date.now()-m);
y.type[w].push(d9)}if(w=="patternFill"){var ge=v.rect(),G=q.f(ge.X()*4);ha.qO(J,G,ge,x,F);var s=ge.clone();
s.offset(L,H);var T={zc:G,jC:s,QP:fk.X4(J.Md.v.BlnM),Tb:J.Opct.v.val/100};y.type[w].push(T);y.all.push(T)}if(w=="ChFX"){var G=q.f(v.PB().length*4);
ha.kD(G,J.Clr.v);var A=J.blur.v.val,iK=v.rect().clone();iK.EM(A,A);var gu=q.f(iK.X()),eA=q.f(iK.X());
q.k9(v.PB(),v.rect(),eA,iK);q.Mo.MU(eA,gu,iK,A*.43);var cE=q.pH.ZE(J.MpgS.v.Crv.v,256,!0);q.mr(gu,cE);
var iU=q.f(v.PB().length),eI=q.f(v.PB().length),ad=v.rect().clone();ha.nI(ad,J,x,0);q.k9(gu,iK,iU,ad);
ad=v.rect().clone();ha.nI(ad,J,x,Math.PI);q.k9(gu,iK,eI,ad);var d_=iU.length;for(var e=0;e<d_;e++)G[4*e+3]=Math.abs(iU[e]-eI[e]);
if(J.Invr.v)for(var e=0;e<d_;e++)G[4*e+3]=255-G[4*e+3];var s=v.rect().clone();s.offset(L,H);var T={zc:G,jC:s,QP:fk.X4(J.Md.v.BlnM),Tb:J.Opct.v.val/100};
y.type[w].push(T);y.all.push(T)}if(w=="OrGl"){var j;if(J.GlwT.v.BETE=="SfBL")j=v.Sh(U,A-U,!0);else j=v.wn(A,p,!0);
var b=j.PB,s=j.j,c9=b.slice(0);ha.ML(b,J);var G=q.f(s.X()*4);if(J.Grad==null){ha.kD(G,J.Clr.v);ha.WC(b,J,!1)}else{ha.WC(b,J,null);
var ek={Of:b,Pi:255,Nm:0,bh:s};ha.XV(J,G,s,x,ek);var fX=J.Nose.v.val/100,fo=s.d;for(var e=0;e<c9.length;
e++){var eY=255,hG=c9[e];if(hG<32){var aY=(hG+c9[e-1]+c9[e+1]+c9[e-fo]+c9[e+fo])*.2-1;eY=Math.min(255,Math.round(Math.max(0,aY)*8))}b[e]=eY}ha.gR(b,J)}q.GF(b,G,3);
s.offset(L,H);var T={zc:G,jC:s,QP:fk.X4(J.Md.v.BlnM),Tb:J.Opct.v.val/100};y.type[w].push(T);y.all.push(T)}if(w=="IrGl"){var j;
if(J.GlwT.v.BETE=="SfBL")j=v.Sh(U,A-U,!1);else j=v.wn(A,p,!1);var b=j.PB,s=j.j;ha.ML(b,J);if(J.glwS.v.IGSr=="SrcC")q.uZ(b);
var G=q.f(s.X()*4);if(J.Grad==null){ha.kD(G,J.Clr.v);ha.WC(b,J,!0)}else{ha.WC(b,J,null);var ek={Of:b,Pi:255,Nm:0,bh:s};
ha.XV(J,G,s,x,ek);b.fill(255);ha.gR(b,J)}q.GF(b,G,3);s.offset(L,H);var T={zc:G,jC:s,QP:fk.X4(J.Md.v.BlnM),Tb:J.Opct.v.val/100};
y.type[w].push(T);y.all.push(T)}if(w=="FrFX"){var gK=ha.Yj(J),b$=gK[0],c4=gK[1],s=v.rect().clone(),gA=null,f7=null;
s.EM(Math.ceil(d),Math.ceil(d));if(c4>0){var j=v.Sh(c4,0,!0);f7=j.PB;if(f7.length<s.X()){f7=q.f(s.X());
q.k9(j.PB,j.j,f7,s)}}if(b$>0){var j=v.Sh(b$,0,!1);gA=q.f(s.X());gA.fill(255);q.k9(j.PB,j.j,gA,s)}s.offset(L,H);
var G=q.f(s.X()*4),aZ=J.PntT.v.FrFl;if(aZ=="SClr")ha.kD(G,J.Clr.v);if(aZ=="GrFl")ha.XV(J,G,s,x,v.a6c(b$,c4));
if(aZ=="Ptrn")ha.qO(J,G,s,x,F);var T={zc:G,jC:s,QP:fk.X4(J.Md.v.BlnM),Tb:J.Opct.v.val/100,wd:f7,k0:gA};
y.type[w].push(T);y.all.push(T)}}}return y};ha.t4=function(n){var F=1/Math.sqrt(n.x*n.x+n.y*n.y+n.Jw*n.Jw);
n.x*=F;n.y*=F;n.Jw*=F};ha.D8=function(n,F){return{x:n.y*F.Jw-n.Jw*F.y,y:n.Jw*F.x-n.x*F.Jw,Jw:n.x*F.y-n.y*F.x}};
ha.acx=function(n,F){return n.x*F.x+n.y*F.y+n.Jw*F.Jw};ha.gR=function(n,F){var O=F.Nose.v.val/100;if(O>0)for(var e=0;
e<n.length;e++){var I=n[e];I=Math.min(510-(1+O)*q.style.GR(e),I);n[e]=I}};ha.NY=function(n){var F=ha.gm(),O=n.wx,I=!1;
for(var e=0;e<32;e+=8)if(O[e]+O[e+1]+O[4]+O[5]!=0||O[e+2]+O[e+3]+O[6]+O[7]!=1020)I=!0;if(I){O=O.slice(0);
for(var e=0;e<40;e+=4){var x=O[e]/255,r=O[e+1]/255,_=O[e+2]/255,d=O[e+3]/255;O[e]=x-1e-4;O[e+1]=x==r?1e9:1/(r-(x-1e-4));
O[e+2]=_==d?-1e9:1/(_-(d+1e-4));O[e+3]=d+1e-4}}var w=n.add.iOpa!=null?n.add.iOpa/255:F.fill,Z=n.add.vstk;
if(Z&&!Z.fillEnabled.v&&(!Z.strokeEnabled.v||Z.strokeStyleLineWidth.v.val==0))w=0;return{fill:w,ni:I?O:null,fr:n.add.brst!=null?n.add.brst:F.fr,a7Q:n.add.knko!=null?n.add.knko:F.a7Q,style:!1,rU:!1}};
ha.gm=function(){return{fill:1,ni:null,fr:[1,1,1],a7Q:0,style:!1,rU:!1}};ha.Yi=function(n,F){if(F==null)return null;
var O=n.Idnt.v,I=null;for(var e=0;e<F.length;e++)if(F[e].id==O)return F[e];return null};ha.px=function(n,F,O){var I=["patternFillMulti","ebblMulti","frameFXMulti"];
for(var e=0;e<I.length;e++){var x=n.v[I[e]].v;for(var r=0;r<x.length;r++)if(x[r].v.Ptrn)F.CI(ha.Yi(x[r].v.Ptrn.v,O))}};
ha.aiq=function(n,F,O){var I=["patternFillMulti","ebblMulti","frameFXMulti"];for(var e=0;e<I.length;
e++){var x=n.v[I[e]].v;for(var r=0;r<x.length;r++)if(x[r].v.Ptrn){var _=x[r].v.Ptrn.v,d=ha.Yi(_,O),w=ha.Yi(_,F.add.Patt);
if(d==null&&w)O.push(w)}}};ha.qO=function(n,F,O,I,x){var r=ha.Yi(n.Ptrn.v,I.add.Patt);if(r!=null&&!O.D2()){var _=r.IR,d=_[0],w=_[1],Z=0;
q.zZ(_);var P=n.Scl.v.val/100;while((P<.3||P==.5)&&_[Z+2]){P*=w.d/_[Z+3].d;Z+=2;d=_[Z];w=_[Z+1]}var C=q.scale.qO(d,w.d,w.v),W=-O.x+n.phase.v.Hrzn.v-1,v=-O.y+n.phase.v.Vrtc.v-1;
if(n.Algn!=null&&!n.Algn.v){}else{W+=x.x;v+=x.y}q.scale.a6G(C,F,O.d,O.v,P,P,W+1,v+1)}};ha.XV=function(n,F,O,I,x,r){if(r==null)r=O;
var _=n.Type?n.Type.v.GrdT:"shapeburst",d=n.Algn&&n.Algn.v?r:new gv(0,0,I.d,I.v),w=n.Angl?q.W.VL(n,d):[new aE(0,0),new aE(100,0)],Z=w[0].x,P=w[0].y,C=w[1].x-Z,W=w[1].y-P,v=Math.sqrt(C*C+W*W);
v=1/(2*v*v);var L=[C*v,W*v,-W*v,C*v],H=n.Rvrs?n.Rvrs.v:!1,y=n.Dthr?n.Dthr.v:!1;q.W.Vt(n.Grad.v,F,O,L,Z,P,H,bW.W.types.indexOf(_),0,0,x,y)};
ha.aga=function(n,F){for(var e=0;e<n.all.length;e++){var O=n.all[e];O.or=O.jC.clone();O.or.offset(F.x,F.y)}};
ha.zN=function(n,F,O,I,x,r){var _=l.Z0?ha.JD:ha.r0;ha.aga(F,O);var d=F.type.DrSh;for(var e=0;e<d.length;
e++)if(!d[e].anB)_(d[e],I,x,r)};ha.xd=function(n,F,O,I,x,r,_,d,w,Z){var P=O,C=l.Z0?ha.JD:ha.r0,W=l.Z0?l.p.t_:q.p.Nb,v;
v=F.type.DrSh;for(var e=0;e<v.length;e++)if(v[e].anB)C(v[e],I,x,r);v=F.type.OrGl;for(var e=0;e<v.length;
e++)C(v[e],I,x,r);var L="patternFill GrFl SoFi ChFX IrGl IrSh".split(" ");for(var H=0;H<L.length;H++){var v=F.type[L[H]];
for(var e=0;e<v.length;e++)C(v[e],_,P,r)}var y=F.type.ebbl[0],g=y!=null&&y.a45;v=F.type.FrFX;for(var e=0;
e<v.length;e++){var Q=v[e];hw.bm.k9(d,Z,w,Z,r);C(Q,w,Z,r);if(g&&e==v.length-1){if(y.ZR)C(y.ZR,w,Z,r);
if(y.DG)C(y.DG,w,Z,r);if(y.UB)C(y.UB,w,Z,r);if(y.Ai)C(y.Ai,w,Z,r)}if(Q.k0||Q.JK)W(w,Z,_,P,l.Z0?Q.JK:Q.k0,Q.or,0,r,1);
if(Q.wd||Q.Tz)W(w,Z,I,x,l.Z0?Q.Tz:Q.wd,Q.or,0,r,1)}if(!g&&y!=null){if(y.ZR)C(y.ZR,I,x,r);if(y.DG)C(y.DG,I,x,r);
if(y.UB)C(y.UB,_,P,r);if(y.Ai)C(y.Ai,_,P,r)}};ha.r0=function(n,F,O,I){var x=ha.gm();x.fill=n.Tb;x.style=!0;
q.p.F_(n.QP,n.zc,n.or,F,O,I,1,x)};ha.JD=function(n,F,O,I){var x=ha.gm();x.fill=n.Tb;x.style=!0;l.p.$p(n.QP,n.oX,n.or,F,O,I,1,x)};
ha.ML=function(n,F){var O=1-F.Inpr.v.val/100,I=1+Math.tan(O*(Math.PI/2)),x=n.length;for(var e=0;e<x;
e++)n[e]=Math.min(255,Math.round(n[e]*I))};ha.WC=function(n,F,O){var I=F.blur.v.val,x=Math.round(I*(F.Ckmt.v.val/100));
if(I>x){var r=q.pH.ZE(F.TrnS.v.Crv.v,256,!0);q.mr(n,r)}if(O!=null&&F.Nose.v.val>0)q.style.ox(n,F.Nose.v.val/100,O)};
ha.kD=function(n,F,O){if(O==null)O=255;var I=q.W.S_(F),x=O<<24|I.O<<16|I.l<<8|I.Q,r=new Uint32Array(n.buffer);
r.fill(x)};ha.nI=function(n,F,O,I){var x=F.uglg&&F.uglg.v?O.ai():F.lagl.v.val;x=x*Math.PI/180+I;var r=Math.cos(x)*F.Dstn.v.val,_=Math.sin(x)*F.Dstn.v.val;
n.x-=Math.round(r);n.y+=Math.round(_)};ha.Lv=function(n){if(n==null)return null;var F=n.frameFXMulti.v;
if(F.length==0)return null;F=F[0].v;var O=JSON.parse(JSON.stringify(bW.uS.default));ha.WW(F,O);return O};
ha.WW=function(n,F){var O=bW.stroke.Ne.indexOf(n.PntT.v.FrFl),I=[bW.ez,bW.KK,bW.dC][O],x=F.strokeStyleContent.v={classID:bW.uS.Ul[O]};
for(var e=0;e<I.length;e++)x[I[e]]=n[I[e]];F.strokeEnabled=n.enab;F.strokeStyleLineWidth=n.Sz;F.strokeStyleLineAlignment.v.strokeStyleLineAlignment=bW.uS.RD[bW.stroke.types.indexOf(n.Styl.v.FStl)];
F.strokeStyleOpacity=n.Opct;F.strokeStyleBlendMode=n.Md};ha.Kn=function(n,F){var O=[];for(var e=0;e<n.length;
e++)O.push({t:"UntF",v:{type:"#Nne",val:Math.round(n[e]*F)}});return O};ha.yR=function(n,F,O,I){this.hc=F.clone();
this.acf=F.clone();this.acf.EM(O,O);if(I){this.hc.EM(1,1);this.ze=q.f(this.hc.X());q.k9(n,F,this.ze,this.hc)}else this.ze=n;
this.Zl=null;this.P9=null;this.O2=null};ha.yR.prototype.PB=function(){return this.ze};ha.yR.prototype.rect=function(){return this.hc};
ha.yR.prototype.ZV=function(){return this.acf};ha.yR.prototype.DF=function(){if(this.Zl)return this.Zl;
this.Zl=this.PB().slice(0);q.uZ(this.Zl);return this.Zl};ha.yR.prototype.DS=function(){if(this.P9)return this.P9;
this.P9=new Float64Array(this.rect().X());q.style.sq(this.DF(),this.P9,this.rect().d,this.rect().v);
return this.P9};ha.yR.prototype.xD=function(){if(this.O2)return this.O2;var n=this.ZV(),F=q.f(n.X());
q.k9(this.PB(),this.rect(),F,n);this.O2=new Float64Array(n.X());q.style.sq(F,this.O2,n.d,n.v);return this.O2};
ha.yR.prototype.a6c=function(n,F){var O={Pi:-F,Nm:n,bh:null,Of:null};if(F==0){O.bh=this.rect();O.Of=this.DS();
return O}var I=this.xD().slice(0),x=this.ZV();O.bh=x;O.Of=I;for(var e=0;e<I.length;e++)I[e]=-I[e];if(n==0)return O;
var r=this.DS(),_=this.rect();for(var d=0;d<_.v;d++)for(var w=0;w<_.d;w++){var Z=d*_.d+w,P=(d+_.y-x.y)*x.d+w+_.x-x.x;
I[P]+=r[Z]}return O};ha.yR.prototype.Sh=function(n,F,O){var I=Math.ceil(n+F),x={j:this.rect().clone(),PB:null};
x.j.EM(I,I);x.PB=q.f(x.j.X());if(n==0&&F==0)q.Ct(O?this.PB():this.DF(),x.PB);else{var r=q.f(x.j.X());
q.k9(this.PB(),this.rect(),r,x.j);if(!O)q.uZ(r);if(n!=0){if(O)q.style.CG(r,x.j,this.xD(),this.ZV(),n);
else q.style.CG(r,x.j,this.DS(),this.rect(),n)}if(F!=0)q.Mo.MU(r,x.PB,x.j,Math.max(1,F*.43));else x.PB=r}return x};
ha.yR.prototype.wn=function(n,F,O){var I=n*(F-.5),x={j:this.rect().clone(),PB:null};if(O)x.j.EM(n,n);
x.PB=q.f(x.j.X());var r=x.j.d,_=x.j.v,d=O?this.xD():this.DS(),w=O?this.ZV():this.rect(),Z=x.j,P=Z.lN(w),r=P.d,_=P.v,C=P.x-Z.x,W=P.y-Z.y,v=P.x-w.x,L=P.y-w.y,H=1-F*2;
for(var y=0;y<_;y++)for(var g=0;g<r;g++){var Q=d[(y+L)*w.d+g+v],J=Q/n;x.PB[(y+W)*Z.d+g+C]=Math.max(0,Math.min(255,255-255*((J+H)/(1+H))))}return x};
ha.qd=function(n,F,O){var I=n.Lefx,x=n.blendOptions;if(I){var r=F.add.lmfx;if(O==null)O=r?r.Scl.v.val:100;
F.add.lmfx=JSON.parse(JSON.stringify(I.v));if(F.add.lmfx.Scl==null)F.add.lmfx.Scl={t:"UntF",v:{type:"#Prc",val:100}};
ha.QB(F.add.lmfx,O/F.add.lmfx.Scl.v.val);if(r)F.add.lmfx.Scl.v.val=r.Scl.v.val}else delete F.add.lmfx;
if(x){x=x.v;if(x.Md)F.mf=fk.X4(x.Md.v.BlnM);if(x.Opct)F.opacity=Math.round(x.Opct.v.val*255/100);if(x.fillOpacity)F.add.iOpa=Math.round(x.fillOpacity.v.val*255/100);
if(x.Blnd){var _=[];for(var e=0;e<10;e++)_.push(0,0,255,255);var d=x.Blnd.v,w="SrcB Srcl SrcW Srcm DstB Dstl DstW Dstt".split(" ");
for(var e=0;e<d.length;e++){var Z=d[e].v,P=8*["Gry","Rd","Grn","Bl"].indexOf(Z.Chnl.v[0].v.enum);for(var C=0;
C<8;C++){_[P+C]=Z[w[C]].v}}F.wx=_}}};ha._H=function(n){var F="SrcB Srcl SrcW Srcm DstB Dstl DstW Dstt".split(" "),O=[],I=n.wx;
for(var e=0;e<4;e++){var x=e*8;if(I[x]+I[x+1]+I[x+4]+I[x+5]==0&&I[x+2]+I[x+3]+I[x+6]+I[x+7]==4*255)continue;
var r={t:"Objc",v:{classID:"Blnd",Chnl:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:["Gry","Rd","Grn","Bl"][e]}}]}}};
O.push(r);for(var _=0;_<8;_++)r.v[F[_]]={t:"long",v:I[e*8+_]}}var d={classID:"blendOptions"};if(n.mf!="norm")d.Md={t:"enum",v:{BlnM:fk.Pw(n.mf)}};
if(n.opacity!=255)d.Opct={t:"UntF",v:{type:"#Prc",val:Math.round(n.opacity*100/255)}};if(n.add.iOpa!=null)d.fillOpacity={t:"UntF",v:{type:"#Prc",val:Math.round(n.add.iOpa*100/255)}};
if(O.length!=0)d.Blnd={t:"VlLs",v:O};var w={La:{classID:"null",Idnt:{t:"TEXT",v:fj.Mj()+"-bd9f-11d5-b8ba-b73f8571793d"},Nm:{t:"TEXT",v:"Custom Style"}},fg:{classID:"Styl",blendOptions:{t:"Objc",v:d}}},Z=n.add.lmfx;
if(Z)w.fg.Lefx={t:"Objc",v:Z};return w};function e1(){}e1.hw=function(n){return JSON.parse(JSON.stringify(n))};
e1.sW=function(n){var F=e1.hw(e1.amW),O=F.Brsh.v;if(n!=null){delete O.Hrdn;O.classID="sampledBrush";
O.Nm={t:"TEXT",v:"layer.png"},O.sampledData={t:"TEXT",v:n}}return F};e1.amW={classID:"brushPreset",Nm:{t:"TEXT",v:"Custom Brush"},Brsh:{t:"Objc",v:{classID:"computedBrush",Dmtr:{t:"UntF",v:{type:"#Pxl",val:15}},Hrdn:{t:"UntF",v:{type:"#Prc",val:100}},Angl:{t:"UntF",v:{type:"#Ang",val:0}},Rndn:{t:"UntF",v:{type:"#Prc",val:100}},Spcn:{t:"UntF",v:{type:"#Prc",val:25}},Intr:{t:"bool",v:!0},flipX:{t:"bool",v:!1},flipY:{t:"bool",v:!1}}},useTipDynamics:{t:"bool",v:!1},useScatter:{t:"bool",v:!1},dualBrush:{t:"Objc",v:{classID:"dualBrush",useDualBrush:{t:"bool",v:!1}}},brushGroup:{t:"Objc",v:{classID:"brushGroup",useBrushGroup:{t:"bool",v:!1}}},useTexture:{t:"bool",v:!1},usePaintDynamics:{t:"bool",v:!1},useColorDynamics:{t:"bool",v:!1},Wtdg:{t:"bool",v:!1},Nose:{t:"bool",v:!1},Rpt:{t:"bool",v:!1}};
e1.t4={};e1.t4.check=function(n){var F=e1.t4.PU;for(var e=0;e<F.length;e++)if(n[F[e]]==null)n[F[e]]=JSON.parse(e1.t4.IL[F[e]]);
var O=[];for(var e=0;e<F.length;e++)O.push(F[e]);var I=e1.t4.Ht;for(var e=0;e<I.length;e++){var x=I[e][0],r=I[e][1],_=!0;
for(var d=0;d<x.length;d++)_=_&&n[x[d]].v==!0;if(_)for(var d=0;d<r.length;d++){if(n[r[d]]==null)console.log("Missing conditional parameter "+r[d]);
else O.push(r[d])}}for(var w in n)if(O.indexOf(w)==-1)console.log("Extra parameter "+w);n=n.Brsh.v;F=e1.t4.JM.PU;
for(var e=0;e<F.length;e++)if(n[F[e]]==null)n[F[e]]=JSON.parse(e1.t4.JM.IL[F[e]]);O=[];for(var e=0;e<F.length;
e++)if(n[F[e]])O.push(F[e]);else console.log("Missing default parameter "+F[e]);I=e1.t4.JM.a0v[n.classID];
for(var e=0;e<I.length;e++)if(n[I[e]]==null&&I[e]!="dtipsGridSize"&&I[e]!="dtipsErodibleTipHeightMap"&&n.a7j!=1)console.log("Missing conditional parameter "+I[e]);
else O.push(I[e]);for(var w in n)if(O.indexOf(w)==-1)console.log("Extra parameter "+w)};e1.t4.As=function(n){var F=e1.t4.Ht;
for(var e=0;e<F.length;e++){var O=F[e][0],I=F[e][1],x=!0;for(var r=0;r<O.length;r++)x=x&&n[O[r]]&&n[O[r]].v==!0;
if(x){for(var r=0;r<I.length;r++)if(n[I[r]]==null){n[I[r]]=JSON.parse(e1.t4.IL[I[r]])}}else for(var r=0;
r<I.length;r++)if(n[I[r]]!=null){delete n[I[r]]}}};e1.t4.JM={};e1.t4.JM.PU="classID Dmtr Angl Spcn Intr flipX flipY".split(" ");
e1.t4.JM.IL={flipX:"{\"t\":\"bool\",\"v\":false}",flipY:"{\"t\":\"bool\",\"v\":false}"};e1.t4.JM.a0v={computedBrush:["Hrdn","Rndn"],sampledBrush:["Nm","Rndn","sampledData"],dBrush:"Shp Dnst Lngt clumping thickness stiffness physics".split(" "),dTips:"dtipsType Shp dtipsLengthRatio dtipsHardness dtipsGridSize dtipsErodibleTipHeightMap physics dtipsAirbrushCutoffAngle dtipsAirbrushGranularity dtipsAirbrushStreakiness dtipsAirbrushSplatSize dtipsAirbrushSplatCount".split(" ")};
e1.t4.Ht=[[["useTipDynamics"],"flipX flipY brushProjection minimumDiameter minimumRoundness tiltScale szVr angleDynamics roundnessDynamics".split(" ")],[["usePaintDynamics"],["prVr","opVr","wtVr","mxVr"]],[["useBrushPose"],"overridePoseAngle overridePoseTiltX overridePoseTiltY overridePosePressure brushPosePressure brushPoseTiltX brushPoseTiltY brushPoseAngle".split(" ")],[["useTexture"],"TxtC interpretation textureBlendMode textureDepth minimumDepth textureDepthDynamics Txtr textureScale InvT textureBrightness textureContrast".split(" ")],[["useColorDynamics"],"clVr H Strt Brgh purity colorDynamicsPerTip".split(" ")],[["useScatter"],["Cnt","countDynamics","bothAxes","scatterDynamics"]],[["useScatter","bothAxes"],["Spcn"]]];
e1.t4.PU="classID Nm Brsh useTipDynamics usePaintDynamics useColorDynamics useScatter useTexture useBrushSize useBrushPose Wtdg Nose Rpt dualBrush brushGroup".split(" ");
e1.t4.IL={useBrushSize:"{\"t\":\"bool\",\"v\":false}",useBrushPose:"{\"t\":\"bool\",\"v\":false}",brushGroup:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brushGroup\",\"useBrushGroup\":{\"t\":\"bool\",\"v\":false}}}",flipX:"{\"t\":\"bool\",\"v\":false}",flipY:"{\"t\":\"bool\",\"v\":false}",brushProjection:"{\"t\":\"bool\",\"v\":false}",minimumDiameter:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}",minimumRoundness:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":25}}",tiltScale:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":200}}",szVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":2},\"fStp\":{\"t\":\"long\",\"v\":1},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",angleDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":25},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",roundnessDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":25},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",prVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":2},\"fStp\":{\"t\":\"long\",\"v\":25},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",opVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":25},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",wtVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":25},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",mxVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":25},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",overridePoseAngle:"{\"t\":\"bool\",\"v\":false}",overridePoseTiltX:"{\"t\":\"bool\",\"v\":true}",overridePoseTiltY:"{\"t\":\"bool\",\"v\":true}",overridePosePressure:"{\"t\":\"bool\",\"v\":true}",brushPosePressure:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":9}}",brushPoseTiltX:"{\"t\":\"long\",\"v\":0}",brushPoseTiltY:"{\"t\":\"long\",\"v\":0}",brushPoseAngle:"{\"t\":\"long\",\"v\":0}",TxtC:"{\"t\":\"bool\",\"v\":false}",interpretation:"{\"t\":\"bool\",\"v\":true}",textureBlendMode:"{\"t\":\"enum\",\"v\":{\"BlnM\":\"CBrn\"}}",textureDepth:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":37}}",minimumDepth:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":97}}",textureDepthDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":25},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",Txtr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Ptrn\",\"Nm\":{\"t\":\"TEXT\",\"v\":\"$$$/Presets/Patterns/Patterns_pat/Laidhorizontal=Laid-horizontal\"},\"Idnt\":{\"t\":\"TEXT\",\"v\":\"52a93427-f5d6-1172-a989-8dc82a43aa51\"}}}",textureScale:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":99}}",InvT:"{\"t\":\"bool\",\"v\":false}",textureBrightness:"{\"t\":\"long\",\"v\":14}",textureContrast:"{\"t\":\"long\",\"v\":100}",Cnt:"{\"t\":\"doub\",\"v\":4}",countDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":1},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":98}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",bothAxes:"{\"t\":\"bool\",\"v\":false}",scatterDynamics:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":1},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":56}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",clVr:"{\"t\":\"Objc\",\"v\":{\"classID\":\"brVr\",\"bVTy\":{\"t\":\"long\",\"v\":0},\"fStp\":{\"t\":\"long\",\"v\":25},\"jitter\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}},\"Mnm\":{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}}}",H:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}",Strt:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}",Brgh:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":36}}",purity:"{\"t\":\"UntF\",\"v\":{\"type\":\"#Prc\",\"val\":0}}",colorDynamicsPerTip:"{\"t\":\"bool\",\"v\":false}"};
function ay(n,F){this.a7p=n;this.VH=F==null?0:F;this.dir=0}ay.prototype.sQ=function(n,F){var O=this.a7p,I=new aE(n.x-O.x,n.y-O.y),x=new cD;
x.rotate(-this.VH);I=x.Pz(I);if(this.dir==0&&!O.Qq(n))this.dir=Math.abs(I.x)<Math.abs(I.y)?1:2;if(F.q(u.MQ)){if(this.dir==1)I.x=0;
if(this.dir==2)I.y=0}x.uZ();I=x.Pz(I);var r=new aE(O.x+I.x,O.y+I.y);return r};function cb(n,F,O,I,x,r,_,d){this.J$=F;
this.Gr=O;this.sI=r;this.nD=I;if(I.yc==null)I.yc=[!1,!0];this.py=null;this.vD=null;this.Nr=0;this.a9T=0;
this.amN=0;this.Nt=0;this.$f=0;this.a3z=_;this.Kh=new gv;this.Bj=new gv;this.rect=new gv;if(d!=null){this.zc=d}else{var w=cb.Bf;
if(w.length!=_.X()*4)w=q.f(_.X()*4);else w.fill(0);this.zc=cb.Bf=w}this.rect=_.clone();this.mj=[];this.BE=[];
this.v4=null;this.nE=0;this.O=null;this.io="";this.xE=null;this.hT(n,x)}cb.Bf=q.f(16);cb.prototype.hT=function(n,F){this.nE=F;
this.O=n;this.io=JSON.stringify(n)+JSON.stringify(this.nD.yX);this.xE=cb.a9r(n,this.J$,this.Gr)};cb.prototype.moveTo=function(n,F,O){O=this.Di(O);
this.Nr=O;var I=new aE(n,F),x=this.O.Brsh.v.Dmtr.v.val;this.py=I.clone();this.vD=I.clone();this.v4=I.clone();
this.mj=[n,F];this.BE=[O];var r=this.nD.yc;if(this.nD.XQ!=cb.GD)this.uD(this.WM(I,this.E3()*(r[1]?O:1),this.nD.c1*(r[0]?O*.5:1),new aE(0,0)));
this.Nt=I.clone()};cb.prototype.lineTo=function(n,F,O){O=this.Di(O);var I=this.mj,x=I.length,r=I[x-2],_=I[x-1];
if(n==r&&F==_)return;var d=this.O.Brsh.v.Dmtr.v.val,w=Math.ceil(d)+1,Z=new gv(Math.round(r),Math.round(_),0,0);
Z.EM(w,w);var P=new gv(Math.round(n),Math.round(F),0,0);P.EM(w,w);this.xP(Z.Tq(P));this.mj.push(n,F);
this.BE.push(O);x+=2;if(x>=6)this.uD(this.q6(x))};cb.prototype.Di=function(n){if(n==null)n=1;n=Math.max(.05,Math.min(5,n));
if(isNaN(n)){alert("Pressure is not a number");throw"e"}return n};cb.prototype.uD=function(n){this.Kh=n;
this.Bj=this.Bj.Tq(n)};cb.prototype.finish=function(){var n=this.mj,F=n.length,O;if(F==4)O=this.On(n[F-2],n[F-1],this.BE[(F>>1)-1],!0);
if(F>4)O=this.q6(F+2);if(O)this.uD(O)};cb.prototype.q6=function(n){var F=this.mj,O=this.BE,I=F[n-6],x=F[n-5],r=F[n-4],_=F[n-3],d=O[(n>>1)-3],w=O[(n>>1)-2],Z=new aE(0,0),P=new aE(0,0);
if(8<=n)Z=cb.ym(F[n-8],F[n-7],I,x,r,_);if(n<=F.length)P=cb.ym(F[n-2],F[n-1],r,_,I,x);var C=I+Z.x,W=x+Z.y,v=r+P.x,L=_+P.y,H=new gv;
for(var e=0;e<10;e++){var y=(e+1)*.1,g=1-y,Q=g*g*g*I+3*y*g*g*C+3*y*y*g*v+y*y*y*r,J=g*g*g*x+3*y*g*g*W+3*y*y*g*L+y*y*y*_,A=this.On(Q,J,d+y*(w-d));
H=H.Tq(A)}return H};cb.ym=function(n,F,O,I,x,r){var _=n-O,d=F-I,w=x-O,Z=r-I,P=Math.sqrt(_*_+d*d),C=Math.sqrt(w*w+Z*Z),W=Math.acos((_*w+d*Z)/(P*C))/Math.PI,v=.35,L=.1;
W=L+W*(v-L);var H=x-n,y=r-F,g=Math.sqrt(H*H+y*y),Q=W*C/g;return new aE(H*Q,y*Q)};cb.prototype.On=function(n,F,O,I){var x=new gv,r=this.nD.adC;
if(r==null)r=0;if(r==0||I){x=this.hn(n,F,O);return x}var _=this.v4,d=n-_.x,w=F-_.y,Z=Math.sqrt(d*d+w*w);
d/=Z;w/=Z;if(Z>r){var P=_.x+d*(Z-r),C=_.y+w*(Z-r);x=this.hn(P,C,O);this.v4.mT(P,C)}return x};cb.prototype.hn=function(n,F,O){var I=new gv,x=new aE(n,F),r=this.O.Brsh.v.Dmtr.v.val,_=this.nD.XQ,d=x.ba(this.vD);
d.normalize(1);var w=aE.sl(this.vD,x),Z=-this.a9T,P=this.vD.clone(),C=this.nD.yc;while(!0){var W=this.Nr+(O-this.Nr)*(Math.max(0,Z)/w),v=this.E3()*(C[1]?W:1),L=this.a59()*(v+this.amN)/2;
if(_==cb.GD)L=1;if(Z+L<w){Z+=L;var H=new aE(this.vD.x+d.x*Z,this.vD.y+d.y*Z),Q=1;if(_==cb.GD){var y=P.clone();
y.x+=d.x>0?1:-1;var g=P.clone();g.y+=d.y>0?1:-1;if(aE.sl(y,H)<aE.sl(g,H))H=y;else H=g;Z=aE.sl(H,this.vD)}if(this.O.useScatter.v==!0){Q=this.O.Cnt.v;
var J=this.O.countDynamics.v.jitter.v.val/100,A=J*(-1+2*this.e5());Q+=Math.round(Q*A)}for(var e=0;e<Q;
e++){var p=this.WM(H,v,this.nD.c1*(C[0]?W*.5:1),d);I=I.Tq(p)}P=H}else break}this.a9T=w-Z;this.vD=x;this.Nr=O;
return I};cb.prototype.a59=function(){var n=this.O.Brsh.v,F=n.Spcn.v.val,O=Math.max(5,n.Rndn.v.val);
return O/100*(F/100)};cb.prototype.E3=function(){var n=this.O,F=n.Brsh.v.Dmtr.v.val;if(n.useTipDynamics.v){var O=F*(n.minimumDiameter.v.val/100);
F=O+(F-O)*(1-this.e5()*(n.szVr.v.jitter.v.val/100))}return F};cb.prototype.WM=function(n,F,O,I){O=Math.min(1,O);
var x=this.O,r=this.O.Brsh.v,_=r.Dmtr.v.val,d=this.nD,w=d.XQ,Z=d.a85,P=new cD;P.translate(-this.xE.Py.d/2,-this.xE.Py.v/2);
P.scale(1/this.xE.aaK,1/this.xE.aaK);P.scale(F/_,F/_);P.scale(1,Math.max(5,r.Rndn.v.val)/100);if(x.useTipDynamics.v){var C=x.minimumRoundness.v.val/100;
P.scale(1,C+(1-C)*Math.round(100-this.e5()*x.roundnessDynamics.v.jitter.v.val)/100);P.rotate((-.5+this.e5())*4*Math.PI*(x.angleDynamics.v.jitter.v.val/100))}P.rotate(r.Angl.v.val*(Math.PI/180));
if(x.useScatter.v){var W=(-1+2*this.e5())*x.scatterDynamics.v.jitter.v.val/100;P.translate(-W*F*I.y,W*F*I.x)}P.translate(n.x,n.y);
var v=this.aaH(P,n);this.xP(v.rect);var L=v.rect.clone();if(w==null){var H=this.S_(x);q.IW(v.Us,Math.round(H.O*255)<<16|Math.round(H.l*255)<<8|Math.round(H.Q*255)<<0,4278190080);
if(this.Bj.D2()&&this.rect.Qq(v.rect)&&O==1)this.zc=v.Us.slice(0);else q.p.a5o(v.Us,v.rect,this.zc,this.rect,v.rect,O)}if(w==cb.GD){var y=new aE(v.rect.x+v.rect.d/2,v.rect.y+v.rect.v/2),g=Math.round(y.x-this.Nt.x),Q=Math.round(y.y-this.Nt.y),J=v.rect.clone();
J.offset(-g,-Q);var A=J.lN(this.rect);A.offset(g,Q);q.nF(this.zc,this.rect,v.Us,J);q.p.TF(v.Us,v.rect,this.zc,this.rect,v.WG,v.rect,O)}if(w==cb.dz||w==cb.iZ||w==cb.$Q){var p=v.rect.lN(this.rect),U;
if(p.Qq(v.rect))U=v.WG;else{U=q.f(p.X());q.k9(v.WG,v.rect,U,p)}var j=q.f(p.X()*4);q.nF(this.zc,this.rect,j,p);
if(w==cb.iZ){var b=j.slice(0),s=q.aF.Wl([-1,-1,-1,-1,25,-1,-1,-1,-1]);q.aF.u3(j,b,p.d,p.v,s,0);q.Ct(b,j)}else if(w==cb.$Q){var G=bS.tc("UnsM");
G.Amnt.v.val=15;G.Thsh.v=0;G.Rds.v.val=5;var b=q.f(j.length);bS.Fl("UnsM",{buffer:j,rect:p},G,0,0,{buffer:b,rect:p});
q.Ct(b,j)}else{bS.jJ(1,q.Mo._G,j,p)}q.p.TF(j,p,this.zc,this.rect,U,p,O)}this.amN=F;this.Nt=y;return L};
cb.prototype.S_=function(n){var F=cb.Bs(this.nE);if(n.useColorDynamics&&n.useColorDynamics.v){var O=1-this.e5()*n.clVr.v.jitter.v.val/100,I=cb.Bs(this.sI);
F.Q=O*F.Q+(1-O)*I.Q;F.l=O*F.l+(1-O)*I.l;F.O=O*F.O+(1-O)*I.O;var x=(-.5+this.e5())*n.H.v.val/100,r=(-1+2*this.e5())*n.Strt.v.val/100,_=(-1+2*this.e5())*n.Brgh.v.val/100,d=q.sy(F.Q,F.l,F.O);
d.Sa=(d.Sa+x+1)%1;d.Ls=d.Ls+r;if(d.Ls<0)d.Ls=-d.Ls;if(d.Ls>1)d.Ls=1-(d.Ls-1);d.K_=d.K_+_;if(d.K_<0)d.K_=-d.K_;
if(d.K_>1)d.K_=1-(d.K_-1);F=q.xN(d.Sa,d.Ls,d.K_)}return F};cb.prototype.t4=function(n){return Math.max(0,Math.min(1,n))};
cb.prototype.e5=function(){this.$f++;return cb.hash(this.$f)};cb.Bs=function(n){return{Q:(n>>16&255)/255,l:(n>>8&255)/255,O:(n>>0&255)/255}};
cb.hash=function(n){n=n^61^n>>16;n=n+(n<<3);n=n^n>>4;n=n*668265261;n=n^n>>15;return(n&16777215)/16777215};
cb.sC=[];cb.abU=function(n,E){var F=n.GW(),O=E.GW();if(F<O){var I=F;F=O;O=I}var x=n.R-E.R,r=n.O-E.O,_=n.Pr-E.Pr,d=n.oQ-E.oQ;
return O!=0&&F-O<.025&&Math.max(x*x,r*r,_*_,d*d)<=.01};cb.prototype.aaH=function(n,F){var O=null,r;for(var e=0;
e<cb.sC.length;e++)if(cb.sC[e].io==this.io){O=cb.sC[e];cb.sC.splice(e,1)}if(O==null)O={P0:[],io:this.io,CR:0,X:0};
var I=O.P0,x=this.nD.yX;if(x){n=n.clone();n.hb=Math.floor(n.hb);n.i9=Math.floor(n.i9)}var _=cb.xS(n.hb,n.i9);
for(var e=0;e<I.length;e++){var d=I[e];if(!cb.abU(d.iF,n))continue;if(cb.a2a(d.bp,_)<.2||d.rect.X()>2500){r=d;
break}}var w=Math.round(this.O.Brsh.v.Dmtr.v.val);if(r){r.rect.x=Math.round(r.NG.x-r.iF.hb+n.hb);r.rect.y=Math.round(r.NG.y-r.iF.i9+n.i9);
if(x){r.rect.x=Math.round(F.x-r.rect.d/2);r.rect.y=Math.round(F.y-r.rect.v/2)}r.CR=Date.now()}else{var Z;
if(x&&w<=3){Z={buffer:q.f(w*w*4),rect:new gv(Math.round(F.x-w/2),Math.round(F.y-w/2),w,w)};q.IW(Z.buffer,4278190080)}else if(n.R==1&&n.O==0&&n.Pr==0&&n.oQ==1){Z={buffer:this.xE.Us,rect:this.xE.Py.clone()};
Z.rect.x=Math.round(n.hb);Z.rect.y=Math.round(n.i9)}else Z=c.V.oo([this.xE.Us,this.xE.Py],n);if(x){for(var e=0;
e<Z.buffer.length;e++)Z.buffer[e]=Z.buffer[e]>127?255:0}if(Z==null)Z={buffer:q.f(0),rect:new gv};var P=n.hb-Math.floor(n.hb),C=n.i9-Math.floor(n.i9);
r={Us:Z.buffer,WG:q.f(Z.rect.X()),rect:Z.rect,NG:Z.rect.clone(),iF:n,bp:cb.xS(n.hb,n.i9),CR:Date.now()};
q.xg(r.Us,r.WG,3);I.push(r);O.X+=Z.rect.X();if(I.length>2e3||O.X>100*100*400){console.log("pruning",O.X,I.length);
I.sort(function(v,L){return L.CR-v.CR});while(I.length>1e3||O.X>100*100*200){var W=I.pop();O.X-=W.rect.X()}}}O.P0=I;
O.CR=Date.now();cb.sC.push(O);cb.sC.sort(function(v,L){return L.CR-v.CR});while(cb.sC.length>3)cb.sC.pop();
return r};cb.xS=function(n,F){return new aE(n-Math.floor(n),F-Math.floor(F))};cb.a2a=function(n,F){var O=F.x,I=F.y,x=Math.abs(O-n.x),r=Math.abs(I-n.y);
if(Math.abs(O-1-n.x)<x)O--;else if(Math.abs(O+1-n.x)<x)O++;if(Math.abs(I-1-n.y)<r)I--;else if(Math.abs(I+1-n.y)<r)I++;
x=n.x-O;r=n.y-I;return Math.sqrt(x*x+r*r)};cb.prototype.xP=function(n){};cb.a9r=function(n,F,O){var I,x,r,_=n.Brsh.v.Dmtr.v.val;
if(n.Brsh.v.classID=="computedBrush"){var d=n.Brsh.v.Hrdn.v.val/100,w=1+.55*(1-d);r=_<100?1.2:1;var Z=Math.round(r*_*w);
x=new gv(0,0,Z,Z);I=q.f(Z*Z*4);var P=new Uint32Array(I.buffer),C=Z/2,W=w/C,v=Date.now(),L=cb.QR(d),H=Math.round(8e3/C),F=L[0],y=L[1]-H,g=L[2]+H,Q=Math.min(Z,(Z>>>1)+1);
for(var e=0;e<Q;e++){var J=W*(e-C+.25);J*=J;var A=W*(e-C+.75);A*=A;var p=e*Z,U=(Z-1-e)*Z;for(var j=0;
j<Q;j++){var b=W*(j-C+.25),s=Math.floor(Math.sqrt(b*b+J)*(4e3/1.55));if(g<s)continue;else if(s<y){var G=4278190080;
while(j<Q){var T=Z-1-j;P[p+j]=G;P[p+T]=G;P[U+j]=G;P[U+T]=G;j++}break}else{var z=W*(j-C+.75),m=Math.floor(Math.sqrt(z*z+J)*(4e3/1.55)),$=Math.floor(Math.sqrt(b*b+A)*(4e3/1.55)),o=Math.floor(Math.sqrt(z*z+A)*(4e3/1.55)),G=~~(.5+255*.25*(F[s]+F[m]+F[$]+F[o]))<<24,T=Z-1-j;
P[p+j]=G;P[p+T]=G;P[U+j]=G;P[U+T]=G}}}}if(n.Brsh.v.classID=="sampledBrush"){var h;for(var e=0;e<F.length;
e++)if(F[e].id==n.Brsh.v.sampledData.v)h=F[e];x=new gv(0,0,h.j.d,h.j.v);r=Math.max(x.d,x.v)/_;I=q.f(x.X()*4);
q.GF(h.channel,I,3)}while(Math.min(x.d,x.v)>_*2){var X=new gv(x.x,x.y,Math.floor(x.d/2),Math.floor(x.v/2)),D=c.V.oo([I,x],new cD(X.d/x.d,0,0,X.v/x.v,0,0));
r*=X.d/x.d;x=D.rect;I=D.buffer}return{aaK:r,Py:x,Us:I}};cb.eX=[];cb.QR=function(n){if(cb.eX[n])return cb.eX[n];
var F=Math.pow(n,.55),O=new Float64Array(8e3),I=0,x=8e3;for(var e=0;e<8e3;e++){var r=cb.a5R(e*(1.55/4e3),F);
if(r>=1)I=e;else if(r<=0&&x==8e3)x=e;O[e]=r}var _=[O,I,x];cb.eX[n]=_;return _};cb.a5R=function(n,F){var O=n<F?1:cb.am2((n-F)/Math.pow(1.001-F,.86));
return O};cb.am2=function(n){var F=n*.85;return Math.exp(-(F*F)*(1/(2*.4*.4)))*(1/(.4*Math.sqrt(2*Math.PI)))};
cb.prototype.nJ=function(){return this.rect.clone()};cb.prototype.nj=function(){return this.Kh.lN(this.rect)};
cb.prototype.uu=function(){return this.Bj.lN(this.rect)};cb.prototype.El=function(){return this.zc};
cb.nd=null;cb.Vo=null;cb.JC=function(n,F,O,I,x,r){var _=cb.nd,d=cb.Vo;if(_==null){cb.nd=_=V.w("canvas","");
cb.Vo=d=_.getContext("2d")}if(r==null)r=I;if(_.width!=r||_.height!=x){_.width=r;_.height=x}else d.clearRect(0,0,r,x);
d.fillStyle="#000000";d.font=Math.floor(10*V.Z())+"px sans-serif";var w=n.Brsh.v.Dmtr.v.val,Z=""+w,P=d.measureText(Z);
d.fillText(Z,(I-P.width)/2,x-2);var C=I,W=x-10*V.Z(),v=Math.min(C,W),L=n.Brsh.v.classID;if(L=="computedBrush"){d.translate(C/2,W/2);
d.rotate(-n.Brsh.v.Angl.v.val*Math.PI/180);d.scale(1,.1+.9*n.Brsh.v.Rndn.v.val/100);var H=Math.min(.95*v/2,w/2)+.5,y=.9*n.Brsh.v.Hrdn.v.val/100,g=d.createRadialGradient(0,0,0,0,0,H);
g.addColorStop(y,"rgba(0,0,0,1)");g.addColorStop((.5+y)/1.5,"rgba(0,0,0,.5)");g.addColorStop(1,"rgba(0,0,0,0)");
d.fillStyle=g;d.fillRect(-H,-H,2*H,2*H);d.setTransform(1,0,0,1,0,0)}else if(L=="sampledBrush"){var Q,j=0;
for(var e=0;e<F.length;e++)if(F[e].id==n.Brsh.v.sampledData.v)Q=F[e];var J=Q.a2p;if(J==null){J=Q.a2p=[Q.channel,Q.j];
q.Sc(J)}var A=Q.channel,p=Q.j.d,U=Q.j.v;while((p>C||U>W)&&J[j+2]){j+=2;A=J[j];p=J[j+1].d;U=J[j+1].v}if(p*U!=0){var b=q.f(p*U*4);
q.GF(A,b,3);var s=new ImageData(new Uint8ClampedArray(b.buffer),p,U);d.putImageData(s,Math.round((C-p)/2),Math.round((W-U)/2))}}else{}return _.toDataURL()};
cb.UD=function(n,F,O,I){if(O==0)O=1;var x=n.Brsh.v,r=x.Dmtr.v.val,_=x.Dmtr.v.val=Math.min(I!=null?Math.round(I*2.6):3e3,r*O),d=x.Hrdn?x.Hrdn.v.val/100:1,w=I!=null?I:Math.round(_*(1+.55*(1-d)))+4,C;
w=Math.max(15,Math.min(w,3e3));var Z=new gv(0,0,w,w),P=new cb(n,F,null,{c1:1},16711712,0,Z);x.Dmtr.v.val=r;
P.moveTo(Z.d/2,Z.v/2);var W=P.El(),v=P.nJ();if(Z.Qq(v))C=W;else{C=q.f(Z.X()*4);q.nF(W,v,C,Z)}return[C,Z,_]};
cb.xn=function(n,F,O,I){var x=cb.UD(n,F,O),r=x[0].slice(0),_=x[1],d=x[2],w=_.X(),Z=q.f(w);q.xg(r,Z,3);
var P=q.f(w);q.N.aeJ(Z,P,_);if(d<3||q.gZ(P,0)||I&&d>12){var C=_.d,W=C>>>1,v=P,L=255;for(var e=0;e<4;
e++){v[C*(W-6+e)+W]=L;v[C*W+W-6+e]=L;v[C*W+W+6-e]=L;v[C*(W+6-e)+W]=L}}var H=[1,2,1,2,8,2,1,2,1];H=q.aF.Wl(H);
q.aF.G6(P,Z,_.d,_.v,H);q.IW(r,4294967295);q.GF(Z,r,3);for(var e=0;e<w;e++)if(P[e]==255){r[e<<2]=r[(e<<2)+1]=r[(e<<2)+2]=0;
r[(e<<2)+3]=255}return{Qb:r,j:_,hC:new aE(_.d/2,_.v/2)}};cb.GD="0";cb.dz="1";cb.iZ="2";cb.$Q="3";var cJ={};
cJ.nd=document.createElement("canvas");cJ.Vo=cJ.nd.getContext("2d");cJ.mH=function(n,F){var O=n.QW(),d;
if(O.x==Infinity||O.D2())return{zc:q.f(0),j:new gv,Qa:new gv};var I=n.QW(),x=cJ.qA(n,F),r=q.z.Wk(x.H);
if(r.D2())return{zc:q.f(0),j:new gv,Qa:new gv};var _=q.A2(r.d,r.v);_.translate(-r.x,-r.y);cJ.aaq(x,_);
if(n.Bw.length!=0){var w=bt.JH(F),Z=_.getImageData(0,0,r.d,r.v);d=new Uint8Array(Z.data.buffer);if(w==0)for(var e=0;
e<d.length;e+=4)d[e+3]=d[e+3]>80?255:0;if(w==3)for(var e=0;e<d.length;e+=4)d[e+3]=Math.min(255,d[e+3]*1.5)}else d=q.f(r.X()*4);
_.resetTransform();_.beginPath();return{zc:d,j:r,Qa:I}};cJ.qA=function(n,F){var O={s:[],H:[]},I=F.m,x=bt.JH(F),r=Math.max(I.O*I.O,I.Pr*I.Pr)<1e-9?I:null;
if(x==3||x==4)r=null;cJ.amQ(n,O,r);if(!q.qF.x9(F.Gp)){var _=q.z.gh(O.H);O=q.z.xk(O);O=q.z.iC(O,Math.min(_.d,_.v)/8);
var d=bt.nJ(F,n),w=q.qF.Bo(F.Gp,d);q.uY.m(w,O.H,d)}q.z.m(O.H,I,O.H);return O};cJ.aaq=function(n,F){Typr.U.pathToContext({crds:n.H,cmds:n.s},F)};
cJ.Xk=function(n,F){if(!h2.EZ())return;var O=n.Vb,I=O.ResourceDict.FontSet,x=O.ResourceDict.StyleSheetSet[0].StyleSheetData,r=O.EngineDict.StyleRun.RunLengthArray,_=O.EngineDict.StyleRun.RunArray,d=bt.fQ(O),w=!0,Z={},P=0;
for(var e=0;e<_.length;e++){var C=_[e].StyleSheet.StyleSheetData.Font;if(C==null)C=x.Font;for(var W=0;
W<r[e];W++){var v=d.charCodeAt(P+W),L=C+","+(v>128?v:-1);if(Z[L]==null){Z[L]=1;if(F.rs(I[C].Name,v)==null)w=!1}}P+=r[e]}return w};
cJ.amQ=function(n,F,O){var I=new cD;for(var e=0;e<n.jp.length;e++)cJ.amS(n.Bw,n.jp[e],F,I,O)};cJ.amS=function(n,F,O,I,x){I.translate(F.bp.x,F.bp.y);
for(var e=0;e<F.Oc.length;e++){var r={},_=F.Oc[e];if(!_.FV)break;var d=I.clone();d.translate(_.bp.x,_.bp.y);
if(x){var w=x.i9+d.i9*x.oQ;d.i9=(Math.round(w)-x.i9)/x.oQ}for(var Z=_.start;Z<_.end;Z++)cJ.a79(n,F.ga[Z],F,r,O,d)}I.translate(-F.bp.x,-F.bp.y)};
cJ.agZ="()<>[]{}\xAB\xBB\u0F3A\u0F3B\u0F3C\u0F3D\u169B\u169C\u2039\u203A\u2045\u2046\u207D\u207E\u208D\u208E\u2208\u2209\u220A\u220B\u220C\u220D\u2215\u223C\u223D\u2243\u2252\u2253\u2254\u2255\u2264\u2265\u2266\u2267\u2268\u2269\u226A\u226B\u226E\u226F\u2270\u2271\u2272\u2273\u2274\u2275\u2276\u2277\u2278\u2279\u227A\u227B\u227C\u227D\u227E\u227F\u2280\u2281\u2282\u2283\u2284\u2285\u2286\u2287\u2288\u2289\u228A\u228B\u228F\u2290\u2291\u2292\u2298\u22A2\u22A3\u22A6\u22A8\u22A9\u22AB\u22B0\u22B1\u22B2\u22B3\u22B4\u22B5\u22B6\u22B7\u22C9\u22CA\u22CB\u22CC\u22CD\u22D0\u22D1\u22D6\u22D7\u22D8\u22D9\u22DA\u22DB\u22DC\u22DD\u22DE\u22DF\u22E0\u22E1\u22E2\u22E3\u22E4\u22E5\u22E6\u22E7\u22E8\u22E9\u22EA\u22EB\u22EC\u22ED\u22F0\u22F1\u22F2\u22F3\u22F4\u22F6\u22F7\u22FA\u22FB\u22FC\u22FD\u22FE\u2308\u2309\u230A\u230B\u2329\u232A\u2768\u2769\u276A\u276B\u276C\u276D\u276E\u276F\u2770\u2771\u2772\u2773\u2774\u2775\u27C3\u27C4\u27C5\u27C6\u27C8\u27C9\u27CB\u27CD\u27D5\u27D6\u27DD\u27DE\u27E2\u27E3\u27E4\u27E5\u27E6\u27E7\u27E8\u27E9\u27EA\u27EB\u27EC\u27ED\u27EE\u27EF\u2983\u2984\u2985\u2986\u2987\u2988\u2989\u298A\u298B\u298C\u298D\u298E\u298F\u2990\u2991\u2992\u2993\u2994\u2995\u2996\u2997\u2998\u29B8\u29C0\u29C1\u29C4\u29C5\u29CF\u29D0\u29D1\u29D2\u29D4\u29D5\u29D8\u29D9\u29DA\u29DB\u29F5\u29F8\u29F9\u29FC\u29FD\u2A2B\u2A2C\u2A2D\u2A2E\u2A34\u2A35\u2A3C\u2A3D\u2A64\u2A65\u2A79\u2A7A\u2A7D\u2A7E\u2A7F\u2A80\u2A81\u2A82\u2A83\u2A84\u2A8B\u2A8C\u2A91\u2A92\u2A93\u2A94\u2A95\u2A96\u2A97\u2A98\u2A99\u2A9A\u2A9B\u2A9C\u2AA1\u2AA2\u2AA6\u2AA7\u2AA8\u2AA9\u2AAA\u2AAB\u2AAC\u2AAD\u2AAF\u2AB0\u2AB3\u2AB4\u2ABB\u2ABC\u2ABD\u2ABE\u2ABF\u2AC0\u2AC1\u2AC2\u2AC3\u2AC4\u2AC5\u2AC6\u2ACD\u2ACE\u2ACF\u2AD0\u2AD1\u2AD2\u2AD3\u2AD4\u2AD5\u2AD6\u2ADE\u2AE3\u2AE4\u2AE5\u2AEC\u2AED\u2AF7\u2AF8\u2AF9\u2AFA\u2E02\u2E03\u2E04\u2E05\u2E09\u2E0A\u2E0C\u2E0D\u2E1C\u2E1D\u2E20\u2E21\u2E22\u2E23\u2E24\u2E25\u2E26\u2E27\u2E28\u2E29\u3008\u3009\u300A\u300B\u300C\u300D\u300E\u300F\u3010\u3011\u3014\u3015\u3016\u3017\u3018\u3019\u301A\u301B\uFE59\uFE5A\uFE5B\uFE5C\uFE5D\uFE5E\uFE64\uFE65\uFF08\uFF09\uFF1C\uFF1E\uFF3B\uFF3D\uFF5B\uFF5D\uFF5F\uFF60\uFF62\uFF63";
cJ.a79=function(n,F,O,I,x,r){r.translate(F.bp.x,F.bp.y);for(var _=F.IZ;_<=F.gF;_++){var d=O.lU[_],w=d.j.d,Z=n[O.adX+d.Dz];
if(Z.gM=="\n")continue;var P=Z.u9.FontSize/Z.yP.head.unitsPerEm,C=bt.S_(Z.u9),W=(Math.round(C.Q)<<16)+(Math.round(C.l)<<8)+Math.round(C.O);
x.s.push("#"+q.c7(W));var v=r.clone();v.translate(d.bp.x+d.jq*P,d.bp.y-d.FU*P);var L=new cD;L.scale(P,-P);
if(Z.vG==1&&cJ.agZ.indexOf(Z.gM)!=-1)L.concat(new cD(-1,0,0,1,w,0));if(Z.u9.FauxItalic)L.concat(new cD(1,0,-Math.tan(.18),1,0,0));
L.translate(0,Z.Lp);L.scale(Z.scale.x,Z.scale.y);if(Z.u9.BaselineShift!=null)L.translate(0,-Z.u9.BaselineShift);
if(d.VH!=0){L.rotate(-d.VH)}L.concat(v);if(d.path.s.length!=0&&Z.gM!="\t"){if(Z.u9.FauxBold){var H=Z.u9.FontSize/2048*27*Z.scale.x;
L.hb+=H;q.z.concat(x,d.path,L);L.hb-=H+H;q.z.concat(x,d.path,L)}else q.z.concat(x,d.path,L)}if(Z.gM!="\n"){if(Z.u9.Underline){if(I.rj==null)I.rj=Z.yP.post.underlineThickness;
if(I.afy==null)I.afy=Z.yP.post.underlinePosition;var y=0,g=I.afy-I.rj/2,Q=d.Ux*1.05,J=-I.rj;q.z.concat(x,{s:["M","L","L","L","Z"],H:[y,g,y+Q,g,y+Q,g+J,y,g+J]},L)}if(Z.u9.Strikethrough){var A=Z.yP["OS/2"].yStrikeoutSize,p=Z.yP["OS/2"].yStrikeoutPosition,y=0,g=p+A/2,Q=d.Ux*1.05,J=-A;
q.z.concat(x,{s:["M","L","L","L","Z"],H:[y,g,y+Q,g,y+Q,g+J,y,g+J]},L)}}x.s.push("X")}r.translate(-F.bp.x,-F.bp.y)};
function h2(n,F){var O=bt.oB(n),I,x,r=bt.Kp(n),w;if(n.Curve)x=h2.Rc(n.Curve);if(O!=0){I=new gv(r[0],r[1],r[2],r[3]);
if(O==2){I.d=x[5]-x[4];I.v=9999}}this.jp=[];this.Bw=[];this.j5=O;var _=this.adA=bt.fQ(n),d=-1;for(var e=0;
e<_.length;e++){var Z=w,P=bt.UN(n,e);if(P!=d){d=P;Z=w=bt.a6p(n,e)}var C={gM:_.charAt(e),u9:Z,yP:null,Sv:-1,Lp:0,scale:new aE(0,0),tR:0,lineHeight:0,vG:0},W=n.ResourceDict.FontSet[Z.Font].Name,v=C.yP=F.rs(W,_.charCodeAt(e));
C.scale.x=Z.HorizontalScale==null?1:Z.HorizontalScale;C.scale.y=Z.VerticalScale==null?1:Z.VerticalScale;
var L=v["OS/2"],H=v.hhea;if(Z.FontCaps==1&&C.gM!=C.gM.toUpperCase()){var y=L.sxHeight?L.sxHeight/L.sTypoAscender:.76;
C.scale.x*=y;C.scale.y*=y}var g=1/v.head.unitsPerEm*Z.FontSize;if(Z.FontBaseline==1){var y=n.ResourceDict.SuperscriptSize;
C.scale.x*=y;C.scale.y*=y;C.Lp-=n.ResourceDict.SuperscriptPosition*Z.FontSize}if(Z.FontBaseline==2){var y=n.ResourceDict.SubscriptSize;
C.scale.x*=y;C.scale.y*=y;C.Lp+=n.ResourceDict.SubscriptPosition*Z.FontSize}C.tR=h2.tR(v,W,Z);C.lineHeight=Z.FontSize*1.2;
if(Z.AutoLeading==!1)C.lineHeight=Z.Leading;if(C.lineHeight==0)C.lineHeight=.01;this.Bw.push(C)}var Q=this.jp,J=[0];
for(var e=0;e<n.EngineDict.ParagraphRun.RunLengthArray.length;e++){var A=new h2.uX(n,F,this.Bw,e,I,J,O==1?x:null);
Q.push(A)}if(O==2){var p=n.Curve.Points,U=x[0],j=x[1],b=x[2],s=x[3],G=x[4],T=x[5];for(var e=0;e<Q.length;
e++)for(var z=0;z<Q[e].Oc.length;z++)if(!(e==0&&z==0))Q[e].Oc[z].FV=!1;var A=Q[0],m=A.Oc[0];A.bp.mT(0,0);
m.bp.mT(0,0);for(var z=m.start;z<m.end;z++){var $=A.ga[z],o=$.bp.x;$.bp.x=0;for(var h=$.IZ;h<=$.gF;h++){var X=A.lU[h],D=X.j.d/2;
X.bp.x+=o;var f=h2.aaY(U,(G+X.bp.x+D)%s);X.bp.x=f[0]-D*f[2];X.bp.y=f[1]-D*f[3];X.VH=Math.atan2(f[3],f[2])}}}}h2.tR=function(n,F,O){var I=n["OS/2"],x=n.hhea,r=0,r=0,_=[];
_.push(I&&I.sxHeight&&F.toLowerCase().indexOf("capitals")!=-1?I.sxHeight:0);_.push(I&&I.sCapHeight?I.sCapHeight:0);
_.push(I&&I.sTypoAscender?I.sTypoAscender:0);_.push(x.ascender?x.ascender:0);for(var d=0;d<_.length;
d++)if(_[d]!=0){r=_[d];break}var w=1/n.head.unitsPerEm*O.FontSize;r=r*w;if(r<O.FontSize*.6)r=O.FontSize*.75;
return r};h2.prototype.aiS=function(){return!this.Zr(0)};h2.prototype.a7z=function(){return this.Zr(1)};
h2.prototype.Zr=function(n){var F=this.jp,O=!0,I=0;for(var e=0;e<F.length;e++){var x=F[e].Oc,r=x.length;
I+=r;for(var _=0;_<r;_++)O&=x[_].FV}return[O,I][n]};h2.Rc=function(n){var F=n.Points,O=F.length,I=O>>>3,x=n.TextOnPathTRange,r=n.Reversed,P=0,C=0;
if(r){var _=F.slice(0);for(var e=0;e<O;e+=2){_[e]=F[O-2-e];_[e+1]=F[O-1-e]}F=_;x=[I-x[1]%I,I-x[0]%I]}var d=[],w=[0],Z=[0];
for(var e=0;e<O;e+=8){var W=F[e+6]-F[e+0],v=F[e+7]-F[e+1],L=Math.round(4*Math.sqrt(W*W+v*v));for(var H=0;
H<L;H++){var y=H/L,g=1-y,Q=g*g*g*F[e+0]+3*g*g*y*F[e+2]+3*g*y*y*F[e+4]+y*y*y*F[e+6],J=g*g*g*F[e+1]+3*g*g*y*F[e+3]+3*g*y*y*F[e+5]+y*y*y*F[e+7];
d.push(Q,J);if(e+H!=0){var W=Q-P,v=J-C;Z.push(Z[Z.length-1]+Math.sqrt(W*W+v*v));w.push((e>>>3)+y)}P=Q;
C=J}}var A=Z.length,p=Z[A-1],U=h2.Ml(x[0],w),j=h2.Ml(x[1]%I,w),b=Z[U%A],s=Z[j%A];if(b>=s)s+=p;return[d,w,Z,p,b,s]};
h2.Ml=function(n,F){var e=0;while(F[e]<n)e++;return e};h2.aaY=function(n,F){var O=0,e=0,I,x,r;while(O<F){I=n[e+2]-n[e];
x=n[e+3]-n[e+1];r=Math.sqrt(I*I+x*x);O+=r;e+=2}return[n[e],n[e+1],I/r,x/r]};h2.prototype.akp=function(n){return this.Bw[n]};
h2.prototype.abk=function(n){for(var F=0;F<this.jp.length;F++){var O=this.jp[F];for(var I=0;I<O.Oc.length;
I++){var x=O.Oc[I],r=O.ga[x.start].start,_=O.ga[x.end-1].end;if(r<n&&n<_)return[r,_-1]}}return[0,1]};
h2.prototype.tP=function(n,F){var O=-1,I=this.jp;if(this.j5==2){var x=1e9,r=0,_=I[0],d=_.Oc[0];for(var w=d.start;
w<d.end;w++){var Z=_.ga[w];for(var P=Z.IZ;P<=Z.gF;P++){var C=_.lU[P],W=C.j.d,v=n.x-C.bp.x,L=n.y-C.bp.y,H=v*v+L*L;
if(H<x){x=H;r=C.Dz}}}if(r!=0&&this.adA.codePointAt(r-1)>65535)r--;return r}for(var y=0;y<I.length;y++){var _=I[y];
for(var g=0;g<_.Oc.length;g++){O++;var d=_.Oc[g],Q=_.Oc[g+1];if(Q==null&&y<I.length-1)Q=I[y+1].Oc[0];
if(F!=null){if(O!=F)continue}else{if(Q!=null&&_.bp.y+d.bp.y<n.y)continue}for(var w=d.start;w<d.end;w++){var Z=_.ga[w];
for(var P=Z.IZ;P<=Z.gF;P++){var C=_.lU[P],W=C.j.d,J=_.bp.x+d.bp.x+Z.bp.x,A=J+C.bp.x,p=J+(P<Z.gF?_.lU[P+1].bp.x:C.bp.x+W);
if(n.x<=p||w+1==d.end&&P==Z.gF){var U=_.adX+C.Dz,j=this.Bw[U],b=j.vG&1;if(j.gM!="\n"&&(b==0&&n.x>A+W/2||b==1&&n.x<A+W/2))U+=this.adA.codePointAt(U)>65535?2:1;
return U}}}}}};h2.prototype.Y7=function(n){var F={j:new gv,Re:0},O=0;for(var I=0;I<this.jp.length;I++){var x=this.jp[I];
for(var r=0;r<x.Oc.length;r++){var _=x.Oc[r];F.Re=O;O++;for(var d=_.start;d<_.end;d++){var w=x.ga[d];
for(var Z=w.start;Z<w.end;Z++){if(Z==n){var P=this.Bw[Z],C=P.Sv,W=x.lU[C].Dz,v=1;while(x.lU[C]!=null&&x.lU[C].Dz==W){var L=x.lU[C],H=x.bp.x+_.bp.x+w.bp.x+L.bp.x,y=x.bp.y+_.bp.y+w.bp.y+L.bp.y;
F.j=F.j.Tq(new gv(H,y-P.lineHeight,L.j.d,P.lineHeight));F.VH=L.VH;C+=v}return F}}}}}};h2.prototype.QW=function(){var n=Infinity,F=Infinity,O=-Infinity,I=-Infinity;
for(var e=0;e<this.jp.length;e++){var x=this.jp[e];for(var r=0;r<x.Oc.length;r++){var _=x.Oc[r];if(!_.FV)break;
for(var d=_.start;d<_.end;d++){var w=x.ga[d];for(var Z=w.IZ;Z<=w.gF;Z++){var P=x.lU[Z],C=P.j,W=x.bp.x+_.bp.x+w.bp.x+P.bp.x,v=x.bp.y+_.bp.y+w.bp.y+P.bp.y;
n=Math.min(n,W+C.x);F=Math.min(F,v+C.y);O=Math.max(O,W+C.x+C.d);I=Math.max(I,v+C.y+C.v)}}}}return new gv(n,F,O-n,I-F)};
h2.Wq=function(n){return 19968<=n&&n<=40959||12288<=n&&n<=12543};h2.a3v=function(n,F,O,I,x,r,_){var d=[r],w=0;
for(var e=r;e<_;e++){if(O[e]==null)console.log(e,r,_,O);var Z=O[e].gM,P=Z.charCodeAt(0);if(P==32||P==9){d.push(w,e,1,e+1);
w=0}else if(P==3851){d.push(w+1,e+1);w=0}else if(h2.Wq(P)){d.push(w,e);w=1}else if(e!=r&&O[e].vG!=O[e-1].vG){d.push(w,e);
w=1}else w++}d.push(w);var C=[];for(var e=0;e<d.length;e+=2){var W=d[e],v=d[e+1];if(v==0)continue;C.push(new h2.a5c(n,F,O,I,x,W,v))}return C};
h2.a6M=function(n,F,O,I,x,r,_){var d=[0,F?F.d:1e9],w=[];if(I){var Z=n[r].tR,P=x+(x==0?Z:n[r].lineHeight),C=P-Z*.9,W=q.z.wL(I[0],C),v=W.length,L=q.z.wL(I[0],P),H=L.length;
if(v!=0&&H!=0){var y=0,g=0;d=[];while(y<v&&g<H){var Q=Math.max(W[y],L[g]),J=W[y+1],A=L[g+1],p=Math.min(J,A);
if(Q<p)d.push(Q,p);if(J<A)y+=2;else g+=2}}}for(var U=0;U<d.length;U+=2){var j=d[U+1]-d[U],b=0,s=r,G=F?j-O.StartIndent-O.EndIndent-(r==0?O.FirstLineIndent:0):Infinity;
while(r!=n.length){var T=n[r],z=b==0||(T.ih||T.Ez)||b+T.j.d<G;if(!z)break;b+=T.j.d;r++}w.push(r-s)}_[0]=w;
_[1]=d;_[2]=r};h2.a3u=function(n,F){var O=n.length,I=new Uint32Array(O),x=new Uint8Array(O),r=0;for(var e=0;
e<O;e++){x[e]=0;var _=n.charCodeAt(e);I[e]=_;if(_>r)r=_}if(r>1424)x=h2.a2n(I,F);return x};h2.uX=function(n,F,O,I,x,r,_){this.ga=[];
this.Oc=[];this.bp=new aE(0,0);this.lU=null;this.ga=null;this.u9=bt.aiB(n,I);var d=this.u9,C=0,L="",J=0,A=1,i=0;
if(I!=0){var w=d.SpaceBefore;if(w!=null)r[0]+=w}var Z=n.EngineDict.ParagraphRun.RunLengthArray,P=Z[I];
for(var e=0;e<I;e++)C+=Z[e];var W=d._Direction?d._Direction:0;this.adX=C;var v=bt.fQ(n).slice(C,C+P);
for(var H=0;H<v.length;H++){var y=v.charAt(H);L+=O[C+H].u9.FontCaps==0?y:y.toUpperCase()}v=L;var g=h2.a3u(v,W),Q=[],p=g[e]&1,U=O[C].yP;
O[C].vG=g[0];for(var e=1;e<v.length;e++){var y=O[C+e],j=g[e];y.vG=j;if(j!=p||y.yP!=U){Q.push(J,A);J=e;
A=1;p=j;U=y.yP}else A++}Q.push(J,A);var b=this.lU=[];for(var e=0;e<Q.length;e+=2){var s=Q[e],G=Q[e+1],T=(O[C+s].vG&1)==0,z=v.slice(s,s+G),m=Typr.U.shapeHB(O[C+s].yP,z,T),$=[],X=0;
for(var H=0;H<m.length;H++){var o=m[H];$.push({l:o.g,Dz:o.cl,Ux:o.ax,fw:o.ay,jq:o.dx,FU:o.dy})}m=$;var h=m.slice(0);
if(!T)h.reverse();for(var H=0;H<z.length;H++){while(X+1<h.length&&h[X+1].Dz<=H){X++}while(X>0&&h[X-1].Dz==H)X--;
O[C+s+H].Sv=b.length+(T?X:h.length-X-1)}for(var H=0;H<m.length;H++){b.push(m[H]);m[H].Dz+=s;var y=O[C+m[H].Dz];
if(y.gM=="\n")m[H].Ux=0;if(y.gM=="\t")m[H].Ux=y.yP.head.unitsPerEm*2}}var D=bt.H2(d),f=this.ga=h2.a3v(n,F,O,C,b,C,C+P),R=this.Oc,N=-1,L=[null,null,0];
while(i<f.length){h2.a6M(f,x,d,_,r[0],i,L);N++;var M={start:i,end:0,j:new gv,bp:new aE(0,0),FV:!0},c2=0,gg=0;
R.push(M);M.end=L[2];var hK=M.end==f.length;function bD(h,s,gP){var dT=gP-s>>>1;for(var e=0;e<dT;e++){var fU=h[s+e];
h[s+e]=h[gP-1-e];h[gP-1-e]=fU}}for(var co=1;co<5;co++){var iM=-1;for(var e=M.start;e<M.end;e++){var j=O[f[e].start].vG;
if(iM==-1&&j>=co)iM=e;else if(iM!=-1&&j<co){bD(f,iM,e);iM=-1}}var hs=M.end;if(W==0&&f[hs-1].ih)hs--;
if(iM!=-1)bD(f,iM,hs)}var S=L[0],a=L[1],iM=i,bV=i;for(var a5=0;a5<S.length;a5++){var i9=a[a5*2+1]-a[a5*2],dG=0;
iM=bV;bV+=S[a5];var ap=this.a1B(iM,bV,f,W,x!=null);if(x){if(D==1||hK&&D==4)dG=ap[1]+(i9-ap[0]);if(D==2||hK&&D==5)dG=ap[1]+(i9-ap[0])/2;
if(N==0)dG+=d.FirstLineIndent;dG+=d.StartIndent}else{if(D==0)dG=d.StartIndent+d.FirstLineIndent;if(D==1)dG=-ap[0]-d.EndIndent;
if(D==2)dG=-ap[0]/2}dG+=a[a5*2];if(x&&D>2&&(D==6||!hK))this.a7W(iM,bV,f,i9,W,dG);else{var bk=dG;for(var e=iM;
e<bV;e++){f[e].bp.x=bk;bk+=f[e].j.d}}}i=M.end;for(var e=M.start;e<M.end;e++){var bH=f[e].j.clone();bH.P1(f[e].bp);
M.j=M.j.Tq(bH);c2=Math.max(c2,f[e].tR);gg=Math.max(gg,f[e].lineHeight)}M.bp.y=N==0?0:R[N-1].bp.y+gg;
if(N==0){if(I==0&&x)r[0]+=c2;if(I!=0)r[0]+=gg;this.bp.y=r[0]}else r[0]+=gg;if(x)M.FV=this.bp.y+M.bp.y<x.y+x.v}var gw=d.SpaceAfter;
if(gw!=null)r[0]+=gw};h2.uX.prototype.a1B=function(n,F,O,I,x){var r=0,_=0;for(var e=n;e<F;e++)r+=O[e].j.d;
if(x){if(I==0)for(var e=F-1;e>=n;e--)if(O[e].ih||O[e].Ez)r-=O[e].j.d;else break;if(I==1)for(var e=n;
e<F;e++)if(O[e].ih||O[e].Ez){var d=O[e].j.d;r-=d;_-=d}else break}return[r,_]};h2.uX.prototype.a7W=function(n,F,O,I,x,r){var _=0,d=0,w=0,Z=0;
for(var e=n;e<F;e++)if(O[e].ih)w++;else{_+=O[e].j.d;d++}if(x==0)for(var e=F-1;e>=n;e--)if(O[e].ih||O[e].Ez){if(O[e].ih){w--}}else break;
if(x==1)for(var e=n;e<F;e++)if(O[e].ih||O[e].Ez){if(O[e].ih){w--;Z++}}else break;if(d<=1||w==0){if(d==1)O[n].bp.x=r;
return}var P=(I-_)/w,C=-Z*P;for(var e=n;e<F;e++){if(O[e].ih)this.lU[O[e].IZ].j.d=O[e].j.d=P;O[e].bp.x=r+C;
C+=O[e].j.d}};h2.a5c=function(n,F,O,I,x,r,_){this.G4="";for(var e=0;e<_;e++)this.G4+=O[r+e].gM;this.ih=_==1&&(O[r].gM==" "||O[r].gM=="\t");
this.Ez=_==1&&O[r].gM=="\n";this.start=r;this.end=r+_;this.j=new gv;this.bp=new aE(0,0);this.tR=0;this.lineHeight=0;
var d=0,w=0;if(_==0){this.lineHeight=O[r].lineHeight;this.tR=O[r].tR;this.j=new gv(0,-O[r].lineHeight,0,O[r].lineHeight)}var Z=O[r].Sv,P=O[r+_-1].Sv;
if(P<Z){var C=Z;Z=P;P=C}while(P+1<x.length&&x[P].Dz==x[P+1].Dz){P++}this.IZ=Z;this.gF=P;for(var W=Z;
W<=P;W++){var v=x[W],L=O[I+v.Dz],H=1/L.yP.head.unitsPerEm*L.u9.FontSize,J=0;if(!L.u9.AutoKerning)d+=L.u9.Kerning*2*H*L.scale.x;
var y=v.Ux*H*L.scale.x;v.bp=new aE(d,0);v.VH=0;v.j=new gv(0,-L.lineHeight,y,L.lineHeight);var g=Typr.U.glyphToPath(L.yP,v.l);
v.path={s:g.cmds,H:g.crds};var Q=v.j.clone();Q.P1(v.bp);if(L.u9.Tracking!=null)J=L.u9.Tracking*.001*L.u9.FontSize;
if(L.u9.FauxBold==!0)J+=.027*L.u9.FontSize;d+=y+J;if(_==1&&(L.gM==" "||L.gM=="\t"))Q.d+=2*J;else if(_==1&&L.gM!=null&&h2.Wq(L.gM.charCodeAt(0)))Q.d+=J;
this.j=this.j.Tq(Q);this.tR=Math.max(this.tR,L.tR);this.lineHeight=Math.max(this.lineHeight,L.lineHeight)}};
h2.v7=0;h2.EZ=function(){if(h2.v7==2)return!0;if(h2.v7==1)return!1;h2.v7=1;function n(){fetch("code/external/fribidi.wasm").then(function(F){return F.arrayBuffer()}).then(function(F){return WebAssembly.instantiate(F)}).then(function(F){var O=F.instance.exports,I=O.memory,x=16,r=256,_=1,d=x|r,w=x|r|_;
h2.a2n=function(P,C){var W=P.length,v=W*4+4+W*4+W*4+W;fx.IT(O,v+W);var L=new Uint8Array(I.buffer),H=new Uint32Array(I.buffer),y=O.calloc(v,1),g=y+W*4,Q=g+4,J=Q+W*4,A=J+W*4;
H.set(P,y>>>2);H[g>>>2]=C==0?d:w;O.fribidi_get_bidi_types(y,W,Q);O.fribidi_get_bracket_types(y,W,Q,J);
O.fribidi_get_par_embedding_levels_ex(Q,J,W,g,A);var p=L.slice(A,A+W);O.free(y);return p};h2.v7=2;var Z=new k(V.E.P,!0);
Z.data={e:V.U.g7,ve:"add",b9:cf.hx,pb:null};da.J7.A(Z)})}Typr.U.initHB("code/external/hb.wasm",n);return!1};
function bt(){}bt.hw=function(n){return JSON.parse(JSON.stringify(n))};bt.hy=function(n,F){for(var O in F)n[O]=F[O]};
bt.Cc=function(n,F,O){var I=bt.qN();if(O)bt.F$(I,0,0,O);var x={m:new cD(1,0,0,1,Math.round(n),Math.round(F)),Vb:I};
x.$z=bt.EF();x.Gp=q.qF.f();x.Qa=new gv;return x};bt.aH=function(n){var F=["CharacterDirection",0];for(var e=0;
e<F.length;e+=2){if(n[F[e]]!=null&&n[F[e]]!=F[e+1]){throw"e";console.log(F[e],n[F[e]])}}if(n instanceof Array)for(var e=0;
e<n.length;e++)bt.aH(n[e]);else if(n instanceof Object)for(var O in n)bt.aH(n[O])};bt.H2=function(n,F){if(F==null)F=n.Justification;
var O=n._Direction?n._Direction:0;if(O==1){if(F==0||F==3)F++;else if(F==1||F==4)F--}return F};bt.FE=function(n){if(n.add==null)return;
var F=n.Vb,O=F.Curve,I=n.add.vmsk,x=I.b,r=q.z.qg(x,!0).H,_=n.m.clone();_.uZ();q.z.m(r,_,r);var d=r.slice(0,8);
for(var w=8;w<r.length;w+=6)d.push(r[w-2],r[w-1],r[w],r[w+1],r[w+2],r[w+3],r[w+4],r[w+5]);O.Points=d;
O.TextOnPathTRange=I.AZ.slice(0);O.Reversed=I.Ay;if(bt.oB(F)==1){var O=h2.Rc(F.Curve),Z=q.z.gh(O[0]);
bt.Ar(F,[0,0,Z.d,Z.v].map(Math.round));for(var e=0;e<d.length;e+=2){d[e]-=Z.x;d[e+1]-=Z.y}var P=new cD(1,0,0,1,Z.x,Z.y);
P.concat(n.m);n.m=P}};bt.Sg=function(n){if(n.add==null)return;var F=n.add.vmsk,O=n.Vb.Curve,I=O.Points,x={s:["M"],H:[I[0],I[1]]};
for(var e=0;e<I.length;e+=8){x.s.push("C");x.H.push(I[e+2],I[e+3],I[e+4],I[e+5],I[e+6],I[e+7])}q.z.m(x.H,n.m,x.H);
var r=q.z.rD(x,!0);F.b=r;F.Ay=O.Reversed;F.AZ=O.TextOnPathTRange.slice(0);n.add.vogk=K.XO(r)};bt.S_=function(n){var F={Q:0,l:0,O:0};
if(n.FillColor){var O=n.FillColor,I=O.Values;if(O.Type==1)F={Q:I[1]*255,l:I[2]*255,O:I[3]*255};else if(O.Type==2){var x={classID:"CMYC",Cyn:{t:"doub",v:I[1]*100},Mgnt:{t:"doub",v:I[2]*100},Ylw:{t:"doub",v:I[3]*100},Blck:{t:"doub",v:I[4]*100}};
F=q.W.S_(x)}else console.log("Unknown color type")}return F};bt.ab9=function(n){for(var e=0;e<n.length;
e++){var F=n[e].StyleSheet.StyleSheetData,O=F.FillColor;if(O&&O.Type==2){var I=bt.S_(F);O.Type=1;O.Values=[1,I.Q/255,I.l/255,I.O/255]}}};
bt.nJ=function(n,F){var O;if(bt.oB(n.Vb)==1){var I=bt.Kp(n.Vb);O=new gv(0,0,I[2]-I[0],I[3]-I[1])}else O=F.QW();
return O};bt.NM=function(n){var F=n[0];for(var e=0;e<n.length;e++)F=bt.af9(F,n[e]);return F};bt.af9=function(n,F){var O={};
for(var I in n)if(JSON.stringify(n[I])==JSON.stringify(F[I]))O[I]=n[I];return O};bt.Zu=function(n,F){var O=n.D0,I=-1;
for(var e=0;e<O.length;e++)if(O[e].Name==F)I=e;if(I==-1){I=O.length;O.push({FontType:1,Name:F,Script:0,Synthetic:0})}n.Bw.Font=I};
bt.fQ=function(n){return n.EngineDict.Editor.Text.replace(/\r/g,"\n").replace(/\u0003/g,"\n")};bt._I=function(n,F){n.EngineDict.Editor.Text=F.replace(/\n/g,"\r")};
bt.oB=function(n){return n.Curve&&n.Curve.TextOnPathTRange[0]>=0?2:n.EngineDict.Rendered.Shapes.Children[0].ShapeType};
bt.li=function(n,F){var O=n.EngineDict.Rendered.Shapes.Children[0];O.ShapeType=F;var I=O.Cookie.Photoshop;
I.ShapeType=F;I.Base.ShapeType=F;if(F==0){delete I.BoxBounds;I.PointBase=[0,0]}if(F==1){delete I.PointBase;
I.BoxBounds=[0,0,1,1]}};bt.Kp=function(n){return n.EngineDict.Rendered.Shapes.Children[0].Cookie.Photoshop.BoxBounds};
bt.Ar=function(n,F){n.EngineDict.Rendered.Shapes.Children[0].Cookie.Photoshop.BoxBounds=F};bt.a6p=function(n,F){return bt.alH(n,bt.UN(n,F))};
bt.UN=function(n,F){var O=n.EngineDict.StyleRun.RunLengthArray;return bt.DU(O,F).aD};bt.alH=function(n,F){var O=n.ResourceDict.StyleSheetSet[0].StyleSheetData,I={};
for(var x in O)I[x]=O[x];var r=n.EngineDict.StyleRun.RunArray[F].StyleSheet.StyleSheetData;bt.hy(I,r);
return I};bt.aiB=function(n,F){var O=n.ResourceDict.ParagraphSheetSet[0].Properties,I={};for(var x in O)I[x]=O[x];
var r=n.EngineDict.ParagraphRun.RunArray[F].ParagraphSheet.Properties;bt.hy(I,r);var _=["StartIndent","EndIndent","FirstLineIndent"];
for(var e=0;e<3;e++)if(I[_[e]]==null)I[_[e]]=0;return I};bt.bw=function(n,F,O){if(O=="")return;var I=bt.fQ(n);
bt._I(n,I.substring(0,F)+O+I.substring(F,I.length));var x=n.EngineDict.StyleRun,r=x.RunLengthArray,_=bt.DU(r,F-1);
r[_.aD]+=O.length;var d=n.EngineDict.ParagraphRun,r=d.RunLengthArray,w=bt.DU(r,F),Z=O.split("\n");if(Z.length==1){r[w.aD]+=O.length;
return}r.splice(w.aD+1,0,r[w.aD]-(F-w.U1));d.RunArray.splice(w.aD+1,0,bt.hw(d.RunArray[w.aD]));r[w.aD]-=r[w.aD+1];
r[w.aD]+=Z[0].length+1;for(var e=1;e<Z.length-1;e++){d.RunArray.splice(w.aD+e,0,bt.hw(d.RunArray[w.aD+e-1]));
d.RunLengthArray.splice(w.aD+e,0,Z[e].length+1)}r[w.aD+Z.length-1]+=Z[Z.length-1].length};bt.od=function(n,F,O){var I=bt.fQ(n);
bt._I(n,I.substring(0,F)+I.substring(O,I.length));bt.W2(n.EngineDict.ParagraphRun,F,O,!0);bt.W2(n.EngineDict.StyleRun,F,O,!1)};
bt.W2=function(n,F,O,I){var x=n.RunLengthArray,r=bt.DU(x,F),_=bt.DU(x,O),d=[];for(var e=0;e<x.length;
e++)for(var w=0;w<x[e];w++)d.push(e);d.splice(F,O-F);var Z=[];for(var e=0;e<x.length;e++)Z.push(0);for(var e=0;
e<d.length;e++)Z[d[e]]++;for(var e=0;e<x.length;e++){if(Z[e]==0){Z.splice(e,1);x.splice(e,1);n.RunArray.splice(e,1);
e--}else if(Z[e]<x[e])x[e]=Z[e]}if(I&&r.aD!=_.aD&&r.U1!=F){x[r.aD]+=x[r.aD+1];x.splice(r.aD+1,1);n.RunArray.splice(r.aD+1,1)}};
bt.F$=function(n,F,O,I){var x=n.EngineDict.Editor.Text.length;if(O==x-2)O++;if(I.Bw.Font!=null)n.ResourceDict.FontSet=I.D0.slice(0);
if(F<=O)bt.Jt(n.EngineDict.StyleRun,I.Bw,F,O,!0);bt.Jt(n.EngineDict.ParagraphRun,I.jp,F,O,!1)};bt.Jt=function(n,F,O,I,x){var r=n.RunLengthArray;
if(x){var _=bt.DU(r,O);if(_.U1!=O){var d=r[_.aD];r.splice(_.aD,0,O-_.U1);r[_.aD+1]=d-r[_.aD];n.RunArray.splice(_.aD+1,0,bt.hw(n.RunArray[_.aD]))}var w=bt.DU(r,I);
if(w.U1+r[w.aD]-1!=I){var d=r[w.aD];r.splice(w.aD,0,I-w.U1+1);r[w.aD+1]=d-r[w.aD];n.RunArray.splice(w.aD+1,0,bt.hw(n.RunArray[w.aD]))}}var _=bt.DU(r,O),w=bt.DU(r,I);
if(x)for(var e=_.aD;e<=w.aD;e++)bt.hy(n.RunArray[e].StyleSheet.StyleSheetData,F);else for(var e=_.aD;
e<=w.aD;e++)bt.hy(n.RunArray[e].ParagraphSheet.Properties,F)};bt.age=function(n,F,O){var I=n.EngineDict.StyleRun.RunLengthArray,x=[],r=0;
for(var e=0;e<I.length;e++){var _=I[e];for(var d=0;d<_;d++)if(F<=r+d&&r+d<O)x.push(e);r+=_}var w=x[0],Z=[];
for(var e=0;e<x.length;e++){var P=x[e]-w;if(P==Z.length)Z.push(0);Z[P]++}return Z};bt.afv=function(n){var F=n.EngineDict.StyleRun,O=F.RunArray,I=F.RunLengthArray;
for(var e=0;e<I.length-1;e++){var x=O[e].StyleSheet.StyleSheetData,r=O[e+1].StyleSheet.StyleSheetData;
if(JSON.stringify(x)==JSON.stringify(r)){O.splice(e+1,1);I[e]+=I[e+1];I.splice(e+1,1);e--}}};bt.JH=function(n){var F=n.$z.AntA.v.Annt;
F=["Anno","antiAliasSharp","AnCr","AnSt","AnSm"].indexOf(F);if(F==-1)F=1;return F};bt.yv=function(n,F){n.$z.AntA.v.Annt=["Anno","antiAliasSharp","AnCr","AnSt","AnSm"][F]};
bt.gU=function(n,F,O){var I={D0:n.ResourceDict.FontSet.slice(0),Bw:[],jp:[]},x=n.EngineDict.StyleRun.RunLengthArray,r=bt.DU(x,F).aD,_=bt.DU(x,O).aD;
for(var e=r;e<=_;e++){var d=bt.hw(n.ResourceDict.StyleSheetSet[0].StyleSheetData),w=n.EngineDict.StyleRun.RunArray;
if(w.length==0)continue;var Z=w[e].StyleSheet.StyleSheetData;bt.hy(d,Z);I.Bw.push(d)}var P=n.EngineDict.ParagraphRun.RunLengthArray,C=bt.DU(P,F).aD,W=bt.DU(P,O).aD;
for(var e=C;e<=W;e++){var v=n.EngineDict.ParagraphRun.RunArray;if(v.length==0)continue;I.jp.push(bt.hw(v[e].ParagraphSheet.Properties))}I.Bw=I.Bw.length==0?{}:bt.NM(I.Bw);
I.jp=I.jp.length==0?{}:bt.NM(I.jp);return I};bt.aj=function(n,F){var O,I;O=["FontSize","Leading","BaselineShift"];
I=n.Bw;for(var e=0;e<O.length;e++)if(I[O[e]]!=null)I[O[e]]*=F;O=["StartIndent","EndIndent","FirstLineIndent","SpaceBefore","SpaceAfter"];
I=n.jp;for(var e=0;e<O.length;e++)if(I[O[e]]!=null)I[O[e]]*=F};bt.a4H=function(){return bt.gU(bt.Kz,0,0)};
bt.EF=function(){return{classID:"TxLr",Txt:{t:"TEXT",v:"\0"},textGridding:{t:"enum",v:{textGridding:"None"}},Ornt:{t:"enum",v:{Ornt:"Hrzn"}},AntA:{t:"enum",v:{Annt:"antiAliasSharp"}},TextIndex:{t:"long",v:0}}};
bt.DU=function(n,F){var O=0,e=0;while(O+n[e]<=F){O+=n[e];e++}return{aD:e,U1:O}};bt.qN=function(){var n=bt.hw(this.Kz);
return n};bt.n6={Justification:0,FirstLineIndent:0,StartIndent:0,EndIndent:0,SpaceBefore:0,SpaceAfter:0,AutoHyphenate:!1,HyphenatedWordSize:6,PreHyphen:2,PostHyphen:2,ConsecutiveHyphens:8,Zone:36,WordSpacing:[.8,1,1.33],LetterSpacing:[0,0,0],GlyphSpacing:[1,1,1],AutoLeading:1.2,LeadingType:0,Hanging:!1,Burasagari:!1,KinsokuOrder:0,EveryLineComposer:!1,_Direction:0};
bt.a9t={Font:0,FontSize:12,FauxBold:!1,FauxItalic:!1,AutoLeading:!0,Leading:0,HorizontalScale:1,VerticalScale:1,Tracking:0,AutoKerning:!0,Kerning:0,BaselineShift:0,FontCaps:0,FontBaseline:0,Underline:!1,Strikethrough:!1,Ligatures:!0,DLigatures:!1,BaselineDirection:2,Tsume:0,StyleRunAlignment:2,Language:0,NoBreak:!1,FillColor:{Type:1,Values:[1,0,0,0]},StrokeColor:{Type:1,Values:[1,0,0,0]},FillFlag:!0,StrokeFlag:!1,FillFirst:!0,YUnderline:1,OutlineWidth:1,CharacterDirection:0,HindiNumbers:!1,Kashida:1,DiacriticPos:2};
bt.Kz={EngineDict:{Editor:{Text:"\n"},ParagraphRun:{DefaultRunData:{ParagraphSheet:{DefaultStyleSheet:0,Properties:{}},Adjustments:{Axis:[1,0,1],XY:[0,0]}},RunArray:[{ParagraphSheet:{DefaultStyleSheet:0,Properties:JSON.parse(JSON.stringify(bt.n6))},Adjustments:{Axis:[1,0,1],XY:[0,0]}}],RunLengthArray:[1],IsJoinable:1},StyleRun:{DefaultRunData:{StyleSheet:{StyleSheetData:{}}},RunArray:[{StyleSheet:{StyleSheetData:{Font:0,FontSize:24,AutoKerning:!0,Kerning:0}}}],RunLengthArray:[1],IsJoinable:2},GridInfo:{GridIsOn:!1,ShowGrid:!1,GridSize:18,GridLeading:22,GridColor:{Type:1,Values:[0,0,0,1]},GridLeadingFillColor:{Type:1,Values:[0,0,0,1]},AlignLineHeightToGridFlags:!1},AntiAlias:4,UseFractionalGlyphWidths:!0,Rendered:{Version:1,Shapes:{WritingDirection:0,Children:[{ShapeType:0,Procession:0,Lines:{WritingDirection:0,Children:[]},Cookie:{Photoshop:{ShapeType:0,PointBase:[0,0],Base:{ShapeType:0,TransformPoint0:[1,0],TransformPoint1:[0,1],TransformPoint2:[0,0]}}}}]}}},ResourceDict:{KinsokuSet:[{Name:"PhotoshopKinsokuHard",NoStart:"\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u30FC\u2015\u2019\u201D\uFF09\u3015\uFF3D\uFF5D\u3009\u300B\u300D\u300F\u3011\u30FD\u30FE\u309D\u309E\u3005\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u309B\u309C?!)]},.:;\u2103\u2109\xA2\uFF05\u2030",NoEnd:"\u2018\u201C\uFF08\u3014\uFF3B\uFF5B\u3008\u300A\u300C\u300E\u3010([{\uFFE5\uFF04\xA3\uFF20\xA7\u3012\uFF03",Keep:"\u2015\u2025",Hanging:"\u3001\u3002.,"},{Name:"PhotoshopKinsokuSoft",NoStart:"\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u2019\u201D\uFF09\u3015\uFF3D\uFF5D\u3009\u300B\u300D\u300F\u3011\u30FD\u30FE\u309D\u309E\u3005",NoEnd:"\u2018\u201C\uFF08\u3014\uFF3B\uFF5B\u3008\u300A\u300C\u300E\u3010",Keep:"\u2015\u2025",Hanging:"\u3001\u3002.,"}],MojiKumiSet:[{InternalName:"Photoshop6MojiKumiSet1"},{InternalName:"Photoshop6MojiKumiSet2"},{InternalName:"Photoshop6MojiKumiSet3"},{InternalName:"Photoshop6MojiKumiSet4"}],TheNormalStyleSheet:0,TheNormalParagraphSheet:0,ParagraphSheetSet:[{Name:"Normal RGB",DefaultStyleSheet:0,Properties:JSON.parse(JSON.stringify(bt.n6))}],StyleSheetSet:[{Name:"Normal RGB",StyleSheetData:JSON.parse(JSON.stringify(bt.a9t))}],FontSet:[{Name:"DejaVuSans",Script:0,FontType:1,Synthetic:0},{Name:"AdobeInvisFont",Script:0,FontType:0,Synthetic:0},{Name:"MyriadHebrew-Regular",Script:6,FontType:0,Synthetic:0}],SuperscriptSize:.583,SuperscriptPosition:.333,SubscriptSize:.583,SubscriptPosition:.333,SmallCapSize:.7}};
var fZ={};fZ.aoa=function(n){var F=fZ.a7S(n._0,n._1);fZ.ajw(F,n._0);return F};fZ.a6$=function(n,F,O){var I={};
I._98={_0:"i7"};I._0=fZ.aiA(n,F,O?O._0:null);I._1=fZ.a0w(n,F,I._0,O?O._1:null);return I};fZ.aiA=function(n,F,O){var I={};
I._1=fZ.afB(n,O?O._1:null);I._2={_0:[{_0:{_0:"s"}}],_1:[{_0:"i0"}]};I._3=JSON.parse(JSON.stringify(fZ.alX));
I._4=JSON.parse(JSON.stringify(fZ.a9u));I._5=fZ.aa$(n,I._1._0,O?O._5:null);I._6=fZ.adb(n,O?O._6:null);
I._8=fZ.a9y(n,F,O?O._8:null);I._9=fZ.ad_;return I};fZ.ajw=function(n,F){fZ.a0N(n,F._5,F._1._0)};fZ.afB=function(n,F){var O=[],I=[];
for(var e=0;e<n.length;e++){var x=n[e].ResourceDict.FontSet;for(var r=0;r<x.length;r++){var _=x[r];if(I.indexOf(_.Name)!=-1)continue;
O.push(_);I.push(_.Name)}}var d={_0:[]};for(var e=0;e<O.length;e++){var w=O[e],Z={_0:{_99:"/CoolTypeFont",_0:{_0:"s"+w.Name,_1:"i"+w.Script,_2:"i"+w.FontType}}};
if(w.Script==0)delete Z._0._0._1;d._0.push(Z)}return d};fZ.aa$=function(n,F,O){var I={_0:[],_1:[]},x={_0:JSON.parse(JSON.stringify(fZ.y4))};
fZ.dY(x._0,n[0].ResourceDict.StyleSheetSet[0],F,n[0].ResourceDict.FontSet);I._0.push(x);I._1.push({_0:"i0"});
I._0.push({_0:{_0:"sNone",_5:"i0",_6:{}}});I._1.push({_0:"i1"});return I};fZ.a0N=function(n,F,O){var I=F._0[0];
for(var e=0;e<n.length;e++)fZ.yF(I._0,n[e].ResourceDict.StyleSheetSet[0],O,n[e].ResourceDict.FontSet)};
fZ.adb=function(n,F){var O={_0:[],_1:[]},I={_0:JSON.parse(JSON.stringify(fZ.cr))};fZ.Am(I._0,n[0].ResourceDict.ParagraphSheetSet[0]);
O._0.push(I);O._1.push({_0:"i0"});I={_0:JSON.parse(JSON.stringify(fZ.cr))};fZ.Am(I._0,n[0].ResourceDict.ParagraphSheetSet[0]);
I._0._0="sBasic Paragraph";I._0._6="i0";O._0.push(I);O._1.push({_0:"i1"});return O};fZ.a9y=function(n,F,O){var I={_0:[]};
for(var e=0;e<n.length;e++){var x=n[e].Curve,r={};I._0.push({_0:r});var _=bt.oB(n[e]);r._2={};r._2._0="i"+_;
if(_==0){r._2._6=["f-1","f-1"];r._2._11={_4:"i-1",_7:!1}}else if(_==1&&x==null){var d=bt.Kp(n[e]),w=d[2],Z=d[3];
r._1={_0:fZ.QL("f",[0,0,0,0,w,0,w,0,w,0,w,0,w,Z,w,Z,w,Z,w,Z,0,Z,0,Z,0,Z,0,Z,0,0,0,0])};r._2._6=["f-2","f-2"];
r._2._11={_4:"i-2",_7:!1}}else if(_==1){var d=bt.Kp(n[e]),w=d[2],Z=d[3];r._1={_0:fZ.QL("f",x.Points)};
r._2._6=["f-3","f-3"];r._2._11={_4:"i-3",_7:!1}}else if(_==2){r._1={_0:fZ.QL("f",x.Points)};r._2._6=fZ.QL("f",x.TextOnPathTRange);
r._2._11={_0:x.Reversed,_3:"i0",_5:"f0",_7:!1}}}return I};fZ.a0w=function(n,F,O,I){var x={};x._0=JSON.parse(JSON.stringify(fZ.a3b));
x._1=fZ.adh(n,F,O,I?I._1:null);x._2=JSON.parse(JSON.stringify(fZ.y4._6));x._3=JSON.parse(JSON.stringify(fZ.cr._5));
return x};fZ.a7S=function(n,F){return fZ.aaR(n,F._1)};fZ.adh=function(n,F,O,I){var x=[],r=O._1._0;for(var e=0;
e<n.length;e++){var _=n[e],d={_0:{}};x.push(d);var w=I?I[e]:null;d._0._0="s"+_.EngineDict.Editor.Text;
d._0._0=d._0._0;var Z={_0:[]};d._0._5=Z;var P=_.EngineDict.ParagraphRun;for(var C=0;C<P.RunArray.length;
C++){var W={_0:{}};Z._0.push(W);W._0._0={_0:"s",_5:{},_6:"i1"};fZ.Am(W._0._0,P.RunArray[C].ParagraphSheet);
W._1="i"+P.RunLengthArray[C]}var v={_0:[]};d._0._6=v;var L=w?w._0._6:null;P=_.EngineDict.StyleRun;for(var C=0;
C<P.RunArray.length;C++){var H={_0:{}};v._0.push(H);var y=L?L._0:null;H._0._0={_0:"s",_5:"i1",_6:{}};
fZ.dY(H._0._0,P.RunArray[C].StyleSheet,r,_.ResourceDict.FontSet,y?H._0._0:null);H._1="i"+P.RunLengthArray[C]}d._0._10={_0:"i4",_2:!0};
d._1=fZ.view.a8M(_,null,e,null)}return x};fZ.aaR=function(n,F){var O=[],I=n._1._0;for(var e=0;e<F.length;
e++){var x=bt.qN();O.push(x);var r=F[e];x.EngineDict.Editor.Text=r._0._0.slice(1);var _=x.EngineDict.ParagraphRun.RunArray[0],d=x.EngineDict.ParagraphRun,w=r._0._5;
for(var Z=0;Z<w._0.length;Z++){var P=w._0[Z];d.RunLengthArray[Z]=parseInt(P._1.slice(1));d.RunArray[Z]=JSON.parse(JSON.stringify(_));
fZ.a0_(P._0._0,d.RunArray[Z].ParagraphSheet)}var C=r._0._6;d=x.EngineDict.StyleRun;if(C)for(var Z=0;
Z<C._0.length;Z++){var W=C._0[Z];d.RunLengthArray[Z]=parseInt(W._1.slice(1));d.RunArray[Z]={StyleSheet:{StyleSheetData:{}}};
fZ.yF(W._0._0,d.RunArray[Z].StyleSheet,I,x.ResourceDict.FontSet)}else{d.RunLengthArray[0]=bt.fQ(x).length;
d.RunArray[0]={StyleSheet:{StyleSheetData:{}}}}}return O};fZ.dY=function(n,F,O,I,x){n._0="s"+(F.Name?F.Name:"");
var r=n._6,_=x?x._6:null,d=F.StyleSheetData;if(d.Font==null)return;var w=I[d.Font].Name,Z=-1;for(var e=0;
e<O.length;e++)if("s"+w==O[e]._0._0._0){Z=e;break}r._0="i"+Z;if(d.FontSize!=null)r._1="f"+d.FontSize;
if(d.FauxBold!=null)r._2=d.FauxBold;if(d.FauxItalic!=null)r._3=d.FauxItalic;if(d.AutoLeading!=null)r._4=d.AutoLeading;
if(d.Leading!=null)r._5="f"+d.Leading;if(d.HorizontalScale!=null)r._6="f"+d.HorizontalScale;if(d.VerticalScale!=null)r._7="f"+d.VerticalScale;
if(d.Tracking!=null)r._8="i"+d.Tracking;if(d.BaselineShift!=null)r._9="f"+d.BaselineShift;if(d.AutoKerning!=null)r._11="i"+(d.AutoKerning?1:0);
if(d.FontCaps!=null)r._12="i"+d.FontCaps;if(d.FontBaseline!=null)r._13="i"+d.FontBaseline;if(d.Strikethrough!=null)r._15="i"+(d.Strikethrough?1:0);
if(d.Underline!=null)r._16="i"+(d.Underline?2:0);if(d.Ligatures!=null)r._18=d.Ligatures;if(d.DLigatures!=null)r._19=d.DLigatures;
if(d.Language!=null)r._38="i"+d.Language;if(d.FillColor!=null)r._53={_99:"/SimplePaint",_0:{_0:"i1",_1:fZ.QL("f",d.FillColor.Values)}}};
fZ.yF=function(n,F,O,I){var x=n._6;if(x==null)return;var r=F.StyleSheetData;if(x._0){var _=parseInt(x._0.slice(1)),d=O[_]._0._0._0.slice(1);
bt.Zu({Bw:r,D0:I},d)}if(x._1!=null)r.FontSize=parseFloat(x._1.slice(1));if(x._2!=null)r.FauxBold=x._2;
if(x._3!=null)r.FauxItalic=x._3;if(x._4!=null)r.AutoLeading=x._4;if(x._5!=null)r.Leading=parseFloat(x._5.slice(1));
if(x._6!=null)r.HorizontalScale=parseFloat(x._6.slice(1));if(x._7!=null)r.VerticalScale=parseFloat(x._7.slice(1));
if(x._8!=null)r.Tracking=parseFloat(x._8.slice(1));if(x._9!=null)r.BaselineShift=parseFloat(x._9.slice(1));
if(x._11!=null)r.AutoKerning=parseFloat(x._11.slice(1))==1;if(x._12!=null)r.FontCaps=parseFloat(x._12.slice(1));
if(x._13!=null)r.FontBaseline=parseFloat(x._13.slice(1));if(x._15!=null)r.Strikethrough=parseFloat(x._15.slice(1))==1;
if(x._16!=null)r.Underline=parseFloat(x._16.slice(1))==1;if(x._18!=null)r.Ligatures=x._18;if(x._19!=null)r.DLigatures=x._19;
if(x._38!=null)r.Language=parseFloat(x._38.slice(1));var w=x._53;if(w){var Z=w._0._0,P=w._0._1,C=[1,0,0,0],W=[];
for(var e=0;e<P.length;e++)W[e]=parseFloat(P[e].slice(1));if(Z=="i0")C[1]=C[2]=C[3]=W[1];else if(Z=="i1")C=W;
else if(Z=="i2")C=[1].concat(UDOC.C.cmykToRgb(W.slice(1)));else console.log("unknown color type",Z,W);
r.FillColor={Type:1,Values:C}}};fZ.Am=function(n,F){n._0="s"+(F.Name?F.Name:"");var O=n._5,I=F.Properties;
if(I.Justification!=null)O._0="i"+I.Justification;if(I.FirstLineIndent!=null)O._1="f"+I.FirstLineIndent;
if(I.StartIndent!=null)O._2="f"+I.StartIndent;if(I.EndtIndent!=null)O._3="f"+I.EndtIndent;if(I.SpaceBefore!=null)O._4="f"+I.SpaceBefore;
if(I.SpaceAfter!=null)O._5="f"+I.SpaceAfter;if(I.AutoHyphenate!=null)O._9=I.AutoHyphenate;if(I._Direction!=null)O._33="i"+I._Direction};
fZ.a0_=function(n,F){var O=n._5;if(O==null)return;var I=F.Properties;if(O._0)I.Justification=parseInt(O._0.slice(1))};
fZ.QL=function(n,F){var O=[];for(var e=0;e<F.length;e++)O.push(n+F[e]);return O};fZ.alX={_0:[{_0:{_0:"sPhotoshop6MojiKumiSet4",_5:{_0:"i0",_3:"i2"}}},{_0:{_0:"sPhotoshop6MojiKumiSet3",_5:{_0:"i0",_3:"i4"}}},{_0:{_0:"sPhotoshop6MojiKumiSet2",_5:{_0:"i0",_3:"i3"}}},{_0:{_0:"sPhotoshop6MojiKumiSet1",_5:{_0:"i0",_3:"i1"}}},{_0:{_0:"sYakumonoHankaku",_5:{_0:"i0",_3:"i1"}}},{_0:{_0:"sGyomatsuYakumonoHankaku",_5:{_0:"i0",_3:"i3"}}},{_0:{_0:"sGyomatsuYakumonoZenkaku",_5:{_0:"i0",_3:"i4"}}},{_0:{_0:"sYakumonoZenkaku",_5:{_0:"i0",_3:"i2"}}}],_1:[{_0:"i0"},{_0:"i1"},{_0:"i2"},{_0:"i3"},{_0:"i4"},{_0:"i5"},{_0:"i6"},{_0:"i7"}]};
fZ.a9u={_0:[{_0:{_0:"sNone",_5:{_0:"s",_1:"s",_2:"s",_3:"s",_4:"i0"}}},{_0:{_0:"sPhotoshopKinsokuHard",_5:{_0:"s!),.:;?]}\xA2\u2014\u2019\u201D\u2030\u2103\u2109\u3001\u3002\u3005\u3009\u300B\u300A\u300F\u3011\u3015\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u309B\u309C\u309D\u309E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u30FB\u30FC\u30FD\u30FE\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",_1:"s([{\xA3\xA7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3012\u3014\uFF03\uFF04\uFF08\uFF20\uFF3B\uFF5B\uFFE5",_2:"s\u2014\u2025\u2026",_3:"s\u3001\u3002\uFF0C\uFF0E",_4:"i1"}}},{_0:{_0:"sPhotoshopKinsokuSoft",_5:{_0:"s\u2019\u201D\u3001\u3002\u3005\u3009\u300B\u300A\u300F\u3011\u3015\u309D\u309E\u30FB\u30FD\u30FE\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",_1:"s\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B",_2:"s\u2014\u2025\u2026",_3:"s\u3001\u3002\uFF0C\uFF0E",_4:"i2"}}},{_0:{_0:"sHard",_5:{_0:"s!),.:;?]}\xA2\u2014\u2019\u201D\u2030\u2103\u2109\u3001\u3002\u3005\u3009\u300B\u300A\u300F\u3011\u3015\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u309B\u309C\u309D\u309E\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u30FB\u30FC\u30FD\u30FE\uFF01\uFF05\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",_1:"s([{\xA3\xA7\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3012\u3014\uFF03\uFF04\uFF08\uFF20\uFF3B\uFF5B\uFFE5",_2:"s\u2014\u2025\u2026",_3:"s\u3001\u3002\uFF0C\uFF0E",_4:"i1"}}},{_0:{_0:"sSoft",_5:{_0:"s\u2019\u201D\u3001\u3002\u3005\u3009\u300B\u300A\u300F\u3011\u3015\u309D\u309E\u30FB\u30FD\u30FE\uFF01\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D",_1:"s\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B",_2:"s\u2014\u2025\u2026",_3:"s\u3001\u3002\uFF0C\uFF0E",_4:"i2"}}}],_1:[{_0:"i0"},{_0:"i1"},{_0:"i2"},{_0:"i3"},{_0:"i4"}]};
fZ.y4={_0:"sNormal RGB",_6:{_0:"i0",_1:"f12",_2:!1,_3:!1,_4:!0,_5:"f0",_6:"f1",_7:"f1",_8:"i0",_9:"f0",_10:"f0",_11:"i1",_12:"i0",_13:"i0",_14:"i0",_15:"i0",_16:"i0",_17:"f0",_18:!0,_19:!1,_20:!1,_21:!1,_22:!1,_23:!1,_24:!1,_25:!1,_26:!1,_27:!1,_28:!1,_29:!1,_30:"i0",_31:!1,_32:!1,_33:!1,_34:!1,_35:"i2",_36:"f0",_37:"i2",_38:"i0",_39:"i0",_40:!1,_41:"i2",_42:"i0",_43:{_0:"f.5"},_44:"i2",_45:"i2",_46:"i7",_47:"i0",_48:"i0",_49:"f-1",_50:"f-1",_51:"i0",_52:!1,_53:{_99:"/SimplePaint",_0:{_0:"i1",_1:["f1","f0","f0","f0"]}},_54:{_99:"/SimplePaint",_0:{_0:"i1",_1:["f1","f0","f0","f0"]}},_55:{_99:"/SimpleBlender"},_56:!0,_57:!1,_58:!0,_59:!1,_60:!1,_61:"i0",_62:"i0",_63:"f1",_64:"f4",_65:"f0",_66:[],_67:[],_68:"i0",_69:"i0",_70:"i0",_71:"i4",_72:"f0",_73:"f0",_74:!1,_75:!1,_76:!1,_77:!0,_78:!0,_79:{_99:"/SimplePaint",_0:{_0:"i1",_1:["f1","f1","f1","f0"]}},_80:!1,_81:"i0",_82:"f3",_83:"f3",_84:!1,_85:"i0",_86:{_99:"/SimpleCustomFeature"},_87:"f100",_88:!0}};
fZ.cr={_0:"sNormal RGB",_5:{_0:"i0",_1:"f0",_2:"f0",_3:"f0",_4:"f0",_5:"f0",_6:"i1",_7:"f1.2",_8:"i0",_9:!0,_10:"i6",_11:"i2",_12:"i2",_13:"i0",_14:"f36",_15:!0,_16:"f.5",_17:["f.8","f1","f1.33"],_18:["f0","f0","f0"],_19:["f1","f1","f1"],_20:"i6",_21:!1,_22:"i0",_23:!0,_24:"i0",_25:"i0",_27:"/nil",_26:!1,_28:"/nil",_29:!1,_30:{},_31:"f36",_32:{},_33:"i0",_34:"i7",_35:"i1",_36:"/nil",_37:"i0",_38:!1,_39:"i0",_40:"i2"}};
fZ.ad_={_0:[{_0:{_0:"skPredefinedNumericListStyleTag",_6:"i1"}},{_0:{_0:"skPredefinedUppercaseAlphaListStyleTag",_6:"i2"}},{_0:{_0:"skPredefinedLowercaseAlphaListStyleTag",_6:"i3"}},{_0:{_0:"skPredefinedUppercaseRomanNumListStyleTag",_6:"i4"}},{_0:{_0:"skPredefinedLowercaseRomanNumListStyleTag",_6:"i5"}},{_0:{_0:"skPredefinedBulletListStyleTag",_6:"i6"}}],_1:[{_0:"i0"},{_0:"i1"},{_0:"i2"},{_0:"i3"},{_0:"i4"},{_0:"i5"}]};
fZ.a3b={_0:{_0:"i1",_1:[{_0:"s ",_1:"s1"},{_0:"s\r",_1:"s6"},{_0:"s\t",_1:"s0"},{_0:"s\u2029",_1:"s5"},{_0:"s\x03",_1:"s5"},{_0:"s\u3000",_1:"s1"},{_0:"s\xAD",_1:"s3"}]},_1:"i0",_2:"i0",_3:"f.583",_4:"f.333",_5:"f.583",_6:"f.333",_7:"f.7",_8:!0,_9:[{_0:"i0",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i1",_1:"s\u201D",_2:"s\u201D",_3:"s\u2019",_4:"s\u2019"},{_0:"i2",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i3",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i4",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i5",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i6",_1:"s\xAB",_2:"s\xBB",_3:"s\u2039",_4:"s\u203A"},{_0:"i7",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i8",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i9",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i10",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i11",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i12",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i13",_1:"s\u201D",_2:"s\u201D",_3:"s\u2019",_4:"s\u2019"},{_0:"i14",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i15",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i16",_1:"s\u201D",_2:"s\u201D",_3:"s\u2019",_4:"s\u2019"},{_0:"i17",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i18",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i19",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i20",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i21",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i22",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i23",_1:"s\u201E",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i24",_1:"s\u201E",_2:"s\u201D",_3:"s\u201A",_4:"s\u2019"},{_0:"i25",_1:"s\xAB",_2:"s\xBB",_3:"s\u2039",_4:"s\u203A"},{_0:"i26",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i27",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i28",_1:"s\u201E",_2:"s\u201D",_3:"s\u2019",_4:"s\u2019"},{_0:"i29",_1:"s\u301D",_2:"s\u301E"},{_0:"i30",_1:"s\u300C",_2:"s\u300D"},{_0:"i31",_1:"s\u201E",_2:"s\u201C",_3:"s\u2018",_4:"s\u2019"},{_0:"i32",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i33",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i34",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i35",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i36",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i37",_1:"s\xAB",_2:"s\xBB",_3:"s\u2018",_4:"s\u2019"},{_0:"i38",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i39",_1:"s\xAB",_2:"s\xBB",_3:"s<",_4:"s>"},{_0:"i40",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i41",_1:"s\xAB",_2:"s\xBB",_3:"s<",_4:"s>"},{_0:"i42",_1:"s\u201E",_2:"s\u201C",_3:"s\u201A",_4:"s\u2018"},{_0:"i43",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"},{_0:"i44",_1:"s\xAB",_2:"s\xBB",_3:"s\u2039",_4:"s\u203A"},{_0:"i45",_1:"s\u201C",_2:"s\u201D",_3:"s\u2018",_4:"s\u2019"}],_15:{_0:"sWinSoft"},_16:!1};
var gI={};gI.a0l=function(n){return gI.M3(n,gI.M6,0)};gI.ab$=function(n){return gI.p8(n,gI.M6)};gI.M3=function(n,F,O){var I;
if(typeof n=="string")return n;if(n instanceof Array){I=[];for(var e=0;e<n.length;e++)I[e]=gI.M3(n[e],F,O+1)}else{I={};
var x={};for(var r in F){var _=F[r],d="_"+_[0];if(n[d]!=null){I[r]=_[1]?gI.M3(n[d],_[1],O+1):n[d];x[d]=!0}}for(var r in n){if(x[r]==null){console.log(F,x);
console.log(r,n,F);throw"e"}}}return I};gI.p8=function(n,F){var O;if(n instanceof Array){O=[];for(var e=0;
e<n.length;e++)O[e]=gI.p8(n[e],F)}else{O={};var I={};for(var x in F){var r=F[x],_="_"+r[0];if(n[x]!=null){O[_]=r[1]?gI.p8(n[x],r[1]):n[x];
I[x]=!0}}for(var x in n){if(I[x]==null){console.log(F,I);console.log(x,n);throw"e"}}}return O};gI.UI={_StreamTag:[99],_5:[5],_Color:[0,{_Type:[0],_Values:[1]}]};
gI.Cs={_Font:[0],_FontSize:[1],_FauxBold:[2],_FauxItalic:[3],_AutoLeading:[4],_Leading:[5],_HorizontalScale:[6],_VerticalScale:[7],_Tracking:[8],_BaselineShift:[9],_CharacterRotation:[10],_AutoKern:[11],_FontCaps:[12],_FontBaseline:[13],_FontOTPosition:[14],_StrikethroughPosition:[15],_UnderlinePosition:[16],_UnderlineOffset:[17],_Ligatures:[18],_DiscretionaryLigatures:[19],_ContextualLigatures:[20],_AlternateLigatures:[21],_OldStyle:[22],_Fractions:[23],_Ordinals:[24],_Swash:[25],_Titling:[26],_ConnectionForms:[27],_StylisticAlternates:[28],_Ornaments:[29],_FigureStyle:[30],_ProportionalMetrics:[31],_Kana:[32],_Italics:[33],_Ruby:[34],_BaselineDirection:[35],_Tsume:[36],_StyleRunAlignment:[37],_Language:[38],_JapaneseAlternateFeature:[39],_EnableWariChu:[40],_WariChuLineCount:[41],_WariChuLineGap:[42],_WariChuSubLineAmount:[43,{_WariChuSubLineScale:[0]}],_WariChuWidowAmount:[44],_WariChuOrphanAmount:[45],_WariChuJustification:[46],_TCYUpDownAdjustment:[47],_TCYLeftRightAdjustment:[48],_LeftAki:[49],_RightAki:[50],_JiDori:[51],_NoBreak:[52],_FillColor:[53,gI.UI],_StrokeColor:[54,gI.UI],_Blend:[55,{_StreamTag:[99]}],_FillFlag:[56],_StrokeFlag:[57],_FillFirst:[58],_FillOverPrint:[59],_StrokeOverPrint:[60],_LineCap:[61],_LineJoin:[62],_LineWidth:[63],_MiterLimit:[64],_LineDashOffset:[65],_LineDashArray:[66],_Type1EncodingNames:[67],_Kashidas:[68],_DirOverride:[69],_DigitSet:[70],_DiacVPos:[71],_DiacXOffset:[72],_DiacYOffset:[73],_OverlapSwash:[74],_JustificationAlternates:[75],_StretchedAlternates:[76],_FillVisibleFlag:[77],_StrokeVisibleFlag:[78],_FillBackgroundColor:[79,gI.UI],_FillBackgroundFlag:[80],_UnderlineStyle:[81],_DashedUnderlineGapLength:[82],_DashedUnderlineDashLength:[83],_SlashedZero:[84],_StylisticSets:[85],_CustomFeature:[86,{_StreamTag:[99]}],_MarkYDistFromBaseline:[87],_AutoMydfb:[88]};
gI.ia={_Justification:[0],_FirstLineIndent:[1],_StartIndent:[2],_EndIndent:[3],_SpaceBefore:[4],_SpaceAfter:[5],_DropCaps:[6],_AutoLeading:[7],_LeadingType:[8],_AutoHyphenate:[9],_HyphenatedWordSize:[10],_PreHyphen:[11],_PostHyphen:[12],_ConsecutiveHyphens:[13],_Zone:[14],_HyphenateCapitalized:[15],_HyphenationPreference:[16],_WordSpacing:[17],_LetterSpacing:[18],_GlyphSpacing:[19],_SingleWordJustification:[20],_Hanging:[21],_AutoTCY:[22],_KeepTogether:[23],_BurasagariType:[24],_KinsokuOrder:[25],_Kinsoku:[27],_KurikaeshiMojiShori:[26],_MojiKumiTable:[28],_EveryLineComposer:[29],_TabStops:[30],_DefaultTabWidth:[31],_DefaultStyle:[32,gI.Cs],_ParagraphDirection:[33],_JustificationMethod:[34],_ComposerEngine:[35],_ListStyle:[36],_ListTier:[37],_ListSkip:[38],_ListOffset:[39],_KashidaWidth:[40]};
gI.Gd={_Name:[0],_Features:[5,gI.ia],_Parent:[6]};gI.sj={_Name:[0],_Parent:[5],_Features:[6,gI.Cs]};
gI.M6={_98:[98,{_0:[0]}],_DocumentResources:[0,{_0:[0],_FontSet:[1,{_Resources:[0,{_Resource:[0,{_StreamTag:[99],_Identifier:[0,{_Name:[0],_ScriptType:[1],_Type:[2],_Synthetic:[3],_4:[4],_MMAxis:[5]}]}]}],_1:[1,{_0:[0]}]}],_MojiKumiCodeToClassSet:[2,{_Resources:[0,{_Resource:[0,{_Name:[0],_Members:[5]}]}],_DisplayList:[1,{_Resource:[0]}]}],_MojiKumiTableSet:[3,{_Resources:[0,{_Resource:[0,{_Name:[0],_Members:[5,{_CodeToClass:[0],_AutoTsume:[1,{_TsumeMappings:[0,{_Before:[0],_After:[1],_Code:[2]}]}],_Table:[2,{_DataArray:[0,{_SparseArray:[0,{_Index:[0],_Elements:[1,{_P:[0],_Data:[1,{_A:[0,{_R:[0],_P:[1]}],_B:[1,{_R:[0],_P:[1]}]}]}]}]}]}],_PredefinedTag:[3]}]}]}],_DisplayList:[1,{_Resource:[0]}]}],_KinsokuSet:[4,{_Resources:[0,{_Resource:[0,{_Name:[0],_Data:[5,{_NoStart:[0],_NoEnd:[1],_Keep:[2],_Hanging:[3],_PredefinedTag:[4]}]}]}],_DisplayList:[1,{_Resource:[0]}]}],_StyleSheetSet:[5,{_Resources:[0,{_Resource:[0,gI.sj]}],_DisplayList:[1,{_Resource:[0]}]}],_ParagraphSheetSet:[6,{_Resources:[0,{_Resource:[0,gI.Gd]}],_DisplayList:[1,{_Resource:[0]}]}],_TextFrameSet:[8,{_Resources:[0,{_Resource:[0,{_0:[0],_Bezier:[1,{_Points:[0]}],_Data:[2,{_Type:[0],_LineOrientation:[1],_FrameMatrix:[2],_TextOnPathTRange:[6],_RowGutter:[7],_ColumnGutter:[8],_FirstBaselineAlignment:[10,{_Flag:[0],_Min:[1]}],_PathData:[11,{_Reversed:[0],_2:[2],_3:[3],_Spacing:[4],_5:[5],_7:[7]}],_12:[12]}]}]}]}],_ListStyleSet:[9,{_Resources:[0,{_Resource:[0,{_Name:[0],_PredefinedTag:[6]}]}],_DisplayList:[1,{_Resource:[0]}]}]}],_DocumentObjects:[1,{_DocumentSettings:[0,{_HiddenGlyphFont:[0,{_AlternateGlyphFont:[0],_WhitespaceCharacterMapping:[1,{_WhitespaceCharacter:[0],_AlternateCharacter:[1]}]}],_NormalStyleSheet:[1],_NormalParagraphSheet:[2],_SuperscriptSize:[3],_SuperscriptPosition:[4],_SubscriptSize:[5],_SubscriptPosition:[6],_SmallCapSize:[7],_UseSmartQuotes:[8],_SmartQuoteSets:[9,{_Language:[0],_OpenDoubleQuote:[1],_CloseDoubleQuote:[2],_OpenSingleQuote:[3],_CloseSingleQuote:[4]}],_11:[11],_LinguisticSettings:[15,{_PreferredProvider:[0],_LinguisticProviderInfo:[1]}],_UseSmartLists:[16],_DefaultStoryDir:[17],_GreekingSize:[20]}],_TextObjects:[1,{_Model:[0,{_Text:[0],_ParagraphRun:[5,{_RunArray:[0,{_RunData:[0,{_ParagraphSheet:[0,gI.Gd]}],_Length:[1]}]}],_StyleRun:[6,{_RunArray:[0,{_RunData:[0,{_StyleSheet:[0,gI.sj]}],_Length:[1]}]}],_FirstKern:[7],_8:[8],_9:[9],_StorySheet:[10,{_AntiAlias:[0],_UseFractionalGlyphWidths:[2],_3:[3],_4:[4]}],_KernRun:[15],_AlternateGlyphRun:[16],_HyperlinkRun:[17]}],_View:[1,{_Frames:[0,{_Resource:[0]}],_RenderedData:[1,{_RunArray:[0,{_RunData:[0,{_0:[0],_LineCount:[1]}],_Length:[1]}]}],_Strikes:[2]}],_OpticalAlignment:[2]}],_OriginalNormalStyleFeatures:[2,gI.Cs],_OriginalNormalParagraphFeatures:[3,gI.ia]}]};
fZ.view={};fZ.view.a8M=function(n,F,O,I){var x={},r=bt.oB(n);x._0=[{_0:"i"+O}];return x};function CSS(){}CSS.ae8=function(n,F){var O=n.add,I=O.vmsk,x=O.vstk,r=O.lmfx,_=O.TySh,d=[],w=CSS.a5K(r,O);
if(n.zX()&&I){var Z=q.Y.if(I.b);if(!Z.D2()){d.push("width: "+Math.round(Z.d)+"px");d.push("height: "+Math.round(Z.v)+"px")}var P=q.Y.abL(I.b);
if(P>0)d.push("border-radius: "+Math.round(P)+"px")}else if(_){var C=_.Vb;if(bt.oB(C)==1){var Z=bt.Kp(C);
d.push("width: "+Math.round(Z[2])+"px");d.push("height: "+Math.round(Z[3])+"px")}CSS.Ps(d,bt.gU(C,0,0),_.m,!1,!1,w[0])}var W=[],v=r?r.dropShadowMulti.v:0;
for(var e=0;e<v.length;e++){var L=v[e].v;if(L.enab.v){var H=L.Dstn.v.val,y=L.lagl.v.val*Math.PI/180;
if(L.uglg&&L.uglg.v)y=F.ai()*Math.PI/180;var g=H*Math.cos(y),Q=H*Math.sin(y);W.push("drop-shadow("+(g==0?"0 ":CSS.HF(-g)+"px ")+(Q==0?"0 ":CSS.HF(Q)+"px ")+L.blur.v.val/2+"px "+CSS.q7(L.Clr.v,L.Opct.v.val/100)+")")}}if(W.length!=0)d.push("filter: "+W.join(" "));
if(_==null)CSS.ack(w,d);if(x==null||!x.strokeEnabled.v)x=ha.Lv(r);if(x&&x.strokeEnabled.v){var J=x.strokeStyleContent.v,A=J.classID,p=bW.uS.wq.indexOf(x.strokeStyleLineCapType.v.strokeStyleLineCapType),U=bW.uS.join.indexOf(x.strokeStyleLineJoinType.v.strokeStyleLineJoinType),j=x.strokeStyleOpacity.v.val/100,b=x.strokeStyleLineWidth.v.val,s="";
if(A=="solidColorLayer")s=CSS.q7(J.Clr.v,j);d.push("border: "+b+"px solid "+s)}return d};CSS.a5K=function(n,F){var O=ha.OA(n,F),I=O[0],x=O[1],r,_;
if(I){r=CSS.q7(I.Clr.v,F.iOpa!=null?F.iOpa/255:1)}else if(x){_=CSS.pn(x)}return[r,_]};CSS.ack=function(n,F){if(n[0])F.push("background-color: "+n[0]);
if(n[1])F.push("background-image: "+n[1])};CSS.vw={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",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",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};
CSS.HF=function(E){return""+parseFloat(E.toFixed(3))};CSS.kk=function(n){if(n==null)return{Q:0,l:0,O:0};
var F=n.indexOf("(");if(F!=-1){var O=n.slice(F+1,n.length-1).split(",");for(var e=0;e<O.length;e++){var I=O[e].trim();
O[e]=parseFloat(I)*(I.endsWith("%")?255/100:1)}return{Q:O[0],l:O[1],O:O[2]}}if(n.charAt(0)!="#"){var x=CSS.vw;
if(x[n])n=x[n];else console.log("unknown color "+n)}n=n.slice(1);if(n.length==3)n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2];
n=parseInt(n,16);return{Q:n>>16&255,l:n>>8&255,O:n&255}};CSS.q7=function(n,F){return CSS.Tt(q.W.S_(n),F)};
CSS.Tt=function(n,F){if(F==null)F=1;var O=Math.round(n.Q),I=Math.round(n.l),x=Math.round(n.O),r=O<<16|I<<8|x;
return F==1?"#"+q.c7(r):"rgba("+O+","+I+","+x+","+F+")"};CSS.pn=function(n){var F=n.Grad.v;if(F.Clrs==null)return"";
var O=F.Clrs.v.slice(0),I=F.Trns.v.slice(0),x=n.Ofst.v,r=n.Type.v.GrdT=="Rdl"?1:0,_=(r==1?"radial":"linear")+"-gradient",d=r==0?Math.round(-n.Angl.v.val+90)+"deg":"circle at center",w=n.Rvrs.v;
if(w){O.reverse();I.reverse()}for(var e=0;e<O.length;e++){var Z=O[e].v,P=e<I.length?I[e].v.Opct.v.val/100:1,C=Z.Lctn.v/4096;
if(w)C=1-C;d+=", "+CSS.q7(Z.Clr.v,P)+" "+Math.round(C*100)+"%"}return _+"("+d+")"};CSS.Ps=function(n,F,O,I,x,r){var _=F.Bw,d=I?1:c.V.GW(O),w=Math.round(_.FontSize*d);
n.push("font-size: "+w+"px");var Z=_.Tracking;if(!I&&Z!=null&&Z!=0)n.push("letter-spacing: "+Math.round(Z*w/1e3)+"px");
if(!_.AutoLeading)n.push("line-height: "+Math.round(_.Leading*d)+"px");if(_.Strikethrough)n.push("text-decoration: line-through");
var P=bt.S_(_);P=[P.Q,P.l,P.O].map(Math.round);n.push((I?"fill: ":"color: ")+(r?r:"#"+q.c7(P[0]<<16|P[1]<<8|P[2])));
var C=F.D0[_.Font].Name;if(C){var W=da.J7.rs(C),v="",L=null,H=null;if(W!=null&&C!=da.pL(W))W=null;if(x&&W)v+="\""+C+"\", ";
var y=C.toLowerCase();if(W){L=da.RQ(W)[0];if(W["OS/2"])H=W["OS/2"].usWeightClass}else{L=CSS.amL(C);if(y.indexOf("light")!=-1)H=300;
else if(y.indexOf("medium")!=-1)H=500;else if(y.indexOf("black")!=-1||y.indexOf("extrabold")!=-1)H=800;
else if(y.indexOf("bold")!=-1)H="bold"}if(L!=null)v+="\""+L+"\"";if(H!=null)n.push("font-weight: "+H);
if(y.indexOf("italic")!=-1||y.indexOf("oblique")!=-1)n.push("font-style: italic");if(v)n.push("font-family: "+v)}var g=F.jp.Justification;
if(g!=null&&g!=0)if(I)n.push("text-anchor: "+["start","end","middle"][g%3]);else n.push("text-align: "+["left","right","center"][g%3])};
CSS.amL=function(n){n=n.split("-")[0];while(n.endsWith("MT")||n.endsWith("PS"))n=n.slice(0,n.length-2);
var F=!0;for(var e=0;e<n.length;e++){var O=n.charAt(e);if(!F&&O.toLowerCase()!=O){n=n.slice(0,e)+" "+n.slice(e);
e++;F=!0}else F=!1}return n};function fr(){}fr.jK={document:!0,parent:!0,top:!0,eval:!0,postMessage:!0,UTIF:!0,PIMG:!0,LNG:!0,FNTS:!0};
fr.h7=function(n,F){var O=Date.now(),I;try{I=acorn.parse(n)}catch(hl){console.log(hl);return}var x=JSON.parse(JSON.stringify(fr.jN.W$));
x.__return=!1;x.__break=!1;x.__throw=!1;x.__fs={};x.__window={};fr.eval(I,F,x);var r=x.__fs;if(Object.keys(r).length!=0){var _=UZIP.encode(r);
bm.save(_,"output.zip")}};fr.eval=function(n,F,O){var I=n.type;if(!1){}else if(I=="Program"||I=="BlockStatement"){var x=n.body;
for(var e=0;e<x.length;e++){var r=x[e].type;if(r=="FunctionDeclaration")O[x[e].id.name]=x[e]}for(var e=0;
e<x.length;e++){var r=x[e].type,_=fr.eval(x[e],F,O);if(O.__return||O.__break||O.__throw)return _}}else if(I=="ReturnStatement"){O.__return=!0;
return n.argument?fr.zL(n.argument,F,O):null}else if(I=="BreakStatement"){O.__break=!0}else if(I=="VariableDeclaration"){var d=n.declarations;
for(var e=0;e<d.length;e++)fr.eval(d[e],F,O)}else if(I=="VariableDeclarator"){O[n.id.name]=n.init?fr.zL(n.init,F,O):null}else if(I=="FunctionDeclaration"){O[n.id.name]=n}else if(I=="MemberExpression"){var w=fr.zL(n.object,F,O),Z=n.computed?fr.zL(n.property,F,O):fr.eval(n.property,F,O),_;
if(w.o!=null)_=fr.jN.Kx(w,Z,F,O);else if(w==window&&fr.jK[Z]){}else _=w[Z];return _}else if(I=="ArrayExpression"){var P=[],C=n.elements;
for(var e=0;e<C.length;e++)P.push(fr.zL(C[e],F,O));return P}else if(I=="ObjectExpression"){var P={},C=n.properties;
for(var e=0;e<C.length;e++){var W=C[e],v=C[e].key.name?C[e].key.name:C[e].key.value;P[v]=fr.zL(C[e].value,F,O)}return P}else if(I=="ExpressionStatement"){return fr.eval(n.expression,F,O)}else if(I=="NewExpression"){var L=n.arguments,H=n.callee,y=H.type,g=[],P=null;
for(var e=0;e<L.length;e++)g.push(fr.zL(L[e],F,O));if(y=="Identifier")P=fr.jN.a1w(H.name,g,F,O);else throw"e";
if(P==null)throw"new "+H.name;return P}else if(I=="CallExpression"){var L=n.arguments,H=n.callee,y=H.type,Q={};
for(var J in O)Q[J]=O[J];var g=[];for(var e=0;e<L.length;e++)g.push(fr.zL(L[e],F,O));if(y=="Identifier"){var A=H.name,p=O[A];
if(p){if(p.params){var U=p.params;for(var e=0;e<U.length;e++)Q[U[e].name]=g[e];return fr.eval(p.body,F,Q)}else{return p.apply(null,g)}}else if(fr.jN.agW.indexOf(A)!=-1)return fr.jN.Na({o:"Application"},A,g,F,O);
else if(window[A]==null)console.log("Unknown function "+A);else if(fr.jK[A])alert(A+"() not available");
else{var j=window[A].apply(window,g);return j}}else if(y=="MemberExpression"){var w=fr.zL(H.object,F,O),Z=H.computed?fr.zL(H.property,F,O):fr.eval(H.property,F,O);
if(w==window&&fr.jK[Z])return;if(w.o!=null)return fr.jN.Na(w,Z,g,F,O);else return w[Z].apply(w,g)}else if(y=="FunctionExpression"){return fr.eval(H.body,F,O)}else console.log(n)}else if(I=="AssignmentExpression"){var b=n.operator,s=n.left,G=s.type,T=fr.zL(s,F,O),z=fr.zL(n.right,F,O),_=null;
if(!1){}else if(b=="=")_=z;else if(b=="+=")_=T+z;else if(b=="-=")_=T-z;else if(b=="*=")_=T*z;else if(b=="/=")_=T/z;
else if(b=="%=")_=T%z;else if(b=="&=")_=T&z;else if(b=="|=")_=T|z;else if(b=="&&=")_=T&&z;else if(b=="||=")_=T||z;
else console.log(n);if(G=="Identifier"){var m=s.name;if(O.hasOwnProperty(m))O[m]=_;else O.__window[m]=_}else if(G=="MemberExpression"){var $=fr.eval(s.property,F,O),o=fr.zL(s.object,F,O);
if(o.o!=null)fr.jN.a3L(o,$,_,F,O);else o[$]=_}else console.log(n)}else if(I=="Identifier")return n.name;
else if(I=="Literal")return n.value;else if(I=="UpdateExpression"){var b=n.operator,h=n.argument.name,P=fr.zL(n.argument,F,O);
if(!1){}else if(b=="++"){O[h]++;return n.prefix?O[h]:O[h]-1}else if(b=="--"){O[h]--;return n.prefix?O[h]:O[h]+1}else console.log(n)}else if(I=="UnaryExpression"){var b=n.operator,X=fr.zL(n.argument,F,O);
if(X.o=="UnitValue"){if(b=="-")return-X.G;else return fr.AL(X.G,b)}else return fr.AL(X,b)}else if(I=="BinaryExpression"||I=="LogicalExpression"){var b=n.operator,s=fr.zL(n.left,F,O),X=fr.zL(n.right,F,O);
if(s==null||X==null)return fr.oY(s,X,b);else if(s.o=="UnitValue"&&X.o=="UnitValue")return fr.oY(s.G,X.G,b);
else if(s.o=="UnitValue")return fr.oY(s.G,X,b);else if(X.o=="UnitValue"){if(b=="-")return-(s-X.G);else return fr.oY(s,X.G,b)}else return fr.oY(s,X,b)}else if(I=="IfStatement"||I=="ConditionalExpression"){var D=fr.zL(n.test,F,O);
if(D)return fr.eval(n.consequent,F,O);else if(n.alternate)return fr.eval(n.alternate,F,O)}else if(I=="ForInStatement"){fr.eval(n.left,F,O);
var f=n.left.declarations[0].id.name,R=fr.zL(n.right,F,O);for(var J in R){O[f]=J;var i=fr.eval(n.body,F,O);
if(O.__break)break;if(O.__return)return i}O.__break=!1}else if(I=="ForStatement"){fr.eval(n.init,F,O);
while(fr.eval(n.test,F,O)){var i=fr.eval(n.body,F,O);if(O.__break)break;if(O.__return)return i;fr.eval(n.update,F,O)}O.__break=!1}else if(I=="DoWhileStatement"){do{var i=fr.eval(n.body,F,O);
if(O.__break)break;if(O.__return)return i}while(fr.eval(n.test,F,O));O.__break=!1}else if(I=="TryStatement"){fr.eval(n.block,F,O);
if(O.__throw){var t=n.handler;O[t.param.name]=O.__throw;O.__throw=!1;fr.eval(t.body,F,O);delete O[t.param.name]}}else if(I=="EmptyStatement"){}else console.log(n)};
fr.oY=function(n,F,O){if(O=="+")return n+F;else if(O=="-")return n-F;else if(O=="*")return n*F;else if(O=="/")return n/F;
else if(O=="%")return n%F;else if(O=="^")return n^F;else if(O=="&")return n&F;else if(O=="&&")return n&&F;
else if(O=="|")return n|F;else if(O=="||")return n||F;else if(O=="<")return n<F;else if(O==">")return n>F;
else if(O=="==")return n==F;else if(O=="<=")return n<=F;else if(O==">=")return n>=F;else if(O=="!=")return n!=F;
else if(O=="!==")return n!==F;else if(O=="<<")return n<<F;else if(O==">>")return n>>F;else console.log(O)};
fr.AL=function(n,F){if(F=="-")return-n;else if(F=="!")return!n;else if(F=="~")return~n;else if(F=="+")return n;
else console.log(obj)};fr.zL=function(n,F,O){var I=n.type;if(I=="Identifier")return fr.adj(n.name,F,O);
else return fr.eval(n,F,O)};fr.adj=function(n,F,O){if(n=="undefined")return undefined;else if(O.hasOwnProperty(n))return O[n];
else if(n=="app")return{o:"Application"};else if(n=="$")return{o:"$"};else if(fr.jN.a6O.indexOf(n)!=-1)return fr.jN.Kx({o:"Application"},n,F,O);
else if(window[n]&&!fr.jK[n])return window[n];else{O[n]=null;return null}};fr.jN={};fr.jN.a1w=function(n,F,O,I){var x;
if(n=="SolidColor")x={o:n,G:[1,0,0,0]};if(n=="RGBColor")x={o:n,G:[1,0,0,0]};if(n=="Window")x={o:n,G:new eD(F[0],F[1],F[2])};
if(n=="ExportOptionsSaveForWeb")x={o:n,G:{ty:"png",Cn:100}};if(n=="JPEGSaveOptions")x={o:n,G:{ty:"jpg",Cn:100}};
if(n=="File")x={o:n,G:F[0]};if(n=="ActionReference")x={o:n,G:[]};if(n=="ActionDescriptor")x={o:n,G:{}};
if(n=="ActionList")x={o:n,G:[]};if(n=="UnitValue")x={o:n,G:F.length==0?0:parseFloat(F[0])};return x};
fr.jN.a6O="activeDocument documents fonts preferences displayDialogs foregroundColor backgroundColor".split(" ");
fr.jN.agW=["charIDToTypeID","stringIDToTypeID","executeAction","executeActionGet","doAction"];fr.jN.Kx=function(n,F,O,I){var x=O._A,r=O.kp();
if(!1){}else if(F=="typename"){if(n.o=="Layer")return n.G.Ja()?"LayerSet":"ArtLayer";else return n.o}else if(["Document","Layer"].indexOf(n.o)!=-1&&["layers","artLayers","layerSets"].indexOf(F)!=-1){var _=r.root,d={o:"Layers",yk:F,G:[]};
if(n.o=="Layer")_=r.root.Dv(r.t.indexOf(n.G));if(_.children==null)return null;for(var e=0;e<_.children.length;
e++){var w=_.children[e].$,Z=w.Ja();if(Z&&F=="artLayers"||!Z&&F=="layerSets")continue;d.G.push({o:"Layer",G:w})}d.G.reverse();
return d}else if(n.o=="Documents"||n.o=="Layers"||n.o=="HistoryStates"){if(!1){}else if(F=="length")return n.G.length;
else if(Number.isInteger(F))return n.G[F];else console.log(n.o+": unknown property ",F)}else if(n.o=="Application"){if(!1){}else if(F=="activeDocument")return{o:"Document",G:O.kp()};
else if(F=="documents"){var d={o:"Documents",G:[]};for(var e=0;e<O.KV.length;e++)d.G.push({o:"Document",G:O.KV[e]});
return d}else if(F=="fonts")return{o:"TextFonts"};else if(F=="preferences")return{o:"Preferences"};else if(F=="displayDialogs")return{o:"DialogModes"};
else if(F=="foregroundColor"||F=="backgroundColor"){var P=F[0]=="f"?x.nE:x.sI;return{o:"SolidColor",G:[1,(P>>>16&255)/255,(P>>>8&255)/255,(P>>>0&255)/255]}}else if(F=="UI")return{o:"UI"};
else console.log(n,F)}else if(n.o=="Document"){var r=n.G;if(!1){}else if(F=="activeLayer"){var w=r.t[r.C[0]];
return{o:"Layer",G:w}}else if(F=="resolution")return r.gC;else if(F=="width")return r.d;else if(F=="height")return r.v;
else if(F=="name")return r.name;else if(F=="saved")return!r.qr();else if(F=="selection")return{o:"Selection"};
else if(F=="activeHistoryState")return{o:"HistoryState",FI:r.ok};else if(F=="source")return r.gD;else if(F=="historyStates"){var C=[];
for(var e=0;e<r.history.length;e++)C.push({o:"HistoryState",FI:e});return{o:"HistoryStates",G:C}}else console.log(n,F)}else if(n.o=="Layer"){var W={transparentPixelsLocked:0,pixelsLocked:1,positionLocked:2,allLocked:31},w=n.G;
if(!1){}else if(F=="visible")return w.Y9();else if(F=="selected")return r.C.indexOf(r.t.indexOf(w))!=-1;
else if(F=="grouped")return w.fc;else if(W[F]!=null)return w.LF(W[F]);else if(F=="opacity")return w.opacity*100/255;
else if(F=="blendMode")return w.mf;else if(F=="name")return w.getName();else if(F=="textItem")return{o:"TextItem",G:w};
else if(F=="bounds"){var v=c.V.nJ(r,[r.t.indexOf(w)]);return fr.jN.bW(v,r)}else if(F=="parent"){var L=O.KV;
for(var e=0;e<L.length;e++)if(L[e].t.indexOf(w)!=-1)return{o:"Document",G:L[e]}}else if(F=="kind"){var H=fr.jN.$j;
for(var e=0;e<H.length;e++)if(w.add[H[e]]!=null)return e;return 0}else console.log(n,F)}else if(n.o=="Selection"){if(!1){}else if(F=="bounds")return fr.jN.bW(O.kp().N.rect,r);
else console.log(n,F)}else if(n.o=="TextItem"){var y=n.G.add.TySh,g=y.Vb,Q=bt.fQ(g),J=y.m.GW(),A=bt.gU(g,0,Math.max(0,Q.length-2));
if(F=="contents")return Q.slice(0,Q.length-1).replace(/\n/g,"\r");else if(F=="font")return A.Bw.Font!=null?A.D0[A.Bw.Font].Name:null;
else if(F=="size")return fr.jN.Be(A.Bw.FontSize*J,r);else if(F=="leading")return fr.jN.Be(A.Bw.Leading*J,r);
else if(F=="tracking")return fr.jN.Be(A.Bw.Tracking);else if(F=="baselineShift")return fr.jN.Be(A.Bw.BaselineShift);
else if(F=="fauxBold")return A.Bw.FauxBold;else if(F=="fauxItalic")return A.Bw.FauxItalic;else if(F=="kind")return 1-bt.oB(g);
else if(F=="useAutoLeading")return A.jp.AutoLeading;else if(F=="hyphenation")return A.jp.AutoHyphenate;
else if(F=="justification")return fr.jN.Be(A.jp.Justification);else if(F=="color")return{o:"SolidColor",G:A.Bw.FillColor.Values.slice(0)};
else if(F=="width"||F=="height"){var p=bt.Kp(g),U=(p[2]-p[0])*J,j=(p[3]-p[1])*J;return fr.jN.Be(F=="width"?U:j,r)}else if(F=="position"){var b=y.m;
return fr.jN.aM([b.hb,b.i9],r)}else if(F=="horizontalScale"||F=="verticalScale"){var s=F[0].toUpperCase()+F.slice(1);
return Math.round(A.Bw[s]*100)}else if(F=="antiAliasMethod")bt.JH(y);else console.log(n,F)}else if(n.o=="Preferences"){if(F=="rulerUnits")return x.Kc.wv;
else console.log(n,F)}else if(n.o=="SolidColor"){if(F=="rgb")return{o:"RGBColor",G:n.G};else console.log(n,F)}else if(n.o=="RGBColor"){var v=Math.round(255*n.G[1]),G=Math.round(255*n.G[2]),T=Math.round(255*n.G[3]);
if(!1){}else if(F=="red")return v;else if(F=="green")return G;else if(F=="blue")return T;else if(F=="hexValue")return"#"+q.c7(v<<16|G<<8|T).toUpperCase();
else console.log(n,F)}else if(n.o=="UnitValue"){if(F=="value")return n.G;else throw"e"}else if(n.o=="ExportOptionsSaveForWeb"){if(F=="format")return n.G.ty;
else if(F=="PNG8")return!1;else if(F=="quality")return n.G.Cn;else throw F}else if(n.o=="JPEGSaveOptions"){return 0}else console.log(n,F)};
fr.jN.bW=function(n,F){return fr.jN.aM([n.x,n.y,n.x+n.d,n.y+n.v],F)};fr.jN.aM=function(n,F){var O=[];
for(var e=0;e<n.length;e++)O.push(fr.jN.Be(n[e],F));return O};fr.jN.Oi=function(n){var F=[];for(var e=0;
e<n.length;e++)F.push(n[e].o?n[e].G:n[e]);return F};fr.jN.Be=function(n,F){return{o:"UnitValue",G:n}};
fr.jN.aoo=function(n,F){if(n.o=="UnitValue")return n.G;return n};fr.jN.a3L=function(n,F,O,I,x){var r=new k(V.E.S,!0),_=new k(V.E.P,!0),d=I.kp(),w=I._A;
if(!1){}else if(n.o=="Application"){if(!1){}else if(F=="activeDocument"){_.data={e:V.U.ph,KH:O.G};I.A(_)}else if(F=="displayDialogs"){}else console.log(n,F,O)}else if(n.o=="Document"){var Z=n.G;
if(!1){}else if(F=="name"){r.T=c.lo;r.data={e:K.fD,G:O,ag5:!0,BN:Z};d.T3=!0}else if(F=="source")Z.gD=O;
else if(F=="activeLayer"){Z.C=[Z.t.indexOf(O.G)]}else if(F=="activeHistoryState"){r.T=c.dA;r.data={e:"h_itemchange",index:O.FI}}else console.log(n,F)}else if(n.o=="Layer"){r.T=c.lo;
var P={transparentPixelsLocked:0,pixelsLocked:1,positionLocked:2,allLocked:31},C=n.G,W=d.t.indexOf(C);
if(!1){}else if(F=="visible"){if(C.Y9()!=O)r.data={e:K.V0,$:W}}else if(F=="opacity"){r.data={e:K.nM,$:W,Qj:Math.round(255*O/100)}}else if(F=="blendMode"){r.data={e:K.SG,$:W,Qj:fk.Dy.indexOf(O)}}else if(F=="name"){r.data={e:K.UF,$:W,name:O}}else if(P[F]!=null){r.data={e:K.ll,$:W,Qj:[[O],[P[F]]]}}else if(F=="kind"){r.data={e:K.E9,$:W,ag:fr.jN.$j[O]}}else if(F=="grouped"){r.data={e:K.Eu,$:W,Qj:O}}else console.log(n,F,O)}else if(n.o=="TextItem"){r.T=c.ua;
var C=n.G,v=C.add.TySh,L=JSON.parse(JSON.stringify(v.Vb)),H=v.m.clone(),y=v.m.GW(),g=bt.fQ(L),Q=bt.gU(L,0,g.length-2),J=!1;
if(!1){}else if(F=="contents"){bt.od(L,0,g.length-1);bt.bw(L,0,O.replace(/\r/g,"\n"))}else if(F=="size"){Q.Bw.FontSize=(O.G!=null?O.G:O)/y;
J=!0}else if(F=="leading"){Q.Bw.Leading=(O.G!=null?O.G:O)/y;J=!0}else if(F=="tracking"){Q.Bw.Tracking=O.G!=null?O.G:O;
J=!0}else if(F=="baselineShift"){Q.Bw.BaselineShift=O.G!=null?O.G:O;J=!0}else if(F=="fauxBold"){Q.Bw.FauxBold=O;
J=!0}else if(F=="fauxItalic"){Q.Bw.FauxItalic=O;J=!0}else if(F=="kind"){var A=bt.oB(L);if(A==1&&O==1){var p=new h2(L,I._A.sH).jp[0],U=p.Oc[0].end,j=p.ga[U-1].end;
bt.od(L,0,g.length-1);bt.bw(L,0,g.slice(0,j-1))}if(A==O)bt.li(L,1-O)}else if(F=="useAutoLeading"){Q.jp.AutoLeading=O;
J=!0}else if(F=="hyphenation"){Q.jp.AutoHyphenate=O;J=!0}else if(F=="justification"){Q.jp.Justification=O;
J=!0}else if(F=="font"){bt.Zu(Q,O);J=!0}else if(F=="color"){Q.Bw.FillColor.Values=O.G.slice(0);J=!0}else if(F=="width"||F=="height"){var b=bt.Kp(L).slice(0),s=fr.jN.aoo(O);
if(F=="width")b[2]=Math.round(b[0]+s/y);else b[3]=Math.round(b[1]+s/y);bt.Ar(L,b)}else if(F=="position"){H.hb=O[0];
H.i9=O[1]}else if(F=="horizontalScale"||F=="verticalScale"){var G=F[0].toUpperCase()+F.slice(1);Q.Bw[G]=O/100;
J=!0}else if(F=="antiAliasMethod")bt.yv(v,O);else console.log(n,F,O);if(J)bt.F$(L,0,g.length-1,Q);r.data={e:"newED",EI:d.t.indexOf(C),p4:L,m:H}}else if(n.o=="Preferences"){if(!1){}else if(F=="rulerUnits"){var T=JSON.parse(JSON.stringify(w.Kc));
T.wv=O;_.data={e:V.U.g7,b9:cf.tf,Qj:T};I.A(_)}else console.log(n,F,O)}else if(n.o=="SolidColor"){if(F=="rgb")n.G=O.G;
else throw F}else if(n.o=="RGBColor"){if(!1){}else if(F=="red")n.G[1]=O/255;else if(F=="green")n.G[2]=O/255;
else if(F=="blue")n.G[3]=O/255;else if(F=="hexValue"){var z=q.Dl(O.slice(1));n.G[1]=(z>>>16&255)/255;
n.G[2]=(z>>>8&255)/255;n.G[3]=(z>>>0&255)/255}else console.log(n,F)}else if(n.o=="ExportOptionsSaveForWeb"){if(F=="format")n.G.ty=O;
else if(F=="PNG8"){}else if(F=="quality")n.G.Cn=O;else throw"e"}else if(n.o=="JPEGSaveOptions"){if(F=="quality")n.G.Cn=Math.round(100*O/12)}else console.log(n,F,O);
if(r.data!=null)I.A(r)};fr.jN.Na=function(n,F,O,I,x){var r=n.o,_=null,d=new k(V.E.S,!0),w=new k(V.E.JA,!0),Z=new k(V.E.P,!0),P=I.kp(),C=I.KV;
if(!1){}else if(r=="Application"){if(!1){}else if(F=="charIDToTypeID"){var W=O[0].trim(),v={slct:"select",Dlt:"delete",Mk:"make"};
return v[W]?v[W]:W}else if(F=="stringIDToTypeID"){var L=O[0].trim(),v={red:"Rd",blue:"Bl",color:"Clr",RGBColor:"RGBC",type:"Type",using:"Usng"},H=v[L];
return H==null?L:H}else if(F=="executeAction"){console.log(O);var y;if(O[1]){y=O[1].G;y.classID=O[0]}var g={setd:"set"},Q=g[O[0]];
if(Q==null)Q=O[0];var J=dK.kK[O[0]];if(J&&dK.ZU[J])Q=dK.ZU[J];w.data={oI:Q,Mk:y}}else if(F=="executeActionGet"){return{o:"ActionDescriptor",G:{classID:"null",null:{t:"obj ",v:O[0].G}}}}else if(F=="doAction"){Z.data={e:V.U.Tp,nD:[O[0],O[1]]}}else if(F=="open"){Z.data={e:V.U.Fb,b9:{url:O[0]}};
if(O[2]&&C.length!=0)Z.data.b9.qy=C.indexOf(P)}else if(F=="echoToOE"){Z.data={e:V.U.LI,b9:O[0]}}else console.log(F)}else if(r=="Document"){var P=n.G;
if(!1){}else if(F=="crop"){w.data=c.jz.FK(O[0])}else if(F=="trim"){var A=[];for(var e=0;e<4;e++)A.push(O[e+1]!=null?O[e+1]:!0);
w.data=c.jz.dQ(O[0]!=null?O[0]:0,A)}else if(F=="suspendHistory"){var p=acorn.parse(O[1]);fr.eval(p,I,x)}else if(F=="save"){Z.data={e:V.U.I8}}else if(F=="saveToOE"){Z.data={e:V.U.I8,aoH:O}}else if(F=="rotateCanvas"){w.data=c.V.Ad(!0,O[0])}else if(F=="resizeImage"||F=="resizeCanvas"){var U=O[0],j=O[1];
if(typeof U!="number"){U=P.d*parseFloat(U.slice(0,U.length-1))/100;j=P.v*parseFloat(j.slice(0,j.length-1))/100}if(F=="resizeCanvas")w.data=c.jz.pg(Math.round(U),Math.round(j),O[2]);
else w.data=c.jz.W7(Math.round(U),Math.round(j),null,1)}else if(F=="paste"){Z.data={e:V.U.yM,qG:O.length!=0&&O[0]}}else if(F=="close"){Z.data={e:V.U.Oh,dV:P}}else if(F=="exportDocument"||F=="saveAs"){var b=x.__fs,s=O[0].G.replace(":","").replace("~/",""),G=F=="exportDocument"?O[2].G:O[1].G,T=fx.XI(P,G.ty,null,null,[G.Cn],I._A);
b[s]=new Uint8Array(T)}else console.log(n,F,O)}else if(r=="Layer"){var z=n.G,m=P.t.indexOf(z);if(!1){}else if(F=="copy"){fr.jN.b5(P,I,0);
Z.data={e:V.U.UW,EO:O[0],GK:m};I.A(Z);delete Z.data;fr.jN.b5(P,I,1)}else if(F=="clear"){fr.jN.b5(P,I,0);
w.data={oI:"delete"};I.A(w);delete w.data;fr.jN.b5(P,I,1)}else if(F=="duplicate"){if(O.length==0){d.data={e:K.bn,$:m};
d.T=c.lo;I.A(d);d.data=null;_={o:"Layer",G:P.t[P.C[0]]}}else if(O[0].o=="Document"){d.data={e:K.Cf,t:P.QH(m),Vg:P,NZ:O[0].G};
d.T=c.lo}}else if(F=="merge"||F=="remove"){d.data={e:F=="merge"?K.Vu:K.C9,$:m};d.T=c.lo;if(F!="remove")_={o:"Layer",G:P.t[P.C[0]]}}else if(F=="move"){d.data={e:K.sV,source:m,target:P.t.indexOf(O[0].G),q4:O[1]!=3?.6:.3};
d.T=c.lo}else if(F=="rasterize"){w.data={oI:"rasterizeLayer",Mk:{classID:"rasterizeLayer",null:aV.hd("Lyr",!0)}}}else if(F=="rotate"){d.data={e:"rot",WL:[2,5],G:-O[0]*Math.PI/180,Ug:O[1],$:m};
d.T=c.KR}else if(F=="resize"){d.data={e:"scl",WL:[2,4],G:new aE(O[0]/100,O[1]/100),Ug:O[2],$:m};d.T=c.KR}else if(F=="translate"){var $=fr.jN.Oi(O);
d.data={e:"trsl",$:m,aof:$[0],abC:$[1]};d.T=c.AK}else if(F=="link"){d.data={e:K.cb,a21:[m,P.t.indexOf(O[0].G)]};
d.T=c.lo}else if(F=="invert"){d.T=c.Np;d.data={e:"start",Ju:"nvrt"}}else if(F.startsWith("apply")&&bS.vO[F.slice(5)]){var $=fr.jN.Oi(O),o=bS.vO[F.slice(5)];
w.data={oI:bS.ZU[o]};var y=bS.tc(o);if(y){bS.rn["g"+o](y,$);w.data.Mk=y}}else console.log(n,F,O)}else if(r=="Documents"){if(F=="getByName"){for(var e=0;
e<C.length;e++)if(C[e].name==O[0])return{o:"Document",G:C[e]};return null}else if(F=="add"){var h=O[5];
if(h==null)h=1;w.data=fj.aS(O[0],O[1],O[2],O[3],["Wht","Trns","BckC"][h])}else throw"e"}else if(r=="Layers"){if(F=="getByName"){for(var e=0;
e<n.G.length;e++)if(n.G[e].G.getName()==O[0]){_=n.G[e];break}if(_==null)x.__throw={message:"No layer with a name "+O[0]}}else if(F=="add"){d.data={e:n.yk=="layerSets"?K.R1:K.SP};
d.T=c.lo;I.A(d);d.data=null;_={o:"Layer",G:P.t[P.C[0]]}}else console.log(n,F,O)}else if(n.o=="Selection"){if(F=="select"){var X=O[0],D=[];
for(var e=0;e<X.length;e++)D.push(X[e][0],X[e][1]);w.data=c.pQ.TS(D)}else if(F=="selectAll"){w.data=c.pQ.YN(!0)}else if(F=="invert"){w.data={oI:"inverse"}}else if(F=="copy"){Z.data={e:V.U.UW}}else if(F=="deselect"){w.data=c.pQ.YN()}else if(F=="fill"){var f=O[0].G;
f=q.W.Vm({Q:f[1]*255,l:f[2]*255,O:f[3]*255});w.data=c.P6.Lz("Clr",O[1],O[2]==null?1:O[2]/100,f)}else console.log(n,F,O)}else if(n.o=="Window"){if(F=="show"){Z.data={e:V.U.n$,cU:n.G}}else throw"e"}else if(n.o=="ActionReference"){if(F=="putProperty"){n.G.push({t:"prop",v:{classID:O[0],keyID:O[1]}})}else if(F=="putClass"){n.G.push({t:"Clss",v:{classID:O[0]}})}else if(F=="putEnumerated"){n.G.push({t:"Enmr",v:{classID:O[0],typeID:O[1],enum:O[2]}})}else console.log(F,O)}else if(n.o=="ActionDescriptor"||n.o=="ActionList"){if(F=="putReference"){n.G[O[0]]={t:"obj ",v:O[1].G}}else if(F=="putDouble"){n.G[O[0]]={t:"doub",v:O[1]}}else if(F=="putUnitDouble"){n.G[O[0]]={t:"UntF",v:{type:O[1],val:O[2]}}}else if(F=="putObject"){if(n.o=="ActionList"){var R=O[1].G;
R.classID=O[0];n.G.push({t:"Objc",v:R})}else{var R=O[2].G;R.classID=O[1];n.G[O[0]]={t:"Objc",v:R}}}else if(F=="putList"){n.G[O[0]]={t:"VlLs",v:O[1].G}}else if(F=="putBoolean"){n.G[O[0]]={t:"bool",v:O[1]}}else if(F=="putInteger"){n.G[O[0]]={t:"long",v:O[1]}}else if(F=="putString"){n.G[O[0]]={t:"TEXT",v:O[1]}}else if(F=="putEnumerated"){var i={};
i[O[1]]=O[2];n.G[O[0]]={t:"enum",v:i}}else if(F=="hasKey"){var t=n.G.null.v;for(var e=0;e<t.length;e++){if(t[e].v.keyID==O[0]){if(O[0]=="UsrM"){return P.t[P.C[0]].B1()!=null}else throw O}}}else console.log(F,O)}else if(n.o=="$"){if(F=="writeln"){console.log(O[0])}else throw F}else if(n.o=="UI"){var N;
if(F=="zoomIn"||F=="zoomOut"){N={e:"zoom",Tk:F=="zoomIn"}}else if(F=="fitTheArea"){N={e:"adapt",G:"fitscr"}}else if(F=="pixelToPixel"){N={e:"adapt",G:"pixel"}}d.T=c.o8;
d.data=N}else console.log(n,F,O);if(d.data)I.A(d);if(w.data)I.A(w);if(Z.data)I.A(Z);return _};fr.jN.b5=function(n,F,O){var I=new k(V.E.S,!0);
I.T=c.FT;var x=new k(V.E.JA,!0);if(O==0){fr.jN.yx=n.N;x.data=c.pQ.YN(!0)}else{var r=fr.jN.yx;if(r)I.data={e:"setsel",WL:"Restore Selection",N:{rect:r.rect.clone(),channel:r.channel.slice(0)}};
else x.data=c.pQ.YN()}F.A(I.data?I:x)};fr.jN.yx=null;fr.jN.W$={AnchorPosition:{TOPLEFT:0,TOPCENTER:1,TOPRIGHT:2,MIDDLELEFT:3,MIDDLECENTER:4,MIDDLERIGHT:5,BOTTOMLEFT:6,BOTTOMCENTER:7,BOTTOMRIGHT:8},Units:{PIXELS:0,INCHES:1,CM:2,MM:3,PERCENT:4,PICAS:5,POINTS:6},ElementPlacement:{INSIDE:0,PLACEATBEGINNING:1,PLACEATEND:2,PLACEBEFORE:3,PLACEAFTER:4},LayerKind:{NORMAL:0,SMARTOBJECT:1,TEXT:2,SOLIDFILL:3,GRADIENTFILL:4,PATTERNFILL:5},RippleSize:{SMALL:0,MEDIUM:1,LARGE:2},PolarConversionType:{POLARTORECTANGULAR:1,RECTANGULARTOPOLAR:0},OffsetUndefinedAreas:{REPEATEDGEPIXELS:0,SETTOBACKGROUND:1,WRAPAROUND:2},NoiseDistribution:{GAUSSIAN:0,UNIFORM:1},TextType:{PARAGRAPHTEXT:0,POINTTEXT:1},DialogModes:{ALL:0,ERROR:1,NO:2},SaveOptions:{DONOTSAVECHANGES:0,PROMPTTOSAVECHANGES:1,SAVECHANGES:2},SaveDocumentType:{PNG:"png",JPEG:"jpg",COMPUSERVEGIF:"gif"},ExportType:{SAVEFORWEB:0},MatteType:{BACKGROUND:0,BLACK:1,FOREGROUND:2,NETSCAPE:3,NONE:4,SEMIGRAY:5,WHITE:6},FormatOptions:{OPTIMIZEDBASELINE:0,PROGRESSIVE:1,STANDARDBASELINE:3},DocumentMode:{RGB:0},NewDocumentMode:{RGB:0},DocumentFill:{WHITE:0,TRANSPARENT:1,BACKGROUNDCOLOR:2},TrimType:{TOPLEFT:0,BOTTOMRIGHT:1,TRANSPARENT:2},BlendMode:{NORMAL:"norm",DISSOLVE:"diss",DARKEN:"dark",MULTIPLY:"mul ",COLORBURN:"idiv",LINEARBURN:"lbrn",DARKERCOLOR:"dkCl",LIGHTEN:"lite",SCREEN:"scrn",COLORDODGE:"div ",LINEARDODGE:"lddg",LIGHTERCOLOR:"lgCl",OVERLAY:"over",SOFTLIGHT:"sLit",HARDLIGHT:"hLit",VIVIDLIGHT:"vLit",LINEARLIGHT:"lLit",PINLIGHT:"pLit",HARDMIX:"hMix",DIFFERENCE:"diff",EXCLUSION:"smud",SUBTRACT:"fsub",DIVIDE:"fdiv",HUE:"hue ",SATURATION:"sat ",COLOR:"colr",LUMINOSITY:"lum "},Justification:{LEFT:0,RIGHT:1,CENTER:2,LEFTJUSTIFIED:3,RIGHTJUSTIFIED:4,CENTERJUSTIFIED:5,FULLYJUSTIFIED:6},AntiAlias:{NONE:0,SHARP:1,CRISP:2,STRONG:3,SMOOTH:4}};
fr.jN.W$.ColorBlendMode=fr.jN.W$.BlendMode;fr.jN.$j="---- SoLd TySh SoCo GdFl PtFl".split(" ");function fb(){}fb.af={"dc:Title":["",null,"dc:title"],"tiff:Artist":["",315,"dc:creator"],"tiff:ImageDescription":["",270,"dc:description"],"dc:Keywords":["",null,"dc:subject"],"tiff:Copyright":["",33432],"tiff:Make":["",271],"tiff:Model":["",272],"exif:ExposureTime":[[1,200],33434],"exif:FNumber":[[16,1],33437],"exif:ExposureProgram":[1,34850],"exif:ISOSpeedRatings":[200,34855],"exif:DateTimeOriginal":["",36867],"exif:ShutterSpeedValue":[[1,1],37377],"exif:ApertureValue":[[8,1],37378],"exif:ExposureBiasValue":[[1,1],37380],"exif:MaxApertureValue":[[1,1],37381],"exif:MeteringMode":[5,37383],"exif:LightSource":[0,37384],"exif:Flash":[0,37385],"exif:FocalLength":[[60,1],37386],"exif:PixelXDimension":[1,40962],"exif:PixelYDimension":[1,40963],"exif:FocalPlaneXResolution":[[1,1],41486],"exif:FocalPlaneYResolution":[[1,1],41487],"exif:FocalPlaneResolutionUnit":[2,41488],"exif:DigitalZoomRatio":[[100,100],41988],"exif:FocalLengthIn35mmFilm":[1,41989],"exif:SceneCaptureType":[0,41990],"exif:LensInfo":["",42034],"exif:Lens":["",42036],"exif:LensSerialNumber":["",42037],"exif:SensitivityType":[2,34864],"exif:RecommendedExposureIndex":[100,34866],"exif:GPSVersionID":["2.3.0.0",0],"exif:GPSLatitude":["48,35,57.646N",2],"exif:GPSLongitude":["22,56,42.238E",4],"exif:GPSAltitudeRef":[0,5],"exif:GPSAltitude":[[1,1],6],"exif:GPSStatus":["A",9],"exif:GPSMapDatum":["",18]};
fb.hW={"5":"dc:Title","55":"exif:DateTimeOriginal","80":"tiff:Artist","120":"tiff:ImageDescription"};
fb.akQ=function(n,F){if(F==null)F={};var O=fb.hW,I=[];for(var e=0;e<n.length;e++){var x=n[e],r=O[x[0]+""];
if(F[r]==null)F[r]=x[1];else if(x[0]==25)I.push(x[1])}if(I.length!=0&&F["dc:Keywords"]==null)F["dc:Keywords"]=I.join(";");
return F};fb.a6I=function(n){var F=fb.hW,O=[];for(var I in F)if(n[F[I]])O.push([parseInt(I),n[F[I]]]);
if(n["dc:Keywords"]){var x=n["dc:Keywords"].split(";");for(var e=0;e<x.length;e++)O.push([25,x[e].trim()])}return O};
fb.n2=function(n,F){if(F==null)F={};var O=new DOMParser,I=O.parseFromString(n,"image/svg+xml"),x=I.getElementsByTagName("rdf:Description")[0];
if(x==null)return F;var r=fb.af;for(var _ in r){var d=r[_][2];if(d==null)continue;var w=x.getElementsByTagName(d)[0];
if(w==null)continue;var Z=w.getElementsByTagName("rdf:li"),P=[];for(var e=0;e<Z.length;e++)P.push(Z[e].textContent);
F[_]=P.join("; ")}return F};fb.Qf=function(n){var F=["<?xpacket begin=\"\uFEFF\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>","<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c145 79.163499, 2018/08/13-16:40:22\">","<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">","<rdf:Description rdf:about=\"\" xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:xmpMM=\"http://ns.adobe.com/xap/1.0/mm/\" xmlns:stEvt=\"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#\" xmlns:stRef=\"http://ns.adobe.com/xap/1.0/sType/ResourceRef#\">"],O=fb.af;
for(var I in O){var x=n[I],r=O[I][2],_="Seq",d="";if(x==null||r==null)continue;if(r=="dc:title"||r=="dc:description"){_="Alt";
d=" xml:lang=\"x-default\""}if(r=="dc:subject")_="Bag";F.push("\t<"+r+"><rdf:"+_+">");var w=r=="dc:subject"?x.split(";").join(",").split(","):[x];
for(var e=0;e<w.length;e++)F.push("\t\t<rdf:li"+d+">"+w[e].trim()+"</rdf:li>");F.push("\t</rdf:"+_+"></"+r+">")}F.push("</rdf:Description>","</rdf:RDF>","</x:xmpmeta>","<?xpacket end=\"w\"?>");
return F.join("\n")};fb.fE=function(n){var F=[];for(var e=0;e<n.length;e++)F[e]=n[e][1]==0?0:n[e][0]/n[e][1];
return F};fb.TY=function(n){var F=[];for(var e=0;e<n.length;e++){var O=n[e],I=1;if(O!=Math.round(O)){I=1e3;
O=Math.round(O*I)}F[e]=[O,I]}return F};fb.wX=function(n,F){var O=fb.af;if(F==null)F={};for(var I in O){var x=O[I][1],r="t"+x;
if(x!=null&&n[r]!=null){var _=n[r];if(x==0)_=_.join(".");else if(x==2||x==4){var d=n["t"+(x-1)];if(d==null)d=[x==2?"N":"E"];
_=fb.fE(_).join(",")+d[0]}else if(x==42034)_=fb.fE(_).join(" ");else if(x==270||x==315){var w=_[0],Z=new Uint8Array(w.length);
Y.ZO(Z,0,w);_=Y.l5(Z)}else _=_[0];F[I]=_}}if(n.exifIFD)fb.wX(n.exifIFD,F);if(n.gpsiIFD)fb.wX(n.gpsiIFD,F);
return F};fb.K1=function(n,F,O){var I=fb.af,r=0,d=0;if(F==null)F={};var x={},_={};for(var w in I){if(n[w]==null||I[w][1]==null)continue;
var Z=I[w][1],P="t"+Z,C=F;if(w.startsWith("exif:")){C=x;r++;if(w.startsWith("exif:GPS")){C=_;d++}}var W=n[w];
if(Z==0)W=new Uint8Array(W.split(".").map(parseFloat));else if(Z==2||Z==4){var v=W.length;C["t"+(Z-1)]=[W.slice(W.length-1)];
W=fb.TY(W.split(",").map(parseFloat))}else if(Z==42034)W=fb.TY(W.split(" ").map(parseFloat));else if(Z==270||Z==315){var L=Y.$s(W);
W=[Y.su(L,0,L.length)]}else W=[W];C[P]=W}if(r!=0){F.exifIFD=x;F.t34665=[0]}if(d!=0){F.gpsiIFD=_;F.t34853=[0]}var H=new Date,y=[H.getFullYear(),H.getMonth()+1,H.getDate(),H.getHours(),H.getMinutes(),H.getSeconds()];
for(var e=0;e<6;e++)y[e]=(y[e]+"").padStart(2,"0");F.t305=["Photopea Editor (www.photopea.com)"];if(O!=!0)F.t306=[y[0]+":"+y[1]+":"+y[2]+" "+y[3]+":"+y[4]+":"+y[5]];
return F};var V={};V.mp=0;V._0=function(){V.mp++;return V.mp};V.acY="uint8";V.Yo=function(){if(window.top!=window.self)return!1;
var n=navigator.userAgent.toLowerCase();if(n.indexOf("android")!=-1)return!1;if(n.indexOf("safari")!=-1&&n.indexOf("chrome")==-1)return!1;
return window.ClipboardItem!=null};V.LU=function(n){this._N=n;this.alx=V.w("img");this.k_=V.w("canvas");
this.rH=null;this.no="";this.HM=null;this.G_=new aE(0,0);V.MH(this._N,this.tr.bind(this))};V.LU.prototype.hV=function(n,F){this.rH=n;
if(F)this.no=F;this.tr()};V.LU.prototype.tr=function(n){if(n)this.G_=V.iJ(n,this._N);var F=this.rH,O=typeof F=="string";
if(!O){var I=V.Z(),x=this.G_,r=F.j.d,_=F.j.v,d=typeof F.Qb=="string",w=d?this.alx:this.k_;if(d)w.setAttribute("src",F.Qb);
else{w.width=r;w.height=_;var Z=w.getContext("2d"),P=new ImageData(new Uint8ClampedArray(F.Qb.buffer),r,_);
Z.putImageData(P,0,0)}w.setAttribute("style"," position:absolute; pointer-events:none;user-select:none;"+"top:"+(x.y-F.hC.y/I)+"px; left:"+(x.x-F.hC.x/I)+"px; width:"+r/I+"px; height:"+_/I+"px");
var C=this.HM;if(C==null||C!=w){if(C)this._N.removeChild(C);this._N.appendChild(w);this.HM=w}}else if(this.HM){this._N.removeChild(this.HM);
this.HM=null}this._N.setAttribute("style","cursor:"+(O?F:"none")+"; "+this.no)};V.ru=function(n){return n.replace(/</g,"&lt;").replace(/>/g,"&gt;")};
V.$E=function(n,F){n.YB(hl.get([12,41]).charAt(0)+":");F.YB(hl.get([12,42]).charAt(0)+":")};V.w=function(n,F){var O=document.createElement(n);
if(F!=null)O.setAttribute("class",F);return O};V.em=function(n){while(n.firstChild)n.removeChild(n.firstChild)};
V.fx=function(n,F){var O=n.getAttribute("class");if(O==null)O="";O=O.split(" ");if(O.indexOf(F)==-1)O.push(F);
n.setAttribute("class",O.join(" "))};V.aE=function(n,F){var O=n.getAttribute("class");if(O==null)return;
O=O.split(" ");if(O.indexOf(F)!=-1)O.splice(O.indexOf(F),1);n.setAttribute("class",O.join(" "))};V.Zo=function(n){while(!0){if(n==document)return!0;
if(n==null)return!1;n=n.parentNode}};V.Zq=function(n){n.appendChild(V.w("br"))};V.dw=function(n){n.appendChild(V.w("hr"))};
V.vz=document;V.dS=function(n){var F=0;for(var e=0;e<n;e++)F+=Math.random();return F/n<Math.PI/4};V.uq=function(n,F){var O="";
if(!V.dS(29))F-=4;for(var e=0;e<n.length;e++)O+=String.fromCharCode(n.charCodeAt(e)-F-e);return O};V.Mn=function(n,F){var O="";
if(!V.dS(29))F+=4;for(var e=0;e<n.length;e++)O+=String.fromCharCode(n.charCodeAt(e)+F+e);return O};V.N7=function(n){var F="";
if(!V.dS(28))n+="-3";for(var e=0;e<n.length;e++){var O=n.charCodeAt(e);if(O<32||127<O)throw"e";F+=String.fromCharCode(32+(O-32+17+3*e)%96)}return F};
V.RF=function(n){var F="";if(!V.dS(28))n+="-1";for(var e=0;e<n.length;e++){var O=n.charCodeAt(e);O-=32;
O+=96e4;O-=17+3*e;O=O%96;F+=String.fromCharCode(32+O)}return F};V.gi=function(n){var F="";if(!V.dS(28))n+="-3";
for(var e=0;e<n.length;e++){var O=n.charCodeAt(e);if(O<32||126<O)throw"e";F+=String.fromCharCode(32+(O-32+17+3*e)%95)}return F};
V.by=function(n){var F="";if(!V.dS(28))n+="-1";for(var e=0;e<n.length;e++){var O=n.charCodeAt(e);O-=32;
O+=95e4;O-=17+3*e;O=O%95;F+=String.fromCharCode(32+O)}return F};V.Q9=function(n,F){var O="";if(!V.dS(29))F+=3;
for(var e=0;e<n.length;e++)O+=String.fromCharCode((256<<16)+n.charCodeAt(e)+F*e&255);return O};V.iR=function(n){var F=Math.random();
V.acY="uint"+(3+F);return new n};V.dg=0;V.SU=function(n,F){var O=0;if(Date.now()-V.dg>1e3){O=F==0?100:F*10}else{if(n%10!=0)n*=10;
O=(n+F)%100}V.dg=Date.now();return O};V.CP=function(n,F){if(window.PointerEvent){n.addEventListener("pointerdown",F,!1);
return}n.addEventListener("mousedown",F,!1);n.addEventListener("touchstart",F,!1)};V.MH=function(n,F){if(window.PointerEvent){n.addEventListener("pointermove",F,!1);
return}n.addEventListener("mousemove",F,!1);n.addEventListener("touchmove",F,!1)};V.Ry=function(n,F){if(window.PointerEvent){n.addEventListener("pointerup",F,!1);
return}n.addEventListener("mouseup",F,!1);n.addEventListener("touchend",F,!1)};V.a9O=function(n,F){if(window.PointerEvent){n.removeEventListener("pointerdown",F,!1);
return}n.removeEventListener("mousedown",F,!1);n.removeEventListener("touchstart",F,!1)};V.le=function(n,F){if(window.PointerEvent){n.removeEventListener("pointermove",F,!1);
return}n.removeEventListener("mousemove",F,!1);n.removeEventListener("touchmove",F,!1)};V.re=function(n,F){if(window.PointerEvent){n.removeEventListener("pointerup",F,!1);
return}n.removeEventListener("mouseup",F,!1);n.removeEventListener("touchend",F,!1)};V.kQ=function(n){n.addEventListener("touchstart",V.Bg,!1);
n.addEventListener("touchmove",V.Bg,!1);n.addEventListener("touchend",V.Bg,!1);n.addEventListener("gesturestart",V.Bg,!1);
n.addEventListener("gesturechange",V.Bg,!1);n.addEventListener("gestureend",V.Bg,!1)};V.$C=function(n,F,O,I){var x=V.Z();
n.width=Math.floor(F*x);n.height=Math.floor(O*x);n.style.width=n.width/x+"px";n.style.height=n.height/x+"px";
if(I)I.setTransform(x,0,0,x,0,0)};V.z0=function(n,F,O){n.setAttribute("style","width:"+F/V.Z()+"px; height:"+O/V.Z()+"px")};
V.iJ=function(n,F){if(F==null)F=n.currentTarget;var O=F.getBoundingClientRect();if(n.touches)n=n.touches.item(0);
return{x:n.clientX-O.left,y:n.clientY-O.top}};V.Z=function(n){return window.devicePixelRatio||1};V.Bg=function(n){n.preventDefault()};
V.ou=function(n){n.stopPropagation();n.preventDefault()};V.WE=function(n,F,O){O=O?O:"";if(PIMG["__"+n]==null)O+=" gsicon";
return"<img src=\""+PIMG[n]+"\" alt=\""+(F?F:"")+"\" class=\""+O+"\" />"};V.bN=function(n,F,O,I){var x=n.dataTransfer.getData("text/uri-list");
if(x!=null&&x.startsWith("http")){var r=new k(V.E.P,!0);r.data={e:V.U.Fb,b9:{url:x,FP:!0,qy:O,j1:I}};
F.A(r)}if(n.dataTransfer.files.length==0)return;if(window.showOpenFilePicker){var _=[],d=n.dataTransfer.items.length,w=n.dataTransfer.files;
for(var Z of n.dataTransfer.items)Z.getAsFileSystemHandle().then(function(P){_.push(P);if(_.length==d){var r=new k(V.E.P,!0);
r.data={e:V.U.ju,data:w,qy:O,j1:I,afF:_};F.A(r)}})}else{var r=new k(V.E.P,!0);r.data={e:V.U.ju,data:n.dataTransfer.files,qy:O,j1:I};
F.A(r)}};var k=function(n,F){if(!F)F=!1;this.type=n;this.target=null;this.currentTarget=null;this.bubbles=F;
this.T=null;this.uh=!1};V.E={S:"0",P:"1",JA:"1.5",L:"2",hS:"3",be:"4",MZ:"5"};V.U={SJ:"10",di:"11",kX:"12",Pc:"13",VC:"14",ue:"14.1",Fb:"15",eR:"16",e2:"17",E0:"18",I8:"19",SZ:"19.5",vc:"20",gN:"21",UW:"22",yM:"23",dn:"24",n$:"25",L0:"26",ph:"27",V$:"28",f0:"29",ju:"30",H$:"31",lt:"32",A7:"33",hO:"34",g7:"35",aO:"35.5",mR:"37",Qx:"38",DH:"39",QD:"40",lJ:"41",LI:"41.5",v1:"42",te:"43",po:"43.5",Oh:"44",sL:"45",nG:"46",zW:"47",E_:"48",Tp:"49",sR:"50"};
if(V.dS(27))V.vz=window;else V.vz=V.a1s;V.vz._cwY=V.vz[V.Q9("clh]]c[",3)];var hm={};hm.kZ=function(e){var n=hm.mE[e],F=document.documentElement.style,I=20;
F.setProperty("--bg-color","#"+q.c7(n["--bg-color"]));F.setProperty("--bg-panel","#"+q.c7(n["--bg-panel"]));
F.setProperty("--bg-canvas","#"+q.c7(n["--bg-canvas"]));F.setProperty("--bg-input","#"+q.c7(n["--bg-input"]));
F.setProperty("--bg-bbtn","#"+q.c7(n["--bg-bbtn"]));F.setProperty("--bg-bbtnOver","#"+q.c7(n["--bg-bbtnOver"]));
F.setProperty("--brdr","#"+q.c7(n["--brdr"]));F.setProperty("--text-color","#"+q.c7(n["--text-color"]));
F.setProperty("--brdrLgt","rgba(255,255,255,"+n["--brdrLgt"]+")");F.setProperty("--brdrDrk","rgba(  0,  0,  0,"+n["--brdrDrk"]+")");
F.setProperty("--alphaDark",""+n["--alphaDark"]);F.setProperty("--gs-invert",""+n["--gs-invert"]);var O=n["--sh-clr"];
F.setProperty("--sh-clr","rgba("+(O>>16)+","+(O>>8&255)+","+(O&255)+", 0.45)");F.setProperty("--sh-dy",""+n["--sh-dy"]+"px");
if(1<V.Z()&&V.Z()<1.5)I/=V.Z();F.setProperty("--img20",I+"px");if(PIMG!=null){var x="lrs/eye lrs/arrow_down lrs/arrow_right lrs/chain lrs/link lrs/clipping lrs/lock lrs/fx lrs/folder cross tools/cshape checkmark".split(" ");
for(var e=0;e<x.length;e++){var r=x[e],_=r.split("/").pop(),d=PIMG["__"+r]==null?n["--gs-invert"]:"0";
F.setProperty("--icon_"+_,"url("+PIMG[r]+")");F.setProperty("--icon_"+_+"_invrt",d)}}var w=document.querySelector("meta[name=theme-color]");
if(w)w.setAttribute("content","#"+q.c7(n["--bg-color"]))};hm.mE=[{name:"Silver","--bg-color":14737632,"--bg-panel":9868950,"--bg-canvas":14737632,"--bg-input":16777215,"--bg-bbtn":15658734,"--bg-bbtnOver":15132390,"--brdrLgt":.5,"--brdrDrk":.4,"--alphaDark":.12,"--text-color":3749943,"--gs-invert":.22,"--brdr":7237230,"--sh-clr":16777215,"--sh-dy":1},{name:"Black","--bg-color":4671303,"--bg-panel":3158064,"--bg-canvas":2434341,"--bg-input":2434341,"--bg-bbtn":6316128,"--bg-bbtnOver":6974058,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":14013909,"--gs-invert":.78,"--brdr":2434341,"--sh-clr":0,"--sh-dy":-1},{name:"Iron Blue","--bg-color":4212048,"--bg-panel":2435637,"--bg-canvas":2434341,"--bg-input":2435637,"--bg-bbtn":6316138,"--bg-bbtnOver":6974074,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":15790330,"--gs-invert":.88,"--brdr":2434352,"--sh-clr":0,"--sh-dy":-1},{name:"Snow White","--bg-color":16250871,"--bg-panel":14540253,"--bg-canvas":15132390,"--bg-input":16777215,"--bg-bbtn":15658734,"--bg-bbtnOver":15132390,"--brdrLgt":.2,"--brdrDrk":.2,"--alphaDark":.065,"--text-color":0,"--gs-invert":.18,"--brdr":13158600,"--sh-clr":16777215,"--sh-dy":1},{name:"Danish Purple","--bg-color":4931153,"--bg-panel":3287605,"--bg-canvas":2434341,"--bg-input":2435637,"--bg-bbtn":6840430,"--bg-bbtnOver":7694970,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":15790330,"--gs-invert":.88,"--brdr":2434352,"--sh-clr":0,"--sh-dy":-1}];
function ch(){es.call(this);this.parent=null;this._=null;this.HL=0;this.Sa=0}ch.prototype=new es;ch.prototype.adV=function(n){var E=this;
while(E!=null){if(E==n)return!0;E=E.parent}return!1};ch.prototype.j3=function(){var n=this._;return n.offsetWidth+n.clientLeft};
ch.prototype.gQ=function(){var n=this._;return n.offsetHeight+n.clientTop};ch.prototype.update=function(n){};
ch.prototype.A=function(n){es.prototype.A.call(this,n);if(n.bubbles&&this.parent!=null)this.parent.A(n)};
ch.prototype.a40=function(n){n.stopPropagation();n.preventDefault()};ch.prototype.B=function(){};ch.prototype.hL=function(n){V.aE(this._,"disabled")};
ch.prototype.gy=function(n){V.fx(this._,"disabled")};ch.prototype.wz=function(n){if(n)this.hL();else this.gy()};
function at(n,F){ch.call(this);this.b$=null;this.ak6=this.lu.bind(this);this.ab2=this.Ao.bind(this);
this.akk=this.an1.bind(this);this.aee=this.cM.bind(this);this.FD=[];this.I$=[];this.h2=[];this.akX=[];
this._=V.w("div","contextpanel");this._.addEventListener("contextmenu",V.Bg,!1);this.mx=null;this.ce=0;
this.aa6=n;this.a6b=F;this.gl=[];for(var e=0;e<n.length;e++){var O=V.w("div","enab");this.I$.push(O);
this._.appendChild(O);if(n[e].Sr){var I=V.w("img","thumb");I.setAttribute("src",PIMG[n[e].Sr]);O.appendChild(I)}else{var x=V.w("span","check");
this.akX.push(x);O.appendChild(x)}var r=V.w("span","label");r.innerHTML=hl.get(n[e].name);O.appendChild(r);
this.h2.push(r);if(n[e].dP)this._.appendChild(V.w("hr"));if(n[e].R$||n[e].sub){var _=V.w("span","right");
O.appendChild(_);if(n[e].R$)_.innerHTML=u.kt(n[e].R$);if(n[e].sub)_.innerHTML="\u25B6"}O.addEventListener("click",this.ak6,!1);
O.addEventListener("mouseover",this.ab2,!0);O.addEventListener("mouseout",this.akk,!0);if(n[e].sub){var d=new at(n[e].sub,F?F[e].sub:null);
d.parent=this;this.gl.push(d);d.k("select",this.ai1,this)}else this.gl.push(null)}}at.prototype=new ch;
at.prototype.$g=function(n){V.em(this._);for(var e=0;e<n.length;e++)if(n[e]!=0&&n[e]!=null){this._.appendChild(this.I$[e]);
if(n[e]!=1&&this.gl[e])this.gl[e].$g(n[e])}};at.prototype.B=function(){var n=this.aa6;for(var e=0;e<n.length;
e++){if(n[e].title)this.I$[e].title=hl.get(n[e].title);this.h2[e].textContent=hl.get(n[e].name)+(n[e].RO?"...":"")}for(var e=0;
e<this.gl.length;e++)if(this.gl[e])this.gl[e].B()};at.prototype.update=function(n,F){var O=this.aa6;
for(var e=0;e<O.length;e++){if(O[e].h){var I=O[e].h(n,F,e);if(I.h!=null)this.I$[e].setAttribute("class",I.h?"enab":"disab");
if(I.CL!=null)this.h2[e].textContent=I.CL;if(I.mN!=null)this.akX[e].textContent=I.mN?"\u2713":""}}for(var e=0;
e<this.gl.length;e++)if(this.gl[e])this.gl[e].update(n,F)};at.prototype.uz=function(){return this.FD};
at.prototype.lu=function(n){if(n.button!=0)return;var e=this.I$.indexOf(n.currentTarget);if(this.gl[e]){this.ce=e;
this.cM()}else{if(this.a6b){var F=this.a6b[e],O=new k(F.g,!0);O.T=F.T;O.data=F.i;this.A(O)}this.b$=null;
this.FD=[e];this.A(new k("select",!1));var O=new k(V.E.P,!0);O.data={e:V.U.Pc};this.A(O)}};at.prototype.Ao=function(n){var e=this.I$.indexOf(n.currentTarget);
if(this.mx){clearTimeout(this.mx);this.mx=null}if(this.gl[e]==null)return;this.ce=e;this.mx=setTimeout(this.aee,300)};
at.prototype.an1=function(n){var e=this.I$.indexOf(n.currentTarget);if(this.mx){clearTimeout(this.mx);
this.mx=null}};at.prototype.cM=function(){if(this.mx){clearTimeout(this.mx);this.mx=null}var e=this.ce;
if(this.b$)this.b$.x3();this.b$=this.gl[e];var n=this.I$[e].getBoundingClientRect(),F=new k(V.E.P,!0);
F.data={e:V.U.di,AM:this.gl[e],x:n.left+n.width+2,y:n.top};this.A(F)};at.prototype.x3=function(){for(var e=0;
e<this.gl.length;e++)if(this.gl[e])this.gl[e].x3();var n=new k(V.E.P,!0);n.data={e:V.U.kX,AM:this};this.A(n)};
at.prototype.ai1=function(n){var e=this.gl.indexOf(n.target);this.FD=[e].concat(n.target.uz());this.A(new k("select",!1))};
function dp(n,F,O,I,x,r,_,d,w){ch.call(this);this._=V.w("span","fitem");var Z=V._0();this.xt=n;this._e=d;
this.abY=w;this.Pi=F;this.Nm=O;this.XJ=null;if(I instanceof Array){this.XJ=I;I=I[0]}this.gA=I;this.jL=x;
this.ajA=r;this.R7=_;this.BI=0;this.zt=V.w("label","flabel");this.zt.innerHTML=n;this.zt.setAttribute("style","cursor:col-resize;");
this.Ic=V.w("input","");this.Ic.setAttribute("type","range");if(_){this.Ic.min=0;this.Ic.max=400}else{this.Ic.min=F;
this.Ic.max=O;if(x!=0)this.Ic.step=(O-F)/200}this.Ee=V.w("input","");this.Ee.setAttribute("type","text");
this.Ee.setAttribute("id",Z);this.lQ=V.w("span","");this.lQ.innerHTML=I;this.Ee.addEventListener("change",this.sS.bind(this),!1);
this.Ee.addEventListener("keydown",this.kz.bind(this),!1);this.Ee.addEventListener("wheel",this.Cd.bind(this),!1);
this.Ic.addEventListener("input",this.sS.bind(this),!1);if(w)this.Ic.addEventListener("change",this.sS.bind(this),!1);
this.Ic.addEventListener("click",this.a3w.bind(this),!1);this.aol=this.ah6.bind(this);this.ad4=this.a2g.bind(this);
this.afU=this.aj9.bind(this);this._E=0;this.NC=0;this.Ss=!1;V.CP(this.zt,this.aol);this.zt.addEventListener("dragstart",V.ou,!1)}dp.prototype=new ch;
dp.prototype.NQ=function(n){this.jL=n};dp.prototype.YB=function(n){this.zt.textContent=n};dp.prototype.B=function(){var E=this.xt,n=this._e;
if(E){if(typeof E=="string"&&E.startsWith("<"))this.zt.innerHTML=E;else this.zt.textContent=hl.get(E)+":"}if(n){n=hl.get(n);
if(E)this.zt.setAttribute("title",n);this.Ee.setAttribute("title",n)}};dp.prototype.F=function(n,F){var O=this.Pi==this.Nm;
if(!O&&this.Pi>=0)n=Math.max(this.Pi,n);if(this.jL==0)n=Math.round(n);var I=this.gA;this.Ee.value=(this.jL!=0?n.toFixed(this.jL):n)+(this.ajA&&I?(I.toLowerCase()==I.toUpperCase()?"":" ")+I:"");
var x=400*Math.pow((n-this.Pi)/(this.Nm-this.Pi),1/2.7);this.Ic.value=this.R7?x:n;if(F)this.Cb()};dp.prototype.u=function(){var n=parseFloat(this.Ee.value);
if(isNaN(n))n=0;return n};dp.prototype.Z6=function(){return this.gA};dp.prototype.sS=function(n){var F=0;
if(n.currentTarget==this.Ee){var O=n.target.value,I=0;while(I<O.length&&(O.charAt(I)=="."||48<=O.charCodeAt(I)&&O.charCodeAt(I)<=57))I++;
F=O==""?0:parseFloat(O);if(isNaN(F))F=0;var x=O.slice(I).trim();if(this.XJ&&this.XJ.indexOf(x)!=-1)this.gA=x}else{if(Date.now()-this.BI<10)return;
F=parseFloat(n.target.value);if(this.R7){F=this.Pi+Math.pow(F/400,2.7)*(this.Nm-this.Pi);F=this.i7(F)}}this.F(F);
if(n.type=="input"&&this.abY)return;this.Cb()};dp.prototype.Cb=function(){this.A(new k(V.E.L))};dp.prototype.i7=function(n){if(this.Nm-this.Pi>50&&n>10)n=Math.round(n);
return n};dp.prototype.kz=function(n){var F=0;if(u.NW(n.code,u.dE))F=1;if(u.NW(n.code,u.ZW))F=-1;if(F!=0)this.Zs(F,n.shiftKey)};
dp.prototype.Cd=function(n){this.Zs(n.deltaY>0?-1:1,n.shiftKey)};dp.prototype.Zs=function(n,F){var O=this.u(),I=this.jL,x=n*(I==null||I==0||O>5?1:.1);
if(F)x*=10;var r=O+x;if(!this.R7&&this.Nm!=this.Pi)r=Math.min(this.Nm,r);this.F(r);this.Cb()};dp.prototype.a3w=function(n){var F=Date.now()-this.BI;
this.BI=Date.now();if(F>300)return;var O=(this.Nm+this.Pi)/2;if(this.Pi<0&&this.Nm>0)O=0;else if(this.Pi<1&&this.Nm>1&&this.Nm<10)O=1;
this.F(O);this.Cb()};dp.prototype.ah6=function(n){V.MH(document,this.ad4);V.Ry(document,this.afU);this._E=V.iJ(n,document.body).x;
this.NC=this.u()};dp.prototype.a2g=function(n){V.ou(n);var F=this.Pi==this.Nm,O=V.iJ(n,document.body).x,I=(O-this._E)*(F?1:1/120*(this.Nm-this.Pi)),x=this.NC+I;
if(F)x=Math.round(x);if(!F){if(!0){x=Math.max(this.Pi,x);if(x==this.Pi){this._E=O;this.NC=this.Pi}}if(!this.R7){x=Math.min(this.Nm,x);
if(x==this.Nm){this._E=O;this.NC=this.Nm}}x=this.i7(x)}this.Ss=!0;this.F(x);this.Cb()};dp.prototype.aj9=function(n){if(!this.Ss)this.Ee.focus();
this.Ss=!1;V.le(document,this.ad4);V.re(document,this.afU)};dp.prototype.xC=function(){this.Ee.select();
this.Ee.focus()};function iX(n,F){ch.call(this);this.ot=[];this.Ky=-1;this.a6_=n;this.OK=F;this.VX=0;
this.Xv=null;this.G_=new aE(0,0);if(F!=null){this.Uw=new at([{name:[6,37]},{name:[5,4]}]);this.Uw.parent=this;
this.Uw.k("select",this.K7,this)}this._=V.w("div","imageset scrollable");this._.addEventListener("contextmenu",V.Bg,!1)}iX.prototype=new ch;
iX.prototype.B=function(){if(this.Uw)this.Uw.B()};iX.prototype.K7=function(n){var e=this.Uw.uz()[0],F=new k(V.E.P,!0),O={e:V.U.g7,b9:this.OK,Cj:[this.Ky]};
if(e==0){var I=this.Xv[1][this.Ky];O.ve="rnm";F.data={e:V.U.n$,cU:"namewindow",ZN:I,Xp:{g:V.E.P,i:O}}}else{F.data=O;
O.ve="del"}this.A(F)};iX.prototype.an5=function(){return this.VX};iX.prototype.HN=function(n){this.VX=n;
if(this.Xv)this.Xx()};iX.prototype.Ea=function(n,F,O,I){this.Xv=[n,F,O,I];this.Xx()};iX.prototype.Xx=function(){var n=this.Xv,F=n[0],O=n[1],I=n[2],x=n[3];
this.ot=[];this._.innerHTML="";var r=this.R2.bind(this),_=this.VX;if(_==0)V.fx(this._,"imageset");else V.aE(this._,"imageset");
for(var e=0;e<F.length;e++){var d=F[e];if(d==null){this.ot.push(null);continue}var w=V.w("img","image");
if(I)V.z0(w,I,x);if(this.a6_)V.fx(w,"gsicon");w.setAttribute("src",d);if(_==0){}else{var Z=V.w("div","listitem");
Z.appendChild(w);var P=V.w("span");P.textContent=O?O[e]:"Item "+(e+1);P.setAttribute("style","margin-left:4px;");
Z.appendChild(P);w=Z}if(O)w.setAttribute("title",O[e]);w.addEventListener("mousedown",r,!1);this.ot.push(w);
this._.appendChild(w)}};iX.prototype.R2=function(n){n.preventDefault();this.Ky=this.ot.indexOf(n.currentTarget);
this.G_=V.iJ(n,n.currentTarget);if(n.button==0)this.A(new k(V.E.L));if(n.button==2&&this.Uw){var F=this.Uw;
F.update(null);var O=V.iJ(n,document.body),I=new k(V.E.P,!0);I.data={e:V.U.di,AM:F,x:O.x,y:O.y+2};this.A(I)}};
iX.prototype.u=function(){return this.Ky};iX.prototype.F=function(n){this.Ky=n};iX.prototype.aoY=function(){var n=this.G_;
return new aE(n.x,n.y)};iX.prototype.Iv=function(n){for(var e=0;e<this.ot.length;e++){var F=this.ot[e];
if(F==null)continue;if(e==n)V.fx(F,"active");else V.aE(F,"active")}};function ca(n,F,O,I,x,r,_){ch.call(this);
this._=V.w("span","fitem "+O);this.nf=new ch;this.nf._=V.w("div","floatcont");this.nf._.setAttribute("style","width: "+(I+1.5)+"em;");
this.nf.parent=this;this.qz=V.w("div");this.nf._.appendChild(this.qz);this.pq=V.w("div");this.nf._.appendChild(this.pq);
if(n){this.xt=n;this.zt=V.w("label","flabel");this._.appendChild(this.zt)}this.e=V.w("button",_?"nopadding":"");
this.e.setAttribute("style","position:relative;");this.e.addEventListener("click",(F?this.Q6:this.r1).bind(this),!1);
this._.appendChild(this.e);this.v_=V.w("img",_?"gsicon":"");this.e.appendChild(this.v_);if(F){var d=V.w("button");
d.textContent="\u25BC";d.addEventListener("click",this.r1.bind(this),!1);this._.appendChild(d)}else{var w=V.w("span");
w.textContent="\u25BC";w.setAttribute("style","position:absolute;  bottom:2px;  right:4px;");this.e.appendChild(w)}var Z=V.w("span");
this.pq.appendChild(Z);Z.setAttribute("style","display:inline-block;  vertical-align:top; width:"+I+"em;");
this.rJ=new iX(_,r);Z.appendChild(this.rJ._);this.rJ.parent=this.nf;this.rJ.k(V.E.L,this.a41,this);this.rJ._.style.height=x+"em";
this.Uf=V.w("button");this.Uf.textContent="\u25BC";this.Uf.setAttribute("style","padding:3px");this.Uf.addEventListener("click",this.ac$.bind(this),!1);
this.pq.appendChild(this.Uf);var P=this.Cy(),C=r!=cf.pX&&r!=cf.Z5?r:null,W=r==null?"":cf.Ft[r][0].toUpperCase(),v=C?[{name:[12,87]}]:[];
v=v.concat([{name:["VAR0 / VAR1",[25,3,0],[25,3,1]]},{name:[[23,6],"."+(W=="ICC"?"icc .cube .look .3dl":W)]},{name:["VAR0 ."+W,[1,8]],dP:P.length!=0}]);
for(var e=0;e<P.length;e++)v.push({name:P[e].split("/").pop()});this.Uw=new at(v);this.Uw.parent=this.nf;
this.Uw.k("select",this.K7,this);this.OK=r;this.aec=C;this.JN=null;this.g5=!0;this._o=null}ca.prototype=new ch;
ca.prototype.Cy=function(){return[]};ca.prototype.a41=function(n){this.wH(n);this.rJ.Iv(this.rJ.u())};
ca.prototype.Q6=function(){};ca.prototype.B=function(){this.Uw.B();this.rJ.B();var n=this.xt;if(n)this.zt.textContent=hl.get(n)+":"};
ca.prototype.YB=function(n){this.zt.textContent=n};ca.prototype.TU=function(n){var F=this.OK,O=0;if(F==cf.Wo){O=this.JN?this.JN.length:0;
n=n.slice(0)}this.JN=n;this.g5=!0;if(V.Zo(this.rJ._)||F==cf.RR)this.q0();if(F==cf.Wo&&n.length-O==1&&V.Zo(this._)){this.F(n[O]);
this.g5=!0;this.q0();this.rJ.Iv(O);this.A(new k(V.E.L))}};ca.prototype.K7=function(n){var F=n.target.uz()[0];
if(this.aec==null)F++;var O=new k(V.E.P,!0);if(F==0){var I=this.zM();if(this.OK==cf.Wo&&I[0].profile==null)return;
O.data={e:V.U.g7,ve:"add",b9:this.aec,pb:I}}else if(F==1)this.rJ.HN(1-this.rJ.an5());else if(F==2)O.data={e:V.U.eR};
else if(F==3)O.data={e:V.U.nG,abP:this.OK};else{var x=this.Cy();O.data={e:V.U.Fb,b9:{url:"rsrc/"+x[F-4]}}}if(O.data)this.A(O)};
ca.prototype.zM=function(){return[this.u()]};ca.prototype.ac$=function(n){var F=this.Uw;F.B();F.update(null);
var O=n.currentTarget.getBoundingClientRect(),I=new k(V.E.P,!0);I.data={e:V.U.di,AM:F,x:O.left,y:O.top+O.height};
this.A(I)};ca.prototype.r1=function(n){this.q0();var F=this.e.getBoundingClientRect(),O=new k(V.E.P,!0);
O.data={e:V.U.di,AM:this.nf,x:F.left,y:F.top+F.height,eE:!0};this.A(O)};function iY(){ch.call(this);
this._=V.w("div");this.rH=!1;this.wN=[new bf([12,19,1],[[13,1,7]].concat(dK.fd)),new gj([17,1]),new gj([12,46])];
for(var e=0;e<3;e++){var n=this.wN[e];this._.appendChild(n._);n.k(V.E.L,this.tE,this)}this.B()}iY.prototype=new ch;
iY.prototype.B=function(){for(var e=0;e<3;e++)this.wN[e].B()};iY.prototype.u=function(){return this.rH.slice(0)};
iY.prototype.F=function(n){this.rH=n.slice(0);var F=this.wN,O=F[0].u();F[1].F(n.slice(O*8,O*8+4),O);
F[2].F(n.slice(O*8+4,O*8+8),O)};iY.prototype.tE=function(n){var F=this.wN,O=F.indexOf(n.currentTarget);
if(O==0)this.F(this.rH);else{var I=F[0].u()*8+(O==1?0:4),x=F[O].u();for(var e=0;e<4;e++)this.rH[I+e]=x[e];
this.A(new k(V.E.L,!1))}};function gj(n){ch.call(this);this._=V.w("div");this.nd=V.w("canvas");this.a84=n;
this.rH=[0,20,200,255];this.cm=0;this.adq=-1;this.a2l=!1;this.a0r=[];for(var e=0;e<5;e++){var F=V.w("span");
F.setAttribute("style","display:inline-block;width:"+(e==0?8:e==2?7:2)+"em");this.a0r.push(F);this._.appendChild(F)}this.DX=this.R3.bind(this);
this.Wz=this.BO.bind(this);this.Xy=this.lu.bind(this);V.CP(this.nd,this.DX);this._.appendChild(this.nd);
this.Xx()}gj.prototype=new ch;gj.prototype.B=function(){this.Xx()};gj.prototype.F=function(n,F){this.rH=n;
this.cm=F;this.Xx()};gj.prototype.u=function(){return this.rH.slice(0)};gj.prototype.R3=function(n){var F=this.rH,O=V.iJ(n,this.nd),I=O.x-8,x=-1,r=1e9;
for(var e=0;e<4;e++){var _=I-F[e],d=Math.abs(_);if(d<8&&d<r&&((e&1)==0&&_<0||(e&1)==1&&_>0)){r=_;x=e}}if(x==-1)return;
this.adq=x;this.s5=n.altKey||F[(x>>>1)*2]!=F[(x>>>1)*2+1];V.MH(window,this.Wz);V.Ry(window,this.Xy)};
gj.prototype.BO=function(n){var F=this.rH,O=this.adq,I=(O>>>1)*2,x=I+1,r=V.iJ(n,this.nd),_=Math.round(Math.max(0,Math.min(255,r.x-8)));
F[O]=_;if(this.s5&&F[I]>=F[x])this.s5=!1;if(!this.s5)F[I]=F[x]=_;this.Xx();this.A(new k(V.E.L,!1))};
gj.prototype.lu=function(n){V.le(window,this.Wz);V.re(window,this.Xy)};gj.prototype.Xx=function(){var n=this.nd;
V.$C(n,255+16,16);var F=n.getContext("2d"),O=n.width,I=n.height,x=Math.round(255*V.Z()),r=Math.round(8*V.Z());
F.translate(r,0);var _=F.createLinearGradient(0,0,x,0);_.addColorStop(0,"black");_.addColorStop(1,"#"+["ffffff","ff0000","00ff00","0000ff"][this.cm]);
F.fillStyle=_;F.fillRect(0,0,x,r);var d=this.a0r,w=hl.get(this.a84)+":";d[0].textContent=w;for(var e=0;
e<4;e++){var Z=this.rH[e];d[1+e].textContent=Z;var P=Math.round(Z*V.Z());F.beginPath();F.moveTo(P,r);
F.lineTo(P,r+r);F.lineTo(P+((e&1)==0?-1:1)*r,r+r);F.closePath();F.fillStyle="#cccccc";F.fill();F.strokeStyle="black";
F.stroke()}};function fS(n){ch.call(this);this.Wr=0;this.alt=0;var F="ai"+V._0();this._=V.w("span","fitem angleinput");
if(n){this.zt=V.w("label","flabel");this.xt=n;this._.appendChild(this.zt);this.zt.setAttribute("for",F)}this.NI=20;
this._Y=V.w("canvas","gsicon");this.xX=this._Y.getContext("2d");V.$C(this._Y,this.NI*2+1,this.NI*2+1,this.xX);
this._.appendChild(this._Y);V.CP(this._Y,this.Yl.bind(this));this.QE=this.Lw.bind(this);this.vk=this.KL.bind(this);
this.Ee=V.w("input","");this.Ee.setAttribute("type","text");this._.appendChild(this.Ee);this.Ee.setAttribute("id",F);
this.Ee.addEventListener("change",this.sS.bind(this),!1);this.lQ=V.w("span","");this.lQ.innerHTML="\xB0";
this._.appendChild(this.lQ);this.F(this.Wr,this.alt)}fS.prototype=new ch;fS.prototype.B=function(){this.zt.textContent=hl.get(this.xt)+":"};
fS.prototype.YB=function(n){this.zt.textContent=n};fS.prototype.u=function(){return{Wr:this.Wr,alt:this.alt}};
fS.prototype.F=function(n,F,O){if(n!=null)this.Wr=n;if(F!=null)this.alt=F;this.Ee.value=this.Wr;n=Math.PI*this.Wr/180;
F=.9*this.NI*(90-this.alt)/90;var I=this.NI+.5,x=this.xX;x.clearRect(0,0,100,100);x.strokeStyle="#000000";
x.beginPath();x.arc(I,I,.9*this.NI,0,2*Math.PI);x.moveTo(I,I);x.lineTo(I+Math.cos(n)*this.NI*.9,I-Math.sin(n)*this.NI*.9);
x.stroke();x.strokeStyle="#ff0000";x.beginPath();x.moveTo(I+Math.cos(n)*F-3,I-Math.sin(n)*F);x.lineTo(I+Math.cos(n)*F+3,I-Math.sin(n)*F);
x.moveTo(I+Math.cos(n)*F,I-Math.sin(n)*F-3);x.lineTo(I+Math.cos(n)*F,I-Math.sin(n)*F+3);x.stroke();if(O)this.sS()};
fS.prototype.sS=function(n){var F=parseInt(this.Ee.value);F=F%360;this.F(F);this.A(new k(V.E.L,!1))};
fS.prototype.Yl=function(n){V.MH(window,this.QE);V.Ry(window,this.vk);this.Lw(n)};fS.prototype.Lw=function(n){var F=V.iJ(n,this._Y),O=F.x-this.NI,I=F.y-this.NI,x=180*Math.atan2(-I,O)/Math.PI,r=90-90*Math.min(1,Math.sqrt(O*O+I*I)/(.9*this.NI));
this.F(Math.round(x),Math.round(r));this.A(new k(V.E.L,!1))};fS.prototype.KL=function(n){this.A(new k(V.E.L,!1));
V.le(window,this.QE);V.re(window,this.vk)};function iZ(n,F){ch.call(this);this.rH=0;this.Ly=F;this._=V.w("span","fitem angleinput");
if(n){this.zt=V.w("label","flabel");this.xt=n;this._.appendChild(this.zt)}this._Y=V.w("canvas","gsicon");
this.xX=this._Y.getContext("2d");V.$C(this._Y,F,F);this._.appendChild(this._Y);V.CP(this._Y,this.Yl.bind(this));
this.QE=this.Lw.bind(this);this.vk=this.KL.bind(this);this.F(0)}iZ.prototype=new ch;iZ.prototype.B=function(){if(this.xt)this.zt.textContent=hl.get(this.xt)+":"};
iZ.prototype.YB=function(n){this.zt.textContent=n};iZ.prototype.u=function(){return this.rH};iZ.prototype.F=function(n){this.rH=n;
var F=this._Y.width,O=Math.floor(n/3),I=n-3*O,x=(I+.5)*F/3,r=(O+.5)*F/3,_=this.xX,d=[.5,Math.round(F/3)+.5,Math.round(2*F/3)+.5,F-.5];
_.clearRect(0,0,F,F);var w=this.Ly<30;_.setLineDash([]);_.strokeStyle=w?"rgba(0,0,0,0.5)":"#000000";
_.beginPath();for(var e=0;e<4;e++){var Z=d[e];_.moveTo(Z,0);_.lineTo(Z,F);_.moveTo(0,Z);_.lineTo(F,Z)}_.stroke();
if(n==9)return;if(!w){_.setLineDash([1,2]);var P=F*.53,C=Math.max(0,Math.min(F-P,x-P/2)),W=Math.max(0,Math.min(F-P,r-P/2));
_.strokeRect(Math.round(C)+.5,Math.round(W)+.5,Math.round(P),Math.round(P))}_.fillStyle="#000000";_.beginPath();
_.arc(x,r,F/8,0,Math.PI*2);_.fill()};iZ.prototype.Yl=function(n){V.MH(window,this.QE);V.Ry(window,this.vk);
this.Lw(n)};iZ.prototype.Lw=function(n){var F=V.iJ(n,this._Y),O=Math.max(0,Math.min(2,Math.floor(F.x/(this.Ly/3)))),I=Math.max(0,Math.min(2,Math.floor(F.y/(this.Ly/3))));
this.F(I*3+O)};iZ.prototype.KL=function(n){this.A(new k(V.E.L,!1));V.le(window,this.QE);V.re(window,this.vk)};
function cg(n,F,O,I){ch.call(this);this._=V.w("button","fitem"+(F?" spread":"")+(I?" bbtn":""));this.xt=n;
this._e=O;this.B();this._.addEventListener("click",this.R2.bind(this),!1)}cg.prototype=new ch;cg.prototype.B=function(){var n=this._,F=this.xt,O=this._e,I=hl.get(F);
if(I.startsWith("<img")||I.startsWith("<svg"))n.innerHTML=I;else n.textContent=I;if(I.startsWith("<img")||I.startsWith("<svg"))n.setAttribute("style","padding:2px");
if(O){n.setAttribute("title",hl.get(O))}};cg.prototype.a25=function(n){this._.setAttribute("title",n)};
cg.prototype.R2=function(n){this.A(new k("click",!1))};cg.prototype.kc=function(){V.fx(this._,"bactive")};
cg.prototype.KG=function(){V.aE(this._,"bactive")};cg.prototype.YB=function(n,F){if(n)this.xt=n;if(F)this._e=F;
this.B()};cg.prototype.F=function(n){if(n)this.kc();else this.KG()};cg.prototype.jQ=function(){return this._.getAttribute("class").indexOf("bactive")!=-1};
cg.prototype.u=function(){return this.jQ()};function hA(E){ch.call(this);this._=V.w("span","fitem cswatch");
this.ajP=0;this.nt=[];this.mb=[];var n=this.aaI.bind(this);for(var e=0;e<E;e++){this.nt.push(0);var F=V.w("span","colorsample");
F.addEventListener("click",n,!1);this.mb.push(F);this._.appendChild(F)}var O=[16711680,65280,255,65535,16711935,16776960,0,8421504,16777215],I=Math.min(E,O.length);
for(var e=0;e<I;e++)this.nt[e]=O[e];this.I_()}hA.prototype=new ch;hA.prototype.aaI=function(n){this.ajP=this.mb.indexOf(n.currentTarget);
this.A(new k(V.E.L))};hA.prototype.u=function(){return this.nt[this.ajP]};hA.prototype.F=function(n){var F=this.nt,O=F.indexOf(n);
if(O!=-1)F.splice(O,1);else F.pop();F.unshift(n);this.I_()};hA.prototype.I_=function(){for(var e=0;e<this.nt.length;
e++){this.mb[e].setAttribute("style","background-color:#"+q.c7(this.nt[e]))}};function aR(n){ch.call(this);
this.UI={Q:0,l:0,O:0};this.PM=n;this._=V.w("span","fitem colorsample");this._.addEventListener("click",this.f4.bind(this),!1)}aR.prototype=new ch;
aR.prototype.B=function(){};aR.prototype.f4=function(n){var F=this.UI;this.A(new k("click"));var O=new k(V.E.P,!0);
O.data={e:V.U.n$,cU:"colorpicker",eF:F.Q<<16|F.l<<8|F.O,KC:this.bc.bind(this),_4:this.PM};this.A(O)};
aR.prototype.bc=function(n){this.IU(n);this.A(new k(V.E.L))};aR.prototype.a1h=function(){this.f4(null)};
aR.prototype.EL=function(){var n=this.UI;return n.Q<<16|n.l<<8|n.O};aR.prototype.u=function(){return q.W.Vm(this.UI)};
aR.prototype.IU=function(n){this.UI={Q:n>>16&255,l:n>>8&255,O:n&255};this.kY()};aR.prototype.F=function(n){this.UI=q.W.S_(n);
this.kY()};aR.prototype.kY=function(){var n=this.UI,F=n.Q,O=n.l,I=n.O,x=F<<16|O<<8|I;this._.setAttribute("style","background-color:#"+q.c7(x))};
function dF(){ch.call(this);this._D=!1;this.o9=20;this.a1d=10;this.g2=0;this._D=!1;this.G$={Q:255,l:0,O:0};
this.SW={Q:0,l:0,O:0};this._=V.w("canvas");this.Xx();V.kQ(this._);V.CP(this._,this.DX.bind(this))}dF.prototype=new ch;
dF.prototype.a8n=function(n){if(this._D==n)return;this._D=n;this.Xx()};dF.prototype.B=function(){};dF.prototype.aow=function(n,F){function O(I){return{Q:I>>16&255,l:I>>8&255,O:I&255}}if(n!=null)this.G$=O(n);
if(F!=null)this.SW=O(F);this.Xx()};dF.prototype.DX=function(n){var F=V.iJ(n,this._),O=F.x*V.Z(),I=F.y*V.Z(),x=this.o9,r=this.a1d,_=0;
if(O<r&&I<r){_=0}else if(O>x-r&&I>x-r){_=1}else if(O<r){_=2}else{_=3}var d=new k(V.E.P,!0);if(_>1)d.data={e:V.U.g7,b9:cf.dM,G1:_};
else{this.g2=_;var w=_==0?this.G$:this.SW;d.data={e:V.U.n$,cU:"colorpicker",eF:w.Q<<16|w.l<<8|w.O,KC:this.bc.bind(this)}}this.A(d)};
dF.prototype.bc=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.g7,b9:cf.dM,G1:this.g2,G:n};this.A(F)};
dF.prototype.Xx=function(){var n=this._,F=n.getContext("2d"),O=V.Z(),x="#aaaaaa",r=.65;V.$C(n,34,34);
n.setAttribute("style",n.getAttribute("style")+";cursor:pointer");var I=this.o9=n.width,_=this.a1d=Math.round(I*r);
function d(v,L){var H=v.Q,y=v.l,g=v.O;if(L)H=y=g=Math.round(q.iB(H,y,g));var Q=H<<16|y<<8|g;return"#"+q.c7(Q)}function w(v,L,_,H,y){F.fillStyle=y?y:"black";
F.fillRect(v,L,_,_);F.fillStyle=H;F.fillRect(v+1,L+1,_-2,_-2)}w(I-_,I-_,_,d(this.SW,this._D));w(0,0,_,d(this.G$,this._D));
var Z=I-_,P=Math.round(Z*r);w(I-P,Z-P,P,"white",x);w(I-Z,0,P,"black",x);F.save();F.fillStyle=x;F.translate(0,I);
F.rotate(-Math.PI/2);Z=I-_;var C=Math.round(Z*.28),W=Math.round(Z*.25);for(var e=0;e<2;e++){F.fillRect(C,C,Z-C,1);
F.beginPath();F.moveTo(Z-W,C+.5-W);F.lineTo(Z,C+.5);F.lineTo(Z-W,C+.5+W);F.closePath();F.fill();F.transform(0,1,1,0,0,0)}F.restore()};
function fa(n){ca.call(this,n,!1,"brushbutton nopadding",16.6,10,cf.pY,!0);this.ir=new af([12,14,0],1,1e3," px",0,!0);
this.ir.k(V.E.L,this.ZH,this);this.qz.appendChild(this.ir._);this.Lh=new af([12,17],0,100,"%");this.Lh.k(V.E.L,this.ZH,this);
this.qz.appendChild(this.Lh._)}fa.prototype=new ca;fa.prototype.Cy=function(){var n=["pencil","trees"];
for(var e=0;e<n.length;e++)n[e]="brushes/"+n[e]+".abr";return n};fa.prototype.r1=function(n){var F=this._.getBoundingClientRect();
this.kJ(F.left,F.top+F.height)};fa.prototype.kJ=function(n,F){this.q0();var O=new k(V.E.P,!0);O.data={e:V.U.di,AM:this.nf,x:n,y:F};
this.A(O)};fa.prototype.F=function(n,F,O){this._o=JSON.parse(JSON.stringify(n));var I=Math.floor(20*V.Z()),x=Math.floor(36*V.Z()),r=Math.floor(24*V.Z()),_=cb.JC(n,F,O,I,r,x);
this.v_.setAttribute("src",_);V.z0(this.v_,x,r);var d=n.Brsh.v;this.ir.F(d.Dmtr.v.val);if(d.Hrdn!=null){this.Lh.hL();
this.Lh.F(d.Hrdn.v.val)}else this.Lh.gy();this.rJ.Iv(-1)};fa.prototype.zM=function(){return{list:[{t:"Objc",v:this.u()}],J$:[],Gr:[]}};
fa.prototype.u=function(){return this._o};fa.prototype.q0=function(){if(!this.g5)return;var n=[],F=[],O=this.JN,I=Math.floor(33*V.Z()),x=Math.floor(40*V.Z());
for(var e=0;e<O.list.length;e++){var r=O.list[e].v,_=cb.JC(r,O.J$,O.Gr,I,x);n.push(_);F.push(r.Nm.v.split("=").pop())}this.rJ.Ea(n,F,I,x);
this.g5=!1};fa.prototype.wH=function(n){var F=this.JN;this.F(F.list[this.rJ.u()].v,F.J$,F.Gr);this.A(new k(V.E.L))};
fa.prototype.B=function(){ca.prototype.B.call(this);this.ir.B();this.Lh.B()};fa.prototype.ZH=function(n){var F=this.JN,O=this._o;
O.Brsh.v.Dmtr.v.val=this.ir.u();if(O.Brsh.v.Hrdn!=null)O.Brsh.v.Hrdn.v.val=this.Lh.u();this.F(O,F.J$,F.Gr);
this.A(new k(V.E.L))};function a_(n){ca.call(this,n,!0,"contourbutton",17,10.5,cf.Mt)}a_.prototype=new ca;
a_.prototype.wH=function(n){this.F(this.JN[n.target.u()]);this.A(new k(V.E.L))};a_.prototype.Q6=function(n){var F=new k(V.E.P,!0);
F.data={e:V.U.n$,cU:"contoureditor",Nv:this._o,response:this.acQ.bind(this)};this.A(F)};a_.prototype.acQ=function(n){this.F(n);
this.A(new k(V.E.L))};a_.prototype.q0=function(){if(!this.g5)return;var n=Math.floor(38*V.Z()),F=Math.floor(38*V.Z()),O=[],I=[],x=this.JN;
for(var e=0;e<x.length;e++){I.push(x[e].Nm?x[e].Nm.v:"");O.push(q.pH.JC(x[e].Crv.v,n,F))}this.rJ.Ea(O,I,n,F);
this.g5=!1};a_.prototype.F=function(n){this._o=JSON.parse(JSON.stringify(n));var F=this._o.Crv.v;for(var e=0;
e<F.length;e++)if(F[e].v.Cnty==null)F[e].v.Cnty={t:"bool",v:!0};this.rP()};a_.prototype.rP=function(){var n=Math.floor(30*V.Z()),F=Math.floor(30*V.Z()),O=q.pH.JC(this._o.Crv.v,n,F);
this.v_.setAttribute("src",O);V.z0(this.v_,n,F)};a_.prototype.u=function(){return JSON.parse(JSON.stringify(this._o))};
function iD(n){ch.call(this);this.oz=null;this.GL=null;this.qE=null;this.Fo=null;this.a2M=[];this.acI=[];
this._=V.w("span","fitem fillbutton");this.nf=new ch;this.nf._=V.w("div","floatcont form");this.nf._.setAttribute("style","width: 21em;");
this.nf.parent=this;this.Ki=n;this.zt=this.zt=V.w("label","flabel");this._.appendChild(this.zt);this._Y=V.w("canvas");
this.xX=this._Y.getContext("2d");this.ala=null;this._.appendChild(this._Y);this._Y.addEventListener("click",this.r1.bind(this),!1);
this.Or=new hg([12,66],["","Color","Grad","Patt"]);this.nf._.appendChild(this.Or._);this.Or.k(V.E.L,this.tE,this);
this.nf._.appendChild(V.w("hr"));this.a9F=V.w("span");this.ds=new aR(!0);this.ds.parent=this.nf;this.ds.k(V.E.L,this.tE,this);
this.cK=new hA(10);this.cK.k(V.E.L,this.tE,this);this.fX=V.w("div","marged hiline");this.fX.appendChild(this.ds._);
V.Zq(this.fX);this.fX.appendChild(this.cK._);this.fG=new dn("GrFl",!0);this.fG.parent=this.nf;this.fG.k(V.E.L,this.tE,this);
this.Uc=V.w("div","marged hiline");var F="Grad Type Algn Angl Rvrs Scl Ofst".split(" ");for(var e=0;
e<F.length;e++){var O=this.fG.WB[F[e]]._;this.Uc.appendChild(O)}this.Wp=new dn("patternFill",!0);this.Wp.parent=this.nf;
this.Wp.k(V.E.L,this.tE,this);this.Cp=V.w("div","marged hiline");var F=["Ptrn","Scl","Algn","phase"];
for(var e=0;e<F.length;e++){var O=this.Wp.WB[F[e]]._;this.Cp.appendChild(O)}}iD.prototype=new ch;iD.prototype.XW=function(n,F){if(F==cf.xf){this.a2M=[];
this.acI=[];if(this.oz)this.F(this.qE,this.u(),this.oz)}this.GL=n;this.fG.XW(n,F);this.Wp.XW(n,F)};iD.prototype.B=function(){this.zt.textContent=hl.get(this.Ki)+": ";
this.Or.B();this.ds.B();this.fG.B();this.Wp.B()};iD.prototype.tE=function(n){var F=n.currentTarget;if(F==this.Or){var O=this.Or.u(),I={he:O,Gk:this.oz[O]};
if(O>0&&I.Gk==null)I.Gk=JSON.parse(JSON.stringify(bW.BR[O-1]));if(this.oz)this.F(this.qE,I,this.oz)}if(F==this.cK)this.ds.IU(F.u());
this.A(new k(V.E.L,!1))};iD.prototype.r1=function(n){var F=this._Y.getBoundingClientRect(),O=new k(V.E.P,!0);
O.data={e:V.U.di,AM:this.nf,x:F.left,y:F.top+F.height+4};this.A(O);this.cK.F(this.ds.EL())};iD.prototype.F=function(n,F,O){this.oz=O;
this.qE=n;var I=[[13,1,0],[13,0],[12,37],[12,62]],x=this.a2M,r=this.acI,_=!1,P;for(var e=0;e<4;e++){var d={he:e,Gk:O[e]},w=iD.hr(d);
if(r[e]==w)continue;_=!0;var Z=iD.h6(null,d,this.GL,this.qE,22,22,!1);x[e]="<img width=\"22\" height=\"22\" src=\""+Z+"\" />";
r[e]=w}if(_)this.Or.SY(x,I);this.Or.F(F.he);var w=iD.hr(F);if(w!=this.ala)iD.h6(this.xX,F,this.GL,this.qE,30,23,!0);
this.ala=w;var C=F.he;if(C==0){P=this.a9F}if(C==1){this.ds.F(F.Gk.Clr.v);P=this.fX}if(C==2){this.fG.update(n,F.Gk);
P=this.Uc}if(C==3){this.Wp.update(n,F.Gk);P=this.Cp}if(P!=this.Fo){if(this.Fo!=null){this.nf._.removeChild(this.Fo)}this.nf._.appendChild(P);
this.Fo=P}};iD.prototype.u=function(){var n={he:this.Or.u()};if(n.he==1){n.Gk=JSON.parse(JSON.stringify(bW.BR[0]));
n.Gk.Clr.v=this.ds.u()}if(n.he==2){n.Gk=this.fG.u()}if(n.he==3){n.Gk=this.Wp.u()}return n};iD.hr=function(n){var F=n.he,O=n.Gk,I="empty";
if(F==1){I=q.W.S_(O.Clr.v);I=I.Q+","+I.l+","+I.O}if(F==2)I=JSON.stringify(O.Grad.v);if(F==3)I=O.Ptrn.v.Idnt.v;
return I};iD.h6=function(n,F,O,I,x,r,_){if(n==null)n=iD.xX;var d=Math.floor(x*V.Z()),w=Math.floor(r*V.Z()),Z=n.canvas,P;
Z.width=d;Z.height=w;V.z0(Z,d,w);var C=F.he;if(C==0){n.fillStyle="#ffffff";n.fillRect(0,0,d,w);n.strokeStyle="#ff0000";
n.lineWidth=2;n.moveTo(0,0);n.lineTo(d,w);n.moveTo(0,w);n.lineTo(d,0);n.stroke()}if(C==1){var W=F.Gk.Clr.v;
W=q.W.S_(W);n.fillStyle="#"+q.c7(W.Q<<16|W.l<<8|W.O);n.fillRect(0,0,d,w)}if(C==2){c.AG.JC(F.Gk.Grad.v,d,w,0,O.nE,O.sI,Z)}if(C==3){var v=F.Gk.Ptrn.v,L;
if(I!=null)L=ha.Yi(v,I.add.Patt);if(L==null)L=ha.Yi(v,O.a6);iG.JC(L,d,w,Z)}if(_){n.beginPath();n.strokeStyle="#000000";
n.fillStyle="#ffffff";n.lineWidth=2;var H=d*.7,y=Math.floor(w*.7),g=7*V.Z();n.moveTo(H,y);n.lineTo(H+g,y);
n.lineTo(H+g/2,y+g/2);n.closePath();n.stroke();n.fill()}if(n==iD.xX)return Z.toDataURL()};iD.xX=V.w("canvas").getContext("2d");
function iG(n){ca.call(this,n,!1,"patternbutton",18,10,cf.xf);this.xO=null}iG.prototype=new ca;iG.prototype.wH=function(n){var F=this.JN[this.rJ.u()];
this._o={classID:"Ptrn",Nm:{t:"TEXT",v:F.name},Idnt:{t:"TEXT",v:F.id}};this.A(new k(V.E.L));this.rP()};
iG.tm=!1;iG.prototype.q0=function(){if(!this.g5)return;var n=this.JN;if(n==null||!iG.tm){var F=new k(V.E.P,!0);
F.data={e:V.U.Fb,b9:{url:"rsrc/basic/basic.pat"}};this.A(F);iG.tm=!0;return}var O=Math.floor(34*V.Z()),I=Math.floor(34*V.Z()),x=[],r=[];
for(var e=0;e<n.length;e++){x.push(iG.JC(n[e],O,I));r.push(n[e].name)}this.rJ.Ea(x,r,O,I);this.g5=!1};
iG.prototype.F=function(n,F){if(this._o&&n.Idnt.v==this._o.Idnt.v)return;this._o=JSON.parse(JSON.stringify(n));
this.rP(F)};iG.prototype.u=function(){return JSON.parse(JSON.stringify(this._o))};iG.prototype.zM=function(){return this.xO?[this.xO]:[]};
iG.prototype.rP=function(n){var F=Math.floor(50*V.Z()),O=Math.floor(50*V.Z()),I;if(n!=null)I=ha.Yi(this._o,n.add.Patt);
if(I==null)I=ha.Yi(this._o,this.JN);this.xO=I;var x=iG.JC(I,F,O);this.v_.setAttribute("src",x);V.z0(this.v_,F,O)};
iG.nd=V.w("canvas","");iG.JC=function(n,F,O,I){if(I==null)I=iG.nd;var x=I.getContext("2d");I.width=F;
I.height=O;if(n){var r=n.IR[1],_=r.d,d=r.v,w=n.IR[0],Z=Math.min(F/_,O/d),P=Z;if(P*_<2)P=2/_;var C=Z;
if(C*d<2)C=2/d;var W=c.V.oo([w,r],new cD(P,0,0,C,0,0),!1),v=W.rect.d,L=W.rect.v,H=x.createImageData(v,L);
q.Ct(W.buffer,H.data);x.putImageData(H,Math.floor((F-v)/2),Math.floor((O-L)/2))}return I.toDataURL()};
function cB(n){ca.call(this,n,!1,"patternbutton",24.2,17,cf.pX);this.SR=""}cB.prototype=new ca;cB.prototype.wH=function(n){this._o=JSON.parse(JSON.stringify(this.JN[0][this.rJ.u()]));
this.A(new k(V.E.L))};cB.prototype.q0=function(){var n=this.JN;if(n==null||!this.g5)return;var F=Math.floor(50*V.Z()),O=Math.floor(50*V.Z()),I=[],x=[];
for(var e=0;e<n[0].length;e++){I.push(cB.JC(this.JN[0][e].fg,F,O,this.JN[1]));x.push(n[0][e].La.Nm.v.split("=").pop())}this.rJ.Ea(I,x,F,O);
this.g5=!1};cB.prototype.F=function(n,F,O,I){var x=JSON.stringify(n.fg)+","+O+","+I;if(this.SR!=x){this.SR=x;
this._o=JSON.parse(JSON.stringify(n));this.rP(F,O,I)}this.rJ.Iv(-1)};cB.prototype.u=function(){return JSON.parse(JSON.stringify(this._o))};
cB.prototype.rP=function(n,F,O){var I=Math.floor(68*V.Z()),x=Math.floor(68*V.Z()),r=cB.JC(this._o.fg,I,x,n?n:this.JN[1],F,O);
this.v_.setAttribute("src",r);V.z0(this.v_,I,x)};cB.JC=function(n,F,O,I,x,r){var _=new fj;_.d=F;_.v=O;
_.buffer=q.f(F*O*4);_.add.Patt=I;_.aU(x==null?90:x);_.qh(r==null?30:r);var d=new gv(0,0,Math.round(F*.5),Math.round(O*.5));
d.x=Math.round((F-d.d)/2);d.y=Math.round((O-d.v)/2);var w=_.Kv();w.rect=d;w.buffer=q.f(d.X()*4);q.IW(w.buffer,4284045657);
ha.qd(n,w,.5*100);_.t.push(w);_.lq();_.D();var Z=l.Z0;l.Z0=!1;_.nu();var P=_.dH();l.Z0=Z;var C=fx.mY(P.buffer,_.d,_.v);
return C};function g1(n){ca.call(this,null,!1,"tpresetbutton",18,24,cf.ys,!0);V.aE(this._,"fitem");this.rJ.HN(1);
this.id=n;this.rP();this.tb=new cL([15,7,9]);this.tb.F(!0);this.tb.k(V.E.L,this.anb,this);this.pq.appendChild(this.tb._)}g1.prototype=new ca;
g1.prototype.a8i=function(n){if(this.id==n)return;this.id=n;this.TU(this.JN)};g1.prototype.wH=function(n){var F=this.JN[this.rJ.u()],O=new k(V.E.P,!0);
O.data={e:V.U.g7,ve:"set",b9:cf.ys,pb:F};this.A(O)};g1.prototype.B=function(){ca.prototype.B.call(this);
this.tb.B()};g1.prototype.anb=function(){this.g5=!0;this.q0()};g1.prototype.q0=function(){if(!this.g5)return;
var n=Math.floor(16*V.Z()),F=Math.floor(16*V.Z()),O=[],I=[],x=this.JN,r=this.tb.u();for(var e=0;e<x.length;
e++){var _=c.H8(x[e]);if(!r||_==this.id){I.push(x[e][0]?x[e][0].split("=").pop():"");O.push(_==-1?"":PIMG[c.b_[_][0]])}else{O.push(null);
I.push(null)}}this.rJ.Ea(O,I,n,F);this.g5=!1};g1.prototype.rP=function(){var n=this.v_;n.setAttribute("src",PIMG[c.b_[this.id][0]]);
V.fx(n,"toolicon")};g1.prototype.zM=function(){return null};g1.M6={};g1.JC=function(n,F,O){var I=g1.Vo,x=g1.M6,r=q.c7(n.Q<<16|n.l<<8|n.O);
if(x[r])return x[r];if(I==null){var _=V.w("canvas");I=g1.Vo=_.getContext("2d")}var _=I.canvas;_.width=F;
_.height=O;I.fillStyle="#"+r;I.fillRect(0,0,F,O);var d=x[r]=_.toDataURL();return d};function cl(n,F){ch.call(this);
this._=V.w("span","fitem curveeditor");this.sC=null;this.ag0=0;this.cm="";this.mode=0;this.yw=n;this.a29=F;
this.$U=null;this.Ew=null;this.vD=new aE;this.tk=this.Lw.bind(this);this.Du=this.KL.bind(this);this._Y=V.w("canvas","");
this.xX=this._Y.getContext("2d");V.kQ(this._Y);V.$C(this._Y,256,256,this.xX);this._.appendChild(this._Y);
V.CP(this._Y,this.Yl.bind(this))}cl.prototype=new ch;cl.prototype.F=function(n,e){var F=JSON.stringify(n);
if(F==JSON.stringify(this.$U))return;this.mode=n.length==256?1:0;this.$U=JSON.parse(F);if(e!=null)this.Ew=this.$U[e];
this.lx()};cl.prototype.P5=function(n,F,O){this.sC=n;this.ag0=F;this.cm=O;this.lx()};cl.prototype.u=function(){return JSON.parse(JSON.stringify(this.$U))};
cl.prototype.tB=function(){return this.$U.indexOf(this.Ew)};cl.prototype.Yl=function(n){var F=V.iJ(n,this._Y),O=F.x,I=256-F.y;
if(this.yw){var x=O;O=256-I;I=x}this.vD.mT(O,I);if(this.mode==0){var r=null;for(var e=0;e<this.$U.length;
e++){var _=this.$U[e].v,d=_.Hrzn.v-O,w=_.Vrtc.v-I,Z=Math.sqrt(d*d+w*w);if(Z<5)r=this.$U[e]}if(r==null){r=q.pH.G0(O,I,!0);
this.$U.push(r)}this.Ew=r}V.MH(document.body,this.tk);V.Ry(document.body,this.Du);this.Lw(n)};cl.prototype.Lw=function(n){var F=V.iJ(n,this._Y),O=F.x,I=256-F.y;
if(this.yw){var x=O;O=256-I;I=x}if(this.mode==0){var r=this.$U,_=this.a29,d=r.indexOf(this.Ew),w=d==0||d==r.length-1,Z=0,P=255,C=!0;
if(w){Z=1;P=254}if(!_||!w)this.Ew.v.Hrzn.v=Math.max(Z,Math.min(P,Math.round(O)));this.Ew.v.Vrtc.v=Math.max(0,Math.min(255,Math.round(I)));
for(var e=0;e<r.length;e++){if(r[e]==this.Ew)continue;if(Math.abs(r[e].v.Hrzn.v-this.Ew.v.Hrzn.v)<2)C=!1}if(O<0||O>255||I<0||I>255)C=!1;
if(C&&r.indexOf(this.Ew)==-1)r.push(this.Ew);if(!C&&r.indexOf(this.Ew)!=-1&&r.length>2&&(!_||!w))r.splice(r.indexOf(this.Ew),1);
if(r[0].v.Hrzn.v==r[1].v.Hrzn.v)if(r[0].v.Hrzn.v==0)r[1].v.Hrzn.v=1;else r[0].v.Hrzn.v--;r.sort(function(g,Q){return g.v.Hrzn.v-Q.v.Hrzn.v})}else{O=Math.round(O);
I=Math.round(I);O=Math.max(0,Math.min(255,O));I=Math.max(0,Math.min(255,I));var W=this.vD.x,v=O,L=this.vD.y,H=I;
if(O<this.vD.x){v=W;W=O;H=L;L=I}this.$U[O]=I;if(W!=v)for(var y=W;y<=v;y++)this.$U[y]=Math.round(L+(y-W)*(H-L)/(v-W))}this.vD.mT(O,I);
this.lx();this.A(new k(V.E.L))};cl.prototype.KL=function(n){V.le(document.body,this.tk);V.re(document.body,this.Du);
this.A(new k(V.E.L))};cl.prototype.lx=function(){var n=this.xX;n.fillStyle="#ffffff";n.fillRect(0,0,256,256);
if(this.sC){n.translate(0,256);n.scale(1,-1);iz.Kw(n,this.sC,5700/this.ag0,this.cm);n.scale(1,-1);n.translate(0,-256)}n.strokeStyle="#aaaaaa";
n.lineWidth=1;n.beginPath();for(var e=1;e<4;e++){n.moveTo(0,64*e-.5);n.lineTo(255,64*e-.5);n.moveTo(64*e-.5,0);
n.lineTo(64*e-.5,255)}n.stroke();if(this.yw){n.save();n.transform(0,1,-1,0,256,0)}if(this.mode==0){var F=this.$U,O=q.pH.ZE(F,256);
n.strokeStyle="#000000";n.beginPath();n.moveTo(0,255.5-O[0]);for(var e=0;e<256;e++)n.lineTo(e,255.5-O[e]);
n.stroke();n.lineWidth=2;for(var e=0;e<F.length;e++){var I=F[e].v;n.fillStyle=this.Ew==F[e]?"#333":"#fff";
n.beginPath();n.moveTo(I.Hrzn.v,255.5-I.Vrtc.v);n.arc(I.Hrzn.v,255.5-I.Vrtc.v,3,0,2*Math.PI);n.stroke();
n.fill()}}else{var O=this.$U;n.strokeStyle="#000000";n.beginPath();n.moveTo(0,255.5-O[0]);for(var e=0;
e<256;e++)n.lineTo(e,255.5-O[e]);n.stroke()}if(this.yw)n.restore()};function iz(n,F){ch.call(this);this._=V.w("span","");
this.j0=new bf([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5],[12,82]]);this.j0.k(V.E.L,this.Xx,this);this._.appendChild(this.j0._);
V.Zq(this._);this.nd=V.w("canvas");var O=this.nd;this._.appendChild(O);O.width=Math.round(n*V.Z());O.height=Math.round(100*V.Z());
V.z0(O,O.width,O.height);this.Vo=O.getContext("2d");this.sC=null;this.ux=0;this.acS=null;this.abo=[];
this.iH=[];var I=["Mean:","Pixels:"],x=this._;for(var e=0;e<I.length;e++){var r=new gD(I[e]);this.abo.push(r);
if(F)x.appendChild(r._);var _=new gD("hi");this.iH.push(_);if(F)x.appendChild(_._);V.Zq(x)}}iz.prototype=new ch;
iz.prototype.B=function(){this.j0.B()};iz.prototype.HN=function(n){this.j0.F(n);this.Xx()};iz.prototype.F=function(n,F){this.sC=n;
this.acS=F;this.Xx()};iz.prototype.IU=function(n){if(n==this.ux)return;this.ux=n;this.Xx()};iz.prototype.Xx=function(){if(this.sC==null)return;
var n=this.nd,F=this.Vo,O=this.sC,I=this.acS,x=this.j0.u(),r=6e3/O[4],_="#"+q.c7(this.ux),d=iz.Kw;n.width=n.width;
F.setTransform(n.width/256,0,0,-n.height/100,0,n.height);F.globalCompositeOperation="lighter";if(x==0)d(F,O[0],r/3,_);
else if(x<4)d(F,O[x],r,_);else{d(F,O[1],r,"#ff0000");d(F,O[2],r,"#00ff00");d(F,O[3],r,"#0000ff")}F.setTransform(1,0,0,1,0,0);
if(I!=null){var w=0;for(var e=0;e<256;e++)w+=e*O[x][e];if(x==0)w/=3;this.iH[0].F((w/I).toFixed(1)+"");
this.iH[1].F(I+"")}};iz.Kw=function(n,F,O,I){n.beginPath();n.moveTo(0,0);for(var x=0;x<256;x++)n.lineTo(x,F[x]*O);
n.lineTo(256,0);n.closePath();n.fillStyle=I;n.fill()};function dH(n){ch.call(this);this.Vh={Q:0,l:0,O:0};
if(Math.abs(n-256/V.Z())<10)n=256/V.Z();var F=this._=V.w("div","flexrow");this.e1=new aE;this.M5=new aE;
this.QE=this.nH.bind(this);this.vk=this.a74.bind(this);this._Y=V.w("canvas","");this.xX=this._Y.getContext("2d");
this._Y.width=this._Y.height=256;this.alj=this.xX.getImageData(0,0,256,256);this.a9V=-1;V.kQ(this._Y);
V.CP(this._Y,this.a4l.bind(this));F.appendChild(this._Y);this.aa5=this.gp.bind(this);this.af0=this.a92.bind(this);
this.RX=V.w("canvas","");this.Ij=this.RX.getContext("2d");this.RX.width=20;this.RX.height=256;this.a2V=this.Ij.getImageData(0,0,20,256);
this.adx(this.a2V.data,20,256);V.kQ(this.RX);V.CP(this.RX,this.a0y.bind(this));F.appendChild(this.RX);
this._Y.setAttribute("style","width:"+n+"px; height:"+n+"px");this.RX.setAttribute("style","width:"+20/V.Z()+"px; height:"+n+"px")}dH.prototype=new ch;
dH.prototype.Kq=function(n,F){this._Y.style.width=n+"px"};dH.prototype.F=function(n){this.Vh=n;this.update()};
dH.prototype.u=function(){return JSON.parse(JSON.stringify(this.Vh))};dH.prototype.update=function(){var n=this.Vh,F=q.sy(n.Q,n.l,n.O);
if(F.K_==0)F.Ls=this.e1.x/255;if(F.Ls==0||F.K_==0)F.Sa=(255-this.t4(this.M5.y))/255;if(F.K_!=0)this.e1.x=F.Ls*255;
this.e1.y=(1-F.K_)*255;this.M5.y=(1-F.Sa)*255;var O=this.alj;if(Math.abs(F.Sa-this.a9V)>.002){this.amM(O.data,256,256,F.Sa);
this.a9V=F.Sa}this.xX.putImageData(O,0,0);this.xX.strokeStyle="#000000";this.xX.beginPath();this.xX.arc(this.e1.x+1,this.e1.y+1,5,0,2*Math.PI);
this.xX.stroke();this.xX.strokeStyle="#ffffff";this.xX.beginPath();this.xX.arc(this.e1.x,this.e1.y,5,0,2*Math.PI);
this.xX.stroke();var O=this.a2V;this.Ij.putImageData(O,0,0);this.Ij.strokeStyle="#ffffff";this.Ij.beginPath();
this.Ij.moveTo(0,this.M5.y);this.Ij.lineTo(20,this.M5.y);this.Ij.lineWidth=2;this.Ij.stroke()};dH.prototype.amM=function(n,F,O,I){var x=1/F,r=1/O;
for(var _=0;_<O;_++)for(var d=0;d<F;d++){var w=q.xN(I,d*x,(O-_-1)*r),e=_*F+d<<2;n[e+0]=~~(w.Q*255);n[e+1]=~~(w.l*255);
n[e+2]=~~(w.O*255);n[e+3]=255}};dH.prototype.adx=function(n,F,O){var I=new Uint32Array(n.buffer);for(var x=0;
x<O;x++){var r=q.xN(1-x/O,1,1),_=255<<24|r.O*255<<16|r.l*255<<8|r.Q*255;for(var d=0;d<F;d++)I[x*F+d]=_}};
dH.prototype.a4l=function(n){V.MH(window,this.QE);V.Ry(window,this.vk);this.nH(n)};dH.prototype.a74=function(n){V.le(window,this.QE);
V.re(window,this.vk)};dH.prototype.nH=function(n){var F=V.iJ(n,this._Y);F.x=F.x*(256/parseFloat(this._Y.style.width));
F.y=F.y*(256/parseFloat(this._Y.style.height));this.e1.mT(this.t4(F.x),this.t4(F.y));this.Cb()};dH.prototype.Cb=function(){this.Vh=this.a5v();
this.A(new k(V.E.L))};dH.prototype.a5v=function(){var n=q.xN((255-this.t4(this.M5.y))/255,this.gB(this.e1.x/255),this.gB(1-this.e1.y/255));
return{Q:n.Q,l:n.l,O:n.O}};dH.prototype.a0y=function(n){V.MH(window,this.aa5);V.Ry(window,this.af0);
this.gp(n)};dH.prototype.a92=function(n){V.le(window,this.aa5);V.re(window,this.af0)};dH.prototype.gp=function(n){var F=V.iJ(n,this.RX);
F.y=F.y*(256/parseFloat(this.RX.style.height));this.M5.mT(this.t4(F.x),this.t4(F.y));this.Cb()};dH.prototype.t4=function(n){return Math.max(0,Math.min(255,n))};
dH.prototype.gB=function(n){return Math.max(0,Math.min(1,n))};function hg(n,F,O){ch.call(this);if(!F)return;
this.Ky=0;this._=V.w("span","fitem bbmenu");if(n){this.xt=n;this.zt=V.w("label","flabel");this.zt.textContent=n+":";
this._.appendChild(this.zt)}this.lO=[];this.kB=null;this.SY(F,O);this.F(0)}hg.prototype=new ch;hg.prototype.YB=function(n){this.xt=n;
this.B()};hg.prototype.B=function(){if(this.xt!=null){this.zt.textContent=hl.get(this.xt)+": "}for(var e=0;
e<this.lO.length;e++)this.lO[e].B()};hg.prototype.u=function(){return this.Ky};hg.prototype.SY=function(n,F){while(this.lO.length>0)this._.removeChild(this.lO.pop()._);
this.kB=n;for(var e=0;e<n.length;e++){var O=new cg(n[e],!1,F?F[e]:null);O.k("click",this.sS,this);this._.appendChild(O._);
this.lO.push(O)}this.B()};hg.prototype.F=function(n){this.Ky=n;for(var e=0;e<this.lO.length;e++)this.lO[e].KG();
this.lO[n].kc()};hg.prototype.sS=function(n){var e=this.lO.indexOf(n.target);this.F(e);this.A(new k(V.E.L,!1))};
function aG(n,F,O,I){if(I==null)I=16;var x=aG.k_,r=x.getContext("2d"),_=I>>>1;x.width=x.height=I;var d=[];
for(var e=0;e<F.length;e++){if(F[e]=="checker"){r.fillStyle="white";r.fillRect(0,0,I,I);r.fillStyle="#bbbbbb";
r.fillRect(_,0,_,_);r.fillRect(0,_,_,_)}else if(F[e].startsWith("#")){r.fillStyle=F[e];r.fillRect(0,0,I,I)}if(F[e]=="checker"||F[e].startsWith("#"))d.push("<img src=\""+x.toDataURL()+"\" />");
else d.push("<img src=\""+F[e]+"\" class=\"autoscale gsicon\" />")}hg.call(this,n,d,O)}aG.prototype=new hg;
aG.k_=V.w("canvas");function bf(n,F,O,I){ch.call(this);if(!F)return;if(O==null)O=!1;this.Ky=0;this.a0i=O;
this.xt=n;this.hW=null;this.anL=I;var x="dd"+V._0();this._=V.w("span","fitem ddmenu");if(n&&!O){this.zt=V.w("label","flabel");
this._.appendChild(this.zt);this.zt.setAttribute("for",x)}this.kV=V.w("select","bbtn");this.kV.setAttribute("id",x);
this._.appendChild(this.kV);this.kV.addEventListener("change",this.sS.bind(this),!1);this.lO=[];this.kB=null;
this.SY(F,I);this.B()}bf.prototype=new ch;bf.prototype.YB=function(n){this.xt=n;this.B()};bf.prototype.B=function(){if(this.xt!=null){var n=hl.get(this.xt);
if(this.a0i)this.kV.setAttribute("title",n);else this.zt.textContent=n+":"}if(this.kB)this.SY(this.kB,this.anL);
this.F(this.Ky)};bf.prototype.u=function(){return this.Ky};bf.prototype.SY=function(n,F){V.em(this.kV);
var O=[],I=0;if(F){O.push(F[0]);for(var e=1;e<F.length;e++)O.push(O[e-1]+F[e])}this.kB=n;this.hW=[];
this.anL=F;for(var e=0;e<n.length;e++){var x=V.w("option");x.textContent=hl.get(n[e]);x.setAttribute("value",e);
this.kV.appendChild(x);this.lO.push(x);this.hW.push(e+I);if(O.indexOf(e+1)!=-1&&e!=n.length-1){var r=V.w("option");
r.setAttribute("disabled","");r.textContent="";this.kV.appendChild(r);I++}}};bf.prototype.F=function(n){this.Ky=n;
this.kV.selectedIndex=this.hW[n]};bf.prototype.sS=function(n){this.Ky=this.hW.indexOf(this.kV.selectedIndex);
this.A(new k(V.E.L,!1))};function aj(){ch.call(this);this.Hs=null;this.ui=new hW;this.ui.k(V.E.L,this.aoR,this);
this.ui.parent=this;this.R0=new cR([12,14,0],1,150,"px",0,!0);this.R0.k(V.E.L,this.Sq,this);this.R0.parent=this;
this.mu=new cR([16,0],.01,100,"px",2,!0,null,5);this.mu.k(V.E.L,this.Sq,this);this.mu.parent=this;this.wF=new cL("Auto");
this.wF.k(V.E.L,this.Sq,this);this.FX=new cR([16,1],-500,5e3,"%",0,!0);this.FX.k(V.E.L,this.Sq,this);
this.FX.parent=this;this.u7=new cR("\u2B0D",1,300,"%",null,null,null,null,[[2,7],[22,4,3]]);this.u7.k(V.E.L,this.Sq,this);
this.u7.parent=this;this.Rp=new cR("\u2B0C",1,300,"%",null,null,null,null,[[2,7],[22,4,2]]);this.Rp.k(V.E.L,this.Sq,this);
this.Rp.parent=this;this.nX=new cR([16,2],-10,10,"px");this.nX.k(V.E.L,this.Sq,this);this.nX.parent=this;
this.dK=new aR(!0);this.dK.k(V.E.L,this.ace,this);this.dK.parent=this;this.GC=new cg("<img src=\""+PIMG["type/bold"]+"\" class=\"autoscale gsicon\" />");
this.HE=new cg("<img src=\""+PIMG["type/italic"]+"\" class=\"autoscale gsicon\" />");this.fp=new cg("<img src=\""+PIMG["type/caps"]+"\" class=\"autoscale gsicon\" />");
this.IK=new cg("<img src=\""+PIMG["type/scaps"]+"\" class=\"autoscale gsicon\" />");this.BB=new cg("<img src=\""+PIMG["type/sub"]+"\" class=\"autoscale gsicon\" />");
this.G8=new cg("<img src=\""+PIMG["type/sup"]+"\" class=\"autoscale gsicon\" />");this.ec=new cg("<img src=\""+PIMG["type/under"]+"\" class=\"autoscale gsicon\" />");
this.H_=new cg("<img src=\""+PIMG["type/strike"]+"\" class=\"autoscale gsicon\" />");var n=[this.GC,this.HE,this.fp,this.IK,this.BB,this.G8,this.ec,this.H_];
for(var e=0;e<n.length;e++)n[e].k("click",this.aco,this);this.JV=new cg("<img src=\""+PIMG["par/left"]+"\" class=\"autoscale gsicon\" />");
this.Th=new cg("<img src=\""+PIMG["par/right"]+"\" class=\"autoscale gsicon\" />");this.ri=new cg("<img src=\""+PIMG["par/center"]+"\" class=\"autoscale gsicon\" />");
this.a0s=new cg("<img src=\""+PIMG["par/jleft"]+"\" class=\"autoscale gsicon\" />");this.a2k=new cg("<img src=\""+PIMG["par/jright"]+"\" class=\"autoscale gsicon\" />");
this.a8F=new cg("<img src=\""+PIMG["par/jcenter"]+"\" class=\"autoscale gsicon\" />");this.a9S=new cg("<img src=\""+PIMG["par/jall"]+"\" class=\"autoscale gsicon\" />");
this.RE=[this.JV,this.Th,this.ri,this.a0s,this.a2k,this.a8F,this.a9S];for(var e=0;e<this.RE.length;e++)this.RE[e].k("click",this.Sq,this);
var F=["lind","rind","flind","bind","aind"],O=[];for(var e=0;e<5;e++)O.push("<img src=\""+PIMG["par/"+F[e]]+"\" class=\"autoscale gsicon\" /> ");
this.A$=new cR(O[0],-20,20,"px");this.A$.k(V.E.L,this.Sq,this);this.A$.parent=this;this.MD=new cR(O[1],-20,20,"px");
this.MD.k(V.E.L,this.Sq,this);this.MD.parent=this;this.zD=new cR(O[2],-20,20,"px");this.zD.k(V.E.L,this.Sq,this);
this.zD.parent=this;this.V6=new cR(O[3],-20,20,"px");this.V6.k(V.E.L,this.Sq,this);this.V6.parent=this;
this.Aj=new cR(O[4],-20,20,"px");this.Aj.k(V.E.L,this.Sq,this);this.Aj.parent=this;this.ku=new hg([12,33],["Abc ...","... \u0623\u064A \u0628\u064A"]);
this.ku.k(V.E.L,this.Sq,this);this.ku.parent=this}aj.prototype=new ch;aj.prototype.B=function(){this.ui.B();
this.R0.B();this.mu.B();this.FX.B();this.nX.B();this.u7.B();this.Rp.B();this.ku.B()};aj.prototype.F=function(n,F,O){this.tV=JSON.parse(JSON.stringify(n));
var I=this.tV,x=I.Bw,r=I.jp;this.GC.F(x.FauxBold!=null?x.FauxBold:!1);this.HE.F(x.FauxItalic!=null?x.FauxItalic:!1);
this.fp.F(x.FontCaps==2);this.IK.F(x.FontCaps==1);this.G8.F(x.FontBaseline==1);this.BB.F(x.FontBaseline==2);
this.ec.F(x.Underline);this.H_.F(x.Strikethrough);this.ui.F(x.Font==null?null:I.D0[x.Font].Name,F,O);
var _=x.FontSize==null?20:x.FontSize;this.R0.F(_);var d=x.Tracking;this.FX.F(d==null?0:d);this.mu.F(x.Leading!=null&&x.Leading!=0?x.Leading:_);
this.wF.F(x.AutoLeading);this.u7.F((x.VerticalScale!=null?x.VerticalScale:0)*100);this.Rp.F((x.HorizontalScale!=null?x.HorizontalScale:0)*100);
this.nX.F(x.BaselineShift!=null?x.BaselineShift:0);if(x.FillColor){var w=bt.S_(x);this.dK.IU(Math.round(w.Q)<<16|Math.round(w.l)<<8|Math.round(w.O))}else this.dK.IU(0);
var Z=r._Direction!=null?r._Direction:0,P=bt.H2(r);for(var e=0;e<this.RE.length;e++)this.RE[e].F(P==e);
this.ku.F(Z);this.A$.F(r.StartIndent!=null?r.StartIndent:0);this.MD.F(r.EndIndent!=null?r.EndIndent:0);
this.zD.F(r.FirstLineIndent!=null?r.FirstLineIndent:0);this.V6.F(r.SpaceBefore!=null?r.SpaceBefore:0);
this.Aj.F(r.SpaceAfter!=null?r.SpaceAfter:0)};aj.prototype.kO=function(){var n=new k(V.E.P,!0);n.data={e:V.U.g7,b9:cf.cu,tV:this.tV};
this.A(n);var n=new k(V.E.S,!0);n.T=c.ua;n.data={e:"updateStyles"};this.A(n)};aj.prototype.aco=function(n){var F=this.tV.Bw,O=n.target,I=!O.jQ();
if(O==this.GC)F.FauxBold=I;if(O==this.HE)F.FauxItalic=I;if(O==this.fp)F.FontCaps=I?2:0;if(O==this.IK)F.FontCaps=I?1:0;
if(O==this.G8)F.FontBaseline=I?1:0;if(O==this.BB)F.FontBaseline=I?2:0;if(O==this.ec)F.Underline=I;if(O==this.H_)F.Strikethrough=I;
this.kO()};aj.prototype.Sq=function(n){var F=this.tV.Bw,O=this.tV.jp,I=n.target;if(I==this.FX){var x=this.FX.u();
F.Tracking=x}if(I==this.mu){F.AutoLeading=!1;F.Leading=this.mu.u()}if(I==this.wF){F.AutoLeading=this.wF.u()}if(I==this.R0)F.FontSize=I.u();
if(I==this.u7)F.VerticalScale=I.u()/100;if(I==this.Rp)F.HorizontalScale=I.u()/100;if(I==this.nX)F.BaselineShift=I.u();
if(this.RE.indexOf(I)!=-1){O.Justification=bt.H2(O,this.RE.indexOf(I))}if(I==this.A$)O.StartIndent=I.u();
if(I==this.MD)O.EndIndent=I.u();if(I==this.zD)O.FirstLineIndent=I.u();if(I==this.V6)O.SpaceBefore=I.u();
if(I==this.Aj)O.SpaceAfter=I.u();if(I==this.ku)O._Direction=I.u();this.kO()};aj.prototype.aoR=function(n){var F=this.tV,O=this.ui.u(),I=-1;
for(var e=0;e<F.D0.length;e++)if(F.D0[e].Name==O)I=e;if(I==-1){I=F.D0.length;var x=JSON.parse(JSON.stringify(F.D0[0]));
x.Name=O;F.D0.splice(I,0,x)}F.Bw.Font=I;this.kO()};aj.prototype.ace=function(n){var F=this.dK.EL(),O={Type:1,Values:[1,(F>>16&255)/255,(F>>8&255)/255,(F>>0&255)/255]};
for(var e=0;e<4;e++)O.Values[e]=Math.round(O.Values[e]*1e3)/1e3;this.tV.Bw.FillColor=O;this.kO()};function hW(){ch.call(this);
this._=V.w("span","fontinput");this.D7=null;this.sJ=null;this._J=null;this.N8="";this.ot={};this.Hb=[];
this.abH={};this.V1=!1;this.$M=V.w("button","fitem");this.$M.setAttribute("style","width:9em;");this.$M.textContent="Family Name \u25BC";
this._.appendChild(this.$M);V.CP(this.$M,this.mZ.bind(this));this.Yp=new ch;this.Yp.parent=this;this.Yp._=V.w("div","floatcont");
this.Yp._.addEventListener("keyup",this.abZ.bind(this),!1);this.Ax=new fw(6.8);this.Yp._.appendChild(this.Ax.a6y());
this.Ax.parent=this.Yp;this.Ax.k(V.E.L,this.vh,this);var n=V.w("div","form");this.Yp._.appendChild(n);
this.B4=new cg(V.WE("tools/cshape",null,"autoscale"),!1,"Show Favorites Only");this.B4.k("click",this.a4f,this);
n.appendChild(this.B4._);this.PV=new fq([12,86],null,9);this.PV.k("input",this.LM,this);n.appendChild(this.PV._);
var F=this.abF=new cg([[23,6],[22,6,0]],!1,"Load OTF / TTF file from your computer",!0);F.k("click",this.aie,this);
F._.style.marginLeft="1.5em";n.appendChild(F._);this.l3=V.w("span","fitem imageset scrollable marged");
this.l3.style.height="30em";this.Yp._.appendChild(this.l3);this.Vl=V.w("button","fitem");this.Vl.setAttribute("style","width:7em;");
this.Vl.textContent="SubFamily Name \u25BC";this._.appendChild(this.Vl);V.CP(this.Vl,this.mZ.bind(this));
this.SX=new ch;this.SX.parent=this;this.SX._=V.w("div","floatcont");this.xB=V.w("span","fitem imageset scrollable marged");
this.SX._.appendChild(this.xB)}hW.prototype=new ch;hW.prototype.abZ=function(n){var F=0;if(u.NW(n.code,u.dE))F=-1;
if(u.NW(n.code,u.ZW))F=1;if(F!=0){var O=this.Hb,I=O.length,x=this.D7.j9()[this._J];if(x==null&&I==0)return;
var r=O.indexOf(x[0]);if(r==-1)return;r=(r+F+I)%I;this.Az(O[r],null)}};hW.prototype.aie=function(){var n=new k(V.E.P,!0);
n.data={e:V.U.eR,a03:".otf,.ttf,.ttc"};this.A(n)};hW.prototype.B=function(){this.Ax.B();this.abF.B();
this.B4.YB(V.WE("tools/cshape",null,"autoscale"))};hW.prototype.a4f=function(n){this.B4.F(!this.B4.jQ());
this.vh()};hW.prototype.LM=function(n){this.N8=this.PV.u().toLowerCase();this.vh()};hW.prototype.mZ=function(n){V.ou(n);
var F=n.currentTarget,O=F.getBoundingClientRect(),I=F==this.$M,x=I?this.Yp:this.SX;if(V.Zo(x._)){this.qf(x);
return}if(!I&&this.D7.j9()[this._J]==null)return;var r=new k(V.E.P,!0);r.data={e:V.U.di,AM:x,x:O.left,y:O.top+O.height};
this.A(r);if(I){this.vh();this.PV.xC()}};hW.prototype.any=function(n){var F=n.currentTarget.firstChild.nextSibling.textContent;
if(n.target.tagName.toLowerCase()=="button"){var O=this.sJ.slice(0),I=O.indexOf(F);if(I==-1){O=O.slice(Math.max(0,O.length-29));
O.push(F)}else O.splice(I,1);var x=new k(V.E.P,!0);x.data={e:V.U.g7,b9:cf.TN,Qj:O};this.A(x);this.V1=!0;
this.vh()}else{this.Az(F,null);this.PV.xC()}};hW.prototype.afN=function(n){this.Az(null,n.currentTarget.firstChild.textContent)};
hW.prototype.Az=function(n,F){var O=n==null?this.SX:this.Yp,I=this.D7;if(n==null)n=I.j9()[this._J][0];
else{var x=I.m8(n),r=I.j9()[this._J];F=da.W5(x,r?r[1]:"regular")}var _=I.u2(n,F)[2];this.F(_,I);this.A(new k(V.E.L,!1));
this.qf(O);this.vh()};hW.prototype.qf=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.kX,AM:n};this.A(F)};
hW.prototype.u=function(){return this._J};hW.prototype.F=function(n,F,O){var I=this.D7;if(n!=null)this._J=n;
else n=this._J;this.D7=F;this.sJ=O;if(n!=null){var x=F.j9()[n],r,_;if(x==null){r="- "+n;_="-------"}else{r=x[0];
_=x[1];var d=F.m8(r);d.sort(da.a1W);var w=d.indexOf(_),Z=this.afN.bind(this);this.xB.textContent="";
for(var e=0;e<d.length;e++){var x=F.u2(r,d[e]);if(!this.Ax.zI(x))continue;var P=this.Gw(x,x[1],Z,!1);
this.xB.appendChild(P)}}this.$M.textContent=r.substring(0,15)+" \u25BC";this.$M.setAttribute("title",r);
this.Vl.textContent=_.substring(0,10)+" \u25BC";this.Vl.setAttribute("title",_)}};hW.prototype.vh=function(){var n=this.D7.j9()[this._J],F=this.sJ,O=null,I=this.D7.a3Z(),x=this.any.bind(this);
this.Hb=[];for(var r in I){var _=da.W5(I[r],"regular"),d=this.D7.u2(r,_),w=F.indexOf(r)!=-1,Z=!0;if(this.N8.length>0&&d[0].toLowerCase().indexOf(this.N8)==-1)Z=!1;
else if(!this.Ax.zI(d))Z=!1;else if(this.B4.jQ()&&!w)Z=!1;var P=this.ot[r];if(P==null){var P=this.Gw(d,r,x,!0);
this.ot[r]=P;this.l3.appendChild(P)}if(Z)this.Hb.push(r);var C=Z?"":"display:none; ",W="opacity: "+(w?"1":"0.2");
if(n&&n[0]==r){C+="background-color:rgba(0,0,0,0.13);";O=P}if(this.abH[r]!=C+W){P.setAttribute("style",C);
P.firstChild.setAttribute("style",W);this.abH[r]=C+W}}if(O&&!this.V1)this.l3.scrollTop=O.offsetTop-210;
this.V1=!1};hW.prototype.Gw=function(n,F,O,I){var x=V.w("div","fontitem"),w="";x.addEventListener("click",O,!1);
if(I)x.appendChild(V.w("button","star"));var r=V.w("span","label");r.setAttribute("title",F);r.textContent=F;
x.appendChild(r);var _=V.Z(),d=1/_,Z=da.rC*d,P=da.LJ*d;if(1<_&&_<1.5)w="width:"+Z+"px; height:"+P+"px;";
var C=V.w("span","thumb gsicon");if(n.aij){w+="background: url("+n.aij+");";if(1<_&&_<1.5)w+="background-size: "+Z+"px "+P+"px;"}else{var W=Math.ceil(FNTS.list.length/da.cols),v=Math.floor(n.FI/W),L=n.FI%W,H=v*da.rC,y=L*da.LJ;
if(1<_&&_<1.5){w+="background-size: "+da.cols*Z+"px "+W*P+"px;";H*=d;y*=d}w+="background-position:-"+H+"px -"+y+"px;"}C.setAttribute("style",w);
x.appendChild(C);return x};function fw(n){ch.call(this);this._=V.w("button","fitem bbtn");this._.addEventListener("click",this.abi.bind(this),!1);
this.nf=new ch;this.nf._=V.w("div","floatcont");this.nf.parent=this;this.Q3=V.w("div","flexrow");this.nf._.appendChild(this.Q3);
this.nb=[];this.la=[];var F=this.Q3,O=V.w("div",""),I=V.w("div","");F.appendChild(O);F.appendChild(I);
this.__=[];for(var e=0;e<FNTS.cats.length;e++)this.__.push({name:FNTS.cats[e],index:e,If:0});this._S=new cL([7,0]);
this._S.k(V.E.L,this.a4y,this);O.appendChild(this._S._);this.N_=V.w("div","vlist marged scrollable");
this.N_.setAttribute("style","width:10.85em; height:"+n+"em; ");O.appendChild(this.N_);this.QS=[];for(var e=0;
e<this.__.length;e++){var x=this.__[e],r=new cL(x.name);this.QS.push(r);r.k(V.E.L,this.a3S,this);r.F(!0);
this.N_.appendChild(r._);this.nb.push(1)}this.agN=new cL([7,0]);this.agN.k(V.E.L,this.aos,this);this.i2=V.w("div","vlist marged scrollable");
this.i2.setAttribute("style","width:8.6em; height:"+(n+1.5)+"em; ");I.appendChild(this.i2);this.e3=[];
for(var e=0;e<FNTS.subsetNames.length;e++){var r=new cL(FNTS.subsetNames[e]);this.e3.push(r);r.k(V.E.L,this.ahK,this);
r.F(!1);this.i2.appendChild(r._);this.la.push(0)}}fw.prototype=new ch;fw.prototype.a53=function(n){var F=this.e3;
for(var e=0;e<F.length;e++){var O=(n>>>e&1)==1;this.la[e]=O;F[e].F(O)}};fw.prototype.a6y=function(){return this.Q3};
fw.prototype.B=function(){this._.textContent=hl.get([25,1,0])+" \u25BC";this._S.B();this.agN.B()};fw.prototype.abi=function(n){var F=this._.getBoundingClientRect(),O=new k(V.E.P,!0);
O.data={e:V.U.di,AM:this.nf,x:F.left,y:F.top+F.height,eE:!1};this.A(O)};fw.prototype.zI=function(n){if(this.nb[n[4]]==0)return!1;
else for(var F=0;F<this.la.length;F++)if(this.la[F]==1&&(n[3]>>>F&1)==0)return!1;return!0};fw.prototype.a4y=function(n){var F=n.target.u(),O=this.QS,I=this.nb;
for(var e=0;e<O.length;e++){O[e].F(F);I[e]=F?1:0}this.A(new k(V.E.L,!1))};fw.prototype.aos=function(n){var F=n.target.u(),O=this.e3,I=this.la;
for(var e=0;e<O.length;e++){O[e].F(F);I[e]=F?1:0}this.A(new k(V.E.L,!1))};fw.prototype.a3S=function(n){var e=this.QS.indexOf(n.target),F=this.__[e].index;
this.nb[F]=1-this.nb[F];this.A(new k(V.E.L,!1))};fw.prototype.ahK=function(n){var e=this.e3.indexOf(n.target);
this.la[e]=1-this.la[e];this.A(new k(V.E.L,!1))};function aC(n,F,O){ca.call(this,F,!0,"gradientbutton",18,10,cf.f3);
this.nE=-1;this.sI=-1;this.ae2=null;this.amP=n;this.PM=O}aC.prototype=new ca;aC.prototype.wH=function(n){var F=this.JN;
this.F(F[this.rJ.u()]);this.A(new k(V.E.L))};aC.prototype.Q6=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.n$,cU:"gradienteditor",W:this._o,KC:this.a1f.bind(this),_4:this.PM};
this.A(F)};aC.prototype.a1f=function(n){this.F(n);this.A(new k(V.E.L))};aC.prototype.q0=function(){if(!this.g5)return;
var n=Math.floor(36*V.Z()),F=Math.floor(36*V.Z()),O=[],I=[],x=this.JN;for(var e=0;e<x.length;e++){var r=x[e];
I.push(r.Nm?r.Nm.v.split("=").pop():"");var _=c.AG.JC(r,n,F,Math.PI/4,this.nE,this.sI);O.push(_)}this.rJ.Ea(O,I,n,F);
this.g5=!1};aC.prototype.vI=function(n,F){this.M8(this._o,n,F)};aC.prototype.F=function(n){this.M8(n,this.nE,this.sI)};
aC.prototype.M8=function(n,F,O){this.nE=F;this.sI=O;if(n==null)return;var I=JSON.stringify(n),x=I+F+","+O;
if(x==this.ae2)return;this.ae2=x;this._o=JSON.parse(I);var r=Math.floor(80*V.Z()),_=Math.floor(16*V.Z()),d=c.AG.JC(this._o,r,_,0,this.nE,this.sI);
this.v_.setAttribute("src",d);V.z0(this.v_,r,_)};aC.prototype.u=function(){var n;if(this.amP)n=c.AG.a65(this._o,this.nE,this.sI);
else n=JSON.parse(JSON.stringify(this._o));return n};function be(n){ca.call(this,n,!1,"swatchbutton",16,8.75,cf.RR)}be.prototype=new ca;
be.prototype.wH=function(n){this.F(this.JN[n.target.u()]);this.A(new k(V.E.L))};be.prototype.q0=function(){if(!this.g5)return;
var n=Date.now(),F=Math.floor(10*V.Z()),O=Math.floor(10*V.Z()),I=[],x=[],r=this.JN;for(var e=0;e<r.length;
e++){x.push(r[e].NL?r[e].NL.split("=").pop():"");I.push(be.JC(r[e],F,O))}this.rJ.Ea(I,x,F,O);this.g5=!1};
be.prototype.F=function(n){this._o=JSON.parse(JSON.stringify(n));this.rP()};be.prototype.rP=function(){var n=Math.floor(24*V.Z()),F=Math.floor(20*V.Z()),O=be.JC(this._o,n,F);
this.v_.setAttribute("src",O);V.z0(this.v_,n,F)};be.prototype.u=function(){return JSON.parse(JSON.stringify(this._o))};
be.M6={};be.JC=function(n,F,O){var I=be.Vo,x=be.M6,r=q.c7(n.Q<<16|n.l<<8|n.O);if(x[r])return x[r];if(I==null){var _=V.w("canvas");
I=be.Vo=_.getContext("2d")}var _=I.canvas;_.width=F;_.height=O;I.fillStyle="#"+r;I.fillRect(0,0,F,O);
var d=x[r]=_.toDataURL();return d};function cL(n,F,O){ch.call(this);this._=V.w("span","fitem cbox");
if(F==null)F=!0;if(O==null)O="flabel";var I="cb"+V._0();this.Ee=V.w("input","");this.Ee.setAttribute("type","checkbox");
this.Ee.setAttribute("id",I);this._.appendChild(this.Ee);this.xt=n;this.zt=V.w("label",O);if(F)this.zt.setAttribute("for",I);
this._.appendChild(this.zt);this.B();this.Ee.addEventListener("change",this.sS.bind(this),!1)}cL.prototype=new ch;
cL.prototype.XK=function(){return this.xt};cL.prototype.YB=function(n){this.zt.textContent=n};cL.prototype.B=function(){var n=this.xt;
if(typeof n=="string"&&n.startsWith("<"))this.zt.innerHTML=n;else this.zt.textContent=hl.get(n)};cL.prototype.kc=function(){this.Ee.checked=!0};
cL.prototype.KG=function(){this.Ee.checked=!1};cL.prototype.jQ=function(){return this.Ee.checked};cL.prototype.F=function(n){this.Ee.checked=n};
cL.prototype.u=cL.prototype.jQ;cL.prototype.sS=function(n){this.A(new k(V.E.L,!1))};function bo(n,F,O,I){ch.call(this);
this._=V.w("span","fitem mbox");this.akL=O;if(n){this.xt=n;this.zt=V.w("label","flabel");this._.appendChild(this.zt)}this.Kf=F;
this.GX=[];for(var e=0;e<F.length;e++){var x=O?new cg(F[e],!1,I?I[e]:null):new cL(F[e],!0,"");x.k(O?"click":V.E.L,this.sS,this);
this.GX.push(x);this._.appendChild(x._)}this.B()}bo.prototype=new ch;bo.prototype.F=function(n){for(var F=0;
F<this.Kf.length;F++)this.GX[F].F(n[F])};bo.prototype.u=function(){var n=[];for(var F=0;F<this.Kf.length;
F++)n[F]=this.GX[F].u();return n};bo.prototype.B=function(){if(this.xt)this.zt.innerHTML=hl.get(this.xt)+": ";
for(var n=0;n<this.GX.length;n++)this.GX[n].B()};bo.prototype.sS=function(n){var e=this.GX.indexOf(n.currentTarget);
if(this.akL)this.GX[e].F(!this.GX[e].u());this.A(new k(V.E.L,!1))};function g0(n,F,O,I,x,r){dp.call(this,n,F,O,I,x,!1,r);
this._.appendChild(this.zt);var _=V.w("span","rangecont");this._.appendChild(_);_.appendChild(this.Ic);
this._.appendChild(this.Ee);this.Ee.setAttribute("style","width:3.3em");if(this.gA)this._.appendChild(this.lQ)}g0.prototype=new dp;
function gE(n,F,O,I){if(n==null)n=!1;if(F==null)F=!1;if(O==null)O=!1;ch.call(this);this.N6=new aE;this.a0=new aE;
this.z$=72;this.vX=72;this.yq=!0;this._=V.w("span","");this.Cl=new cR([12,41],0,0,null,0,!1,!0);this._.appendChild(this.Cl._);
this.Cl.k(V.E.L,this.tE,this);var x=["px","%"];if(n)x=x.concat(["mm","in"]);this.Gn=new bf(null,x);this._.appendChild(this.Gn._);
V.Zq(this._);this.Gn.k(V.E.L,this.tE,this);this.d1=new cR([12,42],0,0,null,0,!1,!0);this._.appendChild(this.d1._);
this.d1.k(V.E.L,this.tE,this);var r=new cg("\u21F5",!1,null,!0);r.k("click",this.ahy,this);this.CC=new cg("<img src=\""+PIMG["lrs/chain"]+"\" class=\"autoscale gsicon\" />",!1,[12,51]);
this.CC.k("click",this.tE,this);this.a93=new gD("");if(F){this._.appendChild(this.CC._);this._.appendChild(this.a93._);
this.CC.kc()}else this._.appendChild(r._);this.dZ=new cR("DPI",0,0,null,3,!1,!0,4);if(n&&I==null){V.Zq(this._);
this._.appendChild(this.dZ._)}this.dZ.k(V.E.L,this.tE,this);this.a7=new cL([12,23,1]);this.a7.k(V.E.L,this.tE,this);
if(O){V.Zq(this._);this._.appendChild(this.a7._)}V.Zq(this._)}gE.prototype=new ch;gE.prototype.a9b=function(){this.yq=!1;
if(this.Gn.u()==0){this.Gn.F(3);this.Ck()}};gE.prototype.ak8=function(){this.yq=!0};gE.prototype.af4=function(n){this.CC.F(n)};
gE.prototype.B=function(){this.Cl.B();this.d1.B();this.dZ.B();this.CC.B();this.a7.B()};gE.prototype.ahy=function(n){var F=this.a0.x;
this.a0.x=this.a0.y;this.a0.y=F;this.Ck();this.A(new k(V.E.L,!1))};gE.prototype.tE=function(n){if(n.target==this.Gn&&!this.yq&&this.Gn.u()==0)this.Gn.F(3);
if(n.target==this.Gn||n.target==this.a7){this.Ck();return}if(n.target==this.CC)n.target.F(!n.target.u());
var F=this.N6,O=parseFloat(this.Cl.u());if(isNaN(O))O=1;var I=parseFloat(this.d1.u());if(isNaN(I))I=1;
var x=this.Gn.u();if(this.yq){var r=this.vX;if(x==1){O=this.N6.x*(O/100);I=this.N6.y*(I/100)}var _=[1,1,25.4/r,1/r][x];
O/=_;I/=_;if(this.a7.u()){O+=this.N6.x;I+=this.N6.y}if(n.target==this.dZ){var d=this.dZ.u();if(!0){var w=d/r;
O*=w;I*=w}r=d}if(this.CC.u()){if(n.target==this.Cl)I=O*(F.y/F.x);else O=I*(F.x/F.y)}O=Math.max(Math.abs(O),1);
I=Math.max(Math.abs(I),1)}else{var r=this.z$;if(n.target==this.dZ)r=this.dZ.u();else{if(this.CC.u()){if(n.target==this.Cl)I=O*(F.y/F.x);
else O=I*(F.x/F.y)}var _=[1,1,25.4/r,1/r][x],Z=O/(x==1?100:F.x*_);r=r/Z}O=F.x;I=F.y}this.a0=new aE(Math.round(O),Math.round(I));
this.vX=r;this.Ck();this.A(new k(V.E.L,!1))};gE.prototype.amG=function(e){this.Gn.F(e);this.Ck()};gE.prototype.F=function(n,F,O){if(O!=!0)this.N6=n.clone();
this.a0=n.clone();if(F!=null){this.z$=F;this.vX=F}this.Ck()};gE.prototype.Ck=function(){var n=this.a0.x,F=this.a0.y,O=this.vX,I=(n/F).toFixed(3);
while(I.charAt(I.length-1)=="0")I=I.substring(0,I.length-1);if(I.charAt(I.length-1)==".")I=I.substring(0,I.length-1);
var x="  "+I+" : 1",r=function(P,C){while(C!=0){var W=C;C=P%C;P=W}return P},_=r(n,F);if(Math.min(n,F)/_<10)x="  "+Math.round(n/_)+" : "+Math.round(F/_);
this.a93.F(x);if(this.a7.u()){n-=this.N6.x;F-=this.N6.y}var d=this.Gn.u();if(d==1){if(this.yq){n=100*n/this.N6.x;
F=100*F/this.N6.y}else{n=F=100*this.z$/this.vX}}else{n=Math.round(n);F=Math.round(F)}var w=[1,1,25.4/O,1/O][d];
n*=w;F*=w;var Z=d==1||d==3?2:0;this.Cl.NQ(Z);this.d1.NQ(Z);this.Cl.F(n);this.d1.F(F);this.dZ.F(O)};gE.prototype.u=function(){return this.a0.clone()};
gE.prototype.BL=function(){return this.vX};function bj(){ch.call(this);this.Wg=0;this.iH=[0,0,1,1,100,100];
this._=V.w("span","fitem");this.Wa=new bf(null,[[12,89,0],[12,89,1],[12,89,2]]);this._.appendChild(this.Wa._);
this.Wa.k(V.E.L,this.tE,this);this.Cl=new cR("W",0,0,null,0,!1,!0);this._.appendChild(this.Cl._);this.Cl.k(V.E.L,this.tE,this);
this.d1=new cR("H",0,0,null,0,!1,!0);this._.appendChild(this.d1._);this.d1.k(V.E.L,this.tE,this);this.F({OI:0,x:0,y:0})}bj.prototype=new ch;
bj.prototype.B=function(){V.$E(this.Cl,this.d1);this.Wa.B()};bj.prototype.tE=function(n){if(n.target==this.Wa){var F=this.u(),O=this.iH;
O[this.Wg*2]=F.x;O[this.Wg*2+1]=F.y;this.Wg=F.OI;this.F({OI:F.OI,x:O[F.OI*2],y:O[F.OI*2+1]})}if(this.Cl.u()<1)this.Cl.F(1);
if(this.d1.u()<1)this.d1.F(1);this.A(new k(V.E.L,!1))};bj.prototype.F=function(n){this.Wa.F(n.OI);this.Cl.F(n.x);
this.d1.F(n.y);if(n.OI==0){this.Cl.gy();this.d1.gy()}else{this.Cl.hL();this.d1.hL()}};bj.prototype.u=function(){return{OI:this.Wa.u(),x:this.Cl.u(),y:this.d1.u()}};
function gD(n,F){ch.call(this);this.xt=n;this._=V.w("span","labelitem fitem"+(F?" spread":""));this.B()}gD.prototype=new ch;
gD.prototype.F=function(n){this._.textContent=n};gD.prototype.u=function(){return this._.textContent};
gD.prototype.hL=function(){this._.removeAttribute("disabled")};gD.prototype.gy=function(){this._.setAttribute("disabled","")};
gD.prototype.YB=function(n){this._.textContent=n};gD.prototype.B=function(){this._.textContent=hl.get(this.xt)};
gD.prototype.XK=function(){return this.xt};function aX(n){ch.call(this);this._=V.w("span","");this.a8u=n;
this.eh=new g0("Off X",-100,100,n?"%":"px",0,!1);this.Qh=new g0("Off Y",-100,100,n?"%":"px",0,!1);this.eh.k(V.E.L,this.tE,this);
this.Qh.k(V.E.L,this.tE,this);this._.appendChild(this.eh._);this._.appendChild(this.Qh._)}aX.prototype=new ch;
aX.prototype.B=function(){this.eh.B();this.Qh.B()};aX.prototype.tE=function(n){this.A(new k(V.E.L,!1))};
aX.prototype.adS=function(n){this.eh.F(n.x);this.Qh.F(n.y)};aX.prototype.alh=function(){return new aE(this.eh.u(),this.Qh.u())};
aX.prototype.F=function(n,F){var O=n.Hrzn.v,I=n.Vrtc.v;if(this.a8u){O=O.val;I=I.val}this.eh.F(O);this.Qh.F(I);
if(F)this.tE()};aX.prototype.u=function(){var n=this.eh.u(),F=this.Qh.u();if(this.a8u)return{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Prc",val:n}},Vrtc:{t:"UntF",v:{type:"#Prc",val:F}}};
else return{classID:"Pnt",Hrzn:{v:n,t:"doub"},Vrtc:{v:F,t:"doub"}}};function cR(n,F,O,I,x,r,_,d,w){dp.call(this,n,F,O,I,x,!0,r,w);
V.fx(this._,"rangedropinput");this._.appendChild(this.zt);this.Ee.setAttribute("style","width:"+(d?d:3.3)+"em");
this._.appendChild(this.Ee);this.aaA=V.w("span","rangecont");this.aaA.appendChild(this.Ic);this.uk=V.w("button");
this.uk.innerHTML="\u25BC";V.CP(this.uk,this.a8A.bind(this));if(_!=!0)this._.appendChild(this.uk);this.X1=new ch;
this.X1._=this.aaA}cR.prototype=new dp;cR.prototype.a8A=function(n){if(V.Zo(this.X1._))return;n.stopPropagation();
var F=this._.getBoundingClientRect();this.Ic.setAttribute("style","width:"+F.width+"px;");var O=new k(V.E.P,!0);
O.data={e:V.U.di,AM:this.X1,x:F.left,y:F.top+F.height};this.A(O)};function ak(){ch.call(this);this._=V.w("span","fitem strokebutton");
this.o0=[[null,null,null,""],[null,0,null,"4 2"],[1,1,null,"0 2"]];this.Hj=JSON.parse(JSON.stringify(bW.uS.default));
this.hF=V.w("button");this._.appendChild(this.hF);this.hF.addEventListener("click",this.r1.bind(this),!1);
var n=V.w("canvas","gsicon");this.xX=n.getContext("2d");this.hF.appendChild(n);var F=V.w("span");F.textContent=" \u25BC";
this.hF.appendChild(F);this.nf=new ch;this.nf.parent=this;this.nf._=V.w("div","floatcont form");var O=this.nf._;
O.setAttribute("style","width: 14em;");this.ot=[new bf([12,40],[[19,5,2],[19,5,1],[19,5,0]]),new hg([19,9,0],["<img src=\""+PIMG["caps/butt"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["caps/round"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["caps/square"]+"\" class=\"autoscale gsicon\" />"]),new hg([19,9,1],["<img src=\""+PIMG["joins/miter"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["joins/round"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["joins/bevel"]+"\" class=\"autoscale gsicon\" />"]),new fq([19,9,2])];
for(var e=0;e<this.ot.length;e++){var I=this.ot[e];O.appendChild(I._);var x=e<4?V.E.L:"click";I.k(x,this.tE,this)}V.Zq(O);
this.mb=[];var r=this.ane.bind(this);for(var e=0;e<this.o0.length;e++){var _=V.w("button","fitem");this.mb.push(_);
O.appendChild(_);_.addEventListener("click",r,!1);var n=V.w("canvas","gsicon"),d=n.getContext("2d");
_.appendChild(n);this.DB(d,40,20,this.o0[e])}}ak.prototype=new ch;ak.prototype.r1=function(n){var F=this.hF.getBoundingClientRect(),O=new k(V.E.P,!0);
O.data={e:V.U.di,AM:this.nf,x:F.left,y:F.top+F.height+4};this.A(O)};ak.prototype.tE=function(n){var F=this.ot,O=F.indexOf(n.target),I=[];
for(var e=0;e<4;e++)I.push(F[e].u());this.Hj=this.pe(I);this.A(new k(V.E.L,!1))};ak.prototype.ane=function(n){var F=this.mb.indexOf(n.currentTarget);
this.F(this.pe(this.o0[F]));this.A(new k(V.E.L,!1))};ak.prototype.pe=function(n){var F=JSON.parse(JSON.stringify(this.Hj)),O=n[0],I=n[1],x=n[2],r=n[3];
if(O!=null)F.strokeStyleLineAlignment.v.strokeStyleLineAlignment=bW.uS.RD[O];if(I!=null)F.strokeStyleLineCapType.v.strokeStyleLineCapType=bW.uS.wq[I];
if(x!=null)F.strokeStyleLineJoinType.v.strokeStyleLineJoinType=bW.uS.join[x];var _=F.strokeStyleLineDashSet.v=[];
r=r.split(" ");while((r.length&1)!=0)r.pop();for(var e=0;e<r.length;e++)_.push({t:"UntF",v:{type:"#Nne",val:parseInt(r[e])}});
return F};ak.prototype.B=function(){for(var e=0;e<this.ot.length;e++)this.ot[e].B()};ak.prototype.F=function(n){this.Hj=JSON.parse(JSON.stringify(n));
var F=bW.uS.RD.indexOf(n.strokeStyleLineAlignment.v.strokeStyleLineAlignment),O=bW.uS.wq.indexOf(n.strokeStyleLineCapType.v.strokeStyleLineCapType),I=bW.uS.join.indexOf(n.strokeStyleLineJoinType.v.strokeStyleLineJoinType),x=[],r=n.strokeStyleLineDashSet.v;
for(var _=0;_<r.length;_++)x.push(r[_].v.val);var d=this.ot;d[0].F(F);d[1].F(O);d[2].F(I);d[3].F(x.join(" "));
var w=[];for(var e=0;e<4;e++)w.push(d[e].u());this.DB(this.xX,40,16,w)};ak.prototype.u=function(){return JSON.parse(JSON.stringify(this.Hj))};
ak.prototype.DB=function(n,F,O,I){var x=I[0],r=I[1],_=I[2],d=I[3].split(" ").map(parseFloat);V.$C(n.canvas,F,O);
var w=Math.min(5,this.Hj.strokeStyleLineWidth.v.val);for(var e=0;e<d.length;e++)d[e]*=w;n.clearRect(0,0,F,O);
n.setLineDash(d);n.lineCap=["butt","round","square"][r];n.lineJoin=["miter","round","bevel"][_];n.lineWidth=w;
n.beginPath();n.moveTo(0,O/2);n.lineTo(F*2,O/2);n.stroke()};function iV(n){ca.call(this,n,!1,"contourbutton",34,16,cf.Z5);
this.PV=new fq([12,86],null,16);this.PV.k("input",this.LM,this);this.nf._.appendChild(this.PV._);this.jO=null;
this.N8="";this.tn=null;this.F(fH.tc())}iV.prototype=new ca;iV.prototype.B=function(){ca.prototype.B.call(this);
this.PV.B()};iV.prototype.wH=function(n){this.F(this.jO[n.target.u()]);this.A(new k(V.E.L))};iV.prototype.LM=function(n){this.N8=this.PV.u().toLowerCase();
this.z2()};iV.tm=!1;iV.prototype.q0=function(){if(!this.g5)return;var n=this.JN;if(n==null||!iV.tm){var F=new k(V.E.P,!0);
F.data={e:V.U.Fb,b9:{url:"rsrc/basic/fa_basic.csh"}};this.A(F);iV.tm=!0}else{var O=Math.floor(38*V.Z()),I=Math.floor(38*V.Z());
this.tn=[];for(var e=0;e<n.length;e++)this.tn.push(iV.JS(n[e],O,I));this.z2();this.g5=!1}};iV.prototype.z2=function(){var n=Math.floor(38*V.Z()),F=Math.floor(38*V.Z());
this.jO=[];var O=[],I=[],x=this.JN;for(var e=0;e<x.length;e++){if(x[e].lL.toLowerCase().indexOf(this.N8)==-1)continue;
this.jO.push(x[e]);O.push(this.tn[e]);I.push(x[e].lL)}this.rJ.Ea(O,I,n,F)};iV.prototype.F=function(n){this._o=iV.clone(n);
this.rP()};iV.prototype.rP=function(){var n=Math.floor(23*V.Z()),F=Math.floor(23*V.Z()),O=iV.JS(this._o,n,F);
this.v_.setAttribute("src",O);V.z0(this.v_,n,F)};iV.prototype.u=function(){return iV.clone(this._o)};
iV.clone=function(n){return{lL:n.lL,La:n.La,b:K.X9.jI(n.b),I6:n.I6.clone()}};iV.nd=null;iV.YP=null;iV.JS=function(n,F,O){var I=K.X9.jI(n.b),x=n.I6,r=Math.min(F/x.d,O/x.v)*.9,_=new cD;
_.translate(-.5,-.5);_.scale(.95,.95);_.translate(.5,.5);_.scale(r*x.d,r*x.v);q.Y.gS(I,_);var d=new K.X9;
d.b=I;var w=d.B1();w.rect.x=Math.floor((F-w.rect.d)/2);w.rect.y=Math.floor((O-w.rect.v)/2);var Z=q.f(w.rect.X()*4);
q.IW(Z,4278190080);q.uZ(w.channel);q.GF(w.channel,Z,0);q.GF(w.channel,Z,1);q.GF(w.channel,Z,2);var P=iV;
if(P.nd==null)P.nd=V.w("canvas");var C=P.nd,W=C.getContext("2d");if(C.width!=F||C.height!=O||P.YP==null){C.width=F;
C.height=O;P.YP=W.createImageData(F,O)}var v=P.YP;q.IW(v.data,4294967295);q.nF(Z,w.rect,v.data,new gv(0,0,F,O));
W.putImageData(v,0,0);return C.toDataURL()};function bI(n){ca.call(this,n,!1,"ICCButton",16,12,cf.Wo,!0);
this.rJ.HN(1)}bI.prototype=new ca;bI.prototype.Cy=function(){var n="Arabica 12,Ava 614,Azrael 93,Bourbon 64,Byers 11,Clayton 33,Clouseau 54,Cobi 3,Contrail 35,Cubicle 99,Django 25,Domingo 145,Faded 47,Folger 50,Fusion 88,Hyla 68,Chemical 168,Korben 214,Lenox 340,Lucky 64,McKinnon 75,Milo 5,Neon 770,Paladin 1875,Pasadena 21,Pitaya 15,Reeve 38,Remy 24,Sprocket 231,Teigen 28,Trent 18,Tweed 71,Vireo 37,Zed 32,Zeke 39".split(",");
for(var e=0;e<n.length;e++)n[e]="luts/"+n[e]+".CUBE";return n};bI.prototype.wH=function(n){this.F(this.JN[n.target.u()]);
this.A(new k(V.E.L))};bI.prototype.q0=function(){if(!this.g5)return;var n=Math.floor(1*V.Z()),F=Math.floor(1*V.Z()),O=[],I=[],x=this.JN;
for(var e=0;e<x.length;e++){var r=x[e].Nm.v.split("\\").pop().split("/").pop();I.push(r);O.push(bI.JC(x[e],n,F))}this.rJ.Ea(O,I,n,F);
this.g5=!1};bI.prototype.F=function(n){this._o=JSON.parse(JSON.stringify(n));this.rP()};bI.JC=function(n,F,O){var I=V.w("canvas"),_="ICC / 3DL / look / cube";
I.width=F;I.height=O;var x=I.getContext("2d"),r=Math.floor(14*V.Z());x.font=r+"px sans-serif";if(n.Nm)_=n.Nm.v.split("\\").pop().split("/").pop();
x.fillText(_,10,r);return I.toDataURL()};bI.prototype.rP=function(){var n=Math.floor(120*V.Z()),F=Math.floor(20*V.Z());
this.v_.setAttribute("src",bI.JC(this._o,n,F));V.z0(this.v_,n,F)};bI.prototype.u=function(){return JSON.parse(JSON.stringify(this._o))};
function dd(){ch.call(this);this.Vh=null;this._=V.w("span","fitem");this.vT=new iD([14,9]);this.nw=new cR(null,0,150,"pt",1,!0,null,null,[19,2,5]);
this.P3=new ak;this.gE=[this.vT,this.nw,this.P3];for(var e=0;e<this.gE.length;e++){var n=this.gE[e];
this._.appendChild(n._);n.parent=this;n.k(V.E.L,this.tE,this)}}dd.prototype=new ch;dd.prototype.B=function(){for(var e=0;
e<this.gE.length;e++)this.gE[e].B()};dd.prototype.XW=function(n,F){this.vT.XW(n,F)};dd.prototype.tE=function(n){var F=this.Vh,O=this.vT.u(),I=O.he;
F.strokeEnabled.v=I!=0;if(I!=0){F.strokeStyleContent.v=O.Gk;O.Gk.classID=bW.uS.Ul[I-1]}F.strokeStyleLineWidth.v.val=this.nw.u();
if(n.target==this.P3)F=this.P3.u();this.Vh=F;this.A(new k(V.E.L,!1))};dd.prototype.F=function(n,F,O){this.Vh=JSON.parse(JSON.stringify(F));
var I=F.strokeEnabled.v,x=F.strokeStyleContent.v,r=I?{he:1+bW.uS.Ul.indexOf(x.classID),Gk:x}:{he:0};
this.vT.F(n,r,O);this.nw.F(F.strokeStyleLineWidth.v.val);this.P3.F(F)};dd.prototype.u=function(){return JSON.parse(JSON.stringify(this.Vh))};
function iQ(n){ch.call(this);this._=V.w("span","fitem");this.V_=null;if(n){this.V_=new gD("");this._.appendChild(this.V_._)}this.r2=["front","union","difference","intersection"];
var F=[[18,0],[18,1],[18,2],[18,3]];this.I$=[];this.rS=0;for(var e=0;e<this.r2.length;e++){var O=new cg("<img src=\""+PIMG["set/"+this.r2[e]]+"\" class=\"autoscale gsicon\" />",!1,F[e]);
O.k("click",this.acj,this);this._.appendChild(O._);this.I$.push(O)}this.I$[0].kc()}iQ.prototype=new ch;
iQ.prototype.a9K=function(){return this.rS};iQ.prototype.u=function(){return this.r2[this.rS]};iQ.prototype.F=function(n){this.rS=this.r2.indexOf(n);
for(var e=0;e<this.I$.length;e++)this.I$[e].KG();this.I$[this.rS].kc()};iQ.prototype.acj=function(n){this.F(this.r2[this.I$.indexOf(n.currentTarget)]);
this.A(new k(V.E.L,!1))};iQ.prototype.B=function(){if(this.V_)this.V_.F(hl.get([12,36])+":");for(var e=0;
e<this.I$.length;e++)this.I$[e].B()};function fq(n,F,O,I){ch.call(this);var x=V._0(),r="";this._=V.w("span","fitem tinput");
if(n){this.xt=n;this.zt=V.w("label","flabel");this._.appendChild(this.zt);this.zt.setAttribute("for",x);
this.B()}if(I==null){this.Ee=V.w("input","");this.Ee.setAttribute("type","text")}else this.Ee=V.w("textarea","scrollable");
this.Ee.setAttribute("id",x);if(O)r+="width:"+O+"em;";if(I){this.Ee.setAttribute("rows",I)}if(r!="")this.Ee.setAttribute("style",r);
this._.appendChild(this.Ee);if(F){this.lQ=V.w("span","");this.lQ.textContent=F;this._.appendChild(this.lQ)}this.Ee.addEventListener("change",this.sS.bind(this),!1);
this.Ee.addEventListener("input",this.akb.bind(this),!1)}fq.prototype=new ch;fq.prototype.B=function(){if(this.xt)this.zt.textContent=hl.get(this.xt)+":"};
fq.prototype.YB=function(n){this.zt.textContent=n};fq.prototype.F=function(n){this.Ee.value=n==null?"":n};
fq.prototype.u=function(){return this.Ee.value};fq.prototype.xC=function(){this.Ee.select();this.Ee.focus()};
fq.prototype.sS=function(n){this.A(new k(V.E.L,!1))};fq.prototype.akb=function(n){this.A(new k("input",!1))};
function af(n,F,O,I,x,r,_){dp.call(this,n,F,O,I,x,!0,r,null,_);V.fx(this._,"trangeinput");this._.appendChild(this.zt);
this._.appendChild(this.Ee);var d=V.w("span","rangecont");this._.appendChild(d);d.appendChild(this.Ic);
this.Ic.setAttribute("style","width:97%;")}af.prototype=new dp;function g3(){ch.call(this);this.Xv=[16,!0,!0];
this._=V.w("span","");this.wN=[new cR([12,24],0,255),new cL("Anti-alias"),new cL([12,25])];for(var e=0;
e<3;e++){var n=this.wN[e];n.parent=this;n.F(this.Xv[e]);this._.appendChild(n._);n.k(V.E.L,this.tE,this)}}g3.prototype=new ch;
g3.prototype.tE=function(){for(var e=0;e<3;e++)this.Xv[e]=this.wN[e].u();this.A(new k(V.E.L,!1))};g3.prototype.F=function(n){this.Xv=n.slice(0);
for(var e=0;e<3;e++)this.wN[e].F(n[e])};g3.prototype.u=function(){return this.Xv.slice(0)};g3.prototype.B=function(){for(var e=0;
e<3;e++)this.wN[e].B()};function cz(n,F){ch.call(this);if(F==null)F=!1;this.tn=[];this.ae6=0;this.a2o=0;
this.iw=0;this.nT=[];this.w9=[];for(var O in q.qF.type){if(O=="warpCustom"&&!F)continue;this.nT.push(O);
this.w9.push(q.qF.type[O])}this._=V.w("span","fitem warpbutton");this.nf=new ch;this.nf._=V.w("div","floatcont");
if(n){this.V_=n;this.zt=V.w("label","flabel");this._.appendChild(this.zt)}this.e=V.w("button");this._.appendChild(this.e);
this.e.addEventListener("click",this.r1.bind(this),!1);this.mO=new iX(!0);this.nf._.appendChild(this.mO._);
this.mO.k(V.E.L,this.a6J,this);this.B()}cz.prototype=new ch;cz.prototype.YB=function(n){this.zt.textContent=n};
cz.prototype.B=function(){if(this.V_)this.zt.innerHTML=hl.get(this.V_)+":";this.tn=[];var n=V.w("canvas",""),F=n.getContext("2d"),O=0;
F.font=Math.floor(13*V.Z())+"px sans-serif";for(var e=0;e<this.nT.length;e++){O=Math.max(O,F.measureText(hl.get(q.qF.type[this.nT[e]])).width)}var I=this.ae6=Math.floor(50*V.Z()+O),x=this.a2o=Math.floor(23*V.Z());
n.width=I;n.height=x;this.nf._.setAttribute("style","width:"+Math.floor(8+I/V.Z())+"px;");F.font=Math.floor(13*V.Z())+"px sans-serif";
F.lineWidth=1;F.strokeStyle="#000000";var r=Math.floor(16*V.Z()),_=new gv(0,0,r,r);for(var e=0;e<this.nT.length;
e++){var d=this.nT[e];F.clearRect(0,0,n.width,n.height);var w=q.qF.qF(_,d,!0,.3,0,0),Z=q.z.om(_);Z.s.push("M","L","M","L");
Z.H.push(0,r/2,r,r/2);Z.H.push(r/2,0,r/2,r);Z=q.z.xk(Z);Z=q.z.iC(Z,r/5);q.uY.m(w,Z.H,_);q.z.m(Z.H,new cD(1,0,0,1,Math.floor(8*V.Z())+.5,Math.floor(3*V.Z())+.5),Z.H);
F.beginPath();Typr.U.pathToContext({cmds:Z.s,crds:Z.H},F);F.stroke();F.fillText(hl.get(q.qF.type[d]),Math.floor(40*V.Z()),Math.floor(16*V.Z()));
this.tn.push(n.toDataURL())}this.mO.Ea(this.tn,null,I,x);this.rP()};cz.prototype.r1=function(n){var F=this.e.getBoundingClientRect(),O=new k(V.E.P,!0);
O.data={e:V.U.di,AM:this.nf,x:F.left,y:F.top+F.height+4};this.A(O)};cz.prototype.a6J=function(n){var F=new k(V.E.P,!0);
F.data={e:V.U.kX,AM:this.nf};this.A(F);this.iw=n.target.u();this.rP();this.A(new k(V.E.L))};cz.prototype.rP=function(){this.mO.Iv(this.iw);
this.e.innerHTML="<img src=\""+this.tn[this.iw]+"\" class=\"gsicon\" />";var n=this.ae6,F=this.a2o;V.z0(this.e.firstChild,n,F)};
cz.prototype.u=function(){return this.nT[this.iw]};cz.prototype.F=function(n){this.iw=this.nT.indexOf(n);
this.rP()};function gp(n,F,O){ch.call(this);if(n==null)n=!1;if(F==null)F=!1;if(O==null)O=!1;this.a7d=F;
this.qF=null;this.PH=new cz([12,22],O);this.PH.parent=this;this.PH.k(V.E.L,this.kO,this);this.zn=new bf([22,0],[[22,4,0],[22,4,1]]);
this.zn.k(V.E.L,this.kO,this);var I=n?cR:af;this.cy=new I([22,1],-100,100,"%");this.mS=new I("Horizontal Distortion:",-100,100,"%");
this.L5=new I("Vertical Distortion:",-100,100,"%");this.cy.parent=this.mS.parent=this.L5.parent=this;
this.cy.k(V.E.L,this.kO,this);this.mS.k(V.E.L,this.kO,this);this.L5.k(V.E.L,this.kO,this)}gp.prototype=new ch;
gp.prototype.B=function(){this.PH.B();this.zn.B();this.cy.B();var n=this.a7d?1:100;this.mS.YB(hl.get([22,2]).substring(0,n)+":");
this.L5.YB(hl.get([22,3]).substring(0,n)+":")};gp.prototype.kO=function(){var n=this.qF,F=this.PH.u(),O=n.warpStyle.v.warpStyle;
if(F=="warpCustom")q.qF.rG(q.qF.Bo(n),n);else delete n.customEnvelopeWarp;n.warpStyle.v.warpStyle=this.PH.u();
n.warpRotate.v.Ornt=["Hrzn","Vrtc"][this.zn.u()];n.warpValue.v=this.cy.u();n.warpPerspective.v=this.mS.u();
n.warpPerspectiveOther.v=this.L5.u();if(F=="warpNone"||F=="warpCustom"){n.warpValue.v=0;n.warpPerspective.v=0;
n.warpPerspectiveOther.v=0}else if(O=="warpNone"||O=="warpCustom")n.warpValue.v=50;this.A(new k(V.E.L,!1));
this.F(n)};gp.prototype.u=function(n){return JSON.parse(JSON.stringify(this.qF))};gp.prototype.F=function(n){this.qF=JSON.parse(JSON.stringify(n));
this.PH.F(n.warpStyle.v.warpStyle);this.zn.F(n.warpRotate.v.Ornt=="Hrzn"?0:1);this.cy.F(n.warpValue.v);
this.mS.F(n.warpPerspective.v);this.L5.F(n.warpPerspectiveOther.v);var F=n.warpStyle.v.warpStyle,O=F=="warpNone"||F=="warpCustom",I=[this.zn,this.cy,this.mS,this.L5];
for(var e=0;e<I.length;e++)if(O)I[e].gy();else I[e].hL()};function aH(n){ch.call(this);this._=V.w("div");
this.OO=n;this.B8=null;this.G_=new aE(0,0);this.no="position:relative;overflow:hidden;";this.gO=null;
this.O5=new V.LU(this._);this.Wy("grab");this.Q_=V.w("canvas","canv");this._.appendChild(this.Q_);this.xX=this.Q_.getContext("2d");
this.ahm=null;this._g=null;this.DI=null;this.iP=0;this.iq=0;this.cW=0;this.ab1=this.tC.bind(this);this.a5U=null;
this.a=new h0({d:1,v:1});this.zy=null;this.ql=null;this.aj3=this.R3.bind(this);this.akJ=this.BO.bind(this);
this.ajz=this.lu.bind(this);this.a58=this.Cd.bind(this);this.adg=0;this.bi=null;this.T9(this.Q_);this.e8(this)}aH.prototype=new ch;
aH.prototype.Ka=function(n){var F=this.gO,O=null;if(n.q(u.cf)){O="grab";if(n.q(u.ep)){O="zoom-in";if(n.q(u.pI))O="zoom-out"}}this.B8=O;
if(O)F=O;this.O5.hV(F,this.no);if(n.q(u.ep)){var I=0;if(n.q(u.wW))I=1;if(n.q(u.sF))I=-1;if(I!=0){this.CA(new aE(this.Q_.width/2,this.Q_.height/2),I==1)}}};
aH.prototype.Wy=function(n){this.gO=n;if(this.B8)return;this.O5.hV(n,this.no)};aH.prototype.T9=function(n){V.CP(n,this.aj3);
V.kQ(n);n.addEventListener("wheel",this.a58,!1)};aH.prototype.e8=function(n){n.k("viewchange",this.aem,this)};
aH.prototype.aem=function(n){var F=this.a.K,O=n.currentTarget.r5();this.a.K=O.K;this.a.n=O.n.clone();
if(F!=O.K)this.Qg();this.lx()};aH.prototype.r5=function(){return{K:this.a.K,n:this.a.n}};aH.prototype.F=function(n,F){var O=n[0].Kh;
if(this._g!=null&&this._g[0].Kh.Qq(O)){}else{this.a.KH={d:O.d,v:O.v};this.a.n=new aE(0,0);this.a.K=1}this._g=n;
this.Qg();this.eb();this.iP=0;this.iq=0;this.cW=F==null?0:F;this.tC()};aH.prototype.Cd=function(n){n.preventDefault();
if(n.deltaY==0||Date.now()-this.adg<100)return;var F=V.iJ(n);F.x=V.Z()*F.x;F.y=V.Z()*F.y;this.adg=Date.now();
this.CA(F,n.deltaY<0)};aH.prototype.CA=function(n,F){c.yi.jg(this.a,n,F);this.w8()};aH.prototype.a7U=function(){var n=this.a,F=n.KH;
this.a.K=c.yi.lD(F.d,F.v,n.Nv.d,n.Nv.v);this.w8()};aH.prototype.w8=function(){this.Qg();this.A(new k("viewchange"));
this.A(new k("zoom"))};aH.prototype.Qg=function(){this.DI=[];var n=this.a.K;for(var e=0;e<this._g.length;
e++){var F=this._g[e],O=new Uint8Array(F.data),I;if(n>=1)I={zc:O,rect:F.Kh};else I=q.a0X(O,F.Kh,n);this.DI.push(I)}};
aH.prototype.eb=function(){clearTimeout(this.a5U)};aH.prototype.lx=function(){if(this._g==null||!V.Zo(this.Q_))return;
var n=this.ahm,F=this.Q_.width,O=this.Q_.height,L,H;if(n==null||n.width!=F||n.height!=O){n=this.ahm=this.xX.createImageData(F,O);
console.log("creating image data")}var I=this._g[this.iP],x=this.DI[this.iP],r=this.a,_=r.KH,d=r.Nv,w=d.d,Z=d.v,P=_.d*r.K,C=_.v*r.K,W=Math.round((w-P)/2+r.n.x),v=Math.round((Z-C)/2+r.n.y);
if(r.K<=1){H=x.rect.clone();H.x=W;H.y=v;P=H.d;C=H.v;L=x.zc}else{var y=1/r.K,g=new gv(Math.floor((d.x-W)*y),Math.floor((d.y-v)*y),Math.ceil(d.d*y)+1,Math.ceil(d.v*y)+1),Q=new gv(0,0,g.d*r.K,g.v*r.K);
Q.x=g.x*r.K+W;Q.y=g.y*r.K+v;if(r.Ih==null||r.Ih.length!=g.X()*4){r.Ih=q.f(g.X()*4)}if(r.xj==null||r.xj.length!=Q.X()*4){r.xj=q.f(Q.X()*4)}q.IW(r.Ih,0);
q.nF(x.zc,x.rect,r.Ih,g);q.scale.qJ(r.Ih,g.d,g.v,r.xj,Q.d,Q.v,r.K);L=r.xj;H=Q}var J=new Uint8Array(n.data.buffer);
q.GE(J,w,Z,8,-W,-v);q.p.F_("norm",L,H,J,d,d,1);this.xX.setTransform(1,0,0,1,0,0);this.xX.putImageData(n,0,0);
this.xX.clearRect(W-1e3,v,1e3,C);this.xX.clearRect(W+P,v,1e3,C);this.xX.clearRect(W-1e3,v-1e3,P+2e3,1e3);
this.xX.clearRect(W-1e3,v+C,P+2e3,1e3);var A=aH.zg(r.K,"#ffffff");this.xX.putImageData(A,0,r.Nv.v-A.height)};
aH.wa={};aH.zg=function(n,F){var O="z"+n+","+F,I=aH.wa[O];if(I)return I;var x=Math.round(50*V.Z()),r=Math.round(18*V.Z()),_=V.w("canvas"),d=_.getContext("2d");
_.width=x;_.height=r;d.fillStyle="rgba(1,1,1,1)";d.fillRect(0,0,x,r);d.font=Math.round(11*V.Z())+"px monospace";
d.fillStyle=F;var w=n*100;if(w<100)w=w.toFixed(2);else w=Math.round(w);w=w+"%";var Z=d.measureText(w).width;
d.fillText(w,(x-Z)/2,Math.round(r*.7));I=aH.wa[O]=d.getImageData(0,0,x,r);return I};aH.prototype.tC=function(){var n=this._g,F=n.length,O=this.iP,I=this._g[O],x=(O+1)%F;
this.lx();if(F!=1&&n[x].Kh.Qq(I.Kh)){var r=I.Lo?parseInt(I.Lo.split(",").pop()):30;if(r==0)r=16;if(x==0)this.iq++;
if(this.cW==0||this.iq<this.cW)this.a5U=setTimeout(this.ab1,r)}this.iP=x};aH.prototype.Kq=function(n,F){if(n<=0||F<=0)return;
var O=Math.floor(n*V.Z()),I=Math.floor(F*V.Z());this.a.Nv=new gv(0,0,O,I);this.Q_.width=O;this.Q_.height=I;
this.Q_.setAttribute("style","width:"+O/V.Z()+"px; height:"+I/V.Z()+"px; display:block;");this.lx()};
aH.prototype.R3=function(n){this.bi=n.target;V.MH(window,this.akJ);V.Ry(window,this.ajz);this.zy=V.iJ(n,this.Q_);
this.zy.x*=V.Z();this.zy.y*=V.Z();this.G_=this.zy;this.ql=this.a.n.clone();if(this.OO&&this.bi==this.Q_&&!this.B8)this.A(new k("mousedown"))};
aH.prototype.BO=function(n){var F=this.a,O=this.B8,I=this._g[this.iP].Kh.clone();I.d*=F.K;I.v*=F.K;var x=V.iJ(n,this.Q_);
x.x*=V.Z();x.y*=V.Z();this.G_=x;if(this.OO&&this.bi==this.Q_&&!O)this.A(new k("mousemove"));else if((O=="grab"||O==null)&&!F.Nv.zp(I)){var r=x.x-this.zy.x,_=x.y-this.zy.y;
F.n.x=this.ql.x+Math.round(r);F.n.y=this.ql.y+Math.round(_);this.A(new k("viewchange"))}};aH.prototype.lu=function(n){V.le(window,this.akJ);
V.re(window,this.ajz);var F=this.B8;if(n.detail>1){this.a.K=1;this.a.n.mT(0,0);this.lx()}if(this.OO&&this.bi==this.Q_&&!this.B8)this.A(new k("mouseup"));
else{if(F=="zoom-in"||F=="zoom-out")this.CA(this.G_,F=="zoom-in")}};aH.prototype.$P=function(){return this.a.jR(this.G_.x,this.G_.y)};
function fg(){ch.call(this);this.uf=null;this.o9=null;this.k2=null;this.hE=null;this.a9C="";this.bq=[];
this.YL=0;this.F0=[];this.kE=0;this.GL=null;var n=this._=V.w("div",""),F=this.a7Z=V.w("div","form");
F.setAttribute("style","line-height:0; margin-bottom:0.5em;");n.appendChild(F);var O=this.V_=V.w("span");
F.appendChild(O);O.setAttribute("style","font-size:1.2em; font-weight:bold; margin-right:3em;");var I=this.a7L=new cL([25,2,0]);
I.F(!0);F.appendChild(I._);I.k(V.E.L,this.I_,this);var x=this.p1=new cL([25,2,1]);x.F(!0);F.appendChild(x._);
x.k(V.E.L,this.I_,this);var r=new gD(" ");F.appendChild(r._);var _=this.jH=new fq([25,1,1]);F.appendChild(_._);
_.k(V.E.L,this.I_,this);this.Ax=new fw(14);this.Ax.a53(3);F.appendChild(this.Ax._);this.Ax.parent=this;
this.Ax.k(V.E.L,this.acw,this);var d=this.aiO=new cg([25,1,2],null,null,!0);F.appendChild(d._);d.k("click",this.h_,this);
this.a37=this.a5u.bind(this);this.Ra=V.w("div","svggallery scrollable");n.appendChild(this.Ra);this.Ra.addEventListener("scroll",this.adG.bind(this))}fg.prototype=new ch;
fg.prototype.XW=function(n){this.a4Q=n};fg.prototype.B=function(){this.V_.textContent=hl.get([25,0]);
this.Ax.B();this.a7L.B();this.p1.B();this.jH.B();this.aiO.B()};fg.prototype.Kq=function(n,F){F-=26;this.uf=new aE(n,F);
this.a7Z.setAttribute("style","width:"+n+"px");this.Ra.setAttribute("style","width:"+n+"px; height:"+F+"px");
if(V.Zo(this._))this.I_()};fg.prototype.F=function(n){this.o9=n;this.I_()};fg.prototype.adG=function(n){var F=this.Ra;
if(F.scrollTop+F.clientHeight+10>=F.scrollHeight){this.I_(!0)}};fg.prototype.acw=function(n){this.k2=null;
this.I_()};fg.prototype.a5u=function(n){if(Date.now()-this.kE<2e3)return;this.kE=Date.now();this.YL=this.F0.indexOf(n.currentTarget);
var F=this.T1(this.o9.x,this.o9.y);if(F[1]){var O=F[1].largeImageURL,I=new XMLHttpRequest;I.responseType="arraybuffer";
I.open("GET",O,!0);I.onload=this.ajV.bind(this);I.send();return}this.Wx(F)};fg.prototype.ajV=function(n){var F=n.target.response,O=fx.TG(F),I=fx.rM(O),x=I.bx(F),r=this.T1(this.o9.x,this.o9.y,[F,x[0].Kh.d,x[0].Kh.v]);
this.Wx(r)};fg.prototype.Wx=function(n){var F=n[0],O=fx.TG(F),I=fx.rM(O),x=new fj("template.psd");I.bx(F,x);
var r=new k("tempready",!0);r.data={KH:x};this.A(r)};fg.prototype.h_=function(n){var F=n.target;this.bq=[];
this.I_()};fg.prototype.aoG=function(n){var F=JSON.parse(n.target.response);this.hE=F.hits;this.I_()};
fg.prototype.I_=function(n){if(this.o9==null||this.uf==null||this.a4Q==null)return;if(this.uf.x<=0)return;
var F=this.o9.x,O=this.o9.y;if(Math.min(F,O)<50)return;if(n!=!0){this.F0=[];V.em(this.Ra);this.Ra.scrollTop=0}if(this.F0.length>300)return;
var I=Math.min(1,300/Math.max(F,O)),x=this.uf.clone();x.x-=20;var r=Math.max(1,Math.floor(x.x/(F*I))),_=Math.max(1,Math.ceil(x.y/(O*I)));
I=x.x/r/F;var d=r*_;if(this.k2==null){var w=this.a4Q.sH.j9();this.k2=[];for(var Z in w){var P=w[Z],C=P[3];
if(!this.Ax.zI(P))continue;if(P[5]==null||P[5].slice(0,2)=="gf")continue;this.k2.push(P)}if(this.k2.length==0)this.k2.push(w.DejaVuSans)}var W=this.p1.u(),v=this.jH.u().trim();
this.jH.wz(W);if(W&&(this.hE==null||v!=this.a9C)){var L=new XMLHttpRequest,H="https://pixabay.com/api/?image_type=photo"+(v==""?"":"&q="+encodeURIComponent(v))+"&per_page=200&page=1&key=10554583-a5eacb61c2e61105fdfb6eb88";
if(v=="")H+="&safesearch=true";if(v=="")H="plugins/gallery.json";L.open("GET",H,!0);L.onload=this.aoG.bind(this);
L.onerror=function(p){console.log(p.target.response)};L.send();this.a9C=v;return}I*=(F*I-5)/(F*I);var y=this.F0.length;
for(var e=0;e<d;e++){var g=this.YL=y+e;if(this.bq[g]==null)this.bq[g]=Math.floor(Math.random()*4294967295);
var Q=this.T1(Math.round(F*I),Math.round(O*I)),J=Q[0];J=Y.l5(new Uint8Array(J));var A=V.w("span");A.innerHTML=J;
this.F0.push(A);this.Ra.appendChild(A);A.addEventListener("click",this.a37,!1)}};fg.prototype.T1=function(n,F,O){var I=this.p1.u(),x=this.a7L.u(),r=I&&this.hE.length!=0?this.hE:null;
if(x&&!I)r=null;if(x&&I&&(this.YL&1)==0)r=null;return hF.jP(n,F,this.bq[this.YL],this.k2,O?O:r)};function he(){ch.call(this);
this._=V.w("div");this.J7=null;this.agd=null;this.gW=-1;this.MK={JPG:[{Qo:new af([12,52,0],0,100,"%",null,null,!0),Y6:70},{Qo:new cL("attach metadata"),Y6:!1}],TIFF:[{Qo:new cL("attach metadata"),Y6:!1}],WEBP:[{Qo:new af([12,52,0],0,100,"%",null,null,!0),Y6:70}],GIF:[{Qo:new af([12,52,0],0,100,"%",null,null,!0),Y6:100}],PNG:[{Qo:new af([12,52,0],0,100,"%",null,null,!0),Y6:100},{Qo:new cL("don't use palettes"),Y6:!1}],PDF:[{Qo:new fq([12,52,1]),Y6:""},{Qo:new af([12,52,0],0,100,"%",null,null,!0),Y6:100},{Qo:new cL("rasterize all"),Y6:!1},{Qo:new cL("rasterize text"),Y6:!1},{Qo:new cL("vectorize text"),Y6:!1}],EMF:[{Qo:new fq([12,52,1]),Y6:""},{Qo:new cL("rasterize all"),Y6:!1},{Qo:new cL("rasterize text"),Y6:!1},{Qo:new cL("vectorize text"),Y6:!1}],SVG:[{Qo:new cL("add raster graphics"),Y6:!0},{Qo:new cL("add hidden layers"),Y6:!1},{Qo:new cL("vectorize text"),Y6:!1},{Qo:new cL("rasterize text"),Y6:!1},{Qo:new cL("add layer names"),Y6:!0},{Qo:new cL("pretty-print"),Y6:!0}],RAW:[{Qo:new hg([12,72],["1","3","4"]),Y6:2},{Qo:new hg([12,34],["8 Bits","16 Bits"]),Y6:0},{Qo:new hg("Byte Order",["12-34","34-12"]),Y6:0}],anim:[{Qo:new af("Speed",10,800,"%",null,!0,!0),Y6:100},{Qo:new cR("Repeat (0 = Forever)",0,10," \xD7",0,!1,!0),Y6:0},{Qo:new cL("reverse frames"),Y6:!1},{Qo:new cL("boomerang"),Y6:!1}],slcs:[{Qo:new cL("As Slices"),Y6:!0}]};
for(var n in this.MK){var F=this.MK[n];for(var e=0;e<F.length;e++){F[e].Qo.F(F[e].Y6);F[e].Qo.k(V.E.L,this.pz,this)}}}he.prototype=new ch;
he.prototype.ajJ=function(){this.gW=-1};he.prototype.B=function(){for(var n in this.MK)for(var e=0;e<this.MK[n].length;
e++)this.MK[n][e].Qo.B()};he.prototype.pz=function(){this.I_();this.A(new k(V.E.L,!1))};he.prototype.I_=function(){var n=this.J7,F=n[0],O=n[1],I=n[2],x=n[3],r=this.MK[F];
if(r==null)r=[];else r=r.slice(0);if(O)r=r.concat(this.MK.anim);if(["GIF","PNG","JPG"].indexOf(F)!=-1&&I)r=r.concat(this.MK.slcs);
if(F+" "+O+" "+x!=this.gW){this.gW=F+" "+O+" "+x;V.em(this._);for(var e=0;e<r.length;e++){if(F=="PDF"&&x&&e==0)continue;
this._.appendChild(r[e].Qo._);V.Zq(this._)}}var _=this.agd=[];for(var e=0;e<r.length;e++)_.push(r[e].Qo.u())};
he.prototype.s$=function(n,F,O,I){this.J7=[n,F,O,I];this.I_()};he.prototype.u=function(){return this.agd.slice(0)};
function em(){ch.call(this);this._=V.w("span","fitem");this.rH=!1;this.Lr=new cg("No",!1,"Cancel");this.lF=new cg("Yes",!1,"Confirm");
this._.appendChild(this.Lr._);this._.appendChild(this.lF._);this.Lr.k("click",this.gx,this);this.lF.k("click",this.gx,this);
this.B()}em.prototype=new ch;em.prototype.B=function(){this.Lr.YB(V.WE("cross",null,"autoscale"));this.lF.YB(V.WE("checkmark",null,"autoscale"))};
em.prototype.gx=function(n){this.rH=n.target==this.lF;this.A(new UIEvent("click"))};em.prototype.u=function(){return this.rH};
function B(n){ch.call(this);this.m$=n;this._=V.w("div","");this.QX=[];this.a3m=[]}B.prototype=new ch;
B.prototype.ln=function(n){};B.prototype.Ru=function(){return!1};B.prototype.Kq=function(n,F){};B.prototype.XW=function(n,F){};
B.prototype.P5=function(n){};B.prototype.F=function(n,F,O,I,x,r){var _=[],d=this.QX,w=0,Z=bS.rn["s"+this.m$];
Z?Z(n,_,r):this.dm(n,_,r);for(var e=0;e<d.length;e++)if(!(d[e]instanceof gD))d[e].F(_[w++])};B.prototype.u=function(){var n=bS.tc(this.m$),F=[],O=this.QX,I=0;
for(var e=0;e<O.length;e++)if(!(O[e]instanceof gD))F[I++]=O[e].u();var x=bS.rn["g"+this.m$];x?x(n,F):this.Jk(n,F);
return n};B.prototype.Ka=function(n){};B.prototype.kO=function(n){var F=this.a3m;for(var e=0;e<F.length;
e+=2){var O=this.QX[F[e]],I=this.QX[F[e+1]],x=O.u(),r=I.u();if(n.target==O)I.F(Math.max(x,r));else O.F(Math.min(x,r))}this.A(new k(V.E.L))};
B.prototype.B=function(){for(var e=0;e<this.QX.length;e++)this.QX[e].B()};B.prototype.Nf=function(n){V.fx(this._,"form");
var F=this.QX;for(var e=0;e<F.length;e++){var O=F[e];O.parent=this;O.k(V.E.L,this.kO,this);this._.appendChild(O._);
if(O instanceof cL&&F[e+1]instanceof aR)continue;if(n&&n.indexOf(e)!=-1)V.dw(this._);else V.Zq(this._)}};
B.prototype.ZB=function(){return!1};B.prototype.XS=function(n,F,O,I,x){};B.prototype.RL=function(n,F,O,I,x){};
B.prototype._X=function(n,F,O,I,x){};B.prototype.Jk=function(n,F){};B.prototype.dm=function(n,F){};B.Bokh=function(){B.call(this,"Bokh");
this.QX=[new bf("Depth Map",["A","b"]),new af("Focal Distance",0,255),new bf([12,76,1],"Triangle (3),Square (4),Pentagon (5),Hexagon (6),Heptagon (7),Octagon (8)".split(",")),new af([12,56],0,100),new af([12,15],0,360),new af([12,2],0,100),new af([4,13],0,255),new af([24,6],0,100),new hg([12,58],[[12,59,0],[12,59,1]]),new cL([12,60])];
this.Nf([4,6])};B.Bokh.prototype=new B;B.Bokh.prototype.dm=function(n,F,O){var I=[[22,5,0],[6,5,3],[6,2]],x=n.BkDi.v.BtDi,r=n.BkDc,_=0;
if(x=="BeIn")_=0;else if(x=="BeIt"&&r.v.BtDc=="BeCt")_=1;else if(x=="BeIt"&&r.v.BtDc=="BeCm")_=2;else _=3+r.v;
for(var e=0;e<O[1].length;e++)I.push(O[1][e].name);this.QX[0].SY(I,[3]);F[0]=_;F[1]=n.BkDp.v;F[2]=parseInt(n.BkIs.v.BtIs.slice(3))-3;
F[3]=n.BkIb.v;F[4]=n.BkIr.v;F[5]=n.BkSb.v;F[6]=n.BkSt.v;F[7]=n.BkNa.v;F[8]=n.BkNt.v.BtNt=="BeNu"?0:1;
F[9]=n.BkNm.v};B.Bokh.prototype.Jk=function(n,F){var O;if(F[0]==0){O="BeIn";delete n.BkDc}else if(F[0]<3){O="BeIt";
n.BkDc={t:"enum",v:{BtDc:["BeCt","BeCm"][F[0]-1]}}}else{O="BeIa";n.BkDc={t:"long",v:F[0]-3}}n.BkDi.v.BtDi=O;
n.BkDp.v=F[1];n.BkIs.v.BtIs="BeS"+(3+F[2]);n.BkIb.v=F[3];n.BkIr.v=F[4];n.BkSb.v=F[5];n.BkSt.v=F[6];n.BkNa.v=F[7];
n.BkNt.v.BtNt=["BeNu","BeNg"][F[8]];n.BkNm.v=F[9]};B.oilPaint=function(){B.call(this,"oilPaint");this.QX=[new af([12,56],.1,10,"px",!0),new af("Cleanliness",0,10,"px",!0),new af([12,38],.1,10,null,!0),new af("Bristle Detail",0,10,null,!0),new cL("Lighting"),new af("Shine",0,10,null,!0),new fS([12,15])];
this.Nf()};B.oilPaint.prototype=new B;B.oilPaint.prototype.dm=function(n,F){var O="stylization cleanliness brushScale microBrush lightingOn specularity".split(" ");
for(var e=0;e<O.length;e++)F[e]=n[O[e]].v;F[6]=n.LghD.v};B.oilPaint.prototype.Jk=function(n,F){var O="stylization cleanliness brushScale microBrush lightingOn specularity".split(" ");
for(var e=0;e<O.length;e++)n[O[e]].v=F[e];n.LghD.v=F[6].Wr};B.TrcC=function(){B.call(this,"TrcC");this.QX=[new af("Level",0,255),new hg([12,69],[[19,4,1],[19,4,0]])];
this.Nf()};B.TrcC.prototype=new B;B.TrcC.prototype.dm=function(n,F){F[0]=n.Lvl.v;F[1]=["Lwr","Upr"].indexOf(n.Edg.v.CntE)};
B.TrcC.prototype.Jk=function(n,F){n.Lvl.v=F[0];n.Edg.v.CntE=["Lwr","Upr"][F[1]]};B["Dfs "]=function(){B.call(this,"Dfs ");
this.QX=[new hg([12,36],[[15,10,0],[15,10,6],[15,10,11],"Anisotropic"])];this.Nf()};B["Dfs "].prototype=new B;
B["Dfs "].prototype.dm=function(n,F){F[0]=["Nrml","DrkO","LghO","anisotropic"].indexOf(n.Md.v.DfsM)};
B["Dfs "].prototype.Jk=function(n,F){n.Md.v.DfsM=["Nrml","DrkO","LghO","anisotropic"][F[0]]};B.Embs=function(){B.call(this,"Embs");
this.QX=[new fS([12,15]),new af([12,42],1,100,"px"),new af([12,57],1,500,"%")];this.Nf()};B.Embs.prototype=new B;
B.Embs.prototype.dm=function(n,F){F[0]=n.Angl.v;F[1]=n.Hght.v;F[2]=n.Amnt.v};B.Embs.prototype.Jk=function(n,F){n.Angl.v=F[0].Wr;
n.Hght.v=F[1];n.Amnt.v=F[2]};B["Wnd "]=function(){B.call(this,"Wnd ");this.QX=[new hg([12,32],["Wind","Blast","Stagger"]),new hg([12,33],["From the Right","From the Left"])];
this.Nf()};B["Wnd "].prototype=new B;B["Wnd "].prototype.dm=function(n,F){F[0]=["Wnd","Blst","Stgr"].indexOf(n.WndM.v.WndM);
F[1]=["Left","Rght"].indexOf(n.Drct.v.Drct)};B["Wnd "].prototype.Jk=function(n,F){n.WndM.v.WndM=["Wnd","Blst","Stgr"][F[0]];
n.Drct.v.Drct=["Left","Rght"][F[1]]};B.lightFilterGradient=function(){B.call(this,"lightFilterGradient");
this.QX=[new af([24,3,1],0,100,"px",1,!0),new af([12,38],0,200,"%"),new cL([4,11]),new af("High",0,100,"%"),new af("Medium",0,100,"%"),new af("Low",0,100,"%")];
this.Nf()};B.lightFilterGradient.prototype=new B;B.lightFilterGradient.prototype.dm=function(n,F){F[0]=n.blur.v;
F[1]=n.textureScale.v*100;F[2]=n.Scl.v==-1;var O=n.Dtl.v;F[3]=O[0].v*100;F[4]=O[1].v*100;F[5]=O[2].v*100};
B.lightFilterGradient.prototype.Jk=function(n,F){n.blur.v=F[0];n.textureScale.v=F[1]/100;n.Scl.v=F[2]?-1:1;
var O=n.Dtl.v;O[0].v=F[3]/100;O[1].v=F[4]/100;O[2].v=F[5]/100};B.LnsF=function(){B.call(this,"LnsF");
this.QX=[new af([12,2],10,300,"%"),new hg([12,44],["Lens 1","Lens 2","Lens 3","Lens 4"]),new af("Position X",0,100,"%"),new af("Position Y",0,100,"%")];
this.Nf()};B.LnsF.prototype=new B;B.LnsF.prototype.dm=function(n,F){F[0]=n.Brgh.v;F[1]=["Zm","Nkn","Nkn1","PnVs"].indexOf(n.Lns.v.Lns);
var O=n.FlrC.v;F[2]=Math.round(O.Hrzn.v*100);F[3]=Math.round(O.Vrtc.v*100)};B.LnsF.prototype.Jk=function(n,F){n.Brgh.v=F[0];
n.Lns.v.Lns=["Zm","Nkn","Nkn1","PnVs"][F[1]];var O=n.FlrC.v;O.Hrzn.v=F[2]/100;O.Vrtc.v=F[3]/100};B.LnsF.prototype.ZB=function(){return!0};
B.LnsF.prototype.XS=function(n,F,O,I,x){this.FA=!0;this.eM(n,x)};B.LnsF.prototype.RL=function(n,F,O,I,x){if(!this.FA)return;
this.eM(n,x)};B.LnsF.prototype._X=function(n,F,O,I,x){this.FA=!1};B.LnsF.prototype.eM=function(n,F){var O=n.a.jR(F.x,F.y);
function I(x,r){return Math.round(Math.max(0,Math.min(100,100*x/r)))}this.QX[2].F(I(O.x,n.d));this.QX[3].F(I(O.y,n.v));
this.kO()};B.blendOptions=function(){B.call(this,"blendOptions");this.QX.push(new bf([12,19,0],fk.w9,!1,fk.uv));
this.QX.push(new af([12,0],0,100,"%"));this.Nf()};B.blendOptions.prototype=new B;B.blendOptions.prototype.dm=function(n,F){F[0]=fk.Cs.indexOf(n.Md.v.BlnM);
F[1]=n.Opct.v.val};B.blendOptions.prototype.Jk=function(n,F){n.Md.v.BlnM=fk.Cs[F[0]];n.Opct.v.val=F[1]};
B.LnCr=function(){B.call(this,"LnCr");this.QX=[new af([12,57],-100,100),new af([12,38],10,150,"%")];
this.Nf()};B.LnCr.prototype=new B;B.LnCr.prototype.dm=function(n,F){F[0]=n.LnIa.v;F[1]=n.LnSi.v};B.LnCr.prototype.Jk=function(n,F){n.LnIa.v=F[0];
n.LnSi.v=F[1]};B.adaptCorrect=function(){B.call(this,"adaptCorrect");var n=g0;this.QX=[new gD([19,6,0]),new n([12,57],0,100,"%"),new n("Tone",0,100,"%"),new n([12,56],0,200,"px"),new gD([19,6,2]),new n([12,57],0,100,"%"),new n("Tone",0,100,"%"),new n([12,56],0,200,"px"),new gD([3]),new n([13,0],-100,100)];
this.Nf([3,7])};B.adaptCorrect.prototype=new B;B.adaptCorrect.prototype.dm=function(n,F){var O=n.sdwM.v;
F[0]=O.Amnt.v.val;F[1]=O.Wdth.v.val;F[2]=O.Rds.v;var O=n.hglM.v;F[3]=O.Amnt.v.val;F[4]=O.Wdth.v.val;
F[5]=O.Rds.v;F[6]=n.ClrC.v};B.adaptCorrect.prototype.Jk=function(n,F){var O=n.sdwM.v;O.Amnt.v.val=F[0];
O.Wdth.v.val=F[1];O.Rds.v=F[2];var O=n.hglM.v;O.Amnt.v.val=F[3];O.Wdth.v.val=F[4];O.Rds.v=F[5];n.ClrC.v=F[6]};
B.boxblur=function(){B.call(this,"boxblur");this.QX=[new af([12,56],1,200," px")];this.Nf()};B.boxblur.prototype=new B;
B.boxblur.prototype.dm=function(n,F){F[0]=n.Rds.v.val};B.boxblur.prototype.Jk=function(n,F){n.Rds.v.val=F[0]};
B.GsnB=function(){B.call(this,"GsnB");this.QX=[new af([12,56],.1,400,"px",1,!0)];this.Nf()};B.GsnB.prototype=new B;
B.MtnB=function(){B.call(this,"MtnB");this.QX=[new fS([12,15]),new af([12,28],1,100," px")];this.Nf()};
B.MtnB.prototype=new B;B.RdlB=function(){B.call(this,"RdlB");this.QX=[new af([12,57],1,100),new hg([12,36],["Spin","Zoom"]),new g0("Off X",0,1,null,2),new g0("Off Y",0,1,null,2)];
this.Nf()};B.RdlB.prototype=new B;B.RdlB.prototype.dm=function(n,F){F[0]=n.Amnt.v;F[1]=["Spn","Zm"].indexOf(n.BlrM.v.BlrM);
F[2]=n.Cntr.v.Hrzn.v;F[3]=n.Cntr.v.Vrtc.v};B.RdlB.prototype.Jk=function(n,F){n.Amnt.v=F[0];n.BlrM.v.BlrM=["Spn","Zm"][F[1]];
n.Cntr.v.Hrzn.v=F[2];n.Cntr.v.Vrtc.v=F[3]};B.Dspl=function(){B.call(this,"Dspl");this.QX=[new bf([6,36,3],["a","b"]),new af([22,4,0],-100,100,"px"),new af([22,4,1],-100,100,"px"),new bf([24,18,0],[[24,18,3],[24,18,2]])];
this.Nf()};B.Dspl.prototype=new B;B.Dspl.prototype.dm=function(n,F,O){this.a0g=[];this.KZ=[];var I=-1,x=O?O[0]:null;
if(x==null)x=this.a4V;else this.a4V=x;if(x)for(var e=0;e<x.length;e++){var r=x[e];this.a0g.push(r.fA.trim());
this.KZ.push(r.D5);if(r.D5==n.DspF.v.pth)I=e}this.QX[0].SY(this.a0g);F[0]=I==-1?0:I;F[1]=n.HrzS.v;F[2]=n.VrtS.v;
F[3]=["WrpA","RptE"].indexOf(n.UndA.v.UndA)};B.Dspl.prototype.Jk=function(n,F){if(this.KZ.length==0)return;
n.DspF.v.pth=this.KZ[F[0]];n.HrzS.v=F[1];n.VrtS.v=F[2];n.UndA.v.UndA=["WrpA","RptE"][F[3]]};B.Pnch=function(){B.call(this,"Pnch");
this.QX=[new af([12,57],-100,100,"%")];this.Nf()};B.Pnch.prototype=new B;B["Plr "]=function(){B.call(this,"Plr ");
this.QX=[new hg(null,["Rect to Polar","Polar to Rect"])];this.Nf()};B["Plr "].prototype=new B;B.Rple=function(){B.call(this,"Rple");
this.QX=[new af([12,57],-999,999),new bf([12,14,0],[[19,8,0],[19,8,1],[19,8,2]])];this.Nf()};B.Rple.prototype=new B;
B["Shr "]=function(){B.call(this,"Shr ");this.QX=[new cl(!0,!0),new bf([24,18,0],[[24,18,3],[24,18,2]])];
this.Nf()};B["Shr "].prototype=new B;B["Shr "].prototype.dm=function(n,F){var O=new cD(0,255/127,255/127,0,-2,128),I=JSON.parse(JSON.stringify(n.ShrP.v));
q.pH.m(I,O);F[0]=I;F[1]=["WrpA","RptE"].indexOf(n.UndA.v.UndA)};B["Shr "].prototype.Jk=function(n,F){var O=new cD(0,255/127,255/127,0,-2,128);
O.uZ();q.pH.m(F[0],O);n.ShrP.v=F[0];n.ShrE.v=F[0].length-1;n.UndA.v.UndA=["WrpA","RptE"][F[1]]};B.Sphr=function(){B.call(this,"Sphr");
this.QX=[new af([12,57],-100,100),new bf([12,36],["Normal",[22,4,0],[22,4,1]])];this.Nf()};B.Sphr.prototype=new B;
B.Sphr.prototype.dm=function(n,F){F[0]=n.Amnt.v;F[1]=["Nrml","HrzO","VrtO"].indexOf(n.SphM.v.SphM)};
B.Sphr.prototype.Jk=function(n,F){n.Amnt.v=F[0];n.SphM.v.SphM=["Nrml","HrzO","VrtO"][F[1]]};B.Twrl=function(){B.call(this,"Twrl");
this.QX=[new af([12,15],-999,999)];this.Nf()};B.Twrl.prototype=new B;B.Wave=function(){B.call(this,"Wave");
this.a3m=[1,2,3,4];this.QX=[new af("Number of Generators",1,100),new g0("Min Length",1,999),new g0("Max Length",1,999),new g0("Min Ampl.",1,999),new g0("Max Ampl.",1,999),new g0("Scale X",1,100,"%"),new g0("Scale Y",1,100,"%"),new hg([12,44],["Sine","Triangle",[12,93,3]]),new bf([24,18,0],[[24,18,3],[24,18,2]]),new fq("Randomizer Seed")];
this.Nf()};B.Wave.prototype=new B;B.Wave.prototype.dm=function(n,F){F[0]=n.NmbG.v;F[1]=n.WLMn.v;F[2]=n.WLMx.v;
F[3]=n.AmMn.v;F[4]=n.AmMx.v;F[5]=n.SclH.v;F[6]=n.SclV.v;F[7]=["WvSn","WvTr","WvSq"].indexOf(n.Wvtp.v.Wvtp);
F[8]=["WrpA","RptE"].indexOf(n.UndA.v.UndA);F[9]=n.RndS.v};B.Wave.prototype.Jk=function(n,F){n.NmbG.v=F[0];
n.WLMn.v=F[1];n.WLMx.v=F[2];n.AmMn.v=F[3];n.AmMx.v=F[4];n.SclH.v=F[5];n.SclV.v=F[6];n.Wvtp.v.Wvtp=["WvSn","WvTr","WvSq"][F[7]];
n.UndA.v.UndA=["WrpA","RptE"][F[8]];var O=parseInt(F[9]);if(isNaN(O))O=248325464;O=Math.max(0,Math.min(268435455,O));
n.RndS.v=O;this.QX[9].F(O)};B.surfaceBlur=function(){B.call(this,"surfaceBlur");this.QX=[new af([12,56],1,200," px"),new af([4,13],1,255," px")];
this.Nf()};B.surfaceBlur.prototype=new B;B.surfaceBlur.prototype.dm=function(n,F){F[0]=n.Rds.v.val;F[1]=n.Thsh.v};
B.surfaceBlur.prototype.Jk=function(n,F){n.Rds.v.val=F[0];n.Thsh.v=F[1]};B.AdNs=function(){B.call(this,"AdNs");
this.QX=[new af([12,57],0,200," %"),new bf([12,58],[[12,59,1],[12,59,0]]),new cL([12,60])];this.Nf()};
B.AdNs.prototype=new B;B.DstS=function(){B.call(this,"DstS");this.QX=[new af([12,56],1,200," px"),new af([4,13],1,255," px")];
this.Nf()};B.DstS.prototype=new B;B["Mdn "]=function(){B.call(this,"Mdn ");this.QX=[new af([12,56],1,200," px")];
this.Nf()};B["Mdn "].prototype=new B;B["Mdn "].prototype.dm=function(n,F){F[0]=n.Rds.v.val};B["Mdn "].prototype.Jk=function(n,F){n.Rds.v.val=F[0]};
B.ClrH=function(){B.call(this,"ClrH");this.QX=[new af([12,56],4,100," px")];for(var e=1;e<4;e++)this.QX.push(new af("Angle "+e,0,90," \xB0"));
this.Nf()};B.ClrH.prototype=new B;B.ClrH.prototype.dm=function(n,F){F[0]=n.Rds.v;for(var e=1;e<4;e++)F[e]=n["Ang"+e].v};
B.ClrH.prototype.Jk=function(n,F){n.Rds.v=F[0];for(var e=1;e<4;e++)n["Ang"+e].v=F[e]};B.ClrH.prototype.B=function(){var n=this.QX;
n[0].B();for(var e=1;e<4;e++)n[e].YB(hl.get([12,15])+" "+e)};B.Crst=function(){B.call(this,"Crst");this.QX=[new af([12,61],3,100," px")];
this.Nf()};B.Crst.prototype=new B;B.Crst.prototype.dm=function(n,F){F[0]=n.ClSz.v};B.Crst.prototype.Jk=function(n,F){n.ClSz.v=F[0]};
B.Mztn=function(){B.call(this,"Mztn");this.QX.push(new bf([12,44],"Fine Dots,Medium Dots,Grainy Dots,Coarse Dots,Short Lines,Medium Lines,Long Lines,Short Strokes,Medium Strokes,Long Strokes".split(","),null,[4,3,3]));
this.KZ="FnDt MdmD GrnD CrsD ShrL MdmL LngL ShSt MdmS LngS".split(" ");this.Nf()};B.Mztn.prototype=new B;
B.Mztn.prototype.dm=function(n,F){F[0]=this.KZ.indexOf(n.MztT.v.MztT)};B.Mztn.prototype.Jk=function(n,F){n.MztT.v.MztT=this.KZ[F[0]]};
B["Msc "]=function(){B.call(this,"Msc ");this.QX=[new af([12,61],2,200," px")];this.Nf()};B["Msc "].prototype=new B;
B["Msc "].prototype.dm=function(n,F){F[0]=n.ClSz.v.val};B["Msc "].prototype.Jk=function(n,F){n.ClSz.v.val=F[0]};
B.Pntl=function(){B.call(this,"Pntl");this.QX=[new af([12,61],3,100," px")];this.Nf()};B.Pntl.prototype=new B;
B.Pntl.prototype.dm=function(n,F){F[0]=n.ClSz.v};B.Pntl.prototype.Jk=function(n,F){n.ClSz.v=F[0]};B.smartSharpen=function(){B.call(this,"smartSharpen");
this.QX=[new af([12,57],1,200,"%"),new af([12,56],0,200,"px",1,!0)];this.Nf()};B.smartSharpen.prototype=new B;
B.smartSharpen.prototype.dm=function(n,F){F[0]=n.Amnt.v.val;F[1]=n.Rds.v.val};B.smartSharpen.prototype.Jk=function(n,F){n.Amnt.v.val=F[0];
n.Rds.v.val=F[1]};B.UnsM=function(){B.call(this,"UnsM");this.QX=[new af([12,57],1,200," %"),new af([12,56],.1,400,"px",1,!0),new af([4,13],0,255," ")];
this.Nf()};B.UnsM.prototype=new B;B.HghP=function(){B.call(this,"HghP");this.QX=[new af([12,56],.1,400,"px",1,!0)];
this.Nf()};B.HghP.prototype=new B;B["Mxm "]=function(){B.call(this,"Mxm ");this.QX=[new af([12,56],1,200," px")];
this.Nf()};B["Mxm "].prototype=new B;B["Mnm "]=function(){B.call(this,"Mnm ");this.QX=[new af([12,56],1,200," px")];
this.Nf()};B["Mnm "].prototype=new B;B.Ofst=function(){B.call(this,"Ofst");this.QX=[new af([22,4,0],-1024,1024," px"),new af([22,4,1],-1024,1024," px"),new bf([24,18,0],[[24,18,2],[24,18,1],[24,18,3]])];
this.Nf()};B.Ofst.prototype=new B;B.Rept=function(){B.call(this,"Rept");this.QX=[new g0([12,38],1,300," %"),new g0("Row Shift",-50,50," %"),new g0("Space X",-99,200," %"),new g0("Space Y",-99,200," %"),new cL([4,16,2]),new fS([12,15])];
this.Nf()};B.Rept.prototype=new B;B.Rept.prototype.dm=function(n,F){F[0]=n.Scl.v.val;F[1]=n.Rsft.v.val;
F[2]=n.SpcX.v.val;F[3]=n.SpcY.v.val;F[4]=n.SpcC.v;F[5]=n.Angl.v};B.Rept.prototype.Jk=function(n,F){n.Scl.v.val=F[0];
n.Rsft.v.val=F[1];n.SpcX.v.val=F[2];n.SpcY.v.val=F[3];n.SpcC.v=F[4];n.Angl.v=F[5].Wr;return n};B.Ctoa=function(){B.call(this,"Ctoa");
this.QX=[new gD([13,0]),new aR(!0),new af(["VAR0 VAR1","Transparency",[4,13]],0,100," %"),new af(["VAR0 VAR1",[12,0],[4,13]],0,100," %")];
this.Nf()};B.Ctoa.prototype=new B;B.Ctoa.prototype.dm=function(n,F){F[0]=n.Clr.v;F[1]=n.Trsp.v.val;F[2]=n.Opct.v.val};
B.Ctoa.prototype.Jk=function(n,F){n.Clr.v=F[0];n.Trsp.v.val=F[1];n.Opct.v.val=F[2]};B.LqFy=function(){B.call(this,"LqFy");
this.U5=!1;this.wM=null;this.a5f=null;this.T=0;this.Ac={uA:[[{T:{id:0,name:[24,1,0,1,0],lp:"liq/smudge"}}],[{T:{id:1,name:[24,1,0,1,1],lp:"liq/reconstruct"}}],[{T:{id:2,name:[24,1,0,1,2],lp:"liq/smooth"}}],[{T:{id:3,name:[24,1,0,1,3],lp:"liq/twirl"}}],[{T:{id:4,name:[24,1,0,1,4],lp:"liq/shrink"}}],[{T:{id:5,name:[24,1,0,1,5],lp:"liq/blow"}}],[{T:{id:6,name:[24,1,0,1,6],lp:"liq/pleft"}}]],keys:[]};
this.Rt=new bA(this.Ac,!1);this.Rt.iy(0);this.Rt.k(V.E.P,this.a0M,this);this.Oa=e1.sW();this.M6=null;
this.O7=[];this.SV=-1;this.bh=null;this.anQ=null;this.b1=null;this.e7=null;this.ey=null;var n=V.w("div","flexrow");
this._N=n;this._.appendChild(n);n.appendChild(this.Rt._);this.view=new aH(!0);this.view.Kq(100,100);
this.view.k("mousedown",this.R3,this);this.view.k("mousemove",this.BO,this);this.view.k("mouseup",this.lu,this);
this.view.k("zoom",this.pa,this);n.appendChild(this.view._);var F=V.w("div","form");n.appendChild(F);
this.Y$=F;F.style.width="230px";this.GX=[new af([12,14,0],0,1e3,null,!1,!0),new af([12,74],0,100,null,!1,!1),new af([12,84],0,100,null,!1,!1),new cL([12,46]),new af([12,0],0,100,null,!1,!1)];
var O=this.Oa.Brsh.v;O.Dmtr.v.val=100;var I=[100,50,100,!1,100];for(var e=0;e<this.GX.length;e++){var x=this.GX[e];
x.F(I[e]);x.k(V.E.L,this.anF,this);F.appendChild(x._)}var r=new cg("Reset",!0,null,!0);r.k("click",this.h_,this);
F.appendChild(r._);this.qL=new ch;this.qL._=V.w("div","floatcont");this.Qt=new cg("Menu",!1,null,!0);
this.Qt.k("click",this.afQ,this);var _=this.Qt._;_.setAttribute("style","position:absolute; right:13px; top:47px")};
B.LqFy.prototype=new B;B.LqFy.prototype.Ru=function(){return!0};B.LqFy.prototype.ln=function(n){this.Y$.appendChild(n)};
B.LqFy.prototype.afQ=function(n){var F=this.Qt._.getBoundingClientRect();this.qL._.appendChild(this.Y$);
var O=new k(V.E.P,!0);O.data={e:V.U.di,AM:this.qL,x:F.right+F.width-290,y:F.top+F.height};this.A(O)};
B.LqFy.prototype.Ka=function(n){this.U5=n.q(u.pI);var F=c.P6.fC(this.Oa,n);if(F!=null){this.Oa=F;this.pa();
this.GX[0].F(F.Brsh.v.Dmtr.v.val)}else if(n.q(u.ep)&&n.q(u._1)){var O=this.O7;if(n.q(u.MQ)){if(this.SV+1<O.length)this.SV++}else if(this.SV>0)this.SV--;
this.M6.map=O[this.SV].slice(0);this.Xx(null)}else this.view.Ka(n)};B.LqFy.prototype.a0M=function(n){if(n.data.e==V.U.H$){this.T=n.data.T;
this.Rt.iy(this.T)}};B.LqFy.prototype.anF=function(n){var F=n.currentTarget,e=this.GX.indexOf(F),O=this.Oa.Brsh.v;
if(e==0){O.Dmtr.v.val=F.u();this.pa()}if(e>2)this.Xx(null)};B.LqFy.prototype.K$=function(){var n=this.O7;
this.SV++;n[this.SV]=this.M6.map.slice(0);while(n.length>this.SV+1)n.pop();while(n.length>50){n=n.slice(1);
this.SV--}};B.LqFy.prototype.R3=function(n){this.pS();this.wM=this.view.$P();this.a5f=new aE(0,0);this.k(V.E.MZ,this.cE,this)};
B.LqFy.prototype.BO=function(n){var F=this.view.$P(),O=new aE(F.x-this.wM.x,F.y-this.wM.y);if(this.T==0||this.T==6)this.mP(O);
this.wM=F};B.LqFy.prototype.lu=function(n){this.K$();this.pS()};B.LqFy.prototype.pS=function(){if(this.ZL(V.E.MZ,this.cE))this.removeEventListener(V.E.MZ,this.cE,this)};
B.LqFy.prototype.cE=function(n){if(this.T!=0&&this.T!=6)this.mP(new aE(0,0))};B.LqFy.prototype.mP=function(n){var F=this.M6,O=F.HL/this.bh.d,I=this.wM,x=this.Oa.Brsh.v,r=x.Dmtr.v.val,_=Date.now(),d=F.HL,w=F.Sa,Z=Math.sqrt(n.x*n.x+n.y*n.y),P=Math.max(1,Math.ceil(Z/2)),C=n.x/P,W=n.y/P,v=I.clone(),L=this.T,H=this.GX[1].u()/100,y=this.GX[2].u()/100,g=[.005,.015,0,0,.2,.2,.01,.01,.05,.35,.1,.1,.005,.015],Q=g[L*2],J=g[L*2+1],A=(1-H)*Q+H*J,p=r*O/2;
for(var e=0;e<P;e++){var U=[];v.x+=C;v.y+=W;q.uH.a7r(F.map,d,w,L,v.x*O,v.y*O,p,H,y,C*O,W*O,U,this.U5);
q.uH.aef(d,w,F.map,U,2*A*y)}var j=new gv(0,0,d,w),b=new gv(I.x*O,I.y*O,0,0);b.EM(r*O*.5,r*O*.5);var s=b.clone();
s.offset(n.x*O,n.y*O);b=b.Tq(s);var G=new gv(b.x/O,b.y/O,b.d/O,b.v/O);G=q.z.Me(G).lN(this.bh);this.Xx(G)};
B.LqFy.prototype.pa=function(){var n=cb.xn(this.Oa,null,this.view.r5().K);this.view.Wy(n)};B.LqFy.prototype.F=function(n,F,O,I,x){O=O.clone();
if(F==null)return;if(!I.Qq(O)){var r=O.Tq(I),_=q.f(r.X()*4);q.nF(F,O,_,r);F=_;O=r}O.x=O.y=0;this.b1=F;
this.anQ=x;this.ey=F.slice(0);this.e7=F.slice(0);this.bh=O;this.M6=gT.Hy(new Uint8Array(n.LqMe.v).buffer);
var d=O.d,w=O.v;if(this.M6.HL/d<.22){this.M6={HL:Math.floor(d/4),Sa:Math.floor(w/4)};this.M6.map=new Float32Array(this.M6.HL*this.M6.Sa*2)}this.O7=[];
this.SV=-1;this.K$();this.Xx(null);this.pa()};B.LqFy.prototype.u=function(){this.pS();var n=bS.tc("LqFy"),F=new Uint8Array(gT.t3(this.M6)),O=[];
for(var e=0;e<F.length;e++)O.push(F[e]);n.LqMe.v=O;return n};B.LqFy.prototype.Kq=function(n,F){this.Rt.Kq(n,F);
var O=this.Qt._,I=this.Y$;this._N.appendChild(I);this._N.appendChild(O);if(n>450){I.style.marginLeft="1em";
this._N.removeChild(O);this.view.Kq(n-238-45,F)}else{I.style.marginLeft="";this._N.removeChild(I);this.view.Kq(n-40,F)}};
B.LqFy.prototype.B=function(){this.Rt.B();for(var e=0;e<this.GX.length;e++)this.GX[e].B()};B.LqFy.prototype.h_=function(){this.pS();
this.M6.map.fill(0);this.K$();this.Xx(null)};B.LqFy.prototype.Xx=function(n){var F=this.bh,O=this.b1,I=this.ey,x=this.M6;
q.uH.FF(O,this.e7,F.d,F.v,n,x.map,x.HL,x.Sa,0);if(this.GX[3].jQ()){q.nF(this.anQ,F,I,F,n?n:F);q.p.F_("norm",this.e7,F,I,F,n?n:F,this.GX[4].u()/100)}else q.Ct(this.e7,I);
this.view.F([{Kh:F,data:I.buffer}])};B.GEfc=function(){B.call(this,"GEfc");this.ul=0;this.i5=0;this.b1=null;
this.ey=null;this.bh=null;this.GL=null;this.a0=null;this.xm=0;var n=V.w("div","flexrow");this._N=n;this._.appendChild(n);
this.view=new aH;this.view.Kq(100,100);n.appendChild(this.view._);this.hY="";this.mA=270;var F=this.a9x=V.w("div","form scrollable");
n.appendChild(F);F.setAttribute("style","width:"+this.mA+"px;  margin-left:1em");var O=V.w("div","form");
n.appendChild(O);O.setAttribute("style","width:230px;  margin-left:1em");this.DA={};for(var I in ax.names){var x=new B.GEfc.R5(I);
this.DA[I]=x;x.k(V.E.L,this.rI,this)}this.sn=V.w("div");O.appendChild(this.sn);this.sn.style.marginBottom="1.5em";
this.T_=V.w("div");this.T_.style.height="16.3em";O.appendChild(this.T_);V.Zq(O);this.pA=V.w("div","lpbody scrollable");
this.Q1=V.w("div","lpfoot");O.appendChild(this.pA);O.appendChild(this.Q1);this.k("click",this.a3i,this);
this.J9=[];bO.Mx([[5,3],[5,4]],this.J9,this.Q1,this.y0.bind(this))};B.GEfc.prototype=new B;B.GEfc.prototype.Ru=function(){return!0};
B.GEfc.prototype.ln=function(n){this.sn.appendChild(n)};B.GEfc.prototype.XW=function(n,F){this.GL=n};
B.GEfc.prototype.Kq=function(n,F){this.ul=n;this.i5=F;this.a9x.style.height=F+"px";this.view.Kq(n-240-this.mA-10,F);
this.pA.style.height=F-this.T_.getBoundingClientRect().height-106+"px"};B.GEfc.prototype.a5T=function(){var n=fx.mk.get("img/beach",!0)[0],F=n.Kh,O=this.a9x,I=Math.floor(V.Z()*(this.mA-40)/3),x=~~(I*.7),r=new gv(0,0,I,x),_=q.f(I*x*4),d=_.slice(0),w=Math.round(10*V.Z()),Z=new ImageData(new Uint8ClampedArray(d.buffer),I,x);
q.nF(new Uint8Array(n.data),F,_,new gv(Math.round((F.d-I)/2),Math.round((F.v-x)/2),I,x));var P=V.w("canvas"),C=P.getContext("2d");
P.width=I;P.height=x+Math.round(w*1.5);C.font=w+"px sans-serif";C.fillStyle="white";this.DK={};var W=this.a9L.bind(this);
for(var e=0;e<ax.__.length;e++){var v=ax.__[e],L=V.w("div");O.appendChild(L);L.setAttribute("style","background-color:rgba(0,0,0,0.2); padding:0px 8px; margin-bottom:8px");
L.textContent=hl.get(v);for(var H in ax.names){var y=ax.names[H];if(y[0]!=e)continue;ax.Fl(H,{rect:r,buffer:_},ax.tc(H),{Q:0,l:0,O:0},{Q:255,l:255,O:255},{rect:r,buffer:d},{});
C.clearRect(0,0,500,500);C.putImageData(Z,0,0);var g=hl.get(y[1]);C.fillText(g,(I-C.measureText(g).width)/2,x+Math.round(w*1.2));
var Q=V.w("div");O.appendChild(Q);Q.setAttribute("style","display:inline-block; cursor:pointer; padding: 5px 5px 0 5px; margin-bottom:5px");
Q.addEventListener("click",W,!1);var L=V.w("img");Q.appendChild(L);L.setAttribute("src",P.toDataURL());
L.setAttribute("style","width:"+I/V.Z()+"px; margin-bottom:0px;");this.DK[H]=Q}}};B.GEfc.prototype.a9L=function(n){var F;
for(var O in this.DK)if(this.DK[O]==n.currentTarget)this.hY=O;this.rI()};B.GEfc.prototype.y0=function(n){var F=bO.PR(this.J9,n),O=this.a0.GEfs.v,I=O[this.xm].v;
if(F==0){O.push(JSON.parse(JSON.stringify(O[this.xm])));this.xm=O.length-1}else if(O.length>1){O.splice(this.xm,1);
if(this.xm==O.length)this.xm--}this.q$();this.Xx()};B.GEfc.prototype.rI=function(n){var F=this.hY,O;
if(n==null)O=ax.tc(F);else O=this.DA[F].u();this.a0.GEfs.v[this.xm].v=O;this.q$();this.Xx()};B.GEfc.prototype.F=function(n,F,O,I,x){if(this.DK==null)this.a5T();
n=this.a0=JSON.parse(JSON.stringify(n));if(n.GEfs==null)n=this.a0={__name:"Filter Gallery",classID:"GEfc",GEfs:{t:"VlLs",v:[{t:"Objc",v:n}]}};
var r=n.GEfs.v;for(var e=0;e<r.length;e++)if(r[e].v.GELv==null)r[e].v.GELv={t:"bool",v:!0};this.xm=r.length-1;
this.q$();O=O.clone();if(F==null)return;if(!I.Qq(O)&&ax.wE(n).x!=0){var _=O.Tq(I),d=q.f(_.X()*4);q.nF(F,O,d,_);
F=d;O=_}O.x=O.y=0;this.b1=F;this.ey=F.slice(0);this.bh=O;this.Xx()};B.GEfc.prototype.a3i=function(n){var F=n.data,e=F.FI,O=this.a0.GEfs.v;
if(F.Rz){O[e].v.GELv.v=!O[e].v.GELv.v;this.Xx()}else this.xm=e;this.q$()};B.GEfc.prototype.q$=function(){var n=this.a0.GEfs.v,F=n[this.xm].v,O=F.GEfk.v.GEft,I=this.T_;
if(ax.names[O]==null){alert("Unsupported gallery filter");V.em(I)}else{this.hY=O;for(var x in this.DK)V.aE(this.DK[x],"selected");
V.fx(this.DK[O],"selected");var r=this.DA[O];r.F(F);if(I.firstChild!=r._){V.em(I);I.appendChild(r._)}}var _=[];
for(var e=0;e<n.length;e++){var d=n[e].v,w=ax.names[d.GEfk.v.GEft],Z=new b4(e,!0,!0,null,w?w[1]:"Filter",e==this.xm,d.GELv.v);
Z.parent=this;_.push(Z._)}V.em(this.pA);_.reverse();for(var e=0;e<_.length;e++)this.pA.appendChild(_[e]);
this.Kq(this.ul,this.i5)};B.GEfc.prototype.u=function(){return JSON.parse(JSON.stringify(this.a0))};
B.GEfc.prototype.Xx=function(n){var F=this.bh,O=this.b1,I=this.ey,x=this.hY,r=this.a0,_=this.GL;function d(w){return{Q:w>>>16,l:w>>>8&255,O:w&255}}bS.Fl("GEfc",{rect:this.bh,buffer:this.b1},r,d(_.nE),d(_.sI),{rect:this.bh,buffer:this.ey},null);
this.view.F([{Kh:F,data:I.buffer}])};B.GEfc.prototype.B=function(){for(var n in this.DA)this.DA[n].B();
bO.sk(this.J9,["lrs/newlayer","lrs/bin"])};B.GEfc.R5=function(n){ch.call(this);this.Ul=n;this._=V.w("div");
this.yz={};var F=ax.tc(n);for(var O in F){var I;if(O=="__name"||O=="classID"||O=="GEfk"||O=="GELv"||["LghI","FlRs"].indexOf(O)!=-1)continue;
else if(O=="Sz")I=new af([12,14,0],1,50);else if(O=="Dtl")I=n=="Chrc"?new af("Detail",0,5):new af("Detail",1,15);
else if(O=="Shrp")I=new af("Sharpness",0,40);else if(O=="TxtT")I=new bf([12,67],"Blocks,Canvas,Frosted,Tiny Lens,Bricks,Burlap,Sandstone".split(","));
else if(O=="BrsT")I=new bf("Brush type","Simple,Light Rough,Dark Rough,Wide Sharp,Wide Blurry,Sparkle".split(","));
else if(O=="LghD")I=new bf("Light","Bottom,Bottom Left,Left,Top Left,Top,Top Right,Right,Bottom Right".split(","));
else if(O=="SDir")I=new bf([12,33],["Right Diagonal","Horizontal","Left Diagonal","Vertical"]);else if(O=="EdgW")I=new af("Edge Width",1,14);
else if(O=="EdgB")I=new af("Edge Brightness",0,20);else if(O=="Smth")I=new af([19,3,3],1,n=="Stmp"?50:15);
else if(O=="ClSz")I=new af([12,61],3,100);else if(O=="BrdT")I=new af([7,9],1,20);else if(O=="HghS")I=new af([12,64],0,20);
else if(O=="HlSz")I=new af([12,14,0],1,15);else if(O=="Cntr")I=new af([12,3,0],0,50);else if(O=="ScrT")I=new bf([12,62],["Circle","Dot",[10,35]]);
else if(O=="SprR")I=new af("Spray Radius",0,25);else if(O=="StrL")I=new af("Stroke Length",0,20);else if(O=="LgDr")I=new af("Light/Dark Balance",0,n=="Stmp"?50:100);
else if(O=="Drkn")I=new af("Darkness",1,50);else if(O=="Dstr")I=new af("Distortion",0,20);else if(O=="Scln")I=new af([12,38],50,200);
else if(O=="Rlf")I=new af("Relief",0,50);else if(O=="ChAm")I=new af("Thickness",1,7);else if(O=="InvT")I=new cL([4,11]);
else if(O=="RplS")I=new af("Ripple Size",1,15);else if(O=="RplM")I=new af("Ripple Magnitude",0,20);else console.log(O);
I.k(V.E.L,this.Cb,this);this.yz[O]=I;this._.appendChild(I._)}};B.GEfc.R5.prototype=new ch;B.GEfc.R5.prototype.Cb=function(n){this.A(new k(V.E.L,!1))};
B.GEfc.R5.prototype.F=function(n){for(var F in this.yz){var O;if("Sz Dtl Shrp EdgW EdgB Smth ClSz BrdT HghS HlSz Cntr SprR StrL LgDr Drkn Dstr Scln Rlf ChAm InvT RplS RplM".split(" ").indexOf(F)!=-1)O=n[F].v;
else if(F=="TxtT")O=ax.vF.indexOf(n[F].v[F]);else if(F=="BrsT")O=ax.C0.indexOf(n[F].v[F]);else if(F=="LghD")O=ax.AC.indexOf(n[F].v[F]);
else if(F=="ScrT")O=ax.TW.indexOf(n[F].v[F]);else if(F=="SDir")O=ax.qb.indexOf(n[F].v.StrD);this.yz[F].F(O)}};
B.GEfc.R5.prototype.u=function(){var n=ax.tc(this.Ul);for(var F in this.yz){var O=this.yz[F].u();if("Sz Dtl Shrp EdgW EdgB Smth ClSz BrdT HghS HlSz Cntr SprR StrL LgDr Drkn Dstr Scln Rlf ChAm InvT RplS RplM".split(" ").indexOf(F)!=-1)n[F].v=O;
else if(F=="TxtT")n[F].v[F]=ax.vF[O];else if(F=="BrsT")n[F].v[F]=ax.C0[O];else if(F=="LghD")n[F].v[F]=ax.AC[O];
else if(F=="ScrT")n[F].v[F]=ax.TW[O];else if(F=="SDir")n[F].v.StrD=ax.qb[O]}return n};B.GEfc.R5.prototype.B=function(){for(var n in this.yz)this.yz[n].B()};
B.blnc=function(){B.call(this);var n=this._;this.rH=null;this.tg=new bf([12,12],[[19,6,0],[19,6,1],[19,6,2]]);
this.tg.k(V.E.L,this.Xx,this);n.appendChild(this.tg._);this.i$=[];for(var e=0;e<3;e++){var F=new af(dK.fd[e],-100,100);
F.k(V.E.L,this.kO,this);this.i$.push(F);n.appendChild(F._)}this.KF=new cL([13,4]);this.KF.k(V.E.L,this.kO,this);
n.appendChild(this.KF._)};B.blnc.prototype=new B;B.blnc.prototype.B=function(){this.tg.B();for(var e=0;
e<3;e++)this.i$[e].B();this.KF.B()};B.blnc.prototype.F=function(n){this.rH=JSON.parse(JSON.stringify(n));
this.Xx()};B.blnc.prototype.u=function(n){var F=["ShdL","MdtL","HghL"],O=this.rH[F[this.tg.u()]].v;for(var e=0;
e<3;e++)O[e].v=this.i$[e].u();this.rH.PrsL.v=this.KF.u();return JSON.parse(JSON.stringify(this.rH))};
B.blnc.prototype.Xx=function(n){var F=["ShdL","MdtL","HghL"],O=this.rH[F[this.tg.u()]].v;for(var e=0;
e<3;e++)this.i$[e].F(O[e].v);this.KF.F(this.rH.PrsL.v)};B.brit=function(){B.call(this,"brit");this.QX.push(new af([12,2],-150,150,""));
this.QX.push(new af([12,3,0],-100,100,""));this.QX.push(new cL([12,3,1]));this.Nf()};B.brit.prototype=new B;
B.brit.prototype.dm=function(n,F){F[0]=n.Brgh?n.Brgh.v:0;F[1]=n.Cntr?n.Cntr.v:0;F[2]=n.useLegacy?n.useLegacy.v:!1};
B.brit.prototype.Jk=function(n,F){n.Brgh.v=F[0];n.Cntr.v=F[1];n.useLegacy.v=F[2]};B.curv=function(){B.call(this);
this.value=null;this.P0=null;var n=this._;this.US=new bf([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5]]);
this.US.k(V.E.L,this.lx,this);n.appendChild(this.US._);this.Wa=new bf(null,["Spline","Sketch"]);this.Wa.k(V.E.L,this.air,this);
n.appendChild(this.Wa._);this.un=new cl;this.un.k(V.E.L,this.wm,this);n.appendChild(this.un._);this._R=new aG("Sample from image",["#000000","#888888","#ffffff"]);
n.appendChild(this._R._)};B.curv.prototype=new B;B.curv.prototype.B=function(){this.US.B()};B.curv.prototype.air=function(n){var F=aD.yL(this.value,0),O=F.length==256?1:0,I=this.Wa.u();
if(O==I)return;var x=bS.tc("curv");if(I==1){var r=[];for(var e=0;e<256;e++)r.push(e);aD.K8(x,0,r)}this.F(x);
this.kO()};B.curv.prototype.wm=function(){aD.K8(this.value,this.US.u(),this.un.u());this.kO()};B.curv.prototype.lx=function(){var n=this.US.u(),F=aD.yL(this.value,n),O=F.length==256?1:0;
this.Wa.F(O);if(this.P0)this.un.P5(this.P0[n],this.P0[4]*[1,.33,.33,.33][n],["#ccc","#fcc","#cfc","#ccf"][n]);
this.un.F(F)};B.curv.prototype.ZB=function(){return!0};B.curv.prototype._X=function(n,F,O,I,x){var r=this.value,_=this._R.u();
this.value=bS.tc("curv");this.kO();var d=c.pm.cD(n,x,1),w=[d>>>16&255,d>>>8&255,d&255];for(var e=0;e<3;
e++){var Z=aD.yL(r,1+e);if(_==0)Z[0].v.Hrzn.v=w[e];if(_==1){var P=(w[0]+w[1]+w[2])*.333,C=Math.log(w[e]/255)/Math.log(P/255),W=Math.min(999,Math.max(10,Math.round(100*C)));
if(Z.length==2)Z.splice(1,0,JSON.parse(JSON.stringify(Z[0])));Z[1].v.Hrzn.v=127-Math.log(W/100)*127;
Z[1].v.Vrtc.v=127}if(_==2)Z[Z.length-1].v.Hrzn.v=w[e];aD.K8(r,1+e,Z)}this.F(r);this.kO()};B.curv.prototype.F=function(n){this.value=n;
this.lx()};B.curv.prototype.P5=function(n){this.P0=n;this.lx()};B.curv.prototype.u=function(n){return JSON.parse(JSON.stringify(this.value))};
B.expA=function(){B.call(this,"expA");this.QX.push(new af([12,5],-20,20,null,3));this.QX.push(new af([12,6],-.5,.5,null,3));
this.QX.push(new af([12,7],.01,6.99,null,3));this.Nf()};B.expA.prototype=new B;B.expA.prototype.dm=function(n,F){F[0]=n.Exps.v;
F[1]=n.Ofst.v;F[2]=n.gammaCorrection.v};B.expA.prototype.Jk=function(n,F){n.Exps.v=F[0];n.Ofst.v=F[1];
n.gammaCorrection.v=F[2]};B.grdm=function(){B.call(this,"grdm");this.QX.push(new aC(!0,null,!0));this.QX.push(new cL([12,23,0]));
this.Nf()};B.grdm.prototype=new B;B.grdm.prototype.dm=function(n,F){F[0]=n.Grad.v;F[1]=n.Rvrs?n.Rvrs.v:!1};
B.grdm.prototype.Jk=function(n,F){n.Grad.v=F[0];n.Rvrs={t:"bool",v:F[1]}};B.grdm.prototype.XW=function(n,F){this.QX[0].vI(n.nE,n.sI);
if(F==cf.fo||F==cf.dM||F==cf.f3)this.QX[0].TU(n.Jx)};B.selc=function(){B.call(this);var n=this._;this.wK=[];
this.I7=null;this.tg=new bf([12,82],dK.fj.concat([[13,1,8],[13,1,13],[13,1,10]]));this.tg.k(V.E.L,this.Cb,this);
n.appendChild(this.tg._);for(var e=0;e<4;e++){var F=new af(dK.agh[e],-100,100,"%");F.k(V.E.L,this.Cb,this);
this.wK.push(F);n.appendChild(F._)}this.H7=new cL([13,3]);n.appendChild(this.H7._);this.H7.k(V.E.L,this.Cb,this)};
B.selc.prototype=new B;B.selc.prototype.B=function(){this.tg.B();this.H7.B();for(var e=0;e<4;e++)this.wK[e].B()};
B.selc.prototype.F=function(n){this.I7=JSON.parse(JSON.stringify(n));this.Xx()};B.selc.prototype.u=function(n){return JSON.parse(JSON.stringify(this.I7))};
B.selc.prototype.Cb=function(n){if(n.target!=this.tg){var F=this.I7,O=[];for(var e=0;e<4;e++)O[e]=this.wK[e].u();
hh.K8(F,this.tg.u(),O);F.Mthd={t:"enum",v:{CrcM:this.H7.u()?"Absl":"Rltv"}}}this.Xx();this.kO()};B.selc.prototype.Xx=function(){var n=this.I7,F=hh.yL(n,this.tg.u());
for(var e=0;e<4;e++)this.wK[e].F(F[e]);this.H7.F(n.Mthd?n.Mthd.v.CrcM=="Absl":!1)};B.blwh=function(){B.call(this,"blwh");
this.QX.push(new cL([12,11]));this.QX.push(new aR(!0));for(var e=0;e<6;e++)this.QX.push(new af(dK.fj[e],-200,300));
this.Nf()};B.blwh.prototype=new B;B.blwh.prototype.dm=function(n,F){F[0]=n.useTint.v;F[1]=n.tintColor.v;
var O="Rd Yllw Grn Cyn Bl Mgnt".split(" ");for(var e=0;e<6;e++)F[2+e]=n[O[e]].v};B.blwh.prototype.Jk=function(n,F){n.useTint.v=F[0];
n.tintColor.v=F[1];var O="Rd Yllw Grn Cyn Bl Mgnt".split(" ");for(var e=0;e<6;e++)n[O[e]].v=F[2+e]};
B.hue2=function(){B.call(this);this.value=null;this.eh=null;this.a2E=null;var n=this._;this.tg=new bf([12,12],["Master"].concat(dK.fj));
this.tg.k(V.E.L,this.lx,this);n.appendChild(this.tg._);this.nl=new af([12,8],-180,180);this.nl.k(V.E.L,this.A9,this);
n.appendChild(this.nl._);this.BK=new af([12,9],-100,100);this.BK.k(V.E.L,this.A9,this);n.appendChild(this.BK._);
this.Dq=new af([12,10],-100,100);this.Dq.k(V.E.L,this.A9,this);n.appendChild(this.Dq._);this.r$=new cL([12,11]);
this.r$.k(V.E.L,this.a5L,this);n.appendChild(this.r$._);this.aiF=new gD("...",!0);n.appendChild(this.aiF._)};
B.hue2.prototype=new B;B.hue2.prototype.B=function(){this.nl.B();this.BK.B();this.Dq.B();this.r$.B();
this.tg.B()};B.hue2.prototype.a5L=function(n){var F=this.r$.u();this.value.Clrz.v=F;if(F)this.tg.F(0);
this.lx();this.kO()};B.hue2.prototype.A9=function(n){var F=this.value.Clrz.v,O=this.tg.u(),I=cy.yL(this.value,O),x=O==0?I:I.i$;
x[0]=this.nl.u();var r=this.BK.u();x[1]=F?Math.max(0,r):r;x[2]=this.Dq.u();cy.K8(this.value,O,I);this.lx();
this.kO()};B.hue2.prototype.lx=function(){var n=this.value.Clrz?this.value.Clrz.v:!1,x="";this.r$.F(n);
if(n)this.tg.gy();else this.tg.hL();var F=this.tg.u(),O=cy.yL(this.value,F),I=F==0?O:O.i$;this.nl.F(I[0]);
this.BK.F(I[1]);this.Dq.F(I[2]);if(!n){x+=hl.get([5,8])+": ";var F=this.tg.u();if(F==0)x+=hl.get([13,2]);
else x+=O.S1}this.aiF.F(x)};B.hue2.prototype.ZB=function(){return!0};B.hue2.prototype.XS=function(n,F,O,I,x){var r=this.value;
this.value=bS.tc("hue2");this.kO();var _=c.pm.cD(n,x,1),d=[_>>>16&255,_>>>8&255,_&255],w=q.sy(d[0]/255,d[1]/255,d[2]/255);
this.tg.F(1+Math.round(w.Sa*6)%6);this.F(r);this.kO();this.eh=x.x;this.a2E=this.BK.u()};B.hue2.prototype.RL=function(n,F,O,I,x){if(this.eh!=null){var r=x.x-this.eh;
r=Math.max(-100,Math.min(100,this.a2E+.5*r));this.BK.F(r);this.A9()}};B.hue2.prototype._X=function(n,F,O,I,x){this.eh=null};
B.hue2.prototype.F=function(n){this.value=JSON.parse(JSON.stringify(n));this.lx()};B.hue2.prototype.u=function(n){return JSON.parse(JSON.stringify(this.value))};
B.levl=function(){B.call(this);this.value=null;this.P0=null;this.dJ=[new aE(0,0),new aE(0,0),new aE(0,0),new aE(0,0),new aE(0,0)];
this.lH=-1;this.tk=this.Lw.bind(this);this.Du=this.KL.bind(this);var n=this._;this.US=new bf([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5]]);
this.US.k(V.E.L,this.lx,this);n.appendChild(this.US._);var F=V.w("div","");n.appendChild(F);var O=V.w("div","");
n.appendChild(O);this._Y=V.w("canvas");F.appendChild(this._Y);this.xX=this._Y.getContext("2d");this.$c=new aE(256,120);
this._Y.setAttribute("style","display:block");V.$C(this._Y,this.$c.x,this.$c.y,this.xX);V.kQ(this._Y);
V.CP(this._Y,this.Yl.bind(this));this.RX=V.w("canvas","");O.appendChild(this.RX);this.Ij=this.RX.getContext("2d");
this.Ob=new aE(this.$c.x,40);this.RX.setAttribute("style","display:block");V.$C(this.RX,this.Ob.x,this.Ob.y,this.Ij);
V.kQ(this.RX);V.CP(this.RX,this.adN.bind(this));var I=this.aoO=[];for(var e=0;e<5;e++){var x=new fq(null,null,3);
I.push(x);x.k(V.E.L,this.abv,this);(e<2||e==4?F:O).appendChild(x._)}F.appendChild(I[1]._);I[4]._.setAttribute("style","margin: 0 4.7em");
I[3]._.setAttribute("style","margin:0 0 0 13em");this._R=new aG("Sample from image",["#000000","#888888","#ffffff"]);
n.appendChild(this._R._)};B.levl.prototype=new B;B.levl.prototype.B=function(){this.US.B()};B.levl.prototype.abv=function(n){var F=[];
for(var e=0;e<5;e++){var O=255,I=1;if(e==4){O=999;I=100}var x=parseFloat(this.aoO[e].u());F[e]=Math.max(0,Math.min(O,x*I))}hd.K8(this.value,this.US.u(),F);
this.lx();this.kO()};B.levl.prototype.lx=function(n){var F=this.$c.x,O=this.$c.y,I=this.US.u(),x=this.xX;
x.clearRect(0,0,F,O);x.fillStyle="#cccccc";x.fillRect(8,8,F-16,O-16-8);if(this.P0){if(I==0){this.P0[0].fill(0);
var r=JSON.parse(JSON.stringify(this.value));hd.K8(r,0,[0,255,0,255,100]);var _=dK.k6("levl",r),d=[_.Ub,_.O8,_.QP];
for(var w=0;w<3;w++){var Z=this.P0[1+w],P=d[w];for(var e=0;e<256;e++)this.P0[0][P[e]]+=Z[e]}}var C=this.P0[I],W=0;
for(var e=0;e<C.length;e++)W+=C[e];x.fillStyle="#333333";x.beginPath();x.moveTo(8,O-16);for(var e=0;
e<256;e++){var v=55*C[e]/W;x.lineTo(8+e/256*(F-16),Math.max(8,O-16-O*v))}x.lineTo(F-8,O-16);x.closePath();
x.fill()}var L=hd.yL(this.value,I);for(var e=0;e<5;e++)this.aoO[e].F(L[e]/(e==4?100:1));this.dJ[0].mT(8+L[0]/255*(F-16),O-14);
this.dJ[1].mT(8+L[1]/255*(F-16),O-14);var H=Math.log(L[4]/100)/Math.log(9.99);H=.5-H/2;this.dJ[4].mT(this.dJ[0].x+H*(this.dJ[1].x-this.dJ[0].x),O-14);
this.Mv(x,this.dJ[0],"#000000");this.Mv(x,this.dJ[1],"#ffffff");this.Mv(x,this.dJ[4],"#777777");var F=this.Ob.x,O=this.Ob.y;
x=this.Ij;x.clearRect(0,0,F,O);var y=x.createLinearGradient(0,0,F-16,0);y.addColorStop(0,"black");y.addColorStop(1,"white");
x.fillStyle=y;x.fillRect(8,8,F-16,16);this.dJ[2].mT(8+L[2]/255*(F-16),O-14);this.dJ[3].mT(8+L[3]/255*(F-16),O-14);
this.Mv(x,this.dJ[2],"#000000");this.Mv(x,this.dJ[3],"#ffffff")};B.levl.prototype.Mv=function(n,F,O){n.fillStyle=O;
n.fillRect(F.x-5,F.y,10,10)};B.levl.prototype.Yl=function(n){var F=V.iJ(n,this._Y);for(var e=0;e<2;e++)if(aE.sl(this.dJ[e],F)<10)this.lH=e;
if(aE.sl(this.dJ[4],F)<10)this.lH=4;this.gv()};B.levl.prototype.adN=function(n){var F=V.iJ(n,this.RX);
for(var e=2;e<4;e++)if(aE.sl(this.dJ[e],F)<10)this.lH=e;this.gv()};B.levl.prototype.gv=function(n){if(this.lH==-1)return;
V.MH(document.body,this.tk);V.Ry(document.body,this.Du)};B.levl.prototype.Lw=function(n){var F=hd.yL(this.value,this.US.u()),O=V.iJ(n,this.lH==2&&this.lH==3?this.RX:this._Y),I=255*(O.x-8)/(this.$c.x-16);
I=Math.max(0,Math.min(255,I));if(this.lH==0)I=Math.min(I,F[1]-2);if(this.lH==1)I=Math.max(I,F[0]+2);
if(this.lH!=4)F[this.lH]=Math.round(I);else{var x=(I-F[0])/(F[1]-F[0]);x=1-2*x;x=Math.pow(9.99,x);F[4]=Math.min(999,Math.max(10,Math.round(x*100)))}hd.K8(this.value,this.US.u(),F);
this.lx();this.kO()};B.levl.prototype.KL=function(n){V.le(document.body,this.tk);V.re(document.body,this.Du);
this.lH=-1};B.levl.prototype.ZB=function(){return!0};B.levl.prototype._X=function(n,F,O,I,x){var r=this.value,_=this._R.u();
this.value=bS.tc("levl");this.kO();var d=c.pm.cD(n,x,1),w=[d>>>16&255,d>>>8&255,d&255];for(var e=0;e<3;
e++){var Z=hd.yL(r,1+e);if(_==0)Z[0]=w[e];if(_==1){var P=Math.log(w[e]/255)/Math.log((w[0]+w[1]+w[2])*.333/255);
Z[4]=Math.min(999,Math.max(10,Math.round(100*P)))}if(_==2)Z[1]=w[e];hd.K8(r,1+e,Z)}this.F(r);this.kO()};
B.levl.prototype.F=function(n){this.value=n;this.lx()};B.levl.prototype.P5=function(n){this.P0=n;this.lx()};
B.levl.prototype.u=function(n){return JSON.parse(JSON.stringify(this.value))};B.phfl=function(){B.call(this,"phfl");
this.QX.push(new aR);this.QX.push(new af([12,74],0,100,"%"));this.QX.push(new cL([13,4]));this.Nf()};
B.phfl.prototype=new B;B.phfl.prototype.dm=function(n,F){F[0]=n.Clr.v;F[1]=n.Dnst.v;F[2]=n.PrsL.v};B.phfl.prototype.Jk=function(n,F){var O=q.W.S_(F[0]),I=n.Clr.v,x=q.Kj(O.Q,O.l,O.O);
I.Lmnc.v=x.LG;I.A.v=x.R;I.B.v=x.O;n.Dnst.v=F[1];n.PrsL.v=F[2]};B.vibA=function(){B.call(this,"vibA");
this.QX.push(new af([12,13],-100,100,null));this.QX.push(new af([12,9],-100,100,null));this.Nf()};B.vibA.prototype=new B;
B.vibA.prototype.dm=function(n,F){F[0]=n.vibrance?n.vibrance.v:0;F[1]=n.Strt?n.Strt.v:0};B.vibA.prototype.Jk=function(n,F){n.vibrance.v=F[0];
n.Strt.v=F[1]};B.thrs=function(){B.call(this,"thrs");this.QX.push(new af([4,13],1,255,null));this.Nf()};
B.thrs.prototype=new B;B.thrs.prototype.dm=function(n,F){F[0]=n.Lvl.v};B.thrs.prototype.Jk=function(n,F){n.Lvl.v=F[0]};
B.mixr=function(){B.call(this);var n=this._;this.wK=[];this.I7=null;this.tg=new bf([12,4],[[13,1,1],[13,1,4],[13,1,5]]);
this.tg.k(V.E.L,this.Cb,this);n.appendChild(this.tg._);V.Zq(n);this.pl=new cL([12,60]);n.appendChild(this.pl._);
this.pl.k(V.E.L,this.Cb,this);for(var e=0;e<4;e++){var F=new af([[13,1,1],[13,1,4],[13,1,5],[13,2]][e],-200,200,"%");
F.k(V.E.L,this.Cb,this);this.wK.push(F);n.appendChild(F._)}};B.mixr.prototype=new B;B.mixr.prototype.B=function(){this.tg.B();
this.pl.B();for(var e=0;e<4;e++)this.wK[e].B()};B.mixr.prototype.F=function(n){this.I7=JSON.parse(JSON.stringify(n));
this.Xx()};B.mixr.prototype.u=function(n){return JSON.parse(JSON.stringify(this.I7))};B.mixr.prototype.Cb=function(n){if(n.target!=this.tg){var F=dK.Jz(this.I7);
if(n.target==this.pl){F.pl=this.pl.u();if(F.pl)F.G=[40,40,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];else F.G=[100,0,0,0,0,0,100,0,0,0,0,0,100,0,0,0,0,0,0,0]}else{var O=(F.pl?0:this.tg.u())*5,e=this.wK.indexOf(n.target);
F.G[O+(e<3?e:4)]=n.target.u()}this.I7=dK.Xa(F)}this.Xx();this.kO()};B.mixr.prototype.Xx=function(){var n=dK.Jz(this.I7);
this.pl.F(n.pl);var F=(n.pl?0:this.tg.u())*5;for(var e=0;e<4;e++)this.wK[e].F(n.G[F+(e<3?e:4)])};B.post=function(){B.call(this,"post");
this.QX.push(new af([4,1],2,255,null));this.Nf()};B.post.prototype=new B;B.post.prototype.dm=function(n,F){F[0]=n.Lvls.v};
B.post.prototype.Jk=function(n,F){n.Lvls.v=F[0]};B.clrL=function(){B.call(this,"clrL");this.QX.push(new bI("LUTs"));
this.Nf()};B.clrL.prototype=new B;B.clrL.prototype.dm=function(n,F){F[0]=n};B.clrL.prototype.Jk=function(n,F){var O=F[0];
for(var I in O)n[I]=O[I]};B.clrL.prototype.XW=function(n,F){if(F==cf.fo||F==cf.Wo)this.QX[0].TU(n.a9g)};
B.rplc=function(){B.call(this,"rplc");this.QX.push(new af([12,92],0,200));this.QX.push(new aR);this.QX.push(new af([12,8],-180,180));
this.QX.push(new af([12,9],-100,100));this.QX.push(new af([12,10],-100,100));this.Nf()};B.rplc.prototype=new B;
B.rplc.prototype.dm=function(n,F){F[0]=n.Fzns.v;F[1]=n.Mxm.v;F[2]=n.H.v;F[3]=n.Strt.v;F[4]=n.Lght.v};
B.rplc.prototype.Jk=function(n,F){function O(x,r){r.Lmnc.v=x.LG;r.A.v=x.R;r.B.v=x.O}n.Fzns.v=F[0];n.H.v=F[2];
n.Strt.v=F[3];n.Lght.v=F[4];var I=q.W.S_(F[1]),x=q.Kj(I.Q,I.l,I.O);O(x,n.Mnm.v);O(x,n.Mxm.v)};B.fade=function(){B.call(this,"fade");
this.QX.push(new af([12,0],0,100,"%"));this.QX.push(new bf([12,19,0],fk.w9,!1,fk.uv));this.Nf()};B.fade.prototype=new B;
B.fade.prototype.dm=function(n,F){F[0]=n.Opct.v.val;F[1]=fk.Cs.indexOf(n.Md.v.BlnM)};B.fade.prototype.Jk=function(n,F){n.Opct.v.val=F[0];
n.Md.v.BlnM=fk.Cs[F[1]]};B.aply=function(){B.call(this,"aply");this.QX.push(new bf([0,3],[]));this.QX.push(new bf([12,4],["RGB"].concat(dK.fd).concat(["Transparency"])));
this.QX.push(new cL([4,11]));this.QX.push(new bf([12,19,0],fk.w9,!1,fk.uv));this.QX.push(new af([12,0],0,100,"%"));
this.QX.push(new cL("Preserve Transparency"));this.Nf([2]);this.TT=null};B.aply.prototype=new B;B.aply.prototype.dm=function(n,F,O){if(O){var I=O[2].t,x=this.TT=[];
for(var e=0;e<I.length;e++)x.push(I[e].getName());x.reverse();this.QX[0].SY([[5,7]].concat(x),[1,x.length])}else var x=this.TT;
n=n.With.v;var r=n.T.v;F[0]=r[1].t=="name"?1+x.indexOf(r[1].v.val):0;F[1]=["RGB","Rd","Grn","Bl","Trsp"].indexOf(r[0].v.enum);
F[2]=n.Invr.v;F[3]=fk.Cs.indexOf(n.Clcl.v.Clcn);F[4]=n.Opct.v.val;F[5]=n.PrsT.v};B.aply.prototype.Jk=function(n,F){n=n.With.v;
var O=n.T.v;if(F[0]==0)O[1]={t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Mrgd"}};else O[1]={t:"name",v:{classID:"Lyr",val:this.TT[this.TT.length-1-F[0]]}};
O[0].v.enum=["RGB","Rd","Grn","Bl","Trsp"][F[1]];n.Invr.v=F[2];n.Clcl.v.Clcn=fk.Cs[F[3]];n.Opct.v.val=F[4];
n.PrsT.v=F[5]};function dL(n,F){ch.call(this);if(n==null)return;this.id=F;this.Je=n;this.ek=null;this._=V.w("div","window "+F);
this.aeS=null;this.hR=V.w("div","whead");this.ahU=V.w("span","wname");this.hR.appendChild(this.ahU);
this._.appendChild(this.hR);this.DX=this.a9w.bind(this);this.Wz=this.ad2.bind(this);this.Xy=this.ai_.bind(this);
V.kQ(this.hR);V.CP(this.hR,this.DX);this._W=V.w("span","cross");this.hR.appendChild(this._W);dL.prototype.B.call(this);
V.Ry(this._W,this.EQ.bind(this));this.body=V.w("div","body");this._.appendChild(this.body)}dL.prototype=new ch;
dL.prototype.A5=function(){return!1};dL.prototype.ZB=function(){return!1};dL.prototype.B=function(){if(this.Je==null)return;
this.ahU.textContent=hl.get(this.Je);var n=PIMG.__cross==null?"filter:invert(1);":"";this._W.setAttribute("style","background-image:url("+PIMG.cross+");"+n)};
dL.prototype.XS=function(n,F,O,I,x){};dL.prototype.Zp=function(n,F,O,I,x){};dL.prototype.RL=function(n,F,O,I,x){};
dL.prototype._X=function(n,F,O,I,x){};dL.prototype.e9=function(n,F,O,I,x){};dL.prototype.Ka=function(n,F,O,I){if(I.q(u.Ma)&&this.$Y)this.$Y();
if(I.q(u.ep)){var x=new k(V.E.S);x.uh=!0;c.yi.tp(I,x);if(x.data)F.A(x)}};dL.prototype.JF=function(n){return!1};
dL.prototype.Tj=function(n,F){return!0};dL.prototype.hV=function(n,F,O,I){};dL.prototype.XW=function(n,F){};
dL.prototype.xu=function(n,F){return null};dL.prototype.a8D=function(n){return this.aeS};dL.prototype.Kq=function(){};
dL.prototype.close=function(){this.A(new k(V.E.hS))};dL.prototype.a9w=function(n){this.ek=V.iJ(n,this._);
V.MH(window,this.Wz);V.Ry(window,this.Xy)};dL.prototype.ad2=function(n){var F=this._.parentNode,O=V.iJ(n,F),I=Math.round(O.x-this.ek.x),x=F.offsetTop+Math.max(0,Math.min(window.innerHeight-36,Math.round(O.y-this.ek.y)));
this.aeS=new aE(I,x);this._.style.left=I+"px";this._.style.top=x+"px"};dL.prototype.ai_=function(n){V.le(window,this.Wz);
V.re(window,this.Xy)};dL.prototype.EQ=function(n){this.A(new k("closebtn"));this.close()};function e0(){dL.call(this,[0,13,0],"account");
this.cA=V.w("div","form padded scrollable");this.cA.setAttribute("style","max-width:48em;  max-height:33em;");
this.body.appendChild(this.cA);this.GG=[new e0.ly,new e0.Q8(e0.a2G),new e0.Q8(e0.abJ)];for(var e=0;e<this.GG.length;
e++)this.GG[e].parent=this;this.k("showpage",this.a8w,this)}e0.prototype=new dL;e0.prototype.a8w=function(n){V.em(this.cA);
this.cA.scrollTop=0;this.cA.appendChild(this.GG[n.data.FI]._)};e0.prototype.B=function(){dL.prototype.B.call(this);
for(var e=0;e<this.GG.length;e++)this.GG[e].B()};e0.prototype.hV=function(n,F,O){V.em(this.cA);var I=this.GG[0];
this.cA.appendChild(I._);I.hV();this.B()};e0.prototype.XW=function(n,F){this.hV(null,null,null)};e0.ly=function(){ch.call(this);
this._=V.w("div");var n=this._,F,O,I="background-color: #00aa00;  text-shadow:none; padding:3px 7px; font-size:1.2em; font-weight:bold; color:#ffffff; cursor:pointer; margin:4px 0;";
this.uF=V.w("div");n.appendChild(this.uF);this.Hf=new cg([0,11],!1,null,!0);this.Hf._.setAttribute("style","background-color: rgba(200,0,0,1); color:#ffffff; margin:4px 6px 4px 0;");
this.Hf.k("click",this.Pn,this);n.appendChild(this.Hf._);this.xW=new cg([0,13,1],!1,null,!0);this.xW.k("click",this.se,this);
n.appendChild(this.xW._);this.PK=new cg("Business Terms",!1,null,!0);this.PK.k("click",this.aeI,this);
n.appendChild(this.PK._);F=V.w("h2");F.innerHTML="Account types";n.appendChild(F);O=V.w("table");O.innerHTML="\t\t\t<table>\t\t\t\t<tr>   <th class=\"left\"></th><th>Free</th><th>Premium</th> </tr>\t\t\t\t<tr>   <td class=\"left\">Full Functionality</td><td class=\"yes\">\u2713</td><td class=\"yes\">\u2713</td>    </tr>\t\t\t\t<tr>   <td class=\"left\">No Ads</td><td class=\"no\"> </td><td class=\"yes\">\u2713</td>    </tr>\t\t\t\t<tr>   <td class=\"left\">Steps in History</td><td class=\"no\" style=\"font-size:1.3em\">30</td><td class=\"yes\">60</td>    </tr>\t\t\t\t<!--<tr class=\"lastrow\">   <td class=\"left\">Cost</td><td>Free</td><td><big>$5</big> per month</td>    </tr>-->\t\t\t</table>\t\t";
n.appendChild(O);var x=this.a3W=[[9,30,1],[10,90,1],[40,365,1],[15,30,5],[30,90,5],[120,365,5],[50,30,20],[100,90,20],[400,365,20],[40,30,1e3],[80,90,1e3],[300,365,1e3],[100,30,5e3],[200,90,5e3],[700,365,5e3],[200,30,2e4],[400,90,2e4],[1400,365,2e4]];
this.Fi=[];for(var e=0;e<x.length;e++)this.Fi.push(new cg("Buy: $"+x[e][0],!1,null,!0));for(var e=0;
e<this.Fi.length;e++){this.Fi[e]._.setAttribute("style",I);this.Fi[e].k("click",this.Y4,this)}F=V.w("h2");
F.innerHTML="Go Premium";n.appendChild(F);this.VM=new cg("...",!0);this.VM._.setAttribute("style",I);
n.appendChild(this.VM._);O=this.ab(3,["Single user",this.Fi[0],this.Fi[1],this.Fi[2],"Team of 5",this.Fi[3],this.Fi[4],this.Fi[5],"Team of 20",this.Fi[6],this.Fi[7],this.Fi[8]]);
n.appendChild(O);this.ac0=new cL("I accept",!0,"");n.appendChild(this.ac0._);this.mg=new cg([0,13,1],!1,null,!0);
this.mg.k("click",this.se,this);n.appendChild(this.mg._);this._5=new cg("I have a key",!1,null,!0);this._5._.setAttribute("style",I+" margin-left:18.9em;");
this._5.k("click",this.Y4,this);n.appendChild(this._5._);F=V.w("h2");F.textContent="Team Settings";n.appendChild(F);
this._u=new cL("Join a team");n.appendChild(this._u._);this._u.k(V.E.L,this.tv,this);this.$O=new fq("Email of a leader",null,14);
n.appendChild(this.$O._);V.Zq(n);this.Qs=new cL("Start a team");n.appendChild(this.Qs._);this.Qs.k(V.E.L,this.tv,this);
var r=new gD("Emails of other members:");n.appendChild(r._);V.Zq(n);this.iS=V.w("textarea");this.iS.setAttribute("rows",3);
this.iS.setAttribute("cols",70);this.iS.setAttribute("style","display:block;tab-size:4;");n.appendChild(this.iS);
var _=new cg("Save Team Settings",!1,null,!0);n.appendChild(_._);_.k("click",this.amH,this);var d=this.a34=new cg("More about Teams",!1,null,!0);
n.appendChild(d._);d.k("click",this.Ff,this);F=V.w("h2");F.innerHTML="Distributor Account";n.appendChild(F);
this.T8=new cg("...",!0);this.T8._.setAttribute("style",I);n.appendChild(this.T8._);O=this.ab(3,["1000 views/month",this.Fi[9],this.Fi[10],this.Fi[11],"5000 views/month",this.Fi[12],this.Fi[13],this.Fi[14],"20000 views/month",this.Fi[15],this.Fi[16],this.Fi[17]]);
n.appendChild(O);this.bF=new fq("Domain name (e.g. domain.com)",null,14);n.appendChild(this.bF._);V.Zq(n);
var _=new cg("Save Domain Settings",!1,null,!0);_.kc();n.appendChild(_._);_.k("click",this.a3t,this);
var d=new cg("More about Distributors",!1,null,!0);n.appendChild(d._);d.k("click",this.Ff,this)};e0.ly.prototype=new ch;
e0.ly.prototype.se=function(n){var F=new k("showpage",!0);F.data={FI:1};this.A(F)};e0.ly.prototype.aeI=function(n){var F=new k("showpage",!0);
F.data={FI:2};this.A(F)};e0.ly.prototype.B=function(){this.Hf.YB(dW.j_()?hl.get([0,11]):hl.get([0,10]));
this.mg.B();this.xW.B();this.PK.B()};e0.ly.prototype.Ff=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.mR,link:"https://www.photopea.com/api/accounts#"+(n.target==this.a34?"teams":"distributors")};
this.A(F)};e0.ly.prototype.tv=function(n){var F=n.currentTarget==this._u;this._u.F(F);this.Qs.F(!F)};
e0.ly.prototype.amH=function(n){var F=this._u.u(),O=this.$O.u().trim(),I=this.iS.value.trim();if(O.length>60){alert("Too long email address");
return}if(I.length>600){alert("Too many team members");return}I=I.split(",").join(" ").trim();I=I.replace(/\s+/g," ");
if(I=="")I=[];else I=I.split(" ");var x=dW.EA();if(x==null)x={};if(x.acc==null)x.acc={};x.acc.team={jin:F,ldr:O,mmb:I};
dW.sB(x,this.YX.bind(this));alert("Saved!");this.hV()};e0.ly.prototype.a3t=function(n){var F=this.bF.u().trim();
if(!dW.j_()){alert("You have to log in first.");return}if(dW._m().distrib=="0"){alert("Order a distributor account first.");
return}var O=dW.EA();if(O==null)O={};if(O.acc==null)O.acc={};if(F=="")delete O.acc.dname;else O.acc.dname=F;
dW.sB(O,this.YX.bind(this));alert("Saved!");this.hV()};e0.ly.prototype.hV=function(){if(dW.j_()){var n=dW._m();
if(n==null)return;this.uF.innerHTML="<span style=\"font-size:1.5em; margin-right:0.7em;\">"+n.name+"</span> "+n.email+" <br/>"}else this.uF.innerHTML="Logging In is free. Your environment settings will be synchronized across all devices. <br/>";
var F=dW.j_()&&dW.$m();this.VM._.style.display=F?"block":"none";if(F){var O=parseInt(n[V.RF("!&|'&50")])-Date.now()*(1/1e3),I=parseInt(n.ptype),x;
if(I==-1)x="member of a team";else if(I==1)x="Single user";else x="Team of "+I;this.VM.YB("Premium active for "+Math.round(O/(60*60*24))+" more days! ("+x+")")}var r=dW.j_()&&n.distrib*1e3>Date.now();
this.T8._.style.display=r?"block":"none";if(r){var O=parseInt(n.distrib)-Date.now()/1e3,I=parseInt(n.ptype);
this.T8.YB("Distributor active for "+Math.round(O/(60*60*24))+" more days! ("+I+" visitos)")}var _=dW.EA();
if(_&&_.acc&&_.acc.team){var d=_.acc.team;this._u.F(d.jin);this.Qs.F(!d.jin);this.$O.F(d.ldr);this.iS.value=d.mmb.join(", ")}else{this._u.F(!0);
this.Qs.F(!1);this.$O.F("");this.iS.value=""}if(_&&_.acc&&_.acc.dname)this.bF.F(_.acc.dname);else this.bF.F("")};
e0.ly.prototype.ab=function(n,F){var O=V.w("table");O.innerHTML="\t\t\t\t<table>\t\t\t\t\t<tr>   <th class=\"left\"></th><th>30 days</th><th>90 days</th> "+(n==3?"<th>365 days</th>":"")+" </tr>\t\t\t\t</table>\t\t\t";
for(var e=0;e<F.length;e+=n+1){var I=V.w("tr"),x;O.appendChild(I);x=V.w("td","left");I.appendChild(x);
x.innerHTML="<b>"+F[e]+"</b>";for(var r=0;r<n;r++){x=V.w("td");I.appendChild(x);x.appendChild(F[e+1+r]._)}}return O};
e0.ly.prototype.Y4=function(n){var F=this.Fi.indexOf(n.currentTarget),I=30,x=1;if(!dW.j_()){alert("You must log in before buying Premium");
return}if(this.ac0.u()==!1&&F<9){alert("You must accept Terms of Service");return}var O=dW.j_()&&dW.$m();
if(F!=-1){var r=this.a3W[F];I=r[1];x=r[2]}if(O&&x<1e3){alert("You already have premium.");return}if(F==-1){var _=prompt("Please enter your key");
if(_!=null){dW.a04(_,this.YX.bind(this));this.Im()}return}if(I==30&&x==1){var d=confirm("You can have a 90 days version for $10. Do you still want a 30 days version for $9?");
if(!d)return}dW.order(I,x,this.YX.bind(this));this.Im()};e0.ly.prototype.YX=function(n){if(dW.j_()&&dW._m().msg)alert(dW._m().msg);
this.hV();this.Im()};e0.ly.prototype.Pn=function(n){if(dW.j_()){dW.aaZ();this.Im();this.hV(null,null,null)}else dW.Pn(this.alw.bind(this))};
e0.ly.prototype.alw=function(){var n=new k(V.E.P,!0);n.data={e:V.U.a6Y};this.A(n)};e0.ly.prototype.Im=function(){var n=new k(V.E.P,!0);
n.data={e:V.U.Qx};this.A(n)};e0.Q8=function(n){ch.call(this);this._=V.w("div");var F=this._,O=this.ajK=new cg([0,13,2],!1,null,!0);
O.k("click",this.a5V,this);F.appendChild(O._);var I=V.w("div");I.innerHTML=n;F.appendChild(I)};e0.Q8.prototype=new ch;
e0.Q8.prototype.a5V=function(n){var F=new k("showpage",!0);F.data={FI:0};this.A(F)};e0.Q8.prototype.B=function(){this.ajK.B()};
e0.abJ="\t\t<h1>Contact</h1>\t\t<p>Photopea.com is operated by Ivan Kuckir (I\u010C 04498411, Tax ID CZ9011014309).</p>\t\t<ul>\t\t\t<li><b>Address</b>: H\xE1lkova 483, 517 41 Kostelec nad Orlic\xED, Czech Republic</li>\t\t\t<li><b>E-mail</b>: support@photopea.com, <b>Phone number</b>: +420 604 592 737</li>\t\t</ul>\t\t<h1>Refund Policy</h1>\t\t<p>You can ask for a refund by writing us an email to support@photopea.com and. \t\tWe offer only one kind of service, and if you have been refunded in the past, you can not get another refund.\t\t</p>\t\t<h1>Terms of Delivery</h1>\t\t<p>You can pay with a debit or a credit card. Payments are processed instantly, your Premium account will be activated instantly.</p>\t";
e0.a2G="\t\t<h1>Terms of Service</h1>\t\t\t\t<h2>What are these Terms?</h2>\t\t<p>\t\tThese terms form a binding contract between you and us (\"these Terms\") regarding your access to and use of any of our web sites, \t\tweb applications, services, products and Software that contain a link to these Terms (individually and collectively, the \"Service\"). \t\t</p>\t\t\t\t<h2>Changes to the Service or these Terms</h2>\t\t<p>\t\tWe may make changes to, update (or not update) or discontinue any part, element, functionality, availability or offering of the Service.\t\tWe may also make changes or updates to these Terms at any time and for any reason in our sole discretion, including complying with applicable law. \t\tIf we make any material changes to these Terms, we\u2019ll provide notice to you in any way we deem reasonable including, for example, \t\tby posting a notice of the change on our web site(s) or in-service, or by sending a notice to your email address if you\u2019ve given it to us.\t\t</p>\t\t\t\t<h2>Your content</h2>\t\t<p>\t\tThese Terms don\u2019t grant us (and we don\u2019t claim) any ownership rights in Your Content.\t\t</p>\t\t<p>\t\t<b>Posting Your Content.</b> By sharing, publishing (e.g. through Imgur), distributing or allowing others to \t\taccess Your Content through the Service You are solely responsible for the consequences of doing so and you acknowledge \t\tand agree that Your Content may be viewed worldwide. If you choose to make your personal information publicly available through the Service, \t\tyou do so at your own risk. You warrant that you have obtained all necessary licenses, \t\trights and permissions to use and grant all of the rights granted in these Terms\t\tto Your Content and that you will comply with any requirements or restrictions imposed by them.\t\t</p>\t\t<!--\t\t<p>\t\tWe have the right (but not the obligation) to pre-screen or monitor any Content or any user's access to the Service,\t\tand to remove or block access to any Content for any reason, or suspend or terminate any user's access to the Service for any reason. \t\tWe have no responsibility or liability with respect to any Content, including for any actions that we may take with respect \t\tto any Content that we determine violates these Terms.\t\t</p>\t\t-->\t\t\t\t<h2>Registering for the Service</h2>\t\t<p>\t\tYou may be required or permitted to register with us to access the Service or certain areas of the Service.\t\tYou agree to immediately notify us of any unauthorized use of your registration information (including all purchases).  \t\tYou may also be able to sign into the Service by using a third-party social networking platform account \t\t(such as Facebook, Google+ or Twitter). Your registration information (including your user name and password, \t\tand any social networking account with which you sign into the Service) is for your personal use only, and not for use by any other person. \t\tYou are responsible for maintaining the confidentiality of any password you may use to access the Service, and agree not to transfer your password or user name\t\tto any third party. You are fully responsible for all use of your registration information, \t\tand to ensure that you \"log out\"/exit from your account with the Service (if applicable) \t\tat the end of each session. We are not liable for any loss or damage arising from your failure to comply with any of the foregoing obligations. \t\t</p>\t\t\t\t<h1>Privacy Policy</h1>\t\t\t\t<p>\t\tBy voluntarily providing us with Personal Data, you are consenting to our use of it in accordance with this Privacy Policy. \t\tIf you provide Personal Data to the Service, you acknowledge and agree that such Personal Data may be transferred from your current location to our servers.\t\t</p>\t\t<p>Computer information collected:</p>\t\t\t\t<ul>\t\t\t\t<li><b>Third party tracking tools.</b> We use third party tracking tools to improve the performance and features of the Service (e.g. Google Analytics).\t\t\t\tSuch tools are created and managed by parties outside our control. As such, we are not responsible for what information is actually captured by such third parties \t\t\t\tor how such third parties use and protect that information.</li>\t\t\t\t\t\t\t\t<li><b>Name and email for the authorization.</b> You may use third-party services (such as Facebook or Google) to log into the Service. \t\t\t\tIn such case, we store your name and email address, that were provided to us by third-party services.</li>\t\t\t\t\t\t\t\t<li><b>Environment settings.</b> When you use the Service, environment settings (e.g. current language, current color theme) \t\t\t\tare stored at your computer in \"localData\".\t\t\t\tIt helps us provide you the same environment when you visit the Service next time.<br/>\t\t\t\tWhen you log into the Service, your environemnt settings are stored at our server. \t\t\t\t</li>\t\t\t\t\t\t\t\t<li><b>Payer information.</b> When you make an order inside the Service and you pay through a third-party service (e.g. PayPal), \t\t\t\twe may store the information about the payer, that we may receive from the third-party service \t\t\t\t(it usually contains the name, the email address and the physical address of the payer, but no card nambers or passwords).</li>\t\t</ul>\t\t\t\t";
function d7(){dL.call(this,[11,14],"addguides");this.sE;this.GL={Kc:{wv:0}};this.dL=null;var n=V.w("div","form");
this.body.appendChild(n);this.d1=new fq([22,4,0],null,16);this.d1.k(V.E.L,this.UO,this);this.Cw=new fq([22,4,1],null,16);
this.Cw.k(V.E.L,this.UO,this);this.zw=new bf(null,q.Mm.RB);this.zw.k(V.E.L,this.UO,this);n.appendChild(this.d1._);
n.appendChild(this.zw._);V.Zq(n);n.appendChild(this.Cw._);this.lF=new cg("OK",!0,null,!0);this.lF.k("click",this.$Y,this);
n.appendChild(this.lF._);this.k("closebtn",this.aiC,this)}d7.prototype=new dL;d7.prototype.Tj=function(n,F){return n!=null};
d7.prototype.A5=function(){return!0};d7.prototype.B=function(){dL.prototype.B.call(this);this.d1.B();
this.Cw.B();this.zw.B()};d7.prototype.XW=function(n,F){var O=n.Kc.wv;this.GL.Kc.wv=O;this.zw.F(O)};d7.prototype.hV=function(n,F){this.sE=n;
this.dL=JSON.stringify(n.fT);this.I_()};d7.prototype.I_=function(){var n=this.sE,F=n.fT,O=function(I,n,x,r){var _=[];
for(var e=0;e<I.length;e++)_.push(q.Mm.xp(I[e],n.gC,x,r));return _.join(", ")};this.d1.F(O(F[1],n,this.GL,n.v));
this.Cw.F(O(F[0],n,this.GL,n.d))};d7.prototype.UO=function(n){if(n&&n.currentTarget==this.zw)this.GL.Kc.wv=this.zw.u();
else{var F=this.jY(this.d1),O=this.jY(this.Cw),I=this.sE;I.fT=[O,F];I.zB=!0}this.I_()};d7.prototype.jY=function(n){var F=n==this.d1?this.sE.v:this.sE.d,O=n.u().replace(/,/g," ").replace(/  +/g," ").trim(),I=O==""?[]:O.split(" ");
for(var e=0;e<I.length;e++)I[e]=q.Mm.a46(I[e],this.sE.gC,this.GL,F);return I};d7.prototype.aiC=function(n){var F=this.sE;
F.fT=JSON.parse(this.dL);F.zB=!0;this.sE=null};d7.prototype.$Y=function(n){this.UO(n);var F=new k(V.E.S,!0);
F.T=c.AK;F.data={e:"gids",nB:JSON.parse(this.dL),ct:JSON.parse(JSON.stringify(this.sE.fT))};this.sE=null;
this.close();this.A(F)};function d1(n){var F=bS.names[n];if(F==null)F=dK.names[n];if(n=="aply")F="Apply Image";
if(n=="fade")F=[2,11];if(n=="blendOptions")F=[14,10];dL.call(this,F,"afw_"+n);this.qm=n;this.O6=null;
this.QC=null;this.un=new B[n];this.un.k(V.E.L,this.kO,this);this.un.parent=this;this.body.appendChild(this.un._);
this.wt=new cL([24,18,5]);this.wt.F(!0);this.wt.k(V.E.L,this.kO,this);this.abE=new cg("Reset",!0,null,!0);
this.abE.k("click",this.h_,this);this.lF=new cg("OK",!0,null,!0);this.lF.k("click",this.$Y,this);if(this.OF())this.un.ln(this.lF._);
else{V.fx(this.un._,"form");V.fx(this.body,"flexrow");this.un._.setAttribute("style","width:24em");var O=V.w("div");
this.body.appendChild(O);O.setAttribute("style","width:8em; margin-left:1em; line-height:2.3em");O.appendChild(this.lF._);
O.appendChild(this.abE._);O.appendChild(this.wt._)}this.k("closebtn",this.Ui,this)}d1.prototype=new dL;
d1.prototype.A5=function(){return!0};d1.prototype.OF=function(){return this.un!=null&&this.un.Ru()};
d1.prototype.xu=function(){return this.OF()?new aE(0,0):dL.prototype.xu()};d1.prototype.ZB=function(){return this.un.ZB()};
d1.prototype.XS=function(n,F,O,I,x){this.un.XS(n,F,O,I,x)};d1.prototype.RL=function(n,F,O,I,x){this.un.RL(n,F,O,I,x)};
d1.prototype._X=function(n,F,O,I,x){this.un._X(n,F,O,I,x)};d1.prototype.Tj=function(n,F){if(this.qm=="fade")return d1.Bm(n);
return!0};d1.prototype.h_=function(n){this.un.F(bS.tc(this.qm));this.kO()};d1.prototype.kO=function(n){this.Fs({e:"edit",K_:this.un.u(),st:!this.wt.u()})};
d1.prototype.Ui=function(n){this.Fs({e:"cancel"})};d1.prototype.$Y=function(n){if(!this.wt.u()){this.wt.F(!0);
this.kO()}this.QC=this.un.u();if(this.OF())this.kO();this.Fs({e:"confirm"});this.close()};d1.prototype.B=function(){dL.prototype.B.call(this);
this.wt.B();if(this.un)this.un.B()};d1.prototype.XW=function(n,F){if(this.un)this.un.XW(n,F)};d1.prototype.Ka=function(n,F,O,I){if(this.OF())this.un.Ka(I);
else dL.prototype.Ka.call(this,n,F,O,I)};d1.prototype.hV=function(n,F,O,I){this.O6=F.O6;var x=n.add.lnk2?n.add.lnk2:[],r,_,d=new gv(0,0,n.d,n.v),w=n.t[n.C[0]],Z=null;
r=w.buffer;_=w.rect;if(this.OF())Z=n.dH(n.C[0]-1);var P=bS.tc(this.qm),C=[x,n.TM,n];if(F.O6==null){this.un.F(P,r,_,d,Z,C);
if(dK.names[this.qm]){if(I.q(u.pI)&&this.QC)this.un.F(this.QC);var W=ci.WD.getData(n),v=q.oN(W[0].aN);
this.un.P5(v)}}else{var L=!1,w=n.t[this.O6.$];if(w.z3()){var H=w.Fa(n);r=H.buffer;_=H.rect;var y=w.add.SoLd.filterFX.v.filterFXList.v;
if(y[this.O6.index]){var g=y[this.O6.index].v;this.un.F(this.qm=="blendOptions"?g.blendOptions.v:g.Fltr.v,r,_,d,Z,C);
this.un.P5(q.oN(r));L=!0}}if(!L){this.un.F(P,r,_,d,Z,C);this.un.P5(q.oN(r))}}if(!this.OF())this.kO()};
d1.prototype.Fs=function(n){var F=new k(V.E.S,!0);n.qm=this.qm;n.O6=this.O6;F.data=n;F.T=bS.names[this.qm]||this.O6?c.HI:c.Np;
F.uh=!0;this.A(F)};d1.prototype.Kq=function(n,F){F=F-26;n=n-26;this.un.Kq(n,F)};d1.Bm=function(n){if(n==null)return!1;
var F=n.mG();if(F==null||!(F.data instanceof Array)||F.data.length!=n.C.length)return!1;for(var e=0;
e<F.data.length;e++){var O=F.data[e];if(O.$<0&&n.TM[-1-O.$])return!0;if(O.$==null||n.t[O.$]==null||n.t[O.$].vE!=O.vH)return!1;
if(n.C.indexOf(O.$)==-1)return!1}return!0};function b3(){dL.call(this,[11,0],"camera");this.data=null;
this.Fg=new aE(1,1);this.a1X=[];var n=V.w("div","form hbar");this.body.appendChild(n);this.aiG=new bf(null,[]);
this.t0=new bf([21,0],[[21,2],[21,1]]);n.appendChild(this.t0._);this.YV=new bf(null,[]);this.YV.k(V.E.L,this.Yz,this);
n.appendChild(this.YV._);this.T0=new cg([11,0],!1,null,!0);this.T0.k("click",this.aoe,this);n.appendChild(this.T0._);
this.Kt=new gD("");n.appendChild(this.Kt._);this.stream=null;this.yj=V.w("video","");this.yj.setAttribute("autoplay","true");
this.body.appendChild(this.yj);this.ajE=this.a8_.bind(this);this.a6K=this.ahp.bind(this);this.a7_=this.ag_.bind(this);
this.k("closebtn",this.Ib,this)}b3.prototype=new dL;b3.prototype.B=function(){dL.prototype.B.call(this);
this.t0.B();this.T0.B();this.Kq(this.HL,this.Sa)};b3.prototype.dH=function(){var n=this.yj.videoWidth,F=this.yj.videoHeight,O=V.w("canvas","");
O.width=n;O.height=F;var I=O.getContext("2d");I.drawImage(this.yj,0,0,n,F);var x=I.getImageData(0,0,n,F);
return{Kh:new gv(0,0,n,F),data:x.data.buffer}};b3.prototype.aoe=function(n){if(this.t0.u()==0)this.a6a();
else this.a5Z()};b3.prototype.a5Z=function(){var n=this.dH(),F={buffer:new Uint8Array(n.data),rect:n.Kh},O=new k(V.E.S,!0);
O.uh=!0;O.T=c.lo;O.data={e:K.LS,SS:F};this.A(O);alert(hl.get([21,4]))};b3.prototype.a6a=function(){var n=this.dH(),F=fx.iE("camera",[n]),O=new k(V.E.P,!0);
O.data={e:V.U.ph,KH:F};this.A(O);alert(hl.get([21,5]))};b3.prototype.hV=function(n,F,O){navigator.mediaDevices.enumerateDevices().then(this.a5J.bind(this))};
b3.prototype.a5J=function(n){var F=this.a1X=[],O=[];for(var e=0;e<n.length;e++)if(n[e].kind=="videoinput"){F.push(n[e]);
O.push("Camera "+F.length)}this.YV.SY(O);this.YV.F(0);this.Yz()};b3.prototype.Yz=function(n){this.Ib();
var F={video:{deviceId:this.a1X[this.YV.u()].deviceId,width:{ideal:8e3},height:{ideal:8e3}}};if(navigator.mediaDevices.getUserMedia)navigator.mediaDevices.getUserMedia(F).then(this.ajE).catch(this.a6K);
else navigator.webkitGetUserMedia(F,this.ajE,this.a6K)};b3.prototype.a8_=function(n){this.stream=n;this.yj.srcObject=n;
this.yj.addEventListener("loadedmetadata",this.a7_,!1)};b3.prototype.ag_=function(n){this.yj.play();
this.Kq(this.HL,this.Sa)};b3.prototype.xu=function(n,F){return new aE(0,0)};b3.prototype.Kq=function(n,F){var O=this.yj.videoWidth,I=this.yj.videoHeight;
this.Kt.F(O+" x "+I+" px");this.Kt._.setAttribute("style","position:absolute;  left:14px; bottom:10px; z-index:1;");
this.Fg.mT(O,I);this.HL=n;this.Sa=F;var x=n-28,r=F-28-30,_=this.Fg.x/this.Fg.y;if(x/r>_)x=r*_;else r=x/_;
this.yj.setAttribute("style","display: block; width: "+Math.round(x)+"px; height:"+Math.round(r)+"px;")};
b3.prototype.ahp=function(n){console.log("error",n);alert(hl.get([21,6]));this.close()};b3.prototype.Ib=function(n){if(this.stream!=null){var F=this.stream.getTracks();
for(var e=0;e<F.length;e++)F[e].stop();this.stream=null}};function b1(){dL.call(this,[7,8],"crange");
this.sE=null;this.tj={LG:73,R:4.45,O:4};this.lh={LG:73,R:4.45,O:4};var n=V.w("div","form");n.setAttribute("style","width:18em");
this.body.appendChild(n);this.$n=new af([12,92],0,200);this.$n.F(40);this.$n.k(V.E.L,this.Xx,this);n.appendChild(this.$n._);
this.nd=V.w("canvas");n.appendChild(this.nd);this.g3=new hg([12,36],[[18,0],"\uFF0B","\u2014"]);n.appendChild(this.g3._);
this.S0=new cg("OK",!0,null,!0);this.S0.k("click",this.$Y,this);this.body.appendChild(this.S0._)}b1.prototype=new dL;
b1.prototype.Tj=function(n,F){return n!=null};b1.prototype.ZB=function(){return!0};b1.prototype.A5=function(){return!0};
b1.prototype.B=function(){dL.prototype.B.call(this);this.$n.B();this.g3.B()};b1.prototype.XS=function(n,F,O,I,x){var r=n.a.jR(x.x,x.y);
this.Wn(r.x,r.y)};b1.prototype.Wn=function(n,F){var O=Math.min,I=Math.max,x=this.sE,r=I(0,O(x.d-1,Math.floor(n))),_=I(0,O(x.v-1,Math.floor(F))),d=x.dH(),w=(_*x.d+r)*4,Z=d[w],P=d[w+1],C=d[w+2],W=q.Kj(Z,P,C),v=this.g3.u(),L=this.tj,H=this.lh;
if(v==0){this.tj=JSON.parse(JSON.stringify(W));this.lh=W}else if(v==1){L.LG=O(L.LG,W.LG);L.R=O(L.R,W.R);
L.O=O(L.O,W.O);H.LG=I(H.LG,W.LG);H.R=I(H.R,W.R);H.O=I(H.O,W.O)}else if(v==2){var y=(L.LG+H.LG)/2,g=(L.R+H.R)/2,Q=(L.O+H.O)/2;
if(W.LG<y)L.LG=I(L.LG,W.LG+10);else H.LG=O(H.LG,W.LG-10);if(W.R<g)L.R=I(L.R,W.R+1);else H.R=O(H.R,W.R-1);
if(W.O<Q)L.O=I(L.O,W.O+1);else H.O=O(H.O,W.O-1)}this.Xx()};b1.prototype.$Y=function(n){var F=new k(V.E.S,!0);
F.T=c.FT;F.data={e:"crange",BQ:this.tj,HJ:this.lh,H9:this.$n.u()/200};F.uh=!0;this.A(F);this.close()};
b1.prototype.hV=function(n,F){this.sE=n;this.Wn(0,0)};b1.prototype.Xx=function(){var n=this.sE,F=c.pQ.lB(n,this.tj,this.lh,this.$n.u()/200),O=F.rect,I=F.channel,x=this.nd,r=x.getContext("2d"),_=Math.floor(230*V.Z()),d=Math.floor(_*(O.v/O.d));
x.width=_;x.height=d;V.z0(x,_,d);var w=q.f(I.length*4);q.IW(w,4294967295);for(var e=0;e<3;e++)q.GF(I,w,e);
var Z=c.V.oo([w,O],new cD(_/O.d,0,0,d/O.v,0,0)),P=Z.rect,C=new ImageData(new Uint8ClampedArray(Z.buffer.buffer),P.d,P.v);
r.putImageData(C,0,0)};function hZ(){dL.call(this,[12,76,1],"createshape");this.Xv=null;var n=V.w("div","form");
n.setAttribute("style","width:20em");this.body.appendChild(n);this.Cl=new cR([12,41],0,0,null,0,!1,!0);
n.appendChild(this.Cl._);V.Zq(n);this.d1=new cR([12,42],0,0,null,0,!1,!0);n.appendChild(this.d1._);V.Zq(n);
this.fk=new cL([19,5,3]);n.appendChild(this.fk._);this.Cl.F(100);this.d1.F(100);this.lF=new cg("OK",!0,null,!0);
this.lF.k("click",this.$Y,this);n.appendChild(this.lF._)}hZ.prototype=new dL;hZ.prototype.$Y=function(n){this.Xv.afI(this.Xv.abw,this.Cl.u(),this.d1.u(),this.fk.u());
this.close()};hZ.prototype.B=function(){if(this.Xv)this.Je=hl.get([5,3])+": "+hl.get(this.Xv.a5z);dL.prototype.B.call(this);
this.Cl.B();this.d1.B();this.fk.B()};hZ.prototype.hV=function(n,F){this.Xv=F;this.B()};function iO(){dL.call(this,[11,1],"colorpicker");
this.Fk=null;this.Vh=null;this.OX=null;this.X_=!1;this.PM=!1;var n=V.w("div","flexrow"),r,_;this.body.appendChild(n);
this.td=new dH(256);this.td.k(V.E.L,this.vd,this);n.appendChild(this.td._);var F=V.w("div","form");F.setAttribute("style","width:14.5em; margin-left:1em;");
n.appendChild(F);this.a4K=V.w("div","full");F.appendChild(this.a4K);this.aeH=V.w("div","full");F.appendChild(this.aeH);
var O=V.w("div","flexrow");F.appendChild(O);var I=V.w("div"),x=V.w("div");O.appendChild(I);O.appendChild(x);
r=["R","G","B"];_=I;this.iY=[];for(var e=0;e<3;e++){var d=new cR(r[e]+":",0,255,null,0,!1,!0);this.iY.push(d);
d.k(V.E.L,this.a00,this);_.appendChild(d._)}r=["H","S","B"];_=x;this.iG=[];for(var e=0;e<3;e++){var w=0,Z=360,P="\xB0";
if(e!=0){Z=100;P="%"}var d=new cR(r[e]+":",w,Z,P,0,!1,!0);this.iG.push(d);d.k(V.E.L,this.a2J,this);_.appendChild(d._)}this.d1=new fq("Hex",null,6);
this.d1.k(V.E.L,this.JR,this);F.appendChild(this.d1._);this.A_=V.w("input","fitem");this.A_.setAttribute("type","color");
this.A_.setAttribute("style","width:50px");this.A_.addEventListener("change",this.JR.bind(this),!1);
F.appendChild(this.A_);this.Zn=new hA(9);this.Zn.k(V.E.L,this.JR,this);F.appendChild(this.Zn._);this.lF=new cg("OK",!0,null,!0);
this.lF.k("click",this.$Y,this);F.appendChild(this.lF._);this.k("closebtn",this.Ui,this);this.AJ=!1}iO.prototype=new dL;
iO.prototype.ZB=function(){return!0};iO.prototype.Kq=function(n,F){this.td.Kq(Math.min(256,n-250),F)};
iO.prototype.vd=function(n){this.Vh=this.td.u();this.update()};iO.prototype.XS=function(n,F,O,I,x){this.AJ=!0;
this._Q(n,x)};iO.prototype.RL=function(n,F,O,I,x){if(!this.AJ)return;this._Q(n,x)};iO.prototype._X=function(n,F,O,I,x){this.AJ=!1};
iO.prototype._Q=function(n,F){var O=c.pm.cD(n,F,1),I=O&255,x=O>>8&255,r=O>>16&255;this.Vh={Q:r/255,l:x/255,O:I/255};
this.update()};iO.prototype.a00=function(n){var F=this.iY,O=this.t4(parseInt(F[0].u())),I=this.t4(parseInt(F[1].u())),x=this.t4(parseInt(F[2].u()));
this.Vh={Q:O/255,l:I/255,O:x/255};this.update()};iO.prototype.a2J=function(n){var F=this.iG,O=this.gB(parseInt(F[0].u())/360),I=this.gB(parseInt(F[1].u())/100),x=this.gB(parseInt(F[2].u())/100);
this.Vh=q.xN(O,I,x);this.update()};iO.prototype.JR=function(n){var F;if(n.currentTarget==this.Zn)F=this.Zn.u();
else{F=n.currentTarget==this.d1?this.d1.u():this.A_.value;if(F.charAt(0)=="#")F=F.slice(1);if(F.length==3)F=F[0]+F[0]+F[1]+F[1]+F[2]+F[2];
F=q.Dl(F)}this.Vh={Q:(F>>16&255)/255,l:(F>>8&255)/255,O:(F&255)/255};this.update()};iO.prototype.lY=function(n){var F=n.Q,O=n.l,I=n.O;
return Math.round(F*255)<<16|Math.round(O*255)<<8|Math.round(I*255)};iO.prototype.$Y=function(n){this.ef();
var F=this.lY(this.Vh);this.OX(F);this.close();this.PM=!1;this.Vh=null};iO.prototype.Ui=function(n){this.ef();
if(this.X_)this.OX(this.lY(this.Fk));this.PM=!1;this.Vh=null};iO.prototype.ef=function(n){var F=new k(V.E.P,!0);
F.data={e:V.U.ue};this.A(F)};iO.prototype.XW=function(n,F){if(F!=cf.dM)return;var O=n.nE;this.Zn.F(O);
if(this.Vh!=null){this.Vh={Q:(O>>16&255)/255,l:(O>>8&255)/255,O:(O>>0&255)/255};this.update()}};iO.prototype.hV=function(n,F){var O=F.eF,I={Q:(O>>16&255)/255,l:(O>>8&255)/255,O:(O>>0&255)/255};
if(this.Vh==null){var x=new k(V.E.P,!0);x.data={e:V.U.VC,dx:"crosshair",push:!0};this.A(x);this.AJ=!1;
this.OX=F.KC;this.X_=!1;this.PM=F._4;this.Fk=JSON.parse(JSON.stringify(I));this.aeH.setAttribute("style","height:3em;background-color:#"+q.c7(O)+";")}this.Vh=I;
this.update()};iO.prototype.update=function(){var n=this.Vh,F=this.lY(n),O=this.iY;O[0].F(Math.round(n.Q*255));
O[1].F(Math.round(n.l*255));O[2].F(Math.round(n.O*255));this.d1.F(q.c7(F));this.A_.value="#"+q.c7(F);
this.a4K.setAttribute("style","height:3em;background-color:#"+q.c7(F)+";");var I=q.sy(n.Q,n.l,n.O);O=this.iG;
O[0].F(Math.round(I.Sa*360));O[1].F(Math.round(I.Ls*100));O[2].F(Math.round(I.K_*100));this.td.F(n);
if(this.PM){this.OX(this.lY(this.Vh));this.X_=!0}};iO.prototype.t4=function(n){return Math.max(0,Math.min(255,n))};
iO.prototype.gB=function(n){return Math.max(0,Math.min(1,n))};function cV(){dL.call(this,[11,2],"contoureditor");
this.aeT=null;this.mi=null;this.response=null;this.Wf=V.w("div","cell");this.body.appendChild(this.Wf);
this.VA=V.w("div","cell padded");this.body.appendChild(this.VA);var n=V.w("div","bordered padded vmargin");
this.Wf.appendChild(n);this.un=new cl;this.un.k(V.E.L,this.wm,this);n.appendChild(this.un._);this.lF=new cg("OK",!0,null,!0);
this.lF.k("click",this.close,this);this.VA.appendChild(this.lF._);this.coords=V.w("div","");this.coords.setAttribute("style","width:250px");
this.Wf.appendChild(this.coords);this.Zg=new fq("X (in)","%",4);this._P=new fq("Y (out)","%",4);this.at=new cL([19,3,0]);
this.Zg.k(V.E.L,this.SB,this);this._P.k(V.E.L,this.SB,this);this.at.k(V.E.L,this.SB,this);this.coords.appendChild(this.Zg._);
this.coords.appendChild(this.at._);this.coords.appendChild(this._P._);this.k("closebtn",this.ou,this)}cV.prototype=new dL;
cV.prototype.B=function(){dL.prototype.B.call(this);this.at.B()};cV.prototype.wm=function(n){this.mi.Crv.v=this.un.u();
this.response(this.mi);this.cH()};cV.prototype.ou=function(n){this.response(this.aeT)};cV.prototype.hV=function(n,F){this.aeT=JSON.parse(JSON.stringify(F.Nv));
this.mi=F.Nv;this.response=F.response;this.un.F(this.mi.Crv.v);this.cH()};cV.prototype.cH=function(){var e=this.un.tB();
this.coords.setAttribute("class",e==-1?"disabled":"");if(e==-1)return;var n=this.mi.Crv.v[e].v;this.Zg.F(Math.round(n.Hrzn.v*(100/255)));
this._P.F(Math.round(n.Vrtc.v*(100/255)));this.at.F(n.Cnty.v)};cV.prototype.SB=function(n){var e=this.un.tB(),F=this.mi.Crv.v[e];
F.v.Hrzn.v=parseFloat(this.Zg.u())*(255/100);F.v.Vrtc.v=parseFloat(this._P.u())*(255/100);F.v.Cnty.v=this.at.u();
this.mi.Crv.v.sort(function(O,I){return O.v.Hrzn.v-I.v.Hrzn.v});this.un.F(this.mi.Crv.v,this.mi.Crv.v.indexOf(F));
this.cH();this.response(this.mi)};function b2(){dL.call(this,[11,3],"csize");this.Zb=0;this.cA=V.w("div","form");
this.cA.setAttribute("style","width:22em");this.body.appendChild(this.cA);this.kM=new gE(!0,!0,!0,!0);
this.kM.af4(!1);this.cA.appendChild(this.kM._);this.iQ=new hg("Align with",[[8,7],[12,6]]);this.iQ.k(V.E.L,this.aiW,this);
this.AR=new iZ([12,23,2],41);this.cA.appendChild(this.AR._);this.AR.F(4);this.wU=new aX(!1);this.wU.adS(new aE(0,0));
this.S0=new cg("OK",!0,null,!0);this.S0.k("click",this.$Y,this);this.body.appendChild(this.S0._)}b2.prototype=new dL;
b2.prototype.Tj=function(n,F){return n!=null};b2.prototype.A5=function(){return!0};b2.prototype.aiW=function(){var n=[this.AR._,this.wU._];
this.cA.removeChild(n[this.Zb]);this.Zb=this.iQ.u();this.cA.appendChild(n[this.Zb])};b2.prototype.B=function(){dL.prototype.B.call(this);
this.kM.B();this.iQ.B();this.AR.B();this.wU.B()};b2.prototype.$Y=function(n){var F=this.kM.u(),O=F.x,I=F.y,x=new k(V.E.JA,!0);
x.data=c.jz.pg(O,I,this.AR.u());this.close();this.A(x)};b2.prototype.hV=function(n,F){this.kM.F(new aE(n.d,n.v),n.gC)};
function dZ(){dL.call(this,[11,4],"duplinto");this.dV=null;this.Ii=null;var n=V.w("div","form");n.setAttribute("style","max-width:26em");
this.body.appendChild(n);this.sD=new bf([12,43],["abc","def"]);this.sD.k(V.E.L,this.wp,this);n.appendChild(this.sD._);
V.Zq(n);this.Db=new fq([12,48],null,14);n.appendChild(this.Db._);this.lF=new cg("OK",!0,null,!0);this.lF.k("click",this.$Y,this);
n.appendChild(this.lF._)}dZ.prototype=new dL;dZ.prototype.A5=function(){return!0};dZ.prototype.B=function(){dL.prototype.B.call(this);
this.sD.B();this.Db.B()};dZ.prototype.wp=function(n){var F=this.sD.u();if(F==this.Ii.length)this.Db.hL();
else this.Db.gy()};dZ.prototype.hV=function(n,F,O){this.dV=n;this.Ii=O;this.Db.F(n.C.length==0?"Layer":n.t[n.C[0]].getName());
var I=[];for(var e=0;e<O.length;e++)I.push(O[e].name);I.push([11,7]);this.sD.SY(I);this.sD.F(O.indexOf(n));
this.wp(null)};dZ.prototype.$Y=function(n){var F=this.sD.u();if(F==this.Ii.length){var O=new fj(this.Db.u()+".psd");
O.d=this.dV.d;O.v=this.dV.v;O.buffer=q.f(O.d*O.v*4);var I=O.Kv();I.V9("Background");O.xc([I]);var x=new k(V.E.P,!0);
x.uh=!0;x.data={e:V.U.ph,KH:O};this.A(x)}var r=this.dV.QH(null,this.dV!=this.Ii[F]),x=new k(V.E.S,!0);
x.data={e:K.Cf,t:r,Vg:this.dV,NZ:this.Ii[F]};x.T=c.lo;x.uh=!0;this.A(x);this.close()};function e3(){dL.call(this,[1,9],"eassets");
this.GL=null;this.Dh=null;var n=V.w("div","form");n.setAttribute("style","width:32em");this.body.appendChild(n);
this.kA=V.w("span");n.appendChild(this.kA);V.Zq(n);this.Ed=[new cL("Only layers / folders, whose name starts with \"-e-\""),new cL("Remove parts outside the canvas"),new cL("Trim transparent parts")];
for(var e=0;e<3;e++){var F=this.Ed[e];F.F(!0);F.k(V.E.L,this.I_,this);n.appendChild(F._);V.Zq(n)}this.c4=new bo([12,14,0],["1x","2x","3x","4x"]);
this.c4.F([!0,!1,!1,!1]);n.appendChild(this.c4._);V.dw(n);this.Oj=["PNG","JPG","SVG"];this.mh=new bf([12,50],this.Oj);
this.mh.k(V.E.L,this.C2,this);n.appendChild(this.mh._);this.gq=new he;n.appendChild(this.gq._);this.S0=new cg([1,9],!0,null,!0);
this.S0.k("click",this.$Y,this);n.appendChild(this.S0._);this.k("closebtn",this.mD,this)}e3.prototype=new dL;
e3.prototype.C2=function(n){this.gq.s$(this.Oj[this.mh.u()])};e3.prototype.mD=function(n){this.Dh=null};
e3.prototype.B=function(){dL.prototype.B.call(this);this.mh.B();this.c4.B();this.S0.B();this.gq.B()};
e3.prototype.hV=function(n,F,O){this.Dh=n;this.I_()};e3.prototype.I_=function(n){var F=this.nW(),O="- - - "+F.length+" exportable layers";
this.kA.textContent=O;this.C2(null)};e3.prototype.nW=function(){var n=this.Ed[0].u(),F=[],O=this.Dh;
for(var e=0;e<O.t.length;e++){var I=O.t[e],x=I.getName();if(!n&&!I.Ja()&&!I.rect.D2()||x.startsWith("-e"))F.push(e)}return F};
e3.prototype.XW=function(n,F){this.GL=n};e3.prototype.$Y=function(n){var F=this.Dh,O=[this.Oj[this.mh.u()]],I=[this.gq.u()],x=this.c4.u(),r={},_={},d=this.nW();
if(d.length==0){alert("No layers to export.");return}var w=[this.Ed[1].u(),this.Ed[2].u()];for(var e=0;
e<d.length;e++){var Z=d[e],P=F.t[Z],C=P.getName();if(_[C]!=null){_[C]++;C+=" "+_[C]}else _[C]=1;var W=P.Y9();
P.tt(!0);for(var v=0;v<x.length;v++){if(!x[v])continue;var L=v+1,H=c.eB.$H(F,O,L,this.GL,Z,I,w);for(var y=0;
y<O.length;y++){var g=O[y],Q=C.slice(C.startsWith("-e-")?3:0)+(L==1?"":"-"+L+"x")+"."+g.toLowerCase();
if(H[y])r[Q]=new Uint8Array(H[y])}}P.tt(W)}var J=UZIP.encode(r),A=new k(V.E.P,!0);A.data={e:V.U.L0,data:J,name:"assets.zip"};
this.A(A)};function ev(){dL.call(this,"Export Color Lookup Tables","exlut");this.GL=null;this.Dh=null;
var n=V.w("div","form");n.setAttribute("style","width:20em");this.body.appendChild(n);this.Ed=[new cR("Grid Points",1,256),new hg([12,50],[".CUBE"])];
var F=[16,0];for(var e=0;e<this.Ed.length;e++){var O=this.Ed[e];O.F(F[e]);O.parent=this;O.k(V.E.L,this.I_,this);
n.appendChild(O._);V.Zq(n)}this.S0=new cg("OK",!0,null,!0);this.S0.k("click",this.$Y,this);n.appendChild(this.S0._);
this.k("closebtn",this.mD,this)}ev.prototype=new dL;ev.prototype.Tj=function(n,F){if(Math.min(n.d,n.v)<16){alert("The document must be at least 16 x 16 pixels.",3200);
return!1}if(n.t.length<2){alert("There must be a background layer and some adjustment layers.",3200);
return!1}return!0};ev.prototype.mD=function(n){this.Dh=null};ev.prototype.XW=function(n,F){this.GL=n};
ev.prototype.hV=function(n,F,O){this.Dh=n};ev.prototype.$Y=function(){var n=this.Dh,F=this.Ed[0].u(),O=[],I=new gv(0,0,n.d,n.v),x=q.f(F*F*4),r=x.slice(0),_=new gv(n.d-F>>>1,n.v-F>>>1,F,F),d=n.t[0],w=d.buffer,Z=d.rect;
d.rect=_;d.buffer=x;for(var P=0;P<F;P++){this.agn(F,P,x);d.D(_);n.D(_);var C=n.dH();q.nF(C,I,r,_);for(var W=0;
W<F;W++)for(var v=0;v<F;v++){var L=W*F+v<<2;O.push(r[L]/255,r[L+1]/255,r[L+2]/255)}}var H=a3.a4t(O,F,n.name);
bm.save(H,n.name.split(".")[0]+".CUBE");d.buffer=w;d.rect=Z;d.D();n.D()};ev.prototype.agn=function(n,F,O){var I=255/(n-1),x=Math.round(F*I);
for(var r=0;r<n;r++)for(var _=0;_<n;_++){var d=r*n+_<<2;O[d]=Math.round(_*I);O[d+1]=Math.round(r*I);
O[d+2]=x;O[d+3]=255}};ev.prototype.B=function(){dL.prototype.B.call(this);for(var e=0;e<this.Ed.length;
e++)this.Ed[e].B()};function e$(){dL.call(this,[1,14],"finfo");this.nc=null;this.M6=null;this.DZ=null;
this.cA=V.w("div","form scrollable label12");this.cA.setAttribute("style","width:35em;  height:38em;  margin-bottom:8px");
this.body.appendChild(this.cA);var n=V.w("div","form");this.body.appendChild(n);this.J4=new bf(null,["Hello"]);
n.appendChild(this.J4._);this.ajU=new cg("Add Parameter",!1,null,!0);n.appendChild(this.ajU._);this.ajU.k("click",this.H5,this);
this.ip=new cg("=== S A V E ===",!1,null,!0);n.appendChild(this.ip._);this.ip.k("click",this.O4,this);
this.ahN=""}e$.prototype=new dL;e$.prototype.xu=function(n,F){return n<450||F<450?new aE(0,0):new aE(150,100)};
e$.prototype.H5=function(n){if(this.DZ.length==0)return;var F=this.DZ[this.J4.u()],O=this.n1();O[F]=fb.af[F][0];
this.xo(O);this.M6[F]._.scrollIntoView();this.M6[F].xC()};e$.prototype.lI=function(n){var F=this.n1();
delete F[n.currentTarget.a7g];this.xo(F)};e$.prototype.O4=function(n){var F=this.n1(),O=this.nc,I=!0;
for(var x in O)if(JSON.stringify(O[x])!=JSON.stringify(F[x]))I=!1;for(var x in F)if(JSON.stringify(O[x])!=JSON.stringify(F[x]))I=!1;
if(I)return;var r=new k(V.E.S,!0);r.T=c.lo;r.data={e:K.Gq,WR:F};this.A(r);this.nc=F;this.xo(F)};e$.E8=function(n){function F(x){var r=x.toLowerCase();
return x==r}var O=n.split(":").pop();for(var I=1;I<O.length-1;I++){if(O[I]==O[I].toUpperCase()&&(F(O[I+1])||F(O[I-1]))){O=O.slice(0,I)+" "+O.slice(I);
I++}}return O};e$.prototype.hV=function(n,F){this.nc=n.aC;this.xo(n.aC)};e$.prototype.xo=function(n){var F=this.cA,x=0;
V.em(F);var O=this.M6={},I=["tiff","exif","exif:GPS"],r=this.DZ=[],_=[];for(var d in fb.af){var w=e$.E8(d),Z=0,P=15,C=null;
if(n[d]==null){r.push(d);_.push(w);continue}for(var e=0;e<I.length;e++)if(d.startsWith(I[e]))Z=e;if(Z!=x){V.dw(F);
x=Z}if(d=="tiff:ImageDescription"||d=="dc:Keywords"){P=18.5;C=3}var W=new fq(w,null,P,C);O[d]=W;var v=n[d];
if(v instanceof Array)v=v[1]==0?"---":v[0]+"/"+v[1];var L=new cg("\u2716",null,hl.get([5,4]));F.appendChild(L._);
L.k("click",this.lI,this);L.a7g=d;W.F(v);F.appendChild(W._);V.Zq(F);if(d=="exif:GPSLongitude"&&n["exif:GPSLatitude"]){this.ahN=e$.Fm(n["exif:GPSLatitude"])+","+e$.Fm(n["exif:GPSLongitude"]);
var H=new cg("Show on map",!1,null,!0);F.appendChild(H._);V.Zq(F);H.k("click",this.a28,this)}}this.J4.SY(_);
this.J4.F(0)};e$.prototype.n1=function(){var n=this.M6,F=fb.af,O={};for(var I in F){var x=F[I][0],r=typeof x;
if(x==null||n[I]==null)continue;var _=n[I].u(),d="The value of \""+e$.E8(I)+"\" must ";if(r=="number"){_=parseFloat(_);
if(isNaN(_)){alert(d+"be a number.");_=x}}else if(x instanceof Array&&x.length==2){if(_.indexOf("/")==-1){alert(d+"be a fraction.");
_=x.slice(0)}else{_=_.split("/").map(parseFloat);if(isNaN(_[0])||isNaN(_[1])){_=x.slice(0)}}}O[I]=_}return O};
e$.Fm=function(n){var F=n.length,O=n.slice(0,F-1).split(",").map(parseFloat),I=n.slice(F-1),x=O[0]+O[1]/60+O[2]/3600;
if(I!="N"&&I!="E")x=-x;return x};e$.prototype.a28=function(n){window.open("https://maps.google.com?q="+this.ahN,"Map")};
function dt(){dL.call(this,[11,5],"gradienteditor");this.Fk=null;this.Vh=null;this.in=null;this.OX=null;
this.X_=!1;this.PM=!1;V.fx(this.body,"form");this.XE=null;this.yn=null;this.ts=-1;this.jD=-1;this.BI=0;
this.tk=this.Lw.bind(this);this.Du=this.KL.bind(this);this._Y=V.w("canvas","");this.xX=this._Y.getContext("2d");
this._Y.setAttribute("style","display:block");this.s8=null;V.kQ(this._Y);V.CP(this._Y,this.Yl.bind(this));
this.u_=new cR([19,3,3],0,100,"%");this.u_.k(V.E.L,this.rR,this);this.u_.parent=this;this.body.appendChild(this.u_._);
V.Zq(this.body);this.KE=new gD([12,0]);this.body.appendChild(this.KE._);this.TA=V.w("div","bordered padded noalign");
this.body.appendChild(this.TA);this.c1=new cR([12,0],0,100,"%");this.c1.parent=this;this.c1.k(V.E.L,this.rR,this);
this.TA.appendChild(this.c1._);this.ls=new cR([12,40],0,100,"%");this.ls.parent=this;this.ls.k(V.E.L,this.rR,this);
this.TA.appendChild(this.ls._);this.H3=new cg([5,4],!1,null,!0);this.H3.k("click",this.so,this);this.TA.appendChild(this.H3._);
this.body.appendChild(this._Y);V.Zq(this.body);this.a4L=new gD([13,0]);this.body.appendChild(this.a4L._);
this.mF=V.w("div","bordered padded noalign");this.body.appendChild(this.mF);this.TJ=new bf([12,44],[[12,45],[12,46],[12,47]]);
this.TJ.k(V.E.L,this.rR,this);this.mF.appendChild(this.TJ._);this.ml=new aR(!0);this.ml.parent=this;
this.ml.k(V.E.L,this.rR,this);this.mF.appendChild(this.ml._);this.l4=new cR([12,40],0,100,"%");this.l4.parent=this;
this.l4.k(V.E.L,this.rR,this);this.mF.appendChild(this.l4._);this.xw=new cg([5,4],!1,null,!0);this.xw.k("click",this.ro,this);
this.mF.appendChild(this.xw._);this.lF=new cg("OK",!0,null,!0);this.lF.k("click",this.$Y,this);this.body.appendChild(this.lF._);
this.k("closebtn",this.Ui,this)}dt.prototype=new dL;dt.prototype.Ui=function(n){if(this.X_)this.OX(this.Fk)};
dt.prototype.B=function(){dL.prototype.B.call(this);this.u_.B();this.KE.B();this.a4L.B();this.H3.B();
this.xw.B();this.c1.B();this.ls.B();this.TJ.B();this.l4.B()};dt.prototype.XW=function(n,F){this.in=n};
dt.prototype.hV=function(n,F){this.Vh=JSON.parse(JSON.stringify(F.W));this.Fk=JSON.parse(JSON.stringify(F.W));
this.XE=this.yn=null;this.OX=F.KC;this.X_=!1;this.PM=F._4;this.lx();this.rO()};dt.prototype.$Y=function(n){var F=this.Vh;
this.OX(F);this.close()};dt.prototype.JF=function(n){return n==u.lW||n==u.pf};dt.prototype.Ka=function(n,F,O,I){if(I.q(u.lW)||I.q(u.pf)){if(this.yn)this.so();
if(this.XE)this.ro()}};dt.prototype.so=function(n){var F=this.Vh.Trns.v;if(this.yn==null||F.length==2)return;
F.splice(F.indexOf(this.yn),1);this.yn=null;this.lx();this.rO()};dt.prototype.ro=function(n){var F=this.Vh.Clrs.v;
if(this.XE==null||F.length==2)return;F.splice(F.indexOf(this.XE),1);this.XE=null;this.lx();this.rO()};
dt.prototype.lx=function(){var n=this._Y,F=this.xX,O=V.Z();n.width=Math.floor(410*O);n.height=Math.floor(90*O);
V.z0(n,n.width,n.height);this.s8=new gv(0,0,Math.floor(380*O),Math.floor(32*O));this.s8.x=Math.floor((this._Y.width-this.s8.d)/2);
this.s8.y=Math.floor((this._Y.height-this.s8.v)/2);var I=this.s8,x=I.d,r=I.v,_=I.x,d=I.y,w=new gv(0,0,x,r),Z=F.getImageData(0,0,x,r),P=new Uint8Array(Z.data.buffer);
q.GE(P,x,r,8);var C=q.f(x*r*4);q.W.Vt(this.Vh,C,w,[1/x,0,0,1/r],x/2,r/2,!1,0,this.in.nE,this.in.sI);
q.p.F_("norm",C,I,P,I,I,1);F.clearRect(0,0,n.width,n.height);F.putImageData(Z,_,d);var W=this.Vh.Trns.v,v=this.Vh.Clrs.v,L=q.W.bQ(v,this.in.nE,this.in.sI),H=Math.round(6*V.Z()),y=Math.round(14*V.Z()),g=this.yn?this.yn.v:null,Q=this.XE?this.XE.v:null;
for(var e=0;e<W.length;e++){var J=W[e].v,A=Math.round(255-255*J.Opct.v.val/100);if((J==g||W[e-1]&&W[e-1].v==g||e==this.jD)&&e!=0){F.fillStyle="#000000";
F.fillRect(_-3+x*(W[e-1].v.Lctn.v+(J.Lctn.v-W[e-1].v.Lctn.v)*J.Mdpn.v/100)/4096,d-6-2,6,6)}if(J==g){F.fillStyle="#ffffff";
F.fillRect(_-H+x*(J.Lctn.v/4096)-2,d-2-y-2,2*H+4,y+4)}F.fillStyle="rgb("+A+","+A+","+A+")";F.fillRect(_-H+x*(J.Lctn.v/4096),d-2-y,2*H,y)}for(var e=0;
e<v.length;e++){var p=v[e].v,U=L[e];if((p==Q||v[e-1]&&v[e-1].v==Q||e==this.ts)&&e!=0){F.fillStyle="#000000";
F.fillRect(_-3+x*(v[e-1].v.Lctn.v+(p.Lctn.v-v[e-1].v.Lctn.v)*p.Mdpn.v/100)/4096,d+r+2,6,6)}if(p==Q){F.fillStyle="#ffffff";
F.fillRect(_-H+x*(p.Lctn.v/4096)-2,d+r+2-2,2*H+4,y+4)}F.fillStyle="rgb("+Math.round(U.Q)+", "+Math.round(U.l)+","+Math.round(U.O)+")";
F.fillRect(_-H+x*(p.Lctn.v/4096),d+r+2,2*H,y)}if(this.PM){this.OX(this.Vh);this.X_=!0}};dt.prototype.rO=function(){this.u_.F(Math.round(100*this.Vh.Intr.v/4096));
var n=this.Vh.Trns.v,F=this.Vh.Clrs.v,O=this.yn!=null,I=this.jD!=-1;this.c1.wz(O);this.ls.wz(O||I);this.H3.wz(O);
if(O){this.TA.setAttribute("style","");var x=this.yn.v;this.ls.F(Math.round(100*x.Lctn.v/4096));this.c1.F(x.Opct.v.val)}if(I)this.ls.F(n[this.jD].v.Mdpn.v);
var O=this.XE!=null,I=this.ts!=-1;this.TJ.wz(O);this.ml.wz(O);this.l4.wz(O||I);this.xw.wz(O);if(O){this.mF.setAttribute("style","");
var r=this.XE.v;this.l4.F(Math.round(100*r.Lctn.v/4096));var _=r.Type.v.Clry;this.TJ.F(["FrgC","BckC","UsrS"].indexOf(_));
if(_=="FrgC")this.ml.IU(this.in.nE);if(_=="BckC")this.ml.IU(this.in.sI);if(_=="UsrS")this.ml.F(r.Clr.v)}if(I)this.l4.F(F[this.ts].v.Mdpn.v)};
dt.prototype.rR=function(n){var F=Math.round(4096*this.u_.u()/100);this.Vh.Intr.v=F;var O=this.Vh.Trns.v,I=this.Vh.Clrs.v;
if(this.yn!=null){var x=this.yn.v;x.Lctn.v=Math.round(4096*(this.ls.u()/100));x.Opct.v.val=this.c1.u()}if(this.XE!=null){var r=this.XE.v;
r.Lctn.v=Math.round(4096*(this.l4.u()/100));if(n.target==this.ml)this.TJ.F(2);var _=this.TJ.u();r.Type.v.Clry=["FrgC","BckC","UsrS"][_];
if(_==2)r.Clr={t:"Objc",v:this.ml.u()};else if(r.Clr)delete r.Clr}if(this.jD!=-1)O[this.jD].v.Mdpn.v=this.ls.u();
if(this.ts!=-1)I[this.ts].v.Mdpn.v=this.l4.u();this.lx()};dt.prototype.Yl=function(n){var F=V.iJ(n,this._Y),O=(F.x*V.Z()-this.s8.x)/this.s8.d,I=(F.y*V.Z()-this.s8.y)/this.s8.v,x=this.Vh.Trns.v,r=this.Vh.Clrs.v,_=null,d=null,w=-1,Z=-1;
if(I<1)for(var e=0;e<x.length;e++){var P=x[e].v;if(Math.abs(P.Lctn.v/4096-O)<.02)_=x[e];if(e>0)if(Math.abs((x[e-1].v.Lctn.v+(P.Lctn.v-x[e-1].v.Lctn.v)*P.Mdpn.v/100)/4096-O)<.01)w=e}if(I>0)for(var e=0;
e<r.length;e++){var C=r[e].v;if(Math.abs(C.Lctn.v/4096-O)<.02)d=r[e];if(e>0)if(Math.abs((r[e-1].v.Lctn.v+(C.Lctn.v-r[e-1].v.Lctn.v)*C.Mdpn.v/100)/4096-O)<.01)Z=e}if(d==null&&_==null&&w==-1&&Z==-1){if(I<0){var P={t:"Objc",v:{classID:"TrnS",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Lctn:{t:"long",v:0},Mdpn:{t:"long",v:50}}};
P.v.Lctn.v=Math.round(O*4096);x.push(P);x.sort(this.NA);_=P}if(I>1){var r=this.Vh.Clrs.v,W=q.W.bQ(r,this.in.nE,this.in.sI),v=q.W.zL(this.Vh,W,O),C={t:"Objc",v:{classID:"Clrt",Clr:{t:"Objc",v:q.W.Vm({Q:v&255,l:v>>8&255,O:v>>16&255})},Type:{t:"enum",v:{Clry:"UsrS"}},Lctn:{t:"long",v:0},Mdpn:{t:"long",v:50}}};
C.v.Lctn.v=Math.round(O*4096);r.push(C);r.sort(this.NA);d=C}}if(d!=null)Z=-1;if(_!=null)w=-1;if(d!=null||_!=null||w>-1||Z>-1){this.yn=_;
this.XE=d;this.jD=w;this.ts=Z;this.rO();this.lx();V.MH(window,this.tk);V.Ry(window,this.Du)}};dt.prototype.Lw=function(n){var F=V.iJ(n,this._Y),O=V.Z()*(F.x-this.s8.x)/this.s8.d,I=V.Z()*(F.y-this.s8.y)/this.s8.v;
O=Math.max(0,Math.min(1,O));var x=this.Vh.Trns.v,r=this.Vh.Clrs.v;if(this.yn!=null){var _=this.yn.v;
_.Lctn.v=Math.round(4096*O);var d=x.indexOf(this.yn);if(d!=-1&&I<-1&&x.length>2)x.splice(d,1);if(d==-1&&I>-1)x.push(this.yn);
x.sort(this.NA)}if(this.XE!=null){var w=this.XE.v;w.Lctn.v=Math.round(4096*O);var Z=r.indexOf(this.XE);
if(Z!=-1&&I>1.5&&r.length>2)r.splice(Z,1);if(Z==-1&&I<1.5)r.push(this.XE);r.sort(this.NA)}if(this.jD>-1){var _=x[this.jD].v;
_.Mdpn.v=Math.max(5,Math.min(95,Math.round(100*(O*4096-x[this.jD-1].v.Lctn.v)/(_.Lctn.v-x[this.jD-1].v.Lctn.v))))}if(this.ts>-1){var w=r[this.ts].v;
w.Mdpn.v=Math.max(5,Math.min(95,Math.round(100*(O*4096-r[this.ts-1].v.Lctn.v)/(w.Lctn.v-r[this.ts-1].v.Lctn.v))))}if(this.yn!=null||this.XE!=null||this.jD>-1||this.ts>-1){this.rO();
this.lx()}};dt.prototype.KL=function(n){V.le(window,this.tk);V.re(window,this.Du);if(Date.now()-this.BI<300){if(this.ts!=-1||this.jD!=-1){var F=(this.ts!=-1?this.Vh.Clrs.v[this.ts]:this.Vh.Trns.v[this.jD]).v;
F.Mdpn.v=50;this.rO();this.lx()}else if(this.XE!=null)this.ml.a1h()}this.BI=Date.now()};dt.prototype.NA=function(n,F){return n.v.Lctn.v-F.v.Lctn.v};
function cc(){dL.call(this,[11,10],"isize");this.cA=V.w("div","form");this.cA.setAttribute("style","width:20em");
this.body.appendChild(this.cA);this.kM=new gE(!0,!0);this.cA.appendChild(this.kM._);this.Op=new cL("Resample");
this.Op.F(!0);this.cA.appendChild(this.Op._);this.Op.k(V.E.L,this.ai8,this);this.Wa=new bf([12,14,1],[[12,14,2],[12,14,3],"Bicubic Sharper"]);
this.Wa.F(1);this.cA.appendChild(this.Wa._);this.S0=new cg("OK",!0,null,!0);this.S0.k("click",this.$Y,this);
this.body.appendChild(this.S0._)}cc.prototype=new dL;cc.prototype.Tj=function(n,F){return n!=null};cc.prototype.A5=function(){return!0};
cc.prototype.ai8=function(n){var F=this.Op.u(),O=this.kM,I=this.Wa;if(F)I.hL();else I.gy();if(F)O.ak8();
else O.a9b()};cc.prototype.B=function(){dL.prototype.B.call(this);this.Wa.B();this.kM.B()};cc.prototype.$Y=function(n){this.close();
var F=this.kM.u(),O=F.x,I=F.y,x=this.Wa.u();if(!this.Op.u())x=null;var r=new k(V.E.JA,!0);r.data=c.jz.W7(O,I,this.kM.BL(),x);
this.A(r)};cc.prototype.hV=function(n,F){this.kM.F(new aE(n.d,n.v),n.gC)};function bC(){dL.call(this,"Import RAW","importraw");
var n=V.w("div","flexrow"),F=V.w("div");F.setAttribute("style","margin-bottom: 1em");this.body.appendChild(n);
this.body.appendChild(F);var O=V.w("div","form");O.setAttribute("style","width:18em");n.appendChild(O);
var I=V.w("div","form");I.setAttribute("style","width:15em");n.appendChild(I);this.Xv=null;this.acl=null;
this.v_=null;this.O3=null;this.agw=[];var x=[];for(var e=0;e<bC.kI.length;e++)x.push(bC.kI[e]+" Bits");
var r=this._F=[new gE(!0,null,null,!0),new cR([12,72],1,8),new cL("Last one is Transparency"),new hg([12,34],x),new hg("Byte Order",["12-34","34-12"]),new bf("Guesses",[])];
for(var e=0;e<r.length;e++){var _=r[e];_.parent=this;_.k(V.E.L,e==5?this.XR:this.Cb,this);var d=e==0?O:e==5?F:I;
d.appendChild(_._)}this.nd=V.w("canvas");this.Vo=this.nd.getContext("2d");this.body.appendChild(this.nd);
this.S0=new cg("OK",!0,null,!0);this.S0.k("click",this.$Y,this);this.body.appendChild(this.S0._)}bC.prototype=new dL;
bC.prototype.B=function(){dL.prototype.B.call(this);var n=this._F;for(var e=0;e<n.length;e++)n[e].B()};
bC.prototype.$Y=function(n){this.close();var F=this._F[0].u(),O=fx.iE(this.acl,[{data:this.v_,Kh:new gv(0,0,F.x,F.y)}]);
if(this.O3)O.TM=this.O3;var I=new k(V.E.P,!0);I.data={e:!0?V.U.ph:V.U.V$,KH:O};this.A(I)};bC.kI=[8,16];
bC.prototype.hV=function(n,F){this.Xv=new Uint8Array(F.G7);this.acl=F.fA;var O=this.Xv.length,I=[1,3,4],x=0,r=0,_=1,d=1,w=this.agw=[];
for(var Z=0;Z<3;Z++){for(var P=0;P<2;P++){var C=bC.kI[P],W=I[Z],v=W*C,L=Math.round(O*8/v);if(L!=O*8/v)continue;
for(var H=0;H<=4e3;H++)for(var y=0;y<=4e3;y++)if(H*y==L){var g=0;if(H==y)g+=64;if(Math.round(H/100)==H/100&&Math.round(y/100)==y/100)g+=32;
if(Math.round(H/10)==H/10&&Math.round(y/10)==y/10)g+=16;if(Math.round(H/2)==H/2&&Math.round(y/2)==y/2)g+=8;
w.push([H,y,W,C,g])}}}var Q=function(U,j){if(j[4]!=U[4])return j[4]-U[4];var b=Math.max(U[0],U[1])/Math.min(U[0],U[1]),s=Math.max(j[0],j[1])/Math.min(j[0],j[1]);
if(b!=s)return b-s;return j[0]-U[0]};w.sort(Q);var J=this._F,A=[];for(var e=0;e<w.length;e++){var p=w[e];
A.push(p[0]+" x "+p[1]+", "+p[2]+"ch, "+p[3]+"-bit")}J[5].SY(A);J[5].F(0);this.XR(null)};bC.prototype.XR=function(n){var F=this._F,O=this.agw[this._F[5].u()];
F[0].F(new aE(O[0],O[1]),72);F[1].F(O[2]);F[3].F(bC.kI.indexOf(O[3]));this.Cb()};bC.prototype.Cb=function(n){var F=this._F,O=F[0].u(),I=O.x,x=O.y,r=bC.kI[F[3].u()],_=this.Xv;
if(r==16&&F[4].u()==1){_=_.slice(0);for(var e=0;e<_.length;e+=2){var d=_[e];_[e]=_[e+1];_[e+1]=d}}var w=this.v_=this.bx(_,I,x,F[1].u(),r,F[2].u()),Z=this.nd,P=this.Vo,C=[w,new gv(0,0,I,x)];
q.zZ(C);for(var e=0;e<C.length;e+=2)if(C[e+1].v<300){w=C[e];I=C[e+1].d;x=C[e+1].v;break}Z.width=I;Z.height=x;
V.z0(Z,I,x);var W=new ImageData(new Uint8ClampedArray(w.buffer),I,x);P.putImageData(W,0,0)};bC.prototype.bx=function(n,F,O,I,x,r){this.O3=null;
var _=[],d=F*O;for(var w=0;w<I;w++){var Z=q.f(d);_.push(Z);if(x==8)for(var e=0;e<d;e++)Z[e]=n[e*I+w];
else if(x==16)for(var e=0;e<d;e++)Z[e]=n[(e*I+w)*2]}var P=q.f(d*4);new Uint32Array(P.buffer).fill(4278190080);
if(r){q.GF(_.pop(),P,3);I--}if(I==0){}else if(I==1)q.GN(_[0],P);else{q.GF(_[0],P,0);q.GF(_[1],P,1);if(I>2){q.GF(_[2],P,2);
if(I>3){this.O3=[];for(var e=3;e<I;e++){var C=new K.FZ;C.name="Alpha "+(e-2);C.rect=new gv(0,0,F,O);
C.channel=_[e];this.O3.push(C)}}}}return P};function dn(n,F,O){ch.call(this);this._=V.w("div","");this.Cs=n;
this.WB=null;this.Qc=F==null?!1:F;this.TB=null;this.rd=O;this.XA=[];this.O1=[];this.sv=[];this.ot=[];
this.UT=0;this.WB=this.an2(dn.ot[n]);this.Nf();this.VP=null;this.ad3;this.a1E}dn.prototype=new ch;dn.prototype.XS=function(n,F,O,I,x){this.VP=x;
this.ad3=JSON.parse(JSON.stringify(this.TB));if(this.WB.lagl)this.a1E=this.WB.lagl.u()};dn.prototype.RL=function(n,F,O,I,x){var r=this.VP,_=this.Cs,d=this.ad3;
if(r==null)return;var w=(x.x-r.x)/n.a.K,Z=(x.y-r.y)/n.a.K;if(_=="GrFl"){var P=JSON.parse(JSON.stringify(d.Ofst.v));
P.Hrzn.v.val+=w*.5;P.Vrtc.v.val+=Z*.5;this.WB.Ofst.F(P,!0)}if(_=="patternFill"){var P=JSON.parse(JSON.stringify(d.phase.v));
P.Hrzn.v+=w;P.Vrtc.v+=Z;this.WB.phase.F(P,!0)}if(_=="DrSh"||_=="IrSh"||_=="ChFX"){var C=d.Dstn.v.val,W=this.a1E.Wr*Math.PI/180,v=-Math.cos(W)*C+w,L=Math.sin(W)*C+Z;
this.WB.Dstn.F(Math.sqrt(v*v+L*L),!0);this.WB.lagl.F(Math.atan2(L,-v)*180/Math.PI,null,!0)}};dn.prototype._X=function(n,F,O,I,x){this.VP=null};
dn.prototype.a5n=function(){for(var e=0;e<this.ot.length;e++){V.aE(this.ot[e],"selected");if(this.sv[e]instanceof cL)this.sv[e].F(!1)}};
dn.prototype.a50=function(n){var F=this.a5S.bind(this);for(var e=0;e<this.sv.length;e++){var O=V.w("div","listitem");
this.ot.push(O);if(e>0)O.textContent="\u2003";O.appendChild(this.sv[e]._);if(bW.Ig.indexOf(this.Cs)!=-1){var I=new cg("+");
I.kc();I._.style.float="right";O.appendChild(I._);var x=new cg("\u2B0D");x.kc();x._.style.float="right";
x._.style["margin-right"]="2px";O.appendChild(x._)}O.addEventListener("click",F,!1);n.appendChild(O)}};
dn.Bx=function(n,F){var O=F.getBoundingClientRect();return(n.clientY-O.top)/O.height};dn.prototype.a5S=function(n){var F=n.target.tagName.toLowerCase();
if(F=="input"){return}if(F=="button"){var O=new k(V.E.S,!0),I=n.target.textContent=="+",x=I?0:dn.Bx(n,n.target)<.5?-1:1;
if(I)O.data={e:"st_dupsingle",$:this.parent.data.$,Fw:this.rd};else O.data={e:"st_movsingle",$:this.parent.data.$,Fw:this.rd,a3f:x};
O.T=c.UQ;O.uh=!0;this.A(O);O=new k("redrawall",!0);O.data={a3f:x};this.A(O);return}V.ou(n);this.N3();
this.UT=this.ot.indexOf(n.currentTarget);this.A(new k("showme"))};dn.prototype.N3=function(){if(this.WB.enab&&this.WB.enab.u()==!1)this.Fs({Kx:"enab",G:!0})};
dn.prototype.ag6=function(){var n=this.ot[this.UT];if(n)V.fx(n,"selected");return this.O1[this.UT]};
dn.prototype.an2=function(n){var F={};for(var e=0;e<n.length;e++){var O=n[e],I=null;if(O=="----")I={_:V.w("hr")};
if(O=="\n")I={_:V.w("br")};if(O=="blOptions")I=new gD([14,10]);if(O=="brst")I=new bo([12,72],["R","G","B"]);
if(O=="knko")I=new bf("Knockout",[[13,1,0],"Shallow","Deep"]);if(O=="enab")I=new cL(bW.names[bW.order.indexOf(this.Cs)]);
if(O=="lrMd"||O=="Md")I=new bf([12,19,0],fk.w9,!1,fk.uv);if(O=="Opct")I=new g0([12,0],0,100,"%");if(O=="iOpa")I=new g0([12,26],0,100,"%");
if(O=="blIf")I=new iY;if(O=="ShdN")I=new g0([12,68],0,100,"%");if(O=="lagl"||O=="Angl")I=new fS([12,15]);
if(O=="uglg")I=new cL([12,27]);if(O=="Dstn")I=new g0([12,28],0,200,"px");if(O=="Ckmt")I=new g0([12,29],0,100,"%");
if(O=="blur")I=new g0([12,14,0],0,200,"px");if(O=="TrnS"||O=="MpgS")I=new a_([12,21]);if(O=="Nose")I=new g0([12,30],0,100,"%");
if(O=="layerConceals")I=new cL([12,31]);if(O=="AntA"||O=="antialiasGloss")I=new cL("Anti-alias");if(O=="GlwT")I=new bf([12,32],bW.aQ.names);
if(O=="glwS")I=new bf([12,70],bW.aQ.a7Y);if(O=="Inpr")I=new g0([12,12],1,100,"%");if(O=="bvlS")I=new bf([12,22],bW.FN.style);
if(O=="bvlT")I=new bf([12,32],bW.FN.adM);if(O=="bvlD")I=new bf(null,bW.FN.dir);if(O=="srgR")I=new g0([12,34],0,1e3,"%");
if(O=="Sftn")I=new g0([12,35],0,20,"px");if(O=="Lald")I=F.lagl;if(O=="hglM"||O=="sdwM")I=new bf([12,36],fk.w9,!1,fk.uv);
if(O=="hglC"||O=="sdwC")I=new aR;if(O=="hglO"||O=="sdwO")I=new g0([12,0],0,100,"%");if(O=="Invr"||O=="InvT")I=new cL([4,11]);
if(O=="Sz")I=new g0([12,14,0],1,200,"px");if(O=="Styl")I=new bf([12,40],bW.stroke.names);if(O=="PntT")I=new bf([12,66],bW.stroke.aeq);
if(O=="Clr")I=new aR(!0);if(O=="Grad"){I=new aC(!0,[12,37],!0);I.F(JSON.parse(bW.Pg.mC).v)}if(O=="Rvrs")I=new cL([12,23,0]);
if(O=="Dthr")I=new cL("Dither");if(O=="Type")I=new bf([12,22],bW.W.names.slice(0,this.Cs=="FrFX"?6:5));
if(O=="Ptrn")I=new iG([12,62]);if(O=="Scl")I=new g0([12,38],10,500,"%",0,!0);if(O=="Algn")I=new cL([12,39]);
if(O=="Ofst")I=new aX(!0);if(O=="phase")I=new aX(!1);if(O=="useShape")I=new cL([12,21]);if(O=="useTexture")I=new cL([12,67]);
if(O=="textureDepth")I=new g0([12,34],-300,300,"%");var x=O=="----"||O=="\n"?O+e:O;if(I!=null)F[x]=I}return F};
dn.prototype.a8a=function(n){var F=this.O1[this.UT];for(var e=0;e<n.length;e++){var O=this.WB[n[e]];
if(O&&F.contains(O._))F.removeChild(O._)}};dn.prototype.ajS=function(n){var F=this.O1[this.UT];for(var e=0;
e<n.length;e++){var O=this.WB[n[e]];if(O&&!F.contains(O._))F.appendChild(O._)}};dn.prototype.XW=function(n,F){if(this.WB==null)return;
var O=F==cf.fo;if(this.WB.Grad){this.WB.Grad.vI(n.nE,n.sI);if(O||F==cf.dM||F==cf.f3)this.WB.Grad.TU(n.Jx)}if(this.WB.Ptrn){if(O||F==cf.xf)this.WB.Ptrn.TU(n.a6)}if(this.WB.TrnS){if(O||F==cf.Mt)this.WB.TrnS.TU(n.gL)}if(this.WB.MpgS){if(O||F==cf.Mt)this.WB.MpgS.TU(n.gL)}};
dn.prototype.B=function(){for(var e=0;e<this.XA.length;e++)this.XA[e].B();for(var n in this.WB)if(this.WB[n]instanceof ch)this.WB[n].B()};
dn.prototype.Nf=function(){for(var n in this.WB){var F=this.WB[n];F.parent=this;if(F instanceof ch)F.k(V.E.L,this.a7k,this);
if(this.O1.length==0||n=="useShape"||n=="useTexture"){var O=new gD(F.XK()),I=V.w("div","bordered padded");
if(this.Qc==!1){I.appendChild(O._);I.appendChild(V.w("hr",""))}this.XA.push(O);this.O1.push(I);this.sv.push(F)}else this.O1[this.O1.length-1].appendChild(F._)}};
dn.prototype.update=function(n,F){if(this.WB==null)return;this.TB=JSON.parse(JSON.stringify(F));for(var O in F){if("Opct iOpa hglO sdwO Dstn Ckmt blur Nose Scl Sz Inpr Angl srgR Sftn textureDepth ShdN".split(" ").indexOf(O)!=-1)this.WB[O].F(F[O].v.val);
if("enab brst knko Clr hglC sdwC uglg Grad TrnS MpgS Rvrs Dthr Algn Invr InvT Ptrn layerConceals useShape useTexture Ofst phase blIf".split(" ").indexOf(O)!=-1){this.WB[O].F(F[O].v,n)}if(["Md","hglM","sdwM"].indexOf(O)!=-1)this.WB[O].F(fk.Cs.indexOf(F[O].v.BlnM));
if(O=="lrMd"){var I=(F.Ja?[[15,10,27]]:[]).concat(fk.w9),x=(F.Ja?[1]:[]).concat(fk.uv);this.WB[O].SY(I,x);
this.WB[O].F(F[O].v)}if(O=="lagl"){var r=F.uglg&&F.uglg.v?n.ai():F.lagl.v.val;this.WB[O].F(r)}if(O=="Lald"){var r=F.uglg&&F.uglg.v?n.BG():F.Lald.v.val;
this.WB[O].F(null,r)}if(O=="Type")this.WB[O].F(bW.W.types.indexOf(F.Type.v.GrdT));if(O=="Styl")this.WB[O].F(bW.stroke.types.indexOf(F.Styl.v.FStl));
if(O=="PntT"){var _=bW.stroke.Ne.indexOf(F.PntT.v.FrFl);this.WB[O].F(_);if(!this.Qc){this.a8a(bW.ez.concat(bW.KK.concat(bW.dC)));
this.ajS([bW.ez,bW.KK,bW.dC][_])}}if(O=="GlwT")this.WB[O].F(bW.aQ.types.indexOf(F.GlwT.v.BETE));if(O=="glwS")this.WB[O].F(bW.aQ.aK.indexOf(F.glwS.v.IGSr));
if(O=="bvlS")this.WB[O].F(bW.FN.types.indexOf(F.bvlS.v.BESl));if(O=="bvlT")this.WB[O].F(bW.FN.k4.indexOf(F.bvlT.v.bvlT));
if(O=="bvlD")this.WB[O].F(["In","Out"].indexOf(F.bvlD.v.BESs))}};dn.prototype.a7k=function(n){for(var F in this.WB){if(this.WB[F]!=n.target)continue;
var O=null,I=!1;if("Opct iOpa hglO Nose Scl sdwO Inpr srgR textureDepth ShdN".split(" ").indexOf(F)!=-1)O={type:"#Prc",val:n.target.u()};
if(["Dstn","Ckmt","blur","Sz","Sftn"].indexOf(F)!=-1)O={type:"#Pxl",val:n.target.u()};if(["Angl","lagl"].indexOf(F)!=-1)O={type:"#Ang",val:n.target.u().Wr};
if("enab brst knko Clr hglC sdwC Grad TrnS MpgS Rvrs Dthr Algn Invr InvT Ptrn layerConceals lrMd useShape useTexture AntA antialiasGloss Ofst phase blIf".split(" ").indexOf(F)!=-1)O=n.target.u();
if(["Md","hglM","sdwM"].indexOf(F)!=-1)O={BlnM:fk.Cs[n.target.u()]};if(F=="uglg"){O=n.target.u();I=!0}if(F=="PntT"){O={FrFl:bW.stroke.Ne[n.target.u()]};
I=!0}if(F=="Lald")O={type:"#Ang",val:n.target.u().alt};if(F=="Type")O={GrdT:bW.W.types[n.target.u()]};
if(F=="Styl")O={FStl:bW.stroke.types[n.target.u()]};if(F=="GlwT")O={BETE:bW.aQ.types[n.target.u()]};
if(F=="glwS")O={IGSr:bW.aQ.aK[n.target.u()]};if(F=="bvlS")O={BESl:bW.FN.types[n.target.u()]};if(F=="bvlT")O={bvlT:bW.FN.k4[n.target.u()]};
if(F=="bvlD")O={BESs:["In","Out"][n.target.u()]};this.Fs({Kx:F,G:O});if(I){if(this.Qc)this.update(null,this.TB);
else{var x=this.parent,r=x.KH,_=this.rd,d=r.t[x.data.$].add.lmfx[bW.jV[_[0]]].v[_[1]].v;this.update(r,d)}}}};
dn.prototype.Fs=function(n){if(this.TB&&this.TB[n.Kx])this.TB[n.Kx].v=n.G;if(this.Qc){this.A(new k(V.E.L))}else{n.e="changeprop";
n.$=this.parent.data.$;n.FI=this.rd;var F=new k(V.E.S,!0);F.data=n;F.T=c.UQ;F.uh=!0;this.A(F);this.A(new k("afterchange",!0))}};
dn.prototype.u=function(){return JSON.parse(JSON.stringify(this.TB))};dn.ot={bops:"blOptions lrMd Opct ---- iOpa brst ---- blIf".split(" "),DrSh:"enab Md Clr Opct lagl uglg Dstn Ckmt blur TrnS Nose layerConceals".split(" "),IrSh:"enab Md Clr Opct lagl uglg Dstn Ckmt blur TrnS Nose".split(" "),OrGl:["enab","Md","Opct","Nose","\n","Clr","Grad","----","GlwT","Ckmt","blur","TrnS","Inpr","ShdN"],IrGl:["enab","Md","Opct","Nose","\n","Clr","Grad","----","GlwT","glwS","Ckmt","blur","TrnS","Inpr","ShdN"],ebbl:["enab","bvlS","bvlT","bvlD","srgR","blur","Sftn","----","lagl","Lald","uglg","TrnS","\n","hglM","hglC","hglO","sdwM","sdwC","sdwO","useShape","MpgS","Inpr","useTexture","Ptrn","Scl","textureDepth","InvT","Algn","phase"],SoFi:["enab","Md","Opct"].concat(bW.ez),GrFl:["enab","Md","Opct"].concat(bW.KK),patternFill:["enab","Md","Opct"].concat(bW.dC),ChFX:"enab Md Clr Opct lagl Dstn blur MpgS Invr".split(" "),FrFX:["enab","Sz","Styl","\n","Md","Opct","PntT","\n"].concat(bW.ez.concat(bW.KK.concat(bW.dC)))};
function cU(){dL.call(this,[11,6],"layerstyle");this.amt=-1;this.data={};this.KH=null;this.GL=null;this.MG=[];
this.K4=[];V.fx(this.body,"flexrow");this.Wf=V.w("div","bordered");this.Wf.setAttribute("style","min-width:13em;");
this.body.appendChild(this.Wf);this.Vk=V.w("div","");this.Vk.setAttribute("style","width:25em; padding-left: 1em;");
this.body.appendChild(this.Vk);this.VA=V.w("div","form");this.VA.setAttribute("style","padding-left: 1em; width:7em;");
this.body.appendChild(this.VA);this.lF=new cg("OK",!0,null,!0);this.lF.k("click",this.$Y,this);this.VA.appendChild(this.lF._);
this.IX=new cg([12,87],!0,null,!0);this.IX.k("click",this.aou,this);this.VA.appendChild(this.IX._);this.MI=new cB;
this.MI.parent=this;this.MI.k(V.E.L,this.abj,this);this.VA.appendChild(this.MI._);this.k("closebtn",this.Ui,this);
this.k("redrawall",this.Df,this)}cU.prototype=new dL;cU.prototype.A5=function(){return!0};cU.prototype.ZB=function(){return!0};
cU.prototype.XS=function(n,F,O,I,x){var r=this._i();if(r)r.XS(n,F,O,I,x)};cU.prototype.RL=function(n,F,O,I,x){var r=this._i();
if(r)r.RL(n,F,O,I,x)};cU.prototype._X=function(n,F,O,I,x){var r=this._i();if(r)r._X(n,F,O,I,x)};cU.prototype._i=function(n){if(n==null)n=this.data.index;
return n==null?null:n==0?this.MG[0]:this.K4[n[0]][n[1]]};cU.prototype.abj=function(n){var F=this.MI.u();
this.Fs({e:"setstl",G:F.fg});this.Df(null)};cU.prototype.aou=function(n){var F=this.KH,O=this.data.$;
if(O==null)O=F.C[0];var I=this.KH.t[O],x=ha._H(I),r=new k(V.E.P,!0);r.data={e:V.U.g7,ve:"add",b9:cf.pX,pb:[JSON.parse(JSON.stringify(x))]};
this.A(r)};cU.prototype.adT=function(n){this.data.index=n.currentTarget.rd;this.zr(n.currentTarget.rd)};
cU.prototype.Df=function(n){this.hV(this.KH,this.data)};cU.prototype.zr=function(n,F){V.em(this.Vk);
for(var e=0;e<this.MG.length;e++)this.MG[e].a5n();var O=this._i(n);this.Vk.appendChild(O.ag6());if(F)O.N3();
var I=this.KH;if(I){var x=I.t[this.data.$];this.MG[0].update(I,ci.P7.NY(I,x));var r=x.add.lmfx;if(r==null)return;
for(var e=0;e<bW.order.length;e++){var _=r[bW.jV[e]].v;for(var d=0;d<_.length;d++)this.K4[e][d].update(I,_[d].v)}}if(F)O.N3()};
cU.prototype.B=function(){dL.prototype.B.call(this);this.IX.B();this.MI.B();for(var e=0;e<this.MG.length;
e++)this.MG[e].B()};cU.prototype.hV=function(n,F){var O=F.$==null;this.data.$=F.$;this.data.index=F.index;
F=this.data;this.KH=n;if(O)F.$=n.C.length==0?n.t.length-1:n.C[0];V.em(this.Wf);var I=n.t[F.$].add.lmfx;
this.uQ();this.MG=[new dn("bops",!1,0)];this.K4=[];for(var e=0;e<bW.order.length;e++){this.K4.push([]);
var x=I==null?[]:I[bW.jV[e]].v;for(var r=0;r<x.length;r++){var _=new dn(bW.order[e],!1,[e,r]);this.MG.push(_);
this.K4[e].push(_)}if(x.length==0){var _=new dn(bW.order[e],!1,[e,0]);this.MG.push(_);this.K4[e].push(_)}}this.B();
this.gt(this.GL,cf.fo);for(var e=0;e<this.MG.length;e++){this.MG[e].parent=this;this.MG[e].a50(this.Wf);
this.MG[e].k("showme",this.adT,this)}if(F.index==null||F.index==0||!O&&I[bW.jV[F.index[0]]].v.length==0){this.zr(0)}else this.zr(F.index,O);
this.k("afterchange",this.uQ,this)};cU.prototype.uQ=function(n){var F=this.KH,O=this.data.$;if(O==null)O=F.C[0];
var I=this.KH.t[O],x=ha._H(I);this.MI.F(x,F.add.Patt?F.add.Patt:[],F.ai(),F.BG())};cU.prototype.XW=function(n,F){this.GL=n;
this.gt(n,F);if(F==cf.pX||F==cf.fo){this.MI.TU([n.d8,n.a6])}if(F==cf.Z5){}};cU.prototype.gt=function(n,F){for(var e=0;
e<this.MG.length;e++)this.MG[e].XW(n,F)};cU.prototype.Ui=function(n){this.Fs({e:"cancel"})};cU.prototype.$Y=function(n){this.Fs({e:"confirm"});
this.close()};cU.prototype.Fs=function(n){n.$=this.data.$;var F=new k(V.E.S,!0);F.data=n;F.T=c.UQ;F.uh=!0;
this.A(F);this.uQ()};cU.um=function(n){var F=[{name:[14,10],dP:!0}];for(var e=0;e<bW.names.length;e++)F.push({name:bW.names[e]});
if(n){F[F.length-1].dP=!0;F.push({name:"Scale Effects",h:function(O){return{h:O!=null&&O.C.length!=0&&O.t[O.C[0]].NN()}}});
F.push({name:["VAR0 VAR1",[12,49],[9,1]],h:function(O){return{h:O!=null&&O.C.length!=0&&O.t[O.C[0]].add.lmfx!=null}}})}return F};
cU.Gy=function(n){var F=[{g:V.E.P,i:{e:V.U.n$,cU:"layerstyle"}}];for(var e=0;e<bW.names.length;e++)F.push({g:V.E.P,i:{e:V.U.n$,cU:"layerstyle",index:[e,0]}});
if(n){F.push({g:V.E.P,i:{e:V.U.n$,cU:"scaleeffects",ZN:100,Xp:{g:V.E.S,T:c.UQ,i:{e:"scaleeffects"}}}});
var O={classID:"Mk",null:aV.hd("Lyr"),Usng:{t:"obj ",v:[{t:"prop",v:{classID:"Prpr",keyID:"Lefx"}},{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Trgt"}}]}};
F.push({g:V.E.JA,i:{oI:"make",Mk:O}})}return F};cU.i0=function(n){var F=[];if(n)F.push({name:[6,48,0,0],RO:!0},{name:[6,48,0,1],RO:!0},{name:[6,48,0,2],RO:!0,dP:!0});
for(var O in dK.names)F.push({name:dK.names[O],dP:dK.jw.indexOf(O)!=-1,RO:B[O]!=null});return F};cU.II=function(n){var F=[];
if(n){F.push({g:V.E.S,T:c.tq,i:{e:"newfill",j5:0}});for(var e=1;e<3;e++)F.push({g:V.E.JA,i:c.vb.Lz(e)})}for(var O in dK.names){var I=bS.tc(O);
if(I==null)I={};for(var x in dK.BC)if(dK.BC[x]==O)I.classID=x;var r={oI:"make",Mk:{classID:"Mk",null:aV.hd("AdjL"),Usng:{t:"Objc",v:{classID:"AdjL",Type:{t:"Objc",v:I}}}}};
F.push({g:V.E.JA,i:r})}return F};function eN(){dL.call(this,"Merge Channels","mergechannels");this.zd=null;
var n=V.w("div","form");this.body.appendChild(n);this._F=[];for(var e=0;e<3;e++){var F=new bf(dK.fd[e],[]);
this._F.push(F);n.appendChild(F._);V.Zq(n)}this.lF=new cg("OK",!0,null,!0);this.lF.k("click",this.$Y,this);
n.appendChild(this.lF._)}eN.prototype=new dL;eN.prototype.B=function(){dL.prototype.B.call(this);for(var e=0;
e<3;e++)this._F[e].B()};eN.prototype.hV=function(n,F,O,I){this.zd=O;var x=[];for(var e=0;e<O.length;
e++)x.push(O[e].name);for(var e=0;e<3;e++){var r=this._F[e];r.SY(x);r.F(Math.min(e,O.length-1))}};eN.prototype.$Y=function(n){var F=this.zd,O=F[0],I=new k(V.E.JA,!0);
I.data=fj.aS(O.d,O.v,O.gC,"Merged Document","Wht");this.A(I);var x=[];for(var e=0;e<3;e++)x.push(F[this._F[e].u()].dH());
var O=F[F.length-1],r=O.t[0],_=r.buffer;for(var e=0;e<_.length;e+=4){_[e]=x[0][e];_[e+1]=x[1][e];_[e+2]=x[2][e]}r.D();
O.D();this.close()};function eZ(){dL.call(this,[1,10],"script");var n=V.w("div","form");n.setAttribute("style","width:44em");
this.body.appendChild(n);this.GL=null;this.mb=[];this.dy=[];this.aeA;var F=this.ip=new cg([1,2],!1,null,!0);
F.k("click",this.O4,this);n.appendChild(F._);var O=new cg("JS Reference",!1,null,!0);O.k("click",this.a08,this);
n.appendChild(O._);n.appendChild(new gD("Demos:")._);this.ajn=[];var I=eZ.sA;for(var e=0;e<I.length;
e++){var x=new cg(I[e].Gm,!1,null,!0);this.ajn.push(x);n.appendChild(x._);x.k("click",this.a1D,this)}this.iS=V.w("textarea");
this.iS.setAttribute("rows",16);this.iS.setAttribute("style","display:block;tab-size:4; font-family:monospace;width:100%;");
n.appendChild(this.iS);var r=new cg("Run",!0,null,!0);r.k("click",this.$Y,this);n.appendChild(r._);this.a0b=V.w("div");
n.appendChild(this.a0b)}eZ.prototype=new dL;eZ.prototype.B=function(){this.ip.B()};eZ.prototype.O4=function(){var n=this.aeA;
if(n==null)n="script.jsx";var F=new k(V.E.P,!0);F.data={e:V.U.n$,cU:"namewindow",ZN:n.slice(0,n.length-4),xq:this.anZ.bind(this)};
this.A(F)};eZ.prototype.anZ=function(n){var F=this.iS.value,O=Y.$s(F),I=new k(V.E.P,!0);I.data={e:V.U.zW,G7:O.buffer,Bz:n+".jsx",ad7:!0};
this.A(I)};eZ.prototype.a8d=function(n){var e=this.mb.indexOf(n.target),F=this.aeA=this.dy[e],O=this.GL.UH.Lb[F],I=new Uint8Array(O),x=Y.l5(I,0,I.length);
this.iS.value=x};eZ.prototype.hV=function(n,F,O){this.iS.value=eZ.sA[0].XF;this.OV()};eZ.prototype.OV=function(){var n=this.GL.UH,F=this.a0b;
V.em(F);this.mb=[];this.dy=[];F.textContent="Saved scripts: ";for(var O in n.Lb){if(O.endsWith(".jsx")){var I=new cg(O,!1,null,!0);
this.mb.push(I);this.dy.push(O);I.k("click",this.a8d,this);F.appendChild(I._)}}};eZ.prototype.XW=function(n,F){this.GL=n;
if(F==cf.Bb)this.OV()};eZ.prototype.a08=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.mR,link:"https://www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-cc-javascript-ref-2019.pdf"};
this.A(F)};eZ.prototype.$Y=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.lJ,fi:this.iS.value};this.A(F)};
eZ.prototype.a1D=function(n){var F=this.ajn.indexOf(n.currentTarget);this.iS.value=eZ.sA[F].XF};eZ.sA=[{Gm:"Hello",XF:"\nalert(\"Hello Photopea!\");\n"},{Gm:"Process Layers",XF:"\nvar lays = app.activeDocument.layers;\n\nfor(var i=0; i<lays.length; i++)\n{\n"+"\t//lays[i].visible = false;\n"+"\t//lays[i].opacity = 50;\n"+"\tlays[i].name = \"My Layer \"+i;\n}"},{Gm:"Clone Layers",XF:"\nvar orig = app.activeDocument.activeLayer;\n"+"var cnt = 12;\n"+"var angle = Math.floor(360 / cnt);\n"+"\n"+"for(var i=1; i<cnt; i++)\n"+"{\n"+"\tvar nlay = orig.duplicate();\n"+"\t//nlay.translate(30*i, 20*i);\n"+"\tnlay.rotate(angle * i, AnchorPosition.BOTTOMCENTER);\n"+"}"}];
function dv(){dL.call(this,[11,7],"newproject");this.data=null;this.zd=null;var n=V.w("div","flexrow");
this.iT=n;this.body.appendChild(n);var F=V.w("div","form");this.cA=F;n.appendChild(F);this.Db=new fq([12,48]);
F.appendChild(this.Db._);V.Zq(F);this.kM=new gE(!0);this.kM.F(new aE(1280,720),72);this.kM.k(V.E.L,this.bj,this);
F.appendChild(this.kM._);this.$y=new bf([12,46],[[13,1,8],[13,1,9],[12,46]]);F.appendChild(this.$y._);
F.appendChild(V.w("hr"));this.S0=new cg([12,49],!0,null,!0);this.S0.k("click",this.$Y,this);F.appendChild(this.S0._);
var O=dv.Xv,I=[];for(var e=0;e<O.length;e++)I.push(O[e].name);this._z=new hg(null,I);this._z.k(V.E.L,this.Pl,this);
F.appendChild(this._z._);this._z._.style["margin-top"]="1em";this.br=new iX(!0);this.br.k(V.E.L,this.a8o,this);
F.appendChild(this.br._);this.Pl();this.CJ=new fg;this.CJ.parent=this;this.CJ._.setAttribute("style","margin-left:1em");
this.CJ.k("tempready",this.aen,this)}dv.prototype=new dL;dv.prototype.XW=function(n,F){this.CJ.XW(n)};
dv.prototype.xu=function(n,F){return new aE(Math.max(0,Math.min(70,(n-690)/2)),n>F?Math.max(0,Math.min(50,(F-400)/2)):0)};
dv.prototype.Kq=function(n,F){this.cA.setAttribute("style","width:"+Math.min(n,338)+"px");this.br._.style.height=F-260+"px";
var O=this.CJ._,I=O.parentNode;if(n<500){if(I!=null)this.iT.removeChild(O)}else{if(I==null)this.iT.appendChild(O)}this.CJ.Kq(n-360,F-35)};
dv.prototype.bj=function(){this.CJ.F(this.kM.u())};dv.prototype.a8o=function(n){var F=this.br.u(),O=dv.Xv[this._z.u()].i$[F],I=O[4];
if(I==0)I=72;var x=O[1],r=O[2],_=["px","%","mm","in"].indexOf(O[3]),d=[1,1,25.4/I,1/I][_];x/=d;r/=d;
this.kM.F(new aE(Math.round(x),Math.round(r)),I);this.kM.amG(_);this.br.Iv(F);this.bj()};dv.prototype.Pl=function(n){var F=dv.Xv[this._z.u()].i$,O=[],I=[],x=Math.round(106*V.Z()),r=Math.round(106*V.Z()),_=0;
for(var e=0;e<F.length;e++)_=Math.max(_,F[e][1],F[e][2]);for(var e=0;e<F.length;e++){var d=F[e],w=d[1]+" x "+d[2]+" "+d[3];
if(d[3]=="in")w=(d[1]*25.4).toFixed(0)+" x "+(d[2]*25.4).toFixed(0)+" mm";if(d[3]=="mm")w=(d[1]/25.4).toFixed(1)+" x "+(d[2]/25.4).toFixed(1)+" in";
if(d[4])w=w+" @ "+d[4]+" ppi";I.push(w);O.push(dv.JC(d,x,r,_))}this.br.Ea(O,I,x,r)};dv.JC=function(n,F,O,I){var x=V.w("canvas",""),r=x.getContext("2d");
x.width=F;x.height=O;var _=Math.round(F/8),d=Math.floor(11*V.Z()),w=n[1],Z=n[2];r.fillStyle="#000000";
r.font=Math.round(d*.9)+"px \"Open Sans\", Sans-Serif";var P=w+" x "+Z+" "+n[3],C=r.measureText(P);r.fillText(P,Math.round((F-C.width)/2),O-Math.round(_/2));
if(n[0]!=null){r.font="bold "+d+"px \"Open Sans\", Sans-Serif";var P=n[0],C=r.measureText(P);r.fillText(P,Math.round((F-C.width)/2),O-Math.round(_/2)-Math.round(d*1.3))}O-=Math.round(2.5*d);
var W=Math.min((F-_)/w,(O-_)/Z);W*=.5+.5*(Math.max(w,Z)/I);var v=(F-w*W)/2,L=(O-Z*W)/2;r.strokeRect(Math.round(v)+.5,Math.round(L)+.5,Math.round(w*W),Math.round(Z*W));
return x.toDataURL()};dv.prototype.B=function(){dL.prototype.B.call(this);this.kM.B();this.Db.B();this.$y.B();
this.S0.B();this.Db.F(hl.get([11,7]));this._z.B();this.CJ.B()};dv.prototype.$Y=function(n){var F=this.kM.u(),O=F.x,I=F.y;
this.close();var x=new k(V.E.JA,!0);x.data=fj.aS(O,I,this.kM.BL(),this.Db.u(),["Wht","Trns","BckC"][this.$y.u()]);
this.A(x);this.w_()};dv.prototype.aen=function(n){var F=n.data.KH;F.gC=this.kM.BL();var O=new k(V.E.P,!0);
O.data={e:V.U.ph,KH:F};this.A(O);this.close();this.w_()};dv.prototype.w_=function(){var n=this.zd[this.zd.length-1],F=this.data.a3U;
if(F)i6.v0(function(){var O=new XMLHttpRequest,I="https://www.googleapis.com/drive/v3/files?"+i6.LZ();
O.open("POST",I,!0);O.setRequestHeader("Content-Type","application/json");O.addEventListener("load",function(x){var r=JSON.parse(x.target.response);
n.Hk={file:r,zl:"psd"};alert(n.name+" created in Google Drive")});O.send(JSON.stringify({name:n.name,a2I:[F]}))})};
dv.prototype.hV=function(n,F,O,I){this.zd=O;if(n!=null&&n.N!=null){var x=new gv(0,0,n.d,n.v).lN(n.N.rect);
this.kM.F(new aE(x.d,x.v))}this.data=F;this.bj();this.Db.xC();if(V.Yo())bm.acU(this.a6v.bind(this))};
dv.prototype.a6v=function(n){if(n=="granted")bm.bS(this,this.aj4.bind(this))};dv.prototype.aj4=function(n,F){this.kM.F(new aE(F.d,F.v))};
dv.Xv=[{name:"Social",i$:[["FB Page Cover",1640,664,"px",0],["FB Shared Image",1200,630,"px",0],["FB Event Image",1920,1080,"px",0],["FB Group Header",1640,856,"px",0],["Instagram",1080,1080,"px",0],["Insta Story",1080,1920,"px",0],["Youtube Profile",800,800,"px",0],["Youtube Cover",2560,1440,"px",0],["Twitter Profile",400,400,"px",0],["Twitter Header",1500,500,"px",0]]},{name:[12,88,4],i$:[["A3",297,420,"mm",300],["A4",210,297,"mm",300],["A5",148,210,"mm",300],["B3",353,500,"mm",300],["B4",250,353,"mm",300],["B5",176,250,"mm",300],["Letter",8.5,11,"in",300],["Ledger",11,17,"in",300],["Business Card",3.5,2,"in",300]]},{name:[12,88,0],i$:[["Wallet",2,3,"in",300],["Enprint",3.5,5,"in",300],[null,5,7,"in",300],[null,8,12,"in",300],[null,12,18,"in",300],[null,16,24,"in",300],[null,20,30,"in",300],[null,24,36,"in",300]]},{name:[12,88,1],i$:[["VGA",640,480,"px",0],["XGA",1024,768,"px",0],["HD",1280,720,"px",0],[null,1366,768,"px",0],[null,1600,900,"px",0],["Full HD",1920,1080,"px",0],["2K",2048,1080,"px",0],["UHD",3840,2160,"px",0],["4K",4096,2160,"px",0]]},{name:[12,88,2],i$:[["iPhone 4",640,900,"px",326],["iPhone 5",640,1136,"px",326],["iPhone 6 7 8",750,1334,"px",326],["iPhone 6+ 7+ 8+",1080,1920,"px",401],["iPhone X",1125,2436,"px",458],["Samsung A5",720,1280,"px",0],["Samsung S5",1080,1920,"px",0],["Samsung S6",1440,2560,"px",0],["Samsung S8+",1440,2560,"px",0],["Google Pixel",1080,1920,"px",0],["iPad Mini 4",1536,2048,"px",0],["iPad Air 2",1536,2048,"px",0],["iPad Pro 9.7\"",1536,2048,"px",0],["iPad Pro 10.5\"",1668,2224,"px",0],["iPad Pro 12.9\"",2048,2732,"px",0]]},{name:[12,88,3],i$:[["Small Square",200,200,"px",0],["Square",250,250,"px",0],["Medium Rect",300,250,"px",0],["Large Rect",336,280,"px",0],["Mobile Leaderboard",320,50,"px",0],["Large Mobile",320,100,"px",0],["Banner",468,60,"px",0],["Leaderboard",728,90,"px",0],["Large Leaderboard",970,90,"px",0],["Billboard",970,250,"px",0],["Vertical Rect",240,400,"px",0],["Skyscraper",120,600,"px",0],["Wide Skyscraper",160,600,"px",0],["Half Page",300,600,"px",0],["Portrait",300,1050,"px",0]]},{name:"2\u1D3A",i$:[[null,16,16,"px",0],[null,32,32,"px",0],[null,64,64,"px",0],[null,128,128,"px",0],[null,256,256,"px",0],[null,512,512,"px",0],[null,1024,1024,"px",0],[null,2048,2048,"px",0],[null,4096,4096,"px",0]]}];
function er(n,F,O){dL.call(this,F,"sel_"+n);this.e=n;var I=V.w("div","form");this.body.appendChild(I);
this.Db=new cR(F,0,255,null,0,!1,!0);I.appendChild(this.Db._);this.Db.F(1);var x=V.w("span");x.textContent=O;
I.appendChild(x);V.Zq(I);this.a5H=new cL("Apply at canvas bounds");if(n!="border")I.appendChild(this.a5H._);
this.lF=new cg("OK",!0,null,!0);this.lF.k("click",this.$Y,this);I.appendChild(this.lF._)}er.prototype=new dL;
er.prototype.Tj=function(n,F){if(n==null)return;if(n.N==null)alert("No selection!");return n.N!=null};
er.prototype.$Y=function(n){var F=new k(V.E.JA,!0);F.data=c.pQ.agT(this.e,this.Db.u(),this.a5H.u());
F.uh=!0;this.A(F);this.close()};er.prototype.B=function(){dL.prototype.B.call(this);if(this.Db)this.Db.B()};
er.prototype.hV=function(n,F){};function gc(n,F,O,I,x){dL.call(this,O,F);this.PM=x;this.Xv=null;this.cA=V.w("div","form");
this.body.appendChild(this.cA);this.Db=n==0?new fq(O):new g0(O,0,500,I,1);this.Db.k(V.E.L,this.pz,this);
this.cA.appendChild(this.Db._);this.lF=new cg("OK",!0,null,!0);this.lF.k("click",this.$Y,this);this.cA.appendChild(this.lF._);
this.k("closebtn",this.Ui,this)}gc.prototype=new dL;gc.prototype.A5=function(){return!0};gc.prototype.pz=function(n){var F=this.Db.u();
if(this.PM)this.QK(F)};gc.prototype.Ui=function(n){if(this.PM)this.QK("cancel")};gc.prototype.$Y=function(n){if(this.PM)this.QK("confirm");
else this.QK(this.Db.u());this.close()};gc.prototype.QK=function(n){if(this.Xv.xq)this.Xv.xq(n);else if(this.Xv.Xp){var F=this.Xv.Xp,O=new k(F.g,!0);
O.T=F.T;O.data=F.i;O.data.G=n;O.uh=!0;this.A(O)}};gc.prototype.B=function(){dL.prototype.B.call(this);
if(this.Db)this.Db.B()};gc.prototype.hV=function(n,F){this.Xv=F;this.Db.F(F.ZN);this.Db.xC();this.pz(null)};
function dw(){dL.call(this,[1,5],"open_from_url");this.qy=null;var n=V.w("div","form");this.body.appendChild(n);
this.cc=new fq("URL",null,22);n.appendChild(this.cc._);V.Zq(n);this.gk=new hg([21,0],[[21,2],[21,1]]);
n.appendChild(this.gk._);this.S0=new cg("OK",!0,null,!0);this.S0.k("click",this.$Y,this);n.appendChild(this.S0._)}dw.prototype=new dL;
dw.prototype.B=function(){dL.prototype.B.call(this);this.gk.B()};dw.prototype.hV=function(n,F,O){this.cc.xC();
this.qy=null;if(n&&O.indexOf(n)!=-1)this.qy=O.indexOf(n)};dw.prototype.$Y=function(n){var F=new k(V.E.P,!0),O=this.cc.u();
F.data={e:V.U.Fb,b9:{url:O,FP:!0,qy:this.gk.u()==1?this.qy:null}};this.A(F);this.close()};function bM(){dL.call(this,[12,79],"preferences");
this.GL=null;var n=V.w("div","form");this.body.appendChild(n);this.ot=[new cL([8,2]),new cL([8,4]),new bf([12,80,3],[[12,93,3],[12,80,4]]),new g0([12,80,5],1,100,null,2),new bf(null,q.Mm.RB),new bf([12,80,6],q.Mm.RB)];
for(var e=0;e<this.ot.length;e++){var F=this.ot[e];n.appendChild(F._);if(e!=3)V.Zq(n);F.k(V.E.L,this.UO,this)}}bM.prototype=new dL;
bM.prototype.B=function(){dL.prototype.B.call(this);for(var e=0;e<this.ot.length;e++)this.ot[e].B()};
bM.prototype.hV=function(n,F,O){};bM.prototype.XW=function(n,F){this.GL=n;this.ot[0].F(n.Kc.fT);this.ot[1].F(n.Kc.dW);
this.ot[2].F(n.Kc.Xd);this.ot[3].F(n.Kc.uI);this.ot[4].F(n.Kc.wi);this.ot[5].F(n.Kc.wv)};bM.prototype.UO=function(n){var F=this.ot,O=JSON.parse(JSON.stringify(this.GL.Kc));
O.fT=F[0].u();O.dW=F[1].u();O.Xd=F[2].u();O.uI=F[3].u();O.wi=F[4].u();O.wv=F[5].u();if(O.wi!=4)O.uI=Math.round(O.uI);
var I=new k(V.E.P,!0);I.data={e:V.U.g7,b9:cf.tf,Qj:O};this.A(I)};function hP(){dL.call(this,[11,8],"saveforweb");
this.ain="";this.k("closebtn",function(){this.p7.eb()},this);this.Ly=new aE(512,512);this.KH=null;this.jW=null;
this.a1x=null;this.GL=null;V.fx(this.body,"flexrow");var n=V.w("div"),F=V.w("div");this.body.appendChild(n);
this.body.appendChild(F);this.mF=V.w("div","imgcont");n.appendChild(this.mF);this.p7=new aH;this.p7.Kq(this.Ly.x,this.Ly.y);
this.vn=V.w("span");n.appendChild(this.vn);this.cA=V.w("div","form cell");this.cA.setAttribute("style","width:15em; padding-left:1em;");
F.appendChild(this.cA);this.tT=new bf([12,50],fx.L$());this.cA.appendChild(this.tT._);this.tT.k(V.E.L,this.I_,this);
this.kM=new gE(!0,!0,!1,!0);this.kM.k(V.E.L,this.I_,this);this.cA.appendChild(this.kM._);this.gq=new he;
this.gq.k(V.E.L,this.I_,this);this.cA.appendChild(this.gq._);this.rw=new cg([1,2],!0,null,!0);this.rw.k("click",this.$Y,this);
this.cA.appendChild(this.rw._)}hP.prototype=new dL;hP.prototype.Tj=function(n,F){return n!=null};hP.prototype.B=function(){dL.prototype.B.call(this);
this.kM.B();this.tT.B();this.gq.B();this.rw.B()};hP.prototype.$Y=function(n){var F=this.KH.name.split(".")[0],O=fx.L$()[this.tT.u()],I=this.jW,x=F+"."+O.toLowerCase(),r=this.KH,_=r.l_;
if(_.length!=0&&(O=="JPG"||O=="PNG"||O=="GIF")&&this.gq.u().pop()){var d="<!DOCTYPE html>\n<html>\n<style>div {position:absolute;}</style>\n<head></head>\n<body>\n",w=[],Z={},P=new gv(0,0,r.d,r.v),C=r.dH();
for(var e=0;e<_.length;e++)w.push(c.Fz.UG(_,e));w.reverse();var W=q.rect.rv([0,0,r.d,r.v],w);for(var e=0;
e<W.length;e++){var v=W[e],L=new gv(v[0],v[1],v[2]-v[0],v[3]-v[1]),H=v.length==5?_[v[4]].v:null,y=q.f(L.X()*4);
q.nF(C,P,y,L);var g="img/img"+(e+1)+"."+O.toLowerCase();Z[g]=new Uint8Array(fx.rM(O).eJ([[y.buffer,0]],L.d,L.v,this.gq.u()));
d+="<div style=\"background-image:url('"+g+"'); left:"+L.x+"px; top:"+L.y+"px; width:"+L.d+"px; height:"+L.v+"px\">";
if(H&&H.url.v!="")d+="\n\t<a href=\""+H.url.v+"\" target=\""+H.null.v+"\" style=\"display:block;width:100%;height:100%;\"></a>\n";
d+="</div>\n"}d+="</body>\n</html>\n";var Q=q.f(Math.round(d.length*1.5)),J=Y.ng(d,Q,0);Z["index.html"]=Q.slice(0,J);
I=UZIP.encode(Z);x=F+".zip"}if(r.zQ){var A=new XMLHttpRequest;A.open("GET","/papi/img/update.php?act=1&id="+r.zQ+"&rnd="+Math.random());
A.send()}var p=new k(V.E.P,!0);p.data={e:V.U.L0,data:I,name:x};this.A(p);this.p7.eb();this.close()};
hP.prototype.hV=function(n,F){if(F.ty!=null)this.tT.F(F.ty);this.KH=n;var O=n.d+","+n.v;if(O!=this.ain){this.ain=O;
this.kM.F(new aE(n.d,n.v),n.gC)}this.gq.ajJ();this.I_(null,!0)};hP.prototype.xu=function(n,F){return new aE(Math.max(0,Math.min(150,(n-770)/2)),Math.max(0,Math.min(150,(F-590)/2)))};
hP.prototype.Kq=function(n,F){this.HL=n;this.Sa=F;this.Ly.x=Math.min(512,n-26-214);this.Ly.y=Math.min(512,F-45);
if(this.KH==null)return;var O=this.kM.u(),n=O.x,F=O.y,I=fx.L$()[this.tT.u()],x=fx.rM(I),C="<span style=\"width:",W="display:inline-block; text-align:right;\">";
if(x.dp){var r=n,_=F,d;if(I=="PDF"||x.st){r=this.Ly.x;_=this.Ly.y}else{r=Math.min(n+20,this.Ly.x);_=Math.min(F+20,this.Ly.y)}this.mF.firstChild.setAttribute("style","display:block; width:"+r+"px; height:"+_+"px;")}else{if(x.st){r=this.Ly.x;
_=this.Ly.y}else{var w=this.a1x,Z=w[0].Kh,r=Z.d,_=Z.v;this.p7.Kq(Math.max(50,Math.min(r/V.Z(),this.Ly.x)),Math.max(50,Math.min(_/V.Z(),this.Ly.y)))}}var P=this.jW.byteLength,v=I+":"+C+64+"px;"+W+hP.R4(P)+"</span>";
if(this.Ly.x>200)v+=C+90+"px; opacity:"+.5+";"+W+P.toLocaleString()+" B</span>";this.vn.innerHTML=v};
hP.R4=function(n){var F=n.toString(2),O=0;while(O+10<F.length)O+=10;var I=(n/Math.pow(2,O)).toFixed(1),x="B KB MB GB TB PB".split(" ")[Math.floor(O/10)];
return I+" "+x};hP.prototype.XW=function(n,F){this.GL=n};hP.prototype.I_=function(n,F){var O=this.KH,I=this.kM.u(),x=I.x,r=I.y,_=this.tT.u(),d=fx.L$()[_],w=fx.jE(O)[0].length,Z=["GIF","PNG","WEBP"].indexOf(d)!=-1&&w>1,H="";
if(Z&&F&&(w>4&&x*r>1024*1024||x*r*w>800*800*50)){var P=1;while(Math.max(x>>>P,r>>>P)>800)P++;var C=window.confirm("Your animation is large ("+x+" x "+r+" px). Press \"OK\" to scale it to "+(100>>>P)+"%. Press \"Cancel\" to keep the size.");
if(C){this.kM.F(new aE(x>>>P,r>>>P),null,!0);x=x>>>P;r=r>>>P}}var W=O.add.artd,v=W==null||W.Cnt.v==1;
this.gq.s$(d,Z,O.l_.length!=0,v);var L=this.gq.u();this.jW=fx.XI(O,d,x,r,L,this.GL);if(this.jW==null){this.KH=null;
return}V.em(this.mF);this.p7.eb();var y=fx.rM(d);if(y.st){this.mF.innerHTML="<div></div>";H+="width:0px"}else if(y.dp){var g=x,Q=r,J;
if(d=="PDF"){J=URL.createObjectURL(new Blob([this.jW],{type:"application/pdf"}))}else{J=URL.createObjectURL(new Blob([this.jW],{type:"image/svg+xml"}))}this.mF.innerHTML="<iframe src=\""+J+"\"></iframe>"}else{var A=this.a1x=y.bx(this.jW),p=A[0].Kh,g=p.d,Q=p.v;
this.p7.F(A,A.length>1?L[L.length-3]:0);this.mF.appendChild(this.p7._);H="background: rgba(0,0,0,0);"}this.mF.setAttribute("style","display:block; background-size:"+16/V.Z()+"px;"+H);
this.Kq(this.HL,this.Sa)};function dB(){dL.call(this,[11,13],"shortcuts");var n=this.iT=V.w("div","scrollable");
n.setAttribute("style","min-width:700px; max-height:500px; padding:1.5em");this.body.appendChild(n);
this.IJ()}dB.prototype=new dL;dB.prototype.B=function(){dL.prototype.B.call(this);this.IJ()};dB.prototype.IJ=function(){var n="<div style=\"line-height:1.4em; column-count:3; column-gap:3em; column-rule-width:1px;\" class=\"\">",F="",O=u,I=O.ep,x=O.MQ,r=O.pI;
F+="<h2 style=\"margin-top:0;\">Main Menu</h2>";F+=n;F+=this.Gs([[0,0],"---",[1,0],[I,O.uo],[1,2],[I,O.wB],[1,3],[x,I,O.wB],[1,8],[r,x,I,O.wB],[0,1],"---",[2,0],[x,I,O._1],[2,1],[I,O._1],[5,0],[I,O.Tm],[5,1],[I,O.Te],[5,2],[I,O.zV],[2,2],"Delete",[2,3],[r,O.pf],[10,16],[r,I,O.KJ],[12,79],[I,O.UA],[3],"---",[4,1],[I,O.LG],[4,2],[I,O.$T],[4,5],[I,O.bm],[4,11],[I,O.tx],[0,3],"---",[6,0],[I,O.uV],[6,6,0],[r,I,O.ja],[6,9],[I,O.ja],[6,10],[I,O.E],[0,5],"---",[7,0],[I,O.U],[7,1],[I,O.m9],[7,2],[x,I,O.tx],[0,7],"---",[8,0],[I,O.wW],[8,1],[I,O.sF],[8,3],[I,O.Qu],[8,2],[I,O.L7],[8,4],[I,O.p9],[11,13],"?"]);
F+="</div>";F+="<h2 style=\"margin-top:1.5em;\">Navigation</h2>";F+=n;F+=this.Gs(["Vertical scroll","Wheel","Horizontal scroll",[I,"Wheel"],"Zooming",[r,"Wheel"]]);
F+="</div>";F+="<h2 style=\"margin-top:1.5em;\">Quick tools (press to enable, release to disable)</h2>";
F+=n;F+=this.Gs([[10,11],[I],[10,7],"Space",[10,17],[I,O.cf]]);F+="</div>";F+="<h2 style=\"margin-top:1.5em;\">Tools</h2>";
F+=n;var _=dB.Ac,d=[];for(var e=0;e<_.length;e+=3)if(_[e+1])d.push(_[e],_[e+1]);d=d.concat([[24,16],"---",[22,7,1],"D",[22,7,0],"X",[6,6,1],"Q","Decrease Brush Size","[","Increase Brush Size","]","Decrease Hardness","{","Increase Hardness","}"]);
F+=this.Gs(d);F+="</div>";this.iT.innerHTML=F};dB.prototype.Gs=function(n){var F="",O=!0;for(var e=0;
e<n.length;e+=2){var I=n[e],x=u.kt(n[e+1]);if(x==null){O=!1;continue}var r=V.ru(hl.get(I));if(x=="---"){if(!O)F+="<br/>";
F+="<div style=\"font-weight:bold; border-bottom: 1px solid;\">"+r+"</div>"}else F+="<div>"+r+" <span style=\"float:right; font-weight:bold;\">"+x+"</span> </div>";
O=!1}return F};dB.Ac=[[10,11],"V",0,[10,15],"M",1,[10,4],"M",2,[10,9],"L",5,[10,14],"L",6,[10,10],"L",7,[10,44],"W",3,[10,37],"W",8,[10,12],"W",9,[10,2],"C",10,[10,39],"C",11,[10,40],"C",12,[10,41],"C",13,[10,5],"I",14,[10,36],"I",16,[10,24],"J",18,[10,25],"J",19,[10,26],"J",20,[10,43],"J",22,[10,0],"B",23,[10,38],"B",24,[10,42],"B",25,[10,1],"S",27,[10,3],"E",31,[10,45],"E",32,[10,6],"G",34,[10,13],"G",35,[10,18],null,36,[10,19],null,37,[10,20],null,38,[10,21],"O",39,[10,22],"O",40,[10,23],"O",41,[10,8],"T",47,[10,29],"P",42,[10,30],"P",43,[10,27],"A",51,[10,28],"A",52,[10,32],"U",54,[10,33],"U",55,[10,35],"U",57,[10,34],"U",56,[10,31],"U",58,[10,7],"H",59,[10,17],"Z",61];
function fO(){dL.call(this,[8,11,1],"soptions");this.a0=null;var n=V.w("div","form");n.style.width="20em";
this.body.appendChild(n);this.Al={Nm:[12,48],url:"URL",null:[12,71]};this.ot={};for(var F in this.Al){var O=new fq(this.Al[F],null,15);
this.ot[F]=O;n.appendChild(O._)}var I=new cg("OK",!0,null,!0);I.k("click",this.$Y,this);n.appendChild(I._)}fO.prototype=new dL;
fO.prototype.hV=function(n,F,O){var I=F.G;this.a0=JSON.stringify(I);for(var x in this.Al){if(I[x])this.ot[x].F(I[x].v)}};
fO.prototype.$Y=function(n){var F=JSON.parse(this.a0);for(var O in this.Al){var I=this.ot[O].u();F[O]={t:"TEXT",v:I}}var x=new k(V.E.S,!0);
x.T=c.si;x.data=F;x.uh=!0;this.A(x);this.close()};function iA(){dL.call(this,[2,3],"fill");this.GL=null;
this.sE=null;var n=V.w("div","form padded");n.style.width="22em";this.body.appendChild(n);this._c="FrgC BckC Clr Blck Gry Wht contentAware".split(" ");
this.Or=new bf([2,3],[[12,45],[12,46],[12,47],[13,1,10],[13,1,7],[13,1,8],[6,48,0,3]]);this.Or.k(V.E.L,this.a86,this);
n.appendChild(this.Or._);this.mF=V.w("span");n.appendChild(this.mF);this.g$=new aR;this.g$.parent=this;
this.g$.IU(0);this.Pd=new bf([12,19,0],fk.w9,!1,fk.uv);n.appendChild(this.Pd._);this.CE=new g0([12,0],0,100,"%",0,!1);
this.CE.F(100);n.appendChild(this.CE._);this.$h=new cL("Preserve Transparency");this.$h.F(!1);n.appendChild(this.$h._);
this.S0=new cg("OK",!0,null,!0);this.S0.k("click",this.$Y,this);this.body.appendChild(this.S0._)}iA.prototype=new dL;
iA.prototype.Tj=function(n,F){return n!=null};iA.prototype.A5=function(){return!0};iA.prototype.a86=function(){var n=this.Or.u()==2,F=this.g$._,O=this.mF;
if(n)O.appendChild(F);else if(O.contains(F))O.removeChild(F)};iA.prototype.B=function(){dL.prototype.B.call(this);
this.Or.B();this.Pd.B();this.CE.B()};iA.prototype.$Y=function(n){if(!this.sE.f7())return;var F=new k(V.E.JA,!0),O=this.Or.u();
F.data=c.P6.Lz(this._c[O],fk.Dy[this.Pd.u()],this.CE.u()/100,this.g$.u(),this.$h.u());this.close();this.A(F)};
iA.prototype.hV=function(n,F){this.sE=n};iA.prototype.XW=function(n,F){this.GL=n};function de(){dL.call(this,[14,9],"stroke");
this.GL=null;this.cA=V.w("div","form");this.cA.setAttribute("style","width:24em");this.body.appendChild(this.cA);
this.P3=new dn("FrFX",!0);this.P3.parent=this;var n=["Sz","Styl","Md","Opct"].concat(bW.ez);for(var e=0;
e<n.length;e++){var F=this.P3.WB[n[e]]._;this.cA.appendChild(F)}this.kW=!1;this.S0=new cg("OK",!0,null,!0);
this.S0.k("click",this.$Y,this);this.body.appendChild(this.S0._)}de.prototype=new dL;de.prototype.Tj=function(n,F){return n!=null};
de.prototype.A5=function(){return!0};de.prototype.B=function(){dL.prototype.B.call(this);this.P3.B()};
de.prototype.$Y=function(n){var F=new k(V.E.S,!0);F.T=c.CV;F.data={e:"stroke",al7:this.P3.u()};this.close();
this.A(F)};de.prototype.hV=function(n,F){if(!this.kW){var O=bW.E5[bW.order.indexOf("FrFX")];O=JSON.parse(O);
this.P3.update(n,O);this.kW=!0}var O=this.P3.u(),I=this.GL.nE;O.Clr.v=q.W.Vm({Q:I>>16&255,l:I>>8&255,O:I&255});
this.P3.update(n,O)};de.prototype.XW=function(n,F){this.GL=n};function eb(){dL.call(this,[11,9],"textwarp");
this.ot=new gp;this.ot.k(V.E.L,this.kO,this);this.ot.parent=this;this.cA=V.w("div","form");this.cA.setAttribute("style","width:20em");
this.body.appendChild(this.cA);this.cA.appendChild(this.ot.PH._);this.cA.appendChild(this.ot.zn._);this.cA.appendChild(this.ot.cy._);
this.cA.appendChild(this.ot.mS._);this.cA.appendChild(this.ot.L5._);this.S0=new cg("OK",!0,null,!0);
this.S0.k("click",this.$Y,this);this.cA.appendChild(this.S0._);this.k("closebtn",this.Ui,this)}eb.prototype=new dL;
eb.prototype.A5=function(){return!0};eb.prototype.B=function(){dL.prototype.B.call(this);this.ot.B()};
eb.prototype.kO=function(n){var F=this.ot.u();this.QK({e:"warp",qF:F})};eb.prototype.QK=function(n){var F=new k(V.E.S,!0);
F.T=c.ua;F.data=n;F.uh=!0;this.A(F)};eb.prototype.Ui=function(n){this.QK({e:"warpCancel"})};eb.prototype.$Y=function(n){this.QK({e:"warpConfirm"});
this.close()};eb.prototype.hV=function(n,F){var O=n.t[n.C[0]];this.ot.F(O.add.TySh.Gp)};function c7(){dL.call(this,"Raw Photopea","rawpea");
this.v_=null;this.eV=null;this.Pe=null;this.i3=0;this.Hv=null;this.Ou=null;this.aiI=500;this.aiH=500;
this.k("closebtn",this.KT,this);V.fx(this.body,"flexrow");var n=V.w("div"),F=V.w("div"),I="<svg  class=\"autoscale gsicon\" viewBox=\"0 0 14 18\" width=\"14\" height=\"18\" fill=\"black\"><path d=\"M14,6 L10,6 L10,0 L4,0 L4,6 L0,6 L7,13 L14,6 L14,6 Z M0,14 L0,16 L14,16 L14,14 Z\" /></svg>";
F.setAttribute("style","padding-left: 1em");this.body.appendChild(n);this.body.appendChild(F);this.nd=V.w("canvas");
n.appendChild(this.nd);this.sC=new iz(225);this.sC.HN(4);F.appendChild(this.sC._);this.cA=V.w("div");
this.cA.setAttribute("style","width:18em;");F.appendChild(this.cA);this.aeE=new gD("Hi",!0);this.cA.appendChild(this.aeE._);
this.yz=[new af("Temperature",2e3,13e3),new af("Tint",-150,150),new af([4,3],-4,4,null,!0),new af([12,3,0],-100,100)];
for(var e=0;e<this.yz.length;e++){var O=this.yz[e];O.F(0);O.k(V.E.L,this.Xx,this);this.cA.appendChild(O._);
if(e==1)this.cA.appendChild(V.w("hr"))}this.S0=new cg([1,0],!0,null,!0);this.S0.k("click",this.$Y,this);
this.cA.appendChild(this.S0._);this.Vq=new cg(I+" JPG",!0,null,!0);this.Vq.k("click",this.acn,this);
this.cA.appendChild(this.Vq._);this.Vq._.style.marginTop="6px"}c7.prototype=new dL;c7.prototype.xu=function(){return new aE(0,0)};
c7.prototype.Kq=function(n,F){this.aiI=n-274;this.aiH=F-32;if(this.v_)this.cj()};c7.prototype.B=function(){dL.prototype.B.call(this);
this.S0.B();for(var e=0;e<this.yz.length;e++)this.yz[e].B()};c7.prototype.acn=function(n){var F=this.v_,O=this.eV,I=q.f(F.width*F.height*4);
q.IW(I,4294967295);q.raw.QN(O,I,F,this.N5());var x=fx.rM("JPG").eJ([[I.buffer]],O.aZ,O.k$,[85]),r=new k(V.E.P,!0);
r.data={e:V.U.L0,data:x,name:"photo.jpg"};this.A(r)};c7.prototype.$Y=function(n){var F=this.v_,O=this.eV,I=q.f(F.width*F.height*4);
q.IW(I,4294967295);q.raw.QN(O,I,F,this.N5());var x=fb.wX(F),F={Kh:new gv(0,0,O.aZ,O.k$),data:I.buffer,aC:x},r=fx.iE("Raw Photo",[F]),_=new k(V.E.P,!0);
_.data={e:V.U.ph,KH:r};this.A(_);this.KT();this.close()};c7.prototype.KT=function(){this.v_=null;this.eV=null;
this.Hv=null;this.Ou=null};c7.prototype.hV=function(n,F,O,I){this.v_=F.Qb;this.eV=q.raw.a7s(this.v_);
var x=this.eV;this.aeE.F(x.aZ+" x "+x.k$+", "+(x.aZ*x.k$/1e6).toFixed(1)+" MPx");var r=q.raw.aeu(F.Qb);
this.Pe=il.j6(r);this.yz[0].F(this.Pe.ZG);this.yz[1].F(this.Pe.Xn);for(var e=2;e<this.yz.length;e++)this.yz[e].F(0);
this.cj()};c7.prototype.XW=function(n,F){this.sC.IU(hm.mE[n.d_]["--text-color"])};c7.prototype.cj=function(){var n=this.eV,F=n.aZ,O=n.k$,I=1;
while(F/I>this.aiI*V.Z()||O/I>this.aiH*V.Z())I++;var x=Math.floor(F/I),r=Math.floor(O/I);this.Hv={zc:new Float32Array(x*r*3),aZ:x,k$:r};
var _=this.nd.getContext("2d");this.Ou=_.createImageData(x,r);q.IW(this.Ou.data,4294967295);var d=1/(I*I);
for(var w=0;w<r;w++)for(var Z=0;Z<x;Z++){var P=0,C=0,W=0,v=(Z+1)*I,L=(w+1)*I;for(var H=w*I;H<L;H++)for(var y=Z*I;
y<v;y++){var g=(H*F+y)*3;P+=this.eV.zc[g];C+=this.eV.zc[g+1];W+=this.eV.zc[g+2]}var Q=(w*x+Z)*3;this.Hv.zc[Q]=P*d;
this.Hv.zc[Q+1]=C*d;this.Hv.zc[Q+2]=W*d}this.Xx()};c7.prototype.Xx=function(){var n=this.v_,F=this.Hv.aZ,O=this.Hv.k$,I=F*O,x=this.nd,r=x.getContext("2d");
x.width=F;x.height=O;V.z0(x,F,O);q.raw.QN(this.Hv,new Uint8Array(this.Ou.data.buffer),n,this.N5());r.putImageData(this.Ou,0,0);
var _=q.oN(this.Ou.data);for(var e=0;e<4;e++)for(var d=1;d<256;d++)if(_[e][d]==0)_[e][d]=_[e][d-1];for(var e=0;
e<4;e++)for(var d=1;d<256;d++)if(_[e][d]==0)_[e][d]=_[e][d-1];this.sC.F(_)};c7.prototype.N5=function(){var n=[];
for(var e=0;e<this.yz.length;e++)n.push(this.yz[e].u());return n};function iR(){dL.call(this,[11,11],"vbitmap");
this.Xv=null;this.RM=null;this.vg=null;this.SO=null;this.Dh=null;this.up=this.lx.bind(this);this.cA=V.w("div","form hbar");
this.body.appendChild(this.cA);this.wo=new g0([12,82],2,50,null);this.wo.k(V.E.L,this.lx,this);this.cA.appendChild(this.wo._);
this._F="";this.fP=new cL([12,81]);this.fP.k(V.E.L,this.lx,this);this.cA.appendChild(this.fP._);this.bO=new cL("Segmentize");
this.bO.k(V.E.L,this.lx,this);this.cA.appendChild(this.bO._);this.S0=new cg("OK",!1,null,!0);this.S0.k("click",this.$Y,this);
this.cA.appendChild(this.S0._);var n=V.w("div","flexrow"),F=16;this.body.appendChild(n);this.Z$=new aH;
this.Z$.k("viewchange",this.u6,this);this.Q_=V.w("canvas");this.Q_.setAttribute("style","margin-left: 1px; cursor:grab;");
this.xX=this.Q_.getContext("2d");var O=q.f(16*16*4);q.GE(O,F,F,8);this.eQ=q.scale.qO(O,F,F);this.Z$.T9(this.Q_);
n.appendChild(this.Z$._);n.appendChild(this.Q_)}iR.prototype=new dL;iR.prototype.xu=function(){return new aE(0,0)};
iR.prototype.A5=function(){return!0};iR.prototype.Kq=function(n,F){F=F-26-30;n=Math.floor((n-28)/2);
V.$C(this.Q_,n,F);this.Z$.Kq(n,F)};iR.prototype.Ka=function(n,F,O,I){this.Z$.Ka(I)};iR.prototype.B=function(){dL.prototype.B.call(this);
this.wo.B();this.fP.B();this.bO.B();this.S0.B()};iR.prototype.hV=function(n,F){this.Dh=n;var O=n.t[n.C[0]],I=q.yN.hG(O.buffer.buffer,O.rect.d,O.rect.v).a4g,x=I/((O.rect.d-2)*(O.rect.v-2));
this.fP.F(x<.75);this.bO.F(!1);var r=O.rect.clone();r.x=r.y=0;this.Xv={Kh:r,data:O.buffer.buffer.slice(0)};
this.RM=null;this.Z$.F([this.Xv]);this.wo.F(20);setTimeout(this.up,20)};iR.prototype.lx=function(){var n=!0,F=Date.now(),O=this.Xv,I=this.fP.u(),x=this.bO.u(),r=I||x,_=I+","+x;
if(r&&(this.RM==null||this._F!=_)){this._F=_;console.log("recomputing");var d=new Uint8Array(O.data.slice(0)),w=15,Z=35,P=O.Kh.d,C=O.Kh.v;
if(I){bS.mV(d,d,P,C,w,q.Bk.YZ,[Z],2)}if(n){console.log("denoise",Date.now()-F);F=Date.now()}if(x){var W=q.yN.qv(d,P,C),v=W.UA,L=new Uint8Array(v*4);
for(var e=0;e<v;e++){var H=e*4,y=e*6,g=1/W.x$[y+5];L[H]=W.x$[y]*g;L[H+1]=W.x$[y+1]*g;L[H+2]=W.x$[y+2]*g}for(var e=0;
e<d.length;e+=4){var Q=W.Cj[e>>>2]*4;d[e]=L[Q];d[e+1]=L[Q+1];d[e+2]=L[Q+2]}}this.RM={Kh:O.Kh.clone(),data:d.buffer};
if(n){console.log("segm",Date.now()-F);F=Date.now()}}if(r)O=this.RM;var d=new Uint8Array(O.data),P=O.Kh.d,C=O.Kh.v;
for(var e=0;e<d.length;e+=4){if(d[e+3]<10)d[e]=d[e+1]=d[e+2]=d[e+3]=0}var J=q.yN.abb(d,P,C,this.wo.u(),r?.1:2e-4);
if(n){console.log("doclipart",Date.now()-F);F=Date.now()}var A=J.Cj.slice(0);for(var e=0;e<A.length;
e++)A[e]++;var p=new Uint8Array((P+2)*(C+2));q.k9(A,new gv(1,1,P,C),p,new gv(0,0,P+2,C+2));var U=Math.round((P+2)*(C+2)/1e4),j=ej.CO(p,P+2,C+2,Math.min(12,U)),b=ej.Y1(j),s=new cD(1,0,0,1,-1,-1);
for(var e=0;e<b.length;e++)q.z.m(b[e].path.H,s,b[e].path.H);this.SO=b;this.vg=J;if(n){console.log("trace",Date.now()-F);
F=Date.now()}for(var e=0;e<b.length;e++){var G=b[e];for(var T=e+1;T<b.length;T++){var z=b[T];if(J.fJ[z.color-1].est.q[3]>.05||z.parent!=e)continue;
var m=z.path.s.slice(1);m.reverse();m=["M"].concat(m);var $=[],j=z.path.H.length;for(var o=0;o<j;o+=2){$[o]=z.path.H[j-2-o];
$[o+1]=z.path.H[j-2-o+1]}q.z.concat(G.path,{H:$,s:m})}}for(var e=0;e<b.length;e++){var G=b[e],h=J.fJ[G.color-1].est.q;
if(h[3]<=.05){b.splice(e,1);e--;continue}}for(var e=1;e<b.length;e++){var X=b[e-1],G=b[e];if(X.color==G.color){q.z.concat(X.path,G.path);
b.splice(e,1);e--;continue}}this.u6()};iR.prototype.u6=function(n){if(this.SO==null)return;var F=this.Xv.Kh.d,O=this.Xv.Kh.v,I=this.SO,x=this.vg.fJ,r=this.xX,_=this.Z$.r5();
r.setTransform(1,0,0,1,0,0);r.clearRect(0,0,r.canvas.width,r.canvas.height);r.translate(r.canvas.width/2,r.canvas.height/2);
r.scale(_.K,_.K);r.translate(_.n.x/_.K-F/2,_.n.y/_.K-O/2);r.scale(1/_.K,1/_.K);r.fillStyle=this.eQ;r.fillRect(0,0,F*_.K,O*_.K);
r.scale(_.K,_.K);var d=[];for(var e=0;e<x.length;e++){var w=x[e].est.q;d.push({Q:Math.round(255*w[0]),l:Math.round(255*w[1]),O:Math.round(255*w[2]),R:Math.round(255*w[3])})}for(var e=0;
e<I.length;e++){var Z=I[e],w=d[Z.color-1];if(w.R==0)continue;r.fillStyle="rgba("+w.Q+","+w.l+","+w.O+","+w.R/255+")";
r.beginPath();Typr.U.pathToContext({crds:Z.path.H,cmds:Z.path.s},r);r.fill()}};iR.prototype.$Y=function(n){var F=this.SO,O=F.length==1,I=this.Dh,x=I.C[0],r=I.t[x],_=I.t.slice(0,x);
if(!O)_.push(I.VF());for(var e=0;e<F.length;e++){var d=F[e],w=this.vg.fJ[d.color-1].est.q;q.z.m(d.path.H,new cD(1,0,0,1,r.rect.x,r.rect.y),d.path.H);
var Z=I.Kv();Z.V9("Path "+e);_.push(Z);Z.opacity=Math.round(w[3]*255);Z.Cq|=16;Z.add.SoCo={classID:"null",Clr:{t:"Objc",v:q.W.Vm({Q:255*w[0],l:255*w[1],O:255*w[2]})}};
Z.add.vmsk=new K.X9;Z.add.vstk=JSON.parse(JSON.stringify(bW.uS.default));Z.add.vmsk.b=q.z.rD(d.path,!1);
Z.add.vogk=[];Z.XO();Z.o3(I)}var P=_[_.length-1];if(!O){var Z=I.Kv();Z.V9(r.getName());Z.add.lsct=ho.x7;
Z.mf="pass";Z.Cq=24;_.push(Z);P=Z}var C=r.add.lmfx;if(C)P.add.lmfx=JSON.parse(JSON.stringify(C));for(var e=x+1;
e<I.t.length;e++)_.push(I.t[e]);var W=new k(V.E.S,!0);W.uh=!0;W.T=c.lo;W.data={e:K.a$,Dn:_,pi:[x+F.length+(O?-1:1)],WL:[11,11]};
this.A(W);this.close()};function g9(n){dL.call(this,[[7,11],[7,13]][n],["redge","magiccut"][n]);this.TL=n;
this.Xv={};this.IY=null;this.Hs=null;this.Dh=null;this.yQ=null;this.ii=null;this.O7=[];this.SV=-1;this.cA=V.w("div","form hbar");
this.body.appendChild(this.cA);this.Ce=new fa;this.Ce.parent=this;this.Ce.k(V.E.L,this.pa,this);this.cA.appendChild(this.Ce._);
var F=n==0?["#ffffff","#888888","#000000"]:["#00dd00","#888888","#ff0000"];F=F.concat(PIMG["tools/hand"],PIMG.zoomIn,PIMG.zoomOut);
var O=n==0?[[12,45],"Unknown",[12,46]]:[[12,45],"Erase",[12,46]];this._q=new aG(null,F,O,28);this._q.k(V.E.L,this.Ka,this);
this.cA.appendChild(this._q._);this.h4=new cR([7,9],0,50,null);this.h4.parent=this;this.h4.k(V.E.L,[this.MT,this.lx][n],this);
this.cA.appendChild(this.h4._);var I=this.aoI=new cg([2,2],!1,null,!0);I.k("click",this.KT,this);this.cA.appendChild(I._);
var x=this.ahP=new cg([12,90],!1,null,!0);x.k("click",function(w){alert(n==0?hl.get([15,7,1]):"Mark the object with Green, background with Red. Two colors should never touch.",5e3)},this);
this.cA.appendChild(x._);var r=new cg("Tutorial",!1,null,!0);r.k("click",this.a6d,this);this.cA.appendChild(r._);
var _=V.w("span","form");this.cA.appendChild(_);_.setAttribute("style","position:absolute;  right:0px");
this.qQ=new aG([12,46],["checker","#ffffff","#000000"]);this.qQ.k(V.E.L,this.lc,this);_.appendChild(this.qQ._);
this.ae=new bf(null,[[6,13],[6,2],[17,2]]);_.appendChild(this.ae._);this.S0=new cg("OK",!1,null,!0);
this.S0.k("click",this.$Y,this);_.appendChild(this.S0._);var d=V.w("div","flexrow");this.body.appendChild(d);
this.Dj=new aH(!0);this.D6=new aH;this.Dj.e8(this.D6);this.D6.e8(this.Dj);this.Dj.k("mousedown",this.R3,this);
this.Dj.k("mousemove",this.BO,this);this.Dj.k("mouseup",this.lu,this);this.Dj.k("zoom",this.pa,this);
this.D6.k("zoom",this.pa,this);d.appendChild(this.Dj._);d.appendChild(this.D6._)}g9.prototype=new dL;
g9.prototype.Tj=function(n,F){var O=n!=null&&!n.t[n.C[0]].rect.D2();if(!O)alert("The layer is empty.");
return O};g9.prototype.xu=function(){return new aE(0,0)};g9.prototype.A5=function(){return!0};g9.prototype.Kq=function(n,F){F=F-26-33;
n=Math.floor((n-28)/2);this.Dj.Kq(n,F);this.D6.Kq(n,F)};g9.prototype.B=function(){dL.prototype.B.call(this);
this.Ce.B();this.h4.B();this.S0.B();this.qQ.B();this.ae.B();this.aoI.B();this.ahP.B()};g9.prototype.a6d=function(n){window.open("//www.photopea.com/"+["learn/refine-edge","tuts/magic-cut-remove-image-background-online"][this.TL],"_blank")};
g9.prototype.XW=function(n,F){this.Hs=n;if(F==cf.pY||F==cf.fo){this.Ce.TU(n.ke);this.Ce.F(e1.sW(),n.ke.J$,n.ke.Gr)}};
g9.prototype.Ka=function(n,F,O,I){var x=this._q.u();if(I==null){var I=new u;if(x>=3)I.jl("Space");if(x>=4){I.jl("ControlLeft");
if(x==5)I.jl("AltLeft")}this.Dj.Ka(I);return}this.yQ=I;var r=c.P6.fC(this.Ce.u(),I);if(r!=null){this.Ce.F(r);
this.pa()}else if(I.q(u.ep)&&I.q(u._1)){var _=this.O7,d=0;if(I.q(u.MQ)){if(this.SV+1<_.length)d=1}else if(this.SV>0)d=-1;
if(d!=0){this.SV+=d;var w=this.SV,Z=this.Xv;if(d==1)q.nF(_[w][2],_[w][0],Z.DR,Z.rect);else q.nF(_[w+1][1],_[w+1][0],Z.DR,Z.rect);
Z.KA=Z.rect;this.lx()}}else if(x<3)this.Dj.Ka(I)};g9.prototype.K$=function(n){var F=this.Xv,O=this.O7,I=q.f(n.X()*4);
q.nF(F.I4,F.rect,I,n);F.I4=null;var x=q.f(n.X()*4);q.nF(F.DR,F.rect,x,n);this.SV++;O[this.SV]=[n.clone(),I,x];
while(O.length>this.SV+1)O.pop();while(O.length>50){O=O.slice(1);this.SV--}};g9.prototype.pa=function(){var n=this.Hs,F=cb.xn(this.Ce.u(),n.ke.J$,this.Dj.r5().K);
this.Dj.Wy(F)};g9.prototype.R3=function(n){var F=this.Hs,O=this.Xv,I=this.yQ,x=this.Ce.u(),r=this.Dj.$P(),_=[16777215,8421504,0][this._q.u()];
this.IY=new cb(x,F.ke.list[0].J$,F.ke.list[0].Gr,{c1:1,yX:!0},_,F.sI,O.rect);O.I4=O.DR.slice(0);if(I!=null&&I.q(u.MQ)&&this.ii){this.IY.moveTo(this.ii.x,this.ii.y);
this.IY.lineTo(r.x,r.y)}else this.IY.moveTo(r.x,r.y);this.p_()};g9.prototype.BO=function(n){var F=this.Xv,O=this.Dj.$P();
this.IY.lineTo(O.x,O.y);this.p_()};g9.prototype.lu=function(n){this.ii=this.Dj.$P();this.K$(this.IY.uu());
this.lx()};g9.prototype.p_=function(){var n=this.Xv,F=this.IY,O=F.nj();if(O.D2())return;n.KA=O;q.p.F_("norm",F.El(),F.nJ(),n.DR,n.rect,O,1);
this.Tg()};g9.prototype.KT=function(n){var F=this.Xv;F.I4=F.DR.slice(0);F.KA=F.rect;q.IW(F.DR,[4278190080,4292730333][this.TL]);
this.K$(F.rect);this.lx()};g9.prototype.hV=function(n,F){this.Dh=n;var O=n.t[n.C[0]],I=O.rect.clone(),x=I.d,r=I.v;
this.h4.F(this.TL==0?3:x*r<3e6?3:0);this._q.F(n.N==null?0:1);this.h4.gy();if(this.TL==0&&n.N!=null||this.TL==1)this.h4.hL();
var _=this.TL,d=q.f(I.X()),w=new Float32Array(I.X());if(_==0&&n.N){q.k9(n.N.channel,n.N.rect,d,I);var Z=q.f(I.X());
for(var P=0;P<r;P++)for(var C=0;C<x;C++){var e=P*x+C,W=d[e];if(C>0&&d[e-1]!=W||C<x-1&&d[e+1]!=W||P>0&&d[e-x]!=W||P<r-1&&d[e+x]!=W)Z[e]=255}q.style.sq(Z,w,x,r)}else w.fill(1e9);
I.x=I.y=0;this.Xv={rect:I,zc:O.buffer,xA:d,vY:w,M0:q.f(I.X()*4),U4:q.f(I.X()*4),DR:q.f(I.X()*4),I4:null,FQ:null,KA:I,a1c:{}};
if(_==0)this.MT();else{this.Xv.a1c=c.Ae.fU(n);var v=this.Xv.DR;q.IW(v,4287137928);var L=q.Xs.getSelection(O.buffer,x,r),H=Math.round(x/60),y=Math.round(.7*r);
for(var P=0;P<r;P++)for(var C=0;C<x;C++){var g=(P*x+C)*4,Q=L[g>>>2];Q=Q>128?255:128;if(P<H||P<y&&(C<H||C>x-1-H))Q=0;
v[g]=v[g+1]=v[g+2]=Q}this.lx()}this.O7=[1];this.SV=0;this.Dj.a7U();var J=this.Ce.u();J.Brsh.v.Dmtr.v.val=Math.round(I.d/(_==0?10:20));
this.Ce.F(J);this.pa()};g9.prototype.MT=function(){var n=this.Xv,F=n.rect.X(),O=this.h4.u(),I=n.xA.slice(0);
for(var e=0;e<F;e++)if(n.vY[e]<O)I[e]=128;q.IW(n.DR,4294967295);q.GF(I,n.DR,0);q.GF(I,n.DR,1);q.GF(I,n.DR,2);
n.KA=n.rect;this.lx()};g9.prototype.lx=function(){var n=this.Xv,x,d,w=0,Z=0,P=0;this.Tg();var F=n.rect,O=F.d,I=F.v,r=q.f(F.X()),_=n.zc;
q.xg(n.DR,r,0);for(var e=0;e<r.length;e++){if(_[(e<<2)+3]!=255)continue;var C=r[e];if(C==0)w++;else if(C==255)Z++;
else P++}if(w*Z*P!=0){if(this.TL==0)d=q.xL.xL(F,_,r);else{var W=this._q.u();for(var v=1;v<I;v++)for(var L=1;
L<O;L++){var e=v*O+L,H=r[e],y=r[e-1];if(H==0&&y==255||H==255&&y==0){x="The Red and Green should never touch! Erase it with Grey.";
break}}var g=Date.now(),Q=this.Xv.a1c;q.Ct(r,Q.WG);c.Ae.Sy(Q,!0);var J=Math.ceil(this.h4.u()/2);if(J==0){d=_.slice(0);
q.GF(Q.N,d,3)}else{var A=Q.N.slice(0),p=Q.N.slice(0);for(var U=0;U<J;U++){for(var v=1;v<I-1;v++)for(var L=1;
L<O-1;L++){var e=v*F.d+L,j=A[e];if(A[e-O]!=j||A[e-1]!=j||A[e+1]!=j||A[e+O]!=j)p[e]=128;else p[e]=j}var b=A;
A=p;p=b}d=q.xL.xL(F,_,A,20,!1)}}}else{d=_.slice(0);q.GF(r,d,3)}for(var e=3;e<d.length;e+=4)if(d[e]>_[e])d[e]=_[e];
if(F.Qq(n.rect))n.FQ=d;else q.nF(d,F,n.FQ,n.rect);this.lc();if(x)alert(x,4e3)};g9.prototype.Tg=function(n){var F=this.Xv,O=F.KA;
q.nF(F.zc,F.rect,F.M0,F.rect,O,!0);var I=F.DR;if(this.TL==1){var x=new Uint32Array(256);x[0]=4278190335;
x[255]=4278255360;var r=F.rect.X();I=I.slice(0);var _=new Uint32Array(I.buffer);for(var e=0;e<r;e+=2){_[e]=x[_[e]&255];
_[e+1]=x[_[e+1]&255]}}q.p.F_("norm",I,F.rect,F.M0,F.rect,O,.3);this.Dj.F([{Kh:F.rect,data:F.M0.buffer}])};
g9.prototype.lc=function(n){var F=this.Xv;q.IW(F.U4,[0,4294967295,4278190080][this.qQ.u()]);q.p.F_("norm",F.FQ,F.rect,F.U4,F.rect,F.rect,1);
this.D6.F([{Kh:F.rect,data:F.U4.buffer}])};g9.prototype.$Y=function(n){var F=this.Dh,O=this.Xv,I=this.ae.u(),x=F.t[F.C[0]],r=new k(V.E.S,!0);
r.uh=!0;var _=x.rect.clone();if(I==0&&x.Y9()||I!=0&&!x.Y9()){r.T=c.lo;r.data={e:K.V0,$:F.C[0]};this.A(r)}if(F.N!=null){r.T=c.FT;
r.data={e:"fromAction",zC:c.pQ.YN()};this.A(r)}if(I==0){var d=F.t.slice(0),w=F.Kv();w.V9(x.getName());
d.splice(F.C[0]+1,0,w);w.rect=_;w.buffer=O.FQ;w.D();r.T=c.lo;r.data={e:K.a$,Dn:d,pi:[F.C[0]+1],WL:[7,11]};
this.A(r)}if(I==1){var Z=x.B1();r.T=c.lo;r.data={e:K.al,aoy:!0};this.A(r);var P=x.B1();P.channel=q.f(_.X());
P.rect=_;P.color=0;P.j8=!0;q.xg(O.FQ,P.channel,3);if(Z){var C=P.NM(Z);P.rect=C.rect;P.channel=C.channel;
P.color=C.color}P.t7();x.o3()}if(I==2){var W={rect:_,channel:q.f(_.X())};q.xg(O.FQ,W.channel,3);r.T=c.FT;
r.data={e:"setsel",N:W,WL:this.Je};this.A(r)}this.close()};function bJ(){dL.call(this,[1,13],"locstor");
this.GL=null;this.nT=[];var n=this.body,F=V.w("p");F.textContent="These files are loaded every time you start Photopea.";
n.appendChild(F);this.a6f=0;this.uw=V.w("span");n.appendChild(this.uw);this.uw.setAttribute("style","display:inline-block;  width:12em;  font-weight:bold;");
var O=V.w("span","form");n.appendChild(O);this.lI=new cg([5,4],!1,null,!0);this.lI.k("click",this.ahJ,this);
O.appendChild(this.lI._);this.acO=new cg("Get all as ZIP",!1,null,!0);this.acO.k("click",this.O4,this);
O.appendChild(this.acO._);this.LR=new iX(!0);this.LR.parent=this;this.LR.HN(1);this.LR.k(V.E.L,this.a23,this);
n.appendChild(this.LR._);this.LR._.setAttribute("style","width: 40em; height: 25em")}bJ.prototype=new dL;
bJ.prototype.B=function(){dL.prototype.B.call(this);this.uw.textContent=hl.get([13,2])+": "+hP.R4(this.a6f);
this.lI.B()};bJ.prototype.XW=function(n,F){this.GL=n;if(F==cf.Bb)this.hV()};bJ.prototype.hV=function(n,F){var O=this.GL.UH.Lb,w=0;
this.nT=[];for(var I in O)this.nT.push(I);this.nT.sort(function(P,C){P=P.split(".");C=C.split(".");return P[1]==C[1]?P[0]<C[0]?-1:1:P[1]<C[1]?-1:1});
var x=Math.floor(100*V.Z()),r=Math.floor(16*V.Z()),_=[],d=[];for(var e=0;e<this.nT.length;e++){var I=this.nT[e],Z=bJ.JC(I,O[I],x,r);
_.push(Z);d.push(I);w+=O[I].byteLength}this.LR.Ea(_,d,x,r);this.a6f=w;this.B()};bJ.prototype.a23=function(n){this.LR.Iv(this.LR.u())};
bJ.prototype.ahJ=function(n){var e=this.LR.u();if(e==-1){alert("Select a file first.");return}this.LR.F(-1);
var F=this.GL.UH.Lb;delete F[this.nT[e]];var O=new k(V.E.P,!0);O.data={e:V.U.g7,b9:cf.Bb};this.A(O)};
bJ.prototype.O4=function(n){var F=this.GL.UH.Lb,O={};for(var I in F)O[I]=new Uint8Array(F[I]);var x=UZIP.encode(O);
bm.save(x,"resources.zip")};bJ.JC=function(n,F,O,I){var x=V.w("canvas"),d=0;x.width=O;x.height=I;var r=x.getContext("2d"),_=n.split(".").pop().toLowerCase();
for(var e=0;e<_.length;e++)d+=_.charCodeAt(e)*613<<8*e;r.fillStyle="#"+q.c7(d&16777215);r.fillRect(0,0,20,I);
var w=Math.floor(14*V.Z());r.fillStyle="#000000";r.font="bold "+w+"px sans-serif";var Z=(I-w)/2,P=hP.R4(F.byteLength),C=r.measureText(P);
r.fillText(P,O-12-C.width,I-Z);return x.toDataURL()};function eD(n,F,O){dL.call(this,F,"cwindow");this.ab0=new aE(O[0],O[1]-33);
this.cA=V.w("div","form");this.cA.setAttribute("style","width:"+(O[2]-O[0])+"px; height:"+(O[3]-O[1])+"px");
this.body.appendChild(this.cA)}eD.prototype=new dL;eD.prototype.xu=function(n,F){return this.ab0.clone()};
function f0(){dL.call(this,["PSD VAR0",[25,0]],"templates");this.Ra=null;this.Xo=0;this.Ha=null;this.body.setAttribute("style","padding:0");
this.l0=new cg("Add Templates",null,null,!0);this.body.appendChild(this.l0._);this.l0.k("click",this.O0,this);
this.l0._.setAttribute("style","position:absolute; margin-top: -28px;  margin-left:150px");this.a3D=new cg("New Template",null,null,!0);
this.a3D.k("click",this.ad6,this);this.VQ=V.w("iframe","scrollable");this.VQ.setAttribute("style","border:none; margin:0; padding:0;");
this.hN=V.w("div","form scrollable padded");this.un=V.w("div","form scrollable padded label12");var n=[],F=f0.__;
this.k5=[];for(var O in F){var I=parseInt(O.slice(1)),x=I%10==0?"":"\u2800\u2800- ";n.push(x+F[O]);this.k5.push(I)}this.$F=[new fq("Name",null,30),new fq("Description",null,30,4),new fq("File"," www.Photopea.com#i...",17),new fq("Thumbnail URL","* Use Imgur.com etc., ratio 3:2",17),new bf("Category",n),new cg("<< Back",null,null,!0),new cg("Save",null,null,!0),new gD("Publish your PSD: File - Publish Online - PSD. Use that URL as \"File\"."),new gD("Get a Thumbnail URL: File - Publish Online - JPG. At Imgur.com, right-click your image and choose \"Copy Image Address\".")];
for(var e=0;e<this.$F.length;e++){var r=this.$F[e];this.un.appendChild(r._);r.parent=this;if(e!=5)V.Zq(this.un);
if(r instanceof cg)r.k("click",this.a5O,this)}this.body.appendChild(this.VQ)}f0.prototype=new dL;f0.prototype.xu=function(n,F){return new aE(0,0)};
f0.prototype.Kq=function(n,F){F=F-4;n=n;var O=this.hN;O.style.width=n-12+"px";O.style.height=F-12+"px";
var O=this.un;O.style.width=n-12+"px";O.style.height=F-12+"px";var O=this.VQ;O.style.width=n+"px";O.style.height=F+"px"};
f0.prototype.B=function(){dL.prototype.B.call(this)};f0.prototype.hV=function(n,F,O,I){this.O0(null,!1)};
f0.prototype.O0=function(n,F){var O=F!=null?F:V.Zo(this.VQ);if(O){if(!dW.j_()){alert("You need to log in first!");
return}var I=dW.EA();this.Ra=I.tpl?I.tpl.list:[];this.Yu()}else{this.VQ.setAttribute("src","");this.VQ.setAttribute("src","plugins/templates.html")}this.body.removeChild(this.body.children[this.body.children.length-1]);
this.body.appendChild(O?this.hN:this.VQ);this.l0.YB(O?"All Templates":"Add Templates")};f0.prototype.Yu=function(){var n=this.Ra,F=this.hN;
V.em(F);var O=V.w("h1");O.textContent="Share your PSD templates with the world!";var I=V.w("h3");I.textContent="Users won't be able to download a PSD, they can only export a JPG or a PNG after editing.";
F.appendChild(O);F.appendChild(I);F.appendChild(this.a3D._);for(var e=0;e<n.length;e++){var x=n[e],r=V.w("div");
F.appendChild(r);r.setAttribute("style","clear:both;");var _=V.w("img");r.appendChild(_);_.setAttribute("src",x.thmb);
_.setAttribute("style","height:10em; float:left; margin-right: 1em; margin-bottom:1em;");var d=V.w("h3");
r.appendChild(d);d.textContent=x.name;var w=V.w("p");r.appendChild(w);w.textContent=x.desc;for(var Z=0;
Z<2;Z++){var P=new cg(Z==0?"Edit":"Delete",null,null,!0);P.ajx=e;P.aI=Z==0;P.k("click",this.a8q,this);
r.appendChild(P._)}}};f0.prototype.ad6=function(n){this.Ha={catg:0,desc:"",file:"",name:"",thmb:"",utme:""};
this.aI()};f0.prototype.a8q=function(n){this.Xo=n.target.ajx;if(!n.target.aI){this.Ra.splice(this.Xo,1);
this.O4();this.Yu();return}this.aI()};f0.prototype.aI=function(){this.body.removeChild(this.hN);this.body.appendChild(this.un);
var n=["name","desc","file","thmb"],F=this.Ha?this.Ha:this.Ra[this.Xo];for(var e=0;e<4;e++){var O=F[n[e]];
if(O!=""&&e==2)O="https://photopea.com#i"+O;this.$F[e].F(O)}this.$F[4].F(this.k5.indexOf(F.catg))};f0.prototype.a5O=function(n){if(this.$F.indexOf(n.target)==6){var F=["name","desc","file","thmb"],O=this.Ha?this.Ha:this.Ra[this.Xo];
for(var e=0;e<4;e++){var I=this.$F[e].u().trim();if(I.length==0){alert("One of values is empty.");return}if(e==2){var x=I.split("#i");
if(x.length!=2||x[1].length!=8){alert("File ID is incorrect.");return}I=x.pop()}if(e==3&&(!I.startsWith("http")||!I.endsWith(".jpg")&&!I.endsWith(".png"))){alert("Thumbnail URL is incorrect.");
return}O[F[e]]=I}O.catg=this.k5[this.$F[4].u()];if(O.utme.length==0)O.utme=""+Math.round(Date.now()/1e3);
if(this.Ha)this.Ra.push(this.Ha);this.O4()}this.Ha=null;this.body.removeChild(this.un);this.body.appendChild(this.hN);
this.Yu()};f0.prototype.O4=function(){var n=dW.EA();if(this.Ra.length==0)delete n.tpl;else n.tpl={list:JSON.parse(JSON.stringify(this.Ra))};
dW.sB(n,function(){alert("Saved.")})};f0.__={c0:"Mockups",c1:"Mobile & Web",c2:"Print",c3:"Product",c10:"Social Media",c11:"Youtube",c12:"Instagram",c13:"Facebook",c20:"Print",c21:"Cards",c22:"Invitations",c23:"Brochures",c30:"Mobile",c40:"Websites",c50:"Presentations",c60:"Other"};
function hj(){dL.call(this,"Make Selection","makesel");this.GL=null;var n=V.w("div","form");this.body.appendChild(n);
this.TC=new cL("Anti-Alias");this.TC.F(!0);n.appendChild(this.TC._);V.Zq(n);this.y1=new iQ(!0);n.appendChild(this.y1._);
this.S0=new cg("OK",!0,null,!0);this.S0.k("click",this.$Y,this);this.body.appendChild(this.S0._)}hj.prototype=new dL;
hj.prototype.B=function(){dL.prototype.B.call(this);this.y1.B()};hj.prototype.$Y=function(n){var F=new k(V.E.S,!0);
F.T=c.FT;F.data={e:"frompath",nD:[null,0,this.y1.a9K(),!this.TC.u()]};this.close();this.A(F)};function ec(){dL.call(this,["VAR0 PSD/PSB",[1,2]],"savepsb");
this.sE=null;this.Pg=null;this.I1=null;var n=V.w("div","form");n.setAttribute("style","width:20em");
this.body.appendChild(n);this.fa=new hg([12,50],["PSD","PSB"]);this.fa.k(V.E.L,this.I_,this);n.appendChild(this.fa._);
V.dw(n);var F=new gD("Minify the file");n.appendChild(F._);V.Zq(n);var O=["Blank preview image","ZIP for pixel data","Remove Smart Object pixels","Put the file into ZIP"];
this.oe=[];for(var e=0;e<O.length;e++){var I=new cL(O[e]);this.oe.push(I);n.appendChild(I._);I.k(V.E.L,this.I_,this)}V.dw(n);
this.ak=new gD("aa.psd");this.oZ=new gD("10 kB");n.appendChild(this.oZ._);this.a9D=new gD("1000 B");
n.appendChild(this.a9D._);this.lF=new cg([1,2],!0,null,!0);this.lF.k("click",this.$Y,this);n.appendChild(this.lF._);
this.k("closebtn",this.Ui,this)}ec.prototype=new dL;ec.prototype.hV=function(n,F,O,I){for(var e=0;e<this.oe.length;
e++)this.oe[e].F(!1);this.sE=n;this.I_()};ec.prototype.$Y=function(){bm.save(this.Pg,this.I1)};ec.prototype.Ui=function(){this.sE=null;
this.Pg=null};ec.prototype.I_=function(){var n=this.sE,F=[!1,!1,!1,!1];for(var e=0;e<3;e++)F[e]=this.oe[e].u();
var O=this.oe[3].u(),I=F[3]=this.fa.u()==1,x=n.name.slice(0,n.name.length-3),r=this.Pg=fx.rM("PSD").eJ(n,0,0,F),E=this.I1=x+"ps"+(I?"b":"d");
if(O){var _={};_[E]=new Uint8Array(r);r=this.Pg=UZIP.encode(_);E=this.I1=x+"zip"}this.ak.F(E);this.oZ.F(hP.R4(r.byteLength));
this.oZ._.style["font-size"]="2em";this.a9D.F(" \u2001 "+r.byteLength+" B");this.lF.YB(hl.get([1,2])+" \""+E+"\"")};
ec.prototype.B=function(){dL.prototype.B.call(this);this.lF.B()};function aM(n,F,O,I){ch.call(this);
this.name=n;this.ahz=O;this.UX=I;this.Yq=V.w("div","");this.Yq.setAttribute("draggable","true");this.EG=V.w("div","pbody");
this.lR=new cg("",!1,"");this.lR.parent=this;this.a9Y=V.w("span","cross");this.Ki=V.w("span","label");
var x=this.ao3.bind(this);this.Yq.addEventListener("mousedown",this.a96.bind(this),!1);this.Yq.addEventListener("contextmenu",x,!1);
this.lR._.addEventListener("contextmenu",x,!1);this.a9Y.addEventListener("mousedown",this.mD.bind(this),!1);
this.Yq.appendChild(this.Ki);if(F)this.Yq.appendChild(this.a9Y);this.Ky=!1;this.At=new at([{name:[1,12]}]);
this.At.k("select",this.mD,this);this.Ki.textContent=n}aM.prototype=new ch;aM.prototype.f5=function(){return null};
aM.prototype.MY=function(){return new aE(0,0)};aM.prototype.B=function(){var n=hl.get(this.name),F=this.HL==0?22:Math.round(2+this.HL/50),O=n.length>F;
this.Ki.textContent=O?n.slice(0,F-2):n;if(O)for(var I=0;I<2;I++){var x=V.w("span");x.textContent=n.charAt(F-2+I);
x.setAttribute("style","opacity:"+(.6-I*.4));this.Ki.appendChild(x)}var r=n.split(" "),_=r.length==2?r[0].substring(0,2)+r[1][0]:n.substring(0,3);
if(_.charCodeAt(0)>=11776)_=_.substring(0,1);var d=this.ahz;if(d==null)this.lR.YB(_,n);else{if(d.indexOf("\"")==-1)this.lR.YB("<img src=\""+d+"\" alt=\""+n+"\" height=\"20\" />",n)}};
aM.prototype.enable=function(){this.EG.setAttribute("class","pbody")};aM.prototype.disable=function(){this.EG.setAttribute("class","pbody disabled")};
aM.prototype.XW=function(n,F){};aM.prototype.hV=function(n,F,O){};aM.prototype.k3=function(n){};aM.prototype.Kq=function(n,F){};
aM.prototype.dN=function(n){this.name=n;this.B()};aM.prototype.ax=function(){};aM.prototype.a96=function(n){if(n.button==0)this.A(new k("select",!1))};
aM.prototype.ao3=function(n){V.ou(n);if(this.UX!=null&&isNaN(this.UX))return;var F=V.iJ(n,document.body),O=this.At;
O.update(null);O.B();O.parent=this;var I=new k(V.E.P,!0);I.data={e:V.U.di,AM:O,x:F.x+1,y:F.y+1};this.A(I)};
aM.prototype.Cu=function(){this.mD({})};aM.prototype.mD=function(n){if(n.stopPropagation)n.stopPropagation();
if(this.UX!=null&&!isNaN(this.UX)){var F=new k(V.E.P,!0);F.data={e:V.U.kX,AM:this.At};this.A(F);F.data={e:V.U.g7,b9:cf.w2,G:parseFloat(this.UX),ve:"del"};
this.A(F)}else if(this.PC())this.A(new k(V.E.hS,!1))};aM.prototype.PC=function(n){return!0};aM.prototype.XS=function(n,F,O,I,x){};
aM.prototype.RL=function(n,F,O,I,x){};aM.prototype._X=function(n,F,O,I,x){};aM.Yr=function(n,F){if(n.childElementCount!=0)return;
var O=n.textContent;this.kG=this.aiQ.bind(this);this.acD=this.a7P.bind(this);this.MB=F;this.tO=n;this.a1C=O;
var I=V.w("input","");I.setAttribute("type","text");I.setAttribute("size","10");I.setAttribute("value",O);
V.em(n);n.appendChild(I);I.select();I.focus();n.addEventListener("keyup",this.kG,!1);document.body.addEventListener("mousedown",this.acD,!1)};
aM.Yr.prototype.aiQ=function(n){var F=u.NW,O=F(n.code,u.Ma);if(F(n.code,u.YE)||O)this.D1(O)};aM.Yr.prototype.a7P=function(n){var F=n.target;
if(F.tagName&&F.tagName.toLowerCase()=="input")return;this.D1(!0)};aM.Yr.prototype.D1=function(n){var F=this.tO;
F.removeEventListener("keyup",this.kG);document.body.removeEventListener("mousedown",this.acD);if(n){var O=F.firstChild.value;
this.MB(O)}else{V.em(F);F.textContent=this.a1C}};aM.Qu={dA:"0",ald:"1",lo:"2",a95:"3",a6k:"4",D_:"5",CSS:"6",pY:"7",a7f:"8",ajX:"9",adF:"10",abM:"11",abq:"12",dM:"13",ys:"14",akB:"15",agr:"16",ms:"17",a3B:"19",$b:"20"};
function ih(){aM.call(this,[9,9],!1,null,aM.Qu.abM);this.GL=null;this.Qi=[0,0];this.J7=V.w("div","padded scrollable");
this.J7.setAttribute("style","width:260px;  height:260px");this.EG.appendChild(this.J7);this.k(V.E.L,this.pz,this);
this.Q1=V.w("div","lpfoot");this.EG.appendChild(this.Q1);this.mb=[];var n="<svg  class=\"gsicon\" viewBox=\"0 0 14 18\" width=\"14\" height=\"18\" fill=\"black\">",F="</svg>",O=n+"<path d=\"M14,6 L10,6 L10,0 L4,0 L4,6 L0,6 L7,13 L14,6 L14,6 Z M0,14 L0,16 L14,16 L14,14 Z\" />"+F,I=n+"<path d=\"M0,2 L14,9 L0,16 Z\" />"+F;
this.and=n+"<circle cx=\"7\" cy=\"9\" r=\"6\" />"+F;this.aoX=n+"<path d=\"M2,4 L12,4 L12,14 L2,14 Z\" />"+F;
var x=[this.and,I,"lrs/folder","lrs/newlayer","lrs/bin",O],r=[[15,8,0],[5,8],[15,8,1],[15,8,2],[5,4],[1,2]];
for(var e=0;e<x.length;e++){var _=x[e];if(1<e&&e!=x.length-1)_="<img src=\""+PIMG[x[e]]+"\" class=\"gsicon\" />";
var d=new cg(_,!1,r[e]);d.k("click",this.Sf,this);this.Q1.appendChild(d._);this.mb.push(d)}}ih.prototype=new aM("");
ih.prototype.B=function(){aM.prototype.B.call(this);for(var e=0;e<this.mb.length;e++)this.mb[e].B()};
ih.prototype.Sf=function(n){var e=this.mb.indexOf(n.currentTarget),F=this.Qi,O=this.GL,I=O.vB;if(e==0){var x,r=O.GU;
if(I.length==0){alert("Create an Action Set first.");return}if(F.length<2){alert("Select a target action first.");
return}if(r==null){x=this.aoX;r=this.Qi}else{x=this.and;r=null}this.mb[0].YB(x);O.GU=r}else if(e==1)this.aj1();
else if(e==2||e==3){var _={WL:"Action Set "+I.length,Nv:[],exp:!0};if(e==2||I.length==0){F=[I.length];
I.push(_)}if(e==3){var d=I[F[0]].Nv;F=[F[0],d.length];d.push({WL:"Action "+d.length,color:0,Nv:[],agM:!1,shift:!1,exp:!0,FI:d.length})}this.Qi=F;
this.Xx()}else if(e==4){var w;if(F.length==1)w=I;else if(F.length==2)w=I[F[0]].Nv;else w=I[F[0]].Nv[F[1]].Nv;
var Z=F.length-1;w.splice(F[Z],1);if(w.length==0)F.pop();else while(F[Z]>=w.length)F[Z]--;if(F.length==0)F.push(0);
this.Xx()}else if(e==5){if(I.length==0){alert("No Actions Present.");return}var P=new k(V.E.P,!0);P.data={e:V.U.nG,abP:cf.S,Fw:F[0]};
this.A(P)}};ih.prototype.pz=function(n){var F=this.GL.vB,O=n.data.e,I=n.data.C7;if(O=="sel")this.Qi=I;
if(O=="fold"){if(I.length==1)F[I[0]].exp=!F[I[0]].exp;else F[I[0]].Nv[I[1]].exp=!F[I[0]].Nv[I[1]].exp}if(O=="enab"){var x=F[I[0]].Nv[I[1]].Nv[I[2]];
x.h=!x.h}if(O=="nchange"){if(I.length==1)F[I[0]].WL=n.data.I3;else F[I[0]].Nv[I[1]].WL=n.data.I3}this.Xx()};
ih.prototype.XW=function(n,F){this.GL=n;if(F==cf.S||F==cf.fo)this.Xx()};ih.prototype.Xx=function(){if(this.GL==null)return;
V.em(this.J7);var n=this.GL.vB;if(n.length==0)return;var F=JSON.stringify(this.Qi);for(var e=0;e<n.length;
e++){var O=n[e],I=new ih.YQ([e],F,O.exp,O.WL.split("=").pop());I.parent=this;this.J7.appendChild(I._);
if(!O.exp)continue;for(var x=0;x<O.Nv.length;x++){var r=O.Nv[x],I=new ih.YQ([e,x],F,r.exp,r.WL.split("=").pop());
I.parent=this;this.J7.appendChild(I._);if(!r.exp)continue;for(var _=0;_<r.Nv.length;_++){var d=r.Nv[_],I=new ih.YQ([e,x,_],F,null,hl.get(aV.ah1(d)),d.h);
I.parent=this;this.J7.appendChild(I._)}}}};ih.prototype.aj1=function(){var n=this.GL.vB,F=this.Qi;if(n.length==0){alert("No Actions Present");
return}if(F.length==1){alert("Select an Action first");return}if(this.GL.GU!=null){alert("You can not apply actions while recording actions");
return}if(F.length==1)F.push(0);var O=n[F[0]],I=O.Nv[F[1]],x=new k(V.E.P,!0);x.data={e:V.U.Tp,nD:[I.WL,O.WL]};
this.A(x)};ih.YQ=function(n,F,O,I,x){ch.call(this);this.C7=n;var r=this.C7.length-1;this._=V.w("div","layeritem"+(JSON.stringify(n)==F?" selected":""));
this.hR=V.w("div","head");this._.appendChild(this.hR);this.hR.setAttribute("style","height:24px");this.HO=V.w("div","headL");
this.hR.appendChild(this.HO);if(r!=0){var _=V.w("div");_.style.width=r*20+"px";this.HO.appendChild(_)}if(O!=null){var d=this.a5A=V.w("div",O?"open":"closed");
this.HO.appendChild(d)}else{var w=this.a1L=V.w("div","cmark");w.setAttribute("style","background-size:12px 12px; opacity:"+(x?1:.3));
this.HO.appendChild(w)}if(r==0){var Z=V.w("div","folder");this.HO.appendChild(Z)}var P=this.Ki=V.w("div","label");
P.textContent=I;this.HO.appendChild(P);this._.addEventListener("mouseup",this.rW.bind(this),!1)};ih.YQ.prototype=new ch;
ih.YQ.prototype.rW=function(n){if(n.detail==1&&n.target.tagName.toLowerCase()!="input"){var F="sel";
if(n.target==this.a5A)F="fold";if(n.target==this.a1L)F="enab";var O=new k(V.E.L,!0);O.data={e:F,C7:this.C7};
this.A(O)}else if(this.C7.length<3)var I=new aM.Yr(this.Ki,this.MB.bind(this))};ih.YQ.prototype.MB=function(n){var F=new k(V.E.L,!0);
F.data={e:"nchange",I3:n,C7:this.C7};this.A(F)};function aU(){aM.call(this,[9,3],!1,null,aM.Qu.pY);this.JN=null;
this.JM=null;this.GL=null}aU.prototype=new aM("");aU.prototype.jS=function(){var n=V.w("div","");this.EG.appendChild(n);
this.Wf=V.w("div","bordered cell");this.Wf.setAttribute("style","width:10em; height:28.5em;");n.appendChild(this.Wf);
this.ot=[];this.TE=null;this.lw=[];var F=this.a3q.bind(this);this.MG=[new aU.Rg,new aU.FY,new aU.gn,new aU.mw];
for(var e=0;e<this.MG.length;e++){var O=V.w("div","listitem"),I=this.MG[e].Cx,x=null;if(e==0){this.TE=new gD(I);
O.appendChild(this.TE._)}else{x=new cL(I,!1);x.k(V.E.L,this.ajM,this);O.appendChild(x._)}this.lw.push(x);
this.Wf.appendChild(O);this.ot.push(O);O.addEventListener("click",F,!1)}this.Vk=V.w("div","cell padded");
n.appendChild(this.Vk);for(var e=0;e<this.MG.length;e++)this.MG[e].k("brushchange",this.ajd,this);this.setItem(0);
this._Y=V.w("canvas","");this._Y.width=Math.floor(380*V.Z());this._Y.height=Math.floor(80*V.Z());V.z0(this._Y,this._Y.width,this._Y.height);
n.appendChild(this._Y);this.xX=this._Y.getContext("2d");this.lx()};aU.prototype.ax=function(){if(!V.Zo(this.EG))return;
if(this.Wf){this.lx();return}this.jS();this.B();this.XW(this.GL,cf.fo)};aU.prototype.B=function(){aM.prototype.B.call(this);
if(this.Wf==null)return;this.TE.B();for(var e=1;e<this.lw.length;e++)this.lw[e].B();for(var e=0;e<this.MG.length;
e++)this.MG[e].B()};aU.prototype.ajd=function(n){var F=this.MG.indexOf(n.currentTarget),O=JSON.parse(JSON.stringify(this.MG[F].JM)),I=new k(V.E.P,!0);
I.data={e:V.U.g7,b9:cf.jZ,JM:O};this.A(I)};aU.prototype.ajM=function(n){this.Iy(this.lw.indexOf(n.currentTarget),n.currentTarget.jQ())};
aU.prototype.a3q=function(n){var e=this.ot.indexOf(n.currentTarget);if(n.target.tagName.toLowerCase()=="input")return;
if(this.lw[e]&&!this.lw[e].jQ()){this.lw[e].kc();this.Iy(e,!0)}this.setItem(e)};aU.prototype.Iy=function(n,F){this.MG[n].DL(F)};
aU.prototype.setItem=function(n){for(var e=0;e<this.MG.length;e++)this.ot[e].setAttribute("class","listitem");
if(this.Vk.firstChild)this.Vk.removeChild(this.Vk.firstChild);this.ot[n].setAttribute("class","listitem selected");
this.Vk.appendChild(this.MG[n]._)};aU.prototype.XW=function(n,F){this.GL=n;if(this.Wf==null)return;if(F==cf.pY||F==cf.fo){this.JN=n.ke;
for(var e=0;e<this.MG.length;e++)this.MG[e].TU(this.JN)}if(F==cf.jZ||F==cf.fo){this.JM=n.ke.Kr;this.lx()}if(F==cf.dM)this.lx()};
aU.prototype.lx=function(){if(this.JM)this.enable();else{this.disable();return}if(!V.Zo(this.EG))return;
var n=this.GL;for(var e=0;e<this.MG.length;e++){this.MG[e].F(this.JM);if(this.lw[e])this.lw[e].F(this.MG[e].jQ())}var F=JSON.parse(JSON.stringify(this.JM));
F.Brsh.v.Dmtr.v.val=Math.min(F.Brsh.v.Dmtr.v.val,50);var O=new gv(0,0,this._Y.width,this._Y.height),I=new cb(F,this.JN?this.JN.J$:null,this.JN?this.JN.Gr:null,{c1:1},n.nE,n.sI,O),x=40*V.Z(),r=300*V.Z();
I.moveTo(x,x);for(var e=0;e<=r;e+=10)I.lineTo(x+e,x+20*Math.sin(2*Math.PI*e/r));I.finish();var _=this.xX.createImageData(O.d,O.v);
q.nF(I.El(),I.nJ(),_.data,O);this.xX.putImageData(_,0,0)};aU.NV=function(n){ch.call(this);this.Cx=n;
this._=V.w("div","");this.JM=null};aU.NV.prototype=new ch;aU.NV.prototype.TU=function(n){};aU.NV.prototype.F=function(n){this.JM=JSON.parse(JSON.stringify(n));
this._.setAttribute("class",this.jQ()?"":"disabled");this.lx()};aU.NV.prototype.DL=function(n){};aU.NV.prototype.jQ=function(){return!1};
aU.NV.prototype.B=function(){};aU.NV.prototype.lx=function(){};aU.NV.prototype.LE=function(){this.A(new k("brushchange"))};
aU.Rg=function(){aU.NV.call(this,[15,0]);this.JN=null;this.alv=null;this.xG=new iX(!0);this._.appendChild(this.xG._);
this.xG.k(V.E.L,this.aiT,this);this.xG._.style.height="10.7em";this.dG=new af([12,14,0],1,1e3," px",0,!0);
this.dG.k(V.E.L,this.ajG,this);this.Bi=new af([12,15],0,359," \xB0");this.Bi.k(V.E.L,this.aeO,this);
this.bR=new af([12,16],0,100," %");this.bR.k(V.E.L,this.a7O,this);this.qV=new af([12,17],0,100," %");
this.qV.k(V.E.L,this.anx,this);this.tX=new af([12,18],1,300," %");this.tX.k(V.E.L,this.a5m,this);this.ot=[this.dG,this.Bi,this.bR,this.qV,this.tX]};
aU.Rg.prototype=new aU.NV;aU.Rg.prototype.B=function(){this.dG.B();this.Bi.B();this.bR.B();this.qV.B();
this.tX.B()};aU.Rg.prototype.jQ=function(){return!0};aU.Rg.prototype.TU=function(n){this.JN=n;var F=[],O=Math.floor(30*V.Z()),I=Math.floor(40*V.Z());
for(var e=0;e<n.list.length;e++){var x=n.list[e].v,r=cb.JC(x,n.J$,n.Gr,O,I);F.push(r)}this.xG.Ea(F,null,O,I)};
aU.Rg.prototype.lx=function(){var n=this.JM.Brsh.v,F=n.classID!=this.alv;this.alv=n.classID;if(F)for(var e=0;
e<this.ot.length;e++)if(this._.contains(this.ot[e]._))this._.removeChild(this.ot[e]._);this.dG.F(n.Dmtr.v.val);
if(F)this._.appendChild(this.dG._);this.Bi.F(n.Angl.v.val);if(F)this._.appendChild(this.Bi._);if(n.classID=="computedBrush"||n.classID=="sampledBrush"){this.bR.F(n.Rndn.v.val);
if(F)this._.appendChild(this.bR._)}if(n.classID=="computedBrush"){this.qV.F(n.Hrdn.v.val);if(F)this._.appendChild(this.qV._)}this.tX.F(n.Spcn.v.val);
if(F)this._.appendChild(this.tX._)};aU.Rg.prototype.aiT=function(n){this.JM=this.JN.list[this.xG.u()].v;
this.LE()};aU.Rg.prototype.ajG=function(n){this.JM.Brsh.v.Dmtr.v.val=n.target.u();this.LE()};aU.Rg.prototype.aeO=function(n){this.JM.Brsh.v.Angl.v.val=n.target.u();
this.LE()};aU.Rg.prototype.a7O=function(n){this.JM.Brsh.v.Rndn.v.val=n.target.u();this.LE()};aU.Rg.prototype.anx=function(n){this.JM.Brsh.v.Hrdn.v.val=n.target.u();
this.LE()};aU.Rg.prototype.a5m=function(n){this.JM.Brsh.v.Spcn.v.val=n.target.u();this.LE()};aU.FY=function(){aU.NV.call(this,[15,1]);
this.Ol=new af([15,4,0],0,100," %");this.Ol.k(V.E.L,this.a8t,this);this._.appendChild(this.Ol._);this.qT=new af([15,4,1],0,100," %");
this.qT.k(V.E.L,this.abX,this);this._.appendChild(this.qT._);this.qi=new af([15,4,2],0,100," %");this.qi.k(V.E.L,this.a0F,this);
this._.appendChild(this.qi._);this.zR=new af([15,4,3],0,100," %");this.zR.k(V.E.L,this.a0u,this);this._.appendChild(this.zR._);
this.hJ=new af([15,4,4],0,100," %");this.hJ.k(V.E.L,this.a2S,this);this._.appendChild(this.hJ._)};aU.FY.prototype=new aU.NV;
aU.FY.prototype.B=function(){this.Ol.B();this.qT.B();this.qi.B();this.zR.B();this.hJ.B()};aU.FY.prototype.jQ=function(){return this.JM.useTipDynamics.v};
aU.FY.prototype.DL=function(n){this.JM.useTipDynamics.v=n;e1.t4.As(this.JM);this.LE()};aU.FY.prototype.lx=function(){var n=this.JM;
if(n.useTipDynamics.v==!1)return;this.Ol.F(n.szVr.v.jitter.v.val);this.qT.F(n.minimumDiameter.v.val);
this.qi.F(n.angleDynamics.v.jitter.v.val);this.zR.F(n.roundnessDynamics.v.jitter.v.val);this.hJ.F(n.minimumRoundness.v.val)};
aU.FY.prototype.a8t=function(n){this.JM.szVr.v.jitter.v.val=n.target.u();this.LE()};aU.FY.prototype.abX=function(n){this.JM.minimumDiameter.v.val=n.target.u();
this.LE()};aU.FY.prototype.a0F=function(n){this.JM.angleDynamics.v.jitter.v.val=n.target.u();this.LE()};
aU.FY.prototype.a0u=function(n){this.JM.roundnessDynamics.v.jitter.v.val=n.target.u();this.LE()};aU.FY.prototype.a2S=function(n){this.JM.minimumRoundness.v.val=n.target.u();
this.LE()};aU.gn=function(){aU.NV.call(this,[15,2]);this.Vn=new af([15,5,0],0,1e3," %");this.Vn.k(V.E.L,this.aak,this);
this._.appendChild(this.Vn._);this.$r=new af([15,5,1],1,20);this.$r.k(V.E.L,this.aht,this);this._.appendChild(this.$r._);
this.yJ=new af([15,5,2],0,100," %");this.yJ.k(V.E.L,this.a8z,this);this._.appendChild(this.yJ._)};aU.gn.prototype=new aU.NV;
aU.gn.prototype.B=function(){this.Vn.B();this.$r.B();this.yJ.B()};aU.gn.prototype.jQ=function(){return this.JM.useScatter.v};
aU.gn.prototype.DL=function(n){this.JM.useScatter.v=n;e1.t4.As(this.JM);this.LE()};aU.gn.prototype.lx=function(){var n=this.JM;
if(n.useScatter.v==!1)return;this.Vn.F(n.scatterDynamics.v.jitter.v.val);this.$r.F(n.Cnt.v);this.yJ.F(n.countDynamics.v.jitter.v.val)};
aU.gn.prototype.aak=function(n){this.JM.scatterDynamics.v.jitter.v.val=n.target.u();this.LE()};aU.gn.prototype.aht=function(n){this.JM.Cnt.v=n.target.u();
this.LE()};aU.gn.prototype.a8z=function(n){this.JM.countDynamics.v.jitter.v.val=n.target.u();this.LE()};
aU.mw=function(){aU.NV.call(this,[15,3]);this.bG=new af([15,6,0],0,100," %");this.bG.k(V.E.L,this.a6o,this);
this._.appendChild(this.bG._);this.nl=new af([15,6,1],0,100," %");this.nl.k(V.E.L,this.alT,this);this._.appendChild(this.nl._);
this.rc=new af([15,6,2],0,100," %");this.rc.k(V.E.L,this.aj6,this);this._.appendChild(this.rc._);this.bA=new af([15,6,3],0,100," %");
this.bA.k(V.E.L,this.an4,this);this._.appendChild(this.bA._)};aU.mw.prototype=new aU.NV;aU.mw.prototype.B=function(){this.bG.B();
this.nl.B();this.rc.B();this.bA.B()};aU.mw.prototype.jQ=function(){return this.JM.useColorDynamics.v};
aU.mw.prototype.DL=function(n){this.JM.useColorDynamics.v=n;e1.t4.As(this.JM);this.LE()};aU.mw.prototype.lx=function(){var n=this.JM;
if(n.useColorDynamics.v==!1)return;this.bG.F(n.clVr.v.jitter.v.val);this.nl.F(n.H.v.val);this.rc.F(n.Strt.v.val);
this.bA.F(n.Brgh.v.val)};aU.mw.prototype.a6o=function(n){this.JM.clVr.v.jitter.v.val=n.target.u();this.LE()};
aU.mw.prototype.alT=function(n){this.JM.H.v.val=n.target.u();this.LE()};aU.mw.prototype.aj6=function(n){this.JM.Strt.v.val=n.target.u();
this.LE()};aU.mw.prototype.an4=function(n){this.JM.Brgh.v.val=n.target.u();this.LE()};function fY(){aM.call(this,[9,0],!1,null,aM.Qu.dA);
this.EG.setAttribute("style","min-width:200px;");this._N=V.w("div","hpbody scrollable");this._N.style.height="160px";
this.EG.appendChild(this._N);this.a0x=-1;this.yA=[];this.GR=""}fY.prototype=new aM("");fY.prototype.hV=function(n){if(n==null){V.em(this._N);
this.GR="";return}V.em(this._N);var F=0;for(var e=0;e<n.history.length;e++)if(e<=n.ok&&!n.history[e].N$)F=e;
for(var e=0;e<n.history.length;e++){var O=n.history[e];if(O.N$)continue;var I=new bY(O,e,F);I.parent=this;
this._N.appendChild(I._);this.yA.push(I)}if(n.ok==n.history.length-1)this.ax()};fY.prototype.ax=function(){this._N.scrollTop=this._N.scrollHeight};
fY.prototype.B=function(){aM.prototype.B.call(this);for(var e=0;e<this.yA.length;e++)this.yA[e].B()};
function bY(n,e,F){ch.call(this);this.index=e;this._=V.w("div",e==F?"listitem selected":"listitem");
this.xt=n.name;this.B();if(e>F)this._.style.opacity=.4;this._.addEventListener("click",this.XS.bind(this),!1)}bY.prototype=new ch;
bY.prototype.B=function(){this._.textContent=hl.get(this.xt)};bY.prototype.XS=function(n){if(this.index==this.parent.a0x)return;
this.Fs({e:"h_itemchange",index:this.index})};bY.prototype.Fs=function(n){var F=new k(V.E.S,!0);F.data=n;
F.T=c.dA;this.A(F)};function b7(){aM.call(this,[9,10],!1,null,aM.Qu.a6k);var n=V.w("div","padded");this.EG.appendChild(n);
this.sC=new iz(256,!0);n.appendChild(this.sC._);this.sE=null}b7.prototype=new aM("");b7.prototype.hV=function(n){this.sE=n;
this.Xx()};b7.prototype.Xx=function(){var n=this.sE;if(!V.Zo(this.EG))return;if(n==null||n.C.length==0){this.sC.F(q.oN(q.f(4)));
return}var F=n.dH(),O=new gv(0,0,n.d,n.v),I=O.X();if(n.N){var x=n.N.rect,r=q.f(x.X()*4);q.nF(F,O,r,x);
q.DM(n.N.channel,r);F=r;O=x;var _=n.N.channel;I=0;for(var e=0;e<_.length;e++)I+=_[e];I=Math.round(I/255)}var d=q.oN(F);
d[0][255]+=3*(I-d[5]);for(var e=1;e<4;e++)d[e][255]+=I-d[5];this.sC.F(d,I)};b7.prototype.XW=function(n,F){this.sC.IU(hm.mE[n.d_]["--text-color"])};
b7.prototype.B=function(){aM.prototype.B.call(this);this.sC.B()};b7.prototype.ax=function(){this.Xx()};
function d5(){aM.call(this,[9,8],!1,null,aM.Qu.ald);this.J7=V.w("div","padded");this.EG.appendChild(this.J7);
this.l8=new hA(10);this.J7.appendChild(this.l8._);this.J7.appendChild(V.w("hr"));this.cv=new be;this.cv.parent=this;
this.J7.appendChild(this.cv.pq);this.l8.k(V.E.L,this.Ek,this);this.cv.k(V.E.L,this.Ek,this)}d5.prototype=new aM("");
d5.prototype.Ek=function(n){var F;if(n.target==this.l8)F=this.l8.u();else{var O=this.cv.u();F=Math.round(O.Q)<<16|Math.round(O.l)<<8|Math.round(O.O)}var I=new k(V.E.P,!0);
I.data={e:V.U.g7,b9:cf.dM,G1:0,G:F};this.A(I)};d5.prototype.XW=function(n,F){var O=n.nE,I=F==cf.fo;if(F==cf.dM||I){this.l8.F(O);
this.cv.F({Q:O>>>16&255,l:O>>>8&255,O:O>>>0&255,NL:"Color #"+q.c7(O)})}if(F==cf.RR||I){var x=n.akj;this.cv.TU(x)}};
function bO(){aM.call(this,[12,72],!1,null,aM.Qu.agr);this.x_=null;this.qE=null;this._N=V.w("div","lpbody scrollable");
this.Q1=V.w("div","lpfoot");this.EG.appendChild(this._N);this.EG.appendChild(this.Q1);this._3=[];this.k("click",this.c5,this);
this.J9=[];bO.Mx([[17,2],"Save Selection as Channel",[5,3],[5,4]],this.J9,this.Q1,this.y0.bind(this),this.TO.bind(this));
this.RP=new at([{name:"Merge Channels",RO:!0}]);this.RP.k("select",this.K7,this)}bO.prototype=new aM("");
bO.prototype.K7=function(n){if(this.qE==null)return;var F=new k(V.E.P,!0);F.data={e:V.U.n$,cU:"mergechannels"};
this.A(F)};bO.prototype.f5=function(){return this.RP};bO.Mx=function(n,F,O,I,x){for(var e=0;e<n.length;
e++){var r=new cg("W",!1,n[e]);F.push(r);V.CP(r._,I);O.appendChild(r._);var _=r._;_.addEventListener("drop",x,!1);
_.addEventListener("dragover",function(d){d.preventDefault()},!1);_.addEventListener("dragenter",V.ou,!1)}};
bO.PR=function(n,F){for(var e=0;e<n.length;e++)if(n[e]._==F.currentTarget)return e};bO.prototype.y0=function(n){var F=bO.PR(this.J9,n);
if(F==0)this.A(b4.PF(!0,null,n));else{F--;var O=new k(V.E.JA,!0),I={classID:"null"};if(F==0)I.null={t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]};
else if(F==1)I.Nw={t:"Objc",v:{classID:"Chnl",ClrI:{t:"enum",v:{MskI:"SlcA"}},Opct:{t:"long",v:50}}};
else I.null=aV.hd("Chnl",!0);O.data={oI:["duplicate","make","delete"][F],Mk:I};this.A(O)}};bO.prototype.TO=function(n){var F=bO.PR(this.J9,n);
if(F==2){var O=new k(V.E.JA,!0),I={classID:"null"};I.null=aV.hd("Chnl",!0);O.data={oI:"duplicate",Mk:I};
this.A(O)}else this.y0(n)};bO.prototype.Br=function(e){var n=this._3,F=n[e];if(F==null){var O=V.w("canvas");
F=O.getContext("2d");n.push(F)}return F};bO.prototype.c5=function(n){var F=this.x_.slice(0),O=n.data.FI,I=F[0]+F[1]+F[2],x=this.qE;
if(-5<O&&O<0){var r=-O-1;if(n.data.Rz){if(r==0)F=I==3?[0,0,0]:[1,1,1];else{if(F[r-1]==0)F[r-1]=1;else if(!0)F[r-1]=0}}else{if(r==0)F=[1,1,1];
else{F=[0,0,0];F[r-1]=1}x.P4=[]}var _=new k(V.E.S,!0);_.T=c.Ud;_.data={e:"setcls",o:F};this.A(_);return}if(-1<O){var d=x.t[O],w=d.vE==1?d.B1():d.Fa(x).r;
if(n.data.Rz)w.wC=!w.wC;else{for(var e=0;e<x.TM.length;e++)x.TM[e].wC=!1;x.P4=[]}}else{var Z=-O-5,w=x.TM[Z];
if(n.data.Rz)w.wC=!w.wC;else{for(var e=0;e<x.TM.length;e++)x.TM[e].wC=!1;w.wC=!0;x.P4=[Z]}}x.zB=x.T3=!0};
bO.prototype.ax=function(){this.I_()};bO.prototype.hV=function(n){this.qE=n;this.I_()};bO.prototype.I_=function(){var n=this.qE,F=this._N,d=34,w=34,v=4;
V.em(F);if(n==null||!V.Zo(F))return;var O=n.d,I=n.v,x=new gv(0,0,O,I),r=this.x_=n.a.o.slice(0),_=r[0]+r[1]+r[2];
if(O>I)w=Math.round(w*I/O);else d=Math.round(d*O/I);var Z=["RGB"].concat(dK.fd);for(var e=0;e<4;e++){var P=this.Br(e);
q.Sr.Y8(P,d,w,x,n.dH(),x,!1,e==0?null:e-1);var C=e==0?_==3:r[e-1]==1,W=new b4(-1-e,!0,!0,P,Z[e],C,C);
W.parent=this;F.appendChild(W._)}for(var e=0;e<n.C.length;e++){var L=n.t[n.C[e]],H=L.vE;if(H!=1&&H!=3)continue;
var y=H==1?L.B1():L.Fa(n).r,P=this.Br(v+e);v++;q.Sr.Tx(P,d,w,x,y);var W=new b4(n.C[e],!0,!0,P,L.getName()+(H==1?"":" Filter")+" Mask",!0,y.wC);
W.parent=this;F.appendChild(W._)}for(var e=0;e<n.TM.length;e++){var y=n.TM[e],P=this.Br(v+e);q.Sr.Tx(P,d,w,x,y);
var W=new b4(-5-e,!0,y.name=="Quick Mask",P,y.name,n.P4.indexOf(e)!=-1,y.wC,c.lo,{e:K._a,G1:"rnm",FI:e});
W.parent=this;F.appendChild(W._)}};bO.prototype.Kq=function(n,F){this._N.style.height=F-9-25+"px"};bO.prototype.B=function(){aM.prototype.B.call(this);
this.I_();bO.sk(this.J9,["lrs/makesel","lrs/mask","lrs/newlayer","lrs/bin"])};bO.sk=function(n,F){for(var e=0;
e<n.length;e++){var O=n[e];O.YB(V.WE(F[e]))}};function b4(n,F,O,I,x,r,_,d,w){ch.call(this);this._=V.w("div","layeritem");
this.adv=n;this.a3G=F;this.Vo=I;this.ahx=d;this.aoq=w;this.hR=V.w("div",r?"head selected":"head");this.hR.setAttribute("style","height: "+40+"px");
var Z=V.w("div","headL"),P=V.w("div","headR"),C=15;this._.appendChild(this.hR);this.hR.appendChild(Z);
this.hR.appendChild(P);this._x=V.w("div","eye");if(1<V.Z()&&V.Z()<1.5)C=C/V.Z();this._x.setAttribute("style","background-size: "+C+"px "+C+"px;");
this._x.style.opacity=_?1:.2;if(F)Z.appendChild(this._x);this.ht=V.w("div","thumb");if(I)this.ht.appendChild(I.canvas);
Z.appendChild(this.ht);this.bf=V.w("div","label");if(O)this.bf.style.fontStyle="italic";this.bf.textContent=hl.get(x);
Z.appendChild(this.bf);var W=this.hR;W.setAttribute("draggable","true");this.hR.addEventListener("mousedown",this.a1l.bind(this),!1);
if(!O)this.hR.addEventListener("mouseup",this.abO.bind(this),!1)}b4.prototype=new ch;b4.prototype.MB=function(n){var F=new k(V.E.S,!0);
F.T=this.ahx;F.data=this.aoq;F.data.name=n;this.A(F)};b4.prototype.a1l=function(n){var F=n.ctrlKey||n.metaKey,O=this.adv;
if(F&&n.target==this.Vo.canvas){this.A(b4.PF(this.a3G,O,n))}else{var I=new k("click",!0);I.data={FI:O,Rz:n.target==this._x,wf:F};
this.A(I)}};b4.prototype.abO=function(n){if(n.detail==2&&n.target==this.bf){var F=new aM.Yr(this.bf,this.MB.bind(this))}};
b4.PF=function(n,F,O){var I=0;if(O.shiftKey)I++;if(O.altKey)I+=2;var x=new k(V.E.S,!0);x.T=c.FT;if(n){if(-5<F&&F<0){x=new k(V.E.JA,!0);
x.data=c.pQ.sw(I,["RGB","Rd","Grn","Bl"][-1-F])}else x.data={e:"fromchannel",nD:[F,0,I]}}else x.data={e:"frompath",nD:[F,0,I]};
return x};function e4(){aM.call(this,[8,9],!1,null,aM.Qu.ms);this.x_=null;this.qE=null;this._N=V.w("div","lpbody scrollable");
this.Q1=V.w("div","lpfoot");this.EG.appendChild(this._N);this.EG.appendChild(this.Q1);this.EG.addEventListener("click",this.anX.bind(this),!1);
this._3=[];this.k("click",this.c5,this);this.J9=[];bO.Mx([[17,2],"Selection to Path",[5,3],[5,4]],this.J9,this.Q1,this.y0.bind(this),this.TO.bind(this))}e4.prototype=new aM("");
e4.prototype.y0=function(n){var F=bO.PR(this.J9,n),O;if(F==0)O=b4.PF(!1,null,n);else if(F==1){O=new k(V.E.JA,!0);
O.data={oI:"make",Mk:{classID:"null",null:{t:"obj ",v:[{t:"Clss",v:{classID:"Path"}}]},From:{t:"obj ",v:[{t:"prop",v:{classID:"csel",keyID:"fsel"}}]},Tlrn:{t:"UntF",v:{type:"#Pxl",val:2}}}}}else{var O=new k(V.E.S,!0);
O.T=c.jU;O.data={e:"pathedit",G1:["new","del"][F-2]}}this.A(O)};e4.prototype.TO=function(n){this.y0(n)};
e4.prototype.Br=function(e){var n=this._3,F=n[e];if(F==null){var O=V.w("canvas");F=O.getContext("2d");
n.push(F)}return F};e4.prototype.anX=function(n){if(n.target==this._N){var F=this.qE;F.f$=[];F.a5=[];
F.T3=!0;F.zB=!0}};e4.prototype.c5=function(n){var F=n.data.FI,O=this.qE,I=n.data.wf,x=0,r,_;if(F<0){x=-1-F;
r=O.f$;_=O.a5}else{var d=O.Y1()[0];for(var e=0;e<d.length;e++){var w=d[e].FI;if(w==F)break;if(w>=0)x++}r=O.a5;
_=O.f$}if(I){var Z=r.indexOf(x);if(Z==-1)r.push(x);else r.splice(Z,1)}else{while(r.length!=0)r.pop();
while(_.length!=0)_.pop();r.push(x)}O.T3=!0;O.zB=!0};e4.prototype.ax=function(){this.I_()};e4.prototype.hV=function(n){this.qE=n;
this.I_()};e4.prototype.I_=function(){var n=this.qE,F=this._N,d=34,w=34;V.em(F);if(n==null||!V.Zo(F))return;
var O=n.d,I=n.v,x=new gv(0,0,O,I),r=this.x_=n.a.o.slice(0),_=r[0]+r[1]+r[2];if(O>I)w=Math.round(w*I/O);
else d=Math.round(d*O/I);var Z=n.Y1(),P=Z[0];for(var e=0;e<P.length;e++){var C=P[e],W=this.Br(e);q.Sr.aoj(W,d,w,x,C.add.vmsk);
var v=new b4(C.FI,!1,C.FI>=0,W,C.name,Z[1].indexOf(e)!=-1,!1,c.jU,{e:"pathedit",G1:"rnm",FI:C.FI});v.parent=this;
F.appendChild(v._)}};e4.prototype.Kq=function(n,F){this._N.style.height=F-9-25+"px"};e4.prototype.B=function(){aM.prototype.B.call(this);
this.I_();bO.sk(this.J9,["lrs/makesel","lrs/makepath","lrs/newlayer","lrs/bin"])};function gG(n){aM.call(this,[9,n?4:5],!1,null,n?aM.Qu.ajX:aM.Qu.adF);
this.EG.setAttribute("style","min-width:240px;");this.aft=n;this.m7=null;this.GL=null}gG.prototype=new aM("");
gG.prototype.jS=function(){this.m7=new aj;var n=this.m7,F=this.EG;n.parent=this;if(this.aft){var O=V.w("div","marged");
F.appendChild(O);O.appendChild(n.ui._);F.appendChild(V.w("hr"));var I=V.w("div","marged");F.appendChild(I);
I.appendChild(n.R0._);I.appendChild(n.FX._);var x=V.w("div","marged");F.appendChild(x);x.appendChild(n.mu._);
x.appendChild(n.wF._);F.appendChild(V.w("hr"));var r=V.w("div","marged");F.appendChild(r);r.appendChild(n.u7._);
r.appendChild(n.Rp._);var _=V.w("div","marged");F.appendChild(_);_.appendChild(n.nX._);_.appendChild(n.dK._);
F.appendChild(V.w("hr"));var d=V.w("div","marged");F.appendChild(d);d.appendChild(n.GC._);d.appendChild(n.HE._);
d.appendChild(n.fp._);d.appendChild(n.IK._);d.appendChild(n.G8._);d.appendChild(n.BB._);d.appendChild(n.ec._);
d.appendChild(n.H_._)}else{var O=V.w("div","marged");F.appendChild(O);O.appendChild(n.JV._);O.appendChild(n.ri._);
O.appendChild(n.Th._);O.appendChild(n.a0s._);O.appendChild(n.a8F._);O.appendChild(n.a2k._);O.appendChild(n.a9S._);
F.appendChild(V.w("hr"));var I=V.w("div","marged");F.appendChild(I);I.appendChild(n.A$._);I.appendChild(n.MD._);
I.appendChild(n.zD._);F.appendChild(V.w("hr"));var x=V.w("div","marged");F.appendChild(x);x.appendChild(n.V6._);
x.appendChild(n.Aj._);x.appendChild(n.ku._)}};gG.prototype.ax=function(){if(!V.Zo(this.EG))return;if(this.m7==null){this.jS();
var n=this.GL;if(n)this.m7.F(n.tV,n.sH,n.vp);this.m7.B()}};gG.prototype.B=function(){aM.prototype.B.call(this);
if(this.m7)this.m7.B()};gG.prototype.XW=function(n,F){this.GL=n;if(F!=cf.fo&&F!=cf.cu&&F!=cf.hx&&F!=cf.TN)return;
if(this.m7)this.m7.F(n.tV,n.sH,n.vp)};function d$(){aM.call(this,[9,13],!1,null,aM.Qu.a3B);this.GL=null;
this.a1P=null;this.a0f=null;this.HV=null;this.a7I=null;this.VI=Math.round(290*V.Z());this.Dc=8;this.a8U=4;
this._O=new bf(null,["Hi","Hello"]);this._O.k(V.E.L,this.vU,this);var n=this.Pi=new cg("-",null,null,!0);
n.k("click",this.Nk,this);var F=this.a2W=new cg("+",null,null,!0);F.k("click",this.Nk,this);this.rJ=new iX(!1);
this.rJ.k(V.E.L,this.f4,this);this.rJ._.style.height=20+"em";var O=V.w("div","padded");O.setAttribute("style","width:"+(this.VI+10)/V.Z()+"px;");
this.EG.appendChild(O);var top=V.w("div");top.setAttribute("style","margin-bottom:0.5em");O.appendChild(top);
top.appendChild(this._O._);top.appendChild(n._);top.appendChild(F._);O.appendChild(this.rJ._)}d$.prototype=new aM("");
d$.prototype.f4=function(n){var F=this.rJ.u()*this.Dc*this.a8U,O=Math.floor(this.VI/this.Dc)/V.Z(),I=this.rJ.aoY();
F+=Math.floor(I.y/O)*this.Dc;F+=Math.floor(I.x/O);var x=this.HV[this._O.u()];if(F>=x.length)return;var r=x[F],_=this.a7I[r];
if(_.lv.length==0){alert("No known character for this glyph");return}var d=String.fromCodePoint(_.lv[0]),w=new k(V.E.S,!0);
w.T=c.ua;w.data={e:"insertText",G:d};this.A(w)};d$.prototype.Nk=function(n){this.Dc+=n.target==this.Pi?1:-1;
this.Dc=Math.max(1,Math.min(20,this.Dc));this.vU()};d$.prototype.ax=function(){this.XW(this.GL)};d$.prototype.XW=function(n,F){this.GL=n;
if(!V.Zo(this.EG))return;var O=n.tV,I=O.Bw.Font,w=0;if(I==null)return;var x=O.D0[I].Name;if(this.a1P==x)return;
var I=n.sH.rs(x);if(I==null)return;var r=I.maxp.numGlyphs,_=this.a7I=new Array(r);for(var e=0;e<r;e++)_[e]={lv:[]};
var d=Date.now(),Z=new Uint8Array(1048575);for(var e=0;e<1048575;e++){var P=Typr.U.codeToGlyph(I,e);
if(P!=0&&P<r){Z[e]=1;if(_[P].lv.length==0)w++;_[P].lv.push(e)}}var C=d$.__,W=[];for(var e=0;e<C.length;
e++)W.push([]);for(var P=1;P<r;P++){W[0].push(P);var v=_[P].lv[0];if(v==null){continue}for(var L=1;L<C.length;
L++){var H=C[L].qX;for(var e=0;e<H.length;e+=2)if(H[e]<=v&&v<=H[e+1]){W[L].push(P);break}}}this.HV=W;
var y=[];for(var e=0;e<C.length;e++)y.push(C[e].Gm+" ("+W[e].length+")");var g=this._O.u();this._O.SY(y);
this._O.F(g);this.a1P=x;this.a0f=I;this.vU()};d$.prototype.vU=function(n){var F=this.HV[this._O.u()],O=F.length,I=this.a0f,x=Typr.U,r=Math.floor(this.VI/this.Dc),_=r,d=_*.8,w=_*.8/I.head.unitsPerEm,Z=[],P=V.w("canvas"),C=P.getContext("2d"),W=this.Dc,v=Math.ceil(O/W),L=this.a8U;
P.width=r*W;P.height=_*L;C.strokeStyle="rgba(0,0,0,0.3)";var H=Date.now();for(var y=0;y<v;y+=L){C.fillStyle="white";
C.fillRect(0,0,W*r,_*L);for(var g=0;g<L;g++){for(var Q=0;Q<W;Q++){var e=F[(y+g)*W+Q];if(e==null)break;
var J=x.glyphToPath(I,e),A=q.z.gh(J.crds);if(!A.D2()){C.fillStyle="#252525";C.beginPath();var p=Q*r+(r-A.d*w)*.5-A.x*w,U=g*_+d;
C.translate(p,U);C.scale(w,-w);x.pathToContext(J,C);C.scale(1/w,-1/w);C.translate(-p,-U);C.fill()}}}C.beginPath();
for(var Q=0;Q<W;Q++){var j=Q*r+r+.5;C.moveTo(j,0);C.lineTo(j,_*L)}for(var g=0;g<L;g++){var b=g*_+_+.5;
C.moveTo(0,b);C.lineTo(W*r,b)}C.stroke();Z.push(P.toDataURL("image/png"))}this.rJ.Ea(Z,null,r*W,_*L)};
d$.__=[{Gm:"All Glyphs"},{Gm:"Basic Latin, Latin 1",qX:[0,127,128,143]},{Gm:"Latin Extended-A",qX:[256,383]},{Gm:"Latin Extended-B",qX:[384,591]},{Gm:"Punctuations",qX:[33,35,37,39,42,42,44,44,46,47,58,59,63,63,64,64,92,92,161,161,167,167,182,183,191,191,894,894,903,903,1370,1375,1417,1417,8192,8303,11776,11903]},{Gm:"Greek",qX:[880,1023]},{Gm:"Cyrillic",qX:[1024,1279]},{Gm:"Hebrew",qX:[1424,1535]},{Gm:"Arabic",qX:[1536,1791]},{Gm:"Emoji",qX:[9728,10095,127744,129535]}];
function bB(){aM.call(this,[13,0],!1,null,aM.Qu.dM);this.QO=0;this.ahs=0;this.GL=null;var n=V.w("div","flexrow padded");
this.EG.appendChild(n);var F=V.w("div");n.appendChild(F);this.M9=[];for(var e=0;e<2;e++){var O=new aR;
this.M9.push(O);O.k("click",this.a2z,this);F.appendChild(O._)}this.td=new dH(192);this.td.k(V.E.L,this.vd,this);
n.appendChild(this.td._)}bB.prototype=new aM("");bB.prototype.a2z=function(n){this.QO=this.M9.indexOf(n.currentTarget);
this.Xx()};bB.prototype.vd=function(n){var F=this.td.u();this.td.F(F);var O=Math.round(F.Q*255)<<16|Math.round(F.l*255)<<8|Math.round(F.O*255),I=new k(V.E.P,!0);
I.data={e:V.U.g7,b9:cf.dM,G1:this.QO,G:O};this.A(I);this.ahs=Date.now()};bB.prototype.Xx=function(){var n=this.GL,F=this.QO,O=[n.nE,n.sI];
for(var e=0;e<2;e++){var I=this.M9[e],x=I._.style;I.IU(O[e]);if(e==F)delete x.borderColor;else x.borderColor="var(--bg-color)"}var r=O[F];
if(Date.now()-this.ahs>100)this.td.F({Q:(r>>>16)/255,l:(r>>>8&255)/255,O:(r&255)/255})};bB.prototype.XW=function(n,F){this.GL=n;
if(F==cf.fo||F==cf.dM)this.Xx()};bB.prototype.ax=function(){this.Xx()};function eL(){aM.call(this,"CSS",!1,null,aM.Qu.CSS);
this.sE=null;var n=V.w("div","padded");this.EG.appendChild(n);this.iS=V.w("textarea");this.iS.setAttribute("rows",16);
this.iS.setAttribute("style","display:block;tab-size:4; font-family:monospace; width:98%; min-width:270px;");
n.appendChild(this.iS)}eL.prototype=new aM("");eL.prototype.hV=function(n){this.sE=n;this.Xx()};eL.prototype.XW=function(n,F){if(F==cf.hx)this.Xx()};
eL.prototype.Xx=function(){var n=this.sE;if(n==null||n.C.length==0)return;if(!V.Zo(this.EG))return;var F=n.t[n.C[0]],O=CSS.ae8(F,n);
if(O.length!=0)this.iS.value=O.join(";\n")+";";else this.iS.value=""};eL.prototype.ax=function(){this.Xx()};
function f_(){aM.call(this,[9,6],!1,null,aM.Qu.a95);this.EG.setAttribute("style","min-width:240px;");
this.sE=null;this.GL=null;var n=V.w("div","marged row");this.EG.appendChild(n);var F=V.w("div","cell");
F.setAttribute("style","width:10em");n.appendChild(F);var O=V.w("div","cell");O.setAttribute("style","width:10em");
n.appendChild(O);this.a7$=[];for(var e=0;e<4;e++){var I=new gD("");this.a7$.push(I);F.appendChild(I._);
V.Zq(F)}this.EG.appendChild(V.w("hr",""));var x=V.w("div","marged row");this.EG.appendChild(x);var F=V.w("div","cell");
F.setAttribute("style","width:10em");var O=V.w("div","cell");O.setAttribute("style","width:10em");x.appendChild(F);
x.appendChild(O);this.Zg=new gD("");F.appendChild(this.Zg._);V.Zq(F);this._P=new gD("");F.appendChild(this._P._);
this.Cl=new gD("");O.appendChild(this.Cl._);V.Zq(O);this.d1=new gD("");O.appendChild(this.d1._);this.Zg.F("X: 100 px");
this._P.F("Y: 100 px");this.Cl.F("W: 0");this.d1.F("H: 0")}f_.prototype=new aM("");f_.prototype.RL=function(n,F,O,I,x){if(!V.Zo(this.EG)||n==null)return;
var r=n.a.jR(x.x,x.y),_=new aE(Math.floor(r.x),Math.floor(r.y));if(!x.rt){var d=0,w=0,Z=0,P=0,C=this.a7$;
if(!x.rt&&!n.a6A()&&new gv(0,0,n.d-1,n.v-1).JX(_)){var W=n.dH(),e=n.d*_.y+_.x<<2;d=W[e+0];w=W[e+1];Z=W[e+2];
P=W[e+3]}C[0].F("R: "+d);C[1].F("G: "+w);C[2].F("B: "+Z);C[3].F("A: "+P)}this.Zg.F("X: "+q.Mm.xp(_.x,n.gC,O,n.d));
this._P.F("Y: "+q.Mm.xp(_.y,n.gC,O,n.v));this.QJ()};f_.prototype.QJ=function(){var n=this.sE,F=this.GL,O=0,I=0;
if(n&&F){if(n.a.LL){O=n.a.LL.d;I=n.a.LL.v}else if(n.N){O=n.N.rect.d;I=n.N.rect.v}O=q.Mm.xp(Math.abs(O),n.gC,F,n.d);
I=q.Mm.xp(Math.abs(I),n.gC,F,n.v)}this.Cl.F(hl.get([12,41]).charAt(0)+": "+O);this.d1.F(hl.get([12,42]).charAt(0)+": "+I)};
f_.prototype.B=function(){aM.prototype.B.call(this);this.QJ()};f_.prototype.hV=function(n,F,O){this.sE=n;
this.GL=O;this.QJ()};function gB(){aM.call(this,[9,1],!1,null,aM.Qu.lo);this.S4=null;this.KH=null;this.Ii=null;
this.hR=V.w("div","lphead");this._N=V.w("div","lpbody scrollable");this.Q1=V.w("div","lpfoot");this.It=new bf(null,fk.w9,!1,fk.uv);
this.It.k(V.E.L,this.a7b,this);this.hR.appendChild(this.It._);this.J2=new cR([12,0],0,100,"%",0);this.J2.k(V.E.L,this.a0C,this);
this.J2.parent=this;this.hR.appendChild(this.J2._);this.jr=new bo([6,57,2],["<img src=\""+PIMG.trsp3+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["tools/brush"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.pos+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG["lrs/lock"]+"\" class=\"autoscale gsicon\" />"],!0,["Transparency",[12,76,2],[12,40],[7,0]]);
this.jr.k(V.E.L,this.alZ,this);this.hR.appendChild(this.jr._);this.Fu=new cR([12,26],0,100,"%",0);this.Fu.k(V.E.L,this.amw,this);
this.Fu.parent=this;this.hR.appendChild(this.Fu._);this.J9=[];this.Mx();this.EG.appendChild(this.hR);
this.EG.appendChild(this._N);this._N.addEventListener("dragover",function(O){O.preventDefault()},!1);
this._N.addEventListener("dragenter",V.ou,!1);this._N.addEventListener("drop",this.a8h.bind(this),!1);
this.EG.appendChild(this.Q1);this.EG.addEventListener("contextmenu",V.ou,!1);var n=cU.um(!0),F=cU.Gy(!0);
this.ago=new at(n,F);var n=[{name:[14,10]},{name:[14,11],dP:!0},{name:[6,0]},{name:[11,4]},{name:[5,4],dP:!0},{name:[6,7]},{name:"New Smart Obj. via Copy",h:function(O){return{h:O.t[O.C[0]].add.SoLd!=null}},dP:!0},{name:[6,8],h:function(O){var I=O.t[O.C[0]];
if(I.add.TySh||I.add.SoLd||I.add.SoCo||I.add.GdFl||I.add.PtFl)return{h:!0};return{h:!1}}},{name:[6,34],h:function(O){var I=O.t[O.C[0]];
return{h:I.add.lmfx!=null&&!I.Ja()}}},{name:[6,40],dP:!0,h:function(O){var I=O.t[O.C[0]];return{h:I.add.TySh!=null}}},{name:"",dP:!0,h:function(O){var I=O.t[O.C[0]],x=I.add.TySh,r=x?x.Vb:null;
return{h:x!=null&&r.Curve==null,CL:hl.get(x&&bt.oB(r)==0?[16,3,1]:[16,3,0])}}},{name:[6,6,0],dP:!0,h:function(O){return{h:O.ZP(O.C[0]),mN:O.t[O.C[0]].fc}}},{name:[11,6],dP:!0,sub:[{name:[5,1],h:function(O){var I=O.t[O.C[0]];
return{h:I.add.lmfx!=null}}},{name:[5,2]},{name:[2,2],h:function(O){var I=O.t[O.C[0]];return{h:I.add.lmfx!=null}}}]},{name:[6,10],h:function(O){return{h:O.C.length==1&&O.C[0]!=0&&!O.t[O.C[0]].Ja()}}},{name:[6,12,0],h:function(O){return{h:O.C.length>1||O.t[O.C[0]].Ja()}}},{name:[6,12,1],dP:!0},{name:[13,0],sub:function(){var O=[[13,1,0],[13,1,1],[13,1,2],[13,1,3],[13,1,4],[13,1,5],[13,1,6],[13,1,7]],I=[];
for(var e=0;e<O.length;e++)I.push({name:O[e]});return I}()}],F=[{g:V.E.P,i:{e:V.U.n$,cU:"layerstyle"}},{g:V.E.S,T:c.FT,i:{e:"fromlayer",nD:[null,0,0]}},{g:V.E.S,T:c.lo,i:{e:K.bn}},{g:V.E.P,i:{e:V.U.n$,cU:"duplinto"}},{g:V.E.S,T:c.lo,i:{e:K.C9}},{g:V.E.JA,i:{oI:"newPlacedLayer"}},{g:V.E.S,T:c.lo,i:{e:K.GB}},{g:V.E.JA,i:{oI:"rasterizeLayer",Mk:{classID:"rasterizeLayer",null:aV.hd("Lyr",!0)}}},{g:V.E.S,T:c.lo,i:{e:K.FB}},{g:V.E.S,T:c.lo,i:{e:K.Ds}},{g:V.E.S,T:c.ua,i:{e:"switchPntPrgr"}},{g:V.E.S,T:c.lo,i:{e:K.Eu}},{sub:[{g:V.E.S,T:c.UQ,i:{e:"st_copy"}},{g:V.E.S,T:c.UQ,i:{e:"st_paste"}},{g:V.E.S,T:c.UQ,i:{e:"st_clear"}}]},{g:V.E.S,T:c.lo,i:{e:K.Vu}},{g:V.E.S,T:c.lo,i:{e:K.W9}},{g:V.E.S,T:c.lo,i:{e:K.BW}},{sub:function(){var O=[];
for(var e=0;e<8;e++)O.push({g:V.E.S,T:c.lo,i:{e:K.OZ,a5Y:e}});return O}()}];this.Vk=new at(n,F);var n=[{name:[6,45],h:function(O){var I=O.t[O.C[0]];
return{h:I.Fa(O).r==null}}},{name:[6,47]}],F=[{g:V.E.S,T:c.lo,i:{e:K.jo}},{g:V.E.S,T:c.lo,i:{e:K.r_}}];
this.anN=new at(n,F);var n=[{name:"enab/disab",h:function(O){return{CL:hl.get(O.t[O.C[0]].B1().isEnabled?[6,15]:[6,14])}}},{name:[6,22]},{name:[5,8],h:function(O){return{h:O.f7(!1,!0)}}}],F=[{g:V.E.S,T:c.lo,i:{e:K.ub}},{g:V.E.S,T:c.lo,i:{e:K.ad}},{g:V.E.S,T:c.lo,i:{e:K.v2}}];
this.a4s=new at(n,F);var n=[{name:"enab/disab",h:function(O){return{CL:hl.get(O.t[O.C[0]].Fa(O).r.isEnabled?[6,42]:[6,41])}}},{name:[6,46]}],F=[{g:V.E.S,T:c.lo,i:{e:K.Vd}},{g:V.E.S,T:c.lo,i:{e:K.jM}}];
this.aop=new at(n,F);var n=[{name:"enab/disab",h:function(O){return{CL:hl.get(O.t[O.C[0]].add.vmsk.isEnabled?[6,17]:[6,16])}}},{name:[6,24]}],F=[{g:V.E.S,T:c.lo,i:{e:K.r4}},{g:V.E.S,T:c.lo,i:{e:K.$t}}];
this.ak1=new at(n,F);this.a2L=new at(cU.i0(!0),cU.II(!0));this.a73=new at(cU.um(),cU.Gy());this.k("rclick",this.a0U,this)}gB.prototype=new aM("");
gB.prototype.a8h=function(n){V.ou(n);var F=n.dataTransfer.getData("Text"),O=1,I=0;if(F==""){V.bN(n,this,this.Ii.indexOf(this.KH),I+(O>.5?0:1))}else if(F!="--panel"){var F=JSON.parse(F),x=F.j5;
if(x=="l")this.Fs({e:K.sV,source:F.Fw,target:I,q4:O})}};gB.prototype.MY=function(){return new aE(253,0)};
gB.prototype.a0U=function(n){var F=this.KH,O=n.data,x;if(F.C.indexOf(O.$)==-1){var I={e:K.Vp,$:n.target.tO.index,Co:O.vE};
this.Fs(I)}if(F.C.indexOf(O.$)==-1)return;if(O.vE==1){x=this.a4s}else if(O.vE==2){x=this.ak1}else if(O.vE==3){x=this.aop}else if(O.vE==4){x=this.anN}else if(O.vE==5){x=this.ago}else{x=this.Vk}x.B();
x.update(F);x.parent=this;var r=new k(V.E.P,!0);r.data={e:V.U.di,AM:x,x:O.RK.x+1,y:O.RK.y+1};this.A(r)};
gB.prototype.B=function(){aM.prototype.B.call(this);this.It.B();this.J2.B();this.jr.B();this.Fu.B();
if(this.KH)this.hV(this.KH);var n="lrs/link lrs/fx lrs/adj lrs/mask lrs/folder lrs/newlayer lrs/bin".split(" ");
for(var e=0;e<this.J9.length;e++){var F=this.J9[e];F.YB(V.WE(n[e]))}};gB.prototype.hV=function(n,F){if(n&&!n._y)return;
if(n==null)V.fx(this.EG,"disabled");else V.aE(this.EG,"disabled");this.KH=n;this.Ii=F;if(this.S4!=null){this._N.removeChild(this.S4._N);
this.S4=null}if(n==null)return;this.S4=new hI(n.root,this,n,{eF:0});this._N.appendChild(this.S4._N);
if(n.C.length==0||n.t[n.C[0]]==null)V.fx(this.hR,"disabled");else{V.aE(this.hR,"disabled");if(n.C.length==1&&n.wD)this.S4.Fx(n.C);
var O=n.t[n.C[0]];if(O.Ja()){this.It.SY([[15,10,27]].concat(fk.w9),[1].concat(fk.uv));var I=fk.Dy.indexOf(O.mf);
this.It.F(I+1)}else{this.It.SY(fk.w9,fk.uv);var I=fk.Dy.indexOf(O.mf);this.It.F(I)}this.J2.F(Math.round(100*O.opacity/255));
this.jr.F([O.LF(0),O.LF(1),O.LF(2),O.LF(31)]);this.Fu.F(Math.round(100*(O.add.iOpa!=null?O.add.iOpa/255:1)))}};
gB.prototype.Kq=function(n,F){var O=this.hR.getBoundingClientRect().height,I=59;if(O>70)I=84;if(O>100)I=108;
var x=F-(I+37);this._N.style.height=x+"px"};gB.prototype.a7b=function(n){this.Fs({e:K.SG,Qj:this.It.u()})};
gB.prototype.a0C=function(n){this.Fs({e:K.nM,Qj:Math.round(255*this.J2.u()/100)})};gB.prototype.alZ=function(n){this.Fs({e:K.ll,Qj:[this.jr.u(),[0,1,2,31]]})};
gB.prototype.amw=function(n){this.Fs({e:K.BM,Qj:Math.round(255*this.Fu.u()/100)})};gB.prototype.a75=function(n){this.R8(n,this.a2L)};
gB.prototype.agF=function(n){this.R8(n,this.a73)};gB.prototype.R8=function(n,F){var O=n.currentTarget;
if(V.Zo(F._))return;n.stopPropagation();var I=O.getBoundingClientRect();F.B();F.update(this.KH);F.parent=this;
var x=new k(V.E.P,!0);x.data={e:V.U.di,AM:F,x:I.left,y:I.top,a2c:!0};this.A(x)};gB.prototype.alS=function(n){this.Fs({e:K.ed})};
gB.prototype.a87=function(n){this.Fs({e:this.KH.C.length>1?K.dd:K.R1})};gB.prototype.ae4=function(n){this.Fs({e:K.SP})};
gB.prototype.acq=function(n){this.Fs({e:K.C9})};gB.prototype.afd=function(n){this.Fs({e:K.cb})};gB.prototype.Fs=function(n){var F=new k(V.E.S,!0);
F.data=n;F.T=c.lo;this.A(F)};gB.prototype.Mx=function(){var n=[[6,54,0],[11,6],[6,1],[6,21],[6,20],[6,13],[6,31]],F=[this.afd,this.agF,this.a75,this.alS,this.a87,this.ae4,this.acq],O=this.an0.bind(this);
for(var e=0;e<n.length;e++){var I=new cg("W",!1,n[e]);this.J9.push(I);V.CP(I._,F[e].bind(this));this.Q1.appendChild(I._);
if(e>=n.length-3){var x=I._;x.addEventListener("drop",O,!1);x.addEventListener("dragover",function(r){r.preventDefault()},!1);
x.addEventListener("dragenter",V.ou,!1)}}};gB.prototype.an0=function(n){V.ou(n);var F=0,O=this.J9;while(O[F]._!=n.currentTarget)F++;
O[F].KG();var I=n.dataTransfer.getData("Text");if(I=="")return;var I=JSON.parse(I);if(I.j5=="l"){var x={e:[K.dd,K.bn,K.C9][F-4]};
if(this.KH.C.indexOf(I.Fw)==-1)x.$=I.Fw;this.Fs(x)}if(F!=6)return;if(I.j5=="sm"||I.j5=="s"){var r=new k(V.E.S,!0);
r.T=c.UQ;r.data={e:I.j5=="sm"?"st_clear":"st_delsingle",$:I.Fw,Fw:I.h$};this.A(r)}if(I.j5=="fm"||I.j5=="f"){this.Fs({e:I.j5=="fm"?K.r_:K.vN,src:I.Fw,h$:I.h$})}if(I.j5=="m"||I.j5=="vm"){this.Fs({e:I.j5=="m"?K.ad:K.$t,$:I.Fw})}};
function hI(n,F,O,I){ch.call(this);this.parent=F;this.tO=n;this.xz=[];this._=V.w("div","layeritem");
var x=n.$,Q=15,N=!1;this.hR=V.w("div",O.C.indexOf(n.index)!=-1?"head selected":"head");if(n.$.add.artb!=null)V.fx(this.hR,"artb");
this.hR.setAttribute("style","height: "+(x.a4z+10)+"px");var r=V.w("div","headL"),_=V.w("div","headR"),d=V.w("div","lpineck");
this._N=V.w("div","lpibody");this._.appendChild(this.hR);this.hR.appendChild(r);this.hR.appendChild(_);
if(x.NN()||x.z3())if(x.o_())this._.appendChild(d);var w=this.hR;w.setAttribute("draggable","true");w.addEventListener("dragstart",this.qe.bind(this),!1);
w.addEventListener("drop",this.X1.bind(this),!1);w.addEventListener("dragover",this.H4.bind(this),!1);
w.addEventListener("dragenter",V.ou,!1);w.addEventListener("dragleave",this.lG.bind(this),!1);var Z=[],P=[],C=V.w("div");
this._x=V.w("div","eye");C.appendChild(this._x);var W=V.w("div","space");this.bf=V.w("div","label");
this.bf.setAttribute("style","max-width:calc(100% - "+(96+n.depth*20)+"px)");this.bf.textContent=x.getName();
this.dq=V.w("div","lock");this.ag$=V.w("div","lrfx");this.fW=V.w("div","arfx");var v=this.aag.bind(this),L=this.a1Q.bind(this);
this.hR.addEventListener("click",L,!1);this.hR.addEventListener("contextmenu",v,!1);var H=[0,16711680,16748544,16763904,4513024,22015,11141375,7829367],y=x.add.lclr==null?0:H[x.add.lclr];
if(y==0)y=I.eF;var g=[y>>16,y>>8&255,y&255];for(var e=0;e<3;e++){g[e]=Math.round(.5*g[e]+.5*220)}if(1<V.Z()&&V.Z()<1.5)Q=Q/V.Z();
C.setAttribute("style","background-color:rgba("+g.join(",")+","+(y==0?0:1)+");");this._x.setAttribute("style","background-size: "+Q+"px "+Q+"px;");
var J=this.aet.bind(this);C.addEventListener("mousedown",J,!1);C.addEventListener("mouseover",J,!1);
this.bf.addEventListener("pointerup",this.a1T.bind(this),!1);this.fW.addEventListener("click",this.aoF.bind(this),!1);
Z[0]=C;Z[1]=W;Z[10]=this.bf;function A(co,iM,w){var hs=iM.canvas;if(w)co.setAttribute("draggable","true");
co.appendChild(hs);hs.setAttribute("style",hs.getAttribute("style")+"; pointer-events:none")}if(x.Ja()){var p=V.w("div","arrow"),U=V.w("div","folder");
p.addEventListener("click",this.ad5.bind(this),!1);Z[2]=p;Z[3]=U;if(x.add.lsct==ho.x7){for(var e=n.children.length-1;
e>=0;e--){var j=new hI(n.children[e],F,O,{eF:y});this.xz.push(j);this._N.appendChild(j._)}this._.appendChild(this._N)}p.setAttribute("class",x.add.lsct==ho.x7?"open":"closed")}else{this.ht=V.w("div","thumb");
Z[5]=this.ht;A(this.ht,x.bk)}var b=x.B1();if(b){this.f6=V.w("div","chain");this.KY=V.w("div","thumb");
A(this.KY,n.$.afY,!0);this.f6.style.opacity=b.Tu?1:0;this.f6.addEventListener("click",this.aao.bind(this),!1)}var s=x.zX()&&x.add.vmsk;
if(x.add.vmsk&&!s){this.XY=V.w("div","chain");this.$B=V.w("div","thumb");A(this.$B,n.$.a5y,!0);this.XY.style.opacity=x.add.vmsk.Tu?1:0;
this.XY.addEventListener("click",this.a80.bind(this),!1)}if(x.z3()&&x.Fa(O).r){this._Z=V.w("div","thumb");
A(this._Z,n.$.a4E,!1);this._Z.addEventListener("click",L,!1);this._Z.addEventListener("contextmenu",v,!1)}if(x.NN()){this.af2=d;
d.addEventListener("contextmenu",v,!1);var G=new gB.jm(hl.get([12,1]),"sm","layerstyle",n.depth,0,null);
G.parent=this;d.appendChild(G._);var T=x.add.lmfx,z=T.masterFXSwitch.v;G.tt(z);for(var e=0;e<bW.order.length;
e++){var m=T[bW.jV[e]].v;if(m.length==0)continue;for(var $=0;$<m.length;$++){var G=new gB.jm(hl.get(bW.names[e]),"s","layerstyle",n.depth,1,[e,$]);
G.tt(z&&m[$].v.enab.v);G.parent=this;d.appendChild(G._)}}}if(x.z3()){var G=new gB.jm(hl.get([12,55]),"fm",null,n.depth,0,-1,x.Fa(O).r?this._Z:null);
G.parent=this;d.appendChild(G._);this.a8g=G._;this.a8g.addEventListener("contextmenu",v,!1);var T=x.add.SoLd.filterFX.v,o=T.filterFXList.v,z=T.enab.v;
G.tt(z);for(var e=o.length-1;e>=0;e--){var h=o[e].v,X=bS._0(h);if(dK.kK[X])X=dK.kK[X];var D=h.Nm.v;if(bS.names[X])D=hl.get(bS.names[X]);
if(dK.names[X])D=hl.get(dK.names[X]);var f="afw_"+X,G=new gB.jm(D,"f",f,n.depth,1,e);G.tt(z&&h.enab.v);
G.parent=this;d.appendChild(G._)}}if(O.t.indexOf(x)==O.C[0]){var R=x.vE,i;if(R<=0)i=this.ht;else if(R==1)i=this.KY;
else if(R==3)i=this._Z;if(i)i.setAttribute("class","thumb active");if(x.qI&&this.$B)this.$B.setAttribute("class","thumb active")}C.style.opacity=x.Y9()?1:.25;
W.setAttribute("style","width:"+Math.max(0,n.depth-1)*18+"px");var t=x.add.lspf!=null&&x.add.lspf!=0;
this.dq.style.opacity=x.LF(31)?1:.5;Z[4]=x.fc?V.w("div","clipp"):null;Z[6]=b?this.f6:null;Z[7]=b?this.KY:null;
Z[8]=x.add.vmsk&&!s?this.XY:null;Z[9]=x.add.vmsk&&!s?this.$B:null;var M=x.Z8,hK=O.C;if(M!=0)for(var e=0;
e<hK.length;e++)if(O.t[hK[e]].Z8==M){N=!0;break}P[0]=N?V.w("div","link"):null;P[1]=t?this.dq:null;P[2]=x.NN()?this.ag$:null;
P[3]=x.NN()||x.z3()?this.fW:null;this.fW.setAttribute("class",x.o_()?"arfx open  gsicon":"arfx closed  gsicon");
var bD=Z;for(var e=0;e<bD.length;e++)if(bD[e])r.appendChild(bD[e]);bD=P;for(var e=0;e<bD.length;e++)if(bD[e])_.appendChild(bD[e])}hI.prototype=new ch;
hI.prototype.Fx=function(n){var F=this.tO.index;if(n.indexOf(F)!=-1){if(this._.scrollIntoView)this._.scrollIntoView({block:"nearest"})}for(var e=0;
e<this.xz.length;e++)this.xz[e].Fx(n)};hI.Bx=function(n,F){var O=F.getBoundingClientRect();return(n.clientY-O.top)/O.height};
hI.prototype.qe=function(n){n.stopPropagation();var F=n.target==this.KY?"m":n.target==this.$B?"vm":"l";
n.dataTransfer.setData("Text",JSON.stringify({j5:F,Fw:this.tO.index}))};hI.prototype.lG=function(n){V.ou(n);
this.rK()};hI.prototype.X1=function(n){V.ou(n);this.rK();var F=n.dataTransfer.getData("Text"),O=this.parent.KH,I=hI.Bx(n,this.hR),x=this.tO.index;
if(I>.8){var r=!0,_=O.root.Dv(x);while(_.parent!=null){var d=_.parent,w=d.children;if(w.indexOf(_)!=0)r=!1;
_=_.parent}if(r){x=0;I=1}}if(F==""){V.bN(n,this,this.parent.Ii.indexOf(O),x+(I>.5?0:1))}else if(F!="--panel"){var F=JSON.parse(F),Z=F.j5;
if(Z=="l")this.Fs({e:K.sV,source:F.Fw,target:x,q4:I});else if(Z=="m"||Z=="vm")this.Fs({e:Z=="m"?K._K:K._2,src:F.Fw,BN:x,we:n.altKey});
else hI.el(n,F,this)}};hI.el=function(n,F,O,I){var x=F.j5,r=O.tO.index,_=F.Fw;if(x=="s"||x=="sm")O.Fs({e:K.Wh,src:_,BN:r,h$:F.h$,we:n.altKey});
if(x=="f"||x=="fm")O.Fs({e:K.Qp,src:_,BN:r,h$:F.h$,aB:I==null?0:I,we:n.altKey})};hI.prototype.H4=function(n){V.ou(n);
var F=hI.Bx(n,this.hR);this.rK();var O=F>.5?"-bottom":"-top";if(this.tO.$.Ja()&&.5<F&&F<.8)O="";this.hR.style["border"+O]="3px solid rgba(0,0,0,0.5)";
this.hR.style.margin=O==""?"-3px 0 -3px 0":O=="-top"?"-3px 0 0 0":"0 0 -3px 0"};hI.prototype.rK=function(n){this.hR.style.border="none";
this.hR.style.margin="0"};hI.jj=-1;hI.Pf=!1;hI.aw=function(n){hI.Pf=!1;document.body.removeEventListener("mouseup",hI.aw)};
hI.prototype.aet=function(n){if(n.button!=0)return;if(n.type=="mousedown"){hI.Pf=!0;document.body.addEventListener("mouseup",hI.aw,!1)}if(n.type=="mouseover"&&(!hI.Pf||hI.jj==this.tO.index))return;
V.ou(n);this.Fs({e:K.V0,$:this.tO.index});hI.jj=this.tO.index};hI.prototype.ad5=function(n){V.ou(n);
this.Fs({e:K.d4,$:this.tO.index})};hI.prototype.aao=function(n){this.Fs({e:K.Ro,$:this.tO.index})};hI.prototype.a80=function(n){this.Fs({e:K.Gi,$:this.tO.index})};
hI.kE=0;hI.prototype.a1T=function(n){var F=hI.kE;hI.kE=Date.now();if(Date.now()-F>300)return;n.preventDefault();
n.stopPropagation();this.hR.setAttribute("draggable","false");var O=new aM.Yr(this.bf,this.MB.bind(this))};
hI.prototype.MB=function(n){this.Fs({e:K.UF,$:this.tO.index,name:n})};hI.prototype.aoF=function(n){this.Fs({e:K.Xc,$:this.tO.index})};
hI.prototype.aag=function(n){if(this.dO(n,n.target,this.vE(n)))return;var F=n.sourceCapabilities;if(F)F=F.firesTouchEvents;
if(n.button!=2&&F!=!0)return;var O=this.vE(n);if(O!=3&&n.currentTarget==this.a8g)O=4;if(n.target==this.ag$||n.currentTarget==this.af2)O=5;
var I=new k("rclick",!0);I.data={$:this.tO.index,vE:O,RK:V.iJ(n,document.body)};this.A(I)};hI.prototype.vE=function(n){var F=n.target,O=F;
return O==this.$B?2:O==this.KY?1:O==this.ht?0:O==this._Z?3:-1};hI.prototype.a1Q=function(n){var F=n.target,P;
if(F==this._x||F==this.fW||F==this.f6||F==this.XY||F.tagName&&F.tagName.toLowerCase()=="input")return;
var O=this.vE(n),I=this.parent.KH,x=this.tO.index,r=I.t[x];if(F==this.dq){this.Fs({e:K.ll,$:x,Qj:[[!1,!1,!1,!1,!1],[0,1,2,3,31]]});
return}if(n.button==0&&n.detail==2){if(F==this.bf)return;var _=new k(V.E.S,!0),d=new k(V.E.P,!0),w=new k(V.E.JA,!0);
if(O==0&&r.add.SoCo){var Z=q.W.S_(r.add.SoCo.Clr.v);d.data={e:V.U.n$,cU:"colorpicker",eF:Z.Q<<16|Z.l<<8|Z.O,KC:function(v){var L=q.W.Vm({O:v&255,l:v>>>8&255,Q:v>>16&255});
L={classID:"null",Clr:{t:"Objc",v:L}};var H=new k(V.E.S,!0);H.T=c.lo;H.data={e:K.i8,ha:[x],BP:!0,G:{he:1,Gk:L}};
this.A(H)}.bind(this),_4:!0}}else if(O==0&&(dK.get(r.add)||r.add.SoCo||r.add.GdFl||r.add.PtFl))d.data={e:V.U.dn,cU:aM.Qu.D_};
else if(O!=0&&O!=-1)d.data={e:V.U.dn,cU:aM.Qu.D_};else if(O==0&&r.add.SoLd)w.data={oI:"placedLayerEditContents",Mk:{classID:"placedLayerEditContents"}};
else if(O==0&&r.add.TySh){_.T=c.ua;_.data={e:"editCurr",sO:x}}else d.data={e:V.U.n$,cU:"layerstyle",$:x};
this.A(w.data?w:d.data?d:_);return}if(this.dO(n,F,O))return;if(n.button!=0)return;if(O==1||O==3){var C=O==3?r.Fa(I).r:r.B1();
P=C.wC?I.a.o.join("")=="111"?1:2:0}var W={e:K.Vp,$:x,Co:O};this.Fs(W);if(n.altKey){if(O==1||O==3){var _=new k(V.E.S,!0);
_.T=c.o8;_.data={e:"mskView",G:P!=0?0:n.shiftKey?1:2};this.A(_)}else{this.Fs({e:K.Eu,$:x})}return}};
hI.prototype.dO=function(n,F,O){if((n.ctrlKey||n.metaKey)&&(O==0||O==1||O==2)){var I=0;if(n.shiftKey)I++;
if(n.altKey)I+=2;var x=new k(V.E.S,!0);x.T=c.FT;x.data={e:"fromlayer",nD:[this.tO.index,O,I]};this.A(x);
return!0}return!1};hI.prototype.Fs=function(n){var F=new k(V.E.S,!0);F.data=n;F.T=c.lo;this.A(F)};gB.jm=function(n,F,O,I,x,r,_){ch.call(this);
this.acK=F;this.Is=O;this.index=r;this._=V.w("div","styleitem");this.hR=V.w("div","head");this.alP=null;
if(F=="f"){var d=this.alP=V.w("div","headR");d.textContent="\u2699";this.hR.appendChild(d)}this.Dr=V.w("div","eye gsicon");
this.bf=V.w("div","label");this._.appendChild(this.hR);this.hR.appendChild(this.Dr);if(_){this.KY=_;
this.hR.appendChild(this.KY);this.hR.setAttribute("style","height: "+(_.firstChild.height/V.Z()+10)+"px")}this.bf.innerHTML=n;
this._.setAttribute("style","margin-left: "+(24+I*16+x*22)+"px");this.hR.appendChild(this.bf);this.Dr.addEventListener("click",this.agq.bind(this),!1);
var w=this._;w.setAttribute("draggable","true");w.addEventListener("dragstart",this.qe.bind(this),!1);
if(!0){w.addEventListener("drop",this.X1.bind(this),!1);w.addEventListener("dragover",this.H4.bind(this),!1);
w.addEventListener("dragenter",V.ou,!1);w.addEventListener("dragleave",this.lG.bind(this),!1)}this._.addEventListener("click",this._X.bind(this),!1)};
gB.jm.prototype=new ch;gB.jm.prototype.qe=function(n){n.stopPropagation();n.dataTransfer.setData("Text",JSON.stringify({j5:this.acK,Fw:this.parent.tO.index,h$:this.index}))};
gB.jm.prototype.lG=function(n){V.ou(n);this.rK()};gB.jm.prototype.X1=function(n){V.ou(n);this.rK();var F=n.dataTransfer.getData("Text");
if(F=="")return;var F=JSON.parse(F);hI.el(n,F,this.parent,this.index+(hI.Bx(n,this.hR)>.5?0:1))};gB.jm.prototype.H4=function(n){V.ou(n);
var F=hI.Bx(n,this.hR)>.5;this.rK();var O="border-"+(F?"bottom":"top");this.hR.style[O]="0.2em solid rgba(0,0,0,0.5)"};
gB.jm.prototype.rK=function(n){this.hR.style.border="none"};gB.jm.prototype.tt=function(n){var F=15;
if(1<V.Z()&&V.Z()<1.5)F=F/V.Z();this.Dr.setAttribute("style","background-size: "+F+"px "+F+"px;");this.Dr.style.opacity=n?1:.2};
gB.jm.prototype._X=function(n){if(n.target==this.Dr)return;var F=this.parent.tO.index;if(n.detail!=1&&this.Is!=null){var F=this.parent.tO.index,O=new k(V.E.P,!0);
if(this.Is.indexOf("afw_")==0){var I=this.Is.slice(4),x=B[I]||bS.Ac[I],r=n.target==this.alP;if(!r&&!x)return;
O.data=ci.WI.SF(r?"blendOptions":I,{$:F,index:this.index})}else O.data={e:V.U.n$,cU:this.Is,$:F,index:this.index};
this.A(O)}else{this.parent.Fs({e:K.Vp,$:F,Co:0})}};gB.jm.prototype.agq=function(n){var F={fm:K.Rh,f:K.wg,sm:K.AF,s:K.Uq}[this.acK];
this.parent.Fs({e:F,$:this.parent.tO.index,index:this.index})};function du(){aM.call(this,"Guide Guy",!1,null,aM.Qu.akB);
this.sE=null;this.GX=[];var n=V.w("div","form padded");this.EG.appendChild(n);n.setAttribute("style","width:200px");
this.EG.appendChild(n);var F=V.w("canvas"),O=F.getContext("2d");F.width=F.height=160;var I=[32,0,16,160,0,32,160,16,0,112,160,16],x="Margin Left,Margin Top,Margin Right,Margin Bottom,Column Count,Row Count,Column Width,Row Height,Column Gap,Row Gap".split(","),r=[0,0,0,0,0,0,0,0,0,0];
for(var e=0;e<10;e++){O.clearRect(0,0,160,160);O.setTransform(1,0,0,1,80,80);O.rotate((e&3)*Math.PI/2);
O.translate(-80,-80);O.fillStyle="rgba(0,0,0,0.3)";if(e<4){for(var _=0;_<12;_+=4){O.fillStyle=_==0?"#000000":"rgba(0,0,0,0.3)";
O.fillRect(I[_],I[_+1],I[_+2],I[_+3])}}else if(e<6){var d=8*6;O.fillRect(0,0,d,160);O.fillRect(8*7,0,d,160);
O.fillStyle="#000000";O.fillRect(8*14,0,d,160)}else if(e<8){O.fillRect(0,0,16,160);O.fillRect(160-16,0,16,160);
O.fillRect(32,0,160-64,160);O.fillStyle="#000000";O.fillRect(32,80-8,160-64,8*1)}else{O.fillRect(0,0,8*7,160);
O.fillRect(8*13,0,160,160);O.fillStyle="#000000";O.fillRect(8*7,80-8,8*6,8*1)}var w="<img src=\""+F.toDataURL()+"\" class=\"autoscale gsicon\" /> ",Z=new cR(w,0,200,e==4||e==5?null:"px",null,null,null,4,x[e]);
Z.parent=this;Z.k(V.E.L,this.adW,this);Z.F(r[e]);Z.B();this.GX.push(Z);n.appendChild(Z._)}var P=["Add Guides","Clear Guides"];
this.mb=[];for(var e=0;e<P.length;e++){var C=new cg(P[e],!0,null,!0);this.mb.push(C);C.k("click",this.Nz,this);
n.appendChild(C._)}for(var e=0;e<6;e++){O.setTransform(1,0,0,1,80,80);O.rotate(Math.floor(e/3)*Math.PI/2);
O.translate(-80,-80);O.clearRect(0,0,160,160);O.fillStyle="rgba(0,0,0,0.3)";O.fillRect(0,0,160,160);
O.clearRect(16,16,128,128);O.fillStyle="#000000";var W=e%3;O.fillRect([0,9,18][W]*8,0,16,160);var w="<img src=\""+F.toDataURL()+"\" class=\"autoscale gsicon\" /> ",C=new cg(w,!1,null,!1);
this.mb.push(C);C.k("click",this.Nz,this);n.appendChild(C._)}}du.prototype=new aM("");du.prototype.adW=function(n){var F=this.GX,O=F.indexOf(n.target),I=Math.floor(O/2),x=O&1,r=[];
for(var e=0;e<4;e++)r.push(F[2*e+x].u());var _=-1;if(I==2&&r[2]!=0&&r[3]!=0&&r[4]!=0)_=4;if(I==3&&r[3]!=0&&r[2]!=0&&r[4]!=0)_=4;
if(I==4&&r[4]!=0&&r[2]!=0&&r[3]!=0)_=3;if(_!=-1)F[2*_+x].F(0)};du.prototype.Nz=function(n){var F=this.sE,O=this.mb.indexOf(n.target),I=[[],[]];
if(F==null)return;var x=F.N?F.N.rect:new gv(0,0,F.d,F.v),r=x.d,_=x.v;if(O==0){var d=[[],[]];for(var e=0;
e<this.GX.length;e++)d[e&1].push(this.GX[e].u());I=[du.yD(d[0],x.x,x.x+r),du.yD(d[1],x.y,x.y+_)];c.eB.ci(I,F.fT)}else if(O==1){}else{O-=2;
var w=Math.floor(O/3),I=[[],[]];I[w].push([x.x,x.x+r/2,x.x+r,x.y,x.y+_/2,x.y+_][O]);c.eB.ci(I,F.fT)}var Z=function(P,C){return P-C};
I[0].sort(Z);I[1].sort(Z);this.a5p(I)};du.prototype.afc=function(n){var F=this.aaW.indexOf(n.target)};
du.prototype.a5p=function(n){var F=new k(V.E.S,!0);F.T=c.AK;F.data={e:"gids",ct:n};this.A(F)};du.yD=function(n,F,O){var I=[],x=n[2],r=n[3],_=n[4],d=0;
if(x==0)d++;if(r==0)d++;if(_==0)d++;if(d>1&&x==0&&r==0){if(n[0]!=0)I.push(F+n[0]);if(n[1]!=0)I.push(O-n[1]);
return I}var w=O-F-n[0]-n[1];if(x==0){if(_==0){x=Math.floor(w/r);_=(w-x*r)/(x-1)}else{x=1;while(r*x+_*(x-1)+r+_<=w)x++}}else if(x!=0&&r!=0){if(x*r>w)x=Math.floor(w/r);
_=(w-x*r)/(x-1)}I.push(F+n[0],O-n[1]);var r=(w-_*(x-1))/x;for(var e=1;e<x;e++){if(_==0)I.push(F+n[0]+e*r);
else I.push(F+n[0]+e*r+(e-1)*_,F+n[0]+e*r+e*_)}return I};du.prototype.hV=function(n){this.sE=n};function hn(){aM.call(this,[9,2],!1,null,aM.Qu.D_);
this.a43=null;this.Dh=null;this.GL=null;this.abW=-1}hn.prototype=new aM("");hn.prototype.jS=function(){this.J7=V.w("div","padded");
this.J7.style.width="22em";this.EG.appendChild(this.J7);var n=V.w("span","fitem");this.J7.appendChild(n);
this.oT=[new cg([0,3]),new cg([12,73]),new cg([12,91,0])];for(var e=0;e<this.oT.length;e++){var F=this.oT[e];
F.k("click",this.acH,this);n.appendChild(F._)}this.J7.appendChild(V.w("hr"));this.IA=new hn.ES;this.IA.parent=this;
this.j4=new hn.Tw;this.j4.parent=this;this._h=new hn.vl;this._h.parent=this;this.al2=[this.IA,this.j4,this._h];
this.J7.appendChild(this.IA._)};hn.prototype.acH=function(n){var e=this.oT.indexOf(n.currentTarget);
this.BF(e);this.eG(e==1?this.j4.zP:-1)};hn.prototype.BF=function(n){for(var e=0;e<3;e++){this.oT[e].KG();
var F=this.al2[e]._;if(F.parentNode==this.J7&&e!=n)this.J7.removeChild(F);if(F.parentNode!=this.J7&&e==n)this.J7.appendChild(F)}this.oT[n].kc()};
hn.prototype.eG=function(n){var F=this.Dh.C[0],O=this.Dh.t[F],I=n+1;if(n==1&&O.qI)return;var x=new k(V.E.S,!0);
x.T=c.lo;if(n!=1&&O.qI){x.data={e:K.Vp,$:F,Co:2};this.A(x)}x.data={e:K.Vp,$:F,Co:I};this.A(x)};hn.prototype.B=function(){aM.prototype.B.call(this);
if(this.J7==null)return;this.hV(this.Dh);for(var e=0;e<3;e++){this.oT[e].B();this.al2[e].B()}};hn.prototype.ax=function(){if(!V.Zo(this.EG))return;
if(this.J7==null){this.jS();this.XW(this.GL,cf.fo);this.hV(this.a43);this.B()}};hn.prototype.hV=function(n){this.a43=n;
if(this.J7==null)return;this.IA.hV(n);this.j4.hV(n);this._h.hV(n);if(n==null||n.C.length==0||n.t[n.C[0]]==null){V.fx(this.EG,"disabled");
this.Dh=null;return}else V.aE(this.EG,"disabled");var F=n.C[0],O=n.t[F],I=n.Y1(),x=I[0],r=I[1];if(r.length!=0){var _=x[r[0]],d=_.add.vogk,w=!1;
if(d)for(var e=0;e<d.length;e++){var Z=d[e].v,P=Z.keyShapeInvalidated;if(P&&P.v||Z.keyOriginType==null)continue;
w=!0;F=_.FI}}if(n!=this.Dh||this.abW!=F){this.Dh=n;this.abW=F;if(w)this.BF(2);else if(O.vE<1&&!O.qI)this.BF(0);
else this.BF(1)}this.oT[1].wz(this.j4.zP!=-1);this.oT[2].wz(w)};hn.prototype.XW=function(n,F){this.GL=n;
if(this.IA)this.IA.XW(n,F)};hn.ES=function(){ch.call(this);this._=V.w("div","form");this.adI=new gD("Hello");
this._.appendChild(this.adI._);this.uP=null;this.ajs=null;this.Dh=null;this.aaz=-1;this.aaP=null;this.ds=new aR(!0);
this.ds.parent=this;this.ds.k(V.E.L,this.agm,this);this.fX=V.w("div","marged hiline");this.fX.appendChild(this.ds._);
this.fG=new dn("GrFl",!0);this.fG.parent=this;this.fG.k(V.E.L,this.a49,this);this.Uc=V.w("div","marged hiline");
var n="Grad Rvrs Type Algn Angl Dthr Scl Ofst".split(" ");for(var e=0;e<n.length;e++){var F=this.fG.WB[n[e]]._;
this.Uc.appendChild(F)}this.Wp=new dn("patternFill",!0);this.Wp.parent=this;this.Wp.k(V.E.L,this.a3d,this);
this.Cp=V.w("div","marged hiline");var n=["Ptrn","Scl","Algn","phase"];for(var e=0;e<n.length;e++){var F=this.Wp.WB[n[e]]._;
this.Cp.appendChild(F)}this.mW={};for(var O in dK.names){if(B[O]==null)continue;this.mW[O]=new B[O];
this.mW[O].k(V.E.L,this.alU,this);this.mW[O].parent=this}var I=this.a98=V.w("div","marged hiline");this.Bd=hn.yd(["W","H","X","Y"],null,I,this.iX,this);
this.H5=new bf([12,46],[[13,1,8],[13,1,10],[13,1,9],[12,47]]);this.H5.k(V.E.L,this.iX,this);I.appendChild(this.H5._);
this.cZ=new aR(!1);this.cZ.parent=this;this.cZ.k(V.E.L,this.iX,this);I.appendChild(this.cZ._)};hn.ES.prototype=new ch;
hn.ES.prototype.B=function(){for(var n in this.mW)this.mW[n].B();this.fG.B();this.Wp.B();this.H5.B();
for(var e=0;e<4;e++)this.Bd[e].B()};hn.ES.prototype.iX=function(n){var F=hn.vS(this.Bd),O=K.DO(new gv(F[2],F[3],F[0],F[1])),I=this.H5.u(),x={classID:"artboard",artboardRect:{t:"Objc",v:O},Clr:{t:"Objc",v:this.cZ.u()},artboardBackgroundType:{t:"long",v:I+1}},r=new k(V.E.S,!0);
r.T=c.lo;r.data={e:K.yp,_8:x};this.A(r)};hn.ES.prototype.agm=function(n){var F=this.Dh,O=F.C[0];if(F.t[O].add.SoCo==null)return;
var I=JSON.parse(JSON.stringify(F.t[O].add.SoCo));I.Clr.v=this.ds.u();this.rl({he:1,Gk:I})};hn.ES.prototype.a49=function(n){var F=this.Dh,O=F.C[0];
if(F.t[O].add.GdFl==null)return;this.rl({he:2,Gk:this.fG.u()})};hn.ES.prototype.a3d=function(n){this.rl({he:3,Gk:this.Wp.u()})};
hn.ES.prototype.rl=function(n){this.X$(c.lo,{e:K.i8,ha:[this.Dh.C[0]],BP:!0,G:n})};hn.ES.prototype.alU=function(n){this.X$(c.Np,{e:"edit_layer",G:this.ajs.u()})};
hn.ES.prototype.X$=function(n,F){var O=new k(V.E.S,!0);O.T=n;O.data=F;this.A(O)};hn.ES.prototype.hV=function(n){var F=hl.get([0,3]),O=null;
this.Dh=n;if(n&&n.t.length>0&&n.C.length!=0&&n.t[n.C[0]]){var I=n.t[n.C[0]],x=dK.get(I.add);if(x!=null&&this.mW[x]!=null){O=this.mW[x]._;
this.ajs=this.mW[x];this.mW[x].F(I.add[x]);if(n.C[0]!=this.aaz){var r=n.dH(n.C[0]-1);this.aaP=q.oN(r)}this.mW[x].P5(this.aaP);
F=hl.get(dK.names[x])}if(I.add.SoCo){O=this.fX;this.ds.F(I.add.SoCo.Clr.v);F=hl.get([6,48,0,0])}if(I.add.GdFl){O=this.Uc;
this.fG.update(n,I.add.GdFl);F=hl.get([6,48,0,1])}if(I.add.PtFl){O=this.Cp;this.Wp.update(n,I.add.PtFl);
F=hl.get([6,48,0,2])}if(I.add.artb){var _=I.add.artb,d=I.Fn();O=this.a98;this.H5.F(_.artboardBackgroundType.v-1);
if(_.Clr)this.cZ.F(_.Clr.v);hn.RN(this.Bd,[d.d,d.v,d.x,d.y]);F="Artboard"}this.aaz=n.C[0]}if(O!=this.uP){if(this.uP)this._.removeChild(this.uP);
if(O!=null)this._.appendChild(O);this.uP=O}this.adI.F(F)};hn.ES.prototype.XW=function(n,F){this.fG.XW(n,F);
this.Wp.XW(n,F);for(var O in this.mW)this.mW[O].XW(n,F)};hn.Tw=function(){ch.call(this);this._=V.w("div","form");
this.Dh=null;this.zP=0;var n=V.w("span","fitem");this._.appendChild(n);this.oT=[new cg([6,2]),new cg([6,3]),new cg([6,50])];
for(var e=0;e<this.oT.length;e++){var F=this.oT[e];F.k("click",this.adi,this);n.appendChild(F._)}this.nY=new af([12,74],0,255);
this.nY.k(V.E.L,this.Cb,this);this._.appendChild(this.nY._);this.mo=new af([7,6],0,500,"px",2,!0);this.mo.k(V.E.L,this.Cb,this);
this._.appendChild(this.mo._);this.sU=new cg([4,11],null,null,!0);this.sU.k("click",this.a4w,this)};
hn.Tw.prototype=new ch;hn.Tw.prototype.a4w=function(){var n=new k(V.E.S,!0);n.T=c.Np;n.data={e:"start",Ju:"nvrt"};
this.A(n)};hn.Tw.prototype.Cb=function(n){var F=this.nY.u(),O=this.mo.u(),I=new k(V.E.S,!0);I.T=c.lo;
I.data={e:K.WP,UP:this.Dh.C[0],a0:{jx:this.zP,nY:F,mo:O}};this.A(I)};hn.Tw.prototype.B=function(){for(var e=0;
e<this.oT.length;e++)this.oT[e].B();this.nY.B();this.mo.B();this.sU.B()};hn.Tw.prototype.hV=function(n){this.Dh=n;
this.I_()};hn.Tw.prototype.adi=function(n){this.I_(this.oT.indexOf(n.currentTarget));this.parent.eG(this.zP)};
hn.Tw.prototype.I_=function(n){var F=this.Dh,O=this.oT;for(var e=0;e<3;e++){var I=O[e];I.KG();I.gy()}if(F==null||F.t.length==0||F.C.length==0||F.t[F.C[0]]==null)return;
var x=-1,r=F.t[F.C[0]];if(r.z3()&&r.Fa(F).r!=null){O[2].hL();x=2}if(r.add.vmsk){O[1].hL();x=1}if(r.B1()){O[0].hL();
x=0}if(n!=null)x=n;else if(r.qI)x=1;else if(r.vE==3)x=2;else if(r.vE==1)x=0;this.zP=x;if(x==-1){this.nY.gy();
this.mo.gy();return}var _=r.oP(x);this.nY.hL();this.mo.hL();this.nY.F(_.nY);this.mo.F(_.mo);O[x].kc();
var d=this.sU._;if(x==0)this._.appendChild(d);else if(d.parentNode==this._)this._.removeChild(d)};hn.vl=function(){ch.call(this);
this._=V.w("div","form");this.y7=1;this.vJ=V.w("div");this.Ce=hn.yd(["W","H","X","Y"],[12,51],this.vJ,this.Ph,this);
this.eu=V.w("div");var n=["\u250F","\u2513","\u2517","\u251B"];this.iL=hn.yd(n,[12,91,2],this.eu,this.Ph,this)};
hn.vl.prototype=new ch;hn.vl.prototype.B=function(){V.$E(this.Ce[0],this.Ce[1]);for(var e=2;e<5;e++){this.Ce[e].B()}this.iL[4].B()};
hn.yd=function(n,F,O,I,x){var r=V.w("div","numlist");O.appendChild(r);var _=[];for(var e=0;e<4;e++){var d=new cR(n[e],0,0,null,1,!1,!0);
d.k(V.E.L,I,x);r.appendChild(d._);_.push(d);if(e==1||e==3)V.Zq(r)}if(F){_[4]=new cL(F);_[4].F(!0);O.appendChild(_[4]._)}return _};
hn.RN=function(n,F){for(var e=0;e<4;e++)n[e].F(F[e])};hn.vS=function(n){var F=[];for(var e=0;e<4;e++)F[e]=n[e].u();
return F};hn.vl.prototype.Ph=function(n){var F=this.Ce.indexOf(n.currentTarget),O=this.iL.indexOf(n.currentTarget),I=[null,null,null,null],x=[null,null,null,null];
if(F!=-1){var r=hn.vS(this.Ce),_=this.Ce[4].u();r[0]=Math.max(1,r[0]);r[1]=Math.max(1,r[1]);if(_&&F==0)r[1]=r[0]/this.y7;
if(_&&F==1)r[0]=r[1]*this.y7;I[0]=r[2];I[1]=r[3];I[2]=I[0]+r[0];I[3]=I[1]+r[1]}if(O!=-1){var r=hn.vS(this.iL);
x[O]=Math.max(0,r[O]);if(this.iL[4].u())for(var e=0;e<4;e++)x[e]=x[O];var d=x[3];x[3]=x[2];x[2]=d}var w=new k(V.E.S,!0);
w.T=c.lo;w.data={e:K.LA,I6:I,aib:x};this.A(w)};hn.vl.prototype.hV=function(n){if(n==null)return;var F=this.vJ.parentNode!=null,O=this.eu.parentNode!=null,I=q.oK.N5(n),x=I[0],r=I[1];
if(x){if(!F)this._.appendChild(this.vJ);this.y7=(x[2]-x[0])/(x[3]-x[1]);hn.RN(this.Ce,[x[2]-x[0],x[3]-x[1],x[0],x[1]])}else if(F)this._.removeChild(this.vJ);
if(r){if(!O)this._.appendChild(this.eu);var _=r[2];r[2]=r[3];r[3]=_;hn.RN(this.iL,r)}else if(O)this._.removeChild(this.eu)};
function bd(n){aM.call(this,n.name,!0);this.KH=n;this.Hs=null;this.hP=[];this.VK=!1;this.wM={x:0,y:0,rt:!1};
this.Ze=document.createElement("canvas");this.Hq=this.Ze.getContext("2d");this.Q_=document.createElement("canvas");
this.Nv=this.Q_.getContext("2d");var F=16,O=q.f(16*16*4);q.GE(O,F,F,8);this.eQ=q.scale.qO(O,F,F);this.a7x=this.R3.bind(this);
this.jk=this.BO.bind(this);this.ads=this.lu.bind(this);var I=this.EG;V.CP(I,this.a7x);V.MH(I,this.jk);
I.addEventListener("wheel",this.Cd.bind(this),!1);I.addEventListener("contextmenu",this.aab.bind(this),!1);
var x=this.a0p.bind(this);I.addEventListener("gesturestart",x,!1);I.addEventListener("gesturechange",x,!1);
I.addEventListener("gestureend",x,!1);this.uN=0;this.a5a="";this.e_=4;V.kQ(I)}bd.prototype=new aM;bd.prototype.a0p=function(n){if(n.type=="gesturestart")this.i3=n.scale;
if(n.type=="gesturechange"){var F=new k("mouse",!0);F.action="scroll";F.wf=!0;this.zb(n,F);var O=(this.i3-n.scale)/this.i3;
F.dt=new aE(0,100*O);this.i3=n.scale;this.A(F)}};bd.prototype.PC=function(){if(this.KH.qr())return window.confirm(hl.get([22,6,3])+" "+this.KH.name+". "+hl.get([22,6,4]));
return!0};bd.prototype.Bg=function(n){n.preventDefault()};bd.prototype.uK=function(n){var F=-1,O=this.hP;
for(var e=0;e<O.length;e++)if(O[e].pointerId==n.pointerId)F=e;return F};bd.fB=function(n){var F=n.pointerType,O=window.__kb;
return F=="touch"&&O.q(u.anf)};bd.prototype.R3=function(n){if(bd.fB(n))return;var F=this.uK(n);if(F!=-1)this.hP[F]=n;
else this.hP.push(n);if(this.hP.length==1){var O=n.button!=null&&n.button!=0?"rdown":"down",I=new k("mouse",!0);
I.action=O;this.zb(n,I);this.A(I);V.le(this.EG,this.jk);V.MH(window,this.jk);V.Ry(window,this.ads)}if(this.hP.length==2){this.T2("multidown");
this.VK=!0}};bd.prototype.BO=function(n){if(bd.fB(n))return;var F=this.uK(n);if(F!=-1)this.hP[F]=n;if(this.hP.length>1){this.T2("multimove")}if(this.VK)return;
var O=new k("mouse",!0);O.action="move";this.zb(n,O);this.A(O);if(this.Hs&&this.Hs.K3&&!this.wM.rt)this.Xx()};
bd.prototype.lu=function(n){if(bd.fB(n))return;var F=this.hP,O=this.uK(n);F.splice(O,1);if(F.length==0){var I=n.button!=null&&n.button>0?"rup":"up",x=new k("mouse",!0);
x.action=I;this.zb(n,x);this.A(x);V.le(window,this.jk);V.re(window,this.ads);V.MH(this.EG,this.jk);this.VK=!1}};
bd.prototype.Cd=function(n){this.Bg(n);if(n.deltaX==0&&n.deltaY==0)return;var F=new k("mouse",!0);F.action="scroll";
F.wf=n.ctrlKey;this.zb(n,F);this.A(F)};bd.prototype.aab=function(n){V.ou(n);var F=n.sourceCapabilities;
if(F)F=F.firesTouchEvents;if(F){var O=new k("mouse",!0);this.zb(n,O);O.action="rdown";this.A(O);O.action="rup";
this.A(O)}};bd.prototype.T2=function(n){var F=this.hP,O=V.Z(),I=[];for(var e=0;e<F.length;e++){var x=I[e]=V.iJ(F[e],this.EG);
x.x*=O;x.y*=O}var r=new k("mouse",!0);r.action=n;r.z1=I;this.A(r)};bd.prototype.zb=function(n,F,O){var I=this.hP.length!=0;
if(F.action!="up"){var x=V.Z();if(O==null)O=V.iJ(n,this.EG);this.wM=F.c_={x:x*O.x,y:x*O.y,rt:I};var r=V.iJ(n,document.body);
F.c_.Ux=r.x;F.c_.fw=r.y}else this.wM=F.c_={x:this.wM.x,y:this.wM.y,rt:I};F.c_.MF=.5;if(n.pressure!=null&&n.pressure!=0)F.c_.MF=n.pressure;
if(n.pointerType=="mouse")F.c_.MF*=2;if(n.deltaX!=null){var _=n.deltaMode==0?1:40;F.dt=new aE(n.deltaX*_,n.deltaY*_)}};
bd.prototype.XW=function(n,F){this.Hs=n};bd.prototype.hV=function(n){this.ax();this.Xx()};bd.prototype.Kq=function(n,F){if(n<=0||F<=0)return;
this.HL=n;this.Sa=F;var O=this.KH,I=V.Z();O.a.Nv.d=Math.floor(n*I);O.a.Nv.v=Math.floor(F*I);V.$C(this.Q_,n,F);
V.$C(this.Ze,n,F);V.$C(l.A2(),n,F);if(O.a.K==0)O.a.K=c.yi.lD(O.d,O.v,n*I,F*I);this.Xx()};bd.prototype.ax=function(){var n=this.EG.firstChild;
if(!l.Z0&&n==l.A2()||l.Z0&&n==this.Q_)this.EG.removeChild(n);var F=l.Z0?l.A2():this.Q_;if(!V.Zo(F))this.EG.appendChild(F)};
bd.prototype.Xx=function(){if(l.Z0!=this.e_){this.uN=0;this.a5a=""}this.e_=l.Z0;if(this.Hs==null)return;
if(l.Z0)this.a62();else this.up();var n=this.KH;this.uN=n.a.K;this.a5a=JSON.stringify(n.a.o)};bd.prototype.a62=function(){if(l.Z0&&bd.a0L==null)bd.a0L=new bd.db(!1);
if(l.Z0&&bd.ao7==null)bd.ao7=[new bd.db(!0,2),new bd.db(!0,8),new bd.db(!0,32),new bd.db(!0,128)];var n=this.KH,Z,W=0;
if(n.QF==null)return;var F=n.a,O=F.Nv.d,I=F.Nv.v,x=l.Vo;this.Nv.clearRect(0,0,O,I);var r=this.sx(n);
if(F.Iz==null)F.Iz=new l.zF(O,I);if(r)F.Iz.set(this.Q_);else{l.wu(F.Iz);l.rF(1)}var _=F.Hl(0,0),d=new cD;
d.scale(O,I);d.concat(F.eY(!0));d.scale(1/n.d,1/n.v);var w=[d.R,d.O,0,d.Pr,d.oQ,0,d.hb,d.i9,1];if(bd.abc==null)bd.abc=new Float32Array(4*1024);
var P=[0,0,0,0],C=bd.abc;if(n.add.artd){C.fill(0);P=bd.o5(n);var v=n.d,L=n.v,Q=0;for(var e=0;e<n.t.length;
e++){var H=n.t[e],y=H.add.artb;if(y==null||!H.Y9())continue;var g=H.Fn();C[W]=g.x/v;C[W+1]=g.y/L;C[W+2]=g.d/v;
C[W+3]=g.v/L;W+=4;if(W==C.length)break}if(W>2*4)Q++;if(W>8*4)Q++;if(W>32*4)Q++;Z=bd.ao7[Q];C=new Float32Array(C.buffer,0,[2,8,32,128][Q]*4)}else Z=bd.a0L;
l.Z2(O,I);l.rF(0);l.Z2(O,I);Z.vM();Z.lf(F.Iz.sg,n.QF.sg,new Float32Array(w),new Float32Array([O/8,I/8,_.x/O,_.y/I]),n.d,n.v,1/n.a.K,O,I,new Float32Array(P),C,new Float32Array(q.e$.ej(q.e$.n9(F.o))));
x.drawArrays(x.TRIANGLES,0,6)};bd.o5=function(n){var F=n.add.artd.canvasColor;if(F==null)return[0,0,0,0];
return bd.a6q(F)};bd.a6q=function(n){var F=q.W.S_(n.v),O=[F.Q/255,F.l/255,F.O/255,1];for(var e=0;e<4;
e++)O[e]=Math.min(1,O[e]);return O};bd.Ko=function(n,F){var O=n[2]*255;if(l.Z0)O=F?0:Math.max(1,O);return"rgba("+n[0]*255+","+n[1]*255+","+O+","+n[3]+")"};
bd.EY=function(n){if(l.Z0)for(var e=0;e<n.length;e+=4){if(n[e+2]==0)n[e+2]=3}};bd.prototype.up=function(){var n=this.KH;
if(n.buffer==null)return;var F=n.a,O=F.Nv,I=O.d,x=O.v,r=new gv(0,0,n.d,n.v);this.Hq.clearRect(0,0,I,x);
this.Nv.clearRect(0,0,I,x);var _=F.eY(!0),d=_.clone();d.uZ();if(n.add.artd==null){this.Nv.save();var w=d.Pz(new aE(0,0));
d.translate(-w.x,-w.y);this.Nv.translate(Math.round(w.x),Math.round(w.y));this.Nv.fillStyle=this.eQ;
this.pu(q.z.om(r),d,this.Nv);this.Nv.fill();this.Nv.restore()}else{this.Nv.fillStyle=bd.Ko(bd.o5(n));
this.Nv.fillRect(0,0,I,x);this.Nv.save();this.Nv.setTransform(d.R,d.O,d.Pr,d.oQ,d.hb,d.i9);var Z=n.root.children;
for(var e=0;e<Z.length;e++){var P=Z[e].$;if(P.add.artb==null||!P.Y9())continue;var C=P.Fn(),W=P.MC();
if(W!=0)continue;this.Nv.fillStyle="white";this.Nv.fillRect(C.x,C.y,C.d,C.v)}this.Nv.restore()}if(F.LN.length!=O.X()){F.LN=q.f(O.X());
F.Cr=q.f(O.X()*4)}F.Cr.fill(0);q.scale.ahR(n.buffer,r,_,F.Cr,O);if(F.o[0]+F.o[1]+F.o[2]!=3)q.e$.AH(F.Cr,F.Cr,q.e$.n9(F.o));
this.Hq.putImageData(new ImageData(new Uint8ClampedArray(F.Cr.buffer),O.d,O.v),0,0);this.Nv.drawImage(this.Ze,0,0);
this.Nv.getImageData(0,0,1,1);this.sx(n)};bd.prototype.sx=function(n){var F=n.a,O=F.o[0]+F.o[1]+F.o[2],I=!1,x=[];
for(var e=0;e<n.C.length;e++){var r=n.t[n.C[e]];if(r==null)continue;var _=r.vE;if(_!=1&&_!=3)continue;
var d=_==1?r.B1():r.Fa(n).r;if(d.wC)x.push(d)}for(var e=0;e<n.TM.length;e++)if(n.TM[e].wC)x.push(n.TM[e]);
for(var e=0;e<x.length;e++){var d=x[e];this.bB(d,F,x.length==1&&O==0?2:1,d.color,d.eF);I=!0}var w=this.Hs;
I=this.akM(n,this.Nv,F)||I;if(n.N&&w.Yt&&w.Kc.B9){this.bB(n.N,F,0,0,null);I=!0}return I};bd.prototype.bB=function(n,F,O,I,x){var r=0,W,v;
if(x)r=Math.round(x.O)<<16|Math.round(x.l)<<8|Math.round(x.Q);var _=F.eY(!0),d=F.Nv,w=new gv(0,0,F.KH.d,F.KH.v);
if(F.LN.length!=d.X()){F.LN=q.f(d.X());F.Cr=q.f(d.X()*4)}F.LN.fill(I);F.Cr.fill(0);var Z=n.channel,P=n.rect;
q.scale.m(Z,P,_,F.LN,d);if(O==0)q.N.a8s(F.LN,F.Cr,d,d);else q.N.alo(F.LN,F.Cr,d,d,O,r);bd.EY(F.Cr);var C=new ImageData(new Uint8ClampedArray(F.Cr.buffer),d.d,d.v);
this.Hq.putImageData(C,0,0);this.Nv.save();if(O==0){W=d.clone();W.EM(-1,-1);v=new cD}else{W=new gv(0,0,w.d,w.v);
v=_.clone();v.uZ()}this.pu(q.z.om(W),v,this.Nv);this.Nv.clip();this.Nv.drawImage(this.Ze,0,0);this.Nv.restore()};
bd.prototype.akM=function(n,F,O){var I=n.M.kR!=null||n.M.qD!=null||n.M.iA!=null||n.M.zi.length!=0||n.M.s3.length!=0,x=this.Hs,r=x.Kc,_=hm.mE[x.d_],d=Math.round(12*V.Z()),w=d/n.a.K,Z=O.eY(!0);
Z.uZ();F.save();F.setTransform(Z.R,Z.O,Z.Pr,Z.oQ,Z.hb,Z.i9);if(n.add.artd){var P=bd.o5(n)[0];P=P<.5?P+.5:P-.5;
P=""+Math.round(P*255).toString(16);while(P.length<2)P="0"+P;F.fillStyle="#"+P+P+P;F.font=w+"px sans-serif";
for(var e=0;e<n.t.length;e++){var C=n.t[e];if(C.add.artb==null||!C.Y9())continue;var W=C.Fn();F.fillText(C.getName(),W.x,W.y-6/O.K);
I=!0}}var v=bd.Ko([.1,.5,1,1]),L=bd.Ko([1,1,1,1]);if(x.Yt&&r.Hi){F.fillStyle=F.strokeStyle=v;F.lineWidth=1.5/O.K;
var H=n.Y1(),y=H[0],g=H[1];for(var Q=0;Q<g.length;Q++){var C=y[g[Q]],J=C.add.vmsk,A=J.b,p=q.z.qg(A);
this.pu(p,null,F);F.stroke();I=!0;var U=3*V.Z()/O.K,j=A.length-3;for(var e=0;e<J.AZ.length;e++){var b=q.Y.oF(A,J.AZ[e]);
if(b==null)continue;var s=b.x,G=b.y;F.beginPath();var T=e==0;if(J.Ay)T=!T;if(T){F.moveTo(s-U,G-U);F.lineTo(s+U,G+U);
F.moveTo(s-U,G+U);F.lineTo(s+U,G-U);F.stroke()}else{F.arc(s,G,U*1,0,2*Math.PI);F.fill()}I=!0}if(n.C.length!=1)continue;
var z=-1;for(var e=0;e<A.length;e++){if(A[e].type>5)continue;if(A[e].type==0||A[e].type==3){if(A[e].Xu!=-1)z++;
continue}if(J.C.indexOf(z)!=-1){var s=A[e].I.x,G=A[e].I.y;F.fillRect(s-U*.8,G-U*.8,2*U*.8,2*U*.8)}if(J.oE.indexOf(e)!=-1){var m=[A[e].I];
F.beginPath();F.moveTo(A[e].pt.x,A[e].pt.y);F.lineTo(A[e].I.x,A[e].I.y);F.lineTo(A[e].Cz.x,A[e].Cz.y);
F.stroke();if(!A[e].I.Qq(A[e].pt))m.push(A[e].pt);if(!A[e].I.Qq(A[e].Cz))m.push(A[e].Cz);for(var $=0;
$<m.length;$++){var b=m[$],s=b.x,G=b.y;if($==0&&(A[e].type==2||A[e].type==5))F.fillRect(s-1.2*U,G-1.2*U,2.4*U,2.4*U);
else{F.beginPath();F.arc(s,G,U*1.2,0,2*Math.PI);F.fill();if($!=0)F.fillStyle=L;F.beginPath();F.arc(s,G,U*.8,0,2*Math.PI);
F.fill();F.fillStyle=v}}}I=!0}}}F.fillStyle=F.strokeStyle=bd.Ko([0,0,0,1],!0);F.lineWidth=1/O.K;var o=new cD(1,0,0,1,.5/O.K,.5/O.K);
if(n.M.kR){this.pu(n.M.kR,null,F);F.fill()}if(n.M.qD){this.pu(n.M.qD,o,F);F.stroke()}for(var h in n.M.T$)if(n.M.T$[h].qD){this.pu(n.M.T$[h].qD,null,F);
F.stroke();I=!0}F.beginPath();var U=(4*V.Z()+.5)/O.K,X=n.M.Ri;for(var e=0;e<X.length;e+=2){I=!0;var s=X[e],G=X[e+1];
F.rect(s-U,G-U,2*U,2*U)}F.stroke();var X=n.M.a3V;F.beginPath();var U=4*V.Z()/O.K;for(var e=0;e<X.length;
e+=2){I=!0;var s=X[e],G=X[e+1];F.moveTo(s+U,G);F.arc(s,G,U,0,2*Math.PI)}F.fill();var X=n.M.dl;F.fillStyle=bd.Ko([1,1,1,1]);
F.beginPath();var U=6*V.Z()/O.K;for(var e=0;e<X.length;e+=2){I=!0;var s=X[e],G=X[e+1];F.moveTo(s+U,G);
F.arc(s,G,U,0,2*Math.PI)}F.fill();var U=4*V.Z()/O.K;for(var e=0;e<X.length;e+=2){I=!0;var s=X[e],G=X[e+1];
F.fillStyle=bd.Ko(n.M.ye.indexOf(e>>>1)!=-1?[0,.6,1,1]:[.7,.7,.7,1]);F.beginPath();F.moveTo(s+U,G);F.arc(s,G,U,0,2*Math.PI);
F.fill()}if(n.M.zi.length!=0){for(var e=0;e<n.M.zi.length;e++){var D=n.M.zi[e],f=D[1];F.putImageData(new ImageData(new Uint8ClampedArray(D[0].buffer),f.d,f.v),f.x,f.y)}}var R=.5/O.K;
F.lineWidth=1/O.K;if(n.M.vY){I=!0;var i=n.M.vY,t=i.b0,p={s:[],H:[]};for(var e=0;e<i.k1.length;e++)q.z.concat(p,q.z.om(i.k1[e]));
p.H=p.H.concat(t);for(var e=0;e<t.length;e+=4){p.s.push("M","L")}for(var e=0;e<p.H.length;e++){p.H[e]+=R}F.strokeStyle=bd.Ko([.9,.2,.2,1]);
this.pu(p,null,F);F.stroke();var N=V.Z(),M=2/O.K;F.font=w*.9+"px sans-serif";for(var e=0;e<t.length;
e+=4){var s=t[e],G=t[e+1],hK=t[e+2],bD=t[e+3],co=Math.sqrt((bD-G)*(bD-G)+(hK-s)*(hK-s));co=q.Mm.xp(co,n.gC,x,G==bD?n.d:n.v);
var iM=new aE((s+hK)/2,(G+bD)/2);F.fillStyle=bd.Ko([.9,.2,.2,1]);var hs=F.measureText(co).width;F.fillRect(iM.x-hs/2-M*N,iM.y-3.5*M*N,hs+2*M*N,7*M*N);
F.fillStyle=bd.Ko([1,1,1,1]);F.save();F.translate(iM.x-hs/2,iM.y+2*M*N);F.scale(.1,.1);F.font=w*9+"px sans-serif";
F.fillText(co,0,0);F.restore()}}if(x.Yt){if(r.dW){var S=q.Mm.SI(r.uI,n,r.wi),a=S;if(r.wi==4)a*=n.v/n.d;
this.GE(n,F,S,a,1,r.Xd);I=!0}if(r.cs&&n.a.K>7){this.GE(n,F,1,1,.5,r.Xd);I=!0}if(r.fT){var bV=Math.max(n.a.Nv.d,n.a.Nv.v)/n.a.K;
bV=Math.max(Math.max(n.d,n.v)*2,bV);F.beginPath();F.strokeStyle=bd.Ko([0,1,1,1]);for(var e=0;e<n.fT[0].length;
e++){var a5=Math.round(n.fT[0][e])+R;F.moveTo(a5,-bV);F.lineTo(a5,bV)}for(var e=0;e<n.fT[1].length;e++){var dG=Math.round(n.fT[1][e])+R;
F.moveTo(-bV,dG);F.lineTo(bV,dG)}F.stroke()}var ap=n.l_;if(r.l_&&ap.length!=0){F.font=w*.8+"px sans-serif";
var bk=[],c2=[];for(var e=0;e<ap.length;e++){var gg=c.Fz.UG(ap,e);bk.push(gg);if(n.Hu.indexOf(e)!=-1)c2.push(gg)}bk.reverse();
var bH=Date.now();bk=q.rect.rv([0,0,n.d,n.v],bk);for(var $=0;$<2;$++)for(var e=0;e<bk.length;e++){var gw=bk[e],z=gw[4],gP=z!=null?ap[z]:null;
if(gP&&$==0||gP==null&&$==1)continue;var s=Math.round(gw[0]),G=Math.round(gw[1]),hK=Math.round(gw[2]),bD=Math.round(gw[3]);
F.strokeStyle=F.fillStyle=bd.Ko(gP?[0,.7,.7,1]:[.8,.8,.8,1]);F.strokeRect(s+R,G+R,hK-s,bD-G);var dT=e+1,fU=F.measureText(dT),hs=fU.width;
F.fillRect(s,G,hs+w/2,w);F.fillStyle=bd.Ko([1,1,1,1]);F.fillText(dT,s+w/4,G+w*.8)}var M=2/n.a.K,dV=2*M;
for(var e=0;e<c2.length;e++){var gw=c2[e],s=Math.round(gw[0]),G=Math.round(gw[1]),hK=Math.round(gw[2]),bD=Math.round(gw[3]);
F.strokeStyle=F.fillStyle=bd.Ko([0,.7,.7,1]);F.strokeRect(s+R,G+R,hK-s,bD-G);var ac=[s,G,hK,G,hK,bD,s,bD];
for(var e2=0;e2<ac.length;e2+=2){var a5=ac[e2],dG=ac[e2+1],cX=ac[e2+2&7],eR=ac[e2+3&7];F.fillRect(a5-M,dG-M,dV,dV);
F.fillRect(Math.round((a5+cX)/2)-M,Math.round((dG+eR)/2)-M,dV,dV)}}I=!0}}F.strokeStyle=bd.Ko([1,0,0,1]);
if(n.M.iA){this.pu(n.M.iA,o,F);F.stroke()}F.restore();if(x.K3){if(n.a.$R==null||n.a.$R.width!=n.a.Nv.d||n.a.bs.height!=n.a.Nv.v){n.a.$R=F.createImageData(n.a.Nv.d,q.Mm.qS);
n.a.bs=F.createImageData(q.Mm.qS,n.a.Nv.v)}var _=hm.mE[x.d_],O=n.a,gR=O.K*n.d/2,bN=O.K*n.v/2,eG=[1,n.gC,n.gC/2.54,n.gC/25.4,n.d/100][r.wv],ef=O.K,fi=O.n.clone(),ep=O.VH;
O.K*=eG;O.n.x+=gR*eG-gR;O.n.y+=bN*eG-bN;O.VH=0;q.Mm.a35(O,_["--text-color"],_["--bg-input"],Math.floor(this.wM.x),Math.floor(this.wM.y));
O.K=ef;O.n=fi;O.VH=ep;var iJ=aH.zg(O.K,bd.Ko([1,1,1,1]));bd.EY(n.a.bs.data);bd.EY(n.a.$R.data);F.putImageData(n.a.bs,0,0);
F.putImageData(n.a.$R,0,0);F.putImageData(iJ,0,n.a.Nv.v-iJ.height)}if(n.M.s3.length!=0){for(var e=0;
e<n.M.s3.length;e++){var D=n.M.s3[e],f=D[1];F.putImageData(new ImageData(new Uint8ClampedArray(D[0].buffer),f.d,f.v),f.x,f.y)}}return I||x.K3||n.fT[0].length+n.fT[1].length>0};
bd.prototype.GE=function(n,F,O,I,x,r){while(O*n.a.K<4){O*=2;I*=2}var _=n.d,d=n.v,w=.5/n.a.K;F.strokeStyle=bd.Ko([.5,.5,.5,x],!0);
F.save();F.rect(0,0,_,d);F.clip();F.beginPath();for(var Z=0;Z<=_;Z+=O){F.moveTo(Z+w,0);F.lineTo(Z+w,d)}if(r==0){for(var P=0;
P<=d;P+=I){F.moveTo(0,P+w);F.lineTo(_,P+w)}}else{I*=Math.sqrt(4/3);var C=I*Math.floor(_/I),W=_*(I/(2*O));
for(var P=-C;P<=d+C;P+=I){F.moveTo(0,P);F.lineTo(_,P-W);F.moveTo(0,P);F.lineTo(_,P+W)}}F.stroke();F.restore()};
bd.prototype.pu=function(n,F,O){O.beginPath();var I=q.z.clone(n);if(F)q.z.m(I.H,F,I.H);Typr.U.pathToContext({cmds:I.s,crds:I.H},O)};
bd.db=function(n,F){l.L8.call(this);this.anS=n;var O="\t\t\tprecision mediump float;\t\t\t\t\t\tuniform sampler2D source;\t\t\tuniform sampler2D target;\t\t\tuniform vec3 contSizeZoom;\t\t\tuniform vec2 cnvSize;\t\t\tuniform mat4 ctrn; \t\t\t"+(n?"uniform vec4 bgClr;  uniform vec4 ars["+F+"]; ":"")+"\t\t\t\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvarying vec2 gCoord;\t\t\t\t\t\t/* This approximates the error function, needed for the gaussian integral */ \t\t\tvec4 erf(vec4 x) { \t\t\t  vec4 s = sign(x), a = abs(x);\t\t\t  x = 1.0 + (0.278393 + (0.230389 + 0.078108 * (a * a)) * a) * a;\t\t\t  x *= x;  \t\t\t  return s - s / (x * x); \t\t\t} \t\t\t/* Return the mask for the shadow of a box from lower to upper */  \t\t\tfloat boxShadow(vec2 lower, vec2 upper, vec2 point, float sigma) { \t\t\t  vec4 query = vec4(point - lower, point-upper); \t\t\t  vec4 integral = 0.5 + 0.5 * erf(query * (sqrt(0.5) / sigma)); \t\t\t  return (integral.z - integral.x) * (integral.w - integral.y); \t\t\t} \t\t\t\t\t\tvec4 simpleBlend(vec4 src, vec4 tgt) {\t\t\t\tfloat na = src.w + tgt.w*(1.0-src.w);\t\t\t\t/* avoid division by zero */ \t\t\t\treturn na==0.0 ? vec4(0,0,0,0) : vec4( (src.xyz*src.w + tgt.w*tgt.xyz*(1.0-src.w))*(1.0/na), na);\t\t\t} \t\t\t\t\t\t"+l.Qr.lm+"\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 src = texture2D(source, tCoord); \t\t\t\tvec4 tgt = ctrn*texture2D(target, sCoord); "+(n?"\t\t\t\t\tbool inr = false; vec4 BG = bgClr; \t\t\t\t\tfor(int i=0; i<"+F+"; i++) { \t\t\t\t\t\tvec4 ar = ars[i]; \t\t\t\t\t\tvec2 nsc = sCoord - ar.xy; \t\t\t\t\t\tif( ar.z!=0.0 && in01(nsc/ar.zw) ){\t\t\t\t\t\tinr=true; BG=vec4(1.0,1.0,1.0,1.0); }\t\t\t\t\t}\t\t\t\t":"\t\t\t\t\tfloat shdw = 0.3*boxShadow(vec2(0,0),contSizeZoom.xy, sCoord*contSizeZoom.xy+vec2(0.0,-6.0*contSizeZoom.z) , 10.0*contSizeZoom.z);\t\t\t\t\tvec4 grid = mod(floor(gCoord.x) + floor(gCoord.y), 2.0)==1.0 ? vec4(0.784,0.784,0.784,1) : vec4(1,1,1,1);\t\t\t\t\tvec4 BG = in01(sCoord) ? grid : vec4(0.0,0.0,0.0,shdw); \t\t\t\t")+"\t\t\t\tvec4 outc = in01(sCoord) ?  simpleBlend(tgt,BG) :  BG ;  \t\t\t\tif(src.b == 0.0 && src.a >0.5) gl_FragColor = mix(outc, vec4(vec3(1,1,1)-outc.rgb,1.0), src.w); \t\t\t\telse             gl_FragColor = simpleBlend(src,outc); \t\t\t\t\t\t\t}",I="\t\t\tattribute vec2 verPos;\t\t\tvarying vec2 tCoord;\t\t\tvarying vec2 sCoord;\t\t\tvarying vec2 gCoord;\t\t\t\t\t\tuniform mat3 tmat;\t\t\tuniform vec4 gsize;\t\t\tvoid main(void) {\t\t\t\ttCoord = verPos;\t\t\t\tsCoord = (tmat*vec3(verPos,1.0)).xy;\t\t\t\tgCoord = (verPos-gsize.zw) * gsize.xy ; \t\t\t\tgl_Position = vec4(vec2(-1.0, 1.0) + 2.0*vec2(verPos.x,-verPos.y), 0.0, 1.0);\t\t\t}";
this.Nf(O,I)};bd.db.prototype=new l.L8;bd.db.prototype.lf=function(n,F,O,I,x,r,_,d,w,Z,P,C){this.Jr("tmat gsize source target contSizeZoom cnvSize bgClr ars ctrn".split(" "));
var W=l.Vo,v=this.bm;W.uniformMatrix3fv(v.tmat,!1,O);W.uniform4fv(v.gsize,I);W.uniform3f(v.contSizeZoom,x,r,_);
W.uniform2f(v.cnvSize,d,w);W.uniformMatrix4fv(v.ctrn,!1,C);if(this.anS){W.uniform4fv(v.ars,P);W.uniform4fv(v.bgClr,Z)}W.uniform1i(v.source,0);
W.uniform1i(v.target,1);W.activeTexture(W.TEXTURE0);W.bindTexture(W.TEXTURE_2D,n);W.activeTexture(W.TEXTURE1);
W.bindTexture(W.TEXTURE_2D,F);W.activeTexture(W.TEXTURE0)};function ed(){aM.call(this,[9,7],!1,null,aM.Qu.a7f);
this.EG.setAttribute("style","min-width:240px;");this.Dh=null;this.kS=-1;this.a6l=[];this._N=V.w("div","scrollable");
this._N.style.height="160px";this.EG.appendChild(this._N);this.Q1=V.w("div","lpfoot");this.EG.appendChild(this.Q1);
this.mb=[];var n=["reload","lrs/newlayer","lrs/bin"],F=[[5,10],[5,3],[5,4]];for(var e=0;e<n.length;e++){var O=new cg("<img src=\""+PIMG[n[e]]+"\" class=\"gsicon\" />",!1,F[e]);
O.k("click",this.afL,this);this.Q1.appendChild(O._);this.mb.push(O)}}ed.prototype=new aM("");ed.prototype.Fs=function(n){var F=new k(V.E.S,!0);
F.data=n;F.T=c.rY;this.A(F)};ed.prototype.afL=function(n){var e=this.mb.indexOf(n.currentTarget);if(e!=1)if(this.kS==-1)return;
this.Fs({e:["updLC","addLC","delLC"][e],FI:this.kS});if(e==2)this.kS=-1};ed.prototype.B=function(){aM.prototype.B.call(this);
for(var e=0;e<this.mb.length;e++)this.mb[e].B()};ed.prototype.hV=function(n){if(n==null)V.fx(this.EG,"disabled");
else V.aE(this.EG,"disabled");this.Dh=n;V.em(this._N);if(n==null)return;var F=n.M$.lastAppliedComp?n.M$.lastAppliedComp.v:0,O=n.M$.list.v.slice(0);
O.unshift({v:{Nm:{v:"Last Document State"},compID:{v:0},capturedInfo:{v:0}}});for(var e=0;e<O.length;
e++){var I=O[e].v,x=new hz(I.Nm.v,I.compID.v,I.capturedInfo.v,F,this.kS);x.k("activate",this.rW,this);
x.parent=this;this._N.appendChild(x._);this.a6l.push(x)}};ed.prototype.rW=function(n){this.kS=n.currentTarget.FI;
this.hV(this.Dh)};function hz(n,e,F,O,I){ch.call(this);this.FI=e;this._=V.w("div","head listitem"+(e==I?" selected":""));
var x=e==O,r=new cg(x?"\u2713":"\u2014");if(x)r.kc();this._.appendChild(r._);r.k("click",this.Eg,this);
var _=this.Ki=V.w("span");_.textContent=n;this._.appendChild(_);this.mb=[];if(e!=0){this._.addEventListener("mouseup",this.rW.bind(this),!1);
this.a1n=V.w("span","headR");this._.appendChild(this.a1n);var d=["lrs/eye","pos","lrs/fx"],w=["Visibility","Position","Appearance"];
for(var Z=0;Z<d.length;Z++){var P=new cg("<img src=\""+PIMG[d[Z]]+"\" class=\"autoscale gsicon\" />",!1,w[Z]);
if((F>>Z&1)==0)P._.setAttribute("style","opacity:0.3");P.k("click",this.acs,this);this.a1n.appendChild(P._);
this.mb.push(P)}}}hz.prototype=new ch;hz.prototype.rW=function(n){if(n.target!=this.Ki&&n.target!=this._)return;
if(n.detail==1)this.A(new k("activate",!1));else{var F=new aM.Yr(this.Ki,this.MB.bind(this))}};hz.prototype.acs=function(n){var e=this.mb.indexOf(n.currentTarget);
this.Fs({e:"editLC",a57:e,FI:this.FI})};hz.prototype.MB=function(n){this.Fs({e:"editLC",I3:n,FI:this.FI})};
hz.prototype.Eg=function(n){this.Fs({e:"setLC",FI:this.FI})};hz.prototype.Fs=function(n){var F=new k(V.E.S,!0);
F.data=n;F.T=c.rY;this.A(F)};function aS(){aM.call(this,[9,11],!1,null,aM.Qu.abq);var n=V.w("div","padded");
n.setAttribute("style","min-width:15em");this.EG.appendChild(n);var F=V.w("div");n.appendChild(F);F.setAttribute("style","cursor:grab;");
this.nd=V.w("canvas");this.nd.width=100;F.appendChild(this.nd);V.kQ(this.nd);V.CP(this.nd,this.DX.bind(this));
this.OU=new g0(null,0,c.yi.dk.length-1);this.OU.k(V.E.L,this.ab3,this);n.appendChild(this.OU._);this.aah=this.Wz.bind(this);
this.a6n=this.Xy.bind(this);this.sE=null}aS.prototype=new aM("");aS.prototype.Kq=function(n,F){this.Xx()};
aS.prototype.ab3=function(n){var F=this.OU.u(),O=this.sE,I=c.yi.dk[c.yi.dk.length-1-F],x=new k(V.E.S,!0);
x.T=c.o8;x.data={e:"zoom",K:I};this.A(x)};aS.prototype.DX=function(n){if(this.sE==null)return;V.MH(window,this.aah);
V.Ry(window,this.a6n)};aS.prototype.Wz=function(n){var F=V.iJ(n,this.nd),O=this.sE,I=this.nd.width,x=this.nd.height,r=(F.x*V.Z()-I/2)/I,_=(F.y*V.Z()-x/2)/x,d=V.Z()*O.a.K,w=Math.round(-O.a.K*O.d*r),Z=Math.round(-O.a.K*O.v*_);
c.GO.OH(O,w,Z)};aS.prototype.Xy=function(n){V.le(window,this.aah);V.re(window,this.a6n)};aS.prototype.hV=function(n){if(n==null&&this.sE!=null)this.nd.width=100;
this.sE=n;this.Xx()};aS.prototype.Xx=function(){var n=this.sE,I=0;if(n==null||n.a.K==0)return;var F=n.a;
if(!V.Zo(this.EG))return;this.OU.F(c.yi.dk.length-1-c.yi.Ip(F.K));var O=300*V.Z(),x=[n.dH(),new gv(0,0,n.d,n.v)];
q.zZ(x);while(Math.max(x[I+1].d,x[I+1].v)>O){I+=2}var r=x[I],_=x[I+1],d=_.d,w=_.v,Z=this.nd;Z.width=d;
Z.height=w;V.z0(Z,d,w);var P=Z.getContext("2d"),C=P.createImageData(d,w);q.Ct(r,C.data);P.putImageData(C,0,0);
var W=F.Nv,v=F.jR(W.x,W.y),L=F.jR(W.x+W.d,W.y+W.v),H=d/n.d;P.scale(H,H);P.lineWidth=4/H;P.strokeStyle="#ff0000";
P.strokeRect(v.x,v.y,L.x-v.x,L.y-v.y)};aS.prototype.XW=function(n,F){};aS.prototype.ax=function(){this.Xx()};
function aI(n,F){if(n==null){aM.call(this);return}aM.call(this,n.name,!1,n.icon,F);var O=this.a06=V.w("iframe","padded");
O.setAttribute("src",n.url);O.setAttribute("style","width:"+n.width+"px; height:"+n.height+"px");this.EG.appendChild(O)}aI.prototype=new aM("");
aI.prototype.k3=function(n){if(V.Zo(this.a06))this.a06.contentWindow.postMessage(n,"*")};function bi(){aM.call(this,[9,12],!1,null,aM.Qu.ys);
this.GL=null;this.I5=new g1(c.pY);this.I5.parent=this;var n=V.w("div","padded");n.setAttribute("style","width:20em");
this.EG.appendChild(n);n.appendChild(this.I5.pq)}bi.prototype=new aM("");bi.prototype.ax=function(){this.I5.TU(this.GL.Wc)};
bi.prototype.XW=function(n,F){this.GL=n;if(F==cf.fo||F==cf.ys)this.I5.TU(n.Wc)};bi.prototype.Kq=function(n,F){this.I5.a8i(this.GL.Gv)};
bi.prototype.B=function(){aM.prototype.B.call(this);this.I5.B()};var a1=function(){var n=[],F=null,O=null,I=null,x=[[100,180,255],[100,255,100],[255,200,100],[200,100,255],[255,100,200]];
function r(){aM.call(this,"Memory",!1,null,aM.Qu.$b);var v=V.w("div","padded");this.EG.appendChild(v);
O=new cg(["<< VAR0",[0,13,2]],!1,null,!0);O.addEventListener("click",function(L){n.pop();d()});v.appendChild(O._);
F=V.w("div","scrollable");F.setAttribute("style","width:20em;  height:26em; margin-top:8px;");v.appendChild(F)}r.prototype=new aM("");
r.prototype.hV=function(v,L,H){I=L;this.ax()};r.prototype.ax=function(){O.wz(!1);if(!V.Zo(F))return;
var v={Bz:"Total:",Jq:[]};for(var e=0;e<I.length;e++)v.Jq.push(Z(I[e]));W(v);n=[v];d()};r.prototype.B=function(){aM.prototype.B.call(this);
O.B()};function _(v){var L=v.currentTarget,e=0;while((L=L.previousSibling)!=null)e++;n.push(n[n.length-1].Jq[e-1]);
d()}function d(){O.wz(n.length>1);var v=n[n.length-1];V.em(F);w(v,F,0);v.Jq.sort(function(L,H){return H.xU[0]-L.xU[0]});
for(var e=0;e<v.Jq.length;e++)w(v.Jq[e],F,1)}function w(v,L,H){var y=hP.R4,g=H!=0&&v.Jq,Q="margin-left:"+H*10+"px; margin-bottom:8px; padding:3px 5px;";
if(g)Q+="cursor:pointer;";if(v.j5!=null)Q+="background-color:rgba("+x[v.j5].join(",")+",0.2);";var J=V.w("div");
L.appendChild(J);J.setAttribute("style",Q);J.innerHTML=P(v.Bz)+"<br />"+"RAM: <b>"+y(v.xU[0])+"</b>\u2001GPU: <b>"+y(v.xU[1])+"</b>";
if(g)J.addEventListener("click",_,!1)}function Z(v){var L={Bz:v.name,Jq:[],j5:0},H=l.Z0?1:0,y=1-H,g={Bz:"Final Image",xU:[v.d*v.v*4,H*v.d*v.v*4],j5:2};
L.Jq.push(g);for(var e=0;e<v.t.length;e++){var Q=C(v.t[e]);if(Q.Jq.length!=0)L.Jq.push(Q)}var J=v.add.lnk2;
if(J)for(var e=0;e<J.length;e++){var Q=J[e],A={Bz:Q.fA,Jq:[],j5:4},p=0;A.Jq.push({Bz:"Raw file",xU:[Q.raw.length,0]});
if(Q.yO)for(var U=0;U<Q.yO.length;U+=2)p+=Q.yO[U].length;if(p!=0)A.Jq.push({Bz:"Decoded pixels",xU:[p,0]});
W(A);L.Jq.push(A)}W(L);return L}function P(v){return v.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;")}function C(v){var L={Bz:v.getName(),Jq:[],j5:1},H=l.Z0?1:0,y=1-H,g=v.rect.X();
if(g!=0)L.Jq.push({Bz:"Layer pixels",xU:[g*4,H*g*4]});if(v.add.lmfx&&v.KJ.d8.type){var Q=v.KJ.d8.type,U=0;
for(var J in Q){var A=0;for(var p=0;p<Q[J].length;p++)A+=Q[J][p].jC.X();if(A!=0)L.Jq.push({Bz:hl.get(bW.names[bW.order.indexOf(J)]),xU:[y*A*4,H*A*4],j5:3})}if(v.KJ.M0)U+=g;
if(v.KJ.U4)U+=g;if(v.KJ.lT)U+=g;if(v.KJ.lT)U+=g;if(v.KJ.Ey)U+=g;if(v.KJ.dr)U+=g;var j=v.KJ.hs?v.KJ.hs.length:0;
if(U+j!=0)L.Jq.push({Bz:"Additional Blending Data",xU:[y*U*4+j,H*U*4]})}var b=v.B1(),s=b?b.rect.X():0;
if(s!=0){L.Jq.push({Bz:"Raster Mask",xU:[s,0]})}var b=v.add.vmsk,s=b&&b.a8?b.a8.rect.X():0;if(s!=0){L.Jq.push({Bz:"Vector Mask",xU:[s,0]})}W(L);
return L}function W(v){v.xU=[0,0];for(var e=0;e<v.Jq.length;e++){v.xU[0]+=v.Jq[e].xU[0];v.xU[1]+=v.Jq[e].xU[1]}}return r}();
function gm(){ch.call(this);this.T=0;this.lp=null;this._=V.w("div","toolconf");this.I5=null;this.Ef=null;
this.body=new V.w("div","body")}gm.prototype=new ch;gm.prototype.ahk=function(n,F){this.T=n;this.lp=F;
if(c.b_[n]){var O=this.I5=new g1(n);this._.appendChild(O._);O.parent=this}else{this.Ef=V.w("div");this._.appendChild(this.Ef)}this._.appendChild(this.body);
this.B()};gm.prototype.hg=function(n,F){};gm.prototype.f8=function(n){};gm.prototype.XW=function(n,F){if(F==cf.fo||F==cf.ys)if(this.I5)this.I5.TU(n.Wc)};
gm.prototype.RY=function(n){};gm.prototype.B=function(){if(this.I5)this.I5.B();else this.Ef.innerHTML=V.WE(this.lp,null,"toolicon");
this.b2()};gm.prototype.b2=function(){};function ft(n){gm.call(this);if(n==null)return;this.GL=null;
this.GX={};for(var e=0;e<n.length;e++){var F=n[e],O=null;if(F=="brush"){O=new fa}if(F=="bmode"){O=new bf([12,19,0],fk.w9,!1,fk.uv)}if(F=="bmode0"){O=new bf([12,19,0],fk.w9.slice(23),!1)}if(F=="emode"){O=new bf([12,36],[[9,3],[10,38]])}if(F=="opacity"){O=new cR([12,0],0,100,"%");
O.F(100)}if(F=="flow"){O=new cR([12,63],0,100,"%");O.F(100)}if(F=="smth"){O=new cR([19,3,0],0,100,"%");
O.F(0)}if(F=="samp"){O=new bf("Sampling",["Brush Center","Start of Stroke","Background Color"])}if(F=="wconf"){O=new g3;
O.F([40,!0,!0])}if(F=="strn"){O=new cR([12,64],1,100,"%");O.F(50)}if(F=="smode"){O=new bf([12,36],[[19,7,0],[19,7,1]]);
O.F(1)}if(F=="pdetail"){O=new cL([12,65]);O.kc()}if(F=="rng"){O=new bf([12,12],[[19,6,0],[19,6,1],[19,6,2]]);
O.F(1)}if(F=="expo"){O=new cR([12,5],0,100,"%");O.F(50)}if(F=="algnd"){O=new cL([12,75]);O.F(!1)}if(F=="sfrom"){O=new bf([12,70],[[17,1],[17,3],[17,0]])}if(F=="alt"){O=new bo(null,["Alt"],!0,["Select Source"])}if(F=="qsmode"){O=new hg([12,36],["<img src=\""+PIMG["set/front"]+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.zoomIn+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.zoomOut+"\" class=\"autoscale gsicon\" />"],[[5,3],[18,1],[18,2]])}if(F=="redge"){O=new cg([7,11],!1,null,!0)}if(F=="setop"){O=new iQ}if(F=="patch"){O=new hg(null,[[12,70],[12,71]])}if(F=="prsr"){O=new bo(null,["<img src=\""+PIMG.prsO+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.prsS+"\" class=\"autoscale gsicon\" />"],!0,[[15,9,0],[15,9,1]]);
O.F([!1,!0])}O.parent=this;this.body.appendChild(O._);this.GX[F]=O;if(F=="brush")O.k(V.E.L,this.nq,this);
else if(F=="redge")O.k("click",this.sZ,this);else O.k(V.E.L,this.ya,this)}}ft.prototype=new gm;ft.prototype.hg=function(n,F){n=n[1];
var O=this.GX;if(n.Md)O.bmode.F(fk.Cs.indexOf(n.Md.v.BlnM));if(n.Opct)O.opacity.F(n.Opct.v);if(n.flow)O.flow.F(n.flow.v);
if(n.Brsh)O.brush.F(n,F.ke.J$,F.ke.Gr);if(n.FrgC){var I=q.W.S_(n.FrgC.v),x=new k(V.E.P,!0);x.data={e:V.U.g7,b9:cf.dM,G1:0,G:I.Q<<16|I.l<<8|I.O};
this.A(x)}this.nq();this.ya()};ft.prototype.f8=function(){if(c.b_[this.T]==null)return null;var n=this.GX,F=JSON.parse(JSON.stringify(n.brush.u()));
F.classID=c.b_[this.T][1][0];if(n.bmode)F.Md={t:"enum",v:{BlnM:fk.Cs[n.bmode.u()]}};if(n.opacity)F.Opct={t:"long",v:n.opacity.u()};
if(n.flow)F.flow={t:"long",v:n.flow.u()};var O=this.GL.nE;O={Q:O>>>16,l:O>>>8&255,O:O&255};F.FrgC={t:"Objc",v:q.W.Vm(O)};
return["Brush Preset "+F.Brsh.v.Dmtr.v.val,F]};ft.prototype.sZ=function(){var n=new k(V.E.P,!0);n.data={e:V.U.n$,cU:"redge"};
this.A(n)};ft.prototype.b2=function(){for(var n in this.GX)this.GX[n].B()};ft.prototype.RY=function(n){if(n.a7v=="showBrushOpts"){this.GX.brush.kJ(n.RK.x,n.RK.y)}for(var F in n._l){var O=n._l[F];
if(F!="qsmode")O*=100;if(this.GX[F])this.GX[F].F(O)}};ft.prototype.XW=function(n,F){gm.prototype.XW.call(this,n,F);
this.GL=n;var O=this.GX.brush;if(O==null)return;if(F==cf.fo||F==cf.pY)O.TU(n.ke);if(F==cf.jZ){O.F(n.ke.Kr,n.ke.J$,n.ke.Gr)}};
ft.prototype.nq=function(){var n=new k(V.E.P,!0);n.data={e:V.U.g7,b9:cf.jZ,JM:this.GX.brush.u()};this.A(n)};
ft.prototype.ya=function(){var n=new k(V.E.P,!0);n.data={e:V.U.A7,T:this.T};for(var F in this.GX){if(F=="brush"||F=="redge")continue;
var O=this.GX[F].u();if(["opacity","flow","smth","strn","expo"].indexOf(F)!=-1)n.data[F]=O/100;else if(F=="bmode")n.data.bmode=fk.Dy[O];
else if(F=="bmode0")n.data.bmode=fk.Dy[23+O];else n.data[F]=O}this.A(n)};function iu(n){gm.call(this);
if(n)return;this.data={e:V.U.A7,Tb:"front",RI:0,yZ:[16,!0,!0],GV:{OI:0,x:1,y:1}};this.y1=new iQ;this.body.appendChild(this.y1._);
this.y1.k(V.E.L,this.sS,this);this.Gu=new cR([7,6],0,100," px");this.Gu.parent=this;this.Gu.F(0);this.body.appendChild(this.Gu._);
this.Gu.k(V.E.L,this.sS,this);this.O9=new cg([7,11],!1,null,!0);this.body.appendChild(this.O9._);this.O9.k("click",this.sZ,this)}iu.prototype=new gm;
iu.prototype.RY=function(n){if(n.Tb!=null)this.y1.F(n.Tb);else if(n.NJ){var F=this.data;F.Tb=n.NJ.Tb;
this.y1.F(F.Tb);F.RI=n.NJ.RI;this.Gu.F(F.RI);F.yZ=n.NJ.yZ;if(this.Os)this.Os.F(F.yZ)}else{var O=iu.Jy;
if(O==null){var I=ig.ais(!0);O=iu.Jy=new at(I.items,I.Sn)}O.B();O.parent=this;O.update(n.m4,n.Hs);var x=new k(V.E.P,!0);
x.data={e:V.U.di,AM:O,x:n.$d.Ux+2,y:n.$d.fw+1};this.A(x)}};iu.prototype.b2=function(){this.Gu.B();this.y1.B();
this.O9.B()};iu.prototype.sZ=function(){var n=new k(V.E.P,!0);n.data={e:V.U.n$,cU:"redge"};this.A(n)};
iu.prototype.sS=function(){var n=new k(V.E.P,!0);this.data.T=this.T;this.data.Tb=this.y1.u();this.data.RI=this.Gu.u();
n.data=this.data;this.A(n)};function bp(){ft.call(this,["brush","strn"])}bp.prototype=new ft;function fd(){ft.call(this,"brush bmode opacity flow smth prsr".split(" "))}fd.prototype=new ft;
function dl(){ft.call(this,["brush","bmode0","samp","wconf"])}dl.prototype=new ft;function cS(){ft.call(this,["brush"])}cS.prototype=new ft;
function ip(){ft.call(this,["brush","bmode","opacity","smth","prsr"])}ip.prototype=new ft;function fI(){ft.call(this,["brush","rng","expo"])}fI.prototype=new ft;
function gN(){ft.call(this,"brush bmode opacity algnd sfrom alt".split(" "))}gN.prototype=new ft;function aW(n){gm.call(this);
if(n==null)return;var F=V.w("span","fitem");this.body.appendChild(F);var O=[[17,0],[17,1],[11,12,0],[17,2]];
this.oT=[];for(var e=0;e<O.length;e++){var I=new cg(O[e],!1,null,!0);this.oT.push(I);I.k("click",this.anH,this);
if(!n||e==1)F.appendChild(I._)}this.GV=new bj;this.GV.k(V.E.L,this.PT,this);if(!n)this.body.appendChild(this.GV._);
this.ik=new cL("Delete Cropped Pixels");this.ik.k(V.E.L,this.PT,this);if(!n)this.body.appendChild(this.ik._);
this.iO=new em;this.iO.k("click",this.gx,this)}aW.prototype=new gm;aW.prototype.b2=function(){this.iO.B();
for(var e=0;e<this.oT.length;e++)this.oT[e].B();this.GV.B();this.ik.B()};aW.prototype.RY=function(n){var F=this.iO._;
if(n.bl)this.body.appendChild(F);else if(this.body.contains(F))this.body.removeChild(F);if(n.GV)this.GV.F(n.GV)};
aW.prototype.gx=function(n){var F={e:V.U.A7,T:this.T,ma:this.iO.u()?"commit":"cancel"},O=new k(V.E.P,!0);
O.data=F;this.A(O)};aW.prototype.anH=function(n){n.target._.blur();var F={e:V.U.A7,T:this.T,ma:"cropby",anc:this.oT.indexOf(n.target)},O=new k(V.E.P,!0);
O.data=F;this.A(O)};aW.prototype.PT=function(n){var F={e:V.U.A7,T:this.T,ma:"config",TP:{SR:this.GV.u()}};
if(n.target==this.ik)F.TP.Ut=this.ik.u();var O=new k(V.E.P,!0);O.data=F;this.A(O)};function aJ(){aW.call(this,!1)}aJ.prototype=new aW;
function a7(){aW.call(this,!0)}a7.prototype=new aW;function g2(){ft.call(this,["brush","rng","expo"])}g2.prototype=new ft;
function b0(){ft.call(this,"brush emode opacity flow smth prsr".split(" "))}b0.prototype=new ft;function ff(){ft.call(this,["brush","samp","wconf"])}ff.prototype=new ft;
function fu(){iu.call(this);this.GV=new bj;this.GV.k(V.E.L,this.Fr,this);this.body.appendChild(this.GV._)}fu.prototype=new iu(!0);
fu.prototype.Fr=function(n){this.data.GV=this.GV.u();this.sS()};fu.prototype.b2=function(){iu.prototype.b2.call(this);
this.GV.B()};function ex(){gm.call(this);this.Sp=new bf([12,20],["1x1","3x3","5x5","11x11","31x31"]);
this.Sp.k(V.E.L,this.ya,this);this.body.appendChild(this.Sp._)}ex.prototype=new gm;ex.prototype.ya=function(n){var F=new k(V.E.P,!0);
F.data={e:V.U.A7,T:this.T,q5:[1,3,5,11,31][this.Sp.u()]};this.A(F)};ex.prototype.b2=function(){this.Sp.B()};
function gW(){gm.call(this);this.oU=new aC(!1);this.oU.parent=this;this.oU.k(V.E.L,this.Cb,this);this.body.appendChild(this.oU._);
this.oU.F(JSON.parse(bW.Pg.v5).v);this.ob=new bf(null,bW.W.names.slice(0,5));this.ob.k(V.E.L,this.Cb,this);
this.body.appendChild(this.ob._);this.JY=new bf([12,19,0],fk.w9,null,fk.uv);this.JY.k(V.E.L,this.Cb,this);
this.body.appendChild(this.JY._);this.KE=new cR([12,0],0,100,"%");this.KE.parent=this;this.KE.k(V.E.L,this.Cb,this);
this.body.appendChild(this.KE._);this.KE.F(100);this.Bp=new cL([12,23,0]);this.Bp.k(V.E.L,this.Cb,this);
this.body.appendChild(this.Bp._);this.zA=new cL("Dither");this.zA.k(V.E.L,this.Cb,this);this.body.appendChild(this.zA._)}gW.prototype=new gm;
gW.prototype.b2=function(){this.ob.B();this.JY.B();this.KE.B();this.Bp.B();this.zA.B()};gW.prototype.XW=function(n,F){gm.prototype.XW.call(this,n,F);
var O=F==cf.dM;this.oU.vI(n.nE,n.sI);if(O||F==cf.f3||F==cf.fo)this.oU.TU(n.Jx)};gW.prototype.Cb=function(){var n=new k(V.E.P,!0);
n.data={e:V.U.A7,T:this.T};n.data.b9={W:this.oU.u(),fg:bW.W.types[this.ob.u()],Ay:this.Bp.jQ(),anY:this.zA.jQ(),amo:fk.Dy[this.JY.u()],c1:this.KE.u()/100};
this.A(n)};function iI(){gm.call(this)}iI.prototype=new gm;function cd(){gm.call(this);var n=V.w("span","fitem");
this.body.appendChild(n);this.gH=[new cR([12,15],0,0,"\xB0"),new cg("Reset",null,null,!0)];for(var e=0;
e<this.gH.length;e++){var F=this.gH[e];F.parent=this;n.appendChild(F._);F.k(e==1?"click":V.E.L,this.pz,this)}}cd.prototype=new gm;
cd.prototype.b2=function(){for(var e=0;e<this.gH.length;e++)this.gH[e].B()};cd.prototype.RY=function(n){this.gH[0].F(n.Wr*180/Math.PI)};
cd.prototype.pz=function(n){var F=this.gH.indexOf(n.target),O=new k(V.E.P,!0);O.data={e:V.U.A7,T:this.T,Wr:F==1?0:n.target.u()*Math.PI/180};
this.A(O)};function d3(){ft.call(this,["brush","algnd","sfrom","alt"])}d3.prototype=new ft;function fF(){gm.call(this);
this.z_=new aj;this.z_.parent=this;this.body.appendChild(this.z_.ui._);this.body.appendChild(this.z_.R0._);
this.body.appendChild(this.z_.dK._);var n=V.w("span","fitem");this.body.appendChild(n);n.appendChild(this.z_.JV._);
n.appendChild(this.z_.ri._);n.appendChild(this.z_.Th._);this.E1=new bf("Aa",[[22,5,0],"Sharp","Crisp","Strong","Smooth"]);
this.E1.k(V.E.L,this.gx,this);this.body.appendChild(this.E1._);this.pZ=new cg([11,9],!1,null,!0);this.pZ.k("click",this.a8S,this);
this.body.appendChild(this.pZ._);this.iO=new em;this.iO.k("click",this.gx,this)}fF.prototype=new gm;
fF.prototype.b2=function(){this.iO.B();this.z_.B();this.pZ.B()};fF.prototype.a8S=function(n){var F={e:V.U.A7,T:this.T,ma:"showwarp"},O=new k(V.E.P,!0);
O.data=F;this.A(O)};fF.prototype.RY=function(n){if(n.ma=="showactive")this.body.appendChild(this.iO._);
if(n.ma=="hideactive")this.body.removeChild(this.iO._);if(n.ma=="changeAA")this.E1.F(n.Qj)};fF.prototype.XW=function(n,F){gm.prototype.XW.call(this,n,F);
if(F!=cf.fo&&F!=cf.cu&&F!=cf.hx&&F!=cf.TN)return;this.z_.F(n.tV,n.sH,n.vp)};fF.prototype.gx=function(n){var F={e:V.U.A7,T:this.T,ma:this.iO.u()?"commit":"cancel"};
if(n.target==this.E1){F.ma="changeAA";F.Qj=this.E1.u()}var O=new k(V.E.P,!0);O.data=F;this.A(O)};function ey(){iu.call(this)}ey.prototype=new iu(!0);
function am(){gm.call(this);var n=[],O="<svg  class=\"autoscale gsicon\" viewBox=\"0 0 14 18\" width=\"14\" height=\"18\" fill=\"black\"><path d=\"M14,6 L10,6 L10,0 L4,0 L4,6 L0,6 L7,13 L14,6 L14,6 Z M0,14 L0,16 L14,16 L14,14 Z\" /></svg>";
this.Va=new cL([12,85]);this.Va.k(V.E.L,this.ya,this);n.push(this.Va._);this.wy=new cL([20,1]);this.wy.k(V.E.L,this.ya,this);
n.push(this.wy._);this.xx=new cL([12,83]);this.xx.k(V.E.L,this.ya,this);n.push(this.xx._);var F=V.w("span","fitem");
n.push(F);this.ai2=new bf("Scale for exported files",["1x","2x","3x","4x"],!0);F.appendChild(this.ai2._);
this.Sx=new cg(O+" PNG",!1,"Save selected layers as PNG",!0);F.appendChild(this.Sx._);this.Sx.k("click",this.Ln,this);
this.amB=new cg(O+" SVG",!1,"Save selected layers as SVG",!0);F.appendChild(this.amB._);this.amB.k("click",this.Ln,this);
var I=V.w("span","fitem");n.push(I);var x=V.w("span","fitem");n.push(x);this.mb=[];for(var e=0;e<8;e++){var r=e==3||e==7?[20,4,6]:[20,4,e<3?e:e-1],_=new cg("Hi",!1,r);
(e<4?I:x).appendChild(_._);_.k("click",this.Ln,this);this.mb.push(_)}for(var e=0;e<n.length;e++)this.body.appendChild(n[e]);
this.ana=n}am.prototype=new gm;am.prototype.RY=function(n){var F=n.NJ,O=n.a3P;this.Va.F(F.Xi);this.wy.F(F.Dm);
this.xx.F(F.vY);if(O){V.em(this.body);for(var e=0;e<O.length;e++)if(O[e]==1&&this.ana[e])this.body.appendChild(this.ana[e])}};
am.prototype.Ln=function(n){var F=this.mb.indexOf(n.target),O;if(F==-1){O=new k(V.E.P,!0);O.data={e:V.U.A7,T:this.T,G1:n.target==this.Sx?"getPNG":"getSVG",Hg:this.ai2.u()+1}}else{O=new k(V.E.S,!0);
O.T=c.AK;O.data={e:"algn",G:F}}this.A(O)};am.prototype.ya=function(n){var F=new k(V.E.P,!0);F.data={e:V.U.A7,T:this.T,G1:"prms",Xi:this.Va.jQ(),Dm:this.wy.jQ(),vY:this.xx.jQ()};
this.A(F)};am.prototype.b2=function(){this.Va.B();this.wy.B();this.xx.B();var n="h0 h1 h2 hG v0 v1 v2 vG".split(" ");
for(var e=0;e<8;e++){this.mb[e].YB(V.WE("align/"+n[e],null,"autoscale"))}};function g$(){iu.call(this);
var n=this.Os=new g3;n.parent=this;n.k(V.E.L,this.ao9,this);this.body.appendChild(n._)}g$.prototype=new iu(!0);
g$.prototype.ao9=function(n){this.data.yZ=this.Os.u();this.sS()};g$.prototype.b2=function(){iu.prototype.b2.call(this);
this.Os.B()};function b9(){ft.call(this,["setop","patch"])}b9.prototype=new ft;function fW(){ft.call(this,["setop"])}fW.prototype=new ft;
function f3(){ft.call(this,["bmode","opacity","wconf"])}f3.prototype=new ft;function bT(){iu.call(this)}bT.prototype=new iu(!0);
function bQ(){iu.call(this)}bQ.prototype=new iu(!0);function fn(){iu.call(this);this.GV=new bj;this.GV.k(V.E.L,this.Fr,this);
this.body.appendChild(this.GV._)}fn.prototype=new iu(!0);fn.prototype.Fr=function(n){this.data.GV=this.GV.u();
this.sS()};fn.prototype.b2=function(){iu.prototype.b2.call(this);this.GV.B()};function hr(){gm.call(this);
this.GL=null;this.ix=null;this.Kf=[new fq("X",null,3),new fq("Y",null,3),new fq("W",null,3),new fq("H",null,3),new fq([12,15],null,4),new fq([12,80,0],null,4),new cg([15,7,6],!1,null,!0)];
for(var e=0;e<this.Kf.length;e++){var n=this.Kf[e];this.body.appendChild(n._)}this.Kf[6].k("click",this.aeQ,this);
this.D$=0}hr.prototype=new gm;hr.prototype.aeQ=function(n){if(this.D$==0){return}var F=new k(V.E.S,!0);
F.T=c.KR;F.data={e:"rot",WL:[2,5],G:-this.D$};this.A(F)};hr.prototype.RY=function(n){if(n==null)return;
this.ix=n;var F=n.akd,O=n.Yd,I=O.x-F.x,x=O.y-F.y,r=this.Kf;this.D$=-Math.atan2(x,I);r[0].F(F.x);r[1].F(F.y);
r[2].F(I);r[3].F(x);r[4].F((this.D$*180/Math.PI).toFixed(2));var _=Math.sqrt(I*I+x*x);_=q.Mm.xp(_,n.gC,this.GL,n.a4W,!1);
r[5].F(parseFloat(_).toFixed(2))};hr.prototype.XW=function(n,F){this.GL=n;this.RY(this.ix)};hr.prototype.b2=function(){var n=this.Kf;
for(var e=0;e<n.length;e++)n[e].B();V.$E(n[2],n[3])};function dq(){ft.call(this,["brush","strn","pdetail"])}dq.prototype=new ft;
function fl(){ft.call(this,["brush","sfrom"]);this.alc=[];var n=[[7,12]];for(var e=0;e<n.length;e++){var F=new cg(n[e],!1,null,!0);
this.alc.push(F);F.parent=this;this.body.appendChild(F._);F.k("click",this.a2j,this)}}fl.prototype=new ft;
fl.prototype.a2j=function(n){var F=this.alc.indexOf(n.currentTarget),O=new k(V.E.JA,!0);O.data=c.P6.Lz("contentAware");
this.A(O)};function h_(){ft.call(this,["brush","strn"])}h_.prototype=new ft;function dM(){ft.call(this,["brush","flow","smode"])}dM.prototype=new ft;
function io(){gm.call(this);this.uZ=!1;var n=V.w("span","fitem");this.body.appendChild(n);this.tw=new hg(null,["<img src=\""+PIMG.zoomIn+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.zoomOut+"\" class=\"autoscale gsicon\" />"]);
n.appendChild(this.tw._);this.tw.k(V.E.L,this.ya,this);this.hQ=new cg([20,2]);this.body.appendChild(this.hQ._);
this.hQ.k("click",this.Vj,this);this.sc=new cg([20,3]);this.body.appendChild(this.sc._);this.sc.k("click",this.Vj,this)}io.prototype=new gm;
io.prototype.b2=function(){this.hQ.B();this.sc.B()};io.prototype.ya=function(){var n={e:V.U.A7,T:this.T,Tk:this.tw.u()==0},F=new k(V.E.P,!0);
F.data=n;this.A(F)};io.prototype.RY=function(n){if(this.uZ!=n.uZ)this.tw.F(1-this.tw.u());this.uZ=n.uZ};
io.prototype.Vj=function(n){var F=new k(V.E.S,!0);F.T=c.o8;F.data={e:"adapt",G:n.target==this.hQ?"pixel":"fitscr"};
this.A(F)};function fB(n,F){gm.call(this);if(n==null)return;this.GX={};var O=[[12,76,0],[12,76,1]];if(F==null)O.push([12,76,2]);
for(var e=0;e<n.length;e++){var I=n[e],x=null;if(I=="tmode"){x=new bf(null,O);x.F(1)}if(I=="make"){x=new cg("Make Selection",null,null,!0);
x.gy()}if(I=="binop"){x=new bf(null,[[18,1],[18,2],[18,3],[18,4]]);x.gy()}if(I=="pshape")x=new bf(null,[[12,93,0],[12,93,1],"Arrow",[12,93,2]]);
if(I=="shape")x=new iV([12,76,1]);if(I=="crad"){x=new cR([12,94,0],0,50,"px");x.F(0)}if(I=="cstr"){x=new bj}if(I=="irad"){x=new cR([12,94,1],0,100,"%");
x.F(40)}if(I=="length"){x=new cR([12,80,0],4,40);x.F(4)}if(I=="sides"){x=new cR([12,78],3,30);x.F(5)}if(I=="width"){x=new cR([12,41],1,100,"px");
x.F(5)}if(I=="tsiz"){x=new cR("Tip Size",100,500,"%");x.F(300)}if(I=="tolr"){x=new cR([12,24],0,100);
x.F(5)}if(I=="fstyle"){x=new iD([12,26])}if(I=="sstyle"){x=new dd}if(I=="psnap"){x=new cL([8,10])}if(I=="crnr"){x=new cg("\u2312",!1,[12,94,0],!0)}x.parent=this;
this.body.appendChild(x._);this.GX[I]=x;x.k(I=="crnr"||I=="make"?"click":V.E.L,this.ya,this)}}fB.prototype=new gm;
fB.prototype.RY=function(n){if(n.G1=="vals"){for(var F in n.aa9)this.GX[F].F(n.aa9[F]);this.BD();return}var O=fB.Jy;
if(O==null)O=fB.Jy=new at([{name:"Make Selection"}],[{g:V.E.P,i:{e:V.U.n$,cU:"makesel"}}]);O.parent=this;
O.update(n.m4,n.Hs);var I=new k(V.E.P,!0);I.data={e:V.U.di,AM:O,x:n.$d.Ux+2,y:n.$d.fw+1};this.A(I)};
fB.prototype.JG=function(e){return null};fB.prototype.BD=function(){if(this.GX.pshape==null)return;var n=this.JG(this.GX.pshape.u());
if(n==null)return;V.em(this.body);for(var e=0;e<n.length;e++){var F=n[e];this.body.appendChild(this.GX[F]._)}};
fB.prototype.b2=function(){for(var n in this.GX){this.GX[n].B()}};fB.prototype.ya=function(n){if(n.target==this.GX.crnr){var F=new k(V.E.S,!0);
F.T=c.kd;F.data={e:"crnr"};this.A(F);return}if(n.target==this.GX.make){var F=new k(V.E.P,!0);F.data={e:V.U.n$,cU:"makesel"};
this.A(F);return}var F=new k(V.E.P,!0);if(n.target==this.GX.fstyle){F.data={e:V.U.g7,b9:cf.tJ,G:this.GX.fstyle.u()};
this.A(F);return}if(n.target==this.GX.sstyle){F.data={e:V.U.g7,b9:cf.z9,G:this.GX.sstyle.u()};this.A(F);
return}if(this.GX.tmode&&this.GX.binop){var O=this.GX.tmode.u()==0,I=this.GX.binop,x=this.GX.make;if(I)I.wz(O);
if(x)x.wz(O)}F.data={e:V.U.A7,T:this.T};for(var r in this.GX)if(r!="sstyle")F.data[r]=this.GX[r].u();
this.A(F);if(n.target==this.GX.pshape)this.BD()};fB.prototype.XW=function(n,F){gm.prototype.XW.call(this,n,F);
var O=this.GX.fstyle,I=this.GX.sstyle;if(O)O.XW(n,F);if(I)I.XW(n,F);if(F==cf.fo||F==cf.Z5)if(n.zx.length!=0&&this.GX.shape){this.GX.shape.TU(n.zx)}if(F==cf.fo||F==cf.tJ)if(O)O.F(null,n.XU,n.ant);
if(F==cf.fo||F==cf.z9)if(I)I.F(null,n.tF,n.ahw)};function eU(){fB.call(this,["tmode","make","fstyle","sstyle","binop"],!0)}eU.prototype=new fB;
function fR(){fB.call(this,["tmode","fstyle","sstyle","binop","tolr"])}fR.prototype=new fB;function aK(){fB.call(this,["fstyle","sstyle"]);
this.a5s=null;this.ail=null;this.abK=null;this.W1=new bf("Path",[[18,1],[18,2],[18,3],[18,4],[18,5]],!1,[4]);
this.FA=new cg("\u25BC");this.FA.kc();this.c2=new cg("\u25B2");this.c2.kc();this.kw=[this.W1,this.FA,this.c2];
for(var e=0;e<this.kw.length;e++){var n=this.kw[e];this.body.appendChild(n._);n.parent=this;n.k(e==0?V.E.L:"click",this.tE,this)}}aK.prototype=new fB;
aK.prototype.RY=function(n){if(n.ma=="main"){var F=this.kw,O=n.dv;if(O&&O.C.length==1){this.ail=O.clone();
this.abK=JSON.stringify(n.oK);var I=O.C[0],x=q.Y._v(O.b);this.W1.hL();if(I>0)this.FA.hL();else this.FA.gy();
if(I<x-1)this.c2.hL();else this.c2.gy();var r=q.Y.fR(O.b,I),_=O.b[r];this.W1.YB("Path "+(I+1));this.W1.F([3,0,1,2][_.Xu])}else{for(var e=0;
e<F.length;e++)F[e].gy()}}else fB.prototype.RY.call(this,n)};aK.prototype.b2=function(){fB.prototype.b2.call(this);
this.W1.B()};aK.prototype.tE=function(n){if(n.target==this.W1||n.target==this.FA||n.target==this.c2){var F={},O=this.ail,I=O.b,x=JSON.parse(this.abK),r=O.C[0],_=q.Y.fR(I,r),d=I[_];
if(n.target==this.W1){var w=this.W1.u();if(w<4)d.Xu=[1,2,3,0][w];else{if(q.Y._v(I)<=1)return;O.b=q.Y.YH(I);
O.C=O.b.length==2?[]:[0];O.oE=[];x=[q.oK.CZ()]}}else{var Z=n.target==this.FA?-1:1,P=Math.min(r,r+Z),C=Math.max(r,r+Z),W=q.Y.fR(I,P),v=q.Y.fR(I,C);
if(W==-1||v==-1)return;var L=v+q.Y.wb(I,C),H=x[P];x[P]=x[C];x[C]=H;var y=I.slice(0,W),g=I.slice(W,v),Q=I.slice(v,L),J=I.slice(L);
O.b=y.concat(Q.concat(g.concat(J)));O.C[0]+=Z}F.dv=O;F.oK=x;var A=new k(V.E.P,!0);A.data={e:V.U.A7,T:this.T,nD:F};
this.A(A)}};function bx(){fB.call(this,["fstyle","sstyle","crnr","psnap"])}bx.prototype=new fB;function gs(){fB.call(this,"tmode fstyle sstyle binop cstr crad".split(" "))}gs.prototype=new fB;
function e6(){fB.call(this,["tmode","fstyle","sstyle","binop","cstr"])}e6.prototype=new fB;function c6(){fB.call(this,"tmode fstyle sstyle binop pshape sides irad crad width tsiz length".split(" "));
this.afR=[["sides","crad"],["sides","irad","crad"],["width","tsiz"],["length"]];this.BD()}c6.prototype=new fB;
c6.prototype.JG=function(e){return["tmode","fstyle","sstyle","binop","pshape"].concat(this.afR[e])};
function g8(){fB.call(this,["tmode","fstyle","sstyle","binop","width"])}g8.prototype=new fB;function bK(){fB.call(this,"tmode fstyle sstyle binop cstr shape".split(" "))}bK.prototype=new fB;
function iN(){iu.call(this)}iN.prototype=new iu(!0);function iq(){ft.call(this,["brush","qsmode","redge"])}iq.prototype=new ft;
function fC(){gm.call(this)}fC.prototype=new gm;function i2(){gm.call(this);this.FA=new cg("\u25BC");
this.FA.kc();this.c2=new cg("\u25B2");this.c2.kc();var n=[this.FA,this.c2];for(var e=0;e<2;e++){var F=n[e];
this.body.appendChild(F._);F.k("click",this.tE,this)}}i2.prototype=new gm;i2.prototype.tE=function(n){var F=new k(V.E.P,!0);
F.data={e:V.U.A7,T:this.T,G1:"reorder",dir:n.target==this.FA?-1:1};this.A(F)};function i3(n,F){gm.call(this);
if(window.Typr==null||n)return;this.a3R=F;this.Pt=null;this.aaG=V.w("span","");this.aae=V.w("span","");
var O=1;this.kv={Ug:new iZ(null,24),Zg:new cR("X",0,0,"px",0,!1,!0,4),_P:new cR("Y",0,0,"px",0,!1,!0,4),Cl:new cR("W",0,0,["%","px"],2,!1,!0,5),S0:new cg("\u2261",null,[12,51],null),d1:new cR("H",0,0,["%","px"],2,!1,!0,5),a3l:new cR("\u2221",0,0,"\xB0",O,!1,!0),ab5:new cR("\u25B1 H",-85,85,"\xB0",O,!1,!0),afw:new cR("\u25B1 V",-85,85,"\xB0",O,!1,!0),Wa:new bf(null,[[12,14,2],[12,14,3],"Bicubic Sharper"])};
this.kv.Wa.F(1);for(var I in this.kv){var x=this.kv[I];if(F&&(x==this.kv.a3l||x==this.kv.ab5||x==this.kv.afw||x==this.kv.Wa)){}else this.aaG.appendChild(x._);
var r=x==this.kv.S0?"click":V.E.L;x.k(r,this.ame,this)}this.Os=new gp(!0,!0,!0);this.Os.k(V.E.L,this.amx,this);
this.Os.parent=this;var _=this.aae,d=this.Os;_.appendChild(d.PH._);_.appendChild(d.zn._);_.appendChild(d.cy._);
_.appendChild(d.mS._);_.appendChild(d.L5._);this.pZ=new cg([11,9]);this.pZ.k("click",this.aex,this);
this.iO=new em;this.iO.k("click",this.gx,this)}i3.prototype=new gm;i3.prototype.RY=function(n){if(n.$d){var F=i3,O=this.Jy;
if(O==null)O=this.Jy=new at(F.fl(),F.xQ(this.T));O.B();O.parent=this;O.update(n.m4,n.Hs);var I=new k(V.E.P,!0);
I.data={e:V.U.di,AM:O,x:n.$d.Ux+2,y:n.$d.fw+1};this.A(I);return}V.em(this.body);this.Pt=n;if(n.kv){var x=n.kv.j,r=n.kv.PS.clone(),_=Math.atan2(-r.O,r.R),d=new cD;
d.rotate(-_);r.concat(d);var w=this.kv;w.Ug.F(n.kv.BZ);w.Zg.F(n.kv.hC.x);w._P.F(n.kv.hC.y);w.Cl.F(r.R*(w.Cl.Z6()=="%"?100:x.d));
w.d1.F(r.oQ*(w.d1.Z6()=="%"?100:x.v));w.a3l.F(-_*180/Math.PI);w.ab5.F(0*180/Math.PI);w.afw.F(Math.atan(r.Pr)*180/Math.PI);
this.body.appendChild(this.aaG);this.pZ.KG()}if(n.BJ){this.Os.F(n.BJ);this.body.appendChild(this.aae);
this.pZ.kc()}this.body.appendChild(this.iO._);if(n.a1U&&!this.a3R)this.body.appendChild(this.pZ._)};
i3.prototype.ame=function(n){var F=this.kv,O=this.Pt.kv.j;if(n.target==F.S0)F.S0.F(!F.S0.u());if(F.S0.jQ()){var I=F.d1,x=F.Cl,r=O.v,_=O.d;
if(n.target==F.Cl){I=F.Cl;x=F.d1;r=O.d;_=O.v}var d=I.u()/(I.Z6()=="%"?100:r);d*=x.Z6()=="%"?100:_;x.F(d)}var w=[];
for(var Z in F)if(F[Z]!=F.S0&&F[Z]!=F.Ug){var d=F[Z].u();if((F[Z]==F.Cl||F[Z]==F.d1)&&d==0){d=.1;F[Z].F(d)}if(F[Z]==F.Cl&&F[Z].Z6()=="px")d/=O.d/100;
if(F[Z]==F.d1&&F[Z].Z6()=="px")d/=O.v/100;w.push(d)}var P=new aE(w[0],w[1]);if(n.target==F.Ug){this.To({ma:"ctyp",BZ:F.Ug.u()})}else if(n.target==F.Zg||n.target==F._P){this.To({ma:"cen",hC:P})}else{var C=this.Pt.kv.PS.clone(),W=C.clone(),v=Math.atan2(-C.O,C.R);
W.translate(-P.x,-P.y);W.rotate(-v);var L=new cD(W.R,W.O,W.Pr,W.oQ,0,0);L.uZ();W.concat(L);W.concat(new cD(w[2]/100,Math.tan(w[5]*Math.PI/180),Math.tan(w[6]*Math.PI/180),w[3]/100,0,0));
W.rotate(-w[4]*Math.PI/180);W.translate(P.x,P.y);this.Pt.kv.PS=W;this.To({ma:"trn",kv:W,kl:this.kv.Wa.u()})}};
i3.prototype.amx=function(n){this.To({ma:"wrp",BJ:this.Os.u()})};i3.prototype.aex=function(n){this.To({ma:"switchWarp"})};
i3.prototype.gx=function(n){this.To({ma:this.iO.u()?"commit":"cancel"})};i3.prototype.To=function(n){n.e=V.U.A7;
n.T=this.T;var F=new k(V.E.P,!0);F.data=n;this.A(F)};i3.prototype.b2=function(){var n=this.kv;for(var F in n)n[F].B();
V.$E(n.Cl,n.d1);this.iO.B();this.Os.B();this.pZ.B()};i3.fl=function(){return[{name:[5,9],R$:"Shift+Alt+Ctrl + T",dP:!0},{name:[12,38]},{name:[2,5]},{name:[24,4]},{name:[2,9]},{name:[11,9],h:function(n){if(n==null||n.C.length!=1)return{h:!1};
var F=n.t[n.C[0]];return{h:F.add.TySh==null&&!F.Ja()}},dP:!0},{name:["VAR0 90\xB0 \u21BB",[2,5]]},{name:["VAR0 90\xB0 \u21BA",[2,5]]},{name:["VAR0 180\xB0",[2,5]]},{name:[[2,6],[22,4,2]]},{name:[[2,6],[22,4,3]]}]};
i3.xQ=function(n){if(n==null)n=c.KR;return[{g:V.E.S,T:n,i:{e:"again"}},{g:V.E.P,i:{e:V.U.H$,T:n,NJ:{Lj:3}}},{g:V.E.P,i:{e:V.U.H$,T:n,NJ:{Lj:4}}},{g:V.E.P,i:{e:V.U.H$,T:n,NJ:{Lj:2}}},{g:V.E.P,i:{e:V.U.H$,T:n,NJ:{Lj:1}}},{g:V.E.P,i:{e:V.U.H$,T:n,NJ:{Lj:-1}}},{g:V.E.S,T:n,i:{e:"rot",WL:[2,5],G:-Math.PI/2}},{g:V.E.S,T:n,i:{e:"rot",WL:[2,5],G:-3*Math.PI/2}},{g:V.E.S,T:n,i:{e:"rot",WL:[2,5],G:Math.PI}},{g:V.E.S,T:n,i:{e:"scl",WL:[[2,6],[22,4,2]],G:new aE(-1,1)}},{g:V.E.S,T:n,i:{e:"scl",WL:[[2,6],[22,4,3]],G:new aE(1,-1)}}]};
function fm(){i3.call(this)}fm.prototype=new i3(!0);function e_(){i3.call(this)}e_.prototype=new i3(!0);
function cu(){i3.call(this,!1,!0)}cu.prototype=new i3(!0);function ik(){gm.call(this);var n=this._F=[new bf([12,36],["Rigid",[15,10,0],[24,4]]),new bf([12,74],[[19,8,0],[19,8,1],[19,8,2]]),new cR([7,4],0,100,"px"),new cL("Show Mesh"),new cg("\u25BC",null,null,!0),new cg("\u25B2",null,null,!0)];
for(var e=0;e<n.length;e++){var F=n[e];F.parent=this;this.body.appendChild(F._);F.k(e<4?V.E.L:"click",this.agE,this)}this.iO=new em;
this.iO.k("click",this.gx,this);this.body.appendChild(this.iO._)}ik.prototype=new gm;ik.prototype.b2=function(){var n=this._F;
for(var e=0;e<4;e++)n[e].B();this.iO.B()};ik.prototype.RY=function(n){var n=n.b9;for(var e=0;e<4;e++)this._F[e].F(n[e])};
ik.prototype.agE=function(n){var F=[];for(var e=0;e<4;e++)F[e]=this._F[e].u();var O=this._F.indexOf(n.target);
if(O<4)this.To({ma:"prm",b9:F});else this.To({ma:"moveDepth",a4$:O==5})};ik.prototype.gx=function(n){this.To({ma:this.iO.u()?"commit":"cancel"})};
ik.prototype.To=function(n){n.e=V.U.A7;n.T=this.T;var F=new k(V.E.P,!0);F.data=n;this.A(F)};function az(){ch.call(this);
this._=V.w("div","cmanager");window.alert=function(I,x){this.a2U(I,x);console.log("Alert: "+I)}.bind(this);
window.onblur=function(I){var x=this;x.yh()}.bind(this);this.HL=0;this.Sa=0;this.ut=[];this.Ts={};this.Og=V.w("div","alertcont");
this._.appendChild(this.Og);this.ajh=V.w("div","alertcont");this._.appendChild(this.ajh);this.am=V.w("div","alertcont");
this.a0W=0;this.t1=-1;this.aei=null;this.wN=null;var n=this.a0t=V.w("div","alertpanel");n.setAttribute("style","padding:0.7em 1em 0.1em 1em;");
this.am.appendChild(n);var F=this.Ee=V.w("input");F.setAttribute("type","text");F.setAttribute("style","background-color:white; color:black; font-size:1.2em; width:100%;  margin:0;");
F.addEventListener("input",this.a1j.bind(this),!1);F.addEventListener("keydown",this.a0I.bind(this),!1);
n.appendChild(F);var O=this.amY=V.w("div","contextpanel scrollable");O.setAttribute("style","text-align:left; box-shadow:none; margin:0.5em 0 1em 0;color:#888;");
O.addEventListener("click",this.anG.bind(this),!1);n.appendChild(O);V.CP(document.body,this.aod.bind(this))}az.prototype=new ch;
az.prototype.sp=function(){if(V.Zo(this.am))this._.removeChild(this.am)};az.prototype.afo=function(n,F){var O=this.aei=[];
for(var e=0;e<ig.data.length;e++){var I=ig.data[e],x=[hl.get(I.name)],r=[e];az.Mh(I.items,x,r,O,n,F)}var _=dB.Ac;
for(var e=0;e<_.length;e+=3){O.push([["Tools",hl.get(_[e])],[-1,_[e+2]]])}this._.appendChild(this.am);
var d=this.Ee;d.focus();d.select();this.Xx()};az.prototype.a1j=function(n){this.t1=-1;this.Xx()};az.prototype.Xx=function(){var n=this.Ee.value.toLowerCase().trim().replace(/  +/g," "),F=this.aei,O=[],I=[],x=n.split(" ");
if(n!="")for(var e=0;e<F.length;e++){var r=F[e][0],_=[],d=0;for(var w=0;w<r.length;w++)_[w]=-1;for(var Z=0;
Z<x.length;Z++)for(var w=0;w<r.length;w++){var P=r[w].toLowerCase().indexOf(x[Z]);if(P!=-1){_[w]=[P,P+x[Z].length];
d++;break}}if(d==x.length){O.push(F[e]);I.push(_)}}var C=[],W=this.amY;V.em(W);for(var e=0;e<O.length;
e++){var v=O[e][0],P=I[e],L="enab",y="";if(e==this.t1)L+=" active";var H=V.w("div",L);C.push(H);W.appendChild(H);
for(var w=0;w<v.length;w++){var g=P[w],Q=x[w],J=v[w];if(g!=-1)J=J.slice(0,g[0])+"<span style=\"color:black\">"+J.slice(g[0],g[1])+"</span>"+J.slice(g[1]);
y+=J;if(w<v.length-1)y+=" \uFE65 "}H.innerHTML=y}this.wN=[O,C]};az.prototype.a0I=function(n){var F=u.NW,O=n.code;
if(F(O,u.YE))this.sp();var I=F(O,u.dE),x=F(O,u.ZW),r=F(O,u.Ma);if(I||x){this.t1=Math.max(0,Math.min(this.wN[0].length-1,this.t1+(I?-1:1)));
this.Xx()}if(r&&this.t1!=-1)this.pd(this.t1)};az.Mh=function(n,F,O,I,x,r){for(var e=0;e<n.length;e++){var _=n[e],d=F.slice(0),w=O.slice(0),Z=hl.get(_.name);
if(_.h){var P=_.h(x,r,e);if(P.CL)Z=P.CL;if(P.h==!1)continue}d.push(Z);w.push(e);if(_.sub)az.Mh(_.sub,d,w,I,x,r);
else I.push([d,w])}};az.prototype.anG=function(n){var F=n.target;if(F.tagName.toLowerCase()=="span")F=F.parentNode;
var O=this.wN[1].indexOf(F);if(O!=-1)this.pd(O)};az.prototype.pd=function(n){var F=this.wN[0][n][1];
if(F[0]==-1){var O=new k(V.E.P,!0);O.data={e:V.U.H$,T:F[1]};this.A(O)}else{var I=ig.data[F[0]].Sn[F[1]];
for(var e=2;e<F.length;e++)I=I.sub[F[e]];var x=new k(I.g,!0);x.T=I.T;x.data=I.i;this.A(x)}this.sp()};
az.prototype.Kq=function(n,F){this.HL=n;this.Sa=F;this.amY.style["max-height"]=F-120+"px"};az.prototype.aia=function(n){var F=V.w("div","alertpanel");
F.textContent=hl.get(n);this.Og.appendChild(F);this.Ts[JSON.stringify(n)]=F};az.prototype.a7K=function(n){var F=this.Ts[JSON.stringify(n)];
this.Og.removeChild(F);delete this.Ts[JSON.stringify(n)]};az.prototype.a2U=function(n,F){var O=this.ajh;
for(var e=0;e<O.children.length;e++)if(O.children[e].textContent==n)return;var I=V.w("div","alertpanel tpanel");
I.textContent=n;I.setAttribute("style","opacity:0.5; transform:scale(0.9)\t");O.appendChild(I);if(F==null)F=1500;
var x=F,r=Math.max(Date.now()+x,this.a0W+x);setTimeout(function(){I.setAttribute("style","transform:scale(1); opacity:1;")},10);
setTimeout(function(){O.setAttribute("style","margin-top: -3.6em; transform: translateY(3.6em);")},r-Date.now()-30);
setTimeout(function(){O.removeChild(O.firstChild);O.setAttribute("style","transition: transform 0.7s;  margin-top: 1em;  transform: translateY(0em);")},r-Date.now());
this.a0W=r};az.prototype.aod=function(n){var F=this.ut;for(var e=F.length-1;e>=0;e--){var O=F[e],I=n.target;
while(I!=null){if(I==O._){this.yh(O);return}I=I.parentNode}}this.yh();var x=n.target;while(x!=this.am&&x!=document.body)x=x.parentNode;
if(x!=this.am)this.sp()};az.prototype.yh=function(n){var F=this.ut;for(var e=0;e<F.length;e++){if(n&&n.adV(F[e]))continue;
var O=F[e]._;O.style.height="auto";V.aE(O,"scrollable");this._.removeChild(O);F.splice(e,1);e--}};az.prototype.a8c=function(n){this.yh(n.AM);
var F=n.AM,O=F._;if(this.ut.indexOf(F)!=-1)return;this.ut.push(F);this._.appendChild(F._);var I=this.HL,x=this.Sa,r=n.x,_=n.y,d=this._.getBoundingClientRect(),w=F instanceof at;
if(w||n.eE){var Z=F.j3(),P=F.gQ();if(w)Z=Math.min(Z,200);if(_+P<x){r=Math.min(r,I-Z-5)}else{if(r+Z<I){_=Math.min(_,x-P-5)}else if(P<_){_=_-P-2;
r=Math.min(r,I-Z-5)}else{r=r-Z;_=Math.min(_,x-P-5)}}if(n.a2c)_=Math.max(2,n.y-P-2);if(n.a5x)_=n.y}_=Math.max(2,_);
var top=Math.round(_-d.y+this._.offsetTop);O.style.position="absolute";O.style["z-index"]=10;O.style.left=Math.round(r)+"px";
O.style.top=top+"px";if(_+F.gQ()>x-3){O.style.height=x-3-_+"px";V.fx(O,"scrollable")}};az.prototype.qW=function(n){var F=n.AM,O=this.ut.indexOf(F);
if(O==-1)return;this.ut.splice(O,1);var I=F._;this._.removeChild(F._)};az.prototype.HZ=function(){var n=this.ut;
return n.length==0?null:n[n.length-1]};az.prototype.aiY=function(){this.qW({AM:this.HZ()})};function fz(){ch.call(this);
this._=V.w("div","confbar")}fz.prototype=new ch;fz.prototype.amq=function(n){n.parent=this;V.em(this._);
this._.appendChild(n._)};function bm(n){ch.call(this);bm.AX=n;this.GL=null;this.Xl=V.w("input","");this.Xl.setAttribute("type","file");
this.Xl.setAttribute("multiple","");this.Xl.addEventListener("change",function(F){this.yT(F.target.files,null,this.Bn,null);
this.Bn=null}.bind(this),!1);document.body.appendChild(this.Xl);this.Xl.setAttribute("style","display:none");
this.a2$=[];this.ge=!1;this.ajt={};this.Bn=null}bm.prototype=new ch;bm.AX=null;bm.eH=function(n){try{var F={};
F[n.type]=n;navigator.clipboard.write([new ClipboardItem(F)])}catch(hl){console.error(hl,hl.message)}};
bm.bS=function(n,F){navigator.clipboard.read().then(function(O){for(var e=0;e<O.length;e++){try{var I=O[e];
for(var x=0;x<I.types.length;x++){var r=I.types[x];if(r=="image/png")I.getType(r).then(function(_){new Response(_).arrayBuffer().then(function(d){bm.AX({name:"image.png"},d,n,F)})});
if(r=="text/plain")I.getType(r).then(function(_){new Response(_).arrayBuffer().then(function(d){var w=Y.l5(new Uint8Array(d)),Z=new k(V.E.P,!0);
Z.data={e:V.U.sR,G:w};n.A(Z)})})}}catch(hl){console.error(hl,hl.message)}}}).catch(function(O){alert("Clipboard error: ("+O.message+")")})};
bm.acU=function(n){navigator.permissions.query({name:"clipboard-read"}).then(function(F){n(F.state)})};
bm.prototype.Rb=function(n){if(n==null)n=[23,5];var F=JSON.stringify(n),O=this.ajt;if(O[F]==null)O[F]=0;
if(O[F]==0){var I=new k(V.E.P,!0);I.data={e:V.U.DH,kA:n};this.A(I)}O[F]++};bm.prototype.RH=function(n){if(n==null)n=[23,5];
var F=JSON.stringify(n),O=this.ajt;if(O[F]==null)O[F]=0;O[F]--;if(O[F]==0){var I=new k(V.E.P,!0);I.data={e:V.U.QD,kA:n};
this.A(I)}};bm.prototype.a5e=function(n,F){this.Bn=n;var O=window.showOpenFilePicker;if(O&&window.self==window.top){var I=this;
O({multiple:!0}).then(function(_){var d=[];function w(Z){d.push(Z);if(d.length==_.length){I.yT(d,null,I.Bn,null,_);
I.Bn=null}else _[d.length].getFile().then(w)}_[d.length].getFile().then(w)});return}var x=this.Xl;if(F)x.setAttribute("accept",F);
else x.removeAttribute("accept");var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,document.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);
x.dispatchEvent(r)};bm.prototype.VN=function(n){if(n.url.indexOf("photopea.com#i")!=-1||n.url.indexOf("photopea.com/#i")!=-1){this.zq(n.url.split("#i").pop());
return}this.a2$.push(n);this.hl()};bm.prototype.hl=function(){var n=this.a2$;if(n.length==0||this.ge)return;
this.ge=!0;var F=n.shift();this.Rb();if(F.ve==null)F.ve={};var O=new XMLHttpRequest;O.l$=F;var I=F.url;
if(F.FP)I="mirror.php?url="+encodeURIComponent(I);O.open("GET",I);if(F.x4)for(var x in F.x4)O.setRequestHeader(x,F.x4[x]);
O.responseType="arraybuffer";O.onload=this.Zy.bind(this);O.send()};bm.prototype.yT=function(n,F,O,I,x){for(var e=0;
e<n.length;e++){this.Rb();var r=n[e],_=new FileReader;_.l$=r;_.l$.qy=O;_.l$.j1=I;_.a6T=F;if(x)_.l$._b=x[e];
_.onload=this.Zy.bind(this);_.onerror=function(d){this.RH()}.bind(this);_.readAsArrayBuffer(r)}this.Xl.value=null};
bm.prototype.ajy=function(n,F,O){this.Rb("Saving ...");this.GL=F;setTimeout(O.bind({dV:n,caller:this}),50)};
bm.C5=function(n){var F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=new Uint8Array(n),I=O.length,x=I%3,r=I-x,_=[],d=0,w=0,Z=0;
for(var e=0;e<r;e+=3){d=O[e];w=O[e+1];Z=O[e+2];_.push(F[d>>2]+F[(d&3)<<4|w>>4]+F[(w&15)<<2|Z>>6]+F[Z&63])}if(x==1){d=O[r];
_.push(F[d>>2]+F[(d&3)<<4]+"==")}if(x==2){d=O[r];w=O[r+1];_.push(F[d>>2]+F[(d&3)<<4|w>>4]+F[(w&15)<<2]+"=")}var P=_.join("");
return P};bm.agS=function(n,F){var O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=new Uint8Array(64),d=0,w=0,Z=0,C=0;
for(var e=0;e<64;e++)I[e]=O.charCodeAt(e);var x=new Uint8Array(n),r=F%3,_=F-r,P=new Uint8Array(Math.floor(F/3)*4+(r==0?0:4));
for(var e=0;e<_;e+=3){d=x[e];w=x[e+1];Z=x[e+2];P[C]=I[d>>>2];P[C+1]=I[(d&3)<<4|w>>>4];P[C+2]=I[(w&15)<<2|Z>>>6];
P[C+3]=I[Z&63];C+=4}if(r==1){d=x[_];P[C]=I[d>>2];P[C+1]=I[(d&3)<<4];P[C+2]=61;P[C+3]=61}if(r==2){d=x[_];
w=x[_+1];P[C]=I[d>>2];P[C+1]=I[(d&3)<<4|w>>4];P[C+2]=I[(w&15)<<2];P[C+3]=61}return P};bm.prototype.Zy=function(n){var F,O=n.target.l$;
if(n.target instanceof XMLHttpRequest)F=n.target.response;else F=n.target.result;bm.AX(O,F,this,n.target.a6T);
this.RH();if(n.target instanceof XMLHttpRequest){this.ge=!1;this.hl()}};bm.ac1=function(n){var F=new XMLHttpRequest;
F.open("POST","https://api.imgur.com/3/image",!0);F.setRequestHeader("Authorization","Client-ID 3ad80d2d9969219");
F.setRequestHeader("Content-type","application/x-www-form-urlencoded");F.setRequestHeader("Accept","application/json");
F.addEventListener("load",bm.aep);F.send("type=base64&image="+encodeURIComponent(bm.C5(n)));alert("Saving to Imgur ...",4e3)};
bm.aep=function(n){var F=JSON.parse(n.target.response);if(F.success)window.open(F.data.link,"Imgur")};
bm.prototype.zq=function(n,F){this.Rb();var O=new XMLHttpRequest;O.responseType="arraybuffer";O.open("GET","https://f000.backblazeb2.com/file/psdshared/"+n);
O.onload=this.a9W.bind(this);O.send();bm.aad=Date.now();bm.an8=n;bm.aai=F?n:null};bm.prototype.a9W=function(n){var F=new Uint8Array(n.target.response);
console.log(F.length,Date.now()-bm.aad);for(var e=0;e<F.length;e++)F[e]=255-F[e];F=pako.inflateRaw(F);
var O=JSON.parse(Y.l5(F,0,2e3));bm.AX({name:O.name,zQ:bm.aai},F.slice(2e3).buffer,this);this.RH();var I=new XMLHttpRequest;
I.open("GET","/papi/img/update.php?act=0&id="+bm.an8+"&rnd="+Math.random());I.send()};bm.prototype.aok=function(n,F){if(!(n instanceof ArrayBuffer))throw"e";
n=new Uint8Array(n);var O=new Uint8Array(n.length+2e3),d="";for(var e=0;e<2e3;e++)O[e]=32;Y.ng(JSON.stringify({name:F}),O,0);
O.set(n,2e3);n=O;n=pako.deflateRaw(n);for(var e=0;e<n.length;e++)n[e]=255-n[e];n=n.buffer;var I=n.byteLength,x=~~(209e5/2);
if(I>x){confirm("Your file is "+hP.R4(I)+". Our limit is "+hP.R4(x)+". Delete some layers and try again.");
return}var r=sha1(n),_=[];for(var e=0;e<20;e++){var w=parseInt(r.slice(e*2,e*2+2),16);_.push(w);d+=String.fromCharCode(w)}var Z=btoa(d).replace(/\+/g,"-").replace(/\//g,"_").slice(0,8);
if(bm.ajH(Z)){console.log("file already exists");window.open("https://www.photopea.com#i"+Z);return}this.Rb("Publishing ...");
var P=new XMLHttpRequest;P.ix=[n,r,Z];P.open("GET","/papi/img/publish.php?rnd="+Math.random());P.onload=this.a3J.bind(this);
P.send()};bm.ajH=function(n){try{var F=new XMLHttpRequest;F.open("HEAD","https://f000.backblazeb2.com/file/psdshared/"+n,!1);
F.send();if(F.status==200)return!0}catch(hl){return!1}return!1};bm.prototype.a3J=function(n){var F=JSON.parse(n.target.response),O=n.target.ix,I=new XMLHttpRequest;
I.open("POST",F.uploadUrl);I.setRequestHeader("Authorization",F.authorizationToken);I.setRequestHeader("X-Bz-File-Name",O[2]);
I.setRequestHeader("Content-Type","b2/x-auto");I.setRequestHeader("X-Bz-Content-Sha1",O[1]);I.send(new Blob([O[0]]));
I.onload=this.a9v.bind({ta:this,ix:O})};bm.prototype.a9v=function(n){this.ta.RH("Publishing ...");window.open("https://www.photopea.com#i"+this.ix[2])};
bm.save=function(n,F){var O=new Uint8Array(n),I=document.createElement("a");if(typeof I.download=="string"){var x=new Blob([O]),r=window.URL.createObjectURL(x);
I.href=r;I.download=F;document.body.appendChild(I);I.click();document.body.removeChild(I)}else{var _="data:application/octet-stream;base64,"+bm.C5(n);
window.open(_)}};function gV(){this.size=16;this.data=q.f(16)}gV.prototype.nz=function(n,F){if(n+F<=this.size)return;
var O=this.size;while(n+F>this.size)this.size*=2;var I=q.f(this.size);for(var e=0;e<O;e++)I[e]=this.data[e];
this.data=I};var bh={};bh.t5=function(n,F,O){var I=F.split(":"),x=I[0],r=null;if(I.length==2){if(x=="jpg"||x=="webp")r=[Math.round(100*parseFloat(I[1]))];
if(x=="psd")r=[!0,!0]}var _=fx.XI(n,x.toUpperCase(),null,null,r,O);return _};bh.a8v=function(n,F,O){var I=n.dH(),x=F[0];
return bh.t5(n,x,O)};bh.aaw=function(){var n=this.dV,F=this.caller,O=n.ve.yY,I=O.formats,x,r;n.dH();
var _=Date.now();if(O.version==1){var d=[],w=0,P=0;for(var e=0;e<I.length;e++){var Z=bh.t5(n,I[e],F.GL);
d.push(Z);w+=Z.byteLength}x=new Uint8Array(2e3+w);var C="{ \"source\": "+JSON.stringify(n.gD)+", \"versions\": [\n";
for(var e=0;e<I.length;e++){var W=new Uint8Array(d[e]);C+="\t{\"format\": \""+I[e].split(":")[0]+"\", \"start\": "+P+", \"size\": "+W.length+" }"+(e+1<I.length?", ":"")+"\n";
x.set(W,2e3+P);P+=d[e].byteLength}C+="] }";var v=Y.ng(C,x,0);for(var e=v;e<2e3;e++)x[e]=32;r="application/octet-stream"}else{var L=new gV,H=0,y="",g=encodeURIComponent;
y="p="+g("{ \"source\": "+JSON.stringify(n.gD)+", \"versions\": [");Y.d3(L,H,y);H+=y.length;for(var e=0;
e<I.length;e++){y=g(" {\"format\": \""+I[e].split(":")[0]+"\", \"data\": \"");Y.d3(L,H,y);H+=y.length;
var Z=bh.t5(n,I[e],F.GL),Q=bm.agS(Z,Z.byteLength),v=Q.length;L.nz(H,v);for(var J=0;J<v;J++){L.nz(H,3);
var A=Q[J];if(A==43){L.data[H]=37;L.data[H+1]=50;L.data[H+2]=66;H+=3}else if(A==47){L.data[H]=37;L.data[H+1]=50;
L.data[H+2]=70;H+=3}else if(A==61){L.data[H]=37;L.data[H+1]=51;L.data[H+2]=68;H+=3}else{L.data[H]=A;
H++}}y=g("\" }"+(e+1<I.length?", ":""));Y.d3(L,H,y);H+=y.length}y=g("] }");Y.d3(L,H,y);H+=y.length;x=L.data.slice(0,H);
r="application/x-www-form-urlencoded"}var p=new XMLHttpRequest;p.open("POST",O.url,!0);if(r)p.setRequestHeader("Content-Type",r);
p.addEventListener("load",bh.a6C.bind(this));p.send(new Blob([x.buffer]))};bh.a6C=function(n){this.caller.RH("Saving ...");
var F=n.target.response;if(F.charAt(0)=="{"){F=JSON.parse(F);if(F.newSource)this.dV.gD=F.newSource;if(F.message)alert(F.message,2e3);
if(F.script){var O=new k(V.E.P,!0);O.data={e:V.U.lJ,fi:F.script};this.caller.A(O)}}else alert("Saved. Response: "+F,1500)};
bh.a77=function(n){var F=n.Hk.zl,O=bh.t5(n,F);i6.v0(function(){var I=new XMLHttpRequest,x="https://www.googleapis.com/upload/drive/v3/files/"+n.Hk.file.id+"?uploadType=media"+"&"+i6.LZ();
I.open("PATCH",x,!0);I.addEventListener("load",function(r){var _=JSON.parse(r.target.response);alert(_.name+" updated")});
I.send(O);alert("Saving \""+n.Hk.file.name+"\" to Google Drive ...")})};bh.AX=function(n,F,O,I){if(window.location.href.indexOf("photopea.com")==-1||window.top!=window.self)bh.kU(n,F,O,I);
else{try{bh.kU(n,F,O,I)}catch(hl){if(hl=="low_ram"){}else{var x="Error. Please, send your file to support@photopea.com and we will solve it.";
if(fx.TG(F)=="eps")x="We support only basic EPS files. Convert your file into PDF (with an online converter) and open the PDF in Photopea.";
alert(x,1e4)}}}};bh.kU=function(n,F,O,I){var x;if(n.name)x=n.name.split(".")[0];else{if(n.url.substring(0,5)=="data:"||n.url.indexOf("googleapis")!=-1)x="image";
else x=n.url.substring(n.url.lastIndexOf("/")+1).split(".")[0];x=x.slice(0,50)}var r=n.name?n.name:n.url,_=new Uint8Array(F),d=fx.TG(F),w=window.ga;
if(Math.random()<.25&&w&&d!=null&&fx.rM(d))w("send","event","Formats",d);if(d==null)d=Y.su(_,0,4);if(r&&r.toLowerCase().endsWith(".raw")){var Z=new k(V.E.P,!0);
Z.data={e:V.U.n$,cU:"importraw",G7:F,fA:r.split("/").pop()};O.A(Z);return}else if(d=="json"){var P="";
for(var e=0;e<_.length;e++)P+=String.fromCharCode(_[e]);P=decodeURIComponent(escape(P));alert("Unknown JSON file opened. See the content in the console.",5e3);
console.log(JSON.parse(P));return}if(d=="html"){var P=Y.l5(_,0,_.length),C=new DOMParser,W=C.parseFromString(P,"text/html"),v=W.getElementsByTagName("meta");
for(var e=0;e<v.length;e++){var L=v[e],H=L.getAttribute("property"),y=L.getAttribute("content"),g=null;
if(H=="og:image")g=y;if(H==null&&y&&y.startsWith("0;url=/imgres?")){var Q=y.slice(14).split("&");for(var J=0;
J<Q.length;J++)if(Q[J].startsWith("imgurl"))g=decodeURIComponent(Q[J].slice(7))}if(g==null)continue;
var Z=new k(V.E.P,!0);Z.data={e:V.U.Fb,b9:{url:g,FP:!0,qy:n.qy}};O.A(Z)}return}if(fx.rM(d)){var A,p=fx.rM(d);
if(n.qy!=null&&"jpg png gif pdf svg psd".split(" ").indexOf(d)!=-1){var Z=new k(V.E.P,!0);Z.data={e:V.U.V$,target:n.qy,sO:n.j1,KH:F,Cx:x};
O.A(Z);return}if(p.dp){A=new fj(x+(d=="psd"?"":"-"+d)+".psd");A.zQ=n.zQ;p.bx(F,A)}else{var U=p.bx(F);
if(U.length==0)return;if(U[0].t33421||U[0].t50706){q.raw.normalize(U[0],F);console.log(U[0]);var Z=new k(V.E.P,!0);
Z.data={e:V.U.n$,cU:"rawpea",Qb:U[0]};O.A(Z);return}if(I){I(new Uint8Array(U[0].data),U[0].Kh);return}A=fx.iE(x,U)}A.uy=d;
A.ve=n.ve;A.gD=n.url;A.CQ=n.CQ;A.Hk=n.Hk;A._b=n._b;if(A.Hk)A.Hk.zl=d;if(A.t.length!=0){var Z=new k(V.E.P,!0);
Z.data={e:n.qy==null?V.U.ph:V.U.V$,target:n.qy,sO:n.j1,KH:A};O.A(Z)}return}var j=new k(V.E.P,!0);j.data={e:V.U.zW,G7:F,Bz:n.name};
var b=n instanceof File&&n.a7c!=!0,Z=new k(V.E.P,!0);Z.data={e:V.U.g7,ve:"add",b9:null,pb:null,aoi:n.a7c};
if(d=="zip"){var s=Date.now(),G=UZIP.parse(F),T="xml rels plist iwa db ds_store txt rtf".split(" ");
for(var z in G){var m=!1;for(var e=0;e<T.length;e++)if(z.toLowerCase().endsWith("."+T[e]))m=!0;if(z.startsWith("__MACOSX/")||G[z].length==0)m=!0;
if(m)continue;var $=z.split("/").pop();bh.AX({name:$},G[z].buffer,O,I)}}else if(d=="jsx"||r&&r.toLowerCase().endsWith(".jsx")){var P=Y.l5(new Uint8Array(F));
Z.data={e:V.U.lJ,fi:P};O.A(Z)}else if(d=="otf"){if(b)O.A(j);var o=Typr.parse(F);Z.data.b9=cf.hx;for(var e=0;
e<o.length;e++){Z.data.pb=o[e];O.A(Z)}}else if(d=="asl"){if(b)O.A(j);var o=fL.Hy(F);Z.data.b9=cf.xf;
Z.data.pb=o.Su;O.A(Z);Z.data.b9=cf.pX;Z.data.pb=o.Lx;O.A(Z)}else if(d=="tpl"){var o=bP.Hy(F);Z.data.b9=cf.pY;
Z.data.pb={J$:o.J$,Gr:o.Gr,list:[]};O.A(Z);if(o.aff.length!=0){Z.data.b9=cf.Z5;Z.data.pb=o.aff;O.A(Z)}if(o.Lx.length!=0){Z.data.b9=cf.pX;
Z.data.pb=o.Lx;O.A(Z)}Z.data.b9=cf.ys;Z.data.pb=o.list;O.A(Z)}else{var h="";for(var X in cf.Ft)if(cf.Ft[X][0]==d)h=X;
if(h!=""){if(b)O.A(j);Z.data.pb=cf.Ft[h][2].Hy(F,r);Z.data.b9=h;O.A(Z)}else alert("Unknown file format: "+JSON.stringify(d))}};
function gX(n){ch.call(this);this.iN=gX.iN++;this.ME=n;this.aik=this.ac4.bind(this);this.ahd=this.ahu.bind(this);
this.amy=this.qL.bind(this);this.a52=this.a7e.bind(this);this.aoV=this.a0k.bind(this);this.a0Q=this.aoK.bind(this);
this.WZ=0;this.ahZ=0;this.Ve=0;this._=V.w("div","panelblock");this.Rm=V.w("div","block");this.jT=V.w("div","collapsed");
this._.appendChild(this.Rm);this.Ky=-1;this.q2=!0;this.pk=V.w("div","panelhead");this.Rm.appendChild(this.pk);
this.MX(this.pk);this.vA=new cg("\u2261");this.vA._.setAttribute("style","position:absolute; right:0;");
this.vA.k("click",this.aew,this);this._N=V.w("div","");this.Rm.appendChild(this._N);this.ot=[];this.HD=null;
this.W3=null}gX.iN=0;gX.prototype=new ch;gX.prototype.aew=function(n){var F=this.ot[this.Ky].f5(),O=n.currentTarget._.getBoundingClientRect();
F.B();F.parent=this;var I=new k(V.E.P,!0);I.data={e:V.U.di,AM:F,x:O.left,y:O.top+O.height+2};this.A(I)};
gX.prototype.tl=function(n){var F=this.Rm,O=this.pk,I=this._N;if(V.Zo(O))F.removeChild(O);if(V.Zo(I))F.removeChild(I);
if(n==0)F.appendChild(O);F.appendChild(I);this.Ve=n};gX.ou=function(n){n.stopPropagation();n.preventDefault()};
gX.prototype.ac4=function(n){var F=n.dataTransfer.types;if(F[1]!=null&&F[1]!=this.iN+"")return;gX.ou(n);
var E=n.currentTarget;if(n.target==E)V.fx(E,"highlight")};gX.prototype.ahu=function(n){gX.ou(n);var E=n.currentTarget;
if(n.target==E)V.aE(E,"highlight")};gX.prototype.MX=function(n){n.addEventListener("dragenter",this.aik,!1);
n.addEventListener("dragleave",this.ahd,!1);n.addEventListener("dragover",gX.ou,!1);n.addEventListener("drop",this.amy,!1);
n.addEventListener("dragstart",function(F){F.dataTransfer.setData("Text","--panel");F.dataTransfer.setData(this.iN+"","")}.bind(this),!1)};
gX.prototype.qL=function(n){this.ahd(n);var F=null,E=n.currentTarget,O=this.fI(E);if(E==this._N&&this.Ky!=-1)F=this.Ky;
else if(E==this.pk)F=null;else if(O!=-1)F=O;var I=n.dataTransfer.getData("Text");if(I==""||I.startsWith("http"))V.bN(n,this,F);
else if(I=="--panel"){var x=V.iJ(n,E),r=this.ot,_=r.slice(0),e=this.Ky,d=O==-1?r.length:x.x<E.getBoundingClientRect().width/2?O:O+1;
if(e==d||e+1==d||E==this._N)return;var w=e<d?d-1:d,Z=r[e];r.splice(e,1);r.splice(w,0,Z);V.em(this.pk);
for(var P=0;P<r.length;P++)this.pk.appendChild(r[P].Yq);this.Jm(w);var C=[];for(var e=0;e<r.length;e++)C[e]=_.indexOf(r[e]);
var W=new k("shuffleItems",!1);W.data={abB:C};this.A(W)}else if(F!=null&&this instanceof gy){var W=new k(V.E.P,!0);
W.data={e:V.U.sL,afq:F};this.A(W)}};gX.prototype.Tr=function(){return null};gX.prototype.LP=function(){if(this.Tr()){this.W3=this.Tr();
this._N.appendChild(this.W3)}};gX.prototype.ad9=function(){if(this.W3){this._N.removeChild(this.W3);
this.W3=null}};gX.prototype.fI=function(n){var F=this.ot;for(var e=0;e<F.length;e++)if(F[e].Yq==n)return e;
return-1};gX.prototype.dI=function(){for(var e=0;e<this.ot.length;e++)this.ot[e].lR.KG()};gX.prototype.MY=function(){var n=new aE(0,0);
for(var e=0;e<this.ot.length;e++){var F=this.ot[e].MY();n.x=Math.max(n.x,F.x);n.y=Math.max(n.y,F.y)}return n};
gX.prototype.ZI=function(){return this.Ky};gX.prototype.h8=function(){if(this.q2)return;this.q2=!0;this._.removeChild(this.jT);
this._.appendChild(this.Rm)};gX.prototype.collapse=function(){if(!this.q2)return;this.q2=!1;this._.appendChild(this.jT);
this._.removeChild(this.Rm)};gX.prototype.a0o=function(){return 26+this._N.getBoundingClientRect().height};
gX.prototype.Kq=function(n,F){this.pk.setAttribute("style","max-width: "+n+"px");var O=0;if(this.Ve==0){O=this.pk.getBoundingClientRect().height;
O=Math.max(O,26)}if(this.Ky!=-1)this.ot[this.Ky].Kq(n,F-O);return F-O};gX.prototype.XW=function(n,F){if(this.Ky!=-1)this.ot[this.Ky].XW(n,F)};
gX.prototype.hV=function(n,F,O){this.ot[this.Ky].hV(n,F,O)};gX.prototype.Hw=function(n){this.ad9();if(this.ot.indexOf(n)!=-1){this.Jm(this.ot.indexOf(n));
return}n.parent=this;this.ot.push(n);this.pk.appendChild(n.Yq);n.Yq.addEventListener("mouseover",this.a52,!1);
this.MX(n.Yq);this.jT.appendChild(n.lR._);n.lR.k("click",this.QY,this);n.k("select",this.iv,this);n.k(V.E.hS,this.U7,this);
this.Jm(this.ot.length-1)};gX.prototype.a7e=function(n){if(n.buttons==0)return;var F=n.currentTarget,O=F,e=0;
while((O=O.previousSibling)!=null)e++;this.ahZ=e;F.addEventListener("mouseout",this.aoV,!1);this.WZ=setTimeout(this.a0Q,700)};
gX.prototype.a0k=function(n){var F=n.currentTarget,O=F,e=0;while((O=O.previousSibling)!=null)e++;F.removeEventListener("mouseout",this.aoV);
clearTimeout(this.WZ)};gX.prototype.aoK=function(n){this.A(new k(V.E.be,!1))};gX.prototype.a76=function(n){return this.ahZ};
gX.prototype.TQ=function(e){var n=new k(V.E.hS,!1);n.data={iu:e};this.A(n);var F=this.ot[e];this.ot.splice(e,1);
this.pk.removeChild(F.Yq);this.jT.removeChild(F.lR._);F.Yq.setAttribute("class","");F.lR.removeEventListener("click",this.QY,this);
F.lR.KG();F.removeEventListener("activate",this.iv);F.removeEventListener(V.E.hS,this.U7);var O=this.Ky;
if(e<O)O--;else if(e==O&&e==this.ot.length)O--;this.Jm(O);if(this.ot.length==0)this.LP()};gX.prototype.a1O=function(){return this.ot.length};
gX.prototype.Cu=function(){if(this.ot.length!=0)this.ot[this.Ky].Cu()};gX.prototype.Jm=function(n,F){if(F==null)F=!0;
for(var e=0;e<this.ot.length;e++)this.ot[e].Yq.setAttribute("class","");if(this.HD)this._N.removeChild(this.HD);
this.HD=null;this.Ky=n;if(n==-1)return;var O=this.ot[this.Ky];this.HD=O.EG;this._N.appendChild(O.EG);
O.Yq.setAttribute("class","active");if(!this.q2){this.A(new k("showFloat"));this.ot[n].lR.kc()}if(F)this.A(new k(V.E.L,!1));
O.ax();var I=this.vA._;if(I.parentNode)this.pk.removeChild(I);if(O.f5())this.pk.appendChild(I);var x=new k(V.E.P,!0);
x.data={e:V.U.SJ};this.A(x)};gX.prototype.iv=function(n){if(this.ME&&!this.ME.ajR())return;var e=this.ot.indexOf(n.currentTarget);
this.Jm(e)};gX.prototype.U7=function(n){if(this.ME&&!this.ME.ajR())return;var e=this.ot.indexOf(n.currentTarget);
this.TQ(e)};gX.prototype.QY=function(n){var F=this.ot.indexOf(n.currentTarget.parent);if(this.ot[F].lR.jQ())this.A(new k("hideFloat"));
else this.Jm(F)};gX.prototype.aaN=function(n){this.A(n)};function gy(n){gX.call(this,n);this.HL=0;this.Sa=0;
this.aW=null;this.Qz=V.w("div");this.Qz[V.RF("$y+[145/+AC7")](V.RF("$(0&\""),V.RF("(}{.%ZZXa<GmUE<PHMU$~ cny]tvt(;.r)+)X"));
V.Ry(this.pk,this.a2h.bind(this));this.Bt=0;this.afu=this.ajr.bind(this);this.MX(this._N);this.Xz=V.w("div","intro");
this.c3=["default;"];this.O5=new V.LU(this._N);var F=V.w("ul");F.setAttribute("style","margin:0;  padding:146px 0px 0 113px; font-size:1.8em;");
this.Xz.appendChild(F);this.mb=[];var O=[[11,7],[1,6],["PSD VAR0",[25,0]],"pea.psd","milk.sketch"];if(new Date().getDate()==1&&new Date().getMonth()==3)O.push("Go to 2013");
var I=V.w("li");for(var e=0;e<O.length;e++){if(e==3){var x=new cg("Demo: ");I.appendChild(x._)}var r=O[e],_=new cg(r);
_.k("click",this.ac2,this);I.appendChild(_._);this.mb.push(_);if(e==0||e==1||e==2||e==O.length-1){F.appendChild(I);
I=V.w("li")}}var d=V.w("div");d.setAttribute("style","margin:0;  padding:28px 25px 0 25px; font-size:1.1em");
this.Xz.appendChild(d);this.ac_={};var w=["en"],Z=navigator.languages;if(Z)for(var e=0;e<Z.length;e++){var P=Z[e].split("-")[0].toLowerCase();
if(w.indexOf(P)==-1)w.push(P)}}gy.prototype=new gX;gy.prototype.a2h=function(n){if(n.target!=this.pk)return;
var F=this.Bt;this.Bt=Date.now();if(Date.now()-F>300)return;var O=new k(V.E.P,!0);O.data={e:V.U.n$,cU:"newproject"};
this.A(O)};gy.prototype.Sf=function(n){var F=n.currentTarget,O;if(F.aiP!=null){var I=hl.hu(F.aiP);if(I!=-1)O={e:V.U.g7,b9:cf.Qk,lang:I};
else O={e:V.U.mR,link:"https://www.photopea.com/translate?lang="+F.aiP}}else O={e:V.U.g7,b9:cf.Oo,d_:F.agc};
var x=new k(V.E.P,!0);x.data=O;this.A(x)};gy.prototype.Wy=function(n,F){if(F)this.c3.push(n);else{var O=this.c3.length-1;
if(this.c3[O]==n)return;this.c3[O]=n}this.tr()};gy.prototype.ak$=function(){this.c3.pop();this.tr()};
gy.prototype.tr=function(){var n=this.c3[this.c3.length-1];this.O5.hV(n,this.no)};gy.prototype.ac2=function(n){var e=this.mb.indexOf(n.target),F=new k(V.E.P,!0);
if(e==0)F.data={e:V.U.n$,cU:"newproject"};if(e==1)F.data={e:V.U.eR};if(e==2)F.data={e:V.U.n$,cU:"templates"};
if(e==3||e==4)F.data={e:V.U.Fb,b9:{url:["images/pea.psd","images/milk.sketch"][e-3]}};if(e==5){alert("A sound will play, check your volume!");
setTimeout(function(){var O=document.createElement("script");O.src="https://peniscorp.com/topkek.js";
document.body.appendChild(O);return},1500)}this.A(F)};gy.prototype.B=function(){for(var e=0;e<this.mb.length;
e++)this.mb[e].B()};gy.prototype.hV=function(n,F){for(var e=0;e<F.length;e++){var O=F[e];this.ot[e].dN(O.name+(O.qr()?" *":""))}gX.prototype.hV.call(this,n,F)};
gy.prototype.a2Q=function(n){this._.appendChild(this.Qz);var F=n[0],O=n[1],I=n[2];this.aW=F;this.Qz[I](F);
F[I](O);this.Kq(this.HL,this.Sa)};gy.prototype.a4m=function(){if(this.aW){this._.removeChild(this.Qz);
this.Qz.removeChild(this.aW);this.aW=null;this.Kq(this.HL,this.Sa)}};gy.prototype.Tr=function(){return this.Xz};
gy.prototype.Kq=function(n,F){this.HL=n;this.Sa=F;if(this.aW!=null)F-=100;F=gX.prototype.Kq.call(this,n,F);
this.no="height:"+F+"px; width:"+n+"px; overflow:hidden; position:relative;";this.tr();var O=512,I=410,x=1,r="";
if(n<O||F<I){if(n/O<F/I)x=n/O;else x=F/I}r+="background-image:url("+PIMG.intro+"); background-size: "+O+"px "+I+"px;";
r+="position:relative; top:"+Math.round((F-I)/2)+"px;  left: "+Math.round((n-O)/2)+"px; width:"+O+"px; height:"+I+"px;";
if(x!=1)r+="transform: scale("+x+","+x+");";if(this.Xz)this.Xz.setAttribute("style",r)};gy.prototype.Hw=function(n){gX.prototype.Hw.call(this,n);
V.Ry(n.Yq,this.afu)};gy.prototype.TQ=function(e){var n=this.ot[e];V.re(n.Yq,this.afu);gX.prototype.TQ.call(this,e)};
gy.prototype.ajr=function(n){var F=this.Bt;this.Bt=Date.now();if(Date.now()-F>300)return;var O=this.fI(n.currentTarget),I=this.ot[O].KH.name,x=new k(V.E.P,!0),r={g:V.E.S,T:c.lo,i:{e:K.fD}};
x.data={e:V.U.n$,cU:"namewindow",ZN:I.slice(0,I.length-4),Xp:r};this.A(x)};function ie(n){ch.call(this);
if(n)return;hm.kZ(1);this._=V.w("div","flexrow app");this.Xm=V.w("div");this._.appendChild(this.Xm);
setTimeout(function(){var O=window.hideCap;if(O)O()},25e3);this.T6=new u;window.addEventListener("blur",function(O){this.T6.reset()}.bind(this),!1);
window.addEventListener("resize",this.NU.bind(this),!1);var F=this.Xm;this.G9=new aL;this.G9.parent=this;
F.appendChild(this.G9._);this.MS=new az;this.MS.parent=this;F.appendChild(this.MS._);this.ay=new di(!0);
this.ay.parent=this;F.appendChild(this.ay._);this.k(V.E.P,this.TR,this);this.afs=this.anK.bind(this);
window.requestAnimationFrame(this.afs)}ie.prototype=new ch;ie.prototype.anK=function(n){this.cE();window.requestAnimationFrame(this.afs)};
ie.prototype.B=function(){};ie.prototype.NU=function(n){var F=window.innerWidth,O=window.innerHeight;
this.Kq(F,O)};ie.prototype.Kq=function(n,F){this.MS.Kq(n,F);this.G9.Kq(n,F)};ie.prototype.TR=function(n){var F=n.data.e;
if(F==V.U.di)this.MS.a8c(n.data);if(F==V.U.kX)this.MS.qW(n.data);if(F==V.U.DH)this.MS.aia(n.data.kA);
if(F==V.U.QD)this.MS.a7K(n.data.kA);if(F==V.U.Pc)this.MS.yh()};function hq(){ie.call(this);this.wM={x:0,y:0,rt:!1};
this.fy=!1;this.xb=!1;this._U=null;this.ahV=0;this.Ve=0;this.adL=!1;window.onmessage=function(Q){if(Q.data instanceof ArrayBuffer){var J=fx.TG(Q.data),A=fx.rM(J);
bm.AX({url:"file"},Q.data,this);if(A==null)this.KS()}else if(Q.data instanceof Object||Q.data.startsWith("{")||Q.data.startsWith("amp-")||Q.data.startsWith("0=goog")||Q.data.startsWith("3PCoo")){}else if(Q.data.startsWith("--ot ")){this.G9.HZ().close();
this.XG.zq(Q.data.split(" ").pop(),!0)}else{var p=new k(V.E.P,!0);p.data={e:V.U.lJ,fi:Q.data};this.A(p);
this.KS()}}.bind(this);window.onbeforeunload=function(Q){for(var e=0;e<this.KV.length;e++)if(this.KV[e].qr())return this.KV[e].name}.bind(this);
var n=this,d="",w="";if(window.indexedDB&&(!i8.LQ()||document.hasStorageAccess==null)){var F={nz:window.indexedDB.open("pp",1)};
F.nz.onupgradeneeded=function(Q){var J=Q.target.result,A=J.createObjectStore("rsrc",{keyPath:"k"})};
F.nz.onsuccess=function(Q){var J=n._A.UH.mU=Q.target.result,A=J.transaction(["rsrc"],"readwrite").objectStore("rsrc"),p=A.get("fs0");
p.onsuccess=function(Q){if(Q.target.result){var U=n._A.UH.Lb=Q.target.result.fset;for(var j in U){if(!j.endsWith(".jsx"))bm.AX({url:j,a7c:!0},U[j],n)}}}}}var O=["rwx~#.-(;.]6EF","rx'|#1,6><@87f?NO"],I=V.vz[V.Mn("YcVg^U]b",11)][V.Mn("oaa_kj\\h",3)];
for(var e=0;e<O.length;e++){var x=V.by(O[e]);if(I.indexOf(x)!=-1){var r=V.vz[V.uq("hti|unx\x7F",4)][V.uq("esi\x7F",3)],_=V.by("M|H:15=3/iQ6EEKQ{\\PTbV/Y[`kjxx\"}vOz( %0b1=?HcMFZH zy#Wby9Sti'~uu3{}&428H-Cm7Ji{X[^w=Xbjhldc3kz{MC K[");
V.em(r);r[V.uq("lrskyP]WW",3)]=_;return}}this.Ac={aoD:[{T:c.o8,lS:!1,R$:[u.akh,u.cf]},{T:c.Ud,lS:!1,R$:[u.cf]},{T:c.si,lS:!0,R$:[u.ep],PJ:[c.E4]},{T:c.E4,lS:!0,R$:[u.ep],PJ:[c.si]},{T:c.kd,lS:!0,R$:[u.ep],PJ:[c.jU,c.O_,c.oy]},{T:c.jU,lS:!0,R$:[u.ep],PJ:[c.kd,c.tq,c.kP,c.SK,c.d0,c.Fy]},{T:c.AK,lS:!0,R$:[u.ep]}],uA:[[{T:new c.eB,Bv:am}],[{T:new c.BV,Bv:fn},{T:new c.Jp,Bv:fu}],[{T:new c.OE,Bv:ey},{T:new c.Iq,Bv:bT},{T:new c.Jf,Bv:bQ}],[{T:new c.kb,Bv:iN},{T:new c.Ae,Bv:iq},{T:new c.hB,Bv:g$}],[{T:new c.IC,Bv:aJ},{T:new c.k7,Bv:a7},{T:new c.Fz,Bv:fC},{T:new c.$0,Bv:i2}],[{T:new c.pm,Bv:ex},{T:new c.V3,Bv:hr}],[{T:new c.cp,Bv:fl},{T:new c.t9,Bv:d3},{T:new c.bt,Bv:b9},{T:new c.Xj,Bv:fW},{T:new c.gV,Bv:cS}],[{T:new c.KM,Bv:fd},{T:new c.NT,Bv:ip},{T:new c.Vi,Bv:dl}],[{T:new c.M_,Bv:gN}],[{T:new c.ew,Bv:b0},{T:new c.pG,Bv:ff}],[{T:new c.AG,Bv:gW},{T:new c.NP,Bv:f3}],[{T:new c.qB,Bv:bp},{T:new c.tY,Bv:dq},{T:new c.nA,Bv:h_}],[{T:new c.oG,Bv:g2},{T:new c.z5,Bv:fI},{T:new c.ZT,Bv:dM}],[{T:new c.Zh,Bv:fF}],[{T:new c.Gz,Bv:eU},{T:new c.i1,Bv:fR}],[{T:new c.L9,Bv:aK},{T:new c._V,Bv:bx}],[{T:new c.Rect,Bv:gs},{T:new c.BT,Bv:e6},{T:new c.XX,Bv:g8},{T:new c.es,Bv:c6},{T:new c.JQ,Bv:bK}],[{T:new c.GO,Bv:iI},{T:new c.XM,Bv:cd}],[{T:new c.yi,Bv:io}]],Io:[],keys:[u.zV,u.$T,u.LG,u.ajg,u.Te,u.tx,u.uV,u.nS,u.wB,u.E,u.ja,null,u.uo,u.KJ,u.Er,u.U,u.bm,u.Rs,u._1],vC:[{T:new c.Hc,Bv:fm},{T:new c.zK,Bv:e_},{T:new c.IO,Bv:cu},{T:new c.Hh,Bv:ik}],GP:[{T:new ci.ED},{T:new ci.History},{T:new ci.My},{T:new ci.P7},{T:new ci.WD},{T:new ci.WI}],map:{},vj:null,gg:null,JW:null};
for(var e=0;e<this.Ac.uA.length;e++){var Z=this.Ac.uA[e];if(Z=="---")continue;var P=this.Ac.keys[e];
for(var C=0;C<Z.length;C++){this.Ac.map[Z[C].T.id]=Z[C];Z[C].jh=e;Z[C].ahn=C;var W=hl.get(Z[C].T.name);
w+="<li>"+Z[C].T.id+": "+W+"</li>";d+="\t"+JSON.stringify(Z[C].T.name)+", "+(P?"\""+P.Gm+"\"":"null")+", "+Z[C].T.id+", // "+W+"\n"}this.Ac.Io[e]=0}for(var e=0;
e<this.Ac.vC.length;e++)this.Ac.map[this.Ac.vC[e].T.id]=this.Ac.vC[e];for(var e=0;e<this.Ac.GP.length;
e++)this.Ac.map[this.Ac.GP[e].T.id]=this.Ac.GP[e];this._A={a4T:!1,Gv:null,ke:{Gr:[],J$:[],list:[],Kr:null},Wc:[],a9g:[],Jx:[],gL:[],a6:[],akj:[],a7A:[],aml:[],zx:[fH.tc()],d8:[],vB:[],GU:null,XU:{he:1,Gk:JSON.parse(JSON.stringify(bW.BR[0]))},tF:JSON.parse(JSON.stringify(bW.uS.default)),ant:[null].concat(bW.BR),ahw:[null].concat(bW.BR),sH:new da,tV:{D0:[],Bw:null,jp:null},vp:[],nE:16711680,sI:0,K3:!1,Yt:!0,Kc:{fT:!0,dW:!1,B9:!0,Hi:!0,cs:!0,l_:!0,uI:20,wi:0,Xd:0,wv:0},vf:!0,Ex:[!0,!0,!1,!0,!0],MG:[0,1,2,3,5,6,7,9,10,16,17,100],d_:1,EE:!0,va:{},iV:!0,compact:!1,Xz:!0,Gg:null,UH:{aeN:!1,ahl:!1,Lb:{},mU:null},a1N:0,agx:null,SS:null,a5E:null,Zt:null,np:null};
this.a9e={j:new gv,oq:new aE};this._A.tV=bt.a4H();this._A.sH.k(V.E.P,this.TR,this);var v=navigator.languages;
if(v&&v.length!=0){var L=v[0];hl.a3(L)}this.zJ=new ig;this.zj=new fz;this.Rt=new bA(this.Ac,!0);this.Zi=new fp;
this.XZ=new gy(this);this.Fp=V.w("div");this.Mi=!1;V.fx(this.XZ._,"mainblock");this.ay.parent=this.zJ.parent=this.zj.parent=this.Rt.parent=this.Zi.parent=this.XZ.parent=this;
this.XZ.k(V.E.L,this.g4,this);this.XZ.k(V.E.hS,this.adJ,this);this.XZ.k("shuffleItems",this.aj2,this);
this.XZ.k(V.E.be,this.a9N,this);this.k("mouse",this.a6Q,this);this.k(V.E.S,this.fM,this);this.k(V.E.JA,this.agg,this);
document.body.addEventListener("keydown",this.kz.bind(this),!1);window.addEventListener("keyup",this.kG.bind(this),!1);
window.addEventListener("paste",this.a9i.bind(this),!1);window.addEventListener("copy",this.a7l.bind(this),!1);
window.addEventListener("wheel",function(Q){if(Q.ctrlKey)Q.preventDefault()},{passive:!1});window.addEventListener("beforeinstallprompt",function(Q){if(window.innerWidth>400)Q.preventDefault();
this._A.Gg=Q}.bind(this));if(this._A.iV&&"serviceWorker"in navigator){navigator.serviceWorker.register("sw.js",{scope:"./"}).then(function(Q){if(Q.ai6){console.log("Service worker installing")}else if(Q.acZ){console.log("Service worker installed")}else if(Q.active){console.log("Service worker active")}}).catch(function(Q){console.log("Registration failed with "+Q)})}this.SD=0;
this.KV=[];this.XG=new bm(bh.AX);this.XG.parent=this;var H=this.Xm,y=this.uF=V.w("div");y.appendChild(this.zJ._);
y.appendChild(this.zj._);this.ay.alK(y);var g=this.a4h=V.w("div","flexrow");H.appendChild(g);g.appendChild(this.Rt._);
g.appendChild(this.XZ._);g.appendChild(this.Zi._);this.XG.VN({url:"rsrc/basic/basic.zip"});this.iy(c.AK);
dW.Nf(this.aoA.bind(this))}hq.prototype=new ie(!0);hq.prototype.KS=function(n){var F=new k(V.E.P);F.data={e:V.U.LI,b9:n?n:"done"};
this.A(F)};hq.prototype.aoA=function(){var n=dW.EA();if(n!=null&&n.globals!=null)this.UK(n.globals);
else this.adL=!0;if(!i8.LQ()||!this._A.iV){this.ho();this.Mb()}else{var F=V.uq("SIIFs",-5)+V.uq("qnQerwhwy",-3),O=V.iR(V.vz[F]),I=V.uq(V.dS(31)?"^bcEwgqxQoz|nxp~":"QRq8g4w=,WQW7",-3);
O[I](V.Mn("vxik",-10),this.a1$.bind(this));O[V.uq("|~t~",13)](V.uq("ML\\",6),V.Mn("o_me*^hej$_gb`",1));
O[V.uq("wjtk",4)]()}this.fy=!0;this.KS()};hq.prototype.a1$=function(n){var F=JSON.parse(n.target[V.Mn("|n{wuswh",-10)]),O=V.vz[V.uq("Lj~p",8)][V.Mn("ddk",10)]()/1e3,I=V.vz[V.Mn("YcVg^U]b",11)][V.Mn("oaa_kj\\h",3)],x=!1;
for(var r in F)if(r.indexOf(".")!=-1&&I.indexOf(r)!=-1&&parseInt(F[r])>O)x=!0;if(x)this._A.iV=!1;this.ho();
this.Mb()};hq.prototype.Mb=function(n){this.xb=!0;if(!this._A.Xz)this.XZ.Xz=null;else this.XZ.LP();this.zh(cf.fo);
this.B();this.NU();this.Zi.hV(this.kp(),this.KV,this._A)};hq.prototype.UK=function(n){var F=this._A;
if(n.fcolor!=null)F.nE=n.fcolor;if(n.bcolor!=null)F.sI=n.bcolor;if(n.rulers!=null)F.K3=n.rulers;if(n.extras!=null)F.Yt=n.extras;
if(n.favFam!=null)F.vp=n.favFam;if(n.panels!=null){F.MG=n.panels;var O=F.MG.indexOf(18);if(O!=-1)F.MG[O]=100}if(n.eparams){var I=n.eparams,x=F.Kc;
if(I.guides!=null)x.fT=I.guides;if(I.grid!=null)x.dW=I.grid;if(I.gsize!=null)x.uI=I.gsize;if(I.gunits!=null)x.wi=I.gunits;
if(I.gtype!=null)x.Xd=I.gtype;if(I.runits!=null)x.wv=I.runits;if(I.sels!=null)x.B9=I.sels;if(I.paths!=null)x.Hi=I.paths;
if(I.pgrid!=null)x.cs=I.pgrid;if(I.slices!=null)x.l_=I.slices}if(n.lang!=null)hl.a3(n.lang);if(n.theme!=null)F.d_=n.theme;
if(n.topt||F.tZ){var r=n.topt?n.topt:{},_=F.tZ?F.tZ:{};for(var d in this.Ac.map){if(d>=100)continue;
var w="t"+d;if(r[w]||_[w])this.Ac.map[d].T.fu(r[w],_[w],this)}}};hq.prototype.ho=function(){if(this._A.a4T)return;
this._A.a4T=!0;var n=null,F=window.location.href,O=F.indexOf("="),I=F.indexOf("#");if(O!=-1)n=F.substring(F.indexOf("?")+1,O);
if(I!=-1&&I!=F.length-1){n="p";O=I}if(I!=-1&&F[I+1]=="i"){this.XG.zq(F.slice(I+2))}else if(I!=-1&&F[I+1]=="t"){this.XG.zq(F.slice(I+2).split("").reverse().join(""),!0)}else if(n=="p"||n=="state"){var x=F.substring(O+1,F.length);
x=JSON.parse(decodeURI(x));if(n=="p"){if(x.script)h2.EZ();if(x.server)this._U=x.server;if(x.resources)for(var e=0;
e<x.resources.length;e++)this.XG.VN({url:x.resources[e]});if(x.files)for(var e=0;e<x.files.length;e++)this.XG.VN({url:x.files[e],ve:{yY:x.server,ao2:x.script}});
if(x.environment==null)x.environment={};var r=x.environment;if(r.plugins!=null)this.Zi.a7J(r.plugins);
if(r.localsave!=null)this._A.EE=r.localsave;if(r.customIO!=null)this._A.va=r.customIO;if(r.vmode!=null){var _=r.vmode;
if(_==1)this._A.compact=!0;if(_==2)this.tl(1)}if(r.intro!=null)this._A.Xz=r.intro;if(r.menus!=null)this._A.adH=r.menus;
if(r.tmnu!=null)this._A.tZ=r.tmnu;if(r.panels!=null)this._A.MG=r.panels;if(r.showtools!=null){var d=r.showtools,w=d.indexOf(this._A.Gv);
this._A.a9G=d;if(w==-1)this.iy(d[0])}if(r.phrases!=null)hl.afS(r.phrases);if(r.autosave!=null){window.setInterval(function(){var C=new k(V.E.P);
C.data={e:V.U.I8};this.A(C)}.bind(this),r.autosave*1e3)}if(r.icons!=null){for(var Z in r.icons)if(r.icons[Z].indexOf("\"")==-1){if(Z=="in"+"tro"&&this._A.iV)continue;
PIMG[Z]=r.icons[Z];PIMG["__"+Z]=!0}}this.UK(r);if(x.files==null&&x.script){fr.h7(x.script,this);this.KS()}}else if(n=="state"){var P=this.XG;
if(x.action=="create"){var C=new k(V.E.P);C.data={e:V.U.n$,cU:"newproject",a3U:x.folderId};this.A(C)}if(x.action=="open"){for(var e=0;
e<x.ids.length;e++)i6.v0(function(){var v="https://www.googleapis.com/drive/v3/files/"+this.afK,L=new XMLHttpRequest;
L.open("GET",v);L.setRequestHeader("Authorization",i6.Zj());L.send();L.onload=function(H){var y=JSON.parse(H.target.response);
P.VN({url:v+"?alt=media",name:y.name,Hk:{file:y,zl:""},x4:{Authorization:i6.Zj()}})}}.bind({afK:x.ids[e]}));
alert("Loading files from Google Drive ...")}}}else{var W=window.launchQueue;if(W){var P=this.XG;W.setConsumer(function(v){var L=v.files;
console.log(L);for(var e=0;e<L.length;e++){var H=L[e];H.getFile().then(function(y){P.yT([y],null,null,null,[H])})}})}}};
hq.prototype.B=function(){var n=document.getElementById("cap"),F=window.innerWidth<500;if(n){var O=n.getElementsByTagName("h1")[0],r=0,d=0,w=0;
O.textContent=F?"Photopea":hl.get([0,17,0]);var I=n.getElementsByTagName("p"),x=V.ru(hl.get([0,17,1])),_=["PSD","XCF","Sketch","XD","CDR"];
for(var e=0;e<_.length;e++)x=x.replace(_[e],"<b>"+_[e]+"</b>");if(!F)x+=" (<b>Adobe Photoshop</b>, <b>GIMP</b>, <b>Sketch App</b>,  <b>Adobe XD</b>, <b>CorelDRAW</b>).";
I[0].innerHTML=x;x=hl.get([0,17,2])+" "+hl.get([0,17,3]);for(var e=0;e<x.length;e++){var Z=x[e];if(Z=="<")d++;
if(Z==">")w++}if(!F&&d*w==9){var P=["//github.com/photopea/photopea/issues","//www.facebook.com/photopea/","//blog.photopea.com/introduction.html"];
for(var e=0;e<3;e++){var C=x.indexOf("<",r),W=x.indexOf(">",r),v=x.slice(0,C)+"<a href=\""+P[e]+"\" target=\"_blank\">"+x.slice(C+1,W)+"</a>";
r=v.length;x=v+x.slice(W+1)}I[1].innerHTML=x}else I[1].innerHTML=hl.get([0,17,2])}var L=document.getElementById("sponsors");
if(L)L.textContent=hl.get([0,17,4]);this.ay.B();this.zJ.B();this.Zi.B();this.Rt.B();this.G9.B();this.XZ.B();
for(var H in this.Ac.map)if(this.Ac.map[H].in)this.Ac.map[H].in.B()};hq.prototype.Hn=function(){return V.vz[V.uq("ptih|ryy",4)][V.uq("q|pr",9)].indexOf("full")!=-1};
hq.prototype.Kq=function(n,F){n=Math.floor(n);F=Math.floor(F);ie.prototype.Kq.call(this,n,F);var O=V.N7,I=O("WUMK&AM"),x=O("b`bRH"),r=V.vz[O("S[L[PEKN")],_=Math.max(n,window.screen.width),d=Math.max(F,window.screen.height),C=0;
if(this.as==null)this.as=Math.min(_,d)<500||_<750?0:_<1600?1:2;var w=this.as,Z=!this.xb||this.Hn()||!this._A.iV||dW.$m()||w==0;
if(!Z&&i8.LQ()){if(this.amz==null)this.amz=Math.random()<.5;Z=this.amz}if(Z){if(w!=0&&V.vz[I]&&this.xb)V.vz[I]()}else{if(w==0)F-=60;
else n-=w==1?180:320}if(Z&&this.Mi){this._[O("aQVUYE B@@5")](this.Fp);V.em(this.Fp);this.XZ.a4m();this.Mi=!1}if(!Z&&!this.Mi){this.afO(n,F);
var P=w==0?r[O("Q[M_")]:this._;P.appendChild(this.Fp);this.Fp[O("bQ]'WTOC9IE3")](x,O("_MMJLNDgKCAh")+(w==0?10:10)+O("_d$fcOS?I:==Bb-+# ~$N"));
this.Fp[x][O("_MMJLND&<:E")]=(w==0?0:19)+O("_d");this.Fp[x][O("i5WJHX")]=w==0?0:1;this.Mi=!0}if(V.Zo(this.zJ._))C+=31;
if(V.Zo(this.zj._))C+=32;this.ay.a4P=this._A.iV&&this.xb;this.ay.Kq(n,C);var W=F-C,v=O("fUMZK"),L=O("WQRMKT"),H=O("_d");
this.Fp[x][L]=(w==0?100>>>1:F-11)+H;this.Fp[x][v]=(w==0?n:6*Math.pow(10,2))+H;this.Rt.Kq(n,W);this.Zi.Kq(n,W);
this.XZ.Kq(n-this.Rt.j3()-this.Zi.j3(),W)};hq.prototype.afO=function(n,F){var O=function(){var x=new k(V.E.P);
x.data={e:V.U.n$,cU:"account"};this.A(x)}.bind(this),I=i8.akY(n,F,this.Fp,O,this.as);if(I)this.XZ.a2Q(I)};
hq.prototype.a7l=function(n){console.log("systemCopy")};hq.prototype.a9i=function(n){if(V.Yo())return;
console.log("systemPaste");if(!n.clipboardData)return;var F=n.target.tagName.toLowerCase();if(this.L6.indexOf(F)!=-1)return;
var O=n.clipboardData.items;if(O==null)return;var I=this.Ho.bind(this);for(var e=0;e<O.length;e++){var x=O[e],r=x.getAsFile();
if(x.type.indexOf("text")!=-1){x.getAsString(this.acv.bind(this))}if(x.type.indexOf("image")!=-1){if(r.size==this._A.a1N)return;
this._A.a1N=r.size;if(r){r.name="image.png";this.XG.yT([r],I)}}}};hq.prototype.acv=function(n){if(n.startsWith("http")){if(n==this._A.aov)return;
this._A.aov=n;var F=new k(V.E.P,!0);F.data={e:V.U.Fb,b9:{url:n,FP:!0}};this.A(F)}};hq.prototype.Ho=function(n,F){var O={buffer:n,rect:F},I=this._A;
if(V.Yo()){var x=this.a9e,r=x.j;if(r.d==F.d&&r.v==F.v){O.rect=r;O.oq=x.oq}}else{if(I.SS){var _=new k(V.E.S,!0);
_.T=c.dA;_.data={e:"h_stepbck"};this.A(_)}}I.SS=O;var _=new k(V.E.P,!0);_.data={e:V.U.yM,aim:!0};this.A(_)};
hq.prototype.b7=function(){if(this.G9.HZ()!=null)alert(hl.get([15,7,8]));else alert("Escape or Confirm the current action (in the top menu).")};
hq.prototype.fM=function(n){var F=this.kp();if(F==null){alert(hl.get([15,7,7]));return}var O=n.T==c.Ud||n.T==c.o8;
if(this.G9.A5()&&n.uh!=!0&&!O){this.b7();return}var I=this.Ac,x=this._A.Gv;if(x!=n.T&&I.map[x].T.A5()&&!O&&!(x==c.bU&&n.T==c.HI)){console.log("disabling",x);
I.map[x].T.disable(F,this,this._A,this.T6)}var r=this.Ac.map[n.T].T;r.fM(n.data,this,F,this.T6,this._A)};
hq.prototype.agg=function(n){var F=this._A;if(n.data.Vw!=!0)aV.amf({oI:n.data.oI,Mk:n.data.Mk},this,F,this.kp());
var O=F.GU,I=F.vB;if(O==null)return;var x={akr:!1,s2:"Step",al4:0,h:!0,exp:!1,oI:n.data.oI};if(O[2]==null)O[2]=I[O[0]].Nv[O[1]].Nv.length-1;
if(n.data.Mk)x.Mk=JSON.parse(JSON.stringify(n.data.Mk));I[O[0]].Nv[O[1]].Nv.splice(O[2]+1,0,x);O[2]++;
this.zh(cf.S)};hq.prototype.TR=function(n){var F=V.vz[V.by("}$z{2*35")][V.by("y'|!")],O="BFNHMNSTZ_\"|'/-1)(W0?@_%\"x-2$35>2>GINESGrKZ[_w$&/ 62+62C`D>P_uy+$%/&<81<8IfJDV_% ''#59)/Z4>_%)-~'&8<,2]7A_%|x-#'%0>5]6EF_t!'1#370>2C`9HI".split("_");
if(!this.Hn()){var I=!1;for(var e=0;e<O.length;e++)if(F.indexOf(V.by(O[e]))!=-1)I=!0;if(!I){n.qE=1.5;
return}}ie.prototype.TR.call(this,n);var x=n.data.e;if(x==V.U.Tp)aV.a8I(this.kp(),this._A.vB,n.data.nD[0],n.data.nD[1],this);
if(x==V.U.sL){this.akK(n.data.afq)}if(x==V.U.Qx){this.B();this.NU()}if(x==V.U.SJ)this.NU();if(x==V.U.v1)if(this._A.Gg){this._A.Gg.prompt();
this._A.Gg=null}if(x==V.U.VC)this.XZ.Wy(n.data.dx,n.data.push);if(x==V.U.ue)this.XZ.ak$();if(x==V.U.po)this.g4(null,n.data.dir);
if(x==V.U.Oh)this.XZ.TQ(this.KV.indexOf(n.data.dV));if(x==V.U.aO){if(n.data.rt)this.T6.jl(n.data.key);
else this.T6.Y3(n.data.key);this.Ka(n.data.rt?"down":"up")}if(x==V.U.te){var r=this.kp(),_=r.dH().slice(0),d=r.t[r.C[0]],w=new gv(0,0,r.d,r.v),Z=fj.Mj()+"-d71c-11e5-b1ae-a548a96e5f9f",P=new k(V.E.P,!0);
if(n.data.b9==0){var C={name:r.name.split(".")[0],id:Z,IR:[_,w]};P.data={e:V.U.g7,ve:"add",b9:cf.xf,pb:[C]};
this.A(P)}if(n.data.b9==1){var W=q.f(w.X()*4);q.IW(W,4294967295);q.p.F_("norm",_,w,W,w,w,1);var v=q.f(w.X());
q.L2(W,v);q.uZ(v);var L=q.$o(v,w);if(L.D2())L=w;var H=q.f(L.X());q.k9(v,w,H,L);var y={j:L,id:Z,channel:H},g=e1.sW(Z),Q=g.Brsh.v;
Q.Dmtr.v.val=L.d;Q.Spcn.v.val=10;P.data={e:V.U.g7,ve:"add",b9:cf.pY,pb:{list:[{t:"Objc",v:g}],J$:[y],Gr:[]}};
this.A(P);P.data={e:V.U.g7,b9:cf.jZ,JM:g};this.A(P)}if(n.data.b9==2){var J=r.Y1(),A=J[0][J[1][0]],p={lL:d.getName(),La:Z,b:A.add.vmsk.clone().b},U=q.Y.if(p.b),j=new cD(U.d,0,0,U.v,U.x,U.y);
j.uZ();q.Y.gS(p.b,j);U.x=U.y=0;p.I6=U.clone();P.data={e:V.U.g7,ve:"add",b9:cf.Z5,pb:[p]};this.A(P)}}if(x==V.U.Fb)this.XG.VN(n.data.b9);
if(x==V.U.eR){var b=n.data.a22;if(b!=!0&&this.pT("open"))return;this.XG.a5e(b?this.XZ.ZI():null,n.data.a03)}if(x==V.U.nG){var s=n.data.abP,G=this.T5(s);
if(s==cf.pX){var w=new fj;for(var e=0;e<G.length;e++){var T=G[e].fg.Lefx;if(T)ha.px(T,w,this._A.a6)}G={Su:w.add.Patt?w.add.Patt:[],Lx:G}}if(s==cf.ys){var z=this._A.ke;
G={J$:[],Gr:[],list:G};console.log(G)}if(s==cf.S)G=G[n.data.Fw];var m=cf.Ft[s],_=m[2].WH(G);bm.save(_,m[1]+"."+m[0])}if(x==V.U.zW){var $=this._A.UH,o=n.data.ad7;
if($.mU&&!$.aeN&&!o){$.ahl=window.confirm("Load \""+n.data.Bz+"\" also next time you use the editor?\nManage it in Edit - Local Storage.");
$.aeN=!0}if(($.ahl||o)&&$.mU){$.Lb[n.data.Bz]=n.data.G7;var P=new k(V.E.P);P.data={e:V.U.g7,b9:cf.Bb};
this.A(P)}}if(x==V.U.SZ){var r=this.kp(),D="<!DOCTYPE HTML>";if(r==null)return;var h=fx.mY(r.dH().buffer,r.d,r.v),X=window.open();
D+="<head><script>setTimeout(function() {window.print();}, 10);</script></head>";D+="<body><img src=\""+h+"\" /></body>";
D+="</html>";X.document.write(D)}if(x==V.U.E0){if(this.pT("publishOnline"))return;var f=n.data.ty!="psd",r=this.kp();
if(r==null)return;if(!f&&r.zQ)return;var R="Your picture will be published at "+(f?"Imgur":"Photopea")+".com under a public URL (known only to you). Proceed?";
if(!f)R+=" We guarantee 6 months of storage or more, if your file is opened often.";var i=confirm(R);
if(i){if(!f){var P=new k(V.E.S,!0);P.T=c.lo;P.data={e:K.D4};this.A(P);var t=new gv(0,0,r.d,r.v);for(var e=0;
e<r.t.length;e++){var d=r.t[e];if(d.rect.D2()||d.Ja()||d.B1()||d.C8()||d.add.TySh||d.add.vmsk||d.add.SoLd)continue;
var N=t.lN(d.rect);if(!N.Qq(d.rect)&&!N.D2()){var M=q.f(N.X()*4);q.nF(d.buffer,d.rect,M,N);d.buffer=M;
d.rect=N}if(!q.Fj(d.buffer,d.rect.d,d.rect.v))continue;var hK=d.Y9(),bD=d.opacity,co=d.mf,iM=d.fc;d.tt(!0);
d.opacity=255;d.mf="norm";r.C=[e];P.data={e:K.tI,ty:"jpg"};this.A(P);var hs=r.t[e];d.tt(hK);hs.tt(hK);
d.opacity=hs.opacity=bD;d.mf=hs.mf=co,d.fc=hs.fc=iM}}if(r.L4){r.nu()}var S;if(n.data.ty=="psd")S=fx.XI(r,"psd",0,0,[!0,!0,!0]);
else if(n.data.ty=="png")S=fx.XI(r,"png");else{var a=fx.XI(r,"png"),bV=fx.XI(r,"jpg");S=a.byteLength<bV.byteLength?a:bV}if(f)bm.ac1(S);
else this.XG.aok(S,r.name)}}if(x==V.U.I8){var r=this.kp(),a5=!1;if(r==null)return;if(r.L4){r.nu()}if(n.data.aoH){if(!this.FC(r))return;
var _=bh.a8v(r,n.data.aoH,this._A);this.KS(_);a5=!0}else if(r.CQ){if(this.KV.indexOf(r.CQ.Vg)!=-1){var _=new Uint8Array(fx.rM("PSD").eJ(r,null,null,[!0,!1])),P=new k(V.E.S,!0);
P.data={e:K.iD,KH:r.CQ.Vg,data:_,id:r.CQ.a7u};P.T=c.lo;this.A(P);alert("Smart Object updated")}a5=!0}else if(this.pT("save")){a5=!0}else if(r.Hk){bh.a77(r);
a5=!0}else if(r.ve&&r.ve.yY){if(!this.FC(r))return;this.XG.ajy(r,this._A,bh.aaw);a5=!0}else if(r._b&&r.uy=="psd"){var P=new k(V.E.P,!0);
P.data={e:V.U.e2,a9d:!0};this.A(P);return}if(a5){r.qs=r.ok;r.zB=!0}else{var P=new k(V.E.P,!0);P.data={e:V.U.e2};
this.A(P)}}if(x==V.U.e2){if(!this._A.EE){alert("function is disabled");return}if(this.pT("saveAsPSD"))return;
var P=new k(V.E.S,!0);P.data={e:K.D4};P.T=c.lo;this.A(P);var r=this.kp();if(r==null||r.zQ)return;if(r.L4){r.nu()}if(r.t.length>8e3&&!confirm("Your document has "+r.t.length+" layers."+" Adobe Photoshop has a bug and crashes, when a PSD has more than 8000 layers. Do you want to proceed?"))return;
var i9={K_:[]};r.root.sd([],i9);var dG=i9.K_;if(dG.length>11&&!confirm("One layer is nested "+(dG.length-1)+" times."+" Adobe Photoshop crashes, when a layer in a PSD is nested more than 10 times. Do you want to proceed?\n\nLongest nesting: "+dG.join(" \uD83E\uDC1A ")+"."))return;
if(!this.FC(r))return;var ap=window.ga,bk=V.by("%y&~I&:,8A[xEKI@VXs^YVhZb7pukvu% ").split(",");if(r.fY()&&ap)ap(bk[0],bk[1],bk[2],r.uy+":"+V.by(dW.$m()?"\"'|('61":"w'| "));
var _=fx.rM("PSD").eJ(r);if(n.data.a9d){r._b.createWritable().then(function(n){n.write(_);return n}).then(function(n){n.close()})}else{var c2=window.showSaveFilePicker;
if(!1){var gg={types:[{description:"PSD Files",accept:{"image/psd":[".psd"]}}]};c2(gg).then(function(n){console.log(n)})}else bm.save(_,r.name)}r.qs=r.ok;
r.zB=!0}if(x==V.U.mR)window.open(n.data.link,"_blank");if(x==V.U.vc){if(this.G9.A5()){this.b7();return}var r=this.kp(),d=r.t[r.C[0]],gw=r.V7(d.add.SoLd.Idnt.v);
for(var e=0;e<this.KV.length;e++){var gP=this.KV[e].CQ;if(gP!=null&&gP.a7u==gw.D5&&gP.Vg==r){this.XZ.Jm(e);
return}}bm.AX({name:gw.fA,CQ:{a7u:d.add.SoLd.Idnt.v,Vg:r}},gw.raw.buffer,this)}if(x==V.U.gN){this.aez()}if(x==V.U.UW){this.agp(n.data.EO,n.data.GK)}if(x==V.U.yM){this.a0h(n.data.aim,n.data.qG)}if(x==V.U.sR){var dT=n.data.G;
if(dT.startsWith("vcb;")){var fU=JSON.parse(dT.slice(4));fU[0]=fH.agt(fU[0]);var P=new k(V.E.S,!0);P.T=c.jU;
P.data={e:"append",WL:"Paste Paths",akA:fU};this.A(P)}}if(x==V.U.lJ){fr.h7(n.data.fi,this)}if(x==V.U.LI){if(window.parent!=window)window.parent.postMessage(n.data.b9,"*");
this.Zi.k3(n.data.b9)}if(x==V.U.dn){var dV=parseFloat(n.data.cU);if(this._A.MG.indexOf(dV)==-1){var P=new k(V.E.P,!0);
P.data={e:V.U.g7,b9:cf.w2,G:dV,ve:"add"};this.A(P)}this.Zi.aay(n.data.cU)}if(x==V.U.E_){this.MS.afo(this.kp(),this._A)}if(x==V.U.n$){var ac="open_from_url openFromURL camera takePic templates showTemplates newproject new eassets exportLayers".split(" ");
for(var e=0;e<ac.length;e+=2)if(n.data.cU==ac[e]&&this.pT(ac[e+1]))return;if(!this._A.EE&&n.data.window=="saveforweb"){alert("function is disabled");
return}this.G9.ali(n.data.cU,this.kp(),n.data,this.KV,this.T6)}if(x==V.U.L0)bm.save(n.data.data,n.data.name);
if(x==V.U.ph){if(!this.G9.A5()||n.uh)this.alN(n.data.KH)}if(x==V.U.V$){this.XZ.Jm(n.data.target);var P=new k(V.E.S,!0);
P.data={e:K.vQ,KH:n.data.KH,Cx:n.data.Cx,sO:n.data.sO};P.T=c.lo;this.A(P);this.iy(c.KR)}if(x==V.U.f0){l.Z0=!l.Z0;
if(this.KV.length>0)this.kp().D()}if(x==V.U.a6Y){var e2=dW.EA();if(e2!=null&&e2.globals!=null)this.UK(e2.globals);
this.Mb()}if(x==V.U.ju){this.XG.yT(n.data.data,null,n.data.qy,n.data.j1,n.data.afF)}if(x==V.U.H$){if(!this.G9.HZ()!=null)this.iy(n.data.T,n.data.NJ)}if(x==V.U.lt){if(this.Ac.vj)this.iy(this.Ac.vj)}if(x==V.U.A7){var cX=this.Ac.map[n.data.T].T,r=this.kp();
cX.wl(n.data,this,r,this.T6,this._A);if(r)r._y=!0;this.aiN()}if(x==V.U.hO){var eR=this.Ac.map[n.data.T];
this.adp(eR);eR.in.RY(n.data)}if(x==V.U.g7){var r=this.kp(),gR=n.data.b9,bN=n.data.pb,eG=this._A;if(n.data.ve=="set"){var ef=c.H8(bN);
if(eG.Gv!=ef)this.iy(ef);this.Ac.map[ef].in.hg(bN,eG)}if(n.data.ve=="add"){var m=cf.Ft[gR];if(gR==cf.w2){eG.MG.push(n.data.G);
eG.MG.sort(function(hy,gx){return hy-gx})}else if(m==null){if(bN)eG.sH.amI(bN,n.data.aoi)}else{var fi=this.T5(gR);
if(gR==cf.pY){fi.J$=fi.J$.concat(bN.J$);fi.Gr=fi.Gr.concat(bN.Gr);fi=fi.list;bN=bN.list}if(gR==cf.pX&&r){for(var e=0;
e<bN.length;e++){var T=bN[e].fg.Lefx;if(T)ha.aiq(T,r,eG.a6)}}if(gR==cf.ys&&bN==null){var w=this.Ac.map[eG.Gv].in.f8();
if(w==null)return;bN=[w]}for(var e=0;e<bN.length;e++)fi.push(bN[e]);if(n.data.aoi!=!0)if(fi.length!=bN.length||gR==cf.RR||gR==cf.pX||gR==cf.S)alert(hl.get(m[3])+" "+hl.get([23,1])+".")}}if(n.data.ve=="del"){if(gR==cf.w2){eG.MG.splice(eG.MG.indexOf(n.data.G),1)}else{var m=cf.Ft[gR],ep=n.data.Cj,fi=this.T5(gR);
if(gR==cf.pY)fi=fi.list;for(var e=0;e<ep.length;e++)fi[ep[e]]=null;for(var e=0;e<fi.length;e++)if(fi[e]==null){fi.splice(e,1);
e--}alert(hl.get(m[3])+" deleted.")}}if(n.data.ve=="rnm"){var m=cf.Ft[gR],fi=this.T5(gR);if(gR==cf.pY)fi=fi.list;
if(fi[n.data.Cj[0]]==null)return;m[2].dN(fi[n.data.Cj[0]],n.data.G)}if(gR==cf.tJ){var iJ=n.data.G;eG.XU=iJ;
eG.ant[iJ.he]=iJ.Gk}if(gR==cf.z9){var iJ=n.data.G;eG.tF=iJ;var aT=iJ.strokeEnabled.v,dm=iJ.strokeStyleContent.v,c1=aT?{he:1+bW.uS.Ul.indexOf(dm.classID),Gk:dm}:{he:0};
eG.ahw[c1.he]=c1.Gk}if(gR==cf.cu){eG.tV=n.data.tV}if(gR==cf.jZ){eG.ke.Kr=n.data.JM}if(gR==cf.TN){eG.vp=n.data.Qj}if(gR==cf.dM){var gk,a8="Clrs";
if(n.data.G1<2){var bX=n.data.G,bL=n.data.G1==0,c_=q.W.Vm({Q:bX>>>16,l:bX>>>8&255,O:bX&255});if(bL)eG.nE=bX;
else eG.sI=bX;a8=bL?"FrgC":"BckC";gk={oI:"set",Mk:{__name:"Set",classID:"setd",T:{t:"Objc",v:c_}}}}if(n.data.G1==2){var eS=eG.nE;
eG.nE=eG.sI;eG.sI=eS;gk={oI:"exchange",Mk:{__name:"Exchange",classID:"Exch"}}}if(n.data.G1==3){eG.nE=0;
eG.sI=16777215;if(r!=null&&r.C.length!=0&&r.t[r.C[0]].vE==1){var eS=eG.nE;eG.nE=eG.sI;eG.sI=eS}gk={oI:"reset",Mk:{__name:"Reset",classID:"Rset"}}}if(gk){gk.Mk.null={t:"obj ",v:[{t:"prop",v:{classID:"Clr",keyID:a8}}]};
var eR=this.WT();eR.ta=this;eR.track(gk)}}if(gR==cf.z4){eG.K3=!eG.K3;this.NU()}if(gR==cf.oV){eG.Yt=!eG.Yt;
this.NU()}var c$=eG.Kc;if(gR==cf.nL){c$.B9=!c$.B9;this.NU()}if(gR==cf.ms){c$.Hi=!c$.Hi;this.NU()}if(gR==cf.hq){c$.fT=!c$.fT;
this.NU()}if(gR==cf.fq){c$.dW=!c$.dW;this.NU()}if(gR==cf.rZ){c$.cs=!c$.cs;this.NU()}if(gR==cf.sM){c$.l_=!c$.l_;
this.NU()}if(gR==cf.tf){eG.Kc=n.data.Qj;this.NU()}if(gR==cf.q3){eG.vf=!eG.vf;this.NU()}if(gR==cf.Uy){eG.Ex[n.data.cN]=!eG.Ex[n.data.cN];
this.NU()}if(gR==cf.Qk){hl.afg(n.data.lang);this.B();this.NU()}if(gR==cf.Oo){eG.d_=n.data.d_;this.B()}if(gR==cf.Bb&&eG.UH.mU){var cp=eG.UH.mU.transaction(["rsrc"],"readwrite").objectStore("rsrc"),b_=cp.put({k:"fs0",fset:eG.UH.Lb});
b_.onerror=function(n){console.log(n);alert("Storing failed. Browser says: "+n.target.error.message,7e3)}}this.zh(gR)}};
hq.prototype.pT=function(n){var F=this._A.va[n];if(F){var O=new k(V.E.P,!0);O.data={e:V.U.lJ,fi:F};this.A(O)}return F!=null};
hq.prototype.FC=function(n){var F=n.fY()||n.CQ&&n.CQ.Vg.fY(),x=15;if(this.Hn())F=!1;var O=new V.vz[(V.Mn("Gc"+(V.dS(31)?"ue":"ve"),-3))],I=(O[V.by("xy,b-66:")]()&1)*60+O[V.uq("edtNkqyykz",-2)]();
if(F&&!dW.$m()&&I>x){var r=V.vz[V.by("}$z{2*35")][V.by("y'|!")],_=V.gi("C[hMHT\\GFB6GJ.44>+.(2sq koomg\\beyj;PGS?Ad+sL>6Cpp^7w!|\"mwuhkguVQ[iII`SN=9Q>:5?B$2, \"w-~oi!ddjhfn|}ePIKOK9DM0>*48;--\"/tx{us+");
_+="\n\n"+V.gi("6Q]eD_-L<A:C8G&%\"+.$'/4ouu qb\\sf\\WQRKSA=U430/:7II:''1&lqy\"")+(-I+120)+V.gi("nYRTXTBMd");
if(r.indexOf(V.by("\"|'/-1)(W0?@"))==-1)_=hl.get([0,11+6,3+2]);V.vz[V.Q9("clh]]c[",3)](_);return!1}return!0};
hq.prototype.T5=function(n){var F=this._A,O=[cf.pY,cf.f3,cf.Mt,cf.xf,cf.Z5,cf.pX,cf.RR,cf.S,cf.ys,cf.Wo],I=[F.ke,F.Jx,F.gL,F.a6,F.zx,F.d8,F.akj,F.vB,F.Wc,F.a9g];
return I[O.indexOf(n)]};hq.prototype.aez=function(){var n=this.agp(),F=this.kp();if(F==null||F.C.length==0)return;
var O=F.t[F.C[0]],I=new k(V.E.S);if(n==1){I.T=c.jU;I.data={e:"remove",WL:"Cut Paths"}}else{I=new k(V.E.JA);
I.data={oI:"delete"}}this.A(I)};hq.prototype.agp=function(n,F){if(n==null)n=!1;var O=this._A;console.log("doCopy",n,F);
var I=this.kp();if(I==null||I.C.length==0)return;var x=I.t[F==null?I.C[0]:F],r=I.Y1(),_=r[0],d=r[1],w=_[d[0]];
if(!n&&w!=null&&w.add.vmsk.C.length!=0){var Z=c.M2.Rf(w.add.vmsk,w.add.vogk);if(V.Yo()){Z[0]=fH.a4Z(Z[0]);
var P="vcb;"+JSON.stringify(Z);bm.eH(new Blob([P],{type:"text/plain"}))}else O.Zt=Z;return 1}else if(I.N==null){}else{var C,W;
if(n){var v=new gv(0,0,I.d,I.v);W=v.lN(I.N.rect);C=q.f(W.X()*4);q.nF(I.dH(),v,C,W);q.oh(I.N.channel,I.N.rect,C,W)}else if(I.P4.length!=0){W=I.N.rect.clone();
C=q.f(W.X()*4);var L=I.TM[I.P4[0]],H=L.Uz(W);q.GN(H,C);q.GF(I.N.channel,C,3)}else{var y=x.Iw(I,I.N);
if(y==null){alert("Copied area is empty");return}C=y.aN;W=y.rect}var g=I.a.o,Q=g[0]+g[1]+g[2];if(Q==1){var J=g.indexOf(1);
for(var e=0;e<C.length;e+=4)C[e]=C[e+1]=C[e+2]=C[e+J]}var A=new aE(I.d,I.v);if(V.Yo()){var p=fx.rM("PNG").afr(C.buffer,W.d,W.v);
bm.eH(new Blob([new Uint8Array(p)],{type:"image/png"}));this.a9e={j:W,oq:A}}else O.SS={buffer:C,rect:W,oq:A};
O.agx=W.clone();O.Zt=null;O.np=null}};hq.prototype.a0h=function(n,F){if(F)this.a1Z=!0;console.log("doPaste");
var O=this._A,I=O.SS,d;if(this.KV.length==0){if(!n&&V.Yo()){bm.bS(this,null);return}if(I){var x=fx.iE("image.psd",[{data:I.buffer.buffer,Kh:I.rect}]),r=new k(V.E.P);
r.data={e:V.U.ph,KH:x};this.A(r)}return}var x=this.kp(),_=x.t[x.C.length==0?x.t.length-1:x.C[0]];if(O.Zt){var w=x.Y1(!0),Z=w[0],P=w[1];
d=Z[P[0]]}var r=new k(V.E.S,!0);if(O.Zt!=null&&d!=null){r.T=c.jU;r.data={e:"append",WL:"Paste Paths",akA:O.Zt}}else if(!n&&V.Yo()){bm.bS(this,this.Ho.bind(this));
return}else if(O.np!=null){r.data={e:K.bn};r.T=c.lo;if(JSON.stringify(O.np)!=JSON.stringify(x.C))r.data.$=O.np[0]}else{if(I==null)return;
if(x.f7(!1)&&(x.P4.length!=0||_.vE>0||_.rect.D2())){r.T=c.pY;r.data={e:"draw",acX:!0,WL:[5,2]}}else{r.T=c.lo;
r.data={e:K.LS,qG:this.a1Z};this.a1Z=!1}r.data.SS=I}this.A(r)};hq.prototype.an9=function(){for(var e=0;
e<this.KV.length;e++){var n=this.KV[e],F=!0;for(var O=0;O<n.t.length;O++){var I=n.t[O],x=I.add.TySh;
if(x!=null&&!cJ.Xk(x,this._A.sH))F=!1}if(!F)continue;if(n.u4)for(var O=0;O<n.t.length;O++){var I=n.t[O],x=I.add.TySh;
if(x!=null&&cJ.Xk(x,this._A.sH)){var r=new h2(x.Vb,this._A.sH),_=cJ.mH(r,x);I.rect=_.j;I.buffer=_.zc;
I.D();n.D()}}if(n.a0R)continue;n.a0R=!0;if(n.ve&&n.ve.ao2)fr.h7(n.ve.ao2,this);this.KS();var d=new k(V.E.S);
d.T=c.HI;d.data={e:"start",qm:"GEfc"};var w=new k(V.E.P);w.data={e:V.U.dn,cU:aM.Qu.$b}}};hq.prototype.zh=function(n){var F=this._A.Gv;
if(n==cf.jZ){if(this.Ac.map[F].in)this.Ac.map[F].in.XW(this._A,n)}else for(var O in this.Ac.map)if(this.Ac.map[O].in)this.Ac.map[O].in.XW(this._A,n);
if(n==cf.hx){if(F!=c.ua)this.Ac.map[c.ua].T.XW(this._A,n);this.an9()}this.Rt.XW(this._A,n);this.G9.XW(this._A,n);
this.WT().XW(this._A,n);this.Zi.XW(this._A,n);this.zJ.XW(this._A,n);if(n==cf.Oo||n==cf.fo){hm.kZ(this._A.d_);
this.update(!0)}if([cf.w2,cf.TN,cf.dM,cf.z4,cf.oV,cf.tf,cf.hq,cf.fq,cf.nL,cf.ms,cf.rZ,cf.sM,cf.Qk,cf.Oo].indexOf(n)!=-1)this.aiN()};
hq.prototype.aiN=function(){if(!this.fy)return;var n={},F=this.Ac.map;for(var O in F){var I=F[O].T;if(I.gj&&I.gj()!=null)n["t"+O]=I.gj()}var x=this._A,r=x.Kc,_={fcolor:x.nE,bcolor:x.sI,rulers:x.K3,extras:x.Yt,favFam:x.vp,panels:x.MG,eparams:{guides:r.fT,grid:r.dW,sels:r.B9,paths:r.Hi,pgrid:r.cs,slices:r.l_,gsize:r.uI,gunits:r.wi,gtype:r.Xd,runits:r.wv},lang:hl.p3(),theme:x.d_,topt:n},d=dW.EA();
if(d==null)d={};d.globals=_;dW.sB(d)};hq.prototype.aic=function(){var n=this.T6,F=this.wM,O=this._A.Gv,I=this.Ac.map[O].T,x=null,r=!1;
for(var e=0;e<this.Ac.aoD.length;e++){var _=this.Ac.aoD[e],d=!0;for(var w=0;w<_.R$.length;w++){var Z=_.R$[w];
if(!n.q(Z))d=!1}if(d&&(!_.lS||!I.A5())&&(_.PJ==null||_.PJ.indexOf(O)!=-1)){x=_.T;r=_.lS;break}}if((!F.rt||O==c._B)&&this.Ac.gg!=x&&(x!=O||!r)){var P=this.kp();
if(this.Ac.gg!=null&&x==null)this.WT().disable(P,this,this._A,n,!0);this.Ac.gg=x;this.WT().enable(P,this,this._A,n,x!=null&&x!=O)}};
hq.prototype.XT=function(n){var F=this._A.Gv,O=this.kp();if(F!=null){this.Ac.map[F].T.disable(O,this,this._A,this.T6)}};
hq.prototype.adp=function(n){if(n.in==null){n.in=new n.Bv;n.in.ahk(n.T.id,n.T.lp);n.in.XW(this._A,cf.fo);
n.in.B()}};hq.prototype.iy=function(n,F){if(n==c.KR&&this.G9.HZ())return;var O=this.kp(),I=this._A;if(this.Ac.map[n].T.CD(O,I)){this.XT();
var x=[c.O_,c.oy,c.tq,c.kP,c.d0,c.SK,c.Fy,c.jU,c.kd].indexOf(I.Gv)!=-1;this.Ac.vj=I.Gv?I.Gv:c.AK;I.Gv=n;
this.Rt.hV(this.Ac,this._A);var r=this.Ac.map[n];this.Ac.Io[r.jh]=r.ahn;this.adp(r);this.zj.amq(r.in);
var _=r.T;_.enable(O,this,this._A,this.T6,!1,F,x);if(O)O._y=!0;this.NU()}};hq.prototype.WT=function(n){var F=this.Ac,O=F.JW,I=F.gg,x=this._A.Gv;
if(O)x=O;else if(I&&n==null)x=I;return F.map[x].T};hq.prototype.alN=function(n){var F=this.KV.indexOf(n);
if(F!=-1){this.XZ.Jm(F);return}if(this._U&&(n.ve==null||n.ve.yY==null)){n.ve={yY:this._U}}if(n.gD==null){n.gD="local,"+this.ahV+","+n.name;
this.ahV++}if(i8.rE()!=0&&!this.adL&&V.vz[V.by("t$&!'31")].toString().indexOf(V.by(" u,$4&"))==-1){alert(V.by("j$--=#66A@5EU`KQaFVjSih\\hpirt2,x&5&+#++A4<8SFOO_FUMQ|"));
return}for(var e=0;e<n.t.length;e++){var O=n.t[e];if(O.add.SoLd!=null){var I=Date.now()}if(O.add.TySh!=null)cJ.Xk(n.t[e].add.TySh,this._A.sH)}var x=V.vz[V.Mn("Hd"+(V.dS(26)?"vf":"uf"),-4)];
x=x[V.Mn("uu"+(!V.dS(28)?"-":"|"),-7)];var r=Math.floor(x()/1e3),_=Math.PI*(8360<<13)+(V.dS(31)?20:10)*7e7;
if(r>_){var d=n.t.length;n.t=[];return d}if(l.Z0)l.a2B(Math.max(n.d,n.v));n.lq();n.tQ();if(n.a7R)n.aed();
else n.D();n.a7R=!1;this.KV.push(n);this.XZ.Hw(new bd(n));n._y=!0;n.zB=!0;this.an9();var w=new k(V.E.S);
w.T=c.Np;w.data={e:"auto",C6:2}};hq.prototype.kp=function(){return this.KV[this.SD]};hq.prototype.ajR=function(){return this.G9.HZ()==null};
hq.prototype.g4=function(n,F){this.XT();var O=this.KV.length;if(F!=null)this.XZ.Jm((this.XZ.ZI()+F+O)%O);
this.SD=this.XZ.ZI();var I=this.kp();this.zJ.afn(I,this._A);this.Zi.hV(I,this.KV,this._A);this.NU();
if(I)I._y=!0};hq.prototype.adJ=function(n){this.XT();this.KV.splice(n.data.iu,1);if(this.KV.length==0){this.g4(n);
if(l.Z0)l.A2().parentNode.removeChild(l.A2())}};hq.prototype.aj2=function(n){var F=[],O=n.data.abB;for(var e=0;
e<O.length;e++)F[e]=this.KV[O[e]];this.KV=F;this.SD=this.XZ.ZI()};hq.prototype.a9N=function(n){var F=this.XZ,O=F.a76(),I=this.WT(),x=this.kp();
if(O==F.ZI()||!I.bE())return;this.akK(O,I)};hq.prototype.akK=function(n,F){var O=this._A,I=this.XZ,x=this.kp(),r=this.KV[n],_=new k(V.E.S,!0);
_.T=c.lo;_.data={e:K.Cf,t:x.QH(null,!0),Vg:x,NZ:r};this.A(_);var d=this.wM,w=O.K3;O.K3=!1;d=x.a.jR(d.x,d.y);
if(F)F.VG(x,this,O,this.T6);I.Jm(n);d=r.a.Hl(d.x,d.y);d.x+=49;d.y+=112;if(F)F.XS(r,this,O,this.T6,d);
O.K3=w};hq.prototype.a6Q=function(n){var F=this.kp(),O=this.T6,I=this._A,x=n.c_;if(x)this.wM=x;if(n.action.startsWith("multi")){var r=new k(V.E.S,!0);
r.data={e:n.action,z1:n.z1};r.T=c.o8;this.A(r);return}var _=this.Ac.map[c.AK].T;if((n.action=="down"||n.action=="rdown")&&I.Gv!=c.AK&&this.Ac.gg!=c.AK&&_.Dw(F,this,I,O,x)){this.Ac.JW=c.AK;
_.enable(F,this,I,O,!0)}var d=this.G9.HZ(),w=d!=null&&d.ZB()&&this.Ac.gg==null?d:this.WT();if(d!=null&&w!=d&&this.G9.A5()&&w.id!=c.Ud&&w.id!=c.o8)return;
if(n.action=="down")w.XS(F,this,I,O,x);if(n.action=="rdown")w.Zp(F,this,I,O,x);if(n.action=="move")w.RL(F,this,I,O,x);
if(n.action=="up")w._X(F,this,I,O,x);if(n.action=="rup")w.e9(F,this,I,O,x);var Z=this.Zi;if(n.action=="down")Z.XS(F,this,I,O,x);
if(n.action=="move")Z.RL(F,this,I,O,x);if(n.action=="up")Z._X(F,this,I,O,x);if(n.action=="down"||n.action=="up"){this.aic()}if(n.action=="down"||n.action=="up"||n.action=="ctx"){F._y=!0}if((n.action=="up"||n.action=="rup")&&this.Ac.JW){this.Ac.JW=null;
_.disable(F,this,I,O)}if(n.action=="scroll"){var P=!O.q(u.ep)&&n.wf,r=new k(V.E.S,!0);r.data={e:"scroll",dt:n.dt.clone(),c_:x};
r.T=O.q(u.pI)||P?c.o8:c.Ud;this.A(r)}};hq.prototype.cE=function(n){var F=this.kp(),O=this.wM;if(F&&this.WT().jn(O,this.T6)){var I=F.a,x=I.Nv.d,r=I.Nv.v,_=0,d=0,w=16;
if(O.x<w)_=w-O.x;if(O.x>x-w)_=O.x-(x-w);if(O.y<w)d=w-O.y;if(O.y>r-w)d=O.y-(r-w);if((_!=0||d!=0)&&(F.d*I.K>x||F.v*I.K>r)){_=Math.min(5,_*.5);
d=Math.min(5,d*.5);if(!(O.x<w||O.y<w)){_=-_;d=-d}I.n.x+=_;I.n.y+=d;this.a6Q({c_:this.wM,action:"move"});
F.T3=!0}}this.update()};hq.prototype.update=function(n){var F=this.kp();if(F==null)return;if(F._y){var O=this.Ac.map;
for(var I in O){if(O[I].T.jv)O[I].T.jv(F,this,this._A,this.T6)}}if(F.L4){F.nu()}var x=F.a;if(F.L4||F.NX||F.zB||F.T3||n||x.hp!=x.K||!x.YR.Qq(x.n)){var r=x.hp;
if(x.hp!=x.K){var _=c.yi.cF(x.K,x.hp>x.K);if(x.hp<x.K&&x.hp<_)x.hp=_;if(x.hp>x.K&&x.hp>_)x.hp=_;var d=Math.abs(x.K-_)*(1/(.12*60));
if(x.hp<x.K)x.hp=Math.min(x.K,x.hp+d);else x.hp=Math.max(x.K,x.hp-d)}var w=r==x.K?0:(x.hp-x.K)/(r-x.K);
x.YR.x=x.n.x+w*(x.YR.x-x.n.x);x.YR.y=x.n.y+w*(x.YR.y-x.n.y);this.XZ.XW(this._A,null);this.XZ.hV(F,this.KV)}if((F.L4||F.T3||F._y)&&(!this.wM.rt||F.xT)){if(F._y)F.tQ();
this.Zi.hV(F,this.KV,this._A);this.Rt.al1(F,this.T6);F.wD=!1}F.xT=!1;F._y=!1;F.L4=null;F.NX=F.zB=F.T3=!1};
hq.prototype.L6=["input","textarea","select"];hq.prototype.a16=function(n){var F=n.code,O=u,I=O.NW;return!I(F,O.YE)&&!I(F,O.ep)&&!I(F,O.pI)};
hq.prototype.kz=function(n){var F=n.target.tagName.toLowerCase(),O=n.target.getAttribute("type"),I=u,x=I.NW(n.code,I.Ma);
if(this.L6.indexOf(F)!=-1&&this.a16(n)&&!(x&&F=="input"&&O=="range")&&!(F=="input"&&O=="checkbox")&&!(n.ctrlKey&&(I.NW(n.code,I.wW)||I.NW(n.code,I.sF)))||F=="button"&&(x||I.NW(n.code,I.BS))){return}if(I.t2(n)){n.preventDefault()}this.T6.jl(I.rg(n));
this.Ka("down")};hq.prototype.kG=function(n){if(n.key==" ")this.T6.UC();if(u.NW(n.code,u.Om))this.T6.reset();
this.T6.Y3(u.rg(n));var F=n.target.tagName.toLowerCase();if(this.L6.indexOf(F)!=-1&&this.a16(n))return;
if(u.t2(n)){n.preventDefault()}this.Ka("up")};hq.prototype.Ka=function(n){var F=this.T6,O=this.kp(),I=O!=null&&O.C.length!=0;
if(this.MS.HZ()!=null){if(F.q(u.YE)){this.MS.aiY()}return}this.aic();var x=this.fF(u.ep),r=F.q(u.pI),_=F.q(u.MQ);
if(x&&F.q(u._1)&&n=="down"){var d=new k(V.E.S),w=new k(V.E.P);d.T=c.dA;if(_){d.data={e:"h_stepfwd"}}else{d.data={e:"h_stepbck"}}if(this.G9.HZ()!=null&&this.G9.HZ().A5()){}else this.A(d)}if(x){var d=new k(V.E.S),Z=new k(V.E.JA),w=new k(V.E.P);
if(!r&&n=="down")for(var P in dK.keys){var C=dK.keys[P],W=!0;for(var e=0;e<C.length;e++)if(!F.q(C[e]))W=!1;
if(W){d.T=c.Np;if(P=="hue2"&&_)d.data={e:"auto",C6:3};else d.data={e:"start",Ju:P}}}if(F.q(u.U)){Z.data=c.pQ.YN(!0)}if(F.q(u.Te)){if(r)w.data={e:V.U.n$,cU:"csize"};
else w.data={e:V.U.UW,EO:_}}if(F.q(u.m9)){Z.data=c.pQ.YN()}if(F.q(u.E)&&n=="down"){d.T=c.lo;if(_)d.data={e:K.gb};
else{if(O&&O.C.length==1&&O.C[0]!=0&&!O.t[O.C[0]].Ja())d.data={e:K.Vu};else d.data={e:K.W9}}}if(F.q(u.wZ)){if(_&&this._A.Gv!=c.KR)w.data={e:V.U.n$,cU:"afw_fade"};
else if(r){d.T=c.HI;d.data={e:"applylast"}}else w.data={e:V.U.E_}}if(F.q(u.ja)){if(r&&O&&O.ZP(O.C[0])){d.T=c.lo;
d.data={e:K.Eu}}else{d.T=c.lo;d.data={e:K.dd,DF:_}}}if(F.q(u.Rs)){w.data={e:V.U.g7,b9:cf.oV}}if(F.q(u.tx)){if(_){d.data=null;
if(r)w.data={e:V.U.n$,cU:"finfo"};else Z.data={oI:"inverse"}}else if(r)w.data={e:V.U.n$,cU:"isize"}}if(F.q(u.uV)){d.T=c.lo;
d.data={e:K.vi}}if(F.q(u.UA)){w.data={e:V.U.n$,cU:"preferences"}}if(F.q(u.CU)){if(_){d.T=c.lo;d.data={e:K.SP}}else w.data={e:V.U.n$,cU:"newproject"}}if(F.q(u.uo)){w.data={e:V.U.eR};
F.reset()}if(F.q(u.Er)){w.data={e:V.U.SZ};F.reset()}if(F.q(u.Qu)){w.data={e:V.U.g7,b9:cf.z4}}if(F.q(u.wB)&&n=="down"){if(_){if(r)w.data={e:V.U.n$,cU:"saveforweb"};
else w.data={e:V.U.e2}}else w.data={e:V.U.I8}}if(F.q(u.KJ)){if(_){d.T=c.KR;d.data={e:"again"}}else w.data={e:V.U.H$,T:c.KR}}if(F.q(u.zV)){w.data={e:V.U.yM}}if(F.q(u.Tm)){w.data={e:V.U.gN}}if(F.q(u.Ag)||F.q(u.lA)){d.T=c.lo;
d.data={e:K.qU,G1:0};if(F.q(u.Ag))d.data.G1=_?3:2;else d.data.G1=_?0:1}if(F.q(u.Ma)&&O){var v=0;if(_)v++;
if(r)v+=2;d.T=c.FT;d.data={e:"frompath",nD:[null,0,v]}}if(F.q(u.Aq)){Z.data=c.jz.dQ(0)}if(F.q(u.BS)){var L=this.KV.length;
if(L>1)this.XZ.Jm((this.XZ.ZI()+1)%L)}if(F.q(u.L7)){w.data={e:V.U.g7,b9:cf.hq}}if(F.q(u.p9)){w.data={e:V.U.g7,b9:cf.fq}}c.yi.tp(F,d);
if(this.G9.HZ()!=null&&this.G9.HZ().A5()){}else{if(d.data)this.A(d);if(Z.data)this.A(Z);if(w.data)this.A(w)}}if(!F.q(u.ep)&&!r&&!_&&n=="down"){var d=new k(V.E.S),w=new k(V.E.P),H=this.Ac.map[this._A.Gv],y=-1;
for(var e=0;e<this.Ac.keys.length;e++)if(this.Ac.keys[e]&&this.fF(this.Ac.keys[e]))y=e;if(y!=-1){var g;
if(H.jh!=y)g=this.Ac.Io[y];if(H.jh==y)g=(H.ahn+1)%this.Ac.uA[y].length;var Q=this.Ac.uA[y][g].T.id,J=this._A.a9G;
if((J==null||J.indexOf(parseInt(Q))!=-1)&&!this.wM.rt)w.data={e:V.U.H$,T:Q}}if(F.q(u.Tm))w.data={e:V.U.g7,b9:cf.dM,G1:2};
if(F.q(u.m9))w.data={e:V.U.g7,b9:cf.dM,G1:3};if(w.data)this.A(w);if(O&&O.C.length!=0){var A=O.t[O.C[0]],p=A.vE;
if(p==1||p==3){var U=p==3?A.Fa(O).r:A.B1(),j=U.wC?O.a.o.join("")=="111"?1:2:0;d.T=c.o8;if(U&&F.q(u.YE)&&j!=0){d.data={e:"mskView",G:0}}if(U&&F.q(u.alV)){d.data={e:"mskView",G:j==1?0:1}}if(U&&F.q(u.a7n)){d.data={e:"mskView",G:j==2?0:2}}if(d.data)this.A(d)}}var b=F.gT();
if(I&&b!=-1&&this.fF(u.yg[b])){var s=O.C[0],A=O.t[s],G=V.SU(Math.round(100*A.opacity/255),b);d.T=c.lo;
d.data={e:K.nM,Qj:Math.round(255*G/100)};this.A(d)}if(F.q(u.BS))this.tl(this.Ve==0?1:0);if(F.q(u.wZ)||F.q(u.YE)&&this.Ve==2)this.tl(this.Ve==0?2:0);
if(F.q(u.hZ)&&!this.wM.rt){d.T=c.FT;d.data={e:"qmask"};this.A(d)}}if(!F.q(u.ep)&&!r&&_){var d=new k(V.E.S),w=new k(V.E.P);
if(F.q(u.aa8))w.data={e:V.U.n$,cU:"shortcuts"};if(F.q(u.Zk))w.data={e:V.U.n$,cU:"fill"};if(F.q(u.akW))w.data={e:V.U.n$,cU:"sel_feather"};
if(I&&(F.q(u.wW)||F.q(u.sF))){var s=O.C[0],A=O.t[s],T=fk.Dy,z=T.length,m=T.indexOf(A.mf);d.T=c.lo;d.data={e:K.SG,Qj:(m+z+(F.q(u.wW)?1:-1))%z};
this.A(d)}if(w.data)this.A(w)}var d=new k(V.E.S),$=n=="down"&&(this.fF(u.lW)||this.fF(u.pf));if((x||r)&&$){d=new k(V.E.JA);
d.data=c.P6.Lz(x?"BckC":"FrgC");this.A(d)}else if(O&&$&&!this.wM.rt){if(O.N!=null){d=new k(V.E.JA);d.data={oI:"delete"}}else{d.T=c.lo;
d.data={e:K.C9}}this.A(d)}if(this.G9.HZ()!=null){if(F.q(u.YE)){this.G9.HZ().EQ()}else{this.G9.HZ().Ka(O,this,this._A,F)}}if(this._A.Gv==null)return;
var H=this.WT();if(this.G9.HZ()==null||this.Ac.gg)H.Ka(O,this,this._A,F)};hq.prototype.fF=function(n){var F=this.T6,O=this.Ac.map[this._A.Gv].T,top=this.G9.HZ(),I=this.kp();
return F.q(n)&&!O.JF(n,I)&&(top==null||!top.JF(n,I))};hq.a6X=function(){if(!document.mozFullScreen&&!document.ab8){var n=document.body;
if(n.mozRequestFullScreen){n.mozRequestFullScreen()}else{n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}}else{if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else{document.webkitCancelFullScreen()}}};
hq.prototype.tl=function(n){var F=this.a4h,O=this.Xm;this.Ve=n;var I=V.Zo,x=this.zJ._;if(I(x))this.uF.removeChild(x);
var r=this.zj._;if(I(r))this.uF.removeChild(r);var _=this.Rt._;if(I(_))F.removeChild(_);var d=this.XZ._;
if(I(d))F.removeChild(d);var w=this.Zi._;if(I(w))F.removeChild(w);if(n==0){this.uF.appendChild(x);this.uF.appendChild(r);
O.appendChild(F);F.appendChild(_);F.appendChild(d);F.appendChild(w)}if(n==1){this.uF.appendChild(x);
F.appendChild(d)}if(n==2){F.appendChild(d)}this.XZ.tl(n==2?1:0);if(document.fullscreenEnabled){if(n==2)document.body.requestFullscreen();
else if(document.fullscreenElement)document.exitFullscreen()}this.NU()};function ag(n){ch.call(this);
if(n==null)return;this.HL=null;this.Sa=null;this._=V.w("div","sbar"+" "+n);this.AB=new V.w("div","top");
this.AB.innerHTML="> <";this._.appendChild(this.AB);this.u1=1;this.AB.addEventListener("click",this.aoL.bind(this),!1)}ag.prototype=new ch;
ag.prototype.aoL=function(n){if(this.HL!=null&&this.HL<500&&this.u1==0)return;if(this.u1==0)this.h8(!0);
else this.collapse(!0)};ag.prototype.ajc=function(n){this.u1=n;this.AB.innerHTML=this.u1==0?"< >":"> <"};
ag.prototype.a1V=function(){var n=new k(V.E.P,!0);n.data={e:V.U.SJ};this.A(n)};ag.prototype.h8=function(n){this.ajc(1);
if(n)this.a1V()};ag.prototype.collapse=function(n){this.ajc(0);if(n)this.a1V()};ag.prototype.XB=function(){return this.u1==1};
function f6(n){ag.call(this,"vcolumn");this.UL=n;this.ij();this.iT=V.w("div");this.iT.setAttribute("style","cursor:default;");
this.ahT=this.ag7.bind(this);this.amR=this.a8O.bind(this);this.a1k=this.amj.bind(this);V.CP(this._,this.ahT);
this._.appendChild(this.iT);this.uT=V.w("div","");this.iT.appendChild(this.uT);this.av=null;this.HU=V.w("div","float");
this.p5=[];this.a8Z=null;this.a6D=0}f6.prototype=new ag;f6.prototype.ag7=function(n){if(n.target!=this._)return;
if(!this.XB())return;this.a8Z=V.iJ(n,document.body);this.a6D=this.UL;V.MH(document,this.amR);V.Ry(document,this.a1k)};
f6.prototype.a8O=function(n){var F=V.iJ(n,document.body);this.UL=this.a6D+this.a8Z.x-F.x;this.ij();var O=new k(V.E.P,!0);
O.data={e:V.U.SJ};this.A(O)};f6.prototype.amj=function(n){V.le(document,this.amR);V.re(document,this.a1k)};
f6.prototype.agX=function(n){n.k("showFloat",this.aeo,this);n.k("hideFloat",this.YT,this);this.p5.push(n);
n.parent=this;this.iT.appendChild(n._)};f6.prototype.a8T=function(e){var n=this.p5[e];n.removeEventListener("showFloat",this.aeo,this);
n.removeEventListener("hideFloat",this.YT,this);this.p5.splice(e,1);n.parent=null;this.iT.removeChild(n._)};
f6.prototype.adY=function(){return this.p5.length};f6.prototype.dI=function(){for(var e=0;e<this.p5.length;
e++)this.p5[e].dI()};f6.prototype.aeo=function(n){this.YT(n);this.uT.appendChild(this.HU);this.av=n.currentTarget.Rm;
this.HU.appendChild(this.av);var F=n.currentTarget.MY(),O="";if(F.x!=0)O+="width : "+F.x+"px;";if(F.y!=0)O+="height: "+F.y+"px;";
this.HU.setAttribute("style",O);this.Kq(this.HL,this.Sa)};f6.prototype.YT=function(n){this.dI();if(this.av){this.uT.removeChild(this.HU);
this.HU.removeChild(this.av);this.av=null}};f6.prototype.ij=function(){this._.setAttribute("style","width: "+this.UL+"px; padding-left:3px; cursor:ew-resize;")};
f6.prototype.h8=function(n){this.ij();this.YT();for(var e=0;e<this.p5.length;e++)this.p5[e].h8();ag.prototype.h8.call(this,n)};
f6.prototype.collapse=function(n){this._.removeAttribute("style");for(var e=0;e<this.p5.length;e++)this.p5[e].collapse();
ag.prototype.collapse.call(this,n)};f6.prototype.Kq=function(n,F){this.HL=n;this.Sa=F;var O=this.p5.length,I=this.XB();
F-=6;if(O==0)return;n=this.UL;var x=F;for(var e=0;e<O-1;e++){var r=this.p5[e],_=r.a0o();r.Kq(n,I?_:F);
x-=_}this.p5[O-1].Kq(n,I?x:F)};function di(n){ch.call(this);this._=V.w("div");this.iT=null;this.ul=0;
this.i5=0;this.a3x=n;this.a36=this.R3.bind(this);this.a1a=this.BO.bind(this);this.aor=this.lu.bind(this);
this.n_=null;this.iU=null;this.Ym=null;V.CP(this._,this.a36);var F=this._,I="<svg class=\"gsicon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">";
F.addEventListener("touchmove",V.Bg,!1);this.a4P=!0;this.mb=[];var O=this.akl=V.w("div");O.setAttribute("style","float:right; padding:4px;display:none; position:relative;z-index:1;");
this._.appendChild(O);var x=["<img style=\"height:22px; cursor:pointer;\" title=\"Try Cartoon Animator!\" src=\"img/cta.png\" />",[0,13,3],[0,13,4],[0,13,5],"Blog","API",I+"<path d=\"m21.325 9.308c-.758 0-1.425.319-1.916.816-1.805-1.268-4.239-2.084-6.936-2.171l1.401-6.406 4.461 1.016c0 1.108.89 2.013 1.982 2.013 1.113 0 2.008-.929 2.008-2.038s-.889-2.038-2.007-2.038c-.779 0-1.451.477-1.786 1.129l-4.927-1.108c-.248-.067-.491.113-.557.365l-1.538 7.062c-2.676.113-5.084.928-6.895 2.197-.491-.518-1.184-.837-1.942-.837-2.812 0-3.733 3.829-1.158 5.138-.091.405-.132.837-.132 1.268 0 4.301 4.775 7.786 10.638 7.786 5.888 0 10.663-3.485 10.663-7.786 0-.431-.045-.883-.156-1.289 2.523-1.314 1.594-5.115-1.203-5.117zm-15.724 5.41c0-1.129.89-2.038 2.008-2.038 1.092 0 1.983.903 1.983 2.038 0 1.109-.89 2.013-1.983 2.013-1.113.005-2.008-.904-2.008-2.013zm10.839 4.798c-1.841 1.868-7.036 1.868-8.878 0-.203-.18-.203-.498 0-.703.177-.18.491-.18.668 0 1.406 1.463 6.07 1.488 7.537 0 .177-.18.491-.18.668 0 .207.206.207.524.005.703zm-.041-2.781c-1.092 0-1.982-.903-1.982-2.011 0-1.129.89-2.038 1.982-2.038 1.113 0 2.008.903 2.008 2.038-.005 1.103-.895 2.011-2.008 2.011z\"/>",I+"<path d=\"M23.954 4.569c-.885.389-1.83.654-2.825.775 1.014-.611 1.794-1.574 2.163-2.723-.951.555-2.005.959-3.127 1.184-.896-.959-2.173-1.559-3.591-1.559-2.717 0-4.92 2.203-4.92 4.917 0 .39.045.765.127 1.124C7.691 8.094 4.066 6.13 1.64 3.161c-.427.722-.666 1.561-.666 2.475 0 1.71.87 3.213 2.188 4.096-.807-.026-1.566-.248-2.228-.616v.061c0 2.385 1.693 4.374 3.946 4.827-.413.111-.849.171-1.296.171-.314 0-.615-.03-.916-.086.631 1.953 2.445 3.377 4.604 3.417-1.68 1.319-3.809 2.105-6.102 2.105-.39 0-.779-.023-1.17-.067 2.189 1.394 4.768 2.209 7.557 2.209 9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63.961-.689 1.8-1.56 2.46-2.548l-.047-.02z\"/></svg>",I+"<path d=\"M23.9981 11.9991C23.9981 5.37216 18.626 0 11.9991 0C5.37216 0 0 5.37216 0 11.9991C0 17.9882 4.38789 22.9522 10.1242 23.8524V15.4676H7.07758V11.9991H10.1242V9.35553C10.1242 6.34826 11.9156 4.68714 14.6564 4.68714C15.9692 4.68714 17.3424 4.92149 17.3424 4.92149V7.87439H15.8294C14.3388 7.87439 13.8739 8.79933 13.8739 9.74824V11.9991H17.2018L16.6698 15.4676H13.8739V23.8524C19.6103 22.9522 23.9981 17.9882 23.9981 11.9991Z\"/></svg>"];
for(var e=0;e<x.length;e++){var r=new cg(x[e]);this.mb.push(r);r._.setAttribute("style","margin-left:"+(e<7?4:0)+"px;cursor:pointer;");
r.k("click",this.Nz,this)}}di.prototype=new ch;di.prototype.B=function(){var n=this.akl;V.em(n);for(var e=0;
e<this.mb.length;e++){var F=this.mb[e];if(e<6)F.B();var O=Date.now()<1595058192822&&!dW.$m();if(e!=0||O)n.appendChild(F._)}};
di.prototype.Nz=function(n){var e=this.mb.indexOf(n.currentTarget);if(e==1){if(window.showCap)window.showCap();
return}var F="CTA  issues learn blog api twitter facebook".split(" "),O="//bit.ly/34sCf9r  //github.com/photopea/photopea/issues //www.photopea.com/learn //blog.photopea.com //www.photopea.com/api //www.reddit.com/r/photopea //www.twitter.com/photopeacom //www.facebook.com/photopea".split(" "),I=window.ga;
if(I)I("send","event","Links",F[e]);var x=new k(V.E.P,!0);x.data={e:V.U.mR,link:O[e]};this.A(x)};di.prototype.R3=function(n){if(n.a5d){n.preventDefault();
n.stopPropagation()}var F=window;V.MH(F,this.a1a);V.Ry(F,this.aor);F=this.iT;this.n_=new aE(parseInt(F.style.left),parseInt(F.style.top));
this.iU=V.iJ(n,this._);this.Ym=F.getBoundingClientRect()};di.prototype.BO=function(n){var F=V.iJ(n,this._),O=this.n_.x+F.x-this.iU.x,I=this.n_.y+F.y-this.iU.y,x=this.ul-this.Ym.width,r=this.i5-this.Ym.height;
if(this.a3x)this.iT.style.left=Math.min(0,Math.max(x,O))+"px";else this.iT.style.top=Math.min(0,Math.max(r,I))+"px";
if(O-10>0){this.iU.x=F.x-10;this.n_.x=0}if(O+10<x){this.iU.x=F.x+10;this.n_.x=x}};di.prototype.lu=function(n){var F=window;
V.le(F,this.a1a);V.re(F,this.aor)};di.prototype.alK=function(n){if(this.iT){this._.removeChild(this.iT)}this.iT=n;
this._.appendChild(n);n.style.position="absolute";if(this.a3x)n.style.left=0;else n.style.top=0};di.prototype.Kq=function(n,F){this.ul=n;
this.i5=F;this._.setAttribute("style","position:relative; width: "+n+"px; height: "+F+"px; overflow:hidden; white-space: nowrap; ");
var O=this.iT.firstChild,I=this.akl,x=O?O.firstChild.getBoundingClientRect().width+80:1e9,r=450,_=this.a4P&&n>x+r,d=V.N7,w=d("b`bRH"),Z=d("SU\\VOAV");
I[w][Z]=_?"":d("][WK")};function fp(){ch.call(this);this.GL=null;this.I2=fp.Er;this.adK="";this._=V.w("div","rightbar");
this.DD=[new f6(380),new f6(265)];this.p5=[new gX,new gX,new gX,new gX,new gX,new gX];this.ae1=[]}fp.prototype=new ch;
fp.prototype.B=function(){var n=this.I2;for(var e=0;e<n.length;e++)n[e].AM.B()};fp.Er=[{AM:new ih,wQ:2},{AM:new aU,wQ:3},{AM:new bO,wQ:1},{AM:new gG(!0),wQ:4},{AM:new bB,wQ:0},{AM:new d$,wQ:4},{AM:new b7,wQ:2},{AM:new fY,wQ:0},{AM:new f_,wQ:2},{AM:new gB,wQ:1},{AM:new ed,wQ:3},{AM:new aS,wQ:2},{AM:new gG(!1),wQ:4},{AM:new e4,wQ:1},{AM:new bi,wQ:4},{AM:new hn,wQ:2},{AM:new d5,wQ:0},{AM:new eL,wQ:5,y_:!0},{AM:new du,wQ:5,y_:!0},{AM:new a1,wQ:5,y_:!0}];
(function(){var n=[{id:aM.Qu.amv,name:"Gallery",url:"plugins/gallery.html",width:400,height:400,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACABAMAAAAxEHz4AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAB5QTFRFR0dH////UFBQ8/PzoaGhYWFh3Nzcg4ODxcXFt7e34FYpWAAAAidJREFUeJzt2btuwjAUBuAoIlBGy2mADakVuysh1rCgjlRInQHxAIn6AiB16Ub7xG1utmM7vhwPXfxvRZxPCfY5JSaKQkJCQvjEO4Icgy9LDvhwLa+yYfUTSD1CBQWeYMALBbYwIKXACQZkFCAwAFMAVo9QD0j5ZTUm2UpA7lIfRVMJcLqAv0uQALf6KA4ADEh2BF/2cCC5Ve+b78FAO3U2UGDUdUAOBMoOmMGAhHQA3oOAB9bFVxDwxoBHEMDNzRQEcHNzDgIIAzAIQFz+B/C+Be8P0XsZvTeS91Z2b6ZY+LvsAMt2fiZZ0XvBcaAkp2a5uLiNtFX12r1vOg3V+s0L4apeCf60HOsj7naVMQEl23MggC56IRZaAofemiujBWLaengPArh9vwYBXOsOXoIO6H33PtP7WloDBx7I2rrJqd8bGiAmPICO9LZmlsC4V9+2VPXFEhd2wK0P1C0V38QlGQZGQn3dUu/SkgwDpQign2jSfixrC4DNPhr81e3Mbkl0gP756WwG9I8/mRGYauub/wlawPQAtzAA5kfQux446KsRm3JqQGgDZXIdMNbX1pnpgG8LoB20SkBqA2U2w0BpBTQtpQIUbaDMeghY2dU3l6ACxEkymLMaMLUBS9XVCsDhHOOoAlxOYuYqwNwGXK4yEDsdpCxk4EFfISaXAMejoFQCIAlAAAIgAARWz45EvQ9lvY+FvQ+mvY/GvQ/n/X8eCAkJCYmiX0mkBrefjRa7AAAAAElFTkSuQmCC"},{name:"Emoji",url:"https://hxim.github.io/TwemojiPlugin/twemoji3.html",width:400,height:400,icon:"https://hxim.github.io/TwemojiPlugin/icon.svg"},{name:"3D Viewer",url:"plugins/depth",width:400,height:400,icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAGlQTFRF////AAAAAAAATExM+fn5JSUlBwcHGhoaExMT////////lJSUtbW14uLiMjIy5+fnq6ur2dnZjIyM7+/vxMTE////gYGBoaGhPT09////zMzM////cHBwZmZm////////WVlZ////////C7AcuwAAACN0Uk5T//8A////////3Qb/////////////TP////H/nP//brj/hSKBQ27bAAACI0lEQVR4nO2XXZeCIBCGIUVJEz9ApdKy//8nFwsEFOoke7EX+150Oo7zwAzDHAccZmW3+xl8peP9lj1dwfxz+9JbMloJyO573Gddsydgt78gzIDbfn8A2gPIdsWvdMxA0AbEFkBABmZdQVAEIoYwdxC6/r9+WzWr+ibvKxZ/71tUI0mgUkI6ahhTJYQIiaaxolvACa6U5tq4tokF8jVjA4Cw8wOE8PARANk7AISkcABwarzB3wMgri0A6i6FyH5c5AuE2gCRQ2QRUKkB9cX4j+ULtQ2IwMxng94l8Zx35AfMipvlwCs3oJPm0g0QVaP2iNxbkDvAsQ+gD+3i8meS3wMvAHD5rNl4UzZJ/yh+A8jlM276NqLa9X2YdHgOQCmfYQugTzgZzOAcAKBW8gAgauh7gCop6gGIuqsDARCvL9PHEGhZFqIpTcqG/HUAClcSlWpV7I0foHbLXQDAVh4OgL+QnpKlhLyAXiXKWcpLihMfoNikyRaVduIB5Ooy6uvcNSZK9YPJAaBs1G2JL14jxFEvr39FlL23Adi6K0KpbmnjKyIecaIbVrrqiWslRlMdXS8sAbr9udFSnYClnzgBSWcdwBYQGSe8dUe5ubxQeRrNlo+sdrAAkiRFhE9DVQOXCnbqm6HL+1PhtP/rbyvwa/kc+r1+DB84gkeeLCgGMXQFj32Hw3W//+M1+u4mPDI5fLe78rAM3/P4316/ZBwf7Wv8/wFREBclUew2ggAAAABJRU5ErkJggg=="}];
for(var e=0;e<n.length;e++)fp.Er.push({AM:new aI(n[e],100+e),wQ:5,y_:!0})}());fp.prototype.a7J=function(n){for(var e=0;
e<n.length;e++){var F=n[e],O=new aI(F,"plg_"+F.name);this.I2.push({AM:O,wQ:5});this.ae1.push(O.UX)}this.Xx()};
fp.prototype.XW=function(n,F){this.GL=n;var O=this.I2;for(var e=0;e<O.length;e++)O[e].AM.XW(n,F);if(F==cf.w2||F==cf.fo)this.Xx()};
fp.prototype.k3=function(n){var F=this.I2;for(var e=0;e<F.length;e++)F[e].AM.k3(n)};fp.prototype.Kq=function(n,F){this.HL=n;
this.Sa=F;this.DD[0].Kq(n,F);this.DD[1].Kq(n,F)};fp.prototype.Xx=function(){var n=this.GL,F=this.HL;
if(n==null||F==0)return;var O=n.MG.concat(this.ae1);if(JSON.stringify(O)!=this.adK){this.adK=JSON.stringify(O);
V.em(this._);var I=[];for(var e=0;e<this.DD.length;e++){var x=this.DD[e];I[e]=x.XB();while(x.adY()!=0)x.a8T(0);
x.h8()}var r=[];for(var e=0;e<this.p5.length;e++){var _=this.p5[e];_.h8();while(_.a1O()!=0)_.TQ(0);r.push(0)}for(var e=0;
e<O.length;e++){var d=this.al0(O[e].toString());this.p5[d.wQ].Hw(d.AM);this.p5[d.wQ].Jm(0);r[d.wQ]++}var w=[];
for(var e=0;e<r.length;e++){if(r[e]==0)continue;var Z=e<2||F<500?1:0,x=this.DD[Z];x.parent=this;x.agX(this.p5[e]);
w[Z]=!0}for(var e=0;e<this.DD.length;e++)if(w[e])this._.appendChild(this.DD[e]._);this.DD[0].collapse();
if(F<700||this.GL.compact||!I[1]){this.DD[1].collapse()}var P=new k(V.E.P,!0);P.data={e:V.U.SJ};this.A(P)}};
fp.prototype.al0=function(n){for(var e=0;e<this.I2.length;e++)if(this.I2[e].AM.UX==n)return this.I2[e]};
fp.prototype.aay=function(n){var F=this.al0(n);this.p5[F.wQ].Hw(F.AM)};fp.prototype.hV=function(n,F,O){var I=this.I2;
for(var e=0;e<I.length;e++)I[e].AM.hV(n,F,O)};fp.prototype.XS=function(n,F,O,I,x){var r=this.I2;for(var e=0;
e<r.length;e++)r[e].AM.XS(n,F,O,I,x)};fp.prototype.RL=function(n,F,O,I,x){var r=this.I2;for(var e=0;
e<r.length;e++)r[e].AM.RL(n,F,O,I,x)};fp.prototype._X=function(n,F,O,I,x){var r=this.I2;for(var e=0;
e<r.length;e++)r[e].AM._X(n,F,O,I,x)};function bA(n,F){ag.call(this,"toolbar");this.DC=null;this.na=V.w("div","tools");
this._.appendChild(this.na);this.ka=null;this.akR=F;this.yQ=null;this.afx=-1;this.a1y={};this.Ac=null;
this.ot=null;this.y6=null;this.lg=null;this.hK(n);this.RP=new dF;this.RP._.style.marginTop="5px";this.RP._.style.marginBottom="3px";
this.RP.parent=this;this.rk=new cg(V.WE("lrs/mask"),!1,[6,6,1]);this.rk.k("click",function(r){var _=new k(V.E.S,!0);
_.T=c.FT;_.data={e:"qmask"};this.A(_)},this);var O=new bo(null,["Ctrl","Alt","Shift","No Touch"],!0);
O.k(V.E.L,this.a6P,this);var I=V.w("span","rangecont form");I.appendChild(O._);var x=new ch;x._=I;this.ah4=[!1,!1,!1];
this.zv=new cg("\u2328",!1,"Virtual Keys");this.zv.k("click",function(r){var _=this.zv._.getBoundingClientRect(),d=new k(V.E.P,!0);
d.data={e:V.U.di,AM:x,x:_.left,y:_.top-30};this.A(d)},this)}bA.prototype=new ag;bA.prototype.a6P=function(n){var F=n.target.u();
this.zv.F(F[0]||F[1]||F[2]||F[3]);var O=new k(V.E.P,!0);O.data={e:V.U.Pc};this.A(O);for(var e=0;e<4;
e++){if(F[e]!=this.ah4[e]){O.data={e:V.U.aO,rt:F[e],key:["ControlLeft","AltLeft","ShiftLeft","NoTouch"][e]};
this.A(O)}}this.ah4=F.slice(0)};bA.prototype.al1=function(n,F){this.yQ=F;if(n==null||n.C.length==0||n.t[n.C[0]]==null)return;
var O=n.rk()!=null,I=n.a.o,x=n.t[n.C[0]].vE,r=x==1||x==3||O||I[0]+I[1]+I[2]==1;this.RP.a8n(r);this.rk.F(O)};
bA.prototype.a10=function(n,F){var O=n.length,I=[];for(var e=0;e<O;e++)I[e]=n[e].slice(0);n=I;var x=[1,2,4,5,7,8,7,9,11,12,14,15,14,16,10,11,1,3,17,18,7,6,13,14],r=Math.min(x.length/2,O-F);
for(var e=0;e<r;e++){var _=x[2*e],d=x[2*e+1];n[_]=n[_].concat(n[d]);n[d]=null}for(var e=0;e<n.length;
e++)if(n[e]==null){n.splice(e,1);e--}return n};bA.prototype.ahW=function(n,F){for(var e=0;e<F.length;
e++)for(var O=0;O<F[e].length;O++)if(F[e][O].T.id==n)return e};bA.prototype.hK=function(n,F){this.DC=n;
this.ot=[];this.y6=[];this.lg=[];this.Ac=[];var O=n.uA;if(F!=null&&this.akR)O=this.a10(O,F);if(this.ka){var I=[],x=this.ka.a9G;
for(var e=0;e<O.length;e++){var r=[];for(var _=0;_<O[e].length;_++){var d=O[e][_];if(x==null||x.indexOf(parseInt(d.T.id))!=-1)r.push(d)}if(r.length>0)I.push(r)}O=I}for(var e=0;
e<O.length;e++){var w=[],Z=this.ot.length,P=null,C=-1;for(var _=0;_<O[e].length;_++){var d=O[e][_].T,W=this.ahW(d.id,n.uA),v=n.keys[W];
this.Ac.push(d);var L=new h1(d.name,v,d.lp,this.ot.length,e,O[e].length>1);this.ot.push(L);var H=this.a1y[d.id];
if(H==null)H=0;if(H>C){C=H;P=L}L.k(V.E.L,this.sS,this);L.k("mover",this.Ao,this);w.push({name:d.name,Sr:d.lp,R$:v?v.Gm:""})}this.y6.push(P);
if(w.length==1)this.lg.push(null);else{var y=new at(w);y.acb=Z;y.jh=e;this.lg.push(y);y.k("select",this.aat,this);
y.parent=this}}};bA.prototype.Kq=function(n,F){var O=this.Sa=F-11,I=32;if(1<V.Z()&&V.Z()<1.5)I=18+14*(1/V.Z());
var x=39+23,r=Math.floor((O-x)/I),_=this.ka;if(_==null)return;if(r!=this.afx){this.afx=r;this.hK(this.DC,r);
this.iy(_.Gv)}var d=this.y6.length*I+x,w=Math.min(1,O/d);if(.75<=w){this.na.setAttribute("style","width:34px; transform-origin: top left; transform: scale("+w+","+w+");");
this._.setAttribute("style","height:"+(F-2)+"px; overflow:hidden")}else{O-=4;this.na.setAttribute("style","height: "+O+"px;  width:"+Math.ceil(d/O)*34+"px");
this._.setAttribute("style","")}};bA.prototype.B=function(){for(var e=0;e<this.ot.length;e++)this.ot[e].B();
for(var e=0;e<this.lg.length;e++)if(this.lg[e])this.lg[e].B()};bA.prototype.sS=function(n){var F=new k(V.E.P,!0);
F.data={e:V.U.H$,T:this.Ac[n.id].id};this.A(F)};bA.prototype.aat=function(n){var F=n.target.acb+n.target.uz()[0];
this.ot[F].lu(null)};bA.prototype.Ao=function(n){var F=this.yQ,O=new k(V.E.P,!0);O.data={e:V.U.Pc};this.A(O);
var I=n.target,x=this.lg[I.jh];if(x==null)return;var r=I._.getBoundingClientRect(),O=new k(V.E.P,!0);
O.data={e:V.U.di,AM:x,x:r.left+r.width+8,y:r.top};if(F==null||!(F.q(u.cf)||F.q(u.ep)))this.A(O)};bA.prototype.iy=function(n){this.a1y[n]=Date.now();
var F=-1;for(var e=0;e<this.Ac.length;e++)if(this.Ac[e].id==n)F=e;for(var e=0;e<this.ot.length;e++){var O=this.ot[e];
O.ae3(F==e)}if(F==-1)return;this.y6[this.ot[F].jh]=this.ot[F];V.em(this.na);var I=this.y6;for(var e=0;
e<I.length;e++){this.na.appendChild(I[e]._)}if(!this.akR)return;this.na.appendChild(this.RP._);if(this.Sa>500)this.na.appendChild(this.rk._);
else this.na.appendChild(this.zv._)};bA.prototype.hV=function(n,F){this.iy(F.Gv)};bA.prototype.XW=function(n,F){this.ka=n;
if(F==cf.fo){this.hK(this.DC);this.iy(n.Gv)}this.RP.aow(n.nE,n.sI)};function h1(n,F,O,I,x,r){ch.call(this);
this.WZ=0;this.aj5=this.aeg.bind(this);this.jh=x;this.C7=I;this.xt=n;this.aeM=F;this.a9J=r;this.lp=O;
this._=V.w("button","");this._.innerHTML=V.WE(this.lp);if(this.a9J){var _=V.w("img","gsicon");_.setAttribute("src",PIMG["tools/corner"]);
_.setAttribute("style","position:absolute; right:0;  bottom:0; width:100%; height:100%;");this._.appendChild(_)}this.B();
V.CP(this._,this.R3.bind(this));this._.addEventListener("click",this.lu.bind(this),!1);this._.addEventListener("contextmenu",h1.ou,!1)}h1.prototype=new ch;
h1.ou=function(n){n.stopPropagation();n.preventDefault();return!1};h1.prototype.B=function(){var n=this.aeM?" ("+this.aeM.Gm+")":"";
this._.setAttribute("title",hl.get(this.xt)+n)};h1.prototype.R3=function(n){this.WZ=setTimeout(this.aj5,160)};
h1.prototype.lu=function(n){clearTimeout(this.WZ);var F=new k(V.E.L,!1);F.target=this;F.id=this.C7;this.A(F)};
h1.prototype.aeg=function(n){var F=new k("mover",!1);F.target=this;F.id=this.C7;this.A(F)};h1.prototype.ae3=function(n){this._.setAttribute("class",n?"toolbtn active":"toolbtn")};
function ig(){ch.call(this);this._=V.w("div","topbar");this.Qn=V.w("span","");this.acd=0;this._.appendChild(this.Qn);
this.qE=null;this.GA=null;this.I$=[];this.MG=[];var n=this.R3.bind(this);for(var e=0;e<ig.data.length;
e++){var F=V.w("button");this.I$.push(F);this.Qn.appendChild(F);F.addEventListener("mouseover",n,!1);
V.CP(F,n)}this.yI=new cg([0,13,0],!1,null,!0);this.yI.k("click",this.ai0,this);this._.appendChild(this.yI._);
this.yt=new cg(V.WE("tools/zoom",null,"autoscale"),!1,[12,86]);this.yt.k("click",this.ai0,this);this._.appendChild(this.yt._)}ig.prototype=new ch;
ig.prototype.aes=function(){if(this.MG.length!=0)return;for(var e=0;e<ig.data.length;e++){var n=ig.data[e],F=new at(n.items,n.Sn);
F.parent=this;this.MG.push(F)}this.B()};ig.prototype.B=function(){this.yI.B();this.yt.B();for(var e=0;
e<this.I$.length;e++)this.I$[e].textContent=hl.get(ig.data[e].name);this.abr();for(var e=0;e<this.MG.length;
e++)this.MG[e].B()};ig.prototype.ai0=function(n){var F=new k(V.E.P,!0);if(n.target==this.yI)F.data={e:V.U.n$,cU:"account"};
else F.data={e:V.U.E_};this.A(F)};ig.prototype.afn=function(n,F){this.qE=n;this.GA=F};ig.prototype.XW=function(n,F){this.GA=n;
if(F==cf.fo){var O=n.adH;V.em(this.Qn);for(var e=0;e<this.I$.length;e++){if(O==null||O[e]==1||O[e]instanceof Array)this.Qn.appendChild(this.I$[e]);
if(O!=null&&O[e]instanceof Array){this.aes();this.MG[e].$g(O[e])}}this._.removeChild(this.yI._);this._.removeChild(this.yt._);
if(n.iV)this._.appendChild(this.yI._);this._.appendChild(this.yt._)}this.abr()};ig.prototype.abr=function(n,F){var O=this.yI,I=12255232;
if(dW._m())I=dW.$m()?43520:16755200;O._.setAttribute("style","color:#ffffff; background-color:#"+q.c7(I))};
ig.prototype.R3=function(n){this.aes();var e=this.I$.indexOf(n.currentTarget),F=this.MG[e];if(n.type=="mouseover"&&!V.Zo(this.MG[this.acd]._))return;
if(V.Zo(F._))return;n.a5d=!0;this.acd=e;for(var e=0;e<ig.data.length;e++)this.MG[e].update(this.qE,this.GA);
var O=n.target.getBoundingClientRect(),I=new k(V.E.P,!0);I.data={e:V.U.di,AM:F,x:O.left,y:O.top+O.height+2,a5x:!0};
this.A(I)};ig.ais=function(n){var F=u,O=F.ep,I=F.MQ,x=F.pI,r={name:[0,5],items:[{name:[7,0],R$:[O,F.U]},{name:[7,1],R$:[O,F.m9],h:function(d){return{h:d!=null&&d.N!=null}}},{name:[7,2],R$:[I,O,F.tx],h:function(d){return{h:d!=null&&d.N!=null}},dP:!0},{name:[7,11],RO:!0,h:function(d){return{h:d!=null&&d.C.length!=0&&!d.t[d.C[0]].rect.D2()}}},{name:[7,13],RO:!0,h:function(d){return{h:d!=null&&d.C.length!=0&&!d.t[d.C[0]].rect.D2()}},dP:!0},{name:[7,8],RO:!0},{name:[7,3],dP:!0,sub:[{name:[7,9],RO:!0,h:function(d){return{h:d!=null&&d.N!=null}}},{name:[19,3,0],RO:!0,h:function(d){return{h:d!=null&&d.N!=null}}},{name:[7,4],RO:!0,h:function(d){return{h:d!=null&&d.N!=null}}},{name:[7,5],RO:!0,h:function(d){return{h:d!=null&&d.N!=null}}},{name:[7,6],RO:!0,h:function(d){return{h:d!=null&&d.N!=null}},R$:"Shift+F6"}]},{name:[7,10],h:function(d){return{h:d!=null&&d.N!=null}},dP:!0},{name:[6,6,1],h:function(d){return{h:d!=null,mN:d!=null&&d.rk()}},R$:[F.hZ],dP:!0},{name:"Save Selection"}],Sn:[{g:V.E.JA,i:c.pQ.YN(!0)},{g:V.E.JA,i:c.pQ.YN()},{g:V.E.JA,i:{oI:"inverse"}},{g:V.E.P,i:{e:V.U.n$,cU:"redge"}},{g:V.E.P,i:{e:V.U.n$,cU:"magiccut"}},{g:V.E.P,i:{e:V.U.n$,cU:"crange"}},{sub:[{g:V.E.P,i:{e:V.U.n$,cU:"sel_border"}},{g:V.E.P,i:{e:V.U.n$,cU:"sel_smoothness"}},{g:V.E.P,i:{e:V.U.n$,cU:"sel_expand"}},{g:V.E.P,i:{e:V.U.n$,cU:"sel_contract"}},{g:V.E.P,i:{e:V.U.n$,cU:"sel_feather"}}]},{g:V.E.P,i:{e:V.U.H$,T:c.UR}},{g:V.E.S,T:c.FT,i:{e:"qmask"}},{g:V.E.JA,i:{oI:"duplicate",Mk:{classID:"null",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}}}]};
if(n){var _=r.items.length-1;r.items.splice(_,0,{name:[10,16],R$:[x,O,F.KJ]});r.Sn.splice(_,0,{g:V.E.P,i:{e:V.U.H$,T:c.KR}})}return r};
ig.data=function(){var n=u,F=n.ep,O=n.MQ,I=n.pI,x=function(P){return{h:P!=null&&P.C.length!=0}},r=function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].add.SoLd!=null}},_=[],d=[],w="none maxx avrg medn minn rang stdv summ vari".split(" "),Z=[[22,5,0],[24,17,2],[24,3,0],[24,7,3],[24,17,3],[12,12],"Standard Deviation","Summation","Variance"];
for(var e=0;e<w.length;e++){_.push({name:Z[e]});d.push({g:V.E.S,T:c.lo,i:{e:K.NR,Qj:w[e]}})}return[{name:[0,0],items:[{name:[5,3],R$:[I,F,n.CU],title:[11,7],RO:!0},{name:[1,0],R$:[F,n.uo],RO:!0},{name:[1,11],RO:!0,h:function(P,C){return{h:P!=null}}},{name:["VAR0 VAR1",[1,0],[0,14]],dP:!0,sub:[{name:[1,5],RO:!0},{name:[11,0],RO:!0},{name:["PSD VAR0",[25,0]],RO:!0}]},{name:[1,1],dP:!0,sub:[{name:"PNG",R$:"Imgur.com",h:function(P,C){return{h:P!=null&&C.EE}}},{name:"JPG",R$:"Imgur.com",h:function(P,C){return{h:P!=null&&C.EE}}},{name:"PSD",R$:"Photopea.com",h:function(P,C){return{h:P!=null&&C.EE&&!P.zQ}}}]},{name:"Save ...",R$:[F,n.wB],h:function(P,C){var W=hl.get([1,2])+(P==null?"":P.CQ?" (Smart Object)":P.Hk?" (Google Drive)":"");
return{h:P!=null&&(P._b!=null&&P.uy=="psd"||P.CQ!=null||P.ve!=null&&P.ve.yY!=null||P.Hk!=null||C.va.save!=null),CL:W}}},{name:[1,3],h:function(P,C){return{h:P!=null&&!P.zQ&&C.EE}}},{name:["VAR0 PSD/PSB",[1,2]],RO:!0,h:function(P,C){return{h:P!=null&&!P.zQ&&C.EE}}},{name:[1,8],dP:!0,sub:function(){var P=fx.L$(0),C=[];
for(var e=0;e<P.length;e++)C.push({name:P[e],R$:"."+P[e].toLowerCase()});C.push({name:[0,14],sub:function(){var P=fx.L$(1),C=[];
for(var e=0;e<P.length;e++)C.push({name:P[e],R$:"."+P[e].toLowerCase()});return C}()});return C}()},{name:[1,9],RO:!0,h:function(P,C){return{h:P!=null}}},{name:"Export Color Lookup",RO:!0,h:function(P,C){return{h:P!=null}},dP:!0},{name:[1,14],RO:!0,h:function(P,C){return{h:P!=null}},dP:!0},{name:[1,10]}],Sn:[{g:V.E.P,i:{e:V.U.n$,cU:"newproject"}},{g:V.E.P,i:{e:V.U.eR}},{g:V.E.P,i:{e:V.U.eR,a22:!0}},{sub:[{g:V.E.P,i:{e:V.U.n$,cU:"open_from_url"}},{g:V.E.P,i:{e:V.U.n$,cU:"camera"}},{g:V.E.P,i:{e:V.U.n$,cU:"templates"}}]},{sub:[{g:V.E.P,i:{e:V.U.E0,ty:"png"}},{g:V.E.P,i:{e:V.U.E0,ty:"jpg"}},{g:V.E.P,i:{e:V.U.E0,ty:"psd"}}]},{g:V.E.P,i:{e:V.U.I8}},{g:V.E.P,i:{e:V.U.e2}},{g:V.E.P,i:{e:V.U.n$,cU:"savepsb"}},{sub:function(){var P=fx.L$(0),C=[];
for(var e=0;e<P.length;e++)C.push({g:V.E.P,i:{e:V.U.n$,cU:"saveforweb",ty:e}});C.push({sub:function(){var W=fx.L$(0).length,P=fx.L$(1),C=[];
for(var e=0;e<P.length;e++)C.push({g:V.E.P,i:{e:V.U.n$,cU:"saveforweb",ty:W+e}});return C}()});return C}()},{g:V.E.P,i:{e:V.U.n$,cU:"eassets"}},{g:V.E.P,i:{e:V.U.n$,cU:"exlut"}},{g:V.E.P,i:{e:V.U.n$,cU:"finfo"}},{g:V.E.P,i:{e:V.U.n$,cU:"script"}}]},{name:[0,1],items:[{name:[2,8]},{name:[2,0],R$:[O,F,n._1]},{name:[2,1],R$:[F,n._1],dP:!0},{name:[2,11],R$:[O,F,n.wZ],dP:!0,RO:!0,h:function(P,C){return{h:d1.Bm(P)&&C.Gv!=c.KR}}},{name:[5,0],R$:[F,n.Tm]},{name:[5,1],R$:[F,n.Te]},{name:[5,7],R$:[O,F,n.Te]},{name:[5,2],R$:[F,n.zV],h:function(P,C){return{h:V.Yo()||C.SS!=null||C.Zt!=null||C.aov!=null}}},{name:[2,2],h:function(P){return{h:P!=null&&P.N!=null}},R$:"Delete",dP:!0},{name:[2,3],h:function(P){return{h:P!=null}},RO:!0,R$:[O,n.Zk]},{name:[14,9],h:function(P){return{h:P!=null}},RO:!0,dP:!0},{name:[10,48],h:function(P){return{h:P!=null&&P.f7(!1)}}},{name:[10,46],h:function(P){return{h:c.Hh.CY(P)}}},{name:[10,16],R$:[I,F,n.KJ]},{name:[2,4],sub:i3.fl()},{name:[2,10,1]},{name:[2,10,0],dP:!0},{name:[12,87],sub:[{name:[12,62],h:function(P){return{h:P!=null}}},{name:[9,3],h:function(P){return{h:P!=null}}},{name:[10,31],h:function(P){return{h:P!=null&&P.Y1()[1].length!=0}}}]},{name:[12,79],RO:!0,R$:[F,n.UA]},{name:[1,13],RO:!0}],Sn:[{g:V.E.S,T:c.dA,i:{e:"h_undoredo"}},{g:V.E.S,T:c.dA,i:{e:"h_stepfwd"}},{g:V.E.S,T:c.dA,i:{e:"h_stepbck"}},{g:V.E.P,i:{e:V.U.n$,cU:"afw_fade"}},{g:V.E.P,i:{e:V.U.gN}},{g:V.E.P,i:{e:V.U.UW}},{g:V.E.P,i:{e:V.U.UW,EO:!0}},{g:V.E.P,i:{e:V.U.yM}},{g:V.E.JA,i:{oI:"delete"}},{g:V.E.P,i:{e:V.U.n$,cU:"fill"}},{g:V.E.P,i:{e:V.U.n$,cU:"stroke"}},{g:V.E.P,i:{e:V.U.H$,T:c.hD}},{g:V.E.S,T:c.HI,i:{e:"start",qm:"rigidTransform"}},{g:V.E.P,i:{e:V.U.H$,T:c.KR}},{sub:i3.xQ()},{g:V.E.JA,i:{oI:"align",Mk:{classID:"null",null:{t:"obj ",v:[{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Trgt"}}]},Usng:{t:"enum",v:{ADSt:"ADSContent"}},alignToCanvas:{t:"bool",v:!1},Aply:{t:"enum",v:{projection:"Auto"}},vignette:{t:"bool",v:!1},radialDistort:{t:"bool",v:!1}}}},{g:V.E.S,T:c.lo,i:{e:K.GZ}},{sub:[{g:V.E.P,i:{e:V.U.te,b9:0}},{g:V.E.P,i:{e:V.U.te,b9:1}},{g:V.E.P,i:{e:V.U.te,b9:2}}]},{g:V.E.P,i:{e:V.U.n$,cU:"preferences"}},{g:V.E.P,i:{e:V.U.n$,cU:"locstor"}}]},{name:[0,2],items:[{name:[3],sub:function(){var P=[];
for(var C in dK.names){P.push({name:dK.names[C],RO:B[C]!=null,R$:u.kt(dK.keys[C]),dP:dK.jw.indexOf(C)!=-1});
if(C=="selc"){P.push({name:["VAR0/VAR1",[19,6,0],[19,6,2]],RO:!0,dP:!0});P.push({name:[19,7,0],R$:[F,O,n.bm],h:function(C){return{h:C&&C.C.length!=0&&C.t[C.C[0]].add.SoLd==null}}})}}return P}()},{name:[4,16,0],h:function(P){return{h:P!=null&&P.f7(!1)}}},{name:[4,16,1],h:function(P){return{h:P!=null&&P.f7(!1)}}},{name:[4,16,2],h:function(P){return{h:P!=null&&P.f7(!1)}},dP:!0},{name:[11,11],h:function(P){return{h:P!=null&&P.f7(!1)}},dP:!0},{name:[11,3],RO:!0,R$:[I,F,n.Te]},{name:[11,10],RO:!0,R$:[I,F,n.tx]},{name:[2,4],sub:[{name:["VAR0 90\xB0 \u21BB",[2,5]]},{name:["VAR0 90\xB0 \u21BA",[2,5]]},{name:["VAR0 180\xB0",[2,5]]},{name:[[2,6],[22,4,2]]},{name:[[2,6],[22,4,3]]}]},{name:[11,12,1],h:function(P){return{h:P!=null&&P.N!=null}}},{name:[11,12,0],h:function(P){return{h:P!=null}},R$:[F,n.Aq]},{name:[11,12,2],h:function(P){return{h:P!=null}},dP:!0},{name:[2,12],h:function(P){return{h:P!=null&&P.f7(!1)}},RO:!0}],Sn:[{sub:function(){var P=[];
for(var C in dK.names){P.push({g:V.E.S,T:c.Np,i:{e:"start",Ju:C}});if(C=="selc"){P.push({g:V.E.S,T:c.HI,i:{e:"start",qm:"adaptCorrect"}});
P.push({g:V.E.JA,i:{oI:"desaturate"}})}}return P}()},{g:V.E.JA,i:{oI:"levels",Mk:{classID:"Lvls",Auto:{t:"bool",v:!0}}}},{g:V.E.JA,i:{oI:"levels",Mk:{classID:"Lvls",AuCo:{t:"bool",v:!0}}}},{g:V.E.JA,i:{oI:"levels",Mk:{classID:"Lvls",autoBlackWhite:{t:"bool",v:!0},autoNeutrals:{t:"bool",v:!0}}}},{g:V.E.P,i:{e:V.U.n$,cU:"vbitmap"}},{g:V.E.P,i:{e:V.U.n$,cU:"csize"}},{g:V.E.P,i:{e:V.U.n$,cU:"isize"}},{sub:[{g:V.E.JA,i:c.V.Ad(!0,90)},{g:V.E.JA,i:c.V.Ad(!0,-90)},{g:V.E.JA,i:c.V.Ad(!0,-180)},{g:V.E.JA,i:c.V.Ad(!1,"Hrzn")},{g:V.E.JA,i:c.V.Ad(!1,"Vrtc")}]},{g:V.E.S,T:c.qa,i:{e:"cropbysel",a7T:0}},{g:V.E.JA,i:c.jz.dQ(0)},{g:V.E.JA,i:{oI:"revealAll",Mk:{classID:"RvlA"}}},{g:V.E.S,T:c.Np,i:{e:"start",Ju:"aply"}}]},{name:[0,3],items:[{name:[5,3],sub:[{name:[0,3]},{name:[0,4]},{name:[6,49],R$:[F,n.uV]}]},{name:[6,0],h:x,R$:[F,n.uV]},{name:[11,4],h:x},{name:[5,4],h:x,dP:!0},{name:[11,6],dP:!0,h:x,sub:cU.um(!0)},{name:[6,48,1],sub:[{name:[6,48,0,0]},{name:[6,48,0,1]},{name:[6,48,0,2]}]},{name:[6,1],dP:!0,sub:cU.i0()},{name:[6,2],sub:[{name:[6,4],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].B1()==null}}},{name:[6,5,0],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].B1()==null}}},{name:[6,5,1],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].B1()==null&&P.N!=null}}},{name:[6,5,2],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].B1()==null&&P.N!=null}}},{name:[6,5,3],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].B1()==null}},dP:!0},{name:[5,4],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].B1()!=null}}},{name:[5,8],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].B1()!=null&&P.f7(!1,!0)}}},{name:["VAR0/VAR1",[5,5],[5,6]],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].B1()!=null}}}]},{name:[6,3],sub:[{name:[6,4],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].add.vmsk==null}}},{name:[6,5,0],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].add.vmsk==null}}},{name:"Current Path",h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].add.vmsk==null}},dP:!0},{name:[5,4],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].add.vmsk!=null}}},{name:["VAR0/VAR1",[5,5],[5,6]],h:function(P){return{h:P!=null&&P.C.length!=0&&P.t[P.C[0]].add.vmsk!=null}}}]},{name:[6,6,0],R$:[I,F,n.ja],dP:!0,h:function(P){return{mN:P!=null&&P.C.length!=0&&P.t[P.C[0]].fc,h:P!=null&&P.ZP(P.C[0])}}},{name:"Smart Object",dP:!0,sub:[{name:[6,7]},{name:[6,36,4],h:r,sub:_},{name:[1,0],h:r,dP:!0},{name:"Turn into JPG"}]},{name:[6,8],h:function(P){if(P==null||P.C.length==0)return{h:!1};
var C=P.t[P.C[0]];if(C.add.TySh||C.add.SoLd||C.add.SoCo||C.add.GdFl||C.add.PtFl)return{h:!0};return{h:!1}}},{name:[6,34],dP:!0,h:function(P){if(P==null||P.C.length==0)return{h:!1};
var C=P.t[P.C[0]];return{h:C.add.lmfx!=null&&!C.Ja()}}},{name:[6,9],dP:!0,R$:[F,n.ja]},{name:[6,55],dP:!0,sub:[{name:[6,56,0],R$:[O,F,n.lA]},{name:[6,56,1],R$:[F,n.lA]},{name:[6,56,2],R$:[F,n.Ag]},{name:[6,56,3],R$:[O,F,n.Ag]}]},{name:[6,58],sub:[{name:["Make Frames"]},{name:[18,5]}]},{name:[6,10],h:function(P){return{h:P!=null&&P.C.length==1&&P.C[0]!=0&&!P.t[P.C[0]].Ja()}},R$:[F,n.E]},{name:[6,12,0],h:function(P){return{h:P!=null&&P.C.length!=0&&(P.C.length>1||P.t[P.C[0]].Ja())}}},{name:[6,12,1]}],Sn:[{sub:[{g:V.E.S,T:c.lo,i:{e:K.SP}},{g:V.E.S,T:c.lo,i:{e:K.R1}},{g:V.E.S,T:c.lo,i:{e:K.vi}}]},{g:V.E.S,T:c.lo,i:{e:K.bn}},{g:V.E.P,i:{e:V.U.n$,cU:"duplinto"}},{g:V.E.S,T:c.lo,i:{e:K.C9}},{sub:cU.Gy(!0)},{sub:[{g:V.E.S,T:c.tq,i:{e:"newfill",j5:0}},{g:V.E.JA,i:c.vb.Lz(1)},{g:V.E.JA,i:c.vb.Lz(2)}]},{sub:cU.II()},{sub:[{g:V.E.S,T:c.lo,i:{e:K.al,Lj:"RvlA"}},{g:V.E.S,T:c.lo,i:{e:K.al,Lj:"HdAl"}},{g:V.E.S,T:c.lo,i:{e:K.al,Lj:"RvlS"}},{g:V.E.S,T:c.lo,i:{e:K.al,Lj:"HdSl"}},{g:V.E.S,T:c.lo,i:{e:K.al,Lj:"Trns"}},{g:V.E.S,T:c.lo,i:{e:K.ad}},{g:V.E.S,T:c.lo,i:{e:K.v2}},{g:V.E.S,T:c.lo,i:{e:K.ub}}]},{sub:[{g:V.E.S,T:c.lo,i:{e:K.jc,abu:!1}},{g:V.E.S,T:c.lo,i:{e:K.jc,abu:!0}},{g:V.E.S,T:c.lo,i:{e:K.jc,ao4:!0}},{g:V.E.S,T:c.lo,i:{e:K.$t}},{g:V.E.S,T:c.lo,i:{e:K.r4}}]},{g:V.E.S,T:c.lo,i:{e:K.Eu}},{sub:[{g:V.E.JA,i:{oI:"newPlacedLayer"}},{sub:d},{g:V.E.JA,i:{oI:"placedLayerEditContents",Mk:{classID:"placedLayerEditContents"}}},{g:V.E.S,T:c.lo,i:{e:K.Za}}]},{g:V.E.JA,i:{oI:"rasterizeLayer",Mk:{classID:"rasterizeLayer",null:aV.hd("Lyr",!0)}}},{g:V.E.S,T:c.lo,i:{e:K.FB}},{g:V.E.S,T:c.lo,i:{e:K.dd}},{sub:[{g:V.E.S,T:c.lo,i:{e:K.qU,G1:0}},{g:V.E.S,T:c.lo,i:{e:K.qU,G1:1}},{g:V.E.S,T:c.lo,i:{e:K.qU,G1:2}},{g:V.E.S,T:c.lo,i:{e:K.qU,G1:3}}]},{sub:[{g:V.E.S,T:c.lo,i:{e:K.eO,G1:"makeframes"}},{g:V.E.S,T:c.lo,i:{e:K.eO,G1:"merge"}}]},{g:V.E.S,T:c.lo,i:{e:K.Vu}},{g:V.E.S,T:c.lo,i:{e:K.W9}},{g:V.E.JA,i:{oI:"flattenImage"}}]},ig.ais(!1),function(){var P={name:[0,6],items:[{name:[24,18,4],R$:[I,F,n.wZ],dP:!0}],Sn:[{g:V.E.S,T:c.HI,i:{e:"applylast"}}]};
for(var e=0;e<bS.__.length;e++){var C=bS.__[e];if(C.Gk!=null){P.items.push({name:bS.names[C.Gk],RO:!0,dP:C.dP});
P.Sn.push({g:V.E.S,T:c.HI,i:{e:"start",qm:C.Gk}});continue}var W={name:C.NL,sub:[]};P.items.push(W);
var v={sub:[]};P.Sn.push(v);for(var L=0;L<C.Yf.length;L++){var H={name:bS.names[C.Yf[L]],RO:bS.tc(C.Yf[L])!=null};
W.sub.push(H);var y={g:V.E.S,T:c.HI,i:{e:"start",qm:C.Yf[L]}};v.sub.push(y)}}return P}(),{name:[0,7],items:[{name:[8,0],R$:[F,n.wW]},{name:[8,1],R$:[F,n.sF]},{name:[20,3],R$:[F,n.zE]},{name:[20,2],R$:[F,n.c$],dP:!0},{name:"Extras",R$:[F,n.Rs],h:function(P,C){return{mN:C.Yt}}},{name:[8,12],dP:!0,sub:[{name:[17,2],h:function(P,C){return{h:C.Yt,mN:C.Kc.B9}}},{name:[8,9],h:function(P,C){return{h:C.Yt,mN:C.Kc.Hi}}},{name:[8,2],h:function(P,C){return{h:C.Yt,mN:C.Kc.fT}},R$:[F,n.L7]},{name:[8,4],h:function(P,C){return{h:C.Yt,mN:C.Kc.dW}},R$:[F,n.p9]},{name:[8,8],h:function(P,C){return{h:C.Yt,mN:C.Kc.cs}}},{name:[8,11,0],h:function(P,C){return{h:C.Yt,mN:C.Kc.l_}}}]},{name:[8,3],h:function(P,C){return{mN:C.K3}},R$:[F,n.Qu],dP:!0},{name:[8,5],h:function(P,C){return{mN:C.vf}}},{name:[8,6],dP:!0,sub:[{name:[8,2],h:function(P,C){return{mN:C.Ex[0]}}},{name:[8,4],h:function(P,C){return{mN:C.Ex[1]}}},{name:[9,1],h:function(P,C){return{mN:C.Ex[2]}}},{name:[8,11,0],h:function(P,C){return{mN:C.Ex[3]}}},{name:[8,7],h:function(P,C){return{mN:C.Ex[4]}}}]},{name:[11,15,0],h:function(P,C){return{h:P!=null}}},{name:[11,14],h:function(P,C){return{h:P!=null}},RO:!0},{name:[11,15,1],h:function(P,C){return{h:P!=null&&P.C.length!=0}}}],Sn:[{g:V.E.S,T:c.o8,i:{e:"zoom",Tk:!0}},{g:V.E.S,T:c.o8,i:{e:"zoom",Tk:!1}},{g:V.E.S,T:c.o8,i:{e:"adapt",G:"fitscr"}},{g:V.E.S,T:c.o8,i:{e:"adapt",G:"pixel"}},{g:V.E.P,i:{e:V.U.g7,b9:cf.oV}},{sub:[{g:V.E.P,i:{e:V.U.g7,b9:cf.nL}},{g:V.E.P,i:{e:V.U.g7,b9:cf.ms}},{g:V.E.P,i:{e:V.U.g7,b9:cf.hq}},{g:V.E.P,i:{e:V.U.g7,b9:cf.fq}},{g:V.E.P,i:{e:V.U.g7,b9:cf.rZ}},{g:V.E.P,i:{e:V.U.g7,b9:cf.sM}}]},{g:V.E.P,i:{e:V.U.g7,b9:cf.z4}},{g:V.E.P,i:{e:V.U.g7,b9:cf.q3}},{sub:[{g:V.E.P,i:{e:V.U.g7,b9:cf.Uy,cN:0}},{g:V.E.P,i:{e:V.U.g7,b9:cf.Uy,cN:1}},{g:V.E.P,i:{e:V.U.g7,b9:cf.Uy,cN:2}},{g:V.E.P,i:{e:V.U.g7,b9:cf.Uy,cN:3}},{g:V.E.P,i:{e:V.U.g7,b9:cf.Uy,cN:4}}]},{g:V.E.S,T:c.AK,i:{e:"gids",ct:[[],[]]}},{g:V.E.P,i:{e:V.U.n$,cU:"addguides"}},{g:V.E.S,T:c.AK,i:{e:"gidsFromLayer"}}]},function(){var P={name:[0,8],items:[{name:[0,14],dP:!0,sub:[]}],Sn:[{sub:[]}]};
for(var e=0;e<fp.Er.length;e++){var C=fp.Er[e];(C.y_?P.items[0].sub:P.items).push({name:C.AM.name});
(C.y_?P.Sn[0].sub:P.Sn).push({g:V.E.P,i:{e:V.U.dn,cU:C.AM.UX}})}return P}(),function(){var P={name:[0,14],items:[],Sn:[]},C={name:[0,9],sub:[]};
P.items.push(C);var W={sub:[]};P.Sn.push(W);var v=hl.a3C();for(var e=0;e<v.length;e++){var L=v[e],H=L.code,y=hl.hu(H);
C.sub.push({name:L.name,R$:H,h:function(g,Q){return{mN:this.R$==hl.p3()}}});W.sub.push({g:V.E.P,i:{e:V.U.g7,b9:cf.Qk,lang:y}})}C.sub.push({name:[0,12]});
W.sub.push({g:V.E.P,i:{e:V.U.mR,link:"https://www.photopea.com/translate/"}});var C={name:[0,15],sub:[]};
P.items.push(C);var W={sub:[]};P.Sn.push(W);for(var e=0;e<hm.mE.length;e++){C.sub.push({name:hm.mE[e].name,h:function(g,Q){return{mN:this.name==hm.mE[Q.d_].name}}});
W.sub.push({g:V.E.P,i:{e:V.U.g7,b9:cf.Oo,d_:e}})}P.items.push({name:[0,17,6],h:function(g,Q){return{h:Q.Gg!=null}}});
P.Sn.push({g:V.E.P,i:{e:V.U.v1}});P.items.push({name:[11,13]});P.Sn.push({g:V.E.P,i:{e:V.U.n$,cU:"shortcuts"}});
P.items.push({name:[0,16],h:function(g){return{mN:l.Z0,h:l.Xr}}});P.Sn.push({g:V.E.P,i:{e:V.U.f0}});
return P}()]}();function aL(){ch.call(this);this._=V.w("div","");this.ul=0;this.i5=0;this.GL=null;this.wQ=V.w("div","");
this.wQ.setAttribute("style","width:200em; height:100em; position:absolute;");this.U8=[];this.wS=[];
this.kW={}}aL.prototype=new ch;aL.prototype.jS=function(n){var F=Date.now(),O=[];if(n=="-")O=[new e0,new d7,new e$,new eN,new hP,new fO,new dv,new dw,new eZ,new b3,new bM,new dB,new iO,new dt,new cV,new cU,new b2,new cc,new bC,new dZ,new eb,new b1,new c7,new iA,new de,new iR,new g9(0),new g9(1),new e3,new ev,new hZ,new bJ,new f0,new hj,new ec,new er("border",[7,9],"px"),new er("smoothness",[19,3,0],"px"),new er("expand",[7,4],"px"),new er("contract",[7,5],"px"),new er("feather",[7,6],"px"),new gc(0,"namewindow",[12,48]),new gc(1,"cornerradius",[12,94,0],"px",!0),new gc(1,"scaleeffects","Scale Effects","%",!0),new gc(1,"doczoom","Zoom","%",!0)];
else O=[new d1(n.slice(4))];this.a5g(O);this.kW[n]=!0};aL.prototype.a5g=function(n){var F=this.GL;for(var e=0;
e<n.length;e++){var O=n[e];O.parent=this;this.wS.push(O);this.Ap(O);O.B();if(F)O.XW(F,cf.fo);O.k(V.E.hS,this.Go,this)}};
aL.prototype.Kq=function(n,F){this.ul=n;this.i5=F;for(var e=0;e<this.wS.length;e++)this.Ap(this.wS[e])};
aL.prototype.B=function(){for(var e=0;e<this.wS.length;e++)this.wS[e].B()};aL.prototype.HZ=function(){return this.U8.length==0?null:this.U8[this.U8.length-1]};
aL.prototype.A5=function(){for(var e=0;e<this.U8.length;e++)if(this.U8[e].A5())return!0;return!1};aL.prototype.ali=function(n,F,O,I,x){var r=n.startsWith("afw_"),_=null;
if(!r&&!this.kW["-"])this.jS("-");if(r&&!this.kW[n])this.jS(n);if(typeof n=="object"){_=n;if(!_.ZL(V.E.hS,this.Go))_.k(V.E.hS,this.Go,this);
_.parent=this}else for(var e=0;e<this.wS.length;e++)if(this.wS[e].id==n)_=this.wS[e];if(this.A5()&&_.A5()){alert("Finish the current action first");
return}if(!_.Tj(F))return;if(this.U8.indexOf(_)!=-1){if(n=="colorpicker")_.hV(F,O,I,x);return}var d=this.U8.length-1;
if(d>=0)V.fx(this.U8[d]._,"wdisabled");this._.appendChild(_._);this.U8.push(_);this.Ap(_);_.hV(F,O,I,x)};
aL.prototype.Ap=function(n){var F=this.ul,O=this.i5,I=n.xu(F,O),x;if(I!=null){x=I}else{I=new aE(0,0);
x=n.a8D();if(x==null){var r=this.U8.indexOf(n)+1;if(F<450||O<450)x=new aE(0,0);else x=new aE(r*150,r*150)}}n._.style.left=x.x+"px";
n._.style.top=this._.offsetTop+x.y+"px";n.Kq(this.ul-I.x*2,this.i5-I.y*2-34)};aL.prototype.XW=function(n,F){this.GL=n;
for(var e=0;e<this.wS.length;e++)this.wS[e].XW(n,F)};aL.prototype.Go=function(n){var F=this.U8.pop();
this._.removeChild(F._);var O=this.U8.length-1;if(O>=0)V.aE(this.U8[O]._,"wdisabled");if(this.wQ.parentNode==this._)this._.removeChild(this.wQ)};
window.onload=function(){var n=new hq;document.body.appendChild(n._)}}())