function Visitor(e,t){if(!e)throw"Visitor requires Adobe Marketing Cloud Org ID";var n=this;n.version="1.3";var r=window;r.s_c_in||(r.s_c_il=[],r.s_c_in=0),n._c="Visitor",n._il=r.s_c_il,n._in=r.s_c_in,n._il[n._in]=n,r.s_c_in++;var i=r.document,s=r.P;s||(s=null);var o=r.Q;o||(o=!0);var u=r.O;u||(u=!1),n.D=function(e){var t=0,n,r;if(e)for(n=0;n<e.length;n++)r=e.charCodeAt(n),t=(t<<5)-t+r,t&=t;return t},n.n=function(e){var t="0123456789",n="",r="",i,s=8,o=10,u=10;if(1==e){t+="ABCDEF";for(e=0;16>e;e++
)i=Math.floor(Math.random()*s),n+=t.substring(i,i+1),i=Math.floor(Math.random()*s),r+=t.substring(i,i+1),s=16;return n+"-"+r}for(e=0;19>e;e++)i=Math.floor(Math.random()*o),n+=t.substring(i,i+1),o=0==e&&9==i?3:10,i=Math.floor(Math.random()*u),r+=t.substring(i,i+1),u=0==e&&9==i?3:10;return n+r},n.J=function(){var e;!e&&r.location&&(e=r.location.hostname);if(e)if(/^[0-9.]+$/.test(e))e="";else{var t=e.split("."),n=t.length-1,i=n-1;1<n&&2>=t[n].length&&0>",ac,ad,ae,af,ag,ai,al,am,an,ao,aq,ar,as,at,au,aw,ax,az,ba,bb,be,bf,bg,bh,bi,bj,bm,bo,br,bs,bt,bv,bw,by,bz,ca,cc,cd,cf,cg,ch,ci,cl,cm,cn,co,cr,cu,cv,cw,cx,cz,de,dj,dk,dm,do,dz,ec,ee,eg,es,eu,fi,fm,fo,fr,ga,gb,gd,ge,gf,gg,gh,gi,gl,gm,gn,gp,gq,gr,gs,gt,gw,gy,hk,hm,hn,hr,ht,hu,id,ie,im,in,io,iq,ir,is,it,je,jo,jp,kg,ki,km,kn,kp,kr,ky,kz,la,lb,lc,li,lk,lr,ls,lt,lu,lv,ly,ma,mc,md,me,mg,mh,mk,ml,mn,mo,mp,mq,mr,ms,mt,mu,mv,mw,mx,my,na,nc,ne,nf,ng,nl,no,nr,nu,om,pa,pe,pf,ph,pk,pl,pm,pn,pr,ps,pt,pw,py,qa,re,ro,rs,ru,rw,sa,sb,sc,sd,se,sg,sh,si,sj,sk,sl,sm,sn,so,sr,st,su,sv,sx,sy,sz,tc,td,tf,tg,th,tj,tk,tl,tm,tn,to,tp,tt,tv,tw,tz,ua,ug,us,uy,uz,va,vc,ve,vg,vi,vn,vu,wf,ws,yt,"
.indexOf(","+t[n]+",")&&i--;if(0<i)for(e="";n>=i;)e=t[n]+(e?".":"")+e,n--}return e},n.cookieRead=function(e){var e=encodeURIComponent(e),t=(";"+i.cookie).split(" ").join(";"),n=t.indexOf(";"+e+"="),r=0>n?n:t.indexOf(";",n+1);return 0>n?"":decodeURIComponent(t.substring(n+2+e.length,0>r?t.length:r))},n.cookieWrite=function(e,t,r){var s=n.cookieLifetime,o,t=""+t,s=s?(""+s).toUpperCase():"";return r&&"SESSION"!=s&&"NONE"!=s?(o=""!=t?parseInt(s?s:0):-60)?(r=new Date,r.setTime(r.getTime()+1e3*o)):1==r&&
(r=new Date,o=r.getYear(),r.setYear(o+2+(1900>o?1900:0))):r=0,e&&"NONE"!=s?(i.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+"; path=/;"+(r?" expires="+r.toGMTString()+";":"")+(n.m?" domain="+n.m+";":""),n.cookieRead(e)==t):0},n.d=s,n.z=function(e,t){try{"function"==typeof e?e.apply(r,t):e[1].apply(e[0],t)}catch(n){}},n.M=function(e,t){t&&(n.d==s&&(n.d={}),void 0==n.d[e]&&(n.d[e]=[]),n.d[e].push(t))},n.l=function(e,t){if(n.d!=s){var r=n.d[e];if(r)for(;0<r.length;)n.z(r.shift(),t)}},n.h=s,
n.K=function(e,t,r){!t&&r&&r();var o=i.getElementsByTagName("HEAD")[0],u=i.createElement("SCRIPT");u.type="text/javascript",u.setAttribute("async","async"),u.src=t,o.firstChild?o.insertBefore(u,o.firstChild):o.appendChild(u),r&&(n.h==s&&(n.h={}),n.h[e]=setTimeout(r,n.loadTimeout))},n.I=function(e){n.h!=s&&n.h[e]&&(clearTimeout(n.h[e]),n.h[e]=0)},n.F=u,n.G=u,n.isAllowed=function(){return!n.F&&(n.F=o,n.cookieRead(n.cookieName)||n.cookieWrite(n.cookieName,"T",1))&&(n.G=o),n.G},n.a=s,n.c=s;var a=n.W;
a||(a="MC");var f=n.Y;f||(f="MCMID");var l=n.X;l||(l="MCCIDH");var c=n.U;c||(c="A");var h=n.R;h||(h="MCAID");var p=n.V;p||(p="AAM");var d=n.T;d||(d="MCAAMLH");var v=n.S;v||(v="MCAAMB");var m=n.Z;m||(m="NONE"),n.u=0,n.C=function(){if(!n.u){var e=n.version;n.customerIDMappingServer&&(e+="|"+n.customerIDMappingServer),n.customerIDMappingServerSecure&&(e+="|"+n.customerIDMappingServerSecure),n.audienceManagerServer&&(e+="|"+n.audienceManagerServer),n.audienceManagerServerSecure&&(e+="|"+n.audienceManagerServerSecure
);if(n.audienceManagerCustomerIDDPIDs)for(var t in n.audienceManagerCustomerIDDPIDs)!Object.prototype[t]&&n.audienceManagerCustomerIDDPIDs[t]&&(e+=t+"="+n.audienceManagerCustomerIDDPIDs[t]);n.u=n.D(e)}return n.u},n.H=u,n.j=function(){if(!n.H){n.H=o;var e=n.C(),t=u,r=n.cookieRead(n.cookieName),i,a,f,c=new Date;n.a==s&&(n.a={});if(r&&"T"!=r){r=r.split("|"),r[0].match(/^[\-0-9]+$/)&&(parseInt(r[0])!=e&&(t=o),r.shift()),1==r.length%2&&r.pop();for(e=0;e<r.length;e+=2)i=r[e].split("-"),a=i[0],f=r[e+1],
i=1<i.length?parseInt(i[1]):0,t&&(a==l&&(f=""),0<i&&(i=c.getTime()/1e3-60)),a&&f&&(n.g(a,f,1),0<i&&(n.a["expire"+a]=i,c.getTime()>=1e3*i&&(n.c||(n.c={}),n.c[a]=o)))}!n.b(h)&&(r=n.cookieRead("s_vi"))&&(r=r.split("|"),1<r.length&&0<=r[0].indexOf("v1")&&(f=r[1],e=f.indexOf("["),0<=e&&(f=f.substring(0,e)),f&&f.match(/^[0-9a-fA-F\-]+$/)&&n.g(h,f)))}},n.N=function(){var e=n.C(),t,r;for(t in n.a)!Object.prototype[t]&&n.a[t]&&"expire"!=t.substring(0,6)&&(r=n.a[t],e+=(e?"|":"")+t+(n.a["expire"+t]?"-"+n.a["expire"+
t]:"")+"|"+r);n.cookieWrite(n.cookieName,e,1)},n.b=function(e,t){return n.a!=s&&(t||!n.c||!n.c[e])?n.a[e]:s},n.g=function(e,t,r){n.a==s&&(n.a={}),n.a[e]=t,r||n.N()},n.t=function(e,t){var r=new Date;r.setTime(r.getTime()+1e3*t),n.a==s&&(n.a={}),n.a["expire"+e]=Math.floor(r.getTime()/1e3),0>t&&(n.c||(n.c={}),n.c[e]=o)},n.B=function(e){return e&&("object"==typeof e&&(e=e.d_mid?e.d_mid:e.visitorID?e.visitorID:e.id?e.id:e.uuid?e.uuid:""+e),e&&(e=e.toUpperCase(),"NOTARGET"==e&&(e=m)),!e||e!=m&&!e.match
(/^[0-9a-fA-F\-]+$/))&&(e=""),e},n.i=function(e,t){n.I(e),n.f!=s&&(n.f[e]=u);if(e==a){var r=n.b(f);if(!r){r="object"==typeof t&&t.mid?t.mid:n.B(t);if(!r){if(n.q){n.getAnalyticsVisitorID(null,!1,!0);return}r=n.n()}n.g(f,r)}if(!r||r==m)r="";"object"==typeof t&&((t.d_region||t.dcs_region||t.d_blob||t.blob)&&n.i(p,t),n.q&&t.mid&&n.i(c,{id:t.id})),n.l(f,[r])}if(e==p&&"object"==typeof t){r=604800,void 0!=t.id_sync_ttl&&t.id_sync_ttl&&(r=parseInt(t.id_sync_ttl));var i=n.b(d);i||((i=t.d_region)||(i=t.dcs_region
),i&&(n.t(d,r),n.g(d,i))),i||(i=""),n.l(d,[i]),i=n.b(v);if(t.d_blob||t.blob)(i=t.d_blob)||(i=t.blob),n.t(v,r),n.g(v,i);i||(i=""),n.l(v,[i])}if(e==c){r=n.b(h),r||((r=n.B(t))||(r=m),n.g(h,r));if(!r||r==m)r="";n.l(h,[r])}},n.f=s,n.o=function(e,t,r,i){var u="",l;if(n.isAllowed()&&(n.j(),u=n.b(e),!u&&(e==f?l=a:e==d||e==v?l=p:e==h&&(l=c),l))){if(n.f==s||!n.f[l])n.f==s&&(n.f={}),n.f[l]=o,n.K(l,t,function(){if(!n.b(e)){var t="";e==f&&(t=n.n()),n.i(l,t)}});return n.M(e,r),""}return(e==f||e==h)&&u==m&&(u=""
,i=o),r&&i&&n.z(r,[u]),u},n._setMarketingCloudFields=function(e){n.j(),n.i(a,e)},n.setMarketingCloudVisitorID=function(e){n._setMarketingCloudFields(e)},n.q=u,n.getMarketingCloudVisitorID=function(e,t){return n.isAllowed()?(n.marketingCloudServer&&0>n.marketingCloudServer.indexOf(".demdex.net")&&(n.q=o),n.o(f,n.r("_setMarketingCloudFields"),e,t)):""},n._mapCustomerIDsDone=function(e){e&&"success"==e.status&&n.g(l,n.s)},n.L=function(){n._mapCustomerIDsDone({status:"success"})},n.e={},n.A=u,n.s="",
n.setCustomerIDs=function(e){n.e=e;if(n.isAllowed()){n.j();var e=n.b(l),t="",r,i;e||(e=0);for(r in n.e)i=n.e[r],!Object.prototype[r]&&i&&(t+=(t?"|":"")+r+"|"+i);n.s=n.D(t),n.s!=e&&(n.A=o,n.L())}},n.getCustomerIDs=function(){return n.e},n._setAnalyticsFields=function(e){n.j(),n.i(c,e)},n.setAnalyticsVisitorID=function(e){n._setAnalyticsFields(e)},n.getAnalyticsVisitorID=function(e,t,r){if(n.isAllowed()){var i="";r||(i=n.getMarketingCloudVisitorID(function(){n.getAnalyticsVisitorID(e,o)}));if(i||r)
{var s=r?n.marketingCloudServer:n.trackingServer,u="";return n.loadSSL&&(r?n.marketingCloudServerSecure&&(s=n.marketingCloudServerSecure):n.trackingServerSecure&&(s=n.trackingServerSecure)),s&&(u="http"+(n.loadSSL?"s":"")+"://"+s+"/id?callback=s_c_il%5B"+n._in+"%5D._set"+(r?"MarketingCloud":"Analytics")+"Fields&mcorgid="+encodeURIComponent(n.marketingCloudOrgID)+(i?"&mid="+i:"")),n.o(r?f:h,u,e,t)}}return""},n._setAudienceManagerFields=function(e){n.j(),n.i(p,e)},n.r=function(e){var t=n.audienceManagerServer
,r="",i=n.b(f),s=n.b(v,o),u="",a,l;n.loadSSL&&n.audienceManagerServerSecure&&(t=n.audienceManagerServerSecure);if(t){if(n.e&&n.audienceManagerCustomerIDDPIDs)for(a in n.e)Object.prototype[a]||(r=n.e[a],l=n.audienceManagerCustomerIDDPIDs[a],r&&l&&(u+=(u?"%01":"&d_cid=")+l+"%01"+encodeURIComponent(r)));e||(e="_setAudienceManagerFields"),r="http"+(n.loadSSL?"s":"")+"://"+t+"/id?d_rtbd=json&d_ver=2"+(!i&&n.q?"&d_verify=1":"")+"&d_orgid="+encodeURIComponent(n.marketingCloudOrgID)+(i?"&d_mid="+i:"")+(s?"&d_blob="+
encodeURIComponent(s):"")+u+"&d_cb=s_c_il%5B"+n._in+"%5D."+e}return r},n.getAudienceManagerLocationHint=function(e,t){return n.isAllowed()&&n.getMarketingCloudVisitorID(function(){n.getAudienceManagerLocationHint(e,o)})?n.o(d,n.r(),e,t):""},n.getAudienceManagerBlob=function(e,t){if(n.isAllowed()&&n.getMarketingCloudVisitorID(function(){n.getAudienceManagerBlob(e,o)})){var r=n.r();return n.A&&n.t(v,-1),n.o(v,r,e,t)}return""},n.k="",n.p={},n.v="",n.w={},n.getSupplementalDataID=function(e,t){!n.k&&!
t&&(n.k=n.n(1));var r=n.k;return n.v&&!n.w[e]?(r=n.v,n.w[e]=o):r&&(n.p[e]&&(n.v=n.k,n.w=n.p,n.k=r=t?"":n.n(1),n.p={}),r&&(n.p[e]=o)),r},0>e.indexOf("@")&&(e+="@AdobeOrg"),n.marketingCloudOrgID=e,n.namespace=t,n.cookieName="AMCV_"+e,n.m=n.J(),n.m==r.location.hostname&&(n.m="");if(t){var g="AMCV_"+t,y=n.cookieRead(n.cookieName),b=n.cookieRead(g);!y&&b&&(n.cookieWrite(n.cookieName,b,1),n.cookieWrite(g,"",-60))}n.loadSSL=0<=r.location.protocol.toLowerCase().indexOf("https"),n.loadTimeout=500,n.marketingCloudServer=
n.audienceManagerServer="dpm.demdex.net",n.customerIDMappingServer="map.adobecrs.com"}function AppMeasurement(){var e=this;e.version="1.3.2";var t=window;t.s_c_in||(t.s_c_il=[],t.s_c_in=0),e._il=t.s_c_il,e._in=t.s_c_in,e._il[e._in]=e,t.s_c_in++,e._c="s_c";var n=t.ob;n||(n=null);var r=t,i,s;try{i=r.parent;for(s=r.location;i&&i.location&&s&&""+i.location!=""+s&&r.location&&""+i.location!=""+r.location&&i.location.host==s.host;)r=i,i=r.parent}catch(o){}e.Za=function(e){try{console.log(e)}catch(t){}}
,e.oa=function(e){return""+parseInt(e)==""+e},e.replace=function(e,t,n){return!e||e.indexOf(t)<0?e:e.split(t).join(n)},e.escape=function(t){var n,r;if(!t)return t;t=encodeURIComponent(t);for(n=0;n<7;n++)r="+~!*()'".substring(n,n+1),t.indexOf(r)>=0&&(t=e.replace(t,r,"%"+r.charCodeAt(0).toString(16).toUpperCase()));return t},e.unescape=function(t){if(!t)return t;t=t.indexOf("+")>=0?e.replace(t,"+"," "):t;try{return decodeURIComponent(t)}catch(n){}return unescape(t)},e.Qa=function(){var n=t.location
.hostname,r=e.fpCookieDomainPeriods,i;r||(r=e.cookieDomainPeriods);if(n&&!e.ha&&!/^[0-9.]+$/.test(n)&&(r=r?parseInt(r):2,r=r>2?r:2,i=n.lastIndexOf("."),i>=0)){for(;i>=0&&r>1;)i=n.lastIndexOf(".",i-1),r--;e.ha=i>0?n.substring(i):n}return e.ha},e.c_r=e.cookieRead=function(t){t=e.escape(t);var n=" "+e.d.cookie,r=n.indexOf(" "+t+"="),i=r<0?r:n.indexOf(";",r);return t=r<0?"":e.unescape(n.substring(r+2+t.length,i<0?n.length:i)),t!="[[B]]"?t:""},e.c_w=e.cookieWrite=function(t,n,r){var i=e.Qa(),s=e.cookieLifetime
,o;return n=""+n,s=s?(""+s).toUpperCase():"",r&&s!="SESSION"&&s!="NONE"&&((o=n!=""?parseInt(s?s:0):-60)?(r=new Date,r.setTime(r.getTime()+o*1e3)):r==1&&(r=new Date,o=r.getYear(),r.setYear(o+5+(o<1900?1900:0)))),t&&s!="NONE"?(e.d.cookie=t+"="+e.escape(n!=""?n:"[[B]]")+"; path=/;"+(r&&s!="SESSION"?" expires="+r.toGMTString()+";":"")+(i?" domain="+i+";":""),e.cookieRead(t)==n):0},e.D=[],e.C=function(t,n,r){if(e.ia)return 0;e.maxDelay||(e.maxDelay=250);var i=0,s=(new Date).getTime()+e.maxDelay,o=e.d.
mb,u=["webkitvisibilitychange","visibilitychange"];o||(o=e.d.nb);if(o&&o=="prerender"){if(!e.V){e.V=1;for(r=0;r<u.length;r++)e.d.addEventListener(u[r],function(){var t=e.d.mb;t||(t=e.d.nb),t=="visible"&&(e.V=0,e.delayReady())})}i=1,s=0}else r||e.r("_d")&&(i=1);return i&&(e.D.push({m:t,a:n,t:s}),e.V||setTimeout(e.delayReady,e.maxDelay)),i},e.delayReady=function(){var t=(new Date).getTime(),n=0,r;for(e.r("_d")&&(n=1);e.D.length>0;){r=e.D.shift();if(n&&!r.t&&r.t>t){e.D.unshift(r),setTimeout(e.delayReady
,parseInt(e.maxDelay/2));break}e.ia=1,e[r.m].apply(e,r.a),e.ia=0}},e.setAccount=e.sa=function(t){var n,r;if(!e.C("setAccount",arguments))if(e.account=t,e.allAccounts){n=e.allAccounts.concat(t.split(",")),e.allAccounts=[],n.sort();for(r=0;r<n.length;r++)(r==0||n[r-1]!=n[r])&&e.allAccounts.push(n[r])}else e.allAccounts=t.split(",")},e.foreachVar=function(t,n){var r,i,s,o,u="";s=i="";if(e.lightProfileID)r=e.H,(u=e.lightTrackVars)&&(u=","+u+","+e.Y.join(",")+",");else{r=e.c;if(e.pe||e.linkType)if(u=e
.linkTrackVars,i=e.linkTrackEvents,e.pe&&(s=e.pe.substring(0,1).toUpperCase()+e.pe.substring(1),e[s]))u=e[s].lb,i=e[s].kb;u&&(u=","+u+","+e.A.join(",")+","),i&&u&&(u+=",events,")}n&&(n=","+n+",");for(i=0;i<r.length;i++)s=r[i],(o=e[s])&&(!u||u.indexOf(","+s+",")>=0)&&(!n||n.indexOf(","+s+",")>=0)&&t(s,o)},e.J=function(t,n,r,i,s){var o="",u,a,f,l,c=0;t=="contextData"&&(t="c");if(n){for(u in n)if(!Object.prototype[u]&&(!s||u.substring(0,s.length)==s)&&n[u]&&(!r||r.indexOf(","+(i?i+".":"")+u+",")>=0)
){f=!1;if(c)for(a=0;a<c.length;a++)u.substring(0,c[a].length)==c[a]&&(f=!0);if(!f&&(o==""&&(o+="&"+t+"."),a=n[u],s&&(u=u.substring(s.length)),u.length>0))if(f=u.indexOf("."),f>0)a=u.substring(0,f),f=(s?s:"")+a+".",c||(c=[]),c.push(f),o+=e.J(a,n,r,i,f);else if(typeof a=="boolean"&&(a=a?"true":"false"),a){if(i=="retrieveLightData"&&s.indexOf(".contextData.")<0)switch(f=u.substring(0,4),l=u.substring(4),u){case"transactionID":u="xact";break;case"channel":u="ch";break;case"campaign":u="v0";break;default:
e.oa(l)&&(f=="prop"?u="c"+l:f=="eVar"?u="v"+l:f=="list"?u="l"+l:f=="hier"&&(u="h"+l,a=a.substring(0,255)))}o+="&"+e.escape(u)+"="+e.escape(a)}}o!=""&&(o+="&."+t)}return o},e.Sa=function(){var t="",n,r,i,s,o,u,a,f,l="",c="",h=r="";if(e.lightProfileID)n=e.H,(l=e.lightTrackVars)&&(l=","+l+","+e.Y.join(",")+",");else{n=e.c;if(e.pe||e.linkType)if(l=e.linkTrackVars,c=e.linkTrackEvents,e.pe&&(r=e.pe.substring(0,1).toUpperCase()+e.pe.substring(1),e[r]))l=e[r].lb,c=e[r].kb;l&&(l=","+l+","+e.A.join(",")+","
),c&&(c=","+c+",",l&&(l+=",events,")),e.events2&&(h+=(h!=""?",":"")+e.events2)}e.AudienceManagement&&e.AudienceManagement.isReady()&&(t+=e.J("d",e.AudienceManagement.getEventCallConfigParams()));for(r=0;r<n.length;r++){s=n[r],o=e[s],i=s.substring(0,4),u=s.substring(4),!o&&s=="events"&&h&&(o=h,h="");if(o&&(!l||l.indexOf(","+s+",")>=0)){switch(s){case"supplementalDataID":s="sdid";break;case"timestamp":s="ts";break;case"dynamicVariablePrefix":s="D";break;case"visitorID":s="vid";break;case"marketingCloudVisitorID"
:s="mid";break;case"analyticsVisitorID":s="aid";break;case"audienceManagerLocationHint":s="aamlh";break;case"audienceManagerBlob":s="aamb";break;case"pageURL":s="g",o.length>255&&(e.pageURLRest=o.substring(255),o=o.substring(0,255));break;case"pageURLRest":s="-g";break;case"referrer":s="r";break;case"vmk":case"visitorMigrationKey":s="vmt";break;case"visitorMigrationServer":s="vmf",e.ssl&&e.visitorMigrationServerSecure&&(o="");break;case"visitorMigrationServerSecure":s="vmf",!e.ssl&&e.visitorMigrationServer&&
(o="");break;case"charSet":s="ce";break;case"visitorNamespace":s="ns";break;case"cookieDomainPeriods":s="cdp";break;case"cookieLifetime":s="cl";break;case"variableProvider":s="vvp";break;case"currencyCode":s="cc";break;case"channel":s="ch";break;case"transactionID":s="xact";break;case"campaign":s="v0";break;case"resolution":s="s";break;case"colorDepth":s="c";break;case"javascriptVersion":s="j";break;case"javaEnabled":s="v";break;case"cookiesEnabled":s="k";break;case"browserWidth":s="bw";break;case"browserHeight"
:s="bh";break;case"connectionType":s="ct";break;case"homepage":s="hp";break;case"plugins":s="p";break;case"events":h&&(o+=(o!=""?",":"")+h);if(c){u=o.split(","),o="";for(i=0;i<u.length;i++)a=u[i],f=a.indexOf("="),f>=0&&(a=a.substring(0,f)),f=a.indexOf(":"),f>=0&&(a=a.substring(0,f)),c.indexOf(","+a+",")>=0&&(o+=(o?",":"")+u[i])}break;case"events2":o="";break;case"contextData":t+=e.J("c",e[s],l,s),o="";break;case"lightProfileID":s="mtp";break;case"lightStoreForSeconds":s="mtss",e.lightProfileID||(
o="");break;case"lightIncrementBy":s="mti",e.lightProfileID||(o="");break;case"retrieveLightProfiles":s="mtsr";break;case"deleteLightProfiles":s="mtsd";break;case"retrieveLightData":e.retrieveLightProfiles&&(t+=e.J("mts",e[s],l,s)),o="";break;default:e.oa(u)&&(i=="prop"?s="c"+u:i=="eVar"?s="v"+u:i=="list"?s="l"+u:i=="hier"&&(s="h"+u,o=o.substring(0,255)))}o&&(t+="&"+s+"="+(s.substring(0,3)!="pev"?e.escape(o):o))}s=="pev3"&&e.g&&(t+=e.g)}return t},e.v=function(e){var t=e.tagName;return""+e.sb!="undefined"||""+
e.eb!="undefined"&&(""+e.eb).toUpperCase()!="HTML"?"":(t=t&&t.toUpperCase?t.toUpperCase():"",t=="SHAPE"&&(t=""),t&&((t=="INPUT"||t=="BUTTON")&&e.type&&e.type.toUpperCase?t=e.type.toUpperCase():!t&&e.href&&(t="A")),t)},e.ka=function(e){var t=e.href?e.href:"",n,r,i;return n=t.indexOf(":"),r=t.indexOf("?"),i=t.indexOf("/"),t&&(n<0||r>=0&&n>r||i>=0&&n>i)&&(r=e.protocol&&e.protocol.length>1?e.protocol:l.protocol?l.protocol:"",n=l.pathname.lastIndexOf("/"),t=(r?r+"//":"")+(e.host?e.host:l.host?l.host:""
)+(h.substring(0,1)!="/"?l.pathname.substring(0,n<0?0:n)+"/":"")+t),t},e.F=function(t){var n=e.v(t),r,i,s="",o=0;if(n){r=t.protocol,i=t.onclick,t.href&&(n=="A"||n=="AREA")&&(!i||!r||r.toLowerCase().indexOf("javascript")<0)?s=e.ka(t):i?(s=e.replace(e.replace(e.replace(e.replace(""+i,"\r",""),"\n",""),"	","")," ",""),o=2):n=="INPUT"||n=="SUBMIT"?(t.value?s=t.value:t.innerText?s=t.innerText:t.textContent&&(s=t.textContent),o=3):t.src&&n=="IMAGE"&&(s=t.src);if(s)return{id:s.substring(0,100),type:o}}return 0
},e.pb=function(t){for(var n=e.v(t),r=e.F(t);t&&!r&&n!="BODY";)if(t=t.parentElement?t.parentElement:t.parentNode)n=e.v(t),r=e.F(t);if(!r||n=="BODY")t=0;return t&&(n=t.onclick?""+t.onclick:"",n.indexOf(".tl(")>=0||n.indexOf(".trackLink(")>=0)&&(t=0),t},e.bb=function(){var n,r,i=e.linkObject,s=e.linkType,o=e.linkURL,u,a;e.Z=1,i||(e.Z=0,i=e.j);if(i){n=e.v(i);for(r=e.F(i);i&&!r&&n!="BODY";)if(i=i.parentElement?i.parentElement:i.parentNode)n=e.v(i),r=e.F(i);if(!r||n=="BODY")i=0;if(i){var f=i.onclick?""+
i.onclick:"";if(f.indexOf(".tl(")>=0||f.indexOf(".trackLink(")>=0)i=0}}else e.Z=1;!o&&i&&(o=e.ka(i)),o&&!e.linkLeaveQueryString&&(u=o.indexOf("?"),u>=0&&(o=o.substring(0,u)));if(!s&&o){var l=0,c=0,h;if(e.trackDownloadLinks&&e.linkDownloadFileTypes){f=o.toLowerCase(),u=f.indexOf("?"),a=f.indexOf("#"),u>=0?a>=0&&a<u&&(u=a):u=a,u>=0&&(f=f.substring(0,u)),u=e.linkDownloadFileTypes.toLowerCase().split(",");for(a=0;a<u.length;a++)(h=u[a])&&f.substring(f.length-(h.length+1))=="."+h&&(s="d")}if(e.trackExternalLinks&&!
s&&(f=o.toLowerCase(),e.na(f))){e.linkInternalFilters||(e.linkInternalFilters=t.location.hostname),u=0,e.linkExternalFilters?(u=e.linkExternalFilters.toLowerCase().split(","),l=1):e.linkInternalFilters&&(u=e.linkInternalFilters.toLowerCase().split(","));if(u){for(a=0;a<u.length;a++)h=u[a],f.indexOf(h)>=0&&(c=1);c?l&&(s="e"):l||(s="e")}}}e.linkObject=i,e.linkURL=o,e.linkType=s;if(e.trackClickMap||e.trackInlineStats)if(e.g="",i)s=e.pageName,o=1,i=i.sourceIndex,s||(s=e.pageURL,o=0),t.s_objectID&&(r.
id=t.s_objectID,i=r.type=1),s&&r&&r.id&&n&&(e.g="&pid="+e.escape(s.substring(0,255))+(o?"&pidt="+o:"")+"&oid="+e.escape(r.id.substring(0,100))+(r.type?"&oidt="+r.type:"")+"&ot="+n+(i?"&oi="+i:""))},e.Ta=function(){var t=e.Z,n=e.linkType,r=e.linkURL,i=e.linkName;n&&(r||i)&&(n=n.toLowerCase(),n!="d"&&n!="e"&&(n="o"),e.pe="lnk_"+n,e.pev1=r?e.escape(r):"",e.pev2=i?e.escape(i):"",t=1),e.abort&&(t=0);if(e.trackClickMap||e.trackInlineStats){n={},r=0;var s=e.cookieRead("s_sq"),o=s?s.split("&"):0,u,a,f;s=0
;if(o)for(u=0;u<o.length;u++)a=o[u].split("="),i=e.unescape(a[0]).split(","),a=e.unescape(a[1]),n[a]=i;i=e.account.split(",");if(t||e.g){t&&!e.g&&(s=1);for(a in n)if(!Object.prototype[a])for(u=0;u<i.length;u++){s&&(f=n[a].join(","),f==e.account&&(e.g+=(a.charAt(0)!="&"?"&":"")+a,n[a]=[],r=1));for(o=0;o<n[a].length;o++)f=n[a][o],f==i[u]&&(s&&(e.g+="&u="+e.escape(f)+(a.charAt(0)!="&"?"&":"")+a+"&u=0"),n[a].splice(o,1),r=1)}t||(r=1);if(r){s="",u=2,!t&&e.g&&(s=e.escape(i.join(","))+"="+e.escape(e.g),
u=1);for(a in n)!Object.prototype[a]&&u>0&&n[a].length>0&&(s+=(s?"&":"")+e.escape(n[a].join(","))+"="+e.escape(a),u--);e.cookieWrite("s_sq",s)}}}return t},e.Ua=function(){if(!e.jb){var t=new Date,n=r.location,i,s,o,u=o=s=i="",a="",f="",l="1.2",c=e.cookieWrite("s_cc","true",0)?"Y":"N",h="",p="",d=0;if(t.setUTCDate&&(l="1.3",d.toPrecision&&(l="1.5",i=[],i.forEach))){l="1.6",o=0,s={};try{o=new Iterator(s),o.next&&(l="1.7",i.reduce&&(l="1.8",l.trim&&(l="1.8.1",Date.parse&&(l="1.8.2",Object.create&&(l="1.8.5"
)))))}catch(v){}}i=screen.width+"x"+screen.height,o=navigator.javaEnabled()?"Y":"N",s=screen.pixelDepth?screen.pixelDepth:screen.colorDepth,a=e.w.innerWidth?e.w.innerWidth:e.d.documentElement.offsetWidth,f=e.w.innerHeight?e.w.innerHeight:e.d.documentElement.offsetHeight,t=navigator.plugins;try{e.b.addBehavior("#default#homePage"),h=e.b.qb(n)?"Y":"N"}catch(m){}try{e.b.addBehavior("#default#clientCaps"),p=e.b.connectionType}catch(g){}if(t)for(;d<t.length&&d<30;){if(n=t[d].name)n=n.substring(0,100)+";"
,u.indexOf(n)<0&&(u+=n);d++}e.resolution=i,e.colorDepth=s,e.javascriptVersion=l,e.javaEnabled=o,e.cookiesEnabled=c,e.browserWidth=a,e.browserHeight=f,e.connectionType=p,e.homepage=h,e.plugins=u,e.jb=1}},e.I={},e.loadModule=function(n,r){var i=e.I[n];if(!i){i=t["AppMeasurement_Module_"+n]?new t["AppMeasurement_Module_"+n](e):{},e.I[n]=e[n]=i,i.Ba=function(){return i.Ea},i.Fa=function(t){if(i.Ea=t)e[n+"_onLoad"]=t,e.C(n+"_onLoad",[e,i],1)||t(e,i)};try{Object.defineProperty?Object.defineProperty(i,"onLoad"
,{get:i.Ba,set:i.Fa}):i._olc=1}catch(s){i._olc=1}}r&&(e[n+"_onLoad"]=r,e.C(n+"_onLoad",[e,i],1)||r(e,i))},e.r=function(t){var n,r;for(n in e.I)if(!Object.prototype[n]&&(r=e.I[n])){r._olc&&r.onLoad&&(r._olc=0,r.onLoad(e,r));if(r[t]&&r[t]())return 1}return 0},e.Xa=function(){var t=Math.floor(Math.random()*1e13),n=e.visitorSampling,r=e.visitorSamplingGroup;r="s_vsn_"+(e.visitorNamespace?e.visitorNamespace:e.account)+(r?"_"+r:"");var i=e.cookieRead(r);if(n){i&&(i=parseInt(i));if(!i){if(!e.cookieWrite
(r,t))return 0;i=t}if(i%1e4>v)return 0}return 1},e.K=function(t,n){var r,i,s,o,u,a;for(r=0;r<2;r++){i=r>0?e.ea:e.c;for(s=0;s<i.length;s++)if(o=i[s],(u=t[o])||t["!"+o]){if(!n&&(o=="contextData"||o=="retrieveLightData")&&e[o])for(a in e[o])u[a]||(u[a]=e[o][a]);e[o]=u}}},e.wa=function(t,n){var r,i,s,o;for(r=0;r<2;r++){i=r>0?e.ea:e.c;for(s=0;s<i.length;s++)o=i[s],t[o]=e[o],!n&&!t[o]&&(t["!"+o]=1)}},e.Pa=function(e){var t,n,r,i,s,o=0,u,a="",f="";if(e&&e.length>255&&(t=""+e,n=t.indexOf("?"),n>0&&(u=t.substring
(n+1),t=t.substring(0,n),i=t.toLowerCase(),r=0,i.substring(0,7)=="http://"?r+=7:i.substring(0,8)=="https://"&&(r+=8),n=i.indexOf("/",r),n>0&&(i=i.substring(r,n),s=t.substring(n),t=t.substring(0,n),i.indexOf("google")>=0?o=",q,ie,start,search_key,word,kw,cd,":i.indexOf("yahoo.co")>=0&&(o=",p,ei,"),o&&u)))){if((e=u.split("&"))&&e.length>1){for(r=0;r<e.length;r++)i=e[r],n=i.indexOf("="),n>0&&o.indexOf(","+i.substring(0,n)+",")>=0?a+=(a?"&":"")+i:f+=(f?"&":"")+i;a&&f?u=a+"&"+f:f=""}n=253-(u.length-f.
length)-t.length,e=t+(n>0?s.substring(0,n):"")+"?"+u}return e},e.S=!1,e.O=!1,e.Da=function(t){e.marketingCloudVisitorID=t,e.O=!0,e.l()},e.P=!1,e.L=!1,e.ya=function(t){e.analyticsVisitorID=t,e.L=!0,e.l()},e.R=!1,e.N=!1,e.Aa=function(t){e.audienceManagerLocationHint=t,e.N=!0,e.l()},e.Q=!1,e.M=!1,e.za=function(t){e.audienceManagerBlob=t,e.M=!0,e.l()},e.isReadyToTrack=function(){var t=!0,n=e.visitor;if(n&&n.isAllowed()){!e.S&&!e.marketingCloudVisitorID&&n.getMarketingCloudVisitorID&&(e.S=!0,e.marketingCloudVisitorID=
n.getMarketingCloudVisitorID([e,e.Da]),e.marketingCloudVisitorID)&&(e.O=!0),!e.P&&!e.analyticsVisitorID&&n.getAnalyticsVisitorID&&(e.P=!0,e.analyticsVisitorID=n.getAnalyticsVisitorID([e,e.ya]),e.analyticsVisitorID)&&(e.L=!0),!e.R&&!e.audienceManagerLocationHint&&n.getAudienceManagerLocationHint&&(e.R=!0,e.audienceManagerLocationHint=n.getAudienceManagerLocationHint([e,e.Aa]),e.audienceManagerLocationHint)&&(e.N=!0),!e.Q&&!e.audienceManagerBlob&&n.getAudienceManagerBlob&&(e.Q=!0,e.audienceManagerBlob=
n.getAudienceManagerBlob([e,e.za]),e.audienceManagerBlob)&&(e.M=!0);if(e.S&&!e.O&&!e.marketingCloudVisitorID||e.P&&!e.L&&!e.analyticsVisitorID||e.R&&!e.N&&!e.audienceManagerLocationHint||e.Q&&!e.M&&!e.audienceManagerBlob)t=!1}return t},e.k=n,e.o=0,e.callbackWhenReadyToTrack=function(t,r,i){var s;s={},s.Ja=t,s.Ia=r,s.Ga=i,e.k==n&&(e.k=[]),e.k.push(s),e.o==0&&(e.o=setInterval(e.l,100))},e.l=function(){var t;if(e.isReadyToTrack()){e.o&&(clearInterval(e.o),e.o=0);if(e.k!=n)for(;e.k.length>0;)t=e.k.shift
(),t.Ia.apply(t.Ja,t.Ga)}},e.Ca=function(t){var r,i,s=n,o=n;if(!e.isReadyToTrack()){r=[];if(t!=n)for(i in s={},t)s[i]=t[i];return o={},e.wa(o,!0),r.push(s),r.push(o),e.callbackWhenReadyToTrack(e,e.track,r),!0}return!1},e.Ra=function(){var t=e.cookieRead("s_fid"),n="",r="",i;i=8;var s=4;if(!t||t.indexOf("-")<0){for(t=0;t<16;t++)i=Math.floor(Math.random()*i),n+="0123456789ABCDEF".substring(i,i+1),i=Math.floor(Math.random()*s),r+="0123456789ABCDEF".substring(i,i+1),i=s=16;t=n+"-"+r}return e.cookieWrite
("s_fid",t,1)||(t=0),t},e.t=e.track=function(n,i){var s,o=new Date,u="s"+Math.floor(o.getTime()/108e5)%10+Math.floor(Math.random()*1e13),a=o.getYear();a="t="+e.escape(o.getDate()+"/"+o.getMonth()+"/"+(a<1900?a+1900:a)+" "+o.getHours()+":"+o.getMinutes()+":"+o.getSeconds()+" "+o.getDay()+" "+o.getTimezoneOffset()),!e.supplementalDataID&&e.visitor&&e.visitor.getSupplementalDataID&&(e.supplementalDataID=e.visitor.getSupplementalDataID("AppMeasurement:"+e._in,e.expectSupplementalData?!1:!0)),e.r("_s"
),e.C("track",arguments)||(e.Ca(n)||(i&&e.K(i),n&&(s={},e.wa(s,0),e.K(n)),e.Xa()&&(!e.analyticsVisitorID&&!e.marketingCloudVisitorID&&(e.fid=e.Ra()),e.bb(),e.usePlugins&&e.doPlugins&&e.doPlugins(e),e.account&&(e.abort||(e.trackOffline&&!e.timestamp&&(e.timestamp=Math.floor(o.getTime()/1e3)),o=t.location,e.pageURL||(e.pageURL=o.href?o.href:o),!e.referrer&&!e.xa&&(e.referrer=r.document.referrer,e.xa=1),e.referrer=e.Pa(e.referrer),e.r("_g")),e.Ta()&&!e.abort&&(e.Ua(),a+=e.Sa(),e.ab(u,a),e.r("_t"),e.
referrer=""))),n&&e.K(s,1)),e.abort=e.supplementalDataID=e.timestamp=e.pageURLRest=e.linkObject=e.j=e.linkURL=e.linkName=e.linkType=t.rb=e.pe=e.pev1=e.pev2=e.pev3=e.g=0)},e.tl=e.trackLink=function(t,n,r,i,s){return e.linkObject=t,e.linkType=n,e.linkName=r,s&&(e.i=t,e.q=s),e.track(i)},e.trackLight=function(t,n,r,i){return e.lightProfileID=t,e.lightStoreForSeconds=n,e.lightIncrementBy=r,e.track(i)},e.clearVars=function(){var t,n;for(t=0;t<e.c.length;t++)if(n=e.c[t],n.substring(0,4)=="prop"||n.substring
(0,4)=="eVar"||n.substring(0,4)=="hier"||n.substring(0,4)=="list"||n=="channel"||n=="events"||n=="eventList"||n=="products"||n=="productList"||n=="purchaseID"||n=="transactionID"||n=="state"||n=="zip"||n=="campaign")e[n]=void 0},e.ab=function(t,n){var r,i=e.trackingServer;r="";var s=e.dc,o="sc.",u=e.visitorNamespace;i?e.trackingServerSecure&&e.ssl&&(i=e.trackingServerSecure):(u||(u=e.account,i=u.indexOf(","),i>=0&&(u=u.substring(0,i)),u=u.replace(/[^A-Za-z0-9]/g,"")),r||(r="2o7.net"),s=s?(""+s).toLowerCase
():"d1",r=="2o7.net"&&(s=="d1"?s="112":s=="d2"&&(s="122"),o=""),i=u+"."+s+"."+o+r),r=e.ssl?"https://":"http://",s=e.AudienceManagement&&e.AudienceManagement.isReady(),r+=i+"/b/ss/"+e.account+"/"+(e.mobile?"5.":"")+(s?"10":"1")+"/JS-"+e.version+(e.ib?"T":"")+"/"+t+"?AQB=1&ndh=1&"+(s?"callback=s_c_il["+e._in+"].AudienceManagement.passData&":"")+n+"&AQE=1",e.Wa&&(r=r.substring(0,2047)),e.Na(r),e.W()},e.Na=function(t){e.e||e.Va(),e.e.push(t),e.X=e.u(),e.va()},e.Va=function(){e.e=e.Ya(),e.e||(e.e=[])}
,e.Ya=function(){var n,r;if(e.ba()){try{(r=t.localStorage.getItem(e.$()))&&(n=t.JSON.parse(r))}catch(i){}return n}},e.ba=function(){var n=!0;if(!e.trackOffline||!e.offlineFilename||!t.localStorage||!t.JSON)n=!1;return n},e.la=function(){var t=0;return e.e&&(t=e.e.length),e.z&&t++,t},e.W=function(){if(!e.z)if(e.ma=n,e.aa)e.X>e.G&&e.ta(e.e),e.da(6e4);else{var t=e.Ha();if(t>0)e.da(t);else if(t=e.ja())e.z=1,e.$a(t),e.fb(t)}},e.da=function(t){e.ma||(t||(t=0),e.ma=setTimeout(e.W,t))},e.Ha=function(){var t
;return!e.trackOffline||e.offlineThrottleDelay<=0?0:(t=e.u()-e.ra,e.offlineThrottleDelay<t?0:e.offlineThrottleDelay-t)},e.ja=function(){if(e.e.length>0)return e.e.shift()},e.$a=function(t){if(e.debugTracking){var n="AppMeasurement Debug: "+t;t=t.split("&");var r;for(r=0;r<t.length;r++)n+="\n	"+e.unescape(t[r]);e.Za(n)}},e.fb=function(n){var r,i,s;!r&&e.d.createElement&&e.AudienceManagement&&e.AudienceManagement.isReady()&&(r=e.d.createElement("SCRIPT"))&&"async"in r&&((s=(s=e.d.getElementsByTagName
("HEAD"))&&s[0]?s[0]:e.d.body)?(r.type="text/javascript",r.setAttribute("async","async"),i=3):r=0),r||(r=new Image,r.alt=""),r.ga=function(){try{e.ca&&(clearTimeout(e.ca),e.ca=0),r.timeout&&(clearTimeout(r.timeout),r.timeout=0)}catch(t){}},r.onload=r.hb=function(){r.ga(),e.Ma(),e.T(),e.z=0,e.W()},r.onabort=r.onerror=r.Oa=function(){r.ga(),(e.trackOffline||e.aa)&&e.z&&e.e.unshift(e.La),e.z=0,e.X>e.G&&e.ta(e.e),e.T(),e.da(6e4)},r.onreadystatechange=function(){r.readyState==4&&(r.status==200?r.hb():
r.Oa())},e.ra=e.u();if(i==1)r.open("GET",n,!0),r.send();else if(i==2)r.open("GET",n),r.send();else if(r.src=n,i==3){if(e.pa)try{s.removeChild(e.pa)}catch(o){}s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r),e.pa=e.Ka}r.abort&&(e.ca=setTimeout(r.abort,5e3)),e.La=n,e.Ka=t["s_i_"+e.replace(e.account,",","_")]=r;if(e.useForcedLinkTracking&&e.B||e.q)e.forcedLinkTrackingTimeout||(e.forcedLinkTrackingTimeout=250),e.U=setTimeout(e.T,e.forcedLinkTrackingTimeout)},e.Ma=function(){if(e.ba()&&!(e
.qa>e.G))try{t.localStorage.removeItem(e.$()),e.qa=e.u()}catch(n){}},e.ta=function(n){if(e.ba()){e.va();try{t.localStorage.setItem(e.$(),t.JSON.stringify(n)),e.G=e.u()}catch(r){}}},e.va=function(){if(e.trackOffline){if(!e.offlineLimit||e.offlineLimit<=0)e.offlineLimit=10;for(;e.e.length>e.offlineLimit;)e.ja()}},e.forceOffline=function(){e.aa=!0},e.forceOnline=function(){e.aa=!1},e.$=function(){return e.offlineFilename+"-"+e.visitorNamespace+e.account},e.u=function(){return(new Date).getTime()},e.
na=function(e){return e=e.toLowerCase(),e.indexOf("#")!=0&&e.indexOf("about:")!=0&&e.indexOf("opera:")!=0&&e.indexOf("javascript:")!=0?!0:!1},e.setTagContainer=function(t){var n,r,i;e.ib=t;for(n=0;n<e._il.length;n++)if((r=e._il[n])&&r._c=="s_l"&&r.tagContainerName==t){e.K(r);if(r.lmq)for(n=0;n<r.lmq.length;n++)i=r.lmq[n],e.loadModule(i.n);if(r.ml)for(i in r.ml)if(e[i])for(n in t=e[i],i=r.ml[i],i)!Object.prototype[n]&&(typeof i[n]!="function"||(""+i[n]).indexOf("s_c_il")<0)&&(t[n]=i[n]);if(r.mmq)for(
n=0;n<r.mmq.length;n++)i=r.mmq[n],e[i.m]&&(t=e[i.m],t[i.f]&&typeof t[i.f]=="function"&&(i.a?t[i.f].apply(t,i.a):t[i.f].apply(t)));if(r.tq)for(n=0;n<r.tq.length;n++)e.track(r.tq[n]);r.s=e;break}},e.Util={urlEncode:e.escape,urlDecode:e.unescape,cookieRead:e.cookieRead,cookieWrite:e.cookieWrite,getQueryParam:function(n,r,i){var s;return r||(r=e.pageURL?e.pageURL:t.location),i||(i="&"),n&&r&&(r=""+r,s=r.indexOf("?"),s>=0&&(r=i+r.substring(s+1)+i,s=r.indexOf(i+n+"="),s>=0&&(r=r.substring(s+i.length+n.
length+1),s=r.indexOf(i),s>=0&&(r=r.substring(0,s)),r.length>0)))?e.unescape(r):""}},e.A=["supplementalDataID","timestamp","dynamicVariablePrefix","visitorID","marketingCloudVisitorID","analyticsVisitorID","audienceManagerLocationHint","fid","vmk","visitorMigrationKey","visitorMigrationServer","visitorMigrationServerSecure","charSet","visitorNamespace","cookieDomainPeriods","fpCookieDomainPeriods","cookieLifetime","pageName","pageURL","referrer","contextData","currencyCode","lightProfileID","lightStoreForSeconds"
,"lightIncrementBy","retrieveLightProfiles","deleteLightProfiles","retrieveLightData","pe","pev1","pev2","pev3","pageURLRest"],e.c=e.A.concat(["purchaseID","variableProvider","channel","server","pageType","transactionID","campaign","state","zip","events","events2","products","audienceManagerBlob","tnt"]),e.Y=["timestamp","charSet","visitorNamespace","cookieDomainPeriods","cookieLifetime","contextData","lightProfileID","lightStoreForSeconds","lightIncrementBy"],e.H=e.Y.slice(0),e.ea=["account","allAccounts"
,"debugTracking","visitor","trackOffline","offlineLimit","offlineThrottleDelay","offlineFilename","usePlugins","doPlugins","configURL","visitorSampling","visitorSamplingGroup","linkObject","linkURL","linkName","linkType","trackDownloadLinks","trackExternalLinks","trackClickMap","trackInlineStats","linkLeaveQueryString","linkTrackVars","linkTrackEvents","linkDownloadFileTypes","linkExternalFilters","linkInternalFilters","useForcedLinkTracking","forcedLinkTrackingTimeout","trackingServer","trackingServerSecure"
,"ssl","abort","mobile","dc","lightTrackVars","maxDelay","expectSupplementalData","AudienceManagement"];for(i=0;i<=75;i++)e.c.push("prop"+i),e.H.push("prop"+i),e.c.push("eVar"+i),e.H.push("eVar"+i),i<6&&e.c.push("hier"+i),i<4&&e.c.push("list"+i);i=["resolution","colorDepth","javascriptVersion","javaEnabled","cookiesEnabled","browserWidth","browserHeight","connectionType","homepage","plugins"],e.c=e.c.concat(i),e.A=e.A.concat(i),e.ssl=t.location.protocol.toLowerCase().indexOf("https")>=0,e.charSet="UTF-8"
,e.contextData={},e.offlineThrottleDelay=0,e.offlineFilename="AppMeasurement.offline",e.ra=0,e.X=0,e.G=0,e.qa=0,e.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx",e.w=t,e.d=t.document;try{e.Wa=navigator.appName=="Microsoft Internet Explorer"}catch(u){}e.T=function(){e.U&&(t.clearTimeout(e.U),e.U=n),e.i&&e.B&&e.i.dispatchEvent(e.B),e.q&&(typeof e.q=="function"?e.q():e.i&&e.i.href&&(e.d.location=e.i.href)),e.i=e.B=e.q=0},e.ua=function(){e.b=e.d.body,e.b?(e.p=function(
n){var r,i,s,o,u;if(!(e.d&&e.d.getElementById("cppXYctnr")||n&&n.cb)){if(e.fa){if(!e.useForcedLinkTracking){e.b.removeEventListener("click",e.p,!0),e.fa=e.useForcedLinkTracking=0;return}e.b.removeEventListener("click",e.p,!1)}else e.useForcedLinkTracking=0;e.j=n.srcElement?n.srcElement:n.target;try{if(e.j&&(e.j.tagName||e.j.parentElement||e.j.parentNode))if(s=e.la(),e.track(),s<e.la()&&e.useForcedLinkTracking&&n.target){for(o=n.target;o&&o!=e.b&&o.tagName.toUpperCase()!="A"&&o.tagName.toUpperCase
()!="AREA";)o=o.parentNode;if(o&&(u=o.href,e.na(u)||(u=0),i=o.target,n.target.dispatchEvent&&u&&(!i||i=="_self"||i=="_top"||i=="_parent"||t.name&&i==t.name))){try{r=e.d.createEvent("MouseEvents")}catch(a){r=new t.MouseEvent}if(r){try{r.initMouseEvent("click",n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget)}catch(f){r=0}r&&(r.cb=1,n.stopPropagation(),n.gb&&n.gb(),n.preventDefault(),e.i=n.target,e.B=r)}}
}}catch(l){}e.j=0}},e.b&&e.b.attachEvent)?e.b.attachEvent("onclick",e.p):e.b&&e.b.addEventListener&&(navigator&&(navigator.userAgent.indexOf("WebKit")>=0&&e.d.createEvent||navigator.userAgent.indexOf("Firefox/2")>=0&&t.MouseEvent)&&(e.fa=1,e.useForcedLinkTracking=1,e.b.addEventListener("click",e.p,!0)),e.b.addEventListener("click",e.p,!1)):setTimeout(e.ua,30)},e.ua()}function s_gi(e){var t,n=window.s_c_il,r,i,s=e.split(","),o,u,a=0;if(n)for(r=0;!a&&r<n.length;){t=n[r];if(t._c=="s_c"&&(t.account||
t.oun))if(t.account&&t.account==e)a=1;else{i=t.account?t.account:t.oun,i=t.allAccounts?t.allAccounts:i.split(",");for(o=0;o<s.length;o++)for(u=0;u<i.length;u++)s[o]==i[u]&&(a=1)}r++}return a||(t=new AppMeasurement),t.setAccount?t.setAccount(e):t.sa&&t.sa(e),t}function s_pgicq(){var e=window,t=e.s_giq,n,r,i;if(t)for(n=0;n<t.length;n++)r=t[n],i=s_gi(r.oun),i.setAccount(r.un),i.setTagContainer(r.tagContainerName);e.s_giq=0}function CSXSWindowType(){}function Version(e,t,n,r){this.major=e,this.minor=
t,this.micro=n,this.special=r}function VersionBound(e,t){this.version=e,this.inclusive=t}function VersionRange(e,t){this.lowerBound=e,this.upperBound=t}function Runtime(e,t){this.name=e,this.versionRange=t}function Extension(e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v){this.id=e,this.name=t,this.mainPath=n,this.basePath=r,this.windowType=i,this.width=s,this.height=o,this.minWidth=u,this.minHeight=a,this.maxWidth=f,this.maxHeight=l,this.defaultExtensionDataXml=c,this.specialExtensionDataXml=h,this.requiredRuntimeList=
p,this.isAutoVisible=d,this.isPluginExtension=v}function CSEvent(e,t,n,r){this.type=e,this.scope=t,this.appId=n,this.extensionId=r}function SystemPath(){}function ColorType(){}function RGBColor(e,t,n,r){this.red=e,this.green=t,this.blue=n,this.alpha=r}function Direction(e,t){this.x=e,this.y=t}function GradientStop(e,t){this.offset=e,this.rgbColor=t}function GradientColor(e,t,n,r){this.type=e,this.direction=t,this.numStops=n,this.arrGradientStop=r}function UIColor(e,t,n){this.type=e,this.antialiasLevel=
t,this.color=n}function AppSkinInfo(e,t,n,r,i,s,o){this.baseFontFamily=e,this.baseFontSize=t,this.appBarBackgroundColor=n,this.panelBackgroundColor=r,this.appBarBackgroundColorSRGB=i,this.panelBackgroundColorSRGB=s,this.systemHighlightColor=o}function HostEnvironment(e,t,n,r,i,s,o){this.appName=e,this.appVersion=t,this.appLocale=n,this.appUILocale=r,this.appId=i,this.isAppOnline=s,this.appSkinInfo=o}function HostCapabilities(e,t,n,r,i){this.EXTENDED_PANEL_MENU=e,this.EXTENDED_PANEL_ICONS=t,this.DELEGATE_APE_ENGINE=
n,this.SUPPORT_HTML_EXTENSIONS=r,this.DISABLE_FLASH_EXTENSIONS=i}function ApiVersion(e,t,n){this.major=e,this.minor=t,this.micro=n}function MenuItemStatus(e,t,n){this.menuItemLabel=e,this.enabled=t,this.checked=n}function ContextMenuItemStatus(e,t,n){this.menuItemID=e,this.enabled=t,this.checked=n}function CSInterface(){}function AAMStatus(e,t,n){this.status=e,this.callerId=t,this.payload=n}function IMSInterface(){}function Vulcan(){}function VulcanMessage(e){this.type=e,this.scope=VulcanMessage.
SCOPE_SUITE,this.appId=VulcanMessage.DEFAULT_APP_ID,this.appVersion=VulcanMessage.DEFAULT_APP_VERSION,this.data=VulcanMessage.DEFAULT_DATA}function GetValueByKey(e,t){if(window.DOMParser){var n=new window.DOMParser;try{var r=n.parseFromString(e,"text/xml"),i=r.getElementsByTagName(t)[0];if(i&&i.childNodes[0])return i.childNodes[0].nodeValue}catch(s){}}return""}function requiredParamsValid(){for(var e=0;e<arguments.length;e++){var t=arguments[e];if(t==undefined||t==null)return!1}return!0}function strStartsWith
(e,t){return typeof e!="string"?!1:e.indexOf(t)===0}function log(e){DEBUG_LOGGING&&console.log(e)}function AgoraLib(){var e=window.__adobe_cep__.getExtensionId(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)});this.callerID=t+"_"+e,this.bundleID=window.__adobe_cep__.invokeSync("getBundleId","");var n=this;this.responseCallback=function(e){if(window.DOMParser){var t=new window.DOMParser;try{var r=t.parseFromString
(e.data,"text/xml"),i=r.getElementsByTagName("payload")[0];i&&i.childNodes[0]&&(i=i.childNodes[0].nodeValue),i!=null&&(i=cep.encoding.convertion.b64_to_utf8(i)),log("Decoded payload: "+i);var s=t.parseFromString(i,"text/xml"),o=s.getElementsByTagName("Response");for(var u=0;u<o.length;u++){var a=o[u];if(a){var f=a.attributes.getNamedItem("name").nodeValue,l=a.attributes.getNamedItem("callerID").nodeValue;log("This caller ID "+n.callerID+" received caller ID "+l),log("API: "+f);if(l===n.callerID){
log("CallerIDs match! Now removing message listener"),VulcanInterface.removeMessageListener(AgoraLib.RESPONSE_TYPE,n.responseCallback);var c=a.getElementsByTagName("Result"),h={};for(var p=0;p<c.length;p++){var d=c[p].attributes.getNamedItem("name").nodeValue,v=c[p].getElementsByTagName("Value")[0].textContent;log("param name: "+d+" param value: "+v),h[d]=v}if(f===AgoraLib.IS_ENTITLED){log("IsEntitled callback");var m=new AgoraLibResponse(h[AgoraLib.IS_ENTITLED],h[AgoraLib.STATUS],h[AgoraLib.STATUSCODE
]);n.isEntitledCallback(m)}else if(f===AgoraLib.GET_PURCHASE_URL){log("GetPurchaseUrl callback");var g=h.URL,m=new AgoraLibResponse(g,h[AgoraLib.STATUS],h[AgoraLib.STATUSCODE]);n.getPurchaseUrlCallback(m)}else if(f===AgoraLib.GET_VERSION){log("GetVersion callback");var m=new AgoraLibResponse(h.Version,h[AgoraLib.STATUS],h[AgoraLib.STATUSCODE]);n.getVersionCallback(m)}else if(f===AgoraLib.CREATE_ENTITLEMENT){log("CreateEntitlement callback");var m=new AgoraLibResponse("",h[AgoraLib.STATUS],h[AgoraLib
.STATUSCODE]);n.createEntitlementCallback(m)}}}}}catch(y){log("AgoraLibError: "+y)}}},this.checkVersion=function(){log("Checking version...");var e='<Request name="'+AgoraLib.GET_VERSION+'" callerID="'+n.callerID+'"><Parameters>';e+="</Parameters></Request>";var t=String.format(AgoraLib.MESSAGE_REQUEST_TEMPLATE,e),r=new VulcanMessage(AgoraLib.MESSAGE_TYPE);r.setPayload(t),VulcanInterface.addMessageListener(AgoraLib.RESPONSE_TYPE,n.responseCallback),VulcanInterface.dispatchMessage(r);return},this.
checkConnection=function(e){n.getVersionCallback=e;var t=AgoraLib.status.internalClientError.status,r=AgoraLib.status.internalClientError.code,i=VulcanInterface.isAppInstalled("coresync"),s="/Applications/Utilities/Adobe Creative Cloud/ACC/Creative Cloud.app/Contents/MacOS/Creative Cloud";if(navigator.platform=="Win32"||navigator.platform=="Windows")s=navigator.userAgent.indexOf("WOW64")>-1?"C:\\Program Files (x86)\\Adobe\\Adobe Creative Cloud\\ACC\\Creative Cloud.exe":"C:\\Program Files\\Adobe\\Adobe Creative Cloud\\ACC\\Creative Cloud.exe"
;if(!i){var o=window.cep.fs.stat(s);0==o.err&&o.data.isFile()&&(i=!0)}if(!i)log("location does not exist"),t=AgoraLib.status.creativeCloudNotFoundError.status,r=AgoraLib.status.creativeCloudNotFoundError.code;else{var u=VulcanInterface.isAppRunning("coresync");if(!!u){this.checkVersion();return}u=VulcanInterface.launchApp("creativecloud",!1,"");if(!u){var a=window.cep.process.createProcess(s,"&");if(0==a.err){var f=a.data;log("createProcess succeed, "+f);var l=window.cep.process.isRunning(f);0==l
.err&&1==l.data&&(u=!0)}}if(u){log("ACCC is now being launched");var c=function(e){log("ACCC started up"),VulcanInterface.removeMessageListener(AgoraLib.ACCC_STARTED_UP_MESSAGE,this),this.checkVersion};VulcanInterface.addMessageListener(AgoraLib.ACCC_STARTED_UP_MESSAGE,c);return}t=AgoraLib.status.creativeCloudFailedToLaunchError.status,r=AgoraLib.status.creativeCloudFailedToLaunchError.code}var h=new AgoraLibResponse("",t,r);e(h)},this.compareVersion=function(e,t){var n,r,i,s=/(\.0)+[^\.]*$/;e=(e+""
).replace(s,"").split("."),t=(t+"").replace(s,"").split("."),i=Math.min(e.length,t.length);for(n=0;n<i;n++){r=parseInt(e[n],10)-parseInt(t[n],10);if(r!==0)return r}return e.length-t.length}}function AgoraLibResponse(e,t,n){this.response=e,this.status=t,this.statusCode=n}var requirejs,require,define;(function(e){function h(e,t){return f.call(e,t)}function p(e,t){var n,r,i,s,o,a,f,l,h,p,d,v=t&&t.split("/"),m=u.map,g=m&&m["*"]||{};if(e&&e.charAt(0)===".")if(t){v=v.slice(0,v.length-1),e=e.split("/"),
o=e.length-1,u.nodeIdCompat&&c.test(e[o])&&(e[o]=e[o].replace(c,"")),e=v.concat(e);for(h=0;h<e.length;h+=1){d=e[h];if(d===".")e.splice(h,1),h-=1;else if(d===".."){if(h===1&&(e[2]===".."||e[0]===".."))break;h>0&&(e.splice(h-1,2),h-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((v||g)&&m){n=e.split("/");for(h=n.length;h>0;h-=1){r=n.slice(0,h).join("/");if(v)for(p=v.length;p>0;p-=1){i=m[v.slice(0,p).join("/")];if(i){i=i[r];if(i){s=i,a=h;break}}}if(s)break;!f&&g&&g[r]&&(f=g[r],l=h
)}!s&&f&&(s=f,a=l),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function d(t,r){return function(){return n.apply(e,l.call(arguments,0).concat([t,r]))}}function v(e){return function(t){return p(t,e)}}function m(e){return function(t){s[e]=t}}function g(n){if(h(o,n)){var r=o[n];delete o[n],a[n]=!0,t.apply(e,r)}if(!h(s,n)&&!h(a,n))throw new Error("No "+n);return s[n]}function y(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function b(e){return function(
){return u&&u.config&&u.config[e]||{}}}var t,n,r,i,s={},o={},u={},a={},f=Object.prototype.hasOwnProperty,l=[].slice,c=/\.js$/;r=function(e,t){var n,r=y(e),i=r[0];return e=r[1],i&&(i=p(i,t),n=g(i)),i?n&&n.normalize?e=n.normalize(e,v(t)):e=p(e,t):(e=p(e,t),r=y(e),i=r[0],e=r[1],i&&(n=g(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},i={require:function(e){return d(e)},exports:function(e){var t=s[e];return typeof t!="undefined"?t:s[e]={}},module:function(e){return{id:e,uri:"",exports:s[e],config:b(e)}}},t=function(
t,n,u,f){var l,c,p,v,y,b=[],w=typeof u,E;f=f||t;if(w==="undefined"||w==="function"){n=!n.length&&u.length?["require","exports","module"]:n;for(y=0;y<n.length;y+=1){v=r(n[y],f),c=v.f;if(c==="require")b[y]=i.require(t);else if(c==="exports")b[y]=i.exports(t),E=!0;else if(c==="module")l=b[y]=i.module(t);else if(h(s,c)||h(o,c)||h(a,c))b[y]=g(c);else{if(!v.p)throw new Error(t+" missing "+c);v.p.load(v.n,d(f,!0),m(c),{}),b[y]=s[c]}}p=u?u.apply(s[t],b):undefined;if(t)if(l&&l.exports!==e&&l.exports!==s[t
])s[t]=l.exports;else if(p!==e||!E)s[t]=p}else t&&(s[t]=u)},requirejs=require=n=function(s,o,a,f,l){if(typeof s=="string")return i[s]?i[s](o):g(r(s,o).f);if(!s.splice){u=s,u.deps&&n(u.deps,u.callback);if(!o)return;o.splice?(s=o,o=a,a=null):s=e}return o=o||function(){},typeof a=="function"&&(a=f,f=l),f?t(e,s,o,a):setTimeout(function(){t(e,s,o,a)},4),n},n.config=function(e){return n(e)},requirejs._defined=s,define=function(e,t,n){t.splice||(n=t,t=[]),!h(s,e)&&!h(o,e)&&(o[e]=[e,t,n])},define.amd={jQuery
:!0}})(),define("../components/almond/almond",function(){}),function(e,undefined){function j(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function A(e){var t=D[e]={};return x.each(e.match(w)||[],function(e,n){t[n]=!0}),t}function F(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=x.expando+Math.random()}function P(e,t,n){var r;if(n===undefined&&1===e.nodeType)if(r="data-"+
t.replace(O,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:H.test(n)?JSON.parse(n):n}catch(i){}L.set(e,t,n)}else n=undefined;return n}function U(){return!0}function Y(){return!1}function V(){try{return o.activeElement}catch(e){}}function Z(e,t){while((e=e[t])&&1!==e.nodeType);return e}function et(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e)
{return e===t!==n});if("string"==typeof t){if(G.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return g.call(t,e)>=0!==n})}function pt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ht(e){var t=ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function dt
(e,t){var n=e.length,r=0;for(;n>r;r++)q.set(e[r],"globalEval",!t||q.get(t[r],"globalEval"))}function gt(e,t){var n,r,i,s,o,u,a,f;if(1===t.nodeType){if(q.hasData(e)&&(s=q.access(e),o=q.set(t,s),f=s.events)){delete o.handle,o.events={};for(i in f)for(n=0,r=f[i].length;r>n;n++)x.event.add(t,i,f[i][n])}L.hasData(e)&&(u=L.access(e),a=x.extend({},u),L.set(t,a))}}function mt(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||
t&&x.nodeName(e,t)?x.merge([e],n):n}function yt(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ot.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function At(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Dt.length;while(i--)if(t=Dt[i]+n,t in e)return t;return r}function Lt(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function qt(t){return e.getComputedStyle(t,null)}function Ht(e,t){var n
,r,i,s=[],o=0,u=e.length;for(;u>o;o++)r=e[o],r.style&&(s[o]=q.get(r,"olddisplay"),n=r.style.display,t?(s[o]||"none"!==n||(r.style.display=""),""===r.style.display&&Lt(r)&&(s[o]=q.access(r,"olddisplay",Rt(r.nodeName)))):s[o]||(i=Lt(r),(n&&"none"!==n||!i)&&q.set(r,"olddisplay",i?n:x.css(r,"display"))));for(o=0;u>o;o++)r=e[o],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?s[o]||"":"none"));return e}function Ot(e,t,n){var r=Tt.exec(t);return r?Math.max(0,r[1]-(n||0))+
(r[2]||"px"):t}function Ft(e,t,n,r,i){var s=n===(r?"border":"content")?4:"width"===t?1:0,o=0;for(;4>s;s+=2)"margin"===n&&(o+=x.css(e,n+jt[s],!0,i)),r?("content"===n&&(o-=x.css(e,"padding"+jt[s],!0,i)),"margin"!==n&&(o-=x.css(e,"border"+jt[s]+"Width",!0,i))):(o+=x.css(e,"padding"+jt[s],!0,i),"padding"!==n&&(o+=x.css(e,"border"+jt[s]+"Width",!0,i)));return o}function Pt(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,s=qt(e),o=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,s)
;if(0>=i||null==i){if(i=vt(e,t,s),(0>i||null==i)&&(i=e.style[t]),Ct.test(i))return i;r=o&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+Ft(e,t,n||(o?"border":"content"),r,s)+"px"}function Rt(e){var t=o,n=Nt[e];return n||(n=Mt(e,t),"none"!==n&&n||(xt=(xt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(xt[0].contentWindow||xt[0].contentDocument).document,t.write("<!doctype html><html><body>"),
t.close(),n=Mt(e,t),xt.detach()),Nt[e]=n),n}function Mt(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}function _t(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||$t.test(e)?r(e,i):_t(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)_t(e+"["+i+"]",t[i],n,r)}function un(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(w)||[];if(x.isFunction(n))while(r=
s[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function ln(e,t,n,r){function o(u){var a;return i[u]=!0,x.each(e[u]||[],function(e,u){var f=u(t,n,r);return"string"!=typeof f||s||i[f]?s?!(a=f):undefined:(t.dataTypes.unshift(f),o(f),!1)}),a}var i={},s=e===on;return o(t.dataTypes[0])||!i["*"]&&o("*")}function cn(e,t){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}function pn(e,t
,n){var r,i,s,o,u=e.contents,a=e.dataTypes;while("*"===a[0])a.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in u)if(u[i]&&u[i].test(r)){a.unshift(i);break}if(a[0]in n)s=a[0];else{for(i in n){if(!a[0]||e.converters[i+" "+a[0]]){s=i;break}o||(o=i)}s=s||o}return s?(s!==a[0]&&a.unshift(s),n[s]):undefined}function fn(e,t,n,r){var i,s,o,u,a,f={},l=e.dataTypes.slice();if(l[1])for(o in e.converters)f[o.toLowerCase()]=e.converters[o];s=l.shift();while(s)if(e.responseFields
[s]&&(n[e.responseFields[s]]=t),!a&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a=s,s=l.shift())if("*"===s)s=a;else if("*"!==a&&a!==s){if(o=f[a+" "+s]||f["* "+s],!o)for(i in f)if(u=i.split(" "),u[1]===s&&(o=f[a+" "+u[0]]||f["* "+u[0]])){o===!0?o=f[i]:f[i]!==!0&&(s=u[0],l.unshift(u[1]));break}if(o!==!0)if(o&&e["throws"])t=o(t);else try{t=o(t)}catch(c){return{state:"parsererror",error:o?c:"No conversion from "+a+" to "+s}}}return{state:"success",data:t}}function En(){return setTimeout(function(
){xn=undefined}),xn=x.now()}function Sn(e,t,n){var r,i=(Nn[t]||[]).concat(Nn["*"]),s=0,o=i.length;for(;o>s;s++)if(r=i[s].call(n,t,e))return r}function jn(e,t,n){var r,i,s=0,o=kn.length,u=x.Deferred().always(function(){delete a.elem}),a=function(){if(i)return!1;var t=xn||En(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,s=1-r,o=0,a=f.tweens.length;for(;a>o;o++)f.tweens[o].run(s);return u.notifyWith(e,[f,s,n]),1>s&&a?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:x.extend({},t),
opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:xn||En(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(r),r},stop:function(t){var n=0,r=t?f.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;for(Dn(l,f.opts.specialEasing);o>s;s++)if(r=kn[s].call(f,e,l,f.opts))return r;return x
.map(l,Sn,f),x.isFunction(f.opts.start)&&f.opts.start.call(e,f),x.fx.timer(x.extend(a,{elem:e,anim:f,queue:f.opts.queue})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Dn(e,t){var n,r,i,s,o;for(n in e)if(r=x.camelCase(n),i=t[r],s=e[n],x.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=x.cssHooks[r],o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}function An(e,t,n){var r,i,s
,o,u,a,f=this,l={},c=e.style,h=e.nodeType&&Lt(e),p=q.get(e,"fxshow");n.queue||(u=x._queueHooks(e,"fx"),null==u.unqueued&&(u.unqueued=0,a=u.empty.fire,u.empty.fire=function(){u.unqueued||a()}),u.unqueued++,f.always(function(){f.always(function(){u.unqueued--,x.queue(e,"fx").length||u.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[c.overflow,c.overflowX,c.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(c.display="inline-block")),n.overflow&&(c.overflow="hidden"
,f.always(function(){c.overflow=n.overflow[0],c.overflowX=n.overflow[1],c.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],wn.exec(i)){if(delete t[r],s=s||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!p||p[r]===undefined)continue;h=!0}l[r]=p&&p[r]||x.style(e,r)}if(!x.isEmptyObject(l)){p?"hidden"in p&&(h=p.hidden):p=q.access(e,"fxshow",{}),s&&(p.hidden=!h),h?x(e).show():f.done(function(){x(e).hide()}),f.done(function(){var t;q.remove(e,"fxshow");for(t in l)x.style(e,t,l[t])});for(r in l)o=Sn(
h?p[r]:0,r,f),r in p||(p[r]=o.start,h&&(o.end=o.start,o.start="width"===r||"height"===r?1:0))}}function Ln(e,t,n,r,i){return new Ln.prototype.init(e,t,n,r,i)}function qn(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=jt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function Hn(e){return x.isWindow(e)?e:9===e.nodeType&&e.defaultView}var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice
,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:p,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof 
e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),C.test(r[1])&&x.isPlainObject(t))for(r in t)x.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=o.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=o,this.selector=e,this}return e
.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?n.ready(e):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return d.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready
.promise().done(e),this},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(
){var e,t,n,r,i,s,o=arguments[0]||{},u=1,a=arguments.length,f=!1;for("boolean"==typeof o&&(f=o,o=arguments[1]||{},u=2),"object"==typeof o||x.isFunction(o)||(o={}),a===u&&(o=this,--u);a>u;u++)if(null!=(e=arguments[u]))for(t in e)n=o[t],r=e[t],o!==r&&(f&&r&&(x.isPlainObject(r)||(i=x.isArray(r)))?(i?(i=!1,s=n&&x.isArray(n)?n:[]):s=n&&x.isPlainObject(n)?n:{},o[t]=x.extend(f,s,r)):r!==undefined&&(o[t]=r));return o},x.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noConflict:function(t){return e
.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=a),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){(e===!0?--x.readyWait:x.isReady)||(x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(o,[x]),x.fn.trigger&&x(o).trigger("ready").off("ready")))},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==
e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if("object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?
[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=undefined}return(!t||t.getElementsByTagName("parsererror").length)&&x.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){var t,n=eval;e=x.trim(e),e&&(1===e.indexOf("use strict")?(t=o.createElement("script"),t.text=e,o.head.appendChild
(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(k,"ms-").replace(N,E)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,s=e.length,o=j(e);if(n){if(o){for(;s>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(o){for(;s>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:function(e){return null==e?""
:v.call(e)},makeArray:function(e,t){var n=t||[];return null!=e&&(j(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:g.call(t,e,n)},merge:function(e,t){var n=t.length,r=e.length,i=0;if("number"==typeof n)for(;n>i;i++)e[r++]=t[i];else while(t[i]!==undefined)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;for(n=!!n;o>s;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,t,n){var r,i=0,s=e.length,o=j(
e),u=[];if(o)for(;s>i;i++)r=t(e[i],i,n),null!=r&&(u[u.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(u[u.length]=r);return f.apply([],u)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),x.isFunction(e)?(r=d.call(arguments,2),i=function(){return e.apply(t||this,r.concat(d.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):undefined},access:function(e,t,n,r,i,s,o){var u=0,a=e.length,f=null==n;if("object"===x.type(n)){i=!0;for(u in n)x.access(e,t,u,n[u],!0,s,o)}
else if(r!==undefined&&(i=!0,x.isFunction(r)||(o=!0),f&&(o?(t.call(e,r),t=null):(f=t,t=function(e,t,n){return f.call(x(e),n)})),t))for(;a>u;u++)t(e[u],n,o?r:r.call(e[u],u,t(e[u],n)));return i?e:f?t.call(e):a?t(e[0],n):s},now:Date.now,swap:function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i}}),x.ready.promise=function(t){return n||(n=x.Deferred(),"complete"===o.readyState?setTimeout(x.ready):(o.addEventListener("DOMContentLoaded"
,S,!1),e.addEventListener("load",S,!1))),n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()}),t=x(o),function(e,t){function ot(e,t,n,i){var s,o,u,a,f,l,p,m,g,E;if((t?t.ownerDocument||t:w)!==h&&c(t),t=t||h,n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=t.nodeType)&&9!==a)return[];if(d&&!i){if(s=Z.exec(e))if(u=s[1]){if(9===a){if(o=t.getElementById(u),!o||!o.parentNode)return n;if(o.id===u)return n.push
(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(u))&&y(t,o)&&o.id===u)return n.push(o),n}else{if(s[2])return H.apply(n,t.getElementsByTagName(e)),n;if((u=s[3])&&r.getElementsByClassName&&t.getElementsByClassName)return H.apply(n,t.getElementsByClassName(u)),n}if(r.qsa&&(!v||!v.test(e))){if(m=p=b,g=t,E=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){l=mt(e),(p=t.getAttribute("id"))?m=p.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",f=l.length;while(f--)l[f]=m+gt(
l[f]);g=$.test(e)&&t.parentNode||t,E=l.join(",")}if(E)try{return H.apply(n,g.querySelectorAll(E)),n}catch(S){}finally{p||t.removeAttribute("id")}}}return Nt(e.replace(W,"$1"),t,n,i)}function ut(){function t(n,r){return e.push(n+=" ")>s.cacheLength&&delete t[e.shift()],t[n]=r}var e=[];return t}function at(e){return e[b]=!0,e}function ft(e){var t=h.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=
e.length;while(r--)s.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||O)-(~e.sourceIndex||O);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function dt(e){return at(function(t){return t=+t,at(function(n,r){var i,s=e
([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function vt(){}function mt(e,t){var n,r,i,o,u,a,f,l=N[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=s.preFilter;while(u){(!n||(r=X.exec(u)))&&(r&&(u=u.slice(r[0].length)||u),a.push(i=[])),n=!1,(r=V.exec(u))&&(n=r.shift(),i.push({value:n,type:r[0].replace(W," ")}),u=u.slice(n.length));for(o in s.filter)!(r=G[o].exec(u))||f[o]&&!(r=f[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),u=u.slice(n.length));if(!n)break}return t?
u.length:u?ot.error(e):N(e,a).slice(0)}function gt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function yt(e,t,n){var r=t.dir,s=n&&"parentNode"===r,o=S++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||s)return e(t,n,i)}:function(t,n,u){var a,f,l,c=E+" "+o;if(u){while(t=t[r])if((1===t.nodeType||s)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||s)if(l=t[b]||(t[b]={}),(f=l[r])&&f[0]===c){if((a=f[1])===!0||a===i)return a===!0}else if(f=l[r]=[c],f[1]=e(t,n,u
)||i,f[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function wt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=null!=t;for(;a>u;u++)(s=e[u])&&(!n||n(s,r,i))&&(o.push(s),f&&t.push(u));return o}function Et(e,t,n,r,i,s){return r&&!r[b]&&(r=Et(r)),i&&!i[b]&&(i=Et(i,s)),at(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||Tt(t||"*",u.nodeType?[u]:u,[]),m=!e||!s&&t?v:wt(v,h,e,u,a),g=n?i||(s?e:d||r)?[]:o:m;if(n&&n(m,g,u,a
),r){f=wt(g,p),r(f,[],u,a),l=f.length;while(l--)(c=f[l])&&(g[p[l]]=!(m[p[l]]=c))}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?j.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=wt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):H.apply(o,g)})}function St(e){var t,n,r,i=e.length,o=s.relative[e[0].type],u=o||s.relative[" "],a=o?1:0,l=yt(function(e){return e===t},u,!0),c=yt(function(e){return j.call(t,e)>-1},u,!0),h=[function(
e,n,r){return!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];for(;i>a;a++)if(n=s.relative[e[a].type])h=[yt(bt(h),n)];else{if(n=s.filter[e[a].type].apply(null,e[a].matches),n[b]){for(r=++a;i>r;r++)if(s.relative[e[r].type])break;return Et(a>1&&bt(h),a>1&&gt(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(W,"$1"),n,r>a&&St(e.slice(a,r)),i>r&&St(e=e.slice(r)),i>r&&gt(e))}h.push(n)}return bt(h)}function xt(e,t){var n=0,r=t.length>0,o=e.length>0,u=function(u,a,l,c,p){var d,v,m,g=[
],y=0,b="0",w=u&&[],S=null!=p,x=f,T=u||o&&s.find.TAG("*",p&&a.parentNode||a),N=E+=null==x?1:Math.random()||.1;for(S&&(f=a!==h&&a,i=n);null!=(d=T[b]);b++){if(o&&d){v=0;while(m=e[v++])if(m(d,a,l)){c.push(d);break}S&&(E=N,i=++n)}r&&((d=!m&&d)&&y--,u&&w.push(d))}if(y+=b,r&&b!==y){v=0;while(m=t[v++])m(w,g,a,l);if(u){if(y>0)while(b--)w[b]||g[b]||(g[b]=D.call(c));g=wt(g)}H.apply(c,g),S&&!u&&g.length>0&&y+t.length>1&&ot.uniqueSort(c)}return S&&(E=N,f=x),w};return r?at(u):u}function Tt(e,t,n){var r=0,i=t.
length;for(;i>r;r++)ot(e,t[r],n);return n}function Nt(e,t,n,i){var o,u,f,l,c,h=mt(e);if(!i&&1===h.length){if(u=h[0]=h[0].slice(0),u.length>2&&"ID"===(f=u[0]).type&&r.getById&&9===t.nodeType&&d&&s.relative[u[1].type]){if(t=(s.find.ID(f.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(u.shift().value.length)}o=G.needsContext.test(e)?0:u.length;while(o--){if(f=u[o],s.relative[l=f.type])break;if((c=s.find[l])&&(i=c(f.matches[0].replace(rt,it),$.test(u[0].type)&&t.parentNode||t))){if(u.splice
(o,1),e=i.length&&gt(u),!e)return H.apply(n,i),n;break}}}return a(e,h)(i,t,!d,n,$.test(e)),n}var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b="sizzle"+ -(new Date),w=e.document,E=0,S=0,T=ut(),N=ut(),C=ut(),k=!1,L=function(e,t){return e===t?(k=!0,0):0},A=typeof t,O=1<<31,M={}.hasOwnProperty,_=[],D=_.pop,P=_.push,H=_.push,B=_.slice,j=_.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},F="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped"
,I="[\\x20\\t\\r\\n\\f]",q="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",R=q.replace("w","w#"),U="\\["+I+"*("+q+")"+I+"*(?:([*^$|!~]?=)"+I+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+R+")|)|)"+I+"*\\]",z=":("+q+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+U.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),X=RegExp("^"+I+"*,"+I+"*"),V=RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),$=RegExp(I+"*[+~]"),J=RegExp("="+I+"*([^\\]'\"]*)"+I+"*\\]","g"),K=RegExp(z),Q=RegExp
("^"+R+"$"),G={ID:RegExp("^#("+q+")"),CLASS:RegExp("^\\.("+q+")"),TAG:RegExp("^("+q.replace("w","w*")+")"),ATTR:RegExp("^"+U),PSEUDO:RegExp("^"+z),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:RegExp("^(?:"+F+")$","i"),needsContext:RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/
,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{H.apply(_=B.call(w.childNodes),w.childNodes),_[w.childNodes.length].nodeType}catch(st){H={apply:_.length?function(e,t){P.apply(e,B.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}u=ot.isXML=function(e){var t=e&&
(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=ot.support={},c=ot.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==h&&9===n.nodeType&&n.documentElement?(h=n,p=n.documentElement,d=!u(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){c()}),r.attributes=ft(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ft(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName
("*").length}),r.getElementsByClassName=ft(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ft(function(e){return p.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(s.find.ID=function(e,t){if(typeof t.getElementById!==A&&d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},s.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e
.getAttribute("id")===t}}):(delete s.find.ID,s.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),s.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if("*"===e){while(n=s[i++])1===n.nodeType&&r.push(n);return r}return s},s.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof 
n.getElementsByClassName!==A&&d?n.getElementsByClassName(e):t},m=[],v=[],(r.qsa=Y.test(n.querySelectorAll))&&(ft(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+F+")"),e.querySelectorAll(":checked").length||v.push(":checked")}),ft(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"
),e.querySelectorAll(":enabled").length||v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(r.matchesSelector=Y.test(g=p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ft(function(e){r.disconnectedMatch=g.call(e,"div"),g.call(e,"[s!='']:x"),m.push("!=",z)}),v=v.length&&RegExp(v.join("|")),m=m.length&&RegExp(m.join("|")),y=Y.test(p.contains)||p.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode
;return e===r||!!r&&1===r.nodeType&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},L=p.compareDocumentPosition?function(e,t){if(e===t)return k=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||y(w,e)?-1:t===n||y(w,t)?1:l?j.call(l,e)-j.call(l,t):0:4&i?-1:1:e.compareDocumentPosition?-1
:1}:function(e,t){var r,i=0,s=e.parentNode,o=t.parentNode,u=[e],a=[t];if(e===t)return k=!0,0;if(!s||!o)return e===n?-1:t===n?1:s?-1:o?1:l?j.call(l,e)-j.call(l,t):0;if(s===o)return ct(e,t);r=e;while(r=r.parentNode)u.unshift(r);r=t;while(r=r.parentNode)a.unshift(r);while(u[i]===a[i])i++;return i?ct(u[i],a[i]):u[i]===w?-1:a[i]===w?1:0},n):h},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h&&c(e),t=t.replace(J,"='$1']"),!(!r.matchesSelector||!
d||m&&m.test(t)||v&&v.test(t)))try{var n=g.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return ot(t,h,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==h&&c(e),y(e,t)},ot.attr=function(e,n){(e.ownerDocument||e)!==h&&c(e);var i=s.attrHandle[n.toLowerCase()],o=i&&M.call(s.attrHandle,n.toLowerCase())?i(e,n,!d):t;return o===t?r.attributes||!d?e.getAttribute(n):(o=e.getAttributeNode(n))&&o.specified?o.value:null:o},ot.error=function(
e){throw Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,n=[],i=0,s=0;if(k=!r.detectDuplicates,l=!r.sortStable&&e.slice(0),e.sort(L),k){while(t=e[s++])t===e[s]&&(i=n.push(s));while(i--)e.splice(n[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);
return n},s=ot.selectors={cacheLength:50,createPseudo:at,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ot.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===
e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ot.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return G.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&K.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=RegExp("(^|"+
I+")"+e+"("+I+"|$)"))&&T(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s="nth"!==e.slice
(0,3),o="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){while(v){c=t;while(c=c[v])if(u?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;d=v="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&y){l=m[b]||(m[b]={}),f=l[e]||[],p=f[0]===E&&f[1],h=f[0]===E&&f[2],c=p&&m.childNodes[p];while(c=++p&&
c&&c[v]||(h=p=0)||d.pop())if(1===c.nodeType&&++h&&c===t){l[e]=[E,p,h];break}}else if(y&&(f=(t[b]||(t[b]={}))[e])&&f[0]===E)h=f[1];else while(c=++p&&c&&c[v]||(h=p=0)||d.pop())if((u?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++h&&(y&&((c[b]||(c[b]={}))[e]=[E,h]),c===t))break;return h-=i,h===r||0===h%r&&h/r>=0}}},PSEUDO:function(e,t){var n,r=s.pseudos[e]||s.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],s.setFilters.hasOwnProperty(e.toLowerCase
())?at(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=j.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(W,"$1"));return r[b]?at(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)(s=o[u])&&(e[u]=!(t[u]=s))}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t
)).indexOf(e)>-1}}),lang:at(function(e){return Q.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus
())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!s.pseudos.empty(e)},header:
function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[0>n?n+t:n]}),even:dt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e
}),odd:dt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:dt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:dt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},s.pseudos.nth=s.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})s.pseudos[n]=ht(n);for(n in{submit:!0,reset:!0})s.pseudos[n]=pt(n);vt.prototype=s.filters=s.pseudos,s.setFilters=new vt,a=ot.compile=function(e,t){var n,r=[],i=[],s=C[e+" "];if(!s){t||(t=mt(e)),n=t.length
;while(n--)s=St(t[n]),s[b]?r.push(s):i.push(s);s=C(e,xt(i,r))}return s},r.sortStable=b.split("").sort(L).join("")===b,r.detectDuplicates=k,c(),r.sortDetached=ft(function(e){return 1&e.compareDocumentPosition(h.createElement("div"))}),ft(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||lt("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ft(function(e){return e.innerHTML="<input/>",e.firstChild
.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||lt("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ft(function(e){return null==e.getAttribute("disabled")})||lt(F,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=ot,x.expr=ot.selectors,x.expr[":"]=x.expr.pseudos,x.unique=ot.uniqueSort,x.text=ot.getText,x.isXMLDoc=ot.isXML,x.contains=ot.contains}(e);var D={};x.Callbacks=
function(e){e="string"==typeof e?D[e]||A(e):x.extend({},e);var t,n,r,i,s,o,u=[],a=!e.once&&[],f=function(h){for(t=e.memory&&h,n=!0,o=i||0,i=0,s=u.length,r=!0;u&&s>o;o++)if(u[o].apply(h[0],h[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,u&&(a?a.length&&f(a.shift()):t?u=[]:l.disable())},l={add:function(){if(u){var n=u.length;(function o(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&l.has(n)||u.push(n):n&&n.length&&"string"!==r&&o(n)})})(arguments),r?s=u.length:t&&(i=n,f(t))}return this
},remove:function(){return u&&x.each(arguments,function(e,t){var n;while((n=x.inArray(t,u,n))>-1)u.splice(n,1),r&&(s>=n&&s--,o>=n&&o--)}),this},has:function(e){return e?x.inArray(e,u)>-1:!!u&&!!u.length},empty:function(){return u=[],s=0,this},disable:function(){return u=a=t=undefined,this},disabled:function(){return!u},lock:function(){return a=undefined,t||l.disable(),this},locked:function(){return!a},fireWith:function(e,t){return!u||n&&!a||(t=t||[],t=[e,t.slice?t.slice():t],r?a.push(t):f(t)),this
},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!n}};return l},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,s){var o=s[0],u=x.isFunction
(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===r?n.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[1^e][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s
[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=d.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,s=1===i?e:x.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?d.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1)for(u=Array(r),a=Array(r),f=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i;return i||s.resolveWith(f,
n),s.promise()}}),x.support=function(t){var n=o.createElement("input"),r=o.createDocumentFragment(),i=o.createElement("div"),s=o.createElement("select"),u=s.appendChild(o.createElement("option"));return n.type?(n.type="checkbox",t.checkOn=""!==n.value,t.optSelected=u.selected,t.reliableMarginRight=!0,t.boxSizingReliable=!0,t.pixelPosition=!1,n.checked=!0,t.noCloneChecked=n.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled,n=o.createElement("input"),n.value="t",n.type="radio",t.radioValue="t"===
n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),t.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,t.focusinBubbles="onfocusin"in e,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===i.style.backgroundClip,x(function(){var n,r,s="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",u=o.getElementsByTagName("body")[0];u&&(n=
o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",x.swap(u,null!=u.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===i.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(i,null
)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(o.createElement("div")),r.style.cssText=i.style.cssText=s,r.style.marginRight=r.style.width="0",i.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),u.removeChild(n))}),t):t}({});var L,q,H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,O=/([A-Z])/g;F.uid=1,F.accepts=function(e){return e.nodeType?1===e.nodeType||9===e.nodeType:!0},F.prototype={key:function(e){if(!
F.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=F.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,x.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),s=this.cache[i];if("string"==typeof t)s[t]=n;else if(x.isEmptyObject(s))x.extend(this.cache[i],t);else for(r in t)s[r]=t[r];return s},get:function(e,t){var n=this.cache[this.key(e)];return t===undefined?n:n[t]},access:function(e,t,n){var r;return t===
undefined||t&&"string"==typeof t&&n===undefined?(r=this.get(e,t),r!==undefined?r:this.get(e,x.camelCase(t))):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,r,i,s=this.key(e),o=this.cache[s];if(t===undefined)this.cache[s]={};else{x.isArray(t)?r=t.concat(t.map(x.camelCase)):(i=x.camelCase(t),t in o?r=[t,i]:(r=i,r=r in o?[r]:r.match(w)||[])),n=r.length;while(n--)delete o[r[n]]}},hasData:function(e){return!x.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando
]&&delete this.cache[e[this.expando]]}},L=new F,q=new F,x.extend({acceptData:F.accepts,hasData:function(e){return L.hasData(e)||q.hasData(e)},data:function(e,t,n){return L.access(e,t,n)},removeData:function(e,t){L.remove(e,t)},_data:function(e,t,n){return q.access(e,t,n)},_removeData:function(e,t){q.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i=this[0],s=0,o=null;if(e===undefined){if(this.length&&(o=L.get(i),1===i.nodeType&&!q.get(i,"hasDataAttrs"))){for(n=i.attributes;n.length>s;s++)r=
n[s].name,0===r.indexOf("data-")&&(r=x.camelCase(r.slice(5)),P(i,r,o[r]));q.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){L.set(this,e)}):x.access(this,function(t){var n,r=x.camelCase(e);if(i&&t===undefined){if(n=L.get(i,e),n!==undefined)return n;if(n=L.get(i,r),n!==undefined)return n;if(n=P(i,r,undefined),n!==undefined)return n}else this.each(function(){var n=L.get(this,r);L.set(this,r,t),-1!==e.indexOf("-")&&n!==undefined&&L.set(this,e,t)})},null,t,arguments.length>1
,null,!0)},removeData:function(e){return this.each(function(){L.remove(this,e)})}}),x.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=q.get(e,t),n&&(!r||x.isArray(n)?r=q.access(e,t,x.makeArray(n)):r.push(n)),r||[]):undefined},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),s=x._queueHooks(e,t),o=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks
:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(function(){q.remove(e,[t+"queue",n])})})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?x.queue(this[0],e):t===undefined?this:this.each(function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=
x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),s=this,o=this.length,u=function(){--r||i.resolveWith(s,[s])};"string"!=typeof e&&(t=e,e=undefined),e=e||"fx";while(o--)n=q.get(s[o],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(u));return u(),i.promise(t)}});var R,M,W=/[\t\r\n\f]/g,$=/\r/g,B=/^(?:input|select|textarea|button)$/i
;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[x.propFix[e]||e]})},addClass:function(e){var t,n,r,i,s,o=0,u=this.length,a="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(a)for(t=
(e||"").match(w)||[];u>o;o++)if(n=this[o],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(W," "):" ")){s=0;while(i=t[s++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(w)||[];u>o;o++)if(n=this[o],r=1===n.nodeType&&(n.className?(" "+n.className+" "
).replace(W," "):"")){s=0;while(i=t[s++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,i=0,s=x(this),o=e.match(w)||[];while(t=o[i++])s.hasClass(t)?s.removeClass(t):s.addClass(t)}else(n===r||"boolean"===
n)&&(this.className&&q.set(this,"__className__",this.className),this.className=this.className||e===!1?"":q.get(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(W," ").indexOf(t)>=0)return!0;return!1},val:function(e){var t,n,r,i=this[0];if(arguments.length)return r=x.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,x(this).val()):e,null==i?i="":"number"==typeof 
i?i+="":x.isArray(i)&&(i=x.map(i,function(e){return null==e?"":e+""})),t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,i,"value")!==undefined||(this.value=i))});if(i)return t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(i,"value"))!==undefined?n:(n=i.value,"string"==typeof n?n.replace($,""):null==n?"":n)}}),x.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:
{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s="select-one"===e.type||0>i,o=s?null:[],u=s?i+1:r.length,a=0>i?u:s?i:0;for(;u>a;a++)if(n=r[a],!(!n.selected&&a!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),s)return t;o.push(t)}return o},set:function(e,t){var n,r,i=e.options,s=x.makeArray(t),o=i.length;while(o--)r=i[o],(r.selected=x.inArray(x(r).val(),s)>=0)&&(n=!0);return n||(e.selectedIndex=-1
),s}}},attr:function(e,t,n){var i,s,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===r?x.prop(e,t,n):(1===o&&x.isXMLDoc(e)||(t=t.toLowerCase(),i=x.attrHooks[t]||(x.expr.match.bool.test(t)?M:R)),n===undefined?i&&"get"in i&&null!==(s=i.get(e,t))?s:(s=x.find.attr(e,t),null==s?undefined:s):null!==n?i&&"set"in i&&(s=i.set(e,n,t))!==undefined?s:(e.setAttribute(t,n+""),n):(x.removeAttr(e,t),undefined))},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(w);if(s&&1===e.nodeType)while(
n=s[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,s,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return s=1!==o||!x.isXMLDoc(e),s&&(t=x.propFix[t]||t,i=x.propHooks[t]),n!==undefined?i&&"set"in i&&(r=i.set(e,n,t))!==undefined?r:e[t]=
n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||B.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),M={set:function(e,t,n){return t===!1?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,t){var n=x.expr.attrHandle[t]||x.find.attr;x.expr.attrHandle[t]=function(e,t,r){var i=x.expr.attrHandle[t],s=r?undefined:(x.expr.attrHandle[t]=undefined)!=n(e,t,r)?t.toLowerCase():null;return x.expr.attrHandle
[t]=i,s}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,t){return x.isArray(t)?e.checked=x.inArray(x(e).val(),t)>=0:undefined}},x.support.checkOn||(x.valHooks
[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var I=/^key/,z=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;x.event={global:{},add:function(e,t,n,i,s){var o,u,a,f,l,c,h,p,d,v,m,g=q.get(e);if(g){n.handler&&(o=n,n=o.handler,s=o.selector),n.guid||(n.guid=x.guid++),(f=g.events)||(f=g.events={}),(u=g.handle)||(u=g.handle=function(e){return typeof x===r||e&&x.event.triggered===e.type?undefined:x.event.dispatch.apply(u.elem,arguments
)},u.elem=e),t=(t||"").match(w)||[""],l=t.length;while(l--)a=X.exec(t[l])||[],d=m=a[1],v=(a[2]||"").split(".").sort(),d&&(h=x.event.special[d]||{},d=(s?h.delegateType:h.bindType)||d,h=x.event.special[d]||{},c=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:s,needsContext:s&&x.expr.match.needsContext.test(s),namespace:v.join(".")},o),(p=f[d])||(p=f[d]=[],p.delegateCount=0,h.setup&&h.setup.call(e,i,v,u)!==!1||e.addEventListener&&e.addEventListener(d,u,!1)),h.add&&(h.add.call(e,c),
c.handler.guid||(c.handler.guid=n.guid)),s?p.splice(p.delegateCount++,0,c):p.push(c),x.event.global[d]=!0);e=null}},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=q.hasData(e)&&q.get(e);if(m&&(a=m.events)){t=(t||"").match(w)||[""],f=t.length;while(f--)if(u=X.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort(),p){c=x.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=a[p]||[],u=u[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=h.length;while(s--)l=h[s],!i&&v!==l.origType||
n&&n.guid!==l.guid||u&&!u.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(h.splice(s,1),l.selector&&h.delegateCount--,c.remove&&c.remove.call(e,l));o&&!h.length&&(c.teardown&&c.teardown.call(e,d,m.handle)!==!1||x.removeEvent(e,p,m.handle),delete a[p])}else for(p in a)x.event.remove(e,p+t[f],n,r,!0);x.isEmptyObject(a)&&(delete m.handle,q.remove(e,"events"))}},trigger:function(t,n,r,i){var s,u,a,f,l,c,h,p=[r||o],d=y.call(t,"type")?t.type:t,v=y.call(t,"namespace")?t.namespace.split("."
):[];if(u=a=r=r||o,3!==r.nodeType&&8!==r.nodeType&&!_.test(d+x.event.triggered)&&(d.indexOf(".")>=0&&(v=d.split("."),d=v.shift(),v.sort()),l=0>d.indexOf(":")&&"on"+d,t=t[x.expando]?t:new x.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=v.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),h=x.event.special[d]||{},i||!h.trigger||h.trigger.apply(r,n)!==!1)){if(!i&&!h.noBubble&&!
x.isWindow(r)){for(f=h.delegateType||d,_.test(f+d)||(u=u.parentNode);u;u=u.parentNode)p.push(u),a=u;a===(r.ownerDocument||o)&&p.push(a.defaultView||a.parentWindow||e)}s=0;while((u=p[s++])&&!t.isPropagationStopped())t.type=s>1?f:h.bindType||d,c=(q.get(u,"events")||{})[t.type]&&q.get(u,"handle"),c&&c.apply(u,n),c=l&&u[l],c&&x.acceptData(u)&&c.apply&&c.apply(u,n)===!1&&t.preventDefault();return t.type=d,i||t.isDefaultPrevented()||h._default&&h._default.apply(p.pop(),n)!==!1||!x.acceptData(r)||l&&x.isFunction
(r[d])&&!x.isWindow(r)&&(a=r[l],a&&(r[l]=null),x.event.triggered=d,r[d](),x.event.triggered=undefined,a&&(r[l]=a)),t.result}},dispatch:function(e){e=x.event.fix(e);var t,n,r,i,s,o=[],u=d.call(arguments),a=(q.get(this,"events")||{})[e.type]||[],f=x.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,e)!==!1){o=x.event.handlers.call(this,e,a),t=0;while((i=o[t++])&&!e.isPropagationStopped()){e.currentTarget=i.elem,n=0;while((s=i.handlers[n++])&&!e.isImmediatePropagationStopped
())(!e.namespace_re||e.namespace_re.test(s.namespace))&&(e.handleObj=s,e.data=s.data,r=((x.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,u),r!==undefined&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return f.postDispatch&&f.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,s,o=[],u=t.delegateCount,a=e.target;if(u&&a.nodeType&&(!e.button||"click"!==e.type))for(;a!==this;a=a.parentNode||this)if(a.disabled!==!0||"click"!==e.type){for(r=[],n=0;u>n
;n++)s=t[n],i=s.selector+" ",r[i]===undefined&&(r[i]=s.needsContext?x(i,this).index(a)>=0:x.find(i,this,null,[a]).length),r[i]&&r.push(s);r.length&&o.push({elem:a,handlers:r})}return t.length>u&&o.push({elem:this,handlers:t.slice(u)}),o},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t
.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,s=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||o,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||s===undefined||(
e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,s=e,u=this.fixHooks[i];u||(this.fixHooks[i]=u=z.test(i)?this.mouseHooks:I.test(i)?this.keyHooks:{}),r=u.props?this.props.concat(u.props):this.props,e=new x.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=o),3===e.target.nodeType&&(e.target=e.target.parentNode),u.filter?u.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==V()&&this.focus?(this.focus
(),!1):undefined},delegateType:"focusin"},blur:{trigger:function(){return this===V()&&this.blur?(this.blur(),!1):undefined},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&x.nodeName(this,"input")?(this.click(),!1):undefined},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated
:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},x.Event=function(e,t){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.getPreventDefault&&e.getPreventDefault()?U:Y):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,undefined
):new x.Event(e,t)},x.Event.prototype={isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=U,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=U,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"
},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener
(e,r,!0)}}}),x.fn.extend({on:function(e,t,n,r,i){var s,o;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=undefined);for(o in e)this.on(o,t,n,e[o],i);return this}if(null==n&&null==r?(r=t,n=t=undefined):null==r&&("string"==typeof t?(r=n,n=undefined):(r=n,n=t,t=undefined)),r===!1)r=Y;else if(!r)return this;return 1===i&&(s=r,r=function(e){return x().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this
.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=undefined),n===!1&&(n=Y),this.each(function(){x.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=
this[0];return n?x.event.trigger(e,t,n,!0):undefined}});var G=/^.[^:#\[\.,]*$/,J=/^(?:parents|prev(?:Until|All))/,Q=x.expr.match.needsContext,K={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(
e){var t=x(e,this),n=t.length;return this.filter(function(){var e=0;for(;n>e;e++)if(x.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(et(this,e||[],!0))},filter:function(e){return this.pushStack(et(this,e||[],!1))},is:function(e){return!!et(this,"string"==typeof e&&Q.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,s=[],o=Q.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(o?o.
index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=s.push(n);break}return this.pushStack(s.length>1?x.unique(s):s)},index:function(e){return e?"string"==typeof e?g.call(x(e),this[0]):g.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject
.filter(e))}}),x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir
(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return e.contentDocument||x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(K[e]||x.unique(i),J.test(e)&&i.reverse()),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+
e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){var r=[],i=n!==undefined;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nt=/<([\w:]+)/,rt=/<|&#?\w+;/,it=/<(?:script|style|link)/i
,ot=/^(?:checkbox|radio)$/i,st=/checked\s*(?:[^=]|=\s*.checked.)/i,at=/^$|\/(?:java|ecma)script/i,ut=/^true\/(.*)/,lt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ct={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ct.optgroup=ct.option,ct.tbody=ct.tfoot=ct.colgroup=ct.caption=ct.thead,ct.th=ct.td,x.
fn.extend({text:function(e){return x.access(this,function(e){return e===undefined?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=pt(this,e);t.insertBefore
(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(mt(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&dt(mt(n,"script")),n.parentNode.removeChild(n));return this},empty
:function(){var e,t=0;for(;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(mt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!ct[(nt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(tt,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===
t.nodeType&&(x.cleanData(mt(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=f.apply([],e);var r,i,s,o,u,a,l=0,c=this.length
,h=this,p=c-1,d=e[0],v=x.isFunction(d);if(v||!(1>=c||"string"!=typeof d||x.support.checkClone)&&st.test(d))return this.each(function(r){var i=h.eq(r);v&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(r=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(s=x.map(mt(r,"script"),ft),o=s.length;c>l;l++)u=r,l!==p&&(u=x.clone(u,!0,!0),o&&x.merge(s,mt(u,"script"))),t.call(this[l],u,l);if(o)for(a=s[s.length-1].ownerDocument,x.map(s,ht),l=0
;o>l;l++)u=s[l],at.test(u.type||"")&&!q.access(u,"globalEval")&&x.contains(a,u)&&(u.src?x._evalUrl(u.src):x.globalEval(u.textContent.replace(lt,"")))}return this}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=[],i=x(e),s=i.length-1,o=0;for(;s>=o;o++)n=o===s?this:this.clone(!0),x(i[o])[t](n),h.apply(r,n.get());return this.pushStack(r)}}),x.extend({clone:function(e,t,n){var r,i,s,o,u=e.cloneNode
(!0),a=x.contains(e.ownerDocument,e);if(!(x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(o=mt(u),s=mt(e),r=0,i=s.length;i>r;r++)yt(s[r],o[r]);if(t)if(n)for(s=s||mt(e),o=o||mt(u),r=0,i=s.length;i>r;r++)gt(s[r],o[r]);else gt(e,u);return o=mt(u,"script"),o.length>0&&dt(o,!a&&mt(e,"script")),u},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l=0,c=e.length,h=t.createDocumentFragment(),p=[];for(;c>l;l++)if(i=e[l],i||0===i)if("object"===x.type(i))x.merge(p,i.nodeType?[i]:
i);else if(rt.test(i)){s=s||h.appendChild(t.createElement("div")),o=(nt.exec(i)||["",""])[1].toLowerCase(),u=ct[o]||ct._default,s.innerHTML=u[1]+i.replace(tt,"<$1></$2>")+u[2],f=u[0];while(f--)s=s.lastChild;x.merge(p,s.childNodes),s=h.firstChild,s.textContent=""}else p.push(t.createTextNode(i));h.textContent="",l=0;while(i=p[l++])if((!r||-1===x.inArray(i,r))&&(a=x.contains(i.ownerDocument,i),s=mt(h.appendChild(i),"script"),a&&dt(s),n)){f=0;while(i=s[f++])at.test(i.type||"")&&n.push(i)}return h},cleanData
:function(e){var t,n,r,i,s,o,u=x.event.special,a=0;for(;(n=e[a])!==undefined;a++){if(F.accepts(n)&&(s=n[q.expando],s&&(t=q.cache[s]))){if(r=Object.keys(t.events||{}),r.length)for(o=0;(i=r[o])!==undefined;o++)u[i]?x.event.remove(n,i):x.removeEvent(n,i,t.handle);q.cache[s]&&delete q.cache[s]}delete L.cache[n[L.expando]]}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){var t;return x.isFunction(e)?this.each(
function(t){x(this).wrapAll(e.call(this,t))}):(this[0]&&(t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(
n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var vt,xt,bt=/^(none|table(?!-c[ea]).+)/,wt=/^margin/,Tt=RegExp("^("+b+")(.*)$","i"),Ct=RegExp("^("+b+")(?!px)[a-z%]+$","i"),kt=RegExp("^([+-])=("+b+")","i"),Nt={BODY:"block"},Et={position:"absolute",visibility:"hidden",display:"block"},St={letterSpacing:0,fontWeight:400},jt=["Top","Right","Bottom","Left"],Dt=["Webkit","O","Moz","ms"
];x.fn.extend({css:function(e,t){return x.access(this,function(e,t,n){var r,i,s={},o=0;if(x.isArray(t)){for(r=qt(e),i=t.length;i>o;o++)s[t[o]]=x.css(e,t[o],!1,r);return s}return n!==undefined?x.style(e,t,n):x.css(e,t)},e,t,arguments.length>1)},show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Lt(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t)
{var n=vt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,s,o,u=x.camelCase(t),a=e.style;return t=x.cssProps[u]||(x.cssProps[u]=At(a,u)),o=x.cssHooks[t]||x.cssHooks[u],n===undefined?o&&"get"in o&&(i=o.get(e,!1,r))!==undefined?i:a[t]:(s=typeof n,"string"===s&&(i=kt.exec(n))&&(n=
(i[1]+1)*i[2]+parseFloat(x.css(e,t)),s="number"),null==n||"number"===s&&isNaN(n)||("number"!==s||x.cssNumber[u]||(n+="px"),x.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(a[t]="inherit"),o&&"set"in o&&(n=o.set(e,n,r))===undefined||(a[t]=n)),undefined)}},css:function(e,t,n,r){var i,s,o,u=x.camelCase(t);return t=x.cssProps[u]||(x.cssProps[u]=At(e.style,u)),o=x.cssHooks[t]||x.cssHooks[u],o&&"get"in o&&(i=o.get(e,!0,n)),i===undefined&&(i=vt(e,t,r)),"normal"===i&&t in St&&(i=St[t]),""===
n||n?(s=parseFloat(i),n===!0||x.isNumeric(s)?s||0:i):i}}),vt=function(e,t,n){var r,i,s,o=n||qt(e),u=o?o.getPropertyValue(t)||o[t]:undefined,a=e.style;return o&&(""!==u||x.contains(e.ownerDocument,e)||(u=x.style(e,t)),Ct.test(u)&&wt.test(t)&&(r=a.width,i=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=u,u=o.width,a.width=r,a.minWidth=i,a.maxWidth=s)),u},x.each(["height","width"],function(e,t){x.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&bt.test(x.css(e,"display"))?x.swap(e,
Et,function(){return Pt(e,t,r)}):Pt(e,t,r):undefined},set:function(e,n,r){var i=r&&qt(e);return Ot(e,n,r?Ft(e,t,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,t){return t?x.swap(e,{display:"inline-block"},vt,[e,"marginRight"]):undefined}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,t){x.cssHooks[t]={get:function(e,n){return n?(n=vt(e,t),Ct.test(n)?x(e).position
()[t]+"px":n):undefined}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},s="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+jt[r]+t]=s[r]||s[r-2]||s[0];return i}},wt.test(e)||(x.cssHooks[e+t].set=Ot)});var Wt=/%20/g,$t=/\[\]$/,Bt=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i
,zt=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&zt.test(this.nodeName)&&!It.test(e)&&(this.checked||!ot.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(Bt
,"\r\n")}}):{name:t.name,value:n.replace(Bt,"\r\n")}}).get()}}),x.param=function(e,t){var n,r=[],i=function(e,t){t=x.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){i(this.name,this.value)});else for(n in e)_t(n,e[n],t,i);return r.join("&").replace(Wt,"+")},x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu"
.split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Xt,Ut,Yt=x.now(),Vt=/\?/,Gt=/#.*$/,Jt=/([?&])_=[^&]*/,Qt=/^(.*?):[ \t]*([^\r\n]*)$/gm
,Kt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Zt=/^(?:GET|HEAD)$/,en=/^\/\//,tn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,nn=x.fn.load,rn={},on={},sn="*/".concat("*");try{Ut=i.href}catch(an){Ut=o.createElement("a"),Ut.href="",Ut=Ut.href}Xt=tn.exec(Ut.toLowerCase())||[],x.fn.load=function(e,t,n){if("string"!=typeof e&&nn)return nn.apply(this,arguments);var r,i,s,o=this,u=e.indexOf(" ");return u>=0&&(r=e.slice(u),e=e.slice(0,u)),x.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof 
t&&(i="POST"),o.length>0&&x.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){s=arguments,o.html(r?x("<div>").append(x.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){o.each(n,s||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ut,type:"GET",isLocal:Kt.test(Xt[1]),global:!0,processData:!0,async:!0,contentType
:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?cn(cn(e,x.ajaxSettings),t):cn(x.ajaxSettings,e)}
,ajaxPrefilter:un(rn),ajaxTransport:un(on),ajax:function(e,t){function T(e,t,s,u){var f,m,g,b,w,S=t;2!==y&&(y=2,o&&clearTimeout(o),n=undefined,i=u||"",E.readyState=e>0?4:0,f=e>=200&&300>e||304===e,s&&(b=pn(l,E,s)),b=fn(l,b,E,f),f?(l.ifModified&&(w=E.getResponseHeader("Last-Modified"),w&&(x.lastModified[r]=w),w=E.getResponseHeader("etag"),w&&(x.etag[r]=w)),204===e||"HEAD"===l.type?S="nocontent":304===e?S="notmodified":(S=b.state,m=b.data,g=b.error,f=!g)):(g=S,(e||!S)&&(S="error",0>e&&(e=0))),E.status=
e,E.statusText=(t||S)+"",f?p.resolveWith(c,[m,S,E]):p.rejectWith(c,[E,S,g]),E.statusCode(v),v=undefined,a&&h.trigger(f?"ajaxSuccess":"ajaxError",[E,l,f?m:g]),d.fireWith(c,[E,S]),a&&(h.trigger("ajaxComplete",[E,l]),--x.active||x.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,r,i,s,o,u,a,f,l=x.ajaxSetup({},t),c=l.context||l,h=l.context&&(c.nodeType||c.jquery)?x(c):x.event,p=x.Deferred(),d=x.Callbacks("once memory"),v=l.statusCode||{},m={},g={},y=0,b="canceled",E={readyState
:0,getResponseHeader:function(e){var t;if(2===y){if(!s){s={};while(t=Qt.exec(i))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=g[n]=g[n]||e,m[e]=t),this},overrideMimeType:function(e){return y||(l.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>y)for(t in e)v[t]=[v[t],e[t]];else E.always(e[E.status]);return this},abort:function(e){var t=e||b;return n&&
n.abort(t),T(0,t),this}};if(p.promise(E).complete=d.add,E.success=E.done,E.error=E.fail,l.url=((e||l.url||Ut)+"").replace(Gt,"").replace(en,Xt[1]+"//"),l.type=t.method||t.type||l.method||l.type,l.dataTypes=x.trim(l.dataType||"*").toLowerCase().match(w)||[""],null==l.crossDomain&&(u=tn.exec(l.url.toLowerCase()),l.crossDomain=!(!u||u[1]===Xt[1]&&u[2]===Xt[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(Xt[3]||("http:"===Xt[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=x.param
(l.data,l.traditional)),ln(rn,l,t,E),2===y)return E;a=l.global,a&&0===x.active++&&x.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Zt.test(l.type),r=l.url,l.hasContent||(l.data&&(r=l.url+=(Vt.test(r)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Jt.test(r)?r.replace(Jt,"$1_="+Yt++):r+(Vt.test(r)?"&":"?")+"_="+Yt++)),l.ifModified&&(x.lastModified[r]&&E.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&E.setRequestHeader("If-None-Match",x.etag[r])),(l.data&&
l.hasContent&&l.contentType!==!1||t.contentType)&&E.setRequestHeader("Content-Type",l.contentType),E.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+sn+"; q=0.01":""):l.accepts["*"]);for(f in l.headers)E.setRequestHeader(f,l.headers[f]);if(!l.beforeSend||l.beforeSend.call(c,E,l)!==!1&&2!==y){b="abort";for(f in{success:1,error:1,complete:1})E[f](l[f]);if(n=ln(on,l,t,E)){E.readyState=1,a&&h.trigger("ajaxSend",[E,l]),l.async&&l
.timeout>0&&(o=setTimeout(function(){E.abort("timeout")},l.timeout));try{y=1,n.send(m,T)}catch(S){if(!(2>y))throw S;T(-1,S)}}else T(-1,"No Transport");return E}return E.abort()},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,undefined,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,i){return x.isFunction(n)&&(i=i||r,r=n,n=undefined),x.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=x("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),o.head.appendChild(t[0])},abort:function(){n&&
n()}}}});var hn=[],dn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=hn.pop()||x.expando+"_"+Yt++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(t,n,r){var i,s,o,u=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");return u||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=x.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,u?t[u]=t[u].replace
(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(Vt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||x.error(i+" was not called"),o[0]},t.dataTypes[0]="json",s=e[i],e[i]=function(){o=arguments},r.always(function(){e[i]=s,t[i]&&(t.jsonpCallback=n.jsonpCallback,hn.push(i)),o&&x.isFunction(s)&&s(o[0]),o=s=undefined}),"script"):undefined}),x.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var gn=x.ajaxSettings.xhr(),mn={0:200,1223:204},yn=0,vn={};e.ActiveXObject&&
x(e).on("unload",function(){for(var e in vn)vn[e]();vn=undefined}),x.support.cors=!!gn&&"withCredentials"in gn,x.support.ajax=gn=!!gn,x.ajaxTransport(function(e){var t;return x.support.cors||gn&&!e.crossDomain?{send:function(n,r){var i,s,o=e.xhr();if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(
i in n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete vn[s],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?r(o.status||404,o.statusText):r(mn[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:undefined,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=vn[s=yn++]=t("abort"),o.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:undefined});var xn,bn,wn=/^(?:toggle|show|hide)$/,Tn=RegExp("^(?:([+-])=|)("+
b+")([a-z%]*)$","i"),Cn=/queueHooks$/,kn=[An],Nn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Tn.exec(t),s=i&&i[3]||(x.cssNumber[e]?"":"px"),o=(x.cssNumber[e]||"px"!==s&&+r)&&Tn.exec(x.css(n.elem,e)),u=1,a=20;if(o&&o[3]!==s){s=s||o[3],i=i||[],o=+r||1;do u=u||".5",o/=u,x.style(n.elem,e,o+s);while(u!==(u=n.cur()/r)&&1!==u&&--a)}return i&&(o=n.start=+o||+r||0,n.unit=s,n.end=i[1]?o+(i[1]+1)*i[2]:+i[2]),n}]};x.Animation=x.extend(jn,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=
e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Nn[n]=Nn[n]||[],Nn[n].unshift(t)},prefilter:function(e,t){t?kn.unshift(e):kn.push(e)}}),x.Tween=Ln,Ln.prototype={constructor:Ln,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(x.cssNumber[n]?"":"px")},cur:function(){var e=Ln.propHooks[this.prop];return e&&e.get?e.get(this):Ln.propHooks._default.get(this)},run:function(e){var t,n=Ln.propHooks[this.prop
];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ln.propHooks._default.set(this),this}},Ln.prototype.init.prototype=Ln.prototype,Ln.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e
.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Ln.propHooks.scrollTop=Ln.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(qn(t,!0),e,r,i)}}),x.
fn.extend({fadeTo:function(e,t,n,r){return this.filter(Lt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),s=x.speed(t,n,r),o=function(){var t=jn(this,x.extend({},e),s);(i||q.get(this,"finish"))&&t.stop(!0)};return o.finish=o,i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=undefined),t&&e!==!1&&this.queue(e||"fx",[]),this.each
(function(){var t=!0,i=null!=e&&e+"queueHooks",s=x.timers,o=q.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&Cn.test(i)&&r(o[i]);for(i=s.length;i--;)s[i].elem!==this||null!=e&&s[i].queue!==e||(s[i].anim.stop(n),t=!1,s.splice(i,1));(t||!n)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=q.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=x.timers,o=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0)
,t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),x.each({slideDown:qn("show"),slideUp:qn("hide"),slideToggle:qn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration
:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=Ln.prototype.init,x.fx.tick=function(){var e,t=x.timers
,n=0;for(xn=x.now();t.length>n;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||x.fx.stop(),xn=undefined},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){bn||(bn=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(bn),bn=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(
e){if(arguments.length)return e===undefined?this:this.each(function(t){x.offset.setOffset(this,e,t)});var t,n,i=this[0],s={top:0,left:0},o=i&&i.ownerDocument;if(o)return t=o.documentElement,x.contains(t,i)?(typeof i.getBoundingClientRect!==r&&(s=i.getBoundingClientRect()),n=Hn(o),{top:s.top+n.pageYOffset-t.clientTop,left:s.left+n.pageXOffset-t.clientLeft}):s},x.offset={setOffset:function(e,t,n){var r,i,s,o,u,a,f,l=x.css(e,"position"),c=x(e),h={};"static"===l&&(e.style.position="relative"),u=c.offset
(),s=x.css(e,"top"),a=x.css(e,"left"),f=("absolute"===l||"fixed"===l)&&(s+a).indexOf("auto")>-1,f?(r=c.position(),o=r.top,i=r.left):(o=parseFloat(s)||0,i=parseFloat(a)||0),x.isFunction(t)&&(t=t.call(e,n,u)),null!=t.top&&(h.top=t.top-u.top+o),null!=t.left&&(h.left=t.left-u.left+i),"using"in t?t.using.call(e,h):c.css(h)}},x.fn.extend({position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===x.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset
(),x.nodeName(e[0],"html")||(r=e.offset()),r.top+=x.css(e[0],"borderTopWidth",!0),r.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-x.css(n,"marginTop",!0),left:t.left-r.left-x.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;x.fn[t]=function(i
){return x.access(this,function(t,i,s){var o=Hn(t);return s===undefined?o?o[n]:t[i]:(o?o.scrollTo(r?e.pageXOffset:s,r?s:e.pageYOffset):t[i]=s,undefined)},t,i,arguments.length,null)}}),x.each({Height:"height",Width:"width"},function(e,t){x.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){x.fn[r]=function(r,i){var s=arguments.length&&(n||"boolean"!=typeof r),o=n||(r===!0||i===!0?"margin":"border");return x.access(this,function(t,n,r){var i;return x.isWindow(t)?t.document.documentElement
["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===undefined?x.css(t,n,o):x.style(t,n,r,o)},t,s?r:undefined,s,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}),"object"==typeof e&&"object"==typeof e.document&&(e.jQuery=
e.$=x)}(window),function(e,t,n){"use strict";function r(e,t){return t=t||Error,function(){var n=arguments[0],r="["+(e?e+":":"")+n+"] ",i=arguments[1],s=arguments,o,u;o=r+i.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n;return t+2<s.length?Wt(s[t+2]):e}),o=o+"\nhttp://errors.angularjs.org/1.3.14/"+(e?e+"/":"")+n;for(u=2;u<arguments.length;u++)o=o+(u==2?"?":"&")+"p"+(u-2)+"="+encodeURIComponent(Wt(arguments[u]));return new t(o)}}function S(e){if(e==null||W(e))return!1;var t=e.length;return e
.nodeType===jt&&t?!0:F(e)||R(e)||t===0||typeof t=="number"&&t>0&&t-1 in e}function x(e,t,n){var r,i;if(e)if(U(e))for(r in e)r!="prototype"&&r!="length"&&r!="name"&&(!e.hasOwnProperty||e.hasOwnProperty(r))&&t.call(n,e[r],r,e);else if(R(e)||S(e)){var s=typeof e!="object";for(r=0,i=e.length;r<i;r++)(s||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==x)e.forEach(t,n,e);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);return e}function T(e){return Object.keys(e).sort()}function N(e,t
,n){var r=T(e);for(var i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function C(e){return function(t,n){e(n,t)}}function k(){return++E}function L(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function A(e){var t=e.$$hashKey;for(var n=1,r=arguments.length;n<r;n++){var i=arguments[n];if(i){var s=Object.keys(i);for(var o=0,u=s.length;o<u;o++){var a=s[o];e[a]=i[a]}}}return L(e,t),e}function O(e){return parseInt(e,10)}function M(e,t){return A(Object.create(e),t)}function _(){}function D(e){return e}function P
(e){return function(){return e}}function H(e){return typeof e=="undefined"}function B(e){return typeof e!="undefined"}function j(e){return e!==null&&typeof e=="object"}function F(e){return typeof e=="string"}function I(e){return typeof e=="number"}function q(e){return g.call(e)==="[object Date]"}function U(e){return typeof e=="function"}function z(e){return g.call(e)==="[object RegExp]"}function W(e){return e&&e.window===e}function X(e){return e&&e.$evalAsync&&e.$watch}function V(e){return g.call
(e)==="[object File]"}function $(e){return g.call(e)==="[object FormData]"}function J(e){return g.call(e)==="[object Blob]"}function K(e){return typeof e=="boolean"}function Q(e){return e&&U(e.then)}function Z(e){return!!e&&!!(e.nodeName||e.prop&&e.attr&&e.find)}function et(e){var t={},n=e.split(","),r;for(r=0;r<n.length;r++)t[n[r]]=!0;return t}function tt(e){return o(e.nodeName||e[0]&&e[0].nodeName)}function nt(e,t){return Array.prototype.indexOf.call(e,t)!=-1}function rt(e,t){var n=e.indexOf(t)
;return n>=0&&e.splice(n,1),t}function it(e,t,n,r){if(W(e)||X(e))throw y("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(!t){t=e;if(e)if(R(e))t=it(e,[],n,r);else if(q(e))t=new Date(e.getTime());else if(z(e))t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]),t.lastIndex=e.lastIndex;else if(j(e)){var i=Object.create(Object.getPrototypeOf(e));t=it(e,i,n,r)}}else{if(e===t)throw y("cpi","Can't copy! Source and destination are identical.");n=n||[],r=r||[];if(j
(e)){var s=n.indexOf(e);if(s!==-1)return r[s];n.push(e),r.push(t)}var o;if(R(e)){t.length=0;for(var u=0;u<e.length;u++)o=it(e[u],null,n,r),j(e[u])&&(n.push(e[u]),r.push(o)),t.push(o)}else{var a=t.$$hashKey;R(t)?t.length=0:x(t,function(e,n){delete t[n]});for(var f in e)e.hasOwnProperty(f)&&(o=it(e[f],null,n,r),j(e[f])&&(n.push(e[f]),r.push(o)),t[f]=o);L(t,a)}}return t}function st(e,t){if(R(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(j(e)){t=t||{};for(var i in e)if(i.charAt(0)!=="$"||
i.charAt(1)!=="$")t[i]=e[i]}return t||e}function ot(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;var r=typeof e,i=typeof t,s,o,u;if(r==i&&r=="object"){if(!R(e)){if(q(e))return q(t)?ot(e.getTime(),t.getTime()):!1;if(z(e)&&z(t))return e.toString()==t.toString();if(X(e)||X(t)||W(e)||W(t)||R(t))return!1;u={};for(o in e){if(o.charAt(0)==="$"||U(e[o]))continue;if(!ot(e[o],t[o]))return!1;u[o]=!0}for(o in t)if(!u.hasOwnProperty(o)&&o.charAt(0)!=="$"&&t[o]!==n&&!U(t[o]))return!1
;return!0}if(!R(t))return!1;if((s=e.length)==t.length){for(o=0;o<s;o++)if(!ot(e[o],t[o]))return!1;return!0}}return!1}function at(e,t,n){return e.concat(d.call(t,n))}function ft(e,t){return d.call(e,t||0)}function lt(e,t){var n=arguments.length>2?ft(arguments,2):[];return!U(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,at(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function ct(e,r){var i=r;return typeof e=="string"&&
e.charAt(0)==="$"&&e.charAt(1)==="$"?i=n:W(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":X(r)&&(i="$SCOPE"),i}function ht(e,t){return typeof e=="undefined"?n:(I(t)||(t=t?2:null),JSON.stringify(e,ct,t))}function pt(e){return F(e)?JSON.parse(e):e}function dt(e){e=h(e).clone();try{e.empty()}catch(t){}var n=h("<div>").append(e).html();try{return e[0].nodeType===Ft?o(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+o(t)})}catch(t){return o(n)}}function vt(e){try{return decodeURIComponent
(e)}catch(t){}}function mt(e){var t={},n,r;return x((e||"").split("&"),function(e){if(e){n=e.replace(/\+/g,"%20").split("="),r=vt(n[0]);if(B(r)){var i=B(n[1])?vt(n[1]):!0;u.call(t,r)?R(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}}}),t}function gt(e){var t=[];return x(e,function(e,n){R(e)?x(e,function(e){t.push(bt(n,!0)+(e===!0?"":"="+bt(e,!0)))}):t.push(bt(n,!0)+(e===!0?"":"="+bt(e,!0)))}),t.length?t.join("&"):""}function yt(e){return bt(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi
,"+")}function bt(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function Et(e,t){var n,r,i=wt.length;e=h(e);for(r=0;r<i;++r){n=wt[r]+t;if(F(n=e.attr(n)))return n}return null}function St(e,t){var n,r,i={};x(wt,function(t){var i=t+"app";!n&&e.hasAttribute&&e.hasAttribute(i)&&(n=e,r=e.getAttribute(i))}),x(wt,function(t){var i=t+"app",s;!n&&(s=e.querySelector("["+i.replace(":","\\:"
)+"]"))&&(n=s,r=s.getAttribute(i))}),n&&(i.strictDi=Et(n,"strict-di")!==null,t(n,r?[r]:[],i))}function xt(n,r,i){j(i)||(i={});var s={strictDi:!1};i=A(s,i);var o=function(){n=h(n);if(n.injector()){var e=n[0]===t?"document":dt(n);throw y("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/</,"&lt;").replace(/>/,"&gt;"))}r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift
("ng");var s=Vn(r,i.strictDi);return s.invoke(["$rootScope","$rootElement","$compile","$injector",function(t,n,r,i){t.$apply(function(){n.data("$injector",i),r(n)(t)})}]),s},u=/^NG_ENABLE_DEBUG_INFO!/,a=/^NG_DEFER_BOOTSTRAP!/;e&&u.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(u,""));if(e&&!a.test(e.name))return o();e.name=e.name.replace(a,""),b.resumeBootstrap=function(e){return x(e,function(e){r.push(e)}),o()},U(b.resumeDeferredBootstrap)&&b.resumeDeferredBootstrap()}function Tt(){e
.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function Nt(e){var t=b.element(e).injector();if(!t)throw y("test","no injector found for element argument to getTestability");return t.get("$$testability")}function kt(e,t){return t=t||"_",e.replace(Ct,function(e,n){return(n?t:"")+e.toLowerCase()})}function Ot(){var t;if(Lt)return;p=e.jQuery,p&&p.fn.on?(h=p,A(p.fn,{scope:An.scope,isolateScope:An.isolateScope,controller:An.controller,injector:An.injector,inheritedData:An.inheritedData}),t=p.
cleanData,p.cleanData=function(e){var n;if(!At)for(var r=0,i;(i=e[r])!=null;r++)n=p._data(i,"events"),n&&n.$destroy&&p(i).triggerHandler("$destroy");else At=!1;t(e)}):h=pn,b.element=h,Lt=!0}function Mt(e,t,n){if(!e)throw y("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function _t(e,t,n){return n&&R(e)&&(e=e[e.length-1]),Mt(U(e),t,"not a function, got "+(e&&typeof e=="object"?e.constructor.name||"Object":typeof e)),e}function Dt(e,t){if(e==="hasOwnProperty")throw y("badname","hasOwnProperty is not a valid {0} name"
,t)}function Pt(e,t,n){if(!t)return e;var r=t.split("."),i,s=e,o=r.length;for(var u=0;u<o;u++)i=r[u],e&&(e=(s=e)[i]);return!n&&U(e)?lt(s,e):e}function Ht(e){var t=e[0],n=e[e.length-1],r=[t];do{t=t.nextSibling;if(!t)break;r.push(t)}while(t!==n);return h(r)}function Bt(){return Object.create(null)}function Ut(e){function i(e,t,n){return e[t]||(e[t]=n())}var t=r("$injector"),n=r("ng"),s=i(e,"angular",Object);return s.$$minErr=s.$$minErr||r,i(s,"module",function(){var e={};return function(s,o,u){var a=
function(e,t){if(e==="hasOwnProperty")throw n("badname","hasOwnProperty is not a valid {0} name",t)};return a(s,"module"),o&&e.hasOwnProperty(s)&&(e[s]=null),i(e,s,function(){function f(t,n,r,i){return i||(i=e),function(){return i[r||"push"]([t,n,arguments]),a}}if(!o)throw t("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",s);var e=[],n=[],r=[],i=f("$injector"
,"invoke","push",n),a={_invokeQueue:e,_configBlocks:n,_runBlocks:r,requires:o,name:s,provider:f("$provide","provider"),factory:f("$provide","factory"),service:f("$provide","service"),value:f("$provide","value"),constant:f("$provide","constant","unshift"),animation:f("$animateProvider","register"),filter:f("$filterProvider","register"),controller:f("$controllerProvider","register"),directive:f("$compileProvider","directive"),config:i,run:function(e){return r.push(e),this}};return u&&i(u),a})}})}function zt
(e){var t=[];return JSON.stringify(e,function(e,n){n=ct(e,n);if(j(n)){if(t.indexOf(n)>=0)return"<<already seen>>";t.push(n)}return n})}function Wt(e){return typeof e=="function"?e.toString().replace(/ \{[\s\S]*$/,""):typeof e=="undefined"?"undefined":typeof e!="string"?zt(e):e}function Vt(t){A(t,{bootstrap:xt,copy:it,extend:A,equals:ot,element:h,forEach:x,injector:Vn,noop:_,bind:lt,toJson:ht,fromJson:pt,identity:D,isUndefined:H,isDefined:B,isString:F,isFunction:U,isObject:j,isNumber:I,isElement:Z
,isArray:R,version:Xt,isDate:q,lowercase:o,uppercase:a,callbacks:{counter:0},getTestability:Nt,$$minErr:r,$$csp:ut,reloadWithDebugInfo:Tt}),w=Ut(e);try{w("ngLocale")}catch(n){w("ngLocale",[]).provider("$locale",Mr)}w("ng",["ngLocale"],["$provide",function(t){t.provider({$$sanitizeUri:Ni}),t.provider("$compile",nr).directive({a:ps,input:Xs,textarea:Xs,form:ws,script:Fo,select:Ro,style:zo,option:Uo,ngBind:Js,ngBindHtml:Qs,ngBindTemplate:Ks,ngClass:Zs,ngClassEven:to,ngClassOdd:eo,ngCloak:no,ngController
:ro,ngForm:Es,ngHide:_o,ngIf:oo,ngInclude:uo,ngInit:fo,ngNonBindable:Co,ngPluralize:ko,ngRepeat:Lo,ngShow:Mo,ngStyle:Do,ngSwitch:Po,ngSwitchWhen:Ho,ngSwitchDefault:Bo,ngOptions:qo,ngTransclude:jo,ngModel:Eo,ngList:lo,ngChange:Gs,pattern:Xo,ngPattern:Xo,required:Wo,ngRequired:Wo,minlength:$o,ngMinlength:$o,maxlength:Vo,ngMaxlength:Vo,ngValue:$s,ngModelOptions:xo}).directive({ngInclude:ao}).directive(ds).directive(io),t.provider({$anchorScroll:$n,$animate:Kn,$browser:Yn,$cacheFactory:Zn,$controller
:lr,$document:cr,$exceptionHandler:hr,$filter:Ri,$interpolate:Ar,$interval:Or,$http:Tr,$httpBackend:Cr,$location:Kr,$log:Qr,$parse:bi,$rootScope:Ti,$q:wi,$$q:Ei,$sce:Mi,$sceDelegate:Oi,$sniffer:_i,$templateCache:er,$templateRequest:Di,$$testability:Pi,$timeout:Hi,$window:qi,$$rAF:xi,$$asyncCallback:Qn,$$jqLite:Bn})}])}function Gt(){return++Jt}function nn(e){return e.replace(Yt,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Zt,"Moz$1")}function fn(e){return!sn.test(e)}function ln(e){var t=
e.nodeType;return t===jt||!t||t===qt}function cn(e,t){var n,r,i,s=t.createDocumentFragment(),o=[],u;if(fn(e))o.push(t.createTextNode(e));else{n=n||s.appendChild(t.createElement("div")),r=(on.exec(e)||["",""])[1].toLowerCase(),i=an[r]||an._default,n.innerHTML=i[1]+e.replace(un,"<$1></$2>")+i[2],u=i[0];while(u--)n=n.lastChild;o=at(o,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",x(o,function(e){s.appendChild(e)}),s}function hn(e,n){n=n||t;var r;return(r=rn.exec
(e))?[n.createElement(r[1])]:(r=cn(e,n))?r.childNodes:[]}function pn(e){if(e instanceof pn)return e;var t;F(e)&&(e=G(e),t=!0);if(!(this instanceof pn)){if(t&&e.charAt(0)!="<")throw tn("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new pn(e)}t?xn(this,hn(e)):xn(this,e)}function dn(e){return e.cloneNode(!0)}function vn(e,t){t||gn(e);if(e.querySelectorAll){var n=e.querySelectorAll("*");for(var r=0,i=n.length;r<i;r++)
gn(n[r])}}function mn(e,t,n,r){if(B(r))throw tn("offargs","jqLite#off() does not support the `selector` argument");var i=yn(e),s=i&&i.events,o=i&&i.handle;if(!o)return;if(!t)for(t in s)t!=="$destroy"&&Qt(e,t,o),delete s[t];else x(t.split(" "),function(t){if(B(n)){var r=s[t];rt(r||[],n);if(r&&r.length>0)return}Qt(e,t,o),delete s[t]})}function gn(e,t){var r=e.ng339,i=r&&$t[r];if(i){if(t){delete i.data[t];return}i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),mn(e)),delete $t[r],e.ng339=n}}function yn
(e,t){var r=e.ng339,i=r&&$t[r];return t&&!i&&(e.ng339=r=Gt(),i=$t[r]={events:{},data:{},handle:n}),i}function bn(e,t,n){if(ln(e)){var r=B(n),i=!r&&t&&!j(t),s=!t,o=yn(e,!i),u=o&&o.data;if(r)u[t]=n;else{if(s)return u;if(i)return u&&u[t];A(u,t)}}}function wn(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function En(e,t){t&&e.setAttribute&&x(t.split(" "),function(t){e.setAttribute("class",G((" "+(e.getAttribute("class")||"")+" ").replace
(/[\n\t]/g," ").replace(" "+G(t)+" "," ")))})}function Sn(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");x(t.split(" "),function(e){e=G(e),n.indexOf(" "+e+" ")===-1&&(n+=e+" ")}),e.setAttribute("class",G(n))}}function xn(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if(typeof n=="number"&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Tn(e,t){return Nn(e,"$"+(t||"ngController")+"Controller")}function Nn
(e,t,r){e.nodeType==qt&&(e=e.documentElement);var i=R(t)?t:[t];while(e){for(var s=0,o=i.length;s<o;s++)if((r=h.data(e,i[s]))!==n)return r;e=e.parentNode||e.nodeType===Rt&&e.host}}function Cn(e){vn(e,!0);while(e.firstChild)e.removeChild(e.firstChild)}function kn(e,t){t||vn(e);var n=e.parentNode;n&&n.removeChild(e)}function Ln(t,n){n=n||e,n.document.readyState==="complete"?n.setTimeout(t):h(n).on("load",t)}function Dn(e,t){var n=On[t.toLowerCase()];return n&&Mn[tt(e)]&&n}function Pn(e,t){var n=e.nodeName
;return(n==="INPUT"||n==="TEXTAREA")&&_n[t]}function Hn(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],s=i?i.length:0;if(!s)return;if(H(n.immediatePropagationStopped)){var o=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),o&&o.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},s>1&&(i=st(i));for(var u=0;u<s;u++
)n.isImmediatePropagationStopped()||i[u].call(e,n)};return n.elem=e,n}function Bn(){this.$get=function(){return A(pn,{hasClass:function(e,t){return e.attr&&(e=e[0]),wn(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Sn(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),En(e,t)}})}}function jn(e,t){var n=e&&e.$$hashKey;if(n)return typeof n=="function"&&(n=e.$$hashKey()),n;var r=typeof e;return r=="function"||r=="object"&&e!==null?n=e.$$hashKey=r+":"+(t||k)():n=r+":"+e,n}function Fn(e,t){
if(t){var n=0;this.nextUid=function(){return++n}}x(e,this.put,this)}function Wn(e){var t=e.toString().replace(Un,""),n=t.match(In);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Xn(e,t,n){var r,i,s,o;if(typeof e=="function"){if(!(r=e.$inject)){r=[];if(e.length){if(t){if(!F(n)||!n)n=e.name||Wn(e);throw zn("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n)}i=e.toString().replace(Un,""),s=i.match(In),x(s[1].split(qn),function(e){e.replace
(Rn,function(e,t,n){r.push(n)})})}e.$inject=r}}else R(e)?(o=e.length-1,_t(e[o],"fn"),r=e.slice(0,o)):_t(e,"fn",!0);return r}function Vn(e,t){function c(e){return function(t,n){if(!j(t))return e(t,n);x(t,C(e))}}function h(e,t){Dt(e,"service");if(U(t)||R(t))t=a.instantiate(t);if(!t.$get)throw zn("pget","Provider '{0}' must define $get factory method.",e);return u[e+i]=t}function p(e,t){return function(){var r=l.invoke(t,this);if(H(r))throw zn("undef","Provider '{0}' must return a value from $get factory method."
,e);return r}}function d(e,t,n){return h(e,{$get:n!==!1?p(e,t):t})}function v(e,t){return d(e,["$injector",function(e){return e.instantiate(t)}])}function m(e,t){return d(e,P(t),!1)}function g(e,t){Dt(e,"constant"),u[e]=t,f[e]=t}function y(e,t){var n=a.get(e+i),r=n.$get;n.$get=function(){var e=l.invoke(r,n);return l.invoke(t,null,{$delegate:e})}}function E(e){var t=[],n;return x(e,function(e){function r(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=a.get(r[0]);i[r[1]].apply(i,r[2])}}if(o.get
(e))return;o.put(e,!0);try{F(e)?(n=w(e),t=t.concat(E(n.requires)).concat(n._runBlocks),r(n._invokeQueue),r(n._configBlocks)):U(e)?t.push(a.invoke(e)):R(e)?t.push(a.invoke(e)):_t(e,"module")}catch(i){throw R(e)&&(e=e[e.length-1]),i.message&&i.stack&&i.stack.indexOf(i.message)==-1&&(i=i.message+"\n"+i.stack),zn("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}),t}function S(e,n){function o(t,i){if(e.hasOwnProperty(t)){if(e[t]===r)throw zn("cdep","Circular dependency found: {0}"
,t+" <- "+s.join(" <- "));return e[t]}try{return s.unshift(t),e[t]=r,e[t]=n(t,i)}catch(o){throw e[t]===r&&delete e[t],o}finally{s.shift()}}function a(e,n,r,i){typeof r=="string"&&(i=r,r=null);var s=[],u=Vn.$$annotate(e,t,i),a,f,l;for(f=0,a=u.length;f<a;f++){l=u[f];if(typeof l!="string")throw zn("itkn","Incorrect injection token! Expected service name as string, got {0}",l);s.push(r&&r.hasOwnProperty(l)?r[l]:o(l,i))}return R(e)&&(e=e[a]),e.apply(n,s)}function f(e,t,n){var r=Object.create((R(e)?e[e
.length-1]:e).prototype||null),i=a(e,r,t,n);return j(i)||U(i)?i:r}return{invoke:a,instantiate:f,get:o,annotate:Vn.$$annotate,has:function(t){return u.hasOwnProperty(t+i)||e.hasOwnProperty(t)}}}t=t===!0;var r={},i="Provider",s=[],o=new Fn([],!0),u={$provide:{provider:c(h),factory:c(d),service:c(v),value:c(m),constant:c(g),decorator:y}},a=u.$injector=S(u,function(e,t){throw b.isString(t)&&s.push(t),zn("unpr","Unknown provider: {0}",s.join(" <- "))}),f={},l=f.$injector=S(f,function(e,t){var r=a.get(
e+i,t);return l.invoke(r.$get,r,n,e)});return x(E(e),function(e){l.invoke(e||_)}),l}function $n(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function s(e){var t=null;return Array.prototype.some.call(e,function(e){if(tt(e)==="a")return t=e,!0}),t}function o(){var e=a.yOffset;if(U(e))e=e();else if(Z(e)){var n=e[0],r=t.getComputedStyle(n);r.position!=="fixed"?e=0:e=n.getBoundingClientRect().bottom}else I(e)||(e=0);return e}function u
(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function a(){var e=n.hash(),t;e?(t=i.getElementById(e))?u(t):(t=s(i.getElementsByName(e)))?u(t):e==="top"&&u(null):u(null)}var i=t.document;return e&&r.$watch(function(){return n.hash()},function(t,n){if(t===n&&t==="")return;Ln(function(){r.$evalAsync(a)})}),a}]}function Qn(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t
(e,0,!1)}}]}function Gn(e,t,r,i){function v(e){try{e.apply(null,ft(arguments,1))}finally{p--;if(p===0)while(d.length)try{d.pop()()}catch(t){r.error(t)}}}function m(e){var t=e.indexOf("#");return t===-1?"":e.substr(t+1)}function b(e,t){(function n(){x(g,function(e){e()}),y=t(n,e)})()}function L(){O(),M()}function O(){w=e.history.state,w=H(w)?null:w,ot(w,A)&&(w=A),A=w}function M(){if(S===s.url()&&E===w)return;S=s.url(),E=w,x(C,function(e){e(s.url(),w)})}function j(e){try{return decodeURIComponent(e
)}catch(t){return e}}var s=this,o=t[0],u=e.location,a=e.history,f=e.setTimeout,l=e.clearTimeout,c={};s.isMock=!1;var p=0,d=[];s.$$completeOutstandingRequest=v,s.$$incOutstandingRequestCount=function(){p++},s.notifyWhenNoOutstandingRequests=function(e){x(g,function(e){e()}),p===0?e():d.push(e)};var g=[],y;s.addPollFn=function(e){return H(y)&&b(100,f),g.push(e),e};var w,E,S=u.href,T=t.find("base"),N=null;O(),E=w,s.url=function(t,n,r){H(r)&&(r=null),u!==e.location&&(u=e.location),a!==e.history&&(a=e
.history);if(t){var o=E===r;if(S===t&&(!i.history||o))return s;var f=S&&Ir(S)===Ir(t);return S=t,E=r,i.history&&(!f||!o)?(a[n?"replaceState":"pushState"](r,"",t),O(),E=w):(f||(N=t),n?u.replace(t):f?u.hash=m(t):u.href=t),s}return N||u.href.replace(/%27/g,"'")},s.state=function(){return w};var C=[],k=!1,A=null;s.onUrlChange=function(t){return k||(i.history&&h(e).on("popstate",L),h(e).on("hashchange",L),k=!0),C.push(t),t},s.$$checkUrlChange=M,s.baseHref=function(){var e=T.attr("href");return e?e.replace
(/^(https?\:)?\/\/[^\/]*/,""):""};var D={},P="",B=s.baseHref();s.cookies=function(e,t){var i,s,u,a,f;if(!e){if(o.cookie!==P){P=o.cookie,s=P.split("; "),D={};for(a=0;a<s.length;a++)u=s[a],f=u.indexOf("="),f>0&&(e=j(u.substring(0,f)),D[e]===n&&(D[e]=j(u.substring(f+1))))}return D}t===n?o.cookie=encodeURIComponent(e)+"=;path="+B+";expires=Thu, 01 Jan 1970 00:00:00 GMT":F(t)&&(i=(o.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+B).length+1,i>4096&&r.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+
i+" > 4096 bytes)!"))},s.defer=function(e,t){var n;return p++,n=f(function(){delete c[n],v(e)},t||0),c[n]=!0,n},s.defer.cancel=function(e){return c[e]?(delete c[e],l(e),v(_),!0):!1}}function Yn(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new Gn(e,r,t,n)}]}function Zn(){this.$get=function(){function t(t,n){function c(e){e!=f&&(l?l==e&&(l=e.n):l=e,h(e.n,e.p),h(e,f),f=e,f.n=null)}function h(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(t in e)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!"
,t);var i=0,s=A({},n,{id:t}),o={},u=n&&n.capacity||Number.MAX_VALUE,a={},f=null,l=null;return e[t]={put:function(e,t){if(u<Number.MAX_VALUE){var n=a[e]||(a[e]={key:e});c(n)}if(H(t))return;return e in o||i++,o[e]=t,i>u&&this.remove(l.key),t},get:function(e){if(u<Number.MAX_VALUE){var t=a[e];if(!t)return;c(t)}return o[e]},remove:function(e){if(u<Number.MAX_VALUE){var t=a[e];if(!t)return;t==f&&(f=t.p),t==l&&(l=t.n),h(t.n,t.p),delete a[e]}delete o[e],i--},removeAll:function(){o={},i=0,a={},f=l=null},
destroy:function(){o=null,s=null,a=null,delete e[t]},info:function(){return A({},s,{size:i})}}}var e={};return t.info=function(){var t={};return x(e,function(e,n){t[n]=e.info()}),t},t.get=function(t){return e[t]},t}}function er(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function nr(e,r){function d(e,t){var n=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,r={};return x(e,function(e,i){var s=e.match(n);if(!s)throw tr("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}"
,t,i,e);r[i]={mode:s[1][0],collection:s[2]==="*",optional:s[3]==="?",attrName:s[4]||i}}),r}var i={},s="Directive",u=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,a=/(([\w\-]+)(?:\:([^;]+))?;?)/,f=et("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,c=/^(on[a-z]+|formaction)$/;this.directive=function m(t,n){return Dt(t,"directive"),F(t)?(Mt(n,"directiveFactory"),i.hasOwnProperty(t)||(i[t]=[],e.factory(t+s,["$injector","$exceptionHandler",function(e,n){var r=[];return x(i[t],function(i,s){try{var o=
e.invoke(i);U(o)?o={compile:P(o)}:!o.compile&&o.link&&(o.compile=P(o.link)),o.priority=o.priority||0,o.index=s,o.name=o.name||t,o.require=o.require||o.controller&&o.name,o.restrict=o.restrict||"EA",j(o.scope)&&(o.$$isolateBindings=d(o.scope,o.name)),r.push(o)}catch(u){n(u)}}),r}])),i[t].push(n)):x(t,C(m)),this},this.aHrefSanitizationWhitelist=function(e){return B(e)?(r.aHrefSanitizationWhitelist(e),this):r.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return B(e)?(r.imgSrcSanitizationWhitelist
(e),this):r.imgSrcSanitizationWhitelist()};var v=!0;this.debugInfoEnabled=function(e){return B(e)?(v=e,this):v},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,r,d,m,g,y,b,w,E,S,T){function C(e,t){try{e.addClass(t)}catch(n){}}function H(e,t,n,r,i){e instanceof h||(e=h(e)),x(e,function(t,n){t.nodeType==Ft&&t.nodeValue.match(/\S+/)&&(e[n]=h(t).wrap("<span></span>").parent()[0])}
);var s=I(e,t,e,n,r,i);H.$$addScopeClass(e);var o=null;return function(n,r,i){Mt(n,"scope"),i=i||{};var u=i.parentBoundTranscludeFn,a=i.transcludeControllers,f=i.futureParentElement;u&&u.$$boundTransclude&&(u=u.$$boundTransclude),o||(o=B(f));var l;o!=="html"?l=h(st(o,h("<div>").append(e).html())):r?l=An.clone.call(e):l=e;if(a)for(var c in a)l.data("$"+c+"Controller",a[c].instance);return H.$$addScopeInfo(l,n),r&&r(l,n),s&&s(n,l,l,u),l}}function B(e){var t=e&&e[0];return t?tt(t)!=="foreignobject"&&
t.toString().match(/SVG/)?"svg":"html":"html"}function I(e,t,r,i,s,o){function g(e,r,i,s){var o,a,f,l,c,p,d,m,g;if(v){var y=r.length;g=new Array(y);for(c=0;c<u.length;c+=3)d=u[c],g[d]=r[d]}else g=r;for(c=0,p=u.length;c<p;)f=g[u[c++]],o=u[c++],a=u[c++],o?(o.scope?(l=e.$new(),H.$$addScopeInfo(h(f),l)):l=e,o.transcludeOnThisElement?m=q(e,o.transclude,s,o.elementTranscludeOnThisElement):!o.templateOnThisElement&&s?m=s:!s&&t?m=q(e,t):m=null,o(a,l,f,i,m)):a&&a(e,f.childNodes,n,s)}var u=[],a,f,l,c,p,d,v
;for(var m=0;m<e.length;m++){a=new N,f=z(e[m],[],a,m===0?i:n,s),l=f.length?$(f,e[m],a,t,r,null,[],[],o):null,l&&l.scope&&H.$$addScopeClass(a.$$element),p=l&&l.terminal||!(c=e[m].childNodes)||!c.length?null:I(c,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:t);if(l||p)u.push(m,l,p),d=!0,v=v||l;o=null}return d?g:null}function q(e,t,n,r){var i=function(r,i,s,o,u){return r||(r=e.$new(!1,u),r.$$transcluded=!0),t(r,i,{parentBoundTranscludeFn:n,transcludeControllers:s,futureParentElement
:o})};return i}function z(e,t,n,r,i){var s=e.nodeType,o=n.$attr,f,l;switch(s){case jt:K(t,ir(tt(e)),"E",r,i);for(var c,h,p,d,v,m,g=e.attributes,y=0,b=g&&g.length;y<b;y++){var w=!1,E=!1;c=g[y],h=c.name,v=G(c.value),d=ir(h);if(m=P.test(d))h=h.replace(rr,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()});var S=d.replace(/(Start|End)$/,"");Q(S)&&d===S+"Start"&&(w=h,E=h.substr(0,h.length-5)+"end",h=h.substr(0,h.length-6)),p=ir(h.toLowerCase()),o[p]=h;if(m||!n.hasOwnProperty(p))n[p]=v
,Dn(e,p)&&(n[p]=!0);at(e,t,v,p,m),K(t,p,"A",r,i,w,E)}l=e.className,j(l)&&(l=l.animVal);if(F(l)&&l!=="")while(f=a.exec(l))p=ir(f[2]),K(t,p,"C",r,i)&&(n[p]=G(f[3])),l=l.substr(f.index+f[0].length);break;case Ft:it(t,e.nodeValue);break;case It:try{f=u.exec(e.nodeValue),f&&(p=ir(f[1]),K(t,p,"M",r,i)&&(n[p]=G(f[2])))}catch(x){}}return t.sort(et),t}function W(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw tr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found."
,t,n);e.nodeType==jt&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return h(r)}function V(e,t,n){return function(r,i,s,o,u){return i=W(i[0],t,n),e(r,i,s,o,u)}}function $(e,i,s,o,u,a,f,c,p){function at(e,t,n,r){if(e){n&&(e=V(e,n,r)),e.require=M.require,e.directiveName=_;if(E===M||M.$$isolateScope)e=ct(e,{isolateScope:!0});f.push(e)}if(t){n&&(t=V(t,n,r)),t.require=M.require,t.directiveName=_;if(E===M||M.$$isolateScope)t=ct(t,{isolateScope:!0});
c.push(t)}}function pt(e,t,n,r){var i,s="data",o=!1,u=n,a;if(F(t)){a=t.match(l),t=t.substring(a[0].length),a[3]&&(a[1]?a[3]=null:a[1]=a[3]),a[1]==="^"?s="inheritedData":a[1]==="^^"&&(s="inheritedData",u=n.parent()),a[2]==="?"&&(o=!0),i=null,r&&s==="data"&&(i=r[t])&&(i=i.instance),i=i||u[s]("$"+t+"Controller");if(!i&&!o)throw tr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return i||null}return R(t)&&(i=[],x(t,function(t){i.push(pt(e,t,n,r))})),i}function vt(e,t,o,
u,a){function D(e,t,r){var i;return X(e)||(r=t,t=e,e=n),L&&(i=T),r||(r=L?k.parent():k),a(e,t,i,r,_)}var l,p,d,v,m,T,C,k,A;i===o?(A=s,k=s.$$element):(k=h(o),A=new N(k,s)),E&&(m=t.$new(!0)),a&&(C=D,C.$$boundTransclude=a),b&&(w={},T={},x(b,function(e){var n={$scope:e===E||e.$$isolateScope?m:t,$element:k,$attrs:A,$transclude:C},r;v=e.controller,v=="@"&&(v=A[e.name]),r=y(v,n,!0,e.controllerAs),T[e.name]=r,L||k.data("$"+e.name+"Controller",r.instance),w[e.name]=r}));if(E){H.$$addScopeInfo(k,m,!0,!S||S!==
E&&S!==E.$$originalDirective),H.$$addScopeClass(k,!0);var O=w&&w[E.name],M=m;O&&O.identifier&&E.bindToController===!0&&(M=O.instance),x(m.$$isolateBindings=E.$$isolateBindings,function(e,n){var i=e.attrName,s=e.optional,o=e.mode,u,a,f,l;switch(o){case"@":A.$observe(i,function(e){M[n]=e}),A.$$observers[i].$$scope=t,A[i]&&(M[n]=r(A[i])(t));break;case"=":if(s&&!A[i])return;a=g(A[i]),a.literal?l=ot:l=function(e,t){return e===t||e!==e&&t!==t},f=a.assign||function(){throw u=M[n]=a(t),tr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!"
,A[i],E.name)},u=M[n]=a(t);var c=function(r){return l(r,M[n])||(l(r,u)?f(t,r=M[n]):M[n]=r),u=r};c.$stateful=!0;var h;e.collection?h=t.$watchCollection(A[i],c):h=t.$watch(g(A[i],c),null,a.literal),m.$on("$destroy",h);break;case"&":a=g(A[i]),M[n]=function(e){return a(t,e)}}})}w&&(x(w,function(e){e()}),w=null);for(l=0,p=f.length;l<p;l++)d=f[l],ht(d,d.isolateScope?m:t,k,A,d.require&&pt(d.directiveName,d.require,k,T),C);var _=t;E&&(E.template||E.templateUrl===null)&&(_=m),e&&e(_,o.childNodes,n,a);for(
l=c.length-1;l>=0;l--)d=c[l],ht(d,d.isolateScope?m:t,k,A,d.require&&pt(d.directiveName,d.require,k,T),C)}p=p||{};var v=-Number.MAX_VALUE,m,b=p.controllerDirectives,w,E=p.newIsolateScopeDirective,S=p.templateDirective,T=p.nonTlbTranscludeDirective,C=!1,k=!1,L=p.hasElementTranscludeDirective,A=s.$$element=h(i),M,_,D,P=a,B=o,I,q;for(var $=0,K=e.length;$<K;$++){M=e[$];var Q=M.$$start,et=M.$$end;Q&&(A=W(i,Q,et)),D=n;if(v>M.priority)break;if(q=M.scope)M.templateUrl||(j(q)?(nt("new/isolated scope",E||m,
M,A),E=M):nt("new/isolated scope",E,M,A)),m=m||M;_=M.name,!M.templateUrl&&M.controller&&(q=M.controller,b=b||{},nt("'"+_+"' controller",b[_],M,A),b[_]=M);if(q=M.transclude)C=!0,M.$$tlb||(nt("transclusion",T,M,A),T=M),q=="element"?(L=!0,v=M.priority,D=A,A=s.$$element=h(t.createComment(" "+_+": "+s[_]+" ")),i=A[0],lt(u,ft(D),i),B=H(D,o,v,P&&P.name,{nonTlbTranscludeDirective:T})):(D=h(dn(i)).contents(),A.empty(),B=H(D,o));if(M.template){k=!0,nt("template",S,M,A),S=M,q=U(M.template)?M.template(A,s):M
.template,q=O(q);if(M.replace){P=M,fn(q)?D=[]:D=ar(st(M.templateNamespace,G(q))),i=D[0];if(D.length!=1||i.nodeType!==jt)throw tr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",_,"");lt(u,A,i);var tt={$attr:{}},rt=z(i,[],tt),it=e.splice($+1,e.length-($+1));E&&J(rt),e=e.concat(rt).concat(it),Y(s,tt),K=e.length}else A.html(q)}if(M.templateUrl)k=!0,nt("template",S,M,A),S=M,M.replace&&(P=M),vt=Z(e.splice($,e.length-$),A,s,u,C&&B,f,c,{controllerDirectives:b,newIsolateScopeDirective
:E,templateDirective:S,nonTlbTranscludeDirective:T}),K=e.length;else if(M.compile)try{I=M.compile(A,s,B),U(I)?at(null,I,Q,et):I&&at(I.pre,I.post,Q,et)}catch(ut){d(ut,dt(A))}M.terminal&&(vt.terminal=!0,v=Math.max(v,M.priority))}return vt.scope=m&&m.scope===!0,vt.transcludeOnThisElement=C,vt.elementTranscludeOnThisElement=L,vt.templateOnThisElement=k,vt.transclude=B,p.hasElementTranscludeDirective=L,vt}function J(e){for(var t=0,n=e.length;t<n;t++)e[t]=M(e[t],{$$isolateScope:!0})}function K(t,r,o,u,
a,f,l){if(r===a)return null;var c=null;if(i.hasOwnProperty(r))for(var h,p=e.get(r+s),v=0,m=p.length;v<m;v++)try{h=p[v],(u===n||u>h.priority)&&h.restrict.indexOf(o)!=-1&&(f&&(h=M(h,{$$start:f,$$end:l})),t.push(h),c=h)}catch(g){d(g)}return c}function Q(t){if(i.hasOwnProperty(t))for(var n,r=e.get(t+s),o=0,u=r.length;o<u;o++){n=r[o];if(n.multiElement)return!0}return!1}function Y(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;x(e,function(r,i){i.charAt(0)!="$"&&(t[i]&&t[i]!==r&&(r+=(i==="style"?";":" ")+t
[i]),e.$set(i,r,!0,n[i]))}),x(t,function(t,s){s=="class"?(C(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):s=="style"?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):s.charAt(0)!="$"&&!e.hasOwnProperty(s)&&(e[s]=t,r[s]=n[s])})}function Z(e,t,n,r,i,s,o,u){var a=[],f,l,c=t[0],p=e.shift(),d=M(p,{templateUrl:null,transclude:null,replace:null,$$originalDirective:p}),v=U(p.templateUrl)?p.templateUrl(t,n):p.templateUrl,g=p.templateNamespace;return t.empty(),m(E.getTrustedResourceUrl
(v)).then(function(m){var y,b,w,E;m=O(m);if(p.replace){fn(m)?w=[]:w=ar(st(g,G(m))),y=w[0];if(w.length!=1||y.nodeType!==jt)throw tr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",p.name,v);b={$attr:{}},lt(r,t,y);var S=z(y,[],b);j(p.scope)&&J(S),e=S.concat(e),Y(n,b)}else y=c,t.html(m);e.unshift(d),f=$(e,y,n,i,t,p,s,o,u),x(r,function(e,n){e==y&&(r[n]=t[0])}),l=I(t[0].childNodes,i);while(a.length){var T=a.shift(),N=a.shift(),k=a.shift(),L=a.shift(),A=t[0];if(T.$$destroyed
)continue;if(N!==c){var M=N.className;if(!u.hasElementTranscludeDirective||!p.replace)A=dn(y);lt(k,h(N),A),C(h(A),M)}f.transcludeOnThisElement?E=q(T,f.transclude,L):E=L,f(l,T,A,r,E)}a=null}),function(t,n,r,i,s){var o=s;if(n.$$destroyed)return;a?a.push(n,r,i,o):(f.transcludeOnThisElement&&(o=q(n,f.transclude,s)),f(l,n,r,i,o))}}function et(e,t){var n=t.priority-e.priority;return n!==0?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function nt(e,t,n,r){if(t)throw tr("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}"
,t.name,n.name,e,dt(r))}function it(e,t){var n=r(t,!0);n&&e.push({priority:0,compile:function(t){var r=t.parent(),i=!!r.length;return i&&H.$$addBindingClass(r),function(t,r){var s=r.parent();i||H.$$addBindingClass(s),H.$$addBindingInfo(s,n.expressions),t.$watch(n,function(t){r[0].nodeValue=t})}}})}function st(e,n){e=o(e||"html");switch(e){case"svg":case"math":var r=t.createElement("div");return r.innerHTML="<"+e+">"+n+"</"+e+">",r.childNodes[0].childNodes;default:return n}}function ut(e,t){if(t=="srcdoc"
)return E.HTML;var n=tt(e);if(t=="xlinkHref"||n=="form"&&t=="action"||n!="img"&&(t=="src"||t=="ngSrc"))return E.RESOURCE_URL}function at(e,t,n,i,s){var o=ut(e,i);s=f[i]||s;var u=r(n,!0,o,s);if(!u)return;if(i==="multiple"&&tt(e)==="select")throw tr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",dt(e));t.push({priority:100,compile:function(){return{pre:function(t,a,f){var l=f.$$observers||(f.$$observers={});if(c.test(i))throw tr("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead."
);var h=f[i];h!==n&&(u=h&&r(h,!0,o,s),n=h);if(!u)return;f[i]=u(t),(l[i]||(l[i]=[])).$$inter=!0,(f.$$observers&&f.$$observers[i].$$scope||t).$watch(u,function(t,n){i==="class"&&t!=n?f.$updateClass(t,n):f.$set(i,t)})}}}})}function lt(e,n,r){var i=n[0],s=n.length,o=i.parentNode,u,a;if(e)for(u=0,a=e.length;u<a;u++)if(e[u]==i){e[u++]=r;for(var f=u,l=f+s-1,c=e.length;f<c;f++,l++)l<c?e[f]=e[l]:delete e[f];e.length-=s-1,e.context===i&&(e.context=r);break}o&&o.replaceChild(r,i);var d=t.createDocumentFragment
();d.appendChild(i),h(r).data(h(i).data()),p?(At=!0,p.cleanData([i])):delete h.cache[i[h.expando]];for(var v=1,m=n.length;v<m;v++){var g=n[v];h(g).remove(),d.appendChild(g),delete n[v]}n[0]=r,n.length=1}function ct(e,t){return A(function(){return e.apply(null,arguments)},e,t)}function ht(e,t,n,r,i,s){try{e(t,n,r,i,s)}catch(o){d(o,dt(n))}}var N=function(e,t){if(t){var n=Object.keys(t),r,i,s;for(r=0,i=n.length;r<i;r++)s=n[r],this[s]=t[s]}else this.$attr={};this.$$element=e};N.prototype={$normalize:
ir,$addClass:function(e){e&&e.length>0&&S.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&S.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=ur(e,t);n&&n.length&&S.addClass(this.$$element,n);var r=ur(t,e);r&&r.length&&S.removeClass(this.$$element,r)},$set:function(e,t,r,i){var s=this.$$element[0],o=Dn(s,e),u=Pn(s,e),a=e,f;o?(this.$$element.prop(e,t),i=o):u&&(this[u]=t,a=u),this[e]=t,i?this.$attr[e]=i:(i=this.$attr[e],i||(this.$attr[e]=i=kt(e,"-"))),f=tt(this.$$element
);if(f==="a"&&e==="href"||f==="img"&&e==="src")this[e]=t=T(t,e==="src");else if(f==="img"&&e==="srcset"){var l="",c=G(t),h=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,p=/\s/.test(c)?h:/(,)/,v=c.split(p),m=Math.floor(v.length/2);for(var g=0;g<m;g++){var y=g*2;l+=T(G(v[y]),!0),l+=" "+G(v[y+1])}var b=G(v[g*2]).split(/\s/);l+=T(G(b[0]),!0),b.length===2&&(l+=" "+G(b[1])),this[e]=t=l}r!==!1&&(t===null||t===n?this.$$element.removeAttr(i):this.$$element.attr(i,t));var w=this.$$observers;w&&x(w[a],function(e){try{
e(t)}catch(n){d(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=Bt()),i=r[e]||(r[e]=[]);return i.push(t),b.$evalAsync(function(){!i.$$inter&&n.hasOwnProperty(e)&&t(n[e])}),function(){rt(i,t)}}};var k=r.startSymbol(),L=r.endSymbol(),O=k=="{{"||L=="}}"?D:function(t){return t.replace(/\{\{/g,k).replace(/}}/g,L)},P=/^ngAttr[A-Z]/;return H.$$addBindingInfo=v?function(t,n){var r=t.data("$binding")||[];R(n)?r=r.concat(n):r.push(n),t.data("$binding",r)}:_,H.$$addBindingClass=v?function(
t){C(t,"ng-binding")}:_,H.$$addScopeInfo=v?function(t,n,r,i){var s=r?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";t.data(s,n)}:_,H.$$addScopeClass=v?function(t,n){C(t,n?"ng-isolate-scope":"ng-scope")}:_,H}]}function ir(e){return nn(e.replace(rr,""))}function sr(e,t,n,r){}function or(e,t,n,r,i){}function ur(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var s=0;s<r.length;s++){var o=r[s];for(var u=0;u<i.length;u++)if(o==i[u])continue e;n+=(n.length>0?" ":"")+o}return n}function ar(e
){e=h(e);var t=e.length;if(t<=1)return e;while(t--){var n=e[t];n.nodeType===It&&v.call(e,t,1)}return e}function lr(){var e={},t=!1,i=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){Dt(t,"controller"),j(t)?A(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(s,o){function u(e,t,n,i){if(!e||!j(e.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,t);e.$scope[t]=n}return function(r,a,
f,l){var c,h,p,d;f=f===!0,l&&F(l)&&(d=l);if(F(r)){h=r.match(i);if(!h)throw fr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=h[1],d=d||h[3],r=e.hasOwnProperty(p)?e[p]:Pt(a.$scope,p,!0)||(t?Pt(o,p,!0):n),_t(r,p,!0)}if(f){var v=(R(r)?r[r.length-1]:r).prototype;return c=Object.create(v||null),d&&u(a,d,c,p||r.name),A(function(){return s.invoke(r,c,a,p),c},{instance:c,identifier:d})}return c=s.instantiate(r,a,p),d&&u(a,d,c,p||r.name),c}}]}function cr
(){this.$get=["$window",function(e){return h(e.document)}]}function hr(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function yr(e,t){if(F(e)){var n=e.replace(gr,"").trim();if(n){var r=t("Content-Type");if(r&&r.indexOf(pr)===0||br(n))e=pt(n)}}return e}function br(e){var t=e.match(vr);return t&&mr[t[0]].test(e)}function wr(e){var t=Bt(),n,r,i;return e?(x(e.split("\n"),function(e){i=e.indexOf(":"),n=o(G(e.substr(0,i))),r=G(e.substr(i+1)),n&&(t[n]=t[n]?t[n]+", "+
r:r)}),t):t}function Er(e){var t=j(e)?e:n;return function(n){t||(t=wr(e));if(n){var r=t[o(n)];return r===void 0&&(r=null),r}return t}}function Sr(e,t,n,r){return U(r)?r(e,t,n):(x(r,function(r){e=r(e,t,n)}),e)}function xr(e){return 200<=e&&e<300}function Tr(){var e=this.defaults={transformResponse:[yr],transformRequest:[function(e){return j(e)&&!V(e)&&!J(e)&&!$(e)?ht(e):e}],headers:{common:{Accept:"application/json, text/plain, */*"},post:st(dr),put:st(dr),patch:st(dr)},xsrfCookieName:"XSRF-TOKEN"
,xsrfHeaderName:"X-XSRF-TOKEN"},t=!1;this.useApplyAsync=function(e){return B(e)?(t=!!e,this):t};var i=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(s,u,f,l,c,h){function v(t){function p(e){var t=A({},e);return e.data?t.data=Sr(e.data,e.headers,e.status,i.transformResponse):t.data=e.data,xr(e.status)?t:c.reject(t)}function v(e){var t,n={};return x(e,function(e,r){U(e)?(t=e(),t!=null&&(n[r]=t)):n[r]=e}),n}function m(t){var n=e.headers
,r=A({},t.headers),i,s,u;n=A({},n.common,n[o(t.method)]);e:for(i in n){s=o(i);for(u in r)if(o(u)===s)continue e;r[i]=n[i]}return v(r)}if(!b.isObject(t))throw r("$http")("badreq","Http request configuration must be an object.  Received: {0}",t);var i=A({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse},t);i.headers=m(t),i.method=a(i.method);var s=function(t){var r=t.headers,i=Sr(t.data,Er(r),n,t.transformRequest);return H(i)&&x(r,function(e,t){o(t)==="content-type"&&delete 
r[t]}),H(t.withCredentials)&&!H(e.withCredentials)&&(t.withCredentials=e.withCredentials),y(t,i).then(p,p)},u=[s,n],f=c.when(i);x(d,function(e){(e.request||e.requestError)&&u.unshift(e.request,e.requestError),(e.response||e.responseError)&&u.push(e.response,e.responseError)});while(u.length){var l=u.shift(),h=u.shift();f=f.then(l,h)}return f.success=function(e){return f.then(function(t){e(t.data,t.status,t.headers,i)}),f},f.error=function(e){return f.then(null,function(t){e(t.data,t.status,t.headers
,i)}),f},f}function m(e){x(arguments,function(e){v[e]=function(t,n){return v(A(n||{},{method:e,url:t}))}})}function g(e){x(arguments,function(e){v[e]=function(t,n,r){return v(A(r||{},{method:e,url:t,data:n}))}})}function y(r,i){function y(e,n,r,i){function s(){b(n,e,r,i)}f&&(xr(e)?f.put(m,[e,n,wr(r),i]):f.remove(m)),t?l.$applyAsync(s):(s(),l.$$phase||l.$apply())}function b(e,t,n,i){t=Math.max(t,0),(xr(t)?o.resolve:o.reject)({data:e,status:t,headers:Er(n),config:r,statusText:i})}function E(e){b(e.
data,e.status,st(e.headers()),e.statusText)}function S(){var e=v.pendingRequests.indexOf(r);e!==-1&&v.pendingRequests.splice(e,1)}var o=c.defer(),a=o.promise,f,h,d=r.headers,m=w(r.url,r.params);v.pendingRequests.push(r),a.then(S,S),(r.cache||e.cache)&&r.cache!==!1&&(r.method==="GET"||r.method==="JSONP")&&(f=j(r.cache)?r.cache:j(e.cache)?e.cache:p),f&&(h=f.get(m),B(h)?Q(h)?h.then(E,E):R(h)?b(h[1],h[0],st(h[2]),h[3]):b(h,200,{},"OK"):f.put(m,a));if(H(h)){var g=Ii(r.url)?u.cookies()[r.xsrfCookieName||
e.xsrfCookieName]:n;g&&(d[r.xsrfHeaderName||e.xsrfHeaderName]=g),s(r.method,m,i,y,d,r.timeout,r.withCredentials,r.responseType)}return a}function w(e,t){if(!t)return e;var n=[];return N(t,function(e,t){if(e===null||H(e))return;R(e)||(e=[e]),x(e,function(e){j(e)&&(q(e)?e=e.toISOString():e=ht(e)),n.push(bt(t)+"="+bt(e))})}),n.length>0&&(e+=(e.indexOf("?")==-1?"?":"&")+n.join("&")),e}var p=f("$http"),d=[];return x(i,function(e){d.unshift(F(e)?h.get(e):h.invoke(e))}),v.pendingRequests=[],m("get","delete"
,"head","jsonp"),g("post","put","patch"),v.defaults=e,v}]}function Nr(){return new e.XMLHttpRequest}function Cr(){this.$get=["$browser","$window","$document",function(e,t,n){return kr(e,Nr,e.defer,t.angular.callbacks,n[0])}]}function kr(e,t,r,i,s){function u(e,t,n){var r=s.createElement("script"),o=null;return r.type="text/javascript",r.src=e,r.async=!0,o=function(e){Qt(r,"load",o),Qt(r,"error",o),s.body.removeChild(r),r=null;var u=-1,a="unknown";e&&(e.type==="load"&&!i[t].called&&(e={type:"error"
}),a=e.type,u=e.type==="error"?404:200),n&&n(u,a)},Kt(r,"load",o),Kt(r,"error",o),s.body.appendChild(r),o}return function(s,a,f,l,c,h,p,d){function E(){m&&m(),g&&g.abort()}function S(t,i,s,o,u){w!==n&&r.cancel(w),m=g=null,t(i,s,o,u),e.$$completeOutstandingRequest(_)}e.$$incOutstandingRequestCount(),a=a||e.url();if(o(s)=="jsonp"){var v="_"+(i.counter++).toString(36);i[v]=function(e){i[v].data=e,i[v].called=!0};var m=u(a.replace("JSON_CALLBACK","angular.callbacks."+v),v,function(e,t){S(l,e,i[v].data
,"",t),i[v]=_})}else{var g=t();g.open(s,a,!0),x(c,function(e,t){B(e)&&g.setRequestHeader(t,e)}),g.onload=function(){var t=g.statusText||"",n="response"in g?g.response:g.responseText,r=g.status===1223?204:g.status;r===0&&(r=n?200:Fi(a).protocol=="file"?404:0),S(l,r,n,g.getAllResponseHeaders(),t)};var y=function(){S(l,-1,null,null,"")};g.onerror=y,g.onabort=y,p&&(g.withCredentials=!0);if(d)try{g.responseType=d}catch(b){if(d!=="json")throw b}g.send(f||null)}if(h>0)var w=r(E,h);else Q(h)&&h.then(E)}}
function Ar(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function f(e){return"\\\\\\"+e}function l(f,l,c,h){function N(n){return n.replace(u,e).replace(a,t)}function C(e){try{return e=x(e),h&&!B(e)?e:T(e)}catch(t){var n=Lr("interr","Can't interpolate: {0}\n{1}",f,t.toString());r(n)}}h=!!h;var p,d,v=0,m=[],g=[],y=f.length,b,w=[],E=[];while(v<y){if((p=f.indexOf
(e,v))==-1||(d=f.indexOf(t,p+s))==-1){v!==y&&w.push(N(f.substring(v)));break}v!==p&&w.push(N(f.substring(v,p))),b=f.substring(p+s,d),m.push(b),g.push(n(b,C)),v=d+o,E.push(w.length),w.push("")}if(c&&w.length>1)throw Lr("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce",f);if(!l||m.length){var S=function(e){for(var t=0,n=m.length;t<n;t++){if(
h&&H(e[t]))return;w[E[t]]=e[t]}return w.join("")},x=function(e){return c?i.getTrusted(c,e):i.valueOf(e)},T=function(e){if(e==null)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=ht(e)}return e};return A(function(t){var n=0,i=m.length,s=new Array(i);try{for(;n<i;n++)s[n]=g[n](t);return S(s)}catch(o){var u=Lr("interr","Can't interpolate: {0}\n{1}",f,o.toString());r(u)}},{exp:f,expressions:m,$$watchDelegate:function(e,t,n){var r;return e.$watchGroup(g,function(i,s){var o=
S(i);U(t)&&t.call(this,o,i!==s?r:o,e),r=o},n)}})}}var s=e.length,o=t.length,u=new RegExp(e.replace(/./g,f),"g"),a=new RegExp(t.replace(/./g,f),"g");return l.startSymbol=function(){return e},l.endSymbol=function(){return t},l}]}function Or(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,r){function s(s,o,u,a){var f=t.setInterval,l=t.clearInterval,c=0,h=B(a)&&!a,p=(h?r:n).defer(),d=p.promise;return u=B(u)?u:0,d.then(null,null,s),d.$$intervalId=f(function(){p.notify(c++),u>0&&c>=u&&(p.
resolve(c),l(d.$$intervalId),delete i[d.$$intervalId]),h||e.$apply()},o),i[d.$$intervalId]=p,d}var i={};return s.cancel=function(e){return e&&e.$$intervalId in i?(i[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete i[e.$$intervalId],!0):!1},s}]}function Mr(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre
:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y"
,mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return e===1?"one":"other"}}}}function Hr(e){var t=e.split("/"),n=t.length;while(n--)t[n]=yt(t[n]);return t.join("/")}function Br(e,t){var n=Fi(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=O(n.port)||Dr[n.protocol]||null}function jr(e,t){var n=e.charAt(0)!=="/";n&&(e="/"+e);var r=Fi(e);t.$$path=decodeURIComponent(n&&r.pathname.charAt(0)==="/"?r.pathname.substring(1):r.pathname),t.
$$search=mt(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&t.$$path.charAt(0)!="/"&&(t.$$path="/"+t.$$path)}function Fr(e,t){if(t.indexOf(e)===0)return t.substr(e.length)}function Ir(e){var t=e.indexOf("#");return t==-1?e:e.substr(0,t)}function qr(e){return e.replace(/(#.+)|#$/,"$1")}function Rr(e){return e.substr(0,Ir(e).lastIndexOf("/")+1)}function Ur(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function zr(e,t){this.$$html5=!0,t=t||"";var r=Rr(e);Br(e,this),this.$$parse=function(
e){var t=Fr(r,e);if(!F(t))throw Pr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,r);jr(t,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=gt(this.$$search),t=this.$$hash?"#"+yt(this.$$hash):"";this.$$url=Hr(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,s){if(s&&s[0]==="#")return this.hash(s.slice(1)),!0;var o,u,a;return(o=Fr(e,i))!==n?(u=o,(o=Fr(t,o))!==n?a=r+(Fr("/",o)||o):a=e+u):(o=Fr(r,i))!==
n?a=r+o:r==i+"/"&&(a=r),a&&this.$$parse(a),!!a}}function Wr(e,t){var n=Rr(e);Br(e,this),this.$$parse=function(r){function o(e,t,n){var r=/^\/[A-Z]:(\/.*)/,i;return t.indexOf(n)===0&&(t=t.replace(n,"")),r.exec(t)?e:(i=r.exec(e),i?i[1]:e)}var i=Fr(e,r)||Fr(n,r),s;i.charAt(0)==="#"?(s=Fr(t,i),H(s)&&(s=i)):s=this.$$html5?i:"",jr(s,this),this.$$path=o(this.$$path,s,e),this.$$compose()},this.$$compose=function(){var n=gt(this.$$search),r=this.$$hash?"#"+yt(this.$$hash):"";this.$$url=Hr(this.$$path)+(n?"?"+
n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return Ir(e)==Ir(t)?(this.$$parse(t),!0):!1}}function Xr(e,t){this.$$html5=!0,Wr.apply(this,arguments);var n=Rr(e);this.$$parseLinkUrl=function(r,i){if(i&&i[0]==="#")return this.hash(i.slice(1)),!0;var s,o;return e==Ir(r)?s=r:(o=Fr(n,r))?s=e+t+o:n===r+"/"&&(s=n),s&&this.$$parse(s),!!s},this.$$compose=function(){var n=gt(this.$$search),r=this.$$hash?"#"+yt(this.$$hash):"";this.$$url=Hr(this.$$path)+(n?"?"+n:"")+
r,this.$$absUrl=e+t+this.$$url}}function $r(e){return function(){return this[e]}}function Jr(e,t){return function(n){return H(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Kr(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return B(t)?(e=t,this):e},this.html5Mode=function(e){return K(e)?(t.enabled=e,this):j(e)?(K(e.enabled)&&(t.enabled=e.enabled),K(e.requireBase)&&(t.requireBase=e.requireBase),K(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this
):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,s,o){function d(e,t,n){var i=u.url(),s=u.$$state;try{r.url(e,t,n),u.$$state=r.state()}catch(o){throw u.url(i),u.$$state=s,o}}function m(e,t){n.$broadcast("$locationChangeSuccess",u.absUrl(),e,u.$$state,t)}var u,a,f=r.baseHref(),l=r.url(),c;if(t.enabled){if(!f&&t.requireBase)throw Pr("nobase","$location in HTML5 mode requires a <base> tag to be present!");c=Ur(l)+(f||"/"),a=i.history?zr:Xr}else c=Ir(l),a=Wr;
u=new a(c,"#"+e),u.$$parseLinkUrl(l,l),u.$$state=r.state();var p=/^\s*(javascript|mailto):/i;s.on("click",function(e){if(!t.rewriteLinks||e.ctrlKey||e.metaKey||e.shiftKey||e.which==2||e.button==2)return;var i=h(e.target);while(tt(i[0])!=="a")if(i[0]===s[0]||!(i=i.parent())[0])return;var a=i.prop("href"),f=i.attr("href")||i.attr("xlink:href");j(a)&&a.toString()==="[object SVGAnimatedString]"&&(a=Fi(a.animVal).href);if(p.test(a))return;a&&!i.attr("target")&&!e.isDefaultPrevented()&&u.$$parseLinkUrl
(a,f)&&(e.preventDefault(),u.absUrl()!=r.url()&&(n.$apply(),o.angular["ff-684208-preventDefault"]=!0))}),qr(u.absUrl())!=qr(l)&&r.url(u.absUrl(),!0);var v=!0;return r.onUrlChange(function(e,t){n.$evalAsync(function(){var r=u.absUrl(),i=u.$$state,s;u.$$parse(e),u.$$state=t,s=n.$broadcast("$locationChangeStart",e,r,t,i).defaultPrevented;if(u.absUrl()!==e)return;s?(u.$$parse(r),u.$$state=i,d(r,!1,i)):(v=!1,m(r,i))}),n.$$phase||n.$digest()}),n.$watch(function(){var t=qr(r.url()),s=qr(u.absUrl()),o=r.
state(),a=u.$$replace,f=t!==s||u.$$html5&&i.history&&o!==u.$$state;if(v||f)v=!1,n.$evalAsync(function(){var e=u.absUrl(),r=n.$broadcast("$locationChangeStart",e,t,u.$$state,o).defaultPrevented;if(u.absUrl()!==e)return;r?(u.$$parse(t),u.$$state=o):(f&&d(e,a,o===u.$$state?null:u.$$state),m(t,o))});u.$$replace=!1}),u}]}function Qr(){var e=!0,t=this;this.debugEnabled=function(t){return B(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&e
.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||_,s=!1;try{s=!!i.apply}catch(o){}return s?function(){var e=[];return x(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,t==null?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function Yr(e,t){
if(e==="__defineGetter__"||e==="__defineSetter__"||e==="__lookupGetter__"||e==="__lookupSetter__"||e==="__proto__")throw Gr("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Zr(e,t){if(e){if(e.constructor===e)throw Gr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Gr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&
(e.nodeName||e.prop&&e.attr&&e.find))throw Gr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Gr("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function ri(e,t){if(e){if(e.constructor===e)throw Gr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===ei||e===ti||e===ni)throw Gr("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}"
,t)}}function ai(e){return e.constant}function li(e,t,n,r,i){Zr(e,i),Zr(t,i);var s=n.split("."),o;for(var u=0;s.length>1;u++){o=Yr(s.shift(),i);var a=u===0&&t&&t[o]||e[o];a||(a={},e[o]=a),e=Zr(a,i)}return o=Yr(s.shift(),i),Zr(e[o],i),e[o]=r,r}function pi(e){return e=="constructor"}function di(e,t,r,i,s,o,u){Yr(e,o),Yr(t,o),Yr(r,o),Yr(i,o),Yr(s,o);var a=function(e){return Zr(e,o)},f=u||pi(e)?a:D,l=u||pi(t)?a:D,c=u||pi(r)?a:D,h=u||pi(i)?a:D,p=u||pi(s)?a:D;return function(u,a){var d=a&&a.hasOwnProperty
(e)?a:u;return d==null?d:(d=f(d[e]),t?d==null?n:(d=l(d[t]),r?d==null?n:(d=c(d[r]),i?d==null?n:(d=h(d[i]),s?d==null?n:(d=p(d[s]),d):d):d):d):d)}}function vi(e,t){return function(n,r){return e(n,r,Zr,t)}}function mi(e,t,r){var i=t.expensiveChecks,s=i?hi:ci,o=s[e];if(o)return o;var u=e.split("."),a=u.length;if(t.csp)a<6?o=di(u[0],u[1],u[2],u[3],u[4],r,i):o=function(t,s){var o=0,f;do f=di(u[o++],u[o++],u[o++],u[o++],u[o++],r,i)(t,s),s=n,t=f;while(o<a);return f};else{var f="";i&&(f+="s = eso(s, fe);\nl = eso(l, fe);\n"
);var l=i;x(u,function(e,t){Yr(e,r);var n=(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e;if(i||pi(e))n="eso("+n+", fe)",l=!0;f+="if(s == null) return undefined;\ns="+n+";\n"}),f+="return s;";var c=new Function("s","l","eso","fe",f);c.toString=P(f),l&&(c=vi(c,r)),o=c}return o.sharedGetter=!0,o.assign=function(t,n,r){return li(t,r,e,n,e)},s[e]=o,o}function yi(e){return U(e.valueOf)?e.valueOf():gi.call(e)}function bi(){var e=Bt(),t=Bt();this.$get=["$filter","$sniffer",function(n,r){function o(
e){var t=e;return e.sharedGetter&&(t=function(n,r){return e(n,r)},t.literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}function u(e,t){for(var n=0,r=e.length;n<r;n++){var i=e[n];i.constant||(i.inputs?u(i.inputs,t):t.indexOf(i)===-1&&t.push(i))}return t}function a(e,t){if(e==null||t==null)return e===t;if(typeof e=="object"){e=yi(e);if(typeof e=="object")return!1}return e===t||e!==e&&t!==t}function f(e,t,n,r){var i=r.$$inputs||(r.$$inputs=u(r.inputs,[])),s;if(i.length===1){var o=a;return i=
i[0],e.$watch(function(t){var n=i(t);return a(n,o)||(s=r(t),o=n&&yi(n)),s},t,n)}var f=[];for(var l=0,c=i.length;l<c;l++)f[l]=a;return e.$watch(function(t){var n=!1;for(var o=0,u=i.length;o<u;o++){var l=i[o](t);if(n||(n=!a(l,f[o])))f[o]=l&&yi(l)}return n&&(s=r(t)),s},t,n)}function l(e,t,n,r){var i,s;return i=e.$watch(function(t){return r(t)},function(n,r,o){s=n,U(t)&&t.apply(this,arguments),B(n)&&o.$$postDigest(function(){B(s)&&i()})},n)}function c(e,t,n,r){function o(e){var t=!0;return x(e,function(
e){B(e)||(t=!1)}),t}var i,s;return i=e.$watch(function(t){return r(t)},function(n,r,u){s=n,U(t)&&t.call(this,n,r,u),o(n)&&u.$$postDigest(function(){o(s)&&i()})},n)}function h(e,t,n,r){var i;return i=e.$watch(function(t){return r(t)},function(n,r,s){U(t)&&t.apply(this,arguments),i()},n)}function p(e,t){if(!t)return e;var n=e.$$watchDelegate,r=n!==c&&n!==l,i=r?function(r,i){var s=e(r,i);return t(s,r,i)}:function(r,i){var s=e(r,i),o=t(s,r,i);return B(s)?o:s};return e.$$watchDelegate&&e.$$watchDelegate!==
f?i.$$watchDelegate=e.$$watchDelegate:t.$stateful||(i.$$watchDelegate=f,i.inputs=[e]),i}var i={csp:r.csp,expensiveChecks:!1},s={csp:r.csp,expensiveChecks:!0};return function(u,a,d){var v,m,g;switch(typeof u){case"string":g=u=u.trim();var y=d?t:e;v=y[g];if(!v){u.charAt(0)===":"&&u.charAt(1)===":"&&(m=!0,u=u.substring(2));var b=d?s:i,w=new ui(b),E=new fi(w,n,b);v=E.parse(u),v.constant?v.$$watchDelegate=h:m?(v=o(v),v.$$watchDelegate=v.literal?c:l):v.inputs&&(v.$$watchDelegate=f),y[g]=v}return p(v,a)
;case"function":return p(u,a);default:return p(_,a)}}}]}function wi(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Si(function(t){e.$evalAsync(t)},t)}]}function Ei(){this.$get=["$browser","$exceptionHandler",function(e,t){return Si(function(t){e.defer(t)},t)}]}function Si(e,t){function s(e,t,n){function i(t){return function(n){if(r)return;r=!0,t.call(e,n)}}var r=!1;return[i(t),i(n)]}function u(){this.$$state={status:0}}function a(e,t){return function(n){t.call(e,n)}}function f
(e){var r,i,s;s=e.pending,e.processScheduled=!1,e.pending=n;for(var o=0,u=s.length;o<u;++o){i=s[o][0],r=s[o][e.status];try{U(r)?i.resolve(r(e.value)):e.status===1?i.resolve(e.value):i.reject(e.value)}catch(a){i.reject(a),t(a)}}}function l(t){if(t.processScheduled||!t.pending)return;t.processScheduled=!0,e(function(){f(t)})}function c(){this.promise=new u,this.resolve=a(this,this.resolve),this.reject=a(this,this.reject),this.notify=a(this,this.notify)}function m(e){var t=new c,n=0,r=R(e)?[]:{};return x
(e,function(e,i){n++,v(e).then(function(e){if(r.hasOwnProperty(i))return;r[i]=e,--n||t.resolve(r)},function(e){if(r.hasOwnProperty(i))return;t.reject(e)})}),n===0&&t.resolve(r),t.promise}var i=r("$q",TypeError),o=function(){return new c};u.prototype={then:function(e,t,n){var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&l(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this
.then(function(t){return d(t,!0,e)},function(t){return d(t,!1,e)},t)}},c.prototype={resolve:function(e){if(this.promise.$$state.status)return;e===this.promise?this.$$reject(i("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e)},$$resolve:function(e){var n,r;r=s(this,this.$$resolve,this.$$reject);try{if(j(e)||U(e))n=e&&e.then;U(n)?(this.promise.$$state.status=-1,n.call(e,r[0],r[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1
,l(this.promise.$$state))}catch(i){r[1](i),t(i)}},reject:function(e){if(this.promise.$$state.status)return;this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,l(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){var e,i;for(var s=0,o=r.length;s<o;s++){i=r[s][0],e=r[s][3];try{i.notify(U(e)?e(n):n)}catch(u){t(u)}}})}};var h=function(e){var t=new c;return t.reject(e),t.promise
},p=function(t,n){var r=new c;return n?r.resolve(t):r.reject(t),r.promise},d=function(t,n,r){var i=null;try{U(r)&&(i=r())}catch(s){return p(s,!1)}return Q(i)?i.then(function(){return p(t,n)},function(e){return p(e,!1)}):p(t,n)},v=function(e,t,n,r){var i=new c;return i.resolve(e),i.promise.then(t,n,r)},g=function y(e){function n(e){t.resolve(e)}function r(e){t.reject(e)}if(!U(e))throw i("norslvr","Expected resolverFn, got '{0}'",e);if(this instanceof y){var t=new c;return e(n,r),t.promise}return new 
y(e)};return g.defer=o,g.reject=h,g.when=v,g.all=m,g}function xi(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,s=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return s.supported=i,s}]}function Ti(){var e=10,t=r("$rootScope"),n=null,i=null;this.digestTtl=function(t){return arguments
.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,s,o,a){function f(){this.$id=k(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function d(e){if(l.$$phase)throw t("inprog","{0} already in progress",l.$$phase);l.$$phase=e}function v(){l.$$phase=null}function m(e,t,n){do e.$$listenerCount
[n]-=t,e.$$listenerCount[n]===0&&delete e.$$listenerCount[n];while(e=e.$parent)}function g(){}function y(){while(p.length)try{p.shift()()}catch(e){s(e)}i=null}function b(){i===null&&(i=a.defer(function(){l.$apply(y)}))}f.prototype={constructor:f,$new:function(e,t){function r(){n.$$destroyed=!0}var n;return t=t||this,e?(n=new f,n.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount=
{},this.$id=k(),this.$$ChildScope=null},this.$$ChildScope.prototype=this),n=new this.$$ChildScope),n.$parent=t,n.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=n,t.$$childTail=n):t.$$childHead=t.$$childTail=n,(e||t!=this)&&n.$on("$destroy",r),n},$watch:function(e,t,r){var i=o(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,r,i);var s=this,u=s.$$watchers,a={fn:t,last:g,get:i,exp:e,eq:!!r};return n=null,U(t)||(a.fn=_),u||(u=s.$$watchers=[]),u.unshift(a),function(){rt
(u,a),n=null}},$watchGroup:function(e,t){function f(){o=!1,u?(u=!1,t(r,r,s)):t(r,n,s)}var n=new Array(e.length),r=new Array(e.length),i=[],s=this,o=!1,u=!0;if(!e.length){var a=!0;return s.$evalAsync(function(){a&&t(r,r,s)}),function(){a=!1}}return e.length===1?this.$watch(e[0],function(i,s,o){r[0]=i,n[0]=s,t(r,i===s?r:n,o)}):(x(e,function(e,t){var u=s.$watch(e,function(i,u){r[t]=i,n[t]=u,o||(o=!0,s.$evalAsync(f))});i.push(u)}),function(){while(i.length)i.shift()()})},$watchCollection:function(e,t
){function v(e){r=e;var t,n,s,o,u;if(H(r))return;if(!j(r))i!==r&&(i=r,f++);else if(S(r)){i!==c&&(i=c,d=i.length=0,f++),t=r.length,d!==t&&(f++,i.length=d=t);for(var a=0;a<t;a++)u=i[a],o=r[a],s=u!==u&&o!==o,!s&&u!==o&&(f++,i[a]=o)}else{i!==h&&(i=h={},d=0,f++),t=0;for(n in r)r.hasOwnProperty(n)&&(t++,o=r[n],u=i[n],n in i?(s=u!==u&&o!==o,!s&&u!==o&&(f++,i[n]=o)):(d++,i[n]=o,f++));if(d>t){f++;for(n in i)r.hasOwnProperty(n)||(d--,delete i[n])}}return f}function m(){p?(p=!1,t(r,r,n)):t(r,s,n);if(a)if(!j
(r))s=r;else if(S(r)){s=new Array(r.length);for(var e=0;e<r.length;e++)s[e]=r[e]}else{s={};for(var i in r)u.call(r,i)&&(s[i]=r[i])}}v.$stateful=!0;var n=this,r,i,s,a=t.length>1,f=0,l=o(e,v),c=[],h={},p=!0,d=0;return this.$watch(l,m)},$digest:function(){var r,o,u,f,p,m,b=e,w,E,S=this,x=[],T,N,C;d("$digest"),a.$$checkUrlChange(),this===l&&i!==null&&(a.defer.cancel(i),y()),n=null;do{m=!1,E=S;while(c.length){try{C=c.shift(),C.scope.$eval(C.expression,C.locals)}catch(k){s(k)}n=null}e:do{if(f=E.$$watchers
){p=f.length;while(p--)try{r=f[p];if(r)if((o=r.get(E))!==(u=r.last)&&!(r.eq?ot(o,u):typeof o=="number"&&typeof u=="number"&&isNaN(o)&&isNaN(u)))m=!0,n=r,r.last=r.eq?it(o,null):o,r.fn(o,u===g?o:u,E),b<5&&(T=4-b,x[T]||(x[T]=[]),x[T].push({msg:U(r.exp)?"fn: "+(r.exp.name||r.exp.toString()):r.exp,newVal:o,oldVal:u}));else if(r===n){m=!1;break e}}catch(k){s(k)}}if(!(w=E.$$childHead||E!==S&&E.$$nextSibling))while(E!==S&&!(w=E.$$nextSibling))E=E.$parent}while(E=w);if((m||c.length)&&!(b--))throw v(),t("infdig"
,"{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,x)}while(m||c.length);v();while(h.length)try{h.shift()()}catch(k){s(k)}},$destroy:function(){if(this.$$destroyed)return;var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0;if(this===l)return;for(var t in this.$$listenerCount)m(this,this.$$listenerCount[t],t);e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&
(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=_,this.$on=this.$watch=this.$watchGroup=function(){return _},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null},$eval:function(e,t){return o(e)(this,t)},$evalAsync:function(e,t){!l.$$phase&&!c.length&&a.defer(function(
){c.length&&l.$digest()}),c.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){h.push(e)},$apply:function(e){try{return d("$apply"),this.$eval(e)}catch(t){s(t)}finally{v();try{l.$digest()}catch(t){throw s(t),t}}},$applyAsync:function(e){function n(){t.$eval(e)}var t=this;e&&p.push(n),b()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this
;return function(){var r=n.indexOf(t);r!==-1&&(n[r]=null,m(i,1,e))}},$emit:function(e,t){var n=[],r,i=this,o=!1,u={name:e,targetScope:i,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},a=at([u],arguments,1),f,l;do{r=i.$$listeners[e]||n,u.currentScope=i;for(f=0,l=r.length;f<l;f++){if(!r[f]){r.splice(f,1),f--,l--;continue}try{r[f].apply(null,a)}catch(c){s(c)}}if(o)return u.currentScope=null,u;i=i.$parent}while(i);return u.currentScope=null,u},$broadcast
:function(e,t){var n=this,r=n,i=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;var u=at([o],arguments,1),a,f,l;while(r=i){o.currentScope=r,a=r.$$listeners[e]||[];for(f=0,l=a.length;f<l;f++){if(!a[f]){a.splice(f,1),f--,l--;continue}try{a[f].apply(null,u)}catch(c){s(c)}}if(!(i=r.$$listenerCount[e]&&r.$$childHead||r!==n&&r.$$nextSibling))while(r!==n&&!(i=r.$$nextSibling))r=r.$parent}return o.currentScope=null,o}};var l=new 
f,c=l.$$asyncQueue=[],h=l.$$postDigestQueue=[],p=l.$$applyAsyncQueue=[];return l}]}function Ni(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return B(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return B(e)?(t=e,this):t},this.$get=function(){return function(r,i){var s=i?t:e,o;return o=Fi(r).href,o!==""&&!o.match(s)?"unsafe:"+o:r}}}function Li(e){if(e==="self")return e;if(F(e)){if(e.indexOf("***"
)>-1)throw Ci("iwcard","Illegal sequence *** in string matcher.  String: {0}",e);return e=Y(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(z(e))return new RegExp("^"+e.source+"$");throw Ci("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Ai(e){var t=[];return B(e)&&x(e,function(e){t.push(Li(e))}),t}function Oi(){this.SCE_CONTEXTS=ki;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Ai(t)),e},this
.resourceUrlBlacklist=function(e){return arguments.length&&(t=Ai(e)),t},this.$get=["$injector",function(r){function s(e,t){return e==="self"?Ii(t):!!e.exec(t.href)}function o(n){var r=Fi(n.toString()),i,o,u=!1;for(i=0,o=e.length;i<o;i++)if(s(e[i],r)){u=!0;break}if(u)for(i=0,o=t.length;i<o;i++)if(s(t[i],r)){u=!1;break}return u}function u(e){var t=function(t){this.$$unwrapTrustedValue=function(){return t}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue
()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function l(e,t){var r=f.hasOwnProperty(e)?f[e]:null;if(!r)throw Ci("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(t===null||t===n||t==="")return t;if(typeof t!="string")throw Ci("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new r(t)}function c(e){return e instanceof a?e.$$unwrapTrustedValue():e}function h(e,t){
if(t===null||t===n||t==="")return t;var r=f.hasOwnProperty(e)?f[e]:null;if(r&&t instanceof r)return t.$$unwrapTrustedValue();if(e===ki.RESOURCE_URL){if(o(t))return t;throw Ci("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",t.toString())}if(e===ki.HTML)return i(t);throw Ci("unsafe","Attempting to use an unsafe value in a safe context.")}var i=function(t){throw Ci("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(i=r.
get("$sanitize"));var a=u(),f={};return f[ki.HTML]=u(a),f[ki.CSS]=u(a),f[ki.URL]=u(a),f[ki.JS]=u(a),f[ki.RESOURCE_URL]=u(f[ki.URL]),{trustAs:l,getTrusted:h,valueOf:c}}]}function Mi(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&c<8)throw Ci("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information."
);var r=st(ki);r.isEnabled=function(){return e},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=D),r.parseAs=function(n,i){var s=t(i);return s.literal&&s.constant?s:t(i,function(e){return r.getTrusted(n,e)})};var i=r.parseAs,s=r.getTrusted,u=r.trustAs;return x(ki,function(e,t){var n=o(t);r[nn("parse_as_"+n)]=function(t){return i(e,t)},r[nn("get_trusted_"+n)]=function(t){return s(e,t)},r[nn("trust_as_"+n)]=function(t){return u
(e,t)}}),r}]}function _i(){this.$get=["$window","$document",function(e,t){var n={},r=O((/android (\d+)/.exec(o((e.navigator||{}).userAgent))||[])[1]),i=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},u,a=/^(Moz|webkit|ms)(?=[A-Z])/,f=s.body&&s.body.style,l=!1,h=!1,p;if(f){for(var d in f)if(p=a.exec(d)){u=p[0],u=u.substr(0,1).toUpperCase()+u.substr(1);break}u||(u="WebkitOpacity"in f&&"webkit"),l="transition"in f||u+"Transition"in f,h="animation"in f||u+"Animation"in f,r&&(!l||!h)&&(l=F(s.body
.style.webkitTransition),h=F(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||r<4)&&!i,hasEvent:function(e){if(e==="input"&&c<=11)return!1;if(H(n[e])){var t=s.createElement("div");n[e]="on"+e in t}return n[e]},csp:ut(),vendorPrefix:u,transitions:l,animations:h,android:r}}]}function Di(){this.$get=["$templateCache","$http","$q",function(e,t,n){function r(i,s){function a(e){if(!s)throw tr("tpload","Failed to load template: {0}",i);return n.reject(e)}r.totalPendingRequests++
;var o=t.defaults&&t.defaults.transformResponse;R(o)?o=o.filter(function(e){return e!==yr}):o===yr&&(o=null);var u={cache:e,transformResponse:o};return t.get(i,u).finally(function(){r.totalPendingRequests--}).then(function(e){return e.data},a)}return r.totalPendingRequests=0,r}]}function Pi(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var r={};return r.findBindings=function(e,t,n){var r=e.getElementsByClassName("ng-binding"),i=[];return x(r,function(e){var r=b.element(e).data("$binding"
);r&&x(r,function(r){if(n){var s=new RegExp("(^|\\s)"+Y(t)+"(\\s|\\||$)");s.test(r)&&i.push(e)}else r.indexOf(t)!=-1&&i.push(e)})}),i},r.findModels=function(e,t,n){var r=["ng-","data-ng-","ng\\:"];for(var i=0;i<r.length;++i){var s=n?"=":"*=",o="["+r[i]+"model"+s+'"'+t+'"]',u=e.querySelectorAll(o);if(u.length)return u}},r.getLocation=function(){return n.url()},r.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},r.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},r}]}function Hi
(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,r,i){function o(o,u,a){var f=B(a)&&!a,l=(f?r:n).defer(),c=l.promise,h;return h=t.defer(function(){try{l.resolve(o())}catch(t){l.reject(t),i(t)}finally{delete s[c.$$timeoutId]}f||e.$apply()},u),c.$$timeoutId=h,s[h]=l,c}var s={};return o.cancel=function(e){return e&&e.$$timeoutId in s?(s[e.$$timeoutId].reject("canceled"),delete s[e.$$timeoutId],t.defer.cancel(e.$$timeoutId)):!1},o}]}function Fi(e){var t=e;return c&&
(Bi.setAttribute("href",t),t=Bi.href),Bi.setAttribute("href",t),{href:Bi.href,protocol:Bi.protocol?Bi.protocol.replace(/:$/,""):"",host:Bi.host,search:Bi.search?Bi.search.replace(/^\?/,""):"",hash:Bi.hash?Bi.hash.replace(/^#/,""):"",hostname:Bi.hostname,port:Bi.port,pathname:Bi.pathname.charAt(0)==="/"?Bi.pathname:"/"+Bi.pathname}}function Ii(e){var t=F(e)?Fi(e):e;return t.protocol===ji.protocol&&t.host===ji.host}function qi(){this.$get=P(e)}function Ri(e){function n(r,i){if(j(r)){var s={};return x
(r,function(e,t){s[t]=n(t,e)}),s}return e.factory(r+t,i)}var t="Filter";this.register=n,this.$get=["$injector",function(e){return function(n){return e.get(n+t)}}],n("currency",Xi),n("date",os),n("filter",Ui),n("json",us),n("limitTo",ls),n("lowercase",as),n("number",Vi),n("orderBy",cs),n("uppercase",fs)}function Ui(){return function(e,t,n){if(!R(e))return e;var r,i;switch(typeof t){case"function":r=t;break;case"boolean":case"number":case"string":i=!0;case"object":r=zi(t,n,i);break;default:return e
}return e.filter(r)}}function zi(e,t,n){var r=j(e)&&"$"in e,i;return t===!0?t=ot:U(t)||(t=function(e,t){return j(e)||j(t)?!1:(e=o(""+e),t=o(""+t),e.indexOf(t)!==-1)}),i=function(i){return r&&!j(i)?Wi(i,e.$,t,!1):Wi(i,e,t,n)},i}function Wi(e,t,n,r,i){var s=typeof e,o=typeof t;if(o==="string"&&t.charAt(0)==="!")return!Wi(e,t.substring(1),n,r);if(R(e))return e.some(function(e){return Wi(e,t,n,r)});switch(s){case"object":var u;if(r){for(u in e)if(u.charAt(0)!=="$"&&Wi(e[u],t,n,!0))return!0;return i?!1
:Wi(e,t,n,!1)}if(o==="object"){for(u in t){var a=t[u];if(U(a))continue;var f=u==="$",l=f?e:e[u];if(!Wi(l,a,n,f,f))return!1}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Xi(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return H(n)&&(n=t.CURRENCY_SYM),H(r)&&(r=t.PATTERNS[1].maxFrac),e==null?e:Ji(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Vi(e){var t=e.NUMBER_FORMATS;return function(e,n){return e==null?e:Ji(e,t.PATTERNS[0],t.GROUP_SEP
,t.DECIMAL_SEP,n)}}function Ji(e,t,n,r,i){if(!isFinite(e)||j(e))return"";var s=e<0;e=Math.abs(e);var o=e+"",u="",a=[],f=!1;if(o.indexOf("e")!==-1){var l=o.match(/([\d\.]+)e(-?)(\d+)/);l&&l[2]=="-"&&l[3]>i+1?e=0:(u=o,f=!0)}if(!f){var c=(o.split($i)[1]||"").length;H(i)&&(i=Math.min(Math.max(t.minFrac,c),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+i)).toString()+"e"+ -i);var h=(""+e).split($i),p=h[0];h=h[1]||"";var d,v=0,m=t.lgSize,g=t.gSize;if(p.length>=m+g){v=p.length-m;for(d=0;d<v;d++)(v-d)%g===0&&
d!==0&&(u+=n),u+=p.charAt(d)}for(d=v;d<p.length;d++)(p.length-d)%m===0&&d!==0&&(u+=n),u+=p.charAt(d);while(h.length<i)h+="0";i&&i!=="0"&&(u+=r+h.substr(0,i))}else i>0&&e<1&&(u=e.toFixed(i),e=parseFloat(u));return e===0&&(s=!1),a.push(s?t.negPre:t.posPre,u,s?t.negSuf:t.posSuf),a.join("")}function Ki(e,t,n){var r="";e<0&&(r="-",e=-e),e=""+e;while(e.length<t)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function Qi(e,t,n,r){return n=n||0,function(i){var s=i["get"+e]();if(n>0||s>-n)s+=n;return s===0&&
n==-12&&(s=12),Ki(s,t,r)}}function Gi(e,t){return function(n,r){var i=n["get"+e](),s=a(t?"SHORT"+e:e);return r[s][i]}}function Yi(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=Ki(Math[t>0?"floor":"ceil"](t/60),2)+Ki(Math.abs(t%60),2),n}function Zi(e){var t=(new Date(e,0,1)).getDay();return new Date(e,0,(t<=4?5:12)-t)}function es(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function ts(e){return function(t){var n=Zi(t.getFullYear()),r=es(t),i=+r- +n,s=1+Math
.round(i/6048e5);return Ki(s,e)}}function ns(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function os(e){function n(e){var n;if(n=e.match(t)){var r=new Date(0),i=0,s=0,o=n[8]?r.setUTCFullYear:r.setFullYear,u=n[8]?r.setUTCHours:r.setHours;n[9]&&(i=O(n[9]+n[10]),s=O(n[9]+n[11])),o.call(r,O(n[1]),O(n[2])-1,O(n[3]));var a=O(n[4]||0)-i,f=O(n[5]||0)-s,l=O(n[6]||0),c=Math.round(parseFloat("0."+(n[7]||0))*1e3);return u.call(r,a,f,l,c),r}return e}var t=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/
;return function(t,r,i){var s="",o=[],u,a;r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,F(t)&&(t=ss.test(t)?O(t):n(t)),I(t)&&(t=new Date(t));if(!q(t))return t;while(r)a=is.exec(r),a?(o=at(o,a,1),r=o.pop()):(o.push(r),r=null);return i&&i==="UTC"&&(t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+t.getTimezoneOffset())),x(o,function(n){u=rs[n],s+=u?u(t,e.DATETIME_FORMATS):n.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function us(){return function(e,t){return H(t)&&(t=2),ht(e,t)}}function ls(){
return function(e,t){return I(e)&&(e=e.toString()),!R(e)&&!F(e)?e:(Math.abs(Number(t))===Infinity?t=Number(t):t=O(t),t?t>0?e.slice(0,t):e.slice(t):F(e)?"":[])}}function cs(e){return function(t,n,r){function i(e,t){for(var r=0;r<n.length;r++){var i=n[r](e,t);if(i!==0)return i}return 0}function s(e,t){return t?function(t,n){return e(n,t)}:e}function o(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function u(e){if(e===null)return"null";if(typeof e.valueOf=="function"
){e=e.valueOf();if(o(e))return e}if(typeof e.toString=="function"){e=e.toString();if(o(e))return e}return""}function a(e,t){var n=typeof e,r=typeof t;return n===r&&n==="object"&&(e=u(e),t=u(t)),n===r?(n==="string"&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t?0:e<t?-1:1):n<r?-1:1}return S(t)?(n=R(n)?n:[n],n.length===0&&(n=["+"]),n=n.map(function(t){var n=!1,r=t||D;if(F(t)){if(t.charAt(0)=="+"||t.charAt(0)=="-")n=t.charAt(0)=="-",t=t.substring(1);if(t==="")return s(a,n);r=e(t);if(r.constant){var i=
r();return s(function(e,t){return a(e[i],t[i])},n)}}return s(function(e,t){return a(r(e),r(t))},n)}),d.call(t).sort(s(i,r))):t}}function hs(e){return U(e)&&(e={link:e}),e.restrict=e.restrict||"AC",P(e)}function gs(e,t){e.$name=t}function ys(e,t,r,i,s){var o=this,u=[],a=o.$$parentForm=e.parent().controller("form")||vs;o.$error={},o.$$success={},o.$pending=n,o.$name=s(t.name||t.ngForm||"")(r),o.$dirty=!1,o.$pristine=!0,o.$valid=!0,o.$invalid=!1,o.$submitted=!1,a.$addControl(o),o.$rollbackViewValue=
function(){x(u,function(e){e.$rollbackViewValue()})},o.$commitViewValue=function(){x(u,function(e){e.$commitViewValue()})},o.$addControl=function(e){Dt(e.$name,"input"),u.push(e),e.$name&&(o[e.$name]=e)},o.$$renameControl=function(e,t){var n=e.$name;o[n]===e&&delete o[n],o[t]=e,e.$name=t},o.$removeControl=function(e){e.$name&&o[e.$name]===e&&delete o[e.$name],x(o.$pending,function(t,n){o.$setValidity(n,null,e)}),x(o.$error,function(t,n){o.$setValidity(n,null,e)}),x(o.$$success,function(t,n){o.$setValidity
(n,null,e)}),rt(u,e)},To({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(!r)e[t]=[n];else{var i=r.indexOf(n);i===-1&&r.push(n)}},unset:function(e,t,n){var r=e[t];if(!r)return;rt(r,n),r.length===0&&delete e[t]},parentForm:a,$animate:i}),o.$setDirty=function(){i.removeClass(e,po),i.addClass(e,vo),o.$dirty=!0,o.$pristine=!1,a.$setDirty()},o.$setPristine=function(){i.setClass(e,po,vo+" "+ms),o.$dirty=!1,o.$pristine=!0,o.$submitted=!1,x(u,function(e){e.$setPristine()})},o.$setUntouched=function(
){x(u,function(e){e.$setUntouched()})},o.$setSubmitted=function(){i.addClass(e,ms),o.$submitted=!0,a.$setSubmitted()}}function _s(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function Ds(e,t,n,r,i,s){Ps(e,t,n,r,i,s),_s(r)}function Ps(e,t,n,r,i,s){var u=o(t[0].type);if(!i.android){var a=!1;t.on("compositionstart",function(e){a=!0}),t.on("compositionend",function(){a=!1,f()})}var f=function(e){l&&(s.defer.cancel(l),l=null);if(a)return;var i=t.val(),o=e&&e.type;u!=="password"&&
(!n.ngTrim||n.ngTrim!=="false")&&(i=G(i)),(r.$viewValue!==i||i===""&&r.$$hasNativeValidators)&&r.$setViewValue(i,o)};if(i.hasEvent("input"))t.on("input",f);else{var l,c=function(e,t,n){l||(l=s.defer(function(){l=null,(!t||t.value!==n)&&f(e)}))};t.on("keydown",function(e){var t=e.keyCode;if(t===91||15<t&&t<19||37<=t&&t<=40)return;c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",f),r.$render=function(){t.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function Hs(e,t){if(
q(e))return e;if(F(e)){Ls.lastIndex=0;var n=Ls.exec(e);if(n){var r=+n[1],i=+n[2],s=0,o=0,u=0,a=0,f=Zi(r),l=(i-1)*7;return t&&(s=t.getHours(),o=t.getMinutes(),u=t.getSeconds(),a=t.getMilliseconds()),new Date(r,0,f.getDate()+l,s,o,u,a)}}return NaN}function Bs(e,t){return function(n,r){var i,s;if(q(n))return n;if(F(n)){n.charAt(0)=='"'&&n.charAt(n.length-1)=='"'&&(n=n.substring(1,n.length-1));if(Ss.test(n))return new Date(n);e.lastIndex=0,i=e.exec(n);if(i)return i.shift(),r?s={yyyy:r.getFullYear(),MM
:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:s={yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},x(i,function(e,n){n<t.length&&(s[t[n]]=+e)}),new Date(s.yyyy,s.MM-1,s.dd,s.HH,s.mm,s.ss||0,s.sss*1e3||0)}return NaN}}function js(e,t,r,i){return function(o,u,a,f,l,c,h){function g(e){return e&&(!e.getTime||e.getTime()===e.getTime())}function y(e){return B(e)?q(e)?e:r(e):n}Fs(o,u,a,f),Ps(o,u,a,f,l,c);var p=f&&f.$options&&f.$options.timezone,d;
f.$$parserName=e,f.$parsers.push(function(e){if(f.$isEmpty(e))return null;if(t.test(e)){var i=r(e,d);return p==="UTC"&&i.setMinutes(i.getMinutes()-i.getTimezoneOffset()),i}return n}),f.$formatters.push(function(e){if(e&&!q(e))throw bo("datefmt","Expected `{0}` to be a date",e);if(g(e)){d=e;if(d&&p==="UTC"){var t=6e4*d.getTimezoneOffset();d=new Date(d.getTime()+t)}return h("date")(e,i,p)}return d=null,""});if(B(a.min)||a.ngMin){var v;f.$validators.min=function(e){return!g(e)||H(v)||r(e)>=v},a.$observe
("min",function(e){v=y(e),f.$validate()})}if(B(a.max)||a.ngMax){var m;f.$validators.max=function(e){return!g(e)||H(m)||r(e)<=m},a.$observe("max",function(e){m=y(e),f.$validate()})}}}function Fs(e,t,r,i){var o=t[0],u=i.$$hasNativeValidators=j(o.validity);u&&i.$parsers.push(function(e){var r=t.prop(s)||{};return r.badInput&&!r.typeMismatch?n:e})}function Is(e,t,r,i,s,o){Fs(e,t,r,i),Ps(e,t,r,i,s,o),i.$$parserName="number",i.$parsers.push(function(e){return i.$isEmpty(e)?null:Ns.test(e)?parseFloat(e)
:n}),i.$formatters.push(function(e){if(!i.$isEmpty(e)){if(!I(e))throw bo("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e});if(B(r.min)||r.ngMin){var u;i.$validators.min=function(e){return i.$isEmpty(e)||H(u)||e>=u},r.$observe("min",function(e){B(e)&&!I(e)&&(e=parseFloat(e,10)),u=I(e)&&!isNaN(e)?e:n,i.$validate()})}if(B(r.max)||r.ngMax){var a;i.$validators.max=function(e){return i.$isEmpty(e)||H(a)||e<=a},r.$observe("max",function(e){B(e)&&!I(e)&&(e=parseFloat(e,10)),a=I(e)&&!isNaN
(e)?e:n,i.$validate()})}}function qs(e,t,n,r,i,s){Ps(e,t,n,r,i,s),_s(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||xs.test(n)}}function Rs(e,t,n,r,i,s){Ps(e,t,n,r,i,s),_s(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Ts.test(n)}}function Us(e,t,n,r){H(n.name)&&t.attr("name",k());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=
e==r.$viewValue},n.$observe("value",r.$render)}function zs(e,t,n,i,s){var o;if(B(i)){o=e(i);if(!o.constant)throw r("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return o(t)}return s}function Ws(e,t,n,r,i,s,o,u){var a=zs(u,e,"ngTrueValue",n.ngTrueValue,!0),f=zs(u,e,"ngFalseValue",n.ngFalseValue,!1),l=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",l),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters
.push(function(e){return ot(e,a)}),r.$parsers.push(function(e){return e?a:f})}function Ys(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var r=0;r<e.length;r++){var i=e[r];for(var s=0;s<t.length;s++)if(i==t[s])continue e;n.push(i)}return n}function i(e){if(R(e))return e;if(F(e))return e.split(" ");if(j(e)){var t=[];return x(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t}return e}return{restrict:"AC",link:function(s,o,u){function f(e){var t=c(e,1);u.$addClass(t
)}function l(e){var t=c(e,-1);u.$removeClass(t)}function c(e,t){var n=o.data("$classCounts")||{},r=[];return x(e,function(e){if(t>0||n[e])n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e)}),o.data("$classCounts",n),r.join(" ")}function h(e,t){var i=r(t,e),s=r(e,t);i=c(i,1),s=c(s,-1),i&&i.length&&n.addClass(o,i),s&&s.length&&n.removeClass(o,s)}function p(e){if(t===!0||s.$index%2===t){var n=i(e||[]);if(!a)f(n);else if(!ot(e,a)){var r=i(a);h(r,n)}}a=st(e)}var a;s.$watch(u[e],p,!0),u.$observe("class",function(
t){p(s.$eval(u[e]))}),e!=="ngClass"&&s.$watch("$index",function(n,r){var o=n&1;if(o!==(r&1)){var a=i(s.$eval(u[e]));o===t?f(a):l(a)}})}}}]}function To(e){function f(e,r,i){r===n?l("$pending",e,i):c("$pending",e,i),K(r)?r?(o(t.$error,e,i),s(t.$$success,e,i)):(s(t.$error,e,i),o(t.$$success,e,i)):(o(t.$error,e,i),o(t.$$success,e,i)),t.$pending?(h(yo,!0),t.$valid=t.$invalid=n,p("",null)):(h(yo,!1),t.$valid=No(t.$error),t.$invalid=!t.$valid,p("",t.$valid));var a;t.$pending&&t.$pending[e]?a=n:t.$error[
e]?a=!1:t.$$success[e]?a=!0:a=null,p(e,a),u.$setValidity(e,a,t)}function l(e,n,r){t[e]||(t[e]={}),s(t[e],n,r)}function c(e,r,i){t[e]&&o(t[e],r,i),No(t[e])&&(t[e]=n)}function h(e,t){t&&!i[e]?(a.addClass(r,e),i[e]=!0):!t&&i[e]&&(a.removeClass(r,e),i[e]=!1)}function p(e,t){e=e?"-"+kt(e,"-"):"",h(co+e,t===!0),h(ho+e,t===!1)}var t=e.ctrl,r=e.$element,i={},s=e.set,o=e.unset,u=e.parentForm,a=e.$animate;i[ho]=!(i[co]=r.hasClass(co)),t.$setValidity=f}function No(e){if(e)for(var t in e)return!1;return!0}var i=/^\/(.+)\/([a-z]*)$/
,s="validity",o=function(e){return F(e)?e.toLowerCase():e},u=Object.prototype.hasOwnProperty,a=function(e){return F(e)?e.toUpperCase():e},f=function(e){return F(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)|32)}):e},l=function(e){return F(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)&-33)}):e};"i"!=="I".toLowerCase()&&(o=f,a=l);var c,h,p,d=[].slice,v=[].splice,m=[].push,g=Object.prototype.toString,y=r("ng"),b=e.angular||(e.angular={}),
w,E=0;c=t.documentMode,_.$inject=[],D.$inject=[];var R=Array.isArray,G=function(e){return F(e)?e.trim():e},Y=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},ut=function(){if(B(ut.isActive_))return ut.isActive_;var e=!!t.querySelector("[ng-csp]")||!!t.querySelector("[data-ng-csp]");if(!e)try{new Function("")}catch(n){e=!0}return ut.isActive_=e},wt=["ng-","data-ng-","ng:","x-ng-"],Ct=/[A-Z]/g,Lt=!1,At,jt=1,Ft=3,It=8,qt=9,Rt=11,Xt={full:"1.3.14",major:1
,minor:3,dot:14,codeName:"instantaneous-browserification"};pn.expando="ng339";var $t=pn.cache={},Jt=1,Kt=function(e,t,n){e.addEventListener(t,n,!1)},Qt=function(e,t,n){e.removeEventListener(t,n,!1)};pn._data=function(e){return this.cache[e[this.expando]]||{}};var Yt=/([\:\-\_]+(.))/g,Zt=/^moz([A-Z])/,en={mouseleave:"mouseout",mouseenter:"mouseover"},tn=r("jqLite"),rn=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,sn=/<|&#?\w+;/,on=/<([\w:]+)/,un=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi
,an={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};an.optgroup=an.option,an.tbody=an.tfoot=an.colgroup=an.caption=an.thead,an.th=an.td;var An=pn.prototype={ready:function(n){function i(){if(r)return;r=!0,n()}var r=!1;t.readyState==="complete"?setTimeout(i):(this.on("DOMContentLoaded",i),pn(e).on("load"
,i))},toString:function(){var e=[];return x(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return e>=0?h(this[e]):h(this[this.length+e])},length:0,push:m,sort:[].sort,splice:[].splice},On={};x("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){On[o(e)]=e});var Mn={};x("input,select,option,textarea,button,form,details".split(","),function(e){Mn[e]=!0});var _n={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"
};x({data:bn,removeData:gn},function(e,t){pn[t]=e}),x({data:bn,inheritedData:Nn,scope:function(e){return h.data(e,"$scope")||Nn(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return h.data(e,"$isolateScope")||h.data(e,"$isolateScopeNoTemplate")},controller:Tn,injector:function(e){return Nn(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:wn,css:function(e,t,n){t=nn(t);if(!B(n))return e.style[t];e.style[t]=n},attr:function(e,t,r){var i=o(t);if(On[i]){if(!
B(r))return e[t]||(e.attributes.getNamedItem(t)||_).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(B(r))e.setAttribute(t,r);else if(e.getAttribute){var s=e.getAttribute(t,2);return s===null?n:s}},prop:function(e,t,n){if(!B(n))return e[t];e[t]=n},text:function(){function e(e,t){if(H(t)){var n=e.nodeType;return n===jt||n===Ft?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(H(t)){if(e.multiple&&tt(e)==="select"){var n=[];return x(e.options
,function(e){e.selected&&n.push(e.value||e.text)}),n.length===0?null:n}return e.value}e.value=t},html:function(e,t){if(H(t))return e.innerHTML;vn(e,!0),e.innerHTML=t},empty:Cn},function(e,t){pn.prototype[t]=function(t,r){var i,s,o=this.length;if(e!==Cn&&(e.length==2&&e!==wn&&e!==Tn?t:r)===n){if(j(t)){for(i=0;i<o;i++)if(e===bn)e(this[i],t);else for(s in t)e(this[i],s,t[s]);return this}var u=e.$dv,a=u===n?Math.min(o,1):o;for(var f=0;f<a;f++){var l=e(this[f],t,r);u=u?u+l:l}return u}for(i=0;i<o;i++)e
(this[i],t,r);return this}}),x({removeData:gn,on:function Jo(e,t,n,r){if(B(r))throw tn("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(!ln(e))return;var i=yn(e,!0),s=i.events,o=i.handle;o||(o=i.handle=Hn(e,s));var u=t.indexOf(" ")>=0?t.split(" "):[t],a=u.length;while(a--){t=u[a];var f=s[t];f||(s[t]=[],t==="mouseenter"||t==="mouseleave"?Jo(e,en[t],function(e){var n=this,r=e.relatedTarget;(!r||r!==n&&!n.contains(r))&&o(e,t)}):t!=="$destroy"&&Kt(e,t,o),f=s[t]),f.
push(n)}},off:mn,one:function(e,t,n){e=h(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;vn(e),x(new pn(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return x(e.childNodes,function(e){e.nodeType===jt&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n!==jt&&n!==Rt)return;t=new pn(t);for(var r=0,i=t.length;r<i;r++
){var s=t[r];e.appendChild(s)}},prepend:function(e,t){if(e.nodeType===jt){var n=e.firstChild;x(new pn(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=h(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:kn,detach:function(e){kn(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new pn(t);for(var i=0,s=t.length;i<s;i++){var o=t[i];r.insertBefore(o,n.nextSibling),n=o}},addClass:Sn,removeClass:En,toggleClass:function(e,t,n){t&&x(t.split(" "),function(
t){var r=n;H(r)&&(r=!wn(e,t)),(r?Sn:En)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Rt?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:dn,triggerHandler:function(e,t,n){var r,i,s,o=t.type||t,u=yn(e),a=u&&u.events,f=a&&a[o];f&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this
.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:_,type:o,target:e},t.type&&(r=A(r,t)),i=st(f),s=n?[r].concat(n):[r],x(i,function(t){r.isImmediatePropagationStopped()||t.apply(e,s)}))}},function(e,t){pn.prototype[t]=function(t,n,r){var i;for(var s=0,o=this.length;s<o;s++)H(i)?(i=e(this[s],t,n,r),B(i)&&(i=h(i))):xn(i,e(this[s],t,n,r));return B(i)?i:this},pn.prototype.bind=pn.prototype.on,pn.prototype.unbind=pn.prototype
.off}),Fn.prototype={put:function(e,t){this[jn(e,this.nextUid)]=t},get:function(e){return this[jn(e,this.nextUid)]},remove:function(e){var t=this[e=jn(e,this.nextUid)];return delete this[e],t}};var In=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,qn=/,/,Rn=/^\s*(_?)(\S+?)\1\s*$/,Un=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,zn=r("$injector");Vn.$$annotate=Xn;var Jn=r("$animate"),Kn=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var r=t+"-animation";if(t&&t.charAt(0)!=".")throw Jn("notcsel"
,"Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=r,e.factory(r,n)},this.classNameFilter=function(e){return arguments.length===1&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(e,t,n){function i(t){var r,i=e.defer();return i.promise.$$cancelFn=function(){r&&r()},n.$$postDigest(function(){r=t(function(){i.resolve()})}),i.promise}function s(e,t){var n=[],r=[],i=Bt();return x
((e.attr("class")||"").split(/\s+/),function(e){i[e]=!0}),x(t,function(e,t){var s=i[t];e===!1&&s?r.push(t):e===!0&&!s&&n.push(t)}),n.length+r.length>0&&[n.length?n:null,r.length?r:null]}function o(e,t,n){for(var r=0,i=t.length;r<i;++r){var s=t[r];e[s]=n}}function u(){return r||(r=e.defer(),t(function(){r.resolve(),r=null})),r.promise}function a(e,t){if(b.isObject(t)){var n=A(t.from||{},t.to||{});e.css(n)}}var r;return{animate:function(e,t,n){return a(e,{from:t,to:n}),u()},enter:function(e,t,n,r){
return a(e,r),n?n.after(e):t.prepend(e),u()},leave:function(e,t){return e.remove(),u()},move:function(e,t,n,r){return this.enter(e,t,n,r)},addClass:function(e,t,n){return this.setClass(e,t,[],n)},$$addClassImmediately:function(e,t,n){return e=h(e),t=F(t)?t:R(t)?t.join(" "):"",x(e,function(e){Sn(e,t)}),a(e,n),u()},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},$$removeClassImmediately:function(e,t,n){return e=h(e),t=F(t)?t:R(t)?t.join(" "):"",x(e,function(e){En(e,t)}),a(e,n),u()},setClass
:function(e,t,n,r){var u=this,a="$$animateClasses",f=!1;e=h(e);var l=e.data(a);l?r&&l.options&&(l.options=b.extend(l.options||{},r)):(l={classes:{},options:r},f=!0);var c=l.classes;return t=R(t)?t:t.split(" "),n=R(n)?n:n.split(" "),o(c,t,!0),o(c,n,!1),f&&(l.promise=i(function(t){var n=e.data(a);e.removeData(a);if(n){var r=s(e,n.classes);r&&u.$$setClassImmediately(e,r[0],r[1],n.options)}t()}),e.data(a,l)),l.promise},$$setClassImmediately:function(e,t,n,r){return t&&this.$$addClassImmediately(e,t),
n&&this.$$removeClassImmediately(e,n),a(e,r),u()},enabled:_,cancel:_}}]}],tr=r("$compile");nr.$inject=["$provide","$$sanitizeUriProvider"];var rr=/^((?:x|data)[\:\-_])/i,fr=r("$controller"),pr="application/json",dr={"Content-Type":pr+";charset=utf-8"},vr=/^\[|^\{(?!\{)/,mr={"[":/]$/,"{":/}$/},gr=/^\)\]\}',?\n/,Lr=r("$interpolate"),_r=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Dr={http:80,https:443,ftp:21},Pr=r("$location"),Vr={$$html5:!1,$$replace:!1,absUrl:$r("$$absUrl"),url:function(e){if(H(e))return this
.$$url;var t=_r.exec(e);return(t[1]||e==="")&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||e==="")&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:$r("$$protocol"),host:$r("$$host"),port:$r("$$port"),path:Jr("$$path",function(e){return e=e!==null?e.toString():"",e.charAt(0)=="/"?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(F(e)||I(e))e=e.toString(),this.$$search=mt(e);else{if(!j(e))throw Pr("isrcharg","The first argument of the `$location#search()` call must be a string or an object."
);e=it(e,{}),x(e,function(t,n){t==null&&delete e[n]}),this.$$search=e}break;default:H(t)||t===null?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Jr("$$hash",function(e){return e!==null?e.toString():""}),replace:function(){return this.$$replace=!0,this}};x([Xr,Wr,zr],function(e){e.prototype=Object.create(Vr),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==zr||!this.$$html5)throw Pr("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API"
);return this.$$state=H(t)?null:t,this}});var Gr=r("$parse"),ei=Function.prototype.call,ti=Function.prototype.apply,ni=Function.prototype.bind,ii=Bt();x({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},"undefined":function(){}},function(e,t){e.constant=e.literal=e.sharedGetter=!0,ii[t]=e}),ii["this"]=function(e){return e},ii["this"].sharedGetter=!0;var si=A(Bt(),{"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),B(r)?B(i)?r+i:r:B(i)?i:n},"-":function(e,t,n,r){
return n=n(e,t),r=r(e,t),(B(n)?n:0)-(B(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"===":function(e,t,n,r){return n(e,t)===r(e,t)},"!==":function(e,t,n,r){return n(e,t)!==r(e,t)},"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)}
,">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"!":function(e,t,n){return!n(e,t)},"=":!0,"|":!0}),oi={n:"\n",f:"\f",r:"\r",t:"	",v:"","'":"'",'"':'"'},ui=function(e){this.options=e};ui.prototype={constructor:ui,lex:function(e){this.text=e,this.index=0,this.tokens=[];while(this.index<this.text.length){var t=this.text.charAt(this.index);if(t==='"'||t==="'")this.readString(t);else if(this.isNumber(t)||t==="."&&
this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(t))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),r=n+this.peek(2),i=si[t],s=si[n],o=si[r];if(i||s||o){var u=o?r:s?n:t;this.tokens.push({index:this.index,text:u,operator:!0}),this.index+=u.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t)
{return t.indexOf(e)!==-1},peek:function(e){var t=e||1;return this.index+t<this.text.length?this.text.charAt(this.index+t):!1},isNumber:function(e){return"0"<=e&&e<="9"&&typeof e=="string"},isWhitespace:function(e){return e===" "||e==="\r"||e==="	"||e==="\n"||e===""||e===" "},isIdent:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||e==="$"},isExpOperator:function(e){return e==="-"||e==="+"||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=B(t)?"s "+t+"-"+this.index+" ["+
this.text.substring(t,n)+"]":" "+n;throw Gr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){var e="",t=this.index;while(this.index<this.text.length){var n=o(this.text.charAt(this.index));if(n=="."||this.isNumber(n))e+=n;else{var r=this.peek();if(n=="e"&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&e.charAt(e.length-1)=="e")e+=n;else{if(!this.isExpOperator(n)||!!r&&!!this.isNumber(r)||e.charAt(e.length-1)!="e")break;
this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;while(this.index<this.text.length){var t=this.text.charAt(this.index);if(!this.isIdent(t)&&!this.isNumber(t))break;this.index++}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;var n="",r=e,i=!1;while(this.index<this.text.length){var s=this.text.charAt(this.index);r+=
s;if(i){if(s==="u"){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+o+"]"),this.index+=4,n+=String.fromCharCode(parseInt(o,16))}else{var u=oi[s];n+=u||s}i=!1}else if(s==="\\")i=!0;else{if(s===e){this.index++,this.tokens.push({index:t,text:r,constant:!0,value:n});return}n+=s}this.index++}this.throwError("Unterminated quote",t)}};var fi=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n};fi.ZERO=A(function(){return 0
},{sharedGetter:!0,constant:!0}),fi.prototype={constructor:fi,parse:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.statements();return this.tokens.length!==0&&this.throwError("is an unexpected token",this.tokens[0]),t.literal=!!t.literal,t.constant=!!t.constant,t},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.peek().identifier&&this.peek().text in ii?e=ii[this.consume
().text]:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());var t,n;while(t=this.expect("(","[","."))t.text==="("?(e=this.functionCall(e,n),n=null):t.text==="["?(n=e,e=this.objectIndex(e)):t.text==="."?(n=e,e=this.fieldAccess(e)):this.throwError("IMPOSSIBLE");return e},throwError:function(e,t){throw Gr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1
,this.text,this.text.substring(t.index))},peekToken:function(){if(this.tokens.length===0)throw Gr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var s=this.tokens[e],o=s.text;if(o===t||o===n||o===r||o===i||!t&&!n&&!r&&!i)return s}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return i?(this.tokens.shift(),i):!1},consume:function(e){if(this.tokens
.length===0)throw Gr("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},unaryFn:function(e,t){var n=si[e];return A(function(r,i){return n(r,i,t)},{constant:t.constant,inputs:[t]})},binaryFn:function(e,t,n,r){var i=si[t];return A(function(r,s){return i(r,s,e,n)},{constant:e.constant&&n.constant,inputs:!r&&[e,n]})},identifier:function(){var e=this.consume().text;while(this.peek(".")&&this.peekAhead(1
).identifier&&!this.peekAhead(2,"("))e+=this.consume().text+this.consume().text;return mi(e,this.options,this.text)},constant:function(){var e=this.consume().value;return A(function(){return e},{constant:!0,literal:!0})},statements:function(){var e=[];for(;;){this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain());if(!this.expect(";"))return e.length===1?e[0]:function(n,r){var i;for(var s=0,o=e.length;s<o;s++)i=e[s](n,r);return i}}},filterChain:function(){var e=this.expression
(),t;while(t=this.expect("|"))e=this.filter(e);return e},filter:function(e){var t=this.$filter(this.consume().text),r,i;if(this.peek(":")){r=[],i=[];while(this.expect(":"))r.push(this.expression())}var s=[e].concat(r||[]);return A(function(o,u){var a=e(o,u);if(i){i[0]=a;var f=r.length;while(f--)i[f+1]=r[f](o,u);return t.apply(n,i)}return t(a)},{constant:!t.$stateful&&s.every(ai),inputs:!t.$stateful&&s})},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary(),t,
n;return(n=this.expect("="))?(e.assign||this.throwError("implies assignment but ["+this.text.substring(0,n.index)+"] can not be assigned to",n),t=this.ternary(),A(function(r,i){return e.assign(r,t(r,i),i)},{inputs:[e,t]})):e},ternary:function(){var e=this.logicalOR(),t,n;if(n=this.expect("?")){t=this.assignment();if(this.consume(":")){var r=this.assignment();return A(function(i,s){return e(i,s)?t(i,s):r(i,s)},{constant:e.constant&&t.constant&&r.constant})}}return e},logicalOR:function(){var e=this
.logicalAND(),t;while(t=this.expect("||"))e=this.binaryFn(e,t.text,this.logicalAND(),!0);return e},logicalAND:function(){var e=this.equality(),t;while(t=this.expect("&&"))e=this.binaryFn(e,t.text,this.equality(),!0);return e},equality:function(){var e=this.relational(),t;while(t=this.expect("==","!=","===","!=="))e=this.binaryFn(e,t.text,this.relational());return e},relational:function(){var e=this.additive(),t;while(t=this.expect("<",">","<=",">="))e=this.binaryFn(e,t.text,this.additive());return e
},additive:function(){var e=this.multiplicative(),t;while(t=this.expect("+","-"))e=this.binaryFn(e,t.text,this.multiplicative());return e},multiplicative:function(){var e=this.unary(),t;while(t=this.expect("*","/","%"))e=this.binaryFn(e,t.text,this.unary());return e},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(fi.ZERO,e.text,this.unary()):(e=this.expect("!"))?this.unaryFn(e.text,this.unary()):this.primary()},fieldAccess:function(e){var t=this.identifier
();return A(function(i,s,o){var u=o||e(i,s);return u==null?n:t(u)},{assign:function(n,r,i){var s=e(n,i);return s||e.assign(n,s={},i),t.assign(s,r)}})},objectIndex:function(e){var t=this.text,r=this.expression();return this.consume("]"),A(function(s,o){var u=e(s,o),a=r(s,o),f;return Yr(a,t),u?(f=Zr(u[a],t),f):n},{assign:function(n,i,s){var o=Yr(r(n,s),t),u=Zr(e(n,s),t);return u||e.assign(n,u={},s),u[o]=i}})},functionCall:function(e,t){var r=[];if(this.peekToken().text!==")")do r.push(this.expression
());while(this.expect(","));this.consume(")");var i=this.text,s=r.length?[]:null;return function(u,a){var f=t?t(u,a):B(t)?n:u,l=e(u,a,f)||_;if(s){var c=r.length;while(c--)s[c]=Zr(r[c](u,a),i)}Zr(f,i),ri(l,i);var h=l.apply?l.apply(f,s):l(s[0],s[1],s[2],s[3],s[4]);return s&&(s.length=0),Zr(h,i)}},arrayDeclaration:function(){var e=[];if(this.peekToken().text!=="]")do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),A(function(n,r){var i=[];for(var s=0
,o=e.length;s<o;s++)i.push(e[s](n,r));return i},{literal:!0,constant:e.every(ai),inputs:e})},object:function(){var e=[],t=[];if(this.peekToken().text!=="}")do{if(this.peek("}"))break;var n=this.consume();n.constant?e.push(n.value):n.identifier?e.push(n.text):this.throwError("invalid key",n),this.consume(":"),t.push(this.expression())}while(this.expect(","));return this.consume("}"),A(function(r,i){var s={};for(var o=0,u=t.length;o<u;o++)s[e[o]]=t[o](r,i);return s},{literal:!0,constant:t.every(ai)
,inputs:t})}};var ci=Bt(),hi=Bt(),gi=Object.prototype.valueOf,Ci=r("$sce"),ki={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},tr=r("$compile"),Bi=t.createElement("a"),ji=Fi(e.location.href);Ri.$inject=["$provide"],Xi.$inject=["$locale"],Vi.$inject=["$locale"];var $i=".",rs={yyyy:Qi("FullYear",4),yy:Qi("FullYear",2,0,!0),y:Qi("FullYear",1),MMMM:Gi("Month"),MMM:Gi("Month",!0),MM:Qi("Month",2,1),M:Qi("Month",1,1),dd:Qi("Date",2),d:Qi("Date",1),HH:Qi("Hours",2),H:Qi("Hours",1),hh
:Qi("Hours",2,-12),h:Qi("Hours",1,-12),mm:Qi("Minutes",2),m:Qi("Minutes",1),ss:Qi("Seconds",2),s:Qi("Seconds",1),sss:Qi("Milliseconds",3),EEEE:Gi("Day"),EEE:Gi("Day",!0),a:ns,Z:Yi,ww:ts(2),w:ts(1)},is=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,ss=/^\-?\d+$/;os.$inject=["$locale"];var as=P(o),fs=P(a);cs.$inject=["$parse"];var ps=P({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref&&!t.name)return function(e,t){if(t[0].nodeName.toLowerCase()!=="a")return;
var n=g.call(t.prop("href"))==="[object SVGAnimatedString]"?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}),ds={};x(On,function(e,t){if(e=="multiple")return;var n=ir("ng-"+t);ds[n]=function(){return{restrict:"A",priority:100,link:function(e,r,i){e.$watch(i[n],function(n){i.$set(t,!!n)})}}}}),x(_n,function(e,t){ds[t]=function(){return{priority:100,link:function(e,n,r){if(t==="ngPattern"&&r.ngPattern.charAt(0)=="/"){var s=r.ngPattern.match(i);if(s){r.$set("ngPattern"
,new RegExp(s[1],s[2]));return}}e.$watch(r[t],function(n){r.$set(t,n)})}}}}),x(["src","srcset","href"],function(e){var t=ir("ng-"+e);ds[t]=function(){return{priority:99,link:function(n,r,i){var s=e,o=e;e==="href"&&g.call(r.prop("href"))==="[object SVGAnimatedString]"&&(o="xlinkHref",i.$attr[o]="xlink:href",s=null),i.$observe(t,function(t){if(!t){e==="href"&&i.$set(o,null);return}i.$set(o,t),c&&s&&r.prop(s,i[o])})}}}});var vs={$addControl:_,$$renameControl:gs,$removeControl:_,$setValidity:_,$setDirty
:_,$setPristine:_,$setSubmitted:_},ms="ng-submitted";ys.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var bs=function(e){return["$timeout",function(t){var r={name:"form",restrict:e?"EAC":"E",controller:ys,compile:function(r){return r.addClass(po).addClass(co),{pre:function(r,i,s,o){if(!("action"in s)){var u=function(e){r.$apply(function(){o.$commitViewValue(),o.$setSubmitted()}),e.preventDefault()};Kt(i[0],"submit",u),i.on("$destroy",function(){t(function(){Qt(i[0],"submit",u)}
,0,!1)})}var a=o.$$parentForm,f=o.$name;f&&(li(r,null,f,o,f),s.$observe(s.name?"name":"ngForm",function(e){if(f===e)return;li(r,null,f,n,f),f=e,li(r,null,f,o,f),a.$$renameControl(o,f)})),i.on("$destroy",function(){a.$removeControl(o),f&&li(r,null,f,n,f),A(o,vs)})}}}};return r}]},ws=bs(),Es=bs(!0),Ss=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,xs=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ts=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i
,Ns=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Cs=/^(\d{4})-(\d{2})-(\d{2})$/,ks=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ls=/^(\d{4})-W(\d\d)$/,As=/^(\d{4})-(\d\d)$/,Os=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ms={text:Ds,date:js("date",Cs,Bs(Cs,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":js("datetimelocal",ks,Bs(ks,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:js("time",Os,Bs(Os,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:js("week",Ls,Hs,"yyyy-Www"
),month:js("month",As,Bs(As,["yyyy","MM"]),"yyyy-MM"),number:Is,url:qs,email:Rs,radio:Us,checkbox:Ws,hidden:_,button:_,submit:_,reset:_,file:_},Xs=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,s,u,a){a[0]&&(Ms[o(u.type)]||Ms.text)(i,s,u,a[0],t,e,n,r)}}}}],Vs=/^(true|false|\d+)$/,$s=function(){return{restrict:"A",priority:100,compile:function(e,t){return Vs.test(t.ngValue)?function(t,n,r){r.$set("value",t.$eval(r.ngValue))
}:function(t,n,r){t.$watch(r.ngValue,function(t){r.$set("value",t)})}}}},Js=["$compile",function(e){return{restrict:"AC",compile:function(r){return e.$$addBindingClass(r),function(r,i,s){e.$$addBindingInfo(i,s.ngBind),i=i[0],r.$watch(s.ngBind,function(t){i.textContent=t===n?"":t})}}}}],Ks=["$interpolate","$compile",function(e,t){return{compile:function(i){return t.$$addBindingClass(i),function(i,s,o){var u=e(s.attr(o.$attr.ngBindTemplate));t.$$addBindingInfo(s,u.expressions),s=s[0],o.$observe("ngBindTemplate"
,function(e){s.textContent=e===n?"":e})}}}}],Qs=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(i,s){var o=t(s.ngBindHtml),u=t(s.ngBindHtml,function(t){return(t||"").toString()});return n.$$addBindingClass(i),function(r,i,s){n.$$addBindingInfo(i,s.ngBindHtml),r.$watch(u,function(){i.html(e.getTrustedHtml(o(r))||"")})}}}}],Gs=P({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Zs=Ys("",!0),eo=Ys("Odd"
,0),to=Ys("Even",1),no=hs({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),ro=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],io={},so={blur:!0,focus:!0};x("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=ir("ng-"+e);io[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,s){var o=n(s[t],null,!0);return function(
n,i){i.on(e,function(t){var i=function(){o(n,{$event:t})};so[e]&&r.$$phase?n.$evalAsync(i):n.$apply(i)})}}}}]});var oo=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,s,o){var u,a,f;n.$watch(i.ngIf,function(s){s?a||o(function(n,s){a=s,n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" "),u={clone:n},e.enter(n,r.parent(),r)}):(f&&(f.remove(),f=null),a&&(a.$destroy(),a=null),u&&(f=Ht(u.clone),e.leave(f).then(function(
){f=null}),u=null))})}}}],uo=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:b.noop,compile:function(i,s){var o=s.ngInclude||s.src,u=s.onload||"",a=s.autoscroll;return function(i,s,f,l,c){var h=0,p,d,v,m=function(){d&&(d.remove(),d=null),p&&(p.$destroy(),p=null),v&&(n.leave(v).then(function(){d=null}),d=v,v=null)};i.$watch(r.parseAsResourceUrl(o),function(o){var f=function(){B(a)&&(!a||i.$eval(a
))&&t()},d=++h;o?(e(o,!0).then(function(e){if(d!==h)return;var t=i.$new();l.template=e;var r=c(t,function(e){m(),n.enter(e,null,s).then(f)});p=t,v=r,p.$emit("$includeContentLoaded",o),i.$eval(u)},function(){d===h&&(m(),i.$emit("$includeContentError",o))}),i.$emit("$includeContentRequested",o)):(m(),l.template=null)})}}}}],ao=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,s){if(/SVG/.test(r[0].toString())){r.empty(),e(cn(s.template,t).childNodes
)(n,function(t){r.append(t)},{futureParentElement:r});return}r.html(s.template),e(r.contents())(n)}}}],fo=hs({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),lo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,r,i){var s=t.attr(r.$attr.ngList)||", ",o=r.ngTrim!=="false",u=o?G(s):s,a=function(e){if(H(e))return;var t=[];return e&&x(e.split(u),function(e){e&&t.push(o?G(e):e)}),t};i.$parsers.push(a),i.$formatters.push(function(e){return R
(e)?e.join(s):n}),i.$isEmpty=function(e){return!e||!e.length}}}},co="ng-valid",ho="ng-invalid",po="ng-pristine",vo="ng-dirty",mo="ng-untouched",go="ng-touched",yo="ng-pending",bo=new r("ngModel"),wo=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,r,i,s,o,u,a,f,l){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[
],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=l(r.name||"",!1)(e);var c=s(r.ngModel),h=c.assign,p=c,d=h,v=null,m,g=this;this.$$setOptions=function(e){g.$options=e;if(e&&e.getterSetter){var t=s(r.ngModel+"()"),n=s(r.ngModel+"($$$p)");p=function(e){var n=c(e);return U(n)&&(n=t(e)),n},d=function(e,t){U(c(e))?n(e,{$$$p:g.$modelValue}):h(e,g.$modelValue)}}else if(!
c.assign)throw bo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,dt(i))},this.$render=_,this.$isEmpty=function(e){return H(e)||e===""||e===null||e!==e};var y=i.inheritedData("$formController")||vs,b=0;To({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:y,$animate:o}),this.$setPristine=function(){g.$dirty=!1,g.$pristine=!0,o.removeClass(i,vo),o.addClass(i,po)},this.$setDirty=function(){g.$dirty=!0,g.$pristine=!1,o.removeClass(i,
po),o.addClass(i,vo),y.$setDirty()},this.$setUntouched=function(){g.$touched=!1,g.$untouched=!0,o.setClass(i,mo,go)},this.$setTouched=function(){g.$touched=!0,g.$untouched=!1,o.setClass(i,go,mo)},this.$rollbackViewValue=function(){u.cancel(v),g.$viewValue=g.$$lastCommittedViewValue,g.$render()},this.$validate=function(){if(I(g.$modelValue)&&isNaN(g.$modelValue))return;var e=g.$$lastCommittedViewValue,t=g.$$rawModelValue,r=g.$valid,i=g.$modelValue,s=g.$options&&g.$options.allowInvalid;g.$$runValidators
(t,e,function(e){!s&&r!==e&&(g.$modelValue=e?t:n,g.$modelValue!==i&&g.$$writeModelToScope())})},this.$$runValidators=function(e,t,r){function s(){var e=g.$$parserName||"parse";return m!==n?(m||(x(g.$validators,function(e,t){a(t,null)}),x(g.$asyncValidators,function(e,t){a(t,null)})),a(e,m),m):(a(e,null),!0)}function o(){var n=!0;return x(g.$validators,function(r,i){var s=r(e,t);n=n&&s,a(i,s)}),n?!0:(x(g.$asyncValidators,function(e,t){a(t,null)}),!1)}function u(){var r=[],i=!0;x(g.$asyncValidators
,function(s,o){var u=s(e,t);if(!Q(u))throw bo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",u);a(o,n),r.push(u.then(function(){a(o,!0)},function(e){i=!1,a(o,!1)}))}),r.length?f.all(r).then(function(){l(i)},_):l(!0)}function a(e,t){i===b&&g.$setValidity(e,t)}function l(e){i===b&&r(e)}b++;var i=b;if(!s()){l(!1);return}if(!o()){l(!1);return}u()},this.$commitViewValue=function(){var e=g.$viewValue;u.cancel(v);if(g.$$lastCommittedViewValue===e&&(e!==""||!
g.$$hasNativeValidators))return;g.$$lastCommittedViewValue=e,g.$pristine&&this.$setDirty(),this.$$parseAndValidate()},this.$$parseAndValidate=function(){function u(){g.$modelValue!==s&&g.$$writeModelToScope()}var t=g.$$lastCommittedViewValue,r=t;m=H(r)?n:!0;if(m)for(var i=0;i<g.$parsers.length;i++){r=g.$parsers[i](r);if(H(r)){m=!1;break}}I(g.$modelValue)&&isNaN(g.$modelValue)&&(g.$modelValue=p(e));var s=g.$modelValue,o=g.$options&&g.$options.allowInvalid;g.$$rawModelValue=r,o&&(g.$modelValue=r,u(
)),g.$$runValidators(r,g.$$lastCommittedViewValue,function(e){o||(g.$modelValue=e?r:n,u())})},this.$$writeModelToScope=function(){d(e,g.$modelValue),x(g.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){g.$viewValue=e,(!g.$options||g.$options.updateOnDefault)&&g.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n=0,r=g.$options,i;r&&B(r.debounce)&&(i=r.debounce,I(i)?n=i:I(i[t])?n=i[t]:I(i["default"])&&(n=i["default"])),u.cancel(
v),n?v=u(function(){g.$commitViewValue()},n):a.$$phase?g.$commitViewValue():e.$apply(function(){g.$commitViewValue()})},e.$watch(function(){var r=p(e);if(r!==g.$modelValue){g.$modelValue=g.$$rawModelValue=r,m=n;var i=g.$formatters,s=i.length,o=r;while(s--)o=i[s](o);g.$viewValue!==o&&(g.$viewValue=g.$$lastCommittedViewValue=o,g.$render(),g.$$runValidators(r,o,_))}return r})}],Eo=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:wo,priority:1,compile
:function(n){return n.addClass(po).addClass(mo).addClass(co),{pre:function(t,n,r,i){var s=i[0],o=i[1]||vs;s.$$setOptions(i[2]&&i[2].$options),o.$addControl(s),r.$observe("name",function(e){s.$name!==e&&o.$$renameControl(s,e)}),t.$on("$destroy",function(){o.$removeControl(s)})},post:function(n,r,i,s){var o=s[0];o.$options&&o.$options.updateOn&&r.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),r.on("blur",function(t){if(o.$touched)return;e.$$phase?n.$evalAsync(o.$setTouched
):n.$apply(o.$setTouched)})}}}}}],So=/(\s+|^)default(\s+|$)/,xo=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var r=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=G(this.$options.updateOn.replace(So,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Co=hs({terminal:!0,priority:1e3}),ko=["$locale","$interpolate",function(e,t){var n=/{}/g,r=/^when(Minus)?(.+)$/
;return{restrict:"EA",link:function(i,s,u){function y(e){s.text(e||"")}var a=u.count,f=u.$attr.when&&s.attr(u.$attr.when),l=u.offset||0,c=i.$eval(f)||{},h={},p=t.startSymbol(),d=t.endSymbol(),v=p+a+"-"+l+d,m=b.noop,g;x(u,function(e,t){var n=r.exec(t);if(n){var i=(n[1]?"-":"")+o(n[2]);c[i]=s.attr(u.$attr[t])}}),x(c,function(e,r){h[r]=t(e.replace(n,v))}),i.$watch(a,function(n){var r=parseFloat(n),s=isNaN(r);!s&&!(r in c)&&(r=e.pluralCat(r-l)),r!==g&&(!s||!isNaN(g))&&(m(),m=i.$watch(h[r],y),g=r)})}}
}],Lo=["$parse","$animate",function(e,i){var s="$$NG_REMOVED",o=r("ngRepeat"),u=function(e,t,n,r,i,s,o){e[n]=r,i&&(e[i]=s),e.$index=t,e.$first=t===0,e.$last=t===o-1,e.$middle=!e.$first&&!e.$last,e.$odd=!(e.$even=(t&1)===0)},a=function(e){return e.clone[0]},f=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(l,c){var p=c.ngRepeat,d=t.createComment(" end ngRepeat: "+p+" "),v=p.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/
);if(!v)throw o("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",p);var m=v[1],g=v[2],y=v[3],b=v[4];v=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!v)throw o("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",m);var w=v[3]||v[1],E=v[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/
.test(y)))throw o("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var T,N,C,k,L={$id:jn};return b?T=e(b):(C=function(e,t){return jn(t)},k=function(e){return e}),function(t,r,l,c,v){T&&(N=function(e,n,r){return E&&(L[E]=e),L[w]=n,L.$index=r,T(t,L)});var m=Bt();t.$watchCollection(g,function(l){var c,g,b=r[0],T,L=Bt(),A,O,M,_,D,P,H,B,j;y&&(t[y]=l);if(S(l))P=l,D=N||C;else{D=N||k,P=[];for(var F in l)l.hasOwnProperty(F)&&F.charAt(0)!="$"&&P.push(F)
;P.sort()}A=P.length,B=new Array(A);for(c=0;c<A;c++){O=l===P?c:P[c],M=l[O],_=D(O,M,c);if(m[_])H=m[_],delete m[_],L[_]=H,B[c]=H;else{if(L[_])throw x(B,function(e){e&&e.scope&&(m[e.id]=e)}),o("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",p,_,M);B[c]={id:_,scope:n,clone:n},L[_]=!0}}for(var I in m){H=m[I],j=Ht(H.clone),i.leave(j);if(j[0].parentNode)for(c=0,g=j.length;c<g;c++)j[c][s]=!0;H.scope
.$destroy()}for(c=0;c<A;c++){O=l===P?c:P[c],M=l[O],H=B[c];if(H.scope){T=b;do T=T.nextSibling;while(T&&T[s]);a(H)!=T&&i.move(Ht(H.clone),null,h(b)),b=f(H),u(H.scope,c,w,M,E,O,A)}else v(function(t,n){H.scope=n;var r=d.cloneNode(!1);t[t.length++]=r,i.enter(t,null,h(b)),b=r,H.clone=t,L[H.id]=H,u(H.scope,c,w,M,E,O,A)})}m=L})}}}}],Ao="ng-hide",Oo="ng-hide-animate",Mo=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(r){e[r?"removeClass":"addClass"
](n,Ao,{tempClasses:Oo})})}}}],_o=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(r){e[r?"addClass":"removeClass"](n,Ao,{tempClasses:Oo})})}}}],Do=hs(function(e,t,n){e.$watchCollection(n.ngStyle,function(n,r){r&&n!==r&&x(r,function(e,n){t.css(n,"")}),n&&t.css(n)})}),Po=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,s){var o=i.ngSwitch||i.on,u=[],a=[],f=[
],l=[],c=function(e,t){return function(){e.splice(t,1)}};n.$watch(o,function(r){var i,o;for(i=0,o=f.length;i<o;++i)e.cancel(f[i]);f.length=0;for(i=0,o=l.length;i<o;++i){var h=Ht(a[i].clone);l[i].$destroy();var p=f[i]=e.leave(h);p.then(c(f,i))}a.length=0,l.length=0,(u=s.cases["!"+r]||s.cases["?"])&&x(u,function(n){n.transclude(function(r,i){l.push(i);var s=n.element;r[r.length++]=t.createComment(" end ngSwitchWhen: ");var o={clone:r};a.push(o),e.enter(r,s.parent(),s)})})})}}}],Ho=hs({transclude:"element"
,priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),Bo=hs({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),jo=hs({restrict:"EAC",link:function(e,t,n,i,s){if(!s)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}"
,dt(t));s(function(e){t.empty(),t.append(e)})}}),Fo=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if(n.type=="text/ng-template"){var r=n.id,i=t[0].text;e.put(r,i)}}}}],Io=r("ngOptions"),qo=P({restrict:"A",terminal:!0}),Ro=["$compile","$parse",function(e,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/
,s={$setViewValue:_};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r=this,i={},o=s,u,a;r.databound=n.ngModel,r.init=function(e,t,n){o=e,u=t,a=n},r.addOption=function(t,n){Dt(t,'"option value"'),i[t]=!0,o.$viewValue==t&&(e.val(t),a.parent()&&a.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},r.removeOption=function(e){this.hasOption(e)&&(delete i[e],o.$viewValue===e&&this.renderUnknownOption(e))},r.renderUnknownOption=
function(t){var n="? "+jn(t)+" ?";a.val(n),e.prepend(a),e.val(n),a.prop("selected",!0)},r.hasOption=function(e){return i.hasOwnProperty(e)},t.$on("$destroy",function(){r.renderUnknownOption=_})}],link:function(s,o,u,a){function C(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(w.parent()&&w.remove(),t.val(e),e===""&&m.prop("selected",!0)):H(e)&&m?t.val(""):r.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){w.parent()&&w.remove(),n.$setViewValue(t.val())})})}function k
(e,t,n){var r;n.$render=function(){var e=new Fn(n.$viewValue);x(t.find("option"),function(t){t.selected=B(e.get(t.value))})},e.$watch(function(){ot(r,n.$viewValue)||(r=st(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];x(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function L(t,s,o){function M(e,n,r){return O[l]=r,w&&(O[w]=n),e(t,O)}function _(){t.$apply(function(){var e=N(t)||[],n;if(p)n=[],x(s.val(),function(t){t=k?L[t]:t,n
.push(D(t,e[t]))});else{var r=k?L[s.val()]:s.val();n=D(r,e[r])}o.$setViewValue(n),I()})}function D(e,t){if(e==="?")return n;if(e==="")return null;var r=m?m:S;return M(r,e,t)}function P(){var e=N(t),n;if(e&&R(e)){n=new Array(e.length);for(var r=0,i=e.length;r<i;r++)n[r]=M(a,r,e[r]);return n}if(e){n={};for(var s in e)e.hasOwnProperty(s)&&(n[s]=M(a,s,e[s]))}return n}function H(e){var t;if(p)if(k&&R(e)){t=new Fn([]);for(var n=0;n<e.length;n++)t.put(M(k,null,e[n]),!0)}else t=new Fn(e);else k&&(e=M(k,null
,e));return function(r,i){var s;return k?s=k:m?s=m:s=S,p?B(t.remove(M(s,r,i))):e===M(s,r,i)}}function j(){g||(t.$$postDigest(I),g=!0)}function F(e,t,n){e[t]=e[t]||0,e[t]+=n?1:-1}function I(){g=!1;var e={"":[]},n=[""],r,i,u,l,h,d,m=o.$viewValue,S=N(t)||[],C=w?T(S):S,_,D,P,j,I,q,R={},U,z=H(m),W=!1,X,V,$,J;L={};for(q=0;j=C.length,q<j;q++){_=q;if(w){_=C[q];if(_.charAt(0)==="$")continue}D=S[_],r=M(E,_,D)||"",(i=e[r])||(i=e[r]=[],n.push(r)),U=z(_,D),W=W||U,$=M(a,_,D),$=B($)?$:"",J=k?k(t,O):w?C[q]:q,k&&
(L[J]=_),i.push({id:J,label:$,selected:U})}p||(v||m===null?e[""].unshift({id:"",label:"",selected:!W}):W||e[""].unshift({id:"?",label:"",selected:!0}));for(I=0,P=n.length;I<P;I++){r=n[I],i=e[r],A.length<=I?(l={element:b.clone().attr("label",r),label:i.label},h=[l],A.push(h),s.append(l.element)):(h=A[I],l=h[0],l.label!=r&&l.element.attr("label",l.label=r)),X=null;for(q=0,j=i.length;q<j;q++)u=i[q],(d=h[q+1])?(X=d.element,d.label!==u.label&&(F(R,d.label,!1),F(R,u.label,!0),X.text(d.label=u.label),X.
prop("label",d.label)),d.id!==u.id&&X.val(d.id=u.id),X[0].selected!==u.selected&&(X.prop("selected",d.selected=u.selected),c&&X.prop("selected",d.selected))):(u.id===""&&v?V=v:(V=y.clone()).val(u.id).prop("selected",u.selected).attr("selected",u.selected).prop("label",u.label).text(u.label),h.push(d={element:V,label:u.label,id:u.id,selected:u.selected}),F(R,u.label,!0),X?X.after(V):l.element.append(V),X=V);q++;while(h.length>q)u=h.pop(),F(R,u.label,!1),u.element.remove()}while(A.length>I){i=A.pop
();for(q=1;q<i.length;++q)F(R,i[q].label,!1);i[0].element.remove()}x(R,function(e,t){e>0?f.addOption(t):e<0&&f.removeOption(t)})}var u;if(!(u=d.match(i)))throw Io("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",d,dt(s));var a=r(u[2]||u[1]),l=u[4]||u[6],h=/ as /.test(u[0])&&u[1],m=h?r(h):null,w=u[5],E=r(u[3]||""),S=r(u[2]?u[1]:l),N=r(u[7]),C=u[8],k=C?r(u[8]):null,L={},A=[[{element:s,label:""}]],O={};v&&(e(v)(t),v.removeClass
("ng-scope"),v.remove()),s.empty(),s.on("change",_),o.$render=I,t.$watchCollection(N,j),t.$watchCollection(P,j),p&&t.$watchCollection(function(){return o.$modelValue},j)}if(!a[1])return;var f=a[0],l=a[1],p=u.multiple,d=u.ngOptions,v=!1,m,g=!1,y=h(t.createElement("option")),b=h(t.createElement("optgroup")),w=y.clone();for(var E=0,S=o.children(),N=S.length;E<N;E++)if(S[E].value===""){m=v=S.eq(E);break}f.init(l,v,w),p&&(l.$isEmpty=function(e){return!e||e.length===0}),d?L(s,o,l):p?k(s,o,l):C(s,o,l,f)
}}}],Uo=["$interpolate",function(e){var t={addOption:_,removeOption:_};return{restrict:"E",priority:100,compile:function(n,r){if(H(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var s="$selectController",o=n.parent(),u=o.data(s)||o.parent().data(s);if(!u||!u.databound)u=t;i?e.$watch(i,function(t,i){r.$set("value",t),i!==t&&u.removeOption(i),u.addOption(t,n)}):u.addOption(r.value,n),n.on("$destroy",function(){u.removeOption(r.value)})}}}}],zo=P({restrict:"E",terminal
:!1}),Wo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(!r)return;n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()})}}},Xo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,i,s){if(!s)return;var o,u=i.ngPattern||i.pattern;i.$observe("pattern",function(e){F(e)&&e.length>0&&(e=new RegExp("^"+e+"$"));if(e&&!e.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}"
,u,e,dt(t));o=e||n,s.$validate()}),s.$validators.pattern=function(e){return s.$isEmpty(e)||H(o)||o.test(e)}}}},Vo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(!r)return;var i=-1;n.$observe("maxlength",function(e){var t=O(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}},$o=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(!r)return;var i=0;n.$observe("minlength",function(e){i=
O(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}};if(e.angular.bootstrap){console.log("WARNING: Tried to load angular more than once.");return}Ot(),Vt(b),h(t).ready(function(){St(t,xt)})}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'
),define("angular",["jquery"],function(e){return function(){var t,n;return t||e.angular}}(this)),function(e,t,n){"use strict";function r(e){var n=[];return a(n,t.noop).chars(e),n.join("")}function i(e){var t={};e=e.split(",");var n;for(n=0;n<e.length;n++)t[e[n]]=!0;return t}function s(e,n){function r(e,r,s,u){r=t.lowercase(r);if(S[r])for(;a.last()&&x[a.last()];)i("",a.last());E[r]&&a.last()==r&&i("",r),(u=w[r]||!!u)||a.push(r);var f={};s.replace(h,function(e,t,n,r,i){f[t]=o(n||r||i||"")}),n.start&&
n.start(r,f,u)}function i(e,r){var i=0,s;if(r=t.lowercase(r))for(i=a.length-1;0<=i&&a[i]!=r;i--);if(0<=i){for(s=a.length-1;s>=i;s--)n.end&&n.end(a[s]);a.length=i}}"string"!=typeof e&&(e=null===e||"undefined"==typeof e?"":""+e);var s,u,a=[],y=e,b;for(a.last=function(){return a[a.length-1]};e;){b="",u=!0;if(a.last()&&T[a.last()])e=e.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+a.last()+"[^>]*>","i"),function(e,t){return t=t.replace(v,"$1").replace(g,"$1"),n.chars&&n.chars(o(t)),""}),i("",a.last());
else{if(0===e.indexOf("<!--"))s=e.indexOf("--",4),0<=s&&e.lastIndexOf("-->",s)===s&&(n.comment&&n.comment(e.substring(4,s)),e=e.substring(s+3),u=!1);else if(m.test(e)){if(s=e.match(m))e=e.replace(s[0],""),u=!1}else if(d.test(e)){if(s=e.match(c))e=e.substring(s[0].length),s[0].replace(c,i),u=!1}else p.test(e)&&((s=e.match(l))?(s[4]&&(e=e.substring(s[0].length),s[0].replace(l,r)),u=!1):(b+="<",e=e.substring(1)));u&&(s=e.indexOf("<"),b+=0>s?e:e.substring(0,s),e=0>s?"":e.substring(s),n.chars&&n.chars
(o(b)))}if(e==y)throw f("badparse",e);y=e}i()}function o(e){return e?(L.innerHTML=e.replace(/</g,"&lt;"),L.textContent):""}function u(e){return e.replace(/&/g,"&amp;").replace(y,function(e){var t=e.charCodeAt(0);return e=e.charCodeAt(1),"&#"+(1024*(t-55296)+(e-56320)+65536)+";"}).replace(b,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function a(e,n){var r=!1,i=t.bind(e,e.push);return{start:function(e,s,o){e=t.lowercase(e),!r&&T[e]&&(r=e),r||!0!==N[e]||(i("<"
),i(e),t.forEach(s,function(r,s){var o=t.lowercase(s),a="img"===e&&"src"===o||"background"===o;!0!==k[o]||!0===C[o]&&!n(r,a)||(i(" "),i(s),i('="'),i(u(r)),i('"'))}),i(o?"/>":">"))},end:function(e){e=t.lowercase(e),r||!0!==N[e]||(i("</"),i(e),i(">")),e==r&&(r=!1)},chars:function(e){r||i(u(e))}}}var f=t.$$minErr("$sanitize"),l=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,c=/^<\/\s*([\w:-]+)[^>]*>/,h=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g
,p=/^</,d=/^<\//,v=/\x3c!--(.*?)--\x3e/g,m=/<!DOCTYPE([^>]*?)>/i,g=/<!\[CDATA\[(.*?)]]\x3e/g,y=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/([^\#-~| |!])/g,w=i("area,br,col,hr,img,wbr");e=i("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),n=i("rp,rt");var E=t.extend({},n,e),S=t.extend({},e,i("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),x=t.extend({},n,i("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var"
));e=i("animate,animateColor,animateMotion,animateTransform,circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,set,stop,svg,switch,text,title,tspan,use");var T=i("script,style"),N=t.extend({},w,S,x,E,e),C=i("background,cite,href,longdesc,src,usemap,xlink:href");e=i("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"
),n=i("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,attributeName,attributeType,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan"
);var k=t.extend({},C,n,e),L=document.createElement("pre");t.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(e){return function(t){var n=[];return s(t,a(n,function(t,n){return!/^unsafe/.test(e(t,n))})),n.join("")}}]}),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/,i=/^mailto:/;return function(s,o){function u(e){e&&c.push(r(e))}function a(e,n){c
.push("<a "),t.isDefined(o)&&c.push('target="',o,'" '),c.push('href="',e.replace(/"/g,"&quot;"),'">'),u(n),c.push("</a>")}if(!s)return s;for(var f,l=s,c=[],h,p;f=l.match(n);)h=f[0],f[2]||f[4]||(h=(f[3]?"http://":"mailto:")+h),p=f.index,u(l.substr(0,p)),a(h,f[0].replace(i,"")),l=l.substring(p+f[0].length);return u(l),e(c.join(""))}}])}(window,window.angular),define("angular-sanitize",["angular"],function(){}),function(e,t,n){"use strict";t.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(
){return function(e,n,r){r=r.ngAnimateChildren,t.isString(r)&&0===r.length?n.data("$$ngAnimateChildren",!0):e.$watch(r,function(e){n.data("$$ngAnimateChildren",!!e)})}}).factory("$$animateReflow",["$$rAF","$document",function(e,t){return function(t){return e(function(){t()})}}]).config(["$provide","$animateProvider",function(r,i){function s(e){for(var t=0;t<e.length;t++){var n=e[t];if(1==n.nodeType)return n}}function o(e,t){return s(e)==s(t)}var u=t.noop,a=t.forEach,l=i.$$selectors,c=t.isArray,h=
t.isString,p=t.isObject,d={running:!0},v;r.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest","$$jqLite",function(e,n,r,m,y,b,w,E,S,x){function T(e,t){var n=e.data("$$ngAnimateState")||{};return t&&(n.running=!0,n.structural=!0,e.data("$$ngAnimateState",n)),n.disabled||n.running&&n.structural}function N(e){var t,r=n.defer();return r.promise.$$cancelFn=function(){t&&t()},w.$$postDigest(function(){t=e(function(
){r.resolve()})}),r.promise}function k(e){if(p(e))return e.tempClasses&&h(e.tempClasses)&&(e.tempClasses=e.tempClasses.split(/\s+/)),e}function L(e,t,n){n=n||{};var r={};a(n,function(e,t){a(t.split(" "),function(t){r[t]=e})});var i=Object.create(null);a((e.attr("class")||"").split(/\s+/),function(e){i[e]=!0});var s=[],o=[];return a(t&&t.classes||[],function(e,t){var n=i[t],u=r[t]||{};!1===e?(n||"addClass"==u.event)&&o.push(t):!0===e&&(n&&"removeClass"!=u.event||s.push(t))}),0<s.length+o.length&&[
s.join(" "),o.join(" ")]}function A(e){if(e){var t=[],n={};e=e.substr(1).split("."),(m.transitions||m.animations)&&t.push(r.get(l[""]));for(var i=0;i<e.length;i++){var s=e[i],o=l[s];o&&!n[s]&&(t.push(r.get(o)),n[s]=!0)}return t}}function O(e,n,r,i){function s(e,t){var n=e[t],r=e["before"+t.charAt(0).toUpperCase()+t.substr(1)];if(n||r)return"leave"==t&&(r=n,n=null),S.push({event:t,fn:n}),b.push({event:t,fn:r}),!0}function o(t,n,s){var o=[];a(t,function(e){e.fn&&o.push(e)});var f=0;a(o,function(t,a
){var l=function(){e:{if(n){(n[a]||u)();if(++f<o.length)break e;n=null}s()}};switch(t.event){case"setClass":n.push(t.fn(e,h,p,l,i));break;case"animate":n.push(t.fn(e,r,i.from,i.to,l));break;case"addClass":n.push(t.fn(e,h||r,l,i));break;case"removeClass":n.push(t.fn(e,p||r,l,i));break;default:n.push(t.fn(e,l,i))}}),n&&0===n.length&&s()}var l=e[0];if(l){i&&(i.to=i.to||{},i.from=i.from||{});var h,p;c(r)&&(h=r[0],p=r[1],h?p?r=h+" "+p:(r=h,n="addClass"):(r=p,n="removeClass"));var d="setClass"==n,v=d||"addClass"==
n||"removeClass"==n||"animate"==n,m=e.attr("class")+" "+r;if(F(m)){var g=u,y=[],b=[],w=u,E=[],S=[],m=(" "+m).replace(/\s+/g,".");return a(A(m),function(e){!s(e,n)&&d&&(s(e,"addClass"),s(e,"removeClass"))}),{node:l,event:n,className:r,isClassBased:v,isSetClassOperation:d,applyStyles:function(){i&&e.css(t.extend(i.from||{},i.to||{}))},before:function(e){g=e,o(b,y,function(){g=u,e()})},after:function(e){w=e,o(S,E,function(){w=u,e()})},cancel:function(){y&&(a(y,function(e){(e||u)(!0)}),g(!0)),E&&(a(E
,function(e){(e||u)(!0)}),w(!0))}}}}}function M(e,n,r,i,s,o,l,c){function h(t){var i="$animate:"+t;w&&w[i]&&0<w[i].length&&b(function(){r.triggerHandler(i,{event:e,className:n})})}function p(){h("before")}function d(){h("after")}function m(){m.hasBeenRun||(m.hasBeenRun=!0,o())}function g(){if(!g.hasBeenRun){y&&y.applyStyles(),g.hasBeenRun=!0,l&&l.tempClasses&&a(l.tempClasses,function(e){v.removeClass(r,e)});var t=r.data("$$ngAnimateState");t&&(y&&y.isClassBased?D(r,n):(b(function(){var t=r.data("$$ngAnimateState"
)||{};N==t.index&&D(r,n,e)}),r.data("$$ngAnimateState",t))),h("close"),c()}}var y=O(r,e,n,l);if(!y)return m(),p(),d(),g(),u;e=y.event,n=y.className;var w=t.element._data(y.node),w=w&&w.events;i||(i=s?s.parent():r.parent());if(P(r,i))return m(),p(),d(),g(),u;i=r.data("$$ngAnimateState")||{};var E=i.active||{},S=i.totalActive||0,x=i.last;s=!1;if(0<S){S=[];if(y.isClassBased)"setClass"==x.event?(S.push(x),D(r,n)):E[n]&&(T=E[n],T.event==e?s=!0:(S.push(T),D(r,n)));else if("leave"==e&&E["ng-leave"])s=!0
;else{for(var T in E)S.push(E[T]);i={},D(r,!0)}0<S.length&&a(S,function(e){e.cancel()})}!y.isClassBased||y.isSetClassOperation||"animate"==e||s||(s="addClass"==e==r.hasClass(n));if(s)return m(),p(),d(),h("close"),c(),u;E=i.active||{},S=i.totalActive||0,"leave"==e&&r.one("$destroy",function(e){e=t.element(this);var n=e.data("$$ngAnimateState");n&&(n=n.active["ng-leave"])&&(n.cancel(),D(e,"ng-leave"))}),v.addClass(r,"ng-animate"),l&&l.tempClasses&&a(l.tempClasses,function(e){v.addClass(r,e)});var N=
B++;return S++,E[n]=y,r.data("$$ngAnimateState",{last:y,active:E,index:N,totalActive:S}),p(),y.before(function(t){var i=r.data("$$ngAnimateState");t=t||!i||!i.active[n]||y.isClassBased&&i.active[n].event!=e,m(),!0===t?g():(d(),y.after(g))}),y.cancel}function _(e){if(e=s(e))e=t.isFunction(e.getElementsByClassName)?e.getElementsByClassName("ng-animate"):e.querySelectorAll(".ng-animate"),a(e,function(e){e=t.element(e),(e=e.data("$$ngAnimateState"))&&e.active&&a(e.active,function(e){e.cancel()})})}function D
(e,t){if(o(e,y))d.disabled||(d.running=!1,d.structural=!1);else if(t){var n=e.data("$$ngAnimateState")||{},r=!0===t;!r&&n.active&&n.active[t]&&(n.totalActive--,delete n.active[t]);if(r||!n.totalActive)v.removeClass(e,"ng-animate"),e.removeData("$$ngAnimateState")}}function P(e,n){if(d.disabled)return!0;if(o(e,y))return d.running;var r,i,s;do{if(0===n.length)break;var u=o(n,y),a=u?d:n.data("$$ngAnimateState")||{};if(a.disabled)return!0;u&&(s=!0),!1!==r&&(u=n.data("$$ngAnimateChildren"),t.isDefined
(u)&&(r=u)),i=i||a.running||a.last&&!a.last.isClassBased}while(n=n.parent());return!s||!r&&i}v=x,y.data("$$ngAnimateState",d);var H=w.$watch(function(){return S.totalPendingRequests},function(e,t){0===e&&(H(),w.$$postDigest(function(){w.$$postDigest(function(){d.running=!1})}))}),B=0,j=i.classNameFilter(),F=j?function(e){return j.test(e)}:function(){return!0};return{animate:function(e,n,r,i,o){return i=i||"ng-inline-animate",o=k(o)||{},o.from=r?n:null,o.to=r?r:n,N(function(n){return M("animate",i
,t.element(s(e)),null,null,u,o,n)})},enter:function(n,r,i,o){return o=k(o),n=t.element(n),r=r&&t.element(r),i=i&&t.element(i),T(n,!0),e.enter(n,r,i),N(function(e){return M("enter","ng-enter",t.element(s(n)),r,i,u,o,e)})},leave:function(n,r){return r=k(r),n=t.element(n),_(n),T(n,!0),N(function(i){return M("leave","ng-leave",t.element(s(n)),null,null,function(){e.leave(n)},r,i)})},move:function(n,r,i,o){return o=k(o),n=t.element(n),r=r&&t.element(r),i=i&&t.element(i),_(n),T(n,!0),e.move(n,r,i),N(function(
e){return M("move","ng-move",t.element(s(n)),r,i,u,o,e)})},addClass:function(e,t,n){return this.setClass(e,t,[],n)},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},setClass:function(n,r,i,o){o=k(o),n=t.element(n),n=t.element(s(n));if(T(n))return e.$$setClassImmediately(n,r,i,o);var u,l=n.data("$$animateClasses"),h=!!l;return l||(l={classes:{}}),u=l.classes,r=c(r)?r:r.split(" "),a(r,function(e){e&&e.length&&(u[e]=!0)}),i=c(i)?i:i.split(" "),a(i,function(e){e&&e.length&&(u[e]=!1)}),h?(o&&
l.options&&(l.options=t.extend(l.options||{},o)),l.promise):(n.data("$$animateClasses",l={classes:u,options:o}),l.promise=N(function(t){var r=n.parent(),i=s(n),o=i.parentNode;if(!(!o||o.$$NG_REMOVED||i.$$NG_REMOVED)){i=n.data("$$animateClasses"),n.removeData("$$animateClasses");var o=n.data("$$ngAnimateState")||{},u=L(n,i,o.active);return u?M("setClass",u,n,r,null,function(){u[0]&&e.$$addClassImmediately(n,u[0]),u[1]&&e.$$removeClassImmediately(n,u[1])},i.options,t):t()}t()}))},cancel:function(e)
{e.$$cancelFn()},enabled:function(e,t){switch(arguments.length){case 2:if(e)D(t);else{var n=t.data("$$ngAnimateState")||{};n.disabled=!0,t.data("$$ngAnimateState",n)}break;case 1:d.disabled=!e;break;default:e=!d.disabled}return!!e}}}]),i.register("",["$window","$sniffer","$timeout","$$animateReflow",function(r,i,o,l){function p(){F||(F=l(function(){j=[],F=null,H={}}))}function d(e,t){F&&F(),j.push(t),F=l(function(){a(j,function(e){e()}),j=[],F=null,H={}})}function m(e,n){var r=s(e);e=t.element(r)
,R.push(e),r=Date.now()+n,r<=q||(o.cancel(I),q=r,I=o(function(){y(R),R=[]},n,!1))}function y(e){a(e,function(e){(e=e.data("$$ngAnimateCSS3Data"))&&a(e.closeAnimationFns,function(e){e()})})}function b(e,t){var n=t?H[t]:null;if(!n){var i=0,s=0,o=0,u=0;a(e,function(e){if(1==e.nodeType){e=r.getComputedStyle(e)||{},i=Math.max(w(e[M+"Duration"]),i),s=Math.max(w(e[M+"Delay"]),s),u=Math.max(w(e[D+"Delay"]),u);var t=w(e[D+"Duration"]);0<t&&(t*=parseInt(e[D+"IterationCount"],10)||1),o=Math.max(t,o)}}),n={total
:0,transitionDelay:s,transitionDuration:i,animationDelay:u,animationDuration:o},t&&(H[t]=n)}return n}function w(e){var t=0;return e=h(e)?e.split(/\s*,\s*/):[],a(e,function(e){t=Math.max(parseFloat(e)||0,t)}),t}function E(e,t,n,r){e=0<=["ng-enter","ng-leave","ng-move"].indexOf(n);var i,o=t.parent(),u=o.data("$$ngAnimateKey");u||(o.data("$$ngAnimateKey",++B),u=B),i=u+"-"+s(t).getAttribute("class");var o=i+" "+n,u=H[o]?++H[o].total:0,a={};if(0<u){var f=n+"-stagger",a=i+" "+f;(i=!H[a])&&v.addClass(t,
f),a=b(t,a),i&&v.removeClass(t,f)}v.addClass(t,n);var f=t.data("$$ngAnimateCSS3Data")||{},l=b(t,o);return i=l.transitionDuration,l=l.animationDuration,e&&0===i&&0===l?(v.removeClass(t,n),!1):(n=r||e&&0<i,e=0<l&&0<a.animationDelay&&0===a.animationDuration,t.data("$$ngAnimateCSS3Data",{stagger:a,cacheKey:o,running:f.running||0,itemIndex:u,blockTransition:n,closeAnimationFns:f.closeAnimationFns||[]}),o=s(t),n&&(x(o,!0),r&&t.css(r)),e&&(o.style[D+"PlayState"]="paused"),!0)}function S(e,t,n,r,i){function u
(){t.off(k,f),v.removeClass(t,c),v.removeClass(t,h),A&&o.cancel(A),L(t,n);var e=s(t),r;for(r in p)e.style.removeProperty(p[r])}function f(e){e.stopPropagation();var t=e.originalEvent||e;e=t.$manualTimeStamp||t.timeStamp||Date.now(),t=parseFloat(t.elapsedTime.toFixed(3)),Math.max(e-C,0)>=N&&t>=T&&r()}var l=s(t);e=t.data("$$ngAnimateCSS3Data");if(-1!=l.getAttribute("class").indexOf(n)&&e){var c="",h="";a(n.split(" "),function(e,t){var n=(0<t?" ":"")+e;c+=n+"-active",h+=n+"-pending"});var p=[],d=e.itemIndex
,y=e.stagger,w=0;if(0<d){w=0,0<y.transitionDelay&&0===y.transitionDuration&&(w=y.transitionDelay*d);var E=0;0<y.animationDelay&&0===y.animationDuration&&(E=y.animationDelay*d,p.push(O+"animation-play-state")),w=Math.round(100*Math.max(w,E))/100}w||(v.addClass(t,c),e.blockTransition&&x(l,!1));var S=b(t,e.cacheKey+" "+c),T=Math.max(S.transitionDuration,S.animationDuration);if(0!==T){!w&&i&&0<Object.keys(i).length&&(S.transitionDuration||(t.css("transition",S.animationDuration+"s linear all"),p.push
("transition")),t.css(i));var d=Math.max(S.transitionDelay,S.animationDelay),N=1e3*d;0<p.length&&(y=l.getAttribute("style")||"",";"!==y.charAt(y.length-1)&&(y+=";"),l.setAttribute("style",y+" "));var C=Date.now(),k=P+" "+_,d=1e3*(w+1.5*(d+T)),A;return 0<w&&(v.addClass(t,h),A=o(function(){A=null,0<S.transitionDuration&&x(l,!1),0<S.animationDuration&&(l.style[D+"PlayState"]=""),v.addClass(t,c),v.removeClass(t,h),i&&(0===S.transitionDuration&&t.css("transition",S.animationDuration+"s linear all"),t.
css(i),p.push("transition"))},1e3*w,!1)),t.on(k,f),e.closeAnimationFns.push(function(){u(),r()}),e.running++,m(t,d),u}v.removeClass(t,c),L(t,n),r()}else r()}function x(e,t){e.style[M+"Property"]=t?"none":""}function T(e,t,n,r){if(E(e,t,n,r))return function(e){e&&L(t,n)}}function C(e,t,n,r,i){if(t.data("$$ngAnimateCSS3Data"))return S(e,t,n,r,i);L(t,n),r()}function k(e,t,n,r,i){var s=T(e,t,n,i.from);if(s){var o=s;return d(t,function(){o=C(e,t,n,r,i.to)}),function(e){(o||u)(e)}}p(),r()}function L(e,
t){v.removeClass(e,t);var n=e.data("$$ngAnimateCSS3Data");n&&(n.running&&n.running--,n.running&&0!==n.running||e.removeData("$$ngAnimateCSS3Data"))}function A(e,t){var n="";return e=c(e)?e:e.split(/\s+/),a(e,function(e,r){e&&0<e.length&&(n+=(0<r?" ":"")+e+t)}),n}var O="",M,_,D,P;e.ontransitionend===n&&e.onwebkittransitionend!==n?(O="-webkit-",M="WebkitTransition",_="webkitTransitionEnd transitionend"):(M="transition",_="transitionend"),e.onanimationend===n&&e.onwebkitanimationend!==n?(O="-webkit-"
,D="WebkitAnimation",P="webkitAnimationEnd animationend"):(D="animation",P="animationend");var H={},B=0,j=[],F,I=null,q=0,R=[];return{animate:function(e,t,n,r,i,s){return s=s||{},s.from=n,s.to=r,k("animate",e,t,i,s)},enter:function(e,t,n){return n=n||{},k("enter",e,"ng-enter",t,n)},leave:function(e,t,n){return n=n||{},k("leave",e,"ng-leave",t,n)},move:function(e,t,n){return n=n||{},k("move",e,"ng-move",t,n)},beforeSetClass:function(e,t,n,r,i){i=i||{},t=A(n,"-remove")+" "+A(t,"-add");if(i=T("setClass"
,e,t,i.from))return d(e,r),i;p(),r()},beforeAddClass:function(e,t,n,r){r=r||{};if(t=T("addClass",e,A(t,"-add"),r.from))return d(e,n),t;p(),n()},beforeRemoveClass:function(e,t,n,r){r=r||{};if(t=T("removeClass",e,A(t,"-remove"),r.from))return d(e,n),t;p(),n()},setClass:function(e,t,n,r,i){return i=i||{},n=A(n,"-remove"),t=A(t,"-add"),C("setClass",e,n+" "+t,r,i.to)},addClass:function(e,t,n,r){return r=r||{},C("addClass",e,A(t,"-add"),n,r.to)},removeClass:function(e,t,n,r){return r=r||{},C("removeClass"
,e,A(t,"-remove"),n,r.to)}}}])}])}(window,window.angular),define("angular-animate",["angular"],function(){}),angular.module("pascalprecht.translate",["ng"]).run(["$translate",function(e){var t=e.storageKey(),n=e.storage(),r=function(){var r=e.preferredLanguage();angular.isString(r)?e.use(r):n.put(t,e.use())};n?n.get(t)?e.use(n.get(t))["catch"](r):r():angular.isString(e.preferredLanguage())&&e.use(e.preferredLanguage())}]),angular.module("pascalprecht.translate").provider("$translate",["$STORAGE_KEY"
,"$windowProvider",function(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g={},y=[],b=e,w=[],E=!1,S="translate-cloak",x=!1,T=".",N=0,C="2.6.1",k=function(){var e,n,r=t.$get().navigator,i=["language","browserLanguage","systemLanguage","userLanguage"];if(angular.isArray(r.languages))for(e=0;e<r.languages.length;e++)if(n=r.languages[e],n&&n.length)return n;for(e=0;e<i.length;e++)if(n=r[i[e]],n&&n.length)return n;return null};k.displayName="angular-translate/service: getFirstBrowserLanguage";var L=function(
){return(k()||"").split("-").join("_")};L.displayName="angular-translate/service: getLocale";var A=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},O=function(){return this.replace(/^\s+|\s+$/g,"")},M=function(e){for(var t=[],n=angular.lowercase(e),i=0,s=y.length;s>i;i++)t.push(angular.lowercase(y[i]));if(A(t,n)>-1)return e;if(r){var o;for(var u in r){var a=!1,f=Object.prototype.hasOwnProperty.call(r,u)&&angular.lowercase(u)===angular.lowercase(e);if("*"===u.slice(-1)&&
(a=u.slice(0,-1)===e.slice(0,u.length-1)),(f||a)&&(o=r[u],A(t,angular.lowercase(o))>-1))return o}}var l=e.split("_");return l.length>1&&A(t,angular.lowercase(l[0]))>-1?l[0]:e},_=function(e,t){if(!e&&!t)return g;if(e&&!t){if(angular.isString(e))return g[e]}else angular.isObject(g[e])||(g[e]={}),angular.extend(g[e],D(t));return this};this.translations=_,this.cloakClassName=function(e){return e?(S=e,this):S};var D=function(e,t,n,r){var i,s,o,u;t||(t=[]),n||(n={});for(i in e)Object.prototype.hasOwnProperty
.call(e,i)&&(u=e[i],angular.isObject(u)?D(u,t.concat(i),n,i):(s=t.length?""+t.join(T)+T+i:i,t.length&&i===r&&(o=""+t.join(T),n[o]="@:"+s),n[s]=u));return n};this.addInterpolation=function(e){return w.push(e),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(e){return c=e,this},this.useSanitizeValueStrategy=function(e){return E=e,this},this.preferredLanguage=function(e){return P(e),this};var P=function(
e){return e&&(n=e),n};this.translationNotFoundIndicator=function(e){return this.translationNotFoundIndicatorLeft(e),this.translationNotFoundIndicatorRight(e),this},this.translationNotFoundIndicatorLeft=function(e){return e?(d=e,this):d},this.translationNotFoundIndicatorRight=function(e){return e?(v=e,this):v},this.fallbackLanguage=function(e){return H(e),this};var H=function(e){return e?(angular.isString(e)?(s=!0,i=[e]):angular.isArray(e)&&(s=!1,i=e),angular.isString(n)&&A(i,n)<0&&i.push(n),this)
:s?i[0]:i};this.use=function(e){if(e){if(!g[e]&&!h)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+e+"'");return o=e,this}return o};var B=function(e){return e?void (b=e):f?f+b:b};this.storageKey=B,this.useUrlLoader=function(e,t){return this.useLoader("$translateUrlLoader",angular.extend({url:e},t))},this.useStaticFilesLoader=function(e){return this.useLoader("$translateStaticFilesLoader",e)},this.useLoader=function(e,t){return h=e,p=t||{},this},this.useLocalStorage=
function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(e){return a=e,this},this.storagePrefix=function(e){return e?(f=e,this):e},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(e){return l=e,this},this.usePostCompiling=function(e){return x=!!e,this},this.determinePreferredLanguage=
function(e){var t=e&&angular.isFunction(e)?e():L();return n=y.length?M(t):t,this},this.registerAvailableLanguageKeys=function(e,t){return e?(y=e,t&&(r=t),this):y},this.useLoaderCache=function(e){return e===!1?m=void 0:e===!0?m=!0:"undefined"==typeof e?m="$translationCache":e&&(m=e),this},this.directivePriority=function(e){return void 0===e?N:(N=e,this)},this.$get=["$log","$injector","$rootScope","$q",function(e,t,r,f){var y,T,k,L=t.get(c||"$translateDefaultInterpolation"),j=!1,R={},U={},W=function(
e,t,r,s){if(angular.isArray(e)){var u=function(e){for(var n={},i=[],o=function(e){var i=f.defer(),o=function(t){n[e]=t,i.resolve([e,t])};return W(e,t,r,s).then(o,o),i.promise},u=0,a=e.length;a>u;u++)i.push(o(e[u]));return f.all(i).then(function(){return n})};return u(e)}var l=f.defer();e&&(e=O.apply(e));var c=function(){var e=n?U[n]:U[o];if(T=0,a&&!e){var t=y.get(b);if(e=U[t],i&&i.length){var r=A(i,t);T=0===r?1:0,A(i,n)<0&&i.push(n)}}return e}();return c?c.then(function(){st(e,t,r,s).then(l.resolve
,l.reject)},l.reject):st(e,t,r,s).then(l.resolve,l.reject),l.promise},X=function(e){return d&&(e=[d,e].join(" ")),v&&(e=[e,v].join(" ")),e},V=function(e){o=e,r.$emit("$translateChangeSuccess",{language:e}),a&&y.put(W.storageKey(),o),L.setLocale(o),angular.forEach(R,function(e,t){R[t].setLocale(o)}),r.$emit("$translateChangeEnd",{language:e})},$=function(e){if(!e)throw"No language key specified for loading.";var n=f.defer();r.$emit("$translateLoadingStart",{language:e}),j=!0;var i=m;"string"==typeof 
i&&(i=t.get(i));var s=angular.extend({},p,{key:e,$http:angular.extend({},{cache:i},p.$http)});return t.get(h)(s).then(function(t){var i={};r.$emit("$translateLoadingSuccess",{language:e}),angular.isArray(t)?angular.forEach(t,function(e){angular.extend(i,D(e))}):angular.extend(i,D(t)),j=!1,n.resolve({key:e,table:i}),r.$emit("$translateLoadingEnd",{language:e})},function(e){r.$emit("$translateLoadingError",{language:e}),n.reject(e),r.$emit("$translateLoadingEnd",{language:e})}),n.promise};if(a&&(y=
t.get(a),!y.get||!y.put))throw new Error("Couldn't use storage '"+a+"', missing get() or put() method!");angular.isFunction(L.useSanitizeValueStrategy)&&L.useSanitizeValueStrategy(E),w.length&&angular.forEach(w,function(e){var r=t.get(e);r.setLocale(n||o),angular.isFunction(r.useSanitizeValueStrategy)&&r.useSanitizeValueStrategy(E),R[r.getInterpolationIdentifier()]=r});var Q=function(e){var t=f.defer();return Object.prototype.hasOwnProperty.call(g,e)?t.resolve(g[e]):U[e]?U[e].then(function(e){_(e
.key,e.table),t.resolve(e.table)},t.reject):t.reject(),t.promise},Y=function(e,t,n,r){var i=f.defer();return Q(e).then(function(s){if(Object.prototype.hasOwnProperty.call(s,t)){r.setLocale(e);var u=s[t];"@:"===u.substr(0,2)?Y(e,u.substr(2),n,r).then(i.resolve,i.reject):i.resolve(r.interpolate(s[t],n)),r.setLocale(o)}else i.reject()},i.reject),i.promise},Z=function(e,t,n,r){var i,s=g[e];if(s&&Object.prototype.hasOwnProperty.call(s,t)){if(r.setLocale(e),i=r.interpolate(s[t],n),"@:"===i.substr(0,2))
return Z(e,i.substr(2),n,r);r.setLocale(o)}return i},et=function(e){if(l){var n=t.get(l)(e,o);return void 0!==n?n:e}return e},tt=function(e,t,n,r,s){var o=f.defer();if(e<i.length){var u=i[e];Y(u,t,n,r).then(o.resolve,function(){tt(e+1,t,n,r,s).then(o.resolve)})}else o.resolve(s?s:et(t));return o.promise},nt=function(e,t,n,r){var s;if(e<i.length){var o=i[e];s=Z(o,t,n,r),s||(s=nt(e+1,t,n,r))}return s},rt=function(e,t,n,r){return tt(k>0?k:T,e,t,n,r)},it=function(e,t,n){return nt(k>0?k:T,e,t,n)},st=function(
e,t,n,r){var s=f.defer(),u=o?g[o]:g,a=n?R[n]:L;if(u&&Object.prototype.hasOwnProperty.call(u,e)){var c=u[e];"@:"===c.substr(0,2)?W(c.substr(2),t,n,r).then(s.resolve,s.reject):s.resolve(a.interpolate(c,t))}else{var h;l&&!j&&(h=et(e)),o&&i&&i.length?rt(e,t,a,r).then(function(e){s.resolve(e)},function(e){s.reject(X(e))}):l&&!j&&h?s.resolve(r?r:h):r?s.resolve(r):s.reject(X(e))}return s.promise},ot=function(e,t,n){var r,s=o?g[o]:g,u=L;if(R&&Object.prototype.hasOwnProperty.call(R,n)&&(u=R[n]),s&&Object.
prototype.hasOwnProperty.call(s,e)){var a=s[e];r="@:"===a.substr(0,2)?ot(a.substr(2),t,n):u.interpolate(a,t)}else{var f;l&&!j&&(f=et(e)),o&&i&&i.length?(T=0,r=it(e,t,u)):r=l&&!j&&f?f:X(e)}return r};if(W.preferredLanguage=function(e){return e&&P(e),n},W.cloakClassName=function(){return S},W.fallbackLanguage=function(e){if(void 0!==e&&null!==e){if(H(e),h&&i&&i.length)for(var t=0,n=i.length;n>t;t++)U[i[t]]||(U[i[t]]=$(i[t]));W.use(W.use())}return s?i[0]:i},W.useFallbackLanguage=function(e){if(void 0!==
e&&null!==e)if(e){var t=A(i,e);t>-1&&(k=t)}else k=0},W.proposedLanguage=function(){return u},W.storage=function(){return y},W.use=function(e){if(!e)return o;var t=f.defer();r.$emit("$translateChangeStart",{language:e});var n=M(e);return n&&(e=n),g[e]||!h||U[e]?(t.resolve(e),V(e)):(u=e,U[e]=$(e).then(function(n){return _(n.key,n.table),t.resolve(n.key),V(n.key),u===e&&(u=void 0),n},function(e){u===e&&(u=void 0),r.$emit("$translateChangeError",{language:e}),t.reject(e),r.$emit("$translateChangeEnd"
,{language:e})})),t.promise},W.storageKey=function(){return B()},W.isPostCompilingEnabled=function(){return x},W.refresh=function(e){function t(){s.resolve(),r.$emit("$translateRefreshEnd",{language:e})}function n(){s.reject(),r.$emit("$translateRefreshEnd",{language:e})}if(!h)throw new Error("Couldn't refresh translation table, no loader registered!");var s=f.defer();if(r.$emit("$translateRefreshStart",{language:e}),e)g[e]?$(e).then(function(n){_(n.key,n.table),e===o&&V(o),t()},n):n();else{var u=
[],a={};if(i&&i.length)for(var l=0,c=i.length;c>l;l++)u.push($(i[l])),a[i[l]]=!0;o&&!a[o]&&u.push($(o)),f.all(u).then(function(e){angular.forEach(e,function(e){g[e.key]&&delete g[e.key],_(e.key,e.table)}),o&&V(o),t()})}return s.promise},W.instant=function(e,t,r){if(null===e||angular.isUndefined(e))return e;if(angular.isArray(e)){for(var s={},u=0,a=e.length;a>u;u++)s[e[u]]=W.instant(e[u],t,r);return s}if(angular.isString(e)&&e.length<1)return e;e&&(e=O.apply(e));var f,c=[];n&&c.push(n),o&&c.push(o
),i&&i.length&&(c=c.concat(i));for(var h=0,p=c.length;p>h;h++){var m=c[h];if(g[m]&&("undefined"!=typeof g[m][e]?f=ot(e,t,r):(d||v)&&(f=X(e))),"undefined"!=typeof f)break}return f||""===f||(f=L.interpolate(e,t),l&&!j&&(f=et(e))),f},W.versionInfo=function(){return C},W.loaderCache=function(){return m},W.directivePriority=function(){return N},h&&(angular.equals(g,{})&&W.use(W.use()),i&&i.length))for(var ut=function(e){return _(e.key,e.table),r.$emit("$translateChangeEnd",{language:e.key}),e},at=0,ft=
i.length;ft>at;at++)U[i[at]]=$(i[at]).then(ut);return W}]}]),angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",["$interpolate",function(e){var t,n={},r="default",i=null,s={escaped:function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=angular.isNumber(e[n])?e[n]:angular.element("<div></div>").text(e[n]).html());return t}},o=function(e){var t;return t=angular.isFunction(s[i])?s[i](e):e};return n.setLocale=function(e){t=e},n.getInterpolationIdentifier=
function(){return r},n.useSanitizeValueStrategy=function(e){return i=e,this},n.interpolate=function(t,n){return i&&(n=o(n)),e(t)(n||{})},n}]),angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",["$translate","$q","$interpolate","$compile","$parse","$rootScope",function(e,t,n,r,i,s){var o=function(){return this.replace(/^\s+|\s+$/g,"")};return{restrict:"AE",scope:!0,priority:e.directivePriority(),compile
:function(t,u){var l=u.translateValues?u.translateValues:void 0,h=u.translateInterpolation?u.translateInterpolation:void 0,p=t[0].outerHTML.match(/translate-value-+/i),v="^(.*)("+n.startSymbol()+".*"+n.endSymbol()+")(.*)",m="^(.*)"+n.startSymbol()+"(.*)"+n.endSymbol()+"(.*)";return function(t,y,b){t.interpolateParams={},t.preText="",t.postText="";var w={},E=function(e){if(angular.isFunction(E._unwatchOld)&&(E._unwatchOld(),E._unwatchOld=void 0),angular.equals(e,"")||!angular.isDefined(e)){var r=o
.apply(y.text()).match(v);if(angular.isArray(r)){t.preText=r[1],t.postText=r[3],w.translate=n(r[2])(t.$parent);var i=y.text().match(m);angular.isArray(i)&&i[2]&&i[2].length&&(E._unwatchOld=t.$watch(i[2],function(e){w.translate=e,L()}))}else w.translate=y.text().replace(/^\s+|\s+$/g,"")}else w.translate=e;L()},S=function(e){b.$observe(e,function(t){w[e]=t,L()})},x=!0;b.$observe("translate",function(e){"undefined"==typeof e?E(""):""===e&&x||(w.translate=e,L()),x=!1});for(var T in b)b.hasOwnProperty
(T)&&"translateAttr"===T.substr(0,13)&&S(T);if(b.$observe("translateDefault",function(e){t.defaultText=e}),l&&b.$observe("translateValues",function(e){e&&t.$parent.$watch(function(){angular.extend(t.interpolateParams,i(e)(t.$parent))})}),p){var N=function(e){b.$observe(e,function(n){var r=angular.lowercase(e.substr(14,1))+e.substr(15);t.interpolateParams[r]=n})};for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&"translateValue"===C.substr(0,14)&&"translateValues"!==C&&N(C)}var L=function(
){for(var e in w)w.hasOwnProperty(e)&&A(e,w[e],t,t.interpolateParams,t.defaultText)},A=function(t,n,r,i,s){n?e(n,i,h,s).then(function(e){O(e,r,!0,t)},function(e){O(e,r,!1,t)}):O(n,r,!1,t)},O=function(t,n,i,s){if("translate"===s){i||"undefined"==typeof n.defaultText||(t=n.defaultText),y.html(n.preText+t+n.postText);var o=e.isPostCompilingEnabled(),f="undefined"!=typeof u.translateCompile,l=f&&"false"!==u.translateCompile;(o&&!f||l)&&r(y.contents())(n)}else{i||"undefined"==typeof n.defaultText||(t=
n.defaultText);var c=b.$attr[s].substr(15);y.attr(c,t)}};t.$watch("interpolateParams",L,!0);var M=s.$on("$translateChangeSuccess",L);y.text().length&&E(""),L(),t.$on("$destroy",M)}}}}]),angular.module("pascalprecht.translate").directive("translateCloak",["$rootScope","$translate",function(e,t){return{compile:function(n){var r=function(){n.addClass(t.cloakClassName())},i=function(){n.removeClass(t.cloakClassName())},s=e.$on("$translateChangeEnd",function(){i(),s(),s=null});return r(),function(e,n,
s){s.translateCloak&&s.translateCloak.length&&s.$observe("translateCloak",function(e){t(e).then(i,r)})}}}}]),angular.module("pascalprecht.translate").filter("translate",["$parse","$translate",function(e,t){var n=function(n,r,i){return angular.isObject(r)||(r=e(r)(this)),t.instant(n,r,i)};return n.$stateful=!0,n}]),define("angular-translate",["angular"],function(){}),function(){function l(e,t,n){var r=t&&n||0,i=0;t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){i<16&&(t[r+i++]=a[e])});while(
i<16)t[r+i++]=0;return t}function c(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function g(e,t,n){var r=t&&n||0,i=t||[];e=e||{};var s=e.clockseq!=null?e.clockseq:d,o=e.msecs!=null?e.msecs:(new Date).getTime(),u=e.nsecs!=null?e.nsecs:m+1,a=o-v+(u-m)/1e4;a<0&&e.clockseq==null&&(s=s+1&16383),(a<0||o>v)&&e.nsecs==null&&(u=0);if(u>=1e4)throw new 
Error("uuid.v1(): Can't create more than 10M uuids/sec");v=o,m=u,d=s,o+=122192928e5;var f=((o&268435455)*1e4+u)%4294967296;i[r++]=f>>>24&255,i[r++]=f>>>16&255,i[r++]=f>>>8&255,i[r++]=f&255;var l=o/4294967296*1e4&268435455;i[r++]=l>>>8&255,i[r++]=l&255,i[r++]=l>>>24&15|16,i[r++]=l>>>16&255,i[r++]=s>>>8|128,i[r++]=s&255;var h=e.node||p;for(var g=0;g<6;g++)i[r+g]=h[g];return t?t:c(i)}function y(e,n,r){var i=n&&r||0;typeof e=="string"&&(n=e=="binary"?new o(16):null,e=null),e=e||{};var s=e.random||(e.
rng||t)();s[6]=s[6]&15|64,s[8]=s[8]&63|128;if(n)for(var u=0;u<16;u++)n[i+u]=s[u];return n||c(s)}var e=this,t;if(typeof require=="function")try{var n=require("crypto").randomBytes;t=n&&function(){return n(16)}}catch(r){}if(!t&&e.crypto&&crypto.getRandomValues){var i=new Uint8Array(16);t=function(){return crypto.getRandomValues(i),i}}if(!t){var s=new Array(16);t=function(){for(var e=0,t;e<16;e++)(e&3)===0&&(t=Math.random()*4294967296),s[e]=t>>>((e&3)<<3)&255;return s}}var o=typeof Buffer=="function"?
Buffer:Array,u=[],a={};for(var f=0;f<256;f++)u[f]=(f+256).toString(16).substr(1),a[u[f]]=f;var h=t(),p=[h[0]|1,h[1],h[2],h[3],h[4],h[5]],d=(h[6]<<8|h[7])&16383,v=0,m=0,b=y;b.v1=g,b.v4=y,b.parse=l,b.unparse=c,b.BufferClass=o;if(typeof define=="function"&&define.amd)define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/uuid/uuid",[],function(){return b});else if(typeof module!="undefined"&&module.exports)module.exports=b;else{var w=e.uuid;b.noConflict=function(){return e
.uuid=w,b},e.uuid=b}}.call(this),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXError",["require","exports","module"],function(e,t,n){"use strict";function r(e,t,n){Error.call(this),this.code=e,this.message="["+e+"] "+t,this.underlyingError=n}return r.prototype=new Error,r.prototype.name="AdobeDCXError",delete r.prototype.stack,r.INVALID_JSON="INVALID_JSON",r.READ_ONLY="READ_ONLY",r.INVALID_PARAMS="",r.INVALID_DATA="INVALID_DATA",r.DUPLICATE_VALUE="DUPLICATE_VALUE"
,r.NO_LOCAL_STORAGE="NO_LOCAL_STORAGE",r.INVALID_STATE="INVALID_STATE",r.DELETED_COMPOSITE="DELETED_COMPOSITE",r.UNEXPECTED_RESPONSE="UNEXPECTED_RESPONSE",r.NETWORK_ERROR="NETWORK_ERROR",r.COMPONENT_DOWNLOAD_ERROR="COMPONENT_DOWNLOAD_ERROR",r.COMPONENT_UPLOAD_ERROR="COMPONENT_UPLOAD_ERROR",r.UPDATE_CONFLICT="UPDATE_CONFLICT",r.NO_COMPOSITE="NO_COMPOSITE",r.ALREADY_EXISTS="ALREADY_EXISTS",r.SERVICE_IS_INACTIVE="SERVICE_IS_INACTIVE",r.EXCEEDS_QUOTA="EXCEEDS_QUOTA",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED"
,r.RETRYABLE_SERVER_ERROR="RETRYABLE_SERVER_ERROR",r.TIMED_OUT="TIMED_OUT",r.UNEXPECTED="UNEXPECTED",r.TERMINATED_INPUTSTREAM="TERMINATED_INPUTSTREAM",r.WRONG_ENDPOINT="WRONG_ENDPOINT",r.OUT_OF_SPACE="ENOSPC",r}),function(){function l(e,t,n){var r=t&&n||0,i=0;t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){i<16&&(t[r+i++]=a[e])});while(i<16)t[r+i++]=0;return t}function c(e,t){var n=t||0,r=u;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+
r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}function g(e,t,n){var r=t&&n||0,i=t||[];e=e||{};var s=e.clockseq!=null?e.clockseq:d,o=e.msecs!=null?e.msecs:(new Date).getTime(),u=e.nsecs!=null?e.nsecs:m+1,a=o-v+(u-m)/1e4;a<0&&e.clockseq==null&&(s=s+1&16383),(a<0||o>v)&&e.nsecs==null&&(u=0);if(u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=o,m=u,d=s,o+=122192928e5;var f=((o&268435455)*1e4+u)%4294967296;i[r++]=f>>>24&255,i[r++]=f>>>16&255
,i[r++]=f>>>8&255,i[r++]=f&255;var l=o/4294967296*1e4&268435455;i[r++]=l>>>8&255,i[r++]=l&255,i[r++]=l>>>24&15|16,i[r++]=l>>>16&255,i[r++]=s>>>8|128,i[r++]=s&255;var h=e.node||p;for(var g=0;g<6;g++)i[r+g]=h[g];return t?t:c(i)}function y(e,n,r){var i=n&&r||0;typeof e=="string"&&(n=e=="binary"?new o(16):null,e=null),e=e||{};var s=e.random||(e.rng||t)();s[6]=s[6]&15|64,s[8]=s[8]&63|128;if(n)for(var u=0;u<16;u++)n[i+u]=s[u];return n||c(s)}var e=this,t;if(typeof require=="function")try{var n=require("crypto"
).randomBytes;t=n&&function(){return n(16)}}catch(r){}if(!t&&e.crypto&&crypto.getRandomValues){var i=new Uint8Array(16);t=function(){return crypto.getRandomValues(i),i}}if(!t){var s=new Array(16);t=function(){for(var e=0,t;e<16;e++)(e&3)===0&&(t=Math.random()*4294967296),s[e]=t>>>((e&3)<<3)&255;return s}}var o=typeof Buffer=="function"?Buffer:Array,u=[],a={};for(var f=0;f<256;f++)u[f]=(f+256).toString(16).substr(1),a[u[f]]=f;var h=t(),p=[h[0]|1,h[1],h[2],h[3],h[4],h[5]],d=(h[6]<<8|h[7])&16383,v=0
,m=0,b=y;b.v1=g,b.v4=y,b.parse=l,b.unparse=c,b.BufferClass=o;if(typeof define=="function"&&define.amd)define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/components/uuid/uuid",[],function(){return b});else if(typeof module!="undefined"&&module.exports)module.exports=b;else{var w=e.uuid;b.noConflict=function(){return e.uuid=w,b},e.uuid=b}}.call(this);if(typeof nodeRequire!="function")var nodeRequire=require;define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXUtil"
,["require","exports","module","./components/uuid/uuid"],function(e,t,n){"use strict";var r;try{r=e("./components/uuid/uuid")}catch(i){r=nodeRequire("uuid")}t.merge=function(e){var t,n;for(t=1;t<arguments.length;++t){var r=arguments[t];if(typeof r=="object")for(n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e},t.parentDirectory=function(e){var t=e.split("/");return t.pop(),t.join("/")},t.filePathComponents=function(e){var t=e.split("/"),n=t.pop(),r=n.split("."),i=r.length>1?r.pop():null;return{directory
:t.join("/"),fileName:n,baseName:r.join("."),extension:i}},t.appendPathElements=function(){var e=[],t,n=arguments.length;for(t=0;t<n;t++){var r=arguments[t];typeof r=="string"&&r!==""&&((t!==0||r.length===1)&&r.charAt(0)==="/"&&(r=r.slice(1)),t!==n-1&&r.charAt(r.length-1)==="/"&&(r=r.slice(0,r.length-1)),e.push(r))}return e.join("/")};var s=/^[^\u0000-\u001F\u0022\u002A\u003A\u003C\u003E\u003F\u005C\u007F]*[^\u0000-\u001F\u0022\u002A\u002E\u003A\u003C\u003E\u003F\u005C\u007F]{1}$/;t.isValidPath=function(
e){try{if(e.length>65535)return!1;var t=e.split("/");if(!t||t.length===0)return!1;var n,r=t.length;for(n=0;n<r;n++){var i=t[n];if(i.length>255||!s.test(t[n]))return!1}return!0}catch(o){return!1}};var o=t.noOp=function(){};t.consumeStream=function(e,t,n){e.on("data",n||o),e.on("end",t||o)},t.flatCopy=function(e){var t={},n=Object.keys(e),r,i=n.length;for(r=0;r<i;r++){var s=n[r];t[s]=e[s]}return t},t.deepCopy=function(e){return JSON.parse(JSON.stringify(e))},t.objectsEqual=function(e,n,r){var i={},
s,o=Object.keys(e),u,a=o.length;for(u=0;u<a;u++){s=o[u];if(!r||!r[s]){var f=e[s],l=n[s],c=typeof f,h=typeof l;if(c!==h)return!1;if(c==="object"){if(!t.objectsEqual(f,l,r))return!1}else if(f!==l)return!1}i[s]=!0}o=Object.keys(n),a=o.length;for(u=0;u<a;u++){s=o[u];if(!i[s])return!1}return!0};var u=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?");t.parseURI=function(e){var t=e.match(u);return{scheme:t[2],authority:t[4],path:t[5],query:t[7],fragment:t[9]}},t.endPointOf=function(
e){var n=t.parseURI(e),r=n.scheme,i=n.authority,s=r==="https"?443:r==="http"?80:-1,o;return r&&i&&(o=(r+"://"+i).toLowerCase(),s>=0&&i.indexOf(":")<0&&(o=o+":"+s)),o},t.ensureRelativeHrefStartsWithSlash=function(e){if(e){var n=t.parseURI(e),r=n.scheme,i=n.authority;!r&&!i&&e.charAt(0)!=="/"&&(e="/"+e)}return e};var a=/^([^:]+):(.*)$/,f=/^\s+|\s+$/g;return t.parseHeaders=function(e){var t,n={},r=e.split(/\r?\n/),i,s;for(t=0;t<r.length;++t){var o=r[t];if(o.length>0){var u=o.charCodeAt(0);if(!i||u!==9&&
u!==32){var l=a.exec(o);l&&l.length>1&&(i=l[1].toLowerCase(),s=l[2]||"",s=s.replace(f,""),n[i]?n[i]=n[i]+","+s:n[i]=s)}else n[i]=n[i]+" "+o.replace(f,"")}}return n},t.timeStamp=function(e){var t=(new Date).getTime();return e&&(t-=t%1e3),t},t.generateUuid=r,t}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXNode",["require","exports","module","./AdobeDCXError","./AdobeDCXUtil"],function(e,t,n){"use strict";function s(e,t,n){e?this._setData(e):this
._data={},this._readOnly=t,this._isRoot=n}var r=e("./AdobeDCXError"),i=e("./AdobeDCXUtil"),o="/";s.ROOT_PATH=o,Object.defineProperties(s.prototype,{id:{get:function(){return this._data.id},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(this._owner)throw new r(r.READ_ONLY,"Cannot change the id of a node that is part of a branch or element.");if(typeof e!="string"||e==="")throw new r(r.INVALID_PARAMS,"Expecting a non-empty string.");this._data.id=e,this._setDirty
()}},name:{get:function(){return this._data.name},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a string or undefined.");this._data.name=e,this._setDirty()}},type:{get:function(){return this._data.type},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a string or undefined."
);this._data.type=e,this._setDirty()}},relationship:{get:function(){return this._data.rel},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a string or undefined.");this._data.rel=e,this._setDirty()}},path:{get:function(){return this._isRoot?o:this._data.path},set:function(e){if(e!==this.path){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(this._isRoot
)throw new r(r.READ_ONLY,"Cannot change the path of the root node.");if(e&&!i.isValidPath(e))throw new r(r.INVALID_PARAMS,"Expecting a valid path or undefined.");this._owner?this._owner._setPathOfNode(this,e||undefined):(this._data.path=e||undefined,this._parentPath=""),this._setDirty()}}},parentPath:{get:function(){return this._parentPath},set:function(e){throw new r(r.READ_ONLY,"parentPath is read-only.")}},absolutePath:{get:function(){var e=this.path;return this._isRoot?e:e&&this._owner?i.appendPathElements
(this._parentPath,e):undefined},set:function(e){throw new r(r.READ_ONLY,"absolutePath is read-only.")}},isRoot:{get:function(){return this._isRoot},set:function(e){throw new r(r.READ_ONLY,"isRoot is read-only.")}}}),s.prototype.getLink=function(e){if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "relationship" must be a string');return this._data._links?this._data._links[e]:undefined},s.prototype.setLink=function(e,t){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.")
;if(typeof e!="object")throw new r(r.INVALID_PARAMS,'Param "link" must be an object.');if(typeof t!="string")throw new r(r.INVALID_PARAMS,'Param "relationship" must be a string');var n=this._data._links;n||(n=this._data._links={}),n[t]=e,this._setDirty()},s.prototype.removeLink=function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "relationship" must be a string');var t=this._data._links;t&&(delete t[e],Object.
keys(t).length<1&&delete this._data._links,this._setDirty())};var u={components:!0,children:!0,"manifest-format-version":!0,id:!0,name:!0,type:!0,state:!0,local:!0},a={components:!0,children:!0,rel:!0,path:!0,id:!0,name:!0,type:!0};return s.prototype.getCustomKeys=function(){var e=[],t=Object.keys(this._data),n,r=t.length;for(n=0;n<r;n++){var i=t[n];(this._isRoot?!u[i]:!a[i])&&e.push(i)}return e},s.prototype.getValue=function(e){if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "key" must be a string'
);if(e==="children"||e==="components")throw new r(r.INVALID_PARAMS,"Illegal key");return this._data[e]},s.prototype.setValue=function(e,t){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "key" must be a string');if(e==="children"||e==="components")throw new r(r.INVALID_PARAMS,"Illegal key");this._data[e]=t,this._setDirty()},s.prototype.removeValue=function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only."
);if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "key" must be a string');if(e==="children"||e==="components")throw new r(r.INVALID_PARAMS,"Illegal key");delete this._data[e],this._setDirty()},s.prototype.copy=function(){var e=null,t=this._data.children,n=this._data.components;try{t&&delete this._data.children,n&&delete this._data.components;var r=JSON.parse(JSON.stringify(this._data));e=new s(r)}finally{t&&(this._data.children=t),n&&(this._data.components=n)}return e},s.prototype.isEqualTo=
function(e,t,n){return this._isEqual(this._data,e._data,i.merge({children:!0,components:!0},t),n)},s.prototype._isEqual=function(e,t,n,r){var s,o,u,a,f;if(!i.objectsEqual(e,t,n))return!1;o=e.components,u=t.components,a=o?o.length:0,f=u?u.length:0;if(a!==f)return!1;if(a){var l,c,h;for(s=0;s<a;s++){l=o[s],c=null;for(h=0;h<a;h++)if(l.id===u[h].id){c=u[h];break}if(!c)return!1;if(!i.objectsEqual(l,c,r))return!1}}o=e.children,u=t.children,a=o?o.length:0,f=u?u.length:0;if(a!==f)return!1;if(a)for(s=0;s<a
;s++)if(!this._isEqual(o[s],u[s],n,r))return!1;return!0},s.prototype._setData=function(e){var t=this._verify(e);if(t===null)return this._data=e,this;throw t},s.prototype._verify=function(e){return typeof e.id!="string"?new r(r.INVALID_DATA,"Node is missing an id of type string"):null},s.prototype._setDirty=function(){this._owner&&this._owner._setDirty()},s}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXComponent",["require","exports","module"
,"./AdobeDCXError","./AdobeDCXUtil"],function(e,t,n){"use strict";function s(e,t){e?this._setData(e):this._data={},this._readOnly=t}function u(e){this.compositeId=e,this.records={}}function a(e,t,n,r,i,s){this.id=e,this.etag=t,this.version=n,this.md5=r,this.length=i,this.type=s}var r=e("./AdobeDCXError"),i=e("./AdobeDCXUtil"),o={unmodified:"unmodified",modified:"modified",pendingDelete:"pendingDelete",committedDelete:"committedDelete"};s.STATES=o,s._UploadResults=u,s._UploadRecord=a,Object.defineProperties
(s.prototype,{id:{get:function(){return this._data.id},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(this._owner)throw new r(r.READ_ONLY,"Cannot change the id of a component that is part of a branch or element.");if(typeof e!="string"||e==="")throw new r(r.INVALID_PARAMS,"Expecting a non-empty string.");this._data.id=e,this._setDirty()}},name:{get:function(){return this._data.name},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only."
);if(typeof e!="string"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a string or undefined.");this._data.name=e,this._setDirty()}},type:{get:function(){return this._data.type},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string"||e==="")throw new r(r.INVALID_PARAMS,"Expecting a non-empty string.");this._data.type=e,this._setDirty()}},path:{get:function(){return this._data.path},set:function(e){if(this._data.path!==e){if(this
._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(!i.isValidPath(e))throw new r(r.INVALID_PARAMS,"Expecting a valid path.");this._owner?this._owner._core._setPathOfComponent(this,e):(this._data.path=e,this._parentPath=""),this._setDirty()}}},parentPath:{get:function(){return this._parentPath},set:function(e){throw new r(r.READ_ONLY,"parentPath is read-only.")}},absolutePath:{get:function(){return this._data.path&&this._owner?i.appendPathElements(this._parentPath,this._data.path):
undefined},set:function(e){throw new r(r.READ_ONLY,"absolutePath is read-only.")}},relationship:{get:function(){return this._data.rel},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a string or undefined.");this._data.rel=e,this._setDirty()}},state:{get:function(){return this._data.state},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.")
;if(typeof e!="string")throw new r(r.INVALID_PARAMS,"Expecting a string.");if(!o.hasOwnProperty(e))throw new r(r.INVALID_PARAMS,'State must be "modified", "unmodified", "pendingDelete", or "committedDelete".');this._data.state=e,this._setDirty()}},etag:{get:function(){return this._data.etag},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a string or undefined.");this._data.
etag=e,this._setDirty()}},md5:{get:function(){return this._data.md5},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a string or undefined.");this._data.md5=e,this._setDirty()}},version:{get:function(){return this._data.version},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="undefined"&&typeof e!="string")throw new r(r.INVALID_PARAMS
,"Expecting a string or undefined.");this._data.version=e,this._setDirty()}},length:{get:function(){return this._data.length},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="number"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a number or undefined.");this._data.length=e,this._setDirty()}},width:{get:function(){return this._data.width},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof 
e!="number"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a number or undefined.");this._data.width=e,this._setDirty()}},height:{get:function(){return this._data.height},set:function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="number"&&typeof e!="undefined")throw new r(r.INVALID_PARAMS,"Expecting a number or undefined.");this._data.height=e,this._setDirty()}}});var f={name:!0,id:!0,state:!0,path:!0,rel:!0,type:!0,etag:!0,length:!0,version
:!0,md5:!0,width:!0,height:!0};return s.prototype.getCustomKeys=function(){var e=[],t=Object.keys(this._data),n,r=t.length;for(n=0;n<r;n++){var i=t[n];f[i]||e.push(i)}return e},s.prototype.getValue=function(e){if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "key" must be a string');return this._data[e]},s.prototype.setValue=function(e,t){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "key" must be a string'
);this._data[e]=t,this._setDirty()},s.prototype.removeValue=function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "key" must be a string');delete this._data[e],this._setDirty()},s.prototype.getLink=function(e){if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "relationship" must be a string');return this._data._links?this._data._links[e]:undefined},s.prototype.setLink=function(e,t){if(this._readOnly)throw new 
r(r.READ_ONLY,"This object is read-only.");if(typeof e!="object")throw new r(r.INVALID_PARAMS,'Param "link" must be an object.');if(typeof t!="string")throw new r(r.INVALID_PARAMS,'Param "relationship" must be a string');var n=this._data._links;n||(n=this._data._links={}),n[t]=e,this._setDirty()},s.prototype.removeLink=function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(typeof e!="string")throw new r(r.INVALID_PARAMS,'Param "relationship" must be a string');var t=
this._data._links;t&&(delete t[e],Object.keys(t).length<1&&delete this._data._links,this._setDirty())},s.prototype.isEqualTo=function(e,t){return i.objectsEqual(this._data,e._data,t)},s.prototype._setData=function(e){var t=this._verify(e);if(t===null)return this._data=e,this;throw t},s.prototype._setDirty=function(){this._owner&&this._owner._setDirty()},s.prototype._verify=function(e){return typeof e.id!="string"?new r(r.INVALID_DATA,"Component is missing an id of type string"):null},s}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXFS"
,["require","exports","module","./AdobeDCXError","./AdobeDCXUtil"],function(e,t,n){"use strict";var r=e("./AdobeDCXError"),i=e("./AdobeDCXUtil"),s;t.canUseFileSystem=!1,t._setFS=function(e){s=e,t.canUseFileSystem=e?!0:!1},t.ensureDirectoryExists=function(e,n){var r=function(e){e&&e.code==="EEXIST"?n():n(e)},o=function(o){if(o)n();else{var u=i.parentDirectory(e);u?t.ensureDirectoryExists(u,function(t){t?n(t):s.mkdir(e,r)}):s.mkdir(e,r)}};e?s.exists(e,o):o(!0)},t.getTempFilePathAt=function(e,n){var r=
function(){var s=e+i.generateUuid();t.exists(s,function(e){e?r():n(s)})};r()},t.exists=function(e,t){s.exists(e,t)},t.deleteFile=function(e,t){s.unlink(e,function(e){!e||e.code==="ENOENT"?t():t(e)})},t.readFile=function(e,t,n){s.readFile(e,t,n)},t.writeFile=function(e,n,r,o){var u=i.parentDirectory(e);t.ensureDirectoryExists(u,function(t){t?o(t):s.writeFile(e,n,r,o)})},t.writeFileAtomically=function(e,n,r,o){var u=i.parentDirectory(e);t.ensureDirectoryExists(u,function(i){i?o(i):t.getTempFilePathAt
(u+"/",function(t){s.writeFile(t,n,r,function(n){n?o(n):s.rename(t,e,o)})})})},t.createWriteStream=function(e,t){return s.createWriteStream(e,t)},t.createReadStream=function(e,t){return s.createReadStream(e,t)},t.move=function(e,n,r,o){var u=i.parentDirectory(n);t.ensureDirectoryExists(u,function(t){if(t)o(t);else if(r){var i=(new Date).getTime()/1e3;s.utimes(e,i,i,function(t){t?o(t):s.rename(e,n,o)})}else s.rename(e,n,o)})},t.info=function(e,t){s.stat(e,t)},t.directoryListing=function(e,t){var n
,r=[],i,o=function(o){s.stat(e+"/"+o,function(e,s){if(!e)try{r.push({name:o,info:s}),n--}catch(u){e=u}e?i||(i=e,t(e)):n===0&&t(undefined,r)})};s.readdir(e,function(e,r){if(!e)try{var i,s=r.length;n=s;for(i=0;i<s;i++)o(r[i])}catch(u){e=u}e?t(e):n===0&&t(undefined,[])})},t.deleteDirectory=function(e,n){var r=function(){try{s.rmdir(e,n)}catch(t){n(t)}},i,o,u=function(e){e&&!i&&(i=e),o--,o<1&&(i?n(i):r())},a=function(n){var r=e+"/"+n;s.unlink(r,function(e){try{e?t.deleteDirectory(r,function(e){u(e)})
:u()}catch(n){u(n)}})};s.readdir(e,function(e,t){if(!e)try{var i=t.length;if(i<1)r();else{var s;o=i;for(s=0;s<i;s++)a(t[s])}}catch(u){e=u}e&&n(e)})};var o=function(e,t,n){try{var r=t+i.generateUuid(),o=s.createWriteStream(r),u=s.createReadStream(e);u.on("end",function(){s.rename(r,t,n)}),u.pipe(o)}catch(a){n(a)}};return t.copyFile=function(e,n,r){var s=i.parentDirectory(n);t.ensureDirectoryExists(s,function(t){t?r(t):o(e,n,r)})},t}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXBranchCore"
,["require","exports","module","./AdobeDCXError","./AdobeDCXNode","./AdobeDCXComponent","./AdobeDCXFS","./AdobeDCXUtil"],function(e,t,n){"use strict";function a(e,t,n){this._readOnly=n,this._owner=t,this._setData(e),this._localStorage=undefined}function f(e,t,n,i,s,o,a,f){var l=t._owner._core,c=e._owner._core,h=n&&e.id===t.id,p=c._getSourceHrefOfComponent(e),d=l.getComponentWithId(t.id),v=i&&(!d||!d.etag)&&e.state==="unmodified",m=!h&&!p,g=m;s&&!d&&(p||m)&&e.id===t.id&&(t._data.id=u.generateUuid(
),t.state="modified",t.etag=undefined,t.version=undefined,t.md5=undefined,t.length=undefined),o&&o._copyComponentMapping(e.id,f,t.id,a)&&(g=!1,h||(t.state="modified"));if(m){if(v){p=c._getHrefOfComponent(e),l._setSourceHrefOfComponent(p,t,a);if(!p&&g)throw new r(r.INVALID_STATE,"Failed to determine the source href of a component that does not have a local file.")}else if(g)throw new r(r.INVALID_STATE,"Could not use server-to-server copy for component "+e.id)}else l._setSourceHrefOfComponent(p,t,a
);p&&(t.state="modified")}var r=e("./AdobeDCXError"),i=e("./AdobeDCXNode"),s=e("./AdobeDCXComponent"),o=e("./AdobeDCXFS"),u=e("./AdobeDCXUtil");return Object.defineProperties(a.prototype,{rootNode:{get:function(){return this.getChildWithAbsolutePath(i.ROOT_PATH)},set:function(e){throw new r(r.READ_ONLY,'Property "rootNode" is read-only.')}},hasLocalStorage:{get:function(){return this._localStorage},set:function(){throw new r(r.READ_ONLY,"Cannot set the property hasLocalStorage.")}},isDirty:{get:function(
){return this._isDirty},set:function(){throw new r(r.READ_ONLY,"Cannot set the property isDirty.")}},changeCount:{get:function(){return this._data.local?this._data.local.change||0:0},set:function(){throw new r(r.READ_ONLY,"Cannot set the property changeCount.")}}}),a.prototype.getChildWithId=function(e){return this._allNodes[e]},a.prototype.getChildWithAbsolutePath=function(e){var t=this._absolutePaths[e.toLowerCase()];return t?t instanceof i?t:undefined:undefined},a.prototype.getChildrenOf=function(
e){e=e?this._allNodes[e.id]:this.rootNode;if(!e)throw new r(r.INVALID_PARAMS,"Unknown node");var t=[],n=e._data.children;if(Array.isArray(n)){var i;for(i=0;i<n.length;i++){var s=n[i],o=this._allNodes[s.id];if(!o)throw new r(r.INVALID_DATA,"Node not in cache");t[t.length]=o}}return t},a.prototype.addChild=function(e,t,n,s){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");t=t||u.generateUuid();if(this._allNodes[t])throw new r(r.DUPLICATE_VALUE,"Node already exists in branch.")
;if(!n||typeof n=="number"&&n%1===0){var o=s?this._allNodes[s.id]:this.rootNode;if(!o)throw new r(r.INVALID_PARAMS,"Unknown parent node.");var a=new i;a.id=t,e&&(a.name=e),a._parentPath=o.absolutePath||o._parentPath;var f=o._data.children;return f?(n>=0&&n<=f.length||(n=f.length),n===f.length?f[n]=a._data:f.splice(n,0,a._data)):o._data.children=[a._data],this._allNodes[a.id]=a,a._owner=this._owner,this._setDirty(),a}throw new r(r.INVALID_PARAMS,'Param "index" must be an integer.')},a.prototype.removeChild=
function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(!e)throw new r(r.INVALID_PARAMS,'Expecting param "node".');if(e.isRoot)throw new r(r.INVALID_PARAMS,"Cannot remove the root node.");var t=e.id;if(!t)throw new r(r.INVALID_PARAMS,'Param "node" must have an id.');var n=this._nodeDataOfParentOfNode(e);if(!n)throw new r(r.INVALID_PARAMS,"Node not found in this branch.");return n.parentNodeData.children.splice(n.index,1),n.parentNodeData.children.length===0&&delete n
.parentNodeData.children,e=this._allNodes[t],this._removeNodeFromCachesRecursively(e._data),this._setDirty(),e},a.prototype.moveChild=function(e,t,n){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(!e)throw new r(r.INVALID_PARAMS,'Expecting param "node".');if(e.isRoot)throw new r(r.INVALID_PARAMS,"Cannot move the root node.");if(!t||typeof t=="number"&&t%1===0){var i=e.id;if(!i)throw new r(r.INVALID_PARAMS,'Param "node" must have an id.');var s=this._nodeDataOfParentOfNode
(e);e=this._allNodes[i];if(!s)throw new r(r.INVALID_PARAMS,"Node not found in this branch.");var o=n?this._allNodes[n.id]:this.rootNode;if(!o)throw new r(r.INVALID_PARAMS,"Unknown parent node.");if(this._nodeIdIsDescendantOf(o.id,e._data))throw new r(r.INVALID_PARAMS,"Must not create a cycle.");var u=s.parentNodeData.children.splice(s.index,1)[0];try{var a=o._data.children;a?(t>=0&&t<=a.length||(t=a.length),t===a.length?a[t]=u:a.splice(t,0,u)):o._data.children=[u]}catch(f){throw s.parentNodeData.
children.splice(s.index,0,u),f}return s.parentNodeData.children.length===0&&delete s.parentNodeData.children,this._setDirty(),this._allNodes[i]}throw new r(r.INVALID_PARAMS,'Param "index" must be an integer.')},a.prototype.copyChild=function(e,t,n,r,i,s){return this._copyChild(e,t,n,r,i,!1,s)},a.prototype.replaceChild=function(e,t,n,r){return this._copyChild(e,undefined,undefined,t,n||e.id,!0,r)},a.prototype.allComponents=function(){var e=[],t;for(t in this._allComponents)this._allComponents.hasOwnProperty
(t)&&e.push(this._allComponents[t]);return e},a.prototype.getComponentWithId=function(e){return this._allComponents[e]},a.prototype.getComponentWithAbsolutePath=function(e){var t=this._absolutePaths[e.toLowerCase()];return t?t instanceof s?t:undefined:undefined},a.prototype.getComponentsOf=function(e){e=e?this._allNodes[e.id]:this.rootNode;if(!e)throw new r(r.INVALID_PARAMS,"Unknown node");var t=[],n=e._data.components;if(Array.isArray(n)){var i;for(i=0;i<n.length;i++){var s=n[i],o=this._allComponents
[s.id];if(!o)throw new r(r.INVALID_DATA,"Component not in cache");t[t.length]=o}}return t},a.prototype.addComponent=function(e,t,n,i,o,a,f,l,c,h){var p=this._localStorage;if(!p)throw new r(r.NO_LOCAL_STORAGE,"No local storage. Use AdobeDCXCompositeXfer.uploadNewComponent() followed by addComponentWithUploadResults()");if(typeof h!="function"&&o)throw new r(r.INVALID_PARAMS,'Param "callback" must be a function.');if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(c&&typeof c!="string"
)throw new r(r.INVALID_PARAMS,'Param "id" must be of type string.');if(!o&&!f)throw new r(r.INVALID_PARAMS,"Must provide either source or sourceHref.");try{if(f){var d=this._getBranchOf(this).compositeHref;if(d){var v=u.endPointOf(d),m=u.endPointOf(f);if(v&&m&&v!==m)throw new r(r.WRONG_ENDPOINT,"Given source href has an invalid endpoint: "+m)}}var g=this._local();c=c||u.generateUuid();var y=new s;y.id=c,y.name=e,y.type=t,y.relationship=n,y.path=i,y.state="modified";var b=this,w=function(e){if(!e)
try{if(c&&b._allComponents[c])throw new r(r.DUPLICATE_VALUE,'The "id" of a component must be unique.');var t=l?b._allNodes[l.id]:b.rootNode;if(!t)throw new r(r.INVALID_PARAMS,"Unknown parent node.");var n=b._normalizedAbsolutePathForItem(y,t);if(b._absolutePaths[n])throw new r(r.DUPLICATE_VALUE,"Duplicate absolute path: "+n);y._parentPath=t.absolutePath||t._parentPath;var i=t._data.components;i?i.push(y._data):t._data.components=[y._data],y._owner=b._owner,f&&b._setSourceHrefOfComponent(f,y),b._allComponents
[y.id]=y,b._absolutePaths[n]=y,b._setDirty()}catch(s){p.removeComponentAsset(y,g),f&&b._setSourceHrefOfComponent(undefined,y),y=undefined,e=s}if(h)return h(e,y);if(e)throw e;return y};if(!o)return w();p.ingestComponentAsset(y,o,a,g,w)}catch(E){if(h)return h(E);throw E}},a.prototype.addComponentWithUploadResults=function(e,t,n,i,o){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(o.compositeId!==this._owner.compositeId)throw new r(r.INVALID_PARAMS,"Param uploadResults does not appear valid to be for this composite."
);var u=Object.keys(o.records);if(u.length!==1)throw new r(r.INVALID_PARAMS,"Param uploadResults must contain records of exactly one component upload.");if(this._localStorage)throw new r(r.INVALID_PARAMS,"This method is for in-browser use only. Use addComponent() instead.");var a=o.records[u[0]],f=a.id;if(this._allComponents[f])throw new r(r.DUPLICATE_VALUE,"Duplicate component id: "+f);var l=i?this._allNodes[i.id]:this.rootNode;if(!l)throw new r(r.INVALID_PARAMS,"Unknown parent node.");var c=new 
s;c.id=f,c.name=e,c.type=a.type,c.relationship=t,c.path=n,c.state="unmodified",c.etag=a.etag,c.length=a.length,c.version=a.version,c.md5=a.md5;var h=this._normalizedAbsolutePathForItem(c,l);if(this._absolutePaths[h])throw new r(r.DUPLICATE_VALUE,"Duplicate absolute path: "+h);c._parentPath=l.absolutePath||l._parentPath;var p=l._data.components;return p?p.push(c._data):l._data.components=[c._data],c._owner=this._owner,this._allComponents[f]=c,this._absolutePaths[h]=c,this._setDirty(),c},a.prototype
.updateComponent=function(e,t,n,i){var s=this._localStorage;if(!s)throw new r(r.NO_LOCAL_STORAGE,"No local storage. Use AdobeDCXCompositeXfer.uploadComponent() to upload a new component asset and then call updateComponentWithUploadResults()");if(typeof i!="function")throw new r(r.INVALID_PARAMS,'Param "callback" must be a function.');if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");e=this._allComponents[e.id];if(!e)throw new r(r.INVALID_PARAMS,"Unknown component.");try{var o=
this,u=function(t){if(!t)try{e.state!=="modified"?e.state="modified":o._setDirty(),o._setSourceHrefOfComponent(undefined,e)}catch(n){t=n,e=undefined}i(t,e)};s.ingestComponentAsset(e,t,n,this._local(),u)}catch(a){i(a)}},a.prototype.updateComponentWithUploadResults=function(e,t){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");e=this._allComponents[e.id];if(!e)throw new r(r.INVALID_PARAMS,"Unknown component.");if(this._localStorage)throw new r(r.INVALID_PARAMS,"This method is for in-browser use only. Use updateComponent() instead."
);if(t.compositeId!==this._owner.compositeId)throw new r(r.INVALID_PARAMS,"Param uploadResults does not appear valid to be for this composite.");var n=t.records[e.id];if(!n)throw new r(r.INVALID_PARAMS,"Param uploadResults does not contain an upload record for the given component.");return e.etag=n.etag,e.version=n.version,e.md5=n.md5,e.length=n.length,e},a.prototype.removeComponent=function(e){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(!e)throw new r(r.INVALID_PARAMS
,'Expecting param "component".');var t=e.id;if(!t)throw new r(r.INVALID_PARAMS,'Param "component" must have an id.');var n=this._nodeDataOfParentOfComponent(e);if(!n)throw new r(r.INVALID_PARAMS,"Component not found in this branch.");return n.parentNodeData.components.splice(n.index,1),n.parentNodeData.components.length===0&&delete n.parentNodeData.components,e=this._allComponents[t],delete this._allComponents[t],delete this._absolutePaths[this._normalizedAbsolutePathForItem(e)],this._localStorage&&
(this._localStorage.removeComponentAsset(e,this._local()),this._setSourceHrefOfComponent(undefined,e)),e._owner=undefined,e._parentPath="",this._setDirty(),e},a.prototype.moveComponent=function(e,t){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(!e)throw new r(r.INVALID_PARAMS,'Expecting param "component".');var n=e.id;if(!n)throw new r(r.INVALID_PARAMS,'Param "component" must have an id.');var i=this._nodeDataOfParentOfComponent(e);if(!i)throw new r(r.INVALID_PARAMS,"Component not found in this branch."
);var s=t?this._allNodes[t.id]:this.rootNode;if(!s)throw new r(r.INVALID_PARAMS,"Unknown parent node.");var o=this._normalizedAbsolutePathForItem(e,s);if(this._absolutePaths[o])throw new r(r.DUPLICATE_VALUE,"Duplicate absolute path: "+o);var u=i.parentNodeData.components.splice(i.index,1)[0],a=s._data.components;return a?a.push(u):s._data.components=[u],i.parentNodeData.components.length===0&&delete i.parentNodeData.components,e=this._allComponents[n],delete this._absolutePaths[this._normalizedAbsolutePathForItem
(e)],e._parentPath=s.absolutePath||s._parentPath,this._absolutePaths[o]=e,this._setDirty(),e},a.prototype.copyComponent=function(e,t,n,r,i){return this._copyComponent(e,t,n,r,!1,i)},a.prototype.replaceComponent=function(e,t,n,r){return this._copyComponent(e,undefined,t,n||e.id,!0,r)},a.prototype.assetOfComponent=function(e,t){try{if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");if(!e)throw new r(r.INVALID_PARAMS,'Expecting param "component".');var n=e.id;if(!n)throw new 
r(r.INVALID_PARAMS,'Param "component" must have an id.');var i=this._localStorage.componentAssetPath(e,this._local());if(!t)return i;o.exists(i,function(e){t(undefined,e?i:null)})}catch(s){if(!t)throw s;t(s)}},a.prototype._getHrefOfComponent=function(e){var t,n=this._getBranchOf(e),r=n.compositeHref;return r&&typeof e.version!="undefined"&&(t=u.appendPathElements(r,e.id),t+=";version="+e.version),t},a.prototype._setSourceHrefOfComponent=function(e,t,n){var r=t.id,i=this._componentSourceHrefLookup
(!0,n);e?i[r]=e:i[r]&&delete i[r]},a.prototype._getSourceHrefOfComponent=function(e,t){var n=e.id,r=this._componentSourceHrefLookup(!1,t);return r?r[n]:undefined},a.prototype._copySourceHrefsFrom=function(e){var t=e._componentSourceHrefLookup(!1),n=this.allComponents(),r=n.length;if(r&&t){var i,s=this._componentSourceHrefLookup(!0);for(i=0;i<r;i++){var o=n[i].id;s[o]=t[o]}}},a.prototype._getBranchOf=function(e){return e._owner?this._getBranchOf(e._owner):e},a.prototype._isSameComposite=function(e
){return this._getBranchOf(this)._data.id===this._getBranchOf(e)._data.id},a.prototype._stringify=function(e,t){if(e){var n=this._data.local,r=null;try{delete this._data.local,r=JSON.stringify(this._data,undefined,t?2:undefined)}catch(i){throw i}finally{n&&(this._data.local=n)}return r}return JSON.stringify(this._data,undefined,t?2:undefined)},a.prototype._setData=function(e){var t=new i(e,this._readOnly,!0);t._owner=this._owner,t._parentPath="";var n=t.id,o={},a={},f={};a[n]=t,f[i.ROOT_PATH]=t;var l=
this,c=function(e,t,n,o,a){var f,h,p,d=e.components;if(Array.isArray(d))for(f=0;f<d.length;f++){var v=d[f],m=new s(v,l._readOnly);if(t[m.id])throw new r(r.INVALID_DATA,"Duplicate component id: "+m.id);h=m.path;if(!u.isValidPath(h))throw new r(r.INVALID_DATA,"Invalid component path: "+h);m._owner=l._owner,m._parentPath=a,p=l._normalizedAbsolutePathForItem(m);if(o[p])throw new r(r.INVALID_DATA,"Duplicate absolute path: "+p);t[m.id]=m,o[p]=m}var g=e.children;if(Array.isArray(g))for(f=0;f<g.length;f++
){var y=g[f],b=new i(y,l._readOnly);if(n[b.id])throw new r(r.INVALID_DATA,"Duplicate node id: "+b.id);h=b.path,b._owner=l._owner,b._parentPath=a;if(h){if(!u.isValidPath(h))throw new r(r.INVALID_DATA,"Invalid node path: "+h);p=l._normalizedAbsolutePathForItem(b);if(o[p])throw new r(r.INVALID_DATA,"Duplicate absolute path: "+p);o[p]=b}n[b.id]=b,c(y,t,n,o,b.path?u.appendPathElements(a,b.path):a)}};return c(e,o,a,f,i.ROOT_PATH),this._data=e,this._allComponents=o,this._allNodes=a,this._absolutePaths=f
,this._isDirty=!1,this},a.prototype._removeNodeFromCachesRecursively=function(e){var t,n=e.components;if(Array.isArray(n))for(t=0;t<n.length;t++){var r=n[t].id,i=this._allComponents[r];delete this._allComponents[r],delete this._absolutePaths[this._normalizedAbsolutePathForItem(i)],i._owner=undefined,this._localStorage&&(this._localStorage.removeComponentAsset(i,this._local()),this._setSourceHrefOfComponent(undefined,i))}var s=e.children;if(Array.isArray(s))for(t=0;t<s.length;t++)this._removeNodeFromCachesRecursively
(s[t]);var o=e.id,u=this._allNodes[o];delete this._allNodes[o],u.path&&delete this._absolutePaths[this._normalizedAbsolutePathForItem(u)],u._owner=undefined},a.prototype._local=function(){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");return this._data.local||(this._data.local={version:2}),this._data.local},a.prototype._componentSourceHrefLookup=function(e,t){if(e&&this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");t||(t=this._local());var n=t["componentS2SCopy#srcHref"
];return!n&&e&&(n=t["componentS2SCopy#srcHref"]={}),n},a.prototype._recursiveReset=function(e,t){var n,r=e.components;if(r)for(n=r.length-1;n>=0;n--){var i=r[n];i.state==="committedDelete"?(delete r[n],delete this._allComponents[i.id],delete i._owner,this._localStorage&&this._localStorage.removeComponentAsset(i,this._local()),this._setSourceHrefOfComponent(undefined,i,this._local())):(delete i.etag,delete i.version,delete i.length,delete i.md5,i.state="modified",t&&t(i))}var s=e.children;if(s)for(
n=0;n<s.length;n++)this._recursiveReset(s[n],t)},a.prototype._nodeIdIsDescendantOf=function(e,t){var n,r=t.children;if(r)for(n=0;n<r.length;n++){var i=r[n];if(i.id===e||this._nodeIdIsDescendantOf(e,i))return!0}return!1},a.prototype._recursivelyGetAllComponentsOfChild=function(e,t){t=t||[];var n=e._data||e,r,i,s=n.components;if(s){i=s.length;for(r=0;r<i;r++)t[t.length]=this._allComponents[s[r].id]}var o=n.children;if(o){i=o.length;for(r=0;r<i;r++)t=this._recursivelyGetAllComponentsOfChild(o[r],t)}
return t},a.prototype._nodeDataOfParentOfNode=function(e,t){t=t||this._data;var n,r=e._data.id,i=t.children;if(i)for(n=0;n<i.length;n++){var s=i[n],o=s.path;if(s.id===r)return{parentNodeData:t,index:n};var u=this._nodeDataOfParentOfNode(e,s);if(u)return u}return null},a.prototype._nodeDataOfParentOfComponent=function(e,t){t=t||this._data;var n,r=e._data.id,i=t.components;if(i)for(n=0;n<i.length;n++){var s=i[n];if(s.id===r)return{parentNodeData:t,index:n}}var o=t.children;if(o)for(n=0;n<o.length;n++
){var u=o[n],a=this._nodeDataOfParentOfComponent(e,u);if(a)return a}return null},a.prototype._determineAbsolutePathChangesRecursively=function(e,t,n){var r,i=e.components;if(i)for(r=0;r<i.length;r++){var s=i[r],o=this._allComponents[s.id];n.push({item:o,parentPath:t,absPath:u.appendPathElements(t,s.path)})}var a=e.children;if(a)for(r=0;r<a.length;r++){var f=a[r],l=this._allNodes[f.id],c=f.path,h=c?u.appendPathElements(t,c):t;n.push({item:l,parentPath:t,absPath:c?h:undefined}),this._determineAbsolutePathChangesRecursively
(f,h,n)}},a.prototype._setPathOfNode=function(e,t){var n=t?u.appendPathElements(e.parentPath,t):e.parentPath,i=[{item:e,absPath:t?n:undefined}];this._determineAbsolutePathChangesRecursively(e._data,n,i);var s,o,a=u.flatCopy(this._absolutePaths);for(s=0;s<i.length;s++){var f=i[s].item;f._data.path&&delete a[this._normalizedAbsolutePathForItem(f)]}for(s=0;s<i.length;s++){o=i[s];if(o.absPath){var l=o.absPath.toLowerCase();if(a[l])throw new r(r.DUPLICATE_VALUE,"Duplicate absolute path: "+l);a[l]=o.item
}}for(s=0;s<i.length;s++)o=i[s],o.parentPath&&(o.item._parentPath=o.parentPath);e._data.path=t,this._absolutePaths=a},a.prototype._setPathOfComponent=function(e,t){if(!this._allComponents[e.id])throw new r(r.INVALID_PARAMS,"Unknown component.");var n=u.appendPathElements(e.parentPath,t).toLowerCase();if(this._absolutePaths[n])throw new r(r.DUPLICATE_VALUE,"Duplicate absolute path for component: "+n);delete this._absolutePaths[this._normalizedAbsolutePathForItem(e)],this._absolutePaths[n]=e,e._data
.path=t},a.prototype._setDirty=function(e){this._isDirty=!0,this._local().change=this.changeCount+1,!e&&(this._data.state==="unmodified"||!this._data.state)&&(this._data.state="modified")},a.prototype._normalizedAbsolutePathForItem=function(e,t){var n;return t?n=u.appendPathElements(t.absolutePath||t._parentPath,e.path):n=e.absolutePath,n.toLowerCase()},a.prototype._hasSameEndpoint=function(e){var t=this._getBranchOf(this).compositeHref,n=this._getBranchOf(e).compositeHref;if(t&&n){var r=u.endPointOf
(t),i=u.endPointOf(n);if(r&&i&&r!==i)return!1}return!0},a.prototype._copyComponent=function(e,t,n,i,s,o){if(!e)throw new r(r.INVALID_PARAMS,'Expecting param "component".');if(o&&typeof o!="function")throw new r(r.INVALID_PARAMS,"Param callback must be a function.");var u=this,a=e._owner._core,l=this._isSameComposite(a),c=l||this._hasSameEndpoint(e),h=a._local(),p=this._localStorage,d=a._localStorage,v=p&&d;if(v&&!o&&!l)throw new r(r.INVALID_PARAMS,"Must pass a callback when copying between two different composites."
);if(!v&&!c)throw new r(r.NO_LOCAL_STORAGE,"Cannot copy between two different endpoints without local storage.");var m=function(e,t,n){f(e,t,l,c,!i,v?p:undefined,n,h)},g=v?d.componentAssetPath(e,h):undefined;if(!o)return this._copyComponentModel(e,t,s,n,i,m);if(l||!g)try{o(undefined,this._copyComponentModel(e,t,s,n,i,m))}catch(y){o(y)}else{var b={};p.ingestComponentAsset(e,g,!0,b,function(r){if(r)o(r);else try{h=b,o(undefined,u._copyComponentModel(e,t,s,n,i,m))}catch(a){o(a)}})}},a.prototype._copyComponentModel=
function(e,t,n,i,o,a){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");if(!e)throw new r(r.INVALID_PARAMS,'Expecting param "component".');var f=e._owner,l=new s(JSON.parse(JSON.stringify(e._data)));i?(l.path=i,l.id=o||u.generateUuid()):o&&(l.id=o),l._owner=this._owner;if(e.id!==l.id||!this._isSameComposite(f._core))l.state="modified",l.etag=undefined,l.version=undefined,l.md5=undefined,l.length=undefined;var c=this._allComponents[l.id];if(c&&!n)throw new r(r.DUPLICATE_VALUE,"Component already exists."
);if(n&&!c)throw new r(r.INVALID_PARAMS,"Could not find existing component.");var h,p;if(!n){p=t?this._allNodes[t.id]:this.rootNode;if(!p)throw new r(r.INVALID_PARAMS,"Unknown parent node.")}else{var d=this._nodeDataOfParentOfComponent(c);if(!d)throw new r(r.INVALID_PARAMS,"Parent node of existing component not found in this branch.");var v=d.parentNodeData.id;p=this._allNodes[v];if(!p)throw new r(r.INVALID_STATE,"Unknown parent node.");h=d.index}l._parentPath=p.absolutePath||p._parentPath;if(!u.
isValidPath(l.path))throw new r(r.INVALID_PARAMS,"Component path must be a valid path for a component.");var m=this._normalizedAbsolutePathForItem(l),g=this._absolutePaths[m];if(g&&g!==c)throw new r(r.DUPLICATE_VALUE,"Duplicate absolute path: "+m);var y=this._local();a&&(y=u.deepCopy(y),a(e,l,y));var b=p._data.components;return n?b[h]=l._data:b?b.push(l._data):p._data.components=[l._data],this._data.local=y,this._allComponents[l.id]=l,this._absolutePaths[m]=l,this._setDirty(),l},a.prototype._copyChild=
function(e,t,n,i,s,o,u){if(!e)throw new r(r.INVALID_PARAMS,'Expecting param "node".');var a=this,l=e._owner._core,c=this._isSameComposite(l),h=c||this._hasSameEndpoint(e),p=l._local(),d=this._localStorage,v=l._localStorage,m=d&&v,g=l._recursivelyGetAllComponentsOfChild(e);if(g.length>0){if(m&&!u&&!c)throw new r(r.INVALID_PARAMS,"Must pass a callback when copying between two different composites.");if(!m&&!h)throw new r(r.NO_LOCAL_STORAGE,"Cannot copy components between two different endpoints without local storage."
)}var y=function(e,t,n){f(e,t,c,h,!0,m?d:undefined,n,p)};if(!u)return this._copyChildModel(e,t,n,o,i,s,y);var b=function(){u(undefined,a._copyChildModel(e,t,n,o,i,s,y))};if(g.length===0||c||!m)try{b()}catch(w){u(w)}else{var E={},S,x=g.length,T=0,N,C=function(e){e&&!N&&(N=e),T--;if(T===0)if(N)u(N);else try{p=E,b()}catch(t){u(t)}};for(S=0;S<x;S++){var k=g[S],L=v.componentAssetPath(k,p);L&&(T++,d.ingestComponentAsset(k,L,!0,E,C))}if(T===0)try{b()}catch(A){u(A)}}},a.prototype._copyChildModel=function(
e,t,n,o,a,f,l){if(this._readOnly)throw new r(r.READ_ONLY,"This object is read-only.");var c=e._owner,h=new i(JSON.parse(JSON.stringify(e._data)));a?(h.path=a,h.id=f||u.generateUuid()):f&&(h.id=f),h._owner=this._owner,e.isRoot&&(delete h._data.local,delete h._data["manifest-format-version"]);var p=this._allNodes[h.id];if(p&&!o)throw new r(r.DUPLICATE_VALUE,"Child node already exists.");if(o&&!p)throw new r(r.INVALID_PARAMS,"Could not find existing node to replace.");var d;if(!o){d=t?this._allNodes
[t.id]:this.rootNode;if(!d)throw new r(r.INVALID_PARAMS,"Unknown parent node.")}else{var v=this._nodeDataOfParentOfNode(p);if(!v)throw new r(r.INVALID_PARAMS,"Parent of existing node not found in this branch.");var m=v.parentNodeData.id;d=this._allNodes[m];if(!d)throw new r(r.INVALID_STATE,"Unknown parent node.");n=v.index}h._parentPath=d.absolutePath||d._parentPath;if(h.path){if(!u.isValidPath(h.path))throw new r(r.INVALID_PARAMS,"Node path must be a valid path for a node.");var g=this._normalizedAbsolutePathForItem
(h),y=this._absolutePaths[g];if(y&&y!==p)throw new r(r.DUPLICATE_VALUE,"Duplicate absolute path: "+g)}var b=u.flatCopy(this._allNodes),w=u.flatCopy(this._allComponents),E=u.flatCopy(this._absolutePaths),S=u.deepCopy(this._local()),x=function(e,t,n,r,i,s){delete n[e.id],e.path&&delete i[t._normalizedAbsolutePathForItem(e)];var o,u,a=e._data.children;if(a){u=a.length;for(o=0;o<u;o++)x(n[a[o].id],t,n,r,i,s)}var f=e._data.components;if(f){u=f.length;for(o=0;o<u;o++){var l=r[f[o].id];delete r[l.id],delete 
i[t._normalizedAbsolutePathForItem(l)],t._localStorage&&(t._localStorage.removeComponentAsset(l,s),t._setSourceHrefOfComponent(undefined,l,s))}}};p&&x(p,this,b,w,E,S);var T=this,N=function(e,t,n,o,a,f,c,h){if(o[e.id])throw new r(r.DUPLICATE_VALUE,"Duplicate node id: "+e.id);o[e.id]=e;var p;if(e.path){p=t._core._normalizedAbsolutePathForItem(e);if(f[p])throw new r(r.DUPLICATE_VALUE,"Duplicate absolute path: "+p);f[p]=e}var d,v,m=e._data.children;if(m){v=m.length;for(d=0;d<v;d++){var g=new i(m[d]);
o[g.id]&&(g.id=u.generateUuid()),g._owner=t,g._parentPath=e.absolutePath||e._parentPath,N(g,t,n,o,a,f,c,h)}}var y=e._data.components;if(y){v=y.length;for(d=0;d<v;d++){var b=new s(y[d]),w=b.id;a[w]&&(b.id=u.generateUuid(),b.state="modified",b.etag=undefined,b.version=undefined,b.md5=undefined,b.length=undefined),b._owner=t,b._parentPath=e.absolutePath||e._parentPath,l&&l(n.getComponentWithId(w),b,c);if(a[b.id])throw new r(r.DUPLICATE_VALUE,"Duplicate component id: "+b.id);a[b.id]=b,p=t._core._normalizedAbsolutePathForItem
(b);if(f[p])throw new r(r.DUPLICATE_VALUE,"Duplicate absolute path: "+p);f[p]=b}}};N(h,this._owner,c,b,w,E,S,c._local());if(o)d._data.children[n]=h._data;else{var C=d._data.children;C?(n>=0&&n<=C.length||(n=C.length),n===C.length?C[n]=h._data:C.splice(n,0,h._data)):d._data.children=[h._data]}return T._allNodes=b,T._allComponents=w,T._absolutePaths=E,T._data.local=S,T._setDirty(),h},a.prototype._verifyIntegrity=function(e,t,n){var s=this,o=[],a=!1,f=function(e){return o.push(new r(r.INVALID_STATE,
e)),t&&(a||(t("Branch for composite "+s.rootNode.id+" has the following errors:"),a=!0),t("   "+e)),!1},l=function(e,t){return e?!0:f(t)},c=[],h=function(e){(c.indexOf(e)<0||f("Item "+e.id+" encountered more than once"))&&c.push(e)},p=u.flatCopy(this._allComponents),d=u.flatCopy(this._allNodes),v=u.flatCopy(this._absolutePaths),m=Object.keys(v),g,y=m.length;for(g=0;g<y;g++){var b=m[g];l(b.charAt(0)==="/","Absolute path "+b+" does not start with a slash.")}var w=function(e,t){var n,r,i=e.children;
if(i)for(n=0;n<i.length;n++){var o=i[n],a=d[o.id];if(a||f("Node "+o.id+" is not in cache."))h(a),l(a._data===o,"Node "+a.id+" _data property incorrect."),delete d[a.id],a.path&&a._owner&&(r=s._normalizedAbsolutePathForItem(a),(v[r]||f("Absolute path of node "+a.id+" ("+r+") is not in cache."))&&delete v[r]),l(a._parentPath===t,"Parent path of node "+a.id+" should be "+t+" but is "+a._parentPath),l(a._owner===s._owner,"Node "+a.id+" _owner property is not correct.");w(o,o.path?u.appendPathElements
(t,o.path):t)}var c=e.components;if(c)for(n=0;n<c.length;n++){var m=c[n],g=p[m.id];if(g||f("Component "+m.id+" is not in cache."))h(g),l(g._data===m,"Component "+g.id+" _data property incorrect."),delete p[g.id],g._owner&&(r=s._normalizedAbsolutePathForItem(g),(v[r]||f("Absolute path "+r+" is not in cache."))&&delete v[r]),l(g._parentPath===t,"Parent path of component "+g.id+" should be "+t+" but is "+g._parentPath),l(g._owner===s._owner,"Component "+g.id+" _owner property is not correct.")}},E=v
[i.ROOT_PATH];l(E,"Cannot find root node via path")&&(l(E.id===this._data.id,"Root node has correct id"),l(E.path===i.ROOT_PATH,"Root node has correct path"),l(E._parentPath==="","Root node has correct parent path"),l(E._owner===this._owner,"Root node has correct owner"),l(E._data===this._data,"Root node has correct data"),l(d[E.id]===E,"Cannot find root node via id")&&delete d[E.id],delete v[i.ROOT_PATH]),w(this._data,i.ROOT_PATH);var S=Object.keys(p);for(g=0;g<S.length;g++)f("Component "+S[g]+" is in cache but could not be found."
);S=Object.keys(d);for(g=0;g<S.length;g++)f("Node "+S[g]+" is in cache but could not be found.");S=Object.keys(v);for(g=0;g<S.length;g++)f("Absolute path "+S[g]+" is in cache but could not be found.");if(this._localStorage){var x=this._localStorage.componentIds(this._local());for(g=0;g<x.length;g++)l(this._allComponents[x[g]],"Component "+x[g]+" is in local storage mapping but could not be found in the manifest.");if(e){x=Object.keys(this._allComponents);for(g=0;g<x.length;g++){var T=x[g],N=this.
_allComponents[T],C=this._localStorage.componentAssetPath(N,this._local());l(C,"Component "+T+" does not have an entry in local storage mapping.")&&n&&l(n.existsSync(C),"Asset "+C+" does not exist.")}}var k=this._componentSourceHrefLookup();if(k){x=Object.keys(k),y=x.length;for(g=0;g<y;g++){var L=this._allComponents[x[g]];L?l(L.state==="modified","Component "+x[g]+" is in local source href mapping but has a state of "+L.state):l(!1,"Component "+x[g]+" is in local source href mapping but could not be found in the manifest."
)}}}return o.length?o:null},a}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXElement",["require","exports","module","./AdobeDCXBranchCore","./AdobeDCXError","./AdobeDCXUtil"],function(e,t,n){"use strict";function u(e,t,n){this._owner=t;if(e)e=this._setData(e,n);else{var i=s.generateUuid();e={id:i},this._core=new r(e,this,n),this._data=e}}var r=e("./AdobeDCXBranchCore"),i=e("./AdobeDCXError"),s=e("./AdobeDCXUtil"),o=5;return Object.defineProperties
(u.prototype,{rootNode:{get:function(){return this._core.rootNode},set:function(e){this._core.rootNode=e}},name:{get:function(){return this._core.rootNode.name},set:function(e){var t=this._core;if(t._readOnly)throw new i(i.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new i(i.INVALID_PARAMS,"Expecting a string or undefined.");t.rootNode.name=e}},type:{get:function(){return this._core.rootNode.type},set:function(e){var t=this._core;if(t._readOnly)throw new 
i(i.READ_ONLY,"This object is read-only.");if(typeof e!="string"||e==="")throw new i(i.INVALID_PARAMS,"Expecting a non-empty string.");t.rootNode.type=e}},compositeHref:{get:function(){return this._owner.compositeHref},set:function(e){throw new i(i.READ_ONLY,'Property "compositeHref" is read-only.')}},_localStorage:{get:function(){return this._core._localStorage},set:function(e){this._core._localStorage=e}},hasLocalStorage:{get:function(){return this._core.hasLocalStorage},set:function(e){this._core
.hasLocalStorage=e}},_isDirty:{get:function(){return this._core._isDirty},set:function(e){this._core._isDirty=e}},isDirty:{get:function(){return this._isDirty},set:function(e){this._core.isDirty=e}},changeCount:{get:function(){return this._core.changeCount},set:function(e){this._core.changeCount=e}}}),u.prototype.getChildWithId=function(e){return this._core.getChildWithId(e)},u.prototype.getChildWithAbsolutePath=function(e){return this._core.getChildWithAbsolutePath(e)},u.prototype.getChildrenOf=
function(e){return this._core.getChildrenOf(e)},u.prototype.addChild=function(e,t,n,r){return this._core.addChild(e,t,n,r)},u.prototype.removeChild=function(e){return this._core.removeChild(e)},u.prototype.moveChild=function(e,t,n){return this._core.moveChild(e,t,n)},u.prototype.copyChild=function(e,t,n,r,i,s){return this._core.copyChild(e,t,n,r,i,s)},u.prototype.allComponents=function(){return this._core.allComponents()},u.prototype.getComponentWithId=function(e){return this._core.getComponentWithId
(e)},u.prototype.getComponentWithAbsolutePath=function(e){return this._core.getComponentWithAbsolutePath(e)},u.prototype.getComponentsOf=function(e){return this._core.getComponentsOf(e)},u.prototype.addComponent=function(e,t,n,r,i,s,o,u,a,f){return this._core.addComponent(e,t,n,r,i,s,o,u,a,f)},u.prototype.addComponentWithUploadResults=function(e,t,n,r,i){return this._core.addComponentWithUploadResults(e,t,n,r,i)},u.prototype.updateComponent=function(e,t,n,r){return this._core.updateComponent(e,t,
n,r)},u.prototype.updateComponentWithUploadResults=function(e,t){return this._core.updateComponentWithUploadResults(e,t)},u.prototype.removeComponent=function(e){return this._core.removeComponent(e)},u.prototype.moveComponent=function(e,t){return this._core.moveComponent(e,t)},u.prototype.copyComponent=function(e,t,n,r,i){return this._core.copyComponent(e,t,n,r,i)},u.prototype.assetOfComponent=function(e,t){return this._core.assetOfComponent(e,t)},u.prototype.parse=function(e){if(typeof e!="string"
)throw new i(i.INVALID_PARAMS,'Param "data" must be a string');var t=null;try{t=JSON.parse(e)}catch(n){throw new i(i.INVALID_JSON,"Manifest could not be parsed. Underlying error: "+n.message)}return this._setData(t,this._core._readOnly)},u.prototype.copy=function(){return new u(JSON.parse(JSON.stringify(this._data)),this._owner)},u.prototype._updateLocalDataFromBranch=function(e){if(this._readOnly)throw new i(i.READ_ONLY,"This object is read-only.");if(!this._localStorage)throw new i(i.NO_LOCAL_STORAGE
,"No local storage.");if(!e._localStorage)throw new i(i.NO_LOCAL_STORAGE,"No local storage for source.");if(this._localStorage.compositePath!==e._localStorage.compositePath)throw new i(i.INVALID_PARAMS,"Branches must have same storage path.");this._core._localStorage.copyLocalStorageData(e,e._core._local(),this,this._core._local()),this._core._copySourceHrefsFrom(e._core)},u.prototype._verify=function(e){return typeof e.id!="string"?new i(i.INVALID_DATA,"Element is missing an id of type string"):typeof 
e.name!="string"?new i(i.INVALID_DATA,"Element is missing a name of type string"):typeof e.type!="string"?new i(i.INVALID_DATA,"Element is missing a type of type string"):null},u.prototype._setData=function(e,t){var n=this._verify(e);if(n===null)return this._core=new r(e,this,t),this._data=e,this;throw n},u.prototype._local=function(){return this._core._local()},u.prototype._setDirty=function(e){this._core._setDirty(e)},u.prototype._setPathOfNode=function(e,t){this._core._setPathOfNode(e,t)},u.prototype
._verifyIntegrity=function(e,t,n){return this._core._verifyIntegrity(e,t,n)},u}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXBranch",["require","exports","module","./AdobeDCXBranchCore","./AdobeDCXElement","./AdobeDCXError","./AdobeDCXUtil"],function(e,t,n){"use strict";function a(e,t){if(e)e=this._setData(e,t);else{var n=o.generateUuid();e={"manifest-format-version":u,id:n},this.originalManifestFormatVersion=u,this._core=new r(e,this,t),this
._data=e}this._pendingElements=[]}function f(e){var t,n,r=e.components;if(r){n=r.length;for(t=0;t<n;t++){var i=r[t];delete i.localStorageAssetId}}var s=e.children;if(s){n=s.length;for(t=0;t<n;t++)f(s[t])}}function l(e){var t=e["manifest-format-version"];if(t<u){if(t!==4)throw new s(s.INVALID_DATA,"Encountered manifest format version "+e["manifest-format-version"]+". Format version conversion not yet implemented for that version.");f(e)}}var r=e("./AdobeDCXBranchCore"),i=e("./AdobeDCXElement"),s=e
("./AdobeDCXError"),o=e("./AdobeDCXUtil"),u=5;return a._newBranchAsCopyOfCore=function(e,t){var n=JSON.parse(JSON.stringify(e._data)),r=new a(n),i=r._core;return r._localStorage=t,r._resetIdentity(function(n){var r=e.getComponentWithId(n.id);if(!r)throw new s(s.INVALID_STATE,"Could not find original component.");if(r.state==="modified"||!r.etag)throw new s(s.INVALID_STATE,"Cannot create a new composite from a branch that contains modified or unbound components.");var o=e._getHrefOfComponent(r);if(!
o)throw new s(s.INVALID_STATE,"Cannot determine the href of component id "+r.id);i._setSourceHrefOfComponent(o,n),t&&t.removeComponentAsset(n,i._local())}),r},Object.defineProperties(a.prototype,{compositeId:{get:function(){return this._core.rootNode.id},set:function(e){var t=this._core;if(t._readOnly)throw new s(s.READ_ONLY,"This object is read-only.");if(typeof e!="string"||e==="")throw new s(s.INVALID_PARAMS,"Expecting a non-empty string.");if(t._allNodes[e])throw new s(s.DUPLICATE_VALUE,"There is already a node with the same id."
);delete t._allNodes[this._data.id],this._data.id=e,t._allNodes[e]=this._core.rootNode,t._setDirty()}},rootNode:{get:function(){return this._core.rootNode},set:function(e){this._core.rootNode=e}},name:{get:function(){return this._core.rootNode.name},set:function(e){var t=this._core;if(t._readOnly)throw new s(s.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new s(s.INVALID_PARAMS,"Expecting a string or undefined.");t.rootNode.name=e}},type:{get:function()
{return this._core.rootNode.type},set:function(e){var t=this._core;if(t._readOnly)throw new s(s.READ_ONLY,"This object is read-only.");if(typeof e!="string"||e==="")throw new s(s.INVALID_PARAMS,"Expecting a non-empty string.");t.rootNode.type=e}},compositeHref:{get:function(){return this._data.local?this._data.local.compositeHref:undefined},set:function(e){var t=this._core;if(t._readOnly)throw new s(s.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new s(
s.INVALID_PARAMS,"Expecting a string or undefined.");t._local().compositeHref=o.ensureRelativeHrefStartsWithSlash(e),t._setDirty()}},_collaborationType:{get:function(){return this._data.local?this._data.local.collaborationType:undefined},set:function(e){var t=this._core;if(t._readOnly)throw new s(s.READ_ONLY,"This object is read-only.");e?t._local().collaborationType=e:delete t._local().collaborationType,t._setDirty(!0)}},manifestEtag:{get:function(){return this._data.local?this._data.local.manifestEtag
:undefined},set:function(e){var t=this._core;if(t._readOnly)throw new s(s.READ_ONLY,"This object is read-only.");if(typeof e!="string"&&typeof e!="undefined")throw new s(s.INVALID_PARAMS,"Expecting a string or undefined.");t._local().manifestEtag=e,t._setDirty()}},compositeState:{get:function(){return this._data.state||"unmodified"},set:function(e){var t=this._core;if(t._readOnly)throw new s(s.READ_ONLY,"This object is read-only.");if(typeof e!="string")throw new s(s.INVALID_PARAMS,"Expecting a string."
);if(e!=="unmodified"&&e!=="modified"&&e!=="pendingDelete"&&e!=="committedDelete")throw new s(s.INVALID_PARAMS,'State must be "modified", "unmodified", "pendingDelete", or "committedDelete".');this._data.state=e,t._setDirty(!0)}},isBound:{get:function(){return this.manifestEtag&&this.compositeHref},set:function(){throw new s(s.READ_ONLY,"Cannot set the property isBound. Use resetIdentity instead.")}},_localStorage:{get:function(){return this._core._localStorage},set:function(e){this._core._localStorage=
e}},hasLocalStorage:{get:function(){return this._core.hasLocalStorage},set:function(e){this._core.hasLocalStorage=e}},_isDirty:{get:function(){return this._core._isDirty},set:function(e){this._core._isDirty=e}},isDirty:{get:function(){return this._core.isDirty},set:function(e){this._core.isDirty=e}},localData:{get:function(){return this._core._stringify(!1,!0)},set:function(){throw new s(s.READ_ONLY,"Cannot set the property localData.")}},remoteData:{get:function(){return this._core._stringify(!0
)},set:function(){throw new s(s.READ_ONLY,"Cannot set the property remoteData.")}},pendingElements:{get:function(){return this._pendingElements},set:function(e){throw new s(s.READ_ONLY,"Cannot set the property pendingElements.")}},changeCount:{get:function(){return this._core.changeCount},set:function(e){this._core.changeCount=e}}}),a.prototype.parse=function(e){if(typeof e!="string")throw new s(s.INVALID_PARAMS,'Param "data" must be a string');var t=null;try{t=JSON.parse(e)}catch(n){throw new s(
s.INVALID_JSON,"Manifest could not be parsed. Underlying error: "+n.message)}return this._setData(t,this._core._readOnly)},a.prototype.getElementWithId=function(e){return this._createElement(this._core.getChildWithId(e))},a.prototype.getElementWithAbsolutePath=function(e){return this._createElement(this._core.getChildWithAbsolutePath(e))},a.prototype.addElement=function(e,t,n,r,i,o){if(typeof e!="string")throw new s(s.INVALID_PARAMS,"Element must have a name of type string");if(typeof t!="string"
)throw new s(s.INVALID_PARAMS,"Element must have a type of type string");if(typeof n!="string")throw new s(s.INVALID_PARAMS,"Element must have a path of type string");var u=this._core.addChild(e,r,i,o);try{u.path=n}catch(a){throw this._core.removeChild(u),a}return u._data.type=t,this._createElement(u)},a.prototype.updateElement=function(e){var t=this.getChildWithId(e.rootNode.id);if(!t)throw new s(s.INVALID_PARAMS,"Element does not exist in branch.");var n=this._core.replaceChild(e.rootNode,t.path
);return this._deleteElement(e),n},a.prototype.abandonElement=function(e){this._deleteElement(e)},a.prototype.getChildWithId=function(e){return this._core.getChildWithId(e)},a.prototype.getChildWithAbsolutePath=function(e){return this._core.getChildWithAbsolutePath(e)},a.prototype.getChildrenOf=function(e){return this._core.getChildrenOf(e)},a.prototype.addChild=function(e,t,n,r){return this._core.addChild(e,t,n,r)},a.prototype.removeChild=function(e){return this._core.removeChild(e)},a.prototype
.moveChild=function(e,t,n){return this._core.moveChild(e,t,n)},a.prototype.copyChild=function(e,t,n,r,i,s){return this._core.copyChild(e,t,n,r,i,s)},a.prototype.replaceChild=function(e,t,n,r){return this._core.replaceChild(e,t,n,r)},a.prototype.allComponents=function(){return this._core.allComponents()},a.prototype.getComponentWithId=function(e){return this._core.getComponentWithId(e)},a.prototype.getComponentWithAbsolutePath=function(e){return this._core.getComponentWithAbsolutePath(e)},a.prototype
.getComponentsOf=function(e){return this._core.getComponentsOf(e)},a.prototype.addComponent=function(e,t,n,r,i,s,o,u,a,f){return this._core.addComponent(e,t,n,r,i,s,o,u,a,f)},a.prototype.addComponentWithUploadResults=function(e,t,n,r,i){return this._core.addComponentWithUploadResults(e,t,n,r,i)},a.prototype.updateComponent=function(e,t,n,r){return this._core.updateComponent(e,t,n,r)},a.prototype.updateComponentWithUploadResults=function(e,t){return this._core.updateComponentWithUploadResults(e,t)
},a.prototype.removeComponent=function(e){return this._core.removeComponent(e)},a.prototype.moveComponent=function(e,t){return this._core.moveComponent(e,t)},a.prototype.copyComponent=function(e,t,n,r,i){return this._core.copyComponent(e,t,n,r,i)},a.prototype.replaceComponent=function(e,t,n,r){return this._core.replaceComponent(e,t,n,r)},a.prototype.assetOfComponent=function(e,t){return this._core.assetOfComponent(e,t)},a.prototype.copy=function(){return new a(JSON.parse(JSON.stringify(this._data
)))},a.prototype._createElement=function(e){var t;if(e){var n=JSON.parse(JSON.stringify(e._data));n["manifest-format-version"]=this._data["manifest-format-version"],delete n.path,t=new i(n,this,this._core._readOnly),t&&this._localStorage&&(t._localStorage=this._localStorage,t._updateLocalDataFromBranch(this),this._localStorage.registerInMemoryBranchOrElement(t))}return t&&this._pendingElements.push(t),t},a.prototype._deleteElement=function(e){var t=this._pendingElements.indexOf(e);if(t<0)throw new 
s(s.INVALID_PARAMS,"Unknown element.");this._pendingElements.splice(t,1),this._localStorage&&this._localStorage.unregisterInMemoryBranchOrElement(e)},a.prototype._updateLocalDataFromBranch=function(e){if(this._readOnly)throw new s(s.READ_ONLY,"This object is read-only.");if(!this._localStorage)throw new s(s.NO_LOCAL_STORAGE,"No local storage.");if(!e._localStorage)throw new s(s.NO_LOCAL_STORAGE,"No local storage for source.");if(this._localStorage.compositePath!==e._localStorage.compositePath)throw new 
s(s.INVALID_PARAMS,"Branches must have same storage path.");this._core._localStorage.copyLocalStorageData(e,e._core._local(),this,this._core._local()),this._core._copySourceHrefsFrom(e._core)},a.prototype._verify=function(e){return typeof e.id!="string"?new s(s.INVALID_DATA,"Manifest is missing an id of type string"):typeof e.name!="string"?new s(s.INVALID_DATA,"Manifest is missing a name of type string"):typeof e.type!="string"?new s(s.INVALID_DATA,"Manifest is missing a type of type string"):typeof 
e["manifest-format-version"]!="number"?new s(s.INVALID_DATA,"Manifest is missing a manifest-format-version of type number"):null},a.prototype._setData=function(e,t){this.originalManifestFormatVersion=e["manifest-format-version"],l(e),e.local&&(e.local.version=2);var n=this._verify(e);if(n===null)return e["manifest-format-version"]=u,this._core=new r(e,this,t),this._data=e,this;throw n},a.prototype._reset=function(e,t){if(this._readOnly)throw new s(s.READ_ONLY,"This object is read-only.");this._data
.local&&(delete this._data.local.manifestEtag,delete this._data.local.compositeHref),e||(this._data.id=o.generateUuid()),this._data.state="modified",this._core._recursiveReset(this._data,t),this._core._setDirty()},a.prototype._resetBinding=function(e){this._reset(!0,e)},a.prototype._resetIdentity=function(e){this._reset(!1,e)},a.prototype._local=function(){return this._core._local()},a.prototype._setDirty=function(e){this._core._setDirty(e)},a.prototype._setPathOfNode=function(e,t){this._core._setPathOfNode
(e,t)},a.prototype._verifyIntegrity=function(e,t,n){return this._core._verifyIntegrity(e,t,n)},a}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXPushJournal",["require","exports","module","./AdobeDCXError","./AdobeDCXFS","./AdobeDCXUtil"],function(e,t,n){"use strict";function u(e,t,n){n?this._setData(n,e.href):this._data={"push-journal-format-version":o,"composite-href":e.href,"uploaded-components":{}},this._filePath=t,this._waitingCallbacks=
[],this._commitInProgress=!1,this._needAnotherCommit=!1}var r=e("./AdobeDCXError"),i=e("./AdobeDCXFS"),s=e("./AdobeDCXUtil"),o=3;return u.readJournal=function(e,t,n,r){i.readFile(e,"utf8",function(i,s){var o;i&&i.code&&n&&(i=undefined);if(!i)try{s=JSON.parse(s),o=new u(t,e,s)}catch(a){n?o=new u(t,e):i=a}r(i,i?undefined:o)})},Object.defineProperties(u.prototype,{compositeHref:{get:function(){return this._data["composite-href"]},set:function(e){throw new r(r.READ_ONLY,"This property is read-only.")
}},manifestEtag:{get:function(){return this._data.etag},set:function(e){e?this._data.etag=e:delete this._data.etag}},changeCount:{get:function(){return this._data.change},set:function(e){e?this._data.change=e:delete this._data.change}},compositeHasBeenCreated:{get:function(){return this._data["composite-created"]?!0:!1},set:function(e){e?this._data["composite-created"]=!0:delete this._data["composite-created"]}},compositeHasBeenDeleted:{get:function(){return this._data["composite-deleted"]?!0:!1}
,set:function(e){e?this._data["composite-deleted"]=!0:delete this._data["composite-deleted"]}},isEmpty:{get:function(){return Object.keys(this._data["uploaded-components"]).length===0&&!this.compositeHasBeenDeleted&&!this.manifestEtag},set:function(e){throw new r(r.READ_ONLY,"This property is read-only.")}},isComplete:{get:function(){return this._data.etag&&this._data.change||this._data["composite-deleted"]?!0:!1},set:function(e){throw new r(r.READ_ONLY,"This property is read-only.")}}}),u.prototype
.recordUploadedComponent=function(e,t,n,r,i,s,o){var u={etag:t,length:i,version:n,md5:r};s&&(u["storage-name"]=s),o&&(u["source-href"]=o),this._data["uploaded-components"][e]=u},u.prototype.idsOfAllUploadedComponents=function(){return Object.keys(this._data["uploaded-components"])},u.prototype.getRecordForUploadedComponent=function(e){return this._data["uploaded-components"][e]},u.prototype.removeRecordForUploadedComponent=function(e){delete this._data["uploaded-components"][e]},u.prototype.applyToBranch=
function(e,t){if(!this.isComplete)throw new r(r.INVALID_STATE,"Journal is not complete.");var n=e.isDirty;if(this.compositeHasBeenDeleted)e._data.state="committedDelete",e.manifestEtag=this.manifestEtag;else{var i=e.compositeState!=="unmodified"&&this.changeCount!==e.changeCount,s=this.idsOfAllUploadedComponents(),o,u=s.length;for(o=0;o<u;o++){var a=s[o],f=e.getComponentWithId(a);if(f){var l=this.getRecordForUploadedComponent(f.id);f._data.etag=l.etag,f._data.length=l.length,f._data.version=l.version
,f._data.md5=l.md5,l["source-href"]?e._core._getSourceHrefOfComponent(f)===l["source-href"]&&(f._data.state="unmodified",e._core._setSourceHrefOfComponent(undefined,f)):e.hasLocalStorage&&e._localStorage.componentAssetName(f,e._local())===l["storage-name"]?(f._data.state="unmodified",e._core._setSourceHrefOfComponent(undefined,f)):e.hasLocalStorage||(f._data.state="unmodified")}}e.manifestEtag=this.manifestEtag,i||(e._data.state="unmodified")}t&&(e._isDirty=n)},u.prototype.commitChanges=function(
e){if(!this._filePath){e&&e();return}var t=this,n=function(e){t._needAnotherCommit=!1,t._commitInProgress=!0,t._waitingCallbacks=[],i.writeFileAtomically(t._filePath,JSON.stringify(t._data),"utf8",function(r){var i,s=e.length;for(i=0;i<s;i++)try{e[i](r)}catch(o){}t._needAnotherCommit?n(t._waitingCallbacks):t._commitInProgress=!1})};t._commitInProgress?(this._needAnotherCommit=!0,e&&this._waitingCallbacks.push(e)):n(e?[e]:[])},u.prototype._setData=function(e,t){if(e["push-journal-format-version"]<=2
){var n=e["uploaded-components"];if(n){var r=Object.keys(n),i,s=r.length;for(i=0;i<s;i++){var u=r[i],a=n[u];typeof a.version=="number"&&(a.version=String(a.version))}}e["push-journal-format-version"]=o}var f=this._verify(e,t);if(f===null)return this._data=e,this;throw f},u.prototype._verify=function(e,t){return e["push-journal-format-version"]!==o?new r(r.INVALID_DATA,"Wrong push journal format version."):e["composite-href"]!==t?new r(r.INVALID_DATA,"Composite and journal hrefs mismatch."):e["uploaded-components"
]?null:new r(r.INVALID_DATA,"Missing component list.")},u}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXLocalStorage",["require","exports","module","./AdobeDCXError","./AdobeDCXUtil","./AdobeDCXFS"],function(e,t,n){"use strict";function o(e,t){if(typeof e!="string"||e==="")throw new r(r.INVALID_PARAMS,'Param "compositePath" must be a non-empty string.');this._compositePath=e,this._preserveFileExtensions=t,this._inMemoryBranchesAndElements=[
],this._inflightComponents=[]}var r=e("./AdobeDCXError"),i=e("./AdobeDCXUtil"),s=e("./AdobeDCXFS");Object.defineProperties(o.prototype,{compositePath:{get:function(){return this._compositePath},set:function(e){if(typeof e!="string"||e==="")throw new r(r.INVALID_PARAMS,'Param "compositePath" must be a non-empty string.');this._compositePath=e}}}),o.prototype.currentManifestPath=function(){return this._compositePath+"/manifest"},o.prototype.currentBaseManifestPath=function(){return this._compositePath+"/manifest.base"
},o.prototype.pulledManifestPath=function(){return this._compositePath+"/pull.manifest"},o.prototype.pulledBaseManifestPath=function(){return this._compositePath+"/pull.manifest.base"},o.prototype.pushedManifestPath=function(){return this._compositePath+"/push.manifest"},o.prototype.resolvePulledBranch=function(e,t){var n=this;s.writeFileAtomically(this.currentManifestPath(),e.localData,"utf8",function(e){e?(e.code!==r.OUT_OF_SPACE&&(e=new r(r.INVALID_STATE,"Could not write current manifest.",e))
,t(e)):s.move(n.pulledManifestPath(),n.currentBaseManifestPath(),!1,function(e){e?t(new r(r.INVALID_STATE,"Could not move pull manifest.",e)):n._deleteJournal(t)})})},o.prototype.acceptPushedBranch=function(e,t){var n=this;s.writeFileAtomically(this.currentManifestPath(),e.localData,"utf8",function(e){e?(e.code!==r.OUT_OF_SPACE&&(e=new r(r.INVALID_STATE,"Could not write current manifest.",e)),t(new r(r.INVALID_STATE,"Could not write current manifest.",e))):s.move(n.pushedManifestPath(),n.currentBaseManifestPath
(),!1,function(e){e?t(new r(r.INVALID_STATE,"Could not move push manifest.",e)):n._deleteJournal(t)})})},o.prototype.discardPulledBranch=function(e){var t=this;s.deleteFile(this.pulledManifestPath(),e)},o.prototype.discardPushedBranch=function(e){var t=this;s.deleteFile(this.pushedManifestPath(),function(n){n?e(n):t._deleteJournal(e)})},o.prototype.discardBaseBranch=function(e){s.deleteFile(this.currentBaseManifestPath(),e)},o.prototype.registerInMemoryBranchOrElement=function(e){if(this._inMemoryBranchesAndElements
.indexOf(e)>=0)throw new r(r.INVALID_STATE,"Branch or element is already registered.");this._inMemoryBranchesAndElements.push(e)},o.prototype.unregisterInMemoryBranchOrElement=function(e){var t=this._inMemoryBranchesAndElements.indexOf(e);if(t<0)throw new r(r.INVALID_STATE,"Unknown branch or element.");this._inMemoryBranchesAndElements.splice(t,1)},o.prototype._deleteJournal=function(e){s.deleteFile(this.pushJournalPath(),e)};var u=/(\/)|(\.$)/;return o.prototype.componentAssetName=function(e,t){
var n=t["copyOnWrite#storageIds"],r=n?n[e.id]:null;return r&&u.test(r)&&(r=null),r},o.prototype.componentAssetPath=function(e,t){var n=this.componentAssetName(e,t);return n?this._componentPathFromName(n):null},o.prototype.ingestComponentAsset=function(e,t,n,i,o){var u=this,a=this._newFileNameForComponent(e),f=this._componentPathFromName(a);this._inflightComponents.push(a);var l=function(t){if(!t)try{u._setComponentName(e,i,a)}catch(n){t=n}var s=u._inflightComponents.indexOf(a);s<0&&!t&&(t=new r(r
.INVALID_STATE,"Could not find inflight component.")),u._inflightComponents.splice(s,1),o(t)};n?s.copyFile(t,f,l):s.move(t,f,!0,l)},o.prototype.removeComponentAsset=function(e,t){var n=t["copyOnWrite#storageIds"];n&&delete n[e.id]},o.prototype.componentIds=function(e){var t=e["copyOnWrite#storageIds"];return t?Object.keys(t):[]},o.prototype.copyLocalStorageData=function(e,t,n,r){var i=n.allComponents(),s,o=i.length,u=t["copyOnWrite#storageIds"];if(!u)return;var a=r["copyOnWrite#storageIds"];a||(a=
r["copyOnWrite#storageIds"]={});for(s=0;s<o;s++){var f=i[s],l=f.id,c=e.getComponentWithId(l);if(c&&c.etag===f.etag){var h=u[l];h&&(a[l]=h)}}},o.prototype.removeUnusedLocalFiles=function(e,t){var n=this,i,o,u,a,f,l=function(e){n._deleteComponentAsset(e,function(e){e&&!i&&(i=e),f--,f===0&&t(i)})},c=function(){try{var e,r=a.length,i=[];for(e=0;e<r;e++){var s=a[e].name,c=a[e].info;!o[s]&&c.mtime.getTime()<u&&n._inflightComponents.indexOf(s)<0&&i.push(s)}f=r=i.length;if(f>0)for(e=0;e<r;e++)l(i[e])}catch(
h){t(h);return}f===0&&t()};this._gatherComponentAssetNames([this.currentManifestPath(),this.currentBaseManifestPath(),this.pulledManifestPath(),this.pulledBaseManifestPath(),this.pushedManifestPath()],e,function(e,n,s,f){if(i){t(i);return}if(!e)try{if(n<1||!f)throw new r(r.INVALID_STATE,n<1?"No manifest found.":"Invalid time stamp");o=s,u=f}catch(l){e=l}e&&(i=e),a&&(i?t(i):c())}),s.directoryListing(this._compositePath+"/components",function(e,n){if(i){t(i);return}if(!e)try{a=n}catch(r){e=r}e&&(i=
e),o&&(i?t(i):c())})},o.prototype.tempPathForComponent=function(){return this._compositePath+"/tmp/"+i.generateUuid()},o.prototype.deleteTempFiles=function(e){s.deleteDirectory(this._compositePath+"/tmp",e)},o.prototype.clientDataPath=function(){return this._compositePath+"/clientdata"},o.prototype.pushJournalPath=function(){return this._compositePath+"/push.journal"},o.prototype._copyComponentMapping=function(e,t,n,r){var i=t["copyOnWrite#storageIds"];if(!i)return undefined;var s=r["copyOnWrite#storageIds"
];s||(s=r["copyOnWrite#storageIds"]={});var o=i[e];return o&&(s[n]=o),o},o.prototype._componentPathFromName=function(e){return this._compositePath+"/components/"+e},o.prototype._newFileNameForComponent=function(e){var t=i.generateUuid();if(this._preserveFileExtensions){var n=e.path?i.filePathComponents(e.path).extension:null;n&&(t=t+"."+n)}return t},o.prototype._setComponentName=function(e,t,n){var r=t["copyOnWrite#storageIds"];r||(r=t["copyOnWrite#storageIds"]={}),r[e.id]=n},o.prototype._gatherComponentAssetNames=
function(e,t,n){try{var r={},o=t||i.timeStamp(!0),u,a=e.length,f=a,l=0,c,h=function(e){if(e){e=e["copyOnWrite#storageIds"];var t=Object.keys(e),n;for(n=0;n<t.length;n++){var i=e[t[n]];r[i]=!0}}},p=function(e){s.exists(e,function(t){t?(l++,s.info(e,function(t,i){if(!t)try{var u=i.mtime.getTime();u<o&&(o=u),s.readFile(e,"utf8",function(e,t){f--;if(!e)try{t=JSON.parse(t),h(t.local)}catch(i){e=i}e&&!c&&(c=e),f===0&&n(c,l,r,o)})}catch(a){t=a}t&&(f--,c||(c=t),f===0&&n(c))})):(f--,f===0&&n(c,l,r,o))})};
for(u=0;u<a;u++)p(e[u]);a=this._inMemoryBranchesAndElements.length;for(u=0;u<a;u++)h(this._inMemoryBranchesAndElements[u]._local())}catch(d){n(d)}},o.prototype._deleteComponentAsset=function(e,t){s.deleteFile(this._componentPathFromName(e),t)},o}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXComposite",["require","exports","module","./AdobeDCXError","./AdobeDCXBranch","./AdobeDCXPushJournal","./AdobeDCXLocalStorage","./AdobeDCXFS","./AdobeDCXUtil"
],function(e,t,n){"use strict";function l(e,t,n,r,s,o){s=a.ensureRelativeHrefStartsWithSlash(s),this._options=o||{},n?this._setPath(n):s?(this._href=s,e&&(this._name=e),t&&(this._type=t),r&&(this._id=r)):t&&(this._current=new i,e&&(this._current._data.name=e),this._current._data.type=t,r&&(this._current.compositeId=r)),this._autoRemoveUnusedLocalFiles=!0,this._options.xhrBaseBranchSupport&&(this._baseBranchData=undefined,this._pushedBranchData=undefined,this._pulledBranchData=undefined),this._collaborationType=
f.PRIVATE}var r=e("./AdobeDCXError"),i=e("./AdobeDCXBranch"),s=e("./AdobeDCXPushJournal"),o=e("./AdobeDCXLocalStorage"),u=e("./AdobeDCXFS"),a=e("./AdobeDCXUtil"),f={PRIVATE:undefined,SHARED_BY_USER:"sharedByUser",SHARED_WITH_USER:"sharedWithUser"};return l.newCompositeAsCopyOf=function(e,t,n,s,o,u,f){var c=e._core;c||e.current&&(c=e.current._core);if(!c)throw new r(r.INVALID_PARAMS,"compositeBranchOrElement must be a branch, an element or a composite with a current branch.");var h=new l(undefined
,undefined,undefined,undefined,undefined,f);return s&&(h.path=s),h._current=i._newBranchAsCopyOfCore(c,this._localStorage),h.id=o||a.generateUuid(),t&&(h.name=t),n&&(h.type=n),u&&(h.href=u),h},l.COLLABORATION=f,Object.defineProperties(l.prototype,{id:{get:function(){return this._current?this._current.compositeId:this._id},set:function(e){if(typeof e!="string")throw new r(r.INVALID_PARAMS,"Expecting a string.");this._current&&(this._current.compositeId=e),this._id=e}},name:{get:function(){return this
._current?this._current.name:this._name},set:function(e){if(typeof e!="string")throw new r(r.INVALID_PARAMS,"Expecting a string.");this._current&&(this._current.name=e),this._name=e}},type:{get:function(){return this._current?this._current.type:this._type},set:function(e){if(typeof e!="string")throw new r(r.INVALID_PARAMS,"Expecting a string.");this._current&&(this._current.type=e),this._type=e}},href:{get:function(){return this._current?this._current.compositeHref:this._href},set:function(e){if(typeof 
e!="string")throw new r(r.INVALID_PARAMS,"Expecting a string.");e=a.ensureRelativeHrefStartsWithSlash(e),this._current&&(this._current.compositeHref=e),this._href=e}},collaborationType:{get:function(){return this._current?this._current._collaborationType:this._collaborationType},set:function(e){if(e!==f.PRIVATE&&e!==f.SHARED_BY_USER&&e!==f.SHARED_WITH_USER)throw new r(r.INVALID_PARAMS,"Invalid value: ."+e);this._current&&(this._current._collaborationType=e),this._collaborationType=e}},path:{get:function(
){return this._path},set:function(e){if(typeof e!="string")throw new r(r.INVALID_PARAMS,"Expecting a string.");this._setPath(e)}},isBound:{get:function(){return this._current&&this._current.isBound||!this._current&&this._href},set:function(){throw new r(r.READ_ONLY,"Cannot set the property isBound. Use resetIdentity or resetBinding instead.")}},hasLocalStorage:{get:function(){return this._localStorage},set:function(){throw new r(r.READ_ONLY,"Cannot set the property hasLocalStorage.")}},autoRemoveUnusedLocalFiles
:{get:function(){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");return this._autoRemoveUnusedLocalFiles},set:function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");this._autoRemoveUnusedLocalFiles=e}},clientDataStoragePath:{get:function(){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");return this._localStorage.clientDataPath()},set:function(e){throw new r(r.READ_ONLY,'Property "clientDataStoragePath" is read-only.'
)}},current:{get:function(){return this._current},set:function(e){throw new r(r.READ_ONLY,'Property "current" is read-only.')}}}),l.prototype.loadCurrentFromLocalStorage=function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");var t=this;this._loadBranch(this._localStorage.currentManifestPath(),!1,function(n,r){if(!n&&r)try{t._current=r,t._currentBranchCommittedAtDate=a.timeStamp(!0)}catch(i){n=i}e(n,n?undefined:r)})},l.prototype.commitChanges=function(e){if(!this._localStorage
)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");if(!this._current)return e(new r(r.INVALID_STATE,"Current branch is not in memory."));var t=this;u.writeFileAtomically(this._localStorage.currentManifestPath(),this._current.localData,"utf8",function(n){if(!n)try{t._currentBranchCommittedAtDate=a.timeStamp(!0),t._current._isDirty=!1}catch(r){n=r}e(n)})},l.prototype.tempAssetPath=function(){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");return this._localStorage.tempPathForComponent
()},l.prototype.deleteTempFiles=function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");this._localStorage.deleteTempFiles(function(t){e&&e(t)})},l.prototype.removeUnusedLocalFiles=function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");this._localStorage.removeUnusedLocalFiles(this._currentBranchCommittedAtDate,e)},l.prototype.removeLocalStorage=function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");if(!
this._path)return e(new r(r.INVALID_STATE,"No path set."));u.deleteDirectory(this._path,e)},l.prototype.loadBaseBranch=function(e){if(!this._localStorage&&!this._baseBranchData)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");if(this._localStorage)this._loadBranch(this._localStorage.currentBaseManifestPath(),!0,e);else{var t,n;try{n=(new i(undefined,!0)).parse(this._baseBranchData)}catch(s){t=s}e(t,n)}},l.prototype.loadPulledBranch=function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE
,"No local storage.");this._loadBranch(this._localStorage.pulledManifestPath(),!1,e)},l.prototype.loadPushedBranch=function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");this._loadBranch(this._localStorage.pushedManifestPath(),!1,e)},l.prototype.resolvePullWithBranch=function(e,t){if(!e)throw new r(r.INVALID_PARAMS,"Need a branch.");if(e===this._current)throw new r(r.INVALID_PARAMS,"Cannot resolve current.");if(this._localStorage&&!t)throw new r(r.INVALID_PARAMS,"Need a callback function."
);if(this._localStorage){var n=this;n._localStorage.resolvePulledBranch(e,function(r){if(!r)try{n._current=e,n._autoRemoveUnusedLocalFiles&&n._localStorage.removeUnusedLocalFiles(n._currentBranchCommittedAtDate,function(e){})}catch(i){r=i}t(r,r?undefined:n._current)})}else{this._options.xhrBaseBranchSupport&&(this._baseBranchData=this._pulledBranchData,this._pulledBranchData=undefined),this._current=e;if(!t)return this._current;t(undefined,this._current)}},l.prototype.acceptPush=function(e){if(this
._localStorage&&!e)throw new r(r.INVALID_PARAMS,"Need a callback function.");var t,n,i=this,o=function(r){if(!r)if(t)try{i._localStorage?(t.applyToBranch(n),i._localStorage.acceptPushedBranch(n,function(n){if(!n)try{t.applyToBranch(i._current,!0),i._autoRemoveUnusedLocalFiles&&i._localStorage.removeUnusedLocalFiles(i._currentBranchCommittedAtDate,function(e){})}catch(r){n=r}e(n)})):(t.applyToBranch(i._current,!0),i._options.xhrBaseBranchSupport&&(i._baseBranchData=i._pushedBranchData,i._pushedBranchData=
undefined),i._pushJournal=undefined,e&&e())}catch(s){r=s}else e&&e();if(r){if(!e)throw r;e(r)}};if(!this._localStorage)return t=this._pushJournal,o();var u,a=2;s.readJournal(i._localStorage.pushJournalPath(),i,!1,function(e,n){a--,u?o():(e?e.code!=="ENOENT"&&(u=new r(r.INVALID_STATE,"Failed to load push journal.",e)):t=n,a||o())}),this._loadBranch(this._localStorage.currentManifestPath(),!1,function(e,t){a--,u?o():(e?u=new r(r.INVALID_STATE,"Failed to load current manifest.",e):n=t,a||o())})},l.prototype
.discardPulledBranch=function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");var t=this;this._localStorage.discardPulledBranch(function(n){if(!n){try{t._autoRemoveUnusedLocalFiles&&t._localStorage.removeUnusedLocalFiles(t._currentBranchCommittedAtDate,function(e){})}catch(r){n=r}e(n)}n&&e(n)})},l.prototype.discardPushedBranch=function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");var t=this;this._localStorage.discardPushedBranch(function(
n){if(!n){try{t._autoRemoveUnusedLocalFiles&&t._localStorage.removeUnusedLocalFiles(t._currentBranchCommittedAtDate,function(e){})}catch(r){n=r}e(n)}n&&e(n)})},l.prototype.resetBinding=function(e){delete this._href,this._current&&this._current._resetBinding(),this._localStorage?this._discardEveryBranchButCurrent(e):(this._baseBranchData=undefined,this._pushedBranchData=undefined,this._pulledBranchData=undefined,e&&e())},l.prototype.resetIdentity=function(e){var t=this;delete this._href,this._current?
(this._current._resetIdentity(),this._id=this._current.compositeId):this._id=a.generateUuid(),this._localStorage?this._discardEveryBranchButCurrent(e):(this._baseBranchData=undefined,this._pushedBranchData=undefined,this._pulledBranchData=undefined,e&&e())},l.prototype._loadBranch=function(e,t,n){if(typeof n!="function")throw new r(r.INVALID_PARAMS,'Param "callback" must be a function.');var s=this;u.exists(e,function(r){r?u.readFile(e,"utf8",function(e,r){var o;if(!e)try{o=(new i(undefined,t)).parse
(r),o._localStorage=s._localStorage}catch(u){e=u}n(e,o)}):n()})},l.prototype._discardEveryBranchButCurrent=function(e){if(!this._localStorage)throw new r(r.NO_LOCAL_STORAGE,"No local storage.");var t=this,n=3,i,s=function(r){r&&!i&&(i=r),n--,n===0&&(!i&&t._autoRemoveUnusedLocalFiles&&t._localStorage.removeUnusedLocalFiles(t._currentBranchCommittedAtDate,function(e){}),e(i))};this._localStorage.discardPushedBranch(s),this._localStorage.discardPulledBranch(s),this._localStorage.discardBaseBranch(s)
},l.prototype._setPath=function(e){this._localStorage?this._localStorage.compositePath=e:u.canUseFileSystem&&(this._localStorage=new o(e,this._options.preserveFileExtensions),this._current&&(this._current._localStorage=this._localStorage)),this._path=e},l});if(typeof nodeRequire!="function")var nodeRequire=require;define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeNetworkHTTPService",["require","exports","module","./AdobeDCXUtil","./AdobeDCXError","./AdobeDCXFS"
],function(e,t,n){"use strict";function c(e){this.filename=e}function h(){}function p(e){this._requestQueue=[],this._requestsOutstanding=[],this._rejectedAuths=[],this._authCallback=e,this._isActive=!0,this._waitingForAuthentication=!1,this._currentAuthId=r.generateUuid(),this._https=u,this._XMLHttpRequest=o,this._maxOutstanding=5}var r=e("./AdobeDCXUtil"),i=e("./AdobeDCXError"),s=e("./AdobeDCXFS"),o,u,a;typeof global!="undefined"&&global.Buffer?(u=nodeRequire("https"),a=nodeRequire("url")):o=window
.XMLHttpRequest;var f=r.merge,l=3e5;return Object.defineProperties(p.prototype,{isActive:{get:function(){return this._isActive},set:function(e){var t=this._isActive;t!==e&&(this._isActive=e,e||(this._authValue=undefined,this._checkQueue()))}},crossOriginCredentials:{get:function(){return this._withCredentials},set:function(e){this._withCredentials=e}},maxOutstanding:{get:function(){return this._maxOutstanding},set:function(e){this._maxOutstanding=e,this._checkQueue()}}}),p.prototype._forceXhr=function(
e){this._https=undefined,this._XMLHttpRequest=e||o||nodeRequire("xhr2")},p.FileContent=c,p.StreamProvider=h,p.prototype.setAdditionalHeaders=function(e){this._additionalHeaders=e||{}},p.prototype.setAdditionalNodeOptions=function(e){this._additionalNodeOptions=e},p.prototype.setApiKey=function(e){this._apiKey=e},p.prototype.setTimeout=function(e){this._timeout=e},p.prototype.setAuthToken=function(e){e?(this._authValue="Bearer "+e,this.resume()):(this._authValue=undefined,this._currentAuthId=r.generateUuid
())},p.prototype.resume=function(){this._currentAuthId=r.generateUuid(),this._waitingForAuthentication=!1,this._checkQueue()},p.prototype.setRequestHooks=function(e,t){this._beforeHook=e,this._afterHook=t},p.prototype.invoke=function(e,t,n,o,u,a){u=u||{};var l=u.responseType;if(l instanceof c){if(!s.canUseFileSystem)throw new i(i.INVALID_PARAMS,"No filesystem access")}else if(l==="buffer"){if(typeof Buffer!="function")throw new i(i.INVALID_PARAMS,"No Buffer class")}else if(l==="blob"){if(typeof Blob!="function"
)throw new i(i.INVALID_PARAMS,"No Blob class")}else if(l&&l!=="text"&&l!=="json"&&l!=="arraybuffer")throw new i(i.INVALID_PARAMS,"Unsupported response type");n=f({},n,this._additionalHeaders),this._apiKey&&(n["x-api-key"]=this._apiKey);var h={method:e,href:t,headers:n,callback:a,body:o,options:u},p=u.reuseRequestDesc;if(p){if(this._requestQueue.indexOf(p)>=0||this._requestsOutstanding.indexOf(p)>=0)throw new i(i.INVALID_PARAMS,"Request descriptor still in use.");h=r.merge(p,h)}return this._doRequest
(h),h},p.prototype._doRequest=function(e){function m(n,r){var s=t._requestsOutstanding.indexOf(e);s>=0&&t._requestsOutstanding.splice(s,1);var o=e.callback;o&&(e.callback=undefined,n&&(n.clientRequest=e.clientRequest,n.xhr=e.xhr),n&&n.code!==i.SERVICE_IS_INACTIVE&&!t._isActive?n=new i(i.SERVICE_IS_INACTIVE,"Service is now inactive",n):e.timedOut&&(n=new i(i.TIMED_OUT,"timed out request",n)),o(n,r)),t._isActive&&t._checkQueue()}function g(n){function a(){if(o)return;return o=!0,m(undefined,n)}var s=!1
,o=!1,f=t._requestsOutstanding.indexOf(e);if(f<0){t._checkQueue();return}e.response=n;if(n.statusCode===401&&t._authCallback)t._requestsOutstanding.splice(f,1),t._requestQueue.unshift(e),t._authFail(e),r.consumeStream(n);else{var c=e.progress;n.statusCode===200||n.statusCode===201||n.statusCode===202?(n.on("data",function(e){e.length&&c&&c(e.length),u||l.push(e)}),u&&(n.pipe(u),s=!0)):r.consumeStream(n),n.once("end",function(){var r=t._requestsOutstanding.indexOf(e);if(r<0)return;t._requestsOutstanding
.splice(r,1),t._checkQueue();if(s)return;if(o)return;return o=!0,n.response=Buffer.concat(l),d==="arraybuffer"?n.response=new ArrayBuffer(n.response):d==="text"&&(n.response=n.response.toString()),m(undefined,n)}),n.once("close",function(){if(o)return;return o=!0,m(new i(i.NETWORK_ERROR,"incomplete response"))}),s&&(u.once("finish",a),u.once("close",a))}}function y(){var u=e.progress;if(u&&n.response){var a=n.response.length;u(a-o),o=a}if(n.readyState!==4)return;if(n.status===0)return m(new i(i.UNEXPECTED
,"XHR failure"));var f=t._requestsOutstanding.indexOf(e);if(f<0){t._checkQueue();return}t._requestsOutstanding.splice(f,1);if(n.status!==401||!t._authCallback){e.xhr=n,e.response=n,n.statusCode=n.status,n.headers=r.parseHeaders(n.getAllResponseHeaders());if(d instanceof c){var l=n.response.response;s.writeFileAtomically(d.filename,l,undefined,function(e){return e?m(new i(i.UNEXPECTED,"Can't create file",e,n)):m(undefined,n)});return}return u&&p&&u(p.length||p.size),m(undefined,n)}t._requestQueue.
unshift(e),t._authFail(e),t._checkQueue()}function b(n){n.pipe(v),n.once("error",function(n){return t.abort(e),m(new i(i.TERMINATED_INPUTSTREAM,"Input stream terminated abnormally",n))})}var t=this,n,o=0,u,l=[],p=e.body,d=e.options.responseType,v;if(!this._isActive)return m(new i(i.SERVICE_IS_INACTIVE,"Network request in inactive state"));if(this._waitingForAuthentication||this._requestsOutstanding.length>=this._maxOutstanding||e.options.noSoonerThen)this._requestQueue.push(e),this._waitingForAuthentication||
this._checkQueue();else{var w=e.headers;if(w.Authorization===null)delete w.Authorization;else{if(!this._allowAuthTokenToBeSentInsecurely_DONT_USE_THIS_IN_PRODUCTION&&e.href.indexOf("https:")!==0)return m(new i(i.INVALID_PARAMS,"Must not send auth token over unsecured connection"));this._authValue&&(w.Authorization=this._authValue)}this._currentAuthId&&(e.authId=this._currentAuthId),this._beforeHook&&this._beforeHook(e),w["X-Request-Id"]=r.generateUuid();if(this._https){d instanceof c&&(u=s.createWriteStream
(d.filename)),this._requestsOutstanding.push(e);var E=a.parse(e.href),S=f({},this._additionalNodeOptions,E);S.method=e.method||"GET",S.headers=w,v=this._https.request(S,g),e.clientRequest=v,v.once("error",m),t._timeout&&v.setTimeout(t._timeout,function(){e.timedOut=!0,v.abort()}),e.bytesSent=0,e.bytesReported=0,v.once("end",function(){if(e.progress){var t=e.bytesSent-e.bytesReported;t>0&&(e.progress(t),e.bytesReported+=t)}});var x=v.write;v.write=function(t){var n=t&&t.length;n&&(e.bytesSent+=n),
x.call(v,t,function(){e.progress&&t&&(e.progress(n),e.bytesReported+=n)})};if(p instanceof c){var T=s.createReadStream(p.filename);b(T)}else if(p instanceof h)if(p.getStream){var N=p.getStream();b(N)}else p.getStreamAsync&&p.getStreamAsync(function(n,r){if(n)return t.abort(e),m(new i(i.TERMINATED_INPUTSTREAM,"Error creating input stream",n));b(r)});else if(p instanceof Buffer)v.write(p),v.end();else if(p instanceof ArrayBuffer)v.write(new Buffer(new Int8Array(p))),v.end();else if(typeof p=="string"
)v.write(new Buffer(p,"utf8")),v.end();else{if(!!p)return m(new i(i.INVALID_PARAMS,"Invalid data type"));v.end()}this._afterHook&&this._afterHook(e,v)}else{if(p instanceof c){if(!s.canUseFileSystem)return m(new i(i.INVALID_PARAMS,"Can't use FileContent without filesystem support"));s.readFile(p.filename,{},function(n,r){if(n)return m(n);e.body=r,t._doRequest(e)});return}typeof Buffer=="function"&&p instanceof Buffer&&(e.body=p=new Int8Array(p)),this._requestsOutstanding.push(e),n=new this._XMLHttpRequest
,n.open(e.method,e.href,!0),this._withCredentials&&(n.withCredentials=!0),d&&(d instanceof c?n.responseType="buffer":n.responseType=d),n.onreadystatechange=y;var C;for(C in w)w.hasOwnProperty(C)&&n.setRequestHeader(C,w[C]);e.xhr=n,t._timeout&&(n.timeout=t._timeout,n.ontimeout=function(){e.timedOut=!0,n.abort()}),p?n.send(p):n.send(),this._afterHook&&this._afterHook(e,n)}}},p.prototype._authFail=function(e){if(this._authCallback){var t=e.authId;if(this._rejectedAuths.indexOf(t)!==-1)return;this._authValue=
null,this._waitingForAuthentication=!0,this._rejectedAuths.unshift(t)>this._maxOutstanding&&(this._rejectedAuths.length=this._maxOutstanding),this._authCallback(this)}},p.prototype._checkQueue=function(){if(!this._isActive){var e=this._requestsOutstanding;this._requestsOutstanding=[],e.forEach(function(e){e.xhr&&e.xhr.abort(),e.clientRequest&&e.clientRequest.abort();var t=e.callback;if(t){e.callback=undefined;var n=new i(i.SERVICE_IS_INACTIVE,"Network request in inactive state");t(n)}});var t=this
._requestQueue;this._requestQueue=[],t.forEach(function(e){var t=new i(i.SERVICE_IS_INACTIVE,"Network request in inactive state"),n=e.callback;n&&(e.callback=undefined,n(t))}),this._checkQueueTimerId&&(clearTimeout(this._checkQueueTimerId),this._checkQueueTimerId=undefined,this._checkQueueTimerWhen=undefined);return}var n,r=Date.now(),s=r+l,o=0;for(;;){if(this._waitingForAuthentication||this._requestsOutstanding.length>=this._maxOutstanding||o>=this._requestQueue.length)break;var u=this._requestQueue
[o];n=u.options.noSoonerThen||r,n&&n>s&&(n=u.options.noSoonerThen=s),n<=r?(this._requestQueue.splice(o,1),u.options.noSoonerThen=undefined,this._doRequest(u)):o++}if(!this._waitingForAuthentication&&this._requestsOutstanding.length<this._maxOutstanding&&this._requestQueue.length>0){var a,f,c=this._requestQueue.length;for(f=0;f<c;f++)n=this._requestQueue[f].options.noSoonerThen,n&&n>s&&(n=this._requestQueue[f].options.noSoonerThen=s),n&&(a=a?a<n?a:n:n);if(a&&(!this._checkQueueTimerWhen||this._checkQueueTimerWhen>
a)){this._checkQueueTimerId&&clearTimeout(this._checkQueueTimerId),this._checkQueueTimerWhen=a;var h=this;this._checkQueueTimerId=setTimeout(function(){h._checkQueueTimerWhen=undefined,h._checkQueueTimerId=undefined,h._checkQueue()},a-r)}}},p.prototype.abort=function(e){var t=this._requestQueue.indexOf(e);if(t>=0){this._requestQueue.splice(t,1);return}t=this._requestsOutstanding.indexOf(e),t>=0&&(this._requestsOutstanding.splice(t,1),e.xhr&&e.xhr.abort(),e.clientRequest&&e.clientRequest.abort(),this
._checkQueue())},p.prototype.abortAllWithToken=function(e){if(!e)return;var t;for(t=0;t<this._requestQueue.length;++t)this._requestQueue[t].token===e&&(this._requestQueue.splice(t,1),--t);for(t=0;t<this._requestsOutstanding.length;++t)if(this._requestsOutstanding[t].token===e){var n=this._requestsOutstanding[t];this._requestsOutstanding.splice(t,1),--t,n.xhr&&n.xhr.abort(),n.clientRequest&&n.clientRequest.abort()}this._checkQueue()},p}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeStorageSession"
,["require","exports","module","./AdobeDCXError","./AdobeDCXComposite","./AdobeDCXUtil","./AdobeNetworkHTTPService"],function(e,t,n){"use strict";function p(e,t,n,i){if(!n||!h[n.code]){if(i){var s=i.statusCode;s>=500&&s<600&&(s===501?(e=r.NOT_IMPLEMENTED,t="Unimplemented request"):s===507?(e=r.EXCEEDS_QUOTA,t="Quota exceeded"):(e=r.RETRYABLE_SERVER_ERROR,t="Server error"))}n=new r(e,t,n)}return i&&(n.response=i),n}function d(e,t,n){return p(r.NETWORK_ERROR,e,t,n)}function v(e,t,n){return p(r.UNEXPECTED_RESPONSE
,e,t,n)}function m(e,t){this._service=e,this._server=t,this._endPoint=s.endPointOf(t);if(!this._endPoint)throw new r(r.INVALID_PARAMS,"Could not determine endpoint from: "+t);this.SYNC_ASYNC_DEFAULT_DELAY=5,this.ASYNC_DEFAULT_DELAY=1,this.DEFAULT_POLL_DELAY=10}var r=e("./AdobeDCXError"),i=e("./AdobeDCXComposite"),s=e("./AdobeDCXUtil"),o=e("./AdobeNetworkHTTPService"),u=s.merge,a=s.appendPathElements,f="If-Match",l="If-None-Match",c="application/vnd.adobe.dcx-manifest+json",h={};return h[r.SERVICE_IS_INACTIVE
]=1,h[r.NOT_IMPLEMENTED]=1,h[r.EXCEEDS_QUOTA]=1,h[r.RETRYABLE_SERVER_ERROR]=1,h[r.TIMED_OUT]=1,h[r.TERMINATED_INPUTSTREAM]=1,h[r.WRONG_ENDPOINT]=1,h[r.OUT_OF_SPACE]=1,m.wrapError=p,m.FileContent=o.FileContent,m.StreamProvider=o.StreamProvider,m.prototype.isValidHref=function(e){var t=s.endPointOf(e);return!t||t===this._endPoint},m.prototype.getCollection=function(e,t,n){function u(t,r){if(t)return n(d("Error retrieving a collection",t,r));if(r.statusCode===200){var a=r.responseText||r.response,f=
JSON.parse(a);i?i.children=i.children.concat(f.children):i=f;var l=r.headers["x-children-next-start"];if(l){var c=e+"&start="+l;o._service.invoke("GET",c,s,undefined,{responseType:"text"},u)}else n(undefined,i,r.headers.etag,r.headers)}else r.statusCode===304?n(undefined,null,r.headers.etag,r.headers):n(v("Unexpected status code while getting a collection",undefined,r))}e=this._resolveUrl(e);if(!e)return n(new r(r.WRONG_ENDPOINT,"Wrong endpoint: "+e));e+="?order=asc&orderby=name";var i,s={};t&&(s
[l]=t);var o=this,a=this._service.invoke("GET",e,s,undefined,{responseType:"text"},u);return a},m.prototype.getAsset=function(e,t,n,i){function c(e,t){if(e)return i(d("Error downloading an asset",e,t));t.statusCode===200?i(undefined,t):t.statusCode===304?i(undefined,t):i(v("Unexpected response getting an asset",e,t))}e=this._resolveUrl(e);if(!e)return i(new r(r.WRONG_ENDPOINT,"Wrong endpoint: "+e));var o,a,f={};return typeof t=="string"?f[l]=t:u(f,t),a=this._service.invoke("GET",e,f,undefined,{responseType
:n},c),a.progress=s.noOp,a},m.prototype.getComponent=function(e,t,n){var r=this.getComponentHref(e,e.version);return this.getAsset(r,undefined,t,n)},m.prototype.getAssetAsType=function(e,t,n,r){function s(e,t){if(e)return r(e);if(t.statusCode===200){var n=t.response||t.responseText;r(undefined,n,t.headers.etag,t)}else t.statusCode===304?r(undefined,null,t.headers.etag,t):r(v("Unexpected response getting asset",e,t))}var i;return this.getAsset(e,n,t,s)},m.prototype.getSyncGroups=function(e,t){var n=
a(this._server,"assets");return this.getCollection(n,e,t)},m.prototype.getSyncGroup=function(e,t,n){var r=a(this._server,"assets",e);return this.getCollection(r,t,n)},m.prototype.getCompositeManifest=function(e,t,n){var i=e.href;return i&&(i=this._resolveUrl(i)),i?(i=a(i,"manifest"),this.getAssetAsType(i,"text",t,n)):n(new r(r.WRONG_ENDPOINT,"Wrong endpoint: "+i))},m.prototype.headRequest=function(e,t){return this._service.invoke("HEAD",e,{},undefined,undefined,function(e,n){if(e)return t(e);t(e,
n)})},m.prototype.createCompositeDirectory=function(e,t,n){function u(e,t,n){var s={"Content-Type":"application/vnd.adobe.directory+json","X-Update":"content"};t&&(s[f]="*"),i._service.invoke("PUT",o,s,undefined,undefined,function(e,t){if(e)return n(d("Error Creating composite directory",e,t));if(t.statusCode===409)return e=new r(r.ALREADY_EXISTS,e),e.response=t,n(e);n(undefined,t)})}var i=this,o=this._resolveUrl(e.href);if(!o)return n(new r(r.WRONG_ENDPOINT,"Wrong endpoint: "+o));u(e,t,function(
r,a){if(r)return n(r);var f=a.statusCode;if(f===200||f===201)n(undefined,a);else if(f===404){var l=s.parentDirectory(o);i._service.invoke("PUT",l,{},undefined,undefined,function(r,i){if(r)return n(d("Error creating composite directory",r,i));var s=i.statusCode;s===200||s===201||s===409?u(e,t,function(e,t){if(e)return n(e);var r=t.statusCode;r===200||r===201?n(undefined,t):n(d("Error creating composite directory",e,t))}):n(v("Unexpected response creating composite directory",r,i))})}else n(v("Unexpected response creating composite directory"
,r,a))})},m.prototype.deleteCompositeDirectory=function(e,t){var n=this,i=this._resolveUrl(e.href);if(!i)return t(new r(r.WRONG_ENDPOINT,"Wrong endpoint: "+i));var s={"If-Match":"*"};i+="?recursive=true&invocation_mode=sync,async";var o=this._service.invoke("DELETE",i,s,undefined,undefined,function(e,r){if(e)return t(d("Error deleting composite directory",e,r));var i=r.statusCode;if(i===200||i===204||i===404)return t(undefined,r);if(i===202)return n._handle202Response(r,o,n.SYNC_ASYNC_DEFAULT_DELAY
,t);t(v("Unexpected response deleting composite directory",e,r))})},m.prototype.leaveSharedComposite=function(e,t){if(e.collaborationType!==i.COLLABORATION.SHARED_WITH_USER)throw new r(r.INVALID_STATE,"Composite's collaboration type must be sharedWithUser.");return this.deleteCompositeDirectory(e,t)},m.prototype.uploadComponent=function(e,t,n,i,s,o){if(!e._owner||!e._owner.compositeHref)throw new r(r.INVALID_STATE,"Component must be part of a branch of a bound composite.");return this.uploadAssetForComponentId
(e.id,e.type,e._owner.compositeHref,t,n,i,s,o)},m.prototype.uploadAssetForComponentId=function(e,t,n,i,s,o,u,a){function p(e,t){e?delete h[f]:h[f]="*";var n=l._service.invoke("PUT",c,h,u,undefined,function(e,n){if(e)return t(d("Error uploading component",e,n));var i=n.statusCode;if(i===200||i===201||i===204){var s;try{s=JSON.parse(n.responseText||n.response)}catch(o){return e=new r(r.INVALID_DATA,"Invalid JSON returned by server",o),e.response=n,t(e,n,s)}t(undefined,n,s)}else i===507?(e=new r(r.EXCEEDS_QUOTA
,"Exceeds quota",e),e.response=n,t(e)):(e=v("Unexpected response uploading component",e),e.response=n,t(e))});return n.token=o,n}var l=this,c=this._constructComponentHref(n,e);s&&(c+="?intermediates=false");var h={};t&&(h["Content-Type"]=t);var m=p(i,function(e,t,n){if(e){t=e.response;if(!t)return a(e);var r=t.statusCode;r===404||r===409||r===412?p(!i,a):a(e);return}a(undefined,t,n)});return m},m.prototype.copyAssetToComponentId=function(e,t,n,i,s,o,u,a){function m(e,t,n){e?delete p[f]:p[f]="*";var r=
c._service.invoke("PUT",h,p,undefined,{responseType:"text"},function(e,i){if(e)return n(d("Error uploading component",e,i));var s=i.statusCode;s===200||s===201||s===204?n(undefined,i,t):s===202?c._handle202Response(i,r,c.SYNC_ASYNC_DEFAULT_DELAY,function(e,r){n(e,r,t)}):n(v("Unexpected response copying a component asset",e,i),i,t)});return r.token=o,r}var l=this._makeRelativeUrl(u);if(!l)return a(new r(r.WRONG_ENDPOINT,"Cannot copy asset: "+u));var c=this,h=this._constructComponentHref(n,e);h+="?invocation_mode=sync,async"
,s&&(h+="&intermediates=false");var p={};t&&(p["Content-Type"]=t),p.Link="<"+l+">;rel=source";var g=function(e,t,n){var s;if(e){t=e.response;if(!t)return a(e);var o=t.statusCode;!!n||o!==404&&o!==409&&o!==412?o===507?(e=new r(r.EXCEEDS_QUOTA,"Exceeds quota",e),e.response=t,a(e)):a(e):m(!i,!0,g);return}try{s=JSON.parse(t.responseText||t.response)}catch(u){return e=new r(r.INVALID_DATA,"Invalid JSON returned by server",u),e.response=t,a(e)}a(undefined,t,s)},y=m(i,!0,g);return y},m.prototype.updateManifest=
function(e,t,n,i){var s=this.getBranchManifestHref(e),o={"Content-Type":c},u=e.manifestEtag;n?o["If-Match"]="*":u&&(o["If-Match"]=u);var a=this._service.invoke("PUT",s,o,t,undefined,function(e,t){if(e)return i(d("Error updating manifest",e,t));var n=t.statusCode;!t.headers.etag||n!==200&&n!==201&&n!==204?n===412?(e=new r(r.UPDATE_CONFLICT,"Manifest has been changed"),e.response=t,i(e)):i(v("Unexpected response updating manifest",e,t)):i(undefined,t)});return a},m.prototype.getHrefForComposite=function(
e,t){var n=e.type;if(!n)throw new r(r.INVALID_STATE,"Composite needs a type");if(!e.id)throw new r(r.INVALID_STATE,"Composite needs an id");if(e.href)return e.href;var i=this._resolveUrl(a("assets",t,e.id));return i},m.prototype.getCompositeManifestHref=function(e){var t=this._resolveUrl(e.href);if(!t)throw new r(r.WRONG_ENDPOINT,"Wrong endpoint: "+t);return a(t,"manifest")},m.prototype.getBranchManifestHref=function(e){var t=this._resolveUrl(e.compositeHref);if(!t)throw new r(r.WRONG_ENDPOINT,"Wrong endpoint: "+
t);return a(t,"manifest")},m.prototype.getComponentHref=function(e,t){var n=e._owner;if(!n||!n.compositeHref)throw new r(r.INVALID_STATE,"Component must be part of a branch of a bound composite.");return n._core&&n._core._getSourceHrefOfComponent(e)||this._constructComponentHref(n.compositeHref,e.id,t)},m.prototype._constructComponentHref=function(e,t,n){var r=a(this._resolveUrl(e),t);return r&&typeof n!="undefined"&&(r+=";version="+n),r},m.prototype._resolveUrl=function(e){var t=s.endPointOf(e);
return t?t!==this._endPoint?undefined:e:s.appendPathElements(this._server,e)},m.prototype._makeRelativeUrl=function(e){var t=s.endPointOf(e);if(t){if(t!==this._endPoint)return undefined;var n=s.parseURI(e);if(n.scheme||n.authority)e=n.path,n.query&&(e+="?"+n.query),n.fragment&&(e+="#"+n.fragment)}return e},m.prototype._parseAsyncResponse=function(e){var t=e.responseText||e.response;if(!t)throw new r(r.INVALID_DATA,"No body data.");var n={},i=t.indexOf("\n");if(i===-1)throw new r(r.INVALID_DATA,"Could not find status line."
);var o=t.slice(0,t.charCodeAt(i-1)===13?i-1:i),u=o.split(" ");n.statusCode=parseInt(u[1],10);if(!n.statusCode)throw new r(r.INVALID_DATA,"Could not find status code.");u.length>2&&(n.statusText=u[2]);var a=t.search(/\r?\n\r?\n/);a===-1&&(a=t.length);var f=t.slice(i+1,a);n.headers=s.parseHeaders(f);var l=t.charAt(a)==="\r"?a+2:a+1;return n.response=t.slice(l),n},m.prototype._pollForAsyncResponse=function(e,t,n,r){var i=this,s=Date.now()+t*1e3,o={responseType:"text",reuseRequestDesc:n,noSoonerThen
:s};n=this._service.invoke("GET",e,undefined,undefined,o,function(t,s){if(t)return r(d("Error polling for an asynchronous reponse",t,s));var o=s.statusCode;if(o===202){var u=s.headers["retry-after"];u&&(u=parseInt(u,10)),i._pollForAsyncResponse(e,u||i.DEFAULT_POLL_DELAY,n,r)}else if(o===200){try{s=i._parseAsyncResponse(s)}catch(a){return r(v("Error parsing response body.",a,s))}o=s.statusCode,o===200||o===201||o===204?r(undefined,s):r(v("Unexpected response copying a component asset",t,s))}else r
(v("Unexpected response polling for an asynchronous response",t,s))})},m.prototype._handle202Response=function(e,t,n,r){var i,s=e.responseText||e.response;try{i=JSON.parse(s)}catch(o){return r(v("Error parsing 202 response body.",o,e))}var u=i.href;if(!u)return r(v("202 response missing an href.",undefined,e));var a=e.headers["retry-after"];a?a=parseInt(a,10):a=n,this._pollForAsyncResponse(this._resolveUrl(u),a,t,r)},m}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCXCompositeXfer"
,["require","exports","module","./AdobeDCXComposite","./AdobeDCXComponent","./AdobeDCXBranch","./AdobeDCXError","./AdobeDCXPushJournal","./AdobeStorageSession","./AdobeDCXUtil","./AdobeDCXFS"],function(e,t,n){"use strict";function y(e,t,n){return a.wrapError(o.UNEXPECTED_RESPONSE,e,t,n)}function b(e,t,n){this._storageSession=e,this._callback=t,this._cleanup=n,this._componentsPending=0,this.bytesTransfered=0,this.bytesTotal=0,this.onProgress=f.noOp;var r=this;this._reportProgress=function(e){if(e>0
){r.bytesTransfered+=e;var t=r.onProgress;t&&t(r.bytesTransfered,r.bytesTotal)}}}function w(e,t,n,r,i){function s(e){e||(t.compositeHasBeenCreated=!0);var n=t._compositeCreationCallbacks,r,i=n.length;for(r=0;r<i;r++)try{n[r](e)}catch(s){}t._compositeCreationCallbacks=undefined;return}!e.isBound&&!t.compositeHasBeenCreated?t._compositeCreationCallbacks?t._compositeCreationCallbacks.push(i):(t._compositeCreationCallbacks=[i],r.createCompositeDirectory(e,n,function(t,i){if(t){if(t.code!==o.ALREADY_EXISTS
)return s(y("Unexpected response creating a composite directory",t,i));if(!n){var u=r.getCompositeManifestHref(e);r.headRequest(u,function(e,t){if(e)return s(e);if(t.statusCode!==404)return e=new o(o.INVALID_STATE,"Composite already exists and overwriteExisting not specified"),s(e);s()})}else s()}else s()})):i()}function E(e,t,n,r,s){if(typeof t!="number")throw new o(o.UNEXPECTED_RESPONSE,"No length");var u=r.headers.etag,a=r.headers["x-latest-version"],f=s.md5;if(!u)throw new o(o.UNEXPECTED_RESPONSE
,"No etag");if(!a)throw new o(o.UNEXPECTED_RESPONSE,"No version");if(!f)throw new o(o.UNEXPECTED_RESPONSE,"No md5");return new i._UploadRecord(e,u,a,f,t,n)}function S(e,t,n,r){var s=r.headers.etag,u=r.headers["x-latest-version"],a=t.md5,f=t.size;if(typeof f!="number")throw new o(o.UNEXPECTED_RESPONSE,"No length");if(!s)throw new o(o.UNEXPECTED_RESPONSE,"No etag");if(!u)throw new o(o.UNEXPECTED_RESPONSE,"No version");if(!a)throw new o(o.UNEXPECTED_RESPONSE,"No md5");return new i._UploadRecord(e,s,
u,a,f,n)}var r=e("./AdobeDCXComposite"),i=e("./AdobeDCXComponent"),s=e("./AdobeDCXBranch"),o=e("./AdobeDCXError"),u=e("./AdobeDCXPushJournal"),a=e("./AdobeStorageSession"),f=e("./AdobeDCXUtil"),l=e("./AdobeDCXFS"),c=a.FileContent,h=i.STATES,p="all",d="min",v="none",m,g;return b.prototype._callCallback=function(e,t){var n=this._callback;n&&(this._callback=undefined,n(e,t))},b.prototype._xferComplete=function(e,t){var n=this._cleanup;n?(this._cleanup=undefined,n(e,t)):this._callCallback(e,t)},b.prototype
.abort=function(e){this._aborted||(this._aborted=!0,this._storageSession._service.abortAllWithToken(this)),e||(this._callback=undefined,e=new Error("Aborted")),this._xferComplete(e)},t.pullComposite=function(e,t,n){if(!e.hasLocalStorage)throw new o(o.INVALID_PARAMS,"No local storage. Use AdobeDCXCompositeXfer.pullCompositeManifestOnly() to pull down the composite without local storage.");return this._pullComposite(e,t,p,n)},t.pullMinimumComposite=function(e,t,n){if(!e.hasLocalStorage)throw new o(
o.INVALID_PARAMS,"No local storage. Use AdobeDCXCompositeXfer.pullCompositeManifestOnly() to pull down the composite without local storage.");return this._pullComposite(e,t,d,n)},t.pullCompositeManifestOnly=function(e,t,n){return this._pullComposite(e,t,v,n)},t.downloadComponents=function(e,n,r,i){function s(e){return e._owner?s(e._owner):e}var o=s(n),u=new b(r,i);return u._referenceBranch=o,t._pullComponents(u,o,e||n.allComponents()),u},t.pushComposite=function(e,n,r,i){var s,a=e._localStorage,f=
function(t,n){s._owner&&e.hasLocalStorage&&a.unregisterInMemoryBranchOrElement(s._owner);if(!e.hasLocalStorage){var r=s._journal;e._pushJournal=r.isEmpty?undefined:r}s._callCallback(t,n)};s=new b(r,i,f),s._composite=e,s._overwriteExisting=n;var l=!e.isBound;s._compositeIsNew=l;if(e.hasLocalStorage)e._loadBranch(a.currentManifestPath(),!1,function(n,r){if(n)return s._xferComplete(n);s._owner=r,e._localStorage.registerInMemoryBranchOrElement(r),u.readJournal(a.pushJournalPath(),e,!0,function(n,r){if(
n)return s._xferComplete(n);s._journal=r,t._pushComposite(e,s)})});else{var c=e.href;if(!c)return s._xferComplete(new o(o.INVALID_STATE,"New composite has no href"));s._owner=e.current.copy(),s._journal=e._pushJournal||new u(e),t._pushComposite(e,s)}return s},t.uploadNewComponent=function(e,t,n,i,s,u){if(n._localStorage)throw new o(o.INVALID_PARAMS,"For in-browser use only. Use composite.current.addComponent() to add a new component asset");return m(i||f.generateUuid(),t,!0,n.collaborationType===
r.COLLABORATION.SHARED_WITH_USER,e,n.id,n.href,s,u)},t.uploadComponent=function(e,t,n,i,s){if(n._localStorage)throw new o(o.INVALID_PARAMS,"For in-browser use only. Use composite.current.updateComponent() to update a component asset");return m(e.id,e.type,!1,n.collaborationType===r.COLLABORATION.SHARED_WITH_USER,t,n.id,n.href,i,s)},t.copyAssetForNewComponent=function(e,t,n,i,s,u){if(n._localStorage)throw new o(o.INVALID_PARAMS,"For in-browser use only. Use composite.current.addComponent() to add a new component asset"
);return g(i||f.generateUuid(),t,!0,n.collaborationType===r.COLLABORATION.SHARED_WITH_USER,e,n.id,n.href,s,u)},t.getURLForComponent=function(e,t){if(e._owner._localStorage)throw new o(o.INVALID_PARAMS,"For in-browser use only.");return t.getComponentHref(e,e.version)},t._pullComposite=function(e,n,r,i){function a(t,n){if(t){var r=t.pulledBranch;r?(r.compositeState=h.unmodified,r.hasLocalStorage?l.writeFileAtomically(e._localStorage.pulledManifestPath(),t.pulledBranch.localData,"utf8",function(e){
u._callCallback(t)}):u._callCallback(t)):u._callCallback(t);return}if(n===null)return u._callCallback(undefined,null);n.compositeState=h.unmodified,n.hasLocalStorage?l.writeFileAtomically(e._localStorage.pulledManifestPath(),n.localData,"utf8",function(e){if(e)return u._callCallback(e);n._isDirty=!1,u._callCallback(undefined,n)}):(e._options.xhrBaseBranchSupport&&(e._pulledBranchData=n.localData),u._callCallback(undefined,n))}if(typeof e.href!="string")throw new o(o.INVALID_STATE,"Composite must have an href"
);var u,f=function(i,a){if(i)return u._xferComplete(i);var f;a?(f=a.etag,u._referenceBranch=a):e.current&&(f=e.current.manifestEtag,u._referenceBranch=e.current);var l=n.getCompositeManifest(e,f,function(n,i,a){if(n)return n.response&&n.response.statusCode===404?u._xferComplete(new o(o.NO_COMPOSITE,"Composite missing or deleted",n.underlyingError||n)):u._xferComplete(n);if(i===null)return u._xferComplete(undefined,null);var f;try{f=(new s).parse(i),f._localStorage=e._localStorage,f.compositeHref=
e.href,f._collaborationType=e.collaborationType,f.manifestEtag=a,(f.compositeState===h.committedDelete||f.compositeState===h.pendingDelete)&&u._storageSession.deleteCompositeDirectory(e,function(e){return e?u._xferComplete(new o(o.DELETED_COMPOSITE,"Error deleting composite directory",e)):u._xferComplete(new o(o.DELETED_COMPOSITE,"Composite is deleted"))}),u._referenceBranch&&f.hasLocalStorage&&f._updateLocalDataFromBranch(u._referenceBranch)}catch(l){return u._xferComplete(new o(o.INVALID_JSON,"Corrupted manifest"
,l))}var c,v,m=f.allComponents();for(c=0;c<m.length;++c)v=m[c],v.state===h.pendingDelete||v.state===h.committedDelete?f.removeComponent(v):v.state=h.unmodified;m=undefined,r===p?m=f.allComponents():r===d&&(v=f.getComponentWithAbsolutePath("/META-INF/metadata.xml"),v&&(m=[v])),m?t._pullComponents(u,f,m):u._xferComplete(undefined,f)});l&&(l.token=u,l.progress=u._reportProgress)};return u=new b(n,i,a),u._composite=e,e.hasLocalStorage?e.loadPulledBranch(f):f(),u},t._pullComponents=function(e,n,r){function s
(t,r){e._componentsPending-=1,t&&(e.failedComponents=e.failedComponents||[],e.failedComponents.push({component:r,error:t}));if(e._componentsPending===0&&!e._aborted){var i=e.failedComponents;if(i){t=new o(o.COMPONENT_DOWNLOAD_ERROR,"Failed to download all components");var s,u=i.length;for(s=0;s<u;s++){var a=i[s].error;if(a.code===o.OUT_OF_SPACE){t=new o(a.code,a.message);break}}return t.pulledBranch=n,t.failedComponents=i,e._xferComplete(t)}e._xferComplete(undefined,n)}}function u(n){if(e._aborted
)return;e.bytesTotal+=n.length||0;var r=n._owner._localStorage,o=r.tempPathForComponent(n),u=f.parentDirectory(o);l.ensureDirectoryExists(u,function(r){if(r)return e.abort(r);var u=t._pullComponent(n,o,i,s);u.progress=e._reportProgress})}function a(e){n.assetOfComponent(e,function(t,n){typeof n!="string"?u(e):s(undefined,e)})}if(!n.hasLocalStorage)throw new o(o.INVALID_PARAMS,"No local storage.");var i=e._storageSession,c;e._componentsPending=r.length;for(c=0;c<r.length;++c){var h=r[c],p;if(e._referenceBranch
){var d=e._referenceBranch.getComponentWithId(h.id);d&&(p=d.etag)}h.etag!==p?u(h):a(h)}e._componentsPending===0&&e._xferComplete(undefined,n)},t._pullComponent=function(e,t,n,r){var i=e._owner;if(!e._owner.hasLocalStorage)throw new o(o.INVALID_PARAMS,"No local storage. Use AdobeDCXCompositeXfer.pullCompositeManifestOnly() to pull down the composite without local storage.");var s=n.getComponent(e,new c(t),function(n,s){n?r(n,e):s.statusCode===200?e.length!==undefined&&e.length!==null&&Number(s.headers
["content-length"])!==e.length?r(new o(o.UNEXPECTED_RESPONSE,"Incorrect content length",n,s)):i._localStorage.ingestComponentAsset(e,t,!1,i._local(),function(t){r(t,e,s.headers.etag)}):s.statusCode===304?r(undefined,e,s.headers.etag):r(y("Unexpected response getting a component",n,s),e)});return s},t._pushComposite=function(e,n){function v(t){if(a)return n._xferComplete(t);var r=c.getCompositeManifestHref(e);c.headRequest(r,function(e,r){return e?n._xferComplete(e):r.statusCode===404?(t=new o(o.NO_COMPOSITE
,"Composite does not exist; may have been deleted"),n._xferComplete(t)):n._xferComplete(t)})}var i=e.href;if(!i)return n._xferComplete(new o(o.INVALID_STATE,"New composite has no href"));var s=n._owner,u=n._journal,a=n._compositeIsNew,f=n._overwriteExisting,c=n._storageSession,p=s.changeCount,d=s.remoteData.length+50;n.bytesTotal=d;if(s.compositeState===h.committedDelete)return n._xferComplete(new o(o.DELETED_COMPOSITE,"Attempt to push a deleted composite"));if(!a&&s.compositeState===h.unmodified
)return n._xferComplete();if(s.compositeState===h.pendingDelete)return a&&!f?n._xferComplete(new o(o.DELETED_COMPOSITE,"Attempt to delete unbound composite")):e.collaborationType===r.COLLABORATION.SHARED_WITH_USER?n._xferComplete(new o(o.INVALID_STATE,"Attempt to delete composite that is shared with this user.")):t._deleteComposite(n,f,function(e,t){n._xferComplete(e,t)});w(e,u,f,c,function(r){if(r)return n._xferComplete(r);t._pushComponents(n,s,function(){var t=n.failedComponents;if(t){r=new o(o
.COMPONENT_UPLOAD_ERROR,"One or more components failed to upload.");var i,a=t.length;for(i=0;i<a;i++){var m=t[i].error;if(m.code===o.EXCEEDS_QUOTA){r=new o(m.code,m.message);break}}return r.failedComponents=t,v(r)}s.compositeState=h.unmodified;var g=s.remoteData;n.bytesTotal+=g.length,n.bytesTotal-=d;var y=c.updateManifest(s,g,f,function(t,r){if(t)return v(t);var i=r.headers.etag;u.manifestEtag=i,u.changeCount=p,u.commitChanges(function(t){if(t)return n._xferComplete(t);u.applyToBranch(s),s.compositeState=
h.unmodified,e.hasLocalStorage?l.writeFileAtomically(e._localStorage.pushedManifestPath(),s.localData,"utf8",function(e){if(e)return n._xferComplete(e);s._isDirty=!1,n._xferComplete(undefined,s)}):(e._options.xhrBaseBranchSupport&&(e._pushedBranchData=s.localData),n._xferComplete(undefined,s))})});y&&(y.progress=n._reportProgress)})})},t._deleteComposite=function(e,t,n){var r=e._composite,i=e._owner,s=e._storageSession;i.compositeState=h.committedDelete;var o=i.remoteData;e.bytesTotal=o.length,s.
updateManifest(i,o,t,function(t,o){if(t)return n(t);s.deleteCompositeDirectory(r,function(t,s){if(t)return n(t);e._journal.compositeHasBeenDeleted=!0,e._journal.commitChanges(function(e){if(e)return n(e);r.hasLocalStorage?l.writeFileAtomically(r._localStorage.pushedManifestPath(),i.localData,"utf8",function(e){if(e)return n(e);n(undefined,i)}):n(undefined,i)})})})},t._pushComponents=function(e,t,n){function m(t,r,i){r?d[t.id]=r:delete d[t.id],i&&(e.failedComponents=e.failedComponents||[],e.failedComponents
.push({component:t,error:i})),Object.keys(d).length===0&&v.commitChanges(n)}function g(t,n,i){m(t,"uploading"),l.info(n,function(s,u){if(s){s=new o(o.INVALID_STATE,"Component asset missing",s),m(t,null,s);return}var l=u.size,p=f.filePathComponents(n).fileName,d=v.getRecordForUploadedComponent(t.id);if(d&&d.length===l&&d["storage-name"]===p){t.etag=d.etag,t.version=d.version,t.md5=d.md5,t.length=d.length,t.state=h.unmodified,m(t,null);return}e.bytesTotal+=l;var g=e._storageSession.uploadComponent(
t,i,a.collaborationType===r.COLLABORATION.SHARED_WITH_USER,e,new c(n),function(e,n,r){if(!e){var i=n.headers.etag,s=n.headers["x-latest-version"],u=r.md5;i||(e=new o(o.UNEXPECTED_RESPONSE,"No etag")),s||(e=new o(o.UNEXPECTED_RESPONSE,"No version")),u||(e=new o(o.UNEXPECTED_RESPONSE,"No md5")),e||(t.etag=i,t.version=s,t.md5=u,t.length=l,t.state=h.unmodified,v.recordUploadedComponent(t.id,i,s,u,l,p),v.commitChanges())}m(t,null,e)});g&&(g.progress=e._reportProgress)})}function y(n,i,s){var u=v.getRecordForUploadedComponent
(n.id);if(u&&u["source-href"]===i){n.etag=u.etag,n.version=u.version,n.md5=u.md5,n.length=u.length,n.state=h.unmodified;return}m(n,"copying");var f=e._storageSession.copyAssetToComponentId(n.id,n.type,e._composite.href,s,a.collaborationType===r.COLLABORATION.SHARED_WITH_USER,e,i,function(e,r,u){if(!e){var a=r.headers.etag,f=r.headers["x-latest-version"],l=u.md5,c=u.size;a||(e=new o(o.UNEXPECTED_RESPONSE,"No etag")),f||(e=new o(o.UNEXPECTED_RESPONSE,"No version")),l||(e=new o(o.UNEXPECTED_RESPONSE
,"No md5")),c||(e=new o(o.UNEXPECTED_RESPONSE,"No length")),e||(n.etag=a,n.version=f,n.md5=l,n.length=c,n.state=h.unmodified,v.recordUploadedComponent(n.id,a,f,l,c,undefined,i),v.commitChanges())}else if(p){var d=p.componentAssetPath(n,t._local());if(d)return g(n,d,s)}m(n,null,e)});f&&(f.progress=e._reportProgress)}var i=this,s,u=t.allComponents(),a=e._composite,p=a._localStorage,d={},v=e._journal;for(s=0;s<u.length;++s){var b=u[s],w=b.state,E=b.etag,S=!E;w||(w=h.unmodified);if(S||w===h.modified)
{var x=t._core._getSourceHrefOfComponent(b);if(t.hasLocalStorage||x){var T=S||e._compositeIsNew;x?y(b,x,T):g(b,p.componentAssetPath(b,t._local()),T)}else{var N=new o(o.INVALID_STATE,"Component should not be modified or new without local storage");e.failedComponents=e.failedComponents||[],e.failedComponents.push({component:b,error:N})}}else w===h.unmodified?v.removeRecordForUploadedComponent(b.id):(w===h.committedDelete||w===h.pendingDelete)&&t.removeComponent(b)}Object.keys(d).length===0&&n()},m=
function(e,t,n,r,s,u,a,f,l){if(typeof l!="function")throw new o(o.INVALID_PARAMS,'Param "callback" must be a function.');var c=s.length||s.byteLength||s.size,h=new b(f,l);h.bytesTotal=c;var p=f.uploadAssetForComponentId(e,t,a,n,r,h,s,function(n,r,s){var o;if(!n)try{o=new i._UploadResults(u),c=c||p.bytesSent,o.records[e]=E(e,c,t,r,s)}catch(a){n=a,o=undefined}h._xferComplete(n,o)});return p&&(p.progress=h._reportProgress),h},g=function(e,t,n,r,s,u,a,f,l){if(typeof l!="function")throw new o(o.INVALID_PARAMS
,'Param "callback" must be a function.');var c=new b(f,l),h=f.copyAssetToComponentId(e,t,a,n,r,c,s,function(n,r,s){if(c._aborted)return;var o;if(!n)try{o=new i._UploadResults(u),o.records[e]=S(e,s,t,r)}catch(a){n=a,o=undefined}l(n,o)});return h&&(h.progress=c._reportProgress),c},t}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/components/dcx-js/src/AdobeDCX",["require","exports","module","./AdobeDCXComposite","./AdobeDCXLocalStorage","./AdobeNetworkHTTPService","./AdobeStorageSession"
,"./AdobeDCXCompositeXfer","./AdobeDCXUtil","./AdobeDCXError","./AdobeDCXFS"],function(e,t,n){"use strict";function c(e,t){e&&l._setFS(e),this._compositeOptions=a.merge({},t)}var r=e("./AdobeDCXComposite"),i=e("./AdobeDCXLocalStorage"),s=e("./AdobeNetworkHTTPService"),o=e("./AdobeStorageSession"),u=e("./AdobeDCXCompositeXfer"),a=e("./AdobeDCXUtil"),f=e("./AdobeDCXError"),l=e("./AdobeDCXFS");return c.COLLABORATION={PRIVATE:r.COLLABORATION.PRIVATE,SHARED_BY_USER:r.COLLABORATION.SHARED_BY_USER,SHARED_WITH_USER
:r.COLLABORATION.SHARED_WITH_USER},c.AdobeDCXError=f,c.FileContent=s.FileContent,c.StreamProvider=s.StreamProvider,c.prototype.newEmptyComposite=function(e,t,n,i){var s=new r(e,t,null,i,null,this._compositeOptions);return n&&(s.path=n),s},c.prototype.newCompositeFromLocalStorage=function(e,t){try{if(typeof e!="string")throw new f(f.INVALID_PARAMS,"");var n=new r(null,null,e,null,null,this._compositeOptions);n.loadCurrentFromLocalStorage(function(e,r){t(e,e?undefined:n)}),n.deleteTempFiles()}catch(
i){t(i)}},c.prototype.newCompositeWithHref=function(e,t,n,i,s){var o=new r(n,s,null,i,e,this._compositeOptions);return t&&(o.path=t),o},c.prototype.newCompositeAsCopyOf=function(e,t,n,i,s,o){return r.newCompositeAsCopyOf(e,t,n,i,s,o,this._compositeOptions)},c.prototype.createHTTPService=function(e){return new s(e)},c.prototype.createStorageSession=function(e,t){return new o(e,t)},c.prototype.compositeXfer=u,c}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryServices"
,["require","exports","module","./components/uuid/uuid","./components/dcx-js/src/AdobeDCX"],function(e,t,n){"use strict";function s(){var e=typeof nodeRequire;e!=="undefined"&&(this.fs=nodeRequire("fs"),this.path=nodeRequire("path")),this.dcx=new i(this.fs,{preserveFileExtensions:!0})}var r=e("./components/uuid/uuid"),i=e("./components/dcx-js/src/AdobeDCX");return s.prototype.uuid=function(){return r()},s.prototype.log=function(e){this._log&&this._log("CC Libraries: "+e)},s.prototype.getDisplayName=
function(e){return this._getDisplayName?this._getDisplayName(e):e.name},s.prototype.hasFileSystem=function(){return this.fs!==undefined},s.prototype.getVulcanInterface=function(){var e=typeof VulcanInterface;if(e!=="undefined")return VulcanInterface},s.prototype.getVulcanMessage=function(){var e=typeof VulcanMessage;if(e!=="undefined")return VulcanMessage},s.prototype.hasCEPVulcan=function(){return this.getVulcanInterface()!==undefined&&this.getVulcanMessage()!==undefined},s.prototype.getPathSeparator=
function(){return"/"},s.prototype.getFileNameFromPath=function(e){return e.indexOf("/")===-1&&e.indexOf("\\")!==-1&&(e=e.replace(/\\/g,"/")),e.split("/").pop()},new s}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryError",["require","exports","module"],function(e,t,n){"use strict";function r(e,t,n,r){Error.call(this),this.code=e,this._message=t,this.message="["+e+"] "+t,this.libraryId=n,this.underlyingError=r}return r.prototype=new Error,r.prototype.name="AdobeLibraryError"
,delete r.prototype.stack,r.INVALID_PARAMETER="INVALID_PARAMETER",r.READ_ONLY="READ_ONLY",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.NOT_SUPPORTED="NOT_SUPPORTED",r.REQUIRES_FILESYSTEM="REQUIRES_FILESYSTEM",r.DELETED_LOCALLY="DELETED_LOCALLY",r.NOT_ALLOWED="NOT_ALLOWED",r.FILE_TOO_LARGE="FILE_TOO_LARGE",r.EXCEEDS_MAX_LIBRARY_SIZE="EXCEEDS_MAX_LIBRARY_SIZE",r.CORRUPTED_LIBRARY="CORRUPTED_LIBRARY",r.RENDITION_NOT_AVAILABLE="RENDITION_NOT_AVAILABLE",r.FS_ERROR="FS_ERROR",r.OUT_OF_SPACE="OUT_OF_SPACE",r.LOGGED_OUT="LOGGED_OUT"
,r.EXCEEDS_QUOTA="EXCEEDS_QUOTA",r.RETRYABLE_SERVER_ERROR="RETRYABLE_SERVER_ERROR",r.TRANSFER_ERROR="TRANSFER_ERROR",r.TRANSFER_ABORTED="TRANSFER_ABORTED",r.NETWORK_ERROR="NETWORK_ERROR",r.ACCESS_DENIED="ACCESS_DENIED",r}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryConfig",["require","exports","module","./AdobeLibraryError"],function(e,t,n){"use strict";function s(){this.name="config"}var r=e("./AdobeLibraryError"),i=["ROOT_DIR","POLL_INTERVAL","RENDITION_SIZES"
,"FULL_RENDITION_CONFIG","DEFAULT_LIBRARY_NAME","STORAGE_API_KEY","SYNC_POLICY","ELEMENT_TYPE_FILTERS","AUTO_START_POLLING","SHARED_LOCAL_STORAGE","SHARED_LOCAL_STORAGE_ANALYTICS","PROXY_AUTH"];return s.prototype.VERSION=1,s.prototype.MAX_ELEMENTS=1e3,s.prototype.MAX_COMPONENT_SIZE=1073741824,s.prototype.VALID_RELATIONS=["rendition","primary","alternate"],s.prototype.VALID_SYNC_POLICIES=["manifestAndAssets","manifestOnly"],s.prototype.ELEMENT_TYPE_FILTERS=[],s.prototype.DL_NAMESPACE="library",s.prototype
.DL_PREFIX=s.prototype.DL_NAMESPACE+"#",s.prototype.VERSION_KEY=s.prototype.DL_PREFIX+"version",s.prototype.CATEGORY_KEY=s.prototype.DL_PREFIX+"category",s.prototype.RELATIONSHIP_KEY=s.prototype.DL_PREFIX+"rel",s.prototype.IS_FULL_SIZE_KEY=s.prototype.DL_PREFIX+"isFullSize",s.prototype.MODIFIED_KEY=s.prototype.DL_PREFIX+"modified",s.prototype.CREATED_KEY=s.prototype.DL_PREFIX+"created",s.prototype.COMPOSITE_TYPE="application/vnd.adobe.library+dcx",s.prototype.ELEMENTS_NAME="elements",s.prototype.
CATEGORIES_NAME="categories",s.prototype.ANALYTICS_ELEMENT_UPDATE_THRESHOLD=500,s.prototype.PUBLIC_USER_ID="public",s.prototype.DEFAULT_CLOUD_ID="creative_cloud",s.prototype.STORAGE_ASSETS_PATH="/assets/",s.prototype.LIBRARY_SYNC_GROUP="adobe-libraries",s.prototype.PUBLIC_STORAGE_ASSETS_PATH="/public/",s.prototype.PUBLIC_LIBRARY_SYNC_GROUP="libraries",s.prototype.STORAGE_API_KEY="",s.prototype.SYNCING_ENABLED=!0,s.prototype.DEFAULT_MAX_SYNC_INTERVAL=1e4,s.prototype.RETRY_FAIL_MAX_SYNC_INTERVAL=6e4
,s.prototype.MAX_SYNC_INTERVAL=s.prototype.DEFAULT_MAX_SYNC_INTERVAL,s.prototype.POLL_INTERVAL=1,s.prototype.AUTO_START_POLLING=!1,s.prototype.RENDITION_SIZES={},s.prototype.FULL_RENDITION_CONFIG={},s.prototype.BACKOFF_INTERVALS=[1,1,2,3,5,8,13,21,34,55],s.prototype.ERROR_RETRY_INTERVALS=[30,60,120],s.prototype.NETWORK_TIMEOUT=6e5,s.prototype.RETRY_RANDOM_SECONDS=30,s.prototype.RENDITION_MAX_RETRIES=2,s.prototype.RENDITION_RETRY_INTERVAL=1e3,s.prototype.LOCAL_RENDITION_MAX_RETRIES=5,s.prototype.LOCAL_RENDITION_RETRY_INTERVAL=200
,s.prototype.SYNC_POLICY="manifestAndAssets",s.prototype.SHARED_LOCAL_STORAGE=!0,s.prototype.SHARED_LOCAL_STORAGE_VERSION=5,s.prototype.SHARED_LOCAL_STORAGE_MIN_CLIENT_VERSION=5,s.prototype.SHARED_LOCAL_STORAGE_MAX_CLIENT_VERSION=5,s.prototype.VULCAN_PREFIX="vulcan.SuiteMessage.",s.prototype.VULCAN_STARTUP_MESSAGE="cclibraries.service.Initialized",s.prototype.VULCAN_SHUTDOWN_REQUEST="cclibraries.service.TerminateServiceRequest",s.prototype.VULCAN_QUERY_REQUEST="cclibraries.service.QueryRequest",s
.prototype.VULCAN_QUERY_RESPONSE="cclibraries.service.QueryResponse",s.prototype.VULCAN_LIBRARY_CHANGED_LOCAL_TYPE="cclibraries.service.LibraryChangedLocal",s.prototype.VULCAN_LIBRARY_CHANGED_REMOTE_TYPE="cclibraries.service.LibraryChangedRemote",s.prototype.VULCAN_LIBRARY_DELETED_TYPE="cclibraries.service.LibraryDeleted",s.prototype.VULCAN_COLLECTIONS_LOADED_TYPE="cclibraries.service.LibrariesLoaded",s.prototype.VULCAN_COLLECTIONS_UNLOADED_TYPE="cclibraries.service.LibrariesUnloaded",s.prototype
.PRODUCT_BRIDGE_ELEMENT_TYPE="application/vnd.adobe.element.image+dcx",s.prototype.PRODUCT_BRIDGE_INMEMORY_LIFETIME=6e5,s.prototype.setParameter=function(e,t){if(i.indexOf(e)===-1)throw new r(r.INVALID_PARAMETER,"Parameter not configurable");if(e==="SYNC_POLICY"&&this.VALID_SYNC_POLICIES.indexOf(t)===-1)throw new r(r.INVALID_PARAMETER,"Invalid value for SYNC_POLICY");e==="POLL_INTERVAL"&&(t=Math.max(1,t)),this[e]=t},new s}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/utils/AdobeLibraryMimeTypeUtils"
,["require","exports","module"],function(e,t,n){"use strict";function o(e){var t=e.match(/application\/x-adobe-libraries-(.+)/);return t?[t[1]]:[]}function u(e){return["application/x-adobe-libraries-"+e]}var r={},i={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"
],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf"
:["gxf"],"application/hyperstudio":["stk"],"application/illustrator":["ai"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js"],"application/json":["json"],"application/jsonml+json":["jsonml"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/marc"
:["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms"
,"lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/photoshop":["psd"],"application/photoshop.large":["psb"],"application/pics-rules"
:["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml"
:["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request"
:["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei"
,"teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip"
:["air"],"application/vnd.adobe.characterstyle+json":["style"],"application/vnd.adobe.characterstyle+snippet":["idms"],"application/vnd.adobe.charts+zip":["zip"],"application/vnd.adobe.color+json":["ase"],"application/vnd.adobe.colortheme+json":["ase"],"application/vnd.adobe.cube+txt":["cube"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.indesign-idms":["idms"],"application/vnd.adobe.layerstyle":["asl"],"application/vnd.adobe.look+xml"
:["look"],"application/vnd.adobe.paragraphstyle+json":["style"],"application/vnd.adobe.paragraphstyle+snippet":["idms"],"application/vnd.adobe.ribbon.brush+zip":["brush"],"application/vnd.adobe.scatter.brush+zip":["brush"],"application/vnd.adobe.vector.brush+zip":["brush"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook"
:["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph"
:["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"
],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car"
:["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory"
:["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package"
:["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp"
:["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"
],"application/vnd.gmx":["gmx"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml"
:["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile"
:["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam"
:["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp"
:["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"
],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis"
:["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12"
:["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps"
,"pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works"
:["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.radio-preset"
:["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":
["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master"
:["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template"
:["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile"
:["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed"
:["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata"
:["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"
],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"
],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive"
:["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"
],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice"
:["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"
],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["dmg"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz"
,"cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml"
:["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":["otf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/font-woff":["woff"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed"
:["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["iso"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lzh-compressed":["lzh","lha"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut"
:["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdownload":["exe","dll","com","bat","msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","wmz","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal"
:["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-nzb":["nzb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-research-info-systems":["ris"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit"
:["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-wais-source":["src"],"application/x-x509-ca-cert":["der","crt"
],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml"
:["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp4":["mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd"
:["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"
],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-wav":["wav"],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/jpg":["jpg"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"
],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.adobe.shape+svg":["shape"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.dvb.subtitle":["sub"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx"
:["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-adobe-photoshop-brush":["abr"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-mrsid-image":["sid"],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb"
:["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest"
:["appcache"],"text/calendar":["ics","ifb"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/sgml":["sgml","sgm"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.scurl"
:["scurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-fortran":["f","for","f77","f90"],"text/x-java-source":["java"],"text/x-opml":["opml"],"text/x-pascal"
:["p","pas"],"text/x-nfo":["nfo"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/3gpp":["3gp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"
],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng"
:["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]},s={};return Object.keys(i).forEach(function(e){var t=i[e];t.forEach(function(t){s[t]=s[t]||[],s[t].push(e)})}),r.getExtensions=function(e){return e?i[e.toLowerCase()]||o(e.toLowerCase()):[]},r.getMimeTypes=function(e){return e?
s[e.toLowerCase()]||u(e.toLowerCase()):[]},r}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/utils/AdobeLibraryManifestUtils",["require","exports","module","../components/dcx-js/src/AdobeDCX","../components/dcx-js/src/AdobeDCXError","../AdobeLibraryConfig","../AdobeLibraryServices","../AdobeLibraryError"],function(e,t,n){"use strict";var r=e("../components/dcx-js/src/AdobeDCX"),i=e("../components/dcx-js/src/AdobeDCXError"),s=e("../AdobeLibraryConfig"),o=e("../AdobeLibraryServices"
),u=e("../AdobeLibraryError"),a={},f={};a.isCompatibleType=function(e,t){return e===t||e===f[t]},a.validateLibraryId=function(e,t){if(t){if(e&&e.length>=30&&e.match(/^[0-9A-Z\-]+$/i))return!0}else if(e&&e.match(/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i))return!0;return!1},a.validateLibrary=function(e){var t=e.current&&e.current.rootNode.getValue(s.VERSION_KEY);return t!==s.VERSION?!1:!0},a.getDCXKey=function(e,t){if(!e||!(typeof e=="string"||e instanceof String)||e==="")throw new 
u(u.INVALID_PARAMETER,"Invalid namespace");if(!t||!(typeof t=="string"||t instanceof String)||t==="")throw new u(u.INVALID_PARAMETER,"Invalid key");return e+"#"+t},a.getCustomDCXData=function(e){var t=e.getCustomKeys(),n=[];return t.forEach(function(t){var r=t.split("#"),i=r.length>=2;i&&r.forEach(function(e){e===""&&(i=!1)});var o=t.indexOf(s.DL_PREFIX)===0;i&&!o&&n.push({namespace:r.shift(),key:r.join("#"),value:e.getValue(t)})}),n},a.copyCustomDCXData=function(e,t){var n=a.getCustomDCXData(e);
n.forEach(function(e){t.setValue(a.getDCXKey(e.namespace,e.key),e.value)})},a.checkDeletedState=function(e,t){if(e.deletedLocally){if(t)return t(new u(u.DELETED_LOCALLY,"deleted/orphan object")),!0;throw new u(u.DELETED_LOCALLY,"deleted/orphan object")}return!1},a.checkEncoding=function(e,t,n){if(t.indexOf(e)===-1){var r=t.join(", ");return n(new u(u.INVALID_PARAMETER,"Unsupported encoding. Supported encodings are: "+r)),!1}return!0},a.removeMissingComponents=function(e,t){if(!e||!t)return undefined
;var n=0;return t.forEach(function(t){var r=t.component,i=t.error;r&&i&&i.response&&i.response.statusCode===404&&(e.removeComponent(r),n++,o.log("Removed missing component: "+r.id+" from library "+e.compositeId))}),o.log("Fixed "+n+" of "+t.length+" components that failed to download"),t.length===n?e:undefined};var l=function(e,t){var n;return e.elements.some(function(e){return e.representations.some(function(e){if(e.id===t)return n=e,!0})}),n};return a.removeMissingLocalComponents=function(e,t){
if(!e||!t)return;var n=0,r=[];t.forEach(function(t){var s=t.component,u=t.error;if(s&&u&&u.code===i.INVALID_STATE){var a=l(e,s.id);a?r.push(a):e._dcxBranch.removeComponent(s),n++,o.log("Removed missing local component: "+s.id+" from library "+e.id)}}),n>0&&(e.beginOperation(),r.forEach(function(e){e.element.removeRepresentation(e)}),e.endOperation()),o.log("Fixed "+n+" of "+t.length+" components that failed to upload")},a.collaborationStateToDCX=function(e){return e==="incoming"?r.COLLABORATION.SHARED_WITH_USER
:e==="outgoing"?r.COLLABORATION.SHARED_BY_USER:r.COLLABORATION.PRIVATE},a.collaborationStateFromDCX=function(e){return e===r.COLLABORATION.SHARED_WITH_USER?"incoming":e===r.COLLABORATION.SHARED_BY_USER?"outgoing":undefined},a.getElementReference=function(e,t,n){return"cloud-asset://"+e+s.STORAGE_ASSETS_PATH+s.LIBRARY_SYNC_GROUP+"/"+t+";node="+n},a}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/utils/AdobeLibraryFileUtils",["require","exports","module","../AdobeLibraryServices"
],function(e,t,n){"use strict";var r=e("../AdobeLibraryServices"),i={},s=function(e){return e+".TEMP_"+r.uuid()},o=function(e){var t=e.match(/(.*)\.TEMP_[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i);return t&&t[1]?t[1]:e};return i.ensurePathExists=function(e,t){function s(e,t,r){var o=t.slice(0,e).join(n),u=function(n){e<t.length?s(e+1,t,r):r(null)};i.exists(o,function(e){e?u():i.mkdir(o,u)})}var n=r.getPathSeparator(),i=r.fs,o=e.split(n);s(2,o,t)},i.copyFile=function(e,t,n){var i=
r.fs;try{var o=s(t),u=i.createWriteStream(o),a=i.createReadStream(e),f=!1;a.on("end",function(){f||i.rename(o,t,n)}),a.on("error",function(e){f=!0,n(e)}),a.pipe(u)}catch(l){n(l)}},i.normaliseTempFileName=function(e){return o(e)},i.recursiveDeleteDirectory=function(e,t){var n=r.getPathSeparator(),s=r.fs,o=function(e){e&&e.code==="ENOENT"&&(e=null),t&&t(e)};s.exists(e,function(t){t?s.readdir(e,function(t,r){function f(t){t&&t.code==="ENOENT"&&(t=null),u=u||t,a++,a===r.length&&(u?o(u):s.rmdir(e,o))}
if(t){o(t);return}if(!r||r.length===0){s.rmdir(e,o);return}var u=null,a=0;r.forEach(function(t){var r=e+n+t;s.stat(r,function(e,t){u=u||e,t&&t.isDirectory()?i.recursiveDeleteDirectory(r,f):s.unlink(r,f)})})}):o(null)})},i.moveLibrary=function(e,t,n){var i=r.fs;if(t===e.id){n(null);return}var s=e._collection._getCompositeDir(t),o=e._getCompositeDir(),u=e._collection._getRenditionCacheDir(t),a=e._getRenditionCacheDir();i.rename(s,o,function(t){if(t){n(t);return}e._dcxComposite.path=o,i.rename(u,a,n
)})},i.readLibraryDirectory=function(e,t){var n=r.fs,s=e._getTempDir();i.recursiveDeleteDirectory(s,function(){var r=e._getCompositeDir();n.readdir(r,t)})},i.doesRootDirExist=function(e,t){var n=r.fs,i=e._getCompositeDir();n.exists(i,function(e){t(null,e)})},i.deleteLibraryFromDisk=function(e,t,n){if(r.hasFileSystem()){var s=e._getCompositeDir(t),o=e._getRenditionCacheDir(t);i.recursiveDeleteDirectory(s,function(){i.recursiveDeleteDirectory(o,n)})}else n&&n(null)},i}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/utils/AdobeLibraryErrorUtils"
,["require","exports","module","../components/dcx-js/src/AdobeDCXError","../AdobeLibraryError"],function(e,t,n){"use strict";var r=e("../components/dcx-js/src/AdobeDCXError"),i=e("../AdobeLibraryError"),s={};return s.getSyncError=function(e,t){if(e){var n;return e.code===r.SERVICE_IS_INACTIVE?n=new i(i.LOGGED_OUT,"no access token: call updateAccessToken() and try again",t,e):e.code===r.NETWORK_ERROR?n=new i(i.NETWORK_ERROR,"error connecting to server",t,e):e.code===r.EXCEEDS_QUOTA?n=new i(i.EXCEEDS_QUOTA
,"push failed due to insufficient remaining quota",t,e):e.code===r.OUT_OF_SPACE?n=new i(i.OUT_OF_SPACE,"not enough disk space",t,e):e.code===r.NOT_IMPLEMENTED?n=new i(i.NOT_IMPLEMENTED,"tried to call an API not implemented on the server",t,e):e.code===r.RETRYABLE_SERVER_ERROR?n=new i(i.RETRYABLE_SERVER_ERROR,"intermittent server failure - can retry later",t,e):e.code===r.INVALID_DATA||e.code===r.INVALID_JSON?n=new i(i.CORRUPTED_LIBRARY,"unable to read manifest",t,e):n=new i(i.TRANSFER_ERROR,"something went wrong during a push/pull operation"
,t,e),n}},s.getCommitError=function(e,t,n){if(e){var s,o=n?" - "+n:"";return e.code===r.INVALID_DATA||e.code===r.INVALID_JSON?s=new i(i.CORRUPTED_LIBRARY,"unable to read manifest"+o,t,e):e.code===r.OUT_OF_SPACE?s=new i(i.OUT_OF_SPACE,"not enough disk space"+o,t,e):s=new i(i.FS_ERROR,"filesystem error"+o,t,e),s}},s.getErrorPriority=function(e){var t=[i.EXCEEDS_MAX_LIBRARY_SIZE,i.RENDITION_NOT_AVAILABLE,i.CORRUPTED_LIBRARY,i.TRANSFER_ABORTED,i.TRANSFER_ERROR,i.NETWORK_ERROR,i.EXCEEDS_QUOTA,i.RETRYABLE_SERVER_ERROR
,i.LOGGED_OUT,i.FILE_TOO_LARGE,i.FS_ERROR,i.OUT_OF_SPACE,i.ACCESS_DENIED,i.NOT_ALLOWED,i.DELETED_LOCALLY,i.REQUIRES_FILESYSTEM,i.NOT_SUPPORTED,i.NOT_IMPLEMENTED,i.INVALID_PARAMETER,i.READ_ONLY],n=e&&e.code&&t.indexOf(e.code);return n!==undefined?n:-1},s.errorToString=function(e){var t="";return e&&(e.message&&(t+=e.message),e.libraryId&&(t+=" library: "+e.libraryId),e.underlyingError?t+="\n<- "+s.errorToString(e.underlyingError):e.response&&e.response.statusCode&&(t+=": "+e.response.statusCode),e
.failedComponents&&(t+="\n<- Failed Components:",e.failedComponents.forEach(function(e){var n=e.component&&e.component.id,r=e.error,i=r&&r.message,s=r&&r.response&&r.response.statusCode;t+="\n    ["+n+"] "+i+(s?": "+s:"")}))),t},s}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryRepresentation",["require","exports","module","./AdobeLibraryServices","./AdobeLibraryConfig","./AdobeLibraryError","./utils/AdobeLibraryMimeTypeUtils","./utils/AdobeLibraryManifestUtils"
,"./utils/AdobeLibraryFileUtils","./utils/AdobeLibraryErrorUtils"],function(e,t,n){"use strict";function l(e,t,n){this._element=e,this._dcxNode=t,this._dcxComponent=n,this._deletedLocally=!1}var r=e("./AdobeLibraryServices"),i=e("./AdobeLibraryConfig"),s=e("./AdobeLibraryError"),o=e("./utils/AdobeLibraryMimeTypeUtils"),u=e("./utils/AdobeLibraryManifestUtils"),a=e("./utils/AdobeLibraryFileUtils"),f=e("./utils/AdobeLibraryErrorUtils");return l.prototype._markDeletedLocally=function(e){this._deletedLocally=
e},l.prototype._toJSON=function(){var e={id:this.id,type:this.type,relationship:this.relationship};return r.hasFileSystem()&&(e._componentPath=this._getComponentPath()),e},l.prototype._setComponentInBrowser=function(e,t,n){var r=this,i=this._element._library._collection._syncManager;i.uploadNewComponent(e,t,this,function(e,t){if(u.checkDeletedState(r,n)){n(e);return}if(e){n(e);return}u.copyCustomDCXData(r._dcxNode,t);var i=r._element._library._dcxBranch;i.removeChild(r._dcxNode),r._dcxComponent=t
,delete r._dcxNode,r._commit(),n(null)})},l.prototype._setComponentFromPath=function(e,t,n){var o=r.fs,a=this,f=e&&r.getFileNameFromPath(e),l=f?f.lastIndexOf("."):-1,c=l!==-1&&f.substr(l+1).toLowerCase(),h=this.id+"."+c;o.stat(e,function(o,l){if(l&&l.size>i.MAX_COMPONENT_SIZE){n(new s(s.FILE_TOO_LARGE,"File exceeds maximum size for a representation"));return}r.storageInterface.notifyStartWrite(a._element._library,[],function(){var r=a._element._library._dcxBranch;r.addComponent(f,a.type,a.relationship
,h,e,t,undefined,a._element._dcxNode,a.id,function(e,t){if(u.checkDeletedState(a,n))return;if(e){n(e);return}u.copyCustomDCXData(a._dcxNode,t),r.removeChild(a._dcxNode),a._dcxComponent=t,delete a._dcxNode,a._commit(),n(null)})})})},l.prototype._setComponent=function(e,t,n,i){function h(e){if(u.checkDeletedState(l,i))return;if(e){i(f.getCommitError(e,l._element._library.id,"error writing representation contents"));return}l._setComponentFromPath(c,!1,i)}function p(){t==="buffer"?s.writeFile(c,e,h):
s.writeFile(c,e,t,h)}var s=r.fs,l=this,c,d=this.element.library.collection._getTempDir();a.ensurePathExists(d,function(e){if(u.checkDeletedState(l,i))return;if(e){i(f.getCommitError(e,l._element._library.id,"error creating temp directory"));return}if(!n){var t=o.getExtensions(l.type)[0];n=l.id+"."+t}c=d+r.getPathSeparator()+n,p()})},l.prototype._getCurrentComponentPath=function(){return this._dcxComponent?this._element._library._dcxBranch.assetOfComponent(this._dcxComponent):undefined},l.prototype
._getComponentPath=function(e,t){if(!e)return this._getCurrentComponentPath();if(this._dcxComponent){var n=this._getCurrentComponentPath();if(n||t)e(null,n);else{var r=this,i=this._element._library;i._networkLock.obtain(function(t){if(t){e(t);return}if(u.checkDeletedState(r,e)){i._networkLock.release();return}i._setSyncState("downloading");var n=i._collection._syncManager;n.downloadRepresentation(r,function(t){i._networkLock.release(),i._setSyncState();if(u.checkDeletedState(r,e))return;if(t){e(f
.getSyncError(t,r._element._library.id));return}i._commit(!0,!0),r._getComponentPath(e,!0)})})}}else e(null)},l.prototype._getDCXElement=function(){return this._dcxComponent||this._dcxNode},l.prototype._commit=function(){this._element._clearRenditionCache(),this._element._commit()},l.prototype.jasmineToString=function(){return this.toString()},Object.defineProperties(l.prototype,{id:{get:function(){return this._getDCXElement().id},set:function(e){throw new s(s.READ_ONLY,"Cannot change the id of an existing representation"
,this._element._library.id)}},element:{get:function(){return this._element},set:function(e){throw new s(s.READ_ONLY,"element is a read-only property",this._element._library.id)}},writable:{get:function(){return this._element.writable},set:function(){throw new s(s.READ_ONLY,"writable is a read-only property",this._element._library.id)}},type:{get:function(){return this._getDCXElement().type},set:function(e){throw new s(s.READ_ONLY,"Cannot change the content type of an existing representation",this
._element._library.id)}},relationship:{get:function(){return this._dcxComponent?this._dcxComponent.relationship:this._dcxNode.getValue(i.RELATIONSHIP_KEY)||this._dcxNode.getValue("relationship")},set:function(e){throw new s(s.READ_ONLY,"Cannot change the relationship of an existing representation",this._element._library.id)}},width:{get:function(){if(this._dcxComponent)return this._dcxComponent.getValue("width")},set:function(e){u.checkDeletedState(this);if(!this.writable)throw new s(s.NOT_ALLOWED
,"you do not have write access to this library",this._element._library.id);if(!this._dcxComponent)throw new s(s.INVALID_PARAMETER,"Cannot set width on a representation without contents",this._element._library.id);if(typeof e!="number"||e<0)throw new s(s.INVALID_PARAMETER,"Invalid width",this._element._library.id);this._dcxComponent.setValue("width",e),this._commit()}},height:{get:function(){if(this._dcxComponent)return this._dcxComponent.getValue("height")},set:function(e){u.checkDeletedState(this
);if(!this.writable)throw new s(s.NOT_ALLOWED,"you do not have write access to this library",this._element._library.id);if(!this._dcxComponent)throw new s(s.INVALID_PARAMETER,"Cannot set height on a representation without contents",this._element._library.id);if(typeof e!="number"||e<0)throw new s(s.INVALID_PARAMETER,"Invalid height",this._element._library.id);this._dcxComponent.setValue("height",e),this._commit()}},isFullSize:{get:function(){if(this._dcxComponent)return this._dcxComponent.getValue
(i.IS_FULL_SIZE_KEY)},set:function(e){u.checkDeletedState(this);if(!this.writable)throw new s(s.NOT_ALLOWED,"you do not have write access to this library",this._element._library.id);if(!this._dcxComponent)throw new s(s.INVALID_PARAMETER,"Cannot set isFullSize on a representation without contents",this._element._library.id);if(typeof e!="boolean")throw new s(s.INVALID_PARAMETER,"Invalid isFullSize",this._element._library.id);this._dcxComponent.setValue(i.IS_FULL_SIZE_KEY,e),this._commit()}},deletedLocally
:{get:function(){return this._deletedLocally},set:function(e){throw new s(s.READ_ONLY,"deletedLocally is a read-only property",this._element._library.id)}}}),l.prototype.isCompatibleType=function(e){if(this._dcxComponent){var t=this._dcxComponent.path,n=t?t.lastIndexOf("."):-1,r=n!==-1&&t.substr(n+1).toLowerCase(),i=o.getExtensions(e);if(i.indexOf(r)===-1)return!1}return u.isCompatibleType(e,this.type)},l.prototype.toString=function(){return JSON.stringify(this._toJSON())},l.prototype.getValue=function(
e,t){if(e===i.DL_NAMESPACE)throw new s(s.INVALID_PARAMETER,"Reserved namespace",this._element._library.id);var n=u.getDCXKey(e,t);return this._getDCXElement().getValue(n)},l.prototype.getValues=function(){return u.getCustomDCXData(this._getDCXElement())},l.prototype.setValue=function(e,t,n){u.checkDeletedState(this);if(!this.writable)throw new s(s.NOT_ALLOWED,"you do not have write access to this library",this._element._library.id);if(e===i.DL_NAMESPACE)throw new s(s.INVALID_PARAMETER,"Reserved namespace"
,this._element._library.id);var r=u.getDCXKey(e,t),o;try{o=JSON.parse(JSON.stringify(n))}catch(a){throw new s(s.INVALID_PARAMETER,"Value cannot be serialized to JSON",this._element._library.id)}this._getDCXElement().setValue(r,o),this._commit()},l.prototype.updateContent=function(e,t,n,i){if(u.checkDeletedState(this,i))return;if(!this.writable){i(new s(s.NOT_ALLOWED,"you do not have write access to this library",this._element._library.id));return}if(this._dcxComponent){i(new s(s.INVALID_PARAMETER
,"Cannot modify representation content once set",this._element._library.id));return}if(!r.hasFileSystem()){if(t!==undefined){i(new s(s.INVALID_PARAMETER,"Encoding parameter not supported in-browser"));return}this._setComponentInBrowser(e,n,i)}else{if(!u.checkEncoding(t,["utf8","ascii","base64","buffer"],i))return;this._setComponent(e,t,n,i)}},l.prototype.updateContentFromPath=function(e,t,n){typeof t=="function"&&(n=t,t=!1);if(!r.hasFileSystem()){n(new s(s.REQUIRES_FILESYSTEM,"path-based APIs require a filesystem"
,this._element._library.id));return}if(u.checkDeletedState(this,n))return;if(!this.writable){n(new s(s.NOT_ALLOWED,"you do not have write access to this library",this._element._library.id));return}if(this._dcxComponent){n(new s(s.INVALID_PARAMETER,"Cannot modify representation content once set",this._element._library.id));return}this._setComponentFromPath(e,!t,n)},l.prototype.updateContentFromURL=function(e,t,n){if(!r.hasFileSystem()){n(new s(s.NOT_IMPLEMENTED,"not yet implemented updateContentFromURL without a filesystem"
,this._element._library.id));return}if(u.checkDeletedState(this,n))return;if(!this.writable){n(new s(s.NOT_ALLOWED,"you do not have write access to this library",this._element._library.id));return}if(this._dcxComponent){n(new s(s.INVALID_PARAMETER,"Cannot modify representation content once set",this._element._library.id));return}var i=this,a=this.element.library.collection._syncManager,l=this.element.library.collection._getTempDir();a.getAssetFromURL(e,t,l,function(e,t,s,a){if(e){n(f.getSyncError
(e));return}if(u.checkDeletedState(i,n))return;var l=a&&a.headers&&(a.headers["content-type"]||a.headers["Content-Type"]);if(l){var c=o.getExtensions(l)[0],h=t+"."+c;r.fs.rename(t,h,function(e){if(e){n(f.getCommitError(e));return}i._setComponentFromPath(h,!1,n)})}else i._setComponentFromPath(t,!1,n)})},l.prototype.getContentPath=function(e){if(!r.hasFileSystem()){e(new s(s.REQUIRES_FILESYSTEM,"path-based APIs require a filesystem",this._element._library.id));return}if(u.checkDeletedState(this,e))
return;this._getComponentPath(e)},l.prototype.getContent=function(e,t){var n=r.fs,i=this;if(u.checkDeletedState(this,t))return;if(!r.hasFileSystem()){if(!u.checkEncoding(e,["text","blob","arraybuffer"],t))return;if(!this._dcxComponent){t(null);return}var s=this._element._library._collection._syncManager;s.getSharedCloudContent(this,e,t)}else{if(!u.checkEncoding(e,["utf8","ascii","base64","buffer"],t))return;this._getComponentPath(function(r,s){if(r||!s){t(r);return}if(u.checkDeletedState(i,t))return;
var o=function(e,n){e&&f.getCommitError(e,i._element._library.id,"error reading content from disk"),t(e,n)};e==="buffer"?n.readFile(s,o):n.readFile(s,e,o)})}},l.prototype.getContentUrl=function(e){var t=this._element._library._collection._syncManager;t.getSharedCloudContentUrl(this,e)},l.prototype.getContentLength=function(){if(this._dcxComponent){if(this._dcxComponent.length===undefined&&r.hasFileSystem()){var e=this._getCurrentComponentPath(),t="statSync";try{var n=r.fs[t](e);return n&&n.size}catch(
i){}}return this._dcxComponent.length}return undefined},l}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryAnalytics",["require","exports","module","./AdobeLibraryServices","./AdobeLibraryConfig"],function(e,t,n){"use strict";function u(e){if(e.type){var t=e.type.match(/application\/vnd\.adobe\.element\.(.*)\+dcx/);return t&&t.length===2?t[1]:e.type}return null}function a(e){if(!e)return{};var t={libraryID:e.id,libraryElementCount:e._elements.length};return e.collaboration&&
(t.libraryShared=e.collaboration),t}function f(e){var t=e.getPrimaryRepresentation(),n=null;return t&&t.getValues().forEach(function(e){e.key==="trackingdata"&&(n||(n={}),n[e.namespace]=e.value)}),n}function l(e){if(!e)return{};var t=a(e._library);t.elementID=e.id,t.elementType=u(e);var n=f(e);return n&&(t.trackingData=JSON.stringify(n)),t}function c(e){if(!e)return{};var t=l(e._element);return t.representationType=e.type,t}function h(){return r.analytics!==null&&r.analytics!==undefined}function p
(e){h()&&e&&r.analytics.reportError(e.code+(e.underlyingError?":"+e.underlyingError.code:""))}var r=e("./AdobeLibraryServices"),i=e("./AdobeLibraryConfig"),s,o,d=function(e){h()&&r.analytics.reportEvent("createLibrary",{libraryID:e.id})},v=function(e){h()&&r.analytics.reportEvent("deleteLibrary",a(e))},m=function(e){h()&&(s=e,o=Date.now(),r.analytics.reportEvent("createElement",l(e)))},g=function(e,t){if(h()){if(e===s&&Date.now()-o<i.ANALYTICS_ELEMENT_UPDATE_THRESHOLD)return;s=e,o=Date.now();var n=
l(e);n.updateType=t?"info":"representation",r.analytics.reportEvent("updateElement",n)}},y=function(e,t,n){if(h()){var i=c(e);i.opType=t,i.details=n,r.analytics.reportEvent("useElement",i)}},b=function(e,t){if(h()){var n=l(e);n.details=t,r.analytics.reportEvent("checkoutElement",n)}},w=function(e){h()&&r.analytics.reportEvent("deleteElement",l(e))},E=function(e,t){if(h()){s=e,o=Date.now();var n=l(e);n.oldLibraryID=t._library.id,n.oldElementID=t.id,r.analytics.reportEvent("copyElement",n)}},S=function(
e,t){if(h()){s=e,o=Date.now();var n=l(e);n.oldLibraryID=t._library.id,n.oldElementID=t.id,r.analytics.reportEvent("moveElement",n)}},x=function(e){h()&&r.analytics.reportEvent("collisionLibrary",l(e))},T=function(e){h()&&r.analytics.reportEvent("createRepresentation",c(e))},N=function(e){h()&&r.analytics.reportEvent("deleteRepresentation",c(e))},C=function(e,t){if(h()){var n=l(e);n.opType=t,r.analytics.reportEvent("createLink",n)}},k=function(e){h()&&r.analytics.reportEvent("shareElementLink",l(e
))},L=function(e){h()&&r.analytics.reportEvent("shareLibraryLink",a(e))};return{reportCreateLibrary:d,reportDeleteLibrary:v,reportCreateElement:m,reportUpdateElement:g,reportCopyElement:E,reportMoveElement:S,reportUseElement:y,reportCheckoutElement:b,reportDeleteElement:w,reportCollisionElement:x,reportCreateRepresentation:T,reportDeleteRepresentation:N,reportCreateLink:C,reportShareElementLink:k,reportShareLibraryLink:L,reportError:p}}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/utils/AdobeLibraryLock"
,["require","exports","module"],function(e,t,n){"use strict";function r(){this._isLocked=!1,this._pendingContinuations=[]}return r.prototype.obtain=function(e,t){this._isLocked?this._pendingContinuations.push({continuation:e,thisObject:t}):(this._isLocked=!0,e.apply(t,[null]))},r.prototype.release=function(){if(this._pendingContinuations.length>0){var e=this._pendingContinuations.shift();setTimeout(function(){e.continuation.apply(e.thisObject,[null])})}else this._isLocked=!1},r.prototype.abortPendingOperations=
function(e){var t=this._pendingContinuations;this._pendingContinuations=[],t.forEach(function(t){t.continuation.apply(t.thisObject,[e])})},r.prototype.isLocked=function(){return this._isLocked},r.prototype.hasPendingRequest=function(){return this._pendingContinuations.length>0},r}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/utils/AdobeLibraryAsyncJoin",["require","exports","module","../AdobeLibraryError"],function(e,t,n){"use strict";function i(){this._operations=[],this
._isRunning=!1}var r=e("../AdobeLibraryError");return i.prototype.addOperation=function(e,t,n){if(this._isRunning)throw new r(r.INVALID_PARAMETER,"Cannot add operations after calling run()");this._operations.push({operation:e,argsArray:t||[],thisObject:n})},i.prototype.run=function(e,t){function n(t,n,r){e&&e(t,n,r)}function l(e,l,c){e&&t&&t(e);if(o)return;u=u||e;if(a[c]){o=!0,n(new r(r.INVALID_PARAMETER,"Operation not valid: calls callback multiple times"));return}s++,f[c]=l,a[c]=!0;if(s===i){o=!0
;var h=f.reduce(function(e,t){return e||t},!1)?!0:!1;n(u||null,h,f)}}if(this._isRunning)throw new r(r.INVALID_PARAMETER,"Cannot call run() more than once");this._isRunning=!0;var i=this._operations.length;i===0&&n(null,!1,[]);var s=0,o=!1,u,a=[],f=[];this._operations.forEach(function(e,t){e.argsArray.push(function(e,n){l(e,n,t)}),e.operation.apply(e.thisObject,e.argsArray)})},i}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/utils/AdobeLibraryRenditionUtils",["require","exports"
,"module","../AdobeLibraryConfig","../AdobeLibraryServices","./AdobeLibraryAsyncJoin","./AdobeLibraryFileUtils"],function(e,t,n){"use strict";var r=e("../AdobeLibraryConfig"),i=e("../AdobeLibraryServices"),s=e("./AdobeLibraryAsyncJoin"),o=e("./AdobeLibraryFileUtils"),u={},a="cache.json",f={"application/x-indesign":!0,"application/postscript":!0,"application/illustrator":!0,"application/pdf":!0,"application/vnd.adobe.psremix":!0,"application/vnd.adobe.pstouch":!0,"application/vnd.adobe.ideas":!0,"application/vnd.adobe.ase"
:!0,"image/jpeg":!0,"image/jpg":!0,"image/pjpeg":!0,"image/tiff":!0,"image/gif":!0,"image/bmp":!0,"image/x-ms-bmp":!0,"image/svg+xml":!0,"image/png":!0,"image/x-png":!0,"image/jp2":!0,"image/psd":!0,"image/vnd.adobe.photoshop":!0,"application/photoshop":!0,"application/x-photoshop":!0,"image/raw":!0,"image/dng":!0,"image/x-adobe-dng":!0,"video/mp4":!0,"video/mpeg":!0,"video/x-ms-wmv":!0,"video/3gpp":!0,"video/3gpp2":!0,"video/quicktime":!0,"video/x-msvideo":!0,"video/x-flv":!0,"video/x-ms-asf":!0
,"video/x-m4v":!0,"video/mp2t":!0,"application/mxf":!0,"application/x-shockwave-flash":!0,"application/vnd.adobe.brushes.brush+ucf":!0,"application/vnd.adobe.collage":!0,"application/vnd.adobe.proto":!0,"application/msword":!0,"application/msexcel":!0,"application/mspowerpoint":!0,"application/vnd.ms-publisher":!0,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":!0,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":!0,"application/vnd.openxmlformats-officedocument.presentationml.presentation"
:!0,"text/plain":!0,"text/rtf":!0},l=function(e,t){var n=i.fs;n.stat(e,function(r,i){if(r){t(r);return}i&&i.isDirectory()?o.recursiveDeleteDirectory(e,t):n.unlink(e,t)})},c=function(e,t,n){var r=i.getPathSeparator(),u=i.fs;if(!e._dcxComposite.autoRemoveUnusedLocalFiles){n(null);return}var f={};Object.keys(t.renditions).forEach(function(n){var r=t.renditions[n];Object.keys(r).forEach(function(t){var n=r[t];f[n]=!0,delete e._pendingRenditionCacheItems[n]})});var c=e._getRenditionCacheDir();u.readdir
(c,function(t,i){if(t){n(t);return}var u=new s;i.forEach(function(t){var n=o.normaliseTempFileName(t);t!==a&&!f[t]&&!e._pendingRenditionCacheItems[n]&&u.addOperation(l,[c+r+t])}),u.run(n)})};return u.readRenditionCacheData=function(e,t){var n=i.getPathSeparator(),r=i.fs,s=e._getRenditionCacheDir();r.readFile(s+n+a,"utf8",function(e,n){var r={};if(!e&&n)try{r=JSON.parse(n)}catch(i){}r.renditions=r.renditions||{},t(null,r)})},u.writeRenditionCacheData=function(e,t,n){var r=i.getPathSeparator(),s=i.
fs,u=e._getRenditionCacheDir();o.ensurePathExists(u,function(o){if(o){n(o);return}var f=u+r+a,l=f+i.uuid();s.writeFile(l,JSON.stringify(t,undefined,2),"utf8",function(r){if(r){n(r);return}s.rename(l,f,function(r){if(r){n(r);return}c(e,t,n)})})})},u.copyRenditionCache=function(e,t,n,o){var u=t._library._getRenditionCacheDir()+i.getPathSeparator(),a=new s,f=n||{};Object.keys(f).forEach(function(t){a.addOperation(e.setRenditionCache,[t,u+f[t]],e)}),r.SHARED_LOCAL_STORAGE?(a.run(),o()):a.run(o)},u.canComputeRenditionFromMimeType=
function(e){return f[e]?!0:!1},u.canComputeRendition=function(e){var t=e._dcxComponent!==undefined;return t&&u.canComputeRenditionFromMimeType(e.type)?!0:!1},u.shouldPrefetchFullRendition=function(e){var t=r.FULL_RENDITION_CONFIG||{},n=t[e.type];if(!n)return!1;var i=!1;return Object.keys(n).forEach(function(t){var r=n[t];if(r.condition==="IF_NO_MATCHING_REPRESENTATION"&&r.types){var s=e.representations.every(function(e){return r.types.indexOf(e.type)===-1});i=i||s}}),i},u.prefetchRenditions=function(
e,t){var n=new s,i=r.RENDITION_SIZES||{};e.elements.forEach(function(e){var t=i[e.type]||i["*"]||[];t.forEach(function(t){n.addOperation(e.getRenditionPath,[t],e)}),u.shouldPrefetchFullRendition(e)&&n.addOperation(e.getRenditionPath,[undefined],e)}),n.run(function(e){t&&t(e)})},u.addToRenditionSizeConfig=function(e){var t=r.RENDITION_SIZES,n=t["*"]||[];n=JSON.parse(JSON.stringify(n));var i=e["*"]||[];Object.keys(t).forEach(function(n){if(!e[n]){var r=t[n];i.forEach(function(e){r.indexOf(e)===-1&&
r.push(e)}),t[n]=r}}),Object.keys(e).forEach(function(r){var i=t[r]||JSON.parse(JSON.stringify(n)),s=e[r];s.forEach(function(e){i.indexOf(e)===-1&&i.push(e)}),t[r]=i}),r.setParameter("RENDITION_SIZES",t)},u.addToFullRenditionConfig=function(e){var t=r.FULL_RENDITION_CONFIG;Object.keys(e).forEach(function(n){var r=t[n]||{},i=e[n];i.forEach(function(e){e.id&&(r[e.id]=e)}),t[n]=r}),r.setParameter("FULL_RENDITION_CONFIG",t)},u}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/utils/AdobeLibraryListenerManager"
,["require","exports","module","../AdobeLibraryServices","../AdobeLibraryError"],function(e,t,n){"use strict";function s(e){this._restrictedTypes=e,this._listeners={}}var r=e("../AdobeLibraryServices"),i=e("../AdobeLibraryError");return s.prototype._checkType=function(e){if(this._restrictedTypes&&this._restrictedTypes.indexOf(e)===-1){var t="["+this._restrictedTypes.join(", ")+"]";throw new i(i.INVALID_PARAMETER,e+" is not allowed. Should be one of: "+t)}},s.prototype.add=function(e,t){this._checkType
(e),this._listeners[e]=this._listeners[e]||[],this._listeners[e].push(t)},s.prototype.remove=function(e,t){this._checkType(e);var n=this._listeners[e];if(n){var r=n.indexOf(t);r!==-1&&n.splice(r,1)}},s.prototype.removeAll=function(e){e?(this._checkType(e),delete this._listeners[e]):this._listeners={}},s.prototype.notify=function(e,t){this._checkType(e);var n=this._listeners[e];n&&n.slice(0).forEach(function(e){try{e.apply(undefined,t||[])}catch(n){r.log("Error in listener callback: "+(n?n.toString
():""))}})},s.prototype.hasListeners=function(e){this._checkType(e);var t=this._listeners[e];return t&&t.length>0?!0:!1},s.prototype.forEach=function(e){var t=this._listeners;Object.keys(t).forEach(function(n){t[n].forEach(function(t){e(n,t)})})},s}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryElement",["require","exports","module","./AdobeLibraryServices","./AdobeLibraryConfig","./AdobeLibraryRepresentation","./AdobeLibraryAnalytics","./AdobeLibraryError","./utils/AdobeLibraryLock"
,"./utils/AdobeLibraryManifestUtils","./utils/AdobeLibraryFileUtils","./utils/AdobeLibraryRenditionUtils","./utils/AdobeLibraryErrorUtils","./utils/AdobeLibraryListenerManager"],function(e,t,n){"use strict";function d(e,t){this._library=e,this._setDCXNode(t),this._renditionCache={},this._lock=new a,this._listenerManager=new p(["change"])}var r=e("./AdobeLibraryServices"),i=e("./AdobeLibraryConfig"),s=e("./AdobeLibraryRepresentation"),o=e("./AdobeLibraryAnalytics"),u=e("./AdobeLibraryError"),a=e("./utils/AdobeLibraryLock"
),f=e("./utils/AdobeLibraryManifestUtils"),l=e("./utils/AdobeLibraryFileUtils"),c=e("./utils/AdobeLibraryRenditionUtils"),h=e("./utils/AdobeLibraryErrorUtils"),p=e("./utils/AdobeLibraryListenerManager");return d.prototype._setDCXNode=function(e,t){var n=this;this._dcxNode=e,this._representations=[],this._deletedLocally=!1;var r=this._library._dcxBranch.getChildrenOf(e);r.forEach(function(e){var t=new s(n,e);n._representations.push(t)});var o=this._library._dcxBranch.getComponentsOf(e);o.forEach(function(
e){var t=new s(n,undefined,e);n._representations.push(t)});var u=e.getValue(i.CATEGORY_KEY);this._library._categories.forEach(function(e){e.id===u&&(n._category=e)}),t||(this._renditionCache={}),this._displayName=undefined},d.prototype._markDeletedLocally=function(e){this._deletedLocally=e,this._representations.forEach(function(t){t._markDeletedLocally(e)}),e&&this._listenerManager.removeAll()},d.prototype._removeAllListeners=function(){this._listenerManager.removeAll()},d.prototype._toJSON=function(
){var e={id:this.id,name:this.name,type:this.type,category:this._category&&this._category._id,representations:[]};return this._representations.forEach(function(t){e.representations.push(t._toJSON())}),e.representations.sort(function(e,t){return e.type>t.type?1:e.type<t.type?-1:0}),e},d.prototype._addRepresentation=function(e){this._representations.push(e)},d.prototype._removeRepresentation=function(e){var t=this._representations.indexOf(e);t!==-1&&this._representations.splice(t,1)},d.prototype._doCreateRepresentation=
function(e,t){var n=this._library._dcxBranch.addChild(undefined,undefined,undefined,this._dcxNode);n.type=e,t&&n.setValue(i.RELATIONSHIP_KEY,t);var r=new s(this,n);return this._addRepresentation(r),r},d.prototype._lookupRenditionPath=function(e){var t="existsSync",n=r.getPathSeparator(),s=this._renditionCache[e];if(s){var o=this._library._getRenditionCacheDir()+n+s;if(i.SHARED_LOCAL_STORAGE||r.fs[t](o))return o}return undefined},d.prototype._getNewRenditionPath=function(e){var t=this,n=r.getPathSeparator
(),i=this._library._getRenditionCacheDir();l.ensurePathExists(i,function(s){if(f.checkDeletedState(t,e))return;var o=r.uuid()+".png",u=i+n+o;e(s,u,o)})},d.prototype._updateModifiedTime=function(){var e=(new Date).valueOf();this._dcxNode.setValue(i.MODIFIED_KEY,e)},d.prototype._updateCreatedTime=function(){var e=(new Date).valueOf();this._dcxNode.setValue(i.CREATED_KEY,e),this._dcxNode.setValue(i.MODIFIED_KEY,e)},d.prototype._clearRenditionCache=function(){this._renditionCache={}},d.prototype._commit=
function(e){this._displayName=undefined,this._updateModifiedTime(),this._library._commit(),this._listenerManager.notify("change"),o.reportUpdateElement(this,e)},d.prototype._commitRenditionCache=function(){this._library._saveRenditionCache(),this._listenerManager.notify("change")},d.prototype._wrapOperation=function(e,t){var n=this._library._wrapOperation(function(){var n=this._library._wrapOperation(e,t);return this._updateModifiedTime(),n},this);return this._listenerManager.notify("change"),n},
d.prototype.jasmineToString=function(){return this.toString()},Object.defineProperties(d.prototype,{id:{get:function(){return this._dcxNode.id},set:function(e){throw new u(u.READ_ONLY,"Cannot change the id of an existing element",this._library.id)}},library:{get:function(){return this._library},set:function(e){throw new u(u.READ_ONLY,"library is a read-only property",this._library.id)}},writable:{get:function(){return this._library.writable},set:function(){throw new u(u.READ_ONLY,"writable is a read-only property"
,this.id)}},index:{get:function(){return this._library._elements.indexOf(this)},set:function(e){throw new u(u.READ_ONLY,"index is a read-only property",this._library.id)}},name:{get:function(){return this._dcxNode.name||""},set:function(e){f.checkDeletedState(this);if(!this.writable)throw new u(u.NOT_ALLOWED,"you do not have write access to this library",this._library.id);this._dcxNode.name=e,this._commit(!0)}},displayName:{get:function(){return this._displayName===undefined&&(this._displayName=r
.getDisplayName(this)||""),this._displayName},set:function(e){throw new u(u.READ_ONLY,"displayName is a read-only property",this._library.id)}},type:{get:function(){return this._dcxNode.type},set:function(e){throw new u(u.READ_ONLY,"Cannot change the type of an existing element",this._library.id)}},category:{get:function(){return this._category},set:function(e){f.checkDeletedState(this);if(!this.writable)throw new u(u.NOT_ALLOWED,"you do not have write access to this library",this._library.id);if(!
e&&this._library._categories.length>0||e&&this._library._categories.indexOf(e)===-1)throw new u(u.INVALID_PARAMETER,"Invalid category",this._library.id);this._library._removeElementFromFilter(this),this._category=e,this._library._addElementToFilter(this,!0),this._dcxNode.setValue(i.CATEGORY_KEY,e&&e.id),this._commit(!0)}},modified:{get:function(){return this._dcxNode.getValue(i.MODIFIED_KEY)},set:function(e){throw new u(u.READ_ONLY,"Cannot change the modified timestamp of an element directly",this
._library.id)}},created:{get:function(){return this._dcxNode.getValue(i.CREATED_KEY)},set:function(e){throw new u(u.READ_ONLY,"Cannot change the created timestamp of an element directly",this._library.id)}},representations:{get:function(){return this._representations},set:function(){throw new u(u.READ_ONLY,"Cannot modify representation list directly",this._library.id)}},deletedLocally:{get:function(){return this._deletedLocally},set:function(e){throw new u(u.READ_ONLY,"deletedLocally is a read-only property"
,this._library.id)}}}),d.prototype.toString=function(){return JSON.stringify(this._toJSON())},d.prototype.addChangeListener=function(e){f.checkDeletedState(this),this._listenerManager.add("change",e)},d.prototype.removeChangeListener=function(e){this._listenerManager.remove("change",e)},d.prototype.createRepresentation=function(e,t){f.checkDeletedState(this);if(!this.writable)throw new u(u.NOT_ALLOWED,"you do not have write access to this library",this._library.id);return this._wrapOperation(function(
){if(i.VALID_RELATIONS.indexOf(t)===-1)throw new u(u.INVALID_PARAMETER,"Unsupported relationship",this._library.id);if(this._representations.length===0&&t!=="primary")throw new u(u.INVALID_PARAMETER,"First representation must be primary",this._library.id);if(this._representations.length>0&&t==="primary"){var n=this;this._representations.forEach(function(e){if(e.relationship==="primary")throw new u(u.INVALID_PARAMETER,"Cannot have more than one primary representation",n._library.id)})}var r=this._doCreateRepresentation
(e,t);return this._clearRenditionCache(),o.reportCreateRepresentation(r),r},this)},d.prototype.removeRepresentation=function(e){f.checkDeletedState(this);if(!this.writable)throw new u(u.NOT_ALLOWED,"you do not have write access to this library",this._library.id);return this._wrapOperation(function(){this._removeRepresentation(e),e._dcxComponent?this._library._dcxBranch.removeComponent(e._dcxComponent):this._library._dcxBranch.removeChild(e._dcxNode),this._clearRenditionCache(),o.reportDeleteRepresentation
(e),e._markDeletedLocally(!0)},this)},d.prototype.removeAllRepresentations=function(){f.checkDeletedState(this);if(!this.writable)throw new u(u.NOT_ALLOWED,"you do not have write access to this library",this._library.id);return this._wrapOperation(function(){while(this._representations[0])this.removeRepresentation(this._representations[0])},this)},d.prototype.getPrimaryRepresentation=function(){var e;return this._representations.forEach(function(t){!e&&t.relationship==="primary"&&(e=t)}),e},d.prototype
._getRenditionCandidate=function(e){var t,n=0,r,i,s,o,u,a,f;for(r=0;r<this._representations.length;r++){i=this._representations[r],s=Math.max(i.width||0,i.height||0),o=i.isFullSize?Number.POSITIVE_INFINITY:s,u=i.relationship==="primary",a=i.relationship==="rendition",f=!t||u&&t.relationship!=="primary"||a&&t.relationship!=="primary"&&t.relationship!=="rendition"||a&&t.relationship==="rendition"&&o>n,f&&c.canComputeRendition(i)&&(t=i,n=o);if(a&&i.type==="image/png"&&e&&s===e)break}return t},d.prototype
.getRenditionUrl=function(e,t){var n=this;if(f.checkDeletedState(this,t))return;this._library._waitForCommit(function(){if(f.checkDeletedState(n,t))return;var r=n._getRenditionCandidate(e);if(r){var i=n._library._collection._syncManager;i.getSharedCloudRenditionUrl(r,e,t);return}t(new u(u.RENDITION_NOT_AVAILABLE,"no representation that can be converted into a rendition",n._library.id))})},d.prototype.getRenditionPath=function(e,t){var n=this;if(!r.hasFileSystem()){t(new u(u.REQUIRES_FILESYSTEM,"path-based APIs require a filesystem"
,this._library.id));return}if(f.checkDeletedState(this,t))return;this._library._waitForCommit(function(){if(f.checkDeletedState(n,t))return;if(i.SHARED_LOCAL_STORAGE){r.storageInterface.getRenditionPath(n,e,t);return}var s=function(e,r){n._lock.release(),t(e,r)};n._lock.obtain(function(){if(f.checkDeletedState(n,s))return;var t=this._lookupRenditionPath(e||"full");if(t){s(null,t);return}var i=this._getRenditionCandidate(e);if(i){if(i.relationship==="rendition"&&i.type==="image/png"&&e&&Math.max(i
.width||0,i.height||0)===e){i.getContentPath(s);return}var o=this._library._collection._syncManager;o.getSharedCloudRendition(i,e,function(t,i){if(f.checkDeletedState(n,s))return;if(t){s(new u(u.RENDITION_NOT_AVAILABLE,"error generating rendition from shared cloud",n._library.id,t));return}n._getNewRenditionPath(function(t,o,u){if(f.checkDeletedState(n,s))return;if(t){s(h.getCommitError(t,n._library.id,"unable to create rendition cache directory"));return}n._library._pendingRenditionCacheItems[u]=!0
,r.fs.rename(i,o,function(t){if(f.checkDeletedState(n,s))return;if(t){s(h.getCommitError(t,n._library.id,"unable to write rendition to cache"));return}n._renditionCache[e||"full"]=u,n._commitRenditionCache(),r.storageInterface.notifyDownloadRendition(n),s(null,o)})})});return}s(new u(u.RENDITION_NOT_AVAILABLE,"no representation that can be converted into a rendition",n._library.id))},n)})},d.prototype.setRenditionCache=function(e,t,n){if(!r.hasFileSystem()){n(new u(u.REQUIRES_FILESYSTEM,"path-based APIs require a filesystem"
,this._library.id));return}if(f.checkDeletedState(this,n))return;if(!this.writable){n(new u(u.NOT_ALLOWED,"you do not have write access to this library",this._library.id));return}if(i.SHARED_LOCAL_STORAGE){r.storageInterface.setRenditionCache(this,e,t,n);return}var s=this,o=function(e,t){s._lock.release(),n(e,t)};this._lock.obtain(function(){if(f.checkDeletedState(s,o))return;this._getNewRenditionPath(function(n,r,i){if(f.checkDeletedState(s,o))return;if(n){o(h.getCommitError(n,s._library.id,"unable to create rendition cache directory"
));return}s._library._pendingRenditionCacheItems[i]=!0,l.copyFile(t,r,function(t){if(f.checkDeletedState(s,o))return;if(t){o(h.getCommitError(t,s._library.id,"unable to write rendition to cache"));return}s._renditionCache[e||"full"]=i,s._commitRenditionCache(),o(null,r)})})},this)},d.prototype.getReference=function(){return f.getElementReference(this.library._collection._syncManager._storageHost,this.library.id,this.id)},d}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryCategory"
,["require","exports","module","./AdobeLibraryError","./utils/AdobeLibraryManifestUtils"],function(e,t,n){"use strict";function s(e,t){this._library=e,this._dcxNode=t,this._deletedLocally=!1}var r=e("./AdobeLibraryError"),i=e("./utils/AdobeLibraryManifestUtils");return s.prototype._markDeletedLocally=function(e){this._deletedLocally=e},s.prototype._toJSON=function(){var e={id:this.id,name:this.name};return e},s.prototype.jasmineToString=function(){return this.toString()},Object.defineProperties(s
.prototype,{id:{get:function(){return this._dcxNode.id},set:function(e){throw new r(r.READ_ONLY,"Cannot change the id of an existing category",this._library.id)}},writable:{get:function(){return this._library.writable},set:function(){throw new r(r.READ_ONLY,"writable is a read-only property",this._library.id)}},name:{get:function(){return this._dcxNode.name},set:function(e){i.checkDeletedState(this);if(!this.writable)throw new r(r.NOT_ALLOWED,"you do not have write access to this library",this._library
.id);this._dcxNode.name=e,this._library._commit()}},deletedLocally:{get:function(){return this._deletedLocally},set:function(e){throw new r(r.READ_ONLY,"deletedLocally is a read-only property",this._library.id)}}}),s.prototype.toString=function(){return JSON.stringify(this._toJSON())},s}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryComposite",["require","exports","module","./components/dcx-js/src/AdobeDCXError","./AdobeLibraryElement","./AdobeLibraryCategory"
,"./AdobeLibraryConfig","./AdobeLibraryAnalytics","./AdobeLibraryError","./AdobeLibraryServices","./utils/AdobeLibraryAsyncJoin","./utils/AdobeLibraryLock","./utils/AdobeLibraryRenditionUtils","./utils/AdobeLibraryManifestUtils","./utils/AdobeLibraryErrorUtils","./utils/AdobeLibraryFileUtils","./utils/AdobeLibraryListenerManager"],function(e,t,n){"use strict";function g(e,t){var n=this;this._collection=e,this._dcxComposite=t,this._dcxBranch=t.current,this._listenerManager=new m(["change"]),this._writable=!0
,this._filterCache={},this._transactionCount=0,this._commitInProgress=!1,this._pendingCommit=!1,this._onCommitCallbacks=[],this._renditionCacheLock=new c,this._pendingRenditionCacheItems={},this._networkLock=new c,this._syncState=undefined,this._deletedLocally=!1,this._deletedFromServer=!1,this._waitForSyncToFinishCallbacks=[],this._errors=[],this._pushFailedDueToQuota=!1;var r=this._dcxBranch.getChildrenOf();r.forEach(function(e){e.name===o.ELEMENTS_NAME?n._dcxElementsNode=e:e.name===o.CATEGORIES_NAME&&
(n._dcxCategoriesNode=e)}),this._dcxElementsNode||(this._dcxElementsNode=this._dcxBranch.addChild(o.ELEMENTS_NAME)),this._dcxCategoriesNode||(this._dcxCategoriesNode=this._dcxBranch.addChild(o.CATEGORIES_NAME)),this._categories=[];var u=this._dcxBranch.getChildrenOf(this._dcxCategoriesNode);u.forEach(function(e){var t=new s(n,e);n._categories.push(t)}),this._elements=[];var a=this._dcxBranch.getChildrenOf(this._dcxElementsNode);a.forEach(function(e){var t=new i(n,e);n._addElementToFilter(t),n._elements
.push(t)}),f.hasFileSystem()||(this._dcxBaseBranch=this._dcxBranch.copy())}var r=e("./components/dcx-js/src/AdobeDCXError"),i=e("./AdobeLibraryElement"),s=e("./AdobeLibraryCategory"),o=e("./AdobeLibraryConfig"),u=e("./AdobeLibraryAnalytics"),a=e("./AdobeLibraryError"),f=e("./AdobeLibraryServices"),l=e("./utils/AdobeLibraryAsyncJoin"),c=e("./utils/AdobeLibraryLock"),h=e("./utils/AdobeLibraryRenditionUtils"),p=e("./utils/AdobeLibraryManifestUtils"),d=e("./utils/AdobeLibraryErrorUtils"),v=e("./utils/AdobeLibraryFileUtils"
),m=e("./utils/AdobeLibraryListenerManager");return g.prototype._markDeletedLocally=function(e){this._deletedLocally=e,this._categories.forEach(function(t){t._markDeletedLocally(e)}),this._elements.forEach(function(t){t._markDeletedLocally(e)}),e&&this._listenerManager.removeAll()},g.prototype._removeAllListeners=function(){this._listenerManager.removeAll(),this._elements.forEach(function(e){e._removeAllListeners()})},g.prototype._toJSON=function(){var e={id:this.id,name:this.name,categories:[],elements
:[],renditionCache:{}};return this._categories.forEach(function(t){e.categories.push(t._toJSON())}),this._elements.forEach(function(t){e.elements.push(t._toJSON()),e.renditionCache[t.id]=JSON.parse(JSON.stringify(t._renditionCache))}),e},g.prototype._getRenditionCache=function(){var e={};return this._elements.forEach(function(t){e[t.id]=JSON.parse(JSON.stringify(t._renditionCache))}),e},g.prototype._setRenditionCache=function(e){this._elements.forEach(function(t){e[t.id]&&(t._renditionCache=e[t.id
])})},g.prototype._loadRenditionCache=function(e){var t=this;h.readRenditionCacheData(this,function(n,r){!n&&r&&(t._setRenditionCache(r.renditions),r.hasOwnProperty("collaboration")&&t._setCollaboration(r.collaboration)),e(null)})},g.prototype._saveRenditionCache=function(e){var t=this;if(!f.hasFileSystem()||o.SHARED_LOCAL_STORAGE){e&&e(null);return}var n=function(n){t._renditionCacheLock.release(),e&&e(n)};this._renditionCacheLock.obtain(function(){var e={};e.renditions=this._getRenditionCache()
,e.collaboration=this.collaboration,h.writeRenditionCacheData(this,e,n)},this)},g.prototype._doCommit=function(e){function n(){if(e&&!o.SHARED_LOCAL_STORAGE){if(t._deletedLocally)return;t._collection._clearSyncErrors(),t._push(),t._collection._resetPollBackoff()}}function r(){var e=t._onCommitCallbacks;t._onCommitCallbacks=[],e.forEach(function(e){t._waitForCommit(e)}),n()}function i(e,n){e&&(e=d.getCommitError(e,t.id,n)),t._collection._reportCommitError(e)}var t=this;if(!f.hasFileSystem()){r();return}
if(this._commitInProgress){this._pendingCommit=!0;return}this._commitInProgress=!0,f.storageInterface.commitManifest(this,function(n){i(n,"Failed to write composite to disk"),t._saveRenditionCache(function(n){i(n,"Failed to write rendition cache to disk"),t._commitInProgress=!1,t._pendingCommit?(t._pendingCommit=!1,t._transactionCount===0&&t._doCommit(e)):r()})})},g.prototype._waitForCommit=function(e){this._commitInProgress||this._transactionCount>0?this._onCommitCallbacks.push(e):e()},g.prototype
._commit=function(e,t){this._transactionCount===0&&(t||(this._updateModifiedTime(),this._listenerManager.notify("change")),this._doCommit(!e))},g.prototype._wrapOperation=function(e,t){this.beginOperation();var n;try{n=e.call(t)}catch(r){throw this._transactionCount--,r}return this.endOperation(),n},g.prototype._updateModifiedTime=function(){var e=(new Date).valueOf();this._dcxBranch.rootNode.setValue(o.MODIFIED_KEY,e)},g.prototype._updateCreatedTime=function(){var e=(new Date).valueOf();this._dcxBranch
.rootNode.setValue(o.CREATED_KEY,e),this._dcxBranch.rootNode.setValue(o.MODIFIED_KEY,e)},g.prototype._ensureOrder=function(e,t,n,r){var i=this[e],s=e==="_categories"?this._dcxCategoriesNode:this._dcxElementsNode,o=i.indexOf(t),u=i.indexOf(n);if(o===-1||u===-1)throw new a(a.INVALID_PARAMETER,"Items not found",this.id);if(o===u||u===o+1)return;r?(i.splice(o,1),u=i.indexOf(n),i.splice(u,0,t),this._dcxBranch.moveChild(t._dcxNode,u,s)):(i.splice(u,1),o=i.indexOf(t),i.splice(o+1,0,n),this._dcxBranch.moveChild
(n._dcxNode,o+1,s))},g.prototype._getFilterKey=function(e,t){var n=e&&o.ELEMENT_TYPE_FILTERS.indexOf(e)!==-1;return(n?e:"*")+"_"+(t?t.id:"*")},g.prototype._removeElementFromFilter=function(e){var t=this._getFilterKey(e.type,e.category);if(this._filterCache[t]){var n=this._filterCache[t].indexOf(e);n!==-1&&this._filterCache[t].splice(n,1)}},g.prototype._addElementToFilter=function(e,t){var n=this._getFilterKey(e.type,e.category);this._filterCache[n]=this._filterCache[n]||[],this._filterCache[n].push
(e),t&&this._ensureFilterOrderForElement(e)},g.prototype._ensureFilterOrderForElement=function(e){var t=this._getFilterKey(e.type,e.category);this._filterCache[t]=this._filterCache[t]||[];var n=this._elements;this._filterCache[t].sort(function(e,t){var r=n.indexOf(e),i=n.indexOf(t);return r<i?-1:r>i?1:0})},g.prototype._doCreateElement=function(e,t,n,r){var s=this._dcxBranch.addChild(e,undefined,r,this._dcxElementsNode);s.path=s.id,s.type=t,n&&s.setValue(o.CATEGORY_KEY,n.id);var u=new i(this,s);return u
._updateCreatedTime(),r!==undefined&&r>=0&&r<this._elements.length?this._elements.splice(r,0,u):this._elements.push(u),this._addElementToFilter(u,r!==undefined),u},g.prototype._doRemoveElement=function(e,t){var n=this._elements.indexOf(e);n!==-1&&this._elements.splice(n,1),this._removeElementFromFilter(e),t&&this._dcxBranch.removeChild(e._dcxNode),e._markDeletedLocally(!0)},g.prototype._doCopyDCXElement=function(e,t,n,r,s){var o=this;t.beginOperation(),f.storageInterface.notifyStartWrite(t,[this]
,function(){t._dcxBranch.copyChild(e._dcxNode,t._dcxElementsNode,undefined,r,r,function(r,u){if(p.checkDeletedState(o,s))return;if(r){t.endOperation(),s(r);return}var a=new i(t,u);t._addElementToFilter(a),t._elements.push(a);var l=function(){if(p.checkDeletedState(o,s))return;t.endOperation(),n&&o._wrapOperation(function(){o._doRemoveElement(e,!0)}),s(null,a)};f.hasFileSystem()?h.copyRenditionCache(a,e,e._renditionCache,l):l()})})},g.prototype._doCopyElement=function(e,t,n,r){if(e._library!==this||
this._elements.indexOf(e)===-1){r(new a(a.INVALID_PARAMETER,"element doesn't exist in library",this.id));return}if(t._elements.length>=o.MAX_ELEMENTS){r(new a(a.EXCEEDS_MAX_LIBRARY_SIZE,"Library cannot have more than "+o.MAX_ELEMENTS+" elements",this.id));return}var i=e.id,s=t._elements.every(function(e){return e.id!==i});s||(i=f.uuid()),this._doCopyDCXElement(e,t,n,i,r)},g.prototype.jasmineToString=function(){return this.toString()},g.prototype._setSyncState=function(e){this._syncState!==e&&(this
._syncState=e,this._collection._updateSyncState(),this._checkSyncFinishedAndNotify())},g.prototype._isSyncing=function(){return this._syncState!==undefined},g.prototype._checkSyncFinishedAndNotify=function(){if(!this._isSyncing()){var e=this._waitForSyncToFinishCallbacks;this._waitForSyncToFinishCallbacks=[],e.forEach(function(e){e()})}},g.prototype._waitForSyncToFinish=function(e){this._waitForSyncToFinishCallbacks.push(e),this._checkSyncFinishedAndNotify()},g.prototype._setCollaboration=function(
e){if(this.collaboration!==e){var t=p.collaborationStateToDCX(e);this._dcxComposite.collaborationType=t,this._commit(!0,!0),this._listenerManager.notify("change")}},g.prototype._isDeletedError=function(e){var t=e&&(e.code===r.NO_COMPOSITE||e.code===r.DELETED_COMPOSITE),n=e&&e.code===r.UNEXPECTED_RESPONSE&&e.response&&e.response.statusCode===401;return t||this.collection.isPublic&&n},g.prototype._mergeAndSwitchToBranch=function(e,t,n){function c(t,c){if(p.checkDeletedState(r,n))return;if(t){n(d.getCommitError
(t,r.id));return}f.log("Starting merge "+(s?"(local)":"(remote)")),c.name!==r.name&&(e.name=r.name);var v=e.rootNode.getValue(o.MODIFIED_KEY),m=Math.max(v||0,r.modified||0);m&&v!==m&&e.rootNode.setValue(o.MODIFIED_KEY,m);var g,y,b=e.getChildrenOf();b.forEach(function(e){e.name===o.ELEMENTS_NAME?g=e:e.name===o.CATEGORIES_NAME&&(y=e)}),g||(g=e.addChild(o.ELEMENTS_NAME)),y||(y=e.addChild(o.CATEGORIES_NAME));var w={},E=[],S=[],x=new l;r._elements.forEach(function(t){var n=t.id,a=t._dcxNode,l=t.modified
,p=e.getChildWithId(n),d=p&&p.getValue(o.MODIFIED_KEY),v=c&&c.getChildWithId(n),m=v&&v.getValue(o.MODIFIED_KEY);l&&d&&!m&&(m=0),r._dcxBranch=e;if(!m&&!d||m&&!d&&l!==m){f.log("1: created locally");var y=e.copyChild(a,g,undefined,undefined,undefined);t._setDCXNode(y,!0)}else if(m&&!d&&l===m)f.log("2: deleted on server"),S.push(t);else if(m===l&&m===d)f.log("3: no changes"),t._setDCXNode(p,!0);else if(m===l&&m!==d)f.log("4: updated on server"),t._setDCXNode(p,s),E.push(t);else if(m!==l&&m===d){f.log
("5: updated locally");var b=e.replaceChild(a,undefined,undefined);t._setDCXNode(b,!0)}else if(m!==l&&m!==d){f.log("6: updated locally and on server (conflict)");var T=t._renditionCache;t._setDCXNode(p),E.push(t);var N=f.uuid(),C=e.copyChild(a,g,undefined,N,N),k=new i(r,C);r._addElementToFilter(k),r._elements.push(k),w[k.id]=!0,f.hasFileSystem()&&x.addOperation(h.copyRenditionCache,[k,t,T]),u.reportCollisionElement(t)}else f.log("ERROR: unexpected merge case: base="+m+", current="+l+", pulled="+d
);r._dcxBranch=r._dcxComposite.current,w[n]=!0}),S.forEach(function(e){r._doRemoveElement(e,!1)}),r._dcxBranch=e,r._dcxElementsNode=g,r._dcxCategoriesNode=y;var T=r._dcxBranch.getChildrenOf(r._dcxElementsNode);T.forEach(function(t){if(!w[t.id]){var n=t.getValue(o.MODIFIED_KEY),s=c&&c.getChildWithId(t.id),u=s&&s.getValue(o.MODIFIED_KEY);if(u&&n&&u===n)f.log("7: deleted locally"),e.removeChild(t);else{f.log("8: created on server");var a=new i(r,t);r._addElementToFilter(a),r._elements.push(a)}}}),r.
_transactionCount++,x.run(function(){if(p.checkDeletedState(r,n))return;r._transactionCount--,f.storageInterface.resolvePullWithBranch(r,e,a,s,function(t){if(p.checkDeletedState(r,n))return;if(t){n(d.getCommitError(t,r.id));return}f.hasFileSystem()||(r._dcxBaseBranch=e.copy()),!o.SHARED_LOCAL_STORAGE&&!s&&h.prefetchRenditions(r),E.forEach(function(e){e._listenerManager.notify("change")}),r._listenerManager.notify("change"),n(null)})})}var r=this,s=t!==undefined,a=e.localData;this._waitForCommit(function(
){if(p.checkDeletedState(r,n))return;t?c(null,t):r._dcxBranch.compositeState==="unmodified"?c(null,r._dcxBranch):f.hasFileSystem()?r._dcxComposite.loadBaseBranch(c):c(null,r._dcxBaseBranch)})},g.prototype._pull=function(e){var t=this;if(!this._dcxComposite.href||!this._dcxBranch.isBound){e(null,!1);return}if(this._deletedFromServer){e(null,!1);return}var n=function(n,r){if(p.checkDeletedState(t,e))return;n&&t._collection._reportSyncError(n),t._setSyncState(),t._networkLock.release(),e(n,r)};this.
_networkLock.obtain(function(r){if(r){e(null);return}if(p.checkDeletedState(t,e))return;this._setSyncState("downloading"),this._collection._syncManager.pullComposite(this._dcxComposite,this._collection,function(r,i){if(p.checkDeletedState(t,e))return;if(t._isDeletedError(r)){f.hasFileSystem()&&t._dcxBranch.compositeState==="modified"&&t.collaboration!=="incoming"?(t._doRebindToServer(e),t._networkLock.release()):(t._deletedFromServer=!0,t._listenerManager.notify("change"),n(null,!0));return}if(r)
{n(d.getSyncError(r,t.id));return}if(!i){n(null,!1);return}t._mergeAndSwitchToBranch(i,undefined,function(r){if(p.checkDeletedState(t,e))return;n(r,!0)})})},this)},g.prototype._pushWithParameters=function(e,t){var n=this,i=function(e,n){t&&t(null,n)};if(!o.SYNCING_ENABLED){i(null,!1);return}if(this._collection._retryTimeoutId){i(null,!1);return}if(this._dcxBranch.isBound&&this._dcxBranch.compositeState!=="modified"){i(null,!1);return}if(this._deletedFromServer){i(null,!1);return}if(!this.writable
){i(null,!1);return}if(this._pushPending){i(null,!1);return}var s=function(e,t){if(p.checkDeletedState(n,i))return;n._pushFailedDueToQuota=!1,e&&(n._collection._reportSyncError(e),e.code===a.EXCEEDS_QUOTA&&(n._pushFailedDueToQuota=!0)),n._setSyncState(),n._networkLock.release(),i(null,t)};this._pushPending=!0,this._networkLock.obtain(function(t){if(t){i(null,!1);return}this._waitForCommit(function(){if(p.checkDeletedState(n,i))return;n._pushPending=!1;var t;f.hasFileSystem()||(t=n._dcxBranch.copy
()),n._setSyncState("uploading"),n._collection._syncManager.pushComposite(n._dcxComposite,n._collection,e,function(e){if(p.checkDeletedState(n,i))return;if(n._isDeletedError(e)){f.hasFileSystem()&&n._dcxBranch.compositeState==="modified"&&n.collaboration!=="incoming"?(n._doRebindToServer(i),n._networkLock.release()):(n._deletedFromServer=!0,n._listenerManager.notify("change"),s(null,!0));return}if(e&&e.code===a.TRANSFER_ABORTED){s(null,!0);return}if(e&&e.code===r.UPDATE_CONFLICT){f.log("Push failed due to conflict: "+
n.id),n._sync(!1,i),n._networkLock.release();return}e&&e.code===r.COMPONENT_UPLOAD_ERROR&&(f.log("Push failed due to component upload failure: "+n.id),p.removeMissingLocalComponents(n,e.failedComponents));if(e){s(d.getSyncError(e,n.id));return}f.storageInterface.acceptPush(n,function(e){if(p.checkDeletedState(n,i))return;if(e){s(d.getCommitError(e,n.id),!0);return}f.hasFileSystem()||(n._dcxBaseBranch=t),s(null,!0)})})})},this)},g.prototype._push=function(e){this._pushWithParameters(!1,e)},g.prototype
._abortPushOrPull=function(){this._networkLock.abortPendingOperations(new a(a.TRANSFER_ABORTED)),this._collection._syncManager.abortPushOrPull(this.id)},g.prototype._deleteFromServer=function(e,t){var n=this;if(!this._dcxComposite.href||!this._dcxBranch.isBound){t(null);return}if(this._deletedFromServer){t(null);return}this._deletingFromServerInProgress||this._abortPushOrPull(),this._deletingFromServerInProgress=!0;var i=function(e){n._deletingFromServerInProgress=!1,n._networkLock.release(),t(e)
};this._networkLock.obtain(function(s){if(s){t(null);return}if(this._deletedFromDisk){i(null);return}this._setSyncState("uploading"),this._dcxBranch.compositeState="pendingDelete",this._commit(!0,!0),this._waitForCommit(function(){if(n._deletedFromDisk){i(null);return}n._collection._syncManager.pushDeletedComposite(n._dcxComposite,n._collection,n.collaboration,e,function(t){if(t){if(n._isDeletedError(t))t=null;else if(e||t.code!==r.UPDATE_CONFLICT)t=d.getSyncError(t,n.id),n._collection._reportSyncError
(t)}else n._deletedFromServer=!0;n._setSyncState(),i(t)})})},this)},g.prototype._doRebindToServer=function(e){var t=this;this._deletedFromServer=!1;var n=this.collaboration==="incoming"?"resetIdentity":"resetBinding",r=this.id;this._dcxComposite[n](function(n){if(p.checkDeletedState(t,e))return;if(n){e(n);return}t._transactionCount++,t.id!==r&&(t._collection._libraryIdMap[t.id]=t,delete t._collection._libraryIdMap[r]),v.moveLibrary(t,r,function(n){if(p.checkDeletedState(t,e))return;t._transactionCount--
;if(n){e(n);return}t._collection._syncManager.prepareCompositeForPush(t._dcxComposite),t._setCollaboration(),t._commit(!1,!0),t._pushWithParameters(!0,e)})})},g.prototype._sync=function(e,t){function r(e,r){t&&n._waitForSyncToFinish(function(){t(e,r)})}function i(e,t){if(p.checkDeletedState(n,r))return;if(e){r(e,t);return}n._push(function(e,i){if(p.checkDeletedState(n,r))return;r(e,t||i)})}var n=this;if(o.SHARED_LOCAL_STORAGE||!o.SYNCING_ENABLED){r(null,!1);return}if(this._collection._retryTimeoutId
){r(null,!1);return}this._collection._clearSyncErrors(this.id),e?i(null,!1):this._pull(i)},g.prototype._getCompositeDir=function(){return this._collection._getCompositeDir(this.id)},g.prototype._getRenditionCacheDir=function(){return this._collection._getRenditionCacheDir(this.id)},Object.defineProperties(g.prototype,{id:{get:function(){return this._publicId||this._dcxComposite.id},set:function(e){throw new a(a.READ_ONLY,"Cannot change the id of an existing library",this.id)}},collection:{get:function(
){return this._collection},set:function(e){throw new a(a.READ_ONLY,"collection is a read-only property",this.id)}},writable:{get:function(){return this._writable},set:function(e){throw new a(a.READ_ONLY,"writable is a read-only property",this.id)}},name:{get:function(){return this._dcxComposite.name||""},set:function(e){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id);this._dcxComposite.name=e,this._commit()}},modified:{
get:function(){return this._dcxBranch.rootNode.getValue(o.MODIFIED_KEY)},set:function(e){throw new a(a.READ_ONLY,"Cannot change the modified timestamp of a library directly",this.id)}},created:{get:function(){return this._dcxBranch.rootNode.getValue(o.CREATED_KEY)},set:function(e){throw new a(a.READ_ONLY,"Cannot change the created timestamp of a library directly",this.id)}},categories:{get:function(){return this._categories},set:function(e){throw new a(a.READ_ONLY,"Cannot modify categories list directly"
,this.id)}},elements:{get:function(){return this._elements},set:function(){throw new a(a.READ_ONLY,"Cannot modify elements list directly",this.id)}},deletedFromServer:{get:function(){return this._deletedFromServer},set:function(){throw new a(a.READ_ONLY,"deletedFromServer is a read-only property",this.id)}},deletedLocally:{get:function(){return this._deletedLocally},set:function(e){throw new a(a.READ_ONLY,"deletedLocally is a read-only property",this.id)}},quotaExceeded:{get:function(){return this
._pushFailedDueToQuota},set:function(){throw new a(a.READ_ONLY,"quotaExceeded is a read-only property",this.id)}},collaboration:{get:function(){var e=this._dcxComposite.collaborationType;return p.collaborationStateFromDCX(e)},set:function(){throw new a(a.READ_ONLY,"collaboration is a read-only property",this.id)}},syncState:{get:function(){return this._syncState},set:function(){throw new a(a.READ_ONLY,"syncState is a read-only property")}},syncProgress:{get:function(){var e=this._collection._syncProgressMap
[this.id];return e&&e.progress},set:function(){throw new a(a.READ_ONLY,"syncProgress is a read-only property")}}}),g.prototype.toString=function(){return JSON.stringify(this._toJSON())},g.prototype.addChangeListener=function(e){p.checkDeletedState(this),this._listenerManager.add("change",e)},g.prototype.removeChangeListener=function(e){this._listenerManager.remove("change",e)},g.prototype.createElement=function(e,t,n,r){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library"
,this.id);if(this._elements.length>=o.MAX_ELEMENTS)throw new a(a.EXCEEDS_MAX_LIBRARY_SIZE,"Library cannot have more than "+o.MAX_ELEMENTS+" elements",this.id);if(!n&&this._categories.length>0)throw new a(a.INVALID_PARAMETER,"Must provide a category for a new element, if the library has categories",this.id);if(n&&this._categories.indexOf(n)===-1)throw new a(a.INVALID_PARAMETER,"Invalid category",this.id);return this._wrapOperation(function(){var i=this._doCreateElement(e,t,n,r);return u.reportCreateElement
(i),i},this)},g.prototype.removeElement=function(e){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id);return this._wrapOperation(function(){this._doRemoveElement(e,!0),u.reportDeleteElement(e)},this)},g.prototype.moveElementAfter=function(e,t){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id);return this._wrapOperation(function(){this._ensureOrder
("_elements",t,e),this._ensureFilterOrderForElement(e)},this)},g.prototype.moveElementBefore=function(e,t){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id);return this._wrapOperation(function(){this._ensureOrder("_elements",e,t,!0),this._ensureFilterOrderForElement(e)},this)},g.prototype.copyElement=function(e,t,n){if(p.checkDeletedState(this,n))return;if(!e){n(new a(a.INVALID_PARAMETER,"No element specified",this.id));return}
if(!t){n(new a(a.INVALID_PARAMETER,"No destination library specified",this.id));return}if(!t.writable){n(new a(a.NOT_ALLOWED,"you do not have write access to this library",t.id));return}return this._doCopyElement(e,t,!1,function(t,r){if(t){n(t);return}u.reportCopyElement(r,e),n(null,r)})},g.prototype.moveElement=function(e,t,n){if(p.checkDeletedState(this,n))return;if(!this.writable){n(new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id));return}if(!e){n(new a(a.INVALID_PARAMETER
,"No element specified",this.id));return}if(!t){n(new a(a.INVALID_PARAMETER,"No destination library specified",this.id));return}if(this===t){n(new a(a.INVALID_PARAMETER,"Move must have a different destination library",this.id));return}return this._doCopyElement(e,t,!0,function(t,r){if(t){n(t);return}u.reportMoveElement(r,e),n(null,r)})},g.prototype.createCategory=function(e,t){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this
.id);return this._wrapOperation(function(){var n=this._dcxBranch.addChild(e,undefined,t,this._dcxCategoriesNode),r=new s(this,n);return t!==undefined&&t>=0&&t<this._categories.length?this._categories.splice(t,0,r):this._categories.push(r),this._categories.length===1&&this._elements.forEach(function(e){e.category=r}),r},this)},g.prototype.removeCategory=function(e,t,n){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id);return this
._wrapOperation(function(){function s(){r._dcxBranch.removeChild(e._dcxNode),r._categories.splice(i,1),e._markDeletedLocally(!0)}var r=this,i=this._categories.indexOf(e);if(i===-1)throw new a(a.INVALID_PARAMETER,"Category not found",this.id);if(t){var o=[];this._elements.forEach(function(t){t.category===e&&o.push(t)}),o.forEach(function(e){r.removeElement(e)}),s()}else{if(this._categories.length===1){if(n!==undefined)throw new a(a.INVALID_PARAMETER,"Invalid replacement category",this.id)}else{var u=!1
;this._elements.forEach(function(t){t.category===e&&(u=!0)});if(u){var f=n&&this._categories.indexOf(n)!==-1&&n!==e;if(!f)throw new a(a.INVALID_PARAMETER,"Invalid replacement category",this.id)}}s(),this._elements.forEach(function(t){t.category===e&&(t.category=n)})}},this)},g.prototype.moveCategoryAfter=function(e,t){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id);return this._wrapOperation(function(){this._ensureOrder
("_categories",t,e)},this)},g.prototype.moveCategoryBefore=function(e,t){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id);return this._wrapOperation(function(){this._ensureOrder("_categories",e,t,!0)},this)},g.prototype.beginOperation=function(){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id);this._transactionCount++},g.prototype.endOperation=function(
){p.checkDeletedState(this);if(!this.writable)throw new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id);this._transactionCount--,this._commit()},g.prototype.getFilteredElements=function(e,t){if(!e)throw new a(a.INVALID_PARAMETER,"must specify element type to filter",this.id);if(e!=="*"&&o.ELEMENT_TYPE_FILTERS.indexOf(e)===-1)throw new a(a.INVALID_PARAMETER,"must specify '*', or an element type in config.ELEMENT_TYPE_FILTERS",this.id);var n=this._getFilterKey(e,t);return this
._filterCache[n]=this._filterCache[n]||[],this._filterCache[n]},g.prototype.sync=function(e){if(p.checkDeletedState(this,e))return;this._sync(!1,e)},g.prototype.rebindToServer=function(e){if(!f.hasFileSystem()){e(new a(a.REQUIRES_FILESYSTEM,"rebindToServer requires a filesystem",this.id));return}if(p.checkDeletedState(this,e))return;if(!this.writable){e(new a(a.NOT_ALLOWED,"you do not have write access to this library",this.id));return}if(!this._deletedFromServer){e(null);return}this._doRebindToServer
(e)},g.prototype.getElementById=function(e){var t;return this.elements.forEach(function(n){n.id===e&&(t=n)}),t},g}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/utils/AdobeLibrarySyncUtils",["require","exports","module","../AdobeLibraryConfig"],function(e,t,n){"use strict";var r=e("../AdobeLibraryConfig"),i={};return i.getBackoffTicks=function(e){var t=r.BACKOFF_INTERVALS,n=Math.max(0,Math.min(e,t.length-1));return t[n]-1},i.getRetryAfterHeader=function(e){if(e){var t=e["retry-after"
]||e["Retry-After"];if(t)try{var n=parseInt(t,10);if(n)return Math.max(0,n);var i=Date.parse(t);if(i){var s=(new Date).valueOf(),o=Math.max(0,i-s)/1e3,u=Math.floor(Math.random()*r.RETRY_RANDOM_SECONDS);return o+u}}catch(a){}}return 0},i.getLocationHeader=function(e){if(e){var t=e.location||e.Location;if(t)return t}},i}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibrarySyncManager",["require","exports","module","./components/dcx-js/src/AdobeStorageSession","./components/dcx-js/src/AdobeDCXCompositeXfer"
,"./components/dcx-js/src/AdobeDCXUtil","./components/dcx-js/src/AdobeDCXError","./AdobeLibraryConfig","./AdobeLibraryError","./AdobeLibraryServices","./utils/AdobeLibrarySyncUtils","./utils/AdobeLibraryFileUtils","./utils/AdobeLibraryManifestUtils"],function(e,t,n){"use strict";function p(e,t){this._collection=e,this._isPublic=t.IS_PUBLIC,this._storageHost=t.STORAGE_HOSTNAME,this._storageAssetsPath=this._isPublic?u.PUBLIC_STORAGE_ASSETS_PATH:u.STORAGE_ASSETS_PATH,this._apiKey=u.STORAGE_API_KEY,this
._syncGroup=this._isPublic?u.PUBLIC_LIBRARY_SYNC_GROUP:u.LIBRARY_SYNC_GROUP,this._XHR=t.XHR,this._getAccessToken=t.getAccessToken,this._httpServices=[],this._storageService=this._createStorageSession(),this._renditionStorageService=this._createStorageSession(),this._lastSyncGroupState={},this._hasSetAuthToken=!1,this._authToken=undefined,this._inProgressSyncMap={},!u.SHARED_LOCAL_STORAGE&&!this._isPublic&&this._updateAuthToken()}var r=e("./components/dcx-js/src/AdobeStorageSession"),i=e("./components/dcx-js/src/AdobeDCXCompositeXfer"
),s=e("./components/dcx-js/src/AdobeDCXUtil"),o=e("./components/dcx-js/src/AdobeDCXError"),u=e("./AdobeLibraryConfig"),a=e("./AdobeLibraryError"),f=e("./AdobeLibraryServices"),l=e("./utils/AdobeLibrarySyncUtils"),c=e("./utils/AdobeLibraryFileUtils"),h=e("./utils/AdobeLibraryManifestUtils");return p.prototype._getNodeTunnelOptions=function(){if(this.NODE_TUNNEL_OPTIONS===undefined){this.NODE_TUNNEL_OPTIONS={};var e=typeof nodeRequire,t=typeof process;if(e!=="undefined"&&t!=="undefined"&&process.env
)try{var n=nodeRequire("tunnel");process.env.CCLIBRARIES_CHARLES_PORT?(this.NODE_TUNNEL_OPTIONS.agent=n.httpsOverHttp({proxy:{host:"localhost",port:process.env.CCLIBRARIES_CHARLES_PORT}}),this.NODE_TUNNEL_OPTIONS.rejectUnauthorized=!1,f.log("Tunneling through Charles proxy: http://localhost:"+process.env.CCLIBRARIES_CHARLES_PORT)):process.env.CCLIBRARIES_HTTPS_PROXY&&(this.NODE_TUNNEL_OPTIONS.agent=n.httpsOverHttp({proxy:{host:process.env.CCLIBRARIES_HTTPS_PROXY,port:process.env.CCLIBRARIES_HTTPS_PROXY_PORT
,proxyAuth:u.PROXY_AUTH}}),f.log("Tunneling through system proxy: "+process.env.CCLIBRARIES_HTTPS_PROXY+":"+process.env.CCLIBRARIES_HTTPS_PROXY_PORT))}catch(r){f.log("Unable to load tunnel module.")}}return this.NODE_TUNNEL_OPTIONS},p.prototype._setAuthToken=function(e){this._hasSetAuthToken=!0,this._authToken=e,this._httpServices.forEach(function(t){e?(t.isActive=!0,t.setAuthToken(e)):t.isActive=!1})},p.prototype._updateAuthToken=function(e){var t=this;this._getAccessToken(function(n,r){!n&&r?t.
_setAuthToken(r):(n&&n.code===a.ACCESS_DENIED&&(t._collection._reportSyncError(n),t._collection._updateSyncState()),t._setAuthToken()),e&&e(null,r)})},p.prototype._getAuthToken=function(e){this._isPublic?e(null,undefined):this._hasSetAuthToken?e(null,this._authToken):this._updateAuthToken(e)},p.prototype._authHandler=function(){this._updateAuthToken()},p.prototype._createStorageSession=function(){var e;return this._isPublic?e=f.dcx.createHTTPService():e=f.dcx.createHTTPService(this._authHandler.bind
(this)),e.setApiKey(this._apiKey),e.setTimeout(u.NETWORK_TIMEOUT),e.setAdditionalNodeOptions(this._getNodeTunnelOptions()),this._XHR&&e._forceXhr(this._XHR),this._httpServices.push(e),f.dcx.createStorageSession(e,this._getStorageHost())},p.prototype._createTemporaryStorageSession=function(e){var t=this,n=f.dcx.createHTTPService(function(e){e.setAuthToken(t._authToken)});n.setApiKey(this._apiKey),n.setTimeout(u.NETWORK_TIMEOUT),n.setAdditionalNodeOptions(this._getNodeTunnelOptions()),n.setAuthToken
(t._authToken);var r=s.parseURI(e),i=r.scheme+"://"+r.authority;return f.dcx.createStorageSession(n,i)},p.prototype.getServerComposites=function(e){var t=this,n=this._lastSyncGroupState.etag;this._storageService.getCollection(this.getSyncGroupPath(),n,function(n,r,i,s){if(n){n.response&&n.response.statusCode===404?e(null,[]):e(n);return}if(!r){var o=Math.max(u.DEFAULT_MAX_SYNC_INTERVAL,l.getRetryAfterHeader(s)*1e3);u.MAX_SYNC_INTERVAL=o,e(null,[]);return}u.MAX_SYNC_INTERVAL=u.DEFAULT_MAX_SYNC_INTERVAL
;var a=t._lastSyncGroupState.compositeEtags||{},f={},c=[],p={},d=r.children||[];d.forEach(function(e){if(!e||!h.validateLibraryId(e.name,!1))return;var t=e.etag&&a[e.name]===e.etag;c.push(e),p[e.name]={isUnmodified:t,collaboration:e.collaboration},f[e.name]=e.etag}),t._lastSyncGroupState={etag:i,compositeEtags:f},e(null,c,p)})},p.prototype.clearSyncGroupCache=function(){this._lastSyncGroupState={}},p.prototype.hasCompositeChangedOnServer=function(e,t){var n=this._storageService.getCompositeManifestHref
(e);this._storageService.headRequest(n,function(n,r){if(n){t(!0);return}var i=r&&r.headers&&r.headers.etag,s=e.current&&e.current.manifestEtag;t(i!==s)})},p.prototype.downloadRepresentation=function(e,t){var n=e._dcxComponent,r=e.element.library._dcxBranch;i.downloadComponents([n],r,this._storageService,t)},p.prototype.abortPushOrPull=function(e){this._inProgressSyncMap[e]&&(this._inProgressSyncMap[e].abort(new a(a.TRANSFER_ABORTED,"abort push or pull operation")),delete this._inProgressSyncMap[e
])},p.prototype.pullComposite=function(e,t,n){var r=this,s=e.id;if(!s&&e.href){var l=e.href.split("/");s=l&&l[l.length-1]}var c=u.SYNC_POLICY==="manifestOnly"||!f.hasFileSystem(),p=c?"pullCompositeManifestOnly":"pullComposite";f.log("Started pulling: "+s+(c?" (manifest only)":""));var d=(new Date).valueOf();t._updateProgress(s),this._inProgressSyncMap[s]=i[p](e,this._storageService,function(e,i){var u=(new Date).valueOf()-d;f.log("Finished pulling: "+s+(e?" ["+e.code+"]":"")+" duration="+u),delete 
r._inProgressSyncMap[s],t._updateProgress(s);if(e&&e.code===o.COMPONENT_DOWNLOAD_ERROR){var l=h.removeMissingComponents(e.pulledBranch,e.failedComponents);if(l){n(null,l);return}}if(e&&e.code===a.TRANSFER_ABORTED){n(null,undefined);return}n(e,i)});var v=this._inProgressSyncMap[s];v.onProgress=function(e,n){n!==0&&t._updateProgress(s,e,n)}},p.prototype.pushComposite=function(e,t,n,r){var s=this,o=e.id;f.log("Started pushing: "+o);var u=(new Date).valueOf();t._updateProgress(o),this._inProgressSyncMap
[o]=i.pushComposite(e,n,this._storageService,function(e){var n=(new Date).valueOf()-u;f.log("Finished pushing: "+o+(e?" ["+e.code+"]":"")+" duration="+n),delete s._inProgressSyncMap[o],t._updateProgress(o),r(e)});var a=this._inProgressSyncMap[o];a.onProgress=function(e,n){n!==0&&t._updateProgress(o,e,n)}},p.prototype.pushDeletedComposite=function(e,t,n,r,i){var s=this;n==="incoming"?(f.log("Deleting incoming collaboration without pushing: "+e.id),this._storageService.deleteCompositeDirectory(e,i)
):(f.log("Pushing deleted composite: "+e.id),this.pushComposite(e,t,r,function(n){if(n){if(n.code===o.UNEXPECTED_RESPONSE&&n.response&&n.response.statusCode===404){s._storageService.deleteCompositeDirectory(e,i);return}if(n.code===o.UPDATE_CONFLICT){var r=n;s.pullComposite(e,t,function(t){if(t&&t.code===o.NO_COMPOSITE){s._storageService.deleteCompositeDirectory(e,i);return}if(t&&t.code===o.DELETED_COMPOSITE){i(null);return}if(t){i(t);return}i(r)});return}}i(n)}))},p.prototype._getStorageHost=function(
){return"https://"+this._storageHost},p.prototype._getStorageRoot=function(){return this._getStorageHost()+this._storageAssetsPath},p.prototype.getSyncGroupPath=function(){return s.appendPathElements(this._getStorageRoot(),this._syncGroup)},p.prototype.getCompositePath=function(e){return s.appendPathElements(this._getStorageRoot(),this._syncGroup,e)},p.prototype.getComponentPath=function(e,t){return s.appendPathElements(this._getStorageRoot(),this._syncGroup,e,t)},p.prototype._getSharedCloudRenditionUrl=
function(e,t,n,r){if(!e._dcxComponent){r("representation must be a component to generate a rendition");return}var i=this.getComponentPath(e._element._library.id,e.id)+"/:rendition";i+=";size="+(t||"full"),e._dcxComponent.version!==undefined&&(i+=";version="+e._dcxComponent.version);if(n){var s=this._apiKey;this._getAuthToken(function(e,t){i+="?accept=image/png&api_key="+s+(t?"&user_token="+t:""),r(null,i)});return}r(null,i)},p.prototype._getAssetAsType=function(e,t,n,r,i,s){var a=this;s=s||0;var f=
function(){a._getAssetAsType(e,t,n,r,i,s)};if(s>0&&e.element.library.syncState==="uploading"){setTimeout(f,u.RENDITION_RETRY_INTERVAL);return}this._renditionStorageService.getAssetAsType(t,n,r,function(e){var t=e&&e.code===o.UNEXPECTED_RESPONSE&&e.response&&e.response.statusCode===404;if(t&&s<u.RENDITION_MAX_RETRIES){s++,setTimeout(f,u.RENDITION_RETRY_INTERVAL);return}i(e)})},p.prototype.getSharedCloudRenditionUrl=function(e,t,n){this._getSharedCloudRenditionUrl(e,t,!0,n)},p.prototype.getSharedCloudRendition=
function(e,t,n){var i=this;this._getSharedCloudRenditionUrl(e,t,!1,function(t,s){if(t){n(t);return}var o={Accept:"image/png"},u=e.element.library.collection._getTempDir();c.ensurePathExists(u,function(t){if(t){n(t);return}var a=u+f.getPathSeparator()+f.uuid()+".png",l=new r.FileContent(a);i._getAssetAsType(e,s,l,o,function(e){n(e,a)})})})},p.prototype.getSharedCloudContentUrl=function(e,t){var n=this._storageService.getComponentHref(e._dcxComponent,e._dcxComponent.version),r=this._apiKey;this._getAuthToken
(function(e,i){n+="?api_key="+r+(i?"&user_token="+i:""),t(null,n)})},p.prototype.getSharedCloudContent=function(e,t,n){var r=this._storageService.getComponentHref(e._dcxComponent,e._dcxComponent.version),i={};this._storageService.getAssetAsType(r,t,i,function(e,t){if(e){n(e);return}n(null,t)})},p.prototype.getAssetFromURL=function(e,t,n,i,s){var u=this,a=this._createTemporaryStorageSession(e),h=n+f.getPathSeparator()+f.uuid(),p=new r.FileContent(h);s=s||0,t=t||{},c.ensurePathExists(n,function(r){
if(r){i(r);return}a.getAssetAsType(e,p,t,function(e,t,r,a){if(e&&e.code===o.UNEXPECTED_RESPONSE){var f=e.response&&e.response.statusCode;if(f===301||f===302||f===303||f===307){var c=l.getLocationHeader(e.response.headers),p={Authorization:null};if(c&&s<5){u.getAssetFromURL(c,p,n,i,s+1);return}}}i(e,h,r,a)})})},p.prototype.prepareCompositeForPush=function(e){e.href=this.getCompositePath(e.id)},p.prototype.updateAccessToken=function(e){this._setAuthToken(e)},p.prototype.isLoggedIn=function(){return this
._httpServices[0].isActive},p.prototype.uploadNewComponent=function(e,t,n,r){var s=n._element._library._dcxComposite;i.uploadNewComponent(e,n.type,s,n.id,this._storageService,function(e,i){if(e){r(e);return}var o=t?t.lastIndexOf("."):-1,u=o!==-1&&t.substr(o+1).toLowerCase(),a=n.id+"."+u,f=s.current.addComponentWithUploadResults(t,n.relationship,a,n._element._dcxNode,i);r(null,f)})},p}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryCollection",["require","exports"
,"module","./components/dcx-js/src/AdobeDCXError","./AdobeLibraryComposite","./AdobeLibraryServices","./AdobeLibraryConfig","./AdobeLibrarySyncManager","./AdobeLibraryAnalytics","./AdobeLibraryError","./utils/AdobeLibraryAsyncJoin","./utils/AdobeLibraryFileUtils","./utils/AdobeLibraryManifestUtils","./utils/AdobeLibraryErrorUtils","./utils/AdobeLibrarySyncUtils","./utils/AdobeLibraryRenditionUtils","./utils/AdobeLibraryListenerManager"],function(e,t,n){"use strict";function g(e){this._rootDir=o.ROOT_DIR
,this._userId=e.USER_ID,this._cloudId=e.CLOUD_ID,this._cloudInfo=e.CLOUD_INFO||{},this._syncManager=new u(this,e),this._libraries=[],this._syncState="syncing",this._syncProgressMap={},this._initialSyncInProgress=!1,this._syncErrors=[],this._listenerManager=new m(["change","sync","commitError"]),this._libraryIdMap={},this._pendingDeletes=[],this._loaded=!1,this._syncing=!1,this._lastSyncTime=0,this._pendingSyncs=[],this._backoffTicks=0,this._numBackoffs=0,this._numRetries=0}var r=e("./components/dcx-js/src/AdobeDCXError"
),i=e("./AdobeLibraryComposite"),s=e("./AdobeLibraryServices"),o=e("./AdobeLibraryConfig"),u=e("./AdobeLibrarySyncManager"),a=e("./AdobeLibraryAnalytics"),f=e("./AdobeLibraryError"),l=e("./utils/AdobeLibraryAsyncJoin"),c=e("./utils/AdobeLibraryFileUtils"),h=e("./utils/AdobeLibraryManifestUtils"),p=e("./utils/AdobeLibraryErrorUtils"),d=e("./utils/AdobeLibrarySyncUtils"),v=e("./utils/AdobeLibraryRenditionUtils"),m=e("./utils/AdobeLibraryListenerManager");return g.prototype._removeAllListeners=function(
){this._listenerManager.removeAll(),this._libraries.forEach(function(e){e._removeAllListeners()})},g.prototype._load=function(e){if(this._loaded){e(null);return}this._loaded=!0;var t=this;c.readLibraryDirectory(this,function(n,r){function o(e,n){if(h.validateLibraryId(e,t.isPublic)){var r=t._getCompositeDir(e);s.dcx.newCompositeFromLocalStorage(r,function(r,o){if(r){s.log("Load error: DCX error loading composite for "+e),n(p.getCommitError(r,e));return}if(!o||!o.current){s.log("Load error: composite/branch not loaded for "+
e),c.deleteLibraryFromDisk(t,e),n(null);return}if(!h.validateLibrary(o)){s.log("Load error: failed validation for "+e),n(null);return}if(!t.isPublic&&o.id!==e){s.log("Load error: library id "+o.id+"doesn't match folder on disk "+e),n(null);return}var u=new i(t,o);t.isPublic&&(u._publicId=e,u._writable=!1),o.current.compositeState==="pendingDelete"?(t._pendingDeletes.push(u),n(null)):(t._libraries.push(u),t._libraryIdMap[u.id]=u,u._loadRenditionCache(n))})}else n(null)}if(n||!r){e(null);return}var u=new 
l;r.forEach(function(e){u.addOperation(o,[e])}),u.run(function(n){s.log("Loaded "+t._libraries.length+" libraries and "+t._pendingDeletes.length+" pending deletes"),e(null)},function(e){t._reportCommitError(e)})})},g.prototype._removeFromPendingDeletes=function(e){var t=this._pendingDeletes.indexOf(e);t!==-1&&this._pendingDeletes.splice(t,1)},g.prototype._handlePendingDeletes=function(e){var t=this,n=new l;this._pendingDeletes.forEach(function(e){n.addOperation(function(n){e._deleteFromServer(!1,
function(i){if(i&&i.code===r.UPDATE_CONFLICT){t._removeFromPendingDeletes(e),t._libraries.push(e),t._libraryIdMap[e.id]=e,e._markDeletedLocally(!1),t._updateSyncState(),t._listenerManager.notify("change"),n(null,!0);return}if(i){n(i);return}t._removeFromPendingDeletes(e),e._deletedFromDisk=!0,c.deleteLibraryFromDisk(t,e.id,function(e){n(e,!0)})})})}),n.run(e)},g.prototype._doesLibraryExist=function(e){if(this._libraryIdMap[e])return!0;var t;for(t=0;t<this._pendingDeletes.length;t++)if(this._pendingDeletes
[t].id===e)return!0;return!1},g.prototype._syncNewLibrary=function(e,t,n){var o=this,u=this._syncManager.getCompositePath(e),a=s.hasFileSystem()&&this._getCompositeDir(e),l=s.dcx.newCompositeWithHref(u,a);o._libraryIdMap[e]="pending",o._updateSyncState(),o._syncManager.pullComposite(l,o,function(s,u){if(s){delete o._libraryIdMap[e],o._updateSyncState(),s.code===r.NO_COMPOSITE||s.code===r.DELETED_COMPOSITE?s=null:s=p.getSyncError(s,e),n(s,!0);return}l.resolvePullWithBranch(u,function(r){if(r||!o.isPublic&&
l.id!==e){delete o._libraryIdMap[e],o._updateSyncState(),r=r?p.getCommitError(r,e):new f(f.CORRUPTED_LIBRARY,"Library id does not match sync group id"),n(r,!0);return}var s=new i(o,l);o.isPublic&&(s._publicId=e,s._writable=!1),o._libraries.push(s),o._libraryIdMap[s.id]=s,o._updateSyncState(),s._setCollaboration(t&&t.toLowerCase()),v.prefetchRenditions(s),o._listenerManager.notify("change"),n(null,!0)})})},g.prototype._syncNewLibraries=function(e,t){var n=this,r=new l;if(this._loadingHint){var i=[
];e.forEach(function(e){n._loadingHint.indexOf(e.name)!==-1&&i.push(e)}),e.forEach(function(e){n._loadingHint.indexOf(e.name)===-1&&i.push(e)}),e=i}e.forEach(function(e){var t=e.name,i=e.collaboration;if(n._doesLibraryExist(e.name))return;r.addOperation(n._syncNewLibrary,[t,i],n)}),r.run(t)},g.prototype._syncExistingLibraries=function(e,t){var n=this,r=new l;this._libraries.forEach(function(t){var i=e&&e[t.id];i&&(t._setCollaboration(i.collaboration&&i.collaboration.toLowerCase()),t._deletedFromServer=!1
);var s=!e||i&&i.isUnmodified;t.collaboration===undefined?r.addOperation(t._sync,[s],t):s?r.addOperation(function(e){n._syncManager.hasCompositeChangedOnServer(t._dcxComposite,function(n){t._sync(!n,e)})}):r.addOperation(t._sync,[!1],t)}),r.run(t)},g.prototype._dosync=function(e){var t=this;this._clearSyncErrors(),this._syncManager.getServerComposites(function(n,r,i){if(n){n=p.getSyncError(n),t._reportSyncError(n),e(null,!1);return}var s=new l;s.addOperation(t._syncNewLibraries,[r],t),s.addOperation
(t._syncExistingLibraries,[i],t),s.addOperation(t._handlePendingDeletes,[],t),s.run(function(t,n){e(null,n)},function(e){t._reportSyncError(e)})})},g.prototype._reportSyncError=function(e){e&&(s.log("Sync error: "+p.errorToString(e)),this._syncErrors.push(e))},g.prototype._clearSyncErrors=function(e){if(e){var t=[];this._syncErrors.forEach(function(n){n.libraryId!==e&&t.push(n)}),this._syncErrors=t}else this._syncErrors=[]},g.prototype._reportCommitError=function(e){this._lastCommitError=e,e&&(s.
log("Commit error: "+p.errorToString(e)),this._listenerManager.notify("commitError",[e]))},g.prototype._updateRetryState=function(){if(this._retryTimeoutId)return;if(this._syncState==="syncing")return;if(this._syncState==="error"){var e=this.getPrimarySyncError();if(e&&e.code===f.RETRYABLE_SERVER_ERROR){this._numRetries++;if(this._numRetries>o.ERROR_RETRY_INTERVALS.length){this._retryTime="never",s.log("Retry Failed"),o.MAX_SYNC_INTERVAL=o.RETRY_FAIL_MAX_SYNC_INTERVAL;return}s.log("Retry "+this._numRetries
);var t=e.underlyingError&&e.underlyingError.response&&e.underlyingError.response.headers,n=d.getRetryAfterHeader(t)*1e3;n>0?(this._numRetries=o.ERROR_RETRY_INTERVALS.length,s.log("Got Retry-After header")):n=o.ERROR_RETRY_INTERVALS[this._numRetries-1]*1e3,s.log("Retrying after "+n+"ms"),this._retryTime=(new Date).valueOf()+n;var r=this;this._retryTimeoutId=setTimeout(function(){r._retryTimeoutId=undefined,r._retryTime=undefined,s.log("Starting retry"),r._syncWithParameters(!1)},n);return}if(e&&e
.code===f.EXCEEDS_QUOTA){o.MAX_SYNC_INTERVAL=o.RETRY_FAIL_MAX_SYNC_INTERVAL,this._numRetries=o.ERROR_RETRY_INTERVALS.length+1,this._retryTime="never";return}}this._numRetries=0,this._retryTime=undefined},g.prototype._updateSyncState=function(){var e=this,t=this._initialSyncInProgress;Object.keys(this._libraryIdMap).forEach(function(n){var r=e._libraryIdMap[n],i=r==="pending"||r._isSyncing();t=t||i});var n;t?n="syncing":(this._syncErrors.length>0?(n="error",e._syncManager.clearSyncGroupCache(),a.reportError
(this.getPrimarySyncError())):n="ok",this._syncProgressMap={},this._syncProgress=undefined);var r=this._syncState;this._syncState=n,this._updateRetryState(),(r!==n||this._syncState==="error")&&this._listenerManager.notify("sync"),e._ensureDefaultLibrary()},g.prototype._updateProgress=function(e,t,n){n?this._syncProgressMap[e]={bytesLoaded:t||0,bytesTotal:n}:this._syncProgressMap[e]?(this._syncProgressMap[e].bytesTotal===0&&(this._syncProgressMap[e].bytesTotal=1e4),this._syncProgressMap[e].bytesLoaded=
this._syncProgressMap[e].bytesTotal):this._syncProgressMap[e]={bytesLoaded:0,bytesTotal:0};var r=!1,i=t||0,s=n||0,o=s>0?Math.max(0,Math.min(100,Math.round(i/n*100))):undefined;this._syncProgressMap[e].progress!==o&&(this._syncProgressMap[e].progress=o,r=!0);var u=0,a=0,f=0,l=0,c=this._syncProgressMap;Object.keys(c).forEach(function(e){u++,c[e].bytesTotal>0&&a++,f+=c[e].bytesLoaded,l+=c[e].bytesTotal});var h=l>0?f*a/(l*u):0,p=Math.max(0,Math.min(100,Math.round(h*100)));if(!this._syncProgress||this
._syncProgress<p||this._syncProgress===100&&p<100)this._syncProgress=p,r=!0;r&&this._listenerManager.notify("sync")},g.prototype._setInitialSyncState=function(e,t){this._initialSyncInProgress=e,this._loadingHint=t,this._updateSyncState()},g.prototype._resetPollBackoff=function(){this._backoffTicks=0,this._numBackoffs=0},g.prototype._getBaseDir=function(){var e=s.getPathSeparator(),t=this._userId.replace(/@/g,"_");return this._rootDir+e+t+e+this._cloudId},g.prototype._getCompositeDir=function(e){var t=
s.getPathSeparator(),n=this._getBaseDir()+t+"dcx";return e&&(n+=t+e),n},g.prototype._getTempDir=function(){var e=s.getPathSeparator();return this._getBaseDir()+e+".tmp"},g.prototype._getRenditionCacheDir=function(e){var t=s.getPathSeparator(),n=this._getBaseDir()+t+"renditions";return e&&(n+=t+e),n},g.prototype._ensureDefaultLibrary=function(){var e=this.syncState==="ok"&&!this.initialSyncInProgress&&o.SYNCING_ENABLED;!this.isPublic&&o.DEFAULT_LIBRARY_NAME&&e&&this.libraries.length===0&&(s.log("Creating default library: "+
o.DEFAULT_LIBRARY_NAME),this.createLibrary(o.DEFAULT_LIBRARY_NAME))},g.prototype._doRemoveLibrary=function(e,t){var n=this,r=function(e){t&&t(e)},i=this._libraries.indexOf(e);i!==-1&&(this._libraries.splice(i,1),delete this._libraryIdMap[e.id]),e._removeAllListeners(),o.SHARED_LOCAL_STORAGE?(e._dcxBranch.compositeState="pendingDelete",e._commit(!1,!0),e._markDeletedLocally(!0),r(null)):(n._pendingDeletes.push(e),o.SYNCING_ENABLED?e._deleteFromServer(!0,function(t){e._markDeletedLocally(!0);if(t){
r(null);return}n._removeFromPendingDeletes(e),e._deletedFromDisk=!0,c.deleteLibraryFromDisk(n,e.id,r)}):(e._dcxBranch.compositeState="pendingDelete",e._commit(!0,!0),e._markDeletedLocally(!0),r(null))),this._listenerManager.notify("change")},Object.defineProperties(g.prototype,{libraries:{get:function(){return this._libraries},set:function(){throw new f(f.READ_ONLY,"Cannot modify libraries list directly")}},commitError:{get:function(){return this._lastCommitError},set:function(){throw new f(f.READ_ONLY
,"commitError is a read-only property")}},syncState:{get:function(){return this._syncState},set:function(){throw new f(f.READ_ONLY,"syncState is a read-only property")}},syncErrors:{get:function(){return this._syncErrors},set:function(){throw new f(f.READ_ONLY,"syncErrors is a read-only property")}},syncProgress:{get:function(){return this._syncProgress},set:function(){throw new f(f.READ_ONLY,"syncProgress is a read-only property")}},initialSyncInProgress:{get:function(){return this._initialSyncInProgress
},set:function(){throw new f(f.READ_ONLY,"initialSyncInProgress is a read-only property")}},isPolling:{get:function(){return this._pollTimerId!==undefined},set:function(){throw new f(f.READ_ONLY,"isPolling is a read-only property")}},retryTime:{get:function(){if(this._retryTime!=="never")return this._retryTime},set:function(){throw new f(f.READ_ONLY,"retryTime is a read-only property")}},userId:{get:function(){return this._userId},set:function(){throw new f(f.READ_ONLY,"userId is a read-only property"
)}},cloudId:{get:function(){return this._cloudId},set:function(){throw new f(f.READ_ONLY,"cloudId is a read-only property")}},cloudInfo:{get:function(){return this._cloudInfo},set:function(){throw new f(f.READ_ONLY,"cloudInfo is a read-only property")}},isPublic:{get:function(){return!1},set:function(){throw new f(f.READ_ONLY,"isPublic is a read-only property")}}}),g.prototype.addChangeListener=function(e){this._listenerManager.add("change",e)},g.prototype.removeChangeListener=function(e){this._listenerManager
.remove("change",e)},g.prototype.createLibrary=function(e,t){var n=s.uuid(),r=o.COMPOSITE_TYPE,u=this._getCompositeDir(n),f=s.dcx.newEmptyComposite(e,r,u,n);f.current.rootNode.setValue(o.VERSION_KEY,o.VERSION),this._syncManager.prepareCompositeForPush(f);var l=new i(this,f);return l._updateCreatedTime(),this._libraries.push(l),this._libraryIdMap[l.id]=l,this._listenerManager.notify("change"),t?l.beginOperation():l._commit(!1,!0),a.reportCreateLibrary(l),l},g.prototype.removeLibrary=function(e,t){
this._doRemoveLibrary(e,t),a.reportDeleteLibrary(e)},g.prototype.removeDeletedLibraries=function(e,t){function i(e,t){var r=n._libraries.indexOf(e);r!==-1&&(n._libraries.splice(r,1),delete n._libraryIdMap[e.id]),e._deletedFromDisk=!0,c.deleteLibraryFromDisk(n,e.id,t),e._markDeletedLocally(!0)}var n=this;typeof e=="function"&&(t=e,e=undefined);var r=e&&e.exclude||[],s=new l,o=!1;this._libraries.forEach(function(e){if(e.deletedFromServer){var t=!0;r.forEach(function(n){t=t&&e!==n}),t&&(o=!0,s.addOperation
(i,[e]))}}),s.run(function(e){o&&n._listenerManager.notify("change"),t(e)})},g.prototype.sync=function(e){this._syncWithParameters(!1,!1,e)},g.prototype._syncWithParameters=function(e,t,n){var r=this,i=function(){n&&n(null)};if(o.SHARED_LOCAL_STORAGE){s.storageInterface.sync(this),i();return}if(!o.SYNCING_ENABLED){i();return}if(this._retryTimeoutId){i();return}e||this._resetPollBackoff();if(this.isPolling){if(this._syncing){i();return}}else if(this._syncing){r._pendingSyncs.push(i);return}var u=(new 
Date).valueOf();if(u<this._lastSyncTime+o.MAX_SYNC_INTERVAL){if(!t){setTimeout(function(){r._syncWithParameters(e,!0,i)},o.MAX_SYNC_INTERVAL);return}i();return}s.log("Start Sync "+(e?"[polling]":"")),this._syncing=!0,this._lastSyncTime=(new Date).valueOf(),this._dosync(function(e,t){r._syncing=!1,r._updateSyncState(),s.log("End Sync"),t&&(r._backoffTicks=0,r._numBackoffs=0);if(r._pendingSyncs.length>0){var n=r._pendingSyncs;r._pendingSyncs=[],r.sync(function(){n.forEach(function(e){e()})})}i()})}
,g.prototype.addSyncListener=function(e){this._listenerManager.add("sync",e)},g.prototype.removeSyncListener=function(e){this._listenerManager.remove("sync",e)},g.prototype.getPrimarySyncError=function(){var e=this._syncErrors[0];return this._syncErrors.forEach(function(t){var n=p.getErrorPriority(t),r=p.getErrorPriority(e);n>r?e=t:n===r&&e.code===t.code&&e.libraryId!==t.libraryId&&(e=new f(e.code,"multiple errors (see libraryCollection.syncErrors)",undefined))}),e},g.prototype.getNewLibrarySyncProgress=
function(){var e=this;if(this._newLibraryProgress)return this._newLibraryProgress;var t=[];return Object.keys(this._libraryIdMap).forEach(function(n){e._libraryIdMap[n]==="pending"&&t.push({id:n,progress:e._syncProgressMap[n]&&e._syncProgressMap[n].progress})}),t},g.prototype.addCommitErrorListener=function(e){this._listenerManager.add("commitError",e)},g.prototype.removeCommitErrorListener=function(e){this._listenerManager.remove("commitError",e)},g.prototype.startPolling=function(){if(o.SHARED_LOCAL_STORAGE
)throw new f(f.NOT_SUPPORTED,"startPolling() not supported with shared local storage");if(!this.isPolling){var e=this,t=o.POLL_INTERVAL*6e4;this._pollTimerId=setInterval(function(){if(e._retryTime==="never")return;if(e._backoffTicks>0){e._backoffTicks--;return}e._backoffTicks===0&&(e._numBackoffs++,e._backoffTicks=d.getBackoffTicks(e._numBackoffs)),e._syncWithParameters(!0)},t)}},g.prototype.stopPolling=function(){if(o.SHARED_LOCAL_STORAGE)throw new f(f.NOT_SUPPORTED,"stopPolling() not supported with shared local storage"
);this.isPolling&&(clearInterval(this._pollTimerId),delete this._pollTimerId),this._retryTimeoutId&&(clearTimeout(this._retryTimeoutId),delete this._retryTimeoutId)},g.prototype.getDefaultLibrary=function(){var e;return this.libraries.forEach(function(t){t.collaboration!=="incoming"&&(!e||(e.created||0)>(t.created||0))&&(e=t)}),e},g.prototype.getLibraryById=function(e){var t;return this.libraries.forEach(function(n){n.id===e&&(t=n)}),t},g.prototype.updateAccessToken=function(e){if(o.SHARED_LOCAL_STORAGE
)throw new f(f.NOT_SUPPORTED,"updateAccessToken() not supported with shared local storage");this._syncManager.updateAccessToken(e),s.log("Update access token: "+e?"defined":"undefined")},g.prototype.isLoggedIn=function(){if(o.SHARED_LOCAL_STORAGE)throw new f(f.NOT_SUPPORTED,"isLoggedIn() not supported with shared local storage");return this._syncManager.isLoggedIn()},g.prototype.getTempDir=function(e){if(!s.hasFileSystem()){e(new f(f.REQUIRES_FILESYSTEM,"getTempDir only supported when you have a filesystem"
));return}var t=this._getTempDir();c.ensurePathExists(t,function(n){e(n,t)})},g}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryPublicCollection",["require","exports","module","./AdobeLibraryCollection","./AdobeLibraryError","./AdobeLibraryConfig","./AdobeLibraryServices","./utils/AdobeLibraryAsyncJoin","./utils/AdobeLibraryFileUtils"],function(e,t,n){"use strict";function f(e){e.IS_PUBLIC=!0,e.USER_ID=s.PUBLIC_USER_ID,this._newLibrariesLoading={},r.call(this,
e)}var r=e("./AdobeLibraryCollection"),i=e("./AdobeLibraryError"),s=e("./AdobeLibraryConfig"),o=e("./AdobeLibraryServices"),u=e("./utils/AdobeLibraryAsyncJoin"),a=e("./utils/AdobeLibraryFileUtils");return Object.keys(r.prototype).forEach(function(e){e.indexOf("_")===0&&(f.prototype[e]=r.prototype[e])}),f.prototype._dosync=function(e){var t=this;this._clearSyncErrors();var n=new u;this._libraries.forEach(function(e){n.addOperation(function(n){t._syncManager.hasCompositeChangedOnServer(e._dcxComposite
,function(t){e._sync(!t,n)})})}),n.run(function(t,n){e(null,n)},function(e){t._reportSyncError(e)})},Object.defineProperties(f.prototype,{libraries:{get:function(){return this._libraries},set:function(){throw new i(i.READ_ONLY,"Cannot modify libraries list directly")}},commitError:{get:function(){return this._lastCommitError},set:function(){throw new i(i.READ_ONLY,"commitError is a read-only property")}},syncState:{get:function(){return this._syncState},set:function(){throw new i(i.READ_ONLY,"syncState is a read-only property"
)}},syncErrors:{get:function(){return this._syncErrors},set:function(){throw new i(i.READ_ONLY,"syncErrors is a read-only property")}},syncProgress:{get:function(){return this._syncProgress},set:function(){throw new i(i.READ_ONLY,"syncProgress is a read-only property")}},isPolling:{get:function(){return this._pollTimerId!==undefined},set:function(){throw new i(i.READ_ONLY,"isPolling is a read-only property")}},retryTime:{get:function(){if(this._retryTime!=="never")return this._retryTime},set:function(
){throw new i(i.READ_ONLY,"retryTime is a read-only property")}},cloudId:{get:function(){return this._cloudId},set:function(){throw new i(i.READ_ONLY,"cloudId is a read-only property")}},cloudInfo:{get:function(){return this._cloudInfo},set:function(){throw new i(i.READ_ONLY,"cloudInfo is a read-only property")}},isPublic:{get:function(){return!0},set:function(){throw new i(i.READ_ONLY,"isPublic is a read-only property")}}}),f.prototype.addChangeListener=function(e){r.prototype.addChangeListener.
call(this,e)},f.prototype.removeChangeListener=function(e){r.prototype.removeChangeListener.call(this,e)},f.prototype.loadLibrary=function(e,t){function i(t,r){var i=n._newLibrariesLoading[e];delete n._newLibrariesLoading[e],i.forEach(function(e){e(t,r)})}var n=this;if(this.getLibraryById(e)){t(null,this.getLibraryById(e));return}var r=this._newLibrariesLoading[e];if(r){r.push(t);return}this._newLibrariesLoading[e]=[t];if(s.SHARED_LOCAL_STORAGE){o.storageInterface.loadPublicLibrary(this,e,i);return}
this._syncNewLibrary(e,undefined,function(t){if(t){i(t);return}i(null,n.getLibraryById(e))})},f.prototype.unloadLibrary=function(e,t){var n=this._libraries.indexOf(e);if(n===-1){t(null);return}this._libraries.splice(n,1),delete this._libraryIdMap[e.id],e._markDeletedLocally(!0),s.SHARED_LOCAL_STORAGE?o.storageInterface.unloadPublicLibrary(e,t):(e._deletedFromDisk=!0,a.deleteLibraryFromDisk(this,e.id,t)),this._listenerManager.notify("change")},f.prototype.unloadDeletedLibraries=function(e,t){r.prototype
.removeDeletedLibraries.call(this,e,t)},f.prototype.sync=function(e){r.prototype.sync.call(this,e)},f.prototype.addSyncListener=function(e){r.prototype.addSyncListener.call(this,e)},f.prototype.removeSyncListener=function(e){r.prototype.removeSyncListener.call(this,e)},f.prototype.getPrimarySyncError=function(){return r.prototype.getPrimarySyncError.call(this)},f.prototype.getNewLibrarySyncProgress=function(){return r.prototype.getNewLibrarySyncProgress.call(this)},f.prototype.addCommitErrorListener=
function(e){r.prototype.addCommitErrorListener.call(this,e)},f.prototype.removeCommitErrorListener=function(e){r.prototype.removeCommitErrorListener.call(this,e)},f.prototype.startPolling=function(){r.prototype.startPolling.call(this)},f.prototype.stopPolling=function(){r.prototype.stopPolling.call(this)},f.prototype.getLibraryById=function(e){return r.prototype.getLibraryById.call(this,e)},f}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryCollectionManager",["require"
,"exports","module","./utils/AdobeLibraryListenerManager"],function(e,t,n){"use strict";function i(){this._collections=[],this._listenerManager=new r(["change"])}var r=e("./utils/AdobeLibraryListenerManager");return i.prototype.getLibraryCollection=function(e,t){var n;return this._collections.forEach(function(r){!r.isPublic&&r.userId===e&&r.cloudId===t&&(n=r)}),n},i.prototype.getPublicLibraryCollection=function(e){var t;return this._collections.forEach(function(n){n.isPublic&&n.cloudId===e&&(t=n)
}),t},i.prototype.addLibraryCollection=function(e){this._collections.push(e),this._listenerManager.notify("change")},i.prototype.removeLibraryCollection=function(e){var t=this._collections.indexOf(e);t!==-1&&(this._collections.splice(t,1),this._listenerManager.notify("change"))},i.prototype.removeAllLibraryCollections=function(){this._collections=[],this._listenerManager.notify("change")},i.prototype.getLoadedCollections=function(){return this._collections},i.prototype.addLoadedCollectionsListener=
function(e){this._listenerManager.add("change",e)},i.prototype.removeLoadedCollectionsListener=function(e){this._listenerManager.remove("change",e)},i}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryMessageChannel",["require","exports","module","./AdobeLibraryServices","./utils/AdobeLibraryListenerManager"],function(e,t,n){"use strict";function s(e){this._socket=e,this._listenerManager=new i,this._socketListenerManager=new i,this._pendingWriteState={},this._pendingWriteDependencyMap=
{},this._init()}function o(e){return e+"_req"}function u(e){return e+"_res"}function a(e,t,n){return e+"#"+t+"#"+n}var r=e("./AdobeLibraryServices"),i=e("./utils/AdobeLibraryListenerManager");return s.prototype._init=function(){var e=this;this._addSocketListener("message",function(t){var n=JSON.parse(t);e._logReceive(n.type),e._listenerManager.notify(n.type,[n.data])})},s.prototype._addSocketListener=function(e,t){this._socketListenerManager.add(e,t),this._socket.addListener(e,t)},s.prototype._removeSocketListeners=
function(){var e=this;this._socketListenerManager.forEach(function(t,n){e._socket.removeListener(t,n)}),this._socketListenerManager.removeAll()},s.prototype._logSend=function(e){this._logCallback&&this._logCallback("SEND "+e)},s.prototype._logReceive=function(e){this._logCallback&&this._logCallback("RECEIVE "+e)},s.prototype.setPendingWriteState=function(e,t,n){var r=a(e,t,n);this._pendingWriteState[r]=!0},s.prototype.setPendingWriteDependency=function(e,t,n,r,i,s){var o=a(e,t,n),u=a(r,i,s);o!==u&&
(this._pendingWriteDependencyMap[o]=this._pendingWriteDependencyMap[o]||{},this._pendingWriteDependencyMap[o][u]={userId:r,cloudId:i,id:s})},s.prototype.clearPendingWriteState=function(e,t,n){var r=a(e,t,n),i=[];return Object.keys(this._pendingWriteDependencyMap[r]||{}).forEach(function(e){i.push(this._pendingWriteDependencyMap[r][e])},this),delete this._pendingWriteState[r],delete this._pendingWriteDependencyMap[r],i},s.prototype.getPendingWriteState=function(e,t,n,r){var i=a(e,t,n),s=!1;return!
r&&this._pendingWriteState[i]&&(s=this._pendingWriteState[i]),Object.keys(this._pendingWriteDependencyMap).forEach(function(e){var t=this._pendingWriteDependencyMap[e];t[i]&&(s=this._pendingWriteState[e]||s)},this),s},s.prototype.setLogCallback=function(e){this._logCallback=e},s.prototype.addListener=function(e,t){this._listenerManager.add(e,t)},s.prototype.removeListener=function(e,t){this._listenerManager.remove(e,t)},s.prototype.send=function(e,t){try{this._logSend(e),this._socket.send(JSON.stringify
({type:e,data:t}))}catch(n){this._socketListenerManager.notify("error",[n])}},s.prototype.addCallListener=function(e,t){var n=this;this.addListener(o(e),function(r){var i=r.id;t(r.data,function(t){n.send(u(e),{id:i,data:t})})})},s.prototype.removeCallListener=function(e,t){this.removeListener(o(e))},s.prototype.call=function(e,t,n){var i=this,s=r.uuid(),a=function(t){t.id===s&&(i.removeListener(u(e),a),n(t.data))};this.addListener(u(e),a),this.send(o(e),{id:s,data:t})},s.prototype.onOpen=function(
e){this._addSocketListener("open",e)},s.prototype.onClose=function(e){this._addSocketListener("close",e)},s.prototype.onError=function(e){this._addSocketListener("error",e)},s.prototype.shutdown=function(){var e=this;this._addSocketListener("close",function(){e._removeSocketListeners(),e._listenerManager.removeAll()}),this._socket.close()},s}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryWebSocket",["require","exports","module","./AdobeLibraryConfig","./utils/AdobeLibraryListenerManager"
],function(e,t,n){"use strict";function s(e){this._socket=new WebSocket("ws://localhost:"+e+"/?version="+r.SHARED_LOCAL_STORAGE_VERSION),this._socket.onopen=this._onSocketOpen.bind(this),this._socket.onclose=this._onSocketClose.bind(this),this._socket.onmessage=this._onSocketMessage.bind(this),this._socket.onerror=this._onSocketError.bind(this),this._listenerManager=new i(["open","close","message","error"])}var r=e("./AdobeLibraryConfig"),i=e("./utils/AdobeLibraryListenerManager");return s.prototype
._onSocketOpen=function(e){this._listenerManager.notify("open")},s.prototype._onSocketClose=function(e){this._listenerManager.notify("close")},s.prototype._onSocketMessage=function(e){this._listenerManager.notify("message",[e.data])},s.prototype._onSocketError=function(e){this._listenerManager.notify("error",[e])},s.prototype.send=function(e){this._socket.send(e)},s.prototype.addListener=function(e,t){this._listenerManager.add(e,t)},s.prototype.removeListener=function(e,t){this._listenerManager.remove
(e,t)},s.prototype.close=function(){this._socket.close(),this._socket.onopen=undefined,this._socket.onclose=undefined,this._socket.onmessage=undefined,this._socket.onerror=undefined,this._listenerManager.removeAll()},s}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryStorageInterface",["require","exports","module","./components/dcx-js/src/AdobeDCXComposite","./components/dcx-js/src/AdobeDCXBranch","./AdobeLibraryCollection","./AdobeLibraryPublicCollection","./AdobeLibraryComposite"
,"./AdobeLibraryError","./AdobeLibraryConfig","./AdobeLibraryServices","./AdobeLibraryMessageChannel","./AdobeLibraryWebSocket","./utils/AdobeLibraryAsyncJoin"],function(e,t,n){"use strict";function d(e){this._collectionManager=e,this._acceptPushedBranchListeners=[],this._downloadRenditionListeners=[],this._rootListeners=[],this._baseBranches={},this._pendingSetRenditionCache={},f.SHARED_LOCAL_STORAGE&&this._connect()}function v(e){return function(t,n){e&&e(t,n)}}var r=e("./components/dcx-js/src/AdobeDCXComposite"
),i=e("./components/dcx-js/src/AdobeDCXBranch"),s=e("./AdobeLibraryCollection"),o=e("./AdobeLibraryPublicCollection"),u=e("./AdobeLibraryComposite"),a=e("./AdobeLibraryError"),f=e("./AdobeLibraryConfig"),l=e("./AdobeLibraryServices"),c=e("./AdobeLibraryMessageChannel"),h=e("./AdobeLibraryWebSocket"),p=e("./utils/AdobeLibraryAsyncJoin");return d.prototype._getBase=function(e){var t=this._baseBranches[e];return t&&t.base},d.prototype._setBase=function(e,t){this._baseBranches[e]=this._baseBranches[e
]||{},this._baseBranches[e].base=t},d.prototype._getServicePort=function(e){function r(t){var n;try{n=JSON.parse(t)}catch(r){}if(!n){e();return}e(n.port)}var t=f.VULCAN_PREFIX+f.VULCAN_QUERY_REQUEST,n=f.VULCAN_PREFIX+f.VULCAN_QUERY_RESPONSE;if(l.hasCEPVulcan()){var i=l.getVulcanInterface(),s=l.getVulcanMessage(),o,u=function(t){i.removeMessageListener(n,u),clearTimeout(o);if(!t){e();return}r(i.getPayload(t))};i.addMessageListener(n,u),o=setTimeout(u,3e3);var a=new s(t);a.setPayload(""),i.dispatchMessage
(a)}else l.vulcanCall&&l.vulcanCall(t,"",n,r)},d.prototype._connectToPort=function(e){if(this._isConnected||!e)return;try{var t=new h(e);this._channel=new c(t),this._isConnected=!0}catch(n){}if(!this._isConnected)return;this._channel.addListener("environmentinfo",this._onEnvironmentInfo.bind(this)),this._channel.addListener("collectionadded",this._onCollectionAdded.bind(this)),this._channel.addListener("collectionremoved",this._onCollectionRemoved.bind(this)),this._channel.addListener("syncstate"
,this._onSyncState.bind(this)),this._channel.addListener("librarychange",this._onLibraryChange.bind(this)),this._channel.addListener("renditioncachechange",this._onRenditionCacheChange.bind(this)),this._channel.addListener("librarydeleted",this._onLibraryDeleted.bind(this)),this._channel.onOpen(this._sendConfiguration.bind(this)),this._channel.onClose(this._onDisconnect.bind(this))},d.prototype._connect=function(){this._getServicePort(this._connectToPort.bind(this))},d.prototype.shutdown=function(
){this._collectionManager.removeAllLibraryCollections(),this._isConnected&&this._onDisconnect()},d.prototype._onDisconnect=function(){this._isConnected=!1,this._collectionManager.removeAllLibraryCollections(),this._channel.shutdown(),this._channel=undefined},d.prototype._sendConfiguration=function(){this._channel.send("configure",{RENDITION_SIZES:f.RENDITION_SIZES,FULL_RENDITION_CONFIG:f.FULL_RENDITION_CONFIG,DEFAULT_LIBRARY_NAME:f.DEFAULT_LIBRARY_NAME,SHARED_LOCAL_STORAGE_ANALYTICS:f.SHARED_LOCAL_STORAGE_ANALYTICS
})},d.prototype._onEnvironmentInfo=function(e){this._serviceInfo=e,this._collectionManager._collections.forEach(function(e){e._listenerManager.notify("sync")})},d.prototype._onCollectionAdded=function(e){var t=this;f.ROOT_DIR=e.rootDir;var n=new p,r,i={CLOUD_ID:e.cloudId,CLOUD_INFO:e.cloudInfo,STORAGE_HOSTNAME:e.storageHost};e.isPublic?r=new o(i):(i.USER_ID=e.userId,r=new s(i)),e.libraries.forEach(function(e){n.addOperation(t.loadExistingLibrary,[r,e.id,e.path,e.manifest,e.deletedFromServer,e.renditionCache
],t)}),n.run(function(){t._collectionManager.addLibraryCollection(r)})},d.prototype._getLibraryCollection=function(e){return e.isPublic?this._collectionManager.getPublicLibraryCollection(e.cloudId):this._collectionManager.getLibraryCollection(e.userId,e.cloudId)},d.prototype._onCollectionRemoved=function(e){var t=this._getLibraryCollection(e);t&&this._collectionManager.removeLibraryCollection(t)},d.prototype._onSyncState=function(e){var t=this._getLibraryCollection(e);if(!t)return;t._syncState=e.
state,t._syncProgress=e.progress,t._syncProgressMap=e.progressMap,t._newLibraryProgress=e.newLibraryProgress,t._initialSyncInProgress=e.initialSyncInProgress,t._syncErrors=[],e.errors.forEach(function(e){t._syncErrors.push(new a(e.code,e.message,e.libraryId))}),e.libraryStates.forEach(function(e){var n=t.getLibraryById(e.id);n&&(n._syncState=e.state)}),t._listenerManager.notify("sync")},d.prototype._onLibraryChange=function(e){var t=this._getLibraryCollection(e);if(!t)return;var n=t.getLibraryById
(e.id);n?(n._deletedFromServer=e.deletedFromServer,e.renditionCache=e.renditionCache||{},n._setRenditionCache(e.renditionCache),this.updateExistingLibrary(t,n,e.manifest,undefined,function(){n._setRenditionCache(e.renditionCache)})):this.loadExistingLibrary(t,e.id,e.path,e.manifest,e.deletedFromServer,e.renditionCache)},d.prototype._onRenditionCacheChange=function(e){var t=this._getLibraryCollection(e),n=t&&t.getLibraryById(e.id),r=n&&n.getElementById(e.elementId);r&&e.renditionCache&&(r._renditionCache=
e.renditionCache)},d.prototype._onLibraryDeleted=function(e){var t=this._getLibraryCollection(e);if(!t)return;this._deleteLibrary(t,e.id)},d.prototype.isConnected=function(){return this._isConnected},d.prototype.reconnect=function(){this._isConnected||this._connect()},d.prototype.getServiceInfo=function(){return this._serviceInfo?{updateRequired:this._serviceInfo.updateRequired,version:this._serviceInfo.codeVersion,environment:this._serviceInfo.environment,syncingEnabled:this._serviceInfo.syncingEnabled
}:undefined},d.prototype.updateConfiguration=function(){f.SHARED_LOCAL_STORAGE&&this._isConnected&&this._channel&&this._sendConfiguration()},d.prototype.sync=function(e){this._channel.send("sync",{isPublic:e.isPublic,userId:e.userId,cloudId:e.cloudId})},d.prototype.commitManifest=function(e,t){var n=this;if(f.SHARED_LOCAL_STORAGE){var r=e._dcxBranch.localData,i=this._pendingSetRenditionCache[e.id]||{data:[],callbacks:[]};delete this._pendingSetRenditionCache[e.id];var s={isPublic:e.collection.isPublic
,userId:e.collection.userId,cloudId:e.collection.cloudId,id:e.id,current:r,base:this._getBase(e.id),renditions:i.data};l.log("Start commit"),this._channel.call("commit",s,function(s){l.log("Finish commit: "+(s.success?"success":"fail")),s.success?(l.log("Update base after commit"),n._setBase(e.id,r),s.renditions&&s.renditions.forEach(function(t,n){var r=t.split("/").pop(),s=i.data[n],o=e.getElementById(s.element);o&&(o._renditionCache=o._renditionCache||{},o._renditionCache[s.size]=r),i.callbacks
[n](null,t)})):(n._pendingSetRenditionCache[e.id]=i,e._waitForCommit(function(){n.notifyStartWrite(e,[],function(){e._deletedFromServer=s.deletedFromServer,n.updateExistingLibrary(e.collection,e,s.manifest,undefined,function(){e._commit(!0,!0)})})})),t()})}else e._dcxComposite.commitChanges(t)},d.prototype.resolvePullWithBranch=function(e,t,n,r,i){l.log("resolvePullWithBranch"),f.SHARED_LOCAL_STORAGE?(e._dcxComposite._current=t,this._setBase(e.id,n),i()):r?(e._dcxComposite._current=t,i()):e._dcxComposite
.resolvePullWithBranch(t,i)},d.prototype.acceptPush=function(e,t){var n=this;e._dcxComposite.acceptPush(function(r){n._acceptPushedBranchListeners.forEach(function(t){t(e)}),t(r)})},d.prototype.onAcceptPushedBranch=function(e){this._acceptPushedBranchListeners.push(e)},d.prototype.removeOnAcceptPushedBranchListeners=function(){this._acceptPushedBranchListeners=[]},d.prototype._deleteLibrary=function(e,t,n){l.log("deleteLibrary");var r=e.getLibraryById(t);if(r){var i=e._libraries.indexOf(r);i!==-1&&
(e._libraries.splice(i,1),delete e._libraryIdMap[r.id]),r._markDeletedLocally(!0),e._listenerManager.notify("change")}},d.prototype._loadBranch=function(e,t,n){var r;try{r=(new i(undefined,n)).parse(t),r._localStorage=e._localStorage}catch(s){}return r},d.prototype._addLibrary=function(e,t,n,i,s){n=n||e._getCompositeDir(t);var o=new r(null,null,n,null,null,{preserveFileExtensions:!0}),f=this._loadBranch(o,i,!1);if(!f){s(new a(a.CORRUPTED_LIBRARY,"Library corrupted in local storage",t));return}if(
f.compositeState==="pendingDelete"){s(null);return}o._current=f,this._setBase(t,i);var l=new u(e,o);e.isPublic&&(l._publicId=t,l._writable=!1),e._libraries.push(l),e._libraryIdMap[l.id]=l,e._listenerManager.notify("change"),s(null,l)},d.prototype.createNewLibrary=function(e,t,n,r){var i=v(r);l.log("createNewLibrary"),this._addLibrary(e,t,undefined,n,function(e,t){if(e||!t){i(e);return}t._commit(!1,!0),t._waitForCommit(i)})},d.prototype.loadExistingLibrary=function(e,t,n,r,i,s,o){var u=v(o);l.log("loadExistingLibrary"
),this._addLibrary(e,t,undefined,r,function(e,t){if(e||!t){u(e);return}t._deletedFromServer=i,s&&t._setRenditionCache(s),u(null,t)})},d.prototype.updateExistingLibrary=function(e,t,n,r,i){var s=this,o=v(i);if(t._dcxBranch.localData===n){l.log("updateExistingLibrary: already up-to-date"),o();return}l.log("updateExistingLibrary: changes to update");var u=this._loadBranch(t._dcxComposite,n,!1);if(!u){o(new a(a.CORRUPTED_LIBRARY,"Invalid manifest",t.id));return}u.compositeState==="pendingDelete"?(e._doRemoveLibrary
(t),o()):t._waitForCommit(function(){if(r){if(t._dcxBranch.localData!==r){l.log("Commit aborting: something changed and it's no longer a fast-forward"),o(!0);return}}else r=s._getBase(t.id);var e=s._loadBranch(t._dcxComposite,r,!0)||u;l.log("updateExistingLibrary: base "+e.changeCount+" -> updated "+u.changeCount),t._mergeAndSwitchToBranch(u,e,function(){l.log("updateExistingLibrary: finished merge"),f.SHARED_LOCAL_STORAGE?o(null):(t._commit(!1,!0),t._waitForCommit(o))})})},d.prototype.setRenditionCache=
function(e,t,n,r){var i=v(r);this._pendingSetRenditionCache[e.library.id]=this._pendingSetRenditionCache[e.library.id]||{data:[],callbacks:[]},this._pendingSetRenditionCache[e.library.id].data.push({element:e.id,size:t,path:n}),this._pendingSetRenditionCache[e.library.id].callbacks.push(i)},d.prototype.getRenditionPath=function(e,t,n,r){r=r||0;var i=this,s=v(n),o=e._lookupRenditionPath(t||"full");if(o){s(null,o);return}var u={isPublic:e.library.collection.isPublic,userId:e.library.collection.userId
,cloudId:e.library.collection.cloudId,id:e.library.id,element:e.id,size:t};l.log("Get rendition path from CCLibrary process"),this._channel.call("getrenditionpath",u,function(o){if(!o&&r<f.LOCAL_RENDITION_MAX_RETRIES){l.log("getrenditionpath: rendition not found"),setTimeout(function(){i.getRenditionPath(e,t,n,r+1)},f.LOCAL_RENDITION_RETRY_INTERVAL);return}s(null,o)})},d.prototype.notifyDownloadRendition=function(e){this._downloadRenditionListeners.forEach(function(t){t(e)})},d.prototype.onDownloadRendition=
function(e){this._downloadRenditionListeners.push(e)},d.prototype.removeOnDownloadRenditionListeners=function(){this._downloadRenditionCacheListeners=[]},d.prototype.notifyStartWrite=function(e,t,n){var r=v(n);if(!f.SHARED_LOCAL_STORAGE){r(null);return}var i={userId:e.collection.userId,cloudId:e.collection.cloudId,id:e.id,dependencies:[]};t.forEach(function(e){i.dependencies.push({userId:e.collection.userId,cloudId:e.collection.cloudId,id:e.id})}),this._channel.call("startcomponentwrite",i,function(
){r(null)})},d.prototype.loadPublicLibrary=function(e,t,n){var r=v(n),i={isPublic:e.isPublic,cloudId:e.cloudId,id:t};this._channel.call("loadpubliclibrary",i,function(){r(null)})},d.prototype.unloadPublicLibrary=function(e,t){var n=v(t),r={isPublic:e.collection.isPublic,cloudId:e.collection.cloudId,id:e.id};this._channel.call("unloadpubliclibrary",r,function(){n(null)})},d}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryExternalUtils",["require","exports","module"
,"./AdobeLibraryServices","./utils/AdobeLibraryMimeTypeUtils","./utils/AdobeLibraryRenditionUtils"],function(e,t,n){"use strict";var r=e("./AdobeLibraryServices"),i=e("./utils/AdobeLibraryMimeTypeUtils"),s=e("./utils/AdobeLibraryRenditionUtils"),o={};return o.mimeTypeToExtensions=function(e){return i.getExtensions(e)},o.extensionToMimeTypes=function(e){return i.getMimeTypes(e)},o.canGenerateRenditionFromMimeType=function(e){return s.canComputeRenditionFromMimeType(e)},o.generateUuid=function(){return r
.uuid()},o}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/AdobeLibraryExternalAnalyticsUtils",["require","exports","module","./AdobeLibraryAnalytics"],function(e,t,n){"use strict";var r=e("./AdobeLibraryAnalytics"),i={};return i.reportUseElement=function(e,t,n){r.reportUseElement(e,t,n)},i.reportCheckoutElement=function(e,t){r.reportCheckoutElement(e,t)},i.reportCreateLink=function(e,t){r.reportCreateLink(e,t)},i.reportShareElementLink=function(e){r.reportShareElementLink
(e)},i.reportShareLibraryLink=function(e){r.reportShareLibraryLink(e)},i}),define("angular-cc-libraries-api-js/components/cc-libraries-api-js/src/main",["require","exports","module","./AdobeLibraryServices","./AdobeLibraryConfig","./AdobeLibraryCollection","./AdobeLibraryPublicCollection","./AdobeLibraryCollectionManager","./AdobeLibraryError","./AdobeLibraryStorageInterface","./AdobeLibraryExternalUtils","./AdobeLibraryExternalAnalyticsUtils","./utils/AdobeLibraryFileUtils","./utils/AdobeLibraryManifestUtils"
],function(e,t,n){"use strict";function m(e,t,n){var r=e+"/"+t,i=v[r]!==undefined;return v[r]=v[r]||[],v[r].push(n),i}function g(e,t){var n;e===i.PUBLIC_USER_ID?n=d.getPublicLibraryCollection(t):n=d.getLibraryCollection(e,t);var r=e+"/"+t,s=v[r];s&&(delete v[r],s.forEach(function(e){e(null,n)}))}var r=e("./AdobeLibraryServices"),i=e("./AdobeLibraryConfig"),s=e("./AdobeLibraryCollection"),o=e("./AdobeLibraryPublicCollection"),u=e("./AdobeLibraryCollectionManager"),a=e("./AdobeLibraryError"),f=e("./AdobeLibraryStorageInterface"
),l=e("./AdobeLibraryExternalUtils"),c=e("./AdobeLibraryExternalAnalyticsUtils"),h=e("./utils/AdobeLibraryFileUtils"),p=e("./utils/AdobeLibraryManifestUtils"),d=new u,v={},y={};return y.configure=function(e,t){r.hasFileSystem()||(t.SHARED_LOCAL_STORAGE=!1);if(r.hasFileSystem()&&!t.ROOT_DIR&&t.SHARED_LOCAL_STORAGE===!1)throw new a(a.INVALID_PARAMETER,"Missing ROOT_DIR option");if(r.hasFileSystem()&&t.ROOT_DIR&&t.SHARED_LOCAL_STORAGE!==!1)throw new a(a.INVALID_PARAMETER,"ROOT_DIR option doesn't apply when using shared local storage"
);if(!r.hasFileSystem()&&t.ROOT_DIR)throw new a(a.REQUIRES_FILESYSTEM,"ROOT_DIR option only applies when you have a filesystem");if(t.SHARED_LOCAL_STORAGE===!1&&!t.STORAGE_API_KEY)throw new a(a.INVALID_PARAMETER,"Missing STORAGE_API_KEY option");if(t.SHARED_LOCAL_STORAGE!==!1&&!r.hasCEPVulcan()&&!e.vulcanCall)throw new a(a.INVALID_PARAMETER,"Shared local storage requires either the CEP VulcanInterface/VulcanMessage as globals, or for you to pass in the vulcanCall dependency");if(t.ROOT_DIR)while(
["/","\\"].indexOf(t.ROOT_DIR.substr(-1))!==-1)t.ROOT_DIR=t.ROOT_DIR.slice(0,-1);Object.keys(t).forEach(function(e){i.setParameter(e,t[e])}),r.analytics=e.analytics,r.vulcanCall=e.vulcanCall,r._log=e.log,r._getDisplayName=e.getDisplayName,r.storageInterface&&r.storageInterface.shutdown(),r.storageInterface=new f(d),r.log("Configure: "+(i.SHARED_LOCAL_STORAGE?"<shared local storage>":i.ROOT_DIR))},y.setOption=function(e,t){var n=["ROOT_DIR","SHARED_LOCAL_STORAGE","ELEMENT_TYPE_FILTERS","STORAGE_API_KEY"
];if(n.indexOf(e)!==-1)throw new a(a.INVALID_PARAMETER,"Cannot reconfigure "+e);i.setParameter(e,t),r.storageInterface.updateConfiguration()},y.getLoadedCollections=function(){return d.getLoadedCollections().slice(0)},y.getLoadedCollectionById=function(e,t){return d.getLibraryCollection(e,t)},y.getLoadedPublicCollectionById=function(e){return d.getPublicLibraryCollection(e)},y.addLoadedCollectionsListener=function(e){d.addLoadedCollectionsListener(e)},y.removeLoadedCollectionsListener=function(e)
{d.removeLoadedCollectionsListener(e)},y.getRootDir=function(){if(!r.hasFileSystem())throw new a(a.REQUIRES_FILESYSTEM,"ROOT_DIR option only applies when you have a filesystem");return i.ROOT_DIR},y.unloadLibraryCollection=function(e){if(i.SHARED_LOCAL_STORAGE)throw new a(a.NOT_SUPPORTED,"unloadLibraryCollection() not supported with shared local storage");e.stopPolling(),e._removeAllListeners(),d.removeLibraryCollection(e)},y.loadLibraryCollection=function(e,t){function u(){d.addLibraryCollection
(n),i.AUTO_START_POLLING&&n.startPolling(),g(e.USER_ID,e.CLOUD_ID)}if(typeof e=="function"){t=e,t(new a(a.INVALID_PARAMETER,"options argument not specified"));return}if(i.SHARED_LOCAL_STORAGE){t(new a(a.NOT_SUPPORTED,"loadLibraryCollection() not supported with shared local storage"));return}if(r.hasFileSystem()&&!i.SHARED_LOCAL_STORAGE&&!i.ROOT_DIR){t(new a(a.INVALID_PARAMETER,"ROOT_DIR not configured. Make sure you call CCLibraries.configure()"));return}e=e||{};if(r.hasFileSystem()&&!e.USER_ID){
t(new a(a.INVALID_PARAMETER,"Missing USER_ID option"));return}e.CLOUD_ID=e.CLOUD_ID||i.DEFAULT_CLOUD_ID;if(!e.STORAGE_HOSTNAME){t(new a(a.INVALID_PARAMETER,"Missing STORAGE_HOSTNAME option"));return}var n=d.getLibraryCollection(e.USER_ID,e.CLOUD_ID),o=m(e.USER_ID,e.CLOUD_ID,t);if(n&&!o){g(e.USER_ID,e.CLOUD_ID);return}if(o)return;n=new s(e);if(r.hasFileSystem())h.doesRootDirExist(n,function(e,t){n._load(function(){t||n._setInitialSyncState(!0),n.sync(function(){n._setInitialSyncState(!1)}),u()})})
;else if(e.WAIT_FOR==="all")n._setInitialSyncState(!0),n.sync(function(){n._setInitialSyncState(!1),u()});else if(p.validateLibraryId(e.WAIT_FOR,!1)){n._setInitialSyncState(!0,[e.WAIT_FOR]),n.sync(function(){n._setInitialSyncState(!1)});var f=function(){if(n.syncState!=="syncing"||n._libraryIdMap[e.WAIT_FOR]!=="pending")n.removeChangeListener(f),n.removeSyncListener(f),u()};n.addChangeListener(f),n.addSyncListener(f)}else n._setInitialSyncState(!0),n.sync(function(){n._setInitialSyncState(!1)}),u
()},y.loadPublicLibraryCollection=function(e,t){function u(){d.addLibraryCollection(n),i.AUTO_START_POLLING&&n.startPolling(),g(i.PUBLIC_USER_ID,e.CLOUD_ID)}if(typeof e=="function"){t=e,t(new a(a.INVALID_PARAMETER,"options argument not specified"));return}if(i.SHARED_LOCAL_STORAGE){t(new a(a.NOT_SUPPORTED,"loadPublicLibraryCollection() not supported with shared local storage"));return}if(r.hasFileSystem()&&!i.SHARED_LOCAL_STORAGE&&!i.ROOT_DIR){t(new a(a.INVALID_PARAMETER,"ROOT_DIR not configured. Make sure you call CCLibraries.configure()"
));return}e=e||{};if(e.USER_ID){t(new a(a.INVALID_PARAMETER,"USER_ID not configurable for a public library collection"));return}e.CLOUD_ID=e.CLOUD_ID||i.DEFAULT_CLOUD_ID;if(!e.STORAGE_HOSTNAME){t(new a(a.INVALID_PARAMETER,"Missing STORAGE_HOSTNAME option"));return}var n=d.getPublicLibraryCollection(e.CLOUD_ID),s=m(i.PUBLIC_USER_ID,e.CLOUD_ID,t);if(n&&!s){g(i.PUBLIC_USER_ID,e.CLOUD_ID);return}if(s)return;n=new o(e),r.hasFileSystem()?n._load(function(){n.sync(),u()}):u()},y.isConnected=function(){if(!
i.SHARED_LOCAL_STORAGE)throw new a(a.NOT_SUPPORTED,"isConnected() is only applicable if using shared local storage");return r.storageInterface&&r.storageInterface.isConnected()},y.reconnect=function(){if(!i.SHARED_LOCAL_STORAGE)throw new a(a.NOT_SUPPORTED,"reconnect() is only applicable if using shared local storage");r.storageInterface&&r.storageInterface.reconnect()},y.getServiceInfo=function(){if(!i.SHARED_LOCAL_STORAGE)throw new a(a.NOT_SUPPORTED,"getServiceInfo() is only applicable if using shared local storage"
);return r.storageInterface&&r.storageInterface.getServiceInfo()},y.isSyncingEnabled=function(){if(i.SHARED_LOCAL_STORAGE){var e=y.getServiceInfo();return e&&e.syncingEnabled?!0:!1}return i.SYNCING_ENABLED},y.enableSyncing=function(){if(i.SHARED_LOCAL_STORAGE)throw new a(a.NOT_SUPPORTED,"enableSyncing() not supported with shared local storage");i.SYNCING_ENABLED=!0,y.getLoadedCollections().forEach(function(e){e.sync()})},y.disableSyncing=function(){if(i.SHARED_LOCAL_STORAGE)throw new a(a.NOT_SUPPORTED
,"disableSyncing() not supported with shared local storage");i.SYNCING_ENABLED=!1},y.resolveElementReference=function(e){var t=new RegExp("cloud-asset://(.+)"+i.STORAGE_ASSETS_PATH+i.LIBRARY_SYNC_GROUP+"/([A-Za-z0-9-]+);node=([A-Za-z0-9-]+)"),n=e.match(t),r;if(n){var s=n[1],o=n[2],u=n[3];y.getLoadedCollections().every(function(e){if(e._syncManager._storageHost===s){var t=e.getLibraryById(o);return t&&(r=t.getElementById(u)),!1}return!0})}return r},y.errors=a,y.utils=l,y.analyticsUtils=c,y}),define
("angular-cc-libraries-api-js/main",["require","exports","module","angular","./components/cc-libraries-api-js/src/main","./components/cc-libraries-api-js/src/AdobeLibraryCollection","./components/cc-libraries-api-js/src/AdobeLibraryComposite","./components/cc-libraries-api-js/src/AdobeLibraryElement","./components/cc-libraries-api-js/src/AdobeLibraryRepresentation"],function(e,t,n){"use strict";var r=e("angular"),i=e("./components/cc-libraries-api-js/src/main"),s=e("./components/cc-libraries-api-js/src/AdobeLibraryCollection"
),o=e("./components/cc-libraries-api-js/src/AdobeLibraryComposite"),u=e("./components/cc-libraries-api-js/src/AdobeLibraryElement"),a=e("./components/cc-libraries-api-js/src/AdobeLibraryRepresentation"),f=10,l=["$q","$rootScope",function(e,t){function h(t,n,r){r=r||[];var i=e.defer();return r.push(function(e,t){function n(){e?i.reject(e):i.resolve(t)}n(),c()}),t[n].apply(t,r),i.promise}var n=0,l,c=function(){if(l)return;var e=(new Date).valueOf();if(e-n<f){l=setTimeout(function(){l=undefined,c()}
,f);return}n=e,t.$$phase||t.$apply()};s.prototype._sync=s.prototype.sync,s.prototype.sync=function(e){if(!r.isFunction(e))return h(this,"_sync");this._sync(e)},s.prototype._removeDeletedLibraries=s.prototype.removeDeletedLibraries,s.prototype.removeDeletedLibraries=function(e,t){if(!r.isFunction(t))return h(this,"_removeDeletedLibraries",[e]);this._removeDeletedLibraries(e,t)},s.prototype.__getTempDir=s.prototype.getTempDir,s.prototype.getTempDir=function(e){if(!r.isFunction(e))return h(this,"__getTempDir"
);this.__getTempDir(e)},o.prototype._rebindToServer=o.prototype.rebindToServer,o.prototype.rebindToServer=function(e){if(!r.isFunction(e))return h(this,"_rebindToServer");this._rebindToServer(e)},o.prototype._copyElement=o.prototype.copyElement,o.prototype.copyElement=function(e,t,n){if(!r.isFunction(n))return h(this,"_copyElement",[e,t]);this._copyElement(e,t,n)},o.prototype._moveElement=o.prototype.moveElement,o.prototype.moveElement=function(e,t,n){if(!r.isFunction(n))return h(this,"_moveElement"
,[e,t]);this._moveElement(e,t,n)},u.prototype._getRenditionUrl=u.prototype.getRenditionUrl,u.prototype.getRenditionUrl=function(e,t){if(!r.isFunction(t))return h(this,"_getRenditionUrl",[e]);this._getRenditionUrl(e,t)},u.prototype._getRenditionPath=u.prototype.getRenditionPath,u.prototype.getRenditionPath=function(e,t){if(!r.isFunction(t))return h(this,"_getRenditionPath",[e]);this._getRenditionPath(e,t)},u.prototype._setRenditionCache=u.prototype.setRenditionCache,u.prototype.setRenditionCache=function(
e,t,n){if(!r.isFunction(n))return h(this,"_setRenditionCache",[e,t]);this._setRenditionCache(e,t,n)},a.prototype._updateContent=a.prototype.updateContent,a.prototype.updateContent=function(e,t,n,i){if(!r.isFunction(i))return h(this,"_updateContent",[e,t,n]);this._updateContent(e,t,n,i)},a.prototype._updateContentFromPath=a.prototype.updateContentFromPath,a.prototype.updateContentFromPath=function(e,t,n){if(!r.isFunction(n))return h(this,"_updateContentFromPath",[e,t]);this._updateContentFromPath(
e,t,n)},a.prototype._updateContentFromURL=a.prototype.updateContentFromURL,a.prototype.updateContentFromURL=function(e,t,n){if(!r.isFunction(n))return h(this,"_updateContentFromURL",[e,t]);this._updateContentFromURL(e,t,n)},a.prototype._getContentPath=a.prototype.getContentPath,a.prototype.getContentPath=function(e){if(!r.isFunction(e))return h(this,"_getContentPath");this._getContentPath(e)},a.prototype._getContent=a.prototype.getContent,a.prototype.getContent=function(e,t){if(!r.isFunction(t))return h
(this,"_getContent",[e]);this._getContent(e,t)},this.getLoadedCollections=function(){return i.getLoadedCollections()},this.addLoadedCollectionsListener=function(e){return i.addLoadedCollectionsListener(e)},this.removeLoadedCollectionsListener=function(e){return i.removeLoadedCollectionsListener(e)},this.loadLibraryCollection=function(e){return h(i,"loadLibraryCollection",[e])},this.unloadLibraryCollection=function(e){i.unloadLibraryCollection(e)},this.configure=function(e,t){i.configure(e,t)},this
.setOption=function(e,t){i.setOption(e,t)},this.getRootDir=function(){return i.getRootDir()},this.isConnected=function(){return i.isConnected()},this.getServiceInfo=function(){return i.getServiceInfo()},this.reconnect=function(){i.reconnect()},this.resolveElementReference=function(e){return i.resolveElementReference(e)},this.isSyncingEnabled=function(){return i.isSyncingEnabled()},this.enableSyncing=function(){i.enableSyncing()},this.disableSyncing=function(){i.disableSyncing()},this.utils=i.utils
,this.analyticsUtils=i.analyticsUtils,this.errors=i.errors,this.setCustomDigestTrigger=function(e){c=e}}];r.module("adobe.ccLibraries",[]).service("ccLibraries",l)}),define("angular-cc-libraries-api-js",["angular-cc-libraries-api-js/main"],function(e){return e}),function(e,t){typeof define=="function"&&define.amd?define("tether",t):typeof exports=="object"?module.exports=t(require,exports,module):e.Tether=t()}(this,function(e,t,n){return function(){var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g={}.hasOwnProperty
,y=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},b=[].slice;this.Tether==null&&(this.Tether={modules:[]}),l=function(e){var t,n,r,i,s;n=getComputedStyle(e).position;if(n==="fixed")return e;r=void 0,t=e;while(t=t.parentNode){try{i=getComputedStyle(t)}catch(o){}if(i==null)return t;if(/(auto|scroll)/.test(i.overflow+i["overflow-y"]+i["overflow-x"]))if(n!=="absolute"||(s=i.position)==="relative"||s==="absolute"||s==="fixed")return t}return document
.body},d=function(){var e;return e=0,function(){return e++}}(),m={},a=function(e){var t,r,s,o,u;s=e._tetherZeroElement,s==null&&(s=e.createElement("div"),s.setAttribute("data-tether-id",d()),i(s.style,{top:0,left:0,position:"absolute"}),e.body.appendChild(s),e._tetherZeroElement=s),t=s.getAttribute("data-tether-id");if(m[t]==null){m[t]={},u=s.getBoundingClientRect();for(r in u)o=u[r],m[t][r]=o;n(function(){return m[t]=void 0})}return m[t]},h=null,o=function(e){var t,n,r,i,s,o,u;e===document?(n=document
,e=document.documentElement):n=e.ownerDocument,r=n.documentElement,t={},u=e.getBoundingClientRect();for(i in u)o=u[i],t[i]=o;return s=a(n),t.top-=s.top,t.left-=s.left,t.width==null&&(t.width=document.body.scrollWidth-t.left-t.right),t.height==null&&(t.height=document.body.scrollHeight-t.top-t.bottom),t.top=t.top-r.clientTop,t.left=t.left-r.clientLeft,t.right=n.body.clientWidth-t.width-t.left,t.bottom=n.body.clientHeight-t.height-t.top,t},u=function(e){return e.offsetParent||document.documentElement
},f=function(){var e,t,n,r,s;return e=document.createElement("div"),e.style.width="100%",e.style.height="200px",t=document.createElement("div"),i(t.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t),r=e.offsetWidth,t.style.overflow="scroll",s=e.offsetWidth,r===s&&(s=t.clientWidth),document.body.removeChild(t),n=r-s,{width:n,height:n}},i=function(e){var t,n,r,i,s,o,u;e==null&&
(e={}),t=[],Array.prototype.push.apply(t,arguments),u=t.slice(1);for(s=0,o=u.length;s<o;s++){r=u[s];if(r)for(n in r){if(!g.call(r,n))continue;i=r[n],e[n]=i}}return e},p=function(e,t){var n,r,i,s,o;if(e.classList!=null){s=t.split(" "),o=[];for(r=0,i=s.length;r<i;r++)n=s[r],n.trim()&&o.push(e.classList.remove(n));return o}return e.className=e.className.replace(new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi")," ")},t=function(e,t){var n,r,i,s,o;if(e.classList!=null){s=t.split(" "),o=[];for(r=0
,i=s.length;r<i;r++)n=s[r],n.trim()&&o.push(e.classList.add(n));return o}return p(e,t),e.className+=" "+t},c=function(e,t){return e.classList!=null?e.classList.contains(t):(new RegExp("(^| )"+t+"( |$)","gi")).test(e.className)},v=function(e,n,r){var i,s,o,u,a,f;for(s=0,u=r.length;s<u;s++)i=r[s],y.call(n,i)<0&&c(e,i)&&p(e,i);f=[];for(o=0,a=n.length;o<a;o++)i=n[o],c(e,i)?f.push(void 0):f.push(t(e,i));return f},r=[],n=function(e){return r.push(e)},s=function(){var e,t;t=[];while(e=r.pop())t.push(e()
);return t},e=function(){function e(){}return e.prototype.on=function(e,t,n,r){var i;return r==null&&(r=!1),this.bindings==null&&(this.bindings={}),(i=this.bindings)[e]==null&&(i[e]=[]),this.bindings[e].push({handler:t,ctx:n,once:r})},e.prototype.once=function(e,t,n){return this.on(e,t,n,!0)},e.prototype.off=function(e,t){var n,r,i;if(((r=this.bindings)!=null?r[e]:void 0)==null)return;if(t==null)return delete this.bindings[e];n=0,i=[];while(n<this.bindings[e].length)this.bindings[e][n].handler===
t?i.push(this.bindings[e].splice(n,1)):i.push(n++);return i},e.prototype.trigger=function(){var e,t,n,r,i,s,o,u,a;n=arguments[0],e=2<=arguments.length?b.call(arguments,1):[];if((o=this.bindings)!=null?o[n]:void 0){i=0,a=[];while(i<this.bindings[n].length)u=this.bindings[n][i],r=u.handler,t=u.ctx,s=u.once,r.apply(t!=null?t:this,e),s?a.push(this.bindings[n].splice(i,1)):a.push(i++);return a}},e}(),this.Tether.Utils={getScrollParent:l,getBounds:o,getOffsetParent:u,extend:i,addClass:t,removeClass:p,hasClass
:c,updateClasses:v,defer:n,flush:s,uniqueId:d,Evented:e,getScrollBarSize:f}}.call(this),function(){var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A=[].slice,O=function(e,t){return function(){return e.apply(t,arguments)}};if(this.Tether==null)throw new Error("You must include the utils.js file before tether.js");r=this.Tether,L=r.Utils,v=L.getScrollParent,m=L.getSize,p=L.getOuterSize,c=L.getBounds,h=L.getOffsetParent,f=L.extend,i=L.addClass,S=L.removeClass,N=L.updateClasses,a=L.defer
,l=L.flush,d=L.getScrollBarSize,C=function(e,t,n){return n==null&&(n=1),e+n>=t&&t>=e-n},T=function(){var e,t,n,r,i;e=document.createElement("div"),i=["transform","webkitTransform","OTransform","MozTransform","msTransform"];for(n=0,r=i.length;n<r;n++){t=i[n];if(e.style[t]!==void 0)return t}}(),x=[],E=function(){var e,t,n;for(t=0,n=x.length;t<n;t++)e=x[t],e.position(!1);return l()},g=function(){var e;return(e=typeof performance!=="undefined"&&performance!==null?typeof performance.now==="function"?performance
.now():void 0:void 0)!=null?e:+(new Date)},function(){var e,t,n,r,i,s,o,u,a;t=null,n=null,r=null,i=function(){if(n!=null&&n>16){n=Math.min(n-16,250),r=setTimeout(i,250);return}if(t!=null&&g()-t<10)return;return r!=null&&(clearTimeout(r),r=null),t=g(),E(),n=g()-t},u=["resize","scroll","touchmove"],a=[];for(s=0,o=u.length;s<o;s++)e=u[s],a.push(window.addEventListener(e,i));return a}(),e={center:"center",left:"right",right:"left"},t={middle:"middle",top:"bottom",bottom:"top"},n={top:0,left:0,middle:"50%"
,center:"50%",bottom:"100%",right:"100%"},u=function(n,r){var i,s;return i=n.left,s=n.top,i==="auto"&&(i=e[r.left]),s==="auto"&&(s=t[r.top]),{left:i,top:s}},o=function(e){var t,r;return{left:(t=n[e.left])!=null?t:e.left,top:(r=n[e.top])!=null?r:e.top}},s=function(){var e,t,n,r,i,s,o;t=1<=arguments.length?A.call(arguments,0):[],n={top:0,left:0};for(i=0,s=t.length;i<s;i++)o=t[i],r=o.top,e=o.left,typeof r=="string"&&(r=parseFloat(r,10)),typeof e=="string"&&(e=parseFloat(e,10)),n.top+=r,n.left+=e;return n
},y=function(e,t){return typeof e.left=="string"&&e.left.indexOf("%")!==-1&&(e.left=parseFloat(e.left,10)/100*t.width),typeof e.top=="string"&&e.top.indexOf("%")!==-1&&(e.top=parseFloat(e.top,10)/100*t.height),e},b=w=function(e){var t,n,r;return r=e.split(" "),n=r[0],t=r[1],{top:n,left:t}},k=function(){function e(e){this.position=O(this.position,this);var t,n,i,s,o;x.push(this),this.history=[],this.setOptions(e,!1),s=r.modules;for(n=0,i=s.length;n<i;n++)t=s[n],(o=t.initialize)!=null&&o.call(this)
;this.position()}return e.modules=[],e.prototype.getClass=function(e){var t,n;return((t=this.options.classes)!=null?t[e]:void 0)?this.options.classes[e]:((n=this.options.classes)!=null?n[e]:void 0)!==!1?this.options.classPrefix?""+this.options.classPrefix+"-"+e:e:""},e.prototype.setOptions=function(e,t){var n,r,s,o,u,a;this.options=e,t==null&&(t=!0),n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},this.options=f(n,this.options),u=this.options,this.element=u.element
,this.target=u.target,this.targetModifier=u.targetModifier,this.target==="viewport"?(this.target=document.body,this.targetModifier="visible"):this.target==="scroll-handle"&&(this.target=document.body,this.targetModifier="scroll-handle"),a=["element","target"];for(s=0,o=a.length;s<o;s++){r=a[s];if(this[r]==null)throw new Error("Tether Error: Both element and target must be defined");this[r].jquery!=null?this[r]=this[r][0]:typeof this[r]=="string"&&(this[r]=document.querySelector(this[r]))}i(this.element
,this.getClass("element")),i(this.target,this.getClass("target"));if(!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=b(this.options.targetAttachment),this.attachment=b(this.options.attachment),this.offset=w(this.options.offset),this.targetOffset=w(this.options.targetOffset),this.scrollParent!=null&&this.disable(),this.targetModifier==="scroll-handle"?this.scrollParent=this.target:this.scrollParent=v(this.target);if(this.options.enabled!==!1
)return this.enable(t)},e.prototype.getTargetBounds=function(){var e,t,n,r,i,s,o,u,a;if(this.targetModifier==null)return c(this.target);switch(this.targetModifier){case"visible":return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:(e=c(this.target),i={height:e.height,width:e.width,top:e.top,left:e.left},i.height=Math.min(i.height,e.height-(pageYOffset-e.top)),i.height=Math.min(i.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),i.height=
Math.min(innerHeight,i.height),i.height-=2,i.width=Math.min(i.width,e.width-(pageXOffset-e.left)),i.width=Math.min(i.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),i.width=Math.min(innerWidth,i.width),i.width-=2,i.top<pageYOffset&&(i.top=pageYOffset),i.left<pageXOffset&&(i.left=pageXOffset),i);case"scroll-handle":return a=this.target,a===document.body?(a=document.documentElement,e={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):e=c(a),u=getComputedStyle(a),n=a.scrollWidth>
a.clientWidth||"scroll"===[u.overflow,u.overflowX]||this.target!==document.body,s=0,n&&(s=15),r=e.height-parseFloat(u.borderTopWidth)-parseFloat(u.borderBottomWidth)-s,i={width:15,height:r*.975*(r/a.scrollHeight),left:e.left+e.width-parseFloat(u.borderLeftWidth)-15},t=0,r<408&&this.target===document.body&&(t=-0.00011*Math.pow(r,2)-.00727*r+22.58),this.target!==document.body&&(i.height=Math.max(i.height,24)),o=this.target.scrollTop/(a.scrollHeight-r),i.top=o*(r-i.height-t)+e.top+parseFloat(u.borderTopWidth
),this.target===document.body&&(i.height=Math.max(i.height,24)),i}},e.prototype.clearCache=function(){return this._cache={}},e.prototype.cache=function(e,t){return this._cache==null&&(this._cache={}),this._cache[e]==null&&(this._cache[e]=t.call(this)),this._cache[e]},e.prototype.enable=function(e){e==null&&(e=!0),i(this.target,this.getClass("enabled")),i(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position);
if(e)return this.position()},e.prototype.disable=function(){S(this.target,this.getClass("enabled")),S(this.element,this.getClass("enabled")),this.enabled=!1;if(this.scrollParent!=null)return this.scrollParent.removeEventListener("scroll",this.position)},e.prototype.destroy=function(){var e,t,n,r,i;this.disable(),i=[];for(e=n=0,r=x.length;n<r;e=++n){t=x[e];if(t===this){x.splice(e,1);break}i.push(void 0)}return i},e.prototype.updateAttachClasses=function(e,t){var n,r,i,s,o,u,f,l,c,h=this;e==null&&(
e=this.attachment),t==null&&(t=this.targetAttachment),s=["left","top","bottom","right","middle","center"],((c=this._addAttachClasses)!=null?c.length:void 0)&&this._addAttachClasses.splice(0,this._addAttachClasses.length),n=this._addAttachClasses!=null?this._addAttachClasses:this._addAttachClasses=[],e.top&&n.push(""+this.getClass("element-attached")+"-"+e.top),e.left&&n.push(""+this.getClass("element-attached")+"-"+e.left),t.top&&n.push(""+this.getClass("target-attached")+"-"+t.top),t.left&&n.push
(""+this.getClass("target-attached")+"-"+t.left),r=[];for(o=0,f=s.length;o<f;o++)i=s[o],r.push(""+this.getClass("element-attached")+"-"+i);for(u=0,l=s.length;u<l;u++)i=s[u],r.push(""+this.getClass("target-attached")+"-"+i);return a(function(){if(h._addAttachClasses==null)return;return N(h.element,h._addAttachClasses,r),N(h.target,h._addAttachClasses,r),h._addAttachClasses=void 0})},e.prototype.position=function(e){var t,n,i,a,f,p,v,m,g,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X=this;e==
null&&(e=!0);if(!this.enabled)return;this.clearCache(),A=u(this.targetAttachment,this.attachment),this.updateAttachClasses(this.attachment,A),t=this.cache("element-bounds",function(){return c(X.element)}),P=t.width,i=t.height,P===0&&i===0&&this.lastSize!=null?(I=this.lastSize,P=I.width,i=I.height):this.lastSize={width:P,height:i},_=M=this.cache("target-bounds",function(){return X.getTargetBounds()}),g=y(o(this.attachment),{width:P,height:i}),O=y(o(A),_),f=y(this.offset,{width:P,height:i}),p=y(this
.targetOffset,_),g=s(g,f),O=s(O,p),a=M.left+O.left-g.left,D=M.top+O.top-g.top,q=r.modules;for(H=0,j=q.length;H<j;H++){v=q[H],T=v.position.call(this,{left:a,top:D,targetAttachment:A,targetPos:M,attachment:this.attachment,elementPos:t,offset:g,targetOffset:O,manualOffset:f,manualTargetOffset:p,scrollbarSize:k});if(T==null||typeof T!="object")continue;if(T===!1)return!1;D=T.top,a=T.left}m={page:{top:D,left:a},viewport:{top:D-pageYOffset,bottom:pageYOffset-D-i+innerHeight,left:a-pageXOffset,right:pageXOffset-
a-P+innerWidth}},document.body.scrollWidth>window.innerWidth&&(k=this.cache("scrollbar-size",d),m.viewport.bottom-=k.height),document.body.scrollHeight>window.innerHeight&&(k=this.cache("scrollbar-size",d),m.viewport.right-=k.width);if((R=document.body.style.position)!==""&&R!=="static"||(U=document.body.parentElement.style.position)!==""&&U!=="static")m.page.bottom=document.body.scrollHeight-D-i,m.page.right=document.body.scrollWidth-a-P;if(((z=this.options.optimizations)!=null?z.moveElement:void 0
)!==!1&&this.targetModifier==null){w=this.cache("target-offsetparent",function(){return h(X.target)}),x=this.cache("target-offsetparent-bounds",function(){return c(w)}),S=getComputedStyle(w),n=getComputedStyle(this.element),E=x,b={},W=["Top","Left","Bottom","Right"];for(B=0,F=W.length;B<F;B++)L=W[B],b[L.toLowerCase()]=parseFloat(S["border"+L+"Width"]);x.right=document.body.scrollWidth-x.left-E.width+b.right,x.bottom=document.body.scrollHeight-x.top-E.height+b.bottom,m.page.top>=x.top+b.top&&m.page
.bottom>=x.bottom&&m.page.left>=x.left+b.left&&m.page.right>=x.right&&(C=w.scrollTop,N=w.scrollLeft,m.offset={top:m.page.top-x.top+C-b.top,left:m.page.left-x.left+N-b.left})}return this.move(m),this.history.unshift(m),this.history.length>3&&this.history.pop(),e&&l(),!0},e.prototype.move=function(e){var t,n,r,i,s,o,u,l,c,p,d,v,m,g,y,b,w,E=this;if(this.element.parentNode==null)return;l={};for(p in e){l[p]={};for(i in e[p]){r=!1,b=this.history;for(g=0,y=b.length;g<y;g++){u=b[g];if(!C((w=u[p])!=null?
w[i]:void 0,e[p][i])){r=!0;break}}r||(l[p][i]=!0)}}t={top:"",left:"",right:"",bottom:""},c=function(e,n){var r,i,s;if(((s=E.options.optimizations)!=null?s.gpu:void 0)===!1)return e.top?t.top=""+n.top+"px":t.bottom=""+n.bottom+"px",e.left?t.left=""+n.left+"px":t.right=""+n.right+"px";e.top?(t.top=0,i=n.top):(t.bottom=0,i=-n.bottom),e.left?(t.left=0,r=n.left):(t.right=0,r=-n.right),t[T]="translateX("+Math.round(r)+"px) translateY("+Math.round(i)+"px)";if(T!=="msTransform")return t[T]+=" translateZ(0)"
},s=!1,(l.page.top||l.page.bottom)&&(l.page.left||l.page.right)?(t.position="absolute",c(l.page,e.page)):(l.viewport.top||l.viewport.bottom)&&(l.viewport.left||l.viewport.right)?(t.position="fixed",c(l.viewport,e.viewport)):l.offset!=null&&l.offset.top&&l.offset.left?(t.position="absolute",o=this.cache("target-offsetparent",function(){return h(E.target)}),h(this.element)!==o&&a(function(){return E.element.parentNode.removeChild(E.element),o.appendChild(E.element)}),c(l.offset,e.offset),s=!0):(t.position="absolute"
,c({top:!0,left:!0},e.page)),!s&&this.element.parentNode.tagName!=="BODY"&&(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element)),m={},v=!1;for(i in t)d=t[i],n=this.element.style[i],n!==""&&d!==""&&(i==="top"||i==="left"||i==="bottom"||i==="right")&&(n=parseFloat(n),d=parseFloat(d)),n!==d&&(v=!0,m[i]=t[i]);if(v)return a(function(){return f(E.element.style,m)})},e}(),r.position=E,this.Tether=f(k,r)}.call(this),function(){var e,t,n,r,i,s,o,u,a,f,l=[].indexOf||function(
e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};f=this.Tether.Utils,o=f.getOuterSize,s=f.getBounds,u=f.getSize,r=f.extend,a=f.updateClasses,n=f.defer,t={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle"},e=["left","top","right","bottom"],i=function(t,n){var r,i,o,u,a,f,l;n==="scrollParent"?n=t.scrollParent:n==="window"&&(n=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),n===document&&(n=n.documentElement);if(n.nodeType!=
null){i=u=s(n),a=getComputedStyle(n),n=[i.left,i.top,u.width+i.left,u.height+i.top];for(r=f=0,l=e.length;f<l;r=++f)o=e[r],o=o[0].toUpperCase()+o.substr(1),o==="Top"||o==="Left"?n[r]+=parseFloat(a["border"+o+"Width"]):n[r]-=parseFloat(a["border"+o+"Width"])}return n},this.Tether.modules.push({position:function(t){var o,u,f,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V,$,J,K,Q,G,Y,Z,et,tt=this;D=t.top,y=t.left,L=t.targetAttachment;if(!this.options.constraints)return!0;N=function(
t){var n,r,i,s;tt.removeClass(t),s=[];for(r=0,i=e.length;r<i;r++)n=e[r],s.push(tt.removeClass(""+t+"-"+n));return s},$=this.cache("element-bounds",function(){return s(tt.element)}),g=$.height,P=$.width,P===0&&g===0&&this.lastSize!=null&&(J=this.lastSize,P=J.width,g=J.height),O=this.cache("target-bounds",function(){return tt.getTargetBounds()}),A=O.height,M=O.width,k={},m={},u=[this.getClass("pinned"),this.getClass("out-of-bounds")],K=this.options.constraints;for(H=0,I=K.length;H<I;H++)v=K[H],v.outOfBoundsClass&&
u.push(v.outOfBoundsClass),v.pinnedClass&&u.push(v.pinnedClass);for(B=0,q=u.length;B<q;B++){d=u[B],Q=["left","top","right","bottom"];for(j=0,R=Q.length;j<R;j++)C=Q[j],u.push(""+d+"-"+C)}o=[],k=r({},L),m=r({},this.attachment),G=this.options.constraints;for(F=0,U=G.length;F<U;F++){v=G[F],_=v.to,f=v.attachment,S=v.pin,f==null&&(f=""),l.call(f," ")>=0?(Y=f.split(" "),p=Y[0],h=Y[1]):h=p=f,c=i(this,_);if(p==="target"||p==="both")D<c[1]&&k.top==="top"&&(D+=A,k.top="bottom"),D+g>c[3]&&k.top==="bottom"&&(
D-=A,k.top="top");p==="together"&&(D<c[1]&&k.top==="top"&&(m.top==="bottom"?(D+=A,k.top="bottom",D+=g,m.top="top"):m.top==="top"&&(D+=A,k.top="bottom",D-=g,m.top="bottom")),D+g>c[3]&&k.top==="bottom"&&(m.top==="top"?(D-=A,k.top="top",D-=g,m.top="bottom"):m.top==="bottom"&&(D-=A,k.top="top",D+=g,m.top="top")),k.top==="middle"&&(D+g>c[3]&&m.top==="top"?(D-=g,m.top="bottom"):D<c[1]&&m.top==="bottom"&&(D+=g,m.top="top")));if(h==="target"||h==="both")y<c[0]&&k.left==="left"&&(y+=M,k.left="right"),y+P>
c[2]&&k.left==="right"&&(y-=M,k.left="left");h==="together"&&(y<c[0]&&k.left==="left"?m.left==="right"?(y+=M,k.left="right",y+=P,m.left="left"):m.left==="left"&&(y+=M,k.left="right",y-=P,m.left="right"):y+P>c[2]&&k.left==="right"?m.left==="left"?(y-=M,k.left="left",y-=P,m.left="right"):m.left==="right"&&(y-=M,k.left="left",y+=P,m.left="left"):k.left==="center"&&(y+P>c[2]&&m.left==="left"?(y-=P,m.left="right"):y<c[0]&&m.left==="right"&&(y+=P,m.left="left")));if(p==="element"||p==="both")D<c[1]&&m.
top==="bottom"&&(D+=g,m.top="top"),D+g>c[3]&&m.top==="top"&&(D-=g,m.top="bottom");if(h==="element"||h==="both")y<c[0]&&m.left==="right"&&(y+=P,m.left="left"),y+P>c[2]&&m.left==="left"&&(y-=P,m.left="right");typeof S=="string"?S=function(){var e,t,n,r;n=S.split(","),r=[];for(t=0,e=n.length;t<e;t++)E=n[t],r.push(E.trim());return r}():S===!0&&(S=["top","left","right","bottom"]),S||(S=[]),x=[],b=[],D<c[1]&&(l.call(S,"top")>=0?(D=c[1],x.push("top")):b.push("top")),D+g>c[3]&&(l.call(S,"bottom")>=0?(D=c
[3]-g,x.push("bottom")):b.push("bottom")),y<c[0]&&(l.call(S,"left")>=0?(y=c[0],x.push("left")):b.push("left")),y+P>c[2]&&(l.call(S,"right")>=0?(y=c[2]-P,x.push("right")):b.push("right"));if(x.length){T=(Z=this.options.pinnedClass)!=null?Z:this.getClass("pinned"),o.push(T);for(X=0,z=x.length;X<z;X++)C=x[X],o.push(""+T+"-"+C)}if(b.length){w=(et=this.options.outOfBoundsClass)!=null?et:this.getClass("out-of-bounds"),o.push(w);for(V=0,W=b.length;V<W;V++)C=b[V],o.push(""+w+"-"+C)}if(l.call(x,"left")>=0||
l.call(x,"right")>=0)m.left=k.left=!1;if(l.call(x,"top")>=0||l.call(x,"bottom")>=0)m.top=k.top=!1;(k.top!==L.top||k.left!==L.left||m.top!==this.attachment.top||m.left!==this.attachment.left)&&this.updateAttachClasses(m,k)}return n(function(){return a(tt.target,o,u),a(tt.element,o,u)}),{top:D,left:y}}})}.call(this),function(){var e,t,n,r;r=this.Tether.Utils,t=r.getBounds,n=r.updateClasses,e=r.defer,this.Tether.modules.push({position:function(r){var i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L
,A=this;d=r.top,f=r.left,T=this.cache("element-bounds",function(){return t(A.element)}),a=T.height,v=T.width,p=this.getTargetBounds(),u=d+a,l=f+v,i=[];if(d<=p.bottom&&u>=p.top){N=["left","right"];for(m=0,w=N.length;m<w;m++)c=N[m],((C=p[c])===f||C===l)&&i.push(c)}if(f<=p.right&&l>=p.left){k=["top","bottom"];for(g=0,E=k.length;g<E;g++)c=k[g],((L=p[c])===d||L===u)&&i.push(c)}o=[],s=[],h=["left","top","right","bottom"],o.push(this.getClass("abutted"));for(y=0,S=h.length;y<S;y++)c=h[y],o.push(""+this.
getClass("abutted")+"-"+c);i.length&&s.push(this.getClass("abutted"));for(b=0,x=i.length;b<x;b++)c=i[b],s.push(""+this.getClass("abutted")+"-"+c);return e(function(){return n(A.target,s,o),n(A.element,s,o)}),!0}})}.call(this),function(){this.Tether.modules.push({position:function(e){var t,n,r,i,s,o,u;o=e.top,t=e.left;if(!this.options.shift)return;return n=function(e){return typeof e=="function"?e.call(this,{top:o,left:t}):e},r=n(this.options.shift),typeof r=="string"?(r=r.split(" "),r[1]||(r[1]=r
[0]),s=r[0],i=r[1],s=parseFloat(s,10),i=parseFloat(i,10)):(u=[r.top,r.left],s=u[0],i=u[1]),o+=s,t+=i,{top:o,left:t}}})}.call(this),this.Tether}),Visitor.getInstance=function(e,t){var n,r=window.s_c_il,i;0>e.indexOf("@")&&(e+="@AdobeOrg");if(r)for(i=0;i<r.length;i++)if((n=r[i])&&"Visitor"==n._c&&(n.marketingCloudOrgID==e||t&&n.namespace==t))return n;return new Visitor(e,t)},define("visitor-api",function(){}),s=new AppMeasurement,s.visitorNamespace="adobecorp",s.trackInlineStats=!0,s.trackDownloadLinks=!0
,s.trackExternalLinks=!0,s.linkLeaveQueryString=!1,s.linkTrackEvents="None",s.linkTrackVars="None",s.trackingServer="stats.adobe.com",s.trackingServerSecure="sstats.adobe.com",AppMeasurement.getInstance=s_gi,window.s_objectID||(window.s_objectID=0),s_pgicq(),define("app-measurement",["visitor-api"],function(){}),CSXSWindowType._PANEL="Panel",CSXSWindowType._MODELESS="Modeless",CSXSWindowType._MODAL_DIALOG="ModalDialog",EvalScript_ErrMessage="EvalScript error.",Version.MAX_NUM=999999999,CSEvent.prototype
.data="",SystemPath.USER_DATA="userData",SystemPath.COMMON_FILES="commonFiles",SystemPath.MY_DOCUMENTS="myDocuments",SystemPath.APPLICATION="application",SystemPath.EXTENSION="extension",SystemPath.HOST_APPLICATION="hostApplication",ColorType.RGB="rgb",ColorType.GRADIENT="gradient",ColorType.NONE="none",CSInterface.THEME_COLOR_CHANGED_EVENT="com.adobe.csxs.events.ThemeColorChanged",CSInterface.prototype.hostEnvironment=JSON.parse(window.__adobe_cep__.getHostEnvironment()),CSInterface.prototype.getHostEnvironment=
function(){return this.hostEnvironment=JSON.parse(window.__adobe_cep__.getHostEnvironment()),this.hostEnvironment},CSInterface.prototype.closeExtension=function(){window.__adobe_cep__.closeExtension()},CSInterface.prototype.getSystemPath=function(e){var t=decodeURI(window.__adobe_cep__.getSystemPath(e)),n=this.getOSInformation();return n.indexOf("Windows")>=0?t=t.replace("file:///",""):n.indexOf("Mac")>=0&&(t=t.replace("file://","")),t},CSInterface.prototype.evalScript=function(e,t){if(t==null||t==
undefined)t=function(e){};window.__adobe_cep__.evalScript(e,t)},CSInterface.prototype.getApplicationID=function(){var e=this.hostEnvironment.appId;return e},CSInterface.prototype.getHostCapabilities=function(){var e=JSON.parse(window.__adobe_cep__.getHostCapabilities());return e},CSInterface.prototype.dispatchEvent=function(e){typeof e.data=="object"&&(e.data=JSON.stringify(e.data)),window.__adobe_cep__.dispatchEvent(e)},CSInterface.prototype.addEventListener=function(e,t,n){window.__adobe_cep__.
addEventListener(e,t,n)},CSInterface.prototype.removeEventListener=function(e,t,n){window.__adobe_cep__.removeEventListener(e,t,n)},CSInterface.prototype.requestOpenExtension=function(e,t){window.__adobe_cep__.requestOpenExtension(e,t)},CSInterface.prototype.getExtensions=function(e){var t=JSON.stringify(e),n=window.__adobe_cep__.getExtensions(t),r=JSON.parse(n);return r},CSInterface.prototype.getNetworkPreferences=function(){var e=window.__adobe_cep__.getNetworkPreferences(),t=JSON.parse(e);return t
},CSInterface.prototype.initResourceBundle=function(){var e=JSON.parse(window.__adobe_cep__.initResourceBundle()),t=document.querySelectorAll("[data-locale]");for(var n=0;n<t.length;n++){var r=t[n],i=r.getAttribute("data-locale");if(i)for(var s in e)if(s.indexOf(i)==0){var o=e[s];if(s.length==i.length)r.innerHTML=o;else if("."==s.charAt(i.length)){var u=s.substring(i.length+1);r[u]=o}}}return e},CSInterface.prototype.dumpInstallationInfo=function(){return window.__adobe_cep__.dumpInstallationInfo
()},CSInterface.prototype.getOSInformation=function(){var e=navigator.userAgent;if(navigator.platform=="Win32"||navigator.platform=="Windows"){var t="Windows",n="";return e.indexOf("Windows")>-1&&(e.indexOf("Windows NT 5.0")>-1?t="Windows 2000 ":e.indexOf("Windows NT 5.1")>-1?t="Windows XP ":e.indexOf("Windows NT 5.2")>-1?t="Windows Server 2003 ":e.indexOf("Windows NT 6.0")>-1?t="Windows Vista ":e.indexOf("Windows NT 6.1")>-1?t="Windows 7 ":e.indexOf("Windows NT 6.2")>-1&&(t="Windows 8 "),e.indexOf
("WOW64")>-1?n="64-bit":n="32-bit"),t+n}if(navigator.platform=="MacIntel"||navigator.platform=="Macintosh"){var r="Mac OS X",i=new String;i=e;if(i.indexOf("Mac OS X")>-1){var s=i.indexOf(")")-i.indexOf("Mac OS X"),o=i.substr(i.indexOf("Mac OS X"),s);r=o.replace("_","."),r=r.replace("_",".")}return r}return"Unknown Operation System"},CSInterface.prototype.openURLInDefaultBrowser=function(e){return cep.util.openURLInDefaultBrowser(e)},CSInterface.prototype.getExtensionID=function(){return window.__adobe_cep__
.getExtensionId()},CSInterface.prototype.getScaleFactor=function(){return window.__adobe_cep__.getScaleFactor()},CSInterface.prototype.setScaleFactorChangedHandler=function(e){window.__adobe_cep__.setScaleFactorChangedHandler(e)},CSInterface.prototype.getCurrentApiVersion=function(){var e=JSON.parse(window.__adobe_cep__.getCurrentApiVersion());return e},CSInterface.prototype.setPanelFlyoutMenu=function(e){window.__adobe_cep__.invokeSync("setPanelFlyoutMenu",e)},CSInterface.prototype.updatePanelMenuItem=
function(e,t,n){var r=!1;if(this.getHostCapabilities().EXTENDED_PANEL_MENU){var i=new MenuItemStatus(e,t,n);r=window.__adobe_cep__.invokeSync("updatePanelMenuItem",JSON.stringify(i))}return r},CSInterface.prototype.setContextMenu=function(e,t){window.__adobe_cep__.invokeAsync("setContextMenu",e,t)},CSInterface.prototype.updateContextMenuItem=function(e,t,n){var r=new ContextMenuItemStatus(e,t,n);ret=window.__adobe_cep__.invokeSync("updateContextMenuItem",JSON.stringify(r))},define("libs/CSInterface-5.0.0"
,function(){}),IMSInterface.prototype.addEventListener=function(e,t){window.__adobe_cep__.addEventListener(e,t)},IMSInterface.prototype.removeEventListener=function(e,t){window.__adobe_cep__.removeEventListener(e,t)},IMSInterface.prototype.imsConnect=function(){var e=window.__adobe_cep__.imsConnect();return e},IMSInterface.prototype.imsDisconnect=function(e){window.__adobe_cep__.imsDisconnect(e)},IMSInterface.prototype.imsFetchAccounts=function(e,t){var n=window.__adobe_cep__.imsFetchAccounts(e,t
);return n},IMSInterface.prototype.imsFetchAccessToken=function(e,t,n,r,i,s){return window.__adobe_cep__.imsFetchAccessToken(e,t,n,r,i,s)},IMSInterface.prototype.imsRevokeDeviceToken=function(e,t,n,r,i){return window.__adobe_cep__.imsFetchAccessToken(e,t,n,r,i,"REVOKE")},IMSInterface.prototype.imsSetProxyCredentials=function(e,t){window.__adobe_cep__.imsSetProxyCredentials(e,t)},IMSInterface.prototype.showAAM=function(e,t,n,r,i,s){return window.__adobe_cep__.showAAM(e,t,n,r,i,s)},IMSInterface.prototype
.imsGetCurrentUserId=function(){var e=window.__adobe_cep__.getCurrentImsUserId();return e},IMSInterface.prototype.imsConnectWithEndpoint=function(e){var t={};return t.imsEndpoint=e==undefined||e==null||e==""?"undefined":e,JSON.parse(window.__adobe_cep__.invokeSync("imsConnectWithEndpoint",JSON.stringify(t))).result},IMSInterface.prototype.imsFetchContinueToken=function(e,t,n,r,i,s,o){if(r==undefined||r==null)r="";if(i==undefined||i==null)i="";if(s==undefined||s==null)s="";if(o==undefined||o==null
)o="";var u={};return u.imsRef=e,u.bearerToken=t,u.targetClientId=n,u.redirectUri=r,u.scope=i,u.responseType=s,u.locale=o,JSON.parse(window.__adobe_cep__.invokeSync("imsFetchContinueToken",JSON.stringify(u))).result},define("libs/IMSInterface",function(){}),Vulcan.prototype.getTargetSpecifiers=function(){var e={};return JSON.parse(window.__adobe_cep__.invokeSync("vulcanGetTargetSpecifiers",JSON.stringify(e)))},Vulcan.prototype.launchApp=function(e,t,n){if(!requiredParamsValid(e))return!1;var r={}
;return r.targetSpecifier=e,r.focus=t?"true":"false",r.cmdLine=n==undefined||n==null?"":n,JSON.parse(window.__adobe_cep__.invokeSync("vulcanLaunchApp",JSON.stringify(r))).result},Vulcan.prototype.isAppRunning=function(e){if(!requiredParamsValid(e))return!1;var t={};return t.targetSpecifier=e,JSON.parse(window.__adobe_cep__.invokeSync("vulcanIsAppRunning",JSON.stringify(t))).result},Vulcan.prototype.isAppInstalled=function(e){if(!requiredParamsValid(e))return!1;var t={};return t.targetSpecifier=e,
JSON.parse(window.__adobe_cep__.invokeSync("vulcanIsAppInstalled",JSON.stringify(t))).result},Vulcan.prototype.getAppPath=function(e){if(!requiredParamsValid(e))return"";var t={};return t.targetSpecifier=e,JSON.parse(window.__adobe_cep__.invokeSync("vulcanGetAppPath",JSON.stringify(t))).result},Vulcan.prototype.addMessageListener=function(e,t,n){if(!requiredParamsValid(e,t)||!strStartsWith(e,VulcanMessage.TYPE_PREFIX))return;var r={};r.type=e,window.__adobe_cep__.invokeAsync("vulcanAddMessageListener"
,JSON.stringify(r),t,n)},Vulcan.prototype.removeMessageListener=function(e,t,n){if(!requiredParamsValid(e,t)||!strStartsWith(e,VulcanMessage.TYPE_PREFIX))return;var r={};r.type=e,window.__adobe_cep__.invokeAsync("vulcanRemoveMessageListener",JSON.stringify(r),t,n)},Vulcan.prototype.dispatchMessage=function(e){if(!requiredParamsValid(e)||!strStartsWith(e.type,VulcanMessage.TYPE_PREFIX))return;var t={},n=new VulcanMessage(e.type);n.initialize(e),t.vulcanMessage=n,window.__adobe_cep__.invokeSync("vulcanDispatchMessage"
,JSON.stringify(t))},Vulcan.prototype.getPayload=function(e){if(!requiredParamsValid(e)||!strStartsWith(e.type,VulcanMessage.TYPE_PREFIX))return null;var t=new VulcanMessage(e.type);return t.initialize(e),t.getPayload()};var VulcanInterface=new Vulcan;VulcanMessage.TYPE_PREFIX="vulcan.SuiteMessage.",VulcanMessage.SCOPE_SUITE="GLOBAL",VulcanMessage.DEFAULT_APP_ID="UNKNOWN",VulcanMessage.DEFAULT_APP_VERSION="UNKNOWN",VulcanMessage.DEFAULT_DATA="<data><payload></payload></data>",VulcanMessage.dataTemplate="<data>{0}</data>"
,VulcanMessage.payloadTemplate="<payload>{0}</payload>",VulcanMessage.prototype.initialize=function(e){this.type=e.type,this.scope=e.scope,this.appId=e.appId,this.appVersion=e.appVersion,this.data=e.data},VulcanMessage.prototype.xmlData=function(){if(this.data==undefined){var e="";e=String.format(VulcanMessage.payloadTemplate,e),this.data=String.format(VulcanMessage.dataTemplate,e)}return this.data},VulcanMessage.prototype.setPayload=function(e){var t=cep.encoding.convertion.utf8_to_b64(e);t=String
.format(VulcanMessage.payloadTemplate,t),this.data=String.format(VulcanMessage.dataTemplate,t)},VulcanMessage.prototype.getPayload=function(){var e=GetValueByKey(this.data,"payload");return e!=null?cep.encoding.convertion.b64_to_utf8(e):null},VulcanMessage.prototype.toString=function(){var e="type="+this.type;return e+=", scope="+this.scope,e+=", appId="+this.appId,e+=", appVersion="+this.appVersion,e+=", data="+this.xmlData(),e},String.format=function(e){if(arguments.length==0)return null;var t=
Array.prototype.slice.call(arguments,1);return e.replace(/\{(\d+)\}/g,function(e,n){return t[n]})},define("libs/Vulcan",function(){});var DEBUG_LOGGING=!1;AgoraLib.prototype=function(){var e=function(e){if(typeof Vulcan=="undefined")throw"Vulcan.js is required.";if(e==null||e==undefined)e=function(e){};this.isEntitledCallback=e;var t=this,n=!1;this.checkConnection(function(r){log("IsEntitled checkConnection response:"+r.response+" with status: "+r.status+" and statusCode: "+r.statusCode),n=!0;if(
r.statusCode==="0"&&t.compareVersion(r.response,"1.0.0")>=0){log("Connection check successful, now continue with isEntitled API call...");var i='<Request name="'+AgoraLib.IS_ENTITLED+'" callerID="'+t.callerID+'"><Parameters>';i+='<Parameter name="BundleID"><Value>'+t.bundleID+"</Value></Parameter>",i+="</Parameters></Request>";var s=String.format(AgoraLib.MESSAGE_REQUEST_TEMPLATE,i),o=new VulcanMessage(AgoraLib.MESSAGE_TYPE);o.setPayload(s),VulcanInterface.addMessageListener(AgoraLib.RESPONSE_TYPE
,t.responseCallback),VulcanInterface.dispatchMessage(o)}else{var u=new AgoraLibResponse("Unknown",r.status,r.statusCode);e(u)}}),setTimeout(function(){if(!n){log("Request timed out");var t=new AgoraLibResponse("Unknown",AgoraLib.status.internalClientError.status,AgoraLib.status.internalClientError.code);e(t)}},AgoraLib.TIMEOUT)},t=function(e,t){if(typeof Vulcan=="undefined")throw"Vulcan.js is required.";if(e==null||e==undefined)e=function(e){};this.getPurchaseUrlCallback=e;var t=!requiredParamsValid
(t)||t===""?!1:t,n=this,r=!1;this.checkConnection(function(i){r=!0,log("getPurchaseUrl checkConnection response:"+i.response+" with status: "+i.status+" and statusCode: "+i.statusCode);if(i.statusCode==="0"&&n.compareVersion(i.response,"1.0.0")>=0){log("Connection check successful, now continue with getPurchaseUrl API call...");var s='<Request name="'+AgoraLib.GET_PURCHASE_URL+'" callerID="'+n.callerID+'"><Parameters>';s+='<Parameter name="BundleID"><Value>'+n.bundleID+"</Value></Parameter>",s+='<Parameter name="StraightToCheckout"><Value>'+
t+"</Value></Parameter>",s+="</Parameters></Request>";var o=String.format(AgoraLib.MESSAGE_REQUEST_TEMPLATE,s),u=new VulcanMessage(AgoraLib.MESSAGE_TYPE);u.setPayload(o),VulcanInterface.addMessageListener(AgoraLib.RESPONSE_TYPE,n.responseCallback),VulcanInterface.dispatchMessage(u)}else{var a=new AgoraLibResponse("",i.status,i.statusCode);e(a)}}),setTimeout(function(){if(!r){log("Request timed out");var t=new AgoraLibResponse("",AgoraLib.status.internalClientError.status,AgoraLib.status.internalClientError
.code);e(t)}},AgoraLib.TIMEOUT)},n=function(e){if(typeof Vulcan=="undefined")throw"Vulcan.js is required.";if(typeof CSInterface=="undefined")throw"CSInterface.js is required.";if(e==null||e==undefined)e=function(e){};this.createEntitlementCallback=e;var t=this,n=!1;this.checkConnection(function(r){log("createEntitlement checkConnection response:"+r.response+" with status: "+r.status+" and statusCode: "+r.statusCode),n=!0;if(r.statusCode==="0"&&t.compareVersion(r.response,"1.0.0")>=0){log("Connection check successful, now continue with createEntitlement API call..."
);var i=new CSInterface,s=i.getSystemPath(SystemPath.EXTENSION),o=i.getOSInformation(),u=o.indexOf("Win")>=0?"\\":"/",a=s+u+"CSXS"+u+"manifest.xml",f=window.cep.fs.readFile(a),l=!0;if(window.DOMParser){var c=new window.DOMParser;try{var h=c.parseFromString(f.data,"text/xml"),p=h.getElementsByTagName("ExtensionManifest")[0];if(p){var d=p.attributes.getNamedItem("ExtensionBundleVersion").nodeValue;log("ExtensionBundleVersion: "+d);var v='<Request name="'+AgoraLib.CREATE_ENTITLEMENT+'" callerID="'+t
.callerID+'"><Parameters>';v+='<Parameter name="BundleID"><Value>'+t.bundleID+"</Value></Parameter>",v+='<Parameter name="ExtensionBundleVersion"><Value>'+d+"</Value></Parameter>",v+="</Parameters></Request>";var m=String.format(AgoraLib.MESSAGE_REQUEST_TEMPLATE,v),g=new VulcanMessage(AgoraLib.MESSAGE_TYPE);g.setPayload(m),VulcanInterface.addMessageListener(AgoraLib.RESPONSE_TYPE,t.responseCallback),VulcanInterface.dispatchMessage(g),l=!1}}catch(y){log("AgoraLibError: "+y)}}if(l){var b=new AgoraLibResponse
("",AgoraLib.status.internalClientError.status,AgoraLib.status.internalClientError.code);e(b)}}else{var b=new AgoraLibResponse("",r.status,r.statusCode);e(b)}}),setTimeout(function(){if(!n){log("Request timed out");var t=new AgoraLibResponse("",AgoraLib.status.internalClientError.status,AgoraLib.status.internalClientError.code);e(t)}},AgoraLib.TIMEOUT)};return{constructor:AgoraLib,isEntitled:e,getPurchaseUrl:t,createEntitlement:n,log:log}}(),AgoraLib.status={success:{status:"Success",code:"0"},updateAvailable
:{status:"Success. Update available",code:"1"},entitlementAlreadyCreated:{status:"Success. Entitlement already created",code:"2"},perpetualPurchase:{status:"Perpetual purchase",code:"1"},trialPurchase:{status:"Trial purchase",code:"2"},subscriptionPurchase:{status:"Subscription purchase",code:"3"},free:{status:"Free",code:"4"},userNotEntitledError:{status:"User not entitled",code:"-1"},subscriptionExpiredError:{status:"Subscription expired",code:"-2"},networkDisabledError:{status:"Network disabled"
,code:"1001"},networkError:{status:"Network error",code:"1002"},productNotFoundError:{status:"Product not found",code:"1003"},UserLoggedOutError:{status:"User logged out",code:"1004"},internalClientError:{status:"Internal client error",code:"1005"},internalServerError:{status:"Internal server error",code:"1006"},creativeCloudFailedToLaunchError:{status:"Adobe Creative Cloud Desktop failed to launch",code:"1007"},creativeCloudNotFoundError:{status:"Adobe Creative Cloud Desktop is not installed",code
:"1008"},ApiNotSupportedError:{status:"API not supported",code:"1009"}},AgoraLib.IS_ENTITLED="IsEntitled",AgoraLib.GET_PURCHASE_URL="GetPurchaseUrl",AgoraLib.CREATE_ENTITLEMENT="CreateEntitlement",AgoraLib.GET_VERSION="GetVersion",AgoraLib.STATUS="Status",AgoraLib.STATUSCODE="StatusCode",AgoraLib.MESSAGE_TYPE="vulcan.SuiteMessage.cosy.exchangeplugin.ApiRequest",AgoraLib.RESPONSE_TYPE="vulcan.SuiteMessage.cosy.exchangeplugin.ApiResponse",AgoraLib.ACCC_STARTED_UP_MESSAGE="vulcan.SuiteMessage.any.cosy.app.StartedUp"
,AgoraLib.MESSAGE_REQUEST_TEMPLATE="<Message><Requests>{0}</Requests></Message>",AgoraLib.MESSAGE_RESPONSE_TEMPLATE="<Message><Responses>{0}</Responses></Message>",AgoraLib.TIMEOUT=6e4,define("libs/AgoraLib",function(){}),define("services/config/configuration",["require","exports","module","angular"],function(e,t){"use strict";var n=e("angular"),r=[function(){this.EXTENSION_ID="com.adobe.DesignLibraries.angular",this.strTempFolder="",this.locale="en-US",this.showTooltips=!0,this.DRAGDROP_ID="com.adobe.cep.dnd.pasteboardtype"
,this.DRAGDROP_SOURCE="com.adobe.designlibrary",this.isAirPanel=!1,this.nativeProxy=undefined,this.localRoot="/Adobe/Creative Cloud Libraries/",this.SYNC_NOTIFICATIONS_AVAILABLE=!1,this.APP_NAME="",this.SUPPORTED_PRODUCTS=[],this.currentProduct=undefined,this.LEARN_MORE_URL_ROOT="https://www.adobe.com/go/cclibraries_help",this.SERVICE_ERROR_URL_ROOT="https://www.adobe.com/go/process_error",this.INSTALL_CC_APP_URL_ROOT="https://www.adobe.com/go/cc_install",this.UPDATE_CC_APP_URL_ROOT="https://www.adobe.com/go/process_update"
,this.UPDATE_CC_LIBRARIES_URL_ROOT="https://www.adobe.com/go/panel_update",this.AVAILABLE_HELP_LANGUAGES={ae:!0,cz:!0,dk:!0,de:!0,en:!0,es:!0,fi:!0,fr:!0,hu:!0,il:!0,it:!0,jp:!0,kr:!0,no:!0,nl:!0,pl:!0,br:!0,ru:!0,se:!0,tr:!0,ua:!0,cn:!0,tw:!0},this.DEFAULT_HELP_LANGUAGE="en",this.CCWEB_ELEMENT_URL="https://ZZZZ/assets/libraries/YYYY/XXXX",this.CCWEB_LIBRARIES_URL="https://ZZZZ/assets/libraries/YYYY",this.CREATIVE_CLOUD_ID="creative_cloud",this.IMAGE_ELEMENT_TYPE="application/vnd.adobe.element.image+dcx"
,this.COLOR_ELEMENT_TYPE="application/vnd.adobe.element.color+dcx",this.COLOR_THEME_ELEMENT_TYPE="application/vnd.adobe.element.colortheme+dcx",this.BRUSH_ELEMENT_TYPE="application/vnd.adobe.element.brush+dcx",this.CHARACTER_STYLE_ELEMENT_TYPE="application/vnd.adobe.element.characterstyle+dcx",this.PARAGRAPH_STYLE_ELEMENT_TYPE="application/vnd.adobe.element.paragraphstyle+dcx",this.LAYER_STYLE_ELEMENT_TYPE="application/vnd.adobe.element.layerstyle+dcx",this.LOOK_ELEMENT_TYPE="application/vnd.adobe.element.look+dcx"
,this.IMAGE_RENDITION_SIZE=202,this.LOOK_RENDITION_SIZE=202,this.BRUSH_RENDITION_SIZE=124,this.CHARACTER_STYLE_RENDITION_SIZE=104,this.PARAGRAPH_STYLE_RENDITION_SIZE=104,this.LAYER_STYLE_RENDITION_SIZE=108,this.STOCK_NAMESPACE="adobestock",this.STOCK_DATA_KEY="trackingdata",this.STOCK_CLIENT_ID="AdobeStockClient1",this.STOCK_TARGET_SCOPE="AdobeID,openid,creative_cloud,read_organizations,gnav,additional_info.address.mail_to,sao.stock",this.STOCK_GET_USER_PROFILE_PATH="/Rest/Libraries/1/Member/Profile?locale=ZZZZ&content_id=YYYY"
,this.STOCK_LICENSE_PATH="/Rest/Libraries/1/Content/License?content_id=ZZZZ",this.STOCK_INFO_PATH="/Rest/Libraries/1/Content/Info?content_id=ZZZZ",this.STOCK_FIND_SIMILAR_PATH="/Search",this.STOCK_ABANDON_TRANSACTION_PATH="/Rest/Libraries/1/Member/Abandon?&state=ZZZZ&content_id=YYYY",this.STOCK_LICENSE_TYPE_STANDARD="Standard",this.STOCK_LICENSE_TYPE_EXTENDED="Extended",this.STOCK_STATE_PURCHASED="purchased",this.STOCK_STATE_NOT_PURCHASED="not_purchased",this.STOCK_STATE_CANCELLED="cancelled",this
.COLOR_NAMESPACE="color",this.COLOR_DATA_KEY="data",this.COLOR_REPRESENTATION_TYPE="application/vnd.adobe.color+json"}];t.attach=function(e){n.module(e).service("configuration",r)}}),define("services/config/localSettings",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$window","csInterface","configuration","fileUtils",function(e,t,n,r){function s(e,t){this._path=e,this._fileName=t,this._writing=!1,this._pendingWrite=!1;var n="readFileSync";try{this._settings=
JSON.parse(i[n](e+t))}catch(r){this._settings={}}}var i=nodeRequire("fs");s.prototype._write=function(){var e=this;if(this._writing){this._pendingWrite=!0;return}this._writing=!0;var t=function(){e._writing=!1,e._pendingWrite&&(e._pendingWrite=!1,e._write())};r.ensurePathExists(e._path,function(n){if(n){console.log(n),e._pendingWrite=!1,t();return}i.writeFile(e._path+e._fileName,JSON.stringify(e._settings,undefined,2),function(n){n&&(console.log(n),e._pendingWrite=!1),t()})})},s.prototype.get=function(
e){return this._settings[e]},s.prototype.set=function(e,t){this._settings[e]=t,this._write()};var o=new s(t.getLocalRoot(),"settings.json"),u,a="existsSync";if(e.isDev||i[a](t.getGlobalRoot()+"debug"))u=new s(t.getGlobalRoot(),"debug");this.setValue=function(e,t){o.set(e,t)},this.getValue=function(e){return o.get(e)},this.setDebugValue=function(e,t){u&&u.set(e,t)},this.getDebugValue=function(e){return u?u.get(e):undefined},this.hasDebugSettings=function(){return u!==undefined},this.showDebugMenu=
function(){return this.hasDebugSettings()},this.shouldWriteDebugLog=function(){return this.hasDebugSettings()}}];t.attach=function(e){r.module(e).service("localSettings",i)}});var PRODUCT_CODES=["PHXS","ILST","IDSN","AEFT","PPRO"],applications=PRODUCT_CODES.map(function(e){"use strict";return"applications/"+e+"/js/index"}),overrides=PRODUCT_CODES.map(function(e){"use strict";return"applications/"+e+"/js/configuration/main"}),reqs=["require","angular"].concat(applications).concat(overrides);define
("services/config/products",reqs,function(e){"use strict";var t=e("angular"),n=new CSInterface,r=n.hostEnvironment.appName,i=["$injector","configuration",function(e,t){var n=PRODUCT_CODES.map(function(n){var i=e.get(n);return n===r&&(t.currentProduct=i,t.APP_NAME=r),i});t.SUPPORTED_PRODUCTS=n.map(function(e){return e.config})}],s=function(n){PRODUCT_CODES.forEach(function(t,i){e(applications[i]).attach(n),r===t&&e(overrides[i]).attach(n)}),t.module(n).service("products",i)};return{attach:s}}),define
("services/config/main",["require","exports","module","./configuration","./localSettings","./products"],function(e,t,n){"use strict";function r(t){e("./configuration").attach(t),e("./localSettings").attach(t),e("./products").attach(t)}return{attach:r}}),define("services/designlibrary/designLibraryCEPEventHandlers",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["digestUtils","csInterface","fileUtils","designLibraryManager","designLibraryElements","designLibrarySelection"
,"metrics","configuration","adobeStockUtils","designLibraryViewState","$translate",function(e,t,n,r,i,s,o,u,a,f,l){function w(e,t){var r=i.findRepresentation(e,n.getUsableTypes(e.type));return r?r.getContentPath().then(function(e){t(e)}):e.getRenditionPath().then(function(e){t(e)})}var c=!1,h={},p,d=function(t){if(!t||!t.data)return;var n=t.data,i=n.operation,o=n.elementName,a=n.elementRef,c;p=n.requestRef,a&&(c=r.resolveElementReference(a),c&&!o&&(o=c.name));if(i==="place")f.setRelinkMode({message
:l.instant("DL_RELINK_PLACE_MESSAGE"),actionMessage:l.instant("DL_PLACE"),missing:!1,overlayMessage:l.instant("DL_RELINK_PLACE_OVERLAY_MESSAGE")});else{var h=l.instant("DL_RELINK_"+i.toUpperCase()+"_MESSAGE",{elementName:o});f.setRelinkMode({message:h,actionMessage:l.instant("DL_RELINK"),missing:a?!c:undefined,overlayMessage:l.instant("DL_RELINK_RELINK_OVERLAY_MESSAGE")})}var d=s.getSelection();(d.length>1||d.length===1&&d[0].type!==u.IMAGE_ELEMENT_TYPE)&&s.clearSelection(),e.triggerDigest()},v=function(
t){f.resetMode(),e.triggerDigest()},m=function(e){if(!e||!e.data)return;var t=e.data,n=t.elementRef,s=t.requestRef,o=r.resolveElementReference(n);if(!o)return;s&&(h[n]=s);var u=i.getEditOperation(o);u(o,o.library)},g=function(t){if(!t||!t.data)return;var n=t.data,i=n.elementRef,o=r.resolveElementReference(i);o&&(f.resetMode(),r.setCurrentLibrary(o.library),s.setSelection(o,!0),e.triggerDigest())},y=function(e){var t=e?e.data:undefined;if(t&&t.elementRef){var n=r.resolveElementReference(t.elementRef
);if(n){var i=t.cause||"createElement";o.reportCreateLink(n,i)}}},b=function(e){var t=e?e.data:undefined;if(t&&t.elementRef){var n=r.resolveElementReference(t.elementRef);if(n){var s=i.findUsableRepresentation(n);if(s){o.reportUseElement(s,"placeAsset");var u=!1;typeof t.linked=="boolean"?u=t.linked:typeof t.linked=="string"?u=t.linked.toLowerCase()==="true":u=!1,u===!0&&o.reportCreateLink(n,"placeAsset")}}}else{var a=o.getDraggedElements();a&&a.forEach(function(e){e.usedRepresentation&&o.reportUseElement
(e.usedRepresentation,"placeAsset")})}};this.sendElementCreated=function(e,n,r){w(e,function(i){var s=new CSEvent("com.adobe.DesignLibraries.events.ElementCreated","APPLICATION");s.data=JSON.stringify({elementRef:e.getReference(),name:e.name,libraryName:e.library.name,modifiedTime:e.modified,creationTime:e.created,data:[i],documentId:n,layerIds:r}),t.dispatchEvent(s)})},this.sendElementChosen=function(e){w(e,function(n){var r=new CSEvent("com.adobe.DesignLibraries.events.ElementChosen","APPLICATION"
),i={requestRef:p,elementRef:e.getReference(),name:e.name,libraryName:e.library.name,modifiedTime:e.modified,creationTime:e.created,data:[n]};a.isStockAsset(e)&&(i.adobeStock={id:a.getStockId(e),license:a.isLicensed(e)}),r.data=JSON.stringify(i),t.dispatchEvent(r)})},this.elementChooseCancelled=function(){var e=new CSEvent("com.adobe.DesignLibraries.events.ElementChooseCancelled","APPLICATION");e.data=JSON.stringify({requestRef:p}),t.dispatchEvent(e)},this.sendElementUpdated=function(e){if(e){var n=
e.element,r=n.getReference();e.getContentPath().then(function(e){var i=new CSEvent("com.adobe.DesignLibraries.events.ElementUpdated","APPLICATION"),s={requestRef:h[r],elementRef:r,name:n.name,libraryName:n.library.name,modifiedTime:n.modified,creationTime:n.created,data:[e]};a.isStockAsset(n)&&(s.adobeStock={id:a.getStockId(n),license:a.isLicensed(n)}),i.data=JSON.stringify(s),t.dispatchEvent(i),h[r]&&delete h[r]})}},this.sendElementLicensed=function(e){if(e){var n=e.element,r=n.getReference();e.
getContentPath().then(function(e){var i=new CSEvent("com.adobe.DesignLibraries.events.ElementLicensed","APPLICATION");i.data=JSON.stringify({elementRef:r,name:n.name,libraryName:n.library.name,modifiedTime:n.modified,creationTime:n.created,data:[e],adobeStock:{id:a.getStockId(n),license:a.isLicensed(n)}}),t.dispatchEvent(i)})}},this.elementEditCancelled=function(e){var t=e.getReference();h[t]&&delete h[t]},this.startListening=function(){c||(t.addEventListener("dlElementOpenForEdit",m),t.addEventListener
("dlElementReveal",g),t.addEventListener("dlElementChoose",d),t.addEventListener("dlElementChooseCancel",v),t.addEventListener("dlElementLinkCreated",y),t.addEventListener("dlElementDropped",b),c=!0)},this.stopListening=function(){c=!1,t.removeEventListener("dlElementOpenForEdit",m),t.removeEventListener("dlElementReveal",g),t.removeEventListener("dlElementChoose",d),t.removeEventListener("dlElementChooseCancel",v),t.removeEventListener("dlElementLinkCreated",y),t.removeEventListener("dlElementDropped"
,b)}}];t.attach=function(e){r.module(e).service("designLibraryCEPEventHandlers",i)}}),define("services/designlibrary/designLibraryContextMenu",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$q","$filter","mediator","menuManager","designLibraryManager","designLibraryElements","designLibrarySelection","designLibraryViewState","designLibraryUtils","adobeStockUtils","linkUtils","configuration",function(e,t,n,i,s,o,u,a,f,l,c,h){function p(e){return function(
){var t=o.getEditOperation(e);t(e,e.library)}}function d(e){return function(){n.emit("dlItemRenameRequest",e)}}function v(e,t){return function(){u.clearSelectionForItems(e),f.deleteElements(t,e)}}function m(e){return function(){c.openShareElementLinkURL(e)}}function g(e){return function(){l.licenseImage(e)}}function y(e){return function(){var t=l.getStockId(e);c.launchFindSimilarURL(t)}}function b(n,i,s,o){return function(){o.beginOperation(),n&&s.beginOperation();var f=function(e){o.endOperation
(),n&&s.endOperation(),r.isArray(e)&&!n&&s===o&&u.setSelection(e)},l=t("orderBy")(i,a.getSortFunction("modified"),!0),c=[];l.forEach(function(e){n?c.push(s.moveElement(e,o)):c.push(s.copyElement(e,o))}),e.all(c).then(f,f)}}function w(e,n){var r={copy:[],move:[]},i=s.getCurrentLibraryCollection(),o=t("orderBy")(i.libraries,a.getState().librarySortFunction);return o.forEach(function(t){r.copy.push({label:t.name,enableMenu:t.id!==n.id,checked:t.id===n.id,onClick:b(!1,e,n,t)}),r.move.push({label:t.name
,enableMenu:t.id!==n.id,checked:t.id===n.id,onClick:b(!0,e,n,t)})}),r}this.showContextMenu=function(e,t,n){if(!a.getState().enableContextMenu){i.setContextMenu([]);return}var r=[t];u.isSelected(t)&&(r=[],u.getSelection().forEach(function(e){r.push(e)}));var s=[],f=e.collection.cloudId===h.CREATIVE_CLOUD_ID;if(r.length===1){f&&l.isStockAsset(r[0])&&(l.isLicensed(r[0])||s.push({label:"DL_STOCK_LICENSE_MENU",onClick:g(r[0])}),s.push({label:"DL_STOCK_FIND_SIMILAR_MENU",onClick:y(r[0])}),s.push({divider
:!0}));var c=o.getApplyOperations(r[0],e,n);c.forEach(function(e){e.displayInMenu&&s.push({label:e.name,onClick:e.apply})}),o.getEditOperation(r[0])&&s.push({label:"DL_EDIT_ITEM",onClick:p(r[0])}),f&&s.push({label:"DL_SHARE_LINK",onClick:m(r[0])}),s.length>0&&s.push({divider:!0})}s.push({label:r.length>1?"DL_DUPLICATE_SELECTED_ITEMS":"DL_DUPLICATE_ITEM",onClick:b(!1,r,e,e)});var E=w(r,e);s.push({label:r.length>1?"DL_COPY_SELECTED_ITEMS":"DL_COPY_ITEM",menuItems:E.copy}),s.push({label:r.length>1?"DL_MOVE_SELECTED_ITEMS"
:"DL_MOVE_ITEM",menuItems:E.move}),s.push({divider:!0}),r.length===1&&s.push({label:"DL_RENAME",onClick:d(r[0])}),s.push({label:"DL_DELETE",onClick:v(r,e)}),i.setContextMenu(s)}}];t.attach=function(e){r.module(e).service("designLibraryContextMenu",i)}}),define("services/designlibrary/designLibraryElements",["require","exports","module","angular"],function(e,t,n){"use strict";function i(e){return function(){e.map(function(e){e()})}}var r=e("angular"),s=["$q","$window","designLibraryUtils","fileUtils"
,"configuration","adobeStockUtils","ccLibraries","digestUtils",function(e,t,n,s,o,u,a,f){var l=[],c=[],h={},p=[],d={};this.register=function(e){var t=e.type;d[t]&&r.extend(e,d[t]);if(!r.isNumber(e.order)){console.log("Error: Element type "+t+" defined with order property of "+e.order+" which is not a valid number.");return}if(p.indexOf(e.order)!==-1){console.log("Error: Element type "+t+" is attempting to use the order position "+e.order+" which is already in use.");return}if(!h[t]){h[t]=e;var n=
e.order;p.push(n);var i;if(n){var s;for(s=0;s<l.length;s++)if(l[s].order>n){i=s;break}}i!==undefined?(l.splice(i,0,e),c.splice(i,0,t)):(l.push(e),c.push(t))}else console.log("Warning: Attempting to register element type "+t+" more than once.")},this.registerOverride=function(e){var t=e.type;d[t]=e;if(!h[t]){d[t]=e;return}r.extend(h[t],e)};var v=function(e){return h[e]||h["*"]};this.getApplyOperations=function(e,t,n){if(e instanceof Array){var s={};e.forEach(function(e){var n=v(e.type),i=r.isFunction
(n.getApplyOperations)?n.getApplyOperations(e,t):[];i.forEach(function(t){var n=e.type+"_"+t.name;s[n]?s[n].allowMultiple?s[n].apply.push(t.apply):s[n].disabled=!0:(s[n]=t,s[n].apply=[t.apply])})});var o=[],u,a;for(u in s)s.hasOwnProperty(u)&&(a=s[u],a.apply=i(a.apply),o.push(a));return o}var f=v(e.type);return r.isFunction(f.getApplyOperations)?f.getApplyOperations(e,t,n):[]},this.getEditOperation=function(e){var t=v(e.type);return t.editOperation},this.getAddOperations=function(e,t){var i=[];return l
.forEach(function(s){var o=s.getAddOperations(e);r.isFunction(s.transformAddOperations)&&(o=s.transformAddOperations(o,e)),o.forEach(function(e){t&&!n.canAddElement(t)&&(e.disabled=!0,e.toolTip="DL_DESIGN_LIBRARY_HAS_LIMIT"),i.push(e)})}),i},this.getElementTypes=function(){return c},this.getDirective=function(e){var t=v(e);return t&&t.directive},this.getDisplayName=function(e){var t=v(e);return t&&t.displayName},this.getOrder=function(e){var t=v(e);return t&&t.order},this.getRenditionUrl=function(
e){var t=v(e.type),n=t&&t.renditionSize;return e.getRenditionPath(n).then(function(e){return e&&(e="file://"+e+"?cachebuster="+Math.random()),e})},this.isDraggable=function(e){if(!e)return!1;var t=v(e.type);return t.isDraggable===!0||t.isDraggable===!1?t.isDraggable:r.isFunction(t.isDraggable)?t.isDraggable():!1},this.getDragType=function(e){var t=v(e.type);return t.dragType||e.type},this.findUsableRepresentation=function(e){var t=s.getUsableTypes(e.type);return this.findRepresentation(e,t)},this
.getContentPathAndRepresentation=function(e){var t,n=this.findUsableRepresentation(e);n?n.getContentPath(function(e,n){t=n}):e&&e.getRenditionPath(undefined,function(r,i){t=i,n={type:"image/png",_element:e}});if(t)return{path:t,representation:n}},this.getDragData=function(e){var t=this.getContentPathAndRepresentation(e),n=this.getDragType(e);if(t){var r={name:e.name,libraryName:e.library.name,type:n,elementRef:e.getReference(),modifiedTime:e.modified,creationTime:e.created,data:[t.path]};return u
.isStockAsset(e)&&(r.adobeStock={id:u.getStockId(e),license:u.isLicensed(e)}),{asset:r,representation:t.representation}}},this.findRepresentation=function(e,t){t=t instanceof Array?t:[t];var n=e.getPrimaryRepresentation();if(n&&this.isRepresentationCompatible(n,t))return n;var r,i;for(r=0;r<e.representations.length;r++){i=e.representations[r];if(this.isRepresentationCompatible(i,t))return i}},this.isRepresentationCompatible=function(e,t){var n;for(n=0;n<t.length;n++)if(e.isCompatibleType(t[n]))return!0
;return!1},this.getDisplayText=function(e){var t=v(e.type);return t&&t.getDisplayText?t.getDisplayText(e):e.name},this.getRenditionSizes=function(){var e={};return l.forEach(function(t){t.renditionSize&&(e[t.type]=[t.renditionSize])}),e},this.getFullRenditionConfig=function(){var e={};return l.forEach(function(t){t.fullRenditionConfig&&(e[t.type]=t.fullRenditionConfig())}),e},this.checkDuplicates=function(e,t){var n=v(t.type);if(n&&n.isDuplicate){var r;for(r=0;r<e.items.length;r++){var i=e.items[
r];if(i.type===t.type){var s=n.isDuplicate(i,t);if(s)return s}}}},this.setRendition=function(t,n,r){var i=t.representations.some(function(e){return a.utils.canGenerateRenditionFromMimeType(e.type)}),o=[];if(!i){var u=t.createRepresentation("image/png","rendition");o.push(u.updateContentFromPath(r))}var f=function(){s.deleteFile(r)};return t.setRenditionCache(n,r).then(f,f),e.all(o)},this.getTruncatedElementName=function(e){return e&&e.name?n.truncateName(e.name,150):undefined};var m,g=[];this.setLoadingTimeout=
function(e){g.push(e),m||(m=t.setTimeout(function(){var e=g;g=[],m=undefined;var t=!1;e.forEach(function(e){t=e()||t}),t&&f.triggerDigest()},1e3))}}];t.attach=function(e){r.module(e).service("designLibraryElements",s)}}),define("services/designlibrary/designLibraryFlyoutMenu",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$translate","metrics","linkUtils","debugLog","csInterface","imsInterface","localSettings","menuManager","versionManager","designLibraryManager"
,"designLibraryElements","designLibrarySelection","designLibraryUtils","designLibraryViewState","listenerUtils","adobeStockUtils","configuration","importExport","debugUtils",function(e,t,n,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b){function E(e){e.push({divider:!0}),e.push({label:r.BUILT?"v"+f.getPluginVersion():"DEV",enableMenu:!1}),o.getEnvironment().overrides&&o.getEnvironment().overrides.forEach(function(t){e.push({label:t+": "+o.getEnvironment()[t],enableMenu:!1})}),e.push({label:"Panel Information",onClick
:function(){s.showError("Panel Information\nPath:\n"+s.getPluginPath()+"\n\nAnalytics State:\n"+t.getState())}}),e.push({label:"Save Debug Info",onClick:function(){b.saveDebugInfo()}}),e.push({label:"View Library Info",enableMenu:l.getCurrentLibrary()!==undefined,onClick:b.viewLibraryInfo}),e.push({label:"View Element Info",enableMenu:l.getCurrentLibrary()!==undefined,onClick:b.viewElementInfo}),e.push({label:"View All Libraries Info",enableMenu:l.getCurrentLibraryCollection()!==undefined,onClick
:b.viewLibrariesInfo}),e.push({label:"Show Logs Folder",enableMenu:!0,onClick:b.showLocalRoot}),e.push({divider:!0}),e.push({label:"Export Library",onClick:function(){y.exportLibrary(l.getCurrentLibrary())}}),e.push({label:"Import Library",onClick:function(){y.importLibrary()}}),e.push({label:"Log Analytics",checked:u.getDebugValue("logMetrics"),onClick:function(){var e=u.getDebugValue("logMetrics");u.setDebugValue("logMetrics",!e),t.setEnabled(!e),S()}}),e.push({divider:!0});var n=l.getServiceInfo
(),i=n&&n.environment,a=n&&n.version;e.push({label:"Production",checked:i==="Production",enableMenu:!1,onClick:function(){u.setDebugValue("currentEnvironment","production"),window.location.reload()}}),e.push({label:"Staging",checked:i==="Staging",enableMenu:!1,onClick:function(){u.setDebugValue("currentEnvironment","staging"),window.location.reload()}}),e.push({divider:!0}),e.push({label:l.isConnected()?"Connected To: v"+a:"Not Connected",enableMenu:!1}),l.isConnected()||e.push({label:"Reconnect"
,onClick:function(){l.reconnectToService()}})}function S(){var e=!!l.isConnected(),t=o.isLoggedIn(),r=l.getCurrentLibrary(),i=t&&r&&r.collection.cloudInfo.switchingEnabled,s=t&&r&&r.collection.cloudId===g.CREATIVE_CLOUD_ID,f=[];i&&f.push({label:"DL_MENU_CHANGE_CLOUD",onClick:function(){l.requestCloudChange()}}),f.push({label:"DL_MENU_CREATE_LIB",enableMenu:t&&e,onClick:function(){w.notify("createLibrary")}}),f.push({divider:!0}),f.push({label:"DL_STOCK_FIND_MORE_MENU",onClick:function(){n.launchStockSite
()}}),f.push({divider:!0});if(r){f.push({label:"DL_FLYOUT_COLLABORATE",onClick:function(){n.openCollaborateURL(r)}}),s&&f.push({label:"DL_FLYOUT_SHARE_LINK",onClick:function(){n.openShareLibraryLinkURL(r)}});var c={libraryName:p.truncateName(r.name,15)};f.push({label:"DL_FLYOUT_RENAME_LIB",translationData:c,onClick:function(){w.notify("renameLibrary")}}),f.push({label:r.collaboration==="incoming"?"DL_FLYOUT_LEAVE_LIB":"DL_FLYOUT_REMOVE_LIB",translationData:c,onClick:function(){w.notify("deleteLibrary"
)}}),f.push({divider:!0})}f.push({label:"DL_SORT_ITEMS_BY_MOD_DATE_TOOLTIP",enableMenu:t&&e,checked:d.getState().sort==="modified",onClick:function(){d.setSortState("modified"),S()}}),f.push({label:"DL_SORT_ITEMS_BY_NAME_TOOLTIP",enableMenu:t&&e,checked:d.getState().sort==="name",onClick:function(){d.setSortState("name"),S()}}),f.push({divider:!0}),r&&f.push({label:"DL_FLYOUT_VIEW_ON_WEBSITE",onClick:function(){n.openLibraryURL(r)}}),f.push({label:"DL_FLYOUT_HOW_TO_USE",onClick:n.openHelpURL}),u.
showDebugMenu()&&E(f),a.setFlyoutMenu(f)}function N(){x&&x.name!==T&&(T=x.name,S())}var w=v.addListenerManager(this,["createLibrary","renameLibrary","deleteLibrary"]);o.addListener("loginState",S);var x,T;l.addListener("currentLibrary",function(){x&&x.removeChangeListener(N),x=l.getCurrentLibrary(),x&&x.addChangeListener(N),S()}),l.addListener("currentCollection",S),S(),this.invokeCreateLibrary=function(){w.notify("createLibrary")}}];t.attach=function(e){r.module(e).service("designLibraryFlyoutMenu"
,i)}}),define("services/designlibrary/designLibraryManager",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$q","$translate","localSettings","ccLibraries","csInterface","imsInterface","metrics","debugLog","designLibraryElements","listenerUtils","fileUtils","digestUtils",function(e,t,n,r,i,s,o,u,a,f,l,c){function w(){v&&(m.forEach(function(e){e.resolve()}),m=[])}function E(){if(p){var e=n.getValue(p.userId+"#"+p.cloudId+"#currentLibraryId");e=e||n.getValue
(p.userId+"#currentLibraryId")||n.getValue("currentDesignLibraryId"),d=e?p.getLibraryById(e):undefined}else d=undefined;g.notify("currentLibrary")}function S(e){d!==e&&(d&&d.deletedFromServer&&p.removeDeletedLibraries({exclude:[e]}),d=e,g.notify("currentLibrary"),e&&n.setValue(p.userId+"#"+p.cloudId+"#currentLibraryId",e.id))}function x(){var e=d.modified;d&&!d.deletedLocally&&d.collection.removeLibrary(d);if(p.libraries.length>0){var t,n;p.libraries.forEach(function(r){if(!n||r.modified<n.modified
)n=r;r.modified<e&&(!t||r.modified>t.modified)&&(t=r)}),S(t||n)}else S(undefined)}function T(){p.libraries.forEach(function(e){if(!y[e.id]){var t=function(){if(y[e.id].previousName!==e.name||y[e.id].previousDeletedFromServer!==e.deletedFromServer)y[e.id].previousName=e.name,y[e.id].previousDeletedFromServer=e.deletedFromServer,g.notify("libraryList");c.triggerDigest()};y[e.id]={previousName:e.name,previousDeletedFromServer:e.deletedFromServer,callback:t},e.addChangeListener(t)}}),Object.keys(y).forEach
(function(e){p.getLibraryById(e)||delete y[e]})}function N(){Object.keys(y).forEach(function(e){var t=p.getLibraryById(e);t&&t.removeChangeListener(y[e].callback),delete y[e]})}function C(){g.notify("libraryList"),p&&(p.getTempDir(function(e,t){if(!e){var n=new CSEvent("com.adobe.DesignLibraries.events.TEMPDIR","APPLICATION");n.data=JSON.stringify({path:t}),i.dispatchEvent(n)}}),T(),d&&d.deletedLocally&&x())}function k(){C(),c.triggerDigest()}function L(){g.notify("libraryStatus");if(!p)return;var e="initialSyncInProgress"
,t=p[e];if(!d&&!t){var n=p.getDefaultLibrary();!n&&p.libraries.length>0&&(n=p.libraries[0]),S(n)}d&&p.removeDeletedLibraries({exclude:[d]}),!t&&r.isConnected()&&(v=!0,w())}function A(){L(),c.triggerDigest()}function O(e){e.addCommitErrorListener(A);var t="addSyncListener";e[t](A),e.addChangeListener(k)}function M(e){e.removeCommitErrorListener(A);var t="removeSyncListener";e[t](A),e.removeChangeListener(k),N()}function _(){h=r.getLoadedCollections(),p!==h[0]&&(p&&M(p),p=h[0],p&&(O(p),o.setEnvironment
({userID:p.userId,imsClientID:s.getEnvironment().clientId})),E(),C(),g.notify("currentCollection")),L()}function P(){if(!D){var e={analytics:o,log:u.log,getDisplayName:a.getDisplayText},n={RENDITION_SIZES:a.getRenditionSizes(),FULL_RENDITION_CONFIG:a.getFullRenditionConfig(),STORAGE_API_KEY:s.getEnvironment().clientId,ELEMENT_TYPE_FILTERS:a.getElementTypes(),DEFAULT_LIBRARY_NAME:t.instant("DL_DEFAULT_LIBRARY_NAME")};r.configure(e,n),r.addLoadedCollectionsListener(function(){_(),c.triggerDigest()}
),_(),o.reportInitialize(),o.reportPanelEvent("initializePanel"),D=!0}}function H(){p&&p.syncState!=="syncing"&&p.sync()}function B(){var e=p&&p.syncState==="error"&&!p.retryTime;return e}var h=[],p,d,v=!1,m=[],g=f.addListenerManager(this,["currentCollection","libraryList","currentLibrary","libraryStatus","ccAppAlert"]),y={},b=!1,D=!1;this.init=function(){P()},this.getCurrentLibraryCollection=function(){return p},this.getCurrentLibrary=function(){return d},this.setCurrentLibrary=function(e){S(e)}
,this.deleteCurrentLibrary=function(){x()},this.sync=function(e,t){(!e||t&&B()||!t&&!B())&&H()},this.waitForInitialLoad=function(){var t=e.defer();return m.push(t),w(),t.promise},this.reconnectToService=function(){r.reconnect()},this.launchCCLibraryProcess=function(){if(!b){var e,t=this,n="vulcan.SuiteMessage.cclibraries.service.Initialized",r=function(){e&&clearInterval(e),b=!1,t.reconnectToService(),VulcanInterface.removeMessageListener(n,r)},i=function(){if(t.isConnected()){r();return}t.isProcessInstalled
()&&!t.isProcessRunning()&&VulcanInterface.launchApp("cclibraries",!1)};VulcanInterface.addMessageListener(n,r),this.reconnectToService(),b=!0,e=setInterval(i,5e3),i()}},this.isProcessInstalled=function(){return VulcanInterface.isAppInstalled("cclibraries")},this.isProcessRunning=function(){return VulcanInterface.isAppRunning("cclibraries")},this.isConnected=function(){return r.isConnected()},this.getServiceInfo=function(){return r.getServiceInfo()},this.resolveElementReference=function(e){return r
.resolveElementReference(e)},this.syncingEnabled=function(){var e="isSyncingEnabled";return r[e]()},this.requestCloudChange=function(){var e=new VulcanMessage(VulcanMessage.TYPE_PREFIX+"accc.app.ChangeActiveCloudRequest");e.setPayload('<?xml version="1.0" encoding="UTF-8" standalone="no"?><request><type>accc.app.ChangeActiveCloudRequest</type><requestid>70a05e0b-10f8-4d24-9f07-88399a70c578</requestid></request>'),VulcanInterface.dispatchMessage(e)},r.setCustomDigestTrigger(function(){c.triggerDigest
()})}];t.attach=function(e){r.module(e).service("designLibraryManager",i)}}),define("services/designlibrary/designLibrarySelection",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$filter","designLibraryManager","designLibraryElements","designLibraryViewState","listenerUtils","fileUtils","configuration",function(e,t,n,i,s,o,u){function p(e){return n.getOrder(e.type)||Number.POSITIVE_INFINITY}this.serviceName="designLibrarySelection";var a=[],f,l,c=s.addListenerManager
(this,["selectionChanged"]);this.isPendingScrollToItem=function(e){return e&&l&&e.id===l.id?!0:!1},this.clearPendingScrollToItem=function(){l=undefined},this.setSelection=function(e,t){l=undefined,r.isArray(e)?(a=e,f=undefined):(a=[e],f=e,t&&(l=e)),c.notify("selectionChanged")};var h=function(){l=undefined,a=[],f=undefined,c.notify("selectionChanged")};this.clearSelection=h,this.clearSelectionForItems=function(e){e&&(l=undefined,e.forEach(function(e){var t=a.indexOf(e);t!==-1&&(a.splice(t,1),f=undefined
)}),c.notify("selectionChanged"))},this.toggleSelectedItem=function(e){l=undefined;var t=a.indexOf(e);t!==-1?(a.splice(t,1),f=undefined):(a.push(e),f=e),c.notify("selectionChanged")},this.setSelectionRange=function(t){var n=i.getState().sortFunction,s=[p];r.isArray(n)?n.forEach(function(e){s.push(e)}):s.push(n);var o=e("localeOrderBy")(t.library.elements,s),u;f?u=o.indexOf(f):a.length>0&&a.forEach(function(e){var t=o.indexOf(e);if(!u||t>u)u=t});if(u===undefined)this.setSelection(t);else{l=undefined
;var h=o.indexOf(t);a=[];var d;if(h<u)for(d=h;d<=u;d++)a.push(o[d]);else for(d=u;d<=h;d++)a.push(o[d]);c.notify("selectionChanged")}},this.isSelected=function(e){return a.indexOf(e)!==-1},this.getSelection=function(){return a},t.addListener("currentLibrary",h)}];t.attach=function(e){r.module(e).service("designLibrarySelection",i)}}),define("services/designlibrary/designLibraryStatus",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i={fs:"DL_FS_ERROR",general
:"DL_NO_LIBS_ERROR_SYNCING",jsx:"DL_NO_LIBS_ERROR_INIT",library:"DL_NO_LIBS_ERROR_SYNCING",loggedOut:"DL_NO_LIBS_LOGGED_OUT",network:"DL_NO_LIBS_ERROR_CONNECTING",noAccess:"DL_NO_LIBS_NO_ACCESS",noService:"DL_NO_LIBS_SERVICE_NOT_INSTALLED",quota:"DL_NO_LIBS_ERROR_SYNCING",server:"DL_SYNC_ERROR_SERVER",serviceError:"DL_NO_LIBS_SERVICE_NOT_RUNNING",syncDisabled:"DL_NO_LIBS_SYNC_DISABLED",updateClient:"DL_NO_LIBS_UPDATE_CLIENT",updateServer:"DL_NO_LIBS_UPDATE_SERVER"},s={fs:"DL_FS_ERROR",general:"DL_SYNC_ERROR"
,jsx:"DL_INIT_ERROR",library:"DL_SYNC_ERROR_LIBRARY",loggedOut:"DL_SYNC_LOGGED_OUT",network:"DL_SYNC_ERROR_CONNECTING",noAccess:"DL_SYNC_ERROR_NO_ACCESS",noService:"DL_SYNC_SERVICE_NOT_INSTALLED",quota:"DL_SYNC_ERROR_QUOTA_EXCEEDED",server:"DL_SYNC_ERROR_SERVER",serviceError:"DL_SYNC_SERVICE_NOT_RUNNING",syncDisabled:"DL_SYNC_DISABLED",updateClient:"DL_SYNC_UPDATE_CLIENT",updateServer:"DL_SYNC_UPDATE_SERVER"},o=["$window","$filter","$translate","ccLibraries","imsInterface","localSettings","metrics"
,"designLibraryManager","designLibraryUtils","designLibraryViewState","digestUtils",function(e,t,n,r,o,u,a,f,l,c,h){function v(n){var r=f.getCurrentLibraryCollection();if(r&&r.retryTime){var i=Math.max(0,r.retryTime-(new Date).valueOf());p.retryDuration=t("date")(i,"m:ss")}else p.retryDuration=undefined;if(!n||!d)p.retryDuration?d=e.setTimeout(function(){v(),h.triggerDigest()},1e3):d=undefined}function m(){p.state==="error"&&p.errorType==="network"?a.setEnvironment({offline:!0}):a.setEnvironment(
{offline:!1})}function g(e){var t=p.syncingLibrariesById[e];return t||(t={},p.syncingLibrariesById[e]=t,p.syncingLibraries.push(t)),t}function y(e){var t=p.syncingLibrariesById[e];if(t){delete p.syncingLibrariesById[e];var n=p.syncingLibraries.indexOf(t);n!==-1&&p.syncingLibraries.splice(n,1)}}function E(t){w&&(e.clearTimeout(w),w=undefined),t?b="success":b="error"}function S(t){if(w)return;b=undefined,w=e.setTimeout(function(){w=undefined,E(!1),t(),h.triggerDigest()},5e3)}function x(e){var t="getPrimarySyncError"
;return e[t]()}function T(){var e=f.getCurrentLibraryCollection();if(e&&e.commitError){p.state="error",p.errorType="fs";return}if(!f.isConnected()){p.state="error";var t=f.getServiceInfo()||{};t.updateRequired==="client"?(E(!0),p.errorType="updateClient"):t.updateRequired==="server"?(E(!0),p.errorType="updateServer"):f.isProcessInstalled()?(f.launchCCLibraryProcess(),b==="error"?p.errorType="serviceError":(p.state="loading",b==="success"&&S(T))):(E(!0),f.launchCCLibraryProcess(),p.errorType="noService"
),c.resetMode();return}if(!e&&!b){p.state="loading";return}E(!0);if(!e){p.state="error",p.errorType="loggedOut";return}var n=x(e);if(n&&n.code===r.errors.ACCESS_DENIED){p.state="error",p.errorType="noAccess";return}if(!f.syncingEnabled()){p.state="error",p.errorType="syncDisabled";return}p.state=e.syncState||"syncing",p.syncProgress=e.syncProgress,delete p.errorType;if(p.state==="syncing"){var i="getNewLibrarySyncProgress",s=e[i]();s.forEach(function(e){var t=g(e.id);t.state="downloading",t.progress=
e.progress}),e.libraries.forEach(function(e){if(!e.syncState){y(e.id);return}var t=g(e.id);t.library=e,t.truncatedName=l.truncateName(e.name,15),t.state=e.syncState,t.progress=e.syncProgress})}else p.syncingLibraries=[],p.syncingLibrariesById={};if(p.state==="error"){var o=x(e);if(o){switch(o.code){case r.errors.ACCESS_DENIED:p.errorType="noAccess";break;case r.errors.RETRYABLE_SERVER_ERROR:p.errorType="server";break;case r.errors.NETWORK_ERROR:case r.errors.LOGGED_OUT:p.errorType="network";break;
case r.errors.FS_ERROR:p.errorType="fs";break;case r.errors.EXCEEDS_QUOTA:p.errorType="quota"}if(o.libraryId&&!p.errorType){var u=e.getLibraryById(o.libraryId);u&&(p.errorType="library",p.library=u)}p.errorType||(p.errorType="general"),console.log(e.syncErrors)}v(!0)}}function N(){T(),m()}var p={state:"syncing",syncingLibraries:[],syncingLibrariesById:{}},d,b,w;f.addListener("libraryStatus",N),S(T),N(),this.getStatus=function(){return p},this.getLoadingErrorMessage=function(e){var t=i[e.errorType
]||i.general;return n.instant(t)},this.getFooterErrorMessage=function(e){var t=s[e.errorType]||i.general;return e.errorType==="library"?n.instant(t,{name:e.library.name}):n.instant(t)}}];t.attach=function(e){r.module(e).service("designLibraryStatus",o)}}),define("services/designlibrary/designLibraryUtils",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$q","fileUtils","csInterface","configuration","layerSelectionManager","metrics","$translate",function(
e,t,n,r,i,s,o){var u=function(r,i){var s=e.defer(),o={name:t.getTmpFileName()};return n.execApp("saveAssets",[o,r,i]).then(function(e){e==="undefined"?s.reject():s.resolve(JSON.parse(e))}),s.promise};this.checkDuplicates=function(e,t){return!1},this.generatePreview=function(t,n){var r=e.defer();return u(t,n).then(function(e){r.resolve(e)},function(e){r.reject()}),r.promise};var a=1073741824;this.checkFileSizes=function(e,r){var i=!1;return e.forEach(function(e){var n=t.statFile(e.path);n&&n.size>
a&&(i=!0)}),i?(r&&e.forEach(function(e){t.deleteFile(e.path)}),o("DL_ERROR_FILE_TOO_BIG").then(function(e){n.showError(e)}),!1):!0},this.checkFileSize=function(e,t){return this.checkFileSizes([{path:e}],t)},this.closeDocumentWithName=function(e){n.exec("CORE","closeDocument",[e])},this.setFocusToCanvas=function(){r.currentProduct.setFocusToCanvas()},this.reportApplyMetric=function(e,t,n){s.reportUseElement(e,t),n&&s.reportCreateLink(e.element,t)},this.canAddElement=function(e){var t=e&&e.elements
.length<1e3;return t};var f=function(e,t){var n;if(t!=="")n=t;else{var r=o.instant("DL_ARTWORK_LABEL"),i=new RegExp("^"+r+"\\s+(\\d+)$"),s=0;e.elements.forEach(function(e){var t=i.exec(e.name);if(t&&t[1]){var n=parseInt(t[1],10);n>s&&(s=n)}}),n=r+" "+(s+1)}return n};this.getCuratedName=f,this.getLayerName=function(t){var n=e.defer();return i.getLayerName().then(function(e){var r=f(t,e);n.resolve(r)}),n.promise},this.truncateName=function(e,t){return e.length<=t?e:e.slice(0,t)+"..."},this.deleteElements=
function(e,t){e&&t&&t.length>0&&(e.beginOperation(),t.forEach(function(t){e.removeElement(t)}),e.endOperation())}}];t.attach=function(e){r.module(e).service("designLibraryUtils",i)}}),define("services/designlibrary/designLibraryViewState",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["metrics","localSettings","designLibraryManager","configuration",function(e,t,n,r){function l(e,n){f[e]=n,t.setValue(e+"State",n)}function c(t,r){var i=n.getCurrentLibrary
();e.reportPanelEvent(t,{libraryID:i&&i.id,opType:r})}function h(e){var t=i[e];t&&(f.mode=e,f.enableMultiSelect=t.enableMultiSelect,f.enableContextMenu=t.enableContextMenu,f.elementTypeFilter=t.elementTypeFilter,f.modeParams={})}var i={normal:{enableMultiSelect:!0,enableContextMenu:!0},relink:{enableMultiSelect:!1,enableContextMenu:!1,elementTypeFilter:r.IMAGE_ELEMENT_TYPE}},s={name:["displayName","-index"],modified:["-modified","-index"]},o="-modified",u=t.getValue("sortState")||"modified",a=t.getValue
("viewState")||"grid",f={sort:u,view:a,mode:"normal",enableMultiSelect:!0,enableContextMenu:!0,elementTypeFilter:undefined,modeParams:{},sortFunction:s[u],librarySortFunction:o};this.getState=function(){return f},this.setSortState=function(e){l("sort",e),f.sortFunction=s[e],c("sortLibrary",e)},this.setViewState=function(e){l("view",e),c("changeLibraryView",e)},this.setRelinkMode=function(e){h("relink"),f.modeParams=e},this.resetMode=function(){f.mode!=="normal"&&h("normal")},this.getSortFunction=
function(e){return s[e]}}];t.attach=function(e){r.module(e).service("designLibraryViewState",i)}}),define("services/designlibrary/designLibraryDragUtils",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$q","fileUtils","configuration","layerSelectionManager","designLibraryManager","designLibraryElements","designLibrarySelection",function(e,t,n,r,i,s,o){var u=function(r){var s=r[0].name,o=s.substr(s.lastIndexOf(".")+1).toLowerCase(),u=[],a=i.getCurrentLibrary
();a.beginOperation();var f=function(e,t,n){return function(){e.updateContent(event.target.result,"binary",t).then(function(){n.resolve(e)})}},l;for(l=0;l<r.length;l++){var c=r[l].name;if(t.isUploadableFile(c)){var h=t.getFileNameWithoutExtension(c),p=c.substr(c.lastIndexOf(".")+1).toLowerCase(),d=a.createElement(h,n.IMAGE_ELEMENT_TYPE,undefined),v="primary",m=t.fileNameToContentType(c),g=d.createRepresentation(m,v),y=new FileReader,b=e.defer();y.onloadend=f(g,p,b),y.readAsBinaryString(r[l]),u.push
(b)}}e.all(u).then(function(){a.endOperation()})},a=function(e){var t;e.assetList.length>0&&(t=e.assetList[0].data);var n=i.getCurrentLibrary(),u=r.getLayerInfo(),a=s.getAddOperations(u,n),f,l;for(f=0;f<a.length;f++)if(a[f].dropSupport){l=a[f];break}if(l&&n){var c;n.categories.length>0&&(c=n.categories[0]),l.apply(n,c,t).then(function(e){o.setSelection(e,!0)})}};this.addElementsFromDropData=function(e){var t=e.data,n=e.files;t&&t.assetList?a(t):n&&u(n)}}];t.attach=function(e){r.module(e).service("designLibraryDragUtils"
,i)}}),define("services/designlibrary/main",["require","exports","module","./designLibraryCEPEventHandlers","./designLibraryContextMenu","./designLibraryElements","./designLibraryFlyoutMenu","./designLibraryManager","./designLibrarySelection","./designLibraryStatus","./designLibraryUtils","./designLibraryViewState","./designLibraryDragUtils"],function(e,t,n){"use strict";function r(t){e("./designLibraryCEPEventHandlers").attach(t),e("./designLibraryContextMenu").attach(t),e("./designLibraryElements"
).attach(t),e("./designLibraryFlyoutMenu").attach(t),e("./designLibraryManager").attach(t),e("./designLibrarySelection").attach(t),e("./designLibraryStatus").attach(t),e("./designLibraryUtils").attach(t),e("./designLibraryViewState").attach(t),e("./designLibraryDragUtils").attach(t)}return{attach:r}}),define("services/external/adobeStockLicensing",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i,s=["$q","$http","csInterface","imsInterface","configuration"
,"debugLog","metrics",function(e,t,n,r,i,s,o){function u(){return"https://"+r.getEnvironment().stockHost}this.serviceName="adobeStockLicensing",this.getUserQuota=function(a,f){var l=e.defer();return r.getAccessToken(a).then(function(e){if(e){var a=u()+i.STOCK_GET_USER_PROFILE_PATH;a=a.replace(/YYYY/,f);var c=n.getLocale();if(!c||c.length===0)c="en-US";a=a.replace(/ZZZZ/,c);var h={method:"GET",url:a,headers:{"x-api-key":r.getEnvironment().clientId,Authorization:"Bearer "+e}};o.addProductHeaders(h.
headers),t(h).success(function(e,t){l.resolve(e)}).error(function(e,t){s.log("Error "+t+": adobeStockLicensing.getUserQuota , result=\n"+(typeof e=="string"?e:JSON.stringify(e))),l.reject(t)})}},function(e){s.log("Error getting access token: adobeStockLicensing.getUserQuota , result="+(typeof e=="string"?e:JSON.stringify(e))),l.reject(401)}),l.promise},this.licenseImage=function(n,a){var f=e.defer();return r.getAccessToken(n).then(function(e){if(e){var n=u()+i.STOCK_LICENSE_PATH;n=n.replace(/ZZZZ/
,a);var l={method:"GET",url:n,headers:{"x-api-key":r.getEnvironment().clientId,Authorization:"Bearer "+e}};o.addProductHeaders(l.headers),t(l).success(function(e,t){f.resolve(e)}).error(function(e,t){s.log("Error "+t+": adobeStockLicensing.licenseImage , result=\n"+(typeof e=="string"?e:JSON.stringify(e))),f.reject(t)})}},function(e){s.log("Error getting access token: adobeStockLicensing.licenseImage , result="+(typeof e=="string"?e:JSON.stringify(e))),f.reject(401)}),f.promise},this.getImageState=
function(n,a){var f=e.defer();return r.getAccessToken(n).then(function(e){if(e){var n=u()+i.STOCK_INFO_PATH;n=n.replace(/ZZZZ/,a);var l={method:"GET",url:n,headers:{"x-api-key":r.getEnvironment().clientId,Authorization:"Bearer "+e}};o.addProductHeaders(l.headers),t(l).success(function(e,t){f.resolve(e)}).error(function(e,t){s.log("Error "+t+": adobeStockLicensing.getImageState , result=\n"+(typeof e=="string"?e:JSON.stringify(e))),f.reject(t)})}},function(e){s.log("Error getting access token: adobeStockLicensing.getImageState , result=\n"+
(typeof e=="string"?e:JSON.stringify(e))),f.reject(401)}),f.promise},this.notifyAbandonedTransaction=function(n,a,f){var l=e.defer();return r.getAccessToken(n).then(function(e){if(e){var n=u()+i.STOCK_ABANDON_TRANSACTION_PATH;n=n.replace(/YYYY/,a),n=n.replace(/ZZZZ/,f);var c={method:"GET",url:n,headers:{"x-api-key":r.getEnvironment().clientId,Authorization:"Bearer "+e}};o.addProductHeaders(c.headers),t(c).success(function(e,t){l.resolve(e)}).error(function(e,t){s.log("Error "+t+": adobeStockLicensing.notifyAbandonedTransaction , result=\n"+
(typeof e=="string"?e:JSON.stringify(e))),l.reject(t)})}},function(e){s.log("Error getting access token: adobeStockLicensing.notifyAbandonedTransaction , result="+(typeof e=="string"?e:JSON.stringify(e))),l.reject(401)}),l.promise}}];t.attach=function(e){r.module(e).service("adobeStockLicensing",s)}}),define("services/external/ccLibraryRestService",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i,s=["$q","$http","imsInterface","localSettings","ccLibraries"
,"debugLog","metrics",function(e,t,n,r,i,s,o){function u(){return"https://"+n.getEnvironment().assetsHost}this.serviceName="ccLibraryRestService",this.DEFAULT_RETRY_TIME=30,this.updateElementWithData=function(r,i,a,f,l){var c=e.defer();return n.getAccessToken(r).then(function(e){if(e){var r=u()+"/libraries/elements";r+="?data_field="+i+"%23"+a+"&data_value="+f;var h={method:"POST",url:r,headers:{"x-api-key":n.getEnvironment().clientId,"x-user-region":"US",Authorization:"Bearer "+e},data:JSON.stringify
(l)};o.addProductHeaders(h.headers),t(h).success(function(e,t,n,r){if(t===202){c.resolve(null);return}c.resolve(e)}).error(function(e,t){s.log("Error "+t+": ccLibraryRestService.updateElementWithData , result=\n"+(typeof e=="string"?e:JSON.stringify(e))),c.reject(t)})}}),c.promise}}];t.attach=function(e){r.module(e).service("ccLibraryRestService",s)}}),define("services/external/main",["require","exports","module","./adobeStockLicensing","./ccLibraryRestService"],function(e,t,n){"use strict";function r
(t){e("./adobeStockLicensing").attach(t),e("./ccLibraryRestService").attach(t)}return{attach:r}}),define("services/interface/adobeExchange",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=6e4,s="http://www.adobe.com/go/adobe_exchange_home_page",o=["configuration","coreSyncManager",function(e,t){var n=new AgoraLib,r=!1,o=!1,u=!1,a=[AgoraLib.status.perpetualPurchase.code,AgoraLib.status.trialPurchase.code,AgoraLib.status.subscriptionPurchase.code,AgoraLib.
status.free.code],f=function(){console.log("Error while registering with Adobe Exchange")},l=function(t){n.log("getPurchaseUrlResponseCallback received with result "+t.statusCode+", "+t.status+", "+t.response),u=!0,t.statusCode===AgoraLib.status.success.code?s=t.response:f(t)},c=function(t){n.log("createEntitlementResponseCallback received with result "+t.statusCode+", "+t.status+", "+t.response),o=!0,t.statusCode===AgoraLib.status.success.code||t.statusCode===AgoraLib.status.entitlementAlreadyCreated
.code?n.log("entitlement creation was successful"):t.statusCode===AgoraLib.status.updateAvailable.code?n.log("entitlement created but an update is available"):(n.log("something has gone wrong so retrieve purchase URL"),n.getPurchaseUrl(l),setTimeout(function(){u||(n.log("getPurchaseUrlResponseCallback request timed out"),f())},i))},h=function(t){n.log("isEntitledResponseCallback received with result "+t.statusCode+", "+t.status+", "+t.response),r=!0,a.indexOf(t.statusCode)>=0?n.log("User has an entitlement"
):(n.log("attempting to create entitlement"),n.createEntitlement(c),setTimeout(function(){o||(n.log("createEntitlementResponseCallback request timed out"),f())},i))};this.checkEntitlement=function(){n.log("Checking entitlement"),n.isEntitled(h),setTimeout(function(){r||(n.log("isEntitledResponseCallback request timed out"),f())},i)},this.init=function(){t.isCCAppRunning()&&this.checkEntitlement()}}];t.attach=function(e){r.module(e).service("adobeExchange",o)}}),define("services/interface/coreSyncManager"
,["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$q","$timeout","listenerUtils",function(e,t,n){function g(e){var t=VulcanInterface.getPayload(e),n=$.parseXML(t);return $(n)}function y(e,t){return e.find(t).text()}function b(e,t){return y(g(e),t)}function w(e){var n=new VulcanMessage(h);n.setPayload('<?xml version="1.0" encoding="utf-8"?><request><sync>on</sync><request-id>562567a8-684e-4456-bade-c985c066aebd</request-id></request>'),t(function(){VulcanInterface
.dispatchMessage(n)},e?0:5e3)}function E(){var e=new VulcanMessage(a);e.setPayload('<?xml version="1.0" encoding="utf-8"?><request><session_id>a9779289-fabb-4f71-86ff-cda02c10958e</session_id><version>1.0</version><type>DesignLibPlugin.QueryFileSyncStateRequest</type></request>'),VulcanInterface.dispatchMessage(e)}function S(){if(m){m=!1;var e=function(t){var n=b(t,"file_sync_state");VulcanInterface.removeMessageListener(a,e),n!=="normal"&&w()};VulcanInterface.addMessageListener(a,e),E()}}function x
(){VulcanInterface.addMessageListener(r,function(e){var t=g(e),n=y(t,"manifest_path"),r=y(t,"event");p.notifyNonAngular("manifestChange",r,n)}),VulcanInterface.addMessageListener(s,function(e){var t=b(e,"sign_on_state");t==="sign-out"?p.notifyNonAngular("signOut"):(p.notifyNonAngular("signIn"),S())}),VulcanInterface.addMessageListener(o,function(e){var t=b(e,"file_sync_state");t==="enabled"||t==="normal"?p.notifyNonAngular("notificationsEnabled"):p.notifyNonAngular("notificationsDisabled",t)}),VulcanInterface
.addMessageListener(u,function(e){p.notifyNonAngular("shutdown")}),VulcanInterface.addMessageListener(i,function(e){var t=b(e,"path");p.notifyNonAngular("libraryDeleted",t)})}function T(){VulcanInterface.addMessageListener(c,function(e){p.notifyNonAngular("signOut")})}var r=VulcanMessage.TYPE_PREFIX+"DesignLib.ManifestNotification",i=VulcanMessage.TYPE_PREFIX+"DesignLib.LibraryPathNotification",s=VulcanMessage.TYPE_PREFIX+"DesignLib.SignOnStateNotification",o=VulcanMessage.TYPE_PREFIX+"DesignLib.FileSyncStateNotification"
,u=VulcanMessage.TYPE_PREFIX+"DesignLib.ShutdownNotification",a=VulcanMessage.TYPE_PREFIX+"DesignLibPlugin.QueryFileSyncStateRequest",f=VulcanMessage.TYPE_PREFIX+"DesignLib.QueryFileSyncStateResponse",l=VulcanMessage.TYPE_PREFIX+"com.adobe.aam.AAMIMSStatus",c=VulcanMessage.TYPE_PREFIX+"com.adobe.aam.AAMSIGNOUTStatus",h=VulcanMessage.TYPE_PREFIX+"accc.files.setFilesSyncStatusRequest",p=n.addListenerManager(this,["manifestChange","notificationsEnabled","notificationsDisabled","signOut","signIn","shutdown"
,"libraryDeleted"]),d="creativecloud",v=1e4,m=!1;this.isCCAppInstalled=function(){return VulcanInterface.isAppInstalled(d)},this.isCCAppRunning=function(){return VulcanInterface.isAppRunning(d)},this.shouldLaunchCCApp=function(){return VulcanInterface.isAppInstalled(d)&&!VulcanInterface.isAppRunning(d)},this.launchCCApp=function(){VulcanInterface.isAppRunning(d)?w(!0):(m=!0,VulcanInterface.launchApp(d,!1,"--showwindow=false"))},this.getNotificationState=function(){var t=e.defer(),n=!1,r=0;if(VulcanInterface
.isAppRunning(d)){var i,s=function(e){var t=b(e,"file_sync_state");n||i(t)};i=function(e){VulcanInterface.removeMessageListener(f,s),n=!0,t.resolve({enabled:e==="normal",reason:e})},VulcanInterface.addMessageListener(f,s),E();var o=function(){n||(r++,r<3?(E(),window.setTimeout(o,v)):i("disabled"))};window.setTimeout(o,v)}else t.resolve({enabled:!1,reason:"turned_off"});return t.promise},this.initialize=function(){var t=e.defer();return x(),T(),t.resolve(!0),t.promise}}];t.attach=function(e){r.module
(e).service("coreSyncManager",i)}}),define("services/interface/csInterface",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$q","$window","$timeout","configuration",function(e,t,n,r){var i=new CSInterface,s=function(e){return e.indexOf("Error")===0||e==="EvalScript error."},o=function(t,r){var i=e.defer();return r=r||0,(new CSInterface).evalScript(t,function(e){s(e)?(console.log("Tried to execute: "+t),console.log("Failed with: "+e),r<2?n(function(){o(
t,r+1).then(function(e){i.resolve(e)},function(e){i.reject(e)})},50):i.reject(e)):i.resolve(e)}),i.promise},u=function(t,n){var i=e.defer();return r.nativeProxy.evalScript(t,n,function(e){s(e)?i.reject(e):i.resolve(e)}),i.promise};this.getPluginPath=function(){return i.getSystemPath(SystemPath.EXTENSION)},this.getUserDataPath=function(){return i.getSystemPath(SystemPath.USER_DATA)},this.getGlobalRoot=function(){return this.getUserDataPath()+r.localRoot},this.getLocalRoot=function(){return this.getGlobalRoot
()+this.getAppName()+"/"},this.hostEnvironment=i.hostEnvironment,this.getAppName=function(){return i.hostEnvironment.appName},this.getLocale=function(){var e=this.hostEnvironment.appUILocale||"en_US";return e.replace("_","-")};var a=function(e,t,n){n=n||[];var i=n.map(JSON.stringify).join(", ");if(r.isAirPanel)return u(t,i);var s="$._ext_"+e+"."+t+"("+i+")";return o(s)},f=function(e,t){return a(i.hostEnvironment.appName,e,t)},l=function(e){e.extensionId=r.EXTENSION_ID,i.dispatchEvent(e)},c=function(
e,t){i.addEventListener(e,t)};this.exec=a,this.execApp=f,this.evalScript=o,this.dispatchEvent=l,this.addEventListener=c,this.removeEventListener=function(e,t){i.removeEventListener(e,t)},this.launchInBrowser=function(e){t.cep.util.openURLInDefaultBrowser(e)},this.getSystemPath=function(e){return i.getSystemPath(e)},this.showError=function(e){return this.exec("CORE","showError",[e])},this.setPanelFlyoutMenu=function(e){return i.setPanelFlyoutMenu(e)},this.updatePanelMenuItem=function(e,t,n){return i
.updatePanelMenuItem(e,t,n)},this.setContextMenu=function(e,t){return i.setContextMenu(e,t)},this.getOSInformation=function(){return i.getOSInformation()},this.isWindowsOS=function(){return this.getOSInformation().indexOf("Windows")!==-1}}];t.attach=function(e){r.module(e).service("csInterface",i)}}),define("services/interface/imsInterface",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i="https://oobe.adobe.com/",s="openid,AdobeID,creative_cloud,creative_sdk,cc_private,sao.stock,sao.cce_private"
,o="com.adobe.csxs.events.internal.ims.FetchAccessToken",u=["$q","$timeout","csInterface","localSettings","listenerUtils","ccLibraries",function(e,t,n,r,i,u){function p(e,t){if(l!==e||c!==t)t&&(c=!0,l=!1),c||(l=e),f.notify("loginState")}function E(e){w.forEach(function(t){e?t.resolve(e):t.reject("LOGGED_OUT")}),w=[],g=!1}function S(e){b&&t.cancel(b),e&&e.data&&e.data.error==="ride_AdobeID_subs_actreq"?h=!1:h=!0;var n=e&&e.data&&e.data.access_token;E(n)}function x(){b=undefined,S()}function T(e,n)
{if(!e||e===""){E(undefined);return}var r=n.clientId,i=n.clientSecret;y||(y=a.imsConnectWithEndpoint(n.ims)),a.addEventListener(o,S),a.imsFetchAccessToken(y,r,i,e,"",s),b&&t.cancel(b),b=t(x,5e3)}var a=new IMSInterface,f=i.addListenerManager(this,["loginState"]),l=!0,c=!1,h=!0,d="production",v={staging:{label:"Staging",clientId:"ProjectCentralPanel4",clientSecret:"6930966b-7470-4ca0-a566-d433e27a70ee",storageHost:"cc-api-storage-stage.adobe.io",assetsHost:"cc-api-assets-stage.adobe.io",ccwebHost:"assets-stage.adobecc.com"
,ims:"ims-na1-stg1.adobelogin.com",stockHost:"staging-astock1.fotolia.net"},production:{label:"Production",clientId:"ProjectCentralPanel4",clientSecret:"a1972db8-1732-4876-b70c-709beee6ed3e",storageHost:"cc-api-storage.adobe.io",assetsHost:"cc-api-assets.adobe.io",ccwebHost:"assets.adobe.com",ims:"ims-na1.adobelogin.com",stockHost:"stock.adobe.com"}},m=function(){var e=u.getServiceInfo();return e&&e.environment?e.environment.toLowerCase():r.getDebugValue("currentEnvironment")||d};this.getEnvironment=
function(){var e=v[m()],t=r.getDebugValue("storageHost");return t&&(e.storageHost=t,e.overrides=["storageHost"]),e},this.isLoggedIn=function(){return l},this.setLoggedOut=function(){p(!1,!1)},this.isUserIdError=function(){return c},this.hasAccess=function(){return h},this.getUserID=function(){var t=e.defer();return n.execApp("getIMSUserID").then(function(e){p(e!==undefined&&e!=="",!1),c?t.resolve(undefined):t.resolve(e)},function(){p(!1,!0),t.resolve(undefined)}),t.promise};var g=!1,y,b,w=[];this
.getAccessToken=function(t){var n=e.defer();w.push(n);if(!g){g=!0,console.log("Environment is ",this.getEnvironment().label);var r=this;t?T(t,this.getEnvironment()):this.getUserID().then(function(e){T(e,r.getEnvironment())})}return n.promise}}];t.attach=function(e){r.module(e).service("imsInterface",u)}}),define("services/interface/metrics",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i="adbemprojectcentral.rebootprod2",s="adbemprojectcentral.rebootdev2"
,o="adbemdigitalmedia.rebootprod2",u="adbemdigitalmedia.rebootdev2",a="Library Action",f="Library Panel Action",l="LibraryAction",c="LibraryPanelAction",h=["$window","ccLibraries","configuration","csInterface","localSettings",function(e,t,n,h,p){var d=t.analyticsUtils,v=!1,m=!1,g,y={},b,w,E=function(e,t){v&&d&&d.reportUseElement(e,t)};this.reportUseElement=E;var S=function(e,t,n){if(v&&d){var r={};r.step=n,r.checkoutId=t,d.reportCheckoutElement(e,r)}};this.reportCheckoutElement=S;var x=function(e
,t){v&&d&&d.reportCreateLink(e,t)};this.reportCreateLink=x,this.reportShareElementLink=function(e){v&&d&&d.reportShareElementLink(e)},this.reportShareLibraryLink=function(e){v&&d&&d.reportShareLibraryLink(e)},this.reportInitialize=function(){if(!v)return;var e={},t="Home",i=[],s;m&&r.isFunction(n.currentProduct.reportEvent)&&n.currentProduct.reportEvent(t,e);if(b){b.contextData["adb.page.pageInfo.pageName"]=t,b.contextData["adb.user.profile.attributes."+c]=!0,b.contextData["adb.user.profile.attributes."+
c+"Description"]=t,b.contextData["adb.page.pageInfo.isSDKUtilized"]="Project Central",b.contextData["adb.page.pageInfo.namespace"]=n.currentProduct.config.analytics.namespace,b.contextData["adb.page.pageInfo.productCategory"]="desktop",b.contextData["adb.page.pageInfo.productVersion"]=y.version||"Unknown",b.contextData["adb.page.pageInfo.appId"]=y.product,b.contextData["adb.user.profile.profileId"]=y.userID||"Unknown",b.contextData["adb.user.profile.attributes.clientId"]=y.product,y.userID&&(b.visitorID=
y.userID),y.os&&(b.contextData["a.OSEnvironment"]=y.os),b.contextData["adb.page.pageInfo.language"]=h.getLocale(),b.contextData["adb.user.profile.attributes.pcOffline"]=y.offline?"Y":"N";for(s in b.contextData)b.contextData.hasOwnProperty(s)&&i.push("contextData."+s);b.trackOffline=!0,b.linkTrackVars=i.join(","),b.pageName=t,m&&b.t(),p.getDebugValue("logMetrics")&&console.info("Analytics:"+t+JSON.stringify(b.contextData))}},this.reportPanelEvent=function(e,t){this.reportEvent(e,t,!0)};var T=function(
e,t,i){if(!v)return;t=t||{},e!=="error"&&m&&r.isFunction(n.currentProduct.reportEvent)&&n.currentProduct.reportEvent(e,t);if(b){var s,o,u=[],h;o=i?c:l,s=i?f:a,b.contextData={},e==="error"?(b.contextData["adb.event.eventInfo.eventName"]="General Error",t.errorMessage&&(b.contextData["adb.event.eventInfo.eventAction"]=t.errorMessage,delete t.errorMessage)):(b.contextData["adb.event.eventInfo.eventName"]=s,b.contextData["adb.event.eventInfo.eventAction"]=e,b.contextData["adb.user.profile.attributes."+
o]=!0,b.contextData["adb.user.profile.attributes."+o+"Description"]=e);for(h in t)t.hasOwnProperty(h)&&(b.contextData["adb.user.profile.attributes."+h]=t[h]);b.contextData["a.action"]=s,b.contextData["adb.page.pageInfo.appId"]=y.product,b.contextData["adb.user.profile.profileId"]=y.userID||"Unknown",b.contextData["adb.user.profile.attributes.clientId"]=y.product,y.userID&&(b.visitorID=y.userID),b.contextData["adb.page.pageInfo.isSDKUtilized"]="Project Central",y.os&&(b.contextData["a.OSEnvironment"
]=y.os),b.contextData["adb.user.profile.attributes.pcOffline"]=y.offline?"Y":"N";for(h in b.contextData)b.contextData.hasOwnProperty(h)&&u.push("contextData."+h);b.trackOffline=!0,b.linkTrackVars=u.join(","),m&&b.tl(!0,"o",s),p.getDebugValue("logMetrics")&&console.info("Analytics:"+s+JSON.stringify(b.contextData))}};this.reportEvent=T;var N=function(e,t,n){var r=e+":"+(t||"");r&&r.length>255&&(r=r.substring(0,255)),T("error",{errorMessage:r},n)};this.reportError=N,e.onerror=function(e,t,n){N(t+"#"+
n,e,!0)},this.isEnabled=function(){return v},this.setEnabled=function(t){v=t||m,v?(e.isDev?g=u+","+s+","+n.currentProduct.config.analytics.devId:g=o+","+i+","+n.currentProduct.config.analytics.prodId,b=s_gi(g),b.ssl=!0):g=undefined,console.info("Analytics: "+v)},this.getState=function(){return g?g:"Disabled"};var C=this;this.init=function(){h.evalScript("$.os").then(function(e){C.setEnvironment({os:e})}),h.execApp("isAnalyticsEnabled").then(function(e){typeof e=="boolean"?m=e:typeof e=="string"?m=
e.toLowerCase()==="true":m=!1,console.log("Analytics opt-in status: "+m),C.setEnabled(m),p.getDebugValue("logMetrics")&&C.setEnabled(!0),t.setOption("SHARED_LOCAL_STORAGE_ANALYTICS",m)})},this.setEnvironment=function(e){e.product&&(y.product=e.product),e.productVersion&&(y.productVersion=e.productVersion),e.version&&(y.version=e.version),e.os&&(y.os=e.os),e.userID&&(y.userID=e.userID),e.offline!==undefined&&(y.offline=e.offline),e.imsClientID&&(y.imsClientID=e.imsClientID)},this.setDraggedElements=
function(e){w=e},this.getDraggedElements=function(e){return w},this.addProductHeaders=function(e){return e&&(e["X-Product"]=y.product+"/"+y.productVersion,e["X-Product-Location"]="libraries/"+(r.BUILT?y.version:"DEV")),e}}];t.attach=function(e){r.module(e).service("metrics",h)}}),define("services/interface/main",["require","exports","module","./adobeExchange","./coreSyncManager","./csInterface","./imsInterface","./metrics"],function(e,t,n){"use strict";function r(t){e("./adobeExchange").attach(t)
,e("./coreSyncManager").attach(t),e("./csInterface").attach(t),e("./imsInterface").attach(t),e("./metrics").attach(t)}return{attach:r}}),define("services/managers/documentWatcher",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=0,s=["$rootScope","csInterface","fileUtils",function(e,t,n){var r={},s=function(){var e="documentListener"+i;return i++,e},o=function(e){var t;if(e.fullPath){var r=n.statFile(e.fullPath);t=r&&r.mtime}var i=!e.mtime||!t||e.mtime.getTime
()!==t.getTime();return e.mtime=t,i},u=function(){Object.keys(r).forEach(function(n){var i=r[n];t.exec("CORE","isDocumentOpen",[i.fullPath]).then(function(t){if(t===undefined||t==="undefined")return;var n=JSON.parse(t),r=n.found,s=n.saved,u=!1,a=function(e){i.callback(e),u=!0};r?s&&o(i)&&a("saved"):a("closed"),u&&!e.$$phase&&e.$apply()})})},a=function(n){Object.keys(r).forEach(function(i){var s=r[i],u=n.data.substring(n.data.indexOf("<url>")+5,n.data.indexOf("</url>"));u=u.split("file://").join(""
);var a=s.tempFileId||s.path;if(u.indexOf(a)>0){var f=n.type!=="documentAfterDeactivate",l=n.type==="documentAfterSave",c=!1,h=function(e){s.callback(e),c=!0};f?l&&o(s)&&h("saved"):t.exec("CORE","isDocumentOpen",[s.fullPath]).then(function(e){if(e===undefined||e==="undefined")return;var t=JSON.parse(e);t||h("closed")}),c&&!e.$$phase&&e.$apply()}})},f=function(e){a(e)},l=function(e){a(e)},c=function(){var e=Object.keys(r).length;e>0?e===1&&(t.addEventListener("documentAfterSave",f),t.addEventListener
("documentAfterDeactivate",l)):e===0&&(t.removeEventListener("documentAfterSave",f),t.removeEventListener("documentAfterDeactivate",l))};this.startListening=function(e,t,n){var i=!1;Object.keys(r).forEach(function(e){r[e]&&r[e].fullPath===t&&(i=!0)});if(i)return undefined;var u=s(),a=e&&e.match(/^.*_([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}).*$/),f=a&&a[1],l={path:e,fullPath:t,tempFileId:f,callback:n,hasDocumentChanged:!1,previousChangedState:!1};return o(l),r[u
]=l,c(),u},this.stopListening=function(e){var t=r[e];t&&(delete r[e],c())},this.checkListenerExists=function(e,t){return r[e]?r[e].path===t.path&&r[e].callback===t.callback:!1}}];t.attach=function(e){r.module(e).service("documentWatcher",s)}}),define("services/managers/layerSelectionManager",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["csInterface","configuration","listenerUtils",function(e,t,n){function u(){i=!0,e.execApp("getLayerInfo").then(function(
e){i=!1;try{r=JSON.parse(e)}catch(t){r=undefined}o.notify("layerSelectionChanged",r)})}function l(){e.execApp("getCurrentState").then(function(e){a=undefined,f=!1;if(e&&e!=="undefined"){try{var t=JSON.parse(e);a=t.path,f=t.layerID!==-1}catch(n){console.log(n)}u()}})}var r,i=!1,s=!1,o=n.addListenerManager(this,["layerSelectionChanged"]),a,f=!1;this.handleSelectionChange=function(){s&&l()},this.startListening=function(){s=!0,l()},this.stopListening=function(){s=!1},this.getLayerName=function(){return e
.execApp("getLayerName")},this.getLayerInfo=function(){return r},this.requestUpdate=function(){i||u()},this.getCurrentDocumentName=function(){var e;try{a&&a.length>0&&(a.indexOf("/")>-1?e=a.substring(a.lastIndexOf("/")+1):e=a.substring(a.lastIndexOf("\\")+1))}catch(t){}return e},this.getCurrentDocumentPath=function(){return a},this.hasDocumentOpen=function(){return f}}];t.attach=function(e){r.module(e).service("layerSelectionManager",i)}}),define("services/managers/menuManager",["require","exports"
,"module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$translate","$rootScope","csInterface","listenerUtils",function(e,t,n,i){function a(e,t){var n="";Object.keys(e).forEach(function(t){e[t]!==undefined&&(n+=t+'="'+e[t]+'" ')});var r="";return t&&(r=u(t,!0)),"<MenuItem "+n+">"+r+"</MenuItem>"}var s=i.addListenerManager(this,["flyoutMenuClicked"]),o=function(t,n){return t=e.instant(t,n),t=t.replace(new RegExp("&","g"),"&amp;").replace(new RegExp('"',"g"),"&quot;").replace(new RegExp
("'","g"),"&apos;").replace(new RegExp("<","g"),"&lt;").replace(new RegExp(">","g"),"&gt;"),t},u;u=function(e,t){var n="";return e.forEach(function(e){e.divider?n+='<MenuItem Label="---"/>':n+=a({Id:e.menuId,Label:o(e.label,e.translationData),Checkable:!0,Checked:e.checked,Enabled:e.hasOwnProperty("enableMenu")?e.enableMenu:!0},e.menuItems)}),t||(n="<Menu>"+n+"</Menu>"),n};var f=function(e,t,n){return t=t||{},n=n||"MENU",e.forEach(function(e,r){var i=n+"_"+r;e.menuId=i,t[i]=e,e.menuItems&&f(e.menuItems
,t,i)}),t};this.setContextMenu=function(e){var r=f(e);n.setContextMenu(u(e),function(e){t.$apply(function(){r[e]&&r[e].onClick&&r[e].onClick()})})},window.oncontextmenu=function(){n.setContextMenu(u([]),r.noop)};var l;n.addEventListener("com.adobe.csxs.events.flyoutMenuClicked",function(e){var n=e.data.menuId;n&&l&&t.$apply(function(){l[n]&&l[n].onClick&&l[n].onClick()}),s.notify("flyoutMenuClicked",e)}),this.setFlyoutMenu=function(e){l=f(e),n.setPanelFlyoutMenu(u(e))}}];t.attach=function(e){r.module
(e).service("menuManager",i)}}),define("services/managers/tempFileManager",["require","exports","module","angular"],function(e,t,n){"use strict";var r=256,i=e("angular"),s=["$q","configuration","fileUtils",function(e,t,n){function o(e,s){var o=e.split("/").pop(),u=t.strTempFolder+"/",a="."+n.getFileNameExtension(o),f=n.getUniqueFileName();if(i.isString(s)){var l=u.length+f.length+a.length+1;r-l<s.length&&(s=s.substring(0,r-l)),f=n.curateFileName(s)+"_"+f}return u+f+a}function u(t,r){var i=e.defer
(),s=o(t,r);return n.copyFile(t,s,function(e,t){if(e){i.reject(e);return}i.resolve(s)}),i.promise}var s={};this.createTempFile=function(e,t){return t.getContentPath().then(function(t){var n=e.getReference();return s[n]&&s[n].path===t?s[n].tempPath:u(t,e.name).then(function(e){return s[n]={path:t,tempPath:e},e})})},this.updateTempFile=function(e,t,n){t.getContentPath().then(function(t){var r=e.getReference();s[r]={path:t,tempPath:n}})},this.deleteTempFile=function(e,t){n.deleteFile(t);var r=e.getReference
();s[r]&&s[r].tempPath===t&&delete s[r]}}];t.attach=function(e){i.module(e).service("tempFileManager",s)}}),define("services/managers/themeManager",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$window","colorUtils","listenerUtils","csInterface","configuration",function(e,t,n,r,i){var s=n.addListenerManager(this,["colorThemeChanged"]),o=function(e,t){function n(e,t){var n=isNaN(t)?e:e+t;return n<0?n=0:n>255&&(n=255),n=Math.round(n),n=n.toString(16),n
.length===1?"0"+n:n}var r="";return e&&(r=n(e.red,t)+n(e.green,t)+n(e.blue,t)),r},u,a,f;this.getBaseFontSize=function(){return u},this.getBaseFontFamily=function(){return a},this.getBackgroundColor=function(){return f},this.updateTheme=function(e){var t=e.panelBackgroundColor.color;f=o(t),u=e.baseFontSize,a=e.baseFontFamily;var n="css/main.css",r=i.currentProduct.config.themes[f];if(!r){var l,c;for(l=1;l<32;l+=1){c=o(t,l),r=i.currentProduct.config.themes[c];if(r)break}}r&&(n=i.currentProduct.config
.code+"/css/"+r+"/main.css");var h=document.getElementsByTagName("link"),p=h[h.length-1],d=p.cloneNode(!0),v=d.getAttribute("href"),m="";v.indexOf("//")!==-1&&(m=v.split("/").slice(0,3).join("/")+"/"),d.setAttribute("href",m+n),p.parentNode.appendChild(d),setTimeout(function(){p.parentNode.removeChild(p)},20),s.notify("colorThemeChanged")};var l=function(t){var n=JSON.parse(e.__adobe_cep__.getHostEnvironment()).appSkinInfo;this.updateTheme(n)}.bind(this);this.updateTheme(r.hostEnvironment.appSkinInfo
),r.addEventListener(CSInterface.THEME_COLOR_CHANGED_EVENT,l)}];t.attach=function(e){r.module(e).service("themeManager",i)}}),define("services/managers/versionManager",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$http","$q","csInterface","configuration","fileUtils",function(e,t,n,r,i){var s;this.getPluginVersion=function(){if(!s){var e=n.getPluginPath()+"/CSXS/manifest.xml",t=i.readFile(e,"utf8"),r=new DOMParser,o=r.parseFromString(t,"text/xml"),u=
o.getElementsByTagName("ExtensionManifest")[0];s=u.getAttribute("ExtensionBundleVersion")}return s}}];t.attach=function(e){r.module(e).service("versionManager",i)}}),define("services/managers/main",["require","exports","module","./documentWatcher","./layerSelectionManager","./menuManager","./tempFileManager","./themeManager","./versionManager"],function(e,t,n){"use strict";function r(t){e("./documentWatcher").attach(t),e("./layerSelectionManager").attach(t),e("./menuManager").attach(t),e("./tempFileManager"
).attach(t),e("./themeManager").attach(t),e("./versionManager").attach(t)}return{attach:r}}),define("services/utils/apiHttpInterceptor",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$q",function(t){return{request:function(t){var n=!!e.toUrl;return t.url.indexOf(".tmpl.html")===t.url.length-10&&n&&(t.url="js/"+t.url+"?cachebuster="+Math.random()),t},responseError:function(e){return t.reject(e)}}}];t.attach=function(e){r.module(e).config(["$httpProvider"
,function(e){e.interceptors.push(i)}])}}),define("services/utils/colorUtils",["require","exports","module","angular"],function(e,t,n){"use strict";function i(e){var t=Number(e).toString(16);return t="00".substr(0,2-t.length)+t,t}function s(e){var t=[e.red,e.green,e.blue].map(function(e){return e/=255,e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return t[0]*.2126+t[1]*.7152+t[2]*.0722}function o(e){return(299*e.red+587*e.green+114*e.blue)/1e3}var r=e("angular"),u=["configuration",function(e){this
.serviceName="colorUtils",this.rgbToHex=function(e){var t=e.red<<16|e.green<<8|e.blue,n="000000"+t.toString(16);return"#"+n.substr(n.length-6)},this.hexToRGB=function(e){return e=e.charAt(0)==="#"?e.substring(1):e,{red:parseInt(e.substring(0,2),16),green:parseInt(e.substring(2,4),16),blue:parseInt(e.substring(4,6),16)}},this.getBrightness=function(e){return(e.red+e.green+e.blue)/3},this.getBorder=function(e){var t=this.getBrightness(e);return t>225?"1px solid black":"none"},this.colorDataToHexValue=
function(t){Array.isArray(t)&&(t=this.getRGBRepresentation(t));var n=r.isFunction(e.currentProduct.config.rgbRound)?e.currentProduct.config.rgbRound:!1,i=n?n(t.value.r):t.value.r,s=n?n(t.value.g):t.value.g,o=n?n(t.value.b):t.value.b;return this.rgbToHex({red:i,green:s,blue:o})},this.getStringColorValue=function(e){var t;return e&&(e.mode==="CMYK"?t="C"+Math.round(e.value.c)+" M"+Math.round(e.value.m)+" Y"+Math.round(e.value.y)+" K"+Math.round(e.value.k):e.mode==="RGB"?t="R"+Math.round(e.value.r)+" G"+
Math.round(e.value.g)+" B"+Math.round(e.value.b):e.mode==="Lab"?t="L"+Math.round(e.value.l)+" A"+Math.round(e.value.a)+" B"+Math.round(e.value.b):e.mode==="HSB"?t="H"+Math.round(e.value.h)+" S"+Math.round(e.value.s)+" B"+Math.round(e.value.b):e.mode==="Gray"&&(t="G"+Math.round(e.value))),t},this.getRGBRepresentation=function(e){var t=e.filter(function(e){return e.mode==="RGB"});if(t.length>0)return t[0]}}];t.attach=function(e){r.module(e).service("colorUtils",u)}}),define("services/utils/debugLog"
,["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$window","csInterface","configuration","localSettings","fileUtils",function(e,t,n,i,s){function p(e){u.stat(a,function(t,n){if(!t&&n.size>o){u.rename(a,f,e);return}e(null)})}function d(){s.ensurePathExists(t.getLocalRoot(),function(e){if(e){c=undefined,console.log(e);return}p(function(e){if(e){c=undefined,console.log(e);return}var t=c;c=undefined,h=!0,u.appendFile(a,t,function(e){e&&console.log(e),h=!1,c&&
d()})})})}var o=5242880,u=nodeRequire("fs"),a=t.getLocalRoot()+"log.txt",f=t.getLocalRoot()+"log_prev.txt",l=t.getLocalRoot()+"log_jsx.txt",c,h=!1;this.init=function(){if(i.shouldWriteDebugLog()){t.exec("CORE","setLogPath",[l]),t.exec("CORE","writeToLog",["","--- Starting new session ---"]);if(r.BUILT){var e=this;console.log=function(t){var n=Array.prototype.slice.call(arguments).map(function(e){if(e!==null&&typeof e=="object")try{e=JSON.stringify(e)}catch(t){}return e}).join(" ");e.log(n)}}}else r
.BUILT&&(console.log=r.noop)},this.log=function(e){if(i.shouldWriteDebugLog()){var t=(new Date).toString()+" "+e+"\n";c?c+=t:(c=t,h||d())}},this.showLogFile=function(n){var r=t.isWindowsOS()?"start":"/usr/bin/open";e.cep.process.createProcess(r,n?l:a)}}];t.attach=function(e){r.module(e).service("debugLog",i)}}),define("services/utils/digestUtils",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$rootScope","$window",function(e,t){this.serviceName="digestUtils"
;var n=0,r,i=10;this.triggerDigest=function(){var s=this;if(e.$$phase)return;if(r)return;var o=(new Date).valueOf();if(o-n<i){r=t.setTimeout(function(){r=undefined,s.triggerDigest()},i);return}n=o,e.$apply()}}];t.attach=function(e){r.module(e).service("digestUtils",i)}}),define("services/utils/fileUtils",["require","exports","module","angular"],function(e,t,n){"use strict";function s(e){r.module(e).service("fileUtils",i)}var r=e("angular"),i=["$q","$location","configuration","ccLibraries",function(
e,t,n,r){function s(e,t,n){var s=i[e];s&&t.forEach(function(e){var t=s[e];if(!t){var i=r.utils.mimeTypeToExtensions(e);if(i&&i.length>0){var o=i[0];s[e]={exts:i,badge:o.toUpperCase(),name:o.toUpperCase(),usable:!0,editable:!!n}}}else t.usable=!0,t.editable=!!n})}function o(e,t,n){var s=i[e];s&&t.forEach(function(e){e=e.toLowerCase();var t=r.utils.extensionToMimeTypes(e);t.forEach(function(t){if(t){var r=s[t];r?(r.exts.indexOf(e)===-1&&r.exts.push(e),r.usable=!0,r.editable=!!n):s[t]={exts:[e],badge
:e.toUpperCase(),name:e.toUpperCase(),usable:!0,editable:!!n}}})})}this.serviceName="fileUtils";var i={"application/vnd.adobe.element.image+dcx":{"image/vnd.adobe.photoshop":{exts:["psd"],badge:"Ps",name:"Photoshop",label:"MIME_PHOTOSHOP_DOCUMENT",createdIn:"DL_APP_PHOTOSHOP"},"application/photoshop":{exts:["psd"],badge:"Ps",name:"Photoshop",label:"MIME_PHOTOSHOP_DOCUMENT",createdIn:"DL_APP_PHOTOSHOP"},"application/photoshop.large":{exts:["psb"],badge:"Ps",name:"Photoshop",label:"MIME_PHOTOSHOP_DOCUMENT"
,createdIn:"DL_APP_PHOTOSHOP"},"application/illustrator":{exts:["ai"],badge:"Ai",name:"Illustrator",label:"MIME_ILLUSTRATOR_DOCUMENT",createdIn:"DL_APP_ILLUSTRATOR"},"application/vnd.adobe.indesign-idms":{exts:["idms"],badge:"Id",name:"InDesign",label:"MIME_INDESIGN_SNIPPET",createdIn:"DL_APP_INDESIGN"},"application/pdf":{exts:["pdf"],badge:"PDF",name:"PDF",label:"MIME_PDF_IMAGE"},"image/png":{exts:["png"],badge:"PNG",name:"PNG",label:"MIME_PNG_IMAGE"},"image/jpeg":{exts:["jpeg"],badge:"JPEG",name
:"JPEG",label:"MIME_JPEG_IMAGE"},"image/jpg":{exts:["jpg"],badge:"JPG",name:"JPG",label:"MIME_JPEG_IMAGE"},"image/gif":{exts:["gif"],badge:"GIF",name:"GIF",label:"MIME_GIF_IMAGE"},"image/svg+xml":{exts:["svg"],badge:"SVG",name:"SVG",label:"MIME_SVG_IMAGE"},"image/vnd.adobe.shape+svg":{exts:["shape"],badge:"SVG",name:"Shape",label:"MIME_SHAPE_DOCUMENT",createdIn:"DL_APP_SHAPE"},"application/vnd.adobe.charts+zip":{exts:["zip"],badge:"SVG",name:"Chart",label:"MIME_CHARTS",createdIn:"DL_APP_CHARTS"}}
,"application/vnd.adobe.element.color+dcx":{"application/vnd.adobe.color+json":{exts:["ase"],name:"Color",label:"MIME_RGB_COLOR"}},"application/vnd.adobe.element.colortheme+dcx":{"application/vnd.adobe.colortheme+json":{exts:["ase"],name:"Color",label:"MIME_COLOR_THEME"}},"application/vnd.adobe.element.brush+dcx":{"application/vnd.adobe.scatter.brush+zip":{exts:["brush"],name:"Brush",label:"MIME_BRUSH"},"application/vnd.adobe.ribbon.brush+zip":{exts:["brush"],name:"Brush",label:"MIME_BRUSH"},"image/x-adobe-photoshop-brush"
:{exts:["abr"],name:"Brush",label:"MIME_BRUSH"},"application/vnd.adobe.vector.brush+zip":{exts:["brush"],name:"Brush",label:"MIME_BRUSH"}},"application/vnd.adobe.element.characterstyle+dcx":{"application/vnd.adobe.characterstyle+json":{exts:["style"],name:"CharacterStyle",label:"MIME_CHARACTER_STYLE"},"application/vnd.adobe.characterstyle+snippet":{exts:["idms"],name:"CharacterStyle",label:"MIME_CHARACTER_STYLE"}},"application/vnd.adobe.element.paragraphstyle+dcx":{"application/vnd.adobe.paragraphstyle+json"
:{exts:["style"],name:"ParagraphStyle",label:"MIME_PARAGRAPH_STYLE"},"application/vnd.adobe.paragraphstyle+snippet":{exts:["idms"],name:"ParagraphStyle",label:"MIME_PARAGRAPH_STYLE"}},"application/vnd.adobe.element.layerstyle+dcx":{"application/vnd.adobe.layerstyle":{exts:["asl"],name:"LayerStyle",label:"MIME_LAYER_STYLE"}},"application/vnd.adobe.element.look+dcx":{"application/vnd.adobe.cube+txt":{exts:["cube"],name:"Cube LUT",label:"MIME_CUBE_LUT"},"application/vnd.adobe.look+xml":{exts:["look"
],name:"Look",label:"MIME_LOOK"}}};this.mimeLookup=function(e,t){var n=i[e];return n?n[t]:undefined},this.getUsableTypes=function(e){var t=[],n=i[e],r;for(r in n)n.hasOwnProperty(r)&&n[r].usable&&t.push(r);return t},this.isTypeUsable=function(e){var t;for(t in i)if(i.hasOwnProperty(t)){var n=i[t];if(n&&n[e]&&n[e].usable)return!0}return!1},this.getEditableTypes=function(e){var t=[],n=i[e],r;for(r in n)n.hasOwnProperty(r)&&n[r].editable&&t.push(r);return t},this.isTypeEditable=function(e){var t;for(
t in i)if(i.hasOwnProperty(t)){var n=i[t];if(n&&n[e]&&n[e].editable)return!0}return!1},this.extendUsableTypes=function(e,t){s(e,t)},this.extendUsableTypesWithExtensions=function(e,t){o(e,t)},this.extendEditableTypes=function(e,t){s(e,t,!0)},this.extendEditableTypesWithExtensions=function(e,t){o(e,t,!0)},this.fileNameToContentType=function(e){if(e){var t=e.lastIndexOf(".")+1,n;if(t>0){n=t!==e.length?e.substr(t).toLowerCase().trim():"";var s;for(s in i)if(i.hasOwnProperty(s)){var o=i[s],u;for(u in 
o)if(o.hasOwnProperty(u)&&o[u].exts.indexOf(n)!==-1)return u}}var a=r.utils.extensionToMimeTypes(n);if(a&&a.length>0)return a[0]}return undefined},this.curateFileName=function(e){return e&&(e=e.replace(/(<|>|:|"|\/|\\|\||\?|\*|[\x00-\x1F])|\(|\)|\{|\}|\,| /g,"")),e},this.getTmpFileName=function(){return(new Date).valueOf()},this.getFileNameWithoutExtension=function(e){var t=e.indexOf(".");return e&&t!==-1&&(e=e.substr(0,t)),e},this.getFileNameExtension=function(e){var t=e.indexOf(".");return e&&t!==-1?
e.substr(t+1):""},this.isUploadableFile=function(e){var t=this.fileNameToContentType(e);return t&&i[n.IMAGE_ELEMENT_TYPE]&&i[n.IMAGE_ELEMENT_TYPE][t]?!0:!1};var u=nodeRequire("fs"),a=nodeRequire("path").join;this.existsFile=function(e){var t="existsSync";return u[t](e)},this.deleteFile=function(e){try{var t="unlinkSync";u[t](e)}catch(n){}},this.statFile=function(e){var t="statSync";return u[t](e)},this.readFile=function(e,t,n){if(!n){var r="readFileSync";return u[r](e,t)}u.readFile(e,t,n)},this.writeFile=
function(e,t,n,r){if(!r){var i="writeFileSync";return u[i](e,t,n)}u.writeFile(e,t,n,r)},this.getUniqueFileName=function(){return r.utils.generateUuid()},this.getTempPath=function(e){return e+"_"+r.utils.generateUuid()},this.copyFile=function(e,t,n){try{var r=this.getTempPath(t),i=u.createWriteStream(r),s=u.createReadStream(e),o=!1;s.on("end",function(){o||u.rename(r,t,n)}),s.on("error",function(e){o=!0,n(e)}),s.pipe(i)}catch(a){n(a)}},this.removeRecursive=function(t,n){var r=this,i=e.defer(),s=function(
t){var i=e.defer();return u.stat(t,function(e,s){e?i.reject(e):s.isDirectory()?i.resolve(r.removeRecursive(t,!0)):n?u.unlink(t,function(e){e?i.reject(e):i.resolve()}):i.resolve()}),i.promise};return u.readdir(t,function(r,o){if(r){i.reject(r);return}var f=[];o.forEach(function(e){var n=a(t,e);f.push(s(n))}),e.all(f).then(function(){n?u.rmdir(t,function(e){e?i.reject(e):i.resolve()}):i.resolve()},function(){i.reject()})}),i.promise},this.ensurePathExists=function(e,t){function n(e,t,r){var i=t.slice
(0,e).join("/"),s=function(i){e<t.length?n(e+1,t,r):r(null)};u.exists(i,function(e){e?s():u.mkdir(i,s)})}var r=e.split("/");n(2,r,t)}}];return{attach:s}}),define("services/utils/linkUtils",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$window","$http","csInterface","imsInterface","debugLog","configuration","metrics","designLibraryManager","versionManager",function(e,t,n,r,i,s,o,u,a){function f(e){var t="",n="",r;for(r in e)e.hasOwnProperty(r)&&(t=t+n+
r+"="+encodeURIComponent(e[r]),n="&");return t}function l(e,s,o,a){if(!s)n.launchInBrowser(e);else{var l=u.getCurrentLibraryCollection();r.getAccessToken(l&&l.userId).then(function(s){if(s){if(l&&l.cloudInfo&&l.cloudInfo.useJumpToken===!1){var u=e+(e.indexOf("?")===-1?"?":"&")+"accessToken="+encodeURIComponent(s);n.launchInBrowser(u);return}t({method:"POST",url:"https://"+r.getEnvironment().ims+"/ims/jumptoken/v1",data:f({bearer_token:s,target_client_id:o||"CreativeCloudWeb1",target_redirect_uri:
e,target_scope:a||"openid,creative_cloud,read_organizations,additional_info.screen_name,additional_info.secondary_email",target_response_type:"token"}),headers:{"Content-type":"application/x-www-form-urlencoded"}}).success(function(e,t){n.launchInBrowser(e.jump)}).error(function(t,n){i.log("error "+n+": jumpTo "+e+", result=\n"+(typeof t=="string"?t:JSON.stringify(t)))})}else n.launchInBrowser(e)},function(t){n.launchInBrowser(e)})}}function c(e){var t=u.getCurrentLibraryCollection(),n;t.cloudId===
s.CREATIVE_CLOUD_ID?n=r.getEnvironment().ccwebHost:n=t.cloudInfo.viewURI;if(!n)return undefined;var i=s.CCWEB_LIBRARIES_URL;return i=i.replace(/ZZZZ/,n),i=i.replace(/YYYY/,e.id),i}function h(e){var t=u.getCurrentLibraryCollection(),n;t.cloudId===s.CREATIVE_CLOUD_ID?n=r.getEnvironment().ccwebHost:n=t.cloudInfo.viewURI;if(!n)return undefined;var i=s.CCWEB_ELEMENT_URL;return i=i.replace(/ZZZZ/,n),i=i.replace(/YYYY/,e.library.id),i=i.replace(/XXXX/,e.id),i}function p(e){if(!e)return"";var t=[];return Object
.keys(e).forEach(function(n){t.push(n+"="+e[n])}),t.length===0?"":"?"+t.join("&")}function d(e){var t=n.getLocale().substring(3).toLowerCase();return s.AVAILABLE_HELP_LANGUAGES[t]?t="_"+t:t="",e+t}function v(){var e=r.getEnvironment().clientId+"%2F"+a.getPluginVersion(),t=n.getLocale();if(!t||t.length===0)t="en-US";return{"x-product":e,locale:t,sso_inbound:1}}function m(t){return e.isDev?"https://wiki.corp.adobe.com/display/ccprojects/Desktop+configuration+for+CC+Library+users":d(t)}this.openLibraryURL=
function(e){if(e){o.reportPanelEvent("viewLibraryOnWeb",{libraryID:e.id});var t=c(e);l(t,!0)}},this.openElementURL=function(e,t,n){if(e){o.reportPanelEvent("viewElementOnWeb",{libraryID:e.library.id,elementID:e.id});var r=n||{};t&&(r.section=t);var i=h(e)+p(r);l(i,!0)}},this.openCollaborateURL=function(e){if(e){o.reportPanelEvent("shareLibraryInitiate",{libraryID:e.id});var t=c(e)+p({dialog:"collaborate"});l(t,!0)}},this.openHelpURL=function(){o.reportPanelEvent("showTutorial");var e=d(s.LEARN_MORE_URL_ROOT
);l(e,!1)},this.openServiceErrorURL=function(){o.reportPanelEvent("serviceErrorHelp");var e=d(s.SERVICE_ERROR_URL_ROOT);l(e,!1)},this.openInstallCCAppURL=function(){o.reportPanelEvent("installCCApp");var e=m(s.INSTALL_CC_APP_URL_ROOT);l(e,!1)},this.openUpdateCCAppURL=function(){o.reportPanelEvent("updateCCApp");var e=m(s.UPDATE_CC_APP_URL_ROOT);l(e,!1)},this.openUpdateCCLibrariesURL=function(){o.reportPanelEvent("updateCCLibraries");var e=m(s.UPDATE_CC_LIBRARIES_URL_ROOT);l(e,!1)},this.openShareLibraryLinkURL=
function(e){if(e){o.reportShareLibraryLink(e);var t=c(e)+p({dialog:"share"});l(t,!0)}},this.openShareElementLinkURL=function(e){if(e){o.reportShareElementLink(e);var t=h(e)+p({dialog:"share"});l(t,!0)}},this.getStockURL=function(){return"https://"+r.getEnvironment().stockHost},this.launchStockSite=function(){var e=this.getStockURL()+p(v());l(e,!0,s.STOCK_CLIENT_ID,s.STOCK_TARGET_SCOPE)},this.launchLicenseURL=function(e){l(e,!1)},this.launchFindSimilarURL=function(e){var t=v();t.similia_id=e;var n=
this.getStockURL()+s.STOCK_FIND_SIMILAR_PATH+p(t);l(n,!0,s.STOCK_CLIENT_ID,s.STOCK_TARGET_SCOPE)}}];t.attach=function(e){r.module(e).service("linkUtils",i)}}),define("services/utils/listenerUtils",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["digestUtils",function(e){this.addListenerManager=function(t,n){function i(e){if(r[e]){var t=Array.prototype.slice.call(arguments,1),n=[];r[e].forEach(function(e){e.apply(e,t),e.isOneTime||n.push(e)}),r[e]=n}}function s
(){var t=arguments;i.apply(i,t),e.triggerDigest()}if(!t||!n)throw new Error("Invalid arguments");var r={};return n.forEach(function(e){r[e]=[]}),t.addListener=function(e,t,n){if(!r[e])throw new Error("Invalid listener event: "+e);r[e].push(t),n&&(t.isOneTime=!0)},t.removeListener=function(e,t){if(!r[e])throw new Error("Invalid listener event: "+e);var n=r[e].indexOf(t);n!==-1&&r[e].splice(n,1)},t.addScopedListener=function(e,n,r,i){t.addListener(n,r,i),e.$on("$destroy",function(){t.removeListener
(n,r)})},{notify:i,notifyNonAngular:s}}}];t.attach=function(e){r.module(e).service("listenerUtils",i)}}),define("services/utils/mediator",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$rootScope",function(e){function t(t){var n=[];this.destroy=function(){n.forEach(function(e){e()}),n=[]},t.$on("$destroy",this.destroy),this.emit=function(){e.$emit.apply(e,arguments)},this.on=function(t,r){n.push(e.$on(t,r))},this.onOnce=function(t,n){var r,i=function(
){r(),n.apply(null,arguments)};r=e.$on(t,i)},this.bind=function(r,i){i=i||r,n.push(e.$watch(r,function(e){t[i]=e}))},this.share=function(r,i){i=i||r;var s=t.$watch(r,function(t){e[i]=t});n.push(function(){s(),delete e[i]})}}this.register=function(e){return new t(e)},this.emit=function(){e.$emit.apply(e,arguments)}}];t.attach=function(e){r.module(e).service("mediator",i)}}),define("services/utils/recursionHelper",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"
),i=["$compile","$document",function(e){this.serviceName="recursionHelper",this.compile=function(t){var n=t.clone();t.contents().remove();var r;return function(t,i){r||(r=e(n.contents())),r(t,function(e){i.empty&&i.empty(),i.append(e)})}}}];t.attach=function(e){r.module(e).service("recursionHelper",i)}}),define("services/utils/tether",["require","exports","tether"],function(e,t,n){"use strict";var r=["$compile","$rootScope","$window","$animate","$controller","$timeout","$q","$http","$templateCache"
,"digestUtils",function(e,t,r,i,s,o,u,a,f,l){return function(o){function w(){b=new n(d({element:v[0]},o.tether))}function x(){return b&&b.enabled}function T(){if(o.element){v.addClass("hidden");return}x()?i.leave(v,function(){v=null}):v=null,m&&(m.$destroy(),m=undefined)}function N(){b.destroy(),v&&!o.element?i.leave(v):v.addClass("hidden"),l.triggerDigest()}function C(e){var t=e.target;if(!v||y===v[0])return;while(t.parentElement!==null){if(t.parentElement===v[0])return;t=t.parentElement}return g
.off("click",C),N()}function k(t,n,u){u&&(m&&(m.$destroy(),m=undefined),v=null);if(!v){o.element?v=o.element.html(t.trim()):v=angular.element(t.trim()),m=m||p.$new(),n&&(m.$locals=n);var a;o.controller&&(a=s(c,{$scope:m})),h&&(m[h]=a),e(v)(m)}else n&&(m.$locals=n);return r.setTimeout(function(){o.element?v.removeClass("hidden"):i.enter(v,g),w(),b.position(),o.leaveOnBlur&&g.on("click",C),l.triggerDigest()}),v}function L(e,t){var n=u.defer();return E.then(function(r){n.resolve(k(r,e,t))}),n.promise
}function A(){v&&(i.move(v,g),w())}if(!(!o.template^!o.templateUrl))throw new Error("Expected one of either `template` or `templateUrl`");o.tether=o.tether||{};var c=o.controller||angular.noop,h=o.controllerAs,p=o.parentScope||t,d=angular.extend,v=null,m,g=angular.element(r.document.body),y=o.tether.target||g;o.tether.target=y;var b,E;if(o.template){var S=u.defer();S.resolve(f.get(o.template)||o.template),E=S.promise}else E=a.get(o.templateUrl,{cache:f}).then(function(e){return e.data});return{enter
:L,leave:N,destroy:T,position:A,isActive:x,tether:E,config:o.tether}}}];t.attach=function(e){angular.module(e).factory("Tether",r)}}),define("services/utils/adobeStockUtils",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["configuration","debugLog","imsInterface","listenerUtils","adobeStockLicensing","ccLibraryRestService","ccLibraries","metrics",function(e,t,n,r,i,s,o,u){function p(e,t){!t||t===404||t===408||t===500||t===502||t===503?a.notify("stockPurchaseError"
,e,"DL_STOCK_PURCHASE_SERVICE_UNAVAILABLE_ERROR"):a.notify("stockPurchaseError",e,"DL_STOCK_PURCHASE_UNKNOWN_ERROR")}function d(n){var r=c(n);i.licenseImage(n.library.collection.userId,r.content_id).then(function(i){var o=i&&i.contents&&i.contents[r.content_id],c=o&&o.purchase_details,h=c&&c.state,p=i&&i.member&&i.member.stock_id;if(!h){u.reportCheckoutElement(n,l[r.content_id],"complete;error"),delete l[r.content_id],a.notify("stockPurchaseError",n,"DL_STOCK_PURCHASE_UNKNOWN_ERROR");return}u.reportCheckoutElement
(n,l[r.content_id],"complete;"+h),delete l[r.content_id];if(h==="just_purchased"||h==="purchased"){var d={};d.content_id=r.content_id,d.state=e.STOCK_STATE_PURCHASED,p&&(d.stock_id=p.toString()),d.license=c.license;var v={type:n.type,representations:[{source:{href:c.url}}]};v.representations[0][e.STOCK_NAMESPACE+"#"+e.STOCK_DATA_KEY]=d,s.updateElementWithData(n.library.collection.userId,e.STOCK_NAMESPACE,e.STOCK_DATA_KEY+".content_id",r.content_id,v).then(function(e){e&&(delete f[r.content_id],a.
notify("stockPurchaseComplete",n))},function(e){t.log("Failed to update elements after stock purchase, status: "+e),delete f[r.content_id],a.notify("stockPurchaseError",n,"DL_STOCK_PURCHASE_UNKNOWN_ERROR")})}else h!=="not_possible"&&t.log("Unexpected state in response from Adobe Stock licensing service: "+h),delete f[r.content_id],a.notify("stockPurchaseComplete",n,c.url)},function(e){u.reportCheckoutElement(n,l[r.content_id],"complete;error"),delete f[r.content_id],delete l[r.content_id],p(n,e)}
),f[r.content_id]=!0,a.notify("stockPurchasePending",n)}var a=r.addListenerManager(this,["confirmStockPurchase","stockPurchaseComplete","stockPurchasePending","stockPurchaseError"]),f={},l={},c=function(t){var n=t.getPrimaryRepresentation(),r=n&&n.getValue(e.STOCK_NAMESPACE,e.STOCK_DATA_KEY);return r},h=function(t,n){if(t.type===e.IMAGE_ELEMENT_TYPE){var r=t.getPrimaryRepresentation();r.setValue(e.STOCK_NAMESPACE,e.STOCK_DATA_KEY,n)}};this.getStockData=c,this.setStockData=h,this.isStockAsset=function(
e){var t=c(e);return t!==undefined},this.isLicensed=function(t){var n=c(t);return n&&n.state===e.STOCK_STATE_PURCHASED?!0:!1},this.licenseImage=function(e){var t=c(e);l[t.content_id]=o.utils.generateUuid(),u.reportCheckoutElement(e,l[t.content_id],"right click;yes"),i.getUserQuota(e.library.collection.userId,t.content_id).then(function(n){var r=n&&n.purchase_options,i=r&&r.state,s=r&&r.message,o=r&&r.url;u.reportCheckoutElement(e,l[t.content_id],"user quota;"+i);if(i==="possible"||i==="overage"){
a.notify("confirmStockPurchase",s,e,undefined,i,l[t.content_id]);return}if(i==="not_possible")if(s||o){a.notify("confirmStockPurchase",s,e,o,i,l[t.content_id]);return}a.notify("stockPurchaseError",e,"DL_STOCK_PURCHASE_UNKNOWN_ERROR")},function(t){p(e,t)})},this.purchaseLicenseForImage=function(e){d(e)},this.cancelLicenseImage=function(e,n){var r=c(e);u.reportCheckoutElement(e,l[r.content_id],"cancel;yes"),i.notifyAbandonedTransaction(e.library.collection.userId,r.content_id,n).then(function(e){delete 
l[r.content_id]},function(e){t.log("Failed to notify of abandoned stock license transaction, status: "+e)})},this.getStockId=function(e){var t=c(e);return t?String(t.content_id):null},this.isElementPendingPurchase=function(t){var n=c(t);if(n&&f[n.content_id]){if(n.state!==e.STOCK_STATE_PURCHASED)return!0;delete f[n.content_id]}return!1}}];t.attach=function(e){r.module(e).service("adobeStockUtils",i)}}),define("services/utils/importExport",["require","exports","module","angular"],function(e,t,n){"use strict"
;var r=e("angular"),i=["$q","csInterface","designLibraryManager",function(e,t,n){function l(e){r[i](e)&&(r[s](e).forEach(function(t,n){var i=e+"/"+t;r[u](i).isDirectory()?l(i):r[a](i)}),r[o](e))}function c(t,n){var i=[],s=e.defer();try{l(t),r.mkdir(t,function(o){try{if(o){s.reject(o);return}n.elements.forEach(function(n){n.representations.forEach(function(n){if(n.contentPath){var o=n.contentPath,u=o.split(/\//),a=u[u.length-1],f=t+a;n.contentPath=a;var l=e.defer();i.push(l.promise),r.readFile(o,function(
e,t){if(e){s.reject(e);return}r.writeFile(f,t,function(e){if(e){s.reject(e);return}l.resolve()})})}})}),r[f](t+"library.txt",JSON.stringify(n,undefined,2)),s.resolve(e.all(i))}catch(u){s.reject(u)}})}catch(o){s.reject(o)}return s.promise}function h(e){var n=t.getGlobalRoot(),r;t.isWindowsOS()?r=/^.\:\/Users\/[^\/]+\//:r=/^\/Users\/[^\/]+\//;var i=n.match(r);if(i){var s=i[0];e=e.replace(/^~\//,s)}return e}function p(e,n){t.evalScript("$._ext_CORE.chooseFolder()").then(function(t){var r=h(decodeURIComponent
(t))+"/",i=e.name.replace(/[<>:"\/\\|?*\x00-\x1F]/g,"_").trim();if(i===""||i==="."||i==="..")i="Library";n(r+i+"/")})}function d(e){t.evalScript("$._ext_CORE.chooseFolder()").then(function(t){t==="null"?e():e(h(decodeURIComponent(t))+"/")})}var r=nodeRequire("fs"),i="existsSync",s="readdirSync",o="rmdirSync",u="statSync",a="unlinkSync",f="writeFileSync";this.replaceTilde=function(e){return h(e)},this.extractLibraryData=function(t){var n=[],r={created:t.created,id:t.id,modified:t.modified,name:t.name
,elements:[]};t.elements.forEach(function(t){var i={created:t.created,id:t.id,modified:t.modified,name:t.name,type:t.type,representations:[]};t.representations.forEach(function(t){var r={contentLength:t.getContentLength(),height:t.height,id:t.id,isFullSize:t.isFullSize,relationship:t.relationship,type:t.type,width:t.width},s=t.getValues();s.length>0&&(r.values=s);var o=e.defer();n.push(o.promise),t.getContentPath().then(function(e){r.contentPath=e,o.resolve()}),i.representations.push(r)}),r.elements
.push(i)});var i=e.defer();return e.all(n).then(function(){i.resolve(r)}),i.promise},this.exportLibrary=function(e){var t=this;p(e,function(n){t.extractLibraryData(e).then(function(e){c(n,e).then(function(e){window.alert("Created "+n)},function(e){window.alert("Problem writing "+n+"\n\n"+e)})})})},this.importLibrary=function(){d(function(t){if(!t)return;r.readFile(t+"library.txt","utf8",function(r,i){if(r){window.alert("Problem reading library\n\n"+r);return}try{var s=JSON.parse(i),o=n.getCurrentLibraryCollection
(),u=o.createLibrary(s.name);if(!u){window.alert('Could not create library "'+s.name+'"');return}n.setCurrentLibrary(u),u.beginOperation();var a=[];s.elements.forEach(function(n){function i(n){console.log("createRepresentation "+n.type+", "+n.relationship);var i=r.createRepresentation(n.type,n.relationship);n.values&&n.values.forEach(function(e){i.setValue(e.namespace,e.key,e.value)}),n.contentLength&&(i.contentLength=n.contentLength);if(n.contentPath){var s=e.defer();a.push(s.promise),i.updateContentFromPath
(t+n.contentPath,!1,function(e){e?s.reject(e):(n.height&&(i.height=n.height),n.width&&(i.width=n.width),s.resolve())})}}console.log("createElement "+(n.name||"<none>")+", "+n.type);var r=u.createElement(n.name,n.type);n.representations.forEach(function(e){e.relationship==="primary"&&i(e)}),n.representations.forEach(function(e){e.relationship!=="primary"&&i(e)})}),e.all(a).then(function(){u.endOperation(),window.alert('Created "'+s.name+'"\n\n')},function(e){u.endOperation(),window.alert('Could not create library "'+
s.name+'"\n\n'+e)})}catch(f){window.alert("Problem importing library\n\n"+f)}})})}}];t.attach=function(e){r.module(e).service("importExport",i)}}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("jszip",[],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.JSZip=e()}}(function(){return function e(t,n,r){function i(o,u){if(!n[o]){if(!t
[o]){var l="function"==typeof require&&require;if(!u&&l)return l(o,!0);if(s)return s(o,!0);throw new Error("Cannot find module '"+o+"'")}var h=n[o]={exports:{}};t[o][0].call(h.exports,function(e){var n=t[o][1][e];return i(n?n:e)},h,h.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,i,s,o,u
,a,f="",l=0;l<e.length;)t=e.charCodeAt(l++),n=e.charCodeAt(l++),i=e.charCodeAt(l++),s=t>>2,o=(3&t)<<4|n>>4,u=(15&n)<<2|i>>6,a=63&i,isNaN(n)?u=a=64:isNaN(i)&&(a=64),f=f+r.charAt(s)+r.charAt(o)+r.charAt(u)+r.charAt(a);return f},n.decode=function(e){var t,n,i,s,o,u,a,f="",l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<e.length;)s=r.indexOf(e.charAt(l++)),o=r.indexOf(e.charAt(l++)),u=r.indexOf(e.charAt(l++)),a=r.indexOf(e.charAt(l++)),t=s<<2|o>>4,n=(15&o)<<4|u>>2,i=(3&u)<<6|a,f+=String.fromCharCode(
t),64!=u&&(f+=String.fromCharCode(n)),64!=a&&(f+=String.fromCharCode(i));return f}},{}],2:[function(e,t){"use strict";function n(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}n.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},t.exports=n},{}],3:[function(e,t,n){"use strict";n.STORE={magic:"\0\0",compress:function(e){return e},uncompress:function(e){return e},compressInputType:null,uncompressInputType
:null},n.DEFLATE=e("./flate")},{"./flate":8}],4:[function(e,t){"use strict";var n=e("./utils"),r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629
,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731
,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945
,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366
,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612
,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];t.exports=function(e,t){if("undefined"==typeof e||!e.length)return 0;var i="string"!==n.getTypeOf(e);"undefined"==typeof t&&(t=0);var s=0,o=0,u=0;t=-1^t;for(var a=0,f=e.length;f>a;a++)u=i?
e[a]:e.charCodeAt(a),o=255&(t^u),s=r[o],t=t>>>8^s;return-1^t}},{"./utils":21}],5:[function(e,t){"use strict";function n(){this.data=null,this.length=0,this.index=0}var r=e("./utils");n.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<e||0>e)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+
e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1)}},t.exports=n},{"./utils":21}],6:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,
n.dir=!1,n.createFolders=!1,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],7:[function(e,t,n){"use strict";var r=e("./utils");n.string2binary=function(e){return r.string2binary(e)},n.string2Uint8Array=function(e){return r.transformTo("uint8array",e)},n.uint8Array2String=function(e){return r.transformTo("string",e)},n.string2Blob=function(e){var t=r.transformTo("arraybuffer",e);return r.arrayBuffer2Blob(t)},n.arrayBuffer2Blob=
function(e){return r.arrayBuffer2Blob(e)},n.transformTo=function(e,t){return r.transformTo(e,t)},n.getTypeOf=function(e){return r.getTypeOf(e)},n.checkSupport=function(e){return r.checkSupport(e)},n.MAX_VALUE_16BITS=r.MAX_VALUE_16BITS,n.MAX_VALUE_32BITS=r.MAX_VALUE_32BITS,n.pretty=function(e){return r.pretty(e)},n.findCompression=function(e){return r.findCompression(e)},n.isRegExp=function(e){return r.isRegExp(e)}},{"./utils":21}],8:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof 
Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako");n.uncompressInputType=r?"uint8array":"array",n.compressInputType=r?"uint8array":"array",n.magic="\b\0",n.compress=function(e,t){return i.deflateRaw(e,{level:t.level||-1})},n.uncompress=function(e){return i.inflateRaw(e)}},{pako:24}],9:[function(e,t){"use strict";function n(e,t){return this instanceof n?(this.files={},this.comment=null,this.root="",e&&this.load(e,t),void (this.clone=function(){var e=new n;for(var t in this)"function"!=typeof 
this[t]&&(e[t]=this[t]);return e})):new n(e,t)}var r=e("./base64");n.prototype=e("./object"),n.prototype.load=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.utils=e("./deprecatedPublicUtils"),n.base64={encode:function(e){return r.encode(e)},decode:function(e){return r.decode(e)}},n.compressions=e("./compressions"),t.exports=n},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(e,t){"use strict";var n=
e("./base64"),r=e("./zipEntries");t.exports=function(e,t){var i,s,o,u;for(t=t||{},t.base64&&(e=n.decode(e)),s=new r(e,t),i=s.files,o=0;o<i.length;o++)u=i[o],this.file(u.fileName,u.decompressed,{binary:!0,optimizedBinaryString:!0,date:u.date,dir:u.dir,comment:u.fileComment.length?u.fileComment:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:t.createFolders});return s.zipComment.length&&(this.comment=s.zipComment),this}},{"./base64":1,"./zipEntries":22}],11:[function(
e,t){(function(e){"use strict";t.exports=function(t,n){return new e(t,n)},t.exports.test=function(t){return e.isBuffer(t)}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],12:[function(e,t){"use strict";function n(e){this.data=e,this.length=this.data.length,this.index=0}var r=e("./uint8ArrayReader");n.prototype=new r,n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.index,this.index+e);return this.index+=e,t},t.exports=n},{"./uint8ArrayReader":18}],13:[function(
e,t){"use strict";var n=e("./support"),r=e("./utils"),i=e("./crc32"),s=e("./signature"),o=e("./defaults"),u=e("./base64"),a=e("./compressions"),f=e("./compressedObject"),l=e("./nodeBuffer"),c=e("./utf8"),h=e("./stringWriter"),p=e("./uint8ArrayWriter"),d=function(e){if(e._data instanceof f&&(e._data=e._data.getContent(),e.options.binary=!0,e.options.base64=!1,"uint8array"===r.getTypeOf(e._data))){var t=e._data;e._data=new Uint8Array(t.length),0!==t.length&&e._data.set(t,0)}return e._data},v=function(
e){var t=d(e),i=r.getTypeOf(t);return"string"===i?!e.options.binary&&n.nodebuffer?l(t,"utf-8"):e.asBinary():t},m=function(e){var t=d(this);return null===t||"undefined"==typeof t?"":(this.options.base64&&(t=u.decode(t)),t=e&&this.options.binary?A.utf8decode(t):r.transformTo("string",t),e||this.options.binary||(t=r.transformTo("string",A.utf8encode(t))),t)},g=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=
n.dosPermissions,this._data=t,this.options=n,this._initialMetadata={dir:n.dir,date:n.date}};g.prototype={asText:function(){return m.call(this,!0)},asBinary:function(){return m.call(this,!1)},asNodeBuffer:function(){var e=v(this);return r.transformTo("nodebuffer",e)},asUint8Array:function(){var e=v(this);return r.transformTo("uint8array",e)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var y=function(e,t){var n,r="";for(n=0;t>n;n++)r+=String.fromCharCode(255&e),e>>>=8;return r},b=function(
){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&"undefined"==typeof n[t]&&(n[t]=arguments[e][t]);return n},w=function(e){return e=e||{},e.base64!==!0||null!==e.binary&&void 0!==e.binary||(e.binary=!0),e=b(e,o),e.date=e.date||new Date,null!==e.compression&&(e.compression=e.compression.toUpperCase()),e},E=function(e,t,n){var i,s=r.getTypeOf(t);if(n=w(n),"string"==typeof n.unixPermissions&&(n.unixPermissions=parseInt(n.unixPermissions,8)),n.unixPermissions&&16384&
n.unixPermissions&&(n.dir=!0),n.dosPermissions&&16&n.dosPermissions&&(n.dir=!0),n.dir&&(e=x(e)),n.createFolders&&(i=S(e))&&T.call(this,i,!0),n.dir||null===t||"undefined"==typeof t)n.base64=!1,n.binary=!1,t=null,s=null;else if("string"===s)n.binary&&!n.base64&&n.optimizedBinaryString!==!0&&(t=r.string2binary(t));else{if(n.base64=!1,n.binary=!0,!(s||t instanceof f))throw new Error("The data of '"+e+"' is in an unsupported format !");"arraybuffer"===s&&(t=r.transformTo("uint8array",t))}var o=new g(e
,t,n);return this.files[e]=o,o},S=function(e){"/"==e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},x=function(e){return"/"!=e.slice(-1)&&(e+="/"),e},T=function(e,t){return t="undefined"!=typeof t?t:!1,e=x(e),this.files[e]||E.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]},N=function(e,t,n){var s,o=new f;return e._data instanceof f?(o.uncompressedSize=e._data.uncompressedSize,o.crc32=e._data.crc32,0===o.uncompressedSize||e.dir?(t=a.STORE
,o.compressedContent="",o.crc32=0):e._data.compressionMethod===t.magic?o.compressedContent=e._data.getCompressedContent():(s=e._data.getContent(),o.compressedContent=t.compress(r.transformTo(t.compressInputType,s),n))):(s=v(e),(!s||0===s.length||e.dir)&&(t=a.STORE,s=""),o.uncompressedSize=s.length,o.crc32=i(s),o.compressedContent=t.compress(r.transformTo(t.compressInputType,s),n)),o.compressedSize=o.compressedContent.length,o.compressionMethod=t.magic,o},C=function(e,t){var n=e;return e||(n=t?16893
:33204),(65535&n)<<16},k=function(e){return 63&(e||0)},L=function(e,t,n,o,u){var a,f,l,h,p=(n.compressedContent,r.transformTo("string",c.utf8encode(t.name))),d=t.comment||"",v=r.transformTo("string",c.utf8encode(d)),m=p.length!==t.name.length,g=v.length!==d.length,b=t.options,w="",E="",S="";l=t._initialMetadata.dir!==t.dir?t.dir:b.dir,h=t._initialMetadata.date!==t.date?t.date:b.date;var x=0,T=0;l&&(x|=16),"UNIX"===u?(T=798,x|=C(t.unixPermissions,l)):(T=20,x|=k(t.dosPermissions,l)),a=h.getHours(),
a<<=6,a|=h.getMinutes(),a<<=5,a|=h.getSeconds()/2,f=h.getFullYear()-1980,f<<=4,f|=h.getMonth()+1,f<<=5,f|=h.getDate(),m&&(E=y(1,1)+y(i(p),4)+p,w+="up"+y(E.length,2)+E),g&&(S=y(1,1)+y(this.crc32(v),4)+v,w+="uc"+y(S.length,2)+S);var N="";N+="\n\0",N+=m||g?"\0\b":"\0\0",N+=n.compressionMethod,N+=y(a,2),N+=y(f,2),N+=y(n.crc32,4),N+=y(n.compressedSize,4),N+=y(n.uncompressedSize,4),N+=y(p.length,2),N+=y(w.length,2);var L=s.LOCAL_FILE_HEADER+N+p+w,A=s.CENTRAL_FILE_HEADER+y(T,2)+N+y(v.length,2)+"\0\0\0\0"+
y(x,4)+y(o,4)+p+w+v;return{fileRecord:L,dirRecord:A,compressedObject:n}},A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(e){var t,n,r,i,s=[];for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],i=new g(r.name,r._data,b(r.options)),n=t.slice(this.root.length,t.length),t.slice(0,this.root.length)===this.root&&e(n,i)&&s.push(i));return s},file:function(e,t,n){if(1===arguments.length){if(r.isRegExp(e)){var i=e;return this
.filter(function(e,t){return!t.dir&&i.test(e)})}return this.filter(function(t,n){return!n.dir&&t===e})[0]||null}return e=this.root+e,E.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(r.isRegExp(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=T.call(this,t),i=this.clone();return i.root=n.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!=e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter
(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(e){e=b(e||{},{base64:!0,compression:"STORE",compressionOptions:null,type:"base64",platform:"DOS",comment:null,mimeType:"application/zip"}),r.checkSupport(e.type),("darwin"===e.platform||"freebsd"===e.platform||"linux"===e.platform||"sunos"===e.platform)&&(e.platform="UNIX"),"win32"===e.platform&&(e.platform="DOS");var t,n,i=[],o=0,f=0,l=r.transformTo("string",this.utf8encode
(e.comment||this.comment||""));for(var c in this.files)if(this.files.hasOwnProperty(c)){var d=this.files[c],v=d.options.compression||e.compression.toUpperCase(),m=a[v];if(!m)throw new Error(v+" is not a valid compression method !");var g=d.options.compressionOptions||e.compressionOptions||{},w=N.call(this,d,m,g),E=L.call(this,c,d,w,o,e.platform);o+=E.fileRecord.length+w.compressedSize,f+=E.dirRecord.length,i.push(E)}var S="";S=s.CENTRAL_DIRECTORY_END+"\0\0\0\0"+y(i.length,2)+y(i.length,2)+y(f,4)+
y(o,4)+y(l.length,2)+l;var x=e.type.toLowerCase();for(t="uint8array"===x||"arraybuffer"===x||"blob"===x||"nodebuffer"===x?new p(o+f+S.length):new h(o+f+S.length),n=0;n<i.length;n++)t.append(i[n].fileRecord),t.append(i[n].compressedObject.compressedContent);for(n=0;n<i.length;n++)t.append(i[n].dirRecord);t.append(S);var T=t.finalize();switch(e.type.toLowerCase()){case"uint8array":case"arraybuffer":case"nodebuffer":return r.transformTo(e.type.toLowerCase(),T);case"blob":return r.arrayBuffer2Blob(r.
transformTo("arraybuffer",T),e.mimeType);case"base64":return e.base64?u.encode(T):T;default:return T}},crc32:function(e,t){return i(e,t)},utf8encode:function(e){return r.transformTo("string",c.utf8encode(e))},utf8decode:function(e){return c.utf8decode(e)}};t.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./crc32":4,"./defaults":6,"./nodeBuffer":11,"./signature":14,"./stringWriter":16,"./support":17,"./uint8ArrayWriter":19,"./utf8":20,"./utils":21}],14:[function(e,t,n){"use strict"
;n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],15:[function(e,t){"use strict";function n(e,t){this.data=e,t||(this.data=i.string2binary(this.data)),this.length=this.data.length,this.index=0}var r=e("./dataReader"),i=e("./utils");n.prototype=new r,n.prototype.byteAt=function(e){return this.data.charCodeAt(e)},n.prototype.lastIndexOfSignature=function(
e){return this.data.lastIndexOf(e)},n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.index,this.index+e);return this.index+=e,t},t.exports=n},{"./dataReader":5,"./utils":21}],16:[function(e,t){"use strict";var n=e("./utils"),r=function(){this.data=[]};r.prototype={append:function(e){e=n.transformTo("string",e),this.data.push(e)},finalize:function(){return this.data.join("")}},t.exports=r},{"./utils":21}],17:[function(e,t,n){(function(e){"use strict";if(n.base64=!0,n
.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer="undefined"!=typeof e,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var t=new ArrayBuffer(0);try{n.blob=0===(new Blob([t],{type:"application/zip"})).size}catch(r){try{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,s=new i;s.append(t),n.blob=0===s.getBlob("application/zip").size}catch(r){n.blob=!1
}}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],18:[function(e,t){"use strict";function n(e){e&&(this.data=e,this.length=this.data.length,this.index=0)}var r=e("./dataReader");n.prototype=new r,n.prototype.byteAt=function(e){return this.data[e]},n.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;s>=0;--s)if(this.data[s]===t&&this.data[s+1]===n&&this.data[s+2]===r&&this.data[s+3]===i)return s;return-1
},n.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.index,this.index+e);return this.index+=e,t},t.exports=n},{"./dataReader":5}],19:[function(e,t){"use strict";var n=e("./utils"),r=function(e){this.data=new Uint8Array(e),this.index=0};r.prototype={append:function(e){0!==e.length&&(e=n.transformTo("uint8array",e),this.data.set(e,this.index),this.index+=e.length)},finalize:function(){return this.data}},t.exports=r},{"./utils":21}],20
:[function(e,t,n){"use strict";for(var r=e("./utils"),i=e("./support"),s=e("./nodeBuffer"),o=new Array(256),u=0;256>u;u++)o[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;o[254]=o[254]=1;var a=function(e){var t,n,r,s,o,u=e.length,a=0;for(s=0;u>s;s++)n=e.charCodeAt(s),55296===(64512&n)&&u>s+1&&(r=e.charCodeAt(s+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),s++)),a+=128>n?1:2048>n?2:65536>n?3:4;for(t=i.uint8array?new Uint8Array(a):new Array(a),o=0,s=0;a>o;s++)n=e.charCodeAt(s),55296===(64512&
n)&&u>s+1&&(r=e.charCodeAt(s+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),s++)),128>n?t[o++]=n:2048>n?(t[o++]=192|n>>>6,t[o++]=128|63&n):65536>n?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},f=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128===(192&e[n]);)n--;return 0>n?t:0===n?t:n+o[e[n]]>t?n:t},l=function(e){var t,n,i,s,u=e.length,a=new Array(2*u);for(n=0,t=0;
u>t;)if(i=e[t++],128>i)a[n++]=i;else if(s=o[i],s>4)a[n++]=65533,t+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&u>t;)i=i<<6|63&e[t++],s--;s>1?a[n++]=65533:65536>i?a[n++]=i:(i-=65536,a[n++]=55296|i>>10&1023,a[n++]=56320|1023&i)}return a.length!==n&&(a.subarray?a=a.subarray(0,n):a.length=n),r.applyFromCharCode(a)};n.utf8encode=function(e){return i.nodebuffer?s(e,"utf-8"):a(e)},n.utf8decode=function(e){if(i.nodebuffer)return r.transformTo("nodebuffer",e).toString("utf-8");e=r.transformTo(i.uint8array?"uint8array"
:"array",e);for(var t=[],n=0,s=e.length,o=65536;s>n;){var u=f(e,Math.min(n+o,s));t.push(i.uint8array?l(e.subarray(n,u)):l(e.slice(n,u))),n=u}return t.join("")}},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(e,t,n){"use strict";function r(e){return e}function i(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}function s(e){var t=65536,r=[],i=e.length,s=n.getTypeOf(e),o=0,u=!0;try{switch(s){case"uint8array":String.fromCharCode.apply(null,new Uint8Array(0));break;case"nodebuffer"
:String.fromCharCode.apply(null,f(0))}}catch(a){u=!1}if(!u){for(var l="",h=0;h<e.length;h++)l+=String.fromCharCode(e[h]);return l}for(;i>o&&t>1;)try{r.push("array"===s||"nodebuffer"===s?String.fromCharCode.apply(null,e.slice(o,Math.min(o+t,i))):String.fromCharCode.apply(null,e.subarray(o,Math.min(o+t,i)))),o+=t}catch(a){t=Math.floor(t/2)}return r.join("")}function o(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}var u=e("./support"),a=e("./compressions"),f=e("./nodeBuffer");n.string2binary=function(
e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(255&e.charCodeAt(n));return t},n.arrayBuffer2Blob=function(e,t){n.checkSupport("blob"),t=t||"application/zip";try{return new Blob([e],{type:t})}catch(r){try{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,s=new i;return s.append(e),s.getBlob(t)}catch(r){throw new Error("Bug : can't construct the Blob.")}}},n.applyFromCharCode=s;var l={};l.string={string:r,array:function(e){return i(e,new Array
(e.length))},arraybuffer:function(e){return l.string.uint8array(e).buffer},uint8array:function(e){return i(e,new Uint8Array(e.length))},nodebuffer:function(e){return i(e,f(e.length))}},l.array={string:s,array:r,arraybuffer:function(e){return(new Uint8Array(e)).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return f(e)}},l.arraybuffer={string:function(e){return s(new Uint8Array(e))},array:function(e){return o(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:
r,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return f(new Uint8Array(e))}},l.uint8array={string:s,array:function(e){return o(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:r,nodebuffer:function(e){return f(e)}},l.nodebuffer={string:s,array:function(e){return o(e,new Array(e.length))},arraybuffer:function(e){return l.nodebuffer.uint8array(e).buffer},uint8array:function(e){return o(e,new Uint8Array(e.length))},nodebuffer:r},n.transformTo=function(
e,t){if(t||(t=""),!e)return t;n.checkSupport(e);var r=n.getTypeOf(t),i=l[r][e](t);return i},n.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":u.nodebuffer&&f.test(e)?"nodebuffer":u.uint8array&&e instanceof Uint8Array?"uint8array":u.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(e){var t=u[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this browser")},n.MAX_VALUE_16BITS=65535,n
.MAX_VALUE_32BITS=-1,n.pretty=function(e){var t,n,r="";for(n=0;n<(e||"").length;n++)t=e.charCodeAt(n),r+="\\x"+(16>t?"0":"")+t.toString(16).toUpperCase();return r},n.findCompression=function(e){for(var t in a)if(a.hasOwnProperty(t)&&a[t].magic===e)return a[t];return null},n.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(e,t){"use strict";function n(e,t){this.files=[],this.loadOptions=t,e&&this.
load(e)}var r=e("./stringReader"),i=e("./nodeBufferReader"),s=e("./uint8ArrayReader"),o=e("./utils"),u=e("./signature"),a=e("./zipEntry"),f=e("./support"),l=e("./object");n.prototype={checkSignature:function(e){var t=this.reader.readString(4);if(t!==e)throw new Error("Corrupted zip or bug : unexpected signature ("+o.pretty(t)+", expected "+o.pretty(e)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=
this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=l.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=
this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44,i=0;r>i;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readString(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator
:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(u.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(
){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readString(4)===u.CENTRAL_FILE_HEADER;)e=new a({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(u.CENTRAL_DIRECTORY_END);if(-1===e){var t=!0;try{this.reader.setIndex(0),this.checkSignature(u.LOCAL_FILE_HEADER),t=!1}catch(n){}throw new Error(t?"Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html"
:"Corrupted zip : can't find end of central directory")}if(this.reader.setIndex(e),this.checkSignature(u.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(u.ZIP64_CENTRAL_DIRECTORY_LOCATOR
),-1===e)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");this.reader.setIndex(e),this.checkSignature(u.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(u.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}},prepareReader:function(e){var t=o.getTypeOf(e);this.reader="string"!==t||f.uint8array?"nodebuffer"===t?new i(e):new s(o.transformTo("uint8array"
,e)):new r(e,this.loadOptions.optimizedBinaryString)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=n},{"./nodeBufferReader":12,"./object":13,"./signature":14,"./stringReader":15,"./support":17,"./uint8ArrayReader":18,"./utils":21,"./zipEntry":23}],23:[function(e,t){"use strict";function n(e,t){this.options=e,this.loadOptions=t}var r=e("./stringReader"),i=e("./utils"),s=e("./compressedObject"),o=e("./object"),u=0,a=3;n.prototype=
{isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(e,t,n){return function(){var r=e.index;e.setIndex(t);var i=e.readData(n);return e.setIndex(r),i}},prepareContent:function(e,t,n,r,s){return function(){var e=i.transformTo(r.uncompressInputType,this.getCompressedContent()),t=r.uncompress(e);if(t.length!==s)throw new Error("Bug : uncompressed data size mismatch");return t}},readLocalPart:function(e){var t,n;if(
e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readString(this.fileNameLength),e.skip(n),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(t=i.findCompression(this.compressionMethod),null===t)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+this.fileName+")");if(
this.decompressed=new s,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(e,e.index,this.compressedSize,t),this.decompressed.getContent=this.prepareContent(e,e.index,this.compressedSize,t,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=i.transformTo("string"
,this.decompressed.getContent()),o.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(e){if(this.versionMadeBy=e.readInt(2),this.versionNeeded=e.readInt(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4),this.fileNameLength=e.readInt(2),this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt
(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=e.readString(this.fileNameLength),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readString(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=16&
this.externalFileAttributes?!0:!1,e===u&&(this.dosPermissions=63&this.externalFileAttributes),e===a&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileName.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=new r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&
(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index;for(this.extraFields=this.extraFields||{};e.index<i+this.extraFieldsLength;)t=e.readInt(2),n=e.readInt(2),r=e.readString(n),this.extraFields[t]={id:t,length:n,value:r}},handleUTF8:function(){if(this.useUTF8())this.fileName=o.utf8decode(this.fileName),this.fileComment=o.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath
();null!==e&&(this.fileName=e);var t=this.findExtraFieldUnicodeComment();null!==t&&(this.fileComment=t)}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=new r(e.value);return 1!==t.readInt(1)?null:o.crc32(this.fileName)!==t.readInt(4)?null:o.utf8decode(t.readString(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=new r(e.value);return 1!==t.readInt(1)?null:o.crc32(this.fileComment)!==t.readInt(4)?null:o.utf8decode
(t.readString(e.length-5))}return null}},t.exports=n},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(e,t){"use strict";var n=e("./lib/utils/common").assign,r=e("./lib/deflate"),i=e("./lib/inflate"),s=e("./lib/zlib/constants"),o={};n(o,r,i,s),t.exports=o},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(e,t,n){"use strict";function r(e,t){var n=new y(t);if(n.push(e,!0),n.err)throw n.msg;return n.result}function i
(e,t){return t=t||{},t.raw=!0,r(e,t)}function s(e,t){return t=t||{},t.gzip=!0,r(e,t)}var o=e("./zlib/deflate.js"),u=e("./utils/common"),a=e("./utils/strings"),f=e("./zlib/messages"),l=e("./zlib/zstream"),c=0,h=4,p=0,d=1,v=-1,m=0,g=8,y=function(e){this.options=u.assign({level:v,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=""
,this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=o.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==p)throw new Error(f[n]);t.header&&o.deflateSetHeader(this.strm,t.header)};y.prototype.push=function(e,t){var n,r,i=this.strm,s=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:t===!0?h:c,i.input="string"==typeof e?a.string2buf(e):e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new u.Buf8(s),i.next_out=0,i.avail_out=
s),n=o.deflate(i,r),n!==d&&n!==p)return this.onEnd(n),this.ended=!0,!1;(0===i.avail_out||0===i.avail_in&&r===h)&&this.onData("string"===this.options.to?a.buf2binstring(u.shrinkBuf(i.output,i.next_out)):u.shrinkBuf(i.output,i.next_out))}while((i.avail_in>0||0===i.avail_out)&&n!==d);return r===h?(n=o.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===p):!0},y.prototype.onData=function(e){this.chunks.push(e)},y.prototype.onEnd=function(e){e===p&&(this.result="string"===this.options.to?this.chunks
.join(""):u.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=y,n.deflate=r,n.deflateRaw=i,n.gzip=s},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(e,t,n){"use strict";function r(e,t){var n=new h(t);if(n.push(e,!0),n.err)throw n.msg;return n.result}function i(e,t){return t=t||{},t.raw=!0,r(e,t)}var s=e("./zlib/inflate.js"),o=e("./utils/common"),u=e("./utils/strings"),a=e("./zlib/constants"
),f=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),h=function(e){this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm
.avail_out=0;var n=s.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(f[n]);this.header=new c,s.inflateGetHeader(this.strm,this.header)};h.prototype.push=function(e,t){var n,r,i,f,l,c=this.strm,h=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:t===!0?a.Z_FINISH:a.Z_NO_FLUSH,c.input="string"==typeof e?u.binstring2buf(e):e,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new o.Buf8(h),c.next_out=0,c.avail_out=h),n=s.inflate(c,a.Z_NO_FLUSH),n!==a.Z_STREAM_END&&
n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;c.next_out&&(0===c.avail_out||n===a.Z_STREAM_END||0===c.avail_in&&r===a.Z_FINISH)&&("string"===this.options.to?(i=u.utf8border(c.output,c.next_out),f=c.next_out-i,l=u.buf2string(c.output,i),c.next_out=f,c.avail_out=h-f,f&&o.arraySet(c.output,c.output,i,f,0),this.onData(l)):this.onData(o.shrinkBuf(c.output,c.next_out)))}while(c.avail_in>0&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(r=a.Z_FINISH),r===a.Z_FINISH?(n=s.inflateEnd(this.strm),this.onEnd
(n),this.ended=!0,n===a.Z_OK):!0},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=h,n.inflate=r,n.inflateRaw=i,n.ungzip=r},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(e,t,n){"use strict"
;var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)return void e.set
(t.subarray(n,n+r),i);for(var s=0;r>s;s++)e[i+s]=t[n+s]},flattenChunks:function(e){var t,n,r,i,s,o;for(r=0,t=0,n=e.length;n>t;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;n>t;t++)s=e[t],o.set(s,i),i+=s.length;return o}},s={arraySet:function(e,t,n,r,i){for(var s=0;r>s;s++)e[i+s]=t[n+s]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n
.assign(n,s))},n.setTyped(r)},{}],28:[function(e,t,n){"use strict";function r(e,t){if(65537>t&&(e.subarray&&o||!e.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",r=0;t>r;r++)n+=String.fromCharCode(e[r]);return n}var i=e("./common"),s=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(u){s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(u){o=!1}for(var a=new i.Buf8(256),f=0;256>f;f++)a[f]=f>=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;a[254]=a[254
]=1,n.string2buf=function(e){var t,n,r,s,o,u=e.length,a=0;for(s=0;u>s;s++)n=e.charCodeAt(s),55296===(64512&n)&&u>s+1&&(r=e.charCodeAt(s+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),s++)),a+=128>n?1:2048>n?2:65536>n?3:4;for(t=new i.Buf8(a),o=0,s=0;a>o;s++)n=e.charCodeAt(s),55296===(64512&n)&&u>s+1&&(r=e.charCodeAt(s+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),s++)),128>n?t[o++]=n:2048>n?(t[o++]=192|n>>>6,t[o++]=128|63&n):65536>n?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&
n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},n.buf2binstring=function(e){return r(e,e.length)},n.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;r>n;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,i,s,o,u=t||e.length,f=new Array(2*u);for(i=0,n=0;u>n;)if(s=e[n++],128>s)f[i++]=s;else if(o=a[s],o>4)f[i++]=65533,n+=o-1;else{for(s&=2===o?31:3===o?15:7;o>1&&u>n;)s=s<<6|63&e[n++],o--;o>1?f[i++]=65533:65536>s?f[i++]=
s:(s-=65536,f[i++]=55296|s>>10&1023,f[i++]=56320|1023&s)}return r(f,i)},n.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128===(192&e[n]);)n--;return 0>n?t:0===n?t:n+a[e[n]]>t?n:t}},{"./common":27}],29:[function(e,t){"use strict";function n(e,t,n,r){for(var i=65535&e|0,s=e>>>16&65535|0,o=0;0!==n;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,s=s+i|0;while(--o);i%=65521,s%=65521}return i|s<<16|0}t.exports=n},{}],30:[function(e,t){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH
:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(e,t){"use strict";function n(){for(var e,t=[],n=0;256>n;n++){e=n;for(var r=0;8>r;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t
}function r(e,t,n,r){var s=i,o=r+n;e=-1^e;for(var u=r;o>u;u++)e=e>>>8^s[255&(e^t[u])];return-1^e}var i=n();t.exports=r},{}],32:[function(e,t,n){"use strict";function r(e,t){return e.msg=_[t],t}function i(e){return(e<<1)-(e>4?9:0)}function s(e){for(var t=e.length;--t>=0;)e[t]=0}function o(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(L.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&
(t.pending_out=0))}function u(e,t){A._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function a(e,t){e.pending_buf[e.pending++]=t}function f(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function l(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,L.arraySet(t,e.input,e.next_in,i,n),1===e.state.wrap?e.adler=O(e.adler,t,i,n):2===e.state.wrap&&(e.adler=M(e.adler,t,i,n)),e.next_in+=i,e.total_in+=
i,i)}function c(e,t){var n,r,i=e.max_chain_length,s=e.strstart,o=e.prev_length,u=e.nice_match,a=e.strstart>e.w_size-ft?e.strstart-(e.w_size-ft):0,f=e.window,l=e.w_mask,c=e.prev,h=e.strstart+at,p=f[s+o-1],d=f[s+o];e.prev_length>=e.good_match&&(i>>=2),u>e.lookahead&&(u=e.lookahead);do if(n=t,f[n+o]===d&&f[n+o-1]===p&&f[n]===f[s]&&f[++n]===f[s+1]){s+=2,n++;do;while(f[++s]===f[++n]&&f[++s]===f[++n]&&f[++s]===f[++n]&&f[++s]===f[++n]&&f[++s]===f[++n]&&f[++s]===f[++n]&&f[++s]===f[++n]&&f[++s]===f[++n]&&
h>s);if(r=at-(h-s),s=h-at,r>o){if(e.match_start=t,o=r,r>=u)break;p=f[s+o-1],d=f[s+o]}}while((t=c[t&l])>a&&0!==--i);return o<=e.lookahead?o:e.lookahead}function h(e){var t,n,r,i,s,o=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-ft)){L.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,n=e.hash_size,t=n;do r=e.head[--t],e.head[t]=r>=o?r-o:0;while(--n);n=o,t=n;do r=e.prev[--t],e.prev[t]=r>=o?r-o:0;while(--n);i+=o}if(0===e.strm.avail_in)break;if(
n=l(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=ut)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+ut-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<ut)););}while(e.lookahead<ft&&0!==e.strm.avail_in)}function p(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1
){if(h(e),0===e.lookahead&&t===D)return yt;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,u(e,!1),0===e.strm.avail_out))return yt;if(e.strstart-e.block_start>=e.w_size-ft&&(u(e,!1),0===e.strm.avail_out))return yt}return e.insert=0,t===B?(u(e,!0),0===e.strm.avail_out?wt:Et):e.strstart>e.block_start&&(u(e,!1),0===e.strm.avail_out)?yt:yt}function d(e,t){for(var n,r;;){if(e.lookahead<ft){if(
h(e),e.lookahead<ft&&t===D)return yt;if(0===e.lookahead)break}if(n=0,e.lookahead>=ut&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ut-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-ft&&(e.match_length=c(e,n)),e.match_length>=ut)if(r=A._tr_tally(e,e.strstart-e.match_start,e.match_length-ut),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ut){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<
e.hash_shift^e.window[e.strstart+ut-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=A._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(u(e,!1),0===e.strm.avail_out))return yt}return e.insert=e.strstart<ut-1?e.strstart:ut-1,t===B?(u(e,!0),0===e.strm
.avail_out?wt:Et):e.last_lit&&(u(e,!1),0===e.strm.avail_out)?yt:bt}function v(e,t){for(var n,r,i;;){if(e.lookahead<ft){if(h(e),e.lookahead<ft&&t===D)return yt;if(0===e.lookahead)break}if(n=0,e.lookahead>=ut&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ut-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ut-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-ft&&(e.match_length=
c(e,n),e.match_length<=5&&(e.strategy===W||e.match_length===ut&&e.strstart-e.match_start>4096)&&(e.match_length=ut-1)),e.prev_length>=ut&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ut,r=A._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ut),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ut-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(0!==--e.prev_length);if(e.match_available=0
,e.match_length=ut-1,e.strstart++,r&&(u(e,!1),0===e.strm.avail_out))return yt}else if(e.match_available){if(r=A._tr_tally(e,0,e.window[e.strstart-1]),r&&u(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return yt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=A._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<ut-1?e.strstart:ut-1,t===B?(u(e,!0),0===e.strm.avail_out?wt:Et):e.last_lit&&(u(e,!1),0===e.strm.avail_out)?yt:bt}function m
(e,t){for(var n,r,i,s,o=e.window;;){if(e.lookahead<=at){if(h(e),e.lookahead<=at&&t===D)return yt;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=ut&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){s=e.strstart+at;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&s>i);e.match_length=at-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ut?(n=A._tr_tally(e,1,e.match_length-ut),e
.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=A._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(u(e,!1),0===e.strm.avail_out))return yt}return e.insert=0,t===B?(u(e,!0),0===e.strm.avail_out?wt:Et):e.last_lit&&(u(e,!1),0===e.strm.avail_out)?yt:bt}function g(e,t){for(var n;;){if(0===e.lookahead&&(h(e),0===e.lookahead)){if(t===D)return yt;break}if(e.match_length=0,n=A._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(u(e,!1),0===e.strm
.avail_out))return yt}return e.insert=0,t===B?(u(e,!0),0===e.strm.avail_out?wt:Et):e.last_lit&&(u(e,!1),0===e.strm.avail_out)?yt:bt}function y(e){e.window_size=2*e.w_size,s(e.head),e.max_lazy_match=k[e.level].max_lazy,e.good_match=k[e.level].good_length,e.nice_match=k[e.level].nice_length,e.max_chain_length=k[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ut-1,e.match_available=0,e.ins_h=0}function b(){this.strm=null,this.status=0,this.pending_buf=
null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Q,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0
,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new L.Buf16(2*st),this.dyn_dtree=new L.Buf16(2*(2*rt+1)),this.bl_tree=new L.Buf16(2*(2*it+1)),s(this.dyn_ltree),s(this.dyn_dtree),s(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new L.Buf16(ot+1),this.heap=new L.Buf16(2*nt+1),s(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new L.Buf16(2*nt+1),s(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,
this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function w(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=K,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ct:mt,e.adler=2===t.wrap?0:1,t.last_flush=D,A._tr_init(t),F):r(e,q)}function E(e){var t=w(e);return t===F&&y(e.state),t}function S(e,t){return e&&e.state?2!==e.state.wrap?q:(e.state.gzhead=t,F):q}function x(e,t,n,i,s,o){if(!e)return q;var u=1
;if(t===z&&(t=6),0>i?(u=0,i=-i):i>15&&(u=2,i-=16),1>s||s>G||n!==Q||8>i||i>15||0>t||t>9||0>o||o>$)return r(e,q);8===i&&(i=9);var a=new b;return e.state=a,a.strm=e,a.wrap=u,a.gzhead=null,a.w_bits=i,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=s+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+ut-1)/ut),a.window=new L.Buf8(2*a.w_size),a.head=new L.Buf16(a.hash_size),a.prev=new L.Buf16(a.w_size),a.lit_bufsize=1<<s+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new 
L.Buf8(a.pending_buf_size),a.d_buf=a.lit_bufsize>>1,a.l_buf=3*a.lit_bufsize,a.level=t,a.strategy=o,a.method=n,E(e)}function T(e,t){return x(e,t,Q,Y,Z,J)}function N(e,t){var n,u,l,c;if(!e||!e.state||t>j||0>t)return e?r(e,q):q;if(u=e.state,!e.output||!e.input&&0!==e.avail_in||u.status===gt&&t!==B)return r(e,0===e.avail_out?U:q);if(u.strm=e,n=u.last_flush,u.last_flush=t,u.status===ct)if(2===u.wrap)e.adler=0,a(u,31),a(u,139),a(u,8),u.gzhead?(a(u,(u.gzhead.text?1:0)+(u.gzhead.hcrc?2:0)+(u.gzhead.extra?4
:0)+(u.gzhead.name?8:0)+(u.gzhead.comment?16:0)),a(u,255&u.gzhead.time),a(u,u.gzhead.time>>8&255),a(u,u.gzhead.time>>16&255),a(u,u.gzhead.time>>24&255),a(u,9===u.level?2:u.strategy>=X||u.level<2?4:0),a(u,255&u.gzhead.os),u.gzhead.extra&&u.gzhead.extra.length&&(a(u,255&u.gzhead.extra.length),a(u,u.gzhead.extra.length>>8&255)),u.gzhead.hcrc&&(e.adler=M(e.adler,u.pending_buf,u.pending,0)),u.gzindex=0,u.status=ht):(a(u,0),a(u,0),a(u,0),a(u,0),a(u,0),a(u,9===u.level?2:u.strategy>=X||u.level<2?4:0),a(u
,St),u.status=mt);else{var h=Q+(u.w_bits-8<<4)<<8,p=-1;p=u.strategy>=X||u.level<2?0:u.level<6?1:6===u.level?2:3,h|=p<<6,0!==u.strstart&&(h|=lt),h+=31-h%31,u.status=mt,f(u,h),0!==u.strstart&&(f(u,e.adler>>>16),f(u,65535&e.adler)),e.adler=1}if(u.status===ht)if(u.gzhead.extra){for(l=u.pending;u.gzindex<(65535&u.gzhead.extra.length)&&(u.pending!==u.pending_buf_size||(u.gzhead.hcrc&&u.pending>l&&(e.adler=M(e.adler,u.pending_buf,u.pending-l,l)),o(e),l=u.pending,u.pending!==u.pending_buf_size));)a(u,255&
u.gzhead.extra[u.gzindex]),u.gzindex++;u.gzhead.hcrc&&u.pending>l&&(e.adler=M(e.adler,u.pending_buf,u.pending-l,l)),u.gzindex===u.gzhead.extra.length&&(u.gzindex=0,u.status=pt)}else u.status=pt;if(u.status===pt)if(u.gzhead.name){l=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>l&&(e.adler=M(e.adler,u.pending_buf,u.pending-l,l)),o(e),l=u.pending,u.pending===u.pending_buf_size)){c=1;break}c=u.gzindex<u.gzhead.name.length?255&u.gzhead.name.charCodeAt(u.gzindex++):0,a(u,c)}
while(0!==c);u.gzhead.hcrc&&u.pending>l&&(e.adler=M(e.adler,u.pending_buf,u.pending-l,l)),0===c&&(u.gzindex=0,u.status=dt)}else u.status=dt;if(u.status===dt)if(u.gzhead.comment){l=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>l&&(e.adler=M(e.adler,u.pending_buf,u.pending-l,l)),o(e),l=u.pending,u.pending===u.pending_buf_size)){c=1;break}c=u.gzindex<u.gzhead.comment.length?255&u.gzhead.comment.charCodeAt(u.gzindex++):0,a(u,c)}while(0!==c);u.gzhead.hcrc&&u.pending>l&&(e.adler=
M(e.adler,u.pending_buf,u.pending-l,l)),0===c&&(u.status=vt)}else u.status=vt;if(u.status===vt&&(u.gzhead.hcrc?(u.pending+2>u.pending_buf_size&&o(e),u.pending+2<=u.pending_buf_size&&(a(u,255&e.adler),a(u,e.adler>>8&255),e.adler=0,u.status=mt)):u.status=mt),0!==u.pending){if(o(e),0===e.avail_out)return u.last_flush=-1,F}else if(0===e.avail_in&&i(t)<=i(n)&&t!==B)return r(e,U);if(u.status===gt&&0!==e.avail_in)return r(e,U);if(0!==e.avail_in||0!==u.lookahead||t!==D&&u.status!==gt){var d=u.strategy===
X?g(u,t):u.strategy===V?m(u,t):k[u.level].func(u,t);if((d===wt||d===Et)&&(u.status=gt),d===yt||d===wt)return 0===e.avail_out&&(u.last_flush=-1),F;if(d===bt&&(t===P?A._tr_align(u):t!==j&&(A._tr_stored_block(u,0,0,!1),t===H&&(s(u.head),0===u.lookahead&&(u.strstart=0,u.block_start=0,u.insert=0))),o(e),0===e.avail_out))return u.last_flush=-1,F}return t!==B?F:u.wrap<=0?I:(2===u.wrap?(a(u,255&e.adler),a(u,e.adler>>8&255),a(u,e.adler>>16&255),a(u,e.adler>>24&255),a(u,255&e.total_in),a(u,e.total_in>>8&255
),a(u,e.total_in>>16&255),a(u,e.total_in>>24&255)):(f(u,e.adler>>>16),f(u,65535&e.adler)),o(e),u.wrap>0&&(u.wrap=-u.wrap),0!==u.pending?F:I)}function C(e){var t;return e&&e.state?(t=e.state.status,t!==ct&&t!==ht&&t!==pt&&t!==dt&&t!==vt&&t!==mt&&t!==gt?r(e,q):(e.state=null,t===mt?r(e,R):F)):q}var k,L=e("../utils/common"),A=e("./trees"),O=e("./adler32"),M=e("./crc32"),_=e("./messages"),D=0,P=1,H=3,B=4,j=5,F=0,I=1,q=-2,R=-3,U=-5,z=-1,W=1,X=2,V=3,$=4,J=0,K=2,Q=8,G=9,Y=15,Z=8,et=29,tt=256,nt=tt+1+et,rt=30
,it=19,st=2*nt+1,ot=15,ut=3,at=258,ft=at+ut+1,lt=32,ct=42,ht=69,pt=73,dt=91,vt=103,mt=113,gt=666,yt=1,bt=2,wt=3,Et=4,St=3,xt=function(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i};k=[new xt(0,0,0,0,p),new xt(4,4,8,4,d),new xt(4,5,16,8,d),new xt(4,6,32,32,d),new xt(4,4,16,16,v),new xt(8,16,32,32,v),new xt(8,16,128,128,v),new xt(8,32,128,256,v),new xt(32,128,258,1024,v),new xt(32,258,258,4096,v)],n.deflateInit=T,n.deflateInit2=x,n.deflateReset=E,n.deflateResetKeep=
w,n.deflateSetHeader=S,n.deflate=N,n.deflateEnd=C,n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(e,t){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=n},{}],34:[function(e,t){"use strict";var n=30,r=12;t.exports=function(e,t){var i,s,o,u,a,f,l,h,p,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O
;i=e.state,s=e.next_in,A=e.input,o=s+(e.avail_in-5),u=e.next_out,O=e.output,a=u-(t-e.avail_out),f=u+(e.avail_out-257),l=i.dmax,h=i.wsize,p=i.whave,v=i.wnext,m=i.window,g=i.hold,y=i.bits,b=i.lencode,w=i.distcode,E=(1<<i.lenbits)-1,S=(1<<i.distbits)-1;e:do{15>y&&(g+=A[s++]<<y,y+=8,g+=A[s++]<<y,y+=8),x=b[g&E];t:for(;;){if(T=x>>>24,g>>>=T,y-=T,T=x>>>16&255,0===T)O[u++]=65535&x;else{if(!(16&T)){if(0===(64&T)){x=b[(65535&x)+(g&(1<<T)-1)];continue t}if(32&T){i.mode=r;break e}e.msg="invalid literal/length code"
,i.mode=n;break e}N=65535&x,T&=15,T&&(T>y&&(g+=A[s++]<<y,y+=8),N+=g&(1<<T)-1,g>>>=T,y-=T),15>y&&(g+=A[s++]<<y,y+=8,g+=A[s++]<<y,y+=8),x=w[g&S];n:for(;;){if(T=x>>>24,g>>>=T,y-=T,T=x>>>16&255,!(16&T)){if(0===(64&T)){x=w[(65535&x)+(g&(1<<T)-1)];continue n}e.msg="invalid distance code",i.mode=n;break e}if(C=65535&x,T&=15,T>y&&(g+=A[s++]<<y,y+=8,T>y&&(g+=A[s++]<<y,y+=8)),C+=g&(1<<T)-1,C>l){e.msg="invalid distance too far back",i.mode=n;break e}if(g>>>=T,y-=T,T=u-a,C>T){if(T=C-T,T>p&&i.sane){e.msg="invalid distance too far back"
,i.mode=n;break e}if(k=0,L=m,0===v){if(k+=h-T,N>T){N-=T;do O[u++]=m[k++];while(--T);k=u-C,L=O}}else if(T>v){if(k+=h+v-T,T-=v,N>T){N-=T;do O[u++]=m[k++];while(--T);if(k=0,N>v){T=v,N-=T;do O[u++]=m[k++];while(--T);k=u-C,L=O}}}else if(k+=v-T,N>T){N-=T;do O[u++]=m[k++];while(--T);k=u-C,L=O}for(;N>2;)O[u++]=L[k++],O[u++]=L[k++],O[u++]=L[k++],N-=3;N&&(O[u++]=L[k++],N>1&&(O[u++]=L[k++]))}else{k=u-C;do O[u++]=O[k++],O[u++]=O[k++],O[u++]=O[k++],N-=3;while(N>2);N&&(O[u++]=O[k++],N>1&&(O[u++]=O[k++]))}break}
}break}}while(o>s&&f>u);N=y>>3,s-=N,y-=N<<3,g&=(1<<y)-1,e.next_in=s,e.next_out=u,e.avail_in=o>s?5+(o-s):5-(s-o),e.avail_out=f>u?257+(f-u):257-(u-f),i.hold=g,i.bits=y}},{}],35:[function(e,t,n){"use strict";function r(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0
,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new g.Buf16(320),this.work=new g.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=B,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=
t.lendyn=new g.Buf32(dt),t.distcode=t.distdyn=new g.Buf32(vt),t.sane=1,t.back=-1,L):M}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,s(e)):M}function u(e,t){var n,r;return e&&e.state?(r=e.state,0>t?(n=0,t=-t):(n=(t>>4)+1,48>t&&(t&=15)),t&&(8>t||t>15)?M:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,o(e))):M}function a(e,t){var n,r;return e?(r=new i,e.state=r,r.window=null,n=u(e,t),n!==L&&(e.state=null),n):M}function f(e){return a(e,gt)}function l
(e){if(yt){var t;for(v=new g.Buf32(512),m=new g.Buf32(32),t=0;144>t;)e.lens[t++]=8;for(;256>t;)e.lens[t++]=9;for(;280>t;)e.lens[t++]=7;for(;288>t;)e.lens[t++]=8;for(E(x,e.lens,0,288,v,0,e.work,{bits:9}),t=0;32>t;)e.lens[t++]=5;E(T,e.lens,0,32,m,0,e.work,{bits:5}),yt=!1}e.lencode=v,e.lenbits=9,e.distcode=m,e.distbits=5}function c(e,t,n,r){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new g.Buf8(s.wsize)),r>=s.wsize?(g.arraySet(s.window,t,n-s.wsize,s.wsize
,0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),g.arraySet(s.window,t,n-r,i,s.wnext),r-=i,r?(g.arraySet(s.window,t,n-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}function h(e,t){var n,i,s,o,u,a,f,h,p,d,v,m,dt,vt,mt,gt,yt,bt,wt,Et,St,xt,Tt,Nt,Ct=0,kt=new g.Buf8(4),Lt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return M;n=e.state,n.mode===$&&(n.mode=J),u=e.next_out
,s=e.output,f=e.avail_out,o=e.next_in,i=e.input,a=e.avail_in,h=n.hold,p=n.bits,d=a,v=f,xt=L;e:for(;;)switch(n.mode){case B:if(0===n.wrap){n.mode=J;break}for(;16>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if(2&n.wrap&&35615===h){n.check=0,kt[0]=255&h,kt[1]=h>>>8&255,n.check=b(n.check,kt,2,0),h=0,p=0,n.mode=j;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",n.mode=ct;break}if((15&h)!==H){e.msg="unknown compression method",n.mode=ct;break}
if(h>>>=4,p-=4,St=(15&h)+8,0===n.wbits)n.wbits=St;else if(St>n.wbits){e.msg="invalid window size",n.mode=ct;break}n.dmax=1<<St,e.adler=n.check=1,n.mode=512&h?X:$,h=0,p=0;break;case j:for(;16>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if(n.flags=h,(255&n.flags)!==H){e.msg="unknown compression method",n.mode=ct;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=ct;break}n.head&&(n.head.text=h>>8&1),512&n.flags&&(kt[0]=255&h,kt[1]=h>>>8&255,n.check=b(n.check,kt,2,0)),h=0,p=0,n.mode=F;case F
:for(;32>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}n.head&&(n.head.time=h),512&n.flags&&(kt[0]=255&h,kt[1]=h>>>8&255,kt[2]=h>>>16&255,kt[3]=h>>>24&255,n.check=b(n.check,kt,4,0)),h=0,p=0,n.mode=I;case I:for(;16>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}n.head&&(n.head.xflags=255&h,n.head.os=h>>8),512&n.flags&&(kt[0]=255&h,kt[1]=h>>>8&255,n.check=b(n.check,kt,2,0)),h=0,p=0,n.mode=q;case q:if(1024&n.flags){for(;16>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}n.length=h,n.head&&(n.head.extra_len=h),512&
n.flags&&(kt[0]=255&h,kt[1]=h>>>8&255,n.check=b(n.check,kt,2,0)),h=0,p=0}else n.head&&(n.head.extra=null);n.mode=R;case R:if(1024&n.flags&&(m=n.length,m>a&&(m=a),m&&(n.head&&(St=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),g.arraySet(n.head.extra,i,o,m,St)),512&n.flags&&(n.check=b(n.check,i,m,o)),a-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=U;case U:if(2048&n.flags){if(0===a)break e;m=0;do St=i[o+m++],n.head&&St&&n.length<65536&&(n.head.name+=String
.fromCharCode(St));while(St&&a>m);if(512&n.flags&&(n.check=b(n.check,i,m,o)),a-=m,o+=m,St)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=z;case z:if(4096&n.flags){if(0===a)break e;m=0;do St=i[o+m++],n.head&&St&&n.length<65536&&(n.head.comment+=String.fromCharCode(St));while(St&&a>m);if(512&n.flags&&(n.check=b(n.check,i,m,o)),a-=m,o+=m,St)break e}else n.head&&(n.head.comment=null);n.mode=W;case W:if(512&n.flags){for(;16>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if(h!==(65535&n.check)){
e.msg="header crc mismatch",n.mode=ct;break}h=0,p=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=$;break;case X:for(;32>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}e.adler=n.check=r(h),h=0,p=0,n.mode=V;case V:if(0===n.havedict)return e.next_out=u,e.avail_out=f,e.next_in=o,e.avail_in=a,n.hold=h,n.bits=p,O;e.adler=n.check=1,n.mode=$;case $:if(t===C||t===k)break e;case J:if(n.last){h>>>=7&p,p-=7&p,n.mode=at;break}for(;3>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}switch(n
.last=1&h,h>>>=1,p-=1,3&h){case 0:n.mode=K;break;case 1:if(l(n),n.mode=tt,t===k){h>>>=2,p-=2;break e}break;case 2:n.mode=Y;break;case 3:e.msg="invalid block type",n.mode=ct}h>>>=2,p-=2;break;case K:for(h>>>=7&p,p-=7&p;32>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if((65535&h)!==(h>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ct;break}if(n.length=65535&h,h=0,p=0,n.mode=Q,t===k)break e;case Q:n.mode=G;case G:if(m=n.length){if(m>a&&(m=a),m>f&&(m=f),0===m)break e;g.arraySet(s,i,o,m,u),a-=
m,o+=m,f-=m,u+=m,n.length-=m;break}n.mode=$;break;case Y:for(;14>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if(n.nlen=(31&h)+257,h>>>=5,p-=5,n.ndist=(31&h)+1,h>>>=5,p-=5,n.ncode=(15&h)+4,h>>>=4,p-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ct;break}n.have=0,n.mode=Z;case Z:for(;n.have<n.ncode;){for(;3>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}n.lens[Lt[n.have++]]=7&h,h>>>=3,p-=3}for(;n.have<19;)n.lens[Lt[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Tt={bits:n.
lenbits},xt=E(S,n.lens,0,19,n.lencode,0,n.work,Tt),n.lenbits=Tt.bits,xt){e.msg="invalid code lengths set",n.mode=ct;break}n.have=0,n.mode=et;case et:for(;n.have<n.nlen+n.ndist;){for(;Ct=n.lencode[h&(1<<n.lenbits)-1],mt=Ct>>>24,gt=Ct>>>16&255,yt=65535&Ct,!(p>=mt);){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if(16>yt)h>>>=mt,p-=mt,n.lens[n.have++]=yt;else{if(16===yt){for(Nt=mt+2;Nt>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if(h>>>=mt,p-=mt,0===n.have){e.msg="invalid bit length repeat",n.mode=ct;break}
St=n.lens[n.have-1],m=3+(3&h),h>>>=2,p-=2}else if(17===yt){for(Nt=mt+3;Nt>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}h>>>=mt,p-=mt,St=0,m=3+(7&h),h>>>=3,p-=3}else{for(Nt=mt+7;Nt>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}h>>>=mt,p-=mt,St=0,m=11+(127&h),h>>>=7,p-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ct;break}for(;m--;)n.lens[n.have++]=St}}if(n.mode===ct)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=ct;break}if(n.lenbits=9,Tt={bits:n
.lenbits},xt=E(x,n.lens,0,n.nlen,n.lencode,0,n.work,Tt),n.lenbits=Tt.bits,xt){e.msg="invalid literal/lengths set",n.mode=ct;break}if(n.distbits=6,n.distcode=n.distdyn,Tt={bits:n.distbits},xt=E(T,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Tt),n.distbits=Tt.bits,xt){e.msg="invalid distances set",n.mode=ct;break}if(n.mode=tt,t===k)break e;case tt:n.mode=nt;case nt:if(a>=6&&f>=258){e.next_out=u,e.avail_out=f,e.next_in=o,e.avail_in=a,n.hold=h,n.bits=p,w(e,v),u=e.next_out,s=e.output,f=e.avail_out,o=e.next_in
,i=e.input,a=e.avail_in,h=n.hold,p=n.bits,n.mode===$&&(n.back=-1);break}for(n.back=0;Ct=n.lencode[h&(1<<n.lenbits)-1],mt=Ct>>>24,gt=Ct>>>16&255,yt=65535&Ct,!(p>=mt);){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if(gt&&0===(240&gt)){for(bt=mt,wt=gt,Et=yt;Ct=n.lencode[Et+((h&(1<<bt+wt)-1)>>bt)],mt=Ct>>>24,gt=Ct>>>16&255,yt=65535&Ct,!(p>=bt+mt);){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}h>>>=bt,p-=bt,n.back+=bt}if(h>>>=mt,p-=mt,n.back+=mt,n.length=yt,0===gt){n.mode=ut;break}if(32&gt){n.back=-1,n.mode=$;break}
if(64&gt){e.msg="invalid literal/length code",n.mode=ct;break}n.extra=15&gt,n.mode=rt;case rt:if(n.extra){for(Nt=n.extra;Nt>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}n.length+=h&(1<<n.extra)-1,h>>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=it;case it:for(;Ct=n.distcode[h&(1<<n.distbits)-1],mt=Ct>>>24,gt=Ct>>>16&255,yt=65535&Ct,!(p>=mt);){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if(0===(240&gt)){for(bt=mt,wt=gt,Et=yt;Ct=n.distcode[Et+((h&(1<<bt+wt)-1)>>bt)],mt=Ct>>>24,gt=Ct>>>16&255,
yt=65535&Ct,!(p>=bt+mt);){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}h>>>=bt,p-=bt,n.back+=bt}if(h>>>=mt,p-=mt,n.back+=mt,64&gt){e.msg="invalid distance code",n.mode=ct;break}n.offset=yt,n.extra=15&gt,n.mode=st;case st:if(n.extra){for(Nt=n.extra;Nt>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}n.offset+=h&(1<<n.extra)-1,h>>>=n.extra,p-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ct;break}n.mode=ot;case ot:if(0===f)break e;if(m=v-f,n.offset>m){if(m=n.offset-m,
m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ct;break}m>n.wnext?(m-=n.wnext,dt=n.wsize-m):dt=n.wnext-m,m>n.length&&(m=n.length),vt=n.window}else vt=s,dt=u-n.offset,m=n.length;m>f&&(m=f),f-=m,n.length-=m;do s[u++]=vt[dt++];while(--m);0===n.length&&(n.mode=nt);break;case ut:if(0===f)break e;s[u++]=n.length,f--,n.mode=nt;break;case at:if(n.wrap){for(;32>p;){if(0===a)break e;a--,h|=i[o++]<<p,p+=8}if(v-=f,e.total_out+=v,n.total+=v,v&&(e.adler=n.check=n.flags?b(n.check,s,v,u-v):y(n.check
,s,v,u-v)),v=f,(n.flags?h:r(h))!==n.check){e.msg="incorrect data check",n.mode=ct;break}h=0,p=0}n.mode=ft;case ft:if(n.wrap&&n.flags){for(;32>p;){if(0===a)break e;a--,h+=i[o++]<<p,p+=8}if(h!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=ct;break}h=0,p=0}n.mode=lt;case lt:xt=A;break e;case ct:xt=_;break e;case ht:return D;case pt:default:return M}return e.next_out=u,e.avail_out=f,e.next_in=o,e.avail_in=a,n.hold=h,n.bits=p,(n.wsize||v!==e.avail_out&&n.mode<ct&&(n.mode<at||t!==N))&&c(
e,e.output,e.next_out,v-e.avail_out)?(n.mode=ht,D):(d-=e.avail_in,v-=e.avail_out,e.total_in+=d,e.total_out+=v,n.total+=v,n.wrap&&v&&(e.adler=n.check=n.flags?b(n.check,s,v,e.next_out-v):y(n.check,s,v,e.next_out-v)),e.data_type=n.bits+(n.last?64:0)+(n.mode===$?128:0)+(n.mode===tt||n.mode===Q?256:0),(0===d&&0===v||t===N)&&xt===L&&(xt=P),xt)}function p(e){if(!e||!e.state)return M;var t=e.state;return t.window&&(t.window=null),e.state=null,L}function d(e,t){var n;return e&&e.state?(n=e.state,0===(2&n.
wrap)?M:(n.head=t,t.done=!1,L)):M}var v,m,g=e("../utils/common"),y=e("./adler32"),b=e("./crc32"),w=e("./inffast"),E=e("./inftrees"),S=0,x=1,T=2,N=4,C=5,k=6,L=0,A=1,O=2,M=-2,_=-3,D=-4,P=-5,H=8,B=1,j=2,F=3,I=4,q=5,R=6,U=7,z=8,W=9,X=10,V=11,$=12,J=13,K=14,Q=15,G=16,Y=17,Z=18,et=19,tt=20,nt=21,rt=22,it=23,st=24,ot=25,ut=26,at=27,ft=28,lt=29,ct=30,ht=31,pt=32,dt=852,vt=592,mt=15,gt=mt,yt=!0;n.inflateReset=o,n.inflateReset2=u,n.inflateResetKeep=s,n.inflateInit=f,n.inflateInit2=a,n.inflate=h,n.inflateEnd=
p,n.inflateGetHeader=d,n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(e,t){"use strict";var n=e("../utils/common"),r=15,i=852,s=592,o=0,u=1,a=2,f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025
,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,p,v,y,b,w,E){var S,x,T,N,C,L,A,O,M,_=E.bits,D=0,P=0,H=0,B=0,F=0,I=0,q=0,R=0,U=0,z=0,W=null,X=0,V=new n.Buf16(r+1),$=new n.Buf16(r+1),J=null,K=0;for(D=0;r>=D;D++)V[D]=0;for(P=0;v>P;P++)V[t[p+P]]++;for(F=_,B=r;B>=1&&0===V[B];B--);if(F>B&&(F=B),0===B)return y[b++]=20971520,y[b++]=20971520,E.bits=1,0;for(H=1;B>H&&0===V[H];H++)
;for(H>F&&(F=H),R=1,D=1;r>=D;D++)if(R<<=1,R-=V[D],0>R)return-1;if(R>0&&(e===o||1!==B))return-1;for($[1]=0,D=1;r>D;D++)$[D+1]=$[D]+V[D];for(P=0;v>P;P++)0!==t[p+P]&&(w[$[t[p+P]]++]=P);if(e===o?(W=J=w,L=19):e===u?(W=f,X-=257,J=l,K-=257,L=256):(W=c,J=h,L=-1),z=0,P=0,D=H,C=b,I=F,q=0,T=-1,U=1<<F,N=U-1,e===u&&U>i||e===a&&U>s)return 1;for(var Q=0;;){Q++,A=D-q,w[P]<L?(O=0,M=w[P]):w[P]>L?(O=J[K+w[P]],M=W[X+w[P]]):(O=96,M=0),S=1<<D-q,x=1<<I,H=x;do x-=S,y[C+(z>>q)+x]=A<<24|O<<16|M|0;while(0!==x);for(S=1<<D-1
;z&S;)S>>=1;if(0!==S?(z&=S-1,z+=S):z=0,P++,0===--V[D]){if(D===B)break;D=t[p+w[P]]}if(D>F&&(z&N)!==T){for(0===q&&(q=F),C+=H,I=D-q,R=1<<I;B>I+q&&(R-=V[I+q],!(0>=R));)I++,R<<=1;if(U+=1<<I,e===u&&U>i||e===a&&U>s)return 1;T=z&N,y[T]=F<<24|I<<16|C-b|0}}return 0!==z&&(y[C+z]=D-q<<24|64<<16|0),E.bits=F,0}},{"../utils/common":27}],37:[function(e,t){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error"
,"-6":"incompatible version"}},{}],38:[function(e,t,n){"use strict";function r(e){for(var t=e.length;--t>=0;)e[t]=0}function i(e){return 256>e?ot[e]:ot[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function o(e,t,n){e.bi_valid>$-n?(e.bi_buf|=t<<e.bi_valid&65535,s(e,e.bi_buf),e.bi_buf=t>>$-e.bi_valid,e.bi_valid+=n-$):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function u(e,t,n){o(e,n[2*t],n[2*t+1])}function a(e,t){var n=0;do n|=1&e,e>>>=1,n<<=1
;while(--t>0);return n>>>1}function f(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function l(e,t){var n,r,i,s,o,u,a=t.dyn_tree,f=t.max_code,l=t.stat_desc.static_tree,c=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,d=t.stat_desc.max_length,v=0;for(s=0;V>=s;s++)e.bl_count[s]=0;for(a[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;X>n;n++)r=e.heap[n],s=a[2*a[2*r+1]+1]+1,s>d&&(s=d,v++
),a[2*r+1]=s,r>f||(e.bl_count[s]++,o=0,r>=p&&(o=h[r-p]),u=a[2*r],e.opt_len+=u*(s+o),c&&(e.static_len+=u*(l[2*r+1]+o)));if(0!==v){do{for(s=d-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[d]--,v-=2}while(v>0);for(s=d;0!==s;s--)for(r=e.bl_count[s];0!==r;)i=e.heap[--n],i>f||(a[2*i+1]!==s&&(e.opt_len+=(s-a[2*i+1])*a[2*i],a[2*i+1]=s),r--)}}function c(e,t,n){var r,i,s=new Array(V+1),o=0;for(r=1;V>=r;r++)s[r]=o=o+n[r-1]<<1;for(i=0;t>=i;i++){var u=e[2*i+1];0!==u&&(e[2*i]=a(s[u]++,
u))}}function h(){var e,t,n,r,i,s=new Array(V+1);for(n=0,r=0;q-1>r;r++)for(at[r]=n,e=0;e<1<<Z[r];e++)ut[n++]=r;for(ut[n-1]=r,i=0,r=0;16>r;r++)for(ft[r]=i,e=0;e<1<<et[r];e++)ot[i++]=r;for(i>>=7;z>r;r++)for(ft[r]=i<<7,e=0;e<1<<et[r]-7;e++)ot[256+i++]=r;for(t=0;V>=t;t++)s[t]=0;for(e=0;143>=e;)it[2*e+1]=8,e++,s[8]++;for(;255>=e;)it[2*e+1]=9,e++,s[9]++;for(;279>=e;)it[2*e+1]=7,e++,s[7]++;for(;287>=e;)it[2*e+1]=8,e++,s[8]++;for(c(it,U+1,s),e=0;z>e;e++)st[2*e+1]=5,st[2*e]=a(e,5);lt=new pt(it,Z,R+1,U,V),
ct=new pt(st,et,0,z,V),ht=new pt(new Array(0),tt,0,W,J)}function p(e){var t;for(t=0;U>t;t++)e.dyn_ltree[2*t]=0;for(t=0;z>t;t++)e.dyn_dtree[2*t]=0;for(t=0;W>t;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*K]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function d(e){e.bi_valid>8?s(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function v(e,t,n,r){d(e),r&&(s(e,n),s(e,~n)),O.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function m(e,t,n,r){var i=2*t,s=2*
n;return e[i]<e[s]||e[i]===e[s]&&r[t]<=r[n]}function g(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&m(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!m(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function y(e,t,n){var r,s,a,f,l=0;if(0!==e.last_lit)do r=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],s=e.pending_buf[e.l_buf+l],l++,0===r?u(e,s,t):(a=ut[s],u(e,a+R+1,t),f=Z[a],0!==f&&(s-=at[a],o(e,s,f)),r--,a=i(r),u(e,a,n),f=et[a],0!==f&&(r-=ft[a],o(e,r,f))
);while(l<e.last_lit);u(e,K,t)}function b(e,t){var n,r,i,s=t.dyn_tree,o=t.stat_desc.static_tree,u=t.stat_desc.has_stree,a=t.stat_desc.elems,f=-1;for(e.heap_len=0,e.heap_max=X,n=0;a>n;n++)0!==s[2*n]?(e.heap[++e.heap_len]=f=n,e.depth[n]=0):s[2*n+1]=0;for(;e.heap_len<2;)i=e.heap[++e.heap_len]=2>f?++f:0,s[2*i]=1,e.depth[i]=0,e.opt_len--,u&&(e.static_len-=o[2*i+1]);for(t.max_code=f,n=e.heap_len>>1;n>=1;n--)g(e,s,n);i=a;do n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],g(e,s,1),r=e.heap[1],e.heap[--e.heap_max
]=n,e.heap[--e.heap_max]=r,s[2*i]=s[2*n]+s[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,s[2*n+1]=s[2*r+1]=i,e.heap[1]=i++,g(e,s,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],l(e,t),c(s,f,e.bl_count)}function w(e,t,n){var r,i,s=-1,o=t[1],u=0,a=7,f=4;for(0===o&&(a=138,f=3),t[2*(n+1)+1]=65535,r=0;n>=r;r++)i=o,o=t[2*(r+1)+1],++u<a&&i===o||(f>u?e.bl_tree[2*i]+=u:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[2*Q]++):10>=u?e.bl_tree[2*G]++:e.bl_tree[2*Y]++,u=0,s=i,0===o?(a=138,f=3
):i===o?(a=6,f=3):(a=7,f=4))}function E(e,t,n){var r,i,s=-1,a=t[1],f=0,l=7,c=4;for(0===a&&(l=138,c=3),r=0;n>=r;r++)if(i=a,a=t[2*(r+1)+1],!(++f<l&&i===a)){if(c>f){do u(e,i,e.bl_tree);while(0!==--f)}else 0!==i?(i!==s&&(u(e,i,e.bl_tree),f--),u(e,Q,e.bl_tree),o(e,f-3,2)):10>=f?(u(e,G,e.bl_tree),o(e,f-3,3)):(u(e,Y,e.bl_tree),o(e,f-11,7));f=0,s=i,0===a?(l=138,c=3):i===a?(l=6,c=3):(l=7,c=4)}}function S(e){var t;for(w(e,e.dyn_ltree,e.l_desc.max_code),w(e,e.dyn_dtree,e.d_desc.max_code),b(e,e.bl_desc),t=W-1
;t>=3&&0===e.bl_tree[2*nt[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function x(e,t,n,r){var i;for(o(e,t-257,5),o(e,n-1,5),o(e,r-4,4),i=0;r>i;i++)o(e,e.bl_tree[2*nt[i]+1],3);E(e,e.dyn_ltree,t-1),E(e,e.dyn_dtree,n-1)}function T(e){var t,n=4093624447;for(t=0;31>=t;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return _;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return D;for(t=32;R>t;t++)if(0!==e.dyn_ltree[2*t])return D;return _}function N(e){vt||(h(),vt=!0),e.l_desc=new dt(e.dyn_ltree
,lt),e.d_desc=new dt(e.dyn_dtree,ct),e.bl_desc=new dt(e.bl_tree,ht),e.bi_buf=0,e.bi_valid=0,p(e)}function C(e,t,n,r){o(e,(H<<1)+(r?1:0),3),v(e,t,n,!0)}function k(e){o(e,B<<1,3),u(e,K,it),f(e)}function L(e,t,n,r){var i,s,u=0;e.level>0?(e.strm.data_type===P&&(e.strm.data_type=T(e)),b(e,e.l_desc),b(e,e.d_desc),u=S(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,i>=s&&(i=s)):i=s=n+5,i>=n+4&&-1!==t?C(e,t,n,r):e.strategy===M||s===i?(o(e,(B<<1)+(r?1:0),3),y(e,it,st)):(o(e,(j<<1)+(r?1:0),3),x(e,e.l_desc.max_code+1
,e.d_desc.max_code+1,u+1),y(e,e.dyn_ltree,e.dyn_dtree)),p(e),r&&d(e)}function A(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(ut[n]+R+1)]++,e.dyn_dtree[2*i(t)]++),e.last_lit===e.lit_bufsize-1}var O=e("../utils/common"),M=4,_=0,D=1,P=2,H=0,B=1,j=2,F=3,I=258,q=29,R=256,U=R+1+q,z=30,W=19,X=2*U+1,V=15,$=16,J=7,K=256,Q=16,G=17,Y=18,Z=[0
,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],et=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],tt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],nt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],rt=512,it=new Array(2*(U+2));r(it);var st=new Array(2*z);r(st);var ot=new Array(rt);r(ot);var ut=new Array(I-F+1);r(ut);var at=new Array(q);r(at);var ft=new Array(z);r(ft);var lt,ct,ht,pt=function(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r
,this.max_length=i,this.has_stree=e&&e.length},dt=function(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t},vt=!1;n._tr_init=N,n._tr_stored_block=C,n._tr_flush_block=L,n._tr_tally=A,n._tr_align=k},{"../utils/common":27}],39:[function(e,t){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}]},{},[9])(9)}),define("services/utils/debugUtils"
,["require","exports","module","angular","jszip"],function(e,t,n){"use strict";var r=e("angular"),i="appendFileSync",s="existsSync",o="mkdirSync",u="readFileSync",a="renameSync",f="statSync",l="unlinkSync",c="writeFileSync",h=["$q","$translate","csInterface","designLibraryManager","designLibraryElements",function(t,n,r,i,s){function f(e){var t=0;return e.forEach(function(e){e.representations.forEach(function(e){t+=e.getContentLength()||0})}),t}function l(e){var t="B";return e>1024&&(e/=1024,t="KB"
,e>1024&&(e/=1024,t="MB")),Math.round(e)+" "+t}function h(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function p(e){var t=new Date(e);return t.getMonth()+1+"-"+t.getDate()+"-"+t.getFullYear()}function d(e){var t=new Date(e),n=t.getMinutes();return t.getHours()+":"+(n<=9?"0":"")+n}function v(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function m(e,t){return e=e.replace(/[<>:"\/\\|?*\x00-\x1F]/g,"_").trim(),e&&e!==""?e:t
}function g(e){var t;r.isWindowsOS()?(t="start",e=e.replace(/\//g,"\\")):t="/usr/bin/open",window.cep.process.createProcess(t,e)}function y(e){try{return o[u](e)}catch(t){return"Could not read "+e+"\n\n"+t.toString()}}var o=nodeRequire("fs"),a=e("jszip");this.viewLibrariesInfo=function(){var e=i.getCurrentLibraryCollection().libraries.slice();e.sort(function(e,t){return e.name<t.name?-1:e.name>t.name?1:0});var t=[],n=Date.now();t.push('<HTML><HEAD style="font-family:sans-serif;"><TITLE>'),t.push("My CC Libraries"
),t.push('</TITLE></HEAD><body style="font-family:sans-serif"><H1>'),t.push("My CC Libraries"),t.push("</H1><p>"),t.push(e.length+" libraries, "+p(n)+" "+d(n)),t.push('</p><table BORDER=1 CELLPADDING=4 CELLSPACING=1 RULES=ROWS FRAME=HSIDES BORDERCOLOR="#EEEEEE" style="font-size:small"><tr>'),t.push("<th>&nbsp</th>"),t.push("<th>Elements</th>"),t.push("<th>Data size</th>"),t.push("<th>Last modified</th>"),t.push("<th>Collaboration</th>"),t.push("<th>ID</th>"),t.push("</tr>"),e.forEach(function(e){
t.push("<tr><td>"),t.push(v(e.name)),t.push('</td><td align="right">'),t.push(e.elements.length),t.push('</td><td align="right">'),t.push(h(f(e.elements))),t.push('</td><td align="right">'),t.push(p(e.modified)),t.push("</td><td>"),t.push(e.collaboration||"&nbsp"),t.push("</td><td>"),t.push(e.id),t.push("</td></tr>")}),t.push("</table></BODY></HTML>");var s="writeFileSync",u=r.getSystemPath(SystemPath.MY_DOCUMENTS)+"/AllLibrariesInfo.html";o[s](u,t.join("\n")),r.isWindowsOS()&&alert("Information saved to "+
u),g(u)},this.viewLibraryInfo=function(){var e=i.getCurrentLibrary(),t=[];t.push("Current Library Information"),t.push("Name: "+e.name);var o=l(f(e.elements));t.push("Elements: "+e.elements.length+" ("+o+")");var u=s.getElementTypes();u.forEach(function(r){var i=n.instant(s.getDisplayName(r)),o=e.getFilteredElements(r);if(o.length>0){var u=f(o);t.push("    "+i+": "+o.length+" ("+u+")")}}),r.showError(t.join("\n"))},this.viewElementInfo=function(){var e=i.getCurrentLibrary(),t=[],u=Date.now();t.push
('<HTML><HEAD style="font-family:sans-serif;"><TITLE>'),t.push('Contents of "'+e.name+'"'),t.push('</TITLE></HEAD><body style="font-family:sans-serif"><H1>'),t.push('Contents of "'+e.name+'"'),t.push("</H1><p>"),t.push(e.elements.length+" elements, "+p(u)+" "+d(u)),t.push('</p><table BORDER=1 CELLPADDING=4 CELLSPACING=1 RULES=ROWS FRAME=HSIDES BORDERCOLOR="#EEEEEE" style="font-size:small"><tr>'),t.push("<th>Type</th>"),t.push("<th>Name</th>"),t.push("<th>Last modified</th>"),t.push("<th>ID</th>")
,t.push("</tr>");var a=s.getElementTypes();a.forEach(function(r){var i=n.instant(s.getDisplayName(r)),o=e.getFilteredElements(r);o.length>0&&(o.sort(function(e,t){return(e.name||"")<(t.name||"")?-1:(e.name||"")>(t.name||"")?1:0}),o.forEach(function(e){var n=e.name;n&&n.length>100&&(n=n.substr(0,100)+"..."),t.push("<tr><td>"),t.push(i),t.push("</td><td>"),t.push(n||"&nbsp"),t.push("</td><td>"),t.push(p(e.modified)),t.push("</td><td>"),t.push(e.id),t.push("</td></tr>")}))}),t.push("</table></BODY></HTML>"
);var f="writeFileSync",l=r.getSystemPath(SystemPath.MY_DOCUMENTS)+"/"+m(e.name,"Library contents")+".html";o[f](l,t.join("\n")),r.isWindowsOS()&&alert("Information saved to "+l),g(l)},this.showLocalRoot=function(){r.isWindowsOS()&&alert("Folder is "+r.getLocalRoot()),g(r.getLocalRoot())},this.saveDebugInfo=function(){try{var e=new a,t=e.folder("CC Libraries Debug Info"),n,i=r.getSystemPath(SystemPath.MY_DOCUMENTS)+(r.isWindowsOS()?"/../AppData/Local/Adobe/Creative Cloud Libraries/Logs/log.txt":"/../Library/Logs/Adobe Creative Cloud Libraries/log.txt"
);n=y(r.getLocalRoot()+"log_jsx.txt"),t.file("log_jsx.txt",n),n=y(r.getLocalRoot()+"log.txt"),t.file("log.txt",n),n=y(r.getLocalRoot()+"log_prev.txt"),t.file("log_prev.txt",n),n=y(r.getLocalRoot()+"settings.json"),t.file("settings.json",n),n=y(r.getGlobalRoot()+"LIBS/settings.json"),t.file("LIBS_settings.json",n),n=y(r.getGlobalRoot()+"LIBS/librarylookupfile"),t.file("LIBS_librarylookupfile",n),n=y(i),t.file("CCLibrary_log.txt",n);var s=e.generate({type:"nodebuffer"}),u=r.getSystemPath(SystemPath
.MY_DOCUMENTS)+"/debuginfo.zip";o[c](u,s),alert("Debug information saved to "+u)}catch(f){alert("Failed to create debug info file\n\n"+f)}}}];t.attach=function(e){r.module(e).service("debugUtils",h)}}),define("services/utils/main",["require","exports","module","./apiHttpInterceptor","./colorUtils","./debugLog","./digestUtils","./fileUtils","./linkUtils","./listenerUtils","./mediator","./recursionHelper","./tether","./adobeStockUtils","./importExport","./debugUtils"],function(e,t,n){"use strict";function r
(t){e("./apiHttpInterceptor").attach(t),e("./colorUtils").attach(t),e("./debugLog").attach(t),e("./digestUtils").attach(t),e("./fileUtils").attach(t),e("./linkUtils").attach(t),e("./listenerUtils").attach(t),e("./mediator").attach(t),e("./recursionHelper").attach(t),e("./tether").attach(t),e("./adobeStockUtils").attach(t),e("./importExport").attach(t),e("./debugUtils").attach(t)}return{attach:r}}),define("services/main",["require","exports","module","./config/main","./designlibrary/main","./external/main"
,"./interface/main","./managers/main","./utils/main"],function(e,t,n){"use strict";t.attach=function(t){e("./config/main").attach(t),e("./designlibrary/main").attach(t),e("./external/main").attach(t),e("./interface/main").attach(t),e("./managers/main").attach(t),e("./utils/main").attach(t)}}),define("directives/core/dragDrop",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular");window.jQuery&&!window.jQuery.event.props.dataTransfer&&window.jQuery.event.props.push
("dataTransfer");var i=["$parse","mediator","versionManager","configuration","metrics","designLibrarySelection","designLibraryElements","digestUtils",function(e,t,n,i,s,o,u,a){return{restrict:"A",link:function(f,l,c){var h=c.dragChannel?c.dragChannel.split(" "):["defaultchannel"],p=c.onDropSuccess&&e(c.onDropSuccess),d=c.onDrag&&e(c.onDrag),v=c.centerDragImage!==undefined,m=t.register(f),g=function(t){t.stopPropagation(),s.setDraggedElements(undefined);if(c.dragData){var p=e(c.dragData)(f);p&&(t.
dataTransfer.setData("Text",r.toJson(p)),h.forEach(function(e){m.emit("ANGULAR_DRAG_START_"+e,t)}),a.triggerDigest())}var v=o.getSelection();v.length<=1&&(v=[e(c.dragComponent)(f)]);var g=[],y=[];v.forEach(function(e){if(u.isDraggable(e)){var t=u.getDragData(e);t&&(y.push({element:e,usedRepresentation:t.representation}),g.push(t.asset))}}),s.setDraggedElements(y);var b={source:i.DRAGDROP_SOURCE,version:n.getPluginVersion(),assetList:g};t.dataTransfer.setData(i.DRAGDROP_ID,JSON.stringify(b)),d&&(d
(f,{$event:t}),a.triggerDigest());if(t.dataTransfer.setDragImage){var w=l.context;t.dataTransfer.setDragImage(w,-10,-10)}},y=function(e){e.stopPropagation(),p&&p(),a.triggerDigest()};l.on("dragstart",g),l.on("dragend",y),f.$watch(c.uiDraggable,function(e){e?l.attr("draggable",!0):l.attr("draggable",!1)}),f.$on("$destroy",function(){l.off("dragstart",g),l.off("dragend",y),g=undefined,y=undefined,l=undefined})}}}],s=["$parse","$interval","mediator","digestUtils",function(e,t,n,i){return{restrict:"A"
,link:function(t,s,o){function h(e){var t=s.context,n=e;while(n){if(n===t)return!0;n=n.parentNode}}function d(e){var t=e.target||e.srcElement,n=p.leftTargets.indexOf(t);n!==-1?p.leftTargets.splice(n,1):p.targets.push(t)}function v(e){var t=e.target||e.srcElement,n=p.targets.indexOf(t);n!==-1?p.targets.splice(n,1):p.leftTargets.push(t)}function m(){p.targets=[],p.leftTargets=[]}function g(){return p.targets.length===1&&p.leftTargets.length===0}function y(){return p.targets.length===0&&p.leftTargets
.length===0}function b(){p.draggedOver=!0}function S(e){function n(n){n.preventDefault(),n.dataTransfer.dropEffect="copy",b(),a&&(a(t,{$event:n,channel:e}),i.triggerDigest())}function o(n){d(n),g()&&(n.preventDefault(),f&&(f(t,{$event:n,channel:e}),i.triggerDigest()),s.addClass("drag-hovering"))}function u(n){v(n),y()&&(n.preventDefault(),l&&(l(t,{$event:n,channel:e}),i.triggerDigest()),s.removeClass("drag-hovering"))}function h(n){n.preventDefault(),m(),s.removeClass("drag-hovering");if(n.originalEvent
.handled){l&&(l(t,{$event:n,channel:e}),i.triggerDigest());return}if(c){try{var o=r.fromJson(n.dataTransfer.getData("Text"));c(t,{$data:o,$event:n,channel:e}),i.triggerDigest()}catch(u){l&&(l(t,{$event:n,channel:e}),i.triggerDigest())}n.originalEvent.handled=!0}}return{onDragOver:n,onDragEnter:o,onDragLeave:u,onDrop:h}}var u=o.dropChannel?o.dropChannel.split(" "):["defaultchannel"],a=o.onDragOver&&e(o.onDragOver),f=o.onDragEnter&&e(o.onDragEnter),l=o.onDragLeave&&e(o.onDragLeave),c=o.onDrop&&e(o.
onDrop),p={draggedOver:!1,targets:[],leftTargets:[]},w=!0;t.$watch(o.uiDroppable,function(e){w=e});var E=n.register(t);u.forEach(function(e){var n=S(e),r,i=function(){s.off("dragover",n.onDragOver),s.off("dragenter",n.onDragEnter),s.off("dragleave",n.onDragLeave),s.off("drop",n.onDrop)};E.on("ANGULAR_DRAG_START_"+e,function(e,t){w&&!h(t.target)&&(s.on("dragover",n.onDragOver),s.on("dragenter",n.onDragEnter),s.on("dragleave",n.onDragLeave),s.on("drop",n.onDrop))}),E.on("ANGULAR_DRAG_END_"+e,function(
n){i(),m(),s.removeClass("drag-hovering"),l&&l(t,{$event:n,channel:e})}),t.$on("$destroy",i)})}}}];t.attach=function(e){r.module(e).directive("uiDraggable",i),r.module(e).directive("uiDroppable",s)}}),define("directives/core/dropFiles",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular");window.addEventListener("dragover",function(e){e.preventDefault()},!1),window.addEventListener("drop",function(e){e.preventDefault()},!1);var i=["$parse","configuration",function(
e,t){return{restrict:"A",scope:{dropTypes:"@",dropSources:"@",dropFolder:"=",dropFile:"=",onDragEnter:"&",onDragLeave:"&",onDrop:"&",onDragOver:"&"},link:function(n,r,i){function u(e){var t=e.target||e.srcElement,n=o.indexOf(t);n!==-1?o.splice(n,1):s.push(t)}function a(e){var t=e.target||e.srcElement,n=s.indexOf(t);n!==-1?s.splice(n,1):o.push(t)}function f(){s=[],o=[]}function l(){return s.length===1&&o.length===0}function c(){return s.length===0&&o.length===0}function h(r){var i=e(n.dropTypes)(n
)||["Files","application/x-moz-file","public.file-url"],s=e(n.dropSources)(n)||undefined,o=r.originalEvent.dataTransfer.types,u=r.originalEvent.dataTransfer.files,a=!0,f={};u&&u.length>0&&(!i||i.indexOf("Files")>-1)&&(f.files=u);if(s){a=!1;try{var l=r.originalEvent.dataTransfer.getData(t.DRAGDROP_ID),c=l&&JSON.parse(l);a=s.indexOf(c.source)>-1,f.data=a?c:undefined}catch(h){}}var p=!1;if(o){var d;for(d=0;d<i.length;d++)if(o.indexOf(i[d])>-1){p=!0;break}}if(p&&(a||f.files))return f}function p(e){var t=
h(e);t&&(e.preventDefault(),e.dataTransfer.dropEffect="copy",n.onDragOver&&n.onDragOver({$data:t}))}function d(e){var t=h(e);t&&(u(e),e.preventDefault(),l()&&(n.$apply(function(){n.onDragEnter&&n.onDragEnter({$data:t})}),r.addClass("drag-hovering")))}function v(e){var t=h(e);t&&(a(e),e.preventDefault(),c()&&(n.$apply(function(){n.onDragLeave&&n.onDragLeave({$data:t})}),r.removeClass("drag-hovering")))}function m(e){var t=h(e);if(t){e.preventDefault(),f(),r.removeClass("drag-hovering");if(e.originalEvent
.handled){n.$apply(function(){n.onDragLeave&&n.onDragLeave({$data:t})});return}n.$apply(function(){n.onDrop&&n.onDrop({$data:t})}),e.originalEvent.handled=!0}}var s=[],o=[];r.on("dragenter",d),r.on("dragover",p),r.on("dragleave",v),r.on("drop",m),n.$on("$destroy",function(){r.off("dragenter",d),r.off("dragover",p),r.off("dragleave",v),r.off("drop",m)})}}}];t.attach=function(e){r.module(e).directive("edgeccDropFiles",i)}}),define("directives/core/focus",["require","exports","module","angular"],function(
e,t,n){"use strict";function s(e,t,n){var r=t.split("."),i=e;if(r.length>1){var s;for(s=0;s<r.length-1;s++)i[r[s]]=i[r[s]]||{},i=i[r[s]]}i[r[r.length-1]]=n}var r=e("angular"),i,o=["$parse","digestUtils","$window",function(e,t,n){return{restrict:"A",link:function(e,t,r){var i=r.edgeccSetFocus||"setFocus";s(e,i,function(e,r,i){var s=i?250:0;n.setTimeout(function(){var n=t.get(0);e?(n.focus(),r&&n.select()):n.blur()},s)})}}}];t.attach=function(e){r.module(e).directive("edgeccSetFocus",o)}}),define("directives/core/hover"
,["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$parse",function(e){return{restrict:"A",link:function(t,n,r){var i=r.edgeccHover||"hover",s=r.onHoverEnter&&e(r.onHoverEnter),o=r.onHoverLeave&&e(r.onHoverLeave),u=function(e){n.addClass(i),s&&s(t,{})},a=function(e){n.removeClass(i),o&&o(t,{})};n.on("mouseenter",u),n.on("mouseleave",a),t.$on("$destroy",function(){n.off("mouseenter",u),n.off("mouseleave",a)})}}}];t.attach=function(e){r.module(e).directive
("edgeccHover",i)}}),define("directives/core/isEventTarget",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=[function(){return{restrict:"A",link:function(e,t,n){function r(e,t){var n=e,r=t;while(r){if(r===n)return!0;r=r.parentNode}return!1}var i=n.isEventTarget||"isEventTarget";e[i]=function(e){return r(t.context,e.target)}}}}];t.attach=function(e){r.module(e).directive("isEventTarget",i)}}),define("directives/core/measureSize",["require","exports","module"
,"angular"],function(e,t,n){"use strict";var r=e("angular"),i=[function(){return{restrict:"A",link:function(e,t,n){var r=n.edgeccMeasureSize||"measureSize";e[r]=function(e){return e?t.parent().get(0).getBoundingClientRect():t.get(0).getBoundingClientRect()}}}}];t.attach=function(e){r.module(e).directive("edgeccMeasureSize",i)}}),define("directives/core/scrolling",["require","exports","module","angular"],function(e,t,n){"use strict";function i(e,t,n){var r=t.split("."),i=e;if(r.length>1){var s;for(
s=0;s<r.length-1;s++)i[r[s]]=i[r[s]]||{},i=i[r[s]]}i[r[r.length-1]]=n}var r=e("angular"),s=["$window","digestUtils",function(e,t){return{restrict:"A",link:function(n,r,s){var o=s.edgeccScrollToBottom||"scrollToBottom";i(n,o,function(){var n=r.get(0);e.setTimeout(function(){n.scrollTop=n.scrollHeight,t.triggerDigest()})})}}}],o=[function(){return{restrict:"A",link:function(e,t,n){var r=n.edgeccGetScrollPosition||"getScrollPosition";i(e,r,function(){var e=t.get(0);if(e.scrollHeight>e.clientHeight)return e
.scrollTop/(e.scrollHeight-e.clientHeight)})}}}];t.attach=function(e){r.module(e).directive("edgeccScrollToBottom",s),r.module(e).directive("edgeccGetScrollPosition",o)}}),define("directives/core/nativeContextMenu",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["$parse","designLibraryContextMenu",function(e,t){return{restrict:"A",link:function(n,r,i){var s=i.nativeContextMenu&&e(i.nativeContextMenu),o=i.contextMenuSubElement&&e(i.contextMenuSubElement)
,u=function(e){e.stopPropagation();var r=s&&s(n),i=r&&r._library,u=o&&o(n);t.showContextMenu(i,r,u)};r.on("contextmenu",u),n.$on("$destroy",function(){r.off("contextmenu",u),u=undefined,r=undefined})}}}];t.attach=function(e){r.module(e).directive("nativeContextMenu",i)}}),define("directives/core/onimgload",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=[function(){return{restrict:"A",link:function(e,t,n){t.bind("load",function(t){e.$eval(n.onimgload,{img
:t.target})})}}}];t.attach=function(e){r.module(e).directive("onimgload",i)}}),define("directives/core/main",["require","exports","module","./dragDrop","./dropFiles","./focus","./hover","./isEventTarget","./measureSize","./scrolling","./nativeContextMenu","./onimgload"],function(e,t,n){"use strict";t.attach=function(t){e("./dragDrop").attach(t),e("./dropFiles").attach(t),e("./focus").attach(t),e("./hover").attach(t),e("./isEventTarget").attach(t),e("./measureSize").attach(t),e("./scrolling").attach
(t),e("./nativeContextMenu").attach(t),e("./onimgload").attach(t)}}),define("directives/designlibrary/designLibrary",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i,s=[function(){return{restrict:"E",templateUrl:"directives/designlibrary/templates/designLibrary.tmpl.html",replace:!0,scope:{},controller:["$scope","$translate","metrics","designLibraryManager","designLibraryViewState","designLibraryFlyoutMenu","designLibraryCEPEventHandlers","adobeStockUtils"
,"linkUtils","digestUtils","$window",function(e,t,n,r,i,s,o,u,a,f,l){e.searchText="",e.sortExpression="+created",e.searchBoxFocus=!1,e.selectedLibraryChanged=function(){e.library&&(n.reportPanelEvent("loadLibrary",{libraryID:e.library.id}),r.setCurrentLibrary(e.library)),e.searchBoxFocus=!0},r.addScopedListener(e,"currentCollection",function(){e.libraryCollection=r.getCurrentLibraryCollection()}),e.libraryCollection=r.getCurrentLibraryCollection(),r.addScopedListener(e,"currentLibrary",function()
{e.library=r.getCurrentLibrary()}),e.library=r.getCurrentLibrary(),s.addScopedListener(e,"createLibrary",function(){e.showCreateDialog()}),s.addScopedListener(e,"deleteLibrary",function(){e.showDeleteDialog()}),s.addScopedListener(e,"renameLibrary",function(){e.showSettingsDialog()}),u.addScopedListener(e,"confirmStockPurchase",function(t,r,i,s,o){t?e.showStockPurchaseDialog(t,r,i,s,o):i&&(a.launchLicenseURL(i),n.reportCheckoutElement(r,o,"stock site;confirm"))}),u.addScopedListener(e,"stockPurchaseError"
,function(t,n){e.showStockPurchaseDialog(n)}),u.addScopedListener(e,"stockPurchaseComplete",function(t,n){n?a.launchLicenseURL(n):e.libraryCollection.sync()}),e.hideDialogs=function(t){t||i.resetMode(),e.createDialog.visible=!1,e.settingsDialog.visible=!1,e.deleteDialog.visible=!1},e.createDialog={visible:!1},e.showCreateDialog=function(){n.reportPanelEvent("createLibraryInitiate"),e.newItem={},e.hideDialogs(),e.createDialog.visible=!0,l.setTimeout(function(){e.createDialog.setFocus(!0,!1,!0)})},
e.createDesignLibrary=function(){e.createDialog.visible=!1;var t=e.libraryCollection.createLibrary(e.newItem.name);r.setCurrentLibrary(t)},e.editItem={},e.settingsDialog={visible:!1},e.showSettingsDialog=function(){e.hideDialogs(),e.settingsDialog.visible=!0,e.editItem.name=e.library.name,l.setTimeout(function(){e.settingsDialog.setFocus(!0,!0,!0)})},e.updateDesignLibrary=function(){n.reportPanelEvent("editLibraryName",{libraryID:e.library.id}),e.hideDialogs(),e.settingsDialog.visible=!1,e.library
.name=e.editItem.name},e.deleteDialog={title:"",text:"",btnTitle:"",visible:!1},e.showDeleteDialog=function(){e.hideDialogs();var n="DL_DELETE_LIBRARY",r="DL_DELETE_MESSAGE",i="DL_DELETE";e.library.collaboration==="incoming"?(n="DL_LEAVE_LIBRARY",r="DL_LEAVE_MESSAGE",i="DL_LEAVE"):e.library.collaboration==="outgoing"&&(r="DL_DELETE_MESSAGE_SHARED"),e.deleteDialog.title=t.instant(n,e.library),e.deleteDialog.text=t.instant(r,e.library),e.deleteDialog.btnTitle=t.instant(i,e.library),e.deleteDialog.visible=!0
},e.deleteCurrentLibrary=function(){e.deleteDialog.visible=!1,r.deleteCurrentLibrary()},e.stockPurchaseDialog={text:"",visible:!1,element:null,url:null,state:null},e.showStockPurchaseDialog=function(n,r,i,s,o){e.hideDialogs(),e.stockPurchaseDialog.element=r,e.stockPurchaseDialog.url=i,e.stockPurchaseDialog.state=s,e.stockPurchaseDialog.cartId=o,!r&&!i?(e.stockPurchaseDialog.cancelText=null,e.stockPurchaseDialog.text=t.instant(n)):(e.stockPurchaseDialog.cancelText=t.instant("DL_CANCEL"),e.stockPurchaseDialog
.text=n),e.stockPurchaseDialog.visible=!0},e.confirmStockPurchase=function(){e.stockPurchaseDialog.visible=!1,e.stockPurchaseDialog.url?(a.launchLicenseURL(e.stockPurchaseDialog.url),n.reportCheckoutElement(e.stockPurchaseDialog.element,e.stockPurchaseDialog.cartId,"stock site;purchase")):e.stockPurchaseDialog.element&&u.purchaseLicenseForImage(e.stockPurchaseDialog.element)},e.cancelStockPurchase=function(){e.stockPurchaseDialog.visible=!1,e.stockPurchaseDialog.element&&e.stockPurchaseDialog.state&&
u.cancelLicenseImage(e.stockPurchaseDialog.element,e.stockPurchaseDialog.state)},e.uiState=i.getState(),e.showRelinkOverlay=!0,e.$watch("uiState.mode",function(t){t!=="normal"&&(e.hideDialogs(!0),t==="relink"&&(e.showRelinkOverlay=!0))}),e.onMouseEnter=function(){e.showRelinkOverlay=!1},e.setViewState=function(e){i.setViewState(e)},e.search={visible:!1,searchText:""},e.toggleSearch=function(){e.search.visible=!e.search.visible,e.search.visible?(e.searchText=e.search.text,e.searchBoxFocus=!0,l.setTimeout
(function(){e.search.setFocus(!0,!0,!0)})):(e.search.text=e.searchText,e.searchText="")},e.isValidName=function(e){return e&&e.length>0?!0:!1},e.onCreateLibKeyDown=function(t,n){e.newItem.name=t.target.value,t.keyCode===13&&e.isValidName(e.newItem.name)&&e.createDesignLibrary()},e.onRenameLibKeyDown=function(t,n){e.editItem.name=t.target.value,t.keyCode===13&&e.isValidName(e.editItem.name)&&e.updateDesignLibrary()}}]}}];t.attach=function(e){r.module(e).directive("edgeccDesignLibrary",s)}}),define
("directives/designlibrary/designLibraryComponent",["require","exports","module","angular"],function(e,t,n){"use strict";function i(e,t){return"<"+e+' component="::component"></'+e+">"}var r=e("angular"),s=["$compile","$parse","designLibraryElements",function(e,t,n){function s(t,s){if(!r[s]){var o="<div></div>",u=n.getDirective(s);u&&(o=i(u));var a=t.clone();a.html(o),r[s]=e(a.contents())}return r[s]}var r={};return{restrict:"E",scope:!1,compile:function(e,n){return function(n,r){var i=t("component"
)(n).type,o=s(e,i);o(n,function(e){r.append(e)})}}}}];t.attach=function(e){r.module(e).directive("edgeccDesignLibraryComponent",s)}}),define("directives/designlibrary/designLibraryContents",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=[function(){return{restrict:"E",templateUrl:"directives/designlibrary/templates/designLibraryContents.tmpl.html",replace:!1,scope:{library:"=",searchText:"=",filteredItems:"="},controller:["$scope","$q","designLibrarySelection"
,"designLibraryElements","configuration","designLibraryUtils","designLibraryManager","fileUtils","$translate","designLibraryDragUtils","designLibraryViewState",function(e,t,n,r,i,s,o,u,a,f,l){e.uiState=l.getState(),e.categories=r.getElementTypes(),e.clickOutsideComponent=function(e){n.clearSelection()},e.allowedDropTypes=[i.DRAGDROP_ID],e.allowedDropSources=[i.currentProduct.config.dragDropSource],e.onLayerDrop=function(t){e.isDraggingLayer=!1,e.isDraggingLayerToLink=!1,e.dropMessage=null;if(!e.isDropAllowed
)return;var n;i.currentProduct.dropHandler&&(n=i.currentProduct.dropHandler(t)),n||f.addElementsFromDropData(t)},e.onLayerDragEnter=function(t){l.resetMode(),e.isDraggingLayer=!0,e.isDraggingLayerToLink=!1,e.dropMessage=null,e.layerNames=[],e.isDropAllowed=s.canAddElement(e.library);if(!e.isDropAllowed){e.dropMessage=a.instant("DL_DESIGN_LIBRARY_HAS_LIMIT");return}var n=t.data,r=t.files;if(n){e.dropMessage=n.feedback,e.isDraggingLayerToLink=n.linked,e.isDropAllowed=n.assetList&&n.assetList.length>0
,e.isDropAllowed&&(n.assetList[0].hasOwnProperty("name")?e.layerNames.push(n.assetList[0].name):s.getLayerName(e.library).then(function(t){e.layerNames.push(t)}));return}if(r){var i=0,o=3,f=0;for(i=0;i<r.length;i++)u.isUploadableFile(r[i].name)&&(f++,e.layerNames.length<o&&e.layerNames.push(r[i].name));f>o&&(e.layerNames[o-1]=a.instant("DL_DROP_MORE_FILES",{count:f-o+1}));return}e.isDraggingLayer=!1},e.onLayerDragLeave=function(t){e.isDraggingLayer=!1},e.deleteCurrentLibrary=function(){o.deleteCurrentLibrary
()},e.reuploadCurrentLibrary=function(){e.library.rebindToServer()}}]}}];t.attach=function(e){r.module(e).directive("edgeccDesignLibraryContents",i)}}),define("directives/designlibrary/designLibraryEditableName",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(e){var t="directives/designlibrary/templates/designLibraryEditable"+e+"Name.tmpl.html";return[function(){return{restrict:"E",replace:!0,templateUrl:t,scope:{component:"=",selected:"=",defaultInformation
:"=",allowBlankName:"="},controller:["$scope","$rootScope","$timeout","designLibraryUtils","mediator",function(e,t,n,r,i){e.editState={active:!1};var s=function(){e.editState.active=!0,e.editState.name=e.component.name,n(function(){e.editState.setFocus(!0,!0)})};e.startEditName=function(t){t.stopPropagation(),!t.metaKey&&!t.ctrlKey&&!t.shiftKey&&(e.editState.active||s())},e.finishEditName=function(t){e.editState.active&&(e.editState.active=!1,!t&&e.component.name!==e.editState.name&&(e.editState.
name.trim()!==""||e.allowBlankName)&&n(function(){e.component.name=e.editState.name}))},e.handleKeyDown=function(t){return e.editState.name=t.target.value,t.keyCode===13?e.finishEditName():t.keyCode===27&&e.finishEditName(!0),!0};var o=t.$watch("globalHovering",function(t){e.globalHovering=t});e.$on("$destroy",function(){o()});var u=function(t,n){n===e.component&&s()},a=i.register(e);a.on("dlItemRenameRequest",u)}]}}]};t.attach=function(e){r.module(e).directive("designLibraryEditableGridName",i("Grid"
)),r.module(e).directive("designLibraryEditableListName",i("List"))}}),define("directives/designlibrary/designLibraryFooter",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(){return{restrict:"E",templateUrl:"directives/designlibrary/templates/designLibraryFooter.tmpl.html",replace:!0,scope:{library:"="},controller:["$scope","$window","$timeout","designLibrarySelection","designLibraryElements","designLibraryStatus","designLibraryManager","designLibraryUtils"
,"designLibraryViewState","layerSelectionManager","coreSyncManager","csInterface","configuration","linkUtils","designLibraryCEPEventHandlers",function(e,t,n,r,i,s,o,u,a,f,l,c,h,p,d){function m(){var t=f.getLayerInfo();e.layerOperations=i.getAddOperations(t,e.library),t?(e.layerName=t.fullName||"Selected layer",e.layerName.length>20&&(e.layerName=e.layerName.substring(0,19)+"...")):delete e.layerName,v()}e.uiState=a.getState(),e.doDeleteItems=function(t){var n=r.getSelection();u.deleteElements(e.library
,n),r.clearSelection()},e.doLaunchStockSite=function(e){p.launchStockSite()},e.doAddOperation=function(t){if(e.library){var n=e.defaultSelectCategory;n&&e.library.categories.length>0&&(n=e.library.categories[0]);var i=t.checkDuplicates&&t.checkDuplicates(e.library);if(i){e.showDuplicateDialog(i.message,i.messageParams,function(){t.apply(e.library,n)},function(){});return}t.apply(e.library,n).then(function(e){r.setSelection(e,!0)})}};var v=function(t){var n=r.getSelection();e.hasSelection=n.length>0
,e.applyOperations=i.getApplyOperations(n,e.library)};r.addScopedListener(e,"selectionChanged",v),v(),f.addScopedListener(e,"layerSelectionChanged",m),e.$watch("library.elements.length",m),m(),e.status=s.getStatus(),e.tooltipData={status:e.status},e.$watch("status.errorType",function(t){t?e.errorMessage=s.getFooterErrorMessage(e.status):delete e.errorMessage,e.tooltipData.errorMessage=e.errorMessage}),e.syncStatus={visible:!1},e.onStatusClick=function(){e.status.state==="error"&&e.status.errorType==="syncDisabled"&&
e.showCCAppWarningMessage()},e.showNetworkStatus=function(){if(e.status.state==="error"&&e.status.errorType==="syncDisabled")return;e.syncStatus.visible=!0,o.syncingEnabled()&&o.sync()},e.hideNetworkStatus=function(){e.syncStatus.visible=!1};var g,y=function(){e.ccAppWarning.visible&&(t.removeEventListener("click",g,!0),n(function(){e.ccAppWarning.visible=!1}))};g=function(t){e.isEventTargetCCAppWarning(t)||y()},e.ccAppWarning={visible:!1},e.enableCCApp=function(){y(),l.launchCCApp(),o.sync()},e.
showCCAppWarningMessage=function(){e.ccAppWarning.visible||(t.addEventListener("click",g,!0),e.ccAppWarning.visible=!0)},e.hideCCAppWarningMessage=function(){y()},e.isWindowsOS=c.isWindowsOS(),e.allowedDropTypes=[h.DRAGDROP_ID],e.allowedDropSources=[h.DRAGDROP_SOURCE],e.onDropDone=function(t){e.doDeleteItems()},e.relink=function(){var e=r.getSelection();e.length>0&&(d.sendElementChosen(e[0]),a.resetMode())},e.cancelRelink=function(){d.elementChooseCancelled(),a.resetMode()}}]}};t.attach=function(
e){r.module(e).directive("edgeccDlFooter",i)}}),define("directives/designlibrary/dlCategory",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(){return{restrict:"E",replace:!0,templateUrl:"directives/designlibrary/templates/dlCategory.tmpl.html",scope:{category:"=",library:"=",searchText:"="},controller:["$scope","$translate","csInterface","designLibrarySelection","designLibraryViewState","designLibraryElements",function(e,t,n,r,i,s){e.uiState=i.getState
();var o=s.getElementTypes();e.$watch("library",function(n){e.loading=!0,e.elementsByType=[],n&&o.forEach(function(r){var i=t.instant(s.getDisplayName(r));e.elementsByType.push({type:r,displayName:i,elements:n.getFilteredElements(r,e.category)})})}),e.selectComponent=function(t,i){t.stopPropagation();var s=n.isWindowsOS();e.uiState.enableMultiSelect&&(!s&&t.metaKey||s&&t.ctrlKey)?r.toggleSelectedItem(i):e.uiState.enableMultiSelect&&t.shiftKey?r.setSelectionRange(i):r.setSelection(i)};var u,a;e.selectAndAddToDocument=
function(t,n){e.selectComponent(t,n);if(!t.metaKey&&!t.ctrlKey&&!t.shiftKey){if(u===n.id&&a>Date.now()-500)return;u=n.id,a=Date.now();var r=s.getApplyOperations(n,e.library),i;r.forEach(function(e){e.onClick&&(i=e)}),i&&i.apply()}else u=null,a=null},e.editComponent=function(t,n){t&&t.stopPropagation();var r=s.getEditOperation(n);r&&r(n,e.library)},e.onElementDragStart=function(e){var t=r.isSelected(e);t||r.setSelection(e,!1)}}]}};t.attach=function(e){r.module(e).directive("edgeccDlCategory",i)}})
,define("directives/designlibrary/dlEmpty",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(){return{restrict:"E",replace:!0,templateUrl:"directives/designlibrary/templates/dlEmpty.tmpl.html",scope:{library:"="},controller:["$scope","linkUtils",function(e,t){e.howToUseInBrowser=function(){t.openHelpURL()},e.stockHelpInBrowser=function(){t.launchStockSite()}}]}};t.attach=function(e){r.module(e).directive("edgeccDlEmpty",i)}}),define("directives/designlibrary/dlNoLibraries"
,["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(){return{restrict:"E",replace:!0,scope:{createCallback:"&"},templateUrl:"directives/designlibrary/templates/dlNoLibraries.tmpl.html",controller:["$scope","$timeout","mediator","designLibraryStatus","designLibraryManager","configuration","coreSyncManager","linkUtils",function(e,t,n,r,i,s,o,u){e.appName=s.currentProduct.config.fullName,e.showAddLibraryDialog=function(){e.createCallback()},e.status=r
.getStatus(),e.progressWidth="0%",e.$watch("status.syncProgress",function(t){var n=t!==undefined?t:0;e.progressWidth=n+"%"}),e.$watch("status.errorType",function(t){t?e.errorMessage=r.getLoadingErrorMessage(e.status):delete e.errorMessage}),e.retry=function(){i.sync()},e.enableCCApp=function(){o.launchCCApp(),i.sync()},e.reload=function(){window.location.reload()},e.serviceErrorHelp=function(){u.openServiceErrorURL()},e.updateCCApp=function(){u.openUpdateCCAppURL()},e.installCCApp=function(){u.openInstallCCAppURL
()},e.updateCCLibraries=function(){u.openUpdateCCLibrariesURL()}}]}};t.attach=function(e){r.module(e).directive("edgeccDlNoLibraries",i)}}),define("directives/designlibrary/main",["require","exports","module","./designLibrary","./designLibraryComponent","./designLibraryContents","./designLibraryEditableName","./designLibraryFooter","./dlCategory","./dlEmpty","./dlNoLibraries"],function(e,t,n){"use strict";function r(t){e("./designLibrary").attach(t),e("./designLibraryComponent").attach(t),e("./designLibraryContents"
).attach(t),e("./designLibraryEditableName").attach(t),e("./designLibraryFooter").attach(t),e("./dlCategory").attach(t),e("./dlEmpty").attach(t),e("./dlNoLibraries").attach(t)}return{attach:r}}),define("directives/disclosureTriangle",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=[function(){return{restrict:"E",templateUrl:"directives/templates/disclosureTriangle.tmpl.html",replace:!0,scope:{ngModel:"="},controller:["$scope",function(e){e.$watch("ngModel"
,function(t){e.disclosureClass=t?"edgecc-core-panel-triangle-open":"edgecc-core-panel-triangle-closed"}),e.toggle=function(t){e.ngModel=!e.ngModel,t.preventDefault(),t.stopPropagation()}}]}}];t.attach=function(e){r.module(e).directive("edgeccDisclosureTriangle",i)}}),define("directives/edgeccTooltip",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=!1,s=!1,o,u=["Tether","configuration",function(e,t){return{scope:{content:"@tooltipContent",data:"=tooltipData"
,config:"=config",templateUrl:"@templateUrl",disable:"="},link:function(n,u,a){s||(s=r.element('<div style="z-index:10000"></div>'),r.element(window.document.body).append(s));var f={parentScope:n,element:s,tether:{target:u[0],attachment:"bottom center",targetAttachment:"top center",constraints:[{to:"window",attachment:"together",pin:!0}]}};n.templateUrl?f.templateUrl=n.templateUrl:f.template='<div class="tooltip" ng-bind-html="content"></div>';var l=function w(e){return r.forEach(arguments,function(
t){t!==e&&r.forEach(t,function(t,n){e[n]&&e[n].constructor&&e[n].constructor===Object?w(e[n],t):e[n]=t})}),e},c=e(l(f,n.config)),h,p,d=function(){return!!n.content||!!n.templateUrl},v=function(){c&&c.isActive()&&c.leave()},m=function(){c&&!c.isActive()&&!n.disable&&d()&&(clearTimeout(o),o=setTimeout(function(){i=!1},1e3),i=!0,c.enter(undefined,!0),p=setTimeout(v,7e3))},g=function(){if(t.showTooltips==="false"||n.disable||!d())return;h||(i?m():h=setTimeout(function(){m()},1e3))},y=function(){if(t.
showTooltips==="false")return;h&&(clearTimeout(h),h=undefined),p&&(clearTimeout(p),p=undefined),setTimeout(function(){c&&v()},0)},b=function(){c&&c.isActive()?y():g()};u.on("mouseenter",g),u.on("mouseleave",y),u.on("mousedown",b),n.$on("$destroy",function(){h&&(clearTimeout(h),h=undefined),c=undefined,u.off("mouseenter",g),u.off("mouseleave",y),u.off("mousedown",y)}),n.$watch("disable",function(e){e&&y()})}}}];t.attach=function(e){r.module(e).directive("edgeccTooltip",u)}}),define("directives/modalDialog"
,["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=["csInterface",function(e){return{restrict:"E",replace:!0,transclude:!0,templateUrl:"directives/templates/modalDialog.tmpl.html",scope:{titleText:"@",okText:"@",cancelText:"@",onSubmit:"&",onCancel:"&",showDialog:"=",disableOk:"="},link:function(t,n,r){var i=function(e){e.keyCode===27&&t.hideDialog()};window.addEventListener("keydown",i),t.dialogClass="panel-dialog",t.canCancel=!0,r.noDismiss!==undefined&&
(t.dialogClass="panel-dialog-dim",t.canCancel=!1),t.hideDialog=function(){t.canCancel&&(t.showDialog=!1,t.onCancel&&t.onCancel(),window.removeEventListener("keydown",i))},t.stopPropagation=function(e){e.stopPropagation()},t.doSubmit=function(){t.showDialog=!1,t.onSubmit&&t.onSubmit()},t.isWindowsOS=e.isWindowsOS()}}}];t.attach=function(e){r.module(e).directive("edgeccModalDialog",i)}}),define("directives/select",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"
),i=!1,s=["$window","Tether","configuration","menuManager","designLibraryFlyoutMenu","designLibraryManager","$translate","digestUtils",function(e,t,n,s,o,u,a,f){return{restrict:"E",replace:!0,transclude:!0,templateUrl:"directives/templates/select.tmpl.html",scope:{optionsArray:"=",modelField:"@",displayField:"@",orderBy:"@",ngModel:"=",ngDisabled:"=",ngChange:"&",maxHeight:"="},link:function(l,c,h){function w(e,t){var n=e,r=t;while(r){if(r===n)return!0;r=r.parentNode}return!1}i||(i=r.element("<div></div>"
),r.element(window.document.body).append(i));var p={parentScope:l,templateUrl:"directives/templates/selectMenu.tmpl.html",element:i,tether:{target:c[0],attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together",pin:!0}]}},d=0;n.currentProduct.config.offsetSelectMenu&&(p.tether.offset="-1px -1px",d=2);var v=t(p),m=!1,g,y,b=function(){m&&(c.removeClass("selected"),v.leave(),e.removeEventListener("click",g,!0),e.removeEventListener("contextmenu",g,!0),e.removeEventListener
("resize",g,!0),e.removeEventListener("blur",g,!0),e.removeEventListener("scroll",y,!0),s.removeListener("flyoutMenuClicked",g),m=!1)};g=function(e){w(c.context,e.target)||b()},y=function(e){w(i[0],e.target)||b()},l.menuStyle={};var E=function(t){var n=18,r;m||(l.menuStyle.width=c[0].offsetWidth+d,e.innerHeight?(r=e.innerHeight-3*n,r=l.maxHeight?Math.min(r,l.maxHeight):r):l.maxHeight&&(r=l.maxHeight),r&&r>0&&(r=Math.floor(r/n)*n,l.menuContainerStyle={"max-height":r+"px",overflow:"auto"}),e.addEventListener
("click",g,!0),e.addEventListener("contextmenu",g,!0),e.addEventListener("resize",g,!0),e.addEventListener("blur",g,!0),e.addEventListener("scroll",y,!0),s.addListener("flyoutMenuClicked",g),v.enter(),c.addClass("selected"),m=!0)};l.toggleMenu=function(e){m?b(e):E(e)},l.select=function(t){l.ngModel=l.modelField?t[l.modelField]:t,l.ngChange&&e.setTimeout(function(){l.ngChange(),f.triggerDigest()})},l.showCreateDialog=function(){o.invokeCreateLibrary()},l.changeCloud=function(){u.requestCloudChange
()},l.$watch("ngModel",function(e){l.selectedItem=undefined,l.optionsArray&&l.optionsArray.forEach(function(t){var r=l.modelField?t[l.modelField]:t;r===e&&(l.selectedItem=t,l.isCreativeCloud=t.collection.cloudId===n.CREATIVE_CLOUD_ID,l.collectionName=l.isCreativeCloud?a.instant("DL_MENU_PERSONAL_ASSETS"):t.collection.cloudInfo.name,l.switchingEnabled=t.collection.cloudInfo.switchingEnabled||!1)})}),l.$watch("ngDisabled",function(e){e?c.addClass("disabled"):c.removeClass("disabled")})}}}];t.attach=
function(e){r.module(e).directive("edgeccSelect",s)}}),define("directives/main",["require","exports","module","./core/main","./designlibrary/main","./disclosureTriangle","./edgeccTooltip","./modalDialog","./select"],function(e,t,n){"use strict";t.attach=function(t){e("./core/main").attach(t),e("./designlibrary/main").attach(t),e("./disclosureTriangle").attach(t),e("./edgeccTooltip").attach(t),e("./modalDialog").attach(t),e("./select").attach(t)}}),define("controllers/mainCtrl",["require","exports"
,"module"],function(e,t,n){"use strict";var r=["$scope","$rootScope","$document","$window","csInterface","designLibraryManager",function(e,t,n,r,i,s){e.isWindowsOS=i.isWindowsOS(),e.lang=i.getLocale(),n.on("click",function(){s.sync(!0,!0)}),r.addEventListener("online",function(){s.sync()}),r.addEventListener("offline",function(){s.sync()}),n.on("mouseenter",function(){t.globalHovering=!0,t.$apply()}),n.on("mouseleave",function(){t.globalHovering=!1,t.$apply()})}];t.attach=function(e){angular.module
(e).controller("mainCtrl",r)}}),define("controllers/main",["require","exports","module","./mainCtrl"],function(e,t,n){"use strict";t.attach=function(t){e("./mainCtrl").attach(t)}}),define("filters/timeago",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(){return function(e){return moment(e).from(moment())}};t.attach=function(e){r.module(e).filter("timeago",i)}}),define("filters/localeOrderBy",["require","exports","module","angular"],function(e,t
,n){"use strict";var r=e("angular"),i=["$parse","csInterface",function(e,t){var n=new Intl.Collator(t.getLocale(),{numeric:!0});return function(t,i,s){var o=function(e,t,n){var i=[];return r.forEach(e,function(e,r,s){i.push(t.call(n,e,r,s))}),i},u=function(e,t){var n;for(n=0;n<i.length;n++){var r=i[n](e,t);if(r!==0)return r}return 0},a=function(e,t){return t?function(t,n){return e(n,t)}:e},f=function(e,t){if(e===t)return 0;var i=typeof e,s=typeof t;return i===s?i==="string"?n.compare(e,t):(r.isDate
(e)&&r.isDate(t)&&(e=e.valueOf(),t=t.valueOf()),e<t?-1:1):i<s?-1:1};if(!r.isArray(t))return t;if(!i)return t;i=r.isArray(i)?i:[i],i=o(i,function(t){var n=!1,i=t||identity;if(r.isString(t)){if(t.charAt(0)==="+"||t.charAt(0)==="-")n=t.charAt(0)==="-",t=t.substring(1);i=e(t);if(i.constant){var s=i();return a(function(e,t){return f(e[s],t[s])},n)}}return a(function(e,t){return f(i(e),i(t))},n)});var l=[],c;for(c=0;c<t.length;c++)l.push(t[c]);return l.sort(a(u,s))}}];t.attach=function(e){r.module(e).filter
("localeOrderBy",i)}}),define("filters/main",["require","exports","module","./timeago","./localeOrderBy"],function(e,t,n){"use strict";function r(t){e("./timeago").attach(t),e("./localeOrderBy").attach(t)}return{attach:r}}),define("configuration/designlibrary/brush/config",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(e){r.module(e).run(["designLibraryElements","configuration",function(e,t){e.register({type:t.BRUSH_ELEMENT_TYPE,order:6,directive
:"dl-brush",displayName:"DL_TYPE_BRUSH",renditionSize:t.BRUSH_RENDITION_SIZE,isDuplicate:function(e,t){return!1},getAddOperations:function(e){return[]}})}])};return{attach:i}}),define("configuration/designlibrary/brush/renderer",["require","exports","module","angular"],function(e,t,n){"use strict";function o(e){r.module(e).directive("dlBrush",s)}var r=e("angular"),i={"application/vnd.adobe.scatter.brush+zip":"DL_BRUSHTYPE_SCATTER","application/vnd.adobe.vector.brush+zip":"DL_BRUSHTYPE_VECTOR","application/vnd.adobe.ribbon.brush+zip"
:"DL_BRUSHTYPE_RIBBON","image/x-adobe-photoshop-brush":"DL_BRUSHTYPE_SCATTER"},s=["fileUtils",function(e){return{restrict:"E",replace:!1,templateUrl:"configuration/designlibrary/brush/view.tmpl.html",scope:{component:"="},link:function(e,t,n){e.scrollIntoView=function(){t[0].scrollIntoView(!0)}},controller:["$scope","$window","designLibrarySelection","configuration","designLibraryElements","designLibraryViewState","digestUtils",function(t,n,r,s,o,u,a){function f(){t.tooltip.name=o.getTruncatedElementName
(t.component);var n=!1;o.setLoadingTimeout(function(){if(!n)return t.imageUrl=undefined,t.loadedRenditionUrl=!1,!0}),o.getRenditionUrl(t.component).then(function(e){n=!0,t.imageUrl=e,t.loadedRenditionUrl=!0},function(e){n=!0,t.imageUrl=undefined,t.loadedRenditionUrl=!0});var r=t.component.getPrimaryRepresentation();if(r){var u=r.type;u&&(t.tooltip.brushType=i[r.type])}var a=e.getUsableTypes(t.component.type),f=t.component.representations.filter(function(e){var t=e.relationship==="rendition",n=o.isRepresentationCompatible
(e,a);return!t&&n});t.disabled=f.length===0,t.disabled&&(t.tooltip.disabledMessage="DL_ERROR_BRUSH_NOT_SUPPORTED_"+s.currentProduct.config.translationSuffix)}function l(){f(),a.triggerDigest()}function c(){t.selected=r.isSelected(t.component),r.isPendingScrollToItem(t.component)&&(r.clearPendingScrollToItem(),n.setTimeout(function(){t.scrollIntoView()}))}t.uiState=u.getState(),t.tooltip={},r.addScopedListener(t,"selectionChanged",c),f(),c(),t.component.addChangeListener(l),t.$on("$destroy",function(
){t.component&&t.component.removeChangeListener(l),delete t.scrollIntoView})}]}}];return{attach:o}}),define("configuration/designlibrary/brush/main",["require","exports","module","./config","./renderer"],function(e,t,n){"use strict";t.attach=function(t){e("./config").attach(t),e("./renderer").attach(t)}}),define("configuration/designlibrary/color/config",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(e){r.module(e).run(["$q","designLibraryElements"
,"designLibraryUtils","colorUtils","configuration",function(e,t,n,r,i){t.register({type:i.COLOR_ELEMENT_TYPE,order:1,directive:"dl-color",displayName:"DL_TYPE_COLOR",isDuplicate:function(e,t){return!1},getAddOperations:function(t){var n=function(t){return{checkDuplicates:function(e){return!1},apply:function(n,r){var s=e.defer(),o=t.name;o||(t.data[0]&&t.data[0].type&&t.data[0].type==="spot"&&(o=t.data[0].spotColorName),o=o||""),n.beginOperation();var u=n.createElement(o,i.COLOR_ELEMENT_TYPE,r);return t
.data.forEach(function(e,t){var n=t===0?"primary":"rendition",r=u.createRepresentation(i.COLOR_REPRESENTATION_TYPE,n);r.setValue(i.COLOR_NAMESPACE,i.COLOR_DATA_KEY,e)}),n.endOperation(),s.resolve(u),s.promise}}},s=[];return t&&t.colors&&t.colors.length>0?(t.colors.forEach(function(e){var t=e.data;if(t&&t!==""){var i=n(e);s.push({name:"DL_ADD_COLOR_NAME",order:4,toolTip:"DL_ADD_COLOR_TOOLTIP_"+e.colorType,style:{"background-color":r.colorDataToHexValue(t),border:"1px solid",width:"14px",height:"14px"
,margin:"1px 1px 1px 0px"},checkDuplicates:i.checkDuplicates,apply:i.apply,displayIcon:!0})}}),s):[{name:"DL_ADD_COLOR_NAME",order:4,toolTip:"DL_ADD_COLOR_TOOLTIP",style:{border:"1px solid",width:"14px",height:"14px",margin:"1px 1px 1px 0px"},disabled:!0,displayIcon:!0}]},getDisplayText:function(e){if(e.name&&e.name!=="")return e.name;var t=e.representations.filter(function(e){var t=e.getValue("color","data");return t.mode==="RGB"}),n=t.length>0?t[0]:undefined,i=n&&n.getValue("color","data");return i?
r.colorDataToHexValue(i).toUpperCase():""}})}])};return{attach:i}}),define("configuration/designlibrary/color/renderer",["require","exports","module","angular"],function(e,t,n){"use strict";function s(e){r.module(e).directive("dlColor",i)}var r=e("angular"),i=["fileUtils",function(e){return{restrict:"E",replace:!1,templateUrl:"configuration/designlibrary/color/view.tmpl.html",scope:{component:"="},link:function(e,t,n){e.scrollIntoView=function(){t[0].scrollIntoView(!0)}},controller:["$scope","$window"
,"designLibrarySelection","colorUtils","themeManager","configuration","designLibraryElements","designLibraryViewState","digestUtils",function(e,t,n,r,i,s,o,u,a){function f(){e.tooltip.name=o.getTruncatedElementName(e.component),e.tooltip.hexValue=undefined,e.tooltip.primaryValue=undefined;var t=e.component.getPrimaryRepresentation(),n=t&&t.getValue("color","data");n&&(e.tooltip.primaryValue=r.getStringColorValue(n));var i=e.component.representations.filter(function(e){var t=e.getValue("color","data"
);return t.mode==="RGB"});t=i.length>0?i[0]:undefined,n=t&&t.getValue("color","data");if(n){var s=r.colorDataToHexValue([n]).toUpperCase();e.colorStyle={background:s},e.tooltip.hexValue=s}}function l(){f(),a.triggerDigest()}function c(){e.selected=n.isSelected(e.component),n.isPendingScrollToItem(e.component)&&(n.clearPendingScrollToItem(),t.setTimeout(function(){e.scrollIntoView()}))}e.uiState=u.getState(),e.tooltip={},n.addScopedListener(e,"selectionChanged",c),f(),c(),e.component.addChangeListener
(l),e.$on("$destroy",function(){e.component&&e.component.removeChangeListener(l),delete e.scrollIntoView}),i.addScopedListener(e,"colorThemeChanged",f)}]}}];return{attach:s}}),define("configuration/designlibrary/color/main",["require","exports","module","./config","./renderer"],function(e,t,n){"use strict";t.attach=function(t){e("./config").attach(t),e("./renderer").attach(t)}}),define("configuration/designlibrary/colortheme/config",["require","exports","module","angular"],function(e,t,n){"use strict"
;var r=e("angular"),i="colortheme",s="data",o=function(e){r.module(e).run(["designLibraryElements","designLibraryUtils","fileUtils","configuration",function(e,t,n,r){e.register({type:r.COLOR_THEME_ELEMENT_TYPE,order:2,directive:"dl-colortheme",displayName:"DL_TYPE_COLOR_THEME",isDuplicate:function(e,t){return!1},getApplyOperations:function(i,s,o){if(!i||!o)return[];var u=[],a=e.getApplyOperations({type:"application/vnd.adobe.element.color+dcx"},s);return a.forEach(function(s){u.push({name:s.name,
icon:s.icon,displayInMenu:s.displayInMenu,onClick:s.onClick,apply:function(){s.apply(o,function(s){var o=e.findRepresentation(i,n.getUsableTypes(r.COLOR_THEME_ELEMENT_TYPE));o&&t.reportApplyMetric(o,s)})}})}),u},getAddOperations:function(e){return[]}})}])};return{attach:o}}),define("configuration/designlibrary/colortheme/renderer",["require","exports","module","angular"],function(e,t,n){"use strict";function o(e){r.module(e).directive("dlColortheme",s)}var r=e("angular"),i="application/vnd.adobe.element.colortheme+dcx"
,s=["fileUtils",function(e){return{restrict:"E",replace:!1,templateUrl:function(e,t){return"configuration/designlibrary/colortheme/view.tmpl.html"},scope:{component:"="},link:function(e,t,n){e.scrollIntoView=function(){t[0].scrollIntoView(!0)}},controller:["$scope","$window","designLibrarySelection","colorUtils","themeManager","configuration","designLibraryElements","designLibraryViewState","csInterface","designLibraryUtils","layerSelectionManager","digestUtils",function(t,n,r,s,o,u,a,f,l,c,h,p){
function v(){var n=a.findRepresentation(t.component,e.getUsableTypes(i));t.useColor=function(e){d=a.getApplyOperations({type:"application/vnd.adobe.element.color+dcx"},{});var t;d.forEach(function(e){e.onClick&&(t=e)}),t&&t.apply(e,function(e){n&&c.reportApplyMetric(n,e)})};var r=n&&n.getValue("colortheme","data");r&&(t.values=r.swatches.map(function(e){var t=s.colorDataToHexValue(e).toUpperCase(),n=s.getStringColorValue(e[0]);return{colorData:e,hexValue:t,primaryValue:n,style:{background:t}}}))}
function m(){v(),p.triggerDigest()}function g(){t.selected=r.isSelected(t.component),r.isPendingScrollToItem(t.component)&&(r.clearPendingScrollToItem(),n.setTimeout(function(){t.scrollIntoView()}))}t.uiState=f.getState(),t.tooltip={};var d=[];v(),t.component.addChangeListener(m),t.$on("$destroy",function(){t.component&&t.component.removeChangeListener(m),delete t.scrollIntoView}),o.addScopedListener(t,"colorThemeChanged",v),r.addScopedListener(t,"selectionChanged",g),g()}]}}];return{attach:o}}),
define("configuration/designlibrary/colortheme/main",["require","exports","module","./config","./renderer"],function(e,t,n){"use strict";t.attach=function(t){e("./config").attach(t),e("./renderer").attach(t)}}),define("configuration/designlibrary/image/config",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(e){r.module(e).run(["$q","designLibraryElements","configuration","fileUtils","designLibraryUtils","designLibraryCEPEventHandlers",function(e
,t,n,r,i,s){t.register({type:n.IMAGE_ELEMENT_TYPE,order:7,directive:"dl-image",displayName:"DL_TYPE_IMAGE",renditionSize:n.IMAGE_RENDITION_SIZE,isDraggable:function(){return!0},dragType:"image",isDuplicate:function(e,t){return!1},fullRenditionConfig:function(){var e=r.getUsableTypes(n.IMAGE_ELEMENT_TYPE);return e.length===0?[]:[{id:n.currentProduct.config.code,condition:"IF_NO_MATCHING_REPRESENTATION",types:e}]},getAddOperations:function(o){var u=function(e){return!1},a=function(o,u,a){var f=e.defer
();return i.generatePreview(!0,a).then(function(a){var l=a&&a.files||[];if(!i.checkFileSizes(l,!0)){f.reject("Could not create element: one or more files exceed 1GB limit");return}o.beginOperation(),a.layerName=i.getCuratedName(o,a.layerName);var c=o.createElement(a.layerName,n.IMAGE_ELEMENT_TYPE,u),h=[];l.forEach(function(e,t){var n=r.fileNameToContentType(e.path);if(n){var i=c.createRepresentation(n,e.relationship),s=i.updateContentFromPath(e.path,e.moveFile).then(function(){a.dimensions&&(i.width=
a.dimensions.width,i.height=a.dimensions.height),e.moveFile||r.deleteFile(e.path)});h.push(s)}else console.log("Could not create representation: path cannot end with '.': "+e.path)});if(a.rendition){var p=t.setRendition(c,n.IMAGE_RENDITION_SIZE,a.rendition);h.push(p)}e.all(h).then(function(){o.endOperation(),f.resolve(c),s.sendElementCreated(c,a.documentId,a.layerIds)},function(){o.removeElement(c),o.endOperation(),f.reject("Could not create element.")})},function(){f.reject("Could not extract asset."
)}),f.promise};return[{name:"DL_ADD_IMAGE_NAME",order:1,toolTip:"DL_ADD_IMAGE_TOOLTIP",icon:"newimage",dropSupport:!0,apply:a,checkDuplicates:u,disabled:!o||o.hasOwnProperty("selectionExists")&&!o.selectionExists,displayIcon:!0}]}})}])};return{attach:i}}),define("configuration/designlibrary/image/renderer",["require","exports","module","angular"],function(e,t,n){"use strict";function o(e){r.module(e).directive("dlImage",s),r.module(e).directive("dlImageOnLoad",i)}var r=e("angular"),i=["$parse","$window"
,"digestUtils",function(e,t,n){return{restrict:"A",scope:!1,link:function(e,t,n){var r=function(){e.imgLoaded(t[0])};t.on("load",r),e.$on("$destroy",function(){t.off("load",r),r=undefined,t=undefined})},controller:["$scope",function(e){e.imgLoaded=function(r){function i(e){var t=e.parentElement;while(t){if(t.attributes.hasOwnProperty("img-size"))return t;t=t.parentElement}}var s=i(r),o=s.clientWidth,u=s.clientHeight,a=o/u,f=r.naturalWidth,l=r.naturalHeight,c=f/l,h,p;f<=o&&l<=u?(h=f,p=l):c>=a?(h=o
,p=h/c):(p=u,h=p*c),e.imgStyle.width=h+"px",e.imgStyle.height=p+"px",t.setTimeout(function(){r.style.display="inline",n.triggerDigest()},0)}}]}}],s=["fileUtils",function(e){return{restrict:"E",replace:!1,templateUrl:"configuration/designlibrary/image/view.tmpl.html",scope:{component:"="},link:function(e,t,n){e.scrollIntoView=function(){t[0].scrollIntoView(!0)}},controller:["$scope","$window","designLibrarySelection","fileUtils","designLibraryElements","configuration","designLibraryViewState","adobeStockUtils"
,"digestUtils","designLibraryCEPEventHandlers",function(e,t,n,r,i,s,o,u,a,f){function l(t){var n=e.component.getPrimaryRepresentation();n&&f.sendElementLicensed(n)}function c(){var t=!1,n=e.pendingChange;e.pendingChange=e.loadedRenditionUrl&&u.isElementPendingPurchase(e.component),n&&!e.pendingChange&&l(e.component),i.setLoadingTimeout(function(){if(!t)return e.loadedRenditionUrl=!1,e.imageUrl=undefined,e.imgStyle={},e.pendingChange=!1,!0}),i.getRenditionUrl(e.component).then(function(n){t=!0,e.loadedRenditionUrl=!0
,e.imageUrl=n;var r=e.pendingChange;e.pendingChange=u.isElementPendingPurchase(e.component),r&&!e.pendingChange&&l(e.component)},function(n){t=!0,e.loadedRenditionUrl=!0,e.imageUrl=undefined,e.imgStyle={};var r=e.pendingChange;e.pendingChange=u.isElementPendingPurchase(e.component),r&&!e.pendingChange&&l(e.component)});var o="content";e.tooltip={},e.tooltip.isStockAsset=u.isStockAsset(e.component),e.tooltip.isStockAsset&&(e.tooltip.isLicensed=u.isLicensed(e.component));var a=e.component.getPrimaryRepresentation
(),f;a&&(f=r.mimeLookup(s.IMAGE_ELEMENT_TYPE,a.type),f?(e.badgeText=f.badge,f.createdIn?e.tooltip.createdIn=f.createdIn:e.tooltip.type=f.name):e.tooltip.type=a.type),e.imgStyle["background-size"]=o,e.tooltip.name=i.getTruncatedElementName(e.component)}function h(){c(),a.triggerDigest()}function p(){e.selected=n.isSelected(e.component),n.isPendingScrollToItem(e.component)&&(n.clearPendingScrollToItem(),t.setTimeout(function(){e.scrollIntoView()}))}u.addScopedListener(e,"stockPurchasePending",function(
t){t===e.component&&(e.pendingChange=!0)}),u.addScopedListener(e,"stockPurchaseError",function(t,n){t===e.component&&(e.pendingChange=!1)}),e.uiState=o.getState(),e.imgStyle={},e.tooltip={},n.addScopedListener(e,"selectionChanged",p),c(),p(),e.component.addChangeListener(h),e.$watch("uiState.view",function(){e.imgStyle={}}),e.$on("$destroy",function(){e.component&&e.component.removeChangeListener(h),delete e.scrollIntoView}),e.onElementDragStart=function(){e.selected||n.setSelection(e.component,!1
)}}]}}];return{attach:o}}),define("configuration/designlibrary/image/main",["require","exports","module","./config","./renderer"],function(e,t,n){"use strict";t.attach=function(t){e("./config").attach(t),e("./renderer").attach(t)}}),define("configuration/designlibrary/layerstyle/config",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(e){r.module(e).run(["$q","designLibraryElements","configuration","fileUtils","csInterface","designLibraryUtils",function(
e,t,n,r,i,s){t.register({type:n.LAYER_STYLE_ELEMENT_TYPE,order:5,directive:"dl-layer-style",displayName:"DL_TYPE_LAYER_STYLE",renditionSize:n.LAYER_STYLE_RENDITION_SIZE,isDuplicate:function(e,t){return!1},getAddOperations:function(t){if(n.currentProduct.config.code!=="PHXS")return[];var s=function(e){return!1},o=function(t,s){var o=e.defer();return i.execApp("saveLayerStyle").then(function(i){var u=JSON.parse(i)||{},a=u.layerName||"";t.beginOperation();var f=t.createElement(a,n.LAYER_STYLE_ELEMENT_TYPE
,s),l=[],c=u.files||[];c.forEach(function(e,t){var n=r.fileNameToContentType(e);if(n){var i=t===0?"primary":"alternate",s=f.createRepresentation(n,i),o=s.updateContentFromPath(e).then(function(){r.deleteFile(e)});l.push(o)}else console.log("Could not create representation: path cannot end with '.': "+e)});if(u.rendition){var h=f.createRepresentation("image/png","rendition"),p=h.updateContentFromPath(u.rendition).then(function(){});l.push(p)}e.all(l).then(function(){u.rendition&&f.setRenditionCache
(n.LAYER_STYLE_RENDITION_SIZE,u.rendition,function(){r.deleteFile(u.rendition)}),t.endOperation(),o.resolve(f)},function(){t.removeElement(f),t.endOperation(),o.reject("Could not create element.")})},function(){o.reject("Could not save layer style.")}),o.promise};return[{name:"DL_ADD_LAYER_STYLE",toolTip:"DL_ADD_LAYER_STYLE_TOOLTIP",icon:"newlayerstyle",order:3,dropSupport:!1,apply:o,checkDuplicates:s,disabled:!t||!t.hasLayerStyles,displayIcon:!0}]}})}])};return{attach:i}}),define("configuration/designlibrary/layerstyle/renderer"
,["require","exports","module","angular"],function(e,t,n){"use strict";function s(e){r.module(e).directive("dlLayerStyle",i)}var r=e("angular"),i=["fileUtils",function(e){return{restrict:"E",replace:!1,templateUrl:"configuration/designlibrary/layerstyle/view.tmpl.html",scope:{component:"="},link:function(e,t,n){e.scrollIntoView=function(){t[0].scrollIntoView(!0)}},controller:["$scope","$window","designLibrarySelection","themeManager","configuration","designLibraryElements","designLibraryViewState"
,"digestUtils",function(e,t,n,r,i,s,o,u){function a(){e.tooltip.name=s.getTruncatedElementName(e.component);var t=!1;s.setLoadingTimeout(function(){if(!t)return e.imageUrl=undefined,e.loadedRenditionUrl=!1,!0}),s.getRenditionUrl(e.component).then(function(n){t=!0,e.imageUrl=n,e.loadedRenditionUrl=!0},function(n){t=!0,e.imageUrl=undefined,e.loadedRenditionUrl=!0})}function f(){a(),u.triggerDigest()}function l(){e.selected=n.isSelected(e.component),n.isPendingScrollToItem(e.component)&&(n.clearPendingScrollToItem
(),t.setTimeout(function(){e.scrollIntoView()}))}e.uiState=o.getState(),e.tooltip={},e.disabled=i.currentProduct.config.code!=="PHXS"?!0:!1,n.addScopedListener(e,"selectionChanged",l),a(),l(),e.component.addChangeListener(f),e.$on("$destroy",function(){e.component&&e.component.removeChangeListener(f),delete e.scrollIntoView})}]}}];return{attach:s}}),define("configuration/designlibrary/layerstyle/main",["require","exports","module","./config","./renderer"],function(e,t,n){"use strict";t.attach=function(
t){e("./config").attach(t),e("./renderer").attach(t)}}),define("configuration/designlibrary/look/config",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=function(e){r.module(e).run(["$q","designLibraryElements","configuration","fileUtils","csInterface","designLibraryUtils",function(e,t,n,r,i,s){t.register({type:n.LOOK_ELEMENT_TYPE,order:8,directive:"dl-look",displayName:"DL_TYPE_LOOK",renditionSize:n.LOOK_RENDITION_SIZE,isDuplicate:function(e,t){return!1
},getAddOperations:function(e){return[]}})}])};return{attach:i}}),define("configuration/designlibrary/look/renderer",["require","exports","module","angular"],function(e,t,n){"use strict";function s(e){r.module(e).directive("dlLook",i)}var r=e("angular"),i=["fileUtils",function(e){return{restrict:"E",replace:!1,templateUrl:"configuration/designlibrary/look/view.tmpl.html",scope:{component:"="},link:function(e,t,n){e.scrollIntoView=function(){t[0].scrollIntoView(!0)}},controller:["$scope","$window"
,"designLibrarySelection","themeManager","configuration","designLibraryElements","designLibraryViewState","digestUtils",function(t,n,r,i,s,o,u,a){function f(){t.tooltip.name=o.getTruncatedElementName(t.component);var n=!1;o.setLoadingTimeout(function(){if(!n)return t.imageUrl=undefined,t.loadedRenditionUrl=!1,!0});var r=o.findRepresentation(t.component,e.getUsableTypes(s.LOOK_ELEMENT_TYPE));r||(t.disabled=!0),o.getRenditionUrl(t.component).then(function(e){n=!0,t.imageUrl=e,t.loadedRenditionUrl=!0
},function(e){n=!0,t.imageUrl=undefined,t.loadedRenditionUrl=!0})}function l(){f(),a.triggerDigest()}function c(){t.selected=r.isSelected(t.component),r.isPendingScrollToItem(t.component)&&(r.clearPendingScrollToItem(),n.setTimeout(function(){t.scrollIntoView()}))}t.uiState=u.getState(),t.tooltip={},r.addScopedListener(t,"selectionChanged",c),f(),c(),t.component.addChangeListener(l),t.$on("$destroy",function(){t.component&&t.component.removeChangeListener(l),delete t.scrollIntoView}),t.onElementDragStart=
function(){t.selected||r.setSelection(t.component,!1)}}]}}];return{attach:s}}),define("configuration/designlibrary/look/main",["require","exports","module","./config","./renderer"],function(e,t,n){"use strict";t.attach=function(t){e("./config").attach(t),e("./renderer").attach(t)}}),define("configuration/designlibrary/textstyle/config",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i="characterstyle",s="data",o="application/vnd.adobe.characterstyle+json",
u=function(e){r.module(e).run(["$q","designLibraryElements","layerSelectionManager","csInterface","fileUtils","configuration",function(e,t,n,r,u,a){t.register({type:a.CHARACTER_STYLE_ELEMENT_TYPE,order:3,directive:"dl-text-style",displayName:"DL_TYPE_TEXT_STYLE",renditionSize:a.CHARACTER_STYLE_RENDITION_SIZE,isDuplicate:function(e,t){return!1},getAddOperations:function(t){var f=function(e){return!1},l=function(t,f){function c(n){if(!n||n.kind!=="LayerKind.TEXT")return;r.execApp("saveTextStylePreview"
).then(function(r){if(r===undefined||r==="undefined")return;t.beginOperation();var c=t.createElement("",a.CHARACTER_STYLE_ELEMENT_TYPE,f),h=[],p=c.createRepresentation(o,"primary");p.setValue(i,s,n.fontInfo);if(r){var d=c.createRepresentation("image/png","rendition"),v=d.updateContentFromPath(r).then(function(){});h.push(v)}e.all(h).then(function(){r&&c.setRenditionCache(a.CHARACTER_STYLE_RENDITION_SIZE,r,function(){u.deleteFile(r)}),t.endOperation(),l.resolve(c)},function(){t.removeElement(c),t.
endOperation(),l.reject("Could not create element.")})},function(){l.reject("Could not save text style preview.")})}var l=e.defer();return n.requestUpdate(),n.addListener("layerSelectionChanged",c,!0),l.promise};return[{name:"DL_ADD_TEXT_STYLE_NAME",order:2,toolTip:"DL_ADD_TEXT_STYLE_TOOLTIP",icon:"newcharacterstyle",apply:l,checkDuplicates:f,disabled:!t||!t.text||!t.fontInfo,displayIcon:!0}]},getDisplayText:function(e){if(e.name&&e.name!=="")return e.name;var n=t.findRepresentation(e,o),r=n&&n.getValue
(i,s);if(r){var u=r.fontFamily;return r.adbeFont.style.toLowerCase().indexOf("normal")===-1&&r.adbeFont.style.toLowerCase().indexOf("regular")&&(u+=" "+r.adbeFont.style),u}return""}})}])};return{attach:u}}),define("configuration/designlibrary/textstyle/renderer",["require","exports","module","angular"],function(e,t,n){"use strict";function f(e){r.module(e).directive("dlTextStyle",a)}var r=e("angular"),i="characterstyle",s="data",o="application/vnd.adobe.characterstyle+json",u={},a=function(){return{
restrict:"E",replace:!1,templateUrl:"configuration/designlibrary/textstyle/view.tmpl.html",scope:{component:"="},link:function(e,t,n){e.scrollIntoView=function(){t[0].scrollIntoView(!0)}},controller:["$scope","$q","$window","fileUtils","designLibrarySelection","designLibraryElements","designLibraryViewState","colorUtils","configuration","csInterface","mediator","$translate","digestUtils",function(e,t,n,r,a,f,l,c,h,p,d,v,m){function E(){var t=f.findRepresentation(e.component,o);e.tooltip.name=f.getTruncatedElementName
(e.component);var n=!1;f.setLoadingTimeout(function(){if(!n)return e.imageUrl=undefined,e.loadedRenditionUrl=!1,!0}),f.getRenditionUrl(e.component).then(function(t){n=!0,e.imageUrl=t,e.loadedRenditionUrl=!0},function(t){n=!0,e.imageUrl=undefined,e.loadedRenditionUrl=!0});var u=t&&t.getValue(i,s);e.disabled=!f.isRepresentationCompatible(t,r.getUsableTypes(h.CHARACTER_STYLE_ELEMENT_TYPE));if(u){var a=function(t){e.missingFont=t,e.tooltip.missingFont=e.missingFont};y(u).then(function(e){a(!e)}),g.on
("fontListChanged",function(){y(u).then(function(e){a(!e)})});var l=w(u);e.styleDescription=l.join(", "),e.tooltip.properties=e.styleDescription,u.color&&(e.colorStyle={"background-color":c.colorDataToHexValue(u.color)}),e.fontDescription={},e.fontDescription.font=u.fontFamily,e.fontDescription.style="";if(u.adbeFont&&u.adbeFont.style){var p=u.adbeFont.style.toLowerCase();p.indexOf("normal")===-1&&p.indexOf("regular")&&(e.fontDescription.style=u.adbeFont.style)}e.fontDescription.fullFont=e.fontDescription
.font+" "+e.fontDescription.style}}function S(){E(),m.triggerDigest()}function x(){e.selected=a.isSelected(e.component),a.isPendingScrollToItem(e.component)&&(a.clearPendingScrollToItem(),n.setTimeout(function(){e.scrollIntoView()}))}e.uiState=l.getState();var g=d.register(e);e.tooltip={},e.renderStyle={},e.renderStyleFull={},e.isPreviewAvailable=!1,e.previewURL="";var y=function(e){if(!e.adbeFont&&!e.fontFamily)return t.when(!0);var n=t.defer();return p.execApp("isFontAvailable",[e]).then(function(
e){n.resolve(e!=="false")}),n.promise},b=function(){u.Underline||(u.Underline=v.instant("DL_TEXT_ATTRIBUTE_UNDERLINE"),u.Strikethrough=v.instant("DL_TEXT_ATTRIBUTE_STRIKETHROUGH"),u.Leading=v.instant("DL_TEXT_ATTRIBUTE_LEADING"),u.Kerning=v.instant("DL_TEXT_ATTRIBUTE_KERNING"),u.Tracking=v.instant("DL_TEXT_ATTRIBUTE_TRACKING"),u.LeadingAuto=v.instant("DL_TEXT_LEADING_AUTO"),u.KerningAuto=v.instant("DL_TEXT_KERNING_AUTO"),u.KerningOptical=v.instant("DL_TEXT_KERNING_OPTICAL"),u.KerningMetricsRomanOnly=
v.instant("DL_TEXT_KERNING_METRICSROMANONLY"))},w=function(e){var t=[];b(),e.adbeFont?t.push(e.adbeFont.family):e.fontFamily&&t.push(e.fontFamily),e.adbeFont&&e.adbeFont.style.toLowerCase().indexOf("normal")===-1&&e.adbeFont.style.toLowerCase().indexOf("regular")&&t.push(e.adbeFont.style);if(e.fontSize){var n=e.fontSize.value&&Math.round(e.fontSize.value*100)/100;t.push(n+e.fontSize.type)}e.textDecorationObject?(e.textDecorationObject.adbeUnderline&&t.push(u.Underline),e.textDecorationObject.adbeStrikethrough&&
t.push(u.Strikethrough)):e.textDecoration&&(e.textDecoration.indexOf("underline")!==-1&&t.push(u.Underline),e.textDecoration.indexOf("line-through")!==-1&&t.push(u.Strikethrough));if(e.adbeAutoLeading)t.push(u.Leading+":"+u.LeadingAuto);else if(e.lineHeight){var r=e.lineHeight.value&&Math.round(e.lineHeight.value*100)/100;t.push(u.Leading+":"+r+e.lineHeight.type)}var i=e.kerningMethod;switch(e.adbeIlstKerningMethod){case"AutoKernType.AUTO":t.push(u.Kerning+":"+u.KerningAuto);break;case"AutoKernType.OPTICAL"
:t.push(u.Kerning+":"+u.KerningOptical);break;case"AutoKernType.METRICSROMANONLY":t.push(u.Kerning+":"+u.KerningMetricsRomanOnly)}return e.adbeTracking?t.push(u.Tracking+":"+e.adbeTracking):e.letterSpacing&&t.push(u.Tracking+":"+e.letterSpacing.value*1e3),t};a.addScopedListener(e,"selectionChanged",x),E(),x(),e.component.addChangeListener(S),e.$on("$destroy",function(){e.component&&e.component.removeChangeListener(S),delete e.scrollIntoView})}]}};return{attach:f}}),define("configuration/designlibrary/textstyle/main"
,["require","exports","module","./config","./renderer"],function(e,t,n){"use strict";t.attach=function(t){e("./config").attach(t),e("./renderer").attach(t)}}),define("configuration/designlibrary/parastyle/config",["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i="paragraphstyle",s="data",o="application/vnd.adobe.paragraphstyle+json",u="application/vnd.adobe.paragraphstyle+snippet",a=function(e){r.module(e).run(["$q","designLibraryElements","layerSelectionManager"
,"csInterface","fileUtils","configuration",function(e,t,n,r,a,f){t.register({type:f.PARAGRAPH_STYLE_ELEMENT_TYPE,order:4,directive:"dl-para-style",displayName:"DL_TYPE_PARA_STYLE",renditionSize:f.PARAGRAPH_STYLE_RENDITION_SIZE,isDuplicate:function(e,t){return!1},getAddOperations:function(t){var l=function(e){return!1},c=function(t,l){function h(n){if(!n||n.kind!=="LayerKind.TEXT")return;r.execApp("getParaStyleInfo").then(function(n){var r=JSON.parse(n);t.beginOperation();var h=t.createElement(r.styleName
,f.PARAGRAPH_STYLE_ELEMENT_TYPE,l),p=[],d,v;if(r.idmsPath){var m=h.createRepresentation(u,"primary");v=m.updateContentFromPath(r.idmsPath).then(function(){a.deleteFile(r.idmsPath)}),p.push(v),d=h.createRepresentation(o,"rendition"),d.setValue(i,s,r.styleInfo)}else d=h.createRepresentation(o,"primary"),d.setValue(i,s,r.styleInfo);if(r.previewPath){var g=h.createRepresentation("image/png","rendition");v=g.updateContentFromPath(r.previewPath).then(function(){}),p.push(v)}e.all(p).then(function(){r.previewPath&&
h.setRenditionCache(f.PARAGRAPH_STYLE_RENDITION_SIZE,r.previewPath,function(){a.deleteFile(r.previewPath)}),t.endOperation(),c.resolve(h)},function(){t.removeElement(h),t.endOperation(),c.reject("Could not create element.")})},function(){c.reject("Could not save paragraph style preview.")})}var c=e.defer();return n.requestUpdate(),n.addListener("layerSelectionChanged",h,!0),c.promise};return[{name:"DL_ADD_PARA_STYLE_NAME",order:3,toolTip:"DL_ADD_PARA_STYLE_TOOLTIP",icon:"newparagraphstyle",apply:
c,checkDuplicates:l,disabled:!t||!t.text||t.isAppliedParaStyleSupported===!1,displayIcon:!0}]},getDisplayText:function(e){if(e.name&&e.name!=="")return e.name;var n=t.findRepresentation(e,o),r=n&&n.getValue(i,s);if(r){var u=r.fontFamily;return r.adbeFont.style.toLowerCase().indexOf("normal")===-1&&r.adbeFont.style.toLowerCase().indexOf("regular")&&(u+=" "+r.adbeFont.style),u}return""}})}])};return{attach:a}}),define("configuration/designlibrary/parastyle/renderer",["require","exports","module","angular"
],function(e,t,n){"use strict";function f(e){r.module(e).directive("dlParaStyle",a)}var r=e("angular"),i="paragraphstyle",s="data",o="application/vnd.adobe.paragraphstyle+json",u={},a=function(){return{restrict:"E",replace:!1,templateUrl:"configuration/designlibrary/parastyle/view.tmpl.html",scope:{component:"="},link:function(e,t,n){e.scrollIntoView=function(){t[0].scrollIntoView(!0)}},controller:["$scope","$q","$window","fileUtils","designLibrarySelection","designLibraryElements","designLibraryViewState"
,"colorUtils","configuration","csInterface","mediator","$translate","digestUtils",function(e,t,n,r,a,f,l,c,h,p,d,v,m){function E(){var t=f.findRepresentation(e.component,o);e.tooltip.name=f.getTruncatedElementName(e.component);var n=!1;f.setLoadingTimeout(function(){if(!n)return e.imageUrl=undefined,e.loadedRenditionUrl=!1,!0}),f.getRenditionUrl(e.component).then(function(t){n=!0,e.imageUrl=t,e.loadedRenditionUrl=!0},function(t){n=!0,e.imageUrl=undefined,e.loadedRenditionUrl=!0});var u=t&&t.getValue
(i,s);e.disabled=!t||!f.isRepresentationCompatible(t,r.getUsableTypes(h.PARAGRAPH_STYLE_ELEMENT_TYPE));if(u){var a=function(t){e.missingFont=t,e.tooltip.missingFont=e.missingFont};y(u).then(function(e){a(!e)}),g.on("fontListChanged",function(){y(u).then(function(e){a(!e)})});var l=w(u);e.styleDescription=l.join(", "),e.tooltip.properties=e.styleDescription,u.color&&(e.colorStyle={"background-color":c.colorDataToHexValue(u.color)}),e.fontDescription={},e.fontDescription.font=u.fontFamily,e.fontDescription
.style="";if(u.adbeFont&&u.adbeFont.style){var p=u.adbeFont.style.toLowerCase();p.indexOf("normal")===-1&&p.indexOf("regular")&&(e.fontDescription.style=u.adbeFont.style)}e.fontDescription.fullFont=e.fontDescription.font+" "+e.fontDescription.style}}function S(){E(),m.triggerDigest()}function x(){e.selected=a.isSelected(e.component),a.isPendingScrollToItem(e.component)&&(a.clearPendingScrollToItem(),n.setTimeout(function(){e.scrollIntoView()}))}e.uiState=l.getState();var g=d.register(e);e.tooltip=
{},e.renderStyle={},e.renderStyleFull={},e.isPreviewAvailable=!1,e.previewURL="";var y=function(e){if(!e.adbeFont&&!e.fontFamily)return t.when(!0);var n=t.defer();return p.execApp("isFontAvailable",[e]).then(function(e){n.resolve(e!=="false")}),n.promise},b=function(){u.Underline||(u.Underline=v.instant("DL_TEXT_ATTRIBUTE_UNDERLINE"),u.Strikethrough=v.instant("DL_TEXT_ATTRIBUTE_STRIKETHROUGH"),u.Leading=v.instant("DL_TEXT_ATTRIBUTE_LEADING"),u.Kerning=v.instant("DL_TEXT_ATTRIBUTE_KERNING"),u.Tracking=
v.instant("DL_TEXT_ATTRIBUTE_TRACKING"),u.Alignment=v.instant("DL_TEXT_ATTRIBUTE_ALIGNMENT"),u.Hyphenate=v.instant("DL_TEXT_ATTRIBUTE_HYPHENATE"),u.LeadingAuto=v.instant("DL_TEXT_LEADING_AUTO"),u.KerningAuto=v.instant("DL_TEXT_KERNING_AUTO"),u.KerningOptical=v.instant("DL_TEXT_KERNING_OPTICAL"),u.KerningMetricsRomanOnly=v.instant("DL_TEXT_KERNING_METRICSROMANONLY"),u.LeftAlign=v.instant("DL_TEXT_ALIGNMENT_LEFT"),u.CenterAlign=v.instant("DL_TEXT_ALIGNMENT_CENTER"),u.RightAlign=v.instant("DL_TEXT_ALIGNMENT_RIGHT"
),u.LeftJustify=v.instant("DL_TEXT_ALIGNMENT_LEFT_JUSTIFY"),u.CenterJustify=v.instant("DL_TEXT_ALIGNMENT_CENTER_JUSTIFY"),u.RightJustify=v.instant("DL_TEXT_ALIGNMENT_RIGHT_JUSTIFY"),u.FullJustify=v.instant("DL_TEXT_ALIGNMENT_FULL_JUSTIFY"))},w=function(e){var t=[];b(),e.adbeFont?t.push(e.adbeFont.family):e.fontFamily&&t.push(e.fontFamily),e.adbeFont&&e.adbeFont.style.toLowerCase().indexOf("normal")===-1&&e.adbeFont.style.toLowerCase().indexOf("regular")&&t.push(e.adbeFont.style);if(e.fontSize){var n=
e.fontSize.value&&Math.round(e.fontSize.value*100)/100;t.push(n+e.fontSize.type)}e.textDecorationObject?(e.textDecorationObject.adbeUnderline&&t.push(u.Underline),e.textDecorationObject.adbeStrikethrough&&t.push(u.Strikethrough)):e.textDecoration&&(e.textDecoration.indexOf("underline")!==-1&&t.push(u.Underline),e.textDecoration.indexOf("line-through")!==-1&&t.push(u.Strikethrough));if(e.adbeAutoLeading)t.push(u.Leading+":"+u.LeadingAuto);else if(e.lineHeight){var r=e.lineHeight.value&&Math.round(
e.lineHeight.value*100)/100;t.push(u.Leading+":"+r+e.lineHeight.type)}var i=e.kerningMethod;switch(e.adbeIlstKerningMethod){case"AutoKernType.AUTO":t.push(u.Kerning+":"+u.KerningAuto);break;case"AutoKernType.OPTICAL":t.push(u.Kerning+":"+u.KerningOptical);break;case"AutoKernType.METRICSROMANONLY":t.push(u.Kerning+":"+u.KerningMetricsRomanOnly)}e.adbeTracking?t.push(u.Tracking+":"+e.adbeTracking):e.letterSpacing&&t.push(u.Tracking+":"+e.letterSpacing.value*1e3);if(e.adbeParaAlignment)switch(e.adbeParaAlignment
){case"Alignment.LEFT_ALIGN":t.push(u.Alignment+":"+u.LeftAlign);break;case"Alignment.CENTER_ALIGN":t.push(u.Alignment+":"+u.CenterAlign);break;case"Alignment.RIGHT_ALIGN":t.push(u.Alignment+":"+u.RightAlign);break;case"Alignment.LEFT_JUSTIFIED":t.push(u.Alignment+":"+u.LeftJustify);break;case"Alignment.CENTER_JUSTIFIED":t.push(u.Alignment+":"+u.CenterJustify);break;case"Alignment.RIGHT_JUSTIFIED":t.push(u.Alignment+":"+u.RightJustify);break;case"Alignment.FULLY_JUSTIFIED":t.push(u.Alignment+":"+
u.FullJustify)}return e.adbeHyphenation&&t.push(u.Hyphenate),t};a.addScopedListener(e,"selectionChanged",x),E(),x(),e.component.addChangeListener(S),e.$on("$destroy",function(){e.component&&e.component.removeChangeListener(S),delete e.scrollIntoView})}]}};return{attach:f}}),define("configuration/designlibrary/parastyle/main",["require","exports","module","./config","./renderer"],function(e,t,n){"use strict";t.attach=function(t){e("./config").attach(t),e("./renderer").attach(t)}}),define("configuration/designlibrary/unsupported/config"
,["require","exports","module","angular"],function(e,t,n){"use strict";var r=e("angular"),i=82,s=function(e){r.module(e).run(["designLibraryElements",function(e){e.register({type:"*",order:100,directive:"dl-unsupported",displayName:"DL_TYPE_UNKNOWN",renditionSize:i,isDuplicate:function(e,t){return!1},getApplyOperations:function(e,t){return[]},getAddOperations:function(e){return[]}})}])};return{attach:s}}),define("configuration/designlibrary/unsupported/renderer",["require","exports","module","angular"
],function(e,t,n){"use strict";function s(e){r.module(e).directive("dlUnsupported",i)}var r=e("angular"),i=function(){return{restrict:"E",replace:!1,templateUrl:"configuration/designlibrary/unsupported/view.tmpl.html",scope:{component:"="},link:function(e,t,n){e.scrollIntoView=function(){t[0].scrollIntoView(!0)}},controller:["$scope","$window","designLibrarySelection","configuration","designLibraryElements","designLibraryViewState","digestUtils",function(e,t,n,r,i,s,o){function u(){var t=!1;i.setLoadingTimeout
(function(){if(!t)return e.imageUrl=undefined,e.loadedRenditionUrl=!1,!0}),i.getRenditionUrl(e.component).then(function(n){t=!0,e.imageUrl=n,e.loadedRenditionUrl=!0},function(n){t=!0,e.imageUrl=undefined,e.loadedRenditionUrl=!0}),e.tooltip.disabledMessage="DL_ERROR_UNSUPPORTED_"+r.currentProduct.config.translationSuffix}function a(){u(),o.triggerDigest()}function f(){e.selected=n.isSelected(e.component),n.isPendingScrollToItem(e.component)&&(n.clearPendingScrollToItem(),t.setTimeout(function(){e.
scrollIntoView()}))}e.uiState=s.getState(),e.tooltip={},n.addScopedListener(e,"selectionChanged",f),u(),f(),e.component.addChangeListener(a),e.$on("$destroy",function(){e.component&&e.component.removeChangeListener(a),delete e.scrollIntoView})}]}};return{attach:s}}),define("configuration/designlibrary/unsupported/main",["require","exports","module","./config","./renderer"],function(e,t,n){"use strict";t.attach=function(t){e("./config").attach(t),e("./renderer").attach(t)}}),define("configuration/designlibrary/main"
,["require","exports","module","./brush/main","./color/main","./colortheme/main","./image/main","./layerstyle/main","./look/main","./textstyle/main","./parastyle/main","./unsupported/main"],function(e,t,n){"use strict";t.attach=function(t){e("./brush/main").attach(t),e("./color/main").attach(t),e("./colortheme/main").attach(t),e("./image/main").attach(t),e("./layerstyle/main").attach(t),e("./look/main").attach(t),e("./textstyle/main").attach(t),e("./parastyle/main").attach(t),e("./unsupported/main"
).attach(t)}}),define("configuration/main",["require","exports","module","./designlibrary/main"],function(e,t,n){"use strict";t.attach=function(t){e("./designlibrary/main").attach(t)}}),define("app",["require","jquery","angular","angular-sanitize","angular-animate","angular-translate","angular-cc-libraries-api-js","tether","visitor-api","app-measurement","libs/CSInterface-5.0.0","libs/IMSInterface","libs/Vulcan","libs/AgoraLib","services/main","directives/main","controllers/main","filters/main","configuration/main"
],function(e){"use strict";function o(){angular.element(document).ready(function(){angular.bootstrap(document,["designLibraries"])})}var t=angular.module("designLibraries",["ngSanitize","ngAnimate","pascalprecht.translate","adobe.ccLibraries"]);t.config(["$provide",function(e){e.decorator("$exceptionHandler",["$delegate","$injector",function(e,t){return function(n,r){e(n,r);var i=t.get("metrics");i&&i.reportError(r||"",n.stack||n.message||n,!0)}}])}]);if(!e.toUrl){var n=e("edgeccTemplates");t.run
(["$rootScope","$templateCache",function(e,t){n(t)}]),angular.BUILT=!0}var r=new CSInterface,i=r.initResourceBundle(),s=r.hostEnvironment.appUILocale;t.config(["$translateProvider",function(e){e.translations(s,i),e.preferredLanguage(s),e.fallbackLanguage(s)}]),e("services/main").attach("designLibraries"),e("directives/main").attach("designLibraries"),e("controllers/main").attach("designLibraries"),e("filters/main").attach("designLibraries"),e("configuration/main").attach("designLibraries"),t.run(
["csInterface","debugLog","designLibraryManager","versionManager","layerSelectionManager","configuration","metrics","products","themeManager","adobeExchange","designLibraryCEPEventHandlers",function(e,t,n,r,i,s,o,u,a,f,l){function m(){t.init(),i.startListening(),n.init(),window.alert=e.showError.bind(e),l.startListening(),o.setEnvironment({product:s.currentProduct.config.fullName,version:r.getPluginVersion(),os:s.os}),e.evalScript("$._ext_CORE.getApplicationVersion()").then(function(e){o.setEnvironment
({productVersion:e})}),o.init()}f.init();var c=e.getPluginPath()+"/jsx/",h=c+"shims.jsx",p=c+"core.jsx",d=c+"json2.jsx",v=e.getPluginPath()+"/applications/"+s.currentProduct.config.code+"/jsx/main.jsx";e.evalScript('$.evalFile("'+h+'")'),e.evalScript('$.evalFile("'+p+'")'),e.evalScript('$.evalFile("'+d+'")'),e.evalScript('$.evalFile("'+v+'")'),e.evalScript("$._ext_CORE.getTempFolder()").then(function(e){s.strTempFolder=e});var g=s.currentProduct.init();g?g.then(m,m):m()}]),o()}),define("applications/AEFT/js/index"
,["require","exports","angular"],function(e,t){"use strict";var n=e("angular"),r=["$injector","colorUtils","fileUtils","configuration",function(e,t,n,r){this.getScaleColor=function(e){var n=38,r=.51,i=n,s=e,o=s*r+i;return t.rgbToHex({red:o,green:o,blue:o})},this.cssThemeBGScale=function(){var e,t,n={},r=function(e){switch(e){case 0:return"darker";case 100:return"dark";default:return e.toString()}};for(e=0;e<=100;e++){t=this.getScaleColor(e).slice(1);if(!n.hasOwnProperty(t)||n.hasOwnProperty(t)&&r
(e)!==e.toString())n[t]=r(e)}return n},this.config={},this.config.code="AEFT",this.config.fullName="After Effects",this.config.translationSuffix="AE",this.config.dragDropSource="com.adobe.aftereffects",this.config.isDrover=!0,this.config.themes=this.cssThemeBGScale(),this.config.analytics={namespace:"ae",prodId:"adbemaftereffects.rebootprod2",devId:"adbemaftereffects.rebootdev2"},this.init=function(){n.extendUsableTypes(r.IMAGE_ELEMENT_TYPE,["application/pdf","application/illustrator","application/photoshop"
,"image/vnd.adobe.photoshop","image/png","image/jpeg","image/jpg"]),n.extendUsableTypes(r.COLOR_ELEMENT_TYPE,["application/vnd.adobe.color+json"]),n.extendUsableTypes(r.COLOR_THEME_ELEMENT_TYPE,["application/vnd.adobe.colortheme+json"]),n.extendUsableTypes(r.LOOK_ELEMENT_TYPE,["application/vnd.adobe.cube+txt","application/vnd.adobe.look+xml"]);var t=e.get("csInterface");t.execApp("setThumbnailExportOptions"),t.execApp("getTooltipState").then(function(t){e.get("configuration").showTooltips=t}),this
.startEventListener()},this.reportEvent=function(e,t){},this.setFocusToCanvas=function(){};var i=function(){var t=e.get("layerSelectionManager");t.handleSelectionChange()};this.startEventListener=function(){},this.stopEventListener=function(){}}];t.attach=function(e){n.module(e).service("AEFT",r)}}),define("applications/IDSN/js/index",["require","exports","angular"],function(e,t){"use strict";var n=e("angular"),r=["$q","$rootScope","configuration","csInterface","imsInterface","layerSelectionManager"
,"colorUtils","designLibraryManager","designLibraryElements","fileUtils","$translate","mediator","designLibraryFlyoutMenu","localSettings","designLibraryViewState",function(e,t,n,r,i,s,o,u,a,f,l,c,h,p,d){this.getScaleColor=function(e){var t=52,n=185,r=e>=51,i=r?.61:.62,s=r?n:t,u=r?e-51:e,a=u*i+s;return o.rgbToHex({red:a,green:a,blue:a})},this.cssThemeBGScale=function(){var e,t,n={},r=function(e){switch(e){case 0:return"darker";case 33:return"dark";case 66:return"light";case 100:return"lighter";default:
return e.toString()}};for(e=0;e<=100;e++){t=this.getScaleColor(e).slice(1);if(!n.hasOwnProperty(t)||n.hasOwnProperty(t)&&r(e)!==e.toString())n[t]=r(e)}return n},this.config={},this.config.code="IDSN",this.config.fullName="InDesign",this.config.translationSuffix="ID",this.config.dragDropSource="com.adobe.indesign",this.config.isDrover=!0,this.config.offsetSelectMenu=!0,this.config.themes=this.cssThemeBGScale(),this.config.rgbRound=Math.round,this.config.analytics={namespace:"id",prodId:"adbemindesign.rebootprod2"
,devId:"adbemindesign.rebootdev2"};var v=function(){var e=u.getCurrentLibraryCollection();if(!e)return;var t=[];e.libraries.forEach(function(e){e.deletedFromServer||t.push({name:e.name,id:e.id})}),t.sort(function(e,t){return e.name<t.name?-1:e.name>t.name?1:0});var n=-1,i=u.getCurrentLibrary();if(i){var s;for(s=0;s<t.length;++s)if(t[s].id===i.id){n=s;break}}var o={};o.names=t,o.current=n,r.execApp("setLibraryCollection",[JSON.stringify(o)])};this.init=function(){f.extendUsableTypes(n.IMAGE_ELEMENT_TYPE
,["application/vnd.adobe.indesign-idms","image/png","image/jpeg","image/jpg","image/gif","image/bmp","application/photoshop","image/vnd.adobe.photoshop","application/illustrator","application/pdf"]),f.extendUsableTypes(n.COLOR_ELEMENT_TYPE,["application/vnd.adobe.color+json"]),f.extendUsableTypes(n.COLOR_THEME_ELEMENT_TYPE,["application/vnd.adobe.colortheme+json"]),f.extendUsableTypes(n.PARAGRAPH_STYLE_ELEMENT_TYPE,["application/vnd.adobe.paragraphstyle+json","application/vnd.adobe.paragraphstyle+snippet"
]),f.extendUsableTypes(n.CHARACTER_STYLE_ELEMENT_TYPE,["application/vnd.adobe.characterstyle+json","application/vnd.adobe.characterstyle+snippet"]),f.extendEditableTypes(n.IMAGE_ELEMENT_TYPE,["application/vnd.adobe.indesign-idms"]),r.execApp("setThumbnailExportOptions"),r.execApp("getTooltipState").then(function(e){n.showTooltips=e}),this.startEventListener(),u.waitForInitialLoad().then(function(){var e=new CSEvent("com.adobe.DesignLibraries.events.READY","APPLICATION");r.dispatchEvent(e)}),u.addListener
("libraryList",function(){v()}),u.addListener("currentLibrary",function(){v()});var e=r.getGlobalRoot();!VulcanInterface.isAppInstalled("indesign-10")&&!VulcanInterface.isAppInstalled("indesign-10.032")&&!VulcanInterface.isAppInstalled("indesign-10.064")&&f.removeRecursive(e+"IDSN")};var m,g=function(e){m=undefined,e instanceof Object&&e.hasOwnProperty("exportContext")?m=e.exportContext:e instanceof String&&(m=e)},y=function(){m=undefined},b=function(){return m!==undefined?m:""};this.reportEvent=
function(e,t){console.log("Metric reported to ID"),t.event=e,e==="createElement"&&(t.creationContext=b());var n=new CSEvent("com.adobe.DesignLibraries.events.LOGPIP","APPLICATION");n.data=JSON.stringify(t),r.dispatchEvent(n),delete t.event,e==="createElement"&&delete t.creationContext},this.setFocusToCanvas=function(){};var w=function(){s.handleSelectionChange()},E=function(){r.execApp("getTooltipState").then(function(e){n.showTooltips=e})},S=function(){c.emit("fontListChanged")},x=function(){c.emit
("fontListChanged")},T=function(){d.resetMode()},N=function(t){var r=t.data,i=r.idmsPath,s=r.pdfPath,o=r.pngPath;if(!f.existsFile(i)||!f.existsFile(s))return;var c=u.getCurrentLibraryCollection();if(!c)return;var h;r.hasOwnProperty("libraryId")?r.libraryId!==""&&(h=c.getLibraryById(r.libraryId),h&&u.setCurrentLibrary(h)):h=u.getCurrentLibrary();if(!h){var p=r.libraryName;p||(p=l.instant("DL_DEFAULT_LIBRARY_NAME"));var d=c.createLibrary(p);if(!d)return;u.setCurrentLibrary(d),h=u.getCurrentLibrary(
)}h.beginOperation();var v,m=h.createElement(r.assetName,n.IMAGE_ELEMENT_TYPE,v),g=[],y=f.fileNameToContentType(i),b=m.createRepresentation(y,"primary");g.push(b.updateContentFromPath(i)),y=f.fileNameToContentType(s);var w=m.createRepresentation(y,"rendition");g.push(w.updateContentFromPath(s));if(o&&f.existsFile(o)){var E=a.setRendition(m,n.IMAGE_RENDITION_SIZE,o);g.push(E)}var S=function(){h.endOperation()};e.all(g).then(S,S)},C=function(e){var n=i.isLoggedIn();if(!n)return;t.$apply(function(){
h.invokeCreateLibrary()})},k=function(e,t){var n=u.getCurrentLibraryCollection();if(!n)return;var r;e&&(r=n.getLibraryById(e)),!r&&!t&&(r=u.getCurrentLibrary());if(!r){var i=l.instant("DL_DEFAULT_LIBRARY_NAME");r=n.createLibrary(i)}return r&&(u.setCurrentLibrary(r),r=u.getCurrentLibrary()),r},L="data",A="colortheme",O="application/vnd.adobe.colortheme+json",M=function(t){var s=i.isLoggedIn();if(!s)return;var o=k();if(!o)return;var u=t.data,a={},f=u.themeName;u.hasOwnProperty("rule")&&(a.rule=u.rule
,a.baseSwatchIndex=u.baseColorIndex),u.hasOwnProperty("mood")&&(a.mood=u.mood),a.swatches=[];var l=[],c=JSON.parse(u.assetList);c.forEach(function(e,t){l.push(r.execApp("getColorDataFromJSON",[JSON.stringify(e)]).then(function(e){var t=JSON.parse(e);a.swatches.push(t)}))}),e.all(l).then(function(){o.beginOperation();var e;g(u);var t=o.createElement(f,n.COLOR_THEME_ELEMENT_TYPE,e),r=t.createRepresentation(O,"primary");r.setValue(A,L,a),y(),o.endOperation()})},_=function(t){var s=i.isLoggedIn();if(!
s)return;var o;t.data.hasOwnProperty("libraryID")&&(o=t.data.libraryID);var u=!1;t.data.hasOwnProperty("createNewLibrary")&&(u=JSON.parse(t.data.createNewLibrary));var a=k(o,u);if(!a)return;var f=[],l=[],c=JSON.parse(t.data.colorList);c.forEach(function(e,t){l.push(r.execApp("getColorDataFromJSON",[JSON.stringify(e)]).then(function(t){f.push({name:e.colorName,data:JSON.parse(t)})}))}),e.all(l).then(function(){a.beginOperation();var e,r=function(t){var r=a.createElement(t.name,n.COLOR_ELEMENT_TYPE
,e);t.data.forEach(function(e,t){var i=t===0?"primary":"rendition",s=r.createRepresentation(n.COLOR_REPRESENTATION_TYPE,i);s.setValue(n.COLOR_NAMESPACE,n.COLOR_DATA_KEY,e)})},i;g(t.data);for(i=0;i<f.length;++i)r(f[i]);y(),a.endOperation()})},D="data",P="characterstyle",H="application/vnd.adobe.characterstyle+json",B="application/vnd.adobe.characterstyle+snippet",j="data",F="paragraphstyle",I="application/vnd.adobe.paragraphstyle+json",q="application/vnd.adobe.paragraphstyle+snippet",R=104,U=function(
t,s){var o=i.isLoggedIn();if(!o)return;var u;t.data.hasOwnProperty("libraryID")&&(u=t.data.libraryID);var a=!1;t.data.hasOwnProperty("createNewLibrary")&&(a=JSON.parse(t.data.createNewLibrary));var l=k(u,a);if(!l)return;var c,h,p,d,v;s?(c=D,h=P,p=n.CHARACTER_STYLE_ELEMENT_TYPE,d=H,v=B):(c=j,h=F,p=n.PARAGRAPH_STYLE_ELEMENT_TYPE,d=I,v=q);var m;t.data.documentID?m=JSON.parse(t.data.documentID):m=-1;var b=JSON.parse(t.data.styleUIDList);b.forEach(function(n,i){var o=s?"getCharStyleInfoByID":"getParaStyleInfoByID"
;r.execApp(o,[m,n]).then(function(n){var r=JSON.parse(n);l.beginOperation();var i;g(t.data);var s=l.createElement(r.styleName,p,i);y();var o=[],u=s.createRepresentation(v,"primary"),a=u.updateContentFromPath(r.idmsPath).then(function(){f.deleteFile(r.idmsPath)});o.push(a);var m=s.createRepresentation(d,"rendition");m.setValue(h,c,r.styleInfo);if(r.previewPath){var b=s.createRepresentation("image/png","rendition");a=b.updateContentFromPath(r.previewPath).then(function(){}),o.push(a)}e.all(o).then(
function(){r.previewPath&&s.setRenditionCache(R,r.previewPath,function(){f.deleteFile(r.previewPath)}),l.endOperation()})})})},z=function(e){U(e,!1)},W=function(e){U(e,!0)};this.startEventListener=function(){r.addEventListener("afterSelectionChanged",w),r.addEventListener("afterSelectionAttributeChanged",w),r.addEventListener("colorChanged",w),r.addEventListener("colorTransformChanged",w),r.addEventListener("uiPreferencesChanged",E),r.addEventListener("fontListChanged",S),r.addEventListener("documentAfterActivate"
,x),r.addEventListener("newAssetToMigrate",N),r.addEventListener("createNewCloudLibrary",C),r.addEventListener("createNewColorTheme",M),r.addEventListener("createNewColors",_),r.addEventListener("createNewParaStyles",z),r.addEventListener("createNewCharStyles",W),r.addEventListener("documentAfterDeactivate",T)},this.stopEventListener=function(){r.removeEventListener("afterSelectionChanged",w),r.removeEventListener("afterSelectionAttributeChanged",w),r.removeEventListener("colorChanged",w),r.removeEventListener
("colorTransformChanged",w),r.removeEventListener("uiPreferencesChanged",E),r.removeEventListener("fontListChanged",S),r.removeEventListener("documentAfterActivate",x),r.removeEventListener("newAssetToMigrate",N),r.removeEventListener("createNewCloudLibrary",C),r.removeEventListener("createNewColorTheme",M),r.removeEventListener("createNewColors",_),r.removeEventListener("createNewParaStyles",z),r.removeEventListener("createNewCharStyles",W),r.removeEventListener("documentAfterDeactivate",T)},this
.dropHandler=function(e){return console.log("InDesign app is handling",e),!1}}];t.attach=function(e){n.module(e).service("IDSN",r)}}),define("applications/ILST/js/events",["require","exports","module"],function(e,t){"use strict";var n=["csInterface","ccLibraries","mediator","layerSelectionManager","designLibraryManager","configuration","designLibraryUtils","$q","fileUtils","designLibraryCEPEventHandlers","linkUtils","designLibraryStatus",function(e,t,n,r,i,s,o,u,a,f,l,c){this.setFocusToCanvas=
function(){};var h=function(e){n.emit("fontListChanged")},p=function(){r.handleSelectionChange()},d=function(t,n){if(t){var r=t.element,i=r.getReference();t.getContentPath().then(function(t){var s=new CSEvent("com.adobe.DesignLibraries.events.ElementUpdated","APPLICATION");s.data=JSON.stringify({requestRef:n,elementRef:i,name:r.name,libraryName:r.library.name,modifiedTime:r.modified,creationTime:r.created,data:[t]}),e.dispatchEvent(s)})}},v=function(e,t,n){var r=t&&t.files||"",i=0;r=JSON.parse(r)||
[];for(i=0;i<r.length;i++){var s=r[i],o=a.fileNameToContentType(s.path),u=n.createRepresentation(o,s.relationship),f=u.updateContentFromPath(s.path);e.push(f)}},m=function(t){var n=new CSEvent("ILST.InitialCommunicationError","APPLICATION"),r=c.getStatus();n.data={elementIdentifier:t,status:"error",error:r&&r.errorType||"kError"},e.dispatchEvent(n)},g=function(t,n,r){var s=!1,o=!1,u=function(){var a=i.getCurrentLibraryCollection();if(a&&!o&&(a.syncState==="ok"||a.syncState==="error"||a.syncState==="turned_off"
)){var f=new CSEvent("ILST.elementUploaded","APPLICATION"),h={errorType:"kNoErr"};a.syncState==="error"&&(h=c.getStatus()),f.data={elementRef:t.getReference(),status:a.syncState,error:h.errorType},e.dispatchEvent(f),o=!0,n&&a.syncState==="ok"&&!s&&(r==="kAIChart"?l.openElementURL(t,"charts",{feature_set:"aqbr0m1b3q"}):r==="kAIArt"&&l.openElementURL(t,"details"),s=!0),i.removeListener("libraryStatus",u)}};i.addListener("libraryStatus",u)},y=function(e){var t=0;for(t=0;t<e.length;t++){var n=e[t];a.
existsFile(n.path)&&a.deleteFile(n.path)}},b=function(e,t,n){if(!e)throw"No current library";if(!t||!t.files||!n)throw"event data invalid"},w=function(e){i.sync(!1,!1)},E=function(e){var t=u.defer(),n=e.data.fileData,r=e.data.elementType,a=null,l=i.getCurrentLibrary();n.layerIds=JSON.parse(n.layerIds);var c=e.data.openBrowserAfterOperation||!1;try{b(l,n,r);if(n.layerIds===null||n.documentId===null)throw"layer Ids Or documentId cannot be null";if(r!=="kAIArt"&&r!=="kAIChart")throw"Element not supported yet"
;a=s.IMAGE_ELEMENT_TYPE,l.beginOperation(),n.layerName=o.getCuratedName(l,n.layerName);var h=l.createElement(n.layerName,a),p=[];return v(p,n,h),u.all(p).then(function(){n.rendition&&h.setRenditionCache(s.IMAGE_RENDITION_SIZE,n.rendition).then(function(){y(n.files)}),l.endOperation(),f.sendElementCreated(h,n.documentId,n.layerIds),g(h,c,r),t.resolve(h)},function(){t.reject("Could not add element")}),t.promise}catch(d){m(n.layerIds&&n.layerIds[0]||null),t.reject("Could not add element: "+d)}},S=function(
e){var n=u.defer(),r=e.data.fileData,i=e.data.elementType,o=e.data.elementRef,a=e.data.openBrowserAfterOperation||!1;try{if(!o)throw"elementRef missing";var f=t.resolveElementReference(o);if(!f)throw"Element not found";var l=f.library;b(l,r,i),l.beginOperation(),f.deletedLocally?f=l.createElement(f.name,f.type):f.removeAllRepresentations();var c=[];return v(c,r,f),u.all(c).then(function(){r.rendition&&f.setRenditionCache(s.IMAGE_RENDITION_SIZE,r.rendition).then(function(){y(r.files)}),l.endOperation
(),d(f.getPrimaryRepresentation(),e.data.requestRef),g(f,a,i),n.resolve(f)},function(){n.reject("Could not update element")}),n.promise}catch(h){m(e.data.requestRef),n.reject("Could not update element: "+h)}};this.listen=function(){e.addEventListener("artSelectionChanged",p),e.addEventListener("fontListChanged",h),e.addEventListener("ILST.addElementToLibrary",E),e.addEventListener("ILST.updateElement",S),e.addEventListener("ILST.forceSyncLibrary",w)},this.stop=function(){e.removeEventListener("artSelectionChanged"
,p),e.removeEventListener("fontListChanged",h),e.removeEventListener("ILST.addElementToLibrary",E),e.removeEventListener("ILST.updateElement",S),e.removeEventListener("ILST.forceSyncLibrary",w)}}];t.attach=function(e){angular.module(e).service("ILSTEvents",n)}}),define("applications/ILST/js/index",["require","exports","angular","./events"],function(e,t){"use strict";var n=e("angular"),r=e("./events"),i=["configuration","csInterface","ILSTEvents","colorUtils","localSettings","fileUtils","designLibraryManager"
,function(e,t,n,r,i,s,o){this.getILSTScaleColor=function(e){var t=52,n=184,i=e<51?!1:!0,s=i?.61:.62,o=i?n:t,u=i?e-51:e,a=u*s+o;return r.rgbToHex({red:a,green:a,blue:a})},this.cssThemeBGScale=function(){var e,t,n={},r=function(e){switch(e){case 0:return"darker";case 33:return"dark";case 66:return"light";case 100:return"lighter";default:return e.toString()}};for(e=0;e<=100;e++){t=this.getILSTScaleColor(e).slice(1);if(!n.hasOwnProperty(t)||n.hasOwnProperty(t)&&r(e)!==e.toString())n[t]=r(e)}return n}
,this.config={},this.config.code="ILST",this.config.fullName="Illustrator",this.config.translationSuffix="AI",this.config.dragDropSource="com.adobe.illustrator",this.config.isDrover=!0,this.config.offsetSelectMenu=!0,this.config.themes=this.cssThemeBGScale(),this.config.analytics={namespace:"ai",prodId:"adbemillustrator.rebootprod2",devId:"adbemillustrator.rebootdev2"},this.startEventListener=function(){n.listen()},this.stopEventListener=function(){n.stop()},this.init=function(){s.extendUsableTypes
(e.IMAGE_ELEMENT_TYPE,["image/png","image/jpeg","image/jpg","image/svg+xml","application/photoshop","image/vnd.adobe.photoshop","application/illustrator","application/pdf","application/vnd.adobe.charts+zip"]),s.extendUsableTypes(e.COLOR_ELEMENT_TYPE,["application/vnd.adobe.color+json"]),s.extendUsableTypes(e.COLOR_THEME_ELEMENT_TYPE,["application/vnd.adobe.colortheme+json"]),s.extendUsableTypes(e.BRUSH_ELEMENT_TYPE,["application/vnd.adobe.vector.brush+zip"]),s.extendUsableTypes(e.CHARACTER_STYLE_ELEMENT_TYPE
,["application/vnd.adobe.characterstyle+json"]),s.extendEditableTypes(e.IMAGE_ELEMENT_TYPE,["image/svg+xml","application/illustrator"]),t.execApp("setThumbnailExportOptions"),t.execApp("getTooltipState").then(function(t){e.showTooltips=t}),this.startEventListener();var n=t.getGlobalRoot();!VulcanInterface.isAppInstalled("illustrator-18")&&!VulcanInterface.isAppInstalled("illustrator-18.032")&&!VulcanInterface.isAppInstalled("illustrator-18.064")&&s.removeRecursive(n+"ILST"),o.waitForInitialLoad()
.then(function(){var e=new CSEvent("com.adobe.DesignLibraries.events.READY","APPLICATION");t.dispatchEvent(e)})},this.reportEvent=function(e,n){console.log("Metric reported to AI"),n.event=e;var r=new CSEvent("com.adobe.illustrator.LOGPIP","APPLICATION");r.data=JSON.stringify(n),t.dispatchEvent(r),delete n.event}}];t.attach=function(e){r.attach(e),n.module(e).service("ILST",i)}}),define("applications/PHXS/js/events",["require","exports","module"],function(e,t){"use strict";var n=["csInterface"
,"mediator","configuration","designLibraryManager","layerSelectionManager","phxsPush",function(e,t,n,r,i,s){var o=function(e){return i.handleSelectionChange(),!1},u=function(n){return e.execApp("refreshFonts").then(function(){t.emit("fontListChanged")}),!1},a=function(t){e.execApp("getTooltipState").then(function(e){n.showTooltips=e})},f=[{id:"1684816969",name:"dlDocInfoChanged",callback:o,dynamic:!1},{id:null,name:"foregroundColorChanged",callback:o,dynamic:!0},{id:null,name:"fontListChanged",callback
:u,dynamic:!0},{id:null,name:"preferencesChanged",callback:a,dynamic:!0}],l="",c=function(e){if(!e||!e.data)return;s.pushAssetToLibrary(e.data)},h=function(e){if(!e)return;var t=e.data?e.data.split(", "):[];f.filter(function(e){return t.indexOf(e.id)!==-1}).some(function(t){return t.callback(e)===!1})};this.listen=function(){var t=f.reduce(function(e,t){return t.dynamic&&e.push(t.name),e},[]);e.exec("PHXS","getStringID",[t]).then(function(t){var n=t.split(","),i=0;f.forEach(function(e){e.dynamic&&
(e.id=n[i],i++)}),l=f.map(function(e){return e.id}).join(",");var s=new CSEvent("com.adobe.PhotoshopRegisterEvent","APPLICATION");s.data=l,e.dispatchEvent(s),e.addEventListener("PhotoshopCallback",h),e.addEventListener("pushAssetToLibrary",c),r.waitForInitialLoad().then(function(){var t=new CSEvent("com.adobe.DesignLibraries.events.READY","APPLICATION");e.dispatchEvent(t)})}),a()},this.stop=function(){var t=new CSEvent("com.adobe.PhotoshopUnRegisterEvent","APPLICATION");t.data=l,e.dispatchEvent(t
),e.removeEventListener("PhotoshopCallback",h),e.removeEventListener("pushAssetToLibrary",c),l=""}}];t.attach=function(e){angular.module(e).service("phxsEvents",n)}}),define("applications/PHXS/js/descriptor",["require","exports","module"],function(e,t){"use strict";var n=["$q","$translate","fileUtils","csInterface","mediator","configuration","designLibraryManager","designLibraryElements",function(e,t,n,r,i,s,o,u){this.detype=function(e){return e._obj},this.deref=function(e){return e._value},this
.ify=function(e){var t={},n=Object.keys(e),r=n.length,i;for(i=0;i<r;++i){var s=n[i];typeof e[s]=="object"?t[s]={_obj:"",_value:this.ify(e[s])}:t[s]=e[s]}return t}}];t.attach=function(e){angular.module(e).service("descriptor",n)}}),define("applications/PHXS/js/push",["require","exports","module"],function(e,t){"use strict";var n=["$q","$translate","fileUtils","descriptor","csInterface","mediator","configuration","designLibraryManager","designLibraryElements",function(e,t,n,r,i,s,o,u,a){var f=function(
){var e=u.getCurrentLibrary();if(!e){var n=u.getCurrentLibraryCollection();if(!n)throw"Could not find current library collection";var r=t.instant("DL_DEFAULT_LIBRARY_NAME"),i=n.createLibrary(r);if(!i)throw"Could not create new library";u.setCurrentLibrary(i),e=u.getCurrentLibrary()}return e},l=function(e){if(!e)return{};var t={elementID:e.id,elementType:function(e){if(e.type){var t=e.type.match(/application\/vnd\.adobe\.element\.(.*)\+dcx/);return t&&t.length===2?t[1]:e.type}return null}(e)},n=e.
_library;return n&&(t.libraryID=n.id,t.libraryElementCount=n._elements.length,n.collaboration&&(t.libraryShared=n.collaboration)),t},c=function(e,t){angular.isFunction(o.currentProduct.reportEvent)?o.currentProduct.reportEvent(e,t,!0):console.error("Highbeam analytics not available.")},h=function(e){var t={type:"process"},n=r.detype(e);switch(n){case"CMYKColorClass":t.mode="CMYK",t.value={c:e.cyan,m:e.magenta,y:e.yellowColor,k:e.black};break;case"RGBColor":t.mode="RGB",t.value={r:e.red,g:e.grain,
b:e.blue};break;case"HSBColorClass":t.mode="HSB",t.value={h:e.hue._value,s:e.saturation,b:e.brightness};break;case"labColor":t.mode="Lab",t.value={l:e.luminance,a:e.a,b:e.b};break;case"grayscale":t.mode="Gray",t.value=e.gray;break;default:t.mode=n,t.value=e}return t},p=function(t,r){var i=e.defer(),s=[],u=f(),a=t.name||"",l=t.aslPath,c=t.pngPath,h;s.push(i.promise);try{if(!n.existsFile(l))throw"no aslPath specified";if(!n.existsFile(c))throw"no pngPath specified";if(!u)throw"no library";u.beginOperation
();var p;h=u.createElement(a,o.LAYER_STYLE_ELEMENT_TYPE,p),s.push(h.createRepresentation(n.fileNameToContentType(l),"primary").updateContentFromPath(l)),s.push(h.createRepresentation(n.fileNameToContentType(c),"rendition").updateContentFromPath(c)),i.resolve(h)}catch(d){i.reject("Could not push layer style: "+d)}var v=function(){var e=124;return n.existsFile(c)&&h.setRenditionCache(e,c).then(function(){n.deleteFile(c)}),n.existsFile(l)&&n.deleteFile(l),u.endOperation(),h},m=function(e){throw u.endOperation
(),e};return e.all(s).then(v,m)},d=function(t,n){var r=e.defer();try{var i=f(),s=t.name||"";if(!i)throw"No library";i.beginOperation();var u="application/vnd.adobe.color+json",a,l=i.createElement(s,o.COLOR_ELEMENT_TYPE,a);t.primary&&l.createRepresentation(u,"primary").setValue("color","data",h(t.primary)),t.secondary&&l.createRepresentation(u,"rendition").setValue("color","data",h(t.secondary)),i.endOperation(),r.resolve(l)}catch(c){r.reject("Could not push color: "+c)}return r.promise},v=[{type:"color"
,callback:d},{type:"layerStyle",callback:p}];this.pushAssetToLibrary=function(t){var n=e.defer(),s=[],o=t.event_metadata;s.push(n.promise);var u=function(e){var t=new CSEvent("pushAssetToLibraryResponse","APPLICATION"),n={metadata:o,response:e};t.data=r.ify(n),i.dispatchEvent(t)},a=function(e){u({status:"ok"}),c("pushAssetToLibrary",l(e))},f=function(e){u({status:"error",details:e})};try{if(!t||!o)throw"parameter error";var h=t.assetType;if(!h)throw"asset type not defined";var p=v.filter(function(
e){return h===e.type});if(!(p.length>0))throw"No asset handler found for "+h;p.forEach(function(e){s.push(e.callback(t,o).then(a,f))}),n.resolve()}catch(d){n.reject("pushAssetToLibrary failed: "+d)}return e.all(s)}}];t.attach=function(e){angular.module(e).service("phxsPush",n)}}),define("applications/PHXS/js/index",["require","exports","./events","./descriptor","./push","angular"],function(e,t){"use strict";var n=e("angular"),r=e("./events"),i=e("./push"),s=e("./descriptor"),o=["$q","$window","phxsEvents"
,"csInterface","fileUtils","localSettings","configuration",function(e,t,n,r,i,s,o){this.config={},this.config.code="PHXS",this.config.translationSuffix="PS",this.config.fullName="Photoshop",this.config.dragDropSource="com.adobe.photoshop",this.config.rgbRound=Math.round,this.config.themes={343434:"darker",535353:"dark",b8b8b8:"light",d6d6d6:"lighter"},this.config.analytics={namespace:"ps",prodId:"adbemphotoshop.rebootprod2",devId:"adbemphotoshop.rebootdev2"},this.config.generalLinkingEnabled=!1,this
.setFocusToCanvas=function(){var e=new CSEvent("com.adobe.PhotoshopLoseFocus","APPLICATION");r.dispatchEvent(e)},this.init=function(){var t=e.defer();r.execApp("getConfigInfoFromPS").then(function(e){var t=JSON.parse(e)||{};o.currentProduct.config.generalLinkingEnabled=t.generalLinkingEnabled}),i.extendUsableTypes(o.COLOR_ELEMENT_TYPE,["application/vnd.adobe.color+json"]),i.extendUsableTypes(o.COLOR_THEME_ELEMENT_TYPE,["application/vnd.adobe.colortheme+json"]),i.extendUsableTypes(o.BRUSH_ELEMENT_TYPE
,["image/x-adobe-photoshop-brush"]),i.extendUsableTypes(o.CHARACTER_STYLE_ELEMENT_TYPE,["application/vnd.adobe.characterstyle+json"]),i.extendUsableTypes(o.LAYER_STYLE_ELEMENT_TYPE,["application/vnd.adobe.layerstyle"]),r.execApp("getReadableFileExtensions").then(function(e){var n=JSON.parse(e)||[];n.length>0?i.extendEditableTypesWithExtensions(o.IMAGE_ELEMENT_TYPE,n):(console.log("Failed to get readable file extensions from PHXS, using short default list."),i.extendEditableTypes(o.IMAGE_ELEMENT_TYPE
,["image/png","image/jpeg","image/jpg","image/gif","image/bmp","application/photoshop","image/vnd.adobe.photoshop","application/photoshop.large","application/illustrator","application/pdf"])),t.resolve()},function(){t.reject()});var n=new CSEvent("com.adobe.PhotoshopPersistent","APPLICATION");r.dispatchEvent(n),this.startEventListener();var s=r.getGlobalRoot();return!VulcanInterface.isAppInstalled("photoshop-15")&&!VulcanInterface.isAppInstalled("photoshop-15.032")&&!VulcanInterface.isAppInstalled
("photoshop-15.064")&&i.removeRecursive(s+"PHXS"),t.promise},this.startEventListener=function(){n.listen()},this.stopEventListener=function(){n.stop()},this.reportEvent=function(e,t,n){r.execApp("reportEvent",[e,t,n]).then(function(t){var n=JSON.parse(t);n&&console.log(e+" metric reported to PS")})}}];t.attach=function(e,t){s.attach(e),r.attach(e),i.attach(e),n.module(e).service("PHXS",o)}}),define("applications/PPRO/js/index",["require","exports","angular"],function(e,t){"use strict";var n=e("angular"
),r=["$injector","colorUtils","fileUtils","configuration",function(e,t,n,r){this.getScaleColor=function(e){var n=38,r=.51,i=n,s=e,o=s*r+i;return t.rgbToHex({red:o,green:o,blue:o})},this.cssThemeBGScale=function(){var e,t,n={},r=function(e){switch(e){case 0:return"darker";case 100:return"dark";default:return e.toString()}};for(e=0;e<=100;e++){t=this.getScaleColor(e).slice(1);if(!n.hasOwnProperty(t)||n.hasOwnProperty(t)&&r(e)!==e.toString())n[t]=r(e)}return n},this.config={},this.config.code="PPRO"
,this.config.fullName="Premiere Pro",this.config.translationSuffix="PR",this.config.dragDropSource="com.adobe.premiere",this.config.isDrover=!0,this.config.themes=this.cssThemeBGScale(),this.config.analytics={namespace:"pr",prodId:"adbempremierepro.rebootprod2",devId:"adbempremierepro.rebootdev2"},this.init=function(){n.extendUsableTypes(r.IMAGE_ELEMENT_TYPE,["application/pdf","application/illustrator","application/photoshop","image/vnd.adobe.photoshop","image/png","image/jpeg","image/jpg"]),n.extendUsableTypes
(r.COLOR_ELEMENT_TYPE,["application/vnd.adobe.color+json"]),n.extendUsableTypes(r.COLOR_THEME_ELEMENT_TYPE,["application/vnd.adobe.colortheme+json"]),n.extendUsableTypes(r.LOOK_ELEMENT_TYPE,["application/vnd.adobe.cube+txt","application/vnd.adobe.look+xml"]);var t=e.get("csInterface");t.execApp("setThumbnailExportOptions"),t.execApp("getTooltipState").then(function(t){e.get("configuration").showTooltips=t}),this.startEventListener()},this.reportEvent=function(e,t){},this.setFocusToCanvas=function(
){};var i=function(){var t=e.get("layerSelectionManager");t.handleSelectionChange()};this.startEventListener=function(){var t=e.get("csInterface");t.addEventListener("lookSelectionChanged",i)},this.stopEventListener=function(){var t=e.get("csInterface");t.removeEventListener("lookSelectionChanged",i)}}];t.attach=function(e){n.module(e).service("PPRO",r)}}),define("applications/AEFT/js/configuration/color",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module
(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.COLOR_ELEMENT_TYPE,order:1,getApplyOperations:function(e,r){var o=function(t){return function(r,o){return r||(r=[],e.representations.forEach(function(e){var t=e.getValue(s.COLOR_NAMESPACE,s.COLOR_DATA_KEY),n=e.getValue("library","rel");n==="primary"?r.unshift(t):r.push(t)}),e.representations.length>0&&i.reportApplyMetric(e.representations
[0],t)),angular.isFunction(o)&&o(t),n.execApp(t,[r])}},u=t.getLayerInfo();return!u||u&&!u.selectionExists?[]:[{name:"DL_SET_COLOR_TOOLTIP",icon:"paintbucket",isDraggable:!1,apply:o("setColor"),displayInMenu:!0,onClick:!0}]}})}])}}),define("applications/AEFT/js/configuration/image",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","designLibraryManager"
,"configuration","$translate","documentWatcher","tempFileManager",function(e,t,n,r,i,s,o,u,a,f){e.registerOverride({type:o.IMAGE_ELEMENT_TYPE,order:3,getApplyOperations:function(t,s){var u=function(){var s=e.findRepresentation(t,r.getUsableTypes(o.IMAGE_ELEMENT_TYPE));return s?(i.reportApplyMetric(s,"placeAsset"),s.getContentPath().then(function(e){var i=r.mimeLookup(o.IMAGE_ELEMENT_TYPE,s.type),u=i&&i.name==="Photoshop";return n.execApp("placeAsset",[e,u,t.name])})):t.getRenditionPath().then(function(
e){return n.execApp("placeAsset",[e,!1,t.name])},function(e){console.log(e)})};return[{name:"DL_IMPORT_IMAGE_TO_PROJECT",onClick:!1,isDraggable:!0,allowMultiple:!0,apply:u,displayInMenu:!0}]}})}])}}),define("applications/AEFT/js/configuration/textstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){var o="characterstyle"
,u="data";e.registerOverride({type:s.CHARACTER_STYLE_ELEMENT_TYPE,order:5,getApplyOperations:function(e,t){var n=[];return n}})}])}}),define("applications/AEFT/js/configuration/layerstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration","$translate",function(e,t,n,r,i,s,o){e.registerOverride({type:s.LAYER_STYLE_ELEMENT_TYPE,order:7
,getApplyOperations:function(e,t){return[]}})}])}}),define("applications/AEFT/js/configuration/brush",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.BRUSH_ELEMENT_TYPE,order:8,getApplyOperations:function(e,t){return[]}})}])}}),define("applications/AEFT/js/configuration/look",["require"
,"exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration","$translate",function(e,t,n,r,i,s,o){e.registerOverride({type:s.LOOK_ELEMENT_TYPE,order:4,isDraggable:!0,getApplyOperations:function(t,i){var o=function(){var i=e.findRepresentation(t,r.getUsableTypes(s.LOOK_ELEMENT_TYPE));if(i)return i.getContentPath().then(function(e){return n.execApp("placeAsset"
,[e,!1,t.name])})};return[{name:"DL_APPLY_LOOK",onClick:!1,isDraggable:!0,allowMultiple:!1,apply:o,displayInMenu:!0}]}})}])}}),define("applications/AEFT/js/configuration/parastyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.PARAGRAPH_STYLE_ELEMENT_TYPE,order:6,getAddOperations:function(
){return[]}})}])}}),define("applications/AEFT/js/configuration/main",["require","exports","./color","./image","./textstyle","./layerstyle","./brush","./look","./parastyle"],function(e,t){"use strict";t.attach=function(t){e("./color").attach(t),e("./image").attach(t),e("./textstyle").attach(t),e("./layerstyle").attach(t),e("./brush").attach(t),e("./look").attach(t),e("./parastyle").attach(t)}}),define("applications/IDSN/js/configuration/color",["require","exports","module"],function(e,t){"use strict"
;t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.COLOR_ELEMENT_TYPE,getApplyOperations:function(e,r){var o=t.getLayerInfo(),u=function(t){return function(r,o){return r||(r=[],e.representations.forEach(function(t){var n=t.getValue(s.COLOR_NAMESPACE,s.COLOR_DATA_KEY);e.name!==undefined&&(n.name=e.name),t.relationship==="primary"?r.unshift(n):r.push
(n)}),e.representations.length>0&&i.reportApplyMetric(e.representations[0],t)),angular.isFunction(o)&&o(t),n.execApp(t,[r])}};return!o||o&&!o.selectionExists&&!o.textSelectionExists?[]:[{name:"DL_SET_COLOR_TOOLTIP",icon:"paintbucket",apply:u("setColor"),displayInMenu:!0,onClick:!0}]},editOperation:function(t,i){var o=e.findRepresentation(t,r.getUsableTypes(s.COLOR_ELEMENT_TYPE)),u;o&&(u=o.getValue(s.COLOR_NAMESPACE,s.COLOR_DATA_KEY));var a;return n.execApp("replaceColor",[u]).then(function(e){return a=
JSON.parse(e),n.execApp("getLayerColor",[])}).then(function(e){if(a){var n=JSON.parse(e);i.beginOperation(),t.removeAllRepresentations(),n.forEach(function(e,n){var r=n===0?"primary":"rendition",i=t.createRepresentation(s.COLOR_REPRESENTATION_TYPE,r);i.setValue(s.COLOR_NAMESPACE,s.COLOR_DATA_KEY,e)}),i.endOperation()}})}})}])}}),define("applications/IDSN/js/configuration/image",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["$q","designLibraryElements"
,"layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration","$translate","documentWatcher","designLibraryManager","tempFileManager","adobeStockUtils","designLibraryCEPEventHandlers",function(e,t,n,r,i,s,o,u,a,f,l,c,h){t.registerOverride({type:o.IMAGE_ELEMENT_TYPE,getApplyOperations:function(e,u){var a=n.getLayerInfo(),f=function(n){var u=c.getStockId(e),a=t.findRepresentation(e,i.getUsableTypes(o.IMAGE_ELEMENT_TYPE));return a?(s.reportApplyMetric(a,"placeAsset",n),a.getContentPath
().then(function(t){var s=i.mimeLookup(o.IMAGE_ELEMENT_TYPE,a.type),f=s&&s.name==="Photoshop";return r.execApp("placeAsset",[t,f,e.library.name,e.name,e.getReference(),e.modified,e.created,u,u?c.isLicensed(e):null,n])})):e.getRenditionPath().then(function(t){return s.reportApplyMetric({type:"image/png",_element:e},"placeAsset",n),r.execApp("placeAsset",[t,!1,e.library.name,e.name,e.getReference(),e.modified,e.created,u,u?c.isLicensed(e):null,n])},function(e){console.log(e)})};if(!a)return[];var l="application/vnd.adobe.indesign-idms"
,h=e.getPrimaryRepresentation(),p=h&&h.type===l;return[{name:"DL_ADD_IMAGE_TO_DOC_AS_LINKED",icon:"download",allowMultiple:!0,apply:function(){f(!0)},displayInMenu:!p},{name:"DL_ADD_IMAGE_TO_DOC_AS_COPY",icon:"download",allowMultiple:!0,apply:function(){f(!1)},displayInMenu:!0}]},editOperation:function(n,p){var d=n.getPrimaryRepresentation(),v=d&&i.isTypeEditable(d.type);if(!v){u("DL_ERROR_INVALID_FILE_FORMAT_ID").then(function(e){r.showError(e)});return}var m,g=!1,y=!1;l.createTempFile(n,d).then
(function(e){return m=e,r.execApp("openAssetForEdit",[e])}).then(function(r){var u=m.lastIndexOf("."),d=m.substring(0,u),v=a.startListening(r,d,function(r){if(r==="closed")a.stopListening(v),g=!0,y===!1&&(l.deleteTempFile(n,m),i.deleteFile(d)),h.elementEditCancelled(n);else if(r==="saved"){if(!s.checkFileSize(m))return;y=!0;var u=m.lastIndexOf("."),b=m.substring(0,u),w=b+".pdf",E=b+".png";if(!i.existsFile(m)||!i.existsFile(w)){y=!1;return}if(!p||p.deletedLocally){p=f.getCurrentLibrary();if(!p)return}
p.beginOperation();var S=c.getStockData(n);n.deletedLocally?n=p.createElement(n.name,n.type):n.removeAllRepresentations();var x=[],T=i.fileNameToContentType(m),N=n.createRepresentation(T,"primary");S&&c.setStockData(n,S),x.push(N.updateContentFromPath(m)),T=i.fileNameToContentType(w);var C=n.createRepresentation(T,"rendition");x.push(C.updateContentFromPath(w));if(E&&i.existsFile(E)){var k=t.setRendition(n,o.IMAGE_RENDITION_SIZE,E);x.push(k)}var L=function(){h.sendElementUpdated(N),g?l.deleteTempFile
(n,m):l.updateTempFile(n,N,m),y=!1,p.endOperation()};e.all(x).then(L,L)}})})}})}])}}),define("applications/IDSN/js/configuration/textstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["$q","designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s,o){var u="application/vnd.adobe.characterstyle+json",a="application/vnd.adobe.characterstyle+snippet",f="characterstyle"
,l="data";t.registerOverride({type:o.CHARACTER_STYLE_ELEMENT_TYPE,getApplyOperations:function(e,c){var h=n.getLayerInfo(),p=function(e,t,n){e.type="charstyle",e.name=t,e.id=n},d=function(n){var c=t.findRepresentation(e,i.getUsableTypes(o.CHARACTER_STYLE_ELEMENT_TYPE));if(c){s.reportApplyMetric(c,n);var h=t.getDisplayText(e),d=e.id+";"+e.modified,v;if(c.type===u){var m=c.getValue(f,l);p(m,h,d),v=r.execApp(n,[m])}else c.type===a&&(v=c.getContentPath().then(function(e){var t={};return p(t,h,d),t.idmsPath=
e,r.execApp(n,[t])}));return v}},v=function(){return d("setFont")},m=function(){return d("createTextLayer")},g=[];return h?(h&&h.kind==="LayerKind.TEXT"&&g.push({name:"DL_SET_TEXT_STYLE_TOOLTIP",icon:"text",onClick:!0,apply:v,displayInMenu:!0}),g.push({name:"DL_CREATE_TEXT_LAYER_TOOLTIP",icon:"pastetext",apply:m,displayInMenu:!0}),g):[]},getAddOperations:function(t){var s=function(e){return!1},c=function(t,s){function h(n){if(!n||n.kind!=="LayerKind.TEXT")return;r.execApp("getCharStyleInfo").then
(function(n){var r=JSON.parse(n);t.beginOperation();var h=t.createElement(r.styleName,o.CHARACTER_STYLE_ELEMENT_TYPE,s),p=[],d,v;if(r.idmsPath){var m=h.createRepresentation(a,"primary");v=m.updateContentFromPath(r.idmsPath).then(function(){i.deleteFile(r.idmsPath)}),p.push(v),d=h.createRepresentation(u,"rendition"),d.setValue(f,l,r.styleInfo)}else d=h.createRepresentation(u,"primary"),d.setValue(f,l,r.styleInfo);if(r.previewPath){var g=h.createRepresentation("image/png","rendition");v=g.updateContentFromPath
(r.previewPath).then(function(){}),p.push(v)}e.all(p).then(function(){r.previewPath&&h.setRenditionCache(o.CHARACTER_STYLE_RENDITION_SIZE,r.previewPath,function(){i.deleteFile(r.previewPath)}),t.endOperation()}),c.resolve(h)})}var c=e.defer();return n.requestUpdate(),n.addListener("layerSelectionChanged",h,!0),c.promise};return[{name:"DL_ADD_TEXT_STYLE_NAME",order:2,toolTip:"DL_ADD_TEXT_STYLE_TOOLTIP",icon:"newcharacterstyle",apply:c,checkDuplicates:s,disabled:!t||!t.text||t.isAppliedCharStyleSupported===!1
,displayIcon:!0}]}})}])}}),define("applications/IDSN/js/configuration/parastyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){var o="application/vnd.adobe.paragraphstyle+json",u="application/vnd.adobe.paragraphstyle+snippet",a="paragraphstyle",f="data";e.registerOverride({type:s.PARAGRAPH_STYLE_ELEMENT_TYPE
,getApplyOperations:function(l,c){var h=t.getLayerInfo(),p=function(e,t,n){e.type="parastyle",e.name=t,e.id=n},d=function(t){var c=e.findRepresentation(l,r.getUsableTypes(s.PARAGRAPH_STYLE_ELEMENT_TYPE));if(c){i.reportApplyMetric(c,t);var h=e.getDisplayText(l),d=l.id+";"+l.modified,v;if(c.type===o){var m=c.getValue(a,f);p(m,h,d),v=n.execApp(t,[m])}else c.type===u&&(v=c.getContentPath().then(function(e){var r={};return p(r,h,d),r.idmsPath=e,n.execApp(t,[r])}));return v}},v=function(){return d("setFont"
)},m=function(){return d("createTextLayer")},g=[];return h?(h&&h.kind==="LayerKind.TEXT"&&g.push({name:"DL_SET_PARA_STYLE_TOOLTIP",icon:"text",onClick:!0,apply:v,displayInMenu:!0}),g.push({name:"DL_CREATE_TEXT_LAYER_TOOLTIP",icon:"pastetext",apply:m,displayInMenu:!0}),g):[]}})}])}}),define("applications/IDSN/js/configuration/layerstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface"
,"fileUtils","designLibraryUtils","configuration","$translate",function(e,t,n,r,i,s,o){e.registerOverride({type:s.LAYER_STYLE_ELEMENT_TYPE,getApplyOperations:function(e,t){var r=function(){o("DL_ERROR_LAYER_STYLE_NOT_SUPPORTED_ID").then(function(e){n.showError(e)})};return[{name:"DL_APPLY_LAYER_STYLE",icon:"layerstyle",onClick:!0,allowMultiple:!0,apply:r,displayInMenu:!0}]}})}])}}),define("applications/IDSN/js/configuration/brush",["require","exports","module"],function(e,t){"use strict";t.attach=
function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration","$translate",function(e,t,n,r,i,s,o){e.registerOverride({type:s.BRUSH_ELEMENT_TYPE,getApplyOperations:function(e,t){var r=function(){o("DL_ERROR_BRUSH_NOT_SUPPORTED_ID").then(function(e){n.showError(e)})};return[{name:"DL_ADD_BRUSH_TO_DOC",icon:"brush",onClick:!0,allowMultiple:!0,apply:r,displayInMenu:!0}]}})}])}}),define("applications/IDSN/js/configuration/main"
,["require","exports","./color","./image","./textstyle","./parastyle","./layerstyle","./brush"],function(e,t){"use strict";t.attach=function(t){e("./color").attach(t),e("./image").attach(t),e("./textstyle").attach(t),e("./parastyle").attach(t),e("./layerstyle").attach(t),e("./brush").attach(t)}}),define("applications/ILST/js/configuration/color",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface"
,"fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.COLOR_ELEMENT_TYPE,getApplyOperations:function(e,r){var o=function(t){return function(r,o){return r||(r=[],e.representations.forEach(function(e){var t=e.getValue(s.COLOR_NAMESPACE,s.COLOR_DATA_KEY);e.relationship==="primary"?r.unshift(t):r.push(t)}),e.representations.length>0&&i.reportApplyMetric(e.representations[0],t)),angular.isFunction(o)&&o(t),n.execApp(t,[r])}},u=t.getLayerInfo();return!u||u&&!
u.selectionExists?[]:[{name:"DL_SET_COLOR_TOOLTIP",icon:"paintbucket",apply:o("setColor"),displayInMenu:!0,onClick:!0}]},editOperation:function(t,i){var o=e.findRepresentation(t,r.getUsableTypes(s.COLOR_ELEMENT_TYPE)),u;o&&(u=o.getValue(s.COLOR_NAMESPACE,s.COLOR_DATA_KEY));var a;return n.execApp("replaceColor",[u]).then(function(e){return a=JSON.parse(e),n.execApp("getLayerColor",[])}).then(function(e){if(a){var n=JSON.parse(e);i.beginOperation(),t.removeAllRepresentations(),n.forEach(function(e,
n){var r=n===0?"primary":"rendition",i=t.createRepresentation(s.COLOR_REPRESENTATION_TYPE,r);i.setValue(s.COLOR_NAMESPACE,s.COLOR_DATA_KEY,e)}),i.endOperation()}})}})}])}}),define("applications/ILST/js/configuration/image",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["$q","designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","designLibraryManager","configuration","$translate","documentWatcher","tempFileManager"
,"adobeStockUtils","designLibraryCEPEventHandlers",function(e,t,n,r,i,s,o,u,a,f,l,c,h){t.registerOverride({type:u.IMAGE_ELEMENT_TYPE,getApplyOperations:function(e,o){var a=function(n){var o=c.getStockId(e),a=t.findRepresentation(e,i.getUsableTypes(u.IMAGE_ELEMENT_TYPE));return a?(s.reportApplyMetric(a,"placeAsset",n),a.getContentPath().then(function(t){var s=i.mimeLookup(u.IMAGE_ELEMENT_TYPE,a.type),f=s&&s.name==="Photoshop";return r.execApp("placeAsset",[t,f,e.library.name,e.name,e.getReference(
),e.modified,e.created,o,o?c.isLicensed(e):null,n])})):e.getRenditionPath().then(function(t){return s.reportApplyMetric({type:"image/png",_element:e},"placeAsset",n),r.execApp("placeAsset",[t,!1,e.library.name,e.name,e.getReference(),e.modified,e.created,o,o?c.isLicensed(e):null,n])},function(e){console.log(e)})},f=n.getLayerInfo();return f?[{name:"DL_ADD_IMAGE_TO_DOC_AS_LINKED",icon:"download",allowMultiple:!0,apply:function(){a(!0)},displayInMenu:!0},{name:"DL_ADD_IMAGE_TO_DOC_AS_COPY",icon:"download"
,allowMultiple:!0,apply:function(){a(!1)},displayInMenu:!0}]:[]},editOperation:function(n,p){var d=n.getPrimaryRepresentation(),v=d&&i.isTypeEditable(d.type);if(!v){a("DL_ERROR_INVALID_FILE_FORMAT_AI").then(function(e){r.showError(e)});return}var m,g,y=!1,b=!1;l.createTempFile(n,d).then(function(e){return m=e,g=i.getFileNameWithoutExtension(m)+".png",r.execApp("openAssetForEdit",[e,g])}).then(function(a){var d=new CSEvent("com.adobe.illustrator.FitCurrentDocumentViewToActiveArtboard","APPLICATION"
);r.dispatchEvent(d);var v=f.startListening(a,m,function(r){if(r==="closed")f.stopListening(v),y=!0,b===!1&&l.deleteTempFile(n,m),h.elementEditCancelled(n);else if(r==="saved"){if(!s.checkFileSize(m))return;b=!0;if(!p||p.deletedLocally){p=o.getCurrentLibrary();if(!p)return}p.beginOperation();var a=c.getStockData(n);n.deletedLocally?n=p.createElement(n.name,n.type):n.removeAllRepresentations();var d=i.fileNameToContentType(m),w=n.createRepresentation(d,"primary");a&&c.setStockData(n,a);var E=[];E.
push(w.updateContentFromPath(m));if(g&&i.existsFile(g)){var S=t.setRendition(n,u.IMAGE_RENDITION_SIZE,g);E.push(S)}var x=function(){h.sendElementUpdated(w),y?l.deleteTempFile(n,m):l.updateTempFile(n,w,m),b=!1,p.endOperation()};e.all(E).then(x,x)}})})}})}])}}),define("applications/ILST/js/configuration/textstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils"
,"configuration",function(e,t,n,r,i,s){var o="characterstyle",u="data";e.registerOverride({type:s.CHARACTER_STYLE_ELEMENT_TYPE,getApplyOperations:function(a,f){var l=function(){var t=e.findRepresentation(a,r.getUsableTypes(s.CHARACTER_STYLE_ELEMENT_TYPE));if(t){i.reportApplyMetric(t,"setFont");var f=t.getValue(o,u);return n.execApp("setFont",[f])}},c=function(){var t=e.findRepresentation(a,r.getUsableTypes(s.CHARACTER_STYLE_ELEMENT_TYPE));if(t){i.reportApplyMetric(t,"createTextLayer");var f=t.getValue
(o,u);return n.execApp("createFontLayer",[f])}},h=[],p=t.getLayerInfo();return p?(p&&p.fontInfo&&h.push({name:"DL_SET_TEXT_STYLE_TOOLTIP",icon:"text",onClick:!0,apply:l,displayInMenu:!0}),h.push({name:"DL_CREATE_TEXT_LAYER_TOOLTIP",icon:"pastetext",apply:c,displayInMenu:!0}),h):[]}})}])}}),define("applications/ILST/js/configuration/layerstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface"
,"fileUtils","designLibraryUtils","configuration","$translate",function(e,t,n,r,i,s,o){e.registerOverride({type:s.LAYER_STYLE_ELEMENT_TYPE,getApplyOperations:function(e,t){var r=function(){o("DL_ERROR_LAYER_STYLE_NOT_SUPPORTED_AI").then(function(e){n.showError(e)})};return[{name:"DL_APPLY_LAYER_STYLE",icon:"layerstyle",onClick:!0,allowMultiple:!0,apply:r,displayInMenu:!0}]}})}])}}),define("applications/ILST/js/configuration/brush",["require","exports","module"],function(e,t){"use strict";t.attach=
function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.BRUSH_ELEMENT_TYPE,getApplyOperations:function(s,o){var u=r.getUsableTypes(s.type),a=s.representations.filter(function(t){var n=t.relationship==="rendition",r=e.isRepresentationCompatible(t,u);return!n&&r}),f=t.getLayerInfo(),l=a.length===0||!f;if(!l){var c=function(){var e=a[0];if(e)return i.reportApplyMetric
(e,"useBrush"),e.getContentPath().then(function(e){return n.execApp("loadAndSelectBrush",[e,s.name])})};return[{name:"DL_ADD_BRUSH_TO_DOC",icon:"brush",onClick:!0,allowMultiple:!0,apply:c,displayInMenu:!0}]}return[]}})}])}}),define("applications/ILST/js/configuration/parastyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(
e,t,n,r,i,s){e.registerOverride({type:s.PARAGRAPH_STYLE_ELEMENT_TYPE,getAddOperations:function(){return[]}})}])}}),define("applications/ILST/js/configuration/main",["require","exports","./color","./image","./textstyle","./layerstyle","./brush","./parastyle"],function(e,t){"use strict";t.attach=function(t){e("./color").attach(t),e("./image").attach(t),e("./textstyle").attach(t),e("./parastyle").attach(t),e("./layerstyle").attach(t),e("./brush").attach(t)}}),define("applications/PHXS/js/configuration/color"
,["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration","$translate",function(e,t,n,r,i,s,o){e.registerOverride({type:s.COLOR_ELEMENT_TYPE,getApplyOperations:function(e,r){var u=function(t,r){return function(o,u){return o||(o=[],e.representations.forEach(function(e){var t=e.getValue(s.COLOR_NAMESPACE,s.COLOR_DATA_KEY);e.relationship==="primary"?
o.unshift(t):o.push(t)}),e.representations.length>0&&i.reportApplyMetric(e.representations[0],t)),angular.isFunction(u)&&u(t),n.execApp(t,[o,r])}},a=t.getLayerInfo(),f={name:"DL_SET_COLOR_TOOLTIP",icon:"paintbucket",apply:u("setColor",o.instant("DL_SET_COLOR_TOOLTIP")),displayInMenu:!0},l=[];return a&&a.selectionExists?(a.enableShapeLayerApplyOperations?(l.push({name:"DL_SET_FILL_COLOR_TOOLTIP",icon:"paintbucket",apply:u("setFillColor",o.instant("DL_SET_FILL_COLOR_TOOLTIP")),displayInMenu:!0}),l.
push({name:"DL_SET_STROKE_COLOR_TOOLTIP",icon:"brush",apply:u("setStrokeColor",o.instant("DL_SET_STROKE_COLOR_TOOLTIP")),displayInMenu:!0})):l.push(f),l.push({name:"DL_SET_COLOR_OVERLAY_TOOLTIP",icon:"brush",apply:u("setColorOverlay",o.instant("DL_SET_COLOR_OVERLAY_TOOLTIP")),displayInMenu:!0,disableClick:!0})):l.push(f),l[0].disableClick!==!0&&(l[0].onClick=!0),l},editOperation:function(t,i){var o=e.findRepresentation(t,r.getUsableTypes(s.COLOR_ELEMENT_TYPE)),u;o&&(u=o.getValue(s.COLOR_NAMESPACE
,s.COLOR_DATA_KEY));var a;return n.execApp("replaceColor",[u]).then(function(e){return a=JSON.parse(e),n.execApp("getLayerColor",[])}).then(function(e){if(a){var n=JSON.parse(e);i.beginOperation(),t.removeAllRepresentations(),n.forEach(function(e,n){var r=n===0?"primary":"rendition",i=t.createRepresentation(s.COLOR_REPRESENTATION_TYPE,r);i.setValue(s.COLOR_NAMESPACE,s.COLOR_DATA_KEY,e)}),i.endOperation()}})}})}])}}),define("applications/PHXS/js/configuration/image",["require","exports","module"
],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["$q","designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","designLibraryManager","configuration","$translate","documentWatcher","tempFileManager","adobeStockUtils","designLibraryCEPEventHandlers",function(e,t,n,r,i,s,o,u,a,f,l,c,h){t.registerOverride({type:u.IMAGE_ELEMENT_TYPE,getApplyOperations:function(e,o){var a=function(e){return t.findRepresentation(e,i.getUsableTypes(u.IMAGE_ELEMENT_TYPE
))},f=function(t){var n=c.getStockId(e);u.currentProduct.config.generalLinkingEnabled!==!0&&(t=n?!0:!1);var o=a(e);return o?(s.reportApplyMetric(o,"placeAsset",t),o.getContentPath().then(function(s){var a=i.mimeLookup(u.IMAGE_ELEMENT_TYPE,o.type),f=a&&a.name==="Photoshop";return r.execApp("placeAsset",[s,f,e.library.name,e.name,e.getReference(),e.modified,e.created,n,n?c.isLicensed(e):null,t])})):e.getRenditionPath().then(function(i){return s.reportApplyMetric({type:"image/png",_element:e},"placeAsset"
,t),r.execApp("placeAsset",[i,!1,e.library.name,e.name,e.getReference(),e.modified,e.created,n,n?c.isLicensed(e):null,t])},function(e){console.log(e)})};if(!n.hasDocumentOpen())return[];if(u.currentProduct.config.generalLinkingEnabled===!0){var l=!1,h=a(e);if(h){var p=["application/postscript","application/pdf","application/illustrator"];p.indexOf(h.type)!==-1&&(l=!0)}return[{name:"DL_ADD_IMAGE_TO_DOC_AS_LINKED",icon:"download",allowMultiple:!0,apply:function(){f(!0)},displayInMenu:!0},{name:l?"DL_ADD_IMAGE_TO_DOC_AS_COPY"
:"DL_ADD_IMAGE_TO_DOC_AS_LAYERS",icon:"download",allowMultiple:!0,apply:function(){f(!1)},displayInMenu:!0}]}return[{name:"DL_ADD_IMAGE_TO_DOC",icon:"download",allowMultiple:!0,apply:function(){f(!1)},displayInMenu:!0}]},editOperation:function(n,p){var d=n.getPrimaryRepresentation(),v=d&&i.isTypeEditable(d.type);if(!v){a("DL_ERROR_INVALID_FILE_FORMAT_PS").then(function(e){r.showError(e)});return}var m,g,y=!1,b=!1;l.createTempFile(n,d).then(function(e){return m=e,g=i.getFileNameWithoutExtension(m)+"p"+".png"
,r.execApp("openAssetForEdit",[e,g])}).then(function(r){var a=f.startListening(r,m,function(r){if(r==="closed")f.stopListening(a),y=!0,b===!1&&l.deleteTempFile(n,m),h.elementEditCancelled(n);else if(r==="saved"){if(!s.checkFileSize(m))return;b=!0;if(!p||p.deletedLocally){p=o.getCurrentLibrary();if(!p)return}p.beginOperation();var d=c.getStockData(n);n.deletedLocally?n=p.createElement(n.name,n.type):n.removeAllRepresentations();var v=i.fileNameToContentType(m),w=n.createRepresentation(v,"primary")
;d&&c.setStockData(n,d);var E=[];E.push(w.updateContentFromPath(m));if(g&&i.existsFile(g)){var S=t.setRendition(n,u.IMAGE_RENDITION_SIZE,g);E.push(S)}var x=function(){h.sendElementUpdated(w),y?l.deleteTempFile(n,m):l.updateTempFile(n,w,m),b=!1,p.endOperation()};e.all(E).then(x,x)}})})},transformAddOperations:function(e,t){var n=t&&t.hasOwnProperty("libraryLinked")&&t.libraryLinked;return n&&e&&e.length>0&&e[0].name==="DL_ADD_IMAGE_NAME"&&(e[0].toolTip="DL_ADD_IMAGE_TOOLTIP_ALREADY_LINKED",e[0].disabled=!0
),e}})}])}}),define("applications/PHXS/js/configuration/layerstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.LAYER_STYLE_ELEMENT_TYPE,getApplyOperations:function(o,u){var a=t.getLayerInfo(),f=function(){var t=e.findRepresentation(o,r.getUsableTypes(s.LAYER_STYLE_ELEMENT_TYPE))
;if(t)return i.reportApplyMetric(t,"applyLayerStyle"),t.getContentPath().then(function(e){return n.execApp("applyLayerStyle",[e])})};return!a||a&&!a.enableApplyStyle?[]:[{name:"DL_APPLY_LAYER_STYLE",icon:"layerstyle",onClick:!0,allowMultiple:!0,apply:f,displayInMenu:!0}]}})}])}}),define("applications/PHXS/js/configuration/textstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface"
,"fileUtils","designLibraryUtils","configuration","$translate",function(e,t,n,r,i,s,o){var u="characterstyle",a="data";e.registerOverride({type:s.CHARACTER_STYLE_ELEMENT_TYPE,getApplyOperations:function(f,l){var c=function(){var t=e.findRepresentation(f,r.getUsableTypes(s.CHARACTER_STYLE_ELEMENT_TYPE));if(t){i.reportApplyMetric(t,"setFont");var l=t.getValue(u,a);return n.execApp("setFont",[l,o.instant("DL_PHXS_HISTORY_ENTRY_SET_TEXT_STYLE")])}},h=function(){var t=e.findRepresentation(f,r.getUsableTypes
(s.CHARACTER_STYLE_ELEMENT_TYPE));if(t){i.reportApplyMetric(t,"createTextLayer");var l=t.getValue(u,a);return n.execApp("createFontLayer",[l,o.instant("DL_PHXS_HISTORY_ENTRY_CREATE_TEXT_LAYER")])}},p=[],d=t.getLayerInfo();return!d||d&&!d.selectionExists?[]:(d&&d.enableApplyText&&p.push({name:"DL_SET_TEXT_STYLE_TOOLTIP",icon:"text",onClick:!0,apply:c,displayInMenu:!0}),p.push({name:"DL_CREATE_TEXT_LAYER_TOOLTIP",icon:"pastetext",apply:h,displayInMenu:!0}),p)}})}])}}),define("applications/PHXS/js/configuration/brush"
,["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i){e.registerOverride({type:i.BRUSH_ELEMENT_TYPE,getApplyOperations:function(i,s){var o=n.getUsableTypes(i.type),u=i.representations.filter(function(t){var n=t.relationship==="rendition",r=e.isRepresentationCompatible(t,o);return!n&&r}),a=u.length===0;if(!a){var f=function(){var e=u[0];if(e)return r
.reportApplyMetric(e,"useBrush"),e.getContentPath().then(function(e){return t.execApp("loadAndSelectBrush",[e,i.name])})};return[{name:"DL_ADD_BRUSH_TO_DOC",icon:"brush",onClick:!0,allowMultiple:!0,apply:f,displayInMenu:!0}]}return[]}})}])}}),define("applications/PHXS/js/configuration/parastyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration"
,function(e,t,n,r,i,s){e.registerOverride({type:s.PARAGRAPH_STYLE_ELEMENT_TYPE,order:51,getAddOperations:function(){return[]}})}])}}),define("applications/PHXS/js/configuration/main",["require","exports","./color","./image","./layerstyle","./textstyle","./brush","./parastyle"],function(e,t){"use strict";t.attach=function(t){e("./color").attach(t),e("./image").attach(t),e("./layerstyle").attach(t),e("./textstyle").attach(t),e("./brush").attach(t),e("./parastyle").attach(t)}}),define("applications/PPRO/js/configuration/color"
,["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.COLOR_ELEMENT_TYPE,order:9,getApplyOperations:function(e,t){return[]}})}])}}),define("applications/PPRO/js/configuration/colortheme",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements"
,"designLibraryUtils","fileUtils","configuration",function(e,t,n,r){e.registerOverride({type:r.COLOR_THEME_ELEMENT_TYPE,order:14,getApplyOperations:function(e,t,n){return[]}})}])}}),define("applications/PPRO/js/configuration/image",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["$q","designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","designLibraryManager","configuration","$translate","documentWatcher"
,"tempFileManager",function(e,t,n,r,i,s,o,u,a,f,l){t.registerOverride({type:u.IMAGE_ELEMENT_TYPE,transformAddOperations:function(e,t){return e&&e.length>0&&e[0].name==="DL_ADD_IMAGE_NAME"&&(e[0].disabled=!0),e},getApplyOperations:function(e,o){var a=function(){var n=t.findRepresentation(e,i.getUsableTypes(u.IMAGE_ELEMENT_TYPE));return n?(s.reportApplyMetric(n,"placeAsset"),n.getContentPath().then(function(t){var s=i.mimeLookup(u.IMAGE_ELEMENT_TYPE,n.type),o=s&&s.name==="Photoshop";return r.execApp
("placeAsset",[t,o,e.name])})):e.getRenditionPath().then(function(t){return r.execApp("placeAsset",[t,!1,e.name])},function(e){console.log(e)})},f=n.getLayerInfo();return f?[{name:"DL_ADD_IMAGE_TO_PROJECT",icon:"download",allowMultiple:!0,apply:a,displayInMenu:!0}]:[]}})}])}}),define("applications/PPRO/js/configuration/textstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils"
,"designLibraryUtils","configuration",function(e,t,n,r,i,s){var o="characterstyle",u="data";e.registerOverride({type:s.CHARACTER_STYLE_ELEMENT_TYPE,order:13,getApplyOperations:function(e,t){return[]}})}])}}),define("applications/PPRO/js/configuration/layerstyle",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration","$translate",function(
e,t,n,r,i,s,o){e.registerOverride({type:s.LAYER_STYLE_ELEMENT_TYPE,order:11,getApplyOperations:function(e,t){return[]}})}])}}),define("applications/PPRO/js/configuration/brush",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.BRUSH_ELEMENT_TYPE,order:10,getApplyOperations:function(e,t
){return[]}})}])}}),define("applications/PPRO/js/configuration/look",["require","exports","module"],function(e,t){"use strict";t.attach=function(e){angular.module(e).run(["$q","designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration","$translate",function(e,t,n,r,i,s,o,u){t.registerOverride({type:o.LOOK_ELEMENT_TYPE,isDraggable:!0,getApplyOperations:function(e,n){var r=function(){var n=t.findRepresentation(e,i.getUsableTypes(o.LOOK_ELEMENT_TYPE
));if(n)return n.getContentPath().then(function(e){return})};return[{name:"DL_APPLY_LOOK",onClick:!0,isDraggable:!0,allowMultiple:!1,apply:r,displayInMenu:!1}]},getAddOperations:function(t){var n=function(e){return!1},s=function(t,n){var s=e.defer();return r.execApp("getSelectedLookData").then(function(r){var u=JSON.parse(r);t.beginOperation();var a=t.createElement(u.name,o.LOOK_ELEMENT_TYPE,n),f=[],l,c;u.lookPath&&(l=a.createRepresentation("application/vnd.adobe.look+xml","primary"),c=l.updateContentFromPath
(u.lookPath).then(function(){i.deleteFile(u.lookPath)}),f.push(c));if(u.cubePath){var h="primary";u.lookPath&&(h="alternate"),l=a.createRepresentation("application/vnd.adobe.cube+txt",h),c=l.updateContentFromPath(u.cubePath).then(function(){i.deleteFile(u.cubePath)}),f.push(c)}if(u.previewPath){var p=a.createRepresentation("image/jpg","rendition");c=p.updateContentFromPath(u.previewPath).then(function(){p.width=o.LOOK_RENDITION_SIZE,p.height=o.LOOK_RENDITION_SIZE,i.deleteFile(u.previewPath)}),f.push
(c)}e.all(f).then(function(){t.endOperation(),s.resolve(a)},function(){t.removeElement(a),t.endOperation(),s.reject("Could not create element.")})},function(){t.endOperation(),s.reject("Could not create element.")}),s.promise};return[{name:"DL_ADD_LOOK_NAME",order:0,toolTip:"DL_ADD_LOOK_TOOLTIP",icon:"newlook",apply:s,checkDuplicates:n,disabled:!t||!t.look,displayIcon:!0}]}})}])}}),define("applications/PPRO/js/configuration/parastyle",["require","exports","module"],function(e,t){"use strict";t
.attach=function(e){angular.module(e).run(["designLibraryElements","layerSelectionManager","csInterface","fileUtils","designLibraryUtils","configuration",function(e,t,n,r,i,s){e.registerOverride({type:s.PARAGRAPH_STYLE_ELEMENT_TYPE,order:12,getApplyOperations:function(e,t){return[]},getAddOperations:function(){return[]}})}])}}),define("applications/PPRO/js/configuration/main",["require","exports","./color","./colortheme","./image","./textstyle","./layerstyle","./brush","./look","./parastyle"],
function(e,t){"use strict";t.attach=function(t){e("./color").attach(t),e("./colortheme").attach(t),e("./image").attach(t),e("./textstyle").attach(t),e("./layerstyle").attach(t),e("./brush").attach(t),e("./look").attach(t),e("./parastyle").attach(t)}}),define("edgeccTemplates",[],function(){return function(e){e.put("directives/designlibrary/templates/designLibrary.tmpl.html",'<div class="panel-dl-container">\n\n    <div class="panel-dl-header">\n        <edgecc-select class="panel-library-combo" ng-disabled="!libraryCollection || libraryCollection.libraries.length === 0" ng-model="library"\n                       ng-change="selectedLibraryChanged()" options-array="libraryCollection.libraries" display-field="name" order-by="{{uiState.librarySortFunction}}" max-height="350">\n        </edgecc-select>\n\n<!--\n        <div class="panel-dl-header-button edgecc-icon" ng-class="search.visible ? \'selected\' : \'\'" ng-click="toggleSearch()" edgecc-hover>search</div>\n        <div class="panel-dl-header-spacing"></div>\n-->\n\n        <button class="panel-dl-header-toggle-button edgecc-icon" ng-class="{selected: uiState.view === \'grid\'}" ng-click="setViewState(\'grid\')"\n                edgecc-hover edgecc-tooltip tooltip-content="{{\'DL_SWITCH_TO_GRIDVIEW_TOOLTIP\' | translate}}">newgridview</button>\n\n        <button class="panel-dl-header-toggle-button edgecc-icon" ng-class="{selected: uiState.view === \'list\'}" ng-click="setViewState(\'list\')"\n                edgecc-hover edgecc-tooltip tooltip-content="{{\'DL_SWITCH_TO_LISTVIEW_TOOLTIP\' | translate}}">newlistview</button>\n    </div>\n\n    <div ng-show="search.visible" class="panel-dl-subheader">\n        <input ng-model="searchText" edgecc-tooltip tooltip-content="{{\'DL_SEARCH_TOOLTIP\' | translate}}" type="search" results="0" edgecc-set-focus="search.setFocus">\n        </input>\n    </div>\n\n    <div ng-if="uiState.mode === \'relink\'" class="panel-relink-header">\n        <div class="panel-relink-header-image-missing" ng-if="uiState.modeParams.missing === true"></div>\n        <div class="panel-relink-header-image edgecc-icon" ng-if="uiState.modeParams.missing === false">cloud</div>\n        <span class="panel-relink-header-text">{{uiState.modeParams.message}}</span>\n    </div>\n\n    <edgecc-dl-no-libraries ng-show="!library" create-callback="showCreateDialog()"></edgecc-dl-no-libraries>\n\n    <edgecc-design-library-contents search-text="searchText" library="library"></edgecc-design-library-contents>\n\n    <div ng-show="uiState.mode === \'relink\' && showRelinkOverlay" class="panel-relink-overlay" ng-mouseenter="onMouseEnter()">\n        <div class="panel-relink-overlay-message">{{uiState.modeParams.overlayMessage}}</div>\n    </div>\n\n    <edgecc-dl-footer library="library"></edgecc-dl-footer>\n\n    <edgecc-modal-dialog ng-if="createDialog.visible" disable-ok="!isValidName(newItem.name)" show-dialog="createDialog.visible" on-submit="createDesignLibrary()" title-text="DL_CREATE_DESIGN_LIBRARY" ok-text="DL_CREATE" cancel-text="DL_CANCEL">\n        <div class="panel-dialog-layout-group">\n            <div class="panel-dialog-layout-75">\n                <input ng-model="newItem.name" type="text" placeholder="{{\'DL_NAME_DESC\' | translate}}" style="width:100%" edgecc-set-focus="createDialog.setFocus" ng-keydown="onCreateLibKeyDown($event)"/>\n            </div>\n        </div>\n    </edgecc-modal-dialog>\n\n    <edgecc-modal-dialog ng-if="deleteDialog.visible" show-dialog="deleteDialog.visible" on-submit="deleteCurrentLibrary()" title-text="{{deleteDialog.title}}" ok-text="{{deleteDialog.btnTitle}}" cancel-text="DL_CANCEL">\n        <div class="panel-dialog-layout-100" ng-bind="deleteDialog.text"></div>\n    </edgecc-modal-dialog>\n\n    <edgecc-modal-dialog ng-if="stockPurchaseDialog.visible" show-dialog="stockPurchaseDialog.visible" on-submit="confirmStockPurchase()" on-cancel="cancelStockPurchase()" title-text="DL_STOCK_PURCHASE_DIALOG_TITLE" ok-text="DL_OK" cancel-text="{{stockPurchaseDialog.cancelText}}">\n        <div class="panel-dialog-layout-100" ng-bind="stockPurchaseDialog.text"></div>\n    </edgecc-modal-dialog>\n\n    <edgecc-modal-dialog ng-if="settingsDialog.visible" disable-ok="!isValidName(editItem.name)" show-dialog="settingsDialog.visible" on-submit="updateDesignLibrary()" title-text="{{ \'DL_RENAME_LIBRARY\' | translate:library }}" ok-text="DL_RENAME" cancel-text="DL_CANCEL">\n        <div class="panel-dialog-layout-group">\n            <input ng-model="editItem.name" type="text" placeholder="{{\'DL_NAME_DESC\' | translate}}" style="width:100%" edgecc-set-focus="settingsDialog.setFocus" ng-keydown="onRenameLibKeyDown($event)"/>\n        </div>\n    </edgecc-modal-dialog>\n</div>\n'
),e.put("directives/designlibrary/templates/designLibraryContents.tmpl.html",'<div class="panel-dl-contents" ng-class="{\'panel-dl-contents-with-subheader\': uiState.mode !== \'normal\'}" ng-show="library" ng-click="clickOutsideComponent($data)"\n     edgecc-drop-files drop-types="{{allowedDropTypes}}" drop-sources="{{allowedDropSources}}" on-drop="onLayerDrop($data)"\n     on-drag-enter="onLayerDragEnter($data)" on-drag-leave="onLayerDragLeave($data)">\n\n    <div class="panel-dl-contents-quota-message" ng-if="library.quotaExceeded">\n        <div class="panel-dl-contents-quota-message-icon edgecc-icon">alert</div>\n        <div>\n            <div class="panel-dl-contents-quota-message-text" translate>DL_QUOTA_EXCEEDED_LIBRARY_MESSAGE</div>\n            <div class="panel-dl-contents-quota-message-text" translate>DL_QUOTA_EXCEEDED_LIBRARY_TIP</div>\n        </div>\n    </div>\n\n    <div class="panel-dl-contents-area">\n        <!-- NOTE: the below is commented about because it\'s not used for now, but also because there are some problems\n                   with the use of ng-if, and things not being unbound correctly (giving phantom elements). Needs more investigation.\n        -->\n<!--\n        <edgecc-dl-category ng-repeat="category in library.categories" category="category" library="library" search-text="searchText"></edgecc-dl-category>\n        <edgecc-dl-category ng-if="library.categories.length === 0" library="library" search-text="searchText"></edgecc-dl-category>\n-->\n        <edgecc-dl-category library="library" search-text="searchText"></edgecc-dl-category>\n    </div>\n\n    <div class="panel-deleted-message-container" ng-if="library.deletedFromServer">\n      <div class="panel-deleted-message">\n        <div class="panel-deleted-message-inner">\n            <div class="panel-deleted-message-icon edgecc-icon">creativecloudwarning</div>\n            <div ng-if="library.collaboration !== \'incoming\'" class="panel-deleted-message-description" translate>DL_DELETED_FROM_SERVER</div>\n            <div ng-if="library.collaboration === \'incoming\'" class="panel-deleted-message-description" translate>DL_UNSHARED</div>\n        </div>\n                    <div class="panel-deleted-message-options">\n              <a class="panel-deleted-message-link" ng-click="deleteCurrentLibrary()" translate>DL_REMOVE_FROM_LIST</a>\n            </div>\n      </div>\n    </div>\n\n    <div ng-show="isDraggingLayer" class="panel-dl-contents-drop-area">\n        <div class="panel-dl-contents-drop-area-container">\n            <div ng-show="isDropAllowed && !isDraggingLayerToLink" class="panel-dl-contents-drop-area-icon edgecc-icon">addcopy</div>\n            <div ng-show="isDropAllowed && isDraggingLayerToLink" class="panel-dl-contents-drop-area-icon edgecc-icon">addlink</div>\n            <div ng-show="!isDropAllowed" class="panel-dl-contents-drop-area-smaller-icon edgecc-icon">alert</div>\n\n            <div ng-show="isDropAllowed" class="panel-dl-contents-drop-area-text">\n                <div ng-repeat="layerName in layerNames">{{layerName}}</div>\n            </div>\n            <div ng-show="!isDropAllowed && dropMessage" class="panel-dl-contents-drop-area-text">{{dropMessage}}</div>\n            <div ng-show="isDropAllowed && dropMessage" class="panel-dl-contents-drop-area-subtext">{{dropMessage}}</div>\n        </div>\n    </div>\n</div>\n'
),e.put("directives/designlibrary/templates/designLibraryEditableGridName.tmpl.html",'<div class="panel-grid-item-name-container" ng-class="{selected: selected, windowhover: globalHovering}" ng-dblclick="startEditName($event)">\n    <span class="panel-grid-item-name" ng-hide="editState.active">\n        {{component.name ? component.name : (defaultInformation || \'\')}}\n    </span>\n    <input class="panel-grid-item-edit-name" ng-if="editState.active" type="text"\n           ng-model="editState.name" placeholder="{{\'DL_EDIT_NAME_PLACEHOLDER\' | translate}}"\n           ng-keydown="handleKeyDown($event)" edgecc-set-focus="editState.setFocus" ng-blur="finishEditName()"/>\n</div>\n'
),e.put("directives/designlibrary/templates/designLibraryEditableListName.tmpl.html",'<div class="panel-list-item-name-container" ng-class="{selected: selected, windowhover: globalHovering}" ng-dblclick="startEditName($event)">\n    <span class="panel-list-item-name" ng-hide="editState.active">\n        {{component.name ? component.name : (defaultInformation || \'\')}}\n    </span>\n    <input class="panel-list-item-edit-name" ng-if="editState.active" type="text"\n           ng-model="editState.name" placeholder="{{\'DL_EDIT_NAME_PLACEHOLDER\' | translate}}"\n           ng-keydown="handleKeyDown($event)" edgecc-set-focus="editState.setFocus" ng-blur="finishEditName()"/>\n</div>\n'
),e.put("directives/designlibrary/templates/designLibraryFooter.tmpl.html",'<div class="panel-footer">\n    <div class="panel-footer-divider-container"><div class="panel-footer-divider"></div></div>\n    <div class="panel-footer-toolbar" ng-class="{windows: isWindowsOS}" ng-show="uiState.mode === \'normal\'">\n\n        <button ng-repeat="op in layerOperations | orderBy:\'order\'" ng-class="{disabled: op.disabled || !library}" class="panel-footer-icon" edgecc-tooltip tooltip-content="{{op.toolTip | translate}}" ng-click="library && !op.disabled && doAddOperation(op)" ng-if="op.displayIcon">\n            <div class="edgecc-icon" ng-style="op.style">{{op.icon}}</div>\n        </button>\n\n        <div class="panel-footer-toolbar-spacing"></div>\n\n        <button class="panel-footer-icon edgecc-icon" ng-click="doLaunchStockSite()" edgecc-tooltip tooltip-content="{{\'DL_STOCK_BUTTON_TOOLTIP\' | translate}}">adobestock</button>\n\n        <div ng-switch="status.state" ng-mousedown="showNetworkStatus()" ng-mouseup="hideNetworkStatus()" ng-mouseleave="hideNetworkStatus()" ng-click="onStatusClick()">\n            <div ng-switch-when="ok" class="panel-footer-icon-ok edgecc-icon" edgecc-tooltip tooltip-content="{{\'DL_SYNC_OK\' | translate}}" disable="syncStatus.visible">newcreativecloud</div>\n            <div ng-switch-when="syncing" class="panel-footer-icon-syncing edgecc-icon" edgecc-tooltip tooltip-data="status" template-url="directives/designlibrary/templates/syncTooltip.tmpl.html" disable="syncStatus.visible">newsyncing</div>\n            <div ng-switch-when="error" class="panel-footer-icon-error edgecc-icon" edgecc-tooltip tooltip-data="tooltipData" template-url="directives/designlibrary/templates/syncErrorTooltip.tmpl.html" disable="syncStatus.visible || ccAppWarning.visible">\n                {{(status.errorType === \'loggedOut\' || status.errorType === \'syncDisabled\') ? \'newcreativecloudwarning\' : \'newcreativeclouderror\'}}\n            </div>\n        </div>\n\n        <div edgecc-drop-files on-drop="onDropDone($data)" drop-types="{{allowedDropTypes}}" drop-sources="{{allowedDropSources}}">\n            <button class="panel-footer-icon shift-padding edgecc-icon" ng-click="doDeleteItems()" ng-class="{disabled: !hasSelection}" edgecc-tooltip tooltip-content="{{\'DL_FOOTER_DELETE_TOOLTIP\' | translate}}">newdelete</button>\n        </div>\n    </div>\n\n    <div class="panel-ccapp-warning-container" ng-show="ccAppWarning.visible && uiState.mode === \'normal\'" is-event-target="isEventTargetCCAppWarning">\n        <div class="panel-ccapp-warning-container-box">\n            <div class="panel-ccapp-warning-message" translate>DL_LAUNCH_CC_APP_MESSAGE</div>\n            <div class="panel-ccapp-warning-footer">\n                <div ng-if="!isWindowsOS" class="panel-ccapp-warning-button" ng-click="hideCCAppWarningMessage()" edgecc-hover>\n                    <span translate>DL_LAUNCH_CC_APP_CANCEL_BUTTON</span>\n                </div>\n                <div class="panel-ccapp-warning-button" ng-click="enableCCApp()" edgecc-hover>\n                    <span class="panel-ccapp-warning-button-icon edgecc-icon">newcreativecloud</span>\n                    <span translate>DL_LAUNCH_CC_APP_ENABLE_BUTTON</span>\n                </div>\n                <div ng-if="isWindowsOS" class="panel-ccapp-warning-button" ng-click="hideCCAppWarningMessage()" edgecc-hover>\n                    <span translate>DL_LAUNCH_CC_APP_CANCEL_BUTTON</span>\n                </div>\n            </div>\n        </div>\n    </div>\n\n    <div class="panel-sync-message-container" ng-show="syncStatus.visible && uiState.mode === \'normal\'">\n        <div ng-switch="status.state">\n            <div ng-switch-when="ok" class="panel-sync-message" translate>DL_SYNC_OK</div>\n            <div ng-switch-when="syncing" class="panel-sync-message">\n                <span ng-show="status.syncingLibraries.length === 0 && status.syncProgress === undefined" translate>DL_SYNC_PROGRESS</span>\n                <span ng-show="status.syncingLibraries.length === 0 && status.syncProgress !== undefined" translate translate-values="{percent: status.syncProgress}">DL_SYNC_PROGRESS_PERCENT</span>\n\n                <span ng-show="status.syncingLibraries.length > 0" translate translate-values="{number: status.syncingLibraries.length}">DL_SYNC_PROGRESS_NUM_LIBRARIES</span>\n                <div ng-repeat="data in status.syncingLibraries">\n                    <span ng-show="data.library && data.progress !== undefined && data.state === \'downloading\'" translate translate-values="{name: data.truncatedName, percent: data.progress}">DL_DOWNLOAD_LIBRARY_PERCENT</span>\n                    <span ng-show="data.library && data.progress !== undefined && data.state === \'uploading\'" translate translate-values="{name: data.truncatedName, percent: data.progress}">DL_UPLOAD_LIBRARY_PERCENT</span>\n                    <span ng-show="!data.library && data.progress !== undefined" translate translate-values="{percent: data.progress}">DL_DOWNLOAD_NEW_LIBRARY_PERCENT</span>\n                </div>\n            </div>\n            <div ng-switch-when="error" class="panel-sync-message">\n                <span ng-bind-html="errorMessage"></span>\n\n                <br ng-show="status.retryDuration"/>\n                <span ng-show="status.retryDuration" translate translate-values="{duration: status.retryDuration}">DL_SYNC_RETRY</span>\n            </div>\n\n        </div>\n    </div>\n\n    <div class="panel-relink-action" ng-if="uiState.mode === \'relink\'">\n        <button ng-if="!isWindowsOS" class="panel-relink-button-cancel hover-on-always" ng-click="cancelRelink()" translate>DL_CANCEL</button>\n        <button class="panel-relink-button-relink hover-on-always action" ng-class="{disabled: !hasSelection}"  ng-click="relink()">{{uiState.modeParams.actionMessage}}</button>\n        <button ng-if="isWindowsOS" class="panel-relink-button-cancel hover-on-always" ng-click="cancelRelink()" translate>DL_CANCEL</button>\n    </div>\n</div>\n'
),e.put("directives/designlibrary/templates/dlCategory.tmpl.html",'<div class="panel-category">\n    <div class="edgecc-project-dl-nocontent" ng-if="library.elements.length === 0">\n        <edgecc-dl-empty library="library"></edgecc-dl-empty>\n    </div>\n    <div class="edgecc-project-dl-content-category">\n        <div class="panel-category-section" ng-hide="filteredElements.length === 0 || (uiState.elementTypeFilter && uiState.elementTypeFilter !== data.type)" ng-repeat="data in elementsByType">\n            <div class="panel-type-header" ng-hide="uiState.elementTypeFilter">{{::data.displayName}}</div>\n            <div ng-repeat="component in filteredElements = (data.elements | localeOrderBy:uiState.sortFunction) track by component.id ">\n                <!-- RENDERER based on content type -->\n                <div class="edgecc-project-dl-component-contents" ng-click="selectAndAddToDocument($event, component)" ng-dblclick="editComponent($event, component)" ui-draggable="true" drag-channel="dlItem" on-drag="onElementDragStart(component)">\n                    <edgecc-design-library-component native-context-menu="component"></edgecc-design-library-component>\n                </div>\n            </div>\n            <div style="clear: both"></div>\n        </div>\n    </div>\n</div>\n'
),e.put("directives/designlibrary/templates/dlEmpty.tmpl.html",'<div class="panel-dl-empty-container">\n    <div class="panel-dl-empty-inner-container" ng-if="!library.deletedFromServer">\n        <div class="panel-dl-empty-top">\n            <div class ="panel-dl-empty-title" translate>DL_EMPTY_LIB_TITLE</div>\n            <div class="panel-dl-empty-description" translate>DL_EMPTY_LIB_INSTRUCTION</div>\n            <a class="panel-dl-empty-library-link" ng-click="howToUseInBrowser()" translate>DL_EMPTY_LIB_LEARN_MORE</a>\n        </div>\n        <div class="panel-dl-empty-middle">\n            <div class="panel-dl-empty-stock-line"></div>\n            <div class="panel-dl-empty-stock-icon edgecc-icon">adobestock</div>\n            <div class="panel-dl-empty-stock-line"></div>\n        </div>\n        <div class="panel-dl-empty-bottom">\n            <span class="panel-dl-empty-description" translate>DL_EMPTY_LIB_STOCK_TITLE</span>&nbsp;\n            <a class="panel-dl-empty-library-link" ng-click="stockHelpInBrowser()" translate>DL_EMPTY_LIB_STOCK_SEARCH_LINK</a>\n        </div>\n    </div>\n</div>\n\n'
),e.put("directives/designlibrary/templates/dlNoLibraries.tmpl.html",'<div class="panel-dl-nolibs-container">\n\n    <div ng-if="status.state === \'ok\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-cc-icon edgecc-icon">creativecloud</div>\n        <div class="panel-dl-nolibs-message" translate>DL_NO_LIBS_MESSAGE</div>\n        <button class="panel-dl-nolibs-create-button hover-on-always" ng-click="showAddLibraryDialog()" translate>DL_NO_LIBS_CREATE_LIBRARY_BUTTON_TEXT</button>\n    </div>\n\n    <div ng-if="status.state === \'error\' && status.errorType === \'loggedOut\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-alert-icon edgecc-icon">creativecloudwarning</div>\n        <div class="panel-dl-nolibs-message" translate>DL_NO_LIBS_LOGGED_OUT</div>\n    </div>\n\n    <!-- TODO: hopefully this is temporary, until Photoshop can handle the modal JSX problem better -->\n    <div ng-if="status.state === \'error\' && status.errorType === \'jsx\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-alert-icon edgecc-icon">creativeclouderror</div>\n        <div class="panel-dl-nolibs-message" translate>DL_NO_LIBS_ERROR_INIT</div>\n\n        <button class="panel-dl-nolibs-retry-button hover-on-always" ng-click="reload()" translate>DL_NO_LIBS_RETRY_INIT</button>\n    </div>\n\n    <div ng-if="status.state === \'error\' && status.errorType === \'noService\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-alert-icon edgecc-icon">creativeclouderror</div>\n        <div class="panel-dl-nolibs-message" translate>DL_NO_LIBS_SERVICE_NOT_INSTALLED</div>\n\n        <a class="panel-dl-nolibs-link" ng-click="installCCApp()" translate>DL_NO_LIBS_GET_IT</a>\n    </div>\n\n    <div ng-if="status.state === \'error\' && status.errorType === \'serviceError\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-alert-icon edgecc-icon">creativeclouderror</div>\n        <div class="panel-dl-nolibs-message" translate>DL_NO_LIBS_SERVICE_NOT_RUNNING</div>\n\n        <a class="panel-dl-nolibs-link" ng-click="serviceErrorHelp()" translate>DL_NO_LIBS_MORE_INFO</a>\n    </div>\n\n    <div ng-if="status.state === \'error\' && status.errorType === \'updateServer\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-alert-icon edgecc-icon">creativeclouderror</div>\n        <div class="panel-dl-nolibs-message" translate>DL_NO_LIBS_UPDATE_SERVER</div>\n\n        <a class="panel-dl-nolibs-link" ng-click="updateCCApp()" translate>DL_NO_LIBS_GET_IT</a>\n    </div>\n\n    <div ng-if="status.state === \'error\' && status.errorType === \'updateClient\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-alert-icon edgecc-icon">creativeclouderror</div>\n        <div class="panel-dl-nolibs-message" translate>DL_NO_LIBS_UPDATE_CLIENT</div>\n\n        <a class="panel-dl-nolibs-link" ng-click="updateCCLibraries()" translate>DL_NO_LIBS_GET_IT</a>\n    </div>\n\n    <div ng-if="status.state === \'error\' && status.errorType === \'syncDisabled\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-alert-icon edgecc-icon">creativecloudwarning</div>\n        <div class="panel-dl-nolibs-message" translate>DL_NO_LIBS_SYNC_DISABLED</div>\n\n        <button class="panel-dl-nolibs-retry-button hover-on-always" ng-click="enableCCApp()" translate>DL_LAUNCH_CC_APP_ENABLE_BUTTON</button>\n    </div>\n\n    <div ng-if="status.state === \'error\' && status.errorType !== \'noService\' && status.errorType !== \'serviceError\' && status.errorType !== \'updateClient\' && status.errorType !== \'updateServer\' && status.errorType !== \'loggedOut\' && status.errorType !== \'jsx\' && status.errorType !== \'syncDisabled\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-alert-icon edgecc-icon">creativeclouderror</div>\n        <div class="panel-dl-nolibs-message" ng-bind-html="errorMessage"></div>\n\n        <div ng-show="status.retryDuration" class="panel-dl-nolibs-message" translate translate-values="{duration: status.retryDuration}">DL_SYNC_RETRY</div>\n        <button ng-show="status.errorType !== \'noAccess\'" class="panel-dl-nolibs-retry-button hover-on-always" ng-class="{disabled: status.retryDuration}" ng-click="retry()" translate>DL_NO_LIBS_RETRY</button>\n\n        <button class="panel-dl-nolibs-create-button hover-on-always" ng-click="showAddLibraryDialog()" translate>DL_NO_LIBS_CREATE_LIBRARY_BUTTON_TEXT</button>\n    </div>\n\n    <div ng-if="status.state === \'syncing\'" class="panel-dl-nolibs-middle">\n        <div class="panel-dl-nolibs-cc-icon-syncing edgecc-icon">creativecloud</div>\n        <div class="panel-dl-nolibs-message" translate>DL_NO_LIBS_SYNCING</div>\n        <div class="panel-dl-nolibs-progress-bar panel-progress-bar-large">\n            <div class="panel-progress-bar-inner-large" ng-style="{width: progressWidth}"></div>\n        </div>\n        <button class="panel-dl-nolibs-create-button-syncing hover-on-always" ng-click="showAddLibraryDialog()" translate>DL_NO_LIBS_CREATE_LIBRARY_BUTTON_TEXT</button>\n    </div>\n\n</div>\n'
),e.put("directives/designlibrary/templates/syncErrorTooltip.tmpl.html",'<div class="tooltip">\n    <span ng-bind-html="data.errorMessage"></span>\n    <br ng-show="data.status.retryDuration"/>\n    <span ng-show="data.status.retryDuration" translate translate-values="{duration: data.status.retryDuration}">DL_SYNC_RETRY</span>\n</div>\n'),e.put("directives/designlibrary/templates/syncTooltip.tmpl.html",'<div class="tooltip">\n    <span ng-show="data.syncingLibraries.length === 0 && data.syncProgress === undefined" translate>DL_SYNC_PROGRESS</span>\n    <span ng-show="data.syncingLibraries.length === 0 && data.syncProgress !== undefined" translate translate-values="{percent: data.syncProgress}">DL_SYNC_PROGRESS_PERCENT</span>\n\n    <span ng-show="data.syncingLibraries.length > 0" translate translate-values="{number: data.syncingLibraries.length}">DL_SYNC_PROGRESS_NUM_LIBRARIES</span>\n    <div ng-repeat="libData in data.syncingLibraries">\n        <span ng-show="libData.library && libData.progress !== undefined && libData.state === \'downloading\'" translate translate-values="{name: libData.truncatedName, percent: libData.progress}">DL_DOWNLOAD_LIBRARY_PERCENT</span>\n        <span ng-show="libData.library && libData.progress !== undefined && libData.state === \'uploading\'" translate translate-values="{name: libData.truncatedName, percent: libData.progress}">DL_UPLOAD_LIBRARY_PERCENT</span>\n        <span ng-show="!libData.library && libData.progress !== undefined" translate translate-values="{percent: libData.progress}">DL_DOWNLOAD_NEW_LIBRARY_PERCENT</span>\n    </div>\n</div>\n'
),e.put("directives/templates/disclosureTriangle.tmpl.html",'<div>\n    <div ng-click="toggle($event)" ng-class="disclosureClass" edgecc-hover></div>\n</div>\n'),e.put("directives/templates/modalDialog.tmpl.html",'<div ng-show="showDialog" ng-class="dialogClass" ng-click="hideDialog()">\n\n    <div class="panel-dialog-window" ng-click="stopPropagation($event)">\n\n        <div class="panel-dialog-divider-container"><div class="panel-dialog-divider"></div></div>\n\n        <div class="panel-dialog-header">\n           <div class="panel-dialog-title" ng-bind="titleText | translate"></div>\n<!--            <a href ng-show="canCancel" ng-click="hideDialog()" class="panel-dialog-close-button edgecc-icon">cancel</a>-->\n        </div>\n\n        <div class="panel-dialog-contents" ng-transclude></div>\n\n        <div style="clear:both"></div>\n        <div class="panel-dialog-footer">\n            <div ng-if="!isWindowsOS" class="edgecc-core-modal-dialog-button" ng-show="cancelText">\n                <button class="hover-on-always" ng-click="hideDialog()" translate>{{cancelText}}</button>\n            </div>\n            <div class="edgecc-core-modal-dialog-button">\n                <button ng-show="okText" class="hover-on-always action" ng-class="{disabled: disableOk}" ng-click="!disableOk && onSubmit()" translate>{{okText}}</button>\n            </div>\n            <div ng-if="isWindowsOS" class="edgecc-core-modal-dialog-button" ng-show="cancelText">\n                <button class="hover-on-always" ng-click="hideDialog()" translate>{{cancelText}}</button>\n            </div>\n        </div>\n    </div>\n\n</div>\n'
),e.put("directives/templates/select.tmpl.html",'<div class="panel-select" ng-mousedown="toggleMenu()" edgecc-hover>\n    <div class="edgecc-icon" ng-show="selectedItem.collaboration">group</div>\n    <div class="panel-select-menu-label">{{selectedItem[displayField]}}</div>\n</div>\n'),e.put("directives/templates/selectMenu.tmpl.html",'<div class="panel-select-menu" ng-style="menuStyle">\n    <div ng-show="!isCreativeCloud || switchingEnabled" class="panel-select-menu-item panel-select-header">\n        <div class="panel-menu-label panel-select-header-text">{{collectionName}}</div>\n        <button ng-show="switchingEnabled" class="edgecc-icon panel-select-cloud-switch-icon" edgecc-tooltip tooltip-content="{{\'DL_MENU_CHANGE_CLOUD_TOOLTIP\' | translate}}" ng-click="changeCloud()">changecloud</button>\n    </div>\n    <div ng-style="menuContainerStyle">\n        <div ng-repeat="item in optionsArray | orderBy:orderBy">\n            <div ng-click="select(item)" class="panel-select-menu-item" edgecc-hover ng-class="{\'selected\': (item === selectedItem)}">\n                <div class="edgecc-icon panel-menu-icon" ng-show="item === selectedItem">checkmark</div>\n                <div class="edgecc-icon panel-menu-icon" ng-show="item.collaboration && item !== selectedItem" edgecc-tooltip tooltip-content="{{\'DL_LIB_SHARED_TOOLTIP\' | translate}}">group</div>\n                <div class="edgecc-icon panel-menu-icon" ng-show="!item.collaboration && item !== selectedItem"></div>\n\n                <div ng-class="{\'panel-menu-label-selected\': (item == selectedItem)}" class="panel-menu-label">{{item[displayField]}}</div>\n            </div>\n        </div>\n    </div>\n    <div class="panel-select-divider"></div>\n    <div ng-click="showCreateDialog()" class="panel-select-menu-item" edgecc-hover>\n        <span class="edgecc-icon anel-menu-icon">plus</span>\n        <span class="panel-menu-label" translate>DL_MENU_CREATE_LIB</span>\n    </div>\n</div>\n'
),e.put("configuration/designlibrary/brush/tooltip.tmpl.html",'<div class=\'tooltip\'>\n    <span ng-if="data.name">{{data.name}}</span>\n    <br ng-if="data.name"/>\n    <span translate>DL_TYPE</span> <span translate>{{data.brushType}}</span>\n    <div ng-if="data.disabledMessage">\n        <span translate>{{data.disabledMessage}}</span>\n    </div>\n</div>\n'),e.put("configuration/designlibrary/brush/view.tmpl.html",'<div ng-if="uiState.view === \'grid\'" class="panel-brush-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/brush/tooltip.tmpl.html">\n    <div class="panel-brush-item-img" ng-show="imageUrl && loadedRenditionUrl" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}"></div>\n    <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-grid-icon-missing-rendition panel-no-rendition-holder">newcreativecloud</div>\n    <div class="edgecc-core-overlay-container" ng-show="!loadedRenditionUrl">\n        <div class="topcoat-spinner edgecc-core-overlay-center"></div>\n    </div>\n    <div class="panel-grid-selected-overlay" ng-class="{\'disabled-overlay\': disabled}"></div>\n    <design-library-editable-grid-name component="component" selected="selected"></design-library-editable-grid-name>\n</div>\n<div ng-if="uiState.view === \'list\'" class="panel-list-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/brush/tooltip.tmpl.html">\n    <div class="panel-list-brush-item-thumb">\n        <div class="panel-list-layer-item-img" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}" ng-show="imageUrl && loadedRenditionUrl"></div>\n        <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-list-icon-missing-rendition">newcreativecloud</div>\n        <div class="topcoat-spinner edgecc-core-overlay-center" ng-show="!loadedRenditionUrl"></div>\n    </div>\n    <design-library-editable-list-name component="component"></design-library-editable-list-name>\n</div>\n\n'
),e.put("configuration/designlibrary/color/tooltip.tmpl.html",'<div class=\'tooltip\'>\n    <span ng-if="data.name">{{data.name}}</span>\n    <br ng-if="data.name"/>\n    <span>{{data.hexValue}}</span>\n    <br/>\n    <span>{{data.primaryValue}}</span>\n</div>\n'),e.put("configuration/designlibrary/color/view.tmpl.html",'<div ng-if="uiState.view === \'grid\'" class="panel-color-item" ng-class="{selected: selected, \'disabled-item\': disabled}" ng-style="colorStyle" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/color/tooltip.tmpl.html">\n    <div class="panel-grid-selected-overlay" ng-class="{\'disabled-overlay\': disabled}"></div>\n    <design-library-editable-grid-name component="component" selected="selected" default-information="colorStyle.background" allow-blank-name="true"></design-library-editable-grid-name>\n</div>\n<div ng-if="uiState.view === \'list\'" class="panel-list-item-small" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/color/tooltip.tmpl.html">\n    <div class="panel-list-color-item-thumb" ng-style="colorStyle"></div>\n    <design-library-editable-list-name component="component" default-information="colorStyle.background" allow-blank-name="true"></design-library-editable-list-name>\n</div>\n'
),e.put("configuration/designlibrary/colortheme/tooltip.tmpl.html","<div class='tooltip'>\n    <span>{{data.hexValue}}</span>\n    <br/>\n    <span>{{data.primaryValue}}</span>\n</div>\n"),e.put("configuration/designlibrary/colortheme/view.tmpl.html",'<div ng-if="uiState.view === \'grid\'" class="panel-color-theme-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover>\n    <div class="panel-color-theme-item-color" ng-style="color.style" ng-repeat="color in values" edgecc-tooltip tooltip-data="color" ng-style="color.style" template-url="configuration/designlibrary/colortheme/tooltip.tmpl.html" ng-click="useColor(color.colorData)">\n        <div class="panel-color-theme-item-color-inner" native-context-menu="component" context-menu-sub-element="color.colorData"></div>\n    </div>\n    <div class="panel-grid-selected-overlay" ng-class="{\'disabled-overlay\': disabled}"></div>\n    <design-library-editable-grid-name component="component" selected="selected"></design-library-editable-grid-name>\n</div>\n<div ng-if="uiState.view === \'list\'" class="panel-list-item-small" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover>\n    <div class="panel-list-color-theme-item-thumb" ng-class="{selected: selected}">\n        <div class="panel-list-color-theme-item-color"  ng-repeat="color in values" edgecc-tooltip tooltip-data="color" ng-style="color.style" template-url="configuration/designlibrary/colortheme/tooltip.tmpl.html" ng-style="color.style"  ng-click="useColor(color.colorData)">\n        <div class="panel-list-color-theme-item-color-inner" native-context-menu="component" context-menu-sub-element="color.colorData"></div>\n        </div>\n    </div>\n    <design-library-editable-list-name component="component"></design-library-editable-list-name>\n</div>\n\n'
),e.put("configuration/designlibrary/image/tooltip.tmpl.html",'<div class=\'tooltip\'>\n    <span ng-if="data.name">{{data.name}}</span>\n    <br ng-if="data.name"/>\n    <span ng-if="data.createdIn"><span translate>DL_CREATED_IN</span> <span translate>{{data.createdIn}}</span></span>\n    <span ng-if="data.type"><span translate>DL_TYPE</span> <span>{{data.type}}</span></span>\n    <br ng-if="data.isStockAsset && (data.createdIn || data.type)"/>\n    <span ng-if="data.isStockAsset"><span translate>DL_ADOBE_STOCK_PHOTO</span></span>\n    <br ng-if="data.isStockAsset"/>\n    <span ng-if="data.isStockAsset && data.isLicensed"><span translate>DL_LICENSED</span></span>\n    <span ng-if="data.isStockAsset && !data.isLicensed"><span translate>DL_UNLICENSED</span></span>\n</div>\n'
),e.put("configuration/designlibrary/image/view.tmpl.html",'<div ng-if="uiState.view === \'grid\'" class="panel-image-item" ng-class="{selected: selected, \'disabled-item\': disabled}" img-size edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/image/tooltip.tmpl.html" ui-draggable="true" drag-component="component" drag-channel="dlItem" on-drag="onElementDragStart()">\n    <div class="panel-image-item-img-holder" ng-show="loadedRenditionUrl && imageUrl" ng-style="imgStyle">\n        <img class="panel-image-item-img" dl-image-on-load ng-src="{{imageUrl}}" style="display: none">\n    </div>\n    <div class="panel-no-rendition-holder" ng-show="loadedRenditionUrl && !imageUrl">\n        <span class="edgecc-icon panel-grid-icon-missing-rendition panel-image-no-rendition-icon">newcreativecloud</span>\n    </div>\n    <div class="edgecc-core-overlay-container" ng-show="!loadedRenditionUrl">\n        <div class="topcoat-spinner edgecc-core-overlay-center"></div>\n    </div>\n    <div class="edgecc-core-overlay-dimmed-top-right" ng-if="pendingChange && loadedRenditionUrl">\n        <div class="panel-core-overlay-icon-syncing edgecc-icon">newsyncing</div>\n    </div>\n    <div class="panel-grid-selected-overlay" ng-class="{\'disabled-overlay\': disabled}"></div>\n    <design-library-editable-grid-name component="component" selected="selected"></design-library-editable-grid-name>\n</div>\n<div ng-if="uiState.view === \'list\'" class="panel-list-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/image/tooltip.tmpl.html" ui-draggable="true" drag-component="component" drag-channel="dlItem" on-drag="onElementDragStart()">\n    <div class="panel-list-image-item-thumb" img-size>\n        <div class="panel-image-item-img-holder" ng-show="loadedRenditionUrl && imageUrl" ng-style="imgStyle">\n            <img class="panel-image-item-img" dl-image-on-load ng-src="{{imageUrl}}" style="display: none">\n        </div>\n        <div class="panel-no-rendition-holder" ng-show="loadedRenditionUrl && !imageUrl">\n            <span class="edgecc-icon panel-list-icon-missing-rendition panel-image-no-rendition-icon">newcreativecloud</span>\n        </div>\n        <div class="topcoat-spinner edgecc-core-overlay-center" ng-show="!loadedRenditionUrl"></div>\n        <div class="edgecc-core-overlay-dimmed-center" ng-if="pendingChange && loadedRenditionUrl">\n            <div class="panel-core-overlay-icon-syncing edgecc-icon">newsyncing</div>\n        </div>\n    </div>\n    <design-library-editable-list-name component="component"></design-library-editable-list-name>\n    <div ng-if="badgeText" class="panel-image-list-item-filetype">{{badgeText}}</div>\n</div>\n\n'
),e.put("configuration/designlibrary/layerstyle/tooltip.tmpl.html","<div class='tooltip'>\n    <span>{{data.name}}</span>\n</div>\n"),e.put("configuration/designlibrary/layerstyle/view.tmpl.html",'<div ng-if="uiState.view === \'grid\'" class="panel-layer-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/layerstyle/tooltip.tmpl.html">\n    <div class="panel-layer-item-img" draggable="false" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-show="imageUrl && loadedRenditionUrl" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}"></div>\n    <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-grid-icon-missing-rendition panel-no-rendition-holder layerstyle-missing-rendition-icon">newcreativecloud</div>\n    <div class="edgecc-core-overlay-container" ng-hide="loadedRenditionUrl">\n        <div class="topcoat-spinner edgecc-core-overlay-center"></div>\n    </div>\n    <div class="panel-grid-selected-overlay" ng-class="{\'disabled-overlay\': disabled}"></div>\n    <design-library-editable-grid-name component="component" selected="selected"></design-library-editable-grid-name>\n</div>\n<div ng-if="uiState.view === \'list\'" class="panel-list-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/layerstyle/tooltip.tmpl.html">\n    <div class="panel-list-item-thumb">\n        <div class="panel-list-layer-item-img" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}" ng-show="imageUrl && loadedRenditionUrl"></div>\n        <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-list-icon-missing-rendition layerstyle-missing-rendition-icon">newcreativecloud</div>\n        <div class="topcoat-spinner edgecc-core-overlay-center" ng-hide="loadedRenditionUrl"></div>\n    </div>\n    <design-library-editable-list-name component="component"></design-library-editable-list-name>\n</div>\n\n'
),e.put("configuration/designlibrary/look/tooltip.tmpl.html","<div class='tooltip'>\n    <span>{{data.name}}</span>\n</div>\n"),e.put("configuration/designlibrary/look/view.tmpl.html",'<div ui-draggable="true" drag-component="component" drag-channel="dlItem" on-drag="onElementDragStart()" ng-if="uiState.view === \'grid\'" class="panel-look-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/look/tooltip.tmpl.html">\n    <div class="panel-look-item-img" draggable="false" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-show="imageUrl && loadedRenditionUrl" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}"></div>\n    <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-grid-icon-missing-rendition panel-no-rendition-holder look-missing-rendition-icon">newcreativecloud</div>\n    <div class="edgecc-core-overlay-container" ng-hide="loadedRenditionUrl">\n        <div class="topcoat-spinner edgecc-core-overlay-center"></div>\n    </div>\n    <div class="panel-grid-selected-overlay" ng-class="{\'disabled-overlay\': disabled}"></div>\n    <design-library-editable-grid-name component="component" selected="selected"></design-library-editable-grid-name>\n</div>\n<div ui-draggable="true" drag-component="component" drag-channel="dlItem" on-drag="onElementDragStart()" ng-if="uiState.view === \'list\'" class="panel-list-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/look/tooltip.tmpl.html">\n    <div class="panel-list-item-thumb">\n        <div class="panel-list-look-item-img" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}" ng-show="imageUrl && loadedRenditionUrl"></div>\n        <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-list-icon-missing-rendition look-missing-rendition-icon">newcreativecloud</div>\n        <div class="topcoat-spinner edgecc-core-overlay-center" ng-hide="loadedRenditionUrl"></div>\n    </div>\n    <design-library-editable-list-name component="component"></design-library-editable-list-name>\n</div>\n\n'
),e.put("configuration/designlibrary/parastyle/tooltip.tmpl.html",'<div class=\'tooltip\'>\n    <span ng-if="data.name">{{data.name}}</span>\n    <br ng-if="data.name"/>\n    <span>{{data.properties}}</span>\n    <br ng-if="data.missingFont"/>\n    <span ng-if="data.missingFont" translate>DL_ERROR_MISSING_FONT</span>\n</div>\n'),e.put("configuration/designlibrary/parastyle/view.tmpl.html",'<div ng-if="uiState.view === \'grid\'" class="panel-textstyle-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/parastyle/tooltip.tmpl.html">\n    <div class="panel-textstyle-item-img" ng-show="imageUrl && loadedRenditionUrl" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}"></div>\n    <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-grid-icon-missing-rendition text-missing-rendition-icon panel-no-rendition-holder">newcreativecloud</div>\n    <div ng-show="imageUrl && loadedRenditionUrl" ng-style="colorStyle" class="panel-textstyle-color"></div>\n    <div class="edgecc-core-overlay-container" ng-show="!loadedRenditionUrl">\n        <div class="topcoat-spinner edgecc-core-overlay-center"></div>\n    </div>\n    <div class="panel-grid-selected-overlay" ng-class="{\'disabled-overlay\': disabled}"></div>\n    <div ng-show="missingFont" class="panel-missing-font-overlay edgecc-icon">alert</div>\n    <design-library-editable-grid-name component="component" selected="selected" default-information="fontDescription.fullFont" allow-blank-name="false"></design-library-editable-grid-name>\n</div>\n<div ng-if="uiState.view === \'list\'" class="panel-list-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/parastyle/tooltip.tmpl.html">\n    <div class="panel-list-textstyle-thumb" ng-class="{\'disabled-item\': disabled}">\n        <div class="panel-list-image-item-img" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}" ng-show="imageUrl && loadedRenditionUrl"></div>\n        <div class="topcoat-spinner edgecc-core-overlay-center" ng-show="!loadedRenditionUrl"></div>\n        <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-list-icon-missing-rendition text-missing-rendition-icon">newcreativecloud</div>\n\n        <div ng-show="missingFont" class="edgecc-icon panel-missing-font-overlay-list">alert</div>\n    </div>\n    <div class="panel-list-textstyle-item-name-container">\n        <design-library-editable-list-name component="component" default-information="fontDescription.fullFont" allow-blank-name="false"></design-library-editable-list-name>\n        <div class="panel-list-textstyle-item-info">{{styleDescription}}</div>\n    </div>\n    <div ng-style="colorStyle" class="panel-textstyle-list-item-color"></div>\n</div>\n'
),e.put("configuration/designlibrary/textstyle/tooltip.tmpl.html",'<div class=\'tooltip\'>\n    <span ng-if="data.name">{{data.name}}</span>\n    <br ng-if="data.name"/>\n    <span>{{data.properties}}</span>\n    <br ng-if="data.missingFont"/>\n    <span ng-if="data.missingFont" translate>DL_ERROR_MISSING_FONT</span>\n</div>\n'),e.put("configuration/designlibrary/textstyle/view.tmpl.html",'<div ng-if="uiState.view === \'grid\'" class="panel-textstyle-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/textstyle/tooltip.tmpl.html">\n    <div class="panel-textstyle-item-img" ng-show="imageUrl && loadedRenditionUrl" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}"></div>\n    <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-grid-icon-missing-rendition text-missing-rendition-icon panel-no-rendition-holder">newcreativecloud</div>\n    <div ng-show="imageUrl && loadedRenditionUrl" ng-style="colorStyle" class="panel-textstyle-color"></div>\n    <div class="edgecc-core-overlay-container" ng-show="!loadedRenditionUrl">\n        <div class="topcoat-spinner edgecc-core-overlay-center"></div>\n    </div>\n    <div class="panel-grid-selected-overlay" ng-class="{\'disabled-overlay\': disabled}"></div>\n    <div ng-show="missingFont" class="panel-missing-font-overlay edgecc-icon">alert</div>\n    <design-library-editable-grid-name component="component" selected="selected" default-information="fontDescription.fullFont" allow-blank-name="false"></design-library-editable-grid-name>\n</div>\n<div ng-if="uiState.view === \'list\'" class="panel-list-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/textstyle/tooltip.tmpl.html">\n    <div class="panel-list-textstyle-thumb" ng-class="{\'disabled-item\': disabled}">\n        <div class="panel-list-image-item-img" ng-class="{\'panel-thumbnail-disabled\': disabled}" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}" ng-show="imageUrl && loadedRenditionUrl"></div>\n        <div class="topcoat-spinner edgecc-core-overlay-center" ng-show="!loadedRenditionUrl"></div>\n        <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-list-icon-missing-rendition text-missing-rendition-icon">newcreativecloud</div>\n\n        <div ng-show="missingFont" class="edgecc-icon panel-missing-font-overlay-list">alert</div>\n    </div>\n    <div class="panel-list-textstyle-item-name-container">\n        <design-library-editable-list-name component="component" default-information="fontDescription.fullFont" allow-blank-name="false"></design-library-editable-list-name>\n        <div class="panel-list-textstyle-item-info">{{styleDescription}}</div>\n    </div>\n    <div ng-style="colorStyle" class="panel-textstyle-list-item-color"></div>\n</div>\n'
),e.put("configuration/designlibrary/unsupported/tooltip.tmpl.html","<div class='tooltip'>\n    <span translate>{{data.disabledMessage}}</span>\n</div>\n"),e.put("configuration/designlibrary/unsupported/view.tmpl.html",'<div ng-if="uiState.view === \'grid\'" class="panel-unsupported-item disabled-item" ng-class="{selected: selected}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/unsupported/tooltip.tmpl.html">\n    <div class="panel-unsupported-item-img panel-thumbnail-disabled" ng-show="imageUrl && loadedRenditionUrl" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}"></div>\n    <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-grid-icon-missing-rendition panel-no-rendition-holder">newcreativecloud</div>\n    <div class="edgecc-core-overlay-container" ng-hide="loadedRenditionUrl">\n        <div class="topcoat-spinner edgecc-core-overlay-center"></div>\n    </div>\n    <div class="panel-grid-selected-overlay disabled-overlay"></div>\n    <design-library-editable-grid-name component="component" selected="selected"></design-library-editable-grid-name>\n</div>\n<div ng-if="uiState.view === \'list\'" class="panel-list-item" ng-class="{selected: selected, \'disabled-item\': disabled}" edgecc-hover edgecc-tooltip tooltip-data="tooltip" template-url="configuration/designlibrary/unsupported/tooltip.tmpl.html">\n    <div class="panel-list-unsupported-item-thumb">\n        <div class="panel-list-unsupported-item-img panel-thumbnail-disabled" ng-show="imageUrl && loadedRenditionUrl" ng-style="{\'background-image\': \'url(\\\'\' + imageUrl + \'\\\')\'}"></div>\n        <div ng-show="!imageUrl && loadedRenditionUrl" class="edgecc-icon panel-list-icon-missing-rendition">newcreativecloud</div>\n        <div class="topcoat-spinner edgecc-core-overlay-center" ng-hide="loadedRenditionUrl"></div>\n    </div>\n    <design-library-editable-list-name component="component"></design-library-editable-list-name>\n</div>\n'
)}}),define("../../.tmp/app.templates",function(){});var Handlebars={};(function(e,t){e.VERSION="1.0.0",e.COMPILER_REVISION=4,e.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"},e.helpers={},e.partials={};var n=Object.prototype.toString,r="[object Function]",i="[object Object]";e.registerHelper=function(t,r,s){if(n.call(t)===i){if(s||r)throw new e.Exception("Arg not supported with multiple helpers");e.Utils.extend(this.helpers,t)}else s&&(r.not=s),this.helpers[t]=
r},e.registerPartial=function(t,r){n.call(t)===i?e.Utils.extend(this.partials,t):this.partials[t]=r},e.registerHelper("helperMissing",function(e){if(arguments.length===2)return t;throw new Error("Missing helper: '"+e+"'")}),e.registerHelper("blockHelperMissing",function(t,i){var s=i.inverse||function(){},o=i.fn,u=n.call(t);return u===r&&(t=t.call(this)),t===!0?o(this):t===!1||t==null?s(this):u==="[object Array]"?t.length>0?e.helpers.each(t,i):s(this):o(t)}),e.K=function(){},e.createFrame=Object.create||
function(t){e.K.prototype=t;var n=new e.K;return e.K.prototype=null,n},e.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,methodMap:{0:"debug",1:"info",2:"warn",3:"error"},log:function(t,n){if(e.logger.level<=t){var r=e.logger.methodMap[t];typeof console!="undefined"&&console[r]&&console[r].call(console,n)}}},e.log=function(t,n){e.logger.log(t,n)},e.registerHelper("each",function(t,i){var s=i.fn,o=i.inverse,u=0,a="",f,l=n.call(t);l===r&&(t=t.call(this)),i.data&&(f=e.createFrame(i.data));if(t&&typeof 
t=="object")if(t instanceof Array)for(var c=t.length;u<c;u++)f&&(f.index=u),a+=s(t[u],{data:f});else for(var h in t)t.hasOwnProperty(h)&&(f&&(f.key=h),a+=s(t[h],{data:f}),u++);return u===0&&(a=o(this)),a}),e.registerHelper("if",function(t,i){var s=n.call(t);return s===r&&(t=t.call(this)),!t||e.Utils.isEmpty(t)?i.inverse(this):i.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn})}),e.registerHelper("with",function(t,i){var s=n.call(t);
s===r&&(t=t.call(this));if(!e.Utils.isEmpty(t))return i.fn(t)}),e.registerHelper("log",function(t,n){var r=n.data&&n.data.level!=null?parseInt(n.data.level,10):1;e.log(r,t)});var s=function(){function n(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,simpleInverse:6,statements:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22
,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,params:27,hash:28,dataName:29,param:30,STRING:31,INTEGER:32,BOOLEAN:33,hashSegments:34,hashSegment:35,ID:36,EQUALS:37,DATA:38,pathSegments:39,SEP:40,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",31:"STRING",32:"INTEGER",33:"BOOLEAN",36:"ID",37:"EQUALS",38:"DATA",40:"SEP"
},productions_:[0,[3,2],[4,2],[4,3],[4,2],[4,1],[4,1],[4,0],[7,1],[7,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[6,2],[17,3],[17,2],[17,2],[17,1],[17,1],[27,2],[27,1],[30,1],[30,1],[30,1],[30,1],[30,1],[28,1],[34,2],[34,1],[35,3],[35,3],[35,3],[35,3],[35,3],[26,1],[26,1],[26,1],[29,2],[21,1],[39,3],[39,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:return o[a-1];case 2:this.$=new i.ProgramNode([],o[a]);break;case 3:this.$=new 
i.ProgramNode(o[a-2],o[a]);break;case 4:this.$=new i.ProgramNode(o[a-1],[]);break;case 5:this.$=new i.ProgramNode(o[a]);break;case 6:this.$=new i.ProgramNode([],[]);break;case 7:this.$=new i.ProgramNode([]);break;case 8:this.$=[o[a]];break;case 9:o[a-1].push(o[a]),this.$=o[a-1];break;case 10:this.$=new i.BlockNode(o[a-2],o[a-1].inverse,o[a-1],o[a]);break;case 11:this.$=new i.BlockNode(o[a-2],o[a-1],o[a-1].inverse,o[a]);break;case 12:this.$=o[a];break;case 13:this.$=o[a];break;case 14:this.$=new i
.ContentNode(o[a]);break;case 15:this.$=new i.CommentNode(o[a]);break;case 16:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 17:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 18:this.$=o[a-1];break;case 19:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],o[a-2][2]==="&");break;case 20:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],!0);break;case 21:this.$=new i.PartialNode(o[a-1]);break;case 22:this.$=new i.PartialNode(o[a-2],o[a-1]);break;case 23:break;case 24:this.$=[[o[a-2]].
concat(o[a-1]),o[a]];break;case 25:this.$=[[o[a-1]].concat(o[a]),null];break;case 26:this.$=[[o[a-1]],o[a]];break;case 27:this.$=[[o[a]],null];break;case 28:this.$=[[o[a]],null];break;case 29:o[a-1].push(o[a]),this.$=o[a-1];break;case 30:this.$=[o[a]];break;case 31:this.$=o[a];break;case 32:this.$=new i.StringNode(o[a]);break;case 33:this.$=new i.IntegerNode(o[a]);break;case 34:this.$=new i.BooleanNode(o[a]);break;case 35:this.$=o[a];break;case 36:this.$=new i.HashNode(o[a]);break;case 37:o[a-1].
push(o[a]),this.$=o[a-1];break;case 38:this.$=[o[a]];break;case 39:this.$=[o[a-2],o[a]];break;case 40:this.$=[o[a-2],new i.StringNode(o[a])];break;case 41:this.$=[o[a-2],new i.IntegerNode(o[a])];break;case 42:this.$=[o[a-2],new i.BooleanNode(o[a])];break;case 43:this.$=[o[a-2],o[a]];break;case 44:this.$=new i.PartialNameNode(o[a]);break;case 45:this.$=new i.PartialNameNode(new i.StringNode(o[a]));break;case 46:this.$=new i.PartialNameNode(new i.IntegerNode(o[a]));break;case 47:this.$=new i.DataNode
(o[a]);break;case 48:this.$=new i.IdNode(o[a]);break;case 49:o[a-2].push({part:o[a],separator:o[a-1]}),this.$=o[a-2];break;case 50:this.$=[{part:o[a]}]}},table:[{3:1,4:2,5:[2,7],6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],22:[1,14],23:[1,15],25:[1,16]},{1:[3]},{5:[1,17]},{5:[2,6],7:18,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,6],22:[1,14],23:[1,15],25:[1,16]},{5:[2,5],6:20,8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,5
],22:[1,14],23:[1,15],25:[1,16]},{17:23,18:[1,22],21:24,29:25,36:[1,28],38:[1,27],39:26},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],25:[2,8]},{4:29,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],25:[1,16]},{4:30,6:3,7:4,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,5],20:[2,7],22:[1,14],23:[1,15],25:[1,16]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{5:[2
,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{17:31,21:24,29:25,36:[1,28],38:[1,27],39:26},{17:32,21:24,29:25,36:[1,28],38:[1,27],39:26},{17:33,21:24,29:25,36:[1,28],38:[1,27],39:26},{21:35,26:34,31:[1,36],32:[1,37],36:[1,28],39:26},{1:[2,1]},{5:[2,2],8:21,9:7,11:8,12:9,13:10,14
:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,2],22:[1,14],23:[1,15],25:[1,16]},{17:23,21:24,29:25,36:[1,28],38:[1,27],39:26},{5:[2,4],7:38,8:6,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19],20:[2,4],22:[1,14],23:[1,15],25:[1,16]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{5:[2,23],14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{18:[1,39]},{18:[2,27],21:44,24:[2,27],27:40,28:41,29:48,30:42,31:[1,45],32:[1,46],33:
[1,47],34:43,35:49,36:[1,50],38:[1,27],39:26},{18:[2,28],24:[2,28]},{18:[2,48],24:[2,48],31:[2,48],32:[2,48],33:[2,48],36:[2,48],38:[2,48],40:[1,51]},{21:52,36:[1,28],39:26},{18:[2,50],24:[2,50],31:[2,50],32:[2,50],33:[2,50],36:[2,50],38:[2,50],40:[2,50]},{10:53,20:[1,54]},{10:55,20:[1,54]},{18:[1,56]},{18:[1,57]},{24:[1,58]},{18:[1,59],21:60,36:[1,28],39:26},{18:[2,44],36:[2,44]},{18:[2,45],36:[2,45]},{18:[2,46],36:[2,46]},{5:[2,3],8:21,9:7,11:8,12:9,13:10,14:[1,11],15:[1,12],16:[1,13],19:[1,19]
,20:[2,3],22:[1,14],23:[1,15],25:[1,16]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{18:[2,25],21:44,24:[2,25],28:61,29:48,30:62,31:[1,45],32:[1,46],33:[1,47],34:43,35:49,36:[1,50],38:[1,27],39:26},{18:[2,26],24:[2,26]},{18:[2,30],24:[2,30],31:[2,30],32:[2,30],33:[2,30],36:[2,30],38:[2,30]},{18:[2,36],24:[2,36],35:63,36:[1,64]},{18:[2,31],24:[2,31],31:[2,31],32:[2,31],33:[2,31],36:[2,31],38:[2,31]},{18:[2,32],24:[2,32],31:[2,32],32:[2,32],33:[2,32],36:[2,32]
,38:[2,32]},{18:[2,33],24:[2,33],31:[2,33],32:[2,33],33:[2,33],36:[2,33],38:[2,33]},{18:[2,34],24:[2,34],31:[2,34],32:[2,34],33:[2,34],36:[2,34],38:[2,34]},{18:[2,35],24:[2,35],31:[2,35],32:[2,35],33:[2,35],36:[2,35],38:[2,35]},{18:[2,38],24:[2,38],36:[2,38]},{18:[2,50],24:[2,50],31:[2,50],32:[2,50],33:[2,50],36:[2,50],37:[1,65],38:[2,50],40:[2,50]},{36:[1,66]},{18:[2,47],24:[2,47],31:[2,47],32:[2,47],33:[2,47],36:[2,47],38:[2,47]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2
,10],23:[2,10],25:[2,10]},{21:67,36:[1,28],39:26},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1
,68]},{18:[2,24],24:[2,24]},{18:[2,29],24:[2,29],31:[2,29],32:[2,29],33:[2,29],36:[2,29],38:[2,29]},{18:[2,37],24:[2,37],36:[2,37]},{37:[1,65]},{21:69,29:73,31:[1,70],32:[1,71],33:[1,72],36:[1,28],38:[1,27],39:26},{18:[2,49],24:[2,49],31:[2,49],32:[2,49],33:[2,49],36:[2,49],38:[2,49],40:[2,49]},{18:[1,74]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{18:[2,39],24:[2,39],36:[2,39]},{18:[2,40],24:[2,40],36:[2,40]},{18:[2,41],24:[2,41],36:[2,41]},{18:[2
,42],24:[2,42],36:[2,42]},{18:[2,43],24:[2,43],36:[2,43]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]}],defaultActions:{17:[2,1]},parseError:function(t,n){throw new Error(t)},parse:function(t){function v(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function m(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer
.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p);var d=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var g,y,b,w,E,S,x={},T,N,C,k;for(;;){b=r[r.length-1];if(this.defaultActions[b])w=this.defaultActions[b];else{if(g===null||typeof g=="undefined")g=m();w=o[b]&&o[b][g]}if(typeof w=="undefined"||!w.length||!w[0]){var L="";if(!
l){k=[];for(T in o[b])this.terminals_[T]&&T>2&&k.push("'"+this.terminals_[T]+"'");this.lexer.showPosition?L="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[g]||g)+"'":L="Parse error on line "+(a+1)+": Unexpected "+(g==1?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(L,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:p,expected:k})}}if(w[0]instanceof Array&&w.length>1)throw new Error
("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(w[0]){case 1:r.push(g),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(w[1]),g=null,y?(g=y,y=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:N=this.productions_[w[1]][1],x.$=i[i.length-N],x._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column
},d&&(x._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),S=this.performAction.call(x,u,f,a,this.yy,w[1],i,s);if(typeof S!="undefined")return S;N&&(r=r.slice(0,-1*N*2),i=i.slice(0,-1*N),s=s.slice(0,-1*N)),r.push(this.productions_[w[1]][0]),i.push(x.$),s.push(x._$),C=o[r[r.length-2]][r[r.length-1]],r.push(C);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(e){return this
._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this
.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line
,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g
,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i,s;this._more||(this.yytext="",this.match="");var o=this._currentRules();for(var u=0;u<o.length;u++){n=this._input.match(this
.rules[o[u]]);if(n&&(!t||n[0].length>t[0].length)){t=n,r=u;if(!this.options.flex)break}}if(t){s=t[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this
.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1);if(e)return e;return}return this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?
t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.options={},e.performAction=function(t,n,r,i){var s=i;switch(r){case 0:return n.yytext="\\",14;case 1:n.yytext.slice(-1)!=="\\"&&this.begin("mu"),n.yytext.slice
(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1),this.begin("emu"));if(n.yytext)return 14;break;case 2:return 14;case 3:return n.yytext.slice(-1)!=="\\"&&this.popState(),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1)),14;case 4:return n.yytext=n.yytext.substr(0,n.yyleng-4),this.popState(),15;case 5:return 25;case 6:return 16;case 7:return 20;case 8:return 19;case 9:return 19;case 10:return 23;case 11:return 22;case 12:this.popState(),this.begin("com");break;case 13:return n
.yytext=n.yytext.substr(3,n.yyleng-5),this.popState(),15;case 14:return 22;case 15:return 37;case 16:return 36;case 17:return 36;case 18:return 40;case 19:break;case 20:return this.popState(),24;case 21:return this.popState(),18;case 22:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\"/g,'"'),31;case 23:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\'/g,"'"),31;case 24:return 38;case 25:return 33;case 26:return 33;case 27:return 32;case 28:return 36;case 29:return n.yytext=n.yytext
.substr(1,n.yyleng-2),36;case 30:return"INVALID";case 31:return 5}},e.rules=[/^(?:\\\\(?=(\{\{)))/,/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[}\/ ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=[}\s]))/
,/^(?:false(?=[}\s]))/,/^(?:-?[0-9]+(?=[}\s]))/,/^(?:[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],inclusive:!1},emu:{rules:[3],inclusive:!1},com:{rules:[4],inclusive:!1},INITIAL:{rules:[0,1,2,31],inclusive:!0}},e}();return e.lexer=t,n.prototype=e,e.Parser=n,new n}();e.Parser=s,e.parse=function(t){return t.constructor===e.AST.ProgramNode?t:(e.Parser.yy=e.AST,e
.Parser.parse(t))},e.AST={},e.AST.ProgramNode=function(t,n){this.type="program",this.statements=t,n&&(this.inverse=new e.AST.ProgramNode(n))},e.AST.MustacheNode=function(e,t,n){this.type="mustache",this.escaped=!n,this.hash=t;var r=this.id=e[0],i=this.params=e.slice(1),s=this.eligibleHelper=r.isSimple;this.isHelper=s&&(i.length||t)},e.AST.PartialNode=function(e,t){this.type="partial",this.partialName=e,this.context=t},e.AST.BlockNode=function(t,n,r,i){var s=function(t,n){if(t.original!==n.original
)throw new e.Exception(t.original+" doesn't match "+n.original)};s(t.id,i),this.type="block",this.mustache=t,this.program=n,this.inverse=r,this.inverse&&!this.program&&(this.isInverse=!0)},e.AST.ContentNode=function(e){this.type="content",this.string=e},e.AST.HashNode=function(e){this.type="hash",this.pairs=e},e.AST.IdNode=function(t){this.type="ID";var n="",r=[],i=0;for(var s=0,o=t.length;s<o;s++){var u=t[s].part;n+=(t[s].separator||"")+u;if(u===".."||u==="."||u==="this"){if(r.length>0)throw new 
e.Exception("Invalid path: "+n);u===".."?i++:this.isScoped=!0}else r.push(u)}this.original=n,this.parts=r,this.string=r.join("."),this.depth=i,this.isSimple=t.length===1&&!this.isScoped&&i===0,this.stringModeValue=this.string},e.AST.PartialNameNode=function(e){this.type="PARTIAL_NAME",this.name=e.original},e.AST.DataNode=function(e){this.type="DATA",this.id=e},e.AST.StringNode=function(e){this.type="STRING",this.original=this.string=this.stringModeValue=e},e.AST.IntegerNode=function(e){this.type="INTEGER"
,this.original=this.integer=e,this.stringModeValue=Number(e)},e.AST.BooleanNode=function(e){this.type="BOOLEAN",this.bool=e,this.stringModeValue=e==="true"},e.AST.CommentNode=function(e){this.type="comment",this.comment=e};var o=["description","fileName","lineNumber","message","name","number","stack"];e.Exception=function(e){var t=Error.prototype.constructor.apply(this,arguments);for(var n=0;n<o.length;n++)this[o[n]]=t[o[n]]},e.Exception.prototype=new Error,e.SafeString=function(e){this.string=e}
,e.SafeString.prototype.toString=function(){return this.string.toString()};var u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},a=/[&<>"'`]/g,f=/[&<>"'`]/,l=function(e){return u[e]||"&amp;"};e.Utils={extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},escapeExpression:function(t){return t instanceof e.SafeString?t.toString():t==null||t===!1?"":(t=t.toString(),f.test(t)?t.replace(a,l):t)},isEmpty:function(e){return!e&&e!==0?!0:n.call(e)==="[object Array]"&&
e.length===0?!0:!1}};var c=e.Compiler=function(){},h=e.JavaScriptCompiler=function(){};c.prototype={compiler:c,disassemble:function(){var e=this.opcodes,t,n=[],r,i;for(var s=0,o=e.length;s<o;s++){t=e[s];if(t.opcode==="DECLARE")n.push("DECLARE "+t.name+"="+t.value);else{r=[];for(var u=0;u<t.args.length;u++)i=t.args[u],typeof i=="string"&&(i='"'+i.replace("\n","\\n")+'"'),r.push(i);n.push(t.opcode+" "+r.join(" "))}}return n.join("\n")},equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==
t)return!1;for(var n=0;n<t;n++){var r=this.opcodes[n],i=e.opcodes[n];if(r.opcode!==i.opcode||r.args.length!==i.args.length)return!1;for(var s=0;s<r.args.length;s++)if(r.args[s]!==i.args[s])return!1}t=this.children.length;if(e.children.length!==t)return!1;for(n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){this.children=[],this.depths={list:[]},this.options=t;var n=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing
:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(n)for(var r in n)this.options.knownHelpers[r]=n[r];return this.program(e)},accept:function(e){return this[e.type](e)},program:function(e){var t=e.statements,n;this.opcodes=[];for(var r=0,i=t.length;r<i;r++)n=t[r],this[n.type](n);return this.isSimple=i===1,this.depths.list=this.depths.list.sort(function(e,t){return e-t}),this},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++,r;this.usePartial=this.usePartial||
t.usePartial,this.children[n]=t;for(var i=0,s=t.depths.list.length;i<s;i++){r=t.depths.list[i];if(r<2)continue;this.addDepth(r-1)}return n},block:function(e){var t=e.mustache,n=e.program,r=e.inverse;n&&(n=this.compileProgram(n)),r&&(r=this.compileProgram(r));var i=this.classifyMustache(t);i==="helper"?this.helperMustache(t,n,r):i==="simple"?(this.simpleMustache(t),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousMustache(
t,n,r),this.opcode("pushProgram",n),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(e){var t=e.pairs,n,r;this.opcode("pushHash");for(var i=0,s=t.length;i<s;i++)n=t[i],r=n[1],this.options.stringParams?(r.depth&&this.addDepth(r.depth),this.opcode("getContext",r.depth||0),this.opcode("pushStringParam",r.stringModeValue,r.type)):this.accept(r),this.opcode("assignToHash",n[0]);this.opcode("popHash")},partial:function(e){var t=
e.partialName;this.usePartial=!0,e.context?this.ID(e.context):this.opcode("push","depth0"),this.opcode("invokePartial",t.name),this.opcode("append")},content:function(e){this.opcode("appendContent",e.string)},mustache:function(e){var t=this.options,n=this.classifyMustache(e);n==="simple"?this.simpleMustache(e):n==="helper"?this.helperMustache(e):this.ambiguousMustache(e),e.escaped&&!t.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousMustache:function(e,t,n){var r=e.id,i=r.parts
[0],s=t!=null||n!=null;this.opcode("getContext",r.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("invokeAmbiguous",i,s)},simpleMustache:function(e){var t=e.id;t.type==="DATA"?this.DATA(t):t.parts.length?this.ID(t):(this.addDepth(t.depth),this.opcode("getContext",t.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperMustache:function(e,t,n){var r=this.setupFullMustacheParams(e,t,n),i=e.id.parts[0];if(this.options.knownHelpers[i])this.opcode("invokeKnownHelper"
,r.length,i);else{if(this.options.knownHelpersOnly)throw new Error("You specified knownHelpersOnly, but used the unknown helper "+i);this.opcode("invokeHelper",r.length,i)}},ID:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0];t?this.opcode("lookupOnContext",e.parts[0]):this.opcode("pushContext");for(var n=1,r=e.parts.length;n<r;n++)this.opcode("lookup",e.parts[n])},DATA:function(t){this.options.data=!0;if(t.id.isScoped||t.id.depth)throw new e.Exception("Scoped data references are not supported: "+
t.original);this.opcode("lookupData");var n=t.id.parts;for(var r=0,i=n.length;r<i;r++)this.opcode("lookup",n[r])},STRING:function(e){this.opcode("pushString",e.string)},INTEGER:function(e){this.opcode("pushLiteral",e.integer)},BOOLEAN:function(e){this.opcode("pushLiteral",e.bool)},comment:function(){},opcode:function(e){this.opcodes.push({opcode:e,args:[].slice.call(arguments,1)})},declare:function(e,t){this.opcodes.push({opcode:"DECLARE",name:e,value:t})},addDepth:function(e){if(isNaN(e))throw new 
Error("EWOT");if(e===0)return;this.depths[e]||(this.depths[e]=!0,this.depths.list.push(e))},classifyMustache:function(e){var t=e.isHelper,n=e.eligibleHelper,r=this.options;if(n&&!t){var i=e.id.parts[0];r.knownHelpers[i]?t=!0:r.knownHelpersOnly&&(n=!1)}return t?"helper":n?"ambiguous":"simple"},pushParams:function(e){var t=e.length,n;while(t--)n=e[t],this.options.stringParams?(n.depth&&this.addDepth(n.depth),this.opcode("getContext",n.depth||0),this.opcode("pushStringParam",n.stringModeValue,n.type
)):this[n.type](n)},setupMustacheParams:function(e){var t=e.params;return this.pushParams(t),e.hash?this.hash(e.hash):this.opcode("emptyHash"),t},setupFullMustacheParams:function(e,t,n){var r=e.params;return this.pushParams(r),this.opcode("pushProgram",t),this.opcode("pushProgram",n),e.hash?this.hash(e.hash):this.opcode("emptyHash"),r}};var p=function(e){this.value=e};h.prototype={nameLookup:function(e,t){return/^[0-9]+$/.test(t)?e+"["+t+"]":h.isValidJavaScriptVariableName(t)?e+"."+t:e+"['"+t+"']"
},appendToBuffer:function(e){return this.environment.isSimple?"return "+e+";":{appendToBuffer:!0,content:e,toString:function(){return"buffer += "+e+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(t,n,r,i){this.environment=t,this.options=n||{},e.log(e.logger.DEBUG,this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!r,this.context=r||{programs:[],environments:[],aliases:{}},this.preamble(),this.stackSlot=0,this
.stackVars=[],this.registers={list:[]},this.compileStack=[],this.inlineStack=[],this.compileChildren(t,n);var s=t.opcodes,o;this.i=0;for(g=s.length;this.i<g;this.i++)o=s[this.i],o.opcode==="DECLARE"?this[o.name]=o.value:this[o.opcode].apply(this,o.args);return this.createFunctionContext(i)},nextOpcode:function(){var e=this.environment.opcodes;return e[this.i+1]},eat:function(){this.i=this.i+1},preamble:function(){var e=[];if(!this.isChild){var t=this.namespace,n="helpers = this.merge(helpers, "+t+".helpers);"
;this.environment.usePartial&&(n=n+" partials = this.merge(partials, "+t+".partials);"),this.options.data&&(n+=" data = data || {};"),e.push(n)}else e.push("");this.environment.isSimple?e.push(""):e.push(", buffer = "+this.initializeBuffer()),this.lastContext=0,this.source=e},createFunctionContext:function(t){var n=this.stackVars.concat(this.registers.list);n.length>0&&(this.source[1]=this.source[1]+", "+n.join(", "));if(!this.isChild)for(var r in this.context.aliases)this.context.aliases.hasOwnProperty
(r)&&(this.source[1]=this.source[1]+", "+r+"="+this.context.aliases[r]);this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.source.push("return buffer;");var i=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var s=0,o=this.environment.depths.list.length;s<o;s++)i.push("depth"+this.environment.depths.list[s]);var u=this.mergeSource();
if(!this.isChild){var a=e.COMPILER_REVISION,f=e.REVISION_CHANGES[a];u="this.compilerInfo = ["+a+",'"+f+"'];\n"+u}if(t)return i.push(u),Function.apply(this,i);var l="function "+(this.name||"")+"("+i.join(",")+") {\n  "+u+"}";return e.log(e.logger.DEBUG,l+"\n\n"),l},mergeSource:function(){var e="",n;for(var r=0,i=this.source.length;r<i;r++){var s=this.source[r];s.appendToBuffer?n?n=n+"\n    + "+s.content:n=s.content:(n&&(e+="buffer += "+n+";\n  ",n=t),e+=s+"\n  ")}return e},blockValue:function(){this
.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var e=["depth0"];this.setupParams(0,e),this.replaceStack(function(t){return e.splice(1,0,t),"blockHelperMissing.call("+e.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var e=["depth0"];this.setupParams(0,e);var t=this.topStack();e.splice(1,0,t),e[e.length-1]="options",this.source.push("if (!"+this.lastHelper+") { "+t+" = blockHelperMissing.call("+e.join(", ")+"); }"
)},appendContent:function(e){this.source.push(this.appendToBuffer(this.quotedString(e)))},append:function(){this.flushInline();var e=this.popStack();this.source.push("if("+e+" || "+e+" === 0) { "+this.appendToBuffer(e)+" }"),this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression",this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(e)
{this.lastContext!==e&&(this.lastContext=e)},lookupOnContext:function(e){this.push(this.nameLookup("depth"+this.lastContext,e,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(e){return"typeof "+e+" === functionType ? "+e+".apply(depth0) : "+e})},lookup:function(e){this.replaceStack(function(t){return t+" == null || "+t+" === false ? "+t+" : "+this.nameLookup
(t,e,"context")})},lookupData:function(e){this.push("data")},pushStringParam:function(e,t){this.pushStackLiteral("depth"+this.lastContext),this.pushString(t),typeof e=="string"?this.pushString(e):this.pushStackLiteral(e)},emptyHash:function(){this.pushStackLiteral("{}"),this.options.stringParams&&(this.register("hashTypes","{}"),this.register("hashContexts","{}"))},pushHash:function(){this.hash={values:[],types:[],contexts:[]}},popHash:function(){var e=this.hash;this.hash=t,this.options.stringParams&&
(this.register("hashContexts","{"+e.contexts.join(",")+"}"),this.register("hashTypes","{"+e.types.join(",")+"}")),this.push("{\n    "+e.values.join(",\n    ")+"\n  }")},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},push:function(e){return this.inlineStack.push(e),e},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},invokeHelper:function(e,t){this.context.aliases.helperMissing="helpers.helperMissing"
;var n=this.lastHelper=this.setupHelper(e,t,!0),r=this.nameLookup("depth"+this.lastContext,t,"context");this.push(n.name+" || "+r),this.replaceStack(function(e){return e+" ? "+e+".call("+n.callParams+") "+": helperMissing.call("+n.helperMissingParams+")"})},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(n.name+".call("+n.callParams+")")},invokeAmbiguous:function(e,t){this.context.aliases.functionType='"function"',this.pushStackLiteral("{}");var n=this.setupHelper(0,e,t),r=this
.lastHelper=this.nameLookup("helpers",e,"helper"),i=this.nameLookup("depth"+this.lastContext,e,"context"),s=this.nextStack();this.source.push("if ("+s+" = "+r+") { "+s+" = "+s+".call("+n.callParams+"); }"),this.source.push("else { "+s+" = "+i+"; "+s+" = typeof "+s+" === functionType ? "+s+".apply(depth0) : "+s+"; }")},invokePartial:function(e){var t=[this.nameLookup("partials",e,"partial"),"'"+e+"'",this.popStack(),"helpers","partials"];this.options.data&&t.push("data"),this.context.aliases.self="this"
,this.push("self.invokePartial("+t.join(", ")+")")},assignToHash:function(e){var t=this.popStack(),n,r;this.options.stringParams&&(r=this.popStack(),n=this.popStack());var i=this.hash;n&&i.contexts.push("'"+e+"': "+n),r&&i.types.push("'"+e+"': "+r),i.values.push("'"+e+"': ("+t+")")},compiler:h,compileChildren:function(e,t){var n=e.children,r,i;for(var s=0,o=n.length;s<o;s++){r=n[s],i=new this.compiler;var u=this.matchExistingProgram(r);u==null?(this.context.programs.push(""),u=this.context.programs
.length,r.index=u,r.name="program"+u,this.context.programs[u]=i.compile(r,t,this.context),this.context.environments[u]=r):(r.index=u,r.name="program"+u)}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var r=this.context.environments[t];if(r&&r.equals(e))return t}},programExpression:function(e){this.context.aliases.self="this";if(e==null)return"self.noop";var t=this.environment.children[e],n=t.depths.list,r,i=[t.index,t.name,"data"];for(var s=0,o=n.length
;s<o;s++)r=n[s],r===1?i.push("depth0"):i.push("depth"+(r-1));return(n.length===0?"self.program(":"self.programWithDepth(")+i.join(", ")+")"},register:function(e,t){this.useRegister(e),this.source.push(e+" = "+t+";")},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},pushStackLiteral:function(e){return this.push(new p(e))},pushStack:function(e){this.flushInline();var t=this.incrStack();return e&&this.source.push(t+" = "+e+";"),this.compileStack.push(t),
t},replaceStack:function(e){var t="",n=this.isInline(),r;if(n){var i=this.popStack(!0);if(i instanceof p)r=i.value;else{var s=this.stackSlot?this.topStackName():this.incrStack();t="("+this.push(s)+" = "+i+"),",r=this.topStack()}}else r=this.topStack();var o=e.call(this,r);return n?((this.inlineStack.length||this.compileStack.length)&&this.popStack(),this.push("("+t+o+")")):(/^stack/.test(r)||(r=this.nextStack()),this.source.push(r+" = ("+t+o+");")),r},nextStack:function(){return this.pushStack()}
,incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;if(e.length){this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];r instanceof p?this.compileStack.push(r):this.pushStack(r)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack
:this.compileStack).pop();return!e&&n instanceof p?n.value:(t||this.stackSlot--,n)},topStack:function(e){var t=this.isInline()?this.inlineStack:this.compileStack,n=t[t.length-1];return!e&&n instanceof p?n.value:n},quotedString:function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(e,t,n){var r=[];this.setupParams(e,r,n);var i=this.nameLookup("helpers",t,"helper"
);return{params:r,name:i,callParams:["depth0"].concat(r).join(", "),helperMissingParams:n&&["depth0",this.quotedString(t)].concat(r).join(", ")}},setupParams:function(e,t,n){var r=[],i=[],s=[],o,u,a;r.push("hash:"+this.popStack()),u=this.popStack(),a=this.popStack();if(a||u)a||(this.context.aliases.self="this",a="self.noop"),u||(this.context.aliases.self="this",u="self.noop"),r.push("inverse:"+u),r.push("fn:"+a);for(var f=0;f<e;f++)o=this.popStack(),t.push(o),this.options.stringParams&&(s.push(this
.popStack()),i.push(this.popStack()));return this.options.stringParams&&(r.push("contexts:["+i.join(",")+"]"),r.push("types:["+s.join(",")+"]"),r.push("hashContexts:hashContexts"),r.push("hashTypes:hashTypes")),this.options.data&&r.push("data:data"),r="{"+r.join(",")+"}",n?(this.register("options",r),t.push("options")):t.push(r),t.join(", ")}};var d="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield"
.split(" "),v=h.RESERVED_WORDS={};for(var m=0,g=d.length;m<g;m++)v[d[m]]=!0;h.isValidJavaScriptVariableName=function(e){return!h.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(e)?!0:!1},e.precompile=function(t,n){if(t==null||typeof t!="string"&&t.constructor!==e.AST.ProgramNode)throw new e.Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);n=n||{},"data"in n||(n.data=!0);var r=e.parse(t),i=(new c).compile(r,n);return(new h).compile(i,n)},e.compile=
function(n,r){function s(){var i=e.parse(n),s=(new c).compile(i,r),o=(new h).compile(s,r,t,!0);return e.template(o)}if(n==null||typeof n!="string"&&n.constructor!==e.AST.ProgramNode)throw new e.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+n);r=r||{},"data"in r||(r.data=!0);var i;return function(e,t){return i||(i=s()),i.call(this,e,t)}},e.VM={template:function(t){var n={escapeExpression:e.Utils.escapeExpression,invokePartial:e.VM.invokePartial,programs:[]
,program:function(t,n,r){var i=this.programs[t];return r?i=e.VM.program(t,n,r):i||(i=this.programs[t]=e.VM.program(t,n)),i},merge:function(t,n){var r=t||n;return t&&n&&(r={},e.Utils.extend(r,n),e.Utils.extend(r,t)),r},programWithDepth:e.VM.programWithDepth,noop:e.VM.noop,compilerInfo:null};return function(r,i){i=i||{};var s=t.call(n,e,r,i.helpers,i.partials,i.data),o=n.compilerInfo||[],u=o[0]||1,a=e.COMPILER_REVISION;if(u!==a){if(u<a){var f=e.REVISION_CHANGES[a],l=e.REVISION_CHANGES[u];throw"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+
f+") or downgrade your runtime to an older version ("+l+")."}throw"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+o[1]+")."}return s}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=function(e,i){return i=i||{},t.apply(this,[e,i.data||n].concat(r))};return i.program=e,i.depth=r.length,i},program:function(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=
e,r.depth=0,r},noop:function(){return""},invokePartial:function(n,r,i,s,o,u){var a={helpers:s,partials:o,data:u};if(n===t)throw new e.Exception("The partial "+r+" could not be found");if(n instanceof Function)return n(i,a);if(!e.compile)throw new e.Exception("The partial "+r+" could not be compiled when running in runtime-only mode");return o[r]=e.compile(n,{data:u!==t}),o[r](i,a)}},e.template=e.VM.template})(Handlebars),define("handlebars",function(){}),require(["app"]);;define("jquery", [], function () {});define("moment", [], function () {});