mirror of
https://gitflic.ru/project/photopea-v2/photopea-v-2.git
synced 2025-08-17 17:06:21 +00:00
12273 lines
1.8 MiB
12273 lines
1.8 MiB
(function(){function dc(){this.tO={};this.ZN={}}dc._G=[];dc.WQ=function($){var o=dc._G;if(o.length!=0){var T=new x(H.E.Oz);
|
|
for(var f=0;f<o.length;f++)o[f].J(T)}window.requestAnimationFrame(dc.WQ)};window.requestAnimationFrame(dc.WQ);
|
|
dc.prototype.zV=function($){var o=this.tO[$];if(o==null)return!1;return o.length>0};dc.prototype.addEventListener=function($,o){this.B($,o,null)};
|
|
dc.prototype.B=function($,o,T){if(this.tO[$]==null){this.tO[$]=[];this.ZN[$]=[]}this.tO[$].push(o);this.ZN[$].push(T);
|
|
if($==H.E.Oz){var s=dc._G;if(s.indexOf(this)==-1)s.push(this)}};dc.prototype.removeEventListener=function($,o){var T=this.tO[$];
|
|
if(T==null)return;var s=T.indexOf(o);if(s<0)return;var E=this.ZN[$];T.splice(s,1);E.splice(s,1);if($==H.E.Oz&&T.length==0){var e=dc._G;
|
|
e.splice(e.indexOf(this),1)}};dc.prototype.J=function($){$.currentTarget=this;if($.target==null)$.target=this;
|
|
var o=this.tO[$.type];if(o==null)return;var T=this.ZN[$.type];for(var f=0;f<o.length;f++){if(T[f]==null)o[f]($);
|
|
else o[f].call(T[f],$)}};function dN(){this.pz={};this.tq=0;this.X6();window.__kb=this}dN.pp=null;dN.prototype.X6=function(){var $=navigator.keyboard;
|
|
if($&&window.top==window.self)$.getLayoutMap().then(function(o){dN.pp=o})};dN.prototype.a89=function($){var o={shiftKey:dN.Et,altKey:dN.BJ,ctrlKey:dN.I6};
|
|
for(var T in o){var s=$[T],E=o[T],e=this.L(E);if(!s&&e){for(var f=0;f<E.AF.length;f++)this.NW(E.AF[f])}}};
|
|
dN.prototype.reset=function(){this.pz={};this.tq=0};dN.prototype.ao=function($){this.tq++;this.pz[$]=!0};
|
|
dN.prototype.NW=function($){this.tq--;delete this.pz[$];if(this.tq<=0||dN.AL($,dN.E1))this.reset()};
|
|
dN.prototype.L=function($){for(var f=0;f<$.AF.length;f++)if(this.pz[$.AF[f]])return!0;return!1};dN.prototype.cu=function(){var $=this,o=$.L(dN.Et)?10:1,T=0,s=0;
|
|
if($.L(dN.jo))T=-o;if($.L(dN.$D))T=o;if($.L(dN.du))s=-o;if($.L(dN.ZQ))s=o;return new aY(T,s)};dN.prototype.w3=function(){var $=this,o=dN.__;
|
|
for(var f=0;f<10;f++)if($.L(o[f]))return f;return-1};dN.AL=function($,o){return o.AF.indexOf($)!=-1};
|
|
dN.ED=function($){var o=$.code,E=!1;if(o=="")return!1;var T=dN.AL,s=dN.__.concat([dN.AZ,dN.Dd,dN.Q7,dN.tQ]);
|
|
for(var f=0;f<s.length;f++)if(T(o,s[f]))E=!0;if($.altKey&&!$.shiftKey&&!$.ctrlKey&&E)return!1;return dN.MS.indexOf(o)==-1||$.shiftKey&&(o=="F5"||o=="F6")};
|
|
dN.acD=function($){var o=$.code;return o!=""&&(dN.MS.indexOf(o)==-1||$.shiftKey&&(o=="F5"||o=="F6"))};
|
|
dN.fO=function($){if(typeof $=="string")return $;var o=navigator.platform.toUpperCase().indexOf("MAC")>=0;
|
|
if($==null)return"";var T=[];for(var f=0;f<$.length;f++){var s=$[f].Q0?$[f].Q0:$[f];if(o&&$[f].tw)s=$[f].tw;
|
|
T.push(s)}if(o||T.length==1)return T.join(" + ");else{var E=T.pop();return T.join("+")+" + "+E}};dN.MS="ZoomToggle BrightnessDown BrightnessUp AudioVolumeMute AudioVolumeDown AudioVolumeUp LaunchApplication1 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Enter Shift Escape KeyV".split(" ");
|
|
dN.jd=function($){var o=$.code,T=dN.pp;if(T&&T.get(o)){var s={"+":"NumpadAdd","-":"NumpadSubtract",".":"Period"},E=T.get(o).toLowerCase(),e=E.charCodeAt(0);
|
|
if(97<=e&&e<=122){var n="Key"+E.toUpperCase();o=n}else if(s[E])o=s[E];return o}var s={"+":"NumpadAdd","-":"NumpadSubtract",".":"Period"},E=$.key.toLowerCase(),e=E.charCodeAt(0);
|
|
if(E.length==1){if(97<=e&&e<=122){var n="Key"+E.toUpperCase();o=n}else if(s[E])o=s[E]}if(E=="control"&&o!="")o="ControlLeft";
|
|
return o};dN.ao0={nm:"No Touch",AF:["NoTouch"]};dN.FT={Q0:"Enter",AF:["Enter","NumpadEnter"]};dN.Et={Q0:"Shift",tw:"\u21E7",AF:["ShiftLeft","ShiftRight"]};
|
|
dN.E1={Q0:"Meta",AF:["MetaLeft","MetaRight","OSLeft","OSRight"]};dN.I6={Q0:"Ctrl",tw:"\u2318",AF:"ControlLeft ControlRight MetaLeft MetaRight OSLeft OSRight".split(" ")};
|
|
dN.BJ={Q0:"Alt",tw:"\u2325",AF:["AltLeft","AltRight"]};dN.aiP={Q0:"CtrlOrAlt",AF:dN.I6.AF.concat(dN.BJ.AF)};
|
|
dN.R5={Q0:"Escape",AF:["Escape"]};dN.Gv={Q0:"Space",AF:["Space"]};dN.E0={Q0:"Tab",AF:["Tab"]};dN.aev={Q0:"Home",AF:["Home"]};
|
|
dN.ajc={Q0:"End",AF:["End"]};dN.jo={Q0:"Left",AF:["ArrowLeft"]};dN.du={Q0:"Up",AF:["ArrowUp"]};dN.$D={Q0:"Right",AF:["ArrowRight"]};
|
|
dN.ZQ={Q0:"Down",AF:["ArrowDown"]};dN.AZ={Q0:"+",AF:["NumpadAdd","Equal"]};dN.Dd={Q0:"-",AF:["NumpadSubtract","Minus","Slash"]};
|
|
dN.VQ={Q0:";",AF:["Semicolon"]};dN.acv={Q0:"Dead",AF:["Dead"]};dN.an$={Q0:"=",AF:["Equal"]};dN.Ln={Q0:"Backspace",AF:["Backspace"]};
|
|
dN.sV={Q0:"Delete",AF:["Delete"]};dN.a8Z={Q0:"Backslash",AF:["Backslash","IntlBackslash"]};dN.a3r={Q0:"Backquote",AF:["Backquote"]};
|
|
dN.Q7={Q0:"[",AF:["BracketLeft"]};dN.tQ={Q0:"]",AF:["BracketRight"]};dN.ej={Q0:".",AF:["Period"]};dN.a8o={Q0:",",AF:["Comma"]};
|
|
dN.eQ={Q0:"'",AF:["Quote"]};dN.V={Q0:"A",AF:["KeyA"]};dN.Ql={Q0:"B",AF:["KeyB"]};dN.Wd={Q0:"C",AF:["KeyC"]};
|
|
dN.XQ={Q0:"D",AF:["KeyD"]};dN.E={Q0:"E",AF:["KeyE"]};dN.AE={Q0:"F",AF:["KeyF"]};dN.Vr={Q0:"G",AF:["KeyG"]};
|
|
dN.O6={Q0:"H",AF:["KeyH"]};dN.xD={Q0:"I",AF:["KeyI"]};dN.Kb={Q0:"J",AF:["KeyJ"]};dN.BL={Q0:"K",AF:["KeyK"]};
|
|
dN.vA={Q0:"L",AF:["KeyL"]};dN.nb={Q0:"M",AF:["KeyM"]};dN.ve={Q0:"N",AF:["KeyN"]};dN.q7={Q0:"O",AF:["KeyO"]};
|
|
dN.AW={Q0:"P",AF:["KeyP"]};dN.Q$={Q0:"Q",AF:["KeyQ"]};dN._4={Q0:"R",AF:["KeyR"]};dN.I2={Q0:"S",AF:["KeyS"]};
|
|
dN.B4={Q0:"T",AF:["KeyT"]};dN.D5={Q0:"U",AF:["KeyU"]};dN.z1={Q0:"V",AF:["KeyV"]};dN.agV={Q0:"W",AF:["KeyW"]};
|
|
dN.Ib={Q0:"X",AF:["KeyX"]};dN.a1q={Q0:"Y",AF:["KeyY"]};dN.Oa={Q0:"Z",AF:["KeyZ"]};dN.MN={Q0:"0",AF:["Numpad0","Digit0"]};
|
|
dN.yL={Q0:"1",AF:["Numpad1","Digit1"]};dN.aaM={Q0:"2",AF:["Numpad2","Digit2"]};dN.a7Z={Q0:"3",AF:["Numpad3","Digit3"]};
|
|
dN.aa4={Q0:"4",AF:["Numpad4","Digit4"]};dN.a0I={Q0:"5",AF:["Numpad5","Digit5"]};dN.a51={Q0:"6",AF:["Numpad6","Digit6"]};
|
|
dN.an4={Q0:"7",AF:["Numpad7","Digit7"]};dN.ace={Q0:"8",AF:["Numpad8","Digit8"]};dN.a02={Q0:"9",AF:["Numpad9","Digit9"]};
|
|
dN.__=[dN.MN,dN.yL,dN.aaM,dN.a7Z,dN.aa4,dN.a0I,dN.a51,dN.an4,dN.ace,dN.a02];dN.a6S={Q0:"F1",AF:["F1"]};
|
|
dN.abB={Q0:"F2",AF:["F2"]};dN.afX={Q0:"F3",AF:["F3"]};dN.a5o={Q0:"FF",AF:["F4"]};dN.mf={Q0:"F5",AF:["F5"]};
|
|
dN.ar0={Q0:"F6",AF:["F6"]};dN.a9q={Q0:"F7",AF:["F7"]};dN.a9d={Q0:"F8",AF:["F8"]};dN.ap4={Q0:"F9",AF:["F9"]};
|
|
dN.a9e={Q0:"F10",AF:["F10"]};dN.aiH={Q0:"F11",AF:["F11"]};dN.alW={Q0:"F12",AF:["F12"]};function hx(){dc.call(this);
|
|
this.j4={};this.lo={};this.aa1=0;this.akN={};this.Mh=[];this.anF=0;hx.CJ=this}hx.prototype=new dc;hx.a6P=function($,o){var f=0,T=hx.lg;
|
|
while(f<T.length){if((o>>>f&1)==1)break;f++}if(o==0||T[f][1]==""){if((o&15)!=0&&hx.NV($,[33,126])>.7)f=0;
|
|
else if(o==0)f=0;else{f=0}}return T[f][1]};hx.kC=120;hx.q0=20;hx.cols=16;hx.yX=function($){var o=$.name.postScriptName;
|
|
if(o==null)return null;return o.replace(/ /g,"-")};hx.qV=function($){var o=$.name,T=o.typoFamilyName?o.typoFamilyName:o.fontFamily,s=o.typoSubfamilyName?o.typoSubfamilyName:o.fontSubfamily,E=hx.al4,e=T.toLowerCase();
|
|
for(var f=0;f<E.length;f++){if(E[f]=="roman")continue;if(e.endsWith(" "+E[f])||e.endsWith("-"+E[f])){var n=T.length-E[f].length,A=T.slice(n);
|
|
T=T.slice(0,n-1);if(A!=""){if(s=="Regular"||s==T+" Regular")s=A;else s=A+" "+s}break}}var u="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 f=0;f<u.length;f++)if(T.startsWith(u[f])){var A=T.slice(u[f].length);T=u[f];if(A.startsWith(" ")||A.startsWith("-"))A=A.slice(1);
|
|
if(A!=""){if(s=="Regular")s=A;else s=A+" "+s}break}var Y={"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"},b=Y[hx.yX($)];
|
|
if(b)s=b;return[T,s]};hx.prototype.aqT=function($){var o=this.ts();for(var T in o)if(o[T][0]==$)this.sU(T)};
|
|
hx.prototype.sU=function($,o){if(this.j4[$])return this.j4[$];if(this.lo[$])return null;var T=null,s=this.ts();
|
|
if(s[$]!=null)T=s[$][5];if(T==null){var E=hx.a4F[$];if(E==null){var e="DejaVuSans DejaVuSans-Bold DejaVuSans-Oblique DejaVuSans-BoldOblique DejaVuSerif DejaVuSerif-Bold DejaVuSerif-Italic DejaVuSerif-BoldItalic".split(" "),n=$.toLowerCase(),A=0;
|
|
if(n.indexOf("sans")!=-1)A=0;else if(n.indexOf("serif")!=-1)A=4;var u=n.indexOf("bold")!=-1||n.indexOf("-black")!=-1,Y=n.indexOf("italic")!=-1||n.indexOf("oblique")!=-1||n.endsWith("-it");
|
|
if(u&&Y)A+=3;else if(Y)A+=2;else if(u)A+=1;E=e[A]}if(o!=null&&o>128)E=this.Dl(o,E);if(this.akN[$]==null){this.akN[$]=1;
|
|
var b=Date.now()-this.aa1>2e3?2e3:0;this.aa1=Date.now();alert($+" \u27A1 "+E,b)}return this.sU(E,o)}this.lo[$]="a";
|
|
var a=new x(H.E.Q,!0);a.data={e:H.V.ZP,M9:{url:"rsrc/fonts/"+T}};this.J(a)};hx.prototype.Dl=function($,o,T){var s=this.j4[o];
|
|
if(s&&Typr.U.codeToGlyph(s,$)!=0)return o;var E=this.ts(),e=hx.a27($),n=e[0];if(E[o]&&(E[o][3]&n)==0){if(T)for(var f=0;
|
|
f<T.length;f++){var A=T[f].Name,u=E[A];if(u&&(u[3]&n)!=0)return A}var A=hx.lg[e[1]][4];if(E[A])return A}return o};
|
|
hx.a27=function($){var o=hx.lg,T=[0];for(var f=0;f<o.length;f++){var s=o[f][2];for(var E=0;E<s.length;
|
|
E+=2)if(s[E]<=$&&$<=s[E+1]){T[0]+=1<<f;T.push(f)}}if(T.length==1)T.push(0);return T};hx.prototype.ac$=function(){var $=this.Mh,o=$[0],T=$.length-1;
|
|
alert(aX.get([22,6,0])+" "+o+(T==0?"":", ... ("+T+")")+" "+aX.get([23,0])+".",1500);this.Mh=[]};hx.prototype.a0$=function($,o){if(o!=!0){this.Mh.push($.name.fullName);
|
|
clearTimeout(this.anF);this.anF=setTimeout(this.ac$.bind(this),300)}var T=hx.yX($),s=this.ts(),E=s[T],e=hx.ale($);
|
|
if(E==null){var n=document.createElement("canvas"),A=n.getContext("2d");n.width=hx.kC;n.height=hx.q0;
|
|
var u=hx.q0*1.2/$.head.unitsPerEm;A.translate(4,hx.q0*.9);A.scale(u,-u);A.fillStyle="#000000";var Y=Typr.U.shape($,hx.a6P($,e[3]),!0);
|
|
Typr.U.pathToContext(Typr.U.shapeToPath($,Y),A);A.fill();e.a5z=n.toDataURL();this.mr(e)}delete this.lo[T];
|
|
this.j4[T]=$};hx.abE=function(){var $=hx.lg,o=[];for(var f=0;f<$.length;f++)o.push($[f][0]);return o};
|
|
hx.lg=[["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,12593,12686],.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"],["Emoji","",[9728,10095,127744,129535],.01,"DejaVuSans"]];
|
|
hx.ale=function($,o,T){var s=$.name,u=0;if(hx.yX($)==null){console.log($);throw"No postScriptName!"}var E=hx.lg,e=[];
|
|
for(var f=0;f<E.length;f++){var n=E[f][2],A=E[f][3];e[f]=hx.NV($,n)>A?1:0}for(var f=0;f<e.length;f++)u+=e[f]<<f;
|
|
var Y=hx.qV($);return[Y[0],Y[1],hx.yX($),u,T,o]};hx.NV=function($,o){var T=0,s=0;for(var E=0;E<o.length;
|
|
E+=2){for(var e=o[E];e<=o[E+1];e++){var n=Typr.U.codeToGlyph($,e);if(n==0)s++;else T++}}return T/(T+s)};
|
|
hx.aqt=function($,o){if($[2]<o[2])return-1;if($[2]>o[2])return 1;return 0};hx.a3j=function($,o){if($[5]=="fs/"+$[2]+".otf")$[5]="";
|
|
else if($[5]=="gf/"+$[2]+".otf")$[5]="a";if($[2]==($[0]+"-"+$[1]).replace(/\s/g,"")){$[2]=""}else if($[2]==$[0].replace(/\s/g,"")){$[2]="a"}if(o){if($[0]==o[0])$[0]="";
|
|
if($[1]==o[1])$[1]="";if($[3]==o[3])$[3]="";if($[4]==o[4])$[4]=""}return $.join(",")};hx.aj4=function($,o){$=$.split(",");
|
|
if($[0]=="")$[0]=o[0];if($[1]=="")$[1]=o[1];if($[3]=="")$[3]=o[3];else $[3]=parseInt($[3]);if($[4]=="")$[4]=o[4];
|
|
else $[4]=parseInt($[4]);if($[2]=="")$[2]=($[0]+"-"+$[1]).replace(/\s/g,"");else if($[2]=="a")$[2]=$[0].replace(/\s/g,"");
|
|
if($[5]=="")$[5]="fs/"+$[2]+".otf";else if($[5]=="a")$[5]="gf/"+$[2]+".otf";return $};hx.a4F={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"};
|
|
hx.prototype.ts=function(){if(FNTS.map==null){var $=FNTS.list,o=[];for(var f=0;f<$.length;f++){o[f]=hx.aj4($[f],o[f-1]);
|
|
o[f].II=f;this.mr(o[f])}}return FNTS.map};hx.prototype.mr=function($){var o=$[0],T=$[1],s=$[5];if(FNTS.map==null)FNTS.map={};
|
|
FNTS.map[$[2]]=$;if(FNTS.mapFS==null)FNTS.mapFS={};var E=FNTS.mapFS[o+"---"+T];FNTS.mapFS[o+"---"+T]=$;
|
|
if(FNTS.mapSub==null)FNTS.mapSub={};var e=FNTS.mapSub[o];if(e==null)e=FNTS.mapSub[o]=[];var n=e.indexOf(T);
|
|
if(n==-1)e.push(T);else e[n]=T};hx.ar2=function($,o){return hx.h6($)-hx.h6(o)};hx.h6=function($){$=$.toLowerCase();
|
|
var o=hx.a8K($)+(hx.aex($)<<1);if($.indexOf("cond")==-1)o+=1<<25;return o};hx.a8K=function($){return $.indexOf("italic")!=-1||$.indexOf("oblique")!=-1?1:0};
|
|
hx.al4="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(",");
|
|
hx.a7j=["two","four","eight","hair","thin","ultralight","extralight","light",["regular","roman","book"],"medium",["semibold","demibold"],"bold","extrabold","heavy","ultra","black","x black"];
|
|
hx.aex=function($){var o=hx.a7j,T=-1,s=-1;for(var f=0;f<o.length;f++){var E=o[f];if(E instanceof Array)for(var e=0;
|
|
e<E.length;e++){var n=E[e];if($.indexOf(n)!=-1&&(T==-1||s<n.length)){T=f;s=n.length}}else if($.indexOf(E)!=-1&&(T==-1||s<E.length)){T=f;
|
|
s=E.length}}if(T==-1)T=8;return T};hx.mM=function($,o){var T=1e9,s=null,E=hx.h6(o);for(var f=0;f<$.length;
|
|
f++){var e=Math.abs(hx.h6($[f])-E);if(e<T){T=e;s=$[f]}}return s};hx.prototype.a8=function($,o){this.ts();
|
|
return FNTS.mapFS[$+"---"+o]};hx.prototype.lI=function($){this.ts();return FNTS.mapSub[$]};hx.prototype.ajX=function(){this.ts();
|
|
return FNTS.mapSub};var bX={JC:0,np:null,Tb:null,nj:null,vj:null,TX:null,kN:!0,t8:0,yM:!1};bX.FJ=function(){var $=H.Tj(24)?" ":"",o=H.$F[H.Xe("Uu,"+$)];
|
|
o=o[H.Xe($+"$/")];return bX.V7()!=null&&bX.V7()[H.iq("!&|'&50")]*50>o()/20};bX.Oo=function(){return bX.alF()!=null};
|
|
bX.V7=function(){return bX.TX};bX.jq=function($){window.addEventListener("message",bX.ao7,!1);setInterval(bX.xm,5e3);
|
|
if(bX.Oo()){bX.np=$;bX.rQ()}else setTimeout($,1)};bX.xm=function(){if(bX.Oo()&&bX.yM){bX.H3(bX.x1());
|
|
bX.yM=!1}};bX.G6=function($){bX.np=$;var o="https://www.photopea.com/papi/login.php?redirect="+encodeURIComponent(window.location.href);
|
|
bX.nj=window.open(o,"_blank")};bX.amm=function(){localStorage.removeItem(bX.JC+"_uid");localStorage.removeItem(bX.JC+"_provider");
|
|
localStorage.removeItem(bX.JC+"_token");bX.TX=null};bX.ao7=function($){if($.data instanceof ArrayBuffer||$.data instanceof Object)return;
|
|
if($.data.charAt(0)!="{")return;var o=JSON.parse($.data);if(o.prms==null)return;var T=o.prms.split(",");
|
|
if(T[0]=="papi_logged_in"){localStorage[bX.JC+"_uid"]=T[1];bX.q8(T[2]);localStorage[bX.JC+"_provider"]=T[3];
|
|
bX.nj.close();bX.rQ()}if(T[0]=="payment_complete"){bX.vj.close();bX.rQ()}};bX.alF=function(){var $=localStorage[bX.JC+"_token"];
|
|
if($!=null&&Date.now()*.001+10<parseInt($.split("-")[0]))return $;return null};bX.q8=function($){var o=localStorage[bX.JC+"_token"];
|
|
if(o!=null&&parseInt($.split("-")[0])<parseInt(o.split("-")[0]))return;localStorage[bX.JC+"_token"]=$;
|
|
clearTimeout(bX.t8);bX.t8=setTimeout(bX.a5H,Math.min(1e9,parseInt($.split("-")[0])*1e3-Date.now()-20*1e3))};
|
|
bX.a5H=function(){var $=new XMLHttpRequest;$.open("POST","https://www.photopea.com/papi/record_new.php",!0);
|
|
$.onload=bX.a0F;var o=bX.NR(0)+"&read=2";$.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
|
$.send(o)};bX.rQ=function(){var $=new XMLHttpRequest;$.open("POST","https://www.photopea.com/papi/record_new.php",!0);
|
|
$.onload=bX.aaS;var o=bX.NR(0)+"&read=1";$.setRequestHeader("Content-type","application/x-www-form-urlencoded");
|
|
$.send(o)};bX.H3=function($){var o=new XMLHttpRequest;o.open("POST","https://www.photopea.com/papi/record_new.php",!0);
|
|
o.onload=bX.adQ;var T=bX.NR(0)+"&read=0&score="+($.tpl?1:0)+"&spublic="+bX.kN+"&record="+encodeURIComponent(JSON.stringify($));
|
|
o.setRequestHeader("Content-type","application/x-www-form-urlencoded");o.send(T)};bX.aaS=function($){var o=JSON.parse($.target.response);
|
|
if(o.error){}else{bX.TX=o.user;var T=bX.x1(),s=o.record;if(o.record){bX.kN=o.spublic;bX.cZ(s)}else if(T)bX.H3(T)}bX.q8(o.token);
|
|
if(bX.np){bX.np();bX.np=null}if(bX.Tb){bX.Tb();bX.Tb=null}};bX.a0F=function($){var o=JSON.parse($.target.response);
|
|
bX.q8(o.token)};bX.adQ=function($){var o=JSON.parse($.target.response);bX.q8(o.token);if(bX.Tb)bX.rQ()};
|
|
bX.NR=function($){return"app="+$+"&uid="+localStorage[bX.JC+"_uid"]+"&token="+localStorage[bX.JC+"_token"]};
|
|
bX.gp=function(){return bX.x1()};bX.l5=function($,o){bX.cZ($);bX.yM=!0;if(o){bX.Tb=o;bX.xm()}};bX.x1=function(){var $=localStorage[bX.JC+"_stateLocal"],o;
|
|
if($==null)return null;try{o=JSON.parse($)}catch(aX){return null}return o};bX.cZ=function($){var o=JSON.stringify($);
|
|
localStorage[bX.JC+"_stateLocal"]=o};bX.order=function($,o,T){bX.np=T;var s="https://www.photopea.com/papi/order.php?ptype="+o+"¶m="+$+"&uid="+localStorage[bX.JC+"_uid"]+"&token="+localStorage[bX.JC+"_token"];
|
|
bX.vj=window.open(s,"_blank")};bX.alq=function($,o){bX.np=o;var T="https://www.photopea.com/papi/insertKey.php?key="+$+"&uid="+localStorage[bX.JC+"_uid"]+"&token="+localStorage[bX.JC+"_token"];
|
|
bX.vj=window.open(T,"_blank")};var aX={};aX.bX=0;aX.pW={};aX.VU=function($){var o=LNG.tables,T=o[$];
|
|
if(typeof T=="string"){T=o[$]=aX.kp(T)}return T};aX.kp=function($){var o=[],T=0,s=0,E=[],e=$.length;
|
|
while(s!=e){var n=$[s];if(n=="["){o.push(E);E=[];s=T=s+1}else if(n=="]"){E.push(T==s?null:$.substring(T,s));
|
|
var A=E;E=o.pop();E.push(A);s=T=s+1}else if(n==";"){if($[s-1]!="]")E.push(T==s?null:$.substring(T,s));
|
|
s=T=s+1}else s++}return E};aX.get=function($){if(typeof $=="string")return $;var o=typeof $[0];if(o=="number"){for(var f=1;
|
|
f<$.length;f++)if(typeof $[f]!="number"){console.log($);throw"e"}return aX.ao6($)}var T=aX.get($[0]);
|
|
for(var f=1;f<$.length;f++){var s=aX.get($[f]),E=T.indexOf("VAR"+(f-1));T=T.slice(0,E)+s+T.slice(E+4)}return T};
|
|
aX.ao6=function($){var o=JSON.stringify($);if(aX.pW[o]!=null)return aX.pW[o];var T=aX.VU(0),s=aX.VU(aX.bX),E=aX.KS($,s);
|
|
if(E==null)E=aX.KS($,T);return E};aX.KS=function($,o){for(var f=0;f<$.length;f++){o=o[$[f]];if(o==null)return null;
|
|
else if(typeof o=="string")break}return o.split("::")[0]};aX.anj=function(){var $=function(T,s){var E=T.code,e=s.code;
|
|
if(E=="en")return-1;if(e=="en")return 1;var n=navigator.languages,A=n.indexOf(E)!=-1,u=n.indexOf(e)!=-1;
|
|
if(A&&u)return E>e?1:-1;if(A)return-1;if(u)return 1;return E>e?1:-1},o=LNG.langs.slice(0);o.sort($);
|
|
return o};aX.a4A=function($){aX.bX=$};aX.Qe=function($){for(var f=0;f<LNG.langs.length;f++)if(LNG.langs[f].code==$)aX.bX=f};
|
|
aX.Hc=function(){return LNG.langs[aX.bX].code};aX.agd=function($){for(var f=0;f<$.length;f+=2)if($[f+1].indexOf(">")==-1)aX.pW[JSON.stringify($[f])]=$[f+1]};
|
|
aX.A4=function($){var o=-1,T=LNG.langs;for(var f=0;f<T.length;f++)if(T[f].code==$)o=f;return o};var aR={It:!1,iS:!1,Vw:!1};
|
|
aR.n7=function(){return H.$F[H.sC("vrt",2)]!=H.$F[H.sC("xksn",5)]};aR.wy=function(){var $=H.iq,o=H.$F[$("u#z/*%1:")],T=o[$("s#{3")],s=$("t&|{1%h2.94@I"),E=$("xy+_)%0+7@qK~<"),e=$("r$'\x7F+$f.283"),n=$("#y$)3%f.283"),A=0,u=$("$y+[145/+AC7"),Y=$("rx*\x7F+3("),b=H._M("Y_5UDDB>&\x7F");
|
|
if(H.$F[b]!=!0){A=1}var a=o[s]($("u}-"));a[u]($("zx"),Y);a[u]($("$(0&\""),$("(}{.%ZXVY<GmU@@GHL[$\" #fq7"));
|
|
T[e](a);a=o[E](Y);if(a==null){A=2}else{if(!T[$("t#%.~)19")](a)){A=3}else if(Math.round(a[$("xy+\\,51*2:6uAA@LU6LMa")]()[$("(}{.%")]-500)>5){A=4}T[n](a)}if(aR.iS)A=5;
|
|
if(aR.Vw)A=6;return A};aR.ajT=function($){var o=H.Xe("y),+1ZRU:.787=mlITWRZVgphaifg}u~!C{+,P5)2328eDPnDJ\\NhYdgbjf2q}"),T={method:"HEAD",mode:"no-cors"},s=new Request(o,T);
|
|
fetch(s).then(function(E){return E}).then(function(E){$(!1)}).catch(function(E){aR.iS=!0;console.clear();
|
|
$(!0)})};aR.a0U=function(){var $=H._K("UU[YW#ECC8"),o=H._K("VQ](RUK>@B8p71*03m}x'"),T=H._K("WQRMKT"),s=this.a8W[$][o]();
|
|
if(s[T]<4){aR.Vw=!0;this.a80(!0)}};aR.aa9=function(){var $=H.$F._cwY,o=H.$F[H.iq("$y+n&-(5>@")],T="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\\",s=String.fromCharCode(32);
|
|
$(H._M(T)+s+s+aR.wy());if(!bX.FJ())o(aR.aa9,Math.round(Math.PI*1e4))};aR.BV=function($){var o=H.iq,T=H.$F[o("u#z/*%1:")],s=o("t&|{1%h2.94@I"),E=o("$y+[145/+AC7"),e=o("%y/.`/1:.:C"),n=T[s]($[0]);
|
|
for(var A in $[1]){if(A=="txt")n[e]=$[1][A];else n[E](A,$[1][A])}return n};aR.aop=function($,o,T,s,E){H.Ft(T);
|
|
var e=H.iq,n=e("r$'\x7F+$f.283"),A=e("$y+[145/+AC7"),u=e("rx{_3%1:u5BF:F@P"),Y=e("#y'&~#("),b=e("$(0&\""),a=e("$&z"),w=e("r'0( "),X=e("%y/.`/1:.:C"),N=e("u}-"),z=H.Xe("zz*{+&"),i=H.$F[e("u#z/*%1:")],k=e("t&|{1%h2.94@I"),Q=e("$w)#-4"),O=H.Xe("z#+ 05e,0<B8"),c=H.Xe("w}*.2c,061"),B=H.Xe(" u.$%\"86<"),G=H.Xe("!#c$,&"),l=H.$F[B][G],v=H.$F[H.Xe(" u.$%\"86<")][H.Xe("}u&\"3\"+,=")].indexOf("cs")!=-1&&Math.random()<.25;
|
|
if(!aR.n7()&&!aR.wy()&&l&&$*o>300*300){var p=i[e("xy+_)%0+7@BtN,<E/ETO")](e("yyx~"))[0],P=JSON.parse(H.Xe("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 f=0;f<P.length;f++){var h=aR.BV(P[P.length-1-f]);p[O](h,p[c])}var j=H.Xe("p}&$2a(:"),C=H.Xe("'#!}i0%+"),V=H.Xe("ps,}$\"40");
|
|
H.$F.___ggo=function(){H.$F[V](u,2,function(g,S){if(!H.$F[j]){H.$F[j]=!0;var F=aR.afd.bind({RT:T,af7:E,head:p,cQ:o});
|
|
F()}})}}else{var d=[e("z!~I-0\":*8;`EFB")];if(v)d=[H.Xe("z\"~I5062W=>:")];for(var f=0;f<d.length;f++){var m=i[k](e("z!~"));
|
|
m[A](b,e("t))-,2]685=F:Jv"));m[A](a,d[f]);if(v){var R=i[k]("a");R[A](H.Xe("y'|!"),H.Xe("@C/25N4/9A?C;:iBQRvU]Sg"));
|
|
R[A](H.Xe("&u*\"#5"),H.Xe("pv${,,"));R[n](m);T[n](R)}else{m[u](e("t }("),s,!1);T[n](m)}}}};aR.c3=function($){var o=2;
|
|
if($>=3*270+30)o=3;if($>=4*270+30)o=4;return o};aR.afd=function(){var $=H.iq,o=$("r$'\x7F+$f.283"),T=$("$y+[145/+AC7"),s=$("rx{_3%1:u5BF:F@P"),E=$("#y'&~#("),e=$("$(0&\""),n=$("$&z"),A=$("r'0( "),u=$("%y/.`/1:.:C"),Y=$("u}-"),b=H.Xe("zz*{+&"),a=H.$F[$("u#z/*%1:")],w=$("t&|{1%h2.94@I"),X=$("$w)#-4"),N=H.Xe("z#+ 05e,0<B8"),z=H.Xe("w}*.2c,061"),i=JSON.parse(H.Xe("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")),k=H.$F,Q=-1,O=k[H.Xe("f#!}f")],c=H.Xe("xy'"),B=H.Xe("TU"),G=H.Xe("Vi"),m=0;
|
|
if(O&&O[c]){var l=O[c];if(l==G)Q=0;if(l==B)Q=1}var v=Q==-1?null:aR.BV(i[Q]),p=this.RT,P=this.af7,h=this.head,j=this.cQ,C=H.Xe("~u*\"'/P)9ADBCrlnR]"),V=[.1,.5,.4],d=Math.random();
|
|
while(V[m]<d&&m<V.length-1){d-=V[m];m++}if(m==0){console.log(0);if(P==1){var R=H.Xe("zxC+&086:21`9HI>rzwc$!$V>CP/l{m|ww(.#'7SZYD7IIILLTPw]a!e\\phmurryz~.HON3*>6;CODBULryxdbff]qinv7>=!|!2.%916>^edSHFYPv~'$#bbijn}8EBE"),g=R.split(","),S=a[w](b);
|
|
for(var f=0;f<g.length;f+=2)S[T](g[f+0],g[f+1]);S[T](e,$("~u)!&.P(8@CABrmnQ\\"));p[o](S);if(!aR.It){aR.It=!0;
|
|
var F=H.Xe("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"),r=a[w](X);
|
|
r[u]=F;h[o](r)}}else if(P==2){var q=aR.c3(j);if(!aR.It){aR.It=!0;var R=H.Xe("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"),g=R.split(","),F=H.Xe("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 W=0;W<q;W++){var S=a[w](b);for(var f=0;f<g.length;f+=2)S[T](g[f+0],g[f+1]);S[T](e,C);p[o](S);
|
|
var r=a[w](X);r[u]=F;p[o](r)}}}}else if(m==1){console.log(1);if(P==1){var Z=a[w](H.Xe("u}."));Z[T](e,C);
|
|
var I=a[w](H.Xe("u}."));Z[o](I);I[T](H.Xe("zx"),H.Xe("AK}|~T()V`1i9eoEGwtL##V$`0e4>@rtvMOL"));I[T](H.Xe("t!x.1"),H.Xe("pu(y~1)?).4"));
|
|
var F=H.Xe("(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"),r=a[w](X);
|
|
r[u]=F;I[o](r);p[o](Z)}else if(P==2){var q=aR.c3(j);for(var f=0;f<q;f++){var Z=a[w](H.Xe("u}."));Z[T](e,C);
|
|
var I=a[w](H.Xe("u}."));Z[o](I);I[T](H.Xe("zx"),H.Xe("rKI!#X%WV/ac9eoqDyt#~(($]_dg>A@suI|T"));I[T](H.Xe("t!x.1"),H.Xe("pu(y~1)?).4"));
|
|
var F=H.Xe("(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"),r=a[w](X);
|
|
r[u]=F;I[o](r);p[o](Z)}}if(!aR.It){aR.It=!0;var F=H.Xe("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"),r=a[w](X);
|
|
r[T](H.Xe("uu,{J$*(=F>6"),H.Xe("wu$.#"));r[u]=F;h[o](r)}}else{console.log(2);var _=a[w](X);_.setAttribute(n,H.Xe("y),+1ZRU.@8iARrqq|S~P~Wcirdixxz$@$}0M2:*77D<<LPnSNX`^bZY^mnrl\";}|%G'3"));
|
|
h[o](_);var cN=JSON.parse(H.Xe("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")),ce=[cN[0]];
|
|
if(P==2)ce=cN.slice(1,1+aR.c3(j));for(var f=0;f<ce.length;f++){var I=a[w](H._K("SU_"));I[T](H._K("XP"),ce[f]);
|
|
I[T](e,C);p[o](I)}}if(v)p[o](v)};var dI={_Z:0,qq:{expires_at:0},We:[]};dI.w2=function($){if($)dI.We.splice(0,0,$);
|
|
if(dI._Z==1)return;if(dI.qq.expires_at>Date.now()*.001+30){while(dI.We.length>0)dI.We.pop()()}else{if(dI._Z==0)dI._Z=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:dI._Z==2?!1:!0},dI.a9D)}};
|
|
dI.a9D=function($){if($&&!$.error){dI.qq=$;dI._Z=!1;dI.w2()}else if(dI._Z==1){dI._Z=2;dI.w2()}else alert("Error: "+$.error)};
|
|
dI.ji=function(){return"access_token="+dI.qq.access_token+"&token_type="+dI.qq.token_type};dI.O_=function(){return dI.qq.token_type+" "+dI.qq.access_token};
|
|
function ey(){}ey.$$=function($){var o=new Uint8Array($),T=0,s={Ou:[],A0:[],list:[]},E=t.mo(o,T);T+=2;
|
|
if(E<=2){return ey.aoS(o)}var e=t.mo(o,T);T+=2;var n=t.en(o,T,8);T+=8;var A=t.s(o,T);T+=4;if(A>0)s.Ou=ey.fx(o,T,A,e,E);
|
|
T+=A;var u=t.en(o,T,8);T+=8;var Y=t.s(o,T);T+=4;if(Y>0)s.A0=eP.B9(o,T,Y);T+=Y;var b=t.en(o,T,8);T+=8;
|
|
var a=t.s(o,T);T+=4;if(a>0){var w={};av.tl(o,w,T+4);s.list=w.Brsh.v}T+=a;var X=s.list;for(var f=0;f<X.length;
|
|
f++){a8.hl.check(X[f].v)}return s};ey.$_=function($,o){$.v.Nm.v=o};ey.aoS=function($){var o={Ou:[],A0:[],list:[]},T=0,s=t.mo($,T);
|
|
T+=2;var E=t.mo($,T);T+=2;for(var f=0;f<E;f++){var e=t.mo($,T);T+=2;var n=t.s($,T);T+=4;var A=T;if(e==2){var u={};
|
|
o.Ou.push(u);var Y=t.s($,A);A+=4;var b=t.mo($,A);A+=2;if(s==2){var a=t.rB($,A);A+=4+a.length*2+2}u.id=iG.IP()+"-d71c-11e5-b1ae-a548a96e5f9f";
|
|
A++;A+=8;u.uL=t.AS($,A);A+=16;var w=t.mo($,A);A+=2;var X=$[A];A++;var N=hV.hi(!1,w,$,u.uL.d,u.uL.w,A,X);
|
|
ey.z3(u,N);var z=a8.it(u.id),i=z.Brsh.v;i.Dmtr.v.val=u.uL.d;i.Spcn.v.val=b;o.list.push({t:"Objc",v:z})}T+=n}return o};
|
|
ey.JF=function($){var o=new bV,T=0,s=0;t.rx(o,T,6);T+=2;t.rx(o,T,2);T+=2;t.G4(o,T,"8BIMsamp");T+=8;T+=4;
|
|
s=T;T=ey.Cc(o,T,$.Ou);t.tX(o,s-4,T-s);t.G4(o,T,"8BIMpatt");T+=8;T+=4;s=T;T=eP.L_(o,T,$.A0);t.tX(o,s-4,T-s);
|
|
var E={classID:"null",Brsh:{t:"VlLs",v:$.list}};t.G4(o,T,"8BIMdesc");T+=8;T+=4;s=T;t.tX(o,T,16);T+=4;
|
|
T+=av.ob(o,E,T);t.tX(o,s-4,T-s);return o.data.slice(0,T).buffer};ey.fx=function($,o,T,s,E){var e=t.s,n=t.AS,A=o+T,u=[];
|
|
while(o<A){var Y={};u.push(Y);var b=e($,o);o+=4;var a=o,w=t.b9($,o);o+=w.length;Y.id=w.U8;if(s==1){o+=9;
|
|
Y.uL=n($,o);o+=16}else{o+=7;var X=e($,o);o+=4;Y.uL=n($,o);o+=16;var N=e($,o);o+=4;o+=N*4;var z=e($,o);
|
|
o+=4;var i=e($,o);o+=4;var k=n($,o);o+=16}var Q=t.mo($,o);o+=2;var O=$[o];o+=1;var c=hV.hi(!1,Q,$,Y.uL.d,Y.uL.w,o,O);
|
|
ey.z3(Y,c);if(b%4!=0)b+=4-b%4;o=a+b}return u};ey.z3=function($,o){var T=$.uL.clone(),s=L.G(T.Y()*4);
|
|
L.aM(o,s,3);$.i2=[s,T]};ey.Cc=function($,o,T){var s=t.tX,E=t.k6;for(var f=0;f<T.length;f++){var e=T[f],n=o+4,u=56,b=1;
|
|
o+=4;t.Fm($,o,e.id);o+=e.id.length+2;$.Y4(o,1);$.data[o]=1;o+=3;s($,o,3);o+=4;var A=o;o+=4;E($,o,e.uL);
|
|
o+=16;s($,o,u);o+=4;o+=u*4;s($,o-4,1);var Y=o;o+=4;s($,o,8);o+=4;E($,o,e.uL);o+=16;t.rx($,o,8);o+=2;
|
|
$.Y4(o,1);$.data[o]=b;o++;var a=L.G(e.uL.Y());L.Ge(e.i2[0],a,3);$.Y4(o,e.uL.Y()*2);o=hV.H$(!1,a,$.data,e.uL.d,e.uL.w,o,b);
|
|
$.Y4(o,8);o+=8;var w=o-n;s($,n-4,w);s($,A,w-49);s($,Y,w-305);if(w%4!=0)o+=4-w%4}return o};function eJ(){}eJ.$$=function($){var o=new Uint8Array($),T=[],s=0,E=t.mo(o,s);
|
|
s+=2;if(E!=4){throw"Unknown version of curves: "+E}var e=t.mo(o,s);s+=2;for(var f=0;f<e;f++){var n=eJ.EX(o,s);
|
|
s+=2+2*n.length;T.push(n)}if(s==o.length)return T;var A=t.en(o,s,4);s+=4;var u=t.mo(o,s);s+=2;var Y=t.mo(o,s);
|
|
s+=2;if(Y!=0)throw"extra curves for channels";return T};eJ.p0=function($,o,T){var s=o,E=[],e=$[o];o+=3;
|
|
var n=t.s($,o);o+=4;for(var f=0;f<4;f++){var A=n>>>f&1;if(A){if(e==0){var u=eJ.EX($,o);o+=2+2*u.length}else{var u=eJ.aiz($,o);
|
|
o+=256}E.push(u)}else E.push(e==0?[0,0,255,255]:eJ.abV())}var Y=iZ.o_("curv");for(var f=0;f<4;f++){if(e==0){var b=E[f],a=[];
|
|
for(var w=0;w<b.length;w+=2)a.push(L.sE.p7(b[w],b[w+1],!0));eJ.cI(Y,f,a)}else eJ.cI(Y,f,E[f])}return Y};
|
|
eJ.abV=function(){var $=[];for(var f=0;f<256;f++)$.push(f);return $};eJ.cI=function($,o,T){var s=cb.Oq("CrvA",o);
|
|
if(T.length<256)s.Crv={t:"VlLs",v:T};else{s.Mpng={t:"VlLs",v:[]};for(var f=0;f<256;f++)s.Mpng.v[f]={t:"long",v:T[f]}}s={t:"Objc",v:s};
|
|
var E=$.Adjs.v,e=cb.zh(E,o);if(e==-1)E.push(s);else E[e]=s};eJ.sk=function($,o){var T=$.Adjs.v,s=cb.zh(T,o);
|
|
if(s==-1){if(T.length==0||T[0].v.Crv)return[L.sE.p7(0,0,!0),L.sE.p7(255,255,!0)];var E=[];for(var f=0;
|
|
f<256;f++)E.push(f);return E}var e=T[s].v,n=e.Crv;if(n)return n.v;var E=[];for(var f=0;f<256;f++)E.push(e.Mpng.v[f].v);
|
|
return E};eJ.EX=function($,o){var T=[],s=t.mo($,o);o+=2;for(var E=0;E<s;E++){var e=t.mo($,o);o+=2;var n=t.mo($,o);
|
|
o+=2;T.push(n,e)}return T};eJ.aeL=function($,o,T){var s=T.length/2;t.rx($,o,s);o+=2;for(var E=0;E<s;
|
|
E++){t.rx($,o,T[E*2+1]);o+=2;t.rx($,o,T[E*2+0]);o+=2}};eJ.aiz=function($,o){var T=[];for(var f=0;f<256;
|
|
f++)T.push($[o+f]);return T};eJ.a7l=function($,o,T){$.Y4(o,256);for(var f=0;f<256;f++)$.data[o+f]=T[f]};
|
|
eJ.kw=function($,o,T){var s=[];for(var f=0;f<4;f++){var E=eJ.sk(T,f);if(E.length==256)s.push(E);else{var e=[];
|
|
for(var n=0;n<E.length;n++)e.push(E[n].v.Hrzn.v,E[n].v.Vrtc.v);s.push(e)}}var A=o,u=s[0].length==256?1:0;
|
|
$.Y4(o,3);$.data[o]=u;$.data[o+1]=0;$.data[o+2]=1;o+=3;t.tX($,o,15);o+=4;for(var f=0;f<4;f++){var Y=s[f];
|
|
if(u==0){eJ.aeL($,o,Y);o+=2+2*Y.length}else{eJ.a7l($,o,Y);o+=256}}return o-A};function gK(){}gK.p0=function($,o,T){var s={},E=t.mo($,o);
|
|
o+=2;s.in=$[o]==1;o++;o++;s.DC=[t.FU($,o),t.FU($,o+2),t.FU($,o+4)];o+=6;s.LP=[t.FU($,o),t.FU($,o+2),t.FU($,o+4)];
|
|
o+=6;s.aE=[];for(var f=0;f<6;f++){var e={};e.hG=[t.FU($,o),t.FU($,o+2),t.FU($,o+4),t.FU($,o+6)];o+=8;
|
|
e.Pa=[t.FU($,o),t.FU($,o+2),t.FU($,o+4)];o+=6;s.aE.push(e)}var n=iZ.o_("hue2"),A=s;if(n.Clrz==null)n.Clrz={t:"bool",v:!1};
|
|
n.Clrz.v=A.in;for(var f=0;f<7;f++){var u=f==0?A.in?A.DC:A.LP:A.aE[f-1];gK.cI(n,f,u)}return n};gK.apF=function($){return{classID:"Hst2",H:{t:"long",v:$[0]},Strt:{t:"long",v:$[1]},Lght:{t:"long",v:$[2]}}};
|
|
gK.zh=function($,o){for(var f=0;f<$.length;f++){var T=$[f].v.LclR;if(o==0&&T==null||T!=null&&T.v==o)return f}return-1};
|
|
gK.cI=function($,o,T){var s=o==0?T:T.Pa,E=gK.apF(s);if(o!=0){var e=T.hG;E.LclR={t:"long",v:o},E.BgnR={t:"long",v:e[0]};
|
|
E.BgnS={t:"long",v:e[1]};E.EndS={t:"long",v:e[2]};E.EndR={t:"long",v:e[3]}}E={t:"Objc",v:E};var n=$.Adjs.v,A=gK.zh(n,o);
|
|
if(A==-1)n.push(E);else n[A]=E};gK.sk=function($,o){var T=$.Adjs.v,s=gK.zh(T,o);if(s==-1){if(o==0)return[0,0,0];
|
|
else return[{hG:[315,345,15,45],Pa:[0,0,0]},{hG:[15,45,75,105],Pa:[0,0,0]},{hG:[75,105,135,165],Pa:[0,0,0]},{hG:[135,165,195,225],Pa:[0,0,0]},{hG:[195,225,255,285],Pa:[0,0,0]},{hG:[255,285,315,345],Pa:[0,0,0]}][o-1]}var E=T[s].v,e=[E.H.v,E.Strt.v,E.Lght.v];
|
|
if(o==0)return e;return{Pa:e,hG:[E.BgnR.v,E.BgnS.v,E.EndS.v,E.EndR.v]}};gK.kw=function($,o,T){var s={in:T.Clrz.v,aE:[]};
|
|
s.DC=s.LP=gK.sk(T,0);for(var f=1;f<7;f++)s.aE.push(gK.sk(T,f));var E=2+2+12+6*14,e=$.data;$.Y4(o,E);
|
|
t.mS(e,o,2);o+=2;e[o]=s.in?1:0;o++;o++;t.Gn(e,o+0,s.DC[0]);t.Gn(e,o+2,s.DC[1]);t.Gn(e,o+4,s.DC[2]);o+=6;
|
|
t.Gn(e,o+0,s.LP[0]);t.Gn(e,o+2,s.LP[1]);t.Gn(e,o+4,s.LP[2]);o+=6;for(var f=0;f<6;f++){var n=s.aE[f].hG,A=s.aE[f].Pa;
|
|
t.Gn(e,o+0,n[0]);t.Gn(e,o+2,n[1]);t.Gn(e,o+4,n[2]);t.Gn(e,o+6,n[3]);o+=8;t.Gn(e,o+0,A[0]);t.Gn(e,o+2,A[1]);
|
|
t.Gn(e,o+4,A[2]);o+=6}return E};function cb(){}cb.$$=function($){var o=new Uint8Array($),T=2,s=[];for(var f=0;
|
|
f<29;f++){var E=[];s.push(E);for(var e=0;e<5;e++)E.push(t.mo(o,T+f*10+e*2))}T+=29*10;if(T<o.length){var n=t.en(o,T,4);
|
|
T+=4;var A=t.mo(o,T);T+=2;var u=t.mo(o,T);T+=2;var Y=u-29;for(var f=0;f<Y;f++){var E=[];s.push(E);for(var e=0;
|
|
e<5;e++)E.push(t.mo(o,T+f*10+e*2))}}var b=iZ.o_("levl");for(var f=0;f<4;f++)cb.cI(b,f,s[f]);return b};
|
|
cb.Oq=function($,f){var o=["Cmps","Rd","Grn","Bl"],T={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:o[f]}}]};
|
|
return{classID:$,Chnl:T}};cb.zh=function($,o){var T={Cmps:0,Rd:1,Grn:2,Bl:3};for(var f=0;f<$.length;
|
|
f++){var s=$[f].v,E=T[s.Chnl.v[0].v.enum];if(E==o)return f}return-1};cb.cI=function($,o,T){var s=cb.Oq("LvlA",o);
|
|
s.Inpt={t:"VlLs",v:[{t:"long",v:T[0]},{t:"long",v:T[1]}]};s.Otpt={t:"VlLs",v:[{t:"long",v:T[2]},{t:"long",v:T[3]}]};
|
|
s.Gmm={t:"doub",v:T[4]/100};s={t:"Objc",v:s};var E=$.Adjs.v,e=cb.zh(E,o);if(e==-1)E.push(s);else E[e]=s};
|
|
cb.sk=function($,o){var T=[0,255,0,255,100],s=$.Adjs.v,E=cb.zh(s,o);if(E==-1)return T;var e=s[E].v;if(e.Inpt){T[0]=e.Inpt.v[0].v;
|
|
T[1]=e.Inpt.v[1].v}if(e.Otpt){T[2]=e.Otpt.v[0].v;T[3]=e.Otpt.v[1].v}if(e.Gmm){T[4]=Math.round(e.Gmm.v*100)}return T};
|
|
cb.JF=function($,o){var T=[],s=0;for(var f=0;f<4;f++)T.push(cb.sk(o,f));while(T.length<29)T.push([0,255,0,255,100]);
|
|
$.Y4(0,2+10*29);t.mS($.data,s,2);s+=2;for(var f=0;f<29;f++){var E=T[f];for(var e=0;e<5;e++)t.mS($.data,s+f*10+e*2,E[e])}s+=29*10;
|
|
if(T.length==29)return s;$.Y4(s,8+10*(T.length-29));t.dt($.data,s,"Lvls");s+=4;t.mS($.data,s,3);s+=2;
|
|
t.mS($.data,s,T.length);s+=2;var n=T.length-29;for(var f=0;f<n;f++){var E=T[29+f];for(var e=0;e<5;e++)t.mS($.data,s+f*10+e*2,E[e])}s+=10*n;
|
|
return s};function ff(){}ff.$$=function($){var o=new Uint8Array($),T=2,s={Me:[],wG:[]},E=t.en(o,T,4);
|
|
T+=4;var e=t.mo(o,T);T+=2;var n=t.s(o,T);T+=4;s.Me=eP.B9(o,T,n);T+=n;var A=t.s(o,T);T+=4;for(var f=0;
|
|
f<A;f++){var u=t.s(o,T);T+=4;var Y=T,b={xz:{},h2:{}};s.wG.push(b);T+=4;T+=av.tl(o,b.xz,T);T+=4;T+=av.tl(o,b.h2,T);
|
|
T=Y+u;var a=b.h2.blendOptions,w=b.h2.Lefx;if(a&&Object.keys(a.v).length>1){}if(w){if(w.v.masterFXSwitch==null)w.v.masterFXSwitch={t:"bool",v:!0};
|
|
dm.FP(w.v)}}return s};ff.$_=function($,o){$.xz.Nm.v=o};ff.JF=function($){var o=new bV,T=0;t.rx(o,T,2);
|
|
T+=2;t.G4(o,T,"8BSL");T+=4;t.rx(o,T,3);T+=2;var s=T;T+=4;T=eP.L_(o,T,$.Me);t.tX(o,s,T-s-4);var E=$.wG.length;
|
|
t.tX(o,T,E);T+=4;for(var f=0;f<E;f++){T+=4;var e=T,n=$.wG[f];t.tX(o,T,16);T+=4;T+=av.ob(o,n.xz,T);var A=n.h2.Lefx;
|
|
if(A){n.h2.Lefx=JSON.parse(JSON.stringify(A));dm.y4(n.h2.Lefx.v)}t.tX(o,T,16);T+=4;T+=av.ob(o,n.h2,T);
|
|
if(A)n.h2.Lefx=A;t.tX(o,e-4,T-e)}return o.data.slice(0,T).buffer};function de(){}de.p0=function($,o,T){var s=t.mo($,o);
|
|
o+=2;var E={};E.vb=t.mo($,o)==1;o+=2;E.p6=[];for(var f=0;f<10;f++){var e=[];E.p6.push(e);for(var n=0;
|
|
n<4;n++)e.push(t.FU($,o+n*2));o+=8}var A=iZ.o_("selc");A.Mthd.v.CrcM=E.vb?"Absl":"Rltv";for(var f=1;
|
|
f<10;f++)de.cI(A,f-1,E.p6[f]);return A};de.gn="Rds Ylws Grns Cyns Bls Mgnt Whts Ntrl Blks".split(" ");
|
|
de.Oq=function($,f){var o=["Cmps","Rd","Grn","Bl"],T={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:o[f]}}]};
|
|
return{classID:$,Chnl:T}};de.zh=function($,o){var T=de.gn;for(var f=0;f<$.length;f++){var s=$[f].v,E=T.indexOf(s.Clrs.v.Clrs);
|
|
if(E==o)return f}return-1};de.cI=function($,o,T){var s=["Cyn","Mgnt","Ylw","Blck"],E={classID:"ClrC",Clrs:{t:"enum",v:{Clrs:de.gn[o]}}};
|
|
for(var e=0;e<4;e++)E[s[e]]={t:"UntF",v:{type:"#Prc",val:T[e]}};E={t:"Objc",v:E};var n=$.ClrC.v,A=de.zh(n,o);
|
|
if(A==-1)n.push(E);else n[A]=E};de.sk=function($,o){var T=[0,0,0,0],s=$.ClrC.v,E=de.zh(s,o);if(E==-1)return T;
|
|
var e=["Cyn","Mgnt","Ylw","Blck"];for(var f=0;f<4;f++)if(s[E].v[e[f]])T[f]=s[E].v[e[f]].v.val;return T};
|
|
de.kw=function($,o,T){var s={vb:T.Mthd.v.CrcM=="Absl",p6:[[0,0,0,0]]};for(var f=0;f<9;f++)s.p6.push(de.sk(T,f));
|
|
$.Y4(o,84);t.mS($.data,o,1);o+=2;t.mS($.data,o,s.vb?1:0);o+=2;for(var f=0;f<10;f++){var E=s.p6[f];for(var e=0;
|
|
e<4;e++)t.Gn($.data,o+e*2,E[e]);o+=8}return 84};function aS(){}aS.o_=function(){return{UK:new df(0,0,50,50),xz:"",Eq:"play",g:L.A.XG.Yz([.1,.1,.9,.5,.1,.9],0)}};
|
|
aS.$$=function($){$=new Uint8Array($);var o=0,T=[],s=Date.now(),E=t.en($,0,4);o+=4;var e=t.s($,o);o+=4;
|
|
var n=t.s($,o);o+=4;for(var f=0;f<n;f++){var A=t.rB($,o);o+=A.length*2+4+2;if((A.length&1)==0)o+=2;o=aS.HU($,o,A,T)}return T};
|
|
aS.HU=function($,o,T,s){var E=t.s($,o);o+=4;var e=t.s($,o);o+=4;var n=o,A=t.b9($,n).U8;n+=A.length+1;
|
|
var u=t.AS($,n);n+=16;var Y=aS.Dw($,n,e-(n-o)),b=L.A.k5(Y),a=L.M.L3(b),w=1/a.d,X=1/a.w;L.A.hR(Y,new fY(w,0,0,X,-a.x*w,-a.y*X));
|
|
s.push({Eq:T,xz:A,g:Y,UK:u});o+=e;return o};aS.$_=function($,o){$.Eq=o};aS.JF=function($){var o=new bV,T=0;
|
|
t.G4(o,T,"cush");T+=4;t.tX(o,T,2);T+=4;t.tX(o,T,$.length);T+=4;for(var f=0;f<$.length;f++){var s=$[f],E=s.Eq+"\0";
|
|
t.LR(o,T,E);T+=4+E.length*2;if((E.length&1)==1)T+=2;t.tX(o,T,1);T+=4;T+=4;var e=T;t.Fm(o,T,s.xz);T+=s.xz.length+1;
|
|
t.k6(o,T,s.UK);T+=16;o.Y4(T,s.g.length*26);aS.eM(o.data,T,s.g,1,1);T+=s.g.length*26;var n=T-e;if((n&3)!=0)n+=4-(n&3);
|
|
t.tX(o,e-4,n);T=e+n}return o.data.slice(0,T).buffer};aS.a6i=function($){var o=[];for(var f=0;f<$.length;
|
|
f++){var T=$[f],s=T.type,E={type:s};o.push(E);if(s==6){}else if(s==8)E.all=T.all;else if(s==0||s==3){E.length=T.length;
|
|
E.frule=T.m6;E.third=T.aq;E.prmA=T.ZO;E.prmB=T.Eg}else{E.c=[T.Wq.x,T.Wq.y,T.W.x,T.W.y,T.JL.x,T.JL.y]}}return o};
|
|
aS.ah7=function($){var o=[];for(var f=0;f<$.length;f++){var T=$[f],s=T.type,E={type:s};o.push(E);if(s==6){}else if(s==8)E.all=T.all;
|
|
else if(s==0||s==3){E.length=T.length;E.m6=T.frule;E.aq=T.third;E.ZO=T.prmA;E.Eg=T.prmB}else{var e=T.c;
|
|
E.Wq=new aY(e[0],e[1]);E.W=new aY(e[2],e[3]);E.JL=new aY(e[4],e[5])}}return o};aS.Dw=function($,o,T,s,E){if(s==null)s=1;
|
|
if(E==null)E=1;function e(z,i,k){var Q=t.a3R(z,i)*k,O=Math.round(Q);return Math.abs(Q-O)<1e-6?O:Q}var n=t.FU,A=[],u=Math.floor(T/26);
|
|
for(var f=0;f<u;f++){var Y=o+f*26,b={},a=0;A.push(b);b.type=n($,Y);Y+=2;if(b.type==6){a=24}if(b.type==8){b.all=n($,Y);
|
|
Y+=2;a=22}if(b.type==0||b.type==3){b.length=n($,Y);Y+=2;b.m6=n($,Y);Y+=2;b.aq=n($,Y);Y+=2;b.ZO=t.s($,Y);
|
|
Y+=4;b.Eg=t.s($,Y);Y+=4;a=10}if(b.type==1||b.type==2||b.type==4||b.type==5){var w,X;X=e($,Y,E);Y+=4;
|
|
w=e($,Y,s);Y+=4;b.Wq=new aY(w,X);X=e($,Y,E);Y+=4;w=e($,Y,s);Y+=4;b.W=new aY(w,X);X=e($,Y,E);Y+=4;w=e($,Y,s);
|
|
Y+=4;b.JL=new aY(w,X);a=0}for(var N=0;N<a;N++)if($[Y+N]!=0){console.log("Unexpected non-zero byte!",b,N,$[Y+N])}}return A};
|
|
aS.eM=function($,o,T,s,E){var e=t.Gn,n=t.bP,A=T.length;for(var f=0;f<A;f++){var u=o+f*26,Y=T[f];e($,u,Y.type);
|
|
u+=2;if(Y.type==6){}if(Y.type==8)e($,u,Y.all);if(Y.type==0||Y.type==3){e($,u,Y.length);u+=2;e($,u,Y.m6);
|
|
u+=2;e($,u,Y.aq);u+=2}if(Y.type==1||Y.type==2||Y.type==4||Y.type==5){n($,u,Y.Wq.y/E);u+=4;n($,u,Y.Wq.x/s);
|
|
u+=4;n($,u,Y.W.y/E);u+=4;n($,u,Y.W.x/s);u+=4;n($,u,Y.JL.y/E);u+=4;n($,u,Y.JL.x/s);u+=4}}};function bf(){}bf.$$=function($){var o=new Uint8Array($),T=[],s=0;
|
|
s=bf.Cn(o,s,T);if(s+3<o.length){T=[];s=bf.Cn(o,s,T)}return T};bf.Cn=function($,o,T){var s=t.mo,E=t.FU,e=s($,o);
|
|
o+=2;var n=s($,o);o+=2;for(var f=0;f<n;f++){var A=bf.So($,o);o+=10;if(e==2){A.W7=t.rB($,o);o+=4+A.W7.length*2+2}T.push(A)}return o};
|
|
bf.So=function($,o){var T=t.mo,s=t.FU,E=T($,o),X=null;o+=2;var e=T($,o);o+=2;var n=T($,o);o+=2;var A=T($,o);
|
|
o+=2;var u=T($,o);o+=2;var Y=1/65535,b=255/65535,a=100/65535,w=255/1e4;if(E==0)X={i:e*b,m:n*b,P:A*b};
|
|
else if(E==1){X=L.ag(e*Y,n*Y,A*Y);X.i*=255;X.m*=255;X.P*=255}else if(E==2)X=L.h.Qc({classID:"CMYC",Cyn:{t:"doub",v:100-e*a},Mgnt:{t:"doub",v:100-n*a},Ylw:{t:"doub",v:100-A*a},Blck:{t:"doub",v:100-u*a}});
|
|
else if(E==7){var N=L.u3(e/100,s($,o-6)/100,s($,o-4)/100);X=N}else if(E==8){X={i:255-e*w,m:255-n*w,P:255-A*w}}else throw"e "+E+", ";
|
|
return X};bf.JF=function($){var o=new bV,T=0,s=t.rx;s(o,T,2);T+=2;s(o,T,$.length);T+=2;for(var f=0;f<$.length;
|
|
f++){var E=$[f];o.Y4(T,10);bf.xr(o.data,T,E);T+=10;var e=(E.W7?E.W7:"")+"\0";t.LR(o,T,e);T+=4+e.length*2}return o.data.slice(0,T).buffer};
|
|
bf.$_=function($,o){$.W7=o};bf.xr=function($,o,T){var s=65535/255,E=t.mS;E($,o,0);E($,o+2,Math.round(T.i*s));
|
|
E($,o+4,Math.round(T.m*s));E($,o+6,Math.round(T.P*s));E($,o+8,0)};function gg(){}gg.$$=function($){var o=new Uint8Array($),T=4,s={};
|
|
s.U1=t.rB(o,T);T+=4+s.U1.length*2+2;s.exp=o[T++]==1;s.Vi=[];var E=t.s(o,T);T+=4;for(var f=0;f<E;f++){var e={};
|
|
s.Vi.push(e);e.II=t.mo(o,T);T+=2;e.shift=o[T++]==1;e.an7=o[T++]==1;e.color=t.mo(o,T);T+=2;e.U1=t.rB(o,T);
|
|
T+=4+e.U1.length*2+2;e.exp=o[T++]==1;e.Vi=[];var n=t.s(o,T);T+=4;for(var A=0;A<n;A++){var u={};e.Vi.push(u);
|
|
u.exp=o[T++]==1;u.b=o[T++]==1;u.alV=o[T++]==1;u.ai2=o[T++];var Y=t.en(o,T,4);T+=4;if(Y=="TEXT"){u.Wk=gg.Js(o,T);
|
|
T+=4+u.Wk.length}else if(Y=="long"){u.Wk=t.en(o,T,4);T+=4}else throw"e";u.Z0=gg.Js(o,T);T+=4+u.Z0.length;
|
|
var b=t.Cv(o,T);T+=4;if(b==-1){u.bI={};var a=av.tl(o,u.bI,T);T+=a}}}console.log(s);var w=new Uint8Array(gg.JF(s));
|
|
for(var f=0;f<w.length;f++)if(w[f]!=o[f]){console.log(o.length,w.length);var X=4*(f>>>2)-16;console.log(t.i8(o,X,64));
|
|
console.log(t.i8(w,X,64));console.log(o.slice(X,X+64));console.log(w.slice(X,X+64));throw f}return[s]};
|
|
gg.Js=function($,o){var T=t.s($,o);return t.en($,o+4,T)};gg.Se=function($,o,T){t.tX($,o,T.length);t.G4($,o+4,T)};
|
|
gg.JF=function($){var o=new bV,T=0;t.tX(o,T,16);T+=4;t.LR(o,T,$.U1+"\0");T+=4+$.U1.length*2+2;o.Y4(T,1);
|
|
o.data[T++]=$.exp?1:0;var s=$.Vi.length;t.tX(o,T,s);T+=4;for(var f=0;f<s;f++){var E=$.Vi[f];t.rx(o,T,E.II);
|
|
T+=2;o.Y4(T,2);o.data[T++]=E.shift?1:0;o.data[T++]=E.an7?1:0;t.rx(o,T,E.color);T+=2;t.LR(o,T,E.U1+"\0");
|
|
T+=4+E.U1.length*2+2;o.Y4(T,1);o.data[T++]=E.exp?1:0;var e=E.Vi.length;t.tX(o,T,e);T+=4;for(var n=0;
|
|
n<e;n++){var A=E.Vi[n];o.Y4(T,4);o.data[T++]=A.exp?1:0;o.data[T++]=A.b?1:0;o.data[T++]=A.alV?1:0;o.data[T++]=A.ai2;
|
|
var u="LqFy Avrg GEfc PbPl Fbrs Bokh LnCr".split(" ").indexOf(A.Wk)!=-1;t.G4(o,T,u?"long":"TEXT");T+=4;
|
|
if(!u){gg.Se(o,T,A.Wk);T+=4+A.Wk.length}else{t.G4(o,T,A.Wk);T+=4}gg.Se(o,T,A.Z0);T+=4+A.Z0.length;t.rV(o,T,A.bI?-1:0);
|
|
T+=4;if(A.bI){var Y=av.ob(o,A.bI,T);T+=Y}}}return o.data.slice(0,T).buffer};function iT(){}iT.$$=function($){var o=new Uint8Array($),T=0,s=t.s(o,T),u;
|
|
T+=4;var E=t.en(o,T,8);T+=8;var e=t.cX(o,T);T+=4;var n=t.cX(o,T);T+=4;var A=t.cX(o,T);T+=4;if(s==2){u=new Float32Array($,32,$.byteLength-32>>>2)}else if(s==3||s==4){u=new Float32Array(n*A*2);
|
|
var Y=0,b=0,a=!0;T=s==3?32:16+8+40;while(T<o.length){var w=t.cX(o,T);T+=4;if(a)b+=w;else{for(var f=0;
|
|
f<w;f++){u[Y+b+f<<1]=t.Fe(o,T);u[(Y+b+f<<1)+1]=t.Fe(o,T+4);T+=8}b+=w}a=!a;if(w!=0&&b==n){Y+=n;b=0;a=!0;
|
|
if(Y==n*A)break}}}else throw"unknown Mesh version: "+s;return{N0:n,cQ:A,map:u}};iT._i=function($){var o=$.N0,T=$.cQ,s=$.map,E=new Uint8Array(32+T*o*8+T*8),e=0,n=0;
|
|
t.gG(E,e,3);e+=4;t.dt(E,e,"yfqLhseM");e+=8;t.zU(E,e,2);e+=4;t.zU(E,e,o);e+=4;t.zU(E,e,T);e+=4;t.zU(E,e,0);
|
|
e+=4;t.zU(E,e,1);e+=4;for(var A=0;A<T;A++){t.zU(E,e,0);e+=4;t.zU(E,e,o);e+=4;for(var u=0;u<o;u++){t.AU(E,e,s[n]);
|
|
t.AU(E,e+4,s[n+1]);n+=2;e+=8}}return E.buffer};function bs(){}bs.$$=function($){var o=new Uint8Array($),T=0,s=t.en(o,T,4);
|
|
T+=4;var E=t.mo(o,T);T+=2;var e=t.s(o,T);T+=4;var n=[];for(var f=0;f<e;f++){var A=t.s(o,T);T+=4;var u={classID:"ShpC",Nm:{t:"TEXT",v:""},Crv:{t:"VlLs",v:[]}};
|
|
n.push(u);var Y=t.rB(o,T);u.Nm.v=Y;T+=4+Y.length*2+2;var b=t.mo(o,T);T+=2;var a=t.mo(o,T);T+=2;for(var w=0;
|
|
w<a;w++){var X=L.sE.p7(0,0,!0);X.v.Vrtc.v=t.mo(o,T);T+=2;X.v.Hrzn.v=t.mo(o,T);T+=2;u.Crv.v.push(X)}if(A==1){}else if(A==2){for(var w=0;
|
|
w<a;w++){u.Crv.v[w].v.Cnty.v=o[T]==1;T+=1}}else throw"error";var N=t.s(o,T);T+=4;var z=t.s(o,T);T+=4}return n};
|
|
bs.$_=function($,o){$.Nm.v=o};bs.JF=function($){var o=new bV,T=0;t.G4(o,T,"8BFS");T+=4;t.rx(o,T,1);T+=2;
|
|
t.tX(o,T,$.length);T+=4;for(var f=0;f<$.length;f++){t.tX(o,T,2);T+=4;var s=$[f];t.LR(o,T,s.Nm.v+"\0");
|
|
T+=4+s.Nm.v.length*2+2;t.rx(o,T,2);T+=2;var E=s.Crv.v.length;t.rx(o,T,E);T+=2;for(var e=0;e<E;e++){var n=s.Crv.v[e];
|
|
t.rx(o,T,n.v.Vrtc.v);T+=2;t.rx(o,T,n.v.Hrzn.v);T+=2}o.Y4(T,E);for(var e=0;e<E;e++){o.data[T]=s.Crv.v[e].v.Cnty.v;
|
|
T++}t.tX(o,T,0);T+=4;t.tX(o,T,0);T+=4}return o.data.slice(0,T).buffer};function eP(){}eP.$$=function($){var o=new Uint8Array($),T=4,s=t.mo(o,T);
|
|
T+=2;var E=t.s(o,T);T+=4;var e=[];for(var f=0;f<E;f++){var n={};e.push(n);T=eP.tn(o,T,n)}return e};eP.$_=function($,o){$.name=o};
|
|
eP.JF=function($){var o=new bV,T=0;t.G4(o,T,"8BPT");T+=4;t.rx(o,T,1);T+=2;t.tX(o,T,$.length);T+=4;for(var f=0;
|
|
f<$.length;f++){T=eP.QW(o,T,$[f])}return o.data.slice(0,T).buffer};eP.B9=function($,o,T){var s=o+T,E=[];
|
|
while(o<s){var e={},n=t.s($,o);o+=4;var A=o;o=eP.tn($,o,e);if(!e.i2[1].p4())E.push(e);if(n%4!=0)n+=4-n%4;
|
|
o=A+n}return E};eP.L_=function($,o,T){for(var f=0;f<T.length;f++){var s=T[f];o+=4;var E=o;o=eP.QW($,o,s);
|
|
var e=o-E;t.tX($,E-4,e);if(e%4!=0)E+=4-e%4;o=E+e}return o};eP.tn=function($,o,T){var s=t.s($,o);o+=4;
|
|
if(s!=1)alert("Unknown version of pattern");var E=t.s($,o);o+=4;if(E!=1&&E!=2&&E!=3)console.log("Unsupported mode of pattern: "+E);
|
|
var e=t.mo($,o);o+=2;var n=t.mo($,o);o+=2;var A=new df(0,0,n,e);T.name=t.rB($,o);o+=4+2*T.name.length+2;
|
|
var u=$[o];o++;T.id=t.en($,o,u);o+=T.id.length;var Y=-1;if(E==2){Y=o;o+=3*256+4}var b=new L.uR(n*e);
|
|
o=eP.adA($,o,b);if(E==2){for(var f=0;f<b.i.length;f++){var a=3*b.i[f];b.i[f]=$[Y+a+0];b.m[f]=$[Y+a+1];
|
|
b.P[f]=$[Y+a+2]}}var w=L.G(A.Y()*4);L.dy(b,w);T.i2=[w,A];return o};eP.QW=function($,o,T){var s=T.i2[0],E=T.i2[1];
|
|
t.tX($,o,1);o+=4;t.tX($,o,3);o+=4;t.rx($,o,E.w);o+=2;t.rx($,o,E.d);o+=2;t.LR($,o,T.name+"\0");o+=4+2*T.name.length+2;
|
|
t.S1($,o,T.id.length);o++;t.G4($,o,T.id);o+=T.id.length;var e=new L.uR(E.Y());L.KT(s,e);o=eP.abL($,o,e,E);
|
|
return o};eP.adA=function($,o,T){var s=o,E={uL:null,xR:[],aiC:null,jU:null},e=t.s($,o);o+=4;var n=t.s($,o);
|
|
o+=4;E.uL=t.AS($,o);o+=16;var A=t.s($,o);o+=4;for(var f=0;f<A+2;f++){var u=t.s($,o);o+=4;if(u==0)continue;
|
|
var Y=t.s($,o);o+=4;if(Y==0)continue;var b=t.s($,o);o+=4;var a=t.AS($,o);o+=16;var w=t.mo($,o);o+=2;
|
|
var X=$[o];o++;var N=hV.hi(!1,b,$,a.d,a.w,o,X);if(f<A)E.xR.push(N);if(f==A)E.aiC=N;if(f==A+1)E.jU=N;
|
|
o+=Y-23}if(!E.uL.p4()){if(E.xR[0])T.i=E.xR[0];if(E.xR[1])T.m=E.xR[1];else T.m=E.xR[0].slice(0);if(E.xR[2])T.P=E.xR[2];
|
|
else T.P=E.xR[0].slice(0);if(E.jU)T.Ca=E.jU;else T.Ca.fill(255)}return o};eP.abL=function($,o,T,s){var E=o,e={uL:s,xR:[T.i,T.m,T.P],aiC:null,jU:T.Ca};
|
|
t.tX($,o,3);o+=4;t.tX($,o,0);o+=4;t.k6($,o,s);o+=16;t.tX($,o,24);o+=4;for(var f=0;f<24+2;f++){var n=o,A=f<3||f==25?1:0;
|
|
t.tX($,o,A);o+=4;if(A==0)continue;t.tX($,o,0);o+=4;t.tX($,o,8);o+=4;t.k6($,o,s);o+=16;t.rx($,o,8);o+=2;
|
|
t.S1($,o,1,1);o++;var u=f<3?e.xR[f]:e.jU;$.Y4(o,s.Y()+2);o=hV.H$(!1,u,$.data,s.d,s.w,o,1);t.tX($,n+4,o-n-8)}t.tX($,E+4,o-E-8);
|
|
return o};function hq(){}hq.$$=function($){var o=new Uint8Array($),T=0,s=t.en(o,T,4);T+=4;var E=t.mo(o,T);
|
|
T+=2;var e=[];if(E<=3){var n=t.mo(o,T);T+=2;for(var f=0;f<n;f++){var A=o[T++],u=t.en(o,T,A);T+=A;var Y=hq._p(o,T,u),b=Y[0];
|
|
T=Y[1];e.push(b);T+=6}}else{var Y={},a=av.tl(o,Y,T+4),w=Y.GrdL.v;for(var f=0;f<w.length;f++)e[f]=w[f].v.Grad.v}return e};
|
|
hq.$_=function($,o){$.Nm.v=o};hq.JF=function($){var o=new bV,T=0;t.G4(o,T,"8BGR");T+=4;t.rx(o,T,5);T+=2;
|
|
t.tX(o,T,16);T+=4;var s={classID:"null",GrdL:{t:"VlLs",v:[]}},E=s.GrdL.v;for(var f=0;f<$.length;f++)E[f]={t:"Objc",v:{classID:"Grdn",__name:"Gradient ",Grad:{t:"Objc",v:$[f]}}};
|
|
T+=av.ob(o,s,T);return o.data.slice(0,T).buffer};hq._p=function($,o,T){var s={classID:"Grdn",Clrs:{t:"VlLs",v:[]},GrdF:{t:"enum",v:{GrdF:"CstS"}},Intr:{t:"doub",v:4096},Nm:{t:"TEXT",v:T},Trns:{t:"VlLs",v:[]}},E=t.mo($,o);
|
|
o+=2;if(E==0)throw"e";for(var f=0;f<E;f++){var e=t.s($,o),n=t.s($,o+4),A=bf.So($,o+8),u={t:"Objc",v:{classID:"Clrt",Clr:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:A.i},Grn:{t:"doub",v:A.m},Bl:{t:"doub",v:A.P}}},Type:{t:"enum",v:{Clry:"UsrS"}},Lctn:{t:"long",v:e},Mdpn:{t:"long",v:n}}};
|
|
s.Clrs.v.push(u);o+=20}var Y=t.mo($,o);o+=2;for(var f=0;f<Y;f++){var e=t.s($,o),n=t.s($,o+4),b=t.mo($,o+8),u={t:"Objc",v:{classID:"TrnS",Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(100*b/255)}},Lctn:{t:"long",v:e},Mdpn:{t:"long",v:n}}};
|
|
s.Trns.v.push(u);o+=10}return[s,o]};hq.a0l=function($,o,T){var s=T.Clrs.v.length;t.rx($,o,s);o+=2;for(var f=0;
|
|
f<s;f++){var E=T.Clrs.v[f];t.tX($,o,E.v.Lctn.v);t.tX($,o+4,E.v.Mdpn.v);t.rx($,o+8,0);var e=L.h.wb(L.h.Qc(E.v.Clr.v)),n=[e.Rd.v,e.Grn.v,e.Bl.v,0];
|
|
for(var A=0;A<4;A++)t.rx($,o+10+A*2,Math.round(65535*(n[A]/255)));o+=20}var u=T.Trns.v.length;t.rx($,o,u);
|
|
o+=2;for(var f=0;f<u;f++){var E=T.Trns.v[f];t.tX($,o,E.v.Lctn.v);t.tX($,o+4,E.v.Mdpn.v);t.rx($,o+8,Math.round(255*E.v.Opct.v.val/100));
|
|
o+=10}return o};function fR(){}fR.$$=function($){var o=new Uint8Array($),T=[],s=[],E=[],e=[],n=[],A=0,u=t.en(o,A,4);
|
|
A+=4;var Y=t.s(o,A);A+=4;var b=t.s(o,A);A+=4;while(A<o.length){var a=t.en(o,A,4);A+=4;var w=t.en(o,A,4);
|
|
A+=4;var X=t.s(o,A);A+=4;if(w=="tppa"){s=eP.B9(o,A,X);A+=X}else if(w=="tpbd"){E=ey.fx(o,A,X,1,1);A+=X}else if(w=="tptp"){var N=t.s(o,A);
|
|
A+=4;for(var f=0;f<N;f++){var z=t.rB(o,A);A+=6+z.length*2;A+=4;var i={};A+=av.tl(o,i,A);T.push([z,i])}while((A&3)!=0)A++}else if(w=="tpsh"){var k=A,Q=o.slice(A,A+X);
|
|
while(A<k+X){var O=t.s(o,A);A+=4;A=aS.HU(o,A,"Shape",e)}A=k+X}else if(w=="tpst"){var k=A;A+=4;while(A<k+X){var c=t.s(o,A);
|
|
A+=4;var B=A,G=t.s(o,A);A+=4;var i={xz:{},h2:{}};n.push(i);A+=4;A+=av.tl(o,i.xz,A);A+=4;A+=av.tl(o,i.h2,A);
|
|
A=B+c;var l=i.h2.Lefx;if(l){if(l.v.masterFXSwitch==null)l.v.masterFXSwitch={t:"bool",v:!0};dm.FP(l.v)}}A=k+X}else{console.log(o.slice(A-8,A+64));
|
|
console.log(t.en(o,A-8,64));throw w}}return{Ou:E,A0:s,list:T,a5i:e,wG:n}};fR.$_=function($,o){$[0]=o};
|
|
fR.JF=function($){var o=new bV,T=0;t.G4(o,T,"8BTP");T+=4;t.tX(o,T,3);T+=4;t.tX(o,T,1);T+=4;var s=[$.A0,$.Ou,$.list];
|
|
for(var f=0;f<3;f++){if(s[f].length==0)continue;t.G4(o,T,"8BIM");T+=4;var E=["tppa","tpbd","tptp"][f];
|
|
t.G4(o,T,E);T+=4;var e=T;T+=4;if(E=="tppa"){T=eP.L_(o,T,$.A0)}else if(E=="tpbd"){T=ey.Cc(o,T,$.Ou)}else if(E=="tptp"){t.tX(o,T,$.list.length);
|
|
T+=4;for(var n=0;n<$.list.length;n++){var A=$.list[n];t.LR(o,T,A[0]+"\0");T+=6+A[0].length*2;t.tX(o,T,16);
|
|
T+=4;T+=av.ob(o,A[1],T)}}t.tX(o,e,T-e-4);while((T&3)!=0)T++;o.Y4(T,0)}return o.data.slice(0,T).buffer};
|
|
function fp(){}fp.$$=function($,o){var T=new Uint8Array($),s;if(t.s(T,0)==T.length)s="icc";else if(T[0]=="<".charCodeAt(0))s="look";
|
|
else if(t.fe(T,"LUT_3D_SIZE")!=-1)s="cube";else s="3DL";if(s!="icc"){var E=fp.abw(T,s),e=fp.aih(E[0],E[1]);
|
|
T=e}var n=[];for(var f=0;f<T.length;f++)n.push(T[f]);return[{classID:"null",Dthr:{t:"bool",v:!0},Nm:{t:"TEXT",v:o?o:"file.icc"},lookupType:{t:"enum",v:{colorLookupType:"abstractProfile"}},profile:{t:"tdta",v:n}}]};
|
|
fp.JF=function($){var o=$[0],T=new Uint8Array(o.profile.v);return T.buffer};fp.$_=function($,o){$.Nm.v=o};
|
|
fp.aih=function($,o){var T=new bV,s=128;T.Y4(0,128);var E=[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 f=0;f<E.length;f++)T.data[f]=E[f];var e=["desc","A2B0"],n=e.length,A=128+4+n*12;t.tX(T,s,n);
|
|
s+=4;for(var u=0;u<n;u++){var Y=e[u];t.G4(T,s,Y);s+=4;t.tX(T,s,A);s+=4;var b=A;if(Y=="desc"){t.G4(T,b,"mluc");
|
|
b+=4;b+=4;t.tX(T,b,1);b+=4;t.tX(T,b,12);b+=4;t.G4(T,b,"enUS");b+=4;var a="ICC by Photopea\0",w=a.length*2+2;
|
|
t.tX(T,b,w);b+=4;t.tX(T,b,28);b+=4;T.Y4(b,w);for(var f=0;f<a.length;f++)T.data[b+f*2+1]=a.charCodeAt(f);
|
|
b+=w}if(Y=="A2B0"){t.G4(T,b,"mAB ");b+=4;b+=4;T.Y4(b,4);T.data[b]=3;T.data[b+1]=3;b+=4;T.Y4(b,4*5);b+=4*3;
|
|
t.tX(T,b,b+8-A);b+=4;b+=4;T.Y4(b,20);T.data[b]=$;T.data[b+1]=$;T.data[b+2]=$;b+=16;T.data[b]=2;b+=4;
|
|
var X=$*$*$*3;T.Y4(b,X*2);for(var f=0;f<X;f++)t.mS(T.data,b+f*2,Math.max(0,Math.min(65535,Math.round(o[f]*65535))));
|
|
b+=X*2}var N=b-A;while((N&3)!=0)N++;t.tX(T,s,N);s+=4;A+=N}t.tX(T,0,A);return T.data.slice(0,A)};fp.abw=function($,o){o="LUTFormat"+o.toUpperCase();
|
|
var T=[],s=0,E=t.LK($,0,$.length),e="";for(var f=0;f<$.length&&e=="";f++){if($[f]==10)e="\n";else if($[f]==13){e="\r";
|
|
if($[f+1]==10)e+="\n"}}if(o=="LUTFormatCUBE"){var n=E.split(e);for(var f=0;f<n.length;f++){if(n[f]==""||n[f][0]=="#")continue;
|
|
var A=n[f].split(" "),u=A[0];if(u=="LUT_3D_SIZE"){s=parseInt(A[1]);continue}if(["TITLE","DOMAIN_MIN","DOMAIN_MAX"].indexOf(u)!=-1)continue;
|
|
T.push(parseFloat(A[0]),parseFloat(A[1]),parseFloat(A[2]))}T=fp.i$(s,T)}else if(o=="LUTFormat3DL"){var n=E.split(e),Y=1/4095;
|
|
for(var f=0;f<n.length;f++){var b=n[f];if(b==""||b=="3DMESH"||b.startsWith("Mesh")||b[0]=="#")continue;
|
|
var A=b.split(" "),u=A[0];if(s==0){s=A.length;continue}T.push(parseFloat(A[0])*Y,parseFloat(A[1])*Y,parseFloat(A[2])*Y)}}else if(o=="LUTFormatLOOK"){var a=new DOMParser,w=a.parseFromString(E,"text/xml"),X=w.getElementsByTagName("LUT")[0],N=X.children[0].textContent;
|
|
s=parseInt(JSON.parse(N));var z=X.children[1].textContent;z=z.replace(/"/g,"").replace(/\s/g,"");var i=3*s*s*s,k=i*4,Q=new Uint8Array(k);for(var f=0;f<k;f++){var O=z.charCodeAt(f*2),c=z.charCodeAt(f*2+1),B=O<58?O-48:O-55,G=c<58?c-48:c-55;Q[f]=(B<<4)+G}for(var f=0;f<i;f++)T.push(t.Fe(Q,f<<2));T=fp.i$(s,T)}else throw o;return[s,T]};fp.ac1=function($,o,T){var s=["#Created by www.Photopea.com","TITLE \""+T+"\"","","#LUT size","LUT_3D_SIZE "+o,"","#data domain","DOMAIN_MIN 0.0 0.0 0.0","DOMAIN_MAX 1.0 1.0 1.0","","#LUT data points"],E=6;
|
|
for(var f=0;f<$.length;f+=3){s.push($[f].toFixed(E)+" "+$[f+1].toFixed(E)+" "+$[f+2].toFixed(E))}s.push("");
|
|
return t.Te(s.join("\n")).buffer};fp.i$=function($,o){var T=[],s=$*$*$;for(var f=0;f<s;f++)T.push(0,0,0);
|
|
for(var E=0;E<$;E++)for(var e=0;e<$;e++)for(var n=0;n<$;n++){var f=3*(n+e*$+E*$*$),A=3*(E+e*$+n*$*$);
|
|
T[A]=o[f];T[A+1]=o[f+1];T[A+2]=o[f+2]}return T};function av(){}av.tl=function($,o,T,s,E){var e=T,n;if(E==null)E=0;
|
|
var A=t.s($,T);if(A==0){n="";T+=4}else{n=t.rB($,T);T+=4+2*n.length+2}if(n!="")o.__name=n;o.classID=av.be($,T);
|
|
if(s)console.log("\t".repeat(E),"- reading descriptor",o.classID,T);T+=av.Ye($,T);var u=t.Cv($,T);T+=4;
|
|
for(var f=0;f<u;f++){var Y=av.be($,T);T+=av.Ye($,T);var b=av.aB($,T,s,E);o[Y]=b;T+=b.size;delete b.size}return T-e};
|
|
av.ob=function($,o,T,s){var E=T,e=o.__name;if(e==null)e="";e+="\0";t.LR($,T,e);T+=4+2*e.length;av.Dn($,T,o.classID);
|
|
T+=av.Ye($.data,T);t.rV($,T,Object.keys(o).length-1-(o.__name==null?0:1));T+=4;for(var n in o){if(n=="classID")continue;
|
|
if(n=="__name")continue;av.Dn($,T,n);T+=av.Ye($.data,T);T+=av.pX($,T,o[n])}return T-E};av.aB=function($,o,T,s){var E=o,e=t.en($,o,4);
|
|
o+=4;var n={size:0,t:e,v:null};if(T)console.log("\t".repeat(s),"reading key",e,E);switch(e){case"obj ":case"VlLs":n.v=[];
|
|
var A=t.s($,o);o+=4;for(var f=0;f<A;f++){var u=av.aB($,o,T,s+1);o+=u.size;delete u.size;n.v.push(u)}break;
|
|
case"UntF":n.v={type:t.en($,o,4),val:t.Eo($,o+4)};o+=12;break;case"doub":n.v=t.Eo($,o);o+=8;break;case"bool":n.v=$[o]==1;
|
|
o+=1;break;case"long":n.v=t.Cv($,o);o+=4;break;case"comp":n.v=t.Cv($,o+4);o+=8;break;case"Objc":n.v={};
|
|
var Y=av.tl($,n.v,o,T,s+1);o+=Y;break;case"TEXT":var b=t.s($,o);if(b==0){n.v="";o+=4}else{n.v=t.rB($,o);
|
|
o+=4+n.v.length*2+2}break;case"enum":var a=av.be($,o);o+=av.Ye($,o);var w=av.be($,o);o+=av.Ye($,o);n.v={};
|
|
n.v[a]=w;break;case"tdta":var X=t.Cv($,o);o+=4;n.v=[];for(var f=0;f<X;f++)n.v.push($[o+f]);o+=X;break;
|
|
case"ObAr":var N=t.s($,o);o+=4;var z=t.rB($,o);o+=4+2*z.length+2;if(z!="")throw z;var i=av.be($,o);o+=4+Math.max(4,i.length);
|
|
n.v={classID:i,arr:[]};var k=t.s($,o);o+=4;for(var f=0;f<k;f++){var i=av.be($,o);o+=4+Math.max(4,i.length);
|
|
var a=t.en($,o,4);o+=4;var Q=t.en($,o,4);o+=4;var O={id:i,type:a,uID:Q,arr:[]};n.v.arr.push(O);var c=t.s($,o,4);
|
|
o+=4;for(var B=0;B<c;B++){var G=t.Eo($,o);o+=8;O.arr.push(G)}}break;case"Pth ":var l=o,X=t.s($,o);o+=4;
|
|
var v=t.en($,o,4);o+=4;var p=t.cX($,o);o+=4;var P=t.agQ($,o);o+=4+P.length*2;n.v={sig:v,pth:P};break;
|
|
case"Clss":case"type":case"rele":var P=t.rB($,o);o+=4+P.length*2+2;var h=av.be($,o);o+=4+Math.max(4,h.length);
|
|
n.v={classID:h};if(P!="")n.v.__name=P;if(e=="rele"){n.v.val=t.Cv($,o);o+=4}break;case"prop":case"Enmr":case"indx":case"name":var j=av.jE[e],P=t.rB($,o);
|
|
o+=4+P.length*2+2;if(P.length!=0){console.log(e,P);throw"e"}n.v={};for(var f=0;f<j.length;f++){var h=av.be($,o);
|
|
o+=4+Math.max(4,h.length);n.v[j[f]]=h}if(e=="name"){var P=t.rB($,o);o+=4+P.length*2+2;n.v.val=P}if(e=="indx"){n.v.val=t.s($,o);
|
|
o+=4}break;case"alis":var X=t.s($,o);o+=4;n.v=t.en($,o,X);o+=X;break;default:{console.log("unknown oskey: "+e+", "+E);
|
|
throw"e";return n}}if(T){console.log("\t".repeat(s),n.v);console.log("\t".repeat(s),"======",o)}n.size=o-E;
|
|
return n};av.jE={name:["classID"],prop:["classID","keyID"],Enmr:["classID","typeID","enum"],indx:["classID"]};
|
|
av.pX=function($,o,T){var s=o,E=T.t;T=T.v;t.G4($,o,E);o+=4;switch(E){case"obj ":case"VlLs":t.rV($,o,T.length);
|
|
o+=4;for(var e=0;e<T.length;e++){var n=av.pX($,o,T[e]);o+=n}break;case"UntF":t.G4($,o,T.type);t.IW($,o+4,T.val);
|
|
o+=12;break;case"doub":t.IW($,o,T);o+=8;break;case"bool":t.S1($,o,T?1:0,1);o+=1;break;case"long":t.rV($,o,T);
|
|
o+=4;break;case"comp":t.rV($,o+4,T);o+=8;break;case"Objc":var n=av.ob($,T,o);o+=n;break;case"TEXT":t.LR($,o,T+"\0");
|
|
o+=4+T.length*2+2;break;case"enum":var A=Object.keys(T)[0],u=T[A];av.Dn($,o,A);o+=av.Ye($.data,o);av.Dn($,o,u);
|
|
o+=av.Ye($.data,o);break;case"tdta":t.tX($,o,T.length);o+=4;t.vS($,o,T);o+=T.length;break;case"ObAr":t.tX($,o,T.arr[0].arr.length);
|
|
o+=4;t.LR($,o,"\0");o+=6;av.Dn($,o,T.classID);o+=4+Math.max(4,T.classID.length);t.tX($,o,T.arr.length);
|
|
o+=4;for(var f=0;f<T.arr.length;f++){var Y=T.arr[f];av.Dn($,o,Y.id);o+=4+Math.max(4,Y.id.length);t.G4($,o,Y.type);
|
|
o+=4;t.G4($,o,Y.uID);o+=4;t.tX($,o,Y.arr.length);o+=4;for(var e=0;e<Y.arr.length;e++){t.IW($,o,Y.arr[e]);
|
|
o+=8}}break;case"Pth ":var b=T.pth.length*2+4+8;t.tX($,o,b);o+=4;t.G4($,o,T.sig);o+=4;t.JG($,o,b);o+=4;
|
|
t.a1z($,o,T.pth);o+=T.pth.length*2+4;break;case"Clss":case"type":case"rele":var a=T.__name;if(a==null)a="";
|
|
t.LR($,o,a+"\0");o+=4+a.length*2+2;var w=T.classID;av.Dn($,o,w);o+=4+Math.max(4,w.length);if(E=="rele"){t.rV($,o,T.val);
|
|
o+=4}break;case"prop":case"Enmr":case"indx":case"name":var X=av.jE[E];t.tX($,o,1);o+=6;for(var f=0;f<X.length;
|
|
f++){var w=T[X[f]];av.Dn($,o,w);o+=4+Math.max(4,w.length)}if(E=="name"){t.LR($,o,T.val+"\0");o+=4+T.val.length*2+2}if(E=="indx"){t.tX($,o,T.val);
|
|
o+=4}break;case"alis":var b=T.length;t.tX($,o,b);o+=4;t.G4($,o,T);o+=b;break;default:console.log("unknown oskey: "+E);
|
|
o=s;break}return o-s};av.be=function($,o){var T=t.Cv($,o);if(T>1e3)throw"e";if(T==0)T=4;return t.en($,o+4,T).trim()};
|
|
av.Ye=function($,o){var T=t.Cv($,o);return T==0?8:4+T};av.Dn=function($,o,T){var s="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(" "),E=4<T.length||s.indexOf(T)!=-1;
|
|
t.rV($,o,E?T.length:0);t.G4($,o+4,T);if(T.length<4&&!E){var e="";for(var f=T.length;f<4;f++)e+=" ";t.G4($,o+4+T.length,e)}};
|
|
av.a4h=function($){var o={};for(var T in $){if(T=="classID")o[T]=$[T];else if(T=="__name")o[T]=$[T];
|
|
else o[T]=av.Bk($[T])}return o};av.Bk=function($){if($.KR=="Objc")return av.a4h($.v);else if($.KR=="VlLs"){var o=[];
|
|
for(var f=0;f<$.v.length;f++)o.push(av.Bk($.v[f]));return o}else if($.KR=="UntF")return $.v.val;else return $.v};
|
|
function dm(){}dm.R9=function($,o,T,s,E,e){while(o<T){var n=t.en($,o,4);o+=4;if(n!="8BIM"&&n!="8B64"){console.log("layer information signature error! "+n,"PSB = "+E);
|
|
alert("Error in PSD file: wrong signature.");return T}var A=t.en($,o,4);o+=4;var u=t.s($,o);o+=4;var Y=E&&"LMsk Lr16 Lr32 Layr Mt16 Mt32 Mtrn Alph FMsk lnk2 lnkE FEid FXid PxSD extn cinf artd pths".split(" ").indexOf(A)!=-1;
|
|
if(Y){u=u<<32|t.Cv($,o);o+=4}var b=["lrFX","PlLd"];if(b.indexOf(A)!=-1){if(u%4!=0)u+=4-u%4;o+=u;continue}switch(A){case"iOpa":s[A]=$[o];
|
|
break;case"brst":s[A]=[1,1,1];for(var f=0;f<u;f+=4)s[A][t.s($,o+f)]=0;break;case"knko":s[A]=$[o];break;
|
|
case"infx":s[A]=$[o];break;case"clbl":s[A]=$[o];break;case"lmgm":s[A]=$[o];break;case"vmgm":s[A]=$[o];
|
|
break;case"lyid":s[A]=t.s($,o);break;case"lsct":s[A]={type:t.s($,o)};if(u>=12)s[A].fh=t.en($,o+8,4);
|
|
break;case"lsdk":s.lsct={type:t.s($,o)};break;case"lyvr":s[A]=t.s($,o);break;case"lnsr":var a={artb:1,bgnd:1,cont:1,layr:1,lset:1,rend:1,shap:1,user:1,____:null};
|
|
s[A]=t.en($,o,4);break;case"lspf":s[A]=t.s($,o);break;case"lclr":s[A]=t.mo($,o);break;case"luni":s[A]=t.Ds($,o);
|
|
break;case"fxrp":s[A]=new aY(t.Eo($,o),t.Eo($,o+8));break;case"artb":case"artd":s[A]={};av.tl($,s[A],o+4);
|
|
break;case"SoCo":s[A]={};av.tl($,s[A],o+4);break;case"GdFl":s[A]={};av.tl($,s[A],o+4);dm.HJ(s[A],A);
|
|
break;case"PtFl":s[A]={};av.tl($,s[A],o+4);dm.HJ(s[A],A);break;case"CgEd":var w=s.brit=iZ.o_("brit"),X={};
|
|
av.tl($,X,o+4);w.Brgh.v=X.Brgh?X.Brgh.v:0;w.Cntr.v=X.Cntr?X.Cntr.v:0;w.useLegacy.v=X.useLegacy?X.useLegacy.v:0;
|
|
break;case"brit":if(s.brit==null){var w=s.brit=iZ.o_("brit"),X={};w.Brgh.v=t.FU($,o);w.Cntr.v=t.FU($,o+2);
|
|
w.useLegacy.v=!1}break;case"levl":var N=$.buffer.slice(o,o+u);s[A]=cb.$$(N);break;case"curv":s[A]=eJ.p0($,o,u);
|
|
break;case"expA":var z=t.mo($,o),i=s[A]=iZ.o_("expA");i.Exps.v=t.eO($,o+2);i.Ofst.v=t.eO($,o+6);i.gammaCorrection.v=t.eO($,o+10);
|
|
break;case"vibA":s[A]={};av.tl($,s[A],o+4);break;case"hue2":s[A]=gK.p0($,o,u);break;case"blnc":var i=s[A]=iZ.o_(A);
|
|
i.PrsL.v=$[o+18]==1;var k=["ShdL","MdtL","HghL"];for(var f=0;f<3;f++)for(var Q=0;Q<3;Q++)i[k[f]].v[Q].v=t.FU($,o+f*6+Q*2);
|
|
break;case"blwh":var O={};av.tl($,O,o+4);var i=iZ.o_(A),c="Bl Cyn Grn Mgnt Rd Yllw tintColor useTint".split(" ");
|
|
for(var f=0;f<c.length;f++){i[c[f]]=O[c[f]];delete O[c[f]]}s[A]=i;break;case"phfl":var i=s[A]=iZ.o_(A),B=i.Clr.v,z=t.mo($,o);
|
|
if(z==3){var G=[t.s($,o+2),t.s($,o+6),t.s($,o+10)],l=32768,v=L.Sc(G[0]/l,G[1]/l,G[2]/l);B.Lmnc.v=v.vA;
|
|
B.A.v=v.Ca;B.B.v=v.P}if(z==2){var p=t.mo($,o+2);if(p!=7)throw"e";B.Lmnc.v=t.FU($,o+4)/100;B.A.v=t.FU($,o+6)/100;
|
|
B.B.v=t.FU($,o+8)/100}var P=o+2+(z==3?12:10);i.Dnst.v=t.s($,P);P+=4;i.PrsL.v=$[P]==1;break;case"mixr":var h={UE:t.mo($,o+2)==1,H:[]};
|
|
for(var f=0;f<20;f++)h.H.push(t.FU($,o+4+f*2));s[A]=dq.x$(h);break;case"clrL":case"rplc":s[A]={};av.tl($,s[A],o+6);
|
|
break;case"nvrt":s[A]={};break;case"post":s[A]=iZ.o_("post");s[A].Lvls.v=t.mo($,o);break;case"thrs":s[A]=iZ.o_("thrs");
|
|
s[A].Lvl.v=t.mo($,o);break;case"grdm":var j={rev:$[o+2]==1,ad3:$[o+3]==1},C=o+4,V=t.Ds($,C);C+=4+V.length*2;
|
|
var d=hq._p($,C,V),m=d[0];C=d[1];var R=t.mo($,C);C+=2;m.Intr.v=t.mo($,C);C+=2;var g=t.mo($,C);C+=2;j.mode=t.mo($,C);
|
|
C+=2;j.dh=t.s($,C);C+=4;j.agO=t.mo($,C)==1;C+=2;j.aja=t.mo($,C)==1;C+=2;j.a7f=t.s($,C);C+=4;j.ahQ=t.mo($,C);
|
|
C+=2;j.F_=[];for(var f=0;f<4;f++)j.F_.push(t.mo($,C+f*2));C+=8;j.l4=[];for(var f=0;f<4;f++)j.l4.push(t.mo($,C+f*2));
|
|
C+=8;var S=t.mo($,C);C+=2;var F=iZ.o_("grdm");F.Rvrs.v=j.rev;F.Grad.v=m;s[A]=F;break;case"selc":s[A]=de.p0($,o,u);
|
|
break;case"vmsk":case"vsms":var r=s.vmsk=new M.PZ,q=t.Cv($,o+4),W=(q>>0&1)==1;r.lq=(q>>1&1)==0;r.isEnabled=(q>>2&1)==0;
|
|
r.g=aS.Dw($,o+8,u-8,e.d,e.w);break;case"shmd":s[A]={};var Z=t.s($,o),P=o+4;for(var f=0;f<Z;f++){var n=t.en($,P,4);
|
|
P+=4;var I=t.en($,P,4);P+=4;var _=$[P];P++;if(Math.max($[P],$[P+1],$[P+2])!=0)throw"e";P+=3;var cN=t.s($,P);
|
|
P+=4;if(I=="cust"||I=="cmls"||I=="extn"||I=="mlst"){var ce=t.s($,P);if(ce!=16)P+=4;if(t.s($,P)==16){var O={};
|
|
av.tl($,O,P+4,!1);s[A][I]=O;if(I=="cmls")cf.xg.a0S(s[A][I])}}else{console.log("unknown shmd key: "+I+", size: "+cN)}P+=cN}break;
|
|
case"shpa":var z=t.s($,o),gf=t.s($,o+4);if(gf!=0)console.log("some patterns present!");break;case"TySh":var K=s[A]={},z=t.mo($,o);
|
|
K.t=t.fo($,o+2);var cv=t.mo($,o+2+48);K.Fh={};var f0=av.tl($,K.Fh,o+56),i8=g8.dk();for(var b5 in i8)if(K.Fh[b5]==null)K.Fh[b5]=i8[b5];
|
|
K.Ah={};var iC=av.tl($,K.Ah,o+56+f0+6);K.QH=t.a6x($,o+56+f0+6+iC);K.h3=h6.$$(K.Fh.EngineData.v);g8.abG(K.h3.EngineDict.StyleRun.RunArray);
|
|
if(K.h3.ResourceDict==null)K.h3.ResourceDict=JSON.parse(JSON.stringify(K.h3.DocumentResources));delete K.Fh.EngineData;
|
|
break;case"lfx2":case"lmfx":case"lfxs":var an=t.s($,o),cO=t.s($,o+4);s.lmfx={};var f0=av.tl($,s.lmfx,o+8);
|
|
dm.FP(s.lmfx);break;case"FMsk":s[A]=t.YM($,o,u);break;case"Txt2":s[A]={};s[A].raw=t.YM($,o,u);s[A].xo=cK.$$(s[A].raw);
|
|
break;case"Patt":s[A]=eP.B9($,o,u);break;case"SoLd":var bh=t.en($,o,4),bD=t.s($,o+4),fq=t.s($,o+8);s[A]={};
|
|
var fO=av.tl($,s[A],o+12);if(s[A].nonAffineTransform==null)s[A].nonAffineTransform=JSON.parse(JSON.stringify(s[A].Trnf));
|
|
if(s[A].Impr==null)s[A].Impr={t:"Objc",v:{__name:"None",classID:"none"}};break;case"vstk":case"pths":var bD=t.s($,o);
|
|
s[A]={};var fO=av.tl($,s[A],o+4);break;case"vscg":var I=t.en($,o,4),bD=t.s($,o+4);s[I]={};var fO=av.tl($,s[I],o+8);
|
|
dm.HJ(s[I],I);break;case"vogk":var g6=t.s($,o),bD=t.s($,o+4);s[A]={};var fO=av.tl($,s[A],o+8);s[A]=s[A].keyDescriptorList.v;
|
|
for(var f=0;f<s[A].length;f++){}break;case"lnk2":case"lnkD__":case"lnk3__":s[A]=[];var C=o;while(C<o+u){var hM=new M.SC;
|
|
s[A].push(hM);var g=t.eT($,C);C+=8;var d3=C;hM.type=t.en($,C,4);C+=4;if(hM.type!="liFD"){alert("Unknown Linked Layer type: "+hM.type);
|
|
break;throw hM.type}hM.R4=t.s($,C);C+=4;var h9=t.b9($,C);C+=1+h9.U8.length;hM.EB=h9.U8;hM.FZ=t.rB($,C);
|
|
C+=4+hM.FZ.length*2+2;hM.Ul=t.en($,C,4);C+=4;hM.oF=t.en($,C,4);C+=4;var cs=t.eT($,C);C+=8;hM.open=$[C];
|
|
C+=1;if(hM.open!=0){var dv={},f0=av.tl($,dv,C+4);if(f0%4!=0)f0+=4-f0%4;console.log(dv);C+=f0+4}hM.open=0;
|
|
hM.raw=t.YM($,C,cs);C=d3+g;if(g%4!=0)C+=4-g%4}break;case"FEid":var C=o;s[A]=[];var ec=C+u,z=t.s($,C);
|
|
C+=4;while(C<ec){C+=4;var g=t.s($,C);C+=4;var d={};s[A].push(d);d.id=t.b9($,C).U8;C+=d.id.length+1;var z=t.s($,C);
|
|
C+=4;C+=4;var gT=t.s($,C);C+=4;d.rect=t.AS($,C);C+=16;var iz=t.s($,C);C+=4;var gw=t.s($,C);C+=4;var iI=new L.uR(0);
|
|
for(var f=0;f<gw+2;f++){var g2=t.s($,C);C+=4;if(g2!=0){C+=4;var bb=t.s($,C),ir=null;C+=4;if(f<3||f==25)ir=hV.EM(!0,iz,$,d.rect.d,d.rect.w,C,bb);
|
|
if(f==0)iI.i=ir;if(f==1)iI.m=ir;if(f==2)iI.P=ir;if(f==25)iI.Ca=ir;C+=bb}}d.buffer=L.G(d.rect.Y()*4);
|
|
L.dy(iI,d.buffer);L.oE(d);var dG=$[C];C++;if(dG!=0){d._=new M.Zb;d._.rect=t.AS($,C);C+=16;C+=4;var gY=t.s($,C);
|
|
C+=4;d._.channel=hV.EM(!0,iz,$,d._.rect.d,d._.rect.w,C,gY);d._.color=255;d._.Gg();C+=gY}if(g%4!=0)C+=4-g%4}break;
|
|
case"Lr16":j3.xy(e,$,o);break;default:break}var e6="Lr16 LMsk Txt2 artd extd luni pths extn tySh lfx2 cinf".split(" ");
|
|
if(e6.indexOf(A)==-1)if(u%4!=0)console.log("size not multiple of 4!!!",A);if(A!="luni"&&A!="TySh"&&A!="tySh"&&A!="lfx2")if(u%4!=0)u+=4-u%4;
|
|
o+=u}var fr=[];for(var f=0;f<fr.length;f++)delete s[fr[f]];return o};dm.DR=function($,o,T,s,E){for(var e in T)if(T[e]==null){alert("A bug occured (see console).");
|
|
console.log("Please, report a bug, that \""+e+"\" tag was present with a null value.");delete T[e]}for(var e in T){var n=s&&"LMsk Lr16 Lr32 Layr Mt16 Mt32 Mtrn Alph FMsk lnk2 lnkE FEid FXid PxSD extn cinf artd pths".split(" ").indexOf(e)!=-1,u=0;
|
|
t.G4($,o,n?"8B64":"8BIM");o+=4;var A=o;t.G4($,o,e);o+=4;t.rV($,o,0);o+=n?8:4;switch(e){case"iOpa":t.S1($,o,T[e],1);
|
|
u=4;break;case"brst":u=0;for(var f=0;f<3;f++)if(T[e][f]==0){t.tX($,o+u,f);u+=4}break;case"knko":t.S1($,o,T[e],1);
|
|
u=4;break;case"infx":t.S1($,o,T[e],1);u=4;break;case"clbl":t.S1($,o,T[e],1);u=4;break;case"lmgm":t.S1($,o,T[e],1);
|
|
u=4;break;case"vmgm":t.S1($,o,T[e],1);u=4;break;case"lyid":t.tX($,o,T[e]);u=4;break;case"lsct":t.tX($,o,T[e].type);
|
|
u=4;if(T[e].fh){t.G4($,o+4,"8BIM");t.G4($,o+8,T[e].fh);u=12}break;case"lyvr":t.tX($,o,T[e]);u=4;break;
|
|
case"lnsr":t.G4($,o,T[e]);u=4;break;case"lspf":t.tX($,o,T[e]);u=4;break;case"lclr":t.rx($,o,T[e]);u=8;
|
|
break;case"luni":t.LR($,o,T[e]);u=4+2*T[e].length;break;case"fxrp":t.IW($,o,T[e].x);t.IW($,o+8,T[e].y);
|
|
u=16;break;case"artb":case"artd":t.tX($,o,16);u=av.ob($,T[e],o+4)+4;break;case"SoCo":t.tX($,o,16);u=av.ob($,T[e],o+4)+4;
|
|
break;case"GdFl":t.tX($,o,16);u=av.ob($,T[e],o+4)+4;break;case"PtFl":t.tX($,o,16);u=av.ob($,T[e],o+4)+4;
|
|
break;case"CgEd":var Y={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}},b=Y,a=T[e];
|
|
b.Brgh.v=a.Brgh.v;b.Cntr.v=a.Cntr.v;b.useLegacy.v=a.useLegacy.v;t.tX($,o,16);u=av.ob($,Y,o+4)+4;break;
|
|
case"brit":$.Y4(o,8);u=8;break;case"levl":var w=new bV;u=cb.JF(w,T[e]);t.vS($,o,w.data);break;case"curv":u=eJ.kw($,o,T[e]);
|
|
break;case"expA":u=14;$.Y4(o,14);t.mS($.data,o,1);t.pM($.data,o+2,T[e].Exps.v);t.pM($.data,o+6,T[e].Ofst.v);
|
|
t.pM($.data,o+10,T[e].gammaCorrection.v);break;case"vibA":t.tX($,o,16);u=av.ob($,T[e],o+4)+4;break;case"hue2":u=gK.kw($,o,T[e]);
|
|
break;case"blnc":u=19;$.Y4(o,u);var X=["ShdL","MdtL","HghL"];for(var f=0;f<3;f++){var N=T[e][X[f]].v;
|
|
for(var z=0;z<3;z++)N.push(t.Gn($.data,o+f*6+z*2,N[z].v))}$.data[o+18]=T[e].PrsL.v?1:0;break;case"blwh":var Y={classID:"null",bwPresetKind:{t:"long",v:1},blackAndWhitePresetFileName:{t:"TEXT",v:""}},i="Bl Cyn Grn Mgnt Rd Yllw tintColor useTint".split(" ");
|
|
for(var f=0;f<i.length;f++){Y[i[f]]=T[e][i[f]]}t.tX($,o,16);u=av.ob($,Y,o+4)+4;break;case"phfl":t.rx($,o,2);
|
|
var k=T[e].Clr.v;t.rx($,o+2,7);t.rx($,o+4,Math.round(k.Lmnc.v*100));t.rx($,o+6,Math.round(k.A.v*100));
|
|
t.rx($,o+8,Math.round(k.B.v*100));t.rx($,o+10,0);var Q=o+2+10;$.Y4(Q,5);t.gG($.data,Q,T[e].Dnst.v);Q+=4;
|
|
$.data[Q]=T[e].PrsL.v?1:0;Q++;u=Q-o;break;case"mixr":u=44;$.Y4(o,u);var O=dq.CO(T[e]);t.mS($.data,o,1);
|
|
t.mS($.data,o+2,O.UE?1:0);for(var f=0;f<20;f++)t.Gn($.data,o+4+f*2,O.H[f]);break;case"clrL":case"rplc":t.rx($,o,1);
|
|
t.tX($,o+2,16);u=av.ob($,T[e],o+6)+6;break;case"nvrt":u=0;break;case"post":t.rx($,o,T[e].Lvls.v);u=2;
|
|
break;case"thrs":t.rx($,o,T[e].Lvl.v);u=2;break;case"grdm":var c={rev:T[e].Rvrs.v,ad3:!1,mode:0,dh:867527939,agO:!1,aja:!0,a7f:2048,ahQ:3,F_:[0,0,0,0],l4:[32768,32768,32768,32768]},B=T[e].Grad.v;
|
|
$.Y4(o,4);t.mS($.data,o,1);$.data[o+2]=c.rev?1:0;$.data[o+3]=c.ad3?1:0;var G=o+4;t.LR($,G,B.Nm.v);G+=4+B.Nm.v.length*2;
|
|
G=hq.a0l($,G,B);t.rx($,G,2);G+=2;t.rx($,G,B.Intr.v);G+=2;t.rx($,G,32);G+=2;t.rx($,G,c.mode);G+=2;t.tX($,G,c.dh);
|
|
G+=4;t.rx($,G,c.agO?1:0);G+=2;t.rx($,G,c.aja?1:0);G+=2;t.tX($,G,c.a7f);G+=4;t.rx($,G,c.ahQ);G+=2;for(var f=0;
|
|
f<4;f++)t.rx($,G+f*2,c.F_[f]);G+=8;for(var f=0;f<4;f++)t.rx($,G+f*2,c.l4[f]);G+=8;G+=2;u=G-o;break;case"selc":u=de.kw($,o,T[e]);
|
|
break;case"FMsk":t.vS($,o,T[e]);u=T[e].length;break;case"Txt2":var l=new bV,v=cK._i(T[e].xo,l),p=L.G(v,!0);
|
|
for(var f=0;f<v;f++)p[f]=l.data[f];t.vS($,o,p);u=p.length;break;case"vmsk":var P=T[e],h=0;t.tX($,o,3);
|
|
if(!P.lq)h+=1<<1;if(!P.isEnabled)h+=1<<2;t.tX($,o+4,h);u=8;var j=P.g.length;$.Y4(o+8,j*26);aS.eM($.data,o+8,P.g,E.d,E.w);
|
|
u+=j*26;break;case"shmd":t.tX($,o,Object.keys(T[e]).length);var Q=o+4;for(var C in T[e]){t.G4($,Q,"8BIM");
|
|
Q+=4;t.G4($,Q,C);Q+=4;t.tX($,Q,0);Q+=4;t.tX($,Q,0);Q+=4;t.tX($,Q,16);Q+=4;var V=av.ob($,T[e][C],Q);if(V%4!=0)V+=4-V%4;
|
|
t.tX($,Q-8,V+4);Q+=V}u=Q-o;break;case"TySh":var Q=o;t.sL($,Q,1);Q+=2;var d=T[e],l=new bV;d.h3.DocumentResources=JSON.parse(JSON.stringify(d.h3.ResourceDict));
|
|
var v=h6._i(d.h3,l),p=L.G(v,!0);for(var f=0;f<v;f++)p[f]=l.data[f];d.Fh.EngineData={t:"tdta",v:p};var m=d.h3.EngineDict.Editor.Text;
|
|
d.Fh.Txt.v=m.substring(0,m.length-1);t.afk($,Q,d.t);Q+=48;t.sL($,Q,50);Q+=2;t.tX($,Q,16);Q+=4;Q+=av.ob($,d.Fh,Q);
|
|
t.sL($,Q,1);Q+=2;t.tX($,Q,16);Q+=4;Q+=av.ob($,d.Ah,Q);t.aab($,Q,d.QH);Q+=16;u=Q-o;break;case"lmfx":t.tX($,o,0);
|
|
t.tX($,o+4,16);var Y=JSON.parse(JSON.stringify(T[e])),R=!1;dm.y4(Y);for(var f=0;f<ev.CP.length;f++)if(Y[ev.CP[f]]!=null)R=!0;
|
|
t.G4($,A,R?"lmfx":"lfx2");u=av.ob($,Y,o+8)+8;break;case"Patt":var Q=eP.L_($,o,T[e]);u=Q-o;break;case"SoLd":t.G4($,o,"soLD");
|
|
t.tX($,o+4,4);t.tX($,o+8,16);u=av.ob($,T[e],o+12)+12;break;case"vstk":case"pths":t.tX($,o,16);u=av.ob($,T[e],o+4)+4;
|
|
break;case"vscg__":t.G4($,o,T[e].key);t.tX($,o+4,16);u=av.ob($,T[e].H,o+8)+8;break;case"vogk":t.tX($,o,1);
|
|
t.tX($,o+4,16);L.qy.a41(T[e]);for(var f=0;f<T[e].length;f++){var g=T[e][f].v.keyOriginResolution;if(g)g.v=E.fG}var S={classID:"null",keyDescriptorList:{t:"VlLs",v:T[e]}};
|
|
u=av.ob($,S,o+8)+8;break;case"lnkD":case"lnk2":case"lnk3":var G=o;for(var f=0;f<T[e].length;f++){var F=T[e][f],r=G;
|
|
t._a($,G,0);G+=8;t.G4($,G,F.type);G+=4;t.tX($,G,F.R4);G+=4;$.Y4(G,1);$.data[G]=F.EB.length;G++;t.G4($,G,F.EB);
|
|
G+=F.EB.length;t.LR($,G,F.FZ+"\0");G+=4+F.FZ.length*2+2;t.G4($,G,F.Ul);G+=4;t.G4($,G,F.oF);G+=4;t._a($,G,F.raw.length);
|
|
G+=8;$.Y4(G,1);$.data[G]=F.open;G++;t.vS($,G,F.raw);G+=F.raw.length;t.tX($,G,1);G+=4;G+=11;var q=G-r-8;
|
|
t._a($,r,q);if(q%4!=0){$.Y4(G,4-q%4);G+=4-q%4}}u=G-o;break;case"FEid":var G=o;t.tX($,G,3);G+=4;for(var W=0;
|
|
W<T[e].length;W++){var Z=T[e][W];G+=4;var I=G;G+=4;t.Fm($,G,Z.id);G+=Z.id.length+1;t.tX($,G,1);G+=4;
|
|
G+=4;var _=G;G+=4;t.k6($,G,Z.rect);G+=16;t.tX($,G,8);G+=4;t.tX($,G,24);G+=4;var cN=new L.uR(Z.rect.Y());
|
|
L.KT(Z.buffer,cN);for(var f=0;f<24+2;f++){var ce=null;if(f==0)ce=cN.i;if(f==1)ce=cN.m;if(f==2)ce=cN.P;
|
|
if(f==25)ce=cN.Ca;t.tX($,G,ce!=null?1:0);G+=4;if(ce!=null){G+=4;var gf=G;G+=4;$.Y4(G,Z.rect.Y()+2);G=hV.gm(!0,ce,$.data,Z.rect.d,Z.rect.w,G,3);
|
|
t.tX($,gf,G-(gf+4))}}t.tX($,_,G-(_+4));$.Y4(G,1);$.data[G]=Z._?1:0;G++;if(Z._!=null){var K=Z._.rect,cv=Z._.channel;
|
|
K=Z.rect;cv=L.G(K.Y());cv.fill(Z._.color);L.pg(Z._.channel,Z._.rect,cv,K);t.k6($,G,K);G+=16;G+=4;var f0=G;
|
|
G+=4;$.Y4(G,K.Y()+2);G=hV.gm(!0,cv,$.data,K.d,K.w,G,3);t.tX($,f0,G-(f0+4))}var q=G-(I+4);t.tX($,I,q);
|
|
if(q%4!=0)G+=4-q%4}u=G-o;break;default:console.log("unknown layer tag: "+e+", size: "+u);o-=12;continue}var i8=["Txt2","artd","extd","pths"];
|
|
if(i8.indexOf(e)==-1)if(u%4!=0)u+=4-u%4;if(n)t._a($,o-8,u);else t.tX($,o-4,u);if(e!="luni"&&e!="TySh")if(u%4!=0)u+=4-u%4;
|
|
o+=u}return o};dm.FP=function($){for(var f=0;f<ev.order.length;f++){var o=ev.order[f],T=ev.CP[f];if($[T]==null)$[T]={t:"VlLs",v:[]};
|
|
if($[o]!=null){$[T].v.push($[o]);delete $[o]}var s=[];for(var E=0;E<$[T].v.length;E++){var e=$[T].v[E];
|
|
if(e.v.present==null||e.v.present.v==!0)s.push(e)}$[T].v=s}};dm.y4=function($){for(var f=0;f<ev.order.length;
|
|
f++){var o=ev.order[f],T=ev.CP[f],s=$[T].v.length;if(s==0){delete $[T];continue}if(s==1){$[o]=$[T].v[0];
|
|
delete $[T];continue}}};dm.HJ=function($,o){if(o=="GdFl"){if($.Angl==null)$.Angl={v:{type:"#Ang",val:0},t:"UntF"};
|
|
if($.Algn==null)$.Algn={v:!0,t:"bool"};if($.Scl==null)$.Scl={v:{type:"#Prc",val:100},t:"UntF"};if($.Ofst==null)$.Ofst={v:{classID:"Pnt",Hrzn:{v:{type:"#Prc",val:0},t:"UntF"},Vrtc:{v:{type:"#Prc",val:0},t:"UntF"}},t:"Objc"};
|
|
if($.Rvrs==null)$.Rvrs={v:!1,t:"bool"};if($.Dthr==null)$.Dthr={v:!1,t:"bool"}}if(o=="PtFl"){if($.Algn==null)$.Algn={v:!0,t:"bool"};
|
|
if($.Scl==null)$.Scl={v:{type:"#Prc",val:100},t:"UntF"};if($.phase==null)$.phase={v:{classID:"Pnt",Hrzn:{v:0,t:"doub"},Vrtc:{v:0,t:"doub"}},t:"Objc"}}};
|
|
dm.clone=function($,o){var T={};if($=="TySh"){T.t=o.t.clone();T.Fh=JSON.parse(JSON.stringify(o.Fh));
|
|
T.Ah=JSON.parse(JSON.stringify(o.Ah));T.QH=o.QH.clone();T.h3=JSON.parse(JSON.stringify(o.h3));if(o.add)T.add={vmsk:o.add.vmsk.clone(),vogk:JSON.parse(JSON.stringify(o.add.vogk))};
|
|
return T}else if($=="fxrp")return o.clone();else if($=="vmsk")return o.clone();else return JSON.parse(JSON.stringify(o))};
|
|
function hO($,o){}hO.$$=function($,o,T,s){s=hO.a1M($,o,T,s);return s};hO._i=function($,o,T,s,E){s=hO.a5T($,o,T,s,E);
|
|
return s};hO.a1M=function($,o,T,s){var E=s;$.rect=t.AS(T,s);s+=16;var e=t.mo(T,s);s+=2;$.YT=[];var n=o.r6;
|
|
for(var f=0;f<e;f++){$.YT[f]={id:t.FU(T,s),length:(n?t.eT:t.s)(T,s+2)};s+=n?10:6}var A=t.en(T,s,4);s+=4;
|
|
if(A!="8BIM"){console.log("Invalid Blend mode signature: "+A);alert("Error in Photoshop file: wrong signature.");
|
|
throw"e"}$.fh=t.en(T,s,4);s+=4;$.opacity=T[s];s+=1;$.WL=T[s]==1;s+=1;$.Jp=T[s];s+=1;if(T[s]!=0)console.log("error in filler!");
|
|
s+=1;var u=t.s(T,s);s+=4;var Y=s;s=hO.ahd($,T,s);s=hO.aal($,T,s);var b=t.b9(T,s);$.name=b.U8;s+=b.length;
|
|
if(b.length%4!=0)s+=4-b.length%4;s=dm.R9(T,s,Y+u,$.add,n,o);if($.add.lsct){if($.add.lsct.fh)$.fh=$.add.lsct.fh;
|
|
$.add.lsct=$.add.lsct.type}return s};hO.a5T=function($,o,T,s,E){var e=s;t.k6(T,s,$.rect);s+=16;var n=$.Dv();
|
|
t.rx(T,s,n.length);s+=2;var A=o.r6;E.push(s);for(var f=0;f<n.length;f++){t.sL(T,s,n[f]);if(A)t._a(T,s+2,0);
|
|
else t.tX(T,s+2,0);s+=A?10:6}t.G4(T,s,"8BIM");s+=4;t.G4(T,s,$.fh);s+=4;t.S1(T,s,$.opacity,1);s+=1;t.S1(T,s,$.WL?1:0,1);
|
|
s+=1;t.S1(T,s,$.Jp,1);s+=1;t.S1(T,s,0,1);s+=1;var u=s;t.tX(T,s,0);s+=4;var Y=s;s=hO.a3b($,T,s);s=hO.afD($,T,s);
|
|
var b=t.Fm(T,s,$.name.slice(0,255));s+=b;if(b%4!=0)s+=4-b%4;if($.add.lsct){$.add.lsct={type:$.add.lsct};
|
|
if($.fh=="pass"){$.add.lsct.fh="pass";$.fh="norm"}}if($.fh=="pass")$.add.lsct={type:$.add.lsct,fh:"pass"};
|
|
if($.add.brit)$.add.CgEd=$.add.brit;s=dm.DR(T,s,$.add,A,o);delete $.add.CgEd;if($.add.lsct){if($.add.lsct.fh)$.fh=$.add.lsct.fh;
|
|
$.add.lsct=$.add.lsct.type}var a=s-Y;t.tX(T,u,a);return s};hO.ahd=function($,o,T){var s=t.s(o,T);T+=4;
|
|
if(s==0)return T;var E=T;$._=new M.Zb;$._.rect=t.AS(o,T);T+=16;$._.color=o[T];T+=1;var e=hO.Ct($._,o,T);
|
|
T+=1;if(e){var n=!1,A=255,u=0,Y=255,b=0;for(var f=0;f<$.YT.length;f++)if($.YT[f].id==-3)n=!0;if(n){$.Vx=hO.Qt(o,T);
|
|
T+=18}var a=T,w=o[T];T++;if(w>>0&1){A=o[T];T++}if(w>>1&1){u=t.Eo(o,T);T+=8}if(w>>2&1){Y=o[T];T++}if(w>>3&1){b=t.Eo(o,T);
|
|
T+=8}if((T-a&1)==1)T++;$.FW=[A,u,Y,b]}else{if(s==20)T+=2;else{$.Vx=hO.Qt(o,T);T+=18}}return E+s};hO.a3b=function($,o,T){t.tX(o,T,0);
|
|
T+=4;if($._==null)return T;var s=$.yy(),E=$.add.vmsk,e=T,n=!0;t.tX(o,T,0);t.k6(o,T,$._.rect);T+=16;t.S1(o,T,$._.color);
|
|
T+=1;hO.HT($._,o,T,n);T+=1;if(n){if($.Vx){hO.a3J(o,T,$.Vx);T+=18}t.S1(o,T,15);T+=1;t.S1(o,T,s?s.A7:255);
|
|
T+=1;t.IW(o,T,s?s.DI:0);T+=8;t.S1(o,T,E?E.A7:255);T+=1;t.IW(o,T,E?E.DI:0);T+=8;T++}t.tX(o,e-4,T-e);return T};
|
|
hO.Qt=function($,o){var T=new M.Zb;hO.Ct(T,$,o);o+=1;T.color=$[o];o+=1;T.rect=t.AS($,o);o+=16;return T};
|
|
hO.a3J=function($,o,T){hO.HT(T,$,o,!1);o+=1;t.S1($,o,T.color);o+=1;t.k6($,o,T.rect);o+=16};hO.Ct=function($,o,T){var s=o[T];
|
|
$.lq=(s>>0&1)==0;$.isEnabled=(s>>1&1)==0;$.Sf=(s>>3&1)==1;return s>>4&1};hO.HT=function($,o,T,s){var E=0;
|
|
if(!$.lq)E+=1<<0;if(!$.isEnabled)E+=1<<1;if($.Sf)E+=1<<3;if(s)E+=1<<4;t.S1(o,T,E)};hO.aal=function($,o,T){var s=t.s(o,T);
|
|
T+=4;if(s==0)return T;if(s!=5*8)console.log("unexpected Layer Blending Ranges content, size:",s);for(var f=0;
|
|
f<s;f++)$.so[f]=o[T+f];return T+40};hO.afD=function($,o,T){t.tX(o,T,$.so.length);T+=4;o.Y4(T,40);for(var f=0;
|
|
f<40;f++){o.data[T+f]=$.so[f]}return T+40};function hV(){}hV.$$=function($,o,T,s){s=hV.acj(o.r6,o.BK,o.Q3,$,T,s);
|
|
return s};hV.JF=function($,o,T,s,E,e){s=hV.aib($,o,T,s,E,e);return s};hV.acj=function($,o,T,s,E,e){var n=s.YT,A={},u=e;
|
|
for(var f=0;f<n.length;f++){var Y=n[f],b=Y.id,a=Y.length,w;if(b==-3)w=s.Vx.rect;else if(b==-2)w=s._.rect;
|
|
else w=s.rect;var X=hV.EM($,o,E,w.d,w.w,e,a);e+=a;if(b==-3)s.Vx.channel=X;else if(b==-2)s._.channel=X;
|
|
else A["c"+b]=X}var N=new L.uR(0);N.Ca=null;if(T==3){N.i=A.c0;N.m=A.c1;N.P=A.c2;N.Ca=A["c-1"]}else if(T==1){N.i=A.c0;
|
|
N.m=A.c0;N.P=A.c0;N.Ca=A["c-1"]}else if(T==4){var z=A.c0,i=A.c1,k=A.c2,Q=A.c3,O=z.length,c=1/255;for(var f=0;
|
|
f<O;f++){var B=z[f],G=i[f],l=k[f],v=Q[f]*c;z[f]=Math.round(B*v);i[f]=Math.round((.2*B+.8*G)*v);k[f]=Math.round((.2*G+.8*l)*v)}N.i=z;
|
|
N.m=i;N.P=k;N.Ca=A["c-1"];console.log("converting from CMYK to RGB")}if(N.i==null)N.i=L.G(0);if(N.Ca==null&&N.i!=null){N.Ca=N.i.slice(0);
|
|
N.Ca.fill(255)}if(N.m==null)N.m=N.i.slice(0);if(N.P==null)N.P=N.i.slice(0);s.buffer=L.G(Math.max(0,s.rect.Y()*4));
|
|
L.dy(N,s.buffer);return e};hV.aib=function($,o,T,s,E,e){var n=o.Dv(),A=new L.uR(o.rect.Y());L.KT(o.buffer,A);
|
|
for(var f=0;f<n.length;f++){var u=n[f],Y,b;if(u==-3)Y=o.Vx.rect;else if(u==-2)Y=o._.rect;else Y=o.rect;
|
|
if(u==-3)b=o.Vx.channel;if(u==-2)b=o._.channel;if(u==-1)b=A.Ca;if(u==0)b=A.i;if(u==1)b=A.m;if(u==2)b=A.P;
|
|
T.Y4(s,Y.Y()*3+4);var a=s;s=hV.gm($,b,T.data,Y.d,Y.w,s,e[1]?3:1);var w=s-a;if($)t.B1(T.data,E+f*10+2,w);
|
|
else t.gG(T.data,E+f*6+2,w)}return s};hV.EM=function($,o,T,s,E,e,n){var A=t.mo(T,e);e+=2;return hV.hi($,o,T,s,E,e,A,n-2)};
|
|
hV.gm=function($,o,T,s,E,e,n){t.Gn(T,e,n);e+=2;e=hV.H$($,o,T,s,E,e,n);return e};hV.hi=function($,o,T,s,E,e,n,A){var u,Y=s*E*(o>>>3),b=Y&3,a=Y+(b==0?0:4-b);
|
|
if(A<=0){return L.G(a)}if(n>3){console.log("unknown compression: "+n,s,E,s*E,A);n=0}if(n==0){if(e+a<=T.length)u=T.slice(e,e+a);
|
|
else{u=L.G(Y);for(var f=0;f<Y;f++)u[f]=T[e+f]}e+=Y}else if(n==1){u=L.G(Y);var w=$?4:2,X=hV.fv(T,u,s,E,e,e+w*E,w);
|
|
e+=w*E+X}else if(n==2||n==3){var N=new Uint8Array(T.buffer,e+2,A-6),z=pako.inflateRaw(N);if(n==3){if(o==8)for(var i=0;
|
|
i<E;i++){var k=i*s+1,Q=k+s-1,O=z[k-1];for(var c=k;c<Q;c++){O+=z[c];z[c]=O&255}}else for(var i=0;i<E;
|
|
i++){var k=i*s+1,Q=k+s-1,O=z[2*k-2]<<8|z[2*k-1];for(var c=k;c<Q;c++){var B=c<<1;O+=z[B]<<8|z[B+1];z[B]=O>>>8;
|
|
z[B+1]=O&255}}}if(z.length==a)u=z;else{u=L.G(a);for(var f=0;f<z.length;f++)u[f]=z[f]}}if(o==16){var G=L.G(s*E);
|
|
for(var f=0;f<Y;f+=2)G[f>>>1]=u[f];u=G}return u};hV.H$=function($,o,T,s,E,e,n){var A=s*E;if(n==0)for(var f=0;
|
|
f<A;f++)T[e++]=o[f];else if(n==1){var u=$?4:2,Y=hV.Fl(o,T,s,E,e,e+u*E,u);e+=u*E+Y}else if(n==2||n==3){if(n==3){var b=new Uint8Array(o.length);
|
|
for(var a=0;a<E;a++){var w=a*s+1,X=w+s-1,N=o[w-1];b[w-1]=N;for(var z=w;z<X;z++){b[z]=o[z]+(256-N)&255;
|
|
N=o[z]}}o=b}T[e]=120;T[e+1]=156;e+=2;var i=pako.deflateRaw(o,{a4U:4});t.Xx(T,e,i);e+=i.length+4}else console.log("Unknown compression: "+n);
|
|
return e};hV.fv=function($,o,T,s,E,e,n){var A=e,u=s|0;if(n==2)for(var f=0;f<u;f++){var Y=t.mo($,E+(f<<1));
|
|
hV.IE($,e,Y,o,f*T,T);e+=Y}else for(var f=0;f<u;f++){var Y=t.s($,E+(f<<2));hV.IE($,e,Y,o,f*T,T);e+=Y}return e-A};
|
|
hV.Fl=function($,o,T,s,E,e,n){var A=e;if(n==2)for(var f=0;f<s;f++){var u=hV.nn($,f*T,T,o,e);t.mS(o,E+f*2,u);
|
|
e+=u}else for(var f=0;f<s;f++){var u=hV.nn($,f*T,T,o,e);t.gG(o,E+f*4,u);e+=u}return e-A};hV.nn=function($,o,J,T,s){var E,e,n,A,u,cH,Y;
|
|
A=o+J;for(n=o,e=s;J>0;n=E,J-=cH){Y=J<128?J:128;if(n<=A-3&&$[n+1]==$[n+0]&&$[n+2]==$[n+0]){for(E=n+3;
|
|
E<n+Y&&$[E]==$[n+0];)++E;cH=E-n;T[e++]=1+256-cH;T[e++]=$[n+0]}else{for(E=n;E<n+Y;)if(E<=A-3&&$[E+1]==$[E+0]&&$[E+2]==$[E+0])break;
|
|
else++E;cH=E-n;T[e++]=cH-1;for(var f=0;f<cH;f++)T[e+f]=$[n+f];e+=cH}}return e-s};hV.IE=function($,o,T,s,E,e){for(var n=0;
|
|
n<T;){var J=$[o++];if(J>=128){var A=$[o++],u=E+(257-J);while(E+1<u){s[E++]=s[E++]=A}if(E<u)s[E++]=A;
|
|
n+=2}else{for(var f=0;f<=J;f++)s[E+f]=$[o+f];o+=J+1;E+=J+1;n+=1+1+J}}};function j3(){}j3.f9=function($,o,T){return;
|
|
var s="",E=o;while(E!=0){var e=E%1e3+"";while(e.length<3)e="0"+e;s=(s==""?e:e+" ")+s;E=Math.floor(E/1e3)}while(s.startsWith("0")&&s!="0")s=s.slice(1);
|
|
while(s.length<11)s=" "+s;console.log("===",s,"\t".repeat($),": "+T)};j3.$$=function($,o){o.r6=!1;o.BK=8;
|
|
var T=new Uint8Array($),s=0,E=0,Z,iC=!1,an=!0,cO=!1,bh=0,fH=0;E=j3.Ij(o,T,s);j3.f9(0,E-s,"PSD Header");
|
|
s=E;E=j3.apU(o,T,s);j3.f9(0,E-s,"Color Mode Data");s=E;E=j3.a1B(o,T,s);j3.f9(0,E-s,"Image Resources");
|
|
s=E;E=j3.a03(o,T,s);j3.f9(0,E-s,"Layer And Mask Info");s=E;E=j3.a8q(o,T,s);j3.f9(0,E-s,"End Image");
|
|
s=E;if(o.u.length==0){var e=o.$f();e.tM("Background");o.u.push(e);e.buffer=o.buffer.slice(0);e.rect=new df(0,0,o.d,o.w)}if(o.B0.r1005){o.fG=t.a4o(o.B0.r1005,0)}if(o.B0.r1026){var T=o.B0.r1026;
|
|
for(var f=0;f<T.length;f+=2){var E=o.u[f>>>1];if(E)E.pI=t.mo(T,f)}}if(o.B0.r1072){var T=o.B0.r1072;for(var f=0;
|
|
f<T.length;f++){var E=o.u[f];if(E)E.UD=T[f]==1}}if(o.B0.r1032){var T=o.B0.r1032,n=t.s(T,12);for(var f=0;
|
|
f<n;f++){var A=T[16+f*5+4],u=t.Cv(T,16+f*5)/32;o.yZ.push([A,u])}}delete o.B0.r1036;delete o.B0.r1039;
|
|
if(o.B0.r1050){var Y=t.s,b=o.B0.r1050,a=t.s(b,0);if(a==6){var w=4,X=t.AS(b,w);w+=16;var N=t.Ds(b,w);
|
|
w+=4+N.length*2;var z=Y(b,w);w+=4;var i=o.op;for(var f=0;f<z;f++){var k=D.j3.Vu(),O;i.push(k);k=k.v;
|
|
k.sliceID.v=Y(b,w);w+=4;k.groupID.v=Y(b,w);w+=4;var Q=Y(b,w);w+=4;if(Q==1){O=Y(b,w);w+=4}var N=t.Ds(b,w);
|
|
w+=4+N.length*2;var c=Y(b,w);w+=4;var B=[Y(b,w),Y(b,w+4),Y(b,w+8),Y(b,w+12)];w+=16;D.j3.ta(i,i.length-1,B);
|
|
var G=k.url.v=t.Ds(b,w);w+=4+G.length*2;var l=k.null.v=t.Ds(b,w);w+=4+l.length*2;var v=k.Msge.v=t.Ds(b,w);
|
|
w+=4+v.length*2;var p=k.altTag.v=t.Ds(b,w);w+=4+p.length*2;k.cellTextIsHTML.v=b[w]==1;w++;var P=k.cellText.v=t.Ds(b,w);
|
|
w+=4+P.length*2;var h=Y(b,w);w+=4;var j=Y(b,w);w+=4;var C=b.slice(w,w+4);w+=4;if(Q!=2)i.pop()}}else if(a==8){var V={};
|
|
av.tl(b,V,8,!1);var b=o.op=V.slices.v;for(var f=0;f<b.length;f++){if(b[f].v.origin.v.ESliceOrigin!="userGenerated"){b.splice(f,1);
|
|
f--}}}}if(o.B0.r1058){var d=o.B0.r1058,m=UTIF.decode(d.buffer,{parseMN:!1,debug:!1});e2.DN(m[0],o.sx);
|
|
delete o.B0.r1058}if(o.B0.r1060){var R=t.LK(o.B0.r1060);e2.Is(R,o.sx);delete o.B0.r1060}if(o.B0.r1065){var T=o.B0.r1065;
|
|
o.kk={};av.tl(T,o.kk,4,!1)}if(o.B0.r1069){var T=o.B0.r1069,g=[];for(var f=2;f<T.length;f+=4){var O=t.s(T,f);
|
|
for(var S=0;S<o.u.length;S++){var E=o.u[S];if(E.add.lyid==O&&E.add.lsct!=3)g.push(S)}}o.D=g}if(o.B0.r1025){var F=o.B0.r1025;
|
|
delete o.B0.r1025;var r=aS.Dw(F,0,F.length,o.d,o.w),q=new M.PZ;q.g=r;o.w5[0]=iG.om("Working Path",{vmsk:q})}var W=o.add.pths;
|
|
delete o.add.pths;var I=o.B0.r3000;if(I){Z={};av.tl(I,Z,4,!1);delete o.B0.r3000}for(var _=0;_<=997;_++){var cN="r"+(2e3+_),F=o.B0[cN];
|
|
if(F==null)break;var r=aS.Dw(F,0,F.length,o.d,o.w),ce=W?W.pathList.v[_].v.pathUnicodeName.v:"Path "+_,gf=Z?Z.keyRootDescriptorList.v[_].v.keyDescriptorList.v:M._L(r),q=new M.PZ;
|
|
q.g=r;o.w5[_+1]=iG.om(ce,{vmsk:q,vogk:gf});delete o.B0[cN]}delete o.r6;var K=new df(0,0,o.d,o.w),cv=o.add.Txt2,f0=cv;
|
|
if(f0){f0=f0.xo;if(f0._DocumentResources==null)f0=iB.g8(f0)}if(cv&&cv.xo._DocumentResources!=null){var i8="_Type _FrameMatrix _TextOnPathTRange _PathData _FirstBaselineAlignment _LineOrientation _RowGutter _ColumnGutter".split(" "),b5=cv.xo._DocumentResources._TextFrameSet._Resources;
|
|
for(var f=0;f<b5.length;f++){}}for(var f=0;f<o.u.length;f++){var E=o.u[f],bD=E.add.lsct,fq=E.add.vmsk,fO=E.yy();
|
|
if(bD==hd.ic){bh++;E.add.lspf=0}else if(bD==hd.NH||bD==hd.Qm)bh--;if(E.name==""){E.name="Layer "+(f+1);
|
|
cO=!0}if(cO&&E.p3()&&E.fh=="norm")E.fh="pass";if(E.HC()&&E.DE(o)._){var g6=E.DE(o);g6._.isEnabled=E.add.SoLd.filterFX.v.filterMaskEnable.v}if(fq&&E.d5()){var hM=ev.ci.default;
|
|
if(E.add.vstk==null)E.add.vstk=JSON.parse(JSON.stringify(hM));else{var d3="strokeStyleLineDashSet";if(E.add.vstk[d3]==null)E.add.vstk[d3]=JSON.parse(JSON.stringify(hM[d3]))}E.add.vstk.strokeStyleResolution.v=o.fG}if(fq&&(E.add.vogk==null||L.A.MM(fq.g)!=E.add.vogk.length))E._L();
|
|
if(E.add.SoLd&&E.rect.p4()){console.log("redrawing smart instance");E.qI(o)}if(fO==null&&E._!=null){if(E._.Sf==!1){E._.Sf=!0;
|
|
E.Vx=E._.clone()}}fO=E.yy();if(E.FW){var hM=E.FW,q=fq;if(fO){fO.A7=hM[0];fO.DI=hM[1]}if(q){q.A7=hM[2];
|
|
q.DI=hM[3]}E.FW=null}if(fO!=null&&fq!=null&&(fO.DI+fq.DI!=0||fO.A7+fq.A7!=2*255))E.tF(o);else if(fq!=null&&!E.d5())E.tF();
|
|
var h9=E.add.artb;if(h9&&h9.artboardBackgroundType==null)h9.artboardBackgroundType={t:"long",v:1};if(h9&&bh!=0)delete E.add.artb;
|
|
var cs=E.add.vstk;if(E.d5()&&(E.rect.p4()||fq&&fq.DI!=0||cs&&!cs.fillEnabled.v&&(!cs.strokeEnabled.v||cs.strokeStyleLineWidth.v.val==0)))E.wn(o);
|
|
if(E.add.TySh){iC=!0;if(!E.rect.p4())an=!1}if(E.add.TySh&&f0){var dv=E.add.TySh.Fh.TextIndex.v;if(dv==-1)continue;
|
|
var ec=E.add.TySh.h3,gT=g8.Hs(ec),iz=f0._DocumentObjects._TextObjects;if(iz.length<=dv){console.log("Txt2 incomplete");
|
|
continue}var gw=iz[dv]._Model,iI=gw._StyleRun?gw._StyleRun._RunArray:[],g2=ec.ResourceDict.StyleSheetSet[0].StyleSheetData.FontSize;
|
|
if(g2==null)g2=12;var bb=ec.EngineDict.StyleRun.RunArray;for(var ir=0;ir<bb.length;ir++){var dG=bb[ir].StyleSheet.StyleSheetData;
|
|
if(iI[ir]==null)continue;var gY=iI[ir]._RunData._StyleSheet._Features;if(gY&&gY._BaselineDirection)dG.BaselineDirection=parseInt(gY._BaselineDirection.slice(1))}var e6=ec.EngineDict.ParagraphRun.RunArray,fr=gw._ParagraphRun._RunArray;
|
|
if(fr==null)fr=[];var bt=Math.min(fr.length,e6.length);for(var S=0;S<bt;S++){var cx=e6[S].ParagraphSheet.Properties,ci=f0._DocumentResources._ParagraphSheetSet._Resources,gv=fr[S]._RunData._ParagraphSheet;
|
|
if(typeof gv=="string")gv=ci[parseInt(gv.slice(1))]._Resource;var gu=gv._Parent==null?gv:ci[parseInt(gv._Parent.slice(1))]._Resource;
|
|
gv=gv._Features;gu=gu._Features;var ak=gv._ParagraphDirection;if(ak==null)ak=gu._ParagraphDirection;
|
|
if(ak)cx._Direction=parseInt(ak.slice(1));if(gv._ComposerEngine)cx._ComposerEngine=parseInt(gv._ComposerEngine.slice(1))}var hP=f0._DocumentResources,ai=hP._TextFrameSet._Resources,hK=ai[dv]._Resource,h3=hK._Data,e4=new fY(1,0,0,1,0,0);
|
|
if(hK._0){var co=parseFloat(hK._0[0].slice(1)),aO=parseFloat(hK._0[1].slice(1));e4.translate(co,aO)}if(gT){e4.translate(gT[0],gT[1]);
|
|
g8.bi(ec,[0,0,gT[2]-gT[0],gT[3]-gT[1]])}else{if(hK._Bezier&&hK._Bezier._Points){var r=hK._Bezier._Points,co=parseFloat(r[0].slice(1)),aO=parseFloat(r[1].slice(1));
|
|
if(co!=0||aO!=0){e4.translate(co,aO)}}}if(hK._Data&&hK._Data._FrameMatrix){var cC=hK._Data._FrameMatrix;
|
|
cC=cC.map(function(ix){return parseFloat(ix.slice(1))});e4.concat(new fY(cC[0],cC[1],cC[2],cC[3],cC[4],cC[5]))}e4.concat(E.add.TySh.t);
|
|
E.add.TySh.t=e4;var c=h3._Type?parseInt(h3._Type.slice(1)):0;if(c==2||c==1&&h3._PathData._Spacing=="i-3"){var hm=function(ix){return parseFloat(ix.slice(1))},r=hK._Bezier._Points.map(hm);
|
|
if(gT)L.M.t(r,new fY(1,0,0,1,-gT[0],-gT[1]),r);var cu=h3._PathData?h3._PathData._Reversed:!1;ec.Curve={Points:r,TextOnPathTRange:h3._TextOnPathTRange.map(hm),Reversed:cu==null?!1:cu};
|
|
E.add.TySh.add={vmsk:new M.PZ,vogk:null};g8.mg(E.add.TySh)}if(h3._LineOrientation=="i2")ec._LineOrientation=2}}cf.xg.ka(o,!0);
|
|
var bF={},dX=[];for(var f=0;f<o.u.length;f++){var fk=o.u[f].add.lyid;if(fk==null)continue;var fH=Math.max(fH,fk);
|
|
if(bF[fk]!=null)dX.push(f);else bF[fk]=!0}for(var f=0;f<dX.length;f++)o.u[dX[f]].add.lyid=fH+1+f};j3._i=function($,o,T){cf.xg.$p($);
|
|
cf.xg.ka($,!1);$.r6=T[3]==!0;var s=[],E=[],X=0,z=1,B=16,I=0;for(var f=0;f<$.u.length;f++){var e=$.u[f];
|
|
if(e.HC()&&e.DE($)._){e.add.SoLd.filterFX.v.filterMaskEnable.v=e.DE($)._.isEnabled}if(e.add.TySh){var n=e.add.TySh.h3,A=g8.tb(n);
|
|
e.add.TySh.Fh.TextIndex={t:"long",v:s.length};s.push(n);if(A==2)g8.J2(e.add.TySh)}var u=e.add.vstk;if(u)u.strokeStyleResolution.v=$.fG;
|
|
if(e.d5()||T[2]&&e.add.SoLd){E[f]=[e.rect,e.buffer];e.rect=new df;e.buffer=L.G(0)}}if(s.length>0){var Y=$.add.Txt2?$.add.Txt2.xo:null;
|
|
$.add.Txt2={};$.add.Txt2.xo=c8.aed(s,null,Y)}var b=[$.add.lnk2,$.add.FEid,$.add.Patt],a=$.al7($.u);$.yJ(a);
|
|
$.B0.r1005=new Uint8Array([0,0,0,0,0,1,0,2,0,0,0,0,0,1,0,2]);t.qP($.B0.r1005,0,$.fG);t.qP($.B0.r1005,8,$.fG);
|
|
if($.$X()){$.B0.r1022=new Uint8Array([0,3+$.iy.length-1,0])}else delete $.B0.r1022;var w=new Uint8Array($.u.length*2),N=new Uint8Array($.u.length);
|
|
for(var f=0;f<$.u.length;f++){var e=$.u[f],i=e.pI,k=e.UD?1:0;t.mS(w,f*2,i);N[f]=k;if(i>X)X=i;if(k==0)z=0}if(X>0)$.B0.r1026=w;
|
|
if(z<1)$.B0.r1072=N;var Q=$.yZ,O=Q.length,c=$.B0.r1032=L.G(16+5*O,!0);t.gG(c,0,1);t.gG(c,4,576);t.gG(c,8,576);
|
|
t.gG(c,12,O);for(var f=0;f<O;f++){t.Bz(c,B,Math.round(Q[f][1]*32));c[B+4]=Q[f][0];B+=5}var G=L.jh($.buffer),l=[];
|
|
if(G)l.push({name:"Transparency",zS:{i:255,m:0,P:0},yF:100,tU:1});l=l.concat($.iy);delete $.B0.r1045;
|
|
delete $.B0.r1006;delete $.B0.r1077;var v=new bV;B=0;var p=new Uint8Array(4+l.length*13);p[3]=1;for(var f=0;
|
|
f<l.length;f++){var P=l[f],h=P.name+"\0";t.LR(v,B,h);B+=4+h.length*2;var j=4+f*13;bf.xr(p,j,P.zS);p[j+11]=P.yF;
|
|
p[j+12]=P.tU}$.B0.r1045=v.data.slice(0,B);$.B0.r1077=p;for(var f=0;f<$.op.length;f++)$.op[$.op.length-f-1].v.sliceID.v=2+f*3;
|
|
var C={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:$.op}},v=new bV;
|
|
t.tX(v,0,8);t.tX(v,4,16);var V=av.ob(v,C,8);$.B0.r1050=v.data.slice(0,V+8);var v=new bV;t.tX(v,0,16);
|
|
var V=av.ob(v,$.kk,4);$.B0.r1065=v.data.slice(0,V+4);var d=$.D;c=$.B0.r1069=L.G(2+d.length*4,!0);t.mS(c,0,d.length);
|
|
for(var f=0;f<d.length;f++)t.gG(c,2+4*f,$.u[d[f]].add.lyid);delete $.B0.r1058;delete $.B0.r1060;if(Object.keys($.sx).length!=0){var R=[{t274:[1],t282:[[72,1]],t283:[[72,1]],t296:[2]},{t259:[6],t282:[[72,1]],t283:[[72,1]],t296:[2],t513:[302],t514:[0]}];
|
|
e2.ge($.sx,R[0],T[0]&&T[1]);$.B0.r1058=new Uint8Array(UTIF.encode(R));var g=e2.zm($.sx);$.B0.r1060=t.Te(g)}var S=[],F=[];
|
|
for(var f=0;f<$.w5.length;f++){var r=$.w5[f],q=r.add.vmsk.g;if(f==0&&q.length==2)continue;var W=L.G(q.length*26);
|
|
aS.eM(W,0,q,$.d,$.w);var Z=f==0?1025:2e3+f-1;$.B0["r"+Z]=W;if(f!=0){S.push({t:"Objc",v:{classID:"pathInfoClass",pathUnicodeName:{t:"TEXT",v:r.name}}});
|
|
F.push({t:"Objc",v:{classID:"null",keyDescriptorList:{t:"VlLs",v:r.add.vogk}}})}}if(S.length!=0){$.add.pths={classID:"pathsDataClass",pathList:{t:"VlLs",v:S}};
|
|
F={classID:"null",keyRootDescriptorList:{t:"VlLs",v:F}};var v=new bV;t.tX(v,0,16);var V=av.ob(v,F,4);
|
|
$.B0.r3000=v.data.slice(0,V+4)}else{delete $.add.pths;delete $.B0.r3000}I=j3.afV($,o,I,3+l.length);I=j3.ajV($,o,I);
|
|
I=j3.a7G($,o,I);I=j3.ann($,o,I,T,G);I=j3.aba($,o,I,T[0],G);var _=[1025,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016];
|
|
for(var f=0;f<_.length;f++)delete $.B0["r"+_[f]];for(var f=0;f<$.u.length;f++){var e=$.u[f];if(e.d5()||T[2]&&e.add.SoLd){e.rect=E[f][0];
|
|
e.buffer=E[f][1]}}$.yJ(b);cf.xg.ka($,!0);delete $.r6;return I};j3.Ij=function($,o,T){var s=t.en(o,T,4);
|
|
T+=4;if(s!="8BPS")alert("invalid header signature: "+s);var E=t.mo(o,T);T+=2;$.r6=E==2;if(E!=1&&E!=2)alert("invalid version: "+E);
|
|
T+=6;$.Zl=t.mo(o,T);T+=2;$.w=t.Cv(o,T);T+=4;$.d=t.Cv(o,T);T+=4;$.BK=t.mo(o,T);T+=2;$.Q3=t.mo(o,T);T+=2;
|
|
return T};j3.afV=function($,o,T,s){o.Y4(0,64);t.dt(o.data,T,"8BPS");T+=4;t.mS(o.data,T,$.r6?2:1);T+=2;
|
|
t.gG(o.data,T,0);T+=4;t.mS(o.data,T,0);T+=2;t.mS(o.data,T,s);T+=2;t.Bz(o.data,T,$.w);T+=4;t.Bz(o.data,T,$.d);
|
|
T+=4;t.mS(o.data,T,8);T+=2;t.mS(o.data,T,3);T+=2;return T};j3.apU=function($,o,T){var s=t.Cv(o,T);T+=4;
|
|
if(s!=0)$.Ck=o.slice(T,T+s);T+=s;return T};j3.ajV=function($,o,T){t.rV(o,T,0);T+=4;return T};j3.a1B=function($,o,T){var s=t.s(o,T),E=0;
|
|
T+=4;var e=[];while(E<s){var n=t.en(o,T+E,4);E+=4;var A=t.mo(o,T+E);E+=2;var u=t.b9(o,T+E);E+=u.length;
|
|
if(n!="8BIM"){e.push(A);console.log("Unknown Image Resources signature: "+n+", ID: "+A)}var Y=t.s(o,T+E);
|
|
E+=4;if($.B0["r"+A]!=null)console.log("--- two resources with same ID");$.B0["r"+A]=t.YM(o,T+E,Y);E+=Y+(Y&1)}for(var f=0;
|
|
f<e.length;f++)delete $.B0["r"+e[f]];return T+s};j3.a7G=function($,o,T){var s=T,n=0;T+=4;var E=[];for(var e in $.B0){E.push(parseInt(e.slice(1)))}E.sort(function(a,w){return a-w});
|
|
for(var f=0;f<E.length;f++){t.G4(o,T+n,"8BIM");n+=4;var A=E[f];t.rx(o,T+n,A);n+=2;var u=t.Fm(o,T+n,"");
|
|
n+=u;var Y=$.B0["r"+A],b=Y.length;t.tX(o,T+n,b);n+=4;t.vS(o,T+n,Y);n+=b;if(b%2==1)n++}t.tX(o,s,n);return T+n};
|
|
j3.a03=function($,o,T){var s=T,E,e,n=$.r6?8:4;if($.r6)E=t.eT(o,T);else E=t.s(o,T);T+=n;if(E==0)return s+n;
|
|
e=j3.a29($,o,T);j3.f9(1,e-T,"Layer Info");T=e;e=j3.apq($,o,T);j3.f9(1,e-T,"Global Layer Mask Info");
|
|
T=e;e=dm.R9(o,T,s+n+E,$.add,$.r6,$);j3.f9(1,e-T,"Project Add Info");T=e;return s+n+E};j3.ann=function($,o,T,s,E){var e=T;
|
|
t.tX(o,T,0);T+=4;if($.r6){t.tX(o,T,0);T+=4}T=j3.ad1($,o,T,s,E);T=j3.amK($,o,T);T=dm.DR(o,T,$.add,$.r6,$);
|
|
if($.r6)t._a(o,e,T-e-8);else t.tX(o,e,T-e-4);return T};j3.a29=function($,o,T){var s,E=$.r6?8:4;if($.r6)s=t.eT(o,T);
|
|
else s=t.s(o,T);T+=E;if(s!=0)j3.xy($,o,T);return T+s};j3.xy=function($,o,T){var s=t.FU(o,T);T+=2;var E=Math.abs(s);
|
|
for(var f=0;f<E;f++){var e=new M;T=hO.$$(e,$,o,T);$.u[f]=e}var n=new df(0,0,$.d,$.w);for(var f=0;f<E;
|
|
f++){var A=$.u[f],u=A.yy(),Y=hV.$$(A,$,o,T);if(Y-T>8)j3.f9(2,Y-T,"Lay: "+A.getName());T=Y;j3.UX(A,n);
|
|
if(u)j3.UX(u,n)}};j3.UX=function($,o){var T=$.rect.Y(),s=$.rect.Sr(o),E=s.Y()/T;if(T>2e3*3e3&&E<.5){if($.buffer){var e=L.G(s.Y()*4);
|
|
L.h9($.buffer,$.rect,e,s);$.buffer=e;$.rect=s}else{var e=L.G(s.Y());L.pg($.channel,$.rect,e,s);$.channel=e;
|
|
$.rect=s}alert("Removing hidden parts of layers")}};j3.ad1=function($,o,T,s,E){var e=T,n=$.r6;T+=n?8:4;
|
|
T=j3.Dj($,o,T,s,E);var A=T-e-(n?8:4);if(A%2!=0)A++;if(n)t._a(o,e,A);else t.tX(o,e,A);return e+A+(n?8:4)};
|
|
j3.Dj=function($,o,T,s,E){var e=$.u.length;t.sL(o,T,E?-e:e);T+=2;var n=[];for(var f=0;f<e;f++)T=hO._i($.u[f],$,o,T,n);
|
|
for(var f=0;f<e;f++)T=hV.JF($.r6,$.u[f],o,T,n[f],s);return T};j3.apq=function($,o,T){var s=t.s(o,T);
|
|
T+=4;T+=s;return T};j3.amK=function($,o,T){var s=t.tX(o,T,0);T+=4;return T};j3.a8q=function($,o,T){var s=$.Q3,E="Bitmap Grayscale Indexed RGB CMYK Multichannel Duotone Lab".split(" "),e=[1,1,1,3,4,1,1,3],n,z;
|
|
if(s!=3){if(s==1||s==2||s==4)alert("Project will be converted from "+E[s]+" to "+E[3]+" mode.");else{alert("Color mode "+E[s]+" is not supported yet :(")}}if($.B0.r1045){n=[];
|
|
var A=$.B0.r1045,u=0;while(u<A.length){var Y=t.rB(A,u);n.push(Y);u+=4+2+Y.length*2}}var b=e[s]+(n==null||n[0]=="Transparency"?1:0),a=$.d,w=$.w,X=a*w,N=t.mo(o,T);
|
|
T+=2;$.buffer=L.G(X*4);L.wr($.buffer,4278190080);var i=T;for(var k=0;k<$.Zl;k++){if(N==0){z=hV.hi($.r6,$.BK,o,a,w,T,N);
|
|
T+=X*($.BK>>>3)}else if(N==1){z=L.G(X);var Q=$.r6?4:2;if(k==0)T+=$.Zl*w*Q;T+=hV.fv(o,z,a,w,i+k*w*Q,T,Q)}else{console.log("unknown compression of image data: ",N);
|
|
return}if(k<b){L.aM(z,$.buffer,k);if($.Zl==1&&k==0){L.aM(z,$.buffer,1);L.aM(z,$.buffer,2)}}else{var O=new M.Zb,c=k-b,B=k-e[$.Q3];
|
|
O.name=n?n[B]:"Alpha";if(O.name=="Quick Mask"){O.T9=!0;$.el.push(c)}O.rect=new df(0,0,a,w);O.channel=z;
|
|
O.color=0;O.Gg();$.iy[c]=O;if($.B0.r1077){var A=$.B0.r1077.slice(4+B*13);O.zS=bf.So(A,0);O.yF=A[11];
|
|
O.tU=A[12];if(O.tU==2)O.T9=!0}}}$.Zl=4;if($.Q3==2)for(var f=0;f<X;f++){var G=f*4,l=$.buffer[G];$.buffer[G]=$.Ck[0+l];
|
|
$.buffer[G+1]=$.Ck[256+l];$.buffer[G+2]=$.Ck[512+l]}return T};j3.aba=function($,o,T,s,E){var e=1,n=16,A=$.d,u=$.w,b,a;
|
|
t.rx(o,T,e);T+=2;var Y=A*u;if(!s){a=new L.uR(A*u);L.KT($.buffer,a);var w=a.i,X=a.m,N=a.P,z=a.Ca;for(var f=0;
|
|
f<Y;f++){var i=z[f]*(1/255);w[f]=~~(w[f]*i+255*(1-i));X[f]=~~(X[f]*i+255*(1-i));N[f]=~~(N[f]*i+255*(1-i))}}else b=L.G(Y);
|
|
var k=[b,b,b];if(!s)k=[a.i,a.m,a.P];if(E)k.push(s?b:a.Ca);for(var f=0;f<$.iy.length;f++){k.push($.iy[f].$a(new df(0,0,$.d,$.w)))}var Q=T;
|
|
for(var O=0;O<k.length;O++){o.Y4(T,A*u+4);b=k[O];if(e==0||e==2||e==3)T=hV.H$($.r6,b,o.data,A,u,T,e);
|
|
else{var c=$.r6?4:2;if(O==0)T+=k.length*u*c;var B=T;T+=hV.Fl(b,o.data,A,u,Q+O*u*c,T,c)}}return T};function h6(){}h6.$$=function($){var o={};
|
|
h6.Bx($,o,0,0);return o};h6._i=function($,o){var T=0;T=h6.mN($,o,T,0);return T};h6.Bx=function($,o,T,s){while($[T]!="<".charCodeAt(0))T++;
|
|
T+=2;while(!0){if($[T]=="/".charCodeAt(0)){T++;var E=t.indexOf($," ".charCodeAt(0),T,T+50),e=t.indexOf($,"\n".charCodeAt(0),T,T+50);
|
|
if(e==-1)e=Infinity;if(E==-1)E=Infinity;var n=Math.min(e,E),A=t.en($,T,n-T),u=h6.tR($,n+1,s+1,A);o[A]=u.H;
|
|
T=n+1;T+=u.size}else if($[T]==">".charCodeAt(0)){T+=2;break}else{var Y=$[T];if(Y==10||Y==9||Y==32)T++;
|
|
else{console.log("unknown byte: "+Y+", char: "+String.fromCharCode(Y),T);T++}}}return T};h6.mN=function($,o,T,s){t.G4(o,T,"<<\n");
|
|
T+=3;var E=h6.a5F;for(var e in $){t.S1(o,T,"\t".charCodeAt(0),s+1);T+=s+1;t.G4(o,T,"/"+e);T+=1+e.length;
|
|
if(E($[e])||$[e]instanceof Array){t.G4(o,T," ");T++}else{t.G4(o,T,"\n");T++;t.S1(o,T,"\t".charCodeAt(0),s+1);
|
|
T+=s+1}T=h6.nK($[e],o,T,s+1);t.G4(o,T,"\n");T++}t.S1(o,T,"\t".charCodeAt(0),s);T+=s;t.G4(o,T,">>");T+=2;
|
|
return T};h6.tR=function($,o,T,s){var E=o,e={size:0,H:0};while(!0){while($[o]==" ".charCodeAt(0)||$[o]=="\t".charCodeAt(0)||$[o]=="\n".charCodeAt(0))o++;
|
|
if($[o]=="<".charCodeAt(0)){e.H={};o=h6.Bx($,e.H,o,T+1);break}else if($[o]=="(".charCodeAt(0)){o+=3;
|
|
var n=o;while(!0){if($[n-1]!="\\".charCodeAt(0)&&$[n]==")".charCodeAt(0)&&($[n+1]=="\n".charCodeAt(0)||$[n+1]==" ".charCodeAt(0)))break;
|
|
else n++}e.H=t.fz($,o,n);o=n+2;break}else if($[o]=="[".charCodeAt(0)){o++;e.H=[];while($[o]==" ".charCodeAt(0)||$[o]=="\t".charCodeAt(0)||$[o]=="\n".charCodeAt(0))o++;
|
|
while($[o]!="]".charCodeAt(0)){var A=h6.tR($,o,T+1,s);e.H.push(A.H);o+=A.size;while($[o]==" ".charCodeAt(0)||$[o]=="\t".charCodeAt(0)||$[o]=="\n".charCodeAt(0))o++}o++;
|
|
break}else{var u=t.indexOf($," ".charCodeAt(0),o,o+50),Y=t.indexOf($,"\n".charCodeAt(0),o,o+50);if(Y==-1)Y=Infinity;
|
|
if(u==-1)u=Infinity;var b=t.en($,o,Math.min(u,Y)-o).trim(),a=parseFloat(b);if(!isNaN(a)){e.H=parseFloat(b);
|
|
o=Math.min(u,Y)+1;break}else if(b=="true"||b=="false"){e.H=b=="true";o=Math.min(u,Y)+1;break}else if(b=="null"||b=="NaN"||b=="undefined"){e.H=0;
|
|
o=Math.min(u,Y)+1;break}else{console.log("unknown identifier: "+b);throw"e"}o=Math.min(u,Y)+1}}e.size=o-E;
|
|
return e};h6.nK=function($,o,T,s){if($ instanceof Array){var E=$.length==0||typeof $[0]=="number";if(E){t.G4(o,T,"[ ");
|
|
T+=2;for(var f=0;f<$.length;f++){var e=$[f]+" ";t.G4(o,T,e);T+=e.length}t.G4(o,T,"]");T+=1}else{t.G4(o,T,"[\n");
|
|
T+=2;for(var f=0;f<$.length;f++){t.S1(o,T,"\t".charCodeAt(0),s);T+=s;T=h6.nK($[f],o,T,s);t.G4(o,T,"\n");
|
|
T++}t.S1(o,T,"\t".charCodeAt(0),s);T+=s;t.G4(o,T,"]");T+=1}}else if($ instanceof Object){T=h6.mN($,o,T,s)}else if(typeof $=="string"){t.G4(o,T,"(");
|
|
T++;t.S1(o,T,254);T++;t.S1(o,T,255);T++;T=t.Ek(o,T,$);t.G4(o,T,")");T+=1}else{var e=$+"";t.G4(o,T,e);
|
|
T+=e.length}return T};h6.a5F=function($){var o=typeof $;return o=="string"||o=="number"||o=="boolean"};
|
|
function cK(){}cK.$$=function($){var o={};cK.O4($,o,0,0);return o};cK._i=function($,o){var T=0;t.G4(o,T," ");
|
|
T++;T=cK.O0($,o,T,0);T--;o.Y4(T,2);o.data[T]=o.data[T+1]=0;T+=2;return T};cK.Bx=function($,o,T,s){while($[T]!="<".charCodeAt(0)){T++;
|
|
console.log("\u0161ipka")}T+=2;T=cK.O4($,o,T,s);return T};cK.mN=function($,o,T,s){t.G4(o,T,"<< ");T+=3;
|
|
T=cK.O0($,o,T,s);t.G4(o,T,">>");T+=2;return T};cK.fk=function($){return $==9||$==10||$==32};cK.O4=function($,o,T,s){while(!0){while(cK.fk($[T])||$[T]==0)T++;
|
|
if(T>=$.length)break;if($[T]=="/".charCodeAt(0)){T++;var E=T;while(!cK.fk($[E]))E++;var e=t.en($,T,E-T);
|
|
T=E+1;var n=cK.tR($,T,s,e);o["_"+e]=n.H;T+=n.size}else if($[T]==">".charCodeAt(0)){T+=2;break}else{var A=$[T];
|
|
console.log(t.en($,T,T+100));console.log("unknown byte: "+A+", char: "+String.fromCharCode(A)+", offset: "+T);
|
|
T++;throw"e";return-1}}return T};cK.O0=function($,o,T,s){for(var E in $){var e=E.substring(1,E.length);
|
|
t.G4(o,T,"/"+e);T+=1+e.length;t.G4(o,T," ");T++;T=cK.nK($[E],o,T,s+1);t.G4(o,T," ");T++}return T};cK.tR=function($,o,T,s){var E=o,e={type:"",size:0,H:0};
|
|
while(cK.fk($[o]))o++;if($[o]=="<".charCodeAt(0)){e.type="Object";e.H={};o=cK.Bx($,e.H,o,T+1)}else if($[o]=="(".charCodeAt(0)){e.type="String";
|
|
o++;if($[o]==")".charCodeAt(0)){e.H="s";o++}else{o+=2;var n=o,A=0;while(!0){if($[n]==")".charCodeAt(0)&&$[n-1]!="\\".charCodeAt(0))break;
|
|
else n+=1}e.H="s"+t.fz($,o,n);o=n+2}}else if($[o]=="[".charCodeAt(0)){o++;e.H=[];e.type="Array";while(cK.fk($[o]))o++;
|
|
while($[o]!="]".charCodeAt(0)){var u=cK.tR($,o,T+1,s);if(u==-1)return-1;e.H.push(u.H);o+=u.size;delete u.size;
|
|
while(cK.fk($[o]))o++}o++}else{var Y=o;while(!cK.fk($[Y]))Y++;var b=t.en($,o,Y-o),a=parseFloat(b);if(!isNaN(a)&&b.indexOf(".")!=-1){e.type="Float";
|
|
var w=parseFloat(b);e.H="f"+w}else if(!isNaN(a)&&b.indexOf(".")==-1){e.type="Integer";e.H="i"+parseInt(b)}else if(b=="true"||b=="false"){e.type="Boolean";
|
|
e.H=b=="true"}else if(b.charAt(0)=="/"){e.type="BString";e.H=b}else if(b=="NaN"){e.type="Float";e.H="f0"}else{console.log("unknown value",JSON.stringify(b));
|
|
throw"e"}o=Y+1}e.size=o-E;return e};cK.alB=function($){if($==Math.round($))return $+".0";var o=$.toFixed(5);
|
|
if(0<$&&$<1)o=o.substring(1,o.length);if(-1<$&&$<0)o="-"+o.substring(2,o.length);return o};cK.nK=function($,o,T,s){var E=typeof $=="string"?$.charAt(0):"";
|
|
if($ instanceof Array){t.G4(o,T,"[ ");T+=2;for(var f=0;f<$.length;f++){T=cK.nK($[f],o,T,s);t.G4(o,T," ");
|
|
T++}t.G4(o,T,"]");T+=1}else if($ instanceof Object){T=cK.mN($,o,T,s)}else if(E=="s"){t.G4(o,T,"(");T++;
|
|
t.S1(o,T,254);T++;t.S1(o,T,255);T++;T=t.Ek(o,T,$.substring(1));t.G4(o,T,")");T++}else if(E=="/"){t.G4(o,T,$);
|
|
T+=$.length}else if(E=="f"){var e=parseFloat($.substring(1)),n=cK.alB(e);t.G4(o,T,n);T+=n.length}else if(E=="i"){t.G4(o,T,$.substring(1));
|
|
T+=$.length-1}else{var n=$+"";t.G4(o,T,n);T+=n.length}return T};function aY($,o){if(!$)$=0;if(!o)o=0;
|
|
this.x=$;this.y=o}aY.prototype.add=function($){return new aY(this.x+$.x,this.y+$.y)};aY.prototype.clone=function(){return new aY(this.x,this.y)};
|
|
aY.prototype.sn=function($){this.x=$.x;this.y=$.y};aY.prototype.R1=function($){return this.x==$.x&&this.y==$.y};
|
|
aY.prototype.normalize=function($){var o=Math.sqrt(this.x*this.x+this.y*this.y);this.x*=$/o;this.y*=$/o};
|
|
aY.prototype.offset=function($,o){this.x+=$;this.y+=o};aY.prototype.A5=function($,o){this.x=$;this.y=o};
|
|
aY.prototype.V4=function($){return new aY(this.x-$.x,this.y-$.y)};aY.Sa=function($,o){return aY.a2G($.x,$.y,o.x,o.y)};
|
|
aY.YY=function($,o,T){return new aY($.x+T*(o.x-$.x),$.y+T*(o.y-$.y))};aY.ah6=function($,o){return new aY($*Math.cos(o),$*Math.sin(o))};
|
|
aY.a2G=function($,o,T,s){return Math.sqrt((T-$)*(T-$)+(s-o)*(s-o))};aY.Kz={};aY.FV={};aY.Kz.create=function(){var $=new Float32Array(4);
|
|
return $};aY.FV.create=function($){var o=new Float32Array(16);o[0]=o[5]=o[10]=o[15]=1;if($)aY.FV.set($,o);
|
|
return o};aY.Kz.add=function($,o,T){T[0]=$[0]+o[0];T[1]=$[1]+o[1];T[2]=$[2]+o[2];T[3]=$[3]+o[3]};aY.Kz.set=function($,o){o[0]=$[0];
|
|
o[1]=$[1];o[2]=$[2];o[3]=$[3]};aY.FV.set=function($,o){o[0]=$[0];o[1]=$[1];o[2]=$[2];o[3]=$[3];o[4]=$[4];
|
|
o[5]=$[5];o[6]=$[6];o[7]=$[7];o[8]=$[8];o[9]=$[9];o[10]=$[10];o[11]=$[11];o[12]=$[12];o[13]=$[13];o[14]=$[14];
|
|
o[15]=$[15]};aY.FV.multiply=function($,o,T){var s=$[0],E=$[1],e=$[2],n=$[3],A=$[4],u=$[5],Y=$[6],b=$[7],a=$[8],w=$[9],X=$[10],N=$[11],z=$[12],i=$[13],k=$[14],Q=$[15],O=o[0],c=o[1],B=o[2],G=o[3];
|
|
T[0]=O*s+c*A+B*a+G*z;T[1]=O*E+c*u+B*w+G*i;T[2]=O*e+c*Y+B*X+G*k;T[3]=O*n+c*b+B*N+G*Q;O=o[4];c=o[5];B=o[6];
|
|
G=o[7];T[4]=O*s+c*A+B*a+G*z;T[5]=O*E+c*u+B*w+G*i;T[6]=O*e+c*Y+B*X+G*k;T[7]=O*n+c*b+B*N+G*Q;O=o[8];c=o[9];
|
|
B=o[10];G=o[11];T[8]=O*s+c*A+B*a+G*z;T[9]=O*E+c*u+B*w+G*i;T[10]=O*e+c*Y+B*X+G*k;T[11]=O*n+c*b+B*N+G*Q;
|
|
O=o[12];c=o[13];B=o[14];G=o[15];T[12]=O*s+c*A+B*a+G*z;T[13]=O*E+c*u+B*w+G*i;T[14]=O*e+c*Y+B*X+G*k;T[15]=O*n+c*b+B*N+G*Q;
|
|
return T};aY.FV.inverse=function($,o){var T=$[0],s=$[1],E=$[2],e=$[3],n=$[4],A=$[5],u=$[6],Y=$[7],b=$[8],a=$[9],w=$[10],X=$[11],N=$[12],z=$[13],i=$[14],k=$[15],Q=T*A-s*n,O=T*u-E*n,c=T*Y-e*n,B=s*u-E*A,G=s*Y-e*A,l=E*Y-e*u,v=b*z-a*N,p=b*i-w*N,P=b*k-X*N,h=a*i-w*z,j=a*k-X*z,C=w*k-X*i,V=Q*C-O*j+c*h+B*P-G*p+l*v;
|
|
if(!V){return null}V=1/V;o[0]=(A*C-u*j+Y*h)*V;o[1]=(E*j-s*C-e*h)*V;o[2]=(z*l-i*G+k*B)*V;o[3]=(w*G-a*l-X*B)*V;
|
|
o[4]=(u*P-n*C-Y*p)*V;o[5]=(T*C-E*P+e*p)*V;o[6]=(i*c-N*l-k*O)*V;o[7]=(b*l-w*c+X*O)*V;o[8]=(n*j-A*P+Y*v)*V;
|
|
o[9]=(s*P-T*j-e*v)*V;o[10]=(N*G-z*c+k*Q)*V;o[11]=(a*c-b*G-X*Q)*V;o[12]=(A*p-n*h-u*v)*V;o[13]=(T*h-s*p+E*v)*V;
|
|
o[14]=(z*O-N*B-i*Q)*V;o[15]=(b*B-a*O+w*Q)*V;return o};aY.FV.a4w=function($,o,T){var s=o[0],E=o[1];T[0]=s*$[0]+E*$[4]+$[12];
|
|
T[1]=s*$[1]+E*$[5]+$[13]};aY.FV.amN=function($,o,T){var s=o[0],E=o[1],e=o[2],n=o[3];T[0]=$[0]*s+$[4]*E+$[8]*e+$[12]*n;
|
|
T[1]=$[1]*s+$[5]*E+$[9]*e+$[13]*n;T[2]=$[2]*s+$[6]*E+$[10]*e+$[14]*n;T[3]=$[3]*s+$[7]*E+$[11]*e+$[15]*n};
|
|
function fY($,o,T,s,E,e){if(typeof $==="undefined"){$=1;o=0;T=0;s=1;E=0;e=0}this.Ca=$;this.P=o;this.Z9=T;
|
|
this.Um=s;this.Ry=E;this.Es=e}fY.prototype.jZ=function(){return Math.sqrt(Math.abs(this.Ca*this.Um-this.P*this.Z9))};
|
|
fY.prototype.Fs=function(){var $=this,o=function(T){return Math.abs(T)<1e-9?0:T};$.Ca=o($.Ca);$.P=o($.P);
|
|
$.Z9=o($.Z9);$.Um=o($.Um);$.Ry=o($.Ry);$.Es=o($.Es)};fY.prototype.bb=function($){return new aY($.x*this.Ca+$.y*this.Z9+this.Ry,$.x*this.P+$.y*this.Um+this.Es)};
|
|
fY.prototype.translate=function($,o){this.Ry+=$;this.Es+=o};fY.prototype.rotate=function($){var o=new fY(Math.cos($),-Math.sin($),Math.sin($),Math.cos($),0,0);
|
|
this.concat(o)};fY.prototype.scale=function($,o){var T=new fY($,0,0,o,0,0);this.concat(T)};fY.prototype.concat=function($){this.sn(new fY(this.Ca*$.Ca+this.P*$.Z9,this.Ca*$.P+this.P*$.Um,this.Z9*$.Ca+this.Um*$.Z9,this.Z9*$.P+this.Um*$.Um,this.Ry*$.Ca+this.Es*$.Z9+$.Ry,this.Ry*$.P+this.Es*$.Um+$.Es))};
|
|
fY.prototype.lY=function(){var $=this.Ca*this.Um-this.P*this.Z9;this.sn(new fY(this.Um/$,-this.P/$,-this.Z9/$,this.Ca/$,(this.Z9*this.Es-this.Um*this.Ry)/$,(this.P*this.Ry-this.Ca*this.Es)/$))};
|
|
fY.prototype.clone=function(){return new fY(this.Ca,this.P,this.Z9,this.Um,this.Ry,this.Es)};fY.prototype.sn=function($){this.Ca=$.Ca;
|
|
this.P=$.P;this.Z9=$.Z9;this.Um=$.Um;this.Ry=$.Ry;this.Es=$.Es};function t(){}t.a84=function(J){var $="";
|
|
for(var f=3;f>=0;f--)$+=String.fromCharCode(J>>f*8&255);return $};t.ajC=function($){var J=0;for(var f=$.length-1;
|
|
f>=0;f--)J|=$.charCodeAt(f)<<(3-f)*8;return J};t.indexOf=function($,o,T,s){if(T==null)T=0;if(s==null)s=$.length;
|
|
s=Math.min(s,$.length);for(var f=T;f<s;f++)if($[f]==o)return f;return-1};t.fe=function($,o,T){if(T==null)T=0;
|
|
var s=o.length,E=$.length-s;if(typeof o=="string"){var e=[];for(var f=0;f<s;f++)e.push(o.charCodeAt(f));
|
|
o=e}if(o.length>0){var n=o[0];for(var f=T;f<E;f++)if($[f]==n){var A=!0;for(var u=1;u<s;u++)if(o[u]!=$[f+u]){A=!1;
|
|
break}if(A)return f}}return-1};t.fz=function($,o,T){var s=[],e="";while(o<T){var E=$[o++];if(E=="\\".charCodeAt(0))s.push($[o++]);
|
|
else s.push(E)}for(var f=0;f<s.length;f+=2)e+=String.fromCharCode(s[f]<<8|s[f+1]);return e};t.a6d=function($,o,T){var s=new Uint8Array(2);
|
|
for(var f=0;f<T.length;f++){t.mS(s,0,T.charCodeAt(f));if(s[0]==")".charCodeAt(0)||s[0]=="(".charCodeAt(0)||s[0]=="\\".charCodeAt(0)){$[o]="\\".charCodeAt(0);
|
|
o++}$[o]=s[0];o++;if(s[1]==")".charCodeAt(0)||s[1]=="(".charCodeAt(0)||s[1]=="\\".charCodeAt(0)){$[o]="\\".charCodeAt(0);
|
|
o++}$[o]=s[1];o++}return o};t.Ek=function($,o,T){$.Y4(o,4*T.length);return t.a6d($.data,o,T)};t.KF=function($,o,T){var s="";
|
|
for(var f=0;f<T;f++){var E=$[o++]|$[o++]<<8;s+=String.fromCharCode(E)}return s};t.Uc=function($,o,T){var s="";
|
|
for(var f=0;f<T;f++){var E=$[o++]<<8|$[o++];s+=String.fromCharCode(E)}return s};t.a5q=function($,o,T){for(var f=0;
|
|
f<T.length;f++){var s=T.charCodeAt(f);t._P($,o+2*f,s)}};t.T1=function($,o,T){for(var f=0;f<T.length;
|
|
f++){var s=T.charCodeAt(f);t.mS($,o+2*f,s)}};t.ahq=function($,o,T){$.Y4(o,2*T.length);t.T1($.data,o,T)};
|
|
t.apS=function($,f,o){var T=[],s=0,E=0;o+=f;while(f<o){s=$[f++];if((s&128)==0)E=s;else if((s&224)==192){E=(s&31)<<6;
|
|
s=$[f++];E|=s&63}else if((s&240)==224){E=(s&15)<<12;s=$[f++];E|=(s&63)<<6;s=$[f++];E|=s&63}else if((s&248)==240){E=(s&7)<<18;
|
|
s=$[f++];E|=(s&63)<<12;s=$[f++];E|=(s&63)<<6;s=$[f++];E|=s&63}else throw"e";T.push(E)}return T};t.wi=window.TextDecoder?new window.TextDecoder("utf8"):null;
|
|
t.LK=function($,o,T){if(o==null)o=0;if(T==null)T=$.length;if(t.wi&&o==0&&T==$.length)return t.wi.decode($);
|
|
var s=t.apS($,o,T),E=s.length;for(var f=0;f<E;f++)s[f]=String.fromCharCode(s[f]);return s.join("")};
|
|
t.xI=window.TextEncoder?new window.TextEncoder("utf8"):null;t.Te=function($){if(t.xI)return t.xI.encode($);
|
|
var o=new Uint8Array($.length*4),T=t.Jq($,o,0);return o.slice(0,T)};t.Jq=function($,o,T){var s=$.length,f=0;
|
|
for(var E=0;E<s;E++){var e=$.charCodeAt(E);if((e&4294967295-(1<<7)+1)==0){o[T+f]=e;f++}else if((e&4294967295-(1<<11)+1)==0){o[T+f]=192|e>>6;
|
|
o[T+f+1]=128|e>>0&63;f+=2}else if((e&4294967295-(1<<16)+1)==0){o[T+f]=224|e>>12;o[T+f+1]=128|e>>6&63;
|
|
o[T+f+2]=128|e>>0&63;f+=3}else if((e&4294967295-(1<<21)+1)==0){o[T+f]=240|e>>18;o[T+f+1]=128|e>>12&63;
|
|
o[T+f+2]=128|e>>6&63;o[T+f+3]=128|e>>0&63;f+=4}else throw"e"}return f};t.j_=function($,o){var T=t.s($,o),s=t.LK($,o+4,T-1);
|
|
return{rZ:s,FI:4+T}};t.agQ=function($,o){var T=t.cX($,o),s=t.KF($,o+4,T);return s};t.Ds=function($,o){var T=t.s($,o),s=t.Uc($,o+4,T);
|
|
return s};t.rB=function($,o){var T=t.s($,o),s=t.Uc($,o+4,T-1);return s};t.a8G=function($,o,T){t.zU($,o,T.length);
|
|
o+=4;t.a5q($,o,T)};t.a5U=function($,o,T){t.gG($,o,T.length);o+=4;t.T1($,o,T)};t.LR=function($,o,T){$.Y4(o,4+2*T.length);
|
|
t.a5U($.data,o,T)};t.a1z=function($,o,T){$.Y4(o,4+2*T.length);t.a8G($.data,o,T)};t.i8=function($,o,T){var s=[];
|
|
for(var f=0;f<T;f++)s.push(String.fromCharCode($[o+f]));return s};t.ajm=function($,o,T){var s=!1,E=$.length-T.length;
|
|
for(var f=o;f<E;f++){for(var e=0;e<T.length;e++){if($[f+e]!=T.charCodeAt(e))break;if(e==T.length-1)return f}}};
|
|
t.en=function($,o,T){var s="";for(var f=0;f<T;f++)s+=String.fromCharCode($[o+f]);return s};t.dt=function($,o,T){for(var f=0;
|
|
f<T.length;f++)$[o+f]=T.charCodeAt(f)};t.G4=function($,o,T){$.Y4(o,T.length);t.dt($.data,o,T)};t.ajk=function($,o,T){var s="";
|
|
for(var f=0;f<T;f++){var E=$[o+f];if(E<10)s+=" ";else if(E<100)s+=" ";s+=E+", "}return s};t.mo=function($,o){return $[o]<<8|$[o+1]};
|
|
t.mS=function($,o,J){$[o]=J>>8&255;$[o+1]=J&255};t.rx=function($,o,J){$.Y4(o,4);t.mS($.data,o,J)};t.a4o=function($,o){var T=t.mo($,o),s=t.mo($,o+2);
|
|
return T+s*(1/65536)};t.qP=function($,o,J){var T=Math.floor(J),s=Math.floor((J-T)*65536);t.mS($,o,T);
|
|
t.mS($,o+2,s)};t.w1=function($,o){return $[o+1]<<8|$[o]};t._P=function($,o,J){$[o+1]=J>>8&255;$[o]=J&255};
|
|
t.Rs=function($,o,J){$.Y4(o,4);t._P($.data,o,J)};t.FU=function($,o){t.Xw[0]=$[o+1];t.Xw[1]=$[o];return t.nx[0]};
|
|
t.UG=function($,o){t.Xw[0]=$[o];t.Xw[1]=$[o+1];return t.nx[0]};t.Gn=t.mS;t.sL=t.rx;t.Cv=function($,o){t.rr[0]=$[o+3];
|
|
t.rr[1]=$[o+2];t.rr[2]=$[o+1];t.rr[3]=$[o];return t.Gp[0]};t.Bz=function($,o,J){t.Gp[0]=J;$[o+3]=t.rr[0];
|
|
$[o+2]=t.rr[1];$[o+1]=t.rr[2];$[o+0]=t.rr[3]};t.rV=function($,o,J){$.Y4(o,4);t.Bz($.data,o,J)};t.Le=function($,o,T,s){T[s+0]=$[o+0];
|
|
T[s+1]=$[o+1];T[s+2]=$[o+2];T[s+3]=$[o+3]};t.cX=function($,o){t.Le($,o,t.rr,0);return t.wP[0]};t.zU=function($,o,J){t.wP[0]=J;
|
|
t.Le(t.rr,0,$,o)};t.JG=function($,o,J){$.Y4(o,4);t.zU($.data,o,J)};t.$R=function($,o){t.Le($,o,t.rr,0);
|
|
return t.Gp[0]};t.aht=function($,o,J){t.Gp[0]=J;t.Le(t.rr,0,$,o)};t.amh=function($,o,J){$.Y4(o,4);t.aht($.data,o,J)};
|
|
t.s=function($,o){var T=$[o]*(256*256*256)+($[o+1]<<16|$[o+2]<<8|$[o+3]);return T};t.gG=function($,o,J){$[o]=J>>24&255;
|
|
$[o+1]=J>>16&255;$[o+2]=J>>8&255;$[o+3]=J>>0&255};t.tX=function($,o,J){$.Y4(o,4);t.gG($.data,o,J)};t.eT=function($,o){return t.s($,o)<<32|t.s($,o+4)};
|
|
t.B1=function($,o,J){t.gG($,o,J>>16>>16);t.gG($,o+4,J&4294967295)};t._a=function($,o,J){$.Y4(o,8);t.B1($.data,o,J)};
|
|
t.Eo=function($,o){var T=new Uint8Array(8);for(var f=0;f<8;f++)T[f]=$[o+7-f];var s=new Float64Array(T.buffer);
|
|
return s[0]};t.YA=function($,o){var T=new Uint8Array(8);for(var f=0;f<8;f++)T[f]=$[o+f];var s=new Float64Array(T.buffer);
|
|
return s[0]};t.$k=function($,o,J){var T=new Float64Array(1);T[0]=J;var s=new Uint8Array(T.buffer);for(var f=0;
|
|
f<4;f++){var E=s[f];s[f]=s[7-f];s[7-f]=E}for(var f=0;f<8;f++)$[o+f]=s[f]};t.IW=function($,o,J){$.Y4(o,8);
|
|
t.$k($.data,o,J)};t.eO=function($,o){t.rr[0]=$[o+3];t.rr[1]=$[o+2];t.rr[2]=$[o+1];t.rr[3]=$[o+0];return t.io[0]};
|
|
t.Fe=function($,o){t.rr[0]=$[o+0];t.rr[1]=$[o+1];t.rr[2]=$[o+2];t.rr[3]=$[o+3];return t.io[0]};t.pM=function($,o,J){t.io[0]=J;
|
|
$[o+0]=t.rr[3];$[o+1]=t.rr[2];$[o+2]=t.rr[1];$[o+3]=t.rr[0]};t.a3o=function($,o,J){$.Y4(o,4);t.pM($.data,o,J)};
|
|
t.AU=function($,o,J){t.io[0]=J;$[o+0]=t.rr[0];$[o+1]=t.rr[1];$[o+2]=t.rr[2];$[o+3]=t.rr[3]};t.ajg=function($,o,J){$.Y4(o,4);
|
|
t.AU($.data,o,J)};t.a3R=function($,o){var T=t.Cv($,o),s=T*(1/(1<<24));return s};t.bP=function($,o,T){var s=Math.floor(T*(1<<24));
|
|
t.Bz($,o,s)};t.agp=function($,o,T){$.Y4(o,4);t.bP($.data,o,T)};t.b9=function($,o){var T=$[o],s=t.en($,o+1,T);
|
|
T+=1-T%2;return{U8:s,length:T+1}};t.a90=function($,o,T){var s=T.length;$[o]=s;t.dt($,o+1,T);if(s%2==0){$[o+1+s]=0;
|
|
++s}return s+1};t.Fm=function($,o,T){$.Y4(o,T.length+2);return t.a90($.data,o,T)};t.fo=function($,o){var T=new fY;
|
|
T.Ca=t.Eo($,o+0*8);T.P=t.Eo($,o+1*8);T.Z9=t.Eo($,o+2*8);T.Um=t.Eo($,o+3*8);T.Ry=t.Eo($,o+4*8);T.Es=t.Eo($,o+5*8);
|
|
return T};t.di=function($,o,T){t.$k($,o+0*8,T.Ca);t.$k($,o+1*8,T.P);t.$k($,o+2*8,T.Z9);t.$k($,o+3*8,T.Um);
|
|
t.$k($,o+4*8,T.Ry);t.$k($,o+5*8,T.Es)};t.afk=function($,o,T){$.Y4(o,48);t.di($.data,o,T)};t.a6x=function($,o){var T=t.eO($,o),s=t.eO($,o+4),E=t.eO($,o+8),e=t.eO($,o+12);
|
|
return new df(T,s,E-T,e-s)};t.a1P=function($,o,T){t.pM($,o,T.x);t.pM($,o+4,T.y);t.pM($,o+8,T.x+T.d);
|
|
t.pM($,o+12,T.y+T.w)};t.aab=function($,o,T){$.Y4(o,16);t.a1P($.data,o,T)};t.AS=function($,o){var T=t.Cv($,o),s=t.Cv($,o+4),E=t.Cv($,o+8),e=t.Cv($,o+12);
|
|
return new df(s,T,e-s,E-T)};t.Ig=function($,o,T){t.Bz($,o,T.y);t.Bz($,o+4,T.x);t.Bz($,o+8,T.y+T.w);t.Bz($,o+12,T.x+T.d)};
|
|
t.k6=function($,o,T){$.Y4(o,16);t.Ig($.data,o,T)};t.YM=function($,o,T){var s=new Uint8Array(T);for(var f=0;
|
|
f<T;f++)s[f]=$[o+f];return s};t.Xx=function($,o,T){$.set(T,o)};t.vS=function($,o,T){$.Y4(o,T.length);
|
|
t.Xx($.data,o,T)};t.aqc=function($,o,T,J){if(!J)J=1;for(var f=0;f<J;f++)$[o+f]=T};t.S1=function($,o,T,J){if(!J)J=1;
|
|
$.Y4(o,J);t.aqc($.data,o,T,J)};t.nx=new Int16Array(1);t.Xw=new Uint8Array(t.nx.buffer);t.Gp=new Int32Array(1);
|
|
t.wP=new Uint32Array(t.Gp.buffer);t.rr=new Uint8Array(t.Gp.buffer);t.io=new Float32Array(t.Gp.buffer);
|
|
function df($,o,T,s){if(!$)$=0;if(!o)o=0;if(!T)T=0;if(!s)s=0;this.x=$;this.y=o;this.d=T;this.w=s}df.prototype.Y=function(){return this.d*this.w};
|
|
df.prototype.clone=function(){return new df(this.x,this.y,this.d,this.w)};df.prototype.contains=function($,o){return $>=this.x&&$<=this.x+this.d&&(o>=this.y&&o<=this.y+this.w)};
|
|
df.prototype.dv=function($){return this.contains($.x,$.y)};df.prototype.Yg=function($){return this.x<=$.x&&this.y<=$.y&&$.x+$.d<=this.x+this.d&&$.y+$.w<=this.y+this.w};
|
|
df.prototype.sn=function($){this.x=$.x;this.y=$.y;this.d=$.d;this.w=$.w};df.prototype.R1=function($){return this.x==$.x&&this.y==$.y&&this.d==$.d&&this.w==$.w};
|
|
df.prototype.Mi=function($,o){this.x-=$;this.y-=o;this.d+=2*$;this.w+=2*o};df.prototype.akr=function($){this.Mi($.x,$.y)};
|
|
df.prototype.Sr=function($){var o=Math.max(this.x,$.x),T=Math.max(this.y,$.y),s=Math.min(this.x+this.d,$.x+$.d),E=Math.min(this.y+this.w,$.y+$.w);
|
|
if(s<o||E<T)return new df;else return new df(o,T,s-o,E-T)};df.prototype.Ha=function($){if($.y+$.w<this.y||$.x>this.x+this.d||$.y>this.y+this.w||$.x+$.d<this.x)return!1;
|
|
return!0};df.prototype.p4=function(){return this.d<=0||this.w<=0};df.prototype.offset=function($,o){this.x+=$;
|
|
this.y+=o};df.prototype.TB=function($){this.offset($.x,$.y)};df.prototype.ahg=function(){this.x=this.y=this.d=this.w=0};
|
|
df.prototype.A5=function($,o,T,s){this.x=$;this.y=o;this.d=T;this.w=s};df.prototype.BZ=function($){if(this.p4())return $.clone();
|
|
if($.p4())return this.clone();var o=this.clone();o.a2y($);return o};df.ex=new Float32Array(2);df.prototype.a2y=function($){if($.p4())return;
|
|
if(this.p4()){this.sn($);return}this.xc($.x,$.y);this.xc($.x+$.d,$.y+$.w)};df.prototype.xc=function($,o){var T=Math.min(this.x,$),s=Math.min(this.y,o);
|
|
this.d=Math.max(this.x+this.d,$)-T;this.w=Math.max(this.y+this.w,o)-s;this.x=T;this.y=s};df.prototype.amW=function($,o){this.x=$;
|
|
this.y=o;this.d=this.w=0};function cU(){}cU.$$=function($,o){var T=new Uint8Array($),s=0,E=t.en(T,s,9),A=4,u=100;
|
|
s+=9;var e=t.en(T,s,4);s+=4;s++;o.d=t.s(T,s);s+=4;o.w=t.s(T,s);s+=4;var n=t.s(T,s);s+=4;if(n!=0)alert("Unsupported image format, not RGB!");
|
|
if(["file","v001","v002","v003"].indexOf(e)==-1){u=t.s(T,s);s+=4;if(parseInt(e.slice(1))>=7){u=u}else alert("Unknown XCF version: "+e);
|
|
A=8}var Y={};s=cU.lT(T,s,Y);var b=[];s=cU.XI(T,s,b,A);var a=[];s=cU.XI(T,s,a,A);o.JQ=0;for(var f=0;f<b.length;
|
|
f++)cU.a1c(T,b[f],o,Y,A,u);while(o.JQ>0){o.u.push(o.jK());o.JQ--}o.u.reverse();delete o.JQ;o.buffer=L.G(o.d*o.w*4);
|
|
if(o.u.length==0)console.log("No layers!!!");for(var f=0;f<a.length;f++){var w=cU.S$(T,a[f],Y,A,u);if(w.BU[bP.afI])o.Z={channel:w.aP,rect:new df(0,0,o.d,o.w)}}};
|
|
cU.a1c=function($,o,T,s,E,e){var n=T.$f(),A=t.s($,o),a=0;o+=4;var u=t.s($,o);o+=4;n.rect=new df(0,0,A,u);
|
|
var Y=t.s($,o);o+=4;var b=t.j_($,o);o+=b.FI;n.tM(b.rZ);var w={};o=cU.lT($,o,w);if(w[bP.Mq]){var X=w[bP.Mq];
|
|
a=X.length/4-1}if(w[bP.FL]){n.rect.x=t.Cv(w[bP.FL],0);n.rect.y=t.Cv(w[bP.FL],4)}if(w[bP.R$]){n.opacity=t.s(w[bP.R$],0)}if(w[bP.aiu]){n.add.lsct=hd.NH;
|
|
n.rect=new df(0,0,0,0);n.buffer=L.G(0);n.Jp=24}if(w[bP.Aa]){var N=t.s(w[bP.Aa],0);n.fh=bP.adZ[N];if(n.p3()&&n.fh=="norm")n.fh="pass"}if(w[bP.IK]){if(t.s(w[bP.IK],0)==0)n.Jp+=2}if(w[bP.bs]){var z=t.s(w[bP.bs],0);
|
|
n.add.lsct=z&1==1?hd.NH:hd.Qm}if(w[bP.jr]){var i=w[bP.jr];for(var k in i){var Q=i[k];if(k=="gimp-text-layer"){var O=cU.aqQ(Q),c=O.text,B=O.font,G=O.color,l=O["font-size"];
|
|
if(c==null&&O.markup){var v=new DOMParser,p=v.parseFromString(O.markup,"image/svg+xml");while(p.firstChild!=null&&p.firstChild.tagName!=null){p=p.firstChild;
|
|
var P=p.getAttribute("font"),h=p.getAttribute("foreground"),j=p.getAttribute("size");if(P!=null)B=P;
|
|
if(h!=null){h=CSS.So(h);G=[1,h.i/255,h.m/255,h.P/255]}if(j!=null){l=""+parseFloat(j)/245}}c=p.textContent}n.add.lnsr="rend";
|
|
n.add.TySh=g8.rm(0,0);n.add.TySh.QH=new df(0,0,100,100);n.add.TySh.t=new fY(1,0,0,1,n.rect.x,n.rect.y);
|
|
var C=n.add.TySh.h3;g8.YN(C,0,c);var V=g8.$Q(C,0,0),d=O.justify,R=O["line-spacing"];if(G)V.oH.FillColor={Type:1,Values:[1,parseFloat(G[1]),parseFloat(G[2]),parseFloat(G[3])]};
|
|
if(l){l=Math.round(parseFloat(l));V.oH.FontSize=l;n.add.TySh.t.Es+=Math.min(17,l*.17)}if(R){R=Math.round(parseFloat(R)+V.oH.FontSize*1.2);
|
|
V.oH.Leading=R;V.oH.AutoLeading=!1}if(d)V.CL.Justification=["left","right","center","fill"].indexOf(d);
|
|
if(B&&B!="Sans-serif"){var g=B.toLowerCase(),S="bold italic semi extra regular condensed light".split(" "),F=g.length;
|
|
for(var f=0;f<S.length;f++){var r=g.indexOf(S[f]);if(r!=-1&&r<F&&g[r-1]==" ")F=r}if(F!=g.length)B=B.slice(0,F-1).split(" ").join("")+"-"+B.slice(F).split(" ").join("");
|
|
g8.PL(V,B)}g8.zA(C,0,c.length,V);var q=O["box-width"],W=O["box-height"],Z=q?parseFloat(q):n.rect.d,I=W?parseFloat(W):n.rect.w;
|
|
g8.I8(C,1);g8.bi(C,[0,0,Math.ceil(Z),Math.ceil(I)])}else console.log("Unknown property "+k)}}while(T.JQ>a){T.u.push(T.jK());
|
|
T.JQ--}T.JQ=a;if(n.add.lsct==hd.NH||n.add.lsct==hd.Qm)T.JQ++;var _=E==4?t.s:t.eT;if(n._1()){n.buffer=L.G(n.rect.Y()*4);
|
|
var cN=new L.uR(n.rect.Y()),ce=_($,o);o+=E;var gf=_($,o);o+=E;cU.nO($,ce,cN,s,E,e);L.dy(cN,n.buffer);
|
|
if(gf!=0){n._=new M.Zb;n._.color=0;n._.rect=n.rect.clone();n._.channel=cU.S$($,gf,s,E,e).aP;if(w[bP.ot])n._.isEnabled=t.s(w[bP.ot],0)==1}}T.u.push(n)};
|
|
cU.aqQ=function($){var o="("+t.LK($,0,$.length-1)+")",T=[],s={};cU.ng(o,1,T);cU.aeg(T,s);return s};cU.aeg=function($,o){for(var f=0;
|
|
f<$.length;f++){var T=$[f],s=T[0];if(T.length==2)o[s]=T[1];else o[s]=T.slice(1)}};cU.ng=function($,o,T){while(!0){if(o>=$.length)throw"e";
|
|
var s=$.charAt(o);o++;if(s=="("){var E=[];o=cU.ng($,o,E);T.push(E)}else if(s==" "||s=="\n"||s=="\r"){}else if(s==")")return o;
|
|
else if(s=="\""){var e=o;while(!0){var n=$[o];o++;if(n=="\"")break;if(n=="\\")o++}T.push(JSON.parse($.slice(e-1,o)))}else{var e=o-1;
|
|
while($[o]!=" "&&$[o]!=")")o++;T.push($.slice(e,o))}}};cU.S$=function($,o,T,s,E){var e=t.s($,o);o+=4;
|
|
var n=t.s($,o);o+=4;var A=t.j_($,o);o+=A.FI;var u={};o=cU.lT($,o,u);var Y=new L.uR(e*n),b=s==4?t.s:t.eT,a=b($,o);
|
|
o+=s;cU.nO($,a,Y,T,s,E);return{aP:Y.i,BU:u}};cU.nO=function($,o,T,s,E,e){var n=t.s($,o);o+=4;var A=t.s($,o);
|
|
o+=4;var u=t.s($,o);o+=4;var Y=E==4?t.s:t.eT,b=Y($,o);o+=E;cU.adV($,b,T,s,u,E,e)};cU.adV=function($,o,T,s,E,e,n){var A=t.s($,o),b=0,f=0;
|
|
o+=4;var u=t.s($,o);o+=4;var Y=new df(0,0,A,u);if(n==100||n==150)b=1;else if(n==200||n==250)b=2;else if(n==300||n==350)b=4;
|
|
else if(n==500||n==550)b=2;else if(n==600||n==650)b=4;else if(n==700||n==750)b=8;else{alert("unsupported bit depth "+n);
|
|
throw"e"}var a=E/b,b=Math.round(E/a),w=[];o=cU.XI($,o,w,e);var X=new L.uR(64*64*b),N=new df,z=s[bP.aeB][0],i=[X.i,X.m,X.P,X.Ca];
|
|
if(a==3)X.Ca.fill(255);var k=Date.now();for(var Q=0;Q<u;Q+=64)for(var O=0;O<A;O+=64){var c=Math.min(A-O,64),B=Math.min(u-Q,64),G=c*B;
|
|
N.A5(O,Q,c,B);cU.ao1($,w[f++],G*b,z,a,i);if(n==100||n==150){}else if(n==250){for(var l=0;l<a;l++){var v=i[l];
|
|
for(var p=0;p<G;p++){var P=v[p]<<8|v[G+p];v[p]=Math.min(P>>>8,255)}}}else if(n==600){var h=cU.agu(),j=new Uint32Array(1),C=new Float32Array(j.buffer);
|
|
for(var l=0;l<a;l++){var v=i[l];for(var p=0;p<G;p++){j[0]=v[p]<<24|v[G+p]<<16|v[(G<<1)+p]<<8|v[(G<<1)+G+p]<<0;
|
|
var V=C[0];if(V<0)V=0;else if(V>1)V=1;v[p]=h[~~(.5+V*1e3)]}}}else console.log("unknown data format",n);
|
|
L.Yx(X,N,T,Y)}};cU.agu=function(){var $=cU.ard;if($!=null)return $;$=cU.ard=new Uint8Array(1001);for(var f=0;
|
|
f<1001;f++)$[f]=~~(.49+255*L.WH(f*.001));return $};cU.ao1=function($,o,T,s,E,e){if(s==1){for(var n=0;
|
|
n<E;n++){var A=e[n],u=0;while(u<T){var J=$[o];o++;if(J<127){var Y=$[o];o++;J++;for(var f=0;f<J;f++)A[u+f]=Y}else if(J==127){var b=$[o];
|
|
o++;var a=$[o];o++;var Y=$[o];o++;J=b<<8|a;for(var f=0;f<J;f++)A[u+f]=Y}else if(J==128){var b=$[o];o++;
|
|
var a=$[o];o++;J=b<<8|a;for(var f=0;f<J;f++)A[u+f]=$[o+f];o+=J}else{J=256-J;for(var f=0;f<J;f++)A[u+f]=$[o+f];
|
|
o+=J}u+=J}}}else if(s==2){var w=pako.inflate($.slice(o)),X=Math.round(w.length/T);for(var f=0;f<T;f++){var N=f*X;
|
|
e[0][f]=w[N];e[1][f]=w[N+1];e[2][f]=w[N+2];e[3][f]=X==3?255:w[N+3]}}else alert("Unknown compression "+s)};
|
|
cU.XI=function($,o,T,s){var E=s==4?t.s:t.eT;while(!0){var e=E($,o);o+=s;if(e==0)break;else T.push(e)}return o};
|
|
cU.lT=function($,o,T){while(!0){var s=t.s($,o);o+=4;var E=t.s($,o);o+=4;if(s==bP.abf)break;else if(s==bP.jr)T[s]=cU.ars($,o,o+E);
|
|
else T[s]=t.YM($,o,E);o+=E}return o};cU.ars=function($,o,T){var s={};while(o<T){var E=t.j_($,o);o+=E.FI;
|
|
var e=t.s($,o);o+=4;if(e!=1)console.log("unknown flags",e);var n=t.s($,o);o+=4;s[E.rZ]=t.YM($,o,n);o+=n}return s};
|
|
var bP={abf:0,acE:1,ah9:2,a43:3,afI:4,a4L:5,R$:6,Aa:7,IK:8,ag$:9,a1R:10,ot:11,ajH:12,amo:13,a8B:14,FL:15,a2o:16,aeB:17,a2e:18,alR:19,a0f:20,jr:21,ap9:22,ajl:23,a0k:24,ab7:25,a65:26,agM:27,a5E:28,aiu:29,Mq:30,bs:31,ahN:32,ae4:33,apO:34,adu:35,a6H:36,a78:37,anK:38,ab2:0,a4k:1,agv:2,agg:3,akJ:1,ag1:2,a5G:0,alm:1,ap$:1};
|
|
bP.adZ="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(",");
|
|
var gX=function(){var $=!1,o,T,O;function s(){var G=t.en(o,T,4);T+=4;return G[3]+G[2]+G[1]+G[0]}function E(){var G=t.en(o,T,4);
|
|
T+=4;return G}function e(){var G=o[T];T+=1;return G}function n(){var G=t.w1(o,T);T+=2;return G}function A(){var G=t.cX(o,T);
|
|
T+=4;return G}function u(){var G=t.$R(o,T);T+=4;return G}function Y(){var G=t.cX(o,T);T+=8;return G}function b(){var G=t.Fe(o,T);
|
|
T+=4;return G}function a(){var G=t.YA(o,T);T+=8;return G}function w(){var G=t.w1(o,T),l=t.LK(o,T+2,G);
|
|
T+=2+G;return l}function X(){var G=t.cX(o,T),l=t.LK(o,T+4,G);T+=4+G;return l}function N(G){T=G;var l=[];
|
|
while(T!=0){var v=E();if(v!="#FT4"&&v!="#FT3"&&v!="#FT2")throw v;var p=Y(),P=Y(),h=Y(),j=Y(),C=Y(),V=A(),d=A(),m=A(),R=n(),g=e(),S={};
|
|
l.push(S);for(var f=0;f<V;f++){var F=A(),r=e();if(r!=0&&r!=1&&r!=2)throw r;var q=[];if(r==0||r==1){var W=Y(),Z=Y(),I=Y(),_=A(),cN=e(),ce=A(),gf=v!="#FT4"?0:A(),K=null;
|
|
if(v=="#FAT"||v=="#FT2"){switch(cN){case 1:cN=1;break;case 2:cN=65;break;case 3:cN=129;break;case 4:cN=193;
|
|
break;default:cN=0;break}}if(r==0)K=w();q=[W,Z,I,cN,K]}S["i"+F]=[r,q]}for(var f=0;f<R;f++){var cv=n(),f0=n(),i8=Y(),b5=t.en(o,T,cv);
|
|
T+=cv}T=p}l.reverse();for(var iC=1;iC<l.length;iC++){var S=l[iC],an=l[iC]=JSON.parse(JSON.stringify(l[iC-1]));
|
|
for(var cO in S){var bh=S[cO];if(bh[0]==0)an[cO]=bh;else if(bh[0]==1){bh[1][4]=an[cO][1][4];an[cO]=bh}else if(bh[0]==2)delete an[cO]}}var bD=l.pop(),fq=[];
|
|
for(var cO in bD)fq.push(bD[cO][1]);fq.sort(function(fO,g6){return fO[0]-g6[0]});return fq}function z(G,l,v,p){while(T<o.length){var P=e(),V=null;
|
|
if(P==0){if(p){var h=e();if(h!=2){var j=s()}if(h==0)T+=4;p=!1;continue}else{break}}var C=s();if($)console.log(" ".repeat(l),P,P&127,C,G._type);
|
|
if(P>127)V=i(P,l,v);else V=k(P,l,v);G[C]=V}}function i(G,l,v){var p=[];G=G&127;if(G==43)T+=4;var P=A();
|
|
if(G==50){var h=s(),j=n();if(j!=1)throw"e";for(var f=0;f<P;f++){var C={_status:"NotShared",_type:h};
|
|
p.push(C);var V=e();if(V!=1)throw V;z(C,l+1,v)}}else for(var f=0;f<P;f++){p.push(k(G,l,v));if(G==42)G=2}return p}function k(G,l,v){var p=null;
|
|
if(G==49){p={};var P=e();if(P!=0){var h=A();if(v==null){p._id=h;p._status=["Shared","Link"][P-1]}if(v&&P==2)p=v[h];
|
|
if(P==1){if(v)v[h]=p;var j=e(),C=!1;if(j>1)throw j;p._type=s();if($)console.log(" ".repeat(l),"new",p._type,j,T);
|
|
if(j==0){while(!0){var V=n();if(V!=0&&V!=1&&V!=2&&V!=4)throw V;if(o[T]!=0){C=!0;break}var d=n();if(d==512)break;
|
|
var m=s();if(d==256)break}}z(p,l+1,v,C)}}}else if(G==50){p={_status:"NotShared"};if(e()==1){p._type=s();
|
|
T+=2;z(p,l+1,v)}}else if(G==1)p={type:"byte",value:e()};else if(G==2)p={type:"uint16",value:n()};else if(G==3)p={type:"uint32",value:A()};
|
|
else if(G==4)p={type:"uint64",value:Y()};else if(G==7)p={type:"int32",value:u()};else if(G==8)p={type:"int64",value:Y()};
|
|
else if(G==9)p={type:"float32",value:b()};else if(G==10)p={type:"float64",value:a()};else if(G==21)p={type:"Vec2i",value:[A(),A()]};
|
|
else if(G==23)p={type:"Vec4i",value:[A(),A(),A(),A()]};else if(G==33)p={type:"Vec4f",value:[b(),b(),b(),b()]};
|
|
else if(G==36)p={type:"Vec2",value:[a(),a()]};else if(G==38)p={type:"Vec4",value:[a(),a(),a(),a()]};
|
|
else if(G==40)p={type:"Vec6",value:[a(),a(),a(),a(),a(),a()]};else if(G==41)p={type:"bool",value:e()!=0};
|
|
else if(G==42)p={type:"Enum",value:A()};else if(G==43)p={type:"string",value:X()};else if(G==44){var R=n();
|
|
p={type:"curv16",value:[a(),R==12?[e(),e(),e(),e()]:[A(),A()]]}}else if(G==45){var R=A();p={type:"buff",value:o.slice(T,T+R)};
|
|
T+=R}else if(G==47){p={type:"uint32",value:A()}}else if(G==48){var g=[],S=n();if(S!=1)throw S;if(o[T]==135){var F=i(e(),l+1,v),r=i(e(),l+1,v),q=i(e(),l+1,v);
|
|
g=[F,r,q]}else{var W=1;if(o[T]==3){e();W=A()}for(var f=0;f<W;f++){if(e()!=41)throw"e";var h=e();if(h!=0&&h!=1)throw h;
|
|
if(e()!=172)throw"e";var Z=A(),I=n(),_=[];g.push(_);if(I!=18)throw I;if(Z>2e3)throw Z;for(var cN=0;cN<Z;
|
|
cN++)_.push([a(),a(),e(),e()])}}T++;p={type:"curve",value:g}}else if(G==51){p={type:"EmbeddedData"};
|
|
p[s()]=X()}else if(G==52)p={type:"uint32",value:A()};else if(G==56)p={type:"Color32",value:[e(),e(),e(),e()]};
|
|
else if(G==68)p={type:"ColorRGBA",value:[b(),b(),b(),b()]};else if(G==72)p={type:"ColorCMYK",value:[b(),b(),b(),b(),b()]};
|
|
else{throw G}return G==49||G==50||G==51?p:p.value}function Q(G){var l=0,v=G.length;for(var f=0;f<v;f++)G[f]=l=l+G[f]&255}function c(G){o=G;
|
|
T=4;var l=A(),v=E();if(v!="nsrP")throw v;var v=E();if(v!="#Inf")throw v;var p=Y();O=Y();var P=Y(),h=Y(),j=Y(),C=A(),V=A(),v=E();
|
|
if(v!="Prot")throw v;var C=A(),d=N(p),m={},R=Date.now();for(var g=0;g<d.length;g++){var S=d[g],F=S[3],I=null;
|
|
T=S[0];var v=E();if(v!="#Fil")throw v;var r=F>>>5&1,q=F&3,W=F&192;switch(W){case 64:W=1;r=0;break;case 128:W=2;
|
|
break;case 192:W=3;break;default:W=0;r=0}var Z=new Uint8Array(o.buffer,T,S[2]);if(q==0)I=Z;else if(q==1)I=pako.inflate(Z);
|
|
else if(q==2)I=eY.FC.P1(Z,S[1]);else throw q;if(r==0){if(W==1)Q(I);if(W==2)throw"e"}else throw r;m[S[4]]=I}return m}function B(G){var l=c(new Uint8Array(G));
|
|
o=l["doc.dat"];T=16;var v={};z(v,0,[]);return[l,v,O]}return{apl:B}}();function j0(){}j0.$$=function(){function $(X,N){var z=Date.now(),i=gX.apl(X),k=i[0],Q=i[1],O=i[2],c=Q.DocR,B=c.DfSz,G=c.Chld;
|
|
if(G.length!=1)throw"e";var l=G[0],v=l.SprB;G=l.Chld;N.d=~~v[2];N.w=~~v[3];N.buffer=L.G(N.d*N.w*4);var p=[0,{}];
|
|
for(var f=0;f<G.length;f++)E(G[f],N,k,new fY,p);N.Mm(p[0]);console.log(Date.now()-z,"Document created");
|
|
z=Date.now()}function o(X){return new fY(X[0],X[3],X[1],X[4],X[2],X[5])}function T(X,N){var z=N.Xfrm;
|
|
z=z?o(z):new fY;z.concat(X);return z}function s(X){var N={0:"norm",1:"dark",2:"mul ",3:"idiv",196613:"lbrn",65538:"dkCl",4:"lite",5:"scrn",6:"div ",7:"lddg",65542:"lgCl",8:"over",9:"sLit",10:"hLit",11:"vLit",65551:"lLit",12:"pLit",13:"hMix",14:"diff",15:"smud",16:"fsub",262165:"fdiv",17:"hue ",18:"sat ",20:"colr",19:"lum "}[X];
|
|
return N?N:"norm"}function E(X,N,z,i,k){var Q=X._type,O=X.Chld,c=N.$f();c.tM(X.Desc==null||X.Desc==""?Q=="Grup"?"Folder":"Layer":X.Desc);
|
|
c.bC(X.Visi);c.opacity=Math.round(255*X.Opac);if(X.FOpc!=1)c.add.iOpa=Math.round(255*X.FOpc);var B=X.Blnd;
|
|
if(B!=null)c.fh=s(B);var G=T(i,X),l=Q=="ShpN"||Q=="PCrv";if(O){N.u.push(N.jK());c.add.lsct=hd.NH;c.fh="pass";
|
|
c.Jp=24;if(Q=="ShpN"){var v=X.ShpB;c.y2(new df(v[0]+G.Ry,v[1]+G.Es,v[2]-v[0],v[3]-v[1]));k[0]++;c.add.artb.Clr={t:"Objc",v:L.h.wb({i:255,m:255,P:255})}}for(var f=0;
|
|
f<O.length;f++)E(O[f],N,z,G,k)}else if(Q=="Rstr"||Q=="ImgN"||Q=="MRst"){var p=X.Bitm,P=p.Bckg,h=Date.now(),j;
|
|
if(P==null){j=Y(p,z,k[1]);c.rect=j[2].clone();c.buffer=j[1].slice(0);c.rect.x+=G.Ry;c.rect.y+=G.Es}if(P||G.jZ()!=1){var C,V=0,d=0;
|
|
if(P){var m=z[P.Data],R=t.fe(m,"ataD")+4,g=t.cX(m,R);R+=4;C=m.slice(R,R+g)}else{V=c.rect.x-G.Ry;d=c.rect.y-G.Es;
|
|
if(j[3]==null)j[3]=new Uint8Array(eY.Q1("PNG").tC([[c.buffer.buffer]],c.rect.d,c.rect.w));C=j[3].slice(0)}var S=N.sP(C,c.getName(),0,0);
|
|
S.Jp=c.Jp;S.opacity=c.opacity;c=S;var F=new fY;F.translate(V,d);F.concat(G);var r=c.rect.clone();r.x=r.y=0;
|
|
var q=L.M.Uo(r).I;L.M.t(q,F,q);c.add.SoLd.Trnf=D.p.vP(q);c.add.SoLd.nonAffineTransform=D.p.vP(q);c.qI(N,!1)}}else if(Q=="TxtA"||Q=="TxtF"){c.add.lnsr="rend";
|
|
c.add.TySh=g8.rm(0,0);c.add.TySh.QH=new df(0,0,100,100);var W=X.TxtH.FrmB,Z=new fY,ce=0;Z.translate(W[0],W[1]);
|
|
Z.concat(G);c.add.TySh.t=Z;var I=c.add.TySh.h3,_=X.StSt,cN=_.Blok;if(cN.length!=1)throw"e";for(var gf=0;
|
|
gf<cN.length;gf++){var K=cN[gf],cv=ce,f0=0,i8=K.Glyp.Utf8;i8=i8.replace(/\u2028/g,"\n");i8=i8.replace(/\u2029/g,"\n");
|
|
i8=i8.slice(0,i8.length-1);g8.YN(I,ce,i8);ce+=i8.length;var b5=K.GAtt.Runs,iC=K.PAtt.Runs[0],an=iC.Item.Ints[0];
|
|
for(var cO=0;cO<b5.length;cO++){var bh=b5[cO],bD=bh.Indx,fq=bh.Item,fO=fq.Objs,g6=g8.$Q(I,cv,1);g6.CL.Justification=an==0?0:an==1?2:1;
|
|
g8.PL(g6,fq.DFnt.Post);g6.oH.FontSize=fq.Doub[0];for(var f=0;f<fO.length;f++){var hM=fO[f];if(hM._type=="FDsc"){var d3=hM.FDeF;
|
|
if(d3._type=="FilS"){var h9=u(d3.Colr);g6.oH.FillColor={Type:1,Values:[1,h9[0],h9[1],h9[2]]}}}}g8.zA(I,cv+f0,cv+Math.min(bD,i8.length),g6);
|
|
f0=bD}}g8.I8(I,1);g8.bi(I,[0,0,Math.round(W[2]-W[0]),Math.round((W[3]-W[1])*1.2)]);N.Nr=!0}else if(l){c.Jp|=16;
|
|
var cs=c.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));c.add.vstk.strokeEnabled.v=!1;c.add.vogk=[];
|
|
var dv=c.add.vmsk=e(X);L.A.hR(dv.g,G);if(X.BFFl){var ec=X.BFFl[0].FDeF,gT=ec._type;if(gT=="FilS")c.add.SoCo={classID:"null",Clr:A(ec.Colr)};
|
|
else if(gT=="FilG"){var iz=c.add.GdFl=JSON.parse(ev.Qo[ev.order.indexOf("GrFl")]);n(ec,iz)}else if(gT=="FilN"){c.add.SoCo={classID:"null",Clr:{t:"Objc",v:L.h.wb({i:0,m:0,P:0})}};
|
|
cs.fillEnabled.v=!1}else console.log(gT)}if(X.LILn){var gw=X.LILn[0].LDeL,iI=gw.Wght;if(iI!=0){cs.strokeEnabled.v=!0;
|
|
cs.strokeStyleLineWidth.v.val=iI;var ec=X.LIFl[0].FDeF,gT=ec._type;if(gT=="FilS")cs.strokeStyleContent.v.Clr=A(ec.Colr);
|
|
else if(gT=="FilN")cs.strokeEnabled.v=!1}}c.tF(N)}else console.log(Q);var g2=X.AdCh,bb=[];if(g2)for(var f=0;
|
|
f<g2.length;f++){var ir=g2[f],dG=ir._type;if(dG=="ShpN"||dG=="PCrv"){var dv=c.add.vmsk=e(ir),gY=T(G,ir);
|
|
L.A.hR(dv.g,gY);c.tF(N)}else if(ir.AdjP){var e6=ir.AdjP,fr=e6._type,bt={LevP:"levl",WhBP:"levl",SHiP:"curv",HSSP:"hue2",RecP:"hue2","B&WP":"blwh","B&CP":"brit",PosP:"post",VibP:"vibA",ExpP:"expA",ThrP:"thrs",CrvP:"curv"}[fr];
|
|
if(bt==null){console.log(e6);continue}var cx=iZ.sJ(bt,{});bb.push(cx);var ci=cx.v.Fltr.v;if(fr=="LevP"){var gv=cb.sk(ci,0);
|
|
gv[0]=e6.OutB*255;gv[1]=e6.OutW*255;cb.cI(ci,0,gv)}else if(fr=="WhBP"){var gv=cb.sk(ci,2);gv[4]=100+e6.WBTi*20;
|
|
cb.cI(ci,2,gv);var gv=cb.sk(ci,3);gv[4]=100+e6.WBTi*200;cb.cI(ci,3,gv)}else if(fr=="HSSP"){var gv=gK.sk(ci,0);
|
|
gv[0]=Math.round(e6.HueA*256);gv[1]=Math.round(e6.SatA*256);gv[2]=Math.round(e6.LumA*256);gK.cI(ci,0,gv)}else if(fr=="RecP"){ci.Clrz.v=!0;
|
|
var gv=gK.sk(ci,0);gv[0]=Math.round(e6.RecH*100);gv[1]=Math.round(e6.RecS*100);gv[2]=Math.round(e6.RecL*100);
|
|
gK.cI(ci,0,gv)}else if(fr=="B&CP"){ci.Brgh.v=Math.round(e6.Brig*100);ci.Cntr.v=Math.round(e6.Ctrs*100-100)}else if(fr=="PosP"){ci.Lvls.v=e6.Post}else if(fr=="VibP"){ci.vibrance.v=e6.Vibr-100;
|
|
ci.Strt.v=Math.round(e6.Satu*100)}else if(fr=="ExpP"){ci.Exps.v=e6.Expo;ci.gammaCorrection.v=e6.Gamm/2.2}else if(fr=="ThrP"){ci.Lvl.v=Math.round(e6.Thre*255)}else if(fr=="CrvP"){var gu=e6.Mast["Cnt "],ak=e6.Mast.Vals,gv=eJ.sk(ci,0),hP=gv[0];
|
|
for(var ai=0;ai<gu;ai++){var hK=gv[ai]=JSON.parse(JSON.stringify(hP));hK.v.Hrzn.v=Math.round(ak[ai]*255);
|
|
hK.v.Vrtc.v=Math.round(ak[4+ai]*255)}eJ.cI(ci,0,gv)}}else console.log(ir)}if(bb.length!=0){c.add.SoLd.filterFX=iZ.HA();
|
|
N.lU({id:c.add.SoLd.placed.v,rect:new df,buffer:L.G(1),_:new M.Zb});c.add.SoLd.filterFX.v.filterFXList.v=bb;
|
|
c.qI(N,!1)}var h3=X.FiEf;if(h3&&h3.length!=0){var e4=c.add.lmfx=JSON.parse(ev.default);for(var f=0;f<ev.order.length;
|
|
f++)e4[ev.CP[f]]={t:"VlLs",v:[]};for(var co=0;co<h3.length;co++){var aO=h3[co],cC=aO._type,hm={ColO:"SoFi",GrdO:"GrFl",Shad:"DrSh",InnS:"IrSh",OutG:"OrGl",InnG:"IrGl",Strk:"FrFX",PhgB:"ebbl",BevE:"ebbl"}[cC],iz=hm?JSON.parse(ev.Qo[ev.order.indexOf(hm)]):null;
|
|
if(cC=="ColO"){iz.Clr=A(aO.Colr)}else if(cC=="GrdO"){n(aO.GrFl.FDeF,iz)}else if(cC=="Shad"||cC=="InnS"||cC=="OutG"||cC=="InnG"){iz.Clr=A(aO.Colr);
|
|
iz.blur.v.val=Math.round(aO.Radi/2.4);if(aO.Offs!=null){iz.Dstn.v.val=aO.Offs;iz.lagl.v.val=Math.round(180-aO.Angl*180/Math.PI);
|
|
iz.uglg.v=!1}}else if(cC=="Strk"){iz.Clr=A(aO.Colr);iz.Sz.v.val=Math.round(aO.Radi)}else if(cC=="PhgB"||cC=="BevE"){iz.blur.v.val=Math.round(aO.Radi);
|
|
if(cC=="BevE")iz.bvlS.v.BESl="PlEb"}else if(cC=="Gaus"){if(l&&aO.Enab){c.add.vmsk.DI=aO.Radi/2.4;c.add.vmsk.Or=!0;
|
|
c.tF(N)}}if(hm){iz.enab.v=aO.Enab;if(iz.Md&&aO.BlnM!=null)iz.Md.v.BlnM=hI.$j(s(aO.BlnM));if(iz.Opct&&aO.Opac!=null)iz.Opct.v.val=Math.round(aO.Opac*100);
|
|
var cu=ev.CP[ev.order.indexOf(hm)];e4[cu].v.unshift({t:"Objc",v:iz})}}}N.u.push(c)}function e(X){var N=new M.PZ,z=X._type;
|
|
if(z=="PCrv"){var i=X.Crvs.Data,k=[],Q=[];for(var f=0;f<i.length;f++){var O=i[f];if(O.length%3!=1){O=O.slice(1,O.length-1)}for(var c=0;
|
|
c<O.length;c++){var B=O[c],G=B[2];if(G!=0)k.push(c==0?"M":"C");Q.push(B[0],B[1])}}N.g=L.M.Hz({I:Q,o:k},!0)}else{var l=X.ShpB,v=X.Shpe,p=v._type,P=l[2]-l[0];
|
|
if(p=="ShpE"){N.g=L.A.XG.Xi(l[0],l[1],l[2]-l[0],l[3]-l[1])}else if(p=="ShNR"){var h=[0,0,0,0];if(v.CTyp){h=v.ShCR.slice(0);
|
|
for(var f=0;f<4;f++)h[f]*=l[2]-l[0]}N.g=L.A.XG.Rect(l[0],l[1],l[2]-l[0],l[3]-l[1],h)}else if(p=="ShpT"){N.g=L.M.Hz({o:["M","L","L","Z"],I:[l[0],l[3],l[2],l[3],l[0]+P*.5,l[1]]},!0)}else if(p=="ShTz"){N.g=L.M.Hz({o:["M","L","L","L","Z"],I:[l[0]+P*v.PosL,l[1],l[0]+P*v.PosR,l[1],l[2],l[3],l[0],l[3]]},!0)}else{console.log("--",p);
|
|
N.g=L.A.XG.Rect(l[0],l[1],l[2]-l[0],l[3]-l[1],[0,0,0,0])}}return N}function n(X,N){var z=X.Grad,i=z.Cols;
|
|
N.Type.v.GrdT=X.Type==0?"Lnr":"Rdl";var k=[];for(var f=0;f<i.length;f++){var Q=u(i[f]);k.push([z.Posn[f][0],Q])}N.Grad.v.Intr.v=0;
|
|
L.h.Cw(k,N.Grad.v);var O=z.Posn,c=new aY(O[0][0],O[0][1]),B=new aY(O[1][0],O[1][1]);if(X.Type==0)c=new aY((c.x+B.x)/2,(c.y+B.y)/2);
|
|
L.h.vV(c,B,new df(0,0,1,1),N)}function A(X){var N=u(X);return{t:"Objc",v:L.h.wb({i:N[0]*255,m:N[1]*255,P:N[2]*255})}}function u(X){var N=X._col,z=X._type;
|
|
if(z=="HSLA"){var i=L.AP(N[0],N[1],N[2]);return[i.i,i.m,i.P,N[3]]}else if(z=="RGBA")return N;else if(z=="CMYK"){var k=1-N[3];
|
|
return[(1-N[0])*k,(1-N[1])*k,(1-N[2])*k]}else{console.log(N);throw z}}function Y(X,N,z){var i=X.Frmt,h="";
|
|
if(i!=0&&i!=6)throw i;var k=X.BmpW,Q=X.BmpH,O=i==0?4:1,c=Math.ceil(k/256),B=Math.ceil(Q/256),G=new df(0,0,c,B),l=new df;
|
|
for(var f=0;f<O;f++){var v=new Uint8Array(X["Sta"+(f+1)]),p=L.ac(v,G);l=l.BZ(p)}var P=[];for(var f=0;
|
|
f<O;f++){var v=new Uint8Array(X["Sta"+(f+1)]),j=L.G(l.Y());L.pg(v,G,j,l);P[f]=[];for(var C=0;C<j.length;
|
|
C++)P[f][C]=j[C];h+=JSON.stringify(P[f])+","+JSON.stringify(X["Idx"+(f+1)])+","}if(z[h]==null){var V=l.d*256,d=l.w*256,m=new Array(O);
|
|
for(var f=0;f<O;f++){var v=m[f]=new Uint8Array(V*d);b(v,X["Idx"+(f+1)],P[f],N,V,d)}var R=L.G(V*d*4);
|
|
if(i==0)L.dy({i:m[0],m:m[1],P:m[2],Ca:m[3]},R);else{R.fill(255);L.R6(m[0],R)}var g=new df(0,0,V,d),S={buffer:R,rect:g};
|
|
L.oE(S);z[h]=[S.rect,S.buffer]}var p=z[h][2]=z[h][0].clone();p.x+=l.x*256;p.y+=l.y*256;return z[h]}function b(X,N,z,i,k,Q){var O=0,c=k>>>8,B=Q>>>8;
|
|
for(var G=0;G<B;G++)for(var l=0;l<c;l++){var v=l*256,p=G*256,P=G*c+l,h=p*k+v,j=z[P];if(j<=1)a(X,h,0,k,256,256);
|
|
else if(j==2)a(X,h,4294967295,k,256,256);else if(j==4){var C=N[O];O++;var V=i[C.Data.DatI],d=C.Rect;
|
|
if(d==null)d=[0,0,256,256];a(X,h,0,k,256,256);w(X,(p+d[1])*k+v+d[0],V,d[1]*256+d[0],k,256,d[2]-d[0],d[3]-d[1])}else console.log(j)}}function a(X,N,z,i,k,Q){var O=N+i*Q;
|
|
for(;N<O;N+=i){var c=N+k;for(var B=N;B<c;B++){X[B]=z}}}function w(X,N,z,i,k,Q,O,c){var B=N+k*c,G=i+Q*c;
|
|
for(;N<B&&i<G;N+=k,i+=Q){for(var f=0;f<O;f++)X[N+f]=z[i+f]}}return $}();function hw(){}hw.$$=function($,o){var T=hw,s=hn.parse($),e=0;
|
|
if(s.pages.length>1)console.log(s.pages.length,"pages");var E=[],n=new df;for(var A=0;A<s.pages.length;
|
|
A++){var u=s.pages[A],Y=u.layers,b=T.L3(Y,A),w=!1;if(b.Y()>8e3*8e3||b.d>3e4||b.w>3e4){T.Sp(Y,!0);var a=T.L3(Y,A);
|
|
if(a.Y()>=b.Y())T.Sp(Y,!1)}b=T.L3(Y,A);for(var X=0;X<Y.length;X++){var N=Y[X];if(T.KL(N)=="artboard")w=!0}if(!w){console.log("no artboard");
|
|
var z={};for(var i in u)z[i]=u[i];z._class="group";u.layers=[z]}E.push(b.clone());if(b.p4())continue;
|
|
b.x=0;b.y=e;e+=b.w+200;n=n.BZ(b)}var k={};if(s.foreignSymbols)for(var f=0;f<s.foreignSymbols.length;
|
|
f++){var Q=s.foreignSymbols[f].symbolMaster;k[Q.symbolID]={le:Q}}T.i6(s.pages,k,o);for(var O in k){var N=k[O].le,c=T.$e(N.layers)}var B=hw.GE(n,8192*8192);
|
|
o.Nr=!0;o.d=Math.round(n.d/B);o.w=Math.round(n.w/B);o.buffer=L.G(o.d*o.w*4);o.Mm(s.pages[0].layers.length);
|
|
o.TP={};o.U4=[];e=0;for(var A=0;A<s.pages.length;A++){var G=s.pages[A],b=E[A],l=new fY(B,0,0,B,b.x,b.y-e);
|
|
T.wJ(G.layers,o,l,s,k,{},[]);e+=b.w+200}delete o.TP;delete o.U4;if(B!=1)alert("File scaled down "+B+"x");
|
|
o.a2B()};hw.aio=0;hw.KL=function($){return $._class?$._class:$.$class};hw.GE=function($,o){var T=1;while(Math.round($.d/T)*Math.round($.w/T)>o||Math.max(Math.round($.d/T),Math.round($.w/T))>3e4)T++;
|
|
if(T!=1&&!window.confirm("Your image is quite large ("+$.d+" x "+$.w+" px).\n"+"Press OK to scale it down "+T+"x, or Cancel to keep the size."))T=1;
|
|
return T};hw.L3=function($,o){var T=[],s=hw;for(var E=0;E<$.length;E++){var e=$[E],n=s.AS(e.frame);if(o==0||s.KL(e)=="artboard")T.push(n)}return L.rect.UC(T)};
|
|
hw.Sp=function($,o){var T=[],s=hw;for(var E=0;E<$.length;E++){var e=$[E],n=s.AS(e.frame);n.d+=150;n.w+=150;
|
|
T.push(n)}var A=L.rect.UC(T);L.rect.alc(T,o);var u=L.rect.UC(T);if(u.Y()*1.5<A.Y()||A.d>3e4&&u.d<=3e4||A.w>3e4&&u.w<=3e4){alert("Re-arranging artboards");
|
|
for(var E=0;E<$.length;E++){var Y=T[E],e=$[E],b=e.frame;b.x=Y.x;b.y=Y.y}}};hw.i6=function($,o,T){var s=hw;
|
|
for(var E=0;E<$.length;E++){var e=$[E],n=s.KL(e);if(["page","artboard","group"].indexOf(n)!=-1)s.i6(e.layers,o,T);
|
|
else if(n=="symbolMaster")o[e.symbolID]={le:e}}};hw.$e=function($){var o=hw;for(var T=0;T<$.length;T++){var s=$[T],E=o.KL(s),e=null;
|
|
if(["page","artboard","group"].indexOf(E)!=-1)e=o.$e(s.layers);if(E=="symbolMaster"||E=="symbolInstance")e=s;
|
|
if(e!=null)return e}return null};hw.wJ=function($,o,T,s,E,e,n){var A=hw,u=[];for(var Y=0;Y<$.length;
|
|
Y++){var b=$[Y],a=b.frame?A.AS(b.frame):null,w=b.style,k="",l=null,v=!1;if(w==null){console.log("no styles")}var X=A.e_(b,T),N=A.KL(b),z=N=="shapeGroup"||N=="shapePath"||N=="rectangle"||N=="oval"||N=="triangle"||N=="polygon",i=["page","artboard","group"].indexOf(N)!=-1;
|
|
if(N=="shapeGroup"){for(var f=0;f<b.layers.length;f++)if(A.KL(b.layers[f])=="shapeGroup")i=!0}var Q=b.exportOptions;
|
|
if(Q){var O=Q.exportFormats;if(O==null)O=Q.sizes;if(N!="artboard"&&(O&&O.length!=0)){var c=O[0].scale}}var B=o.$f();
|
|
B.bC(b.isVisible);var G=b.name;if(!(typeof G=="string"))G=N;B.tM(k+G.slice(0,250));if(w!=null)l=A.aau(s,o,w,a,X,B.getName(),z||N=="artboard"||i);
|
|
if(N=="rectangle"&&w&&w.fills&&w.fills[0]){var p=w.fills[0];if(p.fillType==4&&p.patternFillType>1&&p.image!=null)v=!0}if(b.shouldBreakMaskChain){while(u.length!=0)A.wf(u.pop(),o)}if(i){B.add.lsct=b.layerListExpandedType==2?hd.NH:hd.Qm;
|
|
B.fh="pass";B.Jp=24;B.bC(b.isVisible);o.u.push(o.jK());if(N=="artboard"){var P=a.clone(),h=X.jZ();P.x=-Math.floor(X.Ry/h);
|
|
P.y=-Math.floor(X.Es/h);P.d=Math.floor(P.d/h);P.w=Math.floor(P.w/h);B.y2(P);var j=b.backgroundColor,C=j?{i:255*j.red,m:255*j.green,P:255*j.blue}:{i:255,m:255,P:255};
|
|
B.add.artb.Clr={t:"Objc",v:L.h.wb(C)};B.add.artb.artboardBackgroundType={t:"long",v:4}}A.wJ(b.layers,o,X,s,E,e,n)}else if(z&&!v){B.add.vmsk=new M.PZ;
|
|
B.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));B.add.vstk.strokeEnabled.v=!1;B.add.vogk=[];var V=l!=null&&l.frameFXMulti.v.length==1,d=w?w.fills:null,m=w?A.sz(s,d,a,X,B.getName(),o,A.p9(n,b.do_objectID+"_image")):[];
|
|
if(m.length==0){if(V)B.add.vstk.fillEnabled.v=!1;else B.add.iOpa=0;B.add.SoCo={classID:"null",Clr:{t:"Objc",v:L.h.wb({i:0,m:0,P:0})}}}else{var R=m[0],g=null,S=null;
|
|
if(R.type=="SoFi"){g="SoCo";S=ev.k9}if(R.type=="GrFl"){g="GdFl";S=ev.cw}if(R.type=="patternFill"){g="PtFl";
|
|
S=ev.SZ}if(g!=null){B.add[g]={classID:"null"};for(var f=0;f<S.length;f++){var F=S[f];B.add[g][F]=R.H.v[F]}var r=R.H.v.Opct.v.val;
|
|
if(V&&r==0)B.add.vstk.fillEnabled.v=!1;else B.add.iOpa=Math.round(255*r/100)}}B.Jp|=16;B.add.vmsk.g=A.CV(b.layers?b.layers:[b],b.layers?X:T,B.add.vogk);
|
|
var q=w?w.blur:null;if(q&&q.isEnabled&&q.type<=1)B.add.vmsk.DI=q.radius;if(B.add.vmsk.g.length==2){console.log("shape with no content:",B.getName())}if(V){var W=l.frameFXMulti.v[0].v,Z=B.add.vstk,I=w.borders[0];
|
|
l.frameFXMulti.v=[];fW.HN(W,Z);var _=w.borderOptions,cN=w.miterLimit;if(_){var ce=_.dashPattern;Z.strokeStyleLineCapType.v.strokeStyleLineCapType=ev.ci.JZ[_.lineCapStyle];
|
|
Z.strokeStyleLineJoinType.v.strokeStyleLineJoinType=ev.ci.join[_.lineJoinStyle];if(ce)Z.strokeStyleLineDashSet.v=fW.FG(ce,1/W.Sz.v.val);
|
|
if(cN!=null)Z.strokeStyleMiterLimit.v=cN}}B.tF(o)}else if(N=="bitmap"||v){if(!v&&b.image==null)continue;
|
|
var gf=v?w.fills[0]:null,K=v?gf.image.bdata:b.image.bdata,cv=o.sP(K,B.getName(),0,0);cv.Jp=B.Jp;B=cv;
|
|
var q=w?w.blur:null,f0=w?w.colorControls:null;if(q||f0){B.add.SoLd.filterFX=iZ.HA();o.lU({id:B.add.SoLd.placed.v,rect:new df,buffer:L.G(1),_:new M.Zb});
|
|
var d=B.add.SoLd.filterFX.v.filterFXList.v;if(q){var i8=iZ.sJ("GsnB",{});i8.v.enab.v=q.isEnabled;i8.v.Fltr.v.Rds.v.val=q.radius;
|
|
d.push(i8)}if(f0){var b5=f0.brightness,iC=f0.contrast,an=f0.hue,cO=f0.saturation;if(an!=0||cO!=1){var i8=iZ.sJ("hue2",{});
|
|
i8.v.enab.v=f0.isEnabled;gK.cI(i8.v.Fltr.v,0,[Math.round(an*180/Math.PI),Math.round((cO-1)*100),0]);
|
|
d.push(i8)}if(b5!=0||iC!=1){var i8=iZ.sJ("brit",{});i8.v.enab.v=f0.isEnabled;iC=iC-1;if(iC>0)iC/=2;var bh=i8.v.Fltr.v;
|
|
bh.Brgh.v=Math.round(b5*255);bh.Cntr.v=Math.round(iC*255);bh.useLegacy.v=!0;d.push(i8)}}}if(v){var bD=gf.patternFillType;
|
|
if(bD==3){var fq=B.rect.d/B.rect.w,fO=a.d/a.w;if(fq<fO){X.translate(-(a.d*(1-fq/fO))/2,0);X.scale(fO/fq,1)}else{X.translate(0,-(a.w*(1-fO/fq))/2);
|
|
X.scale(1,fq/fO)}}}a.x=a.y=0;var g6=L.M.Uo(a).I;X.lY();L.M.t(g6,X,g6);B.add.SoLd.Trnf=D.p.vP(g6);B.add.SoLd.nonAffineTransform=D.p.vP(g6);
|
|
B.qI(o,!1)}else if(N=="text"){if(b.attributedString==null)continue;var hM=X.clone(),d3,h9,iz=0;hM.lY();
|
|
hM.Ca=hM.Um=Math.min(hM.Ca,hM.Um);B.add.lnsr="rend";B.add.TySh=g8.rm(0,0);B.add.TySh.QH=new df(0,0,a.d,a.w);
|
|
B.add.TySh.t=hM;var cs=b.attributedString;if(cs.archivedAttributedString)cs=cs.archivedAttributedString;
|
|
var dv=cs.NSString;if(dv==null)dv=cs.string;if(dv==null)dv="";if(dv["NS.string"])dv=dv["NS.string"];
|
|
if(e[b.do_objectID]!=null)dv=e[b.do_objectID];var ec=A.p9(n,b.do_objectID+"_stringValue");if(ec)dv=ec.value;
|
|
if(cs.attributes!=null){d3=[];h9=[];var gT=cs.attributes;for(var f=0;f<gT.length;f++){d3.push(gT[f].length,f);
|
|
h9.push(gT[f].attributes)}}else if(cs.NSAttributeInfo==null){d3=[dv.length,0];h9=[cs.NSAttributes]}else{d3=cs.NSAttributeInfo["NS.data"];
|
|
h9=cs.NSAttributes;d3=hw.a1V(d3,h9)}for(var f=0;f<d3.length;f+=2)iz+=d3[f];if(iz!=dv.length){while(iz>dv.length){d3[d3.length-2]--;
|
|
iz--;if(d3[d3.length-2]==0){d3.pop();d3.pop()}}d3[d3.length-2]+=dv.length-iz}dv=dv.replace(/\u2028/g,"\n");
|
|
dv=dv.replace(/\u2029/g,"\n");dv=dv.replace(/\r/g,"\n");var gw=B.add.TySh.h3;g8.YN(gw,0,dv);if(dv!=""){var iI=b.textBehaviour,g2=w.textStyle,bb=g2?g2.verticalAlignment:0,ir=A.a8r(gw,d3,h9,dv),h=hM.jZ(),dG=g8.$Q(gw,0,1),fr=0;
|
|
if(dG.oH.Font){var gY=dG.Nd[dG.oH.Font].Name;if(gY=="FontAwesome"||gY=="Ionicons")ir*=.87}var e6=dG.oH.AutoLeading?0:dG.oH.Leading*.6,bt=Math.max(ir,e6)*h,cx=a.d,ci=a.w;
|
|
if(iI==0){g8.I8(gw,0);var gv=g8.KH(dG.CL);if(gv==1)fr=cx*h;if(gv==2)fr=cx*h*.5;if(bb==0)bt*=1;else bt*=.9}else{g8.I8(gw,1);
|
|
g8.bi(gw,[0,0,Math.round(cx),Math.round(ci)]);if(iI==2&&bb==0)bt=bt*.2;else if(iI==2&&bb==1){bt=h*.5*(ci-dG.oH.FontSize)}else if(iI==1&&bb==0)bt=bt*.2;
|
|
else bt=bt*.35}B.add.TySh.t.translate(fr,bt)}}else if(N=="symbolInstance"||N=="symbolMaster"){var gu=b.symbolID;
|
|
if(e[b.do_objectID])gu=e[b.do_objectID].symbolID;var ak=A.p9(n,b.do_objectID+"_symbolID");if(ak)gu=ak.value;
|
|
if(gu=="")continue;var hP={};for(var F in e)hP[F]=e[F];if(b.overrides)for(var F in b.overrides)hP[F]=b.overrides[F];
|
|
var ai=n.slice(0);if(b.overrideValues)ai=ai.concat(b.overrideValues);var hK=E[gu];if(hK==null){console.log("Unknown master master",b.symbolID);
|
|
continue}var h3=hw.AS(hK.le.frame),e4=h3.d/a.d,co=h3.w/a.w,aO=X.clone();aO.scale(e4,co);B.add.lsct=hd.Qm;
|
|
B.fh="pass";B.Jp=24;B.bC(b.isVisible);o.u.push(o.jK());var cC=hK.le;if(o.U4.indexOf(cC)==-1){o.U4.push(cC);
|
|
A.wJ(cC.layers,o,aO,s,E,hP,ai);o.U4.pop()}}else if(N=="slice"){console.log("slice layers are ignored by now");
|
|
continue}else{console.log("unknown layer type: "+N,b);continue}if(w&&w.contextSettings){var hm=w.contextSettings,cu=hm.blendMode;
|
|
if(cu<A.GL.length){B.fh=hI.zk[hI.C3.indexOf(A.GL[cu])];if(i&&B.fh=="norm")B.fh="pass"}B.opacity=Math.round(B.opacity*hm.opacity)}if(l!=null){B.add.lmfx=l}o.u.push(B);
|
|
if(b.hasClippingMask&&$.length>1){u.push(B);o.u.push(o.jK())}}while(u.length!=0)A.wf(u.pop(),o)};hw.p9=function($,o){for(var f=0;
|
|
f<$.length;f++)if($[f].overrideName.startsWith(o))return $[f]};hw.a1V=function($,o){var T=0,s=[];while(T+1<$.length){var E=$[T];
|
|
T++;if(E>127){E+=128*($[T]-1);T++;if($[T-1]>127){E+=128*($[T]-1);T++}}var e=$[T];T++;s.push(E,e)}return s};
|
|
hw.a8r=function($,o,T,s){var E=hw,e=0,b=0,a=0;for(var f=0;f<s.length;f++){var n=s.charCodeAt(f),A=1473<=n&&n<=1479||1488<=n&&n<=1514||1520<=n&&n<=1524,u=1569<=n&&n<=1594||1600<=n&&n<=1749;
|
|
if(A||u)e++}var Y=e>s.length/2;for(var f=0;f<o.length;f+=2){var w=o[f],B=14,G="DejaVuSans";if(w==0)continue;
|
|
var X=o[f+1],N=T[X],z=g8.$Q($,b,b+w-1),i=N.NSColor;if(i==null){var i=N.MSAttributedStringColorDictionaryAttribute;
|
|
if(i==null)i=N.MSAttributedStringColorAttribute;if(i==null)i="0 0 0";else i=[i.red,i.green,i.blue].join(" ")}else if(E.KL(i)=="MSArchivedColor")i=i.dr+" "+i.dg+" "+i.db;
|
|
else if(i.NSRGB){i=i.NSRGB;i=t.en(i,0,i.length-1)}else if(i.NSCMYK){i=i.NSCMYK;i=t.en(i,0,i.length-1);
|
|
i=i.split(" ").map(parseFloat);var k=1-i[0],Q=1-i[1],O=1-i[2],c=1-i[3];i=k*c+" "+Q*c+" "+O*c}else if(i.NSWhite){i="1 1 1"}i=i.split(" ");
|
|
z.oH.FillColor={Type:1,Values:[1,parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2])]};var l=N.MSAttributedStringFontAttribute;
|
|
if(N.NSFont){B=N.NSFont.NSSize;G=N.NSFont.NSName}else if(l){if(l.attributes){l=l.attributes;B=l.size;
|
|
G=l.name}else{var v=l.NSFontDescriptorAttributes;if(v==null)v=l.UIFontDescriptorAttributes;l=v;B=l.NSFontSizeAttribute;
|
|
G=l.NSFontNameAttribute}if(G==null)G="DejaVuSans"}var a=Math.max(a,B);z.oH.FontSize=Math.round(B);g8.PL(z,G);
|
|
var p=N.NSKern;if(p==null)p=N.kerning;if(p!=null)z.oH.Tracking=Math.round(1e3*p/B);if(N.NSUnderline!=null)z.oH.Underline=N.NSUnderline>0;
|
|
var P=N.NSStrikethrough;if(P==null)P=N.strikethroughStyle;if(P!=null)z.oH.Strikethrough=P>0;if(N.MSAttributedStringTextTransformAttribute==1)z.oH.FontCaps=2;
|
|
var h=N.NSParagraphStyle;if(h==null)h=N.paragraphStyle;if(h){var j=h.paragraphSpacing;if(j!=null){z.CL.SpaceAfter=j}var C=h.NSAlignment;
|
|
if(C==null)C=h.alignment;if(C!=null){var V=0;if(!1){}else if(C==1)V=1;else if(C==2)V=2;else if(C==4)V=0;
|
|
else{V=C;console.log("unknown align",C)}if(Y&&V<2)V=1-V;z.CL.Justification=V}var d=h.NSMinLineHeight;
|
|
if(d==null)d=h.minimumLineHeight;if(d!=null){z.oH.AutoLeading=!1;z.oH.Leading=d}}z.CL._Direction=Y?1:0;
|
|
g8.zA($,b,b+w,z);b+=w}return a};hw.aau=function($,o,T,s,E,e,n){var A=hw,u=JSON.parse(ev.default),Y=!1;
|
|
for(var f=0;f<ev.order.length;f++)u[ev.CP[f]]={t:"VlLs",v:[]};var b=T.fills,a=A.sz($,b,s,E,e,o);for(var w=0;
|
|
w<2;w++){var X=T[["shadows","innerShadows"][w]];if(X==null)continue;var N=["DrSh","IrSh"][w],z=ev.CP[ev.order.indexOf(N)];
|
|
for(var f=0;f<X.length;f++){var i=X[f];if(!i.isEnabled)continue;if(i.contextSettings.opacity==0||i.color.alpha==0)continue;
|
|
var k=JSON.parse(ev.Qo[ev.order.indexOf(N)]);u[z].v.unshift({t:"Objc",v:k});Y=!0;k.Clr.v=A.So(i.color);
|
|
k.blur.v.val=Math.round(i.blurRadius/E.jZ());var Q=E.clone();Q.Ry=Q.Es=0;Q.lY();var O=Q.bb(new aY(i.offsetX,i.offsetY)),c=Math.sqrt(O.x*O.x+O.y*O.y);
|
|
k.Dstn.v.val=Math.round(c);k.lagl.v.val=Math.round(Math.atan2(O.y,-O.x)*(180/Math.PI));if(k.layerConceals)k.layerConceals.v=a.length!=0;
|
|
A.T8(i,k)}}var B=T.borders;if(B!=null&&(a.length==0||T.blur==null||!T.blur.isEnabled))for(var f=0;f<B.length;
|
|
f++){var G=B[f];if(!G.isEnabled)continue;var k=JSON.parse(ev.Qo[ev.order.indexOf("FrFX")]),z=ev.CP[ev.order.indexOf("FrFX")];
|
|
u[z].v.unshift({t:"Objc",v:k});Y=!0;k.Clr.v=A.So(G.color);if(G.fillType!=0&&G.gradient){var l=A.Oy(G.gradient,s,E,e),v=["Type","Angl","Ofst","Scl"];
|
|
for(var f=0;f<v.length;f++)k[v[f]]=l[v[f]];k.Grad.v=l.Grad.v;k.PntT.v.FrFl="GrFl"}k.Sz.v.val=G.thickness/E.jZ();
|
|
k.Styl.v.FStl=["CtrF","InsF","OutF"][G.position];A.T8(G,k)}for(var f=n?1:0;f<a.length;f++){var p=a[f],z=ev.CP[ev.order.indexOf(p.type)];
|
|
u[z].v.unshift(p.H);Y=!0}return Y?u:null};hw.sz=function($,o,T,s,E,e,n){if(o==null)return[];var A=hw,u=[];
|
|
for(var f=0;f<o.length;f++)if(o[f].isEnabled)u.push(o[f]);o=u;var Y=[];for(var f=0;f<o.length;f++){var b=o[f],a=null,w=null;
|
|
if(b.fillType==0){a="SoFi";var X=JSON.parse(ev.Qo[ev.order.indexOf("SoFi")]);w={t:"Objc",v:X};w.v.Clr.v=A.So(b.color)}else if(b.fillType==1){a="GrFl";
|
|
w={t:"Objc",v:A.Oy(b.gradient,T,s,E)}}else if(b.fillType==4&&b.image!=null){var N=b.image;if(n)N=n.value;
|
|
var z=eY.RP(N.bdata.buffer);if(z!=null&&z!="pdf"&&z!="eps"){var i,G=0,l=0,v=0;if(e.TP[N.key])i=e.TP[N.key];
|
|
else{var k=eY.Q1(z).yj(N.bdata)[0],Q=k.Sg.clone();i={};i.id=iG.IP()+"-d71c-11e5-b1ae-a548a96e5f9f";i.name="someImage";
|
|
i.i2=[new Uint8Array(k.data),Q];e.Af(i);e.TP[N.key]=i}var O=i.i2[1],X=JSON.parse(ev.Qo[ev.order.indexOf("patternFill")]);
|
|
a="patternFill";w={t:"Objc",v:X};var c=b.patternFillType,B=b.patternTileScale;X.Algn.v=!0;X.Ptrn.v.Idnt.v=i.id;
|
|
if(c==0){G=B*O.d/Math.min(O.d,O.w);l=-s.Ry;v=-s.Es}else{G=Math.max(T.d/O.d,T.w/O.w);l=-s.Ry-(O.d*G-T.d)/2;
|
|
v=-s.Es-(O.w*G-T.w)/2}X.Scl.v.val=100*G*(1/s.jZ());X.phase.v.Hrzn.v=Math.round(l/s.jZ());X.phase.v.Vrtc.v=Math.round(v/s.jZ())}}else if(b.fillType==5){console.log("fill type Noise not supported yet")}else console.log("unknown fill type",b.fillType);
|
|
if(a!=null){A.T8(b,w.v);Y.push({type:a,H:w})}}return Y};hw.aqI=function($){var o=hw,T=new df(0,0,1,1);
|
|
$=$.slice(0);while(!0){var s=!1;for(var f=0;f<$.length-1;f++){var E=$[f],e=$[f+1],n=null,A=E.contextSettings;
|
|
if(E.fillType==0&&(A==null||A.opacity==1&&A.blendMode==0)&&E.color.alpha==1){var u="norm",Y=1,A=e.contextSettings;
|
|
if(A){Y=A.opacity;u=hI.VB(o.GL[A.blendMode])}if(e.fillType==0){n=JSON.parse(JSON.stringify(e));o.RF(n.color,E.color,n.color,T,u,Y)}if(e.fillType==1){n=JSON.parse(JSON.stringify(e));
|
|
var b=n.gradient.stops;for(var a=0;a<b.length;a++)o.RF(b[a].color,E.color,b[a].color,T,u,Y)}if(n!=null&&n.contextSettings){var A=n.contextSettings;
|
|
A.opacity=1;A.blendMode=0}}if(n!=null){$.splice(f,0,n);s=!0;break}}if(!s||$.length<2)break}return $};
|
|
hw.RF=function($,o,T,s,E,e){var n=hw,A=L.G(4);n.jY($,A);var u=L.G(4);n.jY(o,u);L.R.xE(E,A,s,u,s,s,e);
|
|
n.a4P(u,T)};hw.jY=function($,o){o[0]=255*$.red;o[1]=255*$.green;o[2]=255*$.blue;o[3]=255*$.alpha};hw.a4P=function($,o){o.red=$[0]/255;
|
|
o.green=$[1]/255;o.blue=$[2]/255;o.alpha=$[3]/255};hw.wf=function($,o){$=$.clone();$.Jp=24;$.tM("Mask by "+$.getName());
|
|
o.u.push($);$.add.lsct=hd.NH;$.add.lyid=o.tB();delete $.add.lmfx;delete $.add.SoCo;delete $.add.GdFl;
|
|
delete $.add.PtFl;delete $.add.iOpa;if($.add.vmsk)$.add.vmsk.Or=!0;$.tF(o);if(($.Jp&16)==16)$.Jp-=16;
|
|
if(($.Jp&2)==2)$.Jp-=2;$.fh="pass";$.opacity=255};hw.GL="Nrml Drkn Mltp CBrn Lghn Scrn CDdg Ovrl SftL HrdL Dfrn Xclu H Strt Clr Lmns linearBurn linearDodge".split(" ");
|
|
hw.Oy=function($,o,T,s){T=T.clone();T.lY();T.Ry=T.Es=0;var E=T.jZ(),w=0,X=0;T.scale(1/E,1/E);var e=hw,n=JSON.parse(ev.Qo[ev.order.indexOf("GrFl")]),A=n.Grad.v;
|
|
A.Intr.v=0;if($==null)return n;var u=$.gradientType,Y=e.W1($.from),b=e.W1($.to);Y.offset(-.5,-.5);b.offset(-.5,-.5);
|
|
Y=T.bb(Y);b=T.bb(b);var a=Math.atan2(-(b.y-Y.y),b.x-Y.x);n.Type.v.GrdT=["Lnr","Rdl","Angl"][u];n.Scl.v.val=100*aY.Sa(Y,b);
|
|
if(u==0){n.Angl.v.val=180/Math.PI*a;n.Scl.v.val=100*aY.Sa(Y,b);w=(Y.x+b.x)/2;X=(Y.y+b.y)/2}if(u==1){n.Scl.v.val=200*aY.Sa(Y,b);
|
|
w=Y.x;X=Y.y}if(u==2){n.Angl.v.val=180/Math.PI*(a-Math.PI/2)}var N=n.Ofst.v;N.Hrzn.v.val=w*100;N.Vrtc.v.val=X*100;
|
|
var z=[];for(var f=0;f<$.stops.length;f++){var i=$.stops[f],k=i.color;z.push([i.position,k?[k.red,k.green,k.blue]:[0,0,0],k.alpha])}L.h.Cw(z,A);
|
|
return n};hw.T8=function($,o){var T=hw,s=1,E=$.contextSettings;if(E!=null){o.Md.v.BlnM=T.GL[E.blendMode];
|
|
s*=E.opacity}else o.Md.v.BlnM=T.GL[0];o.enab.v=$.isEnabled;if(o.uglg!=null)o.uglg.v=!1;if($.color!=null)s*=$.color.alpha;
|
|
o.Opct.v.val=Math.round(s*100)};hw.So=function($){return L.h.wb($?{i:$.red*255,m:$.green*255,P:$.blue*255}:{i:0,m:0,P:0})};
|
|
hw.CV=function($,o,T){var s=hw,E=[{type:6},{type:8,all:0}];for(var e=0;e<$.length;e++){var n=$[e],A=n.booleanOperation,u=0,Y=n._class,z=!1;
|
|
if(Y=="group"||Y=="text"||Y=="symbolInstance"||Y=="slice"){console.log(Y+" inside ShapeGroup");continue}if(A==-1)u=0;
|
|
else if(A==0)u=1;else if(A==1)u=2;else if(A==2)u=3;else if(A==3)u=0;if(e==0)u=1;var b=hw.AS(n.frame),a=s.e_(n,o),w=n.path?n.path:n,X=[{type:0,length:0,m6:u,aq:2,ZO:0,Eg:0}],N=w.points;
|
|
for(var f=0;f<N.length;f++){var i=N[f],k=s.W1(i.curveTo),Q=s.W1(i.point),O=s.W1(i.curveFrom);z=z||i.hasCurveFrom&&!O.R1(Q)||i.hasCurveTo&&!k.R1(Q)}var c=[];
|
|
if(!z){var B=[],J=N.length;if(J==0)continue;for(var f=0;f<J;f++){c[f]=N[f].cornerRadius;var i=s.W1(N[f].point);
|
|
B.push(i.x,i.y)}a.scale(1/b.d,1/b.w);a.lY();L.M.t(B,a,B);var G=L.A.x7(B,c);X=X.concat(G);X[0].length=X.length-1}else{var l=N.length;
|
|
X[0].length=l;for(var f=0;f<l;f++){var i=N[f],v=i.curveMode,p=s.W1(i.point);X[1+f]={type:v==2||v==4?1:2,Wq:i.hasCurveTo?s.W1(i.curveTo):p.clone(),W:p,JL:i.hasCurveFrom?s.W1(i.curveFrom):p.clone()}}a.scale(1/b.d,1/b.w);
|
|
a.lY();L.A.hR(X,a);var c=[];for(var f=0;f<l;f++){var i=N[f],v=i.curveMode,P=i.cornerRadius;if(v==1&&P!=0)c.push(P);
|
|
else c.push(0)}}if(!w.isClosed)for(var f=0;f<X.length;f++)X[f].type+=3;E=E.concat(X);var h=L.qy.Ke(),j=s.KL(n);
|
|
if(a.P==0&&a.Z9==0){var C=a.Ry,V=a.Es,d=C+a.Ca,m=V+a.Um,R=[C,V,d,m];if(j=="rectangle"&&c.length==4)h=L.qy.G8(2,R,c);
|
|
if(j=="oval")h=L.qy.G8(5,R)}T.push(h)}return E};hw.e_=function($,o){var T=o.clone(),s=$.frame?hw.AS($.frame):null;
|
|
if(s)T.translate(-s.x-s.d/2,-s.y-s.w/2);if($.isFlippedHorizontal)T.scale(-1,1);if($.isFlippedVertical)T.scale(1,-1);
|
|
T.rotate(-$.rotation*(Math.PI/180));if(s)T.translate(s.d/2,s.w/2);return T};hw.W1=function($){$=$.slice(1,$.length-1).split(",");
|
|
return new aY(parseFloat($[0]),parseFloat($[1]))};hw.AS=function($){return new df($.x,$.y,$.width,$.height)};
|
|
hw.Ig=function($){return{_class:"rect",constrainProportions:!1,x:$.x,y:$.y,width:$.d,height:$.w}};function ar(){}ar.$$=function($,o){var T=Date.now(),s=ar,E=UZIP.parse($),e=JSON.parse(t.LK(E.manifest)),n=JSON.parse(t.LK(E["resources/graphics/graphicContent.agc"])).resources,A=[],u=e.children;
|
|
for(var f=0;f<u.length;f++){var Y=u[f];if(Y.name=="artwork"){var b=Y.children;for(var a=0;a<b.length;
|
|
a++)if(b[a]["uxdesign#bounds"]){var w=b[a],X=JSON.parse(t.LK(E["artwork/"+w.path+"/graphics/graphicContent.agc"]));
|
|
if(X.children.length!=1)throw"e";w._node=X.children[0];A.push(w)}}}var N=[],z=new df;for(var f=0;f<A.length;
|
|
f++){var w=A[f],i=hw.AS(w["uxdesign#bounds"]);N.push(i);z=z.BZ(i)}var k=hw.GE(z,8192*8192);o.Nr=!0;o.d=Math.round(z.d/k);
|
|
o.w=Math.round(z.w/k);o.buffer=L.G(o.d*o.w*4);o.Mm(A.length);var Q=new fY(k,0,0,k,z.x,z.y);o.TP={};for(var f=0;
|
|
f<A.length;f++){var w=A[f],i=hw.AS(w["uxdesign#bounds"]),O=w._node,c=Q.clone(),B=i.clone(),G=c.jZ();
|
|
c.translate(-i.x,-i.y);B.x=-Math.floor(c.Ry/G);B.y=-Math.floor(c.Es/G);B.d=Math.floor(B.d/G);B.w=Math.floor(B.w/G);
|
|
c.translate(i.x,i.y);ar.Tx(O,o,c,n,E,B);var l=o.u[o.u.length-1];l.tM(w.name);l.y2(B);if(f!=A.length-1)l.add.lsct=hd.Qm}delete o.TP};
|
|
ar.fo=function($){if($==null)return new fY;return new fY($.a,$.b,$.c,$.d,$.tx,$.ty)};ar.Tx=function($,o,T,s,E,e){var n=ar,A=$.type,u=$[A],Y=$.style,b=n.fo($.transform),N,z="none",i,k="none",Q,O;
|
|
b.lY();var a=T.clone();a.concat(b);var w=o.$f(),X=$.name;w.tM(X?X.slice(0,250):"Layer");if($.visible!=null)w.bC($.visible);
|
|
if(Y){N=Y.stroke;z=N?N.type:"none";i=Y.fill;k=i?i.type:"none";Q=Y.filters;O=Y.clipPath;if(O&&s.clipPaths[O.ref])O=s.clipPaths[O.ref].children;
|
|
else O=null;if(Y.opacity)w.opacity=Math.round(255*Y.opacity);if(k=="solid"&&i.color.alpha)w.opacity=Math.round(w.opacity*i.color.alpha);
|
|
if(Q){w.add.lmfx=n.a1F(Q);for(var f=0;f<Q.length;f++)if(Q[f].type=="uxdesign#blur"){var c=Q[f],B=c.params,G=B.brightnessAmount;
|
|
if(G==null)G=0;G=Math.abs(G/100);if((c.visible==null||c.visible==!0)&&B.backgroundEffect)w.opacity=Math.round(w.opacity*(G+(1-G)*B.fillOpacity))}}if(k=="pattern"&&i.pattern.meta.ux.uid=="")k="none"}if(O==null&&$.meta&&$.meta.ux&&$.meta.ux.clipPathResources)O=$.meta.ux.clipPathResources.children;
|
|
if(A=="artboard"||A=="group"){if(O){var l=O[0],v=l.shape,p=v!=null&&v.type=="rect"&&v.width*v.height>1e6;
|
|
if(l.type!="text"&&!p){if(v){var b=n.fo(l.transform);b.lY();var P=a.clone();P.concat(b);w.add.vmsk=new M.PZ;
|
|
w.add.vmsk.g=n.CV(v);P=P.clone();P.lY();L.A.hR(w.add.vmsk.g,P);w.tF(o)}}else if(!p)alert("Clipping by text has been ignored")}w.add.lsct=hd.NH;
|
|
w.fh="pass";w.Jp=24;if($.visible!=null)w.bC($.visible);o.u.push(o.jK());var h=u.children,j=i;if(j)j=j.color;
|
|
if(j)j=j.value;if(i){if(A=="artboard"&&k=="solid"){w.y2(new df(0,0,10,10));w.add.artb.Clr={t:"Objc",v:L.h.wb({i:j.r,m:j.g,P:j.b})};
|
|
w.add.artb.artboardBackgroundType={t:"long",v:4}}else{var C=o.$f();C.tM("BACKGROUND");C.Jp|=16;C.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));
|
|
C.add.vmsk=new M.PZ;C.add.vmsk.g=n.CV({type:"rect",x:e.x,y:e.y,width:e.d,height:e.w});n.cH(i,k,a,e,e,C,o,s,E);
|
|
C.tF(o);o.u.push(C)}}for(var f=0;f<h.length;f++){ar.Tx(h[f],o,a,s,E,e)}}else if(A=="shape"&&$.shape.type=="rect"&&($.shape.r==null||$.shape.r==0)&&k=="pattern"&&Math.abs($.shape.width/$.shape.height-i.pattern.width/i.pattern.height)<.01){var V=i.pattern,d=V.meta.ux,m=d.uid,R=E["resources/"+m];
|
|
if(R==null){console.log(V);return}var g=o.sP(R,w.getName(),0,0);g.Jp=w.Jp;g.opacity=w.opacity;w=g;var S=L.M.Uo(new df(0,0,V.width,V.height)).I,F=new fY;
|
|
F.scale(V.width/$.shape.width,V.height/$.shape.height);if(d.offsetX)F.translate(-d.offsetX*V.width,0);
|
|
if(d.offsetY)F.translate(0,-d.offsetY*V.height);a.concat(F);a.lY();L.M.t(S,a,S);w.add.SoLd.Trnf=D.p.vP(S);
|
|
w.add.SoLd.nonAffineTransform=D.p.vP(S);w.qI(o,!1)}else if(A=="shape"){w.Jp|=16;w.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));
|
|
w.add.vmsk=new M.PZ;w.add.vmsk.g=n.CV(u);var r=L.A.hT(w.add.vmsk.g,null),P=a.clone();P.lY();L.A.hR(w.add.vmsk.g,P);
|
|
var q=L.A.hT(w.add.vmsk.g,null);if(z=="none"){}else{var W=N.color.value,Z,I;Z="SoFi";var _=JSON.parse(ev.Qo[ev.order.indexOf("SoFi")]);
|
|
I={t:"Objc",v:_};I.v.Clr.v=L.h.wb({i:W.r,m:W.g,P:W.b});var cN=N.align,ce=N.cap;if(cN==null)cN="center";
|
|
var gf=w.add.vstk;gf.strokeEnabled.v=!0;gf.strokeStyleLineWidth.v.val=N.width;if(cN)gf.strokeStyleLineAlignment.v.strokeStyleLineAlignment=ev.ci.k0[["inside","center","outside"].indexOf(cN)];
|
|
if(ce)gf.strokeStyleLineCapType.v.strokeStyleLineCapType=ev.ci.JZ[["butt","round","square"].indexOf(ce)];
|
|
var K=["SoFi","GrFl","patternFill"].indexOf(Z),cv=[ev.k9,ev.cw,ev.SZ][K];gf.strokeStyleContent.v={classID:ev.ci.RG[0]};
|
|
var f0=gf.strokeStyleContent.v={classID:ev.ci.RG[K]};for(var f=0;f<cv.length;f++)f0[cv[f]]=I.v[cv[f]]}if(Q)for(var f=0;
|
|
f<Q.length;f++)if(Q[f].type=="uxdesign#blur"&&Q[f].visible){var i8=Q[f];w.add.vmsk.DI=i8.params.blurAmount}n.cH(i,k,a,r,q,w,o,s,E);
|
|
w.tF(o)}else if(A=="text"&&$.text){var b5=$.text,iC=b5.frame,an=Y.font,cO=Y.textAttributes,b=a.clone(),hM=0;
|
|
b.lY();w.add.lnsr="rend";w.add.TySh=g8.rm(0,0);w.add.TySh.QH=new df(0,0,100,100);w.add.TySh.t=b;var bh=w.add.TySh.h3,bD=b5.rawText.replace(/\r/g,"\n").replace(/\u000b/g,"\n");
|
|
g8.YN(bh,0,bD);if(bD!=""){var fq=g8.$Q(bh,0,1),fO=an.postscriptName;if(fO==null)fO=an.family;g8.PL(fq,fO);
|
|
fq.oH.FontSize=Math.round(an.size);if(i){var W=i.color.value;fq.oH.FillColor={Type:1,Values:[1,W.r/255,W.g/255,W.b/255]}}if(cO){if(cO.paragraphAlign)fq.CL.Justification=["left","right","center"].indexOf(cO.paragraphAlign);
|
|
if(cO.letterSpacing)fq.oH.Tracking=Math.round(cO.letterSpacing);if(cO.lineHeight){fq.oH.AutoLeading=!1;
|
|
fq.oH.Leading=Math.round(cO.lineHeight)}}g8.zA(bh,0,bD.length,fq)}var g6=$.meta.ux.rangedStyles;if(g6)for(var f=0;
|
|
f<g6.length;f++){var u=g6[f],d3=Math.min(u.length,bD.length-hM),fq=g8.$Q(bh,hM,hM+d3),fO=u.postscriptName;
|
|
if(fO==null)fO=u.family;if(fO!=null)g8.PL(fq,fO);var h9=u.textScript,cs=u.underline,dv=u.fontSize,c=u.fill,ec=u.textTransform;
|
|
if(h9&&h9!="none")fq.oH.FontBaseline=h9=="superscript"?1:2;if(cs!=null)fq.oH.Underline=cs;if(dv!=null)fq.oH.FontSize=Math.round(dv);
|
|
if(ec!=null)fq.oH.FontCaps=ec=="uppercase"?2:0;if(c!=null){var gT=c.value;fq.oH.FillColor={Type:1,Values:[1,(gT>>>16&255)/255,(gT>>>8&255)/255,(gT>>>0&255)/255]}}g8.zA(bh,hM,hM+d3,fq);
|
|
hM+=d3}if(iC.type=="area"||iC.type=="autoHeight"){var iz=iC.width,gw=iC.height;g8.I8(bh,1);g8.bi(bh,[0,0,iz,gw!=null?gw:iz*2])}}else console.log(A,$);
|
|
o.u.push(w)};ar.CV=function($){var o=$.type,T=[{type:6},{type:8,all:0}];if(o=="rect"){var s=$.r,E=$.x,e=$.y,n=$.width,A=$.height;
|
|
if(s==null)T=L.A.XG.Rect(E,e,n,A,0);else{var u=L.A.x7([E,e,E+n,e,E+n,e+A,E,e+A],s,!1);T.push({type:0,m6:1,length:u.length,ZO:0,Eg:0,aq:1});
|
|
T=T.concat(u)}}else if(o=="circle"){var s=$.r;T=L.A.XG.Xi($.cx-s,$.cy-s,2*s,2*s)}else if(o=="ellipse"){var Y=$.rx,b=$.ry;
|
|
T=L.A.XG.Xi($.cx-Y,$.cy-b,2*Y,2*b)}else if(o=="path"||o=="compound"){var a=Typr.U.SVGToPath($.path);
|
|
T=L.M.Hz({o:a.cmds,I:a.crds},!1)}else if(o=="line"){var w=$.x1,X=$.x2,N=$.y1,z=$.y2;T=T.concat([{type:0,m6:1,length:2,ZO:0,Eg:0,aq:1}]).concat(L.A.x7([w,N,X,z],0,!0))}else if(o=="polygon"){var i=$.points,u=[];
|
|
for(var f=0;f<i.length;f++)u.push(i[f].x,i[f].y);T=T.concat(L.A.XG.Yz(u,0,!1).slice(2))}else console.log(o,$);
|
|
return T};ar.a1F=function($){var o=JSON.parse(ev.default);for(var f=0;f<ev.order.length;f++)o[ev.CP[f]]={t:"VlLs",v:[]};
|
|
for(var f=0;f<$.length;f++){var T=$[f],s=T.type,E=T.params,e=T.visible;if(s=="dropShadow"){var n=ev.CP[ev.order.indexOf("DrSh")],A=JSON.parse(ev.Qo[ev.order.indexOf("DrSh")]);
|
|
o[n].v.unshift({t:"Objc",v:A});var u=E.dropShadows;if(u.length!=1)throw"e";var Y=u[f],b=Y.color,a=b.value,w=Y.dx,X=Y.dy;
|
|
A.Clr.v=L.h.wb({i:a.r,m:a.g,P:a.b});A.Opct.v.val=Math.round((b.alpha!=null?b.alpha:1)*100);A.uglg.v=!1;
|
|
A.enab.v=e!=null?e:!0;A.lagl.v.val=Math.round(180/Math.PI*Math.atan2(X,-w));A.Dstn.v.val=Math.round(Math.sqrt(w*w+X*X));
|
|
A.blur.v.val=Math.round(Y.r*2.3)}}return o};ar.cH=function($,o,T,s,E,e,n,A,u){var Y=ar;if(o=="none"){e.add.vstk.fillEnabled.v=!1;
|
|
e.add.SoCo={classID:"null",Clr:{t:"Objc",v:L.h.wb({i:0,m:0,P:0})}}}else{var b,a,w;if(o=="solid"){var X=$.color.value;
|
|
b="SoCo";a=ev.k9;var N=JSON.parse(ev.Qo[ev.order.indexOf("SoFi")]);w={t:"Objc",v:N};w.v.Clr.v=L.h.wb({i:X.r,m:X.g,P:X.b})}else if(o=="gradient"){b="GdFl";
|
|
a=ev.cw;var N=JSON.parse(ev.Qo[ev.order.indexOf("GrFl")]),z=N.Grad.v,c,B,G;z.Intr.v=0;var i=$[o],k=i.ref?A.gradients[i.ref]:i.meta.ux.gradientResources,Q=["linear","radial"].indexOf(k.type),O=k.stops;
|
|
N.Type.v.GrdT=["Lnr","Rdl","Angl"][Q];if(Q==0){var c=new aY(i.x1,i.y1),B=new aY(i.x2,i.y2);c.x=B.x+.5*(c.x-B.x);
|
|
c.y=B.y+.5*(c.y-B.y)}else{var c=new aY(i.cx,i.cy),B=new aY(i.cx+i.r,i.cy)}G=E;if(i.units=="objectBoundingBox"){var l=new fY(s.d,0,0,s.w,s.x,s.y);
|
|
c=l.bb(c);B=l.bb(B)}var l=Y.fo(i.transform);c=l.bb(c);B=l.bb(B);l=T.clone();l.lY();c=l.bb(c);B=l.bb(B);
|
|
L.h.vV(c,B,G,N);var v=[];for(var f=0;f<O.length;f++){var p=O[f],P=p.color,X=P.value,h=P.alpha;if(h==null)h=1;
|
|
v.push([p.offset,[X.r/255,X.g/255,X.b/255],h])}L.h.Cw(v,z);w={t:"Objc",v:N}}else if(o=="pattern"){b="PtFl";
|
|
a=ev.SZ;var N=JSON.parse(ev.Qo[ev.order.indexOf("patternFill")]),R,q=1,W=0,Z=0,I=1;w={t:"Objc",v:N};
|
|
var j=$[o],C=j.meta.ux,V=C.uid,d=u["resources/"+V].buffer,m=eY.RP(d);if(n.TP[V])R=n.TP[V];else{var g=new df(0,0,j.width,j.height),S;
|
|
if(g.p4()){g=new df(0,0,1,1);S=new ArrayBuffer(4)}else{var F=eY.Q1(m);if(F.or){var r=new iG;F.yj(d,r);
|
|
S=r.aw().buffer}else S=F.yj(d)[0].data}R={};R.id=iG.IP()+"-d71c-11e5-b1ae-a548a96e5f9f";R.name="someImage";
|
|
R.i2=[new Uint8Array(S),g];n.Af(R);n.TP[V]=R}var g=R.i2[1];N.Algn.v=!0;N.Ptrn.v.Idnt.v=R.id;if(C.scaleBehavior=="cover"){q=I*Math.max(E.d/g.d,E.w/g.w);
|
|
var _=q;if(C.scale!=null)q*=C.scale;W=E.x-(g.d*q-E.d)/2;Z=E.y-(g.w*q-E.w)/2;if(C.offsetX!=null)W+=C.offsetX*g.d*_;
|
|
if(C.offsetY!=null)Z+=C.offsetY*g.w*_}else if(C.scaleBehavior=="fill"){q=I*Math.min(E.d,E.w)/Math.max(g.d,g.w);
|
|
W=E.x-(g.d*q-E.d)/2;Z=E.y-(g.w*q-E.w)/2}else throw"Unknown scale behaviour";N.Scl.v.val=100*q;N.phase.v.Hrzn.v=Math.round(W);
|
|
N.phase.v.Vrtc.v=Math.round(Z)}else console.log(o);if(b!=null){e.add[b]={classID:"null"};for(var f=0;
|
|
f<a.length;f++){var cN=a[f];e.add[b][cN]=w.v[cN]}}}};function fA(){}fA.$$=function($,o,T){$=new Uint8Array($);
|
|
var s=t.LK($,0,$.length),E=new DOMParser,e=E.parseFromString(s,"image/svg+xml"),n=e.getElementsByTagName("style")[0],X=1;
|
|
if(n)n=Typr.U.SVG.cssMap(n.textContent);else n={};var A=e.firstChild;while(A.tagName!="svg")A=A.nextSibling;
|
|
var u=new df(0,0,100,100),Y=A.getAttribute("viewBox"),b=A.getAttribute("width"),a=A.getAttribute("height");
|
|
if(Y){var w=fA.w6(Y);u.x=w[0];u.y=w[1];u.d=w[2];u.w=w[3]}else if(b!=null||a!=null){u.d=b!=null?parseFloat(b):parseFloat(a);
|
|
u.w=a!=null?parseFloat(a):parseFloat(b)}u=L.M.lZ(u);while(T&&Math.max(u.d*X,u.w*X)<Math.max(T[0],T[1]))X++;
|
|
while(T==null&&Math.max(u.d,u.w)*X>8192)X*=.5;o.Nr=!0;o.d=~~(u.d*X);o.w=~~(u.w*X);o.buffer=L.G(o.d*o.w*4);
|
|
var N=new fY(X,0,0,X,-u.x*X,-u.y*X),z={h2:fA.Jm(A),aoW:n};fA.xy(e,A.children,o,N,z,new fY,0);if(o.u.length==0){var i=o.$f();
|
|
i.tM("Layer");o.u.push(i)}};fA.w6=function($){var o=" ";if($.indexOf(",")!=-1)o=",";return $.split(o).map(parseFloat)};
|
|
fA.xy=function($,o,T,s,E,e,n){var A=fA,u=["display","opacity","fill-opacity"];for(var Y=0;Y<o.length;
|
|
Y++){var b=o[Y],a=b.tagName,w=b.getAttribute("id"),X=A.Jm(b,E.aoW),z=13,c=1,l="clip-path",v=null;for(var N in E.h2)if(u.indexOf(N)==-1&&X[N]==null)X[N]=E.h2[N];
|
|
if(X["font-size"])z=A.cJ(X["font-size"],z);if(b.getAttribute("dx"))s.Ry+=A.cJ(b.getAttribute("dx"),z);
|
|
if(b.getAttribute("dy"))s.Es+=A.cJ(b.getAttribute("dy"),z);var i=A.gv(b);i.concat(s);var k=b.getAttribute("visibility"),Q=X.display,O=T.$f();
|
|
if(k=="hidden"||Q=="none")O.bC(!1);O.tM(w!=null?w.split(":::")[0]:"Layer");if(X.opacity)c*=parseFloat(X.opacity);
|
|
if(X["fill-opacity"]){var B=parseFloat(X["fill-opacity"]);if(B!=0)c*=B}O.opacity=Math.round(255*c);if(X["mix-blend-mode"]){var G=hI.Ml.indexOf(X["mix-blend-mode"]);
|
|
if(G!=-1)O.fh=hI.zk[G]}if(b.getAttribute(l)==null)l="mask";if(b.getAttribute(l)!=null){var p=b.getAttribute(l);
|
|
p=p.slice(4,p.length-1);var P=$.getElementById(p.slice(1));if(P){var h=P.children;v=T.$f();v.tM("Clip-Path"+(w?": "+w:""));
|
|
v.add.lsct=n<2?hd.NH:hd.Qm;v.fh="pass";v.Jp=24;var j=v.add.vmsk=new M.PZ;T.u.push(T.jK());var C=[];if(P.getAttribute(l)){var p=P.getAttribute(l);
|
|
p=p.slice(4,p.length-1);C=$.getElementById(p.slice(1)).children}for(var f=0;f<h.length;f++){var V=A.gv(h[f]);
|
|
V.concat(i);var d=A.CV($,h[f],!1).slice(2);L.A.hR(d,V);j.g=j.g.concat(d)}for(var f=0;f<C.length;f++){var V=A.gv(h[f]);
|
|
V.concat(i);var d=A.CV($,C[f],!1).slice(2);for(var m=0;m<d.length;m++)if(d[f].m6!=null)d[f].m6=3;L.A.hR(d,V);
|
|
j.g=j.g.concat(d)}v._L();v.tF();n++}}if(a=="g"||a=="a"||a=="svg"||a=="switch"||(a=="text"||a=="textPath")&&b.children.length>0){if(a=="text")e=A.XB(b,e);
|
|
var R=b.getAttribute("viewBox"),g=b.getAttribute("width"),S=b.getAttribute("height");if(R&&g&&S){var F=fA.w6(R),r=A.XB(b),q=new fY;
|
|
q.translate(-F[0],-F[1]);q.scale(parseFloat(g)/F[2],parseFloat(S)/F[3]);q.translate(r.Ry,r.Es);q.concat(i);
|
|
i=q}var W=b.children.length,Z=E.h2;E.h2=X;var I=a!="text"&&a!="textPath"||W>1;if(I){var _=O.N9();O.add.lsct=n<2&&_&&(w==null||!w.endsWith(":::"))?hd.NH:hd.Qm;
|
|
O.fh="pass";O.Jp=24;O.bC(_);T.u.push(T.jK())}A.xy($,b.children,T,i,E,e,n+1);if(I)T.u.push(O);else{var cN=T.u[T.u.length-1];
|
|
cN.opacity=O.opacity;cN.fh=O.fh}E.h2=Z}else if(a=="use"){var q=A.XB(b);q.concat(i);var ce=A.xu(b),gf=$.getElementById(ce.slice(1)),Z=E.h2;
|
|
E.h2=X;A.xy($,[gf],T,q,E,e,n+1);E.h2=Z}else if(a=="path"||a=="rect"||a=="circle"||a=="ellipse"||a=="polygon"||a=="polyline"||a=="line"){O.Jp|=16;
|
|
O.add.vmsk=new M.PZ;O.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));O.add.vstk.strokeEnabled.v=!1;
|
|
var K=O.add.vstk,j=O.add.vmsk,cv=X.fill,f0=cv=="none"||X["fill-opacity"]&&parseFloat(X["fill-opacity"])==0;
|
|
j.g=A.CV($,b,X["fill-rule"]=="evenodd",f0);L.A.hR(j.g,i);var i8=L.A.hT(j.g),b5=X.stroke,iC=X["stroke-width"],an=X["stroke-dasharray"],cO=X["stroke-linejoin"],bh=X["stroke-linecap"],bD=X["paint-order"];
|
|
if(b5==null||b5=="none"||b5=="null"){}else{var fq=A.Z5($,b5,i,i8),fO=["SoFi","GrFl","patternFill"].indexOf(fq.type),g6=fq.H.v.Opct.v,h9=1;
|
|
if(g6.val!=100){O.opacity=Math.round(O.opacity*g6.val/100);g6.val=100}var hM=[ev.k9,ev.cw,ev.SZ][fO],d3=K.strokeStyleContent.v={classID:ev.ci.RG[fO]};
|
|
for(var f=0;f<hM.length;f++)d3[hM[f]]=fq.H.v[hM[f]];iC=iC?parseFloat(iC):1;if(bD&&bD.replace(/\s\s+/g," ").slice(0,11)=="stroke fill"){h9=2;
|
|
iC/=2}K.strokeEnabled.v=!0;if(cO)K.strokeStyleLineJoinType.v.strokeStyleLineJoinType=ev.ci.join[["miter","round","bevel"].indexOf(cO)];
|
|
if(bh)K.strokeStyleLineCapType.v.strokeStyleLineCapType=ev.ci.JZ[["butt","round","square"].indexOf(bh)];
|
|
K.strokeStyleLineWidth.v.val=iC*D.p.jZ(i);K.strokeStyleLineAlignment.v.strokeStyleLineAlignment=ev.ci.k0[h9];
|
|
K.strokeStyleOpacity.v.val=100*(X["stroke-opacity"]?parseFloat(X["stroke-opacity"]):1);if(an!=null&&an!="none")K.strokeStyleLineDashSet.v=fW.FG(an.split(",").map(parseFloat),1/iC)}if(f0){O.add.vstk.fillEnabled.v=!1;
|
|
O.add.SoCo={classID:"null",Clr:{t:"Objc",v:L.h.wb({i:0,m:0,P:0})}}}else{var fq=A.Z5($,cv,i,i8),cs=null,dv=null;
|
|
if(fq.type=="SoFi"){cs="SoCo";dv=ev.k9}if(fq.type=="GrFl"){cs="GdFl";dv=ev.cw}if(fq.type=="patternFill"){cs="PtFl";
|
|
dv=ev.SZ}if(cs!=null){O.add[cs]={classID:"null"};for(var f=0;f<dv.length;f++){var N=dv[f];O.add[cs][N]=fq.H.v[N]}}}if(X.filter&&X.filter!="none"){var ec=X.filter;
|
|
ec=ec.slice(5,ec.length-1);if($.getElementById(ec)){var gT=$.getElementById(ec).children[0];if(gT.tagName=="feGaussianBlur"){O.add.vmsk.DI=parseFloat(gT.getAttribute("stdDeviation"))*D.p.jZ(i)}}}O._L();
|
|
O.tF(T);T.u.push(O)}else if((a=="text"||a=="tspan")&&b.textContent!=""){e=A.XB(b,e);var q=e.clone(),e6=0;
|
|
q.concat(i);if(b.children.length>0){var iz=A.Jm(b.children[0],E.aoW);for(var N in iz)if(u.indexOf(N)==-1)X[N]=iz[N]}var gw=X["xml:space"],iI=b.textContent;
|
|
if(gw=="preserve")iI=iI.replace(/\t/g," ").replace(/\n/g," ");if(w==null)O.tM(iI);O.add.lnsr="rend";
|
|
O.add.TySh=g8.rm(0,0);O.add.TySh.QH=new df(0,0,100,100);O.add.TySh.t=q.clone();var g2=O.add.TySh.h3;
|
|
g8.YN(g2,0,iI);var cv=X.fill,bb=X["font-weight"],ir=X["font-family"],dG=X["text-decoration"],b5=X.stroke,iC=X["stroke-width"],gY=X["dominant-baseline"];
|
|
if(gY=="text-before-edge")e6=z;else if(gY=="middle")e6=z/2;else if(gY=="hanging")e6=z;if(e6!=0)O.add.TySh.t.translate(0,e6);
|
|
var fr=g8.$Q(g2,0,1);if(cv&&cv!="none"){var bt=CSS.So(cv);fr.oH.FillColor={Type:1,Values:[1,bt.i/255,bt.m/255,bt.P/255]}}if(dG=="underline")fr.oH.Underline=!0;
|
|
fr.oH.FontSize=Math.round(z);g8.PL(fr,"LiberationSans");if(bb=="bold")g8.PL(fr,"LiberationSans-Bold");
|
|
if(ir){ir=ir.split(",")[0].trim();if(ir[0]=="\"")ir=ir.slice(1);if(ir[ir.length-1]=="\"")ir=ir.slice(0,ir.length-1);
|
|
var cx=ir+":"+(bb?bb:"normal"),ci={"'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(ci[cx])g8.PL(fr,ci[cx]);else g8.PL(fr,ir)}if(X["text-anchor"])fr.CL.Justification=["start","end","middle"].indexOf(X["text-anchor"]);
|
|
g8.zA(g2,0,iI.length,fr);if(b5==null||b5=="none"){}else{var gv=JSON.parse(ev.Qo[ev.order.indexOf("FrFX")]);
|
|
gv.Clr.v=L.h.wb(CSS.So(b5));gv.Sz.v.val=Math.round(parseFloat(iC)*D.p.jZ(q));var gu=JSON.parse(ev.default);
|
|
for(var f=0;f<ev.order.length;f++)gu[ev.CP[f]]={t:"VlLs",v:[]};gu.frameFXMulti.v.push({t:"Objc",v:gv});
|
|
O.add.lmfx=gu}T.u.push(O)}else if(a=="image"){var ce=A.xu(b);if(ce.slice(0,4)=="data"){var ak=eY.Nb(ce),hP=ak,ai=T.sP(hP,O.getName(),0,0);
|
|
ai.Jp=O.Jp;O=ai;var hK=O.rect.clone();hK.x=hK.y=0;var h3=b.getAttribute("width"),e4=b.getAttribute("height");
|
|
if(h3)hK.d=parseFloat(h3);if(e4)hK.w=parseFloat(e4);var co=A.XB(b);co.concat(i);var aO=L.M.Uo(hK).I;
|
|
L.M.t(aO,co,aO);O.add.SoLd.Trnf=D.p.vP(aO);O.add.SoLd.nonAffineTransform=D.p.vP(aO);O.qI(T,!1);T.u.push(O)}}else console.log("unknown tag: "+a,b.children.length,b.textContent.length);
|
|
if(v!=null){T.u.push(v);n--}}};fA.CV=function($,o,T,s){var E=fA,e=[{type:6},{type:8,all:0}],n=o.tagName;
|
|
if(n=="use"){var A=E.xu(o),u=$.getElementById(A.slice(1)),Y=new fY;if(u.tagName!="rect")Y=E.XB(u);Y.concat(E.gv(u));
|
|
e=E.CV($,u,T,s);L.A.hR(e,Y)}else if(n=="path"){var b=o.getAttribute("d");if(b==null)return e;var a=Typr.U.SVGToPath(b);
|
|
e=L.M.Hz({I:a.crds,o:a.cmds},T,s)}else if(n=="rect"){var w=o.getAttribute("rx"),X=E.XB(o);e=L.A.XG.Rect(X.Ry,X.Es,parseFloat(o.getAttribute("width")),parseFloat(o.getAttribute("height")),w?parseFloat(w):0)}else if(n=="circle"||n=="ellipse"){var N=[0,0,0,0],z=["cx","cy","rx","ry","r"];
|
|
for(var f=0;f<5;f++){var i=o.getAttribute(z[f]);if(i){i=parseFloat(i);if(f<4)N[f]=i;else N[2]=N[3]=i}}e=L.A.XG.Xi(N[0]-N[2],N[1]-N[3],2*N[2],2*N[3])}else if(n=="polygon"||n=="polyline"||n=="line"){var k;
|
|
if(n=="line")k=[o.getAttribute("x1"),o.getAttribute("y1"),o.getAttribute("x2"),o.getAttribute("y2")].map(parseFloat);
|
|
else k=o.getAttribute("points").trim().replace(/\s\s+/g," ").split(",").join(" ").split(" ").map(parseFloat);
|
|
e=L.A.XG.Yz(k,0,n!="polygon")}return e};fA.cJ=function($,o){if($.charAt($.length-1)=="m")return o*parseFloat($.slice(0,$.length-2));
|
|
else return parseFloat($)};fA.Z5=function($,o,T,s){var E,e,n=fA,A=JSON.parse(ev.Qo[ev.order.indexOf("SoFi")]),u=o!=null?o.indexOf("("):-1;
|
|
if(u!=-1){var Y=o.indexOf(")"),b=o.slice(0,u).trim(),a=o.slice(u+1,Y).trim();if(a.charAt(0)=="'")a=a.slice(1,a.length-1);
|
|
if(b=="url"){if(a.charAt(0)=="#"){var w=$.getElementById(a.slice(1));if(w&&w.tagName.toLowerCase().endsWith("gradient")){var X=n.Oy($,w,T,s);
|
|
E="GrFl";e={t:"Objc",v:X}}else{E="SoFi";e={t:"Objc",v:A}}}else console.log("unknown url",a)}else if(b=="rgb"||b=="rgba"){E="SoFi";
|
|
e={t:"Objc",v:A};e.v.Clr.v=L.h.wb(CSS.So(o));if(b=="rgba")e.v.Opct.v.val=Math.round(100*parseFloat(o.split(",").pop()))}else console.log("unknown fill",o)}else{E="SoFi";
|
|
e={t:"Objc",v:A};e.v.Clr.v=L.h.wb(CSS.So(o))}return{type:E,H:e}};fA.gv=function($){var o=new fY,T=$.getAttribute("transform");
|
|
if(T)o=fA.JD(T);var s=$.getAttribute("style");if(s!=null){var E={};fA.FO(E,s,["transform"]);s=E.transform;
|
|
if(s)o.concat(fA.JD(s))}return o};fA.XB=function($,o){var T=new fY,s=$.getAttribute("x"),E=$.getAttribute("y");
|
|
if(s)T.Ry=parseFloat(s);else if(o)T.Ry=o.Ry;if(E)T.Es=parseFloat(E);else if(o)T.Es=o.Es;return T};fA.JD=function($){var o=Typr.U.SVG.readTrnf($);
|
|
return new fY(o[0],o[1],o[2],o[3],o[4],o[5])};fA.Jm=function($,o){var T={},s="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 f=0;f<s.length;f++){var E=$.getAttribute(s[f]);if(E!=null&&E!="inherit")T[s[f]]=E}var e=$.getAttribute("class");
|
|
if(o!=null&&e!=null&&o["."+e]!=null)fA.FO(T,o["."+e],s);var n=$.getAttribute("id");if(o!=null&&n!=null&&o["#"+n]!=null)fA.FO(T,o["#"+n],s);
|
|
var A=$.getAttribute("style");if(A!=null)fA.FO(T,A,s);return T};fA.FO=function($,o,T){o=o.trim().split(";");
|
|
for(var f=0;f<o.length;f++){var s=o[f].split(":"),E=s[0]?s[0].trim():"",e=s[1]?s[1].trim():"";for(var n=0;
|
|
n<T.length;n++)if(E==T[n]&&e!="inherit")$[T[n]]=e}};fA.xu=function($){var o=$.getAttribute("xlink:href");
|
|
if(o==null)o=$.getAttribute("href");if(o==null)o=$.getAttribute("xl:href");return o};fA.Oy=function($,o,T,s){var E=fA,e=new fY,n=o.getAttribute("gradientTransform");
|
|
if(n)e=E.JD(n);e.concat(T);var A=JSON.parse(ev.Qo[ev.order.indexOf("GrFl")]),u=A.Grad.v;u.Intr.v=0;var Y=o.tagName,b=new aY(0,0),a=new aY(s.d,0);
|
|
if(Y=="linearGradient"){A.Type.v.GrdT="Lnr";if(o.getAttribute("x1"))b.x=parseFloat(o.getAttribute("x1"));
|
|
if(o.getAttribute("y1"))b.y=parseFloat(o.getAttribute("y1"));if(o.getAttribute("x2"))a.x=parseFloat(o.getAttribute("x2"));
|
|
if(o.getAttribute("y2"))a.y=parseFloat(o.getAttribute("y2"));b.x=a.x+.5*(b.x-a.x);b.y=a.y+.5*(b.y-a.y)}if(Y=="radialGradient"){A.Type.v.GrdT="Rdl";
|
|
if(o.getAttribute("cx"))b.x=parseFloat(o.getAttribute("cx"));if(o.getAttribute("cy"))b.y=parseFloat(o.getAttribute("cy"));
|
|
a.A5(b.x,b.y);if(o.getAttribute("r"))a.x+=parseFloat(o.getAttribute("r"))}if(o.getAttribute("gradientUnits")=="userSpaceOnUse"){b=e.bb(b);
|
|
a=e.bb(a)}else{b.x=s.x+b.x*s.d;b.y=s.y+b.y*s.w;a.x=s.x+a.x*s.d;a.y=s.y+a.y*s.w}L.h.vV(b,a,s,A);var w=o.children;
|
|
if(w.length==0){var X=E.xu(o);if(X==null)throw"gradient has no stops";var N=$.getElementById(X.slice(1));
|
|
if(N==null){console.log(X.slice(1));throw"e"}var z=E.Oy($,N,e,s);A.Grad=z.Grad}else{var i=[];for(var f=0;
|
|
f<w.length;f++){var k=w[f],Q=E.Jm(k),O=Q["stop-color"],c=Q["stop-opacity"],B=k.getAttribute("offset");
|
|
if(O==null)O="#000000";if(c==null)c="1";var G=B?parseFloat(B):0;O=CSS.So(O);i.push([G,[O.i/255,O.m/255,O.P/255],parseFloat(c)])}L.h.Cw(i,u)}return A};
|
|
fA.JF=function($,o,T){var s=[],E=fA;E.oq=o.a23?"\t":"";var e=o.arH,n=o.a8p;s.push("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 "+$.d+" "+$.w+"\" width=\""+e+"\" height=\""+n+"\">");
|
|
var A={Rk:[],Vi:[],oN:0,LD:0,h4:0,TD:{},ZV:{},zW:0,wG:{},PJ:{},pA:0,vv:[]};fA.Dj($,A,$.root.children,1,o,T);
|
|
if(A.Rk.length!=0){s.push(E._A(1)+"<defs>");s=s.concat(A.Rk);s.push(E._A(1)+"</defs>")}s.push(E._A(1)+"<style>");
|
|
s.push(E._A(2)+"tspan { white-space:pre }");for(var u in A.wG)s.push(E._A(2)+"."+u+" { "+A.wG[u]+" } ");
|
|
s.push(E._A(1)+"</style>");s=s.concat(A.Vi);s.push("</svg>");s=s.join(o.a23?"\n":"");if(E.ur){console.log(E.ur);
|
|
var Y="SVGParser.gen.db = [\n";for(var f=0;f<E.ur.length;f++){var b=E.ur[f];Y+="{\n\tnam: \""+b.jA+"\",\n\tpts: [\n";
|
|
for(var a=0;a<b.kZ.length;a++){var w=b.kZ[a];Y+="\t\t[\""+w[0]+"\", { cmds: "+JSON.stringify(w[1].o)+", crds:"+JSON.stringify(w[1].I)+" } ]"+(a==b.kZ.length-1?"":",")+"\n"}Y+="\t]\n}"+(f==E.ur.length-1?"":",")+"\n"}Y+="]\n";
|
|
console.log(Y)}return t.Te(s)};fA.oq="";fA._A=function(J){var $="";for(var f=0;f<J;f++)$+=fA.oq;return $};
|
|
fA.S2=function(J){return""+parseFloat(J.toFixed(3))};fA.Dj=function($,o,T,s,E,e){var n=fA;function A(b,h9){var v=b.add.lmfx;
|
|
if(v)v=v[h9].v[0];if(v)v=v.v;if(v&&!v.enab.v)v=null;return v}function u(b,z){var bt=A(b,"frameFXMulti");
|
|
if(bt){var cx=bt.Sz.v.val;if(bt.Styl.v.FStl=="OutF"){z.push("paint-order:stroke fill markers");cx*=2}z.push("stroke: "+CSS.Jr(bt.Clr.v));
|
|
z.push("stroke-width: "+cx);z.push("stroke-linejoin: round;")}}for(var Y=0;Y<T.length;Y++){var b=T[Y].c,a=b.add.lsct,w=b.add.vmsk,X=b.add.vstk,N=b.add.TySh;
|
|
if(w&&!w.isEnabled)w=X=null;var z=[];if(!E.hidden&&!b.N9())continue;var i=b.opacity/255,k=b.add.iOpa?b.add.iOpa/255:1;
|
|
if(i!=1)z.push("opacity: "+n.S2(i));if(k!=1)z.push("fill-opacity: "+n.S2(k));if(b.fh!="norm"){var Q=hI.Ml[hI.zk.indexOf(b.fh)];
|
|
if(Q!=null)z.push("mix-blend-mode: "+Q)}if(!b.N9())z.push("display: none");var O=[],c=[],B=b.getName(),G=B.indexOf(" .");
|
|
if(G!=-1){c.push(B.slice(G+2));B=B.slice(0,G)}if(E.names)O.push("id=\""+n.U8(B)+"\"");var l=fW.l_(b.add.lmfx,b.add),v=l[0],p=l[1];
|
|
if(b.p3()){var P=T[Y].children;if(!(P.length==1&&P[0].c.add.SoLd&&!E.mv)){if(n.ur&&b.getName().split("-").length==3){n.ur.push({jA:b.getName(),YG:0,kZ:[]})}fA.OR(b,w,o,O);
|
|
if(z.length!=0)O.push("style=\""+z.join(";")+"\"");o.Vi.push(n._A(s)+"<g "+n.Df(O,c)+">");n.Dj($,o,P,s+1,E,e);
|
|
o.Vi.push(n._A(s)+"</g>")}}else if(b.d5()&&w==null){var h=new df(0,0,$.d,$.w);n.kJ(z,b.add,o,h);if(z.length!=0)O.push("style=\""+z.join(";")+"\"");
|
|
o.Vi.push(n._A(s)+"<rect width=\""+$.d+"\" height=\""+$.w+"\" "+n.Df(O,c)+" />")}else if(w&&b.add.SoLd==null){var h=L.A.hT(w.g,null,!0),j=L.A.xw(w.g);
|
|
if(j._9!=0){O.push("fill-rule=\"evenodd\"")}var C=j.app;n.kJ(z,b.add,o,h);if(z.length!=0){var V=z.join(";"),d=o.PJ[V];
|
|
if(d==null){d="shp"+o.pA;o.pA++;o.PJ[V]=d;o.wG[d]=V}c.push(d)}o.Vi.push(n._A(s)+"<path "+n.Df(O,c)+" d=\""+C+"\" />");
|
|
if(n.ur&&n.ur[n.ur.length-1]){var m=L.M.Ld(w.g);m.I=m.I.map(Math.round);var R=n.ur[n.ur.length-1];R.YG+=JSON.stringify(m).length;
|
|
R.kZ.push([z[0].split("#").pop(),m])}}else if(N&&E.al2){var g=N.h3,S=new iq(g,e),F=null;if(v)F=CSS.Jr(v.Clr.v);
|
|
if(p){var h=b.rect.clone();n.q6(p,o,h);F=" url(#grd"+o.oN+")"}if(F)O.push("fill=\""+F+"\"");u(b,z);if(z.length!=0)O.push("style=\""+z.join(";")+"\"");
|
|
var r=hA.hv(S,N),q=L.M.ie(r);for(var W in q){if(F==null)O.push("fill=\""+W+"\"");var Z=q[W],C=Typr.U.pathToSVG({crds:Z.I,cmds:Z.o},2);
|
|
o.Vi.push(n._A(s)+"<path "+n.Df(O,c)+" "+n.cE(N)+" d=\""+C+"\" />");if(F==null)O.pop()}}else if(N&&!E.aef){var g=N.h3,I=N.t.clone(),F=null,i8=0,b5=0;
|
|
if(g8.tb(g)==1){var _=g8.$Q(g,0,0).CL.Justification,cN=0,ce=g8.Hs(g)[2];if(_==2)cN=ce/2;if(_==1)cN=ce;
|
|
I.translate(cN,0)}z.push("transform: "+n.di(I));var gf=g8.m5(g),K=g.EngineDict.ParagraphRun,cv=K.RunArray,f0=K.RunLengthArray;
|
|
u(b,z);if(z.length!=0)O.push("style=\""+z.join(";")+"\"");o.Vi.push(n._A(s)+"<text "+n.Df(O,c)+" >");
|
|
if(v)F=CSS.Jr(v.Clr.v);if(p){var h=b.rect.clone();h.x-=I.Ry;h.y-=I.Es;n.q6(p,o,h);F=" url(#grd"+o.oN+")"}for(var f=0;
|
|
f<cv.length;f++){var iC=[],an=f0[f],cO=gf.slice(i8,i8+an-1),bh=g8.$Q(g,i8,i8),bD=bh.Nd[bh.oH.Font].Name;
|
|
if(o.vv.indexOf(bD)==-1)o.vv.push(bD);CSS.LL(iC,bh,N.t,!0,!0,F);var fq=bh.oH.FontSize*1.12;if(f==0)fq=g8.tb(g)==0?0:bh.oH.FontSize;
|
|
b5+=fq;if(cO!=""){var V=iC.join(";"),d=o.PJ[V],g6="";if(d==null){d="txt"+o.pA;o.pA++;o.PJ[V]=d;o.wG[d]=V}var fO=bh.oH.Tracking;
|
|
if(fO!=null&&fO!=0){fO=Math.round(fO*bh.oH.FontSize/1e3);g6=" dx=\"0";for(var hM=1;hM<cO.length;hM++)g6+=" "+fO;
|
|
g6+="\" "}o.Vi.push(n._A(s+1)+"<tspan x=\"0\" y=\""+n.S2(b5)+"\" class=\""+d+"\""+g6+">"+n.U8(cO)+"</tspan>")}i8+=an}o.Vi.push(n._A(s)+"</text>")}else if(b.add.SoLd&&E.mv){var d3=b.add.SoLd,h9=d3.Idnt.v,cs=0,dv=d3.Crop?d3.Crop.v:null;
|
|
if(o.ZV[h9]!=null)cs=o.ZV[h9];else{o.zW++;cs=o.zW;o.ZV[h9]=o.zW;var ec=$.Rf(h9,dv),gw="";if(ec==null)return;
|
|
var gT=ec.wc,iz=eY.RP(ec.raw.buffer);if(iz=="pdf"){var iI=new iG("h");eY.Q1("PDF").yj(ec.raw.buffer,iI);
|
|
iI.eA();iI.wT();iI.T();iI.ir();if(d3.Crop&&d3.Crop.v==1){D.LY.Mo(iI,iI.root.rX(iI,!0))}var g2=eY.Q1("SVG").tC(iI,iI.d,iI.w,null,{vv:e});
|
|
gw="data:image/svg+xml;base64,"+eY.Qj(g2)}else if(iz=="jpg"||iz=="png"||iz=="gif"||iz=="svg"){var bb={jpg:"image/jpg",png:"image/png",jpg:"image/jpg",svg:"image/svg+xml"};
|
|
gw="data:"+bb[iz]+";base64,"+eY.Qj(ec.raw.buffer)}else{gw=eY.rv(gT[0].buffer,gT[1].d,gT[1].w)}o.Rk.push(n._A(2)+"<image width=\""+gT[1].d+"\" height=\""+gT[1].w+"\" id=\"img"+cs+"\" href=\""+gw+"\"/>")}var ir=L.$.bH(d3),dG=[];
|
|
fA.OR(b,w,o,dG);if(dG.length!=0)o.Vi.push(n._A(s)+"<g "+n.Df(dG,c)+">");if(z.length!=0)O.push("style=\""+z.join(";")+"\"");
|
|
var gY=n.Df(O,c);o.Vi.push(n._A(s)+"<use "+gY+" href=\"#img"+cs+"\" transform=\""+n.di(ir)+"\"/>");if(dG.length!=0)o.Vi.push(n._A(s)+"</g>")}else if(!b.rect.p4()&&(E.mv||N)){if(z.length!=0)O.push("style=\""+z.join(";")+"\"");
|
|
var gY=n.Df(O,c),e6=b.buffer;if(v)e6=fW.lv(e6,v,b.rect);var fr=b.rect;o.zW++;var gw=eY.rv(e6.buffer,fr.d,fr.w,"png",null,!0);
|
|
o.Rk.push(n._A(2)+"<image "+n.cE(N)+" width=\""+b.rect.d+"\" height=\""+b.rect.w+"\" id=\"img"+o.zW+"\" href=\""+gw+"\"/>");
|
|
o.Vi.push(n._A(s)+"<use "+gY+" href=\"#img"+o.zW+"\" x=\""+fr.x+"\" y=\""+fr.y+"\" />")}}};fA.cE=function($){if($==null)return"";
|
|
var o=$.h3,T=g8.m5(o);T=T.slice(0,T.length-1).replace(/"/g,""");return"aria-label=\""+T+"\" "};
|
|
fA.Df=function($,o){if(o.length!=0)$.push("class=\""+o.join(" ")+"\"");return $.join(" ")};fA.U8=function($){return String($).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\u0022/g,""")};
|
|
fA.di=function($){var o=[$.Ca,$.P,$.Z9,$.Um,$.Ry,$.Es].map(fA.S2);return"matrix("+o.join(",")+")"};fA.OR=function($,o,T,s){var E=fA;
|
|
if(o||$.add.artb){var e;if(o)e=L.A.xw(o.g).app;else{var n=$.co(),A=L.M.Uo(n);e=Typr.U.pathToSVG({crds:A.I,cmds:A.o},2)}T.h4++;
|
|
s.push("clip-path=\"url(#cp"+T.h4+")\"");T.Rk.push(E._A(2)+"<clipPath clipPathUnits=\"userSpaceOnUse\" id=\"cp"+T.h4+"\">");
|
|
T.Rk.push(E._A(3)+"<path d=\""+e+"\" />");T.Rk.push(E._A(2)+"</clipPath>")}};fA.kJ=function($,o,T,s){var E=fA,e=o.vstk,n=o.vmsk,A=o.lmfx;
|
|
if(n&&n.DI!=0){var u=E.S2(n.DI);if(T.TD[u]==null){T.LD++;T.TD[u]=T.LD;T.Rk.push(E._A(2)+"<filter x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\" id=\"flt"+T.LD+"\"> <feGaussianBlur stdDeviation=\""+u+"\" /> </filter>")}$.push("filter: url(#flt"+T.TD[u]+")")}var Y=fW.l_(A,o),b=Y[0],a=Y[1];
|
|
if(e&&!e.fillEnabled.v)$.push("fill: none");else if(b){var w=CSS.Jr(b.Clr.v);$.push("fill: "+w)}else if(a){E.q6(a,T,s);
|
|
$.push("fill: url(#grd"+T.oN+")")}if(e==null||!e.strokeEnabled.v)e=fW.oU(A);if(e&&e.strokeEnabled.v){var X=e.strokeStyleContent.v,N=X.classID;
|
|
if(N=="solidColorLayer")$.push("stroke: "+CSS.Jr(X.Clr.v));else{E.q6(X,T,s);$.push("stroke: url(#grd"+T.oN+")")}var z=ev.ci.JZ.indexOf(e.strokeStyleLineCapType.v.strokeStyleLineCapType),i=ev.ci.join.indexOf(e.strokeStyleLineJoinType.v.strokeStyleLineJoinType),k=e.strokeStyleOpacity.v.val/100,Q=e.strokeStyleLineWidth.v.val,O=ev.ci.k0.indexOf(e.strokeStyleLineAlignment.v.strokeStyleLineAlignment);
|
|
if(O==2){Q*=2;$.push("paint-order:stroke fill markers")}var c=e.strokeStyleLineDashSet.v,B=[];for(var f=0;
|
|
f<c.length;f++)B.push(Math.round(c[f].v.val*Q));if(z!=0)$.push("stroke-linecap:"+["butt","round","square"][z]);
|
|
if(i!=0)$.push("stroke-linejoin:"+["miter","round","bevel"][i]);if(k!=1)$.push("stroke-opacity:"+E.S2(k));
|
|
if(Q!=1)$.push("stroke-width: "+E.S2(Q));if(B.length!=0)$.push("stroke-dasharray: "+B.join(","))}};fA.q6=function($,o,T){o.oN++;
|
|
var s=fA,E=$.Grad.v,e=JSON.parse(JSON.stringify(E.Clrs.v)),n=JSON.parse(JSON.stringify(E.Trns.v)),A=$.Ofst.v,u=$.Type.v.GrdT,Y=u=="Rdl"?1:0,b=(Y==1?"radial":"linear")+"Gradient",a=L.h.Vq($,T);
|
|
if(Y==0){a[0].x=a[1].x+2*(a[0].x-a[1].x);a[0].y=a[1].y+2*(a[0].y-a[1].y)}var w=s._A(2)+"<"+b+" id=\"grd"+o.oN+"\" gradientUnits=\"userSpaceOnUse\" ";
|
|
if(Y==0)o.Rk.push(w+" x1=\""+s.S2(a[0].x)+"\" y1=\""+s.S2(a[0].y)+"\" x2=\""+s.S2(a[1].x)+"\" y2=\""+s.S2(a[1].y)+"\">");
|
|
if(Y==1)o.Rk.push(w+" cx=\""+s.S2(a[0].x)+"\" cy=\""+s.S2(a[0].y)+"\" r=\""+s.S2(aY.Sa(a[0],a[1]))+"\">");
|
|
if(u=="Rflc"){for(var X=0;X<2;X++){var N=X==0?e:n;for(var f=N.length-1;f>=0;f--){var z=N[f];z.v.Lctn.v=2048+(z.v.Lctn.v>>>1);
|
|
var i=JSON.parse(JSON.stringify(z));i.v.Lctn.v=4096-i.v.Lctn.v;N.push(i)}N.sort(function(B,G){return B.v.Lctn.v-G.v.Lctn.v})}}var k=$.Rvrs.v;
|
|
if(k){e.reverse();n.reverse()}for(var f=0;f<e.length;f++){var Q=e[f].v,O=f<n.length?n[f].v.Opct.v.val/100:1,O=O==1?"":"stop-opacity=\""+s.S2(O)+"\"",c=Q.Lctn.v/4096;
|
|
if(k)c=1-c;o.Rk.push(s._A(3)+"<stop offset=\""+s.S2(c)+"\" stop-color=\""+CSS.Jr(Q.Clr.v)+"\" "+O+" />")}o.Rk.push(s._A(2)+"</"+b+">")};
|
|
fA.XG=function($,o,T,s,E){var e=[],n=fA.XG,A=!1,u={N0:$,cQ:o,LM:[!0,!0,!0],Vy:!1,dh:T,a9S:0};u.nb=Math.round(Math.max($,o)*(.02+n.D9(u)*.03));
|
|
u.vD=n.a4C(u);u.Ei=n.akg(u.vD,(n.D9(u)<.5?-1:1)*(.2+n.D9(u)*.3));if(n.D9(u)<.5){var Y=u.vD;u.vD=u.Ei;
|
|
u.Ei=Y}u.adY=n.D9(u)<.4&&n.aoj(u.Ei,{i:1,m:1,P:1})>.3;u.adK=n.D9(u)<.5?0:1;e.push("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 "+$+" "+o+"\" width=\""+$+"\" height=\""+o+"\">");
|
|
u.eN=s[Math.floor(n.zz(u)*s.length)];u.xq=s[Math.floor(n.zz(u)*s.length)];e.push("<style>");e.push("@font-face { font-family: "+u.eN[2]+"; src: url(rsrc/fonts/"+u.eN[5]+"); }");
|
|
e.push("@font-face { font-family: "+u.xq[2]+"; src: url(rsrc/fonts/"+u.xq[5]+"); }");e.push("</style>");
|
|
var b=[0,0,$,o],a=b;if(E==null)e.push("<path style=\"fill: "+n.CQ(u.vD)+"\" d=\""+n.Rect(b[0],b[1],b[2]-b[0],b[3]-b[1])+"\" id=\"Background\" />");
|
|
else{u.Vy=!0;n.vt(u,b,e,E)}if(n.D9(u)<.25&&!u.Vy){u.LM[0]=u.LM[2]=!1;n.a1X(b,u,e);a=b}else if(n.D9(u)<.25||u.Vy)a=b;
|
|
else{var w=.52+n.D9(u)*.2;if(n.D9(u)<.5)w=1-w;var X=b.slice(0),N=b.slice(0);if(n.D9(u)<.5)X[2]=N[0]=Math.round(w*$);
|
|
else X[3]=N[1]=Math.round(w*o);if(n.D9(u)<.5){var Y=X;X=N;N=Y}a=X;n.ahe(u,N,e,E)}n.aru(u,a,e);e.push("</svg>");
|
|
e=e.join("\n");var z=L.G(Math.round(e.length*1.5)),i=t.Jq(e,z,0);return[z.buffer.slice(0,i),u.tY]};fA.XG.a1X=function($,o,T){var s=fA.XG,E=$[2]-$[0],e=$[3]-$[1];
|
|
if(s.D9(o)<.5){T.push("<path id=\"Border\" style=\"fill: "+s.CQ(o.Ei)+"\" d=\""+s.a5n($[0],$[1],$[2]-$[0],$[3]-$[1],o.nb)+"\" />")}else if(s.D9(o)<-.4){s.alA(o,$,T)}else{var n=s.D9(o)<.5?0:1,A=(n==0?e:E)/4,u=s.Bc(o,n,$,T,A,!0),u=s.Bc(o,n+2,$,T,A,!0,u)}};
|
|
fA.XG.aru=function($,o,T){var s=fA.XG,E="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("-"),e=2*Math.floor(s.D9($)*E.length/2),n=o[2]-o[0],A=o[3]-o[1],Y=0,a=0;
|
|
$.AE=($.N0+n)*.5*(.04+s.D9($)*.05);$.AE=Math.min($.AE,A*.4,n*.12);$.AE=Math.round($.AE);var u=Math.min($.AE*E[e].length*(.35+.3*s.D9($)),n*.9),b=(o[1]+o[3])/2,w=L.Hl($.vD)<.85?{i:1,m:1,P:1}:{i:.1,m:.1,P:.1};
|
|
if(s.D9($)<.25&&$.LM[0]){a=0;Y=o[0]+$.nb}else if(s.D9($)<.33&&$.LM[2]){a=2;Y=o[2]-$.nb}else{a=1;Y=(o[0]+o[2])/2}var X=w.i==1?"0,0,0":"255,255,255",N=$.Vy&&s.D9($)<1;
|
|
if(N){var z=o[0],i=n,k=b-$.AE*1.1,Q=$.AE*2.2,O=.7;if(a==1&&s.D9($)<.5){z=k=.2*Math.min(n,A);i=n-2*k;
|
|
Q=A-k-k}else if(s.D9($)<.7){z=k=0;i=n;Q=A;O=.25}T.push("<path id=\"Strip\" style=\"fill: rgb("+X+"); opacity: "+O+"\" d=\""+s.Rect(z,k,i,Q)+"\" />")}if(s.D9($)<.4){var c=$.AE*.07;
|
|
c*=1.5+s.D9($)*1;if(a==-1&&n/A<3&&!N){T.push("<path id=\"Bar-bottom\" style=\"fill: "+s.CQ(w)+"\" d=\""+s.Rect(Y-u/2,b+$.AE*1.1-c/2,u,c)+"\" />");
|
|
T.push("<path id=\"Bar-top\" style=\"fill: "+s.CQ(w)+"\" d=\""+s.Rect(Y-u/2,b-$.AE*1.1-c/2,u,c)+"\" />")}if(a!=1){T.push("<path id=\"Bar\" style=\"fill: "+s.CQ(w)+"\" d=\""+s.Rect(Y-c/2,b-$.AE*.8,c,$.AE*.8*2)+"\" />");
|
|
Y+=(a==0?1:-1)*$.AE/3}}var B=$.AE*.4;T.push(s.C2(E[e+1],Y,b+B*1.6,B,w,a,$.xq));T.push(s.C2(E[e],Y,b+$.AE*.04,$.AE,w,a,$.eN))};
|
|
fA.XG.ahe=function($,o,T,s){var E=o[2]-o[0],e=o[3]-o[1],n=Math.max(E,e),A=Math.min(E,e),u=fA.XG;if(n/A<5&&!$.Vy&&!1){u.vt($,o,T,s)}else if(u.D9($)<0)T.push("<path style=\"fill: "+u.CQ($.Ei)+"\" d=\""+u.Rect(o[0],o[1],E,e)+"\" />");
|
|
else{var Y=0;if(o[3]!=$.cQ)Y=0;if(o[2]!=$.N0)Y=3;if(o[0]!=0)Y=1;if(o[1]!=0)Y=2;var b=Y+2&3;if(n/A<3){var a=u.apd(b),w=a[Math.round(u.D9($)*(a.length-1))],X=w.jA.slice(0,4),N=X.indexOf(1);
|
|
w=JSON.parse(JSON.stringify(w));var z=-1;if(X!="0000"){var i=new fY;if(w.jA[5]=="0"){if(N==3&&Y==1){z=1;
|
|
i.scale(-1,1)}else z=N}else{var k=b;while(k==b)k=Math.floor(u.D9($)*4)&3;i.rotate((-N+k)*Math.PI/2)}u.t(w,i)}var Q=u.L3(w),O=E-2*$.nb,c=e-2*$.nb;
|
|
if(z!=-1){if((z&1)==0)c-=$.nb;else O-=$.nb}var B=Math.min(O/Q.d,c/Q.w),G=new fY;G.translate(-Q.x,-Q.y);
|
|
G.scale(B,B);var l=(E-Q.d*B)/2,v=(e-Q.w*B)/2;if(z!=-1){if(z==3)l=0;if(z==0)v=0;if(z==1)l=E-Q.d*B;if(z==2)v=e-Q.w*B}G.translate(o[0]+l,o[1]+v);
|
|
u.U5($,w,G,$.Ei,T)}else{u.Bc($,Y,o,T,1e9)}}};fA.XG.vt=function($,o,T,s){var E=o[2]-o[0],e=o[3]-o[1],n=Math.max(E,e),A=Math.min(E,e),u=fA.XG,Y=u.zz($),b,a,w,X=s[0]instanceof ArrayBuffer;
|
|
if(X){b="data:image/jpg;base64,"+fV.lp(s[0]);a=s[1];w=s[2]}else{var N=Math.floor(Y*s.length),z=s[N];
|
|
$.tY=z;b=z.webformatURL;a=z.webformatWidth;w=z.webformatHeight}var i=o[0],k=o[1],Q=E,O=e;if(E/e>a/w){O=Q*w/a;
|
|
k=k-(O-e)/2}else{Q=O*a/w;i=i-(Q-E)/2}if(X){T.push("<defs>");T.push("<image width=\""+a+"\" height=\""+w+"\" id=\"Background\" href=\""+b+"\" />");
|
|
T.push("</defs>");var c=Q/a;T.push("<use href=\"#Background\" transform=\""+fA.di(new fY(c,0,0,c,i,k))+"\" />")}else{var B="cp"+Math.random();
|
|
T.push("<clipPath id=\""+B+"\">");T.push("<path style=\"fill: "+u.CQ($.Ei)+"\" d=\""+u.Rect(o[0],o[1],E,e)+"\" />");
|
|
T.push("</clipPath>");T.push("<image clip-path=\"url(#"+B+")\" xlink:href=\""+b+"\" x=\""+i+"\" y=\""+k+"\" width=\""+Q+"\" height=\""+O+"\" />")}};
|
|
fA.XG.C2=function($,o,T,s,E,e,n){var A=fA.XG;return"<text x=\""+o+"\" y=\""+T+"\" style=\"fill:"+A.CQ(E)+"; font-size:"+s+"px; text-anchor:"+["start","middle","end"][e]+"; font-family:"+n[2]+";\"><tspan>"+$+"</tspan></text>"};
|
|
fA.XG.U5=function($,o,T,s,E){var e=fA.XG,n=[];for(var f=0;f<o.kZ.length;f++){n.push(s);if($.adY){s=(f&1)==$.adK?{i:1,m:1,P:1}:n[0]}}E.push("<g id=\""+o.jA.split("-")[2]+":::\" style=\"transform: "+fA.di(T)+";\" >");
|
|
for(var f=0;f<o.kZ.length;f++){var A=o.kZ[f];s=n.pop();E.push("<path style=\"fill: "+(s?e.CQ(s):"#"+A[0])+"\" d=\""+Typr.U.pathToSVG({crds:A[1].I,cmds:A[1].o})+"\" />")}E.push("</g>")};
|
|
fA.XG.alA=function($,o,T){var s=fA.XG,E=fA.XG.ZH,e=[];for(var f=0;f<E.length;f++){var n=E[f],A=n.jA.slice(0,4);
|
|
if(A!="1001")continue;e.push(n)}var n=e[Math.floor(s.D9($)*e.length)];if(s.D9($)<.5)s.t(n,new fY(0,1,1,0,0,0));
|
|
var u=o[3]-o[1],Y=o[2]-o[0],b=s.L3(n),a=.7*Math.min(Y,u,.5*Math.max(Y,u))/Math.max(b.d,b.w),w=new fY;
|
|
w.scale(a,a);if(s.D9($)<.5){w.scale(1,-1);w.translate(0,u)}s.U5($,n,w,$.Ei,T);w.rotate(Math.PI);w.translate(Y,u);
|
|
s.U5($,n,w,$.Ei,T)};fA.XG.apd=function($){var o=fA.XG.ZH,T=[];for(var f=0;f<o.length;f++){var s=o[f],E=s.jA.slice(0,4);
|
|
if(E=="0000"){T.push(s);continue}if(["1000","0100","0010","0001"].indexOf(E)==-1)continue;var e=E.indexOf("1");
|
|
if(s.jA[5]=="0"&&$==e&&e!=3)continue;T.push(s)}return T};fA.XG.Bc=function($,o,T,s,E,e,n){var A=fA.XG.ZH,u=fA.XG,Y=[],Q,O;
|
|
for(var f=0;f<A.length;f++){var b=A[f],a=b.jA.slice(0,4);if(["1110","1101","1011","0111"].indexOf(a)==-1)continue;
|
|
var w=a.indexOf("0")+2&3;if(b.jA[5]=="0")if(e==!0||o!=w&&!(o==1&&w==3))continue;Y.push(b)}var X=n!=null?n:Math.floor(u.D9($)*Y.length),b=Y[X],b=JSON.parse(JSON.stringify(b)),a=b.jA.slice(0,4),w=a.indexOf("0")+2&3;
|
|
if(w==3&&o==1)L.t(b,new fY(1,0,0,-1,0,1e3));var N=new fY;N.translate(-500,-500);N.rotate(-w*Math.PI/2);
|
|
N.translate(500,500);u.t(b,N);var z=T[3]-T[1],i=T[2]-T[0],k=u.L3(b);if(k.y<0){k.w+=k.y;k.y=0}if(k.y>0){k.w+=k.y;
|
|
k.y=0}if((o&1)==0){O=z;Q=i}else{Q=z;O=i}var c=Math.min(Math.min(.5+.5*u.D9($))*Math.min(i,z),E)/k.w,B=Math.ceil(Q/(1e3*c)),G=new fY,l=new fY;
|
|
l.scale(c,c);if(o==0||o==2){l.translate(-(i/2),-(z/2));l.rotate(-o*Math.PI/2);l.translate(i/2+T[0],z/2+T[1])}else{l.rotate(Math.PI/2);
|
|
l.scale(1,-1);l.translate(T[0],T[1]);if(o==1){l.scale(-1,1);l.translate(i,0)}}s.push("<g id=\"Border-"+["top","right","bottom","left"][o]+":::\">");
|
|
for(var f=0;f<B;f++){var v=G.clone();v.concat(l);u.U5($,b,v,$.Ei,s);G.translate(1e3-2,0)}s.push("</g>");
|
|
return X};fA.XG.Rect=function($,o,T,s){return Typr.U.pathToSVG({crds:[$,o,$+T,o,$+T,o+s,$,o+s],cmds:["M","L","L","L","Z"]})};
|
|
fA.XG.a5n=function($,o,T,s,E){var e=[$,o,$+T,o,$+T,o+s,$,o+s];$+=E;o+=E;T-=2*E;s-=2*E;e.push($,o,$,o+s,$+T,o+s,$+T,o);
|
|
return Typr.U.pathToSVG({crds:e,cmds:"M L L L Z M L L L Z".split(" ")})};fA.XG.akg=function($,o){var T=L.QZ($.i,$.m,$.P);
|
|
T.FI=Math.max(.1,Math.min(.9,T.FI+o));return L.AP(T.cQ,T.rZ,T.FI)};fA.XG.a1D=function($,o){var T=L.QZ($.i,$.m,$.P);
|
|
T.cQ+=o;return L.AP(T.cQ,T.rZ,T.FI)};fA.XG.acQ=function($){var o=L.QZ($.i,$.m,$.P);o.FI=1-o.FI;return L.AP(o.cQ,o.rZ,o.FI)};
|
|
fA.XG.aoj=function($,o){var T=$.i-o.i,s=$.m-o.m,E=$.P-o.P;return Math.sqrt(T*T+s*s+E*E)};fA.XG.a4C=function($){var o=fA.XG;
|
|
return{i:o.D9($),m:o.D9($),P:o.D9($)}};fA.XG.CQ=function($){return CSS.xr({i:$.i*255,m:$.m*255,P:$.P*255})};
|
|
fA.XG.L3=function($){var o=$.kZ,T=new df;for(var f=0;f<o.length;f++)T=T.BZ(L.M.L3(o[f][1].I));return T};
|
|
fA.XG.t=function($,o){var T=$.kZ;for(var f=0;f<T.length;f++)L.M.t(T[f][1].I,o,T[f][1].I)};fA.XG.D9=function($){$.a9S++;
|
|
var o=$.a9S&3;if(o==0)$.dh=fA.XG.fi($.dh);var T=$.dh>>>8*o&255;return T*(.99999999/255)};fA.XG.zz=function($){var o=fA.XG.fi($.dh);
|
|
$.dh=fA.XG.fi(o);return o*(1/4294967295)};fA.XG.fi=function($){$=($^61^$>>>16)>>>0;$=$+($<<3)>>>0;$=($^$>>>4)>>>0;
|
|
$=$*668265261>>>0;$=($^$>>>15)>>>0;return $};fA.XG.ZH=[{jA:"0001-0-bird",kZ:[["4b3c34",{o:"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(" "),I:[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",{o:"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(" "),I:[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",{o:"M C C C C C C C C C C C C L Z".split(" "),I:[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]}]]},{jA:"0001-0-bird2",kZ:[["ff7f2a",{o:"M L L L Z M L L L Z".split(" "),I:[296,0,296,62,335,62,296,0,357,0,357,62,318,62,357,0]}],["b588c1",{o:"M C C C C C C C C C C C L Z".split(" "),I:[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",{o:"M C C C C C C L Z M C C Z".split(" "),I:[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",{o:"M L L L Z M L L L Z".split(" "),I:[326,258,334,315,323,316,326,258,298,262,296,318,286,317,298,262]}],["4b3c34",{o:"M L C C C C C C C C L Z".split(" "),I:[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",{o:"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(" "),I:[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]}]]},{jA:"0000-1-flower",kZ:[["7a59a2",{o:"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(" "),I:[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]}]]},{jA:"0000-1-flower",kZ:[["d13777",{o:"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(" "),I:[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]}]]},{jA:"0000-1-flower",kZ:[["ffac42",{o:"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(" "),I:[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]}]]},{jA:"0000-1-flower",kZ:[["d04040",{o:"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(" "),I:[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]}]]},{jA:"0000-1-flower",kZ:[["ec7272",{o:"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(" "),I:[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",{o:"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(" "),I:[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]}]]},{jA:"0000-0-hearts",kZ:[["d17070",{o:"M C C C C C C C C C L Z".split(" "),I:[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",{o:"M C C C C C C C C C L Z".split(" "),I:[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",{o:"M C C C C C C C C C L Z".split(" "),I:[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]}]]},{jA:"0000-0-anchor",kZ:[["2a3b66",{o:"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(" "),I:[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]}]]},{jA:"0000-1-leaf",kZ:[["fbb600",{o:"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(" "),I:[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]}]]},{jA:"0000-1-acorn",kZ:[["a05a2c",{o:"M C C C C C C C L Z".split(" "),I:[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",{o:"M C C C C C C C C C C C Z".split(" "),I:[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]}]]},{jA:"0000-0-skull",kZ:[["808080",{o:"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(" "),I:[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]}]]},{jA:"0000-0-ghost",kZ:[["e6e6e6",{o:"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(" "),I:[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",{o:"M C C C C Z M C C C C Z".split(" "),I:[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]}]]},{jA:"1001-1-rose",kZ:[["9e1460",{o:"M C C C C C C C C C Z M C C C C C C C C C Z".split(" "),I:[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",{o:"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(" "),I:[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]}]]},{jA:"1001-1-curls",kZ:[["53a7ab",{o:"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(" "),I:[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",{o:"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(" "),I:[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]}]]},{jA:"0111-0-pines",kZ:[["e9e9e9",{o:"M C C C C C C C C L L L Z".split(" "),I:[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",{o:"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(" "),I:[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]}]]},{jA:"0111-0-flowers",kZ:[["8cae40",{o:"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(" "),I:[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",{o:"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(" "),I:[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]}]]},{jA:"1101-1-confetti",kZ:[["e789ff",{o:"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(" "),I:[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",{o:"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(" "),I:[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]}]]},{jA:"1101-1-branch",kZ:[["7f500b",{o:"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(" "),I:[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",{o:"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(" "),I:[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]}]]},{jA:"1101-1-sticks",kZ:[["ec7272",{o:"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(" "),I:[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",{o:"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(" "),I:[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]}]]},{jA:"1101-1-dots",kZ:[["ec7272",{o:"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(" "),I:[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",{o:"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(" "),I:[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",{o:["M","C","C","Z"],I:[389,224,389,224,410,230,410,230,410,230,389,224,389,224]}]]},{jA:"1101-1-strips",kZ:[["ffc88c",{o:"M L L L L Z M L L L L Z M L L L L Z".split(" "),I:[-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",{o:"M L L L L Z M L L L L Z M L L L L Z".split(" "),I:[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",{o:["M","C","C","Z"],I:[407,217,407,217,428,223,428,223,428,223,407,217,407,217]}]]},{jA:"1101-1-circs",kZ:[["ec7272",{o:"M C C C C Z M C C C C Z".split(" "),I:[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",{o:"M C C C C Z M C C C C Z".split(" "),I:[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",{o:["M","C","C","Z"],I:[530,273,530,273,551,279,551,279,551,279,530,273,530,273]}]]},{jA:"1101-1-squares",kZ:[["014ea7",{o:"M L L L L Z M L L L L Z".split(" "),I:[0,120,124,120,124,244,0,244,0,120,497,120,621,120,621,244,497,244,497,120]}],["fc54ff",{o:"M L L L L Z M L L L L Z".split(" "),I:[249,120,373,120,373,244,249,244,249,120,746,120,870,120,870,244,746,244,746,120]}],["88a500",{o:["M","C","C","Z"],I:[389,354,389,354,410,360,410,360,410,360,389,354,389,354]}]]},{jA:"1101-0-christmas",kZ:[["014ea7",{o:"M C C C C Z M C C C C Z M L L L L Z".split(" "),I:[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",{o:"M C C C C Z M C C C C Z M L L L L Z".split(" "),I:[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 hn={};hn.parse=function($){var o=new Uint8Array($),T=null;if(o[0]==80&&o[1]==75){var s=Date.now(),E=UZIP.parse(o.buffer),T=E["document.json"];
|
|
T=JSON.parse(t.LK(T,0,T.length));hn.MO(T,E)}else{var e=bk.parse($);T=hn.Wn(e[2][0][1])}return T};hn.MO=function($,o){var T=typeof $;
|
|
if(T=="string"||T=="number"||T=="boolean")return $;if($ instanceof Array){for(var f=0;f<$.length;f++)$[f]=hn.MO($[f],o);
|
|
return $}var s=$._class;if(s==null)return $;if(s=="MSJSONFileReference"){var E=$._ref;if(!1){}else if(o[E+".json"]!=null){var e=o[E+".json"],n=e.length;
|
|
for(var f=0;f<n;f++)if(e[f]==11||e[f]==3)e[f]=32;var A=t.LK(e,0,n);$=JSON.parse(A)}else if(o[E+".png"]!=null)return{key:E.split("/").pop(),bdata:o[E+".png"]};
|
|
else if(o[E+".jpg"]!=null)return{key:E.split("/").pop(),bdata:o[E+".jpg"]};else if(o[E+".pdf"]!=null)return{key:E.split("/").pop(),bdata:o[E+".pdf"]};
|
|
else if(o[E]!=null)return{key:E.split("/").pop(),bdata:o[E]};else{console.log($,o);return}}else if(s=="MSAttributedString"){var A=atob($.archivedAttributedString._archive),u=A.length-1,Y=new Uint8Array(u);
|
|
for(var f=0;f<u;f++)Y[f]=A.charCodeAt(f);$.archivedAttributedString=hn.Wn(Y)}for(var b in $)$[b]=hn.MO($[b],o);
|
|
return $};hn.RR=function($,o,T,s){if($ instanceof Uint8Array)return null;if(s.indexOf($)!=-1)return null;
|
|
s.push($);if($==o)return T;for(var E in $){T.push(E);var e=hn.RR($[E],o,T,s);if(e){console.log($,e);
|
|
throw"e"}T.pop()}};hn.Wn=function($){var o=cA.parse($,0),T=o.$objects,s=new Uint8Array(T.length),E=hn.TM(T,s,o.$top.root);
|
|
for(var f=0;f<T.length;f++)if(s[f]==0&&f!=0){console.log(f,T[f]);hn.RR(E,f,[],[])}for(var f=0;f<T.length;
|
|
f++){var e=T[f];if(e._class&&(e._class=="bitmap"||e._class=="fill"&&e.fillType==4&&(e.image||e.imageSHA))){var n=e.image,A=e.imageSHA,u=null,Y=null;
|
|
if(n=="$null")n=null;if(A=="$null")A=null;if(n&&n.data){Y=n.sha1["NS.bytes"];Y=btoa(t.en(Y,0,Y.length));
|
|
u=n.data instanceof Uint8Array?n.data:n.data["NS.bytes"]}else if(n==null&&A==null){var b=eY.Q1("PNG").tC([[L.G(4).buffer]],1,1);
|
|
u=new Uint8Array(b)}else{var a=(E.assets?E.assets.imageCollection:E.images).images;if(A)Y=A instanceof Uint8Array?A:A["NS.bytes"];
|
|
else Y=n.sha1["NS.bytes"];Y=btoa(t.en(Y,0,Y.length));var u=a[Y].data;if(u["NS.bytes"])u=u["NS.bytes"]}u=new Uint8Array(u.buffer.slice(u.byteOffset,u.byteOffset+u.length));
|
|
delete e.imageSHA;e.image={key:Y,bdata:u}}}return E};hn.a8x=function($){return $.slice(0,11)=="MSImmutable"?"MS"+$.slice(11):$};
|
|
hn.TM=function($,o,T){var s=$[T];if(o[T]==1){return s}o[T]=1;if(typeof s=="string")return s;if(typeof s=="number")return s;
|
|
if(typeof s=="boolean")return s;if(s instanceof Array)return s;if(s instanceof Uint8Array){return s}if($[s.$class]==null){if(s.$class==null&&s["NS.data"]!=null)return s;
|
|
console.log(T,s);throw"e"}var E=$[s.$class],e=hn.a8x(E.$classname);o[s.$class]=1;s.$class=e;if(hn.$I[e]){delete s.$class;
|
|
s._class=hn.$I[e]}var n=hn.TM;if(e=="NSMutableArray"||e=="NSArray"){var A=[];if(s["NS.objects"]!=null)for(var f=0;
|
|
f<s["NS.objects"].length;f++)A.push(n($,o,s["NS.objects"][f]));else for(var f=0;s["NS.object."+f]!=null;
|
|
f++)A.push(n($,o,s["NS.object."+f]));$[T]=A;return A}if(e=="NSDictionary"||e=="NSMutableDictionary"){var u={$class:e};
|
|
if(s["NS.keys"]!=null)for(var f=0;f<s["NS.keys"].length;f++){var Y=n($,o,s["NS.keys"][f]);if(Y instanceof Uint8Array)Y=btoa(hn.M8.en(Y,0,Y.length));
|
|
else if(typeof Y!="string"&&typeof Y!="number")Y=btoa(hn.M8.en(Y["NS.bytes"],0,Y["NS.bytes"].length));
|
|
u[Y]=n($,o,s["NS.objects"][f])}else for(var f=0;s["NS.key."+f]!=null;f++){var Y=n($,o,s["NS.key."+f]);
|
|
if(Y instanceof Uint8Array)Y=btoa(hn.M8.en(Y,0,Y.length));else if(typeof Y!="string"&&typeof Y!="number")Y=btoa(hn.M8.en(Y["NS.bytes"],0,Y["NS.bytes"].length));
|
|
u[Y]=n($,o,s["NS.object."+f])}for(var b in s)delete s[b];for(var b in u)s[b]=u[b];return s}if(e=="NSURL")return{$class:e,base:n($,o,s["NS.base"]),relative:n($,o,s["NS.relative"])};
|
|
if(hn.a5w.indexOf(e)!=-1){$[T]=n($,o,s.array_do);return $[T]}if(s.do_objectID!=null)s.do_objectID=n($,o,s.do_objectID);
|
|
if(hn.ae3.indexOf(e)!=-1)return s;var a=hn.ai8[e];if(a==null){console.log($,s);throw"unknown class "+e}for(var f=0;
|
|
f<a.length;f++)if(s[a[f]]!=null)s[a[f]]=n($,o,s[a[f]]);if(e=="MSTextLayer"){var w=s,X,N,z,i;if(w.attributedString)X=w.attributedString.archivedAttributedString;
|
|
else X=w.storage;i=X.NSString;if(typeof i!="string")i=t.LK(i["NS.bytes"],0,i["NS.bytes"].length);if(X.NSAttributeInfo)N=X.NSAttributeInfo["NS.bytes"];
|
|
else{var k=i.length,Q=[];while(k>0){var O=Math.min(100,k);Q.push(O,0);k-=O}N=new Uint8Array(Q)}z=X.NSAttributes instanceof Array?X.NSAttributes:[X.NSAttributes];
|
|
var c={$class:"NSAttributedString",NSString:i,NSAttributes:z};w.attributedString={_class:"MSAttributedString",archivedAttributedString:c};
|
|
c.NSAttributeInfo={$class:"NSMutableData","NS.data":N};delete w.storage}return s};hn.M8={mo:function($,o){return $[o+1]<<8|$[o]},s:function($,o){return $[o+3]<<24|$[o+2]<<16|$[o+1]<<8|$[o]},en:function($,o,T){var s="";
|
|
for(var f=0;f<T;f++)s+=String.fromCharCode($[o+f]);return s}};hn.$I={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"};
|
|
hn.a5w=["MSArray","MSFillStyleCollection","MSBorderStyleCollection","MSShadowStyleCollection","MSInnerShadowStyleCollection"];
|
|
hn.ae3="MSArchivedColor MSLayoutGrid MSSimpleGrid MSColor MSRect MSStyleColorControls MSGraphicsContextSettings NSMutableString NSMutableData NSDecimalNumberPlaceholder MSStyleReflection".split(" ");
|
|
hn.ai8={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 cA={};cA.parse=function($,o){var T=t.en($,o,8);o+=8;var s=cA.parse.a4f($,$.length-31),E=[];if(s.LV==1){var o=$.length-31-s.LV*s.Tp;
|
|
for(var f=0;f<s.Tp;f++)E.push($[o+f])}else if(s.LV==2){var o=$.length-31-s.LV*s.Tp;for(var f=0;f<s.Tp;
|
|
f++)E.push(t.mo($,o+f*2))}else if(s.LV==4){var o=$.length-31-s.LV*s.Tp;for(var f=0;f<s.Tp;f++)E.push(t.s($,o+f*4))}else{throw"e"}var e=cA.parse.TM($,E,s.root,s);
|
|
return e};cA.parse.TM=function($,o,T,s){var E=cA.M8,e=s.afc,n=e==4?E.s:e==2?E.mo:E.a9H,A=cA.parse,u=o[T],Y=$[u],b=Y>>4,a=Y&15,X=null;
|
|
u+=1;if([4,5,6,10,12,13].indexOf(b)!=-1&&a==15){var w=A.Cv($,u);u+=w.YG;a=w.H}if(!1){}else if(b==0)X=a==8?!1:a==9?!0:null;
|
|
else if(b==1)X=A.Cv($,u-1).H;else if(b==2)X=1<<a==4?t.eO($,u):t.Eo($,u);else if(b==3)X=t.Eo($,u);else if(b==4)X=new Uint8Array($.buffer,u,a);
|
|
else if(b==5)X=t.en($,u,a);else if(b==6)X=t.Uc($,u,a);else if(b==8){X=0;for(var f=0;f<a+1;f++)X=X<<8|$[u+f]}else if(b==10){X=[];
|
|
for(var f=0;f<a;f++)X.push(A.TM($,o,n($,u+e*f),s))}else if(b==12){X=[];for(var f=0;f<a;f++)X.push(A.TM($,o,n($,u+e*f),s))}else if(b==13){X={};
|
|
for(var f=0;f<a;f++){var N=A.TM($,o,n($,u+e*f),s),z=A.TM($,o,n($,u+e*(a+f)),s);X[N]=z}}else throw"unknown mask "+b;
|
|
return X};cA.parse.Cv=function($,o){var T=1<<($[o]&15),s=0;for(var f=0;f<T;f++)s=s<<8|$[o+1+f];return{H:s,YG:T+1}};
|
|
cA.parse.a4f=function($,o){var T={};o+=6;T.LV=$[o];o++;T.afc=$[o];o++;o+=4;T.Tp=t.s($,o);o+=4;o+=4;T.root=t.s($,o);
|
|
o+=4;o+=4;T.adE=t.s($,o);o+=4;return T};cA.M8={a9H:function($,o){return $[o]},mo:function($,o){return $[o]<<8|$[o+1]},s:function($,o){return $[o]<<24|$[o+1]<<16|$[o+2]<<8|$[o+3]},en:function($,o,T){var s="";
|
|
for(var f=0;f<T;f++)s+=String.fromCharCode($[o+f]);return s}};var bk={parse:function($){var o=new Uint8Array($),T=bk.Ij(o),s=[],E=new Uint8Array(o.length),e=[];
|
|
s.push(e);bk.L8(o,T,1,E,e);for(var f=0;f<e.length;f++){var n=[];s.push(n);bk.L8(o,T,e[f][3],E,n);e[f][3]=f+1}return s},L8:function($,o,T,s,E){T--;
|
|
var e=T*o.uH+(T==0?100:0),n=$[e],A=bk.mo($,e+1);if(A!=0)throw"free block in a page";var u=bk.mo($,e+3),Y=bk.mo($,e+5);
|
|
if(Y==0)Y=65536;var b=$[e+7],a=bk.mo($,e+8);if(n==2||n==5)e+=4;else a=0;for(var w=0;w<u;w++){var X=T*o.uH+bk.mo($,e+8+2*w),N=-1,z=0,i=0,k=0;
|
|
if(n==2||n==5){N=bk.s($,X);X+=4}if(n==2||n==10||n==13){z=bk.Nv($,X);X+=z.YG}if(n==5||n==13){i=bk.Nv($,X);
|
|
X+=i.YG}if(n==5){bk.L8($,o,N,s,E);continue}var Q=o.uH-(T==0?100:0),O=z.ed,c=n==13?Q-35:Math.floor((Q-12)*64/255)-23,B=Math.floor((Q-12)*32/255)-23,G=B+(O-B)%(Q-4);
|
|
if(O<=c){bk.w0($,X,s,0,O)}else{var l=G<=c?G:B,v=0;bk.w0($,X,s,0,l);v+=l;k=bk.s($,X+l);while(k!=0){var p=(k-1)*o.uH;
|
|
k=bk.s($,p);var P=Math.min(o.uH-4,O-v);bk.w0($,p+4,s,v,P);v+=P}}E.push(bk.abP(s,O))}},abP:function($,o){var T=0,s=bk.Nv($,T);
|
|
T+=s.YG;var E=[],e=[];while(T<s.ed){var n=bk.Nv($,T);T+=n.YG;E.push(n.ed)}if(T!=s.ed)throw"e";for(var f=0;
|
|
f<E.length;f++){var n=E[f];if(!1){}else if(n==0)e.push(null);else if(n==1){e.push(bk.a0n($,T));T+=1}else if(n==2){e.push(bk.FU($,T));
|
|
T+=2}else if(n==3){e.push(bk.abn($,T));T+=3}else if(n==4){e.push(bk.Cv($,T));T+=4}else if(n==7){e.push(bk.a6$($,T));
|
|
T+=16}else if(n==8)e.push(0);else if(n==9)e.push(1);else if(n>=12&&(n&1)==0){var A=n-13>>1,u=new Uint8Array(A);
|
|
bk.w0($,T,u,0,A);e.push(u);T+=A}else if(n>=13&&(n&1)==1){var A=n-12>>1;e.push(bk.LK($,T,A));T+=A}else throw"unknonw type "+n}return e},Ij:function($){if(!($[18]==1&&$[19]==1&&$[20]==0&&$[21]==64&&$[22]==32&&$[23]==32))throw"unexpected SQL3 header";
|
|
var o={Rw:bk.en($,0,15),uH:bk.mo($,16),a9m:bk.s($,24),size:bk.s($,28),aj5:bk.s($,32),ai5:bk.s($,36),af$:bk.s($,40),anz:bk.s($,44),a6T:bk.s($,48),a1y:bk.s($,52),amb:bk.s($,56),api:bk.s($,60),aje:bk.s($,64)!=0,aoJ:bk.s($,68),afx:bk.s($,92),a9y:bk.s($,96)};
|
|
if(o.uH==1)o.uH=65536;if(o.amb!=1)throw"unsupported text encoding "+o.amb;return o},acB:function($,o){return $[o]<<16|$[o+1]<<8|$[o+2]},abn:function($,o){var T=bk.acB($,o),s=T&8388608;
|
|
return s?-(16777215-T+1):T},a0n:function($,o){bk.fm[0]=$[o];return bk.ajj[0]},Cv:function($,o){var T=bk.fm;
|
|
for(var f=0;f<4;f++)T[f]=$[o+3-f];return bk.akq[0]},FU:function($,o){var T=bk.fm;T[0]=$[o+1];T[1]=$[o];
|
|
return bk.acJ[0]},mo:function($,o){return $[o]<<8|$[o+1]},s:function($,o){return $[o]<<24|$[o+1]<<16|$[o+2]<<8|$[o+3]},a6$:function($,o){var T=bk.fm;
|
|
for(var f=0;f<8;f++)T[f]=$[o+7-f];return bk.abQ[0]},Nv:function($,o){var T=o,J=0;while(!0){var s=$[o];
|
|
o++;J=J*128+(s&127);if(s<128)break}return{ed:J,YG:o-T}},en:function($,o,T){var s="";for(var f=0;f<T;
|
|
f++)s+=String.fromCharCode($[o+f]);return s},LK:function($,o,T){var s="";for(var f=0;f<T;f++)s+="%"+bk.aaW($[o+f].toString(16));
|
|
return decodeURIComponent(s)},w0:function($,o,T,s,E){if($[o+E-1]==null||T[s+E-1]==null){console.log(o,s,E);
|
|
throw"e"}for(var f=0;f<E;f++)T[s+f]=$[o+f]},aaW:function(J){return J.length<2?"0"+J:J}};bk.fm=new Uint8Array(8);
|
|
bk.ajj=new Int8Array(bk.fm.buffer);bk.acJ=new Int16Array(bk.fm.buffer);bk.akq=new Int32Array(bk.fm.buffer);
|
|
bk.abQ=new Float64Array(bk.fm.buffer);function cn($,o,T){this.ZU=$;this.OC=o;this.aoq=T;this.zD=new aY(0,0);
|
|
this.iE=-1;this.P5=0;this.lk=0;this.VM=new df;this.WX=[];this.JM=null;this.a9a=null;this.d4=null;this.bN=null;
|
|
this.MR=null;this.ajG=null}cn.prototype.StartPage=function($,o,T,s,E){var e=this.OC,n=e.jZ(),A=1,u=(T-$)*(s-o);
|
|
if(E!=null)u=E;while(u*n*n/(A*A)>2*8192*8192)A++;e.scale(1/A,1/A);this.a9a=[$,o,T,s];var A=e.jZ();$=Math.round($*A);
|
|
o=Math.round(o*A);T=Math.round(T*A);s=Math.round(s*A);var Y=this.ZU,b=this.d4;if(b==null){e.Ry=-$}else{var a=b[2]-b[0]+30,w=Math.round(T-$)+30;
|
|
if(this.zD.x+a+w>8192){e.Ry=-$;this.zD.x=0;this.zD.y+=this.lk+120;this.lk=0}else{e.Ry+=a;this.zD.x+=a}}e.Es=this.zD.y+(this.aoq?s:-o);
|
|
this.lk=Math.max(this.lk,Math.round(s-o));this.d4=[$,o,T,s];Y.u.push(Y.jK())};cn.prototype.sK=function(){var $=this.ZU,o=$.u[$.u.length-1];
|
|
return o};cn.prototype.vq=function(){var $=JSON.parse(JSON.stringify(ev.ci.default));$.strokeStyleLineAlignment.v.strokeStyleLineAlignment="strokeStyleAlignCenter";
|
|
$.strokeEnabled.v=!1;$.fillEnabled.v=!1;return $};cn.prototype.Ox=function(){var $=this.ZU,o=$.$f();
|
|
o.tM("Path "+$.u.length);this.ZU.u.push(o);o.Jp|=16;o.add.SoCo={classID:"null",Clr:{t:"Objc",v:L.h.wb({i:0,m:0,P:0})}};
|
|
o.add.vmsk=new M.PZ;o.add.vstk=this.vq();return o};cn.prototype.SO=function($){var o={I:$.crds,o:$.cmds},T=L.M.Hz(o,!1);
|
|
L.A.hR(T,this.OC);return T};cn.a1h=function($,o){for(var f=0;f<$.length;f++)if($[f].m6!=null)$[f].m6=o};
|
|
cn.a5k=function($){return Math.sqrt(Math.abs($[0]*$[3]-$[1]*$[2]))};cn.BT=function($){return L.h.wb({i:$[0]*255,m:$[1]*255,P:$[2]*255})};
|
|
cn.jt=function($){return new fY($[0],$[1],$[2],$[3],$[4],$[5])};cn.prototype.Stroke=function($){if(this.iE!=-1&&this.iE!=this.P5)return;
|
|
if($.pth.cmds.length<=1)return;var o=this.SO($.pth);if(o.length<=2)return;this.Lg($);cn.a1h(o,-1);o[2].m6=1;
|
|
var T=cn.BT($.COLR),s=this.sK(),E=this.vq();cn.qj(E,$,this.OC.jZ(),T);var e=s!=null&&s.add.vmsk!=null&&!s.p3(),n=e&&!s.add.vstk.strokeEnabled.v&&M.PZ.a7S(s.add.vmsk.g,o,!0),A=e&&!s.add.vstk.fillEnabled.v&&JSON.stringify(E)==JSON.stringify(s.add.vstk);
|
|
if(A){s.add.vmsk.g=s.add.vmsk.g.concat(o.slice(2))}else if(n){s.add.vstk=E;E.fillEnabled.v=!0}else{s=this.Ox();
|
|
s.add.vmsk.g=o;s.add.vstk=E}};cn.qj=function($,o,T,s){$.strokeEnabled.v=!0;$.strokeStyleMiterLimit.v=o.mlimit;
|
|
$.strokeStyleLineDashSet.v=fW.FG(o.dash,1/o.lwidth);$.strokeStyleLineDashOffset.v.val=o.doff;$.strokeStyleLineJoinType.v.strokeStyleLineJoinType=ev.ci.join[o.ljoin];
|
|
$.strokeStyleLineCapType.v.strokeStyleLineCapType=ev.ci.JZ[o.lcap];$.strokeStyleLineWidth.v.val=Math.max(.4,o.lwidth*cn.a5k(o.ctm)*T);
|
|
$.strokeStyleContent.v.Clr.v=s};cn.prototype.Fill=function($,o){if(this.iE!=-1&&this.iE!=this.P5)return;
|
|
if($.ca==0)return;var T=$.pth.cmds;if(T.length==0)return;if(T.length==2&&JSON.stringify(T)=="[\"M\",\"L\"]")return;
|
|
var s=L.M.L3($.cpth.crds),E=L.M.L3($.pth.crds);if(E.Sr(s).p4())return;var e=$.pth,n=UDOC.G.isBox(e,[E.x,E.y,E.x+E.d,E.y+E.w]),A=$.cpth,u=UDOC.G.isBox(A,[s.x,s.y,s.x+s.d,s.y+s.w]);
|
|
if(n&&u&&E.Y()>s.Y()*2){var Y=E.Sr(s),b=Y.x,a=Y.y,w=b+Y.d,X=a+Y.w;e={cmds:["M","L","L","L","Z"],crds:[b,a,w,a,w,X,b,X]}}else if(this.bN==null&&UDOC.G.isBox(e,[E.x,E.y,E.x+E.d,E.y+E.w])&&E.Yg(s)){e=A}else this.Lg($);
|
|
var N=this.SO(e),z=L.M.Uo(E);L.M.t(z.I,this.OC,z.I);E=L.M.L3(z.I);var i=cn.lX($.colr,this.OC,E),k=this.sK(),Q=k!=null&&k.opacity==Math.round(255*$.ca)&&k.add.vstk!=null&&!k.add.vstk.strokeEnabled.v&&k.add.SoCo&&i.type=="SoFi"&&JSON.stringify(k.add.SoCo.Clr.v)==JSON.stringify(i.H.v.Clr.v);
|
|
if(Q){var O=!1;for(var f=0;f<N.length;f++){if(N[f].m6==0||N[f].m6==2)O=!0}if(O){var c=L.M.L3(L.A.k5(k.add.vmsk.g)),B=L.M.L3(L.A.k5(N));
|
|
Q=c.Sr(B).p4()}}if(Q){var G=k.add.vmsk.g;for(var f=2;f<N.length;f++)G.push(N[f])}else{k=this.Ox();delete k.add.SoCo;
|
|
k.add.vmsk.g=M.PZ.IN(N);cn.cH($.colr,k,this.OC,E);cn.E6($,k)}};cn.cH=function($,o,T,s){var E=cn.lX($,T,s),e=null,n=null;
|
|
o.add.vstk.fillEnabled.v=!0;if(E.type=="SoFi"){e="SoCo";n=ev.k9}if(E.type=="GrFl"){e="GdFl";n=ev.cw}if(E.type=="patternFill"){e="PtFl";
|
|
n=ev.SZ}if(e!=null){o.add[e]={classID:"null"};for(var f=0;f<n.length;f++){var A=n[f];o.add[e][A]=E.H.v[A]}}};
|
|
cn.prototype.Lg=function($){var o=this.ZU,T=$.cpth,s=T.cmds.join(""),E=T.crds,e=s+" "+E.join(","),n=UDOC.G.isBox(T,this.a9a);
|
|
if(n&&this.bN==null)return;if(e==this.bN)return;this.JJ();if(!n){this.bN=e;o.u.push(o.jK());var A=o.$f();
|
|
A.tM("Mask");A.add.lsct=hd.Qm;A.fh="pass";A.Jp=24;var u=A.add.vmsk=new M.PZ;u.g=this.SO($.cpth);if(UDOC.G.isBox(T)){this.MR=L.A.hT(u.g);
|
|
this.MR.Mi(3,3)}else this.MR=null;this.ajG=A}};cn.prototype.JJ=function(){var $=this.ZU;if(this.bN!=null){var o=$.u.length-1,f=o,T=!1;
|
|
while(f>=0&&$.u[f].add.lsct!=hd.ic)f--;var s=this.MR;if(s){var E=new df,e=o;while(e>f){E=$.u[e].TC(this.ZU,!1,!0);
|
|
e--}T=s.Yg(E)}if(T){this.WX.splice(f,1);$.u.splice(f,1)}else{$.u.push(this.ajG)}this.bN=null}};cn.lX=function($,o,T){var s,E;
|
|
if($.length!=null){s="SoFi";var e=JSON.parse(ev.Qo[ev.order.indexOf("SoFi")]);E={t:"Objc",v:e};E.v.Clr.v=cn.BT($)}else{var n=cn.a1g($,o,T);
|
|
s="GrFl";E={t:"Objc",v:n}}return{type:s,H:E}};cn.a1g=function($,o,T){var s=JSON.parse(ev.Qo[ev.order.indexOf("GrFl")]),E=s.Grad.v;
|
|
E.Intr.v=0;var e=cn.jt($.mat);e.concat(o);var n=new aY(0,0),A=new aY(T.d,0),u=$.crds;if($.typ=="rad"){s.Type.v.GrdT="Rdl";
|
|
var Y=.7;n.x=(1-Y)*u[0]+Y*u[3];n.y=(1-Y)*u[1]+Y*u[4];A.x=n.x;A.y=n.y;A.x+=Math.max(u[2],u[5])}else{s.Type.v.GrdT="Lnr";
|
|
n.x=u[0];n.y=u[1];A.x=u[2];A.y=u[3];n.x=A.x+.5*(n.x-A.x);n.y=A.y+.5*(n.y-A.y)}n=e.bb(n);A=e.bb(A);L.h.vV(n,A,T,s);
|
|
var b=$.grad;L.h.Cw(b,E);return s};cn.prototype.PutText=function($,o,T,s){var E=o.charCodeAt(0),w=null;
|
|
if(this.iE!=-1&&this.iE!=this.P5)return;if(o.length==0||o.length==1&&(E==0||E==8203))return;this.Lg($);
|
|
var e=this.ZU,n=$.font,A=cn.jt($.ctm);A.concat(this.OC);var u=cn.jt(n.Tm);u.concat(A);var Y=D.p.jZ(u),b=new fY(1/Y,0,0,-1/Y,0,0);
|
|
b.concat(u);var a=n.Tfs*Y;if(n.Th!=100||n.Trise!=0){console.log(n)}var X=e.u.length-1;while(X>=0&&e.u[X].add.TySh==null)X--;
|
|
if(b.P*b.P+b.Z9*b.Z9<.001&&s==null&&X>=0&&e.u[X].add.TySh&&e.u[X].opacity==Math.round(255*$.ca)){var N=e.u[X],z=this.WX[X],i=N.add.TySh.t,k=(i.Ry+z.ER-b.Ry)/a,Q=Math.abs(k),O=o.indexOf(" ")==-1,c=i.Ca==b.Ca&&i.P==b.P&&i.Z9==b.Z9&&i.Um==b.Um,B=c&&Math.abs(z.r8-b.Es)<1e-5&&Q<.6,G=b.Es-z.r8;
|
|
if(B){w=N;z.ER=b.Ry-i.Ry;if(k>.2&&O&&[".",",","?",":","!"].indexOf(o)==-1)o=" "+o}else if(c&&Math.abs(b.Ry-i.Ry)<1e-5&&0<G&&G<a*1.7&&z.a54==a){w=N;
|
|
this.Ea(z);z.r8=b.Es;o="\n"+o}}if(w==null){X=e.u.length;this.WX[X]={sT:[],ER:0,r8:b.Es,Rp:"",a54:a};
|
|
w=e.$f();e.u.push(w);w.add.lnsr="rend";w.add.TySh=g8.rm(0,0);w.add.TySh.t=b}var z=this.WX[X];z.ER+=T*a;
|
|
z.Rp+=o;var l=w.add.TySh.h3,v=g8.m5(l);if(s){g8.I8(l,1);var p=[0,0,Math.ceil(s[0]*Y),Math.ceil(s[1]*Y)];
|
|
g8.bi(l,p)}var P=v.length-1,h=P+o.length;g8.YN(l,P,o);if(this.JM==null)this.JM=g8.$Q(l,P,P);var j=this.JM;
|
|
j.oH.FontSize=Math.round(a);j.oH.Tracking=Math.round(n.Tc*100);j.oH.Underline=n.Tun==1;j.oH.FillColor={Type:1,Values:[1,$.colr[0],$.colr[1],$.colr[2]]};
|
|
if(n.Tal!=null)j.CL.Justification=n.Tal;if(z.sT.length!=0){j.oH.AutoLeading=!1;j.oH.Leading=z.r8-z.sT[z.sT.length-1].y}var C=n.Tf;
|
|
C=C.replace(/#2B/g,"+");C=C.replace(/#2C/g,"-");C=C.split("+").pop();var V={"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(V[C])C=V[C];g8.PL(j,C);g8.zA(l,P,h-1,j);w.mm();w.opacity=Math.round(255*$.ca)};cn.prototype.Ea=function($){$.sT.push({N0:$.ER,KR:$.Rp.slice($.sT.length==0?0:1)+"\n",y:$.r8,rZ:$.a54});
|
|
$.ER=0;$.Rp=""};cn.prototype.PutImage=function($,o,T,s,E,e,n){if(this.iE!=-1&&this.iE!=this.P5)return;
|
|
var A=this.ZU,u=$.font.Tmode;if(u==7&&A.u[A.u.length-1].add.TySh){return}this.Lg($);var Y=cn.jt($.ctm);
|
|
Y.concat(this.OC);var b=new fY(1/T,0,0,-1/s,0,1);b.concat(Y);Y=b;o=cn.Zj(o,T,s);if(E)E=cn.Zj(E,T,s);
|
|
if(E==null){if(o.length==T*s*4)o=new Uint8Array(eY.Q1("PNG").tC([[o.buffer,0]],T,s))}else{o=this.dY(o,T,s,e,!1);
|
|
E=this.dY(E,T,s,n,!0);var a=L.G(T*s);L.Ge(E,a,0);L.aM(a,o,3);o=new Uint8Array(eY.Q1("PNG").tC([[o.buffer,0]],T,s))}var w=A.sP(o,"Bitmap",0,0),X=w.rect.clone();
|
|
X.x=X.y=0;var N=L.M.Uo(X).I;L.M.t(N,Y,N);w.add.SoLd.Trnf=D.p.vP(N);w.add.SoLd.nonAffineTransform=D.p.vP(N);
|
|
w.qI(A,!1);cn.E6($,w);A.u.push(w)};cn.E6=function($,o){o.opacity=Math.round(255*$.ca);var T=cn.pR[$.bmode];
|
|
if(T==null)console.log("Unknown blend mode",T);else o.fh=T};cn.pR={"/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 "};
|
|
cn.td=function($){for(var o in cn.pR)if(cn.pR[o]==$)return o};cn.Zj=function($,o,T){var s=eY.RP($.buffer);
|
|
if(s=="jpg"){try{$=new Uint8Array(eY.Q1("JPG").a33($.buffer))}catch(aX){$=new Uint8Array(o*T*4)}}else if($.length!=o*T*4){var E=new Uint8Array(o*T*4),e=new Uint8Array(Math.ceil(o*T/8));
|
|
UTIF.decode._decodeG4($,0,$.length,e,0,o,1);for(var f=0;f<o*T;f++){var n=f*4,A=(e[f>>3]>>7-(f&7)&1)*255;
|
|
E[n]=A;E[n+1]=A;E[n+2]=A;E[n+3]=255}$=E}return $};cn.prototype.dY=function($,o,T,s,E){if($.length!=o*T*4){var e=eY.RP($.buffer),n=eY.Q1(e);
|
|
if(n==null||e=="tga")n=eY.Q1("jpg");$=new Uint8Array(n.yj($,s,E)[0].data)}return $};cn.prototype.ShowPage=function(){var $=this.ZU;
|
|
this.P5++;var o=this.d4;this.JJ();var T=$.$f();$.u.push(T);var s=new df(Math.round(this.zD.x),Math.round(this.zD.y),Math.round(o[2]-o[0]),Math.round(o[3]-o[1]));
|
|
if(s.p4())s.d=s.w=2e3;this.VM=this.VM.BZ(s);T.y2(s);T.add.artb.artboardBackgroundType.v=3;T.tM("Page "+this.P5);
|
|
T.add.lsct=hd.Qm;T.fh="pass";T.Jp=24};cn.prototype.Print=function($){console.log("Print:",$)};cn.prototype.Done=function(){var $=this.ZU;
|
|
if(this.P5==1)$.u[$.u.length-1].add.lsct=hd.NH;$.Mm(this.P5);for(var f=0;f<$.u.length;f++){var o=$.u[f],T=o.add.vmsk,s=o.add.TySh,E=this.WX[f];
|
|
o._L();if(T){var e=!1;for(var n=0;n<T.g.length;n++){var A=T.g[n];if((A.type==0||A.type==3)&&A.length>32767)e=!0}if(e){$.u.splice(f,1);
|
|
f--;continue}}o.tF($);if(s&&E.sT.length!=0){this.Ea(E);var u=s.h3,Y=E.sT.length,b=E.sT[0],a=0,w=0;for(var n=0;
|
|
n<Y;n++)a=Math.max(a,E.sT[n].N0);g8.I8(u,1);s.t.Es-=b.rZ*.7;g8.bi(u,[0,0,Math.ceil(a*1.1),Math.ceil(E.sT[Y-1].y-b.y+b.rZ*2)])}if(s){var u=s.h3;
|
|
g8.a5p(u);var X=g8.m5(u).split("\n");for(var n=0;n<X.length-1;n++){var N=X[n],z=0;for(var i=0;i<N.length;
|
|
i++){var k=N.charCodeAt(i);if(1473<=k&&k<=1524)z++}if(z>N.length/2){X[n]=N.split("").reverse().join("");
|
|
var Q=u.EngineDict.ParagraphRun.RunArray[n].ParagraphSheet.Properties;Q._Direction=1;Q.Justification=g8.KH(Q)}}g8._f(u,X.join("\n"))}}$.Nr=!0;
|
|
$.d=this.VM.d;$.w=this.VM.w;$.buffer=L.G(this.VM.Y()*4)};var fn={};fn.JF=function($,o,T,s,E,e){if(E==null)E=$.d;
|
|
if(e==null)e=$.w;var n=!1,A=[$.root],u=$.root.children;if($.add.artd){n=!0;for(var f=0;f<u.length;f++)if(u[f].c.add.artb==null)n=!1;
|
|
if(n)A=u}var Y=new df(0,0,$.d,$.w),b=o[0];b=b.replace(/,/g," ").replace(/\-/g," - ").replace(/ +/g," ").trim();
|
|
b=b.split(" ");var a=[];for(var f=0;f<b.length;f++){var w=b[f];if(w=="-"){var X=a.pop(),N=parseInt(b[f+1]);
|
|
while(X<N){a.push(X);X++}}else a.push(parseInt(w))}b=a;for(var f=0;f<b.length;f++)if(isNaN(b[f])||b[f]<1||b[f]>A.length){b.splice(f,1);
|
|
f--}var z=E/$.d,i=e/$.w,k=z*72/$.fG,Q=i*72/$.fG,O=72*o[5],c=72*o[5];for(var f=0;f<A.length;f++){if(b.length!=0&&b.indexOf(f+1)==-1)continue;
|
|
var B=A[f],G=n?B.c.co():Y,l=Math.round(G.d*k+2*O),v=Math.round(G.w*Q+2*c);T.StartPage(0,0,l,v);var p=UDOC.getState([[0,0,l,v]]),P=new fY;
|
|
P.translate(-G.x,-G.y-G.w);P.scale(k,-Q);P.translate(O,c);if(o[2]){var h=$.aw();if(!Y.R1(G)){h=L.G(G.Y()*4);
|
|
L.h9($.aw(),Y,h,G)}if(o[1]!=100){var j=eY.Q1("JPG").tC([[h.buffer]],G.d,G.w,[o[1]]);h=new Uint8Array(j)}var C=new fY;
|
|
C.translate(G.x,G.y);fn._2(p,T,h,G,C,P)}else fn.E7($,B,p,T,P,o,s);T.ShowPage()}T.Done()};fn.cg=function($){$=L.h.Qc($);
|
|
return[$.i/255,$.m/255,$.P/255]};fn.E7=function($,o,T,s,E,e,n){var A=o.c,u=A.add.lsct,Y=A.add.lmfx,b=A.add.vmsk,a=A.add.vstk,w=A.add.TySh,i,k;
|
|
if(!A.N9())return;var X=A.opacity/255,N=A.add.iOpa?A.add.iOpa/255:1;T.bmode=cn.td(A.fh);T.ca=T.CA=X*N;
|
|
var z=Y;if(z)z=z.solidFillMulti.v[0];if(z)z=z.v;if(z&&!z.enab.v)z=null;var Q=A.rect;if(A.f7()&&(!A.p3()||A.B4&&A.B4.rP)){if(A.p3){i=A.B4.rP;
|
|
Q=A.B4.aao}else{i=L.G(A.rect.Y());L.Ge(A.buffer,i,3)}k=fW.ZX(Y,null,i,Q,$,Q).type}if(k)fn.Tm(A,i,Q,k,T,s,E,e,!0);
|
|
if(A.p3()){for(var f=0;f<o.children.length;f++)fn.E7($,o.children[f],T,s,E,e,n)}else if(b&&A.d5()){var O=b.g,c=L.A.hT(O),B=L.M.Ld(O),G=!1,l=!1,v=!1;
|
|
L.M.t(B.I,E,B.I);T.pth={cmds:B.o,crds:B.I};if(a.fillEnabled.v){var p=fW.l_(Y,A.add),P=p[0],h=p[1];if(P){T.colr=fn.cg(P.Clr.v)}else if(h){var j=h,C=[],V,d=j.Type.v.GrdT=="Rdl"?"rad":"lin",m=L.h.Vq(j,c),R=E.bb(m[0]),g=E.bb(m[1]);
|
|
if(d=="rad")V=[R.x,R.y,0,R.x,R.y,aY.Sa(R,g)];else{R.A5(g.x+(R.x-g.x)*2,g.y+(R.y-g.y)*2);V=[R.x,R.y,g.x,g.y]}var S=j.Grad.v.Clrs.v;
|
|
for(var f=0;f<S.length;f++){var F=S[f].v;C.push([F.Lctn.v/4096,fn.cg(F.Clr.v)])}T.colr={typ:d,mat:[1,0,0,1,0,0],grad:C,crds:V}}G=!0}var r=fW.oU(Y);
|
|
if(!a.strokeEnabled.v&&r)a=r;if(a.strokeEnabled.v){var q=a.strokeStyleContent.v,W=a.strokeStyleLineDashSet.v,Z=ev.ci.k0.indexOf(a.strokeStyleLineAlignment.v.strokeStyleLineAlignment);
|
|
if(q.Clr==null)return;var I=L.h.Qc(q.Clr.v);T.COLR=[I.i/255,I.m/255,I.P/255];T.lwidth=a.strokeStyleLineWidth.v.val*(Z==2?2:1)*E.jZ();
|
|
T.mlimit=a.strokeStyleMiterLimit.v;T.doff=a.strokeStyleLineDashOffset.v.val;T.ljoin=ev.ci.join.indexOf(a.strokeStyleLineJoinType.v.strokeStyleLineJoinType);
|
|
T.lcap=ev.ci.JZ.indexOf(a.strokeStyleLineCapType.v.strokeStyleLineCapType);T.dash=[];for(var f=0;f<W.length;
|
|
f++)T.dash.push(W[f].v.val*T.lwidth);if(T.dash.length==1&&T.dash[0]==0)T.dash=[];l=!0;if(Z==2)v=!0}if(G&&!v)s.Fill(T);
|
|
if(l)s.Stroke(T);if(G&&v)s.Fill(T)}else if(w&&e[4]){var _=w.h3,cN=new iq(_,n),B=hA.hv(cN,w),ce=L.M.ie(B);
|
|
for(var I in ce){var gf=parseInt(I.slice(1),16);T.colr=z?fn.cg(z.Clr.v):[(gf>>>16&255)/255,(gf>>>8&255)/255,(gf&255)/255];
|
|
var K=ce[I];L.M.t(K.I,E,K.I);K=L.M.aaC(K);T.pth={cmds:K.o,crds:K.I};s.Fill(T)}}else if(w&&e[3]==!1){var _=w.h3,cv=w.t.clone(),f0=new fY(1,0,0,-1,0,0);
|
|
f0.concat(cv);f0.concat(E);var i8=g8.m5(_),cN=new iq(_,n);for(var f=0;f<cN.CL.length;f++){var b5=cN.CL[f];
|
|
if(b5.v5.length==1&&b5.v5[0].GF)continue;for(var iC=0;iC<b5.xv.length;iC++){var an=b5.xv[iC],cO=b5.tP.y+an.tP.y,bh=b5.v5[an.start].start,bD=b5.v5[an.end-1].end,fq=g8.abN(_,bh,bD);
|
|
for(var fO=0;fO<fq.length;fO++){var g6=cN.UH(bh),hM=fq[fO],d3=g8.$Q(_,bh,bh),h9=d3.Nd[d3.oH.Font].Name;
|
|
T.font.Tf=h9;var I=g8.Qc(d3.oH);T.colr=z?fn.cg(z.Clr.v):[I.i/255,I.m/255,I.P/255];T.font.Tfs=Math.round(d3.oH.FontSize);
|
|
var cs=i8.slice(bh,bh+hM);if(d3.oH.FontCaps==2)cs=cs.toUpperCase();var dv=new fY;dv.translate(g6.uL.x,-cO);
|
|
dv.concat(f0);T.ctm=[dv.Ca,dv.P,dv.Z9,dv.Um,dv.Ry,dv.Es];s.PutText(T,cs,0);T.ctm=[1,0,0,1,0,0];bh+=hM}}}}else if(!A.rect.p4()){var ec,gT,iz=!1,gw=new fY;
|
|
if(A.add.SoLd){var iI=A.add.SoLd,g2=iI.Idnt.v,bb=$.Rf(g2,iI.Crop?iI.Crop.v:null),gY="";if(bb==null)return;
|
|
var ir=bb.wc,dG=eY.RP(bb.raw.buffer);if(e[6].indexOf(dG)!=-1){ec=bb.raw;iz=!0}else ec=ir[0];gT=ir[1];
|
|
gw=L.$.bH(iI)}else{ec=A.buffer;gT=A.rect;gw.translate(gT.x,gT.y)}if(z&&!iz)ec=fW.lv(ec,z,gT);fn._2(T,s,ec,gT,gw,E);
|
|
if(z&&iz){var V=[0,0,gT.d,0,gT.d,gT.w,0,gT.w];L.M.t(V,gw,V);L.M.t(V,E,V);var e6=JSON.parse(JSON.stringify(T));
|
|
e6.ca=z.Opct.v.val/100;e6.pth={cmds:["M","L","L","L","Z"],crds:V};e6.colr=fn.cg(z.Clr.v);s.Fill(e6)}}if(k)fn.Tm(A,i,Q,k,T,s,E,e,!1)};
|
|
fn.Tm=function($,o,T,s,E,e,n,A,u){var Y=T.clone(),b=o;if($.add.TySh&&!A[3]&&!A[4])return;var a=E.ca,w=E.bmode;
|
|
for(var f=ev.order.length-1;f>=0;f--){var X=ev.order[f];if(X=="GrFl"||X=="SoFi")continue;if($.add.vmsk&&X=="FrFX")continue;
|
|
var N=s[X],z=f>7||X=="FrFX";if(z!=u)continue;for(var i=0;i<N.length;i++){var k=N[i];console.log(z,X,k);
|
|
var Q=k.lM.clone();Q.offset(Y.x,Y.y);if(!z){if(!Y.Yg(Q)){var O=Y.BZ(Q),c=L.G(O.Y());L.pg(b,Y,c,O);b=c;
|
|
Y=O}L.Li(b,Y,k._3,Q)}if(z&&X=="FrFX"&&k.bR)L.Li(k.bR,Q,k._3,Q);var B=new fY;B.translate(Q.x,Q.y);E.ca=k.LE;
|
|
E.bmode=cn.td(k._6);fn._2(E,e,k._3,Q,B,n)}}E.ca=a;E.bmode=w};fn._2=function($,o,T,s,E,e){var n=new fY;
|
|
n.scale(s.d,-s.w);n.translate(0,s.w);n.concat(E);n.concat(e);$.ctm=[n.Ca,n.P,n.Z9,n.Um,n.Ry,n.Es];o.PutImage($,T,s.d,s.w);
|
|
$.ctm=[1,0,0,1,0,0]};var h5={};h5.$$=function($){var o=new Uint8Array($);return h5.JR(o,0)};h5.JR=function($,o){var T=t.s,s=t.en,E={EB:s($,o,4),l:o+8,size:T($,o+4)},e=E.EB=="FORM"||E.EB=="LIST"||E.EB=="CAT ";
|
|
if(e)E.RG=s($,o+8,4);if(E.size<0||E.l+E.size>$.length)throw"e";if(e){E.sub=[];o+=12;var n=E.l+E.size;
|
|
while(o<n){var A=h5.JR($,o);E.sub.push(A);o+=8+A.size+(A.size&1)}}return E};var hh={};hh.$$=function($,o){var T=new Uint8Array($);
|
|
return hh.JR(T,0,o)};hh.JR=function($,o,T){var s=t.cX,E=t.en,e={EB:E($,o,4),l:o+8,size:s($,o+4)};if(T&&T[e.size]!=null)e.size=T[e.size];
|
|
if(e.EB=="RIFF"||e.EB=="LIST"){e.RG=E($,o+8,4)}if(e.size<0||e.l+e.size>$.length)throw"e";if(e.EB=="RIFF"||e.EB=="LIST"&&(e.RG!="cmpr"&&e.RG!="stlt")){e.sub=[];
|
|
o+=12;var n=e.l+e.size;while(o<n){var A=hh.JR($,o,T);e.sub.push(A);o+=8+A.size+(A.size&1)}}return e};
|
|
var h5={};h5.$$=function($){var o=new Uint8Array($);return h5.JR(o,0)};h5.JR=function($,o){var T=t.s,s=t.en,E={EB:s($,o,4),l:o+8,size:T($,o+4)},e=E.EB=="FORM"||E.EB=="LIST"||E.EB=="CAT ";
|
|
if(e)E.RG=s($,o+8,4);if(E.size<0||E.l+E.size>$.length)throw"e";if(e){E.sub=[];o+=12;var n=E.l+E.size;
|
|
while(o<n){var A=h5.JR($,o);E.sub.push(A);o+=8+A.size+(A.size&1)}}return E};function cY(){}cY.$$=function($,o){var T=new Uint8Array($);
|
|
o.Nr=!0;var s=t.en(T,0,2);if(s=="WL"){alert("Unsupported CDR version")}else{var E=cY.Nq,e=hh.$$(T.buffer),n={data:T,l:0,Hw:cY.a7Q(T[11])},w=300;
|
|
n.K6=n.Hw<600?16:32;cY.O7(n,e.sub,o,0);var A=E(e,"cmpr").sub,u=A[0],Y=A.slice(1),b=E(u,"mcfg").H,a=b.a3L;
|
|
w/=hw.GE(new df(0,0,Math.round(a.x*w),Math.round(a.y*w)),8192*8192);var X=Math.round(a.x*w),N=Math.round(a.y*w);
|
|
o.d=X;o.w=N;o.buffer=L.G(o.d*o.w*4);var z=E(u,"filt").sub,i=E(u,"otlt").sub;u.GW={};for(var f=0;f<z.length;
|
|
f++)u.GW[z[f].sub[0].H.id]=z[f].sub[0].H;u.Tt={};for(var f=0;f<i.length;f++)u.Tt[i[f].H.id]=i[f].H;var k=new fY(w,0,0,-w,a.x*w/2,a.y*w/2),Q=Y[1];
|
|
cY.Tx(Q,u,o,k);o.Mm(1);o.u[o.u.length-1].y2(new df(0,0,X,N))}};cY.Nq=function($,o){var T=null;for(var f=0;
|
|
f<$.sub.length;f++){var s=$.sub[f];if(s.EB==o||s.RG==o)T=s}return T};cY.Tx=function($,o,T,s){var E=cY.Nq,e=$.RG?$.RG:$.EB,n=E($,"lgob"),A=E($,"txsm"),u,Y;
|
|
if(n){u=E(n,"trfl");Y=E(n,"loda")}var b=u?u.sub[0].Ak.clone():new fY;b.concat(s);var a=T.$f();if(e=="page"||e=="layr"||e=="grp "){a.tM((e=="page"?"Page":"Group")+" "+T.u.length);
|
|
a.add.lsct=hd.NH;a.fh="pass";a.Jp=24;var w=[];if(e=="page")w=E($,"gobj").sub;if(e=="layr")w=$.sub.slice(2);
|
|
if(e=="grp ")w=$.sub.slice(4);if(w.length==0)return;T.u.push(T.jK());for(var f=w.length-1;f>=0;f--)cY.Tx(w[f],o,T,s)}else if(e=="obj "&&Y.H&&Y.H.path){a.tM("Object "+T.u.length);
|
|
var X=o.GW[Y.H.aaJ],N=o.Tt[Y.H.akB],z=a.getName(),i=X&&X.type!=0,k=i&&X.H!=null?X.H:[0,0,0];a.Jp|=16;
|
|
a.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));var Q=a.add.vstk;Q.strokeEnabled.v=!1;a.add.vmsk=new M.PZ;
|
|
if(N&&N.aq7!=1){Q.strokeEnabled.v=!0;Q.strokeStyleLineAlignment.v.strokeStyleLineAlignment="strokeStyleAlignCenter";
|
|
Q.strokeStyleLineWidth.v.val=N.lineWidth*s.jZ();var O=N.color;Q.strokeStyleContent.v.Clr.v=L.h.wb({i:O[0]*255,m:O[1]*255,P:O[2]*255})}var c=Y.H.path;
|
|
a.add.vmsk.g=L.M.Hz(c,!1);L.A.hR(a.add.vmsk.g,b);cn.cH(k,a,b,L.A.hT(a.add.vmsk.g));Q.fillEnabled.v=i;
|
|
a._L();a.tF(T)}else if(e=="obj "&&A){var B=Y.H.aaQ,G=Y.H.alJ,p="";a.add.TySh=g8.rm(0,0);var l=b.jZ();
|
|
a.add.TySh.t.translate(b.Ry,b.Es);var v=a.add.TySh.h3,P=A.H.agZ;for(var f=0;f<P.length;f++){var h=P[f],j=p.length;
|
|
p+=h.text+"\n";g8.YN(v,j,h.text+"\n");var C=cY.aos(h.ahm,o),V=g8.$Q(v,j,p.length);if(C.align==3)V.CL.Justification=1;
|
|
else V.CL.Justification=0;var d=C.fill.H;V.oH.FillColor={Type:1,Values:[1,d[0],d[1],d[2]]};V.oH.FontSize=Math.round(C.aeX.fontSize*b.jZ());
|
|
g8.zA(v,j,p.length-1,V)}if(G){g8.I8(v,0)}else{g8.I8(v,1);g8.bi(v,[0,0,Math.round(B.x*b.Ca),Math.round(-B.y*b.Um)])}a.tM(p.slice(0,10))}else{a=null}if(a)T.u.push(a)};
|
|
cY.aos=function($,o){var T=cY.Nq(o,"stlt").H,s=JSON.parse(JSON.stringify(T.Td[$]));if(s.Uu!=0){var E=T.Td[s.Uu];
|
|
for(var e in E)if(s[e]==null||s[e]==0)s[e]=E[e];delete s.Uu}s.align=T.a5Q[s.akU];s.fill=o.GW[T.a5t[s.a3z]];
|
|
s.apA=o.Tt[T.a7i[s.akY]];s.aeX=T.aqv[s.a7M];return s};cY.a2i=function(f){var J=f.data[f.l];f.l+=1;return J};
|
|
cY.MX=function(f){var J=t.w1(f.data,f.l);f.l+=2;return J};cY.uv=function(f){var J=t.cX(f.data,f.l);f.l+=4;
|
|
return J};cY.a7w=function(f){var J=t.cX(f.data,f.l);f.l+=8;return J};cY.j0=function(f){var J=t.UG(f.data,f.l);
|
|
f.l+=2;return J};cY.m3=function(f){var J=t.$R(f.data,f.l);f.l+=4;return J};cY.Eo=function(f){var J=t.YA(f.data,f.l);
|
|
f.l+=8;return J};cY.Js=function(f){if(f.l>=f.data.length)throw"e";var $=0;while(f.data[f.l+$]!=0)$++;
|
|
var o=t.en(f.data,f.l,$);f.l+=$+1;return o};cY.acg=function($){if($.Hw<600)return Math.PI*cY.j0($)/1800;
|
|
return Math.PI*cY.m3($)/18e7};cY.a11=function($){if($.Hw<1500)return cY.Th($);else return cY.Eo($)/254e3};
|
|
cY.Th=function($){if($.Hw<600)return cY.j0($)/1e3;else return cY.m3($)/254e3};cY.aaN=function($){if($.Hw<600)return CRDParser.MX($);
|
|
else return cY.uv($)};cY.a2a=function($){if($.Hw<600)return CRDParser.j0($);else return cY.m3($)};cY.O7=function($,o,T,s){var E=cY,e=E.a2i,n=E.MX,A=E.uv,u=E.a7w,Y=E.j0,b=E.m3,a=E.Eo,w=E.Th,X=E.a11,N=E.acg,z=E.aaN,i=E.a2a;
|
|
for(var k=0;k<o.length;k++){var Q=$.Hw,O=o[k];$.l=O.l+(O.EB=="LIST"?4:0);if(O.EB=="vrsn"){var c=n($);
|
|
$.Hw=c;console.log("Version",c);$.K6=c<600?16:32}else if(O.EB=="DISP"){}else if(O.EB=="LIST"&&O.RG=="cmpr"){var B=A($),G=A($),l=A($),v=A($),p=new Uint8Array($.data.buffer,$.l+8+2,B-6-8),P=pako.inflateRaw(p),V=0;
|
|
$.l+=B;p=new Uint8Array($.data.buffer,$.l+8+2);var h=pako.inflateRaw(p),j=[];for(var C=0;C<h.length;
|
|
C+=4)j.push(t.cX(h,C));O.sub=[];while(V<P.length){var d=hh.JR(P,V,j);V=d.l+d.size;O.sub.push(d)}var m={data:P,l:0,Hw:Q,K6:$.K6};
|
|
cY.O7(m,O.sub,T,s+1)}else if(O.EB=="LIST"&&O.RG=="stlt"){var R=$.l,f0=32;O.H={};var g=A($);if(g==0)return;
|
|
O.H.a5t=cY.hP($,Q>=1300);O.H.a7i=cY.hP($);O.H.aqv={};var S=A($);for(var f=0;f<S;f++){var F=A($);$.l+=Q<1e3?12:20;
|
|
var r=n($),q=n($);$.l+=8;var W=w($);$.l+=Q<1e3?12:20;O.H.aqv[F]={aj6:r,alx:q,fontSize:W}}O.H.a5Q=cY.hP($);
|
|
var Z=A($);$.l+=52*Z;var I=A($);$.l+=152*I;var _=A($);$.l+=784*_;var cN=A($);for(var f=0;f<cN;f++){$.l+=40;
|
|
if(Q>1300)$.l+=4;if(Q>=1300){if(A($))$.l+=68;else $.l+=12}else{$.l+=20;if(Q>=1e3)$.l+=8;if(A($))$.l+=8;
|
|
$.l+=8}}var ce=A($);O.H.aeR={};for(var f=0;f<ce;f++){var gf=A($),K={};$.l+=12;K.right=w($);K.adW=w($);
|
|
K.left=w($);O.H.aeR[gf]=K}var cv=A($);if(Q>=1300)f0+=4;$.l+=f0*cv;var i8=A($);$.l+=28*i8;if(Q>800){var b5=A($);
|
|
$.l+=12*b5}O.H.Td={};for(var f=0;f<g;f++){var iC=A($),an=A($),cO={};cO.Uu=A($);$.l+=8;var bh=A($);if(Q>=1200)bh*=2;
|
|
$.l+=bh;cO.a3z=A($);cO.akY=A($);if(iC>1){cO.a7M=A($);cO.akU=A($);cO.aij=A($);cO.amO=A($);if(Q>800)cO.alf=A($)}if(iC>2){cO.a4d=A($);
|
|
cO.afq=A($);cO.a0E=A($);cO.akw=A($);cO.ak$=A($)}O.H.Td[an]=cO}}else if(O.EB=="LIST")cY.O7($,O.sub,T,s+1);
|
|
else if(O.EB=="txsm"){O.H={};if(Q<600)throw"e";if(Q<700)throw"e";if(Q>=1600)throw"e";if(Q>=1500)$.l+=37;
|
|
else $.l+=36;if(A($)){if(Q<800)$.l+=32}if(Q<800)$.l+=4;O.H.amD=A($);O.H.agZ=[];$.l+=48;if(Q>=800){if(A($)){$.l+=32;
|
|
if(Q>=1300)$.l+=8}}if(Q>=1500)$.l+=12;var iC=A($),bD=1,fq=!1;if(!iC){if(Q>=800)$.l+=4;if(Q>800)$.l+=2;
|
|
if(Q>=1400)$.l+=2;$.l+=24;if(Q<800)$.l+=8;bD=A($)}for(var C=0;C<bD;C++){var fO=A($),f=0;if(Q>=1300&&iC)$.l++;
|
|
$.l++;var g=A($),g6=[];for(f=0;f<g;f++){var hM=e($),h9=0;e($);var d3=e($);if(Q>=800)h9=e($);var cO={};
|
|
if(d3&1){cO.aj6=n($);var cs=n($);if(cs)cO.ah0=cs}if(d3&2)$.l+=4;if(d3&4)cO.abA=w($);if(d3&8)$.l+=4;if(d3&16)$.l+=4;
|
|
if(d3&32)$.l+=4;if(d3&64){cO.a3z=A($);if(Q>=1500)$.l+=48}if(d3&128){cO.akY=A($)}if(h9&8){if(Q>=1300){var dv=A($);
|
|
if($.l+dv*2>=$.data.length){fq=!0;break}$.l+=dv*2}else $.l+=4}if(h9&32){var ec=e($);if(ec)$.l+=52}if(hM==2)if(Q>=1300)$.l+=48;
|
|
g6.push(cO)}if(fq){break}var gT=A($);if($.l+gT*4>$.data.length)break;var iz=[];for(f=0;f<gT;f++){var gw=0;
|
|
if(Q>=1200)gw=u($)&4294967295;else gw=A($);iz[f]=gw>>16|gw&1}var iI=gT;if(Q>=1200)iI=A($);var g2=cY.Js($);
|
|
O.H.agZ.push({ahm:fO,text:g2,Td:g6})}}else if(O.EB=="font"){var bb=n($),ir=n($);$.l+=14;var dG=cY.Js($);
|
|
O.H={id:bb,ak2:ir,name:dG}}else if(["IKEY","ICMT","pfrd","bcfg"].indexOf(O.EB)!=-1){}else if(O.EB=="flgs")O.H=A($);
|
|
else if(O.EB=="bbox"){var gY=w($),e6=w($),fr=w($),bt=w($);O.H=new df(gY,e6,fr-gY,bt-e6)}else if(O.EB=="fild"){var cx=A($),ci=0,gu;
|
|
if(Q>=1300){$.l+=4;ci=n($);$.l+=2}var gv=n($);if(gv==0){}else if(gv==1){$.l+=Q>=1300?13:2;gu=cY.So($)}else if(gv==2){$.l+=Q>=1300?8:2;
|
|
var ak=e($),hP=0;if(Q>=1300){$.l+=17;hP=Y($)}else if(Q>=600){$.l+=19;hP=b($)}else{$.l+=11;hP=Y($)}var ai=N($),hK=.5+i($),h3=.5+i($)-.5;
|
|
if(Q>=600)$.l+=2;var e4=z($)&255,co=e($)/100;$.l++;var aO=z($)&65535;if(Q>=1300)$.l+=3;var cC=[];for(var f=0;
|
|
f<aO;f++){var hm=cY.So($);if(Q>=1300){if(ci==158||Q>=1600&&ci==150)$.l+=26;else $.l+=5}var cu=z($)/100;
|
|
if(Q>=1300)$.l+=3;cC.push([cu,hm])}gu={typ:ak==1?"lin":"rad",crds:[hK-Math.cos(ai)/2,h3-Math.sin(ai)/2,hK,h3],grad:cC,mat:[1,0,0,1,0,0]}}else console.log("Unknown fill type",gv);
|
|
O.H={id:cx,type:gv,H:gu}}else if(O.EB=="outl"){var bF=A($);if(Q>=1300){var fH=0,dX=0;while(fH!=1){$.l+=dX;
|
|
fH=A($);dX=A($)}}var fk=n($),ix=n($),bx=n($);if(Q<1300&&Q>=600)$.l+=2;var ha=w($),ca=n($)/100;if(Q>=600)$.l+=2;
|
|
var iX=N($);if(Q>=1300)$.l+=46;else if(Q>=600)$.l+=52;var gu=cY.So($,bF==270963208||bF==276198e3,bF);
|
|
O.H={id:bF,aq7:fk,abY:ix,ap2:bx,lineWidth:ha,color:gu}}else if(O.EB=="mcfg"){if(1300<=Q)$.l+=12;else if(900<=Q)$.l+=4;
|
|
else if(600<=Q&&Q<700)$.l+=28;var dp=0,dd=0;if(Q<400)throw"e";else{dp=w($);dd=w($)}O.H={a3L:new aY(dp,dd)}}else if(O.EB=="loda"){var R=$.l,iD=z($),iY=z($),ho=z($),bN=z($),it=z($),j4=[],gy=[];
|
|
$.l=R+ho;for(var f=0;f<iY;f++)j4[f]=z($);$.l=R+bN;for(var f=iY-1;f>=0;f--)gy[f]=z($);O.H={};for(var f=0;
|
|
f<iY;f++){$.l=R+j4[f];var fi=gy[f];if(fi==10)O.H.akB=A($);else if(fi==20)O.H.aaJ=A($);else if(fi==200)O.H.afW=z($);
|
|
else if(fi==30){if(Q<400)it--;if(it==1){var gY=X($),e6=X($),hN=0,b4=0,eN=0,hX=0;if(Q<1500){hX=X($);eN=Q<900?hX:X($);
|
|
b4=Q<900?hX:X($);hN=Q<900?hX:X($)}else throw"e";O.H.path=L.M.Ld(L.A.XG.Rect(0,0,gY,e6,hN))}else if(it==2){var fh=w($),a5=w($),aT=N($),aZ=N($),eA=Math.abs(fh),c0=Math.abs(a5);
|
|
O.H.path=L.M.Ld(L.A.XG.Xi(0,0,eA,-c0))}else if(it==3){O.H.path=cY.a2T($)}else if(it==4){O.H.alJ=cY.a1x($)}else if(it==6){O.H.aaQ=cY.aoh($)}else if(it==37){O.H.path=cY.mg($)}else console.log(it)}}}else if(O.EB=="trfd"){var R=$.l,iD=z($),iY=z($),ho=z($);
|
|
$.l=R+ho;var j4=[];for(var f=0;f<iY;f++)j4[f]=z($);for(var f=0;f<iY;f++){$.l=R+j4[f];if(Q>=1300)$.l+=8;
|
|
var h7=n($);if(h7==8){var dS,al,gY,aD,bz,e6;if(Q>=600)$.l+=6;if(Q>=500){dS=a($);al=a($);gY=a($)/(Q<600?1e3:254e3);
|
|
aD=a($);bz=a($);e6=a($)/(Q<600?1e3:254e3)}else throw"e";O.Ak=new fY(dS,aD,al,bz,gY,e6)}else console.log(h7)}}else if(!1){console.log(O);
|
|
var i1=Math.min(O.size,32);console.log(t.i8(data,O.l,i1));console.log(t.ajk(data,O.l,i1))}}};cY.hP=function($,o){var T=cY.uv,s={},E=T($);
|
|
for(var f=0;f<E;f++){var e=T($);$.l+=4;var n=T($);s[e]=n;if(o)$.l+=48}return s};cY.a1x=function($){var o=cY,T=o.Th,s=T($),E=T($);
|
|
return new aY(s,E)};cY.aoh=function($){var o=cY,T=o.Th;$.l+=4;var s=T($),E=T($);return new aY(s,E)};
|
|
cY.mg=function($){var o=cY,T=o.uv,s=o.MX,E=o.Th;$.l+=4;var e=s($)+s($);$.l+=16;var n=cY.h7($,e);return n};
|
|
cY.a2T=function($){var o=cY.MX($);$.l+=2;return cY.h7($,o)};cY.h7=function($,o){var T=cY,s=T.Th,E=$.Hw<600?2:4,e=$.l,n={I:[],o:[]},A=0,u=0,Y=0;
|
|
for(var f=0;f<o;f++){var A=s($),u=s($),b=$.data[e+o*E*2+f];if(!(b&64)&&!(b&128)){n.I.push(A,u);n.o.push("M");
|
|
Y+=2}else if(b&64&&!(b&128)){n.I.push(A,u);n.o.push("L");Y+=2}else if(!(b&64)&&b&128){n.I.push(A,u);
|
|
n.o.push("C");Y+=6}else if(b&64&&b&128){n.I.push(A,u)}}if(Y!=n.I.length)throw"e";return n};cY.am9=function($,o){var T=t.cX;
|
|
o+=8;var s=T($,o);o+=4;var E=T($,o);o+=4;o+=4*7;var e=o,n=L.G(s*E*4);o+=1024;for(var A=0;A<E;A++)for(var u=0;
|
|
u<s;u++){var f=A*s+u,Y=(E-A-1)*s+u,b=$[o+f]<<2,a=Y<<2;n[a+0]=$[e+b+2];n[a+1]=$[e+b+1];n[a+2]=$[e+b+0];
|
|
n[a+3]=255}return{_3:n,rect:new df(0,0,s,E)}};cY.a7Q=function($){if($==32)return 300;else if($<49)return 0;
|
|
else if($<58)return 100*($-48);else if($<65)return 0;return 100*($-55)};cY.So=function($,o,T){var s=cY.MX,E=cY.uv,e=$.Hw,n=0,A=0;
|
|
if(e>=500){n=s($);if(n==1&&e>=1300)n=25;if(n==25||n==30){var u=0;if(n==30){n=25;u=30}else{u=s($);$.l+=4}var Y=s($),b=s($)}else if(n==14)throw"e";
|
|
else{$.l+=6;A=E($)}}else throw"e";var a=[];if(n==2||n==9||n==17){var w=[A>>>0&255,A>>>8&255,A>>>16&255,A>>>24&255];
|
|
if(n==2)for(var f=0;f<4;f++)w[f]=Math.round(255*w[f]/100);for(var f=0;f<4;f++)w[f]/=255;a=UDOC.C.cmykToRgb(w)}else if(n==1||n==5){a=[A>>>0&255,A>>>8&255,A>>>16&255];
|
|
for(var f=0;f<3;f++)a[f]=a[f]/255}else console.log("Unknown color model "+n,A,A.toString(16));return a};
|
|
var dV=function(){var $,o,T=new ArrayBuffer(4),s=new Uint8Array(T),E=new Uint32Array(T),e=new Float32Array(T);
|
|
function n(w,X){for(var N=0;N<w.length;N++)if(w[N][0]==X)return w[N]}function A(){var w=0,X=0,N=0;do{N=$[o++];
|
|
w|=(N&127)<<X;X+=7}while(N&128&&X<35);return w>>>0}function u(w,X,N,z,i){$=w;o=X;var k=z[0]=="mesg",Q=z[2],O={},c=1,B=k?1e9:Q.length;
|
|
while(c<=B){var G=c;if(k){G=A();if(G==0)break}var l=n(Q,G),v=l[2],p=l[1]==1,P=p?A():1,h=new Array(P);
|
|
if(v==3){if(!p)throw"e";h=$.slice(o,o+P);o+=P}else for(var f=0;f<P;f++){var j;if((v&1)==1){if(v==1)j=$[o++]==1;
|
|
else if(v==3)j=$[o++];else if(v==5){var C=A();j=C&1?~(C>>>1):C>>>1}else if(v==7)j=A();else if(v==9){if($[o]==0){j=0;
|
|
o++}else{s[0]=$[o];s[1]=$[o+1];s[2]=$[o+2];s[3]=$[o+3];var V=E[0];E[0]=V<<23|V>>>9;j=e[0];o+=4}}else if(v==11){var d=Y($,o);
|
|
j=d[0];o+=d[1]+1}else throw v}else{var m=N[v>>>1];if(m[0]=="enum"){var R=$[o++];if(R>127)throw"e";j=m[2][R]}else{var g=u($,o,N,m,i+1);
|
|
j=g[0];o=g[1]}}h[f]=j}O[l[3]]=p?h:h[0];c++}return[O,o]}function Y(w,X){var N=X;while(w[N]!=0)N++;return[t.LK(w,X,N-X),N-X]}function b(w,X){var N=X;
|
|
while(w[N]!=0)N++;for(var f=X;f<N;f++)if(w[f]>127)throw"e";return t.en(w,X,N-X)}function a(w){$=w;o=1;
|
|
var X=[];while(o<w.length){var N=o,z=X.length,i=b(w,o);o+=i.length+1;var k=A();if(k>2)throw"e";var Q=A(),O=[];
|
|
for(var f=0;f<Q;f++){var c=b(w,o);o+=c.length+1;var B=A(),G=A(),l=A();O.push(k==0?c:[l,G,B,c])}X.push([["enum","strc","mesg"][k],i,O])}return X}return{arh:a,acI:u}}();
|
|
function dM(){}dM.$$=function($,o){var T=new Uint8Array($),s=8,E=t.cX(T,s),Y=0,m=0;s+=4;var e=[];while(s<T.length){var n=t.cX(T,s);
|
|
s+=4;var A=T.slice(s,s+n);if(T[s]==137&&T[s+1]==80){}else A=UZIP.inflateRaw(A);e.push(A);s+=n}var u=dV.arh(e[0]);
|
|
for(var f=0;f<u.length;f++)if(u[f][1]=="Message")Y=f;var b=dV.acI(e[1],0,u,u[Y],0)[0],a={PS:{},MZ:{},a4B:{}},w=b.nodeChanges;
|
|
for(var X=0;X<w.length;X++){var N=w[X],z=N.guid;a.MZ[z.sessionID+","+z.localID]=N}for(var X=0;X<w.length;
|
|
X++){var N=w[X],z=N.parentIndex;if(z){var i=dM.qw(a.MZ,z.guid);if(i.children==null)i.children=[];i.children.push(N)}}var k=w[0],Q=k.children,O=new df,c=[],B=[];
|
|
for(var z=0;z<Q.length;z++){var G=Q[z],l=G.children;if(G.name=="Internal Only Canvas"||l==null)continue;
|
|
var v=new df;for(var f=0;f<l.length;f++){var p=l[f],P=p.transform,h=p.size;if(P.m00==1&&P.m10==0&&P.m01==0&&P.m11==1){var j=new df(P.m02,P.m12,h.x,h.y);
|
|
v=v.BZ(j)}}var C=O.w==0?0:O.w+100,V=v.clone();V.x=0;V.y=C;O=O.BZ(V);c[z]=v;B[z]=C}var d=hw.GE(new df(0,0,O.d,O.w),8192*8192);
|
|
o.d=Math.round(O.d/d);o.w=Math.round(O.w/d);o.buffer=L.G(o.d*o.w*4);for(var z=0;z<Q.length;z++){var G=Q[z],l=G.children;
|
|
if(G.name=="Internal Only Canvas"||l==null)continue;l.sort(dM.V_);var R=new fY(1,0,0,1,-c[z].x,B[z]-c[z].y);
|
|
R.scale(1/d,1/d);for(var f=0;f<l.length;f++){var p=l[f];dM.Tx(p,[],R,b.blobs,o,0,a);m++}}o.Mm(m);o.Nr=!0;
|
|
if(d!=1)alert("File scaled down "+d+"x")};dM.Tx=function($,o,T,s,E,e,n){var A=dM,p=!1,P,h,C,V,d;for(var f=0;
|
|
f<o.length;f++){var u=o[f],Y=u.guidPath.guids[0];if(A.acf(Y,$.guid)){var b={};for(var a in $)b[a]=u[a]!=null?u[a]:$[a];
|
|
$=b}}var w=$.type,X=$.children,N=$.size,z=$.effects,i=E.$f();i.tM($.name);i.bC($.visible);i.opacity=Math.round($.opacity*255);
|
|
var k=A.fo($.transform),Q=k.clone();Q.concat(T);var O=new df(Math.round(Q.Ry),Math.round(Q.Es),Math.round(N.x*Q.jZ()),Math.round(N.y*Q.jZ())),c=$.fillPaints,B=$.inheritFillStyleID;
|
|
if(B){var b=A.qw(n.MZ,B);if(b)c=b.fillPaints}if(c==null)c=[];var c=A.ct(c),G=c[0],l=$.strokePaints,B=$.inheritFillStyleIDForStroke;
|
|
if(B){var b=A.qw(n.MZ,B);if(b)l=b.fillPaints}if(l==null)l=[];var l=A.ct(l),v="BOOLEAN_OPERATION LINE RECTANGLE ROUNDED_RECTANGLE ELLIPSE VECTOR REGULAR_POLYGON".split(" ").indexOf(w)!=-1;
|
|
if(v||w=="FRAME"){P=new M.PZ;h=[];A.YW($,s,P,h);p=L.A.DS(P.g);L.A.hR(P.g,Q);O=L.M.lZ(L.A.hT(P.g));if(n.PS.xb&&G){var j=M.PZ.IN(n.PS.xb.g);
|
|
for(var f=2;f<j.length;f++)if(j[f].m6!=null)j[f].m6=3;P.g=P.g.concat(j.slice(2));h=h.concat(JSON.parse(JSON.stringify(n.PS.qy)))}}if(G&&G.type=="IMAGE"){d=G.imageScaleMode;
|
|
C=A.aw(s,G.image.dataBlob);var m=C.Sg.d/C.Sg.w,R=N.x/N.y;V=Math.abs(m-R)}if(w=="FRAME"){}else if(v&&p&&C&&(d=="FIT"||d=="FILL"&&V<=.05)){var g=s[G.image.dataBlob].bytes,S=E.sP(g,i.getName(),0,0);
|
|
S.Jp=i.Jp;S.opacity=i.opacity;i=S;var F=new df(0,0,N.x,N.y);if(d=="FIT"){var r=C.Sg.d,q=C.Sg.w,W=Math.min(N.x/r,N.y/q),Z=r*W,I=q*W;
|
|
F=new df(F.x+(F.d-Z)/2,F.y+(F.w-I)/2,Z,I)}var _=L.M.Uo(F).I;L.M.t(_,Q,_);i.add.SoLd.Trnf=D.p.vP(_);i.add.SoLd.nonAffineTransform=D.p.vP(_);
|
|
var cN=[],z=$.effects,ce=G.paintFilter;if(z)for(var f=0;f<z.length;f++)if(z[f].type=="FOREGROUND_BLUR"){var gf=z[f],K=iZ.sJ("GsnB",{});
|
|
cN.push(K);K.v.enab.v=gf.visible;K.v.Fltr.v.Rds.v.val=gf.radius/2.4}if(ce&&ce.exposure!=0){var K=iZ.sJ("brit",{});
|
|
cN.push(K);K.v.Fltr.v.Brgh.v=Math.round(ce.exposure*160);K.v.Fltr.v.useLegacy.v=!0}if(cN.length!=0){i.add.SoLd.filterFX=iZ.HA();
|
|
E.lU({id:i.add.SoLd.placed.v,rect:new df,buffer:L.G(1),_:new M.Zb});i.add.SoLd.filterFX.v.filterFXList.v=cN}i.qI(E,!1);
|
|
A.Ud(n,i,E)}else if(v){A.Bb(i,h,P,$,G,Q,O,s,E,n);var cv=A.Jd($,l[0],Q,O,s,E,n);if(cv[0]!="None"){var f0=i.add.vstk;
|
|
f0.strokeEnabled.v=!0;f0.strokeStyleLineWidth.v.val=$.strokeWeight*Q.jZ();f0.strokeStyleLineAlignment.v.strokeStyleLineAlignment=ev.ci.k0[["INSIDE","CENTER","OUTSIDE"].indexOf($.strokeAlign)];
|
|
var i8={SoCo:"SoFi",GdFl:"GrFl"}[cv[0]],b5=["SoFi","GrFl","patternFill"].indexOf(i8),iC=[ev.k9,ev.cw,ev.SZ][b5];
|
|
f0.strokeStyleContent.v={classID:ev.ci.RG[0]};f0.strokeStyleLineDashSet.v=fW.FG($.dashPattern,1/$.strokeWeight);
|
|
var an=f0.strokeStyleContent.v={classID:ev.ci.RG[b5]};for(var f=0;f<iC.length;f++)an[iC[f]]=cv[1][iC[f]];
|
|
if(!f0.fillEnabled.v)A.KM(cv,i)}if(z)for(var f=0;f<z.length;f++){var gf=z[f];if(gf.type!="FOREGROUND_BLUR")continue;
|
|
P.DI=gf.radius/2.4}i.tF(E)}else if(w=="TEXT"){var cO=$.textData,bh=cO.layoutSize,bD=["LEFT","RIGHT","CENTER"].indexOf($.textAlignHorizontal);
|
|
i.add.lnsr="rend";i.add.TySh=g8.rm(0,0);i.add.TySh.QH=new df(0,0,100,100);var fq=Q.clone();i.add.TySh.t=fq;
|
|
var fO=i.add.TySh.h3,g6=cO.characters;if($.textCase=="TITLE"){for(var f=0;f<g6.length;f++)if(f==0||g6[f-1]==" "){var hM=g6.slice(0,f),d3=g6.slice(f+1);
|
|
g6=hM+g6[f].toUpperCase()+d3}}g6=g6.replace(/\u2028/g,"\n");g6=g6.replace(/\u2029/g,"\n");g6=g6.replace(/\r/g,"\n");
|
|
g8.YN(fO,0,g6);var h9=$.textAutoResize,cs=cO.baselines;if(h9=="WIDTH_AND_HEIGHT"){var dv=bD==0?0:bD==1?bh.x:bh.x/2,ec=cs?cs[0].position.y:0;
|
|
fq.translate(dv*Q.jZ(),ec*Q.jZ());g8.I8(fO,0)}else if(h9=="HEIGHT"||h9=="NONE"||h9==null){var ec=cs?cs[0].position.y-$.fontSize*.7:0;
|
|
fq.translate(0,ec*Q.jZ());g8.I8(fO,1);g8.bi(fO,[0,0,Math.round(bh.x),Math.round(1.2*bh.y)])}else throw h9;
|
|
if(g6!=""){var gT=g8.$Q(fO,0,1);A.oD($,Q,N,gT,i,s,E,n);g8.zA(fO,0,g6.length,gT);var iz=cO.characterStyleIDs,gw=cO.styleOverrideTable;
|
|
if(iz){iz=iz.slice(0);for(var f=0;f<iz.length;f++)if(g6[f]=="\n")iz[f]=-f-1;var iI=[0],g2=0,bb=0;for(var f=0;
|
|
f<iz.length;f++){bb++;var ir=iz[f];if(f==0||ir==iz[f-1]){}else{iI.push(bb-1,f);bb=1}}iI.push(bb);for(var f=0;
|
|
f<iI.length;f+=2){var dG=iI[f],gY=iI[f+1];if(g6[dG]=="\n")continue;var ir=iz[dG];if(ir!=0){var e6;for(var fr=0;
|
|
fr<gw.length;fr++)if(gw[fr].styleID==ir)e6=gw[fr];var gT=g8.$Q(fO,dG,dG+1);A.oD(e6,Q,N,gT,i,s,E,n);g8.zA(fO,dG,dG+gY,gT)}}}}}else if(w=="SYMBOL"){}else if(w=="INSTANCE"){var bt=$.symbolData,cx=bt.symbolOverrides,b=A.qw(n.MZ,bt.symbolID);
|
|
if(b)X=b.children;else console.log($.name,"symbol not found",bt.symbolID);o=o.slice(0);for(var f=0;f<cx.length;
|
|
f++)o.push(cx[f])}else console.log(w);if(!1){}else if(X&&!v){E.u.push(E.jK());var ci=!1;if(e==0&&w!="SYMBOL"&&w!="INSTANCE"){i.y2(O);
|
|
var gv=c?c[0]:null;if(gv&&gv.type=="SOLID"){var gu=gv.color;i.add.artb.artboardBackgroundType.v=4;i.add.artb.Clr=A.So(gu)}}else if(G&&P){var ak=E.$f();
|
|
ak.tM("Background");A.Bb(ak,h,P,$,G,Q,O,s,E,n);ak.tF(E);E.u.push(ak);ci=!0}X.sort(A.V_);var hP=n.PS;
|
|
n.PS={};for(var ai=0;ai<X.length;ai++)A.Tx(X[ai],o,Q,s,E,e+1,n);n.PS=hP;i.add.lsct=!1?hd.NH:hd.Qm;i.fh="pass";
|
|
var hK=i.N9();i.Jp=24;i.bC(hK);var h3=e!=0&&c.length!=0&&!$.frameMaskDisabled&&$.containerSupportsFillStrokeAndCorners;
|
|
if(!ci&&h3&&P){i.add.vmsk=P;i.add.vogk=h;i.tF(E)}else A.Ud(n,i,E);E.u.push(i)}else if($.mask){if(P){n.PS.xb=P;
|
|
n.PS.qy=h}}else{var e4=[],fH=1;if(z)for(var co=0;co<z.length;co++){var gf=z[co],aO=gf.color,cC=gf.type,hm=["DROP_SHADOW","INNER_SHADOW"].indexOf(cC);
|
|
if(hm!=-1){var cu=["DrSh","IrSh"][hm],bF=JSON.parse(ev.Qo[ev.order.indexOf(cu)]);e4.push([cu,bF]);bF.enab.v=gf.visible;
|
|
bF.Md.v.BlnM=hI.$j(A.apx(gf.blendMode));bF.Opct.v.val=Math.round(100*aO.a);bF.blur.v.val=Math.round(gf.radius*Q.jZ());
|
|
bF.Clr=A.So(aO);var dv=gf.offset.x,ec=gf.offset.y;bF.uglg.v=!1;bF.lagl.v.val=Math.round(180/Math.PI*Math.atan2(ec,-dv));
|
|
bF.Dstn.v.val=Math.round(Math.sqrt(dv*dv+ec*ec)*Q.jZ())}}if(w=="TEXT"&&c[0]&&c[0].type!="SOLID")fH=0;
|
|
for(var f=fH;f<c.length;f++){var dX=c[f],fk=A.Jd($,dX,Q,O,s,E,n);if(fk[0]=="GdFl")e4.push(["GrFl",fk[1]]);
|
|
else if(fk[0]=="SoCo")e4.push(["SoFi",fk[1]]);else if(fk[0]=="PtFl")e4.push(["patternFill",fk[1]]);else throw fk}if(e4.length!=0){var ix=JSON.parse(ev.default);
|
|
for(var f=0;f<ev.order.length;f++)ix[ev.CP[f]]={t:"VlLs",v:[]};for(var f=0;f<e4.length;f++){var bx=e4[f],cu=ev.CP[ev.order.indexOf(bx[0])];
|
|
ix[cu].v.unshift({t:"Objc",v:bx[1]})}if(X==null)i.add.lmfx=ix}E.u.push(i)}};dM.Bb=function($,o,T,s,E,e,n,A,u,Y){var b=dM;
|
|
$.Jp|=16;$.add.vogk=o;$.add.vmsk=T;var a=$.add.vstk=JSON.parse(JSON.stringify(ev.ci.default)),w=b.Jd(s,E,e,n,A,u,Y);
|
|
if(w[0]=="None"){a.fillEnabled.v=!1;$.add.SoCo=w[1]}else{b.KM(w,$);$.add[w[0]]=w[1]}};dM.KM=function($,o){var T=$[1].Opct.v.val;
|
|
if(T!=100)o.opacity=Math.round(o.opacity/255*(T/100)*255)};dM.V_=function($,o){var T=$.parentIndex.position,s=o.parentIndex.position;
|
|
return T>s?1:-1};dM.ct=function($){for(var f=1;f<$.length;f++){var o=$[f];if(o.type=="IMAGE"&&o.opacity==1){$=$.slice(f);
|
|
break}}for(var f=0;f<$.length;f++){var o=$[f],T=o.imageThumbnail;if(o.type=="IMAGE"&&(o.image==null||o.image.dataBlob==null)&&T&&T.dataBlob)o.image=T;
|
|
if(!o.visible||o.type=="IMAGE"&&o.image.dataBlob==null){$.splice(f,1);f--}}return $};dM.Ud=function($,o,T){if($.PS.xb){o.add.vmsk=$.PS.xb.clone();
|
|
o.add.vogk=JSON.parse(JSON.stringify($.PS.qy));o.tF(T)}};dM.oD=function($,o,T,s,E,e,n,A){var u=$.fontSize,Y=$.lineHeight,b=$.fontName,a=$.textAlignHorizontal,w=$.textTracking,X=$.textCase;
|
|
if(u==null)u=s.oH.FontSize;if(b)g8.PL(s,b.postscript);if(u!=null)s.oH.FontSize=Math.round(u);if(w)s.oH.Tracking=Math.round(w*1e3);
|
|
if(X)s.oH.FontCaps=X=="UPPER"?2:0;if(Y&&(Y.units!="PERCENT"||Y.value!=100)){if(u==null)u=15;var N=Y.value;
|
|
if(Y.units=="PERCENT")N=1*u*N/100;if(Y.units=="RAW")N=1*u*N;s.oH.AutoLeading=!1;s.oH.Leading=Math.round(N)}if(a)s.CL.Justification=["LEFT","RIGHT","CENTER"].indexOf(a);
|
|
var z=$.fillPaints,i=$.inheritFillStyleID;if(i){var k=dM.qw(A.MZ,i);if(k)z=k.fillPaints}if(z&&z[0]){var Q=dM.Jd($,z[0],o,T,e,n,A);
|
|
if(Q[0]=="SoCo"){var O=L.h.Qc(Q[1].Clr.v);s.oH.FillColor={Type:1,Values:[1,O.i/255,O.m/255,O.P/255]};
|
|
dM.KM(Q,E)}}};dM.Jd=function($,o,T,s,E,e,n){var A=dM,u,Y,b=$.size;if(o){var a=o.type,w=["GRADIENT_LINEAR","GRADIENT_RADIAL","GRADIENT_DIAMOND","GRADIENT_ANGULAR"].indexOf(a);
|
|
if(a=="SOLID"){u="SoCo";var X=o.color;Y=JSON.parse(ev.Qo[ev.order.indexOf("SoFi")]);Y.Clr=A.So(X)}else if(w!=-1){var N=JSON.parse(ev.Qo[ev.order.indexOf("GrFl")]),z=N.Grad.v;
|
|
z.Intr.v=0;N.Type.v.GrdT=["Lnr","Rdl","Dmnd","Angl"][w];var i=[],k=o.stops;for(var f=0;f<k.length;f++){var Q=k[f],O=Q.color;
|
|
i.push([Q.position,[O.r,O.g,O.b],O.a])}L.h.Cw(i,z);var c=A.fo(o.transform);c.lY();var B=c.clone();if(b)B.scale(b.x,b.y);
|
|
B.concat(T);var G=new aY(0,.5),l=new aY(1,.5);G=B.bb(G);l=B.bb(l);if(!0){G.x=l.x+.5*(G.x-l.x);G.y=l.y+.5*(G.y-l.y)}L.h.vV(G,l,s,N);
|
|
if(w==3){if(B.Ca*B.Um-B.P*B.Z9<0)N.Rvrs.v=!N.Rvrs.v}u="GdFl";Y=N}else if(a=="IMAGE"){var N=JSON.parse(ev.Qo[ev.order.indexOf("patternFill")]),v=N.phase.v,p=o.image.dataBlob,P=n.a4B[p],S=1;
|
|
if(P==null){var h=A.aw(E,p);P=n.a4B[p]={};P.id=iG.IP()+"-d71c-11e5-b1ae-a548a96e5f9f";P.i2=[new Uint8Array(h.data),h.Sg];
|
|
P.name="someImage";e.Af(P)}N.Algn.v=!0;N.Ptrn.v.Idnt.v=P.id;var j=T.Ry,C=T.Es,V=o.imageScaleMode,c=A.fo(o.transform);
|
|
c.lY();var d=s.d,m=s.w,R=P.i2[1].d,g=P.i2[1].w;if(V=="FILL"){S=Math.max(d/R,m/g);S=Math.round(S*100)/100}else if(V=="FIT"){S=Math.min(d/R,m/g);
|
|
S=Math.round(S*100)/100}else if(V=="STRETCH"){var F=d*c.Ca,r=m*c.Um;S=.5*(F/R+r/g);S=Math.round(S*100)/100;
|
|
j+=(F-d)/2+c.Ry*d;C+=(r-m)/2+c.Es*m}else if(V=="TILE"){S=o.scale;S=Math.round(S*100)/100;j+=(F-d)/2;
|
|
C+=(r-m)/2}var q=S*R,W=S*g;j+=-(q-d)/2;C+=-(W-m)/2;N.Scl.v.val=Math.round(100*S);v.Hrzn.v=Math.round(j);
|
|
v.Vrtc.v=Math.round(C);u="PtFl";Y=N}else throw a;if(Y)Y.Opct={t:"UntF",v:{type:"#Prc",val:Math.round(o.opacity*100)}}}else{u="None";
|
|
Y={classID:"null",Clr:{t:"Objc",v:L.h.wb({i:0,m:0,P:0})}}}return[u,Y]};dM.aw=function($,o){var T=$[o];
|
|
if(T.rslt)return T.rslt;var s=T.bytes.buffer,E=eY.RP(s),e=eY.Q1(E);try{T.rslt=e.yj(s)[0]}catch(aX){T.rslt={data:L.G(4),Sg:new df(0,0,1,1)}}return T.rslt};
|
|
dM.YW=function($,o,T,s){var E=$.type,e=$.size,n=$.cornerRadius,a;if(n==null)n=0;var A=L.qy.Ke(),u=e.x,Y=e.y,b=[n,n,n,n],w=["rectangleTopLeftCornerRadius","rectangleTopRightCornerRadius","rectangleBottomRightCornerRadius","rectangleBottomLeftCornerRadius"];
|
|
for(var f=0;f<4;f++)if($[w[f]]!=null)b[f]=$[w[f]];if(E=="RECTANGLE"||E=="ROUNDED_RECTANGLE"||E=="FRAME"){a=L.A.XG.Rect(0,0,u,Y,b)}else if(E=="ELLIPSE"){var X=$.arcData,N=X?X.startingAngle:0,z=X?X.endingAngle:2*Math.PI,i=X?X.innerRadius:0;
|
|
if(N==0&&z>1.999*Math.PI)a=L.A.XG.Xi(0,0,u,Y,0);else a=L.A.XG.aqM(u/2,Y/2,Y/2,N,z);if(i!=0&&i!=1){var k=M.PZ.IN(a).slice(3);
|
|
k.reverse();for(var f=0;f<k.length;f++){var Q=k[f],O=Q.Wq;Q.Wq=Q.JL;Q.JL=O}var c=new fY;c.translate(-u/2,-Y/2);
|
|
c.scale(i,i);c.translate(u/2,Y/2);L.A.hR(k,c);a=a.concat(k);a[2].length*=2}}else if(E=="LINE"){a=L.A.XG.Rect(0,0,u,Y,0);
|
|
a.pop();a.pop();a[2].length=2}else if(E=="REGULAR_POLYGON"){a=L.A.XG.QQ(.5,.5,.5,Math.PI/2,$.count,0);
|
|
var B=new fY;B.scale(u,Y);L.A.hR(a,B)}else if(E=="BOOLEAN_OPERATION"){a=[{type:6},{type:8,all:0}];var G=$.children,l=["XOR","UNION","SUBTRACT","INTERSECT"].indexOf($.booleanOperation);
|
|
if(l==-1)throw $;if(G==null)G=[];for(var f=0;f<G.length;f++){var v=G[f],p=new M.PZ,P=[],h=dM.YW(v,o,p,P);
|
|
if(p.g==null)continue;L.A.hR(p.g,dM.fo(v.transform));a=a.concat(p.g.slice(2));for(var j=0;j<P.length;
|
|
j++)s.push(P[j])}for(var f=3;f<a.length;f++)if(a[f].m6!=null)a[f].m6=l;A=null}else if(E=="VECTOR"){var V,d;
|
|
if(!0){var m=$.vectorData;V=m.normalizedSize;d=m.vectorNetworkBlob}else{V=e;d=ca[0].commandsBlob;console.log(ca)}var R=o[d].bytes,g=new Uint32Array(R.buffer),S=new Float32Array(R.buffer),F=g[0],r=g[1],q=[];
|
|
for(var f=0;f<F;f++){var W=3+f*3,Z=new aY(S[W+1],S[W+2]);q.push(Z)}var I=[],_=3+F*3;for(var f=0;f<r;
|
|
f++){var cN=_+f*7,ce=g[cN+1],gf=g[cN+4];I.push([ce,gf,S[cN+2],S[cN+3],S[cN+5],S[cN+6]])}var K=-1;for(var f=0;
|
|
f<r;f++){if(K==-1){}else{var cv=-1;for(var j=f;j<r;j++)if(I[j][1]==K)cv=j;for(var j=f;j<r;j++)if(I[j][0]==K)cv=j;
|
|
if(cv!=-1){var f0=0,O=I[cv];I[cv]=I[f];I[f]=O;if(O[0]!=K){f0=O[0];O[0]=O[1];O[1]=f0;f0=O[2];O[2]=O[4];
|
|
O[4]=f0;f0=O[3];O[3]=O[5];O[5]=f0}}}K=I[f][1]}var i8=[],b5=[],iC=-1;K=-1;for(var f=0;f<r;f++){var an=I[f],ce=an[0],gf=an[1],cO=q[ce],bh=q[gf];
|
|
if(K!=ce){b5.push("M");i8.push(cO.x,cO.y);iC=ce}i8.push(cO.x+an[2],cO.y+an[3]);i8.push(bh.x+an[4],bh.y+an[5]);
|
|
b5.push("C");i8.push(bh.x,bh.y);K=gf;if(iC==gf){b5.push("Z");iC=K=-1}}a=L.M.Hz({I:i8,o:b5},!0);if(n!=0){var b=[],bD=a[2].length;
|
|
for(var f=0;f<bD;f++)b.push(n);if(L.A.fZ(a))L.A.Tf(a,2,b)}var fq=new fY;fq.scale(V.x==0?1:e.x/V.x,V.y==0?1:e.y/V.y);
|
|
L.A.hR(a,fq)}T.g=a;if(A)s.push(A)};dM.qw=function($,o){return $[o.sessionID+","+o.localID]};dM.acf=function($,o){return $.sessionID==o.sessionID&&$.localID==o.localID};
|
|
dM.apx=function($){var o={NORMAL:"norm",MULTIPLY:"mul ",SCREEN:"scrn",COLOR_DODGE:"div ",DARKEN:"dark"}[$];
|
|
if(o==null)throw $;return o};dM.So=function($){return{t:"Objc",v:L.h.wb({i:$.r*255,m:$.g*255,P:$.b*255})}};
|
|
dM.fo=function($){var o=[$.m00,$.m10,$.m01,$.m11,$.m02,$.m12];for(var f=0;f<6;f++)if(Math.abs(o[f])<1e-20)o[f]=0;
|
|
return new fY(o[0],o[1],o[2],o[3],o[4],o[5])};function b$(){}b$.$$=function(){var $=t.en;function o(X,N,z,i){var k=i?[]:{};
|
|
while(N<X.length-1&&X[N]!=125){var Q=$(X,N,3),O=$(X,N+3,1),c;N+=4;N++;if(O=="v"){var B=o(X,N,z+1,Q=="ELM"||Q=="TIL");
|
|
c=B.H;N=B.l}else if(O=="i"||O=="f"){var G=N;while(X[G]!=125)G++;var l=$(X,N,G-N);c=O=="i"?parseInt(l,16):parseFloat(l);
|
|
N=G+1}else if(O=="s"){var v=t.mo(X,N),l="";N+=2;for(var f=0;f<v;f++)l+=String.fromCharCode(X[N+2*f+1]);
|
|
c=l;N=N+2*v+1}else if(O=="b"){c=X[N]==49;N=N+2}else throw"e";if(i)k.push([Q,c]);else if(k[Q]==null)k[Q]=c;
|
|
else{if(!(k[Q]instanceof Array))k[Q]=[k[Q]];k[Q].push(c)}}N++;return{H:k,l:N}}function T(X,N){var z=s(X).slice(1),X=N.Clr.v;
|
|
X.Rd.v=z[0]*255;X.Grn.v=z[1]*255;X.Bl.v=z[2]*255}function s(X){return[(X>>>24&255)/255,(X>>>16&255)/255,(X>>>8&255)/255,(X>>>0&255)/255]}function E(X,N){var z=N&4278190080|(N&255)<<16|(N>>>8&255)<<8|N>>>16&255;
|
|
new Uint32Array(X.buffer).fill(z)}function e(X,N){var z=X.TSZ,i=X.WPX,k=X.HPX,Q=X.TIL,O=new df(0,0,i,k),c=L.G(i*k*4),B=0;
|
|
for(var G=0;G<k;G+=z)for(var l=0;l<i;l+=z){var v=new df(l,G,z,z),p,P=Q[B];if(P[0]=="TMC"){p=L.G(v.Y()*4);
|
|
E(p,P[1])}else if(P[0]=="TID"){p=N[P[1]]}L.h9(p,v,c,O);B++}return[c,O]}function n(X,N){X=new Uint8Array(X);
|
|
var z=8,i,k={},m=0;while(z<X.length){var Q=t.s(X,z);z+=4;var O=$(X,z,4);z+=4;if(O=="mkTS"){var c=pako.inflate(X.slice(z,z+Q)),B=o(c,0,0);
|
|
i=B.H}else if(O=="mkBT"){var G=t.s(X,z+4),l=t.s(X,z+8),c=pako.inflate(X.slice(z+76,z+Q));if(l==0)for(var f=0;
|
|
f<c.length;f+=4){var v=c[f],p=c[f+1],P=c[f+2],h=c[f+3];c[f+3]=v;c[f+2]=h;c[f+1]=P;c[f]=p}else{var j=L.G(c.length*4);
|
|
j.fill(255);L.R6(c,j);c=j}k[G]=c}z+=Q+4}var C=i.PDC,V=C?C instanceof Array?C:[C]:[i.MKB],d=new df;for(var f=0;
|
|
f<V.length;f++){var R=V[f];d=d.BZ(new df(0,m,R.WID,R.HIT));m+=R.HIT+100}N.d=d.d;N.w=d.w;N.buffer=L.G(d.Y()*4);
|
|
N.Mm(V.length);m=0;for(var g=0;g<V.length;g++){N.u.push(N.jK());var R=V[g],S=R.WID,F=R.HIT,r=R.BGC,q=(R.LYL?R:i).LYL.LAY,I=3;
|
|
for(var f=0;f<q.length;f++)u(q[f],N,null,k,new fY(1,0,0,1,0,m));var W=N.$f();N.u.push(W);var Z=new df(0,m,S,F);
|
|
m+=F+100;W.y2(Z);if(r>>>24!=0){var _=L.h.wb({i:r>>>16&255,m:r>>>8&255,P:r>>>0&255});W.add.artb.Clr={t:"Objc",v:_};
|
|
I=4}W.add.artb.artboardBackgroundType.v=I;W.tM(R.PGN?R.PGN:"Page "+(g+1));W.add.lsct=hd.Qm;W.fh="pass";
|
|
W.Jp=24}}function A(X,N,z){var i=X[N];return i instanceof Array?i[z]:i}function u(X,N,z,i,k){var Q=N.$f();
|
|
if(X.VIS!=null)Q.bC(X.VIS);if(X.VIF!=null)Q.bC(X.VIF.VIS);if(X.OPA!=null)Q.opacity=Math.round(255*X.OPA/1e3);
|
|
Q.fh=X.CLL||z=="GRP"?"pass":"norm";if(X.BLD!=null){var O=X.BLD,c={"0":"norm","2":"mul ","4":"over","5":"scrn","7":"diss","9":"dark","10":"lite","37":"idiv","30":"norm","39":"lbrn","41":"vLit"}[O+""];
|
|
if(c==null)console.log(X.OBN,O);else Q.fh=c;if(O==30)Q.opacity>>>=1}if(X.CLL){Q.tM(X.LNM);N.u.push(N.jK());
|
|
var B=X.CLL.CEL.ELM;for(var f=B.length-1;f>=0;f--)u(B[f][1],N,B[f][0],i,k);Q.add.lsct=X.DIS?hd.NH:hd.Qm;
|
|
Q.Jp|=24}else if(z=="GRP"){var G=Q.add.lmfx=b(X.EFL),l;N.u.push(N.jK());var B=X.ELM;if(X.MNA){l=B[0][1];
|
|
B=B.slice(1)}Q.tM("Group: "+B.length+" objects");for(var f=B.length-1;f>=0;f--)u(B[f][1],N,B[f][0],i,k);
|
|
if(l){if(X.MRX){var v=e(l,i),p=Q._=new M.Zb;p.rect=v[1].clone();p.rect.x=l.XLC;p.rect.y=l.YLC+k.Es;p.channel=L.G(p.rect.Y());
|
|
L.Ge(v[0],p.channel,0);L.lY(p.channel)}else{Y(Q,l,k);Q.tF(N)}}Q.add.lsct=hd.Qm;Q.Jp|=24}else if(z=="IMG"){Q.tM(X.OBN?X.OBN:"Bitmap");
|
|
var v=e(X,i);Q.rect=v[1].clone();Q.rect.x=X.XLC;Q.rect.y=X.YLC+k.Es;Q.buffer=v[0]}else if(z=="TXT"){var P=X.TFS,h=P.TRN instanceof Array?P.TRN.length:1,d="";
|
|
Q.add.lnsr="rend";Q.add.TySh=g8.rm(0,0);Q.add.TySh.QH=new df(0,0,100,100);var j=new fY(1,0,0,1,X.LFT,X.TOP);
|
|
if(X.MTX){var C=X.MTX,p=new fY(C.M00,C.M01,C.M10,C.M11,C.M20,C.M21);j.concat(p)}j.concat(k);Q.add.TySh.t=j;
|
|
var V=Q.add.TySh.h3;for(var f=0;f<h;f++){var R=A(P,"TRN",f);g8.YN(V,d.length,R);var g=g8.$Q(V,0,1);g8.PL(g,A(P,"FON",f));
|
|
g.oH.FontSize=Math.round(A(P,"PTS",f));var S=A(P,"FCL",f);g.oH.FillColor={Type:1,Values:s(S)};g8.zA(V,d.length,d.length+R.length,g);
|
|
d+=R}Q.tM(d.slice(0,255));var F=X.RIT-X.LFT,r=X.BOT-X.TOP;if(X.IMG){u(X.IMG,N,"IMG",i,k);var q=N.u.pop();
|
|
Q.buffer=q.buffer;Q.rect=q.rect.clone()}g8.I8(V,1);g8.bi(V,[0,0,F,r])}else if(z=="PTH"){Q.tM(X.OBN?X.OBN:"Path");
|
|
Q.Jp|=16;var W=!1;Y(Q,X,k);var Z=Q.add.vmsk,I=Q.add.vstk,_=L.A.hT(Z.g),cN=X.PAT,ce=cN.BPL,gf=cN.FPL,K=cN.TXF;
|
|
if(gf&&gf.FEF)Z.DI+=gf.FEF/2.4;if(ce){var cv=ce.CAT;I.strokeEnabled.v=!0;I.strokeStyleLineWidth.v.val=ce.BDI;
|
|
I.strokeStyleLineAlignment.v.strokeStyleLineAlignment=ev.ci.k0[X.BRP];T(cN.BCL,I.strokeStyleContent.v);
|
|
if(cv!="bc_Basic"&&cv!="bc_Pencil")W=!0}if(gf==null){I.fillEnabled.v=!1;Q.add.SoCo=JSON.parse(ev.Qo[ev.order.indexOf("SoFi")]);
|
|
T(0,Q.add.SoCo)}else if(gf.CAT=="fc_Solid"){Q.add.SoCo=JSON.parse(ev.Qo[ev.order.indexOf("SoFi")]);T(X.PAT.FCL,Q.add.SoCo)}else if(gf.CAT=="fc_Linear"||gf.CAT=="fc_Circular"||gf.CAT=="fc_Elliptical"){var f0=gf.CAT=="fc_Linear",i8=Q.add.GdFl=JSON.parse(ev.Qo[ev.order.indexOf("GrFl")]),b5=i8.Grad.v,iC=[],an=gf.FGL.FGY,cO=an.FG0.FGI,bh=an.FG1.FGI;
|
|
for(var f=0;f<cO.length;f++){var bD=cO[f],fq=s(bD.FGC),fO=1;if(bh.length==cO.length)fO=s(bh[f].FGC)[0];
|
|
iC.push([bD.FGP,fq.slice(1),fO])}i8.Type.v.GrdT=f0?"Lnr":"Rdl";L.h.Cw(iC,b5);b5.Intr.v=0;var g6=X.PRI?X.PRI:X,hM=new aY(g6.PSX,g6.PSY),d3=new aY(g6.PEX,g6.PEY);
|
|
if(gf.CAT=="fc_Elliptical"&&g6.PFX!=null){var h9=new aY(g6.PFX,g6.PFY),cs=aY.Sa(hM,d3),dv=aY.Sa(hM,h9);
|
|
if(dv<cs){var ec=cs;cs=dv;dv=ec}d3=new aY(hM.x+(cs+dv)/2,hM.y);if(cs/dv<.5)W=!0}if(f0){hM.x=(hM.x+d3.x)/2;
|
|
hM.y=(hM.y+d3.y)/2}L.h.vV(hM,d3,_,i8)}else console.log(gf.CAT);var G=Q.add.lmfx=b(X.EFL,Z);if(gf&&gf.FTB!=0){var v=e(K.MSK,i),gT={};
|
|
gT.id=iG.IP()+"-d71c-11e5-b1ae-a548a96e5f9f";gT.name="someImage";gT.i2=v;N.Af(gT);var iz=v[0];for(var f=0;
|
|
f<iz.length;f+=4){iz[f+3]=255-iz[f];iz[f]=iz[f+1]=iz[f+2]=255}var i8=JSON.parse(ev.Qo[ev.order.indexOf("patternFill")]);
|
|
i8.Opct.v.val=Math.round(gf.FTB/10);i8.Algn.v=!0;i8.Ptrn.v.Idnt.v=gT.id;G.patternFillMulti.v.unshift({t:"Objc",v:i8})}if(W&&X.IMG){u(X.IMG,N,"IMG",i,k);
|
|
var gw=N.u[N.u.length-1];gw.opacity=Q.opacity;return}Q.tF(N)}else if(z=="URL")return;else console.log("unknown layer type",z,X);
|
|
N.u.push(Q)}function Y(X,N,z){var i=X.add.vmsk=new M.PZ,k=X.add.vstk=JSON.parse(JSON.stringify(ev.ci.default)),Q=N.PBL.PBP;
|
|
if(!(Q instanceof Array))Q=[Q];for(var O=0;O<Q.length;O++){var c=Q[O].PBT,B=Q[O].ISC?0:3;i.g.push({type:B,length:c.length,m6:0,aq:2,ZO:0,Eg:0});
|
|
for(var f=0;f<c.length;f++){var G=c[f],l=G.XLC,v=G.YLC,p=[l,v,l,v,l,v],P="XPC YPC XLC YLC XSC YSC".split(" ");
|
|
for(var h=0;h<6;h++){var j=P[h],C=G[j];if(C!=null)p[h]=C}i.g.push({type:B+2,W:new aY(l,v),Wq:new aY(p[0],p[1]),JL:new aY(p[4],p[5])})}}L.A.hR(i.g,z);
|
|
X._L()}function b(X,N){var z=JSON.parse(ev.default);for(var f=0;f<ev.order.length;f++)z[ev.CP[f]]={t:"VlLs",v:[]};
|
|
if(X==null)return z;var i=X.EPS;if(!(i instanceof Array))i=[i];for(var f=0;f<i.length;f++){var k=i[f].DCE,Q={};
|
|
for(var O=0;O<k.length;O++)Q[k[O].DCK]=k[O].DCV;if(Q.EffectIsVisible=="false")continue;var c=Q.mkbFile_WriteOnly_TemporaryEffectUiName;
|
|
if(c=="Gaussian Blur..."&&N){N.DI+=parseFloat(Q.gaussian_blur_radius);continue}var B=["Drop Shadow","Inner Bevel","Inner Glow","Glow"].indexOf(c);
|
|
if(B==-1){continue}var G=["DrSh","ebbl","IrGl","OrGl"][B],l=ev.CP[ev.order.indexOf(G)],v=JSON.parse(ev.Qo[ev.order.indexOf(G)]);
|
|
z[l].v.unshift({t:"Objc",v:v});if(G=="DrSh"){v.uglg.v=!1;a(Q,"ShadowDistance",v,"Dstn");a(Q,"ShadowBlur",v,"blur");
|
|
a(Q,"ShadowAngle",v,"lagl",180);v.Opct.v.val=100;w(Q,"ShadowColor",v,"Clr")}if(G=="IrGl"){v.Md.v.BlnM="Nrml";
|
|
var p=Q.MaskSoftness,P=Q.GlowWidth;if(p&&P){p=parseInt(p);P=parseInt(P);v.blur.v.val=P+p;v.Ckmt.v.val=Math.round(100*P/(P+p))}a(Q,"BevelContrast",v,"Opct");
|
|
w(Q,"OuterBevelColor",v,"Clr")}if(G=="OrGl"){v.Md.v.BlnM="Nrml";var p=Q.MaskSoftness,P=Q.GlowWidth;if(p&&P){p=parseInt(p);
|
|
P=parseInt(P);v.blur.v.val=P+p}a(Q,"BevelContrast",v,"Opct");w(Q,"OuterBevelColor",v,"Clr")}if(G=="ebbl"){v.uglg.v=!1;
|
|
a(Q,"BevelWidth",v,"blur");a(Q,"AngleSoftness",v,"Sftn");a(Q,"BevelContrast",v,"srgR");a(Q,"LightAngle",v,"lagl")}}return z}function a(X,N,z,i,k){var Q=X[N];
|
|
if(k==null)k=0;if(Q)z[i].v.val=parseInt(Q)+k}function w(X,N,z,i){var k=X[N];if(k){k=k.slice(1);if(k.length==6)k=k+"ff";
|
|
if(k.length!=8)throw"e";var Q=s(parseInt(k,16)),O=z[i].v;O.Rd.v=Q[0]*255;O.Grn.v=Q[1]*255;O.Bl.v=Q[2]*255;
|
|
z.Opct.v.val=Math.round(z.Opct.v.val/100*Q[3]*100)}}return n}();function f9(){}f9.$$=function(){function $(v,p){var P=!1,h=Date.now(),j=k(v,P),f0=1;
|
|
if(P)console.log("part found",Date.now()-h);h=Date.now();var C=i(j),V=C.Layer,d=C.Header;if(P)console.log(C);
|
|
var m=V[0];m=C.Layer[0];if(P)console.log("document parsed",Date.now()-h);h=Date.now();C.Setup.Gradient=z(C.Setup.Gradient,j);
|
|
if(P)console.log("grads loaded",Date.now()-h);h=Date.now();C.Setup.Pattern=N(C.Setup.Pattern,j);if(P)console.log("patts loaded",Date.now()-h);
|
|
h=Date.now();C.Setup.DocumentData=X(C.Setup.DocumentData,j).pop();if(P)console.log("docdata loaded",Date.now()-h);
|
|
h=Date.now();C.Setup.SVGFilter=X(C.Setup.SVGFilter,j);if(P)console.log("svgfilter loaded",Date.now()-h);
|
|
h=Date.now();var R=d.Cropmarks,g=d.BoundingBox.split(" ").map(parseFloat),S=d.ArtSize?d.ArtSize.split(" ").map(parseFloat):[g[2]-g[0],g[3]-g[1]];
|
|
p.d=Math.round(S[0]);p.w=Math.round(S[1]);var F=[1,0,0,1,-g[0]+(p.d-(g[2]-g[0]))/2,-g[1]+(p.w-(g[3]-g[1]))/2];
|
|
F[3]=-1;F[5]=p.w-F[5];if(R){R=R.split(" ").map(parseFloat);p.d=Math.round(R[2]-R[0]);p.w=Math.round(R[3]-R[1]);
|
|
F=[1,0,0,-1,-R[0],p.w+R[1]]}var r=C.Setup.DocumentData;if(r&&r[0]&&r[0].ArtboardArray){var q=r[0].ArtboardArray;
|
|
if(q.length!=1)console.log(q.length,"artboards");var W=new df;for(var f=0;f<q.length;f++){var Z=q[f],I=Z.PositionPoint1,_=Z.PositionPoint2,cN=I[0],ce=Math.min(I[1],_[1]),gf=_[0],K=Math.max(I[1],_[1]);
|
|
W=W.BZ(new df(cN,ce,gf-cN,K-ce))}p.d=Math.round(W.d);p.w=Math.round(W.w);F[4]=-W.x;F[5]=W.y+p.w}var cv=Math.max(p.d,p.w);
|
|
while(cv*f0<1200)f0++;while(cv*f0>6e3)f0*=.5;p.d=Math.round(p.d*f0);p.w=Math.round(p.w*f0);p.fG=Math.round(72*f0);
|
|
p.buffer=L.G(p.d*p.w*4);for(var f=0;f<6;f++)F[f]*=f0;for(var i8=0;i8<V.length;i8++){var b5=V[i8],iC=a(j,b5);
|
|
o(p,iC,F,C,b5,j)}if(P)console.log("layers created",Date.now()-h);h=Date.now()}function o(v,p,P,h,j,C){var V="",d=0,m="",R=UDOC.G,g=UDOC.getState(),S="norm",F=1,r="SoCo",Z=!1,I=0,cN=null,ce=!1,gf=0,K=null,cv,f0,i8,b5=0,iC=0,an=0;
|
|
g.ctm=P;var q=[0,0,0],W=[0,0,0],_=[],cO=[],bh=[];for(var bD=0;bD<p.length;bD++){var fq=p[bD];if(fq[0]=="%"){if(fq=="%_/ArtDictionary :"&&gf==0)cN=[fq.slice(2)];
|
|
else if(cN!=null){if(fq=="%_"&&gf==0){var fO=c(cN)[0],g6=fO.AI10_ArtUID;if(g6&&!g6.startsWith("XMLID"))v.u[v.u.length-1].tM(G(g6));
|
|
cN=null}else{cN.push(fq.slice(ce?1:2));if(fq=="%_X=")gf++;if(fq=="%_X+")gf--;if(fq=="%_/Binary : /ASCII85Decode ,")ce=!0;
|
|
if(ce&&fq.endsWith("~>"))ce=!1}}else if(K){cv+=(cv==""?"":" ")+fq.slice(2);if(cv.endsWith("X#")){K.push(cv.slice(0,cv.length-3));
|
|
cv=""}}continue}else if(fq=="/Mesh X!"){K=[];cv="";continue}else if(fq=="/End X!"){T(K,g,v);K=null;continue}fq=fq.trim();
|
|
var hM=fq.split(" "),d3=hM[hM.length-1],h9=d3.toLowerCase(),cs=hM.map(parseFloat);if(d3=="m")R.moveTo(g,cs[0],cs[1]);
|
|
else if(d3=="L"||d3=="l")R.lineTo(g,cs[0],cs[1]);else if(d3=="V"||d3=="v"||d3=="Y"||d3=="y")R.quadCurveTo(g,cs[0],cs[1],cs[2],cs[3]);
|
|
else if(d3=="C"||d3=="c")R.curveTo(g,cs[0],cs[1],cs[2],cs[3],cs[4],cs[5]);else if(d3=="H"||d3=="h"){if(d3==h9)R.closePath(g);
|
|
_.push(JSON.parse(JSON.stringify(g.pth)))}else if(d3=="Xy"){S=["norm","mul ","scrn",null,"sLit"][cs[0]];
|
|
F=cs[1];if(S==null){S="norm";console.log("unknown blend mode",cs[0])}}else if(d3=="Xd"){var dv=v.u[v.u.length-1];
|
|
dv.opacity=Math.round(255*F);dv.fh=dv.p3()&&S=="norm"?"pass":S}else if(d3=="AE")b5=cs[0];else if(d3=="Ae")iC=cs[0];
|
|
else if(d3=="Xw")an=cs[0];else if(d3=="*"){var ec=g.pth.crds,gT=g.ctm,iz=ec[0]==ec[2]?0:1;v.yZ.push([iz,ec[iz]]);
|
|
R.newPath(g)}else if(d3=="Xh")f0=cs;else if(d3=="XN")i8=fq.split(" ")[0];else if(d3=="XI"){if(j.Raster==null){console.log("no Raster");
|
|
continue}var gw=j.Raster[d++].Data,iI=gw._begin,g2=gw._end;while(C[iI]!=88)iI++;iI+=3;var bb=C.slice(iI,g2),ir=f0[8],dG=f0[9],gY=ir*dG,e6=L.G(gY*4);
|
|
e6.fill(255);var fr=p[bD-2];fr=fr.slice(fr.indexOf("]")+2).split(" ").map(parseFloat);var bt=fr[7],cx=fr[8],ci=fr[6],gv=Math.ceil(ir*bt*ci/8);
|
|
if(bt==1){if(ci==8)for(var f=0;f<gY;f++)for(var gu=0;gu<3;gu++)e6[4*f+gu]=bb[f];else if(ci==1)for(var ak=0;
|
|
ak<dG;ak++)for(var hP=0;hP<ir;hP++)for(var gu=0;gu<3;gu++)e6[4*(ak*ir+hP)+gu]=255*(bb[ak*gv+(hP>>>3)]>>>7-(hP&7)&1);
|
|
else throw ci}else if(bt==3)for(var f=0;f<gY;f++)for(var gu=0;gu<3;gu++)e6[4*f+gu]=bb[3*f+gu];else if(bt==4||bt==5)for(var f=0;
|
|
f<gY;f++){var ai=u([bb[bt*f+0]/255,bb[bt*f+1]/255,bb[bt*f+2]/255,bb[bt*f+3]/255]);e6[4*f+0]=ai[0]*255;
|
|
e6[4*f+1]=ai[1]*255;e6[4*f+2]=ai[2]*255}else throw i8;if(cx==1){var hK=dG*gv;for(var f=0;f<gY;f++)e6[4*f+3]=bb[hK+f]}var h3=L.Cl(e6,ir,dG)?"JPG":"PNG";
|
|
if(ir*dG<700*700)h3="PNG";var e4=eY.Q1(h3).tC([[e6.buffer]],ir,dG),co=v.sP(new Uint8Array(e4),"<Image>",0,0);
|
|
v.u.push(co);co.fh=S;co.opacity=Math.round(255*F);co.bC(an==0);var P=new fY;P.scale(1,-1);P.concat(A(f0.slice(1)));
|
|
P.concat(A(g.ctm));var aO=co.rect.clone();aO.x=aO.y=0;var hM=L.M.Uo(aO).I;L.M.t(hM,P,hM);co.add.SoLd.Trnf=D.p.vP(hM);
|
|
co.add.SoLd.nonAffineTransform=D.p.vP(hM);co.qI(v,!1)}else if(d3=="Ln"){V=E(fq)}else if(d3=="u"||d3=="q"||d3=="Lb"){cO.push(iC==1);
|
|
bh.push((d3=="Lb"?1-cs[0]:an)==0);if(Z)continue;v.u.push(v.jK())}else if(d3=="U"||d3=="Q"||d3=="LB"){if(cO.length==0||bh.length==0)throw bD;
|
|
var cC=cO.pop(),hm=bh.pop();if(d3=="LB")cC=b5==1;if(Z)continue;var co=v.$f();co.tM((d3=="U"?"<Group>":"<Clip Group>")+m);
|
|
if(d3=="LB")co.tM(V);if(d3=="Q"&&_.length!=0){var cu=_.pop(),bF=UDOC.G.isBox(cu,[0,0,v.d,v.w]);if(!bF)Y(co,cu,v)}co.add.lsct=cC?hd.NH:hd.Qm;
|
|
co.fh="pass";co.Jp=24;co.bC(hm);v.u.push(co)}else if(d3=="Bb"||d3=="Bh"||d3=="BB"){}else if(d3=="Bg"){var fH=h.Setup.Gradient[E(fq)];
|
|
r="GdFl";q=s(fH.tU,fH.a3c)}else if(d3=="Bm"||d3=="Xm"){var dX=q.Type.v.GrdT;if(dX=="Lnr"&&d3!="Xm"||dX=="Rdl"&&d3!="Bm")continue;
|
|
var fk=L.M.L3(g.pth.crds),ix=new aY(0,0),bx=new aY(1,0),ha=new fY;ha.concat(A(cs));ha.concat(A(g.ctm));
|
|
ix=ha.bb(ix);bx=ha.bb(bx);if(dX=="Lnr"){ix.x=(ix.x+bx.x)/2;ix.y=(ix.y+bx.y)/2}L.h.vV(ix,bx,fk,q)}else if(d3=="p"){var ca=E(fq),iX=h.Setup.Pattern[ca];
|
|
if(iX.raw==null){var fk=iX.UK,ir=Math.round(fk[2]-fk[0]),dG=Math.round(fk[3]-fk[1]),fO=new iG;fO.d=ir;
|
|
fO.w=dG;fO.buffer=L.G(ir*dG*4);o(fO,iX.sT,[1,0,0,-1,-iX.UK[0],dG+iX.UK[1]],h,j,C);iX.raw=new Uint8Array(eY.Q1("PSD").tC(fO))}var dp=fq.slice(fq.indexOf(")")+2),dd=dp.slice(0,dp.indexOf("[")-1).split(" ").map(parseFloat),iD=dp.slice(dp.indexOf("[")+1,dp.indexOf("]")).split(" ").map(parseFloat);
|
|
r="patt";q=[ca,dd,iD]}else if(d3=="J"||d3=="j"||d3=="w"||d3=="M"||d3=="d"){for(var f=1;f<hM.length;f++){var iY=hM[f],ho=cs[f-1];
|
|
if(iY=="w")g.lwidth=ho;if(iY=="j")g.ljoin=ho;if(iY=="J")g.lcap=ho;if(iY=="d"){var bN=fq.slice(fq.indexOf("[")+1,fq.indexOf("]")).trim();
|
|
if(bN.length!=0){var it=bN.split(" ").map(parseFloat);g.dash=it}}}}else if(h9=="xa"||h9=="xx"){var j4=[cs[4],cs[5],cs[6]];
|
|
r="SoCo";if(d3=="Xa"||d3=="Xx")q=j4;else W=j4}else if(h9=="xk"){var j4,gy=cs[cs.length-2],hN=cs[cs.length-3];
|
|
if(gy==0)j4=u(cs);else if(gy==1){j4=[cs[4],cs[5],cs[6]];for(var f=0;f<3;f++)j4[f]=hN*1+(1-hN)*j4[f]}else throw fq;
|
|
r="SoCo";if(d3=="Xk")q=j4;else W=j4}else if(h9=="k"||h9=="x"){if(h9=="x"){cs.pop();var b4=1-cs.pop();
|
|
for(var f=0;f<4;f++)cs[f]*=b4}var j4=u(cs);r="SoCo";if(d3==h9)q=j4;else W=j4}else if(h9=="g"){var j4=[cs[0],cs[0],cs[0]];
|
|
r="SoCo";if(d3==h9)q=j4;else W=j4}else if(h9=="n")R.newPath(g);else if(d3=="*u"){Z=!0;I=0}else if(d3=="*U"||h9=="s"||h9=="f"||h9=="b"){if(d3!="*U"&&Z){if(h9=="f"||h9=="b")I|=1;
|
|
if(h9=="s"||h9=="b")I|=2;continue}if(d3==h9)R.closePath(g);if(d3=="*U"){Z=!1}var co;if(r=="patt"){var iX=h.Setup.Pattern[q[0]];
|
|
co=v.sP(iX.raw,"<Pattern>",0,0);var aO=co.rect.clone();aO.x=aO.y=0;var hM=L.M.Uo(aO).I,iD=A(q[2]);iD.Ry=iD.Es=0;
|
|
L.M.t(hM,iD,hM);co.add.SoLd.Trnf=D.p.vP(hM);co.add.SoLd.nonAffineTransform=D.p.vP(hM);co.qI(v,!1)}else{co=v.$f();
|
|
co.Jp|=16;var eN=co.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));eN.strokeEnabled.v=eN.fillEnabled.v=!1;
|
|
if(r=="SoCo"){co.add.SoCo=JSON.parse(ev.Qo[ev.order.indexOf("SoFi")]);var hX=co.add.SoCo.Clr.v;e(hX,q)}if(r=="GdFl")co.add.GdFl=q;
|
|
if(h9=="f"||h9=="b"||d3=="*U"&&I&1)eN.fillEnabled.v=!0;if(h9=="s"||h9=="b"||d3=="*U"&&I&2)cn.qj(eN,g,1,cn.BT(W))}co.tM("<"+(d3=="*U"?"Compound ":"")+"Path>"+m);
|
|
co.fh=S;co.opacity=Math.round(255*F);co.bC(an==0);Y(co,g.pth,v);v.u.push(co);R.newPath(g)}else if(d3==","&&hM[1]=="/StoryIndex"){var fh=h.Setup.TextDocument,dS=null;
|
|
if(!(fh instanceof Array))fh=h.Setup.TextDocument=w(fh,C);var a5=fh[0],aT=fh[2];if(a5._DocumentResources)a5=fh[0]=iB.amB(a5);
|
|
else iB.g8(a5);var co=v.$f();co.add.lnsr="rend";co.add.TySh=g8.rm(0,0);var aZ=c8.aps(a5),eA=co.add.TySh.h3=aZ[cs[0]];
|
|
if(eA==null){console.log("text not found");continue}co.tM(g8.m5(eA).slice(0,50));co.fh=S;co.opacity=Math.round(255*F);
|
|
co.bC(an==0);var b4=a5._1._1[cs[0]]._1._0[0]._0;b4=parseInt(b4.slice(1));var c0=a5._0._8._0,h7=c0[b4]._0;
|
|
if(h7._0)dS=n(h7._0);else if(h7._1)dS=n(h7._1._0);else dS=n(h7._2._2).slice(3);if(dS.length!=2){var fk=L.M.L3(dS);
|
|
dS=[fk.x,fk.y];if(fk.Y()!=0){g8.I8(eA,1);g8.bi(eA,[0,0,Math.round(fk.d),Math.round(fk.w)])}}var al=new fY,aD=new fY(1,0,0,1,dS[0],dS[1]),bz=new fY(1,0,0,1,-aT[0],-aT[1]),i1=A(g.ctm),bZ=new fY;
|
|
if(h7._2&&h7._2._2){var P=n(h7._2._2);bZ=new fY(P[0],P[1],P[2],P[3],P[4],P[5])}al.concat(aD);al.concat(bZ);
|
|
al.concat(bz);al.scale(1,-1);al.concat(i1);co.add.TySh.t=al;v.u.push(co);v.Nr=!0}}}function T(v,p,P){var h=UDOC.G,j=[],C=[],V="/DeviceGray",d,m=[],R=1,ec=0,gT=0,iz=0;
|
|
for(var g=0;g<v.length;g++){var S=v[g];if(S.endsWith(" /CS")){var F=S.indexOf("/NChannel"),r=S.indexOf("/Process");
|
|
if(S.startsWith("/DeviceRGB")){V="/DeviceRGB";d=3}else if(S.startsWith("/DeviceGray")){V="/DeviceGray";
|
|
d=1}else if(S.startsWith("/DeviceCMYK")){V="/DeviceCMYK";d=4;m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]}else if(F!=-1){V="/DeviceCMYK";
|
|
d=parseInt(S.slice(F-2,F-1));var q=1;for(var f=0;f<d;f++){q=S.indexOf("[",q);m[d-1-f]=S.slice(q+1,q+8).split(" ").map(parseFloat);
|
|
q++}}else if(r){V="/DeviceGray";d=1}else throw S}else if(S[0]=="["){var W=S.indexOf("]"),Z=S.slice(1,W).split(" ").map(parseFloat),I=S.slice(W+2),_,cN,ce,gf,K,cv;
|
|
if(I=="/Size"||I=="/P"||I=="/R")continue;if(I=="/S"||I=="/A"){_=Z[0];cN=Z[1];ce=Z[2];gf=Z[3];K=Z[4];
|
|
cv=Z[5]}else if(I=="/N"){var f0=d+(R==1?0:1),i8;_=Z[f0+0];cN=Z[f0+1];ce=Z[f0+2];gf=Z[f0+3];K=Z[f0+5];
|
|
cv=Z[f0+6];if(V=="/DeviceRGB")i8=Z.slice(0,3);else if(V=="/DeviceGray")i8=[Z[0],Z[0],Z[0]];else if(V=="/DeviceCMYK"){var b5=[0,0,0,0];
|
|
for(var f=0;f<d;f++){var iC=Z[f],an=m[f];b5[0]+=iC*an[0];b5[1]+=iC*an[1];b5[2]+=iC*an[2];b5[3]+=iC*an[3]}i8=u(b5)}else throw i8;
|
|
i8.push(Z[d]);C.push([i8,_,cN])}else throw I;j.push([I,K,cv,_,cN,ce,gf])}else if(S=="/E"){var cO=j.slice(0),bh=0;
|
|
for(var f=0;f<j.length;f++){var bD=j[f][0];if(bD=="/N"){bh++;continue}var fq=f,fO=f+1;while(j[fO][0]!="/N"&&fO<j.length)fO++;
|
|
if(bh==0||bh==3){for(var g6=0;g6<fO-fq;g6++)cO[fq+g6]=j[fO-1-g6]}else for(var g6=fq;g6<fO;g6++){var hM=cO[g6],d3=hM[1];
|
|
hM[1]=hM[5];hM[5]=d3;d3=hM[2];hM[2]=hM[6];hM[6]=d3}f=fO-1}j=[];for(var f=0;f<cO.length;f++){var hM=cO[f];
|
|
j.push(hM[1],hM[2],hM[3],hM[4],hM[5],hM[6])}var h9=j.length;h.moveTo(p,j[2],j[3]);for(var f=0;f<h9;f+=6){var ce=j[(f+4)%h9],gf=j[(f+5)%h9],K=j[(f+6)%h9],cv=j[(f+7)%h9],_=j[(f+8)%h9],cN=j[(f+9)%h9];
|
|
h.curveTo(p,ce,gf,K,cv,_,cN)}h.closePath(p);j=[]}else if(S.endsWith("/Version"))R=parseFloat(S[0])}var cs=P.$f();
|
|
cs.Jp|=16;cs.tM("<Mesh>");var dv=cs.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));dv.strokeEnabled.v=!1;
|
|
for(var f=0;f<C.length;f++)for(var g6=f+1;g6<C.length;g6++){var gw=C[f][0],iI=C[g6][0],g2=gw[0]-iI[0],bb=gw[1]-iI[1],ir=gw[2]-iI[2],dG=Math.sqrt(g2*g2+bb*bb+ir*ir);
|
|
if(dG>iz){iz=dG;ec=f;gT=g6}}var gY=C[ec],e6=C[gT],fr=cs.add.GdFl=s(0,[[0,gY[0]],[1,e6[0]]]),bt=A(p.ctm),cx=bt.bb(new aY(gY[1],gY[2])),ci=bt.bb(new aY(e6[1],e6[2])),gv=L.M.L3(p.pth.crds);
|
|
cx.x=(cx.x+ci.x)/2;cx.y=(cx.y+ci.y)/2;L.h.vV(cx,ci,gv,fr);Y(cs,p.pth,P);P.u.push(cs);h.newPath(p)}function s(v,p){var P=JSON.parse(ev.Qo[ev.order.indexOf("GrFl")]),h=P.Grad.v;
|
|
h.Intr.v=0;P.Type.v.GrdT=["Lnr","Rdl"][v];L.h.Cw(p,h);return P}function E(v){return v.slice(v.indexOf("(")+1,v.indexOf(")"))}function e(v,p){v.Rd.v=p[0]*255;
|
|
v.Grn.v=p[1]*255;v.Bl.v=p[2]*255}function n(v){var p=[];for(var f=0;f<v.length;f++)p[f]=parseFloat(v[f].slice(1));
|
|
return p}function A(v){return new fY(v[0],v[1],v[2],v[3],v[4],v[5])}function u(v){return UDOC.C.cmykToRgb(v)}function Y(v,p,P){v.add.vmsk=new M.PZ;
|
|
if(p.crds.length!=0)v.add.vmsk.g=b(p);v._L();v.tF(P)}function b(v){var p={I:v.crds,o:v.cmds},P=L.M.Hz(p,!1);
|
|
return P}function a(v,p){var P=[p._begin],h=p._end-p._begin,j=h,C=p.Raster,g=0;if(C){for(var f=0;f<C.length;
|
|
f++){var V=C[f].Data,d=V._begin+32,m=V._end;if(d>m)d=m;P.push(d,m);j-=m-d}}P.push(p._end);var R=new Uint8Array(j);
|
|
for(var f=0;f<P.length;f+=2){var d=P[f],S=P[f+1]-d;R.set(new Uint8Array(v.buffer,d,S),g);g+=S}return t.LK(R).split(/\r\n|\r|\n/)}function w(v,p){if(v==null)return[];
|
|
var P=a(p,v),h="",j="",C=0,V;for(var f=2;f<P.length;f++){var d=P[f];if(d[0]=="%"){if(C==0)h+=d.slice(1);
|
|
else j+=d.slice(1)}else if(d==";")C++;else if(d.endsWith("/RulerOrigin ,"))V=d.split(" ").slice(0,2).map(parseFloat)}var m=[h,j],R=[];
|
|
for(var f=0;f<2;f++){var g=m[f],S=new Uint8Array(g.length);t.dt(S,0,g);var F=FromPS.F.ASCII85Decode({buff:S,off:0}),r=cK.$$(F);
|
|
R.push(r)}R.push(V);return R}function X(v,p){if(v==null)return[];var P=a(p,v);P=P.slice(1);for(var f=0;
|
|
f<P.length;f++){var h=P[f];if(h[0]=="%")P[f]=h.slice(h[1]=="_"?2:1)}var j=c(P);return j}function N(v,p){var P={};
|
|
if(v==null)return P;for(var f=0;f<v.length;f++){var h=a(p,v[f]),j=h[1],C=E(j),V=j.slice(j.indexOf(")")+2).split(" ").map(parseFloat),d=[];
|
|
for(var m=2;m<h.length;m++)d.push(h[m].slice(2));P[C]={UK:V,sT:d}}return P}function z(v,p){var P={},h,j;
|
|
if(v==null)return P;var C=[];for(var f=0;f<v.length;f++){var V=a(p,v[f]);for(var d=0;d<V.length;d++){var m=V[d];
|
|
if(m[0]=="("){var R=m.split(")");h=R[0].slice(1);var g=R[1].split(" ");j=parseInt(g[1])}else if(m.endsWith("%_BS")){var R=m.split(" "),q,W=1;
|
|
R.pop();R=R.map(parseFloat);var S=R.pop(),F=R.pop(),r=R.pop();if(r==0)q=[R[0],R[0],R[0]];else if(r==2||r==4)q=[R[4],R[5],R[6]];
|
|
else if(r==1||r==3)q=u(R);else if(r==6){if(R.length==3)q=[R[0],R[0],R[0]];else q=u(R);W=R.pop()}else{throw r}C.push([S/100,q,W,F/100])}else if(m=="BD"){for(var Z=0;
|
|
Z<C.length-1;Z++)C[Z][3]=C[Z+1][3];C.sort(function(I,_){return I[0]-_[0]});P[h]={tU:j,a3c:C};C=[]}}}return P}function i(v){var p="Gradient PluginObject Symbol Pattern PatternLayer BrushPattern Encoding Raster Layer Resource Place".split(" "),P=Date.now(),h=0,j=[],C={Header:{}},V=[C],d=v.length;
|
|
while(h<d){var m=h;while(m!=d&&v[m]!=13&&v[m]!=10){m++}if(v[h]==37&&v[h+1]==95&&v[h+2]==37)h+=2;if(v[h]==37&&v[h+1]!=95&&v[h+1]!=43){var R=t.en(v,h,m-h);
|
|
if(R=="%%EndComments"||R=="%EndComments"||R=="%AI5_Begin_NonPrinting"||R=="%AI5_End_NonPrinting--"||R.startsWith("%AI17_Begin_Content_if_version_gt")||R=="%AI17_End_Versioned_Content"){}else{var g=R.indexOf("Begin"),S=R.indexOf("End");
|
|
if(g!=-1){var F=R.slice(g+5).split(":")[0],r={_begin:h,_end:h},q=V[V.length-1];if(p.indexOf(F)!=-1){if(q[F]==null)q[F]=[];
|
|
q[F].push(r)}else{if(q[F]!=null){console.log(V);throw R}q[F]=r}V.push(r);if(R.startsWith("%%BeginData"))m=t.fe(v,"%%EndData",h);
|
|
else if(R=="%AI9_BeginDocumentData")m=t.fe(v,"%AI9_EndDocumentData",m);else if(R=="%AI11_BeginTextDocument")m=t.fe(v,"%AI11_EndTextDocument",m)}else if(S!=-1){V.pop()._end=h}else if(V.length==1&&(R.startsWith("%AI")||R.startsWith("%%")&&R.indexOf(" ")!=-1)){var W=1;
|
|
if(R.startsWith("%AI"))while(R[W]!="_"&&W<R.length)W++;var Z=R.indexOf(":");if(Z==-1)Z=R.indexOf(" ");
|
|
var I=R.slice(W+1,Z),_=R.slice(Z+1).trim();C.Header[I]=_}}}h=m;if(v[h]==13)h++;if(v[h]==10)h++}return C}function k(v,p){var P=Date.now(),h=new Uint8Array(v),j,C=h[2]==68;
|
|
if(p)console.log(!C?"EPS":"PDF");if(C){var V=t.fe(h,"/AIMetaData "),gf=!1,K=!1;while(h[V]!=60)V--;V--;
|
|
var d=t.fe(h,">>",V),m=t.en(h,V+2,d-V-2).split("/"),R=[];for(var f=0;f<m.length;f++){var g=m[f],S=g.startsWith("AIPrivateData"),F=g.startsWith("AIPDFPrivateData");
|
|
if(!S&&!F)continue;var r=g.trim().split(/\s+/),q=parseInt(r[1]),W=parseInt(r[0].slice(S?13:16));R.push([W,q])}if(p)console.log("--- map made",Date.now()-P);
|
|
P=Date.now();var Z=FromPDF.indexOfXref(h),I=[],_=FromPDF.readXrefTrail(h,Z,I),cN={buff:h,off:0},ce=new Array(R.length),cv=V;
|
|
for(var f=0;f<R.length;f++){var W=R[f][0],q=R[f][1],f0=FromPDF.getIndirect(q,0,cN,I),i8=f0.buff,b5=f0["/Filter"],iC=0;
|
|
if(b5!=null&&typeof b5=="string")b5=[b5];var an=t.en(i8,iC,iC+20);if(an=="%AI12_CompressedData"){iC+=20;
|
|
gf=!0}else if(an=="%AI24_ZStandard_Data"){iC+=20;K=!0}i8=new Uint8Array(i8.buffer,i8.byteOffset+iC,i8.length-iC);
|
|
if(b5)for(var cO=0;cO<b5.length;cO++){var bh=b5[cO];if(bh=="/FlateDecode")i8=pako.inflate(i8);else if(bh=="/ASCIIHexDecode")i8=FromPS.F.HexDecode({buff:i8,off:0});
|
|
else throw bh}ce[W-1]=i8}if(p)console.log("--- arrays found",Date.now()-P);P=Date.now();var bD=t.en(ce[0],0,13);
|
|
if(bD=="%%BoundingBox"||bD=="%AI7_Thumbnai")ce=ce.slice(1);if(bD=="%AI24_ZStanda"){ce[0]=ce[0].slice(20);
|
|
K=!0}j=Q(ce);if(p)console.log("--- concatenated",Date.now()-P);P=Date.now();if(gf)j=UZIP.inflate(j);
|
|
if(K)j=eY.FC.P1(j);if(p)console.log("--- inflated",Date.now()-P);P=Date.now()}else{var fq=t.LK(h);if(fq.indexOf("%AI5_BeginLayer")!=-1){j=h}else{var fO=fq.split(/[\n\r]+/),g6=[],hM=!1;
|
|
for(var d3=0;d3<fO.length;d3++){var h9=fO[d3].trim();if(h9=="%AI9_PrivateDataEnd"){hM=!1;break}else if(h9=="%AI9_DataStream"||h9=="%AI24_DataStream"){hM=!0}else if(hM)g6.push(h9.slice(1))}var cs=t.Te(g6.join("")),dv=FromPS.F.ASCII85Decode({buff:cs,off:0});
|
|
if(dv[0]==120&&dv[1]==156)j=UZIP.inflate(dv);else j=eY.FC.P1(dv)}}return j}function Q(v){var p=0,h=0;
|
|
for(var f=0;f<v.length;f++)p+=v[f].length;var P=new Uint8Array(p);for(var f=0;f<v.length;f++){var j=v[f];
|
|
P.set(j,h);h+=j.length}return P}function O(v,p){for(var f=0;f<p.length;f++)if(v.startsWith(p[f]))return!0;
|
|
return!1}function c(v){var p=[],P=[],top=-1,h,j=null,C=null,V=0;for(var d=0;d<v.length;d++){var m=v[d];
|
|
if(h){m=h+m;h=null}var R="\t".repeat(p.length);if(j!=null){j.push(m);if(m.endsWith("~>")){var g=t.Te(j.join("")),S=FromPS.F.ASCII85Decode({off:0,buff:g});
|
|
p.push(S);P.push(!1);top++;j=null}}else if(C!=null){if(m=="X+"){if(V==1){p.push(C);P.push(!1);top++;
|
|
C=null}else V--}else if(m=="X=")V++;else C.push(m)}else if(m=="/Binary : /ASCII85Decode ,"){j=[]}else if(m=="X="){C=[];
|
|
V++}else if(m=="/SVGFilter :"||m=="; /Def ;")continue;else if(m.startsWith("/")&&m[1].toUpperCase()!=m[1].toLowerCase()){if(m.startsWith("/XMLUID")){var F=B(m);
|
|
if(P[top])throw"e";p[top][F[4]]=F[2]}if(m.startsWith("/GObjRef")){var F=B(m);if(!P[top])throw"e";p[top].push(F[2])}else{var r=m.startsWith("/Array")||m.startsWith("/Document");
|
|
p.push(r?[]:{});P.push(r);top++}}else if(m.endsWith(",")){var q,W,F=B(m);F.pop();if(F[0]==";"||F.length==1){W=p.pop();
|
|
P.pop();top--;q=P[top]?null:F.pop()}else{q=P[top]?null:F.pop();var Z=F.pop(),I=F[0];if(Z=="/Int")W=parseInt(I);
|
|
else if(Z=="/Real")W=parseFloat(I);else if(Z=="/Bool")W=I=="1";else if(Z=="/String"||Z=="/UnicodeString")W=F.join("");
|
|
else if(Z=="/RealMatrix"||Z=="/RealPoint"||Z=="/RealPointRelToROrigin")W=F.map(parseFloat);else throw Z}if(P[top])p[top].push(W);
|
|
else p[top][q]=W}else if(m==";"){}else if(m==""){}else{if(m.indexOf("/RealPoint")!=-1){}else if(m.startsWith("(")&&m.endsWith(")")){}else if(m.endsWith("/RealMatrix")){}else throw m;
|
|
h=h?h+m:m}}return p}function B(v){var p=0,P=[];while(p<v.length){var h=v[p],j=h.charCodeAt(0);if(h==" ")p++;
|
|
else if(h==","||h==";"||h==":"){P.push(h);p++}else if(h=="("){var C=p+1;while(!(v[C]==")"&&v[C-1]!="\\"))C++;
|
|
var V=v.slice(p+1,C);P.push(V);p=C+1}else if(h=="/"||h=="-"||48<=j&&j<=57){var C=p;while(v[C]!=" ")C++;
|
|
P.push(v.slice(p,C));p=C}else throw h}return P}function G(v){var p="";for(var f=0;f<v.length;f++){if(v[f]=="_"&&v[f+1]=="x"){var J=parseInt(v.slice(f+2,f+4),16);
|
|
p+=String.fromCharCode(J);f+=4}else if(v[f]=="_")p+=" ";else p+=v[f]}return p}function l(v){var p="xmlnode-nodename",P="xmlnode-nodevalue",h="xmlnode-attributes",j="xmlnode-children",C=v[p],V=v[h],d=v[j],m={_nam:C};
|
|
for(var R in V){var g=V[R];if(Object.keys(g[h]).length!=0||g[j].length!=0)throw"e";if(g[p]!=R)throw"e";
|
|
m[R]=g[P]}if(d.length==0)return m;var S=m.cln=[];for(var f=0;f<d.length;f++)S.push(l(d[f]));return m}return $}();
|
|
function eY(){}eY.Ap={ajp:["PNG","JPG","SVG","GIF","PDF"],abC:"WEBP BMP TIFF ICO DDS TGA PPM RAW EMF DXF".split(" ")};
|
|
eY.k8=function($,o){var T=$.memory.buffer.byteLength;if(T<o)$.memory.grow((o-T>>>16)+1)};eY.ME={a32:function($,o){fetch($).then(function(T){return T.arrayBuffer()}).then(function(T){var s=new Uint8Array(T),E=0,u="";
|
|
if(o){E=s.length;var e={level:9},n=pako.deflateRaw(s,e),A=UZIP.deflateRaw(s,e);console.log(E,n.length,A.length);
|
|
s=n.length<A.length?n:A}for(var f=0;f<s.length;f++)u+=String.fromCharCode(s[f]);var Y=btoa(u);console.log(JSON.stringify([E,Y]))})},get:function($,o){var T=BINDB[$],s=Date.now(),E=atob(T[1]),e=E.length,n=new Uint8Array(e);
|
|
for(var f=0;f<e;f++)n[f]=E.charCodeAt(f);if(T[0]!=0){var A=new Uint8Array(T[0]);UZIP.inflateRaw(n,A);
|
|
n=A}if(o){var u=eY.RP(n.buffer);n=eY.Q1(u).yj(n.buffer)}return n}};eY.RP=function($){if(!($ instanceof ArrayBuffer)){console.log("Input is not ArrayBuffer")}var o=new Uint8Array($),T=eY.KK,s,E=0,e=o.length-1;
|
|
if(T(o,[239,187,191]))E=3;while(E<o.length&&(o[E]==9||o[E]==10||o[E]==13||o[E]==32))E++;while(e!=0&&(o[e]==9||o[e]==10||o[e]==13||o[e]==32))e--;
|
|
if(T(o,[56,66,80,83]))s="psd";if(T(o,[102,116,121,112,109,105,102,49],4)||T(o,[102,116,121,112,97,118,105,102],4))s="avif";
|
|
if(T(o,[102,116,121,112,105,115,111,109],4))s="mp4";if(T(o,[0,255,75,65]))s="afphoto";if(T(o,[120]))s="pxd";
|
|
if(T(o,[80,68,78,51]))s="pdn";if(T(o,[103,105,109,112,32,120,99,102,32]))s="xcf";if(T(o,[102,105,103,45,107,105,119,105]))s="fig";
|
|
if(T(o,[137,80,78,71,13,10,26,10])){s="png";var n=8;while(n<o.length){var A=t.s(o,n);n+=4;var u=t.en(o,n,4);
|
|
n+=4;if(u=="mkTS")s="fpng";n+=A+4}}if(T(o,[87,76]))s="cdr";if(T(o,[82,73,70,70])){var Y=hh.$$(o),b=Y.RG;
|
|
if(b=="WEBP")s="webp";else if(b.slice(0,3)=="CDR")s="cdr";else s=b}if(T(o,[70,79,82,77])||T(o,[76,73,83,84])||T(o,[67,65,84,32])){var Y=h5.$$(o),b=Y.RG;
|
|
if(b=="ILBM")s="ilbm";else s=b}if(T(o,[255,216,255]))s="jpg";if(T(o,[0,0,0,12,106,80,32,32]))s="jpg";
|
|
if(T(o,[48,0,1,0],4))s="jpg";if(T(o,[71,73,70,56]))s="gif";if(T(o,[0,0,0,2,121,102,113,76]))s="msh";
|
|
if(T(o,[0,0,0,3,121,102,113,76]))s="msh";if(T(o,[0,0,0,16]))s="atn";if(T(o,[0,1]))s="aco";if(T(o,[0,2]))s="aco";
|
|
if([0,1].indexOf(o[1])!=-1&&[1,2,3,9,10,11].indexOf(o[2])!=-1&&[0,16,24,32].indexOf(o[7])!=-1)s="tga";
|
|
if(T(o,[0,2,56,66,83,76]))s="asl";if(T(o,[0,1,0,-1,0,2,0]))s="abr";if(T(o,[0,2,0,-1,0,2,0]))s="abr";
|
|
if(T(o,[0,6,0,1]))s="abr";if(T(o,[0,6,0,2]))s="abr";if(T(o,[0,7,0,2]))s="abr";if(T(o,[0,9,0,2]))s="abr";
|
|
if(T(o,[0,10,0,2]))s="abr";if(T(o,[56,66,70,83]))s="shc";if(T(o,[56,66,80,84]))s="pat";if(T(o,[56,66,71,82]))s="grd";
|
|
if(T(o,[56,66,84,80]))s="tpl";if(T(o,[0,4,0,5]))s="acv";if(T(o,[99,117,115,104]))s="csh";if(T(o,[0,1,0,0,0]))s="otf";
|
|
if(T(o,[79,84,84,79]))s="otf";if(T(o,[116,116,99,102]))s="otf";if(T(o,[68,68,83,32]))s="dds";if(T(o,[80,86,82,3]))s="pvr";
|
|
if(T(o,[86,84,70,0]))s="vtf";if(T(o,[83,73,77,80]))s="fits";if(T(o,[0,0,1,0]))s="ico";if(T(o,[66,77]))s="bmp";
|
|
if(T(o,[40,0,0,0]))s="bmp";if(T(o,[80,49]))s="ppm";if(T(o,[80,50]))s="ppm";if(T(o,[80,51]))s="ppm";if(T(o,[80,52]))s="ppm";
|
|
if(T(o,[80,53]))s="ppm";if(T(o,[80,54]))s="ppm";if(T(o,[73,73,42,0]))s="tiff";if(T(o,[77,77,0,42]))s="tiff";
|
|
if(T(o,[70,85,74,73,70,73,76,77]))s="raf";if(T(o,[112]))s="lif";if(T(o,[73,73,26,0]))s="ciff";if(T(o,[83,81,76,105]))s="sketch";
|
|
if(T(o,[80,75])){var a=UZIP.parse($,!0);if(a["document.json"])s="sketch";else if(a.manifest)s="xd";else s="zip"}if(T(o,[123]))s="json";
|
|
if(t.s(o,0)==o.length)s="icc";if(T(o,[35]))s="icc";if(T(o,[84,73,84,76],E))s="icc";if(T(o,[76,85,84,95],E))s="icc";
|
|
if(T(o,[60,63,120,109],E)){if(t.fe(o,"<look>")!=-1)s="icc";else s="svg"}if(T(o,[60,115,118,103],E))s="svg";
|
|
if(T(o,[60,33,100,111],E)||T(o,[60,33,68,79],E)){if(t.fe(o,"<svg")!=-1)s="svg";else s="html"}if(T(o,[37,33])||T(o,[197,208,211,198])){if(t.fe(o,"%AI9_PrivateDataBegin")!=-1||t.fe(o,"%AI5_BeginLayer")!=-1)s="ai";
|
|
else s="eps"}if(T(o,[37,80,68,70],E)){if(t.fe(o,"/AIMetaData ")!=-1)s="ai";else s="pdf"}else if(T(o,[10,69,79,70],e-3))s="dxf";
|
|
if(T(o,[215,205,198,154]))s="wmf";if(T(o,[1,0,0,0]))s="emf";if(T(o,[118,47,49,1]))s="exr";if(T(o,[10,10,10,10]))s="jsx";
|
|
if(T(o,[77,90]))s="exe";if(s==null&&L.raw.uA(o.length)!=null)return"tiff";return s};eY.KK=function($,o,T){if(T==null)T=0;
|
|
for(var f=0;f<o.length;f++)if(o[f]!=-1&&$[T+f]!=o[f])return!1;return!0};eY.Q1=function($){var o={BMP:eY.ahp,CDR:eY.eo,DDS:eY.Uv,EMF:eY.ei,DXF:eY.LT,EPS:eY.sW,FIG:eY.dz,FPNG:eY.Io,GIF:eY._u,ICO:eY.gd,ILBM:eY.zM,FITS:eY.v8,EXR:eY.In,JPG:eY.PH,LIF:eY.X9,PDF:eY.W4,PDN:eY.GD,PNG:eY.Fo,PPM:eY.Yr,PSD:eY.Oi,PXD:eY.Ju,RAF:eY.yH,RAW:eY.NG,SKETCH:eY.EA,SVG:eY.ax,TGA:eY.vF,AVIF:eY.amv,TIFF:eY.zn,VTF:eY.P6,WEBP:eY.B5,WMF:eY.ju,XCF:eY.QS,XD:eY.hJ,EXE:eY.Uk,AI:eY.FC,AFPHOTO:eY.Xd,MP4:eY.a2V};
|
|
return o[$.toUpperCase()]};eY.i1=function(f){var $=eY.Ap.ajp,o=eY.Ap.abC,T,s=[];if(f==null)T=$.concat(o);
|
|
else T=f==0?$:o;for(var f=0;f<T.length;f++)if(eY.Q1(T[f]).tC)s.push(T[f]);return s};eY.ari=function(){var $;
|
|
function o(s){var E=s.target,e=E.width,n=E.height,A=H.z("canvas");A.width=e;A.height=n;var u=A.getContext("2d");
|
|
u.drawImage(E,0,0);$({Sg:new df(0,0,e,n),data:u.getImageData(0,0,e,n).data.buffer})}function T(s,E,e){$=e;
|
|
var n=document.createElement("img");n.onload=o;n.src="data:"+E+";base64,"+eY.Qj(s)}return T}();eY.OQ=function($,o,T,s,E){var e=eY.rv($,o,T,s,E),n=eY.Nb(e);
|
|
return n.buffer};eY.Nb=function($){var o=atob($.split(",").pop()),T=new Uint8Array(o.length);for(var f=0;
|
|
f<o.length;f++)T[f]=o.charCodeAt(f);return T};eY.rv=function($,o,T,s,E,e){if(!($ instanceof ArrayBuffer))throw"e";
|
|
if(s==null)s="png";if(s=="png"&&e==!0){var n=eY.Q1("PNG").tC([[$,0]],o,T);return"data:image/png;base64,"+eY.Qj(n)}var A=eY.Vc;
|
|
if(A==null)A=eY.Vc=H.z("canvas");if(A.width!=o||A.height!=T){A.width=o;A.height=T}var u=A.getContext("2d"),Y=new ImageData(new Uint8ClampedArray($,0,o*T*4),o,T);
|
|
u.putImageData(Y,0,0);return A.toDataURL("image/"+s,E)};eY.af0=function($,o,T,s,E){if(E==null)E=0;var e="<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>",n="<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"128\" height=\"128\"> "+e+"<g transform=\"translate(64 64) scale("+.25*Math.round(H.K())+")\">";
|
|
if($==1)n+="<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>";
|
|
n+="<g filter=\"url(#sofGlow)\"><image transform=\"rotate("+E+")\" xlink:href=\""+o+"\" x=\""+80*T+"\" y=\""+80*s+"\" height=\"80\" width=\"80\"/></g>"+"</g>"+"</svg>";
|
|
var A=new Uint8Array(n.length);t.Jq(n,A,0);var u="data:image/svg+xml;base64,"+eY.Qj(A.buffer);return{tY:u,uL:new df(0,0,128,128),wS:new aY(64,64)}};
|
|
eY.Qj=function($){var o=new Uint8Array($),T="";for(var f=0;f<o.length;f++)T+=String.fromCharCode(o[f]);
|
|
return btoa(T)};eY.ala=function($){var o=atob($),T=o.length,s=new Uint8Array(T);for(var f=0;f<T;f++)s[f]=o.charCodeAt(f);
|
|
return s.buffer};eY.jc=function($){var o=[],T=[];for(var f=0;f<$.u.length;f++){var s=$.u[f];if(s.getName().slice(0,3)=="_a_"){o.push(f);
|
|
T.push(s.N9())}}return[o,T]};eY.GU=function($,o,T,s,E,e){if(T==null)T=$.d;if(s==null)s=$.w;var n=new df(0,0,$.d,$.w),A=new fY(T/($.d+.001),0,0,s/($.w+.001),0,0),Y;
|
|
o=o.toUpperCase();var u=eY.Q1(o);if(u.or){$.aw();Y=u.tC($,T,s,E,e)}else{var b=eY.jc($),a=b[0],w=b[1],X=null;
|
|
if($.iy.length!=0){X=[];for(var f=0;f<$.iy.length;f++)X.push($.iy[f].$a(n))}if(a.length<2){var N;if(T==$.d&&s==$.w)N=$.aw().buffer;
|
|
else{var z=D.p.qh([$.aw(),n],A);N=z.buffer.buffer;if(X){var i=L.G(n.Y()*4);for(var f=0;f<X.length;f++){L.aM(X[f],i,3);
|
|
var z=D.p.qh([i,n],A),k=X[f]=L.G(z.rect.Y());L.Ge(z.buffer,k,3)}}}Y=u.tC([[N,0,$.fG,$.sx,X]],T,s,E)}else{var Q=[];
|
|
for(var f=0;f<a.length;f++){var O=a[f],N;for(var c=0;c<a.length;c++)$.u[a[c]].bC(a[c]==O);$.eA();$.T();
|
|
$.ir();if(T==$.d&&s==$.w)N=$.aw().buffer.slice(0);else{var z=D.p.qh([$.aw(),n],A);N=z.buffer.buffer}var B=$.u[O].getName().split(",");
|
|
Q.push([N,B[1]?parseInt(B[1]):100,$.fG,$.sx,X])}for(var f=0;f<a.length;f++)$.u[a[f]].bC(w[f]);$.T();
|
|
$.ir();if(E){var G=E.length,l=E[G-2],v=E[G-1],p=E[G-4]/100;if(p!=1)for(var f=0;f<Q.length;f++)Q[f][1]=Math.round((Q[f][1]==0?16:Q[f][1])/p);
|
|
if(l)Q.reverse();if(v){var P=Q.slice(1,Q.length-1);P.reverse();Q=Q.concat(P)}}Y=u.tC(Q,T,s,E)}}return Y};
|
|
eY.sO=function($,o){var T=o[0].y0&&o[0].y0.startsWith("_a_"),s,E=new iG($+".psd"),e=new df(0,0,1,1);
|
|
if(T){s=E.$f();s.add.lsct=hd.NH;s.tM($);s.fh="pass";s.Jp=24;s.bC(!0);E.u.push(E.jK())}for(var f=0;f<o.length;
|
|
f++){var n=o[f];e=e.BZ(n.Sg);var A=E.$f();A.bC(f==0);A.tM(o.length==1?"Background":"Layer "+f);if(f==0&&n.fG)E.fG=n.fG;
|
|
if(f==0&&n.sx)E.sx=n.sx;if(n.y0)A.tM(n.y0);if(n.Kd)for(var f=0;f<n.Kd.length;f++){var u=n.Kd[f],Y=iG.om(u[0]);
|
|
Y.add.vmsk.g=u[1];L.A.hR(u[1],new fY(e.d,0,0,e.w,0,0));E.w5.push(Y)}A.rect=n.Sg.clone();A.buffer=new Uint8Array(n.data);
|
|
L.oE(A);E.u.push(A)}if(T)E.u.push(s);if(o[0].iy){for(var f=0;f<o[0].iy.length;f++){var b=new M.Zb;E.iy.push(b);
|
|
b.rect=o[0].Sg.clone();b.channel=o[0].iy[f]}}E.D=[T?E.u.length-1:0];E.d=e.d;E.w=e.w;E.buffer=L.G(e.Y()*4);
|
|
E.T();return E};eY.Fo={};eY.Fo.tC=function($,o,T,s){if(s==null)s=[100,!1,0,0,0];var E={sRGB:1,loop:s[3]};
|
|
if($[0][2]!=null){var e=Math.round($[0][2]*(1e4/254));E.pHYs=[e,e,1]}var n=s[0],A=n==100?0:Math.max(2,Math.floor(n*5));
|
|
if(A==5)A=4;var u=[],Y=[];for(var f=0;f<$.length;f++){u.push($[f][0]);Y.push($[f][1])}var b=UPNG.encode(u,o,T,A,Y,E,s[1]);
|
|
return b};eY.Fo.afg=function($,o,T){return UPNG.encodeLL([$],o,T,3,1,8)};eY.Fo.yj=function($){var o=Date.now(),T=UPNG.decode($),s=UPNG.toRGBA8(T),E=T.width,e=T.height,n=0;
|
|
if(T.tabs.pHYs)n=Math.round(T.tabs.pHYs[0]*254/1e4);if(s.length==1)return[{Sg:new df(0,0,E,e),data:s[0],fG:n}];
|
|
var A=[];for(var f=0;f<s.length;f++){A.push({y0:"_a_frm"+f+","+T.frames[f].delay,Sg:new df(0,0,E,e),data:s[f],fG:n})}return A};
|
|
eY.Yr={};eY.Yr.tC=function($,o,T,s){var E=new Uint8Array($[0][0]),e=o*T,n=e*3,A="P6\n"+o+" "+T+"\n255\n",u=A.length,Y=L.G(u+n,!0);
|
|
for(var f=0;f<u;f++)Y[f]=A.charCodeAt(f);for(var f=0;f<e;f++){var b=f*4,a=f*3+u;Y[a]=E[b];Y[a+1]=E[b+1];
|
|
Y[a+2]=E[b+2]}return Y.buffer};eY.Yr.yj=function($){$=new Uint8Array($);var o=[" ".charCodeAt(0),"\n".charCodeAt(0),"\t".charCodeAt(0),"\r".charCodeAt(0)],T=0,s=String.fromCharCode($[0])+String.fromCharCode($[1]),E=[],e=0,n=s=="P1"||s=="P4"?2:3;
|
|
for(T=2;T<$.length;T++){var A=$[T],u=String.fromCharCode(A);if(A=="#".charCodeAt(0)){while($[T]!="\n".charCodeAt(0))T++;
|
|
continue}var Y=o.indexOf(A)!=-1;if(e==0&&!Y){E.push(u);e=1;continue}if(e==1&&!Y){E[E.length-1]+=u;continue}if(e==1&&Y){e=0;
|
|
if(E.length==n)break;continue}}var b=parseInt(E[0]),a=parseInt(E[1]),w=b*a*4,X=s=="P1"||s=="P4"?1:255/parseInt(E[2]),N=L.G(w);
|
|
if(s=="P1"||s=="P2"||s=="P3"){var z="",i=0,e=0,k="#".charCodeAt(0);for(var f=T;f<$.length;f++){var A=$[f],u=String.fromCharCode(A),Y=o.indexOf(A)!=-1;
|
|
if(A==k){while($[f]!="\n".charCodeAt(0))f++}else if(e==0&&!Y){z=u;e=1}else if(e==1){if(Y){e=0;var Q=parseInt(z);
|
|
z="";if(s=="P1"){N[i]=N[i+1]=N[i+2]=(1-Q)*255;N[i+3]=255;i+=4}if(s=="P2"){N[i]=N[i+1]=N[i+2]=Math.round(Q*X);
|
|
N[i+3]=255;i+=4}if(s=="P3"){N[i]=Math.round(Q*X);i++;if((i&3)==3){N[i]=255;i++}}}else z+=u}}}var O=b*a;
|
|
if(s=="P4")for(var c=0;c<a;c++){var B=c*8*Math.ceil(b/8);for(var G=0;G<b;G++){var f=B+G,l=$[T+1+(f>>3)];
|
|
l=l>>7-(f&7)&1;var v=c*b+G<<2;N[v]=N[v+1]=N[v+2]=(1-l)*255;N[v+3]=255}}if(s=="P5")for(var f=0;f<O;f++){var v=4*f;
|
|
N[v]=N[v+1]=N[v+2]=Math.round($[T+1+f]*X);N[v+3]=255}if(s=="P6")for(var f=0;f<O;f++){var v=4*f,p=T+1+3*f;
|
|
N[v]=Math.round($[p]*X);N[v+1]=Math.round($[p+1]*X);N[v+2]=Math.round($[p+2]*X);N[v+3]=255}return[{Sg:new df(0,0,b,a),data:N.buffer}]};
|
|
eY.Uv={};eY.Uv.tC=function($,o,T,s){var E=new Uint8Array($[0][0]);if((o&3)!=0||(T&3)!=0){var e=o+(4-(o&3)),n=T+(4-(T&3)),A=new Uint8Array(e*n*4);
|
|
L.wr(A,4278190080);L.h9(E,new df(0,0,o,T),A,new df(0,0,e,n));E=A;o=e;T=n}return UTEX.DDS.encode(E.buffer,o,T)};
|
|
eY.Uv.yj=function($){var o=UTEX.DDS.decode($)[0];return[{Sg:new df(0,0,o.width,o.height),data:o.image}]};
|
|
eY.P6={};eY.P6.yj=function($){var o=UTEX.VTF.decode($).pop();return[{Sg:new df(0,0,o.width,o.height),data:o.image}]};
|
|
eY.PH={};eY.PH.ba=null;eY.PH.a6o=function($,o){var T=eY.PH.ba,s=$.byteLength,E=o.width,e=o.height,n=E*e,A=5e6+2*s+n*(o.progressive?Math.max(2,o.numComponents)*4+1:8),u=T.instance.exports;
|
|
eY.k8(u,A);var Y=new Uint8Array(u.memory.buffer),b=u.malloc(s);Y.set(new Uint8Array($),b);var a=u.malloc(4),w=u.malloc(4),J=u.malloc(4),X=u.stbi_load_from_memory(b,s,a,w,J,4);
|
|
u.free(b);u.free(a,w,J);u.free(X);var N=Y.slice(X,X+n*4);return N};(function(){var $=eY.ME.get("wasm/jpg").buffer;
|
|
if(window.WebAssembly==null)window.alert("Your browser is too old. Please, update it.");WebAssembly.instantiate($).then(function(o){eY.PH.ba=o})}());
|
|
eY.PH.tC=function($,o,T,s){if(s==null)s=[70];var E=$[0],e=new Uint8Array(E[0]);if(L.jh(e)){var n=new Uint8Array(e.length),A=new df(0,0,o,T);
|
|
L.wr(n,4294967295);L.R.xE("norm",e,A,n,A,A,1);e=n}var u=new Uint8Array(eY.OQ(e.buffer,o,T,"jpeg",s[0]/100));
|
|
if(E[2]!=null){var Y=eY.PH.Fk(u)[224][0]+2;Y+=9;u[Y]=1;t.mS(u,Y+1,E[2]);t.mS(u,Y+3,E[2])}if(E[3]!=null&&s[1]==!0&&Object.keys(E[3]).length!=0){var b=0,a=0,w=0,X=e2.ge(E[3]),N=new Uint8Array(UTIF.encode([X])),z="http://ns.adobe.com/xap/1.0/",O=0,G=0,h=20;
|
|
b=4+6+N.length;var i=e2.zm(E[3]),k=t.Te(i);a=4+z.length+1+k.length;var Q=e2.amT(E[3]);for(var f=0;f<Q.length;
|
|
f++)O+=5+Q[f][1].length;var c=O+(O&1),B=L.G(14+4+2+4+c);t.dt(B,G,"Photoshop 3.0");G+=14;t.dt(B,G,"8BIM");
|
|
G+=4;B[G++]=4;B[G++]=4;G+=2;t.gG(B,G,O);G+=4;for(var f=0;f<Q.length;f++){var l=Q[f],v=l[1];B[G++]=28;
|
|
B[G++]=2;B[G++]=l[0];t.mS(B,G,v.length);G+=2;t.dt(B,G,v);G+=v.length}w=4+B.length;var p=b+a+w,P=new Uint8Array(u.length+p);
|
|
for(var f=0;f<20;f++)P[f]=u[f];for(var f=20;f<u.length;f++)P[f+p]=u[f];P[h]=255;P[h+1]=225;t.mS(P,h+2,b-2);
|
|
t.dt(P,h+4,"Exif");for(var f=0;f<N.length;f++)P[h+10+f]=N[f];h+=b;P[h]=255;P[h+1]=225;t.mS(P,h+2,a-2);
|
|
t.dt(P,h+4,z);for(var f=0;f<k.length;f++)P[h+4+z.length+1+f]=k[f];h+=a;P[h]=255;P[h+1]=237;t.mS(P,h+2,w-2);
|
|
for(var f=0;f<B.length;f++)P[h+4+f]=B[f];h+=w;u=P}return u.buffer};eY.PH.Fk=function($){var o=0,T=[],s=$.length;
|
|
while(o<s){while($[o]!=255&&o<s)o++;while($[o]==255)o++;var E=$[o];o++;if(T[E]==null)T[E]=[];T[E].push(o-2);
|
|
if(E==216)continue;if(E==217)break;if(224<=E&&E<=239||E==218||E==219||E==192||E==193||E==194||E==196||E==221||E==254){var e=t.mo($,o);
|
|
o+=e;if(E==218)while(o<s&&($[o]!=255||($[o+1]==0||208<=$[o+1]&&$[o+1]<=215)))o++;continue}console.log("unknown marker ",E.toString(16),o);
|
|
break}if(T[217]==null){console.log("EOI marker missing");var n=$.length-2;$[n]=255;$[n+1]=217;T[217]=[n]}return T};
|
|
eY.PH.a33=function($){$=new Uint8Array($);if($[0]!=255)return $.buffer;var o=eY.PH.Fk($),T=eY.PH.aS($,o);
|
|
if(T.numComponents!=4)return $.buffer;var s=T.width,E=T.height,e=eY.PH.Ms($,o,!0);return eY.PH.tC([[e[0].data]],s,E,[85])};
|
|
eY.PH.aS=function($,o){var T=(o[192]?o[192]:o[193]?o[193]:o[194])[0]+4,s={};s.progressive=o[194]!=null;
|
|
s.precision=$[T];T++;s.height=t.mo($,T);T+=2;s.width=t.mo($,T);T+=2;s.numComponents=$[T];T++;if(o[224]){var E=s.jfif={};
|
|
T=o[224][0]+2+2+5+2;E.densityUnits=$[T];T++;E.xDensity=t.mo($,T);T+=2;E.yDensity=t.mo($,T);T+=2}if(o[238]){var E=s.adobe={};
|
|
T=o[238][0]+2+2+6;E.version=$[T];T++;E.flags0=t.mo($,T);T+=2;E.flags1=t.mo($,T);T+=2;E.transform=$[T];
|
|
T++}return s};eY.PH.a6y=function($,o,T){var s=o,E=t.mo($,s);s+=2;var e=t.en($,s,4);if(e=="Exif"){s+=6;
|
|
var n=$.slice(s,s+E-8),A;try{A=UTIF.decode(n.buffer,{parseMN:!1,debug:!1})}catch(aX){}if(A)T.exif=A}else if(e=="http"){var u=0;
|
|
while($[s+u]!=0)u++;var Y=t.en($,s,u);s+=u+1;if(Y=="http://ns.adobe.com/xmp/extension/"){var b=t.en($,s,32);
|
|
s+=32;s+=8;var a=o+E-s;while($[s+a-1]==0)a--;if(T.xmp_extn==null)T.xmp_extn="";try{T.xmp_extn+=t.LK($,s,a)}catch(aX){}}else if(Y=="http://ns.adobe.com/xap/1.0/"){var w=t.LK($.slice(s,s+E-u-3));
|
|
if(w[0]=="?")w="<"+w;T.xmp=w}}else console.log(e)};eY.PH.Ms=function($,o,T){var s=eY.PH.aS($,o),E=s.width,e=s.height,n=E*e,A,u=-1,z=72,i;
|
|
if(s.adobe)u=s.adobe.transform;if(T||E*e>15e7||u==0||u==2){var Y=new PDFJS.JpegImage;Y.parse($);var b=Y.getData({width:E,height:e,forceRGB:!0,isSourcePDF:T}),A=L.G(n*4);
|
|
for(var f=0;f<n;f++){var a=f<<2,w=a-f;A[a]=b[w];A[a+1]=b[w+1];A[a+2]=b[w+2];A[a+3]=255}}else{A=eY.PH.a6o($.buffer,s)}var X=o[225];
|
|
if(X)for(var f=0;f<X.length;f++)eY.PH.a6y($,X[f]+2,s);var N=o[217][0]+2;if(N!=$.length)s.suffix=$.slice(N);
|
|
var k=[E,e,1,0,0,0,1,0];if(s.jfif&&s.jfif.densityUnits!=0){z=Math.round([72,1,2.54][s.jfif.densityUnits]*s.jfif.xDensity)}else if(s.exif&&s.exif[0].t282!=null){var Q=s.exif[0].t282[0];
|
|
z=Q[0]/Q[1]}if(s.exif){var O=s.exif;i=e2.DN(O[0]);var c=O[0].t274;if(c)c=c[0];if(c!=null&&c>1&&c<20)k=L.raw.hY(c,E,e)}if(s.xmp){i=e2.Is(s.xmp,i)}var B=o[237],G=[],l=[];
|
|
if(B){var v=new Uint8Array(65536),p=0,P=0;for(var f=0;f<B.length;f++){P=B[f]+2;var h=P+t.mo($,P);P+=2;
|
|
var j=P;while($[P]!=0)P++;P++;var C=t.en($,j,P-j-1),V=h-P;while(p+V>v.length){var d=new Uint8Array(v.length*2);
|
|
d.set(v);v=d}var m=new Uint8Array($.buffer,P,V);v.set(m,p);p+=V}P=0;$=v;while(P<p){var R=t.en($,P,4);
|
|
P+=4;var g=t.mo($,P);P+=2;var S=$[P++],F=t.en($,P,S);P+=S;if((S&1)==0)P++;var r=t.s($,P);P+=4;var N=P+r+(r&1);
|
|
if(g==1028){while(P+4<N){var q=$[P++],W=$[P++],Z=$[P++],I=t.mo($,P);P+=2;if(q==28&&W==2)G.push([Z,t.en($,P,I)]);
|
|
P+=I}}else if((g&2e3)==2e3){var _=aS.Dw($,P,r);l.push([F,_])}else{}P=N}if(G.length!=0)i=e2.aag(G,i)}var cN=[{Sg:new df(0,0,E,e),data:A.buffer,fG:z,sx:i,Kd:l.length==0?null:l}],i=s.xmp_extn;
|
|
if(i){var ce=new DOMParser,gf=ce.parseFromString(i,"image/svg+xml"),gf=gf.children[0].children[0].children[0],K=[gf.getAttribute("GImage:Data"),gf.getAttribute("GDepth:Data")];
|
|
for(var f=0;f<K.length;f++)if(K[f]){var cv=atob(K[f]),f0=new Uint8Array(cv.length);t.dt(f0,0,cv);f0=f0.buffer;
|
|
var i8=eY.RP(f0),b5=eY.Q1(i8).yj(f0);cN.push(b5[0])}}if(s.suffix){var iC=s.suffix,an=t.en(iC,4,4),cO=t.fe(iC,String.fromCharCode(255)+String.fromCharCode(216)+String.fromCharCode(255));
|
|
if(eY.KK(iC,[0,0,1,10,14,0,0,0])){var P=0;while(P!=iC.length){var bh=t.w1(iC,P+2);P+=4;var bD={2272:12,2320:21,2561:13,2625:21,2721:3,2608:0}[bh];
|
|
if(bD!=null){var fq=t.cX(iC,P);P+=4;var fO=t.en(iC,P,fq);P+=fq;var g6=t.en(iC,P,bD);P+=bD;if(bh==2608){var hM=t.s(iC,P+24);
|
|
P+=hM+24;var d3=t.s(iC,P);P+=d3;alert("Photopea found a "+c6.yY(hM)+" MP4 video inside your image.",4e3)}}else if(bh==18502){while(t.en(iC,P,4)!="SEFT")P+=4;
|
|
P+=4}else{break;console.log(t.i8(iC,P,128));console.log(iC.slice(P));throw bh.toString(16)}}}else if(an=="ftyp"){alert("Photopea found a "+c6.yY(iC.length)+" MP4 video inside your image.",4e3)}else if(t.en(iC,0,4)=="fixe"){alert("Unknown data - "+iC.length+" B - at the end of the file",3e3);
|
|
var P=4,r=t.cX(iC,P);P+=4;var h9=t.cX(iC,P);P+=4;var cs=t.cX(iC,P);P+=4;console.log(r,h9,cs,iC.slice(P,P+84));
|
|
P+=84;var dv=t.en(iC,P,32);P+=32;P+=8;var dv=t.en(iC,P,32);P+=32}else if(t.en(iC,8,13)=="FocusShot_Map"){var ec=t.s(iC,0),I=t.cX(iC,4),f0=L.G(n*4),gT=L.G(n*4);
|
|
for(var iz=0;iz<e;iz++)for(var gw=0;gw<E;gw++){var f=iz*E+gw,a=f<<2,iI=8+13+((iz>>>1)*E+gw>>>1),g2=iC[iI],bb=iC[iI+(n>>>2)];
|
|
f0[a]=f0[a+1]=f0[a+2]=g2;f0[a+3]=255;gT[a]=gT[a+1]=gT[a+2]=bb;gT[a+3]=255}cN.push({Sg:new df(0,0,E,e),data:f0.buffer},{Sg:new df(0,0,E,e),data:gT.buffer})}else if(an=="edof"){var c=iC[8+7];
|
|
console.log(c.toString(16));var P=8+16,ir=t.w1(iC,P),dG=t.w1(iC,P+2),n=ir*dG;P+=4;P+=32+16;var gY=L.G(n*4);
|
|
for(var f=0;f<n;f++){var a=f<<2;gY[a]=gY[a+1]=gY[a+2]=iC[P+f];gY[a+3]=255}if(c==16){}else if(c==19){var e6=gY.slice(0);
|
|
L.$.EP(gY,e6,ir,dG);var fr=ir;ir=dG;dG=fr;L.$.apv(e6,gY,ir,dG)}else throw"Unknown orientation of a depth map";
|
|
cN.push({Sg:new df(0,0,ir,dG),data:gY.buffer})}else if(cO!=-1&&!(iC[0]==255&&iC[1]==129)){try{if(cO!=0)iC=iC.slice(cO);
|
|
var b5=eY.Q1("jpg").yj(iC.buffer);for(var f=0;f<b5.length;f++)cN.push(b5[f])}catch(aX){}}}if(cN.length>1){var bt=cN[0].Sg;
|
|
cN[0].y0="Main";for(var f=1;f<cN.length;f++){cN[f].y0=eY.PH.acO(new Uint8Array(cN[f].data))?"Depth Map":null;
|
|
var cx=cN[f].Sg;if(!cx.R1(bt)){var ci=bt.d/cx.d,gv=bt.w/cx.w,gu=new fY;gu.scale(ci,gv);var ak=D.p.wN([new Uint8Array(cN[f].data),cx],1,L.$.KQ(gu));
|
|
cN[f].Sg=ak.rect;cN[f].data=ak.buffer}}}if(eY.PH.Nn==1)if(k[2]!=1||k[6]!=1)for(var f=0;f<cN.length;f++){var hP=cN[f],ai=new Uint8Array(hP.data),E=hP.Sg.d,e=hP.Sg.w,ir=k[0],dG=k[1],A=L.G(ir*dG*4);
|
|
L.$.lx(ai,E,e,A,k);hP.Sg=new df(0,0,ir,dG);hP.data=A.buffer}return cN};eY.PH.acO=function($){var o=!0;
|
|
for(var f=0;f<$.length;f+=4){o=o&&$[f]==$[f+1]&&$[f+1]==$[f+2]}return o};eY.PH.Nn=0;eY.PH.yj=function($,o,T){$=new Uint8Array($);
|
|
if($[0]==255){var s=eY.PH.Fk($);if(s[195]==null){eY.PH.Nn++;var E=eY.PH.Ms($,s,!1);eY.PH.Nn--;return E}var e=t.mo($,s[195][0]+5),n=t.mo($,s[195][0]+7),A=UTIF.LosslessJpegDecode($),u=n*e,Y=L.G(u*4);
|
|
for(var f=0;f<u;f++){var b=f<<2,a=b-f;Y[b]=A[a];Y[b+1]=A[a+1];Y[b+2]=A[a+2];Y[b+3]=255}return[{Sg:new df(0,0,n,e),data:Y.buffer}]}else if($[0]==0&&$[4]==48&&$[6]==1){var w=$,X=new PDFJS.Jbig2Image,N=[];
|
|
if(o)N.push({data:o,start:0,end:o.length});N.push({data:w,start:0,end:w.length});var A=X.parseChunks(N);
|
|
if(!T)for(var f=0;f<A.length;f++)A[f]=~A[f];var n=t.s($,11),e=t.s($,15),z=Math.ceil(n/8),i=L.G(n*e*4);
|
|
for(var k=0;k<e;k++){var Q=k*z;for(var O=0;O<n;O++){var b=(k*n+O)*4,c=A[Q+(O>>>3)]>>>7-(O&7)&1,B=c*255;
|
|
i[b]=B;i[b+1]=B;i[b+2]=B;i[b+3]=255}}return[{Sg:new df(0,0,n,e),data:i.buffer}]}else{var X=new PDFJS.JpxImage;
|
|
X.parse($);var n=X.width,e=X.height,G=X.tiles,l=X.componentsCount,v=new Uint8Array(n*e*4),p=new df(0,0,n,e);
|
|
for(var X=0;X<G.length;X++){var P=G[X],h=P.width,j=P.height,C=h*j,V=P.items,d=new df(P.left,P.top,h,j),m=new Uint8Array(C*4);
|
|
if(l==1)for(var f=0;f<C;f++){var R=V[f],b=f*4;m[b]=R;m[b+1]=R;m[b+2]=R;m[b+3]=255}else if(l==3)for(var f=0;
|
|
f<C;f++){var a=f*3,b=f*4;m[b]=V[a];m[b+1]=V[a+1];m[b+2]=V[a+2];m[b+3]=255}else console.log("Unknown number of components: "+l);
|
|
L.h9(m,d,v,p)}return[{Sg:p,data:v.buffer}]}};eY.B5={};eY.B5.tC=function($,o,T,s){if(s==null)s=[70,0,0,0];
|
|
var E=s[0]/100,u=0;if($.length==1)return eY.OQ($[0][0],o,T,"webp",E);var e=t.G4,n=t.JG,A=new bV;e(A,u,"RIFF WEBPVP8X");
|
|
u+=16;n(A,u,10);u+=4;n(A,u,18);u+=4;n(A,u,o-1);u+=3;n(A,u,T-1);u+=3;e(A,u,"ANIM");u+=4;n(A,u,6);u+=4;
|
|
A.Y4(u,4);A.data[u+3]=255;t.Rs(A,u+4,s[2]);u+=6;var Y=[];for(var f=0;f<$.length;f++){Y.push($[f][0])}var b=UPNG.encode.compress(Y,o,T,E==1?0:Math.max(2,Math.floor(E*500)),[!1,!0,!0,0,!0]).frames;
|
|
for(var f=0;f<$.length;f++){e(A,u,"ANMF");u+=4;var a=u;u+=4;var w=b[f],X=w.rect,N=[X.x>>>1,X.y>>>1,X.width-1,X.height-1,$[f][1]];
|
|
for(var z=0;z<5;z++)n(A,u+3*z,N[z]);u+=15;A.Y4(u,1);A.data[u]=1-w.blend<<1|w.dispose;u++;var i=new Uint8Array(eY.OQ(w.img.buffer,X.width,X.height,"webp",1)),k=hh.$$(i.buffer).sub,Q=t.en(i,12,4);
|
|
if(Q!="VP8L"&&Q!="VP8 "&&Q!="VP8X")throw"e";var O=Q=="VP8 "?0:Q=="VP8L"?12:30,c=i.length-O;A.Y4(u,c);
|
|
for(var z=0;z<c;z++)A.data[u+z]=i[O+z];u+=c;var B=u-a-4;n(A,a,B);if((B&1)==1){A.Y4(u,1);u++}}n(A,4,u-8);
|
|
return A.data.slice(0,u).buffer};(function(){var $=eY.ME.get("wasm/webp").buffer;WebAssembly.instantiate($).then(function(o){var T=o.instance.exports;
|
|
eY.B5.exp=T})}());eY.B5.yj=function($){var o=new Uint8Array($),T=eY.B5.ar9,s=null,E=hh.$$($).sub,e={};
|
|
for(var f=0;f<E.length;f++)e[E[f].EB]=E[f];var n=e.ANIM,A=e.VP8L,u=e["VP8 "],Y=e.VP8X;if(n==null){var b,a;
|
|
if(u){b=t.w1(o,u.l+6);a=t.w1(o,u.l+8)}else if(A){var w=t.cX(o,A.l+1);b=(w&(1<<14)-1)+1;a=(w>>>14&(1<<14)-1)+1}else throw"e";
|
|
var X=[T(s,$,{l:0,size:o.length},b,a)];return X}var N=Y.l,b=1+(t.cX(o,N+4)&16777215),a=1+(t.cX(o,N+7)&16777215),z=[],i=new df(0,0,b,a),k=L.G(b*a*4);
|
|
for(var f=0;f<E.length;f++){var Q=E[f];if(Q.EB!="ANMF")continue;var O=[];for(var c=0;c<5;c++)O.push(t.cX(o,Q.l+c*3)&16777215);
|
|
var B=new df(O[0]*2,O[1]*2,O[2]+1,O[3]+1),G=O[4],l=T(s,$,{l:Q.l+16,size:Q.size-16},b,a),v=new Uint8Array(l.data),p=o[Q.l+15];
|
|
if(p>>>1==0)L.R.xE("norm",v,B,k,i,B,1);else L.h9(v,B,k,i);z.push({y0:"_a_"+z.length+","+G,Sg:i.clone(),data:k.buffer.slice(0)});
|
|
if((p&1)==1){L.wr(v,0);L.h9(v,B,k,i)}}return z};eY.B5.ar9=function($,o,T,s,E){var e=eY.B5.exp,n=e.memory,A=5e6+2*T.size+s*E*10;
|
|
eY.k8(e,A);var u=new Uint8Array(n.buffer),Y=e.malloc(T.size);u.set(new Uint8Array(o,T.l,T.size),Y);var b=e.malloc(8),a=e.WebPDecodeARGB(Y,T.size,b,b+4),w=t.cX(u,b),X=t.cX(u,b+4),N=w*X*4,z=L.G(N);
|
|
for(var f=0;f<N;f+=4){z[f]=u[a+f+1];z[f+1]=u[a+f+2];z[f+2]=u[a+f+3];z[f+3]=u[a+f]}e.WebPFree(a);e.free(b);
|
|
e.free(Y);return{Sg:new df(0,0,w,X),data:z.buffer}};eY.ahp=function(){function $(A,u,Y,b){var a=new Uint8Array(A[0][0]),w=new Uint32Array(a.buffer),X=[],N={},i=24,k=0,G=0;
|
|
for(var f=0;f<w.length;f++){var z=w[f]&16777215;if(N[z]==null){N[z]=X.length;X.push(z);if(X.length>256){X=null;
|
|
break}}}if(X){i=1;while(1<<i<X.length)i*=2;if(i==2)i=4}var Q={N0:u,cQ:Y,kh:1,gR:i,i5:0,aqq:k},O=4*Math.floor((Q.gR*Q.N0+31)/32);
|
|
Q.size=O*Q.cQ+2;var c=new bV,B=X?(1<<i)*4:0;t.G4(c,G,"BM");G+=2;t.JG(c,G,O*Y+16+40+B);G+=4;t.JG(c,G,0);
|
|
G+=4;t.JG(c,G,54+B);G+=4;c.Y4(G,40);t.JG(c,G,40);G+=4;n(c.data,G,Q,O);G+=36;if(X){c.Y4(G,B);var l=c.data;
|
|
for(var f=0;f<X.length;f++){var v=G+f*4,p=X[f]>>>16,P=X[f]>>>8&255,h=X[f]&255;l[v]=p;l[v+1]=P;l[v+2]=h}G+=B}c.Y4(G,O*Y);
|
|
if(i==24)for(var j=0;j<Y;j++){var C=G+(Y-1-j)*O;for(var V=0;V<u;V++){var d=(j*u+V)*4;c.data[C+V*3+2]=a[d];
|
|
c.data[C+V*3+1]=a[d+1];c.data[C+V*3+0]=a[d+2]}}else if(i==8)for(var j=0;j<Y;j++){var C=G+(Y-1-j)*O;for(var V=0;
|
|
V<u;V++){var d=j*u+V,m=N[w[d]&16777215];c.data[C+V]|=m}}else if(i==4)for(var j=0;j<Y;j++){var C=G+(Y-1-j)*O;
|
|
for(var V=0;V<u;V++){var d=j*u+V,m=N[w[d]&16777215];c.data[C+(V>>>1)]|=m<<4-(V&1)*4}}else if(i==1)for(var j=0;
|
|
j<Y;j++){var C=G+(Y-1-j)*O;for(var V=0;V<u;V++){var d=j*u+V,m=N[w[d]&16777215];c.data[C+(V>>>3)]|=m<<7-(V&7)}}G+=O*Y+2;
|
|
return c.data.slice(0,G).buffer}function o(A){A=new Uint8Array(A);if(t.cX(A,0)==40)return[T(A.buffer,0)];
|
|
var u=0,Y=t.en(A,u,2);u+=2;if(Y!="BM"){alert("Unsupported BMP format: "+Y);return}var b=t.cX(A,u);u+=4;
|
|
u+=4;var a=t.cX(A,u);u+=4;return[T(A.buffer,u,a)]}function T(A,u,Y){A=new Uint8Array(A);var b=t.cX(A,u),a=e(A,u+4);
|
|
if(a.kh!=1)alert("unsupported number of color planes: "+a.kh);if(a.i5!=0&&a.i5!=1&&a.i5!=2&&a.i5!=3){alert("Unsupported BMP compression: "+a.i5);
|
|
return}u+=b;var w=u,X=A;if(Y==null)Y=u;if(a.i5==1||a.i5==2){var N=E(A,Y,a);a.gR=8;A=N;Y=0}var z=4*Math.floor((a.gR*a.N0+31)/32),i=a.N0,k=Math.abs(a.cQ),Q=new Uint8Array(i*k*4);
|
|
Q.fill(255);if(a.gR==32)for(var O=0;O<k;O++){var c=Y+(k-1-O)*z;for(var B=0;B<i;B++){var G=(O*i+B)*4;
|
|
Q[G]=A[c+B*4+2];Q[G+1]=A[c+B*4+1];Q[G+2]=A[c+B*4+0];Q[G+3]=A[c+B*4+3]}}else if(a.gR==24)for(var O=0;
|
|
O<k;O++){var c=Y+(k-1-O)*z;for(var B=0;B<i;B++){var G=(O*i+B)*4;Q[G]=A[c+B*3+2];Q[G+1]=A[c+B*3+1];Q[G+2]=A[c+B*3+0]}}else if(a.gR==16)for(var O=0;
|
|
O<k;O++){var c=Y+(k-1-O)*z;for(var B=0;B<i;B++){var G=(O*i+B)*4,l=A[c+B*2+1]<<8|A[c+B*2];Q[G]=(l>>>11)*(255/31);
|
|
Q[G+1]=(l>>>5&63)*(255/63);Q[G+2]=(l&31)*(255/31)}}else if(a.gR==8)for(var O=0;O<k;O++){var c=Y+(k-1-O)*z;
|
|
for(var B=0;B<i;B++){var G=(O*i+B)*4,v=A[c+B];Q[G]=X[w+4*v+2];Q[G+1]=X[w+4*v+1];Q[G+2]=X[w+4*v+0]}}else if(a.gR==4)for(var O=0;
|
|
O<k;O++){var c=Y+(k-1-O)*z;for(var B=0;B<i;B++){var G=(O*i+B)*4,v=A[c+(B>>1)];v=v>>4-4*(B&1);v=v&15;
|
|
Q[G]=X[w+4*v+2];Q[G+1]=X[w+4*v+1];Q[G+2]=X[w+4*v+0]}}else if(a.gR==1)for(var O=0;O<k;O++){var c=Y+(k-1-O)*z;
|
|
for(var B=0;B<i;B++){var G=(O*i+B)*4,p=A[c+(B>>3)];p=p>>7-(B&7);p=p&1;Q[G]=X[w+4*p+2];Q[G+1]=X[w+4*p+1];
|
|
Q[G+2]=X[w+4*p+0]}}else throw"Unknown bit depth "+a.gR;if(a.cQ<0){var P=new Uint32Array(Q.buffer),h=k>>>1;
|
|
for(var O=0;O<h;O++){var j=O*i,C=(k-O-1)*i;for(var B=0;B<i;B++){var V=P[j+B];P[j+B]=P[C+B];P[C+B]=V}}}return{Sg:new df(0,0,i,k),data:Q.buffer}}function s(A,f){return A>>>4-((f&1)<<2)&15}function E(A,u,Y){var b=Y.N0,a=Math.abs(Y.cQ),w=new Uint8Array(b*a),X=0,N=0,f=0;
|
|
while(N<a){var z=A[u++],i=A[u++],k=N*b+X;if(z>0){if(Y.gR==4)for(f=0;f<z;f++){w[k+f]=s(i,f)}else for(f=0;
|
|
f<z;f++){w[k+f]=i}X+=z}else if(z==0&&i==0){N++;X=0}else if(z==0&&i==1){break}else if(z==0&&i==2){X+=A[u++];
|
|
N+=A[u++]}else{var Q=i;if(Y.gR==4){for(f=0;f<i;f++){w[k+f]=s(A[u+(f>>>1)],f)}Q=Math.ceil(i/2)}else{for(f=0;
|
|
f<i;f++){w[k+f]=A[u+f]}}if((Q&1)!=0)Q++;u+=Q;X+=i}}return w}function e(A,u){var Y=t.$R,b=t.cX,a=t.w1,w={};
|
|
w.N0=Y(A,u);u+=4;w.cQ=Y(A,u);u+=4;w.kh=a(A,u);u+=2;w.gR=a(A,u);u+=2;w.i5=b(A,u);u+=4;w.size=b(A,u);u+=4;
|
|
var X=Y(A,u);u+=4;var N=Y(A,u);u+=4;w.aqq=b(A,u);u+=4;u+=4;return w}function n(A,u,Y,b){t.zU(A,u,Y.N0);
|
|
u+=4;t.zU(A,u,Y.cQ);u+=4;t._P(A,u,Y.kh);u+=2;t._P(A,u,Y.gR);u+=2;t.zU(A,u,Y.i5);u+=4;t.zU(A,u,Y.size);
|
|
u+=4;t.zU(A,u,2834);u+=4;t.zU(A,u,2834);u+=4;t.zU(A,u,Y.aqq);u+=4;u+=4}return{yj:o,tC:$,aas:T}}();eY._u={};
|
|
eY._u.tC=function($,o,T,s){if(s==null)s=[100,0,0,0,0];var E=[],e=[],n=o*T*4,z=null;for(var A=0;A<$.length;
|
|
A++){var u=new Uint8Array($[A][0].slice(0));for(var f=0;f<n;f+=4){var Y=u[f+3]=u[f+3]>127?255:0;if(Y==0)u[f]=u[f+1]=u[f+2]=0}E.push(u.buffer);
|
|
e.push($[A][1])}var b=Math.round(2+254*s[0]/100),a=UPNG.encode.compress(E,o,T,b,[!0,!1,!1,8,!1]),w=a.plte,X=new Uint8Array(4),N=new Uint32Array(X.buffer);
|
|
for(var f=0;f<w.length;f++){N[0]=w[f];var i=X[0];X[0]=X[2];X[2]=i;w[f]=N[0];if(N[0]==0)z=f}while(w.length<256)w.push(0);
|
|
var k=new Uint8Array(2e3+o*T*$.length),Q=s[2],O={palette:w};if(Q!=1)O.loop=Q==0?0:Q-1;var c=new GifWriter(k,o,T,O);
|
|
for(var f=0;f<$.length;f++){var B=a.frames[f],G=B.rect,l=B.blend,v=B.dispose;c.addFrame(G.x,G.y,G.width,G.height,B.img,{transparent:z,disposal:v+1,delay:Math.round(e[f]/10)})}return k.slice(0,c.end()).buffer};
|
|
eY._u.yj=function($){var o=Date.now(),T=[],s=UGIF.decode($),E=UGIF.toRGBA8(s),e=new df(0,0,s.width,s.height);
|
|
for(var f=0;f<E.length;f++){var n=s.frames[f];T.push({Sg:e.clone(),y0:"_a_frm"+f+","+n.delay*10,data:E[f]})}return T};
|
|
eY.gd={};eY.gd.tC=function($,o,T,s){console.log($);if(o>256||T>256){alert("Maximum ICO size is 256x256 px. Will be cropped.",4e3);
|
|
var E=Math.min(o,256),e=Math.min(T,256),n=new df(0,0,E,e),A=L.G(n.Y()*4),u=new df(0,0,o,T),Y=new Uint8Array($[0][0]);
|
|
L.h9(Y,u,A,n);$[0][0]=A.buffer;o=E;T=e}var b=new bV,a=0,w=s&&s[0]==!0;t.Rs(b,a,0);a+=2;t.Rs(b,a,w?2:1);
|
|
a+=2;t.Rs(b,a,1);a+=2;var X=new Uint8Array(eY.Q1("png").tC($,o,T));b.Y4(a,16);b.data[a]=o==256?0:o;a++;
|
|
b.data[a]=T==256?0:T;a++;a+=2;t.Rs(b,a,w?Math.round(o/2):1);a+=2;t.Rs(b,a,w?Math.round(T/2):32);a+=2;
|
|
t.JG(b,a,X.length);a+=4;t.JG(b,a,6+16);a+=4;b.Y4(a,X.length);for(var f=0;f<X.length;f++)b.data[a+f]=X[f];
|
|
a+=X.length;var N=new Uint8Array(a);for(var f=0;f<a;f++)N[f]=b.data[f];return N.buffer};eY.gd.yj=function($){$=new Uint8Array($);
|
|
var o=4,T=t.w1($,o);o+=2;var s=[];for(var f=0;f<T;f++){var E=eY.gd.a9v($,o+f*16),e=$.buffer.slice(E.offset,E.offset+E.size),n=eY.RP(e);
|
|
n=n?n:"bmp";if(n=="png"){var A=eY.Q1(n),u=A.yj(e);E.Qn=u[0]}else{var Y=eY.Q1("BMP").aas(e,0),e=L.G(E.N0*E.cQ*4);
|
|
L.h9(new Uint8Array(Y.data),new df(0,0,Y.Sg.d,Y.Sg.w),e,new df(0,E.cQ,E.N0,E.cQ));Y.data=e.buffer;Y.Sg.w=E.cQ;
|
|
E.Qn=Y}s.push(E)}s.sort(function(b,a){if(b.N0!=a.N0)return b.N0-a.N0;return b.a4a-a.a4a});return[s.pop().Qn]};
|
|
eY.gd.a9v=function($,o){var T={};T.N0=$[o];o++;if(T.N0==0)T.N0=256;T.cQ=$[o];o++;if(T.cQ==0)T.cQ=256;
|
|
T.a8n=$[o];o++;o++;T.a59=t.w1($,o);o+=2;T.a4a=t.w1($,o);o+=2;T.size=t.cX($,o);o+=4;T.offset=t.cX($,o);
|
|
o+=4;return T};eY.zn={};eY.zn.yj=function($){var o=Date.now(),s,a=!0;if(L.raw.uA($.byteLength))return[L.raw.aiO($)];
|
|
var T=UTIF.decode($);if(T[0].t33421)s=T[0];else if(T[0].subIFD&&T[0].t271&&T[0].t271[0]=="Hasselblad"){s=T[0].subIFD[0];
|
|
s.t33421=[2,2]}else if(T[0].subIFD&&T[0].subIFD[0].t33421){s=T[0].subIFD[0];if(s.t50706==null){if(s.t258[0]==8)s.t258[0]=12}}else if(T[0].subIFD&&T[0].subIFD[0]&&T[0].subIFD[0].t262&&T[0].subIFD[0].t262[0]==34892)s=T[0].subIFD[0];
|
|
else if(T[0].subIFD&&T[0].subIFD[1]&&T[0].subIFD[1].t33421)s=T[0].subIFD[1];else if(T[0].subIFD&&T[0].subIFD[2]&&T[0].subIFD[2].t33421)s=T[0].subIFD[2];
|
|
else if(T[3]&&T[3].t50648){var E=T[0].exifIFD,e=E.makerNote;s=T[3];var n=e.t224[1],A=e.t224[2];s.t256=[n];
|
|
s.t257=[A];s.t258=[16];s.t259=[7];s.t262=[32803];s.t277=[1];s.t33421=[2,2];var u=s.t50656[0],Y=L.raw.zc[u];
|
|
if(Y==null)throw"e";s.t33422=Y}if(s){UTIF.decodeImage($,s,T);for(var b in T[0])if((b[0]=="t"||b[0]=="e"||b[0]=="d")&&s[b]==null)s[b]=T[0][b];
|
|
s.fW=T[0].t274?T[0].t274[0]:1;return[s]}var w=1/256;for(var f=0;f<T.length;f++)if(T[f].t258&&T[f].t258[0]==16&&T[f].t277&&T[f].t277[0]==1){}else a=!1;
|
|
if(a){var X=0,N=0,z=0;for(var f=0;f<T.length;f++){UTIF.decodeImage($,T[f],T);var i=T[f].data;for(var k=0;
|
|
k<i.length;k+=2){var Q=i[k+1]<<8|i[k];if(Q>X)X=Q;N+=Q;z++}}w=1/256*65535/(.5*X+.5*(2*N/z))}var O=[];
|
|
for(var f=0;f<T.length;f++){var c=T[f],B=72;UTIF.decodeImage($,c,T);var G=c.t282,l=c.t296;if(G!=null&&l!=null){B=G[0][0]/G[0][1];
|
|
if(l[0]==3)B=Math.round(B/2.54)}if(c.width==null)continue;var v=UTIF.toRGBA8(c,w).buffer,p=e2.DN(c);
|
|
O.push({Sg:new df(0,0,c.width,c.height),data:v,fG:B,sx:p})}return O};eY.zn.tC=function($,o,T,s){if(s==null)s=[!1];
|
|
var E={},e=$[0];if(e[3]!=null&&s[0])E=e2.ge(e[3]);if(e[2]!=null){E.t282=E.t283=[[Math.round(e[2]),1]];
|
|
E.t296=[2]}return UTIF.encodeImage(e[0],o,T,E)};eY.Oi={};eY.Oi.or=!0;eY.Oi.yj=function($,o){j3.$$($,o)};
|
|
eY.Oi.a6l=function($,o,T,s){if(s==null)s=[!1,!1,!1,!1];if(!s[0])$.aw();var E=new bV,e=j3._i($,E,s);return[E.data.buffer,e]};
|
|
eY.Oi.tC=function($,o,T,s){var E=eY.Oi.a6l($,o,T,s),e=E[0],n=E[1];return e.byteLength==n?e:e.slice(0,n)};
|
|
eY.Ju={};eY.Ju.or=!0;eY.Ju.yj=function($,o){var T=pako.inflate(new Uint8Array($)),s=t.mo(T,0),E=t.mo(T,2),e=4;
|
|
o.d=t.s(T,e);e+=4;o.w=t.s(T,e);e+=4;o.buffer=L.G(o.d*o.w*4);var n=t.mo(T,e);e+=2;e+=4;for(var A=0;A<n;
|
|
A++){var u=o.$f(),N=0,R=1,g=2,S=3,F=0;o.u.push(u);var Y=t.s(T,e);e+=4;var b=e,a=t.mo(T,b);b+=2;var w=t.LK(T,b,a);
|
|
b+=a;u.tM(w);var X=T[b];b++;if(X!=0&&X!=1)throw X;u.rect.x=t.Cv(T,b);b+=4;u.rect.y=t.Cv(T,b);b+=4;u.rect.d=t.s(T,b);
|
|
b+=4;u.rect.w=t.s(T,b);b+=4;if(s>3){N=t.Cv(T,b);b+=4}u.opacity=Math.round(255*T[b]/100);b++;var z=T[b];
|
|
b++;u.bC(z!=0);u.fh="norm,lddg,norm,dark,diff,norm,hLit,norm,norm,lite,mul ,over,scrn,fsub".split(",")[T[b]];
|
|
b++;var i=T[b];b++;if(i)u.add.lspf=1<<31;if(s>3){var k=t.mo(T,b);b+=2;if(k!=0){var Q=JSON.parse(t.LK(T,b,k));
|
|
b+=k;var O=Q.text,c=Q.textSettings,B=c.font,G=c.size,l=c.padding,v=parseInt(c.color.slice(1),16);u.add.lnsr="rend";
|
|
u.add.TySh=g8.rm(0,0);u.add.TySh.QH=new df(0,0,100,100);var p=u.add.TySh.t=new fY,P=u.rect.d/2,h=u.rect.w/2;
|
|
p.translate(-P,-h);p.rotate(-N*Math.PI/180);p.translate(P,h);p.translate(u.rect.x+l,u.rect.y+l);var j=u.add.TySh.h3;
|
|
g8.I8(j,1);g8.bi(j,[0,0,u.rect.d-l*2,u.rect.w]);g8.YN(j,0,O);var C=g8.$Q(j,0,1);C.oH.FontSize=G;C.oH.FillColor={Type:1,Values:[1,(v>>>16&255)/255,(v>>>8&255)/255,(v>>>0&255)/255]};
|
|
if(c.bold)B+="-Bold";g8.PL(C,B);C.CL.Justification=["left","right","center"].indexOf(c.align);g8.zA(j,0,O.length,C)}}var V=t.s(T,b);
|
|
b+=4;if(V!=u.rect.Y()*4){for(var f=u.rect.d;f>u.rect.d/2;f--){var d=V/(f*4);if(d==Math.round(d)){u.rect.d=f;
|
|
u.rect.w=d;break}}}u.buffer=L.G(u.rect.Y()*4);if(s>3){R=0;g=1;S=2;F=3}for(var f=0;f<V;f+=4){u.buffer[f]=T[b+f+R];
|
|
u.buffer[f+1]=T[b+f+g];u.buffer[f+2]=T[b+f+S];u.buffer[f+3]=T[b+f+F]}b+=V;var r=t.s(T,b);b+=4;if(r==0&&s>3){e+=Y;
|
|
continue}var q=T[b];b++;var W=t.mo(T,b);b+=2;if(r!=0){u._=new M.Zb;u._.rect=u.rect.clone();u._.channel=L.G(u.rect.Y());
|
|
for(var f=0;f<r;f+=4)u._.channel[f>>>2]=T[b+f+1];b+=r}if(q!=0){var Z=JSON.parse(ev.default);u.add.lmfx=Z;
|
|
for(var f=0;f<ev.order.length;f++)Z[ev.CP[f]]={t:"VlLs",v:[]};var I={"102":9,"101":2,"103":0,"104":3,"105":8};
|
|
for(var f=0;f<q;f++){var _=t.mo(T,b),cN=b+_+4,ce=T.slice(b,cN),gf=T[b+2];b+=3;var K=I[gf+""],cv=JSON.parse(ev.Qo[K]);
|
|
Z[ev.CP[K]].v.push({t:"Objc",v:cv});if(K!=0){cv.Md.v.BlnM=hI.$j("norm");cv.Opct.v.val=T[b];b++;if(K==9||K==2){cv.Dstn.v.val=T[b+1];
|
|
b+=2}else b+=2;cv.blur.v.val=Math.round(T[b]*1.2);b++;if(K==9||K==2){cv.uglg.v=!1;cv.lagl.v.val=180-t.mo(T,b);
|
|
b+=2}cv.Clr.v=L.h.wb({i:T[b+1],m:T[b+2],P:T[b+3]})}else{cv.hglM.v.BlnM=cv.sdwM.v.BlnM=hI.$j("norm");
|
|
b+=2;var f0=T[b++],i8=T[b++];cv.blur.v.val=Math.round(Math.sqrt(i8*f0)*1.3);cv.srgR.v.val=Math.round(100*f0/i8);
|
|
cv.uglg.v=!1;cv.lagl.v.val=180-t.mo(T,b);b+=2;cv.hglO.v.val=T[b++];cv.hglC.v=L.h.wb({i:T[b+1],m:T[b+2],P:T[b+3]});
|
|
b+=4;cv.sdwO.v.val=T[b++];cv.sdwC.v=L.h.wb({i:T[b+1],m:T[b+2],P:T[b+3]});b+=4}b=cN}}if(b-e<Y){var b5=t.s(T,b),cO=0;
|
|
b+=4;b++;var a=t.mo(T,b);b+=2;var O=t.LK(T,b,a);b+=a;O=O.replace(/\r/g,"\n");var a=t.mo(T,b);b+=2;var B=t.LK(T,b,a);
|
|
b+=a;var G=t.mo(T,b);b+=2;var iC=u.rect.x,an=u.rect.d;if(b5&4)cO=1;if(b5&2)cO=2;var bh=Math.round(G*.4);
|
|
if(cO==0||cO==2)an+=bh;if(cO==1||cO==2){an+=bh;iC-=bh}u.add.lnsr="rend";u.add.TySh=g8.rm(0,0);u.add.TySh.QH=new df(0,0,100,100);
|
|
u.add.TySh.t=new fY(1,0,0,1,iC,u.rect.y+G*.25);var j=u.add.TySh.h3;g8.I8(j,1);g8.bi(j,[0,0,an,u.rect.w]);
|
|
g8.YN(j,0,O);var C=g8.$Q(j,0,1);C.oH.FontSize=G;C.oH.FillColor={Type:1,Values:[1,T[b+1]/255,T[b+2]/255,T[b+3]/255]};
|
|
b+=4;if(T[b+5])B+="-Bold";if(T[b+6])B+="-Italic";g8.PL(C,B);C.CL.Justification=cO;b+=8;g8.zA(j,0,O.length,C)}e+=Y}};
|
|
eY.EA={};eY.EA.or=!0;eY.EA.yj=function($,o){hw.$$($,o)};eY.hJ={};eY.hJ.or=!0;eY.hJ.yj=function($,o){ar.$$($,o)};
|
|
eY.dz={};eY.dz.or=!0;eY.dz.yj=function($,o){dM.$$($,o)};eY.QS={};eY.QS.or=!0;eY.QS.yj=function($,o){cU.$$($,o)};
|
|
eY.Io={};eY.Io.or=!0;eY.Io.yj=function($,o){b$.$$($,o)};eY.Xd={};eY.Xd.or=!0;eY.Xd.yj=function($,o){j0.$$($,o)};
|
|
eY.ax={};eY.ax.or=!0;eY.ax.tC=function($,o,T,s,E){if(s==null)s=[!0,!1,!1,!1,!0,!0];var e=fA.JF($,{mv:s[0],hidden:s[1],al2:s[2],aef:s[3],names:s[4],a23:s[5],arH:o,a8p:T},E.vv);
|
|
return e};eY.ax.yj=function($,o,T){fA.$$($,o,T)};eY.sW={};eY.sW.or=!0;eY.sW.yj=function($,o){var T=150,s=new fY(1,0,0,-1,0,0);
|
|
s.scale(T/72,T/72);o.fG=T;var E=new cn(o,s,!0);FromPS.Parse($,E)};eY.W4={};eY.W4.or=!0;eY.W4.tC=function($,o,T,s,E){if(s==null)s=["",100,!1,!1,!1,0];
|
|
s[6]=["jpg"];var e=new ToPDF;fn.JF($,s,e,E.vv,o,T);return e.buffer};eY.W4.yj=function($,o,T){var s=2;
|
|
while(!0){var E=s*72,e=new fY(1,0,0,-1,0,0);e.scale(E/72,E/72);o.fG=E;var n=new cn(o,e,!0);FromPDF.Parse($,n);
|
|
var A=Math.max(o.d,o.w);if(T&&A<Math.max(T[0],T[1])){o.u=[];var u=s;while(A*(s/u)<Math.max(T[0],T[1]))s++}else break}};
|
|
eY.ju={};eY.ju.or=!0;eY.ju.yj=function($,o){var T=72,s=new fY(1,0,0,1,0,0);s.scale(T/72,T/72);o.fG=T;
|
|
var E=new cn(o,s,!1);FromWMF.Parse($,E)};eY.ei={};eY.ei.ND=!0;eY.ei.or=!0;eY.ei.tC=function($,o,T,s,E){if(s==null)s=["",100,!1,!1,!1,0];
|
|
s[6]=[];var e=new ToEMF;fn.JF($,s,e,E.vv);return e.buffer};eY.ei.yj=function($,o){var T=72,s=new fY(1,0,0,1,0,0);
|
|
s.scale(T/72,T/72);o.fG=T;var E=new cn(o,s,!1);FromEMF.Parse($,E)};eY.eo={};eY.eo.or=!0;eY.eo.yj=function($,o){return cY.$$($,o)};
|
|
eY.zM={};eY.zM.yj=function($,o){var T=h5.$$($),s=new Uint8Array($),E=0,e,n,A,u,Y,b,a,w,X=0,N=0,z=0,i=0,k=0;
|
|
for(var Q=0;Q<T.sub.length;Q++){var O=T.sub[Q],E=O.l;if(O.EB=="BMHD"){var c=[];for(var f=0;f<4;f++)c[f]=t.mo(s,E+2*f);
|
|
E+=8;u=c[2];Y=c[3];n=c[0];A=c[1];e=L.G(n*A*4);b=s[E++];a=s[E++];w=s[E++]}else if(O.EB=="CMAP")X=E;else if(O.EB=="CAMG"){var B=t.s(s,E);
|
|
N=B&32768,z=B&4,i=B&2048;k=B&128}else if(O.EB=="BODY"){var G=n+15>>>4<<1,l=b+a,v=L.G(G*A*l),j,C,V;hV.IE(s,E,O.size,v,0,v.length);
|
|
var p=b-2,P=(1<<p)-1,h=Math.round(255/P);for(var Y=0;Y<A;Y++)for(var u=0;u<n;u++){var d=0;for(var m=0;
|
|
m<l;m++){var R=(Y*l+m)*G*8+u,g=v[R>>>3]>>>7-(R&7)&1;d|=g<<m}var S=d>>>b,d=d&(1<<b)-1,f=Y*n+u,F=f<<2;
|
|
if(X!=0){if(i!=0&&d>>>p!=0){var r=d>>>p,q=(d&P)*h;if(r==1)V=q;else if(r==2)j=q;else if(r==3)C=q}else{var q=X+d*3;
|
|
j=s[q+0];C=s[q+1];V=s[q+2]}}else{j=d>>>0&255;C=d>>>8&255;V=d>>>16&255}e[F+0]=j;e[F+1]=C;e[F+2]=V;e[F+3]=255}}}return[{Sg:new df(0,0,n,A),data:e.buffer}]};
|
|
eY.vF={};eY.vF.or=!1;eY.vF.tC=function($,o,T,s){var E=$[0][4],e=new Uint8Array($[0][0]),n=2,A=E?!0:!1,u=A?4:3,Y=new Uint8Array(o*T*u);
|
|
for(var b=0;b<T;b++)for(var a=0;a<o;a++){var w=b*o+a<<2,X=((T-b-1)*o+a)*u;Y[X]=e[w+2];Y[X+1]=e[w+1];
|
|
Y[X+2]=e[w+0];if(A)Y[X+3]=E[0][b*o+a]}if(!0){var N=Y.length,z=0,i=new Uint8Array(N*2),k=0,Q=0,O=o*u;
|
|
while(Q<N){var c=Q,B=0,G=O*(Math.floor(Q/O)+1);while(c<G&&B<128){var l=!0;for(var f=0;f<u;f++)l=l&Y[Q+f]==Y[c+f];
|
|
if(!l)break;c+=u;B++}if(B==1){var v=1;while(v<128&&Q+(v+1)*u<G){var l=!0,p=Q+v*u;for(var f=0;f<u;f++)l=l&Y[p+f]==Y[p+u+f];
|
|
if(l)break;v++}i[k++]=v-1;for(var P=0;P<v;P++)for(var f=0;f<u;f++)i[k++]=Y[Q++]}else{i[k++]=127+B;for(var f=0;
|
|
f<u;f++)i[k+f]=Y[Q+f];k+=u;Q+=u*B;z+=B}}Y=i.slice(0,k);n+=8}var h=new Uint8Array(18+Y.length+26);h[2]=n;
|
|
t._P(h,12,o);t._P(h,14,T);h[16]=u*8;h[17]=u==4?8:0;h.set(Y,18);t.dt(h,18+Y.length+8,"TRUEVISION-XFILE.");
|
|
return h.buffer};eY.vF.yj=function($){var o=new Uint8Array($),T=0,s=o[0],E=o[1],e=o[2],n=o[4]*256+o[3],A=o[6]*256+o[5],u=o[7],Y=o[9]*256+o[8],b=o[11]*256+o[10],a=o[13]*256+o[12],w=o[15]*256+o[14],X=o[16],N=o[17],z=N>>>4,i=t.en(o,18,s),k=L.G(a*w*4),T=18+s+(A*u>>>3),Q=new Uint8Array(o.buffer,T);
|
|
if(e>3){var O=0,c=o,B=new Uint8Array(a*w*X>>>3),G=T,l=0,v=o.length,p=X>>>3;while(l<B.length){var J=c[G];
|
|
G++;if(J<128)for(var f=0;f<J+1;f++){for(var P=0;P<p;P++){B[l]=c[G];l++;G++}}else{for(var f=0;f<J-127;
|
|
f++){for(var P=0;P<p;P++){B[l]=c[G+P];l++}}G+=p}}e-=8;Q=B;T=G}else T+=a*w*X>>>3;var h=new Uint8Array(4),j=eY.vF.adw;
|
|
for(var C=0;C<w;C++)for(var V=0;V<a;V++){var d=(z&2)==0?(w-C-1)*a+V:C*a+V,m=C*a+V,R,g,S,F=255,r=d*X>>>3;
|
|
if(e==1){var q=0;if(X==8)q=Q[r];else throw"e";j(o,18+s+n+(q*u>>>3),u,h);R=h[0];g=h[1];S=h[2];F=h[3]}else if(e==2){j(Q,r,X,h);
|
|
R=h[0];g=h[1];S=h[2];F=h[3]}else if(e==3){if(X==8)R=g=S=Q[r];else throw"e"}var W=m*4;k[W]=R;k[W+1]=g;
|
|
k[W+2]=S;k[W+3]=F}var h={Sg:new df(0,0,a,w),data:k.buffer,y0:i};if(L.jh(k)){var Z=L.G(a*w);L.Ge(k,Z,3);
|
|
L.wr(k,4278190080,16777215);h.iy=[Z]}return[h]};eY.vF.adw=function($,o,T,s){var E,e,n,A=255;if(T==24||T==32){n=$[o];
|
|
e=$[o+1];E=$[o+2];if(T==32)A=$[o+3]}else if(T==16){var u=$[o+1]<<8|$[o+0];E=u>>>10&31;e=u>>>5&31;n=u>>>0&31;
|
|
E=Math.round(E*(255/31));e=Math.round(e*(255/31));n=Math.round(n*(255/31))}else throw"e";s[0]=E;s[1]=e;
|
|
s[2]=n;s[3]=A};eY.amv=function(){var $,o=[],T=!1;function s(n,A,u,Y){$=u;o.push(n,Y);E()}function E(){if(T||o.length==0)return;
|
|
T=!0;eY.ari(o.shift(),"image/avif",e)}function e(n){$(null,[n],o.shift());T=!1;E()}return{or:!1,Wl:!0,yj:s}}();
|
|
eY.a2V=function(){var $,o=[],T=!1,s,E,e,n,A,u;function Y(X,N,z,i){$=z;o.push(X,i);b()}function b(){if(T||o.length==0)return;
|
|
T=!0;s=document.createElement("canvas");E=s.getContext("2d");e=document.createElement("video");var X="data:"+"video/mp4"+";base64,"+eY.Qj(o.shift());
|
|
e.src=X;e.muted=!0;e.currentTime=0;e.addEventListener("canplay",a,!1);e.addEventListener("timeupdate",w,!1)}function a(X){e.removeEventListener("canplay",a);
|
|
n=s.width=e.videoWidth;A=s.height=e.videoHeight;u=[];e.play()}function w(X){var N=10;E.drawImage(e,0,0);
|
|
u.push({y0:"_a_"+u.length+","+Math.round(1e3/N),Sg:new df(0,0,n,A),data:E.getImageData(0,0,n,A).data.buffer});
|
|
var z=e.currentTime+1/N;if(z<e.duration)e.currentTime=z;else{$(null,u,o.shift());e.removeEventListener("timeupdate",w);
|
|
T=!1;b();u=null}}return{or:!1,Wl:!0,yj:Y}}();eY.X9={};eY.X9.yj=function($){var o=new Uint8Array($),T=0,s=112,E=42,e=t.cX,b;
|
|
T+=8;var n=o[T];T++;if(n!=E)throw"e";var A=e(o,T);T+=4;var u=t.KF(o,T,A);T+=A*2;var Y=[];while(T<o.length){b=e(o,T);
|
|
T+=4;if(b!=s)throw b;T+=4;b=o[T];T++;if(b!=E)throw b;var a=e(o,T);T+=4;var w=o[T];T++;if(w!=E){T-=5;
|
|
a=e(o,T);T+=8;b=o[T];T++;if(b!=E)throw b}var X=e(o,T)*2;T+=4;if(a>0)Y.push(T+X);T+=X+a}var N=new DOMParser,z=N.parseFromString(u,"image/svg+xml").firstChild.firstChild,i=[];
|
|
eY.X9.XL(z,o,Y,i);return i};eY.X9.XL=function($,o,T,s){var E=$.firstChild.firstChild;if(E.tagName=="Image"){var e=E.getElementsByTagName("ImageDescription")[0],n=e.children[0].children,A=e.children[1].children,u=T.shift(),Y=[];
|
|
for(var f=0;f<A.length;f++)Y.push(parseInt(A[f].getAttribute("NumberOfElements")));while(Y.length>3)Y[2]*=Y.pop();
|
|
var b=n.length,a=Y[0],w=Y[1],X=Y[2],N=parseInt(A[0].getAttribute("BytesInc"));for(var z=0;z<X;z++){var i=L.G(a*w*4);
|
|
L.wr(i,4278190080);for(var k=0;k<b;k++){var Q=L.G(a*w);if(N==1)for(var O=0;O<Q.length;O++)Q[O]=o[u+O];
|
|
else if(N==2)for(var O=0;O<Q.length;O++)Q[O]=Math.min(255,(o[u+O*2+1]<<8|o[u+O*2])>>>2);else throw N;
|
|
if(k!=3)L.aM(Q,i,k);if(b==1){L.aM(Q,i,1);L.aM(Q,i,2)}u+=a*w*N}s.push({Sg:new df(0,0,a,w),data:i.buffer})}}else{var c=$.children,B=0;
|
|
while(B<c.length&&c[B].tagName!="Children")B++;if(B==c.length)throw"e";c=c[B].children;for(var G=0;G<c.length;
|
|
G++)eY.X9.XL(c[G],o,T,s)}};eY.v8={};eY.v8.yj=function($){var o=new Uint8Array($),T=0,s={},b=1e9;for(var f=0;
|
|
f<306;f++){var E=t.en(o,T,8).trim(),e=t.en(o,T+9,71).split("/")[0].trim();s[E]=e;T+=80;if(E=="END"){T=Math.ceil(T/2880)*2880;
|
|
break}}var n=parseInt(s.NAXIS1),A=parseInt(s.NAXIS2),u=n*A,Y=parseInt(s.BITPIX),a=-1e9,w=new Float32Array(u),X=new Float32Array($,T,$.byteLength-T>>>2);
|
|
for(var f=0;f<u;f++){var N=f<<2,z=f<<1;if(Y==-32){var i=o[T+N+0];o[T+N+0]=o[T+N+3];o[T+N+3]=i;var i=o[T+N+1];
|
|
o[T+N+1]=o[T+N+2];o[T+N+2]=i;w[f]=X[f]}else if(Y==16){w[f]=t.w1(o,T+z)}else throw Y;var k=w[f];if(k<b)b=k;
|
|
if(k>a)a=k}var Q=L.G(u*4),O=1/a;for(var c=0;c<A;c++)for(var B=0;B<n;B++){var f=c*n+B,G=(A-c-1)*n+B,N=G<<2,k=w[f]*O;
|
|
Q[N]=Q[N+1]=Q[N+2]=255*k;Q[N+3]=255}return[{Sg:new df(0,0,n,A),data:Q,y0:s.OBJECT}]};eY.yH={};eY.yH.yj=function($){var o=new Uint8Array($),T=16,s=t.en(o,T,4),e=32,k=0,Q=0,O=!1,g;
|
|
T+=4;var E=t.en(o,T,8);T+=8;while(o[T+e-1]==0)e--;var n=t.en(o,T,e);T+=32;var A=t.en(o,T,4);T+=4;T+=20;
|
|
var u=t.s(o,T);T+=4;var Y=t.s(o,T);T+=4;var b=t.s(o,T);T+=4;var a=t.s(o,T);T+=4;var w=t.s(o,T);T+=4;
|
|
var X=t.s(o,T);T+=4;var N="FujiFilm "+n,z=[0,1,1,2];if(N=="FujiFilm X10"){N="FujiFilm FinePix X10";z=[2,1,1,0]}var i={t271:["FujiFilm"],t272:[N],t277:[1],t33421:[2,2],t33422:z,fW:1};
|
|
T=b;var c=[],B=t.mo,G=t.s(o,T);T+=4;for(var f=0;f<G;f++){var l=B(o,T);T+=2;var v=B(o,T);T+=2;if(l==256){Q=B(o,T);
|
|
k=B(o,T+2)}else if(l==272){c=[B(o,T),B(o,T+2)]}else if(l==273){c.push(B(o,T),B(o,T+2))}else if(l==304){O=!(o[T]>>>7)}else if(l==305){var p=Math.round(Math.sqrt(v)),P=[];
|
|
for(var h=0;h<v;h++)P.push(o[T+h]);P.reverse();i.t33421=[p,p];i.t33422=P}else if(l==12272){var j=B(o,T),C=B(o,T+2),V=B(o,T+6);
|
|
i.t50728=[j/C,1,j/V]}T+=v}var d=k<Q,m=o.slice(w,w+X),R=Math.round(X*8/(k*Q));if(m[0]==73&&m[1]==73&&m[2]==42){g=UTIF.decode(m.buffer)[0].fujiIFD;
|
|
R=g.t61443[0];var S=g.t61454,F=g.t61450;if(F)i.t50714=F;if(S)i.t50728=[S[0]/S[1],1,S[0]/S[2]];var r=g.t61447[0];
|
|
m=m.slice(r,r+g.t61448[0])}var X=m.length,q=X*8<k*Q*R;if(q){console.log("compressed");var W=i.t33422,Z=~~Math.sqrt(W.length),I=[];
|
|
for(var f=0;f<Z;f++)I[f]=W.slice(f*Z,f*Z+Z);m=new Uint8Array(UTIF._decompressRAF(m,I).buffer);X=m.length}function _(cv,f0,i8){i8=i8<<8-(f0&7);
|
|
var b5=f0>>>3;cv[b5]|=i8>>>16;cv[b5+1]|=i8>>>8;cv[b5+2]|=i8}var cN=X*8/(k*Q);if(cN==16)for(var f=0;f<X;
|
|
f+=2){var ce=m[f];m[f]=m[f+1];m[f+1]=ce}else if(cN==14){for(var f=0;f<X;f+=4){var ce=m[f];m[f]=m[f+3];
|
|
m[f+3]=ce;ce=m[f+1];m[f+1]=m[f+2];m[f+2]=ce}}else if(cN==12)for(var f=0;f<X;f+=3){var gf=m[f+2]<<16|m[f+1]<<8|m[f+0];
|
|
gf=gf>>>12|(gf&4095)<<12;m[f]=gf>>>16&255;m[f+1]=gf>>>8&255;m[f+2]=gf&255}if(d)m=eY.yH.aca(m,k,Q);var K=d?2:1;
|
|
k*=K;i.t256=[k];i.t257=[Q];i.t258=[R];i.t50719=[c[1],c[0]*K];i.t50720=[c[3],c[2]*K];i.width=k;i.height=Q;
|
|
i.data=new Uint8Array(m.buffer);return[i]};eY.yH.aca=function($,o,T){$=new Uint16Array($.buffer);var s=new Uint16Array(o*T*2);
|
|
for(var E=0;E<T;E+=2)for(var e=0;e<o;e++){var n=E*o+e,A=n*2,u=$[n],Y=$[n+o];s[A+1]=s[A+2*o]=Y;if(((E>>>1)+e&1)==0){s[A]=u;
|
|
s[A+2*o+1]=$[n+1]}else{s[A]=$[n-1];s[A+2*o+1]=u}}return s};eY.NG={};eY.NG.ND=!0;eY.NG.tC=function($,o,T,s){var E=new Uint8Array($[0][0]),e=o*T,n=[1,3,4][s[0]],A=8+8*s[1],u=s[2];
|
|
if(n==1){var Y=new Uint8Array(o*T);L.Ge(E,Y,0);E=Y}if(n==3){var Y=new Uint8Array(o*T*3);for(var f=0;
|
|
f<e;f++){var b=f*4,a=f*3;Y[a]=E[b];Y[a+1]=E[b+1];Y[a+2]=E[b+2]}E=Y}if(A==16){var w=E.length,Y=new Uint8Array(w*2);
|
|
for(var f=0;f<w;f++){var X=Math.round(E[f]*(65535/255));Y[f*2+u]=X>>>8;Y[f*2+1-u]=X&255}E=Y}return E.buffer};
|
|
eY.In={};eY.In.yj=function($,o){function T(u){return~~(.5+L.WH(Math.max(0,Math.min(1,u)))*255)}var s=EXRLoader.parse($),E=s.width,e=s.height,n=L.G(E*e*4);
|
|
for(var A=0;A<e;A++)for(var u=0;u<E;u++){var f=(A*E+u)*4,Y=((e-A-1)*E+u)*4;n[f]=T(s.data[Y+0]);n[f+1]=T(s.data[Y+1]);
|
|
n[f+2]=T(s.data[Y+2]);n[f+3]=T(s.data[Y+3])}return[{Sg:new df(0,0,E,e),data:n.buffer}]};eY.LT={};eY.LT.ND=!0;
|
|
eY.LT.or=!0;eY.LT.tC=function($,o,T,s,E){s=["",100,!1,!1,!1,0];s[6]=["jpg"];var e=new ToDXF;fn.JF($,s,e,E.vv);
|
|
return e.buffer};eY.LT.yj=function($,o){var T=72,s=new fY(1,0,0,1,0,0);s.scale(T/72,T/72);o.fG=T;var E=new cn(o,s,!1);
|
|
FromDXF.Parse($,E)};eY.Uk={};eY.Uk.yj=function(){var $=t.w1,o=t.cX,T=t.en,s;function E(n,A,u,Y,b){var a=o(n,u),w=o(n,u+4),X=o(n,u+8),N=$(n,u+12),z=$(n,u+14);
|
|
u+=16;var i={};for(var f=0;f<N+z;f++){var k=o(n,u),Q=o(n,u+4),O,c;if(k>>>31==1){k=k&16777215}if(f<N)O=t.KF(n,A+k+2,$(n,A+k));
|
|
else O="id"+k;var B=Y.slice(0);B.push(O);if(Q>>>31==1){Q=Q&268435455;c=E(n,A,A+Q,B,b)}else{var G=o(n,A+Q),l=o(n,A+Q+4),v=o(n,A+Q+8),p=o(n,A+Q+12);
|
|
if(p!=0)throw"e";if(G<b[0]||G>b[0]+b[1])throw"e";var P=b[2]+G-b[0];c=n.slice(P,P+l);var h=eY.RP(c.buffer);
|
|
if(h&&["bmp","png","ico"].indexOf(h)!=-1){var j=eY.Q1(h);if(!j.or){var C=null;try{C=j.yj(c.buffer)}catch(aX){}if(C){C[0].y0=B[1];
|
|
s.push(C[0])}}}else if(h)console.log(h)}i[O]=c;u+=8}return i}function e(n){s=[];var A=new Uint8Array(n),u=0,Y=$(A,u);
|
|
u+=2;u+=58;var b=o(A,u);u+=4;u=b;var a=T(A,u,4);u+=4;var w=$(A,u);u+=2;var X=$(A,u);u+=2;var N=o(A,u);
|
|
u+=4;var z=o(A,u);u+=4;var i=o(A,u);u+=4;var k=$(A,u);u+=2;var Q=$(A,u);u+=2;u+=k;var O={};for(var f=0;
|
|
f<X;f++){var c=u;while(A[c]!=0)c++;var B=T(A,u,c-u),G=o(A,u+8),l=o(A,u+12),v=o(A,u+16),p=o(A,u+20),P=o(A,u+24),h=o(A,u+28),j=$(A,u+32),C=$(A,u+34),Q=o(A,u+36);
|
|
O[B]=[l,G,p,v,Q];if(P+h!=0)throw"e";u+=40}for(var V in O){var d=O[V];u=d[2];if(V==".rsrc"){var m=E(A,u,u,[],d),R="id134"}}return s}return e}();
|
|
eY.FC={};eY.FC.or=!0;eY.FC.yj=function($,o){f9.$$($,o)};(function(){var $=eY.ME.get("wasm/zstd").buffer;
|
|
WebAssembly.instantiate($).then(function(o){var T=o.instance.exports;eY.FC.a6K=T})}());eY.FC.P1=function($,o){var T=eY.FC.a6K,s=$.length,E=T.memory,e=2*s+1e6,u=8;
|
|
eY.k8(T,e);var n=new Uint8Array(E.buffer),A=T.malloc(s);n.set($,A);while(!0){var Y=o==null?s*u:o;eY.k8(T,e+Y);
|
|
var b=T.malloc(Y),a=T.ZSTD_decompress(b,Y,A,s);if(a==-70){T.free(b);u+=4;if(o!=null)throw"error"}else{n=new Uint8Array(E.buffer);
|
|
$=n.slice(b,b+a);T.free(b);break}}T.free(A);return $};eY.GD={};eY.GD.or=!0;eY.GD.yj=function(){var $=0,o=1,T=2,s=3,E=4,e=5,n=6,A=7,u=1,Y=2,b=7,a=8,w=9,X,N,z,i,k;
|
|
function Q(){var J=t.$R(X,N);N+=4;return J}function O(){var g=0,S=0;for(var f=0;f<5;f++){var F=X[N++];
|
|
g+=(F&127)<<S;S+=7;if((F&128)==0)break}return g}function c(){var g=O(),S=t.LK(X,N,g);N+=g;return S}function B(){return{typeName:c(),a3T:Q()}}function G(){var g=Q(),S=c(),F=[],r=Q();
|
|
for(var f=0;f<r;f++)F.push([c()]);return{id:g,jA:S,a1a:F}}function l(g){var S=g.a1a,F=[];for(var f=0;
|
|
f<S.length;f++)S[f].push(X[N++]);for(var f=0;f<S.length;f++){var r=S[f][1],q;S[f].push(v(r))}}function v(g){var S;
|
|
if(g==$)S=X[N++];else if(g==s)S=c();else if(g==E)S=B();else if(g==o||g==T||g==n||g==e){}else throw g;
|
|
return S}function p(g,S,F){var r;if(g==$){if(S==u)r=X[N++]==1;else if(S==Y){r=X[N++]}else if(S==a)r=Q();
|
|
else if(S==w){r=Q();Q()}else throw S}else if(g==s){r=C(F+1)}else if(g==E){r=C(F+1)}else if(g==e){r=C(F+1)}else if(g==o){r=C(F+1)}else if(g==n){r=C(F+1)}else throw g;
|
|
return r}function P(g,S){var F=z["c"+g],r=F.a1a,q={_class:F.jA};for(var f=0;f<r.length;f++){var W=r[f],Z=W[1],I=W[2],_=p(Z,I,S),cN=W[0];
|
|
q[cN]=_}return q}function h(g,S,F,r){var q=[];for(var f=0;f<g;f++){var W=p(S,F,r);if(W.KR&&W.KR=="null_count"){var Z=W.ed;
|
|
for(var I=0;I<Z;I++)q.push(null);f+=Z-1}else q.push(W)}return q}function j(){return[Q(),Q()]}function C(g){if(g==null)throw"e";
|
|
var S=null,F=X[N],r=null;N++;if(F==0){var q=Q(),W=Q(),Z=Q(),I=Q();S=[q,W,Z,I]}else if(F==1){r=Q();var _=Q();
|
|
S=P(_,g)}else if(F==4){var cN=G();r=cN.id;l(cN);z["c"+cN.id]=cN;S=P(cN.id,g)}else if(F==5){var cN=G();
|
|
r=cN.id;l(cN);var ce=Q();z["c"+cN.id]=cN;S=P(cN.id,g)}else if(F==6){r=Q();var gf=c();S=gf}else if(F==7){r=Q();
|
|
var K=X[N++];if(K!=0)throw K;var cv=Q();if(cv!=1)throw cv;var f0=Q(),i8=X[N++],b5=v(i8);S=h(f0,i8,b5,g)}else if(F==9){var iC=Q();
|
|
S={KR:"ref",ed:iC};k["o"+iC]=!0}else if(F==10){S={KR:"null_count",ed:1}}else if(F==11){S={KR:"end"}}else if(F==12){var ce=Q(),an=c()}else if(F==13){var cO=X[N++];
|
|
S={KR:"null_count",ed:cO}}else if(F==16){var bh=j();r=bh[0];S=h(bh[1],E,null,g)}else if(F==17){var bh=j();
|
|
r=bh[0];S=h(bh[1],o,null,g)}else throw"e";if(r!=null&&r>0){if(i["o"+r]!=null)throw"e";i["o"+r]=S}return S}function V(g,i){if(g instanceof Array){for(var f=0;
|
|
f<g.length;f++)g[f]=d(g[f],i)}else if(g instanceof Object){for(var S in g)g[S]=d(g[S],i)}}function d(g,i){if(g&&g.KR&&g.KR=="ref")return i["o"+g.ed];
|
|
else return g}function m(g,S,F){X=new Uint8Array(g);N=0;z={};i={};k={};var r=t.en(X,0,4);if(r!="PDN3")throw r;
|
|
N+=4;var q=t.w1(X,N)+X[N+2]*256*256;N+=3;var W=t.en(X,N,q);N+=q;N+=2;while(!0){var Z=C(0);if(Z&&Z.KR&&Z.KR=="end")break}for(var I in k)if(i[I]==null)throw I;
|
|
for(var I in i)V(i[I],i);var _=i.o1;console.log(_);S.d=_.width;S.w=_.height;S.buffer=L.G(S.d*S.w*4);
|
|
var cN=_.layers["ArrayList+_items"];for(var f=0;f<cN.length;f++){var ce=cN[f];if(ce==null)continue;console.log(ce);
|
|
var gf=ce["Layer+width"],K=ce["Layer+height"],cv=ce["Layer+properties"],f0=ce.properties,i8=f0.blendOp._class.split("+").pop();
|
|
i8=i8.slice(0,i8.length-7);var b5={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"}[i8],iC=S.$f();
|
|
iC.tM(cv.name);iC.opacity=cv.opacity;iC.bC(cv.visible);iC.fh=b5;var an=1<<16,cO=Math.ceil(gf*K/an);iC.rect=new df(0,0,gf,K);
|
|
iC.buffer=L.G(gf*K*4);var bh=iC.buffer;N+=5;for(var bD=0;bD<cO;bD++){var fq=R();bh.set(fq[1],fq[0]*an*4)}for(var fO=0;
|
|
fO<bh.length;fO+=4){var g6=bh[fO+0];bh[fO+0]=bh[fO+2];bh[fO+2]=g6}S.u.push(iC)}}function R(){var g=t.s(X,N);
|
|
N+=4;var S=t.s(X,N);N+=4;var F=pako.inflateRaw(X.slice(N+10));N+=S;return[g,F]}return m}();function L(){}L.j={};
|
|
L.acp={};L.af2=function(){var $=[64,64,128,256,512,1024,2048],o=[];for(var f=0;f<$.length;f++){var T=$[f],s=document.createElement("canvas");
|
|
s.width=T;s.height=T;o.push(s.getContext("2d"))}return o}();L.iZ=function($,o){var T,s=L.af2,f=1,E=Math.max($,o);
|
|
while(f<s.length&&E>s[f].canvas.width)f++;if(f==s.length){T=s[0];var e=T.canvas;e.width=$;e.height=o}else{T=s[f];
|
|
T.clearRect(0,0,$,o)}return T};L.Cl=function($,o,T){var s={},E=0,e=0,n=new Uint32Array($.buffer),A=n.length,u=Date.now();
|
|
for(var Y=1;Y<T-1;Y++)for(var b=1;b<o-1;b++){var a=Y*o+b,w=n[a];if(w>>>24<230)e++;if(s[w]==null){s[w]=!0;
|
|
E++}}if(e!=0||E<20)return!1;return!0};L.qU=function($,o,T,s,E,e){if(E==null)E=e=0;s=Math.log(s)/Math.log(2);
|
|
s=Math.round(s);for(var f=0;f<T;f++)for(var n=0;n<o;n++){var A=f*o+n<<2,u=L.yx(f+e,n+E,s);$[A]=$[A+1]=$[A+2]=u;
|
|
$[A+3]=255}};L.yx=function(f,$,o){return 255-((f>>>o)+($>>>o)&1)*51};L.B$=function($){var o=$.toString(16);
|
|
while(o.length<6)o="0"+o;return o};L.oo=function($){return parseInt($,16)};L.Hl=function($){return.3*$.i+.59*$.m+.11*$.P};
|
|
L.M3=function($){return Math.max($.i,$.m,$.P)-Math.min($.i,$.m,$.P)};L.DB=function($,o,T){return.3*$+.59*o+.11*T};
|
|
L.a73=function($,o,T){return Math.max($,o,T)-Math.min($,o,T)};L.XT=function($,o){var T=o-$,s=Math.abs(T),E=T-1,e=T+1;
|
|
if(Math.abs(E)<s)T=E;else if(Math.abs(e)<s)T=e;return T};L.WH=function($){return $<.0031308?12.92*$:1.055*Math.pow($,1/2.4)-.055};
|
|
L.ag8=function($){return $<.04045?$/12.92:Math.pow(($+.055)/1.055,2.4)};L.aoe=function($,o){var T=Math.min($.length,o.length);
|
|
for(var f=0;f<T;f+=4){var s=$[f],E=$[f+1],e=$[f+2];o[f]=16+Math.floor(65.481/255*s+128.553/255*E+24.966/255*e+.5);
|
|
o[f+1]=128-Math.floor(37.797/255*s-74.203/255*E+112/255*e+.5);o[f+2]=128+Math.floor(112/255*s-93.786/255*E-18.214/255*e+.5);
|
|
o[f+3]=$[f+3]}};L.QZ=function($,o,T){var s=Math.max($,o,T),E=Math.min($,o,T),e=0,n=0,A=(s+E)*.5;if(s!=E){var u=s-E;
|
|
n=A>.5?u/(2-(s+E)):u/(s+E);switch(s){case $:e=(o-T)/u+(o<T?6:0);break;case o:e=(T-$)/u+2;break;case T:e=($-o)/u+4;
|
|
break}e*=1/6}return{cQ:e,rZ:n,FI:A}};L.AP=function($,o,T){var s,E,e;if(o==0)s=E=e=T;else{var n=T<.5?T*(1+o):T+o-T*o,A=2*T-n;
|
|
s=L.yK(A,n,$+1/3);E=L.yK(A,n,$);e=L.yK(A,n,$-1/3)}return{i:s,m:E,P:e}};L.yK=function($,o,T){if(T<0)T+=1;
|
|
if(T>1)T-=1;if(T<1/6)return $+(o-$)*6*T;if(T<1/2)return o;if(T<2/3)return $+(o-$)*(2/3-T)*6;return $};
|
|
L.sY=function($,o,T){var s=Math.max($,o,T),E=Math.min($,o,T),e,n,A=s,u=s-E;n=s==0?0:u/s;if(s==E)e=0;
|
|
else{switch(s){case $:e=(o-T)/u+(o<T?6:0);break;case o:e=(T-$)/u+2;break;case T:e=($-o)/u+4;break}e*=1/6}return{cQ:e,rZ:n,ed:A}};
|
|
L.ag=function($,o,T){var s,E,e,f,n,A,u,Y;f=Math.floor($*6);n=$*6-f;A=T*(1-o);u=T*(1-n*o);Y=T*(1-(1-n)*o);
|
|
switch(f%6){case 0:s=T,E=Y,e=A;break;case 1:s=u,E=T,e=A;break;case 2:s=A,E=T,e=Y;break;case 3:s=A,E=u,e=T;
|
|
break;case 4:s=Y,E=A,e=T;break;case 5:s=T,E=A,e=u;break}return{i:s,m:E,P:e}};L.$w=function(){var $=[],o=[];
|
|
for(var f=0;f<2e3;f++){var T=f/1e3;$[f]=L.ag8(T);o[f]=T>.008856?Math.pow(T,1/3):(903.3*T+16)*(1/116)}return[$,o]}();
|
|
L.l1=function($,o,T){var s=L.$w[0],E=L.$w[1];$=s[~~($*(1e3/255))];o=s[~~(o*(1e3/255))];T=s[~~(T*(1e3/255))];
|
|
var e=L.tK.ake,n=e[0]*$+e[1]*o+e[2]*T,A=e[4]*$+e[5]*o+e[6]*T,u=e[8]*$+e[9]*o+e[10]*T;n=n*(100/96.72);
|
|
A=A*(100/100);u=u*(100/81.427);return L.Sc(n,A,u)};L.Sc=function($,o,T){var s=L.$w[1],E=s[~~($*1e3)],e=s[~~(o*1e3)],n=s[~~(T*1e3)];
|
|
return{vA:116*e-16,Ca:500*(E-e),P:200*(e-n)}};L.u3=function($,o,T){var s=903.3,E=.008856,e=($+16)/116,n=e*e*e,A=e-T/200,u=A*A*A,Y=o/500+e,b=Y*Y*Y,a=u>E?u:(116*A-16)/s,w=n>E?n:(116*e-16)/s,X=b>E?b:(116*Y-16)/s,N=X*96.72,z=w*100,i=a*81.427,k=L.tK.OG(L.tK.UO,[N/100,z/100,i/100,0]);
|
|
for(var f=0;f<4;f++)k[f]=Math.max(0,Math.min(255,L.WH(k[f])*255));return{i:k[0],m:k[1],P:k[2]}};L._y=function($,o,T,s,E){var e=$.vA,n=$.Ca,A=$.P,u=(e<o.vA?o.vA-e:T.vA<e?T.vA-e:0)*(1/100),Y=(n<o.Ca?o.Ca-n:T.Ca<n?T.Ca-n:0)*(1/116),b=(A<o.P?o.P-A:T.P<A?T.P-A:0)*(1/116),a=Math.sqrt(u*u+Y*Y+b*b)*1.35;
|
|
return a<=s?Math.min(1,1.17*(1-a*E)):0};L.h$=function($,o,T){var s=$.length,E=.3,e=.59,n=.11;if(T){E=T[0];
|
|
e=T[1];n=T[2]}for(var f=0;f<s;f+=4)o[f>>2]=~~($[f+0]*E+$[f+1]*e+$[f+2]*n+.5)};L.R6=function($,o){var T=o.length;
|
|
for(var f=0;f<T;f+=4){var s=$[f>>>2];o[f]=s;o[f+1]=s;o[f+2]=s}};L.dy=function($,o){var T=$.Ca,s=$.i,E=$.m,e=$.P,n=Math.min($.Ca.length,o.buffer.byteLength>>>2),A=4*Math.floor(n/4),u=new Uint32Array(o.buffer),Y=new Uint32Array(T.buffer),b=new Uint32Array(s.buffer),a=new Uint32Array(E.buffer),w=new Uint32Array(e.buffer);
|
|
for(var f=0;f<A;f+=4){var X=Y[f>>2],N=w[f>>2],z=a[f>>2],i=b[f>>2];u[f]=X<<24|(N&255)<<16|(z&255)<<8|i&255;
|
|
u[f+1]=(X&65280)<<16|(N&65280)<<8|z&65280|(i&65280)>>>8;u[f+2]=(X&16711680)<<8|N&16711680|(z&16711680)>>>8|(i&16711680)>>>16;
|
|
u[f+3]=X&4278190080|(N&4278190080)>>>8|(z&4278190080)>>>16|(i&4278190080)>>>24}for(var f=A;f<n;f++)u[f]=T[f]<<24|e[f]<<16|E[f]<<8|s[f]};
|
|
L.KT=function($,o){var T=o.Ca,s=o.i,E=o.m,e=o.P,n=Math.min(o.Ca.length,$.buffer.byteLength>>>2),A=4*Math.floor(n/4),u=new Uint32Array($.buffer),Y=new Uint32Array(T.buffer),b=new Uint32Array(s.buffer),a=new Uint32Array(E.buffer),w=new Uint32Array(e.buffer);
|
|
for(var f=0;f<A;f+=4){var X=u[f],N=u[f+1],z=u[f+2],i=u[f+3];b[f>>2]=X&255|(N&255)<<8|(z&255)<<16|i<<24;
|
|
a[f>>2]=(X&65280)>>8|N&65280|(z&65280)<<8|(i&65280)<<16;w[f>>2]=(X&16711680)>>16|(N&16711680)>>8|z&16711680|(i&16711680)<<8;
|
|
Y[f>>2]=X>>>24|N>>>24<<8|z>>>24<<16|i&4278190080}for(var f=A;f<n;f++){var k=u[f];s[f]=k>>0&255;E[f]=k>>8&255;
|
|
e[f]=k>>16&255;T[f]=k>>24&255}};L.Ge=function($,o,T){var s=new Uint8Array($.buffer),E=Math.min(s.length/4,o.length);
|
|
for(var f=0;f<E;f++){o[f]=s[(f<<2)+T]}};L.aM=function($,o,T){var s=new Uint8Array(o.buffer),E=new Uint32Array($.buffer),e=Math.min(s.length/4,$.length),f=0;
|
|
while(f+4<e){var n=E[f>>>2];s[(f<<2)+T]=n&255;s[(f<<2)+T+4]=n>>>8&255;s[(f<<2)+T+8]=n>>>16&255;s[(f<<2)+T+12]=n>>>24;
|
|
f+=4}while(f<e){s[(f<<2)+T]=$[f];f++}};L.wr=function($,o,T){if(T==null)T=0;var s=new Uint32Array($.buffer),E=s.length;
|
|
for(var f=0;f<E;f++)s[f]=s[f]&T|o};L.aqz=function($,o,T,s,E){if(E==null)E=0;var e=new Uint32Array($.buffer);
|
|
T=T.Sr(o);var n=T.x-o.x,A=T.y-o.y,u=T.d,Y=T.w,b=o.d;for(var a=0;a<Y;a++){var f=(A+a)*b+n;for(var w=0;
|
|
w<u;w++){e[f]=e[f]&E|s;f++}}};L.w0=function($,o){var T=Math.min($.buffer.byteLength,o.buffer.byteLength),s=T>>>2,$=new Uint32Array($.buffer,0,s),o=new Uint32Array(o.buffer,0,s);
|
|
o.set($)};L.R1=function($,o){var T=$.buffer.byteLength,s=o.buffer.byteLength,E=new Uint32Array($.buffer,0,T>>2),e=new Uint32Array(o.buffer,0,s>>2);
|
|
if(T!=s)return!1;var n=E.length;for(var f=0;f<n;f++)if(e[f]!=E[f])return!1;return!0};L.lY=function($){var o=new Uint32Array($.buffer),T=o.length;
|
|
for(var f=0;f<T;f++)o[f]=~o[f]};L.a9b=function($){var o=$.length;for(var f=0;f<o;f+=4){$[f]=~$[f];$[f+1]=~$[f+1];
|
|
$[f+2]=~$[f+2]}};L.adl=function($){var o=$.length;for(var f=3;f<o;f+=4)$[f]=~$[f]};L.alv=function($){return $+($%4==0?0:4-$%4)};
|
|
L.G=function($,o){if(o==null)o=!1;if(!o)$=L.alv($);try{var T=new Uint8Array($)}catch(aX){alert("Not enough RAM! (need "+Math.round($/(1<<20))+" MB)",7e3);
|
|
throw"low_ram"}return T};L.mc=function($){var o=$.length,T=$[o-2],s=$[o-1];while(s.d>=2&&s.w>=2){var E=L.tk(T,s);
|
|
$.push(E._3,E.rect);T=E._3;s=E.rect}};L.Fg=function($){var o=$.length,T=$[o-2],s=$[o-1];while(s.d>=2&&s.w>=2){var E=L.jy(T,s);
|
|
$.push(E._3,E.rect);T=E._3;s=E.rect}};L.tk=function($,o,T){var s=o.d,E=o.w,e=s>>1,n=E>>1,A=new df(o.x,o.y,e,n),u=T&&T.length==e*n*4?T:L.G(e*n*4),Y=new Uint32Array($.buffer),b=new Uint32Array(u.buffer);
|
|
for(var a=0;a<n;a++)for(var w=0;w<e;w++){var X=a*e+w,N=(a<<1)*s+(w<<1),z=Y[N],i=Y[N+1],k=Y[N+s],Q=Y[N+s+1],O=z>>>24,c=i>>>24,B=k>>>24,G=Q>>>24,l=O+c+B+G;
|
|
if(l==1020){var v=(z>>>0&255)+(i>>>0&255)+(k>>>0&255)+(Q>>>0&255)+2>>>2,p=(z>>>8&255)+(i>>>8&255)+(k>>>8&255)+(Q>>>8&255)+2>>>2,P=(z>>>16&255)+(i>>>16&255)+(k>>>16&255)+(Q>>>16&255)+2>>>2;
|
|
b[X]=255<<24|P<<16|p<<8|v}else if(l==0)b[X]=0;else{var v=(z>>>0&255)*O+(i>>>0&255)*c+(k>>>0&255)*B+(Q>>>0&255)*G,p=(z>>>8&255)*O+(i>>>8&255)*c+(k>>>8&255)*B+(Q>>>8&255)*G,P=(z>>>16&255)*O+(i>>>16&255)*c+(k>>>16&255)*B+(Q>>>16&255)*G,h=1/l;
|
|
v=~~(v*h+.5);p=~~(p*h+.5);P=~~(P*h+.5);b[X]=l+2>>>2<<24|P<<16|p<<8|v}}return{rect:A,_3:u}};L.gc=function($,o,T){var s=o.d,E=o.w,e=s>>1,n=E>>1,A=new df(o.x,o.y,e,n),u=T&&T.length==e*n*4?T:L.G(e*n*4),Y=new Uint32Array($.buffer),b=new Uint32Array(u.buffer);
|
|
for(var a=0;a<n;a++)for(var w=0;w<e;w++){var X=a*e+w,N=(a<<1)*s+(w<<1),z=Y[N],i=Y[N+1],k=Y[N+s],Q=Y[N+s+1],O=2+(z>>>0&255)+(i>>>0&255)+(k>>>0&255)+(Q>>>0&255)>>>2,c=2+(z>>>8&255)+(i>>>8&255)+(k>>>8&255)+(Q>>>8&255)>>>2,B=2+(z>>>16&255)+(i>>>16&255)+(k>>>16&255)+(Q>>>16&255)>>>2,G=2+(z>>>24&255)+(i>>>24&255)+(k>>>24&255)+(Q>>>24&255)>>>2;
|
|
b[X]=G<<24|B<<16|c<<8|O}return{rect:A,_3:u}};L.anx=function($,o,T){var s=o.d,E=o.w,e=2*Math.floor(s/3),n=2*Math.floor(E/3),A=new df(o.x,o.y,e,n),u=T&&T.length==e*n*4?T:L.G(e*n*4),Y=new Uint32Array($.buffer),b=new Uint32Array(u.buffer);
|
|
for(var a=0;a<n;a+=2)for(var w=0;w<e;w+=2){var X=a*e+w,N=(a*3>>>1)*s+(w*3>>>1),z=Y[N],i=Y[N+1],k=Y[N+2],Q=Y[N+s],O=Y[N+1+s],c=Y[N+2+s],B=Y[N+s+s],G=Y[N+1+s+s],l=Y[N+2+s+s],v=z>>>24<<2,p=(z>>>16&255)*v,P=(z>>>8&255)*v,h=(z&255)*v,j=i>>>24<<1,C=(i>>>16&255)*j,V=(i>>>8&255)*j,d=(i&255)*j,m=k>>>24<<2,R=(k>>>16&255)*m,g=(k>>>8&255)*m,S=(k&255)*m,F=Q>>>24<<1,r=(Q>>>16&255)*F,q=(Q>>>8&255)*F,W=(Q&255)*F,Z=O>>>24,I=(O>>>16&255)*Z,_=(O>>>8&255)*Z,cN=(O&255)*Z,ce=c>>>24<<1,gf=(c>>>16&255)*ce,K=(c>>>8&255)*ce,cv=(c&255)*ce,f0=B>>>24<<2,i8=(B>>>16&255)*f0,b5=(B>>>8&255)*f0,iC=(B&255)*f0,an=G>>>24<<1,cO=(G>>>16&255)*an,bh=(G>>>8&255)*an,bD=(G&255)*an,fq=l>>>24<<2,fO=(l>>>16&255)*fq,g6=(l>>>8&255)*fq,hM=(l&255)*fq,d3=v+j+F+Z,h9=m+j+ce+Z,cs=f0+an+F+Z,dv=fq+an+ce+Z,ec=d3==0?0:1/d3,gT=h9==0?0:1/h9,iz=cs==0?0:1/cs,gw=dv==0?0:1/dv,iI=0,g2=0,bb=0,ir=0;
|
|
iI=~~(.5+(h+d+W+cN)*ec);g2=~~(.5+(P+V+q+_)*ec);bb=~~(.5+(p+C+r+I)*ec);ir=~~(.5+d3*(1/9));b[X]=ir<<24|bb<<16|g2<<8|iI;
|
|
iI=~~(.5+(S+d+cv+cN)*gT);g2=~~(.5+(g+V+K+_)*gT);bb=~~(.5+(R+C+gf+I)*gT);ir=~~(.5+h9*(1/9));b[X+1]=ir<<24|bb<<16|g2<<8|iI;
|
|
iI=~~(.5+(iC+bD+W+cN)*iz);g2=~~(.5+(b5+bh+q+_)*iz);bb=~~(.5+(i8+cO+r+I)*iz);ir=~~(.5+cs*(1/9));b[X+e]=ir<<24|bb<<16|g2<<8|iI;
|
|
iI=~~(.5+(hM+bD+cv+cN)*gw);g2=~~(.5+(g6+bh+K+_)*gw);bb=~~(.5+(fO+cO+gf+I)*gw);ir=~~(.5+dv*(1/9));b[X+e+1]=ir<<24|bb<<16|g2<<8|iI}return{rect:A,_3:u}};
|
|
L.abR=function($,o,T){var s=o.d,E=o.w,e=2*Math.floor(s/3),n=2*Math.floor(E/3),A=new df(o.x,o.y,e,n),u=T&&T.length==e*n*4?T:L.G(e*n*4),Y=new Uint32Array($.buffer),b=new Uint32Array(u.buffer);
|
|
for(var a=0;a<n;a+=2)for(var w=0;w<e;w+=2){var X=a*e+w,N=(a*3>>>1)*s+(w*3>>>1),z=Y[N],i=Y[N+1],k=Y[N+2],Q=Y[N+s],O=Y[N+1+s],c=Y[N+2+s],B=Y[N+s+s],G=Y[N+1+s+s],l=Y[N+2+s+s],v=(z>>>16&255)<<2,p=(z>>>8&255)<<2,P=(z&255)<<2,h=(i>>>16&255)<<1,j=(i>>>8&255)<<1,C=(i&255)<<1,V=(k>>>16&255)<<2,d=(k>>>8&255)<<2,m=(k&255)<<2,R=(Q>>>16&255)<<1,g=(Q>>>8&255)<<1,S=(Q&255)<<1,F=O>>>16&255,r=O>>>8&255,q=O&255,W=(c>>>16&255)<<1,Z=(c>>>8&255)<<1,I=(c&255)<<1,_=(B>>>16&255)<<2,cN=(B>>>8&255)<<2,ce=(B&255)<<2,gf=(G>>>16&255)<<1,K=(G>>>8&255)<<1,cv=(G&255)<<1,f0=(l>>>16&255)<<2,i8=(l>>>8&255)<<2,b5=(l&255)<<2,iC=0,an=0,cO=0;
|
|
iC=~~(.5+(P+C+S+q)*(1/9));an=~~(.5+(p+j+g+r)*(1/9));cO=~~(.5+(v+h+R+F)*(1/9));b[X]=255<<24|cO<<16|an<<8|iC;
|
|
iC=~~(.5+(m+C+I+q)*(1/9));an=~~(.5+(d+j+Z+r)*(1/9));cO=~~(.5+(V+h+W+F)*(1/9));b[X+1]=255<<24|cO<<16|an<<8|iC;
|
|
iC=~~(.5+(ce+cv+S+q)*(1/9));an=~~(.5+(cN+K+g+r)*(1/9));cO=~~(.5+(_+gf+R+F)*(1/9));b[X+e]=255<<24|cO<<16|an<<8|iC;
|
|
iC=~~(.5+(b5+cv+I+q)*(1/9));an=~~(.5+(i8+K+Z+r)*(1/9));cO=~~(.5+(f0+gf+W+F)*(1/9));b[X+e+1]=255<<24|cO<<16|an<<8|iC}return{rect:A,_3:u}};
|
|
L.jh=function($){var o=255,T=$.length;T-=T&31;for(var f=3;f<T;f+=32)o=o&$[f]&$[f+4]&$[f+8]&$[f+12]&$[f+16]&$[f+20]&$[f+24]&$[f+28];
|
|
return o!=255};L.aeA=function($,o,T,s){var E=L.tk,e=L.anx,A=0;if(!L.jh($)){E=L.gc;e=L.abR}var n={_3:$,rect:o},u=T;
|
|
while(u<.499){A++;u*=2}for(var f=0;f<A;f++)n=E(n._3,n.rect,s);if(u<.5001)n=E(n._3,n.rect,s);else n=e(n._3,n.rect,s);
|
|
return n};L.a9I=function($,o,T,s){var E=L.jy,e=L.QO,n={_3:$,rect:o},A=0,u=T;while(u<.499){A++;u*=2}for(var f=0;
|
|
f<A;f++)n=E(n._3,n.rect,s);if(u<.5001)n=E(n._3,n.rect,s);else n=e(n._3,n.rect,s);return n};L.jy=function($,o,T){var s=o.d,E=o.w,e=s>>1,n=E>>1,A=new df(o.x,o.y,e,n);
|
|
if($==null)return{rect:A};var u=T&&T.length>=e*n?T:L.G(e*n);for(var Y=0;Y<n;Y++){var b=Y*e;for(var a=0;
|
|
a<e;a++){var w=(Y<<1)*s+(a<<1);u[b+a]=2+$[w]+$[w+1]+$[w+s]+$[w+s+1]>>>2}}return{rect:A,_3:u}};L.QO=function($,o,T){var s=o.d,E=o.w,e=2*Math.floor(s/3),n=2*Math.floor(E/3),A=new df(o.x,o.y,e,n);
|
|
if($==null)return{rect:A};var u=T&&T.length>=e*n?T:L.G(e*n);for(var Y=0;Y<n;Y+=2)for(var b=0;b<e;b+=2){var a=Y*e+b,w=(Y*3>>>1)*s+(b*3>>>1),X=$[w]<<2,N=$[w+1]<<1,z=$[w+2]<<2,i=$[w+s]<<1,k=$[w+1+s],Q=$[w+2+s]<<1,O=$[w+s+s]<<2,c=$[w+1+s+s]<<1,B=$[w+2+s+s]<<2;
|
|
u[a]=~~(.5+(X+N+i+k)*(1/9));u[a+1]=~~(.5+(z+N+Q+k)*(1/9));u[a+e]=~~(.5+(O+c+i+k)*(1/9));u[a+e+1]=~~(.5+(B+c+Q+k)*(1/9))}return{rect:A,_3:u}};
|
|
L.pg=function($,o,T,s,E){var e=o.Sr(s);if(E)e=e.Sr(E);var n=Math.max(0,e.x-o.x),A=Math.max(0,e.x-s.x),u=Math.max(0,e.y-o.y),Y=Math.max(0,e.y-s.y),b=e.d,a=e.w;
|
|
for(var f=0;f<a;f++){var w=(u+f)*o.d+n,X=(Y+f)*s.d+A;for(var N=0;N<b;N++){T[X+N]=$[w+N]}}};L.K_=function($,o,T,s){if(o.R1(s)){L.aM($,T,3);
|
|
return}var E=o.Sr(s),e=Math.max(0,E.x-o.x),n=Math.max(0,E.x-s.x),A=Math.max(0,E.y-o.y),u=Math.max(0,E.y-s.y),Y=E.d,b=E.w;
|
|
for(var f=0;f<b;f++){var a=(A+f)*o.d+e,w=(u+f)*s.d+n;for(var X=0;X<Y;X++)T[(w+X<<2)+3]=$[a+X]}};L.ok=function($,o,T,s){var E=o.Sr(s),e=Math.max(0,E.x-o.x),n=Math.max(0,E.x-s.x),A=Math.max(0,E.y-o.y),u=Math.max(0,E.y-s.y),Y=E.d,b=E.w;
|
|
for(var f=0;f<b;f++){var a=(A+f)*o.d+e,w=(u+f)*s.d+n;for(var X=0;X<Y;X++)T[w+X]=$[(a+X<<2)+3]}};L.h9=function($,o,T,s,E){if(o.R1(s)&&(E==null||E.R1(s))){L.w0($,T);
|
|
return}$=new Uint32Array($.buffer),T=new Uint32Array(T.buffer);var e=o.Sr(s);if(E)e=e.Sr(E);var n=Math.max(0,e.x-o.x),A=Math.max(0,e.x-s.x),u=Math.max(0,e.y-o.y),Y=Math.max(0,e.y-s.y),b=e.d,a=e.w,w=b&3,X=w==0?b:b-w;
|
|
for(var f=0;f<a;f++){var N=(u+f)*o.d+n,z=(Y+f)*s.d+A;T.set(new Uint32Array($.buffer,N*4,b),z)}};L.Yx=function($,o,T,s){var E=o.Sr(s),e=Math.max(0,E.x-o.x),n=Math.max(0,E.x-s.x),A=Math.max(0,E.y-o.y),u=Math.max(0,E.y-s.y),Y=E.d,b=E.w,a=$.Ca,w=$.i,X=$.m,N=$.P,z=T.Ca,i=T.i,k=T.m,Q=T.P;
|
|
for(var f=0;f<b;f++){var O=(A+f)*o.d+e,c=(u+f)*s.d+n;for(var B=0;B<Y;B++){z[c+B]=a[O+B];i[c+B]=w[O+B];
|
|
k[c+B]=X[O+B];Q[c+B]=N[O+B]}}};L.qc=function($){var o=$.length;for(var f=0;f<o;f+=4){var T=$[f+3];if(T==255)continue;
|
|
$[f]=~~($[f]*T*(1/255)+.5);$[f+1]=~~($[f+1]*T*(1/255)+.5);$[f+2]=~~($[f+2]*T*(1/255)+.5)}};L.tr=function($){var o=$.length;
|
|
for(var f=0;f<o;f+=4){var T=$[f+3];if(T==0||T==255)continue;var s=255/T;$[f]=~~($[f]*s+.5);$[f+1]=~~($[f+1]*s+.5);
|
|
$[f+2]=~~($[f+2]*s+.5)}};L.tD=function($,o){for(var f=0;f<$.length;f++)if($[f]!=o)return!1;return!0};
|
|
L.Z$=function($){return $+1+($>>>8)>>>8};L.round=function($,o){if(o==null)o=128;var T=$.length;for(var f=0;
|
|
f<T;f++)$[f]=$[f]<o?0:255};L.wO=function($,o){var T=$.length;for(var f=0;f<T;f++)$[f]=Math.round($[f]*o)};
|
|
L.nh=function($,o){var T=new Uint32Array($.buffer),s=new Uint32Array(o.buffer),E=T.length;for(var f=0;
|
|
f<E;f++){var e=T[f],n=s[f];s[f]=L.Z$((e>>>24)*(n>>>24))<<24|L.Z$((e>>>16&255)*(n>>>16&255))<<16|L.Z$((e>>>8&255)*(n>>>8&255))<<8|L.Z$((e&255)*(n&255))}};
|
|
L.EL=function($,o){var T=$.length;for(var f=0;f<T;f++)o[(f<<2)+3]=L.Z$(o[(f<<2)+3]*$[f])};L.a8J=function($,o,T,s){var E=Math.max(0,s.x-o.x),e=Math.max(0,o.x-s.x),n=Math.max(0,s.y-o.y),A=Math.max(0,o.y-s.y),u=Math.min(o.x+o.d,s.x+s.d)-Math.max(o.x,s.x),Y=Math.min(o.y+o.w,s.y+s.w)-Math.max(o.y,s.y);
|
|
for(var f=0;f<Y;f++){var b=(n+f)*o.d+E,a=(A+f)*s.d+e;for(var w=0;w<u;w++){T[a]=L.Z$(T[a]*$[b]);b++;a++}}};
|
|
L.Li=function($,o,T,s){var E=Math.max(0,s.x-o.x),e=Math.max(0,o.x-s.x),n=Math.max(0,s.y-o.y),A=Math.max(0,o.y-s.y),u=Math.min(o.x+o.d,s.x+s.d)-Math.max(o.x,s.x),Y=Math.min(o.y+o.w,s.y+s.w)-Math.max(o.y,s.y);
|
|
for(var f=0;f<Y;f++){var b=(n+f)*o.d+E,a=((A+f)*s.d+e<<2)+3;for(var w=0;w<u;w++){T[a]=L.Z$(T[a]*$[b]);
|
|
b++;a+=4}}};L.nB=function($,o,T,s){var E=Math.max(0,s.x-o.x),e=Math.max(0,o.x-s.x),n=Math.max(0,s.y-o.y),A=Math.max(0,o.y-s.y),u=Math.min(o.x+o.d,s.x+s.d)-Math.max(o.x,s.x),Y=Math.min(o.y+o.w,s.y+s.w)-Math.max(o.y,s.y);
|
|
for(var f=0;f<Y;f++){var b=((n+f)*o.d+E<<2)+3,a=((A+f)*s.d+e<<2)+3;for(var w=0;w<u;w++){T[a]=L.Z$(T[a]*$[b]);
|
|
b+=4;a+=4}}};L.lm=function($){var o=new Float64Array(256),T=new Float64Array(256),s=new Float64Array(256),E=new Float64Array(256),e=$.length,n=0;
|
|
for(var f=0;f<e;f+=4){var A=$[f+3],u=A*(1/255);T[$[f+0]]+=u;s[$[f+1]]+=u;E[$[f+2]]+=u;n+=A}for(var f=0;
|
|
f<256;f++)o[f]=T[f]+s[f]+E[f];return[o,T,s,E,e>>>2,n/255]};L.$m=function($,o){var T=new Uint32Array($.buffer),s=T.length;
|
|
for(var f=0;f<s;f++){var E=T[f],e=E&255,n=E>>8&255,A=E>>16&255,u=E>>24&255;T[f]=o[e]|o[n]<<8|o[A]<<16|o[u]<<24}};
|
|
L.aj2=function($,o,T,s,E,e,n){var A=new Uint32Array($.buffer),u=new Uint32Array(o.buffer),Y=A.length,b=0;
|
|
while(256<<b<T.length)b++;if(!n&&!e){for(var f=0;f!=Y;f++){var a=A[f],w=(a&255)<<b,X=(a>>>8&255)<<b,N=(a>>>16&255)<<b,z=T[w],i=s[X],k=E[N];
|
|
u[f]=z|i<<8|k<<16|a&4278190080}return}for(var f=0;f<Y;f++){var a=A[f],w=(a&255)<<b,X=(a>>>8&255)<<b,N=(a>>>16&255)<<b;
|
|
if(e)w=X=N=Math.round(w*.3+X*.59+N*.11);var z=T[w],i=s[X],k=E[N];if(n){var Q=L.DB(w,X,N),O=L.DB(z,i,k);
|
|
if(Q>O){var c=(Q-O)/(255-O);z+=c*(255-z);i+=c*(255-i);k+=c*(255-k)}else if(O==0)z=i=k=0;else{var c=Q/O;
|
|
z=c*z;i=c*i;k=c*k}}u[f]=z|i<<8|k<<16|a&4278190080}};L.ac=function($,o){var T=o.d,s=o.w,top=0,E=0,e=0,n=0,A=0;
|
|
A=0;for(var u=0;u<s;u++){var Y=u*T;for(var f=0;f<T;f++)A|=$[Y+f];if(A!=0)break;top++}if(top==s)return new df(0,0,0,0);
|
|
A=0;for(var u=s-1;u>=0;u--){var Y=u*T;for(var f=0;f<T;f++)A|=$[Y+f];if(A!=0)break;e++}var b=s-e;A=0;
|
|
for(var f=0;f<T;f++){for(var u=top;u<b;u++)A|=$[u*T+f];if(A!=0)break;E++}A=0;for(var f=T-1;f>=0;f--){for(var u=top;
|
|
u<b;u++)A|=$[u*T+f];if(A!=0)break;n++}var a=new df(o.x+E,o.y+top,T-E-n,s-top-e);return a};L.UI=function($,o,T,s){if(s==null)s=[!0,!0,!0,!0];
|
|
if(T==null)T=0;var E=new Uint32Array($.buffer),e=o.d,n=o.w,top=0,A=0,u=0,Y=0,b=!1,a=[E[0],E[E.length-1],0][T];
|
|
b=!1;if(s[0])for(var w=0;w<n;w++){var X=w*e;for(var f=0;f<e;f++)if(E[X+f]!=a)b=!0;if(b)break;top++}b=!1;
|
|
if(s[2])for(var w=n-1;w>=0;w--){var X=w*e;for(var f=0;f<e;f++)if(E[X+f]!=a)b=!0;if(b)break;u++}b=!1;
|
|
if(s[1])for(var f=0;f<e;f++){for(var w=0;w<n;w++)if(E[w*e+f]!=a)b=!0;if(b)break;A++}b=!1;if(s[3])for(var f=e-1;
|
|
f>=0;f--){for(var w=0;w<n;w++)if(E[w*e+f]!=a)b=!0;if(b)break;Y++}var N=new df(o.x+A,o.y+top,e-A-Y,n-top-u);
|
|
return N.p4()?new df(0,0,0,0):N};L.Gg=function($){var o=L.ac($.channel,$.rect);if(o.R1($.rect))return;
|
|
var T=L.G(o.Y());L.pg($.channel,$.rect,T,o);$.channel=T;$.rect=o};L.oE=function($){var o=L.G($.buffer.length>>2);
|
|
L.Ge($.buffer,o,3);var T=L.ac(o,$.rect);if(T.R1($.rect))return;var s=new L.G(T.Y()*4);L.h9($.buffer,$.rect,s,T);
|
|
$.buffer=s;$.rect=T};L.extend=function($,o,T){if($.rect.Yg(o))return;var s=$.rect.BZ(o),E=L.G(s.Y());
|
|
if(T!=null)E.fill(T);L.pg($.channel,$.rect,E,s);$.rect=s;$.channel=E};L.a0p=function($,o){if(o.p4()||$.rect.Yg(o))return;
|
|
var T=$.rect.BZ(o),s=L.G(T.Y()*4);L.h9($.buffer,$.rect,s,T);$.rect=T;$.buffer=s};L.cM=function($,o,T){if(!T.dv($))return!1;
|
|
var s=Math.floor($.x)-T.x,E=Math.floor($.y)-T.y,f=E*T.d+s;return o[f]>128};L.apb=function($,o,T){if(!T.dv($))return!1;
|
|
var s=Math.floor($.x)-T.x,E=Math.floor($.y)-T.y,f=E*T.d+s;return o[4*f+3]>128};L.sq=function($){if(L._H.length<$){L._H=L.G($);
|
|
L._H.fill(255)}return L._H};L._H=L.G(0);L.Ke=function($){if(L.Ch.length<$)L.Ch=L.G($);return L.Ch};L.Ch=L.G(0);
|
|
L.uR=function($){this.Ca=L.G($);this.i=L.G($);this.m=L.G($);this.P=L.G($)};L.uR.prototype.clone=function(){var $=this.Ca.length,o=new L.uR(1);
|
|
o.Ca=this.Ca.slice(0);o.i=this.i.slice(0);o.m=this.m.slice(0);o.P=this.P.slice(0);return o};L.j.ab8=function($,o,T,s,E){var e=E[0]+1,n=E[1],A=Math.abs(n-25)/4,u=E[2],Y=u%2+u*u>>1,b=L.j.q;
|
|
b.jq(o,T);var a=b.se(1),w=b.se(1),X=b.se(1);b.ov($,s,u,u,Y);b.KB(s);b.C7(s,a);b.ff(a,w,e,e,1);b.ff(a,X,e,e,e*e);
|
|
b.sub(X,w);b.nh(w,A);(n<25?b.sub:b.add)(a,w);b.R_(w,s);b.d8(s)};L.j.aks=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=E[0]*2.55,A=E[1],u=A>>1,Y=E[2]*.25,b=e.se(4),a=e.se(1),w=e.se(1);e.ud($,b,A,1,!0,u);
|
|
e.ud($,s,A,1,!1,u);e._n($,a);e.gH(a,n);e.wH(a,w,3);e.Sj(s,w,b);e.qS(b,s,Y)};L.j.aq6=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);e.dh(E[3]);var n=E[0]*-3+80,A=E[1]*-3+80,u=E[2]/2+.5,Y=E[4],b=E[5],a=e.se(1),w=e.se(1),X=e.se(1),N=e.se(1),z=e.se(4),i=e.se(4);
|
|
e._n($,a);e.w0(a,w);e.kf(a,A,5);e.yS(a,.4,0);e.wH(a,X,3);e.bG(X,a,9,3,!0,27);e.w0(w,X);e.lY(X);var k=e.Nz(n,5,X);
|
|
for(var f=0;f<e.YG;f++){w[f]=k[255-w[f]]}e.yS(w,.4,0);e.w0(w,X);e.wH(X,N,2);e.bG(N,X,5,3,!1,15);e.nh(a,u);
|
|
e.nh(X,u);e.gr(s,2155905279);e.gr(i,Y);e.gr(z,b);e.Sj(i,a,s);e.Sj(z,X,s)};L.j.aig=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=new Uint8Array(256),A=5+10*E[1];A+=E[1]>3?(E[1]-3)*10:0;var u=~~(E[2]*.73)+50,Y=Math.min(u+A,128),b=Y-u,a=-255*u;
|
|
for(var f=0;f<256;f++){var w=f*65;n[f]=e.uo(a/b);a+=255}var X=e.se(1),N=e.se(1),z=e.se(1);e._n($,X);
|
|
e.w0(X,z);e.wH(X,N,2*E[0]+1);e.sub(N,X);e.nh(X,65);e.bG(X,N,9,3,!0,20);for(var f=0;f<e.YG;f++){var i=z[f],k=N[f];
|
|
X[f]=k>0?~~((k*i+(255-k)*128)/255):128}e.wH(X,N,3);e.bG(N,X,15,2,!0,16);e.bG(N,z,15,2,!1,15);e.tE(X,z);
|
|
e.Dy(z,N,2);e.Ru(N,n);e.wH(N,X,2);e.ZI(X,s)};L.j.ajS=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);var n=2*E[0]+1,A=e.yv[E[1]],u=E[2]*5.1,Y=E[3],b=e.se(1),a=e.se(1),w=e.se(4),X=e.se(4);
|
|
e.gr(w,Y);e.KB(w,s);e.d6(b,u);e.R_(b,s);e.d8(s,w);e._n($,a);e.wH(a,b,n);e.sub(b,a);e.nh(a,A);e.bG(a,b,9,3,!0,20);
|
|
e.Sj($,b,w);e.dA(w,s,3);e.ud(s,w,15,2,!0,16);e.ud(s,X,15,2,!1,16);e.tE(w,X);e.qS(X,s,2)};L.j.anB=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=(15-E[0])/4+1,A=(15-E[1])/4+1,u=E[2],Y=E[3],b=e.qJ(E[4]),a=E[5]+1,w=E[6],X=E[7],N=E[8],z=e.se(1),i=e.se(1),k=e.se(1),Q=e.se(1),O=e.se(4),c=e.se(4);
|
|
e.YR(k,u,Y,w);e._n($,i);e.wH(i,z,5);e.rn(k,z,Q,a,b);e.nh(Q,n);e.L7(Q,2);e.lY(z);e.rn(k,z,i,a,b);e.nh(i,A);
|
|
e.L7(i,2);e.gr(O,2155905279);e.gr(c,X);e.gr(s,N);e.Sj(O,i,c);e.Sj(c,Q,s)};L.j.a9R=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);e.dh(E[3]);var n=E[0],A=E[1]/10,u=E[2]/10,Y=e.se(1),b=e.se(1),a=e.se(1),w=e.pb(),X=e.pb(),N=e.pb();
|
|
e.h_(Y);e.wH(Y,b,11);e.wH(b,Y,11);e.MW(Y,w);e.$s($,Y);e.w0(Y,a);e.wH(Y,b,9);e.wH(b,Y,9);e.MW(Y,X);e.oV(X,N,5);
|
|
e.oV(N,X,5);e.qk(w,.8);e.ada(w,X,.8,.9);e.Xb(X,Y,n);e.ff(Y,b,2,2,1);e.ff(b,Y,2,2,3);e.ff(Y,b,2,2,3);
|
|
e.ff(a,Y,5,5,13);e.iN(b,Y,b,A);e.T$(Y,b,b,u);e.rn(b,b,Y,5,1);e.KB($,s);e.R_(Y,s);e.d8(s)};L.j.ahK=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=E[0],A=E[1]/2,u=E[2],Y=n/2,b=e.se(4),a=e.se(4);e.w0($,s);for(var w=0;w<u;w++){e.ud(s,b,n,1,!0,Y);
|
|
e.ud(s,a,n,1,!1,Y);e.tE(a,b);e.dA(b,a,2);e.qS(a,s,A)}};L.j.ajA=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);
|
|
var n=E[0]*10,A=E[1]*4.9,u=E[2]*4.9,Y=e.se(1),b=e.se(1),a=e.se(4),w=e.se(4);e._n($,Y);e.gH(Y,e.akF(Y,n));
|
|
e.wH(Y,b,3);e.ud($,a,5,1,!1,1);e.ud($,s,15,2,!0,16);e.Sj(s,b,a);e.KB(a,s);e.C7(s,Y);e.kf(Y,A,u);e.R_(Y,s);
|
|
e.d8(s)};L.j.agK=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);e.dh(E[4]);var n=E[0]/20,A=[0,.75,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.6,1.7,1.8,2,2.5,3,3.5,4][E[1]],u=[0,.25,.5,.75,.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.25,2.5,3,3.5,4][E[2]],Y=E[3],b=new Int16Array(256);
|
|
for(var f=0;f<256;f++){b[f]=~~((f-128)*n)}var a=e.se(1),w=e.se(1),X=e.se(4);e._n($,a);e.wH(a,w,25);e.nh(w,A);
|
|
e.L7(w,u);e.wH(w,a,25);e.h_(w);e.qb(a,w,b);e.w0($,s);e.gr(X,Y);e.Sj(X,a,s)};L.j.aaV=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=E[0]+5,A=15-E[1],u=n*n/2,Y=1-(3-E[2])/10,b=~~(A*A*Y-1),a=~~(A*A*(1-Y));if(a==0)a=1;var w=e.se(1),X=e.se(1),N=e.se(1),z=e.se(4);
|
|
e._n($,N);e.ff(N,w,n,n,u);e.wH(N,X,n);e.sub(w,X);e.gH(X,1);e.ov($,z,A,A,b);e.ov($,s,A,A,a);e.Sj(z,X,s)};
|
|
L.j.anI=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);e.dh(E[3]);var n=(20-E[0])*.05,A=E[1]*-2.75+60,u=65-A,Y=E[2]/10,b=e.se(1),a=e.se(1);
|
|
e.$s($,a);var w=e.Nz(A,u,a);e.KB($,s);e.C7(s,a);e.h_(b);e.GI(a,b,n);e.Ru(a,w);e.nh(a,E[2]/10);e.add(b,a);
|
|
e.R_(a,s);e.d8(s)};L.j.amz=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);var n=5+E[0],A=15-E[1],u=E[2],Y=n*n/2+n*n%2*1,b=1-(3-E[2])/10,a=~~(A*A*b-1),w=~~(A*A*(1-b));
|
|
if(w==0)w=1;var X=e.se(1),N=e.se(1),z=e.se(1),i=e.se(1),k=e.se(1);e.$s($,N);e.Dy(N,X,3);e.ff(X,N,2,2,1);
|
|
var Q=e.Nz(20,20,N);e.Ru(N,Q);e.wH(N,k,5);e.ff(k,X,n,n,Y);e.ff(k,N,A,A,a);e.ff(k,z,A,A,w);e.wH(k,i,n);
|
|
e.sub(X,i);e.gH(i,1);e.Ga(N,i,z);e.KB($,s);e.R_(z,s);e.d8(s)};L.j.a3g=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);e.dh(E[5]);var n=e.YG,A=e.No,u=E[0],Y=E[1],b=E[2],a=E[3],w=E[4],X=.05*u+1,N=u/100,z=u>>1,i=2*u-100,k=+(Y==9),Q=+(Y==7),O=[4,1][k],c=[3,2][k],B=[1,2][Q],G=[2,1][Q],l=[50,75][k],v=Y<4?b:(b>>1)+50,p=e.R0(l,v),P=e.bY(a),h=e.bY(w),j=e.se(4),C=e.se(4),V=e.se(1),d=e.se(1);
|
|
function m(s,p){if(v!=50){e.qX(s,p)}}function R($,gf){for(var f=0;f<n;f++){$[f]=e.uo($[f]+(gf[f]-128)*N)}}function g($,gf){for(var f=0,K=0;
|
|
f<n;f++){$[K]=e.uo($[K]+(gf[K]-128)*N);$[K+1]=e.uo($[K+1]+(gf[K+1]-128)*N);$[K+2]=e.uo($[K+2]+(gf[K+2]-128)*N);
|
|
K+=4}}function S($,s){e.h_(C);e.w0($,s);g(s,C);m(s,p)}function F(gf){var K=0;for(var cv=0;cv<12;cv++)K+=e.random();
|
|
return e.uo(z*(K-6)+gf)}function r($,s){e.w0($,s);for(var f=0;f<A;f+=4){s[f]=F(s[f]);s[f+1]=F(s[f+1]);
|
|
s[f+2]=F(s[f+2])}m(s,p)}function q($,s){e.w0($,s);for(var f=0;f<A;f+=4){if(e.random()<N){s[f]=P[0];s[f+1]=P[1];
|
|
s[f+2]=P[2]}}m(s,p)}function W($,s){e.h_(j);e.ov(j,C,c,c,O);e.w0($,j);g(j,C);e.ov(j,s,5,5,13);m(s,p)}function Z($,s){e.h_(C);
|
|
e.w0($,j);g(j,C);m(s,p);e.ov(j,s,c,c,O)}function I($,s){e.w0($,j);m(s,p);e._n(j,V);for(var f=0,gf=0;
|
|
f<n;f++){var K=((i-V[f]+255)*128.5+.5)/32767;if(e.random()<=K){s[gf++]=h[0];s[gf++]=h[1];s[gf++]=h[2]}else{s[gf++]=P[0];
|
|
s[gf++]=P[1];s[gf++]=P[2]}s[gf]=$[gf];gf++}}function _($,s){e.KB($,s);e.C7(s,V);e.Dy(V,d,X);e.ff(d,V,c,c,O);
|
|
e.Ru(V,p);e.R_(V,s);e.d8(s)}function cN($){var gf=0;if(Y==8){for(var K=0;K<o;K++){$[gf++]=~~(e.random()*255)}for(var f=1;
|
|
f<T;f++){for(var K=0;K<o;K++){$[gf++]=$[K]}}}else{for(var f=0;f<T;f++){var cv=~~(e.random()*255);for(var K=0;
|
|
K<o;K++){$[gf++]=cv}}}}function ce($,s){e._n($,V);e.h_(d);R(V,d);cN(d);R(V,d);e.dA($,j,9);e.dA(j,C,9);
|
|
e.wH(V,d,2);e.Ru(d,p);e.wH(d,V,2);e.KB(C,s);e.R_(V,s);e.d8(s)}[S,r,q,W,W,Z,I,ce,ce,_][Y]($,s)};L.j.aoo=function($,o,T,s,E){var e=[-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],n=L.j.q,z=0,i,f,B,G,l,v=0,p=1,P=255;
|
|
n.jq(o,T);n.dh(E[3]);var A=n.se(1),u=n.se(1);n._n($,A);var Y=E[0],b=E[1],a=b<=50?e[b]/255:1+(255-e[101-b])/255,w=E[2],X=A.length,N=new Float32Array(X),k=1+1/10*Y,Q=(1-1/k)/2,O=16/256,c=o-1;
|
|
for(f=0;f<n.YG;f++){N[f]=A[f]/255;u[f]=Y==1?n.random()<1/255?P:p:p}function h(j,C){var V=j*o+C;if(u[V]!=p||j>=T||C>=o){return}var G=N[V],d=a-G,m=n.random(),R=m/k+Q;
|
|
if(z==0||Math.abs(l-G)>O){i=R<=d?v:P;z=~~(n.random()*Y)}else if(.1<m){z--}else{z=0}u[V]=i;l=G}if(w==0){for(f=0;
|
|
f<o;f++){for(B=0;B<o;B++){G=f+B;if(G>=o)break;h(B,c-G)}z=0}for(f=1;f<T;f++){for(B=0;B<T;B++){G=f+B;if(G>=T||B>=o)break;
|
|
h(G,c-B)}z=0}}else if(w==1){for(f=0;f<T;f++){for(B=0;B<o;B++){h(f,B)}z=0}}else if(w==2){for(f=0;f<o;
|
|
f++){for(B=0;B<o;B++){G=f+B;if(G>=o)break;h(B,G)}z=0}for(f=1;f<T;f++){for(B=0;B<T;B++){G=f+B;if(G>=T||B>=o)break;
|
|
h(G,B)}z=0}}else{for(f=0;f<o;f++){for(B=0;B<T;B++){h(B,f)}z=0}}n.ZI(u,s)};L.j.amt=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=E[0],A=E[1],u=E[2],Y=e.se(1),b=e.se(1),a=e.se(1),w=e.se(4),X=e.se(4);e._n($,Y);e.ff(Y,b,3,3,1);
|
|
e.ff(Y,a,3,3,9);e.sub(a,b);e.wH(b,Y,3);e.kf(Y,40,10);e.ud($,s,n,2,!1,n);e.ud($,w,n,2,!0,n);e.gr(X,255);
|
|
e.Sj(s,Y,X);e.Sj(X,Y,w);e.qS(w,s,1);e.KB(s);e.C7(s,Y);e.kf(Y,A,u);e.R_(Y,s);e.d8(s)};L.j.a0z=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);e.dh(E[3]);var n=E[0],A=E[1],u=E[2]/10;n=n+A;var Y=e.se(1),b=e.se(1),a=e.pb(),w=e.pb();e.h_(Y);
|
|
e.wH(Y,b,11);e.wH(b,Y,11);e.MW(Y,a);e.oV(a,w,5);e.oV(w,a,5);e.qk(w,.97);e.Xb(w,Y,n);e.ff(Y,b,A,A,1);
|
|
e.$s($,Y);e.iN(b,Y,b,.6);e.T$(Y,b,b,u);e.rn(b,b,Y,5,1);e.KB($,s);e.R_(Y,s);e.d8(s)};L.j.anE=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=Math.abs(E[0]),A=n+[1,0,1,2,1,2,1,2,3,2,3,2,3,2,3,2,3,4,3,4,5,4,5,4,5][n],u=2*n+1,Y=E[1]/10,b=Y*13/15,a=e.se(1),w=e.se(1),X=e.se(1),N=e.se(1),z=e.se(4),i=e.se(4),k=e.se(4),Q=e.se(4),O=e.se(4);
|
|
e._n($,a);if(E[0]>=0){e.lY(a)}e.w0(a,X);e.wH(a,N,A);e.wH(N,a,A);e.nh(a,Y);e.w0(a,w);e.wH(a,N,u);e.wH(N,a,u);
|
|
e.nh(a,b);e.gr(k,E[2]);e.gr(Q,E[3]);e.gr(O,E[4]);e.Sj(k,a,Q,z);e.Sj(O,w,z,i);e.Sj(Q,X,i,s);e.C7($,X,3);
|
|
e.R_(X,s,3)};L.j.a2W=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);e.dh(E[5]);var n=E[0]*5.1,A=E[1]/100,u=e.w$[E[2]],Y=e.se(1),b=e.se(1),a=e.se(1);
|
|
e._n($,Y);e.d6(b,255);e.h_(a);e.gH(Y,n);e.GI(b,Y,.7);e.GI(a,Y,A);e.rn(Y,Y,b,5,u);e.w0($,s);e.a92(s,n,E[4],E[3]);
|
|
e.KB(s);e.R_(b,s);e.d8(s)};L.j.a8O=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);var n=E[0],A=4-E[1],u=11-E[2],Y=e.se(1),b=e.se(1),a=e.se(4);
|
|
e.$s($,b);for(var f=0;f<A;f++){e.w0(b,Y);e.iC(Y,b,n,n)}e.dA($,a,n);e.KB(a,a);e.R_(b,a);e.d8(a,a);(u<11?e.ahV:e.w0)(a,s,u)};
|
|
L.j.ajx=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);e.dh(E[2]);var n=E[0]+5,A=~~(n/5+1),u=~~(n/2)+1,Y=u*u,b=~~(n/3),a=e.w$[E[1]],w=new Array(256);
|
|
for(var f=0;f<256;f++){w[f]=~~(.2*(f-128))}var X=e.se(1),N=e.se(1);e.a4n($,s,n);e.KB(s);e.C7(s,X);e.h_(N);
|
|
e.qb(X,N,w);e.afN(N,n,n,A,A);e.iN(X,N,X,1);e.wH(X,N,b);e.wH(N,X,b);e.ff(X,N,u,u,Y);e.rn(N,N,X,5,a);e.R_(X,s);
|
|
e.d8(s)};L.j.als=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);var n=e.se(1),A=e.se(1),u=e.se(1),Y=e.pb(),b=e.pb();
|
|
e._n($,n);e.wH(n,A,E[2]);e.gH(A,E[0]*5.1);e.ff(A,n,2,2,4);e.wH(n,A,3);e.wH(A,n,3);e.w0(n,u);e.wH(n,A,5);
|
|
e.wH(A,n,5);e.MW(n,Y);e.oV(Y,b,5);e.oV(b,Y,5);e.agc(Y,A,E[1]);e.lY(A);e.iN(u,A,u,1);e.ZI(u,s)};L.j.a8A=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=1<<7-E[2],A=e.se(1),u=e.se(1),Y=e.se(1);e.$s($,u);e.wH(u,A,3);e.w0(A,u);e.wH(A,Y,E[0]+5);
|
|
e.sub(Y,u);e.kf(u,1,E[1]);e.nh(A,1/n);e.nh(A,n);e.sub(A,u);e.KB($,s);e.R_(u,s);e.d8(s)};L.j.aqn=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);e.dh(E[3]);var n=e.se(1),A=e.se(1),u=e.se(1);e._n($,n);e.ajZ(A,E[0]/50);e.wH(A,u,3);e.ff(n,A,9,9,41);
|
|
e.kf(A,E[1],E[2]);e.iN(A,u,u,.75);e.T$(A,u,A,.5);e.w0(A,n);e.ff(n,u,3,3,8);e.iN(u,A,u,.75);e.nh(u,1.2);
|
|
e.Dy(u,n,1);e.wH(n,u,2);e.Dy(u,n,2);e.nh(n,1.2);e.wH(n,u,2);e.ZI(u,s)};L.j.a9K=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=E[0]+9,A=E[1]/2,u=E[2],Y=E[3],b=e.qJ(E[4]),a=E[5]+1,w=E[6],X=e.se(1),N=e.se(1),z=e.se(4),i=e.se(4);
|
|
e.YR(N,u,Y,w);e.MF($,s,n,1,1);e.MF(s,z,n,1,1);e.aa2(z,z,i,7,A);e.nh(i,1.2);e.L7(i,1.2);e.rn(N,X,X,a,b);
|
|
e.nh(X,3);e.w0($,s);e.Sj(i,X,s)};L.j.anR=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);e.dh(E[3]);var n=E[0]+4,A=n*2/5+(n%5|0);
|
|
n--;var u=E[1]*-2.75+60,Y=65-u,b=E[2]/10,a=e.se(1),w=e.se(1);e.h_(a);e.$s($,w);var X=e.Nz(u,Y,w);e.KB($,s);
|
|
e.C7(s,w);e.GI(w,a,.8);e.Ru(w,X);e.nh(w,b);e.add(a,w);e.bG(w,a,n,3,!1,A);e.R_(a,s);e.d8(s)};L.j.agn=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);e.dh(E[3]);var n=E[0]+5,A=(n*n>>1)+n%2,u=E[1]/10,Y=E[2],b=(Y*Y>>1)+Y%2,a=e.se(1),w=e.se(1),X=e.se(1),N=e.se(4),z=e.se(4),i=e.se(4);
|
|
e.h_(X);e.KB($,i);e.C7(i,a);e.GI(a,X,.8);e.wH(X,a,3);e.Dy(a,X,u);e.R_(X,i);e.d8(i,i);e._n(i,X);e.ff(X,a,n,n,A);
|
|
e.wH(X,w,n);e.sub(a,w);e.gH(w,1);e.ov(i,N,7,7,40);e.ov(i,z,7,7,10);e.Sj(N,w,z);e.ov(z,s,Y,Y,b)};L.j.a0Z=function($,o,T,s,E){var e=L.j.q,A=255,f,Y;
|
|
e.jq(o,T);var n=E[0];if(n<2)A=n;else if(n<12)A=5*n-5;else if(n<47)A=2*n+28;else if(n<50){f=n-47;A=125+12.5*f+12.5*f*f}var u=new Uint8Array(256);
|
|
for(f=75,Y=15;f<256;f++,Y+=24)u[f]=Math.min(255,Y);var b=e.se(1),a=e.se(1),w=e.se(1);e._n($,b);e.wH(b,a,11);
|
|
e.wH(a,w,11);e.sub(w,b);e.nh(b,8);e.sub(w,b);e.gH(b,A);e.lY(b);e.wH(b,a,5);e.gH(a,51);e.wH(a,b,E[1]);
|
|
e.wH(b,a,E[1]);e.lY(a);e.Ru(a,u);e.ZI(a,s)};L.j.aqB=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);var n=e.yv[E[1]],A=E[2],u=A*1.5,Y=e.se(1),b=e.se(1),a=e.se(1);
|
|
e.$s($,Y);e.bG(Y,b,15,2,!0,15);e.w0(b,a);e.kf(a,A,u);e.wH(a,Y,3);e.wH(b,a,E[0]);e.sub(a,b);e.nh(b,n);
|
|
e.sub(Y,b);e.wH(b,Y,3);e.bG(Y,b,3,1,!1,1);e.dA($,s,15);e.KB(s);e.R_(b,s);e.d8(s)};L.j.a4j=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);e.dh(E[3]);var n=E[0]*5.1,A=16-E[1],u=[1,1,1.05,1.1,1.15,1.2,1.25,1.3,1.35,1.4,1.45,1.5,1.6,1.7,1.8,2,2.25,2.5,2.75,3,3.5,4,5,6,8,10][E[2]],Y=e.se(1),b=e.se(1),a=e.se(1);
|
|
e._n($,Y);e.gH(Y,n);e.wH(Y,b,A);e.wH(b,Y,A);e.h_(a);e.T$(Y,a,a,1);e.iN(Y,a,Y,.75);e.nh(Y,u);e.L7(Y,u);
|
|
e.ff(Y,b,2,2,2);e.ZI(b,s)};L.j.a6V=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);var n=E[0]+9,A=E[1]+9,u=E[2],Y=E[3],b=e.qJ(E[4]),a=E[5]+1,w=E[6],X=e.se(1),N=e.se(1),z=e.se(1),i=e.se(1),k=e.se(1),Q=e.se(4);
|
|
e.$s($,X);e.iC(X,z,n,n);e.wH(z,X,A);e.w0(z,k);e.w0(X,i);e.sub(k,i);e.sub(X,k);e.add(k,i);e.nh(i,10);
|
|
e.YR(N,u,Y,w);e.rn(N,X,k,a,b);e.Ga(k,i,z,.8);e.dA($,Q,9);e.dA(Q,s,9);e.KB(s);e.R_(z,s);e.d8(s)};L.j.a7I=function($,o,T,s,E){var e=L.j.q;
|
|
e.jq(o,T);var n=16-E[0],A=E[1]*8,u=1-(3-E[2])/10,Y=~~(n*n*u-1),b=~~(n*n*(1-u));if(b==0)b=1;var a=e.se(1),w=e.se(1),X=e.se(1),N=e.se(4);
|
|
e._n($,X);e.ff(X,a,7,7,25);e.wH(X,w,7);e.sub(a,w);e.gH(w,1);e.ov($,N,n,n,Y);e.ov($,s,n,n,b);e.Sj(N,w,s);
|
|
e.KB(s);e.C7(s,a);e.ff(a,X,3,3,1);e.ff(a,w,3,3,9);e.sub(w,X);e.w0(X,w);e.sub(a,X);e.sub(X,w);e.ff(w,a,3,3,8);
|
|
e.kf(a,A,1);e.R_(a,s);e.d8(s)};L.j.a4O=function($,o,T,s,E){var e=L.j.q;e.jq(o,T);e.dh(E[3]);var n=E[0],A=E[1],u=E[2],Y=n>>1,b=Math.max(~~(n/5),1),a=Math.max(~~(n*2/3),1),w=e.R0(A,u),X=e.se(1),N=e.se(1),z=e.se(1),i=e.se(1),k=e.se(4);
|
|
e.$s($,X);e.SJ(2147483647,4,2,2,0,255,N);e.SJ(4,2147483647,2,2,0,255,i);e.h_(z);e.T$(N,z,N,1);e.T$(i,z,i,1);
|
|
e.T$(N,X,N,1);e.T$(i,X,i,1);e.dA($,k,Y);e.dA(k,s,Y);e.ff(N,X,1,n,b);e.ff(X,N,3,n,a);e.ff(i,X,n,1,b);
|
|
e.ff(X,i,n,3,a);e.tE(N,i);e.KB(s);e.R_(i,s);e.d8(s);e.qX(s,w)};L.j.q={};L.j.q.N0=0;L.j.q.cQ=0;L.j.q.YG=0;
|
|
L.j.q.x2=0;L.j.q.No=0;L.j.q.jq=function($,o){var T=$*o,self=L.j.q;self.N0=$;self.cQ=o;self.YG=T;self.x2=T<<1;
|
|
self.No=T<<2};L.j.q.dh=function($){L.j.q.random=function(){var o=$+=1831565813;o=Math.imul(o^o>>>15,o|1);
|
|
o^=o+Math.imul(o^o>>>7,o|61);return((o^o>>>14)>>>0)/4294967296}};L.j.q.se=function($){var o=L.j.q;return new Uint8Array([-1,o.YG,o.x2,-1,o.No][$])};
|
|
L.j.q.pb=function(){return new Int32Array(L.j.q.x2)};L.j.q.wH=function($,o,T,s){if(s==null)s=T;var self=L.j.q,E=self.N0,e=self.cQ;
|
|
L.Ja.es($,o,new df(0,0,E,e),T>>>1);return};L.j.q.oV=function($,o,T,s){var self=L.j.q,E=new Int32Array(self.YG),e=new Int32Array(self.YG);
|
|
for(var f=0;f<2;f++){self.C7($,E,f,2);self.wH(E,e,T,s);self.R_(e,o,f,2)}};L.j.q.dA=function($,o,T,s){var self=L.j.q,E=self.se(1),e=self.se(1);
|
|
for(var f=0;f<4;f++){self.C7($,E,f);if(f<3)self.wH(E,e,T,s);else e=E;self.R_(e,o,f)}};L.j.q.MF=function($,o,T,s,E){var self=L.j.q,e=self.N0,n=self.cQ,A=T+s-1,u=T>>1,Y=A>>1,b=0,a=T*s,w=new Int32Array(T);
|
|
for(var f=0;f<n;f++){var X=0,N=0,z=0;for(var i=0;i<T;i++){var k=E?A-i-s:i;for(var Q=k,O=s+k;Q<O;Q++){var c=0-Y+Q,B=f-u+i;
|
|
if(Q==k){w[i]=c}if(c<0)c=0;else if(c>=e)c=e-1;if(B<0)B=0;else if(B>=n)B=n-1;var G=e*B+c<<2;X+=$[G];N+=$[G+1];
|
|
z+=$[G+2]}}o[b++]=~~(X/a);o[b++]=~~(N/a);o[b++]=~~(z/a);o[b]=$[b];b++;for(var l=1;l<e;l++){for(var i=0;
|
|
i<T;i++){var B=f-u+i,k=w[i]+1;w[i]=k;var v=k-1,p=k+s-1;if(B<0)B=0;else if(B>=n)B=n-1;if(v<0)v=0;else if(v>=e)v=e-1;
|
|
if(p<0)p=0;else if(p>=e)p=e-1;var P=B*e+v<<2,h=B*e+p<<2;X=X+$[h]-$[P];N=N+$[h+1]-$[P+1];z=z+$[h+2]-$[P+2]}o[b++]=~~(X/a);
|
|
o[b++]=~~(N/a);o[b++]=~~(z/a);o[b]=$[b];b++}}};L.j.q.bG=function($,o,T,s,E,e){var self=L.j.q,n=self.N0,A=self.cQ,u=T+s-1,Y=T>>1,b=u>>1,a=0,w=new Int32Array(T),X=new Int32Array(256),N=new Int32Array(16);
|
|
for(var f=0;f<A;f++){X.fill(0);N.fill(0);for(var z=0;z<T;z++){var i=E?u-z-s:z;for(var k=i,Q=s+i;k<Q;
|
|
k++){var O=0-b+k,c=f-Y+z;if(k==i){w[z]=O}if(O<0)O=0;else if(O>=n)O=n-1;if(c<0)c=0;else if(c>=A)c=A-1;
|
|
X[$[c*n+O]]++;N[$[c*n+O]>>>4]++}}o[a++]=L.j.q.g7(N,X,e);for(var B=1;B<n;B++){for(var z=0;z<T;z++){var c=f-Y+z,i=w[z]+1;
|
|
w[z]=i;var G=i-1,l=i+s-1;if(c<0)c=0;else if(c>=A)c=A-1;if(G<0)G=0;else if(G>=n)G=n-1;if(l<0)l=0;else if(l>=n)l=n-1;
|
|
var v=$[c*n+G],p=$[c*n+l];X[v]--;X[p]++;N[v>>>4]--;N[p>>>4]++}o[a++]=L.j.q.g7(N,X,e)}}};L.j.q.ud=function($,o,T,s,E,e){var self=L.j.q,n=self.se(1),A=self.se(1);
|
|
for(var f=0;f<4;f++){self.C7($,n,f);if(f<3)self.bG(n,A,T,s,E,e);else A=n;self.R_(A,o,f)}};L.j.q.ff=function($,o,T,s,E){E=Math.min(s*T,E);
|
|
var self=L.j.q,e=self.N0,n=self.cQ,A=s>>1,u=T>>1,Y=0,b=new Int32Array(s),a=new Int32Array(256),w=new Int32Array(16);
|
|
for(var f=0;f<n;f++){a.fill(0);w.fill(0);for(var X=0;X<s;X++){for(var N=0,z=T;N<z;N++){var i=0-u+N,k=f-A+X;
|
|
if(N==0){b[X]=i}if(i<0)i=0;else if(i>=e)i=e-1;if(k<0)k=0;else if(k>=n)k=n-1;a[$[k*e+i]]++;w[$[k*e+i]>>>4]++}}o[Y++]=L.j.q.g7(w,a,E);
|
|
for(var Q=1;Q<e;Q++){for(var X=0;X<s;X++){var k=f-A+X,O=b[X]+1;b[X]=O;var c=O-1,B=O+T-1;if(k<0)k=0;else if(k>=n)k=n-1;
|
|
if(c<0)c=0;else if(c>=e)c=e-1;if(B<0)B=0;else if(B>=e)B=e-1;var G=$[k*e+c],l=$[k*e+B];a[G]--;a[l]++;
|
|
w[G>>>4]--;w[l>>>4]++}o[Y++]=L.j.q.g7(w,a,E)}}};L.j.q.g7=function($,o,T){var s=0,E=0;while(s+$[E>>>4]<T){s+=$[E>>>4];
|
|
E+=16}for(;E<256;E++){s+=o[E];if(s>=T)break}return E};L.j.q.ov=function($,o,T,s,E){var self=L.j.q,e=self.se(1),n=self.se(1);
|
|
for(var f=0;f<4;f++){self.C7($,e,f);if(f<3)self.ff(e,n,T,s,E);else n=e;self.R_(n,o,f)}};L.j.q.Dy=function($,o,T){var self=L.j.q,s=self.N0,E=self.cQ,e=0;
|
|
for(var f=0;f<E;f++){var n=f*s,A=(f-1)*s,u=(f+1)*s;if(A<0)A=n;if(u>=E)u=n;for(var Y=0;Y<s;Y++){var b=Y-1,a=Y+1;
|
|
if(b<0)b=Y;if(a>=s)a=Y;var w=n+b,X=n+a,N=A+Y,z=u+Y,i=n+Y,k=$[w],Q=$[X],O=$[N],c=$[z],B=$[i],G=B+(B*4*T+.5);
|
|
G=G-((k+Q+c+O)*T+.5);o[e++]=self.uo(G)}}};L.j.q.qS=function($,o,T){var self=L.j.q,s=self.se(1),E=self.se(1);
|
|
for(var f=0;f<4;f++){self.C7($,s,f);if(f<3)self.Dy(s,E,T);else E=s;self.R_(E,o,f)}};L.j.q.ahV=function($,o,T){var self=L.j.q,s=self.N0,E=self.cQ,e=0,n=T+4;
|
|
for(var f=0;f<E;f++){var A=f*s,u=(f-1)*s,Y=(f+1)*s;if(u<0)u=A;if(Y>=E)Y=A;for(var b=0;b<s;b++){var a=b-1,w=b+1;
|
|
if(a<0)a=b;if(w>=s)w=b;var X=A+a<<2,N=A+w<<2,z=u+b<<2,i=Y+b<<2,k=A+b<<2;for(var Q=0;Q<3;Q++){var O=$[X+Q],c=$[N+Q],B=$[z+Q],G=$[i+Q],l=$[k+Q];
|
|
o[e++]=(l*T+O+c+G+B)/n}o[e]=$[e];e++}}};L.j.q.iC=function($,o,T,s){var self=L.j.q,E=self.N0,e=self.cQ,n=T>>1,A=s>>1,u=0,Y=new Int32Array(T),b=new Int32Array(256);
|
|
for(var f=0;f<e;f++){b.fill(0);for(var a=0;a<T;a++){for(var w=0,X=s;w<X;w++){var N=0-A+w,z=f-n+a;if(w==0){Y[a]=N}if(N<0)N=0;
|
|
else if(N>=E)N=E-1;if(z<0)z=0;else if(z>=e)z=e-1;b[$[z*E+N]]++}}var i=0,k=0;for(var Q=0;Q<256;Q++){if(i<b[Q]){k=Q;
|
|
i=b[Q]}}o[u++]=k;for(var O=1;O<E;O++){for(var a=0;a<T;a++){var z=f-n+a,c=Y[a]+1;Y[a]=c;var B=c-1,G=c+s-1;
|
|
if(z<0)z=0;else if(z>=e)z=e-1;if(B<0)B=0;else if(B>=E)B=E-1;if(G<0)G=0;else if(G>=E)G=E-1;b[$[z*E+B]]--;
|
|
b[$[z*E+G]]++}i=0;k=0;for(var Q=0;Q<256;Q++){if(i<b[Q]){k=Q;i=b[Q]}}o[u++]=k}}};L.j.q.a57=[function($,o,T,s,E,e,n,A,u,Y){return E+($+o+T)*Y-(u+A+n)*Y},function($,o,T,s,E,e,n,A,u,Y){return E+(o+T+e)*Y-(A+n+s)*Y},function($,o,T,s,E,e,n,A,u,Y){return E+(T+e+u)*Y-(n+s+$)*Y},function($,o,T,s,E,e,n,A,u,Y){return E+(e+u+A)*Y-(s+$+o)*Y},function($,o,T,s,E,e,n,A,u,Y){return E+(u+A+n)*Y-($+o+T)*Y},function($,o,T,s,E,e,n,A,u,Y){return E+(A+n+s)*Y-(o+T+e)*Y},function($,o,T,s,E,e,n,A,u,Y){return E+(n+s+$)*Y-(T+e+u)*Y},function($,o,T,s,E,e,n,A,u,Y){return E+(s+$+o)*Y-(e+u+A)*Y}];
|
|
L.j.q.rn=function($,o,T,s,E){var self=L.j.q,e=self.N0,n=self.cQ,A=e,u=self.a57[s-1];for(var f=0;f<n;
|
|
f++){var Y=(f>0?f-1:0)*A,b=f*A,a=(f<n?f+1:f)*A;for(var w=0;w<e;w++){var X=w>0?w-1:0,N=w<e?w+1:w,z=b+w,i=$[Y+X],k=$[Y+w],Q=$[Y+N],O=$[b+X],c=o[z],B=$[b+N],G=$[a+X],l=$[a+w],v=$[a+N];
|
|
T[z]=self.uo(u(i,k,Q,O,c,B,G,l,v,E))}}};L.j.q.aa2=function($,o,T,s,E){var self=L.j.q,e=self.se(1),n=self.se(1),A=self.se(1);
|
|
for(var f=0;f<3;f++){self.C7($,e,f);self.C7(o,n,f);self.rn(e,n,A,s,E);self.R_(A,T,f)}self.C7(o,e,3);
|
|
self.R_(e,T,3)};L.j.q._n=function($,o){var T=$.length,s=0;for(var f=0;f<T;f++){o[s++]=~~(($[f++]+$[f++]+$[f++]+2)/3)}};
|
|
L.j.q.ZI=function($,o){var T=o.length,s=0;for(var f=0;f<T;f++){var E=$[f];o[s++]=E;o[s++]=E;o[s++]=E;
|
|
o[s++]=255}if(o[0]==255)o[0]--;else o[0]++};L.j.q.$s=function($,o){var T=o.length,s=0;for(var f=0;f<T;
|
|
f++){var E=$[s++],e=$[s++],n=$[s++];s++;if(e>E)E=e;if(n>E)E=n;o[f]=E}};L.j.q.KB=function($,o){if(o==null)o=$;
|
|
var T=$.length;for(var s=0;s<T;s+=4){var E=$[s],e=$[s+1],n=$[s+2],A=E,u=0,Y=E,a;if(e<=E){E=e}else{u=1;
|
|
Y=e}if(n<=Y){if(E>n){E=n}}else{u=2;Y=n}var b=Y-E;if(b!=0){if(u==0){a=~~(43*(e-n)/b)}else if(u==1){a=~~(43*(n+2*b-A)/b)}else{a=43*(A+4*b-e)/b}if(a<0){a=255&a-1}o[s]=a;
|
|
o[s+1]=~~(255*b/Y)}else{o[s]=b;o[s+1]=b}o[s+2]=Y;o[s+3]=$[s+3]}};L.j.q.d8=function($,o){if(o==null)o=$;
|
|
var T=$.length;for(var s=0;s<T;s+=4){var E=$[s],e=$[s+1],n=$[s+2];if(e){if(E==255)E=0;var A=~~(6*E/255),u=~~(-255*A+6*E);
|
|
if(A==0){o[s]=n;o[s+1]=~~(n*(255-e*(255-u)/255)/255);o[s+2]=~~(n*(255-e)/255)}else if(A==1){o[s]=~~(n*(255-e*u/255)/255);
|
|
o[s+1]=n;o[s+2]=~~(n*(255-e)/255)}else if(A==2){o[s]=~~(n*(255-e)/255);o[s+1]=n;o[s+2]=~~(n*(255-e*(255-u)/255)/255)}else if(A==3){o[s]=~~(n*(255-e)/255);
|
|
o[s+1]=~~(n*(255-e*u/255)/255);o[s+2]=n}else if(A==4){o[s]=~~(n*(255-e*(255-u)/255)/255);o[s+1]=~~(n*(255-e)/255);
|
|
o[s+2]=n}else{o[s]=n;o[s+1]=~~(n*(255-e)/255);o[s+2]=~~(n*(255-e*u/255)/255)}}else{o[s]=n;o[s+1]=n;o[s+2]=n}o[s+3]=$[s+3]}};
|
|
L.j.q.R_=function($,o,T,s){if(T==null)T=2;if(s==null)s=4;var E=$.length;for(var f=0;f<E;f++){o[T]=$[f];
|
|
T+=s}};L.j.q.C7=function($,o,T,s){if(T==null)T=2;if(s==null)s=4;var E=o.length;for(var f=0;f<E;f++){o[f]=$[T];
|
|
T+=s}};L.j.q.Ga=function($,o,T,s){if(s==null)s=1;var E=o.length,e=0,n;for(var e=0;e<E;e++){n=o[e];if(n){n*=s;
|
|
T[e]=~~((n*$[e]+(255-n)*T[e])/255)}}};L.j.q.Sj=function($,o,T,s){if(s==null)s=T;var E=o.length,e=0,n,A;
|
|
for(var f=0;f<E;f++){n=o[f];if(n){A=255-n;s[e]=~~((n*$[e]+A*T[e])/255);s[e+1]=~~((n*$[e+1]+A*T[e+1])/255);
|
|
s[e+2]=~~((n*$[e+2]+A*T[e+2])/255)}s[e+3]=$[e+3];e+=4}};L.j.q.iN=function($,o,T,s){var E=~~(s*255),e=T.length;
|
|
for(var f=0;f<e;f++){T[f]=((255-E*(255-$[f])/255)*o[f]+$[f]*(E*(255-$[f])/255))/255}};L.j.q.T$=function($,o,T,s){var E=~~(s*255),e=T.length;
|
|
for(var f=0;f<e;f++){T[f]=((255-E*$[f]/255)*o[f]+$[f]*(E*$[f]/255))/255}};L.j.q.GI=function($,o,T){var s=o.length;
|
|
for(var f=0;f<s;f++){o[f]=~~($[f]*T+.5)+(o[f]-~~(o[f]*T+.5))}};L.j.q.sub=function($,o){var T=$.length;
|
|
for(var f=0;f<T;f++){o[f]=Math.max($[f]-o[f],0)}};L.j.q.add=function($,o){var T=$.length;for(var f=0;
|
|
f<T;f++){o[f]=Math.min($[f]+o[f],255)}};L.j.q.tE=function($,o){var T=$.length;for(var f=0;f<T;f++){o[f]=$[f]+o[f]>>1}};
|
|
L.j.q.w0=function($,o){var T=$.length;for(var f=0;f<T;f++){o[f]=$[f]}};L.j.q.Ru=function($,o){var T=$.length;
|
|
for(var f=0;f<T;f++){$[f]=o[$[f]]}};L.j.q.qX=function($,o){var T=L.j.q.No;for(var f=0;f<T;f+=4){var s=$[f],E=$[f+1],e=$[f+2],n=s;
|
|
if(E>s)n=E;if(e>s)n=e;var A=o[n];if(A){$[f]=~~(A*s/n);$[f+1]=~~(A*E/n);$[f+2]=~~(A*e/n)}else{$[f]=A;
|
|
$[f+1]=A;$[f+2]=A}}};L.j.q.nh=function($,o){for(var f=0,T=$.length;f<T;f++){$[f]=Math.min(255,~~(.5+$[f]*o))}};
|
|
L.j.q.L7=function($,o){for(var f=0,T=$.length;f<T;f++){$[f]=255-Math.min(255,~~(.5+(255-$[f])*o))}};
|
|
L.j.q.lY=function($){var o=$.length;for(var f=0;f<o;f++){$[f]=255-$[f]}};L.j.q.gH=function($,o,T,s){if(T==null)T=0;
|
|
if(s==null)s=255;for(var f=0,E=$.length;f<E;f++){$[f]=$[f]>=o?s:T}};L.j.q.bY=function($){return[$>>24&255,$>>16&255,$>>8&255,$&255]};
|
|
L.j.q.a92=function($,o,T,s){if(T==null)T=255;if(s==null)s=4278190335;var E=L.j.q,e=E.No,n=E.bY(T),A=E.bY(s);
|
|
for(var f=0;f<e;f+=4){var u=~~(($[f]+$[f+1]+$[f+2]+2)/3);if(u>=o){$[f]=n[0];$[f+1]=n[1];$[f+2]=n[2]}else{$[f]=A[0];
|
|
$[f+1]=A[1];$[f+2]=A[2]}}};L.j.q.gr=function($,o){var T=L.j.q,s=T.No,E=T.bY(o);for(var f=0;f<s;){$[f++]=E[0];
|
|
$[f++]=E[1];$[f++]=E[2];$[f++]=E[3]}};L.j.q.d6=function($,o){var T=$.length;for(var f=0;f<T;){$[f++]=o}};
|
|
L.j.q.R0=function($,o){$=$>5?(100-Math.max(4,$))/100:.95;o=o!=100?Math.max(4,o)/100:.9995;var T=new Uint8Array(256),s=o>.5?.5/(1-o):o*2,E=~~(s*256),e=~~((.5-$*s)*256)<<8;
|
|
for(var f=0;f<256;f++){T[f]=L.j.q.uo(e>>8);e+=E}return T};L.j.q.h_=function($){for(var f=0,o=L.j.q,T=$.length;
|
|
f<T;f++){$[f]=~~(o.random()*256)}};L.j.q.ajZ=function($,o){for(var f=0,T=L.j.q,s=$.length;f<s;f++){$[f]=T.random()<o?255:0}};
|
|
L.j.q.yS=function($,o,T){for(var f=0,s=L.j.q,E=$.length;f<E;f++){if(s.random()<o)$[f]=T}};L.j.q.qb=function($,o,T){var s=$.length;
|
|
for(var f=0;f<s;f++){$[f]=L.j.q.uo($[f]+T[o[f]])}};L.j.q.j5=function($){var o=new Uint32Array(256);for(var f=0,T=$.length;
|
|
f<T;f++){o[$[f]]++}return o};L.j.q.Nz=function($,o,T){var self=L.j.q,s=self.j5(T),E=self.YG/100,e=new Uint8Array(256),n=E*$,A=E*o,u=0,Y=-1,b=256;
|
|
do{u+=s[++Y]}while(u<=n);u=0;do{u+=s[--b]}while(u<=A);if(b-Y<=0)b=Y+1;if(b>255){b=255;Y=254}var a=255/(b-Y),w=-Y;
|
|
for(var f=0;f<256;f++){e[f]=self.uo(a*w+.5);w++}return e};L.j.q.kf=function($,o,T){var s=L.j.q;s.Ru($,s.Nz(o,T,$))};
|
|
L.j.q.akF=function($,o){var self=L.j.q,T=self.j5($),s=self.YG*o/100,E=0,e=-1;do{E+=T[++e]}while(E<=s);
|
|
return e};L.j.q.MW=function($,o){var T=0,self=L.j.q,s=self.N0,E=self.cQ,e=1/Math.PI,n=e*255;for(var f=0;
|
|
f<E;f++){var A=f+1;if(A==E)A--;var u=f*s,Y=~~((1-(f+1)/E)*255);for(var b=0;b<s;b++){var a=b+1;if(a==s)a--;
|
|
var w=$[u+b],X=$[u+a],N=$[A*s+b];if(w-N==0){o[T++]=Y}else{var z=w-N+255;if(z==255){z=0}else{z=~~(Math.atan2(1/(255-z),1)*n+.5);
|
|
if(z<0)z+=255}o[T++]=z}if(w-X==0){o[T++]=~~((1-(b+1)/s)*255)}else{var z=w-X+255;if(z==255){z=0}else{z=~~(Math.atan2(1/(255-z),1)*n+.5);
|
|
if(z<0)z+=255}o[T++]=z}}}};L.j.q.qk=function($,o){var self=L.j.q,T=self.N0,s=self.cQ,E=0;for(var f=0;
|
|
f<s;f++){for(var e=0;e<T;e++){$[E]=~~(f*o+.5)+~~($[E]*(1-o)+.5);E++;$[E]=~~(e*o+.5)+~~($[E]*(1-o)+.5);
|
|
E++}}};L.j.q.ada=function($,o,T,s){var self=L.j.q,E=self.N0,e=self.cQ,n=0;for(var f=0;f<e;f++){for(var A=0;
|
|
A<E;A++){o[n]=~~(o[n]*(1-T)+.5)+~~($[n]*s+.5);n++;o[n]=~~(o[n]*(1-T)+.5)+~~($[n]*s+.5);n++}}};L.j.q.Xb=function($,o,T){var self=L.j.q,s=self.N0,E=self.cQ,e=0,n=0;
|
|
for(var f=0;f<E;f++){for(var A=0;A<s;A++){var u=$[e++],Y=$[e++];o[n++]=Y%T>=2&&u%T>=2?255:0}}};L.j.q.SJ=function($,o,T,s,E,e,n){var self=L.j.q,A=self.N0,u=self.cQ,Y=0,b=0,a=0;
|
|
for(var f=0;f<u;f++){var w=f%$<T||u-T<=f;for(var X=0;X<A;X++){n[Y++]=w||X%o<s||A-s<=X?E:e}}};L.j.q.YR=function($,o,T,s){var self=L.j.q,E=self.N0,e=self.cQ,n=gH.YR(o),A=n[0],u=n[1],Y=L.G(A.Y()*4);
|
|
Y.fill(4294967295);L.R6(u,Y);var b=L.scale.hb(Y,A.d,A.w),a=L.scale.S7(b,null,E,e,T/100,T/100,0,0);L.Ge(a,$,0);
|
|
if(s)L.lY($)};L.j.q.uo=function($){return~~Math.min(255,Math.max(0,$))};L.j.q.yv=[0,5,10,15,20,25,35,45,65,85,105,125,145,165,185,205];
|
|
L.j.q.w$=[0,.2,.4,.5,.6,.7,.8,.9,1,1.1,1.2,1.3,1.4,1.5,1.7,2,2.5,3,3.5,4,5,6,7,8,9,10];L.j.q.qJ=function($){return $>40?[1.25,1.5,1.75,2,2.5,3,4,5,7.5,10][$-41]:$/40};
|
|
L.j.q.a4n=function($,o,T){var self=L.j.q,s=self.N0,E=self.cQ,e=T,n=T>>1,A=n-1,u=e*e,Y=0;for(var f=0;
|
|
f<E;f++){var b=0,a=0,w=0,X=~~(f/T)*T,N=0;for(var z=0;z<e;z++){for(var i=0;i<e;i++){var k=N+i,Q=X+z;if(k>=s)k=s-1;
|
|
if(Q>=E)Q=E-1;b+=$[Q*s+k<<2];a+=$[(Q*s+k<<2)+1];w+=$[(Q*s+k<<2)+2]}}var O=~~(b/u),c=~~(a/u),B=~~(w/u);
|
|
o[Y]=O;o[Y+1]=c;o[Y+2]=B;o[Y+3]=$[Y+3];Y+=4;for(var G=1;G<s;G++){for(var z=0;z<e;z++){var l=G-1,v=l+e,Q=X+z;
|
|
if(v>=s)v=s-1;if(Q>=E)Q=E-1;var p=Q*s,P=p+v<<2,h=p+l<<2;b+=$[P]-$[h];a+=$[P+1]-$[h+1];w+=$[P+2]-$[h+2]}if(G%T==0){O=~~(b/u);
|
|
c=~~(a/u);B=~~(w/u)}o[Y]=O;o[Y+1]=c;o[Y+2]=B;o[Y+3]=$[Y+3];Y+=4}}};L.j.q.afN=function($,o,T,s,E){var self=L.j.q,e=self.N0,n=self.cQ,A=0,u=0,Y=0,b=0;
|
|
for(var f=b;f<n+b;f++){var a=f%o>=s||f<s||n+b-s<=f;for(var w=0;w<e;w++){$[A++]=a&&(w%T>=E||w<E||e-E<=w)?255:0}}};
|
|
L.j.q.agc=function($,o,T){var s=function(Y,b){return b<=Y?Y/b&1?b-Y%b:Y%b:Y},E=[function(A,u){return s(A,255)/255},function(A,u){return(255+s(A,255)-s(u,255))/510},function(A,u){return(255-s(u,255))/255},function(A,u){return(510-s(A,255)-s(u,255))/510},function(A,u){return(255-s(A,255))/255},function(A,u){return(255-s(A,255)+s(u,255))/510},function(A,u){return s(u,255)/255},function(A,u){return(s(A,255)+s(u,255))/510}][T],e=0,n=0;
|
|
for(var f=0;f<L.j.q.YG;f++){var A=$[e++],u=$[e++];o[n++]=~~(255*E(A,u))}};L.j.ahv=function(){var $=[],o=new Uint8Array(512),T=new Float32Array(512),s=new Float32Array(512),E=[1,-1,1,-1,1,-1,0,0],e=[1,1,-1,-1,0,0,1,-1],n=0,A,N=0;
|
|
for(;n<256;n++)$[n]=n;while(n!=0){n--;A=Math.floor(Math.random()*n);$[A]^=$[n]^($[n]=$[A])}function u(u){u=Math.floor(u*65536);
|
|
if(u<256){u|=u<<8}for(var f=0;f<256;f++){var k=f+256,Q=$[f]^(f&1?u:u>>8)&255;o[f]=o[k]=Q;Q=Q%8;T[f]=T[k]=E[Q];
|
|
s[f]=s[k]=e[Q]}}function Y(k){return k*k*k*(k*(k*6-15)+10)}function b(k,Q,O){return(1-O)*k+O*Q}function a(k,Q){return k&Q}function w(k,Q){return k%Q}function X(k,Q,O,c,B){var G=Math.floor(k),l=Math.floor(Q),n,v,p,P,h,j;
|
|
k=k-G;Q=Q-l;G=G&255;l=l&255;n=G+o[l];P=T[n]*k+s[n]*Q;n=G+o[B(l+1,c)];p=T[n]*k+s[n]*(Q-1);n=B(G+1,O)+o[l];
|
|
h=T[n]*(k-1)+s[n]*Q;n=B(G+1,O)+o[B(l+1,c)];j=T[n]*(k-1)+s[n]*(Q-1);v=Y(k);return b(b(P,h,v),b(p,j,v),Y(Q))}function z(k,n,Q){k[n]=Q}function i(k,Q,O,c,B){var G=Math.min(Math.min(Q,256),Math.min(256,O)),l=G==256||G<8,v=8,p=new Uint32Array(v),P=new Uint32Array(v),h=new Float32Array(v),j=new Float32Array(v),C=1,V=1,d=l?a:w,m=z,R;
|
|
for(var f=0;f<v;f++){R=V*1/G;if(l){P[f]=(1<<Math.ceil(Math.log2(O*R)))-1;p[f]=(1<<Math.ceil(Math.log2(Q*R)))-1}else{P[f]=R*O;
|
|
p[f]=R*Q}h[f]=C;j[f]=R;C*=.5;V=V<<1}u(Math.random());for(var g=0,n=0;g<O;g++){for(var S=0;S<Q;S++){var F=0;
|
|
for(var r=0;r<v;r++){R=j[r];F+=X(S*R,g*R,p[r],P[r],d)*h[r]}m(c,n++,Math.round(Math.max(0,255*Math.min(1,.5+F*.5))))}}}return i}();
|
|
L.j.am1=function(){function $(o,T,s,E){var e=new Uint8Array(o.length>>>2),n=new Uint8Array(o.length>>>2),A=new Uint8Array(o.length);
|
|
for(var f=0;f<o.length;f+=4){var u=o[f+0]*.3+o[f+1]*.59+o[f+2]*.11;n[f>>>2]=u;A[f]=o[f];A[f+1]=o[f+1];
|
|
A[f+2]=o[f+2]}L.TS.er(n,e,T,s);L.TS.ls(o,E,T,s,L.TS.mQ[1],0,!0);for(var f=0;f<o.length;f+=4){A[f+3]=255-e[f>>>2]}for(var f=0,Y=o.length;
|
|
f<Y;f+=4){var b=A[f+3]/255;E[f]=A[f]*b+E[f]*(1-b);E[f+1]=A[f+1]*b+E[f+1]*(1-b);E[f+2]=A[f+2]*b+E[f+2]*(1-b)}}return $}();
|
|
L.j.ajK=function(){function $(e,n,A,u,Y){var b=new Uint32Array(e.buffer),a=0;for(var f=0;f<A;f++){for(var w=0;
|
|
w<n;w++,a+=4){var X=b[f*n+w],N=X&255,z=X>>>8&255,i=X>>>16&255,k=X>>>24&255,Q=~~(Math.random()*8),O=Q%3,c=0,B=0;
|
|
if(Q<3){B--}else if(Q>4){B++}if(O==0){c--}else if(O==2){c++}var G=w+c,l=f+B;if(G<0)G=0;else if(G>n-1)G=n-1;
|
|
if(l<0)l=0;else if(l>A-1)l=A-1;var X=b[l*n+G],v=X&255,p=X>>>8&255,P=X>>>16&255,h=X>>>24&255;u[a]=Y(N,v);
|
|
u[a+1]=Y(z,p);u[a+2]=Y(i,P);u[a+3]=Y(k,h)}}}function o(e,n){return n}function T(e,n){return e>n?n:e}function s(e,n){return e<n?n:e}function E(e,n,A,u,Y){var b=Y[0];
|
|
if(b==0)$(e,n,A,u,o);else if(b==1)$(e,n,A,u,T);else if(b==2)$(e,n,A,u,s);else if(b==3){console.error("Not implemented")}else console.error("Mew mew")}return E}();
|
|
L.j.ak4=function(){function $(o,T,s,E,e){var n=e&&e[0]?e[0]:4,A,u,Y,b,a,w,X;for(var f=0;f<s;f++){var N=Math.max(f-n,0),z=Math.min(f+n,s-1);
|
|
for(var i=0;i<T;i++){var k=Math.max(i-n,0),Q=Math.min(i+n,T-1);A=N*T+k<<2;b=o[A];a=o[A+1];w=o[A+2];X=o[A+3];
|
|
A=N*T+Q<<2;b+=o[A];a+=o[A+1];w+=o[A+2];X+=o[A+3];A=z*T+k<<2;b+=o[A];a+=o[A+1];w+=o[A+2];X+=o[A+3];A=z*T+Q<<2;
|
|
b+=o[A];a+=o[A+1];w+=o[A+2];X+=o[A+3];A=f*T+i<<2;E[A]=b+2>>>2;E[A+1]=a+2>>>2;E[A+2]=w+2>>>2;E[A+3]=X+2>>>2}}}return $}();
|
|
L.j.aeP=function(){function $(o,T,s,E){var e=new Uint8Array(o.length),n=new Uint8Array(o.length>>>2),A=new Uint8Array(o.length>>>2);
|
|
L.TS.ls(o,e,T,s,L.TS.mQ[2],0,!0);for(var f=0;f<o.length;f+=4){var u=e[f+0]*.3+e[f+1]*.59+e[f+2]*.11;
|
|
n[f>>>2]=u;E[f+0]=o[f+0];E[f+1]=o[f+1];E[f+2]=o[f+2];E[f+3]=o[f+3]}L.TS.er(n,A,T,s);for(var f=0;f<o.length;
|
|
f+=4){e[f+3]=~~(Math.max(0,255-A[f>>>2]-50)*(255/205))}for(var f=0,Y=o.length;f<Y;f+=4){var b=e[f+3]/255;
|
|
E[f]=e[f]*b+E[f]*(1-b);E[f+1]=e[f+1]*b+E[f+1]*(1-b);E[f+2]=e[f+2]*b+E[f+2]*(1-b)}}return $}();L.j.a_=function(){function $(Q,O){return Q[O]+Q[O+1]+Q[O+2]+Q[O+3]}function o(Q,O){return Q[O]+Q[O+1]+Q[O+2]+2*Q[O+3]}function T(Q,O,c,B){Q[O]=c[B];
|
|
Q[O+1]=c[B+1];Q[O+2]=c[B+2];Q[O+3]=c[B+3]}function s(Q,O,c){Q[O]=Q[c];Q[O+1]=Q[c+1];Q[O+2]=Q[c+2];Q[O+3]=Q[c+3]}function E(Q,O,c){Q[c]=O[c];
|
|
Q[c+1]=O[c+1];Q[c+2]=O[c+2];Q[c+3]=255-O[c+3]}function e(Q){for(var f=0,O=Q.length;f<O;f+=4){Q[f+3]=255-Q[f+3]}}function n(){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 A(Q,O,c,B,G,l){Q[O]=c[B]+(G[l]-c[B]>>1);Q[O+1]=c[B+1]+(G[l+1]-c[B+1]>>1);
|
|
Q[O+2]=c[B+2]+(G[l+2]-c[B+2]>>1);Q[O+3]=c[B+3]+(G[l+3]-c[B+3]>>1)}function u(Q,O,c,B,G,l){Q[O]=G[l]+c[B]>>1;
|
|
Q[O+1]=G[l+1]+c[B+1]>>1;Q[O+2]=G[l+2]+c[B+2]>>1;Q[O+3]=G[l+3]+c[B+3]>>1}function Y(Q,O,c,B,G,l,v,p,P){var h=0,j=0,C=0,f,V=G[l],d;
|
|
A(p,0,Q,O,Q,c);for(f=0;f<V;f++){A(p,(f+1)*4,p,f*4,Q,c)}j=(V+1)*4;C+=V;l--;T(Q,O,p,j-4);B[l]=$(Q,O);O-=P;
|
|
while(l>0&&B[l-1]<B[l]){d=p;p=v;v=d;h=j;u(p,0,Q,O-P,v,0);for(f=4;f<h;f+=4){u(p,f,p,f-4,v,f)}V=G[l];for(f=C;
|
|
f<V;f++){A(p,j,p,j-4,v,h-4);j+=4;C++}l--;T(Q,O,p,j-4);B[l]=$(Q,O);O-=P}}function b(Q,O,c,B,G){var l=O*4,v=0,p,P,h=new Uint8Array(O+1),j=new Uint8Array(10*4),C=new Uint8Array(10*4);
|
|
for(var f=0;f<c;f++){E(B,Q,v);G[0]=$(B,v);h[0]=n();p=v;v+=4;for(var V=1;V<O;V++){E(B,Q,v);G[V]=$(B,v);
|
|
P=n();h[V]=P;if(G[V-1]<G[V]&&P>0){Y(B,v-4,v,G,h,V,j,C,4)}v+=4}G[O]=G[0];h[O]=h[0];if(G[O-1]<G[O]&&P>0){Y(B,v,p,G,h,O,j,C,4)}}e(B)}function a(){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,O,c,B,G,l){var v=a()+1,p=B[G];
|
|
for(var f=1;f<v;f++){if(0>G)break;if(B[G-f]<p){s(Q,O,c)}else{break}O+=l}}function X(Q,O,c,B,G){var l=O*4,v=0;
|
|
for(var f=0;f<c;f++){E(B,Q,v);G[0]=$(B,v);v+=4;for(var p=1;p<O;p++){E(B,Q,v);G[p]=$(Q,v);if(G[p-1]<G[p]){w(B,v-4,v,G,p,-4)}v+=4}G[O]=G[0];
|
|
if(G[p-1]<G[p]){w(B,v-4,v-l,G,p,-4)}}e(B)}function N(Q,O,c,B,G,l){var v=1,p,P,h=new Uint8Array(4),j,C=O;
|
|
while(Math.random()<1/v){C=O;if(B<=1)break;p=c[B];P=c[B-1];if(p<=P)break;T(h,0,Q,C-l);j=!0;for(var f=B;
|
|
f<G;f++){if(P>c[f]){T(Q,C-l,h,0);c[f-1]=P;j=!1;break}T(Q,C-l,Q,C);c[f-1]=c[f];C+=l}if(j){T(Q,C-l,h,0);
|
|
c[G-1]=P}v++;B--;O-=l}}function z(Q,O,c,B,G){var l=0,v=0,p=O*4;for(var f=0;f<c;f++){v=l;for(var P=0;
|
|
P<O;P++){E(B,Q,l);G[P]=o(B,l);l+=4}l=v;for(var P=1;P<O;P++){if(G[P-1]<G[P]&&Math.random()<.66){N(B,l+4,G,P,O,4)}l+=4}l+=4}e(B)}function i(Q,O,c,B,G){var l=G[0],v=G[1],p=new Uint16Array(O+1),P=Q,h=B,j;
|
|
if(v){j=B.slice(0);k(Q,B,O,c);P=B;h=j}if(l==0)b(P,O,c,h,p);else if(l==1)X(P,O,c,h,p);else if(l==2)z(P,O,c,h,p);
|
|
if(v){k(j,B,O,c)}}function k(Q,O,c,B){for(var G=0;G<B;G++)for(var l=0;l<c;l++){var v=G*c+l<<2,p=G*c+(c-1-l)<<2;
|
|
O[p]=Q[v];O[p+1]=Q[v+1];O[p+2]=Q[v+2];O[p+3]=Q[v+3]}}return i}();L.j.ail=function($,o,T,s,E){var e=L.j.q,n=1,i=0,O=0;
|
|
e.jq(o,T);e.dh(E[2]);var A=3<<13,u=Math.PI/2.43,Y=u/256,b=Math.PI*2/256;function a(){var l=e.random()*256,v=e.random()*256;
|
|
return n*~~(Math.tan(u-l*Y)*325*Math.cos(v*b)*256)+A>>16}n=E[0];var w=E[1],X=(w+2)/2,N=e.random()*255,z=e.se(1);
|
|
for(var f=0;f<T;f++){var k=e.uo(a()+N);for(var Q=0;Q<o;Q++){k=e.uo(a()+k);z[i++]=k}}i=o;for(var f=1;
|
|
f<T;f++){var c=e.uo(a()+z[O++]);z[i++]=c;for(var Q=1;Q<o;Q++){var B=O+1;if(Q+1==o){B--}var G=(X+c+z[B]+z[O]*w)/(w+2);
|
|
c=e.uo(a()+G);z[i++]=c;O++}}e.ZI(z,s)};L.t6={a2S:function($,o){var f=$.length;$.push(o);var T=f>>>1;
|
|
while(T!=0&&$[f][0]<$[T][0]){var s=$[f];$[f]=$[T];$[T]=s;f=T;T=f>>>1}},aaA:function($){if($.length==2)return $.pop();
|
|
var top=$[1],f=1;$[1]=$.pop();var o=$.length;while(!0){var T=f<<1,s=T+1,E=f;if(T<o&&$[T][0]<$[E][0])E=T;
|
|
if(s<o&&$[s][0]<$[E][0])E=s;if(E==f)break;var e=$[f];$[f]=$[E];$[E]=e;f=E}return top},alC:function($){for(var f=1;
|
|
f<$.length;f++){var o=f,T=1e9;while(o!=0){var s=$[o][0];if(s>T){console.log(f);throw"e"}T=s;o=o>>>1}}}};
|
|
L.R={};L.R.eP=new Float64Array(256);L.R.L0=new Uint8Array(256*256);L.R.o9=new Uint8Array(256*256);(function(){for(var f=0;
|
|
f<256;f++)L.R.eP[f]=255/f;for(var f=0;f<256;f++)for(var $=0;$<256;$++)L.R.L0[f*256+$]=f==0?0:Math.round($*255/f);
|
|
for(var f=0;f<256;f++)for(var $=0;$<256;$++)L.R.o9[f*256+$]=Math.round(f*(255-$)/255)}());L.R.xE=function($,o,T,s,E,e,n,A){if(A==null)A=fW.gs();
|
|
if("idiv,lbrn,div ,lddg,vLit,lLit,hMix,diff".split(",").indexOf($)==-1){n=n*A.fill;A.fill=1;A.style=!1}var u="norm,dark,mul ,idiv,lbrn,lite,scrn,div ,lddg,over,sLit,hLit,vLit,lLit,pLit,hMix,diff,smud,fsub,fdiv".split(","),Y="dkCl,lgCl,hue ,sat ,colr,lum ".split(","),b=L.R[$+"F"];
|
|
if(A.Kf==null&&$=="norm")L.R.aar(o,T,s,E,e,n,b,A.xX?1:0);else if($=="diss")L.R.a0B(o,T,s,E,e,n,b,A.xX?1:0);
|
|
else if(u.indexOf($)!=-1)L.R.a2L(o,T,s,E,e,n,b,A);else if(Y.indexOf($)!=-1)L.R.a94(o,T,s,E,e,n,b,A)};
|
|
L.R.a5$=function($,o,T){var s=$*T+1-T;return s<.001?0:1-Math.min(1,(1-o)/s)};L.R.a47=function($,o,T){return $*T==1?1:Math.min(1,o/(1-$*T))};
|
|
L.R.XQ=function($){return $<=.25?((16*$-12)*$+4)*$:Math.sqrt($)};L.R.normF=function($,o,T){return $};
|
|
L.R.darkF=function($,o,T){return Math.min($,o)};L.R["mul F"]=function($,o,T){return $*o};L.R.idivF=function($,o,T){var s=$*T+1-T;
|
|
return o==1?1:1-o>=s?0:1-(1-o)/s};L.R.lbrnF=function($,o,T){return Math.max(0,$*T+o-T)};L.R.dkClF=function($,o,T){var s=L.Hl($)<L.Hl(o)?$:o;
|
|
T.i=s.i;T.m=s.m;T.P=s.P;return T};L.R.liteF=function($,o,T){return Math.max($,o)};L.R.scrnF=function($,o,T){return o+$-o*$};
|
|
L.R["div F"]=function($,o,T){$*=T;return o==0?0:o>=1-$?1:o/(1-$)};L.R.lddgF=function($,o,T){$*=T;return Math.min(1,$+o)};
|
|
L.R.lgClF=function($,o,T){var s=L.Hl($)>L.Hl(o)?$:o;T.i=s.i;T.m=s.m;T.P=s.P;return T};L.R.overF=function($,o,T){return L.R.hLitF(o,$,T)};
|
|
L.R.sLitF=function($,o,T){return $<=.5?o-(1-2*$)*o*(1-o):o+(2*$-1)*(L.R.XQ(o)-o)};L.R.hLitF=function($,o,T){return $<=.5?L.R["mul F"](2*$,o,T):L.R.scrnF(2*$-1,o,T)};
|
|
L.R.vLitF=function($,o,T){return $<=.5?L.R.a5$(2*$,o,T):L.R.a47(2*$-1,o,T)};L.R.lLitF=function($,o,T){return $<=.5?L.R.lbrnF(2*$,o,T):L.R.lddgF(2*$-1,o,T)};
|
|
L.R.pLitF=function($,o,T){return $<=.5?L.R.darkF(2*$,o,T):L.R.liteF(2*$-1,o,T)};L.R.hMixF=function($,o,T){if(T>.99)return $+o<1?0:1;
|
|
return Math.min(1,Math.max(0,(o+$*T-T)/(1-T+1e-6)))};L.R.diffF=function($,o,T){$*=T;return Math.abs($-o)};
|
|
L.R.smudF=function($,o,T){return $+o-2*$*o};L.R.fsubF=function($,o,T){return Math.max(o-$,0)};L.R.fdivF=function($,o,T){return Math.min(o/$,1)};
|
|
L.R["hue F"]=function($,o,T){L.R.jn($,L.M3(o),T);L.R.nf(T,L.Hl(o),T)};L.R["sat F"]=function($,o,T){L.R.jn(o,L.M3($),T);
|
|
L.R.nf(T,L.Hl(o),T)};L.R.colrF=function($,o,T){L.R.nf($,L.Hl(o),T)};L.R["lum F"]=function($,o,T){L.R.nf(o,L.Hl($),T)};
|
|
L.R.nf=function($,o,T){var s=o-L.Hl($);T.i=$.i+s;T.m=$.m+s;T.P=$.P+s;L.R.a2X(T)};L.R.a2X=function($){var o=$.i,T=$.m,s=$.P,E=L.DB(o,T,s),J=Math.min(o,T,s),e=Math.max(o,T,s);
|
|
if(J<0){var n=E/(E-J);o=E+(o-E)*n;T=E+(T-E)*n;s=E+(s-E)*n}if(e>1){var n=(1-E)/(e-E);o=E+(o-E)*n;T=E+(T-E)*n;
|
|
s=E+(s-E)*n}$.i=o;$.m=T;$.P=s};L.R.jn=function($,o,T){var s=L.R.acs,E=$.i,e=$.m,n=$.P;if(E==e&&e==n){T.i=T.m=T.P=0}else if(E>e){if(E>n){if(e>n){T.i=o;
|
|
T.m=s(E,e,n,o);T.P=0}else{T.i=o;T.P=s(E,n,e,o);T.m=0}}else{T.P=o;T.i=s(n,E,e,o);T.m=0}}else{if(E<n){if(e>n){T.m=o;
|
|
T.P=s(e,n,E,o);T.i=0}else{T.P=o;T.m=s(n,e,E,o);T.i=0}}else{T.m=o;T.i=s(e,E,n,o);T.P=0}}};L.R.acs=function($,o,T,s){return(o-T)*s/($-T)};
|
|
L.R.aar=function($,o,T,s,E,e,n,A){var u=o.Sr(s).Sr(E),Y=Math.max(0,u.x-o.x),b=Math.max(0,u.x-s.x),a=Math.max(0,u.y-o.y),w=Math.max(0,u.y-s.y),X=u.d,N=u.w,z=o.d,i=s.d,k=L.R.L0,Q=L.R.o9,O=new Uint32Array($.buffer),c=new Uint32Array(T.buffer);
|
|
for(var f=0;f<N;f++){var B=(a+f)*z+Y,G=(w+f)*i+b;for(var l=0;l<X;l++){var v=O[B+l],h=255;if(v>>>24==0)continue;
|
|
if(v>>>24==255&&e==1&&A==0){c[G+l]=O[B+l];continue}var p=c[G+l],P=255*e&255;if(A==0){P=(v>>>24)*e&255;
|
|
h=p>>>24}var j=Q[h<<8|P],C=P+j,V=v&255,d=v>>>8&255,m=v>>>16&255,R=p&255,g=p>>>8&255,S=p>>>16&255;c[G+l]=A*(p>>>24)+(1-A)*C<<24|k[C<<8|L.Z$(m*P+S*j)]<<16|k[C<<8|L.Z$(d*P+g*j)]<<8|k[C<<8|L.Z$(V*P+R*j)]}}};
|
|
L.R.akH=function($,o,T,s,E,e){var n=o.Sr(s).Sr(E),A=Math.max(0,n.x-o.x),u=Math.max(0,n.x-s.x),Y=Math.max(0,n.y-o.y),b=Math.max(0,n.y-s.y),a=n.d,w=n.w,X=o.d,N=s.d,z=L.R.L0,i=L.R.o9,k=new Uint32Array($.buffer),Q=new Uint32Array(T.buffer),O=Math.floor(Math.random()*16777215),c=0;
|
|
for(var f=0;f<w;f++){var B=(Y+f)*X+A,G=(b+f)*N+u;for(var l=0;l<a;l++){var v=k[B+l];if(v>>>24==0)continue;
|
|
if(v>>24==255&&e==1){Q[G+l]=v;continue}var p=Q[G+l],P=(v>>>24)*e*(1/255),h=(p>>>24)*(1/255),j=h*(1-P),C=P+j,V=v&255,d=v>>>8&255,m=v>>>16&255,R=p&255,g=p>>>8&255,S=p>>>16&255;
|
|
c>>>=8;if((l&3)==0)c=L.R.fi(G+l+O);var F=C==0?0:1/C,r=Math.floor(C*(256*255))+(c&255)>>>8,q=Math.floor((m*P+S*j)*F+.5),W=Math.floor((d*P+g*j)*F+.5),Z=Math.floor((V*P+R*j)*F+.5);
|
|
Q[G+l]=r<<24|q<<16|W<<8|Z}}};L.R.Lr=function($,o,T,s,E,e,n,A){var u=L.DB($,o,T),Y=L.DB(s,E,e),b=Math.min,a=L.R.agy,w=a(u,A,0);
|
|
w=b(w,a($,A,8));w=b(w,a(o,A,16));w=b(w,a(T,A,24));var X=a(Y,A,4);X=b(X,a(s,A,12));X=b(X,a(E,A,20));X=b(X,a(e,A,28));
|
|
X=Math.max(X,1-n);var N=Math.min(w,X);return N<0?0:N>1?1:N};L.R.agy=function($,o,f){return Math.min(($-o[f])*o[f+1],($-o[f+3])*o[f+2])};
|
|
L.R.a2L=function($,o,T,s,E,e,n,A){var u=1/255,Y=u*e,b=A.xX?1:0,a=A.fill,w=A.style,X=o.Sr(s).Sr(E),N=Math.max(0,X.x-o.x),z=Math.max(0,X.x-s.x),i=Math.max(0,X.y-o.y),k=Math.max(0,X.y-s.y),Q=X.d,O=X.w,c=o.d,B=s.d,G=new Uint32Array($.buffer),l=new Uint32Array(T.buffer);
|
|
for(var f=0;f<O;f++){var v=(i+f)*c+N,p=(k+f)*B+z;for(var P=0;P<Q;P++,v++,p++){var h=G[v],F=1;if(h>>>24==0)continue;
|
|
var j=l[p],C=(h&255)*u,V=(h>>>8&255)*u,d=(h>>>16&255)*u,m=(j&255)*u,R=(j>>>8&255)*u,g=(j>>>16&255)*u,S=e;
|
|
if(b==0){S=(h>>>24)*Y;F=(j>>>24)*u}if(A.Kf)S*=L.R.Lr(C,V,d,m,R,g,F,A.Kf);var r=F*(1-S),q=S+r,W=q==0?0:255/q,Z=w?1:S,I=((1-F)*S*C+(1-Z)*F*m+Z*F*n(C,m,(1+S-Z)*a))*W,_=((1-F)*S*V+(1-Z)*F*R+Z*F*n(V,R,(1+S-Z)*a))*W,cN=((1-F)*S*d+(1-Z)*F*g+Z*F*n(d,g,(1+S-Z)*a))*W;
|
|
q=S*a+F*(1-S*a);var ce=~~(q*255+.5);l[p]=b*(j>>>24)+(1-b)*ce<<24|cN<<16|_<<8|I}}};L.R.a94=function($,o,T,s,E,e,n,A){var u=1/255,Y=u*e,b=A.xX?1:0,a=o.Sr(s).Sr(E),w=Math.max(0,a.x-o.x),X=Math.max(0,a.x-s.x),N=Math.max(0,a.y-o.y),z=Math.max(0,a.y-s.y),i=a.d,k=a.w,Q=new Uint32Array($.buffer),O=new Uint32Array(T.buffer),c={i:0,m:0,P:0},B={i:0,m:0,P:0},G={i:0,m:0,P:0};
|
|
for(var f=0;f<k;f++){var l=(N+f)*o.d+w,v=(z+f)*s.d+X;for(var p=0;p<i;p++,l++,v++){var P=Q[l],h=O[v],j=(P&255)*u,C=(P>>>8&255)*u,V=(P>>>16&255)*u,d=(h&255)*u,m=(h>>>8&255)*u,R=(h>>>16&255)*u,g=e,S=1;
|
|
if(b==0){g=(P>>>24)*Y;S=(h>>>24)*u}if(A.Kf)g*=L.R.Lr(j,C,V,d,m,R,S,A.Kf);var F=S*(1-g),r=g+F,q=255/r;
|
|
c.i=j;c.m=C;c.P=V;B.i=d;B.m=m;B.P=R;n(c,B,G);var W=(((1-S)*j+S*G.i)*g+d*F)*q,Z=(((1-S)*C+S*G.m)*g+m*F)*q,I=(((1-S)*V+S*G.P)*g+R*F)*q,_=b*(h>>>24)+(1-b)*Math.round(r*255);
|
|
O[v]=_<<24|I<<16|Z<<8|W}}};L.R.Po=function($){$=$^61^$>>>16;$=$+($<<3);$=$^$>>>4;$=$*668265261;$=$^$>>15;
|
|
return($&16777215)*(1/16777215)};L.R.fi=function($){$=$^61^$>>>16;$=$+($<<3);$=$^$>>>4;$=$*668265261;
|
|
$=$^$>>>15;return $};L.R.Cp=function($){this.dh=$};L.R.Cp.prototype.get=function(){var $=this.dh=L.R.fi(this.dh);
|
|
return($&16777215)*(1/16777215)};L.R.a0B=function($,o,T,s,E,e,n,A){var u=1/255,Y=u*e,b=Math.round(e*(256*256*256/255)),a=o.Sr(s).Sr(E),w=Math.max(0,a.x-o.x),X=Math.max(0,a.x-s.x),N=Math.max(0,a.y-o.y),z=Math.max(0,a.y-s.y),i=a.d,k=a.w,Q=new Uint32Array($.buffer),O=new Uint32Array(T.buffer);
|
|
for(var f=0;f<k;f++){var c=(N+f)*o.d+w,B=(z+f)*s.d+X;for(var G=0;G<i;G++,c++,B++){var l=Q[c],v=O[B],p=A*255+(1-A)*(l>>>24);
|
|
if((L.R.fi(c)&16777215)>=p*b)continue;O[B]=l&16777215|A*(v>>>24)+(1-A)*255<<24}}};L.R.a4q=function($,o,T){for(var f=0;
|
|
f<$.length;f+=4){var s=T[f>>>2];if(s==0)continue;var E=s*(1/255),e=1/E,n=o[f],A=o[f+1],u=o[f+2],Y=$[f],b=$[f+1],a=$[f+2];
|
|
o[f]=Math.min(255,Math.max(0,Math.round((n-(1-E)*Y)*e)));o[f+1]=Math.min(255,Math.max(0,Math.round((A-(1-E)*b)*e)));
|
|
o[f+2]=Math.min(255,Math.max(0,Math.round((u-(1-E)*a)*e)));o[f+3]=255}};L.R.Cu=function($,o,T,s,E,e,n,A,u,Y,b){if(Y==null)Y=!1;
|
|
if(b==null)b=[1,1,1];var a=255<<24|b[2]*16711680|b[1]*65280|b[0]*255,w=~a;if(E&&!o.R1(e)){var X=L.G(o.Y()*4);
|
|
X.fill(n);L.pg(E,e,X,o);E=X;e=o}if(Y){if(E==null)L.R.aeN($,o,T,s,E,A,u,a,w);else L.R.ajt($,o,T,s,E,A,u)}else{if(E==null)L.R.a3e($,o,T,s,E,A,u,a,w);
|
|
else L.R.a9F($,o,T,s,E,A,u)}};L.R.a3e=function($,o,T,s,E,e,n,A,u){var Y=1/255,b=o.Sr(s).Sr(e),a=Math.max(0,b.x-o.x),w=Math.max(0,b.x-s.x),X=Math.max(0,b.y-o.y),N=Math.max(0,b.y-s.y),z=b.d,i=b.w,k=new Uint32Array($.buffer),Q=new Uint32Array(T.buffer),O=L.R.L0,c=n*255&255;
|
|
for(var f=0;f<i;f++){var B=(X+f)*o.d+a,G=(N+f)*s.d+w;for(var l=0;l<z;l++,B++,G++){var v=k[B],p=Q[G],P=v>>>24,h=p>>>24,j=L.Z$(c*P+(255-c)*h),C=L.Z$(P*c),V=L.Z$(h*(255-c)),d=v&255,m=v>>>8&255,R=v>>>16&255,g=p&255,S=p>>>8&255,F=p>>>16&255,r=C*d+g*V,q=C*m+S*V,W=C*R+F*V;
|
|
r=O[j<<8|L.Z$(r)];q=O[j<<8|L.Z$(q)];W=O[j<<8|L.Z$(W)];var Z=j<<24|W<<16|q<<8|r;Q[G]=u&p|A&Z}}};L.R.aeN=function($,o,T,s,E,e,n,A,u){var Y=1/255,b=o.Sr(s).Sr(e),a=Math.max(0,b.x-o.x),w=Math.max(0,b.x-s.x),X=Math.max(0,b.y-o.y),N=Math.max(0,b.y-s.y),z=b.d,i=b.w,k=new Uint32Array($.buffer),Q=new Uint32Array(T.buffer),O=L.R.L0,c=n*16777215&16777215;
|
|
for(var f=0;f<i;f++){var B=(X+f)*o.d+a,G=(N+f)*s.d+w;for(var l=0;l<z;l++,B++,G++){if((L.R.fi(B)&16777215)<c){Q[G]=u&Q[G]|A&k[B]}}}};
|
|
L.R.a9F=function($,o,T,s,E,e,n){var A=1/255,u=o.Sr(s).Sr(e),Y=Math.max(0,u.x-o.x),b=Math.max(0,u.x-s.x),a=Math.max(0,u.y-o.y),w=Math.max(0,u.y-s.y),X=u.d,N=u.w,z=new Uint32Array($.buffer),i=new Uint32Array(T.buffer),k=L.R.L0;
|
|
for(var f=0;f<N;f++){var Q=(a+f)*o.d+Y,O=(w+f)*s.d+b;for(var c=0;c<X;c++,Q++,O++){var B=E[Q]*n&255;if(B==0)continue;
|
|
if(B==255){i[O]=z[Q];continue}var G=z[Q],l=i[O],v=G>>>24,p=l>>>24,P=L.Z$(B*v+(255-B)*p),h=L.Z$(v*B),j=L.Z$(p*(255-B)),C=G&255,V=G>>>8&255,d=G>>>16&255,m=l&255,R=l>>>8&255,g=l>>>16&255,S=k[P<<8|L.Z$(h*C+m*j)],F=k[P<<8|L.Z$(h*V+R*j)],r=k[P<<8|L.Z$(h*d+g*j)];
|
|
i[O]=P<<24|r<<16|F<<8|S}}};L.R.ajt=function($,o,T,s,E,e,n){var A=1/255,u=o.Sr(s).Sr(e),Y=Math.max(0,u.x-o.x),b=Math.max(0,u.x-s.x),a=Math.max(0,u.y-o.y),w=Math.max(0,u.y-s.y),X=u.d,N=u.w,z=new Uint32Array($.buffer),i=new Uint32Array(T.buffer),k=L.R.L0,Q=Math.round(n*257);
|
|
for(var f=0;f<N;f++){var O=(a+f)*o.d+Y,c=(w+f)*s.d+b;for(var B=0;B<X;B++,O++,c++){var G=E[O]*Q;if((L.R.fi(O)&65535)<G)i[c]=z[O]}}};
|
|
L.R.TH=function($,o,T,s,E,e,n){var A=1/255,u=o.Sr(s).Sr(e),Y=Math.max(0,u.x-o.x),b=Math.max(0,u.x-s.x),a=Math.max(0,u.y-o.y),w=Math.max(0,u.y-s.y),X=u.d,N=u.w,z=new Uint32Array($.buffer),i=new Uint32Array(T.buffer),k=Math.floor(Math.random()*s.Y()),Q=L.R.abv;
|
|
for(var f=0;f<N;f++){var O=(a+f)*o.d+Y,c=(w+f)*s.d+b;for(var B=0;B<X;B++){var G=E[O+B]*n;if(G==0)continue;
|
|
if(G==255){i[c+B]=z[O+B];continue}var l=z[O+B],v=i[c+B],p=l>>>24,P=v>>>24,h=p*G*(1/255),j=P*(255-G)*(1/255),C=l&255,V=l>>>8&255,d=l>>>16&255,m=v&255,R=v>>>8&255,g=v>>>16&255,S=L.R.fi(c+B+k),F=Math.floor((h+j)*256+.5)+(S>>>0&255)>>>8,r=F==0?0:256/(h+j),q=C*h+m*j,W=V*h+R*j,Z=d*h+g*j,I=Math.floor(q*r+.5)+(S>>>8&255)>>>8,_=Math.floor(W*r+.5)+(S>>>16&255)>>>8,cN=Math.floor(Z*r+.5)+(S>>>21&248)>>>8;
|
|
i[c+B]=F<<24|cN<<16|_<<8|I}}};L.R.abv=function($){return Math.floor($+Math.random())};L.R._b=function($,o,T,s,E,e,n){var A=1/255,u=o.Sr(s).Sr(e),Y=Math.max(0,u.x-o.x),b=Math.max(0,u.x-s.x),a=Math.max(0,u.y-o.y),w=Math.max(0,u.y-s.y),X=u.d,N=u.w;
|
|
for(var f=0;f<N;f++){var z=(a+f)*o.d+Y,i=(w+f)*s.d+b;for(var k=0;k<X;k++,z++,i++){var Q=n*E[z]*A;if(Q==0)continue;
|
|
if(Q==1){T[i]=$[z];continue}T[i]=$[z]*Q+T[i]*(1-Q)}}};L._o={};L._o.ac7=function($,o,T,s,E,e){L._o.b2($,o,T,s,E,e,null,0)};
|
|
L._o.a3Z=function($,o,T,s,E){L._o.b2($,o,T,s,E,null,null,0)};L._o.aqG=function($,o,T,s,E,e,n){L._o.b2($,o,T,s,E,null,e,n*.5)};
|
|
L._o.b2=function($,o,T,s,E,e,n,A){var u=0,j=0,C=1e9,V=0,d=1e9,m=0,R=1e9,g=0,S=0,F=0,r=0;if(e){u=E*.5;
|
|
E=3+Math.round((E-3)*.75)}if(n){E=Math.round(E*2.2)}var Y=1/E,b=Math.floor(o*Y)+1,a=Math.floor(T*Y)+1,w=[],X=new Uint8Array(b*a*4),N=n?.5:1,z=e?64:0;
|
|
for(var i=0;i<a;i++){var k=n?.5*(i&1):0;for(var Q=0;Q<b;Q++){var O=(Q+Math.random()*N+k)*E,c=(i+Math.random()*N)*E;
|
|
w.push(O,c);var B=Math.min(o-1,Math.floor(O)),G=Math.min(T-1,Math.floor(c)),l=(G*o+B)*4,v=(i*b+Q)*4;
|
|
for(var f=0;f<4;f++)X[v+f]=Math.max(0,Math.min(255,Math.floor($[l+f]+(Math.random()-.5)*z)))}}var p=e?e:n?n:[0,0,0],P=b*a*2,h=[-b-1,-b,-b+1,-1,0,1,b-1,b,b+1];
|
|
for(var i=0;i<T;i++){F=0;for(var Q=0;Q<o;Q++){var q=Q+.5,W=i+.5,Z=Math.floor(W*Y),I=Math.floor(q*Y),_=Z*b+I,gf=0,K=0;
|
|
if(F>1+A){C=L._o._Q(w,j,q,W);g=Math.sqrt(C);F--;r++}else{C=d=R=1e9;for(var f=0;f<h.length;f++){var cN=(_+h[f])*2;
|
|
if(cN<0||cN>=P)continue;var ce=L._o._Q(w,cN,q,W);if(ce<R){if(ce<d){if(ce<C){m=V;R=d;V=j;d=C;j=cN;C=ce}else{m=V;
|
|
R=d;V=cN;d=ce}}else{m=cN;R=ce}}}g=Math.sqrt(C);S=Math.sqrt(d);F=S-(g+S)*.5}if(n==null){var cv=(g+S)*.5,f0=e?Math.max(0,cv-u):0;
|
|
gf=Math.max(0,Math.min(1,.5+cv-g-f0));K=Math.max(0,Math.min(1,1-(.5+cv-g)-f0))}else{var i8=Math.min(L._o.NZ(w,j,V,q,W),L._o.NZ(w,j,m,q,W));
|
|
gf=Math.max(0,Math.min(1,i8-A*.5));if(q<A||o-A<q||W<A||T-A<W)gf=0;K=0}var b5=1-K-gf,v=i*o+Q<<2,iC=j<<1,an=V<<1;
|
|
s[v+0]=Math.floor(.5+gf*X[iC+0]+K*X[an+0]+b5*p[0]);s[v+1]=Math.floor(.5+gf*X[iC+1]+K*X[an+1]+b5*p[1]);
|
|
s[v+2]=Math.floor(.5+gf*X[iC+2]+K*X[an+2]+b5*p[2]);s[v+3]=$[v+3]}}};L._o._Q=function($,o,T,s){var E=T-$[o],e=s-$[o+1];
|
|
return E*E+e*e};L._o.NZ=function($,o,T,s,E){var e=$[o],n=$[o+1],A=$[T],u=$[T+1],Y=(e+A)*.5,b=(n+u)*.5,a=Y+(u-n),w=b-(A-e),X=w-b,N=a-Y;
|
|
return Math.abs(X*s-N*E+a*b-w*Y)/Math.sqrt(N*N+X*X)};L.Ja={};L.Ja.pf=function($){if(L.Ja.ex.length<$)L.Ja.ex=L.G($);
|
|
return L.Ja.ex};L.Ja.ex=L.G(0);L.Ja.sR=function($){if(L.Ja.qs.length<$)L.Ja.qs=new Float32Array($);return L.Ja.qs};
|
|
L.Ja.qs=new Float32Array(0);L.Ja.Yy=function($,o,T,s){var E=T.d,e=T.w;L.Ja.a9W($,o,E,e,s)};L.Ja.Pm=function($,o,T,s){var E=T.d,e=T.w;
|
|
L.Ja.alz($,o,E,e,s)};L.Ja.adi=function($,o,T){var s=o.d,E=o.w;L.Ja.a35($,s,E,T)};L.Ja.YK=function($,o,T,s,E){var e=T.d,n=T.w;
|
|
L.Ja.a6Y($,o,e,n,s,E)};L.Ja.es=function($,o,T,s){var E=T.d,e=T.w;s=Math.round(s);var n=L.Ja.pf(E*e);
|
|
L.w0($,o);L.Ja.hr(o,n,E,e,s)};L.Ja.yk=function($,o,T){var s=o.d,E=o.w;T=Math.round(T);var e=L.Ja.pf(s*E*4);
|
|
L.Ja.yR($,e,s,E,T)};L.Ja.Jf=function($,o,T,s){var E=T.d,e=T.w;s=Math.round(s);var n=L.Ja.sR(E*e);L.w0($,o);
|
|
L.Ja.H2(o,n,E,e,s)};L.Ja.Os=function($,o,T){var s=o.d,E=o.w;T=Math.round(T);var e=L.Ja.pf(s*E*4);L.Ja.zY($,e,s,E,T);
|
|
L.w0(e,$)};L.Ja.XW=function($,J){var o=Math.sqrt(12*$*$/J+1),T=Math.floor(o);if(T%2==0)T--;var s=T+2,E=(12*$*$-J*T*T-4*J*T-3*J)/(-4*T-4),e=Math.round(E),n=[];
|
|
for(var f=0;f<J;f++)n.push(f<e?T:s);return n};L.Ja.a9W=function($,o,T,s,E){var e=L.Ja.XW(E,3),n=L.Ja.pf(T*s);
|
|
L.w0($,o);L.Ja.hr(o,n,T,s,e[0]-1>>1);L.Ja.hr(o,n,T,s,e[1]-1>>1);L.Ja.hr(o,n,T,s,e[2]-1>>1)};L.Ja.alz=function($,o,T,s,E){var e=L.Ja.XW(E,2),n=L.Ja.pf(T*s);
|
|
L.w0($,o);L.Ja.hr(o,n,T,s,e[0]-1>>1);L.Ja.hr(o,n,T,s,e[1]-1>>1)};L.Ja.a35=function($,o,T,s){var E=L.Ja.XW(s,3),e=L.Ja.pf(o*T*4);
|
|
L.Ja.yR($,e,o,T,E[0]-1>>1);L.Ja.yR($,e,o,T,E[1]-1>>1);L.Ja.yR($,e,o,T,E[2]-1>>1)};L.Ja.a6Y=function($,o,T,s,E,e){if(e==null)e=3;
|
|
var n=L.Ja.XW(E,e),A=L.Ja.sR(T*s);L.w0($,o);for(var f=0;f<e;f++)L.Ja.H2(o,A,T,s,(n[f]-1)/2)};L.Ja.hr=function($,o,T,s,E){L.Ja.adg($,o,T,s,E);
|
|
L.Ja.anh(o,$,T,s,E)};L.Ja.yR=function($,o,T,s,E){L.Ja.zY($,o,T,s,E);L.Ja.a8e(o,$,T,s,E)};L.Ja.H2=function($,o,T,s,E){L.Ja.a1r($,o,T,s,E);
|
|
L.Ja.abu(o,$,T,s,E)};L.Ja.MI=[];L.Ja.Vo=function($){if(L.Ja.MI[$])return L.Ja.MI[$];var o=1/($+$+1),T=($+$+1)*256,s=L.G(T);
|
|
for(var f=0;f<T;f++)s[f]=Math.round(f*o);L.Ja.MI[$]=s;return s};L.Ja.adg=function($,o,T,s,E){var e=1/(E+E+1),n=T-E-E-1,A=L.Ja.Vo(E);
|
|
for(var f=0;f<s;f++){var u=f*T,Y=u,b=u+E,a=$[u],w=$[u+T-1],X=(E+1)*a;for(var N=0;N<E;N++)X+=$[u+N];for(var N=0;
|
|
N<=E;N++){X+=$[b+N]-a;o[u+N]=A[X]}b+=E+1;u+=E+1;for(var N=0;N<n;N++){X+=$[b+N]-$[Y+N];o[u+N]=A[X]}b+=n;
|
|
Y+=n;u+=n;for(var N=T-E;N<T;N++){X+=w-$[Y++];o[u++]=A[X]}}};L.Ja.zY=function($,o,T,s,E){var e=T<<2,n=E<<2,A=1/(E+E+1),u=T-E-E-1,Y=u<<2,b=L.Ja.Vo(E);
|
|
for(var f=0;f<s;f++){var a=f*e,w=a,X=a+n,N=a+e,z=$[a],i=$[a+1],k=$[a+2],Q=$[a+3],O=(E+1)*z,c=(E+1)*i,B=(E+1)*k,G=(E+1)*Q;
|
|
for(var l=0;l<n;l+=4){O+=$[a+l];c+=$[a+l+1];B+=$[a+l+2];G+=$[a+l+3]}for(var l=0;l<=n;l+=4){O+=$[X]-z;
|
|
o[a]=b[O];c+=$[X+1]-i;o[a+1]=b[c];B+=$[X+2]-k;o[a+2]=b[B];G+=$[X+3]-Q;o[a+3]=b[G];X+=4;a+=4}for(var l=0;
|
|
l<Y;l+=4){O+=$[X+l]-$[w+l];o[a+l]=b[O];c+=$[X+l+1]-$[w+l+1];o[a+l+1]=b[c];B+=$[X+l+2]-$[w+l+2];o[a+l+2]=b[B];
|
|
G+=$[X+l+3]-$[w+l+3];o[a+l+3]=b[G]}X+=Y;w+=Y;a+=Y;z=$[N-4];i=$[N-3];k=$[N-2];Q=$[N-1];for(var l=T-E;
|
|
l<T;l++){O+=z-$[w];o[a]=b[O];c+=i-$[w+1];o[a+1]=b[c];B+=k-$[w+2];o[a+2]=b[B];G+=Q-$[w+3];o[a+3]=b[G];
|
|
w+=4;a+=4}}};L.Ja.a1r=function($,o,T,s,E){var e=1/(E+E+1),n=T-E-E-1;for(var f=0;f<s;f++){var A=f*T,u=A,Y=A+E,b=$[A],a=$[A+T-1],w=(E+1)*b;
|
|
for(var X=0;X<E;X++)w+=$[A+X];for(var X=0;X<=E;X++){w+=$[Y+X]-b;o[A+X]=w*e}Y+=E+1;A+=E+1;for(var X=0;
|
|
X<n;X++){w+=$[Y+X]-$[u+X];o[A+X]=w*e}Y+=n;u+=n;A+=n;for(var X=T-E;X<T;X++){w+=a-$[u++];o[A++]=w*e}}};
|
|
L.Ja.anh=function($,o,T,s,E){var e=1/(E+E+1),n=s-E-E-1,A=L.Ja.Vo(E);for(var f=0;f<T;f++){var u=f,Y=u,b=u+E*T,a=$[u],w=$[u+T*(s-1)],X=(E+1)*a;
|
|
for(var N=0;N<E;N++)X+=$[u+N*T];for(var N=0;N<=E;N++){X+=$[b]-a;o[u]=A[X];b+=T;u+=T}for(var N=0;N<n;
|
|
N++){var z=N*T;X+=$[b+z]-$[Y+z];o[u+z]=A[X]}Y+=n*T;b+=n*T;u+=n*T;for(var N=s-E;N<s;N++){X+=w-$[Y];o[u]=A[X];
|
|
Y+=T;u+=T}}};L.Ja.a8e=function($,o,T,s,E){var e=T<<2,n=E<<2,A=1/(E+E+1),u=s-E-E-1,Y=u<<2,b=L.Ja.Vo(E);
|
|
for(var f=0;f<T;f++){var a=f<<2,w=a,X=a+E*e,N=a+e*(s-1),z=$[a],i=$[a+1],k=$[a+2],Q=$[a+3],O=(E+1)*z,c=(E+1)*i,B=(E+1)*k,G=(E+1)*Q;
|
|
for(var l=0;l<E;l++){var v=a+l*e;O+=$[v];c+=$[v+1];B+=$[v+2];G+=$[v+3]}for(var l=0;l<=E;l++){O+=$[X]-z;
|
|
o[a]=b[O];c+=$[X+1]-i;o[a+1]=b[c];B+=$[X+2]-k;o[a+2]=b[B];G+=$[X+3]-Q;o[a+3]=b[G];X+=e;a+=e}for(var l=0;
|
|
l<u;l++){var p=l*e;O+=$[X+p]-$[w+p];o[a+p]=b[O];c+=$[X+p+1]-$[w+p+1];o[a+p+1]=b[c];B+=$[X+p+2]-$[w+p+2];
|
|
o[a+p+2]=b[B];G+=$[X+p+3]-$[w+p+3];o[a+p+3]=b[G]}w+=u*e;X+=u*e;a+=u*e;z=$[N];i=$[N+1];k=$[N+2];Q=$[N+3];
|
|
for(var l=s-E;l<s;l++){O+=z-$[w];o[a]=b[O];c+=i-$[w+1];o[a+1]=b[c];B+=k-$[w+2];o[a+2]=b[B];G+=Q-$[w+3];
|
|
o[a+3]=b[G];w+=e;a+=e}}};L.Ja.abu=function($,o,T,s,E){var e=1/(E+E+1),n=s-E-E-1;for(var f=0;f<T;f++){var A=f,u=A,Y=A+E*T,b=$[A],a=$[A+T*(s-1)],w=(E+1)*b;
|
|
for(var X=0;X<E;X++)w+=$[A+X*T];for(var X=0;X<=E;X++){w+=$[Y]-b;o[A]=w*e;Y+=T;A+=T}for(var X=0;X<n;X++){var N=X*T;
|
|
w+=$[Y+N]-$[u+N];o[A+N]=w*e}u+=n*T;Y+=n*T;A+=n*T;for(var X=s-E;X<s;X++){w+=a-$[u];o[A]=w*e;u+=T;A+=T}}};
|
|
L.ha={};L.ha.G=function($,o,T,s){var E=[];for(var e=0;e<4;e++)for(var n=0;n<4;n++)E.push($+T*n/3,o+s*e/3);
|
|
return E};L.ha.c7=function($,o){var T=$.slice(0);for(var f=0;f<4;f++)for(var s=0;s<4;s++){var E=2*(f*4+s),e=2*(s*4+(3-f));
|
|
if(o){var n=E;E=e;e=n}T[e]=$[E];T[e+1]=$[E+1]}return T};L.ha.CN=L.G(0);L.ha.drawImage=function($,o,T,s,E,e,n){var A=!1,u=Date.now(),Y=2,b=T+2*Y,a=s+2*Y,w=new df(Y,Y,T,s),X=w.clone(),Q=50;
|
|
X.Mi(Y,Y);var N=L.ha.CN;if(N.length!=X.Y()*4)N=L.ha.CN=L.G(X.Y()*4);else N.fill(0);L.h9(o,w,N,X);if(A)console.log(Date.now()-u,"copy rect");
|
|
u=Date.now();L.qc(N);if(A)console.log(Date.now()-u,"multiply alpha");u=Date.now();var z=[],i=[],k=[];
|
|
for(var O=0;O<Q+1;O++)for(var c=0;c<Q+1;c++){var B=c/Q,G=O/Q;z.push(b*B,a*G);if(c<Q&&O<Q){var l=O*(Q+1)+c,v=l+1,p=l+Q+1,P=p+1;
|
|
i.push(l,v,p);i.push(p,v,P)}var h=L.ha.apf($,B,G);k.push(-h)}var j=z.slice(0);L.ha.t($,j,new df(Y,Y,T,s));
|
|
L.M.t(j,new fY(1,0,0,1,-e.x,-e.y),j);if(A)console.log(Date.now()-u,"mesh built");u=Date.now();var C=e.d,V=e.w;
|
|
L.pZ.rW(N,b,a,E,C,V,z,j,k,i);if(A)console.log(Date.now()-u,"rendered");u=Date.now();L.tr(E);if(A)console.log(Date.now()-u,"divided");
|
|
u=Date.now()};L.ha.GB=new Array(10);L.ha.aaB=function($,o){var T=200,s=0,E=0,e=1e9,n=L.ha.GB;for(var A=0;
|
|
A<T+1;A++)for(var u=0;u<T+1;u++){var Y=u/T,b=A/T;L.ha.e6($,Y,b,n);var a=n[8]-o.x,w=n[9]-o.y,X=a*a+w*w;
|
|
if(X<e){e=X;s=Y;E=b}}return[s,E]};L.ha.t=function($,o,T){var s=T.x,E=T.y,e=1/T.d,n=1/T.w,A=L.ha.GB;for(var u=0;
|
|
u<o.length;u+=2){var Y=(o[u]-s)*e,b=(o[u+1]-E)*n;L.ha.e6($,Y,b,A);o[u]=A[8];o[u+1]=A[9]}};L.ha.apf=function($,o,T){var s,E,e,n,A=L.ha.GB;
|
|
L.ha.aq4($,o,T,A);s=A[8];E=A[9];L.ha.a6j($,o,T,A);e=A[8];n=A[9];return s*n-E*e};L.ha.e6=function($,o,T,s){L.ha.Rx(s,0,T);
|
|
L.ha.Rx(s,4,o);L.ha.UA($,s)};L.ha.aq4=function($,o,T,s){L.ha.Rx(s,0,T);L.ha.J0(s,4,o);L.ha.UA($,s)};
|
|
L.ha.a6j=function($,o,T,s){L.ha.J0(s,0,T);L.ha.Rx(s,4,o);L.ha.UA($,s)};L.ha.J0=function($,f,o){var T=1-o;
|
|
$[f]=-3*(T*T);$[f+1]=3*(T*T)-6*(o*T);$[f+2]=6*(o*T)-3*(o*o);$[f+3]=3*(o*o)};L.ha.Rx=function($,f,o){var T=1-o;
|
|
$[f]=T*(T*T);$[f+1]=3*o*(T*T);$[f+2]=3*(o*o)*T;$[f+3]=o*o*o};L.ha.UA=function($,o){var T=0,s=0,E=0,e=o[0],n=o[1],A=o[2],u=o[3],Y=o[4],b=o[5],a=o[6],w=o[7];
|
|
E=e*Y;T+=$[0]*E;s+=$[1]*E;E=e*b;T+=$[2]*E;s+=$[3]*E;E=e*a;T+=$[4]*E;s+=$[5]*E;E=e*w;T+=$[6]*E;s+=$[7]*E;
|
|
E=n*Y;T+=$[8]*E;s+=$[9]*E;E=n*b;T+=$[10]*E;s+=$[11]*E;E=n*a;T+=$[12]*E;s+=$[13]*E;E=n*w;T+=$[14]*E;s+=$[15]*E;
|
|
E=A*Y;T+=$[16]*E;s+=$[17]*E;E=A*b;T+=$[18]*E;s+=$[19]*E;E=A*a;T+=$[20]*E;s+=$[21]*E;E=A*w;T+=$[22]*E;
|
|
s+=$[23]*E;E=u*Y;T+=$[24]*E;s+=$[25]*E;E=u*b;T+=$[26]*E;s+=$[27]*E;E=u*a;T+=$[28]*E;s+=$[29]*E;E=u*w;
|
|
T+=$[30]*E;s+=$[31]*E;o[8]=T;o[9]=s};L.r9={};L.r9.a1m=function($,o,T){var s=Date.now(),E=new ArrayBuffer(o*T*16),e=L.r9.a4r($,o,T,E),n=L.r9.amp(o,T,E);
|
|
return{ve:n,FI:e}};L.r9.afU=function($,o,T){var s=Math.round($.length/8),E=new Uint32Array(s),e=new Uint8Array(s),n=new Uint32Array(s);
|
|
L.wr(E,4294967295,0);E[T]=0;var A=new gn(s);A.push(T,E[T]);var u={ve:$,FI:o,Uq:E,au:e,Iz:n,vA:A,amf:T};
|
|
return u};L.r9.$z=function($,o){var T=$.ve,s=$.FI,E=$.Uq,e=$.au,n=$.Iz,A=$.vA;while(!A.p4()&&(o==null||e[o]==0)){var u=A.pop();
|
|
e[u]=1;for(var f=0;f<8;f++){var Y=T[8*u+f],b=u+Y;if(Y==0||e[b])continue;var a=E[u]+s[8*u+f];if(A.contains(b)&&a<E[b])A.remove(b,E[b]);
|
|
if(!A.contains(b)){E[b]=a;n[b]=u;A.push(b,E[b])}}}};function gn($){this.K$=new Uint32Array($);this.list=[];
|
|
this.S8=0;this.LH=4294967295}gn.prototype.p4=function(){return this.S8==0};gn.prototype.push=function($,o){var T=this.list;
|
|
if(T[o]==null)T[o]=[];T[o].push($);this.S8++;this.K$[$]=T[o].length-1+1;this.LH=Math.min(this.LH,o)};
|
|
gn.prototype.pop=function(){this.S8--;var $=this.list,o=this.LH,T=$[o].pop();if($[o].length==0)$[o]=null;
|
|
this.mR();this.K$[T]=0;return T};gn.prototype.contains=function($){return this.K$[$]!=0};gn.prototype.remove=function($,o){this.S8--;
|
|
var T=this.list,f=this.K$[$]-1;if(f==T[o].length-1)T[o].pop();else{var s=T[o].pop();T[o][f]=s;this.K$[s]=f+1}if(T[o].length==0)T[o]=null;
|
|
this.K$[$]=0;this.mR()};gn.prototype.mR=function(){if(this.S8==0){this.LH=4294967295;return}var $=this.LH,o=this.list;
|
|
while(o[$]==null)$++;this.LH=$};L.r9.aaE=function($,o,T,s){var E=new Int16Array(s);for(var e=0;e<T;e++)for(var n=0;
|
|
n<o;n++){var f=e*o+n,A=0;if(1<n&&n<o-2&&1<e&&e<T-2){A+=$[f-o-o];A+=$[f-o-1]+2*$[f-o]+$[f-o+1];A+=$[f-2]+2*$[f-1]-16*$[f]+2*$[f+1]+$[f+2];
|
|
A+=$[f+o-1]+2*$[f+o]+$[f+o+1];A+=$[f+o+o]}else A=-16*$[f];E[f]=A}return E};L.r9.a7R=function($,o,T,s){if(s==null)s=128;
|
|
var E=new Uint8Array(o*T);for(var e=1;e<T-1;e++)for(var n=1;n<o-1;n++){var f=e*o+n;E[f]=L.r9.afB($[f],$[f-1],$[f+1],$[f-o],$[f+o],s)}return E};
|
|
L.r9.afB=function($,o,T,s,E,e){var n=Math.abs($);return $*o<0&&n<Math.abs(o)&&Math.abs(o-$)>e||$*T<0&&n<Math.abs(T)&&Math.abs(T-$)>e||$*s<0&&n<Math.abs(s)&&Math.abs(s-$)>e||$*E<0&&n<Math.abs(E)&&Math.abs(E-$)>e?1:0};
|
|
L.r9.a2Y=function($,o,T,s){var E=new Float32Array(s),e=0;new Uint32Array(s).fill(0);for(var n=0;n<T;
|
|
n++)for(var A=0;A<o;A++){var u=0,Y=0,f=n*o+A,b=f*3;if(0<A&&A<o-1)u=$[f+1]-$[f-1];if(0<n&&n<T-1)Y=$[f+o]-$[f-o];
|
|
var a=E[b+2]=Math.sqrt(u*u+Y*Y);if(a!=0){var w=1/a;E[b]=u*w;E[b+1]=Y*w}if(a>e)e=a}var X=o*T,N=e==0?0:1/e;
|
|
for(var f=0;f<X;f++)E[f*3+2]=1-E[f*3+2]*N;return E};L.r9.anG=function($,o,T){return T[~~((.5+.5*$)*255)]+T[~~((.5+.5*o)*255)]};
|
|
L.r9.a4r=function($,o,T,s){var E=Date.now(),e=L.r9.aaE($,o,T,s),n=L.r9.a7R(e,o,T),A=L.r9.a2Y($,o,T,s),u=new Float32Array(256);
|
|
for(var f=0;f<256;f++)u[f]=Math.acos(-1+2*f/255)*(.95/Math.PI);var Y=[-1,0,1,1,1,0,-1,-1],b=[-1,-1,-1,0,1,1,1,0];
|
|
for(var f=0;f<8;f++){var a=1/Math.sqrt(Y[f]*Y[f]+b[f]*b[f]);Y[f]*=a;b[f]*=a}var w=[Y[0],b[0],Y[1],b[1],Y[2],b[2],Y[3],b[3]],X=[-o-1,-o,-o+1,1],N=new Uint8Array(o*T*8);
|
|
new Uint32Array(N.buffer).fill(4294967295);var z=o*T;for(var i=1;i<T-1;i++)for(var k=1;k<o-1;k++){var Q=i*o+k,O=1-n[Q],c=A[Q*3+2],B=A[3*Q+1],G=-A[3*Q];
|
|
for(var l=0;l<4;l++){var v=Q+X[l];L.r9.a6z(Q,v,l,N,n,A,O,c,B,G,w,u)}}return N};L.r9.a6z=function($,o,T,s,E,e,n,A,u,Y,b,a){var w=1-E[o],X=(T&1)==0?1:Math.SQRT1_2,N=e[o*3+2]*X,z=e[3*o+1],i=-e[3*o],k=A*X,Q=b[T+T],O=b[T+T+1],c=u*Q+Y*O,B=z*Q+i*O;
|
|
if(c+B<0){c=-c;B=-B}var G=L.r9.anG(c,B,a);s[($<<3)+T]=L.r9.Fq(w,G,N);s[(o<<3)+T+4]=L.r9.Fq(n,G,k)};L.r9.Fq=function($,o,T){return 1+~~(.5+20*(.43*$+.43*o+.14*T))};
|
|
L.r9.amp=function($,o,T){var s=new Int16Array(T),E=s,f=0,e=0;new Uint32Array(T).fill(0);for(var n=0;
|
|
n<o;n++)for(var A=0;A<$;A++){if(n>0&&A>0)E[e+0]=-$-1;if(n>0)E[e+1]=-$;if(n>0&&A<$-1)E[e+2]=-$+1;if(A<$-1)E[e+3]=1;
|
|
if(n<o-1&&A<$-1)E[e+4]=$+1;if(n<o-1)E[e+5]=$;if(n<o-1&&A>0)E[e+6]=$-1;if(A>0)E[e+7]=-1;f++;e+=8}return s};
|
|
L.TS={};L.TS.Hx=function($){var o=$.slice(0),T=0;for(var f=0;f<$.length;f++)T+=$[f];for(var f=0;f<$.length;
|
|
f++)o[f]/=T;return o};L.TS.mQ=[L.TS.Hx([1,2,1,2,16,2,1,2,1]),L.TS.Hx([1,2,1,2,4,2,1,2,1]),L.TS.Hx([0,-1,0,-1,8,-1,0,-1,0]),L.TS.Hx([-.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]];
|
|
L.TS.ls=function($,o,T,s,E,e,n,A){if(n==null)n=!1;if(A==null)A=!1;var u=Math.floor(Math.sqrt(E.length)),Y=u-1>>>1,b=new Uint32Array($.buffer),o=new Uint8ClampedArray(o.buffer);
|
|
for(var f=0;f<s;f++)for(var a=0;a<T;a++){var w=0,X=0,N=0,z=0;for(var i=0;i<u;i++)for(var k=0;k<u;k++){var Q=E[i*u+k];
|
|
if(Q==0)continue;var O=a-Y+k,c=f-Y+i;if(O<0)O=0;else if(O>T-1)O=T-1;if(c<0)c=0;else if(c>s-1)c=s-1;if(A&&b[c*T+O]>>>24==0){c=f;
|
|
O=a}var B=b[c*T+O];w+=(B&255)*Q;X+=(B>>>8&255)*Q;N+=(B>>>16&255)*Q;z+=(B>>>24&255)*Q}if(n){if(w<0)w=-w;
|
|
if(X<0)X=-X;if(N<0)N=-N;if(z<0)z=-z}if(A){w=Math.max(0,Math.min(255,w));X=Math.max(0,Math.min(255,X));
|
|
N=Math.max(0,Math.min(255,N));z=Math.max(0,Math.min(255,z))}var G=f*T+a<<2;o[G]=~~(.5+w);o[G+1]=~~(.5+X);
|
|
o[G+2]=~~(.5+N);o[G+3]=255-e&o[G+3]|e&~~(.5+z)}};L.TS.eF=function($,o,T,s){var E=$.length,e=new Uint8Array(E);
|
|
L.TS.ls($,o,T,s,L.TS.mQ[4],0,!0);L.TS.ls($,e,T,s,L.TS.mQ[5],0,!0);for(var f=0;f<E;f+=4){var n=o[f],A=o[f+1],u=o[f+2],Y=o[f+3],b=e[f],a=e[f+1],w=e[f+2],X=e[f+3];
|
|
o[f]=255-Math.max(0,Math.min(255,Math.sqrt(n*n+b*b)));o[f+1]=255-Math.max(0,Math.min(255,Math.sqrt(A*A+a*a)));
|
|
o[f+2]=255-Math.max(0,Math.min(255,Math.sqrt(u*u+w*w)))}};L.TS.er=function($,o,T,s){var E=$.length,e=new Uint8Array(E);
|
|
L.TS.nS($,o,T,s,L.TS.mQ[4],!0);L.TS.nS($,e,T,s,L.TS.mQ[5],!0);for(var f=0;f<E;f++){var n=o[f],A=e[f];
|
|
o[f]=255-Math.max(0,Math.min(255,Math.sqrt(n*n+A*A)))}};L.TS.nS=function($,o,T,s,E,e){o=new Uint8ClampedArray(o.buffer);
|
|
var n=[-T-1,-T,-T+1,-1,0,1,T-1,T,T+1],A=s-1,u=T-1;for(var f=1;f<A;f++)for(var Y=1;Y<u;Y++){var b=f*T+Y,a=L.TS.oZ($,b,T,E);
|
|
if(e){if(a<0)a=-a}o[b]=~~(a+.5)}};L.TS.oZ=function($,o,T,s){return $[o-T-1]*s[0]+$[o-T]*s[1]+$[o-T+1]*s[2]+$[o-1]*s[3]+$[o]*s[4]+$[o+1]*s[5]+$[o+T-1]*s[6]+$[o+T]*s[7]+$[o+T+1]*s[8]};
|
|
L.TS.J9=function($,o,T,s,E){var e=[-T-1,-T,-T+1,-1,0,1,T-1,T,T+1],n=s-1,A=T-1;for(var f=1;f<n;f++)for(var u=1;
|
|
u<A;u++){var Y=f*T+u;o[Y]=L.TS.apQ($,Y,T,E)}};L.TS.apQ=function($,o,T,s){return $[o-T-1]*s[0]+$[o-T]*s[1]+$[o-T+1]*s[2]+$[o-1]*s[3]+$[o]*s[4]+$[o+1]*s[5]+$[o+T-1]*s[6]+$[o+T]*s[7]+$[o+T+1]*s[8]};
|
|
L.KW={};L.KW.ay=function(){function $(n,A,u,Y,b,a,w){if(b==0){A.set(n);return}var X=L.G(u*Y),N=L.G(u*Y);
|
|
if(L.jh(n)){o(n,A,u,Y,b,a,w);var z=[L.KW.Ur,L.KW.e5],i=z.indexOf(a),k=i!=-1?z[1-i]:a;L.Ge(n,X,3);L.KW.hX(X,N,u,Y,b,k,w);
|
|
L.aM(N,A,3)}else{for(var f=0;f<3;f++){L.Ge(n,X,f);L.KW.hX(X,N,u,Y,b,a,w);L.aM(N,A,f)}}}function o(n,A,u,Y,b,a,w){var X=0,N=new ArrayBuffer(512*4*3),z=[new Int32Array(N,0),new Int32Array(N,2048),new Int32Array(N,2*2048)],i=1+2*Math.round(Math.sqrt(b)),k=i>>>1,Q=new Array(i),O=new Array(i);
|
|
for(var f=0;f<i;f++){var N=new ArrayBuffer(512*4*3);Q[f]=[new Int32Array(N,0),new Int32Array(N,2048),new Int32Array(N,2*2048)];
|
|
O[f]=Q[f][0]}var c=a[0],B=a[1],G=z[0];for(var l=0;l<u;l++)if(l<b||l>u-b-i-1){G.fill(0);var v=Math.max(l-b,0),p=Math.min(u,l+b+1),P=p-v;
|
|
for(var h=0;h<b;h++)s(G,n,h*u+v,h*u+p,1);for(var h=0;h<Y;h++){var j=h-b-1,C=h+b;if(C<Y)s(G,n,C*u+v,C*u+p,1);
|
|
if(j>=0)s(G,n,j*u+v,j*u+p,-1);var V=h*u+l<<2;X=G[300];if(X!=0)for(var f=0;f<3;f++)A[V+f]=c(z[f],n[V+f],X,w)}}else{for(var f=0;
|
|
f<i;f++)O[f].fill(0);var v=l-b+k,p=l+b+1+k;for(var h=0;h<b;h++)T(O,n,h*u+v,h*u+p,1,k);for(var h=0;h<Y;
|
|
h++){var j=h-b-1,C=h+b;if(j>=0)T(O,n,j*u+v,j*u+p,-1,k);if(C<Y)T(O,n,C*u+v,C*u+p,1,k);var d=Q[k];X=d[0][300];
|
|
for(var f=0;f<k;f++){var m=k-1-f,R=k+1+f,g=Q[m],S=Q[R],F=X+g[0][300],r=X+S[0][300],q=h*u+l+m<<2,W=h*u+l+R<<2;
|
|
if(F!=0)for(var Z=0;Z<3;Z++)A[q+Z]=B(d[Z],g[Z],n[q+Z],F,w);if(r!=0)for(var Z=0;Z<3;Z++)A[W+Z]=B(d[Z],S[Z],n[W+Z],r,w)}var V=h*u+l+k<<2;
|
|
if(X!=0)for(var Z=0;Z<3;Z++)A[V+Z]=c(d[Z],n[V+Z],X,w)}l+=i-1}}function T(n,A,u,Y,b,a){var w=E,X=u<<2,N=Y<<2;
|
|
w(n[a-1],A,u-1<<2,b);w(n[a-1],A,Y-1<<2,-b);w(n[a+1],A,Y<<2,b);w(n[a+1],A,u<<2,-b);for(var f=1;f<a;f++){var z=n[a-f-1],i=n[a+f+1];
|
|
for(var k=0;k<=f;k++){var Q=k<<2;w(z,A,u-1-k<<2,b);w(z,A,Y-1-k<<2,-b);w(i,A,Y+k<<2,b);w(i,A,u+k<<2,-b)}}s(n[a],A,u,Y,b)}function s(n,A,f,u,Y){var b=f<<2,a=u<<2;
|
|
while(b<a){E(n,A,b,Y);b+=4}}function E(n,A,u,Y){var b=Y*A[u+3];n[300]+=b;e(n,A[u],0,b);e(n,A[u+1],512,b);
|
|
e(n,A[u+2],1024,b)}function e(n,A,u,Y){n[u|A]+=Y;n[u|256|A>>>4]+=Y}return $}();L.KW.hX=function(){function $(a,w,X,N,z,i,k){if(z==0){w.set(a);
|
|
return}if(z<=80)o(a,w,X,N,z,i,k);else e(a,w,X,N,z,i,k)}function o(a,w,X,N,z,i,k){var Q=0,O=new Int32Array(512),c=1+2*Math.round(Math.sqrt(z)),B=c>>>1,G=new Array(c);
|
|
for(var f=0;f<c;f++)G[f]=new Int32Array(512);var l=i[0],v=i[1];for(var p=0;p<X;p++)if(p<z||p>X-z-c-1){O.fill(0);
|
|
Q=0;var P=Math.max(p-z,0),h=Math.min(X,p+z+1),j=h-P;for(var C=0;C<z;C++){Q+=j;s(O,a,C*X+P,C*X+h,1)}for(var C=0;
|
|
C<N;C++){var V=C-z-1,d=C+z;if(V>=0){Q-=j;s(O,a,V*X+P,V*X+h,-1)}if(d<N){Q+=j;s(O,a,d*X+P,d*X+h,1)}var m=l(O,a[C*X+p],Q,k);
|
|
w[C*X+p]=m}}else{for(var f=0;f<c;f++)G[f].fill(0);Q=0;var P=p-z+B,h=p+z+1+B,j=h-P;for(var C=0;C<z;C++){Q+=j;
|
|
T(G,a,C*X+P,C*X+h,1,B)}for(var C=0;C<N;C++){var V=C-z-1,d=C+z;if(V>=0){Q-=j;T(G,a,V*X+P,V*X+h,-1,B)}if(d<N){Q+=j;
|
|
T(G,a,d*X+P,d*X+h,1,B)}for(var f=0;f<B;f++){var R=B-1-f,g=B+1+f;w[C*X+p+R]=v(G[B],G[R],a[C*X+p+R],Q,k);
|
|
w[C*X+p+g]=v(G[B],G[g],a[C*X+p+g],Q,k)}w[C*X+p+B]=l(G[B],a[C*X+p+B],Q,k)}p+=c-1}}function T(a,w,X,N,z,i){var k=E;
|
|
k(a[i-1],w[X-1],0,z);k(a[i-1],w[N-1],0,-z);k(a[i+1],w[N],0,z);k(a[i+1],w[X],0,-z);for(var f=1;f<i;f++){var Q=a[i-f-1],O=a[i+f+1];
|
|
for(var c=0;c<=f;c++){k(Q,w[X-1-c],0,z);k(Q,w[N-1-c],0,-z);k(O,w[N+c],0,z);k(O,w[X+c],0,-z)}}s(a[i],w,X,N,z)}function s(a,w,f,X,N){while(f<X)E(a,w[f++],0,N)}function E(a,w,X,N){a[X|w]+=N;
|
|
a[X|256|w>>>4]+=N}function e(a,w,X,N,z,i,k){var Q=0,O=new Int32Array(512),c=new Int32Array(1*X),B=new Int32Array(512*X),G=Math.min(z,X),l=Math.min(z,N),v=i[0];
|
|
for(var p=0;p<l;p++)n(B,c,a,X,p,1);for(var p=0;p<N;p++){if(p+z<N)n(B,c,a,X,p+z,1);if(p-z-1>=0)n(B,c,a,X,p-z-1,-1);
|
|
O.fill(0);Q=0;for(var P=0;P<G;P++){Q+=c[P];A(O,B,P)}for(var P=0;P<X;P++){var h=P-z-1,j=P+z;if(h>=0&&c[h]!=0){Q-=c[h];
|
|
u(O,B,h)}if(j<X&&c[j]!=0){Q+=c[j];A(O,B,j)}var C=Q==0?0:v(O,a[p*X+P],Q,k);w[p*X+P]=C}}}function n(a,w,X,N,z,i){var f=z*N;
|
|
for(var k=0;k<N;k++){E(a,X[f+k],k<<9,i);w[k]+=i}}function A(a,w,X){for(var f=0;f<16;f++){var N=w[X<<9|256|f];
|
|
if(N==0)continue;a[256|f]+=N;var z=f<<4,i=X<<9|z;Y(a,w,z,i);Y(a,w,z+4,i+4);Y(a,w,z+8,i+8);Y(a,w,z+12,i+12)}}function u(a,w,X){for(var f=0;
|
|
f<16;f++){var N=w[X<<9|256|f];if(N==0)continue;a[256|f]-=N;var z=f<<4,i=X<<9|z;b(a,w,z,i);b(a,w,z+4,i+4);
|
|
b(a,w,z+8,i+8);b(a,w,z+12,i+12)}}function Y(a,w,X,N){a[X]+=w[N];a[X+1]+=w[N+1];a[X+2]+=w[N+2];a[X+3]+=w[N+3]}function b(a,w,X,N){a[X]-=w[N];
|
|
a[X+1]-=w[N+1];a[X+2]-=w[N+2];a[X+3]-=w[N+3]}return $}();L.KW.e5=[function($,o,T,s){var f=15;while($[256|f]==0&&f>0)f--;
|
|
f=(f<<4)+15;while($[f]==0&&f>0)f--;return f},function($,o,T,s,E){var f=15;while($[256|f]+o[256|f]==0&&f>0)f--;
|
|
f=(f<<4)+15;while($[f]+o[f]==0&&f>0)f--;return f}];L.KW.Ur=[function($,o,T,s){var f=0;while($[256|f]==0&&f<15)f++;
|
|
f=f<<4;while($[f]==0&&f<255)f++;return f},function($,o,T,s,E){var f=0;while($[256|f]+o[256|f]==0&&f<15)f++;
|
|
f=f<<4;while($[f]+o[f]==0&&f<255)f++;return f}];L.KW.gh=.5;L.KW.nQ=[function($,o,T,s){var E=~~(.5+L.KW.gh*T),e=0,f=256;
|
|
while(e+$[f]<=E)e+=$[f++];f=f-256<<4;while(e<=E)e+=$[f++];return f-1},function($,o,T,s,E){var e=~~(.5+L.KW.gh*s),n=0,f=256;
|
|
while(n+$[f]+o[f]<=e){n+=$[f]+o[f];f++}f=f-256<<4;while(n<=e){n+=$[f]+o[f];f++}return f-1}];L.KW.Lq=[function($,o,T,s){var E=s[0],e=0,n=0,f=Math.max(0,o-E),A=Math.min(256,o+E+1);
|
|
while(f<A){var u=$[f];e+=f*u;n+=u;f++}return n==0?0:e/n},function($,o,T,s,E){var e=E[0],n=0,A=0,f=Math.max(0,T-e),u=Math.min(256,T+e+1);
|
|
while(f<u){var Y=$[f]+o[f];n+=f*Y;A+=Y;f++}return A==0?0:n/A}];L.$={};L.$.bH=function($){var o=D.p.GQ($.Trnf),T=$.Sz.v,s=L.$.TU(o,new df(0,0,T.Wdth.v,T.Hght.v));
|
|
return L.$.JV(s)};L.$.TU=function($,o){var T=$[0],s=$[1],E=$[2],e=$[3],n=$[6],A=$[7],u=$[4],Y=$[5],b=0,a=0,w=1,X=0,N=0,z=1,i=1,k=1;
|
|
if(o){b=o.x;a=o.y;w=o.x+o.d;X=o.y;N=o.x;z=o.y+o.w;i=o.x+o.d;k=o.y+o.w}return L.$.BO($,[b,a,w,X,i,k,N,z])};
|
|
L.$.BO=function($,o){var T=$[0],s=$[1],E=$[2],e=$[3],n=$[6],A=$[7],u=$[4],Y=$[5],b=o[0],a=o[1],w=o[2],X=o[3],N=o[6],z=o[7],i=o[4],k=o[5],Q=[[b,a,1,0,0,0,-b*T,-a*T,T],[0,0,0,b,a,1,-b*s,-a*s,s],[w,X,1,0,0,0,-w*E,-X*E,E],[0,0,0,w,X,1,-w*e,-X*e,e],[N,z,1,0,0,0,-N*n,-z*n,n],[0,0,0,N,z,1,-N*A,-z*A,A],[i,k,1,0,0,0,-i*u,-k*u,u],[0,0,0,i,k,1,-i*Y,-k*Y,Y]],O=[0,0,0,0,0,0,0,0],c=L.Ak._v(Q,O);
|
|
if(c!=0)O=[0,0,0,0,0,0,0,0];return O};L.$._r=function($){return Math.abs($[6])<1e-10&&Math.abs($[7])<1e-10};
|
|
L.$.JV=function($){return new fY($[0],$[3],$[1],$[4],$[2],$[5])};L.$.KQ=function($){return[$.Ca,$.Z9,$.Ry,$.P,$.Um,$.Es,0,0]};
|
|
L.$.t=function($,o){var T=new Float64Array(2);for(var s=0;s<o.length;s+=2){var E=o[s],e=o[s+1];L.$.Da(E,e,$,T);
|
|
o[s]=T[0];o[s+1]=T[1]}};L.$.Da=function($,o,T,s){var E=1/(T[6]*$+T[7]*o+1);s[0]=(T[0]*$+T[1]*o+T[2])*E;
|
|
s[1]=(T[3]*$+T[4]*o+T[5])*E};L.$.rg=function($,o){var T=new Float64Array(2);L.$.Da(o.x,o.y,$,T);return new aY(T[0],T[1])};
|
|
L.$.EP=function($,o,T,s){$=new Uint32Array($.buffer);o=new Uint32Array(o.buffer);for(var E=0;E<s;E++){for(var e=0;
|
|
e<T;e++){o[e*s+E]=$[E*T+e]}}};L.$.apv=function($,o,T,s){$=new Uint32Array($.buffer);o=new Uint32Array(o.buffer);
|
|
for(var E=0;E<s;E++){for(var e=0;e<T;e++){o[E*T+e]=$[E*T+T-1-e]}}};L.$.Jz=function($){return Math.abs($[6])<1e-9&&Math.abs($[7])<1e-9};
|
|
L.$.tt=function($){return Math.abs($[0])<1e-9&&Math.abs($[4])<1e-9||Math.abs($[1])<1e-9&&Math.abs($[3])<1e-9};
|
|
L.$.drawImage=function($,o,T,s,E,e,n,A,u){if(n==null)n=!1;if(A==null)A=!1;var Y=L.$.lY($),b=!0,a=0,w=1/Math.sqrt(Math.abs($[0]/T*$[4]/s-$[1]/T*$[3]/s));
|
|
for(var f=0;f<8;f++){var X=Math.round($[f]);if(f!=2&&f!=5)a+=Math.abs(X);if(Math.abs(X-$[f])>1e-9)b=!1}var N=L.$.Jz($),z=L.$.tt($)&&N,i=z?1:0;
|
|
if(n||b&&a==T+s&&N){L.$.aiB(Y,o,T,s,E,e,A,N,u);return}var k=e.d,Q=e.w,O=new Float64Array(2);E=new Uint32Array(E.buffer);
|
|
o=new Uint32Array(o.buffer);for(var c=0;c<Q;c++)for(var B=0;B<k;B++){var G=c*k+B,l,v,p,P,I=0,_=0,cN=0,ce=0;
|
|
E[G]=0;var h=B+e.x+.5,j=c+e.y+.5;l=h;v=j;p=Y;P=1/(p[6]*l+p[7]*v+1);var C=(p[0]*l+p[1]*v+p[2])*P,V=(p[3]*l+p[4]*v+p[5])*P,d=C*T,m=V*s,R=d<-1||d>T+1||m<-1||m>s+1;
|
|
if(A){d=Math.max(.001,Math.min(T-1,d));m=Math.max(.001,Math.min(s-1,m))}else if(R)continue;var g=w;if(!N){var S=0,F=0;
|
|
p=$;l=C+1/T;v=V;P=1/(p[6]*l+p[7]*v+1);S=(p[0]*l+p[1]*v+p[2])*P-h;F=(p[3]*l+p[4]*v+p[5])*P-j;var r=S*S+F*F;
|
|
l=C;v=V+1/s;P=1/(p[6]*l+p[7]*v+1);S=(p[0]*l+p[1]*v+p[2])*P-h;F=(p[3]*l+p[4]*v+p[5])*P-j;var q=S*S+F*F;
|
|
g=1/Math.sqrt(Math.max(r,q))}if(g<1.1){L.$.WC(d,m,o,T,s,E,G,i);continue}var W=Math.round(g*2.3);if(!A&&(d<.6||d>T-.6||m<.6||m>s-.6)){W=Math.max(W,5)}if(A&&R)W=1;
|
|
var Z=1/W,gf=e.x+B,K=e.y+c;p=Y;for(var f=0;f<W;f++)for(var cv=0;cv<W;cv++){l=gf+(f+.5)*Z;v=K+(cv+.5)*Z;
|
|
P=1/(p[6]*l+p[7]*v+1);var d=(p[0]*l+p[1]*v+p[2])*P,m=(p[3]*l+p[4]*v+p[5])*P;if(A){d=Math.max(.001,Math.min(.999,d));
|
|
m=Math.max(.001,Math.min(.999,m))}else if(d<0||d>=1||m<0||m>=1)continue;d=Math.floor(d*T);m=Math.floor(m*s);
|
|
var f0=m*T+d,i8=o[f0],b5=i8>>>24;I+=(i8&255)*b5;_+=(i8>>>8&255)*b5;cN+=(i8>>>16&255)*b5;ce+=b5}if(ce!=0){var iC=1/ce;
|
|
I=~~(I*iC+.5);_=~~(_*iC+.5);cN=~~(cN*iC+.5);ce=~~(ce*Z*Z+.5);E[G]=ce<<24|cN<<16|_<<8|I}}};L.$.aiB=function($,o,T,s,E,e,n,A,u){if(A&&!n&&e.Y()>4e6&&u){L.$.a3H($,o,T,s,E,e,n,A,u);
|
|
return}var Y=e.x+e.d,b=e.y+e.w,a=0,w=new Uint32Array(E.buffer),X=new Uint32Array(o.buffer),N=$[0]*T,z=$[1]*T,i=$[2]*T,k=$[3]*s,Q=$[4]*s,O=$[5]*s,c=$[6],B=$[7];
|
|
if(A&&!n)for(var G=e.y+.5;G<b;G++)for(var l=e.x+.5;l<Y;l++){var v=N*l+z*G+i,p=k*l+Q*G+O;if(0<v&&v<T&&0<p&&p<s){var P=~~p*T+~~v;
|
|
w[a]=X[P]}else w[a]=0;a++}else for(var G=e.y+.5;G<b;G++)for(var l=e.x+.5;l<Y;l++){var h=1/(c*l+B*G+1),v=(N*l+z*G+i)*h,p=(k*l+Q*G+O)*h;
|
|
if(n){v=Math.max(.001,Math.min(T-1,v));p=Math.max(.001,Math.min(s-1,p))}if(0<v&&v<T&&0<p&&p<s){var P=Math.floor(p)*T+Math.floor(v);
|
|
w[a]=X[P]}else w[a]=0;a++}};L.$.a3H=function($,o,T,s,E,e,n,A,u){var Y=new Uint32Array(E.buffer),b=new Uint32Array(o.buffer),B=0;
|
|
if(u&&(e.d&3)!=0)throw"e";var a=$[0]*T,w=$[1]*T,X=$[2]*T,N=$[3]*s,z=$[4]*s,i=$[5]*s,k=$[6],Q=$[7],O=e.d,c=e.w,G=e.x+.5,l=e.y+.5,v=(O>>>2<<2)-1e-9,p=-.1+(c>>>1<<1)-1e-9,P=~~T,h=a==0?0:1/a,j=N==0?0:1/N;
|
|
for(var C=0;C<c;C++){var V=G*a+w*(C+l)+X,d=G*N+z*(C+l)+i,m=0,R=O;if(a==0){}else if(h>0){m=Math.max(m,-V*h);
|
|
R=Math.min(R,(T-V)*h)}else{R=Math.min(R,-V*h);m=Math.max(m,(T-V)*h)}if(N==0){}else if(j>0){m=Math.max(m,-d*j);
|
|
R=Math.min(R,(s-d)*j)}else{R=Math.min(R,-d*j);m=Math.max(m,(s-d)*j)}if(R<0)R=0;if(m>R)m=R;m=Math.ceil(m);
|
|
R=~~R;B=~~(C*O);for(var g=0;g<m;g++)Y[B++]=0;for(var g=m;g<R;g+=4){var S=a*g+V,F=N*g+d,r=~~F*P+~~S;Y[B++]=Y[B++]=Y[B++]=Y[B++]=b[r]}for(var g=R;
|
|
g<O;g++)Y[B++]=0}};L.$.lY=function($){var o=$[4]-$[5]*$[7],T=$[2]*$[7]-$[1],s=$[1]*$[5]-$[2]*$[4],E=$[5]*$[6]-$[3],e=$[0]-$[2]*$[6],n=$[3]*$[2]-$[0]*$[5],A=$[3]*$[7]-$[4]*$[6],u=$[1]*$[6]-$[0]*$[7],Y=1/($[0]*$[4]-$[1]*$[3]);
|
|
return[o*Y,T*Y,s*Y,E*Y,e*Y,n*Y,A*Y,u*Y]};L.$.E8=function($,o){var T=$[0],s=$[1],E=$[2],e=$[3],n=$[4],A=$[5],u=$[6],Y=$[7],b=o[0],a=o[1],w=o[2],X=o[3],N=o[4],z=o[5],i=o[6],k=o[7],Q=[T*b+s*X+E*i,T*a+s*N+E*k,T*w+s*z+E,e*b+n*X+A*i,e*a+n*N+A*k,e*w+n*z+A,u*b+Y*X+i,u*a+Y*N+k],O=1/(u*w+Y*z+1);
|
|
for(var f=0;f<8;f++)Q[f]*=O;return Q};L.$.WC=function($,o,T,s,E,e,n,A){var u=$,Y=o,w=0,X=0,N=0,z=0;$-=.499999;
|
|
o-=.499999;var b=Math.floor($),a=Math.floor(o);if(A==0){var f=a*s+b,i=b>=0&&b<s,k=b+1>=0&&b+1<s,Q=a>=0&&a<E,O=a+1>=0&&a+1<E;
|
|
if(i&&Q)w=T[f];if(k&&Q)X=T[f+1];if(i&&O)N=T[f+s];if(k&&O)z=T[f+s+1]}else if(A==1){var c=b<0?0:b>s-1?s-1:b,B=b<-1?0:b>s-2?s-1:b+1,G=a<0?0:a>E-1?E-1:a,l=a<-1?0:a>E-2?E-1:a+1;
|
|
w=T[G*s+c];X=T[G*s+B];N=T[l*s+c];z=T[l*s+B]}else{var c=(b+50*s)%s,B=(b+50*s)%s,G=(a+50*E)%E,l=(a+50*E)%E;
|
|
w=T[G*s+c];X=T[G*s+B];N=T[l*s+c];z=T[l*s+B]}var v=$-b,p=o-a,P=(1-p)*(1-v)*(w>>>24),h=(1-p)*v*(X>>>24),j=p*(1-v)*(N>>>24),C=p*v*(z>>>24),V=P+h+j+C,d=P*(w&255)+h*(X&255)+j*(N&255)+C*(z&255),m=P*(w>>>8&255)+h*(X>>>8&255)+j*(N>>>8&255)+C*(z>>>8&255),R=P*(w>>>16&255)+h*(X>>>16&255)+j*(N>>>16&255)+C*(z>>>16&255);
|
|
if(V==0)e[n]=0;else{var g=1/V;d=~~(d*g+.5);m=~~(m*g+.5);R=~~(R*g+.5);V=~~(V+.5);e[n]=V<<24|R<<16|m<<8|d}};
|
|
L.$.mn=function($,o,T,s,E,e){var n=$-.499999,A=o-.499999,u=~~n,Y=~~A,b=n-u,a=A-Y,w=(1-a)*(1-b),X=(1-a)*b,N=a*(1-b),z=a*b,i=Y*s+u<<2,k=(Y+1)*s+u<<2,Q=w*T[i]+X*T[i+4]+N*T[k]+z*T[k+4],O=w*T[i+1]+X*T[i+5]+N*T[k+1]+z*T[k+5],c=w*T[i+2]+X*T[i+6]+N*T[k+2]+z*T[k+6],B=w*T[i+3]+X*T[i+7]+N*T[k+3]+z*T[k+7];
|
|
e[0]=Q;e[1]=O;e[2]=c;e[3]=B};L.$.jv=function($,o,T,s,E){$-=.499999;o-=.499999;var e=Math.floor($),n=Math.floor(o),A=$-e,u=o-n,Y=(1-u)*(1-A),b=(1-u)*A,a=u*(1-A),w=u*A,X=(e+50*s)%s,N=(e+1+50*s)%s,z=(n+50*E)%E,i=(n+1+50*E)%E,k=T[z*s+X],Q=T[z*s+N],O=T[i*s+X],c=T[i*s+N];
|
|
if(k==null||c==null)throw"e";return Y*k+b*Q+a*O+w*c};L.$.f5=function($,o,T,s,E,e,n,A,u,Y,b,a){var w=new Uint32Array($.buffer),X=new Uint32Array(s.buffer),N=(1+2*Y)/E,z=[],i=[];
|
|
for(var k=0;k<E;k++){var Q=-.25+Y-k*N;z.push(Math.cos(2*Math.PI*Q)*a/b);z.push(Math.sin(2*Math.PI*Q)/b)}n*=o;
|
|
A*=T;for(var O=0;O<e;O++){var c=Math.pow(O/e,u)*e;for(var k=0;k<E;k++){var B=n+z[k<<1]*c,G=A+z[(k<<1)+1]*c,l=~~(.5+(B<0?0:B>o-1?o-1:B)),v=~~(.5+(G<0?0:G>T-1?T-1:G));
|
|
X[O*E+k]=w[v*o+l]}}};L.$.mz=function($,o,T,s,E,e,n,A,u,Y,b,a){var w=new Uint32Array($.buffer),X=new Uint32Array(s.buffer),N=1/a,z=[],i=T*4,k=1/i;
|
|
for(var Q=0;Q<i;Q++)z.push(Math.pow(Q*k,1/u)*T*b);n*=E;A*=e;for(var Q=0;Q<e;Q++)for(var O=0;O<E;O++){var c=N*(O-n),B=Q-A,G=1.75-Math.atan2(B,c)*(1/(2*Math.PI));
|
|
G=G-~~G;G=(G+Y)*(1/(1+2*Y));var l=Math.sqrt(c*c+B*B);l=z[~~(l*4)];L.$.WC(G*o+.5,l+.5,w,o,T,X,Q*E+O,1)}};
|
|
L.$.lx=function($,o,T,s,E){var e=E[0],n=E[1];for(var A=0;A<n;A++)for(var u=0;u<e;u++){var Y=E[2]*u+E[3]*A+E[4],b=E[5]*u+E[6]*A+E[7],a=A*e+u<<2,w=b*o+Y<<2;
|
|
s[a]=$[w+0];s[a+1]=$[w+1];s[a+2]=$[w+2];s[a+3]=$[w+3]}};L.h={la:function($,o){var T=~~(.499+$*o);return T<0?0:T>o?o:T},a8l:function($,o,T,s,E,e,n,A){var u=T[0],Y=T[1],b=T[2],a=T[3],w=s.d,X=s.w,N=new Float64Array(w*4+8),z=new Float64Array(w*4+8);
|
|
for(var i=0,f=0;i<X;i++){var k=N;N=z;z=k;z.fill(0);for(var Q=0;Q<w;Q++,f++){var O=Q+E,c=i+e,B=u*O+Y*c,G=b*O+a*c,l=0,P=0;
|
|
if(A==0)l=B+.5;else if(A==1)l=2*Math.sqrt(B*B+G*G);else if(A==2)l=(Math.PI+Math.atan2(-G,-B))/(2*Math.PI);
|
|
else if(A==3)l=Math.abs(B*2);else if(A==4)l=2*(Math.abs(B)+Math.abs(G));var v=L.h.la(l,n)*4,p=Q*4;for(var h=0;
|
|
h<4;h++){var j=Math.max(0,Math.min(254.999,o[v+h]+N[p+4+h])),C=Math.floor(j);if(Math.random()<j-C)C++;
|
|
var V=j-C;N[p+8+h]=V*(7/16);z[p+0+h]=V*(3/16);z[p+4+h]=V*(5/16);z[p+8+h]=V*(1/16);P|=C<<h*8}$[f]=P}}},B4:[function($,o,T,s,E,e,n){var A=T[0],u=T[1],Y=T[2],b=T[3],a=s.d,w=s.w;
|
|
for(var X=0,f=0;X<w;X++)for(var N=0;N<a;N++,f++){var z=N+E,i=X+e,k=A*z+u*i,Q=Y*z+b*i,O=k+.5;$[f]=o[L.h.la(O,n)]}},function($,o,T,s,E,e,n){var A=T[0],u=T[1],Y=T[2],b=T[3],a=s.d,w=s.w;
|
|
for(var X=0,f=0;X<w;X++)for(var N=0;N<a;N++,f++){var z=N+E,i=X+e,k=A*z+u*i,Q=Y*z+b*i,O=2*Math.sqrt(k*k+Q*Q);
|
|
$[f]=o[L.h.la(O,n)]}},function($,o,T,s,E,e,n){var A=T[0],u=T[1],Y=T[2],b=T[3],a=s.d,w=s.w;for(var X=0,f=0;
|
|
X<w;X++)for(var N=0;N<a;N++,f++){var z=N+E,i=X+e,k=A*z+u*i,Q=Y*z+b*i,O=(Math.PI+Math.atan2(-Q,-k))/(2*Math.PI);
|
|
$[f]=o[L.h.la(O,n)]}},function($,o,T,s,E,e,n){var A=T[0],u=T[1],Y=T[2],b=T[3],a=s.d,w=s.w;for(var X=0,f=0;
|
|
X<w;X++)for(var N=0;N<a;N++,f++){var z=N+E,i=X+e,k=A*z+u*i,Q=Y*z+b*i,O=Math.abs(k*2);$[f]=o[L.h.la(O,n)]}},function($,o,T,s,E,e,n){var A=T[0],u=T[1],Y=T[2],b=T[3],a=s.d,w=s.w;
|
|
for(var X=0,f=0;X<w;X++)for(var N=0;N<a;N++,f++){var z=N+E,i=X+e,k=A*z+u*i,Q=Y*z+b*i,O=2*(Math.abs(k)+Math.abs(Q));
|
|
$[f]=o[L.h.la(O,n)]}}]};L.h.a0h=function($,o){return $+.5};L.h.a96=function($,o){return 2*Math.sqrt($*$+o*o)};
|
|
L.h.ad4=function($,o){return(Math.PI+Math.atan2(-o,-$))/(2*Math.PI)};L.h.a6O=function($,o){return Math.abs($*2)};
|
|
L.h.ao_=function($,o){return 2*(Math.abs($)+Math.abs(o))};L.h.Xo=function($,o,T,s,E,e,n,A,u,Y,b,a){if($.Clrs==null)return;
|
|
var w=new Uint32Array(o.buffer),X=1023,N=L.h.Bu($.Clrs.v,u,Y);if(a){var z=L.h.a0K($,N,X+1,n);L.h.a8l(w,z,s,T,T.x-E,T.y-e,X,A);
|
|
return}var i=L.h.IM($,N,X+1,n);if(A<5){L.h.B4[A](w,i,s,T,T.x-E,T.y-e,X)}else{var k=new Uint8Array(i.buffer),Q=T.d,O=T.w,c=b.a6-b.vN,B=1/c,G=b.rc.d-T.d>>1,l=b.rc.w-T.w>>1,v=b.rc.d,p=-.6*B,P=(-.6+.4)*B,h=(-.6+2*.4)*B,j=(-.6+3*.4)*B;
|
|
for(var C=0,f=0;C<O;C++)for(var V=0;V<Q;V++,f+=4){var d=0,m=0,R=0,g=0,S=(C+l)*v+V+G,F=(b.kt[S]-b.vN)*B,r=0;
|
|
if(F<=0||F>=1){r=(F<=0?0:X)<<2;o[f]=k[r];o[f+1]=k[r+1];o[f+2]=k[r+2];o[f+3]=k[r+3];continue}r=Math.max(0,Math.min(X-1,Math.round((F+p)*X)))<<2;
|
|
m+=k[r];R+=k[r+1];g+=k[r+2];d+=k[r+3];r=Math.max(0,Math.min(X-1,Math.round((F+P)*X)))<<2;m+=k[r];R+=k[r+1];
|
|
g+=k[r+2];d+=k[r+3];r=Math.max(0,Math.min(X-1,Math.round((F+h)*X)))<<2;m+=k[r];R+=k[r+1];g+=k[r+2];d+=k[r+3];
|
|
r=Math.max(0,Math.min(X-1,Math.round((F+j)*X)))<<2;m+=k[r];R+=k[r+1];g+=k[r+2];d+=k[r+3];o[f]=m>>>2;
|
|
o[f+1]=R>>>2;o[f+2]=g>>>2;o[f+3]=d>>>2}}};L.h.Bu=function($,o,T){var s=[];for(var f=0;f<$.length;f++){var E;
|
|
if($[f].v.Type.v.Clry=="FrgC")E={i:o>>16&255,m:o>>8&255,P:o&255};else if($[f].v.Type.v.Clry=="BckC")E={i:T>>16&255,m:T>>8&255,P:T&255};
|
|
else E=L.h.Qc($[f].v.Clr.v);s.push(E)}return s};L.h.Qc=function($){var o,T=$.classID;if(T=="RGBC"){if($.Rd)o={i:$.Rd.v,m:$.Grn.v,P:$.Bl.v};
|
|
else o={i:$.redFloat.v*255,m:$.greenFloat.v*255,P:$.blueFloat.v*255}}else if(T=="HSBC"){o=L.ag($.H.v.val/360,$.Strt.v/100,$.Brgh.v/100);
|
|
o.i*=255;o.m*=255;o.P*=255}else if(T=="CMYC"){var s=100-$.Cyn.v,E=100-$.Mgnt.v,e=100-$.Ylw.v,n=100-$.Blck.v,A=255*s*n*1e-4,u=255*(.2*s+.8*E)*n*1e-4,Y=255*(.2*E+.8*e)*n*1e-4;
|
|
o={i:A,m:u,P:Y}}else if(T=="Grsc")o={i:255-$.Gry.v,m:255-$.Gry.v,P:255-$.Gry.v};else if(T=="LbCl"){o=L.u3($.Lmnc.v,$.A.v,$.B.v)}else console.log($);
|
|
if(isNaN(o.i))o.i=o.m=o.P=0;return o};L.h.wb=function($){return{classID:"RGBC",Rd:{t:"doub",v:$.i},Grn:{t:"doub",v:$.m},Bl:{t:"doub",v:$.P}}};
|
|
L.h.a0K=function($,o,T,s){var E=[],e=1/(T-0);for(var f=0;f<T;f++){var n=f*4,A=L.h.YD($,o,(s?T-1-f:f)*e);
|
|
E[n]=A[0];E[n+1]=A[1];E[n+2]=A[2];E[n+3]=A[3]}return E};L.h.IM=function($,o,T,s){var E=new Uint32Array(T),e=1/(T-0);
|
|
for(var f=0;f<T;f++)E[f]=L.h.cC($,o,(s?T-1-f:f)*e);return E};L.h.YD=function($,o,T){var s=4096,E=1/4096,e=$.Intr.v*E,n=$.Clrs.v,A=$.Trns.v,u=n.length-1,Y=A.length-1,f=-1,b=0,a=0,w=0,X=0;
|
|
while(f<Y&&A[f+1].v.Lctn.v<=T*s)f++;if(f==-1){b=A[0].v.Opct.v.val*(255/100)}else if(f==Y){b=A[f].v.Opct.v.val*(255/100)}else{var N=L.h.iv(A,E,f,T,e);
|
|
b=(N*A[f].v.Opct.v.val+(1-N)*A[f+1].v.Opct.v.val)*(255/100)}f=-1;while(f<u&&n[f+1].v.Lctn.v<=T*s)f++;
|
|
if(f==-1){var z=o[0];a=z.i;w=z.m;X=z.P}else if(f==u){var z=o[f];a=z.i;w=z.m;X=z.P}else{var i=o[f],k=o[f+1],Q=L.h.iv(n,E,f,T,e);
|
|
a=Q*i.i+(1-Q)*k.i;w=Q*i.m+(1-Q)*k.m;X=Q*i.P+(1-Q)*k.P}return[a,w,X,b]};L.h.cC=function($,o,T){var s=L.h.YD($,o,T),E=~~(.5+s[0]),e=~~(.5+s[1]),n=~~(.5+s[2]),A=~~(.5+s[3]);
|
|
return A<<24|n<<16|e<<8|E};L.h.iv=function($,o,f,T,s){if($.length==2)s*=.5;var E=$[f].v.Lctn.v*o,e=$[f+1].v.Lctn.v*o,n=E+$[f+1].v.Mdpn.v*.01*(e-E),A;
|
|
if(T<n)A=.5*(T-E)/(n-E);else A=.5+.5*(T-n)/(e-n);A=.5+.5*(s*Math.cos(Math.PI*A)+(1-s)*(1-2*A));return A};
|
|
L.h.Vq=function($,o){var T=Math.PI*$.Angl.v.val/180,s=$.Scl.v.val/100,E=$.Ofst.v,e=E.Hrzn.v.val/100,n=E.Vrtc.v.val/100,A=Math.cos(T),u=-Math.sin(T),Y=.5*o.w,b=Y*(A/u),a=Math.sqrt(Y*Y+b*b),w=.5*o.d,X=w*(u/A),N=Math.sqrt(w*w+X*X),z=Math.min(a,N)*s,i=o.x+o.d/2+e*o.d,k=o.y+o.w/2+n*o.w;
|
|
return[new aY(i,k),new aY(i+A*z,k+u*z)]};L.h.vV=function($,o,T,s){var E=o.x-$.x,e=-(o.y-$.y),n=Math.sqrt(E*E+e*e),A=Math.atan2(e,E),u=Math.cos(A),Y=-Math.sin(A),b=.5*T.w,a=b*(u/Y),w=Math.sqrt(b*b+a*a),X=.5*T.d,N=X*(Y/u),z=Math.sqrt(X*X+N*N),i=n/Math.min(w,z),k=($.x-T.x-T.d/2)/T.d,Q=($.y-T.y-T.w/2)/T.w;
|
|
s.Angl.v.val=180*A/Math.PI;s.Scl.v.val=i*100;var O=s.Ofst.v;O.Hrzn.v.val=k*100;O.Vrtc.v.val=Q*100};L.h.Cw=function($,o){for(var f=0;
|
|
f<$.length;f++){var T=$[f],s=Math.round(T[0]*4096),E=T[1],e=T[2],n=T[3];if(e==null)e=1;if(n==null)n=.5;
|
|
var A=L.h.wb({i:E[0]*255,m:E[1]*255,P:E[2]*255});o.Clrs.v[f]={t:"Objc",v:{classID:"Clrt",Lctn:{t:"long",v:s},Mdpn:{t:"long",v:Math.round(n*100)},Clr:{t:"Objc",v:A},Type:{t:"enum",v:{Clry:"UsrS"}}}};
|
|
o.Trns.v[f]={t:"Objc",v:{classID:"TrnS",Lctn:{t:"long",v:s},Mdpn:{t:"long",v:Math.round(n*100)},Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(e*100)}}}}}};
|
|
L.gJ={};L.gJ.a5R=function($,o,T,s,E,e,n,A,u,Y,b,a){var w,X,N,z=Date.now(),i=!1,k=n,Q=Y,O,c,B,G,l=e*255,v=255-u*255,p=1+E*6,P=1+A*6,h=1+a*4,j=(h-1)/7,C=0,V=255-0,d,m,R,g,S,F,r,q,W,Z,I,_,cN,ce=0,gf=1,K,cv,f0,i8,b5,iC,an,cO,bh,bD,fq=1+b,fO,g6=L.G(T*s),hM=L.G(T*s),d3=L.G(T*s),h9=L.G(T*s),cs=255/l,dv=255/(255-v);
|
|
for(X=0;X<s;X++){for(w=0;w<T;w++){var f=X*T+w,ec=f<<2;K=L.DB($[ec],$[ec+1],$[ec+2]);h9[f]=K;if(K<l)g6[f]=255-K*cs;
|
|
if(K>v)hM[f]=255-(255-K)*dv}}if(i)console.log("init",Date.now()-z);z=Date.now();if(E*k>0){d3.set(g6);
|
|
L.Ja.Pm(d3,g6,new df(0,0,T,s),k)}if(A*Q>0){d3.set(hM);L.Ja.Pm(d3,hM,new df(0,0,T,s),Q)}if(i)console.log("blur",Date.now()-z);
|
|
z=Date.now();var gT=L.G(256),iz=L.G(256);for(var f=0;f<256;f++){var gw=f*(1/255),iI=0;iI=(1-Math.pow(1-gw,p))*255;
|
|
gT[f]=Math.max(0,Math.min(255,~~(iI+.5)));iI=Math.pow(gw,P)*255;iz[f]=Math.max(0,Math.min(255,~~(iI+.5)))}var g2=new Uint8ClampedArray(o.buffer),bb=new Float32Array(32768);
|
|
for(var f=0;f<32768;f++){fO=Math.sqrt(f)*(1/128);if(fq>1)fO=(1-fO)*(fq-1)+1;else fO=fO*(fq-1)+1;bb[f]=fO}for(X=0;
|
|
X<s;X++){for(w=0;w<T;w++){var f=X*T+w,ec=f<<2,iI=h9[f],ir=g6[f]*(1/255),dG=hM[f]*(1/255);iI=(1-ir)*iI+ir*gT[~~iI];
|
|
iI=(1-dG)*iI+dG*iz[~~iI];K=iI;var gY=$[ec],e6=$[ec+1],fr=$[ec+2];cv=-gY*.168736-e6*.331264+fr*.5;f0=gY*.5-e6*.418688-fr*.081312;
|
|
fO=bb[~~(.5+cv*cv+f0*f0)];i8=cv*fO;iC=f0*fO;gf=1-Math.min(2-(ir+dG),1);cv=gf*cv+(1-gf)*i8;f0=gf*f0+(1-gf)*iC;
|
|
cO=K+1.402*f0;bh=K-.34414*cv-.71414*f0;bD=K+1.772*cv;g2[ec]=~~(.5+cO);g2[ec+1]=~~(.5+bh);g2[ec+2]=~~(.5+bD)}}if(i)console.log("apply masks",Date.now()-z);
|
|
z=Date.now()};L.ku={};L.ku.gY=function($,o,T,s,E){var e=!1,N=1,V=0,d=0,W=0,fq=0;if(!o.Yg(E)){var n=o.BZ(E),A=L.G(n.Y()*4);
|
|
L.h9($,o,A,n);$=A;o=n}var u=L.G(o.Y());L.pg(T,E,u,o);L.round(u);E=E.Sr(o);var Y=E.d,b=E.w,a=Y*3<b?2:1,w=b*3<Y?2:1;
|
|
if(E.Y()*(a*2+1)*(w*2+1)<o.Y()){var n=new df(E.x-Y*a,E.y-b*a,Y*(a*2+1),b*(w*2+1)).Sr(o),A=L.G(n.Y()*4);
|
|
L.h9($,o,A,n);var X=L.G(n.Y());L.pg(u,o,X,n);o=n;$=A;u=X}while((o.d+o.w)/2/N>400)N++;var z=$,i=o,k=u,Q=Math.floor(i.d/N),O=Math.floor(i.w/N);
|
|
$=L.G(Q*O*4);L.scale.nq(z,i.d,i.w,$,Q,O,1/N);u=L.G(Q*O);L.scale.lx(k,i.d,i.w,u,Q,O,1/N);L.round(u,1);
|
|
var c=L.ac(u,new df(0,0,Q,O));if(c.p4())return 1;var B=Math.round((c.d+c.w)/2/15),G=Date.now(),l=L.G(Q*O*4);
|
|
L.aoe($,l);var v=Int16Array,p=new v(Q*O*24),P=new v(64),h=new v(64),j=new v(64),C=new v(64);for(var m=3;
|
|
m<O-4;m++)for(var R=3;R<Q-4;R++){var g=m*Q+R;if(u[g]==255)continue;if(L.ku.a5g(l,u,R,m,Q,O,P,h,j)!=0)continue;
|
|
L.ku.Vl(P,C);p[V]=R;p[V+1]=m;L.ku.w0(P,p,V+4,12);V+=16;L.ku.Vl(h,C);L.ku.w0(h,p,V,4);V+=4;L.ku.Vl(j,C);
|
|
L.ku.w0(j,p,V,4);V+=4;var S=p[V-24+5],F=p[V-24+6];p[V-24+5]=p[V-24+20];p[V-24+6]=p[V-24+16];p[V-24+16]=S;
|
|
p[V-24+20]=F;d++}if(d==0)return 2;if(e)console.log(Date.now()-G,"FWHT computed");G=Date.now();var r=[];
|
|
L.ku.tu(0,d-1,r,p,new v(2*24));if(e)console.log(Date.now()-G,"KD tree computed");G=Date.now();var q=new Float32Array(Q*O*4);
|
|
for(var f=0;f<d;f++){var Z=f,I=L.ku.aof(Z,p,r,B);if(I==-1)continue;var _=Z*24,cN=I*24,ce=p[_],gf=p[_+1],K=p[cN],cv=p[cN+1];
|
|
W+=L.ku.getError(cN,_,p,1e99);var f0=K-ce,i8=cv-gf;q[(O+i8)*2*Q+(Q+f0)]+=1}if(e)console.log(Date.now()-G,"NN found");
|
|
G=Date.now();var b5=[],iC=1/(2*Q);for(var f=0;f<q.length;f++){if(q[f]>0){var m=Math.floor(f*iC),R=f-m*2*Q;
|
|
b5.push({x:R-Q,y:m-O,H:q[f],Ny:-1})}}b5.sort(function(dG,gY){return gY.H-dG.H});var bh=new Int32Array(Q*O),bD=[];
|
|
for(var f=0;f<Q*O;f++){if(u[f]==255){bh[f]=fq;bD.push(f%Q,Math.floor(f/Q));fq++}else if($[(f<<2)+3]<200){bh[f]=-2}else{bh[f]=-1}}var fO=L.ku.afP(Q,O,b5,bh,bD,fq);
|
|
if(fO==null){return 3}var g6=fO.pq,top=fO.top;g6=L.ku.anH(g6,$,Q,O,top,bh,bD,fq);if(e)console.log(Date.now()-G,"optimal labeling found");
|
|
G=Date.now();var n=E.clone();n.Mi(1,1);n=n.Sr(i);var hM=L.G(n.Y()*4),d3=L.G(n.Y());L.h9(z,i,hM,n);var h9=i.d,cs=i.w;
|
|
for(var m=0;m<cs;m++)for(var R=0;R<h9;R++){if(k[m*h9+R]==0)continue;var dv=Math.min(Math.floor(R/N),Q-1),ec=Math.min(Math.floor(m/N),O-1),gT=bh[ec*Q+dv];
|
|
if(gT==-1)continue;var iz=g6[gT],gw=top[iz],iI=R+gw.x*N,g2=m+gw.y*N,bb=g2*h9+iI<<2,ir=(m-n.y+i.y)*n.d+(R-n.x+i.x)<<2;
|
|
hM[ir]=z[bb];hM[ir+1]=z[bb+1];hM[ir+2]=z[bb+2];hM[ir+3]=z[bb+3];hM[ir+3]=z[bb+3];d3[ir>>2]=iz+1}if(e)console.log(Date.now()-G,"copied back");
|
|
G=Date.now();L.Eh.gY(hM,d3,n,null,1e3);if(e)console.log(Date.now()-G,"poisson smooth");G=Date.now();
|
|
L.h9(hM,n,s,E);return 0};L.ku.Xq=function($,o,T,s,E,e){return L.ku.E_($+E.x,o+E.y,T,s)&&e[(o+E.y)*T+($+E.x)]==-1?0:1e9};
|
|
L.ku.anH=function($,o,T,s,top,E,e,n){var A=Date.now(),u=[-1,0,0,-1,1,0,0,1],Y=1e99,b=[],a=[],w=2*(n*2*3+n*2),X=null,N=0,z=0,i=0,k=1e99;
|
|
while(!0&&Date.now()<A+12e3){i++;var Q=null,O=Y;for(var c=0;c<top.length;c++){var B=top[c],G=0,l=n+2,v=0;
|
|
for(var f=0;f<n;f++){var p=e[f*2],P=e[f*2+1],h=top[$[f]],j=L.ku.Xq(p,P,T,s,B,E),C=$[f]==c?1e9:L.ku.Xq(p,P,T,s,h,E);
|
|
for(var J=0;J<4;J++){if(J==0&&p==0||J==1&&P==0||J==2&&p==T-1||J==3&&P==s-1)continue;var V=u[2*J],d=u[2*J+1],m=p+V,R=P+d,g=E[R*T+m];
|
|
if(g==-2){}else if(g==-1){j+=3*L.ku.k7(m+B.x,R+B.y,m,R,T,s,o,E);j+=2*L.ku.k7(m+B.x+V,R+B.y+d,m+V,R+d,T,s,o,E);
|
|
C+=3*L.ku.k7(m+h.x,R+h.y,m,R,T,s,o,E);C+=2*L.ku.k7(m+h.x+V,R+h.y+d,m+V,R+d,T,s,o,E)}else if(J>1){if($[f]==$[g]){var S=0;
|
|
S+=L.ku.k7(p+h.x,P+h.y,p+B.x,P+B.y,T,s,o,E);S+=L.ku.k7(m+h.x,R+h.y,m+B.x,R+B.y,T,s,o,E);b[G]=f;b[G+1]=g;
|
|
a[G]=S;a[G+1]=S;G+=2}else{var F=top[$[g]],r=l,q=0,W=0,Z=0;l++;q+=L.ku.k7(p+h.x,P+h.y,p+B.x,P+B.y,T,s,o,E);
|
|
q+=L.ku.k7(m+h.x,R+h.y,m+B.x,R+B.y,T,s,o,E);W+=L.ku.k7(p+F.x,P+F.y,p+B.x,P+B.y,T,s,o,E);W+=L.ku.k7(m+F.x,R+F.y,m+B.x,R+B.y,T,s,o,E);
|
|
Z+=L.ku.k7(p+F.x,P+F.y,p+h.x,P+h.y,T,s,o,E);Z+=L.ku.k7(m+F.x,R+F.y,m+h.x,R+h.y,T,s,o,E);b[G]=f;b[G+1]=r;
|
|
a[G]=q;a[G+1]=q;G+=2;b[G]=g;b[G+1]=r;a[G]=W;a[G+1]=W;G+=2;b[G]=r;b[G+1]=n+1;a[G]=Z;a[G+1]=0;G+=2}}}b[G]=n;
|
|
b[G+1]=f;a[G]=j;a[G+1]=0;G+=2;b[G]=f;b[G+1]=n+1;a[G]=C;a[G+1]=0;G+=2;v+=Math.min(j,C)}if(v>O)continue;
|
|
var I=L.Lt._v(l,G,n,n+1,b,a,O);if(I.Uq<O){O=I.Uq;var _=$.slice(0);L.ku.aiR(_,G,b,I.TO,c,n);Q=_}}if(O*1>=Y){break}Y=O;
|
|
$=Q;if((i&3)==0){if(O*1.03>=k)break;k=O}if((i&3)==0){var cN=0*top.length;for(var f=0;f<top.length&&top.length>cN;
|
|
f++){if($.indexOf(f)!=-1)continue;top.splice(f,1);for(var g=0;g<$.length;g++)if($[g]>f)$[g]--;f--}}}return $};
|
|
L.ku.aiR=function($,o,T,s,E,e){for(var f=0;f<s.length;f++){var n=s[f]<<1,A=0,u=0;if(n<o){A=T[n];u=T[n+1]}else{u=T[n];
|
|
A=T[n+1]}if(A==e&&$[u]!=E)$[u]=E}};L.ku.B3=function(top,$,o,T,s,E,e,n,A){for(var f=0;f<o.length;f++){var u=o[f],Y=!0;
|
|
if(n!=null&&!(L.ku.E_(n+u.x,A+u.y,E,e)&&T[E*(A+u.y)+n+u.x]==-1))continue;if(u.Ny==-1)u.Ny=L.ku.a55(u,T,s,E,e);
|
|
if(u.Ny<=0)continue;for(var b=0;b<top.length;b++){var a=top[b],w=u.x-a.x,X=u.y-a.y;if(w*w+X*X<$){Y=!1;
|
|
break}}if(Y)return u}return null};L.ku.a55=function($,o,T,s,E){var e=0;for(var f=0;f<T.length;f+=2){var n=T[f]+$.x,A=T[f+1]+$.y;
|
|
if(L.ku.E_(n,A,s,E)&&o[s*A+n]==-1)e++}return e/(T.length>>1)};L.ku.afP=function($,o,T,s,E,e){var top=[];
|
|
for(var f=0;f<60;f++){var n=L.ku.B3(top,25,T,s,E,$,o);if(n==null)break;else top.push(n)}if(top.length==0)return null;
|
|
var A=[];for(var f=0;f<e;f++){var u=E[f*2],Y=E[f*2+1],b=-1,a=0;while(!0){a++;var w=Math.random();b=Math.floor(w*.99999*top.length);
|
|
var X=top[b],N=u+X.x,z=Y+X.y;if(L.ku.E_(N,z,$,o)&&s[z*$+N]==-1)break;if(a>100){var n;n=L.ku.B3(top,0,T,s,E,$,o,u,Y);
|
|
if(n==null)return null;top.push(n);a=0}}A.push(b)}return{top:top,pq:A}};L.ku.k7=function($,o,T,s,E,e,n,A){if($==T&&o==s)return 0;
|
|
if($<0||o<0||$>=E||o>=e||T<0||s<0||T>=E||s>=e||A[o*E+$]!=-1||A[s*E+T]!=-1)return 1e7;var u=o*E+$<<2,Y=s*E+T<<2,b=n[u]-n[Y],a=n[u+1]-n[Y+1],w=n[u+2]-n[Y+2];
|
|
return 1+(b*b+a*a+w*w)};L.ku.E_=function($,o,T,s){return $>=0&&$<T&&o>=0&&o<s};L.ku.aof=function($,o,T,s){var E=24*$,e=o[E],n=o[E+1],A=s*s,u=0,w=1e9;
|
|
while(T[u]!=99)if(o[E+T[u]]<T[u+1])u=T[u+2];else u=T[u+3];var Y=T[u+1],b=T[u+2],a=-1;for(var f=Y;f<=b;
|
|
f++){var u=f,X=u*24,N=o[X],z=o[X+1];if((N-e)*(N-e)+(z-n)*(z-n)<A)continue;var i=L.ku.getError(X,E,o,w);
|
|
if(i<w){w=i;a=u}}return a};L.ku.getError=function($,o,T,s){var E=0;for(var e=4;e<24;e+=4){var n=T[o+e]-T[$+e],A=T[o+e+1]-T[$+e+1],u=T[o+e+2]-T[$+e+2],Y=T[o+e+3]-T[$+e+3];
|
|
E+=n*n+A*A+u*u+Y*Y;if(E>=s)return E+1}return E};L.ku.tu=function($,o,T,s,E){var e=16,w=0;if(o-$<=e){T.push(99,$,o);
|
|
return}L.ku.L3($,o,s,E);var n=-1,A=-1;for(var f=4;f<24;f++){var u=E[2*f+1]-E[2*f];if(u>A){A=u;n=f}}var Y=$+o>>1,b=L.ku.aah(Y,$,o,s,n),a=-1;
|
|
for(var f=$;f<=o;f++)if(s[24*f+n]==b){if(a==-1)a=f;w=f}if($+8<a&&a-$>o-w)Y=a;else if(w+1<o-8)Y=w+1;else if(o-$<64){T.push(99,$,o);
|
|
return}else Y=Y;var X=T.length;T.push(n,b,0,0);T[X+2]=X+4;L.ku.tu($,Y-1,T,s,E);T[X+3]=T.length;L.ku.tu(Y,o,T,s,E)};
|
|
L.ku.L3=function($,o,T,s){for(var f=0;f<48;f+=4){s[f]=3e4;s[f+1]=-3e4;s[f+2]=3e4;s[f+3]=-3e4}for(var f=$;
|
|
f<=o;f++){var E=f*24;for(var e=0;e<24;e++){var n=T[E+e],A=s[e<<1],u=s[(e<<1)+1];if(n<A)s[e<<1]=n;if(n>u)s[(e<<1)+1]=n}}};
|
|
L.ku.e9=function($,o,T){var s=0,f=0;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;
|
|
f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;
|
|
f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;
|
|
f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;
|
|
f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;
|
|
f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;
|
|
f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;
|
|
f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;
|
|
f++;s=T[$+f];T[$+f]=T[o+f];T[o+f]=s;f++};L.ku.Mw=function($,o,T,s){var E=T+s>>>1,e=$[24*E+o];while(T<=s){while($[24*T+o]<e)T++;
|
|
while($[24*s+o]>e)s--;if(T<=s){if($[24*T+o]!=$[24*s+o])L.ku.e9(T*24,s*24,$);T++;s--}}return T};L.ku.aah=function($,o,T,s,E){var e=0;
|
|
while(o!=T){e=L.ku.Mw(s,E,o,T);if($<e)T=e-1;else o=e}return s[$*24+E]};L.ku.w0=function($,o,T,s){for(var f=0;
|
|
f<s;f++)o[T+f]=$[f]};L.ku.a5g=function($,o,T,s,E,e,n,A,u){var Y=(s-3)*E+(T-3),b=Y<<2;for(var a=0;a<8;
|
|
a++){if(o[Y]+o[Y+1]+o[Y+2]+o[Y+3]+o[Y+4]+o[Y+5]+o[Y+6]+o[Y+7]!=0||$[b+3]<200||$[b+7]<200||$[b+11]<200||$[b+15]<200||$[b+19]<200||$[b+23]<200||$[b+27]<200||$[b+31]<200)return 1;
|
|
var f=a<<3;n[f+0]=$[b+0];A[f+0]=$[b+1];u[f+0]=$[b+2];n[f+1]=$[b+4];A[f+1]=$[b+5];u[f+1]=$[b+6];n[f+2]=$[b+8];
|
|
A[f+2]=$[b+9];u[f+2]=$[b+10];n[f+3]=$[b+12];A[f+3]=$[b+13];u[f+3]=$[b+14];n[f+4]=$[b+16];A[f+4]=$[b+17];
|
|
u[f+4]=$[b+18];n[f+5]=$[b+20];A[f+5]=$[b+21];u[f+5]=$[b+22];n[f+6]=$[b+24];A[f+6]=$[b+25];u[f+6]=$[b+26];
|
|
n[f+7]=$[b+28];A[f+7]=$[b+29];u[f+7]=$[b+30];b+=E<<2;Y+=E}return 0};L.ku.Vl=function($,o){o[0]=$[32]+$[0];
|
|
o[1]=$[33]+$[1];o[2]=$[34]+$[2];o[3]=$[35]+$[3];o[4]=$[36]+$[4];o[5]=$[37]+$[5];o[6]=$[38]+$[6];o[7]=$[39]+$[7];
|
|
o[8]=$[40]+$[8];o[9]=$[41]+$[9];o[10]=$[42]+$[10];o[11]=$[43]+$[11];o[12]=$[44]+$[12];o[13]=$[45]+$[13];
|
|
o[14]=$[46]+$[14];o[15]=$[47]+$[15];o[16]=$[48]+$[16];o[17]=$[49]+$[17];o[18]=$[50]+$[18];o[19]=$[51]+$[19];
|
|
o[20]=$[52]+$[20];o[21]=$[53]+$[21];o[22]=$[54]+$[22];o[23]=$[55]+$[23];o[24]=$[56]+$[24];o[25]=$[57]+$[25];
|
|
o[26]=$[58]+$[26];o[27]=$[59]+$[27];o[28]=$[60]+$[28];o[29]=$[61]+$[29];o[30]=$[62]+$[30];o[31]=$[63]+$[31];
|
|
o[32]=$[0]-$[32];o[33]=$[1]-$[33];o[34]=$[2]-$[34];o[35]=$[3]-$[35];o[36]=$[4]-$[36];o[37]=$[5]-$[37];
|
|
o[38]=$[6]-$[38];o[39]=$[7]-$[39];o[40]=$[8]-$[40];o[41]=$[9]-$[41];o[42]=$[10]-$[42];o[43]=$[11]-$[43];
|
|
o[44]=$[12]-$[44];o[45]=$[13]-$[45];o[46]=$[14]-$[46];o[47]=$[15]-$[47];o[48]=$[16]-$[48];o[49]=$[17]-$[49];
|
|
o[50]=$[18]-$[50];o[51]=$[19]-$[51];o[52]=$[20]-$[52];o[53]=$[21]-$[53];o[54]=$[22]-$[54];o[55]=$[23]-$[55];
|
|
o[56]=$[24]-$[56];o[57]=$[25]-$[57];o[58]=$[26]-$[58];o[59]=$[27]-$[59];o[60]=$[28]-$[60];o[61]=$[29]-$[61];
|
|
o[62]=$[30]-$[62];o[63]=$[31]-$[63];$[0]=o[16]+o[0];$[1]=o[17]+o[1];$[2]=o[18]+o[2];$[3]=o[19]+o[3];
|
|
$[4]=o[20]+o[4];$[5]=o[21]+o[5];$[6]=o[22]+o[6];$[7]=o[23]+o[7];$[8]=o[24]+o[8];$[9]=o[25]+o[9];$[10]=o[26]+o[10];
|
|
$[11]=o[27]+o[11];$[12]=o[28]+o[12];$[13]=o[29]+o[13];$[14]=o[30]+o[14];$[15]=o[31]+o[15];$[16]=o[0]-o[16];
|
|
$[17]=o[1]-o[17];$[18]=o[2]-o[18];$[19]=o[3]-o[19];$[20]=o[4]-o[20];$[21]=o[5]-o[21];$[22]=o[6]-o[22];
|
|
$[23]=o[7]-o[23];$[24]=o[8]-o[24];$[25]=o[9]-o[25];$[26]=o[10]-o[26];$[27]=o[11]-o[27];$[28]=o[12]-o[28];
|
|
$[29]=o[13]-o[29];$[30]=o[14]-o[30];$[31]=o[15]-o[31];o[0]=$[8]+$[0];o[1]=$[9]+$[1];o[2]=$[10]+$[2];
|
|
o[3]=$[11]+$[3];o[4]=$[12]+$[4];o[5]=$[13]+$[5];o[6]=$[14]+$[6];o[7]=$[15]+$[7];o[8]=$[0]-$[8];o[9]=$[1]-$[9];
|
|
o[10]=$[2]-$[10];o[11]=$[3]-$[11];o[12]=$[4]-$[12];o[13]=$[5]-$[13];o[14]=$[6]-$[14];o[15]=$[7]-$[15];
|
|
$[0]=o[4]+o[0];$[1]=o[5]+o[1];$[2]=o[6]+o[2];$[3]=o[7]+o[3];$[4]=o[0]-o[4];$[5]=o[1]-o[5];$[6]=o[2]-o[6];
|
|
$[7]=o[3]-o[7];$[8]=o[12]+o[8];$[9]=o[13]+o[9];$[10]=o[14]+o[10];$[11]=o[15]+o[11];$[12]=o[8]-o[12];
|
|
$[13]=o[9]-o[13];$[14]=o[10]-o[14];$[15]=o[11]-o[15];o[0]=$[2]+$[0];o[1]=$[3]+$[1];o[2]=$[0]-$[2];o[3]=$[1]-$[3];
|
|
o[4]=$[6]+$[4];o[5]=$[7]+$[5];o[6]=$[4]-$[6];o[7]=$[5]-$[7];o[8]=$[10]+$[8];o[9]=$[11]+$[9];o[10]=$[8]-$[10];
|
|
o[11]=$[9]-$[11];o[12]=$[14]+$[12];o[13]=$[15]+$[13];o[14]=$[12]-$[14];o[15]=$[13]-$[15];$[0]=o[1]+o[0];
|
|
$[1]=o[0]-o[1];$[2]=o[3]+o[2];$[3]=o[2]-o[3];$[4]=o[5]+o[4];$[5]=o[4]-o[5];$[6]=o[7]+o[6];$[7]=o[6]-o[7];
|
|
$[8]=o[9]+o[8];$[9]=o[8]-o[9];$[10]=o[11]+o[10];$[11]=o[10]-o[11];$[12]=o[13]+o[12];$[13]=o[12]-o[13];
|
|
$[14]=o[15]+o[14];$[15]=o[14]-o[15]};L.ku.a5u=function(){var $="",J=64,o="v",T="t",s="a",E=5,f,e,n;for(f=J>>1;
|
|
f>0;f>>=1,E--){for(e=0;e<J;e++){n=(e>>E&1)!=0;if(n){$+=T+"["+e+"] = "+o+"["+(-f+e)+"] - "+o+"["+e+"]; "}else{$+=T+"["+e+"] = "+o+"["+(f+e)+"] + "+o+"["+e+"]; "}}s=o;
|
|
o=T;T=s;$+="\n"}console.log($)};L.ku.a7e=function(J,$,o){var T=$,s=o,E=T,e=0,f,A,u;while(J>>e!=2)e++;
|
|
var n=e;for(f=J>>1;f>0;f>>=1,e--){for(A=0;A<J;A++){u=(A>>e&1)!=0;if(u)s[A]=T[-f+A]-T[A];else s[A]=T[f+A]+T[A]}E=T;
|
|
T=s;s=E}if((n&1)==1)for(f=0;f<J;f++)o[f]=T[f]};L.zQ={};L.zQ.Bp=function($,o,T,s,E,e,n,A,u){var Y=Date.now(),b=new Uint32Array($.buffer),a=new Uint32Array(o.buffer),w=n/T,X=A/s,N=1/w,z=1/X,i=new Float64Array(2),k=3,Q=1/k,O=1/(k*k),c=0,B=0,G=T,l=s;
|
|
if(E){c=E.x;B=E.y;G=E.d;l=E.w}for(var v=0;v<l;v++)for(var p=0;p<G;p++){var P=c+p,h=B+v,f=h*T+P,j=f<<1,C=f<<2;
|
|
L.zQ.ac3(e,n,A,(P+.5)*w,(h+.5)*X,i);var V=i[0]*N,d=i[1]*z;if(V==0&&d==0)a[f]=b[f];else{L.$.WC(P+V+.5,h+d+.5,b,T,s,a,f,u)}}};
|
|
L.zQ.ac3=function($,o,T,s,E,e){s-=.499999;E-=.499999;var n=~~s,A=~~E,u=s-n,Y=E-A,b=(1-Y)*(1-u),a=(1-Y)*u,w=Y*(1-u),X=Y*u,N=n<o-1?n+1:n,z=A<T-1?A+1:A,i=A*o+n<<1,k=A*o+N<<1,Q=z*o+n<<1,O=z*o+N<<1;
|
|
e[0]=b*$[i]+a*$[k]+w*$[Q]+X*$[O];e[1]=b*$[i+1]+a*$[k+1]+w*$[Q+1]+X*$[O+1]};L.zQ.a0G=function($,o,T,s,E){var e=1/$,n=[-1,1,-$,$],A=s.length;
|
|
for(var u=0;u<A;u++){var f=s[u],Y=f<<1,b=u<<1,a=~~(f*e),w=f-$*a,X=T[Y],N=T[Y+1],z=0,i=0;if(w!=0&&w!=$-1){var k=f-1<<1,Q=f+1<<1,O=T[k],c=T[Q],B=T[k+1],G=T[Q+1],l=X-(O+c)*.5,v=N-(B+G)*.5;
|
|
z-=l*E;i-=v*E}if(a!=0&&a!=o-1){var k=f-$<<1,Q=f+$<<1,O=T[k],c=T[Q],B=T[k+1],G=T[Q+1],l=X-(O+c)*.5,v=N-(B+G)*.5;
|
|
z-=l*E;i-=v*E}T[Y]=X+z;T[Y+1]=N+i}};L.zQ.a4b=function($,o){var T=$+","+o;if(L.zQ.z$==T)return L.zQ.xB;
|
|
var s=L.zQ.xB=[];L.zQ.z$=T;for(var f=0;f<=1e3;f++){var E=f*.001,e=Math.sqrt(E),n=Math.exp(-4*e),A=.96*(1-e*e),u=o*((1-$)*n+$*A);
|
|
s[f]=u}return s};L.zQ.z$="";L.zQ.xB=[];L.zQ.a5X=function($,o,T,s,E,e,n,A,u,Y,b,a,w){var X=Math.max(0,Math.floor(E-n-1)),N=Math.min(o,Math.ceil(E+n+1)),z=Math.max(0,Math.floor(e-n-1)),i=Math.min(T,Math.ceil(e+n+1)),k=2*o,Q=n*n,O=1/n,c=0;
|
|
if(w&&(s==3||s==6))u=-u;var B=L.zQ.a4b(A,u);for(var G=z;G<i;G++)for(var l=X;l<N;l++){var f=G*o+l,v=f<<1,p=(E-l)*O,P=(e-G)*O,h=p*p+P*P;
|
|
if(h<1){a[c]=f;var j=B[~~(h*1e3)];if(s==1){$[v]=$[v]*(1-j*.05);$[v+1]=$[v+1]*(1-j*.05)}else{var C=0,V=0,R,g,S,F;
|
|
if(s==0){C=Y*j;V=b*j}else if(s==2){}else if(s==3){C=j*P;V=-j*p}else if(s==4){C=j*p;V=j*P}else if(s==5){C=-j*p;
|
|
V=-j*P}else if(s==6){C=b*j;V=-Y*j}var d=$[v],m=$[v+1];if(l==0||l!=o-1&&C<0){R=1+$[v+2]-d;S=$[v+3]-m}else{R=d-$[v-2]+1;
|
|
S=m-$[v-1]}if(G==0||G!=T-1&&V<0){g=$[v+k]-d;F=1+$[v+k+1]-m}else{g=d-$[v-k];F=m-$[v-k+1]+1}$[v]=-(R*C+g*V-d);
|
|
$[v+1]=-(S*C+F*V-m)}c++}}};L.zQ.a7K=function($){var o=$[0],T=$[0],s=$[1],E=$[1];for(var f=0;f<$.length;
|
|
f+=2){var e=$[f],n=$[f+1];if(e<o)o=e;else if(e>T)T=e;if(n<s)s=n;else if(n>E)E=n}return[o,s,T,E]};L.ahu=function($,o,T,s,E){function e(K,cv,f0,i8){return Math.sqrt((K-f0)*(K-f0)+(cv-i8)*(cv-i8))}function n(K,cv){return K>=0&&K<o&&cv>=0&&cv<T}function A(K){if(K<0)return 0;
|
|
if(K>=o)return o-1;return K}function u(K){if(K<0)return 0;if(K>=T)return T-1;return K}function Y(f,K){var cv=K[3]*(1/255),f0=s[f]+K[0]*cv;
|
|
if(f0>255)f0=255;s[f]=f0;f0=s[f+1]+K[1]*cv;if(f0>255)f0=255;s[f+1]=f0;f0=s[f+2]+K[2]*cv;if(f0>255)f0=255;
|
|
s[f+2]=f0}function b(K,cv,f0){if(!r(K,cv))return;if(f0[3]<0)f0[3]=0;Y((cv*o+K)*4,f0)}function a(K){var cv=K.slice(0,3);
|
|
cv[3]=0;return cv}var w=o/800;function X(K){return Math.round(K*w)}function N(){for(var f=0;f<=300;f++){W[f]=z(f)}}function z(T){var K=.8,cv=.2,f0=K*cv,i8=T/60%2-1,b5=f0*(1-i8*i8),iC=cv-f0,an;
|
|
if(T<60){an=[f0+iC,b5,0]}else if(T<120){an=[b5,f0,0]}else if(T<180){an=[0,f0,b5]}else if(T<240){an=[0,b5,f0]}else if(T<300){an=[b5,0,f0]}else{an=[f0,0,b5]}return[(an[0]+iC)*255,(an[1]+iC)*255,(an[2]+iC)*255]}function i(T){return W[~~T]}function k(K){return 1-Q(K)}function Q(K){return K-~~K}function O(K,cv,f0,i8){S(K,cv,f0,0,cv+1,1,i8)}function c(K,cv,f0,i8,b5,iC){S(K,cv,f0,0,i8,1,b5,iC)}function B(K){for(var f=0;
|
|
f<s.length;f+=4){Y(f,K)}}function G(K,cv,f0,i8,b5,iC,an,cO){l(K,cv,f0,i8,b5,1,iC,an,cO)}function l(K,cv,f0,i8,b5,iC,an,cO,bh){if(iC==null)iC=.5;
|
|
if(an==null)an=0;if(cO==null)cO=0;if(bh==null)bh=!1;var bD=K.x,fq=K.y,fO=f0.slice(0),g6=~~(f0[3]*I);
|
|
i8=i8*I;if(!bh){cv=F(cv);b5=F(b5);an=F(an);cO=F(cO)}var hM=A(bD-cv),d3=A(bD+cv);for(var h9=hM;h9<=d3;
|
|
h9++){var cs=h9-bD,dv=Math.floor(Math.sqrt(cv*cv-cs*cs)),ec=u(fq-dv),gT=u(fq);for(var iz=ec;iz<=gT;iz++){var gw=e(h9,iz,bD,fq);
|
|
if(gw>cv||gw<=cv-b5)break;var iI=(gw-cv+b5)/b5;fO[3]=g6-i8*(iC==1?iI:Math.pow(iI,iC));Y((iz*o+h9)*4,fO)}ec=u(fq+dv);
|
|
for(var iz=ec;iz>gT;iz--){var gw=e(h9,iz,bD,fq);if(gw>cv||gw<=cv-b5)break;var iI=(gw-cv+b5)/b5;fO[3]=g6-i8*(iC==1?iI:Math.pow(iI,iC));
|
|
Y((iz*o+h9)*4,fO)}}if(an>0){S(K,cv+an,fO,fO[3],an,1,0,0,!0)}if(cO>0){S(K,cv-b5,q(f0),-f0[3],cO,1,0,0,!0)}}function v(K,cv,f0,i8,b5,iC){S(K,cv,f0,f0[3],cv+1,1,i8,b5,iC)}function p(K,cv,f0,i8,b5){if(b5==null)b5=!1;
|
|
var iC=K.x,an=K.y;i8*=I;if(!b5){cv=F(cv);f0=F(f0)}var cO=A(iC-cv),bh=A(iC+cv);for(var bD=cO;bD<bh;bD++){var fq=bD-iC,fO=~~Math.sqrt(cv*cv-fq*fq),g6=u(an-fO),hM=u(an);
|
|
for(var d3=g6;d3<=hM;d3++){var h9=e(bD,d3,iC,an);if(h9>cv||h9<=cv-f0)break;var cs=(cv-h9)/f0,dv=i(300*cs);
|
|
dv[3]=i8;Y((d3*o+bD)*4,dv)}g6=u(an+fO);for(var d3=g6;d3>hM;d3--){var h9=e(bD,d3,iC,an);if(h9>cv||h9<=cv-f0)break;
|
|
var cs=(cv-h9)/f0,dv=i(300*cs);dv[3]=i8;Y((d3*o+bD)*4,dv)}}}function P(Z,K){var cv=Z.e$,f0=Z.bk,i8=K.slice(0),b5=K[3]*I,iC=Math.abs(f0.y-cv.y)>Math.abs(f0.x-cv.x);
|
|
if(iC){var an=cv.x;cv.x=cv.y;cv.y=an;an=f0.x;f0.x=f0.y;f0.y=an}if(cv.x>f0.x){var an=cv;cv=f0;f0=an}var cO=f0.x-cv.x,bh=f0.y-cv.y,bD=cO==0?1:bh/cO,fq=Math.round(cv.x),fO=cv.y+bD*(fq-cv.x),g6=k(cv.x+.5),hM=fq,d3=~~fO;
|
|
if(iC){i8[3]=b5*k(fO)*g6;b(d3,hM,i8);i8[3]=b5*Q(fO)*g6;b(d3+1,hM,i8)}else{i8[3]=b5*k(fO)*g6;b(hM,d3,i8);
|
|
i8[3]=b5*Q(fO)*g6;b(hM,d3+1,i8)}var h9=fO-bD;fq=Math.round(f0.x);fO=f0.y+bD*(fq-f0.x);g6=Q(f0.x+.5);
|
|
var cs=fq,dv=~~fO;if(iC){i8[3]=b5*k(fO)*g6;b(dv,cs,i8);i8[3]=b5*Q(fO)*g6;b(dv+1,cs,i8)}else{i8[3]=b5*k(fO)*g6;
|
|
b(cs,dv,i8);i8[3]=b5*Q(fO)*g6;b(cs,dv+1,i8)}if(iC){for(var ec=hM+1;ec<=cs-1;ec++){i8[3]=b5*k(h9);b(~~h9,ec,i8);
|
|
i8[3]=b5*Q(h9);b(~~h9+1,ec,i8);h9+=bD}}else{for(var ec=hM+1;ec<=cs-1;ec++){i8[3]=b5*k(h9);b(ec,~~h9,i8);
|
|
i8[3]=b5*Q(h9);b(ec,~~h9+1,i8);h9+=bD}}}function h(K,cv,f0,i8){for(var f=0;f<4;f++){var b5=K.Ii(cv+1.3*f,f0);
|
|
P(b5,i8,1)}}function aY(K,cv){this.x=Math.round(K);this.y=Math.round(cv)}var j=Math.PI/180;aY.prototype.Ii=function(K,cv){K=K*j;
|
|
var f0=this.x+cv*Math.cos(K),i8=this.y+cv*Math.sin(K);return new C(this.x,this.y,f0,i8)};aY.prototype.ah6=function(K,cv){K=K*j;
|
|
var f0=this.Ib+cv*Math.cos(K),i8=this.a1q+cv*Math.sin(K);return new aY(f0,i8)};function C(K,cv,f0,i8){this.e$=new aY(K,cv);
|
|
this.bk=new aY(f0,i8)}C.prototype.Ps=function(K){var cv=K*this.e$.x+(1-K)*this.bk.x,f0=K*this.e$.y+(1-K)*this.bk.y;
|
|
return new aY(cv,f0)};var V=G,d=v,m=O,R=c,g=p,S=l,F=X,r=n,q=a,W=[];N();for(var f=0;f<$.length;f++){s[f]=$[f]}var Z=new C(o*E[2],T*E[3],o/2,T/2),I=E[1],_=[];
|
|
_[0]=function cN(){var K=[80,40,15,60],f0=0,i8=0;m(Z.Ps(1.4),260,K,10);m(Z.Ps(1),100,[240,50,50,30],30);
|
|
d(Z.Ps(1),60,[255,40,0,40]);var cv=[255,255,255,255];S(Z.Ps(1),70,cv,cv[3],58,.5);m(Z.Ps(1),12,cv);cv[3]=40;
|
|
V(Z.Ps(1),150,cv,cv[3],150);for(var f=0;f<40;f++){f0+=Math.random()*25;i8=Math.random()*F(300)+F(100);
|
|
var b5=Z.Ps(1).Ii(f0,i8);P(Z.Ps(1).Ii(f0,i8),[110,110,110,30])}d(Z.Ps(1),130,[255,255,255,8]);var iC=[170,30,23,70];
|
|
R(Z.Ps(1),70,iC,1,3,3);var an=[60,60,130,40];m(Z.Ps(.47),44,an,5);m(Z.Ps(.43),22,an,3);an[3]=16;m(Z.Ps(.53),15,an,2);
|
|
var cO=[138,94,42,100];m(Z.Ps(.2),16,cO,2);var bh=[130,255,170,180];d(Z.Ps(0),4,bh);d(Z.Ps(-.25),5,bh);
|
|
cO=[150,90,0,50];V(Z.Ps(-.45),55,q(cO),-cO[3],40,2);m(Z.Ps(-.42),35,cO,2);m(Z.Ps(-.5),15,cO,2);g(Z.Ps(-1.28),145,11,70);
|
|
var bD=i(0);bD[3]=50;V(Z.Ps(-1.28),149,bD,bD[3],4);bD=i(300);bD[3]=50;V(Z.Ps(-1.28),155-1,q(bD),-bD[3],3);
|
|
var fq=[130,130,10,50];R(Z.Ps(-1),73,fq,3,2);var fO=[40,130,70,40];V(Z.Ps(-1),70,q(fO),-fO[3],35);fO=[40,170,60,50];
|
|
m(Z.Ps(-.7),25,fO,4);var fO=[70,110,50,60];V(Z.Ps(1.3),30,q(fO),-fO[3],11,3);an=[0,50,210,80];d(Z.Ps(-.72),20,an)};
|
|
_[1]=function ce(){d(Z.Ps(1),150,[240,70,70,60]);m(Z.Ps(1),100,[200,60,60,40],30);var K=[255,255,255,255],cv=0,f0=0;
|
|
S(Z.Ps(1),75,K,K[3],63);m(Z.Ps(1),12,K);d(Z.Ps(1),270,[200,200,200,20],10);for(var f=0;f<10;f++){cv+=10+Math.random()*40;
|
|
f0=Math.random()*F(250)+F(80);var i8=Z.Ps(1).Ii(cv,f0);P(i8,[110,110,110,35])}cv=5;f0=100;for(var f=0;
|
|
f<12;f++){cv+=30;h(Z.Ps(1),cv,f0,[90,90,90,40])}var b5=[150,40,23,100];R(Z.Ps(1),70,b5,1,3,3);var iC=[30,100,60,40];
|
|
d(Z.Ps(-.9),180,[255,255,255,20]);m(Z.Ps(-.9),140,iC,15);var an=[170,80,25,15];R(Z.Ps(-.9),120,an,1,4,4);
|
|
var cO=[110,240,190,200];d(Z.Ps(-.6),3,cO);cO[3]=100;d(Z.Ps(-.6),7,cO);var bh=[230,120,40,85];d(Z.Ps(-.73),9,bh);
|
|
var bD=[60,60,190,50];m(Z.Ps(.3),28,bD,6);bD[3]=25;m(Z.Ps(.34),20,bD,3)};_[2]=function gf(){var K=[255,255,255,255],f0=0,i8=0;
|
|
m(Z.Ps(1),13,K);S(Z.Ps(1),150,K,K[3],137);var cv=[120,80,35,20];m(Z.Ps(1.4),260,cv,10);for(var f=0;f<40;
|
|
f++){f0+=5+Math.random()*30;i8=Math.random()*F(300);P(Z.Ps(1).Ii(f0,i8),[110,110,110,20])}var b5=[10,30,255,30];
|
|
m(Z.Ps(1),70,b5,50);var iC=[15,90,170,15];m(Z.Ps(1.5),60,iC);var an=[220,220,20,50];m(Z.Ps(-1.15),8,an,2);
|
|
var K=[255,255,255,40];d(Z.Ps(-1.18),6,K);d(Z.Ps(-1.18),4,K);an=[110,110,10,8];V(Z.Ps(-1.2),32,q(an),-an[3],20,3);
|
|
var cO=[5,0,16,255];for(var f=0;f<4;f++){m(Z.Ps(-1.36),10,cO,3)}var bh=[90,200,150,20],bD=bh.slice(0);
|
|
bD[3]*=2;m(Z.Ps(-1.32),7,bD,3);m(Z.Ps(-1.36),7,bD,3);m(Z.Ps(-1.4),7,bD,3);var K=[230,230,230,100];d(Z.Ps(-1.36),2,K);
|
|
K[3]=3;m(Z.Ps(-.55),10,K);an=[120,100,10,18];m(Z.Ps(-.55),160,an,8);m(Z.Ps(-.55),80,an,4);bh[3]=3;bD[3]=6;
|
|
V(Z.Ps(-.49),13,q(bD),-bD[3],13,2);V(Z.Ps(-.55),13,q(bD),-bD[3],13,2);bh[3]=20;m(Z.Ps(.15),25,bh,3);
|
|
an[3]=100;d(Z.Ps(-.52),3,an);an=[200,200,50,40];m(Z.Ps(.27),1,an,4);var fq=[150,40,23,30];V(Z.Ps(1),80,q(fq),-fq[3],2,1)};
|
|
return _[E[0]]()};L.Ak={};L.Ak.EP=function($){var o=$.length,J=$[0].length,T=new Array(J);for(var f=0;
|
|
f<J;f++)T[f]=new Array(o);for(var f=0;f<J;f++)for(var s=0;s<o;s++)T[f][s]=$[s][f];return T};L.Ak.V4=function($,o){var T=$.length,J=$[0].length,s=new Array(T);
|
|
for(var f=0;f<T;f++)s[f]=new Array(J);for(var f=0;f<T;f++)for(var E=0;E<J;E++)s[f][E]=$[f][E]-o[f][E];
|
|
return s};L.Ak.add=function($,o){var T=$.length,J=$[0].length,s=new Array(T);for(var f=0;f<T;f++)s[f]=new Array(J);
|
|
for(var f=0;f<T;f++)for(var E=0;E<J;E++)s[f][E]=$[f][E]+o[f][E];return s};L.Ak.multiply=function($,o){var T=$.length,s=$[0].length,J=o[0].length;
|
|
if(s!=o.length)throw"e";var E=new Array(T);for(var f=0;f<T;f++)E[f]=new Array(J);if((s&1)!=0)for(var f=0;
|
|
f<T;f++){var e=$[f],n=E[f];for(var A=0;A<J;A++){var u=0;for(var Y=0;Y<s;Y++)u+=e[Y]*o[Y][A];n[A]=u}}else for(var f=0;
|
|
f<T;f++){var e=$[f],n=E[f];for(var A=0;A<J;A++){var u=0;for(var Y=0;Y<s;Y+=2)u+=e[Y]*o[Y][A]+e[Y+1]*o[Y+1][A];
|
|
n[A]=u}}return E};L.Ak.wd=function($,o){var T=$.length,J=$[0].length,s=new Array(T);for(var f=0;f<T;
|
|
f++){var E=0;for(var e=0;e<J;e++)E+=$[f][e]*o[e];s[f]=E}return s};L.Ak.a$=function($,o){var T=[];for(var f=0;
|
|
f<$;f++){T.push([]);for(var s=0;s<o;s++)T[f].push(0)}return T};L.Ak.a1o=function($){for(var f=0;f<$.length;
|
|
f++)console.log(JSON.stringify($[f]))};L.Ak.aaj=function($){var o=[];for(var f=0;f<$.length;f++)o.push($[f].join(","));
|
|
return"["+o.join(";")+"]"};L.Ak._v=function($,o){var T=$.length;for(var s=0;s<T;s++){var E=0,e=Number.NEGATIVE_INFINITY;
|
|
for(var f=s;f<T;f++)if(Math.abs($[f][s])>e){E=f;e=Math.abs($[f][s])}L.Ak.a28($,s,E);for(var f=s+1;f<T;
|
|
f++){if($[s][s]==0)return 1;var n=$[f][s]/$[s][s];for(var A=s;A<T+1;A++)$[f][A]-=$[s][A]*n}}for(var f=T-1;
|
|
f>=0;f--){if($[f][f]==0)return 1;var u=$[f][T]/$[f][f];o[f]=u;for(var A=f-1;A>=0;A--){$[A][T]-=$[A][f]*u;
|
|
$[A][f]=0}}return 0};L.Ak.a28=function($,o,T){var s=$[o];$[o]=$[T];$[T]=s};L.Ak.aaK=function($){var o=$.length,T=L.Ak.a$(o,o);
|
|
for(var f=0;f<o;f++)T[f][f]=$[f];return T};L.Ak.agA=function($){var o=$.length,T=$[0].length,s=new Array(o);
|
|
for(var f=0;f<o;f++){s[f]=0;for(var E=0;E<T;E++)s[f]+=$[f][E];s[f]/=T}return s};L.Ak.hl=function($){var o=0;
|
|
for(var f=0;f<$.length;f++)o+=$[f]*$[f];return Math.sqrt(o)};L.tK={};L.tK._J=function($){var o=~~($+.5);
|
|
return o<0?0:o>255?255:o};L.tK.transform=function($,o,T){var s=L.tK._J,E=$.i.length;for(var f=0;f<E;
|
|
f++){var e=$.i[f],n=$.m[f],A=$.P[f];o.i[f]=s(T[0]*e+T[1]*n+T[2]*A+T[3]*255);o.m[f]=s(T[4]*e+T[5]*n+T[6]*A+T[7]*255);
|
|
o.P[f]=s(T[8]*e+T[9]*n+T[10]*A+T[11]*255)}};L.tK.Vh=function($,o,T){var s=L.tK._J,E=$.length;for(var f=0;
|
|
f<E;f+=4){var e=$[f],n=$[f+1],A=$[f+2];o[f]=s(T[0]*e+T[1]*n+T[2]*A+T[3]*255);o[f+1]=s(T[4]*e+T[5]*n+T[6]*A+T[7]*255);
|
|
o[f+2]=s(T[8]*e+T[9]*n+T[10]*A+T[11]*255)}};L.tK.x0=function($){var o=$[0]+$[1]+$[2],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];
|
|
if(o==1){var s=$.indexOf(1);T[s]=T[s+4]=T[s+8]=1}else{T[0]=$[0];T[5]=$[1];T[10]=$[2]}return T};L.tK.S0=function($,o,T){return[1,0,0,$,0,1,0,o,0,0,1,T,0,0,0,1]};
|
|
L.tK.SE=function($,o,T){return[$,0,0,0,0,o,0,0,0,0,T,0,0,0,0,1]};L.tK.arg=function($){return[$[0],$[1],$[2],$[4],$[5],$[6],$[8],$[9],$[10]]};
|
|
L.tK.v6=function($){return[$[0],$[1],$[2],0,$[3],$[4],$[5],0,$[6],$[7],$[8],0,0,0,0,1]};L.tK.OG=function($,o){return[$[0]*o[0]+$[1]*o[1]+$[2]*o[2]+$[3]*o[3],$[4]*o[0]+$[5]*o[1]+$[6]*o[2]+$[7]*o[3],$[8]*o[0]+$[9]*o[1]+$[10]*o[2]+$[11]*o[3],$[12]*o[0]+$[13]*o[1]+$[14]*o[2]+$[15]*o[3]]};
|
|
L.tK.EP=function($){var o=[];o[0]=$[0];o[1]=$[4];o[2]=$[8];o[3]=$[12];o[4]=$[1];o[5]=$[5];o[6]=$[9];
|
|
o[7]=$[13];o[8]=$[2];o[9]=$[6];o[10]=$[10];o[11]=$[14];o[12]=$[3];o[13]=$[7];o[14]=$[11];o[15]=$[15];
|
|
return o};L.tK.multiply=function($,o){var T=[];T[0]=$[0]*o[0]+$[1]*o[4]+$[2]*o[8]+$[3]*o[12];T[1]=$[0]*o[1]+$[1]*o[5]+$[2]*o[9]+$[3]*o[13];
|
|
T[2]=$[0]*o[2]+$[1]*o[6]+$[2]*o[10]+$[3]*o[14];T[3]=$[0]*o[3]+$[1]*o[7]+$[2]*o[11]+$[3]*o[15];T[4]=$[4]*o[0]+$[5]*o[4]+$[6]*o[8]+$[7]*o[12];
|
|
T[5]=$[4]*o[1]+$[5]*o[5]+$[6]*o[9]+$[7]*o[13];T[6]=$[4]*o[2]+$[5]*o[6]+$[6]*o[10]+$[7]*o[14];T[7]=$[4]*o[3]+$[5]*o[7]+$[6]*o[11]+$[7]*o[15];
|
|
T[8]=$[8]*o[0]+$[9]*o[4]+$[10]*o[8]+$[11]*o[12];T[9]=$[8]*o[1]+$[9]*o[5]+$[10]*o[9]+$[11]*o[13];T[10]=$[8]*o[2]+$[9]*o[6]+$[10]*o[10]+$[11]*o[14];
|
|
T[11]=$[8]*o[3]+$[9]*o[7]+$[10]*o[11]+$[11]*o[15];T[12]=$[12]*o[0]+$[13]*o[4]+$[14]*o[8]+$[15]*o[12];
|
|
T[13]=$[12]*o[1]+$[13]*o[5]+$[14]*o[9]+$[15]*o[13];T[14]=$[12]*o[2]+$[13]*o[6]+$[14]*o[10]+$[15]*o[14];
|
|
T[15]=$[12]*o[3]+$[13]*o[7]+$[14]*o[11]+$[15]*o[15];return T};L.tK.lY=function($){var o=[];o[0]=$[5]*$[10]*$[15]-$[5]*$[14]*$[11]-$[6]*$[9]*$[15]+$[6]*$[13]*$[11]+$[7]*$[9]*$[14]-$[7]*$[13]*$[10];
|
|
o[1]=-$[1]*$[10]*$[15]+$[1]*$[14]*$[11]+$[2]*$[9]*$[15]-$[2]*$[13]*$[11]-$[3]*$[9]*$[14]+$[3]*$[13]*$[10];
|
|
o[2]=$[1]*$[6]*$[15]-$[1]*$[14]*$[7]-$[2]*$[5]*$[15]+$[2]*$[13]*$[7]+$[3]*$[5]*$[14]-$[3]*$[13]*$[6];
|
|
o[3]=-$[1]*$[6]*$[11]+$[1]*$[10]*$[7]+$[2]*$[5]*$[11]-$[2]*$[9]*$[7]-$[3]*$[5]*$[10]+$[3]*$[9]*$[6];
|
|
o[4]=-$[4]*$[10]*$[15]+$[4]*$[14]*$[11]+$[6]*$[8]*$[15]-$[6]*$[12]*$[11]-$[7]*$[8]*$[14]+$[7]*$[12]*$[10];
|
|
o[5]=$[0]*$[10]*$[15]-$[0]*$[14]*$[11]-$[2]*$[8]*$[15]+$[2]*$[12]*$[11]+$[3]*$[8]*$[14]-$[3]*$[12]*$[10];
|
|
o[6]=-$[0]*$[6]*$[15]+$[0]*$[14]*$[7]+$[2]*$[4]*$[15]-$[2]*$[12]*$[7]-$[3]*$[4]*$[14]+$[3]*$[12]*$[6];
|
|
o[7]=$[0]*$[6]*$[11]-$[0]*$[10]*$[7]-$[2]*$[4]*$[11]+$[2]*$[8]*$[7]+$[3]*$[4]*$[10]-$[3]*$[8]*$[6];o[8]=$[4]*$[9]*$[15]-$[4]*$[13]*$[11]-$[5]*$[8]*$[15]+$[5]*$[12]*$[11]+$[7]*$[8]*$[13]-$[7]*$[12]*$[9];
|
|
o[9]=-$[0]*$[9]*$[15]+$[0]*$[13]*$[11]+$[1]*$[8]*$[15]-$[1]*$[12]*$[11]-$[3]*$[8]*$[13]+$[3]*$[12]*$[9];
|
|
o[10]=$[0]*$[5]*$[15]-$[0]*$[13]*$[7]-$[1]*$[4]*$[15]+$[1]*$[12]*$[7]+$[3]*$[4]*$[13]-$[3]*$[12]*$[5];
|
|
o[11]=-$[0]*$[5]*$[11]+$[0]*$[9]*$[7]+$[1]*$[4]*$[11]-$[1]*$[8]*$[7]-$[3]*$[4]*$[9]+$[3]*$[8]*$[5];o[12]=-$[4]*$[9]*$[14]+$[4]*$[13]*$[10]+$[5]*$[8]*$[14]-$[5]*$[12]*$[10]-$[6]*$[8]*$[13]+$[6]*$[12]*$[9];
|
|
o[13]=$[0]*$[9]*$[14]-$[0]*$[13]*$[10]-$[1]*$[8]*$[14]+$[1]*$[12]*$[10]+$[2]*$[8]*$[13]-$[2]*$[12]*$[9];
|
|
o[14]=-$[0]*$[5]*$[14]+$[0]*$[13]*$[6]+$[1]*$[4]*$[14]-$[1]*$[12]*$[6]-$[2]*$[4]*$[13]+$[2]*$[12]*$[5];
|
|
o[15]=$[0]*$[5]*$[10]-$[0]*$[9]*$[6]-$[1]*$[4]*$[10]+$[1]*$[8]*$[6]+$[2]*$[4]*$[9]-$[2]*$[8]*$[5];var T=$[0]*o[0]+$[1]*o[4]+$[2]*o[8]+$[3]*o[12];
|
|
for(var f=0;f<16;f++)o[f]/=T;return o};L.tK.akQ=function($){var o=[],T=$[5]*$[10]*$[15]-$[5]*$[14]*$[11]-$[6]*$[9]*$[15]+$[6]*$[13]*$[11]+$[7]*$[9]*$[14]-$[7]*$[13]*$[10],s=-$[4]*$[10]*$[15]+$[4]*$[14]*$[11]+$[6]*$[8]*$[15]-$[6]*$[12]*$[11]-$[7]*$[8]*$[14]+$[7]*$[12]*$[10],E=$[4]*$[9]*$[15]-$[4]*$[13]*$[11]-$[5]*$[8]*$[15]+$[5]*$[12]*$[11]+$[7]*$[8]*$[13]-$[7]*$[12]*$[9],e=-$[4]*$[9]*$[14]+$[4]*$[13]*$[10]+$[5]*$[8]*$[14]-$[5]*$[12]*$[10]-$[6]*$[8]*$[13]+$[6]*$[12]*$[9];
|
|
return $[0]*T+$[1]*s+$[2]*E+$[3]*e};L.tK.UO=L.tK.v6([3.1338561,-1.6168667,-.4906146,-.9787684,1.9161415,.033454,.0719453,-.2289914,1.4052427]);
|
|
L.tK.aq5=L.tK.v6([1.9624274,-.6105343,-.3413404,-.9787684,1.9161415,.033454,.0286869,-.1406752,1.3487655]);
|
|
L.tK.ake=L.tK.lY(L.tK.UO);L.Lt={};L.Lt.QF=new Uint32Array(1);L.Lt.Zm=function($,o,T,s,E,e){var n=new Uint32Array($),A=0,u=L.Lt.QF;
|
|
if(u.length<o*4)L.Lt.QF=u=new Uint32Array(o*4);var Y=new Float64Array(u.buffer);for(var f=0;f<o;f+=2){var b=E[f],a=E[f+1],w=e[f],X=e[f+1];
|
|
u[A]=a;Y[A+2>>1]=w;u[A+1]=n[b];n[b]=A+1;A+=4;u[A]=b;Y[A+2>>1]=X;u[A+1]=n[a];n[a]=A+1;A+=4}return{au:u,abZ:Y,alN:n}};
|
|
L.Lt._v=function($,o,T,s,E,e,n){var A=1,u=L.Lt.Zm($,o,T,s,E,e),Y=u.au,b=u.abZ,a=u.alN,w=new Uint32Array($),X=new L.Lt.WY($),z=1,c=0;
|
|
X.push(T);X.push(s);var N=new L.Lt.WY($),i=new Uint8Array($),k=new Uint32Array($);i[T]=1;i[s]=2;var Q=new Uint32Array($),O=new Uint32Array($);
|
|
O[T]=O[s]=0;Q[T]=Q[s]=1;while(!0){var B=-1,j=0,m=1e30;while(!X.ua()&&B==-1){var G=X.top(),l=i[G],v=a[G]-1;
|
|
while(v!=-1){var p=Y[v],P=i[p],h=v^l-1<<2;if(b[h+2>>1]!=0){if(P==0){L.Lt.me(G,v,p,i,k,O,Q);X.push(p)}else if(P==l&&Q[p]<=Q[G]&&O[p]>O[G])L.Lt.me(G,v,p,i,k,O,Q);
|
|
else if(P!=l){B=h}}v=Y[v+1]-1}if(B!=-1)break;X.pop()}if(B==-1){break}z++;var C=B;while(C!=-1){w[j]=C;
|
|
j++;C=k[Y[C^4]]-1}var V=j>>1;for(var f=0;f<V;f++){var d=w[f];w[f]=w[j-f-1];w[j-f-1]=d}C=k[Y[B]]-1;while(C!=-1){w[j]=C^4;
|
|
j++;C=k[Y[C^4]]-1}for(var f=0;f<j;f++)m=Math.min(m,b[w[f]+2>>1]);c+=m;if(c>=n)return{TO:null,Uq:c};for(var f=0;
|
|
f<j;f++){var R=w[f],g=R^4,G=Y[g],p=Y[R];b[R+2>>1]-=m;b[g+2>>1]+=m;if(b[R+2>>1]==0&&i[G]==i[p]){if(i[G]==1){k[p]=0;
|
|
N.push(p)}if(i[G]==2){k[G]=0;N.push(G)}}}while(!N.ua()){var G=N.pop(),l=i[G],v=a[G]-1,S=l==1?4:0,F=0,r=0,q=1e9;
|
|
while(v!=-1){var p=Y[v],W=v^4,h=v^S;if(i[p]==l&&b[h+2>>1]>0&&L.Lt.a0m(p,T,s,k,Y,z,Q,O)+1<q){F=p;r=W;
|
|
q=O[p]+1}v=Y[v+1]-1}if(r!=0){L.Lt.me(F,r,G,i,k,O,Q);continue}v=a[G]-1;while(v!=-1){var p=Y[v],h=v^S;
|
|
if(i[p]==l){if(b[h+2>>1]>0){X.push(p)}if(k[p]==v+1){k[p]=0;N.push(p)}}v=Y[v+1]-1}i[G]=0;X.remove(G)}}var Z=[];
|
|
for(var f=0;f<o;f+=2){var G=E[f],p=E[f+1];if(i[G]==1&&i[p]!=1){Z.push(f>>1)}if(i[p]==1&&i[G]!=1){Z.push(o+f>>1)}}return{TO:Z,Uq:c}};
|
|
L.Lt.me=function($,o,T,s,E,e,n){s[T]=s[$];E[T]=o+1;e[T]=e[$]+1;n[T]=n[$]};L.Lt.a0m=function($,o,T,s,E,e,n,A){var u=$,Y=s[$]-1,b=0;
|
|
while(Y!=-1&&n[$]!=e){$=E[Y^4];Y=s[$]-1;b++}if(Y==-1&&$!=o&&$!=T)return 1e9;var a=A[$]+b;b=0;Y=s[u]-1;
|
|
while(u!=$){A[u]=a-b;b++;n[u]=e;u=E[Y^4];Y=s[u]-1}return a};L.Lt.a1J=function($,o,T,s,E,e){var n=L.Lt.Zm($,o,T,s,E,e),A=n.au,u=n.abZ,Y=n.alN,b=0,a=0,w=new Uint32Array($*2),X=new L.Lt.DY($),N=0;
|
|
while(!0){X.reset();X.push(T);for(var f=0;f<$;f++)w[f<<1]=0;while(!X.ua()){var z=X.pop(),i=Y[z]-1;while(i!=-1){N=A[i];
|
|
if(w[N<<1]==0&&u[i+2>>1]>0&&N!=T){w[N<<1]=z+1;w[(N<<1)+1]=i;X.push(N)}i=A[i+1]-1}if(w[s<<1]!=0){break}}if(w[s<<1]==0){break}var k=1e30;
|
|
N=s;while(!0){var Q=w[N<<1]-1;if(Q==-1)break;var O=w[(N<<1)+1];k=Math.min(k,u[O+2>>1]);N=Q}N=s;while(!0){var Q=w[N<<1]-1;
|
|
if(Q==-1)break;var O=w[(N<<1)+1],c=O^4;u[O+2>>1]-=k;u[c+2>>1]+=k;N=Q}b+=k}var B=[];for(var f=0;f<o;f+=2){var Q=E[f],N=E[f+1];
|
|
if((w[Q<<1]!=0||Q==T)&&w[N<<1]==0&&N!=T){B.push(f>>1)}if((w[N<<1]!=0||N==T)&&w[Q<<1]==0&&Q!=T){B.push(o+f>>1)}}return{TO:B,Uq:b}};
|
|
L.Lt.DY=function($){$|=$>>1;$|=$>>2;$|=$>>4;$|=$>>8;$|=$>>16;this.Xj=new Uint32Array($+1);this.ea=$;
|
|
this.G$=0;this.A3=0};L.Lt.DY.prototype={push:function($){var o=this.A3;this.Xj[o]=$;this.A3=o+1&this.ea},pop:function(){var $=this.G$,o=this.Xj[$];
|
|
this.G$=$+1&this.ea;return o},ua:function(){return this.G$==this.A3},reset:function(){this.G$=0;this.A3=0}};
|
|
L.Lt.WY=function($){$|=$>>1;$|=$>>2;$|=$>>4;$|=$>>8;$|=$>>16;this.Xj=new Uint32Array($+1);this.po=new Uint32Array($+1);
|
|
this.ea=$;this.G$=0;this.A3=0};L.Lt.WY.prototype={top:function(){return this.Xj[this.G$]},ahO:function(){return this.Xj[this.A3]},push:function($){if(this.po[$]!=0)return;
|
|
this.po[$]=this.A3+1;var o=this.A3;this.Xj[o]=$;this.A3=o+1&this.ea},pop:function(){var $=this.G$,o=this.Xj[$];
|
|
this.po[o]=0;this.G$=$+1&this.ea;return o},ua:function(){return this.G$==this.A3},remove:function($){var o=this.po[$]-1;
|
|
if(o==-1)return;this.po[$]=0;if(o==this.G$){this.pop();return}var T=this.pop();this.Xj[o]=T;this.po[T]=o+1},S9:function(f){return f+this.ea+1&this.ea}};
|
|
L.Lt.Nk=function($,o,T){var s=L.Lt.Mw($,o,T);if(o<s-1)L.Lt.Nk($,o,s-1);if(s<T)L.Lt.Nk($,s,T)};L.Lt.Mw=function($,o,T){var s=$[o+T>>>1];
|
|
while(o<=T){while($[o]<s)o++;while($[T]>s)T--;if(o<=T){L.Lt.e9($,o,T);o++;T--}}return o};L.Lt.e9=function($,o,T){var s=$[o];
|
|
$[o]=$[T];$[T]=s};L.qy={};L.qy.a8M=function($){for(var f=0;f<$.length;f++)L.qy.qZ($,f)};L.qy.qZ=function($,f){$[f].v.keyShapeInvalidated={t:"bool",v:!0}};
|
|
L.qy.a41=function($){for(var f=0;f<$.length;f++)$[f].v.keyOriginIndex.v=f};L.qy.Ke=function(){return{t:"Objc",v:{classID:"null",keyOriginIndex:{t:"long",v:0},keyShapeInvalidated:{t:"bool",v:!0}}}};
|
|
L.qy.Rg=function($){$=$.v;var o={Rctn:2,Ln:4,Elps:5},T=o[$.classID],s=$.topLeft?L.qy.VZ($):null,E=null,e=0;
|
|
if(T==4){var n=$.Strt.v,A=$.End.v;E=[n.Hrzn.v.val,n.Vrtc.v.val,A.Hrzn.v.val,A.Vrtc.v.val];e=$.Wdth.v.val}if(T==null)return null;
|
|
return L.qy.G8(T,T==4?null:L.qy.S4($),s,E,e)};L.qy.ya=function($,o,T,s,E,e){var n={classID:$,unitValueQuadVersion:{t:"long",v:1}};
|
|
if(o)L.qy.kY(n,["Left","Top","Rght","Btom"],o);if(T)L.qy.kY(n,["topLeft","topRight","bottomRight","bottomLeft"],T);
|
|
if($=="Ln"){n.Strt={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:s[0]}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:s[1]}}}},n.End={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:s[2]}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:s[3]}}}},n.Wdth={t:"UntF",v:{type:"#Pxl",val:E}}}if(e)n.Nm={t:"TEXT",v:e};
|
|
return{t:"Objc",v:n}};L.qy.G8=function($,o,T,s,E){var e=L.qy.Ke(),n=e.v;delete n.keyShapeInvalidated;
|
|
n.keyOriginType={t:"long",v:$};n.keyOriginResolution={t:"doub",v:75};if($==4){n.keyOriginLineStart={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:s[0]},Vrtc:{t:"doub",v:s[1]}}};
|
|
n.keyOriginLineEnd={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"doub",v:s[2]},Vrtc:{t:"doub",v:s[3]}}};o=[Math.min(s[0],s[2]),Math.min(s[1],s[3]),Math.max(s[0],s[2]),Math.max(s[1],s[3])];
|
|
n.keyOriginLineWeight={t:"doub",v:E},n.keyOriginLineArrowSt={t:"bool",v:!1};n.keyOriginLineArrowEnd={t:"bool",v:!1};
|
|
n.keyOriginLineArrWdth={t:"doub",v:0};n.keyOriginLineArrLngth={t:"doub",v:0};n.keyOriginLineArrConc={t:"long",v:0}}var A={classID:"unitRect",unitValueQuadVersion:{t:"long",v:1}};
|
|
n.keyOriginShapeBBox={t:"Objc",v:A};L.qy.EU(n,o);if(T!=null){var u={classID:"radii",unitValueQuadVersion:{t:"long",v:1}};
|
|
n.keyOriginRRectRadii={t:"Objc",v:u};L.qy.hk(n,T)}return e};L.qy.t=function($,o,T,s){var E=L.$.tt(o),e=L.$.Jz(o),n=Math.max(Math.abs(o[0]),Math.abs(o[1])),A=Math.max(Math.abs(o[3]),Math.abs(o[4]));
|
|
for(var f=0;f<$.length;f++){var u=$[f].v,Y=u.keyShapeInvalidated;if(Y&&Y.v||u.keyOriginType==null)continue;
|
|
if(T.length!=0&&T.indexOf(f)==-1)continue;var b=u.keyOriginType.v;if(!E||!e||s&&b==2&&Math.abs(1-n/A)>.01){L.qy.qZ($,f);
|
|
continue}var a=L.qy.pE(u);L.$.t(o,a);L.qy.EU(u,[Math.min(a[0],a[2]),Math.min(a[1],a[3]),Math.max(a[0],a[2]),Math.max(a[1],a[3])]);
|
|
if(b==2){var w=L.qy.xi(u),X=new fY(o[0],o[1],o[3],o[4],0,0);X.Fs();if(X.Ca==0){w.push(w.shift());X.rotate(Math.PI/2);
|
|
X.Fs()}if(X.Ca<0){var N=w[0];w[0]=w[1];w[1]=N;N=w[2];w[2]=w[3];w[3]=N}if(X.Um<0){var N=w[0];w[0]=w[3];
|
|
w[3]=N;N=w[1];w[1]=w[2];w[2]=N}if(s)for(var z=0;z<4;z++)w[z]=w[z]*n;L.qy.hk(u,w)}if(b==4){u.keyOriginLineWeight.v*=n;
|
|
var i=L.qy.L2(u);L.$.t(o,i);L.qy.a99(u,i)}}};L.qy.Iy=function($,o){var T=o.g;for(var f=0;f<$.length;
|
|
f++){var s=$[f].v,E=s.keyShapeInvalidated,a;if(E&&E.v||s.keyOriginType==null)continue;var e=s.keyOriginType.v,n=L.qy.pE(s),A=n[0],u=n[1],Y=n[2],b=n[3];
|
|
if(e==1)a=L.A.XG.Rect(A,u,Y-A,b-u,0);else if(e==2){var w=L.qy.xi(s);a=L.A.XG.Rect(A,u,Y-A,b-u,w)}else if(e==4){var X=L.qy.L2(s);
|
|
a=L.A.XG.VG(X[0],X[1],X[2],X[3],s.keyOriginLineWeight.v)}else if(e==5)a=L.A.XG.Xi(A,u,Y-A,b-u);var N=L.A.kE(T,f),z=L.A.Mx(T,f);
|
|
a[2].m6=T[N].m6;var i=T;T=T.slice(0,N);for(var k=2;k<a.length;k++)T.push(a[k]);for(var k=N+z;k<i.length;
|
|
k++)T.push(i[k])}o.g=T;o.Or=!0};L.qy.TU=function($){var o=1e9,T=-o,s=1e9,E=-s,e=null,n=$.Vp(),A=n[0],u=n[1];
|
|
for(var Y=0;Y<u.length;Y++){var b=A[u[Y]],a=b.add.vogk;if(a==null)continue;var w=b.add.vmsk.D;for(var X=0;
|
|
X<a.length;X++){var N=a[X].v,z=N.keyShapeInvalidated;if(z&&z.v||N.keyOriginType==null)continue;if(u.length==1&&w.length!=0&&w.indexOf(X)==-1)continue;
|
|
var i=N.keyOriginType.v;if(i!=4){var k=L.qy.pE(N);o=Math.min(o,k[0]);s=Math.min(s,k[1]);T=Math.max(T,k[2]);
|
|
E=Math.max(E,k[3])}if(i==2&&e==null){e=L.qy.xi(N)}}}return[o<T?[o,s,T,E]:null,e]};L.qy.a7r=function($,o,T){var s=L.qy.TU($)[0],E;
|
|
if(s){var e=new fY;e.translate(-s[0],-s[1]);e.scale(1/(s[2]-s[0]),1/(s[3]-s[1]));e.scale(o[2]-o[0],o[3]-o[1]);
|
|
e.translate(o[0],o[1]);E=L.$.KQ(e)}var n=$.Vp(),A=n[0],u=n[1];for(var Y=0;Y<u.length;Y++){var b=A[u[Y]],a=b.add.vogk;
|
|
if(a==null)continue;var w=b.add.vmsk.D;for(var X=0;X<a.length;X++){var N=a[X].v,z=N.keyShapeInvalidated;
|
|
if(z&&z.v||N.keyOriginType==null)continue;if(u.length==1&&w.length!=0&&w.indexOf(X)==-1)continue;var i=N.keyOriginType.v;
|
|
if(i!=4&&o[0]!=null){var o=L.qy.pE(N);L.$.t(E,o);L.qy.EU(N,o)}if(i==2&&T!=null){L.qy.hk(N,T)}}}};L.qy.pE=function($){return L.qy.S4($.keyOriginShapeBBox.v)};
|
|
L.qy.S4=function($){var o=$.Left.v.val,T=$.Rght.v.val,s=$.Top.v.val,E=$.Btom.v.val;return[o,s,T,E]};
|
|
L.qy.EU=function($,o){L.qy.kY($.keyOriginShapeBBox.v,["Left","Top","Rght","Btom"],o)};L.qy.xi=function($){return L.qy.VZ($.keyOriginRRectRadii.v)};
|
|
L.qy.VZ=function($){var o=[],T=["topLeft","topRight","bottomRight","bottomLeft"];for(var s=0;s<4;s++)o.push($[T[s]].v.val);
|
|
return o};L.qy.hk=function($,o){L.qy.kY($.keyOriginRRectRadii.v,["topLeft","topRight","bottomRight","bottomLeft"],o)};
|
|
L.qy.kY=function($,o,T){for(var f=0;f<4;f++)if(T[f]!=null)$[o[f]]={t:"UntF",v:{type:"#Pxl",val:T[f]}}};
|
|
L.qy.L2=function($){var o=$.keyOriginLineStart.v,T=$.keyOriginLineEnd.v;return[o.Hrzn.v,o.Vrtc.v,T.Hrzn.v,T.Vrtc.v]};
|
|
L.qy.a99=function($,o){var T=$.keyOriginLineStart.v,s=$.keyOriginLineEnd.v;T.Hrzn.v=o[0];T.Vrtc.v=o[1];
|
|
s.Hrzn.v=o[2];s.Vrtc.v=o[3]};L.M={};L.M.clone=function($){return{o:$.o.slice(0),I:$.I.slice(0)}};L.M.Lb=function($){if($.length<6)return!0;
|
|
var o=$.length-4;for(var f=0;f<o;f+=2)if(!L.M.kF($[f],$[f+1],$[f+2],$[f+3],$[f+4],$[f+5]))return!1;if(!L.M.kF($[o],$[o+1],$[o+2],$[o+3],$[0],$[1]))return!1;
|
|
if(!L.M.kF($[o+2],$[o+3],$[0],$[1],$[2],$[3]))return!1;return!0};L.M.kF=function($,o,T,s,E,e){return(o-s)*(E-T)+(T-$)*(e-s)>=0};
|
|
L.M.ie=function($){var o={},T=null,s=0,E={M:2,L:2,Q:4,C:6};for(var f=0;f<$.o.length;f++){var e=$.o[f];
|
|
if(e.charAt(0)=="#"){if(o[e]==null)o[e]={I:[],o:[]};T=o[e]}else if(e!="X"){T.o.push(e);var n=E[e];if(n==null)n=0;
|
|
for(var A=0;A<n;A++)T.I.push($.I[s+A]);s+=n}}return o};L.M.Hz=function($,o,T){$=L.M.X2($);var s=$.I,E=$.o,e=0,n=[],A=null;
|
|
for(var f=0;f<E.length;f++){var u=E[f];if(u=="M"){A={arq:e,YG:0,Sn:!1};n.push(A);e+=2}if(u=="C"){A.YG++;
|
|
e+=6}if(u=="Z"){A.Sn=!0}}var Y=[];for(var f=0;f<n.length;f++)if(n[f].YG!=0)Y.push(n[f]);n=Y;for(var f=0;
|
|
f<n.length;f++){var b=n[f],a=b.arq,w=a+2+b.YG*6,N=0;b.UK=L.M.L3(s,a,w);var X=s[a]==s[w-2]&&s[a+1]==s[w-1];
|
|
for(var z=0;z<b.YG;z++){var i=a+z*6,k=i+6;N+=(s[k]-s[i])*(s[k+1]+s[i+1])}if(b.YG==2){var Q=function(I,_,cN){var gf=1-cN;
|
|
return gf*gf*gf*I[_]+3*gf*gf*cN*I[_+2]+3*gf*cN*cN*I[_+4]+cN*cN*cN*I[_+6]},O=s[a],c=s[a+1],B=s[a+6],G=s[a+7],l=s[a+6],v=s[a+7],p=Q(s,a,.5),P=Q(s,a+1,.5),h=Q(s,a+6,.5),j=Q(s,a+7,.5);
|
|
N=(p-O)*(P-c)+(B-p)*(G-P)+(h-B)*(j-G)+(l-h)*(v-j)}if(!X)N+=(s[a]-s[w-2])*(s[a+1]+s[w-1]);b.l$=N<=0}for(var f=0;
|
|
f<n.length-1;f++)for(var i=f+1;i<n.length;i++){var C=n[f],V=n[i];if(V.UK.Yg(C.UK)){n[f]=V;n[i]=C}}var d=n.length==0?!0:n[0].l$,m=[{type:6},{type:8,all:0}];
|
|
for(var f=0;f<n.length;f++){var b=n[f],a=b.arq,w=a+2+b.YG*6,X=s[a]==s[w-2]&&s[a+1]==s[w-1],R=b.Sn||X?0:3,g=b.l$==d&&!o?1:0;
|
|
if(!o&&f!=0){if(n[f-1].UK.Yg(b.UK)&&n[f-1].l$!=b.l$)g=0;for(var i=0;i<n.length;i++)if(i!=f&&n[i].UK.Yg(b.UK))g=0}m.push({type:R,length:b.YG+(X?0:1),m6:T?1:g,aq:2});
|
|
for(var i=0;i<b.YG;i++){var e=a+i*6,S=new aY(s[e],s[e+1]),F=new aY(s[e+2],s[e+3]),r;if(i==0){if(X)r=new aY(s[w-4],s[w-3]);
|
|
else r=S.clone()}else r=new aY(s[e-2],s[e-1]);m.push({type:R+2,Wq:r,W:S,JL:F})}if(!X){var q=new aY(s[w-2],s[w-1]);
|
|
m.push({type:R+2,Wq:new aY(s[w-4],s[w-3]),W:q,JL:q.clone()})}}for(var i=0;i<m.length;i++){var W=m[i];
|
|
if(W.type>5||W.type==0||W.type==3)continue;var Z=W.Wq.R1(W.W)||W.JL.R1(W.JL);if(!Z){var C=W.Wq.x*(W.W.y-W.JL.y)+W.W.x*(W.JL.y-W.Wq.y)+W.JL.x*(W.Wq.y-W.W.y);
|
|
if(Math.abs(C)<1e-6)Z=!0}if(Z)W.type--}return m};L.M.Ld=function(){function $(s,E,e,n){if(!n&&s.JL.R1(s.W)&&E.Wq.R1(E.W)){e.I.push(E.W.x,E.W.y);
|
|
e.o.push("L")}else{e.I.push(s.JL.x,s.JL.y,E.Wq.x,E.Wq.y,E.W.x,E.W.y);e.o.push("C")}}function o(s,E,f,e,n,A){var u=E[f];
|
|
s.I.push(u.W.x,u.W.y);s.o.push("M");for(var Y=f;Y<f+e-1;Y++)$(E[Y],E[Y+1],s,A);if(!n)$(E[Y],E[f],s,A)}function T(s,E){if(E==null)E=!1;
|
|
var e={I:[],o:[]};for(var f=0;f<s.length;f++){if(s[f].type>5)continue;var n=s[f].length;if(n==0)continue;
|
|
if(f==s.length-1)break;var A=s[f].type==3;o(e,s,f+1,n,A,E);if(!A)e.o.push("Z");f+=n}return e}return T}();
|
|
L.M.aeT=function($){var o=$.I,T=[],s,E=0;for(var f=0;f<$.o.length;f++){var e=$.o[f];if(e=="C"){s.push(o[E++],o[E++],o[E++],o[E++],o[E++],o[E++])}else if(e=="Z"){}else{s=[];
|
|
if(e!="M"){s.push(e);f++}s.push(o[E++],o[E++]);T.push(s)}}return T};L.M.KY=function($,o,T,s){if(s==null)s=1e9;
|
|
var E=1e9,e=0;for(var f=0;f<$.length;f+=2){var n=o-$[f],A=T-$[f+1],u=n*n+A*A;if(u<E){E=u;e=f>>>1}}return E<s*s?e:-1};
|
|
L.M.YY=function($,o,T,s){for(var f=0;f<$.length;f+=2){var E=$[f],e=$[f+1],n=o[f],A=o[f+1];T[f]=E+(n-E)*s;
|
|
T[f+1]=e+(A-e)*s}};L.M.t=function($,o,T){for(var f=0;f<$.length;f+=2){var s=$[f],E=$[f+1];T[f]=s*o.Ca+E*o.Z9+o.Ry;
|
|
T[f+1]=s*o.P+E*o.Um+o.Es}};L.M.L3=function($,o,T){if(o==null)o=0;if(T==null)T=$.length;var s=99999999999,E=-s,e=99999999999,n=-e;
|
|
for(var f=o;f<T;f+=2){var A=$[f],u=$[f+1];s=Math.min(s,A);e=Math.min(e,u);E=Math.max(E,A);n=Math.max(n,u)}return new df(s,e,E-s,n-e)};
|
|
L.M.pP=function($,o){var T=Math.max(o.x,Math.min(o.x+o.d,$.x)),s=Math.max(o.y,Math.min(o.y+o.w,$.y)),E=$.x-T,e=$.y-s;
|
|
return Math.sqrt(E*E+e*e)};L.M.lZ=function($){if($.p4())return new df(Math.floor($.x),Math.floor($.y),Math.ceil($.d),Math.ceil($.w));
|
|
var o=Math.floor($.x),T=Math.ceil($.x+$.d),s=Math.floor($.y),E=Math.ceil($.y+$.w);return new df(o,s,T-o,E-s)};
|
|
L.M.$l=function($){return L.M.lZ(L.M.L3($))};L.M.Uo=function($){var o=$.x,T=$.y,s=$.x+$.d,E=$.y+$.w;
|
|
return{o:["M","L","L","L","Z"],I:[o,T,s,T,s,E,o,E]}};L.M.concat=function($,o,T){if(T==null)T=new fY;
|
|
for(var f=0;f<o.I.length;f+=2){var s=o.I[f],E=o.I[f+1];$.I.push(s*T.Ca+E*T.Z9+T.Ry);$.I.push(s*T.P+E*T.Um+T.Es)}for(var f=0;
|
|
f<o.o.length;f++)$.o.push(o.o[f])};L.M.X2=function($){var o=$.I,T=[],s=[],E=0,e=0,n=0,A=0,u=0,Y=0,b=0,a=0,w=0;
|
|
for(var f=0;f<$.o.length;f++){var X=$.o[f];if(X=="M"){e=o[E];n=o[E+1];E+=2;s.push(X);T.push(e,n)}else if(X=="C"){A=o[E];
|
|
u=o[E+1];Y=o[E+2];b=o[E+3];a=o[E+4];w=o[E+5];E+=6;s.push(X);T.push(A,u,Y,b,a,w);e=a;n=w}else if(X=="Q"){A=o[E];
|
|
u=o[E+1];Y=o[E+2];b=o[E+3];E+=4;var N=A-e,z=u-n,i=Y-A,k=b-u;s.push("C");T.push(e+2/3*N,n+2/3*z,A+1/3*i,u+1/3*k,Y,b);
|
|
e=Y;n=b}else if(X=="L"){A=o[E];u=o[E+1];E+=2;var Q=A-e,O=u-n;s.push("C");T.push(e,n,A,u,A,u);e=A;n=u}else s.push(X)}return{o:s,I:T}};
|
|
L.M.aaC=function($){var o=$.I,T=[],s=[],E=0;for(var f=0;f<$.o.length;f++){var e=$.o[f];if(e=="Q"){var n=o[E-2],A=o[E-1],u=o[E],Y=o[E+1],b=o[E+2],a=o[E+3];
|
|
E+=4;var w=u-n,X=Y-A,N=b-u,z=a-Y;s.push("C");T.push(n+2/3*w,A+2/3*X,u+1/3*N,Y+1/3*z,b,a)}else{var i=0;
|
|
if(e=="M"||e=="L")i=2;else if(e=="C")i=6;for(var k=0;k<i;k++)T.push(o[E+k]);E+=i;s.push(e)}}return{o:s,I:T}};
|
|
L.M.g0=function($,o){var T=$.I,s=[],E=[],e=0,n=0,A=0,u=0,Y=0,b=0,a=0,w=0,X=0;for(var f=0;f<$.o.length;
|
|
f++){var N=$.o[f];if(N=="M"){n=T[e];A=T[e+1];e+=2;E.push(N);s.push(n,A)}else if(N=="C"){u=T[e];Y=T[e+1];
|
|
b=T[e+2];a=T[e+3];w=T[e+4];X=T[e+5];e+=6;L.M.M_(n,A,u,Y,b,a,w,X,o,E,s,0);n=w;A=X}else E.push(N)}return{o:E,I:s}};
|
|
L.M.M_=function($,o,T,s,E,e,n,A,u,Y,b,a){var w=Math.sqrt((n-$)*(n-$)+(A-o)*(A-o)),X=Math.sqrt((n-E)*(n-E)+(A-e)*(A-e))+Math.sqrt((E-T)*(E-T)+(e-s)*(e-s))+Math.sqrt((T-$)*(T-$)+(s-o)*(s-o)),N=(w+X)/2;
|
|
if(N<=u){Y.push("C");b.push(T,s,E,e,n,A)}else{var z=0,i=0,k=0,Q=0,O=0,c=0,B=0,G=0,l=0,v=0,p=0,P=0,h=0;
|
|
i=($+T)/2;k=(o+s)/2;Q=(T+E)/2;O=(s+e)/2;c=(E+n)/2;B=(e+A)/2;G=(i+Q)/2;l=(k+O)/2;v=(Q+c)/2;p=(O+B)/2;
|
|
P=(G+v)/2;h=(l+p)/2;L.M.M_($,o,i,k,G,l,P,h,u,Y,b,a+1);L.M.M_(P,h,v,p,c,B,n,A,u,Y,b,a+1)}};L.M.Ew=function($,o,T,s,E){var e=Date.now(),n=L.M.aaY($,o,T);
|
|
if(E){console.log("trace polygons",Date.now()-e);e=Date.now()}var A=[];for(var f=0;f<n.length;f++){var u=n[f],Y=u[0],b=["M"],a=$[Y[1]*o+Y[0]];
|
|
if(Y.length>8)Y=L.M.ys(Y,s,u[1]);if(Y.length<=4)continue;for(var w=2;w<Y.length;w+=2)b.push("L");b.push("Z");
|
|
A.push({path:{I:Y,o:b},color:a,parent:-1,UK:L.M.L3(Y)})}if(E){console.log("simplify polygons",Date.now()-e);
|
|
e=Date.now()}for(var f=1;f<A.length;f++){var X=A[f].UK;for(var w=f-1;w>=0;w--)if(A[w].UK.Yg(X)){A[f].parent=w;
|
|
break}}if(E){console.log("checking parents",Date.now()-e);e=Date.now()}return A};L.M.aaY=function($,o,T){var s=o*T,E=new Uint16Array(o*T),n=0;
|
|
for(var f=0;f<s;f++)E[f]=$[f];var e=new Uint8Array(o*T);e[1*o+1]=e[(T-1)*o+1]=e[1*o+o-1]=e[(T-1)*o+o-1]=1;
|
|
for(var A=1;A<T;A++)for(var u=1;u<o;u++){var f=A*o+u,Y=E[f-o-1],b=E[f-o],a=E[f-1],w=E[f],X=Y==w&&b==a&&Y!=b,N=0;
|
|
if(w<a){n=w;w=a;a=n}if(a<b){n=a;a=b;b=n}if(b<Y){n=b;b=Y;Y=n}if(w<a){n=w;w=a;a=n}if(a<b){n=a;a=b;b=n}if(w<a){n=w;
|
|
w=a;a=n}if(Y!=b)N++;if(b!=a)N++;if(a!=w)N++;if(w!=Y)N++;if(N>=3||X)e[f]=1}var z=[];for(var A=1;A<T;A++)for(var u=1;
|
|
u<o;u++){var f=A*o+u;if(E[f]!=E[f-1]){var i=L.M.a9f(E,o,T,u,A),k=[];for(var Q=0;Q<i.length;Q+=2)if(e[i[Q+1]*o+i[Q]]==1)k.push(Q>>>1);
|
|
z.push([i,k]);L.M.R3(E,o,T,u,A)}}return z};L.M.R3=function($,o,T,s,E){var e=[E*o+s],n=$[E*o+s];$[E*o+s]=65535;
|
|
while(e.length!=0){var f=e.pop();$[f]=0;if($[f+o]==n){e.push(f+o);$[f+o]=65535}if($[f-o]==n){e.push(f-o);
|
|
$[f-o]=65535}if($[f-1]==n){e.push(f-1);$[f-1]=65535}if($[f+1]==n){e.push(f+1);$[f+1]=65535}}};L.M.a9f=function($,o,T,s,E){var e=[0,-1,1,0,0,1,-1,0],b=1;
|
|
function n(w,X,b){var f=Y*o+u,N=0;if(b==0)N=f-o;else if(b==1)N=f;else if(b==2)N=f-1;else if(b==3)N=f-o-1;
|
|
return $[N]}var A=[],u=s,Y=E,a=n(u,Y,b);do{A.push(u,Y);u+=e[b*2];Y+=e[b*2+1];if(n(u,Y,b)!=a)b=b+1&3;
|
|
else if(n(u,Y,b+3&3)!=a)b=b;else if(n(u,Y,b+2&3)!=a)b=b+3&3}while(u!=s||Y!=E);return A};L.M.ys=function($,o,T){var s=$.length-2;
|
|
if(T&&T.length!=0){var E=T[0]*2,e=T[T.length-1]*2,n=E==0?s:E-2,A=$.slice(e);for(var f=0;f<E;f++)A.push($[f]);
|
|
if(E==e)A.push(.9*$[E]+.1*$[n],.9*$[E+1]+.1*$[n+1]);else A.push($[E],$[E+1]);A=L.M.cc(A,o);A.pop();A.pop();
|
|
for(var f=0;f<T.length-1;f++){var u=$.slice(T[f]*2,T[f+1]*2+2);u=L.M.cc(u,o);for(var Y=0;Y<u.length-2;
|
|
Y++)A.push(u[Y])}return A}var b=$.slice(0);b.push(.9*$[0]+.1*$[s],.9*$[1]+.1*$[s+1]);b=L.M.cc(b,o);b.pop();
|
|
b.pop();return b};L.M.cc=function($,o){var T=$.length-2,s=$[0],E=$[1],e=$[T],n=$[T+1],A=e-s,u=n-E,Y=1/Math.sqrt(A*A+u*u),b=e*E-n*s,a=-1,w=-1,X=0;
|
|
for(var f=2;f<T;f+=2){var N=$[f],z=$[f+1],i=z*z*1e6+N*N,k=Math.abs(u*N-A*z+b)*Y;if(k>w||k==w&&i>X){w=k;
|
|
a=f;X=i}}if(w<o)return[s,E,e,n];var Q=L.M.cc($.slice(0,a+2),o),O=L.M.cc($.slice(a),o);for(var f=2;f<O.length;
|
|
f++)Q.push(O[f]);return Q};L.M.afH=function(){var $=function(s,E,e,n,A,u){return(E-n)*(A-e)+(e-s)*(u-n)>=0},o=function(s,E,e,n,A,u,Y,b){var a=Y-e,w=b-n,X=A-e,N=u-n,z=s-e,i=E-n,k=a*a+w*w,Q=a*X+w*N,O=a*z+w*i,c=X*X+N*N,B=X*z+N*i,G=1/(k*c-Q*Q),l=(c*O-Q*B)*G,v=(k*B-Q*O)*G;
|
|
return l>=0&&v>=0&&l+v<1},T=function(s){var J=s.length>>>1,f=0;if(J<3)return[];var E=[],e=[];for(var f=0;
|
|
f<J;f++)e.push(f);var n=J;while(n>3){var A=e[(f+0)%n],u=e[(f+1)%n],Y=e[(f+2)%n],b=s[2*A],a=s[2*A+1],w=s[2*u],X=s[2*u+1],N=s[2*Y],z=s[2*Y+1],i=!1;
|
|
if($(b,a,w,X,N,z)){i=!0;for(var k=0;k<n;k++){var Q=e[k];if(Q==A||Q==u||Q==Y)continue;if(o(s[2*Q],s[2*Q+1],b,a,w,X,N,z)){i=!1;
|
|
break}}}if(i){E.push(A,u,Y);e.splice((f+1)%n,1);n--;f=0}else if(f++>3*n)break}E.push(e[0],e[1],e[2]);
|
|
return E};return T}();L.M.a9X=function($,o){var T={},s={o:[],I:[]};for(var f=0;f<o.length;f+=3){var E=o[f]*2,e=o[f+1]*2,n=o[f+2]*2;
|
|
L.M.P3($,E,e,s,T);L.M.P3($,E,n,s,T);L.M.P3($,e,n,s,T)}return s};L.M.P3=function($,o,T,s,E){if(o>T){var e=T;
|
|
T=o;o=e}if(E[o+","+T])return;E[o+","+T]=!0;s.o.push("M","L");s.I.push($[o],$[o+1],$[T],$[T+1])};L.M.SG=function($,o){var T=[],s=$.length;
|
|
for(var f=0;f<s;f+=2){var E=$[f],e=$[f+1],n=$[(f+2)%s],A=$[(f+3)%s];if(A<e){var u=e;e=A;A=u}if(e<o&&o<A){var Y=(o-e)/(A-e);
|
|
T.push(E+Y*(n-E))}}T.sort(function(b,a){return b-a});return T};L.M.a3Q=function($,o){var T=o.slice(0),J=$.length/2,s=[],E=[];
|
|
for(var f=0;f<J;f++){var e=(f+1)%J,n=$[2*f]-$[2*e],A=$[2*f+1]-$[2*e+1];E[f]=Math.sqrt(n*n+A*A)}for(var f=0;
|
|
f<J;f++){var u=(f-1+J)%J,e=(f+1)%J,Y=o[f],b=Y+o[u],a=Y+o[e];if(b!=0)T[f]=Math.min(T[f],E[u]*Y/b);if(a!=0)T[f]=Math.min(T[f],E[f]*Y/a)}for(var f=0;
|
|
f<J;f++){var e=(f+1)%J,w=(f+2)%J,X=T[f],N=T[e],z=$[2*f],i=$[2*f+1],k=$[2*e],Q=$[2*e+1],O=$[2*w],c=$[2*w+1],B=E[f],G=E[e],l=L.M.adM(z,i,k,Q,O,c,X,N,B,G);
|
|
s.push(l[0],l[1],l[0],l[1],l[2],l[3]);s.push(l[2],l[3],l[4],l[5],l[6],l[7])}return s};L.M.adM=function($,o,T,s,E,e,n,A,u,Y){if(u==null)u=Math.sqrt((T-$)*(T-$)+(s-o)*(s-o));
|
|
if(Y==null)Y=Math.sqrt((E-T)*(E-T)+(e-s)*(e-s));var b=.553,a=0,w=0,X=0,N=0;if(u!=0){a=(T-$)/u;w=(s-o)/u}if(Y!=0){X=(E-T)/Y;
|
|
N=(e-s)/Y}var z=$+n*a,i=o+n*w,k=T-A*a,Q=s-A*w;return[z,i,k,Q,T-A*a*(1-b),s-A*w*(1-b),T+A*X*(1-b),s+A*N*(1-b),T+A*X,s+A*N]};
|
|
L.M.OT=function($,o,T,s,E,e,n){var A=$-T,u=o-s,Y=E-T,b=e-s,a=1/Math.sqrt(A*A+u*u),w=1/Math.sqrt(Y*Y+b*b),X=A*a,N=u*a,z=Y*w,i=b*w,k=N*n,Q=-X*n,O=-i*n,c=z*n,B=L.M.P7(k,Q,X,N,O,c,z,i),G=k+X*B,l=Q+N*B,B=L.M.P7(0,0,X,N,G,l,-N,X),v=X*B,p=N*B;
|
|
return[Math.sqrt(v*v+p*p),X,N,z,i]};L.M.kM=function($,o,T,s,E,e,n){var A=L.M.OT($,o,T,s,E,e,n),u=A[0],Y=A[1],b=A[2],a=A[3],w=A[4],X=Math.atan2(Y*w-b*a,Y*a+b*w);
|
|
if(X<0){X=X*-1}var N=Math.PI-X,z=4/3*Math.tan(N/4),i=T+u*Y,k=s+u*b,Q=T+u*a,O=s+u*w,c=i+z*n*-Y,B=k+z*n*-b,G=Q+z*n*-a,l=O+z*n*-w;
|
|
return[0,0,i,k,c,B,G,l,Q,O]};L.M.P7=function($,o,T,s,E,e,n,A){var u=n*(o-e)-A*($-E),Y=A*T-n*s;if(Y==0)return 0;
|
|
return u/Y};L.M.kM(0,50,0,0,30,30,10);L.Eh=function(){};L.Eh.gY=function($,o,T,s,E){var e=T.d,n=T.w,A=e*n,u=new Int32Array(A),J=0;
|
|
for(var f=0;f<A;f++)if(o[f]!=0){u[f]=J;J++}else if($[(f<<2)+3]<200){u[f]=-2}else u[f]=-1;if(J==0)return;
|
|
var Y=new L.aA(J,J),b=new Array(3*J),a=new Array(3*J);for(var f=0;f<a.length;f++)a[f]=b[f]=0;var w=1/255,X=[-e,-1,1,e],N=[],z=[];
|
|
for(var i=0;i<n;i++)for(var k=0;k<e;k++){var Q=i*e+k,O=Q<<2,f=u[Q],c=f*3,B=0,G=0,l=0;if(f==-1||f==-2)continue;
|
|
for(var v=0;v<4;v++){if(v==2){G=l;N[l]=0;z[l]=f;l++}var p=Q+X[v],P=p<<2,h=u[p];if(v==0&&i==0||v==1&&k==0||v==2&&k==e-1||v==3&&i==n-1||h==-2)continue;
|
|
B++;if(h==-1){b[c+0]+=$[P+0];b[c+1]+=$[P+1];b[c+2]+=$[P+2]}else{N[l]=-1;z[l]=h;l++;if(o[Q]==o[p]){b[c+0]+=$[O+0]-$[P+0];
|
|
b[c+1]+=$[O+1]-$[P+1];b[c+2]+=$[O+2]-$[P+2]}}}N[G]=B;Y.OB(N,z,l)}for(var f=0;f<A;f++)if(u[f]!=-1){var j=f<<2,C=u[f],V=C*3;
|
|
a[V]=$[j+0];a[V+1]=$[j+1];a[V+2]=$[j+2]}var d=Date.now();Y.ahM(a,b,s,E);console.log(Date.now()-d);for(var f=0;
|
|
f<A;f++){var C=u[f],m=C*3,j=f<<2;if(C==-1||$[j+3]!=255)continue;$[j+0]=~~(.5+Math.max(0,Math.min(255,a[m+0])));
|
|
$[j+1]=~~(.5+Math.max(0,Math.min(255,a[m+1])));$[j+2]=~~(.5+Math.max(0,Math.min(255,a[m+2])))}};L.rect={};
|
|
L.rect.sl=function($,o){var T=[$],s=[];for(var f=0;f<o.length;f++){var E=o[f],e=!1;for(var n=f+1;n<o.length;
|
|
n++){var A=o[n];if(A[0]<=E[0]&&A[1]<=E[1]&&E[2]<=A[2]&&E[3]<=A[3]){e=!0;break}}if(!e)s.push(E)}o=s;for(var f=0;
|
|
f<o.length;f++){var E=o[f];for(var n=0;n<T.length;n++){var A=T[n],u=Math.max(E[0],A[0]),Y=Math.min(E[2],A[2]),b=Math.max(E[1],A[1]),a=Math.min(E[3],A[3]);
|
|
if(u<Y&&b<a){var w=[];if(A[1]<E[1]){var X=A.slice(0);X[3]=E[1];w.push(X)}if(A[0]<E[0]){var N=A.slice(0);
|
|
N[1]=b;N[2]=E[0];w.push(N)}if(E[2]<A[2]){var z=A.slice(0);z[1]=b;z[0]=E[2];w.push(z)}if(E[3]<A[3]){var i=[u,a,Y,A[3]];
|
|
w.push(i)}if(w.length!=0){T[n]=w[0];for(var k=1;k<w.length;k++)T.push(w[k])}}}T.push(E);T=L.rect.a1Q(T)}T.sort(function(E,A){return E[1]!=A[1]?E[1]-A[1]:E[0]-A[0]});
|
|
for(var f=1;f<T.length;f++){var E=T[f-1],A=T[f];if(E[0]==A[0]&&E[1]==A[1]&&E[2]==A[2]&&E[3]==A[3]){T.splice(E[4]==null?f-1:f,1);
|
|
f--}}return T};L.rect.a1Q=function($){$=$.slice(0);for(var f=0;f<$.length;f++){var o=$[f],T=null;if(o[4]!=null)continue;
|
|
for(var s=0;s<$.length;s++){var E=$[s];if(f==s||E[4]!=null)continue;var e=o[0]==E[0],n=o[1]==E[1],A=o[2]==E[2],u=o[3]==E[3];
|
|
if(n&&u&&(o[2]==E[0]||o[0]==E[2])){T=[Math.min(o[0],E[0]),o[1],Math.max(o[2],E[2]),o[3]]}if(e&&A&&(o[3]==E[1]||o[1]==E[3])){T=[o[0],Math.min(o[1],E[1]),o[2],Math.max(o[3],E[3])]}if(T){$[f]=T;
|
|
$.splice(s,1);break}}if(T){f--}}return $};L.rect.UC=function($){var o=new df;for(var f=0;f<$.length;
|
|
f++)o=o.BZ($[f]);return o};L.rect.alc=function($,o){var T=L.rect.UC,s=new UnionFind($.length),G=1e3,l=1e3;
|
|
for(var f=0;f<$.length;f++)for(var E=f+1;E<$.length;E++){if(!o)continue;var e=$[f],n=$[E],a=1e9,w=1e9;
|
|
if(e.Ha(n)){s.link(f,E);continue}var A=e.x+e.d,u=e.y+e.w,Y=n.x+n.d,b=n.y+n.w;if((A<n.x||Y<e.x)&&(u<n.y||b<e.y))continue;
|
|
if(!(u<n.y||b<e.y))a=Math.min(Math.abs(A-n.x),Math.abs(e.x-Y));if(!(A<n.x||Y<e.x))w=Math.min(Math.abs(u-n.y),Math.abs(e.y-b));
|
|
var X=Math.min(a,w),N=Math.min(e.d,e.w,n.d,n.w);if(X<.3*N)s.link(f,E)}var z=[],i={};for(var f=0;f<$.length;
|
|
f++){var k=s.find(f),Q=$[f];if(i[k]==null){i[k]=z.length;z.push([])}z[i[k]].push(Q)}var O=[],c=[];for(var f=0;
|
|
f<z.length;f++){O.push(T(z[f]));var B=T(z[f]);B.S9=f;c.push(B)}c.sort(function(R,g){return Math.max(g.w,g.d)-Math.max(R.w,R.d)});
|
|
var v=new NETXUS.RectanglePacker(G,l);while(!0){var p=!1;v.reset(G,l);for(var f=0;f<c.length;f++){var P=v.findCoords(c[f].d,c[f].w);
|
|
if(P){c[f].x=P.x;c[f].y=P.y}else{G=Math.floor(G*1.1);l=Math.floor(l*1.1);p=!0;break}}if(p)continue;break}for(var f=0;
|
|
f<z.length;f++){var h=c[f],j=h.S9,C=O[j],V=z[j],d=h.x-C.x,m=h.y-C.y;for(var E=0;E<V.length;E++)V[E].offset(d,m)}};
|
|
L.BG=function(){};L.BG.M5=Math.floor(16*window.devicePixelRatio);L.BG.Qv={};L.BG.Zz=0;L.BG.od=[[12,76,2],[12,76,3],[12,76,4],[12,76,5],[12,76,6]];
|
|
L.BG.aaw=["px","in","cm","mm","%"];L.BG.V9=function($,o,T,s){var E=[1,o,o/2.54,o/25.4,T/100][s];return $*E};
|
|
L.BG.adT=function($,o,T,s){var E=[1,o,o/2.54,o/25.4,T/100][s];return $/E};L.BG.at=function($,o,T,s,E){var e=T.wK.Z2,n=[1,o,o/2.54,o/25.4,s/100][e],A=[2,3,2,1,2][e];
|
|
$=$/n;var u=Math.round($),Y=e==0&&Math.abs($-u)<1e-6?u+"":$.toFixed(A);if(E)Y+=" "+L.BG.aaw[e];return Y};
|
|
L.BG.ae2=function($,o,T,s){var E=T.wK.Z2,e=[1,o,o/2.54,o/25.4,s/100][E];$=parseFloat($)*e;return $};
|
|
L.BG.ako=function($,o){var T=$+","+o;if(L.BG.Qv.clr==T)return;var s=Math.round(L.BG.M5*.5);L.BG.Zz=s;
|
|
var E=document.createElement("canvas");E.width=E.height=s;var e=E.getContext("2d");e.font=s*1.5+"px monospace";
|
|
var n="0 1 2 3 4 5 6 7 8 9 -".split(" ");for(var f=0;f<n.length;f++){e.fillStyle="#"+L.B$(o);e.fillRect(0,0,s,s);
|
|
e.fillStyle="#"+L.B$($);e.fillText(n[f],0,s);L.BG.Qv[n[f]]=e.getImageData(0,0,s,s).data}L.BG.Qv.clr=T};
|
|
L.BG.a7J=function($,o,T){var s=0,E=0,e=4*L.BG.M5;for(var f=9;f>=0;f--){var n=Math.pow(10,f);if(5*n*$<=e){s=5*n;
|
|
E=10;break}if(2*n*$<=e){s=2*n;E=4;break}if(1*n*$<=e){s=1*n;E=10;break}}if(s==0){s=1;E=10}var A=Math.ceil(s*$),u=L.G(A*L.BG.M5*4);
|
|
L.wr(u,4278190080|T);for(var f=0;f<L.BG.M5;f++)L.BG.RH(u,4*f*A,o);for(var f=0;f<A;f++)L.BG.RH(u,4*((L.BG.M5-1)*A+f),o);
|
|
if(s==2)E=2;if(s==5)E=5;if(s>1||s==1&&A>20)for(var f=1;f<E;f++)L.BG.ac0(u,f*(A/E),A,(f&1)==1?.8:.7,o);
|
|
return{tY:u,step:s}};L.BG.ac0=function($,o,T,s,E){var o=Math.round(o);for(var e=Math.round(L.BG.M5*s);
|
|
e<L.BG.M5-1;e++)L.BG.RH($,4*(e*T+o),E)};L.BG.RH=function($,o,T){$[o+0]=T>>16&255;$[o+1]=T>>8&255;$[o+2]=T&255};
|
|
L.BG.ad2=function($,o,T,s,E,e,n){var A=$.Vi.d,u=$.Vi.w,Y=L.BG.M5,b=o&255,a=o>>8&255,w=o>>16&255;o=Math.round(b*.6)<<16|Math.round(a*.6)<<8|Math.round(w*.6);
|
|
L.BG.ako(Math.round(b*.8)<<16|Math.round(a*.8)<<8|Math.round(w*.8),T);var X=$.X,N=$.l,z=$.VN;for(var i=0;
|
|
i<2;i++){var k=i==0?e:n;$.X=k[0];$.l=k[1];$.VN=0;var Q=this.a7J($.X,o,T),O=$.VD(0,0),c=$.VD(A,u),B=Math.floor(O.x/Q.step)*Q.step,G=Math.ceil(c.x/Q.step)*Q.step,l=Math.floor(O.y/Q.step)*Q.step,v=Math.ceil(c.y/Q.step)*Q.step,p=$.X8(B,l),P=$.X8(G,l),h=Q.step*$.X,j=Math.ceil(h);
|
|
if(i==1){var C=Q.tY;Q.tY=L.G(C.length*4);L.$.EP(C,Q.tY,j,Y)}var V=i==0?$.VC.data:$.DV.data,d=new df(0,0,[A,Y][i],[Y,u][i]),m=new df(0,0,[j,Y][i],[Y,j][i]),R=new df([0,Math.round(Y*.2)][i],[Math.round(Y*.08),0][i],L.BG.Zz,L.BG.Zz),g=(i==0?G-B:v-l)/Q.step;
|
|
for(var f=0;f<g;f++){if(i==0)m.x=Math.round(p.x+f*h);else m.y=Math.round(p.y+f*h);L.h9(Q.tY,m,V,d,m);
|
|
var S=(i==0?B+f*Q.step:Math.abs(l+f*Q.step)).toString(10);for(var F=0;F<S.length;F++){if(i==0)R.x=m.x+3+F*Math.round(L.BG.Zz*.8);
|
|
else R.y=m.y+3+F*Math.round(L.BG.Zz*1.15);var r=L.BG.Qv[S[F]];L.h9(r,R,V,d,R)}}}$.X=X;$.l=N;$.VN=z;var q=Math.floor(Y*.6),W=new Uint32Array($.VC.data.buffer),Z=new Uint32Array($.DV.data.buffer),I=b<128?4278190080:4294967295;
|
|
if(0<s&&s<A)for(var f=0;f<q;f++)W[f*A+s]=I;if(0<E&&E<u)for(var f=0;f<q;f++)Z[E*Y+f]=I};L.scale={};L.scale.S=document.createElement("canvas");
|
|
L.scale.V8=L.scale.S.getContext("2d");L.scale.OF=document.createElement("canvas");L.scale.Ua=L.scale.OF.getContext("2d");
|
|
L.scale.hb=function($,o,T){var s=L.scale.S,E=L.scale.V8;s.width=o;s.height=T;var e=new ImageData(new Uint8ClampedArray($.buffer),o,T);
|
|
E.putImageData(e,0,0);return E.createPattern(s,"repeat")};L.scale.aro=function($,o,T,s,E,e,n,A){var u=L.scale._B($,T,s,E,e,n,A);
|
|
L.KT(u.data,o)};L.scale.S7=function($,o,T,s,E,e,n,A){var u=L.scale._B($,T,s,E,e,n,A).data;if(o)L.w0(u,o);
|
|
return new Uint8Array(u.buffer)};L.scale._B=function($,o,T,s,E,e,n){var A=L.scale.S,u=L.scale.V8;A.width=o;
|
|
A.height=T;u.rect(0,0,o,T);u.translate(e,n);u.scale(s,E);u.fillStyle=$;u.fill();return u.getImageData(0,0,o,T)};
|
|
L.scale.t=function($,o,T,s,E){var e=T.clone();e.lY();var n=E.d,A=E.w,u=L.M.Uo(o).I;L.M.t(u,e,u);var Y=L.M.$l(u).Sr(E),b=Y.x,a=Y.y,w=b+Y.d,X=a+Y.w,N=~~o.x,z=~~o.y,i=~~o.d,k=~~o.w;
|
|
for(var Q=a;Q<X;Q++)for(var O=b;O<w;O++){var c=O+.5,B=Q+.5,G=T.Ca*c+T.Z9*B+T.Ry-N,l=T.P*c+T.Um*B+T.Es-z;
|
|
if(0<=G&&0<=l&&G<i&&l<k)s[Q*n+O]=$[~~l*i+~~G]}};L.scale.aiF=function($,o,T,s,E){var e=new Uint32Array($.buffer),n=new Uint32Array(s.buffer),A=T.clone();
|
|
A.lY();var u=E.d,Y=E.w,b=L.M.Uo(o).I;L.M.t(b,A,b);var a=L.M.$l(b).Sr(E),w=a.x,X=a.y,N=w+a.d,z=X+a.w,i=~~o.x,k=~~o.y,Q=~~o.d,O=~~o.w;
|
|
for(var c=X;c<z;c++)for(var B=w;B<N;B++){var G=B+.5,l=c+.5,v=T.Ca*G+T.Z9*l+T.Ry-i,p=T.P*G+T.Um*l+T.Es-k;
|
|
if(0<=v&&0<=p&&v<Q&&p<O)n[c*u+B]=e[~~p*Q+~~v]}};L.scale.lx=function($,o,T,s,E,e,n){if(n<1)L.scale.aqA($,o,T,s,E,e,Math.round(1/n));
|
|
else L.scale.aew($,o,T,s,E,e,n)};L.scale.nq=function($,o,T,s,E,e,n,A){if(A)A=A.Sr(new df(0,0,o,T));$=new Uint32Array($.buffer);
|
|
s=new Uint32Array(s.buffer);if(n<1)L.scale.aka($,o,T,s,E,e,Math.round(1/n),A);else L.scale.adN($,o,T,s,E,e,n)};
|
|
L.scale.aew=function($,o,T,s,E,e,n){for(var A=0;A<T;A++)for(var u=0;u<o;u++){var Y=$[A*o+u],b=Math.min(n,E-u*n),a=Math.min(n,e-A*n);
|
|
for(var f=0;f<a;f++)for(var w=0;w<b;w++)s[(n*A+f)*E+n*u+w]=Y}};L.scale.aqA=function($,o,T,s,E,e,n){for(var A=0;
|
|
A<e;A++)for(var u=0;u<E;u++){var Y=0,b=Math.min(n,o-u*n),a=Math.min(n,T-A*n);for(var f=0;f<a;f++)for(var w=0;
|
|
w<b;w++)Y+=$[(n*A+f)*o+(n*u+w)];s[A*E+u]=Math.round(Y/(b*a))}};L.scale.adN=function($,o,T,s,E,e,n){for(var A=0;
|
|
A<T;A++)for(var u=0;u<o;u++){var Y=$[A*o+u],b=Math.min(n,E-u*n),a=Math.min(n,e-A*n);for(var f=0;f<a;
|
|
f++)for(var w=0;w<b;w++)s[(n*A+f)*E+n*u+w]=Y}};L.scale.aka=function($,o,T,s,E,e,n,A){var u=0,Y=E,b=0,a=e;
|
|
if(A){u=Math.floor(A.x/n);Y=Math.ceil((A.x+A.d)/n);b=Math.floor(A.y/n);a=Math.ceil((A.y+A.w)/n)}for(var w=b;
|
|
w<a;w++)for(var X=u;X<Y;X++){var N=0,z=0,i=0,k=0,Q=Math.min(n,o-X*n),O=Math.min(n,T-w*n);for(var f=0;
|
|
f<O;f++)for(var c=0;c<Q;c++){var B=$[(n*w+f)*o+n*X+c],G=B>>>24;N+=G;z+=G*(B>>>16&255);i+=G*(B>>>8&255);
|
|
k+=G*(B&255)}if(N!=0){var l=1/N;s[w*E+X]=N/(Q*O)<<24|z*l<<16|i*l<<8|k*l}else s[w*E+X]=0}};L.Z={};L.Z.a4S=function($,o,T){var s=128,f=0,E=T.d,e=T.w;
|
|
for(var n=0;n<e;n++)for(var A=0;A<E;A++){if($[f]>=s&&(A==0||$[f-1]<s||(A==E-1||$[f+1]<s)||(n==0||$[f-E]<s)||(n==e-1||$[f+E]<s)))o[f]=255;
|
|
f++}};L.Z.ama=function($,o,T,s){var E=new Uint32Array([4278190080,4294967295]),e=T.d,n=T.w,A=0,u=0,Y=e,b=n;
|
|
if(s){A=s.x-T.x;u=s.y-T.y;Y=A+s.d;b=u+s.w}var a=new Uint8Array(o.buffer),w=new Uint32Array(o.buffer);
|
|
for(var X=u;X<b;X++)for(var N=A;N<Y;N++){var f=X*e+N;if(($[f]&128)!=0&&(X==0||($[f-e]&128)==0||N==0||($[f-1]&128)==0||N==e-1||($[f+1]&128)==0||X==n-1||($[f+e]&128)==0)){w[f]=E[(N+X&4)>>>2]}}};
|
|
L.Z.a3G=function($,o,T,s,E,e){var n=T.d,A=T.w,u=0,Y=0,b=n,a=A;if(s){u=s.x-T.x;Y=s.y-T.y;b=u+s.d;a=Y+s.w}var w=new Uint8Array(o.buffer),X=new Uint32Array(o.buffer);
|
|
for(var N=Y;N<a;N++)for(var z=u;z<b;z++){var f=N*n+z,i=$[f];if(E==1)X[f]=255-i>>>1<<24|255;else X[f]=255<<24|(i<<16|i<<8|i)}};
|
|
L.vB={};L.vB.U2=function($,o,T){var s,E;if(T=="front"){s=$.rect.clone();E=L.vB.a5v}if(T=="union"){s=$.rect.BZ(o.rect);
|
|
E=L.vB.BZ}if(T=="difference"){s=o.rect.clone();E=L.vB.a7x}if(T=="intersection"){s=$.rect.Sr(o.rect);
|
|
E=L.vB.Sr}if(T=="xor"){s=$.rect.BZ(o.rect);E=L.vB.a08}if(s.p4())return null;var e=L.G(s.Y());L.pg(o.channel,o.rect,e,s);
|
|
var n=L.G(s.Y());L.pg($.channel,$.rect,n,s);E(n,e,e);var A=L.ac(e,s);if(A.p4())return null;if(!A.R1(s)){var u=L.G(A.Y());
|
|
L.pg(e,s,u,A);e=u;s=A}return{channel:e,rect:s}};L.vB.a5v=function($,o,T){for(var f=0;f<$.length;f++)T[f]=$[f]};
|
|
L.vB.BZ=function($,o,T){for(var f=0;f<$.length;f++)T[f]=Math.min($[f]+o[f],255)};L.vB.a7x=function($,o,T){for(var f=0;
|
|
f<$.length;f++)T[f]=Math.max(o[f]-$[f],0)};L.vB.Sr=function($,o,T){var s=1/255;for(var f=0;f<$.length;
|
|
f++)T[f]=$[f]*o[f]*s};L.vB.a08=function($,o,T){var s=1/255;for(var f=0;f<$.length;f++)T[f]=Math.min($[f]+o[f],255)-$[f]*o[f]*s};
|
|
L.aA=function($,o){this.V=[];this.Kv=[0];this.Rh=[];this.JT=[];this.yE=[0];this.ii=[];this.AX=[];this.rows=$;
|
|
this.cols=o};L.aA.prototype.clone=function(){var $=this,o=$.rows,T=$.cols,s=new L.aA(o,T);s.V=$.V.slice(0);
|
|
s.Kv=$.Kv.slice(0);s.Rh=$.Rh.slice(0);s.JT=$.JT.slice(0);s.yE=$.yE.slice(0);s.ii=$.ii.slice(0);s.AX=$.AX.slice(0);
|
|
return s};L.aA.prototype.OB=function($,o,T){var s=this.Kv.length-1;for(var f=0;f<T;f++){var E=$[f],e=o[f];
|
|
this.V.push(E);this.Rh.push(e);if(e==s){this.AX.push(E==0?0:1/E)}else{this.JT.push(E);this.ii.push(e)}}this.Kv.push(this.V.length);
|
|
this.yE.push(this.JT.length)};L.aA.prototype.wd=function($,o){var T=this,s=T.rows,E=T.V,e=T.Rh;if(o==null)o=new Array(s);
|
|
for(var f=0;f<s;f++){var n=T.Kv[f],A=T.Kv[f+1],u=0;while((A-n&3)!=0){u+=E[n]*$[e[n]];n++}for(var Y=n;
|
|
Y<A;Y+=4)u+=E[Y]*$[e[Y]]+E[Y+1]*$[e[Y+1]]+E[Y+2]*$[e[Y+2]]+E[Y+3]*$[e[Y+3]];o[f]=u}return o};L.aA.prototype.multiply=function($){return this.Hi($.EP())};
|
|
L.aA.prototype.Hi=function($){var o=this,T=o.rows,s=o.cols,E=$.rows,e=new L.aA(T,E),n=o.Rh,A=$.Rh;for(var f=0;
|
|
f<T;f++){var u=[],Y=[],b=o.Kv[f],a=o.Kv[f+1];for(var w=0;w<E;w++){var X=$.Kv[w],N=$.Kv[w+1],z=0,i=b,k=X;
|
|
while(i<a&&k<N){var Q=Math.max(n[i],A[k]);while(i<a&&n[i]<Q)i++;while(k<N&&A[k]<Q)k++;if(i<a&&k<N&&n[i]==A[k])z+=o.V[i++]*$.V[k++]}if(z!=0){u.push(z);
|
|
Y.push(w)}}e.OB(u,Y,u.length)}return e};L.aA.prototype.EP=function(){var $=this.rows,o=this.cols,T=[];
|
|
for(var f=0;f<o;f++)T.push([[],[]]);var s=this.V,E=this.Kv,e=this.Rh;for(var f=0;f<$;f++){var n=E[f],A=E[f+1];
|
|
for(var u=n;u<A;u++){var Y=T[e[u]];Y[0].push(s[u]);Y[1].push(f)}}var b=new L.aA(o,$);for(var f=0;f<o;
|
|
f++)b.OB(T[f][0],T[f][1],T[f][1].length);return b};L.aA.prototype.sq=function(){var $=this.rows,o=this.cols,T=new Array($),s=this.V,E=this.Kv,e=this.Rh;
|
|
for(var f=0;f<$;f++){var n=T[f]=new Array(o);for(var A=0;A<o;A++)n[A]=0;var u=E[f],Y=E[f+1];for(var b=u;
|
|
b<Y;b++)n[e[b]]=s[b]}return T};L.aA.prototype.sg=function($,o,T,s,E){function e(l,o,v,p){var P=l.length;
|
|
for(var f=0;f<P;f++)p[f]=l[f]-o[f]*v}function n(l,o,v,p){var P=l.length,h=0;while((P-h&3)!=0){p[h]=l[h]+o[h]*v;
|
|
h++}for(var f=h;f<P;f+=4){p[f]=l[f]+o[f]*v;p[f+1]=l[f+1]+o[f+1]*v;p[f+2]=l[f+2]+o[f+2]*v;p[f+3]=l[f+3]+o[f+3]*v}}function A(l,o,v){var p=l.length;
|
|
for(var f=0;f<p;f++)v[f]=l[f]*o[f]}function u(l,o){var v=l.length,p=0,P=0;while((v-p&3)!=0){P+=l[p]*o[p];
|
|
p++}for(var f=p;f<v;f+=4)P+=l[f]*o[f]+l[f+1]*o[f+1]+l[f+2]*o[f+2]+l[f+3]*o[f+3];return P}var Y=s!=null?2:1,b=Date.now(),a=0,w=this,X=$.slice(0),N=$.slice(0);
|
|
w.wd($,N);e(o,N,1,X);var z=this.AX;if(Y==0){z=X.slice(0);z.fill(1)}var i=X.slice(0);A(z,X,i);var k=i.slice(0),Q=u(X,i);
|
|
while(!0){w.wd(k,N);var O=Q/u(k,N);n($,k,O,$);e(X,N,O,X);if((a&7)==0&&Math.sqrt(u(X,X))<T)break;if(Y<=1)A(z,X,i);
|
|
else{var c=X.slice(0);s.a2w(c,X);E.apY(i,c)}var B=u(X,i),G=B/Q;n(i,k,G,k);Q=B;a++}};L.aA.prototype.a5S=function($,o,T,s){var E=Date.now(),e=1.96,A=0;
|
|
if(T==null)T=5e-6;if(s==null)s=1e9;var n=1-e,J=this.rows,u=this.JT,Y=this.yE,b=this.ii,a=this.AX;while(!0){var w=0;
|
|
for(var f=0;f<J;f++){var X=o[f],N=Y[f],z=Y[f+1];if(z-N==4)X-=u[N]*$[b[N]]+u[N+1]*$[b[N+1]]+u[N+2]*$[b[N+2]]+u[N+3]*$[b[N+3]];
|
|
else for(var i=N;i<z;i++)X-=u[i]*$[b[i]];var k=$[f]*n+a[f]*X*e,Q=k-$[f];w+=Q*Q;$[f]=k}if(w/J<T||Date.now()>E+s)break}};
|
|
L.aA.prototype.ahM=function($,o,T,s){var E=Date.now(),e=1.96,A=0;if(T==null)T=5e-5;if(s==null)s=1e9;
|
|
var n=1-e,J=this.rows,u=this.JT,Y=this.yE,b=this.ii,a=this.AX;while(!0){var w=0;for(var f=0;f<J;f++){var X=f*3,N=o[X],z=o[X+1],i=o[X+2],k=Y[f],Q=Y[f+1];
|
|
for(var O=k;O<Q;O++){var c=u[O],B=b[O]*3;N-=c*$[B+0];z-=c*$[B+1];i-=c*$[B+2]}var G=a[f]*e,l=$[X+0]*n+N*G,v=$[X+1]*n+z*G,p=$[X+2]*n+i*G,P=l-$[X+0],h=v-$[X+1],j=p-$[X+2];
|
|
w+=.4*P*P+.5*h*h+.1*j*j;$[X+0]=l;$[X+1]=v;$[X+2]=p}if(w/J<T||Date.now()>E+s)break}};L.sE={};L.sE.p7=function($,o,T){return{t:"Objc",v:{classID:"CrPt",Hrzn:{t:"doub",v:$},Vrtc:{t:"doub",v:o},Cnty:{t:"bool",v:T}}}};
|
|
L.sE.t=function($,o){for(var f=0;f<$.length;f++){var T=$[f].v,s=o.bb(new aY(T.Hrzn.v,T.Vrtc.v));T.Hrzn.v=Math.round(s.x);
|
|
T.Vrtc.v=Math.round(s.y)}};L.sE.fu=function($,o,T){var J=$.length-1,s=L.Ak.a$(J+1,J+2);for(var f=1;f<J;
|
|
f++){s[f][f-1]=1/($[f]-$[f-1]);s[f][f]=2*(1/($[f]-$[f-1])+1/($[f+1]-$[f]));s[f][f+1]=1/($[f+1]-$[f]);
|
|
s[f][J+1]=3*((o[f]-o[f-1])/(($[f]-$[f-1])*($[f]-$[f-1]))+(o[f+1]-o[f])/(($[f+1]-$[f])*($[f+1]-$[f])))}s[0][0]=2/($[1]-$[0]);
|
|
s[0][1]=1/($[1]-$[0]);s[0][J+1]=3*(o[1]-o[0])/(($[1]-$[0])*($[1]-$[0]));s[J][J-1]=1/($[J]-$[J-1]);s[J][J]=2/($[J]-$[J-1]);
|
|
s[J][J+1]=3*(o[J]-o[J-1])/(($[J]-$[J-1])*($[J]-$[J-1]));L.Ak._v(s,T)};L.sE.amu=function($,o,T,s){if($<=o[0])return T[0];
|
|
if($>=o[o.length-1])return T[o.length-1];var f=1;while(o[f]<$)f++;var E=o[f],e=o[f-1],n=T[f],A=T[f-1],u=($-e)/(E-e),Y=s[f-1]*(E-e)-(n-A),b=-s[f]*(E-e)+(n-A),a=(1-u)*A+u*n+u*(1-u)*(Y*(1-u)+b*u);
|
|
return a};L.sE.RB=function($,o,T,s){var E={$q:[$[0]],b3:[o[0]],yB:[]};s[0]=E;for(var f=1;f<$.length-1;
|
|
f++){E.$q.push($[f]);E.b3.push(o[f]);if(T[f]==!1){L.sE.fu(E.$q,E.b3,E.yB);E={$q:[$[f]],b3:[o[f]],yB:[]}}s[f]=E}E.$q.push($[f]);
|
|
E.b3.push(o[f]);L.sE.fu(E.$q,E.b3,E.yB);s[f]=E};L.sE.W2=function($,o,T,s){if($<=o[0])return T[0];if($>=o[o.length-1])return T[o.length-1];
|
|
var f=1;while(o[f]<$)f++;var E=s[f-1];return L.sE.amu($,E.$q,E.b3,E.yB)};L.sE.nX=function($){var o={$q:[],b3:[],$C:[]};
|
|
for(var f=0;f<$.length;f++){o.$q[f]=$[f].v.Hrzn.v;o.b3[f]=$[f].v.Vrtc.v;o.$C[f]=$[f].v.Cnty?$[f].v.Cnty.v:!0}return o};
|
|
L.sE.$O=function($,J,o){var T=0,s=255;if(o){T=-1e9;s=1e9}var E=L.sE.nX($),e=[];L.sE.RB(E.$q,E.b3,E.$C,e);
|
|
var n=[];for(var f=0;f<J;f++)n[f]=1/255*Math.max(T,Math.min(s,L.sE.W2(f*(255/(J-1)),E.$q,E.b3,e)));return n};
|
|
L.sE.ah$=function($,J,o){var T=Math.round($.length/20),s=J-$.length,E=o?($[T]-$[0])/T:0,e=o?$[0]-s*E:$[$.length-1],n=[];
|
|
for(var f=0;f<s;f++)n.push(e+f*E);return o?n.concat($):$.concat(n)};L.sE.JI=function($,J,o){var T=L.sE.nX($),s=[];
|
|
L.sE.RB(T.$q,T.b3,T.$C,s);var E=new Uint8Array(J),e=J/256;for(var f=0;f<J;f++)E[f]=Math.max(0,Math.min(J-1,L.sE.W2(f*e,T.$q,T.b3,s)));
|
|
if(o){E[0]=0;if(E[1]>100)E[1]=.4*E[1];if(E[2]>150)E[1]=.7*E[2]}return E};L.sE.iU=function($,o){var T=new Uint8Array($.length);
|
|
for(var f=0;f<$.length;f++)T[f]=o[$[f]];return T};L.sE.Ey=function($,o,T){var s=H.z("canvas","");s.width=o;
|
|
s.height=T;var E=s.getContext("2d"),e=L.sE.JI($,256);E.scale(o/255,T/255);E.fillStyle="#fff";E.fillRect(0,0,255,255);
|
|
E.fillStyle="#333";E.beginPath();E.moveTo(0,255);for(var f=0;f<e.length;f++)E.lineTo(f,255-e[f]);E.lineTo(255,255);
|
|
E.closePath();E.fill();return s.toDataURL()};L.style={};L.style.stroke=function($,o,T,s){var E=T.d,e=T.w,n=new Float64Array(E*e);
|
|
L.style.Mp($,n,E,e);L.style.EE(o,T,n,T,s)};L.style.EE=function($,o,T,s,E){var e=o.Sr(s),n=e.d,A=e.w;
|
|
E+=1;var u=e.x-o.x,Y=e.y-o.y,b=o.d,a=e.x-s.x,w=e.y-s.y,X=s.d;for(var N=0;N<A;N++){var z=(N+w)*X+a,i=(N+Y)*b+u;
|
|
for(var k=0;k<n;k++){var Q=Math.max(0,Math.min(1,E-T[z+k]));$[i+k]=Math.round(Q*255)}}};L.style.a0u=function($,o,T,s){for(var E=0;
|
|
E<T;E++)for(var e=0;e<o;e++){var n=E*o+e,A=0,u=0,Y=$[n];if(e==0||E==0){A=$[n+1]-Y;u=$[n+o]-Y}else if(e==T-1||E==o-1){A=Y-$[n-1];
|
|
u=Y-$[n-o]}else{A=$[n+1]-$[n-1];u=$[n+o]-$[n-o]}if(A!=0||u!=0){var b=1/Math.sqrt(A*A+u*u);A*=b;u*=b}s[n+n]=A;
|
|
s[n+n+1]=u}};L.style.Mp=function($,o,T,s){var E=0,e=T*s;for(var f=0;f<e;f++)E|=$[f];if(E==0){o.fill(1e9);
|
|
return}var n=L.style.zJ($,T,s);for(var A=0;A<s;A++)for(var u=0;u<T;u++){var f=A*T+u,Y=n[f*2],b=n[f*2+1],a=(A+b)*T+u+Y;
|
|
if(Y==0&&b==0){o[f]=0;continue}var w=Math.sqrt(Y*Y+b*b),X=$[a]*(1/255),N=1/w,z=Math.abs(Y)*N,i=Math.abs(b)*N;
|
|
if(i>z){var k=i;i=z;z=k}o[f]=w+L.style.a7n(z,i,X)}};L.style.a7n=function($,o,T){return(.5-T)*$};L.style.zJ=function($,o,T,s){var E=new Int16Array(o*T*2);
|
|
L.style.aeu($,E,o,T,128);return E};L.style.a4R=function($,o,T,s){var E=T*s;for(var f=0;f<E;f++)if($[f]==0){o[f*2]=16383;
|
|
o[f*2+1]=16383}for(var e=1;e<=s-1;e++){var f=e*T;for(var n=0;n<=T-1;n++)L.style.u$(o,$,T,f+n<<1,-1);
|
|
for(var n=1;n<=T-1;n++)L.style.LW(o,$,T,f+n<<1,-1);for(var n=T-2;n>=0;n--)L.style.LW(o,$,T,f+n<<1,1)}for(var e=s-2;
|
|
e>=0;e--){var f=e*T;for(var n=0;n<=T-1;n++)L.style.u$(o,$,T,f+n<<1,1);for(var n=1;n<=T-1;n++)L.style.LW(o,$,T,f+n<<1,-1);
|
|
for(var n=T-2;n>=0;n--)L.style.LW(o,$,T,f+n<<1,1)}};L.style.LW=function($,o,T,s,E){var e=(s>>>1)+E<<1,n=$[s],A=$[s+1],u=$[e]+E,Y=$[e+1],b=u*u+Y*Y,a=n*n+A*A;
|
|
if(Y!=16383&&(n==16383||Math.sqrt(b)+(.5-o[(s>>>1)+Y*T+u]*(1/255))<Math.sqrt(a)+(.5-o[(s>>>1)+A*T+n]*(1/255)))){$[s]=u;
|
|
$[s+1]=Y}};L.style.u$=function($,o,T,s,E){var e=(s>>>1)+E*T<<1,n=$[s],A=$[s+1],u=$[e],Y=$[e+1]+E,b=u*u+Y*Y,a=n*n+A*A;
|
|
if(u!=16383&&(n==16383||Math.sqrt(b)+(.5-o[(s>>>1)+Y*T+u]*(1/255))<Math.sqrt(a)+(.5-o[(s>>>1)+A*T+n]*(1/255)))){$[s]=u;
|
|
$[s+1]=Y}};L.style.a8P=function($,o,T,s){var E=T*s;for(var f=0;f<E;f++)if($[f]==0){o[f*2]=16383;o[f*2+1]=16383}for(var e=1;
|
|
e<=s-1;e++){var f=e*T;for(var n=0;n<=T-1;n++)L.style.Be(o,$,T,f+n<<1,-1);for(var n=1;n<=T-1;n++)L.style.tW(o,$,T,f+n<<1,-1);
|
|
for(var n=T-2;n>=0;n--)L.style.tW(o,$,T,f+n<<1,1)}for(var e=s-2;e>=0;e--){var f=e*T;for(var n=0;n<=T-1;
|
|
n++)L.style.Be(o,$,T,f+n<<1,1);for(var n=1;n<=T-1;n++)L.style.tW(o,$,T,f+n<<1,-1);for(var n=T-2;n>=0;
|
|
n--)L.style.tW(o,$,T,f+n<<1,1)}};L.style.tW=function($,o,T,s,E){var e=(s>>>1)+E<<1,n=$[s],A=$[s+1],u=$[e]+E,Y=$[e+1],b=u*u+Y*Y,a=n*n+A*A;
|
|
if(Y!=16383&&(n==16383||b<a)){$[s]=u;$[s+1]=Y}};L.style.Be=function($,o,T,s,E){var e=(s>>>1)+E*T<<1,n=$[s],A=$[s+1],u=$[e],Y=$[e+1]+E,b=u*u+Y*Y,a=n*n+A*A;
|
|
if(u!=16383&&(n==16383||b<a)){$[s]=u;$[s+1]=Y}};L.style.ahw=function($,o,T,s,E){var e=T*s,n=(T+s+1)*1.01;
|
|
for(var f=0;f<e;f++)if($[f]<=E)o[f]=n;for(var A=1;A<T;A++)o[A]=Math.min(o[A],o[A-1]);for(var u=1;u<s;
|
|
u++){var f=u*T;o[f]=Math.min(o[f],Math.min(o[f-T]+1,o[f-T+1]+Math.SQRT2));for(var A=1;A<T-1;A++){var Y=o[++f],b=Math.min(o[f-1]+1,Math.min(o[f-T-1]+Math.SQRT2,Math.min(o[f-T]+1,o[f-T+1]+Math.SQRT2)));
|
|
if(b<Y)o[f]=b}f++;o[f]=Math.min(o[f],Math.min(o[f-1]+1,Math.min(o[f-T-1]+Math.SQRT2,o[f-T]+1)))}for(var A=T-2;
|
|
A>=0;A--)o[A+e-T]=Math.min(o[A+e-T],o[A+e-T+1]);for(var u=s-2;u>=0;u--){var f=u*T+T-1;o[f]=Math.min(o[f],Math.min(o[f+T]+1,o[f+T-1]+Math.SQRT2));
|
|
for(var A=T-2;A>=1;A--){var Y=o[--f],b=Math.min(o[f+1]+1,Math.min(o[f+T-1]+Math.SQRT2,Math.min(o[f+T]+1,o[f+T+1]+Math.SQRT2)));
|
|
if(b<Y)o[f]=b}f--;o[f]=Math.min(o[f],Math.min(o[f+1]+1,Math.min(o[f+T]+1,o[f+T+1]+Math.SQRT2)))}};L.style.aeu=function($,o,T,s,E){var e=new Int32Array(T*s);
|
|
L.style.a0t($,e,T,s,E);L.style.aq8(e,o,T,s)};L.style.a0t=function($,o,T,s,E){var e=new Int32Array(s);
|
|
for(var n=0;n<T;n++){var A=T+s;for(var u=s-1;u>=0;u--){if($[u*T+n]>E)A=0;else A++;e[u]=A}A=T+s;for(var u=0;
|
|
u<s;u++){if($[u*T+n]>E)A=0;else A++;o[u*T+n]=A<e[u]?-A:e[u]}}};L.style.aq8=function($,o,T,s){var E=(T+s)*(T+s),e=new Float64Array(T),n=new Uint16Array(T);
|
|
for(var A=0;A<s;A++){var u=A*T,Y=0;n[0]=0;e[0]=-E;e[1]=+E;for(var b=1;b<T;b++){var a=$[b+u]*$[b+u]+b*b,w=(a-($[n[Y]+u]*$[n[Y]+u]+n[Y]*n[Y]))/(2*b-2*n[Y]);
|
|
while(w<=e[Y]){Y--;w=(a-($[n[Y]+u]*$[n[Y]+u]+n[Y]*n[Y]))/(2*b-2*n[Y])}Y++;n[Y]=b;e[Y]=w;e[Y+1]=E}Y=0;
|
|
for(var b=0;b<T;b++){while(e[Y+1]<b)Y++;var X=n[Y]-b,N=$[n[Y]+u],f=A*T+b<<1;o[f]=X;o[f+1]=N}}};L.style.Wx=function($,o,T){if(T)for(var f=0;
|
|
f<$.length;f++){var s=$[f];if(s>0)$[f]=Math.max(0,Math.min(255,s+o*2*(L.style.Po(f)-128)))}else for(var f=0;
|
|
f<$.length;f++){var s=$[f];if(s>0)$[f]=Math.max(0,Math.min(255,s+Math.min(s*3,o*2*(L.style.Po(f)-128))))}};
|
|
L.style.Po=function($){$=$^61^$>>16;$=$+($<<3);$=$^$>>4;$=$*668265261;$=$^$>>15;return $&255};L.JH={};
|
|
L.JH.ml=function($,o,T){var s=$.canvas,E=H.K(),e=Math.floor;if(s.width!=e(o*E)||s.height!=e(T*E))H.QE(s,o,T,$)};
|
|
L.JH.ab=function($,o,T,s,E,e){L.JH.ml($,o,T);if(e==null)e=!1;var n=E.channel,A=E.rect,u=!E.isEnabled;
|
|
o=Math.floor(o*H.K());T=Math.floor(T*H.K());if(o*T==0)return;var Y=$.createImageData(o,T),b=Y.data,a=1/o,w=1/T;
|
|
for(var f=0;f<T;f++)for(var X=0;X<o;X++){var N=f*o+X,z=N*4,i=Math.round(s.x+X*a*s.d),k=Math.round(s.y+f*w*s.w),Q=0;
|
|
if(i<A.x||i>=A.x+A.d||k<A.y||k>=A.y+A.w)Q=E.color;else Q=n[(k-A.y)*A.d+(i-A.x)];Q=255*(255-E.A7)+Q*E.A7>>>8;
|
|
if(e)Q=170+Math.round(.4*(Q-170));b[z]=Q;b[z+1]=Q;b[z+2]=Q;b[z+3]=255}$.putImageData(Y,0,0);if(u)L.JH.I7($,o,T)};
|
|
L.JH.Y_=[];L.JH.aaU=function($,o,T,s){var E,e,n,A=H.K();o=Math.floor(A*o);T=Math.floor(A*T);E=Math.ceil(Math.max(o,T)*.35);
|
|
e=o-E;n=T-E;var u=L.JH.Y_[E];if(u==null){var Y=H.z("canvas"),b=Y.getContext("2d");Y.width=Y.height=E;
|
|
b.fillStyle="#eeeeee";b.fillRect(0,0,E,E);var a=Math.round(E*.27),w=b.lineWidth=Math.max(1,Math.round(E*.12)),X=w/2;
|
|
b.strokeRect(1+X,1+X,E-w-2,E-w-2);b.strokeRect(a+X,a+X,E-a-a-w,E-a-a-w);u=L.JH.Y_[E]=b.getImageData(0,0,E,E)}$.putImageData(u,e,n)};
|
|
L.JH.MK=[];L.JH.a4G=function($,o,T){var s,E,e,n=H.K();o=Math.floor(n*o);T=Math.floor(n*T);s=Math.ceil(Math.max(o,T)*.35);
|
|
E=o-s;e=T-s;var A=L.JH.MK[s];if(A==null){var u=H.z("canvas"),Y=u.getContext("2d");u.width=u.height=s;
|
|
Y.fillStyle="#eeeeee";Y.fillRect(0,0,s,s);Y.lineWidth=1;Y.strokeRect(2.5,2.5,s-5,s-5);var b=Y.createImageData(3,3);
|
|
L.wr(b.data,4278190080);b.data[4*4]=b.data[4*4+1]=b.data[4*4+2]=238;Y.putImageData(b,1,1);Y.putImageData(b,s-4,1);
|
|
Y.putImageData(b,1,s-4);Y.putImageData(b,s-4,s-4);A=L.JH.MK[s]=Y.getImageData(0,0,s,s)}$.putImageData(A,E,e)};
|
|
L.JH.ahf=function($,o,T,s,E){L.JH.ml($,o,T);o=Math.floor(o*H.K());T=Math.floor(T*H.K());var e=o/s.d;
|
|
if(o*T==0)return;$.fillStyle="#999999";$.setTransform(1,0,0,1,0,0);$.clearRect(0,0,o,T);var n=L.JH.Jk;
|
|
if(n==null){n=L.JH.Jk=JSON.parse(JSON.stringify(ev.ci.default));n.strokeEnabled.v=!0}n.strokeStyleLineWidth.v.val=1*H.K()/e;
|
|
$.fillStyle="#ffffff";$.scale(e,e);L.A.Db(E.g,$,0,0);L.A.Db(E.g,$,0,0,n)};L.JH.tZ=null;L.JH.CH=function($,o,T,s,E,e,n,A){L.JH.ml($,o,T);
|
|
o=Math.floor(o*H.K());T=Math.floor(T*H.K());if(o*T==0)return;var u=Math.max(o,T),Y=L.JH.tZ;if(Y==null||Y.width<u||Y.height<u){L.JH.tZ=Y=$.createImageData(u,u)}u=Y.width;
|
|
var b=Y.data,a=s.d/o,w=s.w/T,X=e.x,N=e.x+e.d,z=e.y,i=e.y+e.w;for(var f=0;f<T;f++)for(var k=0;k<o;k++){var Q=f*u+k,O=Q*4,c=~~(s.x+k*a),B=~~(s.y+f*w),G=L.yx(f,k,2);
|
|
if(c<X||c>=N||B<z||B>=i){b[O]=G;b[O+1]=G;b[O+2]=G;b[O+3]=255}else{var l=(B-e.y)*e.d+(c-e.x)<<2,v=E[l+3]*(1/255);
|
|
b[O]=E[l+0]*v+G*(1-v);b[O+1]=E[l+1]*v+G*(1-v);b[O+2]=E[l+2]*v+G*(1-v);b[O+3]=255}}if(A!=null)for(var f=0;
|
|
f<b.length;f+=4)b[f]=b[f+1]=b[f+2]=b[f+A];$.putImageData(Y,0,0);if(n)L.JH.I7($,o,T)};L.JH.a16=function($,o,T,s){L.JH.ml($,o,T);
|
|
$.fillStyle=L.JH.Qc(s.Clr.v);$.fillRect(0,0,o,T);L.JH.QK($,o,T)};L.JH.U3=null;L.JH.an5=function($,o,T,s){L.JH.ml($,o,T);
|
|
var E=$.canvas.width,e=$.canvas.height,n=L.JH.U3;if(n==null||n.width!=E||n.height!=e){$.fillStyle="#ffffff";
|
|
$.fillRect(0,0,o,T);$.fillStyle="#000000";$.font=""+T*.7+"px serif";$.fillText("T",(o-T*.43)/2,T*.75);
|
|
$.fillText("T",(o-T*.43)/2,T*.75);L.JH.U3=$.getImageData(0,0,E,e)}else $.putImageData(n,0,0)};L.JH.a7c=function($,o,T){L.JH.ml($,o,T);
|
|
$.clearRect(0,0,o,T);$.font=T*.7+"px serif";$.fillText(":(",(o-T*.43)/2,T*.7)};L.JH.afo=function($,o,T,s){L.JH.ml($,o,T);
|
|
var E=dq.get(s),e=aX.get(dq.names[E]).substring(0,3);$.fillStyle="#ffffff";$.fillRect(0,0,o,T);$.fillStyle="#000000";
|
|
$.font=T*.55+"px sans-serif";var n=$.measureText(e);$.fillText(e,(o-n.width)/2,T*.67);$.fillRect(0,0,o,T*.1);
|
|
$.fillRect(0,T*.9,o,T*.1)};L.JH.adL=function($,o,T,s){L.JH.ml($,o,T);var E=$.canvas.width,e=$.canvas.height,n=$.getImageData(0,0,E,e);
|
|
L.h.Xo(s.Grad.v,new Uint8Array(n.data.buffer),new df(0,0,E,e),[1/E,0,0,1/e],E/2,e/2,!1,0,16711680,65280);
|
|
$.putImageData(n,0,0);L.JH.QK($,o,T)};L.JH.ark=function($,o,T,s,E){L.JH.ml($,o,T);var e=$,n=fW.OA(s.Ptrn.v,E.add.Patt);
|
|
if(n==null)return;var A=n.i2[1];L.JH.CH($,o,T,A,n.i2[0],A,!1);L.JH.QK(e,o,T)};L.JH.I7=function($,o,T){o/=H.K();
|
|
T/=H.K();$.strokeStyle="#bb0000";$.lineWidth=3;$.beginPath();$.moveTo(o*.15,T*.15);$.lineTo(o*.85,T*.85);
|
|
$.moveTo(o*.85,T*.15);$.lineTo(o*.15,T*.85);$.closePath();$.stroke()};L.JH.QK=function($,o,T){$.fillStyle="#eeeeee";
|
|
$.fillRect(0,T*.75,o,T*.25);$.beginPath();$.moveTo(0,T*.75);$.lineTo(o,T*.75);$.moveTo(o*.1,T*.875);
|
|
$.lineTo(o*.9,T*.875);$.moveTo(o*.65,T*.825);$.lineTo(o*.65,T*.95);$.closePath();$.stroke()};L.JH.Qc=function($){var o=L.h.Qc($),T=Math.round(o.i)<<16|Math.round(o.m)<<8|Math.round(o.P);
|
|
return"#"+L.B$(T)};L.A={};L.A.k5=function($,o,T){var s=[],E=-1;for(var f=0;f<$.length;f++){var e=$[f];
|
|
if((e.type==0||e.type==3)&&e.m6!=-1)E++;if(e.type>5||e.type==0||e.type==3)continue;if(o!=null&&o.indexOf(E)==-1)continue;
|
|
if(T!=null&&T.indexOf(f)==-1)continue;s.push(e.Wq.x);s.push(e.Wq.y);s.push(e.W.x);s.push(e.W.y);s.push(e.JL.x);
|
|
s.push(e.JL.y)}return s};L.A.tH=function($,o,T,s){var E=0,e=-1;for(var f=0;f<o.length;f++){var n=o[f];
|
|
if((n.type==0||n.type==3)&&n.m6!=-1)e++;if(n.type>5||n.type==0||n.type==3)continue;if(T!=null&&T.indexOf(e)==-1)continue;
|
|
if(s!=null&&s.indexOf(f)==-1)continue;n.Wq.A5($[E],$[E+1]);n.W.A5($[E+2],$[E+3]);n.JL.A5($[E+4],$[E+5]);
|
|
E+=6}};L.A.hR=function($,o,T,s){var E=L.A.k5($,T,s);L.M.t(E,o,E);L.A.tH(E,$,T,s)};L.A.aiv=function($,o,T,s){var E=L.A.k5($,T,s);
|
|
L.$.t(o,E);L.A.tH(E,$,T,s)};L.A.a50=function($,o,T,s){if(T==null&&s==null){var E=L.A.afj($,40);for(var f=0;
|
|
f<E.length;f++)$[f]=E[f]}var e=L.A.k5($,T,s);L.ha.t(o,e,L.M.L3(e));L.A.tH(e,$,T,s)};L.A.afj=function($,o){var T=[];
|
|
for(var f=0;f<$.length;f++){var s=$[f];if(s.type>5){T.push(JSON.parse(JSON.stringify(s)));continue}var E=L.A.ahz($,f+1,s.length);
|
|
E=L.M.g0(E,o);var e=L.A.a4J(E);f+=s.length;s=JSON.parse(JSON.stringify(s));s.length=e.length;T.push(s);
|
|
for(var n=0;n<e.length;n++)T.push(e[n])}return T};L.A.ahz=function($,o,T){var s={o:["M"],I:[]},E=$[o],e=$[o+T-1];
|
|
s.I.push(E.W.x,E.W.y);for(var f=1;f<T;f++){var n=$[o+f-1],A=$[o+f];s.o.push("C");s.I.push(n.JL.x,n.JL.y,A.Wq.x,A.Wq.y,A.W.x,A.W.y)}s.o.push("C");
|
|
s.I.push(e.JL.x,e.JL.y,E.Wq.x,E.Wq.y,E.W.x,E.W.y);return s};L.A.a4J=function($){var o=[],T=$.o,s=$.I,E=0,J=s.length;
|
|
o.push({type:2,Wq:new aY(s[J-4],s[J-3]),W:new aY(s[0],s[1]),JL:new aY(s[2],s[3])});for(var f=0;f<T.length-2;
|
|
f++){var e=f*6+4;o.push({type:2,Wq:new aY(s[e],s[e+1]),W:new aY(s[e+2],s[e+3]),JL:new aY(s[e+4],s[e+5])})}return o};
|
|
L.A.ap3=function($){for(var f=0;f<$.length;f++){if($[f].type>5)continue;var o=$[f].length;if(!(o==4||o==6||o==8)){f+=o;
|
|
continue}for(var T=0;T<o;T++){var s=$[f+1+T],E=$[f+1+(T+1)%o],e=Math.min(s.W.x,E.W.x),n=Math.min(s.W.y,E.W.y),A=0,u=0;
|
|
if(s.W.x<E.W.x){A=s.W.y-n;u=A-(E.W.x-e)}else{A=E.W.y-n;u=A-(s.W.x-e)}if(Math.abs(u)<.2*A)return A}}return-1};
|
|
L.A.hT=function($,o,T){function s(w,X){var N=Math.min(w.x,X.x),z=Math.min(w.y,X.y),i=Math.max(w.x+w.d,X.x+X.d),k=Math.max(w.y+w.w,X.y+X.w);
|
|
return new df(N,z,i-N,k-z)}var E=null,e=-1,n=!L.A.u_($);for(var f=0;f<$.length;f++){var A=$[f];if(A.type>5)continue;
|
|
if((A.type==0||A.type==3)&&A.m6!=-1)e++;if(o!=null&&o.indexOf(e)==-1)continue;if(f==$.length-1)break;
|
|
var u=A.type==3,Y=A.length,b=A.m6,a=L.A.ajL($,f+1,Y,u);if(E==null)E=a;else if(T)E=s(E,a);else if(n){if(o!=null||b==0||b==-1||b==2)E=s(E,a);
|
|
else if(b==1)E=E;else if(b==3){E=a;n=!1}}else{if(o!=null||b==0||b==-1||b==1)E=s(E,a);else if(b==2)E=E;
|
|
else if(b==3)E=E.Sr(a)}f+=Y}if(E==null||E.d<0||E.w<0)E=new df(0,0,0,0);return E};L.A.a9h=new Float64Array(4);
|
|
L.A.ajL=function($,f,o,T){var s=L.A.a9h;s[0]=1e30;s[1]=1e30;s[2]=-1e30;s[3]=-1e30;var E=$[f+o-1];if(!T)L.A.oR(E.W.x,E.W.y,E.JL.x,E.JL.y,$[f].Wq.x,$[f].Wq.y,$[f].W.x,$[f].W.y,s);
|
|
for(var e=f;e<f+o-1;e++){var n=$[e],A=$[e+1];L.A.oR(n.W.x,n.W.y,n.JL.x,n.JL.y,A.Wq.x,A.Wq.y,A.W.x,A.W.y,s)}return new df(s[0],s[1],s[2]-s[0],s[3]-s[1])};
|
|
L.A.oR=function($,o,T,s,E,e,n,A,u){if($==T&&o==s&&E==n&&e==A){u[0]=Math.min(u[0],Math.min($,n));u[1]=Math.min(u[1],Math.min(o,A));
|
|
u[2]=Math.max(u[2],Math.max($,n));u[3]=Math.max(u[3],Math.max(o,A));return}var Y=$,b=o,a=$,w=o,X=40,N=1/(X-1);
|
|
for(var z=0;z<X;z++){var i=z*N,k=1-i,Q=k*k*k,O=3*k*k*i,c=3*k*i*i,B=i*i*i,G=Q*$+O*T+c*E+B*n,l=Q*o+O*s+c*e+B*A;
|
|
if(G<Y)Y=G;else if(G>a)a=G;if(l<b)b=l;else if(l>w)w=l}if(Y<u[0])u[0]=Y;if(b<u[1])u[1]=b;if(a>u[2])u[2]=a;
|
|
if(w>u[3])u[3]=w};L.A.BM=function($,o){var T=$.length-3,s=o%T,E=Math.floor(s);if(o<0||E>=T)return null;
|
|
var e=$[3+E],n=$[3+(E+1)%T],A=e.W,u=e.JL,Y=n.Wq,b=n.W,a=s-E,w=1-a,X=w*w*w*A.x+3*w*w*a*u.x+3*w*a*a*Y.x+a*a*a*b.x,N=w*w*w*A.y+3*w*w*a*u.y+3*w*a*a*Y.y+a*a*a*b.y;
|
|
return new aY(X,N)};L.A.xw=function($){var o=2,T=L.A.MM($),s=!1;for(var f=2;f<$.length;f++){var E=$[f].m6;
|
|
if(E!=null){if(E==2||E==0||E==3)s=!0}}if(s&&$.length<15e3&&T>1)$=L.A.Dh($);var e=L.M.Ld($);return{app:Typr.U.pathToSVG({crds:e.I,cmds:e.o},o),_9:s?1:0}};
|
|
L.A.Dh=function($){L.A.EV();var o,T=L.A.WT($),s=[];for(var f=0;f<T.length;f++){var E=T[f][0],e=T[f][1];
|
|
if(Math.abs(E.area)<1e-5)s.push(E);else if(o==null)o=E;else{if(!E.closed)E.closed=!0;o=o[e](E);o.remove()}}if(o==null)o=new paper.CompoundPath(s);
|
|
else{if(o.segments)o=new paper.CompoundPath(o);for(var f=0;f<s.length;f++){o.addChild(s[f])}}var n=$.slice(0,2);
|
|
n=n.concat(L.A.Pw(o));if(n[2])n[2].m6=1;for(var f=3;f<n.length;f++)if(n[f].m6!=null)n[f].m6=-1;return n};
|
|
L.A.EV=function(){if(L.A.aqK==null){var $=H.z("canvas");paper.setup($);L.A.aqK=!0}};L.A.amd=function($,o){L.A.EV();
|
|
var T=[],s=L.A.WT($),E=new paper.Path.Rectangle(new paper.Rectangle(o.x,o.y,o.d,o.w));E.remove();E.fillColor=new paper.Color(1,0,0);
|
|
for(var f=0;f<s.length;f++){if(E.intersects(s[f][0])||E.contains(s[f][0].children[0].segments[0].point))T.push(f)}return T};
|
|
L.A.cM=function($,o,T,s){L.A.EV();var E=T?{curves:!0,tolerance:s}:null,e=new paper.Point(o.x,o.y),n=L.A.WT($);
|
|
for(var f=n.length-1;f>=0;f--){var A=n[f][0],u=A.hitTest(e,E);if(u!=null)return{II:f,PS:T?u.location.index:null}}return{II:-1}};
|
|
L.A.PW=function($,o,T){var s=[[],[],[]];for(var f=0;f<$.length;f++){var E=$[f];if(E.type>5||E.type==0||E.type==3)continue;
|
|
var e=T==null?!0:T.indexOf(f)!=-1;if(o.dv(E.W))s[0].push(f);if(o.dv(E.Wq)&&e)s[1].push(f);if(o.dv(E.JL)&&e)s[2].push(f)}return s};
|
|
L.A.a6B=function($,o,T){var s=T.slice(0),E=[null,null],e=-1,A=null;for(var f=2;f<$.length;f++){if(($[f].type==0||$[f].type==3)&&$[f].m6!=-1)e++;
|
|
E[f]=T[e]}T=E;var n=$.slice(0,2);E=T.slice(0,2);for(var f=2;f<$.length;f++){if($[f].type==0||$[f].type==3){A=$[f];
|
|
n.push(A);E.push(T[f])}else{if(o.indexOf(f)==-1){n.push($[f]);E.push(T[f])}else{A.length--;L.qy.qZ(T,f)}}}for(var f=2;
|
|
f<n.length;f++){var u=n[f];if(u.type!=0&&u.type!=3)continue;if(u.length==0){if(n[f+1]&&n[f+1].m6==-1){n[f+1].m6=u.m6}E.splice(f,1);
|
|
n.splice(f,1);f--}}for(var f=0;f<s.length;f++)if(E.indexOf(s[f])==-1){s.splice(f,1);f--}return n};L.A.a1b=function($,o){var T=$.slice(0,2),s=-1;
|
|
for(var f=2;f<$.length;f++){if(($[f].type==0||$[f].type==3)&&$[f].m6!=-1)s++;if(o.indexOf(s)==-1)T.push($[f])}return T};
|
|
L.A.a60=function($,o){var T=$.slice(0,2),s=-1;for(var f=2;f<$.length;f++){if(($[f].type==0||$[f].type==3)&&$[f].m6!=-1)s++;
|
|
if(o.indexOf(s)!=-1)T.push($[f])}return T};L.A.an1=function($){var o=0;for(var f=0;f<$.length;f++)if($[f].type==0||$[f].type==3)o=f;
|
|
return $[o]};L.A.MM=function($){var o=-1;for(var f=0;f<$.length;f++)if(($[f].type==0||$[f].type==3)&&$[f].m6!=-1)o++;
|
|
return o+1};L.A.kE=function($,o,T){var s=-1;for(var f=0;f<$.length;f++)if(($[f].type==0||$[f].type==3)&&(T||$[f].m6!=-1)){s++;
|
|
if(s==o)return f}return-1};L.A.c9=function($,o,T){var s=-1;for(var f=0;f<$.length;f++)if(($[f].type==0||$[f].type==3)&&(T||$[f].m6!=-1)){if(f>=o)return s;
|
|
s++}return s};L.A.Mx=function($,o){var T=-1,s=0;for(var f=0;f<$.length;f++){if(($[f].type==0||$[f].type==3)&&$[f].m6!=-1)T++;
|
|
if(T==o)s++}return s};L.A.a0A=function($){var o=180;for(var f=0;f<$.length;f++){if($[f].type!=0&&$[f].type!=3)continue;
|
|
var T=$[f].length;if(T<3)continue;for(var s=0;s<T;s++){var E=$[f+1+(s-1+T)%T],e=$[f+1+s],n=$[f+1+(s+1)%T],A=e.W,u=e.Wq.R1(A)?E.JL:e.Wq,Y=e.JL.R1(A)?n.Wq:e.JL;
|
|
if(A.R1(u)||A.R1(Y))continue;var b=u.x-A.x,a=u.y-A.y,w=Y.x-A.x,X=Y.y-A.y,u=Math.atan2(u.y-A.y,u.x-A.x)*180/Math.PI,Y=Math.atan2(Y.y-A.y,Y.x-A.x)*180/Math.PI,N=Math.abs(Y-u)%360,z=N>180?360-N:N;
|
|
if(z<o)o=z}}return o*Math.PI/180};L.A.Pw=function($){var o=$.segments?[$]:$.children,T=[];for(var f=0;
|
|
f<o.length;f++){var s=o[f],E=s.segments,e=s.closed?0:3,n=T.length,A=null;if(E.length<=1)continue;T.push({type:e,length:E.length,m6:0,aq:2});
|
|
for(var u=0;u<E.length;u++){var Y=E[u],b=new aY(Y.handleIn.x,Y.handleIn.y),a=new aY(Y.handleOut.x,Y.handleOut.y),w=new aY(Y.point.x,Y.point.y),X={type:e+1,Wq:w.add(b),W:w,JL:w.add(a)};
|
|
if(A==null)A=X;T.push(X);if(u+1==E.length&&aY.Sa(A.W,X.W)<1e-5){T.pop();T[n].length--;A.Wq=X.Wq;if(e==3)for(var N=n;
|
|
N<T.length;N++)T[N].type-=3}}}return T};L.A.WT=function($){L.A.EV();var o=[],T,s=new paper.Color(1,0,0);
|
|
function E(X,A){X.remove();X.closed=!A;X.fillRule="evenodd"}for(var f=0;f<$.length;f++){if($[f].type>5)continue;
|
|
var e=$[f].length,n;if(f==$.length-1)break;var A=$[f].type==3;if(f==2){if(!L.A.Z4($))n="subtract";else n="unite"}else{if($[f].m6==0)n="exclude";
|
|
if($[f].m6==1)n="unite";if($[f].m6==2)n="subtract";if($[f].m6==3)n="intersect"}if($[f].m6!=-1){T=new paper.CompoundPath;
|
|
o.push([T,n]);T.fillRule="evenodd";T.fillColor=s}var u=[];for(var Y=0;Y<e;Y++){var b=$[f+1+Y],a=b.Wq.V4(b.W),w=b.JL.V4(b.W);
|
|
u.push([[b.W.x,b.W.y],[a.x,a.y],[w.x,w.y]])}var X=new paper.Path(u);E(X,A);T.addChild(X);f+=e}return o};
|
|
L.A.fZ=function($){for(var f=0;f<$.length;f++){var o=$[f];if(o.W==null)continue;if(!o.W.R1(o.Wq)||!o.W.R1(o.JL))return!1}return!0};
|
|
L.A.aj7=function($){if($.length<=5)return 0;var o=0,T=$.length-3-1;for(var f=0;f<T;f++){var s=$[3+f],E=$[3+f+1];
|
|
if(s.type==0||E.type==0)return 0;o+=(E.W.x-s.W.x)*(s.W.y+E.W.y)}o+=($[3].W.x-$[3+T].W.x)*($[3+T].W.y+$[3+1].W.y);
|
|
return-o*.5};L.A.u_=function($){var o=$[2],T=!1;if($.length==2)T=$[1].all==0;else if($[1].all==1){if(o.m6==1||o.m6==3)T=!0;
|
|
else T=!1}else{if(o.m6==1||o.m6==3||o.m6==0)T=!0;else T=!1}return T};L.A.Z4=function($){var o=L.A.u_($);
|
|
for(var f=3;f<$.length;f++)if($[f].m6==3)o=!0;return o};L.A.a7Y=0;L.A.Zq=0;L.A.alI=0;L.A.adB=function($,o,T,s){if(T.p4())return;
|
|
var E=T.Y(),k=16384;L.A.a7Y+=E;if(E>L.A.Zq){L.A.Zq=E}var e=T.d,n=T.w;if(s==null&&L.A.fZ($)){var A=!0;
|
|
for(var f=2;f<$.length;)if($[f].length==2)f+=3;else{A=!1;break}if(A){return}if(L.A.DS($)){o.fill(255);
|
|
var u=L.A.hT($);if(u.Y()!=E){var Y=1-(u.x-T.x),b=1-(u.y-T.y),a=1-(T.x+T.d-(u.x+u.d)),w=1-(T.x+T.w-(u.x+u.w)),X=~~(Y*255),N=~~(a*255),z=~~(b*255),i=~~(w*255);
|
|
o.fill(z,0,e);o[0]=~~(Y*b*255);o[e-1]=~~(a*b*255);for(var f=e;f<E;f+=e){o[f]=X;o[f+e-1]=N}o.fill(i,(n-1)*e,n*e);
|
|
o[E-e]=~~(Y*w*255);o[E-1]=~~(a*w*255)}return}}var Q=Math.ceil(e/k),O=Math.ceil(n/k),c=Math.ceil(e/Q),B=Math.ceil(n/O),G=Date.now();
|
|
for(var l=0;l<O;l++)for(var v=0;v<Q;v++){var p=v*c,P=l*B,h=c,j=B,C=L.iZ(h,j);if(!L.A.u_($))C.fillRect(0,0,h,j);
|
|
L.A.Db($,C,-T.x-p,-T.y-P,s);var V=new Uint8Array(C.getImageData(0,0,h,j).data.buffer);if(h==e&&j==n)L.Ge(V,o,3);
|
|
else L.ok(V,new df(p,P,h,j),o,new df(0,0,e,n))}};L.A.Db=function($,o,T,s,E){if(E!=null&&E.fillEnabled.v){var e=!1,n=!1,A=0;
|
|
for(var f=0;f<$.length;f++){var u=$[f].m6;if(u!=null)A++;if(u==-1)e=!0;if(u>0)n=!0}if(!e&&A<20)$=L.A.Dh($)}for(var f=0;
|
|
f<$.length;f++){if($[f].type>5)continue;var Y=$[f].length;if(Y==0)continue;if(f==$.length-1)break;var b=$[f].type==3,u=$[f].m6;
|
|
if(u!=-1&&E==null){var a=["xor","source-over","destination-out","source-in"][u];o.globalCompositeOperation=a}if($[f].m6!=-1){o.beginPath();
|
|
if(E){var w=E.strokeStyleLineWidth.v.val,X=E.strokeStyleLineAlignment.v.strokeStyleLineAlignment,N=E.strokeStyleLineCapType.v.strokeStyleLineCapType,z=E.strokeStyleLineJoinType.v.strokeStyleLineJoinType,i=E.strokeStyleMiterLimit.v,k=[],Q=E.strokeStyleLineDashSet.v;
|
|
for(var O=0;O<Q.length;O++)k.push(Q[O].v.val*w);o.setLineDash(k);o.lineCap=["butt","round","square"][ev.ci.JZ.indexOf(N)];
|
|
o.lineJoin=["miter","round","bevel"][ev.ci.join.indexOf(z)];o.lineWidth=ev.ci.k0.indexOf(X)==1?w:w*=2;
|
|
o.miterLimit=i}}L.A.aeI(o,$,f+1,Y,T,s,b);if(b){}else o.closePath();if($[f+1+Y]==null||$[f+1+Y].m6!=-1){if(E)o.stroke();
|
|
else o.fill("evenodd")}f+=Y}o.globalCompositeOperation="source-over"};L.A.aeI=function($,o,f,T,s,E,e){var n=o[f],A=null;
|
|
$.moveTo(n.W.x+s,n.W.y+E);for(var u=f;u<f+T-1;u++){n=o[u];A=o[u+1];$.bezierCurveTo(n.JL.x+s,n.JL.y+E,A.Wq.x+s,A.Wq.y+E,A.W.x+s,A.W.y+E)}if(!e){n=o[u];
|
|
A=o[f];$.bezierCurveTo(n.JL.x+s,n.JL.y+E,A.Wq.x+s,A.Wq.y+E,A.W.x+s,A.W.y+E)}};L.A.x7=function($,o,T){var s=[],E=T?4:1,e=!1;
|
|
if(o!=null)for(var f=0;f<o.length;f++)if(o[f]!=0){e=!0;break}if(o!=null&&e){var n=L.M.a3Q($,o),A=n.length/6;
|
|
for(var f=0;f<A;f++){var u=f*6,Y=(f-1+A)%A*6,b=n[u],a=n[u+1],w=n[u+2],X=n[u+3],N=n[Y+4],z=n[Y+5];s.push({type:E,Wq:new aY(N,z),W:new aY(b,a),JL:new aY(w,X)})}}else{for(var f=0;
|
|
f<$.length;f+=2){var i=new aY($[f],$[f+1]);s.push({type:E,Wq:i.clone(),W:i.clone(),JL:i.clone()})}}return s};
|
|
L.A.dX=function($,o){L.A.EV();var T=new paper.Path;T.remove();var s=$.length-1,E=Math.sqrt(($[s-1]-$[0])*($[s-1]-$[0])+($[s]-$[1])*($[s]-$[1]))<3;
|
|
T.closed=E;for(var f=0;f<$.length;f+=2)T.add(new paper.Point($[f],$[f+1]));T.simplify(o);var e=[{type:6},{type:8,all:0}];
|
|
e=e.concat(L.A.Pw(T));return e};L.A.Tf=function($,o,T){var s=$[o].length,E=$[o].type,e=0,n=$.slice(o+1,o+1+s);
|
|
for(var f=0;f<s;f++){var A=T[(f-1+s)%s],u=T[(f+1+s)%s],Y=T[f];if(Y!=0){var b=n[(f-1+s)%s].W,a=n[(f+0+s)%s].W,w=n[(f+1+s)%s].W,X=aY.Sa(a,b),N=aY.Sa(a,w),z=L.M.OT(b.x,b.y,a.x,a.y,w.x,w.y,Y)[0],i=Math.min(z,A==0?X:X/2,u==0?N:N/2);
|
|
Y*=i/z;var k=L.M.kM(b.x,b.y,a.x,a.y,w.x,w.y,Y),Q={type:E+1,Wq:new aY(k[2],k[3]),W:new aY(k[2],k[3]),JL:new aY(k[4],k[5])},O={type:E+1,Wq:new aY(k[6],k[7]),W:new aY(k[8],k[9]),JL:new aY(k[8],k[9])};
|
|
$.splice(o+e+1,1,Q,O);e++;$[o].length++}e++}};L.A.fZ=function($){for(var f=0;f<$.length;f++){var o=$[f],T=o.type;
|
|
if(T==1||T==2||T==4||T==5)if(!o.W.R1(o.Wq)||!o.W.R1(o.JL))return!1}return!0};L.A.DS=function($){if($.length!=7||!L.A.fZ($))return!1;
|
|
for(var f=0;f<4;f++){var o=!0;for(var T=0;T<4;T++){var s=$[3+(f+T&3)],E=$[3+(f+T+1&3)];if(s.W.x!=E.W.x&&s.W.y!=E.W.y)o=!1}if(o)return!0}return!1};
|
|
L.A.XG={};L.A.XG.Yz=function($,o,T){var s=[{type:6},{type:8,all:0}],E=null;s.push({type:T?3:0,m6:1,length:0,ZO:0,Eg:0,aq:1});
|
|
if(o==0)E==null;else if(o instanceof Array)E=o;else{E=[];for(var f=0;f<$.length;f+=2)E.push(o)}s=s.concat(L.A.x7($,E,T));
|
|
s[2].length=s.length-3;return s};L.A.XG.a7H=function($,o,T,s,E){var e=[],n=[],A=.553,u=1,Y=-1;e.push({type:1,Wq:new aY(0,A),W:new aY(0,0),JL:new aY(0,-A)});
|
|
E+=2;for(var f=0;f<E;f++){var b={type:1};if(f==0){b.W=new aY(1,-1);b.Wq=new aY(1-A,-1);b.JL=new aY(1+A,-1)}else{var a=-(f+2)*Math.PI/2,w=1+((f&1)==1?f-1:f),X=Math.sin(a),N=Math.cos(a);
|
|
u+=w*(X-N);Y+=w*(N+X);b.W=new aY(u,Y);b.Wq=new aY(u+w*N*A,Y-w*X*A);if((f&1)==1)w+=2;b.JL=new aY(u-w*N*A,Y+w*X*A)}var z={type:1,Wq:new aY(-b.JL.x,-b.JL.y),W:new aY(-b.W.x,-b.W.y),JL:new aY(-b.Wq.x,-b.Wq.y)};
|
|
e.push(b);if(f<E-2)n.push(z)}n.reverse();e=e.concat(n);var i=[{type:6},{type:8,all:0}];i.push({type:0,m6:1,length:e.length,ZO:0,Eg:0,aq:1});
|
|
i=i.concat(e);var k=new fY(T/E,0,0,T/E,0,0);k.rotate(s);k.translate($,o);L.A.hR(i,k);return i};L.A.XG.Rect=function($,o,T,s,E){var e=[$,o,$+T,o,$+T,o+s,$,o+s];
|
|
return L.A.XG.Yz(e,E)};L.A.XG.QQ=function($,o,T,s,E,e){var n=[],A=2*Math.PI/E;for(var f=0;f<E;f++)n.push(Math.cos(f*A),Math.sin(f*A));
|
|
var u=new fY(T,0,0,T,0,0);u.rotate(s);u.translate($,o);L.M.t(n,u,n);return L.A.XG.Yz(n,e)};L.A.XG.a6C=function($,o,T,s,E,e,n){var A=[],u=Math.PI/E;
|
|
for(var f=0;f<E*2;f++){var Y=(f&1)==0?1:n;A.push(Y*Math.cos(f*u),Y*Math.sin(f*u))}var b=new fY(T,0,0,T,0,0);
|
|
b.rotate(s);b.translate($,o);L.M.t(A,b,A);return L.A.XG.Yz(A,e)};L.A.XG.VG=function($,o,T,s,E){return L.A.XG.my(0,$,o,T,s,E)};
|
|
L.A.XG.a4e=function($,o,T,s,E,e){return L.A.XG.my(1,$,o,T,s,E,e)};L.A.XG.my=function($,o,T,s,E,e,n){var A=Math.sqrt((s-o)*(s-o)+(E-T)*(E-T)),u;
|
|
e/=2;if($==0)u=[-e,0,e,0,e,A,-e,A];else{var Y=e*2*n*1.3/1.5,b=e*n;u=[-e,0,e,0,e,A-Y,b,A-Y,0,A,-b,A-Y,-e,A-Y]}var a=new fY(1,0,0,1,0,0);
|
|
a.rotate(Math.atan2(-E+T,s-o)+Math.PI/2);a.translate(o,T);L.M.t(u,a,u);return L.A.XG.Yz(u,0)};L.A.XG.Xi=function($,o,T,s){var E=[{type:6},{type:8,all:0}],a=.553;
|
|
E.push({type:0,m6:1,length:4,ZO:0,Eg:0,aq:1});var e=$,n=o,A=$+T,u=o+s,$=(e+A)/2,o=(n+u)/2,Y=(e-A)/2,b=(n-u)/2;
|
|
E.push({type:1,Wq:new aY($-a*Y,o-b),W:new aY($,o-b),JL:new aY($+a*Y,o-b)});E.push({type:1,Wq:new aY($+Y,o-a*b),W:new aY($+Y,o),JL:new aY($+Y,o+a*b)});
|
|
E.push({type:1,Wq:new aY($+a*Y,o+b),W:new aY($,o+b),JL:new aY($-a*Y,o+b)});E.push({type:1,Wq:new aY($-Y,o+a*b),W:new aY($-Y,o),JL:new aY($-Y,o-a*b)});
|
|
return E};L.A.XG.aqM=function($,o,T,s,E){var e=[{type:6},{type:8,all:0}];e.push({type:3,m6:1,length:5,ZO:0,Eg:0,aq:1});
|
|
var n=(E-s)/4;for(var f=0;f<5;f++){var A=f*n,u=Math.cos(A),Y=Math.sin(A),b=.553*(n/(Math.PI/2)),a=Y*b,w=-u*b,X=new aY(u,Y);
|
|
e.push({type:4,Wq:f==0?X.clone():new aY(u+a,Y+w),W:X,JL:f==4?X.clone():new aY(u-a,Y-w)})}var N=new fY;
|
|
N.rotate(-s);N.scale(T,T);N.translate($,o);L.A.hR(e,N);return e};L.Rt={};L.Rt.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]};
|
|
L.Rt.nP=function($){var o=$.warpStyle.v.warpStyle;if(o=="warpNone")return!0;else if(o=="warpCustom"){var T=!1,s=$.customEnvelopeWarp.v.meshPoints.v.arr,E=s[0].arr,e=s[1].arr;
|
|
for(var f=0;f<4;f++)for(var n=0;n<4;n++){if(Math.abs(E[f]-E[n*4+f])>1||Math.abs(e[f*4]-e[f*4+n])>1)T=!0}return!T}else return $.warpValue.v==0&&$.warpPerspective.v==0&&$.warpPerspectiveOther.v==0};
|
|
L.Rt.G=function($){var o={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($){o.bounds={t:"Objc",v:{classID:"Rctn",Top:{t:"UntF",v:{type:"#Pxl",val:$.y}},Left:{t:"UntF",v:{type:"#Pxl",val:$.x}},Btom:{t:"UntF",v:{type:"#Pxl",val:$.y+$.w}},Rght:{t:"UntF",v:{type:"#Pxl",val:$.x+$.d}}}};
|
|
o.uOrder={t:"long",v:4};o.vOrder={t:"long",v:4}}return o};L.Rt.aqW=function($,o,T,s){for(var f=0;f<$.length;
|
|
f+=2){var E=$[f],e=$[f+1],n=(E-o.x)/o.d,A=(e-o.y)/o.w,u=(1-T)/2,Y=1-u,b=u+n*(Y-u);A=.5+(A-.5)*b*2;var a=(1-s)/2,w=1-a,X=a+A*(w-a);
|
|
n=.5+(n-.5)*X*2;E=o.x+n*o.d;e=o.y+A*o.w;$[f]=E;$[f+1]=e}};L.Rt.X3=function($,o){var T=[],s=[];for(var f=0;
|
|
f<$.length;f+=2){T.push($[f]);s.push($[f+1])}var E=[];E.push({id:"Hrzn",type:"UnFl",uID:"#Pxl",arr:T});
|
|
E.push({id:"Vrtc",type:"UnFl",uID:"#Pxl",arr:s});o.warpStyle.v.warpStyle="warpCustom";o.customEnvelopeWarp={t:"Objc",v:{classID:"customEnvelopeWarp",meshPoints:{t:"ObAr",v:{classID:"rationalPoint",arr:E}}}}};
|
|
L.Rt.wW=function($,o){if(o==null){var T=$.bounds.v,s=T.Left.v.val,E=T.Rght.v.val,e=T.Top.v.val,n=T.Btom.v.val;
|
|
o=new df(s,e,E-s,n-e)}if(o.p4())o.d=o.w=1;var A=[],u=$.warpStyle.v.warpStyle;if(u=="warpCustom"){var Y=$.customEnvelopeWarp.v.meshPoints.v.arr,b=Y[0].arr,a=Y[1].arr;
|
|
for(var f=0;f<16;f++)A.push(b[f],a[f])}else A=L.Rt.Rt(o,u,$.warpRotate.v.Ornt=="Hrzn",$.warpValue.v/100,$.warpPerspective.v/100,$.warpPerspectiveOther.v/100);
|
|
return A};L.Rt.Rt=function($,o,T,s,E,e){var n=L.ha.G($.x,$.y,$.d,$.w);if(o=="warpNone")return n;var A=JSON.parse(JSON.stringify($)),u=new fY;
|
|
if(!T){u.translate(-$.x,-$.y);u.rotate(-Math.PI/2);u.translate($.w,0);L.M.t(n,u,n);$=new df(0,0,$.w,$.d);
|
|
n=L.ha.c7(n,!1)}L.Rt.ag2(n,$,o,s,E,e);if(!T){n=L.ha.c7(n,!0);$=A;u.lY();L.M.t(n,u,n)}if(s==0)L.Rt.aqW(n,$,E,e);
|
|
else{var u=new fY(1/$.d,0,0,1/$.w,-$.x,-$.y);u.translate(-.5,-.5);L.M.t(n,u,n);L.Rt.a6Z(n,e,E);u.lY();
|
|
L.M.t(n,u,n)}return n};L.Rt.ag2=function($,o,T,s,E,e){for(var f=0;f<4;f++){for(var n=0;n<4;n++){var A=2*(4*f+n),u=$[A]-o.x,Y=$[A+1]-o.y,b=u,a=Y;
|
|
if(s!=0){var w=o.d/2,X=o.w/2;b-=w;a-=X;var N=b,z=b,i=-X,k=X,Q=Math.abs(s),O=Math.tan((1-Q)*Math.PI/2),c=Math.sqrt(O*O+1),B=Math.atan2(1,O),G=b/w*B,l=w*c,v=w*c+o.w,p=Math.cos(B),P=Math.sin(B),h=L.Rt.agU(p,P),j=L.Rt.aqU(p,P),C=-O*w+h*l;
|
|
if(T=="warpArc"){N=Math.sin(G)*v;i=O*w-Math.cos(B)*v+X;z=Math.sin(G)*l;k=O*w-Math.cos(B)*l+X;if(n==1||n==2){N=n==1?-j*v:j*v;
|
|
z=n==1?-j*l:j*l;i=O*w+X-h*v;k=O*w+X-h*l}if(s<0){var V=N;N=z;z=V;V=i;i=-k;k=-V}}if(T=="warpArcLower"){if(n==1||n==2){z=n==1?-j*l:j*l;
|
|
k=s<0?X-C:X+C}}if(T=="warpArcUpper"||T=="warpArch"||T=="warpBulge"){if(n==1||n==2){N=n==1?-j*l:j*l;i=s<0?-X+C:-X-C}if(T=="warpArch"){z=N;
|
|
k=i+2*X}if(T=="warpBulge"){z=N;k=-i}}if(T=="warpFish"||T=="warpFlag"||T=="warpWave"){if(n==1){i-=s*4*X;
|
|
k+=s*4*X}if(n==2){i+=s*4*X;k-=s*4*X}if(T=="warpFlag"||T=="warpWave")i=k-2*X}if(T=="warpRise"){if(n<2)i=-X+s*X*4;
|
|
k=i+2*X}var d=(a+X)/o.w;b=N+d*(z-N);a=i+d*(k-i);if(T=="warpWave"){if(f==0)a=-X;if(f==3)a=X;if(f==1||f==2)a=2*X*(f/3-.5)*(1/3)+a*(2/3)}if(T=="warpFisheye"){if((f==1||f==2)&&(n==1||n==2)){b=b+4*b*s;
|
|
a=a+4*a*s}}if(T=="warpInflate"){var m=2/3;if((f==1||f==2)&&(n==1||n==2)){b=b+.5*b*s;a=a+.5*a*s}else if(f==1||f==2)b=b+m*b*s;
|
|
else if(n==1||n==2)a=a+m*a*s}if(T=="warpSqueeze"){var m=2/3;if((f==1||f==2)&&(n==1||n==2)){if(s>0)b=b-m*b*s;
|
|
else a=a+m*a*s}else if(f==1||f==2)b=b-m*b*s;else if(n==1||n==2)a=a+m*a*s}if(T=="warpTwist"){if((f==1||f==2)&&(n==1||n==2)){var R=s*Math.PI/2,c=1+Math.abs(s)*2,g=b*Math.cos(R)-a*Math.sin(R),S=b*Math.sin(R)+a*Math.cos(R);
|
|
b=g*c;a=S*c}}if(T=="warpShellLower"||T=="warpShellUpper"){if(T=="warpShellUpper"){f=3-f;a=-a}if(f>2||f==2&&(n==0||n==3)){if(s>0){var F=l+f/3*2*X;
|
|
b=Math.sin(G)*F;a=-O*w-X+Math.cos(G)*F;if(n==1||n==2){b=n==1?-j*F:j*F;a=-O*w-X+h*F}}else{if((n==1||n==2)&&f==3){b=n==1?-j*l:j*l;
|
|
a=O*w-h*l+X}else if(f==2){a=X-X*(2/3)*Math.cos(G);b=b+X*(2/3)*Math.sin(G)}}}if(T=="warpShellUpper"){f=3-f;
|
|
a=-a}}b+=w;a+=X}u=b,Y=a;$[A]=u+o.x;$[A+1]=Y+o.y}}};L.Rt.a6Z=function($,o,T){var s=[];for(var E=0;E<4;
|
|
E++)s.push(1-T+E/3*2*T);var e=[];for(var E=0;E<4;E++)e.push(1-o+E/3*2*o);var n=[0,0,0,0],A=[0,0,0,0];
|
|
for(var f=0;f<4;f++)for(var E=0;E<4;E++){var u=2*(4*f+E),Y=$[u],b=$[u+1];n[E]+=Y/4;A[E]+=b/4}for(var f=0;
|
|
f<4;f++)for(var E=0;E<4;E++){var a=s[E],u=2*(4*f+E),Y=$[u],b=$[u+1],w=n[E],X=A[E];$[u]=w+a*(Y-w);$[u+1]=X+a*(b-X)}var N=$.slice(0);
|
|
for(var f=0;f<4;f++)for(var E=1;E<3;E++){var u=2*(4*f+E),Y=$[u],b=$[u+1],z=u+(E==1?-2:2),i=$[z],k=$[z+1];
|
|
$[u]=Y-i;$[u+1]=b-k}var Q=$[0],O=$[1],c=$[8],B=$[9],G=$[16],l=$[17],v=$[24],p=$[25],P=$[6],h=$[7],j=$[14],C=$[15],V=$[22],d=$[23],m=$[30],R=$[31],g=P-Q,S=h-O,F=j-c,r=C-B,q=V-G,W=d-l,Z=m-v,I=R-p;
|
|
for(var f=0;f<4;f++){var _=2*f*4,cN=0,ce=0,gf=f==1?.33:.66,K=1-gf;if(f==0){cN=g;ce=S}if(f==1){cN=K*g+gf*-Z;
|
|
ce=K*S+gf*-I}if(f==2){cN=K*g+gf*-Z;ce=K*S+gf*-I}if(f==3){cN=-Z;ce=-I}$[_]=$[_]+cN/2;$[_+1]=$[_+1]+ce/2;
|
|
$[_+6]=$[_+6]-cN/2;$[_+7]=$[_+7]-ce/2}for(var f=0;f<4;f++)for(var E=1;E<3;E++){var u=2*(4*f+E),Y=$[u],b=$[u+1],z=u+(E==1?-2:2),i=$[z],k=$[z+1],a=2*f/3;
|
|
$[u]=i+a*Y;$[u+1]=k+a*b}for(var f=1;f<3;f++)for(var E=1;E<3;E++){var u=2*(4*f+E),Y=$[u],b=$[u+1],cv=f==1?-8:-16,f0=f==1?16:8,i8=$[u+cv],b5=$[u+cv+1],iC=$[u+f0],an=$[u+f0+1],a=f/3;
|
|
Y=(1-a)*i8+a*iC;b=(1-a)*b5+a*an;$[u]=Y;$[u+1]=b}L.M.YY(N,$,$,o)};L.Rt.agU=function($,o){return(4-$)*(1/3)};
|
|
L.Rt.aqU=function($,o){return(1-$)*(3-$)/(3*o)};L.Lz={};L.Lz.a6F=function($,o,T,s,E,e,n,A,u,Y){for(var b=0;
|
|
b<A;b++)for(var a=0;a<n;a++){var w=3*(b*n+a),X=b+e,N=a+E,z=$[X*o+N];s[w]=z;s[w+1]=z;s[w+2]=z}};L.Lz.lx=function($,o,T,s,E,e,n,A,u,Y){var b=[0,1,1/2,1/3,1/4,1/5,1/6,1/7,1/8,1/9],a=1/u,w=[-1,-1,0,-1,1,-1,-1,0,1,0,-1,1,0,1,1,1],X=new Uint32Array(6);
|
|
for(var N=0;N<A;N++){for(var z=0;z<n;z++){var i=3*(N*n+z),k=N+e,Q=z+E;X[0]=0;X[1]=0;X[2]=0;X[3]=0;X[4]=0;
|
|
X[5]=0;for(var f=0;f<16;f+=2){var O=Q+w[f],c=k+w[f+1],B=O-u*~~(O*a),G=c-u*~~(c*a),l=Y[G*u+B];X[l]+=$[c*o+O];
|
|
X[l+3]++}var O=Q,c=k,B=O-u*~~(O*a),G=c-u*~~(c*a),l=Y[G*u+B];X[l]=$[k*o+Q];X[l+3]=1;s[i]=X[0]*b[X[3]];
|
|
s[i+1]=X[1]*b[X[4]];s[i+2]=X[2]*b[X[5]]}}};L.Lz.vZ=function($,o,T){for(var f=0;f<T;f+=2)$[o+f]=$[o+f+1];
|
|
o=o+T;for(var f=0;f<T;f+=2)$[o+f+1]=$[o+f]};L.Lz.ig=function($,o,T,s){for(var f=0;f<s;f+=2){var E=o+f*T;
|
|
$[E]=$[E+T];$[E+T+1]=$[E+1]}};L.Lz.IA=function($,o,T,s,E,e){var n=s[E],A=s[E+1],u=s[e],Y=s[e+1],b=A+u>>>1;
|
|
$[o]=$[o+3]=$[T]=$[T+3]=n;$[o+1]=b;$[o+4]=A;$[T+1]=u;$[T+4]=b;$[o+2]=$[o+5]=$[T+2]=$[T+5]=Y};L.Lz.aoC=function($,o,T,s,E,e){var n=e*3;
|
|
for(var f=0;f<e;f+=2){var A=o+f,u=E+f*3;L.Lz.IA(s,u,u+n,$,A,A+T)}};L.Lz.anL=function($,o,T,s,E,e,n){var A=e*3;
|
|
for(var f=0;f<n;f+=2){var u=o+f*T,Y=E+f*e*3;L.Lz.IA(s,Y,Y+A,$,u,u+T)}};L.Lz.pL=function($,f,o){var T=$[f-o-o],s=$[f-o],E=$[f-2],e=$[f-1],n=$[f],A=$[f+1],u=$[f+2],Y=$[f+o],b=$[f+o+o],a=Math.abs(s-Y),X=Math.abs(e-A),N=Math.abs(n-T)*2+a,z=Math.abs(n-u)*2+X,i=Math.abs(n-E)*2+X,k=Math.abs(n-b)*2+a,Q=Math.min(N,Math.min(z,Math.min(i,k)));
|
|
if(Q==N)return s*3+Y+n-T>>2;if(Q==z)return A*3+e+n-u>>2;if(Q==i)return e*3+A+n-E>>2;return Y*3+s+n-b>>2};
|
|
L.Lz.ns=function($,o,T,s,E){if($<o&&o<T||$>o&&o>T)return~~(.5+s+(E-s)*(o-$)/(T-$));else return(s+E>>1)+(o+o-$-T>>2)};
|
|
L.Lz.lH=function($,o,f,T){var s=o[f-T-1],E=o[f-T+1],e=o[f],n=o[f+T-1],A=o[f+T+1],u=$[f-T-1],Y=$[f-T+1],b=$[f],a=$[f+T-1],w=$[f+T+1],X=Math.abs(Y-a)+Math.abs($[f-T-T+2]-b)+Math.abs(b-$[f+T+T-2])+Math.abs(E-e)+Math.abs(e-n),N=Math.abs(u-w)+Math.abs($[f-T-T-2]-b)+Math.abs(b-$[f+T+T+2])+Math.abs(s-e)+Math.abs(e-A);
|
|
if(X<N)return L.Lz.ns(E,e,n,Y,a);else return L.Lz.ns(s,e,A,u,w)};L.Lz.gj=function($,o,T,s,E,e){$[o+0]=T[E];
|
|
$[o+1]=s[E];$[o+2]=L.Lz.lH(T,s,E,e)};L.Lz.mB=function($,o,T,s,E,e){var n=s[E];$[o+0]=L.Lz.ns(s[E-1],n,s[E+1],T[E-1],T[E+1]);
|
|
$[o+1]=n;$[o+2]=L.Lz.ns(s[E-e],n,s[E+e],T[E-e],T[E+e])};L.Lz.DF=function($,o,T,s,E,e){var n=s[E];$[o+0]=L.Lz.ns(s[E-e],n,s[E+e],T[E-e],T[E+e]);
|
|
$[o+1]=n;$[o+2]=L.Lz.ns(s[E-1],n,s[E+1],T[E-1],T[E+1])};L.Lz.al=function($,o,T,s,E,e){$[o+0]=L.Lz.lH(T,s,E,e);
|
|
$[o+1]=s[E];$[o+2]=T[E]};L.Lz.agD=function($,o,T,s,E,e,n,A,u){var Y=Date.now(),b=2,a=o-2,w=2;if((E&1)==1){b++;
|
|
a--}var X=T-2;if((e&1)==1){w++;X--}if(u==1||u==3){b++;a--}var N=$.slice(0);L.Lz.vZ(N,0,o);L.Lz.ig(N,0,o,T);
|
|
L.Lz.ig(N,o-2,o,T);L.Lz.vZ(N,(T-2)*o,o);for(var z=w;z<X;z+=2)for(var i=b;i<a;i+=2){var f=z*o+i,k=L.Lz.pL(N,f,o),Q=L.Lz.pL(N,f+o+1,o);
|
|
N[f]=Math.max(0,k);N[f+o+1]=Math.max(0,Q)}var O=n,c=A;if(e+A==T){c-=2;L.Lz.aoC($,(T-2)*o+E,o,s,(A-2)*n*3,n)}if(E+n==o){O-=2;
|
|
L.Lz.anL($,e*o+E+n-2,o,s,(n-2)*3,n,A)}if(u==0)for(var z=0;z<c;z+=2)for(var i=0;i<O;i+=2){var B=(z+e)*o+i+E,G=(z*n+i)*3;
|
|
L.Lz.gj(s,G,$,N,B,o);L.Lz.mB(s,G+3,$,N,B+1,o);B+=o;G+=3*n;L.Lz.DF(s,G,$,N,B,o);L.Lz.al(s,G+3,$,N,B+1,o)}else if(u==1)for(var z=0;
|
|
z<c;z+=2)for(var i=0;i<O;i+=2){var B=(z+e)*o+i+E,G=(z*n+i)*3;L.Lz.mB(s,G,$,N,B,o);L.Lz.gj(s,G+3,$,N,B+1,o);
|
|
B+=o;G+=3*n;L.Lz.al(s,G,$,N,B,o);L.Lz.DF(s,G+3,$,N,B+1,o)}else if(u==2)for(var z=0;z<c;z+=2)for(var i=0;
|
|
i<O;i+=2){var B=(z+e)*o+i+E,G=(z*n+i)*3;L.Lz.al(s,G,$,N,B,o);L.Lz.DF(s,G+3,$,N,B+1,o);B+=o;G+=3*n;L.Lz.mB(s,G,$,N,B,o);
|
|
L.Lz.gj(s,G+3,$,N,B+1,o)}else if(u==3)for(var z=0;z<c;z+=2)for(var i=0;i<O;i+=2){var B=(z+e)*o+i+E,G=(z*n+i)*3;
|
|
L.Lz.DF(s,G,$,N,B,o);L.Lz.al(s,G+3,$,N,B+1,o);B+=o;G+=3*n;L.Lz.gj(s,G,$,N,B,o);L.Lz.mB(s,G+3,$,N,B+1,o)}};
|
|
L.raw={};L.raw.a4K=function($){var o=Date.now(),T=$.width,s=$.height,E=0,e=0,n=T,A=s;if($.t50829){var u=$.t50829;
|
|
E=u[1];e=u[0];n=u[3];A=u[2]}if($.t50719){var Y=$.t50719;E+=Y[0]>>1<<1;e+=Y[1]>>1<<1}if($.t50720){var b=$.t50720;
|
|
n=E+b[0];A=e+b[1]}var a=n-E,w=A-e,X=L.raw.afe($),N=$.t33422,z=$.t33421;if(z){var b=z[0],i=N.slice(0);
|
|
for(var k=0;k<b;k++)for(var Q=0;Q<b;Q++){var O=(Q+(E&1))%b,c=(k+(e&1))%b;i[k*b+Q]=N[c*b+O]}N=i}if($.t277[0]==1)L.raw.aiQ(X,T,s,$,N);
|
|
L.raw.QA(2,$,X,T,s);var B=new Float32Array(a*w*3);if($.t277[0]==1){if(z==null){L.Lz.a6F(X,T,s,B,E,e,a,w)}else if(z.length!=2||z[0]!=2||z[1]!=2){console.log("Unknown CFA pattern size",z);
|
|
L.Lz.lx(X,T,s,B,E,e,a,w,z[0],N)}else{var G=$.t33422.join(","),l=0;if(G=="0,1,1,2")l=0;else if(G=="1,0,2,1")l=1;
|
|
else if(G=="2,1,1,0")l=2;else if(G=="1,2,0,1")l=3;else throw"Unknown CFA pattern "+G;if((a&1)!=0||(w&1)!=0)throw"e";
|
|
L.Lz.agD(X,T,s,B,E,e,a,w,l)}}else{for(var k=0;k<w;k++)for(var Q=0;Q<a;Q++){var v=((k+e)*T+Q+E)*3,p=(k*a+Q)*3;
|
|
B[p+0]=X[v+0];B[p+1]=X[v+1];B[p+2]=X[v+2]}}var P=B,h=B.length,j=L.raw.o3($),C=1/j;for(var f=0;f<h;f+=3){B[f]=P[f]*C;
|
|
B[f+1]=P[f+1]*C;B[f+2]=P[f+2]*C}L.raw.QA(3,$,B,a,w);var V=$.fW,d=a,m=w;if(V==1||V==9){}else{var R=L.raw.hY(V,a,w),p=0;
|
|
d=R[0];m=R[1];var g=B.slice(0);for(var k=0;k<m;k++)for(var Q=0;Q<d;Q++){var S=R[2]*Q+R[3]*k+R[4],F=R[5]*Q+R[6]*k+R[7],v=(F*a+S)*3;
|
|
B[p]=g[v];B[p+1]=g[v+1];B[p+2]=g[v+2];p+=3}}return{_3:B,Zf:d,Ns:m}};L.raw.hY=function($,o,T){var s=o,E=T;
|
|
if(!1){}else if($==2)return[o,T,-1,0,o-1,0,1,0];else if($==3)return[o,T,-1,0,o-1,0,-1,T-1];else if($==4)return[o,T,1,0,0,0,-1,T-1];
|
|
else if($==5)return[T,o,0,1,0,1,0,0];else if($==6)return[T,o,0,1,0,-1,0,T-1];else if($==7)return[T,o,0,-1,o-1,-1,0,T-1];
|
|
else if($==8)return[T,o,0,-1,o-1,1,0,0];else throw"unknown orientation "+$};L.raw.aiQ=function($,o,T,s,E){var e=Date.now(),C=0,m=0;
|
|
if(L.raw.o3(s)>4e4){for(var f=0;f<$.length;f++)$[f]>>=1;var n=["t50714","t50715","t50712","t50717"];
|
|
for(var f=0;f<n.length;f++){var A=s[n[f]];if(A)for(var u=0;u<A.length;u++)A[u]>>>=1}console.log("remapping to lower bit depth")}var Y=~~Math.sqrt(E.length),b=[-1,-1,0,-1,0,1,-1,0,0,0,1,0,-1,1,0,1,1,1],a=[];
|
|
for(var w=0;w<Y;w++)for(var X=0;X<Y;X++){var f=w*Y+X,N=E[f],z=4,i=4,k=8,Q=0,O=0;for(var u=0;u<18;u+=2){var c=(Y+X+b[u])%Y,B=(Y+w+b[u+1])%Y,G=E[B*Y+c];
|
|
if(G==N){}else if(z==4){z=G;Q=u}else if(i==4&&G!=z){i=G;O=u;break}}if(i<z){var l=i;i=z;z=l;l=O;O=Q;Q=l}if(z<N){var l=z;
|
|
z=N;N=l;l=Q;Q=k;k=l}if(i<z){var l=i;i=z;z=l;l=O;O=Q;Q=l}a[f*3]=b[k+1]*o+b[k];a[f*3+1]=b[Q+1]*o+b[Q];
|
|
a[f*3+2]=b[O+1]*o+b[O]}var v=~~(.996*L.raw.o3(s)),p=~~(.992*L.raw.o3(s)),P=s.t50728,h=[],j=[0,0,0];for(var w=1;
|
|
w<T-1;w++)for(var X=1;X<o-1;X++){var f=w*o+X,V=w%Y*Y+X%Y,N=$[f+a[V*3+0]],z=$[f+a[V*3+1]],i=$[f+a[V*3+2]],d=Math.max(N,z,i);
|
|
if(d>v)h.push(f);else if(d>p){j[0]+=N;j[1]+=z;j[2]+=i;C++}}if(h.length==0)return;if(C/(o*T)<1e-5){console.log("not enough semi-saturated pixels",C);
|
|
j=P}if(j[1]<j[m])m=1;if(j[2]<j[m])m=2;var R=[j[0]/j[m],j[1]/j[m],j[2]/j[m]],g=$.slice(0);for(var S=0;
|
|
S<h.length;S++){var f=h[S],w=~~(f/o),X=f-w*o,V=w%Y*Y+X%Y,F=Math.min(65535,~~($[f+a[V*3+m]]*R[E[V]]));
|
|
if(F>g[f])g[f]=F}$.set(g)};L.raw.D0=function($,o,T,s){var E=$._3,e=Math.round(E.length/3),n=gP.al1(s[0],s[1]),A=L.raw.a6u(T,n),u=L.tK.multiply(L.tK.UO,A),Y=Math.pow(2,s[2]+(T.t50730?T.t50730[0]:0));
|
|
u=L.tK.multiply(u,L.tK.SE(Y,Y,Y));var b=T.t50728?T.t50728:[1,1,1],a=[b[1]/b[0],b[2]/b[0],b[0]/b[1],b[2]/b[1],b[0]/b[2],b[1]/b[2]],w=new Float64Array(1e3);
|
|
for(var f=0;f<1e3;f++){var X=f*(1/999);X=f==999?1:L.WH(f*(1/999));X=L.raw.AE.aqV(X,s[3]/100);w[f]=X}var N=Date.now();
|
|
for(var f=0;f<e;f++){var z=f<<2,i=z-f,k=E[i],Q=E[i+1],O=E[i+2],c=u[0]*k+u[1]*Q+u[2]*O,B=u[4]*k+u[5]*Q+u[6]*O,G=u[8]*k+u[9]*Q+u[10]*O;
|
|
if(c<0)c=0;else if(c>1)c=1;if(B<0)B=0;else if(B>1)B=1;if(G<0)G=0;else if(G>1)G=1;c=w[~~(c*999)];B=w[~~(B*999)];
|
|
G=w[~~(G*999)];o[z]=~~(.5+c*255);o[z+1]=~~(.5+B*255);o[z+2]=~~(.5+G*255)}};L.raw.AE={aqV:function($,o){var T=.5-.5*Math.cos($*3.2),s=0;
|
|
if(o>0){var E=$*.2;s=E*$+(1-E)*T}else{var e=Math.pow($,.33);s=(1-e)*e+e*($+($-T)*.63)}var n=Math.abs(o);
|
|
return n*s+(1-n)*$},aeZ:function($,o){var T=0;if(o>0){var s=$*1.47,E=Math.pow($,2.4);T=Math.min(1,E*$+(1-E)*s)}else{var s=$*.68,E=Math.pow($,3);
|
|
T=E*$*.5+(1-E)*s}var e=Math.abs(o);return e*T+(1-e)*$},am_:function($,o){var T=0;if(o>0){var s=Math.pow($,.3),E=$;
|
|
T=(1-$)*s+$*E}else{var s=Math.pow($,2.5),e=$,E=$;T=Math.min(1,(1-e)*s+e*E)}var n=Math.abs(o);return n*T+(1-n)*$}};
|
|
L.raw.afe=function($){var o=$.width,T=$.height,s=o*T*$.t277,E=new Uint16Array(s),e=null,n=0;L.raw.abU($,E);
|
|
L.raw.QA(1,$,E,o,T);if($.t50712){e=$.t50712;n=e.length-1;if(e[n]>65535)throw"too big values"}var A=L.raw._S($),u=L.raw.aJ($);
|
|
if(e==null)for(var f=0;f<s;f++)E[f]=Math.max(0,E[f]-A);else for(var f=0;f<s;f++){var Y=E[f];if(Y>n)Y=n;
|
|
Y=e[Y];E[f]=Math.max(0,Y-A)}return E};L.raw._S=function($){var o=$.t50714,T=o?o[0]:0,s=$.t50715,E=$.t50716;
|
|
if(s)T+=s[0][0]/s[0][1];if(E)T+=E[0][0]/E[0][1];return Math.round(T)};L.raw.aJ=function($){var o=null,T=0;
|
|
if($.t50712){o=$.t50712;T=o.length-1}var s=$.t50717?$.t50717[0]:(1<<$.t258[0])-1;if(o)s=Math.min(s,o[T]);
|
|
return s};L.raw.o3=function($){var o=L.raw._S($),T=L.raw.aJ($);return T-o};L.raw.abU=function($,o){var T=o.length,s=$.data,E=$.t258[0];
|
|
if(E!=16&&E!=14&&E!=12&&E!=10&&E!=8)throw"Unsupported Bits Per Sample:"+E;E=Math.round(s.length*8/T);
|
|
if(E==16&&$.isLE){L.w0(s,o);return}for(var f=0;f<T;f+=2){var e=0,n=0,A=0;if(E==16){e=f<<1;n=s[e]<<8|s[e+1];
|
|
A=s[e+2]<<8|s[e+3]}else if(E==14){var u=f*14,Y=u>>>3,b=s[Y]<<24|s[Y+1]<<16|s[Y+2]<<8|s[Y+3];if((u&7)==0){n=b>>>18;
|
|
A=b>>>4&16383}else{n=b>>>14&16383;A=b&16383}}else if(E==12){e=f+(f>>>1);n=s[e]<<4|s[e+1]>>4;A=(s[e+1]&15)<<8|s[e+2]}else if(E==10){var u=f*10,Y=u>>>3;
|
|
if((u&7)==0){n=(s[Y]<<2|s[Y+1]>>6)&1023;A=(s[Y+1]<<4|s[Y+2]>>4)&1023}else{n=(s[Y]<<6|s[Y+1]>>2)&1023;
|
|
A=(s[Y+1]<<8|s[Y+2]>>0)&1023}}else if(E==8){e=f;n=s[e];A=s[e+1]}o[f]=n;o[f+1]=A}};L.raw.QA=function($,o,T,s,E){var e=o["t"+[51008,51009,51022][$-1]],b=0;
|
|
if(e==null)return;var n=s*E,A=t.s,u=t.Eo,Y=new Uint8Array(e),bo=t.s(Y,b);b+=4;for(var a=0;a<bo;a++){var w=A(Y,b);
|
|
b+=4;var X=A(Y,b);b+=4;var N=A(Y,b);b+=4;var z=A(Y,b);b+=4;if(!1){}else if(w==1&&$==3){var i=b,k=A(Y,i);
|
|
i+=4;var Q=u(Y,i);i+=8;var O=u(Y,i);i+=8;var c=u(Y,i);i+=8;var B=u(Y,i);i+=8;var G=u(Y,i);i+=8;var l=u(Y,i);
|
|
i+=8;i+=(k-1)*8*6;var v=u(Y,i);i+=8;var p=u(Y,i);i+=8;var P=v*s,h=p*E,j=Math.max(P,s-P),C=Math.max(h,E-h),V=Math.sqrt(j*j+C*C),d=1/V,m=T.slice(0);
|
|
for(var R=0;R<E;R++)for(var g=0;g<s;g++){var S=(g+.5-P)*d,F=(R+.5-h)*d,r=S*S+F*F,q=Q+O*r+c*(r*r)+B*(r*r)*r,W=G*(2*S*F)+l*(r+2*S*S),Z=l*(2*S*F)+G*(r+2*F*F),I=~~(P+V*(q*S+W)),_=~~(h+V*(q*F+Z)),cN=(_*s+I)*3,ce=(R*s+g)*3;
|
|
T[ce]=m[cN];T[ce+1]=m[cN+1];T[ce+2]=m[cN+2]}}else if(w==3&&$==3){var i=b,gf=u(Y,i);i+=8;var K=u(Y,i);
|
|
i+=8;var cv=u(Y,i);i+=8;var f0=u(Y,i);i+=8;var i8=u(Y,i);i+=8;var v=u(Y,i);i+=8;var p=u(Y,i);i+=8;var P=v*s,h=p*E,j=Math.max(P,s-P),C=Math.max(h,E-h),V=Math.sqrt(j*j+C*C),d=1/V;
|
|
for(var R=0;R<E;R++)for(var g=0;g<s;g++){var S=(g+.5-P)*d,F=(R+.5-h)*d,r=S*S+F*F,b5=1+(gf+(K+(cv+(f0+i8*r)*r)*r)*r)*r,ce=(R*s+g)*3;
|
|
T[ce]=b5*T[ce];T[ce+1]=b5*T[ce+1];T[ce+2]=b5*T[ce+2]}}else if(w==4&&$==1){var i=b,iC=A(Y,i);i+=4;var an=A(Y,i);
|
|
i+=4;for(var f=0;f<n;f++)if(T[f]==iC)T[f]=T[f-2]+T[f+2]>>1}else if(w==5&&$==1){var i=b,cO=A(Y,i);i+=4;
|
|
var bh=A(Y,i);i+=4;var bD=A(Y,i);i+=4;for(var f=0;f<bh;f++){var fq=A(Y,i);i+=4;var fO=A(Y,i);i+=4;var f=fq*s+fO;
|
|
T[f]=T[f-2]+T[f+2]>>1}}else if(w==7&&$==1){var i=b,g6=t.AS(Y,i);i+=16;var hM=A(Y,i);i+=4;var d3=A(Y,i);
|
|
i+=4;var h9=A(Y,i),cs=A(Y,i+4);i+=8;var dv=A(Y,i);i+=4;var ec=new Uint16Array(dv);for(var f=0;f<dv;f++)ec[f]=t.mo(Y,i+2*f);
|
|
var gT=g6.d,iz=g6.w;for(var R=0;R<iz;R+=h9)for(var g=0;g<gT;g+=cs){var f=(g6.y+R)*s+(g6.x+g);T[f]=ec[T[f]]}}else if(w==9&&$==2){var i=b,g6=t.AS(Y,i),cx=!0;
|
|
i+=16;var hM=A(Y,i);i+=4;var d3=A(Y,i);i+=4;var h9=A(Y,i),cs=A(Y,i+4);i+=8;var gw=A(Y,i),iI=A(Y,i+4);
|
|
i+=8;var g2=u(Y,i),bb=u(Y,i+8);i+=16;var ir=u(Y,i),dG=u(Y,i+8);i+=16;var gY=A(Y,i);i+=4;if(gY!=1)throw"more than one map plane";
|
|
var e6=gw*iI,fr=new Float32Array(e6);for(var bt=0;bt<e6;bt++)fr[bt]=t.eO(Y,i+bt*4);for(var bt=0;bt<e6;
|
|
bt++)if(fr[bt]!=1)cx=!1;if(!cx){var gT=g6.d,iz=g6.w,ci=.9999*(iI-1)/gT,gv=.9999*(gw-1)/iz;for(var R=0;
|
|
R<iz;R+=h9)for(var g=0;g<gT;g+=cs){var f=(g6.y+R)*s+(g6.x+g),gu=g*ci,ak=R*gv,hP=Math.floor(gu),ai=Math.floor(ak),hK=gu-hP,h3=ak-ai,ce=ai*iI+hP,e4=fr[ce]*(1-hK)+fr[ce+1]*hK,co=fr[ce+iI]*(1-hK)+fr[ce+1+iI]*hK,aO=e4*(1-h3)+co*h3;
|
|
T[f]=Math.max(0,Math.min(65535,~~(T[f]*aO+.5)))}}}else console.log("Unknown opcode "+w+" in OpcodeList"+$+". Length: "+z);
|
|
b+=z}};L.raw.a6u=function($,o){var T=gP.Wz(o),s=L.raw.bw($,o),E=L.tK.lY(s),e=gP.anQ(T,gP.Wz(gP.afO)),n=L.tK.multiply(e,E);
|
|
return n};L.raw.aie=function($){var o=($.t50728?$.t50728:[1,1,1]).slice(0),s=1;o.push(0);var T={x:.34567,y:.3585};
|
|
do{var E=L.tK.lY(L.raw.bw($,T)),e=L.tK.OG(E,o),n=gP.a8d(e);s=Math.abs(T.x-n.x)+Math.abs(T.y-n.y);T=n}while(s>1e-7);
|
|
return T};L.raw.bw=function($,o){var T=gP.jT(o),s=L.raw.aen,E=$.t50778?$.t50778[0]:0,e=$.t50779?$.t50779[0]:0,n=s($.t50721,$.t50722,E,e,T.xO),A=s($.t50723,$.t50724,E,e,T.xO);
|
|
n=n||[1,0,0,0,1,0,0,0,1];A=A||[1,0,0,0,1,0,0,0,1];var u=$.t50727?[$.t50727[0],0,0,0,$.t50727[1],0,0,0,$.t50727[2]]:[1,0,0,0,1,0,0,0,1];
|
|
return L.tK.multiply(L.tK.v6(u),L.tK.multiply(L.tK.v6(A),L.tK.v6(n)))};L.raw.aen=function($,o,T,s,E){if(!$&&!o){return null}else if($&&!o){return $}else if(E<T){return $}else if(E>s){return o}else{var e=(1/E-1/s)/(1/T-1/s),n=1-e,A=[];
|
|
for(var f=0;f<9;f++)A[f]=$[f]*e+o[f]*n;return A}};var gP={};gP.afO={x:.34567,y:.3585};gP.mx=[{i:0,eE:.18006,ed:.26352,KR:-.24341},{i:10,eE:.18066,ed:.26589,KR:-.25479},{i:20,eE:.18133,ed:.26846,KR:-.26876},{i:30,eE:.18208,ed:.27119,KR:-.28539},{i:40,eE:.18293,ed:.27407,KR:-.3047},{i:50,eE:.18388,ed:.27709,KR:-.32675},{i:60,eE:.18494,ed:.28021,KR:-.35156},{i:70,eE:.18611,ed:.28342,KR:-.37915},{i:80,eE:.1874,ed:.28668,KR:-.40955},{i:90,eE:.1888,ed:.28997,KR:-.44278},{i:100,eE:.19032,ed:.29326,KR:-.47888},{i:125,eE:.19462,ed:.30141,KR:-.58204},{i:150,eE:.19962,ed:.30921,KR:-.70471},{i:175,eE:.20525,ed:.31647,KR:-.84901},{i:200,eE:.21142,ed:.32312,KR:-1.0182},{i:225,eE:.21807,ed:.32909,KR:-1.2168},{i:250,eE:.22511,ed:.33439,KR:-1.4512},{i:275,eE:.23247,ed:.33904,KR:-1.7298},{i:300,eE:.2401,ed:.34308,KR:-2.0637},{i:325,eE:.24792,ed:.34655,KR:-2.4681},{i:350,eE:.25591,ed:.34951,KR:-2.9641},{i:375,eE:.264,ed:.352,KR:-3.5814},{i:400,eE:.27218,ed:.35407,KR:-4.3633},{i:425,eE:.28039,ed:.35577,KR:-5.3762},{i:450,eE:.28863,ed:.35714,KR:-6.7262},{i:475,eE:.29685,ed:.35823,KR:-8.5955},{i:500,eE:.30505,ed:.35907,KR:-11.324},{i:525,eE:.3132,ed:.35968,KR:-15.628},{i:550,eE:.32129,ed:.36011,KR:-23.325},{i:575,eE:.32931,ed:.36038,KR:-40.77},{i:600,eE:.33724,ed:.36051,KR:-116.45}];
|
|
gP.jT=function($){var o=gP.mx,T=2*$.x/(1.5-$.x+6*$.y),s=3*$.y/(1.5-$.x+6*$.y),E=0,e=0,n=0;for(;n<31;
|
|
n++){E=s-o[n].ed-o[n].KR*(T-o[n].eE);if(n>0&&E<0){break}e=E}while(n>=o.length)n--;E/=Math.sqrt(1+o[n].KR*o[n].KR);
|
|
e/=Math.sqrt(1+o[n-1].KR*o[n-1].KR);var A=e/(e-E),u=1e6/((o[n].i-o[n-1].i)*A+o[n-1].i),Y=T-((o[n].eE-o[n-1].eE)*A+o[n-1].eE),b=s-((o[n].ed-o[n-1].ed)*A+o[n-1].ed),a=Math.sqrt(1+o[n].KR*o[n].KR),w=1/a,X=o[n].KR/a,N=Math.sqrt(1+o[n-1].KR*o[n-1].KR),z=1/N,i=o[n-1].KR/N,k=(w-z)*A+z,Q=(X-i)*A+i,O=Math.sqrt(k*k+Q*Q);
|
|
k/=O;Q/=O;var c=(Y*k+b*Q)*-3e3;return{xO:u,sw:c}};gP.al1=function($,o){var T=gP.mx,s=1e6/$,E=1;for(;
|
|
E<31;E++){if(s<T[E].i){break}}var e=(T[E].i-s)/(T[E].i-T[E-1].i),n=(T[E-1].eE-T[E].eE)*e+T[E].eE,A=(T[E-1].ed-T[E].ed)*e+T[E].ed,u=Math.sqrt(1+T[E].KR*T[E].KR),Y=1/u,b=T[E].KR/u,a=Math.sqrt(1+T[E-1].KR*T[E-1].KR),w=1/a,X=T[E-1].KR/a,N=(w-Y)*e+Y,z=(X-b)*e+b,i=Math.sqrt(N*N+z*z);
|
|
N/=i;z/=i;n+=N*o/-3e3;A+=z*o/-3e3;return{x:1.5*n/(n-4*A+2),y:A/(n-4*A+2)}};gP.a8d=function($){var o=$[0]+$[1]+$[2];
|
|
return{x:$[0]/o,y:$[1]/o}};gP.Wz=function($){return{x:$.x/$.y,y:1,nc:(1-$.x-$.y)/$.y}};gP.anQ=function($,o){var T=L.tK.v6([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),s=[$.x,$.y,$.nc,0],E=[o.x,o.y,o.nc,0];
|
|
s=L.tK.OG(T,s);E=L.tK.OG(T,E);var e=E[0]/s[0],n=E[1]/s[1],A=E[2]/s[2],u=L.tK.v6([e,0,0,0,n,0,0,0,A]),Y=L.tK.lY(T);
|
|
return L.tK.multiply(L.tK.multiply(Y,u),T)};L.raw.hl={};L.raw.uA=function($){$*=8;var o=[8,10,12,14,16];
|
|
for(var T in L.raw.IJ){var s=L.raw.IJ[T];if(s.length==4)continue;var E=s[4],e=s[5];for(var f=0;f<o.length;
|
|
f++)if(E*e*o[f]==$)return[T,o[f]]}var n=[[4e3,3e3]];for(var f=0;f<n.length;f++){var s=n[f],E=s[0],e=s[1];
|
|
for(var f=0;f<o.length;f++)if(E*e*o[f]==$)return[s,o[f]]}return null};L.raw.aiO=function($){var $=new Uint8Array($);
|
|
for(var f=0;f<$.length;f+=2){var o=$[f];$[f]=$[f+1];$[f+1]=o}var T=L.raw.uA($.length),s=L.raw.IJ[T[0]];
|
|
if(s==null)s=[[8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354],0,1e3,64383,T[0][0],T[0][1]];var E=s[4],e=s[5],n=Math.max(s[2],116),A={data:$,fW:1,width:E,height:e,t256:[E],t257:[e],t258:[T[1]],t277:[1],t33421:[2,2],t33422:L.raw.zc[s[1]],t50706:[1,2,0,0],t50714:[n,n,n,n],t50717:[s[3]],t50721:s[0].slice(0),t50723:[1,0,0,0,1,0,0,0,1],t50728:[.64,1,.46],t50778:[17]};
|
|
for(var f=0;f<9;f++)A.t50721[f]/=1e4;return A};L.raw.e2=function($){if($==null||$.length==0||typeof $[0]=="number")return $;
|
|
var o=[];for(var f=0;f<$.length;f++)o[f]=$[f][1]==0?0:$[f][0]/$[f][1];return o};L.raw.zc=[[2,1,1,0],[0,1,1,2],[1,0,2,1],[1,2,0,1]];
|
|
L.raw.normalize=function($,o){if($.t50706!=null||$.t271[0].startsWith("Hasselblad")){var T=[50714,50718,50719,50720,50721,50722,50723,50724,50727,50728,50730,50731,50732,50734,50736,50738,50739,50780,50964,50965];
|
|
for(var f=0;f<T.length;f++)if($["t"+T[f]]!=null)$["t"+T[f]]=L.raw.e2($["t"+T[f]]);if($.t271&&$.t271[0].startsWith("Hasselblad")){$.t50706=[1,2,0,0];
|
|
$.t33422=L.raw.zc[1];$.t50723=[1,0,0,0,1,0,0,0,1];$.t50778=[17];if(!$.isLE)for(var f=0;f<$.data.length;
|
|
f+=2){var s=$.data[f];$.data[f]=$.data[f+1];$.data[f+1]=s}}return}var E=$.t258[0],e=$.exifIFD,o=new Uint8Array(o);
|
|
$.t50706=[1,2,0,0];var n=$.t272[0].trim();if(n.indexOf(" ")==-1)n=$.t271[0].trim()+" "+n;if($.t50708==null)$.t50708=[n];
|
|
var A=n.toLowerCase(),u=L.raw.IJ,Y=u[A];if(Y==null)for(var b in u)if(A.startsWith(b))Y=u[b];if(Y==null)alert("Unknown camera:"+n);
|
|
else{var a=Y[2];$.t50714=[a,a,a,a];$.t50717=[Y[3]];$.t50721=Y[0].slice(0);for(var f=0;f<9;f++)$.t50721[f]=$.t50721[f]*(1/1e4)}$.t50723=[1,0,0,0,1,0,0,0,1];
|
|
if($.t50728==null)$.t50728=[.35,1,.6];$.t50778=[17];if($.t271[0].startsWith("SONY")){var w=UTIF["_bin"+($.isLE?"LE":"BE")],X=$.t28688,c;
|
|
if(JSON.stringify(X)!="[8000,10400,12900,14100]")console.log(X);if(X){var N=[0,0,0,0,0,4095],z=new Uint16Array(16385);
|
|
for(var f=0;f<4;f++){var i=X[f]>>>2;N[f+1]=i;if(i>4095)throw"e"}for(var f=0;f<16385;f++)z[f]=f;for(var f=0;
|
|
f<5;f++)for(var k=N[f]+1;k<=N[f+1];k++)z[k]=z[k-1]+(1<<f);var Q=o.length*8<$.width*$.height*E;if(Q)$.t50712=z}else console.log("no curve");
|
|
var O=$.dngPrvt;if(O){var B=O.t29184[0],G=O.t29185[0],l=($.isLE?t.cX:t.s)(O.t29217,0),v=new Uint32Array(o.slice(B,B+(G&4294967292)).buffer),p=new Uint32Array(G>>>2);
|
|
L.raw.aaD(v,p,G>>>2,l);var P=new Uint8Array(B+G);P.set(new Uint8Array(p.buffer),B);var h=[];UTIF._readIFD(w,P,B,h,0,!1);
|
|
var j=h.pop(),C=j.t29458;$.t50728=[C[1]/C[0],1,C[1]/C[3]];$.t50730=[.5];var V=j.t29891;$.t50829=[V[1],V[0],V[3],V[2]]}else if(e.makerNote&&e.makerNote.t8208){var c=e.makerNote,d=c.t8208,m=d.length,R=0,g=new Uint8Array(256);
|
|
for(var f=249;f<256;f++)g[f]=f;for(var f=0;f<249;f++)g[f*f*f%249]=f;for(var f=0;f<m;f++)d[f]=g[d[f]];
|
|
if(m==6604)R=612;else throw"e";var C=[];for(var f=0;f<3;f++)C.push(t.UG(d,R+f*2));console.log(C);$.t50728=[C[1]/C[0],1,C[1]/C[2]]}else console.log("no white balance");
|
|
if($.width*$.height*1.5==$.t279[0]){a=a>>>2;$.t50714=[a,a,a,a];$.t50717=[Y[3]>>>2]}}else if($.t271[0].startsWith("Canon")){var o=$.data,S=o.slice(0),F=$.t50752,r=[],W=0;
|
|
if(F==null||F[0]==0&&F[1]==0)r.push($.width);else{for(var f=0;f<F[0];f++)r.push(F[1]);r.push(F[2])}var q=$.width*2;
|
|
for(var Z=0;Z<r.length;Z++){var I=r[Z],_=2*W,cN=2*I;for(var ce=0;ce<$.height;ce+=2){var gf=ce*q+_,K=$.height*_+(ce>>1)*cN*2;
|
|
for(var f=0;f<cN;f++){o[gf+f]=S[K+f];o[gf+f+q]=S[K+f+cN]}}W+=I}var c=e.makerNote;if(c.t16385){var cv=c.t224,b5=0;
|
|
if(cv){$.t50719=[cv[5],cv[6]];$.t50720=[cv[7]+1-cv[5],cv[8]+1-cv[6]]}var f0=c.t16385,i8=f0.length;if(i8==582)b5=1;
|
|
else if(i8==653)b5=2;else if(i8==796)b5=3;else if([692,674,702,1227,1250,1251,1337,1338,1346].indexOf(i8)!=-1)b5=4;
|
|
else if(i8==5120){b5=5;f0=new Int16Array(f0.slice(0).buffer)}else if(i8==1273||i8==1275)b5=6;else if([1312,1313,1316,1506].indexOf(i8)!=-1)b5=7;
|
|
else if([1560,1592,1353,1602].indexOf(i8)!=-1)b5=8;else throw"e"+i8;var iC=f0[0],an=[null,[25,166],[34,286],[63,196],[63],[71,iC==-4?333:264],[63,251],[63,iC==10?504:728],[63,326]],R=an[b5][0],cO=an[b5][1];
|
|
if(b5==4){if(f0[0]==2)cO=231;else if(f0[0]==3)cO=231;else if(f0[0]==4)cO=231;else if(f0[0]==5)cO=231;
|
|
else if(f0[0]==6)cO=231;else if(f0[0]==7)cO=231;else if(f0[0]==9)cO=231;else throw"e"}$.t50728=[f0[R+1]/f0[R],1,f0[R+1]/f0[R+3]];
|
|
var a=cO==null?1024:f0[cO];if(b5!=4)$.t50714=[a,a,a,a]}else{$.t50728=[.4,1,.6]}}else if($.t271[0].startsWith("NIKON")){var c=e.makerNote,bh=$.isLE?t.UG:t.FU,d3=0,h9=0,gT,dG=0;
|
|
if(c.t61){var bD=c.t61,fq=[];for(var f=0;f<4;f++)fq[f]=bD[f]/Math.pow(2,14-E);$.t50714=fq}if(c.t3585){var fO=c.t3585,f=0,B=22;
|
|
while(B<fO.length&&f!=-4){var g6=t.cX(fO,B);B+=4;B+=14;f=t.cX(fO,B)-4;B+=4;if(g6==1990472198){if(fO[B]!=0)throw"Flip"}if(g6==1990472199){var hM=t.UG(fO,B);
|
|
if(hM==0)$.fW=1;else if(hM==270)$.fW=8;else throw"e "+hM}B+=f}}if(c.t183){var cs=c.t183,dv=[];for(var f=0;
|
|
f<6;f++)dv.push(bh(cs,16+f*2));d3=dv[0];h9=dv[1]}if(c.t3614){var ec=c.t3614;d3=t.cX(ec,8);h9=t.cX(ec,12)}if(d3!=0){if(d3<h9){var s=d3;
|
|
d3=h9;h9=s}var W=$.width-d3>>>1,ce=$.height-h9>>>1;$.t50829=[ce,W,ce+h9,W+d3]}if(c.t12){var iz=L.raw.e2(c.t12);
|
|
gT=[1/iz[0],1,1/iz[1]]}else if(c.t151){var gw=L.raw.a3n(c,151),iI=gw[0],cH=gw[1],g2=gw[2];if(iI=="0100"&&cH>=80)throw"e";
|
|
else if(iI=="0102"){var bb=[];for(var f=0;f<4;f++)bb.push(bh(g2,6+f*2));gT=[bb[1]/bb[0],1,bb[1]/bb[3]]}else if(iI=="0103"&&cH>=26){var bb=[];
|
|
for(var f=0;f<4;f++)bb.push(bh(g2,16+f*2));gT=[bb[1]/bb[0],1,bb[3]/bb[2]]}else if(iI=="0204"&&cH>=564||iI=="0205"&&cH>=284){var B=iI=="0204"?6:14,bb=[];
|
|
for(var f=0;f<4;f++)bb.push(bh(g2,B+f*2));gT=[bb[1]/bb[0],1,bb[1]/bb[3]]}else throw"e"}else console.log("no white balance info");
|
|
if(n=="NIKON D1")gT=[1,1,1];if(gT)$.t50728=gT;var ir=c.t150?c.t150:c.t140;if(ir){var gY=ir[dG++],e6=ir[dG++],cx;
|
|
if(gY==73||e6==88)dG+=2110;dG+=8;var fr=1<<E&32767,bt=bh(ir,dG);dG+=2;var z=[];if(bt>1)cx=Math.floor(fr/(bt-1));
|
|
if(gY==68&&e6==32&&cx>0){for(f=0;f<bt;f++){z[f*cx]=bh(ir,dG);dG+=2}for(f=0;f<fr;f++)z[f]=Math.floor((z[f-f%cx]*(cx-f%cx)+z[f-f%cx+cx]*(f%cx))/cx)}else if(gY!=70&&bt<=16385){fr=bt;
|
|
for(var f=0;f<bt;f++)z[f]=bh(ir,dG+2*f);dG+=2*bt}if(z.length!=0)$.t50712=new Uint16Array(z);else if($.t272[0]=="NIKON D750")$.t50717[0]*=4}}else if(n.startsWith("FujiFilm")){}else alert("Unknown camera "+n)};
|
|
L.raw.aaD=function($,o,T,s){if(0==T)return;var E=new Uint32Array(128),e=new Uint8Array(E.buffer),n=127,A=0,u=0;
|
|
for(var n=0;n<4;n++)E[n]=s=(s*15625>>>0)*3125+1>>>0;E[3]=E[3]<<1|(E[0]^E[2])>>>31;for(var n=4;n<127;
|
|
n++)E[n]=(E[n-4]^E[n-2])<<1|(E[n-3]^E[n-1])>>>31;for(var n=0;n<127;n++)E[n]=t.s(e,n*4);for(;T>0;T--){E[n&127]=E[n+1&127]^E[n+1+64&127];
|
|
var Y=E[n&127],b=$[A];b^=Y;o[u]=b;A++;u++;n++}};L.raw.aae=function($,o){var T=t.en(o,0,4),s=L.raw.agP;
|
|
for(var f=0;f<s.length;f++)if(s[f][0]==$&&T.startsWith(s[f][1])&&(s[f][2]==0||s[f][2]==o.length))return s[f];
|
|
throw"e"};L.raw.aoB=function($){if($.t29==null)return[];var o=L.raw.a2s,T=L.raw.aeQ,s=$.t29[0],E=0,n=0;
|
|
for(var f=0;f<s.length;f++){var e=s.charCodeAt(f);E=E*10+(48<=e&&e<=57?e-48:e%10)}var cH=$.t167[0];for(var f=0;
|
|
f<4;f++)n^=cH>>>(f<<3)&255;var A=o[E&255],u=T[n&255];return[A,u,96]};L.raw.a3n=function($,o){var T=$["t"+o],cH=T.length,s=L.raw.aae(o,T),E=t.en(T,0,4),e,n=s[4];
|
|
if(n==null)e=T.slice(4);else{e=new Uint8Array(cH-n);var A=L.raw.aoB($),u=A[0],Y=A[1],b=A[2];for(var f=0;
|
|
f<e.length;f++){Y=Y+u*b++&255;e[f]=T[n++]^Y}}return[E,cH,e]};L.raw.agP=[[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]];
|
|
L.raw.a2s=[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];
|
|
L.raw.aeQ=[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];
|
|
L.raw.IJ={"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 gfx100s":[[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]};
|
|
L.eG={};L.eG.eG=function($,o,T,s,E){if(s==null)s=3;if(E==null)E=!0;var e=$.d,n=$.w,A=1/e,u=e*n,Y=Date.now(),b=!1,a=L.eG.BX(T,e,n,255,128),w=L.eG.BX(T,e,n,0,128),gf=0;
|
|
if(b)console.log("extract contours",Date.now()-Y);Y=Date.now();var X=function(fr,bt){var cx=fr<<2,ci=bt<<2;
|
|
return o[cx]+o[cx+1]+o[cx+2]-(o[ci]+o[ci+1]+o[ci+2])};a.sort(X);w.sort(X);var N=L.G(u),z=L.G(u),i=[],k=new Uint32Array(e*n);
|
|
k.fill(4294967295);for(var f=0;f<u;f++)if(T[f]==0)z[f]=255;else if(T[f]==255)N[f]=255;else{k[f]=i.length;
|
|
i.push(f)}var Q=a.length,O=w.length,c=i.length;function B(fr,bt,cx,ci){var gv=fr.length,gu=new Array(gv*2);
|
|
for(var f=0;f<gv;f++){var R=fr[f],g=~~(R*ci),S=R-g*cx,dG=R<<2;gu[f*2]=S<<16|g;gu[f*2+1]=bt[dG]<<16|bt[dG+1]<<8|bt[dG+2]}return gu}var G=B(a,o,e,A),l=B(w,o,e,A),v=B(i,o,e,A);
|
|
if(b)console.log("Itemize",Date.now()-Y,"Unknown:",c,Q,O);Y=Date.now();var p=L.style.zJ(N,e,n,!0),P=L.style.zJ(z,e,n,!0),h=new Array(c),j=new Array(c),C=new Array(c),V=new Array(c),d=new Array(c);
|
|
if(b)console.log("Dist transform",Date.now()-Y);Y=Date.now();var m=L.eG.Uq;for(var f=0;f<c;f++){var R=i[f],g=~~(R*A),S=R-g*e,F=p[R<<1],r=p[(R<<1)+1],q=Math.sqrt(F*F+r*r),W=P[R<<1],Z=P[(R<<1)+1],I=Math.sqrt(W*W+Z*Z);
|
|
h[f]=1/q;j[f]=1/I;var _=Math.floor(L.R.Po(R*17)*Q),cN=Math.floor(L.R.Po(R*19)*O);C[f]=_;V[f]=cN;d[f]=m(v[f*2],v[f*2+1],G[_*2],G[_*2+1],l[cN*2],l[cN*2+1],h[f],j[f],1e9)}var ce=[-e-1,-e,-e+1,-1,1,e-1,e,e+1];
|
|
while(Math.floor(Math.max(Q,O)*Math.pow(.5,gf))>1)gf++;for(var K=0;K<s;K++){var cv=0;for(var f=0;f<c;
|
|
f++){var R=i[f],g=~~(R*A),S=R-g*e,f0=h[f],i8=j[f],b5=v[f*2],iC=v[f*2+1],an=d[f],_=C[f],cN=V[f],g6=1;
|
|
if(g!=0&&S!=0&&S!=e-1&&g!=n-1)for(var cO=0;cO<8;cO++){var bh=k[R+ce[cO]];if(bh==4294967295)continue;
|
|
var bD=C[bh],fq=V[bh];if(bD==_&&fq==cN)continue;var fO=m(b5,iC,G[bD*2],G[bD*2+1],l[fq*2],l[fq*2+1],f0,i8,an);
|
|
if(fO<an){an=fO;_=bD;cN=fq}}for(var hM=0;hM<gf;hM++){var d3=~~(Q*g6),h9=~~(O*g6);g6*=.5;var cs=L.R.Po(R+K*17+hM*31),dv=L.R.Po(R+K*29+hM*63),ec=Math.max(0,_-d3),gT=Math.min(_+d3,Q-1),iz=Math.max(0,cN-h9),gw=Math.min(cN+h9,O-1),bD=ec+~~(cs*(gT-ec)),fq=iz+~~(dv*(gw-iz)),fO=m(b5,iC,G[bD*2],G[bD*2+1],l[fq*2],l[fq*2+1],f0,i8,an);
|
|
if(fO<an){an=fO;_=bD;cN=fq}}d[f]=an;C[f]=_;V[f]=cN;cv+=an}}if(b)console.log(cv);if(b)console.log("iterations",Date.now()-Y);
|
|
Y=Date.now();var iI=T.slice(0);for(var f=0;f<c;f++){var g2=L.eG.alpha(v[f*2+1],G[C[f]*2+1],l[V[f]*2+1]);
|
|
iI[i[f]]=~~(.5+255*g2)}iI=L.Xs.alp(iI,o,new df(0,0,e,n),16,.01*.01);if(b)console.log("guided filter",Date.now()-Y);
|
|
Y=Date.now();if(E)for(var f=0;f<u;f++)if(T[f]==255||T[f]==0)iI[f]=T[f];var bb=o.slice(0);for(var f=0;
|
|
f<c;f++){var ir=i[f],_=a[C[f]],an=d[f],dG=ir<<2,gY=iI[ir],e6=(gY>=250?ir:_)<<2;bb[dG]=o[e6];bb[dG+1]=o[e6+1];
|
|
bb[dG+2]=o[e6+2]}L.aM(iI,bb,3);if(b)console.log(Date.now()-Y);Y=Date.now();return bb};L.eG.Uq=function($,o,T,s,E,e,n,A,u){var Y=$>>>16,b=$&65535,a=Y-(T>>>16),w=b-(T&65535),X=Y-(E>>>16),N=b-(E&65535),z=Math.sqrt(a*a+w*w)*n,i=Math.sqrt(X*X+N*N)*A;
|
|
if(z+i>=u)return 1e9;var k=L.eG.akM(o,s,e);return k+z+i};L.eG.akM=function($,o,T){var s=$>>>16,E=$>>>8&255,e=$&255,n=o>>>16,A=o>>>8&255,u=o&255,Y=T>>>16,b=T>>>8&255,a=T&255,w=L.eG.alpha($,o,T),X=s-(w*n+(1-w)*Y),N=E-(w*A+(1-w)*b),z=e-(w*u+(1-w)*a);
|
|
return Math.sqrt(X*X+N*N+z*z)};L.eG.alpha=function($,o,T){var s=$>>>16,E=$>>>8&255,e=$&255,n=o>>>16,A=o>>>8&255,u=o&255,Y=T>>>16,b=T>>>8&255,a=T&255,w=n-Y,X=A-b,N=u-a,z=s-Y,i=E-b,k=e-a,Q=w*w+X*X+N*N,O=Q==0?.5:(z*w+i*X+k*N)/Q;
|
|
return Math.max(0,Math.min(1,O))};L.eG.acb=function($){};L.eG.BX=function($,o,T,s,E){var e=[],n=o-1,A=T-1;
|
|
for(var u=1;u<A;u++)for(var Y=1;Y<n;Y++){var f=u*o+Y;if($[f]==s&&($[f-o-1]==E||$[f-o]==E||$[f-o+1]==E||($[f-1]==E||$[f+1]==E)||($[f+o-1]==E||$[f+o]==E||$[f+o+1]==E)))e.push(f)}return e};
|
|
L.Xs={};L.Xs.ak7=function($,o,T,s,E){var e=T.d,n=T.w,A=e*n,u=L.Xs.CM,Y=L.G(A*4),b;L.wr(Y,4294967295);
|
|
var a=T,w=$,X=o,N=s;L.aM($,Y,0);b=L.tk(Y,T);b=L.tk(b._3,b.rect);a=b.rect;N=s>>>2;console.log(a,N);w=L.G(a.Y());
|
|
L.Ge(b._3,w,0);L.aM(o,Y,0);b=L.tk(Y,T);b=L.tk(b._3,b.rect);X=L.G(a.Y());L.Ge(b._3,X,0);var z=L.Xs.a5a(w,X,a,N,E),i=z[0],k=z[1],Q=new df(0,0,a.d*2,a.w*2);
|
|
i=u(i,a,Q,!0);i=u(i,Q,T,!0);k=u(k,a,Q,!0);k=u(k,Q,T,!0);var O=L.G(A);for(var f=0;f<A;f++)O[f]=Math.max(0,Math.min(255,Math.floor(.5+(i[f]*o[f]+255*k[f]))));
|
|
return O};L.Xs.CM=function($,o,T,s){var E=T.d,e=T.w,n=o.d,A=o.w,u=L.Xs.WC,Y=new Float32Array(E*e);for(var b=0;
|
|
b<A;b++){var a=(b+b)*E;for(var w=0;w<n;w++){if(!0||w==0||b==0||w==n-1||b==A-1)Y[a]=Y[a+1]=Y[a+E]=Y[a+E+1]=$[b*n+w];
|
|
else{Y[a]=u(w+.25,b+.25,$,n,A);Y[a+1]=u(w+.75,b+.25,$,n,A);Y[a+E]=u(w+.25,b+.75,$,n,A);Y[a+E+1]=u(w+.75,b+.75,$,n,A)}a+=2}}return Y};
|
|
L.Xs.WC=function($,o,T,s,E){$-=.499999;o-=.499999;var e=Math.floor($),n=Math.floor(o),A=n*s+e,u=$-e,Y=o-n,b=(1-Y)*(1-u),a=(1-Y)*u,w=Y*(1-u),X=Y*u;
|
|
if(T[A]==null||T[A+s+1]==null){console.log($,o,s,E);throw"e"}return b*T[A+0]+a*T[A+1]+w*T[A+s+0]+X*T[A+s+1]};
|
|
L.Xs.a5a=function($,o,T,s,E){var e=T.d,n=T.w,A=e*n,u=L.Xs.wQ,Y=L.Xs.G,b=L.Ja.Jf,a=L.Xs.Zi,o=u(o),$=u($),w=Y(A);
|
|
b(o,w,T,s);var X=Y(A);b($,X,T,s);var N=Y(A);a(o,o,N);b(N,N,T,s);var z=Y(A);a(o,$,z);b(z,z,T,s);var i=Y(A),k=Y(A);
|
|
for(var f=0;f<A;f++){var Q=w[f],O=X[f],c=N[f]-Q*Q,B=z[f]-Q*O,G=B/(c+E),l=O-G*Q;i[f]=G;k[f]=l}var v=Y(A);
|
|
b(i,v,T,s);var p=Y(A);b(k,p,T,s);return[v,p]};L.Xs.alp=function($,o,T,s,E){var e=T.d,n=T.w,A=e*n,u=L.Xs.CM,Y=Date.now(),b=!1,a=T,w=$,X=o,N=s;
|
|
a=new df(0,0,e>>>2,n>>>2);N=s>>>2;w=L.Xs.a3a($,e,n);X=L.Xs.aqZ(o,e,n);if(b)console.log(Date.now()-Y);
|
|
Y=Date.now();var z=L.Xs.a8m(w,X,a,N,E),i=z[0],k=z[1],Q=z[2],O=z[3];if(b)console.log(Date.now()-Y);Y=Date.now();
|
|
var c=L.G(A);for(var B=0;B<n;B++)for(var G=0;G<e;G++){var f=B*e+G,l=(B>>>2)*(e>>>2)+(G>>>2),v=f<<2,p=i[l]*o[v]+k[l]*o[v+1]+Q[l]*o[v+2]+O[l]*255;
|
|
c[f]=Math.max(0,Math.min(255,~~(.5+p)))}if(b)console.log(Date.now()-Y);Y=Date.now();return c};L.Xs.a3a=function($,o,T){var s=o>>>2,E=T>>>2,e=L.G(o*T);
|
|
for(var n=0;n<E;n++)for(var A=0;A<s;A++)e[n*s+A]=$[n*o+A<<2];return e};L.Xs.aqZ=function($,o,T){var s=o>>>2,E=T>>>2,e=L.G(o*T*4);
|
|
for(var n=0;n<E;n++)for(var A=0;A<s;A++){var u=n*s+A<<2,Y=n*o+A<<4;e[u]=$[Y];e[u+1]=$[Y+1];e[u+2]=$[Y+2];
|
|
e[u+3]=$[Y+3]}return e};L.Xs.a8m=function($,o,T,s,E){var e=T.d,n=T.w,A=e*n,u=L.Xs.wQ,Y=L.Xs.G,b=L.Ja.Jf,a=L.Xs.Zi,$=u($),w=new L.uR(e*n);
|
|
L.KT(o,w);var o=[u(w.i),u(w.m),u(w.P)],X=L.Xs.acP($,o,T,s,E),N=Y(A);b($,N,T,s);var z=Y(A);a(o[0],$,z);
|
|
b(z,z,T,s);var i=Y(A);a(o[1],$,i);b(i,i,T,s);var k=Y(A);a(o[2],$,k);b(k,k,T,s);var Q=Y(A),O=Y(A),c=Y(A),B=Y(A);
|
|
for(var f=0;f<A;f++){var G=N[f],l=X._e[f],v=X.s$[f],p=X.bJ[f],P=z[f]-l*G,h=i[f]-v*G,j=k[f]-p*G;Q[f]=X.akx[f]*P+X.TK[f]*h+X.DW[f]*j;
|
|
O[f]=X.TK[f]*P+X.aff[f]*h+X.mu[f]*j;c[f]=X.DW[f]*P+X.mu[f]*h+X.amH[f]*j;B[f]=G-Q[f]*l-O[f]*v-c[f]*p}b(Q,Q,T,s);
|
|
b(O,O,T,s);b(c,c,T,s);b(B,B,T,s);return[Q,O,c,B]};L.Xs.acP=function($,o,T,s,E){var e=T.d,n=T.w,A=e*n,u=L.Xs.G,Y=L.Ja.Jf,b=L.Xs.Zi,a={};
|
|
a._e=u(A);Y(o[0],a._e,T,s);a.s$=u(A);Y(o[1],a.s$,T,s);a.bJ=u(A);Y(o[2],a.bJ,T,s);var w=u(A);b(o[0],o[0],w);
|
|
Y(w,w,T,s);var X=u(A);b(o[0],o[1],X);Y(X,X,T,s);var N=u(A);b(o[0],o[2],N);Y(N,N,T,s);var z=u(A);b(o[1],o[1],z);
|
|
Y(z,z,T,s);var i=u(A);b(o[1],o[2],i);Y(i,i,T,s);var k=u(A);b(o[2],o[2],k);Y(k,k,T,s);a.akx=w;a.TK=X;
|
|
a.DW=N;a.aff=z;a.mu=i;a.amH=k;for(var f=0;f<A;f++){var Q=a._e[f],O=a.s$[f],c=a.bJ[f],B=w[f]-Q*Q+E,G=X[f]-Q*O,l=N[f]-Q*c,v=z[f]-O*O+E,p=i[f]-O*c,P=k[f]-c*c+E,h=v*P-p*p,j=p*l-G*P,C=G*p-v*l,V=B*P-l*l,d=l*G-B*p,m=B*v-G*G,R=h*B+j*G+C*l,g=1/R;
|
|
a.akx[f]=h*g;a.TK[f]=j*g;a.DW[f]=C*g;a.aff[f]=V*g;a.mu[f]=d*g;a.amH[f]=m*g}return a};L.Xs.G=function($){return new Float32Array($)};
|
|
L.Xs.wQ=function($){var o=$.length,T=new Float32Array(o);for(var f=0;f<o;f++)T[f]=$[f]*(1/255);return T};
|
|
L.Xs.Zi=function($,o,T){for(var f=0;f<$.length;f++)T[f]=$[f]*o[f]};L.gE={};L.gE.wp=function($,o,T,s){var E=$[o]-T[s],e=$[o+1]-T[s+1],n=$[o+2]-T[s+2];
|
|
return Math.sqrt(E*E+e*e+n*n)*(1/441.7)};L.gE.getSelection=function($,o,T){var s=o*T,E=L.G(s),e=!1,n=Math.round(T*.7),A=1,u=new Uint32Array(12),Y=L.G(12);
|
|
for(var b=0;b<n;b++)for(var a=0;a<o;a++){if(a<A||b<A||a>o-A-1||b>T-A-1){var f=b*o+a,w=f<<2,X=0;if(b<A)X=4;
|
|
else if(a>o-A-1)X=8;u[X]+=$[w];u[X+1]+=$[w+1];u[X+2]+=$[w+2];u[X+3]++;E[f]=255}}for(var f=0;f<12;f+=4)for(var N=0;
|
|
N<3;N++)Y[f+N]=u[f+N]/u[f+3];var z=new Float32Array(s);for(var f=0;f<s;f++){var w=f*4,i=L.gE.wp($,w,Y,0),k=L.gE.wp($,w,Y,4),Q=L.gE.wp($,w,Y,8),O=Math.max(i,Math.max(k,Q));
|
|
z[f]=i+k+Q-O}L.gE.ql(z);var c=Date.now(),B=new Float32Array(s),G=[],l=L.G(s);for(var f=0;f<3;f++){L.Ge($,l,f);
|
|
var v=new Uint16Array(s);G.push(v);L.gE.a1w(l,E,o,T,v)}if(e)console.log("MBD",Date.now()-c);c=Date.now();
|
|
for(var f=0;f<s;f++)B[f]=G[0][f]+G[1][f]+G[2][f];L.gE.ql(B);for(var f=0;f<s;f++)B[f]+=.4*z[f];var p=o>>>1,n=T>>>1,P=1/Math.sqrt(p*p+n*n);
|
|
for(var b=0;b<T;b++)for(var a=0;a<o;a++){var h=a-p,j=b-n,C=1-Math.sqrt(h*h+j*j)*P;B[b*o+a]*=C}if(e)console.log("Centeredness",Date.now()-c);
|
|
c=Date.now();for(var f=0;f<s;f++)E[f]=B[f]*255;var V=Math.round(o/120),d=Math.round(V*.8);if(e)console.log(V,d);
|
|
L.KW.hX(E,l,o,T,V,L.KW.Ur,[]);E.set(l);if(e)console.log("erosion",Date.now()-c);c=Date.now();for(var f=0;
|
|
f<s;f++)B[f]=E[f];L.gE.ql(B);var m=L.G(256);for(var f=0;f<256;f++)m[f]=256/(1+Math.exp(-20*(f/255-.5)));
|
|
for(var f=0;f<s;f++){var R=~~(B[f]*255+.5);E[f]=m[R]}if(e)console.log("Simoid",Date.now()-c);c=Date.now();
|
|
return E};L.gE.ql=function($){var o=$.length,T=0;for(var f=0;f<o;f++)T=Math.max(T,$[f]);var s=1/T;for(var f=0;
|
|
f<o;f++)$[f]=$[f]*s};L.gE.a1w=function($,o,T,s,E){var e=T*s,n=$.slice(0),A=$.slice(0);for(var f=0;f<e;
|
|
f++)E[f]=o[f]==255?0:65535;L.gE.Kr($,A,n,E,T,s);L.gE.c6($,A,n,E,T,s);L.gE.Kr($,A,n,E,T,s);L.gE.c6($,A,n,E,T,s);
|
|
return E};L.gE.Kr=function($,o,T,s,E,e){for(var n=1;n<E;n++)L.gE.oP(n,-1,$,o,T,s);for(var A=1;A<e;A++){L.gE.oP(A*E,-E,$,o,T,s);
|
|
for(var n=1;n<E;n++){var f=A*E+n;L.gE.oP(f,-1,$,o,T,s);L.gE.oP(f,-E,$,o,T,s)}}};L.gE.c6=function($,o,T,s,E,e){for(var n=E-2;
|
|
n>=0;n--)L.gE.oP(E*e-E+n,1,$,o,T,s);for(var A=e-2;A>=0;A--){L.gE.oP(A*E+E-1,E,$,o,T,s);for(var n=E-2;
|
|
n>=0;n--){var f=A*E+n;L.gE.oP(f,1,$,o,T,s);L.gE.oP(f,E,$,o,T,s)}}};L.gE.oP=function(f,$,o,T,s,E){var e=f+$,n=o[f],A=T[e],u=s[e];
|
|
if(A<n)A=n;else if(n<u)u=n;var Y=A-u;if(E[e]!=65535&&Y<E[f]){E[f]=Y;T[f]=A;s[f]=u}};L.CS={};L.CS.filter=function($,o,T,s){var E=o.d,e=o.w,n=E*e,A=s[0],u=s[1],Y=s[2],b=s[3],a=s[4],w=s[5],X=s[6],N=Date.now(),z=new Float32Array(E*e*4);
|
|
L.CS.acS($,E,e,z);var i=Math.ceil(A*Math.sqrt(-2*Math.log(.1))),k=new ArrayBuffer(n*4),Q=new Float32Array(k),O=new Float32Array(n),c=new Float32Array(n);
|
|
for(var f=0;f<n;f++){var B=f*4;Q[f]=z[B];O[f]=z[B+1];c[f]=z[B+2]}L.Ja.YK(Q,Q,o,i*1/2.4,2);L.Ja.YK(O,O,o,i*1/2.4,2);
|
|
L.Ja.YK(c,c,o,i*1/2.4,2);for(var f=0;f<n;f++){var B=f*4;z[B]=Q[f];z[B+1]=O[f];z[B+2]=c[f]}var G=new Uint8Array(k);
|
|
for(var f=0;f<n;f++){var B=f*4,l=f*4,Q=z[B],O=z[B+1],c=z[B+2],v=Math.sqrt((Q-c)*(Q-c)+4*O*O),p=(Q+c+v)*.5,P=(Q+c-v)*.5,h=P-c,j=O,C=h*h+j*j;
|
|
if(C!=0){var V=Math.sqrt(C),d=1/V;h*=d;j*=d}G[l]=128+127*h;G[l+1]=128+127*j}var m=1.3*u+2,R=b*(2/10),g=$.slice();
|
|
if(y.re){var S=new Float32Array([1/E,1/e]),F=y.lK(0,E,e);F.set(g);var r=y.lK(1,E,e);r.set(G);y.U0(F,o);
|
|
if(a){F.bv(o);y.filter.Ze({type:y.filter.eJ,Ip:S,aad:1/Y,aco:R},F.Ji)}F.bv(o);y.filter.Ze({type:y.filter.aY,qY:r.ek,Ip:S,a6p:m,a7X:2},F.Ji);
|
|
if(a){F.bv(o);y.filter.Ze({type:y.filter.bx,Ip:S,a70:new Float32Array(X),a58:w},F.Ji)}F.get(T)}else{if(a)L.CS.Wx(1/Y,R,g,E,e);
|
|
L.CS.aY(g,T,G,E,e,m);if(a)L.CS.aoQ(E,e,T,X,w)}var q=n*4;for(var f=3;f<q;f+=4)T[f]=$[f]};L.CS.aY=function($,o,T,s,E,e){var n=Math.ceil(2*e),A=-1/(2*e*e),u=[],Y=1;
|
|
for(var f=0;f<n+20;f++)u[f]=Math.exp(f*f*A);var b=[0,0,0,0];for(var a=0;a<E;a++){for(var w=0;w<s;w++){var X=a*s+w,N=X*4,z=1,i=$[N],k=$[N+1],Q=$[N+2],O=$[N+3],c=(T[N]-128)*(1/127),B=(T[N+1]-128)*(1/127),G=c,l=B,v=w==0?.51:.49,p=a==0?.51:.49;
|
|
for(var f=0;f<2;f++){var P=w+v,h=a+p,j=0;while(j<n){if(P<.5||s-.5<P||h<.5||E-.5<h)break;var C=~~P,V=~~h,d=V*s+C,m=d*4,R=(T[m]-128)*(1/127),g=(T[m+1]-128)*(1/127);
|
|
if(R*G+g*l<0){R=-R;g=-g}G=R;l=g;P+=Y*R;h+=Y*g;if(P<.5||s-.5<P||h<.5||E-.5<h)break;var S=~~P,F=~~h,r=F*s+S<<2;
|
|
j+=Y;var q=u[~~j];L.$.mn(P,h,$,s,E,b);i+=b[0]*q;k+=b[1]*q;Q+=b[2]*q;O+=b[3]*q;z+=q}G=-c;l=-B}var W=1/z;
|
|
o[N]=~~(.5+i*W);o[N+1]=~~(.5+k*W);o[N+2]=~~(.5+Q*W);o[N+3]=~~(.5+O*W)}}};L.CS.aoQ=function($,o,T,s,E){for(var e=0;
|
|
e<o;e++)for(var n=0;n<$;n++){var A=e*$+n<<2,u=1+L.CS.a7a(n,e,T,$,o,s)*E;T[A]=Math.max(0,Math.min(255,T[A]*u));
|
|
T[A+1]=Math.max(0,Math.min(255,T[A+1]*u));T[A+2]=Math.max(0,Math.min(255,T[A+2]*u))}};L.CS.a7a=function($,o,T,s,E,e){var n=T[(o*s+Math.max(0,$-1))*4+3],A=T[(o*s+Math.min(s-1,$+1))*4+3],u=T[(Math.max(0,o-1)*s+$)*4+3],Y=T[(Math.min(E-1,o+1)*s+$)*4+3],b=.7,a=(A-n)*(1/255),w=.7,X=(Y-u)*(1/255),N=-a*w,z=-b*X,i=b*w,k=Math.sqrt(N*N+z*z+i*i),Q=1/k,O=N*Q,c=z*Q,B=i*Q,G=e[0]*O+e[1]*c+e[2]*B;
|
|
return G};L.CS.Wx=function($,o,T,s,E){function e(A,Y,b){return Math.max(Y,Math.min(b,A))}for(var n=0;
|
|
n<E;n++)for(var A=0;A<s;A++){var u=L.CS.amZ(A+.5,n+.5,$,o);T[(n*s+A)*4+3]=Math.max(0,Math.min(255,u*255))}};
|
|
L.CS.amZ=function($,o,T,s){function E(l,v,p){return(1-p)*l+p*v}var e=($+613)*T,n=(o+117)*T,A=~~e,u=~~n,Y=e-A,b=n-u,a=Math.sin(11),w=Math.cos(A)*a,X=Math.cos(A+1)*a,N=Math.cos(u)*a,z=Math.cos(u+1)*a,J=L.CS.hash(w,N),i=L.CS.hash(X,N),k=L.CS.hash(w,z),Q=L.CS.hash(X,z),O=E(J,i,Y),c=E(k,Q,Y),B=E(O,c,b);
|
|
B=B<.5?0:1;var G=B+s*L.CS.hash(Math.cos(e)*a,Math.cos(n)*a);return G*(1/3)};L.CS.hash=function($,o){var T=Math.sin($*11.697096+o*73.32456)*12157.47691;
|
|
return T-Math.floor(T)};L.CS.acS=function($,o,T,s){var E=[-1,0,1,-2,0,2,-1,0,1],e=[-1,-2,-1,0,0,0,1,2,1],n=o-1,A=T-1,u=o*4;
|
|
for(var Y=1;Y<A;Y++)for(var b=1;b<n;b++){var f=Y*o+b,a=f*4,w=L.CS.oZ($,a,u,E),X=L.CS.oZ($,a,u,e),N=L.CS.oZ($,a+1,u,E),z=L.CS.oZ($,a+1,u,e),i=L.CS.oZ($,a+2,u,E),k=L.CS.oZ($,a+2,u,e);
|
|
s[a]=w*w+N*N+i*i;s[a+1]=w*X+N*z+i*k;s[a+2]=X*X+z*z+k*k}L.CS.a75(s,o,T)};L.CS.oZ=function($,o,T,s){return $[o-T-4]*s[0]+$[o-T]*s[1]+$[o-T+4]*s[2]+$[o-4]*s[3]+$[o]*s[4]+$[o+4]*s[5]+$[o+T-4]*s[6]+$[o+T]*s[7]+$[o+T+4]*s[8]};
|
|
L.CS.a75=function($,o,T){function s(u,f,Y){var b=f*4,a=Y*4;u[a]=u[b];u[a+1]=u[b+1];u[a+2]=u[b+2]}var E=o-1,e=T-1;
|
|
s($,o+1,0);s($,2*o-2,o-1);for(var n=1;n<E;n++)s($,o+n,n);for(var A=1;A<e;A++){s($,A*o+1,A*o);s($,A*o+o-2,A*o+o-1)}for(var n=1;
|
|
n<E;n++)s($,(T-2)*o+n,(T-1)*o+n);s($,(A-2)*o+1,(A-1)*o);s($,(A-1)*o-2,A*o-1)};L.u6={};L.u6.eZ=function($,o,T,s){var E=$[o*2],e=$[o*2+1],n=$[T*2],A=$[T*2+1],u=$[s*2],Y=$[s*2+1];
|
|
return E*A+n*Y+u*e-u*A-n*e-E*Y};L.u6.ln=function($,o){var T=[],s=[],E=[],e={};for(var f=0;f<o.length;
|
|
f+=3){var n=~~(f*(1/3)),A=o[f+0],u=o[f+1],Y=o[f+2],b=L.u6.eZ($,A,u,Y);if(b>0){var a=u;u=Y;Y=a}var w=e[Y+"-"+u],X=e[u+"-"+A],N=e[A+"-"+Y],z=[Y,w,n,null],i=[u,X,n,z],k=[A,N,n,i];
|
|
z[3]=k;if(w)w[1]=z;if(X)X[1]=i;if(N)N[1]=k;e[Y+"-"+A]=k;e[A+"-"+u]=i;e[u+"-"+Y]=z;T[A]=i;E[f]=i;T[u]=z;
|
|
E[f+1]=z;T[Y]=k;E[f+2]=k;s[n]=i}return{UB:T,Uz:s,z5:E}};L.u6.a0N=function($){var o=[],T=$.Uz;for(var f=0;
|
|
f<T.length;f++){var s=T[f];o.push(s[0]);s=s[3];o.push(s[0]);s=s[3];o.push(s[0])}return o};L.u6.ak1=function($,o,T,s){var E=$[o*2],e=$[o*2+1],n=$[T*2],A=$[T*2+1],u=$[s*2],Y=$[s*2+1],b=n-E,a=A-e,w=u-E,X=Y-e,N=b*(E+n)+a*(e+A),z=w*(E+u)+X*(e+Y),i=2*(b*(Y-A)-a*(u-n));
|
|
if(Math.abs(i)<1e-5){var k=Math.min(E,n,u),Q=Math.min(e,A,Y),O=(Math.max(E,n,u)-k)*.5,c=(Math.max(e,A,Y)-Q)*.5;
|
|
return[k+O,Q+c,O*O+c*c,1]}var B=(X*N-a*z)/i,G=(b*z-w*N)/i,O=B-E,c=G-e;return[B,G,O*O+c*c,0]};L.u6.aeO=function($,o,T){var s=T[1],E=T[3],e=E[3],n=s[3],A=n[3],u=T[2],Y=s[2],b=T[0],a=s[0],w=E[0],X=n[0],N=L.u6.ak1($,a,X,w),z=$[b*2]-N[0],i=$[b*2+1]-N[1],k=z*z+i*i>N[2]&&N[3]==0&&L.u6.eZ($,X,b,w)<0&&L.u6.eZ($,w,a,X)<0;
|
|
if(k){T[0]=w;s[0]=X;T[3]=e;e[3]=n;n[3]=T;s[3]=A;A[3]=E;E[3]=s;E[2]=Y;n[2]=u;o.Uz[Y]=A;o.Uz[u]=e;o.UB[a]=n;
|
|
o.UB[b]=E}return k};L.u6.anO=function($,o,T){var s=$[o*2]-$[T*2],E=$[o*2+1]-$[T*2+1];return Math.sqrt(s*s+E*E)};
|
|
L.u6.a1$=function($,o,T){var s=T[1],E=T[3],e=E[3],n,A,u=T[2],Y,b=T[0],a=e[0],w=E[0],X;if(s){n=s[3];A=n[3];
|
|
Y=s[2];X=n[0]}var N=$.length>>>1;$[2*N]=($[2*a]+$[2*b])*.5;$[2*N+1]=($[2*a+1]+$[2*b+1])*.5;if(!0){var z=u,i=T,k=o.Uz.length,Q=[N,null,z,i],O=[w,Q,k,e];
|
|
Q[1]=O;var c=[N,null,k,O];E[3]=Q;e[3]=c;e[2]=k;o.Uz[z]=E;o.Uz[k]=c;o.UB[b]=E;o.UB[w]=e;o.z5.push(Q,O,c)}if(s){var B=Y,G=s,l=k+1;
|
|
c[1]=G,G[1]=c;var v=[N,null,B,G],p=[X,v,l,A];v[1]=p;var P=[N,i,l,p];i[1]=P;n[3]=v;A[3]=P;A[2]=l;o.Uz[B]=n;
|
|
o.Uz[l]=A;o.UB[a]=n;o.UB[X]=A;o.z5.push(v,p,P)}o.UB[N]=i};L.u6.Kq=function($,o){var T=0;while(!0){var s=T;
|
|
for(var f=0;f<o.z5.length;f++){var E=o.z5[f];if(E[1]==null)continue;var e=L.u6.aeO($,o,E);if(e){T++;
|
|
break}}if(s==T)break}return T!=0};L.u6.afr=function($,o,T,s){var E=0;for(var f=0;f<s;f++){var e=null,n=0;
|
|
for(var A=0;A<o.z5.length;A++){var u=o.z5[A],Y=L.u6.anO($,u[0],u[3][3][0])*(u[1]?1:2);if(Y>n){e=u;n=Y}}if(n>T){L.u6.a1$($,o,e);
|
|
E++}}return E!=0};L.u6.a2U=function($,o){var T=[],w=0;for(var f=0;f<$.length;f++)T.push(0);for(var f=0;
|
|
f<o.z5.length;f++){var s=o.z5[f],E=s[0],e=s[3][3][0],n=$[E*2],A=$[E*2+1],u=$[e*2],Y=$[e*2+1],b=n-u,a=A-Y;
|
|
T[E*2]+=-b;T[E*2+1]+=-a;T[e*2]+=b;T[e*2+1]+=a}for(var f=0;f<$.length;f+=2){var X=f>>>1,N=o.UB[X],s=N,z=!0;
|
|
do{if(s[1]==null){z=!1;break}s=s[1][3]}while(s!=N);if(z){var i=.02;$[f]+=i*T[f];$[f+1]+=i*T[f+1];w+=i*(T[f]*T[f]+T[f+1]*T[f+1])}}return w};
|
|
L.u6.a3U=function($,o,T){var s=L.M.L3($),E=L.u6.ln($,o);L.u6.Kq($,E);for(var e=0;e<300;e++){var n=!1,A=!1;
|
|
n=L.u6.afr($,E,T,5);if(n)A=L.u6.Kq($,E);var u=L.u6.a2U($,E);if(!n&&!A&&u<1e-4){break}}return L.u6.a0N(E)};
|
|
L.pZ={};L.pZ.cd=function($){var o=$.Y0,T=$.ZL,s=$.Zg,E=$.mw,e=$.YL,n=$.HS,A=$.dw,u=L.Ak.wd,Q,O,c=0;function Y(J){var i8=new Array(J);
|
|
for(var f=0;f<J;f++)i8[f]=0;return i8}var b=T.length>>>1,a=Y(o.$Y*2),w=Y(o.$Y),X=Y(o.$Y),N=Date.now();
|
|
for(var f=0;f<$.nr.length;f++){var z=o.a53+f,i=o.N0*(n[f*2]+A[f*2]),k=o.N0*(n[f*2+1]+A[f*2+1]);a[z*2]=i;
|
|
a[z*2+1]=k;w[z]=i;X[z]=k}o.amI.sg(E,o.a0R.wd(a),.01,Q,O);for(var f=0;f<o.a5d.z5.length;f++){var B=o.a5d.z5[f],G=B[3][3][0],l=B[0],v=B[3][0],p=B[1]?B[1][3][0]:v;
|
|
if(B[1]&&G>l)continue;var P=T[G*2],h=T[G*2+1],j=T[l*2],C=T[l*2+1],V=E[G*2],d=E[G*2+1],R=E[l*2],g=E[l*2+1],S=E[v*2],F=E[v*2+1],q=E[p*2],W=E[p*2+1],Z=[V,d,R,g,S,F];
|
|
if(B[1])Z.push(q,W);var I=u(o.acr[c],Z),_=I[0],cN=I[1],ce=1/Math.sqrt(_*_+cN*cN);_*=ce;cN*=ce;var gf=j-P,K=C-h;
|
|
w[c]=_*gf+cN*K;X[c]=-cN*gf+_*K;c++}var cv=new Array(b),f0=new Array(b);for(var f=0;f<b;f++){cv[f]=e[f*2];
|
|
f0[f]=e[f*2+1]}o.a0J.sg(cv,o.anp.wd(w),.5);o.a0J.sg(f0,o.anp.wd(X),.5);for(var f=0;f<b;f++){e[f*2]=cv[f];
|
|
e[f*2+1]=f0[f]}};L.pZ.QN=function($){var o=$.ZL,T=$.Zg,s=$.nr,E=L.Ak.multiply,e=Date.now(),n=L.u6.ln(o,T),A=o.length>>>1,u=0,N=0,cN=1e3;
|
|
for(var f=0;f<n.z5.length;f++)u+=n.z5[f][1]?.5:1;var Y=u+s.length,b=[],a=new L.aA(Y*2,A*2),w=new L.aA(Y,A),X=[[[-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]]],z=[],i=[];
|
|
for(var f=0;f<n.z5.length;f++){var k=n.z5[f],Q=k[3][3][0],O=k[0],c=k[3][0],B=k[1]?k[1][3][0]:c;if(k[1]&&Q>O)continue;
|
|
var G=o[Q*2],l=o[Q*2+1],v=o[O*2],p=o[O*2+1],P=o[c*2],h=o[c*2+1],j=o[B*2],C=o[B*2+1],V=[[G,l,1,0],[l,-G,0,1],[v,p,1,0],[p,-v,0,1],[P,h,1,0],[h,-P,0,1]];
|
|
if(k[1])V.push([j,C,1,0],[C,-j,0,1]);var d=L.Ak.EP(V),R=E(linear.invert(E(d,V)),d);R.pop();R.pop();b.push(R);
|
|
var g=v-G,S=p-l,F=X[k[1]?1:0];F=L.Ak.V4(F,E([[g,S],[S,-g]],R));var q=[Q*2,Q*2+1,O*2,O*2+1,c*2,c*2+1,B*2,B*2+1],W=k[1]?8:6,Z=[];
|
|
for(var I=0;I<W;I++)Z.push([q[I],F[0][I],F[1][I]]);Z.sort(function(i8,b5){return i8[0]-b5[0]});for(var _=0;
|
|
_<2;_++){for(var I=0;I<W;I++){z[I]=Z[I][0];i[I]=Z[I][1+_]}a.OB(i,z,W)}if(Q<O)w.OB([-1,1],[Q,O],2);else w.OB([1,-1],[O,Q],2);
|
|
N++}for(var f=0;f<s.length;f++){var ce=s[f];a.OB([cN],[ce*2],1);a.OB([cN],[ce*2+1],1);w.OB([cN],[ce],1)}var gf=a.EP(),K=gf.Hi(gf),cv=w.EP(),f0=cv.Hi(cv);
|
|
return{a53:u,$Y:Y,a0R:gf,amI:K,anp:cv,a0J:f0,a5d:n,acr:b,N0:cN}};L.pZ.adJ=function($,o,T,s,E){var e=new df(0,0,o,T),n=L.G(e.Y());
|
|
L.Ge($,n,3);L.round(n,70);var A=L.ac(n,e),u=[.1,.065,.035][s]*Math.max(A.d,A.w),Y=E+1,b=o+Y*2,a=T+Y*2,w=new df(-Y,-Y,b,a),X=L.G(w.Y());
|
|
L.pg(n,e,X,w);var N=X.slice(0);for(var z=0;z<E;z++){for(var i=1;i<a-1;i++){for(var k=1;k<b-1;k++){var f=i*b+k;
|
|
N[f]=X[f-b]|X[f-1]|X[f]|X[f+1]|X[f+b]}}var Q=N;N=X;X=Q}var O=gE.Ra(X,b,a,Math.round(A.Y()*5e-4)),c=gE.Vp(O),B=new fY(1,0,0,1,-Y,-Y);
|
|
for(var f=0;f<c.length;f++){var G=c[f];L.M.t(G.path.I,B,G.path.I);G.ZL=L.pZ.a69(G.path);G.Zg=L.M.afH(G.ZL);
|
|
G.Zg=L.u6.a3U(G.ZL,G.Zg,u)}return c};L.pZ.a69=function($){var o=[],T=$.I,s=$.o.length-1,E=0,e=0;for(var n=0;
|
|
n<s;n++){var f=n*6,A=T[f+6]-T[f+0],u=T[f+7]-T[f+1],Y=Math.ceil(Math.sqrt(A*A+u*u));for(var b=0;b<Y;b++){var a=b/Y,w=1-a,X=w*w*w*T[f+0]+3*w*w*a*T[f+2]+3*w*a*a*T[f+4]+a*a*a*T[f+6],N=w*w*w*T[f+1]+3*w*w*a*T[f+3]+3*w*a*a*T[f+5]+a*a*a*T[f+7];
|
|
o.push(X,N);E=X;e=N}}o=L.M.ys(o,1);var z=[],i=o.length;for(var f=0;f<i;f+=2){var N=o.pop(),X=o.pop();
|
|
z.push(X,N)}return z};L.pZ.a2H=function($,o,T,s){function E(v,p,P,h,j){var C=j[v*2]-j[p*2],V=j[v*2+1]-j[p*2+1],d=Math.sqrt(C*C+V*V);
|
|
if(P[v].indexOf(p)==-1){P[v].push(p);h[v].push(d)}if(P[p].indexOf(v)==-1){P[p].push(v);h[p].push(d)}}var e=$.length>>>1,n=new Array(e);
|
|
if(T.length==0){n.fill(0);return n}var A=new Array(e),u=new Array(e);for(var f=0;f<e;f++){A[f]=[];u[f]=[]}for(var f=0;
|
|
f<o.length;f+=3){E(o[f],o[f+1],A,u,$);E(o[f],o[f+2],A,u,$);E(o[f+1],o[f+2],A,u,$)}var Y=new Float64Array(e*2),b=new Uint32Array(e*2);
|
|
Y.fill(1e9);var a=new Uint8Array(e);for(var w=0;w<T.length;w++){a.fill(0);var X=["---",[0,T[w]]];while(X.length!=1){var N=L.t6.aaA(X),z=N[0],i=N[1];
|
|
if(a[i]==1)continue;var k=i<<1;if(z<Y[k]){Y[k+1]=Y[k];b[k+1]=b[k];Y[k]=z;b[k]=w}else if(z<Y[k+1]){Y[k+1]=z;
|
|
b[k+1]=w}a[i]=1;var Q=A[i],O=u[i];for(var f=0;f<Q.length;f++){var c=Q[f];if(a[c]!=1){L.t6.a2S(X,[z+O[f],c])}}}}for(var f=0;
|
|
f<e;f++){var k=f<<1,B=Y[k],G=Y[k+1],l=1/(B+G);n[f]=(1-B*l)*s[b[k]]+(1-G*l)*s[b[k+1]]}return n};L.pZ.a7W=function($){var o={o:[],I:[]},T=[$];
|
|
while(T.length!=0){var s=T.pop(),E=s.UK;if(s.a5J instanceof Array||s.a3t instanceof Array){o.o.push("M","L","L","L","Z");
|
|
o.I.push(E[0],E[1],E[2],E[1],E[2],E[3],E[0],E[3])}else T.push(s.a5J,s.a3t)}return o};L.pZ.rW=function($,o,T,s,E,e,n,A,u,Y){var b=Math.round(Y.length/3),a=new Array(b);
|
|
for(var f=0;f<b;f++)a[f]=f;a.sort(function(X,N){return u[Y[X*3]]-u[Y[N*3]]});for(var f=0;f<b;f++){var w=a[f]*3;
|
|
L.pZ.a1v(Y[w]*2,Y[w+1]*2,Y[w+2]*2,n,A,$,o,T,s,E,e)}};L.pZ.a1v=function($,o,T,s,E,e,n,A,u,Y,b){var a=L.pZ.Rd,w=[$,o,T,1.2,1.2,1.2,0],X=[0,0,0,0],N=E[$],z=E[$+1],i=E[o],k=E[o+1],Q=E[T],O=E[T+1],c=Math.max(0,Math.min(n-1,s[$])),B=Math.max(0,Math.min(n-1,s[o])),G=Math.max(0,Math.min(n-1,s[T])),l=Math.max(0,Math.min(A-1,s[$+1])),v=Math.max(0,Math.min(A-1,s[o+1])),p=Math.max(0,Math.min(A-1,s[T+1])),P=i-N,h=k-z,j=Q-N,C=O-z,V=1/(P*C-j*h+1e-9),d=Math.max(0,Math.floor(Math.min(N,i,Q))),m=Math.min(Y,Math.ceil(Math.max(N,i,Q))),R=Math.max(0,Math.floor(Math.min(z,k,O))),g=Math.min(b,Math.ceil(Math.max(z,k,O)));
|
|
for(var S=R;S<g;S++)for(var F=d;F<m;F++){var r=F+.5-N,q=S+.5-z,W=(r*C-j*q)*V,Z=(P*q-r*h)*V;if(W>=0&&Z>=0&&W+Z<=1){var I=1-W-Z,_=c*I+B*W+G*Z,cN=l*I+v*W+p*Z;
|
|
L.$.mn(_,cN,e,n,A,X);L.pZ.aap(X,u,S*Y+F<<2)}}};L.pZ.aap=function($,o,T){var s=o[T],E=o[T+1],e=o[T+2],n=o[T+3],A=1-$[3]*(1/255);
|
|
o[T]=~~(.5+$[0]+s*A);o[T+1]=~~(.5+$[1]+E*A);o[T+2]=~~(.5+$[2]+e*A);o[T+3]=~~(.5+$[3]+n*A)};L.pZ.Rd=function(){var $=function(T,s,E,e){var n=e[0],A=e[1],u=e[2],Y=T[n+0],b=T[n+1],a=T[A+0],w=T[A+1],X=T[u+0],N=T[u+1],z=a-Y,i=w-b,k=X-Y,Q=N-b,O=s-Y,c=E-b,B=z*Q-k*i,G=1/(B+1e-9),l=(O*Q-k*c)*G,v=(z*c-O*i)*G;
|
|
if(l>=0&&v>=0&&l+v<=1){e[3]=1-l-v;e[4]=l;e[5]=v;return 1}return 0},o=function(T,s,E,e){var n=[0,0,0,0,0,0];
|
|
for(var f=0;f<s.length;f+=3){n[0]=s[f]*2;n[1]=s[f+1]*2;n[2]=s[f+2]*2;if($(T,E,e,n)==1)return!0}return!1};
|
|
return{ab3:$,ahJ:o}}();L.m7={};L.m7.a1u=function($,o,T){var s=L.G(o*T*4),E=!1;L.$.lx($,o,T,s,[T,o,0,1,0,1,0,0]);
|
|
return[L.m7.zI($,o,T,E),L.m7.zI(s,T,o,E)]};L.m7.t=function($,o){var T=!1,s=$[0],E=$[1],e=s[1],n=s[2],A=s[3],u=o.d,Y=o.w;
|
|
if(n==u&&A==Y)e=e.slice(0);else if(A!=Y){var b=L.G(n*Y*4);L.m7.Bv(E,Y,b,T);e=L.G(n*Y*4);L.$.lx(b,Y,n,e,[n,Y,0,1,0,1,0,0]);
|
|
if(n!=u){s=L.m7.zI(e,n,Y,T);e=L.G(u*Y*4);L.m7.Bv(s,u,e,T)}}else if(n!=u){e=L.G(u*A*4);L.m7.Bv(s,u,e,T)}return e};
|
|
L.m7.zI=function($,o,T,s){var E=Date.now(),e=new Uint16Array(o*T),n=1;L.m7.aow($,o,T,e);var A=Math.ceil(o/n),u=new Uint32Array(n),Y=new Uint32Array(n),A=Math.floor(o/n);
|
|
for(var b=0;b<n;b++)Y[b]=b<n-1?A:o-(n-1)*A;for(var a=0;a<T;a++){var f=a*o;for(var b=0;b<n;b++){var A=Y[b];
|
|
for(var w=0;w<A;w++)u[b]+=e[f+w];f+=A}}if(s){console.log(Date.now()-E,"cost");E=Date.now()}var X=new Uint32Array(o),N=new Uint32Array(o),z=new Uint32Array(o*T);
|
|
for(var w=0;w<o;w++){z[(T-1)*o+w]=e[(T-1)*o+w]}for(var a=T-2;a>=0;a--){var i=a*o;for(var b=0;b<n;b++){var A=Y[b];
|
|
z[i]=e[i]+Math.min(z[i+o],z[i+o+1]);for(var w=1;w<A-1;w++){var f=i+w;z[f]=e[f]+Math.min(z[f+o-1],Math.min(z[f+o],z[f+o+1]))}i+=A-1;
|
|
z[i]=e[i]+Math.min(z[i+o-1],z[i+o]);i++}}if(s){console.log(Date.now()-E,"Building M");E=Date.now()}function k(h,j){return h<j?h:j}function Q(f,h){var j=N[f],C=z[h],V=~~(j*C*1e-4);
|
|
return V}var O=new Uint8Array(o*T),c=new Uint32Array(o);for(var f=0;f<o;f++){X[f]=f;N[f]=e[f]}for(var a=1;
|
|
a<T;a++){var B=0,i=a*o;for(var b=0;b<n;b++){var A=Y[b],f=i;c[B]=Q(B,f);var G=c[B]+Q(B+1,f+1),l=Q(B,f+1)+Q(B+1,f);
|
|
c[B+1]=k(G,l);for(var w=2;w<A;w++){var f=i+w,v=c[B+w-1]+Q(B+w-1,f-1),p=c[B+w-2]+Q(B+w-1,f-2)+Q(B+w-2,f-1);
|
|
c[B+w]=k(v,p)}var w=A-1;while(w>=2){var f=i+w,v=c[B+w-1]+Q(B+w-1,f-1),p=c[B+w-2]+Q(B+w-1,f-2)+Q(B+w-2,f-1);
|
|
if(c[B+w]==v){O[f-o]=1;w-=1}else{O[f-o]=0;O[f-o-1]=2;w-=2}}var f=i;if(w==0){O[f-o]=1}else{if(c[B+1]==G){O[f+1-o]=1;
|
|
O[f-o]=1}else{O[f+1-o]=0;O[f-o]=2}}i+=A;B+=A}L.m7.aaq(a,o,O,e,X,N,!0,E)}if(s){console.log(Date.now()-E,"Matching");
|
|
E=Date.now()}var P=e;return[UZIP.adler($,0,$.length),$,o,T,n,Y,u,X,N,O,P]};L.m7.Bv=function($,o,T,s){var E=$.slice(0),e=E.shift(),n=E.shift(),A=E.shift(),u=E.shift(),Y=E.shift(),b=E.shift(),a=E.shift(),w=E.shift(),X=E.shift().slice(0),N=E.shift(),z=E.shift(),i=Date.now(),k=Math.abs(A-o),Q=Math.floor(k/Y),O=new Uint32Array(Y),B=0,G=1e9,v=0,p=0,P=0;
|
|
for(var c=0;c<Y;c++)O[c]=c<Y-1?Q:k-(Y-1)*Q;z.fill(0);for(var l=0;l<A;l++){B=Math.max(B,X[l]);G=Math.min(G,X[l])}for(var c=0;
|
|
c<Y;c++){var h=b[c],Q=O[c];for(var j=0;j<Q;j++){var C=0,V=1e9;for(var l=0;l<h;l++)if(X[p+l]<V){V=X[p+l];
|
|
C=p+l}if(o<A)X[C]=1e9;else X[C]*=1.2;if(P<A/3)v+=V;var d=w[C],m=z[d],R=m<65280?65280:m+1;if(R<65280)throw"e";
|
|
for(var g=0;g<u;g++){var f=g*A+d;z[f]=R;d+=N[f]-1}P++}p+=h}if(s){console.log(Date.now()-i,"Removing best seams");
|
|
i=Date.now()}function S(f,r){var q=f<<2,W=r<<2;T[q]=n[W];T[q+1]=n[W+1];T[q+2]=n[W+2];T[q+3]=n[W+3]}for(var g=0;
|
|
g<u;g++){var F=0,f=g*A;for(var l=0;l<o;l++,F++){if(o<A){while(z[f+F]==65280)F++;S(g*o+l,g*A+F)}else{S(g*o+l,g*A+F);
|
|
while(z[f+F]>=65280){z[f+F]--;l++;S(g*o+l,g*A+F)}}}}if(s){console.log(Date.now()-i,"Shifting image pixels");
|
|
i=Date.now()}};L.m7.aaq=function($,o,T,s,E,e){var n=0,f=$*o;while(n<o){if(T[f-o]==1){e[n]=e[n]+s[f];
|
|
n++;f++}else{var A=E[n];E[n]=E[n+1];E[n+1]=A;var u=e[n];e[n]=e[n+1]+s[f];e[n+1]=u+s[f+1];n+=2;f+=2}}};
|
|
L.m7.aow=function($,o,T,s){function E($,f,u){var a=f<<2,w=u<<2,X=$[a]-$[w],N=$[a+1]-$[w+1],z=$[a+2]-$[w+2];
|
|
return Math.abs(X)+Math.abs(N)+Math.abs(z)}for(var e=1;e<o;e++){var n=E($,e,e-1);s[e-1]+=n;s[e]+=n}for(var A=1;
|
|
A<T;A++){var u=A*o,n=E($,u,u-o);s[u]+=n;s[u-o]+=n;for(var e=1;e<o;e++){var f=A*o+e,Y=E($,f,f-1),b=E($,f,f-o);
|
|
s[f-o]+=b;s[f-1]+=Y;s[f]+=b+Y}}for(var A=0;A<T;A++){s[A*o]*=2;s[A*o+o-1]*=2}for(var f=0;f<s.length;f++)if(s[f]==0)s[f]=1};
|
|
L.Jy=function(){var $=0,o=0,s=15,e=256;function T(b,a,w,X,N,z){var i=(N-1)*a,k=z*a;return b[k+X]-b[k+w-1]-b[i+X]+b[i+w-1]}var E=Math.round(s/8),n=[];
|
|
function A(b,a){for(var w=0;w<a.length;w++){var X=a[w],N=0,z=0,i=b[X.qC],k=i.aP,Q=i.N0,O=i.cQ;for(var c=-s;
|
|
c<=s;c++)for(var B=-s;B<=s;B++){var G=B+X.a5x,l=c+X.aqh;if(B*B+c*c>s*s||G<0||l<0||G>=Q||l>=Q)continue;
|
|
var v=k[l*Q+G];N+=B*v;z+=c*v}X.a4=Math.atan2(z,N)}}function u(b,a,w,X,N){var z=~~(b+.5),i=~~(a+.5);return T(w,X,z-E,z+E,i-E,i+E)}function Y(b,a,w,X,N){$=X;
|
|
o=N;if(n.length==0){var z=new L.R.Cp(16200817),O=8,c=0;function i(cv){var P=cv[0]-cv[2],h=cv[1]-cv[3];
|
|
return P*P+h*h}function k(){var cv=0,f0=0;while(cv===0)cv=z.get();while(f0===0)f0=z.get();return Math.sqrt(-2*Math.log(cv))*Math.cos(2*Math.PI*f0)}var Q=k,B=[];
|
|
while(c!=e){var G=Math.max(-s,Math.min(s,Q()*O)),l=Math.max(-s,Math.min(s,Q()*O)),v=Math.max(-s,Math.min(s,Q()*O)),p=Math.max(-s,Math.min(s,Q()*O)),P=G-v,h=l-p,j=Math.sqrt(P*P+h*h);
|
|
if(j<3||j>12)continue;n.push(G,l,v,p);c++}}var C=20;for(var V=0;V<a.length;V++){var d=a[V],m=b[d.qC],R=m.NT,w=m.aP,X=m.N0,N=m.cQ,g=d.a5x,S=d.aqh,F=d.a4,r=Math.cos(F),q=Math.sin(F),W=new Uint8Array(e>>>3);
|
|
d.bI=W;for(var f=0;f<e;f++){var Z=f*4,G=n[Z+0],l=n[Z+1],v=n[Z+2],p=n[Z+3],I=r*G-q*l,_=q*G+r*l,cN=r*v-q*p,ce=q*v+r*p,gf=u(g+I,S+_,R,X,N),K=u(g+cN,S+ce,R,X,N);
|
|
W[f>>>3]|=(gf<K?0:1)<<(f&7)}}}return{a2v:A,amU:Y}}();L.akl=function(){var $=0,o=0;function T(e,n,A,u,Y,b){var a=(Y-1)*n,w=b*n;
|
|
return e[w+u]-e[w+A-1]-e[a+u]+e[a+A-1]}function s(e,n,A){var u=new Uint32Array(n*A);u[0]=e[0];for(var Y=1;
|
|
Y<n;Y++)u[Y]=u[Y-1]+e[Y];for(var b=1;b<A;b++){var f=b*n;u[f]=u[f-n]+e[f];for(var Y=1;Y<n;Y++)u[f+Y]=e[f+Y]+u[f+Y-1]+u[f+Y-n]-u[f+Y-n-1]}return u}function E(e,n){var A=[[9]],u=Date.now(),Y=[];
|
|
for(var b=0;b<e.length;b++){var a=e[b],w=a.NT,X=$=a.N0,N=o=a.cQ,k=9,l=1,S=24;if(w==null)continue;var z=new Float32Array(X*N),i=new Uint8Array(X*N),Q=k>>>1,O=Q>>>1,c=Math.round(k/3);
|
|
if(c!=k/3)throw"e";var B=1/(k*k),G=1.2*(k/9);for(var v=Q+1;v<N-Q;v+=l)for(var p=Q+1;p<X-Q;p+=l){var P=T(w,X,p-O,p+O,v-Q,v+Q)-3*T(w,X,p-O,p+O,v-Q+c,v+Q-c),h=T(w,X,p-Q,p+Q,v-O,v+O)-3*T(w,X,p-Q+c,p+Q-c,v-O,v+O),j=p-Q+1,C=p+Q-1,V=v-Q+1,d=v+Q-1,m=T(w,X,j,p-1,V,v-1)+T(w,X,p+1,C,v+1,d)-T(w,X,p+1,C,V,v-1)-T(w,X,j,p-1,v+1,d),R=(h*P-.9*m*(.9*m))*(B*B);
|
|
z[v*X+p]=Math.abs(R);i[v*X+p]=R<0?0:1}var g=X*l;for(var v=S;v<N-S;v+=l)for(var p=S;p<X-S;p+=l){var f=v*X+p,F=z[f];
|
|
if(F<16)continue;if(z[f-l]>=F||z[f+l]>=F)continue;if(z[f-g-l]>=F||z[f-g]>=F||z[f-g+l]>=F)continue;if(z[f+g-l]>=F||z[f+g]>=F||z[f+g+l]>=F)continue;
|
|
Y.push({x:~~(p*a.sQ+.5),y:~~(v*a.sQ+.5),a5x:p,aqh:v,qC:b,H:F,ahy:i[f],rZ:G})}}if(n!=null){Y.sort(function(ce,gf){return gf.H-ce.H});
|
|
Y=Y.slice(0,n)}return Y;var r=[];for(var f=0;f<Y.length;f++){var q=!0,W=Y[f];for(var Z=0;Z<Y.length;
|
|
Z++){var I=Y[Z];if(Z!=f&&I.H>W.H&&(I.qC==W.qC+1||I.qC==W.qC-1)){var _=W.x-I.x,cN=W.y-I.y;if(_*_+cN*cN<5){q=!1;
|
|
break}}}if(q)r.push(W)}console.log(Y.length,r.length);return r}return{apz:E}}();L.pw={};L.pw.a2u=function($){var o=$.length,T=L.pw.g_($,!1),E=0,e=1;
|
|
throw"e";var s=[];for(var f=0;f<o;f++)s[f]=L.pw.Ex(T[f]);var n=$[0][1],A=L.pw.match(T[E],T[e],s[e]);
|
|
console.log(A.length);var u=Math.max(Math.min(A.length,40),A.length*.54);u=Math.min(u,200);var Y=A.slice(0,u),b=L.TT.a8L(T[E],T[e],Y,n.d,n.w),a=L.TT.aqf(b,[0,0,0],1),w=n.d/2,X=n.w/2,N=1/Math.max(w,X);
|
|
for(var f=0;f<1;f++){var z=Y[f],i=T[E][z[0]],k=T[e][z[1]],Q=L.TT.apH(a,N*(i.x-w),N*(i.y-X),N*(k.x-w),N*(k.y-X))}var O=L.TT.ad8(b,n),c=[];
|
|
for(var f=0;f<2;f++){var B=O[f],G=[B[0][0],B[0][1],B[0][2],B[1][0],B[1][1],B[1][2],B[2][0],B[2][1]],l=D.p.wN($[f],null,G);
|
|
c.push([l.buffer,l.rect])}return[L.pw.a6f(c[0],c[1],T[E],T[e],Y,b,O,n)]};L.pw.cs=function($,o){var T=$.length,s=!1,E=Date.now(),e=L.pw.g_($,!1,1e4);
|
|
if(s)console.log("Descriptors ready",Date.now()-E);E=Date.now();for(var f=0;f<T;f++){var n=$[f][1];for(var A=0;
|
|
A<e[f].length;A++){e[f][A].x+=n.x;e[f][A].y+=n.y}}if(s)console.log("shifted",Date.now()-E);E=Date.now();
|
|
var u=[];for(var f=0;f<T;f++)u[f]=L.pw.Ex(e[f]);if(s)console.log("trees built",Date.now()-E);E=Date.now();
|
|
var Y=[];for(var f=0;f<T-1;f++)for(var A=f+1;A<T;A++){var b=L.pw.match(e[f],e[A],u[A]);if(s)console.log("Matches found",f,A,b.length);
|
|
b=b.slice(0,b.length>>>1);if(b.length<10)return null;var a=L.pw.a0L(e[f],e[A],b,2);Y.push([f,A,b,a])}Y.sort(function(p,P){return P[2].length-p[2].length});
|
|
if(s)console.log("Matches found",Date.now()-E);E=Date.now();var w=[],X=new UnionFind(T);for(var f=0;
|
|
f<Y.length;f++){var N=Y[f],z=X.find(N[0]),i=X.find(N[1]);if(z!=i){w.push(N);X.link(z,i)}}var k=[];for(var f=0;
|
|
f<T;f++)k[f]=[1,0,0,0,1,0,0,0];var Q=[0],O=new Uint8Array(T);O[Q[0]]=1;while(Q.length!=0){var i=Q.pop(),a=k[i],c=[];
|
|
for(var f=0;f<w.length;f++){var N=w[f],B=N[0],G=N[1];if(B==i&&O[G]==0){k[G]=L.$.E8(a,N[3]);Q.push(G);
|
|
O[G]=1}if(G==i&&O[B]==0){k[B]=L.$.E8(a,L.$.lY(N[3]));Q.push(B);O[B]=1}}}if(o==null){var l=[];for(var f=0;
|
|
f<T;f++)l.push([k[f][2],f]);l.sort(function(p,P){return p[0]-P[0]});o=l[l.length>>>1][1]}var v=L.$.lY(k[o]);
|
|
for(var f=0;f<T;f++)k[f]=L.$.E8(k[f],v);if(s)console.log("Transforms reordered",Date.now()-E);E=Date.now();
|
|
return k};L.pw.g_=function($,o,T){var s=[],E=!1;for(var f=0;f<$.length;f++){var e=$[f][0],n=$[f][1],A=n.d,u=n.w,Y=L.G(n.Y());
|
|
L.h$(e,Y);var b=Date.now(),a=L.pw.a04(Y,n,!0);if(E)console.log("Pyramid built ---------------",Date.now()-b);
|
|
b=Date.now();var w=L.akl.apz(a,T);if(E)console.log("SURF Generation",Date.now()-b);b=Date.now();if(!o){L.Jy.a2v(a,w);
|
|
if(E)console.log("ORB Orientations",Date.now()-b);b=Date.now();L.Jy.amU(a,w,Y,A,u);if(E)console.log("ORB Descriptors",Date.now()-b);
|
|
b=Date.now()}s.push(w)}return s};L.pw.a04=function($,o,T){function s(Y,a,w){var N=new Uint32Array(a*w);
|
|
N[0]=Y[0];for(var z=1;z<a;z++)N[z]=N[z-1]+Y[z];for(var i=1;i<w;i++){var f=i*a;N[f]=N[f-a]+Y[f];for(var z=1;
|
|
z<a;z++)N[f+z]=Y[f+z]+N[f+z-1]+N[f+z-a]-N[f+z-a-1]}return N}var E=[],e=[$,o];L.Fg(e);if(T){var n=L.QO($,o),A=n.rect,u=[n._3,A];
|
|
L.Fg(u)}for(var f=0;f<e.length;f++){var Y=e[2*f],b=e[2*f+1],a=b.d,w=b.w,X=Math.min(a,w);if(X<30)break;
|
|
if(X<1600)E.push({aP:Y,N0:a,cQ:w,sQ:1<<f,NT:s(Y,a,w)});if(!T)continue;var Y=u[2*f],b=u[2*f+1],a=b.d,w=b.w,X=Math.min(a,w);
|
|
if(X<30)break;if(X<1600)E.push({aP:Y,N0:a,cQ:w,sQ:(1<<f)*3/2,NT:s(Y,a,w)})}return E};L.pw.a0L=function($,o,T,s){var E=Date.now(),e,n=0,A=0,u=T.length,Y=new Float64Array(2);
|
|
for(var b=0;b<3e3;b++){var a=~~(Math.random()*u),w=~~(Math.random()*u),X=~~(Math.random()*u),N=~~(Math.random()*u),V=0,d=0;
|
|
if(a==w||a==X||a==N||w==X||w==N||X==N)continue;var z=T[a],i=T[w],k=T[X],Q=T[N],O=$[z[0]],c=o[z[1]],B=$[i[0]],G=o[i[1]],l=$[k[0]],v=o[k[1]],p=$[Q[0]],P=o[Q[1]],h=[O.x,O.y,B.x,B.y,l.x,l.y,p.x,p.y],j=[c.x,c.y,G.x,G.y,v.x,v.y,P.x,P.y],C=L.$.BO(h,j);
|
|
if(C[0]==0&&C[1]==0&&C[3]==0&&C[4]==0)continue;var m=u-n+2;for(var f=0;f<u&&f-V<m;f++){var R=$[T[f][0]],g=o[T[f][1]];
|
|
L.$.Da(g.x,g.y,C,Y);var S=Y[0]-R.x,F=Y[1]-R.y,r=S*S+F*F;if(r<s){V++;d+=r}}if(V>n||V==n&&d<A){e=C;n=V;
|
|
A=d}}return e};var bo=new Uint8Array(256);for(var f=0;f<256;f++){var cH=0,J=f;while(J!=0){J=J&J-1;cH++}bo[f]=cH}L.pw.adh=function($,o,T){var s=0,E=$.length;
|
|
for(var f=0;f<E&&s<T;f++)s+=bo[$[f]^o[f]];return s};L.pw.a8t=function($,o,T,top,s){if(s[T]==1)return;
|
|
var E=L.pw.adh($.bI,o.bI,top[0]);if(E<top[0]){if(E<top[2]){top[0]=top[2];top[1]=top[3];top[2]=E;top[3]=T}else{top[0]=E;
|
|
top[1]=T}}s[T]=1};L.pw.Ex=function($){var o=[],T=[],s=[[],[]],E=4;for(var f=0;f<$.length;f++)($[f].ahy==0?o:T).push(f);
|
|
for(var e=0;e<2;e++){var n=new Array(E),A=[],u=e==0?o:T,Y=u.length/256,b=[];for(var a=0;a<32;a++){var w=new Array(256),z=0;
|
|
for(var X=0;X<256;X++)w[X]=[];for(var X=0;X<u.length;X++){var N=u[X];w[$[N].bI[a]].push(N)}for(var X=0;
|
|
X<256;X++)z+=Math.abs(w[X].length-Y);b.push([z,a,w])}b.sort(function(i,k){return i[0]-k[0]});var A=[],n=[];
|
|
s[e]=[A,n];for(var f=0;f<E;f++){A.push(b[f][1]);n.push(b[f][2])}}return s};L.pw.match=function($,o,T){var s=[],E=new Uint16Array(o.length);
|
|
E.fill(65535);var e=new Uint8Array(o.length),top=new Uint32Array(4),n=[];for(var A=0;A<$.length;A++){var u=$[A],Y=u.bI;
|
|
top.fill(1e6);e.fill(0);var b=T[u.ahy];for(var a=0;a<b[1].length;a++){var w=b[1][a][Y[b[0][a]]];for(var X=0;
|
|
X<w.length;X++){var N=w[X];L.pw.a8t(u,o[N],N,top,e)}}if(top[2]<50&&top[2]<top[0]*.5){var z=E[top[3]];
|
|
if(z==65535){E[top[3]]=s.length;s.push([A,top[3],top[2]])}else if(top[2]<s[z][2]){s[z]=[A,top[3],top[2]]}}}s.sort(function(i,k){return i[2]-k[2]});
|
|
return s};L.pw.aoK=function($){var o=new df;for(var f=0;f<$.length;f++)o=o.BZ($[f][1]);var T=L.G(o.Y()*4);
|
|
for(var f=0;f<$.length;f++)L.R.xE("norm",$[f][0],$[f][1],T,o,o,1);return[T,o]};L.pw.a6f=function($,o,T,s,E,e,n,A){var u=$[1].clone(),Y=u.clone();
|
|
u.x=u.y=0;var b=o[1].clone(),a=b.clone();b.x=b.y=0;b.x=u.d;var w=u.BZ(b),X=a.y-Y.y,N=L.G(w.Y()*4);L.h9($[0],u,N,w);
|
|
L.h9(o[0],new df(b.x,b.y+X,b.d,b.w),N,w);var z=document.createElement("canvas");z.width=w.d;z.height=w.w;
|
|
var i=z.getContext("2d");i.lineWidth=.5;i.putImageData(new ImageData(new Uint8ClampedArray(N.buffer),w.d,w.w),0,0);
|
|
if(e){var k=e[0],Q=L.Ak.EP(k),O=u.d,c=A.d;for(var f=0;f<E.length;f++){var B=E[f],$=T[B[0]],o=s[B[1]];
|
|
i.strokeStyle="#"+"ff0000";i.beginPath();var G=L.TT.a83(Q,n[0],o,0,c),l=L.TT.a83(k,n[1],$,0,c);i.moveTo(-Y.x+G[0],-Y.y+G[1]);
|
|
i.lineTo(-Y.x+G[2],-Y.y+G[3]);i.moveTo(O-a.x+l[0],-a.y+X+l[1]);i.lineTo(O-a.x+l[2],-a.y+X+l[3]);i.stroke()}}if(E){var v=E.length;
|
|
for(var f=0;f<v;f++){var B=E[f],$=T[B[0]],o=s[B[1]];i.strokeStyle="#"+"ffff00"}}var p=new Uint8Array(i.getImageData(0,0,w.d,w.w).data.buffer);
|
|
if(!1){for(var P=0;P<2;P++){var h=P==0?T:s,j=P*u.d;for(var f=0;f<h.length;f++){var C=h[f],V=~~C.x,d=~~C.y,m=(d*w.d+V+j)*4;
|
|
p[m+1]=p[m+2]=C.agf*60;p[m+0]=0;p[m+3]=255}}}return[p,w]};L.stack={};L.stack.stack=function($,o,T){var s=$.length,E=o.length;
|
|
if(s==1){o.set($[0]);return}if(T=="avrg"||T=="stdv"||T=="summ"||T=="vari"){var e=1/s;for(var f=0;f<E;
|
|
f++){var n=0;for(var A=0;A<s;A++)n+=$[A][f];var u=~~(n*e+.5);if(T=="avrg"||(f&3)==3)o[f]=u;else if(T=="summ")o[f]=255*Math.pow(Math.min(255,n)*(1/255),1/2.4);
|
|
else{var Y=0;for(var A=0;A<s;A++){var b=$[A][f]-u;Y+=b*b}var a=Math.sqrt(Y*e)*(1/255);if(T=="stdv")o[f]=255*Math.pow(a,1/2.4);
|
|
else o[f]=255*Math.pow(a*a,1/2.4)}}}else if(T=="maxx"){for(var f=0;f<E;f++){var w=0;for(var A=0;A<s;
|
|
A++)w=Math.max(w,$[A][f]);o[f]=w}}else if(T=="minn"){for(var f=0;f<E;f++){var w=255;for(var A=0;A<s;
|
|
A++)w=Math.min(w,$[A][f]);o[f]=w}}else if(T=="medn"||T=="rang"){var X=function(k,Q){return k-Q},N=new Array(s),z=0,i=0;
|
|
if(s%1==0){i=s>>>1;z=i-1}else{z=i=s>>>1}for(var f=0;f<E;f++){for(var A=0;A<s;A++)N[A]=$[A][f];N.sort(X);
|
|
if(T=="medn")o[f]=N[z]+N[i]>>>1;else o[f]=(f&3)==3?N[s-1]:N[s-1]-N[0]}}else console.log(T)};L.Ej={};
|
|
L.Ej.gb=function($,o,T,s){var E=Date.now(),e=new Uint32Array(o*T),n=new Uint8Array(o*T),A=[],X=0;for(var u=0;
|
|
u<T;u++){for(var Y=0;Y<o;Y++){var f=u*o+Y;if(n[f]==0){var b=A.length,a=L.Ej.R3($,o,T,Y,u,n,e,b);A.push([b,Y,u,a[0],a[1],$[f]])}}}n.fill(0);
|
|
var w=[];for(var f=0;f<A.length;f++)if(A[f][3]<=s)w.push(A[f]);w.sort(function(v,p){return v[3]-p[3]});
|
|
for(var f=0;f<w.length;f++){var a=w[f],N=a[4],z=0,i=0;if(a[3]>s)continue;for(var k=0;k<N.length;k+=2){var Q=N[k],O=N[k+1],c=O*o+Q,B=e[c],G=A[B][3],l=A[B][5];
|
|
if(G>i){z=B;i=G}}if(i==0)throw"e";L.Ej.a8f($,o,T,a,A[z],n,e);X++}};L.Ej.a8f=function($,o,T,s,E,e,n){L.Ej.a2R($,o,T,s[1],s[2],E[5],e,n,E[0]);
|
|
E[3]+=s[3];s[3]=0;var A=s[4],u=E[4];for(var Y=0;Y<A.length;Y++)u.push(A[Y]);L.Ej.anW(e,o,T,s[1],s[2])};
|
|
L.Ej.anW=function($,o,T,s,E){var e=[s,E];$[E*o+s]=2;while(e.length!=0){var n=e.pop(),A=e.pop(),f=n*o+A;
|
|
$[f]=0;if(n!=T-1&&$[f+o]==1){e.push(A,n+1);$[f+o]=2}if(n!=0&&$[f-o]==1){e.push(A,n-1);$[f-o]=2}if(n!=o-1&&$[f+1]==1){e.push(A+1,n);
|
|
$[f+1]=2}if(n!=0&&$[f-1]==1){e.push(A-1,n);$[f-1]=2}}};L.Ej.a2R=function($,o,T,s,E,e,n,A,u){var Y=[s,E],b=$[E*o+s],a=A[E*o+s];
|
|
n[E*o+s]=1;while(Y.length!=0){var w=Y.pop(),X=Y.pop(),f=w*o+X;$[f]=e;A[f]=u;if(w!=T-1&&n[f+o]==0&&A[f+o]==a){Y.push(X,w+1);
|
|
n[f+o]=1}if(w!=0&&n[f-o]==0&&A[f-o]==a){Y.push(X,w-1);n[f-o]=1}if(w!=o-1&&n[f+1]==0&&A[f+1]==a){Y.push(X+1,w);
|
|
n[f+1]=1}if(w!=0&&n[f-1]==0&&A[f-1]==a){Y.push(X-1,w);n[f-1]=1}}};L.Ej.R3=function($,o,T,s,E,e,n,A){var u=[s,E],Y=$[E*o+s],b=0,a=[];
|
|
e[E*o+s]=1;while(u.length!=0){var w=u.pop(),X=u.pop(),f=w*o+X;n[f]=A;b++;if(w!=T-1)if($[f+o]==Y){if(e[f+o]==0){u.push(X,w+1);
|
|
e[f+o]=1}}else a.push(X,w+1);if(w!=0)if($[f-o]==Y){if(e[f-o]==0){u.push(X,w-1);e[f-o]=1}}else a.push(X,w-1);
|
|
if(X!=o-1)if($[f+1]==Y){if(e[f+1]==0){u.push(X+1,w);e[f+1]=1}}else a.push(X+1,w);if(X!=0)if($[f-1]==Y){if(e[f-1]==0){u.push(X-1,w);
|
|
e[f-1]=1}}else a.push(X-1,w)}return[b,a]};L.Ej.ah8=function($,o,T,s,E){var e=L.Ej.xp($.buffer,o,T).fD,n=Date.now(),A=[];
|
|
for(var f=0;f<e.length;f++){var u=e[f],Y=1;for(var b=0;b<Y;b++)A.push(u.Z9)}var a=new Uint32Array(A),w=UPNG.quantize.getKDtree(new Uint8Array(a.buffer),s),X=[o,1,-o,-1,o+1,-o+1,-o-1,o-1,o+o,2,-o-o,-2,o+o-1,o+o+1,o+2,-o+2,-o-o+1,-o-o-1,-o-2,o-2,o+o+2,-o-o+2-o-o-2,o+o-2],N=new Uint8Array(o*T),z=$;
|
|
for(var i=0;i<T;i++)for(var k=0;k<o;k++){var f=i*o+k<<2,Q=z[f]*(1/255),O=z[f+1]*(1/255),c=z[f+2]*(1/255),B=z[f+3]*(1/255),G=L.Ej.il(w,Q,O,c,B,E);
|
|
if(G==null){var l=[],v=0;while(v<20){var p=i*o+k+X[v]<<2,P=z[p]*(1/255),h=z[p+1]*(1/255),j=z[p+2]*(1/255),C=z[p+3]*(1/255),V=L.Ej.il(w,P,h,j,C,.005);
|
|
if(V!=null){if(l.indexOf(V)==-1){l.push(V);V._T=1}else V._T++}v++}l.sort(function(B,c){return c._T-B._T});
|
|
while(l.length!=0&&l[l.length-1]._T<3)l.pop();if(l.length==0)G=L.Ej.il(w,Q,O,c,B,100);else if(l.length==1)G=l[0];
|
|
else if(l.length==2){var d=l[0],m=l[1],R=d.est.q,g=m.est.q,S=g[0]-R[0],F=g[1]-R[1],r=g[2]-R[2],q=g[3]-R[3],W=Q-R[0],Z=O-R[1],I=c-R[2],_=B-R[3],cN=S*S+F*F+r*r+q*q,ce=W*W+Z*Z+I*I+_*_,gf=(W*S+Z*F+I*r+_*q)/cN,K=ce-gf*gf*cN;
|
|
if(K<.5)G=gf<.5?d:m;else{G=L.Ej.il(w,Q,O,c,B,100)}}else{var d=l[0],m=l[1],cv=l[2],R=d.est.q,g=m.est.q,f0=cv.est.q,i8=R[0]-f0[0],b5=R[1]-f0[1],iC=R[2]-f0[2],an=R[3]-f0[3],cO=g[0]-f0[0],bh=g[1]-f0[1],bD=g[2]-f0[2],fq=g[3]-f0[3],fO=f0[0]-Q,g6=f0[1]-O,hM=f0[2]-c,d3=f0[3]-B,h9=i8*i8+b5*b5+iC*iC+an*an,cs=i8*cO+b5*bh+iC*bD+an*fq,dv=fO*i8+g6*b5+hM*iC+d3*an,ec=i8*cO+b5*bh+iC*bD+an*fq,gT=cO*cO+bh*bh+bD*bD+fq*fq,iz=fO*cO+g6*bh+hM*bD+d3*fq,gw=1/(cs*ec-h9*gT),gf=(gT*dv-iz*cs)*gw,iI=(iz*h9-dv*ec)*gw,g2=1-gf-iI,bb=Math.max(gf,iI,g2);
|
|
if(bb==gf)G=d;else if(bb==iI)G=m;else G=cv}}N[f>>2]=G.ind}return{Zg:N,fD:w[1]}};L.Ej.xp=function($,o,T){var s=[],E={},e=o-1,n=T-1,A=0,u=new Uint32Array($),Y=[-o-1,-o,-o+1,-1,1,o-1,o,o+1,o+o,2,-o-o,-2,o+o-1,o+o+1,o+2,-o+2,-o-o+1,-o-o-1,-o-2,o-2,o+o+2,-o-o+2-o-o-2,o+o-2];
|
|
for(var b=1;b<n;b++)for(var a=1;a<e;a++){var w=b*o+a,X=u[w],N=!0;for(var f=0;f<8;f++)N=N&&u[w+Y[f]]==X;
|
|
if(N){A++;var z=E[X];if(z==null){E[X]=s.length;s.push({Z9:X,ve:1})}else s[z].ve++}}return{fD:s,acT:A}};
|
|
L.Ej.il=function($,o,T,s,E,e){var n=UPNG.quantize.getNearest($[0],o,T,s,E);return L.Ej.apg(n,o,T,s,E)<e?n:null};
|
|
L.Ej.apg=function($,o,T,s,E){var e=$.est.q,n=o-e[0],A=T-e[1],u=s-e[2],Y=E-e[3];return n*n+A*A+u*u+Y*Y};
|
|
L.Ej.An=function(){function $(k,Q,O,c,B,G){var l=[],v=G,p=G,P=G>>>2;for(var h=0;h<B;h++)for(var j=0;
|
|
j<c;j++){var C=~~((j+.5)*v),V=~~((h+.5)*p),d=1e9,m=Math.max(0,C-P),R=Math.min(Q,C+P+1),g=Math.max(0,V-P),S=Math.min(O,V+P+1);
|
|
for(var F=g;F<S;F++)for(var r=m;r<R;r++){var q=o(k,Q,r,F);if(q<d){C=r;V=F;d=q}}var W=(V*Q+C)*4;l.push(C,V)}return l}function o(k,Q,O,c){var B=(c*Q+O)*4,G=Q*4,l=T(k,B-4,B)+T(k,B,B+4),v=T(k,B-G,B)+T(k,B,B+G);
|
|
return l+v}function T(k,Q,O){var c=k[Q]-k[O],B=k[Q+1]-k[O+1],G=k[Q+2]-k[O+2];return c*c+B*B+G*G}var s=0,E=0;
|
|
function e(k,Q,O,c){E++;if(c<s)s=c;k[c].push(Q,O)}function n(k){E--;while(k[s].length==0)s++}function A(k,Q,O,c,B){s=0;
|
|
E=0;var G=Q*O,l=Math.round(Math.min(Q,O)/(c?c:50)),m=0,R=16;if(l==0)l=1;var v=(B?B:30)/l,p=Math.floor(Q/l),P=Math.floor(O/l),h=new Uint16Array(G);
|
|
for(var f=0;f<G;f++)h[f]=65535;var j=$(k,Q,O,p,P,l),C=j.length>>>1;if(C>65535)throw C;var V=[];for(var f=0;
|
|
f<1e3+O;f++)V.push([]);var d=[0,1,0,-1,-1,0,1,0],g=Math.min(P,5),S=new Uint32Array(C*6);for(var F=0;
|
|
F<P;F+=g){var r=Math.min(F+g+1,P);for(var q=F;q<r;q++)for(var W=0;W<p;W++){var f=q*p+W,Z=f*2,I=j[Z+1]<<16|j[Z];
|
|
e(V,I,f,j[Z+1]>>>R)}var _=Math.min(O,r*l);if(F+g>=P)_=O;while(E!=0){n(V);var cN=V[s].pop(),ce=V[s].pop(),gf=ce>>>16,K=ce&65535,f=gf*Q+K;
|
|
if(h[f]==65535){var cv=cN*6,f0=f<<2;h[f]=cN;S[cv]+=k[f0];S[cv+1]+=k[f0+1];S[cv+2]+=k[f0+2];S[cv+3]+=K;
|
|
S[cv+4]+=gf;S[cv+5]++;var i8=gf>>>R;if(gf!=_-1&&h[f+Q]==65535)e(V,gf+1<<16|K,cN,u(k,Q,v,K,gf+1,S,cv)+i8);
|
|
if(gf!=0&&h[f-Q]==65535)e(V,gf-1<<16|K,cN,u(k,Q,v,K,gf-1,S,cv)+i8);if(K!=0&&h[f-1]==65535)e(V,gf<<16|K-1,cN,u(k,Q,v,K-1,gf,S,cv)+i8);
|
|
if(K!=Q-1&&h[f+1]==65535)e(V,gf<<16|K+1,cN,u(k,Q,v,K+1,gf,S,cv)+i8)}}if(_!=gf){var b5=(F+g)*p;S.fill(0,b5*6,(b5+p)*6);
|
|
for(var gf=(F+g-2)*l;gf<_;gf++)for(var K=0;K<Q;K++){var f=gf*Q+K;if(h[f]>=b5){h[f]=65535}}}}return{Zg:h,BL:C,Ol:S}}L.Ej.dX=function(k,Q,O,c,B){var G=k.BL,l=Q*O,v=k.Ol,p=k.Zg,P=X(c,p,G,l),h=new UnionFind(G),R=0;
|
|
for(var j=1;j<O;j++)for(var C=1;C<Q;C++){var f=j*Q+C,V=p[f],d=0;if((d=p[f-1])!=V&&P[d]==P[V]&&Y(v,0,V*6,d*6)<B)h.link(V,d);
|
|
if((d=p[f-Q])!=V&&P[d]==P[V]&&Y(v,0,V*6,d*6)<B)h.link(V,d)}var m=new Uint16Array(G);m.fill(65535);var g=new Uint16Array(G);
|
|
for(var f=0;f<G;f++){var S=h.find(f);if(m[S]==65535)m[S]=R++;g[f]=m[S]}var F=new Uint16Array(l);for(var f=0;
|
|
f<l;f++)F[f]=g[p[f]];return{Zg:F,BL:R}};L.Ej.a1_=function(k,Q,O,c){var B=L.G(O),G=Q.length,l=0;for(var f=0;
|
|
f<G&&l!=3;f++){var v=c[f];if(v==0||v==255){var p=Q[f],P=2-(v>>>7);B[p]=l=B[p]|P}}return l!=3};function u(k,Q,O,c,B,G,l){var v=(B*Q+c)*4,p=G[l+5],P=1/p,h=k[v]*p-G[l],j=k[v+1]*p-G[l+1],C=k[v+2]*p-G[l+2],V=c*p-G[l+3],d=B*p-G[l+4],m=Math.sqrt(h*h+j*j+C*C),R=Math.sqrt(V*V+d*d);
|
|
return~~((m+O*R)*P+.5)}function Y(k,Q,O,c){var B=1/k[O+5],G=1/k[c+5],l=k[O]*B-k[c]*G,v=k[O+1]*B-k[c+1]*G,p=k[O+2]*B-k[c+2]*G,P=k[O+3]*B-k[c+3]*G,h=k[O+4]*B-k[c+4]*G,j=Math.sqrt(l*l+v*v+p*p),C=Math.sqrt(P*P+h*h);
|
|
return~~(j+Q*C+.5)}function b(k,Q,O){var c=L.gc(k,new df(0,0,Q,O)),B=c.rect.d,G=c.rect.w,l=A(c._3,B,G),v=l.Zg,p=Date.now(),P=new Uint16Array(Q*O);
|
|
P.fill(65535);for(var h=0;h<G;h++){for(var j=0;j<B;j++){var C=h*B+j,f=(h<<1)*Q+(j<<1),V=v[C];if(v[C-B]!=V||v[C-1]!=V||v[C+1]!=V||v[C+B]!=V)V=65535;
|
|
P[f]=V;P[f+1]=V;P[f+Q]=V;P[f+Q+1]=V}}l.Zg=P;return l}function a(k,Q){var f=0,O=k.length;while(f!=O&&k[f]!=Q)f+=2;
|
|
return f==O?-1:f}function w(k,f){if(f==k.length-2){k.pop();k.pop()}else{k[f+1]=k.pop();k[f]=k.pop()}}L.Ej.a4v=function(k,Q,O,c,B){var G=new Uint32Array(B*4400),o=[];
|
|
for(var f=0;f<B;f++)o.push([]);for(var l=0;l<O;l++)for(var v=0;v<Q;v++){var f=l*Q+v,p=f<<2,P=c[f],h=0,j=k[p]>>>4,C=k[p+1]>>>4,V=k[p+2]>>>4;
|
|
G[P*4400+(j<<8|C<<4|V)]++;G[P*4400+4096]++;G[P*4400+4100+(j<<4|C)]++;G[P*4400+4360+j]++;if(v!=0&&(h=c[f-1])!=P&&a(o[P],h)==-1){o[P].push(h,0);
|
|
o[h].push(P,0)}if(l!=0&&(h=c[f-Q])!=P&&a(o[P],h)==-1){o[P].push(h,0);o[h].push(P,0)}}for(var f=0;f<B;
|
|
f++){var V=o[f];for(var d=0;d<V.length;d+=2)V[d+1]=i(G,f,V[d])}return[G,o]};function X(k,Q,O,c){var B=L.G(O);
|
|
for(var f=0;f<c;f++){var G=k[f];if(G==0||G==255)B[Q[f]]=2-(G>>>7)}return B}L.Ej.ao5=function(k,Q,O,c,B,G,l){var v=Q*O,p=l[0],o=l[1],P=new UnionFind(c),h=X(B,k,c,v),j=-1,C=!0,V=0;
|
|
for(var f=0;f<c;f++)if(h[f]==1){if(j==-1)j=f;else P.link(f,j)}if(j==-1){for(var f=0;f<v;f++)G[f]=B[f]==255?255:0;
|
|
return}while(C){while(C){C=!1;for(var f=0;f<c;f++){if(h[f]==0){var d=N(o[f]);if(h[d]==1){h[f]=h[d];C=!0;
|
|
P.link(f,d)}}}}C=!0;V=0;while(C){C=!1;for(var f=0;f<c;f++){if(h[f]==0){var d=N(o[f]);if(h[d]==0){var m=f*4400,R=d*4400;
|
|
for(var g=0;g<4400;g+=2){p[m+g]+=p[R+g];p[m+g+1]+=p[R+g+1]}z(o,p,f,d);V++;h[d]=3;C=!0;P.link(f,d)}}}}C=V!=0}var S=P.find(j);
|
|
for(var f=0;f<c;f++)h[f]=P.find(f)==S?255:0;for(var f=0;f<v;f++){G[f]=h[k[f]]}for(var f=0;f<v;f++){var d=B[f];
|
|
if(d==0||d==255)G[f]=d}};function N(k){var Q=0,O=0,c=k.length;for(var B=0;B<c;B+=2){var G=k[B+1];if(G>O){O=G;
|
|
Q=B}}return k[Q]}function z(o,k,Q,O){var c=o[Q],B=o[O];w(c,a(c,O));w(B,a(B,Q));for(var f=0;f<B.length;
|
|
f+=2){var G=B[f],l=o[G];w(l,a(l,O));if(a(l,Q)==-1){l.push(Q,0);c.push(G,0)}}for(var f=0;f<c.length;f+=2){var G=c[f],l=o[G],v=i(k,Q,G);
|
|
c[f+1]=v;l[a(l,Q)+1]=v}}function i(k,Q,O){var c=0,B=4096,G=Q*4400,l=O*4400;for(var v=0;v<16;v++){if(k[G+4360+v]==0||k[l+4360+v]==0)continue;
|
|
for(var p=0;p<16;p++){var P=v<<4|p;if(k[G+4100+P]==0||k[l+4100+P]==0)continue;var h=G+(P<<4),j=l+(P<<4);
|
|
for(var f=0;f<16;f++)c+=Math.sqrt(k[h+f]*k[j+f])}}var C=c/Math.sqrt(k[G+B]*k[l+B]);return~~(999.99999*C)}return A}();
|
|
var gE=function(){function $(){this.Y=0;this.YG=0;this.P2={};this.BN=[];this.Ni=1e5;this.Fn=1e5;this.Nh=-1;
|
|
this.Jv=-1;this.color=0}function o(J){this.ds=J;this.jX=new Array(J);this.Z9=new Array(J*6);this.arj=0;
|
|
this.vQ=new Array(J*2);this.alpha=new Array(J);this.LG=new Array(J);this.KJ=new Array(J)}function T(E,e,n,A){function u(i,k,E,e){return E[e*k+i]}function Y(f){var l=E.length;
|
|
while(f<l&&E[f]==0)f++;return f<l?f:-1}function b(i,k,l){for(var f=2;f<5;f++){var v=0;for(var p=-f+1;
|
|
p<=f-1;p++){v+=u(i+p,k+f-1,E,e)==l?1:-1;v+=u(i+f-1,k+p-1,E,e)==l?1:-1;v+=u(i+p-1,k-f,E,e)==l?1:-1;v+=u(i-f,k+p,E,e)==l?1:-1}if(v>0)return 1;
|
|
else if(v<0)return 0}return 0}function a(l,N){var z=new $,i=l,k=N,v=0,p=1,P;z.color=E[N*e+l];z.sign=u(l,N,E,e)==z.color?"+":"-";
|
|
while(1){z.BN.push(i,k);if(i>z.Nh)z.Nh=i;if(i<z.Ni)z.Ni=i;if(k>z.Jv)z.Jv=k;if(k<z.Fn)z.Fn=k;z.YG++;i+=v;
|
|
k+=p;z.Y-=i*p;if(i==l&&k==N)break;var h=u(i+(v+p-1>>1),k+(p-v-1>>1),E,e)==z.color,j=u(i+(v-p-1>>1),k+(p+v-1>>1),E,e)==z.color;
|
|
if(j&&!h){if(A.SS=="right"||A.SS=="black"&&z.sign=="+"||A.SS=="white"&&z.sign=="-"||A.SS=="majority"&&b(i,k,z.color)||A.SS=="minority"&&!b(i,k,z.color)){P=v;
|
|
v=-p;p=P}else{P=v;v=p;p=-P}}else if(j){P=v;v=-p;p=P}else if(!h){P=v;v=p;p=-P}}return z}var w=0,X=[];
|
|
while(!0){var w=Y(w);if(w==-1)break;var N=Math.floor(w/e),z=a(w-N*e,N);for(var f=0;f<z.BN.length-2;f+=2){var i=z.BN[f],k=z.BN[f+1],Q=k*e+i;
|
|
if(i==z.BN[f+2]&&k+1==z.BN[f+3]&&E[Q]!=0)gE.fill(Q,E,e,0)}if(z.Y>A.air)X.push(z)}for(var f=0;f<X.length;
|
|
f++)X[f].parent=-1;var O=Date.now();for(var f=1;f<X.length;f++){var c=X[f];for(var B=f-1;B>=0;B--){var G=X[B];
|
|
if(c.Ni<G.Ni||c.Nh>G.Nh||c.Fn<G.Fn||c.Jv>G.Jv)continue;if(!gE.akn(G.BN,c.BN[0]+.5,c.BN[1]+.5))continue;
|
|
c.parent=B;break}}return X}function s(E,e){function n(v,p,P,h,j){this.x=v;this.y=p;this.Pp=P;this.Qb=h;
|
|
this.Lw=j}function A(v,J){return(J+v)%J}function u(v,p,P,h){return v*h-P*p}function Y(v,p,P,h){return v*P+p*h}function b(v,p,P){if(v<=P)return v<=p&&p<P;
|
|
else return v<=p||p<P}function a(v,p,P){var h=0;h+=p*v[0]*p;h+=p*v[1]*P;h+=p*v[2];h+=P*v[3]*p;h+=P*v[4]*P;
|
|
h+=P*v[5];h+=v[6]*p;h+=v[7]*P;h+=v[8];return h}function w(v,p,P){return p+v*(P-p)}function X(v,p,P,h){var j=Math.sign(P-v),C=-Math.sign(h-p);
|
|
return j*(P-v)-C*(h-p)}function N(v,p){return Math.sqrt(v*v+p*p)}function z(v,p,P,h,j){var C=1-v;return C*C*C*p+3*(C*C*v)*P+3*(v*v*C)*h+v*v*v*j}function i(v,p,P,h,j,C,V,d){var m=u(v,p,V,d),R=u(P,h,V,d),g=u(j,C,V,d),S=m-2*R+g,F=-2*m+2*R,r=m,q=F*F-4*S*r;
|
|
if(S==0||q<0)return-1;var W=Math.sqrt(q),Z=(-F+W)/(2*S),I=(-F-W)/(2*S);if(Z>=0&&Z<=1)return Z;else if(I>=0&&I<=1)return I;
|
|
else return-1}function k(l){var f,v,p;l.Kp=l.BN[0];l.adv=l.BN[1];l.J3=[];var P=l.J3;P.push(new n(0,0,0,0,0));
|
|
for(f=0;f<l.YG;f++){v=l.BN[f<<1]-l.Kp;p=l.BN[(f<<1)+1]-l.adv;P.push(new n(P[f].x+v,P[f].y+p,P[f].Pp+v*p,P[f].Qb+v*v,P[f].Lw+p*p))}}function Q(l){var J=l.YG,v=l.BN,p,P=new Array(J),h=new Array(J),j=new Array(4),C,V,d,m,R,g,S,F,r,q,W,f,Z,I,_,cN,ce,gf,K=0;
|
|
l.Zv=new Array(J);for(f=J-1;f>=0;f--){if(v[f<<1]!=v[K<<1]&&v[(f<<1)+1]!=v[(K<<1)+1])K=f+1;h[f]=K}for(f=J-1;
|
|
f>=0;f--){var cv=A(f+1,J)<<1;j[0]=j[1]=j[2]=j[3]=0;p=(3+3*(v[cv]-v[f<<1])+(v[cv+1]-v[(f<<1)+1]))/2;j[p]++;
|
|
C=0;V=0;d=0;m=0;K=h[f];I=f;while(1){W=0;p=(3+3*Math.sign(v[K*2]-v[I*2])+Math.sign(v[K*2+1]-v[I*2+1]))/2;
|
|
j[p]++;if(j[0]&&j[1]&&j[2]&&j[3]){P[f]=I;W=1;break}r=v[K*2]-v[f*2];q=v[K*2+1]-v[f*2+1];if(u(C,V,r,q)<0||u(d,m,r,q)>0){break}if(Math.abs(r)<=1&&Math.abs(q)<=1){}else{R=r+(q>=0&&(q>0||r<0)?1:-1);
|
|
g=q+(r<=0&&(r<0||q<0)?1:-1);if(u(C,V,R,g)>=0){C=R;V=g}R=r+(q<=0&&(q<0||r<0)?1:-1);g=q+(r>=0&&(r>0||q<0)?1:-1);
|
|
if(u(d,m,R,g)<=0){d=R;m=g}}I=K;K=h[I];if(!b(K,f,I)){break}}if(W==0){S=Math.sign(v[K*2]-v[I*2]);F=Math.sign(v[K*2+1]-v[I*2+1]);
|
|
r=v[I*2]-v[f*2];q=v[I*2+1]-v[f*2+1];_=u(C,V,r,q);cN=u(C,V,S,F);ce=u(d,m,r,q);gf=u(d,m,S,F);Z=1e7;if(cN<0){Z=Math.floor(_/-cN)}if(gf>0){Z=Math.min(Z,Math.floor(-ce/gf))}P[f]=A(I+Z,J)}}Z=P[J-1];
|
|
l.Zv[J-1]=Z;for(f=J-2;f>=0;f--){if(b(f+1,P[f],Z)){Z=P[f]}l.Zv[f]=Z}for(f=J-1;b(A(f+1,J),Z,l.Zv[f]);f--){l.Zv[f]=Z}}function O(l){function v(l,f,p){var J=l.YG,r=l.BN,q=l.J3,W,Z,I,_,cN,h,ce,gf,F,K,cv,f0,i8,b5,iC=0;
|
|
if(p>=J){p-=J;iC=1}if(iC==0){W=q[p+1].x-q[f].x;Z=q[p+1].y-q[f].y;_=q[p+1].Qb-q[f].Qb;I=q[p+1].Pp-q[f].Pp;
|
|
cN=q[p+1].Lw-q[f].Lw;h=p+1-f}else{W=q[p+1].x-q[f].x+q[J].x;Z=q[p+1].y-q[f].y+q[J].y;_=q[p+1].Qb-q[f].Qb+q[J].Qb;
|
|
I=q[p+1].Pp-q[f].Pp+q[J].Pp;cN=q[p+1].Lw-q[f].Lw+q[J].Lw;h=p+1-f+J}cv=(r[f<<1]+r[p<<1])/2-r[0];f0=(r[(f<<1)+1]+r[(p<<1)+1])/2-r[1];
|
|
b5=r[p<<1]-r[f<<1];i8=-(r[(p<<1)+1]-r[(f<<1)+1]);ce=(_-2*W*cv)/h+cv*cv;gf=(I-W*f0-Z*cv)/h+cv*f0;F=(cN-2*Z*f0)/h+f0*f0;
|
|
K=i8*i8*ce+2*i8*b5*gf+b5*b5*F;return Math.sqrt(K)}var f,p,P,h,J=l.YG,j=new Array(J+1),C=new Array(J+1),V=new Array(J),d=new Array(J+1),m=new Array(J+1),R=new Array(J+1),g,S,F;
|
|
for(f=0;f<J;f++){F=A(l.Zv[A(f-1,J)]-1,J);if(F==f){F=A(f+1,J)}if(F<f){V[f]=J}else{V[f]=F}}p=1;for(f=0;
|
|
f<J;f++){while(p<=V[f]){d[p]=f;p++}}f=0;for(p=0;f<J;p++){m[p]=f;f=V[f]}m[p]=J;P=p;f=J;for(p=P;p>0;p--){R[p]=f;
|
|
f=d[f]}R[0]=0;j[0]=0;for(p=1;p<=P;p++){for(f=R[p];f<=m[p];f++){S=-1;for(h=m[p-1];h>=d[f];h--){g=v(l,h,f)+j[h];
|
|
if(S<0||g<S){C[f]=h;S=g}}j[f]=S}}l.rI=P;l.aeG=new Array(P);for(f=J,p=P-1;f>0;p--){f=C[f];l.aeG[p]=f}}function c(l){function v(l,f,g,V,d,an){var J=l.YG,cO=l.J3,bh=0,F;
|
|
while(g>=J){g-=J;bh+=1}while(f>=J){f-=J;bh-=1}while(g<0){g+=J;bh-=1}while(f<0){f+=J;bh+=1}var bD=cO[g+1].x-cO[f].x+bh*cO[J].x,fq=cO[g+1].y-cO[f].y+bh*cO[J].y,fO=cO[g+1].Qb-cO[f].Qb+bh*cO[J].Qb,g6=cO[g+1].Pp-cO[f].Pp+bh*cO[J].Pp,hM=cO[g+1].Lw-cO[f].Lw+bh*cO[J].Lw,S=g+1-f+bh*J;
|
|
V[an]=bD/S;V[an+1]=fq/S;var d3=(fO-bD*bD/S)/S,h9=(g6-bD*fq/S)/S,cs=(hM-fq*fq/S)/S,dv=(d3+cs+Math.sqrt((d3-cs)*(d3-cs)+4*h9*h9))/2;
|
|
d3-=dv;cs-=dv;if(Math.abs(d3)>=Math.abs(cs)){F=Math.sqrt(d3*d3+h9*h9);if(F!=0){d[an]=-h9/F;d[an+1]=d3/F}}else{F=Math.sqrt(cs*cs+h9*h9);
|
|
if(F!=0){d[an]=-cs/F;d[an+1]=h9/F}}if(F==0){d[an]=d[an+1]=0}}var p=l.rI,P=l.aeG,J=l.YG,h=l.BN,j=l.Kp,C=l.adv,V=new Array(p*2),d=new Array(p*2),m=new Array(p),R=new Array(3),f,g,S,F,Z,I,_,cN,ce,gf,K;
|
|
l.P2=new o(p);for(f=0;f<p;f++){g=P[A(f+1,p)];g=A(g-P[f],J)+P[f];V[f<<1]=0;V[(f<<1)+1]=0;d[f<<1]=0;d[(f<<1)+1]=0;
|
|
v(l,P[f],g,V,d,f<<1)}for(f=0;f<p;f++){m[f]=[0,0,0,0,0,0,0,0,0];var r=d[f<<1]*d[f<<1]+d[(f<<1)+1]*d[(f<<1)+1],q=1/r;
|
|
if(r!=0){R[0]=d[(f<<1)+1];R[1]=-d[f<<1];R[2]=-R[1]*V[(f<<1)+1]-R[0]*V[f<<1];for(F=0;F<3;F++){m[f][F*3+0]=R[F]*R[0]*q;
|
|
m[f][F*3+1]=R[F]*R[1]*q;m[f][F*3+2]=R[F]*R[2]*q}}}var W=[0,0,0,0,0,0,0,0,0];for(f=0;f<p;f++){W[0]=W[1]=W[2]=W[3]=W[4]=W[5]=W[6]=W[7]=W[8]=W[9]=0;
|
|
var cv=h[P[f]<<1]-j,f0=h[(P[f]<<1)+1]-C,i8=0,b5=0;g=A(f-1,p);for(F=0;F<9;F+=3){W[F+0]=m[g][F+0]+m[f][F+0];
|
|
W[F+1]=m[g][F+1]+m[f][F+1];W[F+2]=m[g][F+2]+m[f][F+2]}while(1){var iC=W[0]*W[4]-W[1]*W[3];if(iC!=0){i8=(-W[2]*W[4]+W[5]*W[0])/iC;
|
|
b5=(W[2]*W[3]-W[5]*W[0])/iC;break}if(W[0]>W[4]){R[0]=-W[1];R[1]=W[0]}else if(W[4]){R[0]=-W[4];R[1]=W[3]}else{R[0]=1;
|
|
R[1]=0}var r=R[0]*R[0]+R[1]*R[1],q=1/r;R[2]=-R[1]*f0-R[0]*cv;for(F=0;F<3;F++){W[F*3+0]+=R[F]*R[0]*q;
|
|
W[F*3+1]+=R[F]*R[1]*q;W[F*3+2]+=R[F]*R[2]*q}}Z=Math.abs(i8-cv);I=Math.abs(b5-f0);if(Z<=.5&&I<=.5){l.P2.vQ[f<<1]=i8+j;
|
|
l.P2.vQ[(f<<1)+1]=b5+C;continue}_=a(W,cv,f0);ce=cv;gf=f0;if(W[0]!=0){for(K=0;K<2;K++){b5=f0-.5+K;i8=-(W[1]*b5+W[2])/W[0];
|
|
Z=Math.abs(i8-cv);cN=a(W,i8,b5);if(Z<=.5&&cN<_){_=cN;ce=i8;gf=b5}}}if(W[4]!=0){for(K=0;K<2;K++){i8=cv-.5+K;
|
|
b5=-(W[3]*i8+W[5])/W[4];I=Math.abs(b5-f0);cN=a(W,i8,b5);if(I<=.5&&cN<_){_=cN;ce=i8;gf=b5}}}for(F=0;F<2;
|
|
F++){for(S=0;S<2;S++){i8=cv-.5+F;b5=f0-.5+S;cN=a(W,i8,b5);if(cN<_){_=cN;ce=i8;gf=b5}}}l.P2.vQ[f<<1]=ce+j;
|
|
l.P2.vQ[(f<<1)+1]=gf+C}}function B(l){var v=l.P2.ds,p=l.P2,f,P,h,j,C,V,d,m,R;for(f=0;f<v;f++){P=A(f+1,v);
|
|
h=A(f+2,v);var g=p.vQ[f<<1],S=p.vQ[(f<<1)+1],F=p.vQ[h<<1],r=p.vQ[(h<<1)+1],q=p.vQ[P<<1],W=p.vQ[(P<<1)+1],Z=w(.5,F,q),I=w(.5,r,W);
|
|
C=X(g,S,F,r);if(C!=0){j=u(q-g,W-S,F-g,r-S)/C;j=Math.abs(j);V=j>1?1-1/j:0;V=V*(1/.75)}else{V=4/3}p.LG[P]=V;
|
|
var _=3*P<<1;if(V>=e.a3E){p.jX[P]=0;p.Z9[_+0]=p.Z9[_+1]=0;p.Z9[_+2]=q;p.Z9[_+3]=W;p.Z9[_+4]=Z;p.Z9[_+5]=I}else{if(V<.55){V=.55}else if(V>1){V=1}var cN=.5+.5*V;
|
|
p.jX[P]=1;p.Z9[_]=w(cN,g,q);p.Z9[_+1]=w(cN,S,W);p.Z9[_+2]=w(cN,F,q);p.Z9[_+3]=w(cN,r,W);p.Z9[_+4]=Z;
|
|
p.Z9[_+5]=I}p.alpha[P]=V;p.KJ[P]=.5}p.aqD=1}function G(l){function v(){this.t2=0;this.bE=0;this.Ev=0;
|
|
this.l8=0;this.s5=0;this.KR=0;this.rZ=0;this.alpha=0}function p(l,f,g,gT,iz,ce,gf){var h=l.P2.ds,gw=l.P2.Z9,iI=l.P2.vQ;
|
|
if(f==g)return 1;var g2=f,q=A(f+1,h),bb=A(g2+1,h),g6=iI[f<<1],hM=iI[(f<<1)+1],ir=iI[q<<1],dG=iI[(q<<1)+1],gY=ce[bb];
|
|
if(gY==0)return 1;var e6=N(g6-ir,hM-dG);for(g2=bb;g2!=g;g2=bb){var bb=A(g2+1,h),fr=A(g2+2,h),bt=iI[bb<<1],cx=iI[(bb<<1)+1],ci=iI[fr<<1],gv=iI[(fr<<1)+1];
|
|
if(ce[bb]!=gY)return 1;if(Math.sign(u(ir-g6,dG-hM,ci-bt,gv-cx))!=gY)return 1;if(Y(ir-g6,dG-hM,ci-bt,gv-cx)<e6*N(bt-ci,cx-gv)*-.999847695156)return 1}var gu=A(f,h)*3+2<<1,ak=A(f+1,h)<<1,hP=A(g,h)<<1,ai=A(g,h)*3+2<<1,an=gw[gu],cO=gw[gu+1],hK=iI[ak],h3=iI[ak+1],e4=iI[hP],co=iI[hP+1],aO=gw[ai],cC=gw[ai+1],K=iI[0],cv=iI[1];
|
|
gu=g*3+2<<1;var hm=gw[gu],cu=gw[gu+1],W=gf[g]-gf[f];W-=u(hm-K,cu-cv,hm-K,cu-cv)/2;if(f>=g){W+=gf[h]}var bF=hK-an,fH=h3-cO,dX=e4-an,fk=co-cO,ix=aO-an,bx=cC-cO,ha=u(bF,fH,dX,fk),ca=u(bF,fH,ix,bx),iX=u(dX,fk,ix,bx),dp=ha+iX-ca;
|
|
if(ca==ha)return 1;var cN=iX/(iX-dp),_=ca/(ca-ha),dd=ca*cN/2;if(dd==0)return 1;var iD=W/dd,Z=2-Math.sqrt(4-iD/.3);
|
|
gT.bE=w(cN*Z,an,hK);gT.Ev=w(cN*Z,cO,h3);gT.l8=w(_*Z,aO,e4);gT.s5=w(_*Z,cC,co);gT.alpha=Z;gT.KR=cN;gT.rZ=_;
|
|
hK=gT.bE;h3=gT.Ev;e4=gT.l8;co=gT.s5;gT.t2=0;for(g2=A(f+1,h);g2!=g;g2=bb){bb=A(g2+1,h);var iY=iI[g2<<1],ho=iI[(g2<<1)+1],bt=iI[bb<<1],cx=iI[(bb<<1)+1];
|
|
cN=i(hK-an,h3-cO,e4-hK,co-h3,aO-e4,cC-co,bt-iY,cx-ho);if(cN<-.5)return 1;var bN=z(cN,an,hK,e4,aO),it=z(cN,cO,h3,co,cC),e6=N(bt-iY,cx-ho);
|
|
if(e6==0)return 1;var j4=u(bt-iY,cx-ho,bN-iY,it-ho)/e6;if(Math.abs(j4)>iz)return 1;if(Y(bt-iY,cx-ho,bN-iY,it-ho)<0||Y(iY-bt,ho-cx,bN-bt,it-cx)<0){return 1}gT.t2+=j4*j4}for(g2=f;
|
|
g2!=g;g2=bb){bb=A(g2+1,h);var gu=g2*3+2<<1,ak=bb*3+2<<1,gy=gw[gu],fi=gw[gu+1],hN=gw[ak],b4=gw[ak+1];
|
|
cN=i(hK-an,h3-cO,e4-hK,co-h3,aO-e4,cC-co,hN-gy,b4-fi);if(cN<-.5)return 1;var bN=z(cN,an,hK,e4,aO),it=z(cN,cO,h3,co,cC),e6=N(hN-gy,b4-fi);
|
|
if(e6==0)return 1;var j4=u(hN-gy,b4-fi,bN-gy,it-fi)/e6,eN=u(hN-gy,b4-fi,iI[bb<<1]-gy,iI[(bb<<1)+1]-fi)/e6;
|
|
eN*=.75*l.P2.alpha[bb];if(eN<0){j4=-j4;eN=-eN}if(j4<eN-iz)return 1;if(j4<eN){gT.t2+=(j4-eN)*(j4-eN)}}return 0}var P=l.P2,h=P.ds,j=P.vQ,C=new Array(h+1),V=new Array(h+1),d=new Array(h+1),m=new Array(h+1),R,f,g,S,F=new v,r,q,W,Z,I,_,cN,ce=new Array(h),gf=new Array(h+1);
|
|
for(f=0;f<h;f++){if(P.jX[f]=="CURVE"){var K=j[A(f-1,h)<<1],cv=j[(A(f-1,h)<<1)+1],f0=j[f<<1],i8=j[(f<<1)+1],b5=j[A(f+1,h)<<1],iC=j[(A(f+1,h)<<1)+1];
|
|
ce[f]=Math.sign(u(f0-K,i8-cv,b5-f0,iC-i8))}else{ce[f]=0}}W=0;gf[0]=0;var an=P.vQ[0],cO=P.vQ[1];for(f=0;
|
|
f<h;f++){q=A(f+1,h);if(P.jX[q]=="CURVE"){Z=P.alpha[q];var bh=f*3+2<<1,bD=q*3+2<<1,fq=P.Z9[bh],fO=P.Z9[bh+1],g6=j[q<<1],hM=j[(q<<1)+1],d3=P.Z9[bD],h9=P.Z9[bD+1];
|
|
W+=.3*Z*(4-Z)*u(g6-fq,hM-fO,d3-fq,h9-fO)/2;W+=u(fq-an,fO-cO,d3-an,h9-cO)/2}gf[f+1]=W}C[0]=-1;V[0]=0;
|
|
d[0]=0;for(g=1;g<=h;g++){C[g]=g-1;V[g]=V[g-1];d[g]=d[g-1]+1;for(f=g-2;f>=0;f--){S=p(l,f,A(g,h),F,e.apM,ce,gf);
|
|
if(S){break}if(d[g]>d[f]+1||d[g]==d[f]+1&&V[g]>V[f]+F.t2){C[g]=f;V[g]=V[f]+F.t2;d[g]=d[f]+1;m[g]=F;F=new v}}}R=d[h];
|
|
I=new o(R);_=new Array(R);cN=new Array(R);g=h;for(f=R-1;f>=0;f--){var cs=A(g,h),dv=f*3+0<<1,ec=cs*3+0<<1;
|
|
if(C[g]==g-1){I.jX[f]=P.jX[cs];I.Z9[dv]=P.Z9[ec];I.Z9[dv+1]=P.Z9[ec+1];I.Z9[dv+2]=P.Z9[ec+2];I.Z9[dv+3]=P.Z9[ec+3];
|
|
I.Z9[dv+4]=P.Z9[ec+4];I.Z9[dv+5]=P.Z9[ec+5];I.vQ[f<<1]=P.vQ[cs<<1];I.vQ[(f<<1)+1]=P.vQ[(cs<<1)+1];I.alpha[f]=P.alpha[cs];
|
|
I.LG[f]=P.LG[cs];I.KJ[f]=P.KJ[cs];_[f]=cN[f]=1}else{I.jX[f]="CURVE";I.Z9[dv]=m[g].bE;I.Z9[dv+1]=m[g].Ev;
|
|
I.Z9[dv+2]=m[g].l8;I.Z9[dv+3]=m[g].s5;I.Z9[dv+4]=P.Z9[ec+4];I.Z9[dv+5]=P.Z9[ec+5];I.vQ[f<<1]=w(m[g].rZ,P.Z9[ec+4],j[cs<<1]);
|
|
I.vQ[(f<<1)+1]=w(m[g].rZ,P.Z9[ec+5],j[(cs<<1)+1]);I.alpha[f]=m[g].alpha;I.LG[f]=m[g].alpha;_[f]=m[g].rZ;
|
|
cN[f]=m[g].KR}g=C[g]}for(f=0;f<R;f++){q=A(f+1,R);I.KJ[f]=_[f]/(_[f]+cN[q])}I.aqD=1;l.P2=I}for(var f=0;
|
|
f<E.length;f++){var l=E[f];k(l);Q(l);O(l);c(l);B(l);if(e.acK)G(l)}}return{ar1:T,a6I:s}}();gE.Ra=function($,o,T,s){var E={SS:"minority",air:s,acK:!0,a3E:1,apM:.2},e=gE.ar1($,o,T,E);
|
|
gE.a6I(e,E);return e};gE.Vp=function($){var o=[];for(var f=0;f<$.length;f++){var T=$[f],s=T.P2,E=["M"],e=[s.Z9[(s.ds-1)*6+4],s.Z9[(s.ds-1)*6+5]];
|
|
for(var n=0;n<s.ds;n++){var A=n*6;if(s.jX[n]==1){E.push("C");for(var u=0;u<6;u++)e.push(s.Z9[A+u])}else if(s.jX[n]==0){E.push("L");
|
|
for(var u=2;u<4;u++)e.push(s.Z9[A+u])}}E.push("Z");o.push({parent:T.parent,color:T.color,path:{I:e,o:E}})}return o};
|
|
gE.a8C=function($,o,T,s,E){function e(N){function z(f){var X="C "+(N.Z9[f*3+0<<1]*o).toFixed(1)+" "+(N.Z9[(f*3+0<<1)+1]*o).toFixed(1)+",";
|
|
X+=(N.Z9[f*3+1<<1]*o).toFixed(1)+" "+(N.Z9[(f*3+1<<1)+1]*o).toFixed(1)+",";X+=(N.Z9[f*3+2<<1]*o).toFixed(1)+" "+(N.Z9[(f*3+2<<1)+1]*o).toFixed(1)+" ";
|
|
return X}function i(f){var Q="L "+(N.Z9[f*3+1<<1]*o).toFixed(1)+" "+(N.Z9[(f*3+1<<1)+1]*o).toFixed(1)+" ";
|
|
Q+=(N.Z9[f*3+2<<1]*o).toFixed(1)+" "+(N.Z9[(f*3+2<<1)+1]*o).toFixed(1)+" ";return Q}var J=N.ds,f,k="M"+(N.Z9[(J-1)*3+2<<1]*o).toFixed(1)+" "+(N.Z9[((J-1)*3+2<<1)+1]*o).toFixed(1)+" ";
|
|
for(f=0;f<J;f++){if(N.jX[f]==1){k+=z(f)}else if(N.jX[f]==0){k+=i(f)}}return k}var T=T*o,s=s*o,n=$.length,A=[];
|
|
for(var f=0;f<256;f++)A.push("rgb("+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+")");
|
|
var u="<svg id=\"svg\" version=\"1.1\" width=\""+T+"\" height=\""+s+"\" xmlns=\"http://www.w3.org/2000/svg\">";
|
|
for(var f=0;f<n;f++){var Y=E[$[f].color-1].ad6.BR;if((Y>>>24&255)==0)continue;u+="<path d=\"";var b=$[f].P2;
|
|
u+=e(b);var a=Y>>0&255,w=Y>>8&255,X=Y>>16&255,Y="rgb("+a+","+w+","+X+")";u+="\" fill=\""+Y+"\" fill-rule=\"evenodd\"/>"}u+="</svg>";
|
|
return u};gE.akn=function($,o,T){var J=$.length>>1,s,E=$[2*J-3]-T,e=$[2*J-2]-o,n=$[2*J-1]-T,A=n>E,u=0;
|
|
for(var f=0;f<J;f++){s=e;E=n;e=$[2*f]-o;n=$[2*f+1]-T;if(E==n)continue;A=n>E}for(var f=0;f<J;f++){s=e;
|
|
E=n;e=$[2*f]-o;n=$[2*f+1]-T;if(E<0&&n<0)continue;if(E>0&&n>0)continue;if(s<0&&e<0)continue;if(E==n&&Math.min(s,e)<=0)return!0;
|
|
if(E==n)continue;var Y=s+(e-s)*-E/(n-E);if(Y==0)return!0;if(Y>0)u++;if(E==0&&A&&n>E)u--;if(E==0&&!A&&n<E)u--;
|
|
A=n>E}return(u&1)==1};gE.fill=function($,o,T,s){var E=o[$],e=[$],n=0;while(n<e.length){var A=e[n];n++;
|
|
o[A]=s;if(o[A-T]==E){e.push(A-T);o[A-T]=254}if(o[A-1]==E){e.push(A-1);o[A-1]=254}if(o[A+1]==E){e.push(A+1);
|
|
o[A+1]=254}if(o[A+T]==E){e.push(A+T);o[A+T]=254}}};var y={};y.re=!1;y.W_=!1;y.KG=!1;y.S=document.createElement("canvas");
|
|
y.V8=null;y.JA=null;y.H6=0;(function(){var $={alpha:!0,antialias:!1,depth:!1,premultipliedAlpha:!1},o;
|
|
if(!o)o=y.S.getContext("webgl",$);if(!o)o=y.S.getContext("experimental-webgl",$);if(o){y.re=!0;y.W_=!0;
|
|
y.V8=o;y.JA=o.createFramebuffer();o.bindFramebuffer(o.FRAMEBUFFER,y.JA);o.disable(o.BLEND);o.disable(o.DEPTH_TEST);
|
|
var T=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,T);o.bufferData(o.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),o.STATIC_DRAW);
|
|
o.enableVertexAttribArray(0);o.vertexAttribPointer(0,2,o.FLOAT,!1,0,0)}}());y.a0d=function($){$=$.replace(/\s\s+/g," ");
|
|
$=$.replace(/; /g,";");$=$.replace(/} /g,"}");$=$.replace(/ }/g,"}");$=$.replace(/{ /g,"{");$=$.replace(/ {/g,"{");
|
|
$=$.replace(/= /g,"=");$=$.replace(/ =/g,"=");$=$.replace(/\| /g,"|");$=$.replace(/ \|/g,"|");return $};
|
|
y.alY=function($){var o=y.V8;if($>o.getParameter(o.MAX_TEXTURE_SIZE)){y.re=!1;alert("Disabling WebGL")}};
|
|
y.n0=function($,o){return new Float32Array([($.x-o.x)/o.d,($.y-o.y)/o.w,$.d/o.d,$.w/o.w])};y.iZ=function(){return this.S};
|
|
y.U0=function($,o){var T=y.V8;T.bindFramebuffer(T.FRAMEBUFFER,y.JA);T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,$.ek,0);
|
|
T.viewport(0,0,$.d,$.w);if(o){T.enable(T.SCISSOR_TEST);T.scissor(o.x,o.y,o.d,o.w)}else T.disable(T.SCISSOR_TEST)};
|
|
y.e1=function($,o,T){if(T)throw"error";var s=y.V8;s.disable(s.SCISSOR_TEST);s.bindFramebuffer(s.FRAMEBUFFER,null);
|
|
s.viewport(0,0,$,o);if(T){s.enable(s.SCISSOR_TEST);s.scissor(T.x,T.y,Math.round(T.d),Math.round(T.w))}else s.disable(s.SCISSOR_TEST)};
|
|
y.clear=function(){var $=y.V8;$.clearColor(0,0,0,0);$.clear($.COLOR_BUFFER_BIT)};y.C_=function($,o){if(o==null)o=0;
|
|
var T=(o>>>0&255)==0,s=(o>>>8&255)==0,E=(o>>>16&255)==0,e=(o>>>24&255)==0,n=($>>>0&255)*(1/255),A=($>>>8&255)*(1/255),u=($>>>16&255)*(1/255),Y=($>>>24&255)*(1/255),b=y.V8;
|
|
b.colorMask(T,s,E,e);b.clearColor(n,A,u,Y);b.clear(b.COLOR_BUFFER_BIT);b.colorMask(!0,!0,!0,!0)};y.Yx=function($,o,T,s,E){var e=o.Sr(s);
|
|
if(E)e=e.Sr(E);if(e.p4())return;var n=y.V8;y.U0($);n.bindTexture(n.TEXTURE_2D,T.ek);n.copyTexSubImage2D(n.TEXTURE_2D,0,e.x-s.x,e.y-s.y,e.x-o.x,e.y-o.y,e.d,e.w)};
|
|
y.lK=function(f,$,o){var T=y.Tr[f];if(T==null||T.d!=$||T.w!=o){if(T)T.delete();T=new y.uR($,o)}y.Tr[f]=T;
|
|
return T};y.Tr=[];y._c=function(){this.lG=null;this.D5=null};y._c.Yh=null;y._c.prototype.Yu=function($){if(this.D5)return;
|
|
this.D5={};var o=y.V8,T=this.lG,s=this.D5;for(var f=0;f<$.length;f++){var E=$[f];s[E]=o.getUniformLocation(T,E)}};
|
|
y._c.prototype.JK=function(){};y._c.prototype.mV=function($){var o=y.V8;for(var f=0;f<$.length;f+=2){o.uniform1i($[f],f>>>1);
|
|
o.activeTexture(o["TEXTURE"+(f>>>1)]);o.bindTexture(o.TEXTURE_2D,$[f+1])}o.activeTexture(o.TEXTURE0)};
|
|
y._c.prototype.jq=function($,o){var T=y.V8,s=T.createShader(T.FRAGMENT_SHADER);T.shaderSource(s,$);T.compileShader(s);
|
|
if(!T.getShaderParameter(s,T.COMPILE_STATUS))console.log(T.getShaderInfoLog(s));var E=T.createShader(T.VERTEX_SHADER);
|
|
T.shaderSource(E,o);T.compileShader(E);if(!T.getShaderParameter(E,T.COMPILE_STATUS))console.log(T.getShaderInfoLog(E));
|
|
var e=T.createProgram();T.attachShader(e,E);T.attachShader(e,s);T.linkProgram(e);if(!T.getProgramParameter(e,T.LINK_STATUS))console.log("Could not initialise shaders");
|
|
this.lG=e};y._c.prototype.BP=function(){if(y._c.Yh!=this){y.V8.useProgram(this.lG);y._c.Yh=this}};y.Au=function($,o){y.iT++;
|
|
y.H6+=$*o;if(y.KG)console.log("GL.Channels instances: "+y.iT+", memory: "+y.H6);var T=y.V8;this.d=$;
|
|
this.w=o;this.ek=T.createTexture();this.Ji=null;this.DA(this.ek,$,o)};y.Au.prototype.DA=function($,o,T){var s=y.V8;
|
|
s.bindTexture(s.TEXTURE_2D,$);s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,s.NEAREST);s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.NEAREST);
|
|
s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE);s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE);
|
|
s.texImage2D(s.TEXTURE_2D,0,s.ALPHA,o,T,0,s.ALPHA,s.UNSIGNED_BYTE,null)};y.Au.prototype.set=function($){var o=y.V8;
|
|
o.bindTexture(o.TEXTURE_2D,this.ek);o.pixelStorei(o.UNPACK_ALIGNMENT,1);o.texImage2D(o.TEXTURE_2D,0,o.ALPHA,this.d,this.w,0,o.ALPHA,o.UNSIGNED_BYTE,$);
|
|
o.pixelStorei(o.UNPACK_ALIGNMENT,4)};y.Au.prototype.delete=function(){var $=y.V8;if(this.ek){$.deleteTexture(this.ek);
|
|
y.iT--;y.H6-=this.d*this.w}if(y.KG)if(y.KG)console.log("GL.Channels instances: "+y.iT+", memory: "+y.H6*4)};
|
|
y.iT=0;y.uR=function($,o,T){if(T==null)T=!1;y.iT++;y.H6+=$*o*4;if(y.KG)console.log("GL.Channels instances: "+y.iT+", memory: "+y.H6);
|
|
var s=y.V8;this.a0M=T;this.d=$;this.w=o;this.ek=s.createTexture();this.Ji=null;this.DA(this.ek,$,o)};
|
|
y.uR.prototype.set=function($,o){var T=y.V8;T.disable(T.SCISSOR_TEST);T.bindTexture(T.TEXTURE_2D,this.ek);
|
|
if($==null||$ instanceof Uint8Array){var s=this.d*this.w;if(o==null||o.Y()*10>s)T.texImage2D(T.TEXTURE_2D,0,T.RGBA,this.d,this.w,0,T.RGBA,T.UNSIGNED_BYTE,$);
|
|
else{var E=L.G(o.Y()*4);L.h9($,new df(0,0,this.d,this.w),E,o);T.texSubImage2D(T.TEXTURE_2D,0,o.x,o.y,o.d,o.w,T.RGBA,T.UNSIGNED_BYTE,E)}}else T.texImage2D(T.TEXTURE_2D,0,T.RGBA,T.RGBA,T.UNSIGNED_BYTE,$)};
|
|
y.uR.prototype.get=function($){var o=y.V8;y.U0(this);o.readPixels(0,0,this.d,this.w,o.RGBA,o.UNSIGNED_BYTE,$)};
|
|
y.uR.prototype.bv=function($){if($.p4())return;var o=y.V8;if(this.Ji==null){this.Ji=o.createTexture();
|
|
this.DA(this.Ji,this.d,this.w);y.iT++;y.H6+=this.d*this.w*4}o.bindFramebuffer(o.FRAMEBUFFER,y.JA);o.bindTexture(o.TEXTURE_2D,this.Ji);
|
|
if($){var T=Math.max($.x,0),s=Math.max($.y,0);o.copyTexSubImage2D(o.TEXTURE_2D,0,T,s,T,s,$.d,$.w)}else o.copyTexImage2D(o.TEXTURE_2D,0,o.RGBA,0,0,this.d,this.w,0)};
|
|
y.uR.prototype.DA=function($,o,T){var s=y.V8;s.bindTexture(s.TEXTURE_2D,$);s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,this.a0M?s.LINEAR:s.NEAREST);
|
|
s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,s.NEAREST);s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE);
|
|
s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE);s.texImage2D(s.TEXTURE_2D,0,s.RGBA,o,T,0,s.RGBA,s.UNSIGNED_BYTE,null)};
|
|
y.uR.prototype.delete=function(){var $=y.V8;if(this.ek){$.deleteTexture(this.ek);y.iT--;y.H6-=this.d*this.w*4}if(this.Ji){$.deleteTexture(this.Ji);
|
|
y.iT--;y.H6-=this.d*this.w*4}if(y.KG)if(y.KG)console.log("GL.Channels instances: "+y.iT+", memory: "+y.H6)};
|
|
y.uR.prototype.clone=function(){var $=y.V8,o=new y.uR(this.d,this.w);y.U0(this);$.bindTexture($.TEXTURE_2D,o.ek);
|
|
$.copyTexImage2D($.TEXTURE_2D,0,$.RGBA,0,0,this.d,this.w,0);return o};y.KZ={ac8:" 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))) ); } ",a72:" vec3 ocddg(vec3 a, vec3 b, float f) { return mix( min(ONE3, b/(ONE3 - a*f)) , ONE3 , vec3(equal(a*f,ONE3 )) ); } ",oa:"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) ;",XT:" 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}",ca:" 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 )); } ",M3:"float sat(vec3 c) { return max(c.x,max(c.y,c.z)) - min(c.x,min(c.y,c.z)); }",Hl:"float lum(vec3 c) { return dot(c, vec3(0.3,0.59,0.11)); } ",XQ:"vec3 D (vec3 x) { return mix( sqrt(x), ((16.0*x-12.0)*x+4.0)*x , vec3(lessThanEqual(x,QUAR3)) ); }",ae8:"float midSat (vec3 v, float s) { return ((v.y-v.z)*s)/(v.x-v.z); }",jn:"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}",amL:"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}",nf:"vec3 setLum (vec3 c, float l) { return clipCol(c+l-lum(c)); } ",rF:"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); }",QZ:"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); }",AP:"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); } ",yK:"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); }",ag:"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); }",l1:"\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}",Lr:"\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}"};
|
|
y.aT={Ao:{},L1:"\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}"};
|
|
y.aT.Ze=function($,o){var T=dq.Na,s=[T.sG,T._k,T.OV,T.g5,T.x6,T.TW,T.HK,T.jM].indexOf($.type),E=y.aT.Ao[$.type];
|
|
if(E==null)E=y.aT.Ao[$.type]=new y.Ao[s];E.BP();E.JK(o,$);y.V8.drawArrays(y.V8.TRIANGLES,0,6)};y.Ao=[];
|
|
y.Ao[0]=function(){y._c.call(this);this.Ph={};var $="\t\t\tprecision mediump float;\t\t\t"+y.KZ.Hl+"\t\t\t"+y.KZ.oa+"\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.jq($,y.aT.L1)};y.Ao[0].prototype=new y._c;y.Ao[0].prototype.JK=function($,o){var T={i:o.tV,m:o.wF,P:o._6,Ca:L.G(o.tV.length)},s=T.i.length;
|
|
if(this.Ph["m"+s]==null){this.Ph["m"+s]={adz:new y.uR(s,1),_3:L.G(s*4)}}var E=this.Ph["m"+s];L.dy(T,E._3,0);
|
|
var e=E.adz;e.set(E._3);this.Yu(["source","map","toGray","presLum"]);var n=y.V8,A=this.D5;n.uniform1f(A.toGray,o.ZA?1:0);
|
|
n.uniform1f(A.presLum,o.He?1:0);this.mV([A.source,$,A.map,e.ek])};y.Ao[1]=function(){y._c.call(this);
|
|
this.aoF=new y.uR(256,1);this.a8F=L.G(256*4);var $="\t\t\t\tprecision mediump float;\t\t\t\t"+y.KZ.yK+"\t\t\t\t"+y.KZ.QZ+"\t\t\t\t"+y.KZ.AP+"\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.jq($,y.aT.L1)};y.Ao[1].prototype=new y._c;y.Ao[1].prototype.JK=function($,o){L.dy({i:o.a74,m:o.$C,P:o.a61,Ca:L.G(256)},this.a8F);
|
|
this.aoF.set(this.a8F);this.Yu(["source","map","cfa","cfb","colorize"]);var T=y.V8,s=this.D5;T.uniform1f(s.cfa,o.aa8);
|
|
T.uniform1f(s.cfb,o.HD);T.uniform1i(s.colorize,o.aku);this.mV([s.source,$,s.map,this.aoF.ek])};y.Ao[2]=function(){y._c.call(this);
|
|
var $="\t\t\tprecision mediump float;\t\t\t"+y.KZ.yK+"\t\t\t"+y.KZ.sY+"\t\t\t"+y.KZ.ag+"\t\t\t"+y.KZ.QZ+"\t\t\t"+y.KZ.AP+"\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.jq($,y.aT.L1)};y.Ao[2].prototype=new y._c;y.Ao[2].prototype.JK=function($,o){this.Yu(["source","vib","sat"]);
|
|
var T=y.V8,s=this.D5;T.uniform1f(s.vib,o.M9[0]/100);T.uniform1f(s.sat,o.M9[1]/100);this.mV([s.source,$])};
|
|
y.Ao[3]=function(){y._c.call(this);var $="\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.jq($,y.aT.L1)};y.Ao[3].prototype=new y._c;y.Ao[3].prototype.JK=function($,o){this.Yu(["source","trf"]);
|
|
var T=y.V8,s=this.D5;T.uniformMatrix4fv(s.trf,!1,new Float32Array(L.tK.EP(o.Ak)));this.mV([s.source,$])};
|
|
y.Ao[4]=function(){y._c.call(this);var $="\t\t\tprecision mediump float; \t\t\t"+y.KZ.l1+"\t\t\t"+y.KZ.yK+"\t\t\t"+y.KZ.AP+"\t\t\t"+y.KZ.QZ+"\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]+shift[0]; \t\t\t\thsv[0] = fract(nh); \t\t\t\thsv[1] = max(0.0, min(1.0, hsv[1] + shift[1])); \t\t\t\thsv[2] = max(0.0, min(1.0, hsv[2] + 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(mix(src.rgb,rgb,scl),src.w); \t\t\t\t\t\t\t}";
|
|
this.jq($,y.aT.L1)};y.Ao[4].prototype=new y._c;y.Ao[4].prototype.JK=function($,o){this.Yu(["source","mnm","mxm","shift","lim"]);
|
|
var T=y.V8,s=this.D5;T.uniform3fv(s.mnm,new Float32Array(o.m0));T.uniform3fv(s.mxm,new Float32Array(o.aN));
|
|
T.uniform3fv(s.shift,new Float32Array(o.shift));T.uniform1f(s.lim,o.Al);this.mV([s.source,$])};y.Ao[5]=function(){y._c.call(this);
|
|
var $="\t\t\tprecision mediump float;\t\t\t"+y.KZ.oa+"\t\t\t"+y.KZ.XT+"\t\t\t"+y.KZ.ca+"\t\t\t"+y.KZ.QZ+"\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.jq($,y.aT.L1)};y.Ao[5].prototype=new y._c;y.Ao[5].prototype.JK=function($,o){this.Yu(["source","cfs"]);
|
|
var T=y.V8,s=this.D5;T.uniform3fv(s.cfs,o.arB);this.mV([s.source,$])};y.Ao[6]=function(){y._c.call(this);
|
|
var $="\t\t\tprecision mediump float;\t\t\t"+y.KZ.yK+"\t\t\t"+y.KZ.XT+"\t\t\t"+y.KZ.ca+"\t\t\t"+y.KZ.QZ+"\t\t\t"+y.KZ.AP+"\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.jq($,y.aT.L1)};y.Ao[6].prototype=new y._c;y.Ao[6].prototype.JK=function($,o){this.Yu(["source","wght","prms"]);
|
|
var T=y.V8,s=this.D5,E=[o.sw,o.abe,o.Hl,o.a9C,o.Kp,o.aax];T.uniform1fv(s.wght,new Float32Array(o.arl));
|
|
T.uniform1fv(s.prms,new Float32Array(E));this.mV([s.source,$])};y.Ao[7]=function(){y._c.call(this);this.SW={};
|
|
var $="\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.jq($,y.aT.L1)};y.Ao[7].prototype=new y._c;y.Ao[7].prototype.JK=function($,o){this.Yu(["source","lut","N"]);
|
|
var T=y.V8,s=this.D5,E=o.ve,e=o.ah;if(this.SW["m"+E]==null)this.SW["m"+E]=new y.uR(E,E*E);var n=this.SW["m"+E];
|
|
n.set(e);T.uniform1f(s.N,E);this.mV([s.source,$,s.lut,n.ek]);T.activeTexture(T.TEXTURE1);var A=T.LINEAR;
|
|
T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,A);T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,A);
|
|
T.activeTexture(T.TEXTURE0)};y.filter={El:{},L1:"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",bx:0,eJ:1,aY:2,iz:3};
|
|
y.filter.Ze=function($,o){var T=y.filter,s=[T.bx,T.eJ,T.aY,T.iz].indexOf($.type),E=y.filter.El[$.type];
|
|
if(E==null)E=y.filter.El[$.type]=new y.El[s];E.BP();E.JK(o,$);y.V8.drawArrays(y.V8.TRIANGLES,0,6)};y.El=[0,0,0,0,0,0,0];
|
|
y.El[3]=function(){y._c.call(this);var $="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.jq(H.Xe($),H.Xe(y.filter.L1))};y.El[3].prototype=new y._c;y.El[3].prototype.JK=function($,o){this.Yu("source iwh tdep rrad spec nois poly0 poly1".split(" "));
|
|
var T=y.V8,s=this.D5;T.uniform2fv(s.iwh,o.Ip);T.uniform1f(s.tdep,o.aqY);T.uniform1f(s.rrad,o.aoG);T.uniform2fv(s.spec,o.agx);
|
|
T.uniform3fv(s.nois,o.aby);T.uniformMatrix4fv(s.poly0,!1,o.an3);T.uniformMatrix4fv(s.poly1,!1,o.aq2);
|
|
this.mV([s.source,$]);var E=T.LINEAR;T.activeTexture(T.TEXTURE0);T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,E);
|
|
T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,E);T.activeTexture(T.TEXTURE0)};y.El[0]=function(){y._c.call(this);
|
|
var $="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.jq(H.Xe($),H.Xe(y.filter.L1))};y.El[0].prototype=new y._c;y.El[0].prototype.JK=function($,o){this.Yu(["source","iwh","ld","shine"]);
|
|
var T=y.V8,s=this.D5;T.uniform2fv(s.iwh,o.Ip);T.uniform3fv(s.ld,o.a70);T.uniform1f(s.shine,o.a58);this.mV([s.source,$,s.tang,o.qY])};
|
|
y.El[1]=function(){y._c.call(this);var $="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.jq(H.Xe($),H.Xe(y.filter.L1))};y.El[1].prototype=new y._c;y.El[1].prototype.JK=function($,o){this.Yu(["source","iwh","isc","bristle"]);
|
|
var T=y.V8,s=this.D5;T.uniform2fv(s.iwh,o.Ip);T.uniform1f(s.isc,o.aad);T.uniform1f(s.bristle,o.aco);
|
|
this.mV([s.source,$])};y.El[2]=function(){y._c.call(this);var $="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.jq(H.Xe($),H.Xe(y.filter.L1))};y.El[2].prototype=new y._c;y.El[2].prototype.JK=function($,o){this.Yu(["source","tang","iwh","sigma","expo"]);
|
|
var T=y.V8,s=this.D5;T.uniform2fv(s.iwh,o.Ip);T.uniform1f(s.sigma,o.a6p);T.uniform1f(s.expo,o.a7X);this.mV([s.source,$,s.tang,o.qY]);
|
|
var E=T.LINEAR;T.activeTexture(T.TEXTURE0);T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,E);T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,E);
|
|
T.activeTexture(T.TEXTURE0)};y.R={};y.R.Gd={};y.R.ai=null;y.R.dE=null;y.R._$=null;y.R.vn=function($,o,T,s,E,e,n,A){if(A==null)A=fW.gs();
|
|
if("idiv,lbrn,div ,lddg,vLit,lLit,hMix,diff".split(",").indexOf($)==-1){n=n*A.fill;A.fill=1;A.style=!1}var u=$+(A.Kf?"1":"");
|
|
if(y.R.Gd[u]==null)y.R.Gd[u]=new y.R.bh($,A.Kf!=null);var Y=y.R.Gd[u],b=T.Sr(E).Sr(e);b.offset(-E.x,-E.y);
|
|
if(b.p4())return;var a=y.V8;y.U0(s,b);s.bv(b);Y.BP();Y.JK(o.ek,s.Ji,y.n0(T,E),n,A.fill,A.style?1:0,A.xX?1:0,A.Kf?new Float32Array(A.Kf):null);
|
|
a.drawArrays(a.TRIANGLES,0,6)};y.R.J4=function($,o,T,s,E,e,n,A,u,Y,b){if(y.R.ai==null)y.R.ai=new y.R.aL(!0,!0);
|
|
if(y.R.dE==null)y.R.dE=new y.R.aL(!0,!1);if(y.R._$==null)y.R._$=new y.R.aL(!1,!0);var a=Y?1:0,w=$?E?y.R.ai:y.R.dE:y.R._$,X=new Float32Array(b?[b[0],b[1],b[2],1]:[1,1,1,1]),N=o?o.Sr(s).Sr(A):s.Sr(A);
|
|
if(N.p4())return;N.offset(-s.x,-s.y);var z=y.V8;y.U0(T,N);T.bv(N);w.BP();if($==null)w.JK(null,T.Ji,E.ek,y.n0(s,s),y.n0(e,s),n/255,u,a,X);
|
|
else if(E)w.JK($.ek,T.Ji,E.ek,y.n0(o,s),y.n0(e,s),n/255,u,a,X);else w.JK($.ek,T.Ji,null,y.n0(o,s),null,n/255,u,a,X);
|
|
z.drawArrays(z.TRIANGLES,0,6)};y.R.agI=function($,o,T){if(y.R.amA==null)y.R.amA=new y.R.EY;var s=y.R.amA,E=new df(0,0,$.d,$.w),e=y.V8;
|
|
y.U0(o);o.bv(E);s.BP();s.JK(E,$.ek,o.Ji,T.ek);e.drawArrays(e.TRIANGLES,0,6)};y.R.AE={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) ); "};
|
|
y.R.bh=function($,o){y._c.call(this);var T="\t\t\tprecision mediump float;\t\t\t"+y.KZ.oa+"\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"+(o?"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"+y.KZ.M3+"\t\t\t"+y.KZ.Hl+"\t\t\t"+y.KZ.XQ+"\t\t\t"+y.KZ.ac8+"\t\t\t"+y.KZ.a72+"\t\t\t"+y.KZ.ae8+"\t\t\t"+y.KZ.jn+"\t\t\t"+y.KZ.amL+"\t\t\t"+y.KZ.nf+"\t\t\t"+y.KZ.hash+"\t\t\t"+(o?y.KZ.Lr:"")+"\t\t\t\t\t\tvec3 BB(vec3 a, vec3 b, float f) { "+y.R.AE[$]+" } \t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 tgt = texture2D(target, tCoord);\t\t\t\tvec4 src = texture2D(source, sCoord);",s="\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($=="diss")T+="\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 T+=" \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"+(o?" 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.jq(T,s)};y.R.bh.prototype=new y._c;y.R.bh.prototype.JK=function($,o,T,s,E,e,n,A){this.Yu("srct alpha source target fill style keepBGA blIf".split(" "));
|
|
var u=y.V8,Y=this.D5;u.uniform4fv(Y.srct,T);u.uniform1f(Y.alpha,s);u.uniform1f(Y.fill,E);u.uniform1f(Y.style,e);
|
|
u.uniform1f(Y.keepBGA,n);if(A)u.uniform4fv(Y.blIf,A);this.mV([Y.source,$,Y.target,o])};y.R.aL=function($,o){y._c.call(this);
|
|
this.acq=$;this.fE=o;var T="\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"+y.KZ.rF+"\t\t\t"+y.KZ.hash+"\t\t\t\t\t\tvoid main(void) {\t\t\t\tvec4 tgt = texture2D(target, tCoord);\t\t\t\tvec4 src = "+($?"texture2D(source, sCoord)":"vec4(0.0)")+"; \t\t\t\tfloat wg = awg "+(o?"* (in01(wCoord) ? texture2D(weight, wCoord).w : wcolor)":"")+";\t\t\t\t"+($?"":"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 = "+(o?"nc":"cswitch*nc + (1.0- cswitch)*tgt")+"; \t\t\t}",s="\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.jq(T,s)};y.R.aL.prototype=new y._c;y.R.aL.prototype.JK=function($,o,T,s,E,e,n,A,u){if(this.fE)this.Yu("srct wrct wcolor awg dissv source target weight cswitch".split(" "));
|
|
else this.Yu("srct awg dissv source target cswitch".split(" "));var Y=y.V8,b=this.D5;Y.uniform4fv(b.srct,s);
|
|
if(this.fE){Y.uniform4fv(b.wrct,E);Y.uniform1f(b.wcolor,e)}else{Y.uniform4fv(b.cswitch,u)}Y.uniform1f(b.awg,n);
|
|
Y.uniform1f(b.dissv,A);var a=[b.source,$,b.target,o];if(this.fE)a.push(b.weight,T);this.mV(a)};y.R.EY=function(){y._c.call(this);
|
|
var $="\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}",o="\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.jq($,o)};y.R.EY.prototype=new y._c;y.R.EY.prototype.JK=function($,o,T,s){this.Yu(["rct","prev","next","alpha"]);
|
|
var E=y.V8,e=this.D5;E.uniform4fv(e.rct,[0,0,1,1]);this.mV([e.prev,o,e.next,T,e.alpha,s])};var D={};
|
|
D.wB=function($,o,T){this.name=$;this.id=o;this.YO=null;if(T!=null)this.QY=T};D.wB.prototype.A2=function($,o,T,s,E){};
|
|
D.wB.prototype.enable=function($,o,T,s,E,e){var n=new x(H.E.Q,!0);n.data={e:H.V.bl,j$:"default"};o.J(n)};
|
|
D.wB.prototype.disable=function($,o,T,s,E){};D.wB.prototype.Fc=function($,o,T,s,E){return!1};D.wB.prototype.iO=function($,o,T,s,E){};
|
|
D.wB.prototype.J7=function($,o,T,s,E){};D.wB.prototype.ZS=function($,o,T,s,E){};D.wB.prototype.yg=function($,o,T,s,E){};
|
|
D.wB.prototype.oW=function($,o,T,s,E){};D.wB.prototype.Vb=function($,o,T,s){};D.wB.prototype.nv=function($,o,T,s){};
|
|
D.wB.prototype.wx=function($,o){};D.wB.prototype.OK=function($,o){};D.wB.prototype.UR=function($,o,T,s,E){};
|
|
D.wB.prototype.YE=function($,o){};D.wB.prototype.Ty=function($,o){return!1};D.wB.prototype.ut=function($,o){return!1};
|
|
D.wB.prototype.xQ=function(){return!1};D.wB.prototype.fn=function($,o){return!0};D.wB.prototype.zp=function(){return null};
|
|
D.wB.prototype.GO=function($,o,T){};D.wB.prototype.ht=function(){return!1};D.wB.prototype.nM=function($,o,T,s){};
|
|
D.wB.prototype.track=function($){var o=new x(H.E.b0,!0);o.data=$;$.r5=!0;this.YO.J(o)};D.wB.C9=function($,o,T,s,E){D.wB.XX($,o,[aX.get([12,41]).charAt(0)+": "+L.BG.at(T.d,s.fG,E,s.d,!0),aX.get([12,42]).charAt(0)+": "+L.BG.at(T.w,s.fG,E,s.w,!0)],s)};
|
|
D.wB.XX=function($,o,T,s){var E=14,e=130,n=T.length*17+8,A=new df($,o-n,e,n),u=D.wB.nV;if(u==null)u=D.wB.nV=document.createElement("canvas");
|
|
u.width=e;u.height=n;var Y=u.getContext("2d");Y.fillStyle="rgba(0,0,1,1)";Y.fillRect(0,0,e,n);Y.font=E+"px monospace";
|
|
Y.fillStyle="rgba(255,255,255,1)";for(var f=0;f<T.length;f++)Y.fillText(T[f],6,(f+1)*17);s.n.bt=[[Y.getImageData(0,0,e,n).data,A.clone()]]};
|
|
D.wB.nV=null;D.ih="0";D.aaX="0.5";D.ZR="1";D.a6Q="2";D.a91="3";D.W8="5";D.a5C="6";D.a1G="7";D.y_="8";
|
|
D.os="9";D.EZ="10";D.dO="11";D.zH="12";D.dV="13";D.zx="14";D.hp="16";D.iP="18";D.rw="19";D.Od="20";D.ky="21";
|
|
D.sy="22";D.m8="23";D.La="24";D.Ta="25";D.LS="27";D.WJ="31";D.abx="32";D.arz="34";D.an8="35";D.A1="36";
|
|
D.qT="37";D.FS="38";D.vz="39";D.Bd="40";D.zv="41";D.zT="42";D.Va="43";D.ko="47";D.i9="48";D.bo="51";
|
|
D.Yp="52";D.kb="54";D.iM="55";D.ar="56";D.Xn="57";D.MG="58";D.BC="59";D.aii="60";D.S3="61";D.tj="100";
|
|
D.zF="101";D.P4="102";D.w_="120";D.WO="230";D.a2N="231";D.Ww="232";D.Jc="233";D.b8="234";D.VI="235";
|
|
D.dm="236";D.ZE=function($){var o=D.Wu,T=null;for(var s in o)if(o[s][1].indexOf($[1].classID)!=-1)T=s;
|
|
return T};D.Wu={};D.Wu[D.m8]=["tools/brush",["PbTl"]];D.Wu[D.La]=["tools/pencil",["PcTl"]];D.Wu[D.WJ]=["tools/eraser",["ErTl"]];
|
|
D.x5=function($,o,T){D.wB.call(this,$,o,T);this.Em={brush:$?a8.it():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.GH=null;this.VP=null;this.zg=null;this.Tz=null;this.bW=null;this.Gh=null;this.aU=null;this.u8=null;
|
|
this.Yt=null;this.Pr=null;this.qH=null;this.kT=null;this.I9=null;this.Fw=1;this.rJ=!1;this.Yb=null;this.caller=null};
|
|
D.x5.prototype=new D.wB;D.x5.prototype.ut=function($,o){return $.jw&&o.L(dN.Et)};D.x5.prototype.J7=function($,o,T,s,E){if(s.L(dN.BJ)){this.Gh=new aY(E.x,E.y);
|
|
var e=this.Em.brush.Brsh.v,n=e.Dmtr.v.val,A=e.Hrdn!=null?e.Hrdn.v.val:-1;this.aU=[n,A,!0,JSON.parse(JSON.stringify(this.Em.brush)),E];
|
|
this.Rb(T)}};D.x5.prototype.g1=function($,o,T){var s=this.aU,E=$.C.X,e=T.x-s[4].x,n=T.y-s[4].y,A=s[0],u=s[1],Y=Math.abs(e)>Math.abs(n);
|
|
if(Y&&s[2]){var b=Math.round(2*e/E);A+=b;T.x-=e-.5*b*E}if(!Y&&!s[2]&&u!=-1){var b=Math.round(.25*n);
|
|
u+=b;T.y-=n-4*b}A=Math.max(1,A);u=s[1]==-1?-1:Math.max(0,Math.min(100,u));var a=s[3];a.Brsh.v.Dmtr.v.val=A;
|
|
if(u!=-1)a.Brsh.v.Hrdn.v.val=u;this.aU=[A,u,Y,a,T];var w=ih.Ce(a,o.n_.Ou,E),X=w[1];X.x=Math.round(this.Gh.x-X.d/2);
|
|
X.y=Math.round(this.Gh.y-X.w/2);$.n.nT=[w];var N=$.C.VD(this.Gh.x,this.Gh.y);$.n.Z_={Tw:[],$M:[N.x-A/2,N.y,N.x+A/2,N.y]};
|
|
if(u!=-1)$.n.Z_.$M.push(N.x+50/E,N.y-u/2,N.x+50/E,N.y+u/2);$.Cd=!0};D.x5.prototype.oW=function($,o,T,s,E){if(this.id==D.Od)return;
|
|
if(this.Gh){this.Gh=null;this.SD(JSON.parse(JSON.stringify(this.aU[3])));$.n.nT=[];$.n.Z_=null;$.Cd=!0;
|
|
return}var e=new x(H.E.Q,!0);e.data={e:H.V.Hh,U:this.id,acn:"showBrushOpts",ma:new aY(E.uT+4,E.$T)};
|
|
o.J(e)};D.x5.prototype.SD=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.uY,M9:gr.b$,On:$};this.caller.J(o)};
|
|
D.x5.V0=function($,o,T,s,E){if($==null)$="FrgC";if(o==null)o="norm";if(T==null)T=1;if(E==null)E=!1;var e={classID:"Fl",Usng:{t:"enum",v:{FlCn:$}},Opct:{t:"UntF",v:{type:"#Prc",val:Math.round(T*100)}},PrsT:{t:"bool",v:E},Md:{t:"enum",v:{BlnM:hI.$j(o)}}};
|
|
if($=="Clr")e.Clr={t:"Objc",v:s};if($=="contentAware")e.contentAwareColorAdaptationFill={t:"bool",v:!0};
|
|
return{Wk:"fill",bI:e}};D.x5.prototype.A2=function($,o,T,s,E){this.YO=o;var e=T.el.length;if(e==0&&!T.Jt())return;
|
|
var n=e!=0?-1-T.el[0]:T.D[0],A=T.u[n];if($.e=="fromAction"){var u=$.xU,Y=u.bI;if(u.Wk=="fill"){var b=Y.PrsT?Y.PrsT.v:!1,a=A.add.lspf,z;
|
|
if(b){A.add.lspf=a==null?1:a|1}var w=(Y.Opct?Y.Opct.v.val:100)/100,X=Y.Md?hI.VB(Y.Md.v.BlnM):"norm",N=Y.Usng.v.FlCn;
|
|
if(N=="contentAware"){if(T.Z==null){alert("Select an area to heal first.");return}if(!T.Jt())return;
|
|
this.gK(T);this.GX(T,0);var i=T.Z,k=L.G(i.rect.Y()*4);L.aM(i.channel,k,3);this.o7(T,"sheal",k,i.rect,i.rect);
|
|
this.T(T,i.rect);this.finish(T,i.rect)}else{if(N=="FrgC")z=E.z4;else if(N=="BckC")z=E.GR;else if(N=="Blck")z=0;
|
|
else if(N=="Wht")z=16777215;else if(N=="Gry")z=8421504;else if(N=="Clr"){var Q=L.h.Qc(Y.Clr.v);z=Q.i<<16|Q.m<<8|Q.P}var O=z>>16&255,c=z>>8&255,B=z>>0&255;
|
|
this.Y3(T,A,T.Z,O,c,B,Math.round(255*w),X,[2,3])}if(b){A.add.lspf=a==null?0:a}}else if(u.Wk=="delete"){var G=n<0?1:A.dQ,i=T.Z,h;
|
|
if(i==null)return;var l=n<0?T.iy[-n-1]:G<=0?null:G==1?A.yy():A.DE(T)._,v=G<=0?A.rect:l.rect,p=G<=0?i.rect.Sr(v):i.rect.clone();
|
|
if(p.p4())return;var P=p.Y();if(G<=0){h=L.G(P*4);L.h9(A.buffer,A.rect,h,p)}else{h=L.G(P);l.extend(p);
|
|
L.pg(l.channel,l.rect,h,p)}if(0<=n&&A.jx(T,i)){if(G<=0){L.wr(h,0);L.h9(A._I.UK,A._I.Ic,h,p)}else{h.fill(255);
|
|
L.pg(A._I.UK,A._I.Ic,h,p)}}else{if(G<=0){var j=L.G(h.length>>2);L.Ge(h,j,3);L.R._b(L.Ke(i.rect.Y()),i.rect,j,p,i.channel,p,1);
|
|
L.aM(j,h,3)}else{var C=L.G(i.rect.Y()),O=E.GR>>>16&255,c=E.GR>>8&255,B=E.GR>>0&255;C.fill(Math.round(L.DB(O,c,B)));
|
|
L.R._b(C,i.rect,h,p,i.channel,p,1)}}this.Ws(T,!0,[2,2],n,G,p,h)}}if($.e=="stroke"){var V=$.a2k,i=T.Z;
|
|
if(i==null){i={rect:A.rect.clone(),channel:L.G(A.rect.Y())};L.Ge(A.buffer,i.channel,3)}var d=fW.nl(V),m=D.NK.Gr(i,Math.ceil(d[0]),Math.ceil(d[1])),z=L.h.Qc(V.Clr.v),O=Math.round(z.i),c=Math.round(z.m),B=Math.round(z.P);
|
|
this.Y3(T,A,m,O,c,B,Math.round(255*V.Opct.v.val/100),hI.VB(V.Md.v.BlnM),[14,9])}if($.e=="fillBMP"){this.VW(T,A,T.Z,$.Qn,$._6,$.U1)}if($.e=="draw"){var R=$.jB,g=R.rect;
|
|
this.gK(T);var S=T.u[T.D[0]];if($.aix&&S&&S.dQ<=0&&T.el.length==0){g=cf.kz.wk(R,T);S.buffer=R.buffer.slice(0);
|
|
S.rect=g.clone()}else{var F=this.Em.bmode;this.Em.bmode="norm";this.o7(T,"draw",R.buffer,g,g.Sr(new df(0,0,T.d,T.w)));
|
|
this.Em.bmode=F}this.T(T,g);T.sr=!0;this.finish(T,g,$.U1,$.aix)}};D.x5.prototype.Y3=function($,o,T,s,E,e,n,A,u){var Y=T==null?new df(0,0,$.d,$.w):T.rect,b=n<<24|e<<16|E<<8|s<<0,a=L.G(Y.Y()*4);
|
|
L.wr(a,b);this.VW($,o,T,a,A,u)};D.x5.prototype.VW=function($,o,T,s,E,e){var n=$.el.length!=0?-1-$.el[0]:$.D[0],A=n<0?1:o.dQ,u=n<0?$.iy[-1-n]:A<=0?null:A==1?o.yy():o.DE($)._,Y=A<=0?o.rect:u.rect,b=T==null?new df(0,0,$.d,$.w):T.rect,a=T==null?L.sq($.d*$.w):T.channel,w=b.Y(),X,N=null;
|
|
if(A<=0){X=L.G(w*4);L.h9(o.buffer,o.rect,X,b)}else{X=L.G(w);u.extend(b);L.pg(u.channel,u.rect,X,b)}if(T!=null)L.EL(a,s);
|
|
if(A>0){N=L.G(w);L.h$(s,N)}if(0<=n&&T&&o.jx($,T)){var z=o._I.YS,i=o._I.YS.slice(0);if(A<=0)L.w0(s,i);
|
|
else L.w0(N,i);var k=new dt([2,3],this);k.data={e:"drawtemp",c:$.D[0],W5:A,ae_:z,ag4:i};$.g4(k);this.wx(k.data,$)}else{if(A<=0){var Q;
|
|
if(o.iQ(0)){Q=L.G(b.Y());L.Ge(X,Q,3)}L.R.xE(E,s,b,X,b,b,1);if(o.iQ(0))L.aM(Q,X,3)}else L.R._b(N,b,X,b,a,b,1);
|
|
this.Ws($,!0,e,n,A,b,X)}};D.x5.prototype.Ty=function($){if(dN.__.indexOf($)!=-1)return!0;return!1};D.x5.prototype.Vb=function($,o,T,s){var E=this.Em.brush,e=s.L(dN.BJ),n=e!=this.rJ,A=D.x5.Vd(E,s);
|
|
if(A!=null)this.SD(A);if(!s.L(dN.I6)&&s.w3()!=-1){var u=H.ES(Math.round(this.Em.opacity*100),s.w3())/100;
|
|
this.no({opacity:u},o)}if(this.id==D.y_&&n&&$!=null){var Y=this.Em.qsmode;if(Y==2)Y=$.Z==null?0:1;else Y=2;
|
|
this.no({qsmode:Y},o)}this.rJ=e;if(n){if($)this.Fw=$.C.X;this.Rb(T,s)}};D.x5.Vd=function($,o){var T=$.Brsh.v.Dmtr.v.val,s=$.Brsh.v.Hrdn!=null?$.Brsh.v.Hrdn.v.val:-1,E=T,e=s,n=o.L(dN.Et);
|
|
if(o.L(dN.Q7)){if(n)s=25*Math.floor((s-1)/25);else{if(T<=10)T--;else if(T<=50)T=5*Math.floor((T-1)/5);
|
|
else if(T<=100)T=10*Math.floor((T-1)/10);else if(T<=200)T=25*Math.floor((T-1)/25);else if(T<=400)T=50*Math.floor((T-1)/50);
|
|
else T=100*Math.floor((T-1)/100)}}if(o.L(dN.tQ)){if(n)s=25*Math.ceil((s+1)/25);else{if(T<10)T++;else if(T<50)T=5*Math.ceil((T+1)/5);
|
|
else if(T<100)T=10*Math.ceil((T+1)/10);else if(T<200)T=25*Math.ceil((T+1)/25);else if(T<400)T=50*Math.ceil((T+1)/50);
|
|
else T=100*Math.ceil((T+1)/100)}}T=Math.max(1,T);s=Math.max(0,Math.min(100,s));if(e==-1)s=-1;if(T!=E||s!=e){var A=JSON.parse(JSON.stringify($));
|
|
A.Brsh.v.Dmtr.v.val=T;if(e!=-1)A.Brsh.v.Hrdn.v.val=s;return A}return null};D.x5.prototype.Rb=function($,o,T,s){if($.n_.list.length==0)return;
|
|
var E=this.id,e;if((E==D.LS||E==D.rw||E==D.m8||E==D.La)&&(o!=null&&o.L(dN.BJ)||this.Em.alt[0]))e="crosshair";
|
|
else{var n=this.Fw,A=this.Em.brush;if((E==D.LS||E==D.rw)&&T&&this.kT&&this.kT.length==this.qH.Y()*4){var u=T.C.VD(s.x,s.y),Y=this.hn(u),b=this.kT,a=this.qH,w=new df(a.x+Y.x,a.y+Y.y,a.d,a.w),X=ih.Ce(A,$.n_.Ou,n),N=X[0],z=X[1],i=Math.ceil(z.d/n),k=new df(Math.round(u.x-i/2),Math.round(u.y-i/2),i,i),Q=L.G(k.Y()*4),O,c;
|
|
L.h9(b,w,Q,k);if(n==1){O=Q;c=k}else{var B=new fY(n,0,0,n,0,0),G=D.p.qh([Q,k],B,!0);c=z.clone();c.x=G.rect.x;
|
|
c.y=G.rect.y;if(c.R1(G.rect))O=G.buffer;else{O=L.G(c.Y()*4);L.h9(G.buffer,G.rect,O,c)}}var l=this.Em.opacity/255;
|
|
for(var f=0;f<O.length;f+=4)O[f+3]=l*(N[f+3]*O[f+3]);e={tY:O,uL:c,wS:new aY(c.d/2,c.w/2)}}else e=ih.y8(A,$.n_.Ou,n,E==D.Ta)}var v=new x(H.E.Q,!0);
|
|
v.data={e:H.V.bl,j$:e};if(this.caller)this.caller.J(v)};D.x5.prototype.enable=function($,o,T,s){this.GH=T;
|
|
this.caller=o;this.SD(JSON.parse(JSON.stringify(this.Em.brush)));if($&&$.C.X!=0)this.Fw=$.C.X;this.Rb(T,s)};
|
|
D.x5.prototype.YE=function($,o){if(o==gr.b$){this.Em.brush=$.n_.J_;this.Rb($)}};D.x5.prototype.UR=function($,o,T,s,E){for(var e in $)this.Em[e]=$[e];
|
|
if(this.Em.alt[0])this.Rb(E,s,T)};D.x5.prototype.OX=function($){var o=$.el.length!=0?-1-$.el[0]:$.D[0],T=$.u[o],s=o<0?1:T.dQ,E=o<0?$.iy[-o-1]:s<=0?null:s==1?T.yy():T.DE($)._,e=E?E.channel:T.buffer,n=(E?E.rect:T.rect).clone();
|
|
return[T,s,E,e,n]};D.x5.prototype.gK=function($,o){this.I9=$.Z==null?null:{rect:$.Z.rect.clone(),channel:$.Z.channel.slice(0)};
|
|
var T=this.OX($),s=T[0],E=T[1],e=T[2];this.Pr=T[3];this.Yt=T[4];var n=new df(0,0,$.d,$.w),A=n.BZ(this.Yt);
|
|
if((this.YU()&&E<=0||A.R1(this.Yt))&&o!=!0)this.Pr=this.Pr.slice(0);else{if(e)e.extend(A);else s.extend(A)}};
|
|
D.x5.prototype.GX=function($,o){var T=this.OX($),s=T[1],E=T[3],e=T[4],n=[E,e],A=o!=null?o:this.Em.sfrom;
|
|
if(s<=0&&A!=0){n[1]=new df(0,0,$.d,$.w);n[0]=$.aw(A==1&&$.D[0]!=$.u.length-1?$.D[0]:null).slice(0)}this.qH=n[1].clone();
|
|
this.kT=n[0].slice(0)};D.x5.prototype.Pv=function($,o,T){if($.L(dN.BJ)){var s=new x(H.E.N,!0);s.U=D.zx;
|
|
s.data={e:"pickhere",anv:T};o.J(s);return!0}return!1};D.x5.prototype.gB=function($,o,T,s,E,e){if(this.id!=D.y_&&!$.Jt(this.caller)){this.VP=null;
|
|
return}this.gK($);var n=new df(0,0,$.d,$.w),A=null;if(e!=null){var u=$.el.length!=0?-1-$.el[0]:$.D[0],Y=$.u[u],b=u<0?$.iy[-u-1]:Y.dQ<=0?null:Y.dQ==1?Y.yy():Y.DE($)._;
|
|
A=L.G(n.Y()*4);if(b)D.x5.PO(this.Pr,this.Yt,b.color,A,n);else L.h9(this.Pr,this.Yt,A,n)}var a=this.Em;
|
|
if(this.VP&&this.id==D.y_&&a.qsmode!=0&&$.Z!=null){}else{var w=o.z4,X=o.GR;if(this.Yb=="erase"){var N=w;
|
|
w=X;X=N}var z=this.id==D.y_?this.Yt:n;this.VP=new ih(a.brush,o.n_.Ou,o.n_.A0,{yV:E,ms:e,apk:a.smth*50*H.K()/$.C.X,$t:this.id==D.La||a.emode==1,Ya:a.prsr},w,X,z,A)}if(this.id==D.y_){this.VP.ZG(a.brush,a.qsmode==2?0:16777215)}var i=$.C.VD(s.x,s.y);
|
|
if(T.L(dN.Et)&&this.zg){var k=this.zg;this.VP.moveTo(k.x,k.y,s.lP);this.VP.lineTo(.001*k.x+.999*i.x,.001*k.y+.999*i.y,s.lP);
|
|
this.VP.lineTo(i.x,i.y,s.lP)}else this.VP.moveTo(i.x,i.y,s.lP);this.zg=i;this.Tz=i.clone();this.bW=new ds(i,$.C.VN)};
|
|
D.x5.prototype.NF=function($,o,T){if($&&$.C.X!=0&&$.C.X!=this.Fw){this.Fw=$.C.X;this.Rb(T)}};D.x5.prototype.X$=function($,o,T,s){if(this.VP==null)return;
|
|
var E=$.u[$.D[0]],e=$.C.VD(s.x,s.y),n=this.bW.$Z(e,T);if(n.R1(this.zg))return 1;this.VP.lineTo(n.x,n.y,s.lP);
|
|
this.zg=n;if(this.id==D.LS||this.id==D.rw){var A=this.k4(),u=11;A=$.C.X8(e.x-A.x,e.y-A.y);var Y=u>>>1,b=new df(Math.round(A.x)-Y,Math.round(A.y)-Y,u,u),a=L.G(b.Y()*4);
|
|
L.wr(16777215);for(var f=0;f<u;f++)a[(f*u+Y)*4+3]=a[(u*Y+f)*4+3]=255;$.n.bt=[[a,b]];$.Cd=!0}};D.x5.prototype.nv=function($,o,T,s){if(T.D3!=this.id)return;
|
|
if(this.id!=D.y_||$==null)return;if($.Z==null||$.D[0]!=this.alE){this.alE=$.D[0];this.no({qsmode:0},o)}};
|
|
D.x5.prototype.T=function($,o){if($.el.length!=0){$.Cd=!0;return}var T=$.u[$.D[0]];if(o==null){o=this.VP.kx();
|
|
if(this.YU()&&T.dQ<=0)o=o.Sr(this.Yt)}if(o.p4())return;if(T.dQ<=0){T.T(o)}if(T.dQ==1){T.yy().Or=!0;T.tF($)}if(T.dQ==3){T.T()}$.T($.root.gC(o,$,$.D[0],!0))};
|
|
D.x5.prototype.yg=function($,o,T,s,E){if(this.VP==null)return;this.VP.finish();if(this.id!=D.iP&&this.id!=D.rw&&this.id!=D.y_)this.m9($);
|
|
if(this.id==D.LS||this.id==D.rw){$.n.bt=[];$.Cd=!0}if(this.id==D.y_){var e=$.Z;$.Z=this.I9;var n=new x(H.E.N,!0);
|
|
n.data={e:"setsel",U1:this.name,Z:e};n.U=D.ZR;o.J(n);if(this.Em.qsmode==0)this.no({qsmode:1},o)}else{this.finish($,this.VP.cx());
|
|
this.VP=null;this.u8=null}this.dir=0};D.x5.prototype.no=function($,o){for(var T in $)this.Em[T]=$[T];
|
|
var s=new x(H.E.Q,!0);s.data={e:H.V.Hh,U:this.id,X7:$};o.J(s)};D.x5.prototype.YU=function(){var $=this.id;
|
|
return $==D.y_||$==D.WJ||$==D.vz||$==D.Bd||$==D.zv||$==D.sy};D.x5.prototype.finish=function($,o,T,s,E){var e=$.el.length!=0?-1-$.el[0]:$.D[0],n=$.u[e],A=e<0?1:n.dQ,u=e<0?$.iy[-e-1]:A<=0?null:A==1?n.yy():n.DE($)._,Y=u?u.rect:n.rect,w;
|
|
if(this.YU()||!Y.R1(this.Yt)){if(u==null){if(this.YU())n.Gg();else{var b=o.BZ(this.Yt),a=L.G(b.Y()*4);
|
|
L.h9(n.buffer,n.rect,a,b);n.buffer=a;n.rect=b}}else u.Gg();this.T($,Y)}if(A<=0){w=L.G(o.Y()*4);L.h9(this.Pr,this.Yt,w,o)}else{w=L.G(o.Y());
|
|
w.fill(u.color);L.pg(this.Pr,this.Yt,w,o)}this.Ws($,!1,T?T:this.name,e,A,o,w,s,E)};D.x5.prototype.Ws=function($,o,T,s,E,e,n,A,u){var Y=n;
|
|
if(E>0){Y=L.G(e.Y()*4);D.x5.PO(n,e,0,Y,e)}var b=new dt(T,this);b.data=[{c:s,W5:E,uL:e,ah:Y}];if(A)b.data.xh=[$.Z,null];
|
|
if(u)b.data.xh=[this.I9,$.Z];$.g4(b);if(o)this.wx(b.data,$);else if(A)$.Z=null;cf.NX.rU($,b.data)};D.x5.prototype.OK=function($,o){this.UW($,o,!1)};
|
|
D.x5.prototype.wx=function($,o){this.UW($,o,!0)};D.x5.prototype.UW=function($,o,T){if($.e=="drawtemp"){var s=T?$.ag4:$.ae_,E=o.u[$.c];
|
|
E._I.YS=s;E.Rq(o,0,0,o.Z);E.T();o.sr=!0}else{cf.NX.B6(o,$);if($.xh){o.Z=$.xh[T?1:0];o.L5=!0}}o.T()};
|
|
D.x5.prototype.m9=function($){this.o7($,this.Yb,this.VP.su(),this.VP.rX(),this.VP.kx());this.T($)};D.x5.prototype.o7=function($,o,T,s,E){var e=this.Em,n=$.u[$.D[0]],A=$.el.length!=0?$.iy[$.el[0]]:n.dQ<=0?null:n.dQ==1?n.yy():n.DE($)._,u=L.G(E.Y()*4),Y,b=n.iQ(0);
|
|
if(A==null){if(this.id==D.ky&&o=="heal")L.h9(n.buffer,n.rect,u,E);else L.h9(this.Pr,this.Yt,u,E);if(b){Y=L.G(E.Y());
|
|
L.Ge(u,Y,3)}}else{D.x5.PO(this.Pr,this.Yt,A.color,u,E)}if($.Z&&o!="qselect"){var a=E.Sr($.Z.rect),w=L.G(a.Y()*4);
|
|
if(o=="copy"){var X=L.G(a.Y());L.pg($.Z.channel,$.Z.rect,X,a);L.h9(u,E,w,a);L.R.Cu(T,s,w,a,X,a,0,a,1,!1)}else{L.h9(T,s,w,a);
|
|
L.Li($.Z.channel,$.Z.rect,w,a)}T=w;s=a}function N(k,bD){var fO=Math.max(bD.x,Math.min(bD.x+bD.d-1,k.x)),g6=Math.max(bD.y,Math.min(bD.y+bD.w-1,k.y));
|
|
return new aY(fO,g6)}if(o=="idraw"||o=="ierase"){if(this.u8==null)this.u8=L.G(this.Yt.Y());var z=this.Em.samp,i=this.GH.GR,k=N(this.zg,E),Q=z==0?k:this.Tz,O=Q.x,c=Q.y,B=D.xn.cV(this.Pr,this.Yt,[Q,new aY(O-2,c),new aY(O+2,c),new aY(O,c-2),new aY(O,c+2)]);
|
|
if(z==2)B=[[i>>>16&255,i>>>8&255,i>>>0&255,255]];var G=D.xn.nJ(u,E,k,B,this.Em.wconf),l=L.G(E.Y());L.pg(this.u8,this.Yt,l,E);
|
|
L.vB.BZ(G,l,l);L.pg(l,E,this.u8,this.Yt);L.Li(l,E,T,s);o=o.slice(1)}if(o=="erase"&&(cf.NX.B2($)!=16777215||A))o="draw";
|
|
if(o=="draw")L.R.xE(e.bmode,T,s,u,E,E,e.opacity);else if(o=="erase"){var v=L.G(E.Y()*4);L.h9(T,s,v,E);
|
|
if(A==null){var p=L.G(E.Y());L.Ge(v,p,3);L.wO(p,e.opacity);L.lY(p);L.Li(p,E,u,E)}else{L.wr(v,0,4278190080);
|
|
L.R.xE("norm",v,E,u,E,E,e.opacity)}}else if(o=="clone"||o=="heal"){var P=this.k4(),h=this.qH.clone();
|
|
h.offset(P.x,P.y);var j=E.clone();j.Mi(1,1);var C=L.G(j.Y()*4),V=L.G(j.Y());L.h9(T,s,C,j);L.Ge(C,V,3);
|
|
L.wr(C,0);if(A==null){L.h9(this.kT,h,C,j);var d=L.G(j.Y());L.Ge(C,d,3);L.nh(d,V)}else D.x5.PO(this.kT,h,A.color,C,j);
|
|
if(o=="clone"){L.aM(V,C,3);L.R.xE(e.bmode,C,j,u,E,E,e.opacity)}if(o=="heal"){var m=V.slice(0);L.round(m,20);
|
|
var R=L.G(j.Y()*4);if(A==null)L.h9(this.Pr,this.Yt,R,j);else D.x5.PO(this.Pr,this.Yt,A.color,R,j);L.R.Cu(C,j,R,j,m,j,0,j,1,!1);
|
|
L.Eh.gY(R,m,j);L.R.Cu(R,j,u,E,V,j,0,E,1,!1)}}else if(o=="dodge"||o=="burn"){var C=L.G(E.Y()*4),F=1,r=0,q=0,W=0;
|
|
L.h9(T,s,C,E);var g=E.Y()*4,S=D.x5.de;if(this.rJ){if(o=="dodge")o="burn";else o="dodge"}var Z=e.rng;
|
|
if(o=="dodge"){r=[1-F/2,1,1+F][Z];q=[1,1/(1+F),1][Z];W=[F/2,0,0][Z]}if(o=="burn"){r=[1/(1-F/2),1,1-F/2][Z];
|
|
q=[1,1+F,1][Z];W=[-(F/2)/(1-F/2),0,0][Z]}for(var f=0;f<g;f+=4){var I=C[f+3];u[f+0]=S(u[f+0],r,q,W,I);
|
|
u[f+1]=S(u[f+1],r,q,W,I);u[f+2]=S(u[f+2],r,q,W,I)}}else if(o=="sponge"||o=="redeye"){var C=L.G(E.Y()*4),V=L.G(E.Y());
|
|
L.h9(T,s,C,E);L.Ge(C,V,3);L.w0(u,C);var _=e.smode;if(this.rJ)_=1-_;var cN=iZ.o_("hue2");if(o=="sponge")gK.cI(cN,0,[0,[-50,46][_],[6,5][_]]);
|
|
else gK.cI(cN,1,{hG:[265,305,25,55],Pa:[0,-90,-70]});var ce=dq.Za("hue2",cN);dq.AY(ce,C,C,E);L.R.Cu(C,E,u,E,V,E,0,E,1,!1)}else if(o=="copy")L.h9(T,s,u,E);
|
|
else if(o=="sheal"){var C=L.G(E.Y()*4),V=L.G(E.Y());L.h9(T,s,C,E);L.Ge(C,V,3);C.fill(0);var gf=this.kT,K=this.qH;
|
|
if(A){gf=L.G(K.Y()*4);D.x5.PO(this.kT,K,0,gf,K)}var cv=L.ku.gY(gf,K,V,C,E);if(cv!=0)L.h9(gf,K,C,E);if(this.Em.sfrom==0)L.h9(C,E,u,E);
|
|
else{L.h9(this.Pr,this.Yt,u,E);L.aM(V,C,3);L.R.xE("norm",C,E,u,E,E,1)}}else if(o=="qselect"){var f0=this.Yt,i8=f0.d,b5=f0.w,iC=i8*b5,cO=this.VP.su(),B=this.Pr,bh=D.NK.Xu,V=bh._D;
|
|
V.fill(128);for(var f=0;f<iC;f++){var bD=cO[f<<2],fq=cO[(f<<2)+3];if(fq==255&&(bD==0||bD==255))V[f]=bD}V[0]=V[i8-1]=0;
|
|
V[(b5>>>1)*i8]=V[(b5>>>1)*i8+i8-1]=0;D.b5.nG(bh,!0);$.Z={rect:f0,channel:bh.Z.slice(0)};$.L5=!0}if(A==null){if(b)L.aM(Y,u,3);
|
|
L.h9(u,E,n.buffer,n.rect)}else D.x5.Mn(u,E,A)};D.x5.k4=function(){return null};D.x5.de=function($,o,T,s,E){var e=$*(1/255),n=s+o*Math.pow(e,T),A=Math.round(n*E+e*(255-E));
|
|
return Math.max(0,Math.min(255,A))};D.x5.PO=function($,o,T,s,E){var e=L.G(E.Y());e.fill(T);L.pg($,o,e,E);
|
|
s.fill(255);L.R6(e,s)};D.x5.Mn=function($,o,T){var s=L.G(o.Y());L.h$($,s);L.pg(s,o,T.channel,T.rect)};
|
|
D.NK=function($,o,T){D.wB.call(this,$,o,T);this.Ne={op:"front",feat:0,cstr:{KR:0,x:3,y:2},wconf:[16,!0,!0],anta:!0};
|
|
this.GP=new aY(-1,-1);this.dF=new aY(-1,-1);this.Mf="default";this.YO=null;this.abi=!0;this.E$=!1;this.jP=!1;
|
|
this.rJ=!1;this.QT=0;this.$h=0;this.oc=!1;this.Gl=null;this.$x=null;this.s3=!1};D.NK.prototype=new D.wB;
|
|
D.NK.prototype.ait=function(){var $=this.Ne,o=[{front:0,union:1,difference:2,intersection:3}[$.op],$.feat];
|
|
if(this.id==D.os)o.push($.wconf);return o};D.NK.prototype.ar3=function($,o,T){var s=this.Ne;s.op=["front","union","difference","intersection"][$[0]];
|
|
s.feat=$[1];s.wconf=$[2];var E=new x(H.E.Q,!0);E.data={e:H.V.Hh,U:this.id,Ne:s};T.J(E)};D.NK.Xu={key:""};
|
|
D.NK.PK=function($,o,T){var s={Wk:$,bI:{classID:"setd",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}};
|
|
if(o)s.bI.T=o;if(T!=null)s.bI.AntA={t:"bool",v:T};return s};D.NK.e4=function($,o,T){return D.NK.PK("set",{t:"Objc",v:{classID:$,Top:{t:"UntF",v:{type:"#Pxl",val:o.y}},Left:{t:"UntF",v:{type:"#Pxl",val:o.x}},Btom:{t:"UntF",v:{type:"#Pxl",val:o.y+o.w}},Rght:{t:"UntF",v:{type:"#Pxl",val:o.x+o.d}}}},T)};
|
|
D.NK.cq=function($,o,T){var s=[],E=[],n="set";for(var f=0;f<$.length;f+=2){s.push($[f]);E.push($[f+1])}var e={t:"Objc",v:{classID:"Plgn",Pts:{t:"ObAr",v:{classID:"Pnt",arr:[{id:"Hrzn",type:"UnFl",uID:"#Pxl",arr:s},{id:"Vrtc",type:"UnFl",uID:"#Pxl",arr:E}]}}}};
|
|
if(o)n={front:"set",union:"addTo",difference:"subtractFrom",intersection:"interfaceWhite"}[o];return D.NK.PK(n,e,T)};
|
|
D.NK.ahW=function($,o){var T={t:"Objc",v:{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Pxl",val:$.x}},Vrtc:{t:"UntF",v:{type:"#Pxl",val:$.y}}}},s=D.NK.PK("set",T);
|
|
s.bI.Tlrn={t:"long",v:o[0]};s.bI.AntA={t:"bool",v:o[1]};s.bI.Cntg={t:"bool",v:o[2]};return s};D.NK.Gw=function($){return D.NK.PK("set",{t:"enum",v:{Ordn:$?"Al":"None"}})};
|
|
D.NK.a0x=function($,o,T){var s={classID:"null"};if($!="border")s.selectionModifyEffectAtCanvasBounds={t:"bool",v:T};
|
|
var E={e:"By",c:"By",b:"Wdth",f:"Rds",s:"Rds"}[$[0]];s[E]={t:"UntF",v:{type:"#Pxl",val:o}};return{Wk:$,bI:s}};
|
|
D.NK.af=function($,o,T){var s={t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]},E={t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:o}}]};
|
|
if(T)E.v.push({t:"name",v:{classID:"Lyr",val:T}});var e=[{classID:"null",null:s,T:E},{classID:"null",null:E,T:s},{classID:"null",null:E,From:s},{classID:"null",null:E,With:s}],n=["set","add","subtract","interfaceIconFrameDimmed"];
|
|
return{Wk:n[$],bI:e[$]}};D.NK.yC=function($,o){var T=new x(H.E.Q,!0);T.data={e:H.V.uY,M9:gr.PA};if(!o.Ok)$.J(T);
|
|
T.data={e:H.V.uY,M9:gr.gi};if(!o.wK.cK)$.J(T)};D.NK.prototype.A2=function($,o,T,s,E){D.NK.yC(o,E);this.YO=o;
|
|
var e=$.e,n,A,u=new df(0,0,T.d,T.w),g6=!1,hM,d3,h9,cs;if(e=="fromAction"){var Y=$.xU,b=Y.Wk,a=Y.bI,w=a?a.selectionModifyEffectAtCanvasBounds:null,X=w&&w.v;
|
|
if(b=="inverse"){if(T.Z==null){alert("No selection!");return}n={channel:L.G(u.Y()),rect:u};L.pg(T.Z.channel,T.Z.rect,n.channel,n.rect);
|
|
L.lY(n.channel);A=[7,2]}else if(b=="expand"){var N=a.By.v.val,z=T.Z.rect.clone();z.Mi(N,N);var i=L.G(z.Y()),k=L.G(z.Y());
|
|
L.pg(T.Z.channel,T.Z.rect,k,z);L.style.stroke(k,i,z,N);n={channel:i,rect:z};A=[7,4]}else if(b=="contract"){var N=a.By.v.val,Q=T.Z.rect.clone();
|
|
Q.Mi(1,1);if(!X)Q=Q.Sr(u);var k=L.G(Q.Y()),O=L.G(k.length);L.pg(T.Z.channel,T.Z.rect,k,Q);L.lY(k);L.style.stroke(k,O,Q,N);
|
|
L.lY(O);n={channel:O,rect:Q};L.Gg(n);A=[7,5]}else if(b=="border"){var N=a.Wdth.v.val;n=D.NK.Gr(T.Z,N/2,N/2);
|
|
A=[7,9]}else if(b=="feather"||b=="smoothness"){var N=a.Rds.v.val;n=D.NK.U$(T.Z,N,b=="smoothness",u,X);
|
|
A=b=="feather"?[7,6]:[19,3,0]}else{var c=a.null.v,B=a.AntA!=null&&a.AntA.v;function G(ci){var gv=ci.Top.v.val,iI=ci.Left.v.val;
|
|
return new df(iI,gv,ci.Rght.v.val-iI,ci.Btom.v.val-gv)}function l(ci){var gv=ci[0].arr,gu=ci[1].arr,ak={I:[],o:[]};
|
|
for(var f=0;f<gv.length;f++){ak.o.push(f==0?"M":"L");ak.I.push(gv[f],gu[f])}ak.o.push("Z");return ak}var v=["set","addTo","subtractFrom","interfaceWhite"].indexOf(b),p=a.T?a.T.v:null;
|
|
if(p&&p.classID=="Elps"){n=this.Wj(D.fU.UJ(G(p)));A=[10,4]}else if(p&&p.classID=="Rctn"){var P=G(p);
|
|
n={channel:L.G(P.Y()),rect:P.clone()};n.channel.fill(255);A=[10,15]}else if(p&&p.classID=="ObSl"){var P=G(p),h=D.NK.Xu,j=h.rect,C=h._D,V=j.d,d=j.w,m=P.x-j.x,R=m+P.d-1,g=Math.max(m,Math.min(R,m+R>>>1)),S=P.y-j.y,F=S+P.w-1,r=Math.max(S,Math.min(F,S+F>>>1)),q=Math.max(m,0),W=Math.min(R,V),Z=Math.max(S,0),I=Math.min(F,d);
|
|
C.fill(128);if(0<=S)for(var _=q;_<W;_++)C[S*V+_]=0;if(F<d)for(var _=q;_<W;_++)C[F*V+_]=0;if(0<=m)for(var cN=Z;
|
|
cN<I;cN++)C[cN*V+m]=0;if(R<V)for(var cN=Z;cN<I;cN++)C[cN*V+R]=0;var ce=D.DH.JB,gf=Math.round(P.d*ce),K=Math.round(P.w*ce);
|
|
for(var _=Math.max(0,g-gf);_<Math.min(V,g+gf);_++)C[r*V+_]=255;for(var cN=Math.max(0,r-K);cN<Math.min(d,r+K);
|
|
cN++)C[cN*V+g]=255;D.b5.nG(h,!0);n={channel:h.Z.slice(0),rect:j.clone()};A=[10,44]}else if(p&&p.classID=="Plgn"){n=this.Wj(l(p.Pts.v.arr));
|
|
A=[10,9]}else if(p&&p.classID=="Pnt"){n=D.xn.pH(T,new aY(p.Hrzn.v.val,p.Vrtc.v.val),[a.Tlrn.v,B,a.Cntg==null||a.Cntg.v]);
|
|
A=[10,12]}else if(p&&p.Ordn=="None"){n=null;A=[7,1]}else if(p&&p.Ordn=="Al"){var cv=u;if(T.D.length!=0){var f0=T.root.BA(T.D[0]);
|
|
while(f0.parent&&f0.parent.parent)f0=f0.parent;if(f0.c.add.artb)cv=f0.c.co()}n={channel:L.G(cv.Y()),rect:cv};
|
|
n.channel.fill(255);A=[7,0]}else if(p&&p[0]&&p[0].v.keyID=="WrPt"){var i8={e:"frompath",n4:[-1,0,0]};
|
|
this.A2(i8,o,T,s,E);return}else{var b5=["set","add","subtract","interfaceIconFrameDimmed"].indexOf(b),iC=b=="set"?p:c,an=iC[0].v.enum,i8;
|
|
if(an=="Trsp"||an=="Msk"||an=="vectorMask"){var cO=T.D[0];if(iC.length==2)cO=aj.Ys(T,iC[1]);var bh=["Trsp","Msk","vectorMask"].indexOf(an);
|
|
i8={e:"fromlayer",n4:[cO,bh,b5]}}else{if(iC[0].t=="name"){var cO=0;for(var f=0;f<T.iy.length;f++)if(T.iy[f].name==iC[0].v.val)cO=f;
|
|
i8={e:"fromchannel",n4:[-5-cO,0,b5]}}else{var bD=["RGB","Rd","Grn","Bl"].indexOf(an);i8={e:"fromchannel",n4:[-1-bD,0,b5]}}}this.A2(i8,o,T,s,E);
|
|
return}if(!B&&n)L.round(n.channel);if(a.Fthr)n=D.NK.U$(n,a.Fthr.v.val,!1);if(b!="set"&&T.Z!=null)n=L.vB.U2(n,T.Z,["","union","difference","intersection"][v])}if(b=="expand"||b=="contract")if(!X&&!u.contains(n.rect)){var fq=n.rect.Sr(u),fO=L.G(fq.Y());
|
|
L.pg(n.channel,n.rect,fO,fq);n.channel=fO;n.rect=fq}}if(e=="qmask"){g6=!0;var dv=T.$X(),ec=new df(0,0,T.d,T.w);
|
|
if(dv){n=dv.rect.R1(ec)&&L.tD(dv.channel,255)?null:{rect:dv.rect.clone(),channel:dv.channel.slice(0)};
|
|
hM=dv}else{n=null;d3=new M.Zb;d3.color=0;d3.name="Quick Mask";d3.T9=!0;if(T.Z){d3.rect=T.Z.rect.clone();
|
|
d3.channel=T.Z.channel.slice(0)}else{d3.rect=ec;d3.channel=L.G(d3.rect.Y());d3.channel.fill(255)}}A=[6,6,1]}if(e=="setsel"){n=$.Z;
|
|
A=$.U1}if(e=="crange"){var gT=$.m0,iz=$.aN;n=D.NK.kP(T,gT,iz,$.Al);A=[7,8];gT={t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:gT.vA},A:{t:"doub",v:gT.Ca},B:{t:"doub",v:gT.P}}};
|
|
iz={t:"Objc",v:{classID:"LbCl",Lmnc:{t:"doub",v:iz.vA},A:{t:"doub",v:iz.Ca},B:{t:"doub",v:iz.P}}};this.track({Wk:"colorRange",bI:{__name:"Color Range",classID:"ClrR",Fzns:{t:"long",v:Math.round($.Al*200)},Mnm:gT,Mxm:iz,colorModel:{t:"long",v:0}}})}if(e=="fromlayer"||e=="fromchannel"||e=="frompath"){var gw=$.n4[0],bh=$.n4[1],v=$.n4[2];
|
|
if(e=="fromlayer"){if(gw==null)gw=T.D[0];var iI=T.u[gw];if(bh==0){var g2=iI.rect,bb=iI.buffer;if(g2.p4())return;
|
|
var ir=L.G(bb.length>>>2);L.Ge(bb,ir,3);n={channel:ir,rect:g2.clone()}}else{if(iI._==null)iI.tF(T);var dG=bh==1?iI.yy():iI._;
|
|
n=D.NK.P_(dG,u)}this.track(D.NK.af(v,["Trsp","Msk"][bh],iI.getName()))}else if(e=="frompath"){var gY=T.Vp(),e6=gY[1],gY=gY[0];
|
|
if(gw==null)if(gY.length==0||e6.length==0)return;var fr=gY[e6[0]];if(gw!=null)for(var f=0;f<gY.length;
|
|
f++)if(gY[f].II==gw)fr=gY[f];var dG=fr.add.vmsk.yy(),bt=dG.rX();if(bt.Y()==0)return;var ir=dG.yd();if($.n4[3]!=null)this.abi=$.n4[3];
|
|
if(this.abi){ir=ir.slice(0);L.round(ir)}h9=[JSON.stringify(T.dl),JSON.stringify(T.T7)];cs=["[]","[]"];
|
|
T.dl=[];T.T7=[];n={channel:ir,rect:bt}}else{if(gw==null)gw=D.NK.Zu(T);n=D.NK.qM(T,gw)}if(v!=0&&T.Z)n=L.vB.U2(n,T.Z,["","union","difference","intersection"][v]);
|
|
A=[14,11]}if(n!=null&&L.tD(n.channel,0)){n=null;A=[7,1]}if(n)L.Gg(n);var cx=new dt(A,this);cx.data={e:"changesel",I9:T.Z,a3:n,$X:g6,amg:hM,a06:d3,QM:h9,agX:cs};
|
|
T.g4(cx);this.wx(cx.data,T)};D.NK.Zu=function($){var o=0;if($.el.length!=0)o=-5-$.el[0];else if(JSON.stringify($.C.xR)=="[1,1,1]")o=-1;
|
|
else o=-2-$.C.xR.indexOf(1);return o};D.NK.qM=function($,o){var T,s=new df(0,0,$.d,$.w);if(-5<o&o<0){var E=-o-1,e=$.aw(),n=L.G(s.Y());
|
|
if(E==0)L.h$(e,n);else L.Ge(e,n,E-1);T={channel:n,rect:s.clone()}}if(o<-4){T=D.NK.P_($.iy[-o-5],s)}return T};
|
|
D.NK.P_=function($,o){var T,s;if($.Qc()==0){s=$.rX().clone();if(s.Y()==0)return;T=$.yd()}else{s=o;T=L.G(s.Y());
|
|
$.$a(s,T)}return{channel:T,rect:s}};D.NK.prototype.ut=function($){return this.oc||$.jw&&this.id!=D.W8};
|
|
D.NK.prototype.lz=function($,o,T){var s=new x(o,!0);s.data=T;$.J(s)};D.NK.prototype.gt=function($,o){var T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.bl,j$:o};$.J(T)};D.NK.prototype.rX=function($,o,T){o=$.Z==null||this.QT>1||this.$h>1?o:null;
|
|
var s=this.GP,E=this.dF;if(T){s.x=Math.max(0,Math.min($.d,s.x));s.y=Math.max(0,Math.min($.w,s.y));E.x=Math.max(0,Math.min($.d,E.x));
|
|
E.y=Math.max(0,Math.min($.w,E.y))}var e=D.U5.XS(s,E,o,!0,this.Ne.cstr),n=e[0].x,A=e[0].y;return new df(n,A,e[1].x-n,e[1].y-A)};
|
|
D.NK.prototype.iO=function($,o,T,s,E){if(this.hA())return;this.YO=o;this.E$=!1;this.jP=s.L(dN.Et);this.rJ=s.L(dN.BJ);
|
|
this.QT=this.jP?0:1;this.$h=this.rJ?0:1;this.GP=$.C.VD(E.x,E.y);this.GP=D.aD.yu($,this.GP,T);if(this.sd($,this.GP,s)){this.oc=!0;
|
|
this.Gl=$.Z.rect.clone();return}this.gO($,T,s,E);$.C.Xk=new df};D.NK.prototype.sd=function($,o,T){var s=T.L(dN.Et),E=T.L(dN.BJ);
|
|
if($.Z&&!s&&!E&&this.Ne.op=="front")return L.cM(o,$.Z.channel,$.Z.rect);return!1};D.NK.prototype.ZS=function($,o,T,s,E){this.YO=o;
|
|
if(this.s3)return;var e=$.C.VD(E.x,E.y);if(aY.Sa(this.GP,e)*$.C.X>5)this.E$=!0;if(s.L(dN.Gv)){if(this.$x==null)this.$x=new aY(e.x-this.GP.x,e.y-this.GP.y);
|
|
this.GP.x=e.x-this.$x.x;this.GP.y=e.y-this.$x.y}else this.$x=null;this.dF=e;if(!this.oc)this.dF=D.aD.yu($,this.dF,T);
|
|
if(this.sd($,this.dF,s))this.gt(o,"move");else this.gt(o,this.Mf);if(this.oc){var n=this.Gl.clone();
|
|
n.x+=this.dF.x-this.GP.x;n.y+=this.dF.y-this.GP.y;var A=D.aD.nI($,n,T);$.Z.rect.x=Math.round(this.dF.x-this.GP.x+this.Gl.x+A[0]);
|
|
$.Z.rect.y=Math.round(this.dF.y-this.GP.y+this.Gl.y+A[1]);$.L5=!0;D.aD.Fv($,n,A);return}this.$d($,T,s,E);
|
|
if($.C.Xk)$.C.Xk=this.rX($,s)};D.NK.prototype.hA=function(){return!1};D.NK.prototype.yg=function($,o,T,s,E){$.C.Xk=null;
|
|
this.dF=$.C.VD(E.x,E.y);this.dF=D.aD.yu($,this.dF,T);if(this.oc){this.oc=!1;if(this.dF.R1(this.GP)&&this.Py()=="front"){this.lz(o,H.E.b0,D.NK.Gw());
|
|
return}this.PM($,this.Gl,$.Z.rect.clone());if($!=null&&$.n.BD){$.n.BD=null;$.Cd=!0}return}this.uZ($,T,s,E);
|
|
D.NK.yC(o,T)};D.NK.prototype.PM=function($,o,T){var s=$.OY();if(s!=null&&s.U==this&&s.data.e=="movesel"){}else{s=new dt([7,7],this);
|
|
s.data={e:"movesel",FF:o};$.g4(s)}s.data.oJ=T;this.wx(s.data,$)};D.NK.prototype.J7=function($,o,T,s,E){this.s3=!0};
|
|
D.NK.prototype.oW=function($,o,T,s,E){var e=new x(H.E.Q,!0);e.data={e:H.V.Hh,U:this.id,bg:E,ZU:$,mh:T};
|
|
o.J(e);this.s3=!1};D.NK.prototype.Vb=function($,o,T,s){var E=s.L(dN.Et),e=s.L(dN.BJ);if(this.E$){if(this.QT==0&&!E)this.QT++;
|
|
if(this.QT==1&&E)this.QT++;if(this.$h==0&&!e)this.$h++;if(this.$h==1&&e)this.$h++}if($!=null&&$.Z!=null){var n=s.cu();
|
|
if(n.x!=0||n.y!=0){var A=$.Z.rect.clone();A.x+=n.x;A.y+=n.y;this.PM($,$.Z.rect.clone(),A)}}var u=D.NK.kI(this.Ne.op,E,e),Y=new x(H.E.Q,!0);
|
|
Y.data={e:H.V.Hh,U:this.id,LE:u};o.J(Y)};D.NK.prototype.finish=function($,o,T,s){var E=$.Z,e=this.getSelection($,o,T,s);
|
|
if(e==null)e=D.NK.Gw();else{var n=this.Ne.feat,A=this.Py();if(n!=0)e.bI.Fthr={t:"UntF",v:{type:"#Pxl",val:n}};
|
|
if(A!="front"&&A!="xor")e.Wk={union:"addTo",difference:"subtractFrom",intersection:"interfaceWhite"}[A]}this.lz(this.YO,H.E.b0,e);
|
|
this.GP.A5(-1,-1);this.dF.A5(-1,-1)};D.NK.prototype.Py=function(){return D.NK.kI(this.Ne.op,this.jP,this.rJ)};
|
|
D.NK.kI=function($,o,T){if(o)$="union";if(T)$="difference";if(o&&T)$="intersection";return $};D.NK.prototype.getSelection=function($,o,T,s){return null};
|
|
D.NK.prototype.gO=function($,o,T,s){};D.NK.prototype.$d=function($,o,T,s){};D.NK.prototype.uZ=function($,o,T,s){};
|
|
D.NK.prototype.OK=function($,o){var T=$.e;if(T=="changesel")o.Z=$.I9;if(T=="movesel")o.Z.rect=$.FF;if($.$X){if($.amg){o.el=[o.iy.length];
|
|
o.iy.push($.amg)}else{o.iy.pop();o.el=[]}}if($.QM){o.dl=JSON.parse($.QM[0]);o.T7=JSON.parse($.QM[1])}o.L5=!0};
|
|
D.NK.prototype.wx=function($,o){var T=$.e;if(T=="changesel")o.Z=$.a3;if(T=="movesel")o.Z.rect=$.oJ;if($.$X){if($.a06){o.el=[o.iy.length];
|
|
o.iy.push($.a06)}else{o.iy.pop();o.el=[]}}if($.QM){o.dl=JSON.parse($.agX[0]);o.T7=JSON.parse($.agX[1])}o.L5=!0};
|
|
D.NK.prototype.UR=function($){this.Ne=$.Ne};D.NK.prototype.Wj=function($){var o=L.M.$l($.I);if(o.p4())return null;
|
|
var T=H.z("canvas","");T.width=o.d;T.height=o.w;var s=T.getContext("2d");s.beginPath();s.translate(-o.x,-o.y);
|
|
Typr.U.pathToContext({cmds:$.o,crds:$.I},s);s.closePath();s.fill();var E=L.G(o.Y()),e=s.getImageData(0,0,T.width,T.height);
|
|
L.Ge(e.data,E,3);return{rect:o,channel:E}};D.NK.U$=function($,o,T,s,E){if(T)o=Math.round(o*.7);var e=Math.ceil(2.6*o),n=$.rect.clone();
|
|
n.Mi(e,e);if(s&&!E)n=n.Sr(s);var A=L.G(n.Y()),u=L.G(A.length);L.pg($.channel,$.rect,u,n);L.Ja.Yy(u,A,n,o);
|
|
if(T){var Y=A.length;for(var f=0;f<Y;f++){var b=(A[f]-128)*o*2.5;A[f]=Math.max(0,Math.min(255,Math.round(128+b)))}}return{channel:A,rect:n}};
|
|
D.NK.Gr=function($,o,T){var s=Math.max(1,Math.ceil(T)),E=$.rect.clone();E.Mi(s,s);var e=E.Y(),n={channel:L.G(e),rect:E},A=L.G(e);
|
|
L.pg($.channel,$.rect,A,n.rect);if(T!=0)L.style.stroke(A,n.channel,n.rect,T);else L.w0(A,n.channel);
|
|
var u=L.G(e);L.lY(A);if(o!=0)L.style.stroke(A,u,n.rect,o);else L.w0(A,u);L.vB.Sr(n.channel,u,n.channel);
|
|
return n};D.NK.kP=function($,o,T,s){var E=new df(0,0,$.d,$.w),e=$.aw();if($.Z){var n=$.Z.rect.Sr(E),A=L.G(n.Y()*4);
|
|
L.h9(e,E,A,n);E=n;e=A}var u=E.Y(),Y=L.G(u),b=1/s;for(var f=0;f<u;f++){var a=f<<2,w=L.l1(e[a],e[a+1],e[a+2]),X=L._y(w,o,T,s,b);
|
|
Y[f]=e[a+3]*X}return{rect:E,channel:Y}};D.wX=function(){D.x5.call(this,[10,18],D.A1,"tools/blur");this.Yb="copy"};
|
|
D.wX.prototype=new D.x5;D.wX.prototype.iO=function($,o,T,s,E){var e=s.L(dN.BJ)?ih.K1:ih.A1;this.gB($,T,s,E,this.Em.strn,e);
|
|
if(this.VP==null)return;this.m9($)};D.wX.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);if(this.Gh)this.g1($,T,E);
|
|
if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.jg=function(){D.x5.call(this,[10,0],D.m8,"tools/brush");
|
|
this.Yb="draw"};D.jg.prototype=new D.x5;D.jg.prototype.iO=function($,o,T,s,E){if(this.Pv(s,o,E))return;
|
|
this.gB($,T,s,E,this.Em.flow);if(this.VP==null)return;this.m9($)};D.jg.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);
|
|
if(this.Gh)this.g1($,T,E);if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.ik=function(){D.x5.call(this,[10,42],D.Ta,"tools/crepl");
|
|
this.Yb="idraw";this.Em.bmode="hue "};D.ik.prototype=new D.x5;D.ik.prototype.iO=function($,o,T,s,E){if(this.Pv(s,o,E))return;
|
|
this.gB($,T,s,E,this.Em.flow);if(this.VP==null)return;this.m9($)};D.ik.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);
|
|
if(this.Gh)this.g1($,T,E);if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.ia=function(){D.x5.call(this,[10,43],D.sy,"tools/redeye");
|
|
this.Em.smode=0;this.Yb="redeye"};D.ia.prototype=new D.x5;D.ia.prototype.iO=function($,o,T,s,E){this.gB($,T,s,E,this.Em.flow);
|
|
if(this.VP==null)return;this.m9($)};D.ia.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);if(this.Gh)this.g1($,T,E);
|
|
if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.lJ=function(){D.x5.call(this,[10,38],D.La,"tools/pencil");
|
|
this.Yb="draw"};D.lJ.prototype=new D.x5;D.lJ.prototype.iO=function($,o,T,s,E){if(this.Pv(s,o,E))return;
|
|
this.gB($,T,s,E,this.Em.flow);if(this.VP==null)return;this.m9($)};D.lJ.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);
|
|
if(this.Gh)this.g1($,T,E);if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.vU=function(){D.x5.call(this,[10,22],D.Bd,"tools/burn");
|
|
this.Yb="burn"};D.vU.prototype=new D.x5;D.vU.prototype.iO=function($,o,T,s,E){this.gB($,T,s,E,this.Em.expo/Math.E);
|
|
if(this.VP==null)return;this.m9($)};D.vU.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);if(this.Gh)this.g1($,T,E);
|
|
if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.nz=function($,o,T){D.x5.call(this,$==""?null:$?$:[10,1],o?o:D.LS,T?T:"tools/clone");
|
|
this.Yb="clone";this.dG=null;this.l=null};D.nz.prototype=new D.x5;D.nz.prototype.iO=function($,o,T,s,E){var e=this.Em,n=e.alt[0];
|
|
if(s.L(dN.BJ)||s.L(dN.BL)||n){this.dG=$.C.VD(E.x,E.y);this.l=null;if(n)this.no({alt:[!1]},o);this.GX($);
|
|
this.Rb(T,s,$,E);return}if(this.dG==null){alert(aX.get([15,7,0]));return}this.Rb(T,s);this.gB($,T,s,E,this.Em.flow);
|
|
if(this.VP==null)return;this.l=this.hn($.C.VD(E.x,E.y));this.m9($)};D.nz.prototype.hn=function($){var o=this.l;
|
|
if(o==null||!this.Em.algnd)o=new aY(Math.round($.x-this.dG.x),Math.round($.y-this.dG.y));return o};D.nz.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);
|
|
if(this.Gh)this.g1($,T,E);if(this.VP==null){if(this.dG!=null)this.Rb(T,s,$,E);return}if(!E.jw||this.dG==null)return;
|
|
this.X$($,T,s,E);this.m9($)};D.nz.prototype.k4=function(){return this.l};D.LY=function($,o,T){D.wB.call(this,$,o,T);
|
|
this.fY={cA:{KR:0,x:0,y:0},Mo:!1};this.Id=null;this.cursor=null;this.ad0=0;this._j=null;this.GP=null;
|
|
this.X4=null};D.LY.prototype=new D.wB;D.LY.prototype.xQ=function(){return this.Id!=null};D.LY.prototype.ut=function($){return this.Id&&this.Id.Zk()};
|
|
D.LY.prototype.iO=function($,o,T,s,E){this._j=E;var e=$.C.VD(E.x,E.y);e.x=Math.round(e.x);e.y=Math.round(e.y);
|
|
var n=this.fY.cA,A=n.KR!=0?n.x/n.y:null;if(this.Id)this.Id.iO($,T,s,e,A,!1);else this.GP=D.aD.yu($,e,T)};
|
|
D.LY.prototype.hs=function($,o){var T=[$.x,$.y,$.x+$.d,$.y,$.x+$.d,$.y+$.w,$.x,$.y+$.w];return new dY(T,!0,!1,this.id==D.dO,!0,o,this.id==D.dO?2:0,this.id==D.dO?4:3)};
|
|
D.LY.prototype.Rb=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.bl,j$:this.cursor};$.J(o)};D.LY.prototype.enable=function($,o,T,s){this.YO=o;
|
|
this.cursor="crosshair";this.Rb(o);if($!=null&&$.Z){var E=this.fY.cA={KR:0,x:0,y:0};this.lz(o,H.E.Q,{e:H.V.Hh,U:this.id,uS:!1,tv:E});
|
|
this.UR({PF:"cropby",a8R:3},o,$,s,T)}};D.LY.prototype.ZS=function($,o,T,s,E){this._j=E;var e=$.C.VD(E.x,E.y);
|
|
if(!E.jw){var n="crosshair";if(this.Id){var A=this.Id.KX(e,$.C.X);if(A)n=A;else n="default"}if(n!=this.cursor){this.cursor=n;
|
|
this.Rb(o)}}if(this.Id)this.Id.ZS($,T,s,e);else if(this.GP){var u=D.U5.XS(this.GP,D.aD.yu($,e,T),s,!0,this.fY.cA),Y=u[0].x,b=u[0].y,a=this.X4=new df(Y,b,u[1].x-Y,u[1].y-b);
|
|
$.n.JU=L.M.Uo(a);$.Cd=!0;D.wB.C9(E.x+10,E.y-10,a,$,T)}};D.LY.prototype.yg=function($,o,T,s,E){this._j=E;
|
|
if(this.Id==null){if(this.GP){var e=this.X4;if(e){var n=this.fY.cA;this.Id=this.hs(e,n.KR!=0);this.Id.cD($,T);
|
|
this.X4=null;this.lz(o,H.E.Q,{e:H.V.Hh,U:this.id,uS:!0})}this.GP=null;$.n.bt=[];$.Cd=!0}return}var A=$.C.VD(E.x,E.y);
|
|
this.Id.yg($,T,s,A);this.lz(o,H.E.Q,{e:H.V.Hh,U:this.id,uS:!0});var u=this.Id.kd();if(Math.abs(u[0]-u[4])<2&&Math.abs(u[1]-u[5])<2){this.disable($,o,null,s);
|
|
return}if(Date.now()-this.ad0<200&&this.Id.YI(A)){this.DK($,T);this.disable($,o,T,s);return}this.ad0=Date.now()};
|
|
D.LY.prototype.Vb=function($,o,T,s){var E=this.Id;if(E==null||this._j&&this._j.jw)return;if(s.L(dN.FT)){this.DK($,T);
|
|
this.disable($,o,T,s)}else if(s.L(dN.R5)){this.disable($,o,T,s)}else E.Vb($,T,s)};D.LY.rM=function($,o,T){var s={classID:"null",T:{t:"Objc",v:{classID:"Rctn",Top:{t:"UntF",v:{type:"#Pxl",val:$[1]}},Left:{t:"UntF",v:{type:"#Pxl",val:$[0]}},Btom:{t:"UntF",v:{type:"#Pxl",val:$[1]+$[3]}},Rght:{t:"UntF",v:{type:"#Pxl",val:$[0]+$[2]}}}},Angl:{t:"UntF",v:{type:"#Ang",val:o!=null?o:0}},Dlt:{t:"bool",v:T!=null?T:!0},cropAspectRatioModeKey:{t:"enum",v:{cropAspectRatioModeClass:"pureAspectRatio"}},CnsP:{t:"bool",v:!1}};
|
|
return{Wk:"crop",bI:s}};D.LY.pj=function($,o){if(o==null)o=[!0,!0,!0,!0];var T={classID:"trim",trimBasedOn:{t:"enum",v:{trimBasedOn:["topLeftPixelColor","bottomRightPixelColor","Trns"][$]}}},s=["Top","Left","Btom","Rght"];
|
|
for(var f=0;f<4;f++)T[s[f]]={t:"bool",v:o[f]};return{Wk:"trim",bI:T}};D.LY.YQ=function($,o,T,s){var E={classID:"null"};
|
|
if(s!=null){E.Wdth={t:"UntF",v:{type:"#Pxl",val:$}};E.Hght={t:"UntF",v:{type:"#Pxl",val:o}};E.Intr={t:"enum",v:{Intp:["Nrst","Blnr","bicubicSharper"][s]}}}if(T!=null)E.Rslt={t:"UntF",v:{type:"#Rsl",val:T}};
|
|
return{Wk:"imageSize",bI:E}};D.LY.Fj=function($,o,T){if(T==null)T=4;var s=Math.floor(T/3),E=T%3;return{Wk:"canvasSize",bI:{classID:"null",Wdth:{t:"UntF",v:{type:"#Pxl",val:$}},Hght:{t:"UntF",v:{type:"#Pxl",val:o}},Hrzn:{t:"enum",v:{HrzL:["Left","Cntr","Rght"][E]}},Vrtc:{t:"enum",v:{VrtL:["Top","Cntr","Btom"][s]}}}}};
|
|
D.LY.prototype.A2=function($,o,T,s,E){var e=new df(0,0,T.d,T.w),n=[11,3],A=T.fG,u=T.d/2,Y=T.w/2,b=1,I,_;
|
|
if($.e=="fromAction"){var a=$.xU,w=a.Wk,X=a.bI,N=T.d/T.w,z=X.Wdth?X.Wdth.v.val:-1,i=X.Hght?X.Hght.v.val:-1,A=X.Rslt?X.Rslt.v.val:null,k=X.Wdth?X.Wdth.v.type:X.Hght?X.Hght.v.type:-1,Q=1,O;
|
|
if(w=="imageSize"){if(X.Intr){if(X.Intr.v.Intp=="Nrst")Q=0;if(X.Intr.v.Intp=="bicubicSharper")Q=2;if(z==-1&&i==-1){var c=A/T.fG;
|
|
z=Math.round(T.d*c);i=Math.round(T.w*c)}else if(k=="#Prc"){if(z!=-1)z=Math.round(T.d*z/100);if(i!=-1)i=Math.round(T.w*i/100)}if(X.CnsP&&X.CnsP.v){if(z==-1)z=Math.round(i*N);
|
|
if(i==-1)i=Math.round(z/N)}}else{if(k=="#Prc")A=Math.round(T.fG/((z!=-1?z:i)/100));else if(k==-1)A=Math.round(A);
|
|
else throw"e";z=T.d;i=T.w}O={e:"imgsize",jG:z,ib:i,lC:A,nH:Q}}else if(w=="canvasSize"){if(z==-1)z=T.d;
|
|
if(i==-1)i=T.w;if(X.Rltv&&X.Rltv.v==!0){if(X.Wdth)z+=T.d;if(X.Hght)i+=T.w}var B=X.Vrtc?X.Vrtc.v.VrtL:"Cntr",G=X.Hrzn?X.Hrzn.v.HrzL:"Cntr";
|
|
O={e:"canvsize",jG:z,ib:i,wh:3*["Top","Cntr","Btom"].indexOf(B)+["Left","Cntr","Rght"].indexOf(G)}}else if(w=="revealAll"){O={e:"revealAll"}}else if(w=="trim"){var l={topLeftPixelColor:0,bottomRightPixelColor:1,Trns:2}[X.trimBasedOn.v.trimBasedOn];
|
|
if(l==null)throw"e";var v=["Top","Left","Btom","Rght"],p=[!0,!0,!0,!0];for(var f=0;f<4;f++)if(X[v[f]])p[f]=X[v[f]].v;
|
|
O={e:"trim",alh:l,tv:p}}else if(w=="crop"){var P,h,j,C;if(X.T){var V=X.T.v,P=Math.round(V.Left.v.val),h=Math.round(V.Top.v.val),j=Math.round(V.Rght.v.val)-P,C=Math.round(V.Btom.v.val)-h}else{var d=T.u[T.D[0]],m=d.rect;
|
|
m=m.Sr(new df(0,0,T.d,T.w));P=m.x;h=m.y;j=m.d;C=m.w}O={e:"canvsize",jG:j,ib:C,l:new aY(P,h),a64:X.Dlt!=null&&X.Dlt.v}}else console.log(a);
|
|
if(O)this.A2(O,o,T,s,E);return}else if($.e=="imgsize"){e=new df(0,0,$.jG,$.ib);if($.lC)A=$.lC;b=$.nH}else if($.e=="canvsize"){var R=$.wh!=null?$.wh:0;
|
|
e=new df(0,0,$.jG,$.ib);var g=T.d-$.jG,S=T.w-$.ib,F=Math.round(g/2),r=Math.round(S/2);if(R==1||R==4||R==7)e.x=F;
|
|
if(R==2||R==5||R==8)e.x=g;if(R==3||R==4||R==5)e.y=r;if(R==6||R==7||R==8)e.y=S;if($.l){e.x=$.l.x;e.y=$.l.y}}else if($.e=="rot"&&($.H+2*Math.PI)%(Math.PI/2)!=0){var q=L.M.Uo(e).I,W=new fY;
|
|
W.translate(-u,-Y);W.rotate($.H);W.translate(u,Y);L.M.t(q,W,q);e=L.M.$l(q)}else if($.e=="rot"&&$.H!=Math.PI&&$.H!=-Math.PI){e=new df(u-T.w/2,Y-T.d/2,T.w,T.d);
|
|
if((T.d+T.w&1)==1){u=Math.floor(u);Y=Math.floor(Y);e=new df(u-Math.floor(T.w/2),Y-Math.floor(T.d/2),T.w,T.d);
|
|
if((T.d&1)==1&&$.H!=-Math.PI/2)e.y--;if((T.w&1)==1&&$.H==-Math.PI/2)e.x--}}else if($.e=="trim"){n=[11,12,0];
|
|
var Z=T.aw(),m=new df(0,0,T.d,T.w);e=L.UI(Z,m,$.alh,$.tv);if(e.p4())e=m}else if($.e=="cropbysel"){n=[11,12,1];
|
|
e=T.Z.rect.clone()}else if($.e=="revealAll"){n=[11,12,2];e=T.root.rX(T,!0)}var cN=$.e=="canvsize"&&$.a64;
|
|
if($.e=="imgsize"||$.e=="rot"||$.e=="scl"||cN){var ce=new fY;if($.e=="imgsize"){n=[11,10];ce.scale($.jG/T.d,$.ib/T.w)}else if(cN){}else{ce.translate(-u,-Y);
|
|
if($.e=="rot")ce.rotate($.H);if($.e=="scl")ce.scale($.H.x,$.H.y);ce.translate(u,Y);n=$.U1}_=L.$.KQ(ce);
|
|
I=this.cj(T,E,!0,_,b,cN?e:null)}else if($.e=="auto-align"){if(T.D.length<2){alert("Select two or more layers.");
|
|
return}var gf=[];for(var f=0;f<T.D.length;f++){var d=T.u[T.D[f]];if(!d._1()&&d.add.SoLd==null){alert("Unsupported layer selected.");
|
|
return}if(d.rect.p4()){alert("Empty layer selected.");return}gf.push([d.buffer,d.rect])}var K=L.pw.cs(gf,0);
|
|
if(K==null){alert("No similarity found.");return}_=K[1];var cv=T.D;T.D=T.D.slice(1);I=this.cj(T,E,!1,K.slice(1),b);
|
|
T.D=cv;e=T.root.rX(T,!0);n=[2,10,1]}var f0=new df(0,0,T.d,T.w);if(!e.p4()&&(!e.R1(f0)||I!=null)){var i8=new dt(n,this);
|
|
i8.data={aob:T.fG,lC:A,FE:I,vo:_,q3:D.LY.kL(T,e,f0,I!=null)};D.LY.xl(T,i8.data,e);T.g4(i8);this.wx(i8.data,T)}};
|
|
D.LY.kL=function($,o,T,s){if($.op.length==0)return null;var E=JSON.stringify($.op),e=JSON.parse(E);D.j3.a0r(e,o,T,s);
|
|
e=JSON.stringify(e);return[E,e]};D.LY.prototype.cj=function($,o,T,s,E,e){var n={u:[],Mr:null,Y6:null};
|
|
if(T){for(var f=0;f<$.u.length;f++)n.u.push(f);for(var f=0;f<$.w5.length;f++)n.u.push(-1-f);for(var f=0;
|
|
f<$.iy.length;f++)n.u.push(-1e3-f)}else n.u=$.D.slice(0);n.Mr=D.p.cG($,n.u,!0);D.p.ja($,o,n.u,n.Mr,E,s,null,!0,e);
|
|
n.Y6=D.p.cG($,n.u,!0);return n};D.LY.prototype.wx=function($,o){if($.lC)o.fG=$.lC;if($.q3)o.op=JSON.parse($.q3[1]);
|
|
if($.FE){D.LY.RO(o,L.$.JV($.vo));D.p.we(o,$.FE.u,$.FE.Y6)}D.LY.n5(o,$)};D.LY.prototype.OK=function($,o){if($.aob)o.fG=$.aob;
|
|
if($.q3)o.op=JSON.parse($.q3[0]);D.LY.bS(o,$);if($.o2)o.C.l.sn($.o2);o.FK();if($.FE){var T=L.$.JV($.vo).clone();
|
|
T.lY();D.LY.RO(o,T);D.p.we(o,$.FE.u,$.FE.Mr)}};D.LY.RO=function($,o){for(var f=0;f<$.u.length;f++){var T=$.u[f];
|
|
if(T.add.artb==null)continue;var s=L.M.Uo(T.co()).I;L.M.t(s,o,s);var E=L.M.$l(s);T.y2(E)}};D.LY.Bh=function($){var o=new df,T=0,s=$.root.children.length;
|
|
for(var f=0;f<s;f++){var E=$.root.children[f].c;if(E.add.artb==null)continue;o=o.BZ(E.co());T++}var e=new df(0,0,$.d,$.w);
|
|
if(!o.p4()&&!e.R1(o)&&s==T)return o;return null};D.LY.lN=function($){var o=D.LY.Bh($);if(o)D.LY.Mo($,o,!0);
|
|
return o};D.LY.Mo=function($,o,T){var s=$.d,E=$.w,e=o.d,n=o.w,A=o.x==0&&o.y==0;if(A&&s==e&&E==n)return;
|
|
$.d=e;$.w=n;var u=[];for(var f=0;f<$.u.length;f++)u.push(f);if(!A)D.aD.FY($,u,null,-o.x,-o.y);for(var f=0;
|
|
f<$.u.length;f++){$.u[f].tF($)}$.FK();if(T){var Y=$.C.l,b=$.C.X;Y.x+=Math.round((o.x+(e-s)/2)*b);Y.y+=Math.round((o.y+(n-E)/2)*b)}else $.C.l.A5(0,0);
|
|
if($.Z)$.Z.rect.offset(-o.x,-o.y);var a=$.hm();for(var w=0;w<a[0].length;w++)if(a[1][w]==-1){var X=$.yZ[w];
|
|
X[1]-=X[0]==0?o.x:o.y}for(var f=0;f<$.iy.length;f++)$.iy[f].rect.offset(-o.x,-o.y)};D.LY.prototype.UR=function($,o,T,s,E){if($.PF=="commit"){this.DK(T,E);
|
|
this.disable(T,o,null,s)}else if($.PF=="cancel"){this.disable(T,o,null,s)}var e=null,n=new df(0,0,T.d,T.w),A=this.fY.cA;
|
|
if($.PF=="config"){this.fY=$.fY;A=this.fY.cA;if(this.fY.Mo!=null)return;if(T==null)return;e=n;if(A.KR==1){var u=A.x/A.y;
|
|
e.w=Math.round(e.d/u)}if(A.KR==2){e.d=A.x;e.w=A.y}e.x=Math.round((T.d-e.d)/2);e.y=Math.round((T.w-e.w)/2)}if($.PF=="cropby"){if(T==null)return;
|
|
var Y=$.a8R,e;if(Y==0)e=T.root.rX(T,!0);if(Y==1){if(T.D.length==0)alert("No layer is selected.");else{var b=T.root.BA(T.D[0]);
|
|
e=b.rX(T,!0)}}if(Y==2){if(T.D.length==0)alert("No layer is selected.");else{e=L.UI(T.aw(),n,0);if(e.p4())e=n.clone()}}if(Y==3){if(T.Z!=null)e=T.Z.rect;
|
|
else alert("There is no selection.")}}if(e&&e.p4())e=null;if(e!=null){this.Id=this.hs(e,A.KR!=0);this.Id.cD(T,E);
|
|
this.lz(o,H.E.Q,{e:H.V.Hh,U:this.id,uS:!0})}};D.LY.prototype.DK=function($,o){var T=this.Id.kd(),s=L.M.$l(T),E=this.a1j($,T),e=!1,n=this.fY.cA,A=this.fY.Mo,u=n.x,Y=n.y,w;
|
|
if(this.id==D.EZ&&n.KR==2&&E.Y()!=u*Y){E=new df(E.x,E.y,u,Y);e=!0}var b=L.$.TU(T,E);b=L.$.lY(b);var a=L.$._r(b),X=Math.atan2(b[3],b[0]);
|
|
if(Math.abs(X)>1e-9||!a||e||A)w=this.cj($,o,!0,b,1,s);var N=new dt(this.name,this),z=new df(0,0,$.d,$.w);
|
|
N.data={FE:w,vo:b,o2:$.C.l.clone(),q3:D.LY.kL($,E,z,!1)};D.LY.xl($,N.data,E);$.g4(N);this.wx(N.data,$);
|
|
this.track(D.LY.rM([s.x,s.y,s.d,s.w],null,A))};D.LY.xl=function($,o,T){if(T==null)return;o.FF=new df(0,0,$.d,$.w);
|
|
o.oJ=T};D.LY.n5=function($,o){if(o.oJ==null)return;D.LY.Mo($,o.oJ)};D.LY.bS=function($,o){if(o.oJ==null)return;
|
|
var T=o.FF.clone();T.offset(-o.oJ.x,-o.oJ.y);D.LY.Mo($,T)};D.LY.prototype.a1j=function($,o){var T=L.$.TU(o),s=L.$._r(T),E=L.$.JV(T),e=E.Ry,n=E.Es,A=Math.atan2(E.P,E.Ca);
|
|
E.rotate(A);var u=new df(e,n,E.Ca,E.Um);if(!s){function Y(O,f,c){var B=O[f]-O[c],G=O[f+1]-O[c+1];return Math.sqrt(B*B+G*G)}var b=Y(o,0,2),a=Y(o,4,6),w=Math.max(b,a),X=Y(o,2,4),N=Y(o,6,0),z=Math.max(X,N),i=D.LY.ahl(o,$.d/2,$.w/2),k,Q;
|
|
if(isNaN(i)||i==Infinity||i==-Infinity||Math.min(i,1/i)<.1)i=(b+a)/(X+N);if(w/z>i){k=w*1;Q=k/i}else{Q=z*1;
|
|
k=Q*i}u.d=k;u.w=Q}u.x=Math.round(u.x);u.y=Math.round(u.y);u.d=Math.round(u.d);u.w=Math.round(u.w);return u};
|
|
D.LY.ahl=function($,o,T){var s=$[0]-o,E=$[1]-T,e=$[2]-o,n=$[3]-T,A=$[6]-o,u=$[7]-T,Y=$[4]-o,b=$[5]-T,a=((E-b)*A-(s-Y)*u+s*b-E*Y)/((n-b)*A-(e-Y)*u+e*b-n*Y),w=((E-b)*e-(s-Y)*n+s*b-E*Y)/((u-b)*e-(A-Y)*n+A*b-u*Y),X=-((w*u-E)*(a*n-E)+(w*A-s)*(a*e-s))/((w-1)*(a-1));
|
|
function N(i){return i*i}var z=Math.sqrt((N(a-1)+N(a*n-E)/X+N(a*e-s)/X)/(N(w-1)+N(w*u-E)/X+N(w*A-s)/X));
|
|
if(a==1&&w==1)z=Math.sqrt((N(n-E)+N(e-s))/(N(u-E)+N(A-s)));return z};D.LY.prototype.disable=function($,o,T,s){if($==null)return;
|
|
if(this.Id)this.Id.clear($);this.Id=null;this.lz(o,H.E.Q,{e:H.V.Hh,U:this.id,uS:!1})};D.LY.prototype.lz=function($,o,T,s){var E=new x(o,!0);
|
|
E.data=T;if(s)E.U=s;$.J(E)};D.C0=function(){D.LY.call(this,[10,2],D.EZ,"tools/rcrop")};D.C0.prototype=new D.LY;
|
|
D.un=function(){D.LY.call(this,[10,39],D.dO,"tools/pcrop")};D.un.prototype=new D.LY;D.B7=function(){D.x5.call(this,[10,21],D.vz,"tools/dodge");
|
|
this.Yb="dodge"};D.B7.prototype=new D.x5;D.B7.prototype.iO=function($,o,T,s,E){this.gB($,T,s,E,this.Em.expo/Math.PI);
|
|
if(this.VP==null)return;this.m9($)};D.B7.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);if(this.Gh)this.g1($,T,E);
|
|
if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.Qq=function(){D.x5.call(this,[10,3],D.WJ,"tools/eraser");
|
|
this.Yb="erase"};D.Qq.prototype=new D.x5;D.Qq.prototype.iO=function($,o,T,s,E){this.gB($,T,s,E,this.Em.flow);
|
|
if(this.VP==null)return;this.m9($)};D.Qq.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);if(this.Gh)this.g1($,T,E);
|
|
if(this.VP==null)return;if(!E.jw)return;var e=this.X$($,T,s,E);this.m9($)};D.pr=function(){D.x5.call(this,[10,45],D.abx,"tools/beraser");
|
|
this.Yb="ierase"};D.pr.prototype=new D.x5;D.pr.prototype.iO=function($,o,T,s,E){if(this.Pv(s,o,E))return;
|
|
this.gB($,T,s,E,this.Em.flow);if(this.VP==null)return;this.m9($)};D.pr.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);
|
|
if(this.Gh)this.g1($,T,E);if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.S_=function(){D.NK.call(this,[10,15],D.ZR,"tools/rselect");
|
|
this.Mf="crosshair"};D.S_.prototype=new D.NK;D.S_.prototype.$d=function($,o,T,s){if(!s.jw||!this.E$)return;
|
|
var E=this.rX($,T,!0);$.n.JU=L.M.Uo(E);$.Cd=!0;D.wB.C9(s.x+10,s.y-10,E,$,o)};D.S_.prototype.uZ=function($,o,T,s){$.n.JU=null;
|
|
$.n.bt=[];$.Cd=!0;this.finish($,o,T,s)};D.S_.prototype.getSelection=function($,o,T,s){if(this.GP.R1(this.dF)||!this.E$)return null;
|
|
var E=this.rX($,T,!0);if(E.p4())return null;return D.NK.e4("Rctn",E,this.Ne.anta)};D.fU=function(){D.NK.call(this,[10,4],D.a6Q,"tools/eselect");
|
|
this.Mf="crosshair"};D.fU.prototype=new D.NK;D.fU.prototype.$d=function($,o,T,s){if(!s.jw||!this.E$)return;
|
|
var E=this.rX($,T);$.n.JU=D.fU.UJ(E);$.Cd=!0;D.wB.C9(s.x+10,s.y-10,E,$,o)};D.fU.prototype.uZ=function($,o,T,s){$.n.JU=null;
|
|
$.n.bt=[];$.Cd=!0;this.finish($,o,T,s)};D.fU.prototype.getSelection=function($,o,T,s){if(this.GP.R1(this.dF)||!this.E$)return null;
|
|
var E=this.rX($,T);if(!E.Ha(new df(0,0,$.d,$.w)))return null;return D.NK.e4("Elps",E,this.Ne.anta)};
|
|
D.fU.UJ=function($){var o=$.x,T=$.y,s=$.x+$.d,E=$.y+$.w,e=(o+s)/2,n=(T+E)/2,A=(o-s)/2,u=(T-E)/2,Y=.5522848,b={I:[e,n-u],o:["M","C","C","C","C"]};
|
|
b.I.push(e+Y*A,n-u,e+A,n-Y*u,e+A,n);b.I.push(e+A,n+Y*u,e+Y*A,n+u,e,n+u);b.I.push(e-Y*A,n+u,e-A,n+Y*u,e-A,n);
|
|
b.I.push(e-A,n-Y*u,e-Y*A,n-u,e,n-u);return b};D.iK=function(){D.wB.call(this,[10,5],D.zx,"tools/eyedropper");
|
|
this.IO=!1;this.IC=1};D.iK.prototype=new D.wB;D.iK.prototype.ut=function($){return $.jw};D.iK.prototype.A2=function($,o,T,s,E){if($.e=="pickhere")this.Gm(T,o,E,s,$.anv)};
|
|
D.iK.prototype.iO=function($,o,T,s,E){this.IO=!0;this.Gm($,o,T,s,E)};D.iK.prototype.ZS=function($,o,T,s,E){if(this.IO)this.Gm($,o,T,s,E)};
|
|
D.iK.prototype.yg=function($,o,T,s,E){this.IO=!1};D.iK.prototype.Gm=function($,o,T,s,E){var e=D.iK.v0($,E,this.IC),n=new x(H.E.Q);
|
|
n.data={e:H.V.uY,M9:gr.ux,f8:0,H:e};o.J(n)};D.iK.v0=function($,o,T){var s=$.C.VD(o.x,o.y),E=Math.floor(s.x),e=Math.floor(s.y),n=(T-1)/2,A=Math.max(0,E-n),u=Math.max(0,e-n),Y=Math.min($.d,E+n+1),b=Math.min($.w,e+n+1),a=(Y-A)*(b-u),w=$.aw(),X=0,N=0,z=0;
|
|
for(var E=A;E<Y;E++)for(var e=u;e<b;e++){var f=4*(e*$.d+E);X+=w[f];N+=w[f+1];z+=w[f+2]}X=Math.round(X/a);
|
|
N=Math.round(N/a);z=Math.round(z/a);return X<<16|N<<8|z};D.iK.prototype.UR=function($){this.IC=$.IC};
|
|
D.eH=function(){D.wB.call(this,[10,6],D.arz,"tools/gradient");this.Em={h:JSON.parse(ev.rN.Hr).v,h2:"Lnr",wq:!1,aoL:!1,a5Z:"norm",yV:1};
|
|
this.zq=!1;this.UP=null};D.eH.prototype=new D.wB;D.eH.prototype.enable=function($,o,T,s){var E=new x(H.E.Q,!0);
|
|
E.data={e:H.V.bl,j$:"default"};o.J(E)};D.eH.prototype.UR=function($){this.Em=$.M9};D.eH.prototype.iO=function($,o,T,s,E){if(!$.Jt())return;
|
|
this.UP=$.C.VD(E.x,E.y);this.UP=D.aD.yu($,this.UP,T);this.zq=!0};D.eH.prototype.ZS=function($,o,T,s,E){if(!this.zq)return;
|
|
var e=$.C.VD(E.x,E.y);e=D.aD.yu($,e,T);if(s.L(dN.Et))e=D.eH.mq(this.UP,e);$.n.JU={I:[this.UP.x,this.UP.y,e.x,e.y],o:["M","L"]};
|
|
$.n.EJ=[this.UP.x,this.UP.y,e.x,e.y];$.Cd=!0};D.eH.prototype.yg=function($,o,T,s,E){if(!this.zq)return;
|
|
var e=$.u[$.D[0]],n=$.C.VD(E.x,E.y);n=D.aD.yu($,n,T);if(s.L(dN.Et))n=D.eH.mq(this.UP,n);var A=n.V4(this.UP),u=aY.YY(this.UP,n,.5),Y=Math.atan2(A.y,A.x),b=aY.Sa(this.UP,n),a=Math.sin(Y),w=Math.cos(Y);
|
|
if(b>2){var X;if($.Z)X=$.Z.rect;else X=new df(0,0,$.d,$.w);var N=L.G(X.Y()*4),z=this.Em,i=z.h2;if(i!="Lnr"){b*=2;
|
|
u=this.UP}L.h.Xo(z.h,N,X,[w*1/b,a*1/b,-a*1/b,w*1/b],u.x,u.y,z.wq,ev.h.types.indexOf(i),T.z4,T.GR,null,z.aoL);
|
|
var k=Math.round(z.yV*256),Q=N.length;if(k!=256)for(var f=0;f<Q;f+=4)N[f+3]=N[f+3]*k>>>8;var O=new x(H.E.N);
|
|
O.U=D.WJ;O.data={e:"fillBMP",Qn:N,_6:z.a5Z,U1:this.name};o.J(O)}$.n.JU=null;$.n.EJ=[];$.Cd=!0;this.zq=!1};
|
|
D.eH.mq=function($,o){if($.R1(o))return $;var T=o.x-$.x,s=o.y-$.y,E=Math.abs(T),e=Math.abs(s);if(E>e)e=E/2>e?0:E;
|
|
if(e>E)E=e/2>E?0:e;E=T>0?E:-E;e=s>0?e:-e;var n=Math.sqrt(T*T+s*s)/Math.sqrt(E*E+e*e);return new aY($.x+E*n,$.y+e*n)};
|
|
D.eH.Ey=function($,o,T,s,E,e,n){if(n==null)n=H.z("canvas","");var A=n.getContext("2d");n.width=o;n.height=T;
|
|
var u=new df(0,0,o,T),Y=L.G(o*T*4);L.qU(Y,o,T,4);var b=Math.sin(s),a=Math.cos(s),w=L.G(o*T*4);L.h.Xo($,w,u,[a*1/o,b*1/o,-b*1/T,a*1/T],o/2,T/2,!1,0,E,e);
|
|
L.R.xE("norm",w,u,Y,u,u,1);var X=A.getImageData(0,0,o,T);L.w0(Y,X.data);A.putImageData(X,0,0);return n.toDataURL()};
|
|
D.eH.agL=function($,o,T){var s=JSON.parse(JSON.stringify($));for(var f=0;f<s.Clrs.v.length;f++){var E=s.Clrs.v[f].v,e=E.Type.v.Clry;
|
|
if(e=="UsrS")continue;var n=e=="FrgC"?o:T;E.Type.v.Clry="UsrS";E.Clr={t:"Objc",v:L.h.wb({i:n>>16&255,m:n>>8&255,P:n&255})}}return s};
|
|
D.UL=function(){D.wB.call(this,[10,7],D.BC,"tools/hand");this.iL=new aY(0,0);this.ug=null;this.iA=0};
|
|
D.UL.prototype=new D.wB;D.UL.prototype.A2=function($,o,T,s,E){var e=$.e;if(e=="setcls"){T.C.xR=$.xR;
|
|
T.Cd=!0;T.RZ=!0}if(e=="scroll"&&!s.L(dN.BJ)){if(s.L(dN.I6))D.UL.iY(T,T.C.l.x-$.Jn.y,T.C.l.y-$.Jn.x);
|
|
else D.UL.iY(T,T.C.l.x-$.Jn.x,T.C.l.y-$.Jn.y)}};D.UL.prototype.enable=function($,o,T,s){this.ug=null;
|
|
var E=new x(H.E.Q,!0);E.data={e:H.V.bl,j$:"grab"};o.J(E);if($&&Date.now()-this.iA<300){E.type=H.E.N;
|
|
E.U=D.S3;E.data={e:"adapt",H:"fitscr"};o.J(E)}this.iA=Date.now()};D.UL.prototype.iO=function($,o,T,s,E){this.ug=$.C.l.clone();
|
|
this.iL.A5(E.x,E.y)};D.UL.prototype.ZS=function($,o,T,s,E){if(!E.jw)return;if(this.ug==null)this.iO($,o,T,s,E);
|
|
D.UL.iY($,this.ug.x+(E.x-this.iL.x),this.ug.y+(E.y-this.iL.y))};D.UL.prototype.yg=function($,o,T,s,E){this.ug=null};
|
|
D.UL.iY=function($,o,T){var s=$.C.X,E=$.C.Vi,e=E.d,n=E.w,A=$.d*s,u=$.w*s,Y=A<e&&u<n,b=e/2+A/2-64,a=n/2+u/2-64;
|
|
$.C.l.A5(Math.max(-b,Math.min(b,o)),Math.max(-a,Math.min(a,T)));$.RZ=!0};D.df=function(){D.wB.call(this,[10,47],D.aii,"tools/rview");
|
|
this.iL=new aY(0,0);this.zg=null;this.abt=null;this.iA=0};D.df.prototype=new D.wB;D.df.prototype.enable=function($,o,T,s){this.ug=null;
|
|
var E=new x(H.E.Q,!0);E.data={e:H.V.bl,j$:"grab"};o.J(E);if($&&Date.now()-this.iA<300&&$.C.VN!=0){$.C.VN=0;
|
|
$.Cd=!0}this.iA=Date.now();if($)this.T6($,o)};D.df.prototype.disable=function($,o,T,s,E){if($)this.T6($,o)};
|
|
D.df.prototype.nM=function($,o,T,s){if($)this.T6($,o)};D.df.prototype.iO=function($,o,T,s,E){this.iL.A5(E.x,E.y);
|
|
var e=$.C;this.zg=e.VD(e.Vi.d/2,e.Vi.w/2);this.abt=e.jj()};D.df.prototype.ZS=function($,o,T,s,E){if(!E.jw)return;
|
|
var e=$.C,n=this.zg,A=this.iL,u=new aY(e.Vi.d/2,e.Vi.w/2),Y=Math.atan2(E.y-u.y,E.x-u.x),b=Math.atan2(A.y-u.y,A.x-u.x);
|
|
this.et($,o,this.abt.clone(),n,Y-b)};D.df.prototype.UR=function($,o,T,s){this.et(T,o,null,null,$.a4-T.C.VN);
|
|
T.C.VN=$.a4};D.df.prototype.et=function($,o,T,s,E){var e=$.C;if(T==null)T=e.jj();if(s==null)s=e.VD(e.Vi.d/2,e.Vi.w/2);
|
|
T.translate(-s.x,-s.y);T.rotate(E);T.translate(s.x,s.y);e.o8(T);if($.d*e.X<e.Vi.d&&$.w*e.X<e.Vi.w)e.l.A5(0,0);
|
|
$.Cd=!0;this.T6($,o)};D.df.prototype.T6=function($,o){var T=new x(H.E.Q,!0);T.data={e:H.V.Hh,U:this.id,a4:$.C.VN};
|
|
o.J(T)};D.xk=function(){D.nz.call(this,[10,25],D.rw,"tools/hbrush")};D.xk.prototype=new D.nz("");D.xk.prototype.yg=function($,o,T,s,E){if(this.VP==null)return;
|
|
this.o7($,"heal",this.VP.su(),this.VP.rX(),this.VP.cx());this.T($,this.VP.cx());D.x5.prototype.yg.call(this,$,o,T,s,E);
|
|
if(!this.Em.algnd)this.l=null};D.mO=function($){D.wB.call(this,$?["VAR0 VAR1",[22,4,1],[10,8]]:[10,8],$?D.i9:D.ko,$?"tools/vtype":"tools/htype");
|
|
this.To=[];this.u4=null;this.mh=null;this.caller=null;this.Ac=1;this.Q8=null;this.a1S=0;this.aW=0;this.a5j=null;
|
|
this.Xr=null;this.f0=null;this.lc=null;this.dP=null;this.r$=null;this.agE=null;this.rs=null;this.Id=null;
|
|
this.AR=null;this.alD=null;this.sb=!1;this.ij=!1;this.$v=!1;this.$b=null;this.d_=null;this.adm=null;
|
|
this.iG=!1;this.dC=!1;this.tp=-1;this.fX=-1;this.M7=document.createElement("textarea");this.M7.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.M7.addEventListener("input",this.l9.bind(this),!1);this.M7.addEventListener("keydown",this.aj8.bind(this),!1)};
|
|
D.mO.prototype=new D.wB;D.mO.prototype.ut=function($){return $.jw};D.mO.prototype.nv=function($,o,T,s){if(this.f0!=null||this.id==D.i9)return;
|
|
this.caller=o;this.u4=$;var E=this.wu($);if(E.length!=0){var e=null,n=[],A=[];for(var f=0;f<E.length;
|
|
f++){var u=$.u[E[f]],Y=u.add.TySh,b=0,a=g8.m5(Y.h3).length-2,w=g8.$Q(Y.h3,b,a);g8.HH(w,D.p.jZ(Y.t));
|
|
if(w.oH.Font!=null)w.oH.Font=w.Nd[w.oH.Font].Name;e=w.Nd;n.push(w.oH);A.push(w.CL)}var w={Nd:e,oH:g8.E8(n),CL:g8.E8(A)};
|
|
if(w.oH.Font!=null)g8.PL(w,w.oH.Font);this.rL(o,w,Y)}};D.mO.prototype.wu=function($){var o=[];for(var f=0;
|
|
f<$.D.length;f++)if($.u[$.D[f]]&&$.u[$.D[f]].add.TySh)o.push($.D[f]);return o};D.mO.prototype.A2=function($,o,T,s,E){if($.e=="insertText"&&this.f0){var e=this.M7,n=e.value,A=e.selectionStart,u=e.selectionEnd;
|
|
e.value=n.slice(0,A)+$.H+n.slice(u);e.selectionStart=e.selectionEnd=A+$.H.length;this.l9(null);e.focus()}if($.e=="updateStyles"){if(this.f0==null){var Y=this.wu(T),b=!1;
|
|
if(Y.length!=0){this.lh(T,o,E,Y);for(var f=0;f<Y.length;f++){var a=T.u[Y[f]],w=a.add.TySh;g8.ce(w,this.Ac);
|
|
this.f0=a;var X=g8.m5(w.h3);this.tp=0;this.fX=X.length-1;g8.zA(w.h3,this.tp,this.fX,this.Ez(E,w));var N=this.bj(T,E);
|
|
if(N==!1)b=!0}if(b){this.iG=!0;return}this.ap(T,o)}return}this.a1(E)}if($.e.startsWith("warp")){var z=this.dC;
|
|
if($.e=="warp"||$.e=="warpCancel"){if(this.f0==null)return;if($.e=="warp")this.f0.add.TySh.Ah=$.Rt;else this.f0.add.TySh.Ah=this.agE;
|
|
var T=this.u4;this.bj(T,E);if(!z)this.mZ(T)}if($.e!="warp")this.M7.focus();if(($.e=="warpConfirm"||$.e=="warpCancel")&&z){this.dC=!1;
|
|
if($.e=="warpConfirm")this.ap(T,o);else this.zl(T,o)}}if($.e=="editCurr"){if(E.D3!=D.ko){this.Q8=E.D3;
|
|
var i=new x(H.E.Q,!0);i.data={e:H.V.s9,U:D.ko};o.J(i)}if(this.f0!=null)this.disable(T,o,E,s);this.u4=T;
|
|
this.mh=E;this.caller=o;this.lh(T,o,E,[$.Yc]);var X=g8.m5(this.f0.add.TySh.h3);this.tp=0;this.fX=X.length-1;
|
|
this.mZ(T);this.Ki();this.M7.focus()}if($.e=="switchPntPrgr"){if(this.f0)return;var a=T.u[T.D[0]],w=a.add.TySh,k=w.t.jZ(),Q=JSON.parse(JSON.stringify(w.h3)),O=g8.tb(Q),c=O==1?g8.Hs(Q):[0,0,Math.round(a.rect.d*1.05/k),Math.round(a.rect.w*1.25/k)],B=g8.$Q(Q,0,0),G=B.Nd[B.oH.Font].Name,l=E.vv.sU(G),v=[0,c[2],c[2]/2][B.CL.Justification%3],p=l?iq.O8(l,G,B.oH):B.oH.FontSize*.8;
|
|
g8.I8(Q,1-O);if(O==0){v=-v;p=-p;g8.bi(Q,[0,0,c[2],c[3]])}var P=new fY(1,0,0,1,v,p);P.concat(w.t);this.A2({_m:T.D[0],e:"newED",_z:Q,t:P,a2g:[16,3,O==1?0:1]},o,T,s,E)}if($.e=="newED"){var a=T.u[$._m],w=a.add.TySh,h=this.NL(T,[$._m]);
|
|
w.h3=$._z;if($.t)w.t=$.t;var j=new iq(w.h3,E.vv),C=hA.rW(j,w);a.rect=C.uL;a.buffer=C._3;a.T();T.T();
|
|
var V=new dt($.a2g?$.a2g:this.name,this);V.data={X_:h,PU:this.NL(T,[$._m])};T.g4(V)}if($.e=="fromAction"){var d=$.xU.bI.Usng.v,m=d.TxtC.v,R=[];
|
|
for(var f=0;f<2;f++){var g=m[f==0?"Hrzn":"Vrtc"].v,S=g.val;if(g.type=="#Prc")S=(f==0?T.d:T.w)*(S/100);
|
|
R[f]=S}this.A$(T,o,E,s,T.C.X8(R[0],R[1]));var a=T.u[T.D[0]],w=a.add.TySh,F=w.h3,n=g8.m5(F);g8.t1(F,0,n.length-1);
|
|
g8.YN(F,0,d.Txt.v.replace(/\r/g,"\n"));n=g8.m5(F);for(var O=0;O<2;O++){var r=d[O==0?"Txtt":"paragraphStyleRange"].v;
|
|
for(var f=0;f<r.length;f++){var q=r[f].v,A=q.From.v,u=Math.min(q.T.v-1,n.length-1);q=q[O==0?"TxtS":"paragraphStyle"].v;
|
|
var W=g8.$Q(F,A,u),Z=O==0?W.oH:W.CL;for(var I in q){var _=q[I].v;if(I=="Sz")Z.FontSize=Math.round(_.val);
|
|
else if(I=="fontPostScriptName")g8.PL(W,_);else if(I=="Algn")Z.Justification={Left:1,Cntr:2}[_.Alg];
|
|
else if(I=="leading")Z.Leading=q[I].v.val;else if(I=="baselineShift")Z.BaselineShift=q[I].v.val;else if(I=="autoLeading")Z.AutoLeading=q[I].v;
|
|
else if(I=="syntheticBold")Z.FauxBold=q[I].v;else if(I=="syntheticItalic")Z.FauxItalic=q[I].v;else if(I=="Trck")Z.Tracking=q[I].v;
|
|
else if(I=="verticalScale")Z.VerticalScale=q[I].v/100;else if(I=="horizontalScale")Z.HorizontalScale=q[I].v/100;
|
|
else if(I=="Clr")Z.FillColor={Type:1,Values:[1,_.Rd.v/255,_.Grn.v/255,_.Bl.v/255]}}g8.zA(F,A,u,W)}}var j=new iq(w.h3,E.vv),C=hA.rW(j,w);
|
|
a.rect=C.uL;a.buffer=C._3;a.T();T.T();this.ap(T,o)}};D.mO.prototype.a1=function($){var o=Math.min(this.tp,this.fX),T=Math.max(this.tp,this.fX),s=this.f0.add.TySh;
|
|
g8.ce(s,this.Ac);g8.zA(s.h3,o,T-1,this.Ez($,s));var E=this.u4,e=this.bj(E,$);if(e)this.mZ(E);if(document.activeElement.tagName.toLowerCase()!="input")this.M7.focus()};
|
|
D.mO.prototype.Ty=function($){return this.To.indexOf($)!=-1};D.mO.prototype.enable=function($,o,T,s){var E=this.M7;
|
|
if(!H.ni(E))o.k.appendChild(E);this.rs="default";this.Rb(o)};D.mO.prototype.xQ=function(){return this.f0!=null};
|
|
D.mO.Bs=function($,o){for(var f=$.u.length-1;f>=0;f--){var T=$.u[f];if(T.add.TySh&&T.rect.dv(o)&&$.q$(f)){var s=T.iQ(2)||T.iQ(31);
|
|
return s?-2:f}}return-1};D.mO.prototype.iO=function($,o,T,s,E){this.u4=$;this.mh=T;this.caller=o;var e=$.C.VD(E.x,E.y),n=this.f0==null;
|
|
if(n){var A=D.mO.Bs($,e);if(A==-2){alert(aX.get([6,57,0]));return}if(A>=0){if(!hA.NP($.u[A].add.TySh,T.vv)){alert("Fonts not loaded yet");
|
|
return}this.lh($,o,T,[A])}else{this.$v=!0;this.$b=E;return}}var u=n?-1:g8.tb(this.f0.add.TySh.h3),Y=this.AR?this.AR:this.Id;
|
|
if(Y&&Y.iO($,T,s,e)&&L.Rt.nP(this.f0.add.TySh.Ah)||!n&&L.M.pP(e,this.f0.rect)>20/$.C.X&&(u==0||u==1)){this.sb=!0;
|
|
this.d_=e;this.adm=this.f0.add.TySh.t.clone();if(this.tp==-1&&this.fX==-1)this.tp=this.fX=this.Hm(e)}else{if(this.dP==null){alert("Fonts not loaded yet");
|
|
return}this.ij=!0;this.tp=this.fX=this.Hm(e);var b=Date.now();if(b-this.a1S>300)this.aW=0;this.aW++;
|
|
this.a1S=b;if(this.aW==2)this.ae1();if(this.aW==3)this.ap5();if(this.aW>1){this.ij=!1}}this.Ki();this.mZ($)};
|
|
D.mO.prototype.lh=function($,o,T,s){var E=$.u[s[0]];this.f0=E;this.lz(o,H.E.Q,{e:H.V.Hh,U:this.id,PF:"showactive"});
|
|
this.lc=s;$.D=s.slice(0);$.L4();$.SK=!0;this.r$=this.NL($,s);this.Mk(E.add.TySh);this.bj($,T)};D.mO.prototype.Mk=function($){if(g8.tb($.h3)!=1)return;
|
|
var o=g8.Hs($.h3);o=new df(0,0,o[2]-o[0],o[3]-o[1]);var T=[o.x,o.y,o.x+o.d,o.y,o.x+o.d,o.y+o.w,o.x,o.y+o.w];
|
|
L.M.t(T,$.t,T);this.Id=new dY(T,!1,!1,!1,!0)};D.mO.prototype.ae1=function(){var $=g8.m5(this.f0.add.TySh.h3);
|
|
this.tp=this.nR($,this.tp);this.fX=this.nZ($,this.tp)};D.mO.prototype.nR=function($,o){var T=" \t\n,.?!_-+=@#$%^&*'\"(){}[]\\/<>:;|",s=[];
|
|
for(var f=0;f<T.length;f++)s.push(T.charAt(f));var E=s.indexOf($[o])==-1?!0:!1;for(var f=o-1;f>=0;f--)if(s.indexOf($.charAt(f))!=-1==E)return f+1;
|
|
return 0};D.mO.prototype.nZ=function($,o){var T=" \t\n,.?!_-+=@#$%^&*'\"(){}[]\\/<>:;|",s=[];for(var f=0;
|
|
f<T.length;f++)s.push(T.charAt(f));var E=s.indexOf($[o])==-1?!0:!1;for(var f=o+1;f<$.length;f++)if(s.indexOf($.charAt(f))!=-1==E)return f;
|
|
return $.length-1};D.mO.prototype.ap5=function(){var $=this.dP.apR(this.tp);this.tp=$[0];this.fX=$[1]};
|
|
D.mO.prototype.Rb=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.bl,j$:this.rs};$.J(o)};D.mO.prototype.ZS=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=this.f0;
|
|
if(!E.jw){var A="default",u=this.Id,Y=this.AR?this.AR:u;if(Y&&L.Rt.nP(n.add.TySh.Ah)){var b=Y.KX(e,$.C.X);
|
|
if(b)A=b;else if(Y==u&&u.YI(e))A="text"}else if(n&&L.M.pP(e,n.rect)>20/$.C.X)A="move";else if(D.mO.Bs($,e)>=0)A="text";
|
|
if(A!=this.rs){this.rs=A;this.Rb(o)}}var a=this.$b;if(this.$v&&Math.min(E.x-a.x,E.y-a.y)>4/$.C.X){this.$v=!1;
|
|
this.A$($,o,T,s,E);n=this.f0;this.sb=!0;this.Id=new dY(null,!1,!1,!1,!0);var w=$.C.VD(this.$b.x,this.$b.y);
|
|
w.x=Math.round(w.x);w.y=Math.round(w.y);this.Id.iO($,T,s,w)}if(this.sb){var X=n.add.TySh;if(this.AR){this.AR.ZS($,T,s,e);
|
|
var N=L.$.JV(L.$.TU(this.AR.kd(),this.alD));X.t=N;this.bj($,T);g8.mg(X)}else if(this.Id){this.Id.ZS($,T,s,e);
|
|
var z=X.t.clone(),i=Math.atan2(z.P,z.Ca);z.rotate(i);var N=L.$.JV(L.$.TU(this.Id.kd())),k=Math.atan2(N.P,N.Ca);
|
|
N.rotate(k);if(!isNaN(N.Ca)&&N.Ca*N.Um-N.P*N.Z9!=0){var Q=new df(0,0,N.Ca/z.Ca,N.Um/z.Um),O=Math.round(Q.d),c=Math.round(Q.w),B=X.h3.Curve;
|
|
if(B){var G=g8.Hs(X.h3),l=new fY(O/G[2],0,0,c/G[3],0,0);L.M.t(B.Points,l,B.Points);g8.mg(X)}g8.bi(X.h3,[0,0,O,c]);
|
|
X.t=L.$.JV(L.$.TU(this.Id.kd(),Q));this.bj($,T);g8.mg(X)}}else{var v=e.x-this.d_.x,p=e.y-this.d_.y;X.t=this.adm.clone();
|
|
var P=new aY(X.t.Ry+v,X.t.Es+p);P=D.aD.yu($,P,T);X.t.Ry=P.x;X.t.Es=P.y;this.bj($,T)}}if(this.ij)this.fX=this.Hm(e);
|
|
if(this.sb||this.ij)this.mZ($)};D.mO.prototype.A$=function($,o,T,s,E){var e=$.Vp(),n=e[0],A=e[1],u=$.$f();
|
|
u.add.lnsr="rend";var Y=$.u.slice(0);u.tM("Text layer "+Y.length);this.f0=u;var b=$.D.length==0?$.u.length-1:$.D[$.D.length-1],a=b+1;
|
|
if(Y[b].add.lsct==hd.NH)a--;this.r$={rd:Y.slice(0),I9:$.D.slice(0)};Y.splice(a,0,u);$.D=[a];this.tp=this.fX=0;
|
|
$.qp(Y);this.r$.c_=Y.slice(0);this.r$.a3=$.D.slice(0);this.lz(o,H.E.Q,{e:H.V.Hh,U:this.id,PF:"showactive"});
|
|
var w=$.C.VD(E.x,E.y),X=T.IT;console.log(X);if(this.id==D.i9){X=JSON.parse(JSON.stringify(X));X.oH.BaselineDirection=1}u.add.TySh=g8.rm(w.x,w.y,X);
|
|
var N=u.add.TySh,z=N.h3;if(this.id==D.i9)z._LineOrientation=2;g8.ce(N,this.Ac);if(E.jw)g8.I8(z,1);else{g8.I8(z,0);
|
|
var i=n[A.pop()],k=i?i.add.vmsk:null;if(k){k=k.clone();var Q=k.g,c,B;for(var f=0;f<Q.length;f++)if(Q[f].m6!=null)Q[f].m6=0;
|
|
var O=4*H.K()/$.C.X;c=L.A.cM(k.g,w,!0,O);if(c.II==-1)c=L.A.cM(k.g,w);if(c.II!=-1){g8.I8(z,1);var G=L.A.kE(Q,c.II),l=L.A.Mx(Q,c.II)-1;
|
|
Q=k.g=Q.slice(0,2).concat(Q.slice(G,G+l+1));k.D=[];N.add={vmsk:k,vogk:M._L(Q)};z.Curve={};g8.J2(N);if(c.PS!=null){var v=iq.qF(z.Curve);
|
|
L.M.t(v[0],N.t,v[0]);var p=L.M.KY(v[0],w.x,w.y),P=T.IT.CL.Justification;if(P==2||P==5){var h=(v[2][p]+v[3]*.5)%v[3];
|
|
p=iq.F0(h,v[2])}var j=v[1][p];j=j%l;k.kZ=[j,j];g8.J2(N)}else this.Mk(N)}}}return u};D.mO.prototype.yg=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=this.$v;
|
|
if(this.$v){this.$v=!1;this.A$($,o,T,s,E);this.ij=!0}if(this.sb||this.ij){this.mZ($);this.Ki();if(n)this.a1(T)}if(this.sb&&this.Id)this.Id.yg($,T,s,e);
|
|
this.sb=this.ij=!1;this.Xv($,T,s);this.M7.focus()};D.mO.prototype.Ki=function(){var $=this.f0.add.TySh,o=Math.min(this.tp,this.fX),T=Math.max(this.tp,this.fX),s,E;
|
|
if(o==T){var e=g8.m5($.h3);if(o==0||e.charAt(o-1)=="\n")s=E=o;else s=E=o-1}else{s=o;E=T-1}var n=g8.$Q($.h3,s,E);
|
|
g8.HH(n,D.p.jZ($.t));this.rL(this.caller,n,$)};D.mO.prototype.rL=function($,o,T){this.lz($,H.E.Q,{e:H.V.uY,M9:gr.mp,IT:o});
|
|
var s=this.Ac=g8.rT(T);this.lz(this.caller,H.E.Q,{e:H.V.Hh,U:this.id,PF:"changeAA",mI:s})};D.mO.prototype.Vb=function($,o,T,s){if(s.L(dN.R5))this.zl($,o);
|
|
var E=this.f0;if(E)if(this.AR==null&&s.L(dN.I6)){var e=E.add.TySh,n=g8.tb(e.h3),A;if(n==1){A=g8.Hs(e.h3);
|
|
A=new df(0,0,A[2]-A[0],A[3]-A[1])}else A=this.dP._Y();var u=[A.x,A.y,A.x+A.d,A.y,A.x+A.d,A.y+A.w,A.x,A.y+A.w];
|
|
L.M.t(u,e.t,u);this.AR=new dY(u,!0,!0,!1,!1);this.alD=A;this.mZ(this.u4)}else this.Xv($,T,s)};D.mO.prototype.Xv=function($,o,T){var s=this.f0;
|
|
if(s&&!this.sb&&this.AR!=null&&!T.L(dN.I6)){this.AR.yg($,o,T,null);this.AR=null;this.Mk(s.add.TySh);
|
|
this.mZ(this.u4)}};D.mO.prototype.disable=function($,o,T,s){var E=this.f0;this.ap($,o)};D.mO.prototype.UR=function($,o,T,s,E){if(this.dC)return;
|
|
if($.PF=="commit")this.ap(T,o);if($.PF=="cancel")this.zl(T,o);if($.PF=="changeAA"){this.Ac=$.mI;if(T!=null)this.A2({e:"updateStyles"},o,T,s,E)}if($.PF=="showwarp"){if(T==null)return;
|
|
if(this.f0==null){var e=T.u[T.D[0]],n=e.add.TySh;if(n==null)return;this.lh(T,o,E,[T.D[0]]);this.M7.focus();
|
|
this.dC=!0}this.agE=this.f0.add.TySh.Ah;var A=new x(H.E.Q,!0);A.data={e:H.V.NC,a_:"textwarp"};o.J(A)}};
|
|
D.mO.prototype.YE=function($,o){if(o!=gr.En)return;if(this.iG){this.iG=!1;var T=this.u4,s=this.lc;for(var f=0;
|
|
f<s.length;f++){this.f0=T.u[s[f]];this.bj(T,$)}this.ap(T,this.caller);return}if(this.f0)this.a1($)};
|
|
D.mO.prototype.Ez=function($,o){var T=JSON.parse(JSON.stringify($.IT));g8.HH(T,1/D.p.jZ(o.t));return T};
|
|
D.mO.prototype.wx=function($,o){if($.X_!=null)this.Mb(o,$.PU);else this.Fb(o,$.c_,$.a3)};D.mO.prototype.OK=function($,o){if($.X_!=null)this.Mb(o,$.X_);
|
|
else this.Fb(o,$.rd,$.I9)};D.mO.prototype.Mb=function($,o){for(var f=0;f<o.length;f++){var T=o[f],s=T._m,E=$.u[s];
|
|
E.buffer=T.ah;E.rect=T.uL.clone();E.T();var e=E.add.TySh;e.Ah=T.Rt;e.QH=T.QH.clone();e.t=T.t.clone();
|
|
e.h3=JSON.parse(JSON.stringify(T.h3));E.mm()}$.T()};D.mO.prototype.NL=function($,o){var T=[];for(var f=0;
|
|
f<o.length;f++){var s=o[f],E=$.u[s],e=E.add.TySh;T.push({_m:s,t:e.t.clone(),Rt:JSON.parse(JSON.stringify(e.Ah)),QH:e.QH.clone(),h3:JSON.parse(JSON.stringify(e.h3)),ah:E.buffer.slice(0),uL:E.rect.clone()})}return T};
|
|
D.mO.prototype.Fb=function($,o,T){$.D=T;$.qp(o);$.T();$.sr=!0};D.mO.prototype.bj=function($,o,T){if(T==null)T=!1;
|
|
var s=this.f0.add.TySh;if(!hA.NP(s,o.vv))return!1;this.dP=new iq(s.h3,o.vv);if(!T){var E=g8.m5(s.h3);
|
|
this.M7.value=E.slice(0,E.length-1)}var e=hA.rW(this.dP,s);if(L.Rt.nP(s.Ah))s.QH=new df;else{if(g8.tb(s.h3)==1){var n=g8.Hs(s.h3),J=e.QH.y;
|
|
s.QH=new df(0,J,n[2]-n[0],n[3]-n[1]-J)}else{s.QH=e.QH}}var A=this.f0.rect;this.f0.rect=e.uL;this.f0.buffer=e._3;
|
|
this.f0.T();$.eA();$.T($.root.gC(e.uL.BZ(A),$,$.u.indexOf(this.f0)));return!0};D.mO.prototype.l9=function($){if(this.f0==null||this.dC)return;
|
|
var o=this.M7.selectionStart,T=this.f0.add.TySh,s=g8.m5(T.h3),E=this.M7.value+"\n",e=Math.min(this.tp,this.fX),n=Math.max(this.tp,this.fX),a=!1;
|
|
this.tp=Math.min(o,e);if(E.length-o<s.length-this.fX)this.fX=s.length-E.length+o;if(s!=E){while(this.tp>0&&s.charAt(this.tp-1)!=E.charAt(this.tp-1))this.tp--}var A=s.substring(0,this.tp),u=s.substring(this.fX,s.length),Y=E.substring(this.tp,E.length-u.length);
|
|
g8.t1(T.h3,this.tp,this.fX);g8.YN(T.h3,this.tp,Y);var b=this.Ez(this.mh,T),w=-1,X=Array.from(Y);for(var f=0;
|
|
f<X.length;f++)w=Math.max(w,X[f].codePointAt(0));if(w!=-1&&w>128&&b.oH.Font!=null){var N=b.Nd[b.oH.Font].Name,z=this.mh.vv.Dl(w,N,b.Nd);
|
|
if(N!=z){g8.PL(b,z);a=!0}}if(this.Xr!=null&&Y==this.Xr){var i=JSON.parse(this.a5j);b.oH=i.oH;b.Nd=i.Nd;
|
|
a=!0}g8.zA(T.h3,this.tp,this.tp+Y.length-1,b);this.tp=this.fX=A.length+Y.length;var k=this.u4,Q=this.bj(k,this.mh,!0);
|
|
if(Q)this.mZ(k,!0);if(a)this.Ki()};D.mO.prototype.aj8=function($){if(this.f0==null||this.dC)return;if(this.f0==null)return;
|
|
var o=dN,T=0,s=0,k=!1;if(o.AL($.code,o.$D))T=1;if(o.AL($.code,o.jo))T=-1;if(o.AL($.code,o.du))s=-1;if(o.AL($.code,o.ZQ))s=1;
|
|
var E=$.ctrlKey||$.metaKey,e=o.AL($.code,dN.aev),n=o.AL($.code,dN.ajc);if(o.AL($.code,dN.FT)&&E){this.ap(this.u4,this.caller);
|
|
return}if(o.AL($.code,dN.E0)){$.preventDefault();var A=this.M7,u=A.value,Y=A.selectionStart,b=A.selectionEnd;
|
|
A.value=u.substring(0,Y)+"\t"+u.substring(b);A.selectionStart=A.selectionEnd=Y+1;this.l9(null);return}if((o.AL($.code,o.Wd)||o.AL($.code,o.Ib))&&E){var a=this.tp,w=this.fX;
|
|
if(a>w){var X=a;a=w;w=X}var N=this.f0.add.TySh,z=g8.m5(N.h3);if(a!=w){this.Xr=z.slice(a,w);this.a5j=JSON.stringify(this.mh.IT)}}var i=g8.m5(this.f0.add.TySh.h3);
|
|
if(T!=0||s!=0||e||n){$.preventDefault();var Q=this.tp;if(T!=0){if(E&&T==-1)Q=this.nR(i,this.tp-1);else if(E&&T==1)Q=this.nZ(i,this.tp);
|
|
else{var A=this.M7,u=A.value;Q=this.tp+T;if(Q!=0&&u.codePointAt(Q-1)>65535)Q+=T}}else if(s!=0){var O=this.dP.UH(this.tp);
|
|
if(s==-1&&O._U==0)Q=0;else if(s==1&&O._U==this.dP.acy()-1)Q=99999999999;else Q=this.dP.Gb(new aY(O.uL.x+O.uL.d/2,0),O._U+s)}else if(e){var c=this.tp-1;
|
|
while(c>0&&i.charCodeAt(c)!=10)c--;Q=c==0?0:c+1}else if(n){var c=this.tp;while(c<i.length-1&&i.charCodeAt(c)!=10)c++;
|
|
Q=c}Q=Math.max(0,Math.min(i.length-1,Q));if($.shiftKey)this.tp=Q;else this.tp=this.fX=Q;k=!0}if(o.AL($.code,dN.V)&&E){this.tp=0;
|
|
this.fX=i.length-1;k=!0}if(k){this.Ki();this.mZ(this.u4)}};D.mO.adj=function($,o){var T=$.length;if(T!=o.length)return!1;
|
|
for(var f=0;f<T;f++)if($[f]._m!=o[f]._m)return!1;return!0};D.mO.prototype.ap=function($,o){if(this.f0==null)return;
|
|
this.f0.mm();var T=this.r$;if(T instanceof Array){var s=this.NL($,this.lc),E=$.OY();if(E!=null&&E.U==this&&E.data.X_&&D.mO.adj(E.data.X_,T))E.data.PU=s;
|
|
else{var e=new dt(this.name,this);e.data={X_:T,PU:s};$.g4(e)}}else{var e=new dt(this.name,this);e.data={rd:T.rd,c_:T.c_,I9:T.I9,a3:T.a3};
|
|
$.g4(e)}this.escape($,o)};D.mO.prototype.zl=function($,o){if(this.f0==null)return;if(this.r$ instanceof Array){this.Mb($,this.r$);
|
|
if(this.f0)g8.mg(this.f0.add.TySh)}else{$.D=this.r$.I9;$.qp(this.r$.rd)}$.T();this.escape($,o)};D.mO.prototype.escape=function($,o){this.f0=null;
|
|
this.lc=null;this.dP=null;this.Id=null;this.M7.blur();$.n.JU=null;$.n.oA=null;$.n.EJ=[];$.Cd=!0;this.sb=!1;
|
|
this.ij=!1;this.tp=this.fX=-1;this.lz(o,H.E.Q,{e:H.V.Hh,U:this.id,PF:"hideactive"});if(this.Q8){var T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.s9,U:this.Q8};o.J(T);this.Q8=null}};D.mO.prototype.lz=function($,o,T,s){var E=new x(o,!0);
|
|
E.data=T;if(s)E.U=s;$.J(E)};D.mO.prototype.Hm=function($){var o=this.f0.add.TySh,T=this.dP,s=o.t.clone();
|
|
s.lY();var E=s.bb($),e=g8.rX(o,T),n=L.Rt.wW(o.Ah,e),A=L.ha.aaB(n,E);if(A==null)A=new Float64Array(2);
|
|
E=new aY(e.x+A[0]*e.d,e.y+A[1]*e.w);if(T.tV){var u=T.tV.clone();u.lY();E=u.bb(E)}var Y=T.Gb(E);return Y};
|
|
D.mO.prototype.mZ=function($,o){if(o==null)o=!1;var T=this.f0.add.TySh,s=g8.tb(T.h3),E=this.dP,e=E?g8.rX(T,E):null;
|
|
$.n.EJ=[];$.n.JU=null;$.n.oA=null;var n=this.AR?this.AR:this.Id;if(n){n.cD($,this.mh,!L.Rt.nP(T.Ah));
|
|
var A=T.t.clone();A.lY();if(E&&E.tV&&E.tU==1){var u=E.tV.clone();u.lY();A.concat(u)}L.M.t($.n.EJ,A,$.n.EJ);
|
|
L.M.t($.n.JU.I,A,$.n.JU.I);if(E&&E.tV==null&&E.ach()){var Y=e.d-20,b=e.w+8;$.n.JU.I.push(Y,b,Y+10,b,Y+5,b-5,Y+5,b+5);
|
|
$.n.JU.o.push("M","L","M","L")}}else if(s==0)this.afs($,T,E);else $.n.JU={I:[],o:[]};var a=Math.min(this.tp,this.fX),w=Math.max(this.tp,this.fX);
|
|
if(!o){this.M7.selectionStart=a;this.M7.selectionEnd=w}if(E!=null){var X=function(n,c){var B=n.x,G=n.y+n.w,l=new fY;
|
|
l.translate(-B,-G);l.rotate(-c);l.translate(B,G);n.y+=n.w*.27;var O=L.M.Uo(n);L.M.t(O.I,l,O.I);return O};
|
|
if(a==w){a=Math.max(a,0);var N=E.UH(a);if(N){var z=N.uL,i=this.mh.IT.oH.FontSize;if(i!=null&&i!=0){i/=T.t.jZ();
|
|
z.y+=z.w-i;z.w=i}var k=E.alg(a);if(k!=null&&k.ow==1)z.x+=z.d;var Q=X(z,N.VN).I;$.n.JU.o.push("M","L");
|
|
$.n.JU.I.push(Q[0],Q[1],Q[6],Q[7])}}else{$.n.oA={I:[],o:[]};for(var f=a;f<w;f++){var N=E.UH(f),O=X(N.uL,N.VN);
|
|
L.M.concat($.n.oA,O)}}}$.n.JU=hA.YF($.n.JU,T,E);$.n.oA=hA.YF($.n.oA,T,E);$.n.EJ=hA.YF({I:$.n.EJ},T,E).I;
|
|
$.Cd=!0};D.mO.prototype.afs=function($,o,T){if(T==null)return;$.n.EJ.push(0,0);if($.n.JU==null)$.n.JU={o:[],I:[]};
|
|
for(var f=0;f<T.CL.length;f++){var s=T.CL[f];for(var E=0;E<s.xv.length;E++){var e=s.xv[E],n=s.tP.x+e.tP.x+e.uL.x,A=s.tP.y+e.tP.y+e.uL.y+e.uL.w;
|
|
$.n.JU.o.push("M","L");$.n.JU.I.push(n,A,n+e.uL.d,A)}}$.Cd=!0};D.CX=function(){D.mO.call(this,!0)};D.CX.prototype=new D.mO;
|
|
D.U9=function(){D.NK.call(this,[10,9],D.W8,"tools/lasso");this.Mf="crosshair";this.SF=null;this.EN=null;
|
|
this.d_=null};D.U9.prototype=new D.NK;D.U9.prototype.gO=function($,o,T,s){this.SF=this.GP;this.EN={I:[this.SF.x,this.SF.y],o:["M"]}};
|
|
D.U9.prototype.$d=function($,o,T,s){this.d_=s;var E=this.EN;if(E==null)return;if(!s.jw){if(this.EN!=null&&this.$h>1&&T.L(dN.BJ)){E.I.pop();
|
|
E.I.pop();E.I.push(this.dF.x,this.dF.y);$.n.JU=E;$.Cd=!0}return}E.o.push("L");E.I.push(this.dF.x,this.dF.y);
|
|
this.SF=this.dF;if(this.E$){$.n.JU=E;$.Cd=!0}};D.U9.prototype.xQ=function(){return this.EN!=null};D.U9.prototype.hA=function(){return this.EN!=null};
|
|
D.U9.prototype.Vb=function($,o,T,s){D.NK.prototype.Vb.call(this,$,o,T,s);if(this.EN&&this.$h>1&&this.d_&&!this.d_.jw&&!s.L(dN.BJ))this.N8($,T,s)};
|
|
D.U9.prototype.uZ=function($,o,T,s){this.d_=s;var E=this.EN;if(E==null)return;if(this.$h>1&&T.L(dN.BJ)){E.o.push("L");
|
|
E.I.push(this.dF.x,this.dF.y);return}this.N8($,o,T)};D.U9.prototype.N8=function($,o,T){this.finish($,o,T,this.d_);
|
|
this.EN=null;$.n.JU=null;$.Cd=!0};D.U9.prototype.getSelection=function($,o,T,s){if(this.GP.R1(this.dF)||!this.E$)return null;
|
|
return D.NK.cq(this.EN.I,null,this.Ne.anta)};D.aD=function(){D.wB.call(this,[10,11],D.ih,"tools/move");
|
|
this.$K=new aY(0,0);this.vX=new aY(0,0);this.Cj=null;this.bW=null;this.VV=new aY(0,0);this.BB=null;this.GH=null;
|
|
this.YO=null;this.iA=0;this.Cg=null;this.Il=[];this.fT=null;this.zq=!1;this.e=0;this.$r=null;this.W0=null;
|
|
this.Si=null;this.gy=!1;this.Em={h8:!1,Ff:!1,Z_:!1};this.a7P=!1;this.akj=!1;this.Id=null;this.UZ=null;
|
|
this.adq=null;var $=[];for(var f=0;f<L.BG.od.length;f++)$.push({name:L.BG.od[f],b:function(o,T,s){return{sI:T.wK.Z2==s}}});
|
|
this.Pu=new eb($);this.Pu.B("select",this.jS,this)};D.aD.prototype=new D.wB;D.wB.prototype.ut=function($){return this.zq&&this.e!=2};
|
|
D.aD.prototype.ht=function(){return this.zq&&this.e==0};D.aD.prototype.nM=function($,o,T,s){this.yT($,-this.VV.x,-this.VV.y);
|
|
this.VV.A5(0,0);this.QP($,null,T);this.GT($)};D.aD.prototype.zp=function(){var $=this.Em;return[$.h8?1:0,$.Ff?1:0,$.Z_?1:0]};
|
|
D.aD.prototype.GO=function($,o,T){var s=this.Em;if($&&$[0]!=null)s.h8=$[0]==1;if($&&$[1]!=null)s.Ff=$[1]==1;
|
|
if($&&$[2]!=null)s.Z_=$[2]==1;var E=new x(H.E.Q,!0);E.data={e:H.V.Hh,U:this.id,Ne:s,aaa:o};T.J(E)};D.aD.cP=function($,o,T,s,E,e,n){if(n==null)n=[!1,!0];
|
|
var A=new df(0,0,$.d,$.w),u=$.v1(null,E,!0),Y=$.Yq(u,n[0]?A:null,n[1]?null:A)[0];for(var f=0;f<Y.u.length;
|
|
f++)delete Y.u[f].add.artb;delete Y.add.artd;if(n[1]){var b=L.UI(Y.aw(),new df(0,0,Y.d,Y.w),2);D.LY.Mo(Y,b)}if(T!=1){var a=new df(0,0,Math.round(Y.d*T),Math.round(Y.w*T));
|
|
D.LY.Mo(Y,a);var w=[];for(var f=0;f<Y.u.length;f++)w.push(f);var X=D.p.cG(Y,w,!0);D.LY.RO(Y,new fY(T,0,0,T,0,0));
|
|
D.p.ja(Y,s,w,X,1,L.$.KQ(new fY(T,0,0,T,0,0)),null,!0);Y.ir()}var N=[];for(var f=0;f<o.length;f++)if(Y.d*Y.w!=0)N.push(eY.GU(Y,o[f].toUpperCase(),null,null,e?e[f]:null,s));
|
|
return N};D.aD.prototype.lQ=function($,o,T,s,E){if($==null||$.D.length==0)return;var e=D.aD.cP($,[o],T,s,null)[0],n=new x(H.E.Q,!0);
|
|
n.data={e:H.V.QD,data:e,name:$.u[$.D[0]].getName()+(T==1?"":"@"+T+"x")+"."+o};E.J(n)};D.aD.prototype.UR=function($,o,T,s,E){if($.f8=="getPNG"){this.lQ(T,"png",$.sQ,E,o)}else if($.f8=="getSVG"){this.lQ(T,"svg",$.sQ,E,o)}if($.f8=="prms"){this.Em=$;
|
|
this.GT(T)}};D.aD.a3P=function($){var J=$.length,T=0;$.sort(function(e,n){return e[0]+e[1]/2-(n[0]+n[1]/2)});
|
|
var o=$[J-1][0]+$[J-1][1]-$[0][0];for(var f=0;f<J;f++)T+=$[f][1];var s=Math.round((o-T)/(J-1)),E=$[0][0];
|
|
for(var f=0;f<J;f++){$[f][0]=E;E+=$[f][1]+s}};D.aD.prototype.A2=function($,o,T,s,E){var e=$.e;if(e=="trsl"){var n=Math.round($.a76),A=Math.round($.a3D);
|
|
this.VV.A5(n,A);this.eq(T,o,s,E,!1,$.c);this.yT(T,n,A);this.QP(T,null,E)}else if(e=="gids"||e=="gidsFromLayer"){var u=$.W0,Y,b;
|
|
if(u==null)u=T.hm();if(e=="gids"){Y=$.Mj;var a=u[0].length,w=Y[0].length;b=a==w?[23,2]:a>w?[23,3]:[23,4];
|
|
if(w==0)b=[11,15,0]}else if(e=="gidsFromLayer"){var X=[],N=[],z=T.Q2();for(var f=0;f<T.D.length;f++){var i=T.u[T.D[f]].rect;
|
|
if(i.p4())continue;X.push([0,i.x],[1,i.y],[0,i.x+i.d],[1,i.y+i.w]);N.push(z,z,z,z)}b=[11,15,1];Y=T.hm();
|
|
D.aD.P$(Y,[X,N])}if(JSON.stringify(u)==JSON.stringify(Y))return;var e=new dt(b,this);e.data={e:2,W0:u,Mj:Y};
|
|
T.g4(e);this.wx(e.data,T)}else if(e=="algn"){var k=$.H;if(T==null)return;if(T.D.length<2&&!(T.Z!=null&&k!=3&&k!=7)){alert(aX.get([15,7,5]));
|
|
return}var Q=T.Z;T.Z=null;var i=Q?Q.rect:D.p.rX(T);this.eq(T,o,s,E,!1);if(!this.zq)return;var O=this.Cg,c={},B=[],G=[],l=[];
|
|
for(var f=0;f<O.length;f++){var v=O[f];while(T.u[v].getName()=="</Layer group>")v++;var p=T.root.BA(v),P=p;
|
|
while(p.parent!=null){p=p.parent;if(O.indexOf(p.index)!=-1)P=p}var h=G.indexOf(P.index);if(h==-1){h=G.length;
|
|
G.push(P.index)}B[f]=h}var j=[],C=[],V=[];for(var f=0;f<G.length;f++){var d=D.p.rX(T,T.v1(!0,G[f]));
|
|
V.push(d);var m=k==3?[d.y,d.w]:[d.x,d.d];j[f]=m;C.push(m)}D.aD.a3P(C);for(var f=0;f<G.length;f++){var d=V[f],R=d.x,g=d.y;
|
|
if(k==0)R=i.x;if(k==1)R=i.x+(i.d-d.d)/2;if(k==2)R=i.x+(i.d-d.d);if(k==3)g=j[f][0];if(k==4)g=i.y;if(k==5)g=i.y+(i.w-d.w)/2;
|
|
if(k==6)g=i.y+(i.w-d.w);if(k==7)R=j[f][0];l.push(Math.round(R-d.x),Math.round(g-d.y))}var S=[];for(var f=0;
|
|
f<O.length;f++){var F=B[f];S[2*f]=l[2*F];S[2*f+1]=l[2*F+1]}this.yT(T,0,0,null,S);var r=k==3||k==7?[20,4,6]:[20,4,k<3?k:k-1];
|
|
this.QP(T,null,E,S,r);T.Z=Q}else if(e=="disabAuto"){this.GO([!1],null,o)}};D.aD.P$=function($,o){for(var f=0;
|
|
f<o[0].length;f++){var T=o[0][f],s=o[1][f],E=!1;for(var e=0;e<$[0].length;e++){var n=$[0][e],A=$[1][e];
|
|
if(T[0]==n[0]&&T[1]==n[1]&&s==A)E=!0}if(!E){$[0].push(T.slice(0));$[1].push(s)}}};D.aD.prototype.enable=function($,o,T,s,E){this.GH=T;
|
|
this.YO=o;this.gy=E?!0:!1;this.GT($);this.Rb("default",o)};D.aD.prototype.disable=function($,o,T,s){this.yA($)};
|
|
D.aD.prototype.yA=function($){if($==null)return;if(this.Id){this.Id.clear($);this.Id=null}if($.n.Z_){$.n.Z_=null;
|
|
$.Cd=!0}if($.n.BD){$.n.BD=null;$.Cd=!0}if($.n.Qw[this.id]){delete $.n.Qw[this.id];$.Cd=!0}if($.n.bt.length!=0){$.n.bt=[];
|
|
$.Cd=!0}};D.aD.prototype.nv=function($,o,T,s){if(T.D3!=this.id)return;this.GT($)};D.aD.prototype.GT=function($,o){if($==null)return;
|
|
var T=this.Em;this.yA($);if(!this.gy){var s;if(T.Ff||T.Z_)s=L.M.lZ(D.p.rX($));if(T.Ff&&!s.p4()){this.Id=new dY([s.x,s.y,s.x+s.d,s.y,s.x+s.d,s.y+s.w,s.x,s.y+s.w],!0);
|
|
this.Id.cD($,this.GH)}if(T.Z_){var E=null,b=null,a=!1;if($.Q2()!=-1)E=$.u[$.Q2()].co();else E=new df(0,0,$.d,$.w);
|
|
$.n.Z_={Tw:[s],$M:[]};var e=$.n.Z_.$M,n=s.x+s.d,A=s.y+s.w,u=s.x+Math.floor(s.d/2),Y=s.y+Math.floor(s.w/2);
|
|
if(o){var w=$.root.cM(new aY(Math.floor(o.x),Math.floor(o.y)));if(w){b=L.M.lZ(w.c.TC($));if(b.Ha(s)){a=(b.Yg(s)||s.Yg(b))&&!s.R1(b);
|
|
if(!a)b=null}}}this.qd(s,e);if(b!=null){$.n.Z_.Tw.push(b);var X=b.x+b.d,N=b.y+b.w,z=b.x+Math.floor(b.d/2),i=b.y+Math.floor(b.w/2);
|
|
if(a){var k=u,Q=Y;if(s.Yg(b)){k=z;Q=i}e.push(s.x,Q,b.x,Q);e.push(n,Q,X,Q);e.push(k,s.y,k,b.y);e.push(k,A,k,N)}else{this.qd(b,e);
|
|
var O=A<b.y||N<s.y,c=n<b.x||X<s.x;if(n<b.x)e.push(n,Y,b.x,Y);if(X<s.x)e.push(X,Y,s.x,Y);if(A<b.y)e.push(u,A,u,b.y);
|
|
if(N<s.y)e.push(u,N,u,s.y);if(O&&!c){if(s.x<b.x)e.push(s.x,i,b.x,i);if(b.x<s.x)e.push(b.x,Y,s.x,Y)}}}else{if(s.y>E.y)e.push(u,E.y,u,s.y);
|
|
if(A<E.y+E.w)e.push(u,A,u,E.y+E.w);if(s.x>E.x)e.push(E.x,Y,s.x,Y);if(n<E.x+E.d)e.push(n,Y,E.x+E.d,Y)}$.Cd=!0}}if(this.e==2&&this.zq){var B=$.yZ[this.Cg],G=B[0],l=(G==0?"X":"Y")+": "+L.BG.at(B[1],$.fG,this.GH,G==0?$.d:$.w,!0);
|
|
D.wB.XX(Math.round(this.Cj.x)+10,Math.round(this.Cj.y)-10,[l],$);$.Cd=!0}if(this.e==3&&this.zq){var v=L.M.Uo(this.$r);
|
|
$.n.Qw[this.id]={JU:v};$.Cd=!0}};D.aD.prototype.qd=function($,o){var T=$.d,s=$.w,E=$.x+Math.floor(T*.2),e=$.y+Math.floor(s*.2);
|
|
o.push(E,$.y,E,$.y+s);o.push($.x,e,$.x+T,e)};D.aD.prototype.Rb=function($,o){var T={e:H.V.bl,j$:$},s=new x(H.E.Q,!0);
|
|
s.data=T;o.J(s)};D.aD.prototype.I3=function($){var o=this.UZ.X1()[0],T=this.BB,s=this.adq[o];this.z2(T,s)};
|
|
D.aD.prototype.jS=function($){var o=JSON.parse(JSON.stringify(this.GH.wK));o.Z2=this.Pu.X1()[0];var T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.uY,M9:gr.Nf,mI:o};this.YO.J(T)};D.aD.prototype.oW=function($,o,T,s,E){if(this.zq)this.yg($,o,T,s,E);
|
|
this.BB=$;this.GH=T;this.YO=o;var e=$.C.VD(E.x,E.y),n;if(D.aD.eY(T,E,$.C)){n=this.Pu}else{if(this.UZ)this.UZ.removeEventListener("select",this.I3);
|
|
var A=[];$.root.cM(e,A);if(A.length==0)return;var u=[];this.adq=A;for(var f=0;f<A.length;f++)u.push({name:$.u[A[f]].getName()});
|
|
n=this.UZ=new eb(u);n.B("select",this.I3,this)}n.parent=o;n.f();n.update($,T);var Y=new x(H.E.Q,!0);
|
|
Y.data={e:H.V.NM,bF:n,x:E.uT+2,y:E.$T+1};o.J(Y)};D.aD.prototype.Fc=function($,o,T,s,E){return D.aD.eY(T,E,$.C)};
|
|
D.aD.prototype.iO=function($,o,T,s,E){this.Cj=E;this.$K.A5(E.x,E.y);this.vX=$.C.VD(E.x,E.y);this.bW=new ds(this.vX);
|
|
this.eq($,o,s,T,!0)};D.aD.eY=function($,o,T,s){var E=L.BG.M5,e=T.Vi.w;return $.KC&&(0<o.x&&o.x<E||0<o.y&&o.y<E||s&&0<o.x&&o.x<4*E&&e-E<o.y&&o.y<e)};
|
|
D.aD.prototype.eq=function($,o,T,s,E,e){var n,A=this.vX,u=!1;if(E){var Y=s.Ok&&s.wK.yZ;if(D.aD.eY(s,this.$K,$.C)){n=$.hm();
|
|
var b=$.hm(),a=null;if(this.$K.x<L.BG.M5){a=[0,A.x]}if(this.$K.y<L.BG.M5){a=[1,A.y]}b[0].push(a);b[1].push($.Q2());
|
|
$.W$(b);if(!Y){var w=new x(H.E.Q);if(!s.wK.yZ){w.data={e:H.V.uY,M9:gr.qG};o.J(w)}if(!s.Ok){w.data={e:H.V.uY,M9:gr.PA};
|
|
o.J(w)}Y=!0}}var X=this.k3($,A);if(Y&&X!=null){this.e=2;this.W0=n?n:$.hm();this.Cg=X;this.zq=!0;this.fT=D.p.rX($);
|
|
return}if($.el.length!=0){this.e=4;this.fT=$.iy[$.el[0]].rect.clone();this.zq=!0;return}if(this.Id&&this.Id.KX(A,$.C.X,!0)!=null){var w=new x(H.E.Q);
|
|
w.data={e:H.V.s9,U:D.tj,a1H:!0};o.J(w);return}if($.Z&&$.Z.rect.dv(A)){var N=Math.round(A.x),z=Math.round(A.y),i=$.Z.rect;
|
|
u=$.Z.channel[(z-i.y)*i.d+N-i.x]>128}if(!u&&(!this.gy&&this.Em.h8||this.gy&&this.Em.h8&&(T.L(dN.Et)||$.D.length<2))){var k=this.ae0($,A,T);
|
|
if(!k){$.D=[];$.T7=null;$.sr=$.OW=!0;this.e=3;this.$r=new df;this.zq=!0;return}}if(T.L(dN.BJ)&&!u){var Q=new x(H.E.N);
|
|
Q.U=D.Jc;Q.data={e:M.NO,a46:!0};o.J(Q)}}if($.el.length!=0){this.e=4;this.fT=$.iy[$.el[0]].rect.clone();
|
|
this.zq=!0;return}this.Cg=$.v1(e==null,e,null,!0);for(var f=0;f<this.Cg.length;f++){var O=$.u[this.Cg[f]];
|
|
if(O.iQ(2)||O.iQ(31)){alert(aX.get([6,57,0]));return}}this.Il=D.aD.a9N($,this.Cg);this.e=0;if($.Z&&(!E||u)&&$.D.length==1&&$.Jt(!1)){if(!$.Sq()){this.zq=!1;
|
|
return}var c=$.u[$.D[0]],B=T.L(dN.BJ);this.e=1;var G=$.history[$.Q5];if(G.U==this&&G.data.e==1&&G.data.c==$.D[0]&&c.dQ==c._I.dQ&&!B){this.Si=G}else{var l=c._I,v=!1,p;
|
|
if(!c.jx($,$.Z)||B){v=!0;c.Yd($,$.Z,B)}if(c._I.dQ<=0){p=L.G(c._I.YS.length>>2);L.Ge(c._I.YS,p,3)}else p=$.Z.channel.slice(0);
|
|
var P={rect:c._I._9.clone(),channel:p};this.Si=new dt(B?[12,53]:[12,54],this);this.Si.data={e:1,c:$.D[0],_I:c._I,k2:l,yI:v,I9:$.Z,a3:P,Um:new aY(0,0)};
|
|
$.g4(this.Si);$.Z=P;$.L5=!0}}this.zq=!0;this.fT=D.p.rX($)};D.aD.prototype.ae0=function($,o,T){var s=$.root.cM(new aY(Math.floor(o.x),Math.floor(o.y)));
|
|
if(s){if(s.c.add.vmsk)$.Cd=!0;var E=$.u.indexOf(s.c);if(T.L(dN.Et)){var e=$.D.indexOf(E);if(e==-1)$.D.push(E);
|
|
else if($.D.length>1)$.D.splice(e,1)}else if($.D.indexOf(E)==-1){this.z2($,E)}}return s!=null};D.aD.prototype.z2=function($,o){$.u[o].dQ=0;
|
|
$.D=[o];$.T7=null;$.L4();$.SK=!0;$.sr=!0};D.aD.prototype.ZS=function($,o,T,s,E){this.Cj=E;var e=$.C.VD(E.x,E.y),w,X;
|
|
if(this.bW&&this.e<2)e=this.bW.$Z(e,s);if(!this.zq){if(T.Ok&&T.wK.yZ){var n=this.k3($,e),A="default";
|
|
if(n!=null)A=["col-resize","row-resize"][$.yZ[n][0]];else if(this.Id){var u=this.Id.KX(e,$.C.X);if(u)A=u}this.Rb(A,o)}this.GT($,e);
|
|
return}var Y=this.vX,b=Math.round(e.x-Y.x)-this.VV.x,a=Math.round(e.y-Y.y)-this.VV.y;if(this.fT){if(this.e==2){e=D.aD.yu($,e,T,[!1,$.Z?$.Z.rect:this.fT,!0])}else{X=this.fT.clone();
|
|
X.offset(this.VV.x+b,this.VV.y+a);w=D.aD.nI($,X,T);b+=Math.round(w[0]);a+=Math.round(w[1])}}this.VV.x+=b;
|
|
this.VV.y+=a;this.yT($,b,a,e,null,s.L(dN.Et));this.GT($,e);if(w)D.aD.Fv($,X,w)};D.aD.prototype.k3=function($,o){o=[o.x,o.y];
|
|
var T=$.hm(),s=$.Q2();for(var f=0;f<T[0].length;f++){var E=T[0][f],e=T[1][f];if(e!=-1&&e!=s)continue;
|
|
if(Math.abs(E[1]-o[E[0]])*$.C.X<4)return f}return null};D.aD.prototype.yT=function($,o,T,s,E,e){if(this.e==0){if(E)D.aD.uM($,this.Cg,this.Il,E);
|
|
else D.aD.FY($,this.Cg,this.Il,o,T)}else if(this.e==1){var n=this.Si.data;n.Um.offset(o,T);D.aD.vH($,n.c,o,T)}else if(this.e==2){var A=1e-5;
|
|
if(e)A=$.C.X<=1?10:1;else if($.C.X<=1)A=1;var u=A*Math.round(s.x/A),Y=A*Math.round(s.y/A),b=[u,Y],a=$.yZ[this.Cg];
|
|
a[1]=b[a[0]]}else if(this.e==3){var w=this.vX,X=L.M.$l([w.x,w.y,s.x,s.y]);this.$r=X;var N=[];$.root.Of(X,N);
|
|
if(JSON.stringify($.D)!=JSON.stringify(N)){$.D=N;$.sr=$.OW=!0}}else if(this.e==4){for(var f=0;f<$.el.length;
|
|
f++)$.iy[$.el[f]].rect.offset(o,T);$.Cd=!0}};D.aD.vH=function($,o,T,s){var E=$.u[o];$.Z.rect.offset(T,s);
|
|
E.Rq($,T,s,$.Z);$.L5=!0;$.T()};D.aD.prototype.yg=function($,o,T,s,E){this.QP($,E,T);this.GT($);if(Date.now()-this.iA<300){var e=D.mO.Bs($,$.C.VD(E.x,E.y));
|
|
if(e>=0){var n=new x(H.E.N,!0);n.U=D.ko;n.data={e:"editCurr",Yc:e};o.J(n)}else if(D.aD.eY(T,E,$.C,!0)){var A=new x(H.E.Q);
|
|
if(E.y>$.C.Vi.w-20){A.data={e:H.V.NC,a_:"doczoom",C5:$.C.X*100,Bo:{F:H.E.N,U:D.S3,r:{e:"pzoom"}}}}else{A.data={e:H.V.NC,a_:"preferences"}}o.J(A)}}this.iA=Date.now();
|
|
D.LY.lN($)};D.aD.prototype.QP=function($,o,T,s,E){if(!this.zq)return;this.zq=!1;if(this.e==0){if(s){this.GY($,null,s,E)}else{if(this.VV.x==0&&this.VV.y==0)return;
|
|
this.GY($,this.VV.clone())}$.RZ=!0}else if(this.e==2){var e=0;o=[o.x,o.y];var n=this.Cg,A=$.yZ[n],bo=this.W0[0].length,u=$.yZ.length;
|
|
if(T.KC&&o[A[0]]<L.BG.M5){var Y=$.hm();Y[0].splice(n,1);Y[1].splice(n,1);$.W$(Y);e=1;if(bo==u-1)return}if(bo<u)e=2;
|
|
var b=new dt([[23,2],[23,3],[23,4]][e],this);b.data={e:2,W0:this.W0,Mj:$.hm()};$.g4(b)}else if(this.e==4){var b=new dt([12,54],this);
|
|
b.data={e:4,D:$.el.slice(0),l:this.VV.clone()};$.g4(b)}this.VV.A5(0,0)};D.aD.prototype.Vb=function($,o,T,s){var E=s.cu();
|
|
if($!=null&&(E.x!=0||E.y!=0)){if(s.L(dN.BJ)&&$.Z==null){var e=new x(H.E.N);e.U=D.Jc;e.data={e:M.NO,a46:!0};
|
|
o.J(e)}this.VV.A5(E.x,E.y);this.eq($,o,s,T,!1);if(!this.zq)return;this.yT($,E.x,E.y);this.QP($,null,T);
|
|
this.GT($)}var n=s.L(dN.I6);if(!this.gy&&this.akj!=n){if(n){this.a7P=this.Em.h8;this.Em.h8=!0}else{this.Em.h8=this.a7P}this.akj=n;
|
|
var A=new x(H.E.Q,!0);A.data={e:H.V.Hh,U:this.id,Ne:this.Em};o.J(A)}};D.aD.prototype.OK=function($,o){if($.e==0){D.aD.uM(o,$.D,$.I4,$.gV,!0);
|
|
D.LY.lN(o)}else if($.e==2){o.W$($.W0);o.Cd=!0}else if($.e==4){for(var f=0;f<$.D.length;f++)o.iy[$.D[f]].rect.offset(-$.l.x,-$.l.y);
|
|
o.Cd=!0}else{var T=o.u[$.c];if($.yI){T.qf(o,$.k2);o.Z=$.I9;o.L5=!0;o.T();T.T()}else{D.aD.vH(o,$.c,-$.Um.x,-$.Um.y)}}};
|
|
D.aD.prototype.wx=function($,o){if($.e==0){D.aD.uM(o,$.D,$.I4,$.gV);D.LY.lN(o)}else if($.e==2){o.W$($.Mj);
|
|
o.Cd=!0}else if($.e==4){for(var f=0;f<$.D.length;f++)o.iy[$.D[f]].rect.offset($.l.x,$.l.y);o.Cd=!0}else{var T=o.u[$.c];
|
|
if($.yI){T._I=$._I;o.Z=$.a3;D.aD.vH(o,$.c,0,0);T.T()}else{D.aD.vH(o,$.c,$.Um.x,$.Um.y)}}};D.aD.prototype.GY=function($,o,T,s){if(T){var E=!0;
|
|
for(var f=0;f<T.length;f++)if(T[f]!=0)E=!1;if(E)return}var e=$.history[$.Q5];if(e.data&&e.U==this&&e.data.e==0&&T==null&&JSON.stringify(e.data.D)==JSON.stringify(this.Cg)&&JSON.stringify(e.data.I4)==JSON.stringify(this.Il)){var n=e.data.gV,A=e.data.ag_.bI.T.v;
|
|
A.Hrzn.v.val+=o.x;A.Vrtc.v.val+=o.y;for(var f=0;f<n.length;f+=2){n[f]+=o.x;n[f+1]+=o.y}}else{if(o==null)o=new aY(T[0],T[1]);
|
|
var u={Wk:"move",bI:{classID:"null",null:aj.D4("Lyr",!0),T:{t:"Objc",v:{classID:"Ofst",Hrzn:{t:"UntF",v:{type:"#Rlt",val:o.x}},Vrtc:{t:"UntF",v:{type:"#Rlt",val:o.y}}}}}},Y=new dt(s?s:[12,54],this);
|
|
if(T)Y.data={e:0,D:this.Cg,I4:this.Il,gV:T};else Y.data={e:0,D:this.Cg,I4:this.Il,gV:D.aD.IL(this.Cg,o.x,o.y)};
|
|
Y.data.ag_=u;$.g4(Y);this.track(u)}};D.aD.IL=function($,o,T){var s=[];for(var f=0;f<$.length;f++)s.push(o,T);
|
|
return s};D.aD.FY=function($,o,T,s,E){D.aD.uM($,o,T,D.aD.IL(o,s,E))};D.aD.uM=function($,o,T,s,E){if(o.length==0)return;
|
|
if(T==null){T=[];for(var f=0;f<o.length;f++){T.push($.u[o[f]].Kj($,!0))}}var e=new df,n=new df(0,0,$.d,$.w);
|
|
for(var f=0;f<o.length;f++){var A=s[2*f],u=s[2*f+1];if(E){A=-A;u=-u}var Y=$.u[o[f]],b=T[f];if(Y.add.fxrp&&(b.indexOf(0)!=-1||Y.d5()))Y.add.fxrp.offset(A,u);
|
|
for(var a=0;a<b.length;a++){var w=b[a];if(w==0){Y.rect.offset(A,u);if(Y.HC()&&Y.DE($))Y.DE($).rect.offset(A,u);
|
|
if(Y.add.artb){var X=Y.co();X.offset(A,u);Y.y2(X);var N=Y.add.artb.guideIndeces;N=N?N.v:[];for(var z=0;
|
|
z<N.length;z++){var i=$.yZ[N[z].v];i[1]+=i[0]==0?A:u}}if(Y.add.TySh){Y.add.TySh.t.translate(A,u);if(Y.add.TySh.add){Y.add.TySh.add.vmsk.offset(A,u)}}if(Y.add.SoLd){var k=new fY(1,0,0,1,A,u),Q=Y.add.SoLd,O=D.p.GQ(Q.Trnf),c=D.p.GQ(Q.nonAffineTransform);
|
|
L.M.t(O,k,O);L.M.t(c,k,c);Q.Trnf=D.p.vP(O);Q.nonAffineTransform=D.p.vP(c);D.p.dj(Q,k)}}if(w==1)Y.yy().rect.offset(A,u);
|
|
if(w==2){Y.add.vmsk.offset(A,u);if(Y.add.vogk)L.qy.t(Y.add.vogk,[1,0,A,0,1,u,0,0],[])}if(w==3){Y.DE($)._.rect.offset(A,u);
|
|
if(b.length==1)Y.T()}}if(b.length>0){var B=Y.add.GdFl;if(B==null)B=Y.add.PtFl;if(Y.d5()&&!Y.P0()&&Y.add.vmsk!=null&&L.A.Z4(Y.add.vmsk.g)&&Y.add.vmsk.A7==255&&(B==null||B.Algn&&B.Algn.v)){Y.rect.offset(A,u)}else Y.tF($);
|
|
var G=$.root.gC(Y.TC($),$,o[f]);e=e.BZ(G);G.offset(-A,-u);e=e.BZ(G);if(Y.add.SoCo||Y.add.GdFl||Y.add.PtFl||dq.get(Y.add)!=null)e=e.BZ(n);
|
|
Y.r2()}}$.T(e)};D.aD.a9N=function($,o){var T=[];for(var f=0;f<o.length;f++){var s=$.u[o[f]];T.push(s.Kj($))}return T};
|
|
D.aD.Fv=function($,o,T){var s=$.n.BD={I:[],o:[]},E=o.x+T[0],e=o.y+T[1];if(T[2]!=1e9){s.o.push("M","L");
|
|
s.I.push(T[2],e,T[2],e+o.w)}if(T[3]!=1e9){s.o.push("M","L");s.I.push(E,T[3],E+o.d,T[3])}$.Cd=!0};D.aD.yu=function($,o,T,s){var E=D.aD.kK($,[[o.x],[o.y]],T,s);
|
|
return new aY(o.x+E[0],o.y+E[1])};D.aD.nI=function($,o,T,s,E){var e=E==!0?1:.5,n=D.aD.kK($,[[o.x,o.x+Math.round(o.d*e),o.x+o.d],[o.y,o.y+Math.round(o.w*e),o.y+o.w]],T,s);
|
|
return n};D.aD.kK=function($,o,T,s){if(s==null)s=[!0,null,!0];var E=[0,0,1e9,1e9];if(!T.ty)return E;
|
|
var e=JSON.parse(JSON.stringify(o));for(var n=0;n<2;n++){var A=1e9,u=o[n],Y=0;for(var b=0;b<u.length;
|
|
b++){var a=D.aD.aaR($,u[b],e[1-n][b],n,T,s);if(a!=1e9)e[n][b]=a;if(a!=1e9&&Math.abs(a-u[b])<Math.abs(A)){A=a-u[b];
|
|
Y=a}}if(A!=1e9){E[n]=A;E[n+2]=Y}}return E};D.aD.aaR=function($,o,T,s,E,e){var n=1e9,A=E.vM,u=E.wK,Y=[$.root];
|
|
while(Y.length!=0&&A[2]){var b=Y.pop(),a=b.c,w=a.rect;if(!a.N9())continue;if(b.children)for(var f=0;
|
|
f<b.children.length;f++)Y.push(b.children[f]);if($.D.indexOf(b.index)!=-1||w.p4())continue;if(s==0){var X=w.d,N=X>>>1;
|
|
if(Math.abs(w.x-o)<Math.abs(n-o))n=w.x;if(Math.abs(w.x+N-o)<Math.abs(n-o))n=w.x+N;if(Math.abs(w.x+X-o)<Math.abs(n-o))n=w.x+X}else{var z=w.w,i=z>>>1;
|
|
if(Math.abs(w.y-o)<Math.abs(n-o))n=w.y;if(Math.abs(w.y+i-o)<Math.abs(n-o))n=w.y+i;if(Math.abs(w.y+z-o)<Math.abs(n-o))n=w.y+z}}if(e[0]&&A[0]&&u.yZ&&E.Ok){var k=$.hm(),Q=k[0],O=k[1],c=$.Q2();
|
|
for(var f=0;f<Q.length;f++)if((O[f]==-1||O[f]==c)&&Q[f][0]==s&&Math.abs(Q[f][1]-o)<Math.abs(n-o))n=Q[f][1]}if(A[1]&&u.Bw&&E.Ok){var B=Math.round(L.BG.V9(u.zP,$.fG,$.d,u.EI));
|
|
if(s==1&&u.hN==1){var G=T*.5*Math.sqrt(4/3),l;B*=Math.sqrt(4/3);l=Math.round((o-G)/B)*B+G;if(Math.abs(l-o)<Math.abs(n-o))n=l;
|
|
l=Math.round((o+G)/B)*B-G;if(Math.abs(l-o)<Math.abs(n-o))n=l}else{var l=Math.round(o/B)*B;if(Math.abs(l-o)<Math.abs(n-o))n=l}}var v=$.op;
|
|
if(A[3]&&u.op&&E.Ok&&v.length!=0){for(var f=0;f<v.length;f++){if(!e[2]&&$.AQ.indexOf(f)!=-1)continue;
|
|
var p=D.j3.ee(v,f);for(var P=0;P<3;P+=2)if(p[P+s]!=o&&Math.abs(p[P+s]-o)<Math.abs(n-o))n=p[P+s]}}if(e[1]){var w=e[1],X=w.d,z=w.w,h=[w.x,w.y,w.x+(X>>>1),w.y+(z>>>1),w.x+X,w.y+z];
|
|
for(var f=0;f<6;f+=2)if(Math.abs(h[f+s]-o)<Math.abs(n-o))n=h[f+s]}if(A[4]){var X=$.d,z=$.w,h=[0,0,X>>>1,z>>>1,X,z];
|
|
for(var f=0;f<6;f+=2)if(Math.abs(h[f+s]-o)<Math.abs(n-o))n=h[f+s]}var j=Math.abs(n-o)<=4*H.K()/$.C.X?n:1e9;
|
|
return j};D.xn=function(){D.NK.call(this,[10,12],D.os,"tools/mwand")};D.xn.prototype=new D.NK;D.xn.prototype.zp=D.NK.prototype.ait;
|
|
D.xn.prototype.GO=D.NK.prototype.ar3;D.xn.prototype.gO=function($,o,T,s){this.finish($,o,T,s)};D.xn.prototype.getSelection=function($,o,T,s){var E=this.dF,e=D.NK.ahW(new aY(Math.floor(E.x),Math.floor(E.y)),this.Ne.wconf);
|
|
return e};D.xn.pH=function($,o,T){if($.D.length!=1){alert("More than one layer selected.");return null}var s=$.u[$.D[0]],E=s.dQ<=0?null:s.dQ==1?s.yy():s.DE($)._,e;
|
|
if(E==null&&s.add.lsct!=null&&s.add.lsct!=hd.d3){alert("No layer selected.");return null}if(o.x<0||o.x>$.d||o.y<0||o.y>$.w)return null;
|
|
var n=new df(0,0,$.d,$.w);if(E==null&&n.R1(s.rect))e=s.buffer;else{e=L.G(n.Y()*4);if(E==null)L.h9(s.buffer,s.rect,e,n);
|
|
else D.x5.PO(E.channel,E.rect,E.color,e,n)}var A=D.xn.nJ(e,n,o,null,T),u=L.ac(A,n),Y=L.G(u.Y());L.pg(A,n,Y,u);
|
|
return{rect:u,channel:Y}};D.xn.cV=function($,o,T){var s=o.d,E=o.w,n=0,A=0,u=0,Y=0;$=new Uint32Array($.buffer);
|
|
var e=[],b=T.length;for(var f=0;f<b;f++){var a=T[f],w=Math.round(a.x-.5-o.x),X=Math.round(a.y-.5-o.y);
|
|
w=Math.max(0,Math.min(s-1,w));X=Math.max(0,Math.min(E-1,X));var N=X*s+w,z=$[N];e.push([z&255,z>>8&255,z>>16&255,z>>>24])}return e};
|
|
D.xn.nJ=function($,o,T,s,E){$=new Uint32Array($.buffer);var e=o.d,n=o.w,A=e*n;if(s==null)s=D.xn.cV($,o,[T]);
|
|
var u=Math.round(T.x-.5-o.x),Y=Math.round(T.y-.5-o.y),b=Y*e+u,a=Date.now(),w=L.G(e*n),X=E[0],N=1/X,z=E[1]&&X>0?255:0;
|
|
if(E[2]){var i=L.G(w.length),k=new Uint32Array(A),Q=1;k[0]=u<<16|Y;i[b]=1;while(Q>0){var O=k[Q-1];Q--;
|
|
var c=O>>>16,B=O&65535,f=B*e+c,G=D.xn.lW($[f],s);if(G>X){var l=z*(1-Math.max(0,Math.min(1,(G-X)*N)));
|
|
w[f]=~~l}else{w[f]=255;if(B!=n-1&&i[f+e]==0){k[Q++]=c<<16|B+1;i[f+e]=1}if(B!=0&&i[f-e]==0){k[Q++]=c<<16|B-1;
|
|
i[f-e]=1}if(c!=e-1&&i[f+1]==0){k[Q++]=c+1<<16|B;i[f+1]=1}if(c!=0&&i[f-1]==0){k[Q++]=c-1<<16|B;i[f-1]=1}}}}else{for(var f=0;
|
|
f<A;f++){var G=D.xn.lW($[f],s);if(G<=X)w[f]=255}for(var B=0;B<n;B++)for(var c=0;c<e;c++){var f=B*e+c;
|
|
if(w[f]==0&&(c>0&&(w[f-1]==255||B>0&&w[f-e-1]==255||B<n-1&&w[f+e-1]==255)||c<e-1&&(w[f+1]==255||B>0&&w[f-e+1]==255||B<n-1&&w[f+e+1]==255)||B>0&&w[f-e]==255||B<n-1&&w[f+e]==255)){var G=D.xn.lW($[f],s),l=z*(1-Math.max(0,Math.min(1,(G-X)*N)));
|
|
w[f]=~~l}}}return w};D.xn.lW=function($,o){var T=o.length,s=D.xn.lO($,o[0]),f=1;while(f!=T){s=Math.min(s,D.xn.lO($,o[f]));
|
|
f++}return s};D.xn.lO=function($,o){var T=$&255,s=$>>>8&255,E=$>>>16&255,e=$>>>24&255;if(o[3]==0)return e<5?0:255;
|
|
var n=Math.max(Math.abs(T-o[0]),Math.max(Math.abs(s-o[1]),Math.abs(E-o[2])));return e==0?255:n};D.VH=function($,o){if(o)D.x5.call(this);
|
|
else if($)D.x5.call(this,[10,49],D.ky,"tools/camove");else D.x5.call(this,[10,26],D.Od,"tools/patch");
|
|
this.SF=null;this.EN=null;this.l=null;this.tP=null;this.oe=new aY;this.qe=null;this.yq=null};D.VH.prototype=new D.x5;
|
|
D.VH.prototype.iO=function($,o,T,s,E){var e=$.C.VD(E.x,E.y);if($.Z&&L.cM(e,$.Z.channel,$.Z.rect)){var n=new df(0,0,$.d,$.w),A=n.Sr($.Z.rect);
|
|
if(!$.Jt()||A.p4())return;if(!0){var u=L.G(A.Y());L.pg($.Z.channel,$.Z.rect,u,A);$.Z={channel:u,rect:A}}this.gK($);
|
|
this.GX($);this.tP=e;this.oe=new aY(e.x-$.Z.rect.x,e.y-$.Z.rect.y);this.yq=L.G($.Z.rect.Y()*4);this.yq.fill(255);
|
|
if(this.Em.patch==1){var Y=$.u[$.D[0]];Y.Yd($,$.Z,!0);if(Y._I==null)this.tP=null}this.qe=$.Z.rect.clone()}else{this.EN={I:[e.x,e.y],o:["M"]};
|
|
this.SF=e}};D.VH.prototype.ZS=function($,o,T,s,E){var e=$.C.VD(E.x,E.y);if(this.tP){if(this.Em.patch==1){if($.el.length==0){var n=$.u[$.D[0]]._I,A=e.x-this.oe.x,u=e.y-this.oe.y;
|
|
D.aD.vH($,$.D[0],Math.round(A-n._9.x),Math.round(u-n._9.y))}}else this.ly($,e,"clone")}if(this.SF){this.EN.o.push("L");
|
|
this.EN.I.push(e.x,e.y);this.SF=e;$.n.JU=this.EN;$.Cd=!0}};D.VH.prototype.yg=function($,o,T,s,E){var e=$.C.VD(E.x,E.y);
|
|
if(this.tP){var n=$.Z.rect.clone();if(this.id==D.ky){var A=$.u[$.D[0]];A.qf($,A._I);$.Z.rect=this.qe.clone();
|
|
var u=L.G($.Z.rect.Y()*4);L.aM($.Z.channel,u,3);this.o7($,"sheal",u,$.Z.rect,$.Z.rect);$.Z.rect=n;n=n.BZ(this.qe)}this.ly($,e,"heal");
|
|
this.finish($,n,null,null,!0);$.T(n);this.tP=null}if(this.SF){var Y=D.NK.kI(this.Em.setop,s.L(dN.Et),s.L(dN.BJ)),b=new x(H.E.b0,!0);
|
|
if(this.EN.I.length<=4)b.data=D.NK.Gw();else b.data=D.NK.cq(this.EN.I,Y);o.J(b);this.SF=null;$.n.JU=null;
|
|
$.Cd=!0}};D.VH.prototype.k4=function(){return this.l};D.VH.prototype.UR=function($,o,T,s,E){D.x5.prototype.UR.call(this,$,o,T,s,E);
|
|
this.Rb(E,s)};D.VH.prototype.Rb=function($,o){var T="auto;";if(o!=null&&o.L(dN.Et)&&!o.L(dN.BJ)||this.Em.setop=="union")T="copy";
|
|
var s=new x(H.E.Q,!0);s.data={e:H.V.bl,j$:T};if(this.caller)this.caller.J(s)};D.VH.prototype.ly=function($,o,T){var s=new aY(Math.round(this.tP.x-o.x),Math.round(this.tP.y-o.y));
|
|
if(this.Em.patch==1)s.A5(-s.x,-s.y);this.l=s;this.o7($,T,this.yq,$.Z.rect,$.Z.rect);this.T($,$.Z.rect)};
|
|
D.bm=function(){D.VH.call(this,!0);this.Em.patch=1};D.bm.prototype=new D.VH(!0,!0);D.GG=function(){D.x5.call(this,[10,13],D.an8,"tools/pbucket")};
|
|
D.GG.prototype=new D.x5;D.GG.prototype.enable=function($,o,T,s){var E=new x(H.E.Q,!0);E.data={e:H.V.bl,j$:"default"};
|
|
o.J(E)};D.GG.prototype.YE=function($,o){};D.GG.prototype.yg=function($,o,T,s,E){if(this.Pv(s,o,E))return;
|
|
if(!$.Jt())return;var e=$.C.VD(E.x,E.y),n=D.xn.pH($,e,this.Em.wconf);if(n==null)return;var A=L.G(n.rect.Y()*4);
|
|
L.wr(A,(T.z4&255)<<16|(T.z4>>8&255)<<8|(T.z4>>16&255)<<0);L.aM(n.channel,A,3);this.gK($);this.o7($,"draw",A,n.rect,n.rect);
|
|
this.T($,n.rect);this.finish($,n.rect)};D.Pq=function(){D.NK.call(this,[10,14],D.a5C,"tools/plasso");
|
|
this.Mf="crosshair";this.To=[];this.gL=null;this.EN=null;this.anT=0};D.Pq.prototype=new D.NK;D.Pq.prototype.disable=function($,o,T,s){this.wA($)};
|
|
D.Pq.prototype.gO=function($,o,T,s){this.To=[dN.sV,dN.Ln]};D.Pq.prototype.Ty=function($){return this.To.indexOf($)!=-1};
|
|
D.Pq.prototype.ut=function($){return this.EN!=null};D.Pq.prototype.hA=function(){return this.EN!=null};
|
|
D.Pq.prototype.xQ=function(){return this.EN!=null};D.Pq.prototype.$d=function($,o,T,s){if(this.EN==null)return;
|
|
var E=this.EN,e=E.I,n=e.length-2,A=this.dF;if(this.$h>1&&T.L(dN.BJ)&&s.jw){e.push(0,0);E.o.push("L");
|
|
n+=2}else if(T.L(dN.Et))A=D.eH.mq(new aY(e[n-2],e[n-1]),A);e[n]=A.x;e[n+1]=A.y;$.n.JU=E;$.Cd=!0};D.Pq.prototype.uZ=function($,o,T,s){var E=Date.now();
|
|
if(this.EN==null)this.EN={I:[this.dF.x,this.dF.y,this.dF.x,this.dF.y],o:["M","L"]};else{this.$d($,o,T,s);
|
|
if(E-this.anT<250||aY.Sa(this.dF,new aY(this.EN.I[0],this.EN.I[1]))<5*H.K()/$.C.X){this.gL=this.EN;this.finish($,o,T,s);
|
|
this.wA($);return}this.EN.o.push("L");this.EN.I.push(this.dF.x,this.dF.y)}this.anT=E;$.n.JU=this.EN};
|
|
D.Pq.prototype.wA=function($){this.EN=null;this.To=[];if($!=null){$.n.JU=null;$.Cd=!0}};D.Pq.prototype.Vb=function($,o,T,s){D.NK.prototype.Vb.call(this,$,o,T,s);
|
|
if(s.L(dN.R5)&&this.EN==null&&this.gL&&$.Z!=null){var E=new x(H.E.N);E.U=D.Ww;E.data={e:"h_stepbck"};
|
|
o.J(E);this.gO($,T,s,null);this.EN=this.gL;return}if(this.EN==null)return;if(s.L(dN.sV)||s.L(dN.Ln)){this.EN.I.pop();
|
|
this.EN.I.pop();this.EN.o.pop();this.$d($,T,s)}if(s.L(dN.FT)){if(this.EN.I.length>4){this.gL=this.EN;
|
|
this.finish($,T,s)}this.EN=null}if(s.L(dN.R5)){this.EN=null}$.n.JU=this.EN;$.Cd=!0};D.Pq.prototype.getSelection=function($,o,T,s){return D.NK.cq(this.EN.I,null,this.Ne.anta)};
|
|
D.KO=function(){D.NK.call(this,[10,10],D.a1G,"tools/mlasso");this.Mf="crosshair";this.To=[];this.g=[];
|
|
this.O$=[];this.xv=[];this._R=null;this.TL=null;this.xf=null;this.iA=0;this.pY=0};D.KO.prototype=new D.NK;
|
|
D.KO.prototype.disable=function($,o,T,s){this.clear($)};D.KO.prototype.ut=function($){return this.g.length!=0};
|
|
D.KO.prototype.xQ=function(){return this.g.length!=0};D.KO.prototype.Ty=function($){return this.To.indexOf($)!=-1};
|
|
D.KO.prototype.gO=function($,o,T,s){this.To=[dN.sV,dN.Ln];var E=this._t(this.GP,$);if(this.g.length!=0&&(aY.Sa(E,this.g[0])<4*H.K()/$.C.X||Date.now()-this.iA<300)){this.Nw($,this.g[0]);
|
|
this.finish($,o,T);this.clear($);return}this.iA=Date.now();if(this.g.length!=0)E=this.LJ(E,$);else{var e=$.d,n=$.w,A=L.G(e*n),u=$.aw(),Y=e*n*4;
|
|
for(var f=0;f<Y;f+=4)A[f>>>2]=~~(.5+L.DB(u[f],u[f+1],u[f+2])*(u[f+3]*(1/255)));this._R=L.r9.a1m(A,e,n);
|
|
this.xf=new Uint16Array(A.length)}this.Nw($,E);this.pY=T.L(dN.BJ)?1:0;this.bT($)};D.KO.prototype.Nw=function($,o){var T=this.g;
|
|
this.O$[T.length]=this.xv.length;if(T.length!=0){L.r9.$z(this.TL,o.y*$.d+o.x);var s=this.Nu($,o);s.reverse();
|
|
var E=D.KO.Sw($,s);this.xv=this.xv.concat(E)}T.push(o);this.yn($)};D.KO.prototype.yn=function($){var o=this.g[this.g.length-1],T=o.y*$.d+o.x;
|
|
this.TL=L.r9.afU(this._R.ve,this._R.FI,T);this.xf.fill(0)};D.KO.prototype._t=function($,o){return new aY(Math.floor(Math.max(0,Math.min(o.d-1,$.x))),Math.floor(Math.max(0,Math.min(o.w-1,$.y))))};
|
|
D.KO.prototype.clear=function($){this.xv=[];this.g=[];this.O$=[];this._R=null;this.TL=null;this.xf=null;
|
|
if($!=null){$.n.JU=null;$.n.EJ=[];$.Cd=!0}this.To=[]};D.KO.prototype.$d=function($,o,T,s){var E=this.g,e=E.length;
|
|
if(e==0)return;var n=this.LJ(this._t(this.dF,$),$),A=this.Nu($,n);for(var f=0;f<A.length;f++){var u=A[f],Y=new aY(u%$.d,Math.floor(u/$.d));
|
|
if(this.xf[u]>30&&aY.Sa(Y,E[e-1])>20){this.Nw($,Y);return}this.xf[u]++}if(this.pY==1&&s.jw)this.Nw($,n);
|
|
this.bT($)};D.KO.prototype.bT=function($){var o=this.g;if(o.length!=0){var T=this.LJ(this._t(this.dF,$),$),s=this.Nu($,T);
|
|
s.reverse();var E=D.KO.Sw($,s),e=this.xv.concat(E),n=$.n.JU={I:e,o:["M"]};for(var f=2;f<e.length;f+=2)n.o.push("L")}$.n.EJ=[];
|
|
for(var f=0;f<o.length;f++)$.n.EJ.push(o[f].x+.5,o[f].y+.5);$.Cd=!0};D.KO.prototype.uZ=function($,o,T,s){};
|
|
D.KO.prototype.Vb=function($,o,T,s){if(this.g.length==0)return;if(s.L(dN.sV)||s.L(dN.Ln)){this.g.pop();
|
|
this.xv=this.xv.slice(0,this.O$[this.g.length]);this.O$.pop();if(this.g.length==0)this.clear($);else this.yn($);
|
|
this.bT($)}if(s.L(dN.FT)){var E=this._t(this.dF,$);this.Nw($,E);this.finish($,T,s);this.clear($)}if(s.L(dN.R5)){this.clear($)}};
|
|
D.KO.prototype.getSelection=function($,o,T,s){return D.NK.cq(this.xv,null,this.Ne.anta)};D.KO.prototype.Nu=function($,o){var T=this.g[this.g.length-1],s=T.y*$.d+T.x,E=o.y*$.d+o.x;
|
|
if(this.pY==1)return[E,s];var e=[E];while(E!=s){E=this.TL.Iz[E];e.push(E);if(e.length>5e3){console.log(e);
|
|
throw"e"}}return e};D.KO.Sw=function($,o){var T=[],s=$.d;for(var f=0;f<o.length;f++){var E=o[f];T.push(E%s+.5,Math.floor(E/s)+.5)}return T};
|
|
D.KO.prototype.LJ=function($,o){var T=o.d,s=o.w,E=$.clone(),n=3;L.r9.$z(this.TL,$.y*T+$.x);var e=this.TL.Uq[$.y*T+$.x];
|
|
for(var A=-n+1;A<n;A++)for(var u=-n+1;u<n;u++){var Y=$.x+u,b=$.y+A;if(Y<0||Y>=T||b<0||b>=s)continue;
|
|
L.r9.$z(this.TL,b*T+Y);if(this.TL.Uq[b*T+Y]<e)E.A5(Y,b)}return E};D.cr=function(){D.wB.call(this,[10,36],D.hp,"tools/ruler");
|
|
this.kZ=null;this.E9=null;this.Tu=null;this.VF=null};D.cr.prototype=new D.wB;D.cr.prototype.ut=function($){return $.jw};
|
|
D.cr.prototype.enable=function($,o,T,s){D.wB.prototype.enable.call(this,$,o,s,T);if($)this.GT($)};D.cr.prototype.disable=function($,o,T,s){if($)this.wA($)};
|
|
D.cr.prototype.A2=function($,o,T,s,E){this.kZ=this.E9=null;this.GT(T)};D.cr.prototype.iO=function($,o,T,s,E){var e=$.C.X/H.K(),n=$.C.VD(E.x,E.y);
|
|
n.x=Math.round(n.x);n.y=Math.round(n.y);var A=this.kZ,u=A&&aY.Sa(n,A[0])*e<6,Y=A&&aY.Sa(n,A[1])*e<6,b=A&&A[2]&&aY.Sa(n,A[2])*e<6;
|
|
if(u||Y||b){if(s.L(dN.BJ)&&A.length==2){if(Y){var a=A[0];A[0]=A[1];A[1]=a}A[2]=A[0].clone();this.E9=[2]}else this.E9=[u?0:Y?1:2]}else if(A&&D.cr.a6k(A[0],A[1],n)*e<6&&Math.min(A[0].x,A[1].x)-5<=n.x&&n.x<=Math.max(A[0].x,A[1].x)+5&&Math.min(A[0].y,A[1].y)-5<=n.y&&n.y<=Math.max(A[0].y,A[1].y)+5){this.E9=[];
|
|
this.VF=[];for(var f=0;f<A.length;f++){this.E9.push(f);this.VF.push(A[f].clone())}this.Tu=n}else{this.kZ=[n.clone(),n.clone()];
|
|
this.E9=[1]}};D.cr.prototype.ZS=function($,o,T,s,E){if(this.E9==null)return;var e=this.kZ,n=this.E9,A=$.C.VD(E.x,E.y);
|
|
A.x=Math.round(A.x);A.y=Math.round(A.y);if(n.length>1){var u=A.x-this.Tu.x,Y=A.y-this.Tu.y;for(var f=0;
|
|
f<e.length;f++){e[f]=this.VF[f].clone();e[f].offset(u,Y)}}else{e[n[0]].A5(A.x,A.y);if(s.L(dN.Et)){e[n[0]]=D.eH.mq(e[1-n[0]],e[n[0]])}}this.GT($);
|
|
this.lz(o,H.E.Q,{e:H.V.Hh,U:this.id,abF:e[0],e$:e[1],bk:e[2],fG:$.fG,aej:$.d})};D.cr.prototype.yg=function($,o,T,s,E){this.E9=null};
|
|
D.cr.prototype.lz=function($,o,T){var s=new x(o,!0);s.data=T;$.J(s)};D.cr.prototype.GT=function($){var o=this.kZ;
|
|
if(o==null)this.wA($);else{var T=[o[1].x,o[1].y,o[0].x,o[0].y],s=["M","L"];if(o.length>2){T.push(o[2].x,o[2].y);
|
|
s.push("L")}$.n.JU={o:s,I:T};$.n.EJ=T}$.Cd=!0};D.cr.prototype.wA=function($){$.n.JU=null;$.n.EJ=[]};
|
|
D.cr.a6k=function($,o,T){var s=o.x-$.x,E=o.y-$.y,e=Math.abs(E*T.x-s*T.y+o.x*$.y-o.y*$.x),n=Math.sqrt(s*s+E*E);
|
|
return n==0?0:e/n};D.yW=function(){D.x5.call(this,[10,19],D.qT,"tools/sharpen");this.Yb="copy"};D.yW.prototype=new D.x5;
|
|
D.yW.prototype.iO=function($,o,T,s,E){var e=this.Em.pdetail?ih.K1:ih.qT;if(s.L(dN.BJ))e=ih.A1;this.gB($,T,s,E,this.Em.strn,e);
|
|
if(this.VP==null)return;this.m9($)};D.yW.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);if(this.Gh)this.g1($,T,E);
|
|
if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.SM=function(){D.x5.call(this,[10,24],D.iP,"tools/shbrush");
|
|
this.Yb="draw";this.Em.opacity=.5};D.SM.prototype=new D.x5;D.SM.prototype.iO=function($,o,T,s,E){this.gB($,T,s,E,1);
|
|
if(this.VP==null)return;this.GX($);this.m9($)};D.SM.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);
|
|
if(this.Gh)this.g1($,T,E);if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.SM.prototype.yg=function($,o,T,s,E){if(this.VP==null)return;
|
|
this.o7($,"sheal",this.VP.su(),this.VP.rX(),this.VP.cx(),null);this.T($,this.VP.cx());D.x5.prototype.yg.call(this,$,o,T,s,E)};
|
|
D.I$=function(){D.x5.call(this,[10,20],D.FS,"tools/smudge");this.Yb="copy"};D.I$.prototype=new D.x5;
|
|
D.I$.prototype.iO=function($,o,T,s,E){this.gB($,T,s,E,this.Em.strn,ih.FS);if(this.VP==null)return;this.m9($)};
|
|
D.I$.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);if(this.Gh)this.g1($,T,E);if(this.VP==null)return;
|
|
if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.V3=function(){D.x5.call(this,[10,23],D.zv,"tools/sponge");
|
|
this.Yb="sponge"};D.V3.prototype=new D.x5;D.V3.prototype.iO=function($,o,T,s,E){this.gB($,T,s,E,this.Em.flow);
|
|
if(this.VP==null)return;this.m9($)};D.V3.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);if(this.Gh)this.g1($,T,E);
|
|
if(this.VP==null)return;if(!E.jw)return;this.X$($,T,s,E);this.m9($)};D.Kl=function(){D.wB.call(this,[10,17],D.S3,"tools/zoom");
|
|
this.lY=!1;this.Dt=!0;this.zw=0;this.Er=null;this.UP=null;this.jL=0;this.o2=null;this.fV=0;this.Pu=new eb([{name:[8,0],ep:"Ctrl + +"},{name:[8,1],ep:"Ctrl + -",iR:!0},{name:[20,3],ep:"Ctrl + 0"},{name:["VAR0: 100%",[20,2]],ep:"Ctrl + 1"}],[{F:H.E.N,U:D.S3,r:{e:"zoom",Dt:!0}},{F:H.E.N,U:D.S3,r:{e:"zoom",Dt:!1}},{F:H.E.N,U:D.S3,r:{e:"adapt",H:"fitscr"}},{F:H.E.N,U:D.S3,r:{e:"adapt",H:"pixel"}}])};
|
|
D.Kl.prototype=new D.wB;D.Kl.prototype.oW=function($,o,T,s,E){var e=this.Pu;e.f();e.parent=o;e.update($,T);
|
|
var n=new x(H.E.Q,!0);n.data={e:H.V.NM,bF:e,x:E.uT+2,y:E.$T+1};o.J(n)};D.Kl.prototype.enable=function($,o,T,s){this.Qi(o,s);
|
|
if($&&Date.now()-this.zw<300)this.A2({e:"adapt",H:"pixel"},o,$,s,T);this.zw=Date.now()};D.Kl.prototype.iO=function($,o,T,s,E){this.UP=new aY(E.x,E.y);
|
|
this.jL=$.C.X;this.o2=$.C.l.clone()};D.Kl.prototype.ZS=function($,o,T,s,E){if(this.UP==null)return;var e=Math.exp(Math.log(this.jL)+(E.x-this.UP.x)/64);
|
|
e=Math.max(.02,Math.min(32,e));$.C.X=this.jL;$.C.l=this.o2.clone();this.A2({e:"zoom",X:e,Cj:this.UP},o,$,s,T)};
|
|
D.Kl.prototype.yg=function($,o,T,s,E){if(aY.Sa(this.UP,E)<4){var e=this.N2(s);this.A2({e:"zoom",Dt:e,Cj:E},o,$,s,T)}this.UP=null};
|
|
D.Kl.aK=[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];
|
|
D.Kl.cb=function($,o,T,s){var E=1;while($*E*1/2>T||o*E*1/2>s)E*=1/2;if($*E*2/3>T||o*E*2/3>s)E*=1/2;else if($*E>T||o*E>s)E*=2/3;
|
|
return E};D.Kl.MV=function($,o){var T=D.Kl.dT($);if(o&&T==0)return $;if(!o&&T==D.Kl.aK.length-1)return $;
|
|
return D.Kl.aK[o?T-1:T+1]};D.Kl.dT=function($){var o=0;while(D.Kl.aK[o]>$)o++;return o};D.Kl.PT=function($,o,T,s){var E=$.u4;
|
|
if(s==0||s==null){s=D.Kl.MV($.X,T);if(s==$.X)return}var e=$.VD(o.x,o.y);if(E.d*s<=$.Vi.d&&E.w*s<=$.Vi.w){$.l.A5(0,0);
|
|
$.X=s}else{var n=$.jj(),A=$.X/s;n.translate(-e.x,-e.y);n.scale(A,A);n.translate(e.x,e.y);$.o8(n)}};D.Kl.prototype.A2=function($,o,T,s,E){if($.e=="pzoom"){if(typeof $.H=="string")return;
|
|
$={e:"zoom",X:$.H/100}}var e=0,n=!1,A=null;if($.e=="adapt"){var u=0;if($.H=="pixel")u=1;if($.H=="fitscr"){var u=0,Y=T.C.Vi.d,b=T.C.Vi.w;
|
|
u=Math.min((Y-14)/T.d,(b-14)/T.w)}A=new aY(Math.round(T.C.Vi.d/2),Math.round(T.C.Vi.w/2));e=u;D.Kl.PT(T.C,A,n,e);
|
|
T.RZ=!0}if($.e.startsWith("multi")){function a(p){var P=p[0].x-p[1].x,h=p[0].y-p[1].y;return Math.sqrt(P*P+h*h)}function w(p){return new aY((p[0].x+p[1].x)/2,(p[0].y+p[1].y)/2)}var X=$.jV,N=w(X);
|
|
if($.e=="multidown"){this.Er=[X,T.C.X,T.C.VD(N.x,N.y)]}else{e=this.Er[1]*a(X)/a(this.Er[0]);if(e>=1)e=Math.min(32,Math.round(e));
|
|
else{var z=0,i=1e9,k=D.Kl.aK;for(var f=0;f<k.length;f++){var Q=Math.abs(1-e/k[f]);if(Q<i){i=Q;z=f}}e=k[z]}if(e!=T.C.X)D.Kl.PT(T.C,N,n,e);
|
|
var O=this.Er[2],c=T.C.X8(O.x,O.y),B=T.C.l;B.x=Math.round(B.x+N.x-c.x);B.y=Math.round(B.y+N.y-c.y);T.RZ=!0}}if($.e=="scroll"){A=$.Cj;
|
|
this.fV+=$.Jn.y;var G=14;if(this.fV<-G){n=!0;this.fV=Math.max(this.fV+G,-(G-1))}else if(this.fV>G){n=!1;
|
|
this.fV=Math.min(this.fV-G,G-1)}else return;D.Kl.PT(T.C,A,n,e);T.RZ=!0}if($.e=="zoom"){A=$.Cj?$.Cj:new aY(Math.round(T.C.Vi.d/2),Math.round(T.C.Vi.w/2));
|
|
if($.X!=null)e=$.X;else n=$.Dt;D.Kl.PT(T.C,A,n,e);T.RZ=!0}if($.e=="mskView"){var l=T.u[T.D[0]],v=l.dQ==3?l.DE(T)._:l.yy();
|
|
if($.H==0){T.C.xR=[1,1,1];v.T9=!1}if($.H==1){T.C.xR=[1,1,1];v.T9=!0}if($.H==2){T.C.xR=[0,0,0];v.T9=!0}for(var f=0;
|
|
f<T.iy.length;f++)T.iy[f].T9=!1;T.el=[];T.Cd=!0}};D.Kl.prototype.Vb=function($,o,T,s){if(this.lY!=s.L(dN.BJ)){this.lY=s.L(dN.BJ);
|
|
var E={e:H.V.Hh,U:this.id,lY:this.lY},e=new x(H.E.Q,!0);e.data=E;o.J(e);this.Qi(o,s)}};D.Kl.prototype.Qi=function($,o){var T=new x(H.E.Q,!0),s=this.N2(o);
|
|
T.data={e:H.V.bl,j$:s?"zoom-in":"zoom-out"};$.J(T)};D.Kl.prototype.UR=function($,o,T,s){this.Dt=$.Dt;
|
|
this.Qi(o,s)};D.Kl.prototype.N2=function($){var o=this.Dt;if($.L(dN.Gv)&&$.L(dN.I6))o=!0;if(this.lY)o=!o;
|
|
return o};D.Kl.ck=function($,o){if($.L(dN.AZ)||$.L(dN.an$)){o.U=D.S3;o.data={e:"zoom",Dt:!0}}if($.L(dN.Dd)){o.U=D.S3;
|
|
o.data={e:"zoom",Dt:!1}}if($.L(dN.MN)){o.U=D.S3;o.data={e:"adapt",H:"fitscr"}}if($.L(dN.yL)){o.U=D.S3;
|
|
o.data={e:"adapt",H:"pixel"}}};D.Ie=function($,o,T){D.wB.call(this,$,o,T);this.fN=null;this.GH=null;
|
|
this.YO=null;this.aaG=0};D.Ie.prototype=new D.wB;D.Ie.prototype.enable=function($,o,T,s,E){this.GH=T;
|
|
var e=new x(H.E.Q,!0);e.data={e:H.V.bl,j$:"default"};o.J(e)};D.Ie.prototype.oW=function($,o,T,s,E){if($.Vp()[0].length==0)return;
|
|
var e=new x(H.E.Q,!0);e.data={e:H.V.Hh,U:this.id,bg:E,ZU:$,mh:T};o.J(e)};D.Ie.prototype.HO=function($,o){var T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.uY,M9:gr.PA};if(!o.Ok)$.J(T);T.data={e:H.V.uY,M9:gr._8};if(!o.wK.w5)$.J(T)};D.Ie.prototype.nv=function($,o,T,s){if(T.D3!=this.id)return;
|
|
if($.D.length==0)return;var E=$.u[$.D[0]],e=E.add.vmsk,n=E.add.vstk,A=D.Ie.pe($,$.D[0]);this.fN=$;this.YO=o;
|
|
if(E.d5()&&e!=null&&(JSON.stringify(n)!=JSON.stringify(T.MD)||JSON.stringify(A)!=JSON.stringify(T.Av))){this.aaG=Date.now();
|
|
var u=new x(H.E.Q,!0);u.data={e:H.V.uY,M9:gr.kD,H:A};o.J(u);u.data={e:H.V.uY,M9:gr.Gu,H:n};o.J(u)}};
|
|
D.Ie.prototype.YE=function($,o){if(this.fN==null)return;if(o==gr.zo||o==gr.kD||o==gr.Gu){if(Date.now()-this.aaG<50)return;
|
|
var T=o==gr.kD,s=this.fN,E=T?$.Av:$.MD,e=[];for(var f=0;f<s.D.length;f++){var n=s.D[f],A=s.u[n];if(!A.d5()||A.add.vmsk==null)continue;
|
|
e.push(n)}var u=new x(H.E.N,!0);u.U=D.Jc;u.data={e:M.lS,WV:e,OH:T,H:E};if(e.length!=0)this.YO.J(u)}};
|
|
D.Ie.prototype.alK=function($){if(typeof $=="number"){var o=new x(H.E.b0,!0);o.data=D.U5.V0(0);o.data.bI.Usng.v.Type.v.Clr.v=L.h.wb({i:$>>>16&255,m:$>>>8&255,P:$>>>0&255});
|
|
this.YO.J(o)}};D.Ie.prototype.A2=function($,o,T,s,E){this.YO=o;if($.e=="newfill"){if($.tU==0){var e=new x(H.E.Q,!0);
|
|
e.data={e:H.V.NC,a_:"colorpicker",zS:E.z4,Ba:this.alK.bind(this)};o.J(e)}}else if($.e=="pathedit"){var n=$.f8,A="",u=T.w5.slice(0),Y=T.dl.slice(0),b=T.w5.slice(0),a=T.dl.slice(0);
|
|
if(n=="rnm"){var w=-1-$.II,X=u[w],N=iG.om($.name,X.add);if(w!=0)b[w]=N;else{a=[b.length];b.push(N);b[0]=iG.om("Work Path")}A="Rename"}else if(n=="new"){b.push(iG.om("Path "+u.length));
|
|
a=[b.length-1];A="New"}else if(n=="del"){if(a.length==0)return;a.sort(function(p,S){return p-S});if(a[0]==0){b[0]=iG.om(u[0].name);
|
|
a=a.slice(1)}var z=0;while(a.length!=0){b.splice(a[0]-z,1);a=a.slice(1);z++}A="Delete"}else if(n=="fromsel"){var i=b[0]=iG.om("Work Path");
|
|
a=[0];if(T.Z==null)return;var k=T.Z.channel.slice(0);for(var f=0;f<k.length;f++)k[f]=k[f]>128?2:1;var Q=T.Z.rect.clone();
|
|
Q.Mi(1,1);var O=L.G(Q.Y());L.pg(k,T.Z.rect,O,Q);var c=gE.Ra(O,Q.d,Q.w,Math.round(Q.Y()*5e-4)),B=gE.Vp(c),G=new fY(1,0,0,1,-1+T.Z.rect.x,-1+T.Z.rect.y);
|
|
for(var f=0;f<B.length;f++)L.M.t(B[f].path.I,G,B[f].path.I);for(var f=0;f<B.length;f++){var l=B[f];if(l.color==1&&l.parent==-1)continue;
|
|
var v=L.M.Hz(B[f].path,!1);i.add.vmsk.g=i.add.vmsk.g.concat(v.slice(2))}i.add.vogk=M._L(i.add.vmsk.g);
|
|
A="Selection to"}var p=new dt(A+" Path",this);p.data={Jo:u,_F:Y,a1W:b,XV:a};if(n=="fromsel"){p.data.I9=T.Z;
|
|
p.data.a3=null}T.g4(p);this.wx(p.data,T)}else{var P=$.U1,h=T.Vp($.e=="append"),B=h[0],j=h[1],i=B[j[0]],C=i.add.vmsk,V=i.add.vogk,d=C.clone(),m=C.clone(),R=JSON.stringify(V);
|
|
if($.e=="remove"){if($.ano&&m.Rc.length!=0){m.g=L.A.a6B(m.g,m.Rc,V);var g=L.A.MM(m.g);for(var f=0;f<m.D.length;
|
|
f++)if(m.D[f]>=g){m.D.splice(f,1);f--}m.Rc=[];P="Delete Anchors"}else{if(m.D.length==0)return;var z=0;
|
|
for(var f=0;f<m.D.length;f++){V.splice(m.D[f]+z,1);z--}m.g=L.A.a1b(m.g,m.D);m.D=[];m.Rc=[];if(P==null)P="Delete Paths"}}if($.e=="append"){D.Ie.n9($.a2h,m,V)}this.Fi(T,i.II,m,V);
|
|
this.nA(T,P,i.II,d,m.clone(),null,R,JSON.stringify(V))}};D.Ie.Fy=function($,o){var T=L.A.a60($.g,$.D),s=[];
|
|
for(var f=0;f<$.D.length;f++)s.push(JSON.parse(JSON.stringify(o[$.D[f]])));return[T,s]};D.Ie.n9=function($,o,T){var s=L.A.MM(o.g),E=L.A.MM($[0]);
|
|
o.g=o.g.concat($[0].slice(2));o.D=[];for(var f=0;f<E;f++)o.D.push(s+f);for(var f=0;f<E;f++)T.push(JSON.parse(JSON.stringify($[1][f])))};
|
|
D.Ie.prototype.Ty=function($,o){if(o==null)return!1;var T=o.Vp(),s=T[0],E=T[1];if(E.length==0)return!1;
|
|
var e=s[E[0]],n=e.add.vmsk;if(n&&n.D.length+n.Rc.length!=0)return[dN.sV,dN.Ln].indexOf($)!=-1};D.Ie.prototype.Vb=function($,o,T,s){if($==null)return;
|
|
var E=$.Vp(),e=E[0],n=E[1];if(n.length==0)return;var A=e[n[0]],u=A.add.vmsk;if(s.L(dN.R5)||s.L(dN.FT)){u.Rc=[];
|
|
$.Cd=!0}if(u.D.length!=0){var Y=s.cu();if(Y.x!=0||Y.y!=0){var b=u.clone(),a=u.clone(),w=new fY(1,0,0,1,Y.x,Y.y),X=A.add.vogk,N=JSON.stringify(X);
|
|
L.A.hR(a.g,w,a.D);L.qy.t(X,L.$.KQ(w),a.D);this.Fi($,A.II,a,X);this.nA($,"Move Paths",A.II,b,a.clone(),!0,N,JSON.stringify(X))}if(s.L(dN.sV)||s.L(dN.Ln))this.A2({e:"remove",ano:this.id==D.zT},o,$,s,T)}};
|
|
D.Ie.prototype.nA=function($,o,T,s,E,e,n,A){var u=new dt(o,this);u.data={Sk:T,B_:s,Q0:E,ar8:e,aqX:n,SQ:A};
|
|
$.g4(u)};D.Ie.prototype.wx=function($,o){if($.Sk!=null)this.Fi(o,$.Sk,$.Q0.clone(),JSON.parse($.SQ));
|
|
else{o.w5=$.a1W.slice(0);o.dl=$.XV.slice(0);o.Cd=o.sr=!0}if($.I9||$.a3){o.Z=$.a3;o.L5=!0}};D.Ie.prototype.OK=function($,o){if($.Sk!=null)this.Fi(o,$.Sk,$.B_.clone(),JSON.parse($.aqX));
|
|
else{o.w5=$.Jo.slice(0);o.dl=$._F.slice(0);o.Cd=o.sr=!0}if($.I9||$.a3){o.Z=$.I9;o.L5=!0}};D.Ie.prototype.Fi=function($,o,T,s){var E=o<0?$.w5[-1-o]:o<1e6?$.u[o]:$.u[o-1e6].add.TySh,e=E.add.vmsk;
|
|
e.channel=null;e.Or=!0;if(e.Vx){e.Vx.channel=null;e.Vx.Or=!0}E.add.vmsk=T;E.add.vogk=s;if(1e6<=o){g8.J2(E);
|
|
var n=$.u[o-1e6],A=E,u=this.GH,Y=new iq(A.h3,u.vv),b=hA.rW(Y,A);n.rect=b.uL;n.buffer=b._3;n.T();$.T()}else if(0<=o){T.Or=!0;
|
|
E.tF($);$.T()}$.Cd=$.sr=!0};D.Ie.pe=function($,o){var T=$.u[o],s=T.add.vstk,E=null;if(s&&!s.fillEnabled.v)E={Ul:0};
|
|
else if(T.add.SoCo)E={Ul:1,n$:T.add.SoCo};else if(T.add.GdFl)E={Ul:2,n$:T.add.GdFl};else if(T.add.PtFl)E={Ul:3,n$:T.add.PtFl};
|
|
return E};D.Ie.wm=function($,o){var T=$.add.vmsk,s=$.add.vstk,E=o.Ul;if(s)s.fillEnabled.v=E!=0;if(E>0){var e=["SoCo","GdFl","PtFl"][E-1];
|
|
for(var f=0;f<3;f++)delete $.add[["SoCo","GdFl","PtFl"][f]];$.add[e]=o.n$}};D.U5=function($,o,T,s){D.Ie.call(this,$,o,T);
|
|
this.Em={tmode:0,shape:aS.o_(),pshape:0,binop:0,crad:0,irad:40,length:4,sides:5,width:5,tolr:5,tsiz:300,cstr:{KR:0},anta:!0};
|
|
this.an9=s;this.mj=null;this.K7=null;this.e7=null};D.U5.prototype=new D.Ie;D.U5.prototype.ut=function($){return $.jw&&this.id!=D.Va};
|
|
D.U5.prototype.enable=function($,o,T,s,E){this.GH=T;var e=new x(H.E.Q,!0);e.data={e:H.V.bl,j$:"crosshair"};
|
|
o.J(e)};D.U5.prototype.G8=function($,o,T,s){};D.U5.prototype.iO=function($,o,T,s,E){var e=this.Em.tmode;
|
|
if(e!=2)this.HO(o,T);if(e==2&&!$.Jt())return;var n=$.C.VD(E.x,E.y);n=D.aD.yu($,n,T);this.e7=[n.x,n.y];
|
|
this.mj=n;this.K7=new aY(0,0)};D.U5.prototype.fd=function($,o,T){var s=[this.mj.clone(),o.clone()];if(this.an9)s=D.U5.XS(s[0],s[1],T,!0,this.Em.cstr);
|
|
if($)$.C.Xk=new df(s[0].x,s[0].y,s[1].x-s[0].x,s[1].y-s[0].y);return this.G8(s[0],s[1],T.L(dN.Et),this.e7)};
|
|
D.U5.prototype.D6=function($,o,T){var s=$.C.VD(o.x,o.y),E=this.Em.cstr;if(E.KR==2){var e=new df(s.x-E.x,s.y-E.y,E.x,E.y),n=D.aD.nI($,e,T);
|
|
s.x+=n[0];s.y+=n[1];D.aD.Fv($,e,n)}else s=D.aD.yu($,s,T);return s};D.U5.prototype.ZS=function($,o,T,s,E){if(this.mj==null)return;
|
|
var e=this.e7,n=e.length,A=E?this.D6($,E,T):new aY(e[n-2],e[n-1]);if(s.L(dN.Gv))this.mj=A.V4(this.K7);
|
|
else this.K7=A.V4(this.mj);e.push(A.x,A.y);if(this.Em.shape==null)this.Em.shape=T.vx[0];var u=this.fd($,A,s)[0],Y=L.M.Ld(u);
|
|
$.n.JU=Y;if(this.id!=D.Va&&this.id!=D.ar&&this.id!=D.Xn)D.wB.C9(E.x+10,E.y-10,$.C.Xk,$,T);$.Cd=!0};D.U5.prototype.ad_=function($,o,T,s){var E=$[4].clone();
|
|
if(s){E.x-=o/2;E.y-=T/2}var e=this.G8(E,new aY(E.x+o,E.y+T),!1,this.e7);this.wL($[0],$[1],$[2],e)};D.U5.prototype.wL=function($,o,T,s){var E=new x(H.E.b0,!0);
|
|
E.data=D.U5.N_(s[1],T);o.J(E);if(s[1].v.classID=="customShape"&&s[1].v.Nm.v.startsWith("--")){var e=$.Vp(),n=e[0],A=e[1],u=n[A.pop()],Y=u.add.vmsk,b=u.add.vogk,a=Y.clone();
|
|
a.g=s[0];this.Fi($,u.II,a,b)}};D.U5.prototype.yg=function($,o,T,s,E){if(this.mj==null)return;var e=this.D6($,E,T),n=this.Em.binop,A=this.Em.tmode,u=this.e7,Y=u.length;
|
|
if(this.id==D.Va&&Y<=4){}else if(Y<=4){e.x=Math.round(e.x);e.y=Math.round(e.y);var b=new x(H.E.Q);b.data={e:H.V.NC,a_:"createshape",a8H:this.ad_.bind(this),a9l:this.name,a0o:[$,o,T,s,e]};
|
|
o.J(b)}else if(Y!=2){var a=this.fd($,e,s),w=a[0];if(A==1&&w.length>2){w[2].m6=[1,2,3,0][n];var X=$.Vp(!0),N=X[0],z=X[1],i=N[z.pop()],k=i.add.vmsk,Q=i.add.vogk,O=k.clone(),c=k.clone(),B=JSON.stringify(Q);
|
|
c.g=c.g.concat(w.slice(2));c.D=[L.A.MM(c.g)-1];var G=L.qy.Rg(a[1]);Q.push(G?G:L.qy.Ke());this.Fi($,i.II,c,Q);
|
|
this.nA($,this.name,i.II,O,c,null,B,JSON.stringify(Q))}else if(A==0){this.wL($,o,T,a)}else if(A==2){var c=new M.PZ;
|
|
c.g=c.g.concat(w.slice(2));var l=c.yy();if(!this.Em.anta)L.round(l.channel);var v=L.G(l.rect.Y()*4);
|
|
L.wr(v,(T.z4&255)<<16|(T.z4>>8&255)<<8|(T.z4>>16&255)<<0);L.aM(l.channel,v,3);var p=new x(H.E.N,!0);
|
|
p.U=D.m8;p.data={e:"draw",jB:{buffer:v,rect:l.rect.clone()},U1:this.name};o.J(p)}}this.mj=null;$.n.JU=null;
|
|
$.n.BD=null;$.n.bt=[];$.C.Xk=null;$.Cd=!0};D.U5.prototype.UR=function($,o,T,s,E){for(var T in $)this.Em[T]=$[T]};
|
|
D.U5.XS=function($,o,T,s,E){var e=$.x,n=$.y,A=o.x,u=o.y;if(E&&E.KR==2){if(s){A=Math.round(A);u=Math.round(u)}e=A-E.x;
|
|
n=u-E.y}else{var Y=0;if(E&&E.KR==1)Y=E.y/E.x;else if(T&&T.L(dN.Et))Y=1;if(Y!=0){if(s){if(e<A)e=Math.floor(e);
|
|
else e=Math.ceil(e);if(n<u)n=Math.floor(n);else n=Math.ceil(n)}var b=Math.abs(A-e),a=Math.abs(u-n),w=b;
|
|
if(a/b<Y)w*=a/b/Y;A=A>e?e+w:e-w;u=u>n?n+w*Y:n-w*Y}if(T&&T.L(dN.BJ)){e-=A-e;n-=u-n}}var $=new aY(e,n),o=new aY(A,u);
|
|
if(s)D.U5.a3x($,o);return[$,o]};D.U5.a3x=function($,o){if($.x>o.x){var T=$.x;$.x=o.x;o.x=T}if($.y>o.y){var T=$.y;
|
|
$.y=o.y;o.y=T}$.x=Math.floor($.x);$.y=Math.floor($.y);o.x=Math.ceil(o.x);o.y=Math.ceil(o.y)};D.U5.a5D=function(){return{classID:"Mk",null:{t:"obj ",v:[{t:"Clss",v:{classID:"contentLayer"}}]},Usng:{t:"Objc",v:{classID:"contentLayer",Type:{t:"Objc",v:{}}}}}};
|
|
D.U5.V0=function($,o){var T=D.U5.a5D();if(o==null)o=JSON.parse(JSON.stringify(ev.WA[$]));cf.kz.Nx(o,T.Usng.v.Type.v,$);
|
|
return{Wk:"make",bI:T}};D.U5.N_=function($,o){var T=o.Av,s=JSON.parse(JSON.stringify(o.MD));if(T.Ul==0)s.fillEnabled.v=!1;
|
|
var E=D.U5.V0(Math.max(0,T.Ul-1),T.n$);E.bI.Usng.v.Shp=$;E.bI.Usng.v.strokeStyle={t:"Objc",v:s};return E};
|
|
D.Br=function(){D.Ie.call(this,[10,29],D.zT,"tools/pen");this.D1=null;this.vJ=null;this.Kn=null;this.x3=0;
|
|
this.am8=0;this.pn=null;this._N=!1;this.SR=!1;this.wY=!1};D.Br.prototype=new D.Ie;D.Br.prototype.ut=function($){return this.vJ!=null};
|
|
D.Br.prototype.Vb=function($,o,T,s){D.Ie.prototype.Vb.call(this,$,o,T,s);if(!s.L(dN.BJ))this.wY=!1};
|
|
D.Br.prototype.iO=function($,o,T,s,E){this.D1=E;this.HO(o,T);var e=$.C.VD(E.x,E.y),X,N;e.x=Math.round(e.x);
|
|
e.y=Math.round(e.y);var n=D.aD.yu($,e,T),A=$.Vp(this.x3==1),u=A[0],Y=A[1],b=u[Y.pop()],a=b?b.add.vmsk:null,w=4*H.K()/$.C.X;
|
|
if(a)X=L.A.cM(a.g,e,!0,w);var z=s.L(dN.BJ);if(this.x3==0&&(a==null||a.Rc.length==0&&X.II==-1)){var i=new x(H.E.b0,!0),k=L.qy.ya("customShape",[0,0,1,1],null,null,null,"--");
|
|
i.data=D.U5.N_(k,T);o.J(i);A=$.Vp(!0);u=A[0];Y=A[1];b=u[Y.pop()];a=b.add.vmsk;a.g=a.g.slice(0,2)}var Q=b.add.vogk;
|
|
this.vJ=a.clone();this.Kn=JSON.stringify(Q);var O=a.g,c=L.A.MM(O);N=L.A.PW(a.g,new df(e.x-w,e.y-w,w*2,w*2),a.Rc);
|
|
X=L.A.cM(a.g,e,!0,w);var B=N[0].length+N[1].length+N[2].length;if(X.II!=-1&&N[0].length==0){var G=L.A.kE(O,X.II);
|
|
while(O[G].length<=X.PS){X.PS-=O[G].length;G+=O[G].length+1}O[G].length++;O.splice(G+2+X.PS,0,{type:4,Wq:n.clone(),W:n.clone(),JL:n.clone()});
|
|
a.Rc=[G+2+X.PS]}else if(B!=0&&z){var l=0;for(var f=0;f<3;f++)if(N[f].length!=0){l=N[f][0];this.SR=f==1;
|
|
break}if(N[0].length!=0){var v=a.g.length-1,p=a.g[l];p.JL=p.W.clone();var P=p.type>=3?3:0;if(l!=v){p.Wq=p.W.clone();
|
|
p.type=P+1;this.wY=!0}else p.type=P+2}a.Rc=[l]}else if(N[0].length==1&&O[N[0][0]-1]&&O[N[0][0]-1].m6==null){var l=N[0][0],G=L.A.c9(O,l);
|
|
G=L.A.kE(O,G);var h=G+O[G].length;if(l!=h){O[G].length--;O.splice(l,1);h--}a.Rc=[h]}else{var j=0;if(a.Rc.length!=1){a.D=[c];
|
|
O.push({type:3,length:1,m6:[1,2,3,0][this.am8],aq:0,ZO:0,Eg:0});j=O.length;Q.push(L.qy.Ke())}else{var C=a.Rc[0],V=L.A.c9(O,C),G=L.A.kE(O,V);
|
|
C=G+O[G].length;if(aY.Sa(e,O[G+1].W)<w){O[G].type=0;a.Rc=[G+1];this.pn=n;this._N=!0;this.Fi($,b.II,a,Q);
|
|
$.Cd=!0;return}O[G].length++;j=C+1;if(C==G+1&&O[G].length!=2)j=G+1}if(s.L(dN.Et)&&O[j-1]&&O[j-1].W)n=D.eH.mq(O[j-1].W,n);
|
|
O.splice(j,0,{type:4,Wq:n.clone(),W:n.clone(),JL:n.clone()});a.Rc=[j];this.pn=n}this.Fi($,b.II,a,Q);
|
|
$.Cd=!0};D.Br.prototype.ZS=function($,o,T,s,E){if(this.vJ==null)return;var e=this.D1;if(e&&aY.Sa(e,E)<3*H.K())return;
|
|
this.D1=null;var n=$.C.VD(E.x,E.y),A=D.aD.yu($,n,T),u=$.Vp(this.x3==1),Y=u[0],b=u[1],a=Y[b.pop()],w=a.add.vmsk,X=w.g,N=X[w.Rc[0]];
|
|
if(s.L(dN.Gv)){if(s.L(dN.Et))A=D.eH.mq(this.pn,A);var z=N.W.V4(N.JL),i=N.Wq.V4(N.W);N.JL=A;N.W=A.add(z);
|
|
N.Wq=N.W.add(i)}else{if(s.L(dN.Et))A=D.eH.mq(N.W,A);if(this.SR){var k=N.Wq;N.Wq=N.JL;N.JL=k}if(this._N){var Q=aY.Sa(N.W,A),O=Q==0?0:aY.Sa(N.W,N.JL)/Q;
|
|
N.JL.x=N.W.x+O*(A.x-N.W.x);N.JL.y=N.W.y+O*(A.y-N.W.y)}else N.JL=A;if(s.L(dN.BJ)&&!this.wY)N.type=5;else{N.type=4;
|
|
N.Wq=N.W.add(N.W.V4(A))}this.pn=A;if(this.SR){var k=N.Wq;N.Wq=N.JL;N.JL=k}}this.Fi($,a.II,w,a.add.vogk);
|
|
$.Cd=!0};D.Br.prototype.yg=function($,o,T,s,E){if(this.vJ==null)return;var e=$.Vp(this.x3==1),n=e[0],A=e[1],u=n[A.pop()],Y=u.add.vmsk,b=u.add.vogk;
|
|
if(this._N){Y.Rc=[];this.Fi($,u.II,Y,u.add.vogk)}var a=this.vJ.g.length,w=Y.g.length;this.nA($,this._N?"Close Path":(a==w?"Move":a<w?"Add":"Delete")+" Anchor Point",u.II,this.vJ,Y.clone(),null,this.Kn,JSON.stringify(b));
|
|
this._N=!1;this.SR=!1;this.wY=!1;this.vJ=null};D.Br.prototype.UR=function($,o,T,s,E){this.x3=$.tmode;
|
|
this.am8=$.binop};D.XH=function(){D.U5.call(this,[10,30],D.Va,"tools/fpen",!1)};D.XH.prototype=new D.U5;
|
|
D.XH.prototype.G8=function($,o,T,s){return[L.A.dX(s,this.Em.tolr),L.qy.ya("customShape",[0,0,1,1],null,null,null,"--")]};
|
|
D.vi=function(){D.Ie.call(this,[10,27],D.bo,"tools/pselect");this.Kg=null;this.ny=!1;this.EN=null;this.vJ=null;
|
|
this.ke=null;this.Kn=null;this.vd=null;this.fT=null;this.Vm=null;this.bW=null};D.vi.prototype=new D.Ie;
|
|
D.vi.prototype.ut=function($){return $.jw};D.vi.prototype.iO=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=$.Vp(),A=n[0],u=n[1],Y,b;
|
|
for(var f=0;f<u.length;f++){var a=A[u[f]],w=a.add.vmsk,X=L.A.cM(w.g,e).II;if(X!=-1){this.EN=Y=a;b=X}for(var N=0;
|
|
N<w.kZ.length;N++){var z=L.A.BM(w.g,w.kZ[N]);if(z==null)continue;var i=aY.Sa(z,e);if(i<4*H.K()/$.C.X){var k=$.u[a.II-1e6].add.TySh,Q=k.h3.Curve,O=k.t,c=Q.Reversed;
|
|
Q.Reversed=!1;var Q=iq.qF(k.h3.Curve);Q.Reversed=c;L.M.t(Q[0],O,Q[0]);this.Vm=[Q,N,O.Ca*O.Um-O.P*O.Z9];
|
|
this.EN=Y=a;b=0}}if(this.Vm)break}if(Y!=null){var w=Y.add.vmsk;w.Rc=[];var B=w.D.indexOf(b);if(s.L(dN.Et)){if(B==-1){w.D.push(b);
|
|
this.ny=!0}else w.D.splice(B,1)}else{if(B==-1)w.D=[b];this.ny=!0}this.fT=L.A.hT(w.g,w.D)}this.Kg=e;this.bW=new ds(e);
|
|
$.sr=!0;$.Cd=!0};D.vi.prototype.ZS=function($,o,T,s,E){if(this.Kg==null)return;var e=$.C.VD(E.x,E.y);
|
|
if(this.ny){e=this.bW.$Z(e,s);var n=this.EN;if(this.vJ==null){this.vJ=this.ke=n.add.vmsk.clone();this.Kn=this.vd=JSON.stringify(n.add.vogk);
|
|
if(s.L(dN.BJ)){var A=this.vJ.clone(),u=JSON.parse(this.Kn),Y=D.Ie.Fy(A,u);D.Ie.n9(Y,A,u);this.ke=A;this.vd=JSON.stringify(u)}}var A=this.ke.clone(),u=JSON.parse(this.vd);
|
|
if(this.Vm){var b=this.Vm,a=b[0][0],w=L.M.KY(a,e.x,e.y);A.kZ[b[1]]=b[0][1][w];var X=a[w*2],N=a[w*2+1],z=(a[w*2+2]-X)*(e.y-N)-(a[w*2+3]-N)*(e.x-X);
|
|
if(b[2]<0)z=-z;A.wq=z>0}else{var i=this.fT.clone(),k=i.x,Q=i.y;i.offset(e.x-this.Kg.x,e.y-this.Kg.y);
|
|
i.x=Math.round(i.x);i.y=Math.round(i.y);var O=D.aD.nI($,i,T),c=new fY(1,0,0,1,i.x-k+O[0],i.y-Q+O[1]);
|
|
L.A.hR(A.g,c,A.D);L.qy.t(u,L.$.KQ(c),A.D);D.aD.Fv($,i,O)}this.Fi($,n.II,A,u)}else{var B=this.Kg;$.n.JU=L.M.Uo(new df(B.x,B.y,e.x-B.x,e.y-B.y));
|
|
$.Cd=!0}};D.vi.prototype.yg=function($,o,T,s,E){if(this.Kg==null)return;var e=$.C.VD(E.x,E.y),n=this.EN,A=n?n.add.vmsk:null;
|
|
if(this.ny){var u=JSON.stringify(n.add.vogk);if(!this.Kg.R1(e))this.nA($,"Move Paths",n.II,this.vJ,A,null,this.Kn,u);
|
|
if($!=null&&$.n.BD){$.n.BD=null;$.Cd=!0}}else{if(A){var Y=this.Kg,b=new df(Y.x,Y.y,e.x-Y.x,e.y-Y.y),a=L.A.amd(A.g,b);
|
|
if(s.L(dN.Et)){for(var f=0;f<a.length;f++)if(A.D.indexOf(a[f])==-1)A.D.push(a[f])}else A.D=a}$.n.JU=null;
|
|
$.Cd=!0}this.Kg=null;this.vJ=null;this.Vm=null;this.ny=!1;this.bW=null};D.vi.prototype.nv=function($,o,T,s){D.Ie.prototype.nv.call(this,$,o,T,s);
|
|
if(T.D3!=this.id)return;if($.D.length==0)return;var E=$.Vp(),e=E[0],n=E[1];if(n.length==0)return;var A=e[n[0]],u=A.add.vmsk,Y=A.add.vstk,b=A.add.vogk,a=new x(H.E.Q,!0);
|
|
a.data={e:H.V.Hh,U:this.id,PF:"main",xb:u?u:null,qy:b};o.J(a)};D.vi.prototype.UR=function($,o,T,s,E){var e=$.n4;
|
|
if(e.xb){var n=T.Vp(),A=n[0],u=n[1];if(u.length==0)return;var Y=A[u[0]],b=Y.add.vmsk.clone(),a=JSON.stringify(Y.add.vogk),w=e.xb;
|
|
this.Fi(T,Y.II,w,e.qy);var X=[18,5];if(b.g.length==w.g.length)X=b.D[0]==w.D[0]?"Fill Rule":"Path Order";
|
|
this.nA(T,X,Y.II,b,w,null,a,JSON.stringify(e.qy))}};D.ne=function(){D.Ie.call(this,[10,28],D.Yp,"tools/dselect");
|
|
this.ri=-1;this.vk=-1;this.on=null;this.Kg=null;this.EN=null;this.vJ=null;this.Kn=null;this.fN=null;
|
|
this.iA=0;this.ak8={psnap:!1};this.bW=null};D.ne.prototype=new D.Ie;D.ne.prototype.ut=function($){return $.jw};
|
|
D.ne.prototype.UR=function($){this.ak8=$};D.ne.prototype.A2=function($,o,T,s,E){if($.e=="crnr"){if(T==null)return;
|
|
var e=T.Vp(),n=e[0],A=e[1];if(A.length==0){alert("No paths selected");return}var u=n[A[0]],Y=u.add.vmsk;
|
|
if(Y.Rc.length==0){alert("No corners selected");return}for(var f=0;f<Y.Rc.length;f++){var b=Y.g[Y.Rc[f]];
|
|
if(!b.W.R1(b.JL)||!b.W.R1(b.Wq)){alert("Only sharp corners can be rounded");return}}if(this.vJ==null){this.vJ=u.add.vmsk.clone();
|
|
this.Kn=JSON.stringify(u.add.vogk);this.EN=u;this.fN=T}var a=new x(H.E.Q,!0);a.data={e:H.V.NC,a_:"cornerradius",C5:5,Wi:this.abX.bind(this)};
|
|
o.J(a)}else D.Ie.prototype.A2.call(this,$,o,T,s,E)};D.ne.prototype.abX=function($){if($=="confirm"){var o=this.fN,T=this.EN,s=T.add.vmsk,E=T.add.vogk;
|
|
this.nA(o,[12,94,0],T.II,this.vJ,s,null,this.Kn,JSON.stringify(E));this.wA();return}var s=this.vJ.clone(),E=JSON.parse(this.Kn),e=s.Rc;
|
|
if($=="cancel"){}else{var n=[];for(var f=0;f<e.length;f++){var A=e[f],u=L.A.c9(s.g,A,!0),a=0;if(n.indexOf(u)!=-1)continue;
|
|
n.push(u);var Y=L.A.kE(s.g,u,!0),b=s.g[Y].length,w=[];for(var X=0;X<b;X++){var N=s.Rc.indexOf(Y+X+1)==-1?0:$;
|
|
w.push(N);if(N!=0)a++}L.A.Tf(s.g,Y,w);for(var X=0;X<e.length;X++)if(e[X]>Y+b)e[X]+=a}this.uw(s,E);s.Rc=[]}this.Fi(this.fN,this.EN.II,s,E);
|
|
if($=="cancel")this.wA()};D.ne.prototype.disable=function($,o,T,s){this.l2($)};D.ne.prototype.iO=function($,o,T,s,E){this.l2($);
|
|
var e=$.C.VD(E.x,E.y),a,w,X;this.on=e.clone();var n=$.Vp(),A=n[0],u=n[1];if(u.length==0)return;var Y=4*H.K()/$.C.X,b=new df(e.x-Y,e.y-Y,Y*2,Y*2);
|
|
for(var N=0;N<u.length;N++){a=this.EN=A[u[N]];w=a.add.vmsk;X=L.A.PW(w.g,b);if(X[0].length+X[1].length+X[2].length!=0)break}var z=[!1,!1,!1];
|
|
for(var f=0;f<3;f++){for(var i=0;i<X[f].length;i++)if(w.Rc.indexOf(X[f][i])!=-1){X[f]=[X[f][i]];z[f]=!0;
|
|
break}}if(X[0].length!=0&&(z[0]||!z[1]&&!z[2])){var k=X[0][0],Q=w.Rc.indexOf(k);if(s.L(dN.Et)){if(Q==-1)w.Rc.push(k);
|
|
else{w.Rc.splice(Q,1);$.Cd=!0;return}}else if(Q==-1)w.Rc=[k];this.ri=k;this.vk=0}else if(X[1].length!=0&&(z[1]||!z[2])){this.ri=X[1][0];
|
|
this.vk=1}else if(X[2].length!=0&&z[2]){this.ri=X[2][0];this.vk=2}else{var O=L.A.cM(w.g,e,!0,Y);if(O.II==-1)this.Kg=e;
|
|
else{w.D=[O.II];w.Rc=[]}}if(this.vJ==null){this.vJ=a.add.vmsk.clone();this.Kn=JSON.stringify(a.add.vogk)}this.bW=new ds(e);
|
|
$.Cd=!0};D.ne.prototype.ZS=function($,o,T,s,E){if($==null)return;var e=$.C.VD(E.x,E.y),n=this.EN;if(this.ri!=-1){var A=this.vJ.clone(),u=n.add.vogk,Y=A.g[this.ri];
|
|
Y=[Y.W,Y.Wq,Y.JL][this.vk];if(s.L(dN.Et)){if(this.vk==0)e=this.bW.$Z(e,s);else e=D.eH.mq(A.g[this.ri].W,e);
|
|
e.x+=Y.x-this.on.x;e.y+=Y.y-this.on.y}else{if(this.ak8.psnap){e.x=Math.round(e.x);e.y=Math.round(e.y)}e=D.aD.yu($,e,T)}if(this.vk==0){var b=new fY(1,0,0,1,e.x-Y.x,e.y-Y.y);
|
|
L.A.hR(A.g,b,null,A.Rc)}else{var a=A.g[this.ri],w=a.Wq,X=a.JL;if(this.vk==2){w=a.JL;X=a.Wq}if(s.L(dN.BJ)&&(a.type==1||a.type==4))a.type++;
|
|
w.A5(e.x,e.y);if(a.type==1||a.type==4){var N=aY.Sa(w,a.W),z=aY.Sa(X,a.W);if(z!=0){X.x=a.W.x-(w.x-a.W.x)*(z/N);
|
|
X.y=a.W.y-(w.y-a.W.y)*(z/N)}}}this.uw(A,u);this.Fi($,n.II,A,u)}else if(this.Kg!=null){var i=this.Kg;
|
|
$.n.JU=L.M.Uo(new df(i.x,i.y,e.x-i.x,e.y-i.y));$.Cd=!0}else{var k=$.Vp(),Q=k[0],O=k[1],n,A,G;if(O.length==0)return;
|
|
var c=4*H.K()/$.C.X,B=new df(e.x-c,e.y-c,c*2,c*2);for(var l=0;l<O.length;l++){n=Q[O[l]];A=n.add.vmsk;
|
|
G=L.A.PW(A.g,B);if(G[0].length+G[1].length+G[2].length!=0)break}this.l2($);for(var f=0;f<3;f++){for(var v=0;
|
|
v<G[f].length;v++){var p=G[f][v],P=A.g[p];P=f==0?P.W:f==1?P.Wq:P.JL;$.n.v$.push($.n.hz.length>>>1);$.n.hz.push(P.x,P.y);
|
|
$.Cd=!0}}}};D.ne.prototype.l2=function($){if($&&$.n.hz.length!=0){$.n.hz=[];$.n.v$=[];$.Cd=!0}};D.ne.prototype.yg=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=this.EN,A=n?n.add.vmsk:null,u=n?n.add.vogk:null;
|
|
if(this.ri!=-1){if(Date.now()-this.iA<300){var Y=A.g[this.ri],b=this.vk,a=null;if(b==0){var w=Y.Wq.R1(Y.W),X=Y.JL.R1(Y.W);
|
|
if(!w&&!X){a="Anchor Type";if(Y.type==1||Y.type==4)Y.type++;else{Y.type--;Y.JL=Y.W.add(Y.W.V4(Y.Wq))}}else{a="Add Handles";
|
|
if(w&&X){Y.Wq.x-=30;Y.JL.x+=30}else if(w)Y.Wq=Y.W.add(Y.W.V4(Y.JL));else if(X)Y.JL=Y.W.add(Y.W.V4(Y.Wq))}}else{a="Remove Handle";
|
|
if(b==1)Y.Wq.sn(Y.W);else Y.JL.sn(Y.W)}this.uw(A,u);this.Fi($,n.II,A,u);this.nA($,a,n.II,this.vJ,A,null,this.Kn,JSON.stringify(u))}else if(!this.on.R1(e)){this.nA($,"Drag Anchors",n.II,this.vJ,A,null,this.Kn,JSON.stringify(u))}this.iA=Date.now()}else if(this.Kg!=null){var N=this.Kg,z=new df(N.x,N.y,e.x-N.x,e.y-N.y);
|
|
if(z.d<0)z.x+=z.d;if(z.w<0)z.y+=z.w;z.d=Math.abs(z.d);z.w=Math.abs(z.w);var i=L.A.PW(A.g,z);A.Rc=i[0].concat(s.L(dN.Et)?A.Rc:[]);
|
|
$.n.JU=null}this.wA();$.Cd=!0};D.ne.prototype.wA=function(){this.EN=null;this.vJ=null;this.Kg=null;this.ri=this.vk=-1;
|
|
this.bW=null};D.ne.prototype.uw=function($,o){for(var f=0;f<$.Rc.length;f++){var T=L.A.c9($.g,$.Rc[f]);
|
|
L.qy.qZ(o,T)}};D.ne.prototype.Vb=function($,o,T,s){if($==null)return;var E=$.Vp(),e=E[0],n=E[1];if(n.length==0)return;
|
|
var A=e[n[0]],u=A.add.vmsk;if(u==null||u.Rc.length==0)return;var Y=A.add.vogk,b=JSON.stringify(Y),a=s.cu();
|
|
if(a.x!=0||a.y!=0){var w=u.clone(),X=u.clone(),N=new fY(1,0,0,1,a.x,a.y);L.A.hR(X.g,N,null,X.Rc);this.uw(X,Y);
|
|
this.Fi($,A.II,X,Y);this.nA($,"Move Anchors",$.D[0],w,X.clone(),!0,b,JSON.stringify(Y))}if(s.L(dN.sV)||s.L(dN.Ln))this.A2({e:"remove",ano:!0},o,$,s,T)};
|
|
D.ne.prototype.nA=function($,o,T,s,E,e,n,A){var u=$.OY();if(e&&u!=null&&u.U==this&&u.data.ar8&&u.data.Sk==T&&JSON.stringify(u.data.B_.Rc)==JSON.stringify(s.Rc)){u.data.Q0=E;
|
|
u.data.SQ=A}else{var u=new dt(o,this);u.data={Sk:T,B_:s,Q0:E,ar8:e,aqX:n,SQ:A};$.g4(u)}};D.Rect=function(){D.U5.call(this,[10,32],D.kb,"tools/rect",!0)};
|
|
D.Rect.prototype=new D.U5;D.Rect.prototype.G8=function($,o,T){var s=this.Em.crad,E=o.x-$.x,e=o.y-$.y;
|
|
return[L.A.XG.Rect($.x,$.y,E,e,s),L.qy.ya("Rctn",[$.x,$.y,o.x,o.y],[s,s,s,s])]};D.Xi=function(){D.U5.call(this,[10,33],D.iM,"tools/ellipse",!0)};
|
|
D.Xi.prototype=new D.U5;D.Xi.prototype.G8=function($,o,T){var s=o.x-$.x,E=o.y-$.y;return[L.A.XG.Xi($.x,$.y,s,E),L.qy.ya("Elps",[$.x,$.y,o.x,o.y])]};
|
|
D.e3=function(){D.U5.call(this,[10,34],D.ar,"tools/pshape",!1)};D.e3.prototype=new D.U5;D.e3.prototype.G8=function($,o,T){var s=this.Em.pshape,E=this.Em.crad,e=this.Em.irad/100,n=this.Em.sides,A=this.Em.width,u=this.Em.tsiz,Y=this.Em.length,i;
|
|
o=o.clone();if(T){if(Math.abs(o.x-$.x)<Math.abs(o.y-$.y))o.x=$.x;else o.y=$.y}var b=$.x,a=$.y,w=o.x,X=o.y,N=Math.sqrt((w-b)*(w-b)+(X-a)*(X-a)),z=Math.atan2(-X+a,w-b);
|
|
if(s==0)i=L.A.XG.QQ(b,a,N,z,n,E);if(s==1)i=L.A.XG.a6C(b,a,N,z,n,E,e);if(s==2)i=L.A.XG.a4e($.x,$.y,o.x,o.y,A,u/100);
|
|
if(s==3)i=L.A.XG.a7H(b,a,N,z,Y);return[i,L.qy.ya("customShape",[$.x,$.y,o.x,o.y],null,null,null,"--")]};
|
|
D.e3.prototype.Vb=function($,o,T,s){var E=s.cu(),e=this.Em,n,A;if(E.y!=0){var u=-E.y,Y=e.pshape;if(Y<2){n="sides";
|
|
A=Math.max(3,Math.min(100,e.sides+u))}else if(Y==2){n="width";A=Math.max(1,Math.min(100,e.width+u))}else if(Y==3){n="length";
|
|
A=Math.max(4,Math.min(40,e.length+u))}}if(E.x!=0){n="pshape";A=Math.max(0,Math.min(3,e.pshape+E.x))}if(n){var b=new x(H.E.Q,!0),a={};
|
|
a[n]=A;e[n]=A;b.data={e:H.V.Hh,U:this.id,f8:"vals",a62:a};o.J(b);this.ZS($,o,T,s)}};D.VG=function(){D.U5.call(this,[10,35],D.Xn,"tools/line",!1)};
|
|
D.VG.prototype=new D.U5;D.VG.prototype.G8=function($,o,T){var s=this.Em.width;o=o.clone();if(T){o=D.eH.mq($,o)}return[L.A.XG.VG($.x,$.y,o.x,o.y,s),L.qy.ya("Ln",null,null,[$.x,$.y,o.x,o.y],s)]};
|
|
D.yU=function(){D.U5.call(this,[10,31],D.MG,"tools/cshape",!0)};D.yU.prototype=new D.U5;D.yU.prototype.G8=function($,o,T){var s=this.Em.shape,E=s.UK.d/s.UK.w,e=M.PZ.IN(s.g);
|
|
o=o.clone();if(T){o.y=$.y+(o.x-$.x)/E}var n=o.x-$.x,A=o.y-$.y;L.A.hR(e,new fY(n,0,0,A,$.x,$.y));return[e,L.qy.ya("customShape",[$.x,$.y,o.x,o.y],null,null,null,s.Eq)]};
|
|
D.p=function($,o,T){D.wB.call(this,$,o,T);this.Ag=0;this.u=null;this.sX=null;this.mh=null;this.nH=1;
|
|
this.DX=!1;this.cursor=null;this.k2=null;this.I9=null;this.yI=!1;this.Mr=null;this.aol=0;this.iH=null;
|
|
this.pY=0;this.FF=null;this.Id=null;this.Us=null;this.GS=null;this.aqa=null;this.tI=null};D.p.prototype=new D.wB;
|
|
D.p.T3=function($,o){var T={classID:"null",null:aj.D4("Dcmn",!0)};if($)T.Angl={t:"UntF",v:{type:"#Ang",val:o}};
|
|
else T.Axis={t:"enum",v:{Ornt:o}};return{Wk:$?"rotateEventEnum":"flip",bI:T}};D.p.prototype.oW=function($,o,T,s,E){var e=new x(H.E.Q,!0);
|
|
e.data={e:H.V.Hh,U:this.id,bg:E,ZU:$,mh:T};o.J(e);this.s3=!1};D.p.prototype.ut=function($){return this.Id&&this.Id.Zk()};
|
|
D.p.prototype.A2=function($,o,T,s,E){this.mh=E;if($.e=="again"&&this.iH==null)return;if(!this.fn(T,E))return;
|
|
if(this.Id){this.Ir($,this.Id.vT());this.AG(T,E,0,!0);this.Qf(T);return}this.Bq(T,$.c==null,$.c);this.bM(T);
|
|
this.Ir($);this.ap(T,o,$.U1,!1)};D.p.prototype.Ir=function($,o){var T=this.FF;if(o==null){var s=$.wh!=null?$.wh:4;
|
|
o=this.Id.a7B()[s]}var E=o.x,e=o.y;if($.e=="rot"&&$.H!=Math.PI&&(T.d+T.w&1)==1){E=Math.floor(E);e=Math.floor(e)}var n=new fY;
|
|
n.translate(-E,-e);if($.e=="rot")n.rotate($.H);if($.e=="scl")n.scale($.H.x,$.H.y);if($.e=="mat")n.concat($.H);
|
|
n.translate(E,e);if($.e=="again")n=this.iH;var A=this.Id.kd();L.M.t(A,n,A);this.Id.SP(A)};D.p.prototype.xQ=function(){return!0};
|
|
D.p.prototype.fn=function($,o){if($==null)return!1;if(this.id==D.zF)return $.Z!=null;var T=$.v1(!0,null,null,!0);
|
|
if(this.id==D.P4&&$.u[T[0]].rect.p4()){alert("Layer is empty.");return!1}for(var f=0;f<T.length;f++){var s=$.u[T[f]];
|
|
if(s.iQ(2)||s.iQ(31)){alert(aX.get([6,57,0]));return!1}if(s.add.artb){alert("You can not transform the whole artboard");
|
|
return!1}if(s.add.TySh)if(!hA.NP(s.add.TySh,o.vv))return!1;if(s.add.SoLd){if(T.length==1&&!L.Rt.nP(s.add.SoLd.warp.v)&&(s.yy()&&s.yy().lq||s.add.vmsk&&s.add.vmsk.lq)){alert("Unlink masks before transforming Smart Object");
|
|
return!1}if(!$.a7o(s.add.SoLd.Idnt.v)){alert("Unsupported format of the smart object ("+$.bK(s.add.SoLd.Idnt.v).FZ+")");
|
|
return!1}}}if($.Z==null)return!0;if(!$.Jt())return!1;return $.Sq()};D.p.prototype.iO=function($,o,T,s,E){var e=$.C.VD(E.x,E.y);
|
|
if(this.pY==1){var n=L.$.lY(L.$.TU(this.Id.kd(),this.FF));e=L.$.rg(n,e)}var A=this.pY==0?this.Id:this.Us;
|
|
this.DX=A.iO($,T,s,e);if(this.DX&&A.YI(e)){if(Date.now()-this.aol<250)this.ap($,o,null,!0);this.aol=Date.now()}};
|
|
D.p.prototype.Rb=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.bl,j$:this.cursor};$.J(o)};D.p.prototype.ZS=function($,o,T,s,E){var e=$.C.VD(E.x,E.y);
|
|
if(this.pY==1){var n=L.$.lY(L.$.TU(this.Id.kd(),this.FF));e=L.$.rg(n,e)}var A=this.pY==0?this.Id:this.Us;
|
|
if(!E.jw){var u="default";if(A){var Y=A.KX(e,$.C.X);if(Y)u=Y}if(u!=this.cursor){this.cursor=u;this.Rb(o)}}if(!this.DX)return;
|
|
A.ZS($,T,s,e);this.AG($,T,0,!0);this.Qf($);this._0(o)};D.p.prototype.yg=function($,o,T,s,E){var e=$.C.VD(E.x,E.y);
|
|
this.Id.yg($,T,s,e);this.DX=!1};D.p.prototype.Vb=function($,o,T,s){if(s.L(dN.FT))this.ap($,o,null,!0);
|
|
else if(s.L(dN.R5))this.zl($,o);else{var E=this.Id.Vb($,T,s);if(E){this.AG($,T,0,!0);this._0(o)}}};D.p.prototype.UR=function($,o,T,s){if($.PF=="commit")this.ap(T,o,null,!0);
|
|
else if($.PF=="cancel")this.zl(T,o);else if($.PF=="switchWarp"){this.pY=1-this.pY;this.a19();this.Qf(T);
|
|
this._0(o)}else if($.PF=="wrp"){this.Us.vC($.O5);this.Qf(T);this.AG(T,this.mh,0,!0)}else if($.PF=="ctyp"){this.Id.aor($.hu);
|
|
this.Qf(T);this._0(o)}else if($.PF=="cen"){this.Id.a3$($.wS);this.Qf(T);this.AG(T,this.mh,0,!0);this._0(o)}else if($.PF=="trn"){var E=L.$.KQ($.sj),e=this.FF,n=L.$.TU(this.Id.kd(),this.FF);
|
|
E[6]=n[6],E[7]=n[7];var A=[e.x,e.y,e.x+e.d,e.y,e.x+e.d,e.y+e.w,e.x,e.y+e.w];L.$.t(E,A);this.nH=$.nH;
|
|
this.Id.SP(A);this.Qf(T);this.AG(T,this.mh,0,!0)}};D.p.prototype.Qf=function($){if(this.pY==0)this.Id.cD($,this.mh);
|
|
else{this.Us.cD($);var o=L.$.TU(this.Id.kd(),this.FF);L.$.t(o,$.n.JU.I);L.$.t(o,$.n.EJ)}};D.p.prototype.ap=function($,o,T,s){this.AG($,this.mh,this.nH);
|
|
var E=new dt(T?T:this.name,this);if(this.Ag==0)E.data={type:this.Ag,u:this.u,Mr:this.sX,Y6:D.p.cG($,this.u)};
|
|
else if(this.Ag==1){var e=$.u[this.u[0]],n;if(e._I.dQ<=0){n=L.G(e._I._9.Y());L.Ge(e._I.YS,n,3)}else n=$.Z.channel;
|
|
var A={rect:e._I._9.clone(),channel:n};E.data={type:this.Ag,c:this.u[0],I9:this.I9,a3:A,k2:this.k2,yI:this.yI,_I:e._I,Mr:this.Mr,Y6:{uL:e._I._9,ah:e._I.YS}}}else if(this.Ag==2){E.data={type:this.Ag,I9:this.I9,a3:{rect:$.Z.rect.clone(),channel:$.Z.channel.slice(0)}}}$.g4(E);
|
|
var u=this.FF,Y=new aY(u.x+u.d/2,u.y+u.w/2),b=L.$.TU(this.Id.kd(),u),a=L.$.JV(b),w=new fY;w.translate(Y.x,Y.y);
|
|
w.concat(a);w.translate(-Y.x,-Y.y);a=w.clone();var X=-Math.atan2(-a.P,a.Ca),N=new fY;N.rotate(X);a.concat(N);
|
|
function z(Q,O){return{t:"UntF",v:{type:["#Pxl","#Prc","#Ang"][O],val:Q}}}var i=aj.D4("Lyr",!0);if(this.id==D.zF)i.v[0]={t:"prop",v:{classID:"Chnl",keyID:"fsel"}};
|
|
var k={classID:"null",null:i,FTcs:{t:"enum",v:{QCSt:"Qcsa"}},Intr:{t:"enum",v:{Intp:"Bcbc"}},Ofst:{t:"Objc",v:{__name:"Offset",classID:"Ofst",Hrzn:z(w.Ry,0),Vrtc:z(w.Es,0)}},Skew:{t:"Objc",v:{classID:"Pnt",Hrzn:z(Math.atan(a.Z9)*180/Math.PI,2),Vrtc:z(0,2)}},Wdth:z(a.Ca*100,1),Hght:z(a.Um*100,1),Angl:z(X*180/Math.PI,2)};
|
|
this.YO=o;this.track({Wk:"transform",bI:k});this.escape($,o,s)};D.p.prototype.zl=function($,o){if(this.Ag==0)D.p.we($,this.u,this.sX);
|
|
else if(this.Ag==1){var T=$.u[this.u[0]];$.Z=this.I9;if(!this.yI){T._I._9=this.Mr.uL;T._I.YS=this.Mr.ah;
|
|
T.Rq($,0,0,$.Z)}else{T.qf($,this.k2)}$.T();$.L5=!0}else if(this.Ag==2){$.Z=this.I9;$.L5=!0}this.escape($,o,!0)};
|
|
D.p.prototype.escape=function($,o,T){this.Id.clear($);this.Id=null;this.Us=null;this.tI=null;this.pY=0;
|
|
if(T)this.lz(o,H.E.Q,{e:H.V.o4})};D.p.prototype.wx=function($,o){if($.type==0)D.p.we(o,$.u,$.Y6);else{if($.type==1){var T=o.u[$.c];
|
|
if($.yI){T._I=$._I}else{T._I._9=$.Y6.uL;T._I.YS=$.Y6.ah}T.Rq(o,0,0,o.Z);o.T()}o.Z={rect:$.a3.rect.clone(),channel:$.a3.channel.slice(0)};
|
|
o.L5=!0}};D.p.prototype.OK=function($,o){if($.type==0)D.p.we(o,$.u,$.Mr);else{if($.type==1){var T=o.u[$.c];
|
|
if($.yI){T.qf(o,$.k2)}else{T._I._9=$.Mr.uL;T._I.YS=$.Mr.ah;T.Rq(o,0,0,o.Z)}o.T()}o.Z=$.I9;o.L5=!0}};
|
|
D.p.prototype.Bq=function($,o,T){$.Vp();var s=[];if(T==null)for(var f=0;f<$.dl.length;f++)if($.w5[$.dl[f]].add.vmsk.g.length>2)s.push(-1-$.dl[f]);
|
|
var E=[],e=$.C.xR;if(e[0]+e[1]+e[2]==3)if(T!=null||s.length==0||$.T7!=null&&$.T7.length!=0)E=$.v1(o,T,null,!0);
|
|
E=E.concat(s);for(var f=0;f<$.el.length;f++)E.push(-1e3-$.el[f]);this.u=E};D.p.prototype.enable=function($,o,T,s,E,e,n){if(this.cursor==null)this.cursor="default";
|
|
this.Rb(o);if(this.Id)return;this.mh=T;this.Bq($,!0);this.bM($,e&&e.Rz!=null&&e.Rz!=-1?e.Rz:null,n);
|
|
this._0(o);this.Qf($);if(e&&e.Rz==-1)this.UR({PF:"switchWarp"},o,$,s)};D.p.prototype._0=function($){var o={e:H.V.Hh,U:this.id};
|
|
if(this.pY==0){var T=L.$.TU(this.Id.kd(),this.FF),s=L.$.JV(T);o.sj={Ak:s,hu:this.Id.ar4(),wS:this.Id.vT(),uL:this.FF.clone()}}else{o.O5=this.Us.$n()}o.a5m=this.Us!=null;
|
|
this.lz($,H.E.Q,o)};D.p.prototype.bM=function($,o,T){var s=this.id==D.zF,E=!0,e=this.u[0],n=$.u[e],u=null;
|
|
if(s){this.Ag=2;this.I9=$.Z}else if($.Z&&this.u.length==1&&e>=0&&!n.rect.p4()){this.Ag=1;this.I9=$.Z;
|
|
this.k2=n._I;this.yI=!1;if(!n.jx($,$.Z)){this.yI=!0;n.Yd($,$.Z,!1)}this.Mr={ah:n._I.YS,uL:n._I._9}}else{this.Ag=0;
|
|
this.sX=D.p.cG($,this.u,null,T);for(var f=0;f<this.sX.length;f++)if(this.sX[f][3]!=null)E=!1}var A=this.Ag==1;
|
|
if(this.sX&&this.sX.length==1){var Y=this.sX[0];if(Y[3]==null)A=!0;if(Y[4]!=null){u=$.u[this.u[0]].add.SoLd;
|
|
if(Y[1]||Y[2])A=!1}}var b=s?$.Z.rect.clone():D.p.rX($,this.u,T);this.FF=b;if(!s&&u){var a=D.p.GQ(u.nonAffineTransform);
|
|
this.FF=L.M.L3(L.Rt.wW(u.warp.v));if(A)this.Us=new hv(u.warp.v);this.GS=L.$.TU(a,this.FF);this.Id=new dY(a,!0,!0,E,!1,!1,o)}else{if(A||s)this.Us=new hv(L.Rt.G(this.FF));
|
|
this.GS=[1,0,0,0,1,0,0,0];if(this.id==D.P4)o=3;this.Id=new dY([b.x,b.y,b.x+b.d,b.y,b.x+b.d,b.y+b.w,b.x,b.y+b.w],!0,!0,E,!1,!1,o)}this.aqa=[1,0,0,0,1,0,0,0];
|
|
if(this.id==D.P4){var w,X;if(this.sX){var N=this.sX[0][0],z=N.Ti;w=z[0];X=z[1]}else if(this.Mr){w=this.Mr.ah;
|
|
X=this.Mr.uL}this.tI=L.m7.a1u(w,X.d,X.w)}};D.p.rX=function($,o,T){if(o==null)o=$.v1(!0,null,null,!0);
|
|
var s=new df,E=new df;if($.Z&&o.length==1&&o[0]>=0)s=$.Z.rect.clone();else for(var f=0;f<o.length;f++){var e=o[f],n=0<=e?$.u[e]:-1e3<e?$.w5[-1-e]:$.iy[-1e3-e],A=n.add?n.add.vmsk:null,u=0<=e?n.TC($,o.length==1,!1,T):-1e3<e?L.A.hT(A.g,o.length==1&&A.D.length!=0?A.D:null):n.rect.clone();
|
|
s=s.BZ(u);if(e>0&&n.add.artb)E=E.BZ(n.co())}return!E.p4()?E:s};D.p.prototype.lz=function($,o,T,s){var E=new x(o,!0);
|
|
E.data=T;if(s)E.U=s;$.J(E)};D.p.cG=function($,o,T,s){var E=[];for(var f=0;f<o.length;f++){var e=o[f],n,A;
|
|
if(e>=0){n=$.u[e];A=n.Kj($,T,s)}else if(e>-1e3){n=$.w5[-1-e];A=[2]}else{E.push([null,null,null,null,null,null,null,$.iy[-1e3-e].clone()]);
|
|
continue}var u=[];if(A.indexOf(0)!=-1){var Y={Ti:[n.buffer.slice(0),n.rect.clone()]};u.push(Y);if(n.HC()){var b=n.DE($);
|
|
Y.al$=b.buffer.slice(0);Y.apI=b.rect.clone()}}else u.push(null);if(A.indexOf(1)!=-1)u.push(n.yy().clone());
|
|
else u.push(null);if(A.indexOf(2)!=-1)u.push({xb:n.add.vmsk.clone(),ci:n.add.vstk?JSON.parse(JSON.stringify(n.add.vstk)):null,n$:n.add.vstk?D.Ie.pe($,e):null,qy:n.add.vogk?JSON.parse(JSON.stringify(n.add.vogk)):null});
|
|
else u.push(null);if(n.add.TySh&&u[0]){g8.J2(n.add.TySh);u.push(n.add.TySh.t.clone())}else u.push(null);
|
|
if(n.add.SoLd&&u[0])u.push(JSON.parse(JSON.stringify(n.add.SoLd)));else u.push(null);if(A.indexOf(3)!=-1)u.push(n.DE($)._.clone());
|
|
else u.push(null);if(n.add.lmfx)u.push(JSON.stringify(n.add.lmfx));else u.push(null);E.push(u)}return E};
|
|
D.p.we=function($,o,T){for(var f=0;f<o.length;f++){var s=o[f],E=0<=s?$.u[s]:-1e3<s?$.w5[-1-s]:$.iy[-1e3-s],e=T[f];
|
|
if(e[0]){E.rect=e[0].Ti[1].clone();E.buffer=e[0].Ti[0].slice(0);if(E.HC()){var n=E.DE($);n.buffer=e[0].al$.slice(0);
|
|
n.rect=e[0].apI.clone()}}if(e[1]){E.yy().channel=e[1].channel.slice(0);E.yy().rect=e[1].rect.clone();
|
|
E.yy().Or=!0}if(e[2]){E.add.vmsk=e[2].xb.clone();if(e[2].n$)D.Ie.wm(E,e[2].n$);if(e[2].ci)E.add.vstk=JSON.parse(JSON.stringify(e[2].ci));
|
|
if(e[2].qy)E.add.vogk=JSON.parse(JSON.stringify(e[2].qy))}if(e[3]){E.add.TySh.t=e[3].clone();g8.mg(E.add.TySh)}if(e[4]){E.add.SoLd=JSON.parse(JSON.stringify(e[4]))}if(e[5]){var A=E.DE($)._;
|
|
A.channel=e[5].channel.slice(0);A.rect=e[5].rect.clone()}if(e[6]){E.add.lmfx=JSON.parse(e[6])}if(e[7]){E.channel=e[7].channel.slice(0);
|
|
E.rect=e[7].rect.clone();E.Or=!0}if(0<=s){E.tF($);E.T()}}$.T()};D.p.jZ=function($){var o=$.clone(),T=Math.atan2(-o.P,o.Ca),s=new fY;
|
|
s.rotate(-T);o.concat(s);return(Math.abs(o.Ca)+Math.abs(o.Um))/2};D.p.ja=function($,o,T,s,E,e,n,A,u,Y){if(typeof e[0]=="number"){var b=[];
|
|
for(var f=0;f<T.length;f++)b[f]=e;e=b}for(var f=0;f<T.length;f++){var a=e[f],w=L.$.JV(a),X=D.p.jZ(w),N=T[f],z=0<=N?$.u[N]:-1e3<N?$.w5[-1-N]:$.iy[-1e3-N],i=s[f];
|
|
if(i[0]&&z.add.lmfx&&A)fW.XF(z.add.lmfx,X);if(i[0]&&!i[3]&&!i[4]&&!i[5]){var k=i[0].Ti;if(u){var Q=u.clone(),O=L.G(Q.Y()*4);
|
|
L.h9(k[0],k[1],O,Q);k=[O,Q]}var c=D.p.wN(k,E,a,n,E==0?z.buffer.buffer:null,null,null,Y);if(c){z.rect=c.rect;
|
|
z.buffer=c.buffer}}if(i[1]){var B=z.yy();D.p.Y8($,i[1],B,E,a,n);if(u){var Q=z.rect.Sr(u),G=L.G(Q.Y());
|
|
L.pg(B.channel,B.rect,G,Q);B.channel=G;B.rect=Q}}if(i[2]){var l=n&&!L.Rt.nP(n),v=i[2].xb.clone(),p=T.length==1&&v.D.length!=0,P=T.length==1&&v.Rc.length>1;
|
|
if(P)p=!1;var h=p?v.D:null,j=P?v.Rc:null;if(l){var C=L.Rt.wW(n);L.$.t(a,C);L.A.a50(v.g,C,h,j)}else L.A.aiv(v.g,a,h,j);
|
|
if(z.add.vstk&&A){z.add.vstk.strokeStyleLineWidth.v.val=i[2].ci.strokeStyleLineWidth.v.val*X;var V=i[2].n$;
|
|
if(V&&V.Ul==3){V=JSON.parse(JSON.stringify(V));var d=V.n$.phase.v;V.n$.Scl.v.val=Math.round(V.n$.Scl.v.val*X);
|
|
d.Hrzn.v=Math.round(d.Hrzn.v*X);d.Vrtc.v=Math.round(d.Vrtc.v*X);D.Ie.wm(z,V)}}if(z.add.vogk){z.add.vogk=JSON.parse(JSON.stringify(i[2].qy));
|
|
if(l||P)L.qy.a8M(z.add.vogk);else L.qy.t(z.add.vogk,a,T.length>1?[]:v.D,A)}v.DI*=X;z.add.vmsk=v;if(z.add.vogk)L.qy.Iy(z.add.vogk,z.add.vmsk)}if(i[3]){var m=i[3].clone();
|
|
m.concat(w);z.add.TySh.t=m;g8.mg(z.add.TySh);var R=new iq(z.add.TySh.h3,o.vv),g=hA.rW(R,z.add.TySh);
|
|
z.rect=g.uL;z.buffer=g._3}if(i[4]){var S=z.add.SoLd,F=D.p.GQ(i[4].nonAffineTransform);L.$.t(a,F);var r=L.M.$l(F);
|
|
if(dY.ss(F)){if(n){var q=L.M.L3(L.Rt.wW(i[4].warp.v)),G=L.$.TU(F,q),W=L.M.L3(L.Rt.wW(n));F=[W.x,W.y,W.x+W.d,W.y,W.x+W.d,W.y+W.w,W.x,W.y+W.w];
|
|
L.$.t(G,F);S.warp.v=n}var Z=L.$.TU(F),I=F;if(!L.$._r(Z)){Z[6]=Z[7]=0;I=[0,0,1,0,1,1,0,1];L.$.t(Z,I)}S.Trnf=D.p.vP(I);
|
|
S.nonAffineTransform=D.p.vP(F);if(S.filterFX)S.filterFX=JSON.parse(JSON.stringify(i[4].filterFX));D.p.dj(S,w);
|
|
z.qI($,E==0)}}if(i[5])D.p.Y8($,i[5],z.DE($)._,E,a,n);if(i[7])D.p.Y8($,i[7],z,E,a,n);if(0<=N){if(E!=0)z.Gg();
|
|
z.tF($);z.T()}}$.T()};D.p.qh=function($,o,T,s,E,e){if(T==null)T=!1;return D.p.wN($,T?0:1,L.$.KQ(o),null,s,E,e,T)};
|
|
D.p.wN=function($,o,T,s,E,e,n,A){if(A==null)A=!1;if(A&&n)throw"e";var u={},w=0,X=.3;if(s&&!L.Rt.nP(s)){var Y=L.Rt.wW(s);
|
|
L.$.t(T,Y);u.rect=L.M.$l(Y);u.buffer=L.G(u.rect.Y()*4);L.ha.drawImage(Y,$[0],$[1].d,$[1].w,u.buffer,u.rect,o==0);
|
|
return u}L.mc($);var b=$[0],a=$[1],N=a.Y()*D.p.jZ(L.$.JV(T));if(A&&N>4e6)X=N>8e6?2.2:1.2;while(w+3<$.length&&$[w+3].Y()>16&&L.$._r(T)&&D.p.jZ(L.$.JV(T))<X){w+=2;
|
|
var z=$[w],i=$[w+1],k=a.d/i.d,Q=a.w/i.w;T=L.$.E8(T,[1,0,a.x,0,1,a.y,0,0]);T=L.$.E8(T,[k,0,0,0,Q,0,0,0]);
|
|
T=L.$.E8(T,[1,0,-a.x,0,1,-a.y,0,0]);a=i;b=z}var O=L.$.E8(T,L.$.KQ(new fY(a.d,0,0,a.w,a.x,a.y))),c=[0,0,1,0,1,1,0,1];
|
|
L.$.t(O,c);u.rect=L.M.$l(c);if(n)u.rect=u.rect.Sr(n);if(A){while((u.rect.d&3)!=0)u.rect.d++;while((u.rect.w&3)!=0)u.rect.w++}if(!dY.ss(c)||u.rect.d>1e5||u.rect.w>1e5||u.rect.Y()>3e4*3e4)return null;
|
|
var B=u.rect.Y()*4;if(E&&E.byteLength>=B&&B>=E.byteLength>>2){u.buffer=new Uint8Array(E)}else{u.buffer=L.G(B)}L.$.drawImage(O,b,a.d,a.w,u.buffer,u.rect,o==0,e,A);
|
|
if(o==2&&u.buffer){var G=u.rect.d,l=u.rect.w,v;v=[0,-1,0,-1,16,-1,0,-1,0];v=L.TS.Hx(v);var p=u.buffer.slice(0);
|
|
L.TS.ls(p,u.buffer,G,l,v,255,!1,!0)}if(u.buffer)return u};D.p.Y8=function($,o,T,s,E,e){if(o.color==255)L.lY(o.channel);
|
|
var n=o.rect,A=L.G(n.Y()*4);L.aM(o.channel,A,3);var u=D.p.wN([A,n],s,E,e);if(u){T.rect=u.rect;T.channel=L.G(u.rect.Y());
|
|
L.Ge(u.buffer,T.channel,3);T.Or=!0}if(o.color==255){L.lY(o.channel);if(u)L.lY(T.channel)}};D.p.dj=function($,o){var T=$.filterFX;
|
|
if(T)T=T.v.filterFXList;if(T)T=T.v;if(T)for(var s=0;s<T.length;s++){var E=T[s].v.Fltr;if(E==null||E.v.classID!="rigidTransform")continue;
|
|
E=E.v;console.log(E);var e=[];for(var n=0;n<4;n++)e.push(E["PuX"+n].v,E["PuY"+n].v);L.M.t(e,o,e);for(var n=0;
|
|
n<4;n++){E["PuX"+n].v=e[n*2];E["PuY"+n].v=e[n*2+1]}var A=["PinP","posFinalPins"],u=["originalVertexArray","deformedVertexArray"],Y=E.puppetShapeList.v;
|
|
for(var b=0;b<Y.length;b++){var a=Y[b].v;for(var w=0;w<A.length;w++){var X=D.p.GQ(a[A[w]]);L.M.t(X,o,X);
|
|
a[A[w]]=D.p.vP(X);var N=new Uint8Array(a[u[w]].v),z=new Float32Array(N.buffer);L.M.t(z,o,z);var i=[];
|
|
for(var k=0;k<N.length;k++)i[k]=N[k];a[u[w]].v=i}}}};D.p.GQ=function($){var o=[],T=$.v.length;for(var f=0;
|
|
f<T;f++)o.push($.v[f].v);return o};D.p.vP=function($){var o={t:"VlLs",v:[]},T=$.length;for(var f=0;f<T;
|
|
f++)o.v.push({t:"doub",v:$[f]});return o};D.p.prototype.a19=function(){var $=L.M.L3(L.Rt.wW(this.Us.$n())),o=L.$.TU(this.Id.kd(),this.FF),T=[$.x,$.y,$.x+$.d,$.y,$.x+$.d,$.y+$.w,$.x,$.y+$.w];
|
|
L.$.t(o,T);this.Id.SP(T);this.FF=$};D.p.prototype.AG=function($,o,T,s){var E=L.$.TU(this.Id.kd(),this.FF);
|
|
E=L.$.E8(E,L.$.lY(this.GS));var e=this.Us?this.Us.$n():null;if(this.Ag==0){var n=this.iH=L.$.JV(E);if(this.id==D.P4){var A=this.sX[0][0],u=A.Ti,Y=u[1],b=~~(Y.d*Math.max(0,n.Ca)),a=~~(Y.w*Math.max(0,n.Um)),w=new df(Math.round(n.Ca*Y.x+n.Ry),Math.round(n.Um*Y.y+n.Es),b,a),X=L.m7.t(this.tI,w),N=$.u[this.u[0]];
|
|
N.buffer=X;N.rect=w;N.T();$.T()}else D.p.ja($,o,this.u,this.sX,T,E,e,null,null,s)}else if(this.Ag==1){var z=$.u[this.u[0]],Y=this.Mr.uL;
|
|
if(z.dQ<=0){var i=this.Mr.ah,k=this.I9,Q=null;if(e&&!L.Rt.nP(e)&&!k.rect.R1(Y)){var X=L.G(k.rect.Y()*4);
|
|
L.h9(i,Y,X,k.rect);i=X;Y=k.rect}if(this.id==D.P4){var n=this.iH=L.$.JV(E),b=~~(Y.d*Math.max(0,n.Ca)),a=~~(Y.w*Math.max(0,n.Um)),w=new df(Math.round(n.Ca*Y.x+n.Ry),Math.round(n.Um*Y.y+n.Es),b,a),X=L.m7.t(this.tI,w);
|
|
Q={buffer:X,rect:w}}else Q=D.p.wN([i,Y],T,E,e);if(Q){z._I.YS=Q.buffer;z._I._9=Q.rect;var O=L.G(Q.rect.Y());
|
|
L.Ge(z._I.YS,O,3);$.Z={channel:O,rect:z._I._9.clone()}}}else{var c=L.G(Y.Y()*4);L.aM(this.Mr.ah,c,3);
|
|
var Q=D.p.wN([c,Y],T,E,e);if(Q){z._I.YS=L.G(Q.rect.Y());L.Ge(Q.buffer,z._I.YS,3);z._I._9=Q.rect}this.J$($,T,E,e)}z.Rq($,0,0,$.Z);
|
|
if(T!=0){z.Gg();L.Gg($.Z)}$.L5=!0;$.T()}else if(this.Ag==2)this.J$($,T,E,e)};D.p.prototype.J$=function($,o,T,s){var E=this.I9.rect,e=L.G(E.Y()*4);
|
|
L.aM(this.I9.channel,e,3);var n=D.p.wN([e,E],o,T,s),A=L.G(n.rect.Y());L.Ge(n.buffer,A,3);$.Z={channel:A,rect:n.rect};
|
|
$.L5=!0};D.p.prototype.disable=function($,o,T,s){if(this.Id)this.ap($,o,null,!0)};D.HB=function(){D.p.call(this,[10,16],D.tj,"tools/transform")};
|
|
D.HB.prototype=new D.p;D.vm=function(){D.p.call(this,[7,10],D.zF,"tools/transform")};D.vm.prototype=new D.p;
|
|
D.BQ=function(){D.p.call(this,[10,48],D.P4,"tools/transform")};D.BQ.prototype=new D.p;D.dq=function($,o,T){D.wB.call(this,[10,46],D.w_,"tools/transform");
|
|
this.V1=[1,1,2,!0];this.jX="rigidTransform";this.BE=null;this.a1T=null;this.jb=null;this.hW=null;this.d_=null;
|
|
this.H8=null;this.DG=[]};D.dq.prototype=new D.wB;D.dq.prototype.xQ=function(){return!0};D.dq.qE=function($){if($==null)return!1;
|
|
if($.D.length!=1)return!1;var o=$.u[$.D[0]];return o.add.SoLd||$.Jt(!1)};D.dq.prototype.fn=function($,o){return D.dq.qE($)};
|
|
D.dq.prototype.enable=function($,o,T,s,E,e,n){this.a1T=e.t$;var A=e.t$,u,z=null;if(A){var Y=$.u[A.c];
|
|
if(Y.add.SoLd.filterFX!=null){var b=Y.add.SoLd.filterFX.v.filterFXList.v;if(b[A.index])u=JSON.parse(JSON.stringify(b[A.index].v.Fltr.v))}}var a=u==null,Y=$.u[$.D[0]],w=Y.buffer,X=Y.rect,N=Y.add.SoLd;
|
|
if(N){var i=N.nonAffineTransform.v;z=[];for(var f=0;f<4;f++)z.push(i[f*2].v,i[f*2+1].v);if(a)this.zr("edit",o);
|
|
var k=Y.DE($);w=k.buffer;X=k.rect}this.BE={buffer:w.slice(0),rect:X.clone(),a8v:z};if(a)u=D.dq.Xp(this.BE,this.V1);
|
|
this.jb=u;this.hW=D.dq.Qg(this.jb,this.V1);this.f1();this.GT($);if(a)this.iB(o);var Q=new x(H.E.Q,!0);
|
|
Q.data={e:H.V.Hh,U:this.id,M9:this.V1};o.J(Q);Q.data={e:H.V.bl,j$:"default"};o.J(Q)};D.dq.prototype.disable=function($,o,T,s){if(this.hW)this.ap($,o,!0)};
|
|
D.dq.prototype.f1=function($){var o=this.hW;this.DG=[];for(var f=0;f<o.length;f++){var T=o[f];for(var s=0;
|
|
s<T.D.length;s++)this.DG.push([f,T.D[f]]);T.Y0=L.pZ.QN(T);if($)L.pZ.cd(T)}};D.dq.prototype.UR=function($,o,T,s){if($.PF=="commit")this.ap(T,o,!0);
|
|
else if($.PF=="cancel")this.zl(T,o,!0);else if($.PF=="prm"){var E=!1;for(var f=0;f<3;f++)if(this.V1[f]!=$.M9[f])E=!0;
|
|
this.V1=$.M9;if(E){this.jb=D.dq.Xp(this.BE,this.V1,this.jb);this.hW=D.dq.Qg(this.jb,this.V1);this.f1(!0);
|
|
this.iB(o)}this.GT(T)}else if($.PF=="moveDepth"){var e=this.hW;for(var n=0;n<e.length;n++){var A=e[n];
|
|
for(var f=0;f<A.D.length;f++){var u=A.D[f];A.yO[u]+=$.a1A?1:-1}}this.iB(o)}};D.dq.prototype.Ty=function($,o){return $==dN.sV||$==dN.Ln};
|
|
D.dq.prototype.Vb=function($,o,T,s){var E=s.cu();if(s.L(dN.FT))this.ap($,o,!0);else if(s.L(dN.R5))this.zl($,o,!0);
|
|
else if(s.L(dN.sV)||s.L(dN.Ln)){var e=this.hW;for(var n=0;n<e.length;n++){var A=e[n];A.D.sort(function(b,a){return a-b});
|
|
for(var f=0;f<A.D.length;f++){var u=A.D[f],Y=u*2;A.yO.splice(u,1);A.Z6.splice(u,1);A.BS.splice(u,1);
|
|
A.nr.splice(u,1);A.dw.splice(Y,2);A.HS.splice(Y,2)}A.D=[];if(A.nr.length==0){A.mw=A.ZL.slice(0);A.YL=A.ZL.slice(0)}}this.f1(!0);
|
|
this.iB(o);this.GT($)}else if(E.x!=0||E.y!=0){this.pi($,E.x,E.y,o);this.nw=null}};D.dq.prototype.ap=function($,o,T){this.zr("confirm",o);
|
|
this.escape($,o,T)};D.dq.prototype.zl=function($,o,T){this.zr("cancel",o);this.escape($,o,T)};D.dq.prototype.escape=function($,o,T){$.n.JU=null;
|
|
$.n.hz=[];$.Cd=!0;this.hW=null;var s=new x(H.E.Q,!0);s.data={e:H.V.o4};if(T)o.J(s)};D.dq.prototype.iO=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=e.x,A=e.y,u=this.hW,Y=null,b=[0,2,4,1.2,1.2,1.2],a=-1,w=H.K()*5/$.C.X;
|
|
for(var f=0;f<u.length;f++){var X=u[f],N=L.M.KY(X.HS,n,A,w);if(N!=-1)Y=[f,N];if(a==-1&&L.pZ.Rd.ahJ(X.YL,X.Zg,n,A))a=f}if(Y==null&&a!=-1){var X=u[a];
|
|
D.dq.ft(X,n,A,n,A,0);Y=[a,X.nr.length-1];X.Y0=L.pZ.QN(X)}this.d_=e;if(Y){var z=u[Y[0]].D.indexOf(Y[1])!=-1;
|
|
if(s.L(dN.Et)&&!z){u[Y[0]].D.push(Y[1]);this.DG.push(Y)}else if(!z){u[Y[0]].D=[Y[1]];this.DG=[Y]}}this.GT($)};
|
|
D.dq.ft=function($,o,T,s,E,e){var n=L.M.KY($.YL,o,T);$.nr.push(n);$.HS.push(s,E);$.dw.push($.YL[n*2]-o,$.YL[n*2+1]-T);
|
|
$.BS.push(0);$.Z6.push(!1);$.yO.push(e)};D.dq.prototype.ZS=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=this.d_;
|
|
if(n)this.pi($,e.x-n.x,e.y-n.y,o)};D.dq.prototype.pi=function($,o,T,s){var E={},e=this.DG,n=this.hW;
|
|
if(this.nw==null){this.nw=[];for(var f=0;f<n.length;f++)this.nw.push(n[f].HS.slice(0))}for(var f=0;f<e.length;
|
|
f++){var A=this.DG[f],u=A[0],Y=n[A[0]],b=A[1]*2;Y.HS[b+0]=this.nw[u][b+0]+o;Y.HS[b+1]=this.nw[u][b+1]+T;
|
|
E[u]=u}for(var u in E)L.pZ.cd(this.hW[E[u]]);this.GT($);this.iB(s)};D.dq.prototype.zr=function($,o){var T=new x(H.E.N,!0);
|
|
T.U=D.VI;T.data={e:$,t$:this.a1T,jX:this.jX,ed:this.jb};o.J(T)};D.dq.prototype.yg=function($,o,T,s,E){this.d_=null;
|
|
this.nw=null};D.dq.prototype.iB=function($){D.dq.xj(this.hW,this.V1,this.jb);this.zr("edit",$)};D.dq.prototype.GT=function($){var o=this.hW,T=this.jb;
|
|
$.n.JU={I:[],o:[]};$.n.hz=[];$.n.v$=[];for(var f=0;f<o.length;f++){var s=o[f];for(var E=0;E<s.D.length;
|
|
E++)$.n.v$.push(($.n.hz.length>>>1)+s.D[E]);$.n.hz=$.n.hz.concat(s.HS);if(this.V1[3])L.M.concat($.n.JU,L.M.a9X(s.YL,s.Zg))}$.Cd=!0};
|
|
D.dq.Xp=function($,o,T){var s=$.buffer,E=$.rect,e=$.a8v,n=iZ.o_("rigidTransform");if(e)for(var f=0;f<4;
|
|
f++){n["PuX"+f].v=e[f*2];n["PuY"+f].v=e[f*2+1]}var A=n.puppetShapeList.v,u=L.pZ.adJ(s,E.d,E.w,o[1],o[2]),Y=[];
|
|
for(var b=0;b<u.length;b++){var a={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:[]}};
|
|
a.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=u[b];A.push({t:"Objc",v:a});var X=w.ZL.slice(0);L.M.t(X,new fY(1,0,0,1,E.x,E.y),X);var N=w.Zg;
|
|
for(var f=0;f<N.length;f+=3){var z=N[f+1];N[f+1]=N[f+2];N[f+2]=z}Y.push({Zg:N,ZL:X,mw:X,YL:X,nr:[],dw:[],HS:[],Y0:null,D:[],BS:[],Z6:[],yO:[]})}if(T){var i=D.dq.Qg(T,[]),k=Y[0];
|
|
for(var f=0;f<i.length;f++){var Q=i[f];for(var O=0;O<Q.D.length;O++)k.D.push((k.HS.length>>>1)+Q.D[O]);
|
|
for(var O=0;O<Q.nr.length;O++){var c=Q.nr[O]*2,B=Q.ZL[c]-Q.dw[O*2],G=Q.ZL[c+1]-Q.dw[O*2+1];D.dq.ft(k,B,G,Q.HS[O*2],Q.HS[O*2+1],Q.yO[O])}}}D.dq.xj(Y,o,n);
|
|
return n};D.dq.Qg=function($,o){var T=D.p.GQ,s=$.puppetShapeList.v,E=[];for(var e=0;e<s.length;e++){var n=s[e].v;
|
|
o[0]=n.meshRigidity.v-1;o[1]=n.meshQuality.v-1;o[2]=n.meshExpansion.v;var A=n.pinVertexIndices.v.length,u=n.meshBoundaryPath.v.pathComponents.v;
|
|
if(u.length!=0){var Y=u[0].v.SbpL.v[0].v.Pts;Y.v=[]}var b=new Uint32Array(new Uint8Array(n.indexArray.v).buffer),a=new Float32Array(new Uint8Array(n.originalVertexArray.v).buffer),w=new Float32Array(new Uint8Array(n.deformedVertexArray.v).buffer),X=[],N=[],z=[];
|
|
for(var f=0;f<b.length;f++)X.push(b[f]);for(var f=0;f<a.length;f++){N.push(a[f]);z.push(w[f])}var i=T(n.pinVertexIndices),k=T(n.pinOffsets),Q=T(n.posFinalPins),O=T(n.PnRt),c=T(n.PnOv),B=T(n.PnDp),G=T(n.selectedPin);
|
|
E.push({Zg:X,ZL:N,mw:z.slice(0),YL:z,nr:i,dw:k,HS:Q,Y0:null,BS:O,Z6:c,yO:B,D:G})}return E};D.dq.xj=function($,o,T){function s(w,X){var N=[];
|
|
for(var f=0;f<w.length;f++)N.push({t:X,v:w[f]});return N}function E(w,X,N){var z=new(N?Uint32Array:Float32Array)(w),i=new Uint8Array(z.buffer);
|
|
for(var f=0;f<i.length;f++)X[f]=i[f]}var e=T.puppetShapeList.v;for(var n=0;n<e.length;n++){var A=$[n],u=e[n].v;
|
|
u.meshRigidity.v=o[0]+1;u.meshQuality.v=o[1]+1;u.meshExpansion.v=o[2];E(A.Zg,u.indexArray.v,!0);E(A.ZL,u.originalVertexArray.v);
|
|
E(A.YL,u.deformedVertexArray.v);var Y=[];for(var f=0;f<A.nr.length;f++){var b=A.nr[f]*2,a=f*2;Y[a]=A.ZL[b]-A.dw[a];
|
|
Y[a+1]=A.ZL[b+1]-A.dw[a+1]}u.PinP.v=s(Y,"doub");u.pinVertexIndices.v=s(A.nr,"long");u.pinOffsets.v=s(A.dw,"doub");
|
|
u.posFinalPins.v=s(A.HS,"doub");u.PnRt.v=s(A.BS,"long");u.PnOv.v=s(A.Z6,"bool");u.PnDp.v=s(A.yO,"doub");
|
|
u.selectedPin.v=s(A.D,"long")}};D.j3=function($,o,T){D.wB.call(this,$?$:[10,40],o?o:D.zH,T?T:"tools/slice");
|
|
this.EF=null;this.YO=null;this.fw=null;this.akb=null;this.Mc=null;this.Pu=null};D.j3.prototype=new D.wB;
|
|
D.j3.cM=function($,o){var T=-1;for(var f=0;f<$.length;f++){var s=D.j3.ee($,f);if(s[0]<=o.x&&o.x<=s[2]&&s[1]<=o.y&&o.y<=s[3]){T=f;
|
|
break}}return T};D.j3.prototype.A2=function($,o,T,s,E){if(T==null)return;this.UF(T);if($.e=="fromAction"){var e=T.hm(),n=T.Q2(),A=n==-1?new df(0,0,T.d,T.w):T.u[n].co(),u=[A.x,A.x+A.d],Y=[A.y,A.y+A.w];
|
|
for(var f=0;f<e[0].length;f++){var b=e[0][f],a=Math.round(b[1]),w=e[1][f];if(w!=-1&&w!=n)continue;if(b[0]==0&&u.indexOf(a)==-1)u.push(a);
|
|
if(b[0]==1&&Y.indexOf(a)==-1)Y.push(a)}u.sort(function(l,v){return l-v});Y.sort(function(l,v){return l-v});
|
|
for(var X=1;X<Y.length;X++)for(var N=1;N<u.length;N++){T.op.push(D.j3.Vu());D.j3.ta(T.op,T.op.length-1,[u[N-1],Y[X-1],u[N],Y[X]]);
|
|
T.Cd=!0}}else if($.e=="reorder"){if(T.AQ.length==0)return;var z=T.op,i=T.AQ;i.sort(function(l,v){return l-v});
|
|
console.log(i);var k=z.slice(0),Q=[],O=[];for(var f=0;f<i.length;f++){var c=i[f],B=z[c];O.push(B);k.splice(k.indexOf(B),1)}var G=Math.max(0,Math.min(k.length,i[0]-$.dir));
|
|
for(var f=0;f<O.length;f++){k.splice(G+f,0,O[f]);Q.push(G+f)}T.op=k;T.AQ=Q}else if($.e=="delete"){var z=T.op.slice(0);
|
|
for(var f=0;f<T.AQ.length;f++)T.op.splice(T.op.indexOf(z[T.AQ[f]]),1);T.AQ=[]}else{T.op[T.AQ[0]].v=$;
|
|
T.Cd=!0}this.rf(T)};D.j3.prototype.enable=function($,o,T,s,E,e){D.wB.prototype.enable.call(this,$,o,T,s,E,e);
|
|
if(!T.wK.op){var n=new x(H.E.Q,!0);n.data={e:H.V.uY,M9:gr.nd};o.J(n)}};D.j3.prototype.disable=function(){this.EF=null;
|
|
this.YO=null};D.j3.prototype.oW=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=D.j3.cM($.op,e);if(n==-1)return;
|
|
this.EF=$;this.YO=o;$.AQ=[n];$.Cd=!0;if(this.Pu==null){this.Pu=new eb([{name:[5,4]},{name:[8,11,1],vO:!0}]);
|
|
this.Pu.B("select",this.jS,this)}var A=this.Pu;A.parent=o;A.f();A.update($,T);var u=new x(H.E.Q,!0);
|
|
u.data={e:H.V.NM,bF:A,x:E.uT+2,y:E.$T+1};o.J(u)};D.j3.prototype.jS=function($){var o=this.Pu.X1()[0],T=this.EF;
|
|
if(o==0){this.UF(T);T.op.splice(T.AQ[0],1);T.AQ=[];T.Cd=!0;this.rf(T)}if(o==1){var s=new x(H.E.Q,!0);
|
|
s.data={e:H.V.NC,a_:"soptions",H:T.op[T.AQ[0]].v};this.YO.J(s)}};D.j3.prototype.iO=function($,o,T,s,E){if($==null)return;
|
|
this.UF($);var e=$.C.VD(E.x,E.y);e=D.aD.yu($,e,T,[!0,null,!1]);e.x=Math.round(e.x);e.y=Math.round(e.y);
|
|
this.Mc=e;$.op.unshift(D.j3.Vu());$.AQ=[0];D.j3.ta($.op,0,[e.x,e.y,e.x+20,e.y+20]);$.Cd=!0};D.j3.prototype.ZS=function($,o,T,s,E){if(this.fw==null)return;
|
|
var e=$.C.VD(E.x,E.y),n=this.Mc;e=D.aD.yu($,e,T,[!0,null,!1]);e.x=Math.round(e.x);e.y=Math.round(e.y);
|
|
var A=[n.x,n.y,e.x,e.y];D.j3.Ss(A);D.j3.ta($.op,0,A);$.Cd=!0};D.j3.prototype.yg=function($,o,T,s,E){this.rf($);
|
|
this.Mc=null};D.j3.prototype.UF=function($){this.fw=JSON.stringify($.op);this.akb=JSON.stringify($.AQ)};
|
|
D.j3.prototype.rf=function($){var o=JSON.stringify($.op);if(o!=this.fw){var T=new dt(this.name,this);
|
|
T.data={Mr:this.fw,Y6:o,a9w:this.akb,ahh:JSON.stringify($.AQ)};$.g4(T)}this.fw=null};D.j3.prototype.OK=function($,o){o.op=JSON.parse($.Mr);
|
|
o.AQ=JSON.parse($.a9w);o.Cd=!0};D.j3.prototype.wx=function($,o){o.op=JSON.parse($.Y6);o.AQ=JSON.parse($.ahh);
|
|
o.Cd=!0};D.j3.prototype.Ty=function($,o){return o!=null&&o.AQ.length!=0&&($==dN.sV||$==dN.Ln)};D.j3.prototype.Vb=function($,o,T,s){if($==null)return;
|
|
if(s.L(dN.sV)||s.L(dN.Ln))this.A2({e:"delete"},o,$,s,T);var E=s.cu();if(E.x!=0||E.y!=0){this.UF($);D.j3.ij($,E);
|
|
this.rf($)}};D.j3.prototype.UR=function($,o,T,s,E){};D.j3.a0r=function($,o,T,s){var E=new aY(-o.x,-o.y),e=o.d/T.d,n=o.w/T.w,A=[0,0,o.d,o.w];
|
|
for(var f=0;f<$.length;f++){var u=D.j3.ee($,f);if(s){u[0]=Math.round(u[0]*e);u[1]=Math.round(u[1]*n);
|
|
u[2]=Math.round(u[2]*e);u[3]=Math.round(u[3]*n)}else{D.j3.Hy(u,E);D.j3.afl(u,A)}if(u[0]>=u[2]||u[1]>=u[3]){$.splice(f,1);
|
|
f--;continue}D.j3.ta($,f,u)}};D.j3.ij=function($,o){var T=$.op;for(var f=0;f<$.AQ.length;f++){var s=D.j3.ee(T,$.AQ[f]);
|
|
D.j3.Hy(s,o);D.j3.ta(T,$.AQ[f],s)}};D.j3.afl=function($,o){if($[0]<o[0])$[0]=o[0];if($[1]<o[1])$[1]=o[1];
|
|
if(o[2]<$[2])$[2]=o[2];if(o[3]<$[3])$[3]=o[3]};D.j3.Hy=function($,o){$[0]=Math.round($[0]+o.x);$[2]=Math.round($[2]+o.x);
|
|
$[1]=Math.round($[1]+o.y);$[3]=Math.round($[3]+o.y)};D.j3.ta=function($,f,o){var T=$[f].v.bounds.v;T.Left.v=o[0];
|
|
T.Top.v=o[1];T.Rght.v=o[2];T.Btom.v=o[3]};D.j3.ee=function($,f){var o=$[f].v.bounds.v;return[o.Left.v,o.Top.v,o.Rght.v,o.Btom.v,f]};
|
|
D.j3.Ss=function($){if($[2]<$[0]){var o=$[0];$[0]=$[2];$[2]=o}if($[2]==$[0])$[2]++;if($[3]<$[1]){var o=$[1];
|
|
$[1]=$[3];$[3]=o}if($[3]==$[1])$[3]++};D.j3.L3=function($,o){var T=1e9,s=-1e9,E=1e9,e=-1e9;for(var f=0;
|
|
f<o.length;f++){var n=D.j3.ee($,o[f]);T=Math.min(T,n[0]);E=Math.min(E,n[1]);s=Math.max(s,n[2]);e=Math.max(e,n[3])}return[T,E,s,e]};
|
|
D.j3.Vu=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}}}};
|
|
D.CG=function(){D.j3.call(this,[10,41],D.dV,"tools/sselect");this.Mc=null;this.jz=null;this.QF=null;
|
|
this.H8=null;this.Np=!1};D.CG.prototype=new D.j3;D.CG.prototype.iO=function($,o,T,s,E){if($==null)return;
|
|
var e=$.C.VD(E.x,E.y),n=D.CG.$J(e,4/$.C.X,$.op,$.AQ);n.pop();if(n.length!=0){this.Mc=e;this.QF=n;this.UF($);
|
|
return}var A=$.op,u=D.j3.cM(A,e);if(u==-1)$.AQ=[];else{var Y=$.AQ.indexOf(u);if(s.L(dN.Et)){if(Y==-1)$.AQ.push(u);
|
|
else $.AQ.splice(Y,1)}else{$.AQ.sort(function(z,i){return z-i});if(Y==-1)$.AQ=[u];this.Mc=e;this.UF($);
|
|
this.jz=D.j3.L3(A,$.AQ);this.H8=[];for(var f=0;f<$.AQ.length;f++)this.H8.push(D.j3.ee(A,$.AQ[f]));if(s.L(dN.BJ)){var b=A.slice(0),a=$.AQ,w=[];
|
|
for(var f=0;f<a.length;f++){var u=a[f],X=b[u],N=A.indexOf(X);w.push(N);A.splice(N,0,JSON.parse(JSON.stringify(X)))}$.AQ=w}}}$.Cd=!0};
|
|
D.CG.prototype.ZS=function($,o,T,s,E){var e=$.C.VD(E.x,E.y);if(this.Mc==null){var n=D.CG.$J(e,4/$.C.X,$.op,$.AQ),A=n.pop(),u=n.length==0?"default":["ew","nwse","ns","nesw"][A]+"-resize",Y=new x(H.E.Q,!0);
|
|
Y.data={e:H.V.bl,j$:u};o.J(Y);return}if(!this.Np&&e.R1(this.Mc))return;this.Np=!0;var b=$.op,n=this.QF;
|
|
if(n){e=D.aD.yu($,e,T,[!0,null,!1]);var a=Math.round(e.x),w=Math.round(e.y);for(var f=0;f<n.length;f+=2){var X=D.j3.ee(b,n[f]),N=n[f+1];
|
|
X[N]=(N&1)==0?a:w;D.j3.Ss(X);D.j3.ta(b,n[f],X)}}else{var z=e.V4(this.Mc),i=this.jz.slice(0);D.j3.Hy(i,z);
|
|
var k=new df(i[0],i[1],i[2]-i[0],i[3]-i[1]),Q=D.aD.nI($,k,T,[!0,null,!1],!0);D.aD.Fv($,k,Q);z.x+=Q[0];
|
|
z.y+=Q[1];for(var f=0;f<$.AQ.length;f++)D.j3.ta(b,$.AQ[f],this.H8[f]);D.j3.ij($,z)}$.Cd=!0};D.CG.prototype.yg=function($,o,T,s,E){if(this.Mc==null)return;
|
|
this.rf($);$.n.BD=null;$.Cd=!0;this.Mc=null;this.QF=null;this.H8=null;this.Np=!1};D.CG.$J=function($,o,T,s){var E=$.x,e=$.y,n=[],A=-1,u=[];
|
|
for(var f=0;f<s.length;f++){var Y=s[f],b=D.j3.ee(T,Y),a=b[0],w=b[1],X=b[2],N=b[3];if(E<a-o||X+o<E||e<w-o||N+o<e)continue;
|
|
var z=[E<a+o,e<w+o,X-o<E,N-o<e],i=-1;for(var k=0;k<4;k++){if(z[k]&&z[k+1&3])i=1+2*(k&1);if(z[k])n.push(Y,k)}if(i==-1){if(z[0]||z[2])i=0;
|
|
if(z[1]||z[3])i=2}if(i!=-1){A=i;u.push(Y)}}var Q=n.length;for(var f=0;f<Q;f+=2){var Y=n[f],O=n[f+1],c=D.j3.ee(T,Y)[O];
|
|
for(var k=0;k<s.length;k++){var B=s[k];if(u.indexOf(B)!=-1)continue;var b=D.j3.ee(T,B);if(b[O&1]==c)n.push(B,O&1);
|
|
if(b[2+(O&1)]==c)n.push(B,2+(O&1))}}n.push(A);return n};D.DH=function(){D.NK.call(this,[10,44],D.a91,"tools/oselect");
|
|
this.Mf="crosshair";this.aj1=0};D.DH.prototype=new D.NK;D.DH.prototype.gO=function($,o,T,s){if(Math.random()<1/(1+this.aj1)){alert("The cross should be fully inside the object.",3500);
|
|
this.aj1++}};D.DH.prototype.$d=function($,o,T,s){D.b5.yQ($,D.NK.Xu,this.YO);if(!s.jw||!this.E$)return;
|
|
var E=this.rX($,T,!1),e=E.d,n=E.w,A=E.x,u=E.y,Y=E.x+e,b=E.y+n,a=A+e/2,w=u+n/2,X=D.DH.JB;$.n.JU={I:[A,u,Y,u,Y,b,A,b,a-e*X,w,a+e*X,w,a,w-n*X,a,w+n*X],o:"M L L L Z M L M L".split(" ")};
|
|
$.Cd=!0};D.DH.JB=.12;D.DH.prototype.uZ=function($,o,T,s){$.n.JU=null;$.Cd=!0;this.finish($,o,T,s)};D.DH.prototype.getSelection=function($,o,T,s){if(this.GP.R1(this.dF)||!this.E$)return null;
|
|
var E=this.rX($,T,!1),e=$.u[$.D[0]];if(E.p4()||!E.Ha(e.rect))return null;return D.NK.e4("ObSl",E)};D.b5=function(){D.x5.call(this,[10,37],D.y_,"tools/qselect");
|
|
this.Yb="qselect"};D.b5.prototype=new D.x5;D.b5.prototype.iO=function($,o,T,s,E){this.gB($,T,s,E,1);
|
|
if(this.VP==null)return;this.m9($)};D.b5.prototype.ZS=function($,o,T,s,E){this.NF($,o,T);D.b5.yQ($,D.NK.Xu,o);
|
|
if(this.Gh)this.g1($,T,E);if(this.VP==null)return;if(!E.jw)return;var e=this.X$($,T,s,E);if(e!=1)this.m9($)};
|
|
D.b5.yQ=function($,o,T){if($&&o.key!=D.b5.lf($)){o.key=D.b5.lf($);var s=$.u[$.D[0]].rect.Y(),e="Image Analysis ...";
|
|
if(s==0)return;var E=s>1e6,n=new x(H.E.Q,!0);n.data={e:H.V.Cf,_E:e};if(E)T.J(n);setTimeout(function(){var A=D.b5.Zt($);
|
|
for(var u in A)o[u]=A[u];var n=new x(H.E.Q,!0);n.data={e:H.V.jp,_E:e};if(E)T.J(n)},30)}};D.b5.lf=function($){var o=$.D[0],T=$.u[o],s=T.rect,E=s.d,e=s.w,n=E*e,A=T.buffer;
|
|
return[o,s.x,s.y,E,e,A[0],A[1],A[2],A[3]].join(",")};D.b5.Zt=function($){var o=$.D[0],T=$.u[o],s=T.rect,E=s.d,e=s.w,n=E*e,A=T.buffer,u=Date.now(),Y=L.G(n);
|
|
Y.fill(128);var b=L.Ej.An(A,E,e);console.log(Date.now()-u);var a={key:D.b5.lf($),BR:A,rect:s.clone(),N0:E,cQ:e,Al:12,ajR:!1,_D:Y,fM:b,Z:L.G(n),fD:null,NY:null,c0:null};
|
|
D.b5.nG(a);return a};D.b5.nG=function($,o){var T=$.N0,s=$.cQ,E=0,e=0,n=Date.now(),A=$.fD!=null&&L.Ej.a1_($.fM.Zg,$.fD.Zg,$.fD.BL,$._D);
|
|
E=Date.now()-n;n=Date.now();if(!A&&!$.ajR){$.fD=L.Ej.dX($.fM,T,s,$._D,$.Al);if(!L.Ej.a1_($.fM.Zg,$.fD.Zg,$.fD.BL,$._D)){$.ajR=!0;
|
|
console.log("conflict")}$.NY=L.Ej.a4v($.BR,T,s,$.fD.Zg,$.fD.BL);$.c0=[$.NY[0].slice(0),[]];e=Date.now()-n;
|
|
n=Date.now()}var n=Date.now();if(o){$.c0[0].set($.NY[0]);var u=$.NY[1],Y=$.c0[1];for(var b=0;b<u.length;
|
|
b++)Y[b]=u[b].slice(0);L.Ej.ao5($.fD.Zg,T,s,$.fD.BL,$._D,$.Z,$.c0)}};D.EC=function(){D.wB.call(this,"Artboard Tool",D.aaX,"tools/artb");
|
|
this.ab4=!1;this.Id=null;this.mP=!1;this.aqe=null;this.kt=100;this.hd=null};D.EC.prototype=new D.wB;
|
|
D.EC.C1=function($,o){var T=$[0],s=0,E=0;if(T==0)E=-1;else if(T==1)s=1;else if(T==2)E=1;else s=-1;return[20/o.Hp,$[1]+s*60/o.Hp,$[2]+E*60/o.Hp]};
|
|
D.EC.prototype.nv=function($,o,T,s){if(T.D3!=this.id)return;if($==null||$.D.length!=1){this.wA($);return}var E=$.D[0],e=$.u[E],n=e.add.artb;
|
|
if(n==null){this.wA($);return}if(this.mP)return;var A=e.co(),u=L.M.Uo(A).I,Y=this.Id=new dY(u,!0,!1,!1,!0,!1,3,!1);
|
|
Y.cD($,T,!1);var b={I:[1,0],o:["M"]};for(var f=1;f<30;f++){var a=Math.PI*2*f/30;b.I.push(Math.cos(a),Math.sin(a));
|
|
b.o.push("L")}b.o.push("Z","M","L","M","L");b.I.push(-.5,0,.5,0,0,-.5,0,.5);var w=A.x+A.d/2,X=A.y+A.w/2,N=this.kt*1.1,z=this.aqe=[w,A.y,A.x+A.d,X,w,A.y+A.w,A.x,X],i=[0,-N,N,0,0,N,-N,0],k=$.root.children;
|
|
$.n.WG=[];for(var f=0;f<4;f++){var Q=new aY(z[f*2]+i[f*2],z[f*2+1]+i[f*2+1]),O=!1;for(var c=0;c<k.length;
|
|
c++){var e=k[c].c;if(e.add.artb==null)continue;var A=e.co();if(A.dv(Q))O=!0}if(O){z[f*2]=1e9;continue}$.n.WG.push([f,z[f*2],z[f*2+1]])}};
|
|
D.EC.prototype.disable=function($,o,T,s,E){this.wA($)};D.EC.prototype.wA=function($){if(this.Id){this.Id.clear($);
|
|
this.Id=null;$.n.WG=null}};D.EC.prototype.iO=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=this.Id;if(n){var A=new x(H.E.N),u=n.h5(null,e,$.C.X);
|
|
if(u<9){this.mP=n.iO($,T,s,e,null,!0);return}else if(n.YI(e)){A.U=D.ih;A.data={e:"disabAuto"};o.J(A);
|
|
var Y=new x(H.E.Q);Y.data={e:H.V.s9,U:D.ih,a1H:!0};o.J(Y);return}else{var b=-1,a=$.n.WG;for(var f=0;
|
|
f<a.length;f++){var w=D.EC.C1(a[f],$.C);if(aY.Sa(e,new aY(w[1],w[2]))<w[0])b=a[f][0]}if(b!=-1){var X=$.u[$.D[0]].co(),N=X.clone(),z=(b==0||b==2?X.w:X.d)+this.kt;
|
|
if(b==0||b==3)z=-z;if(b==0||b==2)X.y+=z;else X.x+=z;if(s.L(dN.BJ)){A.U=D.Jc;A.data={e:M.NO};o.J(A);D.aD.FY($,$.v1(null,$.D[0],null,!0),null,X.x-N.x,X.y-N.y);
|
|
D.LY.lN($)}else this.Sl($,X,o);return}}}this.hd=D.aD.yu($,e,T)};D.EC.prototype.Sl=function($,o,T){var s=$.u.slice(0),E=[$.u.length+1],e=$.$f();
|
|
e.tM("Artboard "+($.root.children.length+1));e.add.lsct=hd.NH;e.y2(o);e.fh="pass";e.Jp=24;if($.add.artd||o.Sr(new df(0,0,$.d,$.w)).p4())s.push($.jK());
|
|
else s.unshift($.jK());s.push(e);var n=new x(H.E.N);n.U=D.Jc;n.data={e:M.Ia,c_:s,a3:E,U1:"New Artboard"};
|
|
T.J(n)};D.EC.prototype.ZS=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=this.Id,A=this.hd;if(n){if(this.mP){n.ZS($,T,s,e)}else{var u=n.KX(e,$.C.X);
|
|
if(u==null)u="default";var Y=new x(H.E.Q,!0);Y.data={e:H.V.bl,j$:u};o.J(Y)}}if(A){var b=this.ee($,e,s,T);
|
|
$.n.JU=L.M.Uo(b);$.Cd=!0;D.wB.C9(E.x+10,E.y-10,b,$,T)}};D.EC.prototype.yg=function($,o,T,s,E){var e=$.C.VD(E.x,E.y),n=this.hd;
|
|
if(this.mP){this.Id.yg($,T,s,e);this.mP=!1;var A=L.M.$l(this.Id.kd()),u=M.V5(A),Y=$.u[$.D[0]],b=JSON.parse(JSON.stringify(Y.add.artb));
|
|
b.artboardRect.v=u;var a=new x(H.E.N,!0);a.U=D.Jc;a.data={e:M.uh,Sv:b};o.J(a)}if(n){var w=this.ee($,e,s,T);
|
|
if(w.Y()>20)this.Sl($,w,o);$.n.JU=null;$.Cd=!0;this.hd=null;$.n.bt=[]}};D.EC.prototype.ee=function($,o,T,s){var E=this.hd,e=D.aD.yu($,o,s),n=D.U5.XS(E,e,T,!0);
|
|
E=n[0];e=n[1];return L.M.$l([E.x,E.y,e.x,e.y])};function dY($,o,T,s,E,e,n,A){this.Jo=null;this.kZ=$?$.slice(0):null;
|
|
this.pN=4;this.dF=null;this.dc=null;this.qo=null;this.hC=-1;this.Vs=null;this.amX=!1;this.a3l=[];for(var f=0;
|
|
f<8;f++)this.a3l.push(eY.af0(0,PIMG.rotate,-.5,-.5,-45-f*45));this.apt=o;this.a25=T;this.aj$=s;this.ary=E;
|
|
this.aia=e;this.Rz=n;this.a3S=A==null?1:A}dY.prototype.Zk=function(){return this.hC!=-1};dY.prototype.kd=function(){return this.kZ.slice(0)};
|
|
dY.prototype.SP=function($){this.kZ=$};dY.prototype.a7B=function(){return this.ew(this.kZ)};dY.prototype.ar4=function(){return this.pN};
|
|
dY.prototype.aor=function($){this.pN=$};dY.prototype.vT=function($){if($==null)$=this.kZ;if(this.pN==9)return this.dF;
|
|
else return this.ew($)[this.pN]};dY.prototype.a3$=function($){if(this.pN==9)this.dF=$.clone();else{var o=this.vT(),T=new fY(1,0,0,1,$.x-o.x,$.y-o.y);
|
|
L.M.t(this.kZ,T,this.kZ)}};dY.prototype.KX=function($,o,T){var s=this.h5(null,$,o),E;if(s==9)return"default";
|
|
if(s==10){if(T)return null;return!this.apt?"move":null}if(s==-1||s==4)return null;if(s==11){var e=this.vT().V4($);
|
|
E=90-Math.atan2(e.y,e.x)*180/Math.PI;var n=Math.round(8*(E/360));n=(n+8)%8;return this.a3l[n]}else{var A=this.up($,this.kZ);
|
|
E=[135,90,45,180,0,0,225,270,315][s];var u=L.$.TU(this.kZ);E+=Math.atan2(-u[3],u[0])*180/Math.PI;var Y="ew nesw ns nwse ew nesw ns nwse".split(" "),n=Math.round(8*(E/360));
|
|
n=(n+8)%8;return Y[n]+"-resize"}};dY.prototype.up=function($,o){var T=L.$.lY(L.$.TU(o)),s=new Float64Array(2);
|
|
L.$.Da($.x,$.y,T,s);return new aY(s[0],s[1])};dY.prototype.YI=function($){var o=this.up($,this.kZ);return 0<=o.x&&o.x<=1&&0<=o.y&&o.y<=1};
|
|
dY.prototype.iO=function($,o,T,s,E,e){this.amX=e;this.Vs=s;var n=$.C.X,A;if(this.kZ==null)s=D.aD.yu($,s,o);
|
|
this.qo=s.clone();if(this.kZ==null){this.qo.offset(1,1);var u=E==null?1:1/E;this.kZ=[s.x,s.y,s.x+1,s.y,s.x+1,s.y+u,s.x,s.y+u];
|
|
A=8}else{A=this.h5(T,s,n);if(0<=A&&A<=8)this.qo=this.ew(this.kZ)[A];if(A==9){this.pN=9;this.dF=s.clone()}}this.Jo=this.kZ.slice(0);
|
|
this.hC=A;this.cD($,o);this.dc=this.vT();return A!=-1};dY.prototype.h5=function($,o,T){var s=-1,E=this.ew(),e=6*H.K()/T;
|
|
if(s==-1)if(aY.Sa(this.vT(),o)<e)s=9;if(s==-1)for(var f=0;f<E.length;f++)if(f!=4&&aY.Sa(E[f],o)<e)s=f;
|
|
if(s==-1&&$&&$.L(dN.BJ))s=9;if(s==-1||this.Rz==4){if(this.YI(o)){if(this.apt)s=10}else{var n=this.up(o,this.kZ),A=new df(0,0,1,1);
|
|
A.Mi(.2,.2);s=A.dv(n)&&this.Rz!=3?11:10}}return s};dY.prototype.ZS=function($,o,T,s){if(this.hC==-1)return;
|
|
this.Vs=s;var E=T.L(dN.Et),e=T.L(dN.BJ),n=T.L(dN.I6),A=$.C.X,u=this.qo,Y=this.hC,b=this.ew(),a=D.aD.yu($,u,o),w=D.aD.yu($,s,o),X,N;
|
|
if(Y==9){var b=this.ew(),z=-1;for(var f=0;f<b.length;f++)if(aY.Sa(b[f],w)*A<10)z=f;this.pN=z==-1?9:z;
|
|
this.dF=E?D.eH.mq(a,w):w.clone()}else if(Y==10){N=L.M.L3(this.Jo);var i=N.x,k=N.y;N.offset(s.x-u.x,s.y-u.y);
|
|
if(this.BH()){N.x=Math.round(N.x);N.y=Math.round(N.y)}X=D.aD.nI($,N,o);var Q=new fY(1,0,0,1,N.x-i+X[0],N.y-k+X[1]);
|
|
L.M.t(this.Jo,Q,this.kZ)}else if(Y==11){var O=this.vT(this.Jo),c=O.V4(s),B=O.V4(u),G=Math.atan2(c.y,c.x),l=Math.atan2(B.y,B.x),Q=new fY(1,0,0,1,-O.x,-O.y),v=Math.PI/12;
|
|
if(E)Q.rotate(Math.round((l-G)/v)*v);else Q.rotate(l-G);Q.translate(O.x,O.y);L.M.t(this.Jo,Q,this.kZ)}else{var p,P=this.Jo,h=Y==0||Y==2||Y==6||Y==8;
|
|
if(this.Rz==1){if(h)E=e=n=!0}else if(this.Rz==2&&h&&this.amX!=!0)n=!0;if(this.Rz==3)n=!1;if(this.aj$&&h&&n){var f=[0,0,2,0,0,0,6,0,4,0][Y],j=-1,C=w.x,V=w.y;
|
|
if(E){var d=f+6&7,m=f+10&7,R=dY.rO(P[f],P[f+1],P[d],P[d+1],w.x,w.y),g=dY.rO(P[f],P[f+1],P[m],P[m+1],w.x,w.y),S=R[2]<g[2]?R:g;
|
|
C=S[0];V=S[1];if(e)j=R[2]<g[2]?d:m}else if(e)j=f+4&7;p=P.slice(0);if(j!=-1){var F=P[j],r=P[j+1],q=(P[f]+F)/2,W=(P[f+1]+r)/2;
|
|
p[j]=q-(C-q);p[j+1]=W-(V-W)}p[f]=C;p[f+1]=V}else if(h&&e){var O=this.dc,Z=O.x,I=O.y,_=a.x-Z,cN=a.y-I,ce=1,gf=1;
|
|
if(Math.abs(_)>=1)ce=(w.x-Z)/_;if(Math.abs(cN)>=1)gf=(w.y-I)/cN;if(E)ce=gf=(ce+gf)/2;var K=new fY;K.translate(-Z,-I);
|
|
K.scale(ce,gf);K.translate(Z,I);p=P.slice(0);L.M.t(p,K,p)}else{if(this.BH()){w.x=Math.round(w.x);w.y=Math.round(w.y)}var cv=[0,1,2,5,8,7,6,3],f0=cv[(cv.indexOf(Y)+4)%8],i8=[];
|
|
for(var f=0;f<3;f++)for(var j=0;j<3;j++)i8.push(new aY(j/2,f/2));var O=this.dc,b5=this.up(w,P),iC=this.up(u,P),an=e&&(this.pN==4||this.pN==9)?this.up(O,P):i8[f0],cO=new fY,bh=new fY,ce=(b5.x-an.x)/(iC.x-an.x);
|
|
if(ce==0)ce=1e-4;var gf=(b5.y-an.y)/(iC.y-an.y);if(gf==0)gf=1e-4;if(this.ary){ce=Math.max(ce,0);gf=Math.max(gf,0)}if(Y==0||Y==2||Y==6||Y==8){if(E||this.aia)cO.scale(ce,ce);
|
|
else cO.scale(ce,gf)}if(Y==1||Y==3||Y==5||Y==7){var bD=this.aia;if(Y==1||Y==7)cO.scale(bD?gf:1,gf);else cO.scale(ce,bD?ce:1);
|
|
if(this.a25&&n){if(Y==1||Y==7)bh.Z9=(b5.x-an.x)/(b5.y-an.y);else bh.P=(b5.y-an.y)/(b5.x-an.x)}}var K=new fY;
|
|
K.translate(-an.x,-an.y);K.concat(cO);K.concat(bh);K.translate(an.x,an.y);p=[0,0,1,0,1,1,0,1];L.M.t(p,K,p);
|
|
var S=L.$.TU(P);L.$.t(S,p)}if(dY.ss(p))this.kZ=p}this.cD($,o);if(X)D.aD.Fv($,N,X)};dY.rO=function($,o,T,s,E,e){var n=T-$,A=s-o,u=E-$,Y=e-o,b=n*n+A*A,a=u*n+Y*A,w=a/b,X=$+w*n,N=o+w*A,z=E-X,i=e-N;
|
|
return[X,N,Math.sqrt(z*z+i*i)]};dY.prototype.BH=function(){var $=this.kZ;return Math.abs($[1]-$[3])<1e-6&&Math.abs($[2]-$[4])<1e-6||Math.abs($[0]-$[2])<1e-6&&Math.abs($[3]-$[5])<1e-6};
|
|
dY.ss=function($){return L.M.Lb($)||L.M.Lb([$[6],$[7],$[4],$[5],$[2],$[3],$[0],$[1]])};dY.prototype.yg=function($,o,T,s){this.hC=-1;
|
|
this.Vs=null;$.n.BD=null;$.n.bt=[];$.Cd=!0};dY.prototype.Vb=function($,o,T){var s=T.cu();if(s.x||s.y){var E=new fY(1,0,0,1,s.x,s.y);
|
|
L.M.t(this.kZ,E,this.kZ);this.cD($,o);return!0}return!1};dY.prototype.ew=function($){if($==null)$=this.kZ;
|
|
var o=$[6]-$[0],T=$[7]-$[1],s=$[4]-$[2],E=$[5]-$[3],e=[$[0],$[1],$[2],$[3],$[0]+o/2,$[1]+T/2,$[2]+s/2,$[3]+E/2,$[6],$[7],$[4],$[5]],n=[];
|
|
for(var f=0;f<3;f++){var A=f*4,u=e[A+0],Y=e[A+1],b=e[A+2],a=e[A+3];n.push(new aY(u,Y));n.push(new aY(u+(b-u)/2,Y+(a-Y)/2));
|
|
n.push(new aY(b,a))}return n};dY.prototype.cD=function($,o,T){if(T==null)T=!1;var s=this.ew(),E=s[0],e=s[2],n=s[6],A=s[8];
|
|
$.n.JU={o:[],I:[]};$.n.JU.o.push("M","L","L","L","Z");$.n.JU.I.push(E.x,E.y,e.x,e.y,A.x,A.y,n.x,n.y);
|
|
var u=this.a3S;if(u>1){var Y=e.V4(E),b=n.V4(E),a=A.V4(e),w=A.V4(n);for(var f=1;f<u;f++){$.n.JU.o.push("M","L","M","L");
|
|
var X=f/u;$.n.JU.I.push(E.x+Y.x*X,E.y+Y.y*X,n.x+w.x*X,n.y+w.y*X);$.n.JU.I.push(E.x+b.x*X,E.y+b.y*X,e.x+a.x*X,e.y+a.y*X)}}$.C.Xk=new df(0,0,aY.Sa(s[0],s[2]),aY.Sa(s[0],s[6]));
|
|
if(this.hC!=-1&&this.hC<9&&this.Vs){var N=$.C.X8(this.Vs.x,this.Vs.y);D.wB.C9(N.x+10,N.y-10,$.C.Xk,$,o)}if(!T){$.n.EJ=[];
|
|
for(var f=0;f<s.length;f++)if(f!=4)$.n.EJ.push(s[f].x,s[f].y);var z=this.vT();$.n.EJ.push(z.x,z.y)}$.Cd=!0};
|
|
dY.prototype.clear=function($){$.C.Xk=null;$.n.BD=null;$.n.JU=null;$.n.EJ=[];$.Cd=!0};function hv($,o){this.Rt=null;
|
|
this.hC=-1;this.vC($)}hv.prototype.$n=function(){return JSON.parse(JSON.stringify(this.Rt))};hv.prototype.vC=function($){this.Rt=JSON.parse(JSON.stringify($))};
|
|
hv.prototype.YI=function($){return!0};hv.prototype.KX=function($,o){var T=this.h5($,o);if(T==-1)return"default";
|
|
return"pointer"};hv.prototype.iO=function($,o,T,s){this.hC=this.h5(s,$.C.X);return this.hC!=-1};hv.prototype.h5=function($,o){var T=-1,s=20*H.K(),E=this.hB();
|
|
for(var f=0;f<E.length;f++)if(aY.Sa(E[f],$)*o<s)T=f;return T};hv.prototype.ZS=function($,o,T,s){if(this.hC==-1)return;
|
|
var E=$.C.X,e=this.hC,n=L.Rt.wW(this.Rt);n[e*2]=s.x;n[e*2+1]=s.y;L.Rt.X3(n,this.Rt)};hv.prototype.yg=function($,o,T,s){this.hC=-1;
|
|
$.Cd=!0};hv.prototype.Vb=function($,o,T){var s=T.cu();if(s.x||s.y){var E=new fY(1,0,0,1,s.x,s.y);L.M.t(this.kZ,E,this.kZ);
|
|
this.cD($)}};hv.prototype.hB=function($){var o=L.Rt.wW(this.Rt),T=[];for(var f=0;f<o.length;f+=2)T.push(new aY(o[f],o[f+1]));
|
|
return T};hv.prototype.cD=function($){var o=this.hB();$.n.JU={o:[],I:[]};$.n.JU.o.push("M","C","C","C","C");
|
|
var T=[0,1,2,3,7,11,15,14,13,12,8,4,0];for(var f=0;f<T.length;f++)$.n.JU.I.push(o[T[f]].x,o[T[f]].y);
|
|
$.n.JU.o.push("M","L","L","M","L","L","M","L","L","M","L","L");T=[4,0,1,2,3,7,11,15,14,13,12,8];for(var f=0;
|
|
f<T.length;f++)$.n.JU.I.push(o[T[f]].x,o[T[f]].y);$.n.EJ=[];for(var f=0;f<o.length;f++)$.n.EJ.push(o[f].x,o[f].y);
|
|
$.Cd=!0};hv.prototype.clear=function($){$.n.JU=null;$.n.EJ=[];$.Cd=!0};var cf={};cf.e8=function($){this.id=$;
|
|
this.YO=null};cf.e8.prototype.A2=function($,o,T,s,E){};cf.e8.prototype.wx=function($,o){};cf.e8.prototype.OK=function($,o){};
|
|
cf.e8.prototype.track=function($){var o=new x(H.E.b0,!0);o.data=$;$.r5=!0;this.YO.J(o)};cf.History=function(){cf.e8.call(this,D.Ww);
|
|
this.cR=!0;this.akV=0};cf.History.prototype=new cf.e8;cf.History.prototype.A2=function($,o,T,s){T.RZ=!0;
|
|
if($.e=="h_itemchange"){if($.index<T.Q5)for(var f=T.Q5;f>$.index;f--)this.Qp(T);if($.index>T.Q5)for(var f=T.Q5;
|
|
f<$.index;f++)this.Zo(T)}if($.e=="h_stepfwd")this.Zo(T);if($.e=="h_stepbck")this.Qp(T);if($.e=="h_undoredo"){var E=this.cR||this.akV!=T.Q5;
|
|
if(E){this.Qp(T);E=!1}else{this.Zo(T);E=!0}this.cR=E;this.akV=T.Q5}else this.cR=!0};cf.History.prototype.Qp=function($){if($.Q5==0)return;
|
|
var o=$.history[$.Q5];o.U.OK(o.data,$);$.Q5--};cf.History.prototype.Zo=function($){if($.Q5==$.history.length-1)return;
|
|
var o=$.history[$.Q5+1];o.U.wx(o.data,$);$.Q5++};cf.kz=function(){cf.e8.call(this,D.Jc);this.YO=null};
|
|
cf.kz.prototype=new cf.e8;cf.kz.prototype.A2=function($,o,T,s,E){this.YO=o;var e=$.e,n=$.c!=null?$.c:T.D.length!=0?T.D[0]:T.u.length-1,A=T.u[n];
|
|
T.sr=!0;var u=s.L(dN.BJ),Y=s.L(dN.Et),b=s.L(dN.I6);if(e==M.Lu&&T.Z==null)e=M.NO;if(e==M.ZT){var a=new dt([6,33],this),w=A.p3()?["pass"].concat(hI.zk):hI.zk,X=w[$.mI],N=$.c!=null?[$.c]:T.D,z=JSON.stringify(N),i=[];
|
|
for(var f=0;f<N.length;f++)i.push(T.u[N[f]].fh);a.data={e:e,WV:z,AO:i,mI:X};T.g4(a);this.wx(a.data,T);
|
|
this.track(aj.Hn("Md",{t:"enum",v:{BlnM:hI.$j(X)}}))}if(e==M.dR){var a,k=T.OY(),N=$.c!=null?[$.c]:T.D,z=JSON.stringify(N);
|
|
if(k&&k.data&&k.data.e==e&&k.data.WV==z)a=k;else{var Q=aj.Hn("Opct",{t:"UntF",v:{type:"#Prc",val:0}});
|
|
this.track(Q);var i=[];for(var f=0;f<N.length;f++)i.push(T.u[N[f]].opacity);a=new dt([6,32],this);a.data={e:e,WV:z,AO:i,mI:$.mI,QI:Q.bI};
|
|
T.g4(a)}a.data.mI=$.mI;a.data.QI.T.v.Opct.v.val=Math.round($.mI*100/255);this.wx(a.data,T)}if(e==M.yr){if(A.add.iOpa==null)A.add.iOpa=255;
|
|
var a,k=T.OY();if(k&&k.data&&k.data.e==e&&k.data.c==n)a=k;else{a=new dt("Fill Opacity Change",this);
|
|
a.data={e:e,c:n,AO:A.add.iOpa,mI:$.mI};T.g4(a)}a.data.mI=$.mI;this.wx(a.data,T)}if(e==M.gg){var O=$.mI,c=$.c!=null?[$.c]:T.D.slice(0),B=[],G=[],a;
|
|
for(var l=0;l<c.length;l++){var v=T.u[c[l]];if(v.add.lspf==null)v.add.lspf=0;var i=v.add.lspf,X=i;for(var f=0;
|
|
f<O[0].length;f++){var p=O[1][f],P=1<<p;if((X&P)==0&&O[0][f])X^=P;else if((X&P)!=0&&!O[0][f])X^=P}B.push(i);
|
|
G.push(X)}var k=T.OY(),N=JSON.stringify(c);if(k&&k.data&&k.data.e==e&&JSON.stringify(k.data.WV)==N){a=k;
|
|
a.data.mI=G}else{var a=new dt([6,57,1],this);a.data={e:e,WV:N,AO:B,mI:G};T.g4(a)}this.wx(a.data,T)}if(e==M.NI){var h="----",j=$.UQ,X=null;
|
|
for(var f=0;f<gi.mC.qz.length;f++)if(A.add[gi.mC.qz[f]])h=gi.mC.qz[f];var C=A.add[h];if(j=="TySh")X=g8.rm(50,50,E.IT);
|
|
var a=new dt("Layer Type",this);a.data={e:e,c:n,agF:[h,C],UQ:[j,X]};T.g4(a);this.wx(a.data,T)}if(e==M._q){var c=[];
|
|
if(u){var V=T.OY(),d=V?V.data:null;if(V!=null&&V.U==this&&d.e==M._q&&d.WV.length!=1){var m=new x(H.E.N);
|
|
m.U=D.Ww;m.data={e:"h_stepbck"};o.J(m);if(d.c==n)return}var R=T.root.BA(n),g=T.v1(null,n);while(R.parent!=T.root){g.push(R.parent.index);
|
|
R=R.parent}for(var f=0;f<T.u.length;f++){var S=T.u[f],F=S.N9(),r=g.indexOf(f)!=-1;if(!r&&F)c.push(f);
|
|
if(f==n&&!F)c.push(f)}}else{c.push(n);var F=T.u[n].N9(),Q={Wk:F?"hide":"show",bI:{classID:F?"Hd":"Shw",null:{t:"VlLs",v:[aj.D4("Lyr",!0)]}}};
|
|
this.track(Q)}var a=new dt("Layer visibility",this,!0);a.data={e:e,WV:c,c:n};T.g4(a);this.wx(a.data,T)}if(e==M.b7){var q=$.aaO,W=$.Km,_,escape=!1,gf=!1;
|
|
if($.agB){if(b&&(W==0||W==1||W==2)){var Z=0;if(Y)Z++;if(u)Z+=2;var I=new x(H.E.N,!0);I.U=D.ZR;I.data={e:"fromlayer",n4:[$.c,W,Z]};
|
|
o.J(I);return}}var Q={Wk:"select",bI:{classID:"null",MkVs:{t:"bool",v:!1}}};if(T.C.xR.join("")!="111"){T.C.xR=[1,1,1];
|
|
T.Cd=!0}for(var f=0;f<T.u.length;f++){var S=T.u[f];if(S.HC()){var cN=S.DE(T);if(cN&&cN._&&cN._.T9){cN._.T9=!1;
|
|
T.Cd=!0}}var ce=S.yy();if(ce&&ce.T9){ce.T9=!1;T.Cd=!0}}if(s.L(dN.I6)||$.aeY==0){var K=T.D.indexOf(n);
|
|
if(K==-1)T.D.push(n);else if(T.D.length>1)T.D.splice(K,1);T.D.sort(function(a,bl){return a-bl});Q.bI.selectionModifier={t:"enum",v:{selectionModifierType:"addToSelection"}};
|
|
_=n}else if(Y&&!u&&W>0){e=W==1?M.AA:W==2?M.Gt:M.WD;escape=!0}else if((Y||$.aeY==1)&&T.D.length>0){var cv=Math.min(n,T.D[0]),f0=Math.max(n,T.D[T.D.length-1]);
|
|
T.D=[];for(var f=cv;f<=f0;f++)if(T.u[f].add.lsct!=hd.ic)T.D.push(f);Q.bI.selectionModifier={t:"enum",v:{selectionModifierType:"addToSelectionContinuous"}};
|
|
_=n}else{_=n;var S=T.u[n];if(S&&S.p3()&&$.a18)S.add.lsct=hd.NH;else if(T.D.length==1&&T.D[0]==n&&W==S.dQ){gf=!0}if(!gf){T.D=[n];
|
|
T.L4()}}if(!gf){if(_!=null&&_<T.u.length){Q.bI.null={t:"obj ",v:[{t:"name",v:{classID:"Lyr",val:T.u[_].getName()}}]},this.track(Q)}if(!escape){console.log("no escape");
|
|
if(T.D.length==1){var i8=T.D[0];for(var f=0;f<T.u.length;f++){if(f==i8)continue;var v=T.u[f];v.dQ=0;
|
|
v.Jg=!1}var A=T.u[i8];if(W==2){A.Jg=!A.Jg;T.dl=[]}else if(A){A.dQ=W<=0?0:W}}else for(var f=0;f<T.u.length;
|
|
f++){var v=T.u[f];v.dQ=0;v.Jg=!1}T.T7=null;T.RZ=!0}}if($.agB&&u){if((W==1||W==3)&&q!=null){var I=new x(H.E.N,!0);
|
|
I.U=D.S3;I.data={e:"mskView",H:q!=0?0:Y?1:2};o.J(I)}else{this.A2({e:M.Yv,c:$.c},o,T,s,E)}}}if(e==M.AA||e==M.WD){var iC=e==M.AA,an=iC?A.yy():A.DE(T)._;
|
|
if(an==null)return;var a=new dt(an.isEnabled?iC?[6,15]:[6,42]:iC?[6,14]:[6,41],this);a.data={e:e,c:n};
|
|
T.g4(a);this.wx(a.data,T)}if(e==M.Gt){var an=A.add.vmsk;if(an==null)return;var a=new dt(an.isEnabled?[6,17]:[6,16],this);
|
|
a.data={e:e,c:n};T.g4(a);this.wx(a.data,T)}if(e==M.E2){var cO=A.add.lsct==hd.NH?hd.Qm:hd.NH;if(s.L(dN.I6)){var bh=T.root.BA(T.u.indexOf(A)).parent;
|
|
for(var f=0;f<bh.children.length;f++){var bD=bh.children[f].c;if(bD.p3())bD.add.lsct=cO}}else A.add.lsct=cO;
|
|
T.RZ=!0}if(e==M.Yv){if(!T.tL(n))return;var a=new dt(A.WL?[6,19]:[6,18],this);a.data={e:e,c:n};T.g4(a);
|
|
if($.mI==null||$.mI!=A.WL)this.wx(a.data,T);this.track({Wk:"groupEvent",bI:{classID:"GrpL",null:{t:"obj ",v:[aj.D4("Lyr",!0)]}}})}if(e==M.u2){if(A.px())A.Jp-=32;
|
|
else A.Jp+=32;T.RZ=!0}if(e==M.ip||e==M.TN){var a;if(e==M.ip)a=new dt(A.add.lmfx.masterFXSwitch.v?[6,30]:[6,29],this);
|
|
if(e==M.TN)a=new dt(A.add.SoLd.filterFX.v.enab.v?[6,44]:[6,43],this);a.data={e:e,c:n};T.g4(a);this.wx(a.data,T)}if(e==M.KE||e==M.Hj){var i8=$.index,a;
|
|
if(e==M.KE)a=new dt(A.add.lmfx[ev.CP[i8[0]]].v[i8[1]].v.enab.v?[6,30]:[6,29],this);if(e==M.Hj)a=new dt(A.add.SoLd.filterFX.v.filterFXList.v[i8].v.enab.v?[6,44]:[6,43],this);
|
|
a.data={e:e,c:n,index:$.index};T.g4(a);this.wx(a.data,T)}if(e==M.je){if($.src==$.Yf)return;var fq=T.u[$.src],fO=T.u[$.Yf],g6=fq.add.lmfx?JSON.stringify(fq.add.lmfx):"",hM=fO.add.lmfx?JSON.stringify(fO.add.lmfx):"";
|
|
if(fO.add.lmfx==null){fO.add.lmfx=JSON.parse(ev.default);for(var f=0;f<ev.order.length;f++)fO.add.lmfx[ev.CP[f]]={t:"VlLs",v:[]}}if($.XN==null){fO.add.lmfx=JSON.parse(g6);
|
|
if(!u)delete fq.add.lmfx}else{var d3=$.XN[0],h9=ev.CP[d3];if(ev.Eb.indexOf(ev.order[d3])==-1)fO.add.lmfx[h9].v=[];
|
|
fO.add.lmfx[h9].v.push(fq.add.lmfx[h9].v[$.XN[1]]);if(!u)fq.add.lmfx[h9].v.splice($.XN[1],1)}var cs=fq.add.lmfx?JSON.stringify(fq.add.lmfx):"",dv=fO.add.lmfx?JSON.stringify(fO.add.lmfx):"";
|
|
if(!fO.px())fO.Jp+=32;var a=new dt("Move Layer Styles",this);a.data={e:e,bf:$.src,Rv:$.Yf,aiS:g6,ag3:hM,anq:cs,a1e:dv};
|
|
T.g4(a);this.wx(a.data,T)}if(e==M.Op){var l=$.src;if(l==null)l=n;var v=T.u[n],ec=JSON.stringify(v.add.SoLd),gT=JSON.parse(ec),iz=gT.filterFX.v.filterFXList.v;
|
|
iz.splice($.XN,1);var a=new dt([6,53],this);a.data={e:M.B8,I4:[{Sk:n,oC:[ec,JSON.stringify(gT)]}]};T.g4(a);
|
|
this.wx(a.data,T)}if(e==M.wR){var gw=u,fq=T.u[$.src],fO=T.u[$.Yf],iI=[];if(fq!=fO&&fO.add.SoLd==null){alert("Target layer is not a smart object!");
|
|
return}if(fq==fO&&!gw&&($.XN==$.l6||$.XN==-1))return;var g2=fq.DE(T),ec=JSON.stringify(fq.add.SoLd),gT=JSON.parse(ec),iz=gT.filterFX.v.filterFXList.v;
|
|
if(fq==fO){iz.splice($.l6,0,iz[$.XN]);if(!gw)iz.splice($.XN+($.XN<$.l6?0:1),1);iI.push({Sk:$.src,oC:[ec,JSON.stringify(gT)]})}else if($.XN==-1){var bb=gT.filterFX;
|
|
if(!gw){delete gT.filterFX;iI.push({Sk:$.src,oC:[ec,JSON.stringify(gT)],oj:[g2,null]})}var ir=fO.HC()?fO.DE(T):null,dG=iG.IS(g2),gY=JSON.stringify(fO.add.SoLd),e6=JSON.parse(gY);
|
|
e6.placed.v=dG.id;e6.filterFX=bb;iI.push({Sk:$.Yf,oC:[gY,JSON.stringify(e6)],oj:[ir,dG]})}else{var fr=iz[$.XN];
|
|
if(!gw){iz.splice($.XN,1);iI.push({Sk:$.src,oC:[ec,JSON.stringify(gT)]})}var gY=JSON.stringify(fO.add.SoLd),e6=JSON.parse(gY);
|
|
if(e6.filterFX==null)e6.filterFX=iZ.HA();var bt=e6.filterFX.v.filterFXList.v;bt.splice($.l6,0,fr);var cx={Sk:$.Yf,oC:[gY,JSON.stringify(e6)]};
|
|
if(!fO.HC()){var dG=iG.v4(fO.add.SoLd.placed.v);cx.oj=[null,dG]}iI.push(cx)}var a=new dt([6,52],this);
|
|
a.data={e:M.B8,I4:iI};T.g4(a);this.wx(a.data,T)}if(e==M.zB){var an=A.yy(),a=new dt(an.lq?[6,26]:[6,25],this);
|
|
a.data={e:e,c:n};T.g4(a);this.wx(a.data,T);this.track({Wk:"set",bI:{classID:"setd",null:{t:"obj ",v:[aj.D4("Lyr",!0)]},T:{t:"Objc",v:{classID:"Lyr",Usrs:{t:"bool",v:an.lq}}}}})}if(e==M.mY){var an=A.add.vmsk,a=new dt(an.lq?[6,28]:[6,27],this);
|
|
a.data={e:e,c:n};T.g4(a);this.wx(a.data,T)}if(e==M.dI){var ci=[],a;for(var f=0;f<T.D.length;f++){var l=T.D[f],S=T.u[l];
|
|
if(S.add.vogk)ci.push(l,JSON.stringify(S.add.vogk))}for(var f=0;f<T.dl.length;f++){var l=T.dl[f],S=T.w5[l];
|
|
if(S.add.vogk)ci.push(-1-l,JSON.stringify(S.add.vogk))}L.qy.a7r(T,$.UK,$.aga);var gv=[];for(var f=0;
|
|
f<T.D.length;f++){var l=T.D[f],S=T.u[l];if(S.add.vogk)gv.push(l,JSON.stringify(S.add.vogk))}for(var f=0;
|
|
f<T.dl.length;f++){var l=T.dl[f],S=T.w5[l];if(S.add.vogk)gv.push(-1-l,JSON.stringify(S.add.vogk))}var k=T.OY();
|
|
if(k&&k.data&&k.data.e==e){var gu=!0;for(var f=0;f<ci.length;f+=2)if(ci[f]!=k.data.xF[f])gu=!1;if(gu){a=k;
|
|
a.data.X7=gv}}if(a==null){var a=new dt([12,91,1],this);a.data={e:e,xF:ci,X7:gv};T.g4(a)}this.wx(a.data,T)}if(e==M.uh){var ak=JSON.stringify(A.add.artb),hP=JSON.stringify($.Sv),a;
|
|
T.u[n].add.artb=JSON.parse(hP);var ai=new df(0,0,T.d,T.w),hK=D.LY.Bh(T),k=T.OY();if(k&&k.data&&k.data.e==e&&k.data.c==n){a=k;
|
|
a.data.Sv=hP}if(a==null){var a=new dt("Editing Artboard",this);a.data={e:e,c:n,abD:ak,Sv:hP,FF:ai};T.g4(a)}a.oJ=hK;
|
|
this.wx(a.data,T)}if(e==M.Ep){var gv=T.iy.slice(0),h3=T.el.slice(0),e4=T.Z,co=T.Z;if($.f8=="fromAction"){var aO=$.H.Wk,cC=$.H.bI;
|
|
if(aO=="make"||aO=="duplicate"){var hm=gv.length,bF=!1,fH=!1;if(T.$X())hm--;var cu=new M.Zb;cu.name="Alpha "+(hm+1);
|
|
if(aO=="make"){var dX=cC.Nw.v;cu.color=255;h3=[hm];cu.T9=!0;cu.yF=dX.Opct.v;if(dX.Nm)cu.name=dX.Nm.v;
|
|
if(dX.classID=="SCch"){bF=!0;co=null;cu.tU=1}}else{var fk=cC.null.v[0].v;if(fk.keyID=="fsel")bF=!0;else{var ix=D.NK.Zu(T);
|
|
co=D.NK.qM(T,ix);cu.color=0;cu.rect=co.rect;cu.channel=co.channel}}if(bF){cu.color=0;if(T.Z){cu.rect=T.Z.rect.clone();
|
|
cu.channel=T.Z.channel.slice(0)}if(fH){cu.color=255-cu.color;L.lY(cu.channel)}}gv.splice(hm,0,cu)}else if(aO=="delete"){if(A&&A.yy()&&A.dQ==1){this.A2({e:M.YP},o,T,s,E);
|
|
return}var g=T.el;g.sort(function(a,bl){return bl-a});if(g.length==0)return;for(var f=0;f<g.length;f++)gv.splice(g[f],1);
|
|
h3=[]}else if(aO=="hide"){gv[h3[0]]=gv[h3[0]].clone();gv[h3[0]].T9=!1}}if($.f8=="rnm"){gv[$.II]=gv[$.II].clone();
|
|
gv[$.II].name=$.name}var a=new dt("Channel Edit",this);a.data={e:e,xF:T.iy.slice(0),_F:T.el.slice(0),X7:gv,XV:h3,I9:e4,a3:co};
|
|
this.wx(a.data,T);T.g4(a)}if(e==M.Ia){var bx=new df(0,0,T.d,T.w),a=new dt($.U1,this);a.data={e:M.Ia,rd:T.u.slice(0),c_:$.c_,gW:T.D.slice(0),Iv:$.a3};
|
|
T.g4(a);this.wx(a.data,T);var ha=D.LY.lN(T);if(ha){a.data.FF=bx;a.data.oJ=ha}}if(e==M.J1){var ca=T.v1(null,$.c),dp=1e10;
|
|
if(ca.length==0)return;if(T.u.length==ca.length){alert("Project must have at least 1 layer");return}var iX=[];
|
|
for(var f=0;f<T.u.length;f++)if(ca.indexOf(f)==-1)iX.push(T.u[f]);for(var f=0;f<ca.length;f++)dp=Math.min(dp,ca[f]);
|
|
dp=Math.max(dp-1,0);while(iX[dp].name=="</Layer group>")dp++;this.track({Wk:"delete",bI:{classID:"Dlt",null:aj.D4("Lyr",!0)}});
|
|
var a=new dt([6,31],this);a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:[dp]};T.g4(a);this.wx(a.data,T)}if(e==M.Y5){if(!s.L(dN.Et))return;
|
|
var a=new dt("Switch Layer Link",this);a.data={e:e,c:$.c};T.g4(a);this.wx(a.data,T)}if(e==M.cS){var g=$.a0V?$.a0V:T.D,dd=0,ho=!1;
|
|
if(g.length==0)return;if(g.length==1&&T.u[g[0]].pI==0){alert(aX.get([15,7,5]));return}var iD=[];for(var f=0;
|
|
f<T.u.length;f++){var iY=T.u[f].pI;iD.push(iY);dd=Math.max(dd,iY)}var bN=-1,it=-1;for(var f=0;f<g.length;
|
|
f++){var iY=T.u[g[f]].pI;if(iY==0)ho=!0;else if(bN==-1||bN==iY)bN=iY;else it=iY}if(!ho)for(var f=0;f<g.length;
|
|
f++)T.u[g[f]].pI=0;else if(bN!=-1&&it==-1)for(var f=0;f<g.length;f++)T.u[g[f]].pI=bN;else for(var f=0;
|
|
f<g.length;f++)T.u[g[f]].pI=dd+1;var j4=[];for(var f=0;f<T.u.length;f++){var iY=T.u[f].pI;if(j4[iY]==null)j4[iY]=0;
|
|
j4[iY]++}for(var f=0;f<T.u.length;f++){var iY=T.u[f].pI;if(j4[iY]==1)T.u[f].pI=0}var gy=iD;iD=[];for(var f=0;
|
|
f<T.u.length;f++){var iY=T.u[f].pI;iD.push(iY);dd=Math.max(dd,iY)}var a=new dt(ho?[6,54,0]:[6,54,1],this);
|
|
a.data={e:M.cS,are:gy,acM:iD};T.g4(a);this.wx(a.data,T)}if(e==M.NO&&($.c!=null||T.D.length!=0)||e==M.LZ){var fi=T.aV(e==M.NO?$.c:n,null,$.a46);
|
|
if(e==M.LZ){var v=fi[0],aO=v.add.SoLd.Idnt.v,hN=T.bK(aO).clone();v.add.SoLd.Idnt.v=hN.EB=iG.IP()+aO.slice(8);
|
|
T.add.lnk2.push(hN)}if(e==M.NO){var eN={Wk:"duplicate",bI:{classID:"null",null:aj.D4("Lyr",!0)}};if($.gl){fi[0].tM($.gl);
|
|
eN.Nm={t:"TEXT",v:$.gl}}this.track(eN);$.anA=$.c}e=M.Wv;$.u=fi;$.vp=T;$.sa=T}if(e==M.Wv){var hX,fh,a5=$.vp,aT=$.sa,dS=0,al=0;
|
|
if(a5!=aT){console.log("ADDLAYERS different projs");var hX=new df(0,0,a5.d,a5.w),fh=new df(0,0,aT.d,aT.w),aZ=[],eA=[];
|
|
for(var f=0;f<$.u.length;f++){var v=$.u[f];if(v.add.SoLd==null)continue;var aO=v.add.SoLd.Idnt.v;if(aZ.indexOf(aO)==-1){aZ.push(aO);
|
|
eA.push(iG.IP()+aO.slice(8))}v.add.SoLd.Idnt.v=eA[aZ.indexOf(aO)];var g2=v.DE(a5);if(g2){a5.JW(g2);aT.lU(g2)}}if(aZ.length>0){if(aT.add.lnk2==null)aT.add.lnk2=[];
|
|
for(var f=0;f<aZ.length;f++){var c0=a5.bK(aZ[f]),hN=c0.clone();hN.EB=eA[f];aT.add.lnk2.push(hN)}}}var e4=aT.D.slice(0);
|
|
e4.sort(function(a,bl){return a-bl});var iX=aT.u.slice(0),co=[],h7=-1;for(var f=0;f<e4.length;f++)h7=Math.max(h7,e4[f]);
|
|
if($.anA!=null)h7=$.anA;var aD=a5.Q2();if($.Tg){h7=$.Tg-1;var bz=aT.u[$.Tg].co();dS+=bz.x;al+=bz.y}if(aD!=-1){var i1=a5.u[aD].co();
|
|
dS-=i1.x;al-=i1.y}h7++;for(var f=0;f<$.u.length;f++){var S=$.u[f];iX.splice(h7,0,S);co.push(h7);h7++}if($.u[0].name=="</Layer group>"&&$.u[$.u.length-1].p3())co=[h7-1];
|
|
var a=new dt([6,0],this);a.data={e:M.Ia,rd:aT.u.slice(0),c_:iX,gW:e4,Iv:co};aT.g4(a);this.wx(a.data,aT);
|
|
if(dS!=0||al!=0)D.aD.FY(aT,aT.v1(),null,dS,al)}if(e==M.VT){var bZ=$.c!=null?[$.c]:T.v1(),iX=T.u.slice(0);
|
|
for(var f=0;f<bZ.length;f++){var S=T.u[bZ[f]].clone();S.Bm(T);iX.splice(bZ[f],1,S)}var a=new dt([6,8],this);
|
|
a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:T.D.slice(0)};T.g4(a);this.wx(a.data,T)}if(e==M.hj){var iX=T.u.slice(0),S=iX[T.D[0]]=iX[T.D[0]].clone(),eS=S.add.lmfx,dP=0;
|
|
delete S.add.lmfx;var d9=L.G(S.rect.Y());L.Ge(S.buffer,d9,3);var bn=fW.ZX(eS,null,d9,S.rect,T,S.rect).type;
|
|
for(var f=0;f<ev.order.length;f++){var cp=ev.order[f],dO=bn[cp],bL=f>7;for(var b2=0;b2<dO.length;b2++){var cW=dO[b2],N=T.$f();
|
|
N.fh=cW._6;N.opacity=Math.round(255*cW.LE);N.WL=!bL;N.buffer=cW._3;N.rect=cW.lM;N.rect.offset(S.rect.x,S.rect.y);
|
|
N.tM(S.getName()+"'s "+aX.get(ev.names[f]));iX.splice(T.D[0]+(bL?0:1),0,N);if(bL)dP++}}var a=new dt("Styles to Layers",this);
|
|
a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:[T.D[0]+dP]};T.g4(a);this.wx(a.data,T)}if(e==M.vg){var bZ=T.v1(),iX=T.u.slice(0),g3=new df(0,0,T.d,T.w);
|
|
for(var f=0;f<bZ.length;f++){var eo=T.u[bZ[f]],aJ=eo.N9();eo.bC(!0);var ek=T.root.BA(bZ[f]);if(eo.p3())continue;
|
|
if(ek==null)continue;var S=eo.clone();S.Bm(T);var fL=ek.rX(T,!0),bW=T.u;T.qp([eo]);T.T();T.ir();S.buffer=L.G(fL.Y()*4);
|
|
L.h9(T.aw(),g3,S.buffer,fL);S.rect=fL;S.opacity=255;S.add.iOpa=255;S.fh="norm";S.T();S.B4.ZM=!0;T.qp(bW);
|
|
if(S.add.lmfx)delete S.add.lmfx;S._=S.Vx=null;iX.splice(bZ[f],1,S);S.bC(aJ);eo.bC(aJ)}var a=new dt([6,34],this);
|
|
a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:T.D.slice(0)};T.g4(a);this.wx(a.data,T)}if(e==M.WU){var bZ=T.v1(),iX=T.u.slice(0);
|
|
for(var f=0;f<bZ.length;f++){var S=T.u[bZ[f]],ic=S.add.TySh;if(ic==null)continue;var v=new iq(ic.h3,E.vv),dz=L.M.ie(hA.hv(v,ic));
|
|
for(var gL in dz){var gI=dz[gL],bD=S.clone();delete bD.add.TySh;bD.Jp=bD.Jp|1<<4;bD.add.SoCo=JSON.parse(JSON.stringify(ev.WA[0]));
|
|
var e5=bD.add.SoCo.Clr.v;e5.Rd.v=parseInt(gL.slice(1,3),16);e5.Grn.v=parseInt(gL.slice(3,5),16);e5.Bl.v=parseInt(gL.slice(5,7),16);
|
|
var eh=new M.PZ;eh.g=L.M.Hz(gI,!1);if(bD.add.vmsk!=null){bD.add.vmsk.alO();eh.concat(bD.add.vmsk)}bD.add.vmsk=eh;
|
|
bD.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));bD._L();bD.tF(T);iX.splice(iX.indexOf(S),0,bD)}iX.splice(iX.indexOf(S),1)}var co=T.D.slice(0);
|
|
for(var f=co.length-1;f>=0;f--)if(co[f]>=iX.length)co.splice(f,1);var a=new dt([6,40],this);a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:co};
|
|
T.g4(a);this.wx(a.data,T)}if(e==M.N6){var gZ=T.D.length;if(gZ<2){alert("Select two or more layers.");
|
|
return}if(!T.qQ())return;var bD=T.u[T.D[0]].clone(),iX=[];for(var f=0;f<T.u.length;f++)if(T.D.indexOf(f)==-1)iX.push(T.u[f]);
|
|
iX.splice(T.D[0],0,bD);for(var f=1;f<gZ;f++)if(T.u[T.D[f]].rect.Y()>2e6){alert("Blended areas are too large.");
|
|
return}for(var f=1;f<gZ;f++){var S=T.u[T.D[f]],b8=S.rect.clone();b8.Mi(1,1);var bl=L.G(b8.Y()*4);L.h9(S.buffer,S.rect,bl,b8);
|
|
bD.extend(b8);var iU=L.G(b8.Y()*4);L.h9(bD.buffer,bD.rect,iU,b8);var a=L.G(b8.Y());L.Ge(bl,a,3);L.round(a,200);
|
|
L.aM(a,bl,3);L.R.xE("norm",bl,b8,iU,b8,b8,1);L.Eh.gY(iU,a,b8);L.h9(iU,b8,bD.buffer,bD.rect)}var a=new dt([2,10,0],this);
|
|
a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:[T.D[0]]};T.g4(a);this.wx(a.data,T)}if(e==M.Px){var iX=T.u.slice(0),h3=T.D.slice(0);
|
|
for(var f=0;f<iX.length;f++){var S=iX[f],bg=S.add.vmsk;if(S.d5()&&bg&&S.add.vstk.strokeEnabled.v&&!S.add.vstk.fillEnabled.v){var hs=bg.g,bY=0,cG=-1;
|
|
for(var b2=0;b2<hs.length;b2++){if((hs[b2].type==0||hs[b2].type==3)&&hs[b2].m6!=-1){bY++;if(hs[b2].type==3&&cG==-1){hs[b2].aq=hs[b2].m6=1;
|
|
cG=b2}}}if(bY>1&&cG!=-1){console.log("separating an open path into a new layer");S=S.clone();bg=S.add.vmsk;
|
|
hs=bg.g;var N=hs[cG].length,fy=S.clone();fy.add.lyid=T.tB();bg.g=hs.slice(0,2).concat(hs.slice(cG,cG+N+1));
|
|
bg.D=[];S.tF(T);S.T();var ei=fy.add.vmsk.g;fy.add.vmsk.g=ei.slice(0,cG).concat(ei.slice(cG+N+1,ei.length));
|
|
fy.add.vmsk.D=[];fy.tF(T);iX[f]=S;iX.splice(f+1,0,fy);for(var b2=0;b2<h3.length;b2++)if(h3[b2]>f)h3[b2]++;
|
|
var gC=h3.indexOf(f);if(gC!=-1){h3.splice(gC+1,0,f+1)}}}}if(iX.length!=T.u.length){var a=new dt("Splitting open paths",this);
|
|
a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:h3};T.g4(a);this.wx(a.data,T)}}if(e==M.RJ){this.A2({e:M.Px},o,T,s,E);
|
|
var e4=T.D.slice(0),bW=T.u.slice(0),bZ=T.v1();if(bZ.length==0)return;T.$L(bZ,!1,$.Ue);var a=new dt([6,36,0],this);
|
|
a.data={e:M.Ia,rd:bW,c_:T.u.slice(),gW:e4,Iv:T.D.slice(0)};T.g4(a);this.wx(a.data,T)}if(e==M.aG){var ec=A.add.SoLd;
|
|
if(ec==null)return;var aO=ec.Idnt.v,hk=T.bK(aO);hk.aw(!1);var a2=hk.wc[0],b8=hk.wc[1];if(L.jh(a2)){alert("The smart object contains transparency.");
|
|
return}var cg=eY.Q1("jpg").tC([[a2.buffer]],b8.d,b8.w,[90]);this.A2({e:M.sv,u4:T,data:new Uint8Array(cg),id:aO,Ue:"jpg"},o,T,s,E);
|
|
console.log(T.add);return}if(e==M.sv){var c0=$.u4.bK($.id),hN=c0.clone();hN.raw=$.data;if($.FZ)hN.FZ=$.FZ;
|
|
if($.Ue){hN.oF=" ";hN.Ul=" ";hN.FZ=hN.FZ+"."+$.Ue}else{hN.oF="8BIM";hN.Ul="8BPB";hN.FZ=hN.FZ+".psd"}hN.aw(!1);
|
|
c0.aw(!1);var a=new dt([6,36,1],this);a.data={e:M.sv,id:$.id,Gj:c0,gk:hN};$.u4.g4(a);this.wx(a.data,$.u4)}if(e==M.I0){var a=new dt([6,36,4],this);
|
|
a.data={e:e,c:n,C5:A.add.SoLd.Impr.v.classID,mI:$.mI};T.g4(a);this.wx(a.data,T)}if(e==M.uN){var eX,ht;
|
|
if($.c8){eX=$.u4;ht=$.c8}else{$.u4.eA();$.u4.wT();$.u4.T();$.u4.ir();$.u4.aw();eX=eY.Q1("PSD").tC($.u4,0,0,[!0,!0]);
|
|
ht=$.u4.name}if(!(eX instanceof ArrayBuffer))throw"e";eX=new Uint8Array(eX);var K=$.Yc!=null?$.Yc:T.D[T.D.length-1]+1,fI=T.sP(eX,ht,0,0,!0),iX=T.u.slice(0);
|
|
iX.splice(K,0,fI);var a=new dt([6,36,2],this);a.data={e:M.Ia,rd:T.u.slice(),c_:iX,gW:T.D.slice(0),Iv:[iX.indexOf(fI)]};
|
|
T.g4(a);this.wx(a.data,T)}if(e==M.hI&&$.f8=="merge"){var j5=[],bM=T.root.children,e8=0;for(var f=0;f<bM.length;
|
|
f++){var R=bM[f],S=R.c,a0=R.children,gN=!0;if(!S.p3()||a0.length==0)continue;for(var b2=0;b2<a0.length;
|
|
b2++)if(!a0[b2].c.getName().startsWith("_a_")){gN=!1;break}if(gN)j5.push(T.u.indexOf(S))}var iJ=[];for(var f=0;
|
|
f<j5.length;f++)if(T.D.indexOf(j5[f])!=-1)iJ.push(j5[f]);if(iJ.length>=2)j5=iJ;if(j5.length<2){alert("At least two animation folders needed (whose layers start with \"_a_\").",3500);
|
|
return}var iV=[];for(var f=0;f<j5.length;f++)iV.push(T.u[j5[f]].getName());var dO=[];for(var c3=0;c3<j5.length;
|
|
c3++){var R=T.root.BA(j5[c3]),cx=[[],[],0,c3];dO.push(cx);for(var f=0;f<R.children.length;f++){var l=R.children[f].index,S=R.children[f].c,cu=S.getName(),cj=20,d$=cu.split(",");
|
|
if(d$.length>1){var hp=parseInt(d$.pop());if(!isNaN(hp)&&hp!=0)cj=hp}cx[0].push(S);cx[1].push(cj);cx[2]+=cj}}dO.sort(function(a,bl){return bl[2]-a[2]});
|
|
var cl=dO[0],gB=cl[2];for(var f6=1;f6<dO.length;f6++){var cx=dO[f6],fl=1,ck=cx[1].slice(0),fS=0;while((fl+1)*cx[2]<=cl[2]){fl++;
|
|
ck=ck.concat(cx[1])}cx[1]=ck;cx[2]*=fl;var i6=cl[2]/cx[2];for(var f=0;f<cx[1].length;f++){var gS=Math.floor(cx[1][f]*i6);
|
|
cx[1][f]=gS;fS+=gS}while(fS<gB){fS++;cx[1][cx[1].length-1]++}cx[2]=fS}var c$=[],g9=[],gS=[];for(var f=0;
|
|
f<dO.length;f++){c$.push(0);g9.push(0)}while(e8<gB){var dh=1e9,hm=-1;for(var f=0;f<dO.length;f++){var f$=dO[f][1],g0=c$[f];
|
|
if(g0!=f$.length&&g9[f]+f$[g0]<e8+dh){hm=f;dh=g9[f]+f$[g0]-e8}}g9[hm]+=dO[hm][1][c$[hm]];c$[hm]++;if(dh!=0){gS.push(dh);
|
|
e8+=dh}}for(var f=0;f<gS.length;f++){var cX=gS[f],bA=cX>>>1;if(cX<17){var l=gS.length-1;if(f==0)gS[1]+=cX;
|
|
else if(f==gS.length-1)gS[l-1]+=cX;else{gS[f-1]+=bA;gS[f+1]+=cX-bA}gS.splice(f,1);f--}}var aJ=[],g3=new df(0,0,T.d,T.w);
|
|
for(var f=0;f<T.u.length;f++){aJ[f]=T.u[f].N9();T.u[f].bC(!1)}var eC=T.D.slice(0);T.D=j5;var ca=T.v1();
|
|
ca.sort(function(a,bl){return a-bl});var iX=[];for(var f=0;f<T.u.length;f++){if(ca.indexOf(f)==-1)iX.push(T.u[f])}dO.sort(function(a,bl){return a[3]-bl[3]});
|
|
function gq(f$,dl){var f=0,g1=0;while(g1+f$[f]<=dl){g1+=f$[f];f++}return f}e8=0;iX.splice(ca[0],0,T.jK());
|
|
for(var ab=0;ab<gS.length;ab++){var c=[];for(var f=0;f<dO.length;f++){var g0=gq(dO[f][1],e8)%dO[f][0].length,S=dO[f][0][g0];
|
|
c.push(S)}var S=T.$f();for(var f=0;f<dO.length;f++){var ex=c[f],bh=T.u[j5[f]];ex.bC(!0);bh.bC(!0)}T.T();
|
|
T.ir();var a2=T.aw();S.rect=L.UI(a2,g3,2);S.buffer=L.G(S.rect.Y()*4);L.h9(a2,g3,S.buffer,S.rect);for(var f=0;
|
|
f<dO.length;f++){var ex=c[f],bh=T.u[j5[f]];ex.bC(!1);bh.bC(!1)}S.bC(ab==0);S.tM("_a_frm"+ab+","+gS[ab]);
|
|
iX.splice(ca[0]+1+ab,0,S);e8+=gS[ab]}var S=T.$f();S.tM(iV.join(" + "));S.fh="pass";S.add.lsct=hd.Qm;
|
|
S.Jp=24;iX.splice(ca[0]+1+gS.length,0,S);for(var f=0;f<T.u.length;f++)T.u[f].bC(aJ[f]);var a=new dt([6,12,0],this);
|
|
a.data={e:M.Ia,rd:T.u,c_:iX,gW:eC,Iv:[ca[0]+1+gS.length]};T.g4(a);this.wx(a.data,T)}if(e==M.r4||e==M.RI||e==M.wV){var bW=T.u.slice(0),e4=T.D.slice(0),gF=!0,fI,co;
|
|
if(e==M.r4)T.D=[n,n-1];if(e==M.wV){T.D=[];for(var f=0;f<T.u.length;f++)if(T.u[f].N9())T.D.push(f)}var bZ=T.v1();
|
|
bZ.sort(function(a,bl){return a-bl});var hl=new df,g3=new df(0,0,T.d,T.w);for(var f=0;f<bZ.length;f++){var l=bZ[f],S=T.u[l];
|
|
gF=gF&&S.d5()&&S.add.vmsk!=null;hl=hl.BZ(T.root.BA(l).rX(T,!0))}if(gF){fI=T.u[bZ[0]].clone();var bg=fI.add.vmsk;
|
|
for(var f=1;f<bZ.length;f++){var N=T.u[bZ[f]],ei=M.PZ.IN(N.add.vmsk.g);bg.g=bg.g.concat(ei.slice(2));
|
|
fI.add.vogk=fI.add.vogk.concat(JSON.parse(JSON.stringify(N.add.vogk)))}fI.add.vmsk.Or=!0;fI.tF(T)}else if(g3.Yg(hl)){fI=T.$f();
|
|
fI.tM(T.u[bZ[bZ.length-1]].getName());fI.rect=hl;fI.buffer=L.G(hl.Y()*4);var br=T.aw(bZ);L.h9(br,g3,fI.buffer,hl);
|
|
fI.Gg();fI.T()}else{T.$L(bZ,!0);fI=T.u[T.D[0]];T.u.splice(T.D[0],1);var fP=T.bK(fI.add.SoLd.Idnt.v);
|
|
T.add.lnk2.splice(T.add.lnk2.indexOf(fP),1);delete fI.add.SoLd}var gD=u,dZ=-1;if($.bI&&$.bI.Dplc&&$.bI.Dplc.v)gD=!0;
|
|
if(gD&&e==M.wV&&T.u[e4[0]]._1()&&T.u[e4[0]].rect.p4()){dZ=e4[0]}if(dZ!=-1||e==M.r4){var f3=T.u[dZ!=-1?dZ:n-1];
|
|
fI.tM(f3.getName());fI.add.lclr=f3.add.lclr}var iX=[];for(var f=0;f<T.u.length;f++)if(gD||bZ.indexOf(f)==-1)if(f!=dZ)iX.push(T.u[f]);
|
|
var il=bZ[bZ.length-1],bd=il==T.u.length-1?null:T.u[il+1],aL=bd?iX.indexOf(bd):iX.length;iX.splice(aL,0,fI);
|
|
co=[aL];var a=new dt([6,12,0],this);a.data={e:M.Ia,rd:bW,c_:iX,gW:e4,Iv:co};T.g4(a);this.wx(a.data,T)}if(e==M.kn){var bD=T.$f();
|
|
bD.rect=new df(0,0,T.d,T.w);bD.buffer=L.G(bD.rect.Y()*4);L.wr(bD.buffer,4294967295);L.R.xE("norm",T.aw(),bD.rect,bD.buffer,bD.rect,bD.rect,1);
|
|
bD.tM("Background");bD.add.lspf=1<<2;var a=new dt([6,12,1],this);a.data={e:M.Ia,rd:T.u.slice(),c_:[bD],gW:T.D.slice(0),Iv:[0]};
|
|
T.g4(a);this.wx(a.data,T)}if(e==M.Kw||e==M.vl||e==M.ps||e==M.mJ||e==M.Lu){var S=e==M.Lu?T.u[T.D[0]].clone():T.$f(),b6=aX.get([0,3]),fG=$.gl,fc=!1,fD,hj;
|
|
if(e==M.ps)b6=aX.get([12,76,1]);if(e==M.Lu){var eo=T.u[T.D[0]],hD=eo.ZY(T,T.Z);if(hD==null){alert("Copied area is empty");
|
|
return}S.rect=hD.rect;S.buffer=hD.ah;S.Bm(T)}if(e==M.mJ){S.rect=cf.kz.wk($.jB,T);S.buffer=$.jB.buffer.slice(0);
|
|
if($.Ht&&T.Z){S._=new M.Zb;S._.rect=T.Z.rect;S._.color=0;S._.channel=T.Z.channel.slice(0)}}if(e==M.Kw){this.track({Wk:"make",bI:{classID:"Mk",null:aj.D4("Lyr")}})}if(e==M.vl){S.Jp|=16;
|
|
var iQ=$.bI.Usng.v,dn=iQ.Type.v,gG=dq.jf[dn.classID];b6=aX.get(dq.names[gG]);if(iQ.Nm)fG=iQ.Nm.v;S.add[gG]=iZ.o_(gG);
|
|
if(S.add[gG]==null)S.add[gG]={};for(var dj in dn)S.add[gG][dj]=JSON.parse(JSON.stringify(dn[dj]));S._=cf.kz.GM(T)}if(e==M.ps){S.Jp|=16;
|
|
var cC=$.bI,iQ=cC.Usng.v,f5=iQ.Type.v,i_=iQ.Shp;if(iQ.Nm)fG=iQ.Nm.v;if(i_==null){var ga=T.Vp(),dz=ga[0],f7=ga[1];
|
|
if(f7.length!=0){var aK=dz[f7[0]].add;S.add.vmsk=aK.vmsk.clone();S.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));
|
|
S.add.vogk=JSON.parse(JSON.stringify(aK.vogk));T.dl=[]}else S._=cf.kz.GM(T)}else{console.log(iQ);S.add.vmsk=new M.PZ;
|
|
S.add.vstk=JSON.parse(JSON.stringify(iQ.strokeStyle?iQ.strokeStyle.v:ev.ci.default));S.add.vogk=[];if(i_){var fd=L.qy.Rg(i_);
|
|
if(fd){S.add.vogk=[fd];S.add.vmsk.g.push({type:0,m6:1,length:0});L.qy.Iy(S.add.vogk,S.add.vmsk)}else{i_=i_.v;
|
|
var a9=i_.classID;if(a9=="Plgn"){var gA=i_.Cntr.v,i1=i_.corner.v;gA=new aY(gA.Hrzn.v.val,gA.Vrtc.v.val);
|
|
i1=new aY(i1.Hrzn.v.val,i1.Vrtc.v.val);S.add.vmsk.g=L.A.XG.QQ(gA.x,gA.y,Math.sqrt(i1.x*i1.x+i1.y*i1.y),Math.atan2(i1.y,i1.x),i_.sides.v,0)}else if(a9=="customShape"){var el=L.qy.S4(i_),gO=el[2]-el[0],gW=el[3]-el[1],ip=E.vx,bm,ez;
|
|
for(var f=0;f<ip.length;f++)if(ip[f].Eq==i_.Nm.v)bm=ip[f];if(bm){ez=M.PZ.IN(bm.g);L.A.hR(ez,new fY(gO,0,0,gW,el[0],el[1]))}else ez=L.A.XG.Rect(el[0],el[1],gO,gW,0);
|
|
S.add.vmsk.g=ez}S._L()}}}var cc={solidColorLayer:0,gradientLayer:1,patternLayer:2}[f5.classID],fX=["SoCo","GdFl","PtFl"][cc];
|
|
S.add[fX]=JSON.parse(JSON.stringify(ev.WA[cc]));cf.kz.Nx(f5,S.add[fX],cc);if(i_==null)b6=aX.get([6,48,0,cc]);
|
|
if(fX=="PtFl")T.Af(fW.OA(S.add[fX].Ptrn.v,E.q_));S.tF(T)}var gZ=cf.kz.XA(T,b6+" ");S.tM(b6+" "+(gZ+1));
|
|
if(fG)S.tM(fG);var go=T.D.length==0?T.u.length-1:T.D[T.D.length-1],f1=T.u[go];if(e==M.ps&&f1._1()&&f1.rect.p4()){fc=!0;
|
|
S.tM(f1.getName());fD=go}else{fD=go+1;if(f1&&f1.add.lsct==hd.NH)fD--}if($.abh)fD=Math.max(0,fD-1);var iX=T.u.slice(0);
|
|
iX.splice(fD,fc?1:0,S);var bJ=[5,2];if(e==M.Kw)bJ=[6,13];if(e==M.vl)bJ=[6,1];if(e==M.ps){bJ=[6,48,1];
|
|
var i_=$.bI.Usng.v.Shp;if(i_){var hY={Rctn:[10,32],Ln:[10,35],Elps:[10,33],Plgn:[12,93,0],customShape:[10,31]}[i_.v.classID];
|
|
if(hY)bJ=hY}}if(e==M.Lu){bJ=[6,49]}if(e==M.Lu||e==M.ps||e==M.mJ)if(T.Z)hj=[T.Z,null];var a=new dt(bJ,this);
|
|
a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:[fD],c5:hj};T.g4(a);this.wx(a.data,T);if(e==M.ps&&i_==null&&cc!=0||e==M.vl){var gQ=new x(H.E.Q);
|
|
gQ.data={e:H.V.FN,a_:a_._4.ga};o.J(gQ)}}if(e==M.V$){var S=T.$f();S.tM(aX.get([0,4])+" "+T.u.length);
|
|
S.fh="pass";S.add.lsct=hd.NH;S.Jp=24;var d7=T.jK(),go=n,fD=go+1,iX=T.u.slice(0);iX.splice(fD,0,d7,S);
|
|
var a=new dt([6,20],this);a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:[fD+1]};T.g4(a);this.wx(a.data,T)}if(e==M.Mu||e==M.ru){var cR=e==M.Mu?$.source:T.D[0],hG,gt,ge=T.D.indexOf(cR)!=-1,cD=u|$.aiL,bv;
|
|
if(ge)bv=T.v1();else bv=T.rY(cR);bv.sort(function(a,bl){return a-bl});if(e==M.Mu){hG=$.target;gt=$.JE>.5}else if($.target!=null){hG=$.target;
|
|
gt=!0;T.SK=!0}else{var eU=$.f8;gt=eU>1;if(eU==0){hG=T.u.length-1}if(eU==1){hG=bv[bv.length-1]+1;var N=T.rY(hG);
|
|
if(N.indexOf(cR)==-1)hG+=N.length-1}if(eU==2){hG=bv[0]-1;var N=T.rY(hG);if(N.indexOf(cR)==-1)hG-=N.length-1}if(eU==3){hG=0}if(hG<0||hG>T.u.length-1)return;
|
|
T.SK=!0}if(bv.indexOf(hG)!=-1&&!cD)return;var bO=T.u[hG],iX=[];if(cD)iX=T.u.slice(0);else for(var f=0;
|
|
f<T.u.length;f++)if(bv.indexOf(f)==-1)iX.push(T.u[f]);var em=iX.indexOf(bO);if(e==M.Mu&&bO.p3()&&bO.add.lsct==hd.Qm&&$.JE>.8)em-=T.rY(hG).length-1;
|
|
var cM=[],fZ=cD?T.aV(ge?null:cR):null;for(var f=0;f<bv.length;f++){var aG=em+(gt?0:1)+f,v=cD?fZ[f]:T.u[bv[f]];
|
|
iX.splice(aG,0,v);cM.push(aG)}var a=new dt(cD?[6,0]:[6,35],this);a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:cM};
|
|
T.g4(a);this.wx(a.data,T);var cC={classID:"move",null:aj.D4("Lyr",!0),T:{t:"obj ",v:[{t:"indx",v:{classID:"Lyr",val:em+(gt?0:1)}}]},Adjs:{t:"bool",v:!1},Vrsn:{t:"long",v:5},Dplc:{t:"long",v:cD}};
|
|
this.track({Wk:"move",bI:cC})}if(e==M.Ai){if($.eP){if(A==null||!A.p3())return;var R=T.root.BA(n),dA=T.u.indexOf(R.a1s),iX=T.u.slice(0);
|
|
iX.splice(n,1);iX.splice(dA,1);var h3=[];for(var f=dA;f<n-1;f++)h3.push(f);var a=new dt("Ungroup Layers",this);
|
|
a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:h3};T.g4(a);this.wx(a.data,T)}else{var S=T.$f(),cS=aX.get([0,4])+" ";
|
|
S.tM(cS+(cf.kz.XA(T,cS)+1));S.fh="pass";if($.gl)S.tM($.gl);if($.r_!=null)S.add.lclr=$.r_;S.add.lsct=T.D.length==1?hd.NH:hd.Qm;
|
|
S.Jp=24;var d7=T.jK(),bv=T.v1();if(bv.length==0)return;bv.sort(function(a,bl){return a-bl});var iX=[];
|
|
for(var f=0;f<T.u.length;f++)if(bv.indexOf(f)==-1)iX.push(T.u[f]);var go=T.D[T.D.length-1]-bv.length;
|
|
iX.splice(go+1,0,d7);for(var f=0;f<bv.length;f++)iX.splice(go+2+f,0,T.u[bv[f]]);iX.splice(go+2+bv.length,0,S);
|
|
var a=new dt([6,9],this);a.data={e:M.Ia,rd:T.u.slice(0),c_:iX,gW:T.D.slice(0),Iv:[iX.indexOf(S)]};T.g4(a);
|
|
this.wx(a.data,T);var Q={Wk:"make",r5:!0};Q.bI={classID:"Mk",null:aj.D4("layerSection"),From:aj.D4("Lyr",!0),Usng:{t:"Objc",v:{classID:"layerSection",Nm:{t:"TEXT",v:S.getName()}}}};
|
|
this.track(Q)}}if(e==M.wz){if(T.D.length!=1)return;var K=T.D[0],ch=u;if(T.u[K].yy()==null&&!s.L(dN.I6)){e=M.y1;
|
|
$.Rz=T.Z?!ch?"RvlS":"HdSl":!ch?"RvlA":"HdAl"}else{e=M.Gi;$.a4D=!0}}if(e==M.y1){if(T.D.length!=1)return;
|
|
var K=T.D[0],S=T.u[K];if(S.add.vmsk&&S._==null)S.tF(T);var da=S.yy();if(da==null||$.a6c){var a=new dt([6,21],this),ii=new M.Zb,iS=$.Rz,cr=iS=="RvlS"||iS=="HdSl";
|
|
if(iS=="RvlS"||iS=="HdAl"||iS=="Trns")ii.color=0;if(cr){ii.channel=T.Z.channel.slice(0);ii.rect=T.Z.rect.clone();
|
|
if(iS=="HdSl")L.lY(ii.channel)}if(iS=="Trns"){ii.rect=S.rect.clone();ii.channel=L.G(S.rect.Y());L.Ge(S.buffer,ii.channel,3)}a.data={e:M.nN,RV:[K,da,ii],c5:cr?[T.Z,null]:null};
|
|
T.g4(a);this.wx(a.data,T);T.u[K].dQ=1;this.track({Wk:"make",bI:{__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:iS}}}})}}else if(e==M.MT){var fq=T.u[$.src],fO=T.u[$.Yf],a=new dt([6,21],this),i4=fq.yy(),hr=fO.yy(),an=[$.src,i4,null,$.Yf,hr,i4];
|
|
if(u){var cu=i4.clone();an=[$.Yf,hr,cu];if(s.L(dN.Et)){L.lY(cu.channel);cu.color=255-cu.color}}a.data={e:M.nN,RV:an};
|
|
T.g4(a);this.wx(a.data,T)}if(e==M.YP){if(T.D.length!=1)return;var K=n,du=T.u[K].yy();if(du!=null){var a=new dt([6,22],this);
|
|
a.data={e:M.nN,RV:[n,du,null]};T.g4(a);this.wx(a.data,T)}}if(e==M.N1){var bW=T.u.slice(0),bD=A.clone(),ce=bD.yy();
|
|
L.Li(ce.$a(bD.rect),bD.rect,bD.buffer,bD.rect);cf.kz.nD(T,bD);bD.Gg();T.u[T.D[0]]=bD;var a=new dt([5,8],this);
|
|
a.data={e:M.Ia,rd:bW,c_:T.u.slice(),gW:T.D.slice(0),Iv:T.D.slice(0)};T.g4(a);this.wx(a.data,T)}if(e==M.dZ){if(T.D.length!=1)return;
|
|
var K=T.D[0];if(T.u[K].DE(T)._==null){var a=new dt([6,45],this);a.data={e:e,c:K,_:new M.Zb};T.g4(a);
|
|
this.wx(a.data,T)}}if(e==M.KN){if(T.D.length!=1)return;var K=T.D[0];if(T.u[K].DE(T)._!=null){var a=new dt([6,46],this);
|
|
a.data={e:e,c:K,_:T.u[K].DE(T)._};T.g4(a);this.wx(a.data,T)}}if(e==M.IX){if($.c==null&&T.D.length!=1)return;
|
|
if(T.u[n].HC()){var a=new dt([6,47],this),ec=JSON.stringify(T.u[n].add.SoLd),gT=JSON.parse(ec);delete gT.filterFX;
|
|
a.data={e:M.B8,I4:[{Sk:n,oC:[ec,JSON.stringify(gT)],oj:[T.u[n].DE(T),null]}]};T.g4(a);this.wx(a.data,T)}}if(e==M.Gi){if(T.D.length!=1)return;
|
|
if(A.add.vmsk==null){var a=new dt([6,23],this),hs=T.Vp(),g=hs[1],hs=hs[0],ii,fd;if($.a4D&&g.length!=0){var aK=hs[g[0]].add;
|
|
ii=aK.vmsk.clone();fd=aK.vogk}else{ii=new M.PZ;fd=[];ii.g[1].all=$.akT?0:1}a.data={e:e,c:n,w7:!0,_:ii,qy:JSON.stringify(fd),ci:null};
|
|
if(A.d5()){a.data.ci=JSON.stringify(ev.ci.default)}T.g4(a);this.wx(a.data,T)}}if(e==M.Y9){var fq=T.u[$.src],fO=T.u[$.Yf];
|
|
if(fO.add.vmsk)return;var a=new dt([6,23],this),bg=fq.add.vmsk;a.data={c:$.Yf,w7:fq.Jg,_:bg.clone(),qy:JSON.stringify(fq.add.vogk),ci:fq.add.vstk?JSON.stringify(fq.add.vstk):null};
|
|
if(u){a.data.e=M.Gi}else{a.data.e=e;a.data.src=$.src;a.data.Yf=$.Yf}T.g4(a);this.wx(a.data,T)}if(e==M.Ho){if(T.D.length!=1)return;
|
|
var S=T.u[n],bg=S.add.vmsk;if(bg!=null){var a=new dt([6,24],this);a.data={e:e,c:n,w7:S.Jg,_:bg,qy:JSON.stringify(S.add.vogk),ci:S.add.vstk?JSON.stringify(S.add.vstk):null};
|
|
T.g4(a);this.wx(a.data,T)}}if(e==M.OD){var a=new dt("Metadata",this);a.data={e:e,Mr:JSON.stringify(T.sx),Y6:JSON.stringify($.Y6)};
|
|
T.g4(a);this.wx(a.data,T)}if(e==M.Oe){var aE=$.Yf?$.Yf:T,g4=aE.name,fG=$.H+".psd";if(g4==fG)return;var a=new dt([6,37],this);
|
|
a.data={e:e,any:g4,gl:fG};if($.aeK!=!0)aE.g4(a);this.wx(a.data,aE)}if(e==M.hI&&$.f8.endsWith("makeframes")){var eV=[],f_=$.f8.startsWith("make");
|
|
for(var f=0;f<T.D.length;f++){var l=T.D[f],S=T.u[l],eZ=S.getName(),c_=eZ.startsWith("_a_");if(f_==c_||S.add.lsct==hd.ic)continue;
|
|
var cQ=f_?"_a_"+eZ:eZ.slice(3);eV.push([l,eZ,cQ,S.add.lnsr,null])}var a=new dt([6,37],this);a.data={e:M.OZ,M9:eV};
|
|
T.g4(a);this.wx(a.data,T)}if(e==M.OZ){var g4=A.getName(),fG=$.name.substring(0,255);if(g4==fG)return;
|
|
var a=new dt([6,37],this);a.data={e:e,M9:[[n,g4,fG,A.add.lnsr,null]]};T.g4(a);this.wx(a.data,T);this.track(aj.Hn("Nm",{t:"TEXT",v:fG}))}if(e==M.Tv){var bS=T.v1(),cP=[],er=[];
|
|
for(var f=0;f<bS.length;f++){cP.push(T.u[bS[f]].add.lclr);er.push($.aq1)}var a=new dt([6,38],this);a.data={e:e,u:bS,agN:cP,r_:er};
|
|
T.g4(a);this.wx(a.data,T)}if(e==M.a5){var a=T.history[T.Q5];if(a!=null&&a.U==this&&a.data.e==e&&a.data.c==$.N7&&a.data.mI.uP==$.oi.uP)a.data.mI=$.oi;
|
|
else{a=new dt("Mask Density / Feather",this);a.data={e:e,c:$.N7,C5:T.u[$.N7].lr($.oi.uP),mI:$.oi};T.g4(a)}this.wx(a.data,T)}if(e==M.lS){var gs=JSON.stringify($.H),eL=JSON.parse(gs),a=T.history[T.Q5];
|
|
if(a!=null&&a.U==this&&a.data.e==e&&a.data.OH==$.OH&&a.data.WV.join(",")==$.WV.join(",")){for(var f=0;
|
|
f<$.WV.length;f++)a.data.Dk[f]=eL;if(a.data.bI&&eL.Ul!=0)cf.kz.Nx(eL.n$,a.data.bI.T.v,eL.Ul-1)}else{a=new dt([11,6],this);
|
|
a.data={e:e,WV:$.WV,OH:$.OH,aiq:[],Dk:[]};var i3=!1;for(var f=0;f<$.WV.length;f++){var l=$.WV[f],S=T.u[l],iw=$.OH?D.Ie.pe(T,l):JSON.parse(JSON.stringify(S.add.vstk));
|
|
a.data.aiq.push(iw);a.data.Dk.push(eL);if(JSON.stringify(iw)!=gs)i3=!0}if(!i3)return;T.g4(a);if($.OH&&eL.Ul>0){var cC=a.data.bI={classID:"setd",null:aj.D4("contentLayer",!0),T:{t:"Objc",v:{}}},fX=["SoCo","GdFl","PtFl"][eL.Ul-1];
|
|
cf.kz.Nx(eL.n$,cC.T.v,eL.Ul-1);this.track({Wk:"set",bI:cC})}}if($.OH&&eL.Ul==3)T.Af(fW.OA(eL.n$.Ptrn.v,E.q_));
|
|
if(!$.OH){var at=eL.strokeStyleContent.v;if(at.classID==ev.ci.RG[2])T.Af(fW.OA(at.Ptrn.v,E.q_))}this.wx(a.data,T)}};
|
|
cf.kz.Nx=function($,o,T){var s=[ev.k9,ev.cw,ev.SZ][T];if(o.classID==null)o.classID=["solidColorLayer","gradientLayer","patternLayer"][T];
|
|
for(var f=0;f<s.length;f++)if($[s[f]])o[s[f]]=JSON.parse(JSON.stringify($[s[f]]))};cf.kz.GM=function($){var o=new M.Zb;
|
|
if($.Z!=null){o.color=0;o.channel=$.Z.channel.slice(0);o.rect=$.Z.rect.clone()}return o};cf.kz.py=function($,o,T,s){var E=s.d/T.d,e=s.w/T.w,n=s.d/2,A=s.w/2,u=L.M.Uo(s).I;
|
|
for(var f=0;f<$.u.length;f++){var Y=$.u[f],b=Y.add.SoLd;if(b==null||b.Idnt.v!=o)continue;if(E!=1||e!=1){var a=D.p.GQ(b.nonAffineTransform),w=L.$.TU(a,s),X=new fY;
|
|
X.translate(-n,-A);X.scale(E,e);X.translate(n,A);var N=L.$.E8(w,L.$.KQ(X)),z=u.slice(0);L.$.t(N,z);b.Trnf=D.p.vP(z);
|
|
b.nonAffineTransform=D.p.vP(z)}Y.qI($)}$.T()};cf.kz.a2_=function($,o,T){o.color=255-o.color;L.lY(o.channel);
|
|
o.Or=!0;$.tF(T);T.T()};cf.kz.prototype.OK=function($,o){var T=$.e,s=o.u[$.c];o.sr=!0;if(T==M.sv){o.add.lnk2.splice(o.add.lnk2.indexOf($.gk),1,$.Gj);
|
|
cf.kz.py(o,$.id,$.gk.wc[1],$.Gj.wc[1])}if(T==M.I0){s.add.SoLd.Impr.v.classID=$.C5;s.qI(o)}if(T==M.ZT){var E=JSON.parse($.WV);
|
|
for(var f=0;f<E.length;f++)o.u[E[f]].fh=$.AO[f];o.T()}if(T==M.dR){var E=JSON.parse($.WV);for(var f=0;
|
|
f<E.length;f++)o.u[E[f]].opacity=$.AO[f];o.T()}if(T==M.gg){var E=JSON.parse($.WV);for(var f=0;f<E.length;
|
|
f++)if(o.u[E[f]].add.lsct!=hd.ic)o.u[E[f]].add.lspf=$.AO[f]}if(T==M.NI){var e=$.UQ,n=$.agF;delete s.add[e[0]];
|
|
if(n[0]!="----")s.add[n[0]]=n[1]}if(T==M.yr){s.add.iOpa=$.AO;o.T()}if(T==M._q){for(var f=0;f<$.WV.length;
|
|
f++){var A=o.u[$.WV[f]];A.bC(!A.N9())}o.T()}if(T==M.AA){var u=s.yy();u.isEnabled=!u.isEnabled;s.tF(o);
|
|
o.T()}if(T==M.WD){var u=s.DE(o)._;u.isEnabled=!u.isEnabled;s.T();o.T()}if(T==M.Gt){var u=s.add.vmsk;
|
|
u.isEnabled=!u.isEnabled;if(!u.isEnabled){if(s.Vx){s._=s.Vx;s.Vx=null}else s._=null}else if(s._){s.Vx=s._;
|
|
s._=null}s.tF(o);o.T()}if(T==M.Yv){s.WL=!s.WL;o.T()}if(T==M.ip){s.add.lmfx.masterFXSwitch.v=!s.add.lmfx.masterFXSwitch.v;
|
|
s.B4.ZM=!0;o.T()}if(T==M.TN){s.add.SoLd.filterFX.v.enab.v=!s.add.SoLd.filterFX.v.enab.v;s.zG(o);o.T()}if(T==M.KE){var Y=$.index,b=s.add.lmfx[ev.CP[Y[0]]].v[Y[1]].v;
|
|
b.enab.v=!b.enab.v;s.B4.ZM=!0;o.T()}if(T==M.je){var a=o.u[$.bf],w=o.u[$.Rv],X=$.aiS,N=$.ag3;if(X=="")delete a.add.lmfx;
|
|
else a.add.lmfx=JSON.parse(X);if(N=="")delete w.add.lmfx;else w.add.lmfx=JSON.parse(N);a.B4.ZM=!0;w.B4.ZM=!0;
|
|
o.T()}if(T==M.Hj){var z=s.add.SoLd.filterFX.v.filterFXList.v[$.index].v;z.enab.v=!z.enab.v;s.zG(o);o.T()}if(T==M.aR){s.add.SoLd.filterFX.v=JSON.parse(JSON.stringify($.a9$));
|
|
s.zG(o);o.T()}if(T==M.zB){var u=s.yy();u.lq=!u.lq}if(T==M.mY){var u=s.add.vmsk;u.lq=!u.lq}if(T==M.dI){var i=$.xF;
|
|
for(var f=0;f<i.length;f+=2){var k=i[f],A=k>=0?o.u[k]:o.w5[-1-k];A.add.vogk=JSON.parse(i[f+1]);L.qy.Iy(A.add.vogk,A.add.vmsk);
|
|
if(k>=0)A.tF(o)}o.T()}if(T==M.uh){s.add.artb=JSON.parse($.abD);o.T();D.LY.bS(o,$)}if(T==M.Ep){o.Z=$.I9;
|
|
o.iy=$.xF.slice(0);o.el=$._F.slice(0);o.Cd=o.RZ=!0}if(T==M.Y5){s.UD=!s.UD}if(T==M.cS){var Q=$.are;for(var f=0;
|
|
f<Q.length;f++)o.u[f].pI=Q[f]}if(T==M.Ia){if($.gW)o.D=$.gW;if($.c5)o.Z=$.c5[0];o.T7=null;o.T();o.qp($.rd);
|
|
D.LY.bS(o,$)}if(T==M.nN){for(var f=0;f<$.RV.length;f+=3)cf.kz.nD(o,o.u[$.RV[f]],$.RV[f+1]);if($.c5){var O=$.c5[0];
|
|
if(O==null)delete o.Z;else o.Z=O}}if(T==M.dZ){s.DE(o)._=null;s.T();o.T()}if(T==M.KN){s.DE(o)._=$._;s.T();
|
|
o.T()}if(T==M.B8){cf.kz.k$(o,$.I4,0)}if(T==M.Gi){cf.kz.JN(o,s,!0)}if(T==M.Y9){cf.kz.JN(o,o.u[$.Yf],$._.isEnabled);
|
|
cf.kz.Zy(o,o.u[$.src],$)}if(T==M.Ho){cf.kz.Zy(o,s,$)}if(T==M.OD){o.sx=JSON.parse($.Mr)}if(T==M.Oe){o.name=$.any}if(T==M.OZ){for(var f=0;
|
|
f<$.M9.length;f++){var c=$.M9[f],A=o.u[c[0]];A.tM(c[1]);if(c[3])A.add.lnsr=c[3];else delete A.add.lnsr}}if(T==M.Tv){for(var f=0;
|
|
f<$.u.length;f++)o.u[$.u[f]].add.lclr=$.agN[f]}if(T==M.lS){var B=$.aiq;for(var f=0;f<$.WV.length;f++){var A=o.u[$.WV[f]],G=B[f];
|
|
if(!$.OH)A.add.vstk=JSON.parse(JSON.stringify(G));else D.Ie.wm(A,JSON.parse(JSON.stringify(G)));A.wn(o)}o.T()}if(T==M.a5){s.hK($.C5);
|
|
s.tF(o);o.T()}o.RZ=!0};cf.kz.prototype.wx=function($,o){var T=$.e,s=o.u[$.c];o.sr=!0;if(T==M.sv){o.add.lnk2.splice(o.add.lnk2.indexOf($.Gj),1,$.gk);
|
|
cf.kz.py(o,$.id,$.Gj.wc[1],$.gk.wc[1])}if(T==M.I0){s.add.SoLd.Impr.v.classID=$.mI;s.qI(o)}if(T==M.ZT){var E=JSON.parse($.WV);
|
|
for(var f=0;f<E.length;f++)o.u[E[f]].fh=$.mI;o.T()}if(T==M.dR){var E=JSON.parse($.WV);for(var f=0;f<E.length;
|
|
f++)o.u[E[f]].opacity=$.mI;o.T()}if(T==M.gg){var E=JSON.parse($.WV);for(var f=0;f<E.length;f++)if(o.u[E[f]].add.lsct!=hd.ic)o.u[E[f]].add.lspf=$.mI[f]}if(T==M.NI){var e=$.agF,n=$.UQ;
|
|
delete s.add[e[0]];if(n[0]!="----")s.add[n[0]]=n[1]}if(T==M.yr){s.add.iOpa=$.mI;o.T()}if(T==M._q){for(var f=0;
|
|
f<$.WV.length;f++){var A=o.u[$.WV[f]];A.bC(!A.N9())}o.T()}if(T==M.AA){var u=s.yy();u.isEnabled=!u.isEnabled;
|
|
s.tF(o);o.T()}if(T==M.WD){var u=s.DE(o)._;u.isEnabled=!u.isEnabled;s.T();o.T()}if(T==M.Gt){var u=s.add.vmsk;
|
|
u.isEnabled=!u.isEnabled;if(!u.isEnabled){if(s.Vx){s._=s.Vx;s.Vx=null}else s._=null}else if(s._){s.Vx=s._;
|
|
s._=null}s.tF(o);o.T()}if(T==M.Yv){s.WL=!s.WL;o.T()}if(T==M.ip){s.add.lmfx.masterFXSwitch.v=!s.add.lmfx.masterFXSwitch.v;
|
|
s.B4.ZM=!0;o.T()}if(T==M.TN){s.add.SoLd.filterFX.v.enab.v=!s.add.SoLd.filterFX.v.enab.v;s.zG(o);o.T()}if(T==M.KE){var Y=$.index,b=s.add.lmfx[ev.CP[Y[0]]].v[Y[1]].v;
|
|
b.enab.v=!b.enab.v;s.B4.ZM=!0;o.T()}if(T==M.je){var a=o.u[$.bf],w=o.u[$.Rv],X=$.anq,N=$.a1e;if(X=="")delete a.add.lmfx;
|
|
else a.add.lmfx=JSON.parse(X);if(N=="")delete w.add.lmfx;else w.add.lmfx=JSON.parse(N);a.B4.ZM=!0;w.B4.ZM=!0;
|
|
o.T()}if(T==M.Hj){var z=s.add.SoLd.filterFX.v.filterFXList.v[$.index].v;z.enab.v=!z.enab.v;s.zG(o);o.T()}if(T==M.aR){s.add.SoLd.filterFX.v=JSON.parse(JSON.stringify($.akm));
|
|
s.zG(o);o.T()}if(T==M.zB){var u=s.yy();u.lq=!u.lq}if(T==M.mY){var u=s.add.vmsk;u.lq=!u.lq}if(T==M.dI){var i=$.X7;
|
|
for(var f=0;f<i.length;f+=2){var k=i[f],A=k>=0?o.u[k]:o.w5[-1-k];A.add.vogk=JSON.parse(i[f+1]);L.qy.Iy(A.add.vogk,A.add.vmsk);
|
|
if(k>=0)A.tF(o)}o.T()}if(T==M.uh){s.add.artb=JSON.parse($.Sv);o.T();D.LY.n5(o,$)}if(T==M.Ep){o.Z=$.a3;
|
|
o.iy=$.X7.slice(0);o.el=$.XV.slice(0);o.Cd=o.RZ=!0}if(T==M.Y5){s.UD=!s.UD}if(T==M.cS){var Q=$.acM;for(var f=0;
|
|
f<Q.length;f++)o.u[f].pI=Q[f]}if(T==M.Ia){var O=$.c_,c=0,B;for(var f=0;f<O.length;f++){var A=O[f],G=A.add.lsct;
|
|
if(G==hd.ic)c++;else if(G==hd.NH||G==hd.Qm)c--;if(A.add.artb&&c!=0)B="Artboards can not be inside folders."}if(B){o.history.pop();
|
|
o.Q5--;alert(B);return}D.LY.n5(o,$);if($.Iv)o.D=$.Iv;if($.c5)o.Z=$.c5[1];o.T7=null;o.T();o.qp($.c_)}if(T==M.nN){for(var f=0;
|
|
f<$.RV.length;f+=3)cf.kz.nD(o,o.u[$.RV[f]],$.RV[f+2]);if($.c5){var l=$.c5[1];if(l==null)delete o.Z;else o.Z=l}}if(T==M.dZ){s.DE(o)._=$._;
|
|
s.dQ=0;s.T();o.T()}if(T==M.KN){s.DE(o)._=null;s.dQ=0;s.T();o.T()}if(T==M.B8){cf.kz.k$(o,$.I4,1)}if(T==M.Gi){cf.kz.Zy(o,s,$)}if(T==M.Y9){cf.kz.JN(o,o.u[$.src],$._.isEnabled);
|
|
cf.kz.Zy(o,o.u[$.Yf],$)}if(T==M.Ho){cf.kz.JN(o,s,$._.isEnabled)}if(T==M.OD){o.sx=JSON.parse($.Y6)}if(T==M.Oe){o.name=$.gl}if(T==M.OZ){for(var f=0;
|
|
f<$.M9.length;f++){var v=$.M9[f],A=o.u[v[0]];A.tM(v[2]);if(v[4])A.add.lnsr=v[4];else delete A.add.lnsr}}if(T==M.Tv){for(var f=0;
|
|
f<$.u.length;f++)o.u[$.u[f]].add.lclr=$.r_[f]}if(T==M.lS){var p=$.Dk;for(var f=0;f<$.WV.length;f++){var A=o.u[$.WV[f]],P=p[f];
|
|
if(!$.OH)A.add.vstk=JSON.parse(JSON.stringify(P));else D.Ie.wm(A,JSON.parse(JSON.stringify(P)));A.wn(o)}o.T()}if(T==M.a5){s.hK($.mI);
|
|
s.tF(o);o.T()}o.RZ=!0};cf.kz.XA=function($,o){var T=0;for(var f=0;f<$.u.length;f++){var s=$.u[f].getName();
|
|
if(s.startsWith(o)){var E=s.slice(o.length).trim(),e=parseInt(E);if(!isNaN(e)&&e+""==E)T=e}}return T};
|
|
cf.kz.k$=function($,o,T){for(var f=0;f<o.length;f++){var s=o[f],E=$.u[s.Sk];if(s.oC){E.add.SoLd=JSON.parse(s.oC[T])}if(s.oj){if(s.oj[1-T]!=null)$.JW(s.oj[1-T]);
|
|
if(s.oj[T]!=null)$.lU(s.oj[T]);else E.dQ=0}E.qI($)}};cf.kz.wk=function($,o){var T=$.Yt,s=$.rect.clone();
|
|
if(T!=null&&(T.x!=o.d||T.y!=o.w)){s.x=Math.floor((o.d-s.d)/2);s.y=Math.floor((o.w-s.w)/2)}return s};
|
|
cf.kz.a6g=function($,o){if(o.Vx)o.Vx=null;else o._=null;o.tF($);$.T();o.dQ=0};cf.kz.nD=function($,o,T){var s=o.yy();
|
|
if(s==null&&T==null)return;if(s)cf.kz.a6g($,o);if(T==null)return;if(o._)o.Vx=T;else o._=T;o.tF($);$.T()};
|
|
cf.kz.JN=function($,o,T){if(o.Vx&&T){o._=o.Vx;o.Vx=null}else if(o._&&T){o._=null}delete o.add.vogk;delete o.add.vstk;
|
|
delete o.add.vmsk;o.tF($);o.Jg=!1;$.T7=[];$.T()};cf.kz.Zy=function($,o,T){o.add.vogk=JSON.parse(T.qy);
|
|
if(T.ci)o.add.vstk=JSON.parse(T.ci);else delete o.add.vstk;o.add.vmsk=T._.clone();if(o._&&o.add.vmsk.isEnabled)o.Vx=o._;
|
|
o.tF($);o.Jg=T.w7;$.T7=[$.u.indexOf(o)];$.dl=[];$.T()};cf.ye=function(){cf.e8.call(this,D.b8);this.kG=null;
|
|
this.Ku=null;this.Ux=null;this.Qo=[];this.tg=null};cf.ye.prototype=new cf.e8;cf.ye.prototype.A2=function($,o,T,s,E){var e=$.c;
|
|
if(e==null)e=T.D[0];var n=T.u[e],A=$.II;if(this.kG==null){this.Ux=cf.ye.Yk(T,n);this.kG=JSON.stringify(this.Ux);
|
|
if(n.add.lmfx)this.Ku=JSON.stringify(n.add.lmfx)}if(n.add.lmfx==null){n.add.lmfx=JSON.parse(ev.default);
|
|
for(var f=0;f<ev.order.length;f++)n.add.lmfx[ev.CP[f]]={t:"VlLs",v:[]}}if($.e=="scaleeffects"){if($.H=="confirm"||$.H=="cancel"){this.A2({e:$.H},o,T,s,E);
|
|
return}n.add.lmfx=JSON.parse(this.Ku);fW.XF(n.add.lmfx,$.H/100)}else if($.e=="changeprop"){var u=null;
|
|
if(A!=0){var Y=this.Qo[A[0]];if(Y==null)Y=ev.Qo[A[0]];Y=JSON.parse(Y);var b=n.add.lmfx[ev.CP[A[0]]].v;
|
|
if(b[A[1]]==null)b[A[1]]={t:"Objc",v:Y};u=b[A[1]].v;for(var a in Y)if(u[a]==null)u[a]=Y[a]}if($.e=="changeprop"){if(A==0){this.Ux[$.BU].v=$.H;
|
|
cf.ye.vR(T,n,this.Ux)}else if($.BU=="lagl"){if(u.uglg&&u.uglg.v){T.pa($.H.val);this.Ux.ahA=T.ou()}else u[$.BU].v=$.H}else if($.BU=="Lald"){if(u.uglg.v){T.um($.H.val);
|
|
this.Ux.adG=T.RS()}else u[$.BU].v=$.H}else if((A[0]==3||A[0]==8)&&($.BU=="Clr"||$.BU=="Grad")){if($.BU=="Clr"){u.Clr={t:"Objc",v:$.H};
|
|
delete u.Grad}if($.BU=="Grad"){u.Grad={t:"Objc",v:$.H};delete u.Clr}}else{u[$.BU].v=$.H}if(A!=0)this.Qo[A[0]]=JSON.stringify(u)}if(A!=0)if(u.Ptrn)T.Af(fW.OA(u.Ptrn.v,E.q_))}else if($.e=="setstl"){var w=$.H.Lefx;
|
|
if(w)fW.eX(w,T,E.q_);fW.yb($.H,n);this.Ux=cf.ye.Yk(T,n)}else if($.e=="st_dupsingle"){var X=n.add.lmfx[ev.CP[$.S9[0]]].v;
|
|
if(X[$.S9[1]]==null)return;var N=JSON.parse(JSON.stringify(X[$.S9[1]]));X.splice($.S9[1],0,N)}else if($.e=="st_movsingle"){var z=$.S9[1],X=n.add.lmfx[ev.CP[$.S9[0]]].v;
|
|
if(X[$.S9[1]]==null)return;var i=Math.max(0,Math.min(X.length-1,z+$.afA)),k=X[i];X[i]=X[z];X[z]=k}else if($.e=="cancel"){if(this.Ku==null)delete n.add.lmfx;
|
|
else n.add.lmfx=JSON.parse(this.Ku);cf.ye.vR(T,n,JSON.parse(this.kG));this.kG=null;this.Ku=null}else if($.e=="confirm"){var Q=JSON.stringify(n.add.lmfx),O=new dt([11,6],this);
|
|
O.data={u:[e],vW:[this.Ku],zZ:[Q],G9:[this.kG],Dq:[JSON.stringify(this.Ux)]};T.g4(O);this.kG=null;this.Ku=null;
|
|
if(Q!=null){var c=JSON.parse(Q);dm.y4(c);c.classID="Lefx";delete c.masterFXSwitch;var B=new x(H.E.b0);
|
|
B.US=!0;B.data={Wk:"set",r5:!0};var G=aj.D4("Lyr",!0);G.v.splice(0,0,{t:"prop",v:{classID:"Prpr",keyID:"Lefx"}});
|
|
B.data.bI={__name:"Set",classID:"setd",null:G,T:{t:"Objc",v:c}};o.J(B)}}else if($.e=="st_copy"){this.tg=[this.kG,this.Ku];
|
|
this.kG=null;this.Ku=null}else if($.e=="st_paste"||$.e=="st_clear"){if($.e=="st_paste"&&this.tg==null)return;
|
|
var l=$.c!=null?[$.c]:T.D.slice(0),v=[],p=[],P=[],h=[];for(var f=0;f<l.length;f++){var n=T.u[l[f]],j=cf.ye.Yk(T,n);
|
|
v.push(n.add.lmfx?JSON.stringify(n.add.lmfx):null);P.push(JSON.stringify(j));if($.e=="st_paste"){p.push(this.tg[1]);
|
|
h.push(this.tg[0])}else{p.push(null);j.lrMd.v=0;j.Opct.v.val=100;j.iOpa.v.val=100;j.blIf={v:[]};for(var C=0;
|
|
C<10;C++)j.blIf.v.push(0,0,255,255);h.push(JSON.stringify(j))}}var O=new dt([11,6],this);O.data={u:l,vW:v,zZ:p,G9:P,Dq:h};
|
|
this.wx(O.data,T);T.g4(O);this.kG=null;this.Ku=null}else{var V=this.Ux,c=null;if($.e=="st_delsingle"){c=JSON.parse(this.Ku);
|
|
c[ev.CP[$.S9[0]]].v.splice($.S9[1],1);c=JSON.stringify(c)}if(c==null)delete n.add.lmfx;else n.add.lmfx=JSON.parse(c);
|
|
if(V!=null)cf.ye.vR(T,n,V);var O=new dt([11,6],this);O.data={u:[$.c],vW:[this.Ku],zZ:[c],G9:[this.kG],Dq:[JSON.stringify(V)]};
|
|
T.g4(O);this.kG=null;this.Ku=null}n.B4.ZM=!0;T.sr=!0;T.T()};cf.ye.Yk=function($,o){if(o.add.iOpa==null)o.add.iOpa=255;
|
|
if(o.add.brst==null)o.add.brst=[1,1,1];var T=o.p3()?["pass"].concat(hI.zk):hI.zk;return{lrMd:{v:T.indexOf(o.fh)},Opct:{v:{type:"#Prc",val:Math.round(o.opacity*100/255)},t:"UntF"},iOpa:{v:{type:"#Prc",val:Math.round(o.add.iOpa*100/255)},t:"UntF"},blIf:{v:o.so.slice(0)},brst:{v:o.add.brst},ahA:$.ou(),adG:$.RS(),p3:o.p3()}};
|
|
cf.ye.vR=function($,o,T){var s=o.p3()?["pass"].concat(hI.zk):hI.zk;o.fh=s[T.lrMd.v];o.opacity=Math.round(T.Opct.v.val*255/100);
|
|
o.add.iOpa=Math.round(T.iOpa.v.val*255/100);o.so=T.blIf.v.slice(0);o.add.brst=T.brst.v.slice(0);$.pa(T.ahA);
|
|
$.um(T.adG)};cf.ye.prototype.OK=function($,o){for(var f=0;f<$.u.length;f++){var T=o.u[$.u[f]],s=$.vW[f];
|
|
if(s==null)delete T.add.lmfx;else T.add.lmfx=JSON.parse(s);cf.ye.vR(o,T,JSON.parse($.G9[f]));T.B4.ZM=!0}o.sr=!0;
|
|
o.T()};cf.ye.prototype.wx=function($,o){for(var f=0;f<$.u.length;f++){var T=o.u[$.u[f]],s=$.zZ[f];if(s==null)delete T.add.lmfx;
|
|
else T.add.lmfx=JSON.parse(s);cf.ye.vR(o,T,JSON.parse($.Dq[f]));T.B4.ZM=!0}o.sr=!0;o.T()};cf.xg=function(){cf.e8.call(this,D.dm)};
|
|
cf.xg.prototype=new cf.e8;cf.xg.prototype.A2=function($,o,T,s){var E=JSON.parse(JSON.stringify(T.kk)),e=JSON.parse(JSON.stringify(T.kk)),n=null,A=null,u=null,Y=-1,b=!1;
|
|
if($.e=="delLC"){var a=cf.xg.Xm(T.kk,$.II),w=T.kk.lastAppliedComp?T.kk.lastAppliedComp.v:0;e.list.v.splice(a,1);
|
|
if(w==$.II)delete e.lastAppliedComp;n="Delete Layer Comp"}if($.e=="editLC"){var a=cf.xg.Xm(T.kk,$.II),X=e.list.v[a].v;
|
|
if($.gl!=null)X.Nm.v=$.gl;if($.ant!=null){var N=$.ant,z=X.capturedInfo.v,i=z&(1<<N)-1;z=z>>N;if((z&1)==1)z--;
|
|
else z++;X.capturedInfo.v=(z<<N)+i}n="Layer Comp properties"}if($.e=="setLC"){cf.xg.$p(T);if($.II==0)delete e.lastAppliedComp;
|
|
else e.lastAppliedComp={t:"long",v:$.II};n="Switch Layer Comp";b=!0}if($.e=="updLC"){cf.xg.$p(T);A=cf.xg.a0D(T,$.II);
|
|
u=cf.xg.ox(T,$.II);e.lastAppliedComp={t:"long",v:$.II};n="Update Layer Comp";Y=$.II;b=!0}if($.e=="addLC"){cf.xg.$p(T);
|
|
var k=1;for(var f=0;f<e.list.v.length;f++)k=Math.max(k,e.list.v[f].v.compID.v)+1;k+=Math.floor(Math.random()*1e4);
|
|
var Q={t:"Objc",v:{classID:"Comp",Nm:{t:"TEXT",v:"New Comp "+(e.list.v.length+1)},compID:{t:"long",v:k},capturedInfo:{t:"long",v:7}}};
|
|
e.list.v.push(Q);e.lastAppliedComp={t:"long",v:k};n="New Layer Comp";var O=cf.xg.ox(T,k);cf.xg.uf(T,O,k)}var c=new dt(n,this);
|
|
c.data={a9n:E,ahk:e,ai_:A,aeC:u,II:Y,bT:b};this.wx(c.data,T);T.g4(c)};cf.xg.prototype.wx=function($,o){o.kk=$.ahk;
|
|
o.sr=!0;if($.aeC)cf.xg.uf(o,$.aeC,$.II);if($.bT){var T=o.kk.lastAppliedComp?o.kk.lastAppliedComp.v:0,s=cf.xg.Xm(o.kk,T),E=s==-1?null:o.kk.list.v[s].v,e=E?E.capturedInfo.v:7;
|
|
cf.xg.Ci(o,T,e);o.T()}};cf.xg.prototype.OK=function($,o){o.kk=$.a9n;o.sr=!0;if($.ai_)cf.xg.uf(o,$.ai_,$.II);
|
|
if($.bT){var T=o.kk.lastAppliedComp?o.kk.lastAppliedComp.v:0,s=cf.xg.Xm(o.kk,T),E=s==-1?null:o.kk.list.v[s].v,e=E?E.capturedInfo.v:7;
|
|
cf.xg.Ci(o,T,e);o.T()}};cf.xg.$p=function($){if($.kk.lastAppliedComp!=null||!$.wo)return;var o=cf.xg.ox($,0);
|
|
cf.xg.uf($,o,0);$.wo=!1};cf.xg.Jh=function($,o,T){$.v.Hrzn.v+=o;$.v.Vrtc.v+=T};cf.xg.Xm=function($,o){var T=$.list.v;
|
|
for(var f=0;f<T.length;f++)if(T[f].v.compID.v==o)return f;return-1};cf.xg.a0S=function($){var o=$.layerSettings.v,E=null;
|
|
if(o.length==0)return;var T="compList enab Ofst blendOptions Lefx FXRefPoint imageMask vectorMask layerSpecific".split(" "),s=o[0].v;
|
|
if(s.enab==null)s.enab={t:"bool",v:!0};if(s.Ofst==null)s.Ofst={t:"Objc",v:{classID:"null",Hrzn:{t:"long",v:0},Vrtc:{t:"long",v:0}}};
|
|
for(var f=0;f<o.length;f++){var e=o[f].v;if(E==null)E=JSON.parse(JSON.stringify(e));else for(var n=0;
|
|
n<T.length;n++){var A=T[n];if(e[A])E[A]=JSON.parse(JSON.stringify(e[A]))}o[f].v=JSON.parse(JSON.stringify(E))}};
|
|
cf.xg.wU=function($,o){var T=$.add.shmd.cmls,s=T.layerSettings.v;for(var E=0;E<s.length;E++){var e=s[E].v,n=e.compList.v[0].v;
|
|
if(n==o)return E}return-1};cf.xg.uD=function($,o){var T=cf.xg.wU($,o);return T==-1?null:$.add.shmd.cmls.layerSettings.v[T].v};
|
|
cf.xg.Ci=function($,o,T){for(var f=0;f<$.u.length;f++){var s=$.u[f],E=s.add.shmd.cmls;if(E==null)continue;
|
|
var e=E.layerSettings.v,n=cf.xg.uD(s,o);if(n==null){s.bC(!1);continue}if((T&1)!=0){if(n.enab)s.bC(n.enab.v);
|
|
else s.bC(!0)}if((T&2)!=0){if(n.Ofst){var A=n.Ofst.v,u=s.TC($),Y=Math.round(A.Hrzn.v-u.x),b=Math.round(A.Vrtc.v-u.y);
|
|
if(Y!=0||b!=0)D.aD.FY($,[f],null,Y,b)}}if((T&4)!=0){if(n.Lefx){var a=JSON.parse(JSON.stringify(n.Lefx.v));
|
|
dm.FP(a);if(JSON.stringify(a)!=JSON.stringify(s.add.lmfx)){s.add.lmfx=a;s.B4.ZM=!0}}else delete s.add.lmfx;
|
|
if(n.blendOptions){var w=n.blendOptions.v;if(w.Opct)s.opacity=Math.round(255*w.Opct.v.val/100);if(w.fillOpacity)s.add.iOpa=Math.round(255*w.fillOpacity.v.val/100);
|
|
if(w.Md)s.fh=s.add.lsct==hd.ic?"norm":hI.VB(w.Md.v.BlnM)}else{s.opacity=255;s.fh=s.p3()?"pass":"norm";
|
|
s.add.iOpa=255}}}};cf.xg.a0D=function($,o){var T={};for(var f=0;f<$.u.length;f++){var s=$.u[f];if(s.add.shmd==null||s.add.shmd.cmls==null)continue;
|
|
T["l"+s.add.lyid]=JSON.parse(JSON.stringify(cf.xg.uD(s,o)))}return T};cf.xg.ox=function($,o){var T={};
|
|
for(var f=0;f<$.u.length;f++){var s=$.u[f],E=s.add.lyid;T["l"+E]=cf.xg.WM($,s,o)}return T};cf.xg.WM=function($,o,T){var s=o.add.shmd?o.add.shmd.cmls:null,E={classID:"null"},e=o.TC($),n={t:"Objc",v:{classID:"null",Hrzn:{t:"long",v:e.x},Vrtc:{t:"long",v:e.y}}};
|
|
E.compList={t:"VlLs",v:[{t:"long",v:T}]};E.enab={t:"bool",v:o.N9()};E.Ofst=JSON.parse(JSON.stringify(n));
|
|
E.FXRefPoint=JSON.parse(JSON.stringify(s&&s.origFXRefPoint?s.origFXRefPoint:n));E.blendOptions={t:"Objc",v:{classID:"null",Md:{t:"enum",v:{BlnM:hI.$j(o.fh)}},Opct:{t:"UntF",v:{type:"#Prc",val:100*o.opacity/255}},fillOpacity:{t:"UntF",v:{type:"#Prc",val:o.add.iOpa!=null?100*o.add.iOpa/255:100}}}};
|
|
if(o.add.vmsk){E.vectorMask={t:"Objc",v:{classID:"null"}};E.vectorMask.v.Ofst=JSON.parse(JSON.stringify(n))}if(o.add.lmfx){E.Lefx={t:"Objc",v:JSON.parse(JSON.stringify(o.add.lmfx))};
|
|
dm.y4(E.Lefx.v)}return E};cf.xg.a3I=function($,o){var T=o.add.lyid;if(o.add.shmd==null)o.add.shmd={};
|
|
if(o.add.shmd.cmls==null){o.add.shmd.cmls={classID:"null",LyrI:{t:"long",v:T},layerSettings:{t:"VlLs",v:[{t:"Objc",v:cf.xg.WM($,o,0)}]}}}};
|
|
cf.xg.uf=function($,o,T){for(var f=0;f<$.u.length;f++){var s=$.u[f],E=s.add.lyid;cf.xg.a3I($,s);var e=s.add.shmd.cmls,n=e.layerSettings.v,A=o["l"+E];
|
|
if(A!=null)A={t:"Objc",v:JSON.parse(JSON.stringify(A))};var u=cf.xg.wU(s,T);if(u==-1){if(A==null)continue;
|
|
else n.push(A)}else{if(A==null)n.splice(u,1);else n[u]=A}}};cf.xg.ka=function($,o){for(var f=0;f<$.u.length;
|
|
f++){var T=$.u[f],s=T.add.lyid;if(T.add.shmd==null||T.add.shmd.cmls==null)continue;var E=T.TC($),e=Math.round(E.x),n=Math.round(E.y);
|
|
if(!o){e=-e;n=-n}var A=T.add.shmd.cmls,u=A.layerSettings.v;if(A.origFXRefPoint)cf.xg.Jh(A.origFXRefPoint,-e,-n);
|
|
for(var Y=0;Y<u.length;Y++){var b=u[Y].v;cf.xg.Jh(b.Ofst,e,n);var a=b.imageMask,w=b.vectorMask;if(a&&a.v.Ofst)cf.xg.Jh(a.v.Ofst,e,n);
|
|
if(w&&w.v.Ofst)cf.xg.Jh(w.v.Ofst,e,n)}}};cf.NX=function(){cf.e8.call(this,D.WO);this.Y6=null;this.Yh=null};
|
|
cf.NX.prototype=new cf.e8;cf.NX.pu=function($,o,T,s){if(s)o/=4;var E=0,e=0,n=255,A=0,u=0,Y=255;while(e+$[E]<o){e+=$[E];
|
|
E++}while(A+$[n]<o){A+=$[n];n--}if(s){E-=Math.round($[E]/(T/32));n+=Math.round($[n]/(T/32));if(E<0)u=Math.round(-E*255/(n-E));
|
|
if(n>255)Y=255-Math.round((n-255)*255/(n-E))}return[Math.max(E,0),Math.min(n,255),u,Y,100]};cf.NX.prototype.A2=function($,o,T,s,E){var e=$.e;
|
|
if(e=="auto"){var n=$.Og,A=cf.NX.getData(T);for(var f=0;f<A.length;f++){var u=A[f],Y;if(n<3){}else{var b=iZ.o_("hue2");
|
|
gK.cI(b,0,[0,-100,0]);Y=dq.Za("hue2",b)}dq.AY(Y,u.ah,u.Qd,u.uL)}cf.NX.z8(T,A);cf.NX.vE(T,A,n<3?[4,16,n]:[19,7,0],this);
|
|
T.T()}if(e=="edit_layer")this.abr($,o,T,s);if(e=="edit"||e=="confirm"||e=="cancel")this.n2($,o,T,E,!0);
|
|
if(e=="start"){if(T.D.length==0)return;var a=T.u[T.D[0]];if(a.add.SoLd&&a.dQ<=0){var w=new x(H.E.N,!0);
|
|
w.U=D.VI;w.data={e:"start",jX:$.aT,ed:$.ed};o.J(w);return}if(!T.qQ(o,null,!0))return;if(U[$.aT]&&$.ed==null){if(T.D.length!=1)alert("Will be applied to "+T.D.length+" layers.");
|
|
var w=new x(H.E.Q,!0);w.data={e:H.V.NC,a_:"afw_"+$.aT};o.J(w)}else{this.n2({e:"edit",ed:$.ed,jX:$.aT},o,T,E);
|
|
this.n2({e:"confirm",jX:$.aT},o,T,E)}}};cf.NX.prototype.abr=function($,o,T,s){var E=$.e,e=T.D[0],n=T.u[e],A=dq.get(n.add),u=JSON.parse(JSON.stringify($.H)),a;
|
|
for(var Y in dq.jf)if(dq.jf[Y]==A)u.classID=Y;var b=T.history[T.Q5];if(b&&b.U==this&&b.data.C5!=null&&b.data.c==e)a=b;
|
|
else{var w=new x(H.E.b0,!0),X={classID:"setd",null:aj.D4("AdjL",!0),T:{t:"Objc",v:u}};w.data={r5:!0,Wk:"set",bI:X};
|
|
o.J(w);var a=new dt([6,39],this);a.data={c:e,C5:n.add[A],mI:$.H,QI:X};T.g4(a)}a.data.mI=$.H;a.data.QI.T.v=u;
|
|
this.wx(a.data,T)};cf.NX.getData=function($,o,T){var s=[],E=new df(0,0,$.d,$.w),e=$.el.length!=0?[-1-$.el[0]]:$.D;
|
|
for(var f=0;f<e.length;f++){var n=e[f],A=n<0?null:$.u[n],u={c:n,W5:n<0?1:A.dQ};s.push(u);var Y=$.iy[-1-n];
|
|
if(0<=n)Y=A.dQ<=0?null:A.dQ==1?A.yy():A.DE($)._;var b=Y?Y.rect:A.rect;if($.Z)u.uL=Y!=null?$.Z.rect.Sr(E):$.Z.rect.Sr(b);
|
|
else u.uL=o||Y!=null?b.BZ(E):b.clone();if(T)u.uL=T[f].uL.clone();var a=u.uL.Y();u.ah=L.G(a*4);if(Y)D.x5.PO(Y.channel,Y.rect,Y.color,u.ah,u.uL);
|
|
else L.h9(A.buffer,b,u.ah,u.uL);u.Qd=u.ah.slice(0);if($.Z){u.RV=L.G(a);L.pg($.Z.channel,$.Z.rect,u.RV,u.uL)}}return s};
|
|
cf.NX.a1I=function($,o,T){if(o==null)return o;var s=dq.aQ($,o),e;if(s==-1)return o;var E=T.length>>>2,n=L.lm(T),A=.001*E;
|
|
if(s==0||s==2)e=[[0,255,0,255,100],cf.NX.pu(n[1],A,E,s==2),cf.NX.pu(n[2],A,E,s==2),cf.NX.pu(n[3],A,E,s==2)];
|
|
if(s==1)e=[cf.NX.pu(n[0],A*.33,E,!1),[0,255,0,255,100],[0,255,0,255,100],[0,255,0,255,100]];var u=iZ.o_("levl");
|
|
for(var f=0;f<4;f++)cb.cI(u,f,e[f]);return u};cf.NX.prototype.n2=function($,o,T,s){if(this.Y6==null){if($.jX=="aply")T.u[T.D[0]].extend(new df(0,0,T.d,T.w));
|
|
this.Y6=cf.NX.getData(T,null,$.jX=="fade"?T.OY().data:null);if($.jX=="aply")this.Y6[0].tY=T.aw()}if($.e=="edit"){this.Yh=[$.jX,$.ed];
|
|
var E=this.Y6[0],e=cf.NX.a1I($.jX,$.ed,E.ah),n=dq.Za($.jX,e);if($.jX=="fade"||$.jX=="aply")n=$.ed;if(n!=null){for(var f=0;
|
|
f<this.Y6.length;f++){var A=this.Y6[f];if($.ND)L.w0(A.ah,A.Qd);else if($.jX=="fade"){var u=hI.VB($.ed.Md.v.BlnM),Y=$.ed.Opct.v.val/100,b=T.OY().data[f];
|
|
L.w0(b.ah,A.Qd);if(u=="norm")L.R.Cu(A.ah,A.uL,A.Qd,A.uL,null,null,null,A.uL,Y);else{var a=fW.gs();a.xX=!0;
|
|
for(var f=0;f<b.ah.length;f+=4)if(b.ah[f+3]!=A.ah[f+3]){a=null;break}L.R.xE(u,A.ah,A.uL,A.Qd,A.uL,A.uL,Y,a)}}else if($.jX=="aply"){n=n.With.v;
|
|
var w=n.T.v,X,N;if(w[1].t=="name"){var z=0;for(var i=0;i<T.u.length;i++)if(T.u[i].getName()==w[1].v.val)z=i;
|
|
if(z==A.c){X=A.ah;N=A.uL}else{var k=T.u[z];X=k.buffer;N=k.rect}}else{N=new df(0,0,T.d,T.w);X=A.tY}var Q=n.Clcl?n.Clcl.v.Clcn:null,u=Q?hI.VB(Q):"norm",Y=n.Opct?n.Opct.v.val/100:1,O=["RGB","Rd","Grn","Bl","Trsp"].indexOf(w[0].v.enum),e=n.Invr&&n.Invr.v;
|
|
if(e||O!=0){X=X.slice(0);if(e)L.a9b(X);if(O!=0){var c=L.G(N.Y());L.Ge(X,c,O-1);if(O==4)L.lY(c);for(var i=0;
|
|
i<3;i++)L.aM(c,X,i)}}if(Q=="Sbtr"){var B=1/n.Scl.v,G=n.Ofst.v,l=new Uint8ClampedArray(A.Qd.buffer);for(var f=0;
|
|
f<X.length;f+=4){l[f]=(A.ah[f]-X[f])*B+G;l[f+1]=(A.ah[f+1]-X[f+1])*B+G;l[f+2]=(A.ah[f+2]-X[f+2])*B+G}}else{var a=fW.gs();
|
|
a.xX=n.PrsT&&n.PrsT.v;A.Qd.fill(0);A.Qd.set(A.ah);L.R.xE(u,X,N,A.Qd,A.uL,A.uL,Y,a)}}else dq.AY(n,A.ah,A.Qd,A.uL)}cf.NX.z8(T,this.Y6)}}if($.e=="cancel"){cf.NX.CD(T,this.Y6);
|
|
this.Y6=null}if($.e=="confirm"){var v=$.jX=="fade"?[2,11]:$.jX=="aply"?[2,12]:dq.names[$.jX],p=dq.aQ($.jX,this.Yh[1]);
|
|
if(p!=-1)v=[4,16,p];cf.NX.vE(T,this.Y6,v,this);this.Y6=null;if(p==-1)cf.NX.Zh(o,this.Yh)}T.T()};cf.NX.Zh=function($,o){var T=o[0],s=o[1],E,e;
|
|
if(dq.PV[T]){E=dq.PV[T];if(U[T])e=s}if(iZ.PV[T]){E=iZ.PV[T];if(U[T])e=s}if(T=="fade"){E="fade";e=s}if(T=="aply"){E="applyImageEvent";
|
|
e=s}if(E==null)return;var n=new x(H.E.b0,!0);n.data={r5:!0,Wk:E};if(e){e=JSON.parse(JSON.stringify(e));
|
|
e.classID="null";delete e.__name;n.data.bI=e}$.J(n)};cf.NX.CD=function($,o){cf.NX.B6($,o)};cf.NX.vE=function($,o,T,s){for(var f=0;
|
|
f<o.length;f++){var E=o[f],e=$.u[E.c],n=E.c<0?$.iy[-1-E.c]:E.W5<=0?null:E.W5==1?e.yy():e.DE($)._;if(n){n.Gg();
|
|
n.Or=!0;if(e)e.tF($)}else{e.Gg();e.T()}delete E.Qd;delete E.RV}var A=new dt(T,s);A.data=o;$.g4(A);$.sr=!0};
|
|
cf.NX.z8=function($,o,T){for(var f=0;f<o.length;f++){var s=o[f],E=$.u[s.c],e=T?s.ah:s.Qd,n=s.uL;if(s.W5==0){E.extend(n);
|
|
if(s.RV){L.h9(s.ah,n,E.buffer,E.rect);L.R.Cu(e,n,E.buffer,E.rect,s.RV,n,0,n,1)}else L.h9(e,n,E.buffer,E.rect)}else{var A=s.c<0?$.iy[-1-s.c]:s.W5==1?E.yy():E.DE($)._;
|
|
A.extend(n);if(s.RV){var u=L.G(n.Y()*4);L.w0(s.ah,u);L.R.Cu(e,n,u,n,s.RV,n,0,n,1);D.x5.Mn(u,n,A)}else D.x5.Mn(e,n,A);
|
|
A.Or=!0;if(E)E.tF($)}if(E)E.T()}if(!T)cf.NX.rU($,o)};cf.NX.B6=function($,o){for(var f=0;f<o.length;f++){var T=o[f],s=$.u[T.c],E=T.uL,e=L.G(E.Y()*4);
|
|
if(T.W5==0){L.h9(s.buffer,s.rect,e,E);s.extend(E);L.h9(T.ah,E,s.buffer,s.rect);s.Gg()}else{var n=T.c<0?$.iy[-1-T.c]:T.W5==1?s.yy():s.DE($)._;
|
|
D.x5.PO(n.channel,n.rect,n.color,e,E);n.extend(E);D.x5.Mn(T.ah,E,n);n.Gg();n.Or=!0;if(s)s.tF($)}T.ah=e;
|
|
if(s)s.T()}$.sr=!0};cf.NX.rU=function($,o){var T=cf.NX.B2($),s=~T;if(T==16777215)return;for(var f=0;
|
|
f<o.length;f++){var E=o[f],e=$.u[E.c],n=E.uL;if(E.W5!=0)continue;e.extend(n);var A=n.x-e.rect.x,u=n.y-e.rect.y,Y=e.rect.d,b=new Uint32Array(E.ah.buffer),a=new Uint32Array(e.buffer.buffer);
|
|
for(var w=0;w<n.w;w++)for(var X=0;X<n.d;X++){var N=w*n.d+X,z=(w+u)*Y+(X+A);a[z]=a[z]&T|b[N]&s}e.Gg();
|
|
e.T()}$.T()};cf.NX.B2=function($){var o=$.C.xR;return o[2]*16711680|o[1]*65280|o[0]*255};cf.NX.prototype.OK=function($,o){var T=o.u[$.c];
|
|
if($.C5!=null)T.add[dq.get(T.add)]=$.C5;else cf.NX.B6(o,$);o.T()};cf.NX.prototype.wx=function($,o){var T=o.u[$.c];
|
|
if($.C5!=null)T.add[dq.get(T.add)]=$.mI;else cf.NX.B6(o,$);o.T()};cf.G_=function(){cf.e8.call(this,D.VI);
|
|
this.Y6=null;this.Cq=null;this.e=null;this.Yh=null};cf.G_.prototype=new cf.e8;cf.G_.prototype.A2=function($,o,T,s,E){if($.e=="start"){if(T.D.length==0)return;
|
|
var e=T.u[T.D[0]];if(e.add.SoLd&&e.dQ<=0){}else if(!T.qQ(o,null,!0))return;var n=$.jX;if((U[n]||iZ.q[n])&&$.ed==null){if(T.D.length!=1)alert("Will be applied to "+T.D.length+" layers.");
|
|
var A=new x(H.E.Q,!0);A.data=cf.G_.zO(n,this.xe(T,n));o.J(A)}else{var u={e:"edit",jX:n,ed:$.ed,t$:this.xe(T)};
|
|
this.A2(u,o,T,s,E);u.e="confirm";delete u.ed;this.A2(u,o,T,s,E)}}if($.e=="edit"||$.e=="cancel"||$.e=="confirm"){if($.e=="edit")this.Yh=[$.jX,$.ed];
|
|
if($.t$)this.aoE($,T,E);else this.amY($,o,T,E)}if($.e=="applylast"&&this.Yh!=null){var u={e:"edit",jX:this.Yh[0],ed:this.Yh[1],t$:this.xe(T)};
|
|
this.A2(u,o,T,s,E);u.e="confirm";delete u.ed;this.A2(u,o,T,s,E)}};cf.G_.zO=function($,o){var T=iZ.q[$];
|
|
if(T)return{e:H.V.s9,U:T,Ne:{t$:o}};else return{e:H.V.NC,a_:"afw_"+$,t$:o}};cf.G_.prototype.xe=function($,o){var T=$.u[$.D[0]],s;
|
|
if(T.add.SoLd&&T.dQ<=0){s={c:$.D[0],index:0};if(T.add.SoLd.filterFX!=null){var E=T.add.SoLd.filterFX.v.filterFXList.v;
|
|
s.index=E.length;for(var f=0;f<E.length;f++)if(iZ.Zs(E[f].v)==o&&iZ.q[o])s.index=f}}return s};cf.G_.prototype.aoE=function($,o,T){var s=o.u[$.t$.c],E=$.jX;
|
|
if($.e=="edit"){if(this.e==null){var e=iZ.names[E];if(e==null)e=dq.names[E];if(E=="blendOptions")e=[14,10];
|
|
this.e=new dt(e,this);this.e.data={t$:$.t$,afa:JSON.parse(JSON.stringify(s.add.SoLd))}}if(!s.HC()){s.add.SoLd.filterFX=iZ.HA();
|
|
this.e.data.oj=iG.v4(s.add.SoLd.placed.v);o.lU(this.e.data.oj);s.qI(o)}var n=s.add.SoLd.filterFX.v.filterFXList.v;
|
|
if(n[$.t$.index]==null){n.push(iZ.sJ(E,T))}if($.ed){n[$.t$.index].v.enab.v=$.ND!=!0;if(E=="blendOptions")n[$.t$.index].v.blendOptions.v=$.ed;
|
|
else n[$.t$.index].v.Fltr.v=$.ed}this.e.data.a2n=JSON.parse(JSON.stringify(s.add.SoLd));this.wx(this.e.data,o)}if($.e=="cancel"){if(this.e)this.OK(this.e.data,o);
|
|
this.e=null}if($.e=="confirm"){if(this.e)o.g4(this.e);this.e=null}};cf.G_.prototype.Wd=function($){return{i:$>>>16,m:$>>>8&255,P:$&255}};
|
|
cf.G_.prototype.amY=function($,o,T,s){if(this.Y6==null){var E=iZ.Rn($.jX,$.ed);this.Y6=cf.NX.getData(T,E.x!=0||E.y!=0)}if($.e=="edit"){var e=JSON.stringify($.ed);
|
|
if(($.ed==null||e!=this.Cq)&&$.ND!=!0)for(var f=0;f<this.Y6.length;f++){var n=this.Y6[f],A={rect:n.uL,buffer:n.ah},u={rect:n.uL,buffer:n.Qd};
|
|
iZ.AY($.jX,A,$.ed,this.Wd(s.z4),this.Wd(s.GR),u,[T.add.lnk2?T.add.lnk2:[],T.u[T.D[0]].yy(),T.iy]);this.Cq=e}cf.NX.z8(T,this.Y6,$.ND)}if($.e=="cancel"){cf.NX.CD(T,this.Y6);
|
|
this.Y6=null;this.Cq=null}if($.e=="confirm"){cf.NX.vE(T,this.Y6,iZ.names[$.jX],this);this.Y6=null;this.Cq=null;
|
|
cf.NX.Zh(o,this.Yh)}T.T();T.sr=!0};cf.G_.prototype.OK=function($,o){if($.t$){var T=o.u[$.t$.c];if($.oj)o.JW($.oj);
|
|
T.add.SoLd=JSON.parse(JSON.stringify($.afa));if(T.HC())T.zG(o);else{T.qI(o);T.dQ=0}}else cf.NX.B6(o,$);
|
|
o.T();o.sr=!0};cf.G_.prototype.wx=function($,o){if($.t$){var T=o.u[$.t$.c];if($.oj)o.lU($.oj);T.add.SoLd=JSON.parse(JSON.stringify($.a2n));
|
|
if(T.HC())T.zG(o);else T.qI(o);if(!T.px())T.Jp+=32}else cf.NX.B6(o,$);o.T();o.sr=!0};var gr={zo:"0",m8:"1",HZ:"2",tS:"3",fB:"4",WW:"5",ww:"6",qu:"7",N:"8",ws:"8.5",u9:"8.8",tc:"9",En:"10",mp:"11",kD:"12",Gu:"13",b$:"14",bV:"15",ux:"21",fc:"22",PA:"23",Nf:"23.0",qG:"23.1",wa:"23.2",_8:"23.3",fS:"23.4",nd:"23.5",gi:"23.6",uW:"30",Wh:"31",cT:"40",gu:"41",CZ:"42"};
|
|
gr.pK={};gr.pK[gr.m8]=["abr","brushes",ey,[9,3]];gr.pK[gr.HZ]=["grd","gradients",hq,[12,37]];gr.pK[gr.tS]=["shc","contours",bs,[12,21]];
|
|
gr.pK[gr.fB]=["asl","styles",ff,[12,22]];gr.pK[gr.WW]=["pat","patterns",eP,[12,62]];gr.pK[gr.ww]=["csh","shapes",aS,[12,77]];
|
|
gr.pK[gr.qu]=["aco","swatches",bf,[9,8]];gr.pK[gr.N]=["atn","actions",gg,[9,9]];gr.pK[gr.ws]=["tpl","tpresets",fR,[9,12]];
|
|
gr.pK[gr.u9]=["icc","profiles",fp,"ICCs"];function dt($,o,T){if(T==null)T=!1;this.name=$;this.U=o;this.RY=T;
|
|
this.data=null}var aj={};aj.D4=function($,o){var T={t:"Clss",v:{classID:$}};if(o)T={t:"Enmr",v:{classID:$,typeID:"Ordn",enum:"Trgt"}};
|
|
return{t:"obj ",v:[T]}};aj.Hn=function($,o){var T={classID:"Lyr"};T[$]=o;return{Wk:"set",bI:{classID:"null",null:aj.D4("Lyr",!0),T:{t:"Objc",v:T}}}};
|
|
aj.a8y=function($,o,T,s,E){var e=new x(H.E.b0,!0),n=[],f=0,A=aj.Wa(o,T,s,n);while(n.length!=0){var u=n.pop();
|
|
f++;if(!u.b)continue;if(u.Wk=="conditional"){var Y=$.u[$.D[0]],b=u.bI.null.v.Cndt,a=!1;if(b=="Bckg")a=!1;
|
|
else if(b=="Pxel"&&$.Jt(!1))a=!0;else if(b=="Adjs"&&dq.get(Y.add))a=!0;else if(b=="Shp"&&Y.add.vogk)a=!0;
|
|
else if(b=="Grup"&&Y.p3())a=!0;else if(b=="Opn"&&$!=null)a=!0;else if(b=="32Bt")a=!1;else if(b=="RGB")a=!0;
|
|
var w=u.bI.then,X=u.bI.else;if(a&&w)aj.Wa(o,w.v[0].v.val,w.v[1].v.val,n);if(!a&&X)aj.Wa(o,X.v[0].v.val,X.v[1].v.val,n)}else if(u.Wk=="stop"){if(u.bI.Cntn&&u.bI.Cntn.v==!0)window.confirm(u.bI.Msge.v);
|
|
else{alert(u.bI.Msge.v);break}}else if(u.Wk=="play"){var N=u.bI.null.v,z=new x(H.E.Q,!0);z.data={e:H.V.mU,n4:[N[0].v.val,N[1].v.val]};
|
|
E.J(z)}else{e.data={Wk:u.Wk,bI:u.bI};E.J(e)}}};aj.Wa=function($,o,T,s){var E;for(var f=0;f<$.length;
|
|
f++){if($[f].U1!=T)continue;var e=$[f].Vi;for(var n=0;n<e.length;n++){if(e[n].U1!=o)continue;E=e[n].Vi}}var A=E.length;
|
|
for(var f=0;f<A;f++)s.push(E[A-1-f])};aj.agi=function($){var o=$.Wk,T=$.bI,s,n,A,u,Y,b;if(T&&T.null)s=T.null.v[0];
|
|
if(T&&s==null&&T.At)s=T.At.v[0];if(s&&s.t=="obj ")s=s.v[0];var E=s?s.v.classID:null,e=["purge"];if(e.indexOf(o)!=-1)return o[0].toUpperCase()+o.slice(1);
|
|
b=dq.PV;for(n in b)if(b[n]==o)A=n;b=iZ.PV;for(n in b)if(b[n]==o)u=n;b=gH.PV;for(n in b)if(b[n]==o)Y=n;
|
|
if(A){var a=dq.aQ(A,T);if(a!=-1)return[4,16,a];return dq.names[A]}if(u)return iZ.names[u];if(Y)return gH.names[Y];
|
|
var w=aj.Vn;if(o=="make"){if(s){if(E=="AdjL")return[6,1];else if(E=="layerSection")return[6,9];else if(E=="Lyr")return[6,13];
|
|
else if(E=="Chnl"&&s.v.enum=="Msk")return[6,2];else if(E=="contentLayer")return[6,48,1];else if(E=="BckL")return"Make Background Layer";
|
|
else if(E=="Path")return"Make Path";else if(E=="TxLr")return"Make Text Layer";else if(E=="slice")return"Make Slices"}if(T.Nw){E=T.Nw.v.classID;
|
|
if(E=="Dcmn")return[11,7];else if(E=="Chnl"||E=="SCch")return"New Channel"}}else if(o=="select"){if(E=="Chnl")return"Select "+(s.v.enum=="Msk"?"Mask ":"")+"Channel";
|
|
else if(E=="Mn")return"Select Panel \""+s.v.enum+"\"";else if(E=="Lyr"){console.log(s);if(s.t=="Enmr")return"Select "+{Bckw:"Backward",Frwr:"Forward"}[s.v.enum]+" Layer";
|
|
return"Select Layer \""+s.v.val+"\""}else if(E=="Dcmn")return"Select Document"}else if(w[o]&&E=="Chnl"){var X=s.v.keyID=="fsel";
|
|
return w[o]+" "+(X?"Selection":"Channel")}else if(o=="set"){if(E=="Lyr")return"Set Current Layer";else if(E=="AdjL")return[6,39];
|
|
else if(E=="contentLayer")return[6,48,2];else if(E=="Prpr")return[11,6];else if(E=="Clr")return"Set "+(s.v.keyID=="FrgC"?"Foreground":"Background")+" color";
|
|
else if(E=="Brsh")return"Set Brush";else console.log(E)}else if(o=="move"){if(E=="Lyr")return"Move Layer"}else if(o=="show"||o=="hide"){var N="";
|
|
if(E=="Lyr")+"Layer";if(E=="Chnl")+"Channel";return(o=="show"?"Show":"Hide")+" "+N}else if(o=="reset"){if(E=="Clr")return"Reset Colors"}else if(o=="exchange"){if(E=="Clr")return[22,7,0]}else if(o=="rotateEventEnum")return[2,5];
|
|
else if(o=="flip"){var z=T.Axis.v.Ornt=="Hrzn";return[[2,6],[22,4,z?2:3]]}if(E=="Chnl"){if(o=="duplicate"){if(s.v.keyID=="fsel")return"Selection to Channel";
|
|
else return"Duplicate Channel"}if(o=="delete")return"Delete Channel"}if(o=="transform")return s&&s.v.keyID=="fsel"?[7,10]:[10,16];
|
|
var i={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:T?[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"},k=i[o];
|
|
if(k==null)k=aj.kU[o];if(k)return k;return o};aj.kU={border:[7,9],smoothness:[19,3,0],expand:[7,4],contract:[7,5],feather:[7,6],inverse:[7,2]};
|
|
aj.Vn={set:"Set",add:"Add Transparency",addTo:"Add To",subtract:"Subtract Transparency",subtractFrom:"Subtract From",interfaceIconFrameDimmed:"Intersect Transparency",interfaceWhite:"Intersect With"};
|
|
aj.aj9=function($,o,T,s){var E=$.Wk,e=$.bI,n=new x(H.E.N,!0),Y,b,a,w,X,k;n.U=D.Jc;var A=new x(H.E.Q,!0),u=["purge","updatePlacedLayer","convertMode"];
|
|
if(u.indexOf(E)!=-1)return;X=dq.PV;for(Y in X)if(X[Y]==E)b=Y;X=iZ.PV;for(Y in X)if(X[Y]==E)a=Y;X=gH.PV;
|
|
for(Y in X)if(X[Y]==E)w=Y;if(E=="fade")b=E;if(E=="applyImageEvent")b="aply";if(b){n.U=D.WO;n.data={e:"start",aT:b,ed:e}}else if(a){n.U=D.VI;
|
|
n.data={e:"start",jX:a,ed:e}}else if(w){n.U=D.VI;n.data={e:"start",jX:"GEfc",ed:e}}else if(E=="imageSize"||E=="canvasSize"||E=="revealAll"||E=="trim"||E=="crop"){n.U=D.EZ;
|
|
n.data={e:"fromAction",xU:$}}else if(E=="fill"||E=="delete"&&e==null){n.U=D.m8;n.data={e:"fromAction",xU:$}}else if(E=="colorRange"){var N=e.Mnm.v,z=e.Mxm.v;
|
|
n.U=D.ZR;n.data={e:"crange",m0:{vA:N.Lmnc.v,Ca:N.A.v,P:N.B.v},aN:{vA:z.Lmnc.v,Ca:z.A.v,P:z.B.v},Al:e.Fzns.v/200}}else if(aj.kU[E]||aj.Vn[E]&&(!1||e.With&&e.With.v[0].v.keyID=="fsel"||e.From&&e.From.v[0].v.keyID=="fsel"||e.null&&e.null.v[0].v.keyID=="fsel"||e.T.v[0]&&e.T.v[0].v.keyID=="fsel")){n.U=D.ZR;
|
|
n.data={e:"fromAction",xU:$}}var i={copyToLayer:M.Lu,mergeLayersNew:s&&s.D.length==1?M.r4:M.RI,rasterizeLayer:M.VT,mergeVisible:M.wV,flattenImage:M.kn,newPlacedLayer:M.RJ};
|
|
if(i[E])n.data={e:i[E],bI:e};if(n.data){o.J(n);return}if(E=="desaturate"){n.U=D.WO;n.data={e:"auto",Og:3};
|
|
if(s&&s.u[s.D[0]].add.SoLd==null)o.J(n);return}if(E=="close"){if(e.Svng.v.YsN=="Ys"){A.data={e:H.V.HR};
|
|
o.J(A)}A.data={e:H.V.Qh,ZF:s};o.J(A);return}if(E=="save"){A.data={e:H.V.HR};o.J(A);return}if(E=="copyMerged"){A.data={e:H.V.ho,Pd:!0,lR:!0};
|
|
o.J(A);return}var i={placedLayerEditContents:H.V.CT,copyEvent:H.V.ho,paste:H.V.sA};if(i[E])A.data={e:i[E],lR:!0};
|
|
if(A.data){o.J(A);return}if(e.null||e.At)k=(e.null?e.null:e.At).v;else k=[{t:"----",v:e}];if(k[0].t=="obj "){if(k.length!=1)throw"e";
|
|
k=k[0].v}for(var Q=0;Q<k.length;Q++){var O=k[Q],c=O.v.classID;n.data=null;if(E=="make"){if(e.null==null&&e.Nw)c=e.Nw.v.classID;
|
|
if(c=="AdjL"){n.data={e:M.vl,bI:e}}else if(c=="layerSection"){n.data={e:M.Ai};if(e.Usng){var B=e.Usng.v;
|
|
if(B.Nm)n.data.gl=B.Nm.v;if(B.Clr)n.data.r_=aj.qB(B)}}else if(c=="Lyr"){if(e.Usng&&e.Usng.v.length==2)n.data={e:M.hj};
|
|
else{n.data={e:M.Kw};if(e.Usng)n.data.gl=e.Usng.v.Nm.v;if(e.below&&e.below.v)n.data.abh=!0}}else if(c=="Chnl"&&O.v.enum=="Msk"){n.data={e:M.y1,Rz:e.Usng.v.UsrM}}else if(c=="Chnl"||c=="SCch"){n.data={e:M.Ep,f8:"fromAction",H:$}}else if(c=="contentLayer"){n.data={e:M.ps,bI:e}}else if(c=="BckL"){s.u[s.D[0]].ab_();
|
|
continue}else if(c=="Dcmn"){var G=e.Nw.v;A.data={e:H.V.pl,u4:iG.af3(G,T)}}else if(c=="Ptrn")A.data={e:H.V.OU,M9:0};
|
|
else if(c=="Path"){n.U=D.bo;n.data={e:"pathedit",f8:"fromsel"}}else if(c=="TxLr"){n.U=D.ko;n.data={e:"fromAction",xU:$}}else if(c=="slice"){n.U=D.zH;
|
|
n.data={e:"fromAction",xU:$}}else if(c=="SnpS"){continue}else{console.log(E,c,e);throw"e"}}else if(E=="select"){var l={PcTl:D.La,magicWandTool:D.os};
|
|
if(c=="Lyr"){var v=e.selectionModifier,p=v?v.v.selectionModifierType:null,P=aj.Ys(s,O);if(P==-1){alert("Layer "+O.v.val+" does not exist.");
|
|
throw"e"}n.data={e:M.b7,c:P,aeY:p?["addToSelection","addToSelectionContinuous"].indexOf(p):null,Km:0,a18:!0}}else if(c=="Chnl"){n.data={e:M.b7,c:P,Km:1}}else if(c=="Dcmn"){if(o.ZB.length<2)return;
|
|
A.data={e:H.V.eL,dir:e.null.v[0].v.val}}else if(l[c]){A.data={e:H.V.s9,U:l[c]}}}else if((E=="set"||E=="reset"||E=="exchange")&&c=="Clr"){A.data={e:H.V.uY,M9:gr.ux,f8:E=="reset"?3:2};
|
|
if(E=="set"){A.data.f8=O.v.keyID=="FrgC"?0:1;var h=L.h.Qc(e.T.v);A.data.H=h.i<<16|h.m<<8|h.P}}else if(E=="set"){if(c=="AdjL"){var j=e.T.v.classID;
|
|
j=dq.jf[j];n.U=D.WO;if(j)n.data={e:"edit_layer",H:e.T.v}}else if(c=="Lyr"){var C=e.T.v,P=aj.Ys(s,O);
|
|
if(C.Nm)n.data={e:M.OZ,name:C.Nm.v};else if(C.Opct)n.data={e:M.dR,mI:Math.round(C.Opct.v.val*255/100)};
|
|
else if(C.fillOpacity)n.data={e:M.yr,mI:Math.round(C.fillOpacity.v.val*255/100)};else if(C.Md)n.data={e:M.ZT,mI:hI.C3.indexOf(C.Md.v.BlnM)+(s.u[P].p3()?1:0)};
|
|
else if(C.Usrs)n.data={e:M.zB,c:P};else if(C.Blnd){n.U=D.b8;n.data={e:"setstl",c:P,H:{blendOptions:{t:"objc",v:C}}};
|
|
o.J(n);n.data={e:"confirm",c:P}}else if(C.Clr){var V=aj.qB(C);n.data={e:M.Tv,aq1:V}}else if(k[0].t=="prop")continue;
|
|
else{console.log(e);throw"e"}var d=s.u[P];d.a6r()}else if(c=="Prpr"){var C=JSON.parse(JSON.stringify(e.T.v));
|
|
if(O.v.keyID=="TxtS"){var P=aj.Ys(s,e.null.v[1]),d=s.u[P],m=d.add.TySh,R=JSON.parse(JSON.stringify(m.h3)),g=g8.m5(R),S=g8.$Q(R,0,g.length-2);
|
|
if(C.Undl&&C.Undl.v.Undl=="underlineOnLeftInVertical")S.oH.Underline=!0;g8.zA(R,0,g.length-1,S);n.U=D.ko;
|
|
n.data={e:"newED",_m:P,_z:R};Q=1e9}else{for(var F in C)if(C[F].v){if(F=="Scl")C[F].v.val=100;if(C[F].v.TrnS&&C[F].v.TrnS.v.Crv==null){C[F].v.TrnS=JSON.parse(ev.Qo[9]).TrnS}}dm.FP(C);
|
|
if(C.masterFXSwitch==null)C.masterFXSwitch={t:"bool",v:!0};var P=aj.Ys(s,e.null.v[1]);n.U=D.b8;n.data={e:"setstl",c:P,H:{Lefx:{t:"objc",v:C}}};
|
|
o.J(n);n.data={e:"confirm",c:P}}}else if(c=="contentLayer"){var P=aj.Ys(s,O),C=e.T.v;if(C.classID=="shapeStyle")C=C.FlCn.v;
|
|
var r={solidColorLayer:0,gradientLayer:1,patternLayer:2}[C.classID],a=JSON.parse(JSON.stringify(ev.WA[r]));
|
|
cf.kz.Nx(C,a,r);n.data={e:M.lS,WV:[P],OH:!0,H:{Ul:r+1,n$:a}}}else if(c=="Brsh"){var q=JSON.parse(JSON.stringify(T.n_.J_)),W=e.T.v;
|
|
if(W.masterDiameter)q.Brsh.v.Dmtr.v.val=W.masterDiameter.v.val;else console.log("unknown brush parameters");
|
|
A.data={e:H.V.uY,M9:gr.b$,On:q}}else{console.log(O,e);throw c}}else if(E=="move"){if(c=="Lyr"){var C=e.T.v;
|
|
if(C.classID=="Ofst"){n.data={e:"trsl",a76:C.Hrzn.v.val,a3D:C.Vrtc.v.val};n.U=D.ih}else{var Z,I;if(C[0].t=="Enmr"){if(C[0].v.enum=="Frnt")I=0;
|
|
else if(C[0].v.enum=="Nxt")I=1;else if(C[0].v.enum=="Prvs")I=2;else if(C[0].v.enum=="Back")I=3;else throw"e"}else Z=C[0].v.val;
|
|
n.data={e:M.ru,target:Z,f8:I,aiL:e.Dplc?e.Dplc.v:!1}}}}else if(E=="groupEvent")n.data={e:M.Yv};else if(E=="show"||E=="hide"){console.log(e);
|
|
if(c=="Lyr"){var P=aj.Ys(s,O);if(P==-1)continue;var _=s.u[P].N9();if(E=="show"&&_||E=="hide"&&!_)continue;
|
|
n.data={e:M._q,c:P}}else if(c=="Chnl"){n.data={e:M.Ep,f8:"fromAction",H:$}}else if(c=="filterFX"){if(O.v.val!=null)n.data={e:M.Hj,index:O.v.val-1};
|
|
n.data={e:M.TN};k=[k[0]]}}else if(E=="rotateEventEnum"){n.U=D.EZ;var cN=e.Angl.v.val;n.data={e:"rot",U1:[2,5],H:-cN*Math.PI/180}}else if(E=="flip"){n.U=D.EZ;
|
|
var ce=e.Axis.v.Ornt=="Hrzn",gf=ce?new aY(-1,1):new aY(1,-1);n.data={e:"scl",U1:[[2,6],[22,4,ce?2:3]],H:gf}}else if(E=="transform"){var K=1,cv=1,f0=0,i8=0,iC=0,an=0,cO=0;
|
|
if(e.Wdth)K=e.Wdth.v.val/100;if(e.Hght)cv=e.Hght.v.val/100;if(e.Skew){var bh=e.Skew.v;f0=bh.Hrzn.v.val;
|
|
i8=bh.Vrtc.v.val}if(e.Ofst){var bD=e.Ofst.v;an=bD.Hrzn.v.val;cO=bD.Vrtc.v.val}if(e.Angl)iC=e.Angl.v.val;
|
|
var fq=new fY;fq.concat(new fY(K,K*Math.tan(i8*Math.PI/180),cv*Math.tan(f0*Math.PI/180),cv,0,0));fq.rotate(-iC*Math.PI/180);
|
|
fq.translate(an,cO);var fO={Qcsa:4,Qcs0:0,Qcs1:2,Qcs2:8,Qcs3:6,Qcs4:1,Qcs5:5,Qcs6:7,Qcs7:3}[e.FTcs.v.QCSt];
|
|
if(fO==null)throw e.FTcs.v.QCSt;var O=e.null;if(O&&O.v instanceof Array)O=O.v[0];var P=O?aj.Ys(s,O):null;
|
|
if(P==-1)P=null;n.U=O&&O.v.keyID=="fsel"?D.zF:D.tj;n.data={e:"mat",wh:fO,H:fq}}else if(c=="Chnl"){n.data={e:M.Ep,f8:"fromAction",H:$}}else if(E=="duplicate")n.data={e:M.NO,gl:e.Nm?e.Nm.v:null};
|
|
else if(E=="delete"){if(c=="filterFX"){if(O.v.val!=null)n.data={e:M.Op,XN:O.v.val-1};else n.data={e:M.IX}}else n.data={e:M.J1};
|
|
k=[k[0]]}else if(E=="align"){if(e.Aply&&e.Aply.v.projection=="Auto"){n.U=D.EZ;n.data={e:"auto-align"}}else{n.U=D.ih;
|
|
var b={AdLf:0,AdRg:2}[e.Usng.v.ADSt];if(b==null)throw"e";n.data={e:"algn",H:b}}}else if(E=="applyLocking"){var g6=e.layerLocking.v,hM;
|
|
if(g6.protectTransparency)hM=[[g6.protectTransparency.v],[0]];else if(g6.protectNone)hM=[[!1,!1,!1,!1],[0,1,2,31]];
|
|
else{console.log(g6);throw"e"}n.data={e:M.gg,mI:hM}}if(n.data)o.J(n);else if(A.data)o.J(A);else{console.log($);
|
|
alert("Unknown action \""+E+"\"");throw"e"}}};aj.qB=function($){var o={Rd:1,Ylw:3,Grn:4,Vlt:6}[$.Clr.v.Clr];
|
|
if(o==null)throw $.Clr.v.Clr;return o};aj.Ys=function($,o){var T=1e6,s=0;for(var f=0;f<$.D.length;f++){T=Math.min(T,$.D[f]);
|
|
s=Math.max(s,$.D[f])}var E=o.t,e=-1;if(E=="name"){var n=o.v.val,e=-1;for(var f=0;f<$.u.length;f++)if($.u[f].getName()==n){e=f;
|
|
break}}if(E=="Enmr"&&$.D.length!=0)e=$.D[0];if(E=="Enmr"&&o.v.enum=="Frwr")e=s+1;if(E=="Enmr"&&o.v.enum=="Bckw")e=T-1;
|
|
if(E=="prop"){if(o.v.keyID=="Bckg")e=0}return e};var dq={};dq.get=function($){for(var o in dq.names)if($[o]!=null)return o;
|
|
return null};dq.Za=function($,o){var T=dq.Na,s;if($=="brit"){var E=o.Brgh?o.Brgh.v:0,e=o.Cntr?o.Cntr.v:0,n=o.useLegacy?o.useLegacy.v:!1;
|
|
if(n){var A=E/255,u=1+e/100;if(u>1)u=1+Math.tan(Math.PI/2*e/101);var Y=(1-u)/2,b=L.tK.S0(A,A,A),a=[u,0,0,Y,0,u,0,Y,0,0,u,Y,0,0,0,1],w=L.tK.multiply(b,a),X=new L.uR(256);
|
|
for(var f=0;f<256;f++)X.i[f]=f;L.tK.transform(X,X,w);s={type:T.sG,tV:X.i,wF:X.i,_6:X.i,ZA:!1,He:!1}}else{var N=1024,z=-30+60*(e+100)/200,i=[];
|
|
for(var f=0;f<4;f++)i.push(L.sE.p7(f/3*255,f/3*255,!0));i[1].v.Hrzn.v=64;i[1].v.Vrtc.v=64-z;i[2].v.Hrzn.v=128+64;
|
|
i[2].v.Vrtc.v=128+64+z;i.sort(function(bz,i1){return bz.v.Hrzn.v-i1.v.Hrzn.v});var k=L.sE.$O(i,N);function Q(bz,N){var i=[],J=3;
|
|
for(var f=0;f<J+1;f++)i.push(L.sE.p7(f/J*255,f/J*255,!0));i[1].v.Hrzn.v=130-bz*26;i[1].v.Vrtc.v=130+bz*51;
|
|
i[2].v.Hrzn.v=233-bz*48;i[2].v.Vrtc.v=233+bz*10;return L.sE.$O(i,N)}var O=Q(Math.abs(E)/100,N);if(E<0){var c=[],B=1/N;
|
|
for(var f=0;f<N;f++){var G=f*B,l=f;while(O[l]>G&&l>1)l--;c[f]=l*B}O=c}var v=new Uint8Array(N);for(var f=0;
|
|
f<N;f++){var p=Math.round((N-1)*O[f]);v[f]=Math.round(255*k[p])}s={type:T.sG,tV:v,wF:v,_6:v,ZA:!1,He:!1}}}if($=="levl"){var P=[],h,j,b,C,V,d;
|
|
for(var f=0;f<4;f++)P.push(cb.sk(o,f));h=-P[0][0]/255;j=1/(P[0][1]/255-P[0][0]/255);b=L.tK.multiply(L.tK.SE(j,j,j),L.tK.S0(h,h,h));
|
|
C=L.tK.SE(1/(P[1][1]/255-P[1][0]/255),1/(P[2][1]/255-P[2][0]/255),1/(P[3][1]/255-P[3][0]/255));V=L.tK.S0(-P[1][0]/255,-P[2][0]/255,-P[3][0]/255);
|
|
d=L.tK.multiply(C,V);var v=new L.uR(256);for(var f=0;f<256;f++)v.i[f]=v.m[f]=v.P[f]=f;var m=1/(P[0][4]/100),R=1/(P[1][4]/100),g=1/(P[2][4]/100),F=1/(P[3][4]/100);
|
|
L.tK.transform(v,v,d);for(var f=0;f<256;f++){v.i[f]=Math.round(Math.max(0,Math.min(255,255*Math.pow(v.i[f]/255,R))));
|
|
v.m[f]=Math.round(Math.max(0,Math.min(255,255*Math.pow(v.m[f]/255,g))));v.P[f]=Math.round(Math.max(0,Math.min(255,255*Math.pow(v.P[f]/255,F))))}L.tK.transform(v,v,b);
|
|
for(var f=0;f<256;f++){v.i[f]=Math.round(Math.max(0,Math.min(255,255*Math.pow(v.i[f]/255,m))));v.m[f]=Math.round(Math.max(0,Math.min(255,255*Math.pow(v.m[f]/255,m))));
|
|
v.P[f]=Math.round(Math.max(0,Math.min(255,255*Math.pow(v.P[f]/255,m))))}h=P[0][2]/255;j=P[0][3]/255-P[0][2]/255;
|
|
b=L.tK.multiply(L.tK.S0(h,h,h),L.tK.SE(j,j,j));C=L.tK.SE(P[1][3]/255-P[1][2]/255,P[2][3]/255-P[2][2]/255,P[3][3]/255-P[3][2]/255);
|
|
V=L.tK.S0(P[1][2]/255,P[2][2]/255,P[3][2]/255);d=L.tK.multiply(V,C);L.tK.transform(v,v,L.tK.multiply(b,d));
|
|
s={type:T.sG,tV:v.i,wF:v.m,_6:v.P,ZA:!1,He:!1}}if($=="curv"){var r=eJ.sk(o,0).length==256?1:0,q=[];if(r==0){var W=L.sE.JI(eJ.sk(o,0),256);
|
|
for(var f=1;f<4;f++){var Z=L.sE.JI(eJ.sk(o,f),256);q.push(L.sE.iU(Z,W))}}else{var I=[];for(var f=0;f<4;
|
|
f++){var _=new Uint8Array(256);I.push(_);var cN=eJ.sk(o,f);for(var l=0;l<256;l++)_[l]=cN[l]}for(var f=1;
|
|
f<4;f++)q.push(L.sE.iU(I[f],I[0]))}s={type:T.sG,tV:q[0],wF:q[1],_6:q[2],ZA:!1,He:!1}}if($=="expA"){console.log(o);
|
|
var ce=o.Exps,gf=o.Ofst,cv=o.gammaCorrection,f0=ce?ce.v:0,i8=gf?gf.v:0,b5=cv?cv.v:1,v=new Uint8Array(256);
|
|
for(var f=0;f<256;f++){var o=f/255,iC=Math.pow(Math.abs(i8),1/(Math.PI/2));if(i8>0){o=Math.max(i8/Math.E,o);
|
|
o=o*Math.exp(i8/1.75+f0/Math.PI);o=(1-iC)*o+iC*1}else{o=o*Math.exp(-i8*1.75+f0/Math.PI);o=o+-iC*1.14}o=Math.pow(o,1/b5);
|
|
o=Math.max(0,Math.min(1,o));v[f]=Math.round(o*255)}s={type:T.sG,tV:v,wF:v,_6:v,ZA:!1,He:!1}}if($=="vibA"){s={type:T.OV,M9:[o.vibrance?o.vibrance.v:0,o.Strt?o.Strt.v:0]}}if($=="hue2"){var an=[],cO=[],bh=[],bD=o.Clrz?o.Clrz.v:!1;
|
|
for(var f=0;f<256;f++){an[f]=f/255;cO[f]=0;bh[f]=0}var fq=gK.sk(o,0),fO=dq.cB(fq[1]/100);if(bD){var g6=fq[0]/360;
|
|
for(var f=0;f<256;f++){an[f]=g6;cO[f]=fO}}else{for(var f=0;f<256;f++){var hM=an[f],d3=cO[f];an[f]+=fq[0]/360;
|
|
for(var l=0;l<6;l++){var h9=gK.sk(o,l+1),cs=h9.Pa,dv=h9.hG,iC=0;for(var ec=1;ec<4;ec++)if(dv[ec]<dv[0])dv[ec]+=360;
|
|
var gT=dv[0],iz=dv[1],gw=dv[2],iI=dv[3],g2=hM*360;if(g2<dv[0])g2+=360;var bb=(g2-gT)/(iz-gT),ir=(g2-gw)/(iI-gw);
|
|
if(bb<0)iC=0;else if(bb<1)iC=bb;else if(ir<0)iC=1;else if(ir<1)iC=1-ir;else iC=0;var u=dq.cB(cs[1]/100);
|
|
an[f]+=iC*cs[0]/360;cO[f]+=iC*u;bh[f]+=iC*cs[2]/100}}for(var f=0;f<256;f++){cO[f]=(1+cO[f])*(1+fO)-1;
|
|
bh[f]=Math.max(-1,Math.min(1,bh[f]))}}var dG=new Uint8Array(256),gY=new Uint8Array(256),e6=new Uint8Array(256);
|
|
for(var f=0;f<256;f++){var fr=an[f],bt=cO[f],cx=bh[f];if(fr>1)fr--;if(fr<0)fr++;bt=dq.aoZ(bt);bt=(1+bt)*.5;
|
|
cx=(1+cx)*.5;dG[f]=Math.round(255*fr);gY[f]=Math.round(255*bt);e6[f]=Math.round(255*cx)}var ci=fq[2]/100,gv=ci<0?-ci:ci,gu=ci<0?0:1;
|
|
s={type:T._k,a74:dG,$C:gY,a61:e6,aa8:gv*gu,HD:1-gv,akh:fq[2]/100,aku:bD?1:0}}if($=="nvrt"){var v=new Uint8Array(256);
|
|
for(var f=0;f<256;f++)v[f]=255-f;s={type:T.sG,tV:v,wF:v,_6:v,ZA:!1,He:!1}}if($=="post"){var ak=o.Lvls.v,v=new Uint8Array(256),iC=ak/255.001,hP=255/(ak-1);
|
|
for(var f=0;f<256;f++)v[f]=Math.floor(f*iC)*hP;s={type:T.sG,tV:v,wF:v,_6:v,ZA:!1,He:!1}}if($=="grdm"){var ai=o.Grad.v,hK=o.Rvrs,h3=L.h.Bu(ai.Clrs.v,0,0),N=1024,e4=L.h.IM(ai,h3,N,hK?hK.v:!1),co=L.G(N),aO=L.G(N),cC=L.G(N);
|
|
L.Ge(e4,co,0);L.Ge(e4,aO,1);L.Ge(e4,cC,2);s={type:T.sG,tV:co,wF:aO,_6:cC,ZA:!0,He:!1}}if($=="selc"){var hm=new Float32Array(9*3*2),cu=o.p6,bF=o.Mthd?o.Mthd.v.CrcM=="Absl":!1;
|
|
for(var l=0;l<9;l++){var fH=l*6,dX=de.sk(o,l),fk=dX[0]/100,ix=dX[1]/100,bx=dX[2]/100,ha=dX[3]/100;if(bF){hm[fH]=hm[fH+1]=hm[fH+2]=1;
|
|
hm[fH+3]=fk*(1+ha)+ha;hm[fH+4]=ix*(1+ha)+ha;hm[fH+5]=bx*(1+ha)+ha}else{hm[fH+0]=(1+fk)*(1+ha);hm[fH+1]=(1+ix)*(1+ha);
|
|
hm[fH+2]=(1+bx)*(1+ha)}}s={type:T.TW,arB:hm}}if($=="blwh"){var ca="Rd Yllw Grn Cyn Bl Mgnt".split(" "),s=[],iY=0,ho=0;
|
|
for(var f=0;f<6;f++)s.push(o[ca[f]].v);s.push(o.useTint.v,o.tintColor.v);var iX=[];for(var f=0;f<6;f++)iX.push((s[f]-50)/50);
|
|
var dp=L.h.Qc(s[7]);dp.i/=255;dp.m/=255;dp.P/=255;var dd=L.sY(dp.i,dp.m,dp.P),cx=L.Hl(L.AP(dd.cQ,1,.5)),iD=dd.rZ*dd.ed;
|
|
if(cx==.5)iY=ho=.5;else{iY=iD*(.5-cx)/(.5/cx-1);ho=1-iD*(.5-cx)-1/(2*(1-cx));ho/=1-1/(2*(1-cx))}s={type:T.HK,arl:iX,sw:s[6]?1:0,abe:dd.cQ,Hl:cx,a9C:iD,Kp:iY,aax:ho}}if($=="blnc"){console.log(o);
|
|
var P=[],bN=["ShdL","MdtL","HghL"];for(var f=0;f<3;f++){if(o[bN[f]]==null){P[f]=[0,0,0];continue}var ak=o[bN[f]].v,it=ak[0].v/100,j4=ak[1].v/100,gy=ak[2].v/100,fi=o.PrsL==null||o.PrsL.v?(Math.min(it,j4,gy)+Math.max(it,j4,gy))/2:0;
|
|
P[f]=[it-fi,j4-fi,gy-fi]}var q=[L.G(256),L.G(256),L.G(256)];for(var l=0;l<3;l++)for(var f=0;f<256;f++){var G=f*(1/255),hN=0,z=0,b4=0;
|
|
z=P[2][l];b4=Math.abs(z);if(z<0)hN=Math.pow(G,Math.SQRT2);else hN=1.63*(Math.pow(G+.04,.5)-.2);G=b4*hN+(1-b4)*G;
|
|
z=P[1][l];b4=Math.abs(z);if(z<0)hN=Math.pow(G,2);else hN=Math.min(2.35*(Math.pow(G+.09,.5)-.3),Math.pow(G,1/2));
|
|
G=b4*hN+(1-b4)*G;z=P[0][l];b4=Math.abs(z);if(z<0)hN=G<.4?0:Math.pow((G-.4)/.6,Math.SQRT2);else hN=Math.pow(G,Math.SQRT2/2);
|
|
G=b4*hN+(1-b4)*G;G=Math.max(0,Math.min(1,G));q[l][f]=Math.round(G*255)}s={type:T.sG,tV:q[0],wF:q[1],_6:q[2],ZA:!1,He:!1}}if($=="phfl"){var eN=L.h.Qc(o.Clr.v),hX=[eN.i/255,eN.m/255,eN.P/255],fh=o.Dnst.v/100,q=[L.G(256),L.G(256),L.G(256)];
|
|
for(var l=0;l<3;l++)for(var f=0;f<256;f++){var G=f*(1/255),a5=G*hX[l];a5=Math.max(0,Math.min(1,a5));
|
|
G=fh*a5+(1-fh)*G;q[l][f]=Math.round(G*255)}s={type:T.sG,tV:q[0],wF:q[1],_6:q[2],ZA:!1,He:o.PrsL.v}}if($=="thrs"){var v=L.G(256);
|
|
for(var f=o.Lvl.v;f<256;f++)v[f]=255;s={type:T.sG,tV:v,wF:v,_6:v,ZA:!0,He:!1}}if($=="mixr"){var aT=dq.CO(o),w=[];
|
|
for(var f=0;f<aT.H.length;f++)if(f%5!=3)w.push(aT.H[f]/100);if(aT.UE){for(var aZ=1;aZ<3;aZ++)for(var G=0;
|
|
G<4;G++)w[aZ*4+G]=w[G]}s={type:T.g5,Ak:w}}if($=="rplc"){var eA=o.Mnm.v,c0=o.Mxm.v;s={type:T.x6,m0:[eA.Lmnc.v,eA.A.v,eA.B.v],aN:[c0.Lmnc.v,c0.A.v,c0.B.v],shift:[o.H.v/360,o.Strt.v/100,o.Lght.v/100],Al:o.Fzns.v/150}}if($=="clrL"&&o.profile){var h7=new Uint8Array(o.profile.v),dS=ICC.R(h7.buffer),al=[],aD=17,al=ICC.U.sampleLUT(dS,aD);
|
|
s={type:T.jM,ah:ICC.U.rgba8LUT(al,aD),arC:al,ve:aD}}return s};dq.aQ=function($,o){var T=-1;if($!="levl"||o==null)T=-1;
|
|
else if(o.Auto)T=0;else if(o.AuCo)T=1;else if(o.autoBlackWhite)T=2;return T};dq.Na={sG:0,_k:1,OV:2,TW:3,HK:4,g5:5,x6:6,jM:7};
|
|
dq.cB=function($){if($<0)return $;return Math.pow(Math.tan(Math.PI/2*$),1.3)};dq.aoZ=function($){if($<0)return $;
|
|
$=Math.pow($,1/1.3);return Math.atan2($,1)/(Math.PI/2)};dq.AY=function($,o,T,s){var E=dq.Na,e=Date.now();
|
|
if(y.re&&s.Y()>300*300&&$.type!=E.sG&&$.type!=E.jM){s=s.clone();s.x=s.y=0;var n=y.lK(0,s.d,s.w);n.set(o);
|
|
y.U0(n,s);n.bv(s);dq.Ze($,n.Ji,s);n.get(T);return}if($.type==E.jM){var A=$.arC,u=$.ve;ICC.U.applyLUT(A,u,o,T);
|
|
var Y=o.length;for(var f=0;f<Y;f+=4)T[f+3]=o[f+3]}if($.type==E.g5)L.tK.Vh(o,T,$.Ak);if($.type==E.HK){var b=$.a9C,a=$.Hl,w=$.Kp,X=$.aax,Y=o.length;
|
|
for(var f=0;f<Y;f+=4){var s=o[f]*(1/255),N=o[f+1]*(1/255),z=o[f+2]*(1/255),i=L.QZ(s,N,z),k=0;for(var Q=0;
|
|
Q<6;Q++)k+=Math.min(1,1.7*(1-i.FI))*i.rZ*$.arl[Q]*dq.N$(i.cQ,Q*(1/6));var O=Math.max(0,Math.min(1,i.FI*(1+k)));
|
|
if($.sw==1){var c=0;if(O<w)c=O*(.5/a);else if(O<X)c=O+b*(.5-a);else c=1-(1-O)*.5/(1-a);i.cQ=$.abe;i.rZ=Math.min(1,b+3*b*Math.abs(O-.5*(w+X)));
|
|
i.FI=c}else{i.cQ=0;i.rZ=0;i.FI=O}var B=L.AP(i.cQ,i.rZ,i.FI);T[f]=Math.round(B.i*255);T[f+1]=Math.round(B.m*255);
|
|
T[f+2]=Math.round(B.P*255)}}if($.type==E.TW){var G=$.arB,Y=o.length,l=1/255;for(var f=0;f<Y;f+=4){var s=o[f]*l,N=o[f+1]*l,z=o[f+2]*l,i=L.QZ(s,N,z),v=Math.max(s,Math.max(N,z)),p=Math.min(s,Math.min(N,z)),P=1-s,h=1-N,j=1-z,C=0,V=0,d=0;
|
|
for(var Q=0;Q<9;Q++){var m=Q*6,F=0;if(G[m]==1&&G[m+1]==1&&G[m+2]==1&&G[m+3]==0&&G[m+4]==0&&G[m+5]==0)continue;
|
|
var R=P*G[m]+G[m+3],g=h*G[m+1]+G[m+4],S=j*G[m+2]+G[m+5];if(Q<6)F=dq.N$(i.cQ,Q*(1/6))*i.rZ*2*Math.min(i.FI,1-i.FI);
|
|
else if(Q==6)F=Math.max(0,p-.5)*2;else if(Q==7)F=1-(Math.abs(v-.5)+Math.abs(p-.5));else F=Math.max(0,.5-v)*2;
|
|
C+=(Math.max(0,Math.min(1,R))-P)*F;V+=(Math.max(0,Math.min(1,g))-h)*F;d+=(Math.max(0,Math.min(1,S))-j)*F}P=Math.max(0,Math.min(1,P+C));
|
|
h=Math.max(0,Math.min(1,h+V));j=Math.max(0,Math.min(1,j+d));s=1-P;N=1-h;z=1-j;T[f]=Math.round(s*255);
|
|
T[f+1]=Math.round(N*255);T[f+2]=Math.round(z*255)}}if($.type==E.sG){L.aj2(o,T,$.tV,$.wF,$._6,$.ZA,$.He)}if($.type==E._k){var r=new Uint32Array(o.buffer),q=new Uint32Array(T.buffer),Y=r.length;
|
|
if(dq.sF==null){dq.sF=new Float64Array(256);for(var f=0;f<256;f++)dq.sF[f]=dq.cB(-1+2*f/255)}var W=dq.sF;
|
|
for(var f=0;f<Y;f++){var Z=r[f],s=(Z&255)*(1/255),N=(Z>>>8&255)*(1/255),z=(Z>>>16&255)*(1/255),I=Z>>>24,_=Math.min(s,N,z),cN=Math.max(s,N,z),ce=0,gf=0,K=0;
|
|
ce=L.QZ(s,N,z).cQ;var cv=~~(ce*255+.5),f0=$.a74[cv]*(1/255),i8=$.$C[cv]*(1/255)*2-1,b5=$.a61[cv]*(1/255)*2-1,k=-b5,iC=_;
|
|
if(0<b5){k=b5;iC=cN}var an=$.aa8+$.HD*k*iC,cO=$.HD*(1-k);s=an+cO*s;N=an+cO*N;z=an+cO*z;cN=Math.max(s,N,z);
|
|
_=Math.min(s,N,z);K=(cN+_)*.5;if(cN!=_){var bh=cN-_;gf=K>.5?bh/(2-(cN+_)):bh/(cN+_)}var bD=i8;if($.aku==0){i8=W[Math.floor((1+i8)*127.5)];
|
|
bD=Math.min(gf*(1+i8),1)}var B=L.AP(f0,bD,K);s=B.i;N=B.m;z=B.P;q[f]=I<<24|z*255<<16|N*255<<8|s*255}}if($.type==E.x6){L.w0(o,T);
|
|
var r=new Uint32Array(o.buffer),q=new Uint32Array(T.buffer),Y=r.length,fq=$.Al,fO=1/fq,g6={vA:$.m0[0],Ca:$.m0[1],P:$.m0[2]},hM={vA:$.aN[0],Ca:$.aN[1],P:$.aN[2]};
|
|
for(var f=0;f<Y;f++){var Z=r[f],d3=Z&255,h9=Z>>>8&255,cs=Z>>>16&255,s=d3*(1/255),N=h9*(1/255),z=cs*(1/255),I=Z>>>24,dv=L.l1(d3,h9,cs),ec=L._y(dv,g6,hM,fq,fO);
|
|
if(ec==0)continue;var i=L.QZ(s,N,z),f0=2+i.cQ+$.shift[0];i.cQ=f0-~~f0;i.rZ=Math.max(0,Math.min(1,i.rZ+$.shift[1]));
|
|
i.FI=Math.max(0,Math.min(1,i.FI+$.shift[2]));var B=L.AP(i.cQ,i.rZ,i.FI);s=(1-ec)*s+ec*B.i;N=(1-ec)*N+ec*B.m;
|
|
z=(1-ec)*z+ec*B.P;q[f]=I<<24|z*255<<16|N*255<<8|s*255}}if($.type==E.OV){var r=new Uint32Array(o.buffer),q=new Uint32Array(T.buffer),Y=r.length,gT=$.M9[0]/100,iz=$.M9[1]/100;
|
|
for(var f=0;f<Y;f++){var Z=r[f],s=(Z&255)*(1/255),N=(Z>>>8&255)*(1/255),z=(Z>>>16&255)*(1/255),I=Z>>>24,i=L.sY(s,N,z),ce=i.cQ,gf=i.rZ,K=i.ed,gw=0,iI=45/360,g2=ce<iI?Math.cos(Math.PI/2*(ce-iI/2)/(iI/2)):0;
|
|
gf=gf+.2*(1-.4*g2)*gT*Math.max(0,Math.sin(gf*Math.PI));gf=gf*(1+iz);gf=Math.max(0,Math.min(1,gf));var B=L.ag(ce,gf,K);
|
|
s=B.i;N=B.m;z=B.P;q[f]=I<<24|z*255<<16|N*255<<8|s*255}}};dq.Ze=function($,o,T){y.aT.Ze($,o)};dq.N$=function($,o){var T=L.XT(o,$)*6;
|
|
return Math.max(0,Math.min(1,T<0?1+T:1-T))};dq.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]};
|
|
dq.wl=["expA","clrL","selc"];dq.Gc=[[13,1,1],[13,1,3],[13,1,4],[13,1,11],[13,1,5],[13,1,12]];dq.a44=[[13,1,11],[13,1,12],[13,1,3],[13,1,10]];
|
|
dq.nk=[[13,1,1],[13,1,4],[13,1,5]];dq.YZ={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"};
|
|
dq.jf=function(){var $=JSON.parse(JSON.stringify(dq.YZ));delete $.GrMp;$.GdMp="grdm";return $}();dq.PV={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"};
|
|
dq.keys={levl:[dN.I6,dN.vA],curv:[dN.I6,dN.nb],hue2:[dN.I6,dN.D5],nvrt:[dN.I6,dN.xD],blnc:[dN.I6,dN.Ql]};
|
|
dq.x$=function($){var o=iZ.o_("mixr");o.Mnch={t:"bool",v:$.UE};function T(s,f){var E={classID:"ChMx"},e={Rd:0,Grn:1,Bl:2,Cnst:4};
|
|
for(var n in e)E[n]={t:"UntF",v:{type:"#Prc",val:s[f+e[n]]}};return{t:"Objc",v:E}}if($.UE)o.Gry=T($.H,0);
|
|
else{o.Rd=T($.H,0);o.Grn=T($.H,5);o.Bl=T($.H,10)}return o};dq.CO=function($){function o(s,E,f){var e={Rd:0,Grn:1,Bl:2,Cnst:4};
|
|
for(var n in e)if(s[n])E[f+e[n]]=s[n].v.val}var T={UE:!1,H:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};
|
|
if($.Mnch&&$.Mnch.v)T.UE=!0;if(T.UE)o($.Gry.v,T.H,0);else{o($.Rd.v,T.H,0);o($.Grn.v,T.H,5);o($.Bl.v,T.H,10)}return T};
|
|
var iZ={};iZ.Zs=function($){var o=$.filterID.v;return o>16777215?t.a84(o):$.Fltr.v.classID};iZ.WK=[{n$:"GEfc"},{n$:"LnCr"},{n$:"LqFy",iR:!0},{W7:"3D",j7:["lightFilterGradient"]},{W7:[24,2],j7:"Avrg,Blr ,BlrM,boxblur,GsnB,Bokh,MtnB,RdlB,surfaceBlur".split(",")},{W7:[24,4],j7:"Dspl,Pnch,Plr ,Rple,Shr ,Sphr,Twrl,Wave,ZgZg".split(",")},{W7:[24,6],j7:["AdNs","Dspc","DstS","Mdn "]},{W7:[24,8],j7:"ClrH,Crst,Frgm,Mztn,Msc ,Pntl".split(",")},{W7:[24,10],j7:["Clds","DfrC","Fbrs","LnsF"]},{W7:[24,12],j7:["Shrp","ShrE","ShrM","smartSharpen","UnsM"]},{W7:[24,14],j7:"Dfs ,Embs,FndE,oilPaint,Slrz,TrcC,Wnd ".split(",")},{W7:[24,16],j7:"HghP,Mxm ,Mnm ,Ofst,Rept,Ctoa".split(",")},{W7:"Fourier",j7:["dDFT","iDFT"]}];
|
|
iZ.PV={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:"",Flam:"",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"};
|
|
iZ.WF={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"};
|
|
iZ.q={rigidTransform:D.w_};iZ.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],ZgZg:"ZigZag",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],Flam:"Flame",Clds:[24,11,0],DfrC:[24,11,1],Fbrs:"Fibers",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]]};
|
|
iZ.o_=function($){var o=null;if($=="GEfc")o={__name:"Filter Gallery",classID:"GEfc",GEfs:{t:"VlLs",v:[{t:"Objc",v:gH.o_("GlwE")}]}};
|
|
if($=="LqFy"){var T={N0:5,cQ:5,map:new Float32Array(5*5*2)},s=new Uint8Array(iT._i(T)),E=[];for(var f=0;
|
|
f<s.length;f++)E.push(s[f]);o={__name:"Liquify",classID:"LqFy",LqMe:{t:"tdta",v:E}}}if($=="rigidTransform"){o={__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($=="LnCr")o={__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($=="adaptCorrect")o={__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($=="Dfs ")o={__name:"Diffuse",classID:"Dfs",Md:{t:"enum",v:{DfsM:"Nrml"}},FlRs:{t:"long",v:14061024}};
|
|
if($=="Fbrs")o={__name:"Fibers",classID:"Fbrs",Vrnc:{t:"long",v:10},Strg:{t:"long",v:1},RndS:{t:"long",v:8438429}};
|
|
if($=="Embs")o={__name:"Emboss",classID:"Embs",Angl:{t:"long",v:45},Hght:{t:"long",v:5},Amnt:{t:"long",v:100}};
|
|
if($=="oilPaint")o={__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($=="TrcC")o={__name:"Trace Contour",classID:"TrcC",Lvl:{t:"long",v:128},Edg:{t:"enum",v:{CntE:"Lwr"}}};
|
|
if($=="Wnd ")o={__name:"Wind",classID:"Wnd",WndM:{t:"enum",v:{WndM:"Wnd"}},Drct:{t:"enum",v:{Drct:"Rght"}}};
|
|
if($=="lightFilterGradient")o={__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($=="boxblur")o={__name:"Box Blur",classID:"boxblur",Rds:{t:"UntF",v:{type:"#Pxl",val:15}}};if($=="GsnB")o={__name:"Gaussian Blur",classID:"GsnB",Rds:{t:"UntF",v:{type:"#Pxl",val:7.2}}};
|
|
if($=="Bokh")o={__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($=="MtnB")o={__name:"Motion Blur",classID:"MtnB",Angl:{t:"long",v:0},Dstn:{t:"UntF",v:{type:"#Pxl",val:4}}};
|
|
if($=="RdlB")o={__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($=="surfaceBlur")o={__name:"Surface Blur",classID:"surfaceBlur",Rds:{t:"UntF",v:{type:"#Pxl",val:15}},Thsh:{t:"long",v:15}};
|
|
if($=="Dspl")o={__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($=="Pnch")o={__name:"Pinch",classID:"Pnch",Amnt:{t:"long",v:-100}};if($=="Plr ")o={__name:"Polar Coordinates",classID:"Plr",Cnvr:{t:"enum",v:{Cnvr:"RctP"}}};
|
|
if($=="Rple")o={__name:"Ripple",classID:"Rple",Amnt:{t:"long",v:999},RplS:{t:"enum",v:{RplS:"Mdm"}}};
|
|
if($=="Shr ")o={__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($=="Sphr")o={__name:"Spherize",classID:"Sphr",Amnt:{t:"long",v:100},SphM:{t:"enum",v:{SphM:"Nrml"}}};
|
|
if($=="Twrl")o={__name:"Twirl",classID:"Twrl",Angl:{t:"long",v:90}};if($=="Wave")o={__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($=="ZgZg")o={__name:"ZigZag",classID:"ZgZg",Amnt:{t:"long",v:50},NmbR:{t:"long",v:10},ZZTy:{t:"enum",v:{ZZTy:"ArnC"}}};
|
|
if($=="AdNs")o={__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($=="DstS")o={__name:"Dust & Scratches",classID:"DstS",Rds:{t:"long",v:2},Thsh:{t:"long",v:26}};if($=="Mdn ")o={__name:"Median",classID:"Mdn",Rds:{t:"UntF",v:{type:"#Pxl",val:7}}};
|
|
if($=="ClrH")o={__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($=="Crst")o={__name:"Crystallize",classID:"Crst",ClSz:{t:"long",v:10},FlRs:{t:"long",v:1554929224}};
|
|
if($=="Mztn")o={__name:"Mezzotint",classID:"Mztn",MztT:{t:"enum",v:{MztT:"FnDt"}},FlRs:{t:"long",v:204994187}};
|
|
if($=="Msc ")o={__name:"Mosaic",classID:"Msc",ClSz:{t:"UntF",v:{type:"#Pxl",val:12}}};if($=="Pntl")o={__name:"Pointillize",classID:"Pntl",ClSz:{t:"long",v:10},FlRs:{t:"long",v:1554929236}};
|
|
if($=="LnsF")o={__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($=="smartSharpen")o={__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($=="UnsM")o={__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($=="HghP")o={__name:"High Pass",classID:"HghP",Rds:{t:"UntF",v:{type:"#Pxl",val:3}}};if($=="Mxm ")o={__name:"Maximum",classID:"Mxm",Rds:{t:"UntF",v:{type:"#Pxl",val:9}}};
|
|
if($=="Mnm ")o={__name:"Minimum",classID:"Mnm",Rds:{t:"UntF",v:{type:"#Pxl",val:14}}};if($=="Ofst")o={__name:"Offset",classID:"Ofst",Hrzn:{t:"long",v:144},Vrtc:{t:"long",v:278},Fl:{t:"enum",v:{FlMd:"Wrp"}}};
|
|
if($=="Rept")o={__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($=="Flam")o={__name:"Repeat",classID:"Flam",Type:{t:"long",v:0},Leng:{t:"long",v:315},Widt:{t:"long",v:311},Qual:{t:"long",v:1},Clr:{v:{classID:"RGBC",Rd:{v:255,t:"doub"},Grn:{v:110,t:"doub"},Bl:{v:28,t:"doub"}},t:"Objc"},Rand:{t:"bool",v:!1},RndS:{t:"long",v:8438429}};
|
|
if($=="Ctoa")o={__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($=="brit")o={__name:"Brightness/Contrast",classID:"BrgC",Brgh:{t:"long",v:0},Cntr:{t:"long",v:0},useLegacy:{t:"bool",v:!1}};
|
|
if($=="levl")o={__name:"Levels",classID:"Lvls",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Adjs:{t:"VlLs",v:[]}};
|
|
if($=="curv")o={__name:"Curves",classID:"Crvs",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Adjs:{t:"VlLs",v:[]}};
|
|
if($=="expA")o={__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($=="vibA")o={__name:"Vibrance",classID:"vibrance",vibrance:{t:"long",v:0},Strt:{t:"long",v:0}};if($=="hue2")o={__name:"Hue/Saturation",classID:"HStr",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Clrz:{t:"bool",v:!1},Adjs:{t:"VlLs",v:[]}};
|
|
if($=="blnc")o={__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($=="blwh")o={__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($=="phfl")o={__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($=="grdm")o={__name:"Gradient Map",classID:"GrMp",Rvrs:{t:"bool",v:!1},Grad:JSON.parse(ev.Qo[6]).Grad};
|
|
if($=="selc")o={__name:"Selective Color",classID:"SlcC",presetKind:{t:"enum",v:{presetKindType:"presetKindCustom"}},Mthd:{t:"enum",v:{CrcM:"Rltv"}},ClrC:{t:"VlLs",v:[]}};
|
|
if($=="thrs")o={__name:"Threshold",classID:"Thrs",Lvl:{t:"long",v:128}};if($=="mixr")o={__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($=="clrL")o={__name:"Color Lookup",classID:"colorLookup"};if($=="post")o={__name:"Posterize",classID:"Pstr",Lvls:{t:"long",v:3}};
|
|
if($=="rplc")o={__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:0},Lght:{t:"long",v:0}};
|
|
if($=="fade")o={__name:"Fade",classID:"fade",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}};
|
|
if($=="aply")o={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($=="blendOptions")o={classID:"blendOptions",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Md:{t:"enum",v:{BlnM:"Nrml"}}};
|
|
return o};iZ.$0={sFlam:function($,o){o[0]=$.Type.v;o[1]=$.Leng.v;o[2]=$.Widt.v;o[3]=$.Clr.v;o[4]=$.Qual.v},gFlam:function($,o){$.Type.v=o[0];
|
|
$.Leng.v=o[1];$.Widt.v=o[2];$.Clr.v=o[3];$.Qual.v=o[4]},sAdNs:function($,o){o[0]=$.Nose.v.val;o[1]=["Gsn","Unfr"].indexOf($.Dstr.v.Dstr);
|
|
o[2]=$.Mnch.v},gAdNs:function($,o){$.Nose.v.val=o[0];$.Dstr.v.Dstr=["Gsn","Unfr"][o[1]];$.Mnch.v=o[2]},sDstS:function($,o){o[0]=$.Rds.v;
|
|
o[1]=$.Thsh.v},gDstS:function($,o){$.Rds.v=o[0];$.Thsh.v=o[1]},sGsnB:function($,o){o[0]=$.Rds.v.val},gGsnB:function($,o){$.Rds.v.val=o[0]},sHghP:function($,o){o[0]=$.Rds.v.val},gHghP:function($,o){$.Rds.v.val=o[0]},"sMxm ":function($,o){o[0]=$.Rds.v.val},"gMxm ":function($,o){$.Rds.v.val=o[0]},"sMnm ":function($,o){o[0]=$.Rds.v.val},"gMnm ":function($,o){$.Rds.v.val=o[0]},sMtnB:function($,o){o[0]=$.Angl.v;
|
|
o[1]=$.Dstn.v.val},gMtnB:function($,o){$.Angl.v=typeof o[0]=="number"?o[0]:o[0].a4;$.Dstn.v.val=o[1]},sOfst:function($,o){o[0]=$.Hrzn.v;
|
|
o[1]=$.Vrtc.v;o[2]=["Rpt","Bckg","Wrp"].indexOf($.Fl.v.FlMd)},gOfst:function($,o){$.Hrzn.v=o[0];$.Vrtc.v=o[1];
|
|
$.Fl.v.FlMd=["Rpt","Bckg","Wrp"][o[2]]},sPnch:function($,o){o[0]=$.Amnt.v},gPnch:function($,o){$.Amnt.v=o[0]},"sPlr ":function($,o){o[0]=["RctP","PlrR"].indexOf($.Cnvr.v.Cnvr)},"gPlr ":function($,o){$.Cnvr.v.Cnvr=["RctP","PlrR"][o[0]]},sRple:function($,o){o[0]=$.Amnt.v;
|
|
o[1]=["Sml","Mdm","Lrg"].indexOf($.RplS.v.RplS)},gRple:function($,o){$.Amnt.v=o[0];$.RplS.v.RplS=["Sml","Mdm","Lrg"][o[1]]},sTwrl:function($,o){o[0]=$.Angl.v},gTwrl:function($,o){$.Angl.v=o[0]},sZgZg:function($,o){o[0]=$.Amnt.v;
|
|
o[1]=$.NmbR.v;o[2]=["ArnC","OtFr","PndR"].indexOf($.ZZTy.v.ZZTy)},gZgZg:function($,o){$.Amnt.v=o[0];
|
|
$.NmbR.v=o[1];$.ZZTy.v.ZZTy=["ArnC","OtFr","PndR"][o[2]]},sUnsM:function($,o){o[0]=$.Amnt.v.val;o[1]=$.Rds.v.val;
|
|
o[2]=$.Thsh.v},gUnsM:function($,o){$.Amnt.v.val=o[0];$.Rds.v.val=o[1];$.Thsh.v=o[2]}};iZ.aqx=function($){var o=new aY(0,0);
|
|
if($.enab.v==!1)return o;var T=$.filterFXList.v;for(var f=0;f<T.length;f++){var s=T[f].v;if(s.enab.v==!1)continue;
|
|
var E=iZ.Zs(s),e=iZ.Rn(E,s.Fltr?s.Fltr.v:null);if(e.x>o.x)o.x=e.x;if(e.y>o.y)o.y=e.y}return o};iZ.Rn=function($,o){var T=0,s=0;
|
|
if(["GsnB","boxblur","smartSharpen","UnsM","HghP"].indexOf($)!=-1){var E=o.Rds.v.val;T=s=E*2.57}if($=="MtnB")T=s=o.Dstn.v.val;
|
|
if("Ofst,Rept,LqFy,Dspl,Pnch,Rple,Shr ,Sphr,Twrl,ZgZg,Wave,RdlB,Clds,DfrC,Plr ,LnCr,Wnd ,lightFilterGradient,rigidTransform,Frgm".split(",").indexOf($)!=-1){T=s=1e4}if($=="GEfc")return gH.Rn(o);
|
|
return new aY(Math.ceil(T),Math.ceil(s))};iZ.HA=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:[]}}}};
|
|
iZ.sJ=function($,o){var T={i:o.z4>>16,m:o.z4>>8&255,P:o.z4&255},s={i:o.GR>>16,m:o.GR>>8&255,P:o.GR&255},E=iZ.names[$];
|
|
if(E==null)E=dq.names[$];var e=$;for(var n in dq.YZ)if(dq.YZ[n]==$)e=n;var A={t:"Objc",v:{classID:"filterFX",Nm:{t:"TEXT",v:aX.get(E)},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:L.h.wb(T)},BckC:{t:"Objc",v:L.h.wb(s)},filterID:{t:"long",v:e.length==4?t.ajC(e):777}}},u=iZ.o_($);
|
|
if(u)A.v.Fltr={t:"Objc",v:u};return A};iZ.R7=function($,o,T,s){L.qc(T);if($<1){var E=Math.round($*5),e=[1,2,1,2,[40,26,13,6,4,2][E],2,1,2,1];
|
|
e=L.TS.Hx(e);var n=T.slice(0);L.TS.ls(n,T,s.d,s.w,e,255)}else o(T,s,$);L.tr(T)};iZ.aok=function($,o,T,s){for(var f=0;
|
|
f<$.length;f++){T[f]=$[f]*(1/255);s[f]=0}FFT.fft2d(T,s);var E=o>>>1,e=16384,n=128,u=100;while(n<o){n<<=1;
|
|
e<<=2}var A=255/Math.log(e),Y=-100;for(var b=0;b<o;b++)for(var a=0;a<E;a++){var w=o+E+b&o-1,X=T[w*o+a],N=s[w*o+a],z=Math.sqrt(X*X+N*N),i=Math.atan2(N,X);
|
|
$[b*o+a]=Math.round(A*Math.log(z+1));$[b*o+E+a]=Math.round((Math.PI+i)*(255*.5/Math.PI))}};iZ.ajb=function($,o,T,s){T.fill(0);
|
|
s.fill(0);var E=o>>>1,e=16384,n=128;while(n<o){n<<=1;e<<=2}var A=255/Math.log(e),u=[],Y=[],b=[];for(var f=0;
|
|
f<256;f++){u[f]=Math.exp(f/A)-1;var a=f*(2*Math.PI/255)-Math.PI;Y[f]=Math.sin(a);b[f]=Math.cos(a)}for(var w=0;
|
|
w<o;w++)for(var X=0;X<E;X++){var N=o+E+w&o-1,z=u[$[w*o+X]],a=$[w*o+E+X],i=z*b[a],k=z*Y[a];T[N*o+X]=i;
|
|
s[N*o+X]=k;if(X!=0){var Q=N==0?N*o+o-X:(o-N)*o+(o-X);T[Q]=i;s[Q]=-k}}FFT.ifft2d(T,s);for(var f=0;f<$.length;
|
|
f++){$[f]=Math.max(0,Math.min(255,~~(.5+255*T[f])))}};iZ.xG=new ArrayBuffer(512);iZ.a0O=function($){var o=iZ.xG,T=$.length;
|
|
if(o.byteLength<T)iZ.xG=o=new ArrayBuffer(T);var s=new Uint8Array(o);for(var f=0;f<T;f+=4){s[f]=$[f];
|
|
s[f+1]=$[f+1];s[f+2]=$[f+2];s[f+3]=$[f+3]}return o};iZ.AY=function($,o,T,s,E,e,n){if(e==null)e={buffer:L.G(o.buffer.length),rect:o.rect.clone()};
|
|
L.w0(o.buffer,e.buffer);var A=T&&T.RndS?T.RndS.v>>>1:0;if($=="GEfc"){var u=[];if(T.GEfs){var Y=T.GEfs.v;
|
|
for(var f=0;f<Y.length;f++){var b=Y[f].v;if(b.GELv&&b.GELv.v==!1)continue;u.push(b)}}else u=[T];for(var f=0;
|
|
f<u.length;f++){var a;if(f==0)gH.AY($,o,u[f],s,E,e,n);else{if(a==null)a={buffer:L.G(o.buffer.length),rect:o.rect.clone()};
|
|
L.w0(e.buffer,a.buffer);gH.AY($,a,u[f],s,E,e,n)}}}if($=="adaptCorrect"){var w=o.rect,X=w.d,N=w.w,z=X*N,i=z*4,k=T.sdwM.v,Q=k.Amnt.v.val/100,O=k.Wdth.v.val/100,c=k.Rds.v,B=T.hglM.v,G=B.Amnt.v.val/100,l=B.Wdth.v.val/100,v=B.Rds.v;
|
|
L.gJ.a5R(o.buffer,e.buffer,X,N,Q,O,c,G,l,v,T.ClrC.v/100,T.Cntr.v/100)}if($=="Fbrs"){var w=o.rect,X=w.d,N=w.w;
|
|
L.j.ail(o.buffer,X,N,e.buffer,[T.Vrnc.v,T.Strg.v,A]);var p=L.G(X*N);L.Ge(e.buffer,p,0);L.lY(p);gH.ef(p,e.buffer,s,E)}if($=="Frgm"){var w=o.rect,X=w.d,N=w.w,P=o.buffer.slice(0);
|
|
L.qc(P);L.j.ak4(P,X,N,e.buffer);L.tr(e.buffer)}if($=="Flam"){var w=o.rect,X=w.d,N=w.w,h=T.Clr.v,j={arn:T.Widt.v,ag0:T.Qual.v+1,i:h.Rd.v,m:h.Grn.v,P:h.Bl.v,aa0:10,abz:0,opacity:25,aiE:10,abb:20,log:!0};
|
|
L.acp.a2j(o.buffer,X,N,e.buffer,[[0,0,X,N],j])}if($=="Dfs "){var w=o.rect,X=w.d,N=w.w,C=["Nrml","DrkO","LghO","anisotropic"].indexOf(T.Md.v.DfsM);
|
|
if(C<3)L.j.ajK(o.buffer,X,N,e.buffer,[C]);else{var V=[1.4,1.6,1,4,!1,2,[0,0,.001]],w=o.rect.clone();
|
|
w.x=w.y=0;L.CS.filter(o.buffer,w,e.buffer,V)}}if($=="TrcC"){var w=o.rect,X=w.d,d=X<<2,N=w.w,m=T.Lvl.v,R=T.Edg.v.CntE=="Lwr",S=o.buffer,F=e.buffer;
|
|
L.wr(F,16777215,4278190080);function r(cX,bA){W(cX,bA);W(cX+1,bA+1);W(cX+2,bA+2)}function q(cX,bA){Z(cX,bA);
|
|
Z(cX+1,bA+1);Z(cX+2,bA+2)}function W(cX,bA){var c7=S[cX],i1=S[bA];if(c7>=m&&i1<m)F[cX]=0;if(c7<m&&i1>=m)F[bA]=0}function Z(cX,bA){var c7=S[cX],i1=S[bA];
|
|
if(c7>m&&i1<=m)F[bA]=0;if(c7<=m&&i1>m)F[cX]=0}if(R)for(var I=1;I<N;I++)for(var _=1;_<X;_++){var cN=I*X+_<<2;
|
|
r(cN,cN-4);r(cN,cN-d)}else for(var I=1;I<N;I++)for(var _=1;_<X;_++){var cN=I*X+_<<2;q(cN,cN-4);q(cN,cN-d)}}if($=="Embs"){var w=o.rect,X=w.d,N=w.w,ce=-T.Angl.v*Math.PI/180,gf=T.Hght.v,K=T.Amnt.v/100;
|
|
gf/=2;var cv=Math.cos(ce)*gf,f0=Math.sin(ce)*gf,S=o.buffer,F=e.buffer;F.fill(0);var i8=new Uint32Array(S.buffer),b5=new Uint8Array(4),iC=new Uint32Array(b5.buffer);
|
|
for(var I=0;I<N;I++)for(var _=0;_<X;_++){var an=0,cO=0,bh=0;if(0<=_+cv&&_+cv<X&&0<=I+f0&&I+f0<N){L.$.WC(_+cv+.5,I+f0+.5,i8,X,N,iC,0,0);
|
|
an+=b5[0]-128;cO+=b5[1]-128;bh+=b5[2]-128}if(0<=_-cv&&_-cv<X&&0<=I-f0&&I-f0<N){L.$.WC(_-cv+.5,I-f0+.5,i8,X,N,iC,0,0);
|
|
an-=b5[0]-128;cO-=b5[1]-128;bh-=b5[2]-128}var cN=I*X+_<<2;F[cN]=Math.max(0,Math.min(255,an*K+128));F[cN+1]=Math.max(0,Math.min(255,cO*K+128));
|
|
F[cN+2]=Math.max(0,Math.min(255,bh*K+128));F[cN+3]=S[cN+3]}}if($=="ShrE"){var w=o.rect,X=w.d,N=w.w;L.j.aeP(o.buffer,X,N,e.buffer)}if($=="Dspc"){var w=o.rect,X=w.d,N=w.w;
|
|
L.j.am1(o.buffer,X,N,e.buffer)}if($=="Slrz"){var bD=e.buffer,fq=128;for(var f=0;f<bD.length;f+=4){if(bD[f]>fq)bD[f]=255-bD[f];
|
|
if(bD[f+1]>fq)bD[f+1]=255-bD[f+1];if(bD[f+2]>fq)bD[f+2]=255-bD[f+2]}}if($=="Wnd "){var w=o.rect,X=w.d,N=w.w,fO=["Wnd","Blst","Stgr"],g6=T.WndM.v.WndM;
|
|
L.j.a_(o.buffer,X,N,e.buffer,[fO.indexOf(g6),T.Drct.v.Drct!="Left"])}if($=="Bokh"){var w=o.rect,X=w.d,N=w.w,z=X*N,i=z*4,hM=o.buffer.slice(0),d3=T.BkDi.v.BtDi,h9=T.BkDc,cs=T.BkDp.v/255;
|
|
if(d3=="BeIn")cs=0;var dv=57*(.3+.7*((X+N)/2)/1750)*(T.BkIb.v/100)*(1+.2*Math.pow(cs,.1)),J=parseInt(T.BkIs.v.BtIs.slice(3)),ec=-T.BkIr.v*Math.PI/180,gT=[];
|
|
for(var f=0;f<8;f++){var iz=ec+f*(Math.PI*2/J),gw=ec+(f+1)*(Math.PI*2/J),iI=Math.cos(iz),g2=Math.sin(iz),bb=Math.cos(gw),ir=Math.sin(gw),dG=[0,0,0];
|
|
L.Ak._v([[iI,g2,1,0],[bb,ir,1,0],[1,1,1,1]],dG);if(dG[2]>0){dG[0]*=-1;dG[1]*=-1;dG[2]*=-1}gT.push(dG[0],dG[1],dG[2],0)}if(d3=="BeIn"){L.wr(hM,0,16777215);
|
|
cs=1}else if(d3=="BeIt"&&h9.v.BtDc=="BeCt"){}else{var gY;if(d3=="BeIt"&&h9.v.BtDc=="BeCm")gY=n[1];else if(d3=="BeIa")gY=n[2][h9.v];
|
|
if(gY==null){L.wr(hM,0,16777215)}else{var e6;if(gY.rect.R1(w))e6=gY.channel;else e6=gY.$a(w);L.aM(e6,hM,3)}}if(y.re){var fr=hM,bt=X,cx=N,ci=1,gv=(T.BkSb.v==0||T.BkSt.v==255)&&d3=="BeIn";
|
|
if(!gv){var gu=0;for(var f=0;f<i;f+=4)gu+=Math.abs(cs-hM[f+3]*(1/255));gu=gu/z*dv;var ak=3.14*gu*gu*X*N/3e6;
|
|
if(ak>2e3){alert("too large radius");return}}while(gv&&3*(dv/ci)*(dv/ci)*X*N>500*2e3*2e3){var hP=L.gc(hM,new df(0,0,bt,cx));
|
|
hM=hP._3;bt=hP.rect.d;cx=hP.rect.w;ci*=2}var ai=Date.now(),hK=y.lK(0,bt,cx);hK.set(hM);var h3=y.lK(1,X,N);
|
|
y.U0(h3);y.filter.Ze({type:y.filter.iz,Ip:new Float32Array([1/bt,1/cx]),aqY:cs,aoG:dv/ci,agx:new Float32Array([T.BkSb.v/100,T.BkSt.v/255]),aby:new Float32Array([T.BkNa.v/100,T.BkNt.v.BtNt=="BeNu"?0:1,T.BkNm.v?1:0]),an3:new Float32Array(gT.slice(0,16)),aq2:new Float32Array(gT.slice(16))},hK.ek);
|
|
h3.get(e.buffer);var e4=e.buffer;for(var f=0;f<i;f+=4)e4[f+3]=o.buffer[f+3]}}if($=="rigidTransform"){var ai=Date.now(),co=iZ.a0O,hK=o.buffer.slice(0),fH=0,dX=0;
|
|
L.qc(hK);L.wr(e.buffer,0);var X=o.rect.d,N=o.rect.w,aO=T.puppetShapeList.v,cC=[],hm=[],cu=[],bF=[];for(var ix=0;
|
|
ix<aO.length;ix++){var bx=aO[ix].v,ha=fH*2,ca=dX*3,iX=bx.originalVertexArray.v.length>>>2,dp=bx.indexArray.v.length>>>2,dd=new Float32Array(co(bx.originalVertexArray.v));
|
|
for(var f=0;f<iX;f++)cC[ha+f]=dd[f];var iD=new Float32Array(co(bx.deformedVertexArray.v));for(var f=0;
|
|
f<iX;f++)hm[ha+f]=iD[f];var iY=new Uint32Array(co(bx.indexArray.v));for(var f=0;f<dp;f++)cu[ca+f]=fH+iY[f];
|
|
var ho=[],bN=[],it=bx.PnDp.v;for(var f=0;f<it.length;f++){ho.push(bx.pinVertexIndices.v[f].v);bN.push(it[f].v)}var j4=L.pZ.a2H(dd,iY,ho,bN);
|
|
for(var f=0;f<j4.length;f++)bF[fH+f]=j4[f];fH+=iX>>>1;dX+=~~(dp/3)}var gy=o.rect,X=gy.d,N=gy.w;L.pZ.rW(hK,X,N,e.buffer,X,N,cC,hm,bF,cu);
|
|
L.tr(e.buffer)}if($=="lightFilterGradient"){function fi(dP){var c7=1/Math.sqrt(dP[0]*dP[0]+dP[1]*dP[1]+dP[2]*dP[2]);
|
|
dP[0]*=c7;dP[1]*=c7;dP[2]*=c7}var X=o.rect.d,N=o.rect.w,z=X*N,ai=Date.now(),hN=L.G(z),i1=.3,bZ=.7;L.h$(e.buffer,hN);
|
|
var b4=L.G(z);L.Ja.Yy(hN,b4,e.rect,16);var eN=L.G(z);L.Ja.Yy(hN,eN,e.rect,8);var hX=hN,fh=new Float32Array(z),a5=T.Dtl.v,aT=a5[2].v,aZ=a5[1].v,eA=a5[0].v,c0=T.Scl.v*40*T.textureScale.v/(aT+aZ+eA);
|
|
aT*=c0;aZ*=c0;eA*=c0;for(var f=0;f<z;f++){var h7=b4[f]*(1/255),dS=eN[f]*(1/255),al=hX[f]*(1/255);al=al*al;
|
|
fh[f]=aT*h7+aZ*dS+eA*al}var aD=T.blur.v;if(aD!=0){var bz=fh.slice(0);L.Ja.YK(bz,fh,e.rect,aD)}var eS=X-1,d9=N-1;
|
|
for(var I=1;I<d9;I++)for(var _=1;_<eS;_++){var f=I*X+_,cN=f*4,bn=fh[f],cv=i1*(fh[f+1]-bn)+bZ*(bn-fh[f-1]),f0=i1*(fh[f+X]-bn)+bZ*(bn-fh[f-X]),dP=[1,0,cv],cp=[0,1,f0];
|
|
fi(dP);fi(cp);var gw=dP[0],dO=dP[2],bL=cp[1],b2=cp[2],cW=-dO*bL,g3=-gw*b2,eo=gw*bL;e.buffer[cN]=~~(127.5+cW*127.5);
|
|
e.buffer[cN+1]=~~(127.5+g3*127.5);e.buffer[cN+2]=~~(127.5+eo*127.5)}}if($=="dDFT"||$=="iDFT"){function aJ(J){if(J==0)return 1;
|
|
J--;J|=J>>1;J|=J>>2;J|=J>>4;J|=J>>8;J|=J>>16;return J+1}var X=o.rect.d,N=o.rect.w,ek=aJ(Math.max(X,N)),fL=ek>>>1,bW=new df(0,0,ek,ek),ic=new df(0,0,X,N);
|
|
ic.y=ek-N>>>1;var dz=X>>>1,gL=new df(0,ic.y,dz,N),gI=new L.uR(X*N);L.KT(o.buffer,gI);var e5=new Float64Array(ek*ek),eh=new Float64Array(ek*ek),e6=L.G(ek*ek);
|
|
FFT.init(ek);var gZ=[gI.i,gI.m,gI.P];for(var f=0;f<3;f++){var b8=gZ[f];e6.fill(0);if($=="dDFT"){L.pg(b8,ic,e6,bW);
|
|
iZ.aok(e6,ek,e5,eh);L.pg(e6,bW,b8,ic,gL);gL.x+=dz;bW.x-=fL-dz;L.pg(e6,bW,b8,ic,gL);gL.x-=dz;bW.x+=fL-dz}else{L.pg(b8,ic,e6,bW,gL);
|
|
gL.x+=fL;ic.x+=fL-dz;L.pg(b8,ic,e6,bW,gL);gL.x-=fL;ic.x-=fL-dz;iZ.ajb(e6,ek,e5,eh);L.pg(e6,bW,b8,ic)}}L.dy(gI,e.buffer)}if($=="Avrg"){var bl=0,iU=0,bg=0,hs=0,bY=1;
|
|
for(var f=0;f<o.buffer.length;f+=4){var cG=o.buffer[f+3];bg+=o.buffer[f]*cG;iU+=o.buffer[f+1]*cG;bl+=o.buffer[f+2]*cG;
|
|
hs+=cG}var fy=1/hs;bl=Math.round(bY*(bl*fy)+(1-bY)*255);iU=Math.round(bY*(iU*fy)+(1-bY)*255);bg=Math.round(bY*(bg*fy)+(1-bY)*255);
|
|
L.wr(e.buffer,bl<<16|iU<<8|bg,4278190080)}if(["GsnB","boxblur","smartSharpen","UnsM","HghP"].indexOf($)!=-1){var ei=T.Rds.v.val,gC=$=="boxblur"?L.Ja.yk:L.Ja.adi;
|
|
iZ.R7(ei,gC,e.buffer,e.rect);if($=="UnsM"||$=="smartSharpen"){var K=T.Amnt.v.val/100,hk=0;if($=="UnsM")hk=T.Thsh.v;
|
|
else K*=.75;for(var f=0;f<o.buffer.length;f++){if((f&3)==3){e.buffer[f]=o.buffer[f];continue}var a2=o.buffer[f],cg=e.buffer[f],eX=K*(a2-cg);
|
|
if(eX>0)eX=Math.max(0,eX-hk);else eX=Math.min(0,eX+hk);e.buffer[f]=Math.max(0,Math.min(255,a2+eX))}}if($=="HghP")for(var f=0;
|
|
f<o.buffer.length;f++){if((f&3)==3){e.buffer[f]=o.buffer[f];continue}var a2=o.buffer[f],cg=e.buffer[f];
|
|
e.buffer[f]=Math.max(0,Math.min(255,128+a2-cg))}}if($=="surfaceBlur"){var gy=T.Rds.v.val,ht=T.Thsh.v,X=o.rect.d,N=o.rect.w;
|
|
L.KW.ay(o.buffer,e.buffer,X,N,gy,L.KW.Lq,[ht])}if($=="AdNs"){var fI=new Uint8ClampedArray(e.buffer.buffer),j5=255*T.Nose.v.val/100,bM;
|
|
if(T.Dstr.v.Dstr=="Gsn")bM=function(){return(Math.random()+Math.random()+Math.random()+Math.random()-2)*2};
|
|
else bM=function(){return Math.random()*2-1};for(var f=0;f<fI.length;f+=4){var gy=fI[f],a0=fI[f+1],gN=fI[f+2],iJ,iV,c3;
|
|
if(T.Mnch.v){iJ=iV=c3=bM()}else{iJ=bM();iV=bM();c3=bM()}gy+=j5*iJ;a0+=j5*iV;gN+=j5*c3;fI[f]=gy;fI[f+1]=a0;
|
|
fI[f+2]=gN}}if($=="Mdn "||$=="DstS"||$=="Mxm "||$=="Mnm "){var gy=0;if($=="Mdn "||$=="Mxm "||$=="Mnm ")gy=T.Rds.v.val;
|
|
if($=="DstS")gy=T.Rds.v;L.KW.gh=.5;var gC=L.KW.nQ;if($=="Mxm ")gC=L.KW.e5;if($=="Mnm ")gC=L.KW.Ur;var X=o.rect.d,N=o.rect.w;
|
|
L.KW.ay(o.buffer,e.buffer,X,N,gy,gC,[]);if($=="DstS"){var ht=T.Thsh.v;for(var f=0;f<X*N*4;f++){var cj=Math.abs(o.buffer[f]-e.buffer[f]);
|
|
if(cj<=ht)e.buffer[f]=o.buffer[f]}}}if($=="ClrH"){var gL=o.rect.clone();gL.x=gL.y=0;var gy=T.Rds.v;gy=Math.round(gy*Math.sqrt(2));
|
|
var X=gL.d,N=gL.w,gI=new L.uR(X*N);L.KT(o.buffer,gI);L.lY(gI.i);L.lY(gI.m);L.lY(gI.P);var iM=H.z("canvas","");
|
|
iM.width=X;iM.height=N;var d$=iM.getContext("2d"),e4=L.G(X*N*4);for(var hp=0;hp<3;hp++){var e6=hp==0?gI.i:hp==1?gI.m:gI.P,ce=Math.PI*T["Ang"+(hp+1)].v/180,cl=new fY(1/gy,0,0,1/gy,0,0);
|
|
cl.rotate(ce);L.aM(e6,e4,3);var b5=D.p.qh([e4,gL],cl,!0),ic=b5.rect;d$.clearRect(0,0,X,N);var gB=Math.sin(ce),f6=Math.cos(ce);
|
|
for(var f=0;f<ic.w;f++)for(var fl=0;fl<ic.d;fl++){var _=(fl+ic.x+.5)*gy,I=(f+ic.y+.5)*gy,ck=_,i6=I;_=f6*ck-gB*i6;
|
|
I=gB*ck+f6*i6;var z=b5.buffer[(f*ic.d+fl<<2)+3]*(1/255),ei=gy*Math.sqrt(z*(1/Math.PI));d$.beginPath();
|
|
d$.arc(_,I,ei,0,2*Math.PI);d$.fill()}var fS=d$.getImageData(0,0,X,N);L.Ge(fS.data,e6,3)}L.lY(gI.i);L.lY(gI.m);
|
|
L.lY(gI.P);L.dy(gI,e.buffer)}if($=="Crst"||$=="Pntl"){var X=o.rect.d,N=o.rect.w,gC=$=="Crst"?L._o.a3Z:L._o.ac7;
|
|
gC(o.buffer,X,N,e.buffer,T.ClSz.v,[Math.round(E.i),Math.round(E.m),Math.round(E.P)])}if($=="Mztn"){var X=o.rect.d,N=o.rect.w,z=X*N,gI=new L.uR(z),gS=[gI.i,gI.m,gI.P];
|
|
L.KT(o.buffer,gI);var g6=T.MztT.v.MztT,e8={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]}[g6],ai=Date.now(),c$=[];
|
|
for(var f=0;f<z;f++){c$[f]=Math.random()}var z=X*N,g9=Math.round(z*e8[0]),dh=z-X-1;for(var f=0;f<g9;
|
|
f++){var f$=Math.random(),g0=1;if(f$<.5){g0=X;f$*=2}else f$=2*(f$-.5);var cX=Math.floor(f$*dh),bA=cX+g0;
|
|
c$[cX]=c$[bA]}var eC=Math.round(X*e8[1]);for(var I=0;I<N;I++)for(var f=0;f<eC;f++){var f$=L.R.Po(I*z+f),cX=I*X+Math.floor(f$*(X-1));
|
|
c$[cX]=c$[cX+1]}var gq=new Float64Array(256);for(var f=0;f<256;f++){var ab=f/255,ex=2*(ab<.5?ab:1-ab);
|
|
ex=e8[2]+Math.pow(ex,e8[3])*(1-e8[2]);ab=ab<.5?ex*.5:1-ex*.5;gq[f]=ab}for(var gF=0;gF<3;gF++){var e6=gS[gF];
|
|
for(var I=0;I<N;I++){for(var _=0;_<X;_++){var f=I*X+_,hl=e6[f],ab=gq[hl],f$=c$[f];e6[f]=f$>ab?0:255}}}L.dy(gI,e.buffer)}if($=="Msc "){var br=T.ClSz.v.val,X=o.rect.d,N=o.rect.w,fP=Math.ceil(X/br),gD=Math.ceil(N/br),dZ=L.G(fP*gD*4);
|
|
L.scale.nq(o.buffer,X,N,dZ,fP,gD,1/br);L.scale.nq(dZ,fP,gD,e.buffer,X,N,br)}if($=="Clds"||$=="DfrC"){var X=e.rect.d,N=e.rect.w,z=X*N,f3=L.G(z);
|
|
if($=="Clds")L.wr(e.buffer,4278190080);var il=L.G(256*4);for(var f=0;f<256;f++){var cN=f<<2,bd=f/255,iY=1-bd;
|
|
il[cN]=Math.round(bd*s.i+iY*E.i);il[cN+1]=Math.round(bd*s.m+iY*E.m);il[cN+2]=Math.round(bd*s.P+iY*E.P)}L.j.ahv(o.buffer,X,N,f3);
|
|
var aL=e.buffer;for(var f=0;f<z;f++){var cN=f<<2,gF=f3[f]<<2,gy=il[gF],a0=il[gF+1],gN=il[gF+2];if($=="Clds"){aL[cN]=gy;
|
|
aL[cN+1]=a0;aL[cN+2]=gN}else{aL[cN]=Math.abs(aL[4*f]-gy);aL[cN+1]=Math.abs(aL[4*f+1]-a0);aL[cN+2]=Math.abs(aL[4*f+2]-gN)}}}if($=="LnsF"){var X=o.rect.d,N=o.rect.w,g6=["Zm","Nkn","Nkn1","PnVs"].indexOf(T.Lns.v.Lns),b6=T.FlrC.v,fG=[Math.min(g6,2),T.Brgh.v/100,b6.Hrzn.v,b6.Vrtc.v],ai=Date.now();
|
|
L.ahu(o.buffer,X,N,e.buffer,fG)}var hD=["Blr ","BlrM","Shrp","ShrM"].indexOf($);if(hD!=-1){var iQ=hD>1,X=o.rect.d,N=o.rect.w,dn=L.TS.mQ[hD],gG=o.buffer.slice(0);
|
|
if(!iQ)L.qc(gG);L.TS.ls(gG,e.buffer,X,N,dn,255,!1,iQ);if(!iQ)L.tr(e.buffer)}if($=="MtnB"){var dj=-T.Angl.v*Math.PI/180,f5=T.Dstn.v.val/2,ai=Date.now(),X=o.rect.d,N=o.rect.w,w=o.rect.clone();
|
|
w.x=w.y=0;if(y.re){var ai=Date.now(),i_=e.buffer;i_.set(o.buffer);L.qc(i_);var ga=y.lK(0,X,N);ga.set(i_);
|
|
var S=L.G(4);S[0]=Math.round(128+127*Math.cos(dj));S[1]=Math.round(128+127*Math.sin(dj));new Uint32Array(i_.buffer).fill(new Uint32Array(S.buffer)[0]);
|
|
var f7=y.lK(1,X,N);f7.set(i_);y.U0(ga,w);ga.bv(w);y.filter.Ze({type:y.filter.aY,qY:f7.ek,Ip:new Float32Array([1/X,1/N]),a6p:f5/2,a7X:1},ga.Ji);
|
|
ga.get(i_);L.tr(i_)}else{var cl=new fY;cl.rotate(dj);var b5=D.p.qh([o.buffer,o.rect],cl,!1,null,!0);
|
|
iZ.R7(f5,L.Ja.Os,b5.buffer,b5.rect);cl.lY();b5=D.p.qh([b5.buffer,b5.rect],cl,!1,e.buffer.buffer,!0,e.rect)}console.log(Date.now()-ai)}if($=="RdlB"){var X=o.rect.d,N=o.rect.w,K=T.Amnt.v,aK=T.BlrM.v.BlrM=="Zm",hp=T.Cntr.v,fd=hp.Hrzn.v,a9=hp.Vrtc.v,cv=Math.max(fd,1-fd)*X,f0=Math.max(a9,1-a9)*N,ei=Math.sqrt(cv*cv+f0*f0),gA=2*Math.PI*ei*1.5,el=Math.round(gA),gO=Math.round(ei),gL=new df(0,0,el,gO),gW=L.G(el*gO*4),ip=aK?4:1,bm=aK?.6:8*((X+N)/2)/1400,ez=.1,ci=1,fX=1;
|
|
L.$.f5(o.buffer,X,N,gW,el,gO,fd,a9,ip,ez,ci,fX);var go=aK?L.G(el*gO*4):null;if(aK){L.$.EP(gW,go,el,gO);
|
|
var f1=go;go=gW;gW=f1;gL.d=gO;gL.w=el}iZ.R7(bm*K,L.Ja.Os,gW,gL);if(aK){L.$.EP(gW,go,gO,el);var f1=go;
|
|
go=gW;gW=f1;gL.d=el;gL.w=gO}L.$.mz(gW,el,gO,e.buffer,X,N,fd,a9,ip,ez,ci,fX)}if($=="Plr "){var X=o.rect.d,N=o.rect.w;
|
|
if(T.Cnvr.v.Cnvr=="RctP")L.$.mz(o.buffer,X,N,e.buffer,X,N,.5,.5,1,0,2,X/N);else L.$.f5(o.buffer,X,N,e.buffer,X,N,.5,.5,1,0,2,X/N)}if($=="FndE"){var X=o.rect.d,N=o.rect.w;
|
|
L.TS.eF(o.buffer,e.buffer,X,N)}if($=="oilPaint"){var ce=T.LghD.v*Math.PI/180,fc=[Math.cos(ce),Math.sin(ce),.001],V=[T.stylization.v,T.cleanliness.v,T.brushScale.v,T.microBrush.v,T.lightingOn.v,T.specularity.v,fc],w=o.rect.clone();
|
|
w.x=w.y=0;L.CS.filter(o.buffer,w,e.buffer,V)}if($=="Ofst"){var X=o.rect.d,N=o.rect.w,fD=new Uint32Array(o.buffer.buffer),bJ=new Uint32Array(e.buffer.buffer),ck=T.Hrzn.v,i6=T.Vrtc.v,hj=T.Fl.v.FlMd;
|
|
L.wr(bJ,0);if(hj=="Bckg"||hj=="Rpt"){var gL=o.rect.clone();gL.offset(ck,i6);L.h9(fD,gL,bJ,e.rect)}if(hj=="Rpt"){var iI,g2,bb,ir,hY;
|
|
ck=Math.max(-X,Math.min(X,ck));i6=Math.max(-N,Math.min(N,i6));iI=ck>0?ck:0;bb=ck>0?X:X+ck;g2=i6>0?0:i6+N;
|
|
ir=i6>0?i6:N;hY=i6>0?0:X*(N-1);for(var I=g2;I<ir;I++)for(var _=iI;_<bb;_++)bJ[I*X+_]=fD[hY+_-ck];iI=ck>0?0:X+ck;
|
|
bb=ck>0?ck:X;g2=i6>0?i6:0;ir=i6>0?N:N+i6;hY=ck>0?0:X-1;for(var I=g2;I<ir;I++)for(var _=iI;_<bb;_++)bJ[I*X+_]=fD[hY+X*(I-i6)];
|
|
if(ck>=0&&i6>=0){iI=0;bb=ck;g2=0;ir=i6;hY=0}if(ck>=0&&i6<0){iI=0;bb=ck;g2=N+i6;ir=N;hY=X*(N-1)}if(ck<0&&i6>=0){iI=X+ck;
|
|
bb=X;g2=0;ir=i6;hY=X-1}if(ck<0&&i6<0){iI=X+ck;bb=X;g2=N+i6;ir=N;hY=X*N-1}for(var I=g2;I<ir;I++)for(var _=iI;
|
|
_<bb;_++)bJ[I*X+_]=fD[hY]}if(hj=="Wrp"){ck=(ck+100*X)%X;i6=(i6+100*N)%N;var gL=new df(ck-X,i6-N,X,N);
|
|
L.h9(fD,gL,bJ,e.rect);gL.offset(X,0);L.h9(fD,gL,bJ,e.rect);gL.offset(0,N);L.h9(fD,gL,bJ,e.rect);gL.offset(-X,0);
|
|
L.h9(fD,gL,bJ,e.rect)}}if($=="Rept"){var gQ=T.Rsft.v.val/100,d7=T.SpcX.v.val/100;d7=Math.max(d7,-.99);
|
|
var aF=T.SpcY.v.val/100;aF=Math.max(aF,-.99);var ci=T.Scl.v.val/100,cl=new fY;cl.rotate(T.Angl.v*Math.PI/180);
|
|
cl.scale(ci,ci);var hG={buffer:o.buffer,rect:o.rect};L.oE(hG);if(hG.rect.p4()){hG.buffer=o.buffer;hG.rect=o.rect}var aL=hG.buffer,gL=hG.rect,gt=L.UI(aL,gL,0),ge=new Uint32Array(aL.buffer)[0];
|
|
if(!gt.p4()&&!gt.R1(gL)){var cD=L.G(gt.Y()*4);L.h9(aL,gL,cD,gt);aL=cD;gL=gt}gL.x=gL.y=0;ge=d7==0&&aF==0||T.SpcC.v?ge:0;
|
|
function bv(_){return _<0?Math.ceil(_):Math.floor(_)}var eU=cl.bb(new aY(gL.d,0));eU.x=bv(eU.x);eU.y=bv(eU.y);
|
|
var bO=cl.bb(new aY(0,gL.w));bO.x=bv(bO.x);bO.y=bv(bO.y);var b5=D.p.qh([aL,gL],cl,!1),ic=b5.rect,F=b5.buffer,em=Math.round(ic.x),cM=Math.round(ic.y),fZ=Math.max(e.rect.d,e.rect.w)/Math.min(gL.d*ci*(1+d7),gL.w*ci*(1+aF));
|
|
fZ=Math.ceil(fZ*1.7);L.wr(e.buffer,ge);for(var I=-fZ;I<fZ;I++){for(var _=-fZ;_<fZ;_++){var aG=(_+I*gQ)*(1+d7),dA=I*(1+aF);
|
|
ic.x=em+Math.round(aG*eU.x+dA*bO.x);ic.y=cM+Math.round(aG*eU.y+dA*bO.y);if(ic.Ha(e.rect))L.R.xE("norm",F,ic,e.buffer,e.rect,ic,1)}}}if($=="Ctoa"){var E=L.h.Qc(T.Clr.v),ht=T.Trsp.v.val/100,cS=T.Opct.v.val/100;
|
|
ht=cS==0?0:ht/cS;var X=o.rect.d,N=o.rect.w,ch=~~E.i,da=~~E.m,ii=~~E.P,hY=o.buffer,iS=e.buffer;for(var I=0;
|
|
I<N;I++)for(var _=0;_<X;_++){var f=I*X+_,cN=f<<2,gL=hY[cN],cr=hY[cN+1],aL=hY[cN+2],i4=Math.abs(ch-gL),hr=Math.abs(da-cr),du=Math.abs(ii-aL),aE=Math.max(i4,hr,du)*(1/255);
|
|
aE=Math.max(0,Math.min(1,aE/cS));var g4=aE==0?0:1/aE,f_=ht==1?1:Math.max(0,Math.min(1,(aE-ht)/(1-ht)));
|
|
iS[cN]=Math.max(0,Math.min(255,(gL-ch*(1-aE))*g4));iS[cN+1]=Math.max(0,Math.min(255,(cr-da*(1-aE))*g4));
|
|
iS[cN+2]=Math.max(0,Math.min(255,(aL-ii*(1-aE))*g4));iS[cN+3]=~~(.5+f_*255)}}if("LqFy,Dspl,Pnch,Sphr,Twrl,Rple,Shr ,Wave,LnCr,ZgZg".split(",").indexOf($)!=-1){var c_=n[0],X=o.rect.d,N=o.rect.w,gq,cQ=0;
|
|
if($=="LqFy")gq=iT.$$(new Uint8Array(T.LqMe.v).buffer);else{var bS=3;gq={N0:Math.floor(X/bS),cQ:Math.floor(N/bS)};
|
|
gq.map=new Float32Array(gq.N0*gq.cQ*2);if($=="LnCr"){var fd=.5*(gq.N0-1),a9=.5*(gq.cQ-1),cP=Math.max(Math.abs(0-fd),Math.abs(1-fd)),er=Math.max(Math.abs(0-a9),Math.abs(1-a9)),gs=Math.sqrt(cP*cP+er*er),eL=0,i3=0,at=-1,dl=2,ci=T.LnSi.v/100,aK=1/ci,g1=T.LnIa.v/100,i$=g1==0?1e-6:g1*4.6,b1=aK/gs;
|
|
for(var I=0;I<gq.cQ;I++){for(var _=0;_<gq.N0;_++){var cv=(_-fd)*b1,f0=(I-a9)*b1,gy=Math.sqrt(cv*cv+f0*f0)*i$,gd=Math.atan(gy),dJ=g1>0?gd/gy:gy/gd,fX=fd+gs*dJ*cv,a1=a9+gs*dJ*f0,f=I*gq.N0+_<<1;
|
|
gq.map[f]=fX-_;gq.map[f+1]=a1-I}}}else if($=="Dspl"&&c_.length!=0){cQ=T.UndA.v.UndA=="WrpA"?2:1;var h4=T.DspF.v.pth,fb;
|
|
for(var f=0;f<c_.length;f++)if(c_[f].EB==h4)fb=c_[f];if(fb==null)fb=c_[0];fb.aw();var i4=fb.wc[1],dL=L.G(i4.Y());
|
|
L.h$(fb.wc[0],dL);var aq=i4.d,fg=i4.w;gq={N0:aq,cQ:fg};gq.map=new Float32Array(gq.N0*gq.cQ*2);var hu=2.54*T.HrzS.v*aq/X,iR=2.54*T.VrtS.v*fg/N;
|
|
for(var I=0;I<gq.cQ;I++){for(var _=0;_<gq.N0;_++){var cj=-.5+dL[I*aq+_]*(1/255),f=I*gq.N0+_<<1;gq.map[f]=cj*hu;
|
|
gq.map[f+1]=cj*iR}}}else if($=="Pnch"||$=="Twrl"||$=="Sphr"||$=="ZgZg"){var K=1,dj=Math.PI,cI=0,iE=1,aw=0,hp=3,br=1.53,dJ=1;
|
|
if($=="Pnch"||$=="Sphr"||$=="ZgZg")K=T.Amnt.v/100;if($=="ZgZg"){iE=T.NmbR.v;aw=["ArnC","OtFr","PndR"].indexOf(T.ZZTy.v.ZZTy)}if($=="Twrl")dj=T.Angl.v*Math.PI/180;
|
|
if($=="Sphr")cI=["Nrml","HrzO","VrtO"].indexOf(T.SphM.v.SphM);function gC(_){_=Math.pow(_,1-_*.3-_*_*(_*_)*.5);
|
|
return-.225*Math.sin(_*Math.PI)}function dW(N,c7,gy,iI,g2,bb,ir,dJ){var cv=bb-iI,f0=ir-g2,by=iI-N,h0=g2-c7,bd=cv*cv+f0*f0,gN=2*(cv*by+f0*h0),hp=by*by+h0*h0-gy*gy,fe=Math.sqrt(gN*gN-4*bd*hp),af=dJ/(2*bd),en=(-gN+fe)*af,fu=(-gN-fe)*af;
|
|
return dJ*Math.min(en,fu)}var fP=gq.N0,gD=gq.cQ,cy=gq.N0/2,d9=gq.cQ/2,cE=1/cy,gy=Math.sqrt(hp*hp+1)/hp,b8=hp+Math.sqrt(1/(hp*hp));
|
|
if(K<0){hp=1.72;gy=1;b8=hp;br=-1;dJ=-1}for(var I=0;I<gD;I++){var f0=(I-d9)/d9;for(var _=0;_<fP;_++){var cv=(_-cy)*cE;
|
|
if(cI==1)f0=0;else if(cI==2)cv=0;var i7=Math.sqrt(cv*cv+f0*f0);if(i7<1&&i7!=0){var f=I*gq.N0+_<<1;if($=="Pnch"){var a6=-K*gC(i7)/i7;
|
|
gq.map[f]=cv*a6*cy;gq.map[f+1]=f0*a6*d9}else if($=="Sphr"){var f1=dW(0,b8,gy,0,0,i7,hp,dJ),ij=br*K*(f1-1);
|
|
gq.map[f]=cv*ij*cy;gq.map[f+1]=f0*ij*d9}else if($=="Twrl"){var ce=Math.atan2(f0,cv)-dj*(1-i7)*(1-i7),bT=Math.cos(ce),cT=Math.sin(ce);
|
|
gq.map[f]=(i7*bT-cv)*cy;gq.map[f+1]=(i7*cT-f0)*d9}else if($=="ZgZg"){var bT=0,cT=0,ew=K*(.5-.5*Math.cos(i7*iE*2*Math.PI))*(1-i7);
|
|
if(aw==0){var ce=Math.atan2(f0,cv)-3.5*ew;bT=i7*Math.cos(ce);cT=i7*Math.sin(ce)}if(aw==1){ew=100/X*ew/i7;
|
|
bT=(1-ew)*cv;cT=(1-ew)*f0}if(aw==2){var cJ=512/X*ew*Math.PI/4;bT=cJ+cv;cT=cJ+f0}gq.map[f]=(bT-cv)*cy;
|
|
gq.map[f+1]=(cT-f0)*d9}}}}}else if($=="Shr "){var fQ=JSON.parse(JSON.stringify(T.ShrP.v));L.sE.t(fQ,new fY(0,255/127,255/127,0,-2,0));
|
|
var fz=L.sE.$O(fQ,gq.cQ,!0);cQ=T.UndA.v.UndA=="WrpA"?2:1;for(var I=0;I<gq.cQ;I++){var cv=-fz[I]*gq.N0;
|
|
for(var _=0;_<gq.N0;_++){var f=I*gq.N0+_<<1;gq.map[f]=cv}}}else if($=="Wave"){var bQ=T.NmbG.v,he=T.WLMn.v,ax=T.WLMx.v,ag=T.AmMn.v*(Math.PI/4),cF=T.AmMx.v*(Math.PI/4),ct=T.SclH.v/100,et=T.SclV.v/100,g6=T.Wvtp.v.Wvtp,ew=Math.sin;
|
|
if(g6=="WvTr")ew=function(_){_*=2/Math.PI;return-.5+Math.abs(_%2-1)};if(g6=="WvSq")ew=function(_){_*=2/Math.PI;
|
|
return 1+2*Math.floor(_%2-1)};var j2=[],ie=new L.R.Cp(T.RndS.v);for(var f=0;f<bQ;f++){j2.push(ie.get()*10);
|
|
j2.push(Math.PI*bS/(he+ie.get()*(ax-he)));j2.push(ct*(ag+ie.get()*(cF-ag))/bS);j2.push(ie.get()*10);
|
|
j2.push(Math.PI*bS/(he+ie.get()*(ax-he)));j2.push(et*(ag+ie.get()*(cF-ag))/bS)}var fB=[],hH=[],eR=Math.max(gq.N0,gq.cQ);
|
|
for(var f=0;f<eR;f++){var cv=0,f0=0;for(var fl=0;fl<bQ;fl++){var f2=fl*6;cv+=j2[f2+2]*ew(j2[f2]+f*j2[f2+1]);
|
|
f0+=j2[f2+5]*ew(j2[f2+3]+f*j2[f2+4])}fB[f]=f0;hH[f]=cv}for(var I=0;I<gq.cQ;I++){for(var _=0;_<gq.N0;
|
|
_++){var f=I*gq.N0+_<<1;gq.map[f]=hH[I];gq.map[f+1]=fB[_]}}cQ=T.UndA.v.UndA=="WrpA"?2:1}else if($=="Rple"){cQ=1;
|
|
var K=T.Amnt.v/100,ep=4,hz=[0,-.19,-.29,-.32,.92,.37,.93,.54,-.54,.42,-.29,-.58,-.67,.85,0,.64],fT=1,hR=1,by=0,fK=["Sml","Mdm","Lrg"].indexOf(T.RplS.v.RplS);
|
|
if(fK==0){fT=1;hR=.2;by=3}if(fK==2){fT=1;hR=2;by=-1;hz=hz.reverse()}var hU=function(_,I){var hp=Math.cos,c0=0;
|
|
for(var f=0;f<ep;f++)for(var fl=0;fl<ep;fl++)c0+=hz[f*ep+fl]*hp(_*(f+by)-I*(fl+by));return c0},gb=Math.floor(50/bS),aQ=new Float32Array(gb*gb*2),cd=hR*K*.5/bS;
|
|
for(var I=0;I<gb;I++)for(var _=0;_<gb;_++){var fd=fT*_*2*Math.PI/gb,a9=fT*I*2*Math.PI/gb,aP=hU(fd,a9),cv=(hU(fd+.01,a9)-aP)*100,f0=(hU(fd,a9+.01)-aP)*100,f=(I*gb+_)*2;
|
|
aQ[f]=cv*cd;aQ[f+1]=f0*cd}for(var I=0;I<gq.cQ;I++)for(var _=0;_<gq.N0;_++){var cT=I%gb,bT=_%gb,f=I*gq.N0+_<<1,gz=cT*gb+bT<<1;
|
|
gq.map[f]=aQ[gz];gq.map[f+1]=aQ[gz+1]}}}L.zQ.Bp(o.buffer,e.buffer,X,N,null,gq.map,gq.N0,gq.cQ,cQ)}return e};
|
|
var gH={};gH.Xt="BrSm BrsL BrDR BrsW BrbW BrSp".split(" ");gH.Gs="LDBt LDBL LDLf LDTL LDTp LDTR LDRg LDBR".split(" ");
|
|
gH.FX=["ScrC","ScrD","ScrL"];gH.QR=["SDRD","SDHz","SDLD","SDVt"];gH.he="TxBl TxCa TxFr TxTL TxBr TxBu TxSt".split(" ");
|
|
gH.Pn="LPBt LPBL LPLf LPTL LPTp LPTR LPRg LPBR".split(" ");gH.vf="GrnR GrSf GrSr GrnC GrCn GrnE GrSt GrnH GrnV GrSp".split(" ");
|
|
gH.PV={PntD:"paintDaubs"};gH.WK=["Artistic","Brush Strokes",[24,4],"Sketch",[24,14],[12,67]];gH.names={ClrP:[0,"Colored Pencil"],Ct:[0,"Cutout"],DryB:[0,"Dry Brush"],FlmG:[0,"Film Grain"],Frsc:[0,"Fresco"],NGlw:[0,"Neon Glow"],PntD:[0,"Paint Daubs"],PltK:[0,"Palette Knife"],PlsW:[0,"Plastic Wrap"],PstE:[0,"Poster Edges"],RghP:[0,"Rough Pastels"],SmdS:[0,"Smudge Stick"],Spng:[0,"Sponge"],Undr:[0,"Underpainting"],Wtrc:[0,"Watercolor"],AccE:[1,"Accented Edges"],AngS:[1,"Angled Strokes"],Crsh:[1,"Crosshatch"],DrkS:[1,"Dark Strokes"],InkO:[1,"Ink Outlines"],Spt:[1,"Spatter"],SprS:[1,"Sprayed Strokes"],Smie:[1,"Sumi-e"],DfsG:[2,"Diffuse Glow"],Gls:[2,"Glass"],OcnR:[2,"Ocean Ripple"],BsRl:[3,"Bas Relief"],ChlC:[3,"Chalk & Charcoal"],Chrc:[3,"Charcoal"],Chrm:[3,"Chrome"],CntC:[3,"Cont\xE9 Crayon"],GraP:[3,"Graphic Pen"],HlfS:[3,"Halftone Pattern"],NtPr:[3,"Note Paper"],Phtc:[3,"Photocopy"],Plst:[3,"Plaster"],Rtcl:[3,"Reticulation"],Stmp:[3,"Stamp"],TrnE:[3,"Torn Edges"],WtrP:[3,"Water Paper"],GlwE:[4,"Glowing Edges"],Crql:[5,"Craquelure"],Grn:[5,"Grain"],MscT:[5,"Mosaic Tiles"],Ptch:[5,"Patchwork"],StnG:[5,"Stained Glass"],Txtz:[5,"Texturizer"]};
|
|
gH.o_=function($){var o;if($=="ClrP")o={Pncl:{t:"long",v:4},StrP:{t:"long",v:8},PprB:{t:"long",v:25}};
|
|
if($=="Ct")o={NmbL:{t:"long",v:4},EdgS:{t:"long",v:3},EdgF:{t:"long",v:1}};if($=="DryB")o={BrsS:{t:"long",v:4},BrsD:{t:"long",v:4},Txtr:{t:"long",v:2}};
|
|
if($=="FlmG")o={Grn:{t:"long",v:4},HghA:{t:"long",v:0},Intn:{t:"long",v:10},FlRs:{t:"long",v:23068185}};
|
|
if($=="Frsc")o={BrsS:{t:"long",v:2},BrsD:{t:"long",v:8},Txtr:{t:"long",v:1}};if($=="NGlw")o={Sz:{t:"long",v:5},Brgh:{t:"long",v:15},Clr:{t:"Objc",v:{classID:"RGBC",Rd:{t:"doub",v:0},Grn:{t:"doub",v:0},Bl:{t:"doub",v:255}}}};
|
|
if($=="PntD")o={Sz:{t:"long",v:10},Shrp:{t:"long",v:10},BrsT:{t:"enum",v:{BrsT:"BrSm"}}};if($=="PltK")o={StrS:{t:"long",v:25},StDt:{t:"long",v:3},Sftn:{t:"long",v:2}};
|
|
if($=="PlsW")o={HghS:{t:"long",v:20},Dtl:{t:"long",v:4},Smth:{t:"long",v:5}};if($=="PstE")o={EdgT:{t:"long",v:2},EdgI:{t:"long",v:1},Pstr:{t:"long",v:2}};
|
|
if($=="RghP")o={StrL:{t:"long",v:6},StDt:{t:"long",v:4},TxtT:{t:"enum",v:{TxtT:"TxCa"}},Scln:{t:"long",v:100},Rlf:{t:"long",v:20},LghD:{t:"enum",v:{LghD:"LDBt"}},InvT:{t:"bool",v:!1}};
|
|
if($=="SmdS")o={StrL:{t:"long",v:2},HghA:{t:"long",v:0},Intn:{t:"long",v:10},FlRs:{t:"long",v:6399750}};
|
|
if($=="Spng")o={BrsS:{t:"long",v:2},Dfnt:{t:"long",v:12},Smth:{t:"long",v:5},FlRs:{t:"long",v:218877241}};
|
|
if($=="Undr")o={BrsS:{t:"long",v:6},TxtC:{t:"long",v:16},TxtT:{t:"enum",v:{TxtT:"TxCa"}},Scln:{t:"long",v:100},Rlf:{t:"long",v:4},LghD:{t:"enum",v:{LghD:"LDTp"}},InvT:{t:"bool",v:!1}};
|
|
if($=="Wtrc")o={BrsD:{t:"long",v:9},ShdI:{t:"long",v:1},Txtr:{t:"long",v:3}};if($=="AccE")o={EdgW:{t:"long",v:2},EdgB:{t:"long",v:38},Smth:{t:"long",v:5}};
|
|
if($=="AngS")o={DrcB:{t:"long",v:50},StrL:{t:"long",v:15},Shrp:{t:"long",v:3}};if($=="Crsh")o={StrL:{t:"long",v:9},Shrp:{t:"long",v:6},Strg:{t:"long",v:1}};
|
|
if($=="DrkS")o={Blnc:{t:"long",v:5},BlcI:{t:"long",v:6},WhtI:{t:"long",v:2}};if($=="InkO")o={StrL:{t:"long",v:4},DrkI:{t:"long",v:20},LghI:{t:"long",v:10}};
|
|
if($=="Smie")o={StrW:{t:"long",v:10},StrP:{t:"long",v:5},Cntr:{t:"long",v:16}};if($=="Spt")o={SprR:{t:"long",v:10},Smth:{t:"long",v:5},FlRs:{t:"long",v:10738420}};
|
|
if($=="SprS")o={StrL:{t:"long",v:12},SprR:{t:"long",v:7},SDir:{t:"enum",v:{StrD:"SDRD"}},FlRs:{t:"long",v:893120664}};
|
|
if($=="DfsG")o={Grns:{t:"long",v:6},GlwA:{t:"long",v:10},ClrA:{t:"long",v:15},FlRs:{t:"long",v:325892160}};
|
|
if($=="Gls")o={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($=="OcnR")o={RplS:{t:"long",v:5},RplM:{t:"long",v:15},FlRs:{t:"long",v:64008840}};if($=="BsRl")o={Dtl:{t:"long",v:11},Smth:{t:"long",v:7},LghD:{t:"enum",v:{LghD:"LDBt"}}};
|
|
if($=="ChlC")o={ChrA:{t:"long",v:6},ChlA:{t:"long",v:6},StrP:{t:"long",v:1},FlRs:{t:"long",v:314004633}};
|
|
if($=="Chrc")o={ChAm:{t:"long",v:1},Dtl:{t:"long",v:5},LgDr:{t:"long",v:50},GELv:{t:"bool",v:!0}};if($=="Chrm")o={Dtl:{t:"long",v:4},Smth:{t:"long",v:4}};
|
|
if($=="CntC")o={FrgL:{t:"long",v:11},BckL:{t:"long",v:7},TxtT:{t:"enum",v:{TxtT:"TxCa"}},Scln:{t:"long",v:100},Rlf:{t:"long",v:4},LghD:{t:"enum",v:{LghD:"LDTp"}},InvT:{t:"bool",v:!1}};
|
|
if($=="GraP")o={StrL:{t:"long",v:7},LgDr:{t:"long",v:50},SDir:{t:"enum",v:{StrD:"SDRD"}},FlRs:{t:"long",v:55993248}};
|
|
if($=="HlfS")o={HlSz:{t:"long",v:1},Cntr:{t:"long",v:5},ScrT:{t:"enum",v:{ScrT:"ScrD"}}};if($=="NtPr")o={ImgB:{t:"long",v:25},Grns:{t:"long",v:10},Rlf:{t:"long",v:11},FlRs:{t:"long",v:52642770}};
|
|
if($=="Phtc")o={Dtl:{t:"long",v:10},Drkn:{t:"long",v:4}};if($=="Plst")o={ImgB:{t:"long",v:20},Smth:{t:"long",v:2},LghP:{t:"enum",v:{LghP:"LPTp"}}};
|
|
if($=="Rtcl")o={Dnst:{t:"long",v:12},BlcL:{t:"long",v:40},WhtL:{t:"long",v:5},FlRs:{t:"long",v:301835400}};
|
|
if($=="Stmp")o={LgDr:{t:"long",v:25},Smth:{t:"long",v:4}};if($=="TrnE")o={ImgB:{t:"long",v:25},Smth:{t:"long",v:11},Cntr:{t:"long",v:17},FlRs:{t:"long",v:461109340}};
|
|
if($=="WtrP")o={FbrL:{t:"long",v:15},Brgh:{t:"long",v:60},Cntr:{t:"long",v:80},FlRs:{t:"long",v:83852682}};
|
|
if($=="GlwE")o={EdgW:{t:"long",v:1},EdgB:{t:"long",v:10},Smth:{t:"long",v:1}};if($=="Crql")o={CrcS:{t:"long",v:15},CrcD:{t:"long",v:6},CrcB:{t:"long",v:9},FlRs:{t:"long",v:495615720}};
|
|
if($=="Grn")o={Intn:{t:"long",v:40},Cntr:{t:"long",v:50},Grnt:{t:"enum",v:{Grnt:"GrnR"}},FlRs:{t:"long",v:217582197}};
|
|
if($=="MscT")o={TlSz:{t:"long",v:12},GrtW:{t:"long",v:3},LghG:{t:"long",v:9},FlRs:{t:"long",v:25445584}};
|
|
if($=="Ptch")o={SqrS:{t:"long",v:4},Rlf:{t:"long",v:8},FlRs:{t:"long",v:383529723}};if($=="StnG")o={ClSz:{t:"long",v:10},BrdT:{t:"long",v:4},LghI:{t:"long",v:0},FlRs:{t:"long",v:319935998}};
|
|
if($=="Txtz")o={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}};
|
|
o.__name="Filter Gallery";o.classID="GEfc";o.GEfk={t:"enum",v:{GEft:$}};o.GELv={t:"bool",v:!0};return o};
|
|
gH.ZA=function($,o){for(var f=0;f<o.length;f++)~~(o[f]=($[4*f]+$[4*f+1]+$[4*f+2])*(1/3))};gH.AY=function($,o,T,s,E,e,n){$=T.GEfk.v.GEft;
|
|
var A=o.rect,u=A.d,Y=A.w,b=u*Y,a=T.FlRs?T.FlRs.v>>>1:0;function w(G){return G.i<<24|G.m<<16|G.P<<8|255}if($=="ClrP")L.j.ajS(o.buffer,u,Y,e.buffer,[T.Pncl.v,T.StrP.v,T.PprB.v]);
|
|
if($=="Ct"){var X=T.NmbL.v,N=T.EdgS.v,z=UPNG.quantize(o.buffer.buffer,X*2);z={Zg:z.inds,fD:z.plte};var i=Math.floor((u+Y)*.015);
|
|
if(i!=0)L.Ej.gb(z.Zg,u,Y,i);var k=new Uint8Array((u+2)*(Y+2));L.pg(z.Zg,new df(1,1,u,Y),k,new df(0,0,u+2,Y+2));
|
|
var Q=L.M.Ew(k,u+2,Y+2,N,!1),O=new fY(1,0,0,1,-1,-1);for(var f=0;f<Q.length;f++)L.M.t(Q[f].path.I,O,Q[f].path.I);
|
|
var c=[],B=z.fD;for(var f=0;f<B.length;f++){var G=B[f].est.q;c.push({i:Math.round(255*G[0]),m:Math.round(255*G[1]),P:Math.round(255*G[2]),Ca:Math.round(255*G[3])})}var l=L.iZ(u,Y);
|
|
for(var f=0;f<Q.length;f++){var v=Q[f],G=c[v.color];if(G.Ca==0)continue;l.fillStyle="rgba("+G.i+","+G.m+","+G.P+","+G.Ca/255+")";
|
|
l.beginPath();Typr.U.pathToContext({crds:v.path.I,cmds:v.path.o},l);l.fill()}if(!A.p4()){var p=l.getImageData(0,0,u,Y);
|
|
L.w0(p.data,e.buffer)}}if($=="DryB")L.j.aaV(o.buffer,u,Y,e.buffer,[T.BrsS.v,T.BrsD.v,T.Txtr.v]);if($=="FlmG")L.j.anI(o.buffer,u,Y,e.buffer,[T.Grn.v,T.HghA.v,T.Intn.v,a]);
|
|
if($=="Frsc")L.j.amz(o.buffer,u,Y,e.buffer,[T.BrsS.v,T.BrsD.v,T.Txtr.v]);if($=="NGlw")L.j.anE(o.buffer,u,Y,e.buffer,[T.Sz.v,T.Brgh.v,w(L.h.Qc(T.Clr.v)),w(s),w(E)]);
|
|
if($=="PltK")L.j.a8O(o.buffer,u,Y,e.buffer,[T.StrS.v,T.StDt.v,T.Sftn.v]);if($=="PstE")L.j.a8A(o.buffer,u,Y,e.buffer,[T.EdgT.v,T.EdgI.v,T.Pstr.v]);
|
|
if($=="RghP")L.j.a9K(o.buffer,u,Y,e.buffer,[T.StrL.v,T.StDt.v,gH.he.indexOf(T.TxtT.v.TxtT),T.Scln.v,T.Rlf.v,gH.Gs.indexOf(T.LghD.v.LghD),T.InvT.v]);
|
|
if($=="SmdS")L.j.anR(o.buffer,u,Y,e.buffer,[T.StrL.v,T.HghA.v,T.Intn.v,T.FlRs.v,a]);if($=="Spng")L.j.agn(o.buffer,u,Y,e.buffer,[T.BrsS.v,T.Dfnt.v,T.Smth.v,T.FlRs.v,a]);
|
|
if($=="Undr")L.j.a6V(o.buffer,u,Y,e.buffer,[T.BrsS.v,T.TxtC.v,gH.he.indexOf(T.TxtT.v.TxtT),T.Scln.v,T.Rlf.v,gH.Gs.indexOf(T.LghD.v.LghD),T.InvT.v]);
|
|
if($=="Wtrc")L.j.a7I(o.buffer,u,Y,e.buffer,[T.BrsD.v,T.ShdI.v,T.Txtr.v]);if($=="AccE")L.j.ab8(o.buffer,u,Y,e.buffer,[T.EdgW.v,T.EdgB.v,T.Smth.v]);
|
|
if($=="AngS")L.j.aks(o.buffer,u,Y,e.buffer,[T.DrcB.v,T.StrL.v,T.Shrp.v]);if($=="Crsh")L.j.ahK(o.buffer,u,Y,e.buffer,[T.StrL.v,T.Shrp.v,T.Strg.v]);
|
|
if($=="DrkS")L.j.ajA(o.buffer,u,Y,e.buffer,[T.Blnc.v,T.BlcI.v,T.WhtI.v]);if($=="InkO")L.j.amt(o.buffer,u,Y,e.buffer,[T.StrL.v,T.DrkI.v,T.LghI.v]);
|
|
if($=="Smie")L.j.aqB(o.buffer,u,Y,e.buffer,[T.StrW.v,T.StrP.v,T.Cntr.v]);if($=="DfsG")L.j.agK(o.buffer,u,Y,e.buffer,[T.Grns.v,T.GlwA.v,T.ClrA.v,w(E),a]);
|
|
if($=="CntC")L.j.anB(o.buffer,u,Y,e.buffer,[T.FrgL.v,T.BckL.v,gH.he.indexOf(T.TxtT.v.TxtT),T.Scln.v,T.Rlf.v,gH.Gs.indexOf(T.LghD.v.LghD),T.InvT.v,w(E),w(s)]);
|
|
if($=="ChlC")L.j.aq6(o.buffer,u,Y,e.buffer,[T.ChrA.v,T.ChlA.v,T.StrP.v,a,w(E),w(s)]);var P=$=="GraP"||$=="Chrc"||$=="Plst"||$=="Rtcl"||$=="Stmp"||$=="TrnE";
|
|
if(P){var h=L.G(u*Y);if($=="GraP")L.j.aoo(o.buffer,u,Y,e.buffer,[T.StrL.v,T.LgDr.v,gH.QR.indexOf(T.SDir.v.StrD),a]);
|
|
if($=="Chrc")L.j.aig(o.buffer,u,Y,e.buffer,[T.ChAm.v,T.Dtl.v,T.LgDr.v]);if($=="Plst")L.j.als(o.buffer,u,Y,e.buffer,[T.ImgB.v,gH.Pn.indexOf(T.LghP.v.LghP),T.Smth.v]);
|
|
if($=="Rtcl")L.j.aqn(o.buffer,u,Y,e.buffer,[T.Dnst.v,T.BlcL.v,T.WhtL.v,a]);if($=="Stmp")L.j.a0Z(o.buffer,u,Y,e.buffer,[T.LgDr.v,T.Smth.v]);
|
|
if($=="TrnE")L.j.a4j(o.buffer,u,Y,e.buffer,[T.ImgB.v,T.Smth.v,T.Cntr.v,a]);L.Ge(e.buffer,h,0);gH.ef(h,e.buffer,s,E)}if($=="NtPr")L.j.a2W(o.buffer,u,Y,e.buffer,[T.ImgB.v,T.Grns.v,T.Rlf.v,w(s),w(E),a]);
|
|
if($=="WtrP")L.j.a4O(o.buffer,u,Y,e.buffer,[T.FbrL.v,T.Brgh.v,T.Cntr.v,a>>>1]);if($=="Crql")L.j.a9R(o.buffer,u,Y,e.buffer,[T.CrcS.v,T.CrcD.v,T.CrcB.v,a]);
|
|
if($=="Grn")L.j.a3g(o.buffer,u,Y,e.buffer,[T.Intn.v,gH.vf.indexOf(T.Grnt.v.Grnt),T.Cntr.v,w(s),w(E),a]);
|
|
if($=="MscT")L.j.a0z(o.buffer,u,Y,e.buffer,[T.TlSz.v,T.GrtW.v,T.LghG.v,a]);if($=="Ptch")L.j.ajx(o.buffer,u,Y,e.buffer,[T.SqrS.v,T.Rlf.v,a]);
|
|
if($=="Phtc"){function j(ak,hP,A,hN){L.Ja.Pm(ak,hP,A,hN);for(var f=0;f<b;f++)hP[f]=Math.max(0,Math.min(255,128+ak[f]-hP[f]))}var C=T.Dtl.v,V=T.Drkn.v,d=L.G(b);
|
|
L.h$(o.buffer,d);var m=L.G(b);j(d,m,A,1);var R=L.G(b);j(d,R,A,C);for(var f=0;f<b;f++)d[f]=Math.max(0,Math.min(255,255-(m[f]-R[f])*V));
|
|
gH.ef(d,e.buffer,s,E)}if($=="Spt"||$=="SprS"){var g,S=1,F=1;g={N0:Math.floor(u/F),cQ:Math.floor(Y/F)};
|
|
g.map=new Float32Array(g.N0*g.cQ*2);var r=new L.R.Cp(T.FlRs.v),q=new Float32Array(8192),W=T.SprR.v,Z=W<20?.018*W:.36+(W-20)*.128;
|
|
if($=="SprS"){Z=.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][W]}for(var f=0;
|
|
f<8192;f++)q[f]=(-1+2*r.get())*Z*70;for(var I=0;I<Y;I++)for(var _=0;_<u;_++){var cN=I*u+_<<1;g.map[cN]=q[cN%7919];
|
|
g.map[cN+1]=q[(cN+1)%7919]}var ce=g.map.slice(0),gf=$=="Spt"?T.Smth.v-1:1;if($=="Spt"&&gf!=0){gH.Dc(g.map,ce,u,Y,gf);
|
|
gH.Wb(ce,g.map,u,Y,gf)}if($=="SprS"){var K=T.StrL.v>>>1,cv=K==0?2:1;gH.Dc(g.map,ce,u,Y,cv);gH.Wb(ce,g.map,u,Y,cv);
|
|
if(K!=0){var f0=gH.QR.indexOf(T.SDir.v.StrD),i8=[1,1,1,0][f0],b5=[-1,0,1,1][f0],iC=2*K+1,an=1/iC;for(var I=0;
|
|
I<Y;I++)for(var _=0;_<u;_++){var cN=I*u+_<<1,cO=0,bh=0;for(var f=0;f<iC;f++){var bD=Math.max(0,Math.min(u-1,_-(K+f)*i8)),fq=Math.max(0,Math.min(Y-1,I-(K+f)*b5)),fO=fq*u+bD<<1;
|
|
cO+=g.map[fO];bh+=g.map[fO+1]}ce[cN]=cO*an;ce[cN+1]=bh*an}g.map=ce}}L.zQ.Bp(o.buffer,e.buffer,u,Y,null,g.map,g.N0,g.cQ,S)}if($=="BsRl"||$=="PlsW"||$=="Chrm"){var g6=Date.now(),hM=L.G(b),d3=hM.slice(0);
|
|
L.h$(o.buffer,hM);var C=T.Dtl.v,h9=T.Smth.v;if(C!=15){L.Ja.Yy(hM,d3,A,Math.round((15-C)*.5));L.w0(d3,hM)}var cs=1.4/u,dv=1.4/Y,ec=new Float32Array(b),gT=new Float32Array(b),iz=new Float32Array(e.buffer.buffer);
|
|
for(var I=0;I<Y;I++)for(var _=0;_<u;_++){var f=I*u+_,i8=_==u-1?hM[f]-hM[f-1]:hM[f+1]-hM[f],b5=I==Y-1?hM[f]-hM[f-u]:hM[f+u]-hM[f],gw=_*cs-.7,iI=I*dv-.7;
|
|
ec[f]=i8==0?gw:i8*.4;gT[f]=b5==0?iI:b5*.4}if($=="BsRl"){var g2=(2+gH.Gs.indexOf(T.LghD.v.LghD))*Math.PI*.25,cO=Math.cos(g2);
|
|
if(Math.abs(cO)<.1)cO=0;cO=Math.sign(cO);var bh=Math.sin(g2);if(Math.abs(bh)<.1)bh=0;bh=Math.sign(bh);
|
|
var bb=1/(cO*cO+bh*bh);for(var I=0;I<Y;I++)for(var _=0;_<u;_++){var f=I*u+_,ir=Math.max(-1,Math.min(1,cO*ec[f])),dG=Math.max(-1,Math.min(1,bh*gT[f]));
|
|
d3[f]=128+127*(ir+dG)*bb}if(h9!=1){L.Ja.Yy(d3,hM,A,Math.round((h9-1)*.5));L.w0(hM,d3)}gH.ef(d3,e.buffer,s,E)}else{if($=="Chrm")h9=5+h9;
|
|
if(h9>1)gH.R7(ec,gT,iz,A,h9-1);if($=="PlsW"){var gY=new Uint8Array(ec.buffer);for(var f=0;f<b;f++){var e6=f<<2,i8=ec[f],b5=gT[f],fr=1/(Math.sqrt(1+i8*i8)*Math.sqrt(1+b5*b5)),bt=fr*fr,cx=bt*bt,G=~~(255*(cx*cx*bt));
|
|
gY[e6+0]=G;gY[e6+1]=G;gY[e6+2]=G;gY[e6+3]=G}e.buffer.set(o.buffer);L.R.xE("norm",gY,A,e.buffer,A,A,T.HghS.v/20)}else if($=="Chrm"){var ci=e.buffer,gv=u>>>1,gu=Y>>>1;
|
|
for(var f=0;f<b;f++){var e6=f<<2,i8=ec[f],b5=gT[f],ak={x:1,y:0,nc:i8};fW.hl(ak);var hP={x:0,y:1,nc:b5};
|
|
fW.hl(hP);var ai=fW.AT(ak,hP),hK=1/ai.nc,h3=~~Math.max(0,Math.min(u-1,gv-ai.x*hK*gv)),e4=~~Math.max(0,Math.min(Y-1,gu-ai.y*hK*gu)),G=hM[e4*u+h3];
|
|
ci[e6+0]=G;ci[e6+1]=G;ci[e6+2]=G}}}}if($=="Gls"||$=="OcnR"||$=="Txtz"){var co=$=="OcnR"?2:gH.he.indexOf(T.TxtT.v.TxtT),aO=gH.YR(co),cC=aO[0],hM=aO[1],hm=cC.d,cu=cC.w,iC=24,dp=0,dd,iD;
|
|
function bF(eo,aJ,ek){return~~(fH*(eo+aJ)+8192)&127}var ec=new Float32Array(b),gT=new Float32Array(b),iz=new Float32Array(e.buffer.buffer),fH=$=="OcnR"?1/(1+(T.RplS.v-1)*.1):100/T.Scln.v;
|
|
if(co==3)fH*=32/22.2;var g6=Date.now(),dX=fH,cs=1.4/u,dv=1.4/Y;if($=="Txtz"){dX*=1/255;iC=256}for(var I=0;
|
|
I<Y;I++){var ix=bF(I,A.y,cu),fq=ix+1&127;for(var _=0;_<u;_++){var f=I*u+_,bx=bF(_,A.x,hm),bD=bx+1&127,ha=0,ca=0,iX=0;
|
|
if($=="Txtz"){ha=L.$.jv(fH*_,fH*I,hM,128,128);ca=L.$.jv(fH*_,fH*I+1,hM,128,128);iX=L.$.jv(fH*_+1,fH*I,hM,128,128)}else{ha=hM[ix*hm+bx];
|
|
ca=hM[fq*hm+bx];iX=hM[ix*hm+bD]}ec[f]=Math.max(-iC,Math.min((iX-ha)*dX,iC));gT[f]=Math.max(-iC,Math.min((ca-ha)*dX,iC))}}if($=="Txtz")gH.t3(ec,gT,iz,A,6);
|
|
else gH.R7(ec,gT,iz,A,$=="Txtz"?1:$=="OcnR"?3.5/fH:T.Smth.v);if($=="Txtz")dp=T.InvT.v?-1:1;else if($=="Gls"){dp=[1,.4,.5,.5][co]*(Math.exp(T.Dstr.v*.155)-1);
|
|
if(T.InvT.v)dp=-dp}else{dp=.5*(Math.exp(T.RplM.v*.155)-1)}var ci=e.buffer;if($=="Txtz"){var g2=(2+gH.Gs.indexOf(T.LghD.v.LghD))*Math.PI*.25,cO=Math.cos(g2),bh=Math.sin(g2);
|
|
dd={x:cO,y:bh,nc:0};fW.hl(dd);iD=T.Rlf.v;iD=iD/4+Math.max(0,(iD-35)*2)}function iY(ak,hP,bN){var aZ=L.R.overF(hP,ak,1),eo=(1-bN)*ak+bN*(bN*hP+(1-bN)*aZ);
|
|
return eo*255}for(var I=0;I<Y;I++)for(var _=0;_<u;_++){var f=I*u+_,e6=f<<2,i8=ec[f],b5=gT[f],ak={x:1,y:0,nc:i8};
|
|
fW.hl(ak);var hP={x:0,y:1,nc:b5};fW.hl(hP);var ai=fW.AT(ak,hP);if($=="Txtz"){var ho=fW.aqC(ai,dd)*dp,bN=1,G=1;
|
|
if(ho<0){G=0;ho=-ho}bN=Math.min(1,ho*iD);ci[e6+0]=~~iY(o.buffer[e6]*(1/255),G,bN);ci[e6+1]=~~iY(o.buffer[e6+1]*(1/255),G,bN);
|
|
ci[e6+2]=~~iY(o.buffer[e6+2]*(1/255),G,bN)}else{var hK=dp/ai.nc,h3=~~Math.max(0,Math.min(u-1,_-ai.x*hK)),e4=~~Math.max(0,Math.min(Y-1,I-ai.y*hK)),it=e4*u+h3<<2;
|
|
ci[e6+0]=o.buffer[it];ci[e6+1]=o.buffer[it+1];ci[e6+2]=o.buffer[it+2]}}}if($=="PntD"){var j4=T.Shrp.v*.4,gy=T.BrsT.v.BrsT,fi={BrSm:[.75],BrsL:[.85],BrDR:[.68],BrsW:[.75],BrbW:[.78],BrSp:[.62]}[gy],hN=Math.round(T.Sz.v*.5);
|
|
L.KW.gh=fi[0];var b4=L.KW.nQ;L.KW.ay(o.buffer,e.buffer,u,Y,hN,b4,[]);var eN=[-.7,-1,-.7,-1,10,-1,-.7,-1,-.7];
|
|
eN=L.TS.Hx(eN);var hX=e.buffer.slice(0);L.TS.ls(hX,e.buffer,u,Y,eN,0);for(var f=0;f<o.buffer.length;
|
|
f++){var fh=e.buffer[f]-hX[f];e.buffer[f]=Math.max(0,Math.min(255,hX[f]+j4*fh))}}if($=="GlwE"){var a5=e.buffer.slice(0);
|
|
L.KW.gh=.5;var b4=L.KW.nQ;L.KW.ay(o.buffer,a5,u,Y,T.Smth.v>>>1,b4,[]);L.TS.eF(a5,e.buffer,u,Y);L.w0(e.buffer,a5);
|
|
L.lY(a5);L.wr(a5,4278190080,16777215);L.KW.ay(a5,e.buffer,u,Y,T.EdgW.v>>>1,L.KW.e5,[]);var aT=T.EdgB.v/10;
|
|
for(var f=0;f<a5.length;f++){if((f&3)==3)continue;var aZ=e.buffer[f];e.buffer[f]=Math.max(0,Math.min(255,aZ*aT))}}if($=="StnG"){L._o.aqG(o.buffer,u,Y,e.buffer,T.ClSz.v,[Math.round(s.i),Math.round(s.m),Math.round(s.P)],T.BrdT.v)}if($=="HlfS"){var eA=T.HlSz.v,c0=eA*2+1,h7=T.Cntr.v,dS=gH.FX.indexOf(T.ScrT.v.ScrT),b=u*Y,al=b*4,aD=L.G(b),bz=o.buffer,bn=0,dP=0;
|
|
gH.ZA(bz,aD);var i1=aD.slice(0);L.Ja.es(i1,aD,A,eA);var bZ=Math.PI/c0,eS=new Float64Array(u),cO=new Float64Array(u),d9=new Float64Array(2*u);
|
|
for(var _=0;_<u;_++){var bx=(_-(u>>>1))*bZ;eS[_]=bx*bx;cO[_]=Math.cos(bx);var i8=_<<1;d9[i8]=Math.sin(i8*(1/4.5));
|
|
d9[i8+1]=Math.sin((i8+1)*(1/4.5))}for(var I=0;I<Y;I++){var ix=(I-(Y>>>1))*bZ,bh=Math.cos(ix),cp=ix*ix;
|
|
for(var _=0;_<u;_++){var G=bh;if(dS==0){var dO=.5+Math.sqrt(eS[_]+cp)*4.5;G=d9[~~dO]}else if(dS==1){G=cO[_]*bh}var f=I*u+_,bL=aD[f]*(.75+.25*G),bN=bz[(f<<2)+3]*(1/255),b2=Math.max(0,Math.min(255,~~bL));
|
|
bn+=b2*bN,dP+=bN;aD[f]=b2}}bn/=dP;var cW=128+1.26*(bn-128),aT=.08+.25*Math.abs((128-bn)/128),g3=1+aT*h7;
|
|
for(var f=0;f<b;f++){var bL=cW+(aD[f]-cW)*g3;aD[f]=Math.max(0,Math.min(255,~~bL))}if(h7>46)L.round(aD);
|
|
gH.ef(aD,e.buffer,s,E)}for(var f=0;f<o.buffer.length;f+=4)e.buffer[f+3]=o.buffer[f+3]};gH.ef=function($,o,T,s){var E=$.length,e=T.i,n=T.m,A=T.P,u=s.i,Y=s.m,b=s.P;
|
|
for(var f=0;f<E;f++){var a=$[f]*(1/255),w=1-a,X=f<<2;o[X]=~~(e*w+u*a);o[X+1]=~~(n*w+Y*a);o[X+2]=~~(A*w+b*a)}};
|
|
gH.YR=function($){if($==6)$=2;var o="blocks canvas frosted tinylens brick burlap".split(" ")[$];if(gH.xP==null)gH.xP=[];
|
|
if(gH.xP[$]==null){var T,s;if($==2){s=new df(0,0,128,128);var E=iZ.o_("AdNs");E.Mnch.v=!0;E.Dstr.v.Dstr="Gsn";
|
|
E.Nose.v.val=50;var T=L.G(s.Y()*4),e=T.slice(0);new Uint32Array(e.buffer).fill(4286611584);iZ.AY("AdNs",{buffer:e,rect:s},E,0,0,{buffer:T,rect:s})}else{var n=eY.ME.get("tex/"+o,!0)[0];
|
|
s=n.Sg;T=new Uint8Array(n.data)}var A=L.G(s.Y());L.Ge(T,A,0);gH.xP[$]=[s,A]}return gH.xP[$]};gH.R7=function($,o,T,s,E){if(E<=1){E=Math.round(E);
|
|
gH.t3($,o,T,s,[1,16,4][E]);return}var e=E*.42;if($){L.Ja.YK($,T,s,e,3);$.set(T)}if(o){L.Ja.YK(o,T,s,e,3);
|
|
o.set(T)}};gH.t3=function($,o,T,s,E){var e=L.TS.Hx([1,2,1,2,E,2,1,2,1]);if($){T.set($);L.TS.J9($,T,s.d,s.w,e);
|
|
$.set(T)}if(o){T.set(o);L.TS.J9(o,T,s.d,s.w,e);o.set(T)}};gH.Rn=function($){if($==null)return new aY(0,0);
|
|
var o=0,T=$.GEfs?$.GEfs.v:[{v:$}];for(var f=0;f<T.length;f++){var s=T[f].v,e=1e4;if(s.GELv&&!s.GELv.v)continue;
|
|
var E=s.GEfk.v.GEft;if(E=="GlwE"||E=="Phtc"||E=="BsRl"||E=="PlsW"||E=="Chrm"||E=="Gls"||E=="OcnR")e=0;
|
|
o=Math.max(o,e)}return new aY(o,o)};gH.Tc=function($){var o=[0,0,0,0,0,0,0,0,0,0,0,0,0],T=[0,.6,.7,.8,1,1.2,1.4,1.6,1.8,2,2.2,2.6,3,4,5][$];
|
|
for(var f=0;f<13;f++){var s=f-6;o[f]=1/(T*Math.sqrt(2*Math.PI))*Math.exp(-.5*(s/T)*(s/T))}return o};
|
|
gH.Dc=function($,o,T,s,E){var e=gH.Tc(E),n=6,A=13;for(var u=0;u<s;u++)for(var Y=0;Y<T;Y++){var b=u*T+Y<<1,a=0,w=0;
|
|
for(var f=0;f<A;f++){var X=Y+f-n,N=X<0?0:X>=T?T-1:X,z=(u*T+N)*2,i=e[f];a+=i*$[z];w+=i*$[z+1]}o[b]=a;
|
|
o[b+1]=w}};gH.Wb=function($,o,T,s,E){var e=gH.Tc(E),n=6,A=13;for(var u=0;u<s;u++)for(var Y=0;Y<T;Y++){var b=u*T+Y<<1,a=0,w=0;
|
|
for(var f=0;f<A;f++){var X=u+f-n,N=X<0?0:X>=s?s-1:X,z=(N*T+Y)*2,i=e[f];a+=i*$[z];w+=i*$[z+1]}o[b]=a;
|
|
o[b+1]=w}};function hI(){}hI.xx=[2,5,5,7,4,4];hI.zk="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(",");
|
|
hI.C3="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(" ");
|
|
hI.fC=[[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]];
|
|
hI.Ml=["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"];
|
|
hI.VB=function($){if($=="passThrough")return"pass";return hI.zk[hI.C3.indexOf($)]};hI.$j=function($){if($=="pass")return"passThrough";
|
|
return hI.C3[hI.zk.indexOf($)]};hI.getName=function($){return hI.fC[hI.zk.indexOf($)]};function M(){this.rect=null;
|
|
this.fh="norm";this.opacity=255;this.WL=!1;this.Jp=0;this.pI=0;this.UD=!0;this.so=[];for(var f=0;f<10;
|
|
f++)this.so.push(0,0,255,255);this.name=null;this.add={};this.buffer=null;this.YT=null;this.FW=null;
|
|
this._=null;this.Vx=null;this.aaZ=30;this.aH=M.an();this.a6A=M.an();this.amR=M.an();this.aeJ=M.an();
|
|
this.dQ=0;this.Jg=!1;this._I=null;this.B4=new M.az}M.an=function(){var $=H.z("canvas");$.width=$.height=30;
|
|
return $.getContext("2d")};M.az=function(){this.MQ=!0;this.ZM=!0;this.rP=L.G(0);this.a0Y=L.G(0);this.v7=null;
|
|
this.Td={};this.ajh=null;this.gx=null;this.Qu=null;this._s=null;this.fy=null;this.Nl=null;this.PG=null;
|
|
this.cU=null;this.xN=null;this.oL=null;this.f_=null;this.r7=null;this.j1=!1};M.az.prototype.VL=function(){this.MQ=!1;
|
|
this.ZM=!1;this.v7=null;this.j1=y.re};M.az.prototype.af4=function(){fW.z_(this.Td);this.rP=L.G(0);this.a0Y=L.G(0);
|
|
if(this._s)this._s.delete();if(this.fy)this.fy.delete();this._s=null;this.fy=null;var $=[this.Nl,this.PG,this.cU,this.xN,this.oL,this.f_];
|
|
for(var f=0;f<6;f++)if($[f]!=null&&$[f]instanceof y.uR)$[f].delete();this.Nl=null;this.PG=null;this.cU=null;
|
|
this.xN=null;this.oL=null;this.f_=null};M.prototype.T=function($){if($==null)$=this.rect.clone();if(this.B4.v7==null)this.B4.v7=$;
|
|
else this.B4.v7=this.B4.v7.BZ($)};M.prototype.p3=function(){return this.add.lsct==hd.NH||this.add.lsct==hd.Qm};
|
|
M.prototype.d5=function(){var $=this.add;return $.SoCo!=null||$.GdFl!=null||$.PtFl!=null};M.prototype.r2=function(){var $=this.add.lmfx;
|
|
if($==null)return;var o=["GrFl","patternFill"];for(var f=0;f<o.length;f++){var T=ev.CP[ev.order.indexOf(o[f])],s=$[T].v;
|
|
if(s.length==0)continue;for(var E=0;E<s.length;E++){var e=s[E].v;if(e.enab.v&&(e.Algn==null||!e.Algn.v))this.B4.ZM=!0}}};
|
|
M.prototype.mD=function(){var $=this._;if(this.d5())$=this.yy();if(!y.re)return $.yd();if(this.B4.fy==null||this.B4.MQ||y.re!=this.B4.j1){if(this.B4.fy)this.B4.fy.delete();
|
|
this.B4.fy=new y.Au($.rX().d,$.rX().w);this.B4.fy.set($.yd())}return this.B4.fy};M.prototype.H7=function($){var o=this.rect,T=this.buffer;
|
|
if(!y.re){var s=this.Uh($,T,o);if(s){T=s._3;o=s.rect}return T}if(this.B4.v7!=null||y.re!=this.B4.j1){var s=this.Uh($,T,o);
|
|
if(s){T=s._3;o=s.rect}var E=o;if(y.re!=this.B4.j1||this.B4._s==null||this.B4._s.d!=E.d||this.B4._s.w!=E.w){if(this.B4._s)this.B4._s.delete();
|
|
this.B4._s=new y.uR(E.d,E.w);this.B4._s.set(T)}else{var e=this.B4.v7.clone();e.offset(-o.x,-o.y);this.B4._s.set(T,e)}}return this.B4._s};
|
|
M.prototype.P0=function(){var $=this._;if(this.d5())$=this.yy();return $!=null&&$.isEnabled&&($.Qc()==0||$.Qc()!=0&&!$.rect.p4())};
|
|
M.prototype.Uh=function($,o,T){if(this.HC()){var s=this.DE($);if(s._&&s._.isEnabled&&(!s._.rect.p4()||s._.color==0)){var E=this.add.SoLd.filterFX.v;
|
|
s._.A7=E.filterMaskDensity?E.filterMaskDensity.v:255;s._.DI=E.filterMaskFeather?E.filterMaskFeather.v:0;
|
|
var e=s.buffer,n=s._.$a(T);L.lY(n);o=o.slice(0);L.R.Cu(e,s.rect,o,T,n,T,0,T,1);return{_3:o,rect:T}}}};
|
|
M.prototype.ady=function(){var $={D_:!1,BI:!1,rk:0,JS:0};if(this.add.vmsk&&this.add.vmsk.isEnabled)$.BI=!0;
|
|
if(this.yy()&&this.yy().isEnabled)$.D_=!0;if($.D_&&$.BI){$.rk=this.yy().rect.x-this.add.vmsk.yy().rect.x;
|
|
$.JS=this.yy().rect.y-this.add.vmsk.yy().rect.y}return $};M.prototype.tF=function($){if(this.add.lsct==hd.ic)return;
|
|
var o=this,T=this.yy()!=null&&this.yy().Or,s=this.add.vmsk!=null&&this.add.vmsk.Or,E=this.ady(),e=JSON.stringify(E)!=this.B4.ajh||E.D_&&T||E.BI&&s;
|
|
if(e){if(E.BI){var n=this.add.vmsk.yy();if(E.D_){this._=this.yy().E8(n);this.B4.gx=new aY(this._.rect.x-this.yy().rect.x,this._.rect.y-this.yy().rect.y)}else this._=n}if(this._)this.B4.MQ=!0;
|
|
if(this._)this.B4.Qu=new aY(this.rect.x-this._.rect.x,this.rect.y-this._.rect.y);if(E.D_)this.yy().Or=!1;
|
|
if(E.BI)this.add.vmsk.Or=!1;this.T()}else{if(E.D_&&E.BI){this._.rect.x=this.yy().rect.x+this.B4.gx.x;
|
|
this._.rect.y=this.yy().rect.y+this.B4.gx.y}}if(o.d5()){this.wn($)}if(o._1()){var A;if(this._)A=new aY(this.rect.x-this._.rect.x,this.rect.y-this._.rect.y);
|
|
if(this._&&this._.isEnabled&&(this.B4.Qu==null||!A.R1(this.B4.Qu))){this.B4.Qu=A;this.T();this.B4.MQ=!0}}if(dq.get(o.add)!=null)this.B4.MQ=!0;
|
|
this.B4.ajh=JSON.stringify(E)};M.prototype.wn=function($){var o=this,T=o.add.vstk,s=new df(0,0,$.d,$.w),E,e=o.add.vmsk?this.add.vmsk.yy():null,u=!0;
|
|
if(e&&e.isEnabled&&e.Qc()==0)E=e.rX().clone();else E=s;var n=o.yy();if(n&&n.isEnabled&&n.Qc()==0)E=E.Sr(o._.rX());
|
|
var A=e&&T;if(T&&(!T.strokeEnabled.v||T.strokeStyleLineWidth.v.val==0))A=!1;if(T&&!T.fillEnabled.v&&A)u=!1;
|
|
var Y=L.G(E.Y()*4);if(u){if(o.add.SoCo)fW.mk(Y,o.add.SoCo.Clr.v);if(o.add.GdFl){var b=e&&e.color==0?L.A.hT(o.add.vmsk.g,null,!0):null;
|
|
fW.G0(o.add.GdFl,Y,E,$,null,b)}if(o.add.PtFl)fW.hb(o.add.PtFl,Y,E,$,o.add.fxrp)}if(e){var a=e.A7;if(A)e.A7=255;
|
|
var w=L.G(E.Y());if(e.Qc()!=0)w.fill(Math.round(e.Qc()));if(e&&e.isEnabled){var X=e.rX(),N=e.yd();if(X.R1(E))L.w0(N,w);
|
|
else L.pg(N,X,w,E)}if(o.add.SoCo&&u){L.aM(w,Y,3)}else L.Li(w,E,Y,E);if(A)e.A7=a}o.buffer=Y;o.rect=E;
|
|
if(A){var z=ev.ci.k0.indexOf(T.strokeStyleLineAlignment.v.strokeStyleLineAlignment),i=T.strokeStyleContent.v,k=ev.ci.RG.indexOf(i.classID),Q=this.add.vmsk.yy(T);
|
|
if(o.rect.R1(s))o.rect=o.rect;else if(z!=0){var O=o.rect.BZ(Q.rX()),c=L.G(O.Y()*4);L.h9(o.buffer,o.rect,c,O);
|
|
o.buffer=c;o.rect=O}var a=Q.A7;Q.A7=255;var B=Q.$a(o.rect);Q.A7=a;if(Q.color==255)L.lY(B);var G=L.G(o.rect.Y()*4);
|
|
if(k==0)fW.mk(G,i.Clr.v);if(k==1)fW.G0(i,G,o.rect,$,null,e.color==0?e.rect:null);if(k==2)fW.hb(i,G,o.rect,$,o.add.fxrp);
|
|
var l=T.strokeStyleOpacity.v.val/100;if(l!=1)L.wO(B,l);L.aM(B,G,3);if(Q.color==255)z=2-z;if(z==0){L.R.xE("norm",G,o.rect,o.buffer,o.rect,o.rect,1);
|
|
L.Li(w,o.rect,o.buffer,o.rect)}if(z==1){L.R.xE("norm",G,o.rect,o.buffer,o.rect,o.rect,1)}if(z==2){L.lY(w);
|
|
L.R.Cu(G,o.rect,o.buffer,o.rect,w,E,255,o.rect,1,!1);L.lY(w)}if(Q.A7!=255){var v=G.slice(0);L.wr(v,4278190080,16777215);
|
|
L.R.xE("norm",v,o.rect,o.buffer,o.rect,o.rect,1-Q.A7/255)}a=e.A7;e.A7=255;this.a0Y=e.$a(o.rect);e.A7=a}this.T()};
|
|
M.prototype.qI=function($,o){var T=this,s=T.add.SoLd.Idnt.v,E=T.add.SoLd,e=L.M.L3(D.p.GQ(E.nonAffineTransform)),n=$.Rf(s,E.Crop?E.Crop.v:null,[e.d,e.w],E.Impr.v.classID);
|
|
if(n==null)return;var A=n.wc;E.Sz.v.Wdth.v=A[1].d;E.Sz.v.Hght.v=A[1].w;var u=E.warp.v,Y=D.p.GQ(E.nonAffineTransform),b=L.$.TU(Y,A[1]);
|
|
if(u&&!L.Rt.nP(u)){var e=L.M.L3(L.Rt.wW(u)),a=e.x,w=e.y,X=1/e.d,N=1/e.w;b=L.$.TU(Y);b=L.$.E8(b,[X,0,-a*X,0,N,-w*N,0,0])}var z=D.p.wN(A,o?0:1,b,u,null,null,null,o);
|
|
if(z==null){T.buffer=L.G();T.rect=new df}else if(T.HC()){var i=T.DE($);i.buffer=z.buffer;i.rect=z.rect.clone();
|
|
this.zG($,o)}else{T.buffer=z.buffer;T.rect=z.rect}T.tF($);T.T();$.T()};M.prototype.zG=function($,o){if(o==null)o=!1;
|
|
var T=this.DE($),s=this.add.SoLd.filterFX.v,E=iZ.aqx(s),e=new df(0,0,$.d,$.w),n=T.rect.BZ(e),A=T.rect.clone();
|
|
A.Mi(E.x,E.y);var u={buffer:null,rect:n.Sr(A)};u.buffer=L.G(u.rect.Y()*4);L.h9(T.buffer,T.rect,u.buffer,u.rect);
|
|
if(s.enab.v&&o==!1){var Y=s.filterFXList.v;for(var f=0;f<Y.length;f++){var b=Y[f].v;if(b.enab.v==!1)continue;
|
|
var a=b.blendOptions.v,w=hI.VB(a.Md.v.BlnM),X=a.Opct.v.val/100,N=L.h.Qc(b.FrgC.v),z=L.h.Qc(b.BckC.v),i=iZ.Zs(b),k={buffer:L.G(u.buffer.length),rect:u.rect.clone()},Q=b.Fltr?b.Fltr.v:null;
|
|
if(dq.YZ[i]!=null){var O=dq.YZ[i],c=dq.Za(O,Q);if(c)dq.AY(c,u.buffer,k.buffer,u.rect)}else iZ.AY(i,u,Q,N,z,k,[$.add.lnk2?$.add.lnk2:[],this.yy(),$.iy]);
|
|
if(w=="norm"&&X==1)u=k;else if(w=="norm"){L.R.Cu(k.buffer,k.rect,u.buffer,u.rect,null,null,null,u.rect,X)}else{L.R.xE(w,k.buffer,k.rect,u.buffer,u.rect,u.rect,X)}}}this.rect=u.rect;
|
|
this.buffer=u.buffer;this.Gg();this.T();$.T()};M.prototype.Yd=function($,o,T){this._I=this.XP($,o,T)};
|
|
M.prototype.ZY=function($,o){var T=this.XP($,o,!0);if(T==null)return null;var s={Km:T.dQ,ah:T.YS,rect:T._9};
|
|
if(s.Km==1||s.Km==3){var E=s.rect,e=L.G(E.d*E.w*4);L.aM(s.ah,e,0);L.aM(s.ah,e,1);L.aM(s.ah,e,2);L.K_($.Z.channel,$.Z.rect,e,E);
|
|
s.ah=e}return s};M.prototype.XP=function($,o,T){var s,E,e,n,A,u,Y;if(this.dQ<=0){var b=L.G(this.rect.Y());
|
|
L.Ge(this.buffer,b,3);s=L.vB.U2(o,{channel:b,rect:this.rect},"intersection");if(s==null)return null;
|
|
var a=L.ac(s.channel,s.rect);n=s.rect.clone();A=this.rect.clone();E=L.G(n.Y()*4);L.h9(this.buffer,A,E,n);
|
|
L.aM(s.channel,E,3);e=this.buffer.slice(0);if(!T){var w=o.channel.slice(0);L.lY(w);L.Li(w,o.rect,e,A)}u=this.buffer.slice(0);
|
|
Y=this.rect.clone()}if(this.dQ==1||this.dQ==3){var X=this.dQ==1?this.yy():this.DE($)._;n=o.rect.clone();
|
|
A=X.rect.clone();E=X.$i(n);var e=X.channel.slice(0);if(!T)L.R._b(X.color==255?L.sq(n.Y()):L.Ke(n.Y()),n,e,A,o.channel,n,1);
|
|
u=X.channel.slice(0);Y=X.rect.clone()}return{dQ:this.dQ,YS:E,_9:n,UK:e,Ic:A,LU:u,H0:Y}};M.prototype.qf=function($,o){var T=this._I;
|
|
if(T.dQ==0){this.rect=T.H0;this.buffer=T.LU;this.T()}if(T.dQ==1||T.dQ==3){var s=T.dQ==1?this.yy():this.DE($)._;
|
|
s.channel=T.LU;s.rect=T.H0;if(this.dQ==1){s.Or=!0;this.tF($)}if(this.dQ==3)this.T()}this._I=o};M.prototype.jx=function($,o){if(this.dQ<=0&&o.rect.R1(this.rect)){var T=L.G(this.rect.Y());
|
|
L.Ge(this.buffer,T,3);if(L.R1($.Z.channel,T)){var s=this.rect,E=this.buffer;this._I={dQ:this.dQ,YS:E.slice(0),_9:s.clone(),UK:L.G(0),Ic:new df,LU:L.G(0),H0:new df};
|
|
return!0}}var e=this._I;if(e==null)return!1;if(e.dQ!=this.dQ)return!1;if(!o.rect.R1(e._9))return!1;var n=e.Ic.BZ(e._9);
|
|
if(e.dQ<=0){if(!n.R1(this.rect))return!1;var A=L.G(e.YS.length>>2);L.Ge(e.YS,A,3);if(!L.R1(o.channel,A))return!1;
|
|
var u=L.G(n.d*n.w*4);L.h9(e.UK,e.Ic,u,n);L.R.xE("norm",e.YS,e._9,u,n,n,1);return L.R1(u,this.buffer)}if(e.dQ==1||e.dQ==3){var Y=e.dQ==1?this.yy():this.DE($)._;
|
|
if(!n.R1(Y.rect))return!1;var b=L.G(n.Y());b.fill(Y.color);L.pg(e.UK,e.Ic,b,n);L.R._b(e.YS,e._9,b,n,o.channel,n,1);
|
|
return L.R1(b,Y.channel)}};M.prototype.Rq=function($,o,T,s){var E=this._I;E._9.offset(o,T);var e=E.Ic.BZ(E._9);
|
|
if(E.dQ<=0){var n=L.G(e.Y()*4);L.h9(E.UK,E.Ic,n,e);L.R.xE("norm",E.YS,E._9,n,e,e,1);this.buffer=n;this.rect=e;
|
|
this.T()}else{var A=this.dQ==1?this.yy():this.DE($)._,u=L.G(e.Y());u.fill(A.color);L.pg(E.UK,E.Ic,u,e);
|
|
L.R._b(E.YS,E._9,u,e,s.channel,e,1);A.channel=u;A.rect=e.clone();if(this.dQ==1){A.Or=!0;this.tF($)}if(this.dQ==3)this.T()}};
|
|
M.prototype.Dv=function(){var $=[-1,0,1,2];if(this._)$.push(-2);if(this.Vx)$.push(-3);return $};M.prototype.getName=function(){return this.add.luni?this.add.luni:this.name};
|
|
M.prototype.tM=function(J){this.add.luni=this.name=J};M.prototype.mm=function($){var o=this.add.lnsr,T=this.add.TySh;
|
|
if(o=="rend"&&T)this.tM(g8.m5(T.h3).replace(/(?:\r\n|\r|\n)/g," ").slice(0,32))};M.prototype.N9=function(){return(this.Jp&1<<1)==0};
|
|
M.prototype._1=function(){return(this.Jp&1<<4)==0};M.prototype.px=function(){return(this.Jp&1<<5)!=0};
|
|
M.prototype.ab_=function(){var $=this;if($.add.lnsr!="bgnd"){$.add.lnsr="bgnd";$.tM("Background");$.add.lspf=1<<2}};
|
|
M.prototype.a6r=function(){var $=this;if($.add.lnsr=="bgnd"){delete $.add.lnsr;$.tM("Layer 0");$.add.lspf=0}};
|
|
M.prototype.iQ=function($){var o=this.add.lspf;return o==null?!1:(o>>$&1)!=0};M.prototype.bC=function($){if($&&!this.N9())this.Jp-=2;
|
|
if(!$&&this.N9())this.Jp+=2};M.prototype.fg=function(){var $=this.add.lmfx;if($==null)return!1;for(var o in $){if(o=="masterFXSwitch")continue;
|
|
if(o=="Scl")continue;if(o=="classID")continue;if($[o].v.length>0)return!0}return!1};M.prototype.HC=function(){return this.add.SoLd!=null&&this.add.SoLd.filterFX!=null};
|
|
M.prototype.f7=function(){var $=this.add.lmfx;if($==null)return!1;if(!$.masterFXSwitch.v)return!1;for(var o in $){if(o=="masterFXSwitch")continue;
|
|
if(o=="Scl")continue;if(o=="classID")continue;var T=$[o].v;for(var f=0;f<T.length;f++)if(T[f].v.enab.v)return!0}return!1};
|
|
M.prototype.TC=function($,o,T,s){var E=new df,e=this.Kj($,T,s);if(e.indexOf(0)!=-1)E=E.BZ(this.rect);
|
|
if(e.indexOf(1)!=-1){var n=this.yy(),A=n.rX();E=T&&n.color==0?E.p4()?A:E.Sr(A):E.BZ(A)}if(e.indexOf(2)!=-1){var u=this.add.vmsk,Y;
|
|
if(o){if(u.Rc.length>1){var b=L.A.k5(u.g,null,u.Rc);Y=L.M.L3(b)}else Y=L.A.hT(u.g,u.D.length!=0?u.D:null)}else Y=L.A.hT(u.g);
|
|
E=E.BZ(Y)}if(e.indexOf(3)!=-1)E=E.BZ(this.DE($)._.rX());if(e.length==0&&this.d5())E=new df(0,0,$.d,$.w);
|
|
return E};M.prototype.Rr=function(){var $=this.add.artb,o=$.artboardBackgroundType.v,T=0;if(o==1)T=4294967295;
|
|
else if(o==2)T=4278190080;else if(o==3)T=0;else if(o==4){T=$.Clr.v;T=255<<24|T.Bl.v<<16|T.Grn.v<<8|T.Rd.v}else throw o;
|
|
return T};M.prototype.co=function(){var $=this.add.artb.artboardRect.v,o=$.Btom.v,T=$.Left.v,s=$.Rght.v,top=$.Top.v;
|
|
return new df(T,top,s-T,o-top)};M.prototype.y2=function($){var o=M.V5($);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=o};M.V5=function($){var o={classID:"classFloatRect",Top:{t:"doub",v:0},Left:{t:"doub",v:0},Btom:{t:"doub",v:0},Rght:{t:"doub",v:0}};
|
|
o.Btom.v=$.y+$.w;o.Left.v=$.x;o.Rght.v=$.x+$.d;o.Top.v=$.y;return o};M.prototype.Kj=function($,o,T){var s=[],E=this,e=this.Jg;
|
|
if(!o&&E.Jg&&T){s.push(2)}else if(E.dQ<=0||o){if(E._1())if(!this.rect.p4())s.push(0);if(E.yy()&&!E.yy().rect.p4())if(E.yy().lq||o)s.push(1);
|
|
if(E.add.vmsk)if(E.add.vmsk.lq||o)s.push(2);if(E.HC()&&E.DE($)._&&!E.DE($)._.rect.p4())s.push(3)}else if(E.dQ==1){s.push(1);
|
|
if(E.yy().lq&&!E.yy().rect.p4()){if(E._1())if(!this.rect.p4())s.push(0);if(E.add.vmsk)if(E.add.vmsk.lq)s.push(2)}}else if(E.dQ==3&&!E.DE($)._.rect.p4())s.push(3);
|
|
if(E.add.artb&&s.indexOf(0)==-1)s.push(0);s.sort();return s};M.prototype.yy=function(){var $=this;return $.Vx?$.Vx:$.add.vmsk&&$.add.vmsk.isEnabled?null:$._};
|
|
M.prototype.DE=function($){var o=this.add.SoLd.placed.v,T=$.add.FEid;if(T==null)return null;for(var f=0;
|
|
f<T.length;f++)if(T[f].id==o)return T[f];return null};M.prototype.extend=function($){L.a0p(this,$)};
|
|
M.prototype.U7=function($,o,T){var s=$.clone();if(this.f7()){var E=this.add.lmfx,e=o.root.BA(o.u.indexOf(this)),n=E.gradientFillMulti.v,A=!1;
|
|
for(var f=0;f<n.length;f++)if(n[f].v.enab.v&&n[f].v.Algn.v)A=!0;if(A)s=s.BZ(e.rX(o,!1));var u=fW.ajJ(this,o,T);
|
|
s.offset(u.x,u.y);s.d+=u.d;s.w+=u.w}return s};M.prototype.Gg=function(){if(this._1())L.oE(this);var $=this.yy();
|
|
if($)$.Gg()};M.prototype.clone=function(){var $=new M;$.rect=this.rect.clone();$.buffer=this.buffer.slice(0);
|
|
$.fh=this.fh;$.opacity=this.opacity;$.WL=this.WL;$.Jp=this.Jp;$.name=this.name;$.so=this.so.slice(0);
|
|
if(this._)$._=this._.clone();if(this.Vx)$.Vx=this.Vx.clone();for(var o in this.add)$.add[o]=dm.clone(o,this.add[o]);
|
|
return $};M.prototype.Bm=function($){var o=this;if(o.add.TySh)delete o.add.TySh;if(o.add.SoLd){var T=this.Uh($,this.buffer,this.rect);
|
|
if(T){this.buffer=T._3;this.rect=T.rect;this.T()}delete o.add.SoLd}if(o.add.SoCo||o.add.GdFl||o.add.PtFl){if(o.add.vogk)delete o.add.vogk;
|
|
if(o.add.SoCo)delete o.add.SoCo;if(o.add.GdFl)delete o.add.GdFl;if(o.add.PtFl)delete o.add.PtFl;if(o.add.vmsk){console.log(o.Vx,o._);
|
|
delete o.add.vmsk;if(o.Vx==null&&o._)delete o._;else if(o.Vx!=null&&o._!=null){o._=o.Vx;delete o.Vx}}}if(!o.p3()&&dq.get(o.add)==null&&!this._1())this.Jp-=16};
|
|
M.prototype.lr=function($){var o=255,T=0;if($==2){var s=this.add.SoLd.filterFX.v;if(s.filterMaskDensity)o=s.filterMaskDensity.v;
|
|
if(s.filterMaskFeather)T=s.filterMaskFeather.v}else{var E=$==0?this.yy():this.add.vmsk;o=E.A7;T=E.DI}return{uP:$,m_:o,zX:T}};
|
|
M.prototype.hK=function($){if($.uP==2){var o=this.add.SoLd.filterFX.v;if($.m_==255)delete o.filterMaskDensity;
|
|
else o.filterMaskDensity={t:"long",v:$.m_};if($.zX==0)delete o.filterMaskFeather;else o.filterMaskFeather={t:"doub",v:$.zX};
|
|
this.T()}else{var T=$.uP==0?this.yy():this.add.vmsk;T.A7=$.m_;T.DI=$.zX;T.Or=!0}};M.prototype._L=function(){var $=this,o=$.add.vmsk;
|
|
if(o==null)return;$.add.vogk=M._L(o.g)};M._L=function($){var o=[],T=L.A.MM($);for(var s=0;s<T;s++)o.push(L.qy.Ke());
|
|
return o};var hd={d3:0,NH:1,Qm:2,ic:3};M.Zb=function(){this.name="Mask";this.T9=!1;this.zS={i:255,m:0,P:0};
|
|
this.yF=50;this.tU=0;this.color=255;this.lq=!0;this.isEnabled=!0;this.Sf=!1;this.A7=255;this.DI=0;this.rect=new df;
|
|
this.channel=L.G(0);this.AR=null;this.a8z=null;this.Or=!0};M.Zb.prototype.E8=function($){if(!this.isEnabled)return $;
|
|
var o=new M.Zb;o.color=Math.round(this.Qc()*$.Qc()/255);if(this.Qc()==0&&$.Qc()==0)o.rect=this.rX().Sr($.rX());
|
|
else if($.Qc()==0)o.rect=$.rX().clone();else if(this.Qc()==0)o.rect=this.rX().clone();else o.rect=this.rX().BZ($.rX());
|
|
o.channel=this.$a(o.rect);o.A7=255;o.DI=0;var T=$.$a(o.rect);L.a8J(T,o.rect,o.channel,o.rect);return o};
|
|
M.Zb.prototype.rX=function(){if(this.DI==0)return this.rect;var $=Math.ceil(this.DI*2.2),o=this.rect.clone();
|
|
o.Mi($,$);return o};M.Zb.prototype.yd=function(){if(this.DI==0&&this.A7==255)return this.channel;if(this.DI==0){var $=this.channel.slice(0);
|
|
L.lY($);L.wO($,this.A7/255);L.lY($);return $}var o=this.rX(),T=this.$i(o),$=L.G(o.Y());L.Ja.Yy(T,$,o,this.DI);
|
|
if(this.A7!=255){L.lY($);L.wO($,this.A7/255);L.lY($)}return $};M.Zb.prototype.Qc=function(){return Math.round(255-(255-this.color)*(this.A7/255))};
|
|
M.Zb.prototype.extend=function($){L.extend(this,$,this.color)};M.Zb.prototype.Gg=function(){if(this.color==255)L.lY(this.channel);
|
|
L.Gg(this);if(this.color==255)L.lY(this.channel)};M.Zb.prototype.clone=function(){var $=new M.Zb;$.name=this.name;
|
|
$.T9=this.T9;$.zS=this.zS;$.yF=this.yF;$.tU=this.tU;$.color=this.color;$.lq=this.lq;$.isEnabled=this.isEnabled;
|
|
$.Sf=this.Sf;$.A7=this.A7;$.DI=this.DI;$.rect=this.rect.clone();$.channel=this.channel.slice(0);return $};
|
|
M.Zb.prototype.$i=function($,o){if(o==null)o=L.G($.Y());o.fill(this.color);L.pg(this.channel,this.rect,o,$);
|
|
return o};M.Zb.prototype.$a=function($,o){var T=this.rX(),s=this.yd();if(o==null)o=L.G($.Y());o.fill(this.Qc());
|
|
L.pg(s,T,o,$);return o};M.PZ=function(){this.lq=!0;this.isEnabled=!0;this.A7=255;this.DI=0;this.g=[{type:6},{type:8,all:0}];
|
|
this.kZ=[-3,-3];this.wq=!1;this.Vx=null;this.Or=!0;this.D=[];this.Rc=[]};M.PZ.prototype.offset=function($,o){this.Vx=this.yy();
|
|
L.A.hR(this.g,new fY(1,0,0,1,$,o));this.Vx.rect.offset($,o)};M.PZ.prototype.yy=function($){if(!this.Or&&this.Vx&&$==null){this.Vx.isEnabled=this.isEnabled;
|
|
return this.Vx}var o=L.A.hT(this.g),T="strokeStyleLineAlignment",s="strokeStyleLineJoinType";if(o.Y()>3e4*3e4)o=new df(0,0,100,100);
|
|
if($&&$[T].v[T]!="strokeStyleAlignInside"){var E=1;if($[s].v[s]=="strokeStyleMiterJoin"){var e=L.A.a0A(this.g),n=e/2,A=Math.sin(n),u=Math.cos(n);
|
|
u/=A;A=1;var E=Math.sqrt(u*u+A*A);if(isNaN(E)||E<1)E=1}E*=$[T].v[T]=="strokeStyleAlignOutside"?1:.5;
|
|
var Y=Math.ceil($.strokeStyleLineWidth.v.val*E);Y=Math.min(Y,600);o.Mi(Y,Y)}o=L.M.lZ(o);var b=new M.Zb;
|
|
b.color=L.A.Z4(this.g)?0:255;b.lq=this.lq;b.isEnabled=this.isEnabled;b.Sf=!0;b.rect=o;b.A7=this.A7;b.DI=this.DI;
|
|
b.channel=L.G(b.rect.Y());if(!o.p4())L.A.adB(this.g,b.channel,b.rect,$);if($==null){this.Vx=b;this.Or=!1}return b};
|
|
M.PZ.prototype.clone=function(){var $=new M.PZ;$.lq=this.lq;$.isEnabled=this.isEnabled;$.A7=this.A7;
|
|
$.DI=this.DI;$.g=M.PZ.IN(this.g);$.kZ=this.kZ.slice(0);$.wq=this.wq;$.D=this.D.slice(0);$.Rc=this.Rc.slice(0);
|
|
return $};M.PZ.prototype.concat=function($){var o=$.g.slice(2);if(o.length==0)return;o[0].m6=3;this.g=this.g.concat(o)};
|
|
M.PZ.IN=function($){var o=[];for(var f=0;f<$.length;f++){var T=$[f];if(T.type>5||T.type==0||T.type==3)o.push(JSON.parse(JSON.stringify(T)));
|
|
else o.push({type:T.type,Wq:T.Wq.clone(),W:T.W.clone(),JL:T.JL.clone()})}return o};M.PZ.a7S=function($,o,T){if($.length!=o.length)return!1;
|
|
for(var f=2;f<$.length;f++){var s=$[f],E=o[f];if(s.type!=E.type)return!1;if(s.type==0||s.type==3){if(s.length!=E.length||!T&&s.m6!=E.m6)return!1}else if(!s.Wq.R1(E.Wq)||!s.W.R1(E.W)||!s.JL.R1(E.JL))return!1}return!0};
|
|
M.PZ.prototype.alO=function(){var $=this.g;for(var f=3;f<$.length;f++)if($[f].type==0||$[f].type==3)$[f].m6=-1};
|
|
M.SC=function(){this.type=null;this.R4=2;this.EB=null;this.FZ="";this.Ul="";this.oF="";this.open=0;this.raw=null;
|
|
this.wc=null;this.a4Z=""};M.SC.prototype.clone=function(){var $=new M.SC;$.type=this.type;$.R4=this.R4;
|
|
$.EB=this.EB;$.FZ=this.FZ;$.Ul=this.Ul;$.oF=this.oF;$.open=this.open;$.raw=new Uint8Array(this.raw.buffer.slice(0));
|
|
return $};M.SC.prototype.aw=function($,o,T){if(T==null)T="none";var s=this,E=eY.RP(s.raw.buffer),e=E=="svg"||E=="pdf";
|
|
if(s.wc){var n=o&&e&&Math.max(s.wc[1].d,s.wc[1].w)<Math.max(o[0],o[1]);if(!n&&T==this.a4Z)return}this.a4Z=T;
|
|
if(!e)$=0;if(E==null){alert("Unsupported format: "+t.en(s.raw,0,4));return null}var A=eY.Q1(E);if(A.or){var u=new iG(name+(E=="psd"?"":"-"+E)+".psd"),Y;
|
|
A.yj(s.raw.buffer,u,o);var b=new df(0,0,u.d,u.w);if("avrg maxx medn minn rang stdv summ vari".split(" ").indexOf(T)!=-1){var a=[];
|
|
for(var f=0;f<u.u.length;f++){var w=u.u[f],X=w.buffer;if(!w.rect.R1(b)){X=L.G(b.Y()*4);L.h9(w.buffer,w.rect,X,b);
|
|
console.log("resizing")}a.push(X)}Y=L.G(b.Y()*4);L.stack.stack(a,Y,T)}else{for(var f=0;f<u.u.length;
|
|
f++)if(u.u[f].d5())u.u[f].tF(u);u.eA();u.T();u.ir();Y=u.aw()}s.wc=[Y,b]}else if(A){var N=A.yj(s.raw.buffer)[0];
|
|
s.wc=[new Uint8Array(N.data),N.Sg]}if(s.wc){if($==1){var X=s.wc[0],z=s.wc[1],i=L.G(z.Y());L.Ge(X,i,3);
|
|
var k=L.ac(i,z),Q=L.G(k.Y()*4);L.h9(X,z,Q,k);s.wc=[Q,k]}L.mc(s.wc)}};M.NO="0";M.J1="2";M.cS="2.5";M.Y5="2.6";
|
|
M.RJ="3";M.sv="4";M.I0="4.5";M.aG="4.6";M.uN="5";M.LZ="5.5";M.VT="6";M.vg="7";M.hj="7.5";M.r4="8";M.RI="9";
|
|
M.wV="9.3";M.kn="9.5";M.hI="9.6";M.AA="10";M.Gt="11";M.WD="12";M.y1="13";M.YP="13.1";M.MT="13.2";M.N1="13.3";
|
|
M.nN="13.4";M.Gi="14";M.Ho="14.1";M.Y9="14.2";M.zB="17";M.mY="18";M.wz="19";M.dI="19.5";M.Ep="19.6";
|
|
M.uh="19.7";M.ZT="20";M.dR="21";M.gg="21.5";M.yr="22";M.NI="22.5";M._q="23";M.ahY="24";M.b7="25";M.E2="26";
|
|
M.u2="27";M.ip="28";M.KE="29";M.Wv="30";M.Yv="31";M.Kw="32";M.V$="33";M.vl="34";M.mJ="35";M.Mu="36";
|
|
M.je="36.5";M.Ai="37";M.ru="37.5";M.a1L="37.6";M.OZ="38";M.Oe="38.5";M.OD="38.6";M.Ia="39";M.Tv="40";
|
|
M.WU="41";M.N6="42";M.TN="50";M.Hj="51";M.dZ="52";M.KN="53";M.IX="54";M.wR="54.5";M.Op="54.6";M.aR="54.7";
|
|
M.B8="54.8";M.lS="55";M.ps="56";M.Lu="57";M.a5="58";M.Px="59";function h$(){this.depth=0;this.index=-1;
|
|
this.c=null;this.a1s=null;this.t_=-1;this.children=null;this.parent=null;this.C6=null}h$.prototype.km=function($,o){if(this.depth!=0)$.push(this.c.getName());
|
|
if(this.children)for(var f=0;f<this.children.length;f++)this.children[f].km($,o);if($.length>o.ed.length)o.ed=$.slice(0);
|
|
if(this.depth!=0)$.pop()};h$.prototype.a20=function(){var $=0;if(this.c.p3()){for(var f=0;f<this.children.length;
|
|
f++)$+=this.children[f].a20()}else if(this.c.buffer)$+=this.c.buffer.length;return $};h$.prototype.BA=function($){var o=this.C6[$];
|
|
return this.C6[$]};h$.prototype.Of=function($,o){var T=this.c;if(!T.N9()||T.iQ(2)||T.iQ(31))return null;
|
|
if(T.P0()){var s=T._.rect.Ha($);if(!s&&T._.color==0)return}if(T.p3()){for(var f=0;f<this.children.length;
|
|
f++){var J=this.children[f];J.Of($,o)}}else if(T.rect.Ha($))o.push(this.index)};h$.prototype.cM=function($,o){var T=this.c;
|
|
if(!T.N9()||T.iQ(2)||T.iQ(31))return null;if(T.P0()){if(T._.rect.dv($)){if(!L.cM($,T._.channel,T._.rect))return null}else if(T._.color==0)return null}if(T.p3()){if(T.add.artb&&!T.co().dv($))return null;
|
|
for(var f=this.children.length-1;f>=0;f--){var J=this.children[f],s=J.cM($,o);if(s&&o==null)return s}return null}else if(T.add.TySh&&T.rect.dv($)||L.apb($,T.buffer,T.rect)){if(o==null)return this;
|
|
else o.push(this.index)}return null};h$.prototype.arF=function($){var o=this.c;if(!o.N9()||o.iQ(2)||o.iQ(31))return null;
|
|
var T=o.add.vmsk;if(T&&T.isEnabled){var s=L.A.cM(T.g,$).II;if(s!=-1)return{a30:this,ajq:s}}if(o.p3()){if(o.add.artb&&!o.co().dv($))return null;
|
|
for(var f=this.children.length-1;f>=0;f--){var J=this.children[f],E=J.arF($);if(E)return E}return null}return null};
|
|
h$.prototype.g6=function($,o){$.push(this.index);if(this.c.p3()){$.push(this.t_);if(o)if(this.c.dQ==1&&this.c.yy().lq==!1)return;
|
|
for(var f=0;f<this.children.length;f++)this.children[f].g6($)}};h$.prototype.Ey=function($,o,T){var s=this.c,E,e;
|
|
if(s.p3()&&s.add.artb!=null)o=s.co();if(o.d>o.w){E=T;e=Math.floor(T*(o.w/o.d))}else{E=Math.floor(T*(o.d/o.w));
|
|
e=T}if(s.d5()&&s.add.vmsk==null||s.add.TySh)E=e=Math.max(e,16);else{E=Math.max(E,6);e=Math.max(e,6)}var n=e,A=s.d5()&&s.add.vmsk;
|
|
if(A){var u=s.rect.clone(),a,w;if(u.p4())u=new df(0,0,20,20);var Y=u.d,b=u.w;if(Y>b){a=T;w=Math.floor(T*(b/Y))}else{a=Math.floor(T*(Y/b));
|
|
w=T}if(a*w==0)a=w=16;L.JH.CH(s.aH,a,w,u,s.buffer,s.rect,!1);L.JH.a4G(s.aH,a,w);n=w}else if(s.add.TySh){L.JH.an5(s.aH,n,n,s.add.TySh)}else if(s.add.SoCo){n=Math.max(16,Math.min(E,e));
|
|
L.JH.a16(s.aH,n,n,s.add.SoCo)}else if(s.add.GdFl){L.JH.adL(s.aH,n,n,s.add.GdFl)}else if(s.add.PtFl){L.JH.ark(s.aH,n,n,s.add.PtFl,$)}else if(dq.get(s.add)!=null){L.JH.afo(s.aH,n,n,s.add)}else if(s.add.SoLd){L.JH.CH(s.aH,E,e,o,s.buffer,s.rect,!1);
|
|
L.JH.aaU(s.aH,E,e,s.add.SoLd)}else if(s.p3()){n=16}else{if(s._1())L.JH.CH(s.aH,E,e,o,s.buffer,s.rect,!1);
|
|
else{L.JH.a7c(s.aH,n,n)}}var X=s.yy();if(X)L.JH.ab(s.a6A,E,e,o,X);if(s.HC()&&s.DE($)&&s.DE($)._){var N=s.DE($)._;
|
|
L.JH.ab(s.aeJ,E,e,o,N)}if(!A&&s.add.vmsk){L.JH.ab(s.amR,E,e,o,s.add.vmsk.yy(),!0)}if(s.add.vmsk||X)n=Math.max(n,e);
|
|
s.aaZ=Math.max(n,16);if(s.p3()&&s.add.lsct==hd.NH)for(var f=0;f<this.children.length;f++)this.children[f].Ey($,o,T)};
|
|
h$.prototype.ks=function($,o,T,s){this.depth=T;var E=$[o];if(s==null)s=[];this.C6=s;if(E.add.lsct==hd.ic){this.a1s=E;
|
|
this.t_=o-1;this.children=[];var f=o+1;while(!0){var e=$[f];if(e==null)console.log(f,$.length);if(e.add.lsct==hd.NH||e.add.lsct==hd.Qm){if(E.add.lyid==e.add.lyid)E.add.lyid+=16777215;
|
|
this.c=e;this.index=f-1;s[this.index]=this;s[o-1]=this;break}var n=new h$;n.parent=this;f=n.ks($,f,T+1,s);
|
|
this.children.push(n)}return f+1}else{this.c=E;this.index=o-1;s[this.index]=this;return o+1}};h$.prototype.gC=function($,o,T,s){var E=this.BA(T),e=$;
|
|
while(E.parent!=null){e=E.c.U7(e,o,s);E=E.parent}return e};h$.prototype.rX=function($,o){var T=this.c,s=new df;
|
|
if(!T.N9())return s;var E=T.yy();if(T.p3())for(var f=0;f<this.children.length;f++){var e=this.children[f].rX($,!0);
|
|
s=s.BZ(e)}else if(dq.get(T.add)!=null)s=T.P0()&&T._.color==0?T._.rX().clone():new df(0,0,$.d,$.w);else if(T.d5()&&T.add.vmsk&&T.add.vmsk.isEnabled&&T.add.vstk){s=T.rect.clone()}else if(T.d5()&&E&&E.isEnabled&&E.Qc()!=0)s=new df(0,0,$.d,$.w);
|
|
else{s=T.TC($,!1,!0);if(T.add.vmsk)s=L.M.lZ(s)}return o?T.U7(s,$):s};h$.prototype._5=function($,o,T,s,E){var e=this.c,n=fW.Yk(e);
|
|
if(!e.N9())return;if(e.opacity==255){this.IQ($,o,T,s,E);return}var A=$.slice(0);this.IQ(A,o,T,s,E);L.R.Cu(A,o,$,o,null,null,0,T,e.opacity/255,e.fh=="diss")};
|
|
h$.prototype.IQ=function($,o,T,s,E){var e=this.c,n=fW.Yk(e),A=dq.get(e.add)!=null,a,N;if(e.p3()&&e.fh=="pass"&&!e.P0()&&!(E.length>0||n.fill!=1||e.f7())){this.Oc($,o,T,s);
|
|
return}var u=e.p3()&&e.fh=="pass"&&(E.length>0||n.fill!=1||e.f7()),Y=e.rect,b=e.buffer;if(e.p3()){Y=this.rX(s,!1);
|
|
var w=L.G(Y.Y()*4);a=L.G(Y.Y());this.Oc(w,Y,T,s);L.Ge(w,a,3)}else if(A){Y=o.clone();a=L.G(Y.Y());a.fill(255)}else{Y=e.rect;
|
|
a=L.G(Y.Y());L.Ge(b,a,3)}if(e.P0()){var X=e._.$a(Y);L.nh(X,a)}if(e.f7())N=fW.ZX(e.add.lmfx,e.add.fxrp,a,Y,s);
|
|
if(e.f7())fW.YJ(e.add.lmfx,N,Y,$,o,T);if(e.p3()){b=L.G(Y.Y()*4);if(e.fh=="pass")L.h9($,o,b,Y);if(u){var w=L.G(Y.Y()*4);
|
|
this.Oc(w,Y,T,s);var z=L.G(Y.Y());L.Ge(w,z,3);L.Li(z,Y,b,Y)}this.Oc(b,Y,T,s)}if(A){b=$.slice(0);L.wr(b,4278190080,16777215);
|
|
var i=dq.get(e.add),k=dq.Za(i,e.add[i]);dq.AY(k,b,b,Y)}var Q=b.slice(0);L.wr(Q,4278190080,16777215);
|
|
for(var f=0;f<E.length;f++)E[f]._5(Q,Y,T,s,[]);var O=L.G(Y.Y()*4);L.h9($,o,O,Y);if(A)n.xX=!0;L.R.xE(e.fh=="pass"?"norm":e.fh,Q,Y,O,Y,T,1,n);
|
|
if(e.f7()){var c=e.B4.Td.type.FrFX,B=null;if(c.length!=0){B=c[0];for(var f=0;f<c.length;f++)if(c[f].r3.d>B.r3.d)B=c[f];
|
|
var G=L.G(B.r3.d*B.r3.w*4);L.h9($,o,G,B.r3)}fW.ZW(e.add.lmfx,N,Y,$,o,T,O,G,B?B.r3:null)}L.R.Cu(O,Y,$,o,a,Y,0,T,1,e.fh=="diss")};
|
|
h$.prototype.Oc=function($,o,T,s){var E=this.children;for(var f=0;f<E.length;f++){var e=[];for(var n=f+1;
|
|
n<E.length;n++)if(E[n].c.WL)e.push(E[n]);else break;E[f]._5($,o,T,s,e);f+=e.length}};h$.D5={delete:function($){if($&&$.d)$.delete()},G:function($,o){return y.re?new y.uR($,o):L.G($*o*4)},pt:function($,o,T){if(y.re){if($==null||$.d!=o||$.w!=T){h$.D5.delete($);
|
|
return new y.uR(o,T)}}else{if($==null||!($ instanceof Uint8Array)||$.length!=o*T*4){h$.D5.delete($);
|
|
return L.G(o*T*4)}}return $},pg:function($,o,T,s,E){(y.re?y.Yx:L.h9)($,o,T,s,E)},Cu:function($,o,T,s,E,e,n,A,f,u,Y){(y.re?y.R.J4:L.R.Cu)($,o,T,s,E,e,n,A,f,u,Y)},xE:function($,o,T,s,E,e,n,A){if(y.re)y.R.vn($,o,T,s,E,e,n,A);
|
|
else L.R.xE($,o,T,s,E,e,n,A)},wr:function($,o,T){if(y.re){y.U0($);y.C_(o,T)}else L.wr($,o,T)},a52:function($,o,T,s,E){if(y.re){y.R.J4(null,null,s,E,$,o,T,E,1,!1)}else{if(T==255)L.Li($,o,s,E);
|
|
else{var e=L.G(o.Y());L.ok(s,E,e,o);L.nh($,e);L.wr(s,0,16777215);L.K_(e,o,s,E)}}},nB:function($,o,T,s){if(y.re)y.R.J4(null,null,T,s,$,o,0,s,1,!1);
|
|
else L.nB($,o,T,s)}};h$.prototype._7=function($,o,T,s,E,e){var n=typeof e=="number";if(!this.c.p3()&&(n&&this.index>e||!n&&e.indexOf(this.index)==-1)){return}var A=this.c,u=fW.Yk(A),Y=h$.D5,b=A.d5()?A.yy():A._;
|
|
if(!A.N9())return;if(A.P0()&&b.rect.p4()){return}if(A.add.vstk==null&&this.rX(s,!1).p4()){return}var a=this.rX(s,!0).Sr(T);
|
|
if(!o.R1(T)&&!T.Ha(a))return;if(A.p3()&&A.add.artb){var w=A.co();T=T.Sr(w)}var X=h$.mA(A,E,u);if(!X){this.sc($,o,T,s,E,e);
|
|
return}A.B4.Nl=Y.pt(A.B4.Nl,a.d,a.w);Y.pg($,o,A.B4.Nl,a,T);this.sc(A.B4.Nl,a,T,s,E,e);Y.Cu(A.B4.Nl,a,$,o,null,null,0,T,A.opacity/255,A.fh=="diss",u.KP)};
|
|
h$.mA=function($,o,T){if(T.KP[0]*T.KP[1]*T.KP[2]==0)return!0;return $.opacity!=255&&(o.length!=0||$.p3()||$.f7())};
|
|
h$.acx={B4:{}};h$.prototype.sc=function($,o,T,s,E,e){var n=this.c,A=fW.Yk(n),u=dq.get(n.add)!=null,Y=h$.D5,b=h$.mA(n,E,A),a=b?1:n.opacity/255,w=n.d5()?n.yy():n._,X=n.p3()&&n.fh=="pass"&&!(E.length>0||A.fill!=1||n.f7()),N=!n.p3()&&!u&&!n.f7()&&E.length==0,z=u&&!n.f7()&&E.length==0,B=null,G=null,l=null,h;
|
|
if(X||N||z){var i=$,k=o;if(n.P0()){k=this.rX(s,!1);i=n.B4.xN=Y.pt(n.B4.xN,k.d,k.w);Y.pg($,o,n.B4.xN,k)}if(X)this.s1(i,k,T,s,e);
|
|
if(N)Y.xE(n.fh,n.H7(s),n.rect,i,k,T,a,A);if(z){var Q=n.P0()&&w.Qc()==0?w.rX().clone():k.clone(),O=n.B4;
|
|
if(Q.R1(new df(0,0,s.d,s.w)))O=h$.acx;O.cU=this.Ub(i,k,O.cU,Q,n.add);A.xX=!0;Y.xE(n.fh,O.cU,Q,i,k,T,a,A)}if(n.P0())Y.Cu(i,k,$,o,n.mD(),w.rX(),w.Qc(),T,1,n.fh=="diss");
|
|
n.B4.VL();return}var c=n.p3()&&n.fh=="pass"&&(E.length>0||A.fill!=1||n.f7()),Q=n.rect;if(n.p3()){Q=this.rX(s,!1);
|
|
l=n.B4.cU=Y.pt(n.B4.cU,Q.d,Q.w);Y.wr(l,0);this.s1(l,Q,Q,s,e);G=Y.pt(n.B4.PG,Q.d,Q.w);Y.pg(l,Q,G,Q)}else if(u){Q=n.P0()&&w.Qc()==0?w.rX().clone():o.clone();
|
|
G=Y.pt(n.B4.PG,Q.d,Q.w);Y.wr(G,4294967295)}else{Q=n.rect;B=n.H7(s);G=Y.pt(n.B4.PG,Q.d,Q.w);Y.pg(B,Q,G,Q)}n.B4.PG=G;
|
|
if(n.P0())Y.a52(n.mD(),w.rX(),w.Qc(),G,Q);if(n.f7())if(n.B4.v7||n.B4.ZM||n.B4.j1!=y.re||n.B4.MQ||n.p3()){var v=L.G(Q.d*Q.w);
|
|
if(fW.xC(n.add.lmfx)){if(y.re){if(!n.p3()&&n.yy()==null&&n.rect.R1(Q)&&n.add.vmsk==null)L.Ge(n.buffer,v,3);
|
|
else{var p=L.G(Q.d*Q.w*4);G.get(p);L.Ge(p,v,3)}}else L.Ge(G,v,3)}if(n.B4.ZM||n.B4.j1!=y.re||!L.R1(v,n.B4.rP)){var P=null;
|
|
if(n.d5()&&n.add.vmsk&&n.add.vmsk.isEnabled&&n.add.vmsk.yy().color==0)P=n.add.vmsk.yy().rect;fW.a9G(n.B4.Td,v,Q,n.add.lmfx,n.add.fxrp,s,P);
|
|
n.B4.rP=v;n.B4.aao=Q}}if(n.f7())fW.YJ(n.add.lmfx,n.B4.Td,Q,$,o,T);if(n.p3()){B=Y.pt(n.B4.xN,Q.d,Q.w);
|
|
Y.wr(B,0);if(n.fh=="pass")Y.pg($,o,B,Q);if(c)Y.nB(l,Q,B,Q);this.s1(B,Q,T,s,e);n.B4.xN=B}if(u){B=n.B4.xN=this.Ub($,o,n.B4.xN,Q,n.add)}if(n.p3()||u)h=B;
|
|
else{h=Y.pt(n.B4.xN,Q.d,Q.w);Y.pg(B,Q,h,Q,T);n.B4.xN=h}Y.wr(h,4278190080,16777215);for(var f=0;f<E.length;
|
|
f++)E[f]._7(h,Q,T,s,[],e);var j=n.B4.oL=Y.pt(n.B4.oL,Q.d,Q.w);Y.pg($,o,j,Q,T);if(u)A.xX=!0;Y.xE(n.fh=="pass"?"norm":n.fh,h,Q,j,Q,T,1,A);
|
|
if(n.f7()){var C=n.B4.Td.type.FrFX,V=null;if(C.length!=0){V=C[0];for(var f=0;f<C.length;f++)if(C[f].r3.d>V.r3.d)V=C[f];
|
|
n.B4.f_=Y.pt(n.B4.f_,V.r3.d,V.r3.w);Y.pg($,o,n.B4.f_,V.r3,T);n.B4.r7=Y.pt(n.B4.r7,V.r3.d,V.r3.w)}fW.ZW(n.add.lmfx,n.B4.Td,Q,$,o,T,j,n.B4.f_,n.B4.r7,V?V.r3:null)}if(!y.re){var d=L.G(Q.Y());
|
|
L.Ge(G,d,3);G=d}Y.Cu(j,Q,$,o,G,Q,0,T,1,n.fh=="diss");n.B4.VL()};h$.prototype.Ub=function($,o,T,s,E){var e=dq.get(E),n;
|
|
if(e)n=dq.Za(e,E[e]);var A=h$.D5;T=A.pt(T,s.d,s.w);if(!(y.re&&o.R1(s)))A.pg($,o,T,s);if(n){if(y.re){var u=s.clone();
|
|
u.x=u.y=0;if(o.R1(s)){y.U0(T,u);dq.Ze(n,$.ek,u)}else{y.U0(T,s);T.bv(s);dq.Ze(n,T.Ji,u)}}else dq.AY(n,T,T,s)}return T};
|
|
h$.prototype.s1=function($,o,T,s,E){var e=this.children;for(var f=0;f<e.length;f++){var n=[];for(var A=f+1;
|
|
A<e.length;A++)if(e[A].c.WL)n.push(e[A]);else break;e[f]._7($,o,T,s,n,E);f+=n.length}};function iG($){this.YX="psd";
|
|
this.dM=!1;this.name=$;this.Q3=-1;this.U_=null;this.F$=null;this.T4=null;this.rb=null;this.d=0;this.w=0;
|
|
this.u=[];this.B0={};this.add={};this.buffer=null;this.Zl=4;this.Ck=null;this.fG=72;this.sx={};this.D=[];
|
|
this.yZ=[];this.op=[];this.AQ=[];this.w5=[iG.om("Work Path")];this.dl=[];this.T7=null;this.kk={classID:"CompList",list:{t:"VlLs",v:[]}};
|
|
this.root=null;this.mb=null;this.Nr=!1;this.akS=!1;this.aoD=!1;this.wo=!1;this.L5=!1;this.Cd=!1;this.RZ=!1;
|
|
this.sr=!1;this.OW=!1;this.SK=!1;this.v7=null;this.iu=null;this._I={};this.Z=null;this.iy=[];this.el=[];
|
|
this.n={Qw:{},EJ:[],apw:[],hz:[],v$:[],JU:null,oA:null,BD:null,Z_:null,nT:[],bt:[],WG:null};this.history=[new dt([1,0],null)];
|
|
this.Q5=0;this.TR=0;this.C=new aH(this)}iG.prototype.hm=function(){var $=this.yZ,o=[];for(var f=0;f<$.length;
|
|
f++)o[f]=-1;var T=this.root.children;for(var f=0;f<T.length;f++){var s=T[f],E=s.c.add.artb;if(E==null)continue;
|
|
var e=E.guideIndeces;e=e?e.v:[];for(var n=0;n<e.length;n++)o[e[n].v]=s.index}return[JSON.parse(JSON.stringify($)),o]};
|
|
iG.prototype.W$=function($){this.yZ=JSON.parse(JSON.stringify($[0]));var o=$[1],T=this.root.children;
|
|
for(var f=0;f<T.length;f++){var s=T[f],E=s.c.add.artb;if(E==null)continue;E.guideIndeces={t:"VlLs",v:[]}}for(var f=0;
|
|
f<o.length;f++)if(o[f]!=-1)this.u[o[f]].add.artb.guideIndeces.v.push({t:"long",v:f})};iG.prototype.yJ=function($){var o=this;
|
|
if($[0])o.add.lnk2=$[0];else delete o.add.lnk2;if($[1])o.add.FEid=$[1];else delete o.add.FEid;if($[2])o.add.Patt=$[2];
|
|
else delete o.add.Patt};iG.prototype.al7=function($){var o=this,T=[],s=[],E=[],X=null,N=null,z=null;
|
|
for(var f=0;f<$.length;f++){var e=$[f];if(e.add.SoLd){T.push(e.add.SoLd.Idnt.v);s.push(e.add.SoLd.placed.v)}if(e.add.PtFl)E.push(e.add.PtFl.Ptrn.v.Idnt.v);
|
|
if(e.add.lmfx){for(var n=0;n<ev.CP.length;n++){var A=e.add.lmfx[ev.CP[n]].v;for(var u=0;u<A.length;u++)if(A[u].v.Ptrn)E.push(A[u].v.Ptrn.v.Idnt.v)}}var Y=e.add.vstk;
|
|
if(Y&&Y.strokeStyleContent.v.classID=="patternLayer"){E.push(Y.strokeStyleContent.v.Ptrn.v.Idnt.v)}}var b=o.add.lnk2,a=o.add.FEid,w=o.add.Patt;
|
|
if(b){X=[];for(var f=0;f<b.length;f++)if(T.indexOf(b[f].EB)!=-1)X.push(b[f]);if(X.length==0)X=null}if(a){N=[];
|
|
for(var f=0;f<a.length;f++)if(s.indexOf(a[f].id)!=-1)N.push(a[f]);if(N.length==0)N=null}if(w){z=[];for(var f=0;
|
|
f<w.length;f++)if(E.indexOf(w[f].id)!=-1)z.push(w[f]);if(z.length==0)z=null}return[X,N,z]};iG.prototype.$X=function(){var $=this.iy,o=this.iy.length;
|
|
if(o!=0&&$[o-1].name=="Quick Mask")return $[o-1]};iG.prototype.xW=function(){return this.YX==H.Xe("% |/!)")||this.YX==H._K("gP")};
|
|
iG.prototype.Mm=function($){var o=this.add.artd;if($!=0)this.add.artd={classID:"null",Cnt:{t:"long",v:$},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}}},autoExpandEnabled:{t:"bool",v:!0},autoNestEnabled:{t:"bool",v:!0},autoPositionEnabled:{t:"bool",v:!0}};
|
|
else delete this.add.artd};iG.prototype.lU=function($){if(this.add.FEid==null)this.add.FEid=[];if(this.add.FEid.indexOf($)==-1)this.add.FEid.push($)};
|
|
iG.prototype.JW=function($){var o=this.add.FEid.indexOf($);this.add.FEid.splice(o,1);if(this.add.FEid.length==0)delete this.add.FEid};
|
|
iG.prototype.T=function($){if($==null)$=new df(0,0,this.d,this.w);if(this.v7==null)this.v7=$;else this.v7=this.v7.BZ($)};
|
|
iG.prototype.a5O=function($){return this.v7!=null};iG.prototype.tL=function($){var o=this.u[$],T=this.root.BA($);
|
|
if(T==null)return!1;if(o.p3()||T.parent.children.indexOf(T)==0)return!1;return!0};iG.apP=function($){if($.add.lnk2)for(var f=0;
|
|
f<$.add.lnk2.length;f++){var o=$.add.lnk2[f].EB;$.add.lnk2[f].EB=iG.IP()+o.slice(8);for(var T=0;T<$.u.length;
|
|
T++){var s=$.u[T].add.SoLd;if(s&&s.Idnt.v==o)s.Idnt.v=$.add.lnk2[f].EB}}};iG.prototype.Yq=function($,o,T){$.sort(function(a,w){return a-w});
|
|
var top=$[$.length-1],s=this.u.slice(0),E=this.D.slice(0),e=[],n=[];for(var f=0;f<this.u.length;f++){if($.indexOf(f)!=-1)n.push(this.u[f]);
|
|
else e.push(this.u[f])}this.qp(n);this.D=[];var A=this.root.rX(this,!0);if(o)A=A.Sr(o);if(T)A=A.BZ(T);
|
|
if(A.p4())A=new df(0,0,100,100);var u=new df(-A.x,-A.y,this.d,this.w),Y=new Uint8Array(eY.Q1("PSD").tC(this,0,0,[!0,!1]));
|
|
this.qp(s);this.D=E;var b=new iG(this.u[top].getName());eY.Q1("PSD").yj(Y.buffer,b);delete b.add.artd;
|
|
b.op=[];b.qp(b.u);b.W$([[],[]]);iG.apP(b);D.LY.Mo(b,A);b.T();b.ir();b.aw();return[b,A,e,top]};iG.prototype.$L=function($,o,T){var s=this.Yq($),E=s[0],e=s[1],n=s[2],top=s[3],A;
|
|
if(T=="jpg")A=new Uint8Array(eY.Q1("JPG").tC([[E.aw().buffer]],E.d,E.w,[80]));else A=new Uint8Array(eY.Q1("PSD").tC(E,null,null,[!0,!1]));
|
|
if(o)n=this.u.slice(0);var u=this.sP(A,E.name,e.x,e.y);if(top==this.u.length-1)n.push(u);else n.splice(o?top+1:top-$.length+1,0,u);
|
|
this.qp(n);this.D=[n.indexOf(u)]};iG.IP=function(){var $="";for(var f=0;f<8;f++)$+=Math.floor(Math.random()*16).toString(16);
|
|
return $};iG.prototype.Af=function($){if($==null)return;if(this.add.Patt==null)this.add.Patt=[];var o=this.add.Patt;
|
|
for(var f=0;f<o.length;f++)if(o[f].id==$.id)return;o.push($)};iG.prototype.sP=function($,o,T,s,E){if(this.add.lnk2==null)this.add.lnk2=[];
|
|
var e=null,a=!1;for(var f=0;f<this.add.lnk2.length;f++)if(L.R1($,this.add.lnk2[f].raw)){e=this.add.lnk2[f].EB;
|
|
break}if(e==null){var n=eY.RP($.buffer);e=iG.IP()+"-d71c-11e5-b1ae-a548a96e5f9f";var A=new M.SC;A.EB=e;
|
|
A.oF=n=="psd"?"8BIM":" ";A.FZ=o+"."+n;A.Ul=n=="psd"?"8BPB":" ";A.open=0;A.raw=$;A.type="liFD";
|
|
A.R4=2;this.add.lnk2.push(A)}var u=this.Rf(e),Y=iG.IP()+"-d71c-11e5-b1ae-a548a96e5f9f",b=this.$f();b.tM(o);
|
|
if(u!=null){var w=b.rect=u.wc[1].clone();b.rect.offset(T,s);var X=Math.max(w.d/this.d,w.w/this.w),a=E&&X>1.0001;
|
|
if(a){w.d=Math.round(w.d/X);w.w=Math.round(w.w/X);w.x=Math.round((this.d-w.d)/2);w.y=Math.round((this.w-w.w)/2)}else if(E&&eY.RP($.buffer)=="pdf"&&this.fG!=144){var X=144/this.fG;
|
|
w.d=Math.round(w.d/X);w.w=Math.round(w.w/X);a=!0}b.buffer=L.G(b.rect.Y()*4);if(!a)L.w0(u.wc[0],b.buffer)}b.add.SoLd={classID:"null",Idnt:{t:"TEXT",v:e},Impr:{t:"Objc",v:{__name:"None",classID:"none"}},placed:{t:"TEXT",v:Y},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:L.Rt.G(u?u.wc[1]:b.rect)},Sz:{t:"Objc",v:{classID:"Pnt",Wdth:{t:"doub",v:b.rect.d},Hght:{t:"doub",v:b.rect.w}}},Rslt:{t:"UntF",v:{type:"#Rsl",val:72}}};
|
|
var N=L.M.Uo(b.rect).I;b.add.SoLd.Trnf=D.p.vP(N);b.add.SoLd.nonAffineTransform=D.p.vP(N);if(a)b.qI(this,!1);
|
|
return b};iG.prototype.aw=function($){if($!=null){this.T();this.ir($);var o=this.buffer;if(y.re)this.mb.get(o);
|
|
else o=o.slice(0);this.T();this.ir();return o}if(this.v7){this.ir();this.v7=null}if(y.re&&this.iu){this.mb.get(this.buffer);
|
|
this.iu=null;this.RZ=!0}return this.buffer};iG.prototype.FK=function(){for(var f=0;f<this.u.length;f++)this.u[f].r2();
|
|
this.T()};iG.prototype.Je=function(){for(var f=0;f<this.u.length;f++)if(this.u[f].add.lmfx)this.u[f].B4.ZM=!0};
|
|
iG.prototype.tB=function(){var $=this.B0.r1044;if($==null){$=this.B0.r1044=new Uint8Array(4);var o=0;
|
|
for(var f=0;f<this.u.length;f++)o=Math.max(o,this.u[f].add.lyid);t.gG($,0,o)}var T=t.s($,0);t.gG($,0,T+1);
|
|
return T+1};iG.prototype.Jt=function($,o,T){if($==null)$=!0;var s=this;if(s.el.length!=0)return!0;if(s.D.length!=1){if($)alert(s.D.length==0?"Select a layer first.":"More than one layer selected.");
|
|
return!1}return this.qQ($,o,T)};iG.prototype.qQ=function($,o,T){if($==null)$=!0;if(o==null)o=!1;var s=this;
|
|
if(s.el.length!=0)return!0;for(var f=0;f<s.D.length;f++){var E=s.u[s.D[f]],e=o||E.dQ<=0;if(E.add.lsct!=null&&E.add.lsct!=hd.d3&&E.dQ!=1){if($)alert(aX.get([15,7,2]));
|
|
return!1}if(e&&!E._1()){if($)alert(aX.get([15,7,2]));return!1}if(e&&E.add.TySh){return this.nU($,[15,7,3],T)}if(e&&E.add.SoLd){return this.nU($,[15,7,4],T)}if(E.iQ(1)||E.iQ(31)){if($)alert(aX.get([6,57,0]));
|
|
return!1}}return!0};iG.prototype.nU=function($,o,T){if($&&typeof $=="object"){var s=window.confirm(aX.get(o)+". "+aX.get([6,8])+"?");
|
|
if(s){var E=new x(H.E.b0,!0);E.data={Wk:"rasterizeLayer",bI:{classID:"rasterizeLayer",null:aj.D4("Lyr",!0)}};
|
|
$.J(E)}return T?s:!1}if($)alert(aX.get(o));return!1};iG.prototype.q$=function($){var o=this.root.BA($);
|
|
if(o.parent)return o.c.N9()&&this.q$(o.parent.index);else return o.c.N9()};iG.prototype.Q2=function(){var $=this;
|
|
if($.add.artd&&$.D.length!=0){var o=$.root.BA($.D[0]);while(o.parent.parent)o=o.parent;if(o.c.add.artb)return o.index}return-1};
|
|
iG.prototype.Sq=function(){var $=this.u[this.D[0]];if($.dQ<=0&&!$.rect.Ha(this.Z.rect)){alert("Selected area is empty.");
|
|
return!1}if(this.D.length==1&&this.Z){var o=L.G(this.Z.channel.length);L.ok($.buffer,$.rect,o,this.Z.rect);
|
|
L.nh(this.Z.channel,o);if(L.tD(o,0)){alert("Selected area is empty.");return!1}}return!0};iG.prototype.ou=function(){if(this.B0["r"+1037]==null)this.pa(30);
|
|
return t.Cv(this.B0["r"+1037],0)};iG.prototype.pa=function($){if(this.B0["r"+1037]==null)this.B0["r"+1037]=new Uint8Array(4);
|
|
if(t.Cv(this.B0["r"+1037],0)==$)return;t.Bz(this.B0["r"+1037],0,$);this.Je()};iG.prototype.RS=function(){if(this.B0["r"+1049]==null)this.um(30);
|
|
return t.Cv(this.B0["r"+1049],0)};iG.prototype.um=function($){if(this.B0["r"+1049]==null)this.B0["r"+1049]=new Uint8Array(4);
|
|
if(t.Cv(this.B0["r"+1049],0)==$)return;t.Bz(this.B0["r"+1049],0,$);this.Je()};iG.prototype.bK=function($){if(this.add.lnk2==null)return null;
|
|
for(var f=0;f<this.add.lnk2.length;f++)if(this.add.lnk2[f].EB==$)return this.add.lnk2[f];return null};
|
|
iG.prototype.a7o=function($){var o=this.bK($);if(o==null)return!1;var T=eY.RP(o.raw.buffer);if(T==null)return!1;
|
|
if(eY.Q1(T)!=null||T=="psd")return!0;return!1};iG.prototype.Rf=function($,o,T,s){var E=this.bK($);if(E==null)return null;
|
|
E.aw(o,T,s);if(E.wc)return E};iG.prototype.SH=function(){var $=this.d,o=this.w;if(y.re&&this.mb==null)this.mb=new y.uR($,o,!0);
|
|
if(this.buffer==null||this.buffer.length!=$*o*4||y.re&&(this.mb.d!=$||this.mb.w!=o)){this.buffer=L.G($*o*4);
|
|
if(this.mb)this.mb.delete();if(y.re)this.mb=new y.uR($,o,!0)}};iG.prototype.a9o=function(){this.SH();
|
|
if(y.re){this.mb.set(this.buffer)}};iG.prototype.ir=function($){var o=this.d,T=this.w,s=new df(0,0,o,T),E=s.Sr(this.v7);
|
|
this.SH();if(E.p4())return;if(!E.R1(s)){if(!y.re){var e=L.Ke(E.Y()*4);L.h9(e,E,this.buffer,s)}if(y.re){y.U0(this.mb,E);
|
|
y.C_(0)}}else{if(y.re){this.mb.set(null)}else{this.buffer.fill(0)}}var n=Date.now(),A=y.re?this.mb:this.buffer;
|
|
if($==null)$=1e9;var u=this.root.children;for(var f=0;f<u.length;f++){var Y=u[f].c;if(Y.N9()&&Y.add.artb){var b=Y.co(),a=E.Sr(b),w=Y.Rr();
|
|
if(w!=0){if(y.re){y.U0(A,a);y.C_(w);y.C_(w)}else L.aqz(A,s,a,w)}}}this.root._7(A,s,E,this,[],$);this.iu=this.v7.clone()};
|
|
iG.prototype.$f=function($){var o=new M;o.rect=new df(0,0,0,0);o.buffer=L.G(1);o.add.luni=new aY(0,0);
|
|
if($!=!0)o.add.lyid=this.tB();o.add.lsct=hd.d3;o.add.lclr=0;o.add.fxrp=new aY(0,0);return o};iG.prototype.jK=function($){var o=this.$f($);
|
|
o.tM("</Layer group>");o.add.lsct=hd.ic;o.Jp=24;return o};iG.prototype.i_=function(){return this.Q5!=this.TR};
|
|
iG.prototype.g4=function($){while(this.history.length>this.Q5+1)this.history.pop();if(this.TR>this.Q5)this.TR=-1;
|
|
if($.U.id!=D.dm){this.wo=!0;if(this.kk.lastAppliedComp){delete this.kk.lastAppliedComp;this.RZ=!0}}this.history.push($);
|
|
this.Q5++;this.RZ=!0;var o=bX.FJ()?60:30,T=0;for(var f=this.history.length-1;f>=0;f--){var s=this.history[f];
|
|
if(s.RY)continue;T++;if(T==o){this.Q5-=f;this.history=this.history.slice(f);break}}};iG.prototype.OY=function(){if(this.Q5!=this.history.length-1)return null;
|
|
return this.history[this.history.length-1]};iG.prototype.v1=function($,o,T,s){if($==null)$=!1;var E=o!=null?[o]:this.D.slice(0);
|
|
if(s){var e=[];for(var f=0;f<E.length;f++){var n=this.u[E[f]],A=n.pI;if(n.UD&&A!=0&&e.indexOf(A)==-1)e.push(A)}if(e.length!=0)for(var f=0;
|
|
f<this.u.length;f++){var n=this.u[f],A=n.pI;if(n.UD&&A!=0&&e.indexOf(A)!=-1&&E.indexOf(f)==-1)E.push(f)}}var u=[];
|
|
for(var f=0;f<E.length;f++){var Y=this.rY(E[f],$);for(var b=0;b<Y.length;b++)if(u.indexOf(Y[b])==-1)u.push(Y[b]);
|
|
if(T){var J=this.root.BA(E[f]);while(J.parent!=null&&J.parent.parent!=null){J=J.parent;if(u.indexOf(J.index)==-1){u.push(J.index,J.t_)}}}}return u};
|
|
iG.prototype.aV=function($,o,T){var s=this,E=s.v1(!1,$,null,T);E.sort(function(Q,O){return Q-O});var e={};
|
|
for(var n=0;n<s.u.length;n++){var A=s.u[n].getName();e[A]=!0}var u=[];for(var f=0;f<E.length;f++){var Y=s.u[E[f]].clone(),z,i;
|
|
Y.add.lyid=s.tB();Y.add.lspf=0;if(Y.HC()){var b=Y.DE(s),a=iG.IS(b);s.lU(a);Y.add.SoLd.placed.v=a.id}Y.tF(s);
|
|
var w=Y.getName(),X=w.length;while(48<=w.charCodeAt(X-1)&&w.charCodeAt(X-1)<=57)X--;var N=parseInt(w.slice(X));
|
|
if(isNaN(N)){if(w.endsWith(" copy")){N=1;z=w.slice(0,w.length-5)}else{N=0;z=w}}else if(w.slice(0,X).endsWith(" copy ")){N=N;
|
|
z=w.slice(0,X-6)}else{N=0;z=w}N++;while(!0){i=z+" copy"+(N==1?"":" "+N);if(e[i]==null)break;N++}var k=E.indexOf(this.root.BA(E[f]).parent.index)!=-1;
|
|
if(o!=!0&&!k)Y.tM(i);e[i]=!0;u.push(Y)}return u};iG.IS=function($){return{id:iG.IP()+$.id.slice(8),buffer:$.buffer.slice(0),rect:$.rect.clone(),_:$._?$._.clone():null}};
|
|
iG.v4=function($){return{id:$,rect:new df,buffer:L.G(1),_:new M.Zb}};iG.om=function($,o){if(o==null)o={vmsk:new M.PZ};
|
|
if(o.vogk==null){o.vogk=[];var T=L.A.MM(o.vmsk.g);for(var s=0;s<T;s++)o.vogk.push(L.qy.Ke())}return{name:$,II:0,add:o}};
|
|
iG.prototype.Vp=function($){var o=[],T=[],s=this,e=0;for(var f=1;f<s.w5.length;f++){var E=s.w5[f];E.II=-1-f;
|
|
o.push(E);if(s.dl.indexOf(f)!=-1)T.push(o.length-1)}if(s.w5[0].add.vmsk.g.length>2){var E=s.w5[0];E.II=-1;
|
|
o.push(E);if(s.dl.indexOf(0)!=-1)T.push(o.length-1)}var n=s.T7==null;if(n)s.T7=[];for(var f=s.D.length-1;
|
|
f>=0;f--){var A=s.u[s.D[f]],u=A.add.TySh;if(A.add.vmsk!=null&&(A.Jg||A.d5())){var E=iG.om("\""+A.getName()+"\" Shape Path",A.add);
|
|
E.II=s.D[f];o.push(E);if(n)s.T7.push(e);if(s.T7.indexOf(e)!=-1)T.push(o.length-1);e++}if($!=!0&&u&&u.add&&L.Rt.nP(u.Ah)){var E=iG.om("\""+A.getName().slice(0,10)+"..\" Text Path",u.add);
|
|
E.II=1e6+s.D[f];o.push(E);T.push(o.length-1);e++}}if(T.length==0&&$){s.w5[0].II=-1;s.dl=[0];T.push(o.length);
|
|
o.push(s.w5[0])}return[o,T]};iG.prototype.rY=function(f,$){var o=[],J=this.root.BA(f);if(J)J.g6(o,$);
|
|
return o};iG.prototype.wT=function(){this.root.Ey(this,new df(0,0,this.d,this.w),32)};iG.prototype.qp=function($){for(var f=0;
|
|
f<this.u.length;f++){var o=this.u[f];if($.indexOf(o)==-1){o.B4.af4();o.T()}}var T=0;for(var f=0;f<$.length;
|
|
f++)if($[f].add.artb)T++;this.Mm(T);this.u=$.slice(0);this.eA()};iG.prototype.eA=function(){var $=this.u,o=$.length;
|
|
this.root=new h$;var T=this.$f(!0);T.fh="pass";T.add.lsct=hd.NH;var s=this.jK(!0),E=[s];for(var f=0;
|
|
f<o;f++)E.push($[f]);E.push(T);this.root.ks(E,0,0);if(this.D.length==0)this.D=[o-1]};iG.prototype.L4=function(){if(this.D.length!=1)return;
|
|
var $=this.root.BA(this.D[0]);while($.parent!=null){var o=$.parent.c;o.add.lsct=hd.NH;$=$.parent}this.Cd=this.a8i=!0};
|
|
iG.prototype.a2B=function(){this.eA();var $=[this.root],bo=0;while($.length!=0){var top=$.pop();bo++;
|
|
if(top.c.add.lsct==hd.NH)for(var f=0;f<top.children.length;f++)$.push(top.children[f])}if(bo>1e3){var o=this.root.children;
|
|
for(var f=0;f<o.length;f++)if(o[f].c.add.lsct==hd.NH)o[f].c.add.lsct=hd.Qm}};iG.Pi=function($,o,T,s,E,e){var n={__name:"Make",classID:"Mk",Nw:{t:"Objc",v:{classID:"Dcmn",Nm:{t:"TEXT",v:s},artboard:{t:"bool",v:e},Md:{t:"type",v:{classID:"RGBM"}},Wdth:{t:"UntF",v:{type:"#Rlt",val:$}},Hght:{t:"UntF",v:{type:"#Rlt",val:o}},Rslt:{t:"UntF",v:{type:"#Rsl",val:T}},pixelScaleFactor:{t:"doub",v:1},Fl:{t:"enum",v:{Fl:E}},Dpth:{t:"long",v:8},profile:{t:"TEXT",v:"sRGB IEC61966-2.1"}}}};
|
|
return{Wk:"make",bI:n}};iG.af3=function($,o){var T=0,s=0,E=72,e=o.apn,n=$.preset&&$.preset.v=="Clipboard";
|
|
if(n){T=e.d;s=e.w}else{T=$.Wdth.v.val;s=$.Hght.v.val;E=$.Rslt.v.val}var A=new iG(($.Nm?$.Nm.v:aX.get([11,7]))+".psd");
|
|
A.d=T;A.w=s;A.fG=E;var u=$.Fl?$.Fl.v.Fl:"Wht";if($.artboard&&$.artboard.v){var Y=A.$f();Y.tM("Artboard 1");
|
|
Y.add.lsct=hd.NH;Y.y2(new df(0,0,T,s));Y.add.artb.artboardBackgroundType={t:"long",v:{Wht:1,Blck:2,Trns:3,BckC:1}[u]};
|
|
Y.fh="pass";Y.Jp=24;A.qp([A.jK(),Y]);A.Mm(1)}else{var b=A.$f();b.tM("Background");A.qp([b]);b.add.lspf=1<<2;
|
|
if(u!="Trns"){var a=o.GR;a=(a&255)<<16|(a>>>8&255)<<8|a>>>16;b.rect=new df(0,0,T,s);b.buffer=L.G(T*s*4);
|
|
L.wr(b.buffer,{Wht:4294967295,Blck:4278190080,BckC:255<<24|a}[u])}}A.buffer=L.G(T*s*4);return A};function aH($){this.u4=$;
|
|
this.X=0;this.Hp=1;this.l=new aY(0,0);this.Re=new aY(0,0);this.VN=0;this.xR=[1,1,1];this.Vi=new df(0,0,1,1);
|
|
this.apC=new df(0,0,$.d,$.w);this.Xk=null;this.Iw=null;this.$c=new Uint32Array(0);this.VC=null;this.DV=null;
|
|
this.fl=L.G(0);this.GC=null;this.mi=null}aH.prototype.jj=function($){var o=new fY,T=this.Vi,s=this.u4,E=$?this.Hp:this.X,e=$?this.Re:this.l,n=Math.round((T.d-s.d*E)/2+e.x),A=Math.round((T.w-s.w*E)/2+e.y);
|
|
o.translate(-n,-A);o.scale(1/E,1/E);var u=s.d/2,Y=s.w/2;o.translate(-u,-Y);o.rotate(this.VN);o.translate(u,Y);
|
|
return o};aH.prototype.o8=function($){var o=this.Vi,T=this.u4,s=Math.atan2(-$.P,$.Ca),E=T.d/2,e=T.w/2;
|
|
$.translate(-E,-e);$.rotate(-s);$.translate(E,e);var n=1/$.jZ();$.scale(n,n);var A=-$.Ry,u=-$.Es,Y=Math.round(A-(o.d-T.d*n)/2),b=Math.round(u-(o.w-T.w*n)/2);
|
|
if(Math.abs(n-Math.round(n))<1e-6)n=Math.round(n);this.VN=s;this.X=n;this.l=new aY(Y,b)};aH.prototype.VD=function($,o){var T=this.jj();
|
|
return T.bb(new aY($,o))};aH.prototype.X8=function($,o){var T=this.jj();T.lY();return T.bb(new aY($,o))};
|
|
function ev(){}ev.order="ebbl FrFX IrSh IrGl ChFX SoFi GrFl patternFill OrGl DrSh".split(" ");ev.CP="ebblMulti frameFXMulti innerShadowMulti IrGlMulti ChFXMulti solidFillMulti gradientFillMulti patternFillMulti OrGlMulti dropShadowMulti".split(" ");
|
|
ev.names=[[14,4],[14,9],[14,1],[14,3],[14,8],[14,5],[14,6],[14,7],[14,2],[14,0]];ev.Eb=["DrSh","IrSh","SoFi","GrFl","FrFX"];
|
|
ev.k9=["Clr"];ev.cw="Grad Rvrs Type Algn Angl Dthr Scl Ofst".split(" ");ev.SZ=["Ptrn","Scl","Algn","phase"];
|
|
ev.rN={jl:"{\"t\":\"Objc\",\"v\":{\"classID\":\"RGBC\",\"Rd\":{\"v\":255,\"t\":\"doub\"},\"Grn\":{\"v\":0,\"t\":\"doub\"},\"Bl\":{\"v\":0,\"t\":\"doub\"}}}",f4:"{\"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\"}}}",Hr:"{\"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}}}]}}}",Lo:"{\"t\":\"Objc\",\"v\":{\"classID\":\"Ptrn\",\"Nm\":{\"v\":\"orangeslices\",\"t\":\"TEXT\"},\"Idnt\":{\"v\":\"c7acb22a-47a6-11de-919a-bf574370eaaf\",\"t\":\"TEXT\"}}}"};
|
|
ev.rN.jl="\"Clr\": "+ev.rN.jl;ev.rN.h="\"Grad\":"+ev.rN.f4+",\"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\"}";
|
|
ev.rN.Lo="\"Ptrn\":"+ev.rN.Lo+",\"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\"}";
|
|
ev.default="{ \"classID\": \"null\", \"Scl\": {\"t\": \"UntF\", \"v\": { \"type\": \"#Prc\",\"val\": 100} }, \"masterFXSwitch\": {\"t\": \"bool\",\"v\": true} }";
|
|
ev.Qo=["{\"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\"},"+ev.rN.jl+","+ev.rN.h+","+ev.rN.Lo+"}","{\"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\"},"+ev.rN.jl+"}","{\"classID\":\"GrFl\", \"enab\":{\"v\":true,\"t\":\"bool\"}, \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+ev.rN.h+"}","{\"classID\":\"patternFill\",\"enab\":{\"v\":true,\"t\":\"bool\"}, \"Md\":{\"v\":{\"BlnM\":\"Nrml\"},\"t\":\"enum\"},\"Opct\":{\"v\":{\"type\":\"#Prc\",\"val\":100},\"t\":\"UntF\"},"+ev.rN.Lo+"}","{\"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\"}}"];
|
|
ev.h={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]]};
|
|
ev.stroke={types:["InsF","CtrF","OutF"],names:[[19,5,2],[19,5,1],[19,5,0]],O2:["SClr","GrFl","Ptrn"],abS:[[13,0],[12,37],[12,62]]};
|
|
ev.Gq={types:["SfBL","PrBL"],names:[[19,1,0],[19,1,1]],WS:["SrcC","SrcE"],ai9:[[19,5,1],[12,69]]};ev.Ll={types:["OtrB","InrB","Embs","PlEb","strokeEmboss"],style:[[19,2,0],[19,2,1],[19,2,2],[19,2,3],[19,2,4]],kX:["SfBL","PrBL","Slmt"],adn:[[19,3,0],[19,3,1],[19,3,2]],dir:[[19,4,0],[19,4,1]]};
|
|
ev.ci={JZ:["strokeStyleButtCap","strokeStyleRoundCap","strokeStyleSquareCap"],k0:["strokeStyleAlignInside","strokeStyleAlignCenter","strokeStyleAlignOutside"],join:["strokeStyleMiterJoin","strokeStyleRoundJoin","strokeStyleBevelJoin"],RG:["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\","+ev.rN.jl+"}")},strokeStyleResolution:{t:"doub",v:72}}};
|
|
ev.WA=[{classID:"null",Clr:JSON.parse(ev.Qo[5]).Clr},{classID:"null",Grad:JSON.parse(ev.Qo[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(ev.Qo[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 fW={};fW.l_=function($,o){function T($,w){if($==null)return null;var X=$[w].v,N;if(X.length!=0){N=X[0].v;
|
|
if(!N.enab.v)N=null}return N}var s=o.SoCo,E=o.GdFl,e=T($,"solidFillMulti"),n=T($,"gradientFillMulti");
|
|
if(e==null&&n==null)return[s,E];var A=fW.ab$;if(s&&e&&n==null){var u=JSON.parse(JSON.stringify(s));u.Clr.v=A(e.Clr.v,s.Clr.v,e);
|
|
return[u,null]}if(E&&e&&n==null){var Y=JSON.parse(JSON.stringify(E)),b=Y.Grad.v.Clrs.v;for(var f=0;f<b.length;
|
|
f++){var a=b[f].v.Clr;a.v=A(e.Clr.v,a.v,e)}return[null,Y]}if(s&&n){var Y=JSON.parse(JSON.stringify(n)),b=Y.Grad.v.Clrs.v;
|
|
for(var f=0;f<b.length;f++){var a=b[f].v.Clr;a.v=A(a.v,s.Clr.v,n)}return[null,Y]}return[e,n]};fW.abI={Kc:L.G(4),uy:L.G(4),i:new df(0,0,1,1)};
|
|
fW.ab$=function($,o,T){var s=hI.VB(T.Md.v.BlnM),E=T.Opct.v.val/100,e=fW.abI;$=L.h.Qc($);o=L.h.Qc(o);
|
|
e.Kc[0]=$.i;e.Kc[1]=$.m;e.Kc[2]=$.P;e.Kc[3]=255;e.uy[0]=o.i;e.uy[1]=o.m;e.uy[2]=o.P;e.uy[3]=255;L.R.xE(s,e.Kc,e.i,e.uy,e.i,e.i,E);
|
|
return{classID:"RGBC",Rd:{t:"doub",v:e.uy[0]},Grn:{t:"doub",v:e.uy[1]},Bl:{t:"doub",v:e.uy[2]}}};fW.lv=function($,o,T){var s=$;
|
|
$=$.slice(0);var E=hI.zk[hI.C3.indexOf(o.Md.v.BlnM)],e=L.h.Qc(o.Clr.v),n=4278190080|Math.round(e.P)<<16|Math.round(e.m)<<8|Math.round(e.i),A=L.G(T.Y()*4);
|
|
L.wr(A,n);L.R.xE(E,A,T,$,T,T,o.Opct.v.val/100);for(var f=0;f<$.length;f+=4)$[f+3]=s[f+3];return $};fW.XF=function($,o){var T=["Sz","blur","Sftn","Dstn"];
|
|
for(var f=0;f<ev.order.length;f++){var s=ev.order[f],E=$[ev.CP[f]].v;for(var e=0;e<E.length;e++){var n=E[e].v;
|
|
for(var A=0;A<T.length;A++){var u=n[T[A]];if(u){var Y=u.v.val,b=Y;b=Math.max(Y==0?0:1,b*o);if(s=="ChFX")b=Math.min(b,250);
|
|
if(s=="ebbl"){if(T[A]=="blur")b=Math.min(b,250);if(T[A]=="Sftn")b=Math.min(b,16)}u.v.val=Math.round(b)}}if(s=="ebbl"||s=="patternFill"||s=="FrFX")if(n.Ptrn&&n.Scl)n.Scl.v.val=Math.max(1,Math.min(1e3,n.Scl.v.val*o))}}};
|
|
fW.ajJ=function($,o,T){var s=new df(-.5,-.5,1,1),E=$.add.lmfx;for(var f=0;f<ev.order.length;f++){var e=ev.order[f],n=E[ev.CP[f]].v;
|
|
for(var A=0;A<n.length;A++){var u=n[A].v,w;if(!u.enab.v)continue;var Y=u.blur?u.blur.v.val+1:0,b=u.Ckmt?u.Ckmt.v.val/100:0,a=Math.round(Y*b);
|
|
if(e=="DrSh"||e=="IrSh"&&T){w=new df(-.5,-.5,1,1);w.Mi(Y,Y);fW.JX(w,u,o,0)}if(e=="OrGl"||e=="IrGl"&&T){w=new df(-.5,-.5,1,1);
|
|
w.Mi(Y,Y)}if(e=="FrFX"){var X=fW.nl(u),N=X[1];if(T)N=Math.max(X[0],N);w=new df(-.5,-.5,1,1);w.Mi(Math.ceil(N),Math.ceil(N))}if(e=="ebbl"){var Y=u.blur.v.val,z=u.bvlS.v.BESl;
|
|
if(z=="Embs"||z=="PlEb")Y/=2;var i=["OtrB","InrB","Embs","PlEb","strokeEmboss"],k=["SfBL","PrBL","Slmt"],Q=["In","Out"],O=u.bvlT.v.bvlT!="SfBL"?Y:Y*.43,c=Math.round(Y);
|
|
w=new df(-c-1,-c-1,2*c+2,2*c+2)}if(T&&e=="ChFX"){w=new df(-.5,-.5,1,1);w.Mi(Y,Y);var B=w.clone();fW.JX(w,u,o,0);
|
|
fW.JX(B,u,o,Math.PI);w=w.BZ(B)}if(w)s=s.BZ(w)}}if(s.x!=Math.ceil(s.x)){s.x=Math.ceil(s.x);s.d-=1}if(s.y!=Math.ceil(s.y)){s.y=Math.ceil(s.y);
|
|
s.w-=1}s.d=Math.floor(s.d);s.w=Math.floor(s.w);return s};fW.nl=function($){var o=0,T=0,s=$.Styl.v.FStl,E=$.Sz.v.val;
|
|
if(s=="OutF")T=E;if(s=="InsF")o=E;if(s=="CtrF")o=T=E/2;return[o,T]};fW.z_=function($){if($.all==null)return;
|
|
for(var f=0;f<$.all.length;f++){var o=$.all[f];if(o.kj)o.kj.delete();if(o.vh)o.vh.delete();if(o.Bl)o.Bl.delete()}};
|
|
fW.a9G=function($,o,T,s,E,e,n){fW.z_($);var A=fW.ZX(s,E,o,T,e,n);$.type=A.type,$.all=A.all;if(y.re)for(var f=0;
|
|
f<$.all.length;f++){var u=$.all[f];u.kj=new y.uR(u.lM.d,u.lM.w);u.kj.set(u._3);delete u._3;if(u.IF){u.vh=new y.Au(u.lM.d,u.lM.w);
|
|
u.vh.set(u.IF);delete u.IF}if(u.bR){u.Bl=new y.Au(u.lM.d,u.lM.w);u.Bl.set(u.bR);delete u.bR}}};fW.xC=function($){for(var f=0;
|
|
f<ev.order.length;f++){var o=ev.order[f],T=ev.CP[f],s=$[T].v;for(var E=0;E<s.length;E++){var e=s[E].v;
|
|
if(e.enab.v&&["patternFill","GrFl","SoFi"].indexOf(o)==-1)return!0}}return!1};fW.ZX=function($,o,T,s,E,e){if(e==null)e=s;
|
|
var n=0,A=0;for(var f=0;f<ev.order.length;f++){var u=ev.order[f],Y=ev.CP[f],b=$[Y].v;for(var a=0;a<b.length;
|
|
a++){var w=b[a].v;if(u=="DrSh"&&w.enab.v&&w.Ckmt.v.val>0&&w.blur.v.val>0)n=Math.max(n,Math.ceil(w.Ckmt.v.val*w.blur.v.val/100));
|
|
if(u=="OrGl"&&w.enab.v&&w.Ckmt.v.val>0&&w.blur.v.val>0&&w.GlwT.v.BETE=="SfBL")n=Math.max(n,Math.ceil(w.Ckmt.v.val*w.blur.v.val/100));
|
|
if(u=="OrGl"&&w.enab.v&&w.blur.v.val>0&&w.GlwT.v.BETE=="PrBL")n=Math.max(n,w.blur.v.val);if(u=="FrFX"&&w.enab.v&&w.Sz.v.val>0){if(w.Styl.v.FStl=="OutF")n=Math.max(n,w.Sz.v.val);
|
|
if(w.Styl.v.FStl=="CtrF")n=Math.max(n,Math.ceil(w.Sz.v.val/2));A=Math.max(A,fW.nl(w)[1])}}}var X=new fW.p5(T,s,n,fW.xC($)),N=-s.x,z=-s.y,i={type:{},all:[]};
|
|
for(var k=0;k<ev.order.length;k++){var u=ev.order[k],Y=ev.CP[k];i.type[u]=[];for(var Q=$[Y].v.length-1;
|
|
Q>=0;Q--){var O=$[Y].v[Q].v;if(!O.enab.v)continue;var c=O.blur?O.blur.v.val:0,B=O.Ckmt?O.Ckmt.v.val/100:0,G=c*B;
|
|
if(u=="DrSh"){var l=X.rq(G,c-G,!0),v=l.aP,p=l.uL;p.offset(N,z);fW.Lm(v,O,!1);fW.JX(p,O,E,0);var P=L.G(p.Y()*4);
|
|
fW.mk(P,O.Clr.v);L.aM(v,P,3);var h={_3:P,lM:p,_6:hI.VB(O.Md.v.BlnM),LE:O.Opct.v.val/100,a5K:O.layerConceals.v};
|
|
i.type[u].push(h);i.all.push(h)}if(u=="IrSh"){var l=X.rq(G,c-G,!1);fW.JX(l.uL,O,E,0);var p=X.rect().clone(),v=L.G(p.Y());
|
|
v.fill(255);L.pg(l.aP,l.uL,v,p);fW.Lm(v,O,!0);var P=L.G(p.Y()*4);fW.mk(P,O.Clr.v);L.aM(v,P,3);p.offset(N,z);
|
|
var h={_3:P,lM:p,_6:hI.VB(O.Md.v.BlnM),LE:O.Opct.v.val/100};i.type[u].push(h);i.all.push(h)}if(u=="GrFl"){var P=L.G(X.rect().Y()*4);
|
|
fW.G0(O,P,X.rect(),E,null,e);var p=X.rect().clone();p.offset(N,z);var h={_3:P,lM:p,_6:hI.VB(O.Md.v.BlnM),LE:O.Opct.v.val/100};
|
|
i.type[u].push(h);i.all.push(h)}if(u=="SoFi"){var P=L.G(X.aP().length*4);fW.mk(P,O.Clr.v);var p=X.rect().clone();
|
|
p.offset(N,z);var h={_3:P,lM:p,_6:hI.VB(O.Md.v.BlnM),LE:O.Opct.v.val/100};i.type[u].push(h);i.all.push(h)}if(u=="ebbl"){var j=!1;
|
|
if(j)console.log(O);var C=Date.now(),V=O.bvlS.v.BESl;if(V=="strokeEmboss"){var d=$.frameFXMulti.v;if(d.length==0)continue;
|
|
d=d[0].v;if(!d.enab.v)continue;var m=d.Styl.v.FStl;if(m=="OutF")V="OtrB";if(m=="CtrF")V="Embs";if(m=="InsF")V="InrB"}var c=O.blur.v.val;
|
|
if(c==0)c=.7;if(V=="Embs"||V=="PlEb")c/=2;var R=["OtrB","InrB","Embs","PlEb","strokeEmboss"],g=["SfBL","PrBL","Slmt"],S=["In","Out"],F=O.bvlT.v.bvlT!="SfBL"?c:c*.45,q=Math.round(c),W=X.rect().clone(),Z=W.clone();
|
|
Z.Mi(q,q);var I=Z.d,_=Z.w,cN=I*_,ce=L.G(cN);L.pg(X.aP(),W,ce,Z);var gf=new Float64Array(cN),K=new Float64Array(cN);
|
|
L.style.Mp(ce,gf,I,_);L.lY(ce);L.style.Mp(ce,K,I,_);if(j)console.log("distTransform computed",Date.now()-C);
|
|
for(var f=0;f<cN;f++)K[f]=K[f]-gf[f];for(var f=0;f<cN;f++){var cv=K[f];if(cv<-F)K[f]=-F;else if(cv>F)K[f]=F}if(j)console.log("summing + cropping",Date.now()-C);
|
|
if(O.bvlT.v.bvlT=="SfBL"){var f0=Math.pow(c*.21,1.22);if(!0)f0=Math.max(f0,2);var i8=L.Ja.XW(f0,2);L.Ja.Jf(K,gf,Z,i8[0]>>>1);
|
|
L.Ja.Jf(gf,K,Z,i8[1]>>>1)}if(j)console.log("blurring",Date.now()-C);var b5=K,iC=b5.slice(0);if(O.useShape.v){var an=Math.min(100,O.Inpr.v.val+1)/100;
|
|
if(V!="OtrB"&&V!="InrB")an=1;var cO=L.sE.$O(O.MpgS.v.Crv.v,2e3),bh=Math.round(2e3/an);cO=L.sE.ah$(cO,bh,V=="InrB");
|
|
var bD=.5/F;for(var f=0;f<cN;f++){var fq=b5[f],fO=.99999*(fq+F)*bD;b5[f]=-F+2*F*cO[~~(fO*(bh-1))]}if(j)console.log("applying shape",Date.now()-C)}if(O.useTexture.v){var g6=L.G(I*_*4);
|
|
fW.hb(O,g6,Z,E,o);var hM=L.G(I*_);L.h$(g6,hM);var d3=L.G(I*_);L.Ja.es(hM,d3,Z,1);hM=d3;var h9=c*O.textureDepth.v.val*(1/100)*(1/255);
|
|
if(O.InvT.v)h9=-h9;for(var f=0;f<cN;f++)b5[f]+=-h9*hM[f];if(j)console.log("applying texture",Date.now()-C)}var cs=(O.bvlT.v.bvlT=="SfBL"?1:.5)*(O.bvlD.v.BESs=="In"?1:-1)*O.srgR.v.val/100;
|
|
for(var f=0;f<cN;f++)b5[f]*=cs;if(j)console.log("scaling",Date.now()-C);var dv=O.uglg&&O.uglg.v?E.ou():O.lagl.v.val;
|
|
dv=dv*(Math.PI/180);var ec=O.uglg&&O.uglg.v?E.RS():O.Lald.v.val;ec=ec*(Math.PI/180);var gT=Math.cos(dv)*Math.cos(ec),iz=-Math.sin(dv)*Math.cos(ec),gw=Math.sin(ec),iI=new Float64Array(cN),g2=new Float64Array(cN),bb=V=="PlEb";
|
|
for(var ir=0;ir<_;ir++)for(var dG=0;dG<I;dG++){var f=ir*I+dG,gY=0,e6=0,fr=1;if(ir!=0&&ir!=_-1&&dG!=0&&dG!=I-1){var bt=b5[f-I-1],cx=b5[f-I+1],ci=b5[f+I-1],gv=b5[f+I+1];
|
|
gY=-.125*(cx+2*b5[f+1]+gv-(bt+2*b5[f-1]+ci));e6=-.125*(ci+2*b5[f+I]+gv-(bt+2*b5[f-I]+cx))}else{var gu=b5[f];
|
|
e6=-(ir==0?b5[f+I]-gu:ir==_-1?gu-b5[f-I]:.5*(b5[f+I]-b5[f-I]));gY=-(dG==0?b5[f+1]-gu:dG==I-1?gu-b5[f-1]:.5*(b5[f+1]-b5[f-1]))}var ak=1/Math.sqrt(gY*gY+e6*e6+1);
|
|
gY*=ak;e6*=ak;fr*=ak;var hP=gY*gT+e6*iz+fr*gw,ai=hP;if(bb)ai=-gY*gT-e6*iz+fr*gw;if(hP>0)iI[f]=hP;if(ai>0)g2[f]=ai}if(j)console.log("raycasting",Date.now()-C);
|
|
if(O.Sftn.v.val!=0){L.Ja.YK(iI,gf,Z,O.Sftn.v.val*.43);var hK=gf,gf=iI,iI=hK;if(bb){L.Ja.YK(g2,gf,Z,O.Sftn.v.val*.43);
|
|
var hK=gf,gf=g2,g2=hK}else L.w0(iI,g2)}if(j)console.log("softening",Date.now()-C);var cO=L.sE.$O(O.TrnS.v.Crv.v,1024);
|
|
for(var f=0;f<cN;f++){iI[f]=cO[~~(iI[f]*1024)];g2[f]=cO[~~(g2[f]*1024)]}if(j)console.log("contour remap",Date.now()-C);
|
|
I=Math.round(I);_=Math.round(_);var h3=L.G(I*_*4);fW.mk(h3,O.hglC.v);var e4=L.G(I*_*4);fW.mk(e4,O.sdwC.v);
|
|
var co=L.G(I*_*4);fW.mk(co,O.hglC.v);var aO=L.G(I*_*4);fW.mk(aO,O.sdwC.v);var cC=1/gw,hm=1/(1-gw),bD=1/F,cu=new Float64Array(1e3);
|
|
for(var f=0;f<1e3;f++)cu[f]=Math.pow(f*.001,.2);for(var ir=0;ir<_;ir++)for(var dG=0;dG<I;dG++){var f=ir*I+dG,bF=4*f+3,fH=0,dX=0;
|
|
fH=iI[f];dX=g2[f];var fk=Math.max(0,Math.min(.9999,(iC[f]+F*.993)*bD));fk=cu[Math.floor(fk*1e3)];var ix=fk*(1-Math.min(1,fH*cC)),bx=fk*(1-Math.min(1,(1-fH)*hm)),ha=fk*(1-Math.min(1,dX*cC)),ca=fk*(1-Math.min(1,(1-dX)*hm));
|
|
e4[bF]=Math.round(255*ix);h3[bF]=Math.round(255*bx);aO[bF]=Math.round(255*ha);co[bF]=Math.round(255*ca)}if(j)console.log("baking textures",Date.now()-C);
|
|
Z=X.rect().clone();Z.Mi(q,q);Z.offset(N,z);var iX={aon:O.bvlS.v.BESl=="strokeEmboss"};if(["InrB","Embs","PlEb"].indexOf(V)!=-1){iX.hh={_3:h3,lM:Z,_6:hI.VB(O.hglM.v.BlnM),LE:O.hglO.v.val/100};
|
|
iX.aj={_3:e4,lM:Z,_6:hI.VB(O.sdwM.v.BlnM),LE:O.sdwO.v.val/100};i.all.push(iX.hh,iX.aj)}if(["OtrB","Embs","PlEb"].indexOf(V)!=-1){iX.HV={_3:co,lM:Z,_6:hI.VB(O.hglM.v.BlnM),LE:O.hglO.v.val/100};
|
|
iX.Zc={_3:aO,lM:Z,_6:hI.VB(O.sdwM.v.BlnM),LE:O.sdwO.v.val/100};i.all.push(iX.HV,iX.Zc)}if(j)console.log(Date.now()-C);
|
|
i.type[u].push(iX)}if(u=="patternFill"){var dp=X.rect(),P=L.G(dp.Y()*4);fW.hb(O,P,dp,E,o);var p=dp.clone();
|
|
p.offset(N,z);var h={_3:P,lM:p,_6:hI.VB(O.Md.v.BlnM),LE:O.Opct.v.val/100};i.type[u].push(h);i.all.push(h)}if(u=="ChFX"){var P=L.G(X.aP().length*4);
|
|
fW.mk(P,O.Clr.v);var c=O.blur.v.val,dd=X.rect().clone();dd.Mi(c,c);var iD=L.G(dd.Y()),iY=L.G(dd.Y());
|
|
L.pg(X.aP(),X.rect(),iY,dd);L.Ja.Yy(iY,iD,dd,c*.43);var ho=L.sE.JI(O.MpgS.v.Crv.v,256,!0);L.$m(iD,ho);
|
|
var bN=L.G(X.aP().length),it=L.G(X.aP().length),j4=X.rect().clone();fW.JX(j4,O,E,0);L.pg(iD,dd,bN,j4);
|
|
j4=X.rect().clone();fW.JX(j4,O,E,Math.PI);L.pg(iD,dd,it,j4);var gy=bN.length;for(var f=0;f<gy;f++)P[4*f+3]=Math.abs(bN[f]-it[f]);
|
|
if(O.Invr.v)for(var f=0;f<gy;f++)P[4*f+3]=255-P[4*f+3];var p=X.rect().clone();p.offset(N,z);var h={_3:P,lM:p,_6:hI.VB(O.Md.v.BlnM),LE:O.Opct.v.val/100};
|
|
i.type[u].push(h);i.all.push(h)}if(u=="OrGl"){var l;if(O.GlwT.v.BETE=="SfBL")l=X.rq(G,c-G,!0);else l=X.Dm(c,B,!0);
|
|
var v=l.aP,p=l.uL,fi=v.slice(0);fW.qO(v,O);var P=L.G(p.Y()*4);if(O.Grad==null){fW.mk(P,O.Clr.v);fW.Lm(v,O,!1)}else{fW.Lm(v,O,null);
|
|
var hN={kt:v,vN:255,a6:0,rc:p};fW.G0(O,P,p,E,hN);var b4=O.Nose.v.val/100,eN=p.d;for(var f=0;f<fi.length;
|
|
f++){var hX=255,fh=fi[f];if(fh<32){var a5=(fh+fi[f-1]+fi[f+1]+fi[f-eN]+fi[f+eN])*.2-1;hX=Math.min(255,Math.round(Math.max(0,a5)*8))}v[f]=hX}fW.$N(v,O)}L.aM(v,P,3);
|
|
p.offset(N,z);var h={_3:P,lM:p,_6:hI.VB(O.Md.v.BlnM),LE:O.Opct.v.val/100};i.type[u].push(h);i.all.push(h)}if(u=="IrGl"){var l;
|
|
if(O.GlwT.v.BETE=="SfBL")l=X.rq(G,c-G,!1);else l=X.Dm(c,B,!1);var v=l.aP,p=l.uL;fW.qO(v,O);if(O.glwS.v.IGSr=="SrcC")L.lY(v);
|
|
var P=L.G(p.Y()*4);if(O.Grad==null){fW.mk(P,O.Clr.v);fW.Lm(v,O,!0)}else{fW.Lm(v,O,null);var hN={kt:v,vN:255,a6:0,rc:p};
|
|
fW.G0(O,P,p,E,hN);v.fill(255);fW.$N(v,O)}L.aM(v,P,3);p.offset(N,z);var h={_3:P,lM:p,_6:hI.VB(O.Md.v.BlnM),LE:O.Opct.v.val/100};
|
|
i.type[u].push(h);i.all.push(h)}if(u=="FrFX"){var aT=fW.nl(O),aZ=aT[0],eA=aT[1],p=X.rect().clone(),c0=null,h7=null;
|
|
p.Mi(Math.ceil(A),Math.ceil(A));if(eA>0){var l=X.rq(eA,0,!0);h7=l.aP;if(h7.length<p.Y()){h7=L.G(p.Y());
|
|
L.pg(l.aP,l.uL,h7,p)}}if(aZ>0){var l=X.rq(aZ,0,!1);c0=L.G(p.Y());c0.fill(255);L.pg(l.aP,l.uL,c0,p)}p.offset(N,z);
|
|
var P=L.G(p.Y()*4),dS=O.PntT.v.FrFl;if(dS=="SClr")fW.mk(P,O.Clr.v);if(dS=="GrFl")fW.G0(O,P,p,E,X.akp(aZ,eA));
|
|
if(dS=="Ptrn")fW.hb(O,P,p,E,o);var h={_3:P,lM:p,_6:hI.VB(O.Md.v.BlnM),LE:O.Opct.v.val/100,bR:h7,IF:c0};
|
|
i.type[u].push(h);i.all.push(h)}}}return i};fW.hl=function($){var o=1/Math.sqrt($.x*$.x+$.y*$.y+$.nc*$.nc);
|
|
$.x*=o;$.y*=o;$.nc*=o};fW.AT=function($,o){return{x:$.y*o.nc-$.nc*o.y,y:$.nc*o.x-$.x*o.nc,nc:$.x*o.y-$.y*o.x}};
|
|
fW.aqC=function($,o){return $.x*o.x+$.y*o.y+$.nc*o.nc};fW.$N=function($,o){var T=o.Nose.v.val/100;if(T>0)for(var f=0;
|
|
f<$.length;f++){var s=$[f];s=Math.min(510-(1+T)*L.style.Po(f),s);$[f]=s}};fW.Yk=function($){var o=fW.gs(),T=$.so,s=!1;
|
|
for(var f=0;f<32;f+=8)if(T[f]+T[f+1]+T[4]+T[5]!=0||T[f+2]+T[f+3]+T[6]+T[7]!=1020)s=!0;if(s){T=T.slice(0);
|
|
for(var f=0;f<40;f+=4){var E=T[f]/255,e=T[f+1]/255,n=T[f+2]/255,A=T[f+3]/255;T[f]=E-1e-4;T[f+1]=E==e?1e9:1/(e-(E-1e-4));
|
|
T[f+2]=n==A?-1e9:1/(n-(A+1e-4));T[f+3]=A+1e-4}}var u=$.add.iOpa!=null?$.add.iOpa/255:o.fill,Y=$.add.vstk;
|
|
if(Y&&!Y.fillEnabled.v&&(!Y.strokeEnabled.v||Y.strokeStyleLineWidth.v.val==0))u=0;return{fill:u,Kf:s?T:null,KP:$.add.brst!=null?$.add.brst:o.KP,aoI:$.add.knko!=null?$.add.knko:o.aoI,style:!1,xX:!1}};
|
|
fW.gs=function(){return{fill:1,Kf:null,KP:[1,1,1],aoI:0,style:!1,xX:!1}};fW.OA=function($,o){if(o==null)return null;
|
|
var T=$.Idnt.v,s=null;for(var f=0;f<o.length;f++)if(o[f].id==T)return o[f];return null};fW.eX=function($,o,T){var s=["patternFillMulti","ebblMulti","frameFXMulti"];
|
|
for(var f=0;f<s.length;f++){var E=$.v[s[f]].v;for(var e=0;e<E.length;e++)if(E[e].v.Ptrn)o.Af(fW.OA(E[e].v.Ptrn.v,T))}};
|
|
fW.alu=function($,o,T){var s=["patternFillMulti","ebblMulti","frameFXMulti"];for(var f=0;f<s.length;
|
|
f++){var E=$.v[s[f]].v;for(var e=0;e<E.length;e++)if(E[e].v.Ptrn){var n=E[e].v.Ptrn.v,A=fW.OA(n,T),u=fW.OA(n,o.add.Patt);
|
|
if(A==null&&u)T.push(u)}}};fW.hb=function($,o,T,s,E){var e=fW.OA($.Ptrn.v,s.add.Patt);if(e!=null&&!T.p4()){var n=e.i2,A=n[0],u=n[1],Y=0;
|
|
L.mc(n);var b=$.Scl.v.val/100;while((b<.3||b==.5)&&n[Y+2]){b*=u.d/n[Y+3].d;Y+=2;A=n[Y];u=n[Y+1]}var a=L.scale.hb(A,u.d,u.w),w=-T.x+$.phase.v.Hrzn.v-1,X=-T.y+$.phase.v.Vrtc.v-1;
|
|
if($.Algn!=null&&!$.Algn.v){}else{w+=E.x;X+=E.y}L.scale.S7(a,o,T.d,T.w,b,b,w+1,X+1)}};fW.G0=function($,o,T,s,E,e){if(e==null)e=T;
|
|
var n=$.Type?$.Type.v.GrdT:"shapeburst",A=$.Algn&&$.Algn.v?e:new df(0,0,s.d,s.w),u=$.Angl?L.h.Vq($,A):[new aY(0,0),new aY(100,0)],Y=u[0].x,b=u[0].y,a=u[1].x-Y,w=u[1].y-b,X=Math.sqrt(a*a+w*w);
|
|
X=1/(2*X*X);var N=[a*X,w*X,-w*X,a*X],z=$.Rvrs?$.Rvrs.v:!1,i=$.Dthr?$.Dthr.v:!1;L.h.Xo($.Grad.v,o,T,N,Y,b,z,ev.h.types.indexOf(n),0,0,E,i)};
|
|
fW.a4y=function($,o){for(var f=0;f<$.all.length;f++){var T=$.all[f];T.r3=T.lM.clone();T.r3.offset(o.x,o.y)}};
|
|
fW.YJ=function($,o,T,s,E,e){var n=y.re?fW.y$:fW.wD;fW.a4y(o,T);var A=o.type.DrSh;for(var f=0;f<A.length;
|
|
f++)if(!A[f].a5K)n(A[f],s,E,e)};fW.ZW=function($,o,T,s,E,e,n,A,u,Y){var b=T,a=y.re?fW.y$:fW.wD,w=y.re?y.R.J4:L.R.Cu,X;
|
|
X=o.type.DrSh;for(var f=0;f<X.length;f++)if(X[f].a5K)a(X[f],s,E,e);X=o.type.OrGl;for(var f=0;f<X.length;
|
|
f++)a(X[f],s,E,e);var N="patternFill GrFl SoFi ChFX IrGl IrSh".split(" ");for(var z=0;z<N.length;z++){var X=o.type[N[z]];
|
|
for(var f=0;f<X.length;f++)a(X[f],n,b,e)}var i=o.type.ebbl[0],k=i!=null&&i.aon;X=o.type.FrFX;for(var f=0;
|
|
f<X.length;f++){var Q=X[f];h$.D5.pg(A,Y,u,Y,e);a(Q,u,Y,e);if(k&&f==X.length-1){if(i.Zc)a(i.Zc,u,Y,e);
|
|
if(i.HV)a(i.HV,u,Y,e);if(i.aj)a(i.aj,u,Y,e);if(i.hh)a(i.hh,u,Y,e)}if(Q.IF||Q.vh)w(u,Y,n,b,y.re?Q.vh:Q.IF,Q.r3,0,e,1);
|
|
if(Q.bR||Q.Bl)w(u,Y,s,E,y.re?Q.Bl:Q.bR,Q.r3,0,e,1)}if(!k&&i!=null){if(i.Zc)a(i.Zc,s,E,e);if(i.HV)a(i.HV,s,E,e);
|
|
if(i.aj)a(i.aj,n,b,e);if(i.hh)a(i.hh,n,b,e)}};fW.wD=function($,o,T,s){var E=fW.gs();E.fill=$.LE;E.style=!0;
|
|
L.R.xE($._6,$._3,$.r3,o,T,s,1,E)};fW.y$=function($,o,T,s){var E=fW.gs();E.fill=$.LE;E.style=!0;y.R.vn($._6,$.kj,$.r3,o,T,s,1,E)};
|
|
fW.qO=function($,o){var T=1-o.Inpr.v.val/100,s=1+Math.tan(T*(Math.PI/2)),E=$.length;for(var f=0;f<E;
|
|
f++)$[f]=Math.min(255,Math.round($[f]*s))};fW.Lm=function($,o,T){var s=o.blur.v.val,E=Math.round(s*(o.Ckmt.v.val/100));
|
|
if(s>E){var e=L.sE.JI(o.TrnS.v.Crv.v,256,!0);L.$m($,e)}if(T!=null&&o.Nose.v.val>0)L.style.Wx($,o.Nose.v.val/100,T)};
|
|
fW.mk=function($,o,T){if(T==null)T=255;var s=L.h.Qc(o),E=T<<24|s.P<<16|s.m<<8|s.i,e=new Uint32Array($.buffer);
|
|
e.fill(E)};fW.JX=function($,o,T,s){var E=o.uglg&&o.uglg.v?T.ou():o.lagl.v.val;E=E*Math.PI/180+s;var e=Math.cos(E)*o.Dstn.v.val,n=Math.sin(E)*o.Dstn.v.val;
|
|
$.x-=Math.round(e);$.y+=Math.round(n)};fW.oU=function($){if($==null)return null;var o=$.frameFXMulti.v;
|
|
if(o.length==0)return null;o=o[0].v;var T=JSON.parse(JSON.stringify(ev.ci.default));fW.HN(o,T);return T};
|
|
fW.HN=function($,o){var T=ev.stroke.O2.indexOf($.PntT.v.FrFl),s=[ev.k9,ev.cw,ev.SZ][T],E=o.strokeStyleContent.v={classID:ev.ci.RG[T]};
|
|
for(var f=0;f<s.length;f++)E[s[f]]=$[s[f]];o.strokeEnabled=$.enab;o.strokeStyleLineWidth=$.Sz;o.strokeStyleLineAlignment.v.strokeStyleLineAlignment=ev.ci.k0[ev.stroke.types.indexOf($.Styl.v.FStl)];
|
|
o.strokeStyleOpacity=$.Opct;o.strokeStyleBlendMode=$.Md};fW.FG=function($,o){var T=[];for(var f=0;f<$.length;
|
|
f++)T.push({t:"UntF",v:{type:"#Nne",val:Math.round($[f]*o)}});return T};fW.p5=function($,o,T,s){this.hF=o.clone();
|
|
this.agr=o.clone();this.agr.Mi(T,T);if(s){this.hF.Mi(1,1);this.PC=L.G(this.hF.Y());L.pg($,o,this.PC,this.hF)}else this.PC=$;
|
|
this.x_=null;this.k1=null;this.ld=null};fW.p5.prototype.aP=function(){return this.PC};fW.p5.prototype.rect=function(){return this.hF};
|
|
fW.p5.prototype.lD=function(){return this.agr};fW.p5.prototype.eP=function(){if(this.x_)return this.x_;
|
|
this.x_=this.aP().slice(0);L.lY(this.x_);return this.x_};fW.p5.prototype.Vv=function(){if(this.k1)return this.k1;
|
|
this.k1=new Float64Array(this.rect().Y());L.style.Mp(this.eP(),this.k1,this.rect().d,this.rect().w);
|
|
return this.k1};fW.p5.prototype.Aq=function(){if(this.ld)return this.ld;var $=this.lD(),o=L.G($.Y());
|
|
L.pg(this.aP(),this.rect(),o,$);this.ld=new Float64Array($.Y());L.style.Mp(o,this.ld,$.d,$.w);return this.ld};
|
|
fW.p5.prototype.akp=function($,o){var T={vN:-o,a6:$,rc:null,kt:null};if(o==0){T.rc=this.rect();T.kt=this.Vv();
|
|
return T}var s=this.Aq().slice(0),E=this.lD();T.rc=E;T.kt=s;for(var f=0;f<s.length;f++)s[f]=-s[f];if($==0)return T;
|
|
var e=this.Vv(),n=this.rect();for(var A=0;A<n.w;A++)for(var u=0;u<n.d;u++){var Y=A*n.d+u,b=(A+n.y-E.y)*E.d+u+n.x-E.x;
|
|
s[b]+=e[Y]}return T};fW.p5.prototype.rq=function($,o,T){var s=Math.ceil($+o),E={uL:this.rect().clone(),aP:null};
|
|
E.uL.Mi(s,s);E.aP=L.G(E.uL.Y());if($==0&&o==0)L.w0(T?this.aP():this.eP(),E.aP);else{var e=L.G(E.uL.Y());
|
|
L.pg(this.aP(),this.rect(),e,E.uL);if(!T)L.lY(e);if($!=0){if(T)L.style.EE(e,E.uL,this.Aq(),this.lD(),$);
|
|
else L.style.EE(e,E.uL,this.Vv(),this.rect(),$)}if(o!=0)L.Ja.Yy(e,E.aP,E.uL,Math.max(1,o*.43));else E.aP=e}return E};
|
|
fW.p5.prototype.Dm=function($,o,T){var s=$*(o-.5),E={uL:this.rect().clone(),aP:null};if(T)E.uL.Mi($,$);
|
|
E.aP=L.G(E.uL.Y());var e=E.uL.d,n=E.uL.w,A=T?this.Aq():this.Vv(),u=T?this.lD():this.rect(),Y=E.uL,b=Y.Sr(u),e=b.d,n=b.w,a=b.x-Y.x,w=b.y-Y.y,X=b.x-u.x,N=b.y-u.y,z=1-o*2;
|
|
for(var i=0;i<n;i++)for(var k=0;k<e;k++){var Q=A[(i+N)*u.d+k+X],O=Q/$;E.aP[(i+w)*Y.d+k+a]=Math.max(0,Math.min(255,255-255*((O+z)/(1+z))))}return E};
|
|
fW.yb=function($,o,T){var s=$.Lefx,E=$.blendOptions;if(s){var e=o.add.lmfx;if(T==null)T=e?e.Scl.v.val:100;
|
|
o.add.lmfx=JSON.parse(JSON.stringify(s.v));if(o.add.lmfx.Scl==null)o.add.lmfx.Scl={t:"UntF",v:{type:"#Prc",val:100}};
|
|
fW.XF(o.add.lmfx,T/o.add.lmfx.Scl.v.val);if(e)o.add.lmfx.Scl.v.val=e.Scl.v.val}else delete o.add.lmfx;
|
|
if(E){E=E.v;if(E.Md)o.fh=hI.VB(E.Md.v.BlnM);if(E.Opct)o.opacity=Math.round(E.Opct.v.val*255/100);if(E.fillOpacity)o.add.iOpa=Math.round(E.fillOpacity.v.val*255/100);
|
|
if(E.Blnd){var n=[];for(var f=0;f<10;f++)n.push(0,0,255,255);var A=E.Blnd.v,u="SrcB Srcl SrcW Srcm DstB Dstl DstW Dstt".split(" ");
|
|
for(var f=0;f<A.length;f++){var Y=A[f].v,b=8*["Gry","Rd","Grn","Bl"].indexOf(Y.Chnl.v[0].v.enum);for(var a=0;
|
|
a<8;a++){n[b+a]=Y[u[a]].v}}o.so=n}}};fW.yh=function($){var o="SrcB Srcl SrcW Srcm DstB Dstl DstW Dstt".split(" "),T=[],s=$.so;
|
|
for(var f=0;f<4;f++){var E=f*8;if(s[E]+s[E+1]+s[E+4]+s[E+5]==0&&s[E+2]+s[E+3]+s[E+6]+s[E+7]==4*255)continue;
|
|
var e={t:"Objc",v:{classID:"Blnd",Chnl:{t:"obj ",v:[{t:"Enmr",v:{classID:"Chnl",typeID:"Chnl",enum:["Gry","Rd","Grn","Bl"][f]}}]}}};
|
|
T.push(e);for(var n=0;n<8;n++)e.v[o[n]]={t:"long",v:s[f*8+n]}}var A={classID:"blendOptions"};if($.fh!="norm")A.Md={t:"enum",v:{BlnM:hI.$j($.fh)}};
|
|
if($.opacity!=255)A.Opct={t:"UntF",v:{type:"#Prc",val:Math.round($.opacity*100/255)}};if($.add.iOpa!=null)A.fillOpacity={t:"UntF",v:{type:"#Prc",val:Math.round($.add.iOpa*100/255)}};
|
|
if(T.length!=0)A.Blnd={t:"VlLs",v:T};var u={xz:{classID:"null",Idnt:{t:"TEXT",v:iG.IP()+"-bd9f-11d5-b8ba-b73f8571793d"},Nm:{t:"TEXT",v:"Custom Style"}},h2:{classID:"Styl",blendOptions:{t:"Objc",v:A}}},Y=$.add.lmfx;
|
|
if(Y)u.h2.Lefx={t:"Objc",v:Y};return u};function a8(){}a8.Qz=function($){return JSON.parse(JSON.stringify($))};
|
|
a8.it=function($){var o=a8.Qz(a8.aq_),T=o.Brsh.v;if($!=null){delete T.Hrdn;T.classID="sampledBrush";
|
|
T.Nm={t:"TEXT",v:"layer.png"},T.sampledData={t:"TEXT",v:$}}return o};a8.aq_={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}};
|
|
a8.hl={};a8.hl.check=function($){var o=a8.hl.Lx;for(var f=0;f<o.length;f++)if($[o[f]]==null)$[o[f]]=JSON.parse(a8.hl.$S[o[f]]);
|
|
var T=[];for(var f=0;f<o.length;f++)T.push(o[f]);var s=a8.hl.H4;for(var f=0;f<s.length;f++){var E=s[f][0],e=s[f][1],n=!0;
|
|
for(var A=0;A<E.length;A++)n=n&&$[E[A]].v==!0;if(n)for(var A=0;A<e.length;A++){if($[e[A]]==null)console.log("Missing conditional parameter "+e[A]);
|
|
else T.push(e[A])}}for(var u in $)if(T.indexOf(u)==-1)console.log("Extra parameter "+u);$=$.Brsh.v;o=a8.hl.On.Lx;
|
|
for(var f=0;f<o.length;f++)if($[o[f]]==null)$[o[f]]=JSON.parse(a8.hl.On.$S[o[f]]);T=[];for(var f=0;f<o.length;
|
|
f++)if($[o[f]])T.push(o[f]);else console.log("Missing default parameter "+o[f]);s=a8.hl.On.ahT[$.classID];
|
|
for(var f=0;f<s.length;f++)if($[s[f]]==null&&s[f]!="dtipsGridSize"&&s[f]!="dtipsErodibleTipHeightMap"&&$.ahU!=1)console.log("Missing conditional parameter "+s[f]);
|
|
else T.push(s[f]);for(var u in $)if(T.indexOf(u)==-1)console.log("Extra parameter "+u)};a8.hl.b4=function($){var o=a8.hl.H4;
|
|
for(var f=0;f<o.length;f++){var T=o[f][0],s=o[f][1],E=!0;for(var e=0;e<T.length;e++)E=E&&$[T[e]]&&$[T[e]].v==!0;
|
|
if(E){for(var e=0;e<s.length;e++)if($[s[e]]==null){$[s[e]]=JSON.parse(a8.hl.$S[s[e]])}}else for(var e=0;
|
|
e<s.length;e++)if($[s[e]]!=null){delete $[s[e]]}}};a8.hl.On={};a8.hl.On.Lx="classID Dmtr Angl Spcn Intr flipX flipY".split(" ");
|
|
a8.hl.On.$S={flipX:"{\"t\":\"bool\",\"v\":false}",flipY:"{\"t\":\"bool\",\"v\":false}"};a8.hl.On.ahT={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(" ")};
|
|
a8.hl.H4=[[["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"]]];
|
|
a8.hl.Lx="classID Nm Brsh useTipDynamics usePaintDynamics useColorDynamics useScatter useTexture useBrushSize useBrushPose Wtdg Nose Rpt dualBrush brushGroup".split(" ");
|
|
a8.hl.$S={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 ds($,o){this.a6W=$;this.VN=o==null?0:o;this.dir=0}ds.prototype.$Z=function($,o){var T=this.a6W,s=new aY($.x-T.x,$.y-T.y),E=new fY;
|
|
E.rotate(-this.VN);s=E.bb(s);if(this.dir==0&&!T.R1($))this.dir=Math.abs(s.x)<Math.abs(s.y)?1:2;if(o.L(dN.Et)){if(this.dir==1)s.x=0;
|
|
if(this.dir==2)s.y=0}E.lY();s=E.bb(s);var e=new aY(T.x+s.x,T.y+s.y);return e};function ih($,o,T,s,E,e,n,A){this.Ou=o;
|
|
this.A0=T;this.GR=e;this.n4=s;if(s.Ya==null)s.Ya=[!1,!0];this.Tz=null;this.zg=null;this.qR=0;this.a1l=0;
|
|
this.am7=0;this.XZ=0;this.dh=0;this.adU=n;this.Sg=new df;this.sS=new df;this.rect=new df;if(A!=null){this._3=A}else{var u=ih.aF;
|
|
if(u.length!=n.Y()*4)u=L.G(n.Y()*4);else u.fill(0);this._3=ih.aF=u}this.rect=n.clone();this.TA=[];this.gf=[];
|
|
this.dF=null;this.z4=0;this.P=null;this.uj="";this.dS=null;this.ZG($,E)}ih.aF=L.G(16);ih.prototype.ZG=function($,o){this.z4=o;
|
|
this.P=$;this.uj=JSON.stringify($)+JSON.stringify(this.n4.$t);this.dS=ih.ai1($,this.Ou,this.A0)};ih.prototype.moveTo=function($,o,T){T=this.SI(T);
|
|
this.qR=T;var s=new aY($,o),E=this.P.Brsh.v.Dmtr.v.val;this.Tz=s.clone();this.zg=s.clone();this.dF=s.clone();
|
|
this.TA=[$,o];this.gf=[T];var e=this.n4.Ya;if(this.n4.ms!=ih.FS)this.Cx(this._l(s,this.Lv()*(e[1]?T:1),this.n4.yV*(e[0]?T*.5:1),new aY(0,0)));
|
|
this.XZ=s.clone()};ih.prototype.lineTo=function($,o,T){T=this.SI(T);var s=this.TA,E=s.length,e=s[E-2],n=s[E-1];
|
|
if($==e&&o==n)return;var A=this.P.Brsh.v.Dmtr.v.val,u=Math.ceil(A)+1,Y=new df(Math.round(e),Math.round(n),0,0);
|
|
Y.Mi(u,u);var b=new df(Math.round($),Math.round(o),0,0);b.Mi(u,u);this.oI(Y.BZ(b));this.TA.push($,o);
|
|
this.gf.push(T);E+=2;if(E>=6)this.Cx(this.dK(E))};ih.prototype.SI=function($){if($==null)$=1;$=Math.max(.05,Math.min(5,$));
|
|
if(isNaN($)){alert("Pressure is not a number");throw"e"}return $};ih.prototype.Cx=function($){this.Sg=$;
|
|
this.sS=this.sS.BZ($)};ih.prototype.finish=function(){var $=this.TA,o=$.length,T;if(o==4)T=this.Zn($[o-2],$[o-1],this.gf[(o>>1)-1],!0);
|
|
if(o>4)T=this.dK(o+2);if(T)this.Cx(T)};ih.prototype.dK=function($){var o=this.TA,T=this.gf,s=o[$-6],E=o[$-5],e=o[$-4],n=o[$-3],A=T[($>>1)-3],u=T[($>>1)-2],Y=new aY(0,0),b=new aY(0,0);
|
|
if(8<=$)Y=ih.da(o[$-8],o[$-7],s,E,e,n);if($<=o.length)b=ih.da(o[$-2],o[$-1],e,n,s,E);var a=s+Y.x,w=E+Y.y,X=e+b.x,N=n+b.y,z=new df;
|
|
for(var f=0;f<10;f++){var i=(f+1)*.1,k=1-i,Q=k*k*k*s+3*i*k*k*a+3*i*i*k*X+i*i*i*e,O=k*k*k*E+3*i*k*k*w+3*i*i*k*N+i*i*i*n,c=this.Zn(Q,O,A+i*(u-A));
|
|
z=z.BZ(c)}return z};ih.da=function($,o,T,s,E,e){var n=$-T,A=o-s,u=E-T,Y=e-s,b=Math.sqrt(n*n+A*A),a=Math.sqrt(u*u+Y*Y),w=Math.acos((n*u+A*Y)/(b*a))/Math.PI,X=.35,N=.1;
|
|
w=N+w*(X-N);var z=E-$,i=e-o,k=Math.sqrt(z*z+i*i),Q=w*a/k;return new aY(z*Q,i*Q)};ih.prototype.Zn=function($,o,T,s){var E=new df,e=this.n4.apk;
|
|
if(e==null)e=0;if(e==0||s){E=this._W($,o,T);return E}var n=this.dF,A=$-n.x,u=o-n.y,Y=Math.sqrt(A*A+u*u);
|
|
A/=Y;u/=Y;if(Y>e){var b=n.x+A*(Y-e),a=n.y+u*(Y-e);E=this._W(b,a,T);this.dF.A5(b,a)}return E};ih.prototype._W=function($,o,T){var s=new df,E=new aY($,o),e=this.P.Brsh.v.Dmtr.v.val,n=this.n4.ms,A=E.V4(this.zg);
|
|
A.normalize(1);var u=aY.Sa(this.zg,E),Y=-this.a1l,b=this.zg.clone(),a=this.n4.Ya;while(!0){var w=this.qR+(T-this.qR)*(Math.max(0,Y)/u),X=this.Lv()*(a[1]?w:1),N=this.a2M()*(X+this.am7)/2;
|
|
if(n==ih.FS)N=1;if(Y+N<u){Y+=N;var z=new aY(this.zg.x+A.x*Y,this.zg.y+A.y*Y),Q=1;if(n==ih.FS){var i=b.clone();
|
|
i.x+=A.x>0?1:-1;var k=b.clone();k.y+=A.y>0?1:-1;if(aY.Sa(i,z)<aY.Sa(k,z))z=i;else z=k;Y=aY.Sa(z,this.zg)}if(this.P.useScatter.v==!0){Q=this.P.Cnt.v;
|
|
var O=this.P.countDynamics.v.jitter.v.val/100,c=O*(-1+2*this.D9());Q+=Math.round(Q*c)}for(var f=0;f<Q;
|
|
f++){var B=this._l(z,X,this.n4.yV*(a[0]?w*.5:1),A);s=s.BZ(B)}b=z}else break}this.a1l=u-Y;this.zg=E;this.qR=T;
|
|
return s};ih.prototype.a2M=function(){var $=this.P.Brsh.v,o=$.Spcn.v.val,T=Math.max(5,$.Rndn.v.val);
|
|
return T/100*(o/100)};ih.prototype.Lv=function(){var $=this.P,o=$.Brsh.v.Dmtr.v.val;if($.useTipDynamics.v){var T=o*($.minimumDiameter.v.val/100);
|
|
o=T+(o-T)*(1-this.D9()*($.szVr.v.jitter.v.val/100))}return o};ih.prototype._l=function($,o,T,s){T=Math.min(1,T);
|
|
var E=this.P,e=this.P.Brsh.v,n=e.Dmtr.v.val,A=this.n4,u=A.ms,Y=A.ai3,b=new fY;b.translate(-this.dS.Q9.d/2,-this.dS.Q9.w/2);
|
|
b.scale(1/this.dS.a0j,1/this.dS.a0j);b.scale(o/n,o/n);b.scale(1,Math.max(5,e.Rndn.v.val)/100);if(E.useTipDynamics.v){var a=E.minimumRoundness.v.val/100;
|
|
b.scale(1,a+(1-a)*Math.round(100-this.D9()*E.roundnessDynamics.v.jitter.v.val)/100);b.rotate((-.5+this.D9())*4*Math.PI*(E.angleDynamics.v.jitter.v.val/100))}b.rotate(e.Angl.v.val*(Math.PI/180));
|
|
if(E.useScatter.v){var w=(-1+2*this.D9())*E.scatterDynamics.v.jitter.v.val/100;b.translate(-w*o*s.y,w*o*s.x)}b.translate($.x,$.y);
|
|
var X=this.ao3(b,$);this.oI(X.rect);var N=X.rect.clone();if(u==null){var z=this.Qc(E);L.wr(X.Bf,Math.round(z.P*255)<<16|Math.round(z.m*255)<<8|Math.round(z.i*255)<<0,4278190080);
|
|
if(this.sS.p4()&&this.rect.R1(X.rect)&&T==1)this._3=X.Bf.slice(0);else L.R.akH(X.Bf,X.rect,this._3,this.rect,X.rect,T)}if(u==ih.FS){var i=new aY(X.rect.x+X.rect.d/2,X.rect.y+X.rect.w/2),k=Math.round(i.x-this.XZ.x),Q=Math.round(i.y-this.XZ.y),O=X.rect.clone();
|
|
O.offset(-k,-Q);var c=O.Sr(this.rect);c.offset(k,Q);L.h9(this._3,this.rect,X.Bf,O);L.R.TH(X.Bf,X.rect,this._3,this.rect,X._D,X.rect,T)}if(u==ih.A1||u==ih.qT||u==ih.K1){var B=X.rect.Sr(this.rect),G;
|
|
if(B.R1(X.rect))G=X._D;else{G=L.G(B.Y());L.pg(X._D,X.rect,G,B)}var l=L.G(B.Y()*4);L.h9(this._3,this.rect,l,B);
|
|
if(u==ih.qT){var v=l.slice(0),p=L.TS.Hx([-1,-1,-1,-1,25,-1,-1,-1,-1]);L.TS.ls(l,v,B.d,B.w,p,0);L.w0(v,l)}else if(u==ih.K1){var P=iZ.o_("UnsM");
|
|
P.Amnt.v.val=15;P.Thsh.v=0;P.Rds.v.val=5;var v=L.G(l.length);iZ.AY("UnsM",{buffer:l,rect:B},P,0,0,{buffer:v,rect:B});
|
|
L.w0(v,l)}else{iZ.R7(1,L.Ja.yk,l,B)}L.R.TH(l,B,this._3,this.rect,G,B,T)}this.am7=o;this.XZ=i;return N};
|
|
ih.prototype.Qc=function($){var o=ih.u7(this.z4);if($.useColorDynamics&&$.useColorDynamics.v){var T=1-this.D9()*$.clVr.v.jitter.v.val/100,s=ih.u7(this.GR);
|
|
o.i=T*o.i+(1-T)*s.i;o.m=T*o.m+(1-T)*s.m;o.P=T*o.P+(1-T)*s.P;var E=(-.5+this.D9())*$.H.v.val/100,e=(-1+2*this.D9())*$.Strt.v.val/100,n=(-1+2*this.D9())*$.Brgh.v.val/100,A=L.sY(o.i,o.m,o.P);
|
|
A.cQ=(A.cQ+E+1)%1;A.rZ=A.rZ+e;if(A.rZ<0)A.rZ=-A.rZ;if(A.rZ>1)A.rZ=1-(A.rZ-1);A.ed=A.ed+n;if(A.ed<0)A.ed=-A.ed;
|
|
if(A.ed>1)A.ed=1-(A.ed-1);o=L.ag(A.cQ,A.rZ,A.ed)}return o};ih.prototype.hl=function($){return Math.max(0,Math.min(1,$))};
|
|
ih.prototype.D9=function(){this.dh++;return ih.hash(this.dh)};ih.u7=function($){return{i:($>>16&255)/255,m:($>>8&255)/255,P:($>>0&255)/255}};
|
|
ih.hash=function($){$=$^61^$>>16;$=$+($<<3);$=$^$>>4;$=$*668265261;$=$^$>>15;return($&16777215)/16777215};
|
|
ih.j5=[];ih.akG=function($,J){var o=$.jZ(),T=J.jZ();if(o<T){var s=o;o=T;T=s}var E=$.Ca-J.Ca,e=$.P-J.P,n=$.Z9-J.Z9,A=$.Um-J.Um;
|
|
return T!=0&&o-T<.025&&Math.max(E*E,e*e,n*n,A*A)<=.01};ih.prototype.ao3=function($,o){var T=null,e;for(var f=0;
|
|
f<ih.j5.length;f++)if(ih.j5[f].uj==this.uj){T=ih.j5[f];ih.j5.splice(f,1)}if(T==null)T={Nz:[],uj:this.uj,H1:0,Y:0};
|
|
var s=T.Nz,E=this.n4.$t;if(E){$=$.clone();$.Ry=Math.floor($.Ry);$.Es=Math.floor($.Es)}var n=ih.N4($.Ry,$.Es);
|
|
for(var f=0;f<s.length;f++){var A=s[f];if(!ih.akG(A.rI,$))continue;if(ih.ah_(A.tP,n)<.2||A.rect.Y()>2500){e=A;
|
|
break}}var u=Math.round(this.P.Brsh.v.Dmtr.v.val);if(e){e.rect.x=Math.round(e.FF.x-e.rI.Ry+$.Ry);e.rect.y=Math.round(e.FF.y-e.rI.Es+$.Es);
|
|
if(E){e.rect.x=Math.round(o.x-e.rect.d/2);e.rect.y=Math.round(o.y-e.rect.w/2)}e.H1=Date.now()}else{var Y;
|
|
if(E&&u<=3){Y={buffer:L.G(u*u*4),rect:new df(Math.round(o.x-u/2),Math.round(o.y-u/2),u,u)};L.wr(Y.buffer,4278190080)}else if($.Ca==1&&$.P==0&&$.Z9==0&&$.Um==1){Y={buffer:this.dS.Bf,rect:this.dS.Q9.clone()};
|
|
Y.rect.x=Math.round($.Ry);Y.rect.y=Math.round($.Es)}else Y=D.p.qh([this.dS.Bf,this.dS.Q9],$);if(E){for(var f=0;
|
|
f<Y.buffer.length;f++)Y.buffer[f]=Y.buffer[f]>127?255:0}if(Y==null)Y={buffer:L.G(0),rect:new df};var b=$.Ry-Math.floor($.Ry),a=$.Es-Math.floor($.Es);
|
|
e={Bf:Y.buffer,_D:L.G(Y.rect.Y()),rect:Y.rect,FF:Y.rect.clone(),rI:$,tP:ih.N4($.Ry,$.Es),H1:Date.now()};
|
|
L.Ge(e.Bf,e._D,3);s.push(e);T.Y+=Y.rect.Y();if(s.length>2e3||T.Y>100*100*400){console.log("pruning",T.Y,s.length);
|
|
s.sort(function(X,N){return N.H1-X.H1});while(s.length>1e3||T.Y>100*100*200){var w=s.pop();T.Y-=w.rect.Y()}}}T.Nz=s;
|
|
T.H1=Date.now();ih.j5.push(T);ih.j5.sort(function(X,N){return N.H1-X.H1});while(ih.j5.length>3)ih.j5.pop();
|
|
return e};ih.N4=function($,o){return new aY($-Math.floor($),o-Math.floor(o))};ih.ah_=function($,o){var T=o.x,s=o.y,E=Math.abs(T-$.x),e=Math.abs(s-$.y);
|
|
if(Math.abs(T-1-$.x)<E)T--;else if(Math.abs(T+1-$.x)<E)T++;if(Math.abs(s-1-$.y)<e)s--;else if(Math.abs(s+1-$.y)<e)s++;
|
|
E=$.x-T;e=$.y-s;return Math.sqrt(E*E+e*e)};ih.prototype.oI=function($){};ih.ai1=function($,o,T){var s,E,e,n=$.Brsh.v.Dmtr.v.val;
|
|
if($.Brsh.v.classID=="computedBrush"){var A=$.Brsh.v.Hrdn.v.val/100,u=1+.55*(1-A);e=n<100?1.2:1;var Y=Math.round(e*n*u);
|
|
E=new df(0,0,Y,Y);s=L.G(Y*Y*4);var b=new Uint32Array(s.buffer),a=Y/2,w=u/a,X=Date.now(),N=ih.cV(A),z=Math.round(8e3/a),o=N[0],i=N[1]-z,k=N[2]+z,Q=Math.min(Y,(Y>>>1)+1);
|
|
for(var f=0;f<Q;f++){var O=w*(f-a+.25);O*=O;var c=w*(f-a+.75);c*=c;var B=f*Y,G=(Y-1-f)*Y;for(var l=0;
|
|
l<Q;l++){var v=w*(l-a+.25),p=Math.floor(Math.sqrt(v*v+O)*(4e3/1.55));if(k<p)continue;else if(p<i){var P=4278190080;
|
|
while(l<Q){var h=Y-1-l;b[B+l]=P;b[B+h]=P;b[G+l]=P;b[G+h]=P;l++}break}else{var j=w*(l-a+.75),C=Math.floor(Math.sqrt(j*j+O)*(4e3/1.55)),V=Math.floor(Math.sqrt(v*v+c)*(4e3/1.55)),d=Math.floor(Math.sqrt(j*j+c)*(4e3/1.55)),P=~~(.5+255*.25*(o[p]+o[C]+o[V]+o[d]))<<24,h=Y-1-l;
|
|
b[B+l]=P;b[B+h]=P;b[G+l]=P;b[G+h]=P}}}}if($.Brsh.v.classID=="sampledBrush"){var m,S=0;for(var f=0;f<o.length;
|
|
f++)if(o[f].id==$.Brsh.v.sampledData.v)m=o[f];L.mc(m.i2);E=m.i2[1];e=Math.max(E.d,E.w)/n;s=m.i2[0];var R=E.d,g=E.w;
|
|
while(Math.min(R,g)>n*2&&m.i2[S+2]){S+=2;s=m.i2[S];E=m.i2[S+1].clone();e*=E.d/R;R=E.d;g=E.w}E.x=E.y=0}return{a0j:e,Q9:E,Bf:s}};
|
|
ih.vu=[];ih.cV=function($){if(ih.vu[$])return ih.vu[$];var o=Math.pow($,.55),T=new Float64Array(8e3),s=0,E=8e3;
|
|
for(var f=0;f<8e3;f++){var e=ih.apJ(f*(1.55/4e3),o);if(e>=1)s=f;else if(e<=0&&E==8e3)E=f;T[f]=e}var n=[T,s,E];
|
|
ih.vu[$]=n;return n};ih.apJ=function($,o){var T=$<o?1:ih.a2l(($-o)/Math.pow(1.001-o,.86));return T};
|
|
ih.a2l=function($){var o=$*.85;return Math.exp(-(o*o)*(1/(2*.4*.4)))*(1/(.4*Math.sqrt(2*Math.PI)))};
|
|
ih.prototype.rX=function(){return this.rect.clone()};ih.prototype.kx=function(){return this.Sg.Sr(this.rect)};
|
|
ih.prototype.cx=function(){return this.sS.Sr(this.rect)};ih.prototype.su=function(){return this._3};
|
|
ih.S=null;ih.V8=null;ih.Ey=function($,o,T,s,E,e){var n=ih.S,A=ih.V8;if(n==null){ih.S=n=H.z("canvas","");
|
|
ih.V8=A=n.getContext("2d")}if(e==null)e=s;if(n.width!=e||n.height!=E){n.width=e;n.height=E}else A.clearRect(0,0,e,E);
|
|
A.fillStyle="#000000";A.font=Math.floor(10*H.K())+"px sans-serif";var u=$.Brsh.v.Dmtr.v.val,Y=""+u,b=A.measureText(Y);
|
|
A.fillText(Y,(s-b.width)/2,E-2);var a=s,w=E-10*H.K(),X=Math.min(a,w),N=$.Brsh.v.classID;if(N=="computedBrush"){A.translate(a/2,w/2);
|
|
A.rotate(-$.Brsh.v.Angl.v.val*Math.PI/180);A.scale(1,.1+.9*$.Brsh.v.Rndn.v.val/100);var z=Math.min(.95*X/2,u/2)+.5,i=.9*$.Brsh.v.Hrdn.v.val/100,k=A.createRadialGradient(0,0,0,0,0,z);
|
|
k.addColorStop(i,"rgba(0,0,0,1)");k.addColorStop((.5+i)/1.5,"rgba(0,0,0,.5)");k.addColorStop(1,"rgba(0,0,0,0)");
|
|
A.fillStyle=k;A.fillRect(-z,-z,2*z,2*z);A.setTransform(1,0,0,1,0,0)}else if(N=="sampledBrush"){var Q,l=0;
|
|
for(var f=0;f<o.length;f++)if(o[f].id==$.Brsh.v.sampledData.v)Q=o[f];var O=Q.i2;L.mc(O);var c=O[0],B=O[1].d,G=O[1].w;
|
|
while((B>a||G>w)&&O[l+2]){l+=2;c=O[l];B=O[l+1].d;G=O[l+1].w}if(B*G!=0){var v=new ImageData(new Uint8ClampedArray(c.buffer),B,G);
|
|
A.putImageData(v,Math.round((a-B)/2),Math.round((w-G)/2))}}else{}return n.toDataURL()};ih.Ce=function($,o,T,s){if(T==0)T=1;
|
|
var E=$.Brsh.v,e=E.Dmtr.v.val,n=E.Dmtr.v.val=Math.min(s!=null?Math.round(s*2.6):3e3,e*T),A=E.Hrdn?E.Hrdn.v.val/100:1,u=s!=null?s:Math.round(n*(1+.55*(1-A)))+4,a;
|
|
u=Math.max(15,Math.min(u,3e3));var Y=new df(0,0,u,u),b=new ih($,o,null,{yV:1},16711712,0,Y);E.Dmtr.v.val=e;
|
|
b.moveTo(Y.d/2,Y.w/2);var w=b.su(),X=b.rX();if(Y.R1(X))a=w;else{a=L.G(Y.Y()*4);L.h9(w,X,a,Y)}return[a,Y,n]};
|
|
ih.y8=function($,o,T,s){var E=ih.Ce($,o,T),e=E[0].slice(0),n=E[1],A=E[2],u=n.Y(),Y=L.G(u);L.Ge(e,Y,3);
|
|
var b=L.G(u);L.Z.a4S(Y,b,n);if(A<3||L.tD(b,0)||s&&A>12){var a=n.d,w=a>>>1,X=b,N=255;for(var f=0;f<4;
|
|
f++){X[a*(w-6+f)+w]=N;X[a*w+w-6+f]=N;X[a*w+w+6-f]=N;X[a*(w+6-f)+w]=N}}var z=[1,2,1,2,8,2,1,2,1];z=L.TS.Hx(z);
|
|
L.TS.nS(b,Y,n.d,n.w,z);L.wr(e,4294967295);L.aM(Y,e,3);for(var f=0;f<u;f++)if(b[f]==255){e[f<<2]=e[(f<<2)+1]=e[(f<<2)+2]=0;
|
|
e[(f<<2)+3]=255}return{tY:e,uL:n,wS:new aY(n.d/2,n.w/2)}};ih.FS="0";ih.A1="1";ih.qT="2";ih.K1="3";var hA={};
|
|
hA.S=document.createElement("canvas");hA.V8=hA.S.getContext("2d");hA.rW=function($,o){var T=$._Y(),A;
|
|
if(T.x==Infinity||T.p4())return{_3:L.G(0),uL:new df,QH:new df};var s=$._Y(),E=hA.hv($,o),e=L.M.$l(E.I);
|
|
if(e.p4())return{_3:L.G(0),uL:new df,QH:new df};var n=L.iZ(e.d,e.w);n.translate(-e.x,-e.y);hA.afQ(E,n);
|
|
if($.oH.length!=0){var u=g8.rT(o),Y=n.getImageData(0,0,e.d,e.w);A=new Uint8Array(Y.data.buffer);if(u==0)for(var f=0;
|
|
f<A.length;f+=4)A[f+3]=A[f+3]>80?255:0;if(u==3)for(var f=0;f<A.length;f+=4)A[f+3]=Math.min(255,A[f+3]*1.5)}else A=L.G(e.Y()*4);
|
|
n.resetTransform();n.beginPath();return{_3:A,uL:e,QH:s}};hA.hv=function($,o){var T=o.t,s=o.h3,E=g8.rT(o),e=Math.max(T.P*T.P,T.Z9*T.Z9)<1e-9?T:null;
|
|
if(E==3||E==4)e=null;var n={o:[],I:[]};hA.agm($,n,e);n=hA.YF(n,o,$);return n};hA.YF=function($,o,T){if($==null)return $;
|
|
if(T&&T.tV)L.M.t($.I,T.tV,$.I);if(T&&!L.Rt.nP(o.Ah)){var s=g8.rX(o,T);if(!s.p4()){if($.o){$=L.M.X2($);
|
|
var E=Math.min(s.d,s.w)/8;if(E<1)E=1;$=L.M.g0($,E)}var e=L.Rt.wW(o.Ah,s);L.ha.t(e,$.I,s)}}var n=o.t;
|
|
L.M.t($.I,n,$.I);return $};hA.afQ=function($,o){Typr.U.pathToContext({crds:$.I,cmds:$.o},o)};hA.NP=function($,o){if(!iq.sD())return;
|
|
var T=$.h3,s=T.ResourceDict.FontSet,E=T.ResourceDict.StyleSheetSet[0].StyleSheetData,e=T.EngineDict.StyleRun.RunLengthArray,n=T.EngineDict.StyleRun.RunArray,A=g8.m5(T),u=!0,Y={},b=0;
|
|
for(var f=0;f<n.length;f++){var a=n[f].StyleSheet.StyleSheetData.Font;if(a==null)a=E.Font;for(var w=0;
|
|
w<e[f];w++){var X=A.charCodeAt(b+w),N=a+","+(X>128?X:-1);if(Y[N]==null){Y[N]=1;if(o.sU(s[a].Name,X)==null)u=!1}}b+=e[f]}return u};
|
|
hA.agm=function($,o,T){var s=new fY;for(var f=0;f<$.CL.length;f++)hA.an_($.oH,$.CL[f],o,s,T)};hA.an_=function($,o,T,s,E){s.translate(o.tP.x,o.tP.y);
|
|
for(var f=0;f<o.xv.length;f++){var e={},n=o.xv[f];if(!n.Sz)break;var A=s.clone();A.translate(n.tP.x,n.tP.y);
|
|
if(E){var u=E.Es+A.Es*E.Um;A.Es=(Math.round(u)-E.Es)/E.Um}for(var Y=n.start;Y<n.end;Y++)hA.aov($,o.v5[Y],o,e,T,A)}s.translate(-o.tP.x,-o.tP.y)};
|
|
hA.a9O="()<>[]{}\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";
|
|
hA.aov=function($,o,T,s,E,e){e.translate(o.tP.x,o.tP.y);for(var n=o.Uj;n<=o.zy;n++){var A=T.IU[n],u=A.uL.d,Y=$[T.a4N+A.AV];
|
|
if(Y.bA=="\n")continue;var b=Y.CA.FontSize/Y.hU.head.unitsPerEm,a=g8.Qc(Y.CA),w=(Math.round(a.i)<<16)+(Math.round(a.m)<<8)+Math.round(a.P);
|
|
E.o.push("#"+L.B$(w));var X=e.clone();X.translate(A.tP.x+A.rk*b,A.tP.y-A.JS*b);var N=new fY;N.scale(b,-b);
|
|
if(Y.ow==1&&hA.a9O.indexOf(Y.bA)!=-1)N.concat(new fY(-1,0,0,1,u,0));if(Y.CA.FauxItalic)N.concat(new fY(1,0,-Math.tan(.18),1,0,0));
|
|
N.translate(0,Y.kv);N.scale(Y.scale.x,Y.scale.y);if(Y.CA.BaselineShift!=null)N.translate(0,-Y.CA.BaselineShift);
|
|
if(A.VN!=0){N.rotate(-A.VN)}N.concat(X);if(A.path.o.length!=0&&Y.bA!="\t"){if(Y.CA.FauxBold){var z=Y.CA.FontSize/2048*27*Y.scale.x;
|
|
N.Ry+=z;L.M.concat(E,A.path,N);N.Ry-=z+z;L.M.concat(E,A.path,N)}else L.M.concat(E,A.path,N)}if(Y.bA!="\n"){if(Y.CA.Underline){if(s.qK==null)s.qK=Y.hU.post.underlineThickness;
|
|
if(s.afM==null)s.afM=Y.hU.post.underlinePosition;var i=0,k=s.afM-s.qK/2,Q=A.uT*1.05,O=-s.qK;L.M.concat(E,{o:["M","L","L","L","Z"],I:[i,k,i+Q,k,i+Q,k+O,i,k+O]},N)}if(Y.CA.Strikethrough){var c=Y.hU["OS/2"].yStrikeoutSize,B=Y.hU["OS/2"].yStrikeoutPosition,i=0,k=B+c/2,Q=A.uT*1.05,O=-c;
|
|
L.M.concat(E,{o:["M","L","L","L","Z"],I:[i,k,i+Q,k,i+Q,k+O,i,k+O]},N)}}E.o.push("X")}e.translate(-o.tP.x,-o.tP.y)};
|
|
function iq($,o){var T=g8.tb($),s,E,e=g8.Hs($),n=$._LineOrientation==2?new fY:null,b;if($.Curve)E=iq.qF($.Curve);
|
|
if(T!=0){s=new df(e[0],e[1],e[2],e[3]);if(n){var A=s.d;s.d=s.w;s.w=A;n.translate(0,-e[2])}if(T==2){s.d=E[5]-E[4];
|
|
s.w=9999}}this.CL=[];this.oH=[];this.tU=T;this.tV=n;var u=this.aom=g8.m5($),Y=-1;for(var f=0;f<u.length;
|
|
f++){var a=b,w=g8.bB($,f);if(w!=Y){Y=w;a=b=g8.a9_($,f)}var X={bA:u.charAt(f),CA:a,hU:null,uu:-1,kv:0,scale:new aY(0,0),O8:0,lineHeight:0,ow:0},N=$.ResourceDict.FontSet[a.Font].Name,z=X.hU=o.sU(N,u.charCodeAt(f));
|
|
X.scale.x=a.HorizontalScale==null?1:a.HorizontalScale;X.scale.y=a.VerticalScale==null?1:a.VerticalScale;
|
|
var i=z["OS/2"],k=z.hhea;if(a.FontCaps==1&&X.bA!=X.bA.toUpperCase()){var Q=i.sxHeight?i.sxHeight/i.sTypoAscender:.76;
|
|
X.scale.x*=Q;X.scale.y*=Q}var O=1/z.head.unitsPerEm*a.FontSize;if(a.FontBaseline==1){var Q=$.ResourceDict.SuperscriptSize;
|
|
X.scale.x*=Q;X.scale.y*=Q;X.kv-=$.ResourceDict.SuperscriptPosition*a.FontSize}if(a.FontBaseline==2){var Q=$.ResourceDict.SubscriptSize;
|
|
X.scale.x*=Q;X.scale.y*=Q;X.kv+=$.ResourceDict.SubscriptPosition*a.FontSize}X.O8=iq.O8(z,N,a);X.lineHeight=a.FontSize*1.2;
|
|
if(a.AutoLeading==!1)X.lineHeight=a.Leading;if(X.lineHeight==0)X.lineHeight=.01;this.oH.push(X)}var c=this.CL,B=[0];
|
|
for(var f=0;f<$.EngineDict.ParagraphRun.RunLengthArray.length;f++){var G=new iq.r0($,o,this.oH,f,s,B,T==1?E:null);
|
|
c.push(G)}if(n){if(T==0)n.translate(0,c[0].v5[0].O8/2);n.rotate(-Math.PI/2)}if(T==2){var l=$.Curve.Points,v=E[0],p=E[1],P=E[2],h=E[3],j=E[4],C=E[5];
|
|
for(var f=0;f<c.length;f++)for(var V=0;V<c[f].xv.length;V++)if(!(f==0&&V==0))c[f].xv[V].Sz=!1;var G=c[0],d=G.xv[0];
|
|
G.tP.A5(0,0);d.tP.A5(0,0);for(var V=d.start;V<d.end;V++){var R=G.v5[V],g=R.tP.x;R.tP.x=0;for(var S=R.Uj;
|
|
S<=R.zy;S++){var F=G.IU[S],r=F.uL.d/2;F.tP.x+=g;var q=iq.af9(v,(j+F.tP.x+r)%h);F.tP.x=q[0]-r*q[2];F.tP.y=q[1]-r*q[3];
|
|
F.VN=Math.atan2(q[3],q[2])}}}}iq.O8=function($,o,T){var s=$["OS/2"],E=$.hhea,e=0,e=0,n=[];n.push(s&&s.sxHeight&&o.toLowerCase().indexOf("capitals")!=-1?s.sxHeight:0);
|
|
n.push(s&&s.sCapHeight?s.sCapHeight:0);n.push(s&&s.sTypoAscender?s.sTypoAscender:0);n.push(E.ascender?E.ascender:0);
|
|
for(var A=0;A<n.length;A++)if(n[A]!=0){e=n[A];break}var u=1/$.head.unitsPerEm*T.FontSize;e=e*u;if(e<T.FontSize*.6)e=T.FontSize*.75;
|
|
return e};iq.prototype.ach=function(){return!this.RN(0)};iq.prototype.acy=function(){return this.RN(1)};
|
|
iq.prototype.RN=function($){var o=this.CL,T=!0,s=0;for(var f=0;f<o.length;f++){var E=o[f].xv,e=E.length;
|
|
s+=e;for(var n=0;n<e;n++)T&=E[n].Sz}return[T,s][$]};iq.qF=function($){var o=$.Points,T=o.length,s=T>>>3,E=$.TextOnPathTRange,e=$.Reversed,b=0,a=0;
|
|
if(e){var n=o.slice(0);for(var f=0;f<T;f+=2){n[f]=o[T-2-f];n[f+1]=o[T-1-f]}o=n;E=[s-E[1]%s,s-E[0]%s]}var A=[],u=[0],Y=[0];
|
|
for(var f=0;f<T;f+=8){var w=o[f+6]-o[f+0],X=o[f+7]-o[f+1],N=Math.round(4*Math.sqrt(w*w+X*X));for(var z=0;
|
|
z<N;z++){var i=z/N,k=1-i,Q=k*k*k*o[f+0]+3*k*k*i*o[f+2]+3*k*i*i*o[f+4]+i*i*i*o[f+6],O=k*k*k*o[f+1]+3*k*k*i*o[f+3]+3*k*i*i*o[f+5]+i*i*i*o[f+7];
|
|
A.push(Q,O);if(f+z!=0){var w=Q-b,X=O-a;Y.push(Y[Y.length-1]+Math.sqrt(w*w+X*X));u.push((f>>>3)+i)}b=Q;
|
|
a=O}}var c=Y.length,B=Y[c-1],G=iq.F0(E[0],u),l=iq.F0(E[1]%s,u),v=Y[G%c],p=Y[l%c];if(v>=p)p+=B;return[A,u,Y,B,v,p]};
|
|
iq.F0=function($,o){var f=0;while(o[f]<$)f++;return f};iq.af9=function($,o){var T=0,f=0,s,E,e;while(T<o){s=$[f+2]-$[f];
|
|
E=$[f+3]-$[f+1];e=Math.sqrt(s*s+E*E);T+=e;f+=2}return[$[f],$[f+1],s/e,E/e]};iq.prototype.alg=function($){return this.oH[$]};
|
|
iq.prototype.apR=function($){for(var o=0;o<this.CL.length;o++){var T=this.CL[o];for(var s=0;s<T.xv.length;
|
|
s++){var E=T.xv[s],e=T.v5[E.start].start,n=T.v5[E.end-1].end;if(e<$&&$<n)return[e,n-1]}}return[0,1]};
|
|
iq.prototype.Gb=function($,o){var T=-1,s=this.CL;if(this.tU==2){var E=1e9,e=0,n=s[0],A=n.xv[0];for(var u=A.start;
|
|
u<A.end;u++){var Y=n.v5[u];for(var b=Y.Uj;b<=Y.zy;b++){var a=n.IU[b],w=a.uL.d,X=$.x-a.tP.x,N=$.y-a.tP.y,z=X*X+N*N;
|
|
if(z<E){E=z;e=a.AV}}}if(e!=0&&this.aom.codePointAt(e-1)>65535)e--;return e}for(var i=0;i<s.length;i++){var n=s[i];
|
|
for(var k=0;k<n.xv.length;k++){T++;var A=n.xv[k],Q=n.xv[k+1];if(Q==null&&i<s.length-1)Q=s[i+1].xv[0];
|
|
if(o!=null){if(T!=o)continue}else{if(Q!=null&&n.tP.y+A.tP.y<$.y)continue}for(var u=A.start;u<A.end;u++){var Y=n.v5[u];
|
|
for(var b=Y.Uj;b<=Y.zy;b++){var a=n.IU[b],w=a.uL.d,O=n.tP.x+A.tP.x+Y.tP.x,c=O+a.tP.x,B=O+(b<Y.zy?n.IU[b+1].tP.x:a.tP.x+w);
|
|
if($.x<=B||u+1==A.end&&b==Y.zy){var G=n.a4N+a.AV,l=this.oH[G],v=l.ow&1;if(l.bA!="\n"&&(v==0&&$.x>c+w/2||v==1&&$.x<c+w/2))G+=this.aom.codePointAt(G)>65535?2:1;
|
|
return G}}}}}};iq.prototype.UH=function($){var o={uL:new df,_U:0},T=0;for(var s=0;s<this.CL.length;s++){var E=this.CL[s];
|
|
for(var e=0;e<E.xv.length;e++){var n=E.xv[e];o._U=T;T++;for(var A=n.start;A<n.end;A++){var u=E.v5[A];
|
|
for(var Y=u.start;Y<u.end;Y++){if(Y==$){var b=this.oH[Y],a=b.uu,w=E.IU[a].AV,X=1;while(E.IU[a]!=null&&E.IU[a].AV==w){var N=E.IU[a],z=E.tP.x+n.tP.x+u.tP.x+N.tP.x,i=E.tP.y+n.tP.y+u.tP.y+N.tP.y;
|
|
o.uL=o.uL.BZ(new df(z,i-b.lineHeight,N.uL.d,b.lineHeight));o.VN=N.VN;a+=X}return o}}}}}};iq.prototype._Y=function(){var $=Infinity,o=Infinity,T=-Infinity,s=-Infinity;
|
|
for(var f=0;f<this.CL.length;f++){var E=this.CL[f];for(var e=0;e<E.xv.length;e++){var n=E.xv[e];if(!n.Sz)break;
|
|
for(var A=n.start;A<n.end;A++){var u=E.v5[A];for(var Y=u.Uj;Y<=u.zy;Y++){var b=E.IU[Y],a=b.uL,w=E.tP.x+n.tP.x+u.tP.x+b.tP.x,X=E.tP.y+n.tP.y+u.tP.y+b.tP.y;
|
|
$=Math.min($,w+a.x);o=Math.min(o,X+a.y);T=Math.max(T,w+a.x+a.d);s=Math.max(s,X+a.y+a.w)}}}}return new df($,o,T-$,s-o)};
|
|
iq.GK=function($){return 19968<=$&&$<=40959||12288<=$&&$<=12543};iq.aoO=function($,o,T,s,E,e,n){var A=[e],u=0;
|
|
for(var f=e;f<n;f++){if(T[f]==null)console.log(f,e,n,T);var Y=T[f].bA,b=Y.charCodeAt(0);if(b==32||b==9){A.push(u,f,1,f+1);
|
|
u=0}else if(b==3851){A.push(u+1,f+1);u=0}else if(iq.GK(b)){A.push(u,f);u=1}else if(f!=e&&T[f].ow!=T[f-1].ow){A.push(u,f);
|
|
u=1}else u++}A.push(u);var a=[];for(var f=0;f<A.length;f+=2){var w=A[f],X=A[f+1];if(X==0)continue;a.push(new iq.a9M($,o,T,s,E,w,X))}return a};
|
|
iq.a56=function($,o,T,s,E,e,n){var A=[0,o?o.d:1e9],u=[];if(s){var Y=$[e].O8,b=E+(E==0?Y:$[e].lineHeight),a=b-Y*.9,w=L.M.SG(s[0],a),X=w.length,N=L.M.SG(s[0],b),z=N.length;
|
|
if(X!=0&&z!=0){var i=0,k=0;A=[];while(i<X&&k<z){var Q=Math.max(w[i],N[k]),O=w[i+1],c=N[k+1],B=Math.min(O,c);
|
|
if(Q<B)A.push(Q,B);if(O<c)i+=2;else k+=2}}}for(var G=0;G<A.length;G+=2){var l=A[G+1]-A[G],v=0,p=e,P=o?l-T.StartIndent-T.EndIndent-(e==0?T.FirstLineIndent:0):Infinity;
|
|
while(e!=$.length){var h=$[e],j=v==0||(h.Mt||h.GF)||v+h.uL.d<P;if(!j)break;v+=h.uL.d;e++}u.push(e-p)}n[0]=u;
|
|
n[1]=A;n[2]=e};iq.a5I=function($,o){var T=$.length,s=new Uint32Array(T),E=new Uint8Array(T),e=0;for(var f=0;
|
|
f<T;f++){E[f]=0;var n=$.charCodeAt(f);s[f]=n;if(n>e)e=n}if(e>1424)E=iq.a8T(s,o);return E};iq.r0=function($,o,T,s,E,e,n){this.v5=[];
|
|
this.xv=[];this.tP=new aY(0,0);this.IU=null;this.v5=null;this.CA=g8.am2($,s);var A=this.CA,a=0,N="",O=0,c=1,q=0;
|
|
if(s!=0){var u=A.SpaceBefore;if(u!=null)e[0]+=u}var Y=$.EngineDict.ParagraphRun.RunLengthArray,b=Y[s];
|
|
for(var f=0;f<s;f++)a+=Y[f];var w=A._Direction?A._Direction:0;this.a4N=a;var X=g8.m5($).slice(a,a+b);
|
|
for(var z=0;z<X.length;z++){var i=X.charAt(z);N+=T[a+z].CA.FontCaps==0?i:i.toUpperCase()}X=N;var k=iq.a5I(X,w),Q=[],B=k[f]&1,G=T[a].hU;
|
|
T[a].ow=k[0];for(var f=1;f<X.length;f++){var i=T[a+f],l=k[f];i.ow=l;if(l!=B||i.hU!=G){Q.push(O,c);O=f;
|
|
c=1;B=l;G=i.hU}else c++}Q.push(O,c);var v=this.IU=[];for(var f=0;f<Q.length;f+=2){var p=Q[f],P=Q[f+1],h=(T[a+p].ow&1)==0,j=X.slice(p,p+P),C=Typr.U.shapeHB(T[a+p].hU,j,h),V=[],g=0;
|
|
for(var z=0;z<C.length;z++){var d=C[z];V.push({m:d.g,AV:d.cl,uT:d.ax,$T:d.ay,rk:d.dx,JS:d.dy})}C=V;var R=C.slice(0);
|
|
if(!h)R.reverse();for(var z=0;z<j.length;z++){while(g+1<R.length&&R[g+1].AV<=z){g++}while(g>0&&R[g-1].AV==z)g--;
|
|
T[a+p+z].uu=v.length+(h?g:R.length-g-1)}for(var z=0;z<C.length;z++){v.push(C[z]);C[z].AV+=p;var i=T[a+C[z].AV];
|
|
if(i.bA=="\n")C[z].uT=0;if(i.bA=="\t")C[z].uT=i.hU.head.unitsPerEm*36/i.CA.FontSize}}var S=g8.KH(A),F=this.v5=iq.aoO($,o,T,a,v,a,a+b),r=this.xv,W=-1,N=[null,null,0];
|
|
while(q<F.length){iq.a56(F,E,A,n,e[0],q,N);W++;var Z={start:q,end:0,uL:new df,tP:new aY(0,0),Sz:!0},fq=0,fO=0;
|
|
r.push(Z);Z.end=N[2];var I=Z.end==F.length;function _(R,p,d3){var h9=d3-p>>>1;for(var f=0;f<h9;f++){var cs=R[p+f];
|
|
R[p+f]=R[d3-1-f];R[d3-1-f]=cs}}for(var cN=1;cN<5;cN++){var ce=-1;for(var f=Z.start;f<Z.end;f++){var l=T[F[f].start].ow;
|
|
if(ce==-1&&l>=cN)ce=f;else if(ce!=-1&&l<cN){_(F,ce,f);ce=-1}}var gf=Z.end;if(w==0&&F[gf-1].Mt)gf--;if(ce!=-1)_(F,ce,gf)}var K=N[0],cv=N[1],ce=q,f0=q;
|
|
for(var i8=0;i8<K.length;i8++){var b5=cv[i8*2+1]-cv[i8*2],iC=0;ce=f0;f0+=K[i8];var an=this.a7N(ce,f0,F,w,E!=null);
|
|
if(E){if(S==1||I&&S==4)iC=an[1]+(b5-an[0]);if(S==2||I&&S==5)iC=an[1]+(b5-an[0])/2;if(W==0)iC+=A.FirstLineIndent;
|
|
iC+=A.StartIndent}else{if(S==0)iC=A.StartIndent+A.FirstLineIndent;if(S==1)iC=-an[0]-A.EndIndent;if(S==2)iC=-an[0]/2}iC+=cv[i8*2];
|
|
if(E&&S>2&&(S==6||!I))this.am$(ce,f0,F,b5,w,iC);else{var cO=iC;for(var f=ce;f<f0;f++){var bh=F[f],bD=bh.uL.d;
|
|
bh.tP.x=cO;if(bh.U8=="\t")bD=Math.ceil((cO+4)/36)*36-cO;cO+=bD}}}q=Z.end;for(var f=Z.start;f<Z.end;f++){var g6=F[f].uL.clone();
|
|
g6.TB(F[f].tP);Z.uL=Z.uL.BZ(g6);fq=Math.max(fq,F[f].O8);fO=Math.max(fO,F[f].lineHeight)}Z.tP.y=W==0?0:r[W-1].tP.y+fO;
|
|
if(W==0){if(s==0&&E)e[0]+=fq;if(s!=0)e[0]+=fO;this.tP.y=e[0]}else e[0]+=fO;if(E)Z.Sz=this.tP.y+Z.tP.y<E.y+E.w}var hM=A.SpaceAfter;
|
|
if(hM!=null)e[0]+=hM};iq.r0.prototype.a7N=function($,o,T,s,E){var e=0,n=0;for(var f=$;f<o;f++)e+=T[f].uL.d;
|
|
if(E){if(s==0)for(var f=o-1;f>=$;f--)if(T[f].Mt||T[f].GF)e-=T[f].uL.d;else break;if(s==1)for(var f=$;
|
|
f<o;f++)if(T[f].Mt||T[f].GF){var A=T[f].uL.d;e-=A;n-=A}else break}return[e,n]};iq.r0.prototype.am$=function($,o,T,s,E,e){var n=0,A=0,u=0,Y=0;
|
|
for(var f=$;f<o;f++)if(T[f].Mt)u++;else{n+=T[f].uL.d;A++}if(E==0)for(var f=o-1;f>=$;f--)if(T[f].Mt||T[f].GF){if(T[f].Mt){u--}}else break;
|
|
if(E==1)for(var f=$;f<o;f++)if(T[f].Mt||T[f].GF){if(T[f].Mt){u--;Y++}}else break;if(A<=1||u==0){if(A==1)T[$].tP.x=e;
|
|
return}var b=(s-n)/u,a=-Y*b;for(var f=$;f<o;f++){if(T[f].Mt)this.IU[T[f].Uj].uL.d=T[f].uL.d=b;T[f].tP.x=e+a;
|
|
a+=T[f].uL.d}};iq.a9M=function($,o,T,s,E,e,n){this.U8="";for(var f=0;f<n;f++)this.U8+=T[e+f].bA;this.Mt=n==1&&(T[e].bA==" "||T[e].bA=="\t");
|
|
this.GF=n==1&&T[e].bA=="\n";this.start=e;this.end=e+n;this.uL=new df;this.tP=new aY(0,0);this.O8=0;this.lineHeight=0;
|
|
var A=0,u=0;if(n==0){this.lineHeight=T[e].lineHeight;this.O8=T[e].O8;this.uL=new df(0,-T[e].lineHeight,0,T[e].lineHeight)}var Y=T[e].uu,b=T[e+n-1].uu;
|
|
if(b<Y){var a=Y;Y=b;b=a}while(b+1<E.length&&E[b].AV==E[b+1].AV){b++}this.Uj=Y;this.zy=b;for(var w=Y;
|
|
w<=b;w++){var X=E[w],N=T[s+X.AV],z=$._LineOrientation==2&&(N.CA.BaselineDirection!=2||iq.GK(N.bA.charCodeAt(0))),i=Typr.U.glyphToPath(N.hU,X.m),B=0;
|
|
X.path={o:i.cmds,I:i.crds};var k=N.CA.FontSize,Q=1/N.hU.head.unitsPerEm*k;if(!N.CA.AutoKerning)A+=N.CA.Kerning*2*Q*N.scale.x;
|
|
X.tP=new aY(A,0);X.VN=0;if(z&&X.path.I.length>0){X.VN=-Math.PI/2;X.tP.x+=k*.83;X.tP.y=-k*.3+X.uT*Q/2;
|
|
X.uT=k/Q}var O=X.uT*Q*N.scale.x;X.uL=new df(0,-N.lineHeight,O,N.lineHeight);var c=X.uL.clone();c.TB(X.tP);
|
|
if(N.CA.Tracking!=null)B=N.CA.Tracking*.001*k;if(N.CA.FauxBold==!0)B+=.027*k;A+=O+B;if(n==1&&N.bA==" ")c.d+=2*B;
|
|
else if(n==1&&N.bA!=null&&iq.GK(N.bA.charCodeAt(0)))c.d+=B;this.uL=this.uL.BZ(c);this.O8=Math.max(this.O8,N.O8);
|
|
this.lineHeight=Math.max(this.lineHeight,N.lineHeight)}};iq.JP=0;iq.sD=function(){if(iq.JP==2)return!0;
|
|
if(iq.JP==1)return!1;iq.JP=1;function $(){fetch("code/external/fribidi.wasm").then(function(o){return o.arrayBuffer()}).then(function(o){return WebAssembly.instantiate(o)}).then(function(o){var T=o.instance.exports,s=T.memory,E=16,e=256,n=1,A=E|e,u=E|e|n;
|
|
iq.a8T=function(b,a){var w=b.length,X=w*4+4+w*4+w*4+w;eY.k8(T,X+w+1e7);var N=new Uint8Array(s.buffer),z=new Uint32Array(s.buffer),i=T.calloc(X,1),k=i+w*4,Q=k+4,O=Q+w*4,c=O+w*4;
|
|
z.set(b,i>>>2);z[k>>>2]=a==0?A:u;T.fribidi_get_bidi_types(i,w,Q);T.fribidi_get_bracket_types(i,w,Q,O);
|
|
T.fribidi_get_par_embedding_levels_ex(Q,O,w,k,c);var B=N.slice(c,c+w);T.free(i);return B};iq.JP=2;var Y=new x(H.E.Q,!0);
|
|
Y.data={e:H.V.uY,U_:"add",M9:gr.En,Tk:null};hx.CJ.J(Y)})}Typr.U.initHB("code/external/hb.wasm",$);return!1};
|
|
function g8(){}g8.Qz=function($){return JSON.parse(JSON.stringify($))};g8.fa=function($,o){for(var T in o)$[T]=o[T]};
|
|
g8.rm=function($,o,T){var s=g8.dD();if(T)g8.zA(s,0,0,T);var E={t:new fY(1,0,0,1,Math.round($),Math.round(o)),h3:s};
|
|
E.Fh=g8.dk();E.Ah=L.Rt.G();E.QH=new df;return E};g8.fP=function($){var o=["CharacterDirection",0];for(var f=0;
|
|
f<o.length;f+=2){if($[o[f]]!=null&&$[o[f]]!=o[f+1]){throw"e";console.log(o[f],$[o[f]])}}if($ instanceof Array)for(var f=0;
|
|
f<$.length;f++)g8.fP($[f]);else if($ instanceof Object)for(var T in $)g8.fP($[T])};g8.KH=function($,o){if(o==null)o=$.Justification;
|
|
var T=$._Direction?$._Direction:0;if(T==1){if(o==0||o==3)o++;else if(o==1||o==4)o--}return o};g8.J2=function($){if($.add==null)return;
|
|
var o=$.h3,T=o.Curve,s=$.add.vmsk,E=s.g,e=L.M.Ld(E,!0).I,n=$.t.clone();n.lY();L.M.t(e,n,e);var A=e.slice(0,8);
|
|
for(var u=8;u<e.length;u+=6)A.push(e[u-2],e[u-1],e[u],e[u+1],e[u+2],e[u+3],e[u+4],e[u+5]);T.Points=A;
|
|
T.TextOnPathTRange=s.kZ.slice(0);T.Reversed=s.wq;if(g8.tb(o)==1){var T=iq.qF(o.Curve),Y=L.M.L3(T[0]);
|
|
g8.bi(o,[0,0,Y.d,Y.w].map(Math.round));for(var f=0;f<A.length;f+=2){A[f]-=Y.x;A[f+1]-=Y.y}var b=new fY(1,0,0,1,Y.x,Y.y);
|
|
b.concat($.t);$.t=b}};g8.mg=function($){if($.add==null)return;var o=$.add.vmsk,T=$.h3.Curve,s=T.Points,E={o:["M"],I:[s[0],s[1]]};
|
|
for(var f=0;f<s.length;f+=8){E.o.push("C");E.I.push(s[f+2],s[f+3],s[f+4],s[f+5],s[f+6],s[f+7])}L.M.t(E.I,$.t,E.I);
|
|
var e=L.M.Hz(E,!0);o.g=e;o.wq=T.Reversed;o.kZ=T.TextOnPathTRange.slice(0);$.add.vogk=M._L(e)};g8.Qc=function($){var o={i:0,m:0,P:0};
|
|
if($.FillColor){var T=$.FillColor,s=T.Values;if(T.Type==1)o={i:s[1]*255,m:s[2]*255,P:s[3]*255};else if(T.Type==2){var E={classID:"CMYC",Cyn:{t:"doub",v:s[1]*100},Mgnt:{t:"doub",v:s[2]*100},Ylw:{t:"doub",v:s[3]*100},Blck:{t:"doub",v:s[4]*100}};
|
|
o=L.h.Qc(E)}else console.log("Unknown color type")}return o};g8.abG=function($){for(var f=0;f<$.length;
|
|
f++){var o=$[f].StyleSheet.StyleSheetData,T=o.FillColor;if(T&&T.Type==2){var s=g8.Qc(o);T.Type=1;T.Values=[1,s.i/255,s.m/255,s.P/255]}}};
|
|
g8.rX=function($,o){var T;if(g8.tb($.h3)==1){var s=g8.Hs($.h3);T=new df(0,0,s[2]-s[0],s[3]-s[1])}else{T=o._Y();
|
|
if(o.tV){var E=o.tV.clone(),e=L.M.Uo(T);L.M.t(e.I,E,e.I);T=L.M.L3(e.I)}}return T};g8.E8=function($){var o=$[0];
|
|
for(var f=0;f<$.length;f++)o=g8.a9g(o,$[f]);return o};g8.a9g=function($,o){var T={};for(var s in $)if(JSON.stringify($[s])==JSON.stringify(o[s]))T[s]=$[s];
|
|
return T};g8.PL=function($,o){var T=$.Nd,s=-1;for(var f=0;f<T.length;f++)if(T[f].Name==o)s=f;if(s==-1){s=T.length;
|
|
T.push({FontType:1,Name:o,Script:0,Synthetic:0})}$.oH.Font=s};g8.m5=function($){return $.EngineDict.Editor.Text.replace(/\r/g,"\n").replace(/\u0003/g,"\n")};
|
|
g8._f=function($,o){$.EngineDict.Editor.Text=o.replace(/\n/g,"\r")};g8.tb=function($){return $.Curve&&$.Curve.TextOnPathTRange[0]>=0?2:$.EngineDict.Rendered.Shapes.Children[0].ShapeType};
|
|
g8.I8=function($,o){var T=$.EngineDict.Rendered.Shapes.Children[0];T.ShapeType=o;var s=T.Cookie.Photoshop;
|
|
s.ShapeType=o;s.Base.ShapeType=o;if(o==0){delete s.BoxBounds;s.PointBase=[0,0]}if(o==1){delete s.PointBase;
|
|
s.BoxBounds=[0,0,1,1]}};g8.Hs=function($){return $.EngineDict.Rendered.Shapes.Children[0].Cookie.Photoshop.BoxBounds};
|
|
g8.bi=function($,o){$.EngineDict.Rendered.Shapes.Children[0].Cookie.Photoshop.BoxBounds=o};g8.a9_=function($,o){return g8.af1($,g8.bB($,o))};
|
|
g8.bB=function($,o){var T=$.EngineDict.StyleRun.RunLengthArray;return g8.j6(T,o).b1};g8.af1=function($,o){var T=$.ResourceDict.StyleSheetSet[0].StyleSheetData,s={};
|
|
for(var E in T)s[E]=T[E];var e=$.EngineDict.StyleRun.RunArray[o].StyleSheet.StyleSheetData;g8.fa(s,e);
|
|
return s};g8.am2=function($,o){var T=$.ResourceDict.ParagraphSheetSet[0].Properties,s={};for(var E in T)s[E]=T[E];
|
|
var e=$.EngineDict.ParagraphRun.RunArray[o].ParagraphSheet.Properties;g8.fa(s,e);var n=["StartIndent","EndIndent","FirstLineIndent"];
|
|
for(var f=0;f<3;f++)if(s[n[f]]==null)s[n[f]]=0;return s};g8.YN=function($,o,T){if(T=="")return;var s=g8.m5($);
|
|
g8._f($,s.substring(0,o)+T+s.substring(o,s.length));var E=$.EngineDict.StyleRun,e=E.RunLengthArray,n=g8.j6(e,o-1);
|
|
e[n.b1]+=T.length;var A=$.EngineDict.ParagraphRun,e=A.RunLengthArray,u=g8.j6(e,o),Y=T.split("\n");if(Y.length==1){e[u.b1]+=T.length;
|
|
return}e.splice(u.b1+1,0,e[u.b1]-(o-u.t7));A.RunArray.splice(u.b1+1,0,g8.Qz(A.RunArray[u.b1]));e[u.b1]-=e[u.b1+1];
|
|
e[u.b1]+=Y[0].length+1;for(var f=1;f<Y.length-1;f++){A.RunArray.splice(u.b1+f,0,g8.Qz(A.RunArray[u.b1+f-1]));
|
|
A.RunLengthArray.splice(u.b1+f,0,Y[f].length+1)}e[u.b1+Y.length-1]+=Y[Y.length-1].length};g8.t1=function($,o,T){var s=g8.m5($);
|
|
g8._f($,s.substring(0,o)+s.substring(T,s.length));g8.g2($.EngineDict.ParagraphRun,o,T,!0);g8.g2($.EngineDict.StyleRun,o,T,!1)};
|
|
g8.g2=function($,o,T,s){var E=$.RunLengthArray,e=g8.j6(E,o),n=g8.j6(E,T),A=[];for(var f=0;f<E.length;
|
|
f++)for(var u=0;u<E[f];u++)A.push(f);A.splice(o,T-o);var Y=[];for(var f=0;f<E.length;f++)Y.push(0);for(var f=0;
|
|
f<A.length;f++)Y[A[f]]++;for(var f=0;f<E.length;f++){if(Y[f]==0){Y.splice(f,1);E.splice(f,1);$.RunArray.splice(f,1);
|
|
f--}else if(Y[f]<E[f])E[f]=Y[f]}if(s&&e.b1!=n.b1&&e.t7!=o){E[e.b1]+=E[e.b1+1];E.splice(e.b1+1,1);$.RunArray.splice(e.b1+1,1)}};
|
|
g8.zA=function($,o,T,s){var E=$.EngineDict.Editor.Text.length;if(T==E-2)T++;if(s.oH.Font!=null)$.ResourceDict.FontSet=s.Nd.slice(0);
|
|
if(o<=T)g8.qt($.EngineDict.StyleRun,s.oH,o,T,!0);g8.qt($.EngineDict.ParagraphRun,s.CL,o,T,!1)};g8.qt=function($,o,T,s,E){var e=$.RunLengthArray;
|
|
if(E){var n=g8.j6(e,T);if(n.t7!=T){var A=e[n.b1];e.splice(n.b1,0,T-n.t7);e[n.b1+1]=A-e[n.b1];$.RunArray.splice(n.b1+1,0,g8.Qz($.RunArray[n.b1]))}var u=g8.j6(e,s);
|
|
if(u.t7+e[u.b1]-1!=s){var A=e[u.b1];e.splice(u.b1,0,s-u.t7+1);e[u.b1+1]=A-e[u.b1];$.RunArray.splice(u.b1+1,0,g8.Qz($.RunArray[u.b1]))}}var n=g8.j6(e,T),u=g8.j6(e,s);
|
|
if(E)for(var f=n.b1;f<=u.b1;f++)g8.fa($.RunArray[f].StyleSheet.StyleSheetData,o);else for(var f=n.b1;
|
|
f<=u.b1;f++)g8.fa($.RunArray[f].ParagraphSheet.Properties,o)};g8.abN=function($,o,T){var s=$.EngineDict.StyleRun.RunLengthArray,E=[],e=0;
|
|
for(var f=0;f<s.length;f++){var n=s[f];for(var A=0;A<n;A++)if(o<=e+A&&e+A<T)E.push(f);e+=n}var u=E[0],Y=[];
|
|
for(var f=0;f<E.length;f++){var b=E[f]-u;if(b==Y.length)Y.push(0);Y[b]++}return Y};g8.a5p=function($){var o=$.EngineDict.StyleRun,T=o.RunArray,s=o.RunLengthArray;
|
|
for(var f=0;f<s.length-1;f++){var E=T[f].StyleSheet.StyleSheetData,e=T[f+1].StyleSheet.StyleSheetData;
|
|
if(JSON.stringify(E)==JSON.stringify(e)){T.splice(f+1,1);s[f]+=s[f+1];s.splice(f+1,1);f--}}};g8.rT=function($){var o=$.Fh.AntA.v.Annt;
|
|
o=["Anno","antiAliasSharp","AnCr","AnSt","AnSm"].indexOf(o);if(o==-1)o=1;return o};g8.ce=function($,o){$.Fh.AntA.v.Annt=["Anno","antiAliasSharp","AnCr","AnSt","AnSm"][o]};
|
|
g8.$Q=function($,o,T){var s={Nd:$.ResourceDict.FontSet.slice(0),oH:[],CL:[]},E=$.EngineDict.StyleRun.RunLengthArray,e=g8.j6(E,o).b1,n=g8.j6(E,T).b1;
|
|
for(var f=e;f<=n;f++){var A=g8.Qz($.ResourceDict.StyleSheetSet[0].StyleSheetData),u=$.EngineDict.StyleRun.RunArray;
|
|
if(u.length==0)continue;var Y=u[f].StyleSheet.StyleSheetData;g8.fa(A,Y);s.oH.push(A)}var b=$.EngineDict.ParagraphRun.RunLengthArray,a=g8.j6(b,o).b1,w=g8.j6(b,T).b1;
|
|
for(var f=a;f<=w;f++){var X=$.EngineDict.ParagraphRun.RunArray;if(X.length==0)continue;s.CL.push(g8.Qz(X[f].ParagraphSheet.Properties))}s.oH=s.oH.length==0?{}:g8.E8(s.oH);
|
|
s.CL=s.CL.length==0?{}:g8.E8(s.CL);return s};g8.HH=function($,o){var T,s;T=["FontSize","Leading","BaselineShift"];
|
|
s=$.oH;for(var f=0;f<T.length;f++)if(s[T[f]]!=null)s[T[f]]*=o;T=["StartIndent","EndIndent","FirstLineIndent","SpaceBefore","SpaceAfter"];
|
|
s=$.CL;for(var f=0;f<T.length;f++)if(s[T[f]]!=null)s[T[f]]*=o};g8.a5B=function(){return g8.$Q(g8.y5,0,0)};
|
|
g8.dk=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}}};
|
|
g8.j6=function($,o){var T=0,f=0;while(T+$[f]<=o){T+=$[f];f++}return{b1:f,t7:T}};g8.dD=function(){var $=g8.Qz(this.y5);
|
|
return $};g8.rj={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,_ComposerEngine:1};
|
|
g8.a7E={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};
|
|
g8.y5={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(g8.rj))},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(g8.rj))}],StyleSheetSet:[{Name:"Normal RGB",StyleSheetData:JSON.parse(JSON.stringify(g8.a7E))}],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 c8={};c8.aps=function($){var o=c8.a12($._0,$._1);c8.agb(o,$._0);return o};c8.aed=function($,o,T){var s={};
|
|
s._98={_0:"i7"};s._0=c8.aam($,o,T?T._0:null);s._1=c8.acV($,o,s._0,T?T._1:null);return s};c8.aam=function($,o,T){var s={};
|
|
s._1=c8.am4($,T?T._1:null);s._2={_0:[{_0:{_0:"s"}}],_1:[{_0:"i0"}]};s._3=JSON.parse(JSON.stringify(c8.aiW));
|
|
s._4=JSON.parse(JSON.stringify(c8.a48));s._5=c8.aeW($,s._1._0,T?T._5:null);s._6=c8.a7d($,T?T._6:null);
|
|
s._8=c8.aft($,o,T?T._8:null);s._9=c8.aiZ;return s};c8.agb=function($,o){c8.a7g($,o._5,o._1._0)};c8.am4=function($,o){var T=[],s=[];
|
|
for(var f=0;f<$.length;f++){var E=$[f].ResourceDict.FontSet;for(var e=0;e<E.length;e++){var n=E[e];if(s.indexOf(n.Name)!=-1)continue;
|
|
T.push(n);s.push(n.Name)}}var A={_0:[]};for(var f=0;f<T.length;f++){var u=T[f],Y={_0:{_99:"/CoolTypeFont",_0:{_0:"s"+u.Name,_1:"i"+u.Script,_2:"i"+u.FontType}}};
|
|
if(u.Script==0)delete Y._0._0._1;A._0.push(Y)}return A};c8.aeW=function($,o,T){var s={_0:[],_1:[]},E={_0:JSON.parse(JSON.stringify(c8.tA))};
|
|
c8.XU(E._0,$[0].ResourceDict.StyleSheetSet[0],o,$[0].ResourceDict.FontSet);s._0.push(E);s._1.push({_0:"i0"});
|
|
s._0.push({_0:{_0:"sNone",_5:"i0",_6:{}}});s._1.push({_0:"i1"});return s};c8.a7g=function($,o,T){var s=o._0[0];
|
|
for(var f=0;f<$.length;f++)c8.Ob(s._0,$[f].ResourceDict.StyleSheetSet[0],T,$[f].ResourceDict.FontSet)};
|
|
c8.a7d=function($,o){var T={_0:[],_1:[]},s={_0:JSON.parse(JSON.stringify(c8.EQ))};c8.wj(s._0,$[0].ResourceDict.ParagraphSheetSet[0]);
|
|
T._0.push(s);T._1.push({_0:"i0"});s={_0:JSON.parse(JSON.stringify(c8.EQ))};c8.wj(s._0,$[0].ResourceDict.ParagraphSheetSet[0]);
|
|
s._0._0="sBasic Paragraph";s._0._6="i0";T._0.push(s);T._1.push({_0:"i1"});return T};c8.aft=function($,o,T){var s={_0:[]};
|
|
for(var f=0;f<$.length;f++){var E=$[f].Curve,e={};s._0.push({_0:e});var n=g8.tb($[f]);e._2={};e._2._0="i"+n;
|
|
if($[f]._LineOrientation==2)e._2._1="i2";if(n==0){e._2._6=["f-1","f-1"];e._2._11={_4:"i-1",_7:!1}}else if(n==1&&E==null){var A=g8.Hs($[f]),u=A[2],Y=A[3];
|
|
e._1={_0:c8.QJ("f",[0,0,0,0,u,0,u,0,u,0,u,0,u,Y,u,Y,u,Y,u,Y,0,Y,0,Y,0,Y,0,Y,0,0,0,0])};e._2._6=["f-2","f-2"];
|
|
e._2._11={_4:"i-2",_7:!1}}else if(n==1){var A=g8.Hs($[f]),u=A[2],Y=A[3];e._1={_0:c8.QJ("f",E.Points)};
|
|
e._2._6=["f-3","f-3"];e._2._11={_4:"i-3",_7:!1}}else if(n==2){e._1={_0:c8.QJ("f",E.Points)};e._2._6=c8.QJ("f",E.TextOnPathTRange);
|
|
e._2._11={_0:E.Reversed,_3:"i0",_5:"f0",_7:!1}}}return s};c8.acV=function($,o,T,s){var E={};E._0=JSON.parse(JSON.stringify(c8.a22));
|
|
E._1=c8.akI($,o,T,s?s._1:null);E._2=JSON.parse(JSON.stringify(c8.tA._6));E._3=JSON.parse(JSON.stringify(c8.EQ._5));
|
|
return E};c8.a12=function($,o){return c8.ag9($,o._1)};c8.akI=function($,o,T,s){var E=[],e=T._1._0;for(var f=0;
|
|
f<$.length;f++){var n=$[f],A={_0:{}};E.push(A);var u=s?s[f]:null;A._0._0="s"+n.EngineDict.Editor.Text;
|
|
A._0._0=A._0._0;var Y={_0:[]};A._0._5=Y;var b=n.EngineDict.ParagraphRun;for(var a=0;a<b.RunArray.length;
|
|
a++){var w={_0:{}};Y._0.push(w);w._0._0={_0:"s",_5:{},_6:"i1"};c8.wj(w._0._0,b.RunArray[a].ParagraphSheet);
|
|
w._1="i"+b.RunLengthArray[a]}var X={_0:[]};A._0._6=X;var N=u?u._0._6:null;b=n.EngineDict.StyleRun;for(var a=0;
|
|
a<b.RunArray.length;a++){var z={_0:{}};X._0.push(z);var i=N?N._0:null;z._0._0={_0:"s",_5:"i1",_6:{}};
|
|
c8.XU(z._0._0,b.RunArray[a].StyleSheet,e,n.ResourceDict.FontSet,i?z._0._0:null);z._1="i"+b.RunLengthArray[a]}A._0._10={_0:"i4",_2:!0};
|
|
A._1=c8.view.a7h(n,null,f,null)}return E};c8.ag9=function($,o){var T=[],s=$._1._0;for(var f=0;f<o.length;
|
|
f++){var E=g8.dD();T.push(E);var e=o[f];E.EngineDict.Editor.Text=e._0._0.slice(1);var n=E.EngineDict.ParagraphRun.RunArray[0],A=E.EngineDict.ParagraphRun,u=e._0._5;
|
|
if(u)for(var Y=0;Y<u._0.length;Y++){var b=u._0[Y];A.RunLengthArray[Y]=parseInt(b._1.slice(1));A.RunArray[Y]=JSON.parse(JSON.stringify(n));
|
|
c8.a1Y(b._0._0,A.RunArray[Y].ParagraphSheet)}else{A.RunLengthArray[0]=g8.m5(E).length}var a=e._0._6;
|
|
A=E.EngineDict.StyleRun;if(a)for(var Y=0;Y<a._0.length;Y++){var w=a._0[Y];A.RunLengthArray[Y]=parseInt(w._1.slice(1));
|
|
A.RunArray[Y]={StyleSheet:{StyleSheetData:{}}};c8.Ob(w._0._0,A.RunArray[Y].StyleSheet,s,E.ResourceDict.FontSet)}else{A.RunLengthArray[0]=g8.m5(E).length;
|
|
A.RunArray[0]={StyleSheet:{StyleSheetData:{}}}}}return T};c8.XU=function($,o,T,s,E){$._0="s"+(o.Name?o.Name:"");
|
|
var e=$._6,n=E?E._6:null,A=o.StyleSheetData;if(A.Font==null)return;var u=s[A.Font].Name,Y=-1;for(var f=0;
|
|
f<T.length;f++)if("s"+u==T[f]._0._0._0){Y=f;break}e._0="i"+Y;if(A.FontSize!=null)e._1="f"+A.FontSize;
|
|
if(A.FauxBold!=null)e._2=A.FauxBold;if(A.FauxItalic!=null)e._3=A.FauxItalic;if(A.AutoLeading!=null)e._4=A.AutoLeading;
|
|
if(A.Leading!=null)e._5="f"+A.Leading;if(A.HorizontalScale!=null)e._6="f"+A.HorizontalScale;if(A.VerticalScale!=null)e._7="f"+A.VerticalScale;
|
|
if(A.Tracking!=null)e._8="i"+A.Tracking;if(A.BaselineShift!=null)e._9="f"+A.BaselineShift;if(A.AutoKerning!=null)e._11="i"+(A.AutoKerning?1:0);
|
|
if(A.FontCaps!=null)e._12="i"+A.FontCaps;if(A.FontBaseline!=null)e._13="i"+A.FontBaseline;if(A.Strikethrough!=null)e._15="i"+(A.Strikethrough?1:0);
|
|
if(A.Underline!=null)e._16="i"+(A.Underline?2:0);if(A.Ligatures!=null)e._18=A.Ligatures;if(A.DLigatures!=null)e._19=A.DLigatures;
|
|
if(A.BaselineDirection!=null)e._35="i"+A.BaselineDirection;if(A.Language!=null)e._38="i"+A.Language;
|
|
if(A.FillColor!=null)e._53={_99:"/SimplePaint",_0:{_0:"i1",_1:c8.QJ("f",A.FillColor.Values)}}};c8.Ob=function($,o,T,s){var E=$._6;
|
|
if(E==null)return;var e=o.StyleSheetData;if(E._0){var n=parseInt(E._0.slice(1)),A=T[n]._0._0._0.slice(1);
|
|
g8.PL({oH:e,Nd:s},A)}if(E._1!=null)e.FontSize=parseFloat(E._1.slice(1));if(E._2!=null)e.FauxBold=E._2;
|
|
if(E._3!=null)e.FauxItalic=E._3;if(E._4!=null)e.AutoLeading=E._4;if(E._5!=null)e.Leading=parseFloat(E._5.slice(1));
|
|
if(E._6!=null)e.HorizontalScale=parseFloat(E._6.slice(1));if(E._7!=null)e.VerticalScale=parseFloat(E._7.slice(1));
|
|
if(E._8!=null)e.Tracking=parseFloat(E._8.slice(1));if(E._9!=null)e.BaselineShift=parseFloat(E._9.slice(1));
|
|
if(E._11!=null)e.AutoKerning=parseFloat(E._11.slice(1))==1;if(E._12!=null)e.FontCaps=parseFloat(E._12.slice(1));
|
|
if(E._13!=null)e.FontBaseline=parseFloat(E._13.slice(1));if(E._15!=null)e.Strikethrough=parseFloat(E._15.slice(1))==1;
|
|
if(E._16!=null)e.Underline=parseFloat(E._16.slice(1))==1;if(E._18!=null)e.Ligatures=E._18;if(E._19!=null)e.DLigatures=E._19;
|
|
if(E._35!=null)e.BaselineDirection=parseFloat(E._35.slice(1));if(E._38!=null)e.Language=parseFloat(E._38.slice(1));
|
|
var u=E._53;if(u){var Y=u._0._0,b=u._0._1,a=[1,0,0,0],w=[];for(var f=0;f<b.length;f++)w[f]=parseFloat(b[f].slice(1));
|
|
if(Y=="i0")a[1]=a[2]=a[3]=w[1];else if(Y=="i1")a=w;else if(Y=="i2")a=[1].concat(UDOC.C.cmykToRgb(w.slice(1)));
|
|
else console.log("unknown color type",Y,w);e.FillColor={Type:1,Values:a}}};c8.wj=function($,o){$._0="s"+(o.Name?o.Name:"");
|
|
var T=$._5,s=o.Properties;if(s.Justification!=null)T._0="i"+s.Justification;if(s.FirstLineIndent!=null)T._1="f"+s.FirstLineIndent;
|
|
if(s.StartIndent!=null)T._2="f"+s.StartIndent;if(s.EndtIndent!=null)T._3="f"+s.EndtIndent;if(s.SpaceBefore!=null)T._4="f"+s.SpaceBefore;
|
|
if(s.SpaceAfter!=null)T._5="f"+s.SpaceAfter;if(s.AutoHyphenate!=null)T._9=s.AutoHyphenate;if(s._Direction!=null)T._33="i"+s._Direction;
|
|
if(s._ComposerEngine!=null)T._35="i"+s._ComposerEngine};c8.a1Y=function($,o){var T=$._5;if(T==null)return;
|
|
var s=o.Properties;if(T._0)s.Justification=parseInt(T._0.slice(1))};c8.QJ=function($,o){var T=[];for(var f=0;
|
|
f<o.length;f++)T.push($+o[f]);return T};c8.aiW={_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"}]};
|
|
c8.a48={_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"}]};
|
|
c8.tA={_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}};
|
|
c8.EQ={_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"}};
|
|
c8.aiZ={_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"}]};
|
|
c8.a22={_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 iB={};iB.g8=function($){return iB.eb($,iB.pp,0)};iB.amB=function($){return iB.U6($,iB.pp)};iB.eb=function($,o,T){var s;
|
|
if(typeof $=="string")return $;if($ instanceof Array){s=[];for(var f=0;f<$.length;f++)s[f]=iB.eb($[f],o,T+1)}else{s={};
|
|
var E={};for(var e in o){var n=o[e],A="_"+n[0];if($[A]!=null){s[e]=n[1]?iB.eb($[A],n[1],T+1):$[A];E[A]=!0}}for(var e in $){if(E[e]==null){console.log(o,E);
|
|
console.log(e,$);throw"e"}}}return s};iB.U6=function($,o){var T;if(typeof $=="string")return $;else if($ instanceof Array){T=[];
|
|
for(var f=0;f<$.length;f++)T[f]=iB.U6($[f],o)}else{T={};var s={};for(var E in o){var e=o[E],n="_"+e[0];
|
|
if($[E]!=null){T[n]=e[1]?iB.U6($[E],e[1]):$[E];s[E]=!0}}for(var E in $){if(s[E]==null){console.log(o,s);
|
|
console.log(E,$);throw"e"}}}return T};iB.G5={_Color:[0,{_Type:[0],_Values:[1]}],_CAIKnownStyleID:[5],_StreamTag:[99]};
|
|
iB.C3={_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,iB.G5],_StrokeColor:[54,iB.G5],_Blend:[55,{_3:[3],_Knockout:[4],_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,iB.G5],_FillBackgroundFlag:[80],_UnderlineStyle:[81],_DashedUnderlineGapLength:[82],_DashedUnderlineDashLength:[83],_SlashedZero:[84],_StylisticSets:[85],_CustomFeature:[86,{_StreamTag:[99]}],_MarkYDistFromBaseline:[87],_AutoMydfb:[88]};
|
|
iB.ad={_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,iB.C3],_ParagraphDirection:[33],_JustificationMethod:[34],_ComposerEngine:[35],_ListStyle:[36],_ListTier:[37],_ListSkip:[38],_ListOffset:[39],_KashidaWidth:[40]};
|
|
iB.Zp={_Name:[0],_Features:[5,iB.ad],_Parent:[6],_97:[97]};iB.sB={_Name:[0],_Parent:[5],_Features:[6,iB.C3],_97:[97]};
|
|
iB.pp={_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]}],_97:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}],_MojiKumiCodeToClassSet:[2,{_Resources:[0,{_Resource:[0,{_Name:[0],_Members:[5],_97:[97]}]}],_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]}],_97:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}],_KinsokuSet:[4,{_Resources:[0,{_Resource:[0,{_Name:[0],_Data:[5,{_NoStart:[0],_NoEnd:[1],_Keep:[2],_Hanging:[3],_PredefinedTag:[4]}],_97:[97]}]}],_DisplayList:[1,{_Resource:[0]}]}],_StyleSheetSet:[5,{_Resources:[0,{_Resource:[0,iB.sB]}],_DisplayList:[1,{_Resource:[0]}]}],_ParagraphSheetSet:[6,{_Resources:[0,{_Resource:[0,iB.Zp]}],_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],_6:[6],_7:[7],_18:[18]}],_12:[12]}],_97:[97]}]}]}],_ListStyleSet:[9,{_Resources:[0,{_Resource:[0,{_Name:[0],_5:[5,{_0:[0],_1:[1],_2:[2],_3:[3],_5:[5,{_0:[0],_1:[1],_3:[3],_99:[99]}],_6:[6]}],_PredefinedTag:[6],_97:[97]}]}],_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]}],_10:[10],_11:[11],_LinguisticSettings:[15,{_PreferredProvider:[0],_LinguisticProviderInfo:[1]}],_UseSmartLists:[16],_DefaultStoryDir:[17],_18:[18],_GreekingSize:[20]}],_TextObjects:[1,{_Model:[0,{_Text:[0],_ParagraphRun:[5,{_RunArray:[0,{_RunData:[0,{_ParagraphSheet:[0,iB.Zp]}],_Length:[1]}]}],_StyleRun:[6,{_RunArray:[0,{_RunData:[0,{_StyleSheet:[0,iB.sB]}],_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,iB.C3],_OriginalNormalParagraphFeatures:[3,iB.ad]}]};
|
|
c8.view={};c8.view.a7h=function($,o,T,s){var E={},e=g8.tb($);E._0=[{_0:"i"+T}];return E};function CSS(){}CSS.aiK=function($,o){var T=$.add,s=T.vmsk,E=T.vstk,e=T.lmfx,n=T.TySh,A=[],u=CSS.a1Z(e,T);
|
|
if($.d5()&&s){var Y=L.A.hT(s.g);if(!Y.p4()){A.push("width: "+Math.round(Y.d)+"px");A.push("height: "+Math.round(Y.w)+"px")}var b=L.A.ap3(s.g);
|
|
if(b>0)A.push("border-radius: "+Math.round(b)+"px")}else if(n){var a=n.h3;if(g8.tb(a)==1){var Y=g8.Hs(a);
|
|
A.push("width: "+Math.round(Y[2])+"px");A.push("height: "+Math.round(Y[3])+"px")}CSS.LL(A,g8.$Q(a,0,0),n.t,!1,!1,u[0])}var w=[],X=e?e.dropShadowMulti.v:0;
|
|
for(var f=0;f<X.length;f++){var N=X[f].v;if(N.enab.v){var z=N.Dstn.v.val,i=N.lagl.v.val*Math.PI/180;
|
|
if(N.uglg&&N.uglg.v)i=o.ou()*Math.PI/180;var k=z*Math.cos(i),Q=z*Math.sin(i);w.push("drop-shadow("+(k==0?"0 ":CSS.S2(-k)+"px ")+(Q==0?"0 ":CSS.S2(Q)+"px ")+N.blur.v.val/2+"px "+CSS.Jr(N.Clr.v,N.Opct.v.val/100)+")")}}if(w.length!=0)A.push("filter: "+w.join(" "));
|
|
if(n==null)CSS.aly(u,A);if(E==null||!E.strokeEnabled.v)E=fW.oU(e);if(E&&E.strokeEnabled.v){var O=E.strokeStyleContent.v,c=O.classID,B=ev.ci.JZ.indexOf(E.strokeStyleLineCapType.v.strokeStyleLineCapType),G=ev.ci.join.indexOf(E.strokeStyleLineJoinType.v.strokeStyleLineJoinType),l=E.strokeStyleOpacity.v.val/100,v=E.strokeStyleLineWidth.v.val,p="";
|
|
if(c=="solidColorLayer")p=CSS.Jr(O.Clr.v,l);A.push("border: "+v+"px solid "+p)}return A};CSS.a1Z=function($,o){var T=fW.l_($,o),s=T[0],E=T[1],e,n;
|
|
if(s){e=CSS.Jr(s.Clr.v,o.iOpa!=null?o.iOpa/255:1)}else if(E){n=CSS.q6(E)}return[e,n]};CSS.aly=function($,o){if($[0])o.push("background-color: "+$[0]);
|
|
if($[1])o.push("background-image: "+$[1])};CSS.gn={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.S2=function(J){return""+parseFloat(J.toFixed(3))};CSS.So=function($){if($==null)return{i:0,m:0,P:0};
|
|
var o=$.indexOf("(");if(o!=-1){var T=$.slice(o+1,$.length-1).split(",");for(var f=0;f<T.length;f++){var s=T[f].trim();
|
|
T[f]=parseFloat(s)*(s.endsWith("%")?255/100:1)}return{i:T[0],m:T[1],P:T[2]}}if($.charAt(0)!="#"){var E=CSS.gn;
|
|
if(E[$])$=E[$];else console.log("unknown color "+$)}$=$.slice(1);if($.length==3)$=$[0]+$[0]+$[1]+$[1]+$[2]+$[2];
|
|
$=parseInt($,16);return{i:$>>16&255,m:$>>8&255,P:$&255}};CSS.Jr=function($,o){return CSS.xr(L.h.Qc($),o)};
|
|
CSS.xr=function($,o){if(o==null)o=1;var T=Math.round($.i),s=Math.round($.m),E=Math.round($.P),e=T<<16|s<<8|E;
|
|
return o==1?"#"+L.B$(e):"rgba("+T+","+s+","+E+","+o+")"};CSS.q6=function($){var o=$.Grad.v;if(o.Clrs==null)return"";
|
|
var T=o.Clrs.v.slice(0),s=o.Trns.v.slice(0),E=$.Ofst.v,e=$.Type.v.GrdT=="Rdl"?1:0,n=(e==1?"radial":"linear")+"-gradient",A=e==0?Math.round(-$.Angl.v.val+90)+"deg":"circle at center",u=$.Rvrs.v;
|
|
if(u){T.reverse();s.reverse()}for(var f=0;f<T.length;f++){var Y=T[f].v,b=f<s.length?s[f].v.Opct.v.val/100:1,a=Y.Lctn.v/4096;
|
|
if(u)a=1-a;A+=", "+CSS.Jr(Y.Clr.v,b)+" "+Math.round(a*100)+"%"}return n+"("+A+")"};CSS.LL=function($,o,T,s,E,e){var n=o.oH,A=s?1:D.p.jZ(T),u=Math.round(n.FontSize*A);
|
|
$.push("font-size: "+u+"px");var Y=n.Tracking;if(!s&&Y!=null&&Y!=0)$.push("letter-spacing: "+Math.round(Y*u/1e3)+"px");
|
|
if(!n.AutoLeading)$.push("line-height: "+Math.round(n.Leading*A)+"px");if(n.Strikethrough)$.push("text-decoration: line-through");
|
|
var b=g8.Qc(n);b=[b.i,b.m,b.P].map(Math.round);$.push((s?"fill: ":"color: ")+(e?e:"#"+L.B$(b[0]<<16|b[1]<<8|b[2])));
|
|
var a=o.Nd[n.Font].Name;if(a){var w=hx.CJ.sU(a),X="",N=null,z=null;if(w!=null&&a!=hx.yX(w))w=null;if(E&&w)X+="\""+a+"\", ";
|
|
var i=a.toLowerCase();if(w){N=hx.qV(w)[0];if(w["OS/2"])z=w["OS/2"].usWeightClass}else{N=CSS.a0P(a);if(i.indexOf("light")!=-1)z=300;
|
|
else if(i.indexOf("medium")!=-1)z=500;else if(i.indexOf("black")!=-1||i.indexOf("extrabold")!=-1)z=800;
|
|
else if(i.indexOf("bold")!=-1)z="bold"}if(N!=null)X+="\""+N+"\"";if(z!=null)$.push("font-weight: "+z);
|
|
if(i.indexOf("italic")!=-1||i.indexOf("oblique")!=-1)$.push("font-style: italic");if(X)$.push("font-family: "+X)}var k=o.CL.Justification;
|
|
if(k!=null&&k!=0)if(s)$.push("text-anchor: "+["start","end","middle"][k%3]);else $.push("text-align: "+["left","right","center"][k%3])};
|
|
CSS.a0P=function($){$=$.split("-")[0];while($.endsWith("MT")||$.endsWith("PS"))$=$.slice(0,$.length-2);
|
|
var o=!0;for(var f=0;f<$.length;f++){var T=$.charAt(f);if(!o&&T.toLowerCase()!=T){$=$.slice(0,f)+" "+$.slice(f);
|
|
f++;o=!0}else o=!1}return $};function gi(){}gi.uk={document:!0,parent:!0,top:!0,eval:!0,postMessage:!0,UTIF:!0,PIMG:!0,LNG:!0,FNTS:!0};
|
|
gi.Wc=function($,o){var T=Date.now(),s;try{s=acorn.parse($)}catch(aX){console.log(aX);return}var E=JSON.parse(JSON.stringify(gi.mC.uc));
|
|
E.__return=!1;E.__continue=!1;E.__break=!1;E.__throw=!1;E.__fs={};E.__window={};gi.eval(s,o,E);var e=E.__fs;
|
|
if(Object.keys(e).length!=0){var n=UZIP.encode(e);fV.save(n,"output.zip")}};gi.eval=function($,o,T){var s=$.type;
|
|
if(!1){}else if(s=="Program"||s=="BlockStatement"){var E=$.body;for(var f=0;f<E.length;f++){var e=E[f].type;
|
|
if(e=="FunctionDeclaration")T[E[f].id.name]=E[f]}for(var f=0;f<E.length;f++){var e=E[f].type,n=gi.eval(E[f],o,T);
|
|
if(T.__continue){T.__continue=!1;return n}if(T.__return||T.__break||T.__throw)return n}}else if(s=="ReturnStatement"){T.__return=!0;
|
|
return $.argument?gi.cC($.argument,o,T):null}else if(s=="BreakStatement"){T.__break=!0}else if(s=="ContinueStatement"){T.__continue=!0}else if(s=="VariableDeclaration"){var A=$.declarations;
|
|
for(var f=0;f<A.length;f++)gi.eval(A[f],o,T)}else if(s=="VariableDeclarator"){T[$.id.name]=$.init?gi.cC($.init,o,T):null}else if(s=="FunctionDeclaration"){T[$.id.name]=$}else if(s=="MemberExpression"){var u=gi.cC($.object,o,T),Y=$.computed?gi.cC($.property,o,T):gi.eval($.property,o,T),n;
|
|
if(u.xR!=null)n=gi.mC.BU(u,Y,o,T);else if(u==window&&gi.uk[Y]){}else n=u[Y];return n}else if(s=="ArrayExpression"){var b=[],a=$.elements;
|
|
for(var f=0;f<a.length;f++)b.push(gi.cC(a[f],o,T));return b}else if(s=="ObjectExpression"){var b={},a=$.properties;
|
|
for(var f=0;f<a.length;f++){var w=a[f],X=a[f].key.name?a[f].key.name:a[f].key.value;b[X]=gi.cC(a[f].value,o,T)}return b}else if(s=="ExpressionStatement"){return gi.eval($.expression,o,T)}else if(s=="NewExpression"){var N=$.arguments,z=$.callee,i=z.type,k=[],b=null;
|
|
for(var f=0;f<N.length;f++)k.push(gi.cC(N[f],o,T));if(i=="Identifier")b=gi.mC.agY(z.name,k,o,T);else throw"e";
|
|
if(b==null)throw"new "+z.name;return b}else if(s=="CallExpression"){var N=$.arguments,z=$.callee,i=z.type,Q={};
|
|
for(var O in T)Q[O]=T[O];var k=[];for(var f=0;f<N.length;f++)k.push(gi.cC(N[f],o,T));if(i=="Identifier"){var c=z.name,B=T[c];
|
|
if(B){if(B.params){var G=B.params;for(var f=0;f<G.length;f++)Q[G[f].name]=k[f];return gi.eval(B.body,o,Q)}else{return B.apply(null,k)}}else if(gi.mC.al6.indexOf(c)!=-1)return gi.mC.de({xR:"Application"},c,k,o,T);
|
|
else if(window[c]==null)console.log("Unknown function "+c);else if(gi.uk[c])alert(c+"() not available");
|
|
else{var l=window[c].apply(window,k);return l}}else if(i=="MemberExpression"){var u=gi.cC(z.object,o,T),Y=z.computed?gi.cC(z.property,o,T):gi.eval(z.property,o,T);
|
|
if(u==window&&gi.uk[Y])return;if(u.xR!=null)return gi.mC.de(u,Y,k,o,T);else return u[Y].apply(u,k)}else if(i=="FunctionExpression"){return gi.eval(z.body,o,T)}else console.log($)}else if(s=="AssignmentExpression"){var v=$.operator,p=$.left,P=p.type,h=gi.cC(p,o,T),j=gi.cC($.right,o,T),n=null;
|
|
if(!1){}else if(v=="=")n=j;else if(v=="+=")n=h+j;else if(v=="-=")n=h-j;else if(v=="*=")n=h*j;else if(v=="/=")n=h/j;
|
|
else if(v=="%=")n=h%j;else if(v=="&=")n=h&j;else if(v=="|=")n=h|j;else if(v=="&&=")n=h&&j;else if(v=="||=")n=h||j;
|
|
else console.log($);if(P=="Identifier"){var C=p.name;if(T.hasOwnProperty(C))T[C]=n;else T.__window[C]=n}else if(P=="MemberExpression"){var V=gi.eval(p.property,o,T),d=gi.cC(p.object,o,T);
|
|
if(d.xR!=null)gi.mC.a7t(d,V,n,o,T);else d[V]=n}else console.log($)}else if(s=="Identifier")return $.name;
|
|
else if(s=="Literal")return $.value;else if(s=="UpdateExpression"){var v=$.operator,m=$.argument.name,b=gi.cC($.argument,o,T);
|
|
if(!1){}else if(v=="++"){T[m]++;return $.prefix?T[m]:T[m]-1}else if(v=="--"){T[m]--;return $.prefix?T[m]:T[m]+1}else console.log($)}else if(s=="UnaryExpression"){var v=$.operator,R=gi.cC($.argument,o,T);
|
|
if(R.xR=="UnitValue"){if(v=="-")return-R.H;else return gi.cy(R.H,v)}else return gi.cy(R,v)}else if(s=="BinaryExpression"||s=="LogicalExpression"){var v=$.operator,p=gi.cC($.left,o,T),R=gi.cC($.right,o,T);
|
|
if(p==null||R==null)return gi.Z3(p,R,v);else if(p.xR=="UnitValue"&&R.xR=="UnitValue")return gi.Z3(p.H,R.H,v);
|
|
else if(p.xR=="UnitValue")return gi.Z3(p.H,R,v);else if(R.xR=="UnitValue"){if(v=="-")return-(p-R.H);
|
|
else return gi.Z3(p,R.H,v)}else return gi.Z3(p,R,v)}else if(s=="IfStatement"||s=="ConditionalExpression"){var g=gi.cC($.test,o,T);
|
|
if(g)return gi.eval($.consequent,o,T);else if($.alternate)return gi.eval($.alternate,o,T)}else if(s=="ForInStatement"){gi.eval($.left,o,T);
|
|
var S=$.left.declarations[0].id.name,F=gi.cC($.right,o,T);for(var O in F){T[S]=O;var q=gi.eval($.body,o,T);
|
|
if(T.__break)break;if(T.__return)return q}T.__break=!1}else if(s=="ForStatement"){gi.eval($.init,o,T);
|
|
while(gi.eval($.test,o,T)){var q=gi.eval($.body,o,T);if(T.__break)break;if(T.__return)return q;gi.eval($.update,o,T)}T.__break=!1}else if(s=="DoWhileStatement"){do{var q=gi.eval($.body,o,T);
|
|
if(T.__break)break;if(T.__return)return q}while(gi.eval($.test,o,T));T.__break=!1}else if(s=="TryStatement"){gi.eval($.block,o,T);
|
|
if(T.__throw){var W=$.handler;T[W.param.name]=T.__throw;T.__throw=!1;gi.eval(W.body,o,T);delete T[W.param.name]}}else if(s=="EmptyStatement"){}else console.log($)};
|
|
gi.Z3=function($,o,T){if(T=="+")return $+o;else if(T=="-")return $-o;else if(T=="*")return $*o;else if(T=="/")return $/o;
|
|
else if(T=="%")return $%o;else if(T=="^")return $^o;else if(T=="&")return $&o;else if(T=="&&")return $&&o;
|
|
else if(T=="|")return $|o;else if(T=="||")return $||o;else if(T=="<")return $<o;else if(T==">")return $>o;
|
|
else if(T=="==")return $==o;else if(T=="===")return $===o;else if(T=="<=")return $<=o;else if(T==">=")return $>=o;
|
|
else if(T=="!=")return $!=o;else if(T=="!==")return $!==o;else if(T=="<<")return $<<o;else if(T==">>")return $>>o;
|
|
else console.log(T)};gi.cy=function($,o){if(o=="-")return-$;else if(o=="!")return!$;else if(o=="~")return~$;
|
|
else if(o=="+")return $;else console.log(obj)};gi.cC=function($,o,T){var s=$.type;if(s=="Identifier")return gi.abq($.name,o,T);
|
|
else return gi.eval($,o,T)};gi.abq=function($,o,T){if($=="undefined")return undefined;else if(T.hasOwnProperty($))return T[$];
|
|
else if($=="app")return{xR:"Application"};else if($=="$")return{xR:"$"};else if(gi.mC.a8Q.indexOf($)!=-1)return gi.mC.BU({xR:"Application"},$,o,T);
|
|
else if(window[$]&&!gi.uk[$])return window[$];else{T[$]=null;return null}};gi.mC={};gi.mC.agY=function($,o,T,s){var E;
|
|
if($=="SolidColor")E={xR:$,H:[1,0,0,0]};if($=="RGBColor")E={xR:$,H:[1,0,0,0]};if($=="Window")E={xR:$,H:new fx(o[0],o[1],o[2])};
|
|
if($=="ExportOptionsSaveForWeb")E={xR:$,H:{Ue:"png",T0:100}};if($=="JPEGSaveOptions")E={xR:$,H:{Ue:"jpg",T0:100}};
|
|
if($=="File")E={xR:$,H:o[0]};if($=="ActionReference")E={xR:$,H:[]};if($=="ActionDescriptor")E={xR:$,H:{}};
|
|
if($=="ActionList")E={xR:$,H:[]};if($=="UnitValue")E={xR:$,H:o.length==0?0:parseFloat(o[0])};return E};
|
|
gi.mC.a8Q="activeDocument documents fonts preferences displayDialogs foregroundColor backgroundColor".split(" ");
|
|
gi.mC.al6=["charIDToTypeID","stringIDToTypeID","executeAction","executeActionGet","doAction"];gi.mC.BU=function($,o,T,s){var E=T.AJ,e=T.CK();
|
|
if(!1){}else if(o=="typename"){if($.xR=="Layer")return $.H.p3()?"LayerSet":"ArtLayer";else return $.xR}else if(["Document","Layer"].indexOf($.xR)!=-1&&["layers","artLayers","layerSets"].indexOf(o)!=-1){var n=e.root,A={xR:"Layers",_A:o,H:[]};
|
|
if($.xR=="Layer")n=e.root.BA(e.u.indexOf($.H));if(n.children==null)return null;for(var f=0;f<n.children.length;
|
|
f++){var u=n.children[f].c,Y=u.p3();if(Y&&o=="artLayers"||!Y&&o=="layerSets")continue;A.H.push({xR:"Layer",H:u})}A.H.reverse();
|
|
return A}else if($.xR=="Documents"||$.xR=="Layers"||$.xR=="HistoryStates"){if(!1){}else if(o=="length")return $.H.length;
|
|
else if(Number.isInteger(o))return $.H[o];else console.log($.xR+": unknown property ",o)}else if($.xR=="Application"){if(!1){}else if(o=="activeDocument")return{xR:"Document",H:T.CK()};
|
|
else if(o=="documents"){var A={xR:"Documents",H:[]};for(var f=0;f<T.ZB.length;f++)A.H.push({xR:"Document",H:T.ZB[f]});
|
|
return A}else if(o=="fonts")return{xR:"TextFonts"};else if(o=="preferences")return{xR:"Preferences"};
|
|
else if(o=="displayDialogs")return{xR:"DialogModes"};else if(o=="foregroundColor"||o=="backgroundColor"){var b=o[0]=="f"?E.z4:E.GR;
|
|
return{xR:"SolidColor",H:[1,(b>>>16&255)/255,(b>>>8&255)/255,(b>>>0&255)/255]}}else if(o=="UI")return{xR:"UI"};
|
|
else console.log($,o)}else if($.xR=="Document"){var e=$.H;if(!1){}else if(o=="activeLayer"){var u=e.u[e.D[0]];
|
|
return{xR:"Layer",H:u}}else if(o=="resolution")return e.fG;else if(o=="width")return e.d;else if(o=="height")return e.w;
|
|
else if(o=="name")return e.name;else if(o=="saved")return!e.i_();else if(o=="selection")return{xR:"Selection"};
|
|
else if(o=="activeHistoryState")return{xR:"HistoryState",II:e.Q5};else if(o=="source")return e.F$;else if(o=="historyStates"){var a=[];
|
|
for(var f=0;f<e.history.length;f++)a.push({xR:"HistoryState",II:f});return{xR:"HistoryStates",H:a}}else console.log($,o)}else if($.xR=="Layer"){var w={transparentPixelsLocked:0,pixelsLocked:1,positionLocked:2,allLocked:31},u=$.H;
|
|
if(!1){}else if(o=="visible")return u.N9();else if(o=="selected")return e.D.indexOf(e.u.indexOf(u))!=-1;
|
|
else if(o=="grouped")return u.WL;else if(w[o]!=null)return u.iQ(w[o]);else if(o=="opacity")return u.opacity*100/255;
|
|
else if(o=="blendMode")return u.fh;else if(o=="name")return u.getName();else if(o=="textItem")return{xR:"TextItem",H:u};
|
|
else if(o=="bounds"){var X=D.p.rX(e,[e.u.indexOf(u)]);return gi.mC.Tn(X,e)}else if(o=="parent"){var N=T.ZB;
|
|
for(var f=0;f<N.length;f++)if(N[f].u.indexOf(u)!=-1)return{xR:"Document",H:N[f]}}else if(o=="kind"){var z=gi.mC.qz;
|
|
for(var f=0;f<z.length;f++)if(u.add[z[f]]!=null)return f;return 0}else console.log($,o)}else if($.xR=="Selection"){if(!1){}else if(o=="bounds")return gi.mC.Tn(T.CK().Z.rect,e);
|
|
else console.log($,o)}else if($.xR=="TextItem"){var i=$.H.add.TySh,k=i.h3,Q=g8.m5(k),O=i.t.jZ(),c=g8.$Q(k,0,Math.max(0,Q.length-2));
|
|
if(o=="contents")return Q.slice(0,Q.length-1).replace(/\n/g,"\r");else if(o=="font")return c.oH.Font!=null?c.Nd[c.oH.Font].Name:null;
|
|
else if(o=="size")return gi.mC.Xz(c.oH.FontSize*O,e);else if(o=="leading")return gi.mC.Xz(c.oH.Leading*O,e);
|
|
else if(o=="tracking")return gi.mC.Xz(c.oH.Tracking);else if(o=="baselineShift")return gi.mC.Xz(c.oH.BaselineShift);
|
|
else if(o=="fauxBold")return c.oH.FauxBold;else if(o=="fauxItalic")return c.oH.FauxItalic;else if(o=="kind")return 1-g8.tb(k);
|
|
else if(o=="useAutoLeading")return c.CL.AutoLeading;else if(o=="hyphenation")return c.CL.AutoHyphenate;
|
|
else if(o=="justification")return gi.mC.Xz(c.CL.Justification);else if(o=="color")return{xR:"SolidColor",H:c.oH.FillColor.Values.slice(0)};
|
|
else if(o=="width"||o=="height"){var B=g8.Hs(k),G=(B[2]-B[0])*O,l=(B[3]-B[1])*O;return gi.mC.Xz(o=="width"?G:l,e)}else if(o=="position"){var v=i.t;
|
|
return gi.mC.Gy([v.Ry,v.Es],e)}else if(o=="horizontalScale"||o=="verticalScale"){var p=o[0].toUpperCase()+o.slice(1);
|
|
return Math.round(c.oH[p]*100)}else if(o=="antiAliasMethod")g8.rT(i);else console.log($,o)}else if($.xR=="Preferences"){if(o=="rulerUnits")return E.wK.Z2;
|
|
else console.log($,o)}else if($.xR=="SolidColor"){if(o=="rgb")return{xR:"RGBColor",H:$.H};else console.log($,o)}else if($.xR=="RGBColor"){var X=Math.round(255*$.H[1]),P=Math.round(255*$.H[2]),h=Math.round(255*$.H[3]);
|
|
if(!1){}else if(o=="red")return X;else if(o=="green")return P;else if(o=="blue")return h;else if(o=="hexValue")return"#"+L.B$(X<<16|P<<8|h).toUpperCase();
|
|
else console.log($,o)}else if($.xR=="UnitValue"){if(o=="value")return $.H;else throw"e"}else if($.xR=="ExportOptionsSaveForWeb"){if(o=="format")return $.H.Ue;
|
|
else if(o=="PNG8")return!1;else if(o=="quality")return $.H.T0;else throw o}else if($.xR=="JPEGSaveOptions"){return 0}else console.log($,o)};
|
|
gi.mC.Tn=function($,o){return gi.mC.Gy([$.x,$.y,$.x+$.d,$.y+$.w],o)};gi.mC.Gy=function($,o){var T=[];
|
|
for(var f=0;f<$.length;f++)T.push(gi.mC.Xz($[f],o));return T};gi.mC.hH=function($){var o=[];for(var f=0;
|
|
f<$.length;f++)o.push($[f].xR?$[f].H:$[f]);return o};gi.mC.Xz=function($,o){return{xR:"UnitValue",H:$}};
|
|
gi.mC.afw=function($,o){if($.xR=="UnitValue")return $.H;return $};gi.mC.a7t=function($,o,T,s,E){var e=new x(H.E.N,!0),n=new x(H.E.Q,!0),A=s.CK(),u=s.AJ;
|
|
if(!1){}else if($.xR=="Application"){if(!1){}else if(o=="activeDocument"){n.data={e:H.V.pl,u4:T.H};s.J(n)}else if(o=="displayDialogs"){}else console.log($,o,T)}else if($.xR=="Document"){var Y=$.H;
|
|
if(!1){}else if(o=="name"){e.U=D.Jc;e.data={e:M.Oe,H:T,aeK:!0,Yf:Y};A.RZ=!0}else if(o=="source")Y.F$=T;
|
|
else if(o=="activeLayer"){Y.D=[Y.u.indexOf(T.H)]}else if(o=="activeHistoryState"){e.U=D.Ww;e.data={e:"h_itemchange",index:T.II}}else console.log($,o)}else if($.xR=="Layer"){e.U=D.Jc;
|
|
var b={transparentPixelsLocked:0,pixelsLocked:1,positionLocked:2,allLocked:31},a=$.H,w=A.u.indexOf(a);
|
|
if(!1){}else if(o=="visible"){if(a.N9()!=T)e.data={e:M._q,c:w}}else if(o=="opacity"){e.data={e:M.dR,c:w,mI:Math.round(255*T/100)}}else if(o=="blendMode"){e.data={e:M.ZT,c:w,mI:hI.zk.indexOf(T)}}else if(o=="name"){e.data={e:M.OZ,c:w,name:T}}else if(b[o]!=null){e.data={e:M.gg,c:w,mI:[[T],[b[o]]]}}else if(o=="kind"){e.data={e:M.NI,c:w,UQ:gi.mC.qz[T]}}else if(o=="grouped"){e.data={e:M.Yv,c:w,mI:T}}else console.log($,o,T)}else if($.xR=="TextItem"){e.U=D.ko;
|
|
var a=$.H,X=a.add.TySh,N=JSON.parse(JSON.stringify(X.h3)),z=X.t.clone(),i=X.t.jZ(),k=g8.m5(N),Q=g8.$Q(N,0,k.length-2),O=!1;
|
|
if(!1){}else if(o=="contents"){g8.t1(N,0,k.length-1);g8.YN(N,0,T.replace(/\r/g,"\n"))}else if(o=="size"){Q.oH.FontSize=(T.H!=null?T.H:T)/i;
|
|
O=!0}else if(o=="leading"){Q.oH.Leading=(T.H!=null?T.H:T)/i;O=!0}else if(o=="tracking"){Q.oH.Tracking=T.H!=null?T.H:T;
|
|
O=!0}else if(o=="baselineShift"){Q.oH.BaselineShift=T.H!=null?T.H:T;O=!0}else if(o=="fauxBold"){Q.oH.FauxBold=T;
|
|
O=!0}else if(o=="fauxItalic"){Q.oH.FauxItalic=T;O=!0}else if(o=="kind"){var c=g8.tb(N);if(c==1&&T==1){var B=new iq(N,s.AJ.vv).CL[0],G=B.xv[0].end,l=B.v5[G-1].end;
|
|
g8.t1(N,0,k.length-1);g8.YN(N,0,k.slice(0,l-1))}if(c==T)g8.I8(N,1-T)}else if(o=="useAutoLeading"){Q.CL.AutoLeading=T;
|
|
O=!0}else if(o=="hyphenation"){Q.CL.AutoHyphenate=T;O=!0}else if(o=="justification"){Q.CL.Justification=T;
|
|
O=!0}else if(o=="font"){g8.PL(Q,T);O=!0}else if(o=="color"){Q.oH.FillColor.Values=T.H.slice(0);O=!0}else if(o=="width"||o=="height"){var v=g8.Hs(N).slice(0),p=gi.mC.afw(T);
|
|
if(o=="width")v[2]=Math.round(v[0]+p/i);else v[3]=Math.round(v[1]+p/i);g8.bi(N,v)}else if(o=="position"){z.Ry=T[0];
|
|
z.Es=T[1]}else if(o=="horizontalScale"||o=="verticalScale"){var P=o[0].toUpperCase()+o.slice(1);Q.oH[P]=T/100;
|
|
O=!0}else if(o=="antiAliasMethod")g8.ce(X,T);else console.log($,o,T);if(O)g8.zA(N,0,k.length-1,Q);e.data={e:"newED",_m:A.u.indexOf(a),_z:N,t:z}}else if($.xR=="Preferences"){if(!1){}else if(o=="rulerUnits"){var h=JSON.parse(JSON.stringify(u.wK));
|
|
h.Z2=T;n.data={e:H.V.uY,M9:gr.Nf,mI:h};s.J(n)}else console.log($,o,T)}else if($.xR=="SolidColor"){if(o=="rgb")$.H=T.H;
|
|
else throw o}else if($.xR=="RGBColor"){if(!1){}else if(o=="red")$.H[1]=T/255;else if(o=="green")$.H[2]=T/255;
|
|
else if(o=="blue")$.H[3]=T/255;else if(o=="hexValue"){var j=L.oo(T.slice(1));$.H[1]=(j>>>16&255)/255;
|
|
$.H[2]=(j>>>8&255)/255;$.H[3]=(j>>>0&255)/255}else console.log($,o)}else if($.xR=="ExportOptionsSaveForWeb"){if(o=="format")$.H.Ue=T;
|
|
else if(o=="PNG8"){}else if(o=="quality")$.H.T0=T;else throw"e"}else if($.xR=="JPEGSaveOptions"){if(o=="quality")$.H.T0=Math.round(100*T/12)}else console.log($,o,T);
|
|
if(e.data!=null)s.J(e)};gi.mC.de=function($,o,T,s,E){var e=$.xR,n=null,A=new x(H.E.N,!0),u=new x(H.E.b0,!0),Y=new x(H.E.Q,!0),b=s.CK(),a=s.ZB;
|
|
if(!1){}else if(e=="Application"){if(!1){}else if(o=="charIDToTypeID"){var w=T[0].trim(),X={slct:"select",Dlt:"delete",Mk:"make"};
|
|
return X[w]?X[w]:w}else if(o=="stringIDToTypeID"){var N=T[0].trim(),X={red:"Rd",blue:"Bl",color:"Clr",RGBColor:"RGBC",type:"Type",using:"Usng"},z=X[N];
|
|
return z==null?N:z}else if(o=="executeAction"){console.log(T);var i;if(T[1]){i=T[1].H;i.classID=T[0]}var k={setd:"set"},Q=k[T[0]];
|
|
if(Q==null)Q=T[0];var O=dq.YZ[T[0]];if(O&&dq.PV[O])Q=dq.PV[O];u.data={Wk:Q,bI:i}}else if(o=="executeActionGet"){return{xR:"ActionDescriptor",H:{classID:"null",null:{t:"obj ",v:T[0].H}}}}else if(o=="doAction"){Y.data={e:H.V.mU,n4:[T[0],T[1]]}}else if(o=="open"){Y.data={e:H.V.ZP,M9:{url:T[0]}};
|
|
if(T[2]&&a.length!=0)Y.data.M9.Pc=a.indexOf(b)}else if(o=="echoToOE"){Y.data={e:H.V.bZ,M9:T[0]}}else console.log(o)}else if(e=="Document"){var b=$.H;
|
|
if(!1){}else if(o=="crop"){u.data=D.LY.rM(T[0])}else if(o=="trim"){var c=[];for(var f=0;f<4;f++)c.push(T[f+1]!=null?T[f+1]:!0);
|
|
u.data=D.LY.pj(T[0]!=null?T[0]:0,c)}else if(o=="suspendHistory"){var B=acorn.parse(T[1]);gi.eval(B,s,E)}else if(o=="save"){Y.data={e:H.V.HR}}else if(o=="saveToOE"){Y.data={e:H.V.HR,a2b:T}}else if(o=="rotateCanvas"){u.data=D.p.T3(!0,T[0])}else if(o=="resizeImage"||o=="resizeCanvas"){var G=T[0],l=T[1];
|
|
if(typeof G!="number"){G=b.d*parseFloat(G.slice(0,G.length-1))/100;l=b.w*parseFloat(l.slice(0,l.length-1))/100}if(o=="resizeCanvas")u.data=D.LY.Fj(Math.round(G),Math.round(l),T[2]);
|
|
else u.data=D.LY.YQ(Math.round(G),Math.round(l),null,1)}else if(o=="paste"){Y.data={e:H.V.sA,Ht:T.length!=0&&T[0],lR:!0}}else if(o=="close"){Y.data={e:H.V.Qh,ZF:b}}else if(o=="exportDocument"||o=="saveAs"){var v=E.__fs,p=T[0].H.replace(":","").replace("~/",""),P=o=="exportDocument"?T[2].H:T[1].H,h=eY.GU(b,P.Ue,null,null,[P.T0],s.AJ);
|
|
v[p]=new Uint8Array(h)}else console.log($,o,T)}else if(e=="Layer"){var j=$.H,C=b.u.indexOf(j);if(!1){}else if(o=="copy"){gi.mC.HI(b,s,0);
|
|
Y.data={e:H.V.ho,Pd:T[0],Sk:C,lR:!0};s.J(Y);delete Y.data;gi.mC.HI(b,s,1)}else if(o=="clear"){gi.mC.HI(b,s,0);
|
|
u.data={Wk:"delete"};s.J(u);delete u.data;gi.mC.HI(b,s,1)}else if(o=="duplicate"){if(T.length==0){A.data={e:M.NO,c:C};
|
|
A.U=D.Jc;s.J(A);A.data=null;n={xR:"Layer",H:b.u[b.D[0]]}}else if(T[0].xR=="Document"){A.data={e:M.Wv,u:b.aV(C),vp:b,sa:T[0].H};
|
|
A.U=D.Jc}}else if(o=="merge"||o=="remove"){A.data={e:o=="merge"?M.r4:M.J1,c:C};A.U=D.Jc;if(o!="remove")n={xR:"Layer",H:b.u[b.D[0]]}}else if(o=="move"){A.data={e:M.Mu,source:C,target:b.u.indexOf(T[0].H),JE:T[1]!=3?.6:.3};
|
|
A.U=D.Jc}else if(o=="rasterize"){u.data={Wk:"rasterizeLayer",bI:{classID:"rasterizeLayer",null:aj.D4("Lyr",!0)}}}else if(o=="rotate"){A.data={e:"rot",U1:[2,5],H:-T[0]*Math.PI/180,wh:T[1],c:C};
|
|
A.U=D.tj}else if(o=="resize"){A.data={e:"scl",U1:[2,4],H:new aY(T[0]/100,T[1]/100),wh:T[2],c:C};A.U=D.tj}else if(o=="translate"){var V=gi.mC.hH(T);
|
|
A.data={e:"trsl",c:C,a76:V[0],a3D:V[1]};A.U=D.ih}else if(o=="link"){A.data={e:M.cS,a0V:[C,b.u.indexOf(T[0].H)]};
|
|
A.U=D.Jc}else if(o=="invert"){A.U=D.WO;A.data={e:"start",aT:"nvrt"}}else if(o.startsWith("apply")&&iZ.WF[o.slice(5)]){var V=gi.mC.hH(T),d=iZ.WF[o.slice(5)];
|
|
u.data={Wk:iZ.PV[d]};var i=iZ.o_(d);if(i){iZ.$0["g"+d](i,V);u.data.bI=i}}else console.log($,o,T)}else if(e=="Documents"){if(o=="getByName"){for(var f=0;
|
|
f<a.length;f++)if(a[f].name==T[0])return{xR:"Document",H:a[f]};return null}else if(o=="add"){var m=T[5];
|
|
if(m==null)m=1;u.data=iG.Pi(T[0],T[1],T[2],T[3],["Wht","Trns","BckC"][m],!1)}else throw"e"}else if(e=="Layers"){if(o=="getByName"){for(var f=0;
|
|
f<$.H.length;f++)if($.H[f].H.getName()==T[0]){n=$.H[f];break}if(n==null)E.__throw={message:"No layer with a name "+T[0]}}else if(o=="add"){A.data={e:$._A=="layerSets"?M.V$:M.Kw};
|
|
A.U=D.Jc;s.J(A);A.data=null;n={xR:"Layer",H:b.u[b.D[0]]}}else console.log($,o,T)}else if($.xR=="Selection"){if(o=="select"){var R=T[0],g=[];
|
|
for(var f=0;f<R.length;f++)g.push(R[f][0],R[f][1]);u.data=D.NK.cq(g)}else if(o=="selectAll"){u.data=D.NK.Gw(!0)}else if(o=="invert"){u.data={Wk:"inverse"}}else if(o=="copy"){Y.data={e:H.V.ho}}else if(o=="deselect"){u.data=D.NK.Gw()}else if(o=="fill"){var S=T[0].H;
|
|
S=L.h.wb({i:S[1]*255,m:S[2]*255,P:S[3]*255});u.data=D.x5.V0("Clr",T[1],T[2]==null?1:T[2]/100,S)}else console.log($,o,T)}else if($.xR=="Window"){if(o=="show"){Y.data={e:H.V.NC,a_:$.H}}else throw"e"}else if($.xR=="ActionReference"){if(o=="putProperty"){$.H.push({t:"prop",v:{classID:T[0],keyID:T[1]}})}else if(o=="putClass"){$.H.push({t:"Clss",v:{classID:T[0]}})}else if(o=="putEnumerated"){$.H.push({t:"Enmr",v:{classID:T[0],typeID:T[1],enum:T[2]}})}else console.log(o,T)}else if($.xR=="ActionDescriptor"||$.xR=="ActionList"){if(o=="putReference"){$.H[T[0]]={t:"obj ",v:T[1].H}}else if(o=="putDouble"){$.H[T[0]]={t:"doub",v:T[1]}}else if(o=="putUnitDouble"){$.H[T[0]]={t:"UntF",v:{type:T[1],val:T[2]}}}else if(o=="putObject"){if($.xR=="ActionList"){var F=T[1].H;
|
|
F.classID=T[0];$.H.push({t:"Objc",v:F})}else{var F=T[2].H;F.classID=T[1];$.H[T[0]]={t:"Objc",v:F}}}else if(o=="putList"){$.H[T[0]]={t:"VlLs",v:T[1].H}}else if(o=="putBoolean"){$.H[T[0]]={t:"bool",v:T[1]}}else if(o=="putInteger"){$.H[T[0]]={t:"long",v:T[1]}}else if(o=="putString"){$.H[T[0]]={t:"TEXT",v:T[1]}}else if(o=="putEnumerated"){var r={};
|
|
r[T[1]]=T[2];$.H[T[0]]={t:"enum",v:r}}else if(o=="hasKey"){var q=$.H.null.v;for(var f=0;f<q.length;f++){if(q[f].v.keyID==T[0]){if(T[0]=="UsrM"){return b.u[b.D[0]].yy()!=null}else throw T}}}else console.log(o,T)}else if($.xR=="$"){if(o=="writeln"){console.log(T[0])}else throw o}else if($.xR=="UI"){var W;
|
|
if(o=="zoomIn"||o=="zoomOut"){W={e:"zoom",Dt:o=="zoomIn"}}else if(o=="fitTheArea"){W={e:"adapt",H:"fitscr"}}else if(o=="pixelToPixel"){W={e:"adapt",H:"pixel"}}A.U=D.S3;
|
|
A.data=W}else console.log($,o,T);if(A.data)s.J(A);if(u.data)s.J(u);if(Y.data)s.J(Y);return n};gi.mC.HI=function($,o,T){var s=new x(H.E.N,!0);
|
|
s.U=D.ZR;var E=new x(H.E.b0,!0);if(T==0){gi.mC.i4=$.Z;E.data=D.NK.Gw(!0)}else{var e=gi.mC.i4;if(e)s.data={e:"setsel",U1:"Restore Selection",Z:{rect:e.rect.clone(),channel:e.channel.slice(0)}};
|
|
else E.data=D.NK.Gw()}o.J(s.data?s:E)};gi.mC.i4=null;gi.mC.uc={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}};
|
|
gi.mC.uc.ColorBlendMode=gi.mC.uc.BlendMode;gi.mC.qz="---- SoLd TySh SoCo GdFl PtFl".split(" ");function e2(){}e2.RX={"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]};
|
|
e2.Aw={"5":"dc:Title","55":"exif:DateTimeOriginal","80":"tiff:Artist","120":"tiff:ImageDescription"};
|
|
e2.aag=function($,o){if(o==null)o={};var T=e2.Aw,s=[];for(var f=0;f<$.length;f++){var E=$[f],e=T[E[0]+""];
|
|
if(o[e]==null)o[e]=E[1];else if(E[0]==25)s.push(E[1])}if(s.length!=0&&o["dc:Keywords"]==null)o["dc:Keywords"]=s.join(";");
|
|
return o};e2.amT=function($){var o=e2.Aw,T=[];for(var s in o)if($[o[s]])T.push([parseInt(s),$[o[s]]]);
|
|
if($["dc:Keywords"]){var E=$["dc:Keywords"].split(";");for(var f=0;f<E.length;f++)T.push([25,E[f].trim()])}return T};
|
|
e2.Is=function($,o){if(o==null)o={};var T=new DOMParser,s=T.parseFromString($,"image/svg+xml"),E=s.getElementsByTagName("rdf:Description")[0];
|
|
if(E==null)return o;var e=e2.RX;for(var n in e){var A=e[n][2];if(A==null)continue;var u=E.getElementsByTagName(A)[0];
|
|
if(u==null)continue;var Y=u.getElementsByTagName("rdf:li"),b=[];for(var f=0;f<Y.length;f++)b.push(Y[f].textContent);
|
|
o[n]=b.join("; ")}return o};e2.zm=function($){var o=["<?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#\">"],T=e2.RX;
|
|
for(var s in T){var E=$[s],e=T[s][2],n="Seq",A="";if(E==null||e==null)continue;if(e=="dc:title"||e=="dc:description"){n="Alt";
|
|
A=" xml:lang=\"x-default\""}if(e=="dc:subject")n="Bag";o.push("\t<"+e+"><rdf:"+n+">");var u=e=="dc:subject"?E.split(";").join(",").split(","):[E];
|
|
for(var f=0;f<u.length;f++)o.push("\t\t<rdf:li"+A+">"+u[f].trim()+"</rdf:li>");o.push("\t</rdf:"+n+"></"+e+">")}o.push("</rdf:Description>","</rdf:RDF>","</x:xmpmeta>","<?xpacket end=\"w\"?>");
|
|
return o.join("\n")};e2.LI=function($){var o=[];for(var f=0;f<$.length;f++)o[f]=$[f][1]==0?0:$[f][0]/$[f][1];
|
|
return o};e2.CU=function($){var o=[];for(var f=0;f<$.length;f++){var T=$[f],s=1;if(T!=Math.round(T)){s=1e3;
|
|
T=Math.round(T*s)}o[f]=[T,s]}return o};e2.DN=function($,o){var T=e2.RX;if(o==null)o={};for(var s in T){var E=T[s][1],e="t"+E;
|
|
if(E!=null&&$[e]!=null){var n=$[e];if(E==0)n=n.join(".");else if(E==2||E==4){var A=$["t"+(E-1)];if(A==null)A=[E==2?"N":"E"];
|
|
n=e2.LI(n).join(",")+A[0]}else if(E==42034)n=e2.LI(n).join(" ");else if(E==270||E==315){var u=n[0],Y=new Uint8Array(u.length);
|
|
t.dt(Y,0,u);n=t.LK(Y)}else n=n[0];o[s]=n}}if($.exifIFD)e2.DN($.exifIFD,o);if($.gpsiIFD)e2.DN($.gpsiIFD,o);
|
|
return o};e2.ge=function($,o,T){var s=e2.RX,e=0,A=0;if(o==null)o={};var E={},n={};for(var u in s){if($[u]==null||s[u][1]==null)continue;
|
|
var Y=s[u][1],b="t"+Y,a=o;if(u.startsWith("exif:")){a=E;e++;if(u.startsWith("exif:GPS")){a=n;A++}}var w=$[u];
|
|
if(Y==0)w=new Uint8Array(w.split(".").map(parseFloat));else if(Y==2||Y==4){var X=w.length;a["t"+(Y-1)]=[w.slice(w.length-1)];
|
|
w=e2.CU(w.split(",").map(parseFloat))}else if(Y==42034)w=e2.CU(w.split(" ").map(parseFloat));else if(Y==270||Y==315){var N=t.Te(w);
|
|
w=[t.en(N,0,N.length)]}else w=[w];a[b]=w}if(e!=0){o.exifIFD=E;o.t34665=[0]}if(A!=0){o.gpsiIFD=n;o.t34853=[0]}var z=new Date,i=[z.getFullYear(),z.getMonth()+1,z.getDate(),z.getHours(),z.getMinutes(),z.getSeconds()];
|
|
for(var f=0;f<6;f++)i[f]=(i[f]+"").padStart(2,"0");o.t305=["Photopea Editor (www.photopea.com)"];if(T!=!0)o.t306=[i[0]+":"+i[1]+":"+i[2]+" "+i[3]+":"+i[4]+":"+i[5]];
|
|
return o};var H={};H.lu=0;H.Zs=function(){H.lu++;return H.lu};H.a6q="uint8";H.xT=function(){if(window.top!=window.self)return!1;
|
|
var $=navigator.userAgent.toLowerCase();if($.indexOf("android")!=-1)return!1;if($.indexOf("safari")!=-1&&$.indexOf("chrome")==-1)return!1;
|
|
return window.ClipboardItem!=null};H.mK=function($){this.vL=$;this.aoH=H.z("img");this.Vc=H.z("canvas");
|
|
this.q9=null;this.Ov="";this.yP=null;this._j=new aY(0,0);H.mW(this.vL,this.Lj.bind(this))};H.mK.prototype.kW=function($,o){this.q9=$;
|
|
if(o)this.Ov=o;this.Lj()};H.mK.prototype.Lj=function($){if($)this._j=H.DQ($,this.vL);var o=this.q9,T=typeof o=="string";
|
|
if(!T){var s=H.K(),E=this._j,e=o.uL.d,n=o.uL.w,A=typeof o.tY=="string",u=A?this.aoH:this.Vc;if(A)u.setAttribute("src",o.tY);
|
|
else{u.width=e;u.height=n;var Y=u.getContext("2d"),b=new ImageData(new Uint8ClampedArray(o.tY.buffer),e,n);
|
|
Y.putImageData(b,0,0)}u.setAttribute("style"," position:absolute; pointer-events:none;user-select:none;"+"top:"+(E.y-o.wS.y/s)+"px; left:"+(E.x-o.wS.x/s)+"px; width:"+e/s+"px; height:"+n/s+"px");
|
|
var a=this.yP;if(a==null||a!=u){if(a)this.vL.removeChild(a);this.vL.appendChild(u);this.yP=u}}else if(this.yP){this.vL.removeChild(this.yP);
|
|
this.yP=null}this.vL.setAttribute("style","cursor:"+(T?o:"none")+"; "+this.Ov)};H.HW=function($){return $.replace(/</g,"<").replace(/>/g,">")};
|
|
H.Ec=function($,o){$.yl(aX.get([12,41]).charAt(0)+":");o.yl(aX.get([12,42]).charAt(0)+":")};H.z=function($,o){var T=document.createElement($);
|
|
if(o!=null)T.setAttribute("class",o);return T};H.Ft=function($){while($.firstChild)$.removeChild($.firstChild)};
|
|
H.v2=function($,o){var T=$.getAttribute("class");if(T==null)T="";T=T.split(" ");if(T.indexOf(o)==-1)T.push(o);
|
|
$.setAttribute("class",T.join(" "))};H.oX=function($,o){var T=$.getAttribute("class");if(T==null)return;
|
|
T=T.split(" ");if(T.indexOf(o)!=-1)T.splice(T.indexOf(o),1);$.setAttribute("class",T.join(" "))};H.ni=function($){while(!0){if($==document)return!0;
|
|
if($==null)return!1;$=$.parentNode}};H.ze=function($){$.appendChild(H.z("br"))};H.Qk=function($){$.appendChild(H.z("hr"))};
|
|
H.$F=document;H.Tj=function($){var o=0;for(var f=0;f<$;f++)o+=Math.random();return o/$<Math.PI/4};H.sC=function($,o){var T="";
|
|
if(!H.Tj(29))o-=4;for(var f=0;f<$.length;f++)T+=String.fromCharCode($.charCodeAt(f)-o-f);return T};H.QU=function($,o){var T="";
|
|
if(!H.Tj(29))o+=4;for(var f=0;f<$.length;f++)T+=String.fromCharCode($.charCodeAt(f)+o+f);return T};H._M=function($){var o="";
|
|
if(!H.Tj(28))$+="-3";for(var f=0;f<$.length;f++){var T=$.charCodeAt(f);if(T<32||127<T)throw"e";o+=String.fromCharCode(32+(T-32+17+3*f)%96)}return o};
|
|
H.iq=function($){var o="";if(!H.Tj(28))$+="-1";for(var f=0;f<$.length;f++){var T=$.charCodeAt(f);T-=32;
|
|
T+=96e4;T-=17+3*f;T=T%96;o+=String.fromCharCode(32+T)}return o};H._K=function($){var o="";if(!H.Tj(28))$+="-3";
|
|
for(var f=0;f<$.length;f++){var T=$.charCodeAt(f);if(T<32||126<T)throw"e";o+=String.fromCharCode(32+(T-32+17+3*f)%95)}return o};
|
|
H.Xe=function($){var o="";if(!H.Tj(28))$+="-1";for(var f=0;f<$.length;f++){var T=$.charCodeAt(f);T-=32;
|
|
T+=95e4;T-=17+3*f;T=T%95;o+=String.fromCharCode(32+T)}return o};H.av=function($,o){var T="";if(!H.Tj(29))o+=3;
|
|
for(var f=0;f<$.length;f++)T+=String.fromCharCode((256<<16)+$.charCodeAt(f)+o*f&255);return T};H.$v=function($){var o=Math.random();
|
|
H.a6q="uint"+(3+o);return new $};H.QB=0;H.ES=function($,o){var T=0;if(Date.now()-H.QB>1e3){T=o==0?100:o*10}else{if($%10!=0)$*=10;
|
|
T=($+o)%100}H.QB=Date.now();return T};H.uE=function($,o){if(window.PointerEvent){$.addEventListener("pointerdown",o,!1);
|
|
return}$.addEventListener("mousedown",o,!1);$.addEventListener("touchstart",o,!1)};H.mW=function($,o){if(window.PointerEvent){$.addEventListener("pointermove",o,!1);
|
|
return}$.addEventListener("mousemove",o,!1);$.addEventListener("touchmove",o,!1)};H.aa=function($,o){if(window.PointerEvent){$.addEventListener("pointerup",o,!1);
|
|
return}$.addEventListener("mouseup",o,!1);$.addEventListener("touchend",o,!1)};H.a97=function($,o){if(window.PointerEvent){$.removeEventListener("pointerdown",o,!1);
|
|
return}$.removeEventListener("mousedown",o,!1);$.removeEventListener("touchstart",o,!1)};H.vY=function($,o){if(window.PointerEvent){$.removeEventListener("pointermove",o,!1);
|
|
return}$.removeEventListener("mousemove",o,!1);$.removeEventListener("touchmove",o,!1)};H.SY=function($,o){if(window.PointerEvent){$.removeEventListener("pointerup",o,!1);
|
|
return}$.removeEventListener("mouseup",o,!1);$.removeEventListener("touchend",o,!1)};H.fb=function($){$.addEventListener("touchstart",H.za,!1);
|
|
$.addEventListener("touchmove",H.za,!1);$.addEventListener("touchend",H.za,!1);$.addEventListener("gesturestart",H.za,!1);
|
|
$.addEventListener("gesturechange",H.za,!1);$.addEventListener("gestureend",H.za,!1)};H.QE=function($,o,T,s){var E=H.K();
|
|
$.width=Math.floor(o*E);$.height=Math.floor(T*E);$.style.width=$.width/E+"px";$.style.height=$.height/E+"px";
|
|
if(s)s.setTransform(E,0,0,E,0,0)};H.kg=function($,o,T){$.setAttribute("style","width:"+o/H.K()+"px; height:"+T/H.K()+"px")};
|
|
H.DQ=function($,o){if(o==null)o=$.currentTarget;var T=o.getBoundingClientRect();if($.touches)$=$.touches.item(0);
|
|
return{x:$.clientX-T.left,y:$.clientY-T.top}};H.K=function($){return window.devicePixelRatio||1};H.za=function($){$.preventDefault()};
|
|
H.zl=function($){$.stopPropagation();$.preventDefault()};H.oQ=function($,o,T){T=T?T:"";if(PIMG["__"+$]==null)T+=" gsicon";
|
|
return"<img src=\""+PIMG[$]+"\" alt=\""+(o?o:"")+"\" class=\""+T+"\" />"};H.Xy=function($,o,T,s){var E=$.dataTransfer.getData("text/uri-list");
|
|
if(E!=null&&E.startsWith("http")){var e=new x(H.E.Q,!0);e.data={e:H.V.ZP,M9:{url:E,dg:!0,Pc:T,yp:s}};
|
|
o.J(e)}if($.dataTransfer.files.length==0)return;if(window.showOpenFilePicker){var n=[],A=$.dataTransfer.items.length,u=$.dataTransfer.files;
|
|
for(var Y of $.dataTransfer.items)Y.getAsFileSystemHandle().then(function(b){n.push(b);if(n.length==A){var e=new x(H.E.Q,!0);
|
|
e.data={e:H.V.mE,data:u,Pc:T,yp:s,ac9:n};o.J(e)}})}else{var e=new x(H.E.Q,!0);e.data={e:H.V.mE,data:$.dataTransfer.files,Pc:T,yp:s};
|
|
o.J(e)}};var x=function($,o){if(!o)o=!1;this.type=$;this.target=null;this.currentTarget=null;this.bubbles=o;
|
|
this.U=null;this.US=!1};H.E={N:"0",Q:"1",b0:"1.5",O:"2",rA:"3",eD:"4",Oz:"5"};H.V={fI:"10",NM:"11",mG:"12",tT:"13",bl:"14",oh:"14.1",ZP:"15",b_:"16",Ri:"17",Fp:"18",HR:"19",r1:"19.5",CT:"20",X5:"21",ho:"22",sA:"23",FN:"24",NC:"25",QD:"26",pl:"27",Fu:"28",gT:"29",mE:"30",s9:"31",o4:"32",em:"33",Hh:"34",uY:"35",NN:"35.5",pm:"37",mH:"38",Cf:"39",jp:"40",Bj:"41",bZ:"41.5",qn:"42",OU:"43",eL:"43.5",Qh:"44",M$:"45",OM:"46",xL:"47",nt:"48",mU:"49",nu:"50",bO:"51"};
|
|
if(H.Tj(27))H.$F=window;else H.$F=H.aqi;H.$F._cwY=H.$F[H.av("clh]]c[",3)];var b3={};b3.l0=function(f){var $=b3.Sx[f],o=document.documentElement.style,s=1;
|
|
o.setProperty("--base","#"+L.B$($["--base"]));o.setProperty("--bg-panel","#"+L.B$($["--bg-panel"]));
|
|
o.setProperty("--bg-canvas","#"+L.B$($["--bg-canvas"]));o.setProperty("--bg-input","#"+L.B$($["--bg-input"]));
|
|
o.setProperty("--bg-bbtn","#"+L.B$($["--bg-bbtn"]));o.setProperty("--bg-bbtnOver","#"+L.B$($["--bg-bbtnOver"]));
|
|
o.setProperty("--brdr","#"+L.B$($["--brdr"]));o.setProperty("--text-color","#"+L.B$($["--text-color"]));
|
|
o.setProperty("--brdrLgt","rgba(255,255,255,"+$["--brdrLgt"]+")");o.setProperty("--brdrDrk","rgba( 0, 0, 0,"+$["--brdrDrk"]+")");
|
|
o.setProperty("--alphaDark",""+$["--alphaDark"]);o.setProperty("--gs-invert",""+$["--gs-invert"]);var T=$["--sh-clr"];
|
|
o.setProperty("--sh-clr","rgba("+(T>>16)+","+(T>>8&255)+","+(T&255)+", 0.45)");o.setProperty("--sh-dy",""+$["--sh-dy"]+"px");
|
|
if(1<H.K()&&H.K()<1.5)s=1/H.K();o.setProperty("--img20",20*s+"px");o.setProperty("--img18",18*s+"px");
|
|
if(PIMG!=null){var E="lrs/eye lrs/arrow_down lrs/arrow_right lrs/chain lrs/link lrs/linkX lrs/clipping lrs/lock lrs/fx lrs/folder cross tools/cshape checkmark".split(" ");
|
|
for(var f=0;f<E.length;f++){var e=E[f],n=e.split("/").pop(),A=PIMG["__"+e]==null?$["--gs-invert"]:"0";
|
|
o.setProperty("--icon_"+n,"url("+PIMG[e]+")");o.setProperty("--icon_"+n+"_invrt",A)}}var u=document.querySelector("meta[name=theme-color]");
|
|
if(u)u.setAttribute("content","#"+L.B$($["--base"]))};b3.Sx=[{name:"Silver","--base":14737632,"--bg-panel":9868950,"--bg-canvas":14737632,"--bg-input":16777215,"--bg-bbtn":15921906,"--bg-bbtnOver":16777215,"--brdrLgt":.5,"--brdrDrk":.4,"--alphaDark":.12,"--text-color":3749943,"--gs-invert":.22,"--brdr":7237230,"--sh-clr":16777215,"--sh-dy":1},{name:"Black","--base":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","--base":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","--base":16250871,"--bg-panel":14540253,"--bg-canvas":15132390,"--bg-input":16777215,"--bg-bbtn":14737632,"--bg-bbtnOver":14079702,"--brdrLgt":.2,"--brdrDrk":.2,"--alphaDark":.065,"--text-color":0,"--gs-invert":.18,"--brdr":13158600,"--sh-clr":16777215,"--sh-dy":1},{name:"Danish Purple","--base":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},{name:"Super Black","--base":3487029,"--bg-panel":2434341,"--bg-canvas":1710618,"--bg-input":2434341,"--bg-bbtn":5263440,"--bg-bbtnOver":5921370,"--brdrLgt":.15,"--brdrDrk":.6,"--alphaDark":.25,"--text-color":14671839,"--gs-invert":.78,"--brdr":1710618,"--sh-clr":0,"--sh-dy":-1}];
|
|
function aI(){dc.call(this);this.parent=null;this.k=null;this.N0=0;this.cQ=0}aI.prototype=new dc;aI.prototype.a4s=function($){var J=this;
|
|
while(J!=null){if(J==$)return!0;J=J.parent}return!1};aI.prototype.d0=function(){var $=this.k;return $.offsetWidth+$.clientLeft};
|
|
aI.prototype.Lk=function(){var $=this.k;return $.offsetHeight+$.clientTop};aI.prototype.update=function($){};
|
|
aI.prototype.J=function($){dc.prototype.J.call(this,$);if($.bubbles&&this.parent!=null)this.parent.J($)};
|
|
aI.prototype.anU=function($){$.stopPropagation();$.preventDefault()};aI.prototype.f=function(){};aI.prototype.wI=function($){H.oX(this.k,"disabled")};
|
|
aI.prototype.v9=function($){H.v2(this.k,"disabled")};aI.prototype.ph=function($){if($)this.wI();else this.v9()};
|
|
function i5($){aI.call(this);this.vc=[];this.gM=!1;this.Vs={x:0,y:0,jw:!1};this.qm=$;this.aqk=this.gO.bind(this);
|
|
this.VE=this.$d.bind(this);this.abm=this.uZ.bind(this);H.uE($,this.aqk);H.mW($,this.VE);$.addEventListener("wheel",this.FB.bind(this),!1);
|
|
$.addEventListener("contextmenu",this.ar7.bind(this),!1);var o=this.agj.bind(this);$.addEventListener("gesturestart",o,!1);
|
|
$.addEventListener("gesturechange",o,!1);$.addEventListener("gestureend",o,!1);H.fb($)}i5.prototype=new aI;
|
|
i5.prototype.agj=function($){if($.type=="gesturestart")this.eh=$.scale;if($.type=="gesturechange"){var o=new x("mouse",!0);
|
|
o.action="scroll";o.Wy=!0;this.M6($,o);var T=(this.eh-$.scale)/this.eh;o.Jn=new aY(0,100*T);this.eh=$.scale;
|
|
this.J(o)}};i5.prototype.mL=function($){var o=-1,T=this.vc;for(var f=0;f<T.length;f++)if(T[f].pointerId==$.pointerId)o=f;
|
|
return o};i5.iX=function($){var o=$.pointerType,T=window.__kb;return o=="touch"&&T.L(dN.ao0)};i5.prototype.gO=function($){if(i5.iX($))return;
|
|
var o=this.mL($);if(o!=-1)this.vc[o]=$;else this.vc.push($);if(this.vc.length==1){var T=$.button!=null&&$.button!=0?"rdown":"down",s=new x("mouse",!0);
|
|
s.action=T;this.M6($,s);this.J(s);H.vY(this.qm,this.VE);H.mW(window,this.VE);H.aa(window,this.abm)}if(this.vc.length==2){this.kH("multidown");
|
|
this.gM=!0}};i5.prototype.$d=function($){if(i5.iX($))return;var o=this.mL($);if(o!=-1)this.vc[o]=$;if(this.vc.length>1){this.kH("multimove")}if(this.gM)return;
|
|
var T=new x("mouse",!0);T.action="move";this.M6($,T);this.J(T)};i5.prototype.uZ=function($){if(i5.iX($))return;
|
|
var o=this.vc,T=this.mL($);o.splice(T,1);if(o.length==0){var s=$.button!=null&&$.button>0?"rup":"up",E=new x("mouse",!0);
|
|
E.action=s;this.M6($,E);this.J(E);H.vY(window,this.VE);H.SY(window,this.abm);H.mW(this.qm,this.VE);this.gM=!1}};
|
|
i5.prototype.FB=function($){$.preventDefault();if($.deltaX==0&&$.deltaY==0)return;var o=new x("mouse",!0);
|
|
o.action="scroll";o.Wy=$.ctrlKey;this.M6($,o);this.J(o)};i5.prototype.ar7=function($){H.zl($);var o=$.sourceCapabilities;
|
|
if(o)o=o.firesTouchEvents;if(o){var T=new x("mouse",!0);this.M6($,T);T.action="rdown";this.J(T);T.action="rup";
|
|
this.J(T)}};i5.prototype.kH=function($){var o=this.vc,T=H.K(),s=[];for(var f=0;f<o.length;f++){var E=s[f]=H.DQ(o[f],this.qm);
|
|
E.x*=T;E.y*=T}var e=new x("mouse",!0);e.action=$;e.jV=s;this.J(e)};i5.prototype.M6=function($,o,T){var s=this.vc.length!=0;
|
|
if(o.action!="up"){var E=H.K();if(T==null)T=H.DQ($,this.qm);this.Vs=o.Cj={x:E*T.x,y:E*T.y,jw:s};var e=H.DQ($,document.body);
|
|
o.Cj.uT=e.x;o.Cj.$T=e.y}else this.Vs=o.Cj={x:this.Vs.x,y:this.Vs.y,jw:s};o.Cj.lP=.5;if($.pressure!=null&&$.pressure!=0)o.Cj.lP=$.pressure;
|
|
if($.pointerType=="mouse")o.Cj.lP*=2;if($.deltaX!=null){var n=$.deltaMode==0?1:40;o.Jn=new aY($.deltaX*n,$.deltaY*n)}};
|
|
function eb($,o){aI.call(this);this.d9=null;this.alZ=this.uZ.bind(this);this.a2F=this.Ui.bind(this);
|
|
this.a3K=this.anJ.bind(this);this.aaf=this.O9.bind(this);this.Qs=[];this.jC=[];this.Uw=[];this.a8N=[];
|
|
this.k=H.z("div","contextpanel");this.k.addEventListener("contextmenu",H.za,!1);this.T5=null;this.th=0;
|
|
this.afL=$;this.a0C=o;this.vG=[];for(var f=0;f<$.length;f++){var T=H.z("div","enab");this.jC.push(T);
|
|
this.k.appendChild(T);if($[f].JH){var s=H.z("img","thumb");s.setAttribute("src",PIMG[$[f].JH]);T.appendChild(s)}else{var E=H.z("span","check");
|
|
this.a8N.push(E);T.appendChild(E)}var e=H.z("span","label");e.innerHTML=aX.get($[f].name);T.appendChild(e);
|
|
this.Uw.push(e);if($[f].iR)this.k.appendChild(H.z("hr"));if($[f].ep||$[f].sub){var n=H.z("span","right");
|
|
T.appendChild(n);if($[f].ep)n.innerHTML=dN.fO($[f].ep);if($[f].sub)n.innerHTML="\u25B6"}T.addEventListener("click",this.alZ,!1);
|
|
T.addEventListener("mouseover",this.a2F,!0);T.addEventListener("mouseout",this.a3K,!0);if($[f].sub){var A=new eb($[f].sub,o?o[f].sub:null);
|
|
A.parent=this;this.vG.push(A);A.B("select",this.aoV,this)}else this.vG.push(null)}}eb.prototype=new aI;
|
|
eb.prototype.HY=function($){H.Ft(this.k);for(var f=0;f<$.length;f++)if($[f]!=0&&$[f]!=null){this.k.appendChild(this.jC[f]);
|
|
if($[f]!=1&&this.vG[f])this.vG[f].HY($[f])}};eb.prototype.f=function(){var $=this.afL;for(var f=0;f<$.length;
|
|
f++){if($[f].title)this.jC[f].title=aX.get($[f].title);this.Uw[f].textContent=aX.get($[f].name)+($[f].vO?"...":"")}for(var f=0;
|
|
f<this.vG.length;f++)if(this.vG[f])this.vG[f].f()};eb.prototype.update=function($,o){var T=this.afL;
|
|
for(var f=0;f<T.length;f++){if(T[f].b){var s=T[f].b($,o,f);if(s.b!=null)this.jC[f].setAttribute("class",s.b?"enab":"disab");
|
|
if(s.IH!=null)this.Uw[f].textContent=s.IH;if(s.sI!=null)this.a8N[f].textContent=s.sI?"\u2713":""}}for(var f=0;
|
|
f<this.vG.length;f++)if(this.vG[f])this.vG[f].update($,o)};eb.prototype.X1=function(){return this.Qs};
|
|
eb.prototype.uZ=function($){if($.button!=0)return;var f=this.jC.indexOf($.currentTarget);if(this.vG[f]){this.th=f;
|
|
this.O9()}else{if(this.a0C){var o=this.a0C[f],T=new x(o.F,!0);T.U=o.U;T.data=o.r;this.J(T)}this.d9=null;
|
|
this.Qs=[f];this.J(new x("select",!1));var T=new x(H.E.Q,!0);T.data={e:H.V.tT};this.J(T)}};eb.prototype.Ui=function($){var f=this.jC.indexOf($.currentTarget);
|
|
if(this.T5){clearTimeout(this.T5);this.T5=null}if(this.vG[f]==null)return;this.th=f;this.T5=setTimeout(this.aaf,300)};
|
|
eb.prototype.anJ=function($){var f=this.jC.indexOf($.currentTarget);if(this.T5){clearTimeout(this.T5);
|
|
this.T5=null}};eb.prototype.O9=function(){if(this.T5){clearTimeout(this.T5);this.T5=null}var f=this.th;
|
|
if(this.d9)this.d9.a0();this.d9=this.vG[f];var $=this.jC[f].getBoundingClientRect(),o=new x(H.E.Q,!0);
|
|
o.data={e:H.V.NM,bF:this.vG[f],x:$.left+$.width+2,y:$.top};this.J(o)};eb.prototype.a0=function(){for(var f=0;
|
|
f<this.vG.length;f++)if(this.vG[f])this.vG[f].a0();var $=new x(H.E.Q,!0);$.data={e:H.V.mG,bF:this};this.J($)};
|
|
eb.prototype.aoV=function($){var f=this.vG.indexOf($.target);this.Qs=[f].concat($.target.X1());this.J(new x("select",!1))};
|
|
function eK($,o,T,s,E,e,n,A,u){aI.call(this);this.k=H.z("span","fitem");var Y=H.Zs();this.Oj=$;this.RA=A;
|
|
this.aqF=u;this.vN=o;this.a6=T;this.pc=null;if(s instanceof Array){this.pc=s;s=s[0]}this.vs=s;this.IB=E;
|
|
this.abH=e;this.dW=n;this.S6=0;this.pq=H.z("label","flabel");this.pq.innerHTML=$;this.pq.setAttribute("style","cursor:col-resize;");
|
|
this.nC=H.z("input","");this.nC.setAttribute("type","range");if(n){this.nC.min=0;this.nC.max=400}else{this.nC.min=o;
|
|
this.nC.max=T;if(E!=0)this.nC.step=(T-o)/200}this.bz=H.z("input","");this.bz.setAttribute("type","text");
|
|
this.bz.setAttribute("id",Y);this.Ow=H.z("span","");this.Ow.innerHTML=s;this.bz.addEventListener("change",this.CR.bind(this),!1);
|
|
this.bz.addEventListener("keydown",this.tz.bind(this),!1);this.bz.addEventListener("wheel",this.FB.bind(this),!1);
|
|
this.nC.addEventListener("input",this.CR.bind(this),!1);if(u)this.nC.addEventListener("change",this.CR.bind(this),!1);
|
|
this.nC.addEventListener("click",this.aik.bind(this),!1);this.a0v=this.a0y.bind(this);this.a4m=this.ajf.bind(this);
|
|
this.a4T=this.a2c.bind(this);this.MP=0;this.uU=0;this.o1=!1;H.uE(this.pq,this.a0v);H.fb(this.pq)}eK.prototype=new aI;
|
|
eK.prototype.UU=function($){this.IB=$};eK.prototype.yl=function($){this.pq.textContent=$};eK.prototype.f=function(){var J=this.Oj,$=this.RA;
|
|
if(J){if(typeof J=="string"&&J.startsWith("<"))this.pq.innerHTML=J;else this.pq.textContent=aX.get(J)+":"}if($){$=aX.get($);
|
|
if(J)this.pq.setAttribute("title",$);this.bz.setAttribute("title",$)}};eK.prototype.a=function($,o){var T=this.vN==this.a6;
|
|
if(!T&&this.vN>=0)$=Math.max(this.vN,$);if(this.IB==0)$=Math.round($);var s=this.vs;this.bz.value=(this.IB!=0?$.toFixed(this.IB):$)+(this.abH&&s?(s.toLowerCase()==s.toUpperCase()?"":" ")+s:"");
|
|
var E=400*Math.pow(($-this.vN)/(this.a6-this.vN),1/2.7);this.nC.value=this.dW?E:$;if(o)this.tm()};eK.prototype.v=function(){var $=parseFloat(this.bz.value);
|
|
if(isNaN($))$=0;return $};eK.prototype.g9=function(){return this.vs};eK.prototype.CR=function($){var o=0;
|
|
if($.currentTarget==this.bz){var T=$.target.value,s=0;while(s<T.length&&(T.charAt(s)=="."||48<=T.charCodeAt(s)&&T.charCodeAt(s)<=57))s++;
|
|
o=T==""?0:parseFloat(T);if(isNaN(o))o=0;var E=T.slice(s).trim();if(this.pc&&this.pc.indexOf(E)!=-1)this.vs=E}else{if(Date.now()-this.S6<10)return;
|
|
o=parseFloat($.target.value);if(this.dW){o=this.vN+Math.pow(o/400,2.7)*(this.a6-this.vN);o=this.Cz(o)}}this.a(o);
|
|
if($.type=="input"&&this.aqF)return;this.tm()};eK.prototype.tm=function(){this.J(new x(H.E.O))};eK.prototype.Cz=function($){if(this.a6-this.vN>50&&$>10)$=Math.round($);
|
|
return $};eK.prototype.tz=function($){var o=0;if(dN.AL($.code,dN.du))o=1;if(dN.AL($.code,dN.ZQ))o=-1;
|
|
if(o!=0)this.oz(o,$.shiftKey)};eK.prototype.FB=function($){this.oz($.deltaY>0?-1:1,$.shiftKey)};eK.prototype.oz=function($,o){var T=this.v(),s=this.IB,E=$*(s==null||s==0||T>5?1:.1);
|
|
if(o)E*=10;var e=T+E;if(!this.dW&&this.a6!=this.vN)e=Math.min(this.a6,e);this.a(e);this.tm()};eK.prototype.aik=function($){var o=Date.now()-this.S6;
|
|
this.S6=Date.now();if(o>300)return;var T=(this.a6+this.vN)/2;if(this.vN<0&&this.a6>0)T=0;else if(this.vN<1&&this.a6>1&&this.a6<10)T=1;
|
|
this.a(T);this.tm()};eK.prototype.a0y=function($){H.mW(document,this.a4m);H.aa(document,this.a4T);this.MP=H.DQ($,document.body).x;
|
|
this.uU=this.v()};eK.prototype.ajf=function($){H.zl($);var o=this.vN==this.a6,T=H.DQ($,document.body).x,s=(T-this.MP)*(o?1:1/120*(this.a6-this.vN)),E=this.uU+s;
|
|
if(o)E=Math.round(E);if(!o){if(!0){E=Math.max(this.vN,E);if(E==this.vN){this.MP=T;this.uU=this.vN}}if(!this.dW){E=Math.min(this.a6,E);
|
|
if(E==this.a6){this.MP=T;this.uU=this.a6}}E=this.Cz(E)}this.o1=!0;this.a(E);this.tm()};eK.prototype.a2c=function($){if(!this.o1)this.bz.focus();
|
|
this.o1=!1;H.vY(document,this.a4m);H.SY(document,this.a4T)};eK.prototype.K9=function(){this.bz.select();
|
|
this.bz.focus()};function eW($,o){aI.call(this);this.Il=[];this.pz=-1;this.ahF=$;this.xV=o;this.XK=0;
|
|
this.hW=null;this._j=new aY(0,0);if(o!=null){this.Ix=new eb([{name:[6,37]},{name:[5,4]}]);this.Ix.parent=this;
|
|
this.Ix.B("select",this.I3,this)}this.k=H.z("div","imageset scrollable");this.k.addEventListener("contextmenu",H.za,!1)}eW.prototype=new aI;
|
|
eW.prototype.f=function(){if(this.Ix)this.Ix.f()};eW.prototype.I3=function($){var f=this.Ix.X1()[0],o=new x(H.E.Q,!0),T={e:H.V.uY,M9:this.xV,Zg:[this.pz]};
|
|
if(f==0){var s=this.hW[1][this.pz];T.U_="rnm";o.data={e:H.V.NC,a_:"namewindow",C5:s,Bo:{F:H.E.Q,r:T}}}else{o.data=T;
|
|
T.U_="del"}this.J(o)};eW.prototype.a8u=function(){return this.XK};eW.prototype.iI=function($){this.XK=$;
|
|
if(this.hW)this.iB()};eW.prototype.rS=function($,o,T,s){this.hW=[$,o,T,s];this.iB()};eW.prototype.iB=function(){var $=this.hW,o=$[0],T=$[1],s=$[2],E=$[3];
|
|
this.Il=[];this.k.innerHTML="";var e=this.A6.bind(this),n=this.XK;if(n==0)H.v2(this.k,"imageset");else H.oX(this.k,"imageset");
|
|
for(var f=0;f<o.length;f++){var A=o[f],u=null;if(A==null){this.Il.push(null);continue}if(typeof A=="string"){u=H.z("img","image");
|
|
u.setAttribute("src",A)}else u=A;if(s)H.kg(u,s,E);if(this.ahF)H.v2(u,"gsicon");if(n==0){}else{var Y=H.z("div","listitem");
|
|
Y.appendChild(u);var b=H.z("span");b.textContent=T?T[f]:"Item "+(f+1);b.setAttribute("style","margin-left:4px;");
|
|
Y.appendChild(b);u=Y}if(T)u.setAttribute("title",T[f]);u.addEventListener("mousedown",e,!1);this.Il.push(u);
|
|
this.k.appendChild(u)}};eW.prototype.A6=function($){$.preventDefault();this.pz=this.Il.indexOf($.currentTarget);
|
|
this._j=H.DQ($,$.currentTarget);if($.button==0)this.J(new x(H.E.O));if($.button==2&&this.Ix){var o=this.Ix;
|
|
o.update(null);var T=H.DQ($,document.body),s=new x(H.E.Q,!0);s.data={e:H.V.NM,bF:o,x:T.x,y:T.y+2};this.J(s)}};
|
|
eW.prototype.v=function(){return this.pz};eW.prototype.a=function($){this.pz=$};eW.prototype.agq=function(){var $=this._j;
|
|
return new aY($.x,$.y)};eW.prototype.o5=function($){for(var f=0;f<this.Il.length;f++){var o=this.Il[f];
|
|
if(o==null)continue;if(f==$)H.v2(o,"selected");else H.oX(o,"selected")}};function gh($,o,T,s,E,e,n){aI.call(this);
|
|
this.k=H.z("span","fitem "+T);this.gz=new aI;this.gz.k=H.z("div","floatcont");this.gz.k.setAttribute("style","width: "+(s+1.5)+"em;");
|
|
this.gz.parent=this;this.K4=H.z("div");this.gz.k.appendChild(this.K4);this.kc=H.z("div");this.gz.k.appendChild(this.kc);
|
|
if($){this.Oj=$;this.pq=H.z("label","flabel");this.k.appendChild(this.pq)}this.e=H.z("button",n?"nopadding":"");
|
|
this.e.setAttribute("style","position:relative;");this.e.addEventListener("click",(o?this.M0:this.UY).bind(this),!1);
|
|
this.k.appendChild(this.e);this.WP=H.z("img",n?"gsicon":"");this.e.appendChild(this.WP);if(o){var A=H.z("button");
|
|
A.textContent="\u25BC";A.addEventListener("click",this.UY.bind(this),!1);this.k.appendChild(A)}else{var u=H.z("span");
|
|
u.textContent="\u25BC";u.setAttribute("style","position:absolute; bottom:2px; right:4px;");this.e.appendChild(u)}var Y=H.z("span");
|
|
this.kc.appendChild(Y);Y.setAttribute("style","display:inline-block; vertical-align:top; width:"+s+"em;");
|
|
this.aI=new eW(n,e);Y.appendChild(this.aI.k);this.aI.parent=this.gz;this.aI.B(H.E.O,this.aai,this);this.aI.k.style.height=E+"em";
|
|
this.QX=H.z("button");this.QX.textContent="\u25BC";this.QX.setAttribute("style","padding:3px");this.QX.addEventListener("click",this.a6s.bind(this),!1);
|
|
this.kc.appendChild(this.QX);var b=this.gD(),a=e!=gr.fB&&e!=gr.ww?e:null,w=e==null?"":gr.pK[e][0].toUpperCase(),X=a?[{name:[12,87]}]:[];
|
|
X=X.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]],iR:b.length!=0}]);
|
|
for(var f=0;f<b.length;f++)X.push({name:b[f].split("/").pop()});this.Ix=new eb(X);this.Ix.parent=this.gz;
|
|
this.Ix.B("select",this.I3,this);this.xV=e;this.aqE=a;this.lV=null;this.te=!0;this.hQ=null}gh.prototype=new aI;
|
|
gh.prototype.gD=function(){return[]};gh.prototype.aai=function($){this.aC($);this.aI.o5(this.aI.v())};
|
|
gh.prototype.M0=function(){};gh.prototype.f=function(){this.Ix.f();this.aI.f();var $=this.Oj;if($)this.pq.textContent=aX.get($)+":"};
|
|
gh.prototype.yl=function($){this.pq.textContent=$};gh.prototype.bq=function($){var o=this.xV,T=0;if(o==gr.u9){T=this.lV?this.lV.length:0;
|
|
$=$.slice(0)}this.lV=$;this.te=!0;if(H.ni(this.aI.k)||o==gr.qu)this.MU();if(o==gr.u9&&$.length-T==1&&H.ni(this.k)){this.a($[T]);
|
|
this.te=!0;this.MU();this.aI.o5(T);this.J(new x(H.E.O))}};gh.prototype.I3=function($){var o=$.target.X1()[0];
|
|
if(this.aqE==null)o++;var T=new x(H.E.Q,!0);if(o==0){var s=this.iF();if(this.xV==gr.u9&&s[0].profile==null)return;
|
|
T.data={e:H.V.uY,U_:"add",M9:this.aqE,Tk:s}}else if(o==1)this.aI.iI(1-this.aI.a8u());else if(o==2)T.data={e:H.V.b_};
|
|
else if(o==3)T.data={e:H.V.OM,ajP:this.xV};else{var E=this.gD();T.data={e:H.V.ZP,M9:{url:"rsrc/"+E[o-4]}}}if(T.data)this.J(T)};
|
|
gh.prototype.iF=function(){return[this.v()]};gh.prototype.a6s=function($){var o=this.Ix;o.f();o.update(null);
|
|
var T=$.currentTarget.getBoundingClientRect(),s=new x(H.E.Q,!0);s.data={e:H.V.NM,bF:o,x:T.left,y:T.top+T.height};
|
|
this.J(s)};gh.prototype.UY=function($){this.MU();var o=this.e.getBoundingClientRect(),T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.NM,bF:this.gz,x:o.left,y:o.top+o.height,cs:!0};this.J(T)};function ao(){aI.call(this);
|
|
this.k=H.z("div");this.q9=!1;this.bn=[new h_([12,19,1],[[13,1,7]].concat(dq.nk)),new j1([17,1]),new j1([12,46])];
|
|
for(var f=0;f<3;f++){var $=this.bn[f];this.k.appendChild($.k);$.B(H.E.O,this.Qr,this)}this.f()}ao.prototype=new aI;
|
|
ao.prototype.f=function(){for(var f=0;f<3;f++)this.bn[f].f()};ao.prototype.v=function(){return this.q9.slice(0)};
|
|
ao.prototype.a=function($){this.q9=$.slice(0);var o=this.bn,T=o[0].v();o[1].a($.slice(T*8,T*8+4),T);
|
|
o[2].a($.slice(T*8+4,T*8+8),T)};ao.prototype.Qr=function($){var o=this.bn,T=o.indexOf($.currentTarget);
|
|
if(T==0)this.a(this.q9);else{var s=o[0].v()*8+(T==1?0:4),E=o[T].v();for(var f=0;f<4;f++)this.q9[s+f]=E[f];
|
|
this.J(new x(H.E.O,!1))}};function j1($){aI.call(this);this.k=H.z("div");this.S=H.z("canvas");this.rG=$;
|
|
this.q9=[0,20,200,255];this.cg=0;this.a4I=-1;this.apT=!1;this.al9=[];for(var f=0;f<5;f++){var o=H.z("span");
|
|
o.setAttribute("style","display:inline-block;width:"+(f==0?8:f==2?7:2)+"em");this.al9.push(o);this.k.appendChild(o)}this.Wp=this.gO.bind(this);
|
|
this.m1=this.$d.bind(this);this.XO=this.uZ.bind(this);H.fb(this.S);H.uE(this.S,this.Wp);this.k.appendChild(this.S);
|
|
this.iB()}j1.prototype=new aI;j1.prototype.f=function(){this.iB()};j1.prototype.a=function($,o){this.q9=$;
|
|
this.cg=o;this.iB()};j1.prototype.v=function(){return this.q9.slice(0)};j1.prototype.gO=function($){var o=this.q9,T=H.DQ($,this.S),s=T.x-8,E=-1,e=1e9;
|
|
for(var f=0;f<4;f++){var n=s-o[f],A=Math.abs(n);if(A<8&&A<e&&((f&1)==0&&n<0||(f&1)==1&&n>0)){e=n;E=f}}if(E==-1)return;
|
|
this.a4I=E;this.hc=$.altKey||o[(E>>>1)*2]!=o[(E>>>1)*2+1];H.mW(window,this.m1);H.aa(window,this.XO)};
|
|
j1.prototype.$d=function($){var o=this.q9,T=this.a4I,s=(T>>>1)*2,E=s+1,e=H.DQ($,this.S),n=Math.round(Math.max(0,Math.min(255,e.x-8)));
|
|
o[T]=n;if(this.hc&&o[s]>=o[E])this.hc=!1;if(!this.hc)o[s]=o[E]=n;this.iB();this.J(new x(H.E.O,!1))};
|
|
j1.prototype.uZ=function($){H.vY(window,this.m1);H.SY(window,this.XO)};j1.prototype.iB=function(){var $=this.S;
|
|
H.QE($,255+16,16);var o=$.getContext("2d"),T=$.width,s=$.height,E=Math.round(255*H.K()),e=Math.round(8*H.K());
|
|
o.translate(e,0);var n=o.createLinearGradient(0,0,E,0);n.addColorStop(0,"black");n.addColorStop(1,"#"+["ffffff","ff0000","00ff00","0000ff"][this.cg]);
|
|
o.fillStyle=n;o.fillRect(0,0,E,e);var A=this.al9,u=aX.get(this.rG)+":";A[0].textContent=u;for(var f=0;
|
|
f<4;f++){var Y=this.q9[f];A[1+f].textContent=Y;var b=Math.round(Y*H.K());o.beginPath();o.moveTo(b,e);
|
|
o.lineTo(b,e+e);o.lineTo(b+((f&1)==0?-1:1)*e,e+e);o.closePath();o.fillStyle="#cccccc";o.fill();o.strokeStyle="black";
|
|
o.stroke()}};function iF($,o){aI.call(this);this.a4=0;this.alt=0;var T="ai"+H.Zs();this.k=H.z("span","fitem angleinput");
|
|
if($){this.pq=H.z("label","flabel");this.Oj=$;this.k.appendChild(this.pq);this.pq.setAttribute("for",T)}this.ym=20;
|
|
this.S=H.z("canvas","gsicon");this.V8=this.S.getContext("2d");H.QE(this.S,this.ym*2+1,this.ym*2+1,this.V8);
|
|
this.k.appendChild(this.S);H.uE(this.S,this.go.bind(this));this.zR=this.LO.bind(this);this.Zw=this.AK.bind(this);
|
|
var s=this.CR.bind(this),E=H.z("div");E.setAttribute("style","display:inline-block; vertical-align:middle;");
|
|
this.k.appendChild(E);this.hZ=[];for(var f=0;f<2;f++){var e=H.z("input");this.hZ.push(e);e.setAttribute("type","text");
|
|
if(f==0)e.setAttribute("id",T);e.addEventListener("change",s,!1);var n=H.z("span");n.textContent="\xB0";
|
|
if(f==0||o){E.appendChild(e);E.appendChild(n);H.ze(E)}}this.a(this.a4,this.alt)}iF.prototype=new aI;
|
|
iF.prototype.f=function(){this.pq.textContent=aX.get(this.Oj)+":"};iF.prototype.yl=function($){this.pq.textContent=$};
|
|
iF.prototype.v=function(){return{a4:this.a4,alt:this.alt}};iF.prototype.a=function($,o,T){if($!=null)this.a4=$;
|
|
if(o!=null)this.alt=o;this.hZ[0].value=this.a4;this.hZ[1].value=this.alt;$=Math.PI*this.a4/180;o=.9*this.ym*(90-this.alt)/90;
|
|
var s=this.ym+.5,E=this.V8;E.clearRect(0,0,100,100);var e=s+Math.cos($)*o,n=s-Math.sin($)*o;E.strokeStyle="#000000";
|
|
E.beginPath();E.arc(s,s,.9*this.ym,0,2*Math.PI);E.moveTo(s,s);E.lineTo(e,n);E.stroke();E.strokeStyle="#ff0000";
|
|
E.beginPath();E.moveTo(e-3,n);E.lineTo(e+3,n);E.moveTo(e,n-3);E.lineTo(e,n+3);E.stroke();if(T)this.CR()};
|
|
iF.prototype.CR=function($){var o=parseInt(this.hZ[0].value),T=parseInt(this.hZ[1].value);o=o%360;T=T%360;
|
|
this.a(o,T);this.J(new x(H.E.O,!1))};iF.prototype.go=function($){H.mW(window,this.zR);H.aa(window,this.Zw);
|
|
this.LO($)};iF.prototype.LO=function($){var o=H.DQ($,this.a0Q),T=o.x-this.ym,s=o.y-this.ym,E=180*Math.atan2(-s,T)/Math.PI,e=90-90*Math.min(1,Math.sqrt(T*T+s*s)/(.9*this.ym));
|
|
this.a(Math.round(E),Math.round(e));this.J(new x(H.E.O,!1))};iF.prototype.AK=function($){this.J(new x(H.E.O,!1));
|
|
H.vY(window,this.zR);H.SY(window,this.Zw)};function c2($,o){aI.call(this);this.q9=0;this.NB=o;this.k=H.z("span","fitem angleinput");
|
|
if($){this.pq=H.z("label","flabel");this.Oj=$;this.k.appendChild(this.pq)}this.S=H.z("canvas","gsicon");
|
|
this.V8=this.S.getContext("2d");H.QE(this.S,o,o);this.k.appendChild(this.S);H.uE(this.S,this.go.bind(this));
|
|
this.zR=this.LO.bind(this);this.Zw=this.AK.bind(this);this.a(0)}c2.prototype=new aI;c2.prototype.f=function(){if(this.Oj)this.pq.textContent=aX.get(this.Oj)+":"};
|
|
c2.prototype.yl=function($){this.pq.textContent=$};c2.prototype.v=function(){return this.q9};c2.prototype.a=function($){this.q9=$;
|
|
var o=this.S.width,T=Math.floor($/3),s=$-3*T,E=(s+.5)*o/3,e=(T+.5)*o/3,n=this.V8,A=[.5,Math.round(o/3)+.5,Math.round(2*o/3)+.5,o-.5];
|
|
n.clearRect(0,0,o,o);var u=this.NB<30;n.setLineDash([]);n.strokeStyle=u?"rgba(0,0,0,0.5)":"#000000";
|
|
n.beginPath();for(var f=0;f<4;f++){var Y=A[f];n.moveTo(Y,0);n.lineTo(Y,o);n.moveTo(0,Y);n.lineTo(o,Y)}n.stroke();
|
|
if($==9)return;if(!u){n.setLineDash([1,2]);var b=o*.53,a=Math.max(0,Math.min(o-b,E-b/2)),w=Math.max(0,Math.min(o-b,e-b/2));
|
|
n.strokeRect(Math.round(a)+.5,Math.round(w)+.5,Math.round(b),Math.round(b))}n.fillStyle="#000000";n.beginPath();
|
|
n.arc(E,e,o/8,0,Math.PI*2);n.fill()};c2.prototype.go=function($){H.mW(window,this.zR);H.aa(window,this.Zw);
|
|
this.LO($)};c2.prototype.LO=function($){var o=H.DQ($,this.S),T=Math.max(0,Math.min(2,Math.floor(o.x/(this.NB/3)))),s=Math.max(0,Math.min(2,Math.floor(o.y/(this.NB/3))));
|
|
this.a(s*3+T)};c2.prototype.AK=function($){this.J(new x(H.E.O,!1));H.vY(window,this.zR);H.SY(window,this.Zw)};
|
|
function hE($,o,T,s){aI.call(this);this.k=H.z("button","fitem"+(o?" spread":"")+(s?" bbtn":""));this.Oj=$;
|
|
this.RA=T;this.f();this.k.addEventListener("click",this.A6.bind(this),!1)}hE.prototype=new aI;hE.prototype.f=function(){var $=this.k,o=this.Oj,T=this.RA,s=aX.get(o);
|
|
if(s.startsWith("<img")||s.startsWith("<svg"))$.innerHTML=s;else $.textContent=s;if(s.startsWith("<img")||s.startsWith("<svg"))$.setAttribute("style","padding:2px");
|
|
if(T){$.setAttribute("title",aX.get(T))}};hE.prototype.a5M=function($){this.k.setAttribute("title",$)};
|
|
hE.prototype.A6=function($){this.J(new x("click",!1))};hE.prototype.UM=function(){H.v2(this.k,"bactive")};
|
|
hE.prototype.Xc=function(){H.oX(this.k,"bactive")};hE.prototype.yl=function($,o){if($)this.Oj=$;if(o)this.RA=o;
|
|
this.f()};hE.prototype.a=function($){if($)this.UM();else this.Xc()};hE.prototype.Ed=function(){return this.k.getAttribute("class").indexOf("bactive")!=-1};
|
|
hE.prototype.v=function(){return this.Ed()};function fo(J){aI.call(this);this.k=H.z("span","fitem cswatch");
|
|
this.a4Y=0;this._X=[];this.PE=[];var $=this.a8g.bind(this);for(var f=0;f<J;f++){this._X.push(0);var o=H.z("span","colorsample");
|
|
o.addEventListener("click",$,!1);this.PE.push(o);this.k.appendChild(o)}var T=[16711680,65280,255,65535,16711935,16776960,0,8421504,16777215],s=Math.min(J,T.length);
|
|
for(var f=0;f<s;f++)this._X[f]=T[f];this.E4()}fo.prototype=new aI;fo.prototype.a8g=function($){this.a4Y=this.PE.indexOf($.currentTarget);
|
|
this.J(new x(H.E.O))};fo.prototype.v=function(){return this._X[this.a4Y]};fo.prototype.a=function($){var o=this._X,T=o.indexOf($);
|
|
if(T!=-1)o.splice(T,1);else o.pop();o.unshift($);this.E4()};fo.prototype.E4=function(){for(var f=0;f<this._X.length;
|
|
f++){this.PE[f].setAttribute("style","background-color:#"+L.B$(this._X[f]))}};function hJ($){aI.call(this);
|
|
this.G5={i:0,m:0,P:0};this.Rl=$;this.k=H.z("span","fitem colorsample");this.k.addEventListener("click",this.YH.bind(this),!1)}hJ.prototype=new aI;
|
|
hJ.prototype.f=function(){};hJ.prototype.YH=function($){var o=this.G5;this.J(new x("click"));var T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.NC,a_:"colorpicker",zS:o.i<<16|o.m<<8|o.P,Ba:this.eI.bind(this),dx:this.Rl};this.J(T)};
|
|
hJ.prototype.eI=function($){this.Ab($);this.J(new x(H.E.O))};hJ.prototype.aqu=function(){this.YH(null)};
|
|
hJ.prototype.Hf=function(){var $=this.G5;return $.i<<16|$.m<<8|$.P};hJ.prototype.v=function(){return L.h.wb(this.G5)};
|
|
hJ.prototype.Ab=function($){this.G5={i:$>>16&255,m:$>>8&255,P:$&255};this.q2()};hJ.prototype.a=function($){this.G5=L.h.Qc($);
|
|
this.q2()};hJ.prototype.q2=function(){var $=this.G5,o=$.i,T=$.m,s=$.P,E=o<<16|T<<8|s;this.k.setAttribute("style","background-color:#"+L.B$(E))};
|
|
function iL(){aI.call(this);this.c$=!1;this.yt=20;this.aoU=10;this.JA=0;this.c$=!1;this.MB={i:255,m:0,P:0};
|
|
this.Sm={i:0,m:0,P:0};this.k=H.z("canvas");this.iB();H.fb(this.k);H.uE(this.k,this.Wp.bind(this))}iL.prototype=new aI;
|
|
iL.prototype.a2p=function($){if(this.c$==$)return;this.c$=$;this.iB()};iL.prototype.f=function(){};iL.prototype.ac5=function($,o){function T(s){return{i:s>>16&255,m:s>>8&255,P:s&255}}if($!=null)this.MB=T($);
|
|
if(o!=null)this.Sm=T(o);this.iB()};iL.prototype.Wp=function($){var o=H.DQ($,this.k),T=o.x*H.K(),s=o.y*H.K(),E=this.yt,e=this.aoU,n=0;
|
|
if(T<e&&s<e){n=0}else if(T>E-e&&s>E-e){n=1}else if(T<e){n=2}else{n=3}var A=new x(H.E.Q,!0);if(n>1)A.data={e:H.V.uY,M9:gr.ux,f8:n};
|
|
else{this.JA=n;var u=n==0?this.MB:this.Sm;A.data={e:H.V.NC,a_:"colorpicker",zS:u.i<<16|u.m<<8|u.P,Ba:this.eI.bind(this)}}this.J(A)};
|
|
iL.prototype.eI=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.uY,M9:gr.ux,f8:this.JA,H:$};this.J(o)};
|
|
iL.prototype.iB=function(){var $=this.k,o=$.getContext("2d"),T=H.K(),E="#aaaaaa",e=.62;H.QE($,34,34);
|
|
$.setAttribute("style",$.getAttribute("style")+";cursor:pointer");var s=this.yt=$.width,n=this.aoU=Math.round(s*e);
|
|
function A(X,N){var z=X.i,i=X.m,k=X.P;if(N)z=i=k=Math.round(L.DB(z,i,k));var Q=z<<16|i<<8|k;return"#"+L.B$(Q)}function u(X,N,n,z,i){o.fillStyle=i?i:"black";
|
|
o.fillRect(X,N,n,n);o.fillStyle=z;o.fillRect(X+1,N+1,n-2,n-2)}u(s-n,s-n,n,A(this.Sm,this.c$));u(0,0,n,A(this.MB,this.c$));
|
|
var Y=s-n,b=Math.round(Y*e);u(s-b,Y-b,b,"white",E);u(s-Y,0,b,"black",E);o.save();o.fillStyle=E;o.translate(0,s);
|
|
o.rotate(-Math.PI/2);Y=s-n;var a=Math.round(Y*.28),w=Math.round(Y*.25);for(var f=0;f<2;f++){o.fillRect(a,a,Y-a,1);
|
|
o.beginPath();o.moveTo(Y-w,a+.5-w);o.lineTo(Y,a+.5);o.lineTo(Y-w,a+.5+w);o.closePath();o.fill();o.transform(0,1,1,0,0,0)}o.restore()};
|
|
function ef($){gh.call(this,$,!1,"brushbutton nopadding",16.6,10,gr.m8,!0);this.hg=new fs([12,14,0],1,1e3," px",0,!0);
|
|
this.hg.B(H.E.O,this.zf,this);this.K4.appendChild(this.hg.k);this.Yi=new fs([12,17],0,100,"%");this.Yi.B(H.E.O,this.zf,this);
|
|
this.K4.appendChild(this.Yi.k)}ef.prototype=new gh;ef.prototype.gD=function(){var $=["pencil","trees"];
|
|
for(var f=0;f<$.length;f++)$[f]="brushes/"+$[f]+".abr";return $};ef.prototype.UY=function($){var o=this.k.getBoundingClientRect();
|
|
this.uF(o.left,o.top+o.height)};ef.prototype.uF=function($,o){this.MU();var T=new x(H.E.Q,!0);T.data={e:H.V.NM,bF:this.gz,x:$,y:o};
|
|
this.J(T)};ef.prototype.a=function($,o,T){this.hQ=JSON.parse(JSON.stringify($));var s=Math.floor(20*H.K()),E=Math.floor(36*H.K()),e=Math.floor(24*H.K()),n=ih.Ey($,o,T,s,e,E);
|
|
this.WP.setAttribute("src",n);H.kg(this.WP,E,e);var A=$.Brsh.v;this.hg.a(A.Dmtr.v.val);if(A.Hrdn!=null){this.Yi.wI();
|
|
this.Yi.a(A.Hrdn.v.val)}else this.Yi.v9();this.aI.o5(-1)};ef.prototype.iF=function(){return{list:[{t:"Objc",v:this.v()}],Ou:[],A0:[]}};
|
|
ef.prototype.v=function(){return this.hQ};ef.prototype.MU=function(){if(!this.te)return;var $=[],o=[],T=this.lV,s=Math.floor(33*H.K()),E=Math.floor(40*H.K());
|
|
for(var f=0;f<T.list.length;f++){var e=T.list[f].v,n=ih.Ey(e,T.Ou,T.A0,s,E);$.push(n);o.push(e.Nm.v.split("=").pop())}this.aI.rS($,o,s,E);
|
|
this.te=!1};ef.prototype.aC=function($){var o=this.lV;this.a(o.list[this.aI.v()].v,o.Ou,o.A0);this.J(new x(H.E.O))};
|
|
ef.prototype.f=function(){gh.prototype.f.call(this);this.hg.f();this.Yi.f()};ef.prototype.zf=function($){var o=this.lV,T=this.hQ;
|
|
T.Brsh.v.Dmtr.v.val=this.hg.v();if(T.Brsh.v.Hrdn!=null)T.Brsh.v.Hrdn.v.val=this.Yi.v();this.a(T,o.Ou,o.A0);
|
|
this.J(new x(H.E.O))};function eT($){gh.call(this,$,!0,"contourbutton",17,10.5,gr.tS)}eT.prototype=new gh;
|
|
eT.prototype.aC=function($){this.a(this.lV[$.target.v()]);this.J(new x(H.E.O))};eT.prototype.M0=function($){var o=new x(H.E.Q,!0);
|
|
o.data={e:H.V.NC,a_:"contoureditor",Vi:this.hQ,response:this.aj0.bind(this)};this.J(o)};eT.prototype.aj0=function($){this.a($);
|
|
this.J(new x(H.E.O))};eT.prototype.MU=function(){if(!this.te)return;var $=Math.floor(38*H.K()),o=Math.floor(38*H.K()),T=[],s=[],E=this.lV;
|
|
for(var f=0;f<E.length;f++){s.push(E[f].Nm?E[f].Nm.v:"");T.push(L.sE.Ey(E[f].Crv.v,$,o))}this.aI.rS(T,s,$,o);
|
|
this.te=!1};eT.prototype.a=function($){this.hQ=JSON.parse(JSON.stringify($));var o=this.hQ.Crv.v;for(var f=0;
|
|
f<o.length;f++)if(o[f].v.Cnty==null)o[f].v.Cnty={t:"bool",v:!0};this.rE()};eT.prototype.rE=function(){var $=Math.floor(30*H.K()),o=Math.floor(30*H.K()),T=L.sE.Ey(this.hQ.Crv.v,$,o);
|
|
this.WP.setAttribute("src",T);H.kg(this.WP,$,o)};eT.prototype.v=function(){return JSON.parse(JSON.stringify(this.hQ))};
|
|
function eu($){aI.call(this);this.yN=null;this.GH=null;this.BB=null;this.pQ=null;this.ajY=[];this.ai7=[];
|
|
this.k=H.z("span","fitem fillbutton");this.gz=new aI;this.gz.k=H.z("div","floatcont form");this.gz.k.setAttribute("style","width: 21em;");
|
|
this.gz.parent=this;this.s0=$;this.pq=this.pq=H.z("label","flabel");this.k.appendChild(this.pq);this.S=H.z("canvas");
|
|
this.V8=this.S.getContext("2d");this.adH=null;this.k.appendChild(this.S);this.S.addEventListener("click",this.UY.bind(this),!1);
|
|
this.Zd=new eI([12,66],["","Color","Grad","Patt"]);this.gz.k.appendChild(this.Zd.k);this.Zd.B(H.E.O,this.Qr,this);
|
|
this.gz.k.appendChild(H.z("hr"));this.ap6=H.z("span");this.Uf=new hJ(!0);this.Uf.parent=this.gz;this.Uf.B(H.E.O,this.Qr,this);
|
|
this.lw=new fo(10);this.lw.B(H.E.O,this.Qr,this);this.G7=H.z("div","marged hiline");this.G7.appendChild(this.Uf.k);
|
|
H.ze(this.G7);this.G7.appendChild(this.lw.k);this.Vz=new hF("GrFl",!0);this.Vz.parent=this.gz;this.Vz.B(H.E.O,this.Qr,this);
|
|
this.yf=H.z("div","marged hiline");var o="Grad Type Algn Angl Rvrs Scl Ofst".split(" ");for(var f=0;
|
|
f<o.length;f++){var T=this.Vz.DP[o[f]].k;this.yf.appendChild(T)}this.GN=new hF("patternFill",!0);this.GN.parent=this.gz;
|
|
this.GN.B(H.E.O,this.Qr,this);this.rh=H.z("div","marged hiline");var o=["Ptrn","Scl","Algn","phase"];
|
|
for(var f=0;f<o.length;f++){var T=this.GN.DP[o[f]].k;this.rh.appendChild(T)}}eu.prototype=new aI;eu.prototype.YE=function($,o){if(o==gr.WW){this.ajY=[];
|
|
this.ai7=[];if(this.yN)this.a(this.BB,this.v(),this.yN)}this.GH=$;this.Vz.YE($,o);this.GN.YE($,o)};eu.prototype.f=function(){this.pq.textContent=aX.get(this.s0)+": ";
|
|
this.Zd.f();this.Uf.f();this.Vz.f();this.GN.f()};eu.prototype.Qr=function($){var o=$.currentTarget;if(o==this.Zd){var T=this.Zd.v(),s={Ul:T,n$:this.yN[T]};
|
|
if(T>0&&s.n$==null)s.n$=JSON.parse(JSON.stringify(ev.WA[T-1]));if(this.yN)this.a(this.BB,s,this.yN)}if(o==this.lw)this.Uf.Ab(o.v());
|
|
this.J(new x(H.E.O,!1))};eu.prototype.UY=function($){var o=this.S.getBoundingClientRect(),T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.NM,bF:this.gz,x:o.left,y:o.top+o.height+4};this.J(T);this.lw.a(this.Uf.Hf())};eu.prototype.a=function($,o,T){this.yN=T;
|
|
this.BB=$;var s=[[13,1,0],[13,0],[12,37],[12,62]],E=this.ajY,e=this.ai7,n=!1,b;for(var f=0;f<4;f++){var A={Ul:f,n$:T[f]},u=eu.S5(A);
|
|
if(e[f]==u)continue;n=!0;var Y=eu.K2(null,A,this.GH,this.BB,22,22,!1);E[f]="<img width=\"22\" height=\"22\" src=\""+Y+"\" />";
|
|
e[f]=u}if(n)this.Zd.TY(E,s);this.Zd.a(o.Ul);var u=eu.S5(o);if(u!=this.adH)eu.K2(this.V8,o,this.GH,this.BB,30,23,!0);
|
|
this.adH=u;var a=o.Ul;if(a==0){b=this.ap6}if(a==1){this.Uf.a(o.n$.Clr.v);b=this.G7}if(a==2){this.Vz.update($,o.n$);
|
|
b=this.yf}if(a==3){this.GN.update($,o.n$);b=this.rh}if(b!=this.pQ){if(this.pQ!=null){this.gz.k.removeChild(this.pQ)}this.gz.k.appendChild(b);
|
|
this.pQ=b}};eu.prototype.v=function(){var $={Ul:this.Zd.v()};if($.Ul==1){$.n$=JSON.parse(JSON.stringify(ev.WA[0]));
|
|
$.n$.Clr.v=this.Uf.v()}if($.Ul==2){$.n$=this.Vz.v()}if($.Ul==3){$.n$=this.GN.v()}return $};eu.S5=function($){var o=$.Ul,T=$.n$,s="empty";
|
|
if(o==1){s=L.h.Qc(T.Clr.v);s=s.i+","+s.m+","+s.P}if(o==2)s=JSON.stringify(T.Grad.v);if(o==3)s=T.Ptrn.v.Idnt.v;
|
|
return s};eu.K2=function($,o,T,s,E,e,n){if($==null)$=eu.V8;var A=Math.floor(E*H.K()),u=Math.floor(e*H.K()),Y=$.canvas,b;
|
|
Y.width=A;Y.height=u;H.kg(Y,A,u);var a=o.Ul;if(a==0){$.fillStyle="#ffffff";$.fillRect(0,0,A,u);$.strokeStyle="#ff0000";
|
|
$.lineWidth=2;$.moveTo(0,0);$.lineTo(A,u);$.moveTo(0,u);$.lineTo(A,0);$.stroke()}if(a==1){var w=o.n$.Clr.v;
|
|
w=L.h.Qc(w);$.fillStyle="#"+L.B$(w.i<<16|w.m<<8|w.P);$.fillRect(0,0,A,u)}if(a==2){D.eH.Ey(o.n$.Grad.v,A,u,0,T.z4,T.GR,Y)}if(a==3){var X=o.n$.Ptrn.v,N;
|
|
if(s!=null)N=fW.OA(X,s.add.Patt);if(N==null)N=fW.OA(X,T.q_);aC.Ey(N,A,u,Y)}if(n){$.beginPath();$.strokeStyle="#000000";
|
|
$.fillStyle="#ffffff";$.lineWidth=2;var z=A*.7,i=Math.floor(u*.7),k=7*H.K();$.moveTo(z,i);$.lineTo(z+k,i);
|
|
$.lineTo(z+k/2,i+k/2);$.closePath();$.stroke();$.fill()}if($==eu.V8)return Y.toDataURL()};eu.V8=H.z("canvas").getContext("2d");
|
|
function aC($){gh.call(this,$,!1,"patternbutton",18,10,gr.WW);this.CE=null}aC.prototype=new gh;aC.prototype.aC=function($){var o=this.lV[this.aI.v()];
|
|
this.hQ={classID:"Ptrn",Nm:{t:"TEXT",v:o.name},Idnt:{t:"TEXT",v:o.id}};this.J(new x(H.E.O));this.rE()};
|
|
aC.Hg=!1;aC.prototype.MU=function(){if(!this.te)return;var $=this.lV;if($==null||!aC.Hg){var o=new x(H.E.Q,!0);
|
|
o.data={e:H.V.ZP,M9:{url:"rsrc/basic/basic.pat"}};this.J(o);aC.Hg=!0;return}var T=Math.floor(34*H.K()),s=Math.floor(34*H.K()),E=[],e=[];
|
|
for(var f=0;f<$.length;f++){E.push(aC.Ey($[f],T,s));e.push($[f].name)}this.aI.rS(E,e,T,s);this.te=!1};
|
|
aC.prototype.a=function($,o){if(this.hQ&&$.Idnt.v==this.hQ.Idnt.v)return;this.hQ=JSON.parse(JSON.stringify($));
|
|
this.rE(o)};aC.prototype.v=function(){return JSON.parse(JSON.stringify(this.hQ))};aC.prototype.iF=function(){return this.CE?[this.CE]:[]};
|
|
aC.prototype.rE=function($){var o=Math.floor(50*H.K()),T=Math.floor(50*H.K()),s;if($!=null)s=fW.OA(this.hQ,$.add.Patt);
|
|
if(s==null)s=fW.OA(this.hQ,this.lV);this.CE=s;var E=aC.Ey(s,o,T);this.WP.setAttribute("src",E);H.kg(this.WP,o,T)};
|
|
aC.S=H.z("canvas","");aC.Ey=function($,o,T,s){if(s==null)s=aC.S;var E=s.getContext("2d");s.width=o;s.height=T;
|
|
if($){var e=$.i2[1],n=e.d,A=e.w,u=$.i2[0],Y=Math.min(o/n,T/A),b=Y;if(b*n<2)b=2/n;var a=Y;if(a*A<2)a=2/A;
|
|
var w=D.p.qh([u,e],new fY(b,0,0,a,0,0),!1),X=w.rect.d,N=w.rect.w,z=E.createImageData(X,N);L.w0(w.buffer,z.data);
|
|
E.putImageData(z,Math.floor((o-X)/2),Math.floor((T-N)/2))}return s.toDataURL()};function d2($){gh.call(this,$,!1,"patternbutton",24.2,17,gr.fB);
|
|
this.cA=""}d2.prototype=new gh;d2.prototype.aC=function($){this.hQ=JSON.parse(JSON.stringify(this.lV[0][this.aI.v()]));
|
|
this.J(new x(H.E.O))};d2.prototype.MU=function(){var $=this.lV;if($==null||!this.te)return;var o=Math.floor(50*H.K()),T=Math.floor(50*H.K()),s=[],E=[];
|
|
for(var f=0;f<$[0].length;f++){s.push(d2.Ey(this.lV[0][f].h2,o,T,this.lV[1]));E.push($[0][f].xz.Nm.v.split("=").pop())}this.aI.rS(s,E,o,T);
|
|
this.te=!1};d2.prototype.a=function($,o,T,s){var E=JSON.stringify($.h2)+","+T+","+s;if(this.cA!=E){this.cA=E;
|
|
this.hQ=JSON.parse(JSON.stringify($));this.rE(o,T,s)}this.aI.o5(-1)};d2.prototype.v=function(){return JSON.parse(JSON.stringify(this.hQ))};
|
|
d2.prototype.rE=function($,o,T){var s=Math.floor(68*H.K()),E=Math.floor(68*H.K()),e=d2.Ey(this.hQ.h2,s,E,$?$:this.lV[1],o,T);
|
|
this.WP.setAttribute("src",e);H.kg(this.WP,s,E)};d2.Ey=function($,o,T,s,E,e){var n=new iG;n.d=o;n.w=T;
|
|
n.buffer=L.G(o*T*4);n.add.Patt=s;n.pa(E==null?90:E);n.um(e==null?30:e);var A=new df(0,0,Math.round(o*.5),Math.round(T*.5));
|
|
A.x=Math.round((o-A.d)/2);A.y=Math.round((T-A.w)/2);var u=n.$f();u.rect=A;u.buffer=L.G(A.Y()*4);L.wr(u.buffer,4284045657);
|
|
fW.yb($,u,.5*100);n.u.push(u);n.eA();n.T();var Y=y.re;y.re=!1;n.ir();var b=n.aw();y.re=Y;var a=eY.rv(b.buffer,n.d,n.w);
|
|
return a};function bK($){gh.call(this,null,!1,"tpresetbutton",18,24,gr.ws,!0);H.oX(this.k,"fitem");this.aI.iI(1);
|
|
this.id=$;this.rE();this.LC=new ad([15,7,9]);this.LC.a(!0);this.LC.B(H.E.O,this.a3f,this);this.kc.appendChild(this.LC.k)}bK.prototype=new gh;
|
|
bK.prototype.a9k=function($){if(this.id==$)return;this.id=$;this.bq(this.lV)};bK.prototype.aC=function($){var o=this.lV[this.aI.v()],T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.uY,U_:"set",M9:gr.ws,Tk:o};this.J(T)};bK.prototype.f=function(){gh.prototype.f.call(this);
|
|
this.LC.f()};bK.prototype.a3f=function(){this.te=!0;this.MU()};bK.prototype.MU=function(){if(!this.te)return;
|
|
var $=Math.floor(16*H.K()),o=Math.floor(16*H.K()),T=[],s=[],E=this.lV,e=this.LC.v();for(var f=0;f<E.length;
|
|
f++){var n=D.ZE(E[f]);if(!e||n==this.id){s.push(E[f][0]?E[f][0].split("=").pop():"");T.push(n==-1?"":PIMG[D.Wu[n][0]])}else{T.push(null);
|
|
s.push(null)}}this.aI.rS(T,s,$,o);this.te=!1};bK.prototype.rE=function(){var $=this.WP;$.setAttribute("src",PIMG[D.Wu[this.id][0]]);
|
|
H.v2($,"toolicon")};bK.prototype.iF=function(){return null};bK.pp={};bK.Ey=function($,o,T){var s=bK.V8,E=bK.pp,e=L.B$($.i<<16|$.m<<8|$.P);
|
|
if(E[e])return E[e];if(s==null){var n=H.z("canvas");s=bK.V8=n.getContext("2d")}var n=s.canvas;n.width=o;
|
|
n.height=T;s.fillStyle="#"+e;s.fillRect(0,0,o,T);var A=E[e]=n.toDataURL();return A};function gj($,o){aI.call(this);
|
|
this.k=H.z("span","fitem curveeditor");this.j5=null;this.a86=0;this.cg="";this.mode=0;this.gS=$;this.alL=o;
|
|
this.P2=null;this.va=null;this.a3Y=0;this.ahn=0;this.zg=new aY;this.hx=this.LO.bind(this);this.jF=this.AK.bind(this);
|
|
this.S=H.z("canvas","");this.V8=this.S.getContext("2d");H.fb(this.S);H.QE(this.S,256,256,this.V8);this.k.appendChild(this.S);
|
|
H.uE(this.S,this.go.bind(this))}gj.prototype=new aI;gj.prototype.a=function($,f){var o=JSON.stringify($);
|
|
if(o==JSON.stringify(this.P2))return;this.mode=$.length==256?1:0;this.P2=JSON.parse(o);if(f!=null)this.va=this.P2[f];
|
|
this.bT()};gj.prototype.VY=function($,o,T){this.j5=$;this.a86=o;this.cg=T;this.bT()};gj.prototype.v=function(){return JSON.parse(JSON.stringify(this.P2))};
|
|
gj.prototype.Q4=function(){return this.P2.indexOf(this.va)};gj.prototype.go=function($){var o=H.DQ($,this.S),T=o.x,s=256-o.y;
|
|
if(this.gS){var E=T;T=256-s;s=E}this.zg.A5(T,s);if(this.mode==0){var e=0,n=1e9,a;for(var f=0;f<this.P2.length;
|
|
f++){var A=this.P2[f].v,u=A.Hrzn.v-T,Y=A.Vrtc.v-s,b=Math.sqrt(u*u+Y*Y);if(b<n){n=b;e=f}}if(n<15)a=this.P2[e];
|
|
else{a=L.sE.p7(T,s,!0);this.P2.push(a);this.P2.sort(function(w,X){return w.v.Hrzn.v-X.v.Hrzn.v})}this.va=a;
|
|
this.ahn=this.P2.slice(0)}H.mW(document.body,this.hx);H.aa(document.body,this.jF);this.LO($)};gj.prototype.LO=function($){var o=H.DQ($,this.S),T=o.x,s=256-o.y;
|
|
if(this.gS){var E=T;T=256-s;s=E}if(this.mode==0){var e=this.P2,n=this.va,A=this.ahn,u=A.indexOf(n),Y=e.indexOf(n)!=-1,b=A.length-1,a=T;
|
|
if(u==0){a=Math.max(0,Math.min(A[1].v.Hrzn.v-1,T))}else if(u==b){a=Math.min(255,Math.max(A[b-1].v.Hrzn.v+1,T))}else{var w=T<0||T>255||s<0||s>255;
|
|
if(T<=A[u-1].v.Hrzn.v||T>=A[u+1].v.Hrzn.v)w=!0;if(!w&&!Y)e.splice(u,0,n);if(w&&Y)e.splice(u,1)}if(!this.alL)n.v.Hrzn.v=Math.round(a);
|
|
n.v.Vrtc.v=Math.max(0,Math.min(255,Math.round(s)))}else{T=Math.round(T);s=Math.round(s);T=Math.max(0,Math.min(255,T));
|
|
s=Math.max(0,Math.min(255,s));var X=this.zg.x,N=T,z=this.zg.y,i=s;if(T<this.zg.x){N=X;X=T;i=z;z=s}this.P2[T]=s;
|
|
if(X!=N)for(var k=X;k<=N;k++)this.P2[k]=Math.round(z+(k-X)*(i-z)/(N-X))}this.zg.A5(T,s);this.bT();this.J(new x(H.E.O))};
|
|
gj.prototype.AK=function($){H.vY(document.body,this.hx);H.SY(document.body,this.jF);this.J(new x(H.E.O))};
|
|
gj.prototype.bT=function(){var $=this.V8;$.fillStyle="#ffffff";$.fillRect(0,0,256,256);if(this.j5){$.translate(0,256);
|
|
$.scale(1,-1);hQ.dL($,this.j5,5700/this.a86,this.cg);$.scale(1,-1);$.translate(0,-256)}$.strokeStyle="#aaaaaa";
|
|
$.lineWidth=1;$.beginPath();for(var f=1;f<4;f++){$.moveTo(0,64*f-.5);$.lineTo(255,64*f-.5);$.moveTo(64*f-.5,0);
|
|
$.lineTo(64*f-.5,255)}$.stroke();if(this.gS){$.save();$.transform(0,1,-1,0,256,0)}if(this.mode==0){var o=this.P2,T=L.sE.JI(o,256);
|
|
$.strokeStyle="#000000";$.beginPath();$.moveTo(0,255.5-T[0]);for(var f=0;f<256;f++)$.lineTo(f,255.5-T[f]);
|
|
$.stroke();$.lineWidth=2;for(var f=0;f<o.length;f++){var s=o[f].v;$.fillStyle=this.va==o[f]?"#333":"#fff";
|
|
$.beginPath();$.moveTo(s.Hrzn.v,255.5-s.Vrtc.v);$.arc(s.Hrzn.v,255.5-s.Vrtc.v,3,0,2*Math.PI);$.stroke();
|
|
$.fill()}}else{var T=this.P2;$.strokeStyle="#000000";$.beginPath();$.moveTo(0,255.5-T[0]);for(var f=0;
|
|
f<256;f++)$.lineTo(f,255.5-T[f]);$.stroke()}if(this.gS)$.restore()};function hQ($,o){aI.call(this);this.k=H.z("span","");
|
|
this.NA=new h_([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5],[12,82]]);this.NA.B(H.E.O,this.iB,this);this.k.appendChild(this.NA.k);
|
|
H.ze(this.k);this.S=H.z("canvas");var T=this.S;this.k.appendChild(T);T.width=Math.round($*H.K());T.height=Math.round(100*H.K());
|
|
H.kg(T,T.width,T.height);this.V8=T.getContext("2d");this.j5=null;this.BT=0;this.acH=null;this.ahZ=[];
|
|
this.QG=[];var s=["Mean:","Pixels:"],E=this.k;for(var f=0;f<s.length;f++){var e=new eB(s[f]);this.ahZ.push(e);
|
|
if(o)E.appendChild(e.k);var n=new eB("hi");this.QG.push(n);if(o)E.appendChild(n.k);H.ze(E)}}hQ.prototype=new aI;
|
|
hQ.prototype.f=function(){this.NA.f()};hQ.prototype.iI=function($){this.NA.a($);this.iB()};hQ.prototype.a=function($,o){this.j5=$;
|
|
this.acH=o;this.iB()};hQ.prototype.Ab=function($){if($==this.BT)return;this.BT=$;this.iB()};hQ.prototype.iB=function(){if(this.j5==null)return;
|
|
var $=this.S,o=this.V8,T=this.j5,s=this.acH,E=this.NA.v(),e=6e3/T[4],n="#"+L.B$(this.BT),A=hQ.dL;$.width=$.width;
|
|
o.setTransform($.width/256,0,0,-$.height/100,0,$.height);o.globalCompositeOperation="lighter";if(E==0)A(o,T[0],e/3,n);
|
|
else if(E<4)A(o,T[E],e,n);else{A(o,T[1],e,"#ff0000");A(o,T[2],e,"#00ff00");A(o,T[3],e,"#0000ff")}o.setTransform(1,0,0,1,0,0);
|
|
if(s!=null){var u=0;for(var f=0;f<256;f++)u+=f*T[E][f];if(E==0)u/=3;this.QG[0].a((u/s).toFixed(1)+"");
|
|
this.QG[1].a(s+"")}};hQ.dL=function($,o,T,s){$.beginPath();$.moveTo(0,0);for(var E=0;E<256;E++)$.lineTo(E,o[E]*T);
|
|
$.lineTo(256,0);$.closePath();$.fillStyle=s;$.fill()};function a$($){aI.call(this);this.Sy={i:0,m:0,P:0};
|
|
if(Math.abs($-256/H.K())<10)$=256/H.K();var o=this.k=H.z("div","flexrow");this.$U=new aY;this.$A=new aY;
|
|
this.zR=this.oK.bind(this);this.Zw=this.a4x.bind(this);this.S=H.z("canvas","");this.V8=this.S.getContext("2d");
|
|
this.S.width=this.S.height=256;this.aot=this.V8.getImageData(0,0,256,256);this.aeU=-1;H.fb(this.S);H.uE(this.S,this.ae9.bind(this));
|
|
o.appendChild(this.S);this.a9i=this.Nm.bind(this);this.agJ=this.a88.bind(this);this.OF=H.z("canvas","");
|
|
this.Ua=this.OF.getContext("2d");this.OF.width=20;this.OF.height=256;this.a10=this.Ua.getImageData(0,0,20,256);
|
|
this.aqJ(this.a10.data,20,256);H.fb(this.OF);H.uE(this.OF,this.aep.bind(this));o.appendChild(this.OF);
|
|
this.S.setAttribute("style","width:"+$+"px; height:"+$+"px");this.OF.setAttribute("style","width:16px; height:"+$+"px")}a$.prototype=new aI;
|
|
a$.prototype.RE=function($,o){this.S.style.width=$-16+"px"};a$.prototype.a=function($){this.Sy=$;this.update()};
|
|
a$.prototype.v=function(){return JSON.parse(JSON.stringify(this.Sy))};a$.prototype.update=function(){var $=this.Sy,o=L.sY($.i,$.m,$.P);
|
|
if(o.ed==0)o.rZ=this.$U.x/255;if(o.rZ==0||o.ed==0)o.cQ=(255-this.hl(this.$A.y))/255;if(o.ed!=0)this.$U.x=o.rZ*255;
|
|
this.$U.y=(1-o.ed)*255;this.$A.y=(1-o.cQ)*255;var T=this.aot;if(Math.abs(o.cQ-this.aeU)>.002){this.aml(T.data,256,256,o.cQ);
|
|
this.aeU=o.cQ}var s=this.V8;s.putImageData(T,0,0);s.strokeStyle="#000000";s.beginPath();s.arc(this.$U.x+1,this.$U.y+1,5,0,2*Math.PI);
|
|
s.stroke();s.strokeStyle="#ffffff";s.beginPath();s.arc(this.$U.x,this.$U.y,5,0,2*Math.PI);s.stroke();
|
|
T=this.a10;s=this.Ua;s.putImageData(T,0,0);s.strokeStyle="#ffffff";s.beginPath();s.moveTo(0,this.$A.y);
|
|
s.lineTo(20,this.$A.y);s.lineWidth=2;s.stroke()};a$.prototype.aml=function($,o,T,s){var E=1/o,e=1/T;
|
|
for(var n=0;n<T;n++)for(var A=0;A<o;A++){var u=L.ag(s,A*E,(T-n-1)*e),f=n*o+A<<2;$[f+0]=~~(u.i*255);$[f+1]=~~(u.m*255);
|
|
$[f+2]=~~(u.P*255);$[f+3]=255}};a$.prototype.aqJ=function($,o,T){var s=new Uint32Array($.buffer);for(var E=0;
|
|
E<T;E++){var e=L.ag(1-E/T,1,1),n=255<<24|e.P*255<<16|e.m*255<<8|e.i*255;for(var A=0;A<o;A++)s[E*o+A]=n}};
|
|
a$.prototype.ae9=function($){H.mW(window,this.zR);H.aa(window,this.Zw);this.oK($)};a$.prototype.a4x=function($){H.vY(window,this.zR);
|
|
H.SY(window,this.Zw)};a$.prototype.oK=function($){var o=H.DQ($,this.S);o.x=o.x*(256/parseFloat(this.S.style.width));
|
|
o.y=o.y*(256/parseFloat(this.S.style.height));this.$U.A5(this.hl(o.x),this.hl(o.y));this.tm()};a$.prototype.tm=function(){this.Sy=this.ajw();
|
|
this.J(new x(H.E.O))};a$.prototype.ajw=function(){var $=L.ag((255-this.hl(this.$A.y))/255,this.Yw(this.$U.x/255),this.Yw(1-this.$U.y/255));
|
|
return{i:$.i,m:$.m,P:$.P}};a$.prototype.aep=function($){H.mW(window,this.a9i);H.aa(window,this.agJ);
|
|
this.Nm($)};a$.prototype.a88=function($){H.vY(window,this.a9i);H.SY(window,this.agJ)};a$.prototype.Nm=function($){var o=H.DQ($,this.OF);
|
|
o.y=o.y*(256/parseFloat(this.OF.style.height));this.$A.A5(this.hl(o.x),this.hl(o.y));this.tm()};a$.prototype.hl=function($){return Math.max(0,Math.min(255,$))};
|
|
a$.prototype.Yw=function($){return Math.max(0,Math.min(1,$))};function eI($,o,T){aI.call(this);if(!o)return;
|
|
this.pz=0;this.k=H.z("span","fitem bbmenu");if($){this.Oj=$;this.pq=H.z("label","flabel");this.pq.textContent=$+":";
|
|
this.k.appendChild(this.pq)}this.Jo=[];this.ez=null;this.TY(o,T);this.a(0)}eI.prototype=new aI;eI.prototype.yl=function($){this.Oj=$;
|
|
this.f()};eI.prototype.f=function(){if(this.Oj!=null){this.pq.textContent=aX.get(this.Oj)+": "}for(var f=0;
|
|
f<this.Jo.length;f++)this.Jo[f].f()};eI.prototype.v=function(){return this.pz};eI.prototype.TY=function($,o){while(this.Jo.length>0)this.k.removeChild(this.Jo.pop().k);
|
|
this.ez=$;for(var f=0;f<$.length;f++){var T=new hE($[f],!1,o?o[f]:null);T.B("click",this.CR,this);this.k.appendChild(T.k);
|
|
this.Jo.push(T)}this.f()};eI.prototype.a=function($){this.pz=$;for(var f=0;f<this.Jo.length;f++)this.Jo[f].Xc();
|
|
this.Jo[$].UM()};eI.prototype.CR=function($){var f=this.Jo.indexOf($.target);this.a(f);this.J(new x(H.E.O,!1))};
|
|
function bI($,o,T,s){if(s==null)s=16;var E=bI.Vc,e=E.getContext("2d"),n=s>>>1;E.width=E.height=s;var A=[];
|
|
for(var f=0;f<o.length;f++){if(o[f]=="checker"){e.fillStyle="white";e.fillRect(0,0,s,s);e.fillStyle="#bbbbbb";
|
|
e.fillRect(n,0,n,n);e.fillRect(0,n,n,n)}else if(o[f].startsWith("#")){e.fillStyle=o[f];e.fillRect(0,0,s,s)}if(o[f][0]=="-")A.push(o[f].slice(1));
|
|
else if(o[f]=="checker"||o[f].startsWith("#"))A.push("<img src=\""+E.toDataURL()+"\" />");else A.push("<img src=\""+o[f]+"\" class=\"autoscale gsicon\" />")}eI.call(this,$,A,T)}bI.prototype=new eI;
|
|
bI.Vc=H.z("canvas");function h_($,o,T,s){aI.call(this);if(!o)return;if(T==null)T=!1;this.pz=0;this.ahr=T;
|
|
this.Oj=$;this.Aw=null;this.ak9=s;this.acL=[];var E="dd"+H.Zs();this.k=H.z("span","fitem ddmenu");if($&&!T){this.pq=H.z("label","flabel");
|
|
this.k.appendChild(this.pq);this.pq.setAttribute("for",E)}this.zs=H.z("select","bbtn");this.zs.setAttribute("id",E);
|
|
this.k.appendChild(this.zs);this.zs.addEventListener("change",this.CR.bind(this),!1);this.Jo=[];this.ez=null;
|
|
this.TY(o,s);this.f()}h_.prototype=new aI;h_.prototype.yl=function($){this.Oj=$;this.f()};h_.prototype.f=function(){if(this.Oj!=null){var $=aX.get(this.Oj);
|
|
if(this.ahr)this.zs.setAttribute("title",$);else this.pq.textContent=$+":"}if(this.ez)this.TY(this.ez,this.ak9);
|
|
this.a(this.pz)};h_.prototype.v=function(){return this.pz};h_.prototype.TY=function($,o){H.Ft(this.zs);
|
|
var T=[],s=0;if(o){T.push(o[0]);for(var f=1;f<o.length;f++)T.push(T[f-1]+o[f])}this.ez=$;this.Aw=[];
|
|
this.ak9=o;for(var f=0;f<$.length;f++){var E=H.z("option");if(this.acL.indexOf(f)!=-1)E.setAttribute("disabled","");
|
|
E.textContent=aX.get($[f]);E.setAttribute("value",f);this.zs.appendChild(E);this.Jo.push(E);this.Aw.push(f+s);
|
|
if(T.indexOf(f+1)!=-1&&f!=$.length-1){var e=H.z("option");e.setAttribute("disabled","");e.textContent="";
|
|
this.zs.appendChild(e);s++}}};h_.prototype.a2x=function(f){this.acL.push(f);this.f()};h_.prototype.a=function($){this.pz=$;
|
|
this.zs.selectedIndex=this.Aw[$]};h_.prototype.CR=function($){this.pz=this.Aw.indexOf(this.zs.selectedIndex);
|
|
this.J(new x(H.E.O,!1))};function dg(){aI.call(this);this.mh=null;this.Z1=new f4;this.Z1.B(H.E.O,this.aci,this);
|
|
this.Z1.parent=this;this.ra=new ac([12,14,0],1,150,"px",0,!0);this.ra.B(H.E.O,this.Cy,this);this.ra.parent=this;
|
|
this.Dr=new ac([16,0],.01,100,"px",2,!0,null,5);this.Dr.B(H.E.O,this.Cy,this);this.Dr.parent=this;this.Tq=new ad("Auto");
|
|
this.Tq.B(H.E.O,this.Cy,this);this.Vg=new ac([16,1],-500,5e3,"%",0,!0);this.Vg.B(H.E.O,this.Cy,this);
|
|
this.Vg.parent=this;this.Un=new ac("\u2B0D",1,300,"%",null,null,null,null,[[2,7],[22,4,3]]);this.Un.B(H.E.O,this.Cy,this);
|
|
this.Un.parent=this;this.IG=new ac("\u2B0C",1,300,"%",null,null,null,null,[[2,7],[22,4,2]]);this.IG.B(H.E.O,this.Cy,this);
|
|
this.IG.parent=this;this.$P=new ac([16,2],-10,10,"px");this.$P.B(H.E.O,this.Cy,this);this.$P.parent=this;
|
|
this.fL=new hJ(!0);this.fL.B(H.E.O,this.a3X,this);this.fL.parent=this;this.wE=new hE("<img src=\""+PIMG["type/bold"]+"\" class=\"autoscale gsicon\" />");
|
|
this.zE=new hE("<img src=\""+PIMG["type/italic"]+"\" class=\"autoscale gsicon\" />");this.Ng=new hE("<img src=\""+PIMG["type/caps"]+"\" class=\"autoscale gsicon\" />");
|
|
this.bp=new hE("<img src=\""+PIMG["type/scaps"]+"\" class=\"autoscale gsicon\" />");this.y6=new hE("<img src=\""+PIMG["type/sub"]+"\" class=\"autoscale gsicon\" />");
|
|
this.pO=new hE("<img src=\""+PIMG["type/sup"]+"\" class=\"autoscale gsicon\" />");this.kQ=new hE("<img src=\""+PIMG["type/under"]+"\" class=\"autoscale gsicon\" />");
|
|
this.zN=new hE("<img src=\""+PIMG["type/strike"]+"\" class=\"autoscale gsicon\" />");var $=[this.wE,this.zE,this.Ng,this.bp,this.y6,this.pO,this.kQ,this.zN];
|
|
for(var f=0;f<$.length;f++)$[f].B("click",this.a45,this);this._g=new hE("<img src=\""+PIMG["par/left"]+"\" class=\"autoscale gsicon\" />");
|
|
this.fR=new hE("<img src=\""+PIMG["par/right"]+"\" class=\"autoscale gsicon\" />");this.j9=new hE("<img src=\""+PIMG["par/center"]+"\" class=\"autoscale gsicon\" />");
|
|
this.aey=new hE("<img src=\""+PIMG["par/jleft"]+"\" class=\"autoscale gsicon\" />");this.afJ=new hE("<img src=\""+PIMG["par/jright"]+"\" class=\"autoscale gsicon\" />");
|
|
this.a07=new hE("<img src=\""+PIMG["par/jcenter"]+"\" class=\"autoscale gsicon\" />");this.a2P=new hE("<img src=\""+PIMG["par/jall"]+"\" class=\"autoscale gsicon\" />");
|
|
this.pV=[this._g,this.fR,this.j9,this.aey,this.afJ,this.a07,this.a2P];for(var f=0;f<this.pV.length;f++)this.pV[f].B("click",this.Cy,this);
|
|
var o=["lind","rind","flind","bind","aind"],T=[];for(var f=0;f<5;f++)T.push("<img src=\""+PIMG["par/"+o[f]]+"\" class=\"autoscale gsicon\" /> ");
|
|
this.sp=new ac(T[0],-20,20,"px");this.sp.B(H.E.O,this.Cy,this);this.sp.parent=this;this.sH=new ac(T[1],-20,20,"px");
|
|
this.sH.B(H.E.O,this.Cy,this);this.sH.parent=this;this.gA=new ac(T[2],-20,20,"px");this.gA.B(H.E.O,this.Cy,this);
|
|
this.gA.parent=this;this.Jw=new ac(T[3],-20,20,"px");this.Jw.B(H.E.O,this.Cy,this);this.Jw.parent=this;
|
|
this.mX=new ac(T[4],-20,20,"px");this.mX.B(H.E.O,this.Cy,this);this.mX.parent=this;this.OO=new eI([12,33],["Abc ...","... \u0623\u064A \u0628\u064A"]);
|
|
this.OO.B(H.E.O,this.Cy,this);this.OO.parent=this}dg.prototype=new aI;dg.prototype.f=function(){this.Z1.f();
|
|
this.ra.f();this.Dr.f();this.Vg.f();this.$P.f();this.Un.f();this.IG.f();this.OO.f()};dg.prototype.a=function($,o,T){this.IT=JSON.parse(JSON.stringify($));
|
|
var s=this.IT,E=s.oH,e=s.CL;this.wE.a(E.FauxBold!=null?E.FauxBold:!1);this.zE.a(E.FauxItalic!=null?E.FauxItalic:!1);
|
|
this.Ng.a(E.FontCaps==2);this.bp.a(E.FontCaps==1);this.pO.a(E.FontBaseline==1);this.y6.a(E.FontBaseline==2);
|
|
this.kQ.a(E.Underline);this.zN.a(E.Strikethrough);this.Z1.a(E.Font==null?null:s.Nd[E.Font].Name,o,T);
|
|
var n=E.FontSize==null?20:E.FontSize;this.ra.a(n);var A=E.Tracking;this.Vg.a(A==null?0:A);this.Dr.a(E.Leading!=null&&E.Leading!=0?E.Leading:n);
|
|
this.Tq.a(E.AutoLeading);this.Un.a((E.VerticalScale!=null?E.VerticalScale:0)*100);this.IG.a((E.HorizontalScale!=null?E.HorizontalScale:0)*100);
|
|
this.$P.a(E.BaselineShift!=null?E.BaselineShift:0);if(E.FillColor){var u=g8.Qc(E);this.fL.Ab(Math.round(u.i)<<16|Math.round(u.m)<<8|Math.round(u.P))}else this.fL.Ab(0);
|
|
var Y=e._Direction!=null?e._Direction:0,b=g8.KH(e);for(var f=0;f<this.pV.length;f++)this.pV[f].a(b==f);
|
|
this.OO.a(Y);this.sp.a(e.StartIndent!=null?e.StartIndent:0);this.sH.a(e.EndIndent!=null?e.EndIndent:0);
|
|
this.gA.a(e.FirstLineIndent!=null?e.FirstLineIndent:0);this.Jw.a(e.SpaceBefore!=null?e.SpaceBefore:0);
|
|
this.mX.a(e.SpaceAfter!=null?e.SpaceAfter:0)};dg.prototype.Ut=function(){var $=new x(H.E.Q,!0);$.data={e:H.V.uY,M9:gr.mp,IT:this.IT};
|
|
this.J($);var $=new x(H.E.N,!0);$.U=D.ko;$.data={e:"updateStyles"};this.J($)};dg.prototype.a45=function($){var o=this.IT.oH,T=$.target,s=!T.Ed();
|
|
if(T==this.wE)o.FauxBold=s;if(T==this.zE)o.FauxItalic=s;if(T==this.Ng)o.FontCaps=s?2:0;if(T==this.bp)o.FontCaps=s?1:0;
|
|
if(T==this.pO)o.FontBaseline=s?1:0;if(T==this.y6)o.FontBaseline=s?2:0;if(T==this.kQ)o.Underline=s;if(T==this.zN)o.Strikethrough=s;
|
|
this.Ut()};dg.prototype.Cy=function($){var o=this.IT.oH,T=this.IT.CL,s=$.target;if(s==this.Vg){var E=this.Vg.v();
|
|
o.Tracking=E}if(s==this.Dr){o.AutoLeading=!1;o.Leading=this.Dr.v()}if(s==this.Tq){o.AutoLeading=this.Tq.v()}if(s==this.ra)o.FontSize=s.v();
|
|
if(s==this.Un)o.VerticalScale=s.v()/100;if(s==this.IG)o.HorizontalScale=s.v()/100;if(s==this.$P)o.BaselineShift=s.v();
|
|
if(this.pV.indexOf(s)!=-1){T.Justification=g8.KH(T,this.pV.indexOf(s))}if(s==this.sp)T.StartIndent=s.v();
|
|
if(s==this.sH)T.EndIndent=s.v();if(s==this.gA)T.FirstLineIndent=s.v();if(s==this.Jw)T.SpaceBefore=s.v();
|
|
if(s==this.mX)T.SpaceAfter=s.v();if(s==this.OO)T._Direction=s.v();this.Ut()};dg.prototype.aci=function($){var o=this.IT,T=this.Z1.v(),s=-1;
|
|
for(var f=0;f<o.Nd.length;f++)if(o.Nd[f].Name==T)s=f;if(s==-1){s=o.Nd.length;var E=JSON.parse(JSON.stringify(o.Nd[0]));
|
|
E.Name=T;o.Nd.splice(s,0,E)}o.oH.Font=s;this.Ut()};dg.prototype.a3X=function($){var o=this.fL.Hf(),T={Type:1,Values:[1,(o>>16&255)/255,(o>>8&255)/255,(o>>0&255)/255]};
|
|
for(var f=0;f<4;f++)T.Values[f]=Math.round(T.Values[f]*1e3)/1e3;this.IT.oH.FillColor=T;this.Ut()};function f4(){aI.call(this);
|
|
this.k=H.z("span","fontinput");this.j4=null;this.Su=null;this.cN=null;this.H5="";this.Il={};this.XE=[];
|
|
this.ahP={};this.pT=!1;this.dN=H.z("button","fitem");this.dN.setAttribute("style","width:9em;");this.dN.textContent="Family Name \u25BC";
|
|
this.k.appendChild(this.dN);H.uE(this.dN,this.y9.bind(this));this.pC=new aI;this.pC.parent=this;this.pC.k=H.z("div","floatcont");
|
|
this.pC.k.addEventListener("keyup",this.a3N.bind(this),!1);this.GZ=new ba(6.8);this.pC.k.appendChild(this.GZ.a9P());
|
|
this.GZ.parent=this.pC;this.GZ.B(H.E.O,this.oG,this);var $=H.z("div","form");this.pC.k.appendChild($);
|
|
this.W3=new hE(H.oQ("tools/cshape",null,"autoscale"),!1,"Show Favorites Only");this.W3.B("click",this.acW,this);
|
|
$.appendChild(this.W3.k);this.Ym=new d_([12,86],null,9);this.Ym.B("input",this.Xh,this);$.appendChild(this.Ym.k);
|
|
var o=this.apc=new hE([[23,6],[22,6,0]],!1,"Load OTF / TTF file from your computer",!0);o.B("click",this.a8X,this);
|
|
o.k.style.marginLeft="1.5em";$.appendChild(o.k);this.hS=H.z("span","fitem imageset scrollable marged");
|
|
this.hS.style.height="30em";this.pC.k.appendChild(this.hS);this.wg=H.z("button","fitem");this.wg.setAttribute("style","width:7em;");
|
|
this.wg.textContent="SubFamily Name \u25BC";this.k.appendChild(this.wg);H.uE(this.wg,this.y9.bind(this));
|
|
this.zj=new aI;this.zj.parent=this;this.zj.k=H.z("div","floatcont");this.Gk=H.z("span","fitem imageset scrollable marged");
|
|
this.zj.k.appendChild(this.Gk)}f4.prototype=new aI;f4.prototype.a3N=function($){var o=0;if(dN.AL($.code,dN.du))o=-1;
|
|
if(dN.AL($.code,dN.ZQ))o=1;if(o!=0){var T=this.XE,s=T.length,E=this.j4.ts()[this.cN];if(E==null&&s==0)return;
|
|
var e=T.indexOf(E[0]);if(e==-1)return;e=(e+o+s)%s;this.kA(T[e],null)}};f4.prototype.a8X=function(){var $=new x(H.E.Q,!0);
|
|
$.data={e:H.V.b_,a71:".otf,.ttf,.ttc"};this.J($)};f4.prototype.f=function(){this.GZ.f();this.apc.f();
|
|
this.W3.yl(H.oQ("tools/cshape",null,"autoscale"))};f4.prototype.acW=function($){this.W3.a(!this.W3.Ed());
|
|
this.oG()};f4.prototype.Xh=function($){this.H5=this.Ym.v().toLowerCase();this.oG()};f4.prototype.y9=function($){H.zl($);
|
|
var o=$.currentTarget,T=o.getBoundingClientRect(),s=o==this.dN,E=s?this.pC:this.zj;if(H.ni(E.k)){this.CI(E);
|
|
return}if(!s&&this.j4.ts()[this.cN]==null)return;var e=new x(H.E.Q,!0);e.data={e:H.V.NM,bF:E,x:T.left,y:T.top+T.height};
|
|
this.J(e);if(s){this.oG();this.Ym.K9()}};f4.prototype.ai$=function($){var o=$.currentTarget.firstChild.nextSibling.textContent;
|
|
if($.target.tagName.toLowerCase()=="button"){var T=this.Su.slice(0),s=T.indexOf(o);if(s==-1){T=T.slice(Math.max(0,T.length-29));
|
|
T.push(o)}else T.splice(s,1);var E=new x(H.E.Q,!0);E.data={e:H.V.uY,M9:gr.bV,mI:T};this.J(E);this.pT=!0;
|
|
this.oG()}else{this.kA(o,null);this.Ym.K9()}};f4.prototype.a2I=function($){this.kA(null,$.currentTarget.firstChild.textContent)};
|
|
f4.prototype.kA=function($,o){var T=$==null?this.zj:this.pC,s=this.j4;if($==null)$=s.ts()[this.cN][0];
|
|
else{var E=s.lI($),e=s.ts()[this.cN];o=hx.mM(E,e?e[1]:"regular")}var n=s.a8($,o)[2];this.a(n,s);this.J(new x(H.E.O,!1));
|
|
this.CI(T);this.oG()};f4.prototype.CI=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.mG,bF:$};this.J(o)};
|
|
f4.prototype.v=function(){return this.cN};f4.prototype.a=function($,o,T){var s=this.j4;if($!=null)this.cN=$;
|
|
else $=this.cN;this.j4=o;this.Su=T;if($!=null){var E=o.ts()[$],e,n;if(E==null){e="- "+$;n="-------"}else{e=E[0];
|
|
n=E[1];var A=o.lI(e);A.sort(hx.ar2);var u=A.indexOf(n),Y=this.a2I.bind(this);this.Gk.textContent="";
|
|
for(var f=0;f<A.length;f++){var E=o.a8(e,A[f]);if(!this.GZ.Pb(E))continue;var b=this.agh(E,E[1],Y,!1);
|
|
this.Gk.appendChild(b)}}this.dN.textContent=e.substring(0,15)+" \u25BC";this.dN.setAttribute("title",e+", \""+$+"\"");
|
|
this.wg.textContent=n.substring(0,10)+" \u25BC";this.wg.setAttribute("title",n)}};f4.prototype.oG=function(){var $=this.j4.ts()[this.cN],o=this.Su,T=null,s=this.j4.ajX(),E=this.ai$.bind(this);
|
|
this.XE=[];for(var e in s){var n=hx.mM(s[e],"regular"),A=this.j4.a8(e,n),u=o.indexOf(e)!=-1,Y=!0;if(this.H5.length>0&&A[0].toLowerCase().indexOf(this.H5)==-1)Y=!1;
|
|
else if(!this.GZ.Pb(A))Y=!1;else if(this.W3.Ed()&&!u)Y=!1;var b=this.Il[e];if(b==null){var b=this.agh(A,e,E,!0);
|
|
this.Il[e]=b;this.hS.appendChild(b)}if(Y)this.XE.push(e);var a=Y?"":"display:none; ",w="opacity: "+(u?"1":"0.2");
|
|
if($&&$[0]==e){a+="background-color:rgba(0,0,0,0.13);";T=b}if(this.ahP[e]!=a+w){b.setAttribute("style",a);
|
|
b.firstChild.setAttribute("style",w);this.ahP[e]=a+w}}if(T&&!this.pT)this.hS.scrollTop=T.offsetTop-210;
|
|
this.pT=!1};f4.prototype.agh=function($,o,T,s){var E=H.z("div","fontitem"),u="";E.addEventListener("click",T,!1);
|
|
if(s)E.appendChild(H.z("button","star"));var e=H.z("span","label");e.setAttribute("title",o);e.textContent=o;
|
|
E.appendChild(e);var n=H.K(),A=1/n,Y=hx.kC*A,b=hx.q0*A;if(1<n&&n<1.5)u="width:"+Y+"px; height:"+b+"px;";
|
|
var a=H.z("span","thumb gsicon");if($.a5z){u+="background: url("+$.a5z+");";if(1<n&&n<1.5)u+="background-size: "+Y+"px "+b+"px;"}else{var w=Math.ceil(FNTS.list.length/hx.cols),X=Math.floor($.II/w),N=$.II%w,z=X*hx.kC,i=N*hx.q0;
|
|
if(1<n&&n<1.5){u+="background-size: "+hx.cols*Y+"px "+w*b+"px;";z*=A;i*=A}u+="background-position:-"+z+"px -"+i+"px;"}a.setAttribute("style",u);
|
|
E.appendChild(a);return E};function ba($){aI.call(this);this.k=H.z("button","fitem bbtn");this.k.addEventListener("click",this.a1f.bind(this),!1);
|
|
this.gz=new aI;this.gz.k=H.z("div","floatcont");this.gz.parent=this;this.yD=H.z("div","flexrow");this.gz.k.appendChild(this.yD);
|
|
this.St=[];this.n3=[];var o=this.yD,T=H.z("div",""),s=H.z("div","");o.appendChild(T);o.appendChild(s);
|
|
this.WK=[];for(var f=0;f<FNTS.cats.length;f++)this.WK.push({name:FNTS.cats[f],index:f,_T:0});this.qv=new ad([7,0]);
|
|
this.qv.B(H.E.O,this.a7U,this);T.appendChild(this.qv.k);this.PB=H.z("div","vlist marged scrollable");
|
|
this.PB.setAttribute("style","width:10.85em; height:"+$+"em; ");T.appendChild(this.PB);this.md=[];for(var f=0;
|
|
f<this.WK.length;f++){var E=this.WK[f],e=new ad(E.name);this.md.push(e);e.B(H.E.O,this.a66,this);e.a(!0);
|
|
this.PB.appendChild(e.k);this.St.push(1)}this.a4M=new ad([7,0]);this.a4M.B(H.E.O,this.a5r,this);this.p1=H.z("div","vlist marged scrollable");
|
|
this.p1.setAttribute("style","width:8.6em; height:"+($+1.5)+"em; ");s.appendChild(this.p1);this.sh=[];
|
|
for(var f=0;f<FNTS.subsetNames.length;f++){var e=new ad(FNTS.subsetNames[f]);this.sh.push(e);e.B(H.E.O,this.a9E,this);
|
|
e.a(!1);this.p1.appendChild(e.k);this.n3.push(0)}}ba.prototype=new aI;ba.prototype.a9c=function($){var o=this.sh;
|
|
for(var f=0;f<o.length;f++){var T=($>>>f&1)==1;this.n3[f]=T;o[f].a(T)}};ba.prototype.a9P=function(){return this.yD};
|
|
ba.prototype.f=function(){this.k.textContent=aX.get([25,1,0])+" \u25BC";this.qv.f();this.a4M.f()};ba.prototype.a1f=function($){var o=this.k.getBoundingClientRect(),T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.NM,bF:this.gz,x:o.left,y:o.top+o.height,cs:!1};this.J(T)};ba.prototype.Pb=function($){if(this.St[$[4]]==0)return!1;
|
|
else for(var o=0;o<this.n3.length;o++)if(this.n3[o]==1&&($[3]>>>o&1)==0)return!1;return!0};ba.prototype.a7U=function($){var o=$.target.v(),T=this.md,s=this.St;
|
|
for(var f=0;f<T.length;f++){T[f].a(o);s[f]=o?1:0}this.J(new x(H.E.O,!1))};ba.prototype.a5r=function($){var o=$.target.v(),T=this.sh,s=this.n3;
|
|
for(var f=0;f<T.length;f++){T[f].a(o);s[f]=o?1:0}this.J(new x(H.E.O,!1))};ba.prototype.a66=function($){var f=this.md.indexOf($.target),o=this.WK[f].index;
|
|
this.St[o]=1-this.St[o];this.J(new x(H.E.O,!1))};ba.prototype.a9E=function($){var f=this.sh.indexOf($.target);
|
|
this.n3[f]=1-this.n3[f];this.J(new x(H.E.O,!1))};function dU($,o,T){gh.call(this,o,!0,"gradientbutton",18,10,gr.HZ);
|
|
this.z4=-1;this.GR=-1;this.a7q=null;this.a0a=$;this.Rl=T}dU.prototype=new gh;dU.prototype.aC=function($){var o=this.lV;
|
|
this.a(o[this.aI.v()]);this.J(new x(H.E.O))};dU.prototype.M0=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.NC,a_:"gradienteditor",h:this.hQ,Ba:this.alX.bind(this),dx:this.Rl};
|
|
this.J(o)};dU.prototype.alX=function($){this.a($);this.J(new x(H.E.O))};dU.prototype.MU=function(){if(!this.te)return;
|
|
var $=Math.floor(36*H.K()),o=Math.floor(36*H.K()),T=[],s=[],E=this.lV;for(var f=0;f<E.length;f++){var e=E[f];
|
|
s.push(e.Nm?e.Nm.v.split("=").pop():"");var n=D.eH.Ey(e,$,o,Math.PI/4,this.z4,this.GR);T.push(n)}this.aI.rS(T,s,$,o);
|
|
this.te=!1};dU.prototype.zL=function($,o){this.a49(this.hQ,$,o)};dU.prototype.a=function($){this.a49($,this.z4,this.GR)};
|
|
dU.prototype.a49=function($,o,T){this.z4=o;this.GR=T;if($==null)return;var s=JSON.stringify($),E=s+o+","+T;
|
|
if(E==this.a7q)return;this.a7q=E;this.hQ=JSON.parse(s);var e=Math.floor(80*H.K()),n=Math.floor(16*H.K()),A=D.eH.Ey(this.hQ,e,n,0,this.z4,this.GR);
|
|
this.WP.setAttribute("src",A);H.kg(this.WP,e,n)};dU.prototype.v=function(){var $;if(this.a0a)$=D.eH.agL(this.hQ,this.z4,this.GR);
|
|
else $=JSON.parse(JSON.stringify(this.hQ));return $};function b_($){gh.call(this,$,!1,"swatchbutton",16,8.75,gr.qu)}b_.prototype=new gh;
|
|
b_.prototype.aC=function($){this.a(this.lV[$.target.v()]);this.J(new x(H.E.O))};b_.prototype.MU=function(){if(!this.te)return;
|
|
var $=Date.now(),o=Math.floor(10*H.K()),T=Math.floor(10*H.K()),s=[],E=[],e=this.lV;for(var f=0;f<e.length;
|
|
f++){E.push(e[f].W7?e[f].W7.split("=").pop():"");s.push(b_.Ey(e[f],o,T))}this.aI.rS(s,E,o,T);this.te=!1};
|
|
b_.prototype.a=function($){this.hQ=JSON.parse(JSON.stringify($));this.rE()};b_.prototype.rE=function(){var $=Math.floor(24*H.K()),o=Math.floor(20*H.K()),T=b_.Ey(this.hQ,$,o);
|
|
this.WP.setAttribute("src",T);H.kg(this.WP,$,o)};b_.prototype.v=function(){return JSON.parse(JSON.stringify(this.hQ))};
|
|
b_.pp={};b_.Ey=function($,o,T){var s=b_.V8,E=b_.pp,e=L.B$($.i<<16|$.m<<8|$.P);if(E[e])return E[e];if(s==null){var n=H.z("canvas");
|
|
s=b_.V8=n.getContext("2d")}var n=s.canvas;n.width=o;n.height=T;s.fillStyle="#"+e;s.fillRect(0,0,o,T);
|
|
var A=E[e]=n.toDataURL();return A};function ad($,o,T){aI.call(this);this.k=H.z("span","fitem cbox");
|
|
if(o==null)o=!0;if(T==null)T="flabel";var s="cb"+H.Zs();this.bz=H.z("input","");this.bz.setAttribute("type","checkbox");
|
|
this.bz.setAttribute("id",s);this.k.appendChild(this.bz);this.Oj=$;this.pq=H.z("label",T);if(o)this.pq.setAttribute("for",s);
|
|
this.k.appendChild(this.pq);this.f();this.bz.addEventListener("change",this.CR.bind(this),!1)}ad.prototype=new aI;
|
|
ad.prototype.apK=function(){return this.Oj};ad.prototype.yl=function($){this.pq.textContent=$};ad.prototype.f=function(){var $=this.Oj;
|
|
if(typeof $=="string"&&$.startsWith("<"))this.pq.innerHTML=$;else this.pq.textContent=aX.get($)};ad.prototype.UM=function(){this.bz.checked=!0};
|
|
ad.prototype.Xc=function(){this.bz.checked=!1};ad.prototype.Ed=function(){return this.bz.checked};ad.prototype.a=function($){this.bz.checked=$};
|
|
ad.prototype.v=ad.prototype.Ed;ad.prototype.CR=function($){this.J(new x(H.E.O,!1))};function fU($,o,T,s){aI.call(this);
|
|
this.k=H.z("span","fitem mbox");this.a0_=T;if($){this.Oj=$;this.pq=H.z("label","flabel");this.k.appendChild(this.pq)}this.lE=o;
|
|
this.MC=[];for(var f=0;f<o.length;f++){var E=T?new hE(o[f],!1,s?s[f]:null):new ad(o[f],!0,"");E.B(T?"click":H.E.O,this.CR,this);
|
|
this.MC.push(E);this.k.appendChild(E.k)}this.f()}fU.prototype=new aI;fU.prototype.a=function($){for(var o=0;
|
|
o<this.lE.length;o++)this.MC[o].a($[o])};fU.prototype.v=function(){var $=[];for(var o=0;o<this.lE.length;
|
|
o++)$[o]=this.MC[o].v();return $};fU.prototype.f=function(){if(this.Oj)this.pq.innerHTML=aX.get(this.Oj)+": ";
|
|
for(var $=0;$<this.MC.length;$++)this.MC[$].f()};fU.prototype.CR=function($){var f=this.MC.indexOf($.currentTarget);
|
|
if(this.a0_)this.MC[f].a(!this.MC[f].v());this.J(new x(H.E.O,!1))};function a4($,o,T,s,E,e){eK.call(this,$,o,T,s,E,!1,e);
|
|
this.k.appendChild(this.pq);var n=H.z("span","rangecont");this.k.appendChild(n);n.appendChild(this.nC);
|
|
this.k.appendChild(this.bz);this.bz.setAttribute("style","width:3.3em");if(this.vs)this.k.appendChild(this.Ow)}a4.prototype=new eK;
|
|
function bc($,o,T,s){if($==null)$=!1;if(o==null)o=!1;if(T==null)T=!1;aI.call(this);this.Aj=new aY;this.oi=new aY;
|
|
this.hM=72;this.CB=72;this.Ls=!0;this.k=H.z("span","");this.ST=new ac([12,41],0,0,null,0,!1,!0);this.k.appendChild(this.ST.k);
|
|
this.ST.B(H.E.O,this.Qr,this);var E=["px","%"];if($)E=E.concat(["mm","in"]);this.j8=new h_(null,E);this.k.appendChild(this.j8.k);
|
|
H.ze(this.k);this.j8.B(H.E.O,this.Qr,this);this.PX=new ac([12,42],0,0,null,0,!1,!0);this.k.appendChild(this.PX.k);
|
|
this.PX.B(H.E.O,this.Qr,this);var e=new hE("\u21F5",!1,null,!0);e.B("click",this.ap0,this);this.EH=new hE("<img src=\""+PIMG["lrs/chain"]+"\" class=\"autoscale gsicon\" />",!1,[12,51]);
|
|
this.EH.B("click",this.Qr,this);this.ae7=new eB("");if(o){this.k.appendChild(this.EH.k);this.k.appendChild(this.ae7.k);
|
|
this.EH.UM()}else this.k.appendChild(e.k);this.gF=new ac("DPI",0,0,null,3,!1,!0,4);if($&&s==null){H.ze(this.k);
|
|
this.k.appendChild(this.gF.k)}this.gF.B(H.E.O,this.Qr,this);this.fq=new ad([12,23,1]);this.fq.B(H.E.O,this.Qr,this);
|
|
if(T){H.ze(this.k);this.k.appendChild(this.fq.k)}H.ze(this.k)}bc.prototype=new aI;bc.prototype.a0b=function(){this.Ls=!1;
|
|
if(this.j8.v()==0){this.j8.a(3);this.FD()}};bc.prototype.agS=function(){this.Ls=!0};bc.prototype.a1t=function($){this.EH.a($)};
|
|
bc.prototype.f=function(){this.ST.f();this.PX.f();this.gF.f();this.EH.f();this.fq.f()};bc.prototype.ap0=function($){var o=this.oi.x;
|
|
this.oi.x=this.oi.y;this.oi.y=o;this.FD();this.J(new x(H.E.O,!1))};bc.prototype.Qr=function($){if($.target==this.j8&&!this.Ls&&this.j8.v()==0)this.j8.a(3);
|
|
if($.target==this.j8||$.target==this.fq){this.FD();return}if($.target==this.EH)$.target.a(!$.target.v());
|
|
var o=this.Aj,T=parseFloat(this.ST.v());if(isNaN(T))T=1;var s=parseFloat(this.PX.v());if(isNaN(s))s=1;
|
|
var E=this.j8.v();if(this.Ls){var e=this.CB;if(E==1){T=this.Aj.x*(T/100);s=this.Aj.y*(s/100)}var n=[1,1,25.4/e,1/e][E];
|
|
T/=n;s/=n;if(this.fq.v()){T+=this.Aj.x;s+=this.Aj.y}if($.target==this.gF){var A=this.gF.v();if(!0){var u=A/e;
|
|
T*=u;s*=u}e=A}if(this.EH.v()){if($.target==this.ST)s=T*(o.y/o.x);else T=s*(o.x/o.y)}T=Math.max(Math.abs(T),1);
|
|
s=Math.max(Math.abs(s),1)}else{var e=this.hM;if($.target==this.gF)e=this.gF.v();else{if(this.EH.v()){if($.target==this.ST)s=T*(o.y/o.x);
|
|
else T=s*(o.x/o.y)}var n=[1,1,25.4/e,1/e][E],Y=T/(E==1?100:o.x*n);e=e/Y}T=o.x;s=o.y}this.oi=new aY(Math.round(T),Math.round(s));
|
|
this.CB=e;this.FD();this.J(new x(H.E.O,!1))};bc.prototype.a2d=function(f){this.j8.a(f);this.FD()};bc.prototype.a=function($,o,T){if(T!=!0)this.Aj=$.clone();
|
|
this.oi=$.clone();if(o!=null){this.hM=o;this.CB=o}this.FD()};bc.prototype.FD=function(){var $=this.oi.x,o=this.oi.y,T=this.CB,s=($/o).toFixed(3);
|
|
while(s.charAt(s.length-1)=="0")s=s.substring(0,s.length-1);if(s.charAt(s.length-1)==".")s=s.substring(0,s.length-1);
|
|
var E=" "+s+" : 1",e=function(b,a){while(a!=0){var w=a;a=b%a;b=w}return b},n=e($,o);if(Math.min($,o)/n<10)E=" "+Math.round($/n)+" : "+Math.round(o/n);
|
|
this.ae7.a(E);if(this.fq.v()){$-=this.Aj.x;o-=this.Aj.y}var A=this.j8.v();if(A==1){if(this.Ls){$=100*$/this.Aj.x;
|
|
o=100*o/this.Aj.y}else{$=o=100*this.hM/this.CB}}else{$=Math.round($);o=Math.round(o)}var u=[1,1,25.4/T,1/T][A];
|
|
$*=u;o*=u;var Y=A==1||A==3?2:0;this.ST.UU(Y);this.PX.UU(Y);this.ST.a($);this.PX.a(o);this.gF.a(T)};bc.prototype.v=function(){return this.oi.clone()};
|
|
bc.prototype.Lf=function(){return this.CB};function b7($,o){aI.call(this);var T=$==0?["W","H","X","Y"]:["\u250F","\u2513","\u2517","\u251B"];
|
|
this.pY=$;this.alU=o;this._C=1;this.x8=[1,1,0];var s=this.k=H.z("div","numlist"),E=this.Pl=[];for(var f=0;
|
|
f<4;f++){var e=new ac(T[f],0,0,null,2,!1,!0,4);e.B(H.E.O,this.Qr,this);s.appendChild(e.k);E[f]=e;if(f==1||f==3)H.ze(s)}E[4]=new ad($==0?[12,51]:[12,91,2]);
|
|
E[4].a(!0);s.appendChild(E[4].k)}b7.prototype=new aI;b7.prototype.f=function(){var $=this.Pl;for(var f=0;
|
|
f<5;f++)$[f].f();if(this.pY==0)H.Ec($[0],$[1])};b7.prototype.a=function($,o){if(o)this.x8=o;o=this.x8;
|
|
this._C=$[0]/$[1];for(var f=0;f<4;f++){var T=this.Pl[f];T.UU(o[2]==0&&this.alU?0:2);T.a(L.BG.adT($[f],o[0],o[1],o[2]))}};
|
|
b7.prototype.v=function(){var $=[],o=this.x8;for(var f=0;f<4;f++){var T=L.BG.V9(this.Pl[f].v(),o[0],o[1],o[2]);
|
|
$[f]=this.alU?Math.round(T):T}return $};b7.prototype.Qr=function($){var o=this.pY,T=this.Pl.indexOf($.currentTarget),s=this.v(),E=this.Pl[4].v();
|
|
if(o==0){s[0]=Math.max(1,s[0]);s[1]=Math.max(1,s[1]);if(E&&T==0)s[1]=s[0]/this._C;if(E&&T==1)s[0]=s[1]*this._C}if(o==1){s[T]=Math.max(0,s[T]);
|
|
if(E)for(var f=0;f<4;f++)s[f]=s[T]}this.a(s);this.J(new x(H.E.O,!1))};function dy(){aI.call(this);this.lt=0;
|
|
this.QG=[0,0,1,1,100,100];this.k=H.z("span","fitem");this.qW=new h_(null,[[12,89,0],[12,89,1],[12,89,2]]);
|
|
this.k.appendChild(this.qW.k);this.qW.B(H.E.O,this.Qr,this);this.ST=new ac("W",0,0,null,0,!1,!0);this.k.appendChild(this.ST.k);
|
|
this.ST.B(H.E.O,this.Qr,this);this.PX=new ac("H",0,0,null,0,!1,!0);this.k.appendChild(this.PX.k);this.PX.B(H.E.O,this.Qr,this);
|
|
this.a({KR:0,x:0,y:0})}dy.prototype=new aI;dy.prototype.f=function(){H.Ec(this.ST,this.PX);this.qW.f()};
|
|
dy.prototype.Qr=function($){if($.target==this.qW){var o=this.v(),T=this.QG;T[this.lt*2]=o.x;T[this.lt*2+1]=o.y;
|
|
this.lt=o.KR;this.a({KR:o.KR,x:T[o.KR*2],y:T[o.KR*2+1]})}if(this.ST.v()<1)this.ST.a(1);if(this.PX.v()<1)this.PX.a(1);
|
|
this.J(new x(H.E.O,!1))};dy.prototype.a=function($){this.qW.a($.KR);this.ST.a($.x);this.PX.a($.y);if($.KR==0){this.ST.v9();
|
|
this.PX.v9()}else{this.ST.wI();this.PX.wI()}};dy.prototype.v=function(){return{KR:this.qW.v(),x:this.ST.v(),y:this.PX.v()}};
|
|
function eB($,o){aI.call(this);this.Oj=$;this.k=H.z("span","labelitem fitem"+(o?" spread":""));this.f()}eB.prototype=new aI;
|
|
eB.prototype.a=function($){this.k.textContent=$};eB.prototype.v=function(){return this.k.textContent};
|
|
eB.prototype.wI=function(){this.k.removeAttribute("disabled")};eB.prototype.v9=function(){this.k.setAttribute("disabled","")};
|
|
eB.prototype.yl=function($){this.k.textContent=$};eB.prototype.f=function(){this.k.textContent=aX.get(this.Oj)};
|
|
eB.prototype.apK=function(){return this.Oj};function c4($){aI.call(this);this.k=H.z("span","");this.aiV=$;
|
|
this.zd=new a4("Off X",-100,100,$?"%":"px",0,!1);this.MH=new a4("Off Y",-100,100,$?"%":"px",0,!1);this.zd.B(H.E.O,this.Qr,this);
|
|
this.MH.B(H.E.O,this.Qr,this);this.k.appendChild(this.zd.k);this.k.appendChild(this.MH.k)}c4.prototype=new aI;
|
|
c4.prototype.f=function(){this.zd.f();this.MH.f()};c4.prototype.Qr=function($){this.J(new x(H.E.O,!1))};
|
|
c4.prototype.alr=function($){this.zd.a($.x);this.MH.a($.y)};c4.prototype.ajW=function(){return new aY(this.zd.v(),this.MH.v())};
|
|
c4.prototype.a=function($,o){var T=$.Hrzn.v,s=$.Vrtc.v;if(this.aiV){T=T.val;s=s.val}this.zd.a(T);this.MH.a(s);
|
|
if(o)this.Qr()};c4.prototype.v=function(){var $=this.zd.v(),o=this.MH.v();if(this.aiV)return{classID:"Pnt",Hrzn:{t:"UntF",v:{type:"#Prc",val:$}},Vrtc:{t:"UntF",v:{type:"#Prc",val:o}}};
|
|
else return{classID:"Pnt",Hrzn:{v:$,t:"doub"},Vrtc:{v:o,t:"doub"}}};function ac($,o,T,s,E,e,n,A,u){eK.call(this,$,o,T,s,E,!0,e,u);
|
|
H.v2(this.k,"rangedropinput");this.k.appendChild(this.pq);this.bz.setAttribute("style","width:"+(A?A:3.3)+"em");
|
|
this.k.appendChild(this.bz);this.agl=H.z("span","rangecont");this.agl.appendChild(this.nC);this.oO=H.z("button");
|
|
this.oO.innerHTML="\u25BC";H.uE(this.oO,this.a9x.bind(this));if(n!=!0)this.k.appendChild(this.oO);this.eV=new aI;
|
|
this.eV.k=this.agl}ac.prototype=new eK;ac.prototype.a9x=function($){if(H.ni(this.eV.k))return;$.stopPropagation();
|
|
var o=this.k.getBoundingClientRect();this.nC.setAttribute("style","width:"+o.width+"px;");var T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.NM,bF:this.eV,x:o.left,y:o.top+o.height};this.J(T)};function eO(){aI.call(this);this.k=H.z("span","fitem strokebutton");
|
|
this.PY=[[null,null,null,""],[null,0,null,"4 2"],[1,1,null,"0 2"]];this.Jk=JSON.parse(JSON.stringify(ev.ci.default));
|
|
this.br=H.z("button");this.k.appendChild(this.br);this.br.addEventListener("click",this.UY.bind(this),!1);
|
|
var $=H.z("canvas","gsicon");this.V8=$.getContext("2d");this.br.appendChild($);var o=H.z("span");o.textContent=" \u25BC";
|
|
this.br.appendChild(o);this.gz=new aI;this.gz.parent=this;this.gz.k=H.z("div","floatcont form");var T=this.gz.k;
|
|
T.setAttribute("style","width: 14em;");this.Il=[new h_([12,40],[[19,5,2],[19,5,1],[19,5,0]]),new eI([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 eI([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 d_([19,9,2])];
|
|
for(var f=0;f<this.Il.length;f++){var s=this.Il[f];T.appendChild(s.k);var E=f<4?H.E.O:"click";s.B(E,this.Qr,this)}H.ze(T);
|
|
this.PE=[];var e=this.aho.bind(this);for(var f=0;f<this.PY.length;f++){var n=H.z("button","fitem");this.PE.push(n);
|
|
T.appendChild(n);n.addEventListener("click",e,!1);var $=H.z("canvas","gsicon"),A=$.getContext("2d");
|
|
n.appendChild($);this.aiM(A,40,20,this.PY[f])}}eO.prototype=new aI;eO.prototype.UY=function($){var o=this.br.getBoundingClientRect(),T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.NM,bF:this.gz,x:o.left,y:o.top+o.height+4};this.J(T)};eO.prototype.Qr=function($){var o=this.Il,T=o.indexOf($.target),s=[];
|
|
for(var f=0;f<4;f++)s.push(o[f].v());this.Jk=this.ahE(s);this.J(new x(H.E.O,!1))};eO.prototype.aho=function($){var o=this.PE.indexOf($.currentTarget);
|
|
this.a(this.ahE(this.PY[o]));this.J(new x(H.E.O,!1))};eO.prototype.ahE=function($){var o=JSON.parse(JSON.stringify(this.Jk)),T=$[0],s=$[1],E=$[2],e=$[3];
|
|
if(T!=null)o.strokeStyleLineAlignment.v.strokeStyleLineAlignment=ev.ci.k0[T];if(s!=null)o.strokeStyleLineCapType.v.strokeStyleLineCapType=ev.ci.JZ[s];
|
|
if(E!=null)o.strokeStyleLineJoinType.v.strokeStyleLineJoinType=ev.ci.join[E];var n=o.strokeStyleLineDashSet.v=[];
|
|
e=e.split(" ");while((e.length&1)!=0)e.pop();for(var f=0;f<e.length;f++)n.push({t:"UntF",v:{type:"#Nne",val:parseInt(e[f])}});
|
|
return o};eO.prototype.f=function(){for(var f=0;f<this.Il.length;f++)this.Il[f].f()};eO.prototype.a=function($){this.Jk=JSON.parse(JSON.stringify($));
|
|
var o=ev.ci.k0.indexOf($.strokeStyleLineAlignment.v.strokeStyleLineAlignment),T=ev.ci.JZ.indexOf($.strokeStyleLineCapType.v.strokeStyleLineCapType),s=ev.ci.join.indexOf($.strokeStyleLineJoinType.v.strokeStyleLineJoinType),E=[],e=$.strokeStyleLineDashSet.v;
|
|
for(var n=0;n<e.length;n++)E.push(e[n].v.val);var A=this.Il;A[0].a(o);A[1].a(T);A[2].a(s);A[3].a(E.join(" "));
|
|
var u=[];for(var f=0;f<4;f++)u.push(A[f].v());this.aiM(this.V8,40,16,u)};eO.prototype.v=function(){return JSON.parse(JSON.stringify(this.Jk))};
|
|
eO.prototype.aiM=function($,o,T,s){var E=s[0],e=s[1],n=s[2],A=s[3].split(" ").map(parseFloat);H.QE($.canvas,o,T);
|
|
var u=Math.min(5,this.Jk.strokeStyleLineWidth.v.val);for(var f=0;f<A.length;f++)A[f]*=u;$.clearRect(0,0,o,T);
|
|
$.setLineDash(A);$.lineCap=["butt","round","square"][e];$.lineJoin=["miter","round","bevel"][n];$.lineWidth=u;
|
|
$.beginPath();$.moveTo(0,T/2);$.lineTo(o*2,T/2);$.stroke()};function eF($){gh.call(this,$,!1,"contourbutton",34,16,gr.ww);
|
|
this.Ym=new d_([12,86],null,16);this.Ym.B("input",this.Xh,this);this.gz.k.appendChild(this.Ym.k);this.Kt=null;
|
|
this.H5="";this.BY=null;this.a(aS.o_())}eF.prototype=new gh;eF.prototype.f=function(){gh.prototype.f.call(this);
|
|
this.Ym.f()};eF.prototype.aC=function($){this.a(this.Kt[$.target.v()]);this.J(new x(H.E.O))};eF.prototype.Xh=function($){this.H5=this.Ym.v().toLowerCase();
|
|
this.agz()};eF.Hg=!1;eF.prototype.MU=function(){if(!this.te)return;var $=this.lV;if($==null||!eF.Hg){var o=new x(H.E.Q,!0);
|
|
o.data={e:H.V.ZP,M9:{url:"rsrc/basic/fa_basic.csh"}};this.J(o);eF.Hg=!0}else{var T=Math.floor(38*H.K()),s=Math.floor(38*H.K());
|
|
this.BY=[];for(var f=0;f<$.length;f++)this.BY.push(eF.a0W($[f],T,s));this.agz();this.te=!1}};eF.prototype.agz=function(){var $=Math.floor(38*H.K()),o=Math.floor(38*H.K());
|
|
this.Kt=[];var T=[],s=[],E=this.lV;for(var f=0;f<E.length;f++){if(E[f].Eq.toLowerCase().indexOf(this.H5)==-1)continue;
|
|
this.Kt.push(E[f]);T.push(this.BY[f]);s.push(E[f].Eq)}this.aI.rS(T,s,$,o)};eF.prototype.a=function($){this.hQ=eF.clone($);
|
|
this.rE()};eF.prototype.rE=function(){var $=Math.floor(23*H.K()),o=Math.floor(23*H.K()),T=eF.a0W(this.hQ,$,o);
|
|
this.WP.setAttribute("src",T);H.kg(this.WP,$,o)};eF.prototype.v=function(){return eF.clone(this.hQ)};
|
|
eF.clone=function($){return{Eq:$.Eq,xz:$.xz,g:M.PZ.IN($.g),UK:$.UK.clone()}};eF.S=null;eF.uK=null;eF.a0W=function($,o,T){var s=M.PZ.IN($.g),E=$.UK,e=Math.min(o/E.d,T/E.w)*.9,n=new fY;
|
|
n.translate(-.5,-.5);n.scale(.95,.95);n.translate(.5,.5);n.scale(e*E.d,e*E.w);L.A.hR(s,n);var A=new M.PZ;
|
|
A.g=s;var u=A.yy();u.rect.x=Math.floor((o-u.rect.d)/2);u.rect.y=Math.floor((T-u.rect.w)/2);var Y=L.G(u.rect.Y()*4);
|
|
L.wr(Y,4278190080);L.lY(u.channel);L.aM(u.channel,Y,0);L.aM(u.channel,Y,1);L.aM(u.channel,Y,2);var b=eF;
|
|
if(b.S==null)b.S=H.z("canvas");var a=b.S,w=a.getContext("2d");if(a.width!=o||a.height!=T||b.uK==null){a.width=o;
|
|
a.height=T;b.uK=w.createImageData(o,T)}var X=b.uK;L.wr(X.data,4294967295);L.h9(Y,u.rect,X.data,new df(0,0,o,T));
|
|
w.putImageData(X,0,0);return a.toDataURL()};function fm($){gh.call(this,$,!1,"ICCButton",16,12,gr.u9,!0);
|
|
this.aI.iI(1)}fm.prototype=new gh;fm.prototype.gD=function(){var $="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 f=0;f<$.length;f++)$[f]="luts/"+$[f]+".CUBE";return $};fm.prototype.aC=function($){this.a(this.lV[$.target.v()]);
|
|
this.J(new x(H.E.O))};fm.prototype.MU=function(){if(!this.te)return;var $=Math.floor(1*H.K()),o=Math.floor(1*H.K()),T=[],s=[],E=this.lV;
|
|
for(var f=0;f<E.length;f++){var e=E[f].Nm.v.split("\\").pop().split("/").pop();s.push(e);T.push(fm.Ey(E[f],$,o))}this.aI.rS(T,s,$,o);
|
|
this.te=!1};fm.prototype.a=function($){this.hQ=JSON.parse(JSON.stringify($));this.rE()};fm.Ey=function($,o,T){var s=H.z("canvas"),n="ICC / 3DL / look / cube";
|
|
s.width=o;s.height=T;var E=s.getContext("2d"),e=Math.floor(14*H.K());E.font=e+"px sans-serif";if($.Nm)n=$.Nm.v.split("\\").pop().split("/").pop();
|
|
E.fillText(n,10,e);return s.toDataURL()};fm.prototype.rE=function(){var $=Math.floor(120*H.K()),o=Math.floor(20*H.K());
|
|
this.WP.setAttribute("src",fm.Ey(this.hQ,$,o));H.kg(this.WP,$,o)};fm.prototype.v=function(){return JSON.parse(JSON.stringify(this.hQ))};
|
|
function bB(){aI.call(this);this.Sy=null;this.k=H.z("span","fitem");this.fj=new eu([14,9]);this.A9=new ac(null,0,150,"pt",1,!0,null,null,[19,2,5]);
|
|
this.am=new eO;this.G3=[this.fj,this.A9,this.am];for(var f=0;f<this.G3.length;f++){var $=this.G3[f];
|
|
this.k.appendChild($.k);$.parent=this;$.B(H.E.O,this.Qr,this)}}bB.prototype=new aI;bB.prototype.f=function(){for(var f=0;
|
|
f<this.G3.length;f++)this.G3[f].f()};bB.prototype.YE=function($,o){this.fj.YE($,o)};bB.prototype.Qr=function($){var o=this.Sy,T=this.fj.v(),s=T.Ul;
|
|
o.strokeEnabled.v=s!=0;if(s!=0){o.strokeStyleContent.v=T.n$;T.n$.classID=ev.ci.RG[s-1]}o.strokeStyleLineWidth.v.val=this.A9.v();
|
|
if($.target==this.am)o=this.am.v();this.Sy=o;this.J(new x(H.E.O,!1))};bB.prototype.a=function($,o,T){this.Sy=JSON.parse(JSON.stringify(o));
|
|
var s=o.strokeEnabled.v,E=o.strokeStyleContent.v,e=s?{Ul:1+ev.ci.RG.indexOf(E.classID),n$:E}:{Ul:0};
|
|
this.fj.a($,e,T);this.A9.a(o.strokeStyleLineWidth.v.val);this.am.a(o)};bB.prototype.v=function(){return JSON.parse(JSON.stringify(this.Sy))};
|
|
function hg($){aI.call(this);this.k=H.z("span","fitem");this.Hv=null;if($){this.Hv=new eB("");this.k.appendChild(this.Hv.k)}this.Cr=["front","union","difference","intersection"];
|
|
var o=[[18,0],[18,1],[18,2],[18,3]];this.jC=[];this.Gf=0;for(var f=0;f<this.Cr.length;f++){var T=new hE("<img src=\""+PIMG["set/"+this.Cr[f]]+"\" class=\"autoscale gsicon\" />",!1,o[f]);
|
|
T.B("click",this.a24,this);this.k.appendChild(T.k);this.jC.push(T)}this.jC[0].UM()}hg.prototype=new aI;
|
|
hg.prototype.acz=function(){return this.Gf};hg.prototype.v=function(){return this.Cr[this.Gf]};hg.prototype.a=function($){this.Gf=this.Cr.indexOf($);
|
|
for(var f=0;f<this.jC.length;f++)this.jC[f].Xc();this.jC[this.Gf].UM()};hg.prototype.a24=function($){this.a(this.Cr[this.jC.indexOf($.currentTarget)]);
|
|
this.J(new x(H.E.O,!1))};hg.prototype.f=function(){if(this.Hv)this.Hv.a(aX.get([12,36])+":");for(var f=0;
|
|
f<this.jC.length;f++)this.jC[f].f()};function d_($,o,T,s){aI.call(this);var E=H.Zs(),e="";this.k=H.z("span","fitem tinput");
|
|
if($){this.Oj=$;this.pq=H.z("label","flabel");this.k.appendChild(this.pq);this.pq.setAttribute("for",E);
|
|
this.f()}if(s==null){this.bz=H.z("input","");this.bz.setAttribute("type","text")}else this.bz=H.z("textarea","scrollable");
|
|
this.bz.setAttribute("id",E);if(T)e+="width:"+T+"em;";if(s){this.bz.setAttribute("rows",s)}if(e!="")this.bz.setAttribute("style",e);
|
|
this.k.appendChild(this.bz);if(o){this.Ow=H.z("span","");this.Ow.textContent=o;this.k.appendChild(this.Ow)}this.bz.addEventListener("change",this.CR.bind(this),!1);
|
|
this.bz.addEventListener("input",this.a95.bind(this),!1)}d_.prototype=new aI;d_.prototype.f=function(){if(this.Oj)this.pq.textContent=aX.get(this.Oj)+":"};
|
|
d_.prototype.yl=function($){this.pq.textContent=$};d_.prototype.a=function($){this.bz.value=$==null?"":$};
|
|
d_.prototype.v=function(){return this.bz.value};d_.prototype.K9=function(){this.bz.select();this.bz.focus()};
|
|
d_.prototype.CR=function($){this.J(new x(H.E.O,!1))};d_.prototype.a95=function($){this.J(new x("input",!1))};
|
|
function fs($,o,T,s,E,e,n){eK.call(this,$,o,T,s,E,!0,e,null,n);H.v2(this.k,"trangeinput");this.k.appendChild(this.pq);
|
|
this.k.appendChild(this.bz);var A=H.z("span","rangecont");this.k.appendChild(A);A.appendChild(this.nC);
|
|
this.nC.setAttribute("style","width:97%;")}fs.prototype=new eK;function gR(){aI.call(this);this.hW=[16,!0,!0];
|
|
this.k=H.z("span","");this.bn=[new ac([12,24],0,255),new ad("Anti-alias"),new ad([12,25])];for(var f=0;
|
|
f<3;f++){var $=this.bn[f];$.parent=this;$.a(this.hW[f]);this.k.appendChild($.k);$.B(H.E.O,this.Qr,this)}}gR.prototype=new aI;
|
|
gR.prototype.Qr=function(){for(var f=0;f<3;f++)this.hW[f]=this.bn[f].v();this.J(new x(H.E.O,!1))};gR.prototype.a=function($){this.hW=$.slice(0);
|
|
for(var f=0;f<3;f++)this.bn[f].a($[f])};gR.prototype.v=function(){return this.hW.slice(0)};gR.prototype.f=function(){for(var f=0;
|
|
f<3;f++)this.bn[f].f()};function ay($,o){aI.call(this);if(o==null)o=!1;this.BY=[];this.ah1=0;this.ald=0;
|
|
this.b6=0;this.HG=[];this.fC=[];for(var T in L.Rt.type){if(T=="warpCustom"&&!o)continue;this.HG.push(T);
|
|
this.fC.push(L.Rt.type[T])}this.k=H.z("span","fitem warpbutton");this.gz=new aI;this.gz.k=H.z("div","floatcont");
|
|
if($){this.Hv=$;this.pq=H.z("label","flabel");this.k.appendChild(this.pq)}this.e=H.z("button");this.k.appendChild(this.e);
|
|
this.e.addEventListener("click",this.UY.bind(this),!1);this.h1=new eW(!0);this.gz.k.appendChild(this.h1.k);
|
|
this.h1.B(H.E.O,this.a2A,this);this.f()}ay.prototype=new aI;ay.prototype.yl=function($){this.pq.textContent=$};
|
|
ay.prototype.f=function(){if(this.Hv)this.pq.innerHTML=aX.get(this.Hv)+":";this.BY=[];var $=H.z("canvas",""),o=$.getContext("2d"),T=0;
|
|
o.font=Math.floor(13*H.K())+"px sans-serif";for(var f=0;f<this.HG.length;f++){T=Math.max(T,o.measureText(aX.get(L.Rt.type[this.HG[f]])).width)}var s=this.ah1=Math.floor(50*H.K()+T),E=this.ald=Math.floor(23*H.K());
|
|
$.width=s;$.height=E;this.gz.k.setAttribute("style","width:"+Math.floor(8+s/H.K())+"px;");o.font=Math.floor(13*H.K())+"px sans-serif";
|
|
o.lineWidth=1;o.strokeStyle="#000000";var e=Math.floor(16*H.K()),n=new df(0,0,e,e);for(var f=0;f<this.HG.length;
|
|
f++){var A=this.HG[f];o.clearRect(0,0,$.width,$.height);var u=L.Rt.Rt(n,A,!0,.3,0,0),Y=L.M.Uo(n);Y.o.push("M","L","M","L");
|
|
Y.I.push(0,e/2,e,e/2);Y.I.push(e/2,0,e/2,e);Y=L.M.X2(Y);Y=L.M.g0(Y,e/5);L.ha.t(u,Y.I,n);L.M.t(Y.I,new fY(1,0,0,1,Math.floor(8*H.K())+.5,Math.floor(3*H.K())+.5),Y.I);
|
|
o.beginPath();Typr.U.pathToContext({cmds:Y.o,crds:Y.I},o);o.stroke();o.fillText(aX.get(L.Rt.type[A]),Math.floor(40*H.K()),Math.floor(16*H.K()));
|
|
this.BY.push($.toDataURL())}this.h1.rS(this.BY,null,s,E);this.rE()};ay.prototype.UY=function($){var o=this.e.getBoundingClientRect(),T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.NM,bF:this.gz,x:o.left,y:o.top+o.height+4};this.J(T)};ay.prototype.a2A=function($){var o=new x(H.E.Q,!0);
|
|
o.data={e:H.V.mG,bF:this.gz};this.J(o);this.b6=$.target.v();this.rE();this.J(new x(H.E.O))};ay.prototype.rE=function(){this.h1.o5(this.b6);
|
|
this.e.innerHTML="<img src=\""+this.BY[this.b6]+"\" class=\"gsicon\" />";var $=this.ah1,o=this.ald;H.kg(this.e.firstChild,$,o)};
|
|
ay.prototype.v=function(){return this.HG[this.b6]};ay.prototype.a=function($){this.b6=this.HG.indexOf($);
|
|
this.rE()};function c1($,o,T){aI.call(this);if($==null)$=!1;if(o==null)o=!1;if(T==null)T=!1;this.a3s=o;
|
|
this.Rt=null;this.cm=new ay([12,22],T);this.cm.parent=this;this.cm.B(H.E.O,this.Ut,this);this.RL=new h_([22,0],[[22,4,0],[22,4,1]]);
|
|
this.RL.B(H.E.O,this.Ut,this);var s=$?ac:fs;this.L9=new s([22,1],-100,100,"%");this.Ma=new s("Horizontal Distortion:",-100,100,"%");
|
|
this.Hd=new s("Vertical Distortion:",-100,100,"%");this.L9.parent=this.Ma.parent=this.Hd.parent=this;
|
|
this.L9.B(H.E.O,this.Ut,this);this.Ma.B(H.E.O,this.Ut,this);this.Hd.B(H.E.O,this.Ut,this)}c1.prototype=new aI;
|
|
c1.prototype.f=function(){this.cm.f();this.RL.f();this.L9.f();var $=this.a3s?1:100;this.Ma.yl(aX.get([22,2]).substring(0,$)+":");
|
|
this.Hd.yl(aX.get([22,3]).substring(0,$)+":")};c1.prototype.Ut=function(){var $=this.Rt,o=this.cm.v(),T=$.warpStyle.v.warpStyle;
|
|
if(o=="warpCustom")L.Rt.X3(L.Rt.wW($),$);else delete $.customEnvelopeWarp;$.warpStyle.v.warpStyle=this.cm.v();
|
|
$.warpRotate.v.Ornt=["Hrzn","Vrtc"][this.RL.v()];$.warpValue.v=this.L9.v();$.warpPerspective.v=this.Ma.v();
|
|
$.warpPerspectiveOther.v=this.Hd.v();if(o=="warpNone"||o=="warpCustom"){$.warpValue.v=0;$.warpPerspective.v=0;
|
|
$.warpPerspectiveOther.v=0}else if(T=="warpNone"||T=="warpCustom")$.warpValue.v=50;this.J(new x(H.E.O,!1));
|
|
this.a($)};c1.prototype.v=function($){return JSON.parse(JSON.stringify(this.Rt))};c1.prototype.a=function($){this.Rt=JSON.parse(JSON.stringify($));
|
|
this.cm.a($.warpStyle.v.warpStyle);this.RL.a($.warpRotate.v.Ornt=="Hrzn"?0:1);this.L9.a($.warpValue.v);
|
|
this.Ma.a($.warpPerspective.v);this.Hd.a($.warpPerspectiveOther.v);var o=$.warpStyle.v.warpStyle,T=o=="warpNone"||o=="warpCustom",s=[this.RL,this.L9,this.Ma,this.Hd];
|
|
for(var f=0;f<s.length;f++)if(T)s[f].v9();else s[f].wI()};function ap($,o){aI.call(this);this.k=H.z("div");
|
|
this.EG=$;this.cv=null;this._j=new aY(0,0);this.Ov="position:relative;overflow:hidden;";this.rs=null;
|
|
this.NJ=new H.mK(this.k);this.ah3=o;this.OS("grab");this.S=H.z("canvas","canv");this.k.appendChild(this.S);
|
|
this.V8=this.S.getContext("2d");this.acu=null;this.T_=null;this.ZZ=null;this.MJ=0;this.a9=0;this.Ka=0;
|
|
this.anb=this.aqp.bind(this);this.ahI=null;this.C=new aH({d:1,w:1});this.jQ=null;this.o2=null;this.vc=[];
|
|
this.arE=0;this.Kk=0;this.ah2=this.gO.bind(this);this.ajQ=this.$d.bind(this);this.a5e=this.uZ.bind(this);
|
|
this.anS=this.FB.bind(this);this.abd=0;this.LN=null;this.ajM(this.S);this.x9(this)}ap.prototype=new aI;
|
|
ap.aez=function($){var o=new dN;if($>=0)o.ao("Space");if($>=1){o.ao("ControlLeft");if($==2)o.ao("AltLeft")}return o};
|
|
ap.prototype.Vb=function($){var o=this.rs,T=null;if($.L(dN.Gv)){T="grab";if($.L(dN.I6)){T="zoom-in";
|
|
if($.L(dN.BJ))T="zoom-out"}}this.cv=T;if(T)o=T;this.NJ.kW(o,this.Ov);if($.L(dN.I6)){var s=0;if($.L(dN.AZ))s=1;
|
|
if($.L(dN.Dd))s=-1;if(s!=0){this.w8(new aY(this.S.width/2,this.S.height/2),s==1)}}};ap.prototype.OS=function($){this.rs=$;
|
|
if(this.cv)return;this.NJ.kW($,this.Ov)};ap.prototype.ajM=function($){H.uE($,this.ah2);H.fb($);$.addEventListener("wheel",this.anS,!1)};
|
|
ap.prototype.x9=function($){$.B("viewchange",this.amM,this)};ap.prototype.amM=function($){var o=this.C.X,T=$.currentTarget.s2();
|
|
this.C.X=T.X;this.C.l=T.l.clone();if(o!=T.X)this.Bg();this.bT()};ap.prototype.s2=function(){return{X:this.C.X,l:this.C.l}};
|
|
ap.prototype.a=function($,o){var T=$[0].Sg;if(this.T_!=null&&this.T_[0].Sg.R1(T)){}else{this.C.u4={d:T.d,w:T.w};
|
|
this.C.l=new aY(0,0);this.C.X=1}this.T_=$;this.Bg();this.Yo();this.MJ=0;this.a9=0;this.Ka=o==null?0:o;
|
|
this.aqp()};ap.prototype.FB=function($){$.preventDefault();if($.deltaY==0||Date.now()-this.abd<100)return;
|
|
var o=H.DQ($);o.x=H.K()*o.x;o.y=H.K()*o.y;this.abd=Date.now();this.w8(o,$.deltaY<0)};ap.prototype.w8=function($,o){D.Kl.PT(this.C,$,o);
|
|
this.abj()};ap.prototype.aoN=function(){var $=this.C,o=$.u4;this.C.X=D.Kl.cb(o.d,o.w,$.Vi.d,$.Vi.w);
|
|
this.abj()};ap.prototype.abj=function(){this.Bg();this.J(new x("viewchange"));this.J(new x("zoom"))};
|
|
ap.prototype.Bg=function(){this.ZZ=[];var $=this.C.X;if(this.T_==null)return;for(var f=0;f<this.T_.length;
|
|
f++){var o=this.T_[f],T=new Uint8Array(o.data),s;if($>=1)s={_3:T,rect:o.Sg};else s=L.aeA(T,o.Sg,$);this.ZZ.push(s)}};
|
|
ap.prototype.Yo=function(){clearTimeout(this.ahI)};ap.prototype.bT=function(){if(this.T_==null||!H.ni(this.S))return;
|
|
var $=this.acu,o=this.S.width,T=this.S.height,N,z;if($==null||$.width!=o||$.height!=T){$=this.acu=this.V8.createImageData(o,T);
|
|
console.log("creating image data")}var s=this.T_[this.MJ],E=this.ZZ[this.MJ],e=this.C,n=e.u4,A=e.Vi,u=A.d,Y=A.w,b=n.d*e.X,a=n.w*e.X,w=Math.round((u-b)/2+e.l.x),X=Math.round((Y-a)/2+e.l.y);
|
|
if(e.X<=1){z=E.rect.clone();z.x=w;z.y=X;b=z.d;a=z.w;N=E._3}else{var i=1/e.X,k=new df(Math.floor((A.x-w)*i),Math.floor((A.y-X)*i),Math.ceil(A.d*i)+1,Math.ceil(A.w*i)+1),Q=new df(0,0,k.d*e.X,k.w*e.X);
|
|
Q.x=k.x*e.X+w;Q.y=k.y*e.X+X;if(e.$c==null||e.$c.length!=k.Y()*4){e.$c=L.G(k.Y()*4)}if(e.Iw==null||e.Iw.length!=Q.Y()*4){e.Iw=L.G(Q.Y()*4)}L.wr(e.$c,0);
|
|
L.h9(E._3,E.rect,e.$c,k);L.scale.nq(e.$c,k.d,k.w,e.Iw,Q.d,Q.w,e.X);N=e.Iw;z=Q}var O=new Uint8Array($.data.buffer);
|
|
L.qU(O,u,Y,8,-w,-X);L.R.xE("norm",N,z,O,A,A,1);var c=this.V8;c.setTransform(1,0,0,1,0,0);c.putImageData($,0,0);
|
|
c.clearRect(w-1e3,X,1e3,a);c.clearRect(w+b,X,1e3,a);c.clearRect(w-1e3,X-1e3,b+2e3,1e3);c.clearRect(w-1e3,X+a,b+2e3,1e3);
|
|
var B=ap.a37(e.X,"#ffffff",this.ah3);c.putImageData(B,0,e.Vi.w-B.height)};ap.a05={};ap.a37=function($,o,T){if(T==null)T=!1;
|
|
var s="z"+$+","+o+","+T,E=ap.a05[s];if(E)return E;var e=Math.round(50*H.K()),n=Math.round(18*H.K()),A=T?2*n:0,u=H.z("canvas"),Y=u.getContext("2d");
|
|
u.width=e+A;u.height=n;Y.fillStyle="rgba(1,1,1,1)";Y.fillRect(0,0,e+A,n);Y.font=Math.round(11*H.K())+"px monospace";
|
|
Y.fillStyle=o;var b=$*100;if(b<100)b=b.toFixed(2);else b=Math.round(b);b=b+"%";var a=Y.measureText(b).width;
|
|
Y.fillText(b,A+(e-a)/2,Math.round(n*.7));E=ap.a05[s]=Y.getImageData(0,0,e+A,n);return E};ap.prototype.aqp=function(){var $=this.T_,o=$.length,T=this.MJ,s=this.T_[T],E=(T+1)%o;
|
|
this.bT();if(o!=1&&$[E].Sg.R1(s.Sg)){var e=s.y0?parseInt(s.y0.split(",").pop()):30;if(e==0)e=16;if(E==0)this.a9++;
|
|
if(this.Ka==0||this.a9<this.Ka)this.ahI=setTimeout(this.anb,e)}this.MJ=E};ap.prototype.RE=function($,o){if($<=0||o<=0)return;
|
|
var T=Math.floor($*H.K()),s=Math.floor(o*H.K());this.C.Vi=new df(0,0,T,s);this.S.width=T;this.S.height=s;
|
|
this.S.setAttribute("style","width:"+T/H.K()+"px; height:"+s/H.K()+"px; display:block;");this.bT()};
|
|
ap.prototype.mL=function($){var o=-1,T=this.vc;for(var f=0;f<T.length;f++)if(T[f].pointerId==$.pointerId)o=f;
|
|
return o};ap.prototype.gO=function($){var o=this.mL($),T=this.vc;if(o!=-1)T[o]=$;else T.push($);if(T.length==1){this.LN=$.target;
|
|
H.mW(window,this.ajQ);H.aa(window,this.a5e);this.jQ=H.DQ($,this.S);this.jQ.x*=H.K();this.jQ.y*=H.K();
|
|
this._j=this.jQ;this.o2=this.C.l.clone();if(this.EG&&this.LN==this.S&&!this.cv)this.J(new x("mousedown"))}else this.arE=this.Kk=aY.Sa(H.DQ(T[0],this.S),H.DQ(T[1],this.S))};
|
|
ap.prototype.$d=function($){var o=this.mL($),T=this.vc;if(o!=-1)T[o]=$;var s=this.C,E=this.cv,e=this.T_[this.MJ].Sg.clone();
|
|
e.d*=s.X;e.w*=s.X;var n=H.DQ($,this.S);n.x*=H.K();n.y*=H.K();this._j=n;if(this.EG&&this.LN==this.S&&!E)this.J(new x("mousemove"));
|
|
else if((E=="grab"||E==null)&&(T.length>1||!s.Vi.Yg(e))){if(T.length>1){var A=H.DQ(T[0],this.S),u=H.DQ(T[1],this.S),Y=new aY(H.K()*(A.x+u.x)/2,H.K()*(A.y+u.y)/2),b=aY.Sa(A,u),a=null;
|
|
if(b>this.Kk+50){this.Kk+=50;a=!0}if(b<this.Kk-50){this.Kk-=50;a=!1}if(a!=null)this.w8(Y,a);return}else{var w=n.x-this.jQ.x,X=n.y-this.jQ.y;
|
|
s.l.x=this.o2.x+Math.round(w);s.l.y=this.o2.y+Math.round(X)}this.J(new x("viewchange"))}};ap.prototype.uZ=function($){var o=this.mL($),T=this.vc;
|
|
T.splice(o,1);if(T.length==0){H.vY(window,this.ajQ);H.SY(window,this.a5e);var s=this.cv;if($.detail>1){this.C.X=1;
|
|
this.C.l.A5(0,0);this.bT()}if(this.EG&&this.LN==this.S&&!this.cv)this.J(new x("mouseup"));else{if(s=="zoom-in"||s=="zoom-out")this.w8(this._j,s=="zoom-in")}}else{var E=this.jQ=H.DQ(T[0],this.S);
|
|
E.x*=H.K();E.y*=H.K()}};ap.prototype.TE=function(){return this.C.VD(this._j.x,this._j.y)};function hB(){aI.call(this);
|
|
this.R8=null;this.yt=null;this.Qx=null;this.cp=null;this.aem="";this.nW=[];this.Y1=0;this.aZ=[];this.zw=0;
|
|
this.GH=null;var $=this.k=H.z("div",""),o=this.aod=H.z("div","form");o.setAttribute("style","line-height:0; margin-bottom:0.5em;");
|
|
$.appendChild(o);var T=this.Hv=H.z("span");o.appendChild(T);T.setAttribute("style","font-size:1.2em; font-weight:bold; margin-right:3em;");
|
|
var s=this.apm=new ad([25,2,0]);s.a(!0);o.appendChild(s.k);s.B(H.E.O,this.E4,this);var E=this.f$=new ad([25,2,1]);
|
|
E.a(!0);o.appendChild(E.k);E.B(H.E.O,this.E4,this);var e=new eB(" ");o.appendChild(e.k);var n=this.L6=new d_([25,1,1]);
|
|
o.appendChild(n.k);n.B(H.E.O,this.E4,this);this.GZ=new ba(14);this.GZ.a9c(3);o.appendChild(this.GZ.k);
|
|
this.GZ.parent=this;this.GZ.B(H.E.O,this.ai4,this);var A=this.a3C=new hE([25,1,2],null,null,!0);o.appendChild(A.k);
|
|
A.B("click",this.z7,this);this.amJ=this.a1p.bind(this);this.RM=H.z("div","svggallery scrollable");$.appendChild(this.RM);
|
|
this.RM.addEventListener("scroll",this.ak0.bind(this))}hB.prototype=new aI;hB.prototype.YE=function($){this.acX=$};
|
|
hB.prototype.f=function(){this.Hv.textContent=aX.get([25,0]);this.GZ.f();this.apm.f();this.f$.f();this.L6.f();
|
|
this.a3C.f()};hB.prototype.RE=function($,o){o-=26;this.R8=new aY($,o);this.aod.setAttribute("style","width:"+$+"px");
|
|
this.RM.setAttribute("style","width:"+$+"px; height:"+o+"px");if(H.ni(this.k))this.E4()};hB.prototype.a=function($){this.yt=$;
|
|
this.E4()};hB.prototype.ak0=function($){var o=this.RM;if(o.scrollTop+o.clientHeight+10>=o.scrollHeight){this.E4(!0)}};
|
|
hB.prototype.ai4=function($){this.Qx=null;this.E4()};hB.prototype.a1p=function($){if(Date.now()-this.zw<2e3)return;
|
|
this.zw=Date.now();this.Y1=this.aZ.indexOf($.currentTarget);var o=this.VJ(this.yt.x,this.yt.y);if(o[1]){var T=o[1].largeImageURL,s=new XMLHttpRequest;
|
|
s.responseType="arraybuffer";s.open("GET",T,!0);s.onload=this.a6w.bind(this);s.send();return}this.a2Z(o)};
|
|
hB.prototype.a6w=function($){var o=$.target.response,T=eY.RP(o),s=eY.Q1(T),E=s.yj(o),e=this.VJ(this.yt.x,this.yt.y,[o,E[0].Sg.d,E[0].Sg.w]);
|
|
this.a2Z(e)};hB.prototype.a2Z=function($){var o=$[0],T=eY.RP(o),s=eY.Q1(T),E=new iG("template.psd");
|
|
s.yj(o,E);var e=new x("tempready",!0);e.data={u4:E};this.J(e)};hB.prototype.z7=function($){var o=$.target;
|
|
this.nW=[];this.E4()};hB.prototype.a8k=function($){var o=JSON.parse($.target.response);this.cp=o.hits;
|
|
this.E4()};hB.prototype.E4=function($){if(this.yt==null||this.R8==null||this.acX==null)return;if(this.R8.x<=0)return;
|
|
var o=this.yt.x,T=this.yt.y;if(Math.min(o,T)<50)return;if($!=!0){this.aZ=[];H.Ft(this.RM);this.RM.scrollTop=0}if(this.aZ.length>300)return;
|
|
var s=Math.min(1,300/Math.max(o,T)),E=this.R8.clone();E.x-=20;var e=Math.max(1,Math.floor(E.x/(o*s))),n=Math.max(1,Math.ceil(E.y/(T*s)));
|
|
s=E.x/e/o;var A=e*n;if(this.Qx==null){var u=this.acX.vv.ts();this.Qx=[];for(var Y in u){var b=u[Y],a=b[3];
|
|
if(!this.GZ.Pb(b))continue;if(b[5]==null||b[5].slice(0,2)=="gf")continue;this.Qx.push(b)}if(this.Qx.length==0)this.Qx.push(u.DejaVuSans)}var w=this.f$.v(),X=this.L6.v().trim();
|
|
this.L6.ph(w);if(w&&(this.cp==null||X!=this.aem)){var N=new XMLHttpRequest,z="https://pixabay.com/api/?image_type=photo"+(X==""?"":"&q="+encodeURIComponent(X))+"&per_page=200&page=1&key=10554583-a5eacb61c2e61105fdfb6eb88";
|
|
if(X=="")z+="&safesearch=true";if(X=="")z="plugins/gallery.json";N.open("GET",z,!0);N.onload=this.a8k.bind(this);
|
|
N.onerror=function(B){console.log(B.target.response)};N.send();this.aem=X;return}s*=(o*s-5)/(o*s);var i=this.aZ.length;
|
|
for(var f=0;f<A;f++){var k=this.Y1=i+f;if(this.nW[k]==null)this.nW[k]=Math.floor(Math.random()*4294967295);
|
|
var Q=this.VJ(Math.round(o*s),Math.round(T*s)),O=Q[0];O=t.LK(new Uint8Array(O));var c=H.z("span");c.innerHTML=O;
|
|
this.aZ.push(c);this.RM.appendChild(c);c.addEventListener("click",this.amJ,!1)}};hB.prototype.VJ=function($,o,T){var s=this.f$.v(),E=this.apm.v(),e=s&&this.cp.length!=0?this.cp:null;
|
|
if(E&&!s)e=null;if(E&&s&&(this.Y1&1)==0)e=null;return fA.XG($,o,this.nW[this.Y1],this.Qx,T?T:e)};function h8(){aI.call(this);
|
|
this.k=H.z("div");this.CJ=null;this.acR=null;this.XC=-1;this.yc={JPG:[{uq:new fs([12,52,0],0,100,"%",null,null,!0),Dz:70},{uq:new ad("attach metadata"),Dz:!1}],TIFF:[{uq:new ad("attach metadata"),Dz:!1}],WEBP:[{uq:new fs([12,52,0],0,100,"%",null,null,!0),Dz:70}],GIF:[{uq:new fs([12,52,0],0,100,"%",null,null,!0),Dz:100}],PNG:[{uq:new fs([12,52,0],0,100,"%",null,null,!0),Dz:100},{uq:new ad("don't use palettes"),Dz:!1}],PDF:[{uq:new d_([12,52,1]),Dz:""},{uq:new fs([12,52,0],0,100,"%",null,null,!0),Dz:100},{uq:new ad("rasterize all"),Dz:!1},{uq:new ad("rasterize text"),Dz:!1},{uq:new ad("vectorize text"),Dz:!1},{uq:new fs("Add Margin",0,5,"in",2),Dz:0}],EMF:[{uq:new d_([12,52,1]),Dz:""},{uq:new ad("rasterize all"),Dz:!1},{uq:new ad("rasterize text"),Dz:!1},{uq:new ad("vectorize text"),Dz:!1}],SVG:[{uq:new ad("add raster graphics"),Dz:!0},{uq:new ad("add hidden layers"),Dz:!1},{uq:new ad("vectorize text"),Dz:!1},{uq:new ad("rasterize text"),Dz:!1},{uq:new ad("add layer names"),Dz:!0},{uq:new ad("pretty-print"),Dz:!0}],RAW:[{uq:new eI([12,72],["1","3","4"]),Dz:2},{uq:new eI([12,34],["8 Bits","16 Bits"]),Dz:0},{uq:new eI("Byte Order",["12-34","34-12"]),Dz:0}],anim:[{uq:new fs("Speed",10,800,"%",null,!0,!0),Dz:100},{uq:new ac("Repeat (0 = Forever)",0,10," \xD7",0,!1,!0),Dz:0},{uq:new ad("reverse frames"),Dz:!1},{uq:new ad("boomerang"),Dz:!1}],slcs:[{uq:new ad("As Slices"),Dz:!0}],artb:[{uq:new ad("As Artboards"),Dz:!0}]};
|
|
for(var $ in this.yc){var o=this.yc[$];for(var f=0;f<o.length;f++){o[f].uq.a(o[f].Dz);o[f].uq.B(H.E.O,this.W6,this)}}}h8.prototype=new aI;
|
|
h8.prototype.a4H=function(){this.XC=-1};h8.prototype.f=function(){for(var $ in this.yc)for(var f=0;f<this.yc[$].length;
|
|
f++)this.yc[$][f].uq.f()};h8.prototype.W6=function(){this.E4();this.J(new x(H.E.O,!1))};h8.prototype.E4=function(){var $=this.CJ,o=$[0],T=$[1],s=$[2],E=$[3],e=this.yc[o];
|
|
if(e==null)e=[];else e=e.slice(0);if(T)e=e.concat(this.yc.anim);if(["GIF","PNG","JPG"].indexOf(o)!=-1&&s)e=e.concat(this.yc.slcs);
|
|
else if(["GIF","PNG","JPG"].indexOf(o)!=-1&&E)e=e.concat(this.yc.artb);if(o+" "+T+" "+E!=this.XC){this.XC=o+" "+T+" "+E;
|
|
H.Ft(this.k);for(var f=0;f<e.length;f++){if(o=="PDF"&&!E&&f==0)continue;this.k.appendChild(e[f].uq.k);
|
|
H.ze(this.k)}}var n=this.acR=[];for(var f=0;f<e.length;f++)n.push(e[f].uq.v())};h8.prototype.ajd=function($,o,T,s){this.CJ=[$,o,T,s];
|
|
this.E4()};h8.prototype.v=function(){return this.acR.slice(0)};function bC(){aI.call(this);this.k=H.z("span","fitem");
|
|
this.q9=!1;this.zi=new hE("No",!1,"Cancel");this.bD=new hE("Yes",!1,"Confirm");this.k.appendChild(this.zi.k);
|
|
this.k.appendChild(this.bD.k);this.zi.B("click",this.W9,this);this.bD.B("click",this.W9,this);this.f()}bC.prototype=new aI;
|
|
bC.prototype.f=function(){this.zi.yl(H.oQ("cross",null,"autoscale"));this.bD.yl(H.oQ("checkmark",null,"autoscale"))};
|
|
bC.prototype.W9=function($){this.q9=$.target==this.bD;this.J(new UIEvent("click"))};bC.prototype.v=function(){return this.q9};
|
|
function U($){aI.call(this);this.c4=$;this.k=H.z("div","");this.qD=[];this.SX=null;this.ap1=[]}U.prototype=new aI;
|
|
U.prototype.uX=function($){};U.prototype.n6=function(){return!1};U.prototype.RE=function($,o){};U.prototype.YE=function($,o){};
|
|
U.prototype.VY=function($){};U.prototype.a=function($,o,T,s,E,e){var n=[],A=this.qD,u=0,Y=iZ.$0["s"+this.c4];
|
|
Y?Y($,n,e):this.ix($,n,e);for(var f=0;f<A.length;f++)if(!(A[f]instanceof eB))A[f].a(n[u++]);if($.RndS)this.SX=$.RndS.v};
|
|
U.prototype.v=function(){var $=iZ.o_(this.c4),o=[],T=this.qD,s=0;for(var f=0;f<T.length;f++)if(!(T[f]instanceof eB))o[s++]=T[f].v();
|
|
var E=iZ.$0["g"+this.c4];E?E($,o):this.gQ($,o);if($.RndS)$.RndS.v=this.SX;return $};U.prototype.Vb=function($){};
|
|
U.prototype.Ut=function($){if($&&$.target instanceof hE){this.SX=Math.floor(Math.random()*4294967295)}var o=this.ap1;
|
|
for(var f=0;f<o.length;f+=2){var T=this.qD[o[f]],s=this.qD[o[f+1]],E=T.v(),e=s.v();if($.target==T)s.a(Math.max(E,e));
|
|
else T.a(Math.min(E,e))}this.J(new x(H.E.O))};U.prototype.f=function(){for(var f=0;f<this.qD.length;
|
|
f++)this.qD[f].f()};U.prototype.jq=function($){H.v2(this.k,"form");var o=this.qD;for(var f=0;f<o.length;
|
|
f++){var T=o[f];T.parent=this;T.B(H.E.O,this.Ut,this);this.k.appendChild(T.k);if(T instanceof ad&&o[f+1]instanceof hJ)continue;
|
|
if($&&$.indexOf(f)!=-1)H.Qk(this.k);else H.ze(this.k)}var s=iZ.o_(this.c4);if(s.RndS){var E=new hE("Randomize",null,null,!0);
|
|
this.k.appendChild(E.k);E.B("click",this.Ut,this)}};U.prototype.WR=function(){return!1};U.prototype.iO=function($,o,T,s,E){};
|
|
U.prototype.ZS=function($,o,T,s,E){};U.prototype.yg=function($,o,T,s,E){};U.prototype.gQ=function($,o){};
|
|
U.prototype.ix=function($,o){};U.Bokh=function(){U.call(this,"Bokh");this.qD=[new h_("Depth Map",["A","b"]),new fs("Focal Distance",0,255),new h_([12,76,1],"Triangle (3),Square (4),Pentagon (5),Hexagon (6),Heptagon (7),Octagon (8)".split(",")),new fs([12,56],0,100),new fs([12,15],0,360),new fs([12,2],0,100),new fs([4,13],0,255),new fs([24,6],0,100),new eI([12,58],[[12,59,0],[12,59,1]]),new ad([12,60])];
|
|
this.jq([4,6])};U.Bokh.prototype=new U;U.Bokh.prototype.ix=function($,o,T){var s=[[22,5,0],[6,5,3],[6,2]],E=$.BkDi.v.BtDi,e=$.BkDc,n=0;
|
|
if(E=="BeIn")n=0;else if(E=="BeIt"&&e.v.BtDc=="BeCt")n=1;else if(E=="BeIt"&&e.v.BtDc=="BeCm")n=2;else n=3+e.v;
|
|
for(var f=0;f<T[1].length;f++)s.push(T[1][f].name);this.qD[0].TY(s,[3]);o[0]=n;o[1]=$.BkDp.v;o[2]=parseInt($.BkIs.v.BtIs.slice(3))-3;
|
|
o[3]=$.BkIb.v;o[4]=$.BkIr.v;o[5]=$.BkSb.v;o[6]=$.BkSt.v;o[7]=$.BkNa.v;o[8]=$.BkNt.v.BtNt=="BeNu"?0:1;
|
|
o[9]=$.BkNm.v};U.Bokh.prototype.gQ=function($,o){var T;if(o[0]==0){T="BeIn";delete $.BkDc}else if(o[0]<3){T="BeIt";
|
|
$.BkDc={t:"enum",v:{BtDc:["BeCt","BeCm"][o[0]-1]}}}else{T="BeIa";$.BkDc={t:"long",v:o[0]-3}}$.BkDi.v.BtDi=T;
|
|
$.BkDp.v=o[1];$.BkIs.v.BtIs="BeS"+(3+o[2]);$.BkIb.v=o[3];$.BkIr.v=o[4];$.BkSb.v=o[5];$.BkSt.v=o[6];$.BkNa.v=o[7];
|
|
$.BkNt.v.BtNt=["BeNu","BeNg"][o[8]];$.BkNm.v=o[9]};U.oilPaint=function(){U.call(this,"oilPaint");this.qD=[new fs([12,56],.1,10,"px",!0),new fs("Cleanliness",0,10,"px",!0),new fs([12,38],.1,10,null,!0),new fs("Bristle Detail",0,10,null,!0),new ad("Lighting"),new fs("Shine",0,10,null,!0),new iF([12,15])];
|
|
this.jq()};U.oilPaint.prototype=new U;U.oilPaint.prototype.ix=function($,o){var T="stylization cleanliness brushScale microBrush lightingOn specularity".split(" ");
|
|
for(var f=0;f<T.length;f++)o[f]=$[T[f]].v;o[6]=$.LghD.v};U.oilPaint.prototype.gQ=function($,o){var T="stylization cleanliness brushScale microBrush lightingOn specularity".split(" ");
|
|
for(var f=0;f<T.length;f++)$[T[f]].v=o[f];$.LghD.v=o[6].a4};U.TrcC=function(){U.call(this,"TrcC");this.qD=[new fs("Level",0,255),new eI([12,69],[[19,4,1],[19,4,0]])];
|
|
this.jq()};U.TrcC.prototype=new U;U.TrcC.prototype.ix=function($,o){o[0]=$.Lvl.v;o[1]=["Lwr","Upr"].indexOf($.Edg.v.CntE)};
|
|
U.TrcC.prototype.gQ=function($,o){$.Lvl.v=o[0];$.Edg.v.CntE=["Lwr","Upr"][o[1]]};U["Dfs "]=function(){U.call(this,"Dfs ");
|
|
this.qD=[new eI([12,36],[[15,10,0],[15,10,6],[15,10,11],"Anisotropic"])];this.jq()};U["Dfs "].prototype=new U;
|
|
U["Dfs "].prototype.ix=function($,o){o[0]=["Nrml","DrkO","LghO","anisotropic"].indexOf($.Md.v.DfsM)};
|
|
U["Dfs "].prototype.gQ=function($,o){$.Md.v.DfsM=["Nrml","DrkO","LghO","anisotropic"][o[0]]};U.Embs=function(){U.call(this,"Embs");
|
|
this.qD=[new iF([12,15]),new fs([12,42],1,100,"px"),new fs([12,57],1,500,"%")];this.jq()};U.Embs.prototype=new U;
|
|
U.Embs.prototype.ix=function($,o){o[0]=$.Angl.v;o[1]=$.Hght.v;o[2]=$.Amnt.v};U.Embs.prototype.gQ=function($,o){$.Angl.v=o[0].a4;
|
|
$.Hght.v=o[1];$.Amnt.v=o[2]};U["Wnd "]=function(){U.call(this,"Wnd ");this.qD=[new eI([12,32],["Wind","Blast","Stagger"]),new eI([12,33],["From the Right","From the Left"])];
|
|
this.jq()};U["Wnd "].prototype=new U;U["Wnd "].prototype.ix=function($,o){o[0]=["Wnd","Blst","Stgr"].indexOf($.WndM.v.WndM);
|
|
o[1]=["Left","Rght"].indexOf($.Drct.v.Drct)};U["Wnd "].prototype.gQ=function($,o){$.WndM.v.WndM=["Wnd","Blst","Stgr"][o[0]];
|
|
$.Drct.v.Drct=["Left","Rght"][o[1]]};U.lightFilterGradient=function(){U.call(this,"lightFilterGradient");
|
|
this.qD=[new fs([24,3,1],0,100,"px",1,!0),new fs([12,38],0,200,"%"),new ad([4,11]),new fs("High",0,100,"%"),new fs("Medium",0,100,"%"),new fs("Low",0,100,"%")];
|
|
this.jq()};U.lightFilterGradient.prototype=new U;U.lightFilterGradient.prototype.ix=function($,o){o[0]=$.blur.v;
|
|
o[1]=$.textureScale.v*100;o[2]=$.Scl.v==-1;var T=$.Dtl.v;o[3]=T[0].v*100;o[4]=T[1].v*100;o[5]=T[2].v*100};
|
|
U.lightFilterGradient.prototype.gQ=function($,o){$.blur.v=o[0];$.textureScale.v=o[1]/100;$.Scl.v=o[2]?-1:1;
|
|
var T=$.Dtl.v;T[0].v=o[3]/100;T[1].v=o[4]/100;T[2].v=o[5]/100};U.Fbrs=function(){U.call(this,"Fbrs");
|
|
this.qD=[new fs("Variance",1,64),new fs("Strength",1,64)];this.jq()};U.Fbrs.prototype=new U;U.Fbrs.prototype.ix=function($,o){o[0]=$.Vrnc.v;
|
|
o[1]=$.Strg.v};U.Fbrs.prototype.gQ=function($,o){$.Vrnc.v=o[0];$.Strg.v=o[1]};U.LnsF=function(){U.call(this,"LnsF");
|
|
this.qD=[new fs([12,2],10,300,"%"),new eI([12,44],["Lens 1","Lens 2","Lens 3","Lens 4"]),new fs("Position X",0,100,"%"),new fs("Position Y",0,100,"%")];
|
|
this.jq()};U.LnsF.prototype=new U;U.LnsF.prototype.ix=function($,o){o[0]=$.Brgh.v;o[1]=["Zm","Nkn","Nkn1","PnVs"].indexOf($.Lns.v.Lns);
|
|
var T=$.FlrC.v;o[2]=Math.round(T.Hrzn.v*100);o[3]=Math.round(T.Vrtc.v*100)};U.LnsF.prototype.gQ=function($,o){$.Brgh.v=o[0];
|
|
$.Lns.v.Lns=["Zm","Nkn","Nkn1","PnVs"][o[1]];var T=$.FlrC.v;T.Hrzn.v=o[2]/100;T.Vrtc.v=o[3]/100};U.LnsF.prototype.WR=function(){return!0};
|
|
U.LnsF.prototype.iO=function($,o,T,s,E){this.MY=!0;this.ajv($,E)};U.LnsF.prototype.ZS=function($,o,T,s,E){if(!this.MY)return;
|
|
this.ajv($,E)};U.LnsF.prototype.yg=function($,o,T,s,E){this.MY=!1};U.LnsF.prototype.ajv=function($,o){var T=$.C.VD(o.x,o.y);
|
|
function s(E,e){return Math.round(Math.max(0,Math.min(100,100*E/e)))}this.qD[2].a(s(T.x,$.d));this.qD[3].a(s(T.y,$.w));
|
|
this.Ut()};U.blendOptions=function(){U.call(this,"blendOptions");this.qD.push(new h_([12,19,0],hI.fC,!1,hI.xx));
|
|
this.qD.push(new fs([12,0],0,100,"%"));this.jq()};U.blendOptions.prototype=new U;U.blendOptions.prototype.ix=function($,o){o[0]=hI.C3.indexOf($.Md.v.BlnM);
|
|
o[1]=$.Opct.v.val};U.blendOptions.prototype.gQ=function($,o){$.Md.v.BlnM=hI.C3[o[0]];$.Opct.v.val=o[1]};
|
|
U.LnCr=function(){U.call(this,"LnCr");this.qD=[new fs([12,57],-100,100),new fs([12,38],10,150,"%")];
|
|
this.jq()};U.LnCr.prototype=new U;U.LnCr.prototype.ix=function($,o){o[0]=$.LnIa.v;o[1]=$.LnSi.v};U.LnCr.prototype.gQ=function($,o){$.LnIa.v=o[0];
|
|
$.LnSi.v=o[1]};U.adaptCorrect=function(){U.call(this,"adaptCorrect");var $=a4;this.qD=[new eB([19,6,0]),new $([12,57],0,100,"%"),new $("Tone",0,100,"%"),new $([12,56],0,200,"px"),new eB([19,6,2]),new $([12,57],0,100,"%"),new $("Tone",0,100,"%"),new $([12,56],0,200,"px"),new eB([3]),new $([13,0],-100,100)];
|
|
this.jq([3,7])};U.adaptCorrect.prototype=new U;U.adaptCorrect.prototype.ix=function($,o){var T=$.sdwM.v;
|
|
o[0]=T.Amnt.v.val;o[1]=T.Wdth.v.val;o[2]=T.Rds.v;var T=$.hglM.v;o[3]=T.Amnt.v.val;o[4]=T.Wdth.v.val;
|
|
o[5]=T.Rds.v;o[6]=$.ClrC.v};U.adaptCorrect.prototype.gQ=function($,o){var T=$.sdwM.v;T.Amnt.v.val=o[0];
|
|
T.Wdth.v.val=o[1];T.Rds.v=o[2];var T=$.hglM.v;T.Amnt.v.val=o[3];T.Wdth.v.val=o[4];T.Rds.v=o[5];$.ClrC.v=o[6]};
|
|
U.Flam=function(){U.call(this,"Flam");this.qD=[new h_([12,44],"One Flame Along Path,Multiple Flames Along Path,Multiple Flames One Direction,Multiple Flames Path Directed,Multiple Flames Various Angle,Candle Light".split(",")),new fs([12,80,0],20,1e3,"px"),new fs([12,41],5,1e3,"px"),new eB([13,0]),new hJ(!1),new h_([12,52,0],["1: Draft","2: Low","3: Medium","4: High","5: Fine"])];
|
|
this.jq()};U.Flam.prototype=new U;U.boxblur=function(){U.call(this,"boxblur");this.qD=[new fs([12,56],1,200," px")];
|
|
this.jq()};U.boxblur.prototype=new U;U.boxblur.prototype.ix=function($,o){o[0]=$.Rds.v.val};U.boxblur.prototype.gQ=function($,o){$.Rds.v.val=o[0]};
|
|
U.GsnB=function(){U.call(this,"GsnB");this.qD=[new fs([12,56],.1,400,"px",1,!0)];this.jq()};U.GsnB.prototype=new U;
|
|
U.MtnB=function(){U.call(this,"MtnB");this.qD=[new iF([12,15]),new fs([12,28],1,100," px")];this.jq()};
|
|
U.MtnB.prototype=new U;U.RdlB=function(){U.call(this,"RdlB");this.qD=[new fs([12,57],1,100),new eI([12,36],["Spin","Zoom"]),new a4("Off X",0,1,null,2),new a4("Off Y",0,1,null,2)];
|
|
this.jq()};U.RdlB.prototype=new U;U.RdlB.prototype.ix=function($,o){o[0]=$.Amnt.v;o[1]=["Spn","Zm"].indexOf($.BlrM.v.BlrM);
|
|
o[2]=$.Cntr.v.Hrzn.v;o[3]=$.Cntr.v.Vrtc.v};U.RdlB.prototype.gQ=function($,o){$.Amnt.v=o[0];$.BlrM.v.BlrM=["Spn","Zm"][o[1]];
|
|
$.Cntr.v.Hrzn.v=o[2];$.Cntr.v.Vrtc.v=o[3]};U.Dspl=function(){U.call(this,"Dspl");this.qD=[new h_([6,36,3],["a","b"]),new fs([22,4,0],-100,100,"px"),new fs([22,4,1],-100,100,"px"),new h_([24,18,0],[[24,18,3],[24,18,2]])];
|
|
this.jq()};U.Dspl.prototype=new U;U.Dspl.prototype.ix=function($,o,T){this.aet=[];this.Vj=[];var s=-1,E=T?T[0]:null;
|
|
if(E==null)E=this.agW;else this.agW=E;if(E)for(var f=0;f<E.length;f++){var e=E[f];this.aet.push(e.FZ.trim());
|
|
this.Vj.push(e.EB);if(e.EB==$.DspF.v.pth)s=f}this.qD[0].TY(this.aet);o[0]=s==-1?0:s;o[1]=$.HrzS.v;o[2]=$.VrtS.v;
|
|
o[3]=["WrpA","RptE"].indexOf($.UndA.v.UndA)};U.Dspl.prototype.gQ=function($,o){if(this.Vj.length==0)return;
|
|
$.DspF.v.pth=this.Vj[o[0]];$.HrzS.v=o[1];$.VrtS.v=o[2];$.UndA.v.UndA=["WrpA","RptE"][o[3]]};U.Pnch=function(){U.call(this,"Pnch");
|
|
this.qD=[new fs([12,57],-100,100,"%")];this.jq()};U.Pnch.prototype=new U;U["Plr "]=function(){U.call(this,"Plr ");
|
|
this.qD=[new eI(null,["Rect to Polar","Polar to Rect"])];this.jq()};U["Plr "].prototype=new U;U.Rple=function(){U.call(this,"Rple");
|
|
this.qD=[new fs([12,57],-999,999),new h_([12,14,0],[[19,8,0],[19,8,1],[19,8,2]])];this.jq()};U.Rple.prototype=new U;
|
|
U["Shr "]=function(){U.call(this,"Shr ");this.qD=[new gj(!0,!0),new h_([24,18,0],[[24,18,3],[24,18,2]])];
|
|
this.jq()};U["Shr "].prototype=new U;U["Shr "].prototype.ix=function($,o){var T=new fY(0,255/127,255/127,0,-2,128),s=JSON.parse(JSON.stringify($.ShrP.v));
|
|
L.sE.t(s,T);o[0]=s;o[1]=["WrpA","RptE"].indexOf($.UndA.v.UndA)};U["Shr "].prototype.gQ=function($,o){var T=new fY(0,255/127,255/127,0,-2,128);
|
|
T.lY();L.sE.t(o[0],T);$.ShrP.v=o[0];$.ShrE.v=o[0].length-1;$.UndA.v.UndA=["WrpA","RptE"][o[1]]};U.Sphr=function(){U.call(this,"Sphr");
|
|
this.qD=[new fs([12,57],-100,100),new h_([12,36],["Normal",[22,4,0],[22,4,1]])];this.jq()};U.Sphr.prototype=new U;
|
|
U.Sphr.prototype.ix=function($,o){o[0]=$.Amnt.v;o[1]=["Nrml","HrzO","VrtO"].indexOf($.SphM.v.SphM)};
|
|
U.Sphr.prototype.gQ=function($,o){$.Amnt.v=o[0];$.SphM.v.SphM=["Nrml","HrzO","VrtO"][o[1]]};U.Twrl=function(){U.call(this,"Twrl");
|
|
this.qD=[new fs([12,15],-999,999)];this.jq()};U.Twrl.prototype=new U;U.Wave=function(){U.call(this,"Wave");
|
|
this.ap1=[1,2,3,4];this.qD=[new fs("Number of Generators",1,100),new a4("Min Length",1,999),new a4("Max Length",1,999),new a4("Min Ampl.",1,999),new a4("Max Ampl.",1,999),new a4("Scale X",1,100,"%"),new a4("Scale Y",1,100,"%"),new eI([12,44],["Sine","Triangle",[12,93,3]]),new h_([24,18,0],[[24,18,3],[24,18,2]]),new d_("Randomizer Seed")];
|
|
this.jq()};U.Wave.prototype=new U;U.Wave.prototype.ix=function($,o){o[0]=$.NmbG.v;o[1]=$.WLMn.v;o[2]=$.WLMx.v;
|
|
o[3]=$.AmMn.v;o[4]=$.AmMx.v;o[5]=$.SclH.v;o[6]=$.SclV.v;o[7]=["WvSn","WvTr","WvSq"].indexOf($.Wvtp.v.Wvtp);
|
|
o[8]=["WrpA","RptE"].indexOf($.UndA.v.UndA);o[9]=$.RndS.v};U.Wave.prototype.gQ=function($,o){$.NmbG.v=o[0];
|
|
$.WLMn.v=o[1];$.WLMx.v=o[2];$.AmMn.v=o[3];$.AmMx.v=o[4];$.SclH.v=o[5];$.SclV.v=o[6];$.Wvtp.v.Wvtp=["WvSn","WvTr","WvSq"][o[7]];
|
|
$.UndA.v.UndA=["WrpA","RptE"][o[8]];var T=parseInt(o[9]);if(isNaN(T))T=248325464;T=Math.max(0,Math.min(268435455,T));
|
|
$.RndS.v=T;this.qD[9].a(T)};U.ZgZg=function(){U.call(this,"ZgZg");this.qD=[new fs([12,57],-100,100),new fs("Ridges",0,20),new h_([12,22],["Around Center","Out From Center","Pond Ripples"])];
|
|
this.jq()};U.ZgZg.prototype=new U;U.surfaceBlur=function(){U.call(this,"surfaceBlur");this.qD=[new fs([12,56],1,200," px"),new fs([4,13],1,255," px")];
|
|
this.jq()};U.surfaceBlur.prototype=new U;U.surfaceBlur.prototype.ix=function($,o){o[0]=$.Rds.v.val;o[1]=$.Thsh.v};
|
|
U.surfaceBlur.prototype.gQ=function($,o){$.Rds.v.val=o[0];$.Thsh.v=o[1]};U.AdNs=function(){U.call(this,"AdNs");
|
|
this.qD=[new fs([12,57],0,200," %"),new h_([12,58],[[12,59,1],[12,59,0]]),new ad([12,60])];this.jq()};
|
|
U.AdNs.prototype=new U;U.DstS=function(){U.call(this,"DstS");this.qD=[new fs([12,56],1,200," px"),new fs([4,13],1,255," px")];
|
|
this.jq()};U.DstS.prototype=new U;U["Mdn "]=function(){U.call(this,"Mdn ");this.qD=[new fs([12,56],1,200," px")];
|
|
this.jq()};U["Mdn "].prototype=new U;U["Mdn "].prototype.ix=function($,o){o[0]=$.Rds.v.val};U["Mdn "].prototype.gQ=function($,o){$.Rds.v.val=o[0]};
|
|
U.ClrH=function(){U.call(this,"ClrH");this.qD=[new fs([12,56],4,100," px")];for(var f=1;f<4;f++)this.qD.push(new fs("Angle "+f,0,90," \xB0"));
|
|
this.jq()};U.ClrH.prototype=new U;U.ClrH.prototype.ix=function($,o){o[0]=$.Rds.v;for(var f=1;f<4;f++)o[f]=$["Ang"+f].v};
|
|
U.ClrH.prototype.gQ=function($,o){$.Rds.v=o[0];for(var f=1;f<4;f++)$["Ang"+f].v=o[f]};U.ClrH.prototype.f=function(){var $=this.qD;
|
|
$[0].f();for(var f=1;f<4;f++)$[f].yl(aX.get([12,15])+" "+f)};U.Crst=function(){U.call(this,"Crst");this.qD=[new fs([12,61],3,100," px")];
|
|
this.jq()};U.Crst.prototype=new U;U.Crst.prototype.ix=function($,o){o[0]=$.ClSz.v};U.Crst.prototype.gQ=function($,o){$.ClSz.v=o[0]};
|
|
U.Mztn=function(){U.call(this,"Mztn");this.qD.push(new h_([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.Vj="FnDt MdmD GrnD CrsD ShrL MdmL LngL ShSt MdmS LngS".split(" ");this.jq()};U.Mztn.prototype=new U;
|
|
U.Mztn.prototype.ix=function($,o){o[0]=this.Vj.indexOf($.MztT.v.MztT)};U.Mztn.prototype.gQ=function($,o){$.MztT.v.MztT=this.Vj[o[0]]};
|
|
U["Msc "]=function(){U.call(this,"Msc ");this.qD=[new fs([12,61],2,200," px")];this.jq()};U["Msc "].prototype=new U;
|
|
U["Msc "].prototype.ix=function($,o){o[0]=$.ClSz.v.val};U["Msc "].prototype.gQ=function($,o){$.ClSz.v.val=o[0]};
|
|
U.Pntl=function(){U.call(this,"Pntl");this.qD=[new fs([12,61],3,100," px")];this.jq()};U.Pntl.prototype=new U;
|
|
U.Pntl.prototype.ix=function($,o){o[0]=$.ClSz.v};U.Pntl.prototype.gQ=function($,o){$.ClSz.v=o[0]};U.smartSharpen=function(){U.call(this,"smartSharpen");
|
|
this.qD=[new fs([12,57],1,200,"%"),new fs([12,56],0,200,"px",1,!0)];this.jq()};U.smartSharpen.prototype=new U;
|
|
U.smartSharpen.prototype.ix=function($,o){o[0]=$.Amnt.v.val;o[1]=$.Rds.v.val};U.smartSharpen.prototype.gQ=function($,o){$.Amnt.v.val=o[0];
|
|
$.Rds.v.val=o[1]};U.UnsM=function(){U.call(this,"UnsM");this.qD=[new fs([12,57],1,200," %"),new fs([12,56],.1,400,"px",1,!0),new fs([4,13],0,255," ")];
|
|
this.jq()};U.UnsM.prototype=new U;U.HghP=function(){U.call(this,"HghP");this.qD=[new fs([12,56],.1,400,"px",1,!0)];
|
|
this.jq()};U.HghP.prototype=new U;U["Mxm "]=function(){U.call(this,"Mxm ");this.qD=[new fs([12,56],1,200," px")];
|
|
this.jq()};U["Mxm "].prototype=new U;U["Mnm "]=function(){U.call(this,"Mnm ");this.qD=[new fs([12,56],1,200," px")];
|
|
this.jq()};U["Mnm "].prototype=new U;U.Ofst=function(){U.call(this,"Ofst");this.qD=[new fs([22,4,0],-1024,1024," px"),new fs([22,4,1],-1024,1024," px"),new h_([24,18,0],[[24,18,2],[24,18,1],[24,18,3]])];
|
|
this.jq()};U.Ofst.prototype=new U;U.Rept=function(){U.call(this,"Rept");this.qD=[new a4([12,38],1,300," %"),new a4("Row Shift",-50,50," %"),new a4("Space X",-99,200," %"),new a4("Space Y",-99,200," %"),new ad([4,16,2]),new iF([12,15])];
|
|
this.jq()};U.Rept.prototype=new U;U.Rept.prototype.ix=function($,o){o[0]=$.Scl.v.val;o[1]=$.Rsft.v.val;
|
|
o[2]=$.SpcX.v.val;o[3]=$.SpcY.v.val;o[4]=$.SpcC.v;o[5]=$.Angl.v};U.Rept.prototype.gQ=function($,o){$.Scl.v.val=o[0];
|
|
$.Rsft.v.val=o[1];$.SpcX.v.val=o[2];$.SpcY.v.val=o[3];$.SpcC.v=o[4];$.Angl.v=o[5].a4;return $};U.Ctoa=function(){U.call(this,"Ctoa");
|
|
this.qD=[new eB([13,0]),new hJ(!0),new fs(["VAR0 VAR1","Transparency",[4,13]],0,100," %"),new fs(["VAR0 VAR1",[12,0],[4,13]],0,100," %")];
|
|
this.jq()};U.Ctoa.prototype=new U;U.Ctoa.prototype.ix=function($,o){o[0]=$.Clr.v;o[1]=$.Trsp.v.val;o[2]=$.Opct.v.val};
|
|
U.Ctoa.prototype.gQ=function($,o){$.Clr.v=o[0];$.Trsp.v.val=o[1];$.Opct.v.val=o[2]};U.LqFy=function(){U.call(this,"LqFy");
|
|
this.rJ=!1;this.Vs=null;this.aeo=null;this.U=0;this.q={Lp:[[{U:{id:0,name:[24,1,0,1,0],QY:"liq/smudge"}}],[{U:{id:1,name:[24,1,0,1,1],QY:"liq/reconstruct"}}],[{U:{id:2,name:[24,1,0,1,2],QY:"liq/smooth"}}],[{U:{id:3,name:[24,1,0,1,3],QY:"liq/twirl"}}],[{U:{id:4,name:[24,1,0,1,4],QY:"liq/shrink"}}],[{U:{id:5,name:[24,1,0,1,5],QY:"liq/blow"}}],[{U:{id:6,name:[24,1,0,1,6],QY:"liq/pleft"}}],[{U:{id:7,name:"Hand",QY:"tools/hand"}}],[{U:{id:8,name:"Zoom In",QY:"zoomIn"}}],[{U:{id:9,name:"Zoom Out",QY:"zoomOut"}}]],keys:[]};
|
|
this.jH=new cV(this.q,!1);this.jH.WE(0);this.jH.B(H.E.Q,this.ac_,this);this.z9=a8.it();this.pp=null;
|
|
this.jD=[];this.q1=-1;this.rc=null;this.ajs=null;this.CN=null;this.kB=null;this.CY=null;var $=H.z("div","flexrow");
|
|
this.vL=$;this.k.appendChild($);$.appendChild(this.jH.k);this.view=new ap(!0);this.view.RE(100,100);
|
|
this.view.B("mousedown",this.gO,this);this.view.B("mousemove",this.$d,this);this.view.B("mouseup",this.uZ,this);
|
|
this.view.B("zoom",this.Rb,this);$.appendChild(this.view.k);var o=H.z("div","form");$.appendChild(o);
|
|
this.og=o;o.style.width="230px";this.MC=[new fs([12,14,0],0,1e3,null,!1,!0),new fs([12,74],0,100,null,!1,!1),new fs([12,84],0,100,null,!1,!1),new ad([12,46]),new fs([12,0],0,100,null,!1,!1)];
|
|
var T=this.z9.Brsh.v;T.Dmtr.v.val=100;var s=[100,50,100,!1,100];for(var f=0;f<this.MC.length;f++){var E=this.MC[f];
|
|
E.a(s[f]);E.B(H.E.O,this.a2C,this);o.appendChild(E.k)}var e=new hE("Reset",!0,null,!0);e.B("click",this.z7,this);
|
|
o.appendChild(e.k);this.z6=new aI;this.z6.k=H.z("div","floatcont");this.dB=new hE("Menu",!1,null,!0);
|
|
this.dB.B("click",this.agw,this);var n=this.dB.k;n.setAttribute("style","position:absolute; right:13px; top:47px")};
|
|
U.LqFy.prototype=new U;U.LqFy.prototype.n6=function(){return!0};U.LqFy.prototype.uX=function($){this.og.appendChild($)};
|
|
U.LqFy.prototype.agw=function($){var o=this.dB.k.getBoundingClientRect();this.z6.k.appendChild(this.og);
|
|
var T=new x(H.E.Q,!0);T.data={e:H.V.NM,bF:this.z6,x:o.right+o.width-290,y:o.top+o.height};this.J(T)};
|
|
U.LqFy.prototype.Vb=function($){this.rJ=$.L(dN.BJ);var o=D.x5.Vd(this.z9,$);if(o!=null){this.z9=o;this.Rb();
|
|
this.MC[0].a(o.Brsh.v.Dmtr.v.val)}else if($.L(dN.I6)&&$.L(dN.Oa)){var T=this.jD;if($.L(dN.Et)){if(this.q1+1<T.length)this.q1++}else if(this.q1>0)this.q1--;
|
|
this.pp.map=T[this.q1].slice(0);this.iB(null)}else this.view.Vb($)};U.LqFy.prototype.ac_=function($){if($.data.e==H.V.s9){var o=this.U=$.data.U;
|
|
this.jH.WE(this.U);this.view.Vb(o>6?ap.aez(o-7):new dN)}};U.LqFy.prototype.a2C=function($){var o=$.currentTarget,f=this.MC.indexOf(o),T=this.z9.Brsh.v;
|
|
if(f==0){T.Dmtr.v.val=o.v();this.Rb()}if(f>2)this.iB(null)};U.LqFy.prototype.Fa=function(){var $=this.jD;
|
|
this.q1++;$[this.q1]=this.pp.map.slice(0);while($.length>this.q1+1)$.pop();while($.length>50){$=$.slice(1);
|
|
this.q1--}};U.LqFy.prototype.gO=function($){this.hL();this.Vs=this.view.TE();this.aeo=new aY(0,0);this.B(H.E.Oz,this.sm,this)};
|
|
U.LqFy.prototype.$d=function($){var o=this.view.TE(),T=new aY(o.x-this.Vs.x,o.y-this.Vs.y);if(this.U==0||this.U==6)this.ape(T);
|
|
this.Vs=o};U.LqFy.prototype.uZ=function($){this.Fa();this.hL()};U.LqFy.prototype.hL=function(){if(this.zV(H.E.Oz,this.sm))this.removeEventListener(H.E.Oz,this.sm,this)};
|
|
U.LqFy.prototype.sm=function($){if(this.U!=0&&this.U!=6)this.ape(new aY(0,0))};U.LqFy.prototype.ape=function($){var o=this.pp,T=o.N0/this.rc.d,s=this.Vs,E=this.z9.Brsh.v,e=E.Dmtr.v.val,n=Date.now(),A=o.N0,u=o.cQ,Y=Math.sqrt($.x*$.x+$.y*$.y),b=Math.max(1,Math.ceil(Y/2)),a=$.x/b,w=$.y/b,X=s.clone(),N=this.U,z=this.MC[1].v()/100,i=this.MC[2].v()/100,k=[.005,.015,0,0,.2,.2,.01,.01,.05,.35,.1,.1,.005,.015],Q=k[N*2],O=k[N*2+1],c=(1-z)*Q+z*O,B=e*T/2;
|
|
for(var f=0;f<b;f++){var G=[];X.x+=a;X.y+=w;L.zQ.a5X(o.map,A,u,N,X.x*T,X.y*T,B,z,i,a*T,w*T,G,this.rJ);
|
|
L.zQ.a0G(A,u,o.map,G,2*c*i)}var l=new df(0,0,A,u),v=new df(s.x*T,s.y*T,0,0);v.Mi(e*T*.5,e*T*.5);var p=v.clone();
|
|
p.offset($.x*T,$.y*T);v=v.BZ(p);var P=new df(v.x/T,v.y/T,v.d/T,v.w/T);P=L.M.lZ(P).Sr(this.rc);this.iB(P)};
|
|
U.LqFy.prototype.Rb=function(){var $=ih.y8(this.z9,null,this.view.s2().X);this.view.OS($)};U.LqFy.prototype.a=function($,o,T,s,E){T=T.clone();
|
|
if(o==null)return;if(!s.R1(T)){var e=T.BZ(s),n=L.G(e.Y()*4);L.h9(o,T,n,e);o=n;T=e;var A=L.G(e.Y()*4);
|
|
L.h9(E,s,A,e);E=A}T.x=T.y=0;this.CN=o;this.ajs=E;this.CY=o.slice(0);this.kB=o.slice(0);this.rc=T;this.pp=iT.$$(new Uint8Array($.LqMe.v).buffer);
|
|
var u=T.d,Y=T.w;if(this.pp.N0/u<.22){this.pp={N0:Math.floor(u/4),cQ:Math.floor(Y/4)};this.pp.map=new Float32Array(this.pp.N0*this.pp.cQ*2)}this.jD=[];
|
|
this.q1=-1;this.Fa();this.iB(null);this.Rb()};U.LqFy.prototype.v=function(){this.hL();var $=iZ.o_("LqFy"),o=new Uint8Array(iT._i(this.pp)),T=[];
|
|
for(var f=0;f<o.length;f++)T.push(o[f]);$.LqMe.v=T;return $};U.LqFy.prototype.RE=function($,o){this.jH.RE($,o);
|
|
var T=this.dB.k,s=this.og;this.vL.appendChild(s);this.vL.appendChild(T);if($>450&&$-o>200){s.style.marginLeft="1em";
|
|
this.vL.removeChild(T);this.view.RE($-238-45,o)}else{s.style.marginLeft="";this.vL.removeChild(s);this.view.RE($-40,o)}};
|
|
U.LqFy.prototype.f=function(){this.jH.f();for(var f=0;f<this.MC.length;f++)this.MC[f].f()};U.LqFy.prototype.z7=function(){this.hL();
|
|
this.pp.map.fill(0);this.Fa();this.iB(null)};U.LqFy.prototype.iB=function($){var o=this.rc,T=this.CN,s=this.CY,E=this.pp;
|
|
L.zQ.Bp(T,this.kB,o.d,o.w,$,E.map,E.N0,E.cQ,0);if(this.MC[3].Ed()){L.h9(this.ajs,o,s,o,$?$:o);L.R.xE("norm",this.kB,o,s,o,$?$:o,this.MC[4].v()/100)}else L.w0(this.kB,s);
|
|
this.view.a([{Sg:o,data:s.buffer}])};U.GEfc=function(){U.call(this,"GEfc");this.IY=0;this.yw=0;this.CN=null;
|
|
this.CY=null;this.rc=null;this.GH=null;this.oi=null;this.DU=0;var $=H.z("div","flexrow");this.vL=$;this.k.appendChild($);
|
|
this.view=new ap(null);this.view.RE(100,100);$.appendChild(this.view.k);this.xd="";this.qr=270;var o=this.Sd=H.z("div","form scrollable");
|
|
$.appendChild(o);o.setAttribute("style","width:"+this.qr+"px; margin-left:10px");var T=this.gN=H.z("div","form");
|
|
$.appendChild(T);T.setAttribute("style","width:230px; margin-left:1em");this.DL={};for(var s in gH.names){var E=new U.GEfc.tJ(s);
|
|
E.parent=this;this.DL[s]=E;E.B(H.E.O,this.aac,this)}this.s4=!0;this.dB=new hE("Menu",null,null,!0);this.dB.B("click",this.akk,this);
|
|
$.appendChild(this.dB.k);this.lF=new hE(">>",null,null,!0);this.lF.B("click",this.a68,this);T.appendChild(this.lF.k);
|
|
this.K8=H.z("div");this.K8.setAttribute("style","margin-bottom:1.5em; display:inline-block; width:calc(100% - 40px);");
|
|
T.appendChild(this.K8);this.bL=H.z("div");this.bL.style.minHeight="14em";this.bL.style.marginBottom="1em";
|
|
T.appendChild(this.bL);this.ZC=H.z("div","lpbody scrollable");this.si=H.z("div","lpfoot");T.appendChild(this.ZC);
|
|
T.appendChild(this.si);this.B("click",this.ams,this);this.uO=[];am.eR([[5,3],[5,4]],this.uO,this.si,this.s6.bind(this))};
|
|
U.GEfc.prototype=new U;U.GEfc.prototype.n6=function(){return!0};U.GEfc.prototype.uX=function($){this.K8.appendChild($)};
|
|
U.GEfc.prototype.YE=function($,o){this.GH=$};U.GEfc.prototype.a68=function($){var o=this.Sd.style.display!="none";
|
|
this.Sd.style.display=o?"none":"";this.lF.yl(o?"<<":">>");this.RE()};U.GEfc.prototype.akk=function($){this.s4=!this.s4;
|
|
this.RE()};U.GEfc.prototype.RE=function($,o){var T=this.Sd.style.display!="none";if($!=null){this.IY=$;
|
|
this.yw=o;if($<1e3&&T||$>=1e3&&!T){this.a68();T=!T}this.s4=$>600}else{$=this.IY;o=this.yw}var s=this.s4?240+(T?this.qr+10:0):0;
|
|
if(H.ni(this.gN)&&!this.s4){this.vL.removeChild(this.Sd);this.vL.removeChild(this.gN)}if(!H.ni(this.gN)&&this.s4){this.vL.appendChild(this.Sd);
|
|
this.vL.appendChild(this.gN)}this.Sd.style.height=o+"px";this.view.RE($-s,o);this.ZC.style.height=o-this.bL.getBoundingClientRect().height-96+"px";
|
|
this.dB.k.setAttribute("style","position:absolute; top:46px; right:"+(s+16)+"px")};U.GEfc.prototype.anw=function(){var $=eY.ME.get("img/beach",!0)[0],o=$.Sg,T=this.Sd,s=Math.floor(H.K()*(this.qr-40)/3),E=~~(s*.7),e=new df(0,0,s,E),n=L.G(s*E*4),A=n.slice(0),u=Math.round(10*H.K()),Y=new ImageData(new Uint8ClampedArray(A.buffer),s,E);
|
|
L.h9(new Uint8Array($.data),o,n,new df(Math.round((o.d-s)/2),Math.round((o.w-E)/2),s,E));var b=H.z("canvas"),a=b.getContext("2d");
|
|
b.width=s;b.height=E+Math.round(u*1.5);a.font=u+"px sans-serif";this.qa={};var w=this.akd.bind(this);
|
|
for(var f=0;f<gH.WK.length;f++){var X=gH.WK[f],N=H.z("div");T.appendChild(N);N.setAttribute("style","background-color:rgba(0,0,0,0.2); padding:0px 8px; margin-bottom:8px");
|
|
N.textContent=aX.get(X);for(var z in gH.names){var i=gH.names[z];if(i[0]!=f)continue;gH.AY(z,{rect:e,buffer:n},gH.o_(z),{i:0,m:0,P:0},{i:255,m:255,P:255},{rect:e,buffer:A},{});
|
|
a.fillStyle="black";a.fillRect(0,0,500,500);a.putImageData(Y,0,0);var k=aX.get(i[1]);a.fillStyle="white";
|
|
a.fillText(k,(s-a.measureText(k).width)/2,E+Math.round(u*1.1));var Q=H.z("div");T.appendChild(Q);Q.setAttribute("style","display:inline-block; cursor:pointer; padding: 5px 5px 0 5px; margin-bottom:5px");
|
|
Q.addEventListener("click",w,!1);var N=H.z("img");Q.appendChild(N);N.setAttribute("src",b.toDataURL());
|
|
N.setAttribute("style","width:"+s/H.K()+"px; margin-bottom:0px;");this.qa[z]=Q}}};U.GEfc.prototype.akd=function($){var o;
|
|
for(var T in this.qa)if(this.qa[T]==$.currentTarget)this.xd=T;this.aac()};U.GEfc.prototype.s6=function($){var o=am.nL(this.uO,$),T=this.oi.GEfs.v,s=T[this.DU].v;
|
|
if(o==0){T.push(JSON.parse(JSON.stringify(T[this.DU])));this.DU=T.length-1}else if(T.length>1){T.splice(this.DU,1);
|
|
if(this.DU==T.length)this.DU--}this.Hq();this.iB()};U.GEfc.prototype.aac=function($){var o=this.xd,T;
|
|
if($==null)T=gH.o_(o);else T=this.DL[o].v();this.oi.GEfs.v[this.DU].v=T;this.Hq();this.iB()};U.GEfc.prototype.a=function($,o,T,s,E){if(this.qa==null)this.anw();
|
|
$=this.oi=JSON.parse(JSON.stringify($));if($.GEfs==null)$=this.oi={__name:"Filter Gallery",classID:"GEfc",GEfs:{t:"VlLs",v:[{t:"Objc",v:$}]}};
|
|
var e=$.GEfs.v;for(var f=0;f<e.length;f++)if(e[f].v.GELv==null)e[f].v.GELv={t:"bool",v:!0};this.DU=e.length-1;
|
|
this.Hq();T=T.clone();if(o==null)return;if(!s.R1(T)&&gH.Rn($).x!=0){var n=T.BZ(s),A=L.G(n.Y()*4);L.h9(o,T,A,n);
|
|
o=A;T=n}T.x=T.y=0;this.CN=o;this.CY=o.slice(0);this.rc=T;this.iB()};U.GEfc.prototype.ams=function($){var o=$.data,f=o.II,T=this.oi.GEfs.v;
|
|
if(o.s_){T[f].v.GELv.v=!T[f].v.GELv.v;this.iB()}else this.DU=f;this.Hq()};U.GEfc.prototype.Hq=function(){var $=this.oi.GEfs.v,o=$[this.DU].v,T=o.GEfk.v.GEft,s=this.bL;
|
|
if(gH.names[T]==null){alert("Unsupported gallery filter");H.Ft(s)}else{this.xd=T;for(var E in this.qa)H.oX(this.qa[E],"selected");
|
|
H.v2(this.qa[T],"selected");var e=this.DL[T];e.a(o);if(s.firstChild!=e.k){H.Ft(s);s.appendChild(e.k)}}var n=[];
|
|
for(var f=0;f<$.length;f++){var A=$[f].v,u=gH.names[A.GEfk.v.GEft],Y=new io(f,!0,!0,null,u?u[1]:"Filter",f==this.DU,A.GELv.v);
|
|
Y.parent=this;n.push(Y.k)}H.Ft(this.ZC);n.reverse();for(var f=0;f<n.length;f++)this.ZC.appendChild(n[f]);
|
|
this.RE()};U.GEfc.prototype.v=function(){return JSON.parse(JSON.stringify(this.oi))};U.GEfc.prototype.iB=function($){var o=this.rc,T=this.CN,s=this.CY,E=this.xd,e=this.oi,n=this.GH;
|
|
function A(u){return{i:u>>>16,m:u>>>8&255,P:u&255}}iZ.AY("GEfc",{rect:this.rc,buffer:this.CN},e,A(n.z4),A(n.GR),{rect:this.rc,buffer:this.CY},null);
|
|
this.view.a([{Sg:o,data:s.buffer}])};U.GEfc.prototype.f=function(){for(var $ in this.DL)this.DL[$].f();
|
|
am.Om(this.uO,["lrs/newlayer","lrs/bin"])};U.GEfc.tJ=function($){aI.call(this);this.RG=$;this.k=H.z("div");
|
|
this.gX={};var o=gH.o_($);for(var T in o){var s=null;if(T=="__name"||T=="classID"||T=="GEfk"||T=="GELv"||["FlRs"].indexOf(T)!=-1)continue;
|
|
else if(T=="EdgW")s=new fs("Edge Width",1,14);else if(T=="EdgB")s=new fs("Edge Brightness",0,$=="AccE"?50:20);
|
|
else if(T=="Smth")s=new fs([19,3,3],1,$=="Stmp"?50:15);else if(T=="ClSz")s=new fs([12,61],3,100);else if(T=="BrdT")s=new fs([7,9],1,20);
|
|
else if(T=="HghS")s=new fs([12,64],0,20);else if(T=="HlSz")s=new fs([12,14,0],1,15);else if(T=="Cntr")s=new fs([12,3,0],0,$=="WtrP"?100:50);
|
|
else if(T=="Shrp")s=new fs("Sharpness",0,40);else if(T=="SprR")s=new fs("Spray Radius",0,25);else if(T=="LgDr")s=new fs("Light/Dark Balance",0,$=="Stmp"?50:100);
|
|
else if(T=="Drkn")s=new fs("Darkness",1,50);else if(T=="Dstr")s=new fs("Distortion",0,20);else if(T=="Scln")s=new fs([12,38],50,200);
|
|
else if(T=="Rlf")s=new fs("Relief",0,$=="Ptch"||$=="NtPr"?25:50);else if(T=="ChAm")s=new fs("Thickness",1,7);
|
|
else if(T=="Pncl")s=new fs([19,2,5],1,30);else if(T=="StrP")s=new fs("Stroke Pressure",0,15);else if(T=="PprB")s=new fs("Paper Brightness",0,50);
|
|
else if(T=="BrsS")s=new fs("Brush Size",0,10);else if(T=="BrsD")s=new fs("Brush Detail",0,10);else if(T=="Txtr")s=new fs([12,67],1,3);
|
|
else if(T=="Grn")s=new fs("Grain",0,20);else if(T=="HghA")s=new fs("Highlight Area",0,20);else if(T=="Intn")s=new fs("Intensity",0,10);
|
|
else if(T=="Brgh")s=new fs("Glow Brightness",0,$=="WtrP"?100:50);else if(T=="StrS")s=new fs("Stroke Size",1,50);
|
|
else if(T=="StDt")s=new fs("Stroke Detail",1,3);else if(T=="Sftn")s=new fs("Softness",0,10);else if(T=="EdgT")s=new fs("Edge Thickness",0,10);
|
|
else if(T=="EdgI")s=new fs("Edge Intensity",0,10);else if(T=="Pstr")s=new fs("Posterization",0,6);else if(T=="Dfnt")s=new fs("Definition",0,25);
|
|
else if(T=="TxtC")s=new fs("Texture Coverage",0,50);else if(T=="ShdI")s=new fs("Shadow Intensity",0,10);
|
|
else if(T=="DrcB")s=new fs("Direction Balance",0,100);else if(T=="Strg")s=new fs([12,64],1,3);else if(T=="Blnc")s=new fs("Balance",0,10);
|
|
else if(T=="BlcI")s=new fs("Black Intensity",0,10);else if(T=="WhtI")s=new fs("White Intensity",0,10);
|
|
else if(T=="DrkI")s=new fs("Dark Intensity",0,50);else if(T=="LghI")s=new fs("Light Intensity",0,50);
|
|
else if(T=="StrW")s=new fs("Stroke Width",3,15);else if(T=="Grns")s=new fs("Graininess",0,$=="NtPr"?20:10);
|
|
else if(T=="GlwA")s=new fs("Glow Amount",0,20);else if(T=="ClrA")s=new fs("Clear Amount",0,20);else if(T=="ChrA")s=new fs("Charcoal Area",0,20);
|
|
else if(T=="ChlA")s=new fs("Chalk Area",0,20);else if(T=="FrgL")s=new fs("Foreground Level",1,15);else if(T=="BckL")s=new fs("Background Level",1,15);
|
|
else if(T=="WhtL")s=new fs("Background Level",0,50);else if(T=="BlcL")s=new fs("Foreground Level",0,50);
|
|
else if(T=="ImgB")s=new fs("Image Balance",0,50);else if(T=="Dnst")s=new fs([12,74],0,50);else if(T=="FbrL")s=new fs("Fiber Length",3,50);
|
|
else if(T=="CrcS")s=new fs("Crack Sapcing",2,100);else if(T=="CrcD")s=new fs("Crack Depth",0,10);else if(T=="CrcB")s=new fs("Crack Brightness",0,10);
|
|
else if(T=="TlSz")s=new fs("Tile Size",2,100);else if(T=="GrtW")s=new fs("Grout Width",1,15);else if(T=="LghG")s=new fs("Lighten Grout",0,10);
|
|
else if(T=="SqrS")s=new fs("Square Size",0,10);else if(T=="RplS")s=new fs("Ripple Size",1,15);else if(T=="RplM")s=new fs("Ripple Magnitude",0,20);
|
|
else if(T=="NmbL")s=new fs("Number of Levels",2,8);else if(T=="EdgS")s=new fs("Edge Simplicity",0,10);
|
|
else if(T=="EdgF")s=new fs("Edge Fidelity",1,3);else if(T=="Sz")s=$=="NGlw"?new fs("Glow Size",-24,24):new fs([12,14,0],1,50);
|
|
else if(T=="Dtl")s=$=="Chrc"?new fs("Detail",0,5):new fs("Detail",1,15);else if(T=="StrL")s=$=="InkO"?new fs("Stroke Length",1,50):new fs("Stroke Length",0,20);
|
|
else if(T=="TxtT")s=new h_([12,67],"Blocks,Canvas,Frosted,Tiny Lens,Bricks,Burlap,Sandstone".split(","));
|
|
else if(T=="BrsT")s=new h_("Brush type","Simple,Light Rough,Dark Rough,Wide Sharp,Wide Blurry,Sparkle".split(","));
|
|
else if(T=="Grnt")s=new h_("Grain Type","Regular Soft Sprinkles Clumped Contrasty Enlarged Stippled Horizontal Vertical Speckle".split(" "));
|
|
else if(T=="SDir")s=new h_([12,33],["Right Diagonal","Horizontal","Left Diagonal","Vertical"]);else if(T=="ScrT")s=new h_([12,62],["Circle","Dot",[10,35]]);
|
|
else if(T=="LghD"||T=="LghP")s=new h_("Light","Bottom,Bottom Left,Left,Top Left,Top,Top Right,Right,Bottom Right".split(","));
|
|
else if(T=="Clr")s=new hJ("Glow Color");else if(T=="InvT")s=new ad([4,11]);else console.log(T);s.B(H.E.O,this.tm,this);
|
|
s.parent=this;this.gX[T]=s;this.k.appendChild(s.k)}};U.GEfc.tJ.prototype=new aI;U.GEfc.tJ.prototype.tm=function($){this.J(new x(H.E.O,!1))};
|
|
U.GEfc.aqj="Sz Dtl Shrp EdgW EdgB Smth ClSz BrdT HghS HlSz Cntr SprR StrL LgDr Drkn Dstr Scln Rlf ChAm InvT RplS RplM Pncl StrP PprB BrsS BrsD Txtr Grn HghA Intn Brgh Clr StrS StDt Sftn EdgT EdgI Pstr Dfnt TxtC ShdI DrcB Strg Blnc BlcI WhtI DrkI LghI StrW Grns GlwA ClrA ChrA ChlA FrgL BckL WhtL BlcL ImgB Dnst FbrL CrcS CrcD CrcB TlSz GrtW LghG SqrS NmbL EdgS EdgF".split(" ");
|
|
U.GEfc.tJ.prototype.a=function($){for(var o in this.gX){var T;if(U.GEfc.aqj.indexOf(o)!=-1)T=$[o].v;
|
|
else if(o=="TxtT")T=gH.he.indexOf($[o].v[o]);else if(o=="BrsT")T=gH.Xt.indexOf($[o].v[o]);else if(o=="LghD")T=gH.Gs.indexOf($[o].v[o]);
|
|
else if(o=="LghP")T=gH.Pn.indexOf($[o].v[o]);else if(o=="Grnt")T=gH.vf.indexOf($[o].v[o]);else if(o=="ScrT")T=gH.FX.indexOf($[o].v[o]);
|
|
else if(o=="SDir")T=gH.QR.indexOf($[o].v.StrD);this.gX[o].a(T)}};U.GEfc.tJ.prototype.v=function(){var $=gH.o_(this.RG);
|
|
for(var o in this.gX){var T=this.gX[o].v();if(U.GEfc.aqj.indexOf(o)!=-1)$[o].v=T;else if(o=="TxtT")$[o].v[o]=gH.he[T];
|
|
else if(o=="BrsT")$[o].v[o]=gH.Xt[T];else if(o=="LghD")$[o].v[o]=gH.Gs[T];else if(o=="LghP")$[o].v[o]=gH.Pn[T];
|
|
else if(o=="Grnt")$[o].v[o]=gH.vf[T];else if(o=="ScrT")$[o].v[o]=gH.FX[T];else if(o=="SDir")$[o].v.StrD=gH.QR[T]}return $};
|
|
U.GEfc.tJ.prototype.f=function(){for(var $ in this.gX)this.gX[$].f()};U.blnc=function(){U.call(this);
|
|
var $=this.k;this.q9=null;this.jW=new h_([12,12],[[19,6,0],[19,6,1],[19,6,2]]);this.jW.B(H.E.O,this.iB,this);
|
|
$.appendChild(this.jW.k);this.Pa=[];for(var f=0;f<3;f++){var o=new fs(dq.nk[f],-100,100);o.B(H.E.O,this.Ut,this);
|
|
this.Pa.push(o);$.appendChild(o.k)}this.RD=new ad([13,4]);this.RD.B(H.E.O,this.Ut,this);$.appendChild(this.RD.k)};
|
|
U.blnc.prototype=new U;U.blnc.prototype.f=function(){this.jW.f();for(var f=0;f<3;f++)this.Pa[f].f();
|
|
this.RD.f()};U.blnc.prototype.a=function($){this.q9=JSON.parse(JSON.stringify($));this.iB()};U.blnc.prototype.v=function($){var o=["ShdL","MdtL","HghL"],T=this.q9[o[this.jW.v()]].v;
|
|
for(var f=0;f<3;f++)T[f].v=this.Pa[f].v();this.q9.PrsL.v=this.RD.v();return JSON.parse(JSON.stringify(this.q9))};
|
|
U.blnc.prototype.iB=function($){var o=["ShdL","MdtL","HghL"],T=this.q9[o[this.jW.v()]].v;for(var f=0;
|
|
f<3;f++)this.Pa[f].a(T[f].v);this.RD.a(this.q9.PrsL.v)};U.brit=function(){U.call(this,"brit");this.qD.push(new fs([12,2],-150,150,""));
|
|
this.qD.push(new fs([12,3,0],-100,100,""));this.qD.push(new ad([12,3,1]));this.jq()};U.brit.prototype=new U;
|
|
U.brit.prototype.ix=function($,o){o[0]=$.Brgh?$.Brgh.v:0;o[1]=$.Cntr?$.Cntr.v:0;o[2]=$.useLegacy?$.useLegacy.v:!1};
|
|
U.brit.prototype.gQ=function($,o){$.Brgh.v=o[0];$.Cntr.v=o[1];$.useLegacy.v=o[2]};U.curv=function(){U.call(this);
|
|
this.value=null;this.Nz=null;var $=this.k;this.qx=new h_([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5]]);
|
|
this.qx.B(H.E.O,this.bT,this);$.appendChild(this.qx.k);this.qW=new h_(null,["Spline","Sketch"]);this.qW.B(H.E.O,this.a4Q,this);
|
|
$.appendChild(this.qW.k);this.AN=new gj;this.AN.B(H.E.O,this.Yj,this);$.appendChild(this.AN.k);this.uC=null;
|
|
this.akR=0;this.ZK=0;this.kS=new bI("Sample from image",["-\u2195","#000000","#888888","#ffffff"]);$.appendChild(this.kS.k)};
|
|
U.curv.prototype=new U;U.curv.prototype.f=function(){this.qx.f()};U.curv.prototype.a4Q=function($){var o=eJ.sk(this.value,0),T=o.length==256?1:0,s=this.qW.v();
|
|
if(T==s)return;var E=iZ.o_("curv");if(s==1){var e=[];for(var f=0;f<256;f++)e.push(f);eJ.cI(E,0,e)}this.a(E);
|
|
this.Ut()};U.curv.prototype.Yj=function(){eJ.cI(this.value,this.qx.v(),this.AN.v());this.Ut()};U.curv.prototype.bT=function(){var $=this.qx.v(),o=eJ.sk(this.value,$),T=o.length==256?1:0;
|
|
this.qW.a(T);if(this.Nz)this.AN.VY(this.Nz[$],this.Nz[4]*[1,.33,.33,.33][$],["#ccc","#fcc","#cfc","#ccf"][$]);
|
|
this.AN.a(o)};U.curv.prototype.WR=function(){return!0};U.curv.prototype.iO=function($,o,T,s,E){var e=this.value;
|
|
this.value=iZ.o_("curv");this.Ut();var n=D.iK.v0($,E,1),A=this.uC=[n>>>16&255,n>>>8&255,n&255];this.akR=E.y;
|
|
if(this.kS.v()==0){var u=(A[0]+A[1]+A[2])/3,Y=this.qx.v(),b=eJ.sk(e,Y),a=Y==0?u:A[Y-1],w=-1;for(var f=0;
|
|
f<b.length;f++)if(b[f].v.Hrzn.v==a)w=f;if(w==-1){var X=JSON.parse(JSON.stringify(b[0]));X.v.Hrzn.v=a;
|
|
X.v.Vrtc.v=a;b.push(X);b.sort(function(N,z){return N.v.Hrzn.v-z.v.Hrzn.v});eJ.cI(e,Y,b);this.ZK=b.indexOf(X)}else this.ZK=w}this.a(e);
|
|
this.Ut()};U.curv.prototype.ZS=function($,o,T,s,E){if(this.uC==null)return;if(this.kS.v()==0){var e=this.value,n=this.qx.v(),A=eJ.sk(e,n),u=A[this.ZK];
|
|
u.v.Vrtc.v=Math.max(0,Math.min(255,Math.round(u.v.Hrzn.v+(this.akR-E.y))));eJ.cI(e,n,A);this.a(e);this.Ut()}};
|
|
U.curv.prototype.yg=function($,o,T,s,E){var e=this.value,n=this.uC,A=(n[0]+n[1]+n[2])/3,u=this.kS.v()-1;
|
|
if(u==-1){}else for(var f=0;f<3;f++){var Y=eJ.sk(e,1+f);if(u==0)Y[0].v.Hrzn.v=n[f];if(u==1){var b=Math.log(n[f]/255)/Math.log(A/255),a=Math.min(999,Math.max(10,Math.round(100*b)));
|
|
if(Y.length==2)Y.splice(1,0,JSON.parse(JSON.stringify(Y[0])));Y[1].v.Hrzn.v=127-Math.log(a/100)*127;
|
|
Y[1].v.Vrtc.v=127}if(u==2)Y[Y.length-1].v.Hrzn.v=n[f];eJ.cI(e,1+f,Y)}this.a(e);this.Ut();this.uC=null};
|
|
U.curv.prototype.a=function($){this.value=$;this.bT()};U.curv.prototype.VY=function($){this.Nz=$;this.bT()};
|
|
U.curv.prototype.v=function($){return JSON.parse(JSON.stringify(this.value))};U.expA=function(){U.call(this,"expA");
|
|
this.qD.push(new fs([12,5],-20,20,null,3));this.qD.push(new fs([12,6],-.5,.5,null,3));this.qD.push(new fs([12,7],.01,6.99,null,3));
|
|
this.jq()};U.expA.prototype=new U;U.expA.prototype.ix=function($,o){o[0]=$.Exps.v;o[1]=$.Ofst.v;o[2]=$.gammaCorrection.v};
|
|
U.expA.prototype.gQ=function($,o){$.Exps.v=o[0];$.Ofst.v=o[1];$.gammaCorrection.v=o[2]};U.grdm=function(){U.call(this,"grdm");
|
|
this.qD.push(new dU(!0,null,!0));this.qD.push(new ad([12,23,0]));this.jq()};U.grdm.prototype=new U;U.grdm.prototype.ix=function($,o){o[0]=$.Grad.v;
|
|
o[1]=$.Rvrs?$.Rvrs.v:!1};U.grdm.prototype.gQ=function($,o){$.Grad.v=o[0];$.Rvrs={t:"bool",v:o[1]}};U.grdm.prototype.YE=function($,o){this.qD[0].zL($.z4,$.GR);
|
|
if(o==gr.zo||o==gr.ux||o==gr.HZ)this.qD[0].bq($.hD)};U.selc=function(){U.call(this);var $=this.k;this.I5=[];
|
|
this.Gx=null;this.jW=new h_([12,82],dq.Gc.concat([[13,1,8],[13,1,13],[13,1,10]]));this.jW.B(H.E.O,this.tm,this);
|
|
$.appendChild(this.jW.k);for(var f=0;f<4;f++){var o=new fs(dq.a44[f],-100,100,"%");o.B(H.E.O,this.tm,this);
|
|
this.I5.push(o);$.appendChild(o.k)}this.OL=new ad([13,3]);$.appendChild(this.OL.k);this.OL.B(H.E.O,this.tm,this)};
|
|
U.selc.prototype=new U;U.selc.prototype.f=function(){this.jW.f();this.OL.f();for(var f=0;f<4;f++)this.I5[f].f()};
|
|
U.selc.prototype.a=function($){this.Gx=JSON.parse(JSON.stringify($));this.iB()};U.selc.prototype.v=function($){return JSON.parse(JSON.stringify(this.Gx))};
|
|
U.selc.prototype.tm=function($){if($.target!=this.jW){var o=this.Gx,T=[];for(var f=0;f<4;f++)T[f]=this.I5[f].v();
|
|
de.cI(o,this.jW.v(),T);o.Mthd={t:"enum",v:{CrcM:this.OL.v()?"Absl":"Rltv"}}}this.iB();this.Ut()};U.selc.prototype.iB=function(){var $=this.Gx,o=de.sk($,this.jW.v());
|
|
for(var f=0;f<4;f++)this.I5[f].a(o[f]);this.OL.a($.Mthd?$.Mthd.v.CrcM=="Absl":!1)};U.blwh=function(){U.call(this,"blwh");
|
|
this.qD.push(new ad([12,11]));this.qD.push(new hJ(!0));for(var f=0;f<6;f++)this.qD.push(new fs(dq.Gc[f],-200,300));
|
|
this.jq()};U.blwh.prototype=new U;U.blwh.prototype.ix=function($,o){o[0]=$.useTint.v;o[1]=$.tintColor.v;
|
|
var T="Rd Yllw Grn Cyn Bl Mgnt".split(" ");for(var f=0;f<6;f++)o[2+f]=$[T[f]].v};U.blwh.prototype.gQ=function($,o){$.useTint.v=o[0];
|
|
$.tintColor.v=o[1];var T="Rd Yllw Grn Cyn Bl Mgnt".split(" ");for(var f=0;f<6;f++)$[T[f]].v=o[2+f]};
|
|
U.hue2=function(){U.call(this);this.value=null;this.zd=null;this.a4X=null;var $=this.k;this.jW=new h_([12,12],["Master"].concat(dq.Gc));
|
|
this.jW.B(H.E.O,this.bT,this);$.appendChild(this.jW.k);this.ey=new fs([12,8],-180,180);this.ey.B(H.E.O,this.Jj,this);
|
|
$.appendChild(this.ey.k);this.ZJ=new fs([12,9],-100,100);this.ZJ.B(H.E.O,this.Jj,this);$.appendChild(this.ZJ.k);
|
|
this.I1=new fs([12,10],-100,100);this.I1.B(H.E.O,this.Jj,this);$.appendChild(this.I1.k);this.ue=new ad([12,11]);
|
|
this.ue.B(H.E.O,this.aoM,this);$.appendChild(this.ue.k);this.a6L=new eB("...",!0);$.appendChild(this.a6L.k)};
|
|
U.hue2.prototype=new U;U.hue2.prototype.f=function(){this.ey.f();this.ZJ.f();this.I1.f();this.ue.f();
|
|
this.jW.f()};U.hue2.prototype.aoM=function($){var o=this.ue.v();this.value.Clrz.v=o;if(o)this.jW.a(0);
|
|
this.bT();this.Ut()};U.hue2.prototype.Jj=function($){var o=this.value.Clrz.v,T=this.jW.v(),s=gK.sk(this.value,T),E=T==0?s:s.Pa;
|
|
E[0]=this.ey.v();var e=this.ZJ.v();E[1]=o?Math.max(0,e):e;E[2]=this.I1.v();gK.cI(this.value,T,s);this.bT();
|
|
this.Ut()};U.hue2.prototype.bT=function(){var $=this.value.Clrz?this.value.Clrz.v:!1,E="";this.ue.a($);
|
|
if($)this.jW.v9();else this.jW.wI();var o=this.jW.v(),T=gK.sk(this.value,o),s=o==0?T:T.Pa;this.ey.a(s[0]);
|
|
this.ZJ.a(s[1]);this.I1.a(s[2]);if(!$){E+=aX.get([5,8])+": ";var o=this.jW.v();if(o==0)E+=aX.get([13,2]);
|
|
else E+=T.hG}this.a6L.a(E)};U.hue2.prototype.WR=function(){return!0};U.hue2.prototype.iO=function($,o,T,s,E){var e=this.value;
|
|
this.value=iZ.o_("hue2");this.Ut();var n=D.iK.v0($,E,1),A=[n>>>16&255,n>>>8&255,n&255],u=L.sY(A[0]/255,A[1]/255,A[2]/255);
|
|
this.jW.a(1+Math.round(u.cQ*6)%6);this.a(e);this.Ut();this.zd=E.x;this.a4X=this.ZJ.v()};U.hue2.prototype.ZS=function($,o,T,s,E){if(this.zd!=null){var e=E.x-this.zd;
|
|
e=Math.max(-100,Math.min(100,this.a4X+.5*e));this.ZJ.a(e);this.Jj()}};U.hue2.prototype.yg=function($,o,T,s,E){this.zd=null};
|
|
U.hue2.prototype.a=function($){this.value=JSON.parse(JSON.stringify($));this.bT()};U.hue2.prototype.v=function($){return JSON.parse(JSON.stringify(this.value))};
|
|
U.levl=function(){U.call(this);this.value=null;this.Nz=null;this.SF=[new aY(0,0),new aY(0,0),new aY(0,0),new aY(0,0),new aY(0,0)];
|
|
this.zC=-1;this.hx=this.LO.bind(this);this.jF=this.AK.bind(this);var $=this.k;this.qx=new h_([12,4],["RGB",[13,1,1],[13,1,4],[13,1,5]]);
|
|
this.qx.B(H.E.O,this.bT,this);$.appendChild(this.qx.k);var o=H.z("div","");$.appendChild(o);var T=H.z("div","");
|
|
$.appendChild(T);this.S=H.z("canvas");o.appendChild(this.S);this.V8=this.S.getContext("2d");this.J8=new aY(256,120);
|
|
this.S.setAttribute("style","display:block");H.QE(this.S,this.J8.x,this.J8.y,this.V8);H.fb(this.S);H.uE(this.S,this.go.bind(this));
|
|
this.OF=H.z("canvas","");T.appendChild(this.OF);this.Ua=this.OF.getContext("2d");this.x4=new aY(this.J8.x,40);
|
|
this.OF.setAttribute("style","display:block");H.QE(this.OF,this.x4.x,this.x4.y,this.Ua);H.fb(this.OF);
|
|
H.uE(this.OF,this.a5h.bind(this));var s=this.aeH=[];for(var f=0;f<5;f++){var E=new d_(null,null,3);s.push(E);
|
|
E.B(H.E.O,this.apr,this);(f<2||f==4?o:T).appendChild(E.k)}o.appendChild(s[1].k);s[4].k.setAttribute("style","margin: 0 4.7em");
|
|
s[3].k.setAttribute("style","margin:0 0 0 13em");this.kS=new bI("Sample from image",["#000000","#888888","#ffffff"]);
|
|
$.appendChild(this.kS.k)};U.levl.prototype=new U;U.levl.prototype.f=function(){this.qx.f()};U.levl.prototype.apr=function($){var o=[];
|
|
for(var f=0;f<5;f++){var T=255,s=1;if(f==4){T=999;s=100}var E=parseFloat(this.aeH[f].v());o[f]=Math.max(0,Math.min(T,E*s))}cb.cI(this.value,this.qx.v(),o);
|
|
this.bT();this.Ut()};U.levl.prototype.bT=function($){var o=this.J8.x,T=this.J8.y,s=this.qx.v(),E=this.V8;
|
|
E.clearRect(0,0,o,T);E.fillStyle="#cccccc";E.fillRect(8,8,o-16,T-16-8);if(this.Nz){if(s==0){this.Nz[0].fill(0);
|
|
var e=JSON.parse(JSON.stringify(this.value));cb.cI(e,0,[0,255,0,255,100]);var n=dq.Za("levl",e),A=[n.tV,n.wF,n._6];
|
|
for(var u=0;u<3;u++){var Y=this.Nz[1+u],b=A[u];for(var f=0;f<256;f++)this.Nz[0][b[f]]+=Y[f]}}var a=this.Nz[s],w=0;
|
|
for(var f=0;f<a.length;f++)w+=a[f];E.fillStyle="#333333";E.beginPath();E.moveTo(8,T-16);for(var f=0;
|
|
f<256;f++){var X=55*a[f]/w;E.lineTo(8+f/256*(o-16),Math.max(8,T-16-T*X))}E.lineTo(o-8,T-16);E.closePath();
|
|
E.fill()}var N=cb.sk(this.value,s);for(var f=0;f<5;f++)this.aeH[f].a(N[f]/(f==4?100:1));this.SF[0].A5(8+N[0]/255*(o-16),T-14);
|
|
this.SF[1].A5(8+N[1]/255*(o-16),T-14);var z=Math.log(N[4]/100)/Math.log(9.99);z=.5-z/2;this.SF[4].A5(this.SF[0].x+z*(this.SF[1].x-this.SF[0].x),T-14);
|
|
this.cz(E,this.SF[0],"#000000");this.cz(E,this.SF[1],"#ffffff");this.cz(E,this.SF[4],"#777777");var o=this.x4.x,T=this.x4.y;
|
|
E=this.Ua;E.clearRect(0,0,o,T);var i=E.createLinearGradient(0,0,o-16,0);i.addColorStop(0,"black");i.addColorStop(1,"white");
|
|
E.fillStyle=i;E.fillRect(8,8,o-16,16);this.SF[2].A5(8+N[2]/255*(o-16),T-14);this.SF[3].A5(8+N[3]/255*(o-16),T-14);
|
|
this.cz(E,this.SF[2],"#000000");this.cz(E,this.SF[3],"#ffffff")};U.levl.prototype.cz=function($,o,T){$.fillStyle=T;
|
|
$.fillRect(o.x-5,o.y,10,10)};U.levl.prototype.go=function($){var o=H.DQ($,this.S),T=this.a9u([0,1,4],o);
|
|
if(T!=-1)this.zC=T;this.a1O()};U.levl.prototype.a5h=function($){var o=H.DQ($,this.OF),T=this.a9u([2,3],o);
|
|
if(T!=-1)this.zC=T;this.a1O()};U.levl.prototype.a9u=function($,o){var T=-1,s=1e9;for(var f=0;f<$.length;
|
|
f++){var E=Math.abs(this.SF[$[f]].x-o.x);if(E<s){s=E;T=$[f]}}return s<16?T:-1};U.levl.prototype.a1O=function($){if(this.zC==-1)return;
|
|
H.mW(document.body,this.hx);H.aa(document.body,this.jF)};U.levl.prototype.LO=function($){var o=cb.sk(this.value,this.qx.v()),T=H.DQ($,this.zC==2&&this.zC==3?this.OF:this.S),s=255*(T.x-8)/(this.J8.x-16);
|
|
s=Math.max(0,Math.min(255,s));if(this.zC==0)s=Math.min(s,o[1]-2);if(this.zC==1)s=Math.max(s,o[0]+2);
|
|
if(this.zC!=4)o[this.zC]=Math.round(s);else{var E=(s-o[0])/(o[1]-o[0]);E=1-2*E;E=Math.pow(9.99,E);o[4]=Math.min(999,Math.max(10,Math.round(E*100)))}cb.cI(this.value,this.qx.v(),o);
|
|
this.bT();this.Ut()};U.levl.prototype.AK=function($){H.vY(document.body,this.hx);H.SY(document.body,this.jF);
|
|
this.zC=-1};U.levl.prototype.WR=function(){return!0};U.levl.prototype.yg=function($,o,T,s,E){var e=this.value,n=this.kS.v();
|
|
this.value=iZ.o_("levl");this.Ut();var A=D.iK.v0($,E,1),u=[A>>>16&255,A>>>8&255,A&255];for(var f=0;f<3;
|
|
f++){var Y=cb.sk(e,1+f);if(n==0)Y[0]=u[f];if(n==1){var b=Math.log(u[f]/255)/Math.log((u[0]+u[1]+u[2])*.333/255);
|
|
Y[4]=Math.min(999,Math.max(10,Math.round(100*b)))}if(n==2)Y[1]=u[f];cb.cI(e,1+f,Y)}this.a(e);this.Ut()};
|
|
U.levl.prototype.a=function($){this.value=$;this.bT()};U.levl.prototype.VY=function($){this.Nz=$;this.bT()};
|
|
U.levl.prototype.v=function($){return JSON.parse(JSON.stringify(this.value))};U.phfl=function(){U.call(this,"phfl");
|
|
this.qD.push(new hJ);this.qD.push(new fs([12,74],0,100,"%"));this.qD.push(new ad([13,4]));this.jq()};
|
|
U.phfl.prototype=new U;U.phfl.prototype.ix=function($,o){o[0]=$.Clr.v;o[1]=$.Dnst.v;o[2]=$.PrsL.v};U.phfl.prototype.gQ=function($,o){var T=L.h.Qc(o[0]),s=$.Clr.v,E=L.l1(T.i,T.m,T.P);
|
|
s.Lmnc.v=E.vA;s.A.v=E.Ca;s.B.v=E.P;$.Dnst.v=o[1];$.PrsL.v=o[2]};U.vibA=function(){U.call(this,"vibA");
|
|
this.qD.push(new fs([12,13],-100,100,null));this.qD.push(new fs([12,9],-100,100,null));this.jq()};U.vibA.prototype=new U;
|
|
U.vibA.prototype.ix=function($,o){o[0]=$.vibrance?$.vibrance.v:0;o[1]=$.Strt?$.Strt.v:0};U.vibA.prototype.gQ=function($,o){$.vibrance.v=o[0];
|
|
$.Strt.v=o[1]};U.thrs=function(){U.call(this,"thrs");this.qD.push(new fs([4,13],1,255,null));this.jq()};
|
|
U.thrs.prototype=new U;U.thrs.prototype.ix=function($,o){o[0]=$.Lvl.v};U.thrs.prototype.gQ=function($,o){$.Lvl.v=o[0]};
|
|
U.mixr=function(){U.call(this);var $=this.k;this.I5=[];this.Gx=null;this.jW=new h_([12,4],[[13,1,1],[13,1,4],[13,1,5]]);
|
|
this.jW.B(H.E.O,this.tm,this);$.appendChild(this.jW.k);H.ze($);this.UE=new ad([12,60]);$.appendChild(this.UE.k);
|
|
this.UE.B(H.E.O,this.tm,this);for(var f=0;f<4;f++){var o=new fs([[13,1,1],[13,1,4],[13,1,5],[13,2]][f],-200,200,"%");
|
|
o.B(H.E.O,this.tm,this);this.I5.push(o);$.appendChild(o.k)}};U.mixr.prototype=new U;U.mixr.prototype.f=function(){this.jW.f();
|
|
this.UE.f();for(var f=0;f<4;f++)this.I5[f].f()};U.mixr.prototype.a=function($){this.Gx=JSON.parse(JSON.stringify($));
|
|
this.iB()};U.mixr.prototype.v=function($){return JSON.parse(JSON.stringify(this.Gx))};U.mixr.prototype.tm=function($){if($.target!=this.jW){var o=dq.CO(this.Gx);
|
|
if($.target==this.UE){o.UE=this.UE.v();if(o.UE)o.H=[40,40,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];else o.H=[100,0,0,0,0,0,100,0,0,0,0,0,100,0,0,0,0,0,0,0]}else{var T=(o.UE?0:this.jW.v())*5,f=this.I5.indexOf($.target);
|
|
o.H[T+(f<3?f:4)]=$.target.v()}this.Gx=dq.x$(o)}this.iB();this.Ut()};U.mixr.prototype.iB=function(){var $=dq.CO(this.Gx);
|
|
this.UE.a($.UE);var o=($.UE?0:this.jW.v())*5;for(var f=0;f<4;f++)this.I5[f].a($.H[o+(f<3?f:4)])};U.post=function(){U.call(this,"post");
|
|
this.qD.push(new fs([4,1],2,255,null));this.jq()};U.post.prototype=new U;U.post.prototype.ix=function($,o){o[0]=$.Lvls.v};
|
|
U.post.prototype.gQ=function($,o){$.Lvls.v=o[0]};U.clrL=function(){U.call(this,"clrL");this.qD.push(new fm("LUTs"));
|
|
this.jq()};U.clrL.prototype=new U;U.clrL.prototype.ix=function($,o){o[0]=$};U.clrL.prototype.gQ=function($,o){var T=o[0];
|
|
for(var s in T)$[s]=T[s]};U.clrL.prototype.YE=function($,o){if(o==gr.zo||o==gr.u9)this.qD[0].bq($.ajr)};
|
|
U.rplc=function(){U.call(this,"rplc");this.qD.push(new fs([12,92],0,200));this.qD.push(new hJ);this.qD.push(new fs([12,8],-180,180));
|
|
this.qD.push(new fs([12,9],-100,100));this.qD.push(new fs([12,10],-100,100));this.jq()};U.rplc.prototype=new U;
|
|
U.rplc.prototype.ix=function($,o){o[0]=$.Fzns.v;o[1]=$.Mxm.v;o[2]=$.H.v;o[3]=$.Strt.v;o[4]=$.Lght.v};
|
|
U.rplc.prototype.gQ=function($,o){function T(E,e){e.Lmnc.v=E.vA;e.A.v=E.Ca;e.B.v=E.P}$.Fzns.v=o[0];$.H.v=o[2];
|
|
$.Strt.v=o[3];$.Lght.v=o[4];var s=L.h.Qc(o[1]),E=L.l1(s.i,s.m,s.P);T(E,$.Mnm.v);T(E,$.Mxm.v)};U.fade=function(){U.call(this,"fade");
|
|
this.qD.push(new fs([12,0],0,100,"%"));this.qD.push(new h_([12,19,0],hI.fC,!1,hI.xx));this.jq()};U.fade.prototype=new U;
|
|
U.fade.prototype.ix=function($,o){o[0]=$.Opct.v.val;o[1]=hI.C3.indexOf($.Md.v.BlnM)};U.fade.prototype.gQ=function($,o){$.Opct.v.val=o[0];
|
|
$.Md.v.BlnM=hI.C3[o[1]]};U.aply=function(){U.call(this,"aply");this.qD.push(new h_([0,3],[]));this.qD.push(new h_([12,4],["RGB"].concat(dq.nk).concat(["Transparency"])));
|
|
this.qD.push(new ad([4,11]));this.qD.push(new h_([12,19,0],hI.fC,!1,hI.xx));this.qD.push(new fs([12,0],0,100,"%"));
|
|
this.qD.push(new ad("Preserve Transparency"));this.jq([2]);this.t9=null};U.aply.prototype=new U;U.aply.prototype.ix=function($,o,T){if(T){var s=T[2].u,E=this.t9=[];
|
|
for(var f=0;f<s.length;f++)E.push(s[f].getName());E.reverse();this.qD[0].TY([[5,7]].concat(E),[1,E.length])}else var E=this.t9;
|
|
$=$.With.v;var e=$.T.v;o[0]=e[1].t=="name"?1+E.indexOf(e[1].v.val):0;o[1]=["RGB","Rd","Grn","Bl","Trsp"].indexOf(e[0].v.enum);
|
|
o[2]=$.Invr.v;o[3]=hI.C3.indexOf($.Clcl.v.Clcn);o[4]=$.Opct.v.val;o[5]=$.PrsT.v};U.aply.prototype.gQ=function($,o){$=$.With.v;
|
|
var T=$.T.v;if(o[0]==0)T[1]={t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Mrgd"}};else T[1]={t:"name",v:{classID:"Lyr",val:this.t9[this.t9.length-1-o[0]]}};
|
|
T[0].v.enum=["RGB","Rd","Grn","Bl","Trsp"][o[1]];$.Invr.v=o[2];$.Clcl.v.Clcn=hI.C3[o[3]];$.Opct.v.val=o[4];
|
|
$.PrsT.v=o[5]};function bq($,o){aI.call(this);if($==null)return;this.id=o;this.Ro=$;this.Rm=null;this.k=H.z("div","window "+o);
|
|
this.afK=null;this.v3=H.z("div","whead");this.a26=H.z("span","wname");this.v3.appendChild(this.a26);
|
|
this.k.appendChild(this.v3);this.Wp=this.alQ.bind(this);this.m1=this.acd.bind(this);this.XO=this.aim.bind(this);
|
|
H.fb(this.v3);H.uE(this.v3,this.Wp);this.Zx=H.z("span","cross");this.v3.appendChild(this.Zx);bq.prototype.f.call(this);
|
|
H.aa(this.Zx,this.a4$.bind(this));this.body=H.z("div","body");this.k.appendChild(this.body)}bq.prototype=new aI;
|
|
bq.prototype.xQ=function(){return!1};bq.prototype.WR=function(){return!1};bq.prototype.f=function(){if(this.Ro==null)return;
|
|
this.a26.textContent=aX.get(this.Ro);var $=PIMG.__cross==null?"filter:invert(1);":"";this.Zx.setAttribute("style","background-image:url("+PIMG.cross+");"+$)};
|
|
bq.prototype.iO=function($,o,T,s,E){};bq.prototype.J7=function($,o,T,s,E){};bq.prototype.ZS=function($,o,T,s,E){};
|
|
bq.prototype.yg=function($,o,T,s,E){};bq.prototype.oW=function($,o,T,s,E){};bq.prototype.Vb=function($,o,T,s){if(s.L(dN.FT)&&this.eg)this.eg();
|
|
if(s.L(dN.I6)){var E=new x(H.E.N);E.US=!0;D.Kl.ck(s,E);if(E.data)o.J(E)}};bq.prototype.Ty=function($){return!1};
|
|
bq.prototype.cl=function($,o){return!0};bq.prototype.kW=function($,o,T,s){};bq.prototype.YE=function($,o){};
|
|
bq.prototype.Kh=function($,o){return null};bq.prototype.aiY=function($){return this.afK};bq.prototype.RE=function(){};
|
|
bq.prototype.close=function(){this.J(new x(H.E.rA))};bq.prototype.alQ=function($){this.Rm=H.DQ($,this.k);
|
|
H.mW(window,this.m1);H.aa(window,this.XO)};bq.prototype.acd=function($){var o=this.k.parentNode,T=H.DQ($,o),s=Math.round(T.x-this.Rm.x),E=o.offsetTop+Math.max(0,Math.min(window.innerHeight-36,Math.round(T.y-this.Rm.y)));
|
|
this.afK=new aY(s,E);this.k.style.left=s+"px";this.k.style.top=E+"px"};bq.prototype.aim=function($){H.vY(window,this.m1);
|
|
H.SY(window,this.XO)};bq.prototype.a4$=function($){this.J(new x("closebtn"));this.close()};function bu(){bq.call(this,"About Photopea","aboutpp");
|
|
var $=H.z("div","flexrow");this.body.appendChild($);var o=this.aiT=H.z("img");$.appendChild(o);this.body.setAttribute("style","margin:0; padding:0");
|
|
var T=this.a4g=H.z("div");T.innerHTML=bu.Im;$.appendChild(T);var s=this.rG=H.z("span");s.innerHTML="<big style=\"text-shadow: 2px 2px 3px #000000;\">Ivan holding Photopea in Prague</big>";
|
|
this.body.appendChild(s)}bu.prototype=new bq;bu.prototype.Kh=function($,o){return new aY(0,0)};bu.prototype.RE=function($,o){var T=this.aiT,s=this.a4g,E=this.rG,e=($+o-42-42)/110;
|
|
e=Math.sqrt(($-42)*(o-42))/50;T.setAttribute("style","width:"+$/2+"px; height:"+o+"px; display:block; object-fit:cover;");
|
|
s.setAttribute("style","width:"+($/2-42)+"px; height:"+(o-42)+"px; padding:20px; font-size:"+e+"px;");
|
|
E.setAttribute("style","position:absolute; bottom:10px; right:"+($/2+10)+"px")};bu.prototype.f=function(){};
|
|
bu.prototype.kW=function($,o,T,s){this.aiT.setAttribute("src","img/ivan_pp.webp")};bu.Im="\t<h1>Hi There!</h1>\t<p>My name is <b>Ivan Kutskir</b> and I'm the creator of Photopea.</p>\t<p>I'm a 30-year-old computer programmer. I was born in Ukraine, but I live in the Czech Republic most of my life (in <b>Prague</b> since 2009).</p>\t<p>I started developing Photopea back in 2012. I intended to call it <b>Photo Hammer</b>, \tbut I didn't register the .com domain right away, and when I tried to do so six months later, it was already taken.</p>\t\t<p>My friends and my family did not know about Photopea during the first four years of development.\tI was spending a lot of time building it, without making any money or learning new skills. So nothing to be proud of, \tbut the project was fun and I enjoyed working on it.\t</p>\t<p>\tNow, it's heartwarming to know that millions around the world use Photopea as their creative medium. \tTo this day I work on Photopea, driven by the positive impact of my creation.\t</p>\t\t<!--<p>You can not be completely sure if something is a good or a bad idea, until you actually try to do it.</p>-->\t\t<p style=\"text-align:right;\"><i><big>Ivan Kutskir</big><br/>support@photopea.com</i></p>\t";
|
|
function dF(){bq.call(this,[0,13,0],"account");this.bQ=H.z("div","form scrollable");this.body.appendChild(this.bQ);
|
|
this.body.style.padding="0";this.A_=[new dF.$E,new dF.cO(dF.agt),new dF.cO(dF.apo)];for(var f=0;f<this.A_.length;
|
|
f++)this.A_[f].parent=this;this.B("showpage",this.a6N,this)}dF.prototype=new bq;dF.prototype.RE=function($,o){this.bQ.setAttribute("style","width:"+Math.min($-40,600)+"px; height:"+(o-38)+"px; padding:1.5em;");
|
|
console.log($,o);this.A_[0].RE($,o)};dF.prototype.Kh=function($,o){return new aY(Math.max(0,Math.min(150,($-600)/2)),Math.max(0,Math.min(100,(o-500)/2)))};
|
|
dF.prototype.a6N=function($){H.Ft(this.bQ);this.bQ.scrollTop=0;this.bQ.appendChild(this.A_[$.data.II].k)};
|
|
dF.prototype.f=function(){bq.prototype.f.call(this);for(var f=0;f<this.A_.length;f++)this.A_[f].f()};
|
|
dF.prototype.kW=function($,o,T){H.Ft(this.bQ);var s=this.A_[0];this.bQ.appendChild(s.k);s.kW();this.f()};
|
|
dF.prototype.YE=function($,o){this.kW(null,null,null)};dF.$E=function(){aI.call(this);this.k=H.z("div");
|
|
var $=this.k,o,T,s="background-color: #00aa00; text-shadow:none; padding:3px 7px; font-size:1.2em; font-weight:bold; color:#ffffff; cursor:pointer; margin:4px 0;";
|
|
this.l7=H.z("div");$.appendChild(this.l7);this.pv=new hE([0,11],!1,null,!0);this.pv.k.setAttribute("style","background-color: rgba(200,0,0,1); color:#ffffff; margin:4px 6px 4px 0;");
|
|
this.pv.B("click",this.G6,this);$.appendChild(this.pv.k);this.CF=new hE([0,13,1],!1,null,!0);this.CF.B("click",this.ajO,this);
|
|
$.appendChild(this.CF.k);this.lb=new hE("Business Terms",!1,null,!0);this.lb.B("click",this.afy,this);
|
|
$.appendChild(this.lb.k);o=H.z("h2");o.innerHTML="Account types";$.appendChild(o);T=H.z("table");T.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\">All Features</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";
|
|
$.appendChild(T);var E=this.amw=[[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.Iq=[];for(var f=0;f<E.length;f++)this.Iq.push(new hE("Buy: $"+E[f][0],!1,null,!0));for(var f=0;
|
|
f<this.Iq.length;f++){this.Iq[f].k.setAttribute("style",s);this.Iq[f].B("click",this.afY,this)}o=H.z("h2");
|
|
o.innerHTML="Go Premium";$.appendChild(o);this.E5=new hE("...",!0);this.E5.k.setAttribute("style",s);
|
|
$.appendChild(this.E5.k);T=this.a2m(3,["Single user",this.Iq[0],this.Iq[1],this.Iq[2],"Team of 5",this.Iq[3],this.Iq[4],this.Iq[5],"Team of 20",this.Iq[6],this.Iq[7],this.Iq[8]]);
|
|
$.appendChild(T);this.a9T=new ad("I accept",!0,"");$.appendChild(this.a9T.k);this.xZ=new hE([0,13,1],!1,null,!0);
|
|
this.xZ.B("click",this.ajO,this);$.appendChild(this.xZ.k);this.Kx=new hE("I have a key",!1,null,!0);
|
|
this.Kx.k.setAttribute("style",s+" float:right;");this.Kx.B("click",this.afY,this);$.appendChild(this.Kx.k);
|
|
o=H.z("h2");o.textContent="Team Settings";$.appendChild(o);this.rz=new ad("Join a team");$.appendChild(this.rz.k);
|
|
this.rz.B(H.E.O,this.aaF,this);this.kq=new d_("Email of a leader",null,14);$.appendChild(this.kq.k);
|
|
H.ze($);this.LA=new ad("Start a team");$.appendChild(this.LA.k);this.LA.B(H.E.O,this.aaF,this);var e=new eB("Emails of other members:");
|
|
$.appendChild(e.k);H.ze($);this.yo=H.z("textarea");this.yo.setAttribute("rows",3);this.yo.setAttribute("style","display:block;tab-size:4; width:100%");
|
|
$.appendChild(this.yo);var n=new hE("Save Team Settings",!1,null,!0);$.appendChild(n.k);n.B("click",this.a7O,this);
|
|
var A=this.aju=new hE("More about Teams",!1,null,!0);$.appendChild(A.k);A.B("click",this.afp,this);o=H.z("h2");
|
|
o.innerHTML="Distributor Account";$.appendChild(o);this.Du=new hE("...",!0);this.Du.k.setAttribute("style",s);
|
|
$.appendChild(this.Du.k);T=this.a2m(3,["1000 views/ month",this.Iq[9],this.Iq[10],this.Iq[11],"5000 views/ month",this.Iq[12],this.Iq[13],this.Iq[14],"20000 views/ month",this.Iq[15],this.Iq[16],this.Iq[17]]);
|
|
$.appendChild(T);this.TG=new d_("Domain name (e.g. domain.com)",null,14);$.appendChild(this.TG.k);H.ze($);
|
|
var n=new hE("Save Domain Settings",!1,null,!0);n.UM();$.appendChild(n.k);n.B("click",this.ak6,this);
|
|
var A=new hE("More about Distributors",!1,null,!0);$.appendChild(A.k);A.B("click",this.afp,this)};dF.$E.prototype=new aI;
|
|
dF.$E.prototype.RE=function($,o){var T=$<500?"$":"Buy: $",s=this.amw;for(var f=0;f<s.length;f++)this.Iq[f].yl(T+s[f][0])};
|
|
dF.$E.prototype.ajO=function($){var o=new x("showpage",!0);o.data={II:1};this.J(o)};dF.$E.prototype.afy=function($){var o=new x("showpage",!0);
|
|
o.data={II:2};this.J(o)};dF.$E.prototype.f=function(){this.pv.yl(bX.Oo()?aX.get([0,11]):aX.get([0,10]));
|
|
this.xZ.f();this.CF.f();this.lb.f()};dF.$E.prototype.afp=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.pm,link:"https://www.photopea.com/api/accounts#"+($.target==this.aju?"teams":"distributors")};
|
|
this.J(o)};dF.$E.prototype.aaF=function($){var o=$.currentTarget==this.rz;this.rz.a(o);this.LA.a(!o)};
|
|
dF.$E.prototype.a7O=function($){var o=this.rz.v(),T=this.kq.v().trim(),s=this.yo.value.trim();if(T.length>60){alert("Too long email address");
|
|
return}if(s.length>600){alert("Too many team members");return}s=s.split(",").join(" ").trim();s=s.replace(/\s+/g," ");
|
|
if(s=="")s=[];else s=s.split(" ");var E=bX.gp();if(E==null)E={};if(E.acc==null)E.acc={};E.acc.team={jin:o,ldr:T,mmb:s};
|
|
bX.l5(E,this.ul.bind(this));alert("Saved!");this.kW()};dF.$E.prototype.ak6=function($){var o=this.TG.v().trim();
|
|
if(!bX.Oo()){alert("You have to log in first.");return}if(bX.V7().distrib=="0"){alert("Order a distributor account first.");
|
|
return}var T=bX.gp();if(T==null)T={};if(T.acc==null)T.acc={};if(o=="")delete T.acc.dname;else T.acc.dname=o;
|
|
bX.l5(T,this.ul.bind(this));alert("Saved!");this.kW()};dF.$E.prototype.kW=function(){if(bX.Oo()){var $=bX.V7();
|
|
if($==null)return;this.l7.innerHTML="<span style=\"font-size:1.5em; margin-right:0.7em;\">"+$.name+"</span> "+$.email+" <br/>"}else{}var o=bX.Oo()&&bX.FJ();
|
|
this.E5.k.style.display=o?"block":"none";if(o){var T=parseInt($[H.iq("!&|'&50")])-Date.now()*(1/1e3),s=parseInt($.ptype),E;
|
|
if(s==-1)E="member of a team";else if(s==1)E="Single user";else E="Team of "+s;this.E5.yl("Premium active for "+Math.round(T/(60*60*24))+" more days! ("+E+")")}var e=bX.Oo()&&$.distrib*1e3>Date.now();
|
|
this.Du.k.style.display=e?"block":"none";if(e){var T=parseInt($.distrib)-Date.now()/1e3,s=parseInt($.ptype);
|
|
this.Du.yl("Distributor active for "+Math.round(T/(60*60*24))+" more days! ("+s+" visitos)")}var n=bX.gp();
|
|
if(n&&n.acc&&n.acc.team){var A=n.acc.team;this.rz.a(A.jin);this.LA.a(!A.jin);this.kq.a(A.ldr);this.yo.value=A.mmb.join(", ")}else{this.rz.a(!0);
|
|
this.LA.a(!1);this.kq.a("");this.yo.value=""}if(n&&n.acc&&n.acc.dname)this.TG.a(n.acc.dname);else this.TG.a("")};
|
|
dF.$E.prototype.a2m=function($,o){var T=H.z("table");T.innerHTML="\t\t\t\t<table>\t\t\t\t\t<tr> <th class=\"left\"></th><th>30 days</th><th>90 days</th> "+($==3?"<th>365 days</th>":"")+" </tr>\t\t\t\t</table>\t\t\t";
|
|
for(var f=0;f<o.length;f+=$+1){var s=H.z("tr"),E;T.appendChild(s);E=H.z("td","left");s.appendChild(E);
|
|
E.innerHTML="<b>"+o[f]+"</b>";for(var e=0;e<$;e++){E=H.z("td");s.appendChild(E);E.appendChild(o[f+1+e].k)}}return T};
|
|
dF.$E.prototype.afY=function($){var o=this.Iq.indexOf($.currentTarget),s=30,E=1;if(!bX.Oo()){alert("You must log in before buying Premium");
|
|
return}if(this.a9T.v()==!1&&o<9){alert("You must accept Terms of Service");return}var T=bX.Oo()&&bX.FJ();
|
|
if(o!=-1){var e=this.amw[o];s=e[1];E=e[2]}if(T&&E<1e3){alert("You already have premium.");return}if(o==-1){var n=prompt("Please enter your key");
|
|
if(n!=null){bX.alq(n,this.ul.bind(this));this.hV()}return}if(s==30&&E==1){var A=confirm("You can have a 90 days version for $10. Do you still want a 30 days version for $9?");
|
|
if(!A)return}bX.order(s,E,this.ul.bind(this));this.hV()};dF.$E.prototype.ul=function($){if(bX.Oo()&&bX.V7().msg)alert(bX.V7().msg);
|
|
this.kW();this.hV()};dF.$E.prototype.G6=function($){if(bX.Oo()){bX.amm();this.hV();this.kW(null,null,null)}else bX.G6(this.amj.bind(this))};
|
|
dF.$E.prototype.amj=function(){var $=new x(H.E.Q,!0);$.data={e:H.V.ai0};this.J($)};dF.$E.prototype.hV=function(){var $=new x(H.E.Q,!0);
|
|
$.data={e:H.V.mH};this.J($)};dF.cO=function($){aI.call(this);this.k=H.z("div");var o=this.k,T=this.a3A=new hE([0,13,2],!1,null,!0);
|
|
T.B("click",this.aeF,this);o.appendChild(T.k);var s=H.z("div");s.innerHTML=$;o.appendChild(s)};dF.cO.prototype=new aI;
|
|
dF.cO.prototype.aeF=function($){var o=new x("showpage",!0);o.data={II:0};this.J(o)};dF.cO.prototype.f=function(){this.a3A.f()};
|
|
dF.apo="\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\t<h1>Payment Provider</h1>\t\t<p>Payments are provided by <a style=\"color:white\" href=\"https://www.comgate.cz/cz/platebni-brana\">ComGate pamyments, a.s</a>.</p>\t\t<ul>\t\t\t<li>ComGate Payments, a.s.</li>\t\t\t<li>Go\u010D\xE1rova t\u0159\xEDda 1754 / 48b, Hradec Kr\xE1lov\xE9</li>\t\t\t<li>E-mail: platby-podpora@comgate.cz, Tel: +420 228 224 267</li>\t\t</ul>\t\t<img src=\"https://www.comgate.cz/files/platebni-brana-comgate-paticka-e-shopu.png\" />\t";
|
|
dF.agt="\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>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 ej(){bq.call(this,[11,14],"addguides");this.EF;this.GH={wK:{Z2:0}};this.gP=null;var $=H.z("div","form");
|
|
this.body.appendChild($);this.PX=new d_([22,4,0],null,16);this.PX.B(H.E.O,this.X0,this);this.fJ=new d_([22,4,1],null,16);
|
|
this.fJ.B(H.E.O,this.X0,this);this.DJ=new h_(null,L.BG.od);this.DJ.B(H.E.O,this.X0,this);$.appendChild(this.PX.k);
|
|
$.appendChild(this.DJ.k);H.ze($);$.appendChild(this.fJ.k);this.bD=new hE("OK",!0,null,!0);this.bD.B("click",this.eg,this);
|
|
$.appendChild(this.bD.k);this.B("closebtn",this.a7F,this)}ej.prototype=new bq;ej.prototype.cl=function($,o){return $!=null};
|
|
ej.prototype.xQ=function(){return!0};ej.prototype.f=function(){bq.prototype.f.call(this);this.PX.f();
|
|
this.fJ.f();this.DJ.f()};ej.prototype.YE=function($,o){var T=$.wK.Z2;this.GH.wK.Z2=T;this.DJ.a(T)};ej.prototype.kW=function($,o){this.EF=$;
|
|
this.gP=JSON.stringify($.hm());this.E4()};ej.prototype.E4=function(){var $=this.EF,o=$.yZ,T=function(s,E,$,e,n){var A=[];
|
|
for(var f=0;f<s.length;f++)if(s[f][0]==E)A.push(L.BG.at(s[f][1],$.fG,e,n));return A.join(", ")};this.PX.a(T(o,0,$,this.GH,$.d));
|
|
this.fJ.a(T(o,1,$,this.GH,$.w))};ej.prototype.X0=function($){if($&&$.currentTarget==this.DJ)this.GH.wK.Z2=this.DJ.v();
|
|
else{var o=this.a0q(),T=this.EF;T.W$(o);T.Cd=!0}this.E4()};ej.prototype.a0q=function(){var $=[],o=[];
|
|
for(var T=0;T<2;T++){var s=T==0?this.PX:this.fJ,E=T==0?this.EF.d:this.EF.w,e=s.v().replace(/,/g," ").replace(/ +/g," ").trim(),n=e==""?[]:e.split(" ");
|
|
for(var f=0;f<n.length;f++){$.push([T,L.BG.ae2(n[f],this.EF.fG,this.GH,E)]);o.push(-1)}}return[$,o]};
|
|
ej.prototype.a7F=function($){var o=this.EF;o.W$(JSON.parse(this.gP));o.Cd=!0;this.EF=null};ej.prototype.eg=function($){this.X0($);
|
|
var o=new x(H.E.N,!0);o.U=D.ih;o.data={e:"gids",W0:JSON.parse(this.gP),Mj:this.EF.hm()};this.EF=null;
|
|
this.close();this.J(o)};function dx($){var o=iZ.names[$];if(o==null)o=dq.names[$];if($=="aply")o="Apply Image";
|
|
if($=="fade")o=[2,11];if($=="blendOptions")o=[14,10];bq.call(this,o,"afw_"+$);this.jX=$;this.t$=null;
|
|
this.Ih=null;this.AN=new U[$];this.AN.B(H.E.O,this.Ut,this);this.AN.parent=this;this.body.appendChild(this.AN.k);
|
|
this.Iz=new ad([24,18,5]);this.Iz.a(!0);this.Iz.B(H.E.O,this.Ut,this);this.$G=new hE("Reset",!0,null,!0);
|
|
this.$G.B("click",this.z7,this);this.bD=new hE("OK",!0,null,!0);this.bD.B("click",this.eg,this);if(this.M1())this.AN.uX(this.bD.k);
|
|
else{H.v2(this.AN.k,"form");H.v2(this.body,"flexrow");this.AN.k.setAttribute("style","width:24em");var T=H.z("div");
|
|
this.body.appendChild(T);T.setAttribute("style","width:8em; margin-left:1em; line-height:2.3em");T.appendChild(this.bD.k);
|
|
T.appendChild(this.$G.k);T.appendChild(this.Iz.k)}this.B("closebtn",this.WB,this)}dx.prototype=new bq;
|
|
dx.prototype.xQ=function(){return!0};dx.prototype.M1=function(){return this.AN!=null&&this.AN.n6()};
|
|
dx.prototype.Kh=function(){return this.M1()?new aY(0,0):bq.prototype.Kh()};dx.prototype.WR=function(){return this.AN.WR()};
|
|
dx.prototype.iO=function($,o,T,s,E){this.AN.iO($,o,T,s,E)};dx.prototype.ZS=function($,o,T,s,E){this.AN.ZS($,o,T,s,E)};
|
|
dx.prototype.yg=function($,o,T,s,E){this.AN.yg($,o,T,s,E)};dx.prototype.cl=function($,o){if(this.jX=="fade")return dx.a67($);
|
|
return!0};dx.prototype.z7=function($){this.AN.a(iZ.o_(this.jX));this.Ut()};dx.prototype.Ut=function($){this.wt({e:"edit",ed:this.AN.v(),ND:!this.Iz.v()})};
|
|
dx.prototype.WB=function($){this.wt({e:"cancel"})};dx.prototype.eg=function($){if(!this.Iz.v()){this.Iz.a(!0);
|
|
this.Ut()}this.Ih=this.AN.v();if(this.M1())this.Ut();this.wt({e:"confirm"});this.close()};dx.prototype.f=function(){bq.prototype.f.call(this);
|
|
this.Iz.f();if(this.AN)this.AN.f()};dx.prototype.YE=function($,o){if(this.AN)this.AN.YE($,o)};dx.prototype.Vb=function($,o,T,s){if(this.M1())this.AN.Vb(s);
|
|
else bq.prototype.Vb.call(this,$,o,T,s)};dx.prototype.kW=function($,o,T,s){this.t$=o.t$;var E=$.add.lnk2?$.add.lnk2:[],e,n,A=new df(0,0,$.d,$.w),u=$.u[$.D[0]],Y=null;
|
|
e=u.buffer;n=u.rect;if(this.M1())Y=$.aw($.D[0]-1);var b=iZ.o_(this.jX),a=[E,$.iy,$];if(o.t$==null){this.AN.a(b,e,n,A,Y,a);
|
|
if(dq.names[this.jX]){if(s.L(dN.BJ)&&this.Ih)this.AN.a(this.Ih);var w=cf.NX.getData($),X=L.lm(w[0].ah);
|
|
this.AN.VY(X)}}else{var N=!1,u=$.u[this.t$.c];if(u.HC()){var z=u.DE($);e=z.buffer;n=z.rect;var i=u.add.SoLd.filterFX.v.filterFXList.v;
|
|
if(i[this.t$.index]){var k=i[this.t$.index].v;this.AN.a(this.jX=="blendOptions"?k.blendOptions.v:k.Fltr.v,e,n,A,Y,a);
|
|
this.AN.VY(L.lm(e));N=!0}}if(!N){this.AN.a(b,e,n,A,Y,a);this.AN.VY(L.lm(e))}}if(!this.M1())this.Ut()};
|
|
dx.prototype.wt=function($){var o=new x(H.E.N,!0);$.jX=this.jX;$.t$=this.t$;o.data=$;o.U=iZ.names[this.jX]||this.t$?D.VI:D.WO;
|
|
o.US=!0;this.J(o)};dx.prototype.RE=function($,o){if(!this.AN.n6()){o=o-26;$=$-26}else this.body.style.padding="0";
|
|
this.AN.RE($,o)};dx.a67=function($){if($==null)return!1;var o=$.OY();if(o==null||!(o.data instanceof Array)||o.data.length!=$.D.length)return!1;
|
|
for(var f=0;f<o.data.length;f++){var T=o.data[f];if(T.c<0&&$.iy[-1-T.c])return!0;if(T.c==null||$.u[T.c]==null||$.u[T.c].dQ!=T.W5)return!1;
|
|
if($.D.indexOf(T.c)==-1)return!1}return!0};function gU(){bq.call(this,[11,0],"camera");this.data=null;
|
|
this.ev=new aY(1,1);this.arb=[];var $=H.z("div","form hbar");this.body.appendChild($);this.a5l=new h_(null,[]);
|
|
this.N3=new h_([21,0],[[21,2],[21,1]]);$.appendChild(this.N3.k);this.mF=new h_(null,[]);this.mF.B(H.E.O,this.amq,this);
|
|
$.appendChild(this.mF.k);this.if=new hE([11,0],!1,null,!0);this.if.B("click",this.a0e,this);$.appendChild(this.if.k);
|
|
this.zK=new eB("");$.appendChild(this.zK.k);this.stream=null;this.V2=H.z("video","");this.V2.setAttribute("autoplay","true");
|
|
this.body.appendChild(this.V2);this.amy=this.a6h.bind(this);this.a2z=this.af6.bind(this);this.a1K=this.a7y.bind(this);
|
|
this.B("closebtn",this.a4t,this)}gU.prototype=new bq;gU.prototype.f=function(){bq.prototype.f.call(this);
|
|
this.N3.f();this.if.f();this.RE(this.N0,this.cQ)};gU.prototype.aw=function(){var $=this.V2.videoWidth,o=this.V2.videoHeight,T=H.z("canvas","");
|
|
T.width=$;T.height=o;var s=T.getContext("2d");s.drawImage(this.V2,0,0,$,o);var E=s.getImageData(0,0,$,o);
|
|
return{Sg:new df(0,0,$,o),data:E.data.buffer}};gU.prototype.a0e=function($){if(this.N3.v()==0)this.a8E();
|
|
else this.ahH()};gU.prototype.ahH=function(){var $=this.aw(),o={buffer:new Uint8Array($.data),rect:$.Sg},T=new x(H.E.N,!0);
|
|
T.US=!0;T.U=D.Jc;T.data={e:M.mJ,jB:o};this.J(T);alert(aX.get([21,4]))};gU.prototype.a8E=function(){var $=this.aw(),o=eY.sO("camera",[$]),T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.pl,u4:o};this.J(T);alert(aX.get([21,5]))};gU.prototype.kW=function($,o,T){navigator.mediaDevices.enumerateDevices().then(this.ac4.bind(this))};
|
|
gU.prototype.ac4=function($){var o=this.arb=[],T=[];for(var f=0;f<$.length;f++)if($[f].kind=="videoinput"){o.push($[f]);
|
|
T.push("Camera "+o.length)}this.mF.TY(T);this.mF.a(0);this.amq()};gU.prototype.amq=function($){this.a4t();
|
|
var o={video:{deviceId:this.arb[this.mF.v()].deviceId,width:{ideal:8e3},height:{ideal:8e3}}};if(navigator.mediaDevices.getUserMedia)navigator.mediaDevices.getUserMedia(o).then(this.amy).catch(this.a2z);
|
|
else navigator.webkitGetUserMedia(o,this.amy,this.a2z)};gU.prototype.a6h=function($){this.stream=$;this.V2.srcObject=$;
|
|
this.V2.addEventListener("loadedmetadata",this.a1K,!1)};gU.prototype.a7y=function($){this.V2.play();
|
|
this.RE(this.N0,this.cQ)};gU.prototype.Kh=function($,o){return new aY(0,0)};gU.prototype.RE=function($,o){var T=this.V2.videoWidth,s=this.V2.videoHeight;
|
|
this.zK.a(T+" x "+s+" px");this.zK.k.setAttribute("style","position:absolute; left:14px; bottom:10px; z-index:1;");
|
|
this.ev.A5(T,s);this.N0=$;this.cQ=o;var E=$-28,e=o-28-30,n=this.ev.x/this.ev.y;if(E/e>n)E=e*n;else e=E/n;
|
|
this.V2.setAttribute("style","display: block; width: "+Math.round(E)+"px; height:"+Math.round(e)+"px;")};
|
|
gU.prototype.af6=function($){console.log("error",$);alert(aX.get([21,6]));this.close()};gU.prototype.a4t=function($){if(this.stream!=null){var o=this.stream.getTracks();
|
|
for(var f=0;f<o.length;f++)o[f].stop();this.stream=null}};function g5(){bq.call(this,[7,8],"crange");
|
|
this.EF=null;this.t4={vA:73,Ca:4.45,P:4};this.m2={vA:73,Ca:4.45,P:4};var $=H.z("div","form");$.setAttribute("style","width:18em");
|
|
this.body.appendChild($);this.IR=new fs([12,92],0,200);this.IR.a(40);this.IR.B(H.E.O,this.iB,this);$.appendChild(this.IR.k);
|
|
this.S=H.z("canvas");$.appendChild(this.S);this.Ly=new eI([12,36],[[18,0],"\uFF0B","\u2014"]);$.appendChild(this.Ly.k);
|
|
this.as=new hE("OK",!0,null,!0);this.as.B("click",this.eg,this);this.body.appendChild(this.as.k)}g5.prototype=new bq;
|
|
g5.prototype.cl=function($,o){return $!=null};g5.prototype.WR=function(){return!0};g5.prototype.xQ=function(){return!0};
|
|
g5.prototype.f=function(){bq.prototype.f.call(this);this.IR.f();this.Ly.f()};g5.prototype.iO=function($,o,T,s,E){var e=$.C.VD(E.x,E.y);
|
|
this.a9t(e.x,e.y)};g5.prototype.a9t=function($,o){var T=Math.min,s=Math.max,E=this.EF,e=s(0,T(E.d-1,Math.floor($))),n=s(0,T(E.w-1,Math.floor(o))),A=E.aw(),u=(n*E.d+e)*4,Y=A[u],b=A[u+1],a=A[u+2],w=L.l1(Y,b,a),X=this.Ly.v(),N=this.t4,z=this.m2;
|
|
if(X==0){this.t4=JSON.parse(JSON.stringify(w));this.m2=w}else if(X==1){N.vA=T(N.vA,w.vA);N.Ca=T(N.Ca,w.Ca);
|
|
N.P=T(N.P,w.P);z.vA=s(z.vA,w.vA);z.Ca=s(z.Ca,w.Ca);z.P=s(z.P,w.P)}else if(X==2){var i=(N.vA+z.vA)/2,k=(N.Ca+z.Ca)/2,Q=(N.P+z.P)/2;
|
|
if(w.vA<i)N.vA=s(N.vA,w.vA+10);else z.vA=T(z.vA,w.vA-10);if(w.Ca<k)N.Ca=s(N.Ca,w.Ca+1);else z.Ca=T(z.Ca,w.Ca-1);
|
|
if(w.P<Q)N.P=s(N.P,w.P+1);else z.P=T(z.P,w.P-1)}this.iB()};g5.prototype.eg=function($){var o=new x(H.E.N,!0);
|
|
o.U=D.ZR;o.data={e:"crange",m0:this.t4,aN:this.m2,Al:this.IR.v()/200};o.US=!0;this.J(o);this.close()};
|
|
g5.prototype.kW=function($,o){this.EF=$;this.a9t(0,0)};g5.prototype.iB=function(){var $=this.EF,o=D.NK.kP($,this.t4,this.m2,this.IR.v()/200),T=o.rect,s=o.channel,E=this.S,e=E.getContext("2d"),n=Math.floor(230*H.K()),A=Math.floor(n*(T.w/T.d));
|
|
E.width=n;E.height=A;H.kg(E,n,A);var u=L.G(s.length*4);L.wr(u,4294967295);for(var f=0;f<3;f++)L.aM(s,u,f);
|
|
var Y=D.p.qh([u,T],new fY(n/T.d,0,0,A/T.w,0,0)),b=Y.rect,a=new ImageData(new Uint8ClampedArray(Y.buffer.buffer),b.d,b.w);
|
|
e.putImageData(a,0,0)};function eq(){bq.call(this,[12,76,1],"createshape");this.hW=null;var $=H.z("div","form");
|
|
$.setAttribute("style","width:20em");this.body.appendChild($);this.ST=new ac([12,41],0,0,null,0,!1,!0);
|
|
$.appendChild(this.ST.k);H.ze($);this.PX=new ac([12,42],0,0,null,0,!1,!0);$.appendChild(this.PX.k);H.ze($);
|
|
this.Cb=new ad([19,5,3]);$.appendChild(this.Cb.k);this.ST.a(100);this.PX.a(100);this.bD=new hE("OK",!0,null,!0);
|
|
this.bD.B("click",this.eg,this);$.appendChild(this.bD.k)}eq.prototype=new bq;eq.prototype.eg=function($){this.hW.a8H(this.hW.a0o,this.ST.v(),this.PX.v(),this.Cb.v());
|
|
this.close()};eq.prototype.f=function(){if(this.hW)this.Ro=aX.get([5,3])+": "+aX.get(this.hW.a9l);bq.prototype.f.call(this);
|
|
this.ST.f();this.PX.f();this.Cb.f()};eq.prototype.kW=function($,o){this.hW=o;this.f()};function eg(){bq.call(this,[11,1],"colorpicker");
|
|
this.na=null;this.Sy=null;this.xH=null;this.$W=!1;this.Rl=!1;var $=H.z("div","flexrow"),e,n;this.body.appendChild($);
|
|
this.Vt=new a$(256);this.Vt.B(H.E.O,this.sM,this);$.appendChild(this.Vt.k);var o=H.z("div","form");o.setAttribute("style","width:14.5em; margin-left:1em;");
|
|
$.appendChild(o);this.a9r=H.z("div","full");o.appendChild(this.a9r);this.agH=H.z("div","full");o.appendChild(this.agH);
|
|
var T=H.z("div","flexrow");o.appendChild(T);var s=H.z("div"),E=H.z("div");T.appendChild(s);T.appendChild(E);
|
|
e=["R","G","B"];n=s;this.Jl=[];for(var f=0;f<3;f++){var A=new ac(e[f]+":",0,255,null,0,!1,!0);this.Jl.push(A);
|
|
A.B(H.E.O,this.a2Q,this);n.appendChild(A.k)}e=["H","S","B"];n=E;this.xa=[];for(var f=0;f<3;f++){var u=0,Y=360,b="\xB0";
|
|
if(f!=0){Y=100;b="%"}var A=new ac(e[f]+":",u,Y,b,0,!1,!0);this.xa.push(A);A.B(H.E.O,this.apD,this);n.appendChild(A.k)}this.PX=new d_("Hex",null,6);
|
|
this.PX.B(H.E.O,this.Oh,this);o.appendChild(this.PX.k);this.J6=H.z("input","fitem");this.J6.setAttribute("type","color");
|
|
this.J6.setAttribute("style","width:50px");this.J6.addEventListener("change",this.Oh.bind(this),!1);
|
|
o.appendChild(this.J6);this.C$=new fo(9);this.C$.B(H.E.O,this.Oh,this);o.appendChild(this.C$.k);this.bD=new hE("OK",!0,null,!0);
|
|
this.bD.B("click",this.eg,this);o.appendChild(this.bD.k);this.B("closebtn",this.WB,this);this.bc=!1}eg.prototype=new bq;
|
|
eg.prototype.WR=function(){return!0};eg.prototype.RE=function($,o){this.Vt.RE(Math.min(256,$-226),o)};
|
|
eg.prototype.sM=function($){this.Sy=this.Vt.v();this.update()};eg.prototype.iO=function($,o,T,s,E){this.bc=!0;
|
|
this.ajB($,E)};eg.prototype.ZS=function($,o,T,s,E){if(!this.bc)return;this.ajB($,E)};eg.prototype.yg=function($,o,T,s,E){this.bc=!1};
|
|
eg.prototype.ajB=function($,o){var T=D.iK.v0($,o,1),s=T&255,E=T>>8&255,e=T>>16&255;this.Sy={i:e/255,m:E/255,P:s/255};
|
|
this.update()};eg.prototype.a2Q=function($){var o=this.Jl,T=this.hl(parseInt(o[0].v())),s=this.hl(parseInt(o[1].v())),E=this.hl(parseInt(o[2].v()));
|
|
this.Sy={i:T/255,m:s/255,P:E/255};this.update()};eg.prototype.apD=function($){var o=this.xa,T=this.Yw(parseInt(o[0].v())/360),s=this.Yw(parseInt(o[1].v())/100),E=this.Yw(parseInt(o[2].v())/100);
|
|
this.Sy=L.ag(T,s,E);this.update()};eg.prototype.Oh=function($){var o;if($.currentTarget==this.C$)o=this.C$.v();
|
|
else{o=$.currentTarget==this.PX?this.PX.v():this.J6.value;if(o.charAt(0)=="#")o=o.slice(1);if(o.length==3)o=o[0]+o[0]+o[1]+o[1]+o[2]+o[2];
|
|
o=L.oo(o)}this.Sy={i:(o>>16&255)/255,m:(o>>8&255)/255,P:(o&255)/255};this.update()};eg.prototype.Qa=function($){var o=$.i,T=$.m,s=$.P;
|
|
return Math.round(o*255)<<16|Math.round(T*255)<<8|Math.round(s*255)};eg.prototype.eg=function($){this.ad9();
|
|
var o=this.Qa(this.Sy);this.xH(o);this.close();this.Rl=!1;this.Sy=null};eg.prototype.WB=function($){this.ad9();
|
|
if(this.$W)this.xH(this.Qa(this.na));this.Rl=!1;this.Sy=null};eg.prototype.ad9=function($){var o=new x(H.E.Q,!0);
|
|
o.data={e:H.V.oh};this.J(o)};eg.prototype.YE=function($,o){if(o!=gr.ux)return;var T=$.z4;this.C$.a(T);
|
|
if(this.Sy!=null){this.Sy={i:(T>>16&255)/255,m:(T>>8&255)/255,P:(T>>0&255)/255};this.update()}};eg.prototype.kW=function($,o){var T=o.zS,s={i:(T>>16&255)/255,m:(T>>8&255)/255,P:(T>>0&255)/255};
|
|
if(this.Sy==null){var E=new x(H.E.Q,!0);E.data={e:H.V.bl,j$:"crosshair",push:!0};this.J(E);this.bc=!1;
|
|
this.xH=o.Ba;this.$W=!1;this.Rl=o.dx;this.na=JSON.parse(JSON.stringify(s));this.agH.setAttribute("style","height:3em;background-color:#"+L.B$(T)+";")}this.Sy=s;
|
|
this.update()};eg.prototype.update=function(){var $=this.Sy,o=this.Qa($),T=this.Jl;T[0].a(Math.round($.i*255));
|
|
T[1].a(Math.round($.m*255));T[2].a(Math.round($.P*255));this.PX.a(L.B$(o));this.J6.value="#"+L.B$(o);
|
|
this.a9r.setAttribute("style","height:3em;background-color:#"+L.B$(o)+";");var s=L.sY($.i,$.m,$.P);T=this.xa;
|
|
T[0].a(Math.round(s.cQ*360));T[1].a(Math.round(s.rZ*100));T[2].a(Math.round(s.ed*100));this.Vt.a($);
|
|
if(this.Rl){this.xH(this.Qa(this.Sy));this.$W=!0}};eg.prototype.hl=function($){return Math.max(0,Math.min(255,$))};
|
|
eg.prototype.Yw=function($){return Math.max(0,Math.min(1,$))};function e_(){bq.call(this,[11,2],"contoureditor");
|
|
this.a0X=null;this.r9=null;this.response=null;this.VO=H.z("div","cell");this.body.appendChild(this.VO);
|
|
this.Pu=H.z("div","cell padded");this.body.appendChild(this.Pu);var $=H.z("div","bordered padded vmargin");
|
|
this.VO.appendChild($);this.AN=new gj;this.AN.B(H.E.O,this.Yj,this);$.appendChild(this.AN.k);this.bD=new hE("OK",!0,null,!0);
|
|
this.bD.B("click",this.close,this);this.Pu.appendChild(this.bD.k);this.coords=H.z("div","");this.coords.setAttribute("style","width:250px");
|
|
this.VO.appendChild(this.coords);this.cL=new d_("X (in)","%",4);this.xJ=new d_("Y (out)","%",4);this.ui=new ad([19,3,0]);
|
|
this.cL.B(H.E.O,this.Xl,this);this.xJ.B(H.E.O,this.Xl,this);this.ui.B(H.E.O,this.Xl,this);this.coords.appendChild(this.cL.k);
|
|
this.coords.appendChild(this.ui.k);this.coords.appendChild(this.xJ.k);this.B("closebtn",this.zl,this)}e_.prototype=new bq;
|
|
e_.prototype.f=function(){bq.prototype.f.call(this);this.ui.f()};e_.prototype.Yj=function($){this.r9.Crv.v=this.AN.v();
|
|
this.response(this.r9);this.IV()};e_.prototype.zl=function($){this.response(this.a0X)};e_.prototype.kW=function($,o){this.a0X=JSON.parse(JSON.stringify(o.Vi));
|
|
this.r9=o.Vi;this.response=o.response;this.AN.a(this.r9.Crv.v);this.IV()};e_.prototype.IV=function(){var f=this.AN.Q4();
|
|
this.coords.setAttribute("class",f==-1?"disabled":"");if(f==-1)return;var $=this.r9.Crv.v[f].v;this.cL.a(Math.round($.Hrzn.v*(100/255)));
|
|
this.xJ.a(Math.round($.Vrtc.v*(100/255)));this.ui.a($.Cnty.v)};e_.prototype.Xl=function($){var f=this.AN.Q4(),o=this.r9.Crv.v[f];
|
|
o.v.Hrzn.v=parseFloat(this.cL.v())*(255/100);o.v.Vrtc.v=parseFloat(this.xJ.v())*(255/100);o.v.Cnty.v=this.ui.v();
|
|
this.r9.Crv.v.sort(function(T,s){return T.v.Hrzn.v-s.v.Hrzn.v});this.AN.a(this.r9.Crv.v,this.r9.Crv.v.indexOf(o));
|
|
this.IV();this.response(this.r9)};function a3(){bq.call(this,[11,3],"csize");this.D2=0;this.bQ=H.z("div","form");
|
|
this.bQ.setAttribute("style","width:22em");this.body.appendChild(this.bQ);this.cf=new bc(!0,!0,!0,!0);
|
|
this.cf.a1t(!1);this.bQ.appendChild(this.cf.k);this.Yl=new eI("Align with",[[8,7],[12,6]]);this.Yl.B(H.E.O,this.a1U,this);
|
|
this.Dg=new c2([12,23,2],41);this.bQ.appendChild(this.Dg.k);this.Dg.a(4);this._w=new c4(!1);this._w.alr(new aY(0,0));
|
|
this.as=new hE("OK",!0,null,!0);this.as.B("click",this.eg,this);this.body.appendChild(this.as.k)}a3.prototype=new bq;
|
|
a3.prototype.cl=function($,o){return $!=null};a3.prototype.xQ=function(){return!0};a3.prototype.a1U=function(){var $=[this.Dg.k,this._w.k];
|
|
this.bQ.removeChild($[this.D2]);this.D2=this.Yl.v();this.bQ.appendChild($[this.D2])};a3.prototype.f=function(){bq.prototype.f.call(this);
|
|
this.cf.f();this.Yl.f();this.Dg.f();this._w.f()};a3.prototype.eg=function($){var o=this.cf.v(),T=o.x,s=o.y,E=new x(H.E.b0,!0);
|
|
E.data=D.LY.Fj(T,s,this.Dg.v());this.close();this.J(E)};a3.prototype.kW=function($,o){this.cf.a(new aY($.d,$.w),$.fG)};
|
|
function eD(){bq.call(this,[11,4],"duplinto");this.ZF=null;this.eu=null;this.c1=null;var $=H.z("div","form");
|
|
$.setAttribute("style","max-width:26em");this.body.appendChild($);this.$g=new h_([12,43],["abc","def"]);
|
|
this.$g.B(H.E.O,this.tm,this);$.appendChild(this.$g.k);H.ze($);this.fA=new h_("Artboard",["abc","def"]);
|
|
this.fA.B(H.E.O,this.tm,this);$.appendChild(this.fA.k);H.ze($);this.Cs=new d_([12,48],null,14);$.appendChild(this.Cs.k);
|
|
this.bD=new hE("OK",!0,null,!0);this.bD.B("click",this.eg,this);$.appendChild(this.bD.k)}eD.prototype=new bq;
|
|
eD.prototype.xQ=function(){return!0};eD.prototype.f=function(){bq.prototype.f.call(this);this.$g.f();
|
|
this.Cs.f()};eD.prototype.tm=function($){if($&&$.target==this.fA)return;var o=this.$g.v(),T=this.eu[o],s=this.ZF,E=T!=null&&T.add.artd!=null;
|
|
for(var f=0;f<s.D.length;f++)if(s.u[s.D[f]].add.artb)E=!1;this.Cs.ph(o==this.eu.length);this.fA.ph(E);
|
|
if(E){var e=T.root.children,n=[],A=this.c1=[];for(var f=0;f<e.length;f++){var u=e[f].c;if(u.add.artb)n.push(u.getName());
|
|
A.push(e[f].index)}this.fA.TY(n);this.fA.a(0)}else this.c1=null};eD.prototype.kW=function($,o,T){this.ZF=$;
|
|
this.eu=T;this.Cs.a($.D.length==0?"Layer":$.u[$.D[0]].getName());var s=[];for(var f=0;f<T.length;f++)s.push(T[f].name);
|
|
s.push([11,7]);this.$g.TY(s);this.$g.a(T.indexOf($));this.tm(null)};eD.prototype.eg=function($){var o=this.$g.v();
|
|
if(o==this.eu.length){var T=new iG(this.Cs.v()+".psd"),s=this.ZF.d,E=this.ZF.w,e=this.ZF.Q2();if(e!=-1){var n=this.ZF.u[e].co();
|
|
s=n.d;E=n.w}T.d=s;T.w=E;T.buffer=L.G(T.d*T.w*4);var A=T.$f();A.tM("Background");T.qp([A]);var u=new x(H.E.Q,!0);
|
|
u.US=!0;u.data={e:H.V.pl,u4:T};this.J(u)}var Y=this.ZF.aV(null,this.ZF!=this.eu[o]),u=new x(H.E.N,!0);
|
|
u.data={e:M.Wv,u:Y,vp:this.ZF,sa:this.eu[o]};if(this.c1)u.data.Tg=this.c1[this.fA.v()];u.U=D.Jc;u.US=!0;
|
|
this.J(u);this.close()};function aV(){bq.call(this,[1,9],"eassets");this.GH=null;this.fN=null;var $=H.z("div","form");
|
|
$.setAttribute("style","width:32em");this.body.appendChild($);this._E=H.z("span");$.appendChild(this._E);
|
|
H.ze($);this.nw=[new ad("Only layers / folders, whose name starts with \"-e-\""),new ad("Remove parts outside the canvas"),new ad("Trim transparent parts")];
|
|
for(var f=0;f<3;f++){var o=this.nw[f];o.a(!0);o.B(H.E.O,this.E4,this);$.appendChild(o.k);H.ze($)}this.YC=new fU([12,14,0],["1x","2x","3x","4x"]);
|
|
this.YC.a([!0,!1,!1,!1]);$.appendChild(this.YC.k);H.Qk($);this.PR=["PNG","JPG","SVG"];this.sf=new h_([12,50],this.PR);
|
|
this.sf.B(H.E.O,this.a6t,this);$.appendChild(this.sf.k);this.uI=new h8;$.appendChild(this.uI.k);this.as=new hE([1,9],!0,null,!0);
|
|
this.as.B("click",this.eg,this);$.appendChild(this.as.k);this.B("closebtn",this.PN,this)}aV.prototype=new bq;
|
|
aV.prototype.a6t=function($){this.uI.ajd(this.PR[this.sf.v()])};aV.prototype.PN=function($){this.fN=null};
|
|
aV.prototype.f=function(){bq.prototype.f.call(this);this.sf.f();this.YC.f();this.as.f();this.uI.f()};
|
|
aV.prototype.kW=function($,o,T){this.fN=$;this.E4()};aV.prototype.E4=function($){var o=this.acc(),T="- - - "+o.length+" exportable layers";
|
|
this._E.textContent=T;this.a6t(null)};aV.prototype.acc=function(){var $=this.nw[0].v(),o=[],T=this.fN;
|
|
for(var f=0;f<T.u.length;f++){var s=T.u[f],E=s.getName();if(!$&&!s.p3()&&!s.rect.p4()||E.startsWith("-e"))o.push(f)}return o};
|
|
aV.prototype.YE=function($,o){this.GH=$};aV.prototype.eg=function($){var o=this.fN,T=[this.PR[this.sf.v()]],s=[this.uI.v()],E=this.YC.v(),e={},n={},A=this.acc();
|
|
if(A.length==0){alert("No layers to export.");return}var u=[this.nw[1].v(),this.nw[2].v()];for(var f=0;
|
|
f<A.length;f++){var Y=A[f],b=o.u[Y],a=b.getName();if(n[a]!=null){n[a]++;a+=" "+n[a]}else n[a]=1;var w=b.N9();
|
|
b.bC(!0);for(var X=0;X<E.length;X++){if(!E[X])continue;var N=X+1,z=D.aD.cP(o,T,N,this.GH,Y,s,u);for(var i=0;
|
|
i<T.length;i++){var k=T[i],Q=a.slice(a.startsWith("-e-")?3:0)+(N==1?"":"-"+N+"x")+"."+k.toLowerCase();
|
|
if(z[i])e[Q]=new Uint8Array(z[i])}}b.bC(w)}var O=UZIP.encode(e),c=new x(H.E.Q,!0);c.data={e:H.V.QD,data:O,name:"assets.zip"};
|
|
this.J(c)};function gx(){bq.call(this,"Export Color Lookup Tables","exlut");this.GH=null;this.fN=null;
|
|
var $=H.z("div","form");$.setAttribute("style","width:20em");this.body.appendChild($);this.nw=[new ac("Grid Points",1,256),new eI([12,50],[".CUBE"])];
|
|
var o=[16,0];for(var f=0;f<this.nw.length;f++){var T=this.nw[f];T.a(o[f]);T.parent=this;T.B(H.E.O,this.E4,this);
|
|
$.appendChild(T.k);H.ze($)}this.as=new hE("OK",!0,null,!0);this.as.B("click",this.eg,this);$.appendChild(this.as.k);
|
|
this.B("closebtn",this.PN,this)}gx.prototype=new bq;gx.prototype.cl=function($,o){if(Math.min($.d,$.w)<16){alert("The document must be at least 16 x 16 pixels.",3200);
|
|
return!1}if($.u.length<2){alert("There must be a background layer and some adjustment layers.",3200);
|
|
return!1}return!0};gx.prototype.PN=function($){this.fN=null};gx.prototype.YE=function($,o){this.GH=$};
|
|
gx.prototype.kW=function($,o,T){this.fN=$};gx.prototype.eg=function(){var $=this.fN,o=this.nw[0].v(),T=[],s=new df(0,0,$.d,$.w),E=L.G(o*o*4),e=E.slice(0),n=new df($.d-o>>>1,$.w-o>>>1,o,o),A=$.u[0],u=A.buffer,Y=A.rect;
|
|
A.rect=n;A.buffer=E;for(var b=0;b<o;b++){this.acA(o,b,E);A.T(n);$.T(n);var a=$.aw();L.h9(a,s,e,n);for(var w=0;
|
|
w<o;w++)for(var X=0;X<o;X++){var N=w*o+X<<2;T.push(e[N]/255,e[N+1]/255,e[N+2]/255)}}var z=fp.ac1(T,o,$.name);
|
|
fV.save(z,$.name.split(".")[0]+".CUBE");A.buffer=u;A.rect=Y;A.T();$.T()};gx.prototype.acA=function($,o,T){var s=255/($-1),E=Math.round(o*s);
|
|
for(var e=0;e<$;e++)for(var n=0;n<$;n++){var A=e*$+n<<2;T[A]=Math.round(n*s);T[A+1]=Math.round(e*s);
|
|
T[A+2]=E;T[A+3]=255}};gx.prototype.f=function(){bq.prototype.f.call(this);for(var f=0;f<this.nw.length;
|
|
f++)this.nw[f].f()};function hZ(){bq.call(this,[1,14],"finfo");this.M4=null;this.pp=null;this.yG=null;
|
|
this.bQ=H.z("div","form scrollable label12");this.bQ.setAttribute("style","width:35em; height:38em; margin-bottom:8px");
|
|
this.body.appendChild(this.bQ);var $=H.z("div","form");this.body.appendChild($);this.o0=new h_(null,["Hello"]);
|
|
$.appendChild(this.o0.k);this.a1E=new hE("Add Parameter",!1,null,!0);$.appendChild(this.a1E.k);this.a1E.B("click",this.Fz,this);
|
|
this.Go=new hE("=== S A V E ===",!1,null,!0);$.appendChild(this.Go.k);this.Go.B("click",this.NQ,this);
|
|
this.akc=""}hZ.prototype=new bq;hZ.prototype.Kh=function($,o){return $<450||o<450?new aY(0,0):new aY(150,100)};
|
|
hZ.prototype.Fz=function($){if(this.yG.length==0)return;var o=this.yG[this.o0.v()],T=this.QV();T[o]=e2.RX[o][0];
|
|
this._O(T);this.pp[o].k.scrollIntoView();this.pp[o].K9()};hZ.prototype.VA=function($){var o=this.QV();
|
|
delete o[$.currentTarget.alS];this._O(o)};hZ.prototype.NQ=function($){var o=this.QV(),T=this.M4,s=!0;
|
|
for(var E in T)if(JSON.stringify(T[E])!=JSON.stringify(o[E]))s=!1;for(var E in o)if(JSON.stringify(T[E])!=JSON.stringify(o[E]))s=!1;
|
|
if(s)return;var e=new x(H.E.N,!0);e.U=D.Jc;e.data={e:M.OD,Y6:o};this.J(e);this.M4=o;this._O(o)};hZ.aj_=function($){function o(E){var e=E.toLowerCase();
|
|
return E==e}var T=$.split(":").pop();for(var s=1;s<T.length-1;s++){if(T[s]==T[s].toUpperCase()&&(o(T[s+1])||o(T[s-1]))){T=T.slice(0,s)+" "+T.slice(s);
|
|
s++}}return T};hZ.prototype.kW=function($,o){this.M4=$.sx;this._O($.sx)};hZ.prototype._O=function($){var o=this.bQ,E=0;
|
|
H.Ft(o);var T=this.pp={},s=["tiff","exif","exif:GPS"],e=this.yG=[],n=[];for(var A in e2.RX){var u=hZ.aj_(A),Y=0,b=15,a=null;
|
|
if($[A]==null){e.push(A);n.push(u);continue}for(var f=0;f<s.length;f++)if(A.startsWith(s[f]))Y=f;if(Y!=E){H.Qk(o);
|
|
E=Y}if(A=="tiff:ImageDescription"||A=="dc:Keywords"){b=18.5;a=3}var w=new d_(u,null,b,a);T[A]=w;var X=$[A];
|
|
if(X instanceof Array)X=X[1]==0?"---":X[0]+"/"+X[1];var N=new hE("\u2716",null,aX.get([5,4]));o.appendChild(N.k);
|
|
N.B("click",this.VA,this);N.alS=A;w.a(X);o.appendChild(w.k);H.ze(o);if(A=="exif:GPSLongitude"&&$["exif:GPSLatitude"]){this.akc=hZ.aoz($["exif:GPSLatitude"])+","+hZ.aoz($["exif:GPSLongitude"]);
|
|
var z=new hE("Show on map",!1,null,!0);o.appendChild(z.k);H.ze(o);z.B("click",this.aat,this)}}this.o0.TY(n);
|
|
this.o0.a(0)};hZ.prototype.QV=function(){var $=this.pp,o=e2.RX,T={};for(var s in o){var E=o[s][0],e=typeof E;
|
|
if(E==null||$[s]==null)continue;var n=$[s].v(),A="The value of \""+hZ.aj_(s)+"\" must ";if(e=="number"){n=parseFloat(n);
|
|
if(isNaN(n)){alert(A+"be a number.");n=E}}else if(E instanceof Array&&E.length==2){if(n.indexOf("/")==-1){alert(A+"be a fraction.");
|
|
n=E.slice(0)}else{n=n.split("/").map(parseFloat);if(isNaN(n[0])||isNaN(n[1])){n=E.slice(0)}}}T[s]=n}return T};
|
|
hZ.aoz=function($){var o=$.length,T=$.slice(0,o-1).split(",").map(parseFloat),s=$.slice(o-1),E=T[0]+T[1]/60+T[2]/3600;
|
|
if(s!="N"&&s!="E")E=-E;return E};hZ.prototype.aat=function($){window.open("https://maps.google.com?q="+this.akc,"Map")};
|
|
function cz(){bq.call(this,[11,5],"gradienteditor");this.na=null;this.Sy=null;this.jI=null;this.xH=null;
|
|
this.$W=!1;this.Rl=!1;H.v2(this.body,"form");this.nY=null;this.jO=null;this.SV=-1;this.rl=-1;this.S6=0;
|
|
this.hx=this.LO.bind(this);this.jF=this.AK.bind(this);this.S=H.z("canvas","");this.V8=this.S.getContext("2d");
|
|
this.S.setAttribute("style","display:block");this.FH=null;H.fb(this.S);H.uE(this.S,this.go.bind(this));
|
|
this.o$=new ac([19,3,3],0,100,"%");this.o$.B(H.E.O,this.nE,this);this.o$.parent=this;this.body.appendChild(this.o$.k);
|
|
H.ze(this.body);this.qL=new eB([12,0]);this.body.appendChild(this.qL.k);this.Ae=H.z("div","bordered padded noalign");
|
|
this.body.appendChild(this.Ae);this.yV=new ac([12,0],0,100,"%");this.yV.parent=this;this.yV.B(H.E.O,this.nE,this);
|
|
this.Ae.appendChild(this.yV.k);this.xY=new ac([12,40],0,100,"%");this.xY.parent=this;this.xY.B(H.E.O,this.nE,this);
|
|
this.Ae.appendChild(this.xY.k);this.rH=new hE([5,4],!1,null,!0);this.rH.B("click",this.alw,this);this.Ae.appendChild(this.rH.k);
|
|
this.body.appendChild(this.S);H.ze(this.body);this.acZ=new eB([13,0]);this.body.appendChild(this.acZ.k);
|
|
this.P9=H.z("div","bordered padded noalign");this.body.appendChild(this.P9);this.pN=new h_([12,44],[[12,45],[12,46],[12,47]]);
|
|
this.pN.B(H.E.O,this.nE,this);this.P9.appendChild(this.pN.k);this.zt=new hJ(!0);this.zt.parent=this;
|
|
this.zt.B(H.E.O,this.nE,this);this.P9.appendChild(this.zt.k);this.d2=new ac([12,40],0,100,"%");this.d2.parent=this;
|
|
this.d2.B(H.E.O,this.nE,this);this.P9.appendChild(this.d2.k);this.XR=new hE([5,4],!1,null,!0);this.XR.B("click",this.apB,this);
|
|
this.P9.appendChild(this.XR.k);this.bD=new hE("OK",!0,null,!0);this.bD.B("click",this.eg,this);this.body.appendChild(this.bD.k);
|
|
this.B("closebtn",this.WB,this)}cz.prototype=new bq;cz.prototype.WB=function($){if(this.$W)this.xH(this.na)};
|
|
cz.prototype.f=function(){bq.prototype.f.call(this);this.o$.f();this.qL.f();this.acZ.f();this.rH.f();
|
|
this.XR.f();this.yV.f();this.xY.f();this.pN.f();this.d2.f()};cz.prototype.YE=function($,o){this.jI=$};
|
|
cz.prototype.kW=function($,o){this.Sy=JSON.parse(JSON.stringify(o.h));this.na=JSON.parse(JSON.stringify(o.h));
|
|
this.nY=this.jO=null;this.xH=o.Ba;this.$W=!1;this.Rl=o.dx;this.bT();this.Ug()};cz.prototype.eg=function($){var o=this.Sy;
|
|
this.xH(o);this.close()};cz.prototype.Ty=function($){return $==dN.sV||$==dN.Ln};cz.prototype.Vb=function($,o,T,s){if(s.L(dN.sV)||s.L(dN.Ln)){if(this.jO)this.alw();
|
|
if(this.nY)this.apB()}};cz.prototype.alw=function($){var o=this.Sy.Trns.v;if(this.jO==null||o.length==1)return;
|
|
o.splice(o.indexOf(this.jO),1);this.jO=null;this.bT();this.Ug()};cz.prototype.apB=function($){var o=this.Sy.Clrs.v;
|
|
if(this.nY==null||o.length==1)return;o.splice(o.indexOf(this.nY),1);this.nY=null;this.bT();this.Ug()};
|
|
cz.prototype.bT=function(){var $=this.S,o=this.V8,T=H.K();$.width=Math.floor(410*T);$.height=Math.floor(90*T);
|
|
H.kg($,$.width,$.height);this.FH=new df(0,0,Math.floor(380*T),Math.floor(32*T));this.FH.x=Math.floor(($.width-this.FH.d)/2);
|
|
this.FH.y=Math.floor(($.height-this.FH.w)/2);var s=this.FH,E=s.d,e=s.w,n=s.x,A=s.y,u=new df(0,0,E,e),Y=o.getImageData(0,0,E,e),b=new Uint8Array(Y.data.buffer);
|
|
L.qU(b,E,e,8);var a=L.G(E*e*4);L.h.Xo(this.Sy,a,u,[1/E,0,0,1/e],E/2,e/2,!1,0,this.jI.z4,this.jI.GR);
|
|
L.R.xE("norm",a,s,b,s,s,1);o.clearRect(0,0,$.width,$.height);o.putImageData(Y,n,A);var w=this.Sy.Trns.v,X=this.Sy.Clrs.v,N=L.h.Bu(X,this.jI.z4,this.jI.GR),z=Math.round(6*H.K()),i=Math.round(14*H.K()),k=this.jO?this.jO.v:null,Q=this.nY?this.nY.v:null;
|
|
for(var f=0;f<w.length;f++){var O=w[f].v,c=Math.round(255-255*O.Opct.v.val/100);if((O==k||w[f-1]&&w[f-1].v==k||f==this.rl)&&f!=0){o.fillStyle="#000000";
|
|
o.fillRect(n-3+E*(w[f-1].v.Lctn.v+(O.Lctn.v-w[f-1].v.Lctn.v)*O.Mdpn.v/100)/4096,A-6-2,6,6)}if(O==k){o.fillStyle="#ffffff";
|
|
o.fillRect(n-z+E*(O.Lctn.v/4096)-2,A-2-i-2,2*z+4,i+4)}o.fillStyle="rgb("+c+","+c+","+c+")";o.fillRect(n-z+E*(O.Lctn.v/4096),A-2-i,2*z,i)}for(var f=0;
|
|
f<X.length;f++){var B=X[f].v,G=N[f];if((B==Q||X[f-1]&&X[f-1].v==Q||f==this.SV)&&f!=0){o.fillStyle="#000000";
|
|
o.fillRect(n-3+E*(X[f-1].v.Lctn.v+(B.Lctn.v-X[f-1].v.Lctn.v)*B.Mdpn.v/100)/4096,A+e+2,6,6)}if(B==Q){o.fillStyle="#ffffff";
|
|
o.fillRect(n-z+E*(B.Lctn.v/4096)-2,A+e+2-2,2*z+4,i+4)}o.fillStyle="rgb("+Math.round(G.i)+", "+Math.round(G.m)+","+Math.round(G.P)+")";
|
|
o.fillRect(n-z+E*(B.Lctn.v/4096),A+e+2,2*z,i)}if(this.Rl){this.xH(this.Sy);this.$W=!0}};cz.prototype.Ug=function(){this.o$.a(Math.round(100*this.Sy.Intr.v/4096));
|
|
var $=this.Sy.Trns.v,o=this.Sy.Clrs.v,T=this.jO!=null,s=this.rl!=-1;this.yV.ph(T);this.xY.ph(T||s);this.rH.ph(T);
|
|
if(T){this.Ae.setAttribute("style","");var E=this.jO.v;this.xY.a(Math.round(100*E.Lctn.v/4096));this.yV.a(E.Opct.v.val)}if(s)this.xY.a($[this.rl].v.Mdpn.v);
|
|
var T=this.nY!=null,s=this.SV!=-1;this.pN.ph(T);this.zt.ph(T);this.d2.ph(T||s);this.XR.ph(T);if(T){this.P9.setAttribute("style","");
|
|
var e=this.nY.v;this.d2.a(Math.round(100*e.Lctn.v/4096));var n=e.Type.v.Clry;this.pN.a(["FrgC","BckC","UsrS"].indexOf(n));
|
|
if(n=="FrgC")this.zt.Ab(this.jI.z4);if(n=="BckC")this.zt.Ab(this.jI.GR);if(n=="UsrS")this.zt.a(e.Clr.v)}if(s)this.d2.a(o[this.SV].v.Mdpn.v)};
|
|
cz.prototype.nE=function($){var o=Math.round(4096*this.o$.v()/100);this.Sy.Intr.v=o;var T=this.Sy.Trns.v,s=this.Sy.Clrs.v;
|
|
if(this.jO!=null){var E=this.jO.v;E.Lctn.v=Math.round(4096*(this.xY.v()/100));E.Opct.v.val=this.yV.v()}if(this.nY!=null){var e=this.nY.v;
|
|
e.Lctn.v=Math.round(4096*(this.d2.v()/100));if($.target==this.zt)this.pN.a(2);var n=this.pN.v();e.Type.v.Clry=["FrgC","BckC","UsrS"][n];
|
|
if(n==2)e.Clr={t:"Objc",v:this.zt.v()};else if(e.Clr)delete e.Clr}if(this.rl!=-1)T[this.rl].v.Mdpn.v=this.xY.v();
|
|
if(this.SV!=-1)s[this.SV].v.Mdpn.v=this.d2.v();this.bT()};cz.prototype.go=function($){var o=H.DQ($,this.S),T=this.FH,s=(o.x*H.K()-T.x)/T.d,E=(o.y*H.K()-T.y)/T.w,e=this.Sy.Trns.v,n=this.Sy.Clrs.v,A=null,u=null,Y=-1,b=-1;
|
|
if(E<1)for(var f=0;f<e.length;f++){var a=e[f].v;if(Math.abs(a.Lctn.v/4096-s)<.02)A=e[f];if(f>0)if(Math.abs((e[f-1].v.Lctn.v+(a.Lctn.v-e[f-1].v.Lctn.v)*a.Mdpn.v/100)/4096-s)<.01)Y=f}if(E>0)for(var f=0;
|
|
f<n.length;f++){var w=n[f].v;if(Math.abs(w.Lctn.v/4096-s)<.02)u=n[f];if(f>0)if(Math.abs((n[f-1].v.Lctn.v+(w.Lctn.v-n[f-1].v.Lctn.v)*w.Mdpn.v/100)/4096-s)<.01)b=f}if(u==null&&A==null&&Y==-1&&b==-1){if(E<0){var a={t:"Objc",v:{classID:"TrnS",Opct:{t:"UntF",v:{type:"#Prc",val:100}},Lctn:{t:"long",v:0},Mdpn:{t:"long",v:50}}};
|
|
a.v.Lctn.v=Math.round(s*4096);e.push(a);e.sort(this.Ky);A=a}if(E>1){var n=this.Sy.Clrs.v,X=L.h.Bu(n,this.jI.z4,this.jI.GR),N=L.h.cC(this.Sy,X,s),w={t:"Objc",v:{classID:"Clrt",Clr:{t:"Objc",v:L.h.wb({i:N&255,m:N>>8&255,P:N>>16&255})},Type:{t:"enum",v:{Clry:"UsrS"}},Lctn:{t:"long",v:0},Mdpn:{t:"long",v:50}}};
|
|
w.v.Lctn.v=Math.round(s*4096);n.push(w);n.sort(this.Ky);u=w}}if(u!=null)b=-1;if(A!=null)Y=-1;if(u!=null||A!=null||Y>-1||b>-1){this.jO=A;
|
|
this.nY=u;this.rl=Y;this.SV=b;this.Ug();this.bT();H.mW(window,this.hx);H.aa(window,this.jF)}};cz.prototype.LO=function($){var o=H.DQ($,this.S),T=this.FH,s=(o.x*H.K()-T.x)/T.d,E=(o.y*H.K()-T.y)/T.w;
|
|
s=Math.max(0,Math.min(1,s));var e=this.Sy.Trns.v,n=this.Sy.Clrs.v;if(this.jO!=null){var A=this.jO.v;
|
|
A.Lctn.v=Math.round(4096*s);var u=e.indexOf(this.jO);if(u!=-1&&E<-1&&e.length>1)e.splice(u,1);if(u==-1&&E>-1)e.push(this.jO);
|
|
e.sort(this.Ky)}if(this.nY!=null){var Y=this.nY.v;Y.Lctn.v=Math.round(4096*s);var b=n.indexOf(this.nY);
|
|
if(b!=-1&&E>1.5&&n.length>1)n.splice(b,1);if(b==-1&&E<1.5)n.push(this.nY);n.sort(this.Ky)}if(this.rl>-1){var A=e[this.rl].v;
|
|
A.Mdpn.v=Math.max(5,Math.min(95,Math.round(100*(s*4096-e[this.rl-1].v.Lctn.v)/(A.Lctn.v-e[this.rl-1].v.Lctn.v))))}if(this.SV>-1){var Y=n[this.SV].v;
|
|
Y.Mdpn.v=Math.max(5,Math.min(95,Math.round(100*(s*4096-n[this.SV-1].v.Lctn.v)/(Y.Lctn.v-n[this.SV-1].v.Lctn.v))))}if(this.jO!=null||this.nY!=null||this.rl>-1||this.SV>-1){this.Ug();
|
|
this.bT()}};cz.prototype.AK=function($){H.vY(window,this.hx);H.SY(window,this.jF);if(Date.now()-this.S6<300){if(this.SV!=-1||this.rl!=-1){var o=(this.SV!=-1?this.Sy.Clrs.v[this.SV]:this.Sy.Trns.v[this.rl]).v;
|
|
o.Mdpn.v=50;this.Ug();this.bT()}else if(this.nY!=null)this.zt.aqu()}this.S6=Date.now()};cz.prototype.Ky=function($,o){return $.v.Lctn.v-o.v.Lctn.v};
|
|
function gJ(){bq.call(this,[11,10],"isize");this.bQ=H.z("div","form");this.bQ.setAttribute("style","width:20em");
|
|
this.body.appendChild(this.bQ);this.cf=new bc(!0,!0);this.bQ.appendChild(this.cf.k);this.rR=new ad("Resample");
|
|
this.rR.a(!0);this.bQ.appendChild(this.rR.k);this.rR.B(H.E.O,this.anX,this);this.qW=new h_([12,14,1],[[12,14,2],[12,14,3],"Bicubic Sharper"]);
|
|
this.qW.a(1);this.bQ.appendChild(this.qW.k);this.as=new hE("OK",!0,null,!0);this.as.B("click",this.eg,this);
|
|
this.body.appendChild(this.as.k)}gJ.prototype=new bq;gJ.prototype.cl=function($,o){return $!=null};gJ.prototype.xQ=function(){return!0};
|
|
gJ.prototype.anX=function($){var o=this.rR.v(),T=this.cf,s=this.qW;if(o)s.wI();else s.v9();if(o)T.agS();
|
|
else T.a0b()};gJ.prototype.f=function(){bq.prototype.f.call(this);this.qW.f();this.cf.f()};gJ.prototype.eg=function($){this.close();
|
|
var o=this.cf.v(),T=o.x,s=o.y,E=this.qW.v();if(!this.rR.v())E=null;var e=new x(H.E.b0,!0);e.data=D.LY.YQ(T,s,this.cf.Lf(),E);
|
|
this.J(e)};gJ.prototype.kW=function($,o){this.cf.a(new aY($.d,$.w),$.fG)};function fa(){bq.call(this,"Import RAW","importraw");
|
|
var $=H.z("div","flexrow"),o=H.z("div");o.setAttribute("style","margin-bottom: 1em");this.body.appendChild($);
|
|
this.body.appendChild(o);var T=H.z("div","form");T.setAttribute("style","width:18em");$.appendChild(T);
|
|
var s=H.z("div","form");s.setAttribute("style","width:15em");$.appendChild(s);this.hW=null;this.al3=null;
|
|
this.WP=null;this.cW=null;this.a4p=[];var E=[];for(var f=0;f<fa.Gz.length;f++)E.push(fa.Gz[f]+" Bits");
|
|
var e=this.V1=[new bc(!0,null,null,!0),new ac([12,72],1,8),new ad("Last one is Transparency"),new eI([12,34],E),new eI("Byte Order",["12-34","34-12"]),new h_("Guesses",[])];
|
|
for(var f=0;f<e.length;f++){var n=e[f];n.parent=this;n.B(H.E.O,f==5?this.akW:this.tm,this);var A=f==0?T:f==5?o:s;
|
|
A.appendChild(n.k)}this.S=H.z("canvas");this.V8=this.S.getContext("2d");this.body.appendChild(this.S);
|
|
this.as=new hE("OK",!0,null,!0);this.as.B("click",this.eg,this);this.body.appendChild(this.as.k)}fa.prototype=new bq;
|
|
fa.prototype.f=function(){bq.prototype.f.call(this);var $=this.V1;for(var f=0;f<$.length;f++)$[f].f()};
|
|
fa.prototype.eg=function($){this.close();var o=this.V1[0].v(),T=eY.sO(this.al3,[{data:this.WP,Sg:new df(0,0,o.x,o.y)}]);
|
|
if(this.cW)T.iy=this.cW;var s=new x(H.E.Q,!0);s.data={e:!0?H.V.pl:H.V.Fu,u4:T};this.J(s)};fa.Gz=[8,16];
|
|
fa.prototype.kW=function($,o){this.hW=new Uint8Array(o.D$);this.al3=o.FZ;var T=this.hW.length,s=[1,3,4],E=0,e=0,n=1,A=1,u=this.a4p=[];
|
|
for(var Y=0;Y<3;Y++){for(var b=0;b<2;b++){var a=fa.Gz[b],w=s[Y],X=w*a,N=Math.round(T*8/X);if(N!=T*8/X)continue;
|
|
for(var z=0;z<=4e3;z++)for(var i=0;i<=4e3;i++)if(z*i==N){var k=0;if(z==i)k+=64;if(Math.round(z/100)==z/100&&Math.round(i/100)==i/100)k+=32;
|
|
if(Math.round(z/10)==z/10&&Math.round(i/10)==i/10)k+=16;if(Math.round(z/2)==z/2&&Math.round(i/2)==i/2)k+=8;
|
|
u.push([z,i,w,a,k])}}}var Q=function(G,l){if(l[4]!=G[4])return l[4]-G[4];var v=Math.max(G[0],G[1])/Math.min(G[0],G[1]),p=Math.max(l[0],l[1])/Math.min(l[0],l[1]);
|
|
if(v!=p)return v-p;return l[0]-G[0]};u.sort(Q);var O=this.V1,c=[];for(var f=0;f<u.length;f++){var B=u[f];
|
|
c.push(B[0]+" x "+B[1]+", "+B[2]+"ch, "+B[3]+"-bit")}O[5].TY(c);O[5].a(0);this.akW(null)};fa.prototype.akW=function($){var o=this.V1,T=this.a4p[this.V1[5].v()];
|
|
o[0].a(new aY(T[0],T[1]),72);o[1].a(T[2]);o[3].a(fa.Gz.indexOf(T[3]));this.tm()};fa.prototype.tm=function($){var o=this.V1,T=o[0].v(),s=T.x,E=T.y,e=fa.Gz[o[3].v()],n=this.hW;
|
|
if(e==16&&o[4].v()==1){n=n.slice(0);for(var f=0;f<n.length;f+=2){var A=n[f];n[f]=n[f+1];n[f+1]=A}}var u=this.WP=this.yj(n,s,E,o[1].v(),e,o[2].v()),Y=this.S,b=this.V8,a=[u,new df(0,0,s,E)];
|
|
L.mc(a);for(var f=0;f<a.length;f+=2)if(a[f+1].w<300){u=a[f];s=a[f+1].d;E=a[f+1].w;break}Y.width=s;Y.height=E;
|
|
H.kg(Y,s,E);var w=new ImageData(new Uint8ClampedArray(u.buffer),s,E);b.putImageData(w,0,0)};fa.prototype.yj=function($,o,T,s,E,e){this.cW=null;
|
|
var n=[],A=o*T;for(var u=0;u<s;u++){var Y=L.G(A);n.push(Y);if(E==8)for(var f=0;f<A;f++)Y[f]=$[f*s+u];
|
|
else if(E==16)for(var f=0;f<A;f++)Y[f]=$[(f*s+u)*2]}var b=L.G(A*4);new Uint32Array(b.buffer).fill(4278190080);
|
|
if(e){L.aM(n.pop(),b,3);s--}if(s==0){}else if(s==1)L.R6(n[0],b);else{L.aM(n[0],b,0);L.aM(n[1],b,1);if(s>2){L.aM(n[2],b,2);
|
|
if(s>3){this.cW=[];for(var f=3;f<s;f++){var a=new M.Zb;a.name="Alpha "+(f-2);a.rect=new df(0,0,o,T);
|
|
a.channel=n[f];this.cW.push(a)}}}}return b};function hF($,o,T){aI.call(this);this.k=H.z("div","");this.C3=$;
|
|
this.DP=null;this.EO=o==null?!1:o;this.vI=null;this.i7=T;this.rp=[];this.YB=[];this.li=[];this.Il=[];
|
|
this.i0=0;this.DP=this.aoY(hF.Il[$]);this.jq();this.D1=null;this.a4W;this.alT}hF.prototype=new aI;hF.prototype.iO=function($,o,T,s,E){this.D1=E;
|
|
this.a4W=JSON.parse(JSON.stringify(this.vI));if(this.DP.lagl)this.alT=this.DP.lagl.v()};hF.prototype.ZS=function($,o,T,s,E){var e=this.D1,n=this.C3,A=this.a4W;
|
|
if(e==null)return;var u=(E.x-e.x)/$.C.X,Y=(E.y-e.y)/$.C.X;if(n=="GrFl"){var b=JSON.parse(JSON.stringify(A.Ofst.v));
|
|
b.Hrzn.v.val+=u*.5;b.Vrtc.v.val+=Y*.5;this.DP.Ofst.a(b,!0)}if(n=="patternFill"){var b=JSON.parse(JSON.stringify(A.phase.v));
|
|
b.Hrzn.v+=u;b.Vrtc.v+=Y;this.DP.phase.a(b,!0)}if(n=="DrSh"||n=="IrSh"||n=="ChFX"){var a=A.Dstn.v.val,w=this.alT.a4*Math.PI/180,X=-Math.cos(w)*a+u,N=Math.sin(w)*a+Y;
|
|
this.DP.Dstn.a(Math.sqrt(X*X+N*N),!0);this.DP.lagl.a(Math.atan2(N,-X)*180/Math.PI,null,!0)}};hF.prototype.yg=function($,o,T,s,E){this.D1=null};
|
|
hF.prototype.a7C=function(){for(var f=0;f<this.Il.length;f++){H.oX(this.Il[f],"selected");if(this.li[f]instanceof ad)this.li[f].a(!1)}};
|
|
hF.prototype.a2t=function($){var o=this.a8w.bind(this);for(var f=0;f<this.li.length;f++){var T=H.z("div","listitem");
|
|
this.Il.push(T);if(f>0)T.textContent="\u2003";T.appendChild(this.li[f].k);if(ev.Eb.indexOf(this.C3)!=-1){var s=new hE("+");
|
|
s.UM();s.k.style.float="right";T.appendChild(s.k);var E=new hE("\u2B0D");E.UM();E.k.style.float="right";
|
|
E.k.style["margin-right"]="2px";T.appendChild(E.k)}T.addEventListener("click",o,!1);$.appendChild(T)}};
|
|
hF.iV=function($,o){var T=o.getBoundingClientRect();return($.clientY-T.top)/T.height};hF.prototype.a8w=function($){var o=$.target.tagName.toLowerCase();
|
|
if(o=="input"){return}if(o=="button"){var T=new x(H.E.N,!0),s=$.target.textContent=="+",E=s?0:hF.iV($,$.target)<.5?-1:1;
|
|
if(s)T.data={e:"st_dupsingle",c:this.parent.data.c,S9:this.i7};else T.data={e:"st_movsingle",c:this.parent.data.c,S9:this.i7,afA:E};
|
|
T.U=D.b8;T.US=!0;this.J(T);T=new x("redrawall",!0);T.data={afA:E};this.J(T);return}H.zl($);this.FA();
|
|
this.i0=this.Il.indexOf($.currentTarget);this.J(new x("showme"))};hF.prototype.FA=function(){if(this.DP.enab&&this.DP.enab.v()==!1)this.wt({BU:"enab",H:!0})};
|
|
hF.prototype.a38=function(){var $=this.Il[this.i0];if($)H.v2($,"selected");return this.YB[this.i0]};
|
|
hF.prototype.aoY=function($){var o={};for(var f=0;f<$.length;f++){var T=$[f],s=null;if(T=="----")s={k:H.z("hr")};
|
|
if(T=="\n")s={k:H.z("br")};if(T=="blOptions")s=new eB([14,10]);if(T=="brst")s=new fU([12,72],["R","G","B"]);
|
|
if(T=="knko")s=new h_("Knockout",[[13,1,0],"Shallow","Deep"]);if(T=="enab")s=new ad(ev.names[ev.order.indexOf(this.C3)]);
|
|
if(T=="lrMd"||T=="Md")s=new h_([12,19,0],hI.fC,!1,hI.xx);if(T=="Opct")s=new a4([12,0],0,100,"%");if(T=="iOpa")s=new a4([12,26],0,100,"%");
|
|
if(T=="blIf")s=new ao;if(T=="ShdN")s=new a4([12,68],0,100,"%");if(T=="lagl"||T=="Angl")s=new iF([12,15],this.C3=="ebbl");
|
|
if(T=="uglg")s=new ad([12,27]);if(T=="Dstn")s=new a4([12,28],0,200,"px");if(T=="Ckmt")s=new a4([12,29],0,100,"%");
|
|
if(T=="blur")s=new a4([12,14,0],0,200,"px");if(T=="TrnS"||T=="MpgS")s=new eT([12,21]);if(T=="Nose")s=new a4([12,30],0,100,"%");
|
|
if(T=="layerConceals")s=new ad([12,31]);if(T=="AntA"||T=="antialiasGloss")s=new ad("Anti-alias");if(T=="GlwT")s=new h_([12,32],ev.Gq.names);
|
|
if(T=="glwS")s=new h_([12,70],ev.Gq.ai9);if(T=="Inpr")s=new a4([12,12],1,100,"%");if(T=="bvlS")s=new h_([12,22],ev.Ll.style);
|
|
if(T=="bvlT")s=new h_([12,32],ev.Ll.adn);if(T=="bvlD")s=new h_(null,ev.Ll.dir);if(T=="srgR")s=new a4([12,34],0,1e3,"%");
|
|
if(T=="Sftn")s=new a4([12,35],0,20,"px");if(T=="Lald")s=o.lagl;if(T=="hglM"||T=="sdwM")s=new h_([12,36],hI.fC,!1,hI.xx);
|
|
if(T=="hglC"||T=="sdwC")s=new hJ;if(T=="hglO"||T=="sdwO")s=new a4([12,0],0,100,"%");if(T=="Invr"||T=="InvT")s=new ad([4,11]);
|
|
if(T=="Sz")s=new a4([12,14,0],1,200,"px");if(T=="Styl")s=new h_([12,40],ev.stroke.names);if(T=="PntT")s=new h_([12,66],ev.stroke.abS);
|
|
if(T=="Clr")s=new hJ(!0);if(T=="Grad"){s=new dU(!0,[12,37],!0);s.a(JSON.parse(ev.rN.f4).v)}if(T=="Rvrs")s=new ad([12,23,0]);
|
|
if(T=="Dthr")s=new ad("Dither");if(T=="Type")s=new h_([12,22],ev.h.names.slice(0,this.C3=="FrFX"?6:5));
|
|
if(T=="Ptrn")s=new aC([12,62]);if(T=="Scl")s=new a4([12,38],10,500,"%",0,!0);if(T=="Algn")s=new ad([12,39]);
|
|
if(T=="Ofst")s=new c4(!0);if(T=="phase")s=new c4(!1);if(T=="useShape")s=new ad([12,21]);if(T=="useTexture")s=new ad([12,67]);
|
|
if(T=="textureDepth")s=new a4([12,34],-300,300,"%");var E=T=="----"||T=="\n"?T+f:T;if(s!=null)o[E]=s}return o};
|
|
hF.prototype.a9A=function($){var o=this.YB[this.i0];for(var f=0;f<$.length;f++){var T=this.DP[$[f]];
|
|
if(T&&o.contains(T.k))o.removeChild(T.k)}};hF.prototype.ak_=function($){var o=this.YB[this.i0];for(var f=0;
|
|
f<$.length;f++){var T=this.DP[$[f]];if(T&&!o.contains(T.k))o.appendChild(T.k)}};hF.prototype.YE=function($,o){if(this.DP==null)return;
|
|
var T=o==gr.zo;if(this.DP.Grad){this.DP.Grad.zL($.z4,$.GR);if(T||o==gr.ux||o==gr.HZ)this.DP.Grad.bq($.hD)}if(this.DP.Ptrn){if(T||o==gr.WW)this.DP.Ptrn.bq($.q_)}if(this.DP.TrnS){if(T||o==gr.tS)this.DP.TrnS.bq($.a2)}if(this.DP.MpgS){if(T||o==gr.tS)this.DP.MpgS.bq($.a2)}};
|
|
hF.prototype.f=function(){for(var f=0;f<this.rp.length;f++)this.rp[f].f();for(var $ in this.DP)if(this.DP[$]instanceof aI)this.DP[$].f()};
|
|
hF.prototype.jq=function(){for(var $ in this.DP){var o=this.DP[$];o.parent=this;if(o instanceof aI)o.B(H.E.O,this.a82,this);
|
|
if(this.YB.length==0||$=="useShape"||$=="useTexture"){var T=new eB(o.apK()),s=H.z("div","bordered padded");
|
|
if(this.EO==!1){s.appendChild(T.k);s.appendChild(H.z("hr",""))}this.rp.push(T);this.YB.push(s);this.li.push(o)}else this.YB[this.YB.length-1].appendChild(o.k)}};
|
|
hF.prototype.update=function($,o){if(this.DP==null)return;this.vI=JSON.parse(JSON.stringify(o));for(var T in o){if("Opct iOpa hglO sdwO Dstn Ckmt blur Nose Scl Sz Inpr Angl srgR Sftn textureDepth ShdN".split(" ").indexOf(T)!=-1)this.DP[T].a(o[T].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(T)!=-1){this.DP[T].a(o[T].v,$)}if(["Md","hglM","sdwM"].indexOf(T)!=-1)this.DP[T].a(hI.C3.indexOf(o[T].v.BlnM));
|
|
if(T=="lrMd"){var s=(o.p3?[[15,10,27]]:[]).concat(hI.fC),E=(o.p3?[1]:[]).concat(hI.xx);this.DP[T].TY(s,E);
|
|
this.DP[T].a(o[T].v)}if(T=="lagl"){var e=o.uglg&&o.uglg.v?$.ou():o.lagl.v.val;this.DP[T].a(e)}if(T=="Lald"){var e=o.uglg&&o.uglg.v?$.RS():o.Lald.v.val;
|
|
this.DP[T].a(null,e)}if(T=="Type")this.DP[T].a(ev.h.types.indexOf(o.Type.v.GrdT));if(T=="Styl")this.DP[T].a(ev.stroke.types.indexOf(o.Styl.v.FStl));
|
|
if(T=="PntT"){var n=ev.stroke.O2.indexOf(o.PntT.v.FrFl);this.DP[T].a(n);if(!this.EO){this.a9A(ev.k9.concat(ev.cw.concat(ev.SZ)));
|
|
this.ak_([ev.k9,ev.cw,ev.SZ][n])}}if(T=="GlwT")this.DP[T].a(ev.Gq.types.indexOf(o.GlwT.v.BETE));if(T=="glwS")this.DP[T].a(ev.Gq.WS.indexOf(o.glwS.v.IGSr));
|
|
if(T=="bvlS")this.DP[T].a(ev.Ll.types.indexOf(o.bvlS.v.BESl));if(T=="bvlT")this.DP[T].a(ev.Ll.kX.indexOf(o.bvlT.v.bvlT));
|
|
if(T=="bvlD")this.DP[T].a(["In","Out"].indexOf(o.bvlD.v.BESs))}};hF.prototype.a82=function($){for(var o in this.DP){if(this.DP[o]!=$.target)continue;
|
|
var T=null,s=!1;if("Opct iOpa hglO Nose Scl sdwO Inpr srgR textureDepth ShdN".split(" ").indexOf(o)!=-1)T={type:"#Prc",val:$.target.v()};
|
|
if(["Dstn","Ckmt","blur","Sz","Sftn"].indexOf(o)!=-1)T={type:"#Pxl",val:$.target.v()};if(["Angl","lagl"].indexOf(o)!=-1)T={type:"#Ang",val:$.target.v().a4};
|
|
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(o)!=-1)T=$.target.v();
|
|
if(["Md","hglM","sdwM"].indexOf(o)!=-1)T={BlnM:hI.C3[$.target.v()]};if(o=="uglg"){T=$.target.v();s=!0}if(o=="PntT"){T={FrFl:ev.stroke.O2[$.target.v()]};
|
|
s=!0}if(o=="Lald")T={type:"#Ang",val:$.target.v().alt};if(o=="Type")T={GrdT:ev.h.types[$.target.v()]};
|
|
if(o=="Styl")T={FStl:ev.stroke.types[$.target.v()]};if(o=="GlwT")T={BETE:ev.Gq.types[$.target.v()]};
|
|
if(o=="glwS")T={IGSr:ev.Gq.WS[$.target.v()]};if(o=="bvlS")T={BESl:ev.Ll.types[$.target.v()]};if(o=="bvlT")T={bvlT:ev.Ll.kX[$.target.v()]};
|
|
if(o=="bvlD")T={BESs:["In","Out"][$.target.v()]};this.wt({BU:o,H:T});if(s){if(this.EO)this.update(null,this.vI);
|
|
else{var E=this.parent,e=E.u4,n=this.i7,A=e.u[E.data.c].add.lmfx[ev.CP[n[0]]].v[n[1]].v;this.update(e,A)}}}};
|
|
hF.prototype.wt=function($){if(this.vI&&this.vI[$.BU])this.vI[$.BU].v=$.H;if(this.EO){this.J(new x(H.E.O))}else{$.e="changeprop";
|
|
$.c=this.parent.data.c;$.II=this.i7;var o=new x(H.E.N,!0);o.data=$;o.U=D.b8;o.US=!0;this.J(o);this.J(new x("afterchange",!0))}};
|
|
hF.prototype.v=function(){return JSON.parse(JSON.stringify(this.vI))};hF.Il={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(ev.k9),GrFl:["enab","Md","Opct"].concat(ev.cw),patternFill:["enab","Md","Opct"].concat(ev.SZ),ChFX:"enab Md Clr Opct lagl Dstn blur MpgS Invr".split(" "),FrFX:["enab","Sz","Styl","\n","Md","Opct","PntT","\n"].concat(ev.k9.concat(ev.cw.concat(ev.SZ)))};
|
|
function e0(){bq.call(this,[11,6],"layerstyle");this.a3p=-1;this.data={};this.u4=null;this.GH=null;this.BW=[];
|
|
this.DD=[];H.v2(this.body,"flexrow");this.VO=H.z("div","bordered");this.VO.setAttribute("style","min-width:13em;");
|
|
this.body.appendChild(this.VO);this.UZ=H.z("div","");this.UZ.setAttribute("style","width:25em; padding-left: 1em;");
|
|
this.body.appendChild(this.UZ);this.Pu=H.z("div","form");this.Pu.setAttribute("style","padding-left: 1em; width:7em;");
|
|
this.body.appendChild(this.Pu);this.bD=new hE("OK",!0,null,!0);this.bD.B("click",this.eg,this);this.Pu.appendChild(this.bD.k);
|
|
this.d$=new hE([12,87],!0,null,!0);this.d$.B("click",this.al8,this);this.Pu.appendChild(this.d$.k);this.NU=new d2;
|
|
this.NU.parent=this;this.NU.B(H.E.O,this.alo,this);this.Pu.appendChild(this.NU.k);this.B("closebtn",this.WB,this);
|
|
this.B("redrawall",this.a77,this)}e0.prototype=new bq;e0.prototype.xQ=function(){return!0};e0.prototype.WR=function(){return!0};
|
|
e0.prototype.iO=function($,o,T,s,E){var e=this.Bi();if(e)e.iO($,o,T,s,E)};e0.prototype.ZS=function($,o,T,s,E){var e=this.Bi();
|
|
if(e)e.ZS($,o,T,s,E)};e0.prototype.yg=function($,o,T,s,E){var e=this.Bi();if(e)e.yg($,o,T,s,E)};e0.prototype.Bi=function($){if($==null)$=this.data.index;
|
|
return $==null?null:$==0?this.BW[0]:this.DD[$[0]][$[1]]};e0.prototype.alo=function($){var o=this.NU.v();
|
|
this.wt({e:"setstl",H:o.h2});this.a77(null)};e0.prototype.al8=function($){var o=this.u4,T=this.data.c;
|
|
if(T==null)T=o.D[0];var s=this.u4.u[T],E=fW.yh(s),e=new x(H.E.Q,!0);e.data={e:H.V.uY,U_:"add",M9:gr.fB,Tk:[JSON.parse(JSON.stringify(E))]};
|
|
this.J(e)};e0.prototype.aqd=function($){this.data.index=$.currentTarget.i7;this.UT($.currentTarget.i7)};
|
|
e0.prototype.a77=function($){this.kW(this.u4,this.data)};e0.prototype.UT=function($,o){H.Ft(this.UZ);
|
|
for(var f=0;f<this.BW.length;f++)this.BW[f].a7C();var T=this.Bi($);this.UZ.appendChild(T.a38());if(o)T.FA();
|
|
var s=this.u4;if(s){var E=s.u[this.data.c];this.BW[0].update(s,cf.ye.Yk(s,E));var e=E.add.lmfx;if(e==null)return;
|
|
for(var f=0;f<ev.order.length;f++){var n=e[ev.CP[f]].v;for(var A=0;A<n.length;A++)this.DD[f][A].update(s,n[A].v)}}if(o)T.FA()};
|
|
e0.prototype.f=function(){bq.prototype.f.call(this);this.d$.f();this.NU.f();for(var f=0;f<this.BW.length;
|
|
f++)this.BW[f].f()};e0.prototype.kW=function($,o){var T=o.c==null;this.data.c=o.c;this.data.index=o.index;
|
|
o=this.data;this.u4=$;if(T)o.c=$.D.length==0?$.u.length-1:$.D[0];H.Ft(this.VO);var s=$.u[o.c].add.lmfx;
|
|
this.lB();this.BW=[new hF("bops",!1,0)];this.DD=[];for(var f=0;f<ev.order.length;f++){this.DD.push([]);
|
|
var E=s==null?[]:s[ev.CP[f]].v;for(var e=0;e<E.length;e++){var n=new hF(ev.order[f],!1,[f,e]);this.BW.push(n);
|
|
this.DD[f].push(n)}if(E.length==0){var n=new hF(ev.order[f],!1,[f,0]);this.BW.push(n);this.DD[f].push(n)}}this.f();
|
|
this.amG(this.GH,gr.zo);for(var f=0;f<this.BW.length;f++){this.BW[f].parent=this;this.BW[f].a2t(this.VO);
|
|
this.BW[f].B("showme",this.aqd,this)}if(o.index==null||o.index==0||!T&&s[ev.CP[o.index[0]]].v.length==0){this.UT(0)}else this.UT(o.index,T);
|
|
this.B("afterchange",this.lB,this)};e0.prototype.lB=function($){var o=this.u4,T=this.data.c;if(T==null)T=o.D[0];
|
|
var s=this.u4.u[T],E=fW.yh(s);this.NU.a(E,o.add.Patt?o.add.Patt:[],o.ou(),o.RS())};e0.prototype.YE=function($,o){this.GH=$;
|
|
this.amG($,o);if(o==gr.fB||o==gr.zo){this.NU.bq([$.Td,$.q_])}if(o==gr.ww){}};e0.prototype.amG=function($,o){for(var f=0;
|
|
f<this.BW.length;f++)this.BW[f].YE($,o)};e0.prototype.WB=function($){this.wt({e:"cancel"})};e0.prototype.eg=function($){this.wt({e:"confirm"});
|
|
this.close()};e0.prototype.wt=function($){$.c=this.data.c;var o=new x(H.E.N,!0);o.data=$;o.U=D.b8;o.US=!0;
|
|
this.J(o);this.lB()};e0.P8=function($){var o=[{name:[14,10],iR:!0}];for(var f=0;f<ev.names.length;f++)o.push({name:ev.names[f]});
|
|
if($){o[o.length-1].iR=!0;o.push({name:"Scale Effects",b:function(T){return{b:T!=null&&T.D.length!=0&&T.u[T.D[0]].fg()}}});
|
|
o.push({name:["VAR0 VAR1",[12,49],[9,1]],b:function(T){return{b:T!=null&&T.D.length!=0&&T.u[T.D[0]].add.lmfx!=null}}})}return o};
|
|
e0.p2=function($){var o=[{F:H.E.Q,r:{e:H.V.NC,a_:"layerstyle"}}];for(var f=0;f<ev.names.length;f++)o.push({F:H.E.Q,r:{e:H.V.NC,a_:"layerstyle",index:[f,0]}});
|
|
if($){o.push({F:H.E.Q,r:{e:H.V.NC,a_:"scaleeffects",C5:100,Bo:{F:H.E.N,U:D.b8,r:{e:"scaleeffects"}}}});
|
|
var T={classID:"Mk",null:aj.D4("Lyr"),Usng:{t:"obj ",v:[{t:"prop",v:{classID:"Prpr",keyID:"Lefx"}},{t:"Enmr",v:{classID:"Lyr",typeID:"Ordn",enum:"Trgt"}}]}};
|
|
o.push({F:H.E.b0,r:{Wk:"make",bI:T}})}return o};e0.a6U=function($){var o=[];if($)o.push({name:[6,48,0,0],vO:!0},{name:[6,48,0,1],vO:!0},{name:[6,48,0,2],vO:!0,iR:!0});
|
|
for(var T in dq.names)o.push({name:dq.names[T],iR:dq.wl.indexOf(T)!=-1,vO:U[T]!=null});return o};e0.a7D=function($){var o=[];
|
|
if($){o.push({F:H.E.N,U:D.kb,r:{e:"newfill",tU:0}});for(var f=1;f<3;f++)o.push({F:H.E.b0,r:D.U5.V0(f)})}for(var T in dq.names){var s=iZ.o_(T);
|
|
if(s==null)s={};for(var E in dq.jf)if(dq.jf[E]==T)s.classID=E;var e={Wk:"make",bI:{classID:"Mk",null:aj.D4("AdjL"),Usng:{t:"Objc",v:{classID:"AdjL",Type:{t:"Objc",v:s}}}}};
|
|
o.push({F:H.E.b0,r:e})}return o};function d5(){bq.call(this,"Merge Channels","mergechannels");this.w9=null;
|
|
var $=H.z("div","form");this.body.appendChild($);this.V1=[];for(var f=0;f<3;f++){var o=new h_(dq.nk[f],[]);
|
|
this.V1.push(o);$.appendChild(o.k);H.ze($)}this.bD=new hE("OK",!0,null,!0);this.bD.B("click",this.eg,this);
|
|
$.appendChild(this.bD.k)}d5.prototype=new bq;d5.prototype.f=function(){bq.prototype.f.call(this);for(var f=0;
|
|
f<3;f++)this.V1[f].f()};d5.prototype.kW=function($,o,T,s){this.w9=T;var E=[];for(var f=0;f<T.length;
|
|
f++)E.push(T[f].name);for(var f=0;f<3;f++){var e=this.V1[f];e.TY(E);e.a(Math.min(f,T.length-1))}};d5.prototype.eg=function($){var o=this.w9,T=o[0],s=new x(H.E.b0,!0);
|
|
s.data=iG.Pi(T.d,T.w,T.fG,"Merged Document","Wht",!1);this.J(s);var E=[];for(var f=0;f<3;f++)E.push(o[this.V1[f].v()].aw());
|
|
var T=o[o.length-1],e=T.u[0],n=e.buffer;for(var f=0;f<n.length;f+=4){n[f]=E[0][f];n[f+1]=E[1][f];n[f+2]=E[2][f]}e.T();
|
|
T.T();this.close()};function e$(){bq.call(this,[1,10],"script");var $=H.z("div","form");$.setAttribute("style","width:44em");
|
|
this.body.appendChild($);this.GH=null;this.PE=[];this.hE=[];this.a9j;var o=this.Go=new hE([1,2],!1,null,!0);
|
|
o.B("click",this.NQ,this);$.appendChild(o.k);var T=new hE("JS Reference",!1,null,!0);T.B("click",this.a2D,this);
|
|
$.appendChild(T.k);$.appendChild(new eB("Demos:").k);this.aq$=[];var s=e$.q4;for(var f=0;f<s.length;
|
|
f++){var E=new hE(s[f].Q0,!1,null,!0);this.aq$.push(E);$.appendChild(E.k);E.B("click",this.adr,this)}this.yo=H.z("textarea");
|
|
this.yo.setAttribute("rows",16);this.yo.setAttribute("style","display:block;tab-size:4; font-family:monospace;width:100%;");
|
|
$.appendChild(this.yo);var e=new hE("Run",!0,null,!0);e.B("click",this.eg,this);$.appendChild(e.k);this.a6R=H.z("div");
|
|
$.appendChild(this.a6R)}e$.prototype=new bq;e$.prototype.f=function(){this.Go.f()};e$.prototype.NQ=function(){var $=this.a9j;
|
|
if($==null)$="script.jsx";var o=new x(H.E.Q,!0);o.data={e:H.V.NC,a_:"namewindow",C5:$.slice(0,$.length-4),Wi:this.amr.bind(this)};
|
|
this.J(o)};e$.prototype.amr=function($){var o=this.yo.value,T=t.Te(o),s=new x(H.E.Q,!0);s.data={e:H.V.xL,D$:T.buffer,jA:$+".jsx",a4i:!0};
|
|
this.J(s)};e$.prototype.ajE=function($){var f=this.PE.indexOf($.target),o=this.a9j=this.hE[f],T=this.GH.wM.Mz[o],s=new Uint8Array(T),E=t.LK(s,0,s.length);
|
|
this.yo.value=E};e$.prototype.kW=function($,o,T){this.yo.value=e$.q4[0].pF;this.adR()};e$.prototype.adR=function(){var $=this.GH.wM,o=this.a6R;
|
|
H.Ft(o);this.PE=[];this.hE=[];o.textContent="Saved scripts: ";for(var T in $.Mz){if(T.endsWith(".jsx")){var s=new hE(T,!1,null,!0);
|
|
this.PE.push(s);this.hE.push(T);s.B("click",this.ajE,this);o.appendChild(s.k)}}};e$.prototype.YE=function($,o){this.GH=$;
|
|
if(o==gr.CZ)this.adR()};e$.prototype.a2D=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.pm,link:"https://www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-cc-javascript-ref-2019.pdf"};
|
|
this.J(o)};e$.prototype.eg=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.Bj,ub:this.yo.value};this.J(o)};
|
|
e$.prototype.adr=function($){var o=this.aq$.indexOf($.currentTarget);this.yo.value=e$.q4[o].pF};e$.q4=[{Q0:"Hello",pF:"\nalert(\"Hello Photopea!\");\n"},{Q0:"Process Layers",pF:"\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}"},{Q0:"Clone Layers",pF:"\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 aM(){bq.call(this,[11,7],"newproject");this.data=null;this.w9=null;var $=H.z("div","flexrow");
|
|
this.Im=$;this.body.appendChild($);var o=H.z("div","form");this.bQ=o;$.appendChild(o);this.Cs=new d_([12,48]);
|
|
o.appendChild(this.Cs.k);H.ze(o);this.cf=new bc(!0);this.cf.a(new aY(1280,720),72);this.cf.B(H.E.O,this.Eu,this);
|
|
o.appendChild(this.cf.k);this.qi=new h_([12,46],[[13,1,8],[13,1,10],[13,1,9],[12,46]]);o.appendChild(this.qi.k);
|
|
this.vw=new ad("Artboards");o.appendChild(this.vw.k);this.as=new hE([12,49],!0,null,!0);this.as.B("click",this.eg,this);
|
|
o.appendChild(this.as.k);var T=aM.hW,s=[];for(var f=0;f<T.length;f++)s.push(T[f].name);this.oM=new eI(null,s);
|
|
this.oM.B(H.E.O,this.aqg,this);o.appendChild(this.oM.k);this.oM.k.style["margin-top"]="1em";this.oy=new eW(!0);
|
|
this.oy.B(H.E.O,this.a0s,this);o.appendChild(this.oy.k);this.aqg();this.AD=new hB;this.AD.parent=this;
|
|
this.AD.k.setAttribute("style","margin-left:1em");this.AD.B("tempready",this.adD,this)}aM.prototype=new bq;
|
|
aM.prototype.YE=function($,o){this.AD.YE($)};aM.prototype.Kh=function($,o){return new aY(Math.max(0,Math.min(70,($-690)/2)),$>o?Math.max(0,Math.min(50,(o-400)/2)):0)};
|
|
aM.prototype.RE=function($,o){this.bQ.setAttribute("style","width:"+Math.min($,338)+"px");this.oy.k.style.height=o-260+"px";
|
|
var T=this.AD.k,s=T.parentNode;if($<500){if(s!=null)this.Im.removeChild(T)}else{if(s==null)this.Im.appendChild(T)}this.AD.RE($-360,o-35)};
|
|
aM.prototype.Eu=function(){this.AD.a(this.cf.v())};aM.prototype.a0s=function($){var o=this.oy.v(),T=aM.hW[this.oM.v()].Pa[o],s=T[4];
|
|
if(s==0)s=72;var E=T[1],e=T[2],n=["px","%","mm","in"].indexOf(T[3]),A=[1,1,25.4/s,1/s][n];E/=A;e/=A;
|
|
this.cf.a(new aY(Math.round(E),Math.round(e)),s);this.cf.a2d(n);this.oy.o5(o);this.Eu()};aM.prototype.aqg=function($){var o=aM.hW[this.oM.v()].Pa,T=[],s=[],E=Math.round(106*H.K()),e=Math.round(106*H.K()),n=0;
|
|
for(var f=0;f<o.length;f++)n=Math.max(n,o[f][1],o[f][2]);for(var f=0;f<o.length;f++){var A=o[f],u=A[1]+" x "+A[2]+" "+A[3];
|
|
if(A[3]=="in")u=(A[1]*25.4).toFixed(0)+" x "+(A[2]*25.4).toFixed(0)+" mm";if(A[3]=="mm")u=(A[1]/25.4).toFixed(1)+" x "+(A[2]/25.4).toFixed(1)+" in";
|
|
if(A[4])u=u+" @ "+A[4]+" ppi";s.push(u);T.push(aM.Ey(A,E,e,n))}this.oy.rS(T,s,E,e)};aM.Ey=function($,o,T,s){var E=H.z("canvas",""),e=E.getContext("2d");
|
|
E.width=o;E.height=T;var n=Math.round(o/8),A=Math.floor(11*H.K()),u=$[1],Y=$[2];e.fillStyle="#000000";
|
|
e.font=Math.round(A*.9)+"px \"Open Sans\", Sans-Serif";var b=u+" x "+Y+" "+$[3],a=e.measureText(b);e.fillText(b,Math.round((o-a.width)/2),T-Math.round(n/2));
|
|
if($[0]!=null){e.font="bold "+A+"px \"Open Sans\", Sans-Serif";var b=$[0],a=e.measureText(b);e.fillText(b,Math.round((o-a.width)/2),T-Math.round(n/2)-Math.round(A*1.3))}T-=Math.round(2.5*A);
|
|
var w=Math.min((o-n)/u,(T-n)/Y);w*=.5+.5*(Math.max(u,Y)/s);var X=(o-u*w)/2,N=(T-Y*w)/2;e.strokeRect(Math.round(X)+.5,Math.round(N)+.5,Math.round(u*w),Math.round(Y*w));
|
|
return E.toDataURL()};aM.prototype.f=function(){bq.prototype.f.call(this);this.cf.f();this.Cs.f();this.qi.f();
|
|
this.as.f();this.Cs.a(aX.get([11,7]));this.oM.f();this.vw.f();this.AD.f()};aM.prototype.eg=function($){var o=this.cf.v(),T=o.x,s=o.y;
|
|
this.close();var E=new x(H.E.b0,!0);E.data=iG.Pi(T,s,this.cf.Lf(),this.Cs.v(),["Wht","Blck","Trns","BckC"][this.qi.v()],this.vw.v());
|
|
this.J(E);this.apZ()};aM.prototype.adD=function($){var o=$.data.u4;o.fG=this.cf.Lf();var T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.pl,u4:o};this.J(T);this.close();this.apZ()};aM.prototype.apZ=function(){var $=this.w9[this.w9.length-1],o=this.data.ao9;
|
|
if(o)dI.w2(function(){var T=new XMLHttpRequest,s="https://www.googleapis.com/drive/v3/files?"+dI.ji();
|
|
T.open("POST",s,!0);T.setRequestHeader("Content-Type","application/json");T.addEventListener("load",function(E){var e=JSON.parse(E.target.response);
|
|
$.rb={file:e,WN:"psd"};alert($.name+" created in Google Drive")});T.send(JSON.stringify({name:$.name,aqL:[o]}))})};
|
|
aM.prototype.kW=function($,o,T,s){this.w9=T;if($!=null&&$.Z!=null){var E=new df(0,0,$.d,$.w).Sr($.Z.rect);
|
|
this.cf.a(new aY(E.d,E.w))}this.data=o;this.Eu();this.Cs.K9();if(H.xT())fV.afi(this.afv.bind(this))};
|
|
aM.prototype.afv=function($){if($=="granted")fV.Ar(this,this.arm.bind(this))};aM.prototype.arm=function($,o){this.cf.a(new aY(o.d,o.w))};
|
|
aM.hW=[{name:"Social",Pa:[["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],Pa:[["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],Pa:[["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],Pa:[["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],Pa:[["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],Pa:[["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",Pa:[[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 a7($,o,T){bq.call(this,o,"sel_"+$);this.e=$;var s=H.z("div","form");this.body.appendChild(s);
|
|
this.Cs=new ac(o,0,255,null,0,!1,!0);s.appendChild(this.Cs.k);this.Cs.a(1);var E=H.z("span");E.textContent=T;
|
|
s.appendChild(E);H.ze(s);this.aiX=new ad("Apply at canvas bounds");if($!="border")s.appendChild(this.aiX.k);
|
|
this.bD=new hE("OK",!0,null,!0);this.bD.B("click",this.eg,this);s.appendChild(this.bD.k)}a7.prototype=new bq;
|
|
a7.prototype.cl=function($,o){if($==null)return;if($.Z==null)alert("No selection!");return $.Z!=null};
|
|
a7.prototype.eg=function($){var o=new x(H.E.b0,!0);o.data=D.NK.a0x(this.e,this.Cs.v(),this.aiX.v());
|
|
o.US=!0;this.J(o);this.close()};a7.prototype.f=function(){bq.prototype.f.call(this);if(this.Cs)this.Cs.f()};
|
|
a7.prototype.kW=function($,o){};function cB($,o,T,s,E){bq.call(this,T,o);this.Rl=E;this.hW=null;this.bQ=H.z("div","form");
|
|
this.body.appendChild(this.bQ);this.Cs=$==0?new d_(T):new a4(T,0,500,s,1);this.Cs.B(H.E.O,this.W6,this);
|
|
this.bQ.appendChild(this.Cs.k);this.bD=new hE("OK",!0,null,!0);this.bD.B("click",this.eg,this);this.bQ.appendChild(this.bD.k);
|
|
this.B("closebtn",this.WB,this)}cB.prototype=new bq;cB.prototype.xQ=function(){return!1};cB.prototype.W6=function($){var o=this.Cs.v();
|
|
if(this.Rl)this.f3(o)};cB.prototype.WB=function($){if(this.Rl)this.f3("cancel")};cB.prototype.eg=function($){if(this.Rl)this.f3("confirm");
|
|
else this.f3(this.Cs.v());this.close()};cB.prototype.f3=function($){if(this.hW.Wi)this.hW.Wi($);else if(this.hW.Bo){var o=this.hW.Bo,T=new x(o.F,!0);
|
|
T.U=o.U;T.data=o.r;T.data.H=$;T.US=!0;this.J(T)}};cB.prototype.f=function(){bq.prototype.f.call(this);
|
|
if(this.Cs)this.Cs.f()};cB.prototype.kW=function($,o){this.hW=o;this.Cs.a(o.C5);this.Cs.K9();this.W6(null)};
|
|
function hT(){bq.call(this,[1,5],"open_from_url");this.Pc=null;var $=H.z("div","form");this.body.appendChild($);
|
|
this.Vk=new d_("URL",null,22);$.appendChild(this.Vk.k);H.ze($);this.AC=new eI([21,0],[[21,2],[21,1]]);
|
|
$.appendChild(this.AC.k);this.as=new hE("OK",!0,null,!0);this.as.B("click",this.eg,this);$.appendChild(this.as.k)}hT.prototype=new bq;
|
|
hT.prototype.f=function(){bq.prototype.f.call(this);this.AC.f()};hT.prototype.kW=function($,o,T){this.Vk.K9();
|
|
this.Pc=null;if($&&T.indexOf($)!=-1)this.Pc=T.indexOf($)};hT.prototype.eg=function($){var o=new x(H.E.Q,!0),T=this.Vk.v();
|
|
o.data={e:H.V.ZP,M9:{url:T,dg:!0,Pc:this.AC.v()==1?this.Pc:null}};this.J(o);this.close()};function bG(){bq.call(this,[12,79],"preferences");
|
|
this.GH=null;var $=H.z("div","form");this.body.appendChild($);this.Il=[new ad([8,2]),new ad([8,4]),new h_([12,80,3],[[12,93,3],[12,80,4]]),new a4([12,80,5],1,100,null,2),new h_(null,L.BG.od),new h_([12,80,6],L.BG.od)];
|
|
for(var f=0;f<this.Il.length;f++){var o=this.Il[f];$.appendChild(o.k);if(f!=3)H.ze($);o.B(H.E.O,this.X0,this)}}bG.prototype=new bq;
|
|
bG.prototype.f=function(){bq.prototype.f.call(this);for(var f=0;f<this.Il.length;f++)this.Il[f].f()};
|
|
bG.prototype.kW=function($,o,T){};bG.prototype.YE=function($,o){this.GH=$;this.Il[0].a($.wK.yZ);this.Il[1].a($.wK.Bw);
|
|
this.Il[2].a($.wK.hN);this.Il[3].a($.wK.zP);this.Il[4].a($.wK.EI);this.Il[5].a($.wK.Z2)};bG.prototype.X0=function($){var o=this.Il,T=JSON.parse(JSON.stringify(this.GH.wK));
|
|
T.yZ=o[0].v();T.Bw=o[1].v();T.hN=o[2].v();T.zP=o[3].v();T.EI=o[4].v();T.Z2=o[5].v();if(T.EI!=4)T.zP=Math.round(T.zP);
|
|
var s=new x(H.E.Q,!0);s.data={e:H.V.uY,M9:gr.Nf,mI:T};this.J(s)};function c6(){bq.call(this,[11,8],"saveforweb");
|
|
this.aql="";this.B("closebtn",function(){this.kR.Yo()},this);this.NB=new aY(512,512);this.u4=null;this.DO=null;
|
|
this.ajz=null;this.GH=null;H.v2(this.body,"flexrow");var $=H.z("div"),o=H.z("div");this.body.appendChild($);
|
|
this.body.appendChild(o);this.P9=H.z("div","imgcont");$.appendChild(this.P9);this.kR=new ap;this.kR.RE(this.NB.x,this.NB.y);
|
|
this.Rw=H.z("span");$.appendChild(this.Rw);this.bQ=H.z("div","form cell");this.bQ.setAttribute("style","width:15em; padding-left:1em;");
|
|
o.appendChild(this.bQ);this.RK=new h_([12,50],eY.i1());this.bQ.appendChild(this.RK.k);this.RK.B(H.E.O,this.E4,this);
|
|
this.cf=new bc(!0,!0,!1,!0);this.cf.B(H.E.O,this.E4,this);this.bQ.appendChild(this.cf.k);this.uI=new h8;
|
|
this.uI.B(H.E.O,this.E4,this);this.bQ.appendChild(this.uI.k);this.im=new hE([1,2],!0,null,!0);this.im.B("click",this.eg,this);
|
|
this.bQ.appendChild(this.im.k)}c6.prototype=new bq;c6.prototype.cl=function($,o){return $!=null};c6.prototype.f=function(){bq.prototype.f.call(this);
|
|
this.cf.f();this.RK.f();this.uI.f();this.im.f()};c6.prototype.eg=function($){var o=this.u4.name.split(".")[0],T=eY.i1()[this.RK.v()],s=T=="JPG"||T=="PNG"||T=="GIF",E=eY.Q1(T),e="."+T.toLowerCase(),n=this.DO,A=o+e,u=this.u4,Y=u.op;
|
|
if(Y.length!=0&&s&&this.uI.v().pop()){var b="<!DOCTYPE html>\n<html>\n<style>div {position:absolute;}</style>\n<head></head>\n<body>\n",a=[],w={},X=new df(0,0,u.d,u.w),N=u.aw();
|
|
for(var f=0;f<Y.length;f++)a.push(D.j3.ee(Y,f));a.reverse();var z=L.rect.sl([0,0,u.d,u.w],a);for(var f=0;
|
|
f<z.length;f++){var i=z[f],k=new df(i[0],i[1],i[2]-i[0],i[3]-i[1]),Q=i.length==5?Y[i[4]].v:null,O=L.G(k.Y()*4);
|
|
L.h9(N,X,O,k);var c="img/img"+(f+1)+e;w[c]=new Uint8Array(E.tC([[O.buffer,0]],k.d,k.w,this.uI.v()));
|
|
b+="<div style=\"background-image:url('"+c+"'); left:"+k.x+"px; top:"+k.y+"px; width:"+k.d+"px; height:"+k.w+"px\">";
|
|
if(Q&&Q.url.v!="")b+="\n\t<a href=\""+Q.url.v+"\" target=\""+Q.null.v+"\" style=\"display:block;width:100%;height:100%;\"></a>\n";
|
|
b+="</div>\n"}b+="</body>\n</html>\n";var B=L.G(Math.round(b.length*1.5)),G=t.Jq(b,B,0);w["index.html"]=B.slice(0,G);
|
|
n=UZIP.encode(w);A=o+".zip"}else if(u.add.artd&&u.add.artd.Cnt.v>1&&s&&this.uI.v().pop()){var w={},X=new df(0,0,u.d,u.w),N=u.aw(),l=u.root.children;
|
|
for(var f=0;f<l.length;f++){var v=l[f].c;if(v.add.artb==null)continue;var p=v.co(),P=L.G(p.Y()*4);L.h9(N,X,P,p);
|
|
w[v.getName()+e]=new Uint8Array(E.tC([[P.buffer,0]],p.d,p.w,this.uI.v()))}n=UZIP.encode(w);A=o+".zip"}if(u.dM){var h=new XMLHttpRequest;
|
|
h.open("GET","/papi/img/update.php?act=1&id="+u.dM+"&rnd="+Math.random());h.send()}var j=new x(H.E.Q,!0);
|
|
j.data={e:H.V.QD,data:n,name:A};this.J(j);this.kR.Yo();this.close()};c6.prototype.kW=function($,o){if(o.Ue!=null)this.RK.a(o.Ue);
|
|
this.u4=$;var T=$.d+","+$.w;if(T!=this.aql){this.aql=T;this.cf.a(new aY($.d,$.w),$.fG)}this.uI.a4H();
|
|
if(o.ak5){this.cf.a2d(3);this.uI.yc.PDF[2].uq.a(!0)}this.E4(null,!0)};c6.prototype.Kh=function($,o){return new aY(Math.max(0,Math.min(150,($-770)/2)),Math.max(0,Math.min(150,(o-590)/2)))};
|
|
c6.prototype.RE=function($,o){this.N0=$;this.cQ=o;this.NB.x=Math.min(512,$-26-214);this.NB.y=Math.min(512,o-45);
|
|
if(this.u4==null)return;var T=this.cf.v(),$=T.x,o=T.y,s=eY.i1()[this.RK.v()],E=eY.Q1(s),a="<span style=\"width:",w="display:inline-block; text-align:right;\">";
|
|
if(E.or){var e=$,n=o,A;if(s=="PDF"||E.ND){e=this.NB.x;n=this.NB.y}else{e=Math.min($+20,this.NB.x);n=Math.min(o+20,this.NB.y)}this.P9.firstChild.setAttribute("style","display:block; width:"+e+"px; height:"+n+"px;")}else{if(E.ND){e=this.NB.x;
|
|
n=this.NB.y}else{var u=this.ajz,Y=u[0].Sg,e=Y.d,n=Y.w;this.kR.RE(Math.max(50,Math.min(e/H.K(),this.NB.x)),Math.max(50,Math.min(n/H.K(),this.NB.y)))}}var b=this.DO.byteLength,X=s+":"+a+64+"px;"+w+c6.yY(b)+"</span>";
|
|
if(this.NB.x>200)X+=a+90+"px; opacity:"+.5+";"+w+b.toLocaleString()+" B</span>";this.Rw.innerHTML=X};
|
|
c6.yY=function($){var o=$.toString(2),T=0;while(T+10<o.length)T+=10;var s=($/Math.pow(2,T)).toFixed(1),E="B KB MB GB TB PB".split(" ")[Math.floor(T/10)];
|
|
return s+" "+E};c6.prototype.YE=function($,o){this.GH=$};c6.prototype.E4=function($,o){var T=this.u4,s=this.cf.v(),E=s.x,e=s.y,n=this.RK.v(),A=eY.i1()[n],u=eY.jc(T)[0].length,Y=["GIF","PNG","WEBP"].indexOf(A)!=-1&&u>1,z="";
|
|
if(Y&&o&&(u>4&&E*e>1024*1024||E*e*u>800*800*50)){var b=1;while(Math.max(E>>>b,e>>>b)>800)b++;var a=window.confirm("Your animation is large ("+E+" x "+e+" px). Press \"OK\" to scale it to "+(100>>>b)+"%. Press \"Cancel\" to keep the size.");
|
|
if(a){this.cf.a(new aY(E>>>b,e>>>b),null,!0);E=E>>>b;e=e>>>b}}var w=T.add.artd,X=w!=null&&w.Cnt.v>1;
|
|
this.uI.ajd(A,Y,T.op.length!=0,X);var N=this.uI.v();this.DO=eY.GU(T,A,E,e,N,this.GH);if(this.DO==null){this.u4=null;
|
|
return}H.Ft(this.P9);this.kR.Yo();var i=eY.Q1(A);if(i.ND){this.P9.innerHTML="<div></div>";z+="width:0px"}else if(i.or){var k=E,Q=e,O;
|
|
if(A=="PDF"){O=URL.createObjectURL(new Blob([this.DO],{type:"application/pdf"}))}else{O=URL.createObjectURL(new Blob([this.DO],{type:"image/svg+xml"}))}this.P9.innerHTML="<iframe src=\""+O+"\"></iframe>"}else{var c=this.ajz=i.yj(this.DO),B=c[0].Sg,k=B.d,Q=B.w;
|
|
this.kR.a(c,c.length>1?N[N.length-3]:0);this.P9.appendChild(this.kR.k);z="background: rgba(0,0,0,0);"}this.P9.setAttribute("style","display:block; background-size:"+16/H.K()+"px;"+z);
|
|
this.RE(this.N0,this.cQ)};function e3(){bq.call(this,[11,13],"shortcuts");var $=this.Im=H.z("div","scrollable");
|
|
$.setAttribute("style","min-width:700px; max-height:500px; padding:1.5em");this.body.appendChild($);
|
|
this.a13()}e3.prototype=new bq;e3.prototype.f=function(){bq.prototype.f.call(this);this.a13()};e3.prototype.a13=function(){var $="<div style=\"line-height:1.4em; column-count:3; column-gap:3em; column-rule-width:1px;\" class=\"\">",o="",T=dN,s=T.I6,E=T.Et,e=T.BJ;
|
|
o+="<h2 style=\"margin-top:0;\">Main Menu</h2>";o+=$;o+=this.D8([[0,0],"---",[1,0],[s,T.q7],[1,2],[s,T.I2],[1,3],[E,s,T.I2],[1,8],[e,E,s,T.I2],[0,1],"---",[2,0],[E,s,T.Oa],[2,1],[s,T.Oa],[5,0],[s,T.Ib],[5,1],[s,T.Wd],[5,2],[s,T.z1],[2,2],"Delete",[2,3],[e,T.Ln],[10,16],[e,s,T.B4],[12,79],[s,T.BL],[3],"---",[4,1],[s,T.vA],[4,2],[s,T.nb],[4,5],[s,T.D5],[4,11],[s,T.xD],[0,3],"---",[6,0],[s,T.Kb],[6,6,0],[e,s,T.Vr],[6,9],[s,T.Vr],[6,10],[s,T.E],[0,5],"---",[7,0],[s,T.V],[7,1],[s,T.XQ],[7,2],[E,s,T.xD],[0,7],"---",[8,0],[s,T.AZ],[8,1],[s,T.Dd],[8,3],[s,T._4],[8,2],[s,T.VQ],[8,4],[s,T.eQ],[11,13],"?"]);
|
|
o+="</div>";o+="<h2 style=\"margin-top:1.5em;\">Navigation</h2>";o+=$;o+=this.D8(["Vertical scroll","Wheel","Horizontal scroll",[s,"Wheel"],"Zooming",[e,"Wheel"]]);
|
|
o+="</div>";o+="<h2 style=\"margin-top:1.5em;\">Quick tools (press to enable, release to disable)</h2>";
|
|
o+=$;o+=this.D8([[10,11],[s],[10,7],"Space",[10,17],[s,T.Gv]]);o+="</div>";o+="<h2 style=\"margin-top:1.5em;\">Tools</h2>";
|
|
o+=$;var n=e3.q,A=[];for(var f=0;f<n.length;f+=3)if(n[f+1])A.push(n[f],n[f+1]);A=A.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","}"]);
|
|
o+=this.D8(A);o+="</div>";this.Im.innerHTML=o};e3.prototype.D8=function($){var o="",T=!0;for(var f=0;
|
|
f<$.length;f+=2){var s=$[f],E=dN.fO($[f+1]);if(E==null){T=!1;continue}var e=H.HW(aX.get(s));if(E=="---"){if(!T)o+="<br/>";
|
|
o+="<div style=\"font-weight:bold; border-bottom: 1px solid;\">"+e+"</div>"}else o+="<div>"+e+" <span style=\"float:right; font-weight:bold;\">"+E+"</span> </div>";
|
|
T=!1}return o};e3.q=[[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 fv(){bq.call(this,[8,11,1],"soptions");this.oi=null;var $=H.z("div","form");$.style.width="20em";
|
|
this.body.appendChild($);this.G2={Nm:[12,48],url:"URL",null:[12,71]};this.Il={};for(var o in this.G2){var T=new d_(this.G2[o],null,15);
|
|
this.Il[o]=T;$.appendChild(T.k)}var s=new hE("OK",!0,null,!0);s.B("click",this.eg,this);$.appendChild(s.k)}fv.prototype=new bq;
|
|
fv.prototype.kW=function($,o,T){var s=o.H;this.oi=JSON.stringify(s);for(var E in this.G2){if(s[E])this.Il[E].a(s[E].v)}};
|
|
fv.prototype.eg=function($){var o=JSON.parse(this.oi);for(var T in this.G2){var s=this.Il[T].v();o[T]={t:"TEXT",v:s}}var E=new x(H.E.N,!0);
|
|
E.U=D.zH;E.data=o;E.US=!0;this.J(E);this.close()};function az(){bq.call(this,[2,3],"fill");this.GH=null;
|
|
this.EF=null;var $=H.z("div","form padded");$.style.width="22em";this.body.appendChild($);this.jE="FrgC BckC Clr Blck Gry Wht contentAware".split(" ");
|
|
this.Zd=new h_([2,3],[[12,45],[12,46],[12,47],[13,1,10],[13,1,7],[13,1,8],[6,48,0,3]]);this.Zd.B(H.E.O,this.aif,this);
|
|
$.appendChild(this.Zd.k);this.P9=H.z("span");$.appendChild(this.P9);this.jl=new hJ;this.jl.parent=this;
|
|
this.jl.Ab(0);this.Ef=new h_([12,19,0],hI.fC,!1,hI.xx);$.appendChild(this.Ef.k);this.rC=new a4([12,0],0,100,"%",0,!1);
|
|
this.rC.a(100);$.appendChild(this.rC.k);this.uV=new ad("Preserve Transparency");this.uV.a(!1);$.appendChild(this.uV.k);
|
|
this.as=new hE("OK",!0,null,!0);this.as.B("click",this.eg,this);this.body.appendChild(this.as.k)}az.prototype=new bq;
|
|
az.prototype.cl=function($,o){return $!=null};az.prototype.xQ=function(){return!0};az.prototype.aif=function(){var $=this.Zd.v()==2,o=this.jl.k,T=this.P9;
|
|
if($)T.appendChild(o);else if(T.contains(o))T.removeChild(o)};az.prototype.f=function(){bq.prototype.f.call(this);
|
|
this.Zd.f();this.Ef.f();this.rC.f()};az.prototype.eg=function($){if(!this.EF.Jt())return;var o=new x(H.E.b0,!0),T=this.Zd.v();
|
|
o.data=D.x5.V0(this.jE[T],hI.zk[this.Ef.v()],this.rC.v()/100,this.jl.v(),this.uV.v());this.close();this.J(o)};
|
|
az.prototype.kW=function($,o){this.EF=$};az.prototype.YE=function($,o){this.GH=$};function bE(){bq.call(this,[14,9],"stroke");
|
|
this.GH=null;this.bQ=H.z("div","form");this.bQ.setAttribute("style","width:24em");this.body.appendChild(this.bQ);
|
|
this.am=new hF("FrFX",!0);this.am.parent=this;var $=["Sz","Styl","Md","Opct"].concat(ev.k9);for(var f=0;
|
|
f<$.length;f++){var o=this.am.DP[$[f]].k;this.bQ.appendChild(o)}this.MA=!1;this.as=new hE("OK",!0,null,!0);
|
|
this.as.B("click",this.eg,this);this.body.appendChild(this.as.k)}bE.prototype=new bq;bE.prototype.cl=function($,o){return $!=null};
|
|
bE.prototype.xQ=function(){return!0};bE.prototype.f=function(){bq.prototype.f.call(this);this.am.f()};
|
|
bE.prototype.eg=function($){var o=new x(H.E.N,!0);o.U=D.WJ;o.data={e:"stroke",a2k:this.am.v()};this.close();
|
|
this.J(o)};bE.prototype.kW=function($,o){if(!this.MA){var T=ev.Qo[ev.order.indexOf("FrFX")];T=JSON.parse(T);
|
|
this.am.update($,T);this.MA=!0}var T=this.am.v(),s=this.GH.z4;T.Clr.v=L.h.wb({i:s>>16&255,m:s>>8&255,P:s&255});
|
|
this.am.update($,T)};bE.prototype.YE=function($,o){this.GH=$};function dT(){bq.call(this,[11,9],"textwarp");
|
|
this.Il=new c1;this.Il.B(H.E.O,this.Ut,this);this.Il.parent=this;this.bQ=H.z("div","form");this.bQ.setAttribute("style","width:20em");
|
|
this.body.appendChild(this.bQ);this.bQ.appendChild(this.Il.cm.k);this.bQ.appendChild(this.Il.RL.k);this.bQ.appendChild(this.Il.L9.k);
|
|
this.bQ.appendChild(this.Il.Ma.k);this.bQ.appendChild(this.Il.Hd.k);this.as=new hE("OK",!0,null,!0);
|
|
this.as.B("click",this.eg,this);this.bQ.appendChild(this.as.k);this.B("closebtn",this.WB,this)}dT.prototype=new bq;
|
|
dT.prototype.xQ=function(){return!0};dT.prototype.f=function(){bq.prototype.f.call(this);this.Il.f()};
|
|
dT.prototype.Ut=function($){var o=this.Il.v();this.f3({e:"warp",Rt:o})};dT.prototype.f3=function($){var o=new x(H.E.N,!0);
|
|
o.U=D.ko;o.data=$;o.US=!0;this.J(o)};dT.prototype.WB=function($){this.f3({e:"warpCancel"})};dT.prototype.eg=function($){this.f3({e:"warpConfirm"});
|
|
this.close()};dT.prototype.kW=function($,o){var T=$.u[$.D[0]];this.Il.a(T.add.TySh.Ah)};function e1(){bq.call(this,"Raw Photopea","rawpea");
|
|
this.WP=null;this.rt=null;this.j2=null;this.eh=0;this.TJ=null;this.tZ=null;this.a0c=500;this.a1N=500;
|
|
this.a4l=0;this.B("closebtn",this.wA,this);H.v2(this.body,"flexrow");var $=H.z("div"),o=H.z("div"),s="<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>";
|
|
o.setAttribute("style","padding-left: 1em");this.body.appendChild($);this.body.appendChild(o);this.S=H.z("canvas");
|
|
$.appendChild(this.S);this.j5=new hQ(225);this.j5.iI(4);o.appendChild(this.j5.k);this.bQ=H.z("div");
|
|
this.bQ.setAttribute("style","width:18em;");o.appendChild(this.bQ);this.am3=new eB("Hi",!0);this.bQ.appendChild(this.am3.k);
|
|
this.gX=[new fs("Temperature",2e3,13e3),new fs("Tint",-150,150),new fs([4,3],-4,4,null,!0),new fs([12,3,0],-100,100)];
|
|
for(var f=0;f<this.gX.length;f++){var T=this.gX[f];T.a(0);T.B(H.E.O,this.iB,this);this.bQ.appendChild(T.k);
|
|
if(f==1)this.bQ.appendChild(H.z("hr"))}this.as=new hE([1,0],!0,null,!0);this.as.B("click",this.eg,this);
|
|
this.bQ.appendChild(this.as.k);this.k_=new hE(s+" JPG",!0,null,!0);this.k_.B("click",this.a9V,this);
|
|
this.bQ.appendChild(this.k_.k);this.k_.k.style.marginTop="6px"}e1.prototype=new bq;e1.prototype.Kh=function(){return new aY(0,0)};
|
|
e1.prototype.RE=function($,o){this.a0c=$-274;this.a1N=o-32;if(this.WP)this.a2O()};e1.prototype.f=function(){bq.prototype.f.call(this);
|
|
this.as.f();for(var f=0;f<this.gX.length;f++)this.gX[f].f()};e1.prototype.a9V=function($){var o=this.WP,T=this.rt,s=L.G(o.width*o.height*4);
|
|
L.wr(s,4294967295);L.raw.D0(T,s,o,this.TU());var E=eY.Q1("JPG").tC([[s.buffer]],T.Zf,T.Ns,[85]),e=new x(H.E.Q,!0);
|
|
e.data={e:H.V.QD,data:E,name:"photo.jpg"};this.J(e)};e1.prototype.eg=function($){var o=this.WP,T=this.rt,s=L.G(o.width*o.height*4);
|
|
L.wr(s,4294967295);L.raw.D0(T,s,o,this.TU());var E=e2.DN(o),o={Sg:new df(0,0,T.Zf,T.Ns),data:s.buffer,sx:E},e=eY.sO("Raw Photo",[o]),n=new x(H.E.Q,!0);
|
|
n.data={e:H.V.pl,u4:e};this.J(n);this.wA();this.close()};e1.prototype.wA=function(){this.WP=null;this.rt=null;
|
|
this.TJ=null;this.tZ=null};e1.prototype.kW=function($,o,T,s){this.WP=o.tY;this.rt=L.raw.a4K(this.WP);
|
|
var E=this.rt;this.am3.a(E.Zf+" x "+E.Ns+", "+(E.Zf*E.Ns/1e6).toFixed(1)+" MPx");var e=L.raw.aie(o.tY);
|
|
this.j2=gP.jT(e);this.gX[0].a(this.j2.xO);this.gX[1].a(this.j2.sw);for(var f=2;f<this.gX.length;f++)this.gX[f].a(0);
|
|
this.a2O()};e1.prototype.YE=function($,o){this.j5.Ab(b3.Sx[$.dJ]["--text-color"])};e1.prototype.a2O=function(){var $=this.rt,o=$.Zf,T=$.Ns,s=1;
|
|
while(o/s>this.a0c*H.K()||T/s>this.a1N*H.K())s++;if(this.a4l==s&&this.TJ)return;this.a4l=s;var E=Math.floor(o/s),e=Math.floor(T/s);
|
|
this.TJ={_3:new Float32Array(E*e*3),Zf:E,Ns:e};var n=this.S.getContext("2d");this.tZ=n.createImageData(E,e);
|
|
L.wr(this.tZ.data,4294967295);var A=1/(s*s);for(var u=0;u<e;u++)for(var Y=0;Y<E;Y++){var b=0,a=0,w=0,X=(Y+1)*s,N=(u+1)*s;
|
|
for(var z=u*s;z<N;z++)for(var i=Y*s;i<X;i++){var k=(z*o+i)*3;b+=this.rt._3[k];a+=this.rt._3[k+1];w+=this.rt._3[k+2]}var Q=(u*E+Y)*3;
|
|
this.TJ._3[Q]=b*A;this.TJ._3[Q+1]=a*A;this.TJ._3[Q+2]=w*A}this.iB()};e1.prototype.iB=function(){var $=this.WP,o=this.TJ.Zf,T=this.TJ.Ns,s=o*T,E=this.S,e=E.getContext("2d");
|
|
E.width=o;E.height=T;H.kg(E,o,T);L.raw.D0(this.TJ,new Uint8Array(this.tZ.data.buffer),$,this.TU());e.putImageData(this.tZ,0,0);
|
|
var n=L.lm(this.tZ.data);for(var f=0;f<4;f++)for(var A=1;A<256;A++)if(n[f][A]==0)n[f][A]=n[f][A-1];for(var f=0;
|
|
f<4;f++)for(var A=1;A<256;A++)if(n[f][A]==0)n[f][A]=n[f][A-1];this.j5.a(n)};e1.prototype.TU=function(){var $=[];
|
|
for(var f=0;f<this.gX.length;f++)$.push(this.gX[f].v());return $};function iW($){bq.call(this,$?[11,11]:"Reduce Colors",$?"vbitmap":"rcolors");
|
|
this.hW=null;this.tf=null;this.Wt=null;this.Zr=null;this.u5=null;this.aqO=null;this.fN=null;this.V1="";
|
|
this.Qy=$;this.Fx=this.bT.bind(this);this.bQ=H.z("div","form hbar");this.body.appendChild(this.bQ);var o=this.hZ={cnum:new ac([12,82],2,50,null),nois:new ad([12,81]),mode:new h_(null,["Cartoon","Photo"]),segm:new ad("Segmentize"),poly:new ad("Polygon"),polE:new ac("Roughness",2,30,null),ok:new hE("OK",!1,null,!0)},e=16;
|
|
for(var T in o){var s=o[T];s.parent=this;if(T=="ok")s.B("click",this.eg,this);else s.B(H.E.O,this.bT,this)}var E=H.z("div","flexrow");
|
|
this.body.appendChild(E);this.ti=new ap;this.ti.B("viewchange",this.HQ,this);this.dp=new ap;this.S=H.z("canvas");
|
|
this.S.setAttribute("style","margin:0 0 0 1px; padding:0; cursor:grab;");this.V8=this.S.getContext("2d");
|
|
var n=L.G(16*16*4);L.qU(n,e,e,8);this.z0=L.scale.hb(n,e,e);this.ti.ajM(this.S);this.ti.x9(this.dp);this.dp.x9(this.ti);
|
|
E.appendChild(this.ti.k);if($)E.appendChild(this.S);else E.appendChild(this.dp.k)}iW.prototype=new bq;
|
|
iW.prototype.Kh=function(){return new aY(0,0)};iW.prototype.xQ=function(){return!0};iW.prototype.RE=function($,o){o=o-27-30;
|
|
$=Math.floor(($-28)/2);H.QE(this.S,$,o);this.ti.RE($,o);if(this.Qy)this.HQ();else this.dp.RE($,o)};iW.prototype.Vb=function($,o,T,s){this.ti.Vb(s)};
|
|
iW.prototype.f=function(){bq.prototype.f.call(this);for(var $ in this.hZ)this.hZ[$].f()};iW.prototype.kW=function($,o){this.fN=$;
|
|
this.u5=null;var T=$.u[$.D[0]],s=L.Ej.xp(T.buffer.buffer,T.rect.d,T.rect.w).acT,E=s/((T.rect.d-2)*(T.rect.w-2)),e=this.hZ;
|
|
e.cnum.a(20);e.nois.a(E<.75);e.mode.a(E<.75?1:0);e.segm.a(!1);e.poly.a(!1);e.polE.a(1);var n=T.rect.clone();
|
|
n.x=n.y=0;this.hW={Sg:n,data:T.buffer.buffer.slice(0)};this.tf=null;this.ti.a([this.hW]);setTimeout(this.Fx,20)};
|
|
iW.prototype.bT=function(){var $=!0,o=Date.now(),T=this.hW,s=this.hZ,E=s.cnum.v(),e=s.nois.v(),n=s.mode.v(),A=s.segm.v(),u=s.poly.v(),Y=s.polE.v(),l=null;
|
|
if(n==0)A=u=!1;var b=["cnum","nois","mode"];if(n==1){b.push("segm");if(this.Qy){b.push("poly");if(u)b.push("polE")}}b.push("ok");
|
|
H.Ft(this.bQ);for(var f=0;f<b.length;f++)this.bQ.appendChild(s[b[f]].k);if($)console.log("---------------------------------------");
|
|
var a=e||A,w=e+","+A;if(a&&(this.tf==null||this.V1!=w)){this.V1=w;var X=new Uint8Array(T.data),N=T.Sg.d,z=T.Sg.w;
|
|
if(e){if(this.u5==null){this.u5=X.slice(0);L.KW.ay(this.u5,this.u5,N,z,15,L.KW.Lq,[35]);if($){console.log("denoise",Date.now()-o);
|
|
o=Date.now()}}X=this.u5.slice(0)}else X=X.slice(0);if(A){var i=L.Ej.An(X,N,z,40,10),k=i.BL,Q=new Uint8Array(k*4);
|
|
for(var f=0;f<k;f++){var O=f*4,c=f*6,B=1/i.Ol[c+5];Q[O]=i.Ol[c]*B;Q[O+1]=i.Ol[c+1]*B;Q[O+2]=i.Ol[c+2]*B}for(var f=0;
|
|
f<X.length;f+=4){var G=i.Zg[f>>>2]*4;X[f]=Q[G];X[f+1]=Q[G+1];X[f+2]=Q[G+2]}if($){console.log("segm",Date.now()-o);
|
|
o=Date.now()}}this.tf={Sg:T.Sg.clone(),data:X.buffer}}if(a)T=this.tf;var X=new Uint8Array(T.data),N=T.Sg.d,z=T.Sg.w;
|
|
for(var f=0;f<X.length;f+=4){if(X[f+3]<10)X[f]=X[f+1]=X[f+2]=X[f+3]=0}if(n==0){l=L.Ej.ah8(X,N,z,E,a?.1:2e-4);
|
|
if($){console.log("quantize",Date.now()-o);o=Date.now()}}else{l=UPNG.quantize(X.buffer,E);l={Zg:l.inds,fD:l.plte};
|
|
if($){console.log("quantize",Date.now()-o);o=Date.now()}var v=Math.floor((N+z)*.015);if(v!=0)L.Ej.gb(l.Zg,N,z,v);
|
|
if($){console.log("remove tiny bits",Date.now()-o);o=Date.now()}}if(this.Qy){var p=l.Zg.slice(0);for(var f=0;
|
|
f<p.length;f++)p[f]++;var P=new Uint8Array((N+2)*(z+2));L.pg(p,new df(1,1,N,z),P,new df(0,0,N+2,z+2));
|
|
if(!u){var h=Math.round((N+2)*(z+2)/1e4),j=gE.Ra(P.slice(0),N+2,z+2,Math.min(12,h)),C=gE.Vp(j);if($){console.log("trace smooth",Date.now()-o);
|
|
o=Date.now()}}else{var C=L.M.Ew(P,N+2,z+2,Y,$)}var V=C.length,d=new fY(1,0,0,1,-1,-1);for(var f=0;f<V;
|
|
f++)L.M.t(C[f].path.I,d,C[f].path.I);this.Zr=C;this.Wt=l;for(var f=0;f<V;f++){var m=C[f];for(var R=f+1;
|
|
R<V;R++){var g=C[R];if(g.parent==f&&l.fD[g.color-1].est.q[3]<.05){var S=g.path.o.slice(1);S.reverse();
|
|
S=["M"].concat(S);var F=[],j=g.path.I.length;for(var r=0;r<j;r+=2){F[r]=g.path.I[j-2-r];F[r+1]=g.path.I[j-2-r+1]}L.M.concat(m.path,{I:F,o:S})}}}if($){console.log("finding holes",Date.now()-o);
|
|
o=Date.now()}for(var f=0;f<C.length;f++){var m=C[f],q=l.fD[m.color-1].est.q;if(q[3]<=.05){C.splice(f,1);
|
|
f--;continue}}for(var f=1;f<C.length;f++){var W=C[f-1],m=C[f];if(W.color==m.color){L.M.concat(W.path,m.path);
|
|
C.splice(f,1);f--;continue}}this.HQ()}else{var Z=new Uint32Array(N*z),I=N*z;for(var f=0;f<I;f++){var _=l.fD[l.Zg[f]];
|
|
Z[f]=_.est.rgba}this.aqO=new Uint8Array(Z.buffer);this.dp.a([{Sg:T.Sg,data:Z.buffer}])}};iW.prototype.HQ=function($){if(this.Zr==null)return;
|
|
var o=this.hW.Sg.d,T=this.hW.Sg.w,s=this.Zr,E=this.Wt.fD,e=this.S,n=this.V8,A=this.ti.s2();n.setTransform(1,0,0,1,0,0);
|
|
n.clearRect(0,0,e.width,e.height);n.translate(e.width/2,e.height/2);n.scale(A.X,A.X);n.translate(A.l.x/A.X-o/2,A.l.y/A.X-T/2);
|
|
n.scale(1/A.X,1/A.X);n.fillStyle=this.z0;n.fillRect(0,0,o*A.X,T*A.X);n.scale(A.X,A.X);var u=[];for(var f=0;
|
|
f<E.length;f++){var Y=E[f].est.q;u.push({i:Math.round(255*Y[0]),m:Math.round(255*Y[1]),P:Math.round(255*Y[2]),Ca:Math.round(255*Y[3])})}for(var f=0;
|
|
f<s.length;f++){var b=s[f],Y=u[b.color-1];if(Y.Ca==0)continue;n.fillStyle="rgba("+Y.i+","+Y.m+","+Y.P+","+Y.Ca/255+")";
|
|
n.beginPath();Typr.U.pathToContext({crds:b.path.I,cmds:b.path.o},n);n.fill()}};iW.prototype.eg=function($){var o=this.fN,T=o.D[0],s=o.u[T],E=new x(H.E.N,!0);
|
|
E.US=!0;E.U=D.Jc;if(this.Qy){var e=this.Zr,n=e.length==1,A=o.u.slice(0,T);if(!n)A.push(o.jK());for(var f=0;
|
|
f<e.length;f++){var u=e[f],Y=this.Wt.fD[u.color-1].est.q;L.M.t(u.path.I,new fY(1,0,0,1,s.rect.x,s.rect.y),u.path.I);
|
|
var b=o.$f();b.tM("Path "+f);A.push(b);b.opacity=Math.round(Y[3]*255);b.Jp|=16;b.add.SoCo={classID:"null",Clr:{t:"Objc",v:L.h.wb({i:255*Y[0],m:255*Y[1],P:255*Y[2]})}};
|
|
b.add.vmsk=new M.PZ;b.add.vstk=JSON.parse(JSON.stringify(ev.ci.default));b.add.vmsk.g=L.M.Hz(u.path,!1);
|
|
b.add.vogk=[];b._L();b.tF(o)}var a=A[A.length-1];if(!n){var b=o.$f();b.tM(s.getName());b.add.lsct=hd.NH;
|
|
b.fh="pass";b.Jp=24;A.push(b);a=b}var w=s.add.lmfx;if(w)a.add.lmfx=JSON.parse(JSON.stringify(w));for(var f=T+1;
|
|
f<o.u.length;f++)A.push(o.u[f]);E.data={e:M.Ia,c_:A,a3:[T+e.length+(n?-1:1)],U1:[11,11]}}else{var A=o.u.slice(0),b=o.$f();
|
|
b.tM(s.getName());A.splice(o.D[0]+1,0,b);b.rect=s.rect.clone();b.buffer=this.aqO;b.T();E.data={e:M.Ia,c_:A,a3:[o.D[0]+1],U1:"Reduce Colors"}}this.J(E);
|
|
this.close()};function dH($){bq.call(this,[[7,11],[7,13]][$],["redge","magiccut"][$]);this.pY=$;this.hW={};
|
|
this.VP=null;this.mh=null;this.fN=null;this.pD=null;this.d_=null;this.body.style.padding="0";this.jD=[];
|
|
this.q1=-1;this.bQ=H.z("div","form hbar padded");this.body.appendChild(this.bQ);this.jz=new ef;this.jz.parent=this;
|
|
this.jz.B(H.E.O,this.Rb,this);this.bQ.appendChild(this.jz.k);var o=$==0?["#ffffff","#888888","#000000"]:["#00dd00","#888888","#ff0000"];
|
|
o=o.concat(PIMG["tools/hand"],PIMG.zoomIn,PIMG.zoomOut);var T=$==0?[[12,45],"Unknown",[12,46]]:[[12,45],"Erase",[12,46]];
|
|
this.HF=new bI(null,o,T,28);this.HF.B(H.E.O,this.Vb,this);this.bQ.appendChild(this.HF.k);this.l3=new ac([7,9],0,50,null);
|
|
this.l3.parent=this;this.l3.B(H.E.O,[this.ae5,this.bT][$],this);this.bQ.appendChild(this.l3.k);var s=this.ahx=new hE([2,2],!1,null,!0);
|
|
s.B("click",this.wA,this);this.bQ.appendChild(s.k);var E=this.anY=H.z("span","form");this.bQ.appendChild(E);
|
|
var e=this.aoP=new hE([12,90],!1,null,!0);e.B("click",function(u){alert($==0?aX.get([15,7,1]):"Mark the object with Green, background with Red. Two colors should never touch.",5e3)},this);
|
|
E.appendChild(e.k);var n=new hE("Tutorial",!1,null,!0);n.B("click",this.akz,this);E.appendChild(n.k);
|
|
this.HE=new bI([12,46],["checker","#ffffff","#000000"]);this.HE.B(H.E.O,this.ajy,this);E.appendChild(this.HE.k);
|
|
this.D7=new h_(null,[[6,13],[6,2],[17,2]]);E.appendChild(this.D7.k);this.as=new hE("OK",!1,null,!0);
|
|
this.as.B("click",this.eg,this);E.appendChild(this.as.k);var A=H.z("div","flexrow");this.body.appendChild(A);
|
|
this.xt=new ap(!0);this.w4=new ap;this.xt.x9(this.w4);this.w4.x9(this.xt);this.xt.B("mousedown",this.gO,this);
|
|
this.xt.B("mousemove",this.$d,this);this.xt.B("mouseup",this.uZ,this);this.xt.B("zoom",this.Rb,this);
|
|
this.w4.B("zoom",this.Rb,this);A.appendChild(this.xt.k);A.appendChild(this.w4.k)}dH.prototype=new bq;
|
|
dH.prototype.cl=function($,o){var T=$!=null&&!$.u[$.D[0]].rect.p4();if(!T)alert("The layer is empty.");
|
|
return T};dH.prototype.Kh=function(){return new aY(0,0)};dH.prototype.xQ=function(){return!0};dH.prototype.RE=function($,o){o=o-12-33;
|
|
$=Math.floor($/2);if($<450){this.anY.setAttribute("style","display:block; text-align:right;");o-=29}else{this.anY.setAttribute("style","position:absolute; right:0px")}this.xt.RE($,o);
|
|
this.w4.RE($,o)};dH.prototype.f=function(){bq.prototype.f.call(this);this.jz.f();this.l3.f();this.as.f();
|
|
this.HE.f();this.D7.f();this.ahx.f();this.aoP.f()};dH.prototype.akz=function($){window.open("//www.photopea.com/"+["learn/refine-edge","tuts/magic-cut-remove-image-background-online"][this.pY],"_blank")};
|
|
dH.prototype.YE=function($,o){this.mh=$;if(o==gr.m8||o==gr.zo){this.jz.bq($.n_);this.jz.a(a8.it(),$.n_.Ou,$.n_.A0)}};
|
|
dH.prototype.Vb=function($,o,T,s){var E=this.HF.v();if(s==null){this.xt.Vb(ap.aez(E-3));return}this.pD=s;
|
|
var e=D.x5.Vd(this.jz.v(),s);if(e!=null){this.jz.a(e);this.Rb()}else if(s.L(dN.I6)&&s.L(dN.Oa)){var n=this.jD,A=0;
|
|
if(s.L(dN.Et)){if(this.q1+1<n.length)A=1}else if(this.q1>0)A=-1;if(A!=0){this.q1+=A;var u=this.q1,Y=this.hW;
|
|
if(A==1)L.h9(n[u][2],n[u][0],Y.XM,Y.rect);else L.h9(n[u+1][1],n[u+1][0],Y.XM,Y.rect);Y.to=Y.rect;this.bT()}}else if(E<3)this.xt.Vb(s)};
|
|
dH.prototype.Fa=function($){var o=this.hW,T=this.jD,s=L.G($.Y()*4);L.h9(o.fQ,o.rect,s,$);o.fQ=null;var E=L.G($.Y()*4);
|
|
L.h9(o.XM,o.rect,E,$);this.q1++;T[this.q1]=[$.clone(),s,E];while(T.length>this.q1+1)T.pop();while(T.length>50){T=T.slice(1);
|
|
this.q1--}};dH.prototype.Rb=function(){var $=this.mh,o=ih.y8(this.jz.v(),$.n_.Ou,this.xt.s2().X);this.xt.OS(o)};
|
|
dH.prototype.gO=function($){var o=this.mh,T=this.hW,s=this.pD,E=this.jz.v(),e=this.xt.TE(),n=[16777215,8421504,0][this.HF.v()];
|
|
this.VP=new ih(E,o.n_.list[0].Ou,o.n_.list[0].A0,{yV:1,$t:!0},n,o.GR,T.rect);T.fQ=T.XM.slice(0);if(s!=null&&s.L(dN.Et)&&this.d_){this.VP.moveTo(this.d_.x,this.d_.y);
|
|
this.VP.lineTo(e.x,e.y)}else this.VP.moveTo(e.x,e.y);this.a0w()};dH.prototype.$d=function($){var o=this.hW,T=this.xt.TE();
|
|
this.VP.lineTo(T.x,T.y);this.a0w()};dH.prototype.uZ=function($){this.d_=this.xt.TE();this.Fa(this.VP.cx());
|
|
this.bT()};dH.prototype.a0w=function(){var $=this.hW,o=this.VP,T=o.kx();if(T.p4())return;$.to=T;L.R.xE("norm",o.su(),o.rX(),$.XM,$.rect,T,1);
|
|
this.ami()};dH.prototype.wA=function($){var o=this.hW;o.fQ=o.XM.slice(0);o.to=o.rect;L.wr(o.XM,[4278190080,4292730333][this.pY]);
|
|
this.Fa(o.rect);this.bT()};dH.prototype.kW=function($,o){this.fN=$;var T=$.u[$.D[0]],s=T.rect.clone(),E=s.d,e=s.w;
|
|
this.l3.a(this.pY==0?3:E*e<3e6?3:0);this.HF.a($.Z==null?0:1);this.l3.v9();if(this.pY==0&&$.Z!=null||this.pY==1)this.l3.wI();
|
|
var n=this.pY,A=L.G(s.Y()),u=new Float32Array(s.Y());if(n==0&&$.Z){L.pg($.Z.channel,$.Z.rect,A,s);var Y=L.G(s.Y());
|
|
for(var b=0;b<e;b++)for(var a=0;a<E;a++){var f=b*E+a,w=A[f];if(a>0&&A[f-1]!=w||a<E-1&&A[f+1]!=w||b>0&&A[f-E]!=w||b<e-1&&A[f+E]!=w)Y[f]=255}L.style.Mp(Y,u,E,e)}else u.fill(1e9);
|
|
s.x=s.y=0;this.hW={rect:s,_3:T.buffer,I9:A,Z_:u,Nl:L.G(s.Y()*4),PG:L.G(s.Y()*4),XM:L.G(s.Y()*4),fQ:null,jJ:null,to:s,ar5:{}};
|
|
if(n==0)this.ae5();else{this.hW.ar5=D.b5.Zt($);var X=this.hW.XM;L.wr(X,4287137928);var N=L.gE.getSelection(T.buffer,E,e),z=Math.round(E/60),i=Math.round(.7*e);
|
|
for(var b=0;b<e;b++)for(var a=0;a<E;a++){var k=(b*E+a)*4,Q=N[k>>>2];Q=Q>128?255:128;if(b<z||b<i&&(a<z||a>E-1-z))Q=0;
|
|
X[k]=X[k+1]=X[k+2]=Q}this.bT()}this.jD=[1];this.q1=0;this.xt.aoN();var O=this.jz.v();O.Brsh.v.Dmtr.v.val=Math.round(s.d/(n==0?10:20));
|
|
this.jz.a(O);this.Rb()};dH.prototype.ae5=function(){var $=this.hW,o=$.rect.Y(),T=this.l3.v(),s=$.I9.slice(0);
|
|
for(var f=0;f<o;f++)if($.Z_[f]<T)s[f]=128;L.wr($.XM,4294967295);L.aM(s,$.XM,0);L.aM(s,$.XM,1);L.aM(s,$.XM,2);
|
|
$.to=$.rect;this.bT()};dH.prototype.bT=function(){var $=this.hW,E,A,u=0,Y=0,b=0;this.ami();var o=$.rect,T=o.d,s=o.w,e=L.G(o.Y()),n=$._3;
|
|
L.Ge($.XM,e,0);for(var f=0;f<e.length;f++){if(n[(f<<2)+3]!=255)continue;var a=e[f];if(a==0)u++;else if(a==255)Y++;
|
|
else b++}if(u*Y*b!=0){if(this.pY==0)A=L.eG.eG(o,n,e);else{var w=this.HF.v();for(var X=1;X<s;X++)for(var N=1;
|
|
N<T;N++){var f=X*T+N,z=e[f],i=e[f-1];if(z==0&&i==255||z==255&&i==0){E="The Red and Green should never touch! Erase it with Grey.";
|
|
break}}var k=Date.now(),Q=this.hW.ar5;L.w0(e,Q._D);D.b5.nG(Q,!0);var O=Math.ceil(this.l3.v()/2);if(O==0){A=n.slice(0);
|
|
L.aM(Q.Z,A,3)}else{var c=Q.Z.slice(0),B=Q.Z.slice(0);for(var G=0;G<O;G++){for(var X=1;X<s-1;X++)for(var N=1;
|
|
N<T-1;N++){var f=X*o.d+N,l=c[f];if(c[f-T]!=l||c[f-1]!=l||c[f+1]!=l||c[f+T]!=l)B[f]=128;else B[f]=l}var v=c;
|
|
c=B;B=v}A=L.eG.eG(o,n,c,20,!1)}}}else{A=n.slice(0);L.aM(e,A,3)}for(var f=3;f<A.length;f+=4)if(A[f]>n[f])A[f]=n[f];
|
|
if(o.R1($.rect))$.jJ=A;else L.h9(A,o,$.jJ,$.rect);this.ajy();if(E)alert(E,4e3)};dH.prototype.ami=function($){var o=this.hW,T=o.to;
|
|
L.h9(o._3,o.rect,o.Nl,o.rect,T,!0);var s=o.XM;if(this.pY==1){var E=new Uint32Array(256);E[0]=4278190335;
|
|
E[255]=4278255360;var e=o.rect.Y();s=s.slice(0);var n=new Uint32Array(s.buffer);for(var f=0;f<e;f+=2){n[f]=E[n[f]&255];
|
|
n[f+1]=E[n[f+1]&255]}}L.R.xE("norm",s,o.rect,o.Nl,o.rect,T,.3);this.xt.a([{Sg:o.rect,data:o.Nl.buffer}])};
|
|
dH.prototype.ajy=function($){var o=this.hW;L.wr(o.PG,[0,4294967295,4278190080][this.HE.v()]);L.R.xE("norm",o.jJ,o.rect,o.PG,o.rect,o.rect,1);
|
|
this.w4.a([{Sg:o.rect,data:o.PG.buffer}])};dH.prototype.eg=function($){var o=this.fN,T=this.hW,s=this.D7.v(),E=o.u[o.D[0]],e=new x(H.E.N,!0);
|
|
e.US=!0;var n=E.rect.clone();if(s==0&&E.N9()||s!=0&&!E.N9()){e.U=D.Jc;e.data={e:M._q,c:o.D[0]};this.J(e)}if(o.Z!=null){e.U=D.ZR;
|
|
e.data={e:"fromAction",xU:D.NK.Gw()};this.J(e)}if(s==0){var A=o.u.slice(0),u=o.$f();u.tM(E.getName());
|
|
A.splice(o.D[0]+1,0,u);u.rect=n;u.buffer=T.jJ;u.T();e.U=D.Jc;e.data={e:M.Ia,c_:A,a3:[o.D[0]+1],U1:[7,11]};
|
|
this.J(e)}if(s==1){var Y=E.yy();e.U=D.Jc;e.data={e:M.y1,a6c:!0};this.J(e);var b=E.yy();b.channel=L.G(n.Y());
|
|
b.rect=n;b.color=0;b.Or=!0;L.Ge(T.jJ,b.channel,3);if(Y){var a=b.E8(Y);b.rect=a.rect;b.channel=a.channel;
|
|
b.color=a.color}b.Gg();E.tF()}if(s==2){var w={rect:n,channel:L.G(n.Y())};L.Ge(T.jJ,w.channel,3);e.U=D.ZR;
|
|
e.data={e:"setsel",Z:w,U1:this.Ro};this.J(e)}this.close()};function iA(){bq.call(this,[1,13],"locstor");
|
|
this.GH=null;this.HG=[];var $=this.body,o=H.z("p");o.textContent="These files are loaded every time you start Photopea.";
|
|
$.appendChild(o);this.aek=0;this.aX=H.z("span");$.appendChild(this.aX);this.aX.setAttribute("style","display:inline-block; width:12em; font-weight:bold;");
|
|
var T=H.z("span","form");$.appendChild(T);this.VA=new hE([5,4],!1,null,!0);this.VA.B("click",this.amP,this);
|
|
T.appendChild(this.VA.k);this.ajF=new hE("Get all as ZIP",!1,null,!0);this.ajF.B("click",this.NQ,this);
|
|
T.appendChild(this.ajF.k);this.GA=new eW(!0);this.GA.parent=this;this.GA.iI(1);this.GA.B(H.E.O,this.af5,this);
|
|
$.appendChild(this.GA.k);this.GA.k.setAttribute("style","width: 40em; height: 25em")}iA.prototype=new bq;
|
|
iA.prototype.f=function(){bq.prototype.f.call(this);this.aX.textContent=aX.get([13,2])+": "+c6.yY(this.aek);
|
|
this.VA.f()};iA.prototype.YE=function($,o){this.GH=$;if(o==gr.CZ)this.kW()};iA.prototype.kW=function($,o){var T=this.GH.wM.Mz,u=0;
|
|
this.HG=[];for(var s in T)this.HG.push(s);this.HG.sort(function(b,a){b=b.split(".");a=a.split(".");return b[1]==a[1]?b[0]<a[0]?-1:1:b[1]<a[1]?-1:1});
|
|
var E=Math.floor(100*H.K()),e=Math.floor(16*H.K()),n=[],A=[];for(var f=0;f<this.HG.length;f++){var s=this.HG[f],Y=iA.Ey(s,T[s],E,e);
|
|
n.push(Y);A.push(s);u+=T[s].byteLength}this.GA.rS(n,A,E,e);this.aek=u;this.f()};iA.prototype.af5=function($){this.GA.o5(this.GA.v())};
|
|
iA.prototype.amP=function($){var f=this.GA.v();if(f==-1){alert("Select a file first.");return}this.GA.a(-1);
|
|
var o=this.GH.wM.Mz;delete o[this.HG[f]];var T=new x(H.E.Q,!0);T.data={e:H.V.uY,M9:gr.CZ};this.J(T)};
|
|
iA.prototype.NQ=function($){var o=this.GH.wM.Mz,T={};for(var s in o)T[s]=new Uint8Array(o[s]);var E=UZIP.encode(T);
|
|
fV.save(E,"resources.zip")};iA.Ey=function($,o,T,s){var E=H.z("canvas"),A=0;E.width=T;E.height=s;var e=E.getContext("2d"),n=$.split(".").pop().toLowerCase();
|
|
for(var f=0;f<n.length;f++)A+=n.charCodeAt(f)*613<<8*f;e.fillStyle="#"+L.B$(A&16777215);e.fillRect(0,0,20,s);
|
|
var u=Math.floor(14*H.K());e.fillStyle="#000000";e.font="bold "+u+"px sans-serif";var Y=(s-u)/2,b=c6.yY(o.byteLength),a=e.measureText(b);
|
|
e.fillText(b,T-12-a.width,s-Y);return E.toDataURL()};function fx($,o,T){bq.call(this,o,"cwindow");this.a7z=new aY(T[0],T[1]-33);
|
|
this.bQ=H.z("div","form");this.bQ.setAttribute("style","width:"+(T[2]-T[0])+"px; height:"+(T[3]-T[1])+"px");
|
|
this.body.appendChild(this.bQ)}fx.prototype=new bq;fx.prototype.Kh=function($,o){return this.a7z.clone()};
|
|
function hc(){bq.call(this,["PSD VAR0",[25,0]],"templates");this.RM=null;this.gw=0;this.bU=null;this.body.setAttribute("style","padding:0");
|
|
this.I_=new hE("Add Templates",null,null,!0);this.body.appendChild(this.I_.k);this.I_.B("click",this.arG,this);
|
|
this.I_.k.setAttribute("style","position:absolute; margin-top: -28px; margin-left:150px");this.aei=new hE("New Template",null,null,!0);
|
|
this.aei.B("click",this.a3F,this);this.aO=H.z("iframe","scrollable");this.aO.setAttribute("style","border:none; margin:0; padding:0;");
|
|
this.dU=H.z("div","form scrollable padded");this.AN=H.z("div","form scrollable padded label12");var $=[],o=hc.WK;
|
|
this.a7=[];for(var T in o){var s=parseInt(T.slice(1)),E=s%10==0?"":"\u2800\u2800- ";$.push(E+o[T]);this.a7.push(s)}this.vy=[new d_("Name",null,30),new d_("Description",null,30,4),new d_("File"," www.Photopea.com#i...",17),new d_("Thumbnail URL","* Use Imgur.com etc., ratio 3:2",17),new h_("Category",$),new hE("<< Back",null,null,!0),new hE("Save",null,null,!0),new eB("Publish your PSD: File - Publish Online - PSD. Use that URL as \"File\"."),new eB("Get a Thumbnail URL: File - Publish Online - JPG. At Imgur.com, right-click your image and choose \"Copy Image Address\".")];
|
|
for(var f=0;f<this.vy.length;f++){var e=this.vy[f];this.AN.appendChild(e.k);e.parent=this;if(f!=5)H.ze(this.AN);
|
|
if(e instanceof hE)e.B("click",this.ahS,this)}this.body.appendChild(this.aO)}hc.prototype=new bq;hc.prototype.Kh=function($,o){return new aY(0,0)};
|
|
hc.prototype.RE=function($,o){o=o-4;$=$;var T=this.dU;T.style.width=$-12+"px";T.style.height=o-12+"px";
|
|
var T=this.AN;T.style.width=$-12+"px";T.style.height=o-12+"px";var T=this.aO;T.style.width=$+"px";T.style.height=o+"px"};
|
|
hc.prototype.f=function(){bq.prototype.f.call(this)};hc.prototype.kW=function($,o,T,s){this.arG(null,!1)};
|
|
hc.prototype.arG=function($,o){var T=o!=null?o:H.ni(this.aO);if(T){if(!bX.Oo()){alert("You need to log in first!");
|
|
return}var s=bX.gp();this.RM=s.tpl?s.tpl.list:[];this.Hb()}else{this.aO.setAttribute("src","");this.aO.setAttribute("src","plugins/tpls")}this.body.removeChild(this.body.children[this.body.children.length-1]);
|
|
this.body.appendChild(T?this.dU:this.aO);this.I_.yl(T?"All Templates":"Add Templates")};hc.prototype.Hb=function(){var $=this.RM,o=this.dU;
|
|
H.Ft(o);var T=H.z("h1");T.textContent="Share your PSD templates with the world!";var s=H.z("h3");s.textContent="Users won't be able to download a PSD, they can only export a JPG or a PNG after editing.";
|
|
o.appendChild(T);o.appendChild(s);o.appendChild(this.aei.k);for(var f=0;f<$.length;f++){var E=$[f],e=H.z("div");
|
|
o.appendChild(e);e.setAttribute("style","clear:both;");var n=H.z("img");e.appendChild(n);n.setAttribute("src",E.thmb);
|
|
n.setAttribute("style","height:10em; float:left; margin-right: 1em; margin-bottom:1em;");var A=H.z("h3");
|
|
e.appendChild(A);A.textContent=E.name;var u=H.z("p");e.appendChild(u);u.textContent=E.desc;for(var Y=0;
|
|
Y<2;Y++){var b=new hE(Y==0?"Edit":"Delete",null,null,!0);b.aea=f;b.jm=Y==0;b.B("click",this.a3w,this);
|
|
e.appendChild(b.k)}}};hc.prototype.a3F=function($){this.bU={catg:0,desc:"",file:"",name:"",thmb:"",utme:""};
|
|
this.jm()};hc.prototype.a3w=function($){this.gw=$.target.aea;if(!$.target.jm){this.RM.splice(this.gw,1);
|
|
this.NQ();this.Hb();return}this.jm()};hc.prototype.jm=function(){this.body.removeChild(this.dU);this.body.appendChild(this.AN);
|
|
var $=["name","desc","file","thmb"],o=this.bU?this.bU:this.RM[this.gw];for(var f=0;f<4;f++){var T=o[$[f]];
|
|
if(T!=""&&f==2)T="https://photopea.com#i"+T;this.vy[f].a(T)}this.vy[4].a(this.a7.indexOf(o.catg))};hc.prototype.ahS=function($){if(this.vy.indexOf($.target)==6){var o=this.vy[3].v().trim(),T=o.startsWith("http")&&(o.endsWith(".jpeg")||o.endsWith(".jpg")||o.endsWith(".png"));
|
|
if(!T){alert("Thumbnail URL is incorrect.");return}var s=new XMLHttpRequest,E="mirror.php?url="+encodeURIComponent(o);
|
|
s.open("GET",E);s.responseType="arraybuffer";s.onload=this.a8h.bind(this);s.send()}else this.wA()};hc.prototype.a8h=function($){var o=$.target.response,T=o.byteLength;
|
|
if(T>2e5){alert("Thumbnail is too large ("+c6.yY(T)+"). Make it under 200 kB.");return}var s=["name","desc","file","thmb"],E=this.bU?this.bU:this.RM[this.gw];
|
|
for(var f=0;f<4;f++){var e=this.vy[f].v().trim();if(e.length==0){alert("One of values is empty.");return}if(f==2){var n=e.split("#i");
|
|
if(n.length!=2||n[1].length!=8){alert("File ID is incorrect.");return}e=n.pop()}E[s[f]]=e}E.catg=this.a7[this.vy[4].v()];
|
|
if(E.utme.length==0)E.utme=""+Math.round(Date.now()/1e3);if(this.bU)this.RM.push(this.bU);this.NQ();
|
|
this.wA()};hc.prototype.wA=function(){this.bU=null;this.body.removeChild(this.AN);this.body.appendChild(this.dU);
|
|
this.Hb()};hc.prototype.NQ=function(){var $=bX.gp();if(this.RM.length==0)delete $.tpl;else $.tpl={list:JSON.parse(JSON.stringify(this.RM))};
|
|
bX.l5($,function(){alert("Saved.")})};hc.WK={c0:"Mockups",c1:"Mobile & Web",c2:"Print",c3:"Product",c10:"Social Media",c11:"Youtube",c12:"Instagram",c13:"Facebook",c14:"Memes",c20:"Print",c21:"Cards",c22:"Invitations",c23:"Brochures",c30:"Mobile",c40:"Websites",c50:"Presentations",c60:"Other"};
|
|
function bp(){bq.call(this,"Make Selection","makesel");this.GH=null;var $=H.z("div","form");this.body.appendChild($);
|
|
this.mT=new ad("Anti-Alias");this.mT.a(!0);$.appendChild(this.mT.k);H.ze($);this.Ay=new hg(!0);$.appendChild(this.Ay.k);
|
|
this.as=new hE("OK",!0,null,!0);this.as.B("click",this.eg,this);this.body.appendChild(this.as.k)}bp.prototype=new bq;
|
|
bp.prototype.f=function(){bq.prototype.f.call(this);this.Ay.f()};bp.prototype.eg=function($){var o=new x(H.E.N,!0);
|
|
o.U=D.ZR;o.data={e:"frompath",n4:[null,0,this.Ay.acz(),!this.mT.v()]};this.close();this.J(o)};function bR(){bq.call(this,["VAR0 PSD/PSB",[1,2]],"savepsb");
|
|
this.EF=null;this.rN=null;this.pk=null;var $=this.aaz=H.z("div","form");$.setAttribute("style","width:20em");
|
|
this.body.appendChild($);this.VK=new eI([12,50],["PSD","PSB"]);this.VK.B(H.E.O,this.E4,this);$.appendChild(this.VK.k);
|
|
H.Qk($);var o=new eB("Minify the file");$.appendChild(o.k);H.ze($);var T=["Blank preview image","ZIP for pixel data","Remove Smart Object pixels","Put the file into ZIP"];
|
|
this.LB=[];for(var f=0;f<T.length;f++){var s=new ad(T[f]);this.LB.push(s);$.appendChild(s.k);s.B(H.E.O,this.E4,this)}H.Qk($);
|
|
this.bf=new eB("aa.psd");this.Rv=new eB("10 kB");$.appendChild(this.Rv.k);this.a9L=new eB("1000 B");
|
|
$.appendChild(this.a9L.k);this.bD=new hE([1,2],!0,null,!0);this.bD.B("click",this.eg,this);$.appendChild(this.bD.k);
|
|
this.tG=new hE(["VAR0 (Google Drive)",[1,2]],!0,null,!0);this.tG.B("click",this.eg,this);$.appendChild(this.tG.k);
|
|
this.B("closebtn",this.WB,this)}bR.prototype=new bq;bR.prototype.kW=function($,o,T,s){var E=H.ni(this.tG.k),e=$.rb!=null&&$.rb.WN=="psd";
|
|
if(e&&!E)this.aaz.appendChild(this.tG.k);if(!e&&E)this.aaz.removeChild(this.tG.k);for(var f=0;f<this.LB.length;
|
|
f++)this.LB[f].a(!1);this.EF=$;this.E4()};bR.prototype.eg=function($){if($.target==this.bD)fV.save(this.rN,this.pk);
|
|
else{if(this.LB[3].v()){alert("You should not save a ZIP as a PSD to Google Drive.");return}e9.al5(this.EF,this.rN)}};
|
|
bR.prototype.WB=function(){this.EF=null;this.rN=null};bR.prototype.E4=function(){var $=this.EF,o=[!1,!1,!1,!1];
|
|
for(var f=0;f<3;f++)o[f]=this.LB[f].v();var T=this.LB[3].v(),s=o[3]=this.VK.v()==1,E=$.name.slice(0,$.name.length-3),e=this.rN=eY.Q1("PSD").tC($,0,0,o),J=this.pk=E+"ps"+(s?"b":"d");
|
|
if(T){var n={};n[J]=new Uint8Array(e);e=this.rN=UZIP.encode(n);J=this.pk=E+"zip"}this.bf.a(J);this.Rv.a(c6.yY(e.byteLength));
|
|
this.Rv.k.style["font-size"]="2em";this.a9L.a(" \u2001 "+e.byteLength+" B");this.bD.yl(aX.get([1,2])+" \""+J+"\"")};
|
|
bR.prototype.f=function(){bq.prototype.f.call(this);this.bD.f();this.tG.f()};function a_($,o,T,s){aI.call(this);
|
|
this.name=$;this.ado=T;this.ol=s;this.f6=H.z("div","");this.f6.setAttribute("draggable","true");this.$H=H.z("div","pbody");
|
|
this.M2=new hE("",!1,"");this.M2.parent=this;this.ahc=H.z("span","cross");this.s0=H.z("span","label");
|
|
var E=this.a3B.bind(this);this.f6.addEventListener("mousedown",this.am5.bind(this),!1);this.f6.addEventListener("contextmenu",E,!1);
|
|
this.M2.k.addEventListener("contextmenu",E,!1);this.ahc.addEventListener("mousedown",this.PN.bind(this),!1);
|
|
this.f6.appendChild(this.s0);if(o)this.f6.appendChild(this.ahc);this.pz=!1;this.XY=new eb([{name:[1,12]}]);
|
|
this.XY.B("select",this.PN,this);this.s0.textContent=$}a_.prototype=new aI;a_.prototype.q5=function(){return null};
|
|
a_.prototype.f=function(){var $=aX.get(this.name),o=this.N0==0?22:Math.round(2+this.N0/50),T=$.length>o;
|
|
this.s0.textContent=T?$.slice(0,o-2):$;if(T)for(var s=0;s<2;s++){var E=H.z("span");E.textContent=$.charAt(o-2+s);
|
|
E.setAttribute("style","opacity:"+(.6-s*.4));this.s0.appendChild(E)}var e=$.split(" "),n=e.length==2?e[0].substring(0,2)+e[1][0]:$.substring(0,3);
|
|
if(n.charCodeAt(0)>=11776)n=n.substring(0,1);var A=this.ado;if(A==null)this.M2.yl(n,$);else{if(A.indexOf("\"")==-1)this.M2.yl("<img src=\""+A+"\" alt=\""+$+"\" height=\"20\" />",$)}};
|
|
a_.prototype.enable=function(){this.$H.setAttribute("class","pbody")};a_.prototype.disable=function(){this.$H.setAttribute("class","pbody disabled")};
|
|
a_.prototype.YE=function($,o){};a_.prototype.kW=function($,o,T){};a_.prototype.C4=function($){};a_.prototype.RE=function($,o){};
|
|
a_.prototype.$_=function($){this.name=$;this.f()};a_.prototype.Lh=function(){};a_.prototype.am5=function($){if($.button==0)this.J(new x("select",!1))};
|
|
a_.prototype.a3B=function($){H.zl($);if(this.ol!=null&&isNaN(this.ol))return;var o=H.DQ($,document.body),T=this.XY;
|
|
T.update(null);T.f();T.parent=this;var s=new x(H.E.Q,!0);s.data={e:H.V.NM,bF:T,x:o.x+1,y:o.y+1};this.J(s)};
|
|
a_.prototype.aki=function(){this.PN({})};a_.prototype.PN=function($){if($.stopPropagation)$.stopPropagation();
|
|
if(this.ol!=null&&!isNaN(this.ol)){var o=new x(H.E.Q,!0);o.data={e:H.V.mG,bF:this.XY};this.J(o);o.data={e:H.V.uY,M9:gr.tc,H:parseFloat(this.ol),U_:"del"};
|
|
this.J(o)}else if(this.a5A())this.J(new x(H.E.rA,!1))};a_.prototype.a5A=function($){return!0};a_.prototype.iO=function($,o,T,s,E){};
|
|
a_.prototype.ZS=function($,o,T,s,E){};a_.prototype.yg=function($,o,T,s,E){};a_.Hk=function($,o){if($.childElementCount!=0)return;
|
|
var T=$.textContent;this.f2=this.a4V.bind(this);this.acU=this.amn.bind(this);this.YV=o;this.qm=$;this.a09=T;
|
|
var s=H.z("input","");s.setAttribute("type","text");s.setAttribute("size","10");s.setAttribute("value",T);
|
|
H.Ft($);$.appendChild(s);s.select();s.focus();$.addEventListener("keyup",this.f2,!1);document.body.addEventListener("mousedown",this.acU,!1)};
|
|
a_.Hk.prototype.a4V=function($){var o=dN.AL,T=o($.code,dN.FT);if(o($.code,dN.R5)||T)this.anf(T)};a_.Hk.prototype.amn=function($){var o=$.target;
|
|
if(o.tagName&&o.tagName.toLowerCase()=="input")return;this.anf(!0)};a_.Hk.prototype.anf=function($){var o=this.qm,T=o.firstChild.value;
|
|
o.removeEventListener("keyup",this.f2);document.body.removeEventListener("mousedown",this.acU);if($&&T!=""){this.YV(T)}else{H.Ft(o);
|
|
o.textContent=this.a09}};a_._4={Ww:"0",apa:"1",Jc:"2",ans:"3",aip:"4",ga:"5",CSS:"6",m8:"7",aoi:"8",a4_:"9",ahB:"10",aeM:"11",a3V:"12",ux:"13",ws:"14",aqo:"15",ac2:"16",_8:"17",alH:"19",alk:"20"};
|
|
function gl(){a_.call(this,[9,9],!1,null,a_._4.aeM);this.GH=null;this.ET=[0,0];this.CJ=H.z("div","padded scrollable");
|
|
this.CJ.setAttribute("style","width:260px; height:260px");this.$H.appendChild(this.CJ);this.B(H.E.O,this.W6,this);
|
|
this.si=H.z("div","lpfoot");this.$H.appendChild(this.si);this.PE=[];var $="<svg class=\"gsicon\" viewBox=\"0 0 14 18\" width=\"14\" height=\"18\" fill=\"black\">",o="</svg>",T=$+"<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\" />"+o,s=$+"<path d=\"M0,2 L14,9 L0,16 Z\" />"+o;
|
|
this.ahi=$+"<circle cx=\"7\" cy=\"9\" r=\"6\" />"+o;this.ar6=$+"<path d=\"M2,4 L12,4 L12,14 L2,14 Z\" />"+o;
|
|
var E=[this.ahi,s,"lrs/folder","lrs/newlayer","lrs/bin",T],e=[[15,8,0],[5,8],[15,8,1],[15,8,2],[5,4],[1,2]];
|
|
for(var f=0;f<E.length;f++){var n=E[f];if(1<f&&f!=E.length-1)n="<img src=\""+PIMG[E[f]]+"\" class=\"gsicon\" />";
|
|
var A=new hE(n,!1,e[f]);A.B("click",this.aa5,this);this.si.appendChild(A.k);this.PE.push(A)}}gl.prototype=new a_("");
|
|
gl.prototype.f=function(){a_.prototype.f.call(this);for(var f=0;f<this.PE.length;f++)this.PE[f].f()};
|
|
gl.prototype.aa5=function($){var f=this.PE.indexOf($.currentTarget),o=this.ET,T=this.GH,s=T.If;if(f==0){var E,e=T.p$;
|
|
if(s.length==0){alert("Create an Action Set first.");return}if(o.length<2){alert("Select a target action first.");
|
|
return}if(e==null){E=this.ar6;e=this.ET}else{E=this.ahi;e=null}this.PE[0].yl(E);T.p$=e}else if(f==1)this.aeq();
|
|
else if(f==2||f==3){var n={U1:"Action Set "+s.length,Vi:[],exp:!0};if(f==2||s.length==0){o=[s.length];
|
|
s.push(n)}if(f==3){var A=s[o[0]].Vi;o=[o[0],A.length];A.push({U1:"Action "+A.length,color:0,Vi:[],an7:!1,shift:!1,exp:!0,II:A.length})}this.ET=o;
|
|
this.iB()}else if(f==4){var u;if(o.length==1)u=s;else if(o.length==2)u=s[o[0]].Vi;else u=s[o[0]].Vi[o[1]].Vi;
|
|
var Y=o.length-1;u.splice(o[Y],1);if(u.length==0)o.pop();else while(o[Y]>=u.length)o[Y]--;if(o.length==0)o.push(0);
|
|
this.iB()}else if(f==5){if(s.length==0){alert("No Actions Present.");return}var b=new x(H.E.Q,!0);b.data={e:H.V.OM,ajP:gr.N,S9:o[0]};
|
|
this.J(b)}};gl.prototype.W6=function($){var o=this.GH.If,T=$.data.e,s=$.data.ll;if(T=="sel")this.ET=s;
|
|
if(T=="fold"){if(s.length==1)o[s[0]].exp=!o[s[0]].exp;else o[s[0]].Vi[s[1]].exp=!o[s[0]].Vi[s[1]].exp}if(T=="enab"){var E=o[s[0]].Vi[s[1]].Vi[s[2]];
|
|
E.b=!E.b}if(T=="nchange"){if(s.length==1)o[s[0]].U1=$.data.gl;else o[s[0]].Vi[s[1]].U1=$.data.gl}this.iB()};
|
|
gl.prototype.YE=function($,o){this.GH=$;if(o==gr.N||o==gr.zo)this.iB()};gl.prototype.iB=function(){if(this.GH==null)return;
|
|
H.Ft(this.CJ);var $=this.GH.If;if($.length==0)return;var o=JSON.stringify(this.ET);for(var f=0;f<$.length;
|
|
f++){var T=$[f],s=new gl.ro([f],o,T.exp,T.U1.split("=").pop());s.parent=this;this.CJ.appendChild(s.k);
|
|
if(!T.exp)continue;for(var E=0;E<T.Vi.length;E++){var e=T.Vi[E],s=new gl.ro([f,E],o,e.exp,e.U1.split("=").pop());
|
|
s.parent=this;this.CJ.appendChild(s.k);if(!e.exp)continue;for(var n=0;n<e.Vi.length;n++){var A=e.Vi[n],s=new gl.ro([f,E,n],o,null,aX.get(aj.agi(A)),A.b);
|
|
s.parent=this;this.CJ.appendChild(s.k)}}}};gl.prototype.aeq=function(){var $=this.GH.If,o=this.ET;if($.length==0){alert("No Actions Present");
|
|
return}if(o.length==1){alert("Select an Action first");return}if(this.GH.p$!=null){alert("You can not apply actions while recording actions");
|
|
return}if(o.length==1)o.push(0);var T=$[o[0]],s=T.Vi[o[1]],E=new x(H.E.Q,!0);E.data={e:H.V.mU,n4:[s.U1,T.U1]};
|
|
this.J(E)};gl.ro=function($,o,T,s,E){aI.call(this);this.ll=$;var e=this.ll.length-1;this.k=H.z("div","layeritem"+(JSON.stringify($)==o?" selected":""));
|
|
this.v3=H.z("div","head");this.k.appendChild(this.v3);this.v3.setAttribute("style","height:24px");this.At=H.z("div","headL");
|
|
this.v3.appendChild(this.At);if(e!=0){var n=H.z("div");n.style.width=e*20+"px";this.At.appendChild(n)}if(T!=null){var A=this.ajI=H.z("div",T?"open":"closed");
|
|
this.At.appendChild(A)}else{var u=this.a3O=H.z("div","cmark");u.setAttribute("style","background-size:12px 12px; opacity:"+(E?1:.3));
|
|
this.At.appendChild(u)}if(e==0){var Y=H.z("div","folder");this.At.appendChild(Y)}var b=this.s0=H.z("div","label");
|
|
b.textContent=s;this.At.appendChild(b);this.k.addEventListener("mouseup",this.gU.bind(this),!1)};gl.ro.prototype=new aI;
|
|
gl.ro.prototype.gU=function($){if($.detail==1&&$.target.tagName.toLowerCase()!="input"){var o="sel";
|
|
if($.target==this.ajI)o="fold";if($.target==this.a3O)o="enab";var T=new x(H.E.O,!0);T.data={e:o,ll:this.ll};
|
|
this.J(T)}else if(this.ll.length<3)var s=new a_.Hk(this.s0,this.YV.bind(this))};gl.ro.prototype.YV=function($){var o=new x(H.E.O,!0);
|
|
o.data={e:"nchange",gl:$,ll:this.ll};this.J(o)};var d0=function(){function $(){a_.call(this,[9,3],!1,null,a_._4.m8);
|
|
this.lV=null;this.On=null;this.GH=null}$.prototype=new a_("");$.prototype.pJ=function(){var n=H.z("div","");
|
|
this.$H.appendChild(n);this.VO=H.z("div","bordered cell");this.VO.setAttribute("style","width:10em; height:28.5em;");
|
|
n.appendChild(this.VO);this.Il=[];this.cY=null;this.rK=[];var A=this.arf.bind(this);this.BW=[new T,new s,new E,new e];
|
|
for(var f=0;f<this.BW.length;f++){var u=H.z("div","listitem"),Y=this.BW[f].c8,b=null;if(f==0){this.cY=new eB(Y);
|
|
u.appendChild(this.cY.k)}else{b=new ad(Y,!1);b.B(H.E.O,this.a2f,this);u.appendChild(b.k)}this.rK.push(b);
|
|
this.VO.appendChild(u);this.Il.push(u);u.addEventListener("click",A,!1)}this.UZ=H.z("div","cell padded");
|
|
n.appendChild(this.UZ);for(var f=0;f<this.BW.length;f++)this.BW[f].B("brushchange",this.apN,this);this.setItem(0);
|
|
this.S=H.z("canvas");this.S.height=10;n.appendChild(this.S);this.V8=this.S.getContext("2d");this.bT()};
|
|
$.prototype.RE=function(n,A){if(this.N0==n)return;this.N0=n;this.cQ=A;this.bT()};$.prototype.Lh=function(){if(!H.ni(this.$H))return;
|
|
if(this.VO){this.bT();return}this.pJ();this.f();this.YE(this.GH,gr.zo)};$.prototype.f=function(){a_.prototype.f.call(this);
|
|
if(this.VO==null)return;this.cY.f();for(var f=1;f<this.rK.length;f++)this.rK[f].f();for(var f=0;f<this.BW.length;
|
|
f++)this.BW[f].f()};$.prototype.apN=function(n){var A=this.BW.indexOf(n.currentTarget),u=JSON.parse(JSON.stringify(this.BW[A].On)),Y=new x(H.E.Q,!0);
|
|
Y.data={e:H.V.uY,M9:gr.b$,On:u};this.J(Y)};$.prototype.a2f=function(n){this.a1i(this.rK.indexOf(n.currentTarget),n.currentTarget.Ed())};
|
|
$.prototype.arf=function(n){var f=this.Il.indexOf(n.currentTarget);if(n.target.tagName.toLowerCase()=="input")return;
|
|
if(this.rK[f]&&!this.rK[f].Ed()){this.rK[f].UM();this.a1i(f,!0)}this.setItem(f)};$.prototype.a1i=function(n,A){this.BW[n].c2(A)};
|
|
$.prototype.setItem=function(n){for(var f=0;f<this.BW.length;f++)this.Il[f].setAttribute("class","listitem");
|
|
if(this.UZ.firstChild)this.UZ.removeChild(this.UZ.firstChild);this.Il[n].setAttribute("class","listitem selected");
|
|
this.UZ.appendChild(this.BW[n].k)};$.prototype.YE=function(n,A){this.GH=n;if(this.VO==null)return;if(A==gr.m8||A==gr.zo){this.lV=n.n_;
|
|
for(var f=0;f<this.BW.length;f++)this.BW[f].bq(this.lV)}if(A==gr.b$||A==gr.zo){this.On=n.n_.J_;this.bT()}if(A==gr.ux)this.bT()};
|
|
$.prototype.bT=function(){if(this.On)this.enable();else{this.disable();return}if(!H.ni(this.$H))return;
|
|
var n=this.GH;for(var f=0;f<this.BW.length;f++){this.BW[f].a(this.On);if(this.rK[f])this.rK[f].a(this.BW[f].Ed())}var A=JSON.parse(JSON.stringify(this.On));
|
|
A.Brsh.v.Dmtr.v.val=Math.min(A.Brsh.v.Dmtr.v.val,50);H.QE(this.S,this.N0,80);var u=new df(0,0,this.S.width,this.S.height),Y=new ih(A,this.lV?this.lV.Ou:null,this.lV?this.lV.A0:null,{yV:1},n.z4,n.GR,u),b=u.w/2,a=u.d-b*2;
|
|
Y.moveTo(b,b);for(var f=0;f<=a;f+=10)Y.lineTo(b+f,b+20*Math.sin(2*Math.PI*f/a));Y.finish();var w=this.V8.createImageData(u.d,u.w);
|
|
L.h9(Y.su(),Y.rX(),w.data,u);this.V8.putImageData(w,0,0)};function o(n){aI.call(this);this.c8=n;this.k=H.z("div","");
|
|
this.On=null}o.prototype=new aI;o.prototype.bq=function(n){};o.prototype.a=function(n){this.On=JSON.parse(JSON.stringify(n));
|
|
this.k.setAttribute("class",this.Ed()?"":"disabled");this.bT()};o.prototype.c2=function(n){};o.prototype.Ed=function(){return!1};
|
|
o.prototype.f=function(){};o.prototype.bT=function(){};o.prototype.gZ=function(){this.J(new x("brushchange"))};
|
|
function T(){o.call(this,[15,0]);this.lV=null;this.ago=null;this.ID=new eW(!0);this.k.appendChild(this.ID.k);
|
|
this.ID.B(H.E.O,this.adb,this);this.ID.k.style.height="10.7em";this.DZ=new fs([12,14,0],1,1e3," px",0,!0);
|
|
this.DZ.B(H.E.O,this.anu,this);this.KI=new fs([12,15],0,359," \xB0");this.KI.B(H.E.O,this.a5c,this);
|
|
this.AB=new fs([12,16],0,100," %");this.AB.B(H.E.O,this.ani,this);this.Q_=new fs([12,17],0,100," %");
|
|
this.Q_.B(H.E.O,this.ara,this);this.fp=new fs([12,18],1,300," %");this.fp.B(H.E.O,this.afu,this);this.Il=[this.DZ,this.KI,this.AB,this.Q_,this.fp]}T.prototype=new o;
|
|
T.prototype.f=function(){this.DZ.f();this.KI.f();this.AB.f();this.Q_.f();this.fp.f()};T.prototype.Ed=function(){return!0};
|
|
T.prototype.bq=function(n){this.lV=n;var A=[],u=Math.floor(30*H.K()),Y=Math.floor(40*H.K());for(var f=0;
|
|
f<n.list.length;f++){var b=n.list[f].v,a=ih.Ey(b,n.Ou,n.A0,u,Y);A.push(a)}this.ID.rS(A,null,u,Y)};T.prototype.bT=function(){var n=this.On.Brsh.v,A=n.classID!=this.ago;
|
|
this.ago=n.classID;if(A)for(var f=0;f<this.Il.length;f++)if(this.k.contains(this.Il[f].k))this.k.removeChild(this.Il[f].k);
|
|
this.DZ.a(n.Dmtr.v.val);if(A)this.k.appendChild(this.DZ.k);this.KI.a(n.Angl.v.val);if(A)this.k.appendChild(this.KI.k);
|
|
if(n.classID=="computedBrush"||n.classID=="sampledBrush"){this.AB.a(n.Rndn.v.val);if(A)this.k.appendChild(this.AB.k)}if(n.classID=="computedBrush"){this.Q_.a(n.Hrdn.v.val);
|
|
if(A)this.k.appendChild(this.Q_.k)}this.fp.a(n.Spcn.v.val);if(A)this.k.appendChild(this.fp.k)};T.prototype.adb=function(n){this.On=this.lV.list[this.ID.v()].v;
|
|
this.gZ()};T.prototype.anu=function(n){this.On.Brsh.v.Dmtr.v.val=n.target.v();this.gZ()};T.prototype.a5c=function(n){this.On.Brsh.v.Angl.v.val=n.target.v();
|
|
this.gZ()};T.prototype.ani=function(n){this.On.Brsh.v.Rndn.v.val=n.target.v();this.gZ()};T.prototype.ara=function(n){this.On.Brsh.v.Hrdn.v.val=n.target.v();
|
|
this.gZ()};T.prototype.afu=function(n){this.On.Brsh.v.Spcn.v.val=n.target.v();this.gZ()};function s(){o.call(this,[15,1]);
|
|
this.p8=new fs([15,4,0],0,100,"%");this.p8.B(H.E.O,this.aec,this);this.k.appendChild(this.p8.k);this.db=new fs([15,4,1],0,100,"%");
|
|
this.db.B(H.E.O,this.aav,this);this.k.appendChild(this.db.k);this.ak=new fs([15,4,2],0,100,"%");this.ak.B(H.E.O,this.ahj,this);
|
|
this.k.appendChild(this.ak.k);this.Bn=new fs([15,4,3],0,100,"%");this.Bn.B(H.E.O,this.a1n,this);this.k.appendChild(this.Bn.k);
|
|
this.Am=new fs([15,4,4],1,100,"%");this.Am.B(H.E.O,this.and,this);this.k.appendChild(this.Am.k)}s.prototype=new o;
|
|
s.prototype.f=function(){this.p8.f();this.db.f();this.ak.f();this.Bn.f();this.Am.f()};s.prototype.Ed=function(){return this.On.useTipDynamics.v};
|
|
s.prototype.c2=function(n){this.On.useTipDynamics.v=n;a8.hl.b4(this.On);this.gZ()};s.prototype.bT=function(){var n=this.On;
|
|
if(n.useTipDynamics.v==!1)return;this.p8.a(n.szVr.v.jitter.v.val);this.db.a(n.minimumDiameter.v.val);
|
|
this.ak.a(n.angleDynamics.v.jitter.v.val);this.Bn.a(n.roundnessDynamics.v.jitter.v.val);this.Am.a(n.minimumRoundness.v.val)};
|
|
s.prototype.aec=function(n){this.On.szVr.v.jitter.v.val=n.target.v();this.gZ()};s.prototype.aav=function(n){this.On.minimumDiameter.v.val=n.target.v();
|
|
this.gZ()};s.prototype.ahj=function(n){this.On.angleDynamics.v.jitter.v.val=n.target.v();this.gZ()};
|
|
s.prototype.a1n=function(n){this.On.roundnessDynamics.v.jitter.v.val=n.target.v();this.gZ()};s.prototype.and=function(n){this.On.minimumRoundness.v.val=n.target.v();
|
|
this.gZ()};function E(){o.call(this,[15,2]);this.Nt=new fs([15,5,0],0,1e3," %");this.Nt.B(H.E.O,this.aqS,this);
|
|
this.k.appendChild(this.Nt.k);this.O1=new fs([15,5,1],1,20);this.O1.B(H.E.O,this.aa6,this);this.k.appendChild(this.O1.k);
|
|
this.VR=new fs([15,5,2],0,100," %");this.VR.B(H.E.O,this.aer,this);this.k.appendChild(this.VR.k)}E.prototype=new o;
|
|
E.prototype.f=function(){this.Nt.f();this.O1.f();this.VR.f()};E.prototype.Ed=function(){return this.On.useScatter.v};
|
|
E.prototype.c2=function(n){this.On.useScatter.v=n;a8.hl.b4(this.On);this.gZ()};E.prototype.bT=function(){var n=this.On;
|
|
if(n.useScatter.v==!1)return;this.Nt.a(n.scatterDynamics.v.jitter.v.val);this.O1.a(n.Cnt.v);this.VR.a(n.countDynamics.v.jitter.v.val)};
|
|
E.prototype.aqS=function(n){this.On.scatterDynamics.v.jitter.v.val=n.target.v();this.gZ()};E.prototype.aa6=function(n){this.On.Cnt.v=n.target.v();
|
|
this.gZ()};E.prototype.aer=function(n){this.On.countDynamics.v.jitter.v.val=n.target.v();this.gZ()};
|
|
function e(){o.call(this,[15,3]);this.eB=new fs([15,6,0],0,100," %");this.eB.B(H.E.O,this.acN,this);
|
|
this.k.appendChild(this.eB.k);this.ey=new fs([15,6,1],0,100," %");this.ey.B(H.E.O,this.a36,this);this.k.appendChild(this.ey.k);
|
|
this.Ko=new fs([15,6,2],0,100," %");this.Ko.B(H.E.O,this.apu,this);this.k.appendChild(this.Ko.k);this.qg=new fs([15,6,3],0,100," %");
|
|
this.qg.B(H.E.O,this.acm,this);this.k.appendChild(this.qg.k)}e.prototype=new o;e.prototype.f=function(){this.eB.f();
|
|
this.ey.f();this.Ko.f();this.qg.f()};e.prototype.Ed=function(){return this.On.useColorDynamics.v};e.prototype.c2=function(n){this.On.useColorDynamics.v=n;
|
|
a8.hl.b4(this.On);this.gZ()};e.prototype.bT=function(){var n=this.On;if(n.useColorDynamics.v==!1)return;
|
|
this.eB.a(n.clVr.v.jitter.v.val);this.ey.a(n.H.v.val);this.Ko.a(n.Strt.v.val);this.qg.a(n.Brgh.v.val)};
|
|
e.prototype.acN=function(n){this.On.clVr.v.jitter.v.val=n.target.v();this.gZ()};e.prototype.a36=function(n){this.On.H.v.val=n.target.v();
|
|
this.gZ()};e.prototype.apu=function(n){this.On.Strt.v.val=n.target.v();this.gZ()};e.prototype.acm=function(n){this.On.Brgh.v.val=n.target.v();
|
|
this.gZ()};return $}();function iK(){a_.call(this,[9,0],!1,null,a_._4.Ww);this.$H.setAttribute("style","min-width:200px;");
|
|
this.vL=H.z("div","hpbody scrollable");this.vL.style.height="160px";this.$H.appendChild(this.vL);this.amQ=-1;
|
|
this.xs=[];this.Po=""}iK.prototype=new a_("");iK.prototype.kW=function($){if($==null){H.Ft(this.vL);
|
|
this.Po="";return}H.Ft(this.vL);var o=0;for(var f=0;f<$.history.length;f++)if(f<=$.Q5&&!$.history[f].RY)o=f;
|
|
for(var f=0;f<$.history.length;f++){var T=$.history[f];if(T.RY)continue;var s=new aU(T,f,o);s.parent=this;
|
|
this.vL.appendChild(s.k);this.xs.push(s)}if($.Q5==$.history.length-1)this.Lh()};iK.prototype.Lh=function(){this.vL.scrollTop=this.vL.scrollHeight};
|
|
iK.prototype.f=function(){a_.prototype.f.call(this);for(var f=0;f<this.xs.length;f++)this.xs[f].f()};
|
|
function aU($,f,o){aI.call(this);this.index=f;this.k=H.z("div",f==o?"listitem selected":"listitem");
|
|
this.Oj=$.name;this.f();if(f>o)this.k.style.opacity=.4;this.k.addEventListener("click",this.iO.bind(this),!1)}aU.prototype=new aI;
|
|
aU.prototype.f=function(){this.k.textContent=aX.get(this.Oj)};aU.prototype.iO=function($){if(this.index==this.parent.amQ)return;
|
|
this.wt({e:"h_itemchange",index:this.index})};aU.prototype.wt=function($){var o=new x(H.E.N,!0);o.data=$;
|
|
o.U=D.Ww;this.J(o)};function hb(){a_.call(this,[9,10],!1,null,a_._4.aip);var $=H.z("div","padded");this.$H.appendChild($);
|
|
this.j5=new hQ(256,!0);$.appendChild(this.j5.k);this.EF=null}hb.prototype=new a_("");hb.prototype.kW=function($){this.EF=$;
|
|
this.iB()};hb.prototype.iB=function(){var $=this.EF;if(!H.ni(this.$H))return;if($==null||$.D.length==0){this.j5.a(L.lm(L.G(4)));
|
|
return}var o=$.aw(),T=new df(0,0,$.d,$.w),s=T.Y();if($.Z){var E=$.Z.rect,e=L.G(E.Y()*4);L.h9(o,T,e,E);
|
|
L.EL($.Z.channel,e);o=e;T=E;var n=$.Z.channel;s=0;for(var f=0;f<n.length;f++)s+=n[f];s=Math.round(s/255)}var A=L.lm(o);
|
|
A[0][255]+=3*(s-A[5]);for(var f=1;f<4;f++)A[f][255]+=s-A[5];this.j5.a(A,s)};hb.prototype.YE=function($,o){this.j5.Ab(b3.Sx[$.dJ]["--text-color"])};
|
|
hb.prototype.f=function(){a_.prototype.f.call(this);this.j5.f()};hb.prototype.Lh=function(){this.iB()};
|
|
function gp(){a_.call(this,[9,8],!1,null,a_._4.apa);this.CJ=H.z("div","padded");this.$H.appendChild(this.CJ);
|
|
this.Yh=new fo(10);this.CJ.appendChild(this.Yh.k);this.CJ.appendChild(H.z("hr"));this.CC=new b_;this.CC.parent=this;
|
|
this.CJ.appendChild(this.CC.kc);this.Yh.B(H.E.O,this.a5f,this);this.CC.B(H.E.O,this.a5f,this)}gp.prototype=new a_("");
|
|
gp.prototype.a5f=function($){var o;if($.target==this.Yh)o=this.Yh.v();else{var T=this.CC.v();o=Math.round(T.i)<<16|Math.round(T.m)<<8|Math.round(T.P)}var s=new x(H.E.Q,!0);
|
|
s.data={e:H.V.uY,M9:gr.ux,f8:0,H:o};this.J(s)};gp.prototype.YE=function($,o){var T=$.z4,s=o==gr.zo;if(o==gr.ux||s){this.Yh.a(T);
|
|
this.CC.a({i:T>>>16&255,m:T>>>8&255,P:T>>>0&255,W7:"Color #"+L.B$(T)})}if(o==gr.qu||s){var E=$.abk;this.CC.bq(E)}};
|
|
function am(){a_.call(this,[12,72],!1,null,a_._4.ac2);this.fH=null;this.BB=null;this.vL=H.z("div","lpbody scrollable");
|
|
this.si=H.z("div","lpfoot");this.$H.appendChild(this.vL);this.$H.appendChild(this.si);this.ry=[];this.B("click",this.qN,this);
|
|
this.uO=[];am.eR([[17,2],"Save Selection as Channel",[5,3],[5,4]],this.uO,this.si,this.s6.bind(this),this.jN.bind(this));
|
|
this.G1=new eb([{name:"Merge Channels",vO:!0}]);this.G1.B("select",this.I3,this)}am.prototype=new a_("");
|
|
am.prototype.I3=function($){if(this.BB==null)return;var o=new x(H.E.Q,!0);o.data={e:H.V.NC,a_:"mergechannels"};
|
|
this.J(o)};am.prototype.q5=function(){return this.G1};am.eR=function($,o,T,s,E){for(var f=0;f<$.length;
|
|
f++){var e=new hE("W",!1,$[f]);o.push(e);H.uE(e.k,s);T.appendChild(e.k);var n=e.k;n.addEventListener("drop",E,!1);
|
|
n.addEventListener("dragover",function(A){A.preventDefault()},!1);n.addEventListener("dragenter",H.zl,!1)}};
|
|
am.nL=function($,o){for(var f=0;f<$.length;f++)if($[f].k==o.currentTarget)return f};am.prototype.s6=function($){var o=am.nL(this.uO,$);
|
|
if(o==0)this.J(io.iJ(!0,null,$));else{o--;var T=new x(H.E.b0,!0),s={classID:"null"};if(o==0)s.null={t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]};
|
|
else if(o==1)s.Nw={t:"Objc",v:{classID:"Chnl",ClrI:{t:"enum",v:{MskI:"SlcA"}},Opct:{t:"long",v:50}}};
|
|
else s.null=aj.D4("Chnl",!0);T.data={Wk:["duplicate","make","delete"][o],bI:s};this.J(T)}};am.prototype.jN=function($){var o=am.nL(this.uO,$);
|
|
if(o==2){var T=new x(H.E.b0,!0),s={classID:"null"};s.null=aj.D4("Chnl",!0);T.data={Wk:"duplicate",bI:s};
|
|
this.J(T)}else this.s6($)};am.prototype.an=function(f){var $=this.ry,o=$[f];if(o==null){var T=H.z("canvas");
|
|
o=T.getContext("2d");$.push(o)}return o};am.prototype.qN=function($){var o=this.fH.slice(0),T=$.data.II,s=o[0]+o[1]+o[2],E=this.BB;
|
|
if(-5<T&&T<0){var e=-T-1;if($.data.s_){if(e==0)o=s==3?[0,0,0]:[1,1,1];else{if(o[e-1]==0)o[e-1]=1;else if(!0)o[e-1]=0}}else{if(e==0)o=[1,1,1];
|
|
else{o=[0,0,0];o[e-1]=1}E.el=[]}var n=new x(H.E.N,!0);n.U=D.BC;n.data={e:"setcls",xR:o};this.J(n);return}if(-1<T){var A=E.u[T],u=A.dQ==1?A.yy():A.DE(E)._;
|
|
if($.data.s_)u.T9=!u.T9;else{for(var f=0;f<E.iy.length;f++)E.iy[f].T9=!1;E.el=[]}}else{var Y=-T-5,u=E.iy[Y];
|
|
if($.data.s_)u.T9=!u.T9;else{for(var f=0;f<E.iy.length;f++)E.iy[f].T9=!1;u.T9=!0;E.el=[Y]}}E.Cd=E.RZ=!0};
|
|
am.prototype.Lh=function(){this.E4()};am.prototype.kW=function($){this.BB=$;this.E4()};am.prototype.E4=function(){var $=this.BB,o=this.vL,A=34,u=34,X=4;
|
|
H.Ft(o);if($==null||!H.ni(o))return;var T=$.d,s=$.w,E=new df(0,0,T,s),e=this.fH=$.C.xR.slice(0),n=e[0]+e[1]+e[2];
|
|
if(T>s)u=Math.round(u*s/T);else A=Math.round(A*T/s);var Y=["RGB"].concat(dq.nk);for(var f=0;f<4;f++){var b=this.an(f);
|
|
L.JH.CH(b,A,u,E,$.aw(),E,!1,f==0?null:f-1);var a=f==0?n==3:e[f-1]==1,w=new io(-1-f,!0,!0,b,Y[f],a,a);
|
|
w.parent=this;o.appendChild(w.k)}for(var f=0;f<$.D.length;f++){var N=$.u[$.D[f]],z=N.dQ;if(z!=1&&z!=3)continue;
|
|
var i=z==1?N.yy():N.DE($)._,b=this.an(X+f);X++;L.JH.ab(b,A,u,E,i);var w=new io($.D[f],!0,!0,b,N.getName()+(z==1?"":" Filter")+" Mask",!0,i.T9);
|
|
w.parent=this;o.appendChild(w.k)}for(var f=0;f<$.iy.length;f++){var i=$.iy[f],b=this.an(X+f);L.JH.ab(b,A,u,E,i);
|
|
var w=new io(-5-f,!0,i.name=="Quick Mask",b,i.name,$.el.indexOf(f)!=-1,i.T9,D.Jc,{e:M.Ep,f8:"rnm",II:f});
|
|
w.parent=this;o.appendChild(w.k)}};am.prototype.RE=function($,o){this.vL.style.height=o-9-26+"px";this.vL.style.width=$+"px"};
|
|
am.prototype.f=function(){a_.prototype.f.call(this);this.E4();am.Om(this.uO,["lrs/makesel","lrs/mask","lrs/newlayer","lrs/bin"])};
|
|
am.Om=function($,o){for(var f=0;f<$.length;f++){var T=$[f];T.yl(H.oQ(o[f]))}};function io($,o,T,s,E,e,n,A,u){aI.call(this);
|
|
this.k=H.z("div","layeritem");this.an6=$;this.aq9=o;this.V8=s;this.aa3=A;this.ae6=u;this.v3=H.z("div",e?"head selected":"head");
|
|
this.v3.setAttribute("style","height: "+40+"px");var Y=H.z("div","headL"),b=H.z("div","headR"),a=15;
|
|
this.k.appendChild(this.v3);this.v3.appendChild(Y);this.v3.appendChild(b);this.qA=H.z("div","eye");if(1<H.K()&&H.K()<1.5)a=a/H.K();
|
|
this.qA.setAttribute("style","background-size: "+a+"px "+a+"px;");this.qA.style.opacity=n?1:.2;if(o)Y.appendChild(this.qA);
|
|
this._h=H.z("div","thumb");if(s)this._h.appendChild(s.canvas);Y.appendChild(this._h);this.OI=H.z("div","label");
|
|
if(T)this.OI.style.fontStyle="italic";this.OI.textContent=aX.get(E);Y.appendChild(this.OI);var w=this.v3;
|
|
w.setAttribute("draggable","true");this.v3.addEventListener("mousedown",this.a5N.bind(this),!1);if(!T)this.v3.addEventListener("mouseup",this.a4u.bind(this),!1)}io.prototype=new aI;
|
|
io.prototype.YV=function($){var o=new x(H.E.N,!0);o.U=this.aa3;o.data=this.ae6;o.data.name=$;this.J(o)};
|
|
io.prototype.a5N=function($){var o=$.ctrlKey||$.metaKey,T=this.an6;if(o&&$.target==this.V8.canvas){this.J(io.iJ(this.aq9,T,$))}else{var s=new x("click",!0);
|
|
s.data={II:T,s_:$.target==this.qA,Wy:o};this.J(s)}};io.prototype.a4u=function($){if($.detail==2&&$.target==this.OI){var o=new a_.Hk(this.OI,this.YV.bind(this))}};
|
|
io.iJ=function($,o,T){var s=0;if(T.shiftKey)s++;if(T.altKey)s+=2;var E=new x(H.E.N,!0);E.U=D.ZR;if($){if(-5<o&&o<0){E=new x(H.E.b0,!0);
|
|
E.data=D.NK.af(s,["RGB","Rd","Grn","Bl"][-1-o])}else E.data={e:"fromchannel",n4:[o,0,s]}}else E.data={e:"frompath",n4:[o,0,s]};
|
|
return E};function ig(){a_.call(this,[8,9],!1,null,a_._4._8);this.fH=null;this.BB=null;this.vL=H.z("div","lpbody scrollable");
|
|
this.si=H.z("div","lpfoot");this.$H.appendChild(this.vL);this.$H.appendChild(this.si);this.$H.addEventListener("click",this.acF.bind(this),!1);
|
|
this.ry=[];this.B("click",this.qN,this);this.uO=[];am.eR([[17,2],"Selection to Path",[5,3],[5,4]],this.uO,this.si,this.s6.bind(this),this.jN.bind(this))}ig.prototype=new a_("");
|
|
ig.prototype.s6=function($){var o=am.nL(this.uO,$),T;if(o==0)T=io.iJ(!1,null,$);else if(o==1){T=new x(H.E.b0,!0);
|
|
T.data={Wk:"make",bI:{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 T=new x(H.E.N,!0);
|
|
T.U=D.bo;T.data={e:"pathedit",f8:["new","del"][o-2]}}this.J(T)};ig.prototype.jN=function($){this.s6($)};
|
|
ig.prototype.an=function(f){var $=this.ry,o=$[f];if(o==null){var T=H.z("canvas");o=T.getContext("2d");
|
|
$.push(o)}return o};ig.prototype.acF=function($){if($.target==this.vL){var o=this.BB;o.dl=[];o.T7=[];
|
|
o.RZ=!0;o.Cd=!0}};ig.prototype.qN=function($){var o=$.data.II,T=this.BB,s=$.data.Wy,E=0,e,n;if(o<0){E=-1-o;
|
|
e=T.dl;n=T.T7}else{var A=T.Vp()[0];for(var f=0;f<A.length;f++){var u=A[f].II;if(u==o)break;if(u>=0)E++}e=T.T7;
|
|
n=T.dl}if(s){var Y=e.indexOf(E);if(Y==-1)e.push(E);else e.splice(Y,1)}else{while(e.length!=0)e.pop();
|
|
while(n.length!=0)n.pop();e.push(E)}T.RZ=!0;T.Cd=!0};ig.prototype.Lh=function(){this.E4()};ig.prototype.kW=function($){this.BB=$;
|
|
this.E4()};ig.prototype.E4=function(){var $=this.BB,o=this.vL,A=34,u=34;H.Ft(o);if($==null||!H.ni(o))return;
|
|
var T=$.d,s=$.w,E=new df(0,0,T,s),e=this.fH=$.C.xR.slice(0),n=e[0]+e[1]+e[2];if(T>s)u=Math.round(u*s/T);
|
|
else A=Math.round(A*T/s);var Y=$.Vp(),b=Y[0];for(var f=0;f<b.length;f++){var a=b[f],w=this.an(f);L.JH.ahf(w,A,u,E,a.add.vmsk);
|
|
var X=new io(a.II,!1,a.II>=0,w,a.name,Y[1].indexOf(f)!=-1,!1,D.bo,{e:"pathedit",f8:"rnm",II:a.II});X.parent=this;
|
|
o.appendChild(X.k)}};ig.prototype.RE=function($,o){this.vL.style.height=o-9-26+"px";this.vL.style.width=$+"px"};
|
|
ig.prototype.f=function(){a_.prototype.f.call(this);this.E4();am.Om(this.uO,["lrs/makesel","lrs/makepath","lrs/newlayer","lrs/bin"])};
|
|
function bw($){a_.call(this,[9,$?4:5],!1,null,$?a_._4.a4_:a_._4.ahB);this.$H.setAttribute("style","min-width:240px;");
|
|
this.adF=$;this.XJ=null;this.GH=null}bw.prototype=new a_("");bw.prototype.pJ=function(){this.XJ=new dg;
|
|
var $=this.XJ,o=this.$H;$.parent=this;if(this.adF){var T=H.z("div","marged");o.appendChild(T);T.appendChild($.Z1.k);
|
|
o.appendChild(H.z("hr"));var s=H.z("div","marged");o.appendChild(s);s.appendChild($.ra.k);s.appendChild($.Vg.k);
|
|
var E=H.z("div","marged");o.appendChild(E);E.appendChild($.Dr.k);E.appendChild($.Tq.k);o.appendChild(H.z("hr"));
|
|
var e=H.z("div","marged");o.appendChild(e);e.appendChild($.Un.k);e.appendChild($.IG.k);var n=H.z("div","marged");
|
|
o.appendChild(n);n.appendChild($.$P.k);n.appendChild($.fL.k);o.appendChild(H.z("hr"));var A=H.z("div","marged");
|
|
o.appendChild(A);A.appendChild($.wE.k);A.appendChild($.zE.k);A.appendChild($.Ng.k);A.appendChild($.bp.k);
|
|
A.appendChild($.pO.k);A.appendChild($.y6.k);A.appendChild($.kQ.k);A.appendChild($.zN.k)}else{var T=H.z("div","marged");
|
|
o.appendChild(T);T.appendChild($._g.k);T.appendChild($.j9.k);T.appendChild($.fR.k);T.appendChild($.aey.k);
|
|
T.appendChild($.a07.k);T.appendChild($.afJ.k);T.appendChild($.a2P.k);o.appendChild(H.z("hr"));var s=H.z("div","marged");
|
|
o.appendChild(s);s.appendChild($.sp.k);s.appendChild($.sH.k);s.appendChild($.gA.k);o.appendChild(H.z("hr"));
|
|
var E=H.z("div","marged");o.appendChild(E);E.appendChild($.Jw.k);E.appendChild($.mX.k);E.appendChild($.OO.k)}};
|
|
bw.prototype.Lh=function(){if(!H.ni(this.$H))return;if(this.XJ==null){this.pJ();var $=this.GH;if($)this.XJ.a($.IT,$.vv,$.ki);
|
|
this.XJ.f()}};bw.prototype.f=function(){a_.prototype.f.call(this);if(this.XJ)this.XJ.f()};bw.prototype.YE=function($,o){this.GH=$;
|
|
if(o!=gr.zo&&o!=gr.mp&&o!=gr.En&&o!=gr.bV)return;if(this.XJ)this.XJ.a($.IT,$.vv,$.ki)};function hL(){a_.call(this,[9,13],!1,null,a_._4.alH);
|
|
this.XJ=new dg;this.XJ.parent=this;this.GH=null;this.apj=null;this.ahR=null;this.JO=null;this.abg=null;
|
|
this.TV=Math.round(290*H.K());this.v_=45;this.an2=4;this.arv=this.iB.bind(this);this.a79=0;this.HL=new h_(null,["Hi","Hello"]);
|
|
this.HL.B(H.E.O,this.iB,this);var $=this.vN=new hE("-",null,null,!0);$.B("click",this.aoA,this);var o=this.akX=new hE("+",null,null,!0);
|
|
o.B("click",this.aoA,this);this.aI=new eW(!1);this.aI.B(H.E.O,this.YH,this);this.aI.k.style.height=250+"px";
|
|
var T=this.ad5=H.z("div","form padded");this.$H.appendChild(T);T.appendChild(this.XJ.Z1.k);H.ze(T);T.appendChild(this.HL.k);
|
|
T.appendChild($.k);T.appendChild(o.k);this.$H.appendChild(this.aI.k)}hL.prototype=new a_("");hL.prototype.RE=function($,o){if(this.N0==$)return;
|
|
this.N0=$;this.TV=Math.floor(($-13)*H.K());this.ad5.setAttribute("style","width:"+this.TV/H.K()+"px;");
|
|
this.aI.k.style.height=o-73+"px";this.iB()};hL.prototype.YH=function($){var o=this.a3y(),T=Math.round(this.TV/o);
|
|
o/=H.K();var s=this.aI.v()*T*this.an2,E=this.aI.agq();s+=Math.floor(E.y/o)*T;s+=Math.floor(E.x/o);var e=this.JO[this.HL.v()];
|
|
if(s>=e.length)return;var n=e[s],A=this.abg[n];if(A.y7.length==0){alert("No known character for this glyph");
|
|
return}var u=String.fromCodePoint(A.y7[0]),Y=new x(H.E.N,!0);Y.U=D.ko;Y.data={e:"insertText",H:u};this.J(Y)};
|
|
hL.prototype.aoA=function($){var o=1.2;if($.target==this.vN){if(this.v_>20)this.v_/=o}else{if(this.v_<100)this.v_*=o}this.iB()};
|
|
hL.prototype.Lh=function(){this.YE(this.GH)};hL.prototype.YE=function($,o){this.GH=$;if(!H.ni(this.$H))return;
|
|
this.XJ.a($.IT,$.vv,$.ki);var T=$.IT,s=T.oH.Font,u=0;if(s==null)return;var E=T.Nd[s].Name;if(this.apj==E)return;
|
|
var s=$.vv.sU(E);if(s==null)return;var e=s.maxp.numGlyphs,n=this.abg=new Array(e);for(var f=0;f<e;f++)n[f]={y7:[]};
|
|
var A=Date.now(),Y=new Uint8Array(1048575);for(var f=0;f<1048575;f++){var b=Typr.U.codeToGlyph(s,f);
|
|
if(b!=0&&b<e){Y[f]=1;if(n[b].y7.length==0)u++;n[b].y7.push(f)}}var a=hL.WK,w=[];for(var f=0;f<a.length;
|
|
f++)w.push([]);for(var b=1;b<e;b++){w[0].push(b);var X=n[b].y7[0];if(X==null){continue}for(var N=1;N<a.length;
|
|
N++){var z=a[N].xA;for(var f=0;f<z.length;f+=2)if(z[f]<=X&&X<=z[f+1]){w[N].push(b);break}}}this.JO=w;
|
|
var i=[];for(var f=0;f<a.length;f++)i.push(a[f].Q0+" ("+w[f].length+")");var k=this.HL.v();this.HL.TY(i);
|
|
this.HL.a(k);this.apj=E;this.ahR=s;this.iB()};hL.prototype.a3y=function($){var o=Math.floor(this.TV/this.v_);
|
|
return Math.floor(this.TV/o)};hL.prototype.iB=function($){if(!H.ni(this.$H)||this.JO==null)return;var o=this.JO[this.HL.v()],T=o.length,s=this.ahR,E=Typr.U,e=this.a3y(),n=e,A=n*.8,u=n*.8/s.head.unitsPerEm,Y=[],b=Math.floor(this.TV/e),a=Math.ceil(T/b),w=this.an2,X=Date.now();
|
|
for(var N=0;N<a;N+=w){var z=H.z("canvas"),i=z.getContext("2d");z.width=e*b;z.height=n*w;i.strokeStyle="rgba(0,0,0,0.3)";
|
|
i.fillStyle="white";i.fillRect(0,0,b*e,n*w);for(var k=0;k<w;k++){for(var Q=0;Q<b;Q++){var f=o[(N+k)*b+Q];
|
|
if(f==null)break;var O=E.glyphToPath(s,f),c=L.M.L3(O.crds);if(!c.p4()){i.fillStyle="#252525";i.beginPath();
|
|
var B=Q*e+(e-c.d*u)*.5-c.x*u,G=k*n+A;i.translate(B,G);i.scale(u,-u);E.pathToContext(O,i);i.scale(1/u,-1/u);
|
|
i.translate(-B,-G);i.fill()}}}i.beginPath();for(var Q=0;Q<b;Q++){var l=Q*e+e+.5;i.moveTo(l,0);i.lineTo(l,n*w)}for(var k=0;
|
|
k<w;k++){var v=k*n+n+.5;i.moveTo(0,v);i.lineTo(b*e,v)}i.stroke();Y.push(z)}this.aI.rS(Y,null,e*b,n*w)};
|
|
hL.WK=[{Q0:"All Glyphs"},{Q0:"Basic Latin, Latin 1",xA:[0,127,128,143]},{Q0:"Latin Extended-A",xA:[256,383]},{Q0:"Latin Extended-B",xA:[384,591]},{Q0:"Punctuations",xA:[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]},{Q0:"Greek",xA:[880,1023]},{Q0:"Cyrillic",xA:[1024,1279]},{Q0:"Hebrew",xA:[1424,1535]},{Q0:"Arabic",xA:[1536,1791]},{Q0:"Emoji",xA:[9728,10095,127744,129535]}];
|
|
function aN(){a_.call(this,[13,0],!1,null,a_._4.ux);this.Wm=0;this.aeE=0;this.GH=null;var $=H.z("div","flexrow padded");
|
|
this.$H.appendChild($);var o=H.z("div");$.appendChild(o);this.fF=[];for(var f=0;f<2;f++){var T=new hJ;
|
|
this.fF.push(T);T.B("click",this.a7m,this);o.appendChild(T.k)}this.Vt=new a$(192);this.Vt.B(H.E.O,this.sM,this);
|
|
$.appendChild(this.Vt.k)}aN.prototype=new a_("");aN.prototype.a7m=function($){this.Wm=this.fF.indexOf($.currentTarget);
|
|
this.iB()};aN.prototype.sM=function($){var o=this.Vt.v();this.Vt.a(o);var T=Math.round(o.i*255)<<16|Math.round(o.m*255)<<8|Math.round(o.P*255),s=new x(H.E.Q,!0);
|
|
s.data={e:H.V.uY,M9:gr.ux,f8:this.Wm,H:T};this.J(s);this.aeE=Date.now()};aN.prototype.iB=function(){var $=this.GH,o=this.Wm,T=[$.z4,$.GR];
|
|
for(var f=0;f<2;f++){var s=this.fF[f],E=s.k.style;s.Ab(T[f]);if(f==o)E.filter="drop-shadow(0 0 1px #000000)"}var e=T[o];
|
|
if(Date.now()-this.aeE>100)this.Vt.a({i:(e>>>16)/255,m:(e>>>8&255)/255,P:(e&255)/255})};aN.prototype.YE=function($,o){this.GH=$;
|
|
if(o==gr.zo||o==gr.ux)this.iB()};aN.prototype.Lh=function(){this.iB()};function dD(){a_.call(this,"CSS",!1,null,a_._4.CSS);
|
|
this.EF=null;var $=H.z("div","padded");this.$H.appendChild($);this.yo=H.z("textarea");$.appendChild(this.yo)}dD.prototype=new a_("");
|
|
dD.prototype.RE=function($,o){if(this.N0==$)return;this.N0=$;this.yo.setAttribute("style","display:block;tab-size:4; margin:0; font-family:monospace; width:"+($-10)+"px; height:"+(o-10)+"px")};
|
|
dD.prototype.kW=function($){this.EF=$;this.iB()};dD.prototype.YE=function($,o){if(o==gr.En)this.iB()};
|
|
dD.prototype.iB=function(){var $=this.EF;if($==null||$.D.length==0)return;if(!H.ni(this.$H))return;var o=$.u[$.D[0]],T=CSS.aiK(o,$);
|
|
if(T.length!=0)this.yo.value=T.join(";\n")+";";else this.yo.value=""};dD.prototype.Lh=function(){this.iB()};
|
|
function h1(){a_.call(this,[9,6],!1,null,a_._4.ans);this.$H.setAttribute("style","min-width:240px;");
|
|
this.EF=null;this.GH=null;var $=H.z("div","marged row");this.$H.appendChild($);var o=H.z("div","cell");
|
|
o.setAttribute("style","width:10em");$.appendChild(o);var T=H.z("div","cell");T.setAttribute("style","width:10em");
|
|
$.appendChild(T);this.a63=[];for(var f=0;f<4;f++){var s=new eB("");this.a63.push(s);o.appendChild(s.k);
|
|
H.ze(o)}this.$H.appendChild(H.z("hr",""));var E=H.z("div","marged row");this.$H.appendChild(E);var o=H.z("div","cell");
|
|
o.setAttribute("style","width:10em");var T=H.z("div","cell");T.setAttribute("style","width:10em");E.appendChild(o);
|
|
E.appendChild(T);this.cL=new eB("");o.appendChild(this.cL.k);H.ze(o);this.xJ=new eB("");o.appendChild(this.xJ.k);
|
|
this.ST=new eB("");T.appendChild(this.ST.k);H.ze(T);this.PX=new eB("");T.appendChild(this.PX.k);this.cL.a("X: 100 px");
|
|
this.xJ.a("Y: 100 px");this.ST.a("W: 0");this.PX.a("H: 0")}h1.prototype=new a_("");h1.prototype.ZS=function($,o,T,s,E){if(!H.ni(this.$H)||$==null)return;
|
|
var e=$.C.VD(E.x,E.y),n=new aY(Math.floor(e.x),Math.floor(e.y));if(!E.jw){var A=0,u=0,Y=0,b=0,a=this.a63;
|
|
if(!E.jw&&!$.a5O()&&new df(0,0,$.d-1,$.w-1).dv(n)){var w=$.aw(),f=$.d*n.y+n.x<<2;A=w[f+0];u=w[f+1];Y=w[f+2];
|
|
b=w[f+3]}a[0].a("R: "+A);a[1].a("G: "+u);a[2].a("B: "+Y);a[3].a("A: "+b)}this.cL.a("X: "+L.BG.at(n.x,$.fG,T,$.d));
|
|
this.xJ.a("Y: "+L.BG.at(n.y,$.fG,T,$.w));this.EK()};h1.prototype.EK=function(){var $=this.EF,o=this.GH,T=0,s=0;
|
|
if($&&o){if($.C.Xk){T=$.C.Xk.d;s=$.C.Xk.w}else if($.Z){T=$.Z.rect.d;s=$.Z.rect.w}T=L.BG.at(Math.abs(T),$.fG,o,$.d);
|
|
s=L.BG.at(Math.abs(s),$.fG,o,$.w)}this.ST.a(aX.get([12,41]).charAt(0)+": "+T);this.PX.a(aX.get([12,42]).charAt(0)+": "+s)};
|
|
h1.prototype.f=function(){a_.prototype.f.call(this);this.EK()};h1.prototype.kW=function($,o,T){this.EF=$;
|
|
this.GH=T;this.EK()};function iO(){a_.call(this,[9,1],!1,null,a_._4.Jc);this.eU=null;this.u4=null;this.eu=null;
|
|
this.v3=H.z("div","lphead");this.vL=H.z("div","lpbody scrollable");this.si=H.z("div","lpfoot");this.oS=new h_(null,hI.fC,!1,hI.xx);
|
|
this.oS.B(H.E.O,this.ap7,this);this.v3.appendChild(this.oS.k);this.pG=new ac([12,0],0,100,"%",0);this.pG.B(H.E.O,this.aq0,this);
|
|
this.pG.parent=this;this.v3.appendChild(this.pG.k);this.vK=new fU([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.vK.B(H.E.O,this.akf,this);this.v3.appendChild(this.vK.k);this.zu=new ac([12,26],0,100,"%",0);this.zu.B(H.E.O,this.abT,this);
|
|
this.zu.parent=this;this.v3.appendChild(this.zu.k);this.uO=[];this.eR();this.$H.appendChild(this.v3);
|
|
this.$H.appendChild(this.vL);this.vL.addEventListener("dragover",function(T){T.preventDefault()},!1);
|
|
this.vL.addEventListener("dragenter",H.zl,!1);this.vL.addEventListener("drop",this.alb.bind(this),!1);
|
|
this.$H.appendChild(this.si);this.$H.addEventListener("contextmenu",H.zl,!1);var $=e0.P8(!0),o=e0.p2(!0);
|
|
this.agG=new eb($,o);var $=[{name:[14,10]},{name:[14,11],iR:!0},{name:[6,0]},{name:[11,4]},{name:[5,4],iR:!0},{name:[6,7]},{name:"New Smart Obj. via Copy",b:function(T){return{b:T.u[T.D[0]].add.SoLd!=null}},iR:!0},{name:[6,8],b:function(T){var s=T.u[T.D[0]];
|
|
if(s.add.TySh||s.add.SoLd||s.add.SoCo||s.add.GdFl||s.add.PtFl)return{b:!0};return{b:!1}}},{name:[6,34],b:function(T){var s=T.u[T.D[0]];
|
|
return{b:s.add.lmfx!=null&&!s.p3()}}},{name:[6,40],iR:!0,b:function(T){var s=T.u[T.D[0]];return{b:s.add.TySh!=null}}},{name:"",iR:!0,b:function(T){var s=T.u[T.D[0]],E=s.add.TySh,e=E?E.h3:null;
|
|
return{b:E!=null&&e.Curve==null,IH:aX.get(E&&g8.tb(e)==0?[16,3,1]:[16,3,0])}}},{name:[6,6,0],iR:!0,b:function(T){return{b:T.tL(T.D[0]),sI:T.u[T.D[0]].WL}}},{name:[11,6],iR:!0,sub:[{name:[5,1],b:function(T){var s=T.u[T.D[0]];
|
|
return{b:s.add.lmfx!=null}}},{name:[5,2]},{name:[2,2],b:function(T){var s=T.u[T.D[0]];return{b:s.add.lmfx!=null}}}]},{name:[6,10],b:function(T){return{b:T.D.length==1&&T.D[0]!=0&&!T.u[T.D[0]].p3()}}},{name:[6,12,0],b:function(T){return{b:T.D.length>1||T.u[T.D[0]].p3()}}},{name:[6,12,1],iR:!0},{name:[13,0],sub:function(){var T=[[13,1,0],[13,1,1],[13,1,2],[13,1,3],[13,1,4],[13,1,5],[13,1,6],[13,1,7]],s=[];
|
|
for(var f=0;f<T.length;f++)s.push({name:T[f]});return s}()}],o=[{F:H.E.Q,r:{e:H.V.NC,a_:"layerstyle"}},{F:H.E.N,U:D.ZR,r:{e:"fromlayer",n4:[null,0,0]}},{F:H.E.N,U:D.Jc,r:{e:M.NO}},{F:H.E.Q,r:{e:H.V.NC,a_:"duplinto"}},{F:H.E.N,U:D.Jc,r:{e:M.J1}},{F:H.E.b0,r:{Wk:"newPlacedLayer"}},{F:H.E.N,U:D.Jc,r:{e:M.LZ}},{F:H.E.b0,r:{Wk:"rasterizeLayer",bI:{classID:"rasterizeLayer",null:aj.D4("Lyr",!0)}}},{F:H.E.N,U:D.Jc,r:{e:M.vg}},{F:H.E.N,U:D.Jc,r:{e:M.WU}},{F:H.E.N,U:D.ko,r:{e:"switchPntPrgr"}},{F:H.E.N,U:D.Jc,r:{e:M.Yv}},{sub:[{F:H.E.N,U:D.b8,r:{e:"st_copy"}},{F:H.E.N,U:D.b8,r:{e:"st_paste"}},{F:H.E.N,U:D.b8,r:{e:"st_clear"}}]},{F:H.E.N,U:D.Jc,r:{e:M.r4}},{F:H.E.N,U:D.Jc,r:{e:M.RI}},{F:H.E.N,U:D.Jc,r:{e:M.kn}},{sub:function(){var T=[];
|
|
for(var f=0;f<8;f++)T.push({F:H.E.N,U:D.Jc,r:{e:M.Tv,aq1:f}});return T}()}];this.UZ=new eb($,o);var $=[{name:[6,45],b:function(T){var s=T.u[T.D[0]];
|
|
return{b:s.DE(T)._==null}}},{name:[6,47]}],o=[{F:H.E.N,U:D.Jc,r:{e:M.dZ}},{F:H.E.N,U:D.Jc,r:{e:M.IX}}];
|
|
this.apG=new eb($,o);var $=[{name:"enab/disab",b:function(T){return{IH:aX.get(T.u[T.D[0]].yy().isEnabled?[6,15]:[6,14])}}},{name:[6,22]},{name:[5,8],b:function(T){return{b:T.Jt(!1,!0)}}}],o=[{F:H.E.N,U:D.Jc,r:{e:M.AA}},{F:H.E.N,U:D.Jc,r:{e:M.YP}},{F:H.E.N,U:D.Jc,r:{e:M.N1}}];
|
|
this.a3i=new eb($,o);var $=[{name:"enab/disab",b:function(T){return{IH:aX.get(T.u[T.D[0]].DE(T)._.isEnabled?[6,42]:[6,41])}}},{name:[6,46]}],o=[{F:H.E.N,U:D.Jc,r:{e:M.WD}},{F:H.E.N,U:D.Jc,r:{e:M.KN}}];
|
|
this.aiU=new eb($,o);var $=[{name:"enab/disab",b:function(T){return{IH:aX.get(T.u[T.D[0]].add.vmsk.isEnabled?[6,17]:[6,16])}}},{name:[6,24]}],o=[{F:H.E.N,U:D.Jc,r:{e:M.Gt}},{F:H.E.N,U:D.Jc,r:{e:M.Ho}}];
|
|
this.ap8=new eb($,o);this.a8S=new eb(e0.a6U(!0),e0.a7D(!0));this.aqR=new eb(e0.P8(),e0.p2());this.B("rclick",this.anl,this)}iO.prototype=new a_("");
|
|
iO.prototype.alb=function($){H.zl($);var o=$.dataTransfer.getData("Text"),T=1,s=0;if(o==""){H.Xy($,this,this.eu.indexOf(this.u4),s+(T>.5?0:1))}else if(o!="--panel"){var o=JSON.parse(o),E=o.tU;
|
|
if(E=="l")this.wt({e:M.Mu,source:o.S9,target:s,JE:T})}};iO.prototype.anl=function($){var o=this.u4,T=$.data,E;
|
|
if(o.D.indexOf(T.c)==-1){var s={e:M.b7,c:$.target.qm.index,Km:T.dQ};this.wt(s)}if(o.D.indexOf(T.c)==-1)return;
|
|
if(T.dQ==1){E=this.a3i}else if(T.dQ==2){E=this.ap8}else if(T.dQ==3){E=this.aiU}else if(T.dQ==4){E=this.apG}else if(T.dQ==5){E=this.agG}else{E=this.UZ}E.f();
|
|
E.update(o);E.parent=this;var e=new x(H.E.Q,!0);e.data={e:H.V.NM,bF:E,x:T.ma.x+1,y:T.ma.y+1};this.J(e)};
|
|
iO.prototype.f=function(){a_.prototype.f.call(this);this.oS.f();this.pG.f();this.vK.f();this.zu.f();
|
|
if(this.u4)this.kW(this.u4);var $="lrs/link lrs/fx lrs/adj lrs/mask lrs/folder lrs/newlayer lrs/bin".split(" ");
|
|
for(var f=0;f<this.uO.length;f++){var o=this.uO[f];o.yl(H.oQ($[f]))}};iO.prototype.kW=function($,o){if($&&!$.sr)return;
|
|
if($==null)H.v2(this.$H,"disabled");else H.oX(this.$H,"disabled");this.u4=$;this.eu=o;if(this.eU!=null){this.vL.removeChild(this.eU.vL);
|
|
this.eU=null}if($==null)return;this.eU=new gm($.root,this,$,{zS:0});this.vL.appendChild(this.eU.vL);
|
|
if($.D.length==0||$.u[$.D[0]]==null)H.v2(this.v3,"disabled");else{H.oX(this.v3,"disabled");if($.D.length==1&&$.SK)this.eU.aiG($.D);
|
|
var T=$.u[$.D[0]];if(T.p3()){this.oS.TY([[15,10,27]].concat(hI.fC),[1].concat(hI.xx));var s=hI.zk.indexOf(T.fh);
|
|
this.oS.a(s+1)}else{this.oS.TY(hI.fC,hI.xx);var s=hI.zk.indexOf(T.fh);this.oS.a(s)}this.pG.a(Math.round(100*T.opacity/255));
|
|
this.vK.a([T.iQ(0),T.iQ(1),T.iQ(2),T.iQ(31)]);this.zu.a(Math.round(100*(T.add.iOpa!=null?T.add.iOpa/255:1)))}};
|
|
iO.prototype.RE=function($,o){var T=this.v3.getBoundingClientRect().height,s=59;if(T>70)s=84;if(T>100)s=108;
|
|
var E=o-(s+37);this.vL.style.height=E+"px";this.vL.style.width=$+"px"};iO.prototype.ap7=function($){this.wt({e:M.ZT,mI:this.oS.v()})};
|
|
iO.prototype.aq0=function($){this.wt({e:M.dR,mI:Math.round(255*this.pG.v()/100)})};iO.prototype.akf=function($){this.wt({e:M.gg,mI:[this.vK.v(),[0,1,2,31]]})};
|
|
iO.prototype.abT=function($){this.wt({e:M.yr,mI:Math.round(255*this.zu.v()/100)})};iO.prototype.alM=function($){this.a42($,this.a8S)};
|
|
iO.prototype.a5V=function($){this.a42($,this.aqR)};iO.prototype.a42=function($,o){var T=$.currentTarget;
|
|
if(H.ni(o.k))return;$.stopPropagation();var s=T.getBoundingClientRect();o.f();o.update(this.u4);o.parent=this;
|
|
var E=new x(H.E.Q,!0);E.data={e:H.V.NM,bF:o,x:s.left,y:s.top,a93:!0};this.J(E)};iO.prototype.a87=function($){this.wt({e:M.wz})};
|
|
iO.prototype.a5b=function($){this.wt({e:this.u4.D.length>1?M.Ai:M.V$})};iO.prototype.a3W=function($){this.wt({e:M.Kw})};
|
|
iO.prototype.a31=function($){var o=this.u4;if(o.D.length==0)return;var T=o.u[o.D[0]].dQ;this.wt({e:T<=0?M.J1:T==3?M.KN:M.YP})};
|
|
iO.prototype.aqm=function($){this.wt({e:M.cS})};iO.prototype.wt=function($){var o=new x(H.E.N,!0);o.data=$;
|
|
o.U=D.Jc;this.J(o)};iO.prototype.eR=function(){var $=[[6,54,0],[11,6],[6,1],[6,21],[6,20],[6,13],[5,4]],o=[this.aqm,this.a5V,this.alM,this.a87,this.a5b,this.a3W,this.a31],T=this.aeS.bind(this);
|
|
for(var f=0;f<$.length;f++){var s=new hE("W",!1,$[f]);this.uO.push(s);H.uE(s.k,o[f].bind(this));this.si.appendChild(s.k);
|
|
if(f>=$.length-3){var E=s.k;E.addEventListener("drop",T,!1);E.addEventListener("dragover",function(e){e.preventDefault()},!1);
|
|
E.addEventListener("dragenter",H.zl,!1)}}};iO.prototype.aeS=function($){H.zl($);var o=0,T=this.uO;while(T[o].k!=$.currentTarget)o++;
|
|
T[o].Xc();var s=$.dataTransfer.getData("Text");if(s=="")return;var s=JSON.parse(s);if(s.tU=="l"){var E={e:[M.Ai,M.NO,M.J1][o-4]};
|
|
if(this.u4.D.indexOf(s.S9)==-1)E.c=s.S9;this.wt(E)}if(o!=6)return;if(s.tU=="sm"||s.tU=="s"){var e=new x(H.E.N,!0);
|
|
e.U=D.b8;e.data={e:s.tU=="sm"?"st_clear":"st_delsingle",c:s.S9,S9:s.XN};this.J(e)}if(s.tU=="fm"||s.tU=="f"){this.wt({e:s.tU=="fm"?M.IX:M.Op,src:s.S9,XN:s.XN})}if(s.tU=="m"||s.tU=="vm"){this.wt({e:s.tU=="m"?M.YP:M.Ho,c:s.S9})}};
|
|
function gm($,o,T,s){aI.call(this);this.parent=o;this.qm=$;this.OJ=[];this.k=H.z("div","layeritem");
|
|
var E=$.c,Q=15,W=!1;this.v3=H.z("div",T.D.indexOf($.index)!=-1?"head selected":"head");if($.c.add.artb!=null)H.v2(this.v3,"artb");
|
|
this.v3.setAttribute("style","height: "+(E.aaZ+10)+"px");var e=H.z("div","headL"),n=H.z("div","headR"),A=H.z("div","lpineck");
|
|
this.vL=H.z("div","lpibody");this.k.appendChild(this.v3);this.v3.appendChild(e);this.v3.appendChild(n);
|
|
if(E.fg()||E.HC())if(E.px())this.k.appendChild(A);var u=this.v3;u.setAttribute("draggable","true");u.addEventListener("dragstart",this.bd.bind(this),!1);
|
|
u.addEventListener("drop",this.eV.bind(this),!1);u.addEventListener("dragover",this.Ad.bind(this),!1);
|
|
u.addEventListener("dragenter",H.zl,!1);u.addEventListener("dragleave",this.Xf.bind(this),!1);var Y=[],b=[null,null,null,null],a=H.z("div");
|
|
this.qA=H.z("div","eye");a.appendChild(this.qA);var w=H.z("div","space");this.OI=H.z("div","label");
|
|
this.OI.setAttribute("style","max-width:calc(100% - "+(96+$.depth*20)+"px)");this.OI.textContent=E.getName();
|
|
this.IZ=H.z("div","lock");this.ab6=H.z("div","lrfx");this.BF=H.z("div","arfx");var X=this.agC.bind(this),N=this.ahG.bind(this);
|
|
this.v3.addEventListener("click",N,!1);this.v3.addEventListener("contextmenu",X,!1);var z=[0,16711680,16748544,16763904,4513024,22015,11141375,7829367],i=E.add.lclr==null?0:z[E.add.lclr];
|
|
if(i==0)i=s.zS;var k=[i>>16,i>>8&255,i&255];for(var f=0;f<3;f++){k[f]=Math.round(.5*k[f]+.5*220)}if(1<H.K()&&H.K()<1.5)Q=Q/H.K();
|
|
a.setAttribute("style","background-color:rgba("+k.join(",")+","+(i==0?0:1)+");");this.qA.setAttribute("style","background-size: "+Q+"px "+Q+"px;");
|
|
var O=this.a3v.bind(this);a.addEventListener("mousedown",O,!1);a.addEventListener("mouseover",O,!1);
|
|
this.OI.addEventListener("pointerup",this.alG.bind(this),!1);this.BF.addEventListener("click",this.ais.bind(this),!1);
|
|
Y[0]=a;Y[1]=w;Y[10]=this.OI;function c(cN,ce,u){var gf=ce.canvas;if(u)cN.setAttribute("draggable","true");
|
|
cN.appendChild(gf);gf.setAttribute("style",gf.getAttribute("style")+"; pointer-events:none")}if(E.p3()){var B=H.z("div","arrow"),G=H.z("div","folder");
|
|
B.addEventListener("click",this.amE.bind(this),!1);Y[2]=B;Y[3]=G;if(E.add.lsct==hd.NH){for(var f=$.children.length-1;
|
|
f>=0;f--){var l=new gm($.children[f],o,T,{zS:i});this.OJ.push(l);this.vL.appendChild(l.k)}this.k.appendChild(this.vL)}B.setAttribute("class",E.add.lsct==hd.NH?"open":"closed")}else{this._h=H.z("div","thumb");
|
|
Y[5]=this._h;c(this._h,E.aH)}var v=E.yy();if(v){this.L$=H.z("div","chain");this.wv=H.z("div","thumb");
|
|
c(this.wv,$.c.a6A,!0);this.L$.style.opacity=v.lq?1:0;this.L$.addEventListener("click",this.abO.bind(this),!1)}var p=E.d5()&&E.add.vmsk;
|
|
if(E.add.vmsk&&!p){this.TZ=H.z("div","chain");this.Rj=H.z("div","thumb");c(this.Rj,$.c.amR,!0);this.TZ.style.opacity=E.add.vmsk.lq?1:0;
|
|
this.TZ.addEventListener("click",this.adX.bind(this),!1)}if(E.HC()&&E.DE(T)._){this.kl=H.z("div","thumb");
|
|
c(this.kl,$.c.aeJ,!1);this.kl.addEventListener("click",N,!1);this.kl.addEventListener("contextmenu",X,!1)}if(E.fg()){this.abo=A;
|
|
A.addEventListener("contextmenu",X,!1);var P=new iO.hy(aX.get([12,1]),"sm","layerstyle",$.depth,0,null);
|
|
P.parent=this;A.appendChild(P.k);var h=E.add.lmfx,j=h.masterFXSwitch.v;P.bC(j);for(var f=0;f<ev.order.length;
|
|
f++){var C=h[ev.CP[f]].v;if(C.length==0)continue;for(var V=0;V<C.length;V++){var P=new iO.hy(aX.get(ev.names[f]),"s","layerstyle",$.depth,1,[f,V]);
|
|
P.bC(j&&C[V].v.enab.v);P.parent=this;A.appendChild(P.k)}}}if(E.HC()){var P=new iO.hy(aX.get([12,55]),"fm",null,$.depth,0,-1,E.DE(T)._?this.kl:null);
|
|
P.parent=this;A.appendChild(P.k);this.a2E=P.k;this.a2E.addEventListener("contextmenu",X,!1);var h=E.add.SoLd.filterFX.v,d=h.filterFXList.v,j=h.enab.v;
|
|
P.bC(j);for(var f=d.length-1;f>=0;f--){var m=d[f].v,R=iZ.Zs(m);if(dq.YZ[R])R=dq.YZ[R];var g=m.Nm.v;if(iZ.names[R])g=aX.get(iZ.names[R]);
|
|
if(dq.names[R])g=aX.get(dq.names[R]);var S="afw_"+R,P=new iO.hy(g,"f",S,$.depth,1,f);P.bC(j&&m.enab.v);
|
|
P.parent=this;A.appendChild(P.k)}}if(T.u.indexOf(E)==T.D[0]){var F=E.dQ,r;if(F<=0)r=this._h;else if(F==1)r=this.wv;
|
|
else if(F==3)r=this.kl;if(r)r.setAttribute("class","thumb active");if(E.Jg&&this.Rj)this.Rj.setAttribute("class","thumb active")}a.style.opacity=E.N9()?1:.25;
|
|
w.setAttribute("style","width:"+Math.max(0,$.depth-1)*18+"px");var q=E.add.lspf!=null&&E.add.lspf!=0;
|
|
this.IZ.style.opacity=E.iQ(31)?1:.5;Y[4]=E.WL?H.z("div","clipp"):null;Y[6]=v?this.L$:null;Y[7]=v?this.wv:null;
|
|
Y[8]=E.add.vmsk&&!p?this.TZ:null;Y[9]=E.add.vmsk&&!p?this.Rj:null;var Z=E.pI,I=T.D;if(Z!=0)for(var f=0;
|
|
f<I.length;f++)if(T.u[I[f]].pI==Z){W=!0;break}if(W){b[0]=H.z("div",E.UD?"link":"linkX");b[0].addEventListener("click",this.aaP.bind(this),!1)}b[1]=q?this.IZ:null;
|
|
b[2]=E.fg()?this.ab6:null;b[3]=E.fg()||E.HC()?this.BF:null;this.BF.setAttribute("class",E.px()?"arfx open gsicon":"arfx closed gsicon");
|
|
var _=Y;for(var f=0;f<_.length;f++)if(_[f])e.appendChild(_[f]);_=b;for(var f=0;f<_.length;f++)if(_[f])n.appendChild(_[f])}gm.prototype=new aI;
|
|
gm.prototype.aiG=function($){var o=this.qm.index;if($.indexOf(o)!=-1){if(this.k.scrollIntoView)this.k.scrollIntoView({block:"nearest"})}for(var f=0;
|
|
f<this.OJ.length;f++)this.OJ[f].aiG($)};gm.iV=function($,o){var T=o.getBoundingClientRect();return($.clientY-T.top)/T.height};
|
|
gm.prototype.bd=function($){$.stopPropagation();var o=$.target==this.wv?"m":$.target==this.Rj?"vm":"l";
|
|
$.dataTransfer.setData("Text",JSON.stringify({tU:o,S9:this.qm.index}))};gm.prototype.Xf=function($){H.zl($);
|
|
this.iD()};gm.prototype.eV=function($){H.zl($);this.iD();var o=$.dataTransfer.getData("Text"),T=this.parent.u4,s=gm.iV($,this.v3),E=this.qm.index;
|
|
if(s>.8){var e=!0,n=T.root.BA(E);while(n.parent!=null){var A=n.parent,u=A.children;if(u.indexOf(n)!=0)e=!1;
|
|
n=n.parent}if(e){E=0;s=1}}if(o==""){H.Xy($,this,this.parent.eu.indexOf(T),E+(s>.5?0:1))}else if(o!="--panel"){var o=JSON.parse(o),Y=o.tU;
|
|
if(Y=="l")this.wt({e:M.Mu,source:o.S9,target:E,JE:s});else if(Y=="m"||Y=="vm")this.wt({e:Y=="m"?M.MT:M.Y9,src:o.S9,Yf:E});
|
|
else gm.ahX($,o,this)}};gm.ahX=function($,o,T,s){var E=o.tU,e=T.qm.index,n=o.S9;if(E=="s"||E=="sm")T.wt({e:M.je,src:n,Yf:e,XN:o.XN});
|
|
if(E=="f"||E=="fm")T.wt({e:M.wR,src:n,Yf:e,XN:o.XN,l6:s==null?0:s})};gm.prototype.Ad=function($){H.zl($);
|
|
var o=gm.iV($,this.v3),T=this.qm.c.p3()&&.5<o&&o<.8;this.iD();var s="inset 0 "+(T?0:o>.5?-3:3)+"px "+(T?"5px black":"0 rgba(0,0,0,0.5)");
|
|
this.v3.style.boxShadow=s};gm.prototype.iD=function($){this.v3.style.boxShadow=""};gm.apV=-1;gm.K0=!1;
|
|
gm.a2J=function($){gm.K0=!1;document.body.removeEventListener("mouseup",gm.a2J)};gm.prototype.a3v=function($){if($.button!=0)return;
|
|
if($.type=="mousedown"){gm.K0=!0;document.body.addEventListener("mouseup",gm.a2J,!1)}if($.type=="mouseover"&&(!gm.K0||gm.apV==this.qm.index))return;
|
|
H.zl($);this.wt({e:M._q,c:this.qm.index});gm.apV=this.qm.index};gm.prototype.amE=function($){H.zl($);
|
|
this.wt({e:M.E2,c:this.qm.index})};gm.prototype.abO=function($){this.wt({e:M.zB,c:this.qm.index})};gm.prototype.adX=function($){this.wt({e:M.mY,c:this.qm.index})};
|
|
gm.zw=0;gm.prototype.alG=function($){var o=gm.zw;gm.zw=Date.now();if(Date.now()-o>300)return;$.preventDefault();
|
|
$.stopPropagation();this.v3.setAttribute("draggable","false");var T=new a_.Hk(this.OI,this.YV.bind(this))};
|
|
gm.prototype.YV=function($){this.wt({e:M.OZ,c:this.qm.index,name:$})};gm.prototype.ais=function($){this.wt({e:M.u2,c:this.qm.index})};
|
|
gm.prototype.aaP=function($){this.wt({e:M.Y5,c:this.qm.index})};gm.prototype.agC=function($){var o=$.sourceCapabilities;
|
|
if(o)o=o.firesTouchEvents;if($.button!=2&&o!=!0)return;var T=this.dQ($);if(T!=3&&$.currentTarget==this.a2E)T=4;
|
|
if($.target==this.ab6||$.currentTarget==this.abo)T=5;var s=new x("rclick",!0);s.data={c:this.qm.index,dQ:T,ma:H.DQ($,document.body)};
|
|
this.J(s)};gm.prototype.dQ=function($){var o=$.target,T=o;return T==this.Rj?2:T==this.wv?1:T==this._h?0:T==this.kl?3:-1};
|
|
gm.prototype.ahG=function($){var o=$.target,b;if(o==this.qA||o==this.BF||o==this.L$||o==this.TZ||o.tagName&&o.tagName.toLowerCase()=="input")return;
|
|
var T=this.dQ($),s=this.parent.u4,E=this.qm.index,e=s.u[E];if(o==this.IZ){this.wt({e:M.gg,c:E,mI:[[!1,!1,!1,!1,!1],[0,1,2,3,31]]});
|
|
return}if($.button==0&&$.detail==2){if(o==this.OI)return;var n=new x(H.E.N,!0),A=new x(H.E.Q,!0),u=new x(H.E.b0,!0);
|
|
if(T==0&&e.add.SoCo){var Y=L.h.Qc(e.add.SoCo.Clr.v);A.data={e:H.V.NC,a_:"colorpicker",zS:Y.i<<16|Y.m<<8|Y.P,Ba:function(X){var N=L.h.wb({P:X&255,m:X>>>8&255,i:X>>16&255});
|
|
N={classID:"null",Clr:{t:"Objc",v:N}};var z=new x(H.E.N,!0);z.U=D.Jc;z.data={e:M.lS,WV:[E],OH:!0,H:{Ul:1,n$:N}};
|
|
this.J(z)}.bind(this),dx:!0}}else if(T==0&&(dq.get(e.add)||e.add.SoCo||e.add.GdFl||e.add.PtFl))A.data={e:H.V.FN,a_:a_._4.ga};
|
|
else if(T!=0&&T!=-1)A.data={e:H.V.FN,a_:a_._4.ga};else if(T==0&&e.add.SoLd)u.data={Wk:"placedLayerEditContents",bI:{classID:"placedLayerEditContents"}};
|
|
else if(T==0&&e.add.TySh){n.U=D.ko;n.data={e:"editCurr",Yc:E}}else A.data={e:H.V.NC,a_:"layerstyle",c:E};
|
|
this.J(u.data?u:A.data?A:n);return}if($.button!=0)return;if(T==1||T==3){var a=T==3?e.DE(s)._:e.yy();
|
|
b=a.T9?s.C.xR.join("")=="111"?1:2:0}var w={e:M.b7,c:E,Km:T,aaO:b,agB:!0};this.wt(w)};gm.prototype.wt=function($){var o=new x(H.E.N,!0);
|
|
o.data=$;o.U=D.Jc;this.J(o)};iO.hy=function($,o,T,s,E,e,n){aI.call(this);this.a9Z=o;this.A8=T;this.index=e;
|
|
this.k=H.z("div","styleitem");this.v3=H.z("div","head");this.ak3=null;if(o=="f"){var A=this.ak3=H.z("div","headR");
|
|
A.textContent="\u2699";this.v3.appendChild(A)}this.Nj=H.z("div","eye gsicon");this.OI=H.z("div","label");
|
|
this.k.appendChild(this.v3);this.v3.appendChild(this.Nj);if(n){this.wv=n;this.v3.appendChild(this.wv);
|
|
this.v3.setAttribute("style","height: "+(n.firstChild.height/H.K()+10)+"px")}this.OI.innerHTML=$;this.k.setAttribute("style","margin-left: "+(24+s*16+E*22)+"px");
|
|
this.v3.appendChild(this.OI);this.Nj.addEventListener("click",this.a6v.bind(this),!1);var u=this.k;u.setAttribute("draggable","true");
|
|
u.addEventListener("dragstart",this.bd.bind(this),!1);if(!0){u.addEventListener("drop",this.eV.bind(this),!1);
|
|
u.addEventListener("dragover",this.Ad.bind(this),!1);u.addEventListener("dragenter",H.zl,!1);u.addEventListener("dragleave",this.Xf.bind(this),!1)}this.k.addEventListener("click",this.yg.bind(this),!1)};
|
|
iO.hy.prototype=new aI;iO.hy.prototype.bd=function($){$.stopPropagation();$.dataTransfer.setData("Text",JSON.stringify({tU:this.a9Z,S9:this.parent.qm.index,XN:this.index}))};
|
|
iO.hy.prototype.Xf=function($){H.zl($);this.iD()};iO.hy.prototype.eV=function($){H.zl($);this.iD();var o=$.dataTransfer.getData("Text");
|
|
if(o=="")return;var o=JSON.parse(o);gm.ahX($,o,this.parent,this.index+(gm.iV($,this.v3)>.5?0:1))};iO.hy.prototype.Ad=function($){H.zl($);
|
|
var o=gm.iV($,this.v3)>.5;this.iD();var T="border-"+(o?"bottom":"top");this.v3.style[T]="0.2em solid rgba(0,0,0,0.5)"};
|
|
iO.hy.prototype.iD=function($){this.v3.style.border="none"};iO.hy.prototype.bC=function($){var o=15;
|
|
if(1<H.K()&&H.K()<1.5)o=o/H.K();this.Nj.setAttribute("style","background-size: "+o+"px "+o+"px;");this.Nj.style.opacity=$?1:.2};
|
|
iO.hy.prototype.yg=function($){if($.target==this.Nj)return;var o=this.parent.qm.index;if($.detail!=1&&this.A8!=null){var o=this.parent.qm.index,T=new x(H.E.Q,!0);
|
|
if(this.A8.indexOf("afw_")==0){var s=this.A8.slice(4),E=U[s]||iZ.q[s],e=$.target==this.ak3;if(!e&&!E)return;
|
|
T.data=cf.G_.zO(e?"blendOptions":s,{c:o,index:this.index})}else T.data={e:H.V.NC,a_:this.A8,c:o,index:this.index};
|
|
this.J(T)}else{if($.target.getAttribute("class")!="thumb")this.parent.wt({e:M.b7,c:o,Km:0})}};iO.hy.prototype.a6v=function($){var o={fm:M.TN,f:M.Hj,sm:M.ip,s:M.KE}[this.a9Z];
|
|
this.parent.wt({e:o,c:this.parent.qm.index,index:this.index})};function d1(){a_.call(this,"Guide Guy",!1,null,a_._4.aqo);
|
|
this.EF=null;this.MC=[];var $=H.z("div","form padded");this.$H.appendChild($);$.setAttribute("style","width:200px");
|
|
this.$H.appendChild($);var o=H.z("canvas"),T=o.getContext("2d");o.width=o.height=160;var s=[32,0,16,160,0,32,160,16,0,112,160,16],E="Margin Left,Margin Top,Margin Right,Margin Bottom,Column Count,Row Count,Column Width,Row Height,Column Gap,Row Gap".split(","),e=[0,0,0,0,0,0,0,0,0,0];
|
|
for(var f=0;f<10;f++){T.clearRect(0,0,160,160);T.setTransform(1,0,0,1,80,80);T.rotate((f&3)*Math.PI/2);
|
|
T.translate(-80,-80);T.fillStyle="rgba(0,0,0,0.3)";if(f<4){for(var n=0;n<12;n+=4){T.fillStyle=n==0?"#000000":"rgba(0,0,0,0.3)";
|
|
T.fillRect(s[n],s[n+1],s[n+2],s[n+3])}}else if(f<6){var A=8*6;T.fillRect(0,0,A,160);T.fillRect(8*7,0,A,160);
|
|
T.fillStyle="#000000";T.fillRect(8*14,0,A,160)}else if(f<8){T.fillRect(0,0,16,160);T.fillRect(160-16,0,16,160);
|
|
T.fillRect(32,0,160-64,160);T.fillStyle="#000000";T.fillRect(32,80-8,160-64,8*1)}else{T.fillRect(0,0,8*7,160);
|
|
T.fillRect(8*13,0,160,160);T.fillStyle="#000000";T.fillRect(8*7,80-8,8*6,8*1)}var u="<img src=\""+o.toDataURL()+"\" class=\"autoscale gsicon\" /> ",Y=new ac(u,0,200,f==4||f==5?null:"px",null,null,null,4,E[f]);
|
|
Y.parent=this;Y.B(H.E.O,this.a8Y,this);Y.a(e[f]);Y.f();this.MC.push(Y);$.appendChild(Y.k)}var b=["Add Guides","Clear Guides"];
|
|
this.PE=[];for(var f=0;f<b.length;f++){var a=new hE(b[f],!0,null,!0);this.PE.push(a);a.B("click",this.fr,this);
|
|
$.appendChild(a.k)}for(var f=0;f<6;f++){T.setTransform(1,0,0,1,80,80);T.rotate(Math.floor(f/3)*Math.PI/2);
|
|
T.translate(-80,-80);T.clearRect(0,0,160,160);T.fillStyle="rgba(0,0,0,0.3)";T.fillRect(0,0,160,160);
|
|
T.clearRect(16,16,128,128);T.fillStyle="#000000";var w=f%3;T.fillRect([0,9,18][w]*8,0,16,160);var u="<img src=\""+o.toDataURL()+"\" class=\"autoscale gsicon\" /> ",a=new hE(u,!1,null,!1);
|
|
this.PE.push(a);a.B("click",this.fr,this);$.appendChild(a.k)}}d1.prototype=new a_("");d1.prototype.a8Y=function($){var o=this.MC,T=o.indexOf($.target),s=Math.floor(T/2),E=T&1,e=[];
|
|
for(var f=0;f<4;f++)e.push(o[2*f+E].v());var n=-1;if(s==2&&e[2]!=0&&e[3]!=0&&e[4]!=0)n=4;if(s==3&&e[3]!=0&&e[2]!=0&&e[4]!=0)n=4;
|
|
if(s==4&&e[4]!=0&&e[2]!=0&&e[3]!=0)n=3;if(n!=-1)o[2*n+E].a(0)};d1.prototype.fr=function($){var o=this.EF,T=this.PE.indexOf($.target),s=[[],[]];
|
|
if(o==null)return;var E=o.Z?o.Z.rect:new df(0,0,o.d,o.w),e=E.d,n=E.w;if(T==0){var A=[[],[]];for(var f=0;
|
|
f<this.MC.length;f++)A[f&1].push(this.MC[f].v());var u=[d1.a4E(A[0],E.x,E.x+e),d1.a4E(A[1],E.y,E.y+n)];
|
|
s=d1.ag7(u);D.aD.P$(s,o.hm())}else if(T==1){}else{T-=2;var Y=Math.floor(T/3),u=[[],[]];u[Y].push([E.x,E.x+e/2,E.x+e,E.y,E.y+n/2,E.y+n][T]);
|
|
s=d1.ag7(u);D.aD.P$(s,o.hm())}this.arp(s)};d1.ag7=function($){var o=[],T=[];for(var s=0;s<2;s++)for(var f=0;
|
|
f<$[s].length;f++){o.push([s,$[s][f]]);T.push(-1)}return[o,T]};d1.prototype.aoX=function($){var o=this.aic.indexOf($.target)};
|
|
d1.prototype.arp=function($){var o=new x(H.E.N,!0);o.U=D.ih;o.data={e:"gids",Mj:$};this.J(o)};d1.a4E=function($,o,T){var s=[],E=$[2],e=$[3],n=$[4],A=0;
|
|
if(E==0)A++;if(e==0)A++;if(n==0)A++;if(A>1&&E==0&&e==0){if($[0]!=0)s.push(o+$[0]);if($[1]!=0)s.push(T-$[1]);
|
|
return s}var u=T-o-$[0]-$[1];if(E==0){if(n==0){E=Math.floor(u/e);n=(u-E*e)/(E-1)}else{E=1;while(e*E+n*(E-1)+e+n<=u)E++}}else if(E!=0&&e!=0){if(E*e>u)E=Math.floor(u/e);
|
|
n=(u-E*e)/(E-1)}s.push(o+$[0],T-$[1]);var e=(u-n*(E-1))/E;for(var f=1;f<E;f++){if(n==0)s.push(o+$[0]+f*e);
|
|
else s.push(o+$[0]+f*e+(f-1)*n,o+$[0]+f*e+f*n)}return s};d1.prototype.kW=function($){this.EF=$};function es(){a_.call(this,[9,2],!1,null,a_._4.ga);
|
|
this.alj=null;this.fN=null;this.GH=null;this.aiA=-1}es.prototype=new a_("");es.prototype.pJ=function(){this.CJ=H.z("div","padded");
|
|
this.CJ.style.width="22em";this.$H.appendChild(this.CJ);var $=H.z("span","fitem");this.CJ.appendChild($);
|
|
this.Uy=[new hE([0,3]),new hE([12,73]),new hE([12,91,0])];for(var f=0;f<this.Uy.length;f++){var o=this.Uy[f];
|
|
o.B("click",this.a8D,this);$.appendChild(o.k)}this.CJ.appendChild(H.z("hr"));this.cn=new es.tN;this.cn.parent=this;
|
|
this.eC=new es.ae;this.eC.parent=this;this.Ks=new es.$V;this.Ks.parent=this;this.afz=[this.cn,this.eC,this.Ks];
|
|
this.CJ.appendChild(this.cn.k)};es.prototype.a8D=function($){var f=this.Uy.indexOf($.currentTarget);
|
|
this.g3(f);this.aq3(f==1?this.eC.Iu:-1)};es.prototype.g3=function($){for(var f=0;f<3;f++){this.Uy[f].Xc();
|
|
var o=this.afz[f].k;if(o.parentNode==this.CJ&&f!=$)this.CJ.removeChild(o);if(o.parentNode!=this.CJ&&f==$)this.CJ.appendChild(o)}this.Uy[$].UM()};
|
|
es.prototype.aq3=function($){var o=this.fN.D[0],T=this.fN.u[o],s=$+1;if($==1&&T.Jg)return;var E=new x(H.E.N,!0);
|
|
E.U=D.Jc;if($!=1&&T.Jg){E.data={e:M.b7,c:o,Km:2};this.J(E)}E.data={e:M.b7,c:o,Km:s};this.J(E)};es.prototype.f=function(){a_.prototype.f.call(this);
|
|
if(this.CJ==null)return;this.kW(this.fN);for(var f=0;f<3;f++){this.Uy[f].f();this.afz[f].f()}};es.prototype.Lh=function(){if(!H.ni(this.$H))return;
|
|
if(this.CJ==null){this.pJ();this.YE(this.GH,gr.zo);this.kW(this.alj);this.f()}};es.prototype.kW=function($){this.alj=$;
|
|
if(this.CJ==null)return;this.cn.kW($);this.eC.kW($);this.Ks.kW($);if($==null||$.D.length==0||$.u[$.D[0]]==null){H.v2(this.$H,"disabled");
|
|
this.fN=null;return}else H.oX(this.$H,"disabled");var o=$.D[0],T=$.u[o],s=$.Vp(),E=s[0],e=s[1];if(e.length!=0){var n=E[e[0]],A=n.add.vogk,u=!1;
|
|
if(A)for(var f=0;f<A.length;f++){var Y=A[f].v,b=Y.keyShapeInvalidated;if(b&&b.v||Y.keyOriginType==null)continue;
|
|
u=!0;o=n.II}}if($!=this.fN||this.aiA!=o){this.fN=$;this.aiA=o;if(u)this.g3(2);else if(T.dQ<1&&!T.Jg)this.g3(0);
|
|
else this.g3(1)}this.Uy[1].ph(this.eC.Iu!=-1);this.Uy[2].ph(u)};es.prototype.YE=function($,o){this.GH=$;
|
|
if(this.cn)this.cn.YE($,o);if(this.Ks)this.Ks.YE($,o)};es.tN=function(){aI.call(this);this.k=H.z("div","form");
|
|
this.aog=new eB("Hello");this.$G=new hE("Reset",null,null,!0);this.$G.k.style.agT="right";this.$G.B("click",this.z7,this);
|
|
this.k.appendChild(this.aog.k);this.k.appendChild(this.$G.k);this.dd=null;this.ZD=null;this.fN=null;
|
|
this.GH=null;this.a6X=-1;this.apL=null;this.Uf=new hJ(!0);this.Uf.parent=this;this.Uf.B(H.E.O,this.adP,this);
|
|
this.G7=H.z("div","marged hiline");this.G7.appendChild(this.Uf.k);this.Vz=new hF("GrFl",!0);this.Vz.parent=this;
|
|
this.Vz.B(H.E.O,this.ain,this);this.yf=H.z("div","marged hiline");var $="Grad Rvrs Type Algn Angl Dthr Scl Ofst".split(" ");
|
|
for(var f=0;f<$.length;f++){var o=this.Vz.DP[$[f]].k;this.yf.appendChild(o)}this.GN=new hF("patternFill",!0);
|
|
this.GN.parent=this;this.GN.B(H.E.O,this.aji,this);this.rh=H.z("div","marged hiline");var $=["Ptrn","Scl","Algn","phase"];
|
|
for(var f=0;f<$.length;f++){var o=this.GN.DP[$[f]].k;this.rh.appendChild(o)}this.Hu={};for(var T in dq.names){if(U[T]==null)continue;
|
|
this.Hu[T]=new U[T];this.Hu[T].B(H.E.O,this.aaH,this);this.Hu[T].parent=this}var s=this.arx=H.z("div","marged hiline");
|
|
this.SN=new b7(0,!0);s.appendChild(this.SN.k);this.SN.B(H.E.O,this.FQ,this);this.Fz=new h_([12,46],[[13,1,8],[13,1,10],[13,1,9],[12,47]]);
|
|
this.Fz.B(H.E.O,this.FQ,this);s.appendChild(this.Fz.k);this.jR=new hJ(!1);this.jR.parent=this;this.jR.B(H.E.O,this.FQ,this);
|
|
s.appendChild(this.jR.k)};es.tN.prototype=new aI;es.tN.prototype.z7=function($){var o=this.fN,T=o.u[o.D[0]],s=dq.get(T.add);
|
|
this.ZD.a(iZ.o_(s));this.aaH()};es.tN.prototype.f=function(){for(var $ in this.Hu)this.Hu[$].f();this.Vz.f();
|
|
this.GN.f();this.Fz.f();this.SN.f()};es.tN.prototype.FQ=function($){var o=this.SN.v(),T=M.V5(new df(o[2],o[3],o[0],o[1])),s=this.Fz.v(),E={classID:"artboard",artboardRect:{t:"Objc",v:T},Clr:{t:"Objc",v:this.jR.v()},artboardBackgroundType:{t:"long",v:s+1}},e=new x(H.E.N,!0);
|
|
e.U=D.Jc;e.data={e:M.uh,Sv:E};this.J(e)};es.tN.prototype.adP=function($){var o=this.fN,T=o.D[0];if(o.u[T].add.SoCo==null)return;
|
|
var s=JSON.parse(JSON.stringify(o.u[T].add.SoCo));s.Clr.v=this.Uf.v();this.oY({Ul:1,n$:s})};es.tN.prototype.ain=function($){var o=this.fN,T=o.D[0];
|
|
if(o.u[T].add.GdFl==null)return;this.oY({Ul:2,n$:this.Vz.v()})};es.tN.prototype.aji=function($){this.oY({Ul:3,n$:this.GN.v()})};
|
|
es.tN.prototype.oY=function($){this.akO(D.Jc,{e:M.lS,WV:[this.fN.D[0]],OH:!0,H:$})};es.tN.prototype.aaH=function($){this.akO(D.WO,{e:"edit_layer",H:this.ZD.v()})};
|
|
es.tN.prototype.akO=function($,o){var T=new x(H.E.N,!0);T.U=$;T.data=o;this.J(T)};es.tN.prototype.kW=function($,o){var T=aX.get([0,3]),s=!1,E=null;
|
|
this.fN=$;if($&&$.u.length>0&&$.D.length!=0&&$.u[$.D[0]]){var e=$.u[$.D[0]],n=dq.get(e.add);if(n!=null&&this.Hu[n]!=null){E=this.Hu[n].k;
|
|
this.ZD=this.Hu[n];this.Hu[n].a(e.add[n]);if($.D[0]!=this.a6X){var A=$.aw($.D[0]-1);this.apL=L.lm(A)}this.Hu[n].VY(this.apL);
|
|
T=aX.get(dq.names[n]);s=!0}if(e.add.SoCo){E=this.G7;this.Uf.a(e.add.SoCo.Clr.v);T=aX.get([6,48,0,0])}if(e.add.GdFl){E=this.yf;
|
|
this.Vz.update($,e.add.GdFl);T=aX.get([6,48,0,1])}if(e.add.PtFl){E=this.rh;this.GN.update($,e.add.PtFl);
|
|
T=aX.get([6,48,0,2])}if(e.add.artb){var u=e.add.artb,Y=e.co();E=this.arx;this.Fz.a(u.artboardBackgroundType.v-1);
|
|
if(u.Clr)this.jR.a(u.Clr.v);this.SN.a([Y.d,Y.w,Y.x,Y.y],[$.fG,$.d,this.GH.wK.Z2]);T="Artboard"}this.a6X=$.D[0]}if(E!=this.dd){if(this.dd)this.k.removeChild(this.dd);
|
|
if(E!=null)this.k.appendChild(E);this.dd=E}this.aog.a(T);this.$G.k.style.display=s?"":"none"};es.tN.prototype.YE=function($,o){this.GH=$;
|
|
this.Vz.YE($,o);this.GN.YE($,o);if(o==gr.Nf)this.kW(this.fN,$);for(var T in this.Hu)this.Hu[T].YE($,o)};
|
|
es.ae=function(){aI.call(this);this.k=H.z("div","form");this.fN=null;this.Iu=0;var $=H.z("span","fitem");
|
|
this.k.appendChild($);this.Uy=[new hE([6,2]),new hE([6,3]),new hE([6,50])];for(var f=0;f<this.Uy.length;
|
|
f++){var o=this.Uy[f];o.B("click",this.a9U,this);$.appendChild(o.k)}this.m_=new fs([12,74],0,255);this.m_.B(H.E.O,this.tm,this);
|
|
this.k.appendChild(this.m_.k);this.zX=new fs([7,6],0,500,"px",2,!0);this.zX.B(H.E.O,this.tm,this);this.k.appendChild(this.zX.k);
|
|
this.Pf=new hE([4,11],null,null,!0);this.Pf.B("click",this.a6a,this)};es.ae.prototype=new aI;es.ae.prototype.a6a=function(){var $=new x(H.E.N,!0);
|
|
$.U=D.WO;$.data={e:"start",aT:"nvrt"};this.J($)};es.ae.prototype.tm=function($){var o=this.m_.v(),T=this.zX.v(),s=new x(H.E.N,!0);
|
|
s.U=D.Jc;s.data={e:M.a5,N7:this.fN.D[0],oi:{uP:this.Iu,m_:o,zX:T}};this.J(s)};es.ae.prototype.f=function(){for(var f=0;
|
|
f<this.Uy.length;f++)this.Uy[f].f();this.m_.f();this.zX.f();this.Pf.f()};es.ae.prototype.kW=function($){this.fN=$;
|
|
this.E4()};es.ae.prototype.a9U=function($){this.E4(this.Uy.indexOf($.currentTarget));this.parent.aq3(this.Iu)};
|
|
es.ae.prototype.E4=function($){var o=this.fN,T=this.Uy;for(var f=0;f<3;f++){var s=T[f];s.Xc();s.v9()}if(o==null||o.u.length==0||o.D.length==0||o.u[o.D[0]]==null)return;
|
|
var E=-1,e=o.u[o.D[0]];if(e.HC()&&e.DE(o)._!=null){T[2].wI();E=2}if(e.add.vmsk){T[1].wI();E=1}if(e.yy()){T[0].wI();
|
|
E=0}if($!=null)E=$;else if(e.Jg)E=1;else if(e.dQ==3)E=2;else if(e.dQ==1)E=0;this.Iu=E;if(E==-1){this.m_.v9();
|
|
this.zX.v9();return}var n=e.lr(E);this.m_.wI();this.zX.wI();this.m_.a(n.m_);this.zX.a(n.zX);T[E].UM();
|
|
var A=this.Pf.k;if(E==0)this.k.appendChild(A);else if(A.parentNode==this.k)this.k.removeChild(A)};es.$V=function(){aI.call(this);
|
|
this.k=H.z("div","form");this.EF=null;this.GH=null;this.jz=new b7(0,!1);this.jz.B(H.E.O,this.ah4,this);
|
|
this.RC=new b7(1,!0);this.RC.B(H.E.O,this.ah4,this)};es.$V.prototype=new aI;es.$V.prototype.f=function(){this.jz.f();
|
|
this.RC.f()};es.$V.prototype.ah4=function($){var o=[null,null,null,null],T=[null,null,null,null],s=$.target.v();
|
|
if($.target==this.jz){o[0]=s[2];o[1]=s[3];o[2]=o[0]+s[0];o[3]=o[1]+s[1]}else{T=s;var E=T[3];T[3]=T[2];
|
|
T[2]=E}var e=new x(H.E.N,!0);e.U=D.Jc;e.data={e:M.dI,UK:o,aga:T};this.J(e)};es.$V.prototype.kW=function($){this.EF=$;
|
|
if($==null)return;var o=this.GH,T=L.qy.TU($),s=T[0],E=T[1],e=this.jz.k,n=this.RC.k,A=e.parentNode!=null,u=n.parentNode!=null,Y=[$.fG,$.d,o.wK.Z2];
|
|
if(s){if(!A)this.k.appendChild(e);this.jz.a([s[2]-s[0],s[3]-s[1],s[0],s[1]],Y)}else if(A)this.k.removeChild(e);
|
|
if(E){if(!u)this.k.appendChild(n);var b=E[2];E[2]=E[3];E[3]=b;this.RC.a(E,Y)}else if(u)this.k.removeChild(n)};
|
|
es.$V.prototype.YE=function($,o){this.GH=$;this.kW(this.EF)};function iu($){a_.call(this,$.name,!0);
|
|
this.u4=$;this.mh=null;this.Mg=document.createElement("canvas");this.C8=this.Mg.getContext("2d");this.ec=document.createElement("canvas");
|
|
this.Vi=this.ec.getContext("2d");var o=16,T=L.G(16*16*4);L.qU(T,o,o,8);this.z0=L.scale.hb(T,o,o);this.hf=new i5(this.$H);
|
|
this.hf.parent=this;this.Fw=0;this.a7k="";this.j1=4}iu.prototype=new a_;iu.prototype.a5A=function(){if(this.u4.i_())return window.confirm(aX.get([22,6,3])+" "+this.u4.name+". "+aX.get([22,6,4]));
|
|
return!0};iu.prototype.YE=function($,o){this.mh=$};iu.prototype.kW=function($){this.Lh();this.iB()};
|
|
iu.prototype.RE=function($,o){if($<=0||o<=0)return;this.N0=$;this.cQ=o;var T=this.u4,s=H.K();T.C.Vi.d=Math.floor($*s);
|
|
T.C.Vi.w=Math.floor(o*s);H.QE(this.ec,$,o);H.QE(this.Mg,$,o);H.QE(y.iZ(),$,o);if(T.C.X==0)T.C.X=D.Kl.cb(T.d,T.w,$*s,o*s);
|
|
this.iB()};iu.prototype.Lh=function(){var $=this.$H.firstChild;if(!y.re&&$==y.iZ()||y.re&&$==this.ec)this.$H.removeChild($);
|
|
var o=y.re?y.iZ():this.ec;if(!H.ni(o))this.$H.appendChild(o)};iu.prototype.iB=function(){if(y.re!=this.j1){this.Fw=0;
|
|
this.a7k=""}this.j1=y.re;if(this.mh==null)return;if(y.re)this.aeh();else this.Fx();var $=this.u4;this.Fw=$.C.X;
|
|
this.a7k=JSON.stringify($.C.xR)};iu.prototype.aeh=function(){if(y.re&&iu.aqw==null)iu.aqw=new iu.bh(!1);
|
|
if(y.re&&iu.a39==null)iu.a39=[new iu.bh(!0,2),new iu.bh(!0,8),new iu.bh(!0,32),new iu.bh(!0,128)];var $=this.u4,Y,w=0;
|
|
if($.mb==null)return;var o=$.C,T=o.Vi.d,s=o.Vi.w,E=y.V8;this.Vi.clearRect(0,0,T,s);var e=this.adk($);
|
|
if(o.mi==null)o.mi=new y.uR(T,s);if(e)o.mi.set(this.ec);else{y.U0(o.mi);y.C_(1)}var n=o.X8(0,0),A=new fY;
|
|
A.scale(T,s);A.concat(o.jj(!0));A.scale(1/$.d,1/$.w);var u=[A.Ca,A.P,0,A.Z9,A.Um,0,A.Ry,A.Es,1];if(iu.a5_==null)iu.a5_=new Float32Array(4*1024);
|
|
var b=[0,0,0,0],a=iu.a5_;if($.add.artd){a.fill(0);b=iu.wZ($);var X=$.d,N=$.w,Q=0;for(var f=0;f<$.u.length;
|
|
f++){var z=$.u[f],i=z.add.artb;if(i==null||!z.N9())continue;var k=z.co();a[w]=k.x/X;a[w+1]=k.y/N;a[w+2]=k.d/X;
|
|
a[w+3]=k.w/N;w+=4;if(w==a.length)break}if(w>2*4)Q++;if(w>8*4)Q++;if(w>32*4)Q++;Y=iu.a39[Q];a=new Float32Array(a.buffer,0,[2,8,32,128][Q]*4)}else Y=iu.aqw;
|
|
y.e1(T,s);y.C_(0);y.e1(T,s);Y.BP();Y.JK(o.mi.ek,$.mb.ek,new Float32Array(u),new Float32Array([T/8,s/8,n.x/T,n.y/s]),$.d,$.w,1/$.C.X,T,s,new Float32Array(b),a,new Float32Array(L.tK.EP(L.tK.x0(o.xR))));
|
|
E.drawArrays(E.TRIANGLES,0,6)};iu.wZ=function($){return[0,0,0,0]};iu.ade=function($){var o=L.h.Qc($.v),T=[o.i/255,o.m/255,o.P/255,1];
|
|
for(var f=0;f<4;f++)T[f]=Math.min(1,T[f]);return T};iu.BR=function($,o){var T=$[2]*255;if(y.re)T=o?0:Math.max(1,T);
|
|
return"rgba("+$[0]*255+","+$[1]*255+","+T+","+$[3]+")"};iu.n8=function($){if(y.re)for(var f=0;f<$.length;
|
|
f+=4){if($[f+2]==0)$[f+2]=3}};iu.prototype.Fx=function(){var $=this.u4;if($.buffer==null)return;var o=$.C,T=o.Vi,s=T.d,E=T.w,e=new df(0,0,$.d,$.w);
|
|
this.C8.clearRect(0,0,s,E);this.Vi.clearRect(0,0,s,E);var n=o.jj(!0),A=n.clone();A.lY();if($.add.artd==null){this.Vi.save();
|
|
var u=A.bb(new aY(0,0));A.translate(-u.x,-u.y);this.Vi.translate(Math.round(u.x),Math.round(u.y));this.Vi.fillStyle=this.z0;
|
|
this.SL(L.M.Uo(e),A,this.Vi);this.Vi.fill();this.Vi.restore()}else{this.Vi.fillStyle=iu.BR(iu.wZ($));
|
|
this.Vi.fillRect(0,0,s,E);this.Vi.save();this.Vi.setTransform(A.Ca,A.P,A.Z9,A.Um,A.Ry,A.Es);var Y=$.root.children;
|
|
for(var f=0;f<Y.length;f++){var b=Y[f].c;if(b.add.artb==null||!b.N9())continue;var a=b.co(),w=b.Rr();
|
|
if(w!=0)continue;this.Vi.fillStyle="white";this.Vi.fillRect(a.x,a.y,a.d,a.w)}this.Vi.restore()}if(o.fl.length!=T.Y()){o.fl=L.G(T.Y());
|
|
o.GC=L.G(T.Y()*4)}o.GC.fill(0);L.scale.aiF($.buffer,e,n,o.GC,T);if(o.xR[0]+o.xR[1]+o.xR[2]!=3)L.tK.Vh(o.GC,o.GC,L.tK.x0(o.xR));
|
|
this.C8.putImageData(new ImageData(new Uint8ClampedArray(o.GC.buffer),T.d,T.w),0,0);this.Vi.drawImage(this.Mg,0,0);
|
|
this.Vi.getImageData(0,0,1,1);this.adk($)};iu.prototype.adk=function($){var o=$.C,T=o.xR[0]+o.xR[1]+o.xR[2],s=!1,E=[];
|
|
for(var f=0;f<$.D.length;f++){var e=$.u[$.D[f]];if(e==null)continue;var n=e.dQ;if(n!=1&&n!=3)continue;
|
|
var A=n==1?e.yy():e.DE($)._;if(A.T9)E.push(A)}for(var f=0;f<$.iy.length;f++)if($.iy[f].T9)E.push($.iy[f]);
|
|
for(var f=0;f<E.length;f++){var A=E[f];this.afF(A,o,E.length==1&&T==0?2:1,A.color,A.zS);s=!0}var u=this.mh;
|
|
s=this.ag6($,this.Vi,o)||s;if($.Z&&u.Ok&&u.wK.cK){this.afF($.Z,o,0,0,null);s=!0}return s};iu.prototype.afF=function($,o,T,s,E){var e=0,w,X;
|
|
if(E)e=Math.round(E.P)<<16|Math.round(E.m)<<8|Math.round(E.i);var n=o.jj(!0),A=o.Vi,u=new df(0,0,o.u4.d,o.u4.w);
|
|
if(o.fl.length!=A.Y()){o.fl=L.G(A.Y());o.GC=L.G(A.Y()*4)}o.fl.fill(s);o.GC.fill(0);var Y=$.channel,b=$.rect;
|
|
L.scale.t(Y,b,n,o.fl,A);if(T==0)L.Z.ama(o.fl,o.GC,A,A);else L.Z.a3G(o.fl,o.GC,A,A,T,e);iu.n8(o.GC);var a=new ImageData(new Uint8ClampedArray(o.GC.buffer),A.d,A.w);
|
|
this.C8.putImageData(a,0,0);this.Vi.save();if(T==0){w=A.clone();w.Mi(-1,-1);X=new fY}else{w=new df(0,0,u.d,u.w);
|
|
X=n.clone();X.lY()}this.SL(L.M.Uo(w),X,this.Vi);this.Vi.clip();this.Vi.drawImage(this.Mg,0,0);this.Vi.restore()};
|
|
iu.prototype.ag6=function($,o,T){var s=$.n.oA!=null||$.n.JU!=null||$.n.BD!=null||$.n.nT.length!=0||$.n.bt.length!=0,E=this.mh,e=E.wK,n=b3.Sx[E.dJ],A=Math.round(12*H.K()),u=A/$.C.X,Y=T.jj(!0);
|
|
Y.lY();o.save();o.setTransform(Y.Ca,Y.P,Y.Z9,Y.Um,Y.Ry,Y.Es);if($.add.artd){var b=iu.wZ($)[0];b=b<.5?b+.5:b-.5;
|
|
b=""+Math.round(b*255).toString(16);while(b.length<2)b="0"+b;o.fillStyle="#"+b+b+b;o.font=u+"px sans-serif";
|
|
for(var f=0;f<$.u.length;f++){var a=$.u[f];if(a.add.artb==null||!a.N9())continue;var w=a.co();o.fillText(a.getName(),w.x,w.y-6/T.X);
|
|
s=!0}}var X=iu.BR([.1,.5,1,1]),N=iu.BR([1,1,1,1]);if(E.Ok&&e.w5){o.fillStyle=o.strokeStyle=X;o.lineWidth=1.5/T.X;
|
|
var z=$.Vp(),i=z[0],k=z[1];for(var Q=0;Q<k.length;Q++){var a=i[k[Q]],O=a.add.vmsk,c=O.g,B=L.M.Ld(c);
|
|
this.SL(B,null,o);o.stroke();s=!0;var G=3*H.K()/T.X,l=c.length-3;for(var f=0;f<O.kZ.length;f++){var v=L.A.BM(c,O.kZ[f]);
|
|
if(v==null)continue;var p=v.x,P=v.y;o.beginPath();var h=f==0;if(O.wq)h=!h;if(h){o.moveTo(p-G,P-G);o.lineTo(p+G,P+G);
|
|
o.moveTo(p-G,P+G);o.lineTo(p+G,P-G);o.stroke()}else{o.arc(p,P,G*1,0,2*Math.PI);o.fill()}s=!0}if($.D.length!=1)continue;
|
|
var j=-1;for(var f=0;f<c.length;f++){if(c[f].type>5)continue;if(c[f].type==0||c[f].type==3){if(c[f].m6!=-1)j++;
|
|
continue}if(O.D.indexOf(j)!=-1){var p=c[f].W.x,P=c[f].W.y;o.fillRect(p-G*.8,P-G*.8,2*G*.8,2*G*.8)}if(O.Rc.indexOf(f)!=-1){var C=[c[f].W];
|
|
o.beginPath();o.moveTo(c[f].Wq.x,c[f].Wq.y);o.lineTo(c[f].W.x,c[f].W.y);o.lineTo(c[f].JL.x,c[f].JL.y);
|
|
o.stroke();if(!c[f].W.R1(c[f].Wq))C.push(c[f].Wq);if(!c[f].W.R1(c[f].JL))C.push(c[f].JL);for(var V=0;
|
|
V<C.length;V++){var v=C[V],p=v.x,P=v.y;if(V==0&&(c[f].type==2||c[f].type==5))o.fillRect(p-1.2*G,P-1.2*G,2.4*G,2.4*G);
|
|
else{o.beginPath();o.arc(p,P,G*1.2,0,2*Math.PI);o.fill();if(V!=0)o.fillStyle=N;o.beginPath();o.arc(p,P,G*.8,0,2*Math.PI);
|
|
o.fill();o.fillStyle=X}}}s=!0}}}o.lineWidth=1/T.X;if($.n.WG){o.fillStyle=o.strokeStyle=X;var d={I:[],o:[]},m=iu.adc;
|
|
if(m==null){m=iu.adc={I:[1,0],o:["M"]};for(var f=1;f<30;f++){var R=Math.PI*2*f/30;m.I.push(Math.cos(R),Math.sin(R));
|
|
m.o.push("L")}m.o.push("Z","M","L","M","L");m.I.push(-.5,0,.5,0,0,-.5,0,.5)}for(var f=0;f<$.n.WG.length;
|
|
f++){var g=D.EC.C1($.n.WG[f],T),S=new fY(g[0],0,0,g[0],g[1],g[2]);L.M.concat(d,m,S)}this.SL(d,null,o);
|
|
o.stroke();s=!0}o.fillStyle=o.strokeStyle=iu.BR([0,0,0,1],!0);var F=new fY(1,0,0,1,.5/T.X,.5/T.X);if($.n.oA){this.SL($.n.oA,null,o);
|
|
o.fill()}if($.n.JU){this.SL($.n.JU,F,o);o.stroke()}for(var r in $.n.Qw)if($.n.Qw[r].JU){this.SL($.n.Qw[r].JU,null,o);
|
|
o.stroke();s=!0}o.beginPath();var G=(4*H.K()+.5)/T.X,q=$.n.EJ;for(var f=0;f<q.length;f+=2){s=!0;var p=q[f],P=q[f+1];
|
|
o.rect(p-G,P-G,2*G,2*G)}o.stroke();var q=$.n.apw;o.beginPath();var G=4*H.K()/T.X;for(var f=0;f<q.length;
|
|
f+=2){s=!0;var p=q[f],P=q[f+1];o.moveTo(p+G,P);o.arc(p,P,G,0,2*Math.PI)}o.fill();var q=$.n.hz;o.fillStyle=iu.BR([1,1,1,1]);
|
|
o.beginPath();var G=6*H.K()/T.X;for(var f=0;f<q.length;f+=2){s=!0;var p=q[f],P=q[f+1];o.moveTo(p+G,P);
|
|
o.arc(p,P,G,0,2*Math.PI)}o.fill();var G=4*H.K()/T.X;for(var f=0;f<q.length;f+=2){s=!0;var p=q[f],P=q[f+1];
|
|
o.fillStyle=iu.BR($.n.v$.indexOf(f>>>1)!=-1?[0,.6,1,1]:[.7,.7,.7,1]);o.beginPath();o.moveTo(p+G,P);o.arc(p,P,G,0,2*Math.PI);
|
|
o.fill()}if($.n.nT.length!=0){for(var f=0;f<$.n.nT.length;f++){var W=$.n.nT[f],Z=W[1];o.putImageData(new ImageData(new Uint8ClampedArray(W[0].buffer),Z.d,Z.w),Z.x,Z.y)}}var I=.5/T.X;
|
|
o.lineWidth=1/T.X;if($.n.Z_){s=!0;var _=$.n.Z_,cN=_.$M,B={o:[],I:[]};for(var f=0;f<_.Tw.length;f++)L.M.concat(B,L.M.Uo(_.Tw[f]));
|
|
B.I=B.I.concat(cN);for(var f=0;f<cN.length;f+=4){B.o.push("M","L")}for(var f=0;f<B.I.length;f++){B.I[f]+=I}o.strokeStyle=iu.BR([.9,.2,.2,1]);
|
|
this.SL(B,null,o);o.stroke();var gf=H.K(),K=2/T.X;o.font=u*.9+"px sans-serif";for(var f=0;f<cN.length;
|
|
f+=4){var p=cN[f],P=cN[f+1],cv=cN[f+2],f0=cN[f+3],i8=Math.sqrt((f0-P)*(f0-P)+(cv-p)*(cv-p));i8=L.BG.at(i8,$.fG,E,P==f0?$.d:$.w);
|
|
var b5=new aY((p+cv)/2,(P+f0)/2);o.fillStyle=iu.BR([.9,.2,.2,1]);var iC=o.measureText(i8).width;o.fillRect(b5.x-iC/2-K*gf,b5.y-3.5*K*gf,iC+2*K*gf,7*K*gf);
|
|
o.fillStyle=iu.BR([1,1,1,1]);o.save();o.translate(b5.x-iC/2,b5.y+2*K*gf);o.scale(.1,.1);o.font=u*9+"px sans-serif";
|
|
o.fillText(i8,0,0);o.restore()}}if(E.Ok){if(e.Bw){var an=L.BG.V9(e.zP,$.fG,$.d,e.EI),cO=an;if(e.EI==4)cO*=$.w/$.d;
|
|
this.qU($,o,an,cO,1,e.hN);s=!0}if(e.Ts&&$.C.X>7){this.qU($,o,1,1,.5,e.hN);s=!0}if(e.yZ){var bh=$.hm(),bD=$.Q2(),fq=Math.max($.C.Vi.d,$.C.Vi.w)/$.C.X;
|
|
fq=Math.max(Math.max($.d,$.w)*2,fq);o.beginPath();o.strokeStyle=iu.BR([0,1,1,1]);for(var f=0;f<bh[0].length;
|
|
f++){var fO=bh[0][f],g6=bh[1][f];if(g6!=-1&&g6!=bD)continue;if(fO[0]==0){var hM=Math.round(fO[1])+I;
|
|
o.moveTo(hM,-fq);o.lineTo(hM,fq)}else{var d3=Math.round(fO[1])+I;o.moveTo(-fq,d3);o.lineTo(fq,d3)}s=!0}o.stroke()}var h9=$.op;
|
|
if(e.op&&h9.length!=0){o.font=u*.8+"px sans-serif";var cs=[],dv=[];for(var f=0;f<h9.length;f++){var ec=D.j3.ee(h9,f);
|
|
cs.push(ec);if($.AQ.indexOf(f)!=-1)dv.push(ec)}cs.reverse();var gT=Date.now();cs=L.rect.sl([0,0,$.d,$.w],cs);
|
|
for(var V=0;V<2;V++)for(var f=0;f<cs.length;f++){var iz=cs[f],j=iz[4],gw=j!=null?h9[j]:null;if(gw&&V==0||gw==null&&V==1)continue;
|
|
var p=Math.round(iz[0]),P=Math.round(iz[1]),cv=Math.round(iz[2]),f0=Math.round(iz[3]);o.strokeStyle=o.fillStyle=iu.BR(gw?[0,.7,.7,1]:[.8,.8,.8,1]);
|
|
o.strokeRect(p+I,P+I,cv-p,f0-P);var iI=f+1,g2=o.measureText(iI),iC=g2.width;o.fillRect(p,P,iC+u/2,u);
|
|
o.fillStyle=iu.BR([1,1,1,1]);o.fillText(iI,p+u/4,P+u*.8)}var K=2/$.C.X,bb=2*K;for(var f=0;f<dv.length;
|
|
f++){var iz=dv[f],p=Math.round(iz[0]),P=Math.round(iz[1]),cv=Math.round(iz[2]),f0=Math.round(iz[3]);
|
|
o.strokeStyle=o.fillStyle=iu.BR([0,.7,.7,1]);o.strokeRect(p+I,P+I,cv-p,f0-P);var ir=[p,P,cv,P,cv,f0,p,f0];
|
|
for(var dG=0;dG<ir.length;dG+=2){var hM=ir[dG],d3=ir[dG+1],gY=ir[dG+2&7],e6=ir[dG+3&7];o.fillRect(hM-K,d3-K,bb,bb);
|
|
o.fillRect(Math.round((hM+gY)/2)-K,Math.round((d3+e6)/2)-K,bb,bb)}}s=!0}}o.strokeStyle=iu.BR([1,0,0,1]);
|
|
if($.n.BD){this.SL($.n.BD,F,o);o.stroke()}o.restore();if(E.KC){if($.C.VC==null||$.C.VC.width!=$.C.Vi.d||$.C.DV.height!=$.C.Vi.w){$.C.VC=o.createImageData($.C.Vi.d,L.BG.M5);
|
|
$.C.DV=o.createImageData(L.BG.M5,$.C.Vi.w)}var n=b3.Sx[E.dJ],fr=0,bt=0,cx=$.d,ci=$.w;if($.Q2()!=-1){var w=$.u[$.Q2()].co();
|
|
fr=w.x;bt=w.y;cx=w.d;ci=w.w}fr*=T.X;bt*=T.X;var T=$.C,gv=[1,$.fG,$.fG/2.54,$.fG/25.4,cx/100][e.Z2],gu=T.X*$.d/2,ak=T.X*$.w/2,hP=[T.X*gv,new aY(T.l.x+(fr+gu*gv-gu),T.l.y+(bt+ak*gv-ak))];
|
|
if(e.Z2==4)gv*=ci/cx;var ai=[T.X*gv,new aY(T.l.x+(fr+gu*gv-gu),T.l.y+(bt+ak*gv-ak))],hK=this.hf.Vs;L.BG.ad2(T,n["--text-color"],n["--bg-input"],Math.floor(hK.x),Math.floor(hK.y),hP,ai);
|
|
var h3=ap.a37(T.X,iu.BR([1,1,1,1]));iu.n8($.C.DV.data);iu.n8($.C.VC.data);o.putImageData($.C.DV,0,0);
|
|
o.putImageData($.C.VC,0,0);o.putImageData(h3,0,$.C.Vi.w-h3.height)}if($.n.bt.length!=0){for(var f=0;
|
|
f<$.n.bt.length;f++){var W=$.n.bt[f],Z=W[1];o.putImageData(new ImageData(new Uint8ClampedArray(W[0].buffer),Z.d,Z.w),Z.x,Z.y)}}return s||E.KC};
|
|
iu.prototype.qU=function($,o,T,s,E,e){while(T*$.C.X<4){T*=2;s*=2}var n=$.d,A=$.w,u=.5/$.C.X;o.strokeStyle=iu.BR([.5,.5,.5,E],!0);
|
|
o.save();o.rect(0,0,n,A);o.clip();o.beginPath();for(var Y=0;Y<=n;Y+=T){o.moveTo(Y+u,0);o.lineTo(Y+u,A)}if(e==0){for(var b=0;
|
|
b<=A;b+=s){o.moveTo(0,b+u);o.lineTo(n,b+u)}}else{s*=Math.sqrt(4/3);var a=s*Math.floor(n/s),w=n*(s/(2*T));
|
|
for(var b=-a;b<=A+a;b+=s){o.moveTo(0,b);o.lineTo(n,b-w);o.moveTo(0,b);o.lineTo(n,b+w)}}o.stroke();o.restore()};
|
|
iu.prototype.SL=function($,o,T){T.beginPath();var s=L.M.clone($);if(o)L.M.t(s.I,o,s.I);Typr.U.pathToContext({cmds:s.o,crds:s.I},T)};
|
|
iu.bh=function($,o){y._c.call(this);this.a98=$;var T="\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"+($?"uniform vec4 bgClr; uniform vec4 ars["+o+"]; ":"")+"\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"+y.KZ.rF+"\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); "+($?"\t\t\t\t\tbool inr = false; vec4 BG = bgClr; \t\t\t\t\tfor(int i=0; i<"+o+"; 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}",s="\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.jq(T,s)};iu.bh.prototype=new y._c;iu.bh.prototype.JK=function($,o,T,s,E,e,n,A,u,Y,b,a){this.Yu("tmat gsize source target contSizeZoom cnvSize bgClr ars ctrn".split(" "));
|
|
var w=y.V8,X=this.D5;w.uniformMatrix3fv(X.tmat,!1,T);w.uniform4fv(X.gsize,s);w.uniform3f(X.contSizeZoom,E,e,n);
|
|
w.uniform2f(X.cnvSize,A,u);w.uniformMatrix4fv(X.ctrn,!1,a);if(this.a98){w.uniform4fv(X.ars,b);w.uniform4fv(X.bgClr,Y)}w.uniform1i(X.source,0);
|
|
w.uniform1i(X.target,1);w.activeTexture(w.TEXTURE0);w.bindTexture(w.TEXTURE_2D,$);w.activeTexture(w.TEXTURE1);
|
|
w.bindTexture(w.TEXTURE_2D,o);w.activeTexture(w.TEXTURE0)};function fF(){a_.call(this,[9,7],!1,null,a_._4.aoi);
|
|
this.$H.setAttribute("style","min-width:240px;");this.fN=null;this.KA=-1;this.a01=[];this.vL=H.z("div","scrollable");
|
|
this.vL.style.height="160px";this.$H.appendChild(this.vL);this.si=H.z("div","lpfoot");this.$H.appendChild(this.si);
|
|
this.PE=[];var $=["reload","lrs/newlayer","lrs/bin"],o=[[5,10],[5,3],[5,4]];for(var f=0;f<$.length;f++){var T=new hE("<img src=\""+PIMG[$[f]]+"\" class=\"gsicon\" />",!1,o[f]);
|
|
T.B("click",this.ag5,this);this.si.appendChild(T.k);this.PE.push(T)}}fF.prototype=new a_("");fF.prototype.wt=function($){var o=new x(H.E.N,!0);
|
|
o.data=$;o.U=D.dm;this.J(o)};fF.prototype.ag5=function($){var f=this.PE.indexOf($.currentTarget);if(f!=1)if(this.KA==-1)return;
|
|
this.wt({e:["updLC","addLC","delLC"][f],II:this.KA});if(f==2)this.KA=-1};fF.prototype.f=function(){a_.prototype.f.call(this);
|
|
for(var f=0;f<this.PE.length;f++)this.PE[f].f()};fF.prototype.kW=function($){if($==null)H.v2(this.$H,"disabled");
|
|
else H.oX(this.$H,"disabled");this.fN=$;H.Ft(this.vL);if($==null)return;var o=$.kk.lastAppliedComp?$.kk.lastAppliedComp.v:0,T=$.kk.list.v.slice(0);
|
|
T.unshift({v:{Nm:{v:"Last Document State"},compID:{v:0},capturedInfo:{v:0}}});for(var f=0;f<T.length;
|
|
f++){var s=T[f].v,E=new eE(s.Nm.v,s.compID.v,s.capturedInfo.v,o,this.KA);E.B("activate",this.gU,this);
|
|
E.parent=this;this.vL.appendChild(E.k);this.a01.push(E)}};fF.prototype.gU=function($){this.KA=$.currentTarget.II;
|
|
this.kW(this.fN)};function eE($,f,o,T,s){aI.call(this);this.II=f;this.k=H.z("div","head listitem"+(f==s?" selected":""));
|
|
var E=f==T,e=new hE(E?"\u2713":"\u2014");if(E)e.UM();this.k.appendChild(e.k);e.B("click",this.Ci,this);
|
|
var n=this.s0=H.z("span");n.textContent=$;this.k.appendChild(n);this.PE=[];if(f!=0){this.k.addEventListener("mouseup",this.gU.bind(this),!1);
|
|
this.aqP=H.z("span","headR");this.k.appendChild(this.aqP);var A=["lrs/eye","pos","lrs/fx"],u=["Visibility","Position","Appearance"];
|
|
for(var Y=0;Y<A.length;Y++){var b=new hE("<img src=\""+PIMG[A[Y]]+"\" class=\"autoscale gsicon\" />",!1,u[Y]);
|
|
if((o>>Y&1)==0)b.k.setAttribute("style","opacity:0.3");b.B("click",this.ab5,this);this.aqP.appendChild(b.k);
|
|
this.PE.push(b)}}}eE.prototype=new aI;eE.prototype.gU=function($){if($.target!=this.s0&&$.target!=this.k)return;
|
|
if($.detail==1)this.J(new x("activate",!1));else{var o=new a_.Hk(this.s0,this.YV.bind(this))}};eE.prototype.ab5=function($){var f=this.PE.indexOf($.currentTarget);
|
|
this.wt({e:"editLC",ant:f,II:this.II})};eE.prototype.YV=function($){this.wt({e:"editLC",gl:$,II:this.II})};
|
|
eE.prototype.Ci=function($){this.wt({e:"setLC",II:this.II})};eE.prototype.wt=function($){var o=new x(H.E.N,!0);
|
|
o.data=$;o.U=D.dm;this.J(o)};function db(){a_.call(this,[9,11],!1,null,a_._4.a3V);var $=H.z("div","padded");
|
|
$.setAttribute("style","min-width:15em");this.$H.appendChild($);var o=H.z("div");$.appendChild(o);o.setAttribute("style","cursor:grab;");
|
|
this.S=H.z("canvas");this.S.width=100;o.appendChild(this.S);H.fb(this.S);H.uE(this.S,this.Wp.bind(this));
|
|
this.$o=new a4(null,0,D.Kl.aK.length-1);this.$o.B(H.E.O,this.afZ,this);$.appendChild(this.$o.k);this.age=this.m1.bind(this);
|
|
this.a6e=this.XO.bind(this);this.EF=null}db.prototype=new a_("");db.prototype.RE=function($,o){this.iB()};
|
|
db.prototype.afZ=function($){var o=this.$o.v(),T=this.EF,s=D.Kl.aK[D.Kl.aK.length-1-o],E=new x(H.E.N,!0);
|
|
E.U=D.S3;E.data={e:"zoom",X:s};this.J(E)};db.prototype.Wp=function($){if(this.EF==null)return;H.mW(window,this.age);
|
|
H.aa(window,this.a6e)};db.prototype.m1=function($){var o=H.DQ($,this.S),T=this.EF,s=this.S.width,E=this.S.height,e=(o.x*H.K()-s/2)/s,n=(o.y*H.K()-E/2)/E,A=H.K()*T.C.X,u=Math.round(-T.C.X*T.d*e),Y=Math.round(-T.C.X*T.w*n);
|
|
D.UL.iY(T,u,Y)};db.prototype.XO=function($){H.vY(window,this.age);H.SY(window,this.a6e)};db.prototype.kW=function($){if($==null&&this.EF!=null)this.S.width=100;
|
|
this.EF=$;this.iB()};db.prototype.iB=function(){var $=this.EF,s=0;if($==null||$.C.X==0)return;var o=$.C;
|
|
if(!H.ni(this.$H))return;this.$o.a(D.Kl.aK.length-1-D.Kl.dT(o.X));var T=300*H.K(),E=[$.aw(),new df(0,0,$.d,$.w)];
|
|
L.mc(E);while(Math.max(E[s+1].d,E[s+1].w)>T){s+=2}var e=E[s],n=E[s+1],A=n.d,u=n.w,Y=this.S;Y.width=A;
|
|
Y.height=u;H.kg(Y,A,u);var b=Y.getContext("2d"),a=b.createImageData(A,u);L.w0(e,a.data);b.putImageData(a,0,0);
|
|
var w=o.Vi,X=o.VD(w.x,w.y),N=o.VD(w.x+w.d,w.y+w.w),z=A/$.d;b.scale(z,z);b.lineWidth=4/z;b.strokeStyle="#ff0000";
|
|
b.strokeRect(X.x,X.y,N.x-X.x,N.y-X.y)};db.prototype.YE=function($,o){};db.prototype.Lh=function(){this.iB()};
|
|
function as($,o){if($==null){a_.call(this);return}a_.call(this,$.name,!1,$.icon,o);var T=this.kr=H.z("iframe");
|
|
T.setAttribute("src",$.url);T.setAttribute("style","width:"+$.width+"px; height:"+$.height+"px");this.$H.appendChild(T)}as.prototype=new a_("");
|
|
as.prototype.C4=function($){if(H.ni(this.kr))this.kr.contentWindow.postMessage($,"*")};as.prototype.RE=function($,o){this.kr.setAttribute("style","width:"+$+"px; height:"+o+"px")};
|
|
function g7(){a_.call(this,[9,12],!1,null,a_._4.ws);this.GH=null;this.u0=new bK(D.m8);this.u0.parent=this;
|
|
var $=H.z("div","padded");$.setAttribute("style","width:20em");this.$H.appendChild($);$.appendChild(this.u0.kc)}g7.prototype=new a_("");
|
|
g7.prototype.Lh=function(){this.u0.bq(this.GH.VS)};g7.prototype.YE=function($,o){this.GH=$;if(o==gr.zo||o==gr.ws)this.u0.bq($.VS)};
|
|
g7.prototype.RE=function($,o){this.u0.a9k(this.GH.D3)};g7.prototype.f=function(){a_.prototype.f.call(this);
|
|
this.u0.f()};var cw=function(){var $=[],o=null,T=null,s=null,E=[[100,180,255],[100,255,100],[255,200,100],[200,100,255],[255,100,200]];
|
|
function e(){a_.call(this,"Memory",!1,null,a_._4.alk);var X=H.z("div","padded");this.$H.appendChild(X);
|
|
T=new hE(["<< VAR0",[0,13,2]],!1,null,!0);T.addEventListener("click",function(N){$.pop();A()});X.appendChild(T.k);
|
|
o=H.z("div","scrollable");o.setAttribute("style","width:20em; height:26em; margin-top:8px;");X.appendChild(o)}e.prototype=new a_("");
|
|
e.prototype.kW=function(X,N,z){s=N;this.Lh()};e.prototype.Lh=function(){T.ph(!1);if(!H.ni(o))return;
|
|
var X={jA:"Total:",uz:[]};for(var f=0;f<s.length;f++)X.uz.push(Y(s[f]));w(X);$=[X];A()};e.prototype.f=function(){a_.prototype.f.call(this);
|
|
T.f()};function n(X){var N=X.currentTarget,f=0;while((N=N.previousSibling)!=null)f++;$.push($[$.length-1].uz[f-1]);
|
|
A()}function A(){T.ph($.length>1);var X=$[$.length-1];H.Ft(o);u(X,o,0);X.uz.sort(function(N,z){return z.JY[0]-N.JY[0]});
|
|
for(var f=0;f<X.uz.length;f++)u(X.uz[f],o,1)}function u(X,N,z){var i=c6.yY,k=z!=0&&X.uz,Q="margin-left:"+z*10+"px; margin-bottom:8px; padding:3px 5px;";
|
|
if(k)Q+="cursor:pointer;";if(X.tU!=null)Q+="background-color:rgba("+E[X.tU].join(",")+",0.2);";var O=H.z("div");
|
|
N.appendChild(O);O.setAttribute("style",Q);O.innerHTML=b(X.jA)+"<br />"+"RAM: <b>"+i(X.JY[0])+"</b>\u2001GPU: <b>"+i(X.JY[1])+"</b>";
|
|
if(k)O.addEventListener("click",n,!1)}function Y(X){var N={jA:X.name,uz:[],tU:0},z=y.re?1:0,i=1-z,k={jA:"Final Image",JY:[X.d*X.w*4,z*X.d*X.w*4],tU:2};
|
|
N.uz.push(k);for(var f=0;f<X.u.length;f++){var Q=a(X.u[f]);if(Q.uz.length!=0)N.uz.push(Q)}var O=X.add.lnk2;
|
|
if(O)for(var f=0;f<O.length;f++){var Q=O[f],c={jA:Q.FZ,uz:[],tU:4},B=0;c.uz.push({jA:"Raw file",JY:[Q.raw.length,0]});
|
|
if(Q.wc)for(var G=0;G<Q.wc.length;G+=2)B+=Q.wc[G].length;if(B!=0)c.uz.push({jA:"Decoded pixels",JY:[B,0]});
|
|
w(c);N.uz.push(c)}w(N);return N}function b(X){return X.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'")}function a(X){var N={jA:X.getName(),uz:[],tU:1},z=y.re?1:0,i=1-z,k=X.rect.Y();
|
|
if(k!=0)N.uz.push({jA:"Layer pixels",JY:[k*4,z*k*4]});if(X.add.lmfx&&X.B4.Td.type){var Q=X.B4.Td.type,G=0;
|
|
for(var O in Q){var c=0;for(var B=0;B<Q[O].length;B++)if(O=="ebbl"){if(Q[O][B].hh)c+=Q[O][B].hh.lM.Y();
|
|
if(Q[O][B].aj)c+=Q[O][B].aj.lM.Y();if(Q[O][B].HV)c+=Q[O][B].HV.lM.Y();if(Q[O][B].Zc)c+=Q[O][B].Zc.lM.Y()}else c+=Q[O][B].lM.Y();
|
|
if(c!=0)N.uz.push({jA:aX.get(ev.names[ev.order.indexOf(O)]),JY:[i*c*4,z*c*4],tU:3})}if(X.B4.Nl)G+=k;
|
|
if(X.B4.PG)G+=k;if(X.B4.cU)G+=k;if(X.B4.cU)G+=k;if(X.B4.xN)G+=k;if(X.B4.oL)G+=k;var l=X.B4.rP?X.B4.rP.length:0;
|
|
if(G+l!=0)N.uz.push({jA:"Additional Blending Data",JY:[i*G*4+l,z*G*4]})}var v=X.yy(),p=v?v.rect.Y():0;
|
|
if(p!=0){N.uz.push({jA:"Raster Mask",JY:[p,0]})}var v=X.add.vmsk,p=v&&v.Vx?v.Vx.rect.Y():0;if(p!=0){N.uz.push({jA:"Vector Mask",JY:[p,0]})}w(N);
|
|
return N}function w(X){X.JY=[0,0];for(var f=0;f<X.uz.length;f++){X.JY[0]+=X.uz[f].JY[0];X.JY[1]+=X.uz[f].JY[1]}}return e}();
|
|
function cZ(){aI.call(this);this.U=0;this.QY=null;this.k=H.z("div","toolconf");this.u0=null;this.O3=null;
|
|
this.body=new H.z("div","body")}cZ.prototype=new aI;cZ.prototype.anc=function($,o){this.U=$;this.QY=o;
|
|
if(D.Wu[$]){var T=this.u0=new bK($);this.k.appendChild(T.k);T.parent=this}else{this.O3=H.z("div");this.k.appendChild(this.O3)}this.k.appendChild(this.body);
|
|
this.f()};cZ.prototype.a0H=function($,o){};cZ.prototype.a6G=function($){};cZ.prototype.YE=function($,o){if(o==gr.zo||o==gr.ws)if(this.u0)this.u0.bq($.VS)};
|
|
cZ.prototype.HP=function($){};cZ.prototype.f=function(){if(this.u0)this.u0.f();else this.O3.innerHTML=H.oQ(this.QY,null,"toolicon");
|
|
this.Pj()};cZ.prototype.Pj=function(){};function iN(){cZ.call(this)}iN.prototype=new cZ;iN.prototype.HP=function($){};
|
|
function ae($){cZ.call(this);if($==null)return;this.GH=null;this.MC={};for(var f=0;f<$.length;f++){var o=$[f],T=null;
|
|
if(o=="brush"){T=new ef}if(o=="bmode"){T=new h_([12,19,0],hI.fC,!1,hI.xx)}if(o=="bmode0"){T=new h_([12,19,0],hI.fC.slice(23),!1)}if(o=="emode"){T=new h_([12,36],[[9,3],[10,38]])}if(o=="opacity"){T=new ac([12,0],0,100,"%");
|
|
T.a(100)}if(o=="flow"){T=new ac([12,63],0,100,"%");T.a(100)}if(o=="smth"){T=new ac([19,3,0],0,100,"%");
|
|
T.a(0)}if(o=="samp"){T=new h_("Sampling",["Brush Center","Start of Stroke","Background Color"])}if(o=="wconf"){T=new gR;
|
|
T.a([40,!0,!0])}if(o=="strn"){T=new ac([12,64],1,100,"%");T.a(50)}if(o=="smode"){T=new h_([12,36],[[19,7,0],[19,7,1]]);
|
|
T.a(1)}if(o=="pdetail"){T=new ad([12,65]);T.UM()}if(o=="rng"){T=new h_([12,12],[[19,6,0],[19,6,1],[19,6,2]]);
|
|
T.a(1)}if(o=="expo"){T=new ac([12,5],0,100,"%");T.a(50)}if(o=="algnd"){T=new ad([12,75]);T.a(!1)}if(o=="sfrom"){T=new h_([12,70],[[17,1],[17,3],[17,0]])}if(o=="alt"){T=new fU(null,["Alt"],!0,["Select Source"])}if(o=="qsmode"){T=new eI([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(o=="redge"){T=new hE([7,11],!1,null,!0)}if(o=="setop"){T=new hg}if(o=="patch"){T=new eI(null,[[12,70],[12,71]])}if(o=="prsr"){T=new fU(null,["<img src=\""+PIMG.prsO+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.prsS+"\" class=\"autoscale gsicon\" />"],!0,[[15,9,0],[15,9,1]]);
|
|
T.a([!1,!0])}T.parent=this;this.body.appendChild(T.k);this.MC[o]=T;if(o=="brush")T.B(H.E.O,this.alP,this);
|
|
else if(o=="redge")T.B("click",this.$B,this);else T.B(H.E.O,this.Tl,this)}}ae.prototype=new cZ;ae.prototype.a0H=function($,o){$=$[1];
|
|
var T=this.MC;if($.Md)T.bmode.a(hI.C3.indexOf($.Md.v.BlnM));if($.Opct)T.opacity.a($.Opct.v);if($.flow)T.flow.a($.flow.v);
|
|
if($.Brsh)T.brush.a($,o.n_.Ou,o.n_.A0);if($.FrgC){var s=L.h.Qc($.FrgC.v),E=new x(H.E.Q,!0);E.data={e:H.V.uY,M9:gr.ux,f8:0,H:s.i<<16|s.m<<8|s.P};
|
|
this.J(E)}this.alP();this.Tl()};ae.prototype.a6G=function(){if(D.Wu[this.U]==null)return null;var $=this.MC,o=JSON.parse(JSON.stringify($.brush.v()));
|
|
o.classID=D.Wu[this.U][1][0];if($.bmode)o.Md={t:"enum",v:{BlnM:hI.C3[$.bmode.v()]}};if($.opacity)o.Opct={t:"long",v:$.opacity.v()};
|
|
if($.flow)o.flow={t:"long",v:$.flow.v()};var T=this.GH.z4;T={i:T>>>16,m:T>>>8&255,P:T&255};o.FrgC={t:"Objc",v:L.h.wb(T)};
|
|
return["Brush Preset "+o.Brsh.v.Dmtr.v.val,o]};ae.prototype.$B=function(){var $=new x(H.E.Q,!0);$.data={e:H.V.NC,a_:"redge"};
|
|
this.J($)};ae.prototype.Pj=function(){for(var $ in this.MC)this.MC[$].f()};ae.prototype.HP=function($){if($.acn=="showBrushOpts"){this.MC.brush.uF($.ma.x,$.ma.y)}for(var o in $.X7){var T=$.X7[o];
|
|
if(o!="qsmode")T*=100;if(this.MC[o])this.MC[o].a(T)}};ae.prototype.YE=function($,o){cZ.prototype.YE.call(this,$,o);
|
|
this.GH=$;var T=this.MC.brush;if(T==null)return;if(o==gr.zo||o==gr.m8)T.bq($.n_);if(o==gr.b$){T.a($.n_.J_,$.n_.Ou,$.n_.A0)}};
|
|
ae.prototype.alP=function(){var $=new x(H.E.Q,!0);$.data={e:H.V.uY,M9:gr.b$,On:this.MC.brush.v()};this.J($)};
|
|
ae.prototype.Tl=function(){var $=new x(H.E.Q,!0);$.data={e:H.V.em,U:this.U};for(var o in this.MC){if(o=="brush"||o=="redge")continue;
|
|
var T=this.MC[o].v();if(["opacity","flow","smth","strn","expo"].indexOf(o)!=-1)$.data[o]=T/100;else if(o=="bmode")$.data.bmode=hI.zk[T];
|
|
else if(o=="bmode0")$.data.bmode=hI.zk[23+T];else $.data[o]=T}this.J($)};function hW($,o){cZ.call(this);
|
|
if($)return;this.MC={};for(var f=0;f<o.length;f++){var T=o[f],s=null;if(T=="op")s=new hg;if(T=="feat"){s=new ac([7,6],0,100,"px");
|
|
s.a(0)}if(T=="redge")s=new hE([7,11],!1,null,!0);if(T=="wconf")s=new gR;if(T=="cstr")s=new dy;if(T=="anta"){s=new ad("Anti-alias");
|
|
s.a(!0)}if(T=="redge")s.B("click",this.$B,this);else s.B(H.E.O,this.Tl,this);s.parent=this;this.body.appendChild(s.k);
|
|
this.MC[T]=s}}hW.prototype=new cZ;hW.prototype.HP=function($){if($.LE!=null)this.MC.op.a($.LE);else if($.Ne){for(var o in $.Ne)if(this.MC[o])this.MC[o].a($.Ne[o])}else{var T=hW.LF;
|
|
if(T==null){var s=i9.al_(!0);T=hW.LF=new eb(s.items,s.K5)}T.f();T.parent=this;T.update($.ZU,$.mh);var E=new x(H.E.Q,!0);
|
|
E.data={e:H.V.NM,bF:T,x:$.bg.uT+2,y:$.bg.$T+1};this.J(E)}};hW.prototype.Pj=function(){for(var $ in this.MC)this.MC[$].f()};
|
|
hW.prototype.$B=function(){var $=new x(H.E.Q,!0);$.data={e:H.V.NC,a_:"redge"};this.J($)};hW.prototype.Tl=function(){var $=new x(H.E.Q,!0);
|
|
$.data={e:H.V.em,U:this.U,Ne:{}};for(var o in this.MC)$.data.Ne[o]=this.MC[o].v();this.J($)};function eG(){ae.call(this,["brush","strn"])}eG.prototype=new ae;
|
|
function f8(){ae.call(this,"brush bmode opacity flow smth prsr".split(" "))}f8.prototype=new ae;function dr(){ae.call(this,["brush","bmode0","samp","wconf"])}dr.prototype=new ae;
|
|
function iP(){ae.call(this,["brush"])}iP.prototype=new ae;function d8(){ae.call(this,["brush","bmode","opacity","smth","prsr"])}d8.prototype=new ae;
|
|
function hC(){ae.call(this,["brush","rng","expo"])}hC.prototype=new ae;function eH(){ae.call(this,"brush bmode opacity algnd sfrom alt".split(" "))}eH.prototype=new ae;
|
|
function fj($){cZ.call(this);if($==null)return;var o=H.z("span","fitem");this.body.appendChild(o);var T=[[17,0],[17,1],[11,12,0],[17,2]];
|
|
this.Uy=[];for(var f=0;f<T.length;f++){var s=new hE(T[f],!1,null,!0);this.Uy.push(s);s.B("click",this.ah5,this);
|
|
if(!$||f==1)o.appendChild(s.k)}this.tv=new dy;this.tv.B(H.E.O,this.adp,this);if(!$)this.body.appendChild(this.tv.k);
|
|
this.Wf=new ad("Delete Cropped Pixels");this.Wf.B(H.E.O,this.adp,this);if(!$)this.body.appendChild(this.Wf.k);
|
|
this.yz=new bC;this.yz.B("click",this.W9,this)}fj.prototype=new cZ;fj.prototype.Pj=function(){this.yz.f();
|
|
for(var f=0;f<this.Uy.length;f++)this.Uy[f].f();this.tv.f();this.Wf.f()};fj.prototype.HP=function($){var o=this.yz.k;
|
|
if($.uS)this.body.appendChild(o);else if(this.body.contains(o))this.body.removeChild(o);if($.tv)this.tv.a($.tv)};
|
|
fj.prototype.W9=function($){var o={e:H.V.em,U:this.U,PF:this.yz.v()?"commit":"cancel"},T=new x(H.E.Q,!0);
|
|
T.data=o;this.J(T)};fj.prototype.ah5=function($){$.target.k.blur();var o={e:H.V.em,U:this.U,PF:"cropby",a8R:this.Uy.indexOf($.target)},T=new x(H.E.Q,!0);
|
|
T.data=o;this.J(T)};fj.prototype.adp=function($){var o={e:H.V.em,U:this.U,PF:"config",fY:{cA:this.tv.v()}};
|
|
if($.target==this.Wf)o.fY.Mo=this.Wf.v();var T=new x(H.E.Q,!0);T.data=o;this.J(T)};function fE(){fj.call(this,!1)}fE.prototype=new fj;
|
|
function dC(){fj.call(this,!0)}dC.prototype=new fj;function eQ(){ae.call(this,["brush","rng","expo"])}eQ.prototype=new ae;
|
|
function dK(){ae.call(this,"brush emode opacity flow smth prsr".split(" "))}dK.prototype=new ae;function cm(){ae.call(this,["brush","samp","wconf"])}cm.prototype=new ae;
|
|
function hf(){hW.call(this,!1,["op","feat","anta","redge","cstr"])}hf.prototype=new hW(!0);function gV(){cZ.call(this);
|
|
this.uB=new h_([12,20],["1x1","3x3","5x5","11x11","31x31"]);this.uB.B(H.E.O,this.Tl,this);this.body.appendChild(this.uB.k)}gV.prototype=new cZ;
|
|
gV.prototype.Tl=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.em,U:this.U,IC:[1,3,5,11,31][this.uB.v()]};
|
|
this.J(o)};gV.prototype.Pj=function(){this.uB.f()};function iH(){cZ.call(this);this.Y2=new dU(!1);this.Y2.parent=this;
|
|
this.Y2.B(H.E.O,this.tm,this);this.body.appendChild(this.Y2.k);this.Y2.a(JSON.parse(ev.rN.Hr).v);this.Jx=new h_(null,ev.h.names.slice(0,5));
|
|
this.Jx.B(H.E.O,this.tm,this);this.body.appendChild(this.Jx.k);this.H9=new h_([12,19,0],hI.fC,null,hI.xx);
|
|
this.H9.B(H.E.O,this.tm,this);this.body.appendChild(this.H9.k);this.qL=new ac([12,0],0,100,"%");this.qL.parent=this;
|
|
this.qL.B(H.E.O,this.tm,this);this.body.appendChild(this.qL.k);this.qL.a(100);this.LX=new ad([12,23,0]);
|
|
this.LX.B(H.E.O,this.tm,this);this.body.appendChild(this.LX.k);this.xS=new ad("Dither");this.xS.B(H.E.O,this.tm,this);
|
|
this.body.appendChild(this.xS.k)}iH.prototype=new cZ;iH.prototype.Pj=function(){this.Jx.f();this.H9.f();
|
|
this.qL.f();this.LX.f();this.xS.f()};iH.prototype.YE=function($,o){cZ.prototype.YE.call(this,$,o);var T=o==gr.ux;
|
|
this.Y2.zL($.z4,$.GR);if(T||o==gr.HZ||o==gr.zo)this.Y2.bq($.hD)};iH.prototype.tm=function(){var $=new x(H.E.Q,!0);
|
|
$.data={e:H.V.em,U:this.U};$.data.M9={h:this.Y2.v(),h2:ev.h.types[this.Jx.v()],wq:this.LX.Ed(),aoL:this.xS.Ed(),a5Z:hI.zk[this.H9.v()],yV:this.qL.v()/100};
|
|
this.J($)};function ea(){cZ.call(this)}ea.prototype=new cZ;function di(){cZ.call(this);var $=H.z("span","fitem");
|
|
this.body.appendChild($);this.UN=[new ac([12,15],0,0,"\xB0"),new hE("Reset",null,null,!0)];for(var f=0;
|
|
f<this.UN.length;f++){var o=this.UN[f];o.parent=this;$.appendChild(o.k);o.B(f==1?"click":H.E.O,this.W6,this)}}di.prototype=new cZ;
|
|
di.prototype.Pj=function(){for(var f=0;f<this.UN.length;f++)this.UN[f].f()};di.prototype.HP=function($){this.UN[0].a($.a4*180/Math.PI)};
|
|
di.prototype.W6=function($){var o=this.UN.indexOf($.target),T=new x(H.E.Q,!0);T.data={e:H.V.em,U:this.U,a4:o==1?0:$.target.v()*Math.PI/180};
|
|
this.J(T)};function au(){ae.call(this,["brush","algnd","sfrom","alt"])}au.prototype=new ae;function bi(){cZ.call(this);
|
|
this.Jb=new dg;this.Jb.parent=this;this.body.appendChild(this.Jb.Z1.k);this.body.appendChild(this.Jb.ra.k);
|
|
this.body.appendChild(this.Jb.fL.k);var $=H.z("span","fitem");this.body.appendChild($);$.appendChild(this.Jb._g.k);
|
|
$.appendChild(this.Jb.j9.k);$.appendChild(this.Jb.fR.k);this.V6=new h_("Aa",[[22,5,0],"Sharp","Crisp","Strong","Smooth"]);
|
|
this.V6.B(H.E.O,this.W9,this);this.body.appendChild(this.V6.k);this.T2=new hE([11,9],!1,null,!0);this.T2.B("click",this.aa_,this);
|
|
this.body.appendChild(this.T2.k);this.yz=new bC;this.yz.B("click",this.W9,this)}bi.prototype=new cZ;
|
|
bi.prototype.Pj=function(){this.yz.f();this.Jb.f();this.T2.f()};bi.prototype.aa_=function($){var o={e:H.V.em,U:this.U,PF:"showwarp"},T=new x(H.E.Q,!0);
|
|
T.data=o;this.J(T)};bi.prototype.HP=function($){if($.PF=="showactive")this.body.appendChild(this.yz.k);
|
|
if($.PF=="hideactive")this.body.removeChild(this.yz.k);if($.PF=="changeAA")this.V6.a($.mI)};bi.prototype.YE=function($,o){cZ.prototype.YE.call(this,$,o);
|
|
if(o!=gr.zo&&o!=gr.mp&&o!=gr.En&&o!=gr.bV)return;this.Jb.a($.IT,$.vv,$.ki)};bi.prototype.W9=function($){var o={e:H.V.em,U:this.U,PF:this.yz.v()?"commit":"cancel"};
|
|
if($.target==this.V6){o.PF="changeAA";o.mI=this.V6.v()}var T=new x(H.E.Q,!0);T.data=o;this.J(T)};function gM(){hW.call(this,!1,["op","feat","anta","redge"])}gM.prototype=new hW(!0);
|
|
function ik(){cZ.call(this);var $=[],T="<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.My=new ad([12,85]);this.My.B(H.E.O,this.Tl,this);$.push(this.My.k);this.pd=new ad([20,1]);this.pd.B(H.E.O,this.Tl,this);
|
|
$.push(this.pd.k);this.HM=new ad([12,83]);this.HM.B(H.E.O,this.Tl,this);$.push(this.HM.k);var o=H.z("span","fitem");
|
|
$.push(o);this.afC=new h_("Scale for exported files",["1x","2x","3x","4x"],!0);o.appendChild(this.afC.k);
|
|
this.KU=new hE(T+" PNG",!1,"Save selected layers as PNG",!0);o.appendChild(this.KU.k);this.KU.B("click",this.R2,this);
|
|
this.ai6=new hE(T+" SVG",!1,"Save selected layers as SVG",!0);o.appendChild(this.ai6.k);this.ai6.B("click",this.R2,this);
|
|
var s=H.z("span","fitem");$.push(s);var E=H.z("span","fitem");$.push(E);this.PE=[];for(var f=0;f<8;f++){var e=f==3||f==7?[20,4,6]:[20,4,f<3?f:f-1],n=new hE("Hi",!1,e);
|
|
(f<4?s:E).appendChild(n.k);n.B("click",this.R2,this);this.PE.push(n)}for(var f=0;f<$.length;f++)this.body.appendChild($[f]);
|
|
this.ab1=$}ik.prototype=new cZ;ik.prototype.HP=function($){var o=$.Ne,T=$.aaa;this.My.a(o.h8);this.pd.a(o.Ff);
|
|
this.HM.a(o.Z_);if(T){H.Ft(this.body);for(var f=0;f<T.length;f++)if(T[f]==1&&this.ab1[f])this.body.appendChild(this.ab1[f])}};
|
|
ik.prototype.R2=function($){var o=this.PE.indexOf($.target),T;if(o==-1){T=new x(H.E.Q,!0);T.data={e:H.V.em,U:this.U,f8:$.target==this.KU?"getPNG":"getSVG",sQ:this.afC.v()+1}}else{T=new x(H.E.N,!0);
|
|
T.U=D.ih;T.data={e:"algn",H:o}}this.J(T)};ik.prototype.Tl=function($){var o=new x(H.E.Q,!0);o.data={e:H.V.em,U:this.U,f8:"prms",h8:this.My.Ed(),Ff:this.pd.Ed(),Z_:this.HM.Ed()};
|
|
this.J(o)};ik.prototype.Pj=function(){this.My.f();this.pd.f();this.HM.f();var $="h0 h1 h2 hG v0 v1 v2 vG".split(" ");
|
|
for(var f=0;f<8;f++){this.PE[f].yl(H.oQ("align/"+$[f],null,"autoscale"))}};function bU(){hW.call(this,!1,["op","feat","redge","wconf"])}bU.prototype=new hW(!0);
|
|
function aW(){ae.call(this,["setop","patch"])}aW.prototype=new ae;function e7(){ae.call(this,["setop"])}e7.prototype=new ae;
|
|
function fw(){ae.call(this,["bmode","opacity","wconf"])}fw.prototype=new ae;function eM(){hW.call(this,!1,["op","feat","anta","redge"])}eM.prototype=new hW(!0);
|
|
function dk(){hW.call(this,!1,["op","feat","anta","redge"])}dk.prototype=new hW(!0);function ft(){hW.call(this,!1,["op","feat","redge","cstr"])}ft.prototype=new hW(!0);
|
|
function g_(){cZ.call(this);this.GH=null;this.hw=null;this.lE=[new d_("X",null,3),new d_("Y",null,3),new d_("W",null,3),new d_("H",null,3),new d_([12,15],null,4),new d_(["VAR0 1",[12,80,0]],null,4),new d_(["VAR0 2",[12,80,0]],null,4),new hE([15,7,6],!1,null,!0),new hE([2,2],!1,null,!0)];
|
|
for(var f=0;f<this.lE.length;f++){var $=this.lE[f];this.body.appendChild($.k);if(f>6)$.B("click",this.anN,this)}this.bu=0}g_.prototype=new cZ;
|
|
g_.prototype.anN=function($){var o=this.lE.indexOf($.target)==7,T=new x(H.E.N,!0);if(o){if(this.bu==0)return;
|
|
T.U=D.tj;T.data={e:"rot",U1:[2,5],H:-this.bu}}else{T.U=D.hp}this.J(T)};g_.prototype.HP=function($){function o(u,Y,b){var a=Math.sqrt(Math.pow(Y.x-u.x,2)+Math.pow(Y.y-u.y,2)),w=Math.sqrt(Math.pow(Y.x-b.x,2)+Math.pow(Y.y-b.y,2)),X=Math.sqrt(Math.pow(b.x-u.x,2)+Math.pow(b.y-u.y,2));
|
|
return Math.acos((w*w+a*a-X*X)/(2*w*a))}if($==null)return;this.hw=$;var T=$.abF,s=$.e$,E=s.x-T.x,e=s.y-T.y;
|
|
this.bu=-Math.atan2(e,E);if($.bk)this.bu=o(s,T,$.bk);var n=this.lE;n[0].a(T.x);n[1].a(T.y);n[2].a(E);
|
|
n[3].a(e);n[4].a((this.bu*180/Math.PI).toFixed(2));var A=L.BG.at(aY.Sa(T,s),$.fG,this.GH,$.aej,!1);n[5].a(parseFloat(A).toFixed(2));
|
|
if($.bk){var A=L.BG.at(aY.Sa(T,$.bk),$.fG,this.GH,$.aej,!1);n[6].a(parseFloat(A).toFixed(2))}else n[6].a("")};
|
|
g_.prototype.YE=function($,o){this.GH=$;this.HP(this.hw)};g_.prototype.Pj=function(){var $=this.lE;for(var f=0;
|
|
f<$.length;f++)$[f].f();H.Ec($[2],$[3])};function hS(){ae.call(this,["brush","strn","pdetail"])}hS.prototype=new ae;
|
|
function ee(){ae.call(this,["brush","sfrom"]);this.aox=[];var $=[[7,12]];for(var f=0;f<$.length;f++){var o=new hE($[f],!1,null,!0);
|
|
this.aox.push(o);o.parent=this;this.body.appendChild(o.k);o.B("click",this.a8U,this)}}ee.prototype=new ae;
|
|
ee.prototype.a8U=function($){var o=this.aox.indexOf($.currentTarget),T=new x(H.E.b0,!0);T.data=D.x5.V0("contentAware");
|
|
this.J(T)};function bH(){ae.call(this,["brush","strn"])}bH.prototype=new ae;function h2(){ae.call(this,["brush","flow","smode"])}h2.prototype=new ae;
|
|
function dB(){cZ.call(this);this.lY=!1;var $=H.z("span","fitem");this.body.appendChild($);this.tx=new eI(null,["<img src=\""+PIMG.zoomIn+"\" class=\"autoscale gsicon\" />","<img src=\""+PIMG.zoomOut+"\" class=\"autoscale gsicon\" />"]);
|
|
$.appendChild(this.tx.k);this.tx.B(H.E.O,this.Tl,this);this.y3=new hE([20,2]);this.body.appendChild(this.y3.k);
|
|
this.y3.B("click",this.aou,this);this.N5=new hE([20,3]);this.body.appendChild(this.N5.k);this.N5.B("click",this.aou,this)}dB.prototype=new cZ;
|
|
dB.prototype.Pj=function(){this.y3.f();this.N5.f()};dB.prototype.Tl=function(){var $={e:H.V.em,U:this.U,Dt:this.tx.v()==0},o=new x(H.E.Q,!0);
|
|
o.data=$;this.J(o)};dB.prototype.HP=function($){if(this.lY!=$.lY)this.tx.a(1-this.tx.v());this.lY=$.lY};
|
|
dB.prototype.aou=function($){var o=new x(H.E.N,!0);o.U=D.S3;o.data={e:"adapt",H:$.target==this.y3?"pixel":"fitscr"};
|
|
this.J(o)};function ed($,o){cZ.call(this);if($==null)return;this.V1=$;this.hZ={};for(var f=0;f<$.length;
|
|
f++){var T=$[f],s=null;if(T=="tmode"){s=new h_(null,[[12,76,1],[12,76,0],[12,76,2]]);s.a(0);if(o)s.a2x(2)}if(T=="make"){s=new hE("Make Selection",null,null,!0)}if(T=="anta"){s=new ad("Anti-alias");
|
|
s.a(!0)}if(T=="binop"){s=new h_(null,[[18,1],[18,2],[18,3],[18,4]])}if(T=="pshape")s=new h_(null,[[12,93,0],[12,93,1],"Arrow",[12,93,2]]);
|
|
if(T=="shape")s=new eF([12,76,1]);if(T=="crad"){s=new ac([12,94,0],0,50,"px");s.a(0)}if(T=="cstr"){s=new dy}if(T=="irad"){s=new ac([12,94,1],0,100,"%");
|
|
s.a(40)}if(T=="length"){s=new ac([12,80,0],4,40);s.a(4)}if(T=="sides"){s=new ac([12,78],3,30);s.a(5)}if(T=="width"){s=new ac([12,41],1,100,"px");
|
|
s.a(5)}if(T=="tsiz"){s=new ac("Tip Size",100,500,"%");s.a(300)}if(T=="tolr"){s=new ac([12,24],0,100);
|
|
s.a(5)}if(T=="fstyle"){s=new eu([12,26])}if(T=="sstyle"){s=new bB}if(T=="psnap"){s=new ad([8,10])}if(T=="crnr"){s=new hE("\u2312",!1,[12,94,0],!0)}s.parent=this;
|
|
this.body.appendChild(s.k);this.hZ[T]=s;s.B(T=="crnr"||T=="make"?"click":H.E.O,this.Tl,this)}if(this.hZ.tmode)this.Xp()}ed.prototype=new cZ;
|
|
ed.prototype.HP=function($){if($.f8=="vals")for(var o in $.a62)this.hZ[o].a($.a62[o]);else{var T=ed.LF;
|
|
if(T==null)T=ed.LF=new eb([{name:"Make Selection"}],[{F:H.E.Q,r:{e:H.V.NC,a_:"makesel"}}]);T.parent=this;
|
|
T.update($.ZU,$.mh);var s=new x(H.E.Q,!0);s.data={e:H.V.NM,bF:T,x:$.bg.uT+2,y:$.bg.$T+1};this.J(s)}};
|
|
ed.prototype.a4z=function(f){return null};ed.prototype.Pj=function(){for(var $ in this.hZ){this.hZ[$].f()}};
|
|
ed.prototype.Tl=function($){var o=new x(H.E.Q,!0),T=this.hZ;if($.target==T.crnr){o=new x(H.E.N,!0);o.U=D.Yp;
|
|
o.data={e:"crnr"}}else if($.target==T.make){o.data={e:H.V.NC,a_:"makesel"}}else if($.target==T.fstyle){o.data={e:H.V.uY,M9:gr.kD,H:T.fstyle.v()}}else if($.target==T.sstyle){o.data={e:H.V.uY,M9:gr.Gu,H:T.sstyle.v()}}else{if(T.tmode)this.Xp();
|
|
o.data={e:H.V.em,U:this.U};for(var s in T)o.data[s]=T[s].v()}this.J(o)};ed.prototype.Xp=function(){var $=this.hZ,o=$.tmode.v(),T=$.pshape?this.a4z($.pshape.v()):this.V1,s;
|
|
if(o==0)s=["anta","make","binop"];if(o==1)s=["anta","fstyle","sstyle"];if(o==2)s=["make","binop","fstyle","sstyle"];
|
|
H.Ft(this.body);for(var f=0;f<T.length;f++){var E=T[f];if(s.indexOf(E)!=-1)continue;this.body.appendChild($[E].k)}};
|
|
ed.prototype.YE=function($,o){cZ.prototype.YE.call(this,$,o);var T=this.hZ.fstyle,s=this.hZ.sstyle;if(T)T.YE($,o);
|
|
if(s)s.YE($,o);if(o==gr.zo||o==gr.ww)if($.vx.length!=0&&this.hZ.shape){this.hZ.shape.bq($.vx)}if(o==gr.zo||o==gr.kD)if(T)T.a(null,$.Av,$.ahs);
|
|
if(o==gr.zo||o==gr.Gu)if(s)s.a(null,$.MD,$.anD)};function iy(){ed.call(this,["tmode","make","fstyle","sstyle","binop"],!0)}iy.prototype=new ed;
|
|
function hi(){ed.call(this,"tmode anta fstyle sstyle binop tolr".split(" "))}hi.prototype=new ed;function fM(){ed.call(this,["fstyle","sstyle"]);
|
|
this.akE=null;this.afG=null;this.apW=null;this.zb=new h_("Path",[[18,1],[18,2],[18,3],[18,4],[18,5]],!1,[4]);
|
|
this.MY=new hE("\u25BC");this.MY.UM();this.fK=new hE("\u25B2");this.fK.UM();this.gq=[this.zb,this.MY,this.fK];
|
|
for(var f=0;f<this.gq.length;f++){var $=this.gq[f];this.body.appendChild($.k);$.parent=this;$.B(f==0?H.E.O:"click",this.Qr,this)}}fM.prototype=new ed;
|
|
fM.prototype.HP=function($){if($.PF=="main"){var o=this.gq,T=$.xb;if(T&&T.D.length==1){this.afG=T.clone();
|
|
this.apW=JSON.stringify($.qy);var s=T.D[0],E=L.A.MM(T.g);this.zb.wI();if(s>0)this.MY.wI();else this.MY.v9();
|
|
if(s<E-1)this.fK.wI();else this.fK.v9();var e=L.A.kE(T.g,s),n=T.g[e];this.zb.yl("Path "+(s+1));this.zb.a([3,0,1,2][n.m6])}else{for(var f=0;
|
|
f<o.length;f++)o[f].v9()}}else ed.prototype.HP.call(this,$)};fM.prototype.Pj=function(){ed.prototype.Pj.call(this);
|
|
this.zb.f()};fM.prototype.Qr=function($){if($.target==this.zb||$.target==this.MY||$.target==this.fK){var o={},T=this.afG,s=T.g,E=JSON.parse(this.apW),e=T.D[0],n=L.A.kE(s,e),A=s[n];
|
|
if($.target==this.zb){var u=this.zb.v();if(u<4)A.m6=[1,2,3,0][u];else{if(L.A.MM(s)<=1)return;T.g=L.A.Dh(s);
|
|
T.D=T.g.length==2?[]:[0];T.Rc=[];E=[L.qy.Ke()]}}else{var Y=$.target==this.MY?-1:1,b=Math.min(e,e+Y),a=Math.max(e,e+Y),w=L.A.kE(s,b),X=L.A.kE(s,a);
|
|
if(w==-1||X==-1)return;var N=X+L.A.Mx(s,a),z=E[b];E[b]=E[a];E[a]=z;var i=s.slice(0,w),k=s.slice(w,X),Q=s.slice(X,N),O=s.slice(N);
|
|
T.g=i.concat(Q.concat(k.concat(O)));T.D[0]+=Y}o.xb=T;o.qy=E;var c=new x(H.E.Q,!0);c.data={e:H.V.em,U:this.U,n4:o};
|
|
this.J(c)}};function g$(){ed.call(this,["fstyle","sstyle","crnr","psnap"])}g$.prototype=new ed;function aA(){ed.call(this,"tmode anta fstyle sstyle binop cstr crad".split(" "))}aA.prototype=new ed;
|
|
function hy(){ed.call(this,"tmode anta fstyle sstyle binop cstr".split(" "))}hy.prototype=new ed;function cq(){ed.call(this,"tmode anta fstyle sstyle binop pshape sides irad crad width tsiz length".split(" "))}cq.prototype=new ed;
|
|
cq.prototype.a4z=function(f){var $=[["sides","crad"],["sides","irad","crad"],["width","tsiz"],["length"]];
|
|
return["tmode","fstyle","sstyle","binop","pshape"].concat($[f])};function dw(){ed.call(this,"tmode anta fstyle sstyle binop width".split(" "))}dw.prototype=new ed;
|
|
function aB(){ed.call(this,"tmode anta fstyle sstyle binop cstr shape".split(" "))}aB.prototype=new ed;
|
|
function b0(){hW.call(this,!1,["op","feat","redge"])}b0.prototype=new hW(!0);function aa(){ae.call(this,["brush","qsmode","redge"])}aa.prototype=new ae;
|
|
function is(){cZ.call(this);var $=new hE("Slices From Guides",null,null,!0);$.B("click",this.Qr,this);
|
|
this.body.appendChild($.k)}is.prototype=new cZ;is.prototype.Qr=function($){var o=new x(H.E.b0,!0);o.data={Wk:"make",bI:{__name:"Make",classID:"Mk",null:{t:"obj ",v:[{t:"Clss",v:{classID:"slice"}}]},Usng:{t:"type",v:{classID:"Gd"}}}};
|
|
this.J(o)};function bj(){cZ.call(this);var $=this.ali=[new hE("\u25BC",null,null,!0),new hE("\u25B2",null,null,!0),new hE([5,4],null,null,!0)];
|
|
for(var f=0;f<3;f++){var o=$[f];this.body.appendChild(o.k);o.B("click",this.Qr,this)}}bj.prototype=new cZ;
|
|
bj.prototype.Qr=function($){var o=this.ali.indexOf($.target),T=new x(H.E.N,!0);T.U=D.zH;T.data={e:o==2?"delete":"reorder",dir:o==0?-1:1};
|
|
this.J(T)};bj.prototype.f=function(){cZ.prototype.f.call(this);for(var f=0;f<3;f++)this.ali[f].f()};
|
|
function fN($,o){cZ.call(this);if(window.Typr==null||$)return;this.amx=o;this.X_=null;this.anZ=H.z("span","");
|
|
this.a8s=H.z("span","");var T=1;this.sj={wh:new c2(null,24),cL:new ac("X",0,0,"px",0,!1,!0,4),xJ:new ac("Y",0,0,"px",0,!1,!0,4),ST:new ac("W",0,0,["%","px"],2,!1,!0,5),as:new hE("\u2261",null,[12,51],null),PX:new ac("H",0,0,["%","px"],2,!1,!0,5),a1C:new ac("\u2221",0,0,"\xB0",T,!1,!0),ame:new ac("\u25B1 H",-85,85,"\xB0",T,!1,!0),a6b:new ac("\u25B1 V",-85,85,"\xB0",T,!1,!0),qW:new h_(null,[[12,14,2],[12,14,3],"Bicubic Sharper"])};
|
|
this.sj.qW.a(1);for(var s in this.sj){var E=this.sj[s];if(o&&(E==this.sj.a1C||E==this.sj.ame||E==this.sj.a6b||E==this.sj.qW)){}else this.anZ.appendChild(E.k);
|
|
var e=E==this.sj.as?"click":H.E.O;E.B(e,this.aiJ,this)}this.Ee=new c1(!0,!0,!0);this.Ee.B(H.E.O,this.acG,this);
|
|
this.Ee.parent=this;var n=this.a8s,A=this.Ee;n.appendChild(A.cm.k);n.appendChild(A.RL.k);n.appendChild(A.L9.k);
|
|
n.appendChild(A.Ma.k);n.appendChild(A.Hd.k);this.T2=new hE([11,9]);this.T2.B("click",this.ana,this);
|
|
this.yz=new bC;this.yz.B("click",this.W9,this)}fN.prototype=new cZ;fN.prototype.HP=function($){if($.bg){var o=fN,T=this.LF;
|
|
if(T==null)T=this.LF=new eb(o.a40(),o.a34(this.U));T.f();T.parent=this;T.update($.ZU,$.mh);var s=new x(H.E.Q,!0);
|
|
s.data={e:H.V.NM,bF:T,x:$.bg.uT+2,y:$.bg.$T+1};this.J(s);return}H.Ft(this.body);this.X_=$;if($.sj){var E=$.sj.uL,e=$.sj.Ak.clone(),n=Math.atan2(-e.P,e.Ca),A=new fY;
|
|
A.rotate(-n);e.concat(A);var u=this.sj;u.wh.a($.sj.hu);u.cL.a($.sj.wS.x);u.xJ.a($.sj.wS.y);u.ST.a(e.Ca*(u.ST.g9()=="%"?100:E.d));
|
|
u.PX.a(e.Um*(u.PX.g9()=="%"?100:E.w));u.a1C.a(-n*180/Math.PI);u.ame.a(0*180/Math.PI);u.a6b.a(Math.atan(e.Z9)*180/Math.PI);
|
|
this.body.appendChild(this.anZ);this.T2.Xc()}if($.O5){this.Ee.a($.O5);this.body.appendChild(this.a8s);
|
|
this.T2.UM()}this.body.appendChild(this.yz.k);if($.a5m&&!this.amx)this.body.appendChild(this.T2.k)};
|
|
fN.prototype.aiJ=function($){var o=this.sj,T=this.X_.sj.uL;if($.target==o.as)o.as.a(!o.as.v());if(o.as.Ed()){var s=o.PX,E=o.ST,e=T.w,n=T.d;
|
|
if($.target==o.ST){s=o.ST;E=o.PX;e=T.d;n=T.w}var A=s.v()/(s.g9()=="%"?100:e);A*=E.g9()=="%"?100:n;E.a(A)}var u=[];
|
|
for(var Y in o)if(o[Y]!=o.as&&o[Y]!=o.wh){var A=o[Y].v();if((o[Y]==o.ST||o[Y]==o.PX)&&A==0){A=.1;o[Y].a(A)}if(o[Y]==o.ST&&o[Y].g9()=="px")A/=T.d/100;
|
|
if(o[Y]==o.PX&&o[Y].g9()=="px")A/=T.w/100;u.push(A)}var b=new aY(u[0],u[1]);if($.target==o.wh){this.EW({PF:"ctyp",hu:o.wh.v()})}else if($.target==o.cL||$.target==o.xJ){this.EW({PF:"cen",wS:b})}else{var a=this.X_.sj.Ak.clone(),w=a.clone(),X=Math.atan2(-a.P,a.Ca);
|
|
w.translate(-b.x,-b.y);w.rotate(-X);var N=new fY(w.Ca,w.P,w.Z9,w.Um,0,0);N.lY();w.concat(N);w.concat(new fY(u[2]/100,Math.tan(u[5]*Math.PI/180),Math.tan(u[6]*Math.PI/180),u[3]/100,0,0));
|
|
w.rotate(-u[4]*Math.PI/180);w.translate(b.x,b.y);this.X_.sj.Ak=w;this.EW({PF:"trn",sj:w,nH:this.sj.qW.v()})}};
|
|
fN.prototype.acG=function($){this.EW({PF:"wrp",O5:this.Ee.v()})};fN.prototype.ana=function($){this.EW({PF:"switchWarp"})};
|
|
fN.prototype.W9=function($){this.EW({PF:this.yz.v()?"commit":"cancel"})};fN.prototype.EW=function($){$.e=H.V.em;
|
|
$.U=this.U;var o=new x(H.E.Q,!0);o.data=$;this.J(o)};fN.prototype.Pj=function(){var $=this.sj;for(var o in $)$[o].f();
|
|
H.Ec($.ST,$.PX);this.yz.f();this.Ee.f();this.T2.f()};fN.a40=function(){return[{name:[5,9],ep:"Shift+Alt+Ctrl + T",iR:!0},{name:[12,38]},{name:[2,5]},{name:[24,4]},{name:[2,9]},{name:[11,9],b:function($){if($==null||$.D.length!=1)return{b:!1};
|
|
var o=$.u[$.D[0]];return{b:o.add.TySh==null&&!o.p3()}},iR:!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]]}]};
|
|
fN.a34=function($){if($==null)$=D.tj;return[{F:H.E.N,U:$,r:{e:"again"}},{F:H.E.Q,r:{e:H.V.s9,U:$,Ne:{Rz:3}}},{F:H.E.Q,r:{e:H.V.s9,U:$,Ne:{Rz:4}}},{F:H.E.Q,r:{e:H.V.s9,U:$,Ne:{Rz:2}}},{F:H.E.Q,r:{e:H.V.s9,U:$,Ne:{Rz:1}}},{F:H.E.Q,r:{e:H.V.s9,U:$,Ne:{Rz:-1}}},{F:H.E.N,U:$,r:{e:"rot",U1:[2,5],H:-Math.PI/2}},{F:H.E.N,U:$,r:{e:"rot",U1:[2,5],H:-3*Math.PI/2}},{F:H.E.N,U:$,r:{e:"rot",U1:[2,5],H:Math.PI}},{F:H.E.N,U:$,r:{e:"scl",U1:[[2,6],[22,4,2]],H:new aY(-1,1)}},{F:H.E.N,U:$,r:{e:"scl",U1:[[2,6],[22,4,3]],H:new aY(1,-1)}}]};
|
|
function be(){fN.call(this)}be.prototype=new fN(!0);function i2(){fN.call(this)}i2.prototype=new fN(!0);
|
|
function cL(){fN.call(this,!1,!0)}cL.prototype=new fN(!0);function b9(){cZ.call(this);var $=this.V1=[new h_([12,36],["Rigid",[15,10,0],[24,4]]),new h_([12,74],[[19,8,0],[19,8,1],[19,8,2]]),new ac([7,4],0,100,"px"),new ad("Show Mesh"),new hE("\u25BC",null,null,!0),new hE("\u25B2",null,null,!0)];
|
|
for(var f=0;f<$.length;f++){var o=$[f];o.parent=this;this.body.appendChild(o.k);o.B(f<4?H.E.O:"click",this.a8V,this)}this.yz=new bC;
|
|
this.yz.B("click",this.W9,this);this.body.appendChild(this.yz.k)}b9.prototype=new cZ;b9.prototype.Pj=function(){var $=this.V1;
|
|
for(var f=0;f<4;f++)$[f].f();this.yz.f()};b9.prototype.HP=function($){var $=$.M9;for(var f=0;f<4;f++)this.V1[f].a($[f])};
|
|
b9.prototype.a8V=function($){var o=[];for(var f=0;f<4;f++)o[f]=this.V1[f].v();var T=this.V1.indexOf($.target);
|
|
if(T<4)this.EW({PF:"prm",M9:o});else this.EW({PF:"moveDepth",a1A:T==5})};b9.prototype.W9=function($){this.EW({PF:this.yz.v()?"commit":"cancel"})};
|
|
b9.prototype.EW=function($){$.e=H.V.em;$.U=this.U;var o=new x(H.E.Q,!0);o.data=$;this.J(o)};function fJ(){aI.call(this);
|
|
this.k=H.z("div","cmanager");window.alert=function(s,E){this.akZ(s,E);console.log("Alert: "+s)}.bind(this);
|
|
window.onblur=function(s){var E=this;E.st()}.bind(this);this.N0=0;this.cQ=0;this.pS=[];this.uJ={};this.Xa=H.z("div","alertcont");
|
|
this.k.appendChild(this.Xa);this.a6M=H.z("div","alertcont");this.k.appendChild(this.a6M);this.uG=H.z("div","alertcont");
|
|
this.a17=0;this.cF=-1;this.abW=null;this.bn=null;var $=this.a15=H.z("div","alertpanel");$.setAttribute("style","padding:0.7em 1em 0.1em 1em;");
|
|
this.uG.appendChild($);var o=this.bz=H.z("input");o.setAttribute("type","text");o.setAttribute("style","background-color:white; color:black; font-size:1.2em; width:100%; margin:0;");
|
|
o.addEventListener("input",this.aha.bind(this),!1);o.addEventListener("keydown",this.aiy.bind(this),!1);
|
|
$.appendChild(o);var T=this.ags=H.z("div","contextpanel scrollable");T.setAttribute("style","text-align:left; box-shadow:none; margin:0.5em 0 1em 0;color:#888;");
|
|
T.addEventListener("click",this.akA.bind(this),!1);$.appendChild(T);H.uE(document.body,this.a9B.bind(this))}fJ.prototype=new aI;
|
|
fJ.prototype.uQ=function(){if(H.ni(this.uG))this.k.removeChild(this.uG)};fJ.prototype.aa$=function($,o){var T=this.abW=[];
|
|
for(var f=0;f<i9.data.length;f++){var s=i9.data[f],E=[aX.get(s.name)],e=[f];fJ.amC(s.items,E,e,T,$,o)}var n=e3.q;
|
|
for(var f=0;f<n.length;f+=3){T.push([["Tools",aX.get(n[f])],[-1,n[f+2]]])}this.k.appendChild(this.uG);
|
|
var A=this.bz;A.focus();A.select();this.iB()};fJ.prototype.aha=function($){this.cF=-1;this.iB()};fJ.prototype.iB=function(){var $=this.bz.value.toLowerCase().trim().replace(/ +/g," "),o=this.abW,T=[],s=[],E=$.split(" ");
|
|
if($!="")for(var f=0;f<o.length;f++){var e=o[f][0],n=[],A=0;for(var u=0;u<e.length;u++)n[u]=-1;for(var Y=0;
|
|
Y<E.length;Y++)for(var u=0;u<e.length;u++){var b=e[u].toLowerCase().indexOf(E[Y]);if(b!=-1){n[u]=[b,b+E[Y].length];
|
|
A++;break}}if(A==E.length){T.push(o[f]);s.push(n)}}var a=[],w=this.ags;H.Ft(w);for(var f=0;f<T.length;
|
|
f++){var X=T[f][0],b=s[f],N="enab",i="";if(f==this.cF)N+=" active";var z=H.z("div",N);a.push(z);w.appendChild(z);
|
|
for(var u=0;u<X.length;u++){var k=b[u],Q=E[u],O=X[u];if(k!=-1)O=O.slice(0,k[0])+"<span style=\"color:black\">"+O.slice(k[0],k[1])+"</span>"+O.slice(k[1]);
|
|
i+=O;if(u<X.length-1)i+=" \uFE65 "}z.innerHTML=i}this.bn=[T,a]};fJ.prototype.aiy=function($){var o=dN.AL,T=$.code;
|
|
if(o(T,dN.R5))this.uQ();var s=o(T,dN.du),E=o(T,dN.ZQ),e=o(T,dN.FT);if(s||E){this.cF=Math.max(0,Math.min(this.bn[0].length-1,this.cF+(s?-1:1)));
|
|
this.iB()}if(e&&this.cF!=-1)this.ab0(this.cF)};fJ.amC=function($,o,T,s,E,e){for(var f=0;f<$.length;f++){var n=$[f],A=o.slice(0),u=T.slice(0),Y=aX.get(n.name);
|
|
if(n.b){var b=n.b(E,e,f);if(b.IH)Y=b.IH;if(b.b==!1)continue}A.push(Y);u.push(f);if(n.sub)fJ.amC(n.sub,A,u,s,E,e);
|
|
else s.push([A,u])}};fJ.prototype.akA=function($){var o=$.target;if(o.tagName.toLowerCase()=="span")o=o.parentNode;
|
|
var T=this.bn[1].indexOf(o);if(T!=-1)this.ab0(T)};fJ.prototype.ab0=function($){var o=this.bn[0][$][1];
|
|
if(o[0]==-1){var T=new x(H.E.Q,!0);T.data={e:H.V.s9,U:o[1]};this.J(T)}else{var s=i9.data[o[0]].K5[o[1]];
|
|
for(var f=2;f<o.length;f++)s=s.sub[o[f]];var E=new x(s.F,!0);E.U=s.U;E.data=s.r;this.J(E)}this.uQ()};
|
|
fJ.prototype.RE=function($,o){this.N0=$;this.cQ=o;this.ags.style["max-height"]=o-120+"px"};fJ.prototype.ajD=function($){var o=H.z("div","alertpanel");
|
|
o.textContent=aX.get($);this.Xa.appendChild(o);this.uJ[JSON.stringify($)]=o};fJ.prototype.adf=function($){var o=this.uJ[JSON.stringify($)];
|
|
this.Xa.removeChild(o);delete this.uJ[JSON.stringify($)]};fJ.prototype.akZ=function($,o){var T=this.a6M;
|
|
for(var f=0;f<T.children.length;f++)if(T.children[f].textContent==$)return;var s=H.z("div","alertpanel tpanel");
|
|
s.textContent=$;s.setAttribute("style","opacity:0.5; transform:scale(0.9)\t");T.appendChild(s);if(o==null)o=1500;
|
|
var E=o,e=Math.max(Date.now()+E,this.a17+E);setTimeout(function(){s.setAttribute("style","transform:scale(1); opacity:1;")},10);
|
|
setTimeout(function(){T.setAttribute("style","margin-top: -3.6em; transform: translateY(3.6em);")},e-Date.now()-30);
|
|
setTimeout(function(){T.removeChild(T.firstChild);T.setAttribute("style","transition: transform 0.7s; margin-top: 1em; transform: translateY(0em);")},e-Date.now());
|
|
this.a17=e};fJ.prototype.a9B=function($){var o=this.pS;for(var f=o.length-1;f>=0;f--){var T=o[f],s=$.target;
|
|
while(s!=null){if(s==T.k){this.st(T);return}s=s.parentNode}}this.st();var E=$.target;while(E!=this.uG&&E!=document.body)E=E.parentNode;
|
|
if(E!=this.uG)this.uQ()};fJ.prototype.st=function($){var o=this.pS;for(var f=0;f<o.length;f++){if($&&$.a4s(o[f]))continue;
|
|
var T=o[f].k;T.style.height="auto";H.oX(T,"scrollable");this.k.removeChild(T);o.splice(f,1);f--}};fJ.prototype.aan=function($){this.st($.bF);
|
|
var o=$.bF,T=o.k;if(this.pS.indexOf(o)!=-1)return;this.pS.push(o);this.k.appendChild(o.k);var s=this.N0,E=this.cQ,e=$.x,n=$.y,A=this.k.getBoundingClientRect(),u=o instanceof eb,Y=-1,b=E-2;
|
|
if(u||$.cs){var a=o.d0(),w=o.Lk();if(u)a=Math.min(a,200);var X=s-a-2,N=E-w-2;if(n<N)Y=2;else if(e<X)Y=1;
|
|
else if(0<n-w-2)Y=0;else Y=3;if($.a93)Y=0;if($.a6_)Y=2;if(Y==2){e=Math.min(e,X)}else if(Y==1){n=Math.min(n,N)}else if(Y==0){n=n-w-2;
|
|
e=Math.min(e,X);b=$.y}else if(Y==3){e=e-a-2;n=Math.min(n,N)}}n=Math.max(2,n);var top=Math.round(n-A.y+this.k.offsetTop);
|
|
T.style.position="absolute";T.style["z-index"]=10;if(n+o.Lk()>b){T.style.height=b-n+"px";H.v2(T,"scrollable");
|
|
if(Y==3)e-=10}T.style.left=Math.round(e)+"px";T.style.top=top+"px"};fJ.prototype.a8I=function($){var o=$.bF,T=this.pS.indexOf(o);
|
|
if(T==-1)return;this.pS.splice(T,1);var s=o.k;this.k.removeChild(o.k)};fJ.prototype.Y$=function(){var $=this.pS;
|
|
return $.length==0?null:$[$.length-1]};fJ.prototype.a8$=function(){this.a8I({bF:this.Y$()})};function c9(){aI.call(this);
|
|
this.k=H.z("div","confbar")}c9.prototype=new aI;c9.prototype.a3h=function($){$.parent=this;H.Ft(this.k);
|
|
this.k.appendChild($.k)};function fV($){aI.call(this);fV.DM=$;this.GH=null;this.GJ=H.z("input","");this.GJ.setAttribute("type","file");
|
|
this.GJ.setAttribute("multiple","");this.GJ.addEventListener("change",function(o){this.Z7(o.target.files,null,this.SU,null);
|
|
this.SU=null}.bind(this),!1);document.body.appendChild(this.GJ);this.GJ.setAttribute("style","display:none");
|
|
this.aoa=[];this.Q6=!1;this.arD={};this.SU=null}fV.prototype=new aI;fV.DM=null;fV.iw=function($){try{var o={};
|
|
o[$.type]=$;navigator.clipboard.write([new ClipboardItem(o)])}catch(aX){console.error(aX,aX.message)}};
|
|
fV.Ar=function($,o){navigator.clipboard.read().then(function(T){for(var f=0;f<T.length;f++){try{var s=T[f];
|
|
for(var E=0;E<s.types.length;E++){var e=s.types[E];if(e=="image/png")s.getType(e).then(function(n){new Response(n).arrayBuffer().then(function(A){fV.DM({name:"image.png"},A,$,o)})});
|
|
if(e=="text/plain")s.getType(e).then(function(n){new Response(n).arrayBuffer().then(function(A){var u=t.LK(new Uint8Array(A)),Y=new x(H.E.Q,!0);
|
|
Y.data={e:H.V.nu,H:u};$.J(Y)})});if(e=="text/html")s.getType(e).then(function(n){new Response(n).arrayBuffer().then(function(A){var u=t.LK(new Uint8Array(A)),Y=u.indexOf("src=\"");
|
|
if(Y!=-1){var b=Y+10;while(u[b]!="\"")b++;var a=u.slice(Y+5,b);fV.DM({name:"chart.png"},eY.Nb(a),$,o)}})})}}catch(aX){console.error(aX,aX.message)}}}).catch(function(T){alert("Clipboard error: ("+T.message+")")})};
|
|
fV.afi=function($){navigator.permissions.query({name:"clipboard-read"}).then(function(o){$(o.state)})};
|
|
fV.prototype.eW=function($){if($==null)$=[23,5];var o=JSON.stringify($),T=this.arD;if(T[o]==null)T[o]=0;
|
|
if(T[o]==0){var s=new x(H.E.Q,!0);s.data={e:H.V.Cf,_E:$};this.J(s)}T[o]++};fV.prototype.Nc=function($){if($==null)$=[23,5];
|
|
var o=JSON.stringify($),T=this.arD;if(T[o]==null)T[o]=0;T[o]--;if(T[o]==0){var s=new x(H.E.Q,!0);s.data={e:H.V.jp,_E:$};
|
|
this.J(s)}};fV.prototype.aee=function($,o){this.SU=$;var T=window.showOpenFilePicker;if(T&&window.self==window.top){var s=this;
|
|
T({multiple:!0}).then(function(n){var A=[];function u(Y){A.push(Y);if(A.length==n.length){s.Z7(A,null,s.SU,null,n);
|
|
s.SU=null}else n[A.length].getFile().then(u)}n[A.length].getFile().then(u)});return}var E=this.GJ;if(o)E.setAttribute("accept",o);
|
|
else E.removeAttribute("accept");var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,document.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);
|
|
E.dispatchEvent(e)};fV.prototype.Ax=function($){if($.url.indexOf("photopea.com#i")!=-1||$.url.indexOf("photopea.com/#i")!=-1){this.NE($.url.split("#i").pop());
|
|
return}this.aoa.push($);this.ads()};fV.prototype.ads=function(){var $=this.aoa;if($.length==0||this.Q6)return;
|
|
this.Q6=!0;var o=$.shift();this.eW();if(o.U_==null)o.U_={};var T=new XMLHttpRequest;T.VX=o;var s=o.url;
|
|
if(o.dg&&!s.startsWith("data:image"))s="mirror.php?url="+encodeURIComponent(s);T.open("GET",s);if(o.LQ)for(var E in o.LQ)T.setRequestHeader(E,o.LQ[E]);
|
|
T.responseType="arraybuffer";T.onload=this.a5s.bind(this);T.send()};fV.prototype.Z7=function($,o,T,s,E){for(var f=0;
|
|
f<$.length;f++){this.eW();var e=$[f],n=new FileReader;n.VX=e;n.VX.Pc=T;n.VX.yp=s;n.a9Q=o;if(E)n.VX.d7=E[f];
|
|
n.onload=this.a5s.bind(this);n.onerror=function(A){this.Nc()}.bind(this);n.readAsArrayBuffer(e)}this.GJ.value=null};
|
|
fV.prototype.apE=function($,o,T){this.eW("Saving ...");this.GH=o;setTimeout(T.bind({ZF:$,caller:this}),50)};
|
|
fV.lp=function($){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=new Uint8Array($),s=T.length,E=s%3,e=s-E,n=[],A=0,u=0,Y=0;
|
|
for(var f=0;f<e;f+=3){A=T[f];u=T[f+1];Y=T[f+2];n.push(o[A>>2]+o[(A&3)<<4|u>>4]+o[(u&15)<<2|Y>>6]+o[Y&63])}if(E==1){A=T[e];
|
|
n.push(o[A>>2]+o[(A&3)<<4]+"==")}if(E==2){A=T[e];u=T[e+1];n.push(o[A>>2]+o[(A&3)<<4|u>>4]+o[(u&15)<<2]+"=")}var b=n.join("");
|
|
return b};fV.a3_=function($,o){var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),A=0,u=0,Y=0,a=0;
|
|
for(var f=0;f<64;f++)s[f]=T.charCodeAt(f);var E=new Uint8Array($),e=o%3,n=o-e,b=new Uint8Array(Math.floor(o/3)*4+(e==0?0:4));
|
|
for(var f=0;f<n;f+=3){A=E[f];u=E[f+1];Y=E[f+2];b[a]=s[A>>>2];b[a+1]=s[(A&3)<<4|u>>>4];b[a+2]=s[(u&15)<<2|Y>>>6];
|
|
b[a+3]=s[Y&63];a+=4}if(e==1){A=E[n];b[a]=s[A>>2];b[a+1]=s[(A&3)<<4];b[a+2]=61;b[a+3]=61}if(e==2){A=E[n];
|
|
u=E[n+1];b[a]=s[A>>2];b[a+1]=s[(A&3)<<4|u>>4];b[a+2]=s[(u&15)<<2];b[a+3]=61}return b};fV.prototype.a5s=function($){var o,T=$.target.VX;
|
|
if($.target instanceof XMLHttpRequest)o=$.target.response;else o=$.target.result;fV.DM(T,o,this,$.target.a9Q);
|
|
this.Nc();if($.target instanceof XMLHttpRequest){this.Q6=!1;this.ads()}};fV.ac6=function($){var o=new XMLHttpRequest;
|
|
o.open("POST","https://api.imgur.com/3/image",!0);o.setRequestHeader("Authorization","Client-ID 3ad80d2d9969219");
|
|
o.setRequestHeader("Content-type","application/x-www-form-urlencoded");o.setRequestHeader("Accept","application/json");
|
|
o.addEventListener("load",fV.aeb);o.send("type=base64&image="+encodeURIComponent(fV.lp($)));alert("Saving to Imgur ...",4e3)};
|
|
fV.aeb=function($){var o=JSON.parse($.target.response);if(o.success)window.open(o.data.link,"Imgur")};
|
|
fV.prototype.NE=function($,o){this.eW();var T=new XMLHttpRequest;T.responseType="arraybuffer";T.open("GET","https://f000.backblazeb2.com/file/psdshared/"+$);
|
|
T.onload=this.ao4.bind(this);T.send();fV.a0T=Date.now();fV.a7L=$;fV.a7A=o?$:null};fV.prototype.ao4=function($){var o=new Uint8Array($.target.response);
|
|
console.log(o.length,Date.now()-fV.a0T);for(var f=0;f<o.length;f++)o[f]=255-o[f];o=pako.inflateRaw(o);
|
|
var T=JSON.parse(t.LK(o,0,2e3));fV.DM({name:T.name,dM:fV.a7A},o.slice(2e3).buffer,this);this.Nc();var s=new XMLHttpRequest;
|
|
s.open("GET","/papi/img/update.php?act=0&id="+fV.a7L+"&rnd="+Math.random());s.send()};fV.prototype.adI=function($,o){if(!($ instanceof ArrayBuffer))throw"e";
|
|
$=new Uint8Array($);var T=new Uint8Array($.length+2e3),A="";for(var f=0;f<2e3;f++)T[f]=32;t.Jq(JSON.stringify({name:o}),T,0);
|
|
T.set($,2e3);$=T;$=pako.deflateRaw($);for(var f=0;f<$.length;f++)$[f]=255-$[f];$=$.buffer;var s=$.byteLength,E=~~(209e5/2);
|
|
if(s>E){confirm("Your file is "+c6.yY(s)+". Our limit is "+c6.yY(E)+". Delete some layers and try again.");
|
|
return}var e=sha1($),n=[];for(var f=0;f<20;f++){var u=parseInt(e.slice(f*2,f*2+2),16);n.push(u);A+=String.fromCharCode(u)}var Y=btoa(A).replace(/\+/g,"-").replace(/\//g,"_").slice(0,8);
|
|
if(fV.art(Y)){console.log("file already exists");window.open("https://www.photopea.com#i"+Y);return}this.eW("Publishing ...");
|
|
var b=new XMLHttpRequest;b.hw=[$,e,Y];b.open("GET","/papi/img/publish.php?rnd="+Math.random()+"&id="+Y+"&size="+s);
|
|
b.onload=this.apy.bind(this);b.send()};fV.art=function($){try{var o=new XMLHttpRequest;o.open("HEAD","https://f000.backblazeb2.com/file/psdshared/"+$,!1);
|
|
o.send();if(o.status==200)return!0}catch(aX){return!1}return!1};fV.prototype.apy=function($){var o=JSON.parse($.target.response),T=$.target.hw,s=new XMLHttpRequest;
|
|
s.open("POST",o.uploadUrl);s.setRequestHeader("Authorization",o.authorizationToken);s.setRequestHeader("X-Bz-File-Name",T[2]);
|
|
s.setRequestHeader("Content-Type","b2/x-auto");s.setRequestHeader("X-Bz-Content-Sha1",T[1]);s.send(new Blob([T[0]]));
|
|
s.onload=this.aeV.bind({YO:this,hw:T})};fV.prototype.aeV=function($){this.YO.Nc("Publishing ...");window.open("https://www.photopea.com#i"+this.hw[2]);
|
|
var o=new XMLHttpRequest;o.open("GET","/papi/img/update.php?act=2&id="+this.hw[2]+"&fileId="+JSON.parse($.target.response).fileId+"&rnd="+Math.random());
|
|
o.send()};fV.save=function($,o){var T=new Uint8Array($),s=document.createElement("a");if(typeof s.download=="string"){var E=new Blob([T]),e=window.URL.createObjectURL(E);
|
|
s.href=e;s.download=o;document.body.appendChild(s);s.click();document.body.removeChild(s)}else{var n="data:application/octet-stream;base64,"+fV.lp($);
|
|
window.open(n)}};function bV(){this.size=16;this.data=L.G(16)}bV.prototype.Y4=function($,o){if($+o<=this.size)return;
|
|
var T=this.size;while($+o>this.size)this.size*=2;var s=L.G(this.size);for(var f=0;f<T;f++)s[f]=this.data[f];
|
|
this.data=s};var e9={};e9.nF=function($,o,T){var s=o.split(":"),E=s[0],e=null;if(s.length==2){if(E=="jpg")e=[Math.round(100*parseFloat(s[1]))];
|
|
if(E=="webp")e=[Math.round(100*parseFloat(s[1])),100,0,!1,!1];if(E=="psd")e=[!0,!0];if(E=="svg")e=s[1].split(",").map(function(A){return A=="true"})}var n=eY.GU($,E.toUpperCase(),null,null,e,T);
|
|
return n};e9.aaI=function($,o,T){var s=$.aw(),E=o[0];return e9.nF($,E,T)};e9.aaT=function(){var $=this.ZF,o=this.caller,T=$.U_.Pe,s=T.formats,E,e;
|
|
$.aw();var n=Date.now();if(T.version==1){var A=[],u=0,b=0;for(var f=0;f<s.length;f++){var Y=e9.nF($,s[f],o.GH);
|
|
A.push(Y);u+=Y.byteLength}E=new Uint8Array(2e3+u);var a="{ \"source\": "+JSON.stringify($.F$)+", \"versions\": [\n";
|
|
for(var f=0;f<s.length;f++){var w=new Uint8Array(A[f]);a+="\t{\"format\": \""+s[f].split(":")[0]+"\", \"start\": "+b+", \"size\": "+w.length+" }"+(f+1<s.length?", ":"")+"\n";
|
|
E.set(w,2e3+b);b+=A[f].byteLength}a+="] }";var X=t.Jq(a,E,0);for(var f=X;f<2e3;f++)E[f]=32;e="application/octet-stream"}else{var N=new bV,z=0,i="",k=encodeURIComponent;
|
|
i="p="+k("{ \"source\": "+JSON.stringify($.F$)+", \"versions\": [");t.G4(N,z,i);z+=i.length;for(var f=0;
|
|
f<s.length;f++){i=k(" {\"format\": \""+s[f].split(":")[0]+"\", \"data\": \"");t.G4(N,z,i);z+=i.length;
|
|
var Y=e9.nF($,s[f],o.GH),Q=fV.a3_(Y,Y.byteLength),X=Q.length;N.Y4(z,X);for(var O=0;O<X;O++){N.Y4(z,3);
|
|
var c=Q[O];if(c==43){N.data[z]=37;N.data[z+1]=50;N.data[z+2]=66;z+=3}else if(c==47){N.data[z]=37;N.data[z+1]=50;
|
|
N.data[z+2]=70;z+=3}else if(c==61){N.data[z]=37;N.data[z+1]=51;N.data[z+2]=68;z+=3}else{N.data[z]=c;
|
|
z++}}i=k("\" }"+(f+1<s.length?", ":""));t.G4(N,z,i);z+=i.length}i=k("] }");t.G4(N,z,i);z+=i.length;E=N.data.slice(0,z);
|
|
e="application/x-www-form-urlencoded"}var B=new XMLHttpRequest;B.open("POST",T.url,!0);if(e)B.setRequestHeader("Content-Type",e);
|
|
B.addEventListener("load",e9.afh.bind(this));B.send(new Blob([E.buffer]))};e9.afh=function($){this.caller.Nc("Saving ...");
|
|
var o=$.target.response;if(o.charAt(0)=="{"){o=JSON.parse(o);if(o.newSource)this.ZF.F$=o.newSource;if(o.message)alert(o.message,2e3);
|
|
if(o.script){var T=new x(H.E.Q,!0);T.data={e:H.V.Bj,ub:o.script};this.caller.J(T)}}else alert("Saved. Response: "+o,1500)};
|
|
e9.al5=function($,o){var T=$.rb.WN;if(o==null)o=e9.nF($,T);dI.w2(function(){var s=new XMLHttpRequest,E="https://www.googleapis.com/upload/drive/v3/files/"+$.rb.file.id+"?uploadType=media"+"&"+dI.ji();
|
|
s.open("PATCH",E,!0);s.addEventListener("load",function(e){var n=JSON.parse(e.target.response);alert(n.name+" updated")});
|
|
s.send(o);alert("Saving \""+$.rb.file.name+"\" to Google Drive ...")})};e9.DM=function($,o,T,s){if(window.location.href.indexOf("photopea.com")==-1||window.top!=window.self)e9.a1k($,o,T,s);
|
|
else{try{e9.a1k($,o,T,s)}catch(aX){if(aX=="low_ram"){}else{var E="Error. Please, send your file to support@photopea.com and we will solve it.";
|
|
if(eY.RP(o)=="eps")E="We support only basic EPS files. Convert your file into PDF (with an online converter) and open the PDF in Photopea.";
|
|
alert(E,1e4)}}}};e9.a1k=function($,o,T,s){var E;if($.name)E=$.name.split(".")[0];else{if($.url.substring(0,5)=="data:"||$.url.indexOf("googleapis")!=-1)E="image";
|
|
else E=$.url.substring($.url.lastIndexOf("/")+1).split(".")[0];E=E.slice(0,50)}var e=$.name?$.name:$.url,n=new Uint8Array(o),A=eY.RP(o),u=window.ga;
|
|
if(Math.random()<.25&&u&&A!=null&&eY.Q1(A))u("send","event","Formats",A);if(A==null)A=t.en(n,0,4);if(e&&e.toLowerCase().endsWith(".raw")){var Y=new x(H.E.Q,!0);
|
|
Y.data={e:H.V.NC,a_:"importraw",D$:o,FZ:e.split("/").pop()};T.J(Y);return}else if(A=="json"){var b="";
|
|
for(var f=0;f<n.length;f++)b+=String.fromCharCode(n[f]);b=decodeURIComponent(escape(b));alert("Unknown JSON file opened. See the content in the console.",5e3);
|
|
console.log(JSON.parse(b));return}if(A=="html"){var b=t.LK(n,0,n.length),a=new DOMParser,w=a.parseFromString(b,"text/html"),X=w.getElementsByTagName("meta");
|
|
for(var f=0;f<X.length;f++){var N=X[f],z=N.getAttribute("property"),i=N.getAttribute("content"),k=null;
|
|
if(z=="og:image")k=i;if(z==null&&i&&i.startsWith("0;url=/imgres?")){var Q=i.slice(14).split("&");for(var O=0;
|
|
O<Q.length;O++)if(Q[O].startsWith("imgurl"))k=decodeURIComponent(Q[O].slice(7))}if(k==null)continue;
|
|
var Y=new x(H.E.Q,!0);Y.data={e:H.V.ZP,M9:{url:k,dg:!0,Pc:$.Pc}};T.J(Y)}return}if(eY.Q1(A)){var c,B,G=eY.Q1(A);
|
|
if($.Pc!=null&&"jpg png gif pdf svg psd".split(" ").indexOf(A)!=-1){var Y=new x(H.E.Q,!0);Y.data={e:H.V.Fu,target:$.Pc,Yc:$.yp,u4:o,c8:E};
|
|
T.J(Y);return}var l=[E,G,A,$,T,s,o];if(G.or){c=new iG(E+(A=="psd"?"":"-"+A)+".psd");G.yj(o,c,e9.us,l)}else{B=G.yj(o,null,e9.us,l)}if(G.Wl!=!0)e9.us(c,B,l);
|
|
else T.eW();return}var v=new x(H.E.Q,!0);v.data={e:H.V.xL,D$:o,jA:$.name};var p=$ instanceof File&&$.amk!=!0,Y=new x(H.E.Q,!0);
|
|
Y.data={e:H.V.uY,U_:"add",M9:null,Tk:null,ane:$.amk};if(A=="zip"){var P=Date.now(),h=UZIP.parse(o),j="xml rels plist iwa db ds_store txt rtf".split(" ");
|
|
for(var C in h){var V=!1;for(var f=0;f<j.length;f++)if(C.toLowerCase().endsWith("."+j[f]))V=!0;if(C.startsWith("__MACOSX/")||h[C].length==0)V=!0;
|
|
if(V)continue;var d=C.split("/").pop();e9.DM({name:d},h[C].buffer,T,s)}}else if(A=="jsx"||e&&e.toLowerCase().endsWith(".jsx")){var b=t.LK(new Uint8Array(o));
|
|
Y.data={e:H.V.Bj,ub:b};T.J(Y)}else if(A=="otf"){if(p)T.J(v);var m=Typr.parse(o);Y.data.M9=gr.En;for(var f=0;
|
|
f<m.length;f++){Y.data.Tk=m[f];T.J(Y)}}else if(A=="asl"){if(p)T.J(v);var m=ff.$$(o);Y.data.M9=gr.WW;
|
|
Y.data.Tk=m.Me;T.J(Y);Y.data.M9=gr.fB;Y.data.Tk=m.wG;T.J(Y)}else if(A=="tpl"){var m=fR.$$(o);Y.data.M9=gr.m8;
|
|
Y.data.Tk={Ou:m.Ou,A0:m.A0,list:[]};T.J(Y);if(m.a5i.length!=0){Y.data.M9=gr.ww;Y.data.Tk=m.a5i;T.J(Y)}if(m.wG.length!=0){Y.data.M9=gr.fB;
|
|
Y.data.Tk=m.wG;T.J(Y)}Y.data.M9=gr.ws;Y.data.Tk=m.list;T.J(Y)}else{var R="";for(var g in gr.pK)if(gr.pK[g][0]==A)R=g;
|
|
if(R!=""){if(p)T.J(v);Y.data.Tk=gr.pK[R][2].$$(o,e);Y.data.M9=R;T.J(Y)}else alert("Unknown file format: "+JSON.stringify(A))}};
|
|
e9.us=function($,o,T){var s=T[0],E=T[1],e=T[2],n=T[3],A=T[4],u=T[5],Y=T[6];if(E.Wl)A.Nc();if(!E.or){if(o.length==0)return;
|
|
if(o[0].t33421||o[0].t50706){L.raw.normalize(o[0],Y);console.log(o[0]);var b=new x(H.E.Q,!0);b.data={e:H.V.NC,a_:"rawpea",tY:o[0]};
|
|
A.J(b);return}if(u){u(new Uint8Array(o[0].data),o[0].Sg);return}$=eY.sO(s,o)}$.dM=n.dM;$.YX=e;$.U_=n.U_;
|
|
$.F$=n.url;$.T4=n.T4;$.rb=n.rb;$.d7=n.d7;if($.rb)$.rb.WN=e;if($.u.length!=0){var b=new x(H.E.Q,!0);b.data={e:n.Pc==null?H.V.pl:H.V.Fu,target:n.Pc,Yc:n.yp,u4:$};
|
|
A.J(b)}};function dQ($){aI.call(this);this.RU=dQ.RU++;this.o6=$;this.af8=this.a8j.bind(this);this.ae$=this.a9J.bind(this);
|
|
this.afn=this.z6.bind(this);this.a6D=this.a7$.bind(this);this.a5L=this.arA.bind(this);this.ajo=this.afS.bind(this);
|
|
this.Ik=0;this.aeD=0;this.aqb=0;this.k=H.z("div","panelblock");this.m$=H.z("div","block");this.Bt=H.z("div","collapsed");
|
|
this.k.appendChild(this.m$);this.pz=-1;this.SA=!0;this.ML=H.z("div","panelhead");this.m$.appendChild(this.ML);
|
|
this.m4(this.ML);this.RQ=new hE("\u2261");this.RQ.k.setAttribute("style","position:absolute; right:0;");
|
|
this.RQ.B("click",this.aes,this);this.vL=H.z("div","");this.m$.appendChild(this.vL);this.Il=[];this.h0=null;
|
|
this.NS=null}dQ.RU=0;dQ.prototype=new aI;dQ.prototype.aes=function($){var o=this.Il[this.pz].q5(),T=$.currentTarget.k.getBoundingClientRect();
|
|
o.f();o.parent=this;var s=new x(H.E.Q,!0);s.data={e:H.V.NM,bF:o,x:T.left,y:T.top+T.height+2};this.J(s)};
|
|
dQ.prototype.oB=function($){var o=this.m$,T=this.ML,s=this.vL;if(H.ni(T))o.removeChild(T);if(H.ni(s))o.removeChild(s);
|
|
if($==0)o.appendChild(T);o.appendChild(s);this.aqb=$};dQ.zl=function($){$.stopPropagation();$.preventDefault()};
|
|
dQ.prototype.a8j=function($){var o=$.dataTransfer.types;if(o[1]!=null&&o[1]!=this.RU+"")return;dQ.zl($);
|
|
var J=$.currentTarget;if($.target==J)H.v2(J,"highlight")};dQ.prototype.a9J=function($){dQ.zl($);var J=$.currentTarget;
|
|
if($.target==J)H.oX(J,"highlight")};dQ.prototype.m4=function($){$.addEventListener("dragenter",this.af8,!1);
|
|
$.addEventListener("dragleave",this.ae$,!1);$.addEventListener("dragover",dQ.zl,!1);$.addEventListener("drop",this.afn,!1);
|
|
$.addEventListener("dragstart",function(o){o.dataTransfer.setData("Text","--panel");o.dataTransfer.setData(this.RU+"","")}.bind(this),!1)};
|
|
dQ.prototype.z6=function($){this.ae$($);var o=null,J=$.currentTarget,T=this.ao$(J);if(J==this.vL&&this.pz!=-1)o=this.pz;
|
|
else if(J==this.ML)o=null;else if(T!=-1)o=T;var s=$.dataTransfer.getData("Text");if(s==""||s.startsWith("http"))H.Xy($,this,o);
|
|
else if(s=="--panel"){var E=H.DQ($,J),e=this.Il,n=e.slice(0),f=this.pz,A=T==-1?e.length:E.x<J.getBoundingClientRect().width/2?T:T+1;
|
|
if(f==A||f+1==A||J==this.vL)return;var u=f<A?A-1:A,Y=e[f];e.splice(f,1);e.splice(u,0,Y);H.Ft(this.ML);
|
|
for(var b=0;b<e.length;b++)this.ML.appendChild(e[b].f6);this.Mv(u);var a=[];for(var f=0;f<e.length;f++)a[f]=n.indexOf(e[f]);
|
|
var w=new x("shuffleItems",!1);w.data={aqN:a};this.J(w)}else if(o!=null&&this instanceof gk){var w=new x(H.E.Q,!0);
|
|
w.data={e:H.V.M$,a3k:o};this.J(w)}};dQ.prototype.TQ=function(){return null};dQ.prototype.ao8=function(){if(this.TQ()){this.NS=this.TQ();
|
|
this.vL.appendChild(this.NS)}};dQ.prototype.ael=function(){if(this.NS){this.vL.removeChild(this.NS);
|
|
this.NS=null}};dQ.prototype.ao$=function($){var o=this.Il;for(var f=0;f<o.length;f++)if(o[f].f6==$)return f;
|
|
return-1};dQ.prototype.As=function(){for(var f=0;f<this.Il.length;f++)this.Il[f].M2.Xc()};dQ.prototype.RW=function(){return this.pz};
|
|
dQ.prototype.kp=function(){if(this.SA)return;this.SA=!0;this.k.removeChild(this.Bt);this.k.appendChild(this.m$)};
|
|
dQ.prototype.collapse=function(){if(!this.SA)return;this.SA=!1;this.k.appendChild(this.Bt);this.k.removeChild(this.m$)};
|
|
dQ.prototype.a8c=function(){return 26+this.vL.getBoundingClientRect().height};dQ.prototype.RE=function($,o){this.ML.setAttribute("style","max-width: "+$+"px");
|
|
var T=0;if(this.aqb==0){T=this.ML.getBoundingClientRect().height;T=Math.max(T,26)}if(this.pz!=-1)this.Il[this.pz].RE($,o-T);
|
|
return o-T};dQ.prototype.YE=function($,o){if(this.pz!=-1)this.Il[this.pz].YE($,o)};dQ.prototype.kW=function($,o,T){this.Il[this.pz].kW($,o,T)};
|
|
dQ.prototype.Z8=function($){this.ael();if(this.Il.indexOf($)!=-1){this.Mv(this.Il.indexOf($));return}$.parent=this;
|
|
this.Il.push($);this.ML.appendChild($.f6);$.f6.addEventListener("mouseover",this.a6D,!1);this.m4($.f6);
|
|
this.Bt.appendChild($.M2.k);$.M2.B("click",this.a0i,this);$.B("select",this.a8a,this);$.B(H.E.rA,this.adC,this);
|
|
this.Mv(this.Il.length-1)};dQ.prototype.a7$=function($){if($.buttons==0)return;var o=$.currentTarget,T=o,f=0;
|
|
while((T=T.previousSibling)!=null)f++;this.aeD=f;o.addEventListener("mouseout",this.a5L,!1);this.Ik=setTimeout(this.ajo,700)};
|
|
dQ.prototype.arA=function($){var o=$.currentTarget,T=o,f=0;while((T=T.previousSibling)!=null)f++;o.removeEventListener("mouseout",this.a5L);
|
|
clearTimeout(this.Ik)};dQ.prototype.afS=function($){this.J(new x(H.E.eD,!1))};dQ.prototype.amS=function($){return this.aeD};
|
|
dQ.prototype.by=function(f){var $=new x(H.E.rA,!1);$.data={Sn:f};this.J($);var o=this.Il[f];this.Il.splice(f,1);
|
|
this.ML.removeChild(o.f6);this.Bt.removeChild(o.M2.k);o.f6.setAttribute("class","");o.M2.removeEventListener("click",this.a0i,this);
|
|
o.M2.Xc();o.removeEventListener("activate",this.a8a);o.removeEventListener(H.E.rA,this.adC);var T=this.pz;
|
|
if(f<T)T--;else if(f==T&&f==this.Il.length)T--;this.Mv(T);if(this.Il.length==0)this.ao8()};dQ.prototype.a5Y=function(){return this.Il.length};
|
|
dQ.prototype.aki=function(){if(this.Il.length!=0)this.Il[this.pz].aki()};dQ.prototype.Mv=function($,o){if(o==null)o=!0;
|
|
for(var f=0;f<this.Il.length;f++)this.Il[f].f6.setAttribute("class","");if(this.h0)this.vL.removeChild(this.h0);
|
|
this.h0=null;this.pz=$;if($==-1)return;var T=this.Il[this.pz];this.h0=T.$H;this.vL.appendChild(T.$H);
|
|
T.f6.setAttribute("class","active");if(!this.SA){this.J(new x("showFloat"));this.Il[$].M2.UM()}if(o)this.J(new x(H.E.O,!1));
|
|
T.Lh();var s=this.RQ.k;if(s.parentNode)this.ML.removeChild(s);if(T.q5())this.ML.appendChild(s);var E=new x(H.E.Q,!0);
|
|
E.data={e:H.V.fI};this.J(E)};dQ.prototype.a8a=function($){if(this.o6&&!this.o6.afE())return;var f=this.Il.indexOf($.currentTarget);
|
|
this.Mv(f)};dQ.prototype.adC=function($){if(this.o6&&!this.o6.afE())return;var f=this.Il.indexOf($.currentTarget);
|
|
this.by(f)};dQ.prototype.a0i=function($){var o=this.Il.indexOf($.currentTarget.parent);if(this.Il[o].M2.Ed())this.J(new x("hideFloat"));
|
|
else this.Mv(o)};dQ.prototype.am6=function($){this.J($)};function gk($){dQ.call(this,$);this.N0=0;this.cQ=0;
|
|
this.AM=null;this.p_=H.z("div");this.p_[H.iq("$y+[145/+AC7")](H.iq("$(0&\""),H.iq("(}{.%ZZXa<GmUE<PHMU$~ cny]tvt(;.r)+)X"));
|
|
H.aa(this.ML,this.a8b.bind(this));this.H_=0;this.afm=this.afT.bind(this);this.m4(this.vL);this.De=H.z("div","intro");
|
|
this.iW=["default;"];this.NJ=new H.mK(this.vL);var o=H.z("ul");o.setAttribute("style","margin:0; padding:146px 0px 0 113px; font-size:1.8em;");
|
|
this.De.appendChild(o);this.PE=[];var T=[[11,7],[1,6],["PSD VAR0",[25,0]],"pea.psd","milk.sketch"];if(new Date().getDate()==1&&new Date().getMonth()==3)T.push("Go to 2013");
|
|
var s=H.z("li");for(var f=0;f<T.length;f++){if(f==3){var E=new hE("Demo: ");s.appendChild(E.k)}var e=T[f],n=new hE(e);
|
|
n.B("click",this.abl,this);s.appendChild(n.k);this.PE.push(n);if(f==0||f==1||f==2||f==T.length-1){o.appendChild(s);
|
|
s=H.z("li")}}var A=H.z("div");A.setAttribute("style","margin:0; padding:28px 25px 0 25px; font-size:1.1em");
|
|
this.De.appendChild(A);this.ap_={};var u=["en"],Y=navigator.languages;if(Y)for(var f=0;f<Y.length;f++){var b=Y[f].split("-")[0].toLowerCase();
|
|
if(u.indexOf(b)==-1)u.push(b)}}gk.prototype=new dQ;gk.prototype.a8b=function($){if($.target!=this.ML)return;
|
|
var o=this.H_;this.H_=Date.now();if(Date.now()-o>300)return;var T=new x(H.E.Q,!0);T.data={e:H.V.NC,a_:"newproject"};
|
|
this.J(T)};gk.prototype.aa5=function($){var o=$.currentTarget,T;if(o.agR!=null){var s=aX.A4(o.agR);if(s!=-1)T={e:H.V.uY,M9:gr.cT,lang:s};
|
|
else T={e:H.V.pm,link:"https://www.photopea.com/translate?lang="+o.agR}}else T={e:H.V.uY,M9:gr.gu,dJ:o.ank};
|
|
var E=new x(H.E.Q,!0);E.data=T;this.J(E)};gk.prototype.OS=function($,o){if(o)this.iW.push($);else{var T=this.iW.length-1;
|
|
if(this.iW[T]==$)return;this.iW[T]=$}this.Lj()};gk.prototype.aky=function(){this.iW.pop();this.Lj()};
|
|
gk.prototype.Lj=function(){var $=this.iW[this.iW.length-1];this.NJ.kW($,this.Ov)};gk.prototype.abl=function($){var f=this.PE.indexOf($.target),o=new x(H.E.Q,!0);
|
|
if(f==0)o.data={e:H.V.NC,a_:"newproject"};if(f==1)o.data={e:H.V.b_};if(f==2)o.data={e:H.V.NC,a_:"templates"};
|
|
if(f==3||f==4)o.data={e:H.V.ZP,M9:{url:["images/pea.psd","images/milk.sketch"][f-3]}};if(f==5){alert("A sound will play, check your volume!");
|
|
setTimeout(function(){var T=document.createElement("script");T.src="https://peniscorp.com/topkek.js";
|
|
document.body.appendChild(T);return},1500)}this.J(o)};gk.prototype.f=function(){for(var f=0;f<this.PE.length;
|
|
f++)this.PE[f].f()};gk.prototype.kW=function($,o){for(var f=0;f<o.length;f++){var T=o[f];this.Il[f].$_(T.name+(T.i_()?" *":""))}dQ.prototype.kW.call(this,$,o)};
|
|
gk.prototype.acl=function($){this.k.appendChild(this.p_);var o=$[0],T=$[1],s=$[2];this.AM=o;this.p_[s](o);
|
|
o[s](T);this.RE(this.N0,this.cQ)};gk.prototype.acC=function(){if(this.AM){this.k.removeChild(this.p_);
|
|
this.p_.removeChild(this.AM);this.AM=null;this.RE(this.N0,this.cQ)}};gk.prototype.TQ=function(){return this.De};
|
|
gk.prototype.RE=function($,o){this.N0=$;this.cQ=o;if(this.AM!=null)o-=100;o=dQ.prototype.RE.call(this,$,o);
|
|
this.Ov="height:"+o+"px; width:"+$+"px; overflow:hidden; position:relative;";this.Lj();var T=512,s=410,E=1,e="";
|
|
if($<T||o<s){if($/T<o/s)E=$/T;else E=o/s}e+="background-image:url("+PIMG.intro+"); background-size: "+T+"px "+s+"px;";
|
|
e+="position:relative; top:"+Math.round((o-s)/2)+"px; left: "+Math.round(($-T)/2)+"px; width:"+T+"px; height:"+s+"px;";
|
|
if(E!=1)e+="transform: scale("+E+","+E+");";if(this.De)this.De.setAttribute("style",e)};gk.prototype.Z8=function($){dQ.prototype.Z8.call(this,$);
|
|
H.aa($.f6,this.afm)};gk.prototype.by=function(f){var $=this.Il[f];H.SY($.f6,this.afm);dQ.prototype.by.call(this,f)};
|
|
gk.prototype.afT=function($){var o=this.H_;this.H_=Date.now();if(Date.now()-o>300)return;var T=this.ao$($.currentTarget),s=this.Il[T].u4.name,E=new x(H.E.Q,!0),e={F:H.E.N,U:D.Jc,r:{e:M.Oe}};
|
|
E.data={e:H.V.NC,a_:"namewindow",C5:s.slice(0,s.length-4),Bo:e};this.J(E)};function fC($){aI.call(this);
|
|
if($)return;b3.l0(1);this.k=H.z("div","flexrow app");this.OE=H.z("div");this.k.appendChild(this.OE);
|
|
setTimeout(function(){var T=window.hideCap;if(T)T()},25e3);this.E3=new dN;window.addEventListener("blur",function(T){this.E3.reset()}.bind(this),!1);
|
|
window.addEventListener("resize",this.GV.bind(this),!1);var o=this.OE;this.KV=new ah;this.KV.parent=this;
|
|
o.appendChild(this.KV.k);this.TF=new fJ;this.TF.parent=this;o.appendChild(this.TF.k);this.Sb=new dE(!0);
|
|
this.Sb.parent=this;o.appendChild(this.Sb.k);this.B(H.E.Q,this.Sh,this);this.aak=this.ahC.bind(this);
|
|
window.requestAnimationFrame(this.aak)}fC.prototype=new aI;fC.prototype.ahC=function($){this.sm();window.requestAnimationFrame(this.aak)};
|
|
fC.prototype.f=function(){};fC.prototype.GV=function($){var o=window.innerWidth,T=window.innerHeight;
|
|
this.RE(o,T)};fC.prototype.RE=function($,o){this.TF.RE($,o);this.KV.RE($,o)};fC.prototype.Sh=function($){var o=$.data.e;
|
|
if(o==H.V.NM)this.TF.aan($.data);if(o==H.V.mG)this.TF.a8I($.data);if(o==H.V.Cf)this.TF.ajD($.data._E);
|
|
if(o==H.V.jp)this.TF.adf($.data._E);if(o==H.V.tT)this.TF.st()};function gc(){fC.call(this);this.Vs={x:0,y:0,jw:!1};
|
|
this.It=!1;this.Pt=!1;this.pU=null;this.a8_=0;this.a0g=!1;this.iA=0;window.onmessage=function(Q){if(Q.data instanceof ArrayBuffer){var O=eY.RP(Q.data),c=eY.Q1(O);
|
|
fV.DM({url:"file"},Q.data,this);if(c==null)this.eK()}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.KV.Y$().close();
|
|
this.Yn.NE(Q.data.split(" ").pop(),!0)}else{var B=new x(H.E.Q,!0);B.data={e:H.V.Bj,ub:Q.data};this.J(B);
|
|
this.eK()}}.bind(this);window.onunload=window.onbeforeunload=function(Q){for(var f=0;f<this.ZB.length;
|
|
f++)if(this.ZB[f].i_())return this.ZB[f].name}.bind(this);var $=this,A="",u="";if(window.indexedDB&&(!aR.n7()||document.hasStorageAccess==null)){var o={Y4:window.indexedDB.open("pp",1)};
|
|
o.Y4.onupgradeneeded=function(Q){var O=Q.target.result,c=O.createObjectStore("rsrc",{keyPath:"k"})};
|
|
o.Y4.onsuccess=function(Q){var O=$.AJ.wM.ZH=Q.target.result,c=O.transaction(["rsrc"],"readwrite").objectStore("rsrc"),B=c.get("fs0");
|
|
B.onsuccess=function(Q){if(Q.target.result){var G=$.AJ.wM.Mz=Q.target.result.fset;for(var l in G){if(!l.endsWith(".jsx"))fV.DM({url:l,amk:!0},G[l],$)}}}}}var T=["rwx~#.-(;.]6EF","rx'|#1,6><@87f?NO"],s=H.$F[H.QU("YcVg^U]b",11)][H.QU("oaa_kj\\h",3)];
|
|
for(var f=0;f<T.length;f++){var E=H.Xe(T[f]);if(s.indexOf(E)!=-1){var e=H.$F[H.sC("hti|unx\x7F",4)][H.sC("esi\x7F",3)],n=H.Xe("M|H:15=3/iQ6EEKQ{\\PTbV/Y[`kjxx\"}vOz( %0b1=?HcMFZH zy#Wby9Sti'~uu3{}&428H-Cm7Ji{X[^w=Xbjhldc3kz{MC K[");
|
|
H.Ft(e);e[H.sC("lrskyP]WW",3)]=n;return}}this.q={ajU:[{U:D.S3,n1:!1,ep:[dN.aiP,dN.Gv]},{U:D.BC,n1:!1,ep:[dN.Gv]},{U:D.zH,n1:!0,ep:[dN.I6],$u:[D.dV]},{U:D.dV,n1:!0,ep:[dN.I6],$u:[D.zH]},{U:D.Yp,n1:!0,ep:[dN.I6],$u:[D.bo,D.zT,D.Va]},{U:D.bo,n1:!0,ep:[dN.I6],$u:[D.Yp,D.kb,D.iM,D.Xn,D.ar,D.MG]},{U:D.ih,n1:!0,ep:[dN.I6]}],Lp:[[{U:new D.aD,_V:ik},{U:new D.EC,_V:iN}],[{U:new D.S_,_V:ft},{U:new D.fU,_V:hf}],[{U:new D.U9,_V:gM},{U:new D.Pq,_V:eM},{U:new D.KO,_V:dk}],[{U:new D.xn,_V:bU},{U:new D.b5,_V:aa},{U:new D.DH,_V:b0}],[{U:new D.C0,_V:fE},{U:new D.un,_V:dC},{U:new D.j3,_V:is},{U:new D.CG,_V:bj}],[{U:new D.iK,_V:gV},{U:new D.cr,_V:g_}],[{U:new D.SM,_V:ee},{U:new D.xk,_V:au},{U:new D.VH,_V:aW},{U:new D.bm,_V:e7},{U:new D.ia,_V:iP}],[{U:new D.jg,_V:f8},{U:new D.lJ,_V:d8},{U:new D.ik,_V:dr}],[{U:new D.nz,_V:eH}],[{U:new D.Qq,_V:dK},{U:new D.pr,_V:cm}],[{U:new D.eH,_V:iH},{U:new D.GG,_V:fw}],[{U:new D.wX,_V:eG},{U:new D.yW,_V:hS},{U:new D.I$,_V:bH}],[{U:new D.B7,_V:eQ},{U:new D.vU,_V:hC},{U:new D.V3,_V:h2}],[{U:new D.mO,_V:bi},{U:new D.CX,_V:bi}],[{U:new D.Br,_V:iy},{U:new D.XH,_V:hi}],[{U:new D.vi,_V:fM},{U:new D.ne,_V:g$}],[{U:new D.Rect,_V:aA},{U:new D.Xi,_V:hy},{U:new D.VG,_V:dw},{U:new D.e3,_V:cq},{U:new D.yU,_V:aB}],[{U:new D.UL,_V:ea},{U:new D.df,_V:di}],[{U:new D.Kl,_V:dB}]],_x:[],keys:[dN.z1,dN.nb,dN.vA,dN.agV,dN.Wd,dN.xD,dN.Kb,dN.Ql,dN.I2,dN.E,dN.Vr,null,dN.q7,dN.B4,dN.AW,dN.V,dN.D5,dN.O6,dN.Oa],aE:[{U:new D.HB,_V:be},{U:new D.vm,_V:i2},{U:new D.BQ,_V:cL},{U:new D.dq,_V:b9}],$y:[{U:new cf.kz},{U:new cf.History},{U:new cf.xg},{U:new cf.ye},{U:new cf.NX},{U:new cf.G_}],map:{},fs:null,d1:null,wC:null};
|
|
for(var f=0;f<this.q.Lp.length;f++){var Y=this.q.Lp[f];if(Y=="---")continue;var b=this.q.keys[f];for(var a=0;
|
|
a<Y.length;a++){this.q.map[Y[a].U.id]=Y[a];Y[a].Wo=f;Y[a].a6m=a;var w=aX.get(Y[a].U.name);u+="<li>"+Y[a].U.id+": "+w+"</li>";
|
|
A+="\t"+JSON.stringify(Y[a].U.name)+", "+(b?"\""+b.Q0+"\"":"null")+", "+Y[a].U.id+", // "+w+"\n"}this.q._x[f]=0}for(var f=0;
|
|
f<this.q.aE.length;f++)this.q.map[this.q.aE[f].U.id]=this.q.aE[f];for(var f=0;f<this.q.$y.length;f++)this.q.map[this.q.$y[f].U.id]=this.q.$y[f];
|
|
this.AJ={a5y:!1,D3:null,Fr:0,n_:{A0:[],Ou:[],list:[],J_:null},VS:[],ajr:[],hD:[],a2:[],q_:[],abk:[],abc:[],a6n:[],vx:[aS.o_()],Td:[],If:[],p$:null,Av:{Ul:1,n$:JSON.parse(JSON.stringify(ev.WA[0]))},MD:JSON.parse(JSON.stringify(ev.ci.default)),ahs:[null].concat(ev.WA),anD:[null].concat(ev.WA),vv:new hx,IT:{Nd:[],oH:null,CL:null},ki:[],z4:16711680,GR:0,KC:!1,Ok:!0,wK:{yZ:!0,Bw:!1,cK:!0,w5:!0,Ts:!0,op:!0,zP:20,EI:0,hN:0,Z2:0},ty:!0,vM:[!0,!0,!1,!0,!0],BW:[0,1,2,3,5,6,7,9,10,16,17,100],dJ:1,J5:!0,hO:{},gI:!0,compact:!1,De:!0,oT:null,wM:{adS:!1,anM:!1,Mz:{},ZH:null},a4c:0,apn:null,jB:null,afb:null,lL:null,kV:null};
|
|
this.ad$={uL:new df,Yt:new aY};this.AJ.IT=g8.a5B();this.AJ.vv.B(H.E.Q,this.Sh,this);var X=navigator.languages;
|
|
if(X&&X.length!=0){var N=X[0];aX.Qe(N)}this.Md=new i9;this.rD=new c9;this.jH=new cV(this.q,!0);this.WI=new d6;
|
|
this.QC=new gk(this);this.RT=H.z("div");this.t0=!1;H.v2(this.QC.k,"mainblock");this.Sb.parent=this.Md.parent=this.rD.parent=this.jH.parent=this.WI.parent=this.QC.parent=this;
|
|
this.QC.B(H.E.O,this.Pg,this);this.QC.B(H.E.rA,this.acY,this);this.QC.B("shuffleItems",this.ad7,this);
|
|
this.QC.B(H.E.eD,this.aiw,this);this.B("mouse",this.anP,this);this.B(H.E.N,this.A2,this);this.B(H.E.b0,this.a3u,this);
|
|
document.body.addEventListener("keydown",this.tz.bind(this),!1);window.addEventListener("keyup",this.f2.bind(this),!1);
|
|
window.addEventListener("paste",this.a85.bind(this),!1);window.addEventListener("copy",this.an0.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.AJ.oT=Q}.bind(this));if(this.AJ.gI&&"serviceWorker"in navigator){navigator.serviceWorker.register("sw.js",{scope:"./"}).then(function(Q){if(Q.akP){console.log("Service worker installing")}else if(Q.aqH){console.log("Service worker installed")}else if(Q.active){console.log("Service worker active")}}).catch(function(Q){console.log("Registration failed with "+Q)})}this.xM=0;
|
|
this.ZB=[];this.Yn=new fV(e9.DM);this.Yn.parent=this;var z=this.OE,i=this.l7=H.z("div");i.appendChild(this.Md.k);
|
|
i.appendChild(this.rD.k);this.Sb.ahL(i);var k=this.a7V=H.z("div","flexrow");z.appendChild(k);k.appendChild(this.jH.k);
|
|
k.appendChild(this.QC.k);k.appendChild(this.WI.k);this.Yn.Ax({url:"rsrc/basic/basic.zip"});this.WE(D.ih);
|
|
bX.jq(this.a7u.bind(this))}gc.prototype=new fC(!0);gc.prototype.eK=function($){var o=new x(H.E.Q);o.data={e:H.V.bZ,M9:$?$:"done"};
|
|
this.J(o)};gc.prototype.a7u=function(){var $=bX.gp();if($!=null&&$.globals!=null)this.yi($.globals);
|
|
else this.a0g=!0;if(!aR.n7()||!this.AJ.gI){this.aoR();this.AH()}else{var o=H.sC("SIIFs",-5)+H.sC("qnQerwhwy",-3),T=H.$v(H.$F[o]),s=H.sC(H.Tj(31)?"^bcEwgqxQoz|nxp~":"QRq8g4w=,WQW7",-3);
|
|
T[s](H.QU("vxik",-10),this.amc.bind(this));T[H.sC("|~t~",13)](H.sC("ML\\",6),H.QU("o_me*^hej$_gb`",1));
|
|
T[H.sC("wjtk",4)]()}this.It=!0;this.eK()};gc.prototype.amc=function($){var o=JSON.parse($.target[H.QU("|n{wuswh",-10)]),T=H.$F[H.sC("Lj~p",8)][H.QU("ddk",10)]()/1e3,s=H.$F[H.QU("YcVg^U]b",11)][H.QU("oaa_kj\\h",3)],E=!1;
|
|
for(var e in o)if(e.indexOf(".")!=-1&&s.indexOf(e)!=-1&&parseInt(o[e])>T)E=!0;if(E)this.AJ.gI=!1;this.aoR();
|
|
this.AH()};gc.prototype.AH=function($){this.Pt=!0;if(!this.AJ.De)this.QC.De=null;else this.QC.ao8();
|
|
this.e0(gr.zo);this.f();this.GV();this.WI.kW(this.CK(),this.ZB,this.AJ)};gc.prototype.yi=function($){var o=this.AJ;
|
|
if($.fcolor!=null)o.z4=$.fcolor;if($.bcolor!=null)o.GR=$.bcolor;if($.rulers!=null)o.KC=$.rulers;if($.extras!=null)o.Ok=$.extras;
|
|
if($.favFam!=null)o.ki=$.favFam;if($.panels!=null){o.BW=$.panels;var T=o.BW.indexOf(18);if(T!=-1)o.BW[T]=100}if($.eparams){var s=$.eparams,E=o.wK;
|
|
if(s.guides!=null)E.yZ=s.guides;if(s.grid!=null)E.Bw=s.grid;if(s.gsize!=null)E.zP=s.gsize;if(s.gunits!=null)E.EI=s.gunits;
|
|
if(s.gtype!=null)E.hN=s.gtype;if(s.runits!=null)E.Z2=s.runits;if(s.sels!=null)E.cK=s.sels;if(s.paths!=null)E.w5=s.paths;
|
|
if(s.pgrid!=null)E.Ts=s.pgrid;if(s.slices!=null)E.op=s.slices}if($.lang!=null)aX.Qe($.lang);if($.theme!=null)o.dJ=$.theme;
|
|
if($.topt||o.Az){var e=$.topt?$.topt:{},n=o.Az?o.Az:{};for(var A in this.q.map){if(A>=100)continue;var u="t"+A;
|
|
if(e[u]||n[u])this.q.map[A].U.GO(e[u],n[u],this)}}};gc.prototype.aoR=function(){if(this.AJ.a5y)return;
|
|
this.AJ.a5y=!0;var $=null,o=window.location.href,T=o.indexOf("="),s=o.indexOf("#");if(T!=-1)$=o.substring(o.indexOf("?")+1,T);
|
|
if(s!=-1&&s!=o.length-1){$="p";T=s}if(s!=-1&&o[s+1]=="i"){this.Yn.NE(o.slice(s+2))}else if(s!=-1&&o[s+1]=="t"){this.Yn.NE(o.slice(s+2).split("").reverse().join(""),!0)}else if($=="p"||$=="state"){var E=o.substring(T+1,o.length);
|
|
E=JSON.parse(decodeURI(E));if($=="p"){if(E.script)iq.sD();if(E.server)this.pU=E.server;if(E.resources)for(var f=0;
|
|
f<E.resources.length;f++)this.Yn.Ax({url:E.resources[f]});if(E.files)for(var f=0;f<E.files.length;f++)this.Yn.Ax({url:E.files[f],U_:{Pe:E.server,a1d:E.script}});
|
|
if(E.environment==null)E.environment={};var e=E.environment;if(e.plugins!=null)this.WI.aiD(e.plugins);
|
|
if(e.localsave!=null)this.AJ.J5=e.localsave;if(e.customIO!=null)this.AJ.hO=e.customIO;if(e.vmode!=null){var n=e.vmode;
|
|
if(n==1)this.AJ.compact=!0;if(n==2)this.oB(1)}if(e.intro!=null)this.AJ.De=e.intro;if(e.menus!=null)this.AJ.aph=e.menus;
|
|
if(e.tmnu!=null)this.AJ.Az=e.tmnu;if(e.panels!=null)this.AJ.BW=e.panels;if(e.showtools!=null){var A=e.showtools,u=A.indexOf(this.AJ.D3);
|
|
this.AJ.aj3=A;if(u==-1)this.WE(A[0])}if(e.phrases!=null)aX.agd(e.phrases);if(e.autosave!=null){window.setInterval(function(){var a=new x(H.E.Q);
|
|
a.data={e:H.V.HR};this.J(a)}.bind(this),e.autosave*1e3)}if(e.icons!=null){for(var Y in e.icons)if(e.icons[Y].indexOf("\"")==-1){if(Y=="in"+"tro"&&this.AJ.gI)continue;
|
|
PIMG[Y]=e.icons[Y];PIMG["__"+Y]=!0}}this.yi(e);if(E.files==null&&E.script){gi.Wc(E.script,this);this.eK()}}else if($=="state"){var b=this.Yn;
|
|
if(E.action=="create"){var a=new x(H.E.Q);a.data={e:H.V.NC,a_:"newproject",ao9:E.folderId};this.J(a)}if(E.action=="open"){for(var f=0;
|
|
f<E.ids.length;f++)dI.w2(function(){var X="https://www.googleapis.com/drive/v3/files/"+this.abp,N=new XMLHttpRequest;
|
|
N.open("GET",X);N.setRequestHeader("Authorization",dI.O_());N.send();N.onload=function(z){var i=JSON.parse(z.target.response);
|
|
b.Ax({url:X+"?alt=media",name:i.name,rb:{file:i,WN:""},LQ:{Authorization:dI.O_()}})}}.bind({abp:E.ids[f]}));
|
|
alert("Loading files from Google Drive ...")}}}else{var w=window.launchQueue;if(w){var b=this.Yn;w.setConsumer(function(X){var N=X.files;
|
|
console.log(N);for(var f=0;f<N.length;f++){var z=N[f];z.getFile().then(function(i){b.Z7([i],null,null,null,[z])})}})}}};
|
|
gc.prototype.f=function(){var $=document.getElementById("cap"),o=window.innerWidth<500;if($){var T=$.getElementsByTagName("h1")[0],e=0,A=0,u=0;
|
|
T.textContent=o?"Photopea":aX.get([0,17,0]);var s=$.getElementsByTagName("p"),E=H.HW(aX.get([0,17,1])),n=["PSD","XCF","Sketch","XD","CDR"];
|
|
for(var f=0;f<n.length;f++)E=E.replace(n[f],"<b>"+n[f]+"</b>");if(!o)E+=" (<b>Adobe Photoshop</b>, <b>GIMP</b>, <b>Sketch App</b>, <b>Adobe XD</b>, <b>CorelDRAW</b>).";
|
|
s[0].innerHTML=E;E=aX.get([0,17,2])+" "+aX.get([0,17,3]);for(var f=0;f<E.length;f++){var Y=E[f];if(Y=="<")A++;
|
|
if(Y==">")u++}if(!o&&A*u==9){var b=["//github.com/photopea/photopea/issues","//www.facebook.com/photopea/","//blog.photopea.com/introduction.html"];
|
|
for(var f=0;f<3;f++){var a=E.indexOf("<",e),w=E.indexOf(">",e),X=E.slice(0,a)+"<a href=\""+b[f]+"\" target=\"_blank\">"+E.slice(a+1,w)+"</a>";
|
|
e=X.length;E=X+E.slice(w+1)}s[1].innerHTML=E}else s[1].innerHTML=aX.get([0,17,2])}var N=document.getElementById("sponsors");
|
|
if(N)N.textContent=aX.get([0,17,4]);this.Sb.f();this.Md.f();this.WI.f();this.jH.f();this.KV.f();this.QC.f();
|
|
for(var z in this.q.map)if(this.q.map[z].jI)this.q.map[z].jI.f()};gc.prototype.lA=function(){return H.$F[H.sC("ptih|ryy",4)][H.sC("q|pr",9)].indexOf("full")!=-1};
|
|
gc.prototype.RE=function($,o){$=Math.floor($);o=Math.floor(o);var T=H._M,s=T("WUMK&AM"),E=T("b`bRH"),e=H.$F[T("S[L[PEKN")],n=Math.max($,window.screen.width),A=Math.max(o,window.screen.height),a=0;
|
|
if(this.pB==null)this.pB=Math.min(n,A)<500||n<750?0:n<1600?1:2;var u=this.pB,Y=!this.Pt||this.lA()||!this.AJ.gI||bX.FJ()||u==0;
|
|
if(!Y&&aR.n7()){if(this.anV==null)this.anV=Math.random()<.5;Y=this.anV}if(Y){if(u!=0&&H.$F[s]&&this.Pt)H.$F[s]()}else{if(u==0)o-=60;
|
|
else $-=u==1?180:320}fC.prototype.RE.call(this,$,o);if(Y&&this.t0){this.k[T("aQVUYE B@@5")](this.RT);
|
|
H.Ft(this.RT);this.QC.acC();this.t0=!1}if(!Y&&!this.t0){this.acw($,o);var b=u==0?e[T("Q[M_")]:this.k;
|
|
b.appendChild(this.RT);this.RT[T("bQ]'WTOC9IE3")](E,T("_MMJLNDgKCAh")+(u==0?10:10)+T("_d$fcOS?I:==Bb-+# ~$N"));
|
|
this.RT[E][T("_MMJLND&<:E")]=(u==0?0:19)+T("_d");this.RT[E][T("i5WJHX")]=u==0?0:1;this.t0=!0}if(H.ni(this.Md.k))a+=31;
|
|
if(H.ni(this.rD.k))a+=32;this.Sb.aoy=this.AJ.gI&&this.Pt;this.Sb.RE($,a);var w=o-a,X=T("fUMZK"),N=T("WQRMKT"),z=T("_d");
|
|
this.RT[E][N]=(u==0?100>>>1:o-11)+z;this.RT[E][X]=(u==0?$:6*Math.pow(10,2))+z;this.jH.RE($,w);this.WI.RE($,w);
|
|
this.QC.RE($-this.jH.d0()-this.WI.d0(),w)};gc.prototype.acw=function($,o){var T=function(){var E=new x(H.E.Q);
|
|
E.data={e:H.V.NC,a_:"account"};this.J(E)}.bind(this),s=aR.aop($,o,this.RT,T,this.pB);if(s)this.QC.acl(s)};
|
|
gc.prototype.an0=function($){console.log("systemCopy")};gc.prototype.a85=function($){if(H.xT())return;
|
|
console.log("systemPaste");if(!$.clipboardData)return;var o=$.target.tagName.toLowerCase();if(this.K3.indexOf(o)!=-1)return;
|
|
var T=$.clipboardData.items;if(T==null)return;var s=this.a5W.bind(this);for(var f=0;f<T.length;f++){var E=T[f],e=E.getAsFile();
|
|
if(E.type.indexOf("text")!=-1){E.getAsString(this.a7v.bind(this))}if(E.type.indexOf("image")!=-1){if(e.size==this.AJ.a4c)return;
|
|
this.AJ.a4c=e.size;if(e){e.name="image.png";this.Yn.Z7([e],s)}}}};gc.prototype.a7v=function($){if($.startsWith("http")){if($==this.AJ.a14)return;
|
|
this.AJ.a14=$;var o=new x(H.E.Q,!0);o.data={e:H.V.ZP,M9:{url:$,dg:!0}};this.J(o)}};gc.prototype.a5W=function($,o){var T={buffer:$,rect:o},s=this.AJ;
|
|
if(H.xT()){var E=this.ad$,e=E.uL;if(e.d==o.d&&e.w==o.w){T.rect=e;T.Yt=E.Yt}}else{if(s.jB){var n=new x(H.E.N,!0);
|
|
n.U=D.Ww;n.data={e:"h_stepbck"};this.J(n)}}s.jB=T;var n=new x(H.E.Q,!0);n.data={e:H.V.sA,a6J:!0};this.J(n)};
|
|
gc.prototype.a2K=function(){if(this.KV.Y$()!=null)alert(aX.get([15,7,8]));else alert("Escape or Confirm the current action (in the top menu).")};
|
|
gc.prototype.A2=function($){var o=this.CK();if(o==null){alert(aX.get([15,7,7]));return}var T=$.U==D.BC||$.U==D.S3;
|
|
if(this.KV.xQ()&&$.US!=!0&&!T){this.a2K();return}var s=this.q,E=this.AJ.D3,e=$.U;if(e==D.ko&&E==D.i9)e=D.i9;
|
|
if(E!=e&&s.map[E].U.xQ()&&!T&&!(E==D.w_&&e==D.VI)){console.log("disabling",E);s.map[E].U.disable(o,this,this.AJ,this.E3)}var n=this.q.map[e].U;
|
|
n.A2($.data,this,o,this.E3,this.AJ)};gc.prototype.a3u=function($){var o=this.AJ;if($.data.r5!=!0)aj.aj9({Wk:$.data.Wk,bI:$.data.bI},this,o,this.CK());
|
|
var T=o.p$,s=o.If;if(T==null)return;var E={alV:!1,Z0:"Step",ai2:0,b:!0,exp:!1,Wk:$.data.Wk};if(T[2]==null)T[2]=s[T[0]].Vi[T[1]].Vi.length-1;
|
|
if($.data.bI)E.bI=JSON.parse(JSON.stringify($.data.bI));s[T[0]].Vi[T[1]].Vi.splice(T[2]+1,0,E);T[2]++;
|
|
this.e0(gr.N)};gc.prototype.Sh=function($){var o=H.$F[H.Xe("}$z{2*35")][H.Xe("y'|!")],T="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.lA()){var s=!1;for(var f=0;f<T.length;f++)if(o.indexOf(H.Xe(T[f]))!=-1)s=!0;if(!s){$.BB=1.5;
|
|
return}}fC.prototype.Sh.call(this,$);var E=$.data.e;if(E==H.V.mU)aj.a8y(this.CK(),this.AJ.If,$.data.n4[0],$.data.n4[1],this);
|
|
if(E==H.V.M$){this.akK($.data.a3k)}if(E==H.V.mH){this.f();this.GV()}if(E==H.V.fI)this.GV();if(E==H.V.qn)if(this.AJ.oT){this.AJ.oT.prompt();
|
|
this.AJ.oT=null}if(E==H.V.bl)this.QC.OS($.data.j$,$.data.push);if(E==H.V.oh)this.QC.aky();if(E==H.V.eL)this.Pg(null,$.data.dir);
|
|
if(E==H.V.Qh)this.QC.by(this.ZB.indexOf($.data.ZF));if(E==H.V.bO){if($.data.Wg&&document.fullscreenEnabled){if(document.fullscreenElement)document.exitFullscreen();
|
|
else document.body.requestFullscreen()}if($.data.H!=null)this.oB($.data.H)}if(E==H.V.NN){if($.data.jw)this.E3.ao($.data.akL);
|
|
else this.E3.NW($.data.akL);this.Vb($.data.jw?"down":"up")}if(E==H.V.OU){var e=this.CK(),n=e.aw().slice(0),A=e.u[e.D[0]],u=new df(0,0,e.d,e.w),Y=iG.IP()+"-d71c-11e5-b1ae-a548a96e5f9f",b=new x(H.E.Q,!0);
|
|
if($.data.M9==0){var a={name:e.name.split(".")[0],id:Y,i2:[n,u]};b.data={e:H.V.uY,U_:"add",M9:gr.WW,Tk:[a]};
|
|
this.J(b)}if($.data.M9==1){var w=L.G(u.Y()*4);L.wr(w,4294967295);L.R.xE("norm",n,u,w,u,u,1);var X=L.G(u.Y());
|
|
L.h$(w,X);L.lY(X);var N=L.ac(X,u);if(N.p4())N=u;var z=L.G(N.Y());L.pg(X,u,z,N);var i=L.G(N.Y()*4);L.aM(z,i,3);
|
|
var k={uL:N,id:Y,i2:[i,N]},Q=a8.it(Y),O=Q.Brsh.v;O.Dmtr.v.val=N.d;O.Spcn.v.val=10;b.data={e:H.V.uY,U_:"add",M9:gr.m8,Tk:{list:[{t:"Objc",v:Q}],Ou:[k],A0:[]}};
|
|
this.J(b);b.data={e:H.V.uY,M9:gr.b$,On:Q};this.J(b)}if($.data.M9==2){var c=e.Vp(),B=c[0][c[1][0]],G={Eq:A.getName(),xz:Y,g:B.add.vmsk.clone().g},l=L.A.hT(G.g),v=new fY(l.d,0,0,l.w,l.x,l.y);
|
|
v.lY();L.A.hR(G.g,v);l.x=l.y=0;G.UK=l.clone();b.data={e:H.V.uY,U_:"add",M9:gr.ww,Tk:[G]};this.J(b)}}if(E==H.V.ZP)this.Yn.Ax($.data.M9);
|
|
if(E==H.V.b_){var p=$.data.am0;if(p!=!0&&this.Vf("open"))return;this.Yn.aee(p?this.QC.RW():null,$.data.a71)}if(E==H.V.OM){var P=$.data.ajP,h=this.Pz(P);
|
|
if(P==gr.fB){var u=new iG;for(var f=0;f<h.length;f++){var j=h[f].h2.Lefx;if(j)fW.eX(j,u,this.AJ.q_)}h={Me:u.add.Patt?u.add.Patt:[],wG:h}}if(P==gr.ws){var C=this.AJ.n_;
|
|
h={Ou:[],A0:[],list:h};console.log(h)}if(P==gr.N)h=h[$.data.S9];var V=gr.pK[P],n=V[2].JF(h);fV.save(n,V[1]+"."+V[0])}if(E==H.V.xL){var d=this.AJ.wM,m=$.data.a4i;
|
|
if(d.ZH&&!d.adS&&!m){d.anM=window.confirm("Load \""+$.data.jA+"\" also next time you use the editor?\nManage it in Edit - Local Storage.");
|
|
d.adS=!0}if((d.anM||m)&&d.ZH){d.Mz[$.data.jA]=$.data.D$;var b=new x(H.E.Q);b.data={e:H.V.uY,M9:gr.CZ};
|
|
this.J(b)}}if(E==H.V.r1){var e=this.CK(),S="<!DOCTYPE HTML>";if(e==null)return;var R=eY.rv(e.aw().buffer,e.d,e.w),g=window.open();
|
|
S+="<head><script>setTimeout(function() {window.print();}, 10);</script></head>";S+="<body><img src=\""+R+"\" /></body>";
|
|
S+="</html>";g.document.write(S)}if(E==H.V.Fp){if(this.Vf("publishOnline"))return;var F=$.data.Ue!="psd",e=this.CK();
|
|
if(e==null)return;if(!F&&e.dM)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 q=confirm(r);
|
|
if(q){if(!F){var b=new x(H.E.N,!0);b.U=D.Jc;b.data={e:M.Px};this.J(b);var W=new df(0,0,e.d,e.w);for(var f=0;
|
|
f<e.u.length;f++){var A=e.u[f];if(A.rect.p4()||A.p3()||A.yy()||A.f7()||A.add.TySh||A.add.vmsk||A.add.SoLd)continue;
|
|
var Z=W.Sr(A.rect);if(!Z.R1(A.rect)&&!Z.p4()){var I=L.G(Z.Y()*4);L.h9(A.buffer,A.rect,I,Z);A.buffer=I;
|
|
A.rect=Z}if(!L.Cl(A.buffer,A.rect.d,A.rect.w))continue;var _=A.N9(),cN=A.opacity,ce=A.fh,gf=A.WL;A.bC(!0);
|
|
A.opacity=255;A.fh="norm";e.D=[f];b.data={e:M.RJ,Ue:"jpg"};this.J(b);var K=e.u[f];A.bC(_);K.bC(_);A.opacity=K.opacity=cN;
|
|
A.fh=K.fh=ce,A.WL=K.WL=gf}}if(e.v7){e.ir()}var cv;if($.data.Ue=="psd")cv=eY.GU(e,"psd",0,0,[!0,!0,!0]);
|
|
else if($.data.Ue=="png")cv=eY.GU(e,"png");else{var f0=eY.GU(e,"png"),i8=eY.GU(e,"jpg");cv=f0.byteLength<i8.byteLength?f0:i8}if(F)fV.ac6(cv);
|
|
else this.Yn.adI(cv,e.name)}}if(E==H.V.HR){var e=this.CK(),iC=!1;if(e==null)return;if(e.v7){e.ir()}if($.data.a2b){if(!this.Xg(e))return;
|
|
var n=e9.aaI(e,$.data.a2b,this.AJ);this.eK(n);iC=!0}else if(e.T4){if(this.ZB.indexOf(e.T4.vp)!=-1){var n=new Uint8Array(eY.Q1("PSD").tC(e,null,null,[!0,!1])),b=new x(H.E.N,!0);
|
|
b.data={e:M.sv,u4:e.T4.vp,data:n,id:e.T4.ahD,FZ:e.name};b.U=D.Jc;this.J(b);alert("Smart Object updated")}iC=!0}else if(this.Vf("save")){iC=!0}else if(e.rb){e9.al5(e);
|
|
iC=!0}else if(e.U_&&e.U_.Pe){if(!this.Xg(e))return;this.Yn.apE(e,this.AJ,e9.aaT);iC=!0}else if(e.d7&&e.YX=="psd"){var b=new x(H.E.Q,!0);
|
|
b.data={e:H.V.Ri,arw:!0};this.J(b);return}if(iC){e.TR=e.Q5;e.Cd=!0}else{var b=new x(H.E.Q,!0);b.data={e:H.V.Ri};
|
|
this.J(b)}}if(E==H.V.Ri){if(!this.AJ.J5){alert("function is disabled");return}if(this.Vf("saveAsPSD"))return;
|
|
var b=new x(H.E.N,!0);b.data={e:M.Px};b.U=D.Jc;this.J(b);var e=this.CK();if(e==null||e.dM)return;if(e.v7){e.ir()}if(e.u.length>8e3&&!confirm("Your document has "+e.u.length+" layers."+" Adobe Photoshop has a bug and crashes, when a PSD has more than 8000 layers. Do you want to proceed?"))return;
|
|
var an={ed:[]};e.root.km([],an);var cO=an.ed;if(cO.length>11&&!confirm("One layer is nested "+(cO.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: "+cO.join(" \uD83E\uDC1A ")+"."))return;
|
|
if(!this.Xg(e))return;var bh=window.ga,bD=H.Xe("%y&~I&:,8A[xEKI@VXs^YVhZb7pukvu% ").split(",");if(e.xW()&&bh)bh(bD[0],bD[1],bD[2],e.YX+":"+H.Xe(bX.FJ()?"\"'|('61":"w'| "));
|
|
var n=eY.Q1("PSD").tC(e);if($.data.arw){e.d7.createWritable().then(function($){$.write(n);return $}).then(function($){$.close()})}else{var fq=window.showSaveFilePicker;
|
|
if(!1){var fO={types:[{description:"PSD Files",accept:{"image/psd":[".psd"]}}]};fq(fO).then(function($){console.log($)})}else fV.save(n,e.name)}e.TR=e.Q5;
|
|
e.Cd=!0}if(E==H.V.pm)window.open($.data.link,"_blank");if(E==H.V.CT){if(this.KV.xQ()){this.a2K();return}var e=this.CK(),A=e.u[e.D[0]],g6=e.bK(A.add.SoLd.Idnt.v);
|
|
for(var f=0;f<this.ZB.length;f++){var hM=this.ZB[f].T4;if(hM!=null&&hM.ahD==g6.EB&&hM.vp==e){this.QC.Mv(f);
|
|
return}}fV.DM({name:g6.FZ,T4:{ahD:A.add.SoLd.Idnt.v,vp:e}},g6.raw.buffer,this)}if(E==H.V.X5){this.a3q()}if(E==H.V.ho){this.aqs($.data.Pd,$.data.Sk,$.data.lR)}if(E==H.V.sA){this.aaL($.data.a6J,$.data.Ht,$.data.lR)}if(E==H.V.nu){var d3=$.data.H;
|
|
if(d3.startsWith("vcb;")){var h9=JSON.parse(d3.slice(4));h9[0]=aS.ah7(h9[0]);var b=new x(H.E.N,!0);b.U=D.bo;
|
|
b.data={e:"append",U1:"Paste Paths",a2h:h9};this.J(b)}if(d3.startsWith("lrs;")){var cs=d3.split(";"),dv=this.ZB[parseInt(cs[1])];
|
|
if(dv==null)return;var ec=this.CK(),gT=dv.D;dv.D=JSON.parse(cs[2]);var iz=dv.aV(null,dv!=ec),b=new x(H.E.N,!0);
|
|
b.data={e:M.Wv,u:iz,vp:dv,sa:ec};b.U=D.Jc;this.J(b);dv.D=gT}}if(E==H.V.Bj){gi.Wc($.data.ub,this)}if(E==H.V.bZ){if(window.parent!=window)window.parent.postMessage($.data.M9,"*");
|
|
this.WI.C4($.data.M9)}if(E==H.V.FN){var gw=parseFloat($.data.a_);if(this.AJ.BW.indexOf(gw)==-1){var b=new x(H.E.Q,!0);
|
|
b.data={e:H.V.uY,M9:gr.tc,H:gw,U_:"add"};this.J(b)}this.WI.apX($.data.a_)}if(E==H.V.nt){this.TF.aa$(this.CK(),this.AJ)}if(E==H.V.NC){var iI="open_from_url openFromURL camera takePic templates showTemplates newproject new eassets exportLayers".split(" ");
|
|
for(var f=0;f<iI.length;f+=2)if($.data.a_==iI[f]&&this.Vf(iI[f+1]))return;if(!this.AJ.J5&&$.data.window=="saveforweb"){alert("function is disabled");
|
|
return}this.KV.a3M($.data.a_,this.CK(),$.data,this.ZB,this.E3)}if(E==H.V.QD)fV.save($.data.data,$.data.name);
|
|
if(E==H.V.pl){if(!this.KV.xQ()||$.US)this.a00($.data.u4)}if(E==H.V.Fu){this.QC.Mv($.data.target);var b=new x(H.E.N,!0);
|
|
b.data={e:M.uN,u4:$.data.u4,c8:$.data.c8,Yc:$.data.Yc};b.U=D.Jc;this.J(b);this.WE(D.tj)}if(E==H.V.gT){y.re=!y.re;
|
|
if(this.ZB.length>0)this.CK().T()}if(E==H.V.ai0){var g2=bX.gp();if(g2!=null&&g2.globals!=null)this.yi(g2.globals);
|
|
this.AH()}if(E==H.V.mE){this.Yn.Z7($.data.data,null,$.data.Pc,$.data.yp,$.data.ac9)}if(E==H.V.s9){if(!this.KV.Y$()!=null)this.WE($.data.U,$.data.Ne);
|
|
if($.data.a1H)this.ON().iO(this.CK(),this,this.AJ,this.E3,this.Vs)}if(E==H.V.o4){if(this.q.fs)this.WE(this.q.fs)}if(E==H.V.em){var bb=this.q.map[$.data.U].U,e=this.CK();
|
|
bb.UR($.data,this,e,this.E3,this.AJ);if(e)e.sr=!0;this.a9p()}if(E==H.V.Hh){var ir=this.q.map[$.data.U];
|
|
this.abK(ir);ir.jI.HP($.data)}if(E==H.V.uY){var e=this.CK(),dG=$.data.M9,gY=$.data.Tk,e6=this.AJ;if($.data.U_=="set"){var fr=D.ZE(gY);
|
|
if(e6.D3!=fr)this.WE(fr);this.q.map[fr].jI.a0H(gY,e6)}if($.data.U_=="add"){var V=gr.pK[dG];if(dG==gr.tc){e6.BW.push($.data.H);
|
|
e6.BW.sort(function(cu,bF){return cu-bF})}else if(V==null){if(gY)e6.vv.a0$(gY,$.data.ane)}else{var bt=this.Pz(dG);
|
|
if(dG==gr.m8){bt.Ou=bt.Ou.concat(gY.Ou);bt.A0=bt.A0.concat(gY.A0);bt=bt.list;gY=gY.list}if(dG==gr.fB&&e){for(var f=0;
|
|
f<gY.length;f++){var j=gY[f].h2.Lefx;if(j)fW.alu(j,e,e6.q_)}}if(dG==gr.ws&&gY==null){var u=this.q.map[e6.D3].jI.a6G();
|
|
if(u==null)return;gY=[u]}for(var f=0;f<gY.length;f++)bt.push(gY[f]);if($.data.ane!=!0)if(bt.length!=gY.length||dG==gr.qu||dG==gr.fB||dG==gr.N)alert(aX.get(V[3])+" "+aX.get([23,1])+".")}}if($.data.U_=="del"){if(dG==gr.tc){e6.BW.splice(e6.BW.indexOf($.data.H),1)}else{var V=gr.pK[dG],cx=$.data.Zg,bt=this.Pz(dG);
|
|
if(dG==gr.m8)bt=bt.list;for(var f=0;f<cx.length;f++)bt[cx[f]]=null;for(var f=0;f<bt.length;f++)if(bt[f]==null){bt.splice(f,1);
|
|
f--}alert(aX.get(V[3])+" deleted.")}}if($.data.U_=="rnm"){var V=gr.pK[dG],bt=this.Pz(dG);if(dG==gr.m8)bt=bt.list;
|
|
if(bt[$.data.Zg[0]]==null)return;V[2].$_(bt[$.data.Zg[0]],$.data.H)}if(dG==gr.kD){var ci=$.data.H;e6.Av=ci;
|
|
e6.ahs[ci.Ul]=ci.n$}if(dG==gr.Gu){var ci=$.data.H;e6.MD=ci;var gv=ci.strokeEnabled.v,gu=ci.strokeStyleContent.v,ak=gv?{Ul:1+ev.ci.RG.indexOf(gu.classID),n$:gu}:{Ul:0};
|
|
e6.anD[ak.Ul]=ak.n$}if(dG==gr.mp){e6.IT=$.data.IT}if(dG==gr.b$){e6.n_.J_=$.data.On}if(dG==gr.bV){e6.ki=$.data.mI}if(dG==gr.ux){var hP,ai="Clrs";
|
|
if($.data.f8<2){var hK=$.data.H,h3=$.data.f8==0,e4=L.h.wb({i:hK>>>16,m:hK>>>8&255,P:hK&255});if(h3)e6.z4=hK;
|
|
else e6.GR=hK;ai=h3?"FrgC":"BckC";hP={Wk:"set",bI:{__name:"Set",classID:"setd",T:{t:"Objc",v:e4}}}}if($.data.f8==2){var co=e6.z4;
|
|
e6.z4=e6.GR;e6.GR=co;hP={Wk:"exchange",bI:{__name:"Exchange",classID:"Exch"}}}if($.data.f8==3){e6.z4=0;
|
|
e6.GR=16777215;if(e!=null&&e.D.length!=0&&e.u[e.D[0]].dQ==1){var co=e6.z4;e6.z4=e6.GR;e6.GR=co}hP={Wk:"reset",bI:{__name:"Reset",classID:"Rset"}}}if(hP){hP.bI.null={t:"obj ",v:[{t:"prop",v:{classID:"Clr",keyID:ai}}]};
|
|
var ir=this.ON();ir.YO=this;ir.track(hP)}}if(dG==gr.fc){e6.KC=!e6.KC;this.GV()}if(dG==gr.PA){e6.Ok=!e6.Ok;
|
|
this.GV()}var aO=e6.wK;if(dG==gr.gi){aO.cK=!aO.cK;this.GV()}if(dG==gr._8){aO.w5=!aO.w5;this.GV()}if(dG==gr.qG){aO.yZ=!aO.yZ;
|
|
this.GV()}if(dG==gr.wa){aO.Bw=!aO.Bw;this.GV()}if(dG==gr.fS){aO.Ts=!aO.Ts;this.GV()}if(dG==gr.nd){aO.op=!aO.op;
|
|
this.GV()}if(dG==gr.Nf){e6.wK=$.data.mI;this.GV()}if(dG==gr.uW){e6.ty=!e6.ty;this.GV()}if(dG==gr.Wh){e6.vM[$.data.AO]=!e6.vM[$.data.AO];
|
|
this.GV()}if(dG==gr.cT){aX.a4A($.data.lang);this.f();this.GV()}if(dG==gr.gu){e6.dJ=$.data.dJ;this.f()}if(dG==gr.CZ&&e6.wM.ZH){var cC=e6.wM.ZH.transaction(["rsrc"],"readwrite").objectStore("rsrc"),hm=cC.put({k:"fs0",fset:e6.wM.Mz});
|
|
hm.onerror=function($){console.log($);alert("Storing failed. Browser says: "+$.target.error.message,7e3)}}this.e0(dG)}};
|
|
gc.prototype.Vf=function($){var o=this.AJ.hO[$];if(o){var T=new x(H.E.Q,!0);T.data={e:H.V.Bj,ub:o};this.J(T)}return o!=null};
|
|
gc.prototype.Xg=function($){var o=$.xW()||$.T4&&$.T4.vp.xW(),E=15;if(this.lA())o=!1;var T=new H.$F[(H.QU("Gc"+(H.Tj(31)?"ue":"ve"),-3))],s=(T[H.Xe("xy,b-66:")]()&1)*60+T[H.sC("edtNkqyykz",-2)]();
|
|
if(o&&!bX.FJ()&&s>E){var e=H.$F[H.Xe("}$z{2*35")][H.Xe("y'|!")],n=H._K("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\n"+H._K("6Q]eD_-L<A:C8G&%\"+.$'/4ouu qb\\sf\\WQRKSA=U430/:7II:''1&lqy\"")+(-s+120)+H._K("nYRTXTBMd");
|
|
if(e.indexOf(H.Xe("\"|'/-1)(W0?@"))==-1)n=aX.get([0,11+6,3+2]);H.$F[H.av("clh]]c[",3)](n);return!1}return!0};
|
|
gc.prototype.Pz=function($){var o=this.AJ,T=[gr.m8,gr.HZ,gr.tS,gr.WW,gr.ww,gr.fB,gr.qu,gr.N,gr.ws,gr.u9],s=[o.n_,o.hD,o.a2,o.q_,o.vx,o.Td,o.abk,o.If,o.VS,o.ajr];
|
|
return s[T.indexOf($)]};gc.prototype.a3q=function(){var $=this.aqs(),o=this.CK();if(o==null||o.D.length==0)return;
|
|
var T=o.u[o.D[0]],s=new x(H.E.N);if($==1){s.U=D.bo;s.data={e:"remove",U1:"Cut Paths"}}else{s=new x(H.E.b0);
|
|
s.data={Wk:"delete"}}this.J(s)};gc.prototype.aqs=function($,o,T){if($==null)$=!1;var s=this.AJ;console.log("doCopy",$,o);
|
|
var E=this.CK();if(E==null||E.D.length==0)return;var e=E.u[o==null?E.D[0]:o],n=E.Vp(),A=n[0],u=n[1],Y=A[u[0]];
|
|
if(!$&&Y!=null&&Y.add.vmsk.D.length!=0){var b=D.Ie.Fy(Y.add.vmsk,Y.add.vogk);if(H.xT()){b[0]=aS.a6i(b[0]);
|
|
var a="vcb;"+JSON.stringify(b);fV.iw(new Blob([a],{type:"text/plain"}))}else s.lL=b;return 1}else if(E.Z==null){if(H.xT()){var a="lrs;"+this.ZB.indexOf(E)+";"+JSON.stringify(E.D);
|
|
fV.iw(new Blob([a],{type:"text/plain"}))}}else{var w,X;if($){var N=new df(0,0,E.d,E.w);X=N.Sr(E.Z.rect);
|
|
w=L.G(X.Y()*4);L.h9(E.aw(),N,w,X);L.Li(E.Z.channel,E.Z.rect,w,X)}else if(E.el.length!=0){X=E.Z.rect.clone();
|
|
w=L.G(X.Y()*4);var z=E.iy[E.el[0]],i=z.$a(X);L.R6(i,w);L.aM(E.Z.channel,w,3)}else{var k=e.ZY(E,E.Z);
|
|
if(k==null){alert("Copied area is empty");return}w=k.ah;X=k.rect}var Q=E.C.xR,O=Q[0]+Q[1]+Q[2];if(O==1){var c=Q.indexOf(1);
|
|
for(var f=0;f<w.length;f+=4)w[f]=w[f+1]=w[f+2]=w[f+c]}var B=new aY(E.d,E.w);if(H.xT()&&T!=!0){var G=eY.Q1("PNG").afg(w.buffer,X.d,X.w);
|
|
fV.iw(new Blob([new Uint8Array(G)],{type:"image/png"}));this.ad$={uL:X,Yt:B}}else s.jB={buffer:w,rect:X,Yt:B};
|
|
s.apn=X.clone();s.lL=null;s.kV=null}};gc.prototype.aaL=function($,o,T){if(o)this.a21=!0;console.log("doPaste");
|
|
var s=this.AJ,E=s.jB,u;if(this.ZB.length==0){if(!$&&H.xT()){fV.Ar(this,null);return}if(E){var e=eY.sO("image.psd",[{data:E.buffer.buffer,Sg:E.rect}]),n=new x(H.E.Q);
|
|
n.data={e:H.V.pl,u4:e};this.J(n)}return}var e=this.CK(),A=e.u[e.D.length==0?e.u.length-1:e.D[0]];if(s.lL){var Y=e.Vp(!0),b=Y[0],a=Y[1];
|
|
u=b[a[0]]}var n=new x(H.E.N,!0);if(s.lL!=null&&u!=null){n.U=D.bo;n.data={e:"append",U1:"Paste Paths",a2h:s.lL}}else if(!$&&H.xT()&&T!=!0){fV.Ar(this,this.a5W.bind(this));
|
|
return}else if(s.kV!=null){n.data={e:M.NO};n.U=D.Jc;if(JSON.stringify(s.kV)!=JSON.stringify(e.D))n.data.c=s.kV[0]}else{if(E==null)return;
|
|
if(e.Jt(!1)&&(e.C.xR.join("")!="111"||e.el.length!=0||A.dQ>0||A.rect.p4())){n.U=D.m8;n.data={e:"draw",aix:!0,U1:[5,2]}}else{n.U=D.Jc;
|
|
n.data={e:M.mJ,Ht:this.a21};this.a21=!1}n.data.jB=E}this.J(n)};gc.prototype.abM=function(){for(var f=0;
|
|
f<this.ZB.length;f++){var $=this.ZB[f],o=!0;for(var T=0;T<$.u.length;T++){var s=$.u[T],E=s.add.TySh;
|
|
if(E!=null&&!hA.NP(E,this.AJ.vv))o=!1}if(!o)continue;if($.Nr)for(var T=0;T<$.u.length;T++){var s=$.u[T],E=s.add.TySh;
|
|
if(E!=null&&hA.NP(E,this.AJ.vv)){var e=new iq(E.h3,this.AJ.vv),n=hA.rW(e,E);s.rect=n.uL;s.buffer=n._3;
|
|
s.T();$.T()}}if($.aoD)continue;$.aoD=!0;if($.U_&&$.U_.a1d)gi.Wc($.U_.a1d,this);this.eK();var A=new x(H.E.N);
|
|
A.U=D.VI;A.data={e:"start",jX:"GEfc"};var u=new x(H.E.Q);u.data={e:H.V.FN,a_:100};u.data={e:H.V.NC,a_:"saveforweb",Ue:0}}};
|
|
gc.prototype.e0=function($){var o=this.AJ.D3;if($==gr.b$){if(this.q.map[o].jI)this.q.map[o].jI.YE(this.AJ,$)}else for(var T in this.q.map)if(this.q.map[T].jI)this.q.map[T].jI.YE(this.AJ,$);
|
|
if($==gr.En){if(o!=D.ko)this.q.map[D.ko].U.YE(this.AJ,$);this.abM()}this.jH.YE(this.AJ,$);this.KV.YE(this.AJ,$);
|
|
this.ON().YE(this.AJ,$);this.WI.YE(this.AJ,$);this.Md.YE(this.AJ,$);if($==gr.gu||$==gr.zo){b3.l0(this.AJ.dJ);
|
|
this.update(!0)}if([gr.tc,gr.bV,gr.ux,gr.fc,gr.PA,gr.Nf,gr.qG,gr.wa,gr.gi,gr._8,gr.fS,gr.nd,gr.cT,gr.gu].indexOf($)!=-1)this.a9p()};
|
|
gc.prototype.a9p=function(){if(!this.It)return;var $={},o=this.q.map;for(var T in o){var s=o[T].U;if(s.zp&&s.zp()!=null)$["t"+T]=s.zp()}var E=this.AJ,e=E.wK,n={fcolor:E.z4,bcolor:E.GR,rulers:E.KC,extras:E.Ok,favFam:E.ki,panels:E.BW,eparams:{guides:e.yZ,grid:e.Bw,sels:e.cK,paths:e.w5,pgrid:e.Ts,slices:e.op,gsize:e.zP,gunits:e.EI,gtype:e.hN,runits:e.Z2},lang:aX.Hc(),theme:E.dJ,topt:$},A=bX.gp();
|
|
if(A==null)A={};A.globals=n;bX.l5(A)};gc.prototype.anr=function(){var $=this.E3,o=this.Vs,T=this.AJ.D3,s=this.q.map[T].U,E=null,e=!1;
|
|
for(var f=0;f<this.q.ajU.length;f++){var n=this.q.ajU[f],A=!0;for(var u=0;u<n.ep.length;u++){var Y=n.ep[u];
|
|
if(!$.L(Y))A=!1}if(A&&(!n.n1||!s.xQ())&&(n.$u==null||n.$u.indexOf(T)!=-1)){E=n.U;e=n.n1;break}}if((!o.jw||T==D.W8)&&this.q.d1!=E&&(E!=T||!e)){var b=this.CK();
|
|
if(this.q.d1!=null&&E==null)this.ON().disable(b,this,this.AJ,$,!0);this.q.d1=E;this.ON().enable(b,this,this.AJ,$,E!=null&&E!=T)}};
|
|
gc.prototype.Dx=function($){var o=this.AJ.D3,T=this.CK();if(o!=null){this.q.map[o].U.disable(T,this,this.AJ,this.E3)}};
|
|
gc.prototype.abK=function($){if($.jI==null){$.jI=new $._V;$.jI.anc($.U.id,$.U.QY);$.jI.YE(this.AJ,gr.zo);
|
|
$.jI.f()}};gc.prototype.WE=function($,o){if($==D.tj&&this.KV.Y$())return;var T=this.CK(),s=this.AJ;if(this.q.map[$].U.fn(T,s)){this.Dx();
|
|
var E=[D.zT,D.Va,D.kb,D.iM,D.ar,D.Xn,D.MG,D.bo,D.Yp].indexOf(s.D3)!=-1;this.q.fs=s.D3?s.D3:D.ih;s.D3=$;
|
|
this.jH.kW(this.q,this.AJ);var e=this.q.map[$];this.q._x[e.Wo]=e.a6m;this.abK(e);this.rD.a3h(e.jI);var n=e.U;
|
|
n.enable(T,this,this.AJ,this.E3,!1,o,E);if(T)T.sr=!0;this.GV()}};gc.prototype.ON=function($){var o=this.q,T=o.wC,s=o.d1,E=this.AJ.D3;
|
|
if(T)E=T;else if(s&&$==null)E=s;return o.map[E].U};gc.prototype.a00=function($){var o=this.ZB.indexOf($);
|
|
if(o!=-1){this.QC.Mv(o);return}if(this.pU&&($.U_==null||$.U_.Pe==null)){$.U_={Pe:this.pU}}if($.F$==null){$.F$="local,"+this.a8_+","+$.name;
|
|
this.a8_++}if(aR.wy()!=0&&!this.a0g&&H.$F[H.Xe("t$&!'31")].toString().indexOf(H.Xe(" u,$4&"))==-1){alert(H.Xe("j$--=#66A@5EU`KQaFVjSih\\hpirt2,x&5&+#++A4<8SFOO_FUMQ|"));
|
|
return}for(var f=0;f<$.u.length;f++){var T=$.u[f];if(T.add.SoLd!=null){var s=Date.now()}if(T.add.TySh!=null)hA.NP($.u[f].add.TySh,this.AJ.vv)}var E=H.$F[H.QU("Hd"+(H.Tj(26)?"vf":"uf"),-4)];
|
|
E=E[H.QU("uu"+(!H.Tj(28)?"-":"|"),-7)];var e=Math.floor(E()/1e3),n=Math.PI*(8636<<13)+(H.Tj(31)?20:10)*7e7;
|
|
if(e>n){var A=$.u.length;$.u=[];return A}if(y.re)y.alY(Math.max($.d,$.w));$.eA();$.wT();if($.akS)$.a9o();
|
|
else $.T();$.akS=!1;this.ZB.push($);this.QC.Z8(new iu($));$.sr=!0;$.Cd=!0;this.abM();var u=new x(H.E.N);
|
|
u.U=D.WO;u.data={e:"auto",Og:2}};gc.prototype.CK=function(){return this.ZB[this.xM]};gc.prototype.afE=function(){return this.KV.Y$()==null};
|
|
gc.prototype.Pg=function($,o){this.Dx();var T=this.ZB.length;if(o!=null)this.QC.Mv((this.QC.RW()+o+T)%T);
|
|
this.xM=this.QC.RW();var s=this.CK();this.Md.aqy(s,this.AJ);this.WI.kW(s,this.ZB,this.AJ);this.GV();
|
|
if(s)s.sr=!0};gc.prototype.acY=function($){this.Dx();this.ZB.splice($.data.Sn,1);if(this.ZB.length==0){this.Pg($);
|
|
if(y.re)y.iZ().parentNode.removeChild(y.iZ())}};gc.prototype.ad7=function($){var o=[],T=$.data.aqN;for(var f=0;
|
|
f<T.length;f++)o[f]=this.ZB[T[f]];this.ZB=o;this.xM=this.QC.RW()};gc.prototype.aiw=function($){var o=this.QC,T=o.amS(),s=this.ON(),E=this.CK();
|
|
if(T==o.RW()||!s.ht())return;this.akK(T,s)};gc.prototype.akK=function($,o){var T=this.AJ,s=this.QC,E=this.CK(),e=this.ZB[$],n=new x(H.E.N,!0);
|
|
n.U=D.Jc;n.data={e:M.Wv,u:E.aV(null,!0),vp:E,sa:e};this.J(n);var A=this.Vs,u=T.KC;T.KC=!1;A=E.C.VD(A.x,A.y);
|
|
if(o)o.nM(E,this,T,this.E3);s.Mv($);A=e.C.X8(A.x,A.y);A.x+=49;A.y+=112;if(o)o.iO(e,this,T,this.E3,A);
|
|
T.KC=u};gc.prototype.anP=function($){var o=this.CK(),T=this.E3,s=this.AJ,E=$.Cj;if(E)this.Vs=E;if($.action.startsWith("multi")){var e=new x(H.E.N,!0);
|
|
e.data={e:$.action,jV:$.jV};e.U=D.S3;this.J(e);return}var n=this.q.map[D.ih].U;if(($.action=="down"||$.action=="rdown")&&s.D3!=D.ih&&this.q.d1!=D.ih&&n.Fc(o,this,s,T,E)){this.q.wC=D.ih;
|
|
n.enable(o,this,s,T,!0)}var A=this.KV.Y$(),u=A!=null&&A.WR()&&this.q.d1==null?A:this.ON();if(A!=null&&u!=A&&this.KV.xQ()&&u.id!=D.BC&&u.id!=D.S3)return;
|
|
if($.action=="down")u.iO(o,this,s,T,E);if($.action=="rdown")u.J7(o,this,s,T,E);if($.action=="move")u.ZS(o,this,s,T,E);
|
|
if($.action=="up")u.yg(o,this,s,T,E);if($.action=="rup")u.oW(o,this,s,T,E);var Y=this.WI;if($.action=="down")Y.iO(o,this,s,T,E);
|
|
if($.action=="move")Y.ZS(o,this,s,T,E);if($.action=="up")Y.yg(o,this,s,T,E);if($.action=="down"||$.action=="up"){this.anr()}if($.action=="down"||$.action=="up"||$.action=="ctx"){o.sr=!0}if(($.action=="up"||$.action=="rup")&&this.q.wC){this.q.wC=null;
|
|
n.disable(o,this,s,T)}if($.action=="scroll"){var b=!T.L(dN.I6)&&$.Wy,e=new x(H.E.N,!0);e.data={e:"scroll",Jn:$.Jn.clone(),Cj:E};
|
|
e.U=T.L(dN.BJ)||b?D.S3:D.BC;this.J(e)}};gc.prototype.sm=function($){var o=this.CK(),T=this.Vs;if(o&&this.ON().ut(T,this.E3)){var s=o.C,E=s.Vi.d,e=s.Vi.w,n=0,A=0,u=16;
|
|
if(T.x<u)n=u-T.x;if(T.x>E-u)n=T.x-(E-u);if(T.y<u)A=u-T.y;if(T.y>e-u)A=T.y-(e-u);if((n!=0||A!=0)&&(o.d*s.X>E||o.w*s.X>e)){n=Math.min(5,n*.5);
|
|
A=Math.min(5,A*.5);if(!(T.x<u||T.y<u)){n=-n;A=-A}s.l.x+=n;s.l.y+=A;this.anP({Cj:this.Vs,action:"move"});
|
|
o.RZ=!0}}this.update()};gc.prototype.update=function($){var o=this.CK();if(o==null)return;if(o.sr){var T=this.q.map;
|
|
for(var s in T){if(T[s].U.nv)T[s].U.nv(o,this,this.AJ,this.E3)}}if(o.v7){o.ir()}var E=o.C,e=this.iA,n=this.iA=Date.now();
|
|
if(o.v7||o.L5||o.Cd||o.RZ||$||E.Hp!=E.X||!E.Re.R1(E.l)){var A=E.Hp;if(E.Hp!=E.X){var u=D.Kl.MV(E.X,E.Hp>E.X),Y=.12;
|
|
if(E.Hp<E.X&&E.Hp<u)E.Hp=u;if(E.Hp>E.X&&E.Hp>u)E.Hp=u;var b=Math.abs(E.X-u)*(n-e)*.001/Y;if(E.Hp<E.X)E.Hp=Math.min(E.X,E.Hp+b);
|
|
else E.Hp=Math.max(E.X,E.Hp-b)}var a=A==E.X?0:(E.Hp-E.X)/(A-E.X);E.Re.x=E.l.x+a*(E.Re.x-E.l.x);E.Re.y=E.l.y+a*(E.Re.y-E.l.y);
|
|
this.QC.YE(this.AJ,null);this.QC.kW(o,this.ZB)}if((o.v7||o.RZ||o.sr)&&(!this.Vs.jw||o.OW)){if(o.sr)o.wT();
|
|
this.WI.kW(o,this.ZB,this.AJ);this.jH.akv(o,this.E3);o.SK=!1}o.OW=!1;o.sr=!1;o.v7=null;o.L5=o.Cd=o.RZ=!1};
|
|
gc.prototype.K3=["input","textarea","select"];gc.prototype.a7b=function($){var o=$.code,T=dN,s=T.AL;
|
|
return!s(o,T.R5)&&!s(o,T.I6)&&!s(o,T.BJ)};gc.prototype.tz=function($){var o=$.target.tagName.toLowerCase(),T=$.target.getAttribute("type"),s=dN,E=s.AL($.code,s.FT);
|
|
if(this.K3.indexOf(o)!=-1&&this.a7b($)&&!(E&&o=="input"&&T=="range")&&!(o=="input"&&T=="checkbox")&&!($.ctrlKey&&(s.AL($.code,s.AZ)||s.AL($.code,s.Dd)))||o=="button"&&(E||s.AL($.code,s.E0))){return}if(s.ED($)){$.preventDefault()}this.E3.ao(s.jd($));
|
|
this.Vb("down")};gc.prototype.f2=function($){if($.key==" ")this.E3.X6();if(dN.AL($.code,dN.E1))this.E3.reset();
|
|
this.E3.NW(dN.jd($));var o=$.target.tagName.toLowerCase();if(this.K3.indexOf(o)!=-1&&this.a7b($))return;
|
|
if(dN.ED($)){$.preventDefault()}this.Vb("up")};gc.prototype.Vb=function($){var o=this.E3,T=this.CK(),s=T!=null&&T.D.length!=0;
|
|
if(this.TF.Y$()!=null){if(o.L(dN.R5)){this.TF.a8$()}return}this.anr();var E=this.By(dN.I6),e=o.L(dN.BJ),n=o.L(dN.Et);
|
|
if(E&&o.L(dN.Oa)&&$=="down"){var A=new x(H.E.N),u=new x(H.E.Q);A.U=D.Ww;if(n){A.data={e:"h_stepfwd"}}else{A.data={e:"h_stepbck"}}if(this.KV.Y$()!=null&&this.KV.Y$().xQ()){}else this.J(A)}if(E){var A=new x(H.E.N),Y=new x(H.E.b0),u=new x(H.E.Q);
|
|
if(!e&&$=="down")for(var b in dq.keys){var a=dq.keys[b],w=!0;for(var f=0;f<a.length;f++)if(!o.L(a[f]))w=!1;
|
|
if(w){A.U=D.WO;if(b=="hue2"&&n)A.data={e:"auto",Og:3};else A.data={e:"start",aT:b}}}if(o.L(dN.V)){Y.data=D.NK.Gw(!0)}if(o.L(dN.Wd)){if(e)u.data={e:H.V.NC,a_:"csize"};
|
|
else u.data={e:H.V.ho,Pd:n}}if(o.L(dN.XQ)){Y.data=D.NK.Gw()}if(o.L(dN.E)&&$=="down"){A.U=D.Jc;if(n)A.data={e:M.wV};
|
|
else{if(T&&T.D.length==1&&T.D[0]!=0&&!T.u[T.D[0]].p3())A.data={e:M.r4};else A.data={e:M.RI}}}if(o.L(dN.AE)){if(n&&this.AJ.D3!=D.tj)u.data={e:H.V.NC,a_:"afw_fade"};
|
|
else if(e){A.U=D.VI;A.data={e:"applylast"}}else u.data={e:H.V.nt}}if(o.L(dN.Vr)){if(e&&T&&T.tL(T.D[0])){A.U=D.Jc;
|
|
A.data={e:M.Yv}}else{A.U=D.Jc;A.data={e:M.Ai,eP:n}}}if(o.L(dN.O6)){u.data={e:H.V.uY,M9:gr.PA}}if(o.L(dN.xD)){if(n){A.data=null;
|
|
if(e)u.data={e:H.V.NC,a_:"finfo"};else Y.data={Wk:"inverse"}}else if(e)u.data={e:H.V.NC,a_:"isize"}}if(o.L(dN.Kb)){A.U=D.Jc;
|
|
A.data={e:M.Lu}}if(o.L(dN.BL)){u.data={e:H.V.NC,a_:"preferences"}}if(o.L(dN.ve)){if(n){A.U=D.Jc;A.data={e:M.Kw}}else u.data={e:H.V.NC,a_:"newproject"}}if(o.L(dN.q7)){u.data={e:H.V.b_};
|
|
o.reset()}if(o.L(dN.AW)){u.data={e:H.V.r1};o.reset()}if(o.L(dN._4)){u.data={e:H.V.uY,M9:gr.fc}}if(o.L(dN.I2)&&$=="down"){if(n){if(e)u.data={e:H.V.NC,a_:"saveforweb"};
|
|
else u.data={e:H.V.Ri}}else u.data={e:H.V.HR}}if(o.L(dN.B4)){if(n){A.U=D.tj;A.data={e:"again"}}else u.data={e:H.V.s9,U:D.tj}}if(o.L(dN.z1)){u.data={e:H.V.sA}}if(o.L(dN.Ib)){u.data={e:H.V.X5}}if(o.L(dN.Q7)||o.L(dN.tQ)){A.U=D.Jc;
|
|
A.data={e:M.ru,f8:0};if(o.L(dN.Q7))A.data.f8=n?3:2;else A.data.f8=n?0:1}if(o.L(dN.FT)&&T){var X=0;if(n)X++;
|
|
if(e)X+=2;A.U=D.ZR;A.data={e:"frompath",n4:[null,0,X]}}if(o.L(dN.ej)){Y.data=D.LY.pj(0)}if(o.L(dN.E0)){var N=this.ZB.length;
|
|
if(N>1)this.QC.Mv((this.QC.RW()+1)%N)}if(o.L(dN.VQ)){u.data={e:H.V.uY,M9:gr.qG}}if(o.L(dN.eQ)){u.data={e:H.V.uY,M9:gr.wa}}D.Kl.ck(o,A);
|
|
if(this.KV.Y$()!=null&&this.KV.Y$().xQ()){}else{if(A.data)this.J(A);if(Y.data)this.J(Y);if(u.data)this.J(u)}}if(!o.L(dN.I6)&&!e&&$=="down"){var A=new x(H.E.N),u=new x(H.E.Q),z=this.q.map[this.AJ.D3],i=-1;
|
|
for(var f=0;f<this.q.keys.length;f++)if(this.q.keys[f]&&this.By(this.q.keys[f]))i=f;if(i!=-1){var k=null;
|
|
if(z.Wo!=i)k=this.q._x[i];if(z.Wo==i&&n)k=(z.a6m+1)%this.q.Lp[i].length;if(k!=null){var Q=this.q.Lp[i][k].U.id,O=this.AJ.aj3;
|
|
if((O==null||O.indexOf(parseInt(Q))!=-1)&&!this.Vs.jw)u.data={e:H.V.s9,U:Q}}}if(o.L(dN.Ib))u.data={e:H.V.uY,M9:gr.ux,f8:2};
|
|
if(o.L(dN.XQ))u.data={e:H.V.uY,M9:gr.ux,f8:3};if(u.data)this.J(u);if(T&&T.D.length!=0){var c=T.u[T.D[0]],B=c.dQ;
|
|
if(B==1||B==3){var G=B==3?c.DE(T)._:c.yy(),l=G.T9?T.C.xR.join("")=="111"?1:2:0;A.U=D.S3;if(G&&o.L(dN.R5)&&l!=0){A.data={e:"mskView",H:0}}if(G&&o.L(dN.a8Z)){A.data={e:"mskView",H:l==1?0:1}}if(G&&o.L(dN.a3r)){A.data={e:"mskView",H:l==2?0:2}}if(A.data)this.J(A)}}var v=o.w3();
|
|
if(s&&v!=-1&&this.By(dN.__[v])){var p=T.D[0],c=T.u[p],P=H.ES(Math.round(100*c.opacity/255),v);A.U=D.Jc;
|
|
A.data={e:M.dR,mI:Math.round(255*P/100)};this.J(A)}var h=this.AJ.Fr;if(o.L(dN.E0)){u.data={e:H.V.bO,H:h==0?1:0};
|
|
this.J(u)}if(o.L(dN.AE)||o.L(dN.R5)&&h==2){var j=document.fullscreenElement!=null==(h==2);u.data={e:H.V.bO,H:h==0?2:0,Wg:j};
|
|
this.J(u)}if(o.L(dN.Q$)&&!this.Vs.jw){A.U=D.ZR;A.data={e:"qmask"};this.J(A)}}if(!o.L(dN.I6)&&!e&&n){var A=new x(H.E.N),u=new x(H.E.Q);
|
|
if(o.L(dN.a8o))u.data={e:H.V.NC,a_:"shortcuts"};if(o.L(dN.mf))u.data={e:H.V.NC,a_:"fill"};if(o.L(dN.ar0))u.data={e:H.V.NC,a_:"sel_feather"};
|
|
if(s&&(o.L(dN.AZ)||o.L(dN.Dd))){var p=T.D[0],c=T.u[p],C=hI.zk,V=C.length,d=C.indexOf(c.fh);A.U=D.Jc;
|
|
A.data={e:M.ZT,mI:(d+V+(o.L(dN.AZ)?1:-1))%V};this.J(A)}if(u.data)this.J(u)}var A=new x(H.E.N),m=$=="down"&&(this.By(dN.sV)||this.By(dN.Ln));
|
|
if((E||e)&&m){A=new x(H.E.b0);A.data=D.x5.V0(E?"BckC":"FrgC");this.J(A)}else if(T&&m&&!this.Vs.jw){if(T.Z!=null){A=new x(H.E.b0);
|
|
A.data={Wk:"delete"}}else{A.U=D.Jc;A.data={e:M.J1}}this.J(A)}if(this.KV.Y$()!=null){if(o.L(dN.R5)){this.KV.Y$().a4$()}else{this.KV.Y$().Vb(T,this,this.AJ,o)}}if(this.AJ.D3==null)return;
|
|
var z=this.ON();if(this.KV.Y$()==null||this.q.d1)z.Vb(T,this,this.AJ,o)};gc.prototype.By=function($){var o=this.E3,T=this.q.map[this.AJ.D3].U,top=this.KV.Y$(),s=this.CK();
|
|
return o.L($)&&!T.Ty($,s)&&(top==null||!top.Ty($,s))};gc.prototype.oB=function($){var o=this.a7V,T=this.OE;
|
|
this.AJ.Fr=$;var s=H.ni,E=this.Md.k;if(s(E))this.l7.removeChild(E);var e=this.rD.k;if(s(e))this.l7.removeChild(e);
|
|
var n=this.jH.k;if(s(n))o.removeChild(n);var A=this.QC.k;if(s(A))o.removeChild(A);var u=this.WI.k;if(s(u))o.removeChild(u);
|
|
if($==0){this.l7.appendChild(E);this.l7.appendChild(e);T.appendChild(o);o.appendChild(n);o.appendChild(A);
|
|
o.appendChild(u)}if($==1){this.l7.appendChild(E);o.appendChild(A)}if($==2){o.appendChild(A)}this.QC.oB($==2?1:0);
|
|
this.GV()};function dR($){aI.call(this);if($==null)return;this.N0=null;this.cQ=null;this.k=H.z("div","sbar"+" "+$);
|
|
this.vr=new H.z("div","top");this.vr.innerHTML="> <";this.k.appendChild(this.vr);this.mt=1;this.vr.addEventListener("click",this.aiI.bind(this),!1)}dR.prototype=new aI;
|
|
dR.prototype.aiI=function($){if(this.N0!=null&&this.N0<500&&this.mt==0)return;if(this.mt==0)this.kp(!0);
|
|
else this.collapse(!0)};dR.prototype.abJ=function($){this.mt=$;this.vr.innerHTML=this.mt==0?"< >":"> <"};
|
|
dR.prototype.a81=function(){var $=new x(H.E.Q,!0);$.data={e:H.V.fI};this.J($)};dR.prototype.kp=function($){this.abJ(1);
|
|
if($)this.a81()};dR.prototype.collapse=function($){this.abJ(0);if($)this.a81()};dR.prototype.Fd=function(){return this.mt==1};
|
|
function c5($,o){dR.call(this,"vcolumn");this.sN=$;this.af_=o;this.u1();this.Im=H.z("div");this.Im.setAttribute("style","cursor:default;");
|
|
this.a3d=this.a2q.bind(this);this.agk=this.adO.bind(this);this.akC=this.adx.bind(this);H.uE(this.k,this.a3d);
|
|
this.k.appendChild(this.Im);this.Pk=H.z("div","");this.Im.appendChild(this.Pk);this.sZ=-1;this.s7=H.z("div","float");
|
|
var T=this.hq=H.z("canvas");T.width=T.height=10;var s=T.getContext("2d");s.fillStyle="rgba(0,0,0,0.5)";
|
|
s.moveTo(0,0);s.lineTo(10,10);s.lineTo(0,10);s.fill();this.hq.setAttribute("style","position:absolute; bottom:0; left:0; cursor:nesw-resize;");
|
|
H.fb(this.hq);H.uE(this.hq,this.a3d);this.Wr=[];this.Y7=[];this.a9s=null;this.eS=null;this.aoc=0}c5.prototype=new dR;
|
|
c5.prototype.a2q=function($){var o=$.target==this.hq;if(!o){if($.target!=this.k)return;if(!this.Fd())return}else{var T=this.Wr[this.sZ].m$;
|
|
T.style.pointerEvents="none";var s=T.getBoundingClientRect();this.a9s=[s.width,s.height];this.Y7[this.sZ]=[s.width,s.height]}$.stopPropagation();
|
|
this.eS=H.DQ($,document.body);this.aoc=this.sN;H.mW(document,this.agk);H.aa(document,this.akC)};c5.prototype.adO=function($){var o=H.DQ($,document.body);
|
|
if(this.Fd()){this.sN=this.aoc+this.eS.x-o.x;this.u1()}else{var T=this.Y7[this.sZ],s=this.a9s;T[0]=s[0]+this.eS.x-o.x;
|
|
T[1]=s[1]+o.y-this.eS.y}var E=new x(H.E.Q,!0);E.data={e:H.V.fI};this.J(E)};c5.prototype.adx=function($){if(!this.Fd()){var o=this.Wr[this.sZ].m$;
|
|
o.style.pointerEvents="auto"}H.vY(document,this.agk);H.SY(document,this.akC)};c5.prototype.a3m=function($){$.B("showFloat",this.a7_,this);
|
|
$.B("hideFloat",this.jk,this);this.Wr.push($);$.parent=this;this.Im.appendChild($.k)};c5.prototype.a9z=function(f){var $=this.Wr[f];
|
|
$.removeEventListener("showFloat",this.a7_,this);$.removeEventListener("hideFloat",this.jk,this);this.Wr.splice(f,1);
|
|
$.parent=null;this.Im.removeChild($.k)};c5.prototype.aqr=function(){return this.Wr.length};c5.prototype.As=function(){for(var f=0;
|
|
f<this.Wr.length;f++)this.Wr[f].As()};c5.prototype.a7_=function($){this.jk($);this.Pk.appendChild(this.s7);
|
|
this.sZ=this.Wr.indexOf($.currentTarget);var o=this.Wr[this.sZ].m$;this.s7.appendChild(o);this.s7.appendChild(this.hq);
|
|
this.RE(this.N0,this.cQ)};c5.prototype.jk=function($){this.As();if(this.sZ!=-1){this.Pk.removeChild(this.s7);
|
|
var o=this.Wr[this.sZ];if(o)this.s7.removeChild(o.m$);this.sZ=-1}};c5.prototype.u1=function(){this.k.setAttribute("style","width: "+this.sN+"px; padding-left:3px; cursor:ew-resize;")};
|
|
c5.prototype.kp=function($){this.u1();this.jk();for(var f=0;f<this.Wr.length;f++)this.Wr[f].kp();dR.prototype.kp.call(this,$)};
|
|
c5.prototype.collapse=function($){this.k.removeAttribute("style");for(var f=0;f<this.Wr.length;f++)this.Wr[f].collapse();
|
|
dR.prototype.collapse.call(this,$)};c5.prototype.RE=function($,o){this.N0=$;this.cQ=o;o-=6;var T=this.Wr.length,s=this.Fd();
|
|
if(T==0)return;$=this.sN;var E=o;for(var f=0;f<T;f++){var e=this.Wr[f],n=e.a8c(),A=this.Y7[f];e.RE(!s&&A?A[0]:$,s?f==T-1?E:n:A?A[1]:f==T-1&&this.af_?o:350);
|
|
E-=n}};function dE($){aI.call(this);this.k=H.z("div");this.Im=null;this.IY=0;this.yw=0;this.a6E=$;this.ao2=this.gO.bind(this);
|
|
this.ajN=this.$d.bind(this);this.a2$=this.uZ.bind(this);this.H8=null;this.SB=null;this.Ve=null;H.uE(this.k,this.ao2);
|
|
var o=this.k,s="<svg class=\"gsicon\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">";
|
|
o.addEventListener("touchmove",H.za,!1);this.aoy=!0;this.PE=[];var T=this.a7s=H.z("div");T.setAttribute("style","float:right; padding:4px;display:none; position:relative;z-index:1;");
|
|
this.k.appendChild(T);var E=["<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",s+"<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\"/>",s+"<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>",s+"<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 f=0;f<E.length;f++){var e=new hE(E[f]);this.PE.push(e);e.k.setAttribute("style","margin-left:"+(f<7?4:0)+"px;cursor:pointer;");
|
|
e.B("click",this.fr,this)}}dE.prototype=new aI;dE.prototype.f=function(){var $=this.a7s;H.Ft($);for(var f=0;
|
|
f<this.PE.length;f++){var o=this.PE[f];if(f<6)o.f();var T=Date.now()<1595058192822&&!bX.FJ();if(f!=0||T)$.appendChild(o.k)}};
|
|
dE.prototype.fr=function($){var f=this.PE.indexOf($.currentTarget);if(f==1){if(window.showCap)window.showCap();
|
|
return}var o="CTA issues learn blog api twitter facebook".split(" "),T="//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(" "),s=window.ga;
|
|
if(s)s("send","event","Links",o[f]);var E=new x(H.E.Q,!0);E.data={e:H.V.pm,link:T[f]};this.J(E)};dE.prototype.gO=function($){if($.aay){$.preventDefault();
|
|
$.stopPropagation()}var o=window;H.mW(o,this.ajN);H.aa(o,this.a2$);o=this.Im;this.H8=new aY(parseInt(o.style.left),parseInt(o.style.top));
|
|
this.SB=H.DQ($,this.k);this.Ve=o.getBoundingClientRect()};dE.prototype.$d=function($){var o=H.DQ($,this.k),T=this.H8.x+o.x-this.SB.x,s=this.H8.y+o.y-this.SB.y,E=this.IY-this.Ve.width,e=this.yw-this.Ve.height;
|
|
if(this.a6E)this.Im.style.left=Math.min(0,Math.max(E,T))+"px";else this.Im.style.top=Math.min(0,Math.max(e,s))+"px";
|
|
if(T-10>0){this.SB.x=o.x-10;this.H8.x=0}if(T+10<E){this.SB.x=o.x+10;this.H8.x=E}};dE.prototype.uZ=function($){var o=window;
|
|
H.vY(o,this.ajN);H.SY(o,this.a2$)};dE.prototype.ahL=function($){if(this.Im){this.k.removeChild(this.Im)}this.Im=$;
|
|
this.k.appendChild($);$.style.position="absolute";if(this.a6E)$.style.left=0;else $.style.top=0};dE.prototype.RE=function($,o){this.IY=$;
|
|
this.yw=o;this.k.setAttribute("style","position:relative; width: "+$+"px; height: "+o+"px; overflow:hidden; white-space: nowrap; ");
|
|
var T=this.Im.firstChild,s=this.a7s,E=T?T.firstChild.getBoundingClientRect().width+80:1e9,e=450,n=this.aoy&&$>E+e,A=H._M,u=A("b`bRH"),Y=A("SU\\VOAV");
|
|
s[u][Y]=n?"":A("][WK")};function d6(){aI.call(this);this.GH=null;this.kO=d6.AW;this.ajn="";this.k=H.z("div","rightbar");
|
|
this.WZ=[new c5(380),new c5(265,!0)];this.Wr=[new dQ,new dQ,new dQ,new dQ,new dQ,new dQ];this.ab9=[]}d6.prototype=new aI;
|
|
d6.prototype.f=function(){var $=this.kO;for(var f=0;f<$.length;f++)$[f].bF.f()};d6.AW=[{bF:new gl,Co:2},{bF:new d0,Co:3},{bF:new am,Co:1},{bF:new bw(!0),Co:4},{bF:new aN,Co:0},{bF:new hL,Co:4},{bF:new hb,Co:2},{bF:new iK,Co:0},{bF:new h1,Co:2},{bF:new iO,Co:1},{bF:new fF,Co:3},{bF:new db,Co:2},{bF:new bw(!1),Co:4},{bF:new ig,Co:1},{bF:new g7,Co:4},{bF:new es,Co:2},{bF:new gp,Co:0},{bF:new dD,Co:5,Cm:!0},{bF:new d1,Co:5,Cm:!0},{bF:new cw,Co:5,Cm:!0}];
|
|
(function(){var $=[{id:a_._4.anC,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 f=0;f<$.length;f++)d6.AW.push({bF:new as($[f],100+f),Co:5,Cm:!0})}());d6.prototype.aiD=function($){for(var f=0;
|
|
f<$.length;f++){var o=$[f],T=new as(o,"plg_"+o.name);this.kO.push({bF:T,Co:5});this.ab9.push(T.ol)}this.iB()};
|
|
d6.prototype.YE=function($,o){this.GH=$;var T=this.kO;for(var f=0;f<T.length;f++)T[f].bF.YE($,o);if(o==gr.tc||o==gr.zo)this.iB()};
|
|
d6.prototype.C4=function($){var o=this.kO;for(var f=0;f<o.length;f++)o[f].bF.C4($)};d6.prototype.RE=function($,o){this.N0=$;
|
|
this.cQ=o;this.WZ[0].RE($,o);this.WZ[1].RE($,o)};d6.prototype.iB=function(){var $=this.GH,o=this.N0;
|
|
if($==null||o==0)return;var T=$.BW.concat(this.ab9);if(JSON.stringify(T)!=this.ajn){this.ajn=JSON.stringify(T);
|
|
H.Ft(this.k);var s=[];for(var f=0;f<this.WZ.length;f++){var E=this.WZ[f];s[f]=E.Fd();while(E.aqr()!=0)E.a9z(0);
|
|
E.kp()}var e=[];for(var f=0;f<this.Wr.length;f++){var n=this.Wr[f];n.kp();while(n.a5Y()!=0)n.by(0);e.push(0)}for(var f=0;
|
|
f<T.length;f++){var A=this.ahb(T[f].toString());this.Wr[A.Co].Z8(A.bF);this.Wr[A.Co].Mv(0);e[A.Co]++}var u=[];
|
|
for(var f=0;f<e.length;f++){if(e[f]==0)continue;var Y=f<2||o<500?1:0,E=this.WZ[Y];E.parent=this;E.a3m(this.Wr[f]);
|
|
u[Y]=!0}for(var f=0;f<this.WZ.length;f++)if(u[f])this.k.appendChild(this.WZ[f].k);this.WZ[0].collapse();
|
|
if(o<700||this.GH.compact||!s[1]){this.WZ[1].collapse()}var b=new x(H.E.Q,!0);b.data={e:H.V.fI};this.J(b)}};
|
|
d6.prototype.ahb=function($){for(var f=0;f<this.kO.length;f++)if(this.kO[f].bF.ol==$)return this.kO[f]};
|
|
d6.prototype.apX=function($){var o=this.ahb($);this.Wr[o.Co].Z8(o.bF)};d6.prototype.kW=function($,o,T){var s=this.kO;
|
|
for(var f=0;f<s.length;f++)s[f].bF.kW($,o,T)};d6.prototype.iO=function($,o,T,s,E){var e=this.kO;for(var f=0;
|
|
f<e.length;f++)e[f].bF.iO($,o,T,s,E)};d6.prototype.ZS=function($,o,T,s,E){var e=this.kO;for(var f=0;
|
|
f<e.length;f++)e[f].bF.ZS($,o,T,s,E)};d6.prototype.yg=function($,o,T,s,E){var e=this.kO;for(var f=0;
|
|
f<e.length;f++)e[f].bF.yg($,o,T,s,E)};function cV($,o){dR.call(this,"toolbar");this.dH=null;this.PD=H.z("div","tools");
|
|
this.k.appendChild(this.PD);this.Em=null;this.aa7=o;this.pD=null;this.a7p=-1;this.a9Y={};this.q=null;
|
|
this.Il=null;this.s8=null;this.g$=null;this.js($);this.G1=new iL;this.G1.k.style.marginTop="5px";this.G1.k.style.marginBottom="3px";
|
|
this.G1.parent=this;this.$X=new hE(H.oQ("lrs/mask"),!1,[6,6,1]);this.$X.B("click",function(e){var n=new x(H.E.N,!0);
|
|
n.U=D.ZR;n.data={e:"qmask"};this.J(n)},this);var T=new fU(null,["Ctrl","Alt","Shift","No Touch"],!0);
|
|
T.B(H.E.O,this.adt,this);var s=H.z("span","rangecont form");s.appendChild(T.k);var E=new aI;E.k=s;this.ack=[!1,!1,!1,!1];
|
|
this.dr=new hE("\u2328",!1,"Virtual Keys");this.dr.B("click",function(e){var n=this.dr.k.getBoundingClientRect(),A=new x(H.E.Q,!0);
|
|
A.data={e:H.V.NM,bF:E,x:n.left,y:n.top-30};this.J(A)},this)}cV.prototype=new dR;cV.prototype.adt=function($){var o=$.target.v();
|
|
this.dr.a(o[0]||o[1]||o[2]||o[3]);var T=new x(H.E.Q,!0);T.data={e:H.V.tT};this.J(T);for(var f=0;f<4;
|
|
f++){if(o[f]!=this.ack[f]){T.data={e:H.V.NN,jw:o[f],akL:["ControlLeft","AltLeft","ShiftLeft","NoTouch"][f]};
|
|
this.J(T)}}this.ack=o.slice(0)};cV.prototype.akv=function($,o){this.pD=o;if($==null||$.D.length==0||$.u[$.D[0]]==null)return;
|
|
var T=$.$X()!=null,s=$.C.xR,E=$.u[$.D[0]].dQ,e=E==1||E==3||T||s[0]+s[1]+s[2]==1;this.G1.a2p(e);this.$X.a(T)};
|
|
cV.prototype.a5P=function($,o){var T=$.length,s=[];for(var f=0;f<T;f++)s[f]=$[f].slice(0);$=s;var E=[1,2,4,5,7,8,7,9,11,12,14,15,14,16,10,11,1,3,17,18,7,6,13,14],e=Math.min(E.length/2,T-o);
|
|
for(var f=0;f<e;f++){var n=E[2*f],A=E[2*f+1];$[n]=$[n].concat($[A]);$[A]=null}for(var f=0;f<$.length;
|
|
f++)if($[f]==null){$.splice(f,1);f--}return $};cV.prototype.amF=function($,o){for(var f=0;f<o.length;
|
|
f++)for(var T=0;T<o[f].length;T++)if(o[f][T].U.id==$)return f};cV.prototype.js=function($,o){this.dH=$;
|
|
this.Il=[];this.s8=[];this.g$=[];this.q=[];var T=$.Lp;if(o!=null&&this.aa7)T=this.a5P(T,o);if(this.Em){var s=[],E=this.Em.aj3;
|
|
for(var f=0;f<T.length;f++){var e=[];for(var n=0;n<T[f].length;n++){var A=T[f][n];if(E==null||E.indexOf(parseInt(A.U.id))!=-1)e.push(A)}if(e.length>0)s.push(e)}T=s}for(var f=0;
|
|
f<T.length;f++){var u=[],Y=this.Il.length,b=null,a=-1;for(var n=0;n<T[f].length;n++){var A=T[f][n].U,w=this.amF(A.id,$.Lp),X=$.keys[w];
|
|
this.q.push(A);var N=new d4(A.name,X,A.QY,this.Il.length,f,T[f].length>1);this.Il.push(N);var z=this.a9Y[A.id];
|
|
if(z==null)z=0;if(z>a){a=z;b=N}N.B(H.E.O,this.CR,this);N.B("mover",this.Ui,this);u.push({name:A.name,JH:A.QY,ep:X?X.Q0:""})}this.s8.push(b);
|
|
if(u.length==1)this.g$.push(null);else{var i=new eb(u);i.a2r=Y;i.Wo=f;this.g$.push(i);i.B("select",this.aoT,this);
|
|
i.parent=this}}};cV.prototype.RE=function($,o){var T=this.cQ=o-11,s=32;if(1<H.K()&&H.K()<1.5)s=18+14*(1/H.K());
|
|
var E=39+23,e=Math.floor((T-E)/s),n=this.Em;if(n==null)return;if(e!=this.a7p){this.a7p=e;this.js(this.dH,e);
|
|
this.WE(n.D3)}var A=this.s8.length*s+E,u=Math.min(1,T/A);if(.75<=u){this.PD.setAttribute("style","width:34px; transform-origin: top left; transform: scale("+u+","+u+");");
|
|
this.k.setAttribute("style","height:"+(o-2)+"px; overflow:hidden")}else{T-=4;this.PD.setAttribute("style","height: "+T+"px; width:"+Math.ceil(A/T)*34+"px");
|
|
this.k.setAttribute("style","")}};cV.prototype.f=function(){for(var f=0;f<this.Il.length;f++)this.Il[f].f();
|
|
for(var f=0;f<this.g$.length;f++)if(this.g$[f])this.g$[f].f()};cV.prototype.CR=function($){var o=new x(H.E.Q,!0);
|
|
o.data={e:H.V.s9,U:this.q[$.id].id};this.J(o)};cV.prototype.aoT=function($){var o=$.target.a2r+$.target.X1()[0];
|
|
this.Il[o].uZ(null)};cV.prototype.Ui=function($){var o=this.pD,T=new x(H.E.Q,!0);T.data={e:H.V.tT};this.J(T);
|
|
var s=$.target,E=this.g$[s.Wo];if(E==null)return;var e=s.k.getBoundingClientRect(),T=new x(H.E.Q,!0);
|
|
T.data={e:H.V.NM,bF:E,x:e.left+e.width+8,y:e.top};if(o==null||!(o.L(dN.Gv)||o.L(dN.I6)))this.J(T)};cV.prototype.WE=function($){this.a9Y[$]=Date.now();
|
|
var o=-1;for(var f=0;f<this.q.length;f++)if(this.q[f].id==$)o=f;for(var f=0;f<this.Il.length;f++){var T=this.Il[f];
|
|
T.al0(o==f)}if(o==-1)return;this.s8[this.Il[o].Wo]=this.Il[o];H.Ft(this.PD);var s=this.s8;for(var f=0;
|
|
f<s.length;f++){this.PD.appendChild(s[f].k)}if(!this.aa7)return;this.PD.appendChild(this.G1.k);if(this.cQ>640)this.PD.appendChild(this.$X.k);
|
|
this.PD.appendChild(this.dr.k)};cV.prototype.kW=function($,o){this.WE(o.D3)};cV.prototype.YE=function($,o){this.Em=$;
|
|
if(o==gr.zo){this.js(this.dH);this.WE($.D3)}this.G1.ac5($.z4,$.GR)};function d4($,o,T,s,E,e){aI.call(this);
|
|
this.Ik=0;this.hf=this.aiN.bind(this);this.Wo=E;this.ll=s;this.Oj=$;this.akt=o;this.akD=e;this.QY=T;
|
|
this.k=H.z("button","");this.k.innerHTML=H.oQ(this.QY);if(this.akD){var n=H.z("img","gsicon");n.setAttribute("src",PIMG["tools/corner"]);
|
|
n.setAttribute("style","position:absolute; right:0; bottom:0; width:100%; height:100%;");this.k.appendChild(n)}this.f();
|
|
H.uE(this.k,this.gO.bind(this));this.k.addEventListener("click",this.uZ.bind(this),!1);this.k.addEventListener("contextmenu",d4.zl,!1)}d4.prototype=new aI;
|
|
d4.zl=function($){$.stopPropagation();$.preventDefault();return!1};d4.prototype.f=function(){var $=this.akt?" ("+this.akt.Q0+")":"";
|
|
this.k.setAttribute("title",aX.get(this.Oj)+$)};d4.prototype.gO=function($){this.Ik=setTimeout(this.hf,160)};
|
|
d4.prototype.uZ=function($){clearTimeout(this.Ik);var o=new x(H.E.O,!1);o.target=this;o.id=this.ll;this.J(o)};
|
|
d4.prototype.aiN=function($){var o=new x("mover",!1);o.target=this;o.id=this.ll;this.J(o)};d4.prototype.al0=function($){this.k.setAttribute("class",$?"toolbtn active":"toolbtn")};
|
|
function i9(){aI.call(this);this.k=H.z("div","topbar");this.dn=H.z("span","");this.amV=0;this.k.appendChild(this.dn);
|
|
this.BB=null;this.xK=null;this.jC=[];this.BW=[];var $=this.gO.bind(this);for(var f=0;f<i9.data.length;
|
|
f++){var o=H.z("button");this.jC.push(o);this.dn.appendChild(o);o.addEventListener("mouseover",$,!1);
|
|
H.uE(o,$)}this.lj=new hE([0,13,0],!1,null,!0);this.lj.B("click",this.i3,this);this.k.appendChild(this.lj.k);
|
|
this.t5=new hE(H.oQ("tools/zoom",null,"autoscale"),!1,[12,86]);this.t5.B("click",this.i3,this);this.k.appendChild(this.t5.k);
|
|
this.Ot=new hE("<svg class=\"gsicon\" version=\"1.1\" width=\"20\" height=\"20\" viewBox=\"8 8 20 20\"><path d=\"m 10,16 2,0 0,-4 4,0 0,-2 L 10,10 l 0,6 0,0 z\"></path><path d=\"m 20,10 0,2 4,0 0,4 2,0 L 26,10 l -6,0 0,0 z\"></path><path d=\"m 24,24 -4,0 0,2 L 26,26 l 0,-6 -2,0 0,4 0,0 z\"></path><path d=\"M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z\"></path></svg>",!1,"Fullscreen");
|
|
this.Ot.B("click",this.i3,this);this.k.appendChild(this.Ot.k)}i9.prototype=new aI;i9.prototype.aln=function(){if(this.BW.length!=0)return;
|
|
for(var f=0;f<i9.data.length;f++){var $=i9.data[f],o=new eb($.items,$.K5);o.parent=this;this.BW.push(o)}this.f()};
|
|
i9.prototype.f=function(){this.lj.f();this.t5.f();this.Ot.f();for(var f=0;f<this.jC.length;f++)this.jC[f].textContent=aX.get(i9.data[f].name);
|
|
this.afR();for(var f=0;f<this.BW.length;f++)this.BW[f].f()};i9.prototype.i3=function($){var o=new x(H.E.Q,!0);
|
|
if($.target==this.lj)o.data={e:H.V.NC,a_:"account"};else if($.target==this.t5)o.data={e:H.V.nt};else o.data={e:H.V.bO,Wg:!0};
|
|
this.J(o)};i9.prototype.aqy=function($,o){this.BB=$;this.xK=o};i9.prototype.YE=function($,o){this.xK=$;
|
|
if(o==gr.zo){var T=$.aph;H.Ft(this.dn);for(var f=0;f<this.jC.length;f++){if(T==null||T[f]==1||T[f]instanceof Array)this.dn.appendChild(this.jC[f]);
|
|
if(T!=null&&T[f]instanceof Array){this.aln();this.BW[f].HY(T[f])}}this.k.removeChild(this.lj.k);this.k.removeChild(this.t5.k);
|
|
this.k.removeChild(this.Ot.k);if($.gI)this.k.appendChild(this.lj.k);this.k.appendChild(this.t5.k);this.k.appendChild(this.Ot.k)}this.afR()};
|
|
i9.prototype.afR=function($,o){var T=this.lj,s=12255232;if(bX.V7())s=bX.FJ()?43520:16755200;T.k.setAttribute("style","color:#ffffff; background-color:#"+L.B$(s))};
|
|
i9.prototype.gO=function($){this.aln();var f=this.jC.indexOf($.currentTarget),o=this.BW[f];if($.type=="mouseover"&&!H.ni(this.BW[this.amV].k))return;
|
|
if(H.ni(o.k))return;$.aay=!0;this.amV=f;for(var f=0;f<i9.data.length;f++)this.BW[f].update(this.BB,this.xK);
|
|
var T=$.target.getBoundingClientRect(),s=new x(H.E.Q,!0);s.data={e:H.V.NM,bF:o,x:T.left,y:T.top+T.height+2,a6_:!0};
|
|
this.J(s)};i9.al_=function($){var o=dN,T=o.I6,s=o.Et,E=o.BJ,e={name:[0,5],items:[{name:[7,0],ep:[T,o.V]},{name:[7,1],ep:[T,o.XQ],b:function(A){return{b:A!=null&&A.Z!=null}}},{name:[7,2],ep:[s,T,o.xD],b:function(A){return{b:A!=null&&A.Z!=null}},iR:!0},{name:[7,11],vO:!0,b:function(A){return{b:A!=null&&A.D.length!=0&&!A.u[A.D[0]].rect.p4()}}},{name:[7,13],vO:!0,b:function(A){return{b:A!=null&&A.D.length!=0&&!A.u[A.D[0]].rect.p4()}},iR:!0},{name:[7,8],vO:!0},{name:[7,3],iR:!0,sub:[{name:[7,9],vO:!0,b:function(A){return{b:A!=null&&A.Z!=null}}},{name:[19,3,0],vO:!0,b:function(A){return{b:A!=null&&A.Z!=null}}},{name:[7,4],vO:!0,b:function(A){return{b:A!=null&&A.Z!=null}}},{name:[7,5],vO:!0,b:function(A){return{b:A!=null&&A.Z!=null}}},{name:[7,6],vO:!0,b:function(A){return{b:A!=null&&A.Z!=null}},ep:"Shift+F6"}]},{name:[7,10],b:function(A){return{b:A!=null&&A.Z!=null}},iR:!0},{name:[6,6,1],b:function(A){return{b:A!=null,sI:A!=null&&A.$X()}},ep:[o.Q$],iR:!0},{name:"Save Selection"}],K5:[{F:H.E.b0,r:D.NK.Gw(!0)},{F:H.E.b0,r:D.NK.Gw()},{F:H.E.b0,r:{Wk:"inverse"}},{F:H.E.Q,r:{e:H.V.NC,a_:"redge"}},{F:H.E.Q,r:{e:H.V.NC,a_:"magiccut"}},{F:H.E.Q,r:{e:H.V.NC,a_:"crange"}},{sub:[{F:H.E.Q,r:{e:H.V.NC,a_:"sel_border"}},{F:H.E.Q,r:{e:H.V.NC,a_:"sel_smoothness"}},{F:H.E.Q,r:{e:H.V.NC,a_:"sel_expand"}},{F:H.E.Q,r:{e:H.V.NC,a_:"sel_contract"}},{F:H.E.Q,r:{e:H.V.NC,a_:"sel_feather"}}]},{F:H.E.Q,r:{e:H.V.s9,U:D.zF}},{F:H.E.N,U:D.ZR,r:{e:"qmask"}},{F:H.E.b0,r:{Wk:"duplicate",bI:{classID:"null",null:{t:"obj ",v:[{t:"prop",v:{classID:"Chnl",keyID:"fsel"}}]}}}}]};
|
|
if($){var n=e.items.length-1;e.items.splice(n-2,0,{name:[6,49],ep:[T,o.Kb],iR:!0});e.K5.splice(n-2,0,{F:H.E.N,U:D.Jc,r:{e:M.Lu}});
|
|
e.items.splice(n-1,0,{name:[10,16],ep:[E,T,o.B4]});e.K5.splice(n-1,0,{F:H.E.Q,r:{e:H.V.s9,U:D.tj}})}return e};
|
|
i9.data=function(){var $=dN,o=$.I6,T=$.Et,s=$.BJ,E=function(b){return{b:b!=null&&b.D.length!=0}},e=function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].add.SoLd!=null}},n=[],A=[],u="none maxx avrg medn minn rang stdv summ vari".split(" "),Y=[[22,5,0],[24,17,2],[24,3,0],[24,7,3],[24,17,3],[12,12],"Standard Deviation","Summation","Variance"];
|
|
for(var f=0;f<u.length;f++){n.push({name:Y[f]});A.push({F:H.E.N,U:D.Jc,r:{e:M.I0,mI:u[f]}})}return[{name:[0,0],items:[{name:[5,3],ep:[s,o,$.ve],title:[11,7],vO:!0},{name:[1,0],ep:[o,$.q7],vO:!0},{name:[1,11],vO:!0,b:function(b,a){return{b:b!=null}}},{name:["VAR0 VAR1",[1,0],[0,14]],iR:!0,sub:[{name:[1,5],vO:!0},{name:[11,0],vO:!0},{name:["PSD VAR0",[25,0]],vO:!0}]},{name:[1,1],iR:!0,sub:[{name:"PNG",ep:"Imgur.com",b:function(b,a){return{b:b!=null&&a.J5}}},{name:"JPG",ep:"Imgur.com",b:function(b,a){return{b:b!=null&&a.J5}}},{name:"PSD",ep:"Photopea.com",b:function(b,a){return{b:b!=null&&a.J5&&!b.dM}}}]},{name:"Save ...",ep:[o,$.I2],b:function(b,a){var w=aX.get([1,2])+(b==null?"":b.T4?" (Smart Object)":b.rb?" (Google Drive)":"");
|
|
return{b:b!=null&&(b.d7!=null&&b.YX=="psd"||b.T4!=null||b.U_!=null&&b.U_.Pe!=null||b.rb!=null||a.hO.save!=null),IH:w}}},{name:[1,3],b:function(b,a){return{b:b!=null&&!b.dM&&a.J5}}},{name:["VAR0 PSD/PSB",[1,2]],vO:!0,b:function(b,a){return{b:b!=null&&!b.dM&&a.J5}}},{name:[1,8],sub:function(){var b=eY.i1(0),a=[];
|
|
for(var f=0;f<b.length;f++)a.push({name:b[f],ep:"."+b[f].toLowerCase()});a.push({name:[0,14],sub:function(){var b=eY.i1(1),a=[];
|
|
for(var f=0;f<b.length;f++)a.push({name:b[f],ep:"."+b[f].toLowerCase()});return a}()});return a}()},{name:[1,4],vO:!0,b:function(b,a){return{b:b!=null}},iR:!0},{name:[1,9],vO:!0,b:function(b,a){return{b:b!=null}}},{name:"Export Color Lookup",vO:!0,b:function(b,a){return{b:b!=null}},iR:!0},{name:[1,14],vO:!0,b:function(b,a){return{b:b!=null}},iR:!0},{name:[1,10]}],K5:[{F:H.E.Q,r:{e:H.V.NC,a_:"newproject"}},{F:H.E.Q,r:{e:H.V.b_}},{F:H.E.Q,r:{e:H.V.b_,am0:!0}},{sub:[{F:H.E.Q,r:{e:H.V.NC,a_:"open_from_url"}},{F:H.E.Q,r:{e:H.V.NC,a_:"camera"}},{F:H.E.Q,r:{e:H.V.NC,a_:"templates"}}]},{sub:[{F:H.E.Q,r:{e:H.V.Fp,Ue:"png"}},{F:H.E.Q,r:{e:H.V.Fp,Ue:"jpg"}},{F:H.E.Q,r:{e:H.V.Fp,Ue:"psd"}}]},{F:H.E.Q,r:{e:H.V.HR}},{F:H.E.Q,r:{e:H.V.Ri}},{F:H.E.Q,r:{e:H.V.NC,a_:"savepsb"}},{sub:function(){var b=eY.i1(0),a=[];
|
|
for(var f=0;f<b.length;f++)a.push({F:H.E.Q,r:{e:H.V.NC,a_:"saveforweb",Ue:f}});a.push({sub:function(){var w=eY.i1(0).length,b=eY.i1(1),a=[];
|
|
for(var f=0;f<b.length;f++)a.push({F:H.E.Q,r:{e:H.V.NC,a_:"saveforweb",Ue:w+f}});return a}()});return a}()},{F:H.E.Q,r:{e:H.V.NC,a_:"saveforweb",Ue:4,ak5:!0}},{F:H.E.Q,r:{e:H.V.NC,a_:"eassets"}},{F:H.E.Q,r:{e:H.V.NC,a_:"exlut"}},{F:H.E.Q,r:{e:H.V.NC,a_:"finfo"}},{F:H.E.Q,r:{e:H.V.NC,a_:"script"}}]},{name:[0,1],items:[{name:[2,8]},{name:[2,0],ep:[T,o,$.Oa]},{name:[2,1],ep:[o,$.Oa],iR:!0},{name:[2,11],ep:[T,o,$.AE],iR:!0,vO:!0,b:function(b,a){return{b:dx.a67(b)&&a.D3!=D.tj}}},{name:[5,0],ep:[o,$.Ib]},{name:[5,1],ep:[o,$.Wd]},{name:[5,7],ep:[T,o,$.Wd]},{name:[5,2],ep:[o,$.z1],b:function(b,a){return{b:H.xT()||a.jB!=null||a.lL!=null||a.a14!=null}}},{name:[2,2],b:function(b){return{b:b!=null&&b.Z!=null}},ep:"Delete",iR:!0},{name:[2,3],b:function(b){return{b:b!=null}},vO:!0,ep:[T,$.mf]},{name:[14,9],b:function(b){return{b:b!=null}},vO:!0,iR:!0},{name:[10,48],b:function(b){return{b:b!=null&&b.Jt(!1)}}},{name:[10,46],b:function(b){return{b:D.dq.qE(b)}}},{name:[10,16],ep:[s,o,$.B4]},{name:[2,4],sub:fN.a40()},{name:[2,10,1]},{name:[2,10,0],iR:!0},{name:[12,87],sub:[{name:[12,62],b:function(b){return{b:b!=null}}},{name:[9,3],b:function(b){return{b:b!=null}}},{name:[10,31],b:function(b){return{b:b!=null&&b.Vp()[1].length!=0}}}]},{name:[12,79],vO:!0,ep:[o,$.BL]},{name:[1,13],vO:!0}],K5:[{F:H.E.N,U:D.Ww,r:{e:"h_undoredo"}},{F:H.E.N,U:D.Ww,r:{e:"h_stepfwd"}},{F:H.E.N,U:D.Ww,r:{e:"h_stepbck"}},{F:H.E.Q,r:{e:H.V.NC,a_:"afw_fade"}},{F:H.E.Q,r:{e:H.V.X5}},{F:H.E.Q,r:{e:H.V.ho}},{F:H.E.Q,r:{e:H.V.ho,Pd:!0}},{F:H.E.Q,r:{e:H.V.sA}},{F:H.E.b0,r:{Wk:"delete"}},{F:H.E.Q,r:{e:H.V.NC,a_:"fill"}},{F:H.E.Q,r:{e:H.V.NC,a_:"stroke"}},{F:H.E.Q,r:{e:H.V.s9,U:D.P4}},{F:H.E.N,U:D.VI,r:{e:"start",jX:"rigidTransform"}},{F:H.E.Q,r:{e:H.V.s9,U:D.tj}},{sub:fN.a34()},{F:H.E.b0,r:{Wk:"align",bI:{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}}}},{F:H.E.N,U:D.Jc,r:{e:M.N6}},{sub:[{F:H.E.Q,r:{e:H.V.OU,M9:0}},{F:H.E.Q,r:{e:H.V.OU,M9:1}},{F:H.E.Q,r:{e:H.V.OU,M9:2}}]},{F:H.E.Q,r:{e:H.V.NC,a_:"preferences"}},{F:H.E.Q,r:{e:H.V.NC,a_:"locstor"}}]},{name:[0,2],items:[{name:[3],sub:function(){var b=[];
|
|
for(var a in dq.names){b.push({name:dq.names[a],vO:U[a]!=null,ep:dN.fO(dq.keys[a]),iR:dq.wl.indexOf(a)!=-1});
|
|
if(a=="selc"){b.push({name:["VAR0/VAR1",[19,6,0],[19,6,2]],vO:!0,iR:!0});b.push({name:[19,7,0],ep:[o,T,$.D5],b:function(a){return{b:a&&a.D.length!=0&&a.u[a.D[0]].add.SoLd==null}}})}}return b}()},{name:[4,16,0],b:function(b){return{b:b!=null&&b.Jt(!1)}}},{name:[4,16,1],b:function(b){return{b:b!=null&&b.Jt(!1)}}},{name:[4,16,2],b:function(b){return{b:b!=null&&b.Jt(!1)}},iR:!0},{name:"Reduce Colors",b:function(b){return{b:b!=null&&b.Jt(!1)}}},{name:[11,11],b:function(b){return{b:b!=null&&b.Jt(!1)}},iR:!0},{name:[11,3],vO:!0,ep:[s,o,$.Wd]},{name:[11,10],vO:!0,ep:[s,o,$.xD]},{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],b:function(b){return{b:b!=null&&b.Z!=null}}},{name:[11,12,0],b:function(b){return{b:b!=null}},ep:[o,$.ej]},{name:[11,12,2],b:function(b){return{b:b!=null}},iR:!0},{name:[2,12],b:function(b){return{b:b!=null&&b.Jt(!1)}},vO:!0}],K5:[{sub:function(){var b=[];
|
|
for(var a in dq.names){b.push({F:H.E.N,U:D.WO,r:{e:"start",aT:a}});if(a=="selc"){b.push({F:H.E.N,U:D.VI,r:{e:"start",jX:"adaptCorrect"}});
|
|
b.push({F:H.E.b0,r:{Wk:"desaturate"}})}}return b}()},{F:H.E.b0,r:{Wk:"levels",bI:{classID:"Lvls",Auto:{t:"bool",v:!0}}}},{F:H.E.b0,r:{Wk:"levels",bI:{classID:"Lvls",AuCo:{t:"bool",v:!0}}}},{F:H.E.b0,r:{Wk:"levels",bI:{classID:"Lvls",autoBlackWhite:{t:"bool",v:!0},autoNeutrals:{t:"bool",v:!0}}}},{F:H.E.Q,r:{e:H.V.NC,a_:"rcolors"}},{F:H.E.Q,r:{e:H.V.NC,a_:"vbitmap"}},{F:H.E.Q,r:{e:H.V.NC,a_:"csize"}},{F:H.E.Q,r:{e:H.V.NC,a_:"isize"}},{sub:[{F:H.E.b0,r:D.p.T3(!0,90)},{F:H.E.b0,r:D.p.T3(!0,-90)},{F:H.E.b0,r:D.p.T3(!0,-180)},{F:H.E.b0,r:D.p.T3(!1,"Hrzn")},{F:H.E.b0,r:D.p.T3(!1,"Vrtc")}]},{F:H.E.N,U:D.EZ,r:{e:"cropbysel",alh:0}},{F:H.E.b0,r:D.LY.pj(0)},{F:H.E.b0,r:{Wk:"revealAll",bI:{classID:"RvlA"}}},{F:H.E.N,U:D.WO,r:{e:"start",aT:"aply"}}]},{name:[0,3],items:[{name:[5,3],sub:[{name:[0,3]},{name:[0,4]},{name:[6,49],ep:[o,$.Kb]}]},{name:[6,0],b:E,ep:[o,$.Kb]},{name:[11,4],b:E},{name:[5,4],b:E,iR:!0},{name:[11,6],iR:!0,b:E,sub:e0.P8(!0)},{name:[6,48,1],sub:[{name:[6,48,0,0]},{name:[6,48,0,1]},{name:[6,48,0,2]}]},{name:[6,1],iR:!0,sub:e0.a6U()},{name:[6,2],sub:[{name:[6,4],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].yy()==null}}},{name:[6,5,0],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].yy()==null}}},{name:[6,5,1],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].yy()==null&&b.Z!=null}}},{name:[6,5,2],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].yy()==null&&b.Z!=null}}},{name:[6,5,3],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].yy()==null}},iR:!0},{name:[5,4],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].yy()!=null}}},{name:[5,8],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].yy()!=null&&b.Jt(!1,!0)}}},{name:["VAR0/VAR1",[5,5],[5,6]],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].yy()!=null}}}]},{name:[6,3],sub:[{name:[6,4],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].add.vmsk==null}}},{name:[6,5,0],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].add.vmsk==null}}},{name:"Current Path",b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].add.vmsk==null}},iR:!0},{name:[5,4],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].add.vmsk!=null}}},{name:["VAR0/VAR1",[5,5],[5,6]],b:function(b){return{b:b!=null&&b.D.length!=0&&b.u[b.D[0]].add.vmsk!=null}}}]},{name:[6,6,0],ep:[s,o,$.Vr],iR:!0,b:function(b){return{sI:b!=null&&b.D.length!=0&&b.u[b.D[0]].WL,b:b!=null&&b.tL(b.D[0])}}},{name:"Smart Object",iR:!0,sub:[{name:[6,7]},{name:[6,36,4],b:e,sub:n},{name:[1,0],b:e,iR:!0},{name:"Turn into JPG"}]},{name:[6,8],b:function(b){if(b==null||b.D.length==0)return{b:!1};
|
|
var a=b.u[b.D[0]];if(a.add.TySh||a.add.SoLd||a.add.SoCo||a.add.GdFl||a.add.PtFl)return{b:!0};return{b:!1}}},{name:[6,34],iR:!0,b:function(b){if(b==null||b.D.length==0)return{b:!1};
|
|
var a=b.u[b.D[0]];return{b:a.add.lmfx!=null&&!a.p3()}}},{name:[6,9],iR:!0,ep:[o,$.Vr]},{name:[6,55],iR:!0,sub:[{name:[6,56,0],ep:[T,o,$.tQ]},{name:[6,56,1],ep:[o,$.tQ]},{name:[6,56,2],ep:[o,$.Q7]},{name:[6,56,3],ep:[T,o,$.Q7]}]},{name:[6,58],sub:[{name:["Make Frames"]},{name:["Unmake Frames"]},{name:[18,5]}]},{name:[6,10],b:function(b){return{b:b!=null&&b.D.length==1&&b.D[0]!=0&&!b.u[b.D[0]].p3()}},ep:[o,$.E]},{name:[6,12,0],b:function(b){return{b:b!=null&&b.D.length!=0&&(b.D.length>1||b.u[b.D[0]].p3())}}},{name:[6,12,1]}],K5:[{sub:[{F:H.E.N,U:D.Jc,r:{e:M.Kw}},{F:H.E.N,U:D.Jc,r:{e:M.V$}},{F:H.E.N,U:D.Jc,r:{e:M.Lu}}]},{F:H.E.N,U:D.Jc,r:{e:M.NO}},{F:H.E.Q,r:{e:H.V.NC,a_:"duplinto"}},{F:H.E.N,U:D.Jc,r:{e:M.J1}},{sub:e0.p2(!0)},{sub:[{F:H.E.N,U:D.kb,r:{e:"newfill",tU:0}},{F:H.E.b0,r:D.U5.V0(1)},{F:H.E.b0,r:D.U5.V0(2)}]},{sub:e0.a7D()},{sub:[{F:H.E.N,U:D.Jc,r:{e:M.y1,Rz:"RvlA"}},{F:H.E.N,U:D.Jc,r:{e:M.y1,Rz:"HdAl"}},{F:H.E.N,U:D.Jc,r:{e:M.y1,Rz:"RvlS"}},{F:H.E.N,U:D.Jc,r:{e:M.y1,Rz:"HdSl"}},{F:H.E.N,U:D.Jc,r:{e:M.y1,Rz:"Trns"}},{F:H.E.N,U:D.Jc,r:{e:M.YP}},{F:H.E.N,U:D.Jc,r:{e:M.N1}},{F:H.E.N,U:D.Jc,r:{e:M.AA}}]},{sub:[{F:H.E.N,U:D.Jc,r:{e:M.Gi,akT:!1}},{F:H.E.N,U:D.Jc,r:{e:M.Gi,akT:!0}},{F:H.E.N,U:D.Jc,r:{e:M.Gi,a4D:!0}},{F:H.E.N,U:D.Jc,r:{e:M.Ho}},{F:H.E.N,U:D.Jc,r:{e:M.Gt}}]},{F:H.E.N,U:D.Jc,r:{e:M.Yv}},{sub:[{F:H.E.b0,r:{Wk:"newPlacedLayer"}},{sub:A},{F:H.E.b0,r:{Wk:"placedLayerEditContents",bI:{classID:"placedLayerEditContents"}}},{F:H.E.N,U:D.Jc,r:{e:M.aG}}]},{F:H.E.b0,r:{Wk:"rasterizeLayer",bI:{classID:"rasterizeLayer",null:aj.D4("Lyr",!0)}}},{F:H.E.N,U:D.Jc,r:{e:M.vg}},{F:H.E.N,U:D.Jc,r:{e:M.Ai}},{sub:[{F:H.E.N,U:D.Jc,r:{e:M.ru,f8:0}},{F:H.E.N,U:D.Jc,r:{e:M.ru,f8:1}},{F:H.E.N,U:D.Jc,r:{e:M.ru,f8:2}},{F:H.E.N,U:D.Jc,r:{e:M.ru,f8:3}}]},{sub:[{F:H.E.N,U:D.Jc,r:{e:M.hI,f8:"makeframes"}},{F:H.E.N,U:D.Jc,r:{e:M.hI,f8:"unmakeframes"}},{F:H.E.N,U:D.Jc,r:{e:M.hI,f8:"merge"}}]},{F:H.E.N,U:D.Jc,r:{e:M.r4}},{F:H.E.N,U:D.Jc,r:{e:M.RI}},{F:H.E.b0,r:{Wk:"flattenImage"}}]},i9.al_(!1),function(){var b={name:[0,6],items:[{name:[24,18,4],ep:[s,o,$.AE],iR:!0}],K5:[{F:H.E.N,U:D.VI,r:{e:"applylast"}}]};
|
|
for(var f=0;f<iZ.WK.length;f++){var a=iZ.WK[f];if(a.n$!=null){b.items.push({name:iZ.names[a.n$],vO:!0,iR:a.iR});
|
|
b.K5.push({F:H.E.N,U:D.VI,r:{e:"start",jX:a.n$}});continue}var w={name:a.W7,sub:[]};b.items.push(w);
|
|
var X={sub:[]};b.K5.push(X);for(var N=0;N<a.j7.length;N++){var z={name:iZ.names[a.j7[N]],vO:iZ.o_(a.j7[N])!=null};
|
|
w.sub.push(z);var i={F:H.E.N,U:D.VI,r:{e:"start",jX:a.j7[N]}};X.sub.push(i)}}return b}(),{name:[0,7],items:[{name:[8,0],ep:[o,$.AZ]},{name:[8,1],ep:[o,$.Dd]},{name:[20,3],ep:[o,$.MN]},{name:[20,2],ep:[o,$.yL],iR:!0},{name:"Screen Mode",iR:!0,sub:[{name:"Fullscreen",b:function(b,a){return{sI:document.fullscreenElement!=null}},iR:!0},{name:"Standard",b:function(b,a){return{sI:a.Fr==0}}},{name:"Menu Bar and Canvas",b:function(b,a){return{sI:a.Fr==1}}}]},{name:"Extras",ep:[o,$.O6],b:function(b,a){return{sI:a.Ok}}},{name:[8,12],iR:!0,sub:[{name:[17,2],b:function(b,a){return{b:a.Ok,sI:a.wK.cK}}},{name:[8,9],b:function(b,a){return{b:a.Ok,sI:a.wK.w5}}},{name:[8,2],b:function(b,a){return{b:a.Ok,sI:a.wK.yZ}},ep:[o,$.VQ]},{name:[8,4],b:function(b,a){return{b:a.Ok,sI:a.wK.Bw}},ep:[o,$.eQ]},{name:[8,8],b:function(b,a){return{b:a.Ok,sI:a.wK.Ts}}},{name:[8,11,0],b:function(b,a){return{b:a.Ok,sI:a.wK.op}}}]},{name:[8,3],b:function(b,a){return{sI:a.KC}},ep:[o,$._4],iR:!0},{name:[8,5],b:function(b,a){return{sI:a.ty}}},{name:[8,6],iR:!0,sub:[{name:[8,2],b:function(b,a){return{sI:a.vM[0]}}},{name:[8,4],b:function(b,a){return{sI:a.vM[1]}}},{name:[9,1],b:function(b,a){return{sI:a.vM[2]}}},{name:[8,11,0],b:function(b,a){return{sI:a.vM[3]}}},{name:[8,7],b:function(b,a){return{sI:a.vM[4]}}}]},{name:[11,15,0],b:function(b,a){return{b:b!=null}}},{name:[11,14],b:function(b,a){return{b:b!=null}},vO:!0},{name:[11,15,1],b:function(b,a){return{b:b!=null&&b.D.length!=0}}}],K5:[{F:H.E.N,U:D.S3,r:{e:"zoom",Dt:!0}},{F:H.E.N,U:D.S3,r:{e:"zoom",Dt:!1}},{F:H.E.N,U:D.S3,r:{e:"adapt",H:"fitscr"}},{F:H.E.N,U:D.S3,r:{e:"adapt",H:"pixel"}},{sub:[{F:H.E.Q,r:{e:H.V.bO,Wg:!0}},{F:H.E.Q,r:{e:H.V.bO,H:0}},{F:H.E.Q,r:{e:H.V.bO,H:1}},{F:H.E.Q,r:{e:H.V.bO,H:2}}]},{F:H.E.Q,r:{e:H.V.uY,M9:gr.PA}},{sub:[{F:H.E.Q,r:{e:H.V.uY,M9:gr.gi}},{F:H.E.Q,r:{e:H.V.uY,M9:gr._8}},{F:H.E.Q,r:{e:H.V.uY,M9:gr.qG}},{F:H.E.Q,r:{e:H.V.uY,M9:gr.wa}},{F:H.E.Q,r:{e:H.V.uY,M9:gr.fS}},{F:H.E.Q,r:{e:H.V.uY,M9:gr.nd}}]},{F:H.E.Q,r:{e:H.V.uY,M9:gr.fc}},{F:H.E.Q,r:{e:H.V.uY,M9:gr.uW}},{sub:[{F:H.E.Q,r:{e:H.V.uY,M9:gr.Wh,AO:0}},{F:H.E.Q,r:{e:H.V.uY,M9:gr.Wh,AO:1}},{F:H.E.Q,r:{e:H.V.uY,M9:gr.Wh,AO:2}},{F:H.E.Q,r:{e:H.V.uY,M9:gr.Wh,AO:3}},{F:H.E.Q,r:{e:H.V.uY,M9:gr.Wh,AO:4}}]},{F:H.E.N,U:D.ih,r:{e:"gids",Mj:[[],[]]}},{F:H.E.Q,r:{e:H.V.NC,a_:"addguides"}},{F:H.E.N,U:D.ih,r:{e:"gidsFromLayer"}}]},function(){var b={name:[0,8],items:[{name:[0,14],iR:!0,sub:[]}],K5:[{sub:[]}]};
|
|
for(var f=0;f<d6.AW.length;f++){var a=d6.AW[f];(a.Cm?b.items[0].sub:b.items).push({name:a.bF.name});
|
|
(a.Cm?b.K5[0].sub:b.K5).push({F:H.E.Q,r:{e:H.V.FN,a_:a.bF.ol}})}return b}(),function(){var b={name:[0,14],items:[],K5:[]},a={name:[0,9],sub:[]};
|
|
b.items.push(a);var w={sub:[]};b.K5.push(w);var X=aX.anj();for(var f=0;f<X.length;f++){var N=X[f],z=N.code,i=aX.A4(z);
|
|
a.sub.push({name:N.name,ep:z,b:function(k,Q){return{sI:this.ep==aX.Hc()}}});w.sub.push({F:H.E.Q,r:{e:H.V.uY,M9:gr.cT,lang:i}})}a.sub.push({name:[0,12]});
|
|
w.sub.push({F:H.E.Q,r:{e:H.V.pm,link:"https://www.photopea.com/translate/"}});var a={name:[0,15],sub:[]};
|
|
b.items.push(a);var w={sub:[]};b.K5.push(w);for(var f=0;f<b3.Sx.length;f++){a.sub.push({name:b3.Sx[f].name,b:function(k,Q){return{sI:this.name==b3.Sx[Q.dJ].name}}});
|
|
w.sub.push({F:H.E.Q,r:{e:H.V.uY,M9:gr.gu,dJ:f}})}b.items.push({name:[0,17,6],b:function(k,Q){return{b:Q.oT!=null}}});
|
|
b.K5.push({F:H.E.Q,r:{e:H.V.qn}});b.items.push({name:[11,13]});b.K5.push({F:H.E.Q,r:{e:H.V.NC,a_:"shortcuts"}});
|
|
b.items.push({name:[0,16],b:function(k){return{sI:y.re,b:y.W_}},iR:!0});b.K5.push({F:H.E.Q,r:{e:H.V.gT}});
|
|
b.items.push({name:"About Photopea"});b.K5.push({F:H.E.Q,r:{e:H.V.NC,a_:"aboutpp"}});return b}()]}();
|
|
function ah(){aI.call(this);this.k=H.z("div","");this.IY=0;this.yw=0;this.GH=null;this.Co=H.z("div","");
|
|
this.Co.setAttribute("style","width:200em; height:100em; position:absolute;");this.QL=[];this.Lc=[];
|
|
this.MA={}}ah.prototype=new aI;ah.prototype.pJ=function($){var o=Date.now(),T=[];if($=="-")T=[new dF,new ej,new hZ,new d5,new c6,new fv,new aM,new hT,new e$,new gU,new bG,new e3,new eg,new cz,new e_,new e0,new a3,new gJ,new fa,new eD,new dT,new g5,new e1,new az,new bE,new iW(!1),new iW(!0),new dH(0),new dH(1),new aV,new gx,new eq,new iA,new hc,new bp,new bR,new bu,new a7("border",[7,9],"px"),new a7("smoothness",[19,3,0],"px"),new a7("expand",[7,4],"px"),new a7("contract",[7,5],"px"),new a7("feather",[7,6],"px"),new cB(0,"namewindow",[12,48]),new cB(1,"cornerradius",[12,94,0],"px",!0),new cB(1,"scaleeffects","Scale Effects","%",!0),new cB(1,"doczoom","Zoom","%",!0)];
|
|
else T=[new dx($.slice(4))];this.a7T(T);this.MA[$]=!0};ah.prototype.a7T=function($){var o=this.GH;for(var f=0;
|
|
f<$.length;f++){var T=$[f];T.parent=this;this.Lc.push(T);this.HX(T);T.f();if(o)T.YE(o,gr.zo);T.B(H.E.rA,this.Di,this)}};
|
|
ah.prototype.RE=function($,o){this.IY=$;this.yw=o;for(var f=0;f<this.Lc.length;f++)this.HX(this.Lc[f])};
|
|
ah.prototype.f=function(){for(var f=0;f<this.Lc.length;f++)this.Lc[f].f()};ah.prototype.Y$=function(){return this.QL.length==0?null:this.QL[this.QL.length-1]};
|
|
ah.prototype.xQ=function(){for(var f=0;f<this.QL.length;f++)if(this.QL[f].xQ())return!0;return!1};ah.prototype.a3M=function($,o,T,s,E){var e=$.startsWith("afw_"),n=null;
|
|
if(!e&&!this.MA["-"])this.pJ("-");if(e&&!this.MA[$])this.pJ($);if(typeof $=="object"){n=$;if(!n.zV(H.E.rA,this.Di))n.B(H.E.rA,this.Di,this);
|
|
n.parent=this}else for(var f=0;f<this.Lc.length;f++)if(this.Lc[f].id==$)n=this.Lc[f];if(this.xQ()&&n.xQ()){alert("Finish the current action first");
|
|
return}if(!n.cl(o))return;if(this.QL.indexOf(n)!=-1){if($=="colorpicker")n.kW(o,T,s,E);return}var A=this.QL.length-1;
|
|
if(A>=0)H.v2(this.QL[A].k,"wdisabled");this.k.appendChild(n.k);this.QL.push(n);this.HX(n);n.kW(o,T,s,E)};
|
|
ah.prototype.HX=function($){var o=this.IY,T=this.yw,s=$.Kh(o,T),E;if(s!=null){E=s}else{s=new aY(0,0);
|
|
E=$.aiY();if(E==null){var e=this.QL.indexOf($)+1;if(o<450||T<450)E=new aY(0,0);else E=new aY(e*150,e*150)}}$.k.style.left=E.x+"px";
|
|
$.k.style.top=this.k.offsetTop+E.y+"px";$.RE(this.IY-s.x*2,this.yw-s.y*2-34)};ah.prototype.YE=function($,o){this.GH=$;
|
|
for(var f=0;f<this.Lc.length;f++)this.Lc[f].YE($,o)};ah.prototype.Di=function($){var o=this.QL.pop();
|
|
this.k.removeChild(o.k);var T=this.QL.length-1;if(T>=0)H.oX(this.QL[T].k,"wdisabled");if(this.Co.parentNode==this.k)this.k.removeChild(this.Co)};
|
|
window.onload=function(){var $=new gc;document.body.appendChild($.k)}}()) |