/*Copyright (c), 2011 Sanford, L.P. All Rights Reserved.*/(function() {var l,aa=aa||{},n=this;n.Da=!0;function p(){}
function ba(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var d=Object.prototype.toString.call(a);if("[object Window]"==d)return"object";if("[object Array]"==d||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==d||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a){return"array"==ba(a)}function da(a){var b=ba(a);return"array"==b||"object"==b&&"number"==typeof a.length}function q(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function t(a){return"function"==ba(a)}var fa="closure_uid_"+(1E9*Math.random()>>>0),ga=0;function ha(a,b,d){return a.call.apply(a.bind,arguments)}
function ia(a,b,d){if(!a)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,e);return a.apply(b,d)}}return function(){return a.apply(b,arguments)}}function u(a,b,d){u=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return u.apply(null,arguments)}
function ja(a,b){var d=Array.prototype.slice.call(arguments,1);return function(){var b=d.slice();b.push.apply(b,arguments);return a.apply(this,b)}}var ka=Date.now||function(){return+new Date};function v(a,b){var d=a.split("."),e=n;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===b?e[f]?e=e[f]:e=e[f]={}:e[f]=b}
function x(a,b){function d(){}d.prototype=b.prototype;a.da=b.prototype;a.prototype=new d;a.prototype.constructor=a;a.Ea=function(a,d,g){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[d].apply(a,h)}};function y(a){if(Error.captureStackTrace)Error.captureStackTrace(this,y);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}x(y,Error);y.prototype.name="CustomError";function la(a,b){for(var d=a.split("%s"),e="",f=Array.prototype.slice.call(arguments,1);f.length&&1<d.length;)e+=d.shift()+f.shift();return e+d.join("%s")}var ma=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function A(a,b){return-1!=a.indexOf(b)}function na(a){return Array.prototype.join.call(arguments,"")}function oa(a,b){return a<b?-1:a>b?1:0};function pa(a,b){b.unshift(a);y.call(this,la.apply(null,b));b.shift()}x(pa,y);pa.prototype.name="AssertionError";function qa(a,b){throw new pa("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var B=Array.prototype,ra=B.indexOf?function(a,b,d){return B.indexOf.call(a,b,d)}:function(a,b,d){d=null==d?0:0>d?Math.max(0,a.length+d):d;if(q(a))return q(b)&&1==b.length?a.indexOf(b,d):-1;for(;d<a.length;d++)if(d in a&&a[d]===b)return d;return-1},sa=B.forEach?function(a,b,d){B.forEach.call(a,b,d)}:function(a,b,d){for(var e=a.length,f=q(a)?a.split(""):a,g=0;g<e;g++)g in f&&b.call(d,f[g],g,a)},ta=B.reduce?function(a,b,d,e){e&&(b=u(b,e));return B.reduce.call(a,b,d)}:function(a,b,d,e){var f=d;sa(a,function(d,
h){f=b.call(e,f,d,h,a)});return f},ua=B.some?function(a,b,d){return B.some.call(a,b,d)}:function(a,b,d){for(var e=a.length,f=q(a)?a.split(""):a,g=0;g<e;g++)if(g in f&&b.call(d,f[g],g,a))return!0;return!1};function va(a){var b;a:{b=wa;for(var d=a.length,e=q(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(void 0,e[f],f,a)){b=f;break a}b=-1}return 0>b?null:q(a)?a.charAt(b):a[b]}function xa(a,b){var d=ra(a,b),e;(e=0<=d)&&B.splice.call(a,d,1);return e}function ya(a){return B.concat.apply(B,arguments)};var C;a:{var za=n.navigator;if(za){var Aa=za.userAgent;if(Aa){C=Aa;break a}}C=""};function Ba(a,b){for(var d in a)b.call(void 0,a[d],d,a)}function Ca(a){var b=[],d=0,e;for(e in a)b[d++]=a[e];return b}function Ea(a){var b=[],d=0,e;for(e in a)b[d++]=e;return b}var Fa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Ga(a,b){for(var d,e,f=1;f<arguments.length;f++){e=arguments[f];for(d in e)a[d]=e[d];for(var g=0;g<Fa.length;g++)d=Fa[g],Object.prototype.hasOwnProperty.call(e,d)&&(a[d]=e[d])}}
function Ha(a){var b=arguments.length;if(1==b&&ca(arguments[0]))return Ha.apply(null,arguments[0]);for(var d={},e=0;e<b;e++)d[arguments[e]]=!0;return d};function Ia(){return A(C,"Edge")||A(C,"Trident")||A(C,"MSIE")};function D(){return A(C,"Edge")};var Ja=A(C,"Opera")||A(C,"OPR"),E=Ia(),Ka=A(C,"Gecko")&&!(A(C.toLowerCase(),"webkit")&&!D())&&!(A(C,"Trident")||A(C,"MSIE"))&&!D(),La=A(C.toLowerCase(),"webkit")&&!D();function Ma(){var a=C;if(Ka)return/rv\:([^\);]+)(\)|;)/.exec(a);if(E&&D())return/Edge\/([\d\.]+)/.exec(a);if(E)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(La)return/WebKit\/(\S+)/.exec(a)}function Na(){var a=n.document;return a?a.documentMode:void 0}
var Oa=function(){if(Ja&&n.opera){var a=n.opera.version;return t(a)?a():a}var a="",b=Ma();b&&(a=b?b[1]:"");return E&&!D()&&(b=Na(),b>parseFloat(a))?String(b):a}(),Pa={};
function F(a){var b;if(!(b=Pa[a])){b=0;for(var d=ma(String(Oa)).split("."),e=ma(String(a)).split("."),f=Math.max(d.length,e.length),g=0;0==b&&g<f;g++){var h=d[g]||"",k=e[g]||"",m=RegExp("(\\d*)(\\D*)","g"),r=RegExp("(\\d*)(\\D*)","g");do{var z=m.exec(h)||["","",""],w=r.exec(k)||["","",""];if(0==z[0].length&&0==w[0].length)break;b=oa(0==z[1].length?0:parseInt(z[1],10),0==w[1].length?0:parseInt(w[1],10))||oa(0==z[2].length,0==w[2].length)||oa(z[2],w[2])}while(0==b)}b=Pa[a]=0<=b}return b}
var Qa=n.document,Ra=Na(),Sa=!Qa||!E||!Ra&&D()?void 0:Ra||("CSS1Compat"==Qa.compatMode?parseInt(Oa,10):5);!Ka&&!E||E&&E&&(D()||9<=Sa)||Ka&&F("1.9.1");E&&F("9");Ha("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function Ta(){this.c="";this.f=null}Ta.prototype.toString=function(){return"SafeHtml{"+this.c+"}"};function Ua(a){var b=new Ta;b.c=a;b.f=0}Ua("<!DOCTYPE html>");Ua("");function Va(a,b){Ba(b,function(b,e){"style"==e?a.style.cssText=b:"class"==e?a.className=b:"for"==e?a.htmlFor=b:e in Wa?a.setAttribute(Wa[e],b):0==e.lastIndexOf("aria-",0)||0==e.lastIndexOf("data-",0)?a.setAttribute(e,b):a[e]=b})}var Wa={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
function Xa(a,b){var d=[];Ya(a,b,d,!1);return d}function Ya(a,b,d,e){if(null!=a)for(a=a.firstChild;a;){if(b(a)&&(d.push(a),e)||Ya(a,b,d,e))return!0;a=a.nextSibling}return!1}var Za={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},$a={IMG:" ",BR:"\n"};function ab(a,b,d){if(!(a.nodeName in Za))if(3==a.nodeType)d?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in $a)b.push($a[a.nodeName]);else for(a=a.firstChild;a;)ab(a,b,d),a=a.nextSibling};function bb(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0}function cb(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};function db(a,b){this.h=a;this.i=b;this.f=0;this.c=null}function eb(a){var b;0<a.f?(a.f--,b=a.c,a.c=b.next,b.next=null):b=a.h();return b}function fb(a,b){a.i(b);100>a.f&&(a.f++,b.next=a.c,a.c=b)};var hb=new db(function(){return new gb},function(a){a.reset()});function ib(){var a=jb,b=null;a.c&&(b=a.c,a.c=a.c.next,a.c||(a.f=null),b.next=null);return b}function gb(){this.next=this.f=this.c=null}gb.prototype.reset=function(){this.next=this.f=this.c=null};function kb(a){n.setTimeout(function(){throw a;},0)}var lb;
function mb(){var a=n.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!A(C,"Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var d="callImmediate"+Math.random(),e="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,a=u(function(a){if(("*"==e||a.origin==e)&&a.data==
d)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(d,e)}}});if("undefined"!==typeof a&&!Ia()){var b=new a,d={},e=d;b.port1.onmessage=function(){if(void 0!==d.next){d=d.next;var a=d.ga;d.ga=null;a()}};return function(a){e.next={ga:a};e=e.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(a){var b=document.createElement("SCRIPT");b.onreadystatechange=
function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){n.setTimeout(a,0)}};function nb(a,b){ob||pb();qb||(ob(),qb=!0);var d=jb,e=eb(hb);e.c=a;e.f=b;e.next=null;d.f?d.f.next=e:d.c=e;d.f=e}var ob;function pb(){if(n.Promise&&n.Promise.resolve){var a=n.Promise.resolve();ob=function(){a.then(rb)}}else ob=function(){var a=rb;!t(n.setImmediate)||n.Window&&n.Window.prototype&&n.Window.prototype.setImmediate==n.setImmediate?(lb||(lb=mb()),lb(a)):n.setImmediate(a)}}var qb=!1,jb=new function(){this.f=this.c=null};
function rb(){for(var a=null;a=ib();){try{a.c.call(a.f)}catch(b){kb(b)}fb(hb,a)}qb=!1};function G(a,b){this.c=H;this.o=void 0;this.i=this.f=this.h=null;this.l=this.m=!1;if(a==sb)I(this,tb,b);else try{var d=this;a.call(b,function(a){I(d,tb,a)},function(a){if(!(a instanceof ub))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}I(d,J,a)})}catch(e){I(this,J,e)}}var H=0,tb=2,J=3;function vb(){this.next=this.h=this.f=this.i=this.c=null;this.l=!1}vb.prototype.reset=function(){this.h=this.f=this.i=this.c=null;this.l=!1};var wb=new db(function(){return new vb},function(a){a.reset()});
function xb(a,b,d){var e=eb(wb);e.i=a;e.f=b;e.h=d;return e}function sb(){}function yb(a){return new G(function(b,d){var e=a.length,f=[];if(e)for(var g=function(a,d){e--;f[a]=d;0==e&&b(f)},h=function(a){d(a)},k=0,m;m=a[k];k++)zb(m,ja(g,k),h);else b(f)})}G.prototype.then=function(a,b,d){return Ab(this,t(a)?a:null,t(b)?b:null,d)};bb(G);function zb(a,b,d,e){a instanceof G?Bb(a,xb(b||p,d||null,e)):a.then(b,d,e)}l=G.prototype;l.ma=function(a,b){return Ab(this,null,a,b)};
l.cancel=function(a){this.c==H&&nb(function(){var b=new ub(a);Cb(this,b)},this)};function Cb(a,b){if(a.c==H)if(a.h){var d=a.h;if(d.f){for(var e=0,f=null,g=null,h=d.f;h&&(h.l||(e++,h.c==a&&(f=h),!(f&&1<e)));h=h.next)f||(g=h);f&&(d.c==H&&1==e?Cb(d,b):(g?(e=g,e.next==d.i&&(d.i=e),e.next=e.next.next):Db(d),Eb(d,f,J,b)))}a.h=null}else I(a,J,b)}function Bb(a,b){a.f||a.c!=tb&&a.c!=J||Fb(a);a.i?a.i.next=b:a.f=b;a.i=b}
function Ab(a,b,d,e){var f=xb(null,null,null);f.c=new G(function(a,h){f.i=b?function(d){try{var f=b.call(e,d);a(f)}catch(r){h(r)}}:a;f.f=d?function(b){try{var f=d.call(e,b);void 0===f&&b instanceof ub?h(b):a(f)}catch(r){h(r)}}:h});f.c.h=a;Bb(a,f);return f.c}l.na=function(a){this.c=H;I(this,tb,a)};l.oa=function(a){this.c=H;I(this,J,a)};
function I(a,b,d){if(a.c==H){if(a==d)b=J,d=new TypeError("Promise cannot resolve to itself");else{if(cb(d)){a.c=1;zb(d,a.na,a.oa,a);return}var e=typeof d;if("object"==e&&null!=d||"function"==e)try{var f=d.then;if(t(f)){Gb(a,d,f);return}}catch(g){b=J,d=g}}a.o=d;a.c=b;a.h=null;Fb(a);b!=J||d instanceof ub||Hb(a,d)}}function Gb(a,b,d){function e(b){g||(g=!0,a.oa(b))}function f(b){g||(g=!0,a.na(b))}a.c=1;var g=!1;try{d.call(b,f,e)}catch(h){e(h)}}function Fb(a){a.m||(a.m=!0,nb(a.Ba,a))}
function Db(a){var b=null;a.f&&(b=a.f,a.f=b.next,b.next=null);a.f||(a.i=null);return b}l.Ba=function(){for(var a=null;a=Db(this);)Eb(this,a,this.c,this.o);this.m=!1};function Eb(a,b,d,e){if(d==J&&b.f&&!b.l)for(;a&&a.l;a=a.h)a.l=!1;if(b.c)b.c.h=null,Ib(b,d,e);else try{b.l?b.i.call(b.h):Ib(b,d,e)}catch(f){Jb.call(null,f)}fb(wb,b)}function Ib(a,b,d){b==tb?a.i.call(a.h,d):a.f&&a.f.call(a.h,d)}function Hb(a,b){a.l=!0;nb(function(){a.l&&Jb.call(null,b)})}var Jb=kb;function ub(a){y.call(this,a)}x(ub,y);
ub.prototype.name="cancel";function Kb(){0!=Lb&&(Mb[this[fa]||(this[fa]=++ga)]=this);this.l=this.l;this.A=this.A}var Lb=0,Mb={};Kb.prototype.l=!1;function Nb(a){a.l||(a.l=!0,a.K(),0!=Lb&&(a=a[fa]||(a[fa]=++ga),delete Mb[a]))}Kb.prototype.K=function(){if(this.A)for(;this.A.length;)this.A.shift()()};var Ob=!E||E&&(D()||9<=Sa),Pb=E&&!F("9");!La||F("528");Ka&&F("1.9b")||E&&F("8")||Ja&&F("9.5")||La&&F("528");Ka&&!F("8")||E&&F("9");function Qb(a,b){this.type=a;this.c=this.target=b;this.ka=!0}Qb.prototype.f=function(){this.ka=!1};function Rb(a){Rb[" "](a);return a}Rb[" "]=p;function Sb(a,b){Qb.call(this,a?a.type:"");this.h=this.state=this.c=this.target=null;if(a){this.type=a.type;this.target=a.target||a.srcElement;this.c=b;var d=a.relatedTarget;if(d&&Ka)try{Rb(d.nodeName)}catch(e){}this.state=a.state;this.h=a;a.defaultPrevented&&this.f()}}x(Sb,Qb);Sb.prototype.f=function(){Sb.da.f.call(this);var a=this.h;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Pb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Tb="closure_listenable_"+(1E6*Math.random()|0),Ub=0;function Vb(a,b,d,e,f){this.listener=a;this.c=null;this.src=b;this.type=d;this.ba=!!e;this.ca=f;++Ub;this.O=this.aa=!1}function Wb(a){a.O=!0;a.listener=null;a.c=null;a.src=null;a.ca=null};function Xb(a){this.src=a;this.c={};this.f=0}function Yb(a,b,d,e,f,g){var h=b.toString();b=a.c[h];b||(b=a.c[h]=[],a.f++);var k=Zb(b,d,f,g);-1<k?(a=b[k],e||(a.aa=!1)):(a=new Vb(d,a.src,h,!!f,g),a.aa=e,b.push(a));return a}function $b(a,b){var d=b.type;d in a.c&&xa(a.c[d],b)&&(Wb(b),0==a.c[d].length&&(delete a.c[d],a.f--))}function Zb(a,b,d,e){for(var f=0;f<a.length;++f){var g=a[f];if(!g.O&&g.listener==b&&g.ba==!!d&&g.ca==e)return f}return-1};var ac="closure_lm_"+(1E6*Math.random()|0),bc={},cc=0;
function dc(a,b,d,e,f){if(ca(b))for(var g=0;g<b.length;g++)dc(a,b[g],d,e,f);else if(d=ec(d),a&&a[Tb])Yb(a.D,String(b),d,!1,e,f);else{if(!b)throw Error("Invalid event type");var g=!!e,h=fc(a);h||(a[ac]=h=new Xb(a));d=Yb(h,b,d,!1,e,f);if(!d.c){e=gc();d.c=e;e.src=a;e.listener=d;if(a.addEventListener)a.addEventListener(b.toString(),e,g);else if(a.attachEvent)a.attachEvent(hc(b.toString()),e);else throw Error("addEventListener and attachEvent are unavailable.");cc++}}}
function gc(){var a=ic,b=Ob?function(d){return a.call(b.src,b.listener,d)}:function(d){d=a.call(b.src,b.listener,d);if(!d)return d};return b}function jc(a,b,d,e,f){if(ca(b))for(var g=0;g<b.length;g++)jc(a,b[g],d,e,f);else(d=ec(d),a&&a[Tb])?(a=a.D,b=String(b).toString(),b in a.c&&(g=a.c[b],d=Zb(g,d,e,f),-1<d&&(Wb(g[d]),B.splice.call(g,d,1),0==g.length&&(delete a.c[b],a.f--)))):a&&(a=fc(a))&&(b=a.c[b.toString()],a=-1,b&&(a=Zb(b,d,!!e,f)),(d=-1<a?b[a]:null)&&kc(d))}
function kc(a){if(!ea(a)&&a&&!a.O){var b=a.src;if(b&&b[Tb])$b(b.D,a);else{var d=a.type,e=a.c;b.removeEventListener?b.removeEventListener(d,e,a.ba):b.detachEvent&&b.detachEvent(hc(d),e);cc--;(d=fc(b))?($b(d,a),0==d.f&&(d.src=null,b[ac]=null)):Wb(a)}}}function hc(a){return a in bc?bc[a]:bc[a]="on"+a}function lc(a,b,d,e){var f=!0;if(a=fc(a))if(b=a.c[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var g=b[a];g&&g.ba==d&&!g.O&&(g=mc(g,e),f=f&&!1!==g)}return f}
function mc(a,b){var d=a.listener,e=a.ca||a.src;a.aa&&kc(a);return d.call(e,b)}
function ic(a,b){if(a.O)return!0;if(!Ob){var d;if(!(d=b))a:{d=["window","event"];for(var e=n,f;f=d.shift();)if(null!=e[f])e=e[f];else{d=null;break a}d=e}f=d;d=new Sb(f,this);e=!0;if(!(0>f.keyCode||void 0!=f.returnValue)){a:{var g=!1;if(0==f.keyCode)try{f.keyCode=-1;break a}catch(h){g=!0}if(g||void 0==f.returnValue)f.returnValue=!0}f=[];for(g=d.c;g;g=g.parentNode)f.push(g);for(var g=a.type,k=f.length-1;0<=k;k--){d.c=f[k];var m=lc(f[k],g,!0,d),e=e&&m}for(k=0;k<f.length;k++)d.c=f[k],m=lc(f[k],g,!1,d),
e=e&&m}return e}return mc(a,new Sb(b,this))}function fc(a){a=a[ac];return a instanceof Xb?a:null}var nc="__closure_events_fn_"+(1E9*Math.random()>>>0);function ec(a){if(t(a))return a;a[nc]||(a[nc]=function(b){return a.handleEvent(b)});return a[nc]};function K(){Kb.call(this);this.D=new Xb(this);this.qa=this;this.S=null}x(K,Kb);K.prototype[Tb]=!0;K.prototype.addEventListener=function(a,b,d,e){dc(this,a,b,d,e)};K.prototype.removeEventListener=function(a,b,d,e){jc(this,a,b,d,e)};
function L(a,b){var d,e=a.S;if(e)for(d=[];e;e=e.S)d.push(e);var e=a.qa,f=b,g=f.type||f;if(q(f))f=new Qb(f,e);else if(f instanceof Qb)f.target=f.target||e;else{var h=f,f=new Qb(g,e);Ga(f,h)}var h=!0,k;if(d)for(var m=d.length-1;0<=m;m--)k=f.c=d[m],h=oc(k,g,!0,f)&&h;k=f.c=e;h=oc(k,g,!0,f)&&h;h=oc(k,g,!1,f)&&h;if(d)for(m=0;m<d.length;m++)k=f.c=d[m],h=oc(k,g,!1,f)&&h}
K.prototype.K=function(){K.da.K.call(this);if(this.D){var a=this.D,b=0,d;for(d in a.c){for(var e=a.c[d],f=0;f<e.length;f++)++b,Wb(e[f]);delete a.c[d];a.f--}}this.S=null};function oc(a,b,d,e){b=a.D.c[String(b)];if(!b)return!0;b=b.concat();for(var f=!0,g=0;g<b.length;++g){var h=b[g];if(h&&!h.O&&h.ba==d){var k=h.listener,m=h.ca||h.src;h.aa&&$b(a.D,h);f=!1!==k.call(m,e)&&f}}return f&&0!=e.ka};function pc(a,b,d){if(t(a))d&&(a=u(a,d));else if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:n.setTimeout(a,b||0)};function qc(a){var b=[];rc(new sc,a,b);return b.join("")}function sc(){}
function rc(a,b,d){if(null==b)d.push("null");else{if("object"==typeof b){if(ca(b)){var e=b;b=e.length;d.push("[");for(var f="",g=0;g<b;g++)d.push(f),rc(a,e[g],d),f=",";d.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{d.push("{");f="";for(e in b)Object.prototype.hasOwnProperty.call(b,e)&&(g=b[e],"function"!=typeof g&&(d.push(f),tc(e,d),d.push(":"),rc(a,g,d),f=","));d.push("}");return}}switch(typeof b){case "string":tc(b,d);break;case "number":d.push(isFinite(b)&&
!isNaN(b)?b:"null");break;case "boolean":d.push(b);break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}}var uc={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},vc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;function tc(a,b){b.push('"',a.replace(vc,function(a){var b=uc[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),uc[a]=b);return b}),'"')};function wc(a){if("function"==typeof a.J)return a.J();if(q(a))return a.split("");if(da(a)){for(var b=[],d=a.length,e=0;e<d;e++)b.push(a[e]);return b}return Ca(a)}
function xc(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(da(a)||q(a))sa(a,b,void 0);else{var d;if("function"==typeof a.I)d=a.I();else if("function"!=typeof a.J)if(da(a)||q(a)){d=[];for(var e=a.length,f=0;f<e;f++)d.push(f)}else d=Ea(a);else d=void 0;for(var e=wc(a),f=e.length,g=0;g<f;g++)b.call(void 0,e[g],d&&d[g],a)}};function yc(a,b){this.f={};this.c=[];this.i=this.h=0;var d=arguments.length;if(1<d){if(d%2)throw Error("Uneven number of arguments");for(var e=0;e<d;e+=2)zc(this,arguments[e],arguments[e+1])}else if(a){a instanceof yc?(d=a.I(),e=a.J()):(d=Ea(a),e=Ca(a));for(var f=0;f<d.length;f++)zc(this,d[f],e[f])}}l=yc.prototype;l.J=function(){Ac(this);for(var a=[],b=0;b<this.c.length;b++)a.push(this.f[this.c[b]]);return a};l.I=function(){Ac(this);return this.c.concat()};
l.clear=function(){this.f={};this.i=this.h=this.c.length=0};function Ac(a){if(a.h!=a.c.length){for(var b=0,d=0;b<a.c.length;){var e=a.c[b];Bc(a.f,e)&&(a.c[d++]=e);b++}a.c.length=d}if(a.h!=a.c.length){for(var f={},d=b=0;b<a.c.length;)e=a.c[b],Bc(f,e)||(a.c[d++]=e,f[e]=1),b++;a.c.length=d}}function Cc(a,b){return Bc(a.f,b)?a.f[b]:void 0}function zc(a,b,d){Bc(a.f,b)||(a.h++,a.c.push(b),a.i++);a.f[b]=d}l.forEach=function(a,b){for(var d=this.I(),e=0;e<d.length;e++){var f=d[e];a.call(b,Cc(this,f),f,this)}};
l.clone=function(){return new yc(this)};function Bc(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Dc(a,b,d,e,f){this.reset(a,b,d,e,f)}Dc.prototype.c=null;var Ec=0;Dc.prototype.reset=function(a,b,d,e,f){"number"==typeof f||Ec++;e||ka();this.f=b;delete this.c};function Fc(a){this.i=a;this.h=this.c=this.f=null}function Gc(a,b){this.name=a;this.value=b}Gc.prototype.toString=function(){return this.name};var Hc=new Gc("SEVERE",1E3),Ic=new Gc("WARNING",900),Jc=new Gc("INFO",800),Kc=new Gc("CONFIG",700),Lc=new Gc("FINE",500);function Mc(a){if(a.c)return a.c;if(a.f)return Mc(a.f);qa("Root logger has no level set.");return null}
Fc.prototype.log=function(a,b,d){if(a.value>=Mc(this).value)for(t(b)&&(b=b()),a=new Dc(a,String(b),this.i),d&&(a.c=d),d="log:"+a.f,n.console&&(n.console.timeStamp?n.console.timeStamp(d):n.console.markTimeline&&n.console.markTimeline(d)),n.msWriteProfilerMark&&n.msWriteProfilerMark(d),d=this;d;)d=d.f};var Nc={},Oc=null;
function Pc(a){Oc||(Oc=new Fc(""),Nc[""]=Oc,Oc.c=Kc);var b;if(!(b=Nc[a])){b=new Fc(a);var d=a.lastIndexOf("."),e=a.substr(d+1),d=Pc(a.substr(0,d));d.h||(d.h={});d.h[e]=b;b.f=d;Nc[a]=b}return b};function M(a,b){a&&a.log(Lc,b,void 0)};function Qc(){}Qc.prototype.c=null;function Rc(a){var b;(b=a.c)||(b={},Sc(a)&&(b[0]=!0,b[1]=!0),b=a.c=b);return b};var Tc;function Uc(){}x(Uc,Qc);function Vc(a){return(a=Sc(a))?new ActiveXObject(a):new XMLHttpRequest}function Sc(a){if(!a.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],d=0;d<b.length;d++){var e=b[d];try{return new ActiveXObject(e),a.f=e}catch(f){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.f}Tc=new Uc;var Wc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Xc(a){if(Yc){Yc=!1;var b=n.location;if(b){var d=b.href;if(d&&(d=(d=Xc(d)[3]||null)?decodeURI(d):d)&&d!=b.hostname)throw Yc=!0,Error();}}return a.match(Wc)}var Yc=La;
function Zc(a,b){for(var d=a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null,h=null;0<=f?(g=d[e].substring(0,f),h=d[e].substring(f+1)):g=d[e];b(g,h?decodeURIComponent(h.replace(/\+/g," ")):"")}}
function $c(a){var b="getPrinters";if(0<=a.indexOf("#")||0<=a.indexOf("?"))throw Error("goog.uri.utils: Fragment or query identifiers are not supported: ["+a+"]");var d=a.length-1;0<=d&&a.indexOf("/",d)==d&&(a=a.substr(0,a.length-1));0==b.lastIndexOf("/",0)&&(b=b.substr(1));return na(a,"/",b)};function ad(a){K.call(this);this.ta=new yc;this.N=a||null;this.f=!1;this.H=this.c=null;this.m=this.$=this.o="";this.h=this.R=this.s=this.P=!1;this.i=0;this.G=null;this.F=bd;this.B=this.ua=!1}x(ad,K);var bd="",cd=ad.prototype,dd=Pc("goog.net.XhrIo");cd.v=dd;var ed=/^https?$/i,fd=["POST","PUT"],gd=[];function hd(a,b,d,e){var f=new ad;gd.push(f);b&&Yb(f.D,"complete",b,!1,void 0,void 0);Yb(f.D,"ready",f.za,!0,void 0,void 0);f.i=Math.max(0,1500);f.send(a,d,e,void 0)}l=ad.prototype;
l.za=function(){Nb(this);xa(gd,this)};
l.send=function(a,b,d,e){if(this.c)throw Error("[goog.net.XhrIo] Object is active with another request="+this.o+"; newUri="+a);b=b?b.toUpperCase():"GET";this.o=a;this.m="";this.$=b;this.P=!1;this.f=!0;this.c=this.N?Vc(this.N):Vc(Tc);this.H=this.N?Rc(this.N):Rc(Tc);this.c.onreadystatechange=u(this.ja,this);try{M(this.v,N(this,"Opening Xhr")),this.R=!0,this.c.open(b,String(a),!0),this.R=!1}catch(f){M(this.v,N(this,"Error opening Xhr: "+f.message));id(this,f);return}a=d||"";var g=this.ta.clone();e&&
xc(e,function(a,b){zc(g,b,a)});e=va(g.I());d=n.FormData&&a instanceof n.FormData;!(0<=ra(fd,b))||e||d||zc(g,"Content-Type","application/x-www-form-urlencoded;charset=utf-8");g.forEach(function(a,b){this.c.setRequestHeader(b,a)},this);this.F&&(this.c.responseType=this.F);"withCredentials"in this.c&&(this.c.withCredentials=this.ua);try{jd(this),0<this.i&&(this.B=kd(this.c),M(this.v,N(this,"Will abort after "+this.i+"ms if incomplete, xhr2 "+this.B)),this.B?(this.c.timeout=this.i,this.c.ontimeout=u(this.M,
this)):this.G=pc(this.M,this.i,this)),M(this.v,N(this,"Sending request")),this.s=!0,this.c.send(a),this.s=!1}catch(h){M(this.v,N(this,"Send error: "+h.message)),id(this,h)}};function kd(a){return E&&F(9)&&ea(a.timeout)&&void 0!==a.ontimeout}function wa(a){return"content-type"==a.toLowerCase()}
l.M=function(){"undefined"!=typeof aa&&this.c&&(this.m="Timed out after "+this.i+"ms, aborting",M(this.v,N(this,this.m)),L(this,"timeout"),this.c&&this.f&&(M(this.v,N(this,"Aborting")),this.f=!1,this.h=!0,this.c.abort(),this.h=!1,L(this,"complete"),L(this,"abort"),ld(this)))};function id(a,b){a.f=!1;a.c&&(a.h=!0,a.c.abort(),a.h=!1);a.m=b;md(a);ld(a)}function md(a){a.P||(a.P=!0,L(a,"complete"),L(a,"error"))}
l.K=function(){this.c&&(this.f&&(this.f=!1,this.h=!0,this.c.abort(),this.h=!1),ld(this,!0));ad.da.K.call(this)};l.ja=function(){this.l||(this.R||this.s||this.h?nd(this):this.Ca())};l.Ca=function(){nd(this)};
function nd(a){if(a.f&&"undefined"!=typeof aa)if(a.H[1]&&4==od(a)&&2==a.w())M(a.v,N(a,"Local request error detected and ignored"));else if(a.s&&4==od(a))pc(a.ja,0,a);else if(L(a,"readystatechange"),4==od(a)){M(a.v,N(a,"Request complete"));a.f=!1;try{if(pd(a))L(a,"complete"),L(a,"success");else{var b;try{b=2<od(a)?a.c.statusText:""}catch(d){M(a.v,"Can not get status: "+d.message),b=""}a.m=b+" ["+a.w()+"]";md(a)}}finally{ld(a)}}}
function ld(a,b){if(a.c){jd(a);var d=a.c,e=a.H[0]?p:null;a.c=null;a.H=null;b||L(a,"ready");try{d.onreadystatechange=e}catch(f){(d=a.v)&&d.log(Hc,"Problem encountered resetting onreadystatechange: "+f.message,void 0)}}}function jd(a){a.c&&a.B&&(a.c.ontimeout=null);ea(a.G)&&(n.clearTimeout(a.G),a.G=null)}
function pd(a){var b=a.w(),d;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=!0;break a;default:d=!1}if(!d){if(b=0===b)a=Xc(String(a.o))[1]||null,!a&&self.location&&(a=self.location.protocol,a=a.substr(0,a.length-1)),b=!ed.test(a?a.toLowerCase():"");d=b}return d}function od(a){return a.c?a.c.readyState:0}l.w=function(){try{return 2<od(this)?this.c.status:-1}catch(a){return-1}};
function qd(a){try{if(!a.c)return null;if("response"in a.c)return a.c.response;switch(a.F){case bd:case "text":return a.c.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.c)return a.c.mozResponseArrayBuffer}var b=a.v;b&&b.log(Hc,"Response type "+a.F+" is not supported on this browser",void 0);return null}catch(d){return M(a.v,"Can not get response: "+d.message),null}}function N(a,b){return b+" ["+a.$+" "+a.o+" "+a.w()+"]"};function O(a,b){this.c=this.o=this.i="";this.s=null;this.l=this.f="";this.m=!1;var d;a instanceof O?(this.m=void 0!==b?b:a.m,rd(this,a.i),this.o=a.o,this.c=a.c,sd(this,a.s),this.f=a.f,td(this,a.h.clone()),this.l=a.l):a&&(d=Xc(String(a)))?(this.m=!!b,rd(this,d[1]||"",!0),this.o=ud(d[2]||""),this.c=ud(d[3]||"",!0),sd(this,d[4]),this.f=ud(d[5]||"",!0),td(this,d[6]||"",!0),this.l=ud(d[7]||"")):(this.m=!!b,this.h=new vd(null,0,this.m))}
O.prototype.toString=function(){var a=[],b=this.i;b&&a.push(wd(b,xd,!0),":");if(b=this.c){a.push("//");var d=this.o;d&&a.push(wd(d,xd,!0),"@");a.push(encodeURIComponent(String(b)).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.s;null!=b&&a.push(":",String(b))}if(b=this.f)this.c&&"/"!=b.charAt(0)&&a.push("/"),a.push(wd(b,"/"==b.charAt(0)?yd:zd,!0));(b=this.h.toString())&&a.push("?",b);(b=this.l)&&a.push("#",wd(b,Ad));return a.join("")};O.prototype.clone=function(){return new O(this)};
function rd(a,b,d){a.i=d?ud(b,!0):b;a.i&&(a.i=a.i.replace(/:$/,""))}function sd(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.s=b}else a.s=null}function td(a,b,d){b instanceof vd?(a.h=b,Bd(a.h,a.m)):(d||(b=wd(b,Cd)),a.h=new vd(b,0,a.m))}function Dd(a){return a instanceof O?a.clone():new O(a,void 0)}
function Ed(a,b){a instanceof O||(a=Dd(a));b instanceof O||(b=Dd(b));var d=a,e=b,f=d.clone(),g=!!e.i;g?rd(f,e.i):g=!!e.o;g?f.o=e.o:g=!!e.c;g?f.c=e.c:g=null!=e.s;var h=e.f;if(g)sd(f,e.s);else if(g=!!e.f)if("/"!=h.charAt(0)&&(d.c&&!d.f?h="/"+h:(d=f.f.lastIndexOf("/"),-1!=d&&(h=f.f.substr(0,d+1)+h))),d=h,".."==d||"."==d)h="";else if(A(d,"./")||A(d,"/.")){for(var h=0==d.lastIndexOf("/",0),d=d.split("/"),k=[],m=0;m<d.length;){var r=d[m++];"."==r?h&&m==d.length&&k.push(""):".."==r?((1<k.length||1==k.length&&
""!=k[0])&&k.pop(),h&&m==d.length&&k.push("")):(k.push(r),h=!0)}h=k.join("/")}else h=d;g?f.f=h:g=""!==e.h.toString();g?td(f,ud(e.h.toString())):g=!!e.l;g&&(f.l=e.l);return f}function ud(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function wd(a,b,d){return q(a)?(a=encodeURI(a).replace(b,Fd),d&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fd(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}
var xd=/[#\/\?@]/g,zd=/[\#\?:]/g,yd=/[\#\?]/g,Cd=/[\#\?@]/g,Ad=/#/g;function vd(a,b,d){this.h=this.c=null;this.f=a||null;this.i=!!d}function Gd(a){a.c||(a.c=new yc,a.h=0,a.f&&Zc(a.f,function(b,d){var e=decodeURIComponent(b.replace(/\+/g," "));Gd(a);a.f=null;var e=Hd(a,e),f=Cc(a.c,e);f||zc(a.c,e,f=[]);f.push(d);a.h++}))}function Id(a,b){Gd(a);b=Hd(a,b);if(Bc(a.c.f,b)){a.f=null;a.h-=Cc(a.c,b).length;var d=a.c;Bc(d.f,b)&&(delete d.f[b],d.h--,d.i++,d.c.length>2*d.h&&Ac(d))}}l=vd.prototype;
l.clear=function(){this.c=this.f=null;this.h=0};l.I=function(){Gd(this);for(var a=this.c.J(),b=this.c.I(),d=[],e=0;e<b.length;e++)for(var f=a[e],g=0;g<f.length;g++)d.push(b[e]);return d};l.J=function(a){Gd(this);var b=[];if(q(a)){var d=a;Gd(this);d=Hd(this,d);Bc(this.c.f,d)&&(b=ya(b,Cc(this.c,Hd(this,a))))}else for(a=this.c.J(),d=0;d<a.length;d++)b=ya(b,a[d]);return b};
function Jd(a,b,d){Id(a,b);if(0<d.length){a.f=null;var e=a.c;b=Hd(a,b);var f;f=d.length;if(0<f){for(var g=Array(f),h=0;h<f;h++)g[h]=d[h];f=g}else f=[];zc(e,b,f);a.h+=d.length}}l.toString=function(){if(this.f)return this.f;if(!this.c)return"";for(var a=[],b=this.c.I(),d=0;d<b.length;d++)for(var e=b[d],f=encodeURIComponent(String(e)),e=this.J(e),g=0;g<e.length;g++){var h=f;""!==e[g]&&(h+="="+encodeURIComponent(String(e[g])));a.push(h)}return this.f=a.join("&")};
l.clone=function(){var a=new vd;a.f=this.f;this.c&&(a.c=this.c.clone(),a.h=this.h);return a};function Hd(a,b){var d=String(b);a.i&&(d=d.toLowerCase());return d}function Bd(a,b){b&&!a.i&&(Gd(a),a.f=null,a.c.forEach(function(a,b){var f=b.toLowerCase();b!=f&&(Id(this,b),Jd(this,f,a))},a));a.i=b};G.prototype.thenCatch=G.prototype.ma;String.c=function(a){return'"'===a[0]&&'"'===a[a.length-1]?a.slice(1,a.length-1):a};function Kd(){Ld("testCookie","test",1);return"test"==Md("testCookie")}function Ld(a,b,d){var e=new Date;e.setTime(e.getTime()+864E5*d);document.cookie=a+"="+b+"; "+("expires="+e.toUTCString())}
function Md(a){a=a+"=";for(var b=document.cookie.split(";"),d=0;d<b.length;d++){for(var e=b[d];" "==e.charAt(0);)e=e.substring(1);if(0==e.indexOf(a))return e.substring(a.length,e.length)}return""}function Od(a){window.localStorage?a?window.localStorage.ServicePort=a:delete window.localStorage.ServicePort:Kd()?a?Ld("ServicePort",a,100):Ld("ServicePort","",100):window.c=a}function Pd(){return window.localStorage?window.localStorage.ServicePort:Kd()?Md("ServicePort"):window.c}
function Qd(a,b,d,e){var f=function(){if("undefined"!==typeof XMLHttpRequest)return new XMLHttpRequest;for(var a="MSXML2.XmlHttp.6.0 MSXML2.XmlHttp.5.0 MSXML2.XmlHttp.4.0 MSXML2.XmlHttp.3.0 MSXML2.XmlHttp.2.0 Microsoft.XmlHttp".split(" "),b,d=0;d<a.length;d++)try{b=new ActiveXObject(a[d]);break}catch(e){}return b}(),g=[],h=null,k;for(k in b)g.push(encodeURIComponent(k)+"="+encodeURIComponent(b[k]));"POST"==d?h=g.length?g.join("&"):"":a+=g.length?"?"+g.join("&"):"";f.open(d||"GET",a,!1);"POST"==d&&
f.setRequestHeader("Content-type","application/x-www-form-urlencoded");f.onreadystatechange=function(){4==f.readyState&&e&&e(f.responseText)};f.send(h);if(200!=f.status)throw Error("Failed to execute webservice command: "+f.status+": "+f.statusText);return f.responseText}function Rd(a){try{return"true"===Qd("https://localhost:"+a+"/DYMO/DLS/Printing/StatusConnected",{},"GET",function(){})}catch(b){return!1}}
function Sd(a,b){for(var d=[],e=41951;41960>=e;++e)d.push(Td(e));yb(d).then(function(){b()}).ma(function(d){ea(d)?(Od(d),a()):b()})}function Td(a){var b="https://localhost:"+a+"/DYMO/DLS/Printing/StatusConnected";return new G(function(d,e){hd(b,function(b){pd(b.target)?e(a):d(a)},"GET",void 0)})}
function Ud(a,b,d){var e="https://localhost:"+Pd()+"/DYMO/DLS/Printing/"+b;return new G(function(f,g){var h=[],k=null,m;for(m in d)h.push(encodeURIComponent(m)+"="+encodeURIComponent(d[m]));"POST"==a?k=h.length?h.join("&"):"":e+=h.length?"?"+h.join("&"):"";hd(e,function(a){var d=a.target;a=null;if(pd(d)){d=qd(d);try{a=window.JSON.parse(d)}catch(e){a=d}f(a)}else a="Failed to execute webservice command: "+b+". Error: "+d.w(),g(Error(a))},a||"GET",k)})}
function Vd(a,b,d){var e=Pd();a=Qd("https://localhost:"+e+"/DYMO/DLS/Printing/"+b,d,a,function(){});try{return window.JSON.parse(a)}catch(f){return a}}
function Wd(){this.getPrinters=function(){return Vd("GET","GetPrinters",{})};this.openLabelFile=function(a){return Vd("GET","OpenLabelFile",{fileName:a})};this.printLabel=function(a,b,d,e){return Vd("POST","PrintLabel",{printerName:a,printParamsXml:b,labelXml:d,labelSetXml:e})};this.printLabel2=function(a,b,d,e){return Vd("POST","PrintLabel2",{printerName:a,printParamsXml:b,labelXml:d,labelSetXml:e})};this.renderLabel=function(a,b,d){return Vd("POST","RenderLabel",{labelXml:a,renderParamsXml:b,printerName:d})};
this.loadImageAsPngBase64=function(a){return Vd("GET","LoadImageAsPngBase64",{imageUri:a})};this.U=function(){return Ud("GET","GetPrinters",{})};this.W=function(a){return Ud("GET","OpenLabelFile",{fileName:a})};this.Y=function(a,b,d,e){return Ud("POST","PrintLabel",{printerName:a,printParamsXml:b,labelXml:d,labelSetXml:e})};this.X=function(a,b,d,e){return Ud("POST","PrintLabel2",{printerName:a,printParamsXml:b,labelXml:d,labelSetXml:e})};this.Z=function(a,b,d){return Ud("POST","RenderLabel",{labelXml:a,
renderParamsXml:b,printerName:d})};this.V=function(a){return Ud("GET","LoadImageAsPngBase64",{imageUri:a})}};var Xd={};v("dymo.label.framework.FlowDirection",Xd);Xd.LeftToRight="LeftToRight";Xd.RightToLeft="RightToLeft";var Yd={};v("dymo.label.framework.LabelWriterPrintQuality",Yd);Yd.Auto="Auto";Yd.Text="Text";Yd.BarcodeAndGraphics="BarcodeAndGraphics";var Zd={};v("dymo.label.framework.TwinTurboRoll",Zd);Zd.Auto="Auto";Zd.Left="Left";Zd.Right="Right";var $d={};v("dymo.label.framework.TapeAlignment",$d);$d.Center="Center";$d.Left="Left";$d.Right="Right";var ae={};v("dymo.label.framework.TapeCutMode",ae);
ae.AutoCut="AutoCut";ae.ChainMarks="ChainMarks";var be={};v("dymo.label.framework.AddressBarcodePosition",be);be.AboveAddress="AboveAddress";be.BelowAddress="BelowAddress";be.Suppress="Suppress";var P={};v("dymo.label.framework.PrintJobStatus",P);P.T=0;P.Unknown=P.T;P.ya=1;P.Printing=P.ya;P.pa=2;P.Finished=P.pa;P.Error=3;P.Error=P.Error;P.wa=4;P.PaperOut=P.wa;P.ra=5;P.InQueue=P.ra;P.ea=-1;P.ProcessingError=P.ea;P.xa=-2;P.PrinterBusy=P.xa;P.sa=-3;P.InvalidJobId=P.sa;P.va=-4;P.NotSpooled=P.va;function Q(a){if("undefined"!=typeof DOMParser)return(new DOMParser).parseFromString(a,"application/xml");if("undefined"!=typeof ActiveXObject){var b=new ActiveXObject("MSXML2.DOMDocument");if(b){b.resolveExternals=!1;b.validateOnParse=!1;try{b.setProperty("ProhibitDTD",!0),b.setProperty("MaxXMLSize",2048),b.setProperty("MaxElementDepth",256)}catch(d){}}b.loadXML(a);return b}throw Error("Your browser does not support loading xml documents");}
function ce(a){if("undefined"!=typeof XMLSerializer)return(new XMLSerializer).serializeToString(a);if(a=a.xml)return a;throw Error("Your browser does not support serializing XML documents");};function R(a,b,d,e){b=a.ownerDocument.createElement(b);d&&b.appendChild(a.ownerDocument.createTextNode(d));if(e)for(var f in e)b.setAttribute(f,e[f]);a.appendChild(b)}function S(a){if(a){var b=[];ab(a,b,!1);a=b.join("")}else a="";return a}function T(a,b){var d=a.getElementsByTagName(b);if(0<d.length)return d[0]}function U(a,b){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(a.ownerDocument.createTextNode(b))};function V(){this.c=[]}v("dymo.label.framework.LabelSetBuilder",V);V.prototype.h=function(){return this.c};V.prototype.getRecords=V.prototype.h;V.prototype.f=function(){var a=new W;this.c.push(a);return a};V.prototype.addRecord=V.prototype.f;
function de(a){for(var b=Q("<LabelSet/>"),d=b.documentElement,e=0;e<a.length;e++){var f=a[e],g=b.createElement("LabelRecord"),h;for(h in f){var k=f[h];if("function"!=typeof k){var k=k.toString(),m=b.createElement("ObjectData");m.setAttribute("Name",h);0==k.indexOf("<TextMarkup>")?(k=Q(k),m.appendChild(k.documentElement.cloneNode(!0))):m.appendChild(b.createTextNode(k));g.appendChild(m)}}d.appendChild(g)}return ce(b)}V.toXml=de;V.prototype.toString=function(){return de(this.c)};function W(){}
W.prototype.h=function(a,b){b=b.toString();0!=b.indexOf("<TextMarkup>")&&(b="<TextMarkup>"+b+"</TextMarkup>");this[a]=b;return this};W.prototype.setTextMarkup=W.prototype.h;W.prototype.f=function(a,b){this[a]=b;return this};W.prototype.setText=W.prototype.f;W.prototype.c=function(a,b){this[a]=b;return this};W.prototype.setBase64Image=W.prototype.c;function X(a){this.f=Q(a)}X.prototype.c=function(){return ce(this.f)};X.prototype.getLabelXml=X.prototype.c;X.prototype.N=function(a,b){return ee(this.c(),a,b)};X.prototype.render=X.prototype.N;X.prototype.P=function(a,b){return fe(this.c(),a,b)};X.prototype.renderAsync=X.prototype.P;X.prototype.h=function(a,b,d){ge(a,b,this.c(),d)};X.prototype.print=X.prototype.h;X.prototype.H=function(a,b,d){return he(a,b,this.c(),d)};X.prototype.printAsync=X.prototype.H;
X.prototype.A=function(a,b,d){return ie(a,b,this.c(),d)};X.prototype.print2=X.prototype.A;X.prototype.F=function(a,b,d){return je(a,b,this.c(),d)};X.prototype.print2Async=X.prototype.F;X.prototype.G=function(a,b,d,e,f){return ke(a,b,this.c(),d,e,f)};X.prototype.printAndPollStatus=X.prototype.G;X.prototype.B=function(a,b,d,e,f){return le(a,b,this.c(),d,e,f)};X.prototype.printAndPollStatusAsync=X.prototype.B;var me="AddressObject TextObject BarcodeObject ShapeObject CounterObject ImageObject CircularTextObject DateTimeObject".split(" ");
function ne(a,b){var d=b||me;return Xa(a.f.documentElement,function(a){return 1==a.nodeType&&0<=ra(d,a.tagName)})}X.prototype.o=function(){for(var a=ne(this),b=[],d=0;d<a.length;d++)b.push(S(T(a[d],"Name")));return b};X.prototype.getObjectNames=X.prototype.o;X.prototype.l=function(){return ne(this,["AddressObject"]).length};X.prototype.getAddressObjectCount=X.prototype.l;function oe(a,b){return ne(a,["AddressObject"])[b]}X.prototype.i=function(a){return S(T(oe(this,a),"BarcodePosition"))};
X.prototype.getAddressBarcodePosition=X.prototype.i;X.prototype.R=function(a,b){if("AboveAddress"!=b&&"BelowAddress"!=b&&"Suppress"!=b)throw Error("verifyAddressBarcodePosition(): barcode position '"+b+"' is invalid value");U(T(oe(this,a),"BarcodePosition"),b);return this};X.prototype.setAddressBarcodePosition=X.prototype.R;X.prototype.m=function(a){return pe(oe(this,a))};X.prototype.getAddressText=X.prototype.m;X.prototype.S=function(a,b){return qe(this,oe(this,a),b)};
X.prototype.setAddressText=X.prototype.S;function re(a,b){for(var d=ne(a),e=0;e<d.length;e++){var f=d[e];if(S(T(f,"Name"))==b)return f}throw Error("getObjectByNameElement(): no object with name '"+b+"' was found");}function pe(a){return ta(T(a,"StyledText").getElementsByTagName("String"),function(a,d){return a+S(d)},"")}
X.prototype.s=function(a){a=re(this,a);switch(a.tagName){case "AddressObject":case "TextObject":return pe(a);case "BarcodeObject":return S(T(a,"Text"));case "ImageObject":if(a=T(a,"Image"))return S(a);break;case "CircularTextObject":return S(T(a,"Text"))}return""};X.prototype.getObjectText=X.prototype.s;
function qe(a,b,d){var e=T(b,"StyledText"),f=[],g;g=e.getElementsByTagName("Element");for(var h=!0,k=0;k<g.length;k++){var m=g[k],r=S(T(m,"String"));if(r&&r.length){var r=r.split("\n"),z=r.length;if(1!=z||h){var w=0;h||(w=1);for(h=T(m,"Attributes");w<z-1;w++)f.push(h);0<r[z-1].length?(f.push(h),h=!1):h=!0}}}g=T(b,"LineFonts");b=[];g&&(b=g.getElementsByTagName("Font"));var Nd;0==b.length&&(Nd=Q('<Font Family="Arial" Size="12" Bold="False" Italic="False" Underline="False" Strikeout="False" />').documentElement);
for(g=Q('<ForeColor Alpha="255" Red="0" Green="0" Blue="0" />').documentElement;e.firstChild;)e.removeChild(e.firstChild);d=d.split("\n");for(k=0;k<d.length;k++)w=d[k].replace("\r",""),k<d.length-1&&(w+="\n"),h=Nd,0<b.length?h=k<b.length?b[k]:b[b.length-1]:0<f.length&&(h=k<f.length?T(f[k],"Font"):T(f[f.length-1],"Font")),m=g,k<f.length&&(m=T(f[k],"ForeColor")),r=e.ownerDocument.createElement("Element"),z=e.ownerDocument.createElement("String"),U(z,w),w=e.ownerDocument.createElement("Attributes"),
w.appendChild(h.cloneNode(!0)),w.appendChild(m.cloneNode(!0)),r.appendChild(z),r.appendChild(w),e.appendChild(r);return a}
X.prototype.$=function(a,b){var d=re(this,a);switch(d.tagName){case "AddressObject":qe(this,d,b);break;case "TextObject":qe(this,d,b);break;case "BarcodeObject":U(T(d,"Text"),b);break;case "ImageObject":var e=T(d,"Image");if(e)U(e,b);else{var f=T(d,"ImageLocation");if(!f)throw Error("setObjectText(): <ImageLocation> is expected but not found: "+ce(e));e=f.ownerDocument.createElement("Image");U(e,b);d.replaceChild(e,f)}break;case "CircularTextObject":U(T(d,"Text"),b);break;case "DateTimeObject":U(T(d,
"PreText"),b);break;case "CounterObject":U(T(d,"PreText"),b)}return this};X.prototype.setObjectText=X.prototype.$;X.prototype.toString=function(){return this.c()};/*
 Portions of this code are from MochiKit, received by
 The Closure Authors under the MIT license. All other code is Copyright
 2005-2009 The Closure Authors. All Rights Reserved.
*/
function se(a,b){this.l=[];this.B=a;this.G=b||null;this.i=this.c=!1;this.h=void 0;this.A=this.H=this.o=!1;this.m=0;this.f=null;this.s=0}se.prototype.cancel=function(a){if(this.c)this.h instanceof se&&this.h.cancel();else{if(this.f){var b=this.f;delete this.f;a?b.cancel(a):(b.s--,0>=b.s&&b.cancel())}this.B?this.B.call(this.G,this):this.A=!0;this.c||(a=new te,ue(this),ve(this,!1,a))}};se.prototype.F=function(a,b){this.o=!1;ve(this,a,b)};function ve(a,b,d){a.c=!0;a.h=d;a.i=!b;we(a)}
function ue(a){if(a.c){if(!a.A)throw new xe;a.A=!1}}function ye(a,b,d,e){a.l.push([b,d,e]);a.c&&we(a)}se.prototype.then=function(a,b,d){var e,f,g=new G(function(a,b){e=a;f=b});ye(this,e,function(a){a instanceof te?g.cancel():f(a)});return g.then(a,b,d)};bb(se);function ze(a){return ua(a.l,function(a){return t(a[1])})}
function we(a){if(a.m&&a.c&&ze(a)){var b=a.m,d=Ae[b];d&&(n.clearTimeout(d.u),delete Ae[b]);a.m=0}a.f&&(a.f.s--,delete a.f);for(var b=a.h,e=d=!1;a.l.length&&!a.o;){var f=a.l.shift(),g=f[0],h=f[1],f=f[2];if(g=a.i?h:g)try{var k=g.call(f||a.G,b);void 0!==k&&(a.i=a.i&&(k==b||k instanceof Error),a.h=b=k);if(cb(b)||"function"===typeof n.Promise&&b instanceof n.Promise)e=!0,a.o=!0}catch(m){b=m,a.i=!0,ze(a)||(d=!0)}}a.h=b;e&&(k=u(a.F,a,!0),e=u(a.F,a,!1),b instanceof se?(ye(b,k,e),b.H=!0):b.then(k,e));d&&(b=
new Be(b),Ae[b.u]=b,a.m=b.u)}function xe(){y.call(this)}x(xe,y);xe.prototype.message="Deferred has already fired";xe.prototype.name="AlreadyCalledError";function te(){y.call(this)}x(te,y);te.prototype.message="Deferred was canceled";te.prototype.name="CanceledError";function Be(a){this.u=n.setTimeout(u(this.f,this),0);this.c=a}Be.prototype.f=function(){delete Ae[this.u];throw this.c;};var Ae={};function Ce(a,b){var d=b||{},e=d.document||document,f=document.createElement("SCRIPT"),g={la:f,M:void 0},h=new se(De,g),k=null,m=null!=d.timeout?d.timeout:5E3;0<m&&(k=window.setTimeout(function(){Ee(f,!0);var b=new Fe(Ge,"Timeout reached for loading script "+a);ue(h);ve(h,!1,b)},m),g.M=k);f.onload=f.onreadystatechange=function(){f.readyState&&"loaded"!=f.readyState&&"complete"!=f.readyState||(Ee(f,d.Aa||!1,k),ue(h),ve(h,!0,null))};f.onerror=function(){Ee(f,!0,k);var b=new Fe(He,"Error while loading script "+
a);ue(h);ve(h,!1,b)};Va(f,{type:"text/javascript",charset:"UTF-8",src:a});Ie(e).appendChild(f);return h}function Ie(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement}function De(){if(this&&this.la){var a=this.la;a&&"SCRIPT"==a.tagName&&Ee(a,!0,this.M)}}function Ee(a,b,d){null!=d&&n.clearTimeout(d);a.onload=p;a.onerror=p;a.onreadystatechange=p;b&&window.setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},0)}var He=0,Ge=1;
function Fe(a,b){var d="Jsloader error (code #"+a+")";b&&(d+=": "+b);y.call(this,d)}x(Fe,y);function Je(a,b){this.f=new O(a);this.c=b?b:"callback";this.M=5E3}var Ke=0;
Je.prototype.send=function(a,b,d,e){a=a||null;e=e||"_"+(Ke++).toString(36)+ka().toString(36);n._callbacks_||(n._callbacks_={});var f=this.f.clone();if(a)for(var g in a)if(!a.hasOwnProperty||a.hasOwnProperty(g)){var h=f,k=g,m=a[g];ca(m)||(m=[String(m)]);Jd(h.h,k,m)}b&&(n._callbacks_[e]=Le(e,b),b=this.c,g="_callbacks_."+e,ca(g)||(g=[String(g)]),Jd(f.h,b,g));b=Ce(f.toString(),{timeout:this.M,Aa:!0});ye(b,null,Me(e,a,d),void 0);return{u:e,ha:b}};
Je.prototype.cancel=function(a){a&&(a.ha&&a.ha.cancel(),a.u&&Ne(a.u,!1))};function Me(a,b,d){return function(){Ne(a,!1);d&&d(b)}}function Le(a,b){return function(d){Ne(a,!0);b.apply(void 0,arguments)}}function Ne(a,b){n._callbacks_[a]&&(b?delete n._callbacks_[a]:n._callbacks_[a]=p)};function Oe(a,b,d){Kb.call(this);this.c=a;this.m=b||0;this.f=d;this.h=u(this.i,this)}x(Oe,Kb);Oe.prototype.u=0;Oe.prototype.K=function(){Oe.da.K.call(this);0!=this.u&&n.clearTimeout(this.u);this.u=0;delete this.c;delete this.f};function Pe(a){0!=a.u&&n.clearTimeout(a.u);a.u=0;a.u=pc(a.h,a.m)}Oe.prototype.i=function(){this.u=0;this.c&&this.c.call(this.f)};var Qe=function(){function a(a){var b=f;return b[a[0]]+b[a[1]]+b[a[2]]+b[a[3]]+"-"+b[a[4]]+b[a[5]]+"-"+b[a[6]]+b[a[7]]+"-"+b[a[8]]+b[a[9]]+"-"+b[a[10]]+b[a[11]]+b[a[12]]+b[a[13]]+b[a[14]]+b[a[15]]}function b(b,f,g){var h="binary"!=b?e:f?f:new d(16);f=f&&g||0;g=4294967296*Math.random();h[f++]=g&255;h[f++]=(g>>>=8)&255;h[f++]=(g>>>=8)&255;h[f++]=g>>>8&255;g=4294967296*Math.random();h[f++]=g&255;h[f++]=(g>>>=8)&255;h[f++]=(g>>>=8)&15|64;h[f++]=g>>>8&255;g=4294967296*Math.random();h[f++]=g&63|128;h[f++]=
(g>>>=8)&255;h[f++]=(g>>>=8)&255;h[f++]=g>>>8&255;g=4294967296*Math.random();h[f++]=g&255;h[f++]=(g>>>=8)&255;h[f++]=(g>>>=8)&255;h[f++]=g>>>8&255;return void 0===b?a(h):h}for(var d=Array,e=new d(16),f=[],g={},h=0;256>h;h++)f[h]=(h+256).toString(16).substr(1).toUpperCase(),g[f[h]]=h;b.f=function(a){var b=new d(16),e=0;a.toUpperCase().replace(/[0-9A-F][0-9A-F]/g,function(a){b[e++]=g[a]});return b};b.h=a;b.c=d;return b}();function Re(a,b,d,e){this.printerName=a;this.jobId=b;this.status=d;this.statusMessage=e}function Se(a){var b={};a=a.split(" ");1<=a.length&&(b.status=parseInt(a[0],10));b.statusMessage=a.slice(1).join(" ");return b}function Te(a){for(var b=0;b<navigator.plugins.length;++b)for(var d=navigator.plugins[b],e=0;e<d.length;++e)if(d[e].type==a)return!0;return!1}
function Ue(){if(!document.getElementById("_DymoLabelFrameworkJslSafariPlugin")){var a=document.createElement("embed");a.type="application/x-dymolabel";a.id="_DymoLabelFrameworkJslSafariPlugin";a.width=1;a.height=1;a.hidden=!0;document.body.appendChild(a)}return window._DymoLabelFrameworkJslSafariPlugin}
function Ve(a){if(!document.getElementById("_DymoLabelFrameworkJslPlugin")){var b=document.createElement("embed");b.type="application/x-dymolabel";b.id="_DymoLabelFrameworkJslPlugin";a?(b.width=1,b.height=1,b.hidden=!0):(b.width=0,b.height=0,b.hidden=!1);document.body.appendChild(b)}return document.getElementById("_DymoLabelFrameworkJslPlugin")}function We(){var a=Ve(!0);a.getPrinters||(document.body.removeChild(a),a=Ve(!1));return a}
function Xe(a){if(!document.getElementById("_DymoLabelFrameworkJslPlugin")){var b=document.createElement("embed");b.type="application/x-npapi-dymolabel";b.id="_DymoLabelFrameworkJslPlugin";a?(b.width=1,b.height=1,b.hidden=!0):(b.width=0,b.height=0,b.hidden=!1);document.body.appendChild(b);b.getPrinters||(b.width=1,b.height=1,b.hidden=!1)}return document.getElementById("_DymoLabelFrameworkJslPlugin")}function Ye(){var a=Xe(!0);a.getPrinters||(document.body.removeChild(a),a=Xe(!1));return a}
function Ze(){var a=new ActiveXObject("DYMOLabelFrameworkIEPlugin.Plugin");if("object"!=typeof a)throw Error("createFramework(): unable to create DYMO.Label.Framework object. Check DYMO Label Framework is installed");return a}
function $e(a){function b(a){return function(){var b=arguments;return new G(function(d){d(a.apply(null,b))})}}if(""!=a.errorDetails)throw Error(a.L);if(a.isWebServicePresent){var d=new Wd;if(d)a={getPrinters:function(){return d.getPrinters()},openLabelFile:function(a){return d.openLabelFile(a)},printLabel:function(a,b,e,f){d.printLabel(a,b,e,f)},printLabel2:function(a,b,e,f){d.printLabel2(a,b,e,f)},renderLabel:function(a,b,e){return d.renderLabel(a,b,e)},loadImageAsPngBase64:function(a){return d.loadImageAsPngBase64(a)},
getJobStatus:function(a,b){var e;t(d.getJobStatus)?e=Se(d.getJobStatus(a,parseInt(b,10))):e={status:P.T,statusMessage:"not implemented"};return new Re(a,b,e.status,e.statusMessage)},U:function(){return d.U()},W:function(a){return d.W(a)},Y:function(a,b,e,f){return d.Y(a,b,e,f)},X:function(a,b,e,f){return d.X(a,b,e,f)},Z:function(a,b,e){return d.Z(a,b,e)},V:function(a){return d.V(a)}};else throw Error("Cannot establish connection to the web service. Is DYMO Label Framework installed?");return a}if("ActiveXObject"in
window){a={};var e=Ze();a.getPrinters=function(){return e.GetPrinters()};a.openLabelFile=function(a){return e.OpenLabelFile(a)};a.printLabel=function(a,b,d,f){e.PrintLabel(a,b,d,f)};a.renderLabel=function(a,b,d){return e.RenderLabel(a,b,d)};a.loadImageAsPngBase64=function(a){return e.LoadImageAsPngBase64(a)};a.printLabel2=function(a,b,d,f){if(t(e.PrintLabel2))return e.PrintLabel2(a,b,d,f).toString();e.PrintLabel(a,b,d,f)};a.getJobStatus=function(a,b){var d;t(e.GetJobStatus)?d=Se(e.GetJobStatus(a,
parseInt(b,10))):d={status:P.T,statusMessage:"not implemented"};return new Re(a,b,d.status,d.statusMessage)}}else if(-1!=navigator.platform.indexOf("Win")){var f=We();if(f)a={getPrinters:function(){return f.getPrinters()},openLabelFile:function(a){return f.openLabelFile(a)},printLabel:function(a,b,d,e){f.printLabel(a,b,d,e)},renderLabel:function(a,b,d){return f.renderLabel(a,b,d)},loadImageAsPngBase64:function(a){return f.loadImageAsPngBase64(a)},printLabel2:function(a,b,d,e){if(t(f.printLabel2))return f.printLabel2(a,
b,d,e).toString();f.printLabel(a,b,d,e)},getJobStatus:function(a,b){var d;t(f.getJobStatus)?d=Se(f.getJobStatus(a,parseInt(b,10))):d={status:P.T,statusMessage:"not implemented"};return new Re(a,b,d.status,d.statusMessage)}};else throw Error("DYMO Label Framework is not installed");}else{var g;Te("application/x-dymolabel")?g=Ue():g=Ye();if(g)a={getPrinters:function(){return g.getPrinters()},openLabelFile:function(a){var b=g.openLabelFile(a);if(!b)throw Error("Unable to open label file '"+a+"'");return b},
printLabel:function(a,b,d,e){g.printLabel(d,a,b,e)},renderLabel:function(a,b,d){return g.renderLabel(a,b,d)},loadImageAsPngBase64:function(a){var b=g.loadImageAsPngBase64(a);if(!b)throw Error("Unable to load image from uri '"+a+"'");return b},printLabel2:function(a,b,d,e){if(t(g.printLabel2))return g.printLabel2(d,a,b,e).toString();g.printLabel(d,a,b,e)},getJobStatus:function(a,b){var d;t(g.getJobStatus)?d=Se(g.getJobStatus(a,parseInt(b,10))):d={status:P.T,statusMessage:"not implemented"};return new Re(a,
b,d.status,d.statusMessage)}};else throw Error("DYMO Label Framework is not installed");}a.U=b(a.getPrinters);a.W=b(a.openLabelFile);a.Y=b(a.printLabel);a.X=b(a.printLabel2);a.Z=b(a.renderLabel);a.V=b(a.loadImageAsPngBase64);return a}var af=0;function bf(a){function b(){throw d;}var d=a||Error("DYMO Label Framework Plugin or WebService are not installed");return{getPrinters:b,openLabelFile:b,printLabel:b,printLabel2:b,renderLabel:b,loadImageAsPngBase64:b,getJobStatus:b,U:b,W:b,Y:b,X:b,Z:b,V:b}}
var Y=function(){function a(e,f){if(d)throw Error("DYMO Label Framework service discovery is in progress.");return b?(e&&e(),b):this&&this.constructor==a?(d=!0,Y.c=function(){b=null;af=0},cf(function(a){try{b=$e(a),af=a.isWebServicePresent?2:1}catch(h){if(!f)throw h;b=bf(h)}finally{d=!1}e&&e()},f),b):new a(e,f)}var b,d=!1;return a}();v("dymo.label.framework.init",function(a){Y(a,!0)});function df(a,b,d,e,f){this.printerType=a;this.name=b;this.modelName=d;this.isConnected=e;this.isLocal=f;this.c=this.C=""}function ef(a,b,d,e,f){df.call(this,"LabelWriterPrinter",a,b,d,e);this.isTwinTurbo=f}x(ef,df);function ff(a,b,d,e,f){df.call(this,"TapePrinter",a,b,d,e);this.isAutoCutSupported=f}x(ff,df);function gf(a,b,d,e,f){df.call(this,"DZPrinter",a,b,d,e);this.isAutoCutSupported=f}x(gf,df);function Z(a,b){this.c=a;this.f=b}Z.prototype.h=function(){return this.c.name};Z.prototype.getPrinterName=Z.prototype.h;Z.prototype.i=function(){return this.f};Z.prototype.getJobId=Z.prototype.i;Z.prototype.w=function(a){if(""!=this.c.C)hf(this,a);else{var b;try{b=Y().getJobStatus(this.c.name,this.f)}catch(d){b=new Re(this.h(),this.f,P.ea,d.message||d)}a(b)}};Z.prototype.getStatus=Z.prototype.w;
function hf(a,b){var d=a.h(),e=a.f,f=a.c.C;(new Je(Ed(f,"getPrintJobStatus"),"callback")).send({jobId:e,printerName:a.c.c},function(a){b(new Re(d,e,a.status,a.statusMessage))},function(){b(new Re(d,e,P.ea,'Error processing getPrintJobStatus(): Unable to contact "'+f+'"'))})};v("dymo.label.framework.VERSION","2.0.0");
function cf(a,b){function d(){f.Fa=!1;var b=window.navigator.platform;if(-1!=b.indexOf("Win"))if("ActiveXObject"in window){f.ia=!0;try{"object"!=typeof new ActiveXObject("DYMOLabelFrameworkIEPlugin.Plugin")?f.L="Unable to create DYMO.Label.Framework ActiveX object. Check that DYMO.Label.Framework is installed":f.fa=!0}catch(d){f.L="Unable to create DYMO.Label.Framework ActiveX object. Check that DYMO.Label.Framework is installed. Exception details: "+d}}else f.ia=!0,Te("application/x-dymolabel")?
f.fa=!0:f.L="DYMO Label Framework Plugin is not installed";else-1!=b.indexOf("Mac")?(f.ia=!0,Te("application/x-dymolabel")?(b=Ue(),"2.0"<=b.GetAPIVersion()?f.fa=!0:f.L="DYMO Label Safari Plugin is installed but outdated. Install the latest version."):Te("application/x-npapi-dymolabel")?(b=Ye())&&b.getPrinters?f.fa=!0:f.L='DYMO NSAPI plugin is loaded but no callable functions found. If running Safari, then run it in 64-bit mode (MacOS X >= 10.7) or set "Open using Rosetta" option':f.L="DYMO Label Plugin is not installed."):
f.L="The operating system is not supported.";a&&a(f)}function e(){f.isBrowserSupported=!0;f.isFrameworkInstalled=!0;f.isWebServicePresent=!0;a&&a(f)}var f={isBrowserSupported:!1,isFrameworkInstalled:!1,isWebServicePresent:!1,errorDetails:""};if(af)return 2==af?e():(f.isBrowserSupported=!0,f.isFrameworkInstalled=!0,f.isWebServicePresent=!1,a&&a(f)),f;var g=Pd();b?g?hd("https://localhost:"+g+"/DYMO/DLS/Printing/StatusConnected",function(a){pd(a.target)?e():(Od(null),Sd(e,d))},"GET",void 0):Sd(e,d):
(g=g||41951,Rd(g)?(Od(g),e(),af||Y.c&&Y.c()):(Od(null),d()));return f}v("dymo.label.framework.checkEnvironment",cf);var jf={};function kf(a,b,d){this.c=a;this.f=b;this.h=d}kf.prototype.getPrinters=function(){var a=lf(this.h),b=new O(this.c),d=this.f;""==d&&(d=b.c);for(b=0;b<a.length;++b){var e=a[b],f=e.name;e.name=f+" @ "+d;e.C=this.c;e.location=d;e.c=f;e.printerUri=e.C;e.location=e.location;e.localName=e.c}return a};
v("dymo.label.framework.addPrinterUri",function(a,b,d,e){var f=b||"";q(f)||(f=f.toString());b=null;e&&(b=function(){e(a)});var g=$c(a);(new Je(g,"callback")).send(null,function(b){jf[a]=new kf(a,f,b);d&&d(a)},b)});v("dymo.label.framework.removePrinterUri",function(a){delete jf[a]});v("dymo.label.framework.removeAllPrinterUri",function(){jf={}});
function lf(a){function b(a,b){return S(T(a,b))}var d=Q(a);a=[];for(var e=T(d,"Printers"),d=e.getElementsByTagName("LabelWriterPrinter"),f=0;f<d.length;f++){var g=b(d[f],"Name"),h=b(d[f],"ModelName"),k="True"==b(d[f],"IsConnected"),m="True"==b(d[f],"IsLocal"),r="True"==b(d[f],"IsTwinTurbo"),g=new ef(g,h,k,m,r);a[f]=g;a[g.name]=g}r=e.getElementsByTagName("TapePrinter");for(f=0;f<r.length;f++){var g=b(r[f],"Name"),h=b(r[f],"ModelName"),k="True"==b(r[f],"IsConnected"),m="True"==b(r[f],"IsLocal"),z="True"==
b(r[f],"IsAutoCutSupported"),g=new ff(g,h,k,m,z);a[f+d.length]=g;a[g.name]=g}e=e.getElementsByTagName("DZPrinter");for(f=0;f<e.length;f++)g=b(e[f],"Name"),h=b(e[f],"ModelName"),k="True"==b(e[f],"IsConnected"),m="True"==b(e[f],"IsLocal"),z="True"==b(e[f],"IsAutoCutSupported"),g=new gf(g,h,k,m,z),a[f+d.length]=g,a[g.name]=g;return a}
function mf(){var a=[];try{var b=Y().getPrinters(),a=lf(b)}catch(d){}for(var e in jf)for(var b=jf[e].getPrinters(),f=0;f<b.length;++f){var g=b[f];a.push(g);a[g.name]=g}return a}v("dymo.label.framework.getPrinters",mf);function nf(){return Y().U().then(function(a){var b=[];try{b=lf(a)}catch(d){}for(var e in jf){a=jf[e].getPrinters();for(var f=0;f<a.length;++f){var g=a[f];b.push(g);b[g.name]=g}}return b})}v("dymo.label.framework.getPrintersAsync",nf);
function of(a){for(var b=[],d=mf(),e=0;e<d.length;e++){var f=d[e];f.printerType&&f.printerType==a&&b.push(f)}return b}function pf(a){return nf().then(function(b){for(var d=[],e=0;e<b.length;e++){var f=b[e];f.printerType&&f.printerType==a&&d.push(f)}return d})}v("dymo.label.framework.getLabelWriterPrinters",function(){return of("LabelWriterPrinter")});v("dymo.label.framework.getTapePrinters",function(){return of("TapePrinter")});v("dymo.label.framework.getDZPrinters",function(){return of("DZPrinter")});
v("dymo.label.framework.getLabelWriterPrintersAsync",function(){return pf("LabelWriterPrinter")});v("dymo.label.framework.getTapePrintersAsync",function(){return pf("TapePrinter")});v("dymo.label.framework.getDZPrintersAsync",function(){return pf("DZPrinter")});v("dymo.label.framework.openLabelFile",function(a){return new X(Y().openLabelFile(a))});v("dymo.label.framework.openLabelFileAsync",function(a){return Y().W(a).then(function(a){return new X(a)})});
v("dymo.label.framework.openLabelXml",function(a){var b=new Fc("dymo.label.framework");b.c=Jc;b.log(Jc,a,void 0);return new X(a)});function ge(a,b,d,e){b=b||"";e=e||"";"string"!=typeof e&&(e=e.toString());if("undefined"==typeof d)throw Error("printLabel(): labelXml parameter should be specified");"string"!=typeof d&&(d=d.toString());var f=mf()[a];if(null!=f)""!=f.C?qf(f,b,d,e):Y().printLabel(f.name,b,d,e);else throw Error("printLabel(): unknown printer '"+a+"'");}
v("dymo.label.framework.printLabel",ge);function he(a,b,d,e){b=b||"";e=e||"";"string"!=typeof e&&(e=e.toString());if("undefined"==typeof d)throw Error("printLabelAsync(): labelXml parameter should be specified");"string"!=typeof d&&(d=d.toString());return nf().then(function(f){f=f[a];if(null!=f)return""!=f.C?qf(f,b,d,e):Y().Y(f.name,b,d,e);throw Error("printLabelAsync(): unknown printer '"+a+"'");})}v("dymo.label.framework.printLabelAsync",he);
function ie(a,b,d,e){b=b||"";e=e||"";"string"!=typeof e&&(e=e.toString());if("undefined"==typeof d)throw Error("printLabel2(): labelXml parameter should be specified");"string"!=typeof d&&(d=d.toString());var f=mf()[a];if(null!=f)return""!=f.C?qf(f,b,d,e):new Z(f,Y().printLabel2(a,b,d,e));throw Error("printLabel(): unknown printer '"+a+"'");}v("dymo.label.framework.printLabel2",ie);
function je(a,b,d,e){b=b||"";e=e||"";"string"!=typeof e&&(e=e.toString());if("undefined"==typeof d)throw Error("printLabel2Async(): labelXml parameter should be specified");"string"!=typeof d&&(d=d.toString());return nf().then(function(f){var g=f[a];if(null!=g)return""!=g.C?qf(g,b,d,e):Y().X(a,b,d,e).then(function(a){return new Z(g,a)});throw Error("printLabel2Async(): unknown printer '"+a+"'");})}v("dymo.label.framework.printLabel2Async",je);
function qf(a,b,d,e){function f(a,b){var d=4E3*a,e="";d>=k.length?a=-1:e=k.substr(d,4E3);(new Je(h,"c")).send({j:g,cid:a,pl:e},function(d){var e=d.status,h=new Fc("dymo.label.framework");h.c=Jc;0==e?-1!=a?f(++a,0):h.log(Jc,"Finished sending job payload for "+g,void 0):-5==e?10>b?f(++d.lastAckChunkId,++b):h.log(Ic,'Unable to send print job data for "'+g+'": STATUS_INVALID_CHUNK_ID: Max retry count reached',void 0):10>b?f(a,++b):h.log(Ic,'Unable to send print job data for "'+g+'": Max retry count reached',
void 0)},function(){var d=new Fc("dymo.label.framework");d.c=Jc;10>b?f(a,++b):d.log(Ic,'Unable to send print job data for "'+g+'": error: Max retry count reached',void 0)})}var g=Qe();b={printerName:a.c,labelXml:d,printParamsXml:b,labelSetXml:e};var h=Ed(a.C,"pl"),k=qc(b);f(0,0);return new Z(a,g)}function ke(a,b,d,e,f,g){function h(a){if(f(k,a)){var b=new Oe(function(){k.w(h);Nb(b)},g);Pe(b)}}var k=ie(a,b,d,e);k.w(h);return k}v("dymo.label.framework.printLabelAndPollStatus",ke);
function le(a,b,d,e,f,g){return je(a,b,d,e).then(function(a){function b(d){if(f(a,d)){var e=new Oe(function(){a.w(b);Nb(e)},g);Pe(e)}}a.w(b);return a})}v("dymo.label.framework.printLabelAndPollStatusAsync",le);function ee(a,b,d){if("undefined"==typeof a)throw Error("renderLabel(): labelXml parameter should be specified");"string"!=typeof a&&(a=a.toString());b=b||"";d=d||"";return Y().renderLabel(a,b,d)}v("dymo.label.framework.renderLabel",ee);
function fe(a,b,d){if("undefined"==typeof a)throw Error("renderLabelAsync(): labelXml parameter should be specified");"string"!=typeof a&&(a=a.toString());b=b||"";d=d||"";return Y().Z(a,b,d)}v("dymo.label.framework.renderLabelAsync",fe);v("dymo.label.framework.loadImageAsPngBase64",function(a){return Y().loadImageAsPngBase64(a)});v("dymo.label.framework.loadImageAsPngBase64Async",function(a){return Y().V(a)});
v("dymo.label.framework.createLabelWriterPrintParamsXml",function(a){if(!a)return"";var b=Q("<LabelWriterPrintParams/>"),d=b.documentElement;a.copies&&R(d,"Copies",a.copies.toString());a.jobTitle&&R(d,"JobTitle",a.jobTitle);a.flowDirection&&R(d,"FlowDirection",a.flowDirection);a.printQuality&&R(d,"PrintQuality",a.printQuality);a.twinTurboRoll&&R(d,"TwinTurboRoll",a.twinTurboRoll);return ce(b)});
v("dymo.label.framework.createTapePrintParamsXml",function(a){if(!a)return"";var b=Q("<TapePrintParams/>"),d=b.documentElement;a.copies&&R(d,"Copies",a.copies.toString());a.jobTitle&&R(d,"JobTitle",a.jobTitle);a.flowDirection&&R(d,"FlowDirection",a.flowDirection);a.alignment&&R(d,"Alignment",a.alignment);a.cutMode&&R(d,"CutMode",a.cutMode);return ce(b)});
v("dymo.label.framework.createDZPrintParamsXml",function(a){if(!a)return"";var b=Q("<DZPrintParams/>"),d=b.documentElement;a.copies&&R(d,"Copies",a.copies.toString());a.jobTitle&&R(d,"JobTitle",a.jobTitle);a.flowDirection&&R(d,"FlowDirection",a.flowDirection);a.alignment&&R(d,"Alignment",a.alignment);a.cutMode&&R(d,"CutMode",a.cutMode);return ce(b)});
v("dymo.label.framework.createLabelRenderParamsXml",function(a){function b(a,b){R(e,a,void 0,{Alpha:b.a||b.alpha||255,Red:b.r||b.red||0,Green:b.g||b.green||0,Blue:b.b||b.blue||0})}if(!a)return"";var d=Q("<LabelRenderParams/>"),e=d.documentElement;a.labelColor&&b("LabelColor",a.labelColor);a.shadowColor&&b("ShadowColor",a.shadowColor);"undefined"!=typeof a.shadowDepth&&R(e,"ShadowDepth",a.shadowDepth.toString());a.flowDirection&&R(e,"FlowDirection",a.flowDirection);"undefined"!=typeof a.pngUseDisplayResolution&&
R(e,"PngUseDisplayResolution",a.pngUseDisplayResolution?"True":"False");return ce(d)});})();
