ablok-components 0.1.37 → 0.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27257,7 +27257,7 @@ const pV = /* @__PURE__ */ $A({
27257
27257
  props: {
27258
27258
  url: {
27259
27259
  type: String,
27260
- default: `${location.origin}${location.pathname}`
27260
+ default: ""
27261
27261
  },
27262
27262
  subject: String,
27263
27263
  hashtags: Array,
@@ -181,4 +181,4 @@ function print() { __p += __j.call(arguments, '') }
181
181
  content: "" !important;
182
182
  display: none !important;
183
183
  }`,FO=function(t){UO(t,"."+Qf+QO+Lw+`
184
- .`+Ef+EO+Lw)},UO=function(t,A){var e=t.ownerDocument;if(e){var n=e.createElement("style");n.textContent=A,t.appendChild(n)}},_w=function(){function t(){}return t.getOrigin=function(A){var e=t._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},t.isSameOrigin=function(A){return t.getOrigin(A)===t._origin},t.setContext=function(A){t._link=A.document.createElement("a"),t._origin=t.getOrigin(A.location.href)},t._origin="about:blank",t}(),bO=function(){function t(A,e){this.context=A,this._options=e,this._cache={}}return t.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(Uf(A)||TO(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},t.prototype.match=function(A){return this._cache[A]},t.prototype.loadImage=function(A){return rt(this,void 0,void 0,function(){var e,n,r,i,s=this;return Xe(this,function(a){switch(a.label){case 0:return e=_w.isSameOrigin(A),n=!Ff(A)&&this._options.useCORS===!0&&De.SUPPORT_CORS_IMAGES&&!e,r=!Ff(A)&&!e&&!Uf(A)&&typeof this._options.proxy=="string"&&De.SUPPORT_CORS_XHR&&!n,!e&&this._options.allowTaint===!1&&!Ff(A)&&!Uf(A)&&!r&&!n?[2]:(i=A,r?[4,this.proxy(i)]:[3,2]);case 1:i=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(c,u){var d=new Image;d.onload=function(){return c(d)},d.onerror=u,(xO(i)||n)&&(d.crossOrigin="anonymous"),d.src=i,d.complete===!0&&setTimeout(function(){return c(d)},500),s._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},t.prototype.has=function(A){return typeof this._cache[A]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(A){var e=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(i,s){var a=De.SUPPORT_RESPONSE_TYPE?"blob":"text",c=new XMLHttpRequest;c.onload=function(){if(c.status===200)if(a==="text")i(c.response);else{var p=new FileReader;p.addEventListener("load",function(){return i(p.result)},!1),p.addEventListener("error",function(B){return s(B)},!1),p.readAsDataURL(c.response)}else s("Failed to proxy resource "+r+" with status code "+c.status)},c.onerror=s;var u=n.indexOf("?")>-1?"&":"?";if(c.open("GET",""+n+u+"url="+encodeURIComponent(A)+"&responseType="+a),a!=="text"&&c instanceof XMLHttpRequest&&(c.responseType=a),e._options.imageTimeout){var d=e._options.imageTimeout;c.timeout=d,c.ontimeout=function(){return s("Timed out ("+d+"ms) proxying "+r)}}c.send()})},t}(),vO=/^data:image\/svg\+xml/i,IO=/^data:image\/.*;base64,/i,SO=/^data:image\/.*/i,TO=function(t){return De.SUPPORT_SVG_DRAWING||!HO(t)},Ff=function(t){return SO.test(t)},xO=function(t){return IO.test(t)},Uf=function(t){return t.substr(0,4)==="blob"},HO=function(t){return t.substr(-3).toLowerCase()==="svg"||vO.test(t)},Z=function(){function t(A,e){this.type=0,this.x=A,this.y=e}return t.prototype.add=function(A,e){return new t(this.x+A,this.y+e)},t}(),Ji=function(t,A,e){return new Z(t.x+(A.x-t.x)*e,t.y+(A.y-t.y)*e)},tl=function(){function t(A,e,n,r){this.type=1,this.start=A,this.startControl=e,this.endControl=n,this.end=r}return t.prototype.subdivide=function(A,e){var n=Ji(this.start,this.startControl,A),r=Ji(this.startControl,this.endControl,A),i=Ji(this.endControl,this.end,A),s=Ji(n,r,A),a=Ji(r,i,A),c=Ji(s,a,A);return e?new t(this.start,n,s,c):new t(c,a,i,this.end)},t.prototype.add=function(A,e){return new t(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),Vt=function(t){return t.type===1},LO=function(){function t(A){var e=A.styles,n=A.bounds,r=qs(e.borderTopLeftRadius,n.width,n.height),i=r[0],s=r[1],a=qs(e.borderTopRightRadius,n.width,n.height),c=a[0],u=a[1],d=qs(e.borderBottomRightRadius,n.width,n.height),p=d[0],B=d[1],m=qs(e.borderBottomLeftRadius,n.width,n.height),C=m[0],E=m[1],S=[];S.push((i+c)/n.width),S.push((C+p)/n.width),S.push((s+E)/n.height),S.push((u+B)/n.height);var U=Math.max.apply(Math,S);U>1&&(i/=U,s/=U,c/=U,u/=U,p/=U,B/=U,C/=U,E/=U);var v=n.width-c,M=n.height-B,F=n.width-p,T=n.height-E,L=e.borderTopWidth,N=e.borderRightWidth,W=e.borderBottomWidth,$=e.borderLeftWidth,eA=YA(e.paddingTop,A.bounds.width),gA=YA(e.paddingRight,A.bounds.width),wA=YA(e.paddingBottom,A.bounds.width),aA=YA(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?te(n.left+$/3,n.top+L/3,i-$/3,s-L/3,NA.TOP_LEFT):new Z(n.left+$/3,n.top+L/3),this.topRightBorderDoubleOuterBox=i>0||s>0?te(n.left+v,n.top+L/3,c-N/3,u-L/3,NA.TOP_RIGHT):new Z(n.left+n.width-N/3,n.top+L/3),this.bottomRightBorderDoubleOuterBox=p>0||B>0?te(n.left+F,n.top+M,p-N/3,B-W/3,NA.BOTTOM_RIGHT):new Z(n.left+n.width-N/3,n.top+n.height-W/3),this.bottomLeftBorderDoubleOuterBox=C>0||E>0?te(n.left+$/3,n.top+T,C-$/3,E-W/3,NA.BOTTOM_LEFT):new Z(n.left+$/3,n.top+n.height-W/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?te(n.left+$*2/3,n.top+L*2/3,i-$*2/3,s-L*2/3,NA.TOP_LEFT):new Z(n.left+$*2/3,n.top+L*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?te(n.left+v,n.top+L*2/3,c-N*2/3,u-L*2/3,NA.TOP_RIGHT):new Z(n.left+n.width-N*2/3,n.top+L*2/3),this.bottomRightBorderDoubleInnerBox=p>0||B>0?te(n.left+F,n.top+M,p-N*2/3,B-W*2/3,NA.BOTTOM_RIGHT):new Z(n.left+n.width-N*2/3,n.top+n.height-W*2/3),this.bottomLeftBorderDoubleInnerBox=C>0||E>0?te(n.left+$*2/3,n.top+T,C-$*2/3,E-W*2/3,NA.BOTTOM_LEFT):new Z(n.left+$*2/3,n.top+n.height-W*2/3),this.topLeftBorderStroke=i>0||s>0?te(n.left+$/2,n.top+L/2,i-$/2,s-L/2,NA.TOP_LEFT):new Z(n.left+$/2,n.top+L/2),this.topRightBorderStroke=i>0||s>0?te(n.left+v,n.top+L/2,c-N/2,u-L/2,NA.TOP_RIGHT):new Z(n.left+n.width-N/2,n.top+L/2),this.bottomRightBorderStroke=p>0||B>0?te(n.left+F,n.top+M,p-N/2,B-W/2,NA.BOTTOM_RIGHT):new Z(n.left+n.width-N/2,n.top+n.height-W/2),this.bottomLeftBorderStroke=C>0||E>0?te(n.left+$/2,n.top+T,C-$/2,E-W/2,NA.BOTTOM_LEFT):new Z(n.left+$/2,n.top+n.height-W/2),this.topLeftBorderBox=i>0||s>0?te(n.left,n.top,i,s,NA.TOP_LEFT):new Z(n.left,n.top),this.topRightBorderBox=c>0||u>0?te(n.left+v,n.top,c,u,NA.TOP_RIGHT):new Z(n.left+n.width,n.top),this.bottomRightBorderBox=p>0||B>0?te(n.left+F,n.top+M,p,B,NA.BOTTOM_RIGHT):new Z(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=C>0||E>0?te(n.left,n.top+T,C,E,NA.BOTTOM_LEFT):new Z(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||s>0?te(n.left+$,n.top+L,Math.max(0,i-$),Math.max(0,s-L),NA.TOP_LEFT):new Z(n.left+$,n.top+L),this.topRightPaddingBox=c>0||u>0?te(n.left+Math.min(v,n.width-N),n.top+L,v>n.width+N?0:Math.max(0,c-N),Math.max(0,u-L),NA.TOP_RIGHT):new Z(n.left+n.width-N,n.top+L),this.bottomRightPaddingBox=p>0||B>0?te(n.left+Math.min(F,n.width-$),n.top+Math.min(M,n.height-W),Math.max(0,p-N),Math.max(0,B-W),NA.BOTTOM_RIGHT):new Z(n.left+n.width-N,n.top+n.height-W),this.bottomLeftPaddingBox=C>0||E>0?te(n.left+$,n.top+Math.min(T,n.height-W),Math.max(0,C-$),Math.max(0,E-W),NA.BOTTOM_LEFT):new Z(n.left+$,n.top+n.height-W),this.topLeftContentBox=i>0||s>0?te(n.left+$+aA,n.top+L+eA,Math.max(0,i-($+aA)),Math.max(0,s-(L+eA)),NA.TOP_LEFT):new Z(n.left+$+aA,n.top+L+eA),this.topRightContentBox=c>0||u>0?te(n.left+Math.min(v,n.width+$+aA),n.top+L+eA,v>n.width+$+aA?0:c-$+aA,u-(L+eA),NA.TOP_RIGHT):new Z(n.left+n.width-(N+gA),n.top+L+eA),this.bottomRightContentBox=p>0||B>0?te(n.left+Math.min(F,n.width-($+aA)),n.top+Math.min(M,n.height+L+eA),Math.max(0,p-(N+gA)),B-(W+wA),NA.BOTTOM_RIGHT):new Z(n.left+n.width-(N+gA),n.top+n.height-(W+wA)),this.bottomLeftContentBox=C>0||E>0?te(n.left+$+aA,n.top+T,Math.max(0,C-($+aA)),E-(W+wA),NA.BOTTOM_LEFT):new Z(n.left+$+aA,n.top+n.height-(W+wA))}return t}(),NA;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(NA||(NA={}));var te=function(t,A,e,n,r){var i=4*((Math.sqrt(2)-1)/3),s=e*i,a=n*i,c=t+e,u=A+n;switch(r){case NA.TOP_LEFT:return new tl(new Z(t,u),new Z(t,u-a),new Z(c-s,A),new Z(c,A));case NA.TOP_RIGHT:return new tl(new Z(t,A),new Z(t+s,A),new Z(c,u-a),new Z(c,u));case NA.BOTTOM_RIGHT:return new tl(new Z(c,A),new Z(c,A+a),new Z(t+s,u),new Z(t,u));case NA.BOTTOM_LEFT:default:return new tl(new Z(c,u),new Z(c-s,u),new Z(t,A+a),new Z(t,A))}},nl=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},_O=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},rl=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},OO=function(){function t(A,e,n){this.offsetX=A,this.offsetY=e,this.matrix=n,this.type=0,this.target=6}return t}(),il=function(){function t(A,e){this.path=A,this.target=e,this.type=1}return t}(),MO=function(){function t(A){this.opacity=A,this.type=2,this.target=6}return t}(),DO=function(t){return t.type===0},Ow=function(t){return t.type===1},kO=function(t){return t.type===2},Mw=function(t,A){return t.length===A.length?t.some(function(e,n){return e===A[n]}):!1},NO=function(t,A,e,n,r){return t.map(function(i,s){switch(s){case 0:return i.add(A,e);case 1:return i.add(A+n,e);case 2:return i.add(A+n,e+r);case 3:return i.add(A,e+r)}return i})},Dw=function(){function t(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),kw=function(){function t(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new LO(this.container),this.container.styles.opacity<1&&this.effects.push(new MO(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new OO(n,r,i))}if(this.container.styles.overflowX!==0){var s=nl(this.curves),a=rl(this.curves);Mw(s,a)?this.effects.push(new il(s,6)):(this.effects.push(new il(s,2)),this.effects.push(new il(a,4)))}}return t.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(c){return!Ow(c)});if(e||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,i),e=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var s=nl(n.curves),a=rl(n.curves);Mw(s,a)||r.unshift(new il(a,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(c){return Ee(c.target,A)})},t}(),bf=function(t,A,e,n){t.container.elements.forEach(function(r){var i=Ee(r.flags,4),s=Ee(r.flags,2),a=new kw(r,t);Ee(r.styles.display,2048)&&n.push(a);var c=Ee(r.flags,8)?[]:n;if(i||s){var u=i||r.styles.isPositioned()?e:A,d=new Dw(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var p=r.styles.zIndex.order;if(p<0){var B=0;u.negativeZIndex.some(function(C,E){return p>C.element.container.styles.zIndex.order?(B=E,!1):B>0}),u.negativeZIndex.splice(B,0,d)}else if(p>0){var m=0;u.positiveZIndex.some(function(C,E){return p>=C.element.container.styles.zIndex.order?(m=E+1,!1):m>0}),u.positiveZIndex.splice(m,0,d)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else r.styles.isFloating()?u.nonPositionedFloats.push(d):u.nonPositionedInlineLevel.push(d);bf(a,d,i?d:e,c)}else r.styles.isInlineLevel()?A.inlineLevel.push(a):A.nonInlineLevel.push(a),bf(a,A,e,c);Ee(r.flags,8)&&Nw(r,c)})},Nw=function(t,A){for(var e=t instanceof pf?t.start:1,n=t instanceof pf?t.reversed:!1,r=0;r<A.length;r++){var i=A[r];i.container instanceof cw&&typeof i.container.value=="number"&&i.container.value!==0&&(e=i.container.value),i.listValue=no(e,i.container.styles.listStyleType,!0),e+=n?-1:1}},RO=function(t){var A=new kw(t,null),e=new Dw(A),n=[];return bf(A,e,e,n),Nw(A.container,n),e},Rw=function(t,A){switch(A){case 0:return Pt(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Pt(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Pt(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return Pt(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},KO=function(t,A){switch(A){case 0:return Pt(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Pt(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Pt(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return Pt(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},VO=function(t,A){switch(A){case 0:return Pt(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Pt(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Pt(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return Pt(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},PO=function(t,A){switch(A){case 0:return sl(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return sl(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return sl(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return sl(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},sl=function(t,A){var e=[];return Vt(t)?e.push(t.subdivide(.5,!1)):e.push(t),Vt(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},Pt=function(t,A,e,n){var r=[];return Vt(t)?r.push(t.subdivide(.5,!1)):r.push(t),Vt(e)?r.push(e.subdivide(.5,!0)):r.push(e),Vt(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),Vt(A)?r.push(A.subdivide(.5,!1).reverse()):r.push(A),r},Kw=function(t){var A=t.bounds,e=t.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},ol=function(t){var A=t.styles,e=t.bounds,n=YA(A.paddingLeft,e.width),r=YA(A.paddingRight,e.width),i=YA(A.paddingTop,e.width),s=YA(A.paddingBottom,e.width);return e.add(n+A.borderLeftWidth,i+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+n+r),-(A.borderTopWidth+A.borderBottomWidth+i+s))},GO=function(t,A){return t===0?A.bounds:t===2?ol(A):Kw(A)},WO=function(t,A){return t===0?A.bounds:t===2?ol(A):Kw(A)},vf=function(t,A,e){var n=GO(Yi(t.styles.backgroundOrigin,A),t),r=WO(Yi(t.styles.backgroundClip,A),t),i=$O(Yi(t.styles.backgroundSize,A),e,n),s=i[0],a=i[1],c=qs(Yi(t.styles.backgroundPosition,A),n.width-s,n.height-a),u=JO(Yi(t.styles.backgroundRepeat,A),c,i,n,r),d=Math.round(n.left+c[0]),p=Math.round(n.top+c[1]);return[u,d,p,s,a]},Xi=function(t){return GA(t)&&t.value===Pi.AUTO},al=function(t){return typeof t=="number"},$O=function(t,A,e){var n=A[0],r=A[1],i=A[2],s=t[0],a=t[1];if(!s)return[0,0];if(ge(s)&&a&&ge(a))return[YA(s,e.width),YA(a,e.height)];var c=al(i);if(GA(s)&&(s.value===Pi.CONTAIN||s.value===Pi.COVER)){if(al(i)){var u=e.width/e.height;return u<i!=(s.value===Pi.COVER)?[e.width,e.width/i]:[e.height*i,e.height]}return[e.width,e.height]}var d=al(n),p=al(r),B=d||p;if(Xi(s)&&(!a||Xi(a))){if(d&&p)return[n,r];if(!c&&!B)return[e.width,e.height];if(B&&c){var m=d?n:r*i,C=p?r:n/i;return[m,C]}var E=d?n:e.width,S=p?r:e.height;return[E,S]}if(c){var U=0,v=0;return ge(s)?U=YA(s,e.width):ge(a)&&(v=YA(a,e.height)),Xi(s)?U=v*i:(!a||Xi(a))&&(v=U/i),[U,v]}var M=null,F=null;if(ge(s)?M=YA(s,e.width):a&&ge(a)&&(F=YA(a,e.height)),M!==null&&(!a||Xi(a))&&(F=d&&p?M/n*r:e.height),F!==null&&Xi(s)&&(M=d&&p?F/r*n:e.width),M!==null&&F!==null)return[M,F];throw new Error("Unable to calculate background-size for element")},Yi=function(t,A){var e=t[A];return typeof e>"u"?t[0]:e},JO=function(t,A,e,n,r){var i=A[0],s=A[1],a=e[0],c=e[1];switch(t){case 2:return[new Z(Math.round(n.left),Math.round(n.top+s)),new Z(Math.round(n.left+n.width),Math.round(n.top+s)),new Z(Math.round(n.left+n.width),Math.round(c+n.top+s)),new Z(Math.round(n.left),Math.round(c+n.top+s))];case 3:return[new Z(Math.round(n.left+i),Math.round(n.top)),new Z(Math.round(n.left+i+a),Math.round(n.top)),new Z(Math.round(n.left+i+a),Math.round(n.height+n.top)),new Z(Math.round(n.left+i),Math.round(n.height+n.top))];case 1:return[new Z(Math.round(n.left+i),Math.round(n.top+s)),new Z(Math.round(n.left+i+a),Math.round(n.top+s)),new Z(Math.round(n.left+i+a),Math.round(n.top+s+c)),new Z(Math.round(n.left+i),Math.round(n.top+s+c))];default:return[new Z(Math.round(r.left),Math.round(r.top)),new Z(Math.round(r.left+r.width),Math.round(r.top)),new Z(Math.round(r.left+r.width),Math.round(r.height+r.top)),new Z(Math.round(r.left),Math.round(r.height+r.top))]}},XO="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Vw="Hidden Text",YO=function(){function t(A){this._data={},this._document=A}return t.prototype.parseMetrics=function(A,e){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),s=this._document.body;n.style.visibility="hidden",n.style.fontFamily=A,n.style.fontSize=e,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",s.appendChild(n),r.src=XO,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=A,i.style.fontSize=e,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(Vw)),n.appendChild(i),n.appendChild(r);var a=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(Vw)),n.style.lineHeight="normal",r.style.verticalAlign="super";var c=r.offsetTop-n.offsetTop+2;return s.removeChild(n),{baseline:a,middle:c}},t.prototype.getMetrics=function(A,e){var n=A+" "+e;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(A,e)),this._data[n]},t}(),Pw=function(){function t(A,e){this.context=A,this.options=e}return t}(),zO=1e4,qO=function(t){sn(A,t);function A(e,n){var r=t.call(this,e,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new YO(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return A.prototype.applyEffects=function(e){for(var n=this;this._activeEffects.length;)this.popEffect();e.forEach(function(r){return n.applyEffect(r)})},A.prototype.applyEffect=function(e){this.ctx.save(),kO(e)&&(this.ctx.globalAlpha=e.opacity),DO(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),Ow(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return rt(this,void 0,void 0,function(){var n;return Xe(this,function(r){switch(r.label){case 0:return n=e.element.container.styles,n.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return rt(this,void 0,void 0,function(){return Xe(this,function(n){switch(n.label){case 0:if(Ee(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(e)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,n,r){var i=this;if(n===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+r);else{var s=hf(e.text);s.reduce(function(a,c){return i.ctx.fillText(c,a,e.bounds.top+r),a+i.ctx.measureText(c).width},e.bounds.left)}},A.prototype.createFontStyle=function(e){var n=e.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),r=tM(e.fontFamily).join(", "),i=zs(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,n,e.fontWeight,i,r].join(" "),r,i]},A.prototype.renderTextNode=function(e,n){return rt(this,void 0,void 0,function(){var r,i,s,a,c,u,d,p,B=this;return Xe(this,function(m){return r=this.createFontStyle(n),i=r[0],s=r[1],a=r[2],this.ctx.font=i,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",c=this.fontMetrics.getMetrics(s,a),u=c.baseline,d=c.middle,p=n.paintOrder,e.textBounds.forEach(function(C){p.forEach(function(E){switch(E){case 0:B.ctx.fillStyle=Se(n.color),B.renderTextWithLetterSpacing(C,n.letterSpacing,u);var S=n.textShadow;S.length&&C.text.trim().length&&(S.slice(0).reverse().forEach(function(U){B.ctx.shadowColor=Se(U.color),B.ctx.shadowOffsetX=U.offsetX.number*B.options.scale,B.ctx.shadowOffsetY=U.offsetY.number*B.options.scale,B.ctx.shadowBlur=U.blur.number,B.renderTextWithLetterSpacing(C,n.letterSpacing,u)}),B.ctx.shadowColor="",B.ctx.shadowOffsetX=0,B.ctx.shadowOffsetY=0,B.ctx.shadowBlur=0),n.textDecorationLine.length&&(B.ctx.fillStyle=Se(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(U){switch(U){case 1:B.ctx.fillRect(C.bounds.left,Math.round(C.bounds.top+u),C.bounds.width,1);break;case 2:B.ctx.fillRect(C.bounds.left,Math.round(C.bounds.top),C.bounds.width,1);break;case 3:B.ctx.fillRect(C.bounds.left,Math.ceil(C.bounds.top+d),C.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&C.text.trim().length&&(B.ctx.strokeStyle=Se(n.webkitTextStrokeColor),B.ctx.lineWidth=n.webkitTextStrokeWidth,B.ctx.lineJoin=window.chrome?"miter":"round",B.ctx.strokeText(C.text,C.bounds.left,C.bounds.top+u)),B.ctx.strokeStyle="",B.ctx.lineWidth=0,B.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,n,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=ol(e),s=rl(n);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return rt(this,void 0,void 0,function(){var n,r,i,s,a,c,v,v,u,d,p,B,F,m,C,T,E,S,U,v,M,F,T;return Xe(this,function(L){switch(L.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,s=0,a=n.textNodes,L.label=1;case 1:return s<a.length?(c=a[s],[4,this.renderTextNode(c,i)]):[3,4];case 2:L.sent(),L.label=3;case 3:return s++,[3,1];case 4:if(!(n instanceof ow))return[3,8];L.label=5;case 5:return L.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return v=L.sent(),this.renderReplacedElement(n,r,v),[3,8];case 7:return L.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof aw&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof lw))return[3,12];L.label=9;case 9:return L.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return v=L.sent(),this.renderReplacedElement(n,r,v),[3,12];case 11:return L.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof hw&&n.tree?(u=new A(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,u.render(n.tree)]):[3,14];case 13:d=L.sent(),n.width&&n.height&&this.ctx.drawImage(d,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),L.label=14;case 14:if(n instanceof gf&&(p=Math.min(n.bounds.width,n.bounds.height),n.type===za?n.checked&&(this.ctx.save(),this.path([new Z(n.bounds.left+p*.39363,n.bounds.top+p*.79),new Z(n.bounds.left+p*.16,n.bounds.top+p*.5549),new Z(n.bounds.left+p*.27347,n.bounds.top+p*.44071),new Z(n.bounds.left+p*.39694,n.bounds.top+p*.5649),new Z(n.bounds.left+p*.72983,n.bounds.top+p*.23),new Z(n.bounds.left+p*.84,n.bounds.top+p*.34085),new Z(n.bounds.left+p*.39363,n.bounds.top+p*.79)]),this.ctx.fillStyle=Se(uw),this.ctx.fill(),this.ctx.restore()):n.type===qa&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+p/2,n.bounds.top+p/2,p/4,0,Math.PI*2,!0),this.ctx.fillStyle=Se(uw),this.ctx.fill(),this.ctx.restore())),ZO(n)&&n.value.length){switch(B=this.createFontStyle(i),F=B[0],m=B[1],C=this.fontMetrics.getMetrics(F,m).baseline,this.ctx.font=F,this.ctx.fillStyle=Se(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=AM(n.styles.textAlign),T=ol(n),E=0,n.styles.textAlign){case 1:E+=T.width/2;break;case 2:E+=T.width;break}S=T.add(E,0,0,-T.height/2+1),this.ctx.save(),this.path([new Z(T.left,T.top),new Z(T.left+T.width,T.top),new Z(T.left+T.width,T.top+T.height),new Z(T.left,T.top+T.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new eo(n.value,S),i.letterSpacing,C),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ee(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(U=n.styles.listStyleImage,U.type!==0)return[3,18];v=void 0,M=U.url,L.label=15;case 15:return L.trys.push([15,17,,18]),[4,this.context.cache.match(M)];case 16:return v=L.sent(),this.ctx.drawImage(v,n.bounds.left-(v.width+10),n.bounds.top),[3,18];case 17:return L.sent(),this.context.logger.error("Error loading list-style-image "+M),[3,18];case 18:return[3,20];case 19:e.listValue&&n.styles.listStyleType!==-1&&(F=this.createFontStyle(i)[0],this.ctx.font=F,this.ctx.fillStyle=Se(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",T=new Dn(n.bounds.left,n.bounds.top+YA(n.styles.paddingTop,n.bounds.width),n.bounds.width,Vm(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new eo(e.listValue,T),i.letterSpacing,Vm(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),L.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return rt(this,void 0,void 0,function(){var n,r,U,i,s,U,a,c,U,u,d,U,p,B,U,m,C,U,E,S,U;return Xe(this,function(v){switch(v.label){case 0:if(Ee(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:v.sent(),n=0,r=e.negativeZIndex,v.label=2;case 2:return n<r.length?(U=r[n],[4,this.renderStack(U)]):[3,5];case 3:v.sent(),v.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:v.sent(),i=0,s=e.nonInlineLevel,v.label=7;case 7:return i<s.length?(U=s[i],[4,this.renderNode(U)]):[3,10];case 8:v.sent(),v.label=9;case 9:return i++,[3,7];case 10:a=0,c=e.nonPositionedFloats,v.label=11;case 11:return a<c.length?(U=c[a],[4,this.renderStack(U)]):[3,14];case 12:v.sent(),v.label=13;case 13:return a++,[3,11];case 14:u=0,d=e.nonPositionedInlineLevel,v.label=15;case 15:return u<d.length?(U=d[u],[4,this.renderStack(U)]):[3,18];case 16:v.sent(),v.label=17;case 17:return u++,[3,15];case 18:p=0,B=e.inlineLevel,v.label=19;case 19:return p<B.length?(U=B[p],[4,this.renderNode(U)]):[3,22];case 20:v.sent(),v.label=21;case 21:return p++,[3,19];case 22:m=0,C=e.zeroOrAutoZIndexOrTransformedOrOpacity,v.label=23;case 23:return m<C.length?(U=C[m],[4,this.renderStack(U)]):[3,26];case 24:v.sent(),v.label=25;case 25:return m++,[3,23];case 26:E=0,S=e.positiveZIndex,v.label=27;case 27:return E<S.length?(U=S[E],[4,this.renderStack(U)]):[3,30];case 28:v.sent(),v.label=29;case 29:return E++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var n=this;e.forEach(function(r,i){var s=Vt(r)?r.start:r;i===0?n.ctx.moveTo(s.x,s.y):n.ctx.lineTo(s.x,s.y),Vt(r)&&n.ctx.bezierCurveTo(r.startControl.x,r.startControl.y,r.endControl.x,r.endControl.y,r.end.x,r.end.y)})},A.prototype.renderRepeat=function(e,n,r,i){this.path(e),this.ctx.fillStyle=n,this.ctx.translate(r,i),this.ctx.fill(),this.ctx.translate(-r,-i)},A.prototype.resizeImage=function(e,n,r){var i;if(e.width===n&&e.height===r)return e;var s=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,a=s.createElement("canvas");a.width=Math.max(1,n),a.height=Math.max(1,r);var c=a.getContext("2d");return c.drawImage(e,0,0,e.width,e.height,0,0,n,r),a},A.prototype.renderBackgroundImage=function(e){return rt(this,void 0,void 0,function(){var n,r,i,s,a,c;return Xe(this,function(u){switch(u.label){case 0:n=e.styles.backgroundImage.length-1,r=function(d){var p,B,m,eA,bA,vA,aA,HA,W,C,eA,bA,vA,aA,HA,E,S,U,v,M,F,T,L,N,W,$,eA,gA,wA,aA,HA,WA,bA,vA,mA,re,ZA,$A,Be,me,Te,jA;return Xe(this,function(fe){switch(fe.label){case 0:if(d.type!==0)return[3,5];p=void 0,B=d.url,fe.label=1;case 1:return fe.trys.push([1,3,,4]),[4,i.context.cache.match(B)];case 2:return p=fe.sent(),[3,4];case 3:return fe.sent(),i.context.logger.error("Error loading background-image "+B),[3,4];case 4:return p&&(m=vf(e,n,[p.width,p.height,p.width/p.height]),eA=m[0],bA=m[1],vA=m[2],aA=m[3],HA=m[4],W=i.ctx.createPattern(i.resizeImage(p,aA,HA),"repeat"),i.renderRepeat(eA,W,bA,vA)),[3,6];case 5:DH(d)?(C=vf(e,n,[null,null,null]),eA=C[0],bA=C[1],vA=C[2],aA=C[3],HA=C[4],E=HH(d.angle,aA,HA),S=E[0],U=E[1],v=E[2],M=E[3],F=E[4],T=document.createElement("canvas"),T.width=aA,T.height=HA,L=T.getContext("2d"),N=L.createLinearGradient(U,M,v,F),xm(d.stops,S).forEach(function(it){return N.addColorStop(it.stop,Se(it.color))}),L.fillStyle=N,L.fillRect(0,0,aA,HA),aA>0&&HA>0&&(W=i.ctx.createPattern(T,"repeat"),i.renderRepeat(eA,W,bA,vA))):kH(d)&&($=vf(e,n,[null,null,null]),eA=$[0],gA=$[1],wA=$[2],aA=$[3],HA=$[4],WA=d.position.length===0?[Zu]:d.position,bA=YA(WA[0],aA),vA=YA(WA[WA.length-1],HA),mA=LH(d,bA,vA,aA,HA),re=mA[0],ZA=mA[1],re>0&&ZA>0&&($A=i.ctx.createRadialGradient(gA+bA,wA+vA,0,gA+bA,wA+vA,re),xm(d.stops,re*2).forEach(function(it){return $A.addColorStop(it.stop,Se(it.color))}),i.path(eA),i.ctx.fillStyle=$A,re!==ZA?(Be=e.bounds.left+.5*e.bounds.width,me=e.bounds.top+.5*e.bounds.height,Te=ZA/re,jA=1/Te,i.ctx.save(),i.ctx.translate(Be,me),i.ctx.transform(1,0,0,Te,0,0),i.ctx.translate(-Be,-me),i.ctx.fillRect(gA,jA*(wA-me)+me,aA,HA*jA),i.ctx.restore()):i.ctx.fill())),fe.label=6;case 6:return n--,[2]}})},i=this,s=0,a=e.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return s<a.length?(c=a[s],[5,r(c)]):[3,4];case 2:u.sent(),u.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,n,r){return rt(this,void 0,void 0,function(){return Xe(this,function(i){return this.path(Rw(r,n)),this.ctx.fillStyle=Se(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,n,r,i){return rt(this,void 0,void 0,function(){var s,a;return Xe(this,function(c){switch(c.label){case 0:return n<3?[4,this.renderSolidBorder(e,r,i)]:[3,2];case 1:return c.sent(),[2];case 2:return s=KO(i,r),this.path(s),this.ctx.fillStyle=Se(e),this.ctx.fill(),a=VO(i,r),this.path(a),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return rt(this,void 0,void 0,function(){var n,r,i,s,a,c,u,d,p=this;return Xe(this,function(B){switch(B.label){case 0:return this.applyEffects(e.getEffects(2)),n=e.container.styles,r=!yr(n.backgroundColor)||n.backgroundImage.length,i=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],s=jO(Yi(n.backgroundClip,0),e.curves),r||n.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),yr(n.backgroundColor)||(this.ctx.fillStyle=Se(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:B.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(m){p.ctx.save();var C=nl(e.curves),E=m.inset?0:zO,S=NO(C,-E+(m.inset?1:-1)*m.spread.number,(m.inset?1:-1)*m.spread.number,m.spread.number*(m.inset?-2:2),m.spread.number*(m.inset?-2:2));m.inset?(p.path(C),p.ctx.clip(),p.mask(S)):(p.mask(C),p.ctx.clip(),p.path(S)),p.ctx.shadowOffsetX=m.offsetX.number+E,p.ctx.shadowOffsetY=m.offsetY.number,p.ctx.shadowColor=Se(m.color),p.ctx.shadowBlur=m.blur.number,p.ctx.fillStyle=m.inset?Se(m.color):"rgba(0,0,0,1)",p.ctx.fill(),p.ctx.restore()}),B.label=2;case 2:a=0,c=0,u=i,B.label=3;case 3:return c<u.length?(d=u[c],d.style!==0&&!yr(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return B.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,a,e.curves,3)];case 6:return B.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,a,e.curves)];case 8:return B.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,a,e.curves)];case 10:B.sent(),B.label=11;case 11:a++,B.label=12;case 12:return c++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,n,r,i,s){return rt(this,void 0,void 0,function(){var a,c,u,d,p,B,m,C,E,S,U,v,M,F,T,L,T,L;return Xe(this,function(N){return this.ctx.save(),a=PO(i,r),c=Rw(i,r),s===2&&(this.path(c),this.ctx.clip()),Vt(c[0])?(u=c[0].start.x,d=c[0].start.y):(u=c[0].x,d=c[0].y),Vt(c[1])?(p=c[1].end.x,B=c[1].end.y):(p=c[1].x,B=c[1].y),r===0||r===2?m=Math.abs(u-p):m=Math.abs(d-B),this.ctx.beginPath(),s===3?this.formatPath(a):this.formatPath(c.slice(0,2)),C=n<3?n*3:n*2,E=n<3?n*2:n,s===3&&(C=n,E=n),S=!0,m<=C*2?S=!1:m<=C*2+E?(U=m/(2*C+E),C*=U,E*=U):(v=Math.floor((m+E)/(C+E)),M=(m-v*C)/(v-1),F=(m-(v+1)*C)/v,E=F<=0||Math.abs(E-M)<Math.abs(E-F)?M:F),S&&(s===3?this.ctx.setLineDash([0,C+E]):this.ctx.setLineDash([C,E])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=Se(e),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(Vt(c[0])&&(T=c[3],L=c[0],this.ctx.beginPath(),this.formatPath([new Z(T.end.x,T.end.y),new Z(L.start.x,L.start.y)]),this.ctx.stroke()),Vt(c[1])&&(T=c[1],L=c[2],this.ctx.beginPath(),this.formatPath([new Z(T.end.x,T.end.y),new Z(L.start.x,L.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return rt(this,void 0,void 0,function(){var n;return Xe(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Se(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=RO(e),[4,this.renderStack(n)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(Pw),ZO=function(t){return t instanceof dw||t instanceof fw?!0:t instanceof gf&&t.type!==qa&&t.type!==za},jO=function(t,A){switch(t){case 0:return nl(A);case 2:return _O(A);case 1:default:return rl(A)}},AM=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},eM=["-apple-system","system-ui"],tM=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(A){return eM.indexOf(A)===-1}):t},nM=function(t){sn(A,t);function A(e,n){var r=t.call(this,e,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return A.prototype.render=function(e){return rt(this,void 0,void 0,function(){var n,r;return Xe(this,function(i){switch(i.label){case 0:return n=df(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,rM(n)];case 1:return r=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Se(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(r,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(Pw),rM=function(t){return new Promise(function(A,e){var n=new Image;n.onload=function(){A(n)},n.onerror=e,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},iM=function(){function t(A){var e=A.id,n=A.enabled;this.id=e,this.enabled=n,this.start=Date.now()}return t.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,ga([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,ga([this.id,this.getTime()+"ms"],A))},t.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,ga([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,ga([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.instances={},t}(),sM=function(){function t(A,e){var n;this.windowBounds=e,this.instanceName="#"+t.instanceCount++,this.logger=new iM({id:this.instanceName,enabled:A.logging}),this.cache=(n=A.cache)!==null&&n!==void 0?n:new bO(this,A)}return t.instanceCount=1,t}(),oM=function(t,A){return A===void 0&&(A={}),aM(t,A)};typeof window<"u"&&_w.setContext(window);var aM=function(t,A){return rt(void 0,void 0,void 0,function(){var e,n,r,i,s,a,c,u,d,p,B,m,C,E,S,U,v,M,F,T,N,L,N,W,$,eA,gA,wA,aA,HA,WA,bA,vA,mA,re,ZA,$A,Be,me,Te;return Xe(this,function(jA){switch(jA.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=t.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(n=e.defaultView,!n)throw new Error("Document is not attached to a Window");return r={allowTaint:(W=A.allowTaint)!==null&&W!==void 0?W:!1,imageTimeout:($=A.imageTimeout)!==null&&$!==void 0?$:15e3,proxy:A.proxy,useCORS:(eA=A.useCORS)!==null&&eA!==void 0?eA:!1},i=xu({logging:(gA=A.logging)!==null&&gA!==void 0?gA:!0,cache:A.cache},r),s={windowWidth:(wA=A.windowWidth)!==null&&wA!==void 0?wA:n.innerWidth,windowHeight:(aA=A.windowHeight)!==null&&aA!==void 0?aA:n.innerHeight,scrollX:(HA=A.scrollX)!==null&&HA!==void 0?HA:n.pageXOffset,scrollY:(WA=A.scrollY)!==null&&WA!==void 0?WA:n.pageYOffset},a=new Dn(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),c=new sM(i,a),u=(bA=A.foreignObjectRendering)!==null&&bA!==void 0?bA:!1,d={allowTaint:(vA=A.allowTaint)!==null&&vA!==void 0?vA:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:u,copyStyles:u},c.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),p=new Hw(c,t,d),B=p.clonedReferenceElement,B?[4,p.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return m=jA.sent(),C=mf(B)||lO(B)?NT(B.ownerDocument):Ba(c,B),E=C.width,S=C.height,U=C.left,v=C.top,M=lM(c,B,A.backgroundColor),F={canvas:A.canvas,backgroundColor:M,scale:(re=(mA=A.scale)!==null&&mA!==void 0?mA:n.devicePixelRatio)!==null&&re!==void 0?re:1,x:((ZA=A.x)!==null&&ZA!==void 0?ZA:0)+U,y:(($A=A.y)!==null&&$A!==void 0?$A:0)+v,width:(Be=A.width)!==null&&Be!==void 0?Be:Math.ceil(E),height:(me=A.height)!==null&&me!==void 0?me:Math.ceil(S)},u?(c.logger.debug("Document cloned, using foreign object rendering"),N=new nM(c,F),[4,N.render(B)]):[3,3];case 2:return T=jA.sent(),[3,5];case 3:return c.logger.debug("Document cloned, element located at "+U+","+v+" with size "+E+"x"+S+" using computed rendering"),c.logger.debug("Starting DOM parsing"),L=gw(c,B),M===L.styles.backgroundColor&&(L.styles.backgroundColor=Nn.TRANSPARENT),c.logger.debug("Starting renderer for element at "+F.x+","+F.y+" with size "+F.width+"x"+F.height),N=new qO(c,F),[4,N.render(L)];case 4:T=jA.sent(),jA.label=5;case 5:return(!((Te=A.removeContainer)!==null&&Te!==void 0)||Te)&&(Hw.destroy(m)||c.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),c.logger.debug("Finished rendering"),[2,T]}})})},lM=function(t,A,e){var n=A.ownerDocument,r=n.documentElement?Zs(t,getComputedStyle(n.documentElement).backgroundColor):Nn.TRANSPARENT,i=n.body?Zs(t,getComputedStyle(n.body).backgroundColor):Nn.TRANSPARENT,s=typeof e=="string"?Zs(t,e):e===null?Nn.TRANSPARENT:4294967295;return A===n.documentElement?yr(r)?yr(i)?s:i:r:s};const cM=h.defineComponent({__name:"dom-renderer",props:{modelValue:{type:String,default:""},fixedWidth:{type:Number,default:0},renderUpdates:{type:Boolean,default:!1},exportToSvg:{type:Boolean,default:!1},debug:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t,n=h.ref(),r=h.ref(""),i=h.ref();async function s(){if(n.value){const c=n.value,d=(await oM(c.firstElementChild,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,width:c.offsetWidth,height:c.offsetHeight})).toDataURL();if(A("update:modelValue",d),e.debug){const p=new Image;p.src=d,document.body.appendChild(p)}return d}return""}const a=Ds.debounce(async()=>{r.value=await s()},300,{trailing:!0,leading:!1});return h.onMounted(()=>{const c=n.value;e.renderUpdates&&(i.value=new MutationObserver(async u=>{a()}),i.value.observe(c,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{a()},500)}),(c,u)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:n,style:h.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[h.renderSlot(c.$slots,"default")],6))}}),uM={class:"link-sharing"},fM={key:0,class:"link-sharing__links container"},dM={class:"row"},hM={key:0,class:"col-12 col-md-6"},pM=["href"],gM={class:"caption"},BM={key:1,class:"col-12 col-md-6"},mM=["href"],wM={class:"caption"},CM={key:2,class:"col-12 col-md-6"},yM={class:"caption"},QM={key:3,class:"col-12 col-md-6"},EM=["href"],FM={class:"caption"},UM={key:4,class:"col-12 col-md-6"},bM=["href"],vM={class:"caption"},IM={key:5,class:"col-12 col-md-6"},SM=["onClick"],TM={class:"caption"},xM={key:6,class:"col-12 col-md-6"},HM=["href"],LM={class:"caption"},_M={key:1,class:"link-sharing__instructions pt-5"},OM={class:"row"},MM={class:"col-12 text-center py-0"},DM={class:"mb-5"},kM=t=>t.replace(/<(?:.|\n)*?>/gm,""),NM=h.defineComponent({__name:"link-sharing",props:{url:{type:String,default:`${location.origin}${location.pathname}`},subject:String,hashtags:Array,text:{type:String,default:""},media:{type:String,default:""},services:{type:Object,default:{facebook:!0,twitter:!0,instagram:!0,linkedin:!0,whatsapp:!0,mailto:!0,clipboard:!0}}},setup(t){const A=t,e=h.ref(!1),n=h.computed(()=>encodeURIComponent(A.url));h.computed(()=>encodeURIComponent(A.media));const r=h.computed(()=>kM(A.text)),i=h.computed(()=>Boolean(navigator&&navigator.userAgent&&/Mobi|Android/i.test(navigator.userAgent)));function s(){const a=document.createElement("textarea");document.body.appendChild(a),a.value=A.url,a.select(),document.execCommand("copy"),document.body.removeChild(a)}return(a,c)=>{const u=h.resolveComponent("svg-icon"),d=h.resolveDirective("track-click");return h.openBlock(),h.createElementBlock("div",uM,[e.value?(h.openBlock(),h.createElementBlock("div",_M,[h.createElementVNode("div",OM,[h.createElementVNode("div",MM,[h.createElementVNode("div",DM,[h.createElementVNode("p",null,h.toDisplayString(a.$t("sharing.instructions",{service:"Instagram"})),1),h.createElementVNode("p",null,[h.createElementVNode("strong",null,h.toDisplayString(t.hashtags),1)])])])])])):(h.openBlock(),h.createElementBlock("div",fM,[h.createElementVNode("div",dM,[t.services.facebook?(h.openBlock(),h.createElementBlock("div",hM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`https://www.facebook.com/sharer.php?u=${h.unref(n)}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"facebook"}),h.createElementVNode("span",gM,h.toDisplayString(a.$t("sharing.facebook")),1)],8,pM)),[[d,"share-facebook"]])])):h.createCommentVNode("",!0),t.services.twitter?(h.openBlock(),h.createElementBlock("div",BM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`https://twitter.com/share?text=${t.subject}&url=${h.unref(n)}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"twitter"}),h.createElementVNode("span",wM,h.toDisplayString(a.$t("sharing.twitter")),1)],8,mM)),[[d,"share-twitter"]])])):h.createCommentVNode("",!0),t.services.instagram?(h.openBlock(),h.createElementBlock("div",CM,[h.withDirectives((h.openBlock(),h.createElementBlock("button",{class:"link-sharing__link btn btn-primary",onClick:c[0]||(c[0]=h.withModifiers(p=>e.value=!e.value,["prevent"])),target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"instagram"}),h.createElementVNode("span",yM,h.toDisplayString(a.$t("sharing.instagram")),1)])),[[d,"share-instagram"]])])):h.createCommentVNode("",!0),t.services.linkedin?(h.openBlock(),h.createElementBlock("div",QM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`https://www.linkedin.com/shareArticle?mini=true&url=${h.unref(n)}&title=${t.subject}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"linkedin"}),h.createElementVNode("span",FM,h.toDisplayString(a.$t("sharing.linkedin")),1)],8,EM)),[[d,"share-linkedin"]])])):h.createCommentVNode("",!0),t.services.whatsapp&&h.unref(i)?(h.openBlock(),h.createElementBlock("div",UM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`whatsapp://send?text=${h.unref(n)}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"whatsapp"}),h.createElementVNode("span",vM,h.toDisplayString(a.$t("sharing.whatsapp")),1)],8,bM)),[[d,"share-whatsapp"]])])):h.createCommentVNode("",!0),t.services.clipboard?(h.openBlock(),h.createElementBlock("div",IM,[h.withDirectives((h.openBlock(),h.createElementBlock("button",{class:"link-sharing__link btn btn-primary",onClick:h.withModifiers(s,["prevent","stop"]),target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"copy"}),h.createElementVNode("span",TM,h.toDisplayString(a.$t("sharing.clipboard")),1)],8,SM)),[[d,"share-clipboard"]])])):h.createCommentVNode("",!0),t.services.mailto?(h.openBlock(),h.createElementBlock("div",xM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`mailto:?subject=${t.subject}&body=${h.unref(r)}%0D%0A${t.url}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"mail"}),h.createElementVNode("span",LM,h.toDisplayString(a.$t("sharing.mailto")),1)],8,HM)),[[d,"share-mailto"]])])):h.createCommentVNode("",!0)])]))])}}}),KP="",RM={class:"base-form"},KM=["onSubmit"],VM=h.defineComponent({__name:"base-form",props:{id:null,name:null,variant:null,disabled:{type:Boolean},pending:{type:Boolean}},setup(t){function A(r){console.log("input",r)}function e(r){console.log("reset",r)}function n(r){console.log("submit",r)}return(r,i)=>(h.openBlock(),h.createElementBlock("div",RM,[h.createElementVNode("form",{ref:"form",onInput:A,onReset:e,onSubmit:h.withModifiers(n,["prevent"])},[h.renderSlot(r.$slots,"default")],40,KM)]))}}),VP="";MA.Accordion=Ry,MA.AccordionItem=Oy,MA.AssetUploader=CT,MA.BaseButton=Vy,MA.BaseCamera=tT,MA.BaseCarousel=KB,MA.BaseForm=VM,MA.BaseHeadline=by,MA.BaseInput=$y,MA.BaseParagraph=vy,MA.CheckGroup=rQ,MA.DomRenderer=cM,MA.FileUpload=lT,MA.InputCheckbox=AQ,MA.InputColor=RI,MA.InputDropdown=_S,MA.InputFile=BQ,MA.InputTextarea=zy,MA.LinkSharing=NM,MA.LoadingSpinner=Uy,MA.MediaThumbnails=ST,MA.ProgressSteps=kT,MA.RadioGroup=lQ,MA.RteEditor=MI,MA.SvgIcon=wy,MA.UploadGroup=RB,Object.defineProperty(MA,Symbol.toStringTag,{value:"Module"})});
184
+ .`+Ef+EO+Lw)},UO=function(t,A){var e=t.ownerDocument;if(e){var n=e.createElement("style");n.textContent=A,t.appendChild(n)}},_w=function(){function t(){}return t.getOrigin=function(A){var e=t._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},t.isSameOrigin=function(A){return t.getOrigin(A)===t._origin},t.setContext=function(A){t._link=A.document.createElement("a"),t._origin=t.getOrigin(A.location.href)},t._origin="about:blank",t}(),bO=function(){function t(A,e){this.context=A,this._options=e,this._cache={}}return t.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(Uf(A)||TO(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},t.prototype.match=function(A){return this._cache[A]},t.prototype.loadImage=function(A){return rt(this,void 0,void 0,function(){var e,n,r,i,s=this;return Xe(this,function(a){switch(a.label){case 0:return e=_w.isSameOrigin(A),n=!Ff(A)&&this._options.useCORS===!0&&De.SUPPORT_CORS_IMAGES&&!e,r=!Ff(A)&&!e&&!Uf(A)&&typeof this._options.proxy=="string"&&De.SUPPORT_CORS_XHR&&!n,!e&&this._options.allowTaint===!1&&!Ff(A)&&!Uf(A)&&!r&&!n?[2]:(i=A,r?[4,this.proxy(i)]:[3,2]);case 1:i=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(c,u){var d=new Image;d.onload=function(){return c(d)},d.onerror=u,(xO(i)||n)&&(d.crossOrigin="anonymous"),d.src=i,d.complete===!0&&setTimeout(function(){return c(d)},500),s._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},t.prototype.has=function(A){return typeof this._cache[A]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(A){var e=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(i,s){var a=De.SUPPORT_RESPONSE_TYPE?"blob":"text",c=new XMLHttpRequest;c.onload=function(){if(c.status===200)if(a==="text")i(c.response);else{var p=new FileReader;p.addEventListener("load",function(){return i(p.result)},!1),p.addEventListener("error",function(B){return s(B)},!1),p.readAsDataURL(c.response)}else s("Failed to proxy resource "+r+" with status code "+c.status)},c.onerror=s;var u=n.indexOf("?")>-1?"&":"?";if(c.open("GET",""+n+u+"url="+encodeURIComponent(A)+"&responseType="+a),a!=="text"&&c instanceof XMLHttpRequest&&(c.responseType=a),e._options.imageTimeout){var d=e._options.imageTimeout;c.timeout=d,c.ontimeout=function(){return s("Timed out ("+d+"ms) proxying "+r)}}c.send()})},t}(),vO=/^data:image\/svg\+xml/i,IO=/^data:image\/.*;base64,/i,SO=/^data:image\/.*/i,TO=function(t){return De.SUPPORT_SVG_DRAWING||!HO(t)},Ff=function(t){return SO.test(t)},xO=function(t){return IO.test(t)},Uf=function(t){return t.substr(0,4)==="blob"},HO=function(t){return t.substr(-3).toLowerCase()==="svg"||vO.test(t)},Z=function(){function t(A,e){this.type=0,this.x=A,this.y=e}return t.prototype.add=function(A,e){return new t(this.x+A,this.y+e)},t}(),Ji=function(t,A,e){return new Z(t.x+(A.x-t.x)*e,t.y+(A.y-t.y)*e)},tl=function(){function t(A,e,n,r){this.type=1,this.start=A,this.startControl=e,this.endControl=n,this.end=r}return t.prototype.subdivide=function(A,e){var n=Ji(this.start,this.startControl,A),r=Ji(this.startControl,this.endControl,A),i=Ji(this.endControl,this.end,A),s=Ji(n,r,A),a=Ji(r,i,A),c=Ji(s,a,A);return e?new t(this.start,n,s,c):new t(c,a,i,this.end)},t.prototype.add=function(A,e){return new t(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),Vt=function(t){return t.type===1},LO=function(){function t(A){var e=A.styles,n=A.bounds,r=qs(e.borderTopLeftRadius,n.width,n.height),i=r[0],s=r[1],a=qs(e.borderTopRightRadius,n.width,n.height),c=a[0],u=a[1],d=qs(e.borderBottomRightRadius,n.width,n.height),p=d[0],B=d[1],m=qs(e.borderBottomLeftRadius,n.width,n.height),C=m[0],E=m[1],S=[];S.push((i+c)/n.width),S.push((C+p)/n.width),S.push((s+E)/n.height),S.push((u+B)/n.height);var U=Math.max.apply(Math,S);U>1&&(i/=U,s/=U,c/=U,u/=U,p/=U,B/=U,C/=U,E/=U);var v=n.width-c,M=n.height-B,F=n.width-p,T=n.height-E,L=e.borderTopWidth,N=e.borderRightWidth,W=e.borderBottomWidth,$=e.borderLeftWidth,eA=YA(e.paddingTop,A.bounds.width),gA=YA(e.paddingRight,A.bounds.width),wA=YA(e.paddingBottom,A.bounds.width),aA=YA(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?te(n.left+$/3,n.top+L/3,i-$/3,s-L/3,NA.TOP_LEFT):new Z(n.left+$/3,n.top+L/3),this.topRightBorderDoubleOuterBox=i>0||s>0?te(n.left+v,n.top+L/3,c-N/3,u-L/3,NA.TOP_RIGHT):new Z(n.left+n.width-N/3,n.top+L/3),this.bottomRightBorderDoubleOuterBox=p>0||B>0?te(n.left+F,n.top+M,p-N/3,B-W/3,NA.BOTTOM_RIGHT):new Z(n.left+n.width-N/3,n.top+n.height-W/3),this.bottomLeftBorderDoubleOuterBox=C>0||E>0?te(n.left+$/3,n.top+T,C-$/3,E-W/3,NA.BOTTOM_LEFT):new Z(n.left+$/3,n.top+n.height-W/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?te(n.left+$*2/3,n.top+L*2/3,i-$*2/3,s-L*2/3,NA.TOP_LEFT):new Z(n.left+$*2/3,n.top+L*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?te(n.left+v,n.top+L*2/3,c-N*2/3,u-L*2/3,NA.TOP_RIGHT):new Z(n.left+n.width-N*2/3,n.top+L*2/3),this.bottomRightBorderDoubleInnerBox=p>0||B>0?te(n.left+F,n.top+M,p-N*2/3,B-W*2/3,NA.BOTTOM_RIGHT):new Z(n.left+n.width-N*2/3,n.top+n.height-W*2/3),this.bottomLeftBorderDoubleInnerBox=C>0||E>0?te(n.left+$*2/3,n.top+T,C-$*2/3,E-W*2/3,NA.BOTTOM_LEFT):new Z(n.left+$*2/3,n.top+n.height-W*2/3),this.topLeftBorderStroke=i>0||s>0?te(n.left+$/2,n.top+L/2,i-$/2,s-L/2,NA.TOP_LEFT):new Z(n.left+$/2,n.top+L/2),this.topRightBorderStroke=i>0||s>0?te(n.left+v,n.top+L/2,c-N/2,u-L/2,NA.TOP_RIGHT):new Z(n.left+n.width-N/2,n.top+L/2),this.bottomRightBorderStroke=p>0||B>0?te(n.left+F,n.top+M,p-N/2,B-W/2,NA.BOTTOM_RIGHT):new Z(n.left+n.width-N/2,n.top+n.height-W/2),this.bottomLeftBorderStroke=C>0||E>0?te(n.left+$/2,n.top+T,C-$/2,E-W/2,NA.BOTTOM_LEFT):new Z(n.left+$/2,n.top+n.height-W/2),this.topLeftBorderBox=i>0||s>0?te(n.left,n.top,i,s,NA.TOP_LEFT):new Z(n.left,n.top),this.topRightBorderBox=c>0||u>0?te(n.left+v,n.top,c,u,NA.TOP_RIGHT):new Z(n.left+n.width,n.top),this.bottomRightBorderBox=p>0||B>0?te(n.left+F,n.top+M,p,B,NA.BOTTOM_RIGHT):new Z(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=C>0||E>0?te(n.left,n.top+T,C,E,NA.BOTTOM_LEFT):new Z(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||s>0?te(n.left+$,n.top+L,Math.max(0,i-$),Math.max(0,s-L),NA.TOP_LEFT):new Z(n.left+$,n.top+L),this.topRightPaddingBox=c>0||u>0?te(n.left+Math.min(v,n.width-N),n.top+L,v>n.width+N?0:Math.max(0,c-N),Math.max(0,u-L),NA.TOP_RIGHT):new Z(n.left+n.width-N,n.top+L),this.bottomRightPaddingBox=p>0||B>0?te(n.left+Math.min(F,n.width-$),n.top+Math.min(M,n.height-W),Math.max(0,p-N),Math.max(0,B-W),NA.BOTTOM_RIGHT):new Z(n.left+n.width-N,n.top+n.height-W),this.bottomLeftPaddingBox=C>0||E>0?te(n.left+$,n.top+Math.min(T,n.height-W),Math.max(0,C-$),Math.max(0,E-W),NA.BOTTOM_LEFT):new Z(n.left+$,n.top+n.height-W),this.topLeftContentBox=i>0||s>0?te(n.left+$+aA,n.top+L+eA,Math.max(0,i-($+aA)),Math.max(0,s-(L+eA)),NA.TOP_LEFT):new Z(n.left+$+aA,n.top+L+eA),this.topRightContentBox=c>0||u>0?te(n.left+Math.min(v,n.width+$+aA),n.top+L+eA,v>n.width+$+aA?0:c-$+aA,u-(L+eA),NA.TOP_RIGHT):new Z(n.left+n.width-(N+gA),n.top+L+eA),this.bottomRightContentBox=p>0||B>0?te(n.left+Math.min(F,n.width-($+aA)),n.top+Math.min(M,n.height+L+eA),Math.max(0,p-(N+gA)),B-(W+wA),NA.BOTTOM_RIGHT):new Z(n.left+n.width-(N+gA),n.top+n.height-(W+wA)),this.bottomLeftContentBox=C>0||E>0?te(n.left+$+aA,n.top+T,Math.max(0,C-($+aA)),E-(W+wA),NA.BOTTOM_LEFT):new Z(n.left+$+aA,n.top+n.height-(W+wA))}return t}(),NA;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(NA||(NA={}));var te=function(t,A,e,n,r){var i=4*((Math.sqrt(2)-1)/3),s=e*i,a=n*i,c=t+e,u=A+n;switch(r){case NA.TOP_LEFT:return new tl(new Z(t,u),new Z(t,u-a),new Z(c-s,A),new Z(c,A));case NA.TOP_RIGHT:return new tl(new Z(t,A),new Z(t+s,A),new Z(c,u-a),new Z(c,u));case NA.BOTTOM_RIGHT:return new tl(new Z(c,A),new Z(c,A+a),new Z(t+s,u),new Z(t,u));case NA.BOTTOM_LEFT:default:return new tl(new Z(c,u),new Z(c-s,u),new Z(t,A+a),new Z(t,A))}},nl=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},_O=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},rl=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},OO=function(){function t(A,e,n){this.offsetX=A,this.offsetY=e,this.matrix=n,this.type=0,this.target=6}return t}(),il=function(){function t(A,e){this.path=A,this.target=e,this.type=1}return t}(),MO=function(){function t(A){this.opacity=A,this.type=2,this.target=6}return t}(),DO=function(t){return t.type===0},Ow=function(t){return t.type===1},kO=function(t){return t.type===2},Mw=function(t,A){return t.length===A.length?t.some(function(e,n){return e===A[n]}):!1},NO=function(t,A,e,n,r){return t.map(function(i,s){switch(s){case 0:return i.add(A,e);case 1:return i.add(A+n,e);case 2:return i.add(A+n,e+r);case 3:return i.add(A,e+r)}return i})},Dw=function(){function t(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),kw=function(){function t(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new LO(this.container),this.container.styles.opacity<1&&this.effects.push(new MO(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new OO(n,r,i))}if(this.container.styles.overflowX!==0){var s=nl(this.curves),a=rl(this.curves);Mw(s,a)?this.effects.push(new il(s,6)):(this.effects.push(new il(s,2)),this.effects.push(new il(a,4)))}}return t.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(c){return!Ow(c)});if(e||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,i),e=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var s=nl(n.curves),a=rl(n.curves);Mw(s,a)||r.unshift(new il(a,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(c){return Ee(c.target,A)})},t}(),bf=function(t,A,e,n){t.container.elements.forEach(function(r){var i=Ee(r.flags,4),s=Ee(r.flags,2),a=new kw(r,t);Ee(r.styles.display,2048)&&n.push(a);var c=Ee(r.flags,8)?[]:n;if(i||s){var u=i||r.styles.isPositioned()?e:A,d=new Dw(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var p=r.styles.zIndex.order;if(p<0){var B=0;u.negativeZIndex.some(function(C,E){return p>C.element.container.styles.zIndex.order?(B=E,!1):B>0}),u.negativeZIndex.splice(B,0,d)}else if(p>0){var m=0;u.positiveZIndex.some(function(C,E){return p>=C.element.container.styles.zIndex.order?(m=E+1,!1):m>0}),u.positiveZIndex.splice(m,0,d)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else r.styles.isFloating()?u.nonPositionedFloats.push(d):u.nonPositionedInlineLevel.push(d);bf(a,d,i?d:e,c)}else r.styles.isInlineLevel()?A.inlineLevel.push(a):A.nonInlineLevel.push(a),bf(a,A,e,c);Ee(r.flags,8)&&Nw(r,c)})},Nw=function(t,A){for(var e=t instanceof pf?t.start:1,n=t instanceof pf?t.reversed:!1,r=0;r<A.length;r++){var i=A[r];i.container instanceof cw&&typeof i.container.value=="number"&&i.container.value!==0&&(e=i.container.value),i.listValue=no(e,i.container.styles.listStyleType,!0),e+=n?-1:1}},RO=function(t){var A=new kw(t,null),e=new Dw(A),n=[];return bf(A,e,e,n),Nw(A.container,n),e},Rw=function(t,A){switch(A){case 0:return Pt(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Pt(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Pt(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return Pt(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},KO=function(t,A){switch(A){case 0:return Pt(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Pt(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Pt(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return Pt(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},VO=function(t,A){switch(A){case 0:return Pt(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Pt(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Pt(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return Pt(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},PO=function(t,A){switch(A){case 0:return sl(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return sl(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return sl(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return sl(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},sl=function(t,A){var e=[];return Vt(t)?e.push(t.subdivide(.5,!1)):e.push(t),Vt(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},Pt=function(t,A,e,n){var r=[];return Vt(t)?r.push(t.subdivide(.5,!1)):r.push(t),Vt(e)?r.push(e.subdivide(.5,!0)):r.push(e),Vt(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),Vt(A)?r.push(A.subdivide(.5,!1).reverse()):r.push(A),r},Kw=function(t){var A=t.bounds,e=t.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},ol=function(t){var A=t.styles,e=t.bounds,n=YA(A.paddingLeft,e.width),r=YA(A.paddingRight,e.width),i=YA(A.paddingTop,e.width),s=YA(A.paddingBottom,e.width);return e.add(n+A.borderLeftWidth,i+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+n+r),-(A.borderTopWidth+A.borderBottomWidth+i+s))},GO=function(t,A){return t===0?A.bounds:t===2?ol(A):Kw(A)},WO=function(t,A){return t===0?A.bounds:t===2?ol(A):Kw(A)},vf=function(t,A,e){var n=GO(Yi(t.styles.backgroundOrigin,A),t),r=WO(Yi(t.styles.backgroundClip,A),t),i=$O(Yi(t.styles.backgroundSize,A),e,n),s=i[0],a=i[1],c=qs(Yi(t.styles.backgroundPosition,A),n.width-s,n.height-a),u=JO(Yi(t.styles.backgroundRepeat,A),c,i,n,r),d=Math.round(n.left+c[0]),p=Math.round(n.top+c[1]);return[u,d,p,s,a]},Xi=function(t){return GA(t)&&t.value===Pi.AUTO},al=function(t){return typeof t=="number"},$O=function(t,A,e){var n=A[0],r=A[1],i=A[2],s=t[0],a=t[1];if(!s)return[0,0];if(ge(s)&&a&&ge(a))return[YA(s,e.width),YA(a,e.height)];var c=al(i);if(GA(s)&&(s.value===Pi.CONTAIN||s.value===Pi.COVER)){if(al(i)){var u=e.width/e.height;return u<i!=(s.value===Pi.COVER)?[e.width,e.width/i]:[e.height*i,e.height]}return[e.width,e.height]}var d=al(n),p=al(r),B=d||p;if(Xi(s)&&(!a||Xi(a))){if(d&&p)return[n,r];if(!c&&!B)return[e.width,e.height];if(B&&c){var m=d?n:r*i,C=p?r:n/i;return[m,C]}var E=d?n:e.width,S=p?r:e.height;return[E,S]}if(c){var U=0,v=0;return ge(s)?U=YA(s,e.width):ge(a)&&(v=YA(a,e.height)),Xi(s)?U=v*i:(!a||Xi(a))&&(v=U/i),[U,v]}var M=null,F=null;if(ge(s)?M=YA(s,e.width):a&&ge(a)&&(F=YA(a,e.height)),M!==null&&(!a||Xi(a))&&(F=d&&p?M/n*r:e.height),F!==null&&Xi(s)&&(M=d&&p?F/r*n:e.width),M!==null&&F!==null)return[M,F];throw new Error("Unable to calculate background-size for element")},Yi=function(t,A){var e=t[A];return typeof e>"u"?t[0]:e},JO=function(t,A,e,n,r){var i=A[0],s=A[1],a=e[0],c=e[1];switch(t){case 2:return[new Z(Math.round(n.left),Math.round(n.top+s)),new Z(Math.round(n.left+n.width),Math.round(n.top+s)),new Z(Math.round(n.left+n.width),Math.round(c+n.top+s)),new Z(Math.round(n.left),Math.round(c+n.top+s))];case 3:return[new Z(Math.round(n.left+i),Math.round(n.top)),new Z(Math.round(n.left+i+a),Math.round(n.top)),new Z(Math.round(n.left+i+a),Math.round(n.height+n.top)),new Z(Math.round(n.left+i),Math.round(n.height+n.top))];case 1:return[new Z(Math.round(n.left+i),Math.round(n.top+s)),new Z(Math.round(n.left+i+a),Math.round(n.top+s)),new Z(Math.round(n.left+i+a),Math.round(n.top+s+c)),new Z(Math.round(n.left+i),Math.round(n.top+s+c))];default:return[new Z(Math.round(r.left),Math.round(r.top)),new Z(Math.round(r.left+r.width),Math.round(r.top)),new Z(Math.round(r.left+r.width),Math.round(r.height+r.top)),new Z(Math.round(r.left),Math.round(r.height+r.top))]}},XO="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Vw="Hidden Text",YO=function(){function t(A){this._data={},this._document=A}return t.prototype.parseMetrics=function(A,e){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),s=this._document.body;n.style.visibility="hidden",n.style.fontFamily=A,n.style.fontSize=e,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",s.appendChild(n),r.src=XO,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=A,i.style.fontSize=e,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(Vw)),n.appendChild(i),n.appendChild(r);var a=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(Vw)),n.style.lineHeight="normal",r.style.verticalAlign="super";var c=r.offsetTop-n.offsetTop+2;return s.removeChild(n),{baseline:a,middle:c}},t.prototype.getMetrics=function(A,e){var n=A+" "+e;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(A,e)),this._data[n]},t}(),Pw=function(){function t(A,e){this.context=A,this.options=e}return t}(),zO=1e4,qO=function(t){sn(A,t);function A(e,n){var r=t.call(this,e,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new YO(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return A.prototype.applyEffects=function(e){for(var n=this;this._activeEffects.length;)this.popEffect();e.forEach(function(r){return n.applyEffect(r)})},A.prototype.applyEffect=function(e){this.ctx.save(),kO(e)&&(this.ctx.globalAlpha=e.opacity),DO(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),Ow(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return rt(this,void 0,void 0,function(){var n;return Xe(this,function(r){switch(r.label){case 0:return n=e.element.container.styles,n.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return rt(this,void 0,void 0,function(){return Xe(this,function(n){switch(n.label){case 0:if(Ee(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(e)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,n,r){var i=this;if(n===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+r);else{var s=hf(e.text);s.reduce(function(a,c){return i.ctx.fillText(c,a,e.bounds.top+r),a+i.ctx.measureText(c).width},e.bounds.left)}},A.prototype.createFontStyle=function(e){var n=e.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),r=tM(e.fontFamily).join(", "),i=zs(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,n,e.fontWeight,i,r].join(" "),r,i]},A.prototype.renderTextNode=function(e,n){return rt(this,void 0,void 0,function(){var r,i,s,a,c,u,d,p,B=this;return Xe(this,function(m){return r=this.createFontStyle(n),i=r[0],s=r[1],a=r[2],this.ctx.font=i,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",c=this.fontMetrics.getMetrics(s,a),u=c.baseline,d=c.middle,p=n.paintOrder,e.textBounds.forEach(function(C){p.forEach(function(E){switch(E){case 0:B.ctx.fillStyle=Se(n.color),B.renderTextWithLetterSpacing(C,n.letterSpacing,u);var S=n.textShadow;S.length&&C.text.trim().length&&(S.slice(0).reverse().forEach(function(U){B.ctx.shadowColor=Se(U.color),B.ctx.shadowOffsetX=U.offsetX.number*B.options.scale,B.ctx.shadowOffsetY=U.offsetY.number*B.options.scale,B.ctx.shadowBlur=U.blur.number,B.renderTextWithLetterSpacing(C,n.letterSpacing,u)}),B.ctx.shadowColor="",B.ctx.shadowOffsetX=0,B.ctx.shadowOffsetY=0,B.ctx.shadowBlur=0),n.textDecorationLine.length&&(B.ctx.fillStyle=Se(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(U){switch(U){case 1:B.ctx.fillRect(C.bounds.left,Math.round(C.bounds.top+u),C.bounds.width,1);break;case 2:B.ctx.fillRect(C.bounds.left,Math.round(C.bounds.top),C.bounds.width,1);break;case 3:B.ctx.fillRect(C.bounds.left,Math.ceil(C.bounds.top+d),C.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&C.text.trim().length&&(B.ctx.strokeStyle=Se(n.webkitTextStrokeColor),B.ctx.lineWidth=n.webkitTextStrokeWidth,B.ctx.lineJoin=window.chrome?"miter":"round",B.ctx.strokeText(C.text,C.bounds.left,C.bounds.top+u)),B.ctx.strokeStyle="",B.ctx.lineWidth=0,B.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,n,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=ol(e),s=rl(n);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return rt(this,void 0,void 0,function(){var n,r,i,s,a,c,v,v,u,d,p,B,F,m,C,T,E,S,U,v,M,F,T;return Xe(this,function(L){switch(L.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,s=0,a=n.textNodes,L.label=1;case 1:return s<a.length?(c=a[s],[4,this.renderTextNode(c,i)]):[3,4];case 2:L.sent(),L.label=3;case 3:return s++,[3,1];case 4:if(!(n instanceof ow))return[3,8];L.label=5;case 5:return L.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return v=L.sent(),this.renderReplacedElement(n,r,v),[3,8];case 7:return L.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof aw&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof lw))return[3,12];L.label=9;case 9:return L.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return v=L.sent(),this.renderReplacedElement(n,r,v),[3,12];case 11:return L.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof hw&&n.tree?(u=new A(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,u.render(n.tree)]):[3,14];case 13:d=L.sent(),n.width&&n.height&&this.ctx.drawImage(d,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),L.label=14;case 14:if(n instanceof gf&&(p=Math.min(n.bounds.width,n.bounds.height),n.type===za?n.checked&&(this.ctx.save(),this.path([new Z(n.bounds.left+p*.39363,n.bounds.top+p*.79),new Z(n.bounds.left+p*.16,n.bounds.top+p*.5549),new Z(n.bounds.left+p*.27347,n.bounds.top+p*.44071),new Z(n.bounds.left+p*.39694,n.bounds.top+p*.5649),new Z(n.bounds.left+p*.72983,n.bounds.top+p*.23),new Z(n.bounds.left+p*.84,n.bounds.top+p*.34085),new Z(n.bounds.left+p*.39363,n.bounds.top+p*.79)]),this.ctx.fillStyle=Se(uw),this.ctx.fill(),this.ctx.restore()):n.type===qa&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+p/2,n.bounds.top+p/2,p/4,0,Math.PI*2,!0),this.ctx.fillStyle=Se(uw),this.ctx.fill(),this.ctx.restore())),ZO(n)&&n.value.length){switch(B=this.createFontStyle(i),F=B[0],m=B[1],C=this.fontMetrics.getMetrics(F,m).baseline,this.ctx.font=F,this.ctx.fillStyle=Se(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=AM(n.styles.textAlign),T=ol(n),E=0,n.styles.textAlign){case 1:E+=T.width/2;break;case 2:E+=T.width;break}S=T.add(E,0,0,-T.height/2+1),this.ctx.save(),this.path([new Z(T.left,T.top),new Z(T.left+T.width,T.top),new Z(T.left+T.width,T.top+T.height),new Z(T.left,T.top+T.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new eo(n.value,S),i.letterSpacing,C),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ee(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(U=n.styles.listStyleImage,U.type!==0)return[3,18];v=void 0,M=U.url,L.label=15;case 15:return L.trys.push([15,17,,18]),[4,this.context.cache.match(M)];case 16:return v=L.sent(),this.ctx.drawImage(v,n.bounds.left-(v.width+10),n.bounds.top),[3,18];case 17:return L.sent(),this.context.logger.error("Error loading list-style-image "+M),[3,18];case 18:return[3,20];case 19:e.listValue&&n.styles.listStyleType!==-1&&(F=this.createFontStyle(i)[0],this.ctx.font=F,this.ctx.fillStyle=Se(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",T=new Dn(n.bounds.left,n.bounds.top+YA(n.styles.paddingTop,n.bounds.width),n.bounds.width,Vm(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new eo(e.listValue,T),i.letterSpacing,Vm(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),L.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return rt(this,void 0,void 0,function(){var n,r,U,i,s,U,a,c,U,u,d,U,p,B,U,m,C,U,E,S,U;return Xe(this,function(v){switch(v.label){case 0:if(Ee(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:v.sent(),n=0,r=e.negativeZIndex,v.label=2;case 2:return n<r.length?(U=r[n],[4,this.renderStack(U)]):[3,5];case 3:v.sent(),v.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:v.sent(),i=0,s=e.nonInlineLevel,v.label=7;case 7:return i<s.length?(U=s[i],[4,this.renderNode(U)]):[3,10];case 8:v.sent(),v.label=9;case 9:return i++,[3,7];case 10:a=0,c=e.nonPositionedFloats,v.label=11;case 11:return a<c.length?(U=c[a],[4,this.renderStack(U)]):[3,14];case 12:v.sent(),v.label=13;case 13:return a++,[3,11];case 14:u=0,d=e.nonPositionedInlineLevel,v.label=15;case 15:return u<d.length?(U=d[u],[4,this.renderStack(U)]):[3,18];case 16:v.sent(),v.label=17;case 17:return u++,[3,15];case 18:p=0,B=e.inlineLevel,v.label=19;case 19:return p<B.length?(U=B[p],[4,this.renderNode(U)]):[3,22];case 20:v.sent(),v.label=21;case 21:return p++,[3,19];case 22:m=0,C=e.zeroOrAutoZIndexOrTransformedOrOpacity,v.label=23;case 23:return m<C.length?(U=C[m],[4,this.renderStack(U)]):[3,26];case 24:v.sent(),v.label=25;case 25:return m++,[3,23];case 26:E=0,S=e.positiveZIndex,v.label=27;case 27:return E<S.length?(U=S[E],[4,this.renderStack(U)]):[3,30];case 28:v.sent(),v.label=29;case 29:return E++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var n=this;e.forEach(function(r,i){var s=Vt(r)?r.start:r;i===0?n.ctx.moveTo(s.x,s.y):n.ctx.lineTo(s.x,s.y),Vt(r)&&n.ctx.bezierCurveTo(r.startControl.x,r.startControl.y,r.endControl.x,r.endControl.y,r.end.x,r.end.y)})},A.prototype.renderRepeat=function(e,n,r,i){this.path(e),this.ctx.fillStyle=n,this.ctx.translate(r,i),this.ctx.fill(),this.ctx.translate(-r,-i)},A.prototype.resizeImage=function(e,n,r){var i;if(e.width===n&&e.height===r)return e;var s=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,a=s.createElement("canvas");a.width=Math.max(1,n),a.height=Math.max(1,r);var c=a.getContext("2d");return c.drawImage(e,0,0,e.width,e.height,0,0,n,r),a},A.prototype.renderBackgroundImage=function(e){return rt(this,void 0,void 0,function(){var n,r,i,s,a,c;return Xe(this,function(u){switch(u.label){case 0:n=e.styles.backgroundImage.length-1,r=function(d){var p,B,m,eA,bA,vA,aA,HA,W,C,eA,bA,vA,aA,HA,E,S,U,v,M,F,T,L,N,W,$,eA,gA,wA,aA,HA,WA,bA,vA,mA,re,ZA,$A,Be,me,Te,jA;return Xe(this,function(fe){switch(fe.label){case 0:if(d.type!==0)return[3,5];p=void 0,B=d.url,fe.label=1;case 1:return fe.trys.push([1,3,,4]),[4,i.context.cache.match(B)];case 2:return p=fe.sent(),[3,4];case 3:return fe.sent(),i.context.logger.error("Error loading background-image "+B),[3,4];case 4:return p&&(m=vf(e,n,[p.width,p.height,p.width/p.height]),eA=m[0],bA=m[1],vA=m[2],aA=m[3],HA=m[4],W=i.ctx.createPattern(i.resizeImage(p,aA,HA),"repeat"),i.renderRepeat(eA,W,bA,vA)),[3,6];case 5:DH(d)?(C=vf(e,n,[null,null,null]),eA=C[0],bA=C[1],vA=C[2],aA=C[3],HA=C[4],E=HH(d.angle,aA,HA),S=E[0],U=E[1],v=E[2],M=E[3],F=E[4],T=document.createElement("canvas"),T.width=aA,T.height=HA,L=T.getContext("2d"),N=L.createLinearGradient(U,M,v,F),xm(d.stops,S).forEach(function(it){return N.addColorStop(it.stop,Se(it.color))}),L.fillStyle=N,L.fillRect(0,0,aA,HA),aA>0&&HA>0&&(W=i.ctx.createPattern(T,"repeat"),i.renderRepeat(eA,W,bA,vA))):kH(d)&&($=vf(e,n,[null,null,null]),eA=$[0],gA=$[1],wA=$[2],aA=$[3],HA=$[4],WA=d.position.length===0?[Zu]:d.position,bA=YA(WA[0],aA),vA=YA(WA[WA.length-1],HA),mA=LH(d,bA,vA,aA,HA),re=mA[0],ZA=mA[1],re>0&&ZA>0&&($A=i.ctx.createRadialGradient(gA+bA,wA+vA,0,gA+bA,wA+vA,re),xm(d.stops,re*2).forEach(function(it){return $A.addColorStop(it.stop,Se(it.color))}),i.path(eA),i.ctx.fillStyle=$A,re!==ZA?(Be=e.bounds.left+.5*e.bounds.width,me=e.bounds.top+.5*e.bounds.height,Te=ZA/re,jA=1/Te,i.ctx.save(),i.ctx.translate(Be,me),i.ctx.transform(1,0,0,Te,0,0),i.ctx.translate(-Be,-me),i.ctx.fillRect(gA,jA*(wA-me)+me,aA,HA*jA),i.ctx.restore()):i.ctx.fill())),fe.label=6;case 6:return n--,[2]}})},i=this,s=0,a=e.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return s<a.length?(c=a[s],[5,r(c)]):[3,4];case 2:u.sent(),u.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,n,r){return rt(this,void 0,void 0,function(){return Xe(this,function(i){return this.path(Rw(r,n)),this.ctx.fillStyle=Se(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,n,r,i){return rt(this,void 0,void 0,function(){var s,a;return Xe(this,function(c){switch(c.label){case 0:return n<3?[4,this.renderSolidBorder(e,r,i)]:[3,2];case 1:return c.sent(),[2];case 2:return s=KO(i,r),this.path(s),this.ctx.fillStyle=Se(e),this.ctx.fill(),a=VO(i,r),this.path(a),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return rt(this,void 0,void 0,function(){var n,r,i,s,a,c,u,d,p=this;return Xe(this,function(B){switch(B.label){case 0:return this.applyEffects(e.getEffects(2)),n=e.container.styles,r=!yr(n.backgroundColor)||n.backgroundImage.length,i=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],s=jO(Yi(n.backgroundClip,0),e.curves),r||n.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),yr(n.backgroundColor)||(this.ctx.fillStyle=Se(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:B.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(m){p.ctx.save();var C=nl(e.curves),E=m.inset?0:zO,S=NO(C,-E+(m.inset?1:-1)*m.spread.number,(m.inset?1:-1)*m.spread.number,m.spread.number*(m.inset?-2:2),m.spread.number*(m.inset?-2:2));m.inset?(p.path(C),p.ctx.clip(),p.mask(S)):(p.mask(C),p.ctx.clip(),p.path(S)),p.ctx.shadowOffsetX=m.offsetX.number+E,p.ctx.shadowOffsetY=m.offsetY.number,p.ctx.shadowColor=Se(m.color),p.ctx.shadowBlur=m.blur.number,p.ctx.fillStyle=m.inset?Se(m.color):"rgba(0,0,0,1)",p.ctx.fill(),p.ctx.restore()}),B.label=2;case 2:a=0,c=0,u=i,B.label=3;case 3:return c<u.length?(d=u[c],d.style!==0&&!yr(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return B.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,a,e.curves,3)];case 6:return B.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,a,e.curves)];case 8:return B.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,a,e.curves)];case 10:B.sent(),B.label=11;case 11:a++,B.label=12;case 12:return c++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,n,r,i,s){return rt(this,void 0,void 0,function(){var a,c,u,d,p,B,m,C,E,S,U,v,M,F,T,L,T,L;return Xe(this,function(N){return this.ctx.save(),a=PO(i,r),c=Rw(i,r),s===2&&(this.path(c),this.ctx.clip()),Vt(c[0])?(u=c[0].start.x,d=c[0].start.y):(u=c[0].x,d=c[0].y),Vt(c[1])?(p=c[1].end.x,B=c[1].end.y):(p=c[1].x,B=c[1].y),r===0||r===2?m=Math.abs(u-p):m=Math.abs(d-B),this.ctx.beginPath(),s===3?this.formatPath(a):this.formatPath(c.slice(0,2)),C=n<3?n*3:n*2,E=n<3?n*2:n,s===3&&(C=n,E=n),S=!0,m<=C*2?S=!1:m<=C*2+E?(U=m/(2*C+E),C*=U,E*=U):(v=Math.floor((m+E)/(C+E)),M=(m-v*C)/(v-1),F=(m-(v+1)*C)/v,E=F<=0||Math.abs(E-M)<Math.abs(E-F)?M:F),S&&(s===3?this.ctx.setLineDash([0,C+E]):this.ctx.setLineDash([C,E])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=Se(e),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(Vt(c[0])&&(T=c[3],L=c[0],this.ctx.beginPath(),this.formatPath([new Z(T.end.x,T.end.y),new Z(L.start.x,L.start.y)]),this.ctx.stroke()),Vt(c[1])&&(T=c[1],L=c[2],this.ctx.beginPath(),this.formatPath([new Z(T.end.x,T.end.y),new Z(L.start.x,L.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return rt(this,void 0,void 0,function(){var n;return Xe(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Se(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=RO(e),[4,this.renderStack(n)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(Pw),ZO=function(t){return t instanceof dw||t instanceof fw?!0:t instanceof gf&&t.type!==qa&&t.type!==za},jO=function(t,A){switch(t){case 0:return nl(A);case 2:return _O(A);case 1:default:return rl(A)}},AM=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},eM=["-apple-system","system-ui"],tM=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(A){return eM.indexOf(A)===-1}):t},nM=function(t){sn(A,t);function A(e,n){var r=t.call(this,e,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return A.prototype.render=function(e){return rt(this,void 0,void 0,function(){var n,r;return Xe(this,function(i){switch(i.label){case 0:return n=df(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,rM(n)];case 1:return r=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Se(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(r,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(Pw),rM=function(t){return new Promise(function(A,e){var n=new Image;n.onload=function(){A(n)},n.onerror=e,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},iM=function(){function t(A){var e=A.id,n=A.enabled;this.id=e,this.enabled=n,this.start=Date.now()}return t.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,ga([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,ga([this.id,this.getTime()+"ms"],A))},t.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,ga([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,ga([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.instances={},t}(),sM=function(){function t(A,e){var n;this.windowBounds=e,this.instanceName="#"+t.instanceCount++,this.logger=new iM({id:this.instanceName,enabled:A.logging}),this.cache=(n=A.cache)!==null&&n!==void 0?n:new bO(this,A)}return t.instanceCount=1,t}(),oM=function(t,A){return A===void 0&&(A={}),aM(t,A)};typeof window<"u"&&_w.setContext(window);var aM=function(t,A){return rt(void 0,void 0,void 0,function(){var e,n,r,i,s,a,c,u,d,p,B,m,C,E,S,U,v,M,F,T,N,L,N,W,$,eA,gA,wA,aA,HA,WA,bA,vA,mA,re,ZA,$A,Be,me,Te;return Xe(this,function(jA){switch(jA.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=t.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(n=e.defaultView,!n)throw new Error("Document is not attached to a Window");return r={allowTaint:(W=A.allowTaint)!==null&&W!==void 0?W:!1,imageTimeout:($=A.imageTimeout)!==null&&$!==void 0?$:15e3,proxy:A.proxy,useCORS:(eA=A.useCORS)!==null&&eA!==void 0?eA:!1},i=xu({logging:(gA=A.logging)!==null&&gA!==void 0?gA:!0,cache:A.cache},r),s={windowWidth:(wA=A.windowWidth)!==null&&wA!==void 0?wA:n.innerWidth,windowHeight:(aA=A.windowHeight)!==null&&aA!==void 0?aA:n.innerHeight,scrollX:(HA=A.scrollX)!==null&&HA!==void 0?HA:n.pageXOffset,scrollY:(WA=A.scrollY)!==null&&WA!==void 0?WA:n.pageYOffset},a=new Dn(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),c=new sM(i,a),u=(bA=A.foreignObjectRendering)!==null&&bA!==void 0?bA:!1,d={allowTaint:(vA=A.allowTaint)!==null&&vA!==void 0?vA:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:u,copyStyles:u},c.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),p=new Hw(c,t,d),B=p.clonedReferenceElement,B?[4,p.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return m=jA.sent(),C=mf(B)||lO(B)?NT(B.ownerDocument):Ba(c,B),E=C.width,S=C.height,U=C.left,v=C.top,M=lM(c,B,A.backgroundColor),F={canvas:A.canvas,backgroundColor:M,scale:(re=(mA=A.scale)!==null&&mA!==void 0?mA:n.devicePixelRatio)!==null&&re!==void 0?re:1,x:((ZA=A.x)!==null&&ZA!==void 0?ZA:0)+U,y:(($A=A.y)!==null&&$A!==void 0?$A:0)+v,width:(Be=A.width)!==null&&Be!==void 0?Be:Math.ceil(E),height:(me=A.height)!==null&&me!==void 0?me:Math.ceil(S)},u?(c.logger.debug("Document cloned, using foreign object rendering"),N=new nM(c,F),[4,N.render(B)]):[3,3];case 2:return T=jA.sent(),[3,5];case 3:return c.logger.debug("Document cloned, element located at "+U+","+v+" with size "+E+"x"+S+" using computed rendering"),c.logger.debug("Starting DOM parsing"),L=gw(c,B),M===L.styles.backgroundColor&&(L.styles.backgroundColor=Nn.TRANSPARENT),c.logger.debug("Starting renderer for element at "+F.x+","+F.y+" with size "+F.width+"x"+F.height),N=new qO(c,F),[4,N.render(L)];case 4:T=jA.sent(),jA.label=5;case 5:return(!((Te=A.removeContainer)!==null&&Te!==void 0)||Te)&&(Hw.destroy(m)||c.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),c.logger.debug("Finished rendering"),[2,T]}})})},lM=function(t,A,e){var n=A.ownerDocument,r=n.documentElement?Zs(t,getComputedStyle(n.documentElement).backgroundColor):Nn.TRANSPARENT,i=n.body?Zs(t,getComputedStyle(n.body).backgroundColor):Nn.TRANSPARENT,s=typeof e=="string"?Zs(t,e):e===null?Nn.TRANSPARENT:4294967295;return A===n.documentElement?yr(r)?yr(i)?s:i:r:s};const cM=h.defineComponent({__name:"dom-renderer",props:{modelValue:{type:String,default:""},fixedWidth:{type:Number,default:0},renderUpdates:{type:Boolean,default:!1},exportToSvg:{type:Boolean,default:!1},debug:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t,n=h.ref(),r=h.ref(""),i=h.ref();async function s(){if(n.value){const c=n.value,d=(await oM(c.firstElementChild,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,width:c.offsetWidth,height:c.offsetHeight})).toDataURL();if(A("update:modelValue",d),e.debug){const p=new Image;p.src=d,document.body.appendChild(p)}return d}return""}const a=Ds.debounce(async()=>{r.value=await s()},300,{trailing:!0,leading:!1});return h.onMounted(()=>{const c=n.value;e.renderUpdates&&(i.value=new MutationObserver(async u=>{a()}),i.value.observe(c,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{a()},500)}),(c,u)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:n,style:h.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[h.renderSlot(c.$slots,"default")],6))}}),uM={class:"link-sharing"},fM={key:0,class:"link-sharing__links container"},dM={class:"row"},hM={key:0,class:"col-12 col-md-6"},pM=["href"],gM={class:"caption"},BM={key:1,class:"col-12 col-md-6"},mM=["href"],wM={class:"caption"},CM={key:2,class:"col-12 col-md-6"},yM={class:"caption"},QM={key:3,class:"col-12 col-md-6"},EM=["href"],FM={class:"caption"},UM={key:4,class:"col-12 col-md-6"},bM=["href"],vM={class:"caption"},IM={key:5,class:"col-12 col-md-6"},SM=["onClick"],TM={class:"caption"},xM={key:6,class:"col-12 col-md-6"},HM=["href"],LM={class:"caption"},_M={key:1,class:"link-sharing__instructions pt-5"},OM={class:"row"},MM={class:"col-12 text-center py-0"},DM={class:"mb-5"},kM=t=>t.replace(/<(?:.|\n)*?>/gm,""),NM=h.defineComponent({__name:"link-sharing",props:{url:{type:String,default:""},subject:String,hashtags:Array,text:{type:String,default:""},media:{type:String,default:""},services:{type:Object,default:{facebook:!0,twitter:!0,instagram:!0,linkedin:!0,whatsapp:!0,mailto:!0,clipboard:!0}}},setup(t){const A=t,e=h.ref(!1),n=h.computed(()=>encodeURIComponent(A.url));h.computed(()=>encodeURIComponent(A.media));const r=h.computed(()=>kM(A.text)),i=h.computed(()=>Boolean(navigator&&navigator.userAgent&&/Mobi|Android/i.test(navigator.userAgent)));function s(){const a=document.createElement("textarea");document.body.appendChild(a),a.value=A.url,a.select(),document.execCommand("copy"),document.body.removeChild(a)}return(a,c)=>{const u=h.resolveComponent("svg-icon"),d=h.resolveDirective("track-click");return h.openBlock(),h.createElementBlock("div",uM,[e.value?(h.openBlock(),h.createElementBlock("div",_M,[h.createElementVNode("div",OM,[h.createElementVNode("div",MM,[h.createElementVNode("div",DM,[h.createElementVNode("p",null,h.toDisplayString(a.$t("sharing.instructions",{service:"Instagram"})),1),h.createElementVNode("p",null,[h.createElementVNode("strong",null,h.toDisplayString(t.hashtags),1)])])])])])):(h.openBlock(),h.createElementBlock("div",fM,[h.createElementVNode("div",dM,[t.services.facebook?(h.openBlock(),h.createElementBlock("div",hM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`https://www.facebook.com/sharer.php?u=${h.unref(n)}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"facebook"}),h.createElementVNode("span",gM,h.toDisplayString(a.$t("sharing.facebook")),1)],8,pM)),[[d,"share-facebook"]])])):h.createCommentVNode("",!0),t.services.twitter?(h.openBlock(),h.createElementBlock("div",BM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`https://twitter.com/share?text=${t.subject}&url=${h.unref(n)}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"twitter"}),h.createElementVNode("span",wM,h.toDisplayString(a.$t("sharing.twitter")),1)],8,mM)),[[d,"share-twitter"]])])):h.createCommentVNode("",!0),t.services.instagram?(h.openBlock(),h.createElementBlock("div",CM,[h.withDirectives((h.openBlock(),h.createElementBlock("button",{class:"link-sharing__link btn btn-primary",onClick:c[0]||(c[0]=h.withModifiers(p=>e.value=!e.value,["prevent"])),target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"instagram"}),h.createElementVNode("span",yM,h.toDisplayString(a.$t("sharing.instagram")),1)])),[[d,"share-instagram"]])])):h.createCommentVNode("",!0),t.services.linkedin?(h.openBlock(),h.createElementBlock("div",QM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`https://www.linkedin.com/shareArticle?mini=true&url=${h.unref(n)}&title=${t.subject}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"linkedin"}),h.createElementVNode("span",FM,h.toDisplayString(a.$t("sharing.linkedin")),1)],8,EM)),[[d,"share-linkedin"]])])):h.createCommentVNode("",!0),t.services.whatsapp&&h.unref(i)?(h.openBlock(),h.createElementBlock("div",UM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`whatsapp://send?text=${h.unref(n)}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"whatsapp"}),h.createElementVNode("span",vM,h.toDisplayString(a.$t("sharing.whatsapp")),1)],8,bM)),[[d,"share-whatsapp"]])])):h.createCommentVNode("",!0),t.services.clipboard?(h.openBlock(),h.createElementBlock("div",IM,[h.withDirectives((h.openBlock(),h.createElementBlock("button",{class:"link-sharing__link btn btn-primary",onClick:h.withModifiers(s,["prevent","stop"]),target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"copy"}),h.createElementVNode("span",TM,h.toDisplayString(a.$t("sharing.clipboard")),1)],8,SM)),[[d,"share-clipboard"]])])):h.createCommentVNode("",!0),t.services.mailto?(h.openBlock(),h.createElementBlock("div",xM,[h.withDirectives((h.openBlock(),h.createElementBlock("a",{class:"link-sharing__link btn btn-primary",href:`mailto:?subject=${t.subject}&body=${h.unref(r)}%0D%0A${t.url}`,target:"_blank",rel:"noopener"},[h.createVNode(u,{symbol:"mail"}),h.createElementVNode("span",LM,h.toDisplayString(a.$t("sharing.mailto")),1)],8,HM)),[[d,"share-mailto"]])])):h.createCommentVNode("",!0)])]))])}}}),KP="",RM={class:"base-form"},KM=["onSubmit"],VM=h.defineComponent({__name:"base-form",props:{id:null,name:null,variant:null,disabled:{type:Boolean},pending:{type:Boolean}},setup(t){function A(r){console.log("input",r)}function e(r){console.log("reset",r)}function n(r){console.log("submit",r)}return(r,i)=>(h.openBlock(),h.createElementBlock("div",RM,[h.createElementVNode("form",{ref:"form",onInput:A,onReset:e,onSubmit:h.withModifiers(n,["prevent"])},[h.renderSlot(r.$slots,"default")],40,KM)]))}}),VP="";MA.Accordion=Ry,MA.AccordionItem=Oy,MA.AssetUploader=CT,MA.BaseButton=Vy,MA.BaseCamera=tT,MA.BaseCarousel=KB,MA.BaseForm=VM,MA.BaseHeadline=by,MA.BaseInput=$y,MA.BaseParagraph=vy,MA.CheckGroup=rQ,MA.DomRenderer=cM,MA.FileUpload=lT,MA.InputCheckbox=AQ,MA.InputColor=RI,MA.InputDropdown=_S,MA.InputFile=BQ,MA.InputTextarea=zy,MA.LinkSharing=NM,MA.LoadingSpinner=Uy,MA.MediaThumbnails=ST,MA.ProgressSteps=kT,MA.RadioGroup=lQ,MA.RteEditor=MI,MA.SvgIcon=wy,MA.UploadGroup=RB,Object.defineProperty(MA,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.1.37",
4
+ "version": "0.1.39",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc --noEmit && vite build",